UNPKG

jodit-pro

Version:

PRO Version of Jodit Editor

8 lines 1.13 MB
/*! * jodit-pro - PRO Version of Jodit Editor * Author: Chupurnov Valerii <chupurnov@gmail.com> * Version: v4.9.27 * Url: https://xdsoft.net/jodit/pro/ * License(s): SEE LICENSE IN LICENSE.md */ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,function(){return function(){"use strict";var e,t,n,r,o={117:function(e,t,n){n.d(t,{askInsertTypeDialog:function(){return c},getAllTypes:function(){return u},pasteInsertHtml:function(){return s}});var r=n(82758),o=n(2748),i=n(27613),a=n(10830);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function s(e,t,n){if(!t.isInDestruct){e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);var r,a,l,s=t.e.fire("beforePasteInsert",n);!(0,i.isVoid)(s)&&((0,i.isString)(s)||(0,i.isNumber)(s)||o.Dom.isNode(s))&&(n=s),(0,i.isString)(n)&&(-1!==(a=(r=(r=n).replace(/<meta[^>]+?>/g,"")).search(/<!--StartFragment-->/i))&&(r=r.substring(a+20)),-1!==(l=r.search(/<!--EndFragment-->/i))&&(r=r.substring(0,l)),n=r),t.s.insertHTML(n)}}function u(e){var t=e.types,n="";if((0,i.isArray)(t)||"[object DOMStringList]"===({}).toString.call(t))for(var o=0;o<t.length;o+=1)n+=t[o]+";";else n=(t||r.TEXT_PLAIN).toString()+";";return n}function c(e,t,n,r,o){if(!1!==e.e.fire("beforeOpenPasteDialog",t,n,r,o)){var i=e.confirm('<div style="word-break: normal; white-space: normal">'.concat(e.i18n(t),"</div>"),e.i18n(n)),s=o.map(function(t){var n=t.text,o=t.value;return(0,a.Button)(e,{text:n,name:n.toLowerCase(),tabIndex:0}).onAction(function(){i.close(),r(o)})});i.e.one(i,"afterClose",function(){e.s.isFocused()||e.s.focus()});var u=(0,a.Button)(e,{text:"Cancel",tabIndex:0}).onAction(function(){i.close()});return i.setFooter(((function(e){if(Array.isArray(e))return l(e)})(s)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||function(e){if(e){if("string"==typeof e)return l(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,void 0)}}(s)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([u])),s[0].focus(),s[0].state.variant="primary",e.e.fire("afterOpenPasteDialog",i,t,n,r,o),i}}},159:function(e,t,n){n.d(t,{FileBrowserItem:function(){return i}});var r=n(21537);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){var e,t;function n(e){var t=this;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");this.data=e,Object.keys(e).forEach(function(n){t[n]=e[n]})}return e=[{key:"path",get:function(){return(0,r.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}},{key:"imageURL",get:function(){var e=this.time||new Date().getTime().toString(),t=this.data,n=t.thumbIsAbsolute,o=t.source,i=t.thumb,a=t.file,l=i||a;return n&&l?l:(0,r.normalizeUrl)(o.baseurl,o.path,l||"")+"?_tmst="+encodeURIComponent(e)}},{key:"fileURL",get:function(){var e=this.data.name,t=this.data,n=t.file,o=t.fileIsAbsolute,i=t.source;return void 0!==n&&(e=n),o&&e?e:(0,r.normalizeUrl)(i.baseurl,i.path,e||"")}},{key:"time",get:function(){var e=this.data.changed;return e&&("number"==typeof e?new Date(e).toLocaleString():e)||""}},{key:"uniqueHashKey",get:function(){var e=this.data;return[e.sourceName,e.name,e.file,this.time,e.thumb].join("_").toLowerCase().replace(/[^0-9a-z\-.]/g,"-")}},{key:"toJSON",value:function(){return this.data}}],t=[{key:"create",value:function(e){return(null!=n&&"u">typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e:new n(e)}}],e&&o(n.prototype,e),t&&o(n,t),n}()},302:function(e,t,n){n.d(t,{getKey:function(){return o}});var r=n(2748),o=function(e,t){return"".concat(r.Dom.isCell(t)?"padding":"margin").concat("rtl"===e?"Right":"Left")}},384:function(e,t,n){n.d(t,{sanitizeAttributes:function(){return i}});var r=n(2748),o=n(21537);function i(e,t,n){return!!(r.Dom.isElement(t)&&(0,o.sanitizeHTMLElement)(t,{safeJavaScriptLink:e.options.cleanHTML.safeJavaScriptLink,removeOnError:e.options.cleanHTML.removeOnError}))||n}},445:function(e,t){t.default='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg> '},575:function(e,t,n){var r=n(82758),o=n(65478),i=n(2748),a=n(580),l=n(87612),s=n(20356),u=n(35399);function c(e,t,n){return(c=m()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&d(o,n.prototype),o}).apply(null,arguments)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)})(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}var v=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=f(e),function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,m()?Reflect.construct(e,t||[],f(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&d(n,e),t=[{key:"afterInit",value:function(e){var t=this,n=e.o.enter.toLowerCase(),o=n===r.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=o?r.PARAGRAPH:n),e.registerCommand("enter",function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.onEnter(r)})}},{key:"onEnterKeyDown",value:function(e){if(e.key===r.KEY_ENTER){var t=this.j,n=t.e.fire("beforeEnter",e);return void 0!==n?n:(t.s.isCollapsed()||t.execCommand("Delete"),t.s.focus(),this.onEnter(e),t.e.fire("afterEnter",e),t.synchronizeValues(),!1)}}},{key:"onEnter",value:function(e){var t=this.jodit,n=t.createInside.fake();try{i.Dom.safeInsertNode(t.s.range,n),(0,u.moveCursorOutFromSpecialTags)(t,n,["a"]);var r=(0,u.getBlockWrapper)(n,t),o=i.Dom.isLeaf(r);if((!o||(null==e?void 0:e.shiftKey))&&(0,u.checkBR)(n,t,null==e?void 0:e.shiftKey))return!1;if(r||(0,u.hasPreviousBlock)(n,t)||(r=(0,u.wrapText)(n,t)),!r)return(0,u.insertParagraph)(n,t,o?"li":t.o.enter),!1;if(!(0,u.checkUnsplittableBox)(n,t,r))return!1;if(o&&this.__isEmptyListLeaf(r))return(0,u.processEmptyLILeaf)(n,t,r),!1;(0,u.splitFragment)(n,t,r)}finally{n.isConnected&&t.s.setCursorBefore(n),i.Dom.safeRemove(n)}}},{key:"__isEmptyListLeaf",value:function(e){var t=this.j.e.fire("enterIsEmptyListLeaf",e);return(0,l.isBoolean)(t)?t:i.Dom.isEmpty(e)}},{key:"beforeDestruct",value:function(e){e.e.off("keydown.enter")}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(h(s.Plugin));!function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(("u"<typeof Reflect?"undefined":p(Reflect))==="object"&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);i>3&&a&&Object.defineProperty(t,n,a)}([(0,o.watch)(":keydown.enter")],v.prototype,"onEnterKeyDown",null),a.pluginSystem.add("enter",v)},580:function(e,t,n){n.d(t,{eventEmitter:function(){return _},extendLang:function(){return b},getContainer:function(){return k},getPopupViewRoot:function(){return S},instances:function(){return p},modules:function(){return g},pluginSystem:function(){return y},uniqueUid:function(){return v}});var r=n(19306),o=n(70799),i=n(39955),a=n(12475),l=n(41180),s=n(80568),u=n(41876),c=n(57012),f=n(82758),d=n(22732),p={},h=1,m=new Set;function v(){function e(){return Math.round(h+=10*(Math.random()+1)).toString(16)}for(var t=e();m.has(t);)t=e();return m.add(t),t}var y=new u.PluginSystem({getContainer:k}),g={},b=function(e){Object.keys(e).forEach(function(t){f.lang[t]?Object.assign(f.lang[t],e[t]):f.lang[t]=e[t]})},w=new WeakMap;function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"div",l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],u=(0,o.isString)(t)?t:t?(0,s.getClassName)(t.prototype):"jodit-utils",c=w.get(e)||{},f=u+n,p=(0,i.isViewObject)(e)?e:e.j,h=null;if(!c[f]){var m=p.c;if(h=S(p.o,p.container,e.od.body),l&&(0,r.isJoditObject)(e)&&e.od!==e.ed){m=e.createInside;var v="style"===n?e.ed.head:e.ed.body;h=(0,r.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:v}var y=m.element(n,{className:"jodit jodit-".concat((0,a.kebabCase)(u),"-container jodit-box")});y.classList.add("jodit_theme_".concat(p.o.theme||"default")),h.appendChild(y),c[f]=y,e.hookStatus("beforeDestruct",function(){p.events.off(y),d.Dom.safeRemove(y),delete c[f],Object.keys(c).length&&w.delete(e)}),w.set(e,c),p.events.fire("getContainer",y)}return c[f].classList.remove("jodit_theme_default","jodit_theme_dark"),c[f].classList.add("jodit_theme_".concat(p.o.theme||"default")),c[f]}function S(e,t,n){var r,o,i;return null!=(i=null!=(o=null!=(r=e.popupRoot)?r:e.shadowRoot)?o:d.Dom.closest(t,function(e){return d.Dom.isHTMLElement(e)&&(d.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position")))},n))?i:n}var _=c.eventEmitter},638:function(e,t,n){n.d(t,{Alert:function(){return r.Alert},Confirm:function(){return o.Confirm},Dialog:function(){return i.Dialog},Prompt:function(){return a.Prompt}});var r=n(71568),o=n(26866),i=n(78584),a=n(36806)},757:function(e,t,n){var r=n(6441);r.Config.prototype.mediaFakeTag="jodit-media",r.Config.prototype.mediaInFakeBlock=!0,r.Config.prototype.mediaBlocks=["video","audio"]},767:function(e,t,n){var r=n(82758),o=n(65478),i=n(580),a=n(50911);n(66288);var l=n(47686);function s(e,t,n){return(s=p()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&c(o,n.prototype),o}).apply(null,arguments)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function d(e){var t="function"==typeof Map?new Map:void 0;return(d=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return s(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)})(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var h=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(("u"<typeof Reflect?"undefined":f(Reflect))==="object"&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},m=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=u(e),function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,p()?Reflect.construct(e,t||[],u(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&c(n,e),t=[{key:"afterInit",value:function(e){}},{key:"__onTab",value:function(e){if(e.key===r.KEY_TAB&&this.__onShift(e.shiftKey))return!1}},{key:"__onCommand",value:function(e){if(("indent"===e||"outdent"===e)&&this.__onShift("outdent"===e))return!1}},{key:"__onShift",value:function(e){var t=(0,l.onTabInsideLi)(this.j,e);return t&&this.j.e.fire("afterTab",e),t}},{key:"beforeDestruct",value:function(e){}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(d(a.Plugin));h([(0,o.watch)(":keydown.tab")],m.prototype,"__onTab",null),h([(0,o.watch)(":beforeCommand.tab")],m.prototype,"__onCommand",null),i.pluginSystem.add("tab",m)},820:function(e,t){t.default='<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox="0 0 1792 1792"> <path d="M747 1521q74 32 140 32 376 0 376-335 0-114-41-180-27-44-61.5-74t-67.5-46.5-80.5-25-84-10.5-94.5-2q-73 0-101 10 0 53-.5 159t-.5 158q0 8-1 67.5t-.5 96.5 4.5 83.5 12 66.5zm-14-746q42 7 109 7 82 0 143-13t110-44.5 74.5-89.5 25.5-142q0-70-29-122.5t-79-82-108-43.5-124-14q-50 0-130 13 0 50 4 151t4 152q0 27-.5 80t-.5 79q0 46 1 69zm-541 889l2-94q15-4 85-16t106-27q7-12 12.5-27t8.5-33.5 5.5-32.5 3-37.5.5-34v-65.5q0-982-22-1025-4-8-22-14.5t-44.5-11-49.5-7-48.5-4.5-30.5-3l-4-83q98-2 340-11.5t373-9.5q23 0 68.5.5t67.5.5q70 0 136.5 13t128.5 42 108 71 74 104.5 28 137.5q0 52-16.5 95.5t-39 72-64.5 57.5-73 45-84 40q154 35 256.5 134t102.5 248q0 100-35 179.5t-93.5 130.5-138 85.5-163.5 48.5-176 14q-44 0-132-3t-132-3q-106 0-307 11t-231 12z"/> </svg> '},1115:function(e,t,n){n.r(t),t.default={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"\xc4\xe4ni","Interim Results":"V\xe4litulokset"}},1172:function(e,t){t.default={"copy-format":"复制格式"}},1255:function(e,t,n){var r,o,i=n(65478),a=n(22732),l=n(580),s=n(21537),u=n(50911);function c(e,t,n){return(c=m()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&d(o,n.prototype),o}).apply(null,arguments)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)})(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}n(44586);var v=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(("u"<typeof Reflect?"undefined":p(Reflect))==="object"&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};(r=o||(o={}))[r.IDLE=0]="IDLE",r[r.WAIT_DRAGGING=1]="WAIT_DRAGGING",r[r.DRAGGING=2]="DRAGGING";var y=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=f(t),(e=function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,m()?Reflect.construct(t,r||[],f(this).constructor):t.apply(this,r))).dragList=[],e.draggable=null,e.isCopyMode=!1,e.diffStep=10,e.startX=0,e.startY=0,e.state=o.IDLE,e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&d(n,e),t=[{key:"afterInit",value:function(){this.dragList=this.j.o.draggableTags?(0,s.splitArray)(this.j.o.draggableTags).filter(Boolean).map(function(e){return e.toLowerCase()}):[],this.dragList.length&&this.j.e.on("mousedown dragstart",this.onDragStart)}},{key:"onDragStart",value:function(e){var t=this;if("dragstart"===e.type&&this.draggable)return!1;if(!(this.state>o.IDLE)){var n=e.target;if(this.dragList.length&&n){var r=function(e){return!!(e&&t.dragList.includes(e.nodeName.toLowerCase()))},i=a.Dom.furthest(n,r,this.j.editor)||(r(n)?n:null);i&&(a.Dom.isTag(i.parentElement,"a")&&i.parentElement.firstChild===i&&i.parentElement.lastChild===i&&(i=i.parentElement),this.startX=e.clientX,this.startY=e.clientY,this.isCopyMode=(0,s.ctrlKey)(e),this.draggable=i.cloneNode(!0),(0,s.dataBind)(this.draggable,"target",i),this.state=o.WAIT_DRAGGING,this.addDragListeners())}}}},{key:"onDrag",value:function(e){if(this.draggable&&this.state!==o.IDLE){var t,r,i=e.clientX,a=e.clientY;if(!(this.state===o.WAIT_DRAGGING&&Math.sqrt(Math.pow(i-this.startX,2)+Math.pow(a-this.startY,2))<this.diffStep)){if(this.state===o.WAIT_DRAGGING&&(this.j.lock("drag-and-drop-element"),this.state=o.DRAGGING),this.j.e.fire("hidePopup hideResizer"),!this.draggable.parentNode){var u=(0,s.dataBind)(this.draggable,"target");(0,s.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:e.clientX,top:e.clientY,width:null!=(t=null==u?void 0:u.offsetWidth)?t:100,height:null!=(r=null==u?void 0:u.offsetHeight)?r:100}),(0,l.getContainer)(this.j,n).appendChild(this.draggable)}(0,s.css)(this.draggable,{left:e.clientX,top:e.clientY}),this.j.s.insertCursorAtPoint(e.clientX,e.clientY)}}}},{key:"onDragEnd",value:function(){!this.isInDestruct&&(this.removeDragListeners(),this.j.unlock(),this.state=o.IDLE,this.draggable&&(a.Dom.safeRemove(this.draggable),this.draggable=null))}},{key:"onDrop",value:function(){if(!this.draggable||this.state<o.DRAGGING)return void this.onDragEnd();var e=(0,s.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(e=e.cloneNode(!0));var t=e.parentElement;this.j.s.insertNode(e,!0,!1),t&&a.Dom.isEmpty(t)&&!a.Dom.isCell(t)&&a.Dom.safeRemove(t),a.Dom.isTag(e,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",e),this.j.e.fire("synchro")}},{key:"addDragListeners",value:function(){this.j.e.on(this.j.editor,"mousemove",this.onDrag).on("mouseup",this.onDrop).on([this.j.ew,this.ow],"mouseup",this.onDragEnd)}},{key:"removeDragListeners",value:function(){this.j.e.off(this.j.editor,"mousemove",this.onDrag).off("mouseup",this.onDrop).off([this.j.ew,this.ow],"mouseup",this.onDragEnd)}},{key:"beforeDestruct",value:function(){this.onDragEnd(),this.j.e.off("mousedown dragstart",this.onDragStart),this.removeDragListeners()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(h(u.Plugin));v([i.autobind],y.prototype,"onDragStart",null),v([(0,i.throttle)(function(e){return e.defaultTimeout/10})],y.prototype,"onDrag",null),v([i.autobind],y.prototype,"onDragEnd",null),v([i.autobind],y.prototype,"onDrop",null),l.pluginSystem.add("dragAndDropElement",y)},1322:function(e,t,n){n.r(t),t.default={Spellcheck:"Stavekontroll"}},1580:function(e,t,n){n.d(t,{processImage:function(){return o}});var r=n(21537),o=function(e,t){if(t.rtf&&"#comment"===e.name&&e.attributes.nodeValue&&-1!==e.attributes.nodeValue.indexOf("<v:shape")){t.shapes||(t.shapes={});var n=t.jodit.create.fromHTML(e.attributes.nodeValue);return(0,r.toArray)(n.getElementsByTagName("v:shape")).forEach(function(e){t.shapes[e.id]=e.getAttribute("o:spid")}),e}if("img"!==e.name)return e;if(t.rtf&&e.attributes["v:shapes"]){var o=null==(a=t.shapes)?void 0:a[e.attributes["v:shapes"]];if(o){var a,l,s=null!=(l=t.imageMap)?l:{};t.imageMap||(t.imageMap=s,i(t.rtf,"i","\\shppict",t.imageMap),i(t.rtf,"s","\\shp{",t.imageMap));var u=s[o.substring(7)];if(u){var c=[],f=u.hex.match(/[0-9a-f]{2}/gi);if(f){for(var d=0;d<f.length;d++){var p=parseInt(f[d],16);c.push(String.fromCharCode(p))}e.attributes.src="data:"+u.type+";base64,"+btoa(c.join(""))}}}}return e};function i(e,t,n,r){var o=e.split(n),i=!0,a=!1,l=void 0;try{for(var s,u=o[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value.split("shplid");if(1<c.length){for(var f=c[1],d="",p=0;p<f.length&&!/[{ \r\n\\]/.test(f[p]);p++)d+=f[p];var h=f.split("bliptag");if(h&&h.length<2)continue;var m=null;if(h[0].indexOf("pngblip")?m="image/png":-1!==h[0].indexOf("jpegblip")&&(m="image/jpeg"),!m)continue;var v=h[1].split("}");if(v&&v.length<2)continue;var y=void 0;if(2<v.length&&v[0].includes("blipuid"))y=v[1].split(" ");else{if((y=v[0].split(" "))&&y.length<2)continue;y.shift()}r[t+d]={hex:y.join(""),type:m}}}}catch(e){a=!0,l=e}finally{try{i||null==u.return||u.return()}finally{if(a)throw l}}}},1808:function(e,t,n){n.d(t,{UIMessages:function(){return f}});var r=n(87325),o=n(41180),i=n(62405),a=n(68389);function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}var f=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(e,t){var r,o,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{defaultTimeout:3e3,defaultOffset:5};if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,o=[e],r=l(r),(i=function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,c()?Reflect.construct(r,o||[],l(this).constructor):r.apply(this,o))).__box=t,i.options=a,i.__messages=new Set,i}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&s(n,e),t=[{key:"className",value:function(){return"UIMessages"}},{key:"info",value:function(e,t){this.__message(e,"info",t)}},{key:"success",value:function(e,t){this.__message(e,"success",t)}},{key:"error",value:function(e,t){this.__message(e,"error",t)}},{key:"message",value:function(e,t,n){this.__message(e,t,n)}},{key:"__message",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0,r=e+":"+t;if(this.__messages.has(r))return void this.async.updateTimeout(r,n||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+r);this.__box.appendChild(this.container);var o=new a.UIMessage(this.j,{text:e,variant:t});this.append(o),this.__calcOffsets(),this.__messages.add(r);var i=this.__getRemoveCallback(o,r);this.j.e.on(o.container,"pointerdown",i),this.async.setTimeout(i,{label:r,timeout:n||this.options.defaultTimeout})}},{key:"__getRemoveCallback",value:function(e,t){var n=this,r=function(o){o&&o.preventDefault(),e.isInDestruct||(n.async.clearTimeout(t),n.j.e.off(e.container,"pointerdown",r),n.__messages.delete(t),e.setMod("active",!1),n.async.setTimeout(function(){n.remove(e),e.destruct(),n.__calcOffsets()},300))};return r}},{key:"__calcOffsets",value:function(){var e=this,t=5;this.elements.forEach(function(n){(0,o.css)(n.container,"bottom",t+"px"),t+=n.container.offsetHeight+e.options.defaultOffset})}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(i.UIGroup);f=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(("u"<typeof Reflect?"undefined":u(Reflect))==="object"&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}([r.component],f)},1830:function(e,t){t.default={"Type something":"Start writing...",pencil:"Edit",Quadrate:"Square"}},1879:function(e,t,n){n.r(t),t.default={Spellcheck:"Spellingcontrole"}},2169:function(e,t,n){var r=n(580),o=n(19306),i=n(41180);n(99823);var a=new Set;r.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});var t=!1,n=0,r=0,l=!1,s=function(){var o=e.container;e.events&&(t?(n=(0,i.css)(o,"height",!0),r=(0,i.css)(o,"width",!0),(0,i.css)(o,{height:e.ow.innerHeight,width:e.ow.innerWidth}),l=!0):l&&(0,i.css)(o,{height:n||"auto",width:r||"auto"}))},u=function(n){var r,l=e.container,u=e.events;if(l){if(void 0===n&&(n=!l.classList.contains("jodit_fullsize")),e.setMod("fullsize",n),e.o.fullsize=n,t=n,l.classList.toggle("jodit_fullsize",n),e.toolbar&&((0,o.isJoditObject)(e)&&(null==(r=e.toolbarContainer)||r.appendChild(e.toolbar.container)),(0,i.css)(e.toolbar.container,"width","auto")),n?a.add(l):a.delete(l),e.o.globalFullSize&&(1===a.size&&n||0===a.size&&!n)){for(var c=l.parentNode;c&&c.nodeType!==Node.DOCUMENT_NODE&&c.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)c.classList.toggle("jodit_fullsize-box_true",n),c=c.parentNode;s()}u.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",s),e.e.on("afterInit afterOpen",function(){var t;e.toggleFullSize(null==(t=null==e?void 0:e.options)?void 0:t.fullsize)}).on("toggleFullSize",u).on("beforeDestruct",function(){t&&u(!1)}).on("beforeDestruct",function(){e.events&&e.e.off(e.ow,"resize",s)})})},2303:function(e,t,n){n.d(t,{Jodit:function(){return Jodit}});var r,o=n(82758),i=n(65478),a=n(580),l=n(21537),s=n(41601),u=n(70231),c=n(6441),f=n(41409);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return(h="u">typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=m(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}})(e,t,n||e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return d(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(w=function(){return!!e})()}var k=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if(("u"<typeof Reflect?"undefined":b(Reflect))==="object"&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},S="data-jodit-default-style-display",_="data-jodit-default-classes",C={contenteditable:!1},Jodit=r=function(e){var t,n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function Jodit(e,t){if(!(this instanceof Jodit))throw TypeError("Cannot call a class as a function");n=Jodit,i=[t,!0],n=m(n),(s=v(this,w()?Reflect.construct(n,i||[],m(this).constructor):n.apply(this,i))).isJodit=!0,s.commands=new Map,s.__selectionLocked=null,s.__wasReadOnly=!1,s.editorIsActive=!1,s.__mode=o.MODE_WYSIWYG,s.__callChangeCount=0,s.__isSilentChange=!1,s.currentPlace={options:s.__options,container:s.__container},s.places=[],s.__elementToPlace=new Map;try{var n,i,s,u=(0,l.resolveElement)(e,s.options.shadowRoot||s.od);if(r.isJoditAssigned(u))return v(s,u.component)}catch(e){if(!o.IS_PROD)throw e;throw s.destruct(),e}s.setStatus(f.STATUSES.beforeInit),s.id=(0,l.attr)((0,l.resolveElement)(e,s.o.shadowRoot||s.od),"id")||new Date().getTime().toString(),a.instances[s.id]=s,s.attachEvents(t),s.e.on(s.ow,"resize",function(){s.e&&s.e.fire("resize")}),s.e.on("prepareWYSIWYGEditor",s.__prepareWYSIWYGEditor),s.selection=new f.Selection(s);var c=s.beforeInitHook();return(0,l.callPromise)(c,function(){if(!s.isInDestruct){s.e.fire("beforeInit",s),a.pluginSystem.__init(s),s.e.fire("afterPluginSystemInit",s),s.e.on("changePlace",function(){s.setReadOnly(s.o.readonly),s.setDisabled(s.o.disabled)}),s.places.length=0;var n=s.addPlace(e,t);a.instances[s.id]=s,(0,l.callPromise)(n,function(){s.isInDestruct||(s.e&&s.e.fire("afterInit",s),(0,l.callPromise)(s.afterInitHook()),s.setStatus(f.STATUSES.ready),s.e.fire("afterConstructor",s))})}}),s}return Jodit.prototype=Object.create(e&&e.prototype,{constructor:{value:Jodit,writable:!0,configurable:!0}}),e&&y(Jodit,e),t=[{key:"className",value:function(){return"Jodit"}},{key:"waitForReady",value:function(){var e=this;return this.isReady?Promise.resolve(this):this.async.promise(function(t){e.hookStatus("ready",function(){return t(e)})})}},{key:"text",get:function(){if(this.editor)return this.editor.innerText||"";var e=this.createInside.div();return e.innerHTML=this.getElementValue(),e.innerText||""}},{key:"defaultTimeout",get:function(){return(0,l.isNumber)(this.o.defaultTimeout)?this.o.defaultTimeout:c.Config.defaultOptions.defaultTimeout}},{key:"createInside",get:function(){var e=this;return new f.Create(function(){return e.ed},this.o.createAttributes)}},{key:"__setPlaceField",value:function(e,t){this.currentPlace||(this.currentPlace={},this.places=[this.currentPlace]),this.currentPlace[e]=t}},{key:"element",get:function(){return this.currentPlace.element}},{key:"editor",get:function(){return this.currentPlace.editor},set:function(e){this.__setPlaceField("editor",e)}},{key:"container",get:function(){return this.currentPlace.container},set:function(e){this.__setPlaceField("container",e)}},{key:"workplace",get:function(){return this.currentPlace.workplace}},{key:"message",get:function(){return this.getMessageModule(this.workplace)}},{key:"statusbar",get:function(){return this.currentPlace.statusbar}},{key:"iframe",get:function(){return this.currentPlace.iframe},set:function(e){this.__setPlaceField("iframe",e)}},{key:"history",get:function(){return this.currentPlace.history}},{key:"editorWindow",get:function(){return this.currentPlace.editorWindow},set:function(e){this.__setPlaceField("editorWindow",e)}},{key:"ew",get:function(){return this.editorWindow}},{key:"editorDocument",get:function(){return this.currentPlace.editorWindow.document}},{key:"ed",get:function(){return this.editorDocument}},{key:"options",get:function(){return this.currentPlace.options},set:function(e){this.__options=e,this.__setPlaceField("options",e)}},{key:"s",get:function(){return this.selection}},{key:"uploader",get:function(){return this.getInstance("Uploader",this.o.uploader)}},{key:"filebrowser",get:function(){var e=this,t=(0,l.ConfigProto)({defaultTimeout:e.defaultTimeout,uploader:e.o.uploader,language:e.o.language,license:e.o.license,theme:e.o.theme,shadowRoot:e.o.shadowRoot,defaultCallback:function(t){t.files&&t.files.length&&t.files.forEach(function(n,r){var o=t.baseurl+n;t.isImages&&t.isImages[r]?e.s.insertImage(o,null,e.o.imageDefaultWidth):e.s.insertNode(e.createInside.fromHTML("<a href='".concat(o,"' title='").concat(o,"'>").concat(o,"</a>")))})}},this.o.filebrowser);return e.getInstance("FileBrowser",t)}},{key:"mode",get:function(){return this.__mode},set:function(e){this.setMode(e)}},{key:"getNativeEditorValue",value:function(){var e=this.e.fire("beforeGetNativeEditorValue");return(0,l.isString)(e)?e:this.editor?this.editor.innerHTML:this.getElementValue()}},{key:"setNativeEditorValue",value:function(e){var t={value:e};!this.e.fire("beforeSetNativeEditorValue",t)&&this.editor&&(this.editor.innerHTML=t.value)}},{key:"value",get:function(){return this.getEditorValue()},set:function(e){this.setEditorValue(e),this.history.__processChanges()}},{key:"synchronizeValues",value:function(){this.__imdSynchronizeValues()}},{key:"__imdSynchronizeValues",value:function(){this.setEditorValue()}},{key:"getEditorValue",value:function(){var e,t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],n=arguments.length>1?arguments[1]:void 0;if(void 0!==(e=this.e.fire("beforeGetValueFromEditor",n)))return e;e=this.getNativeEditorValue().replace(o.INVISIBLE_SPACE_REG_EXP(),""),t&&(e=e.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,"")),"<br>"===e&&(e="");var r={value:e};return this.e.fire("afterGetValueFromEditor",r,n),r.value}},{key:"setEditorValue",value:function(e){var t=this.e.fire("beforeSetValueToEditor",e);if(!1!==t){if((0,l.isString)(t)&&(e=t),!this.editor){void 0!==e&&this.__setElementValue(e);return}if(!(0,l.isString)(e)&&!(0,l.isVoid)(e))throw(0,l.error)("value must be string");(0,l.isVoid)(e)||this.getNativeEditorValue()===e||this.setNativeEditorValue(e),this.e.fire("postProcessSetEditorValue");var n=this.getElementValue(),r=this.getEditorValue();if(!this.__isSilentChange&&n!==r&&this.__callChangeCount<o.SAFE_COUNT_CHANGE_CALL){this.__setElementValue(r),this.__callChangeCount+=1,o.IS_PROD||this.__callChangeCount;try{this.history.__upTick(),this.e.fire("change",r,n),this.e.fire(this.history,"change",r,n)}finally{this.__callChangeCount=0}}}}},{key:"updateElementValue",value:function(){this.__setElementValue(this.getEditorValue())}},{key:"getElementValue",value:function(){return void 0!==this.element.value?this.element.value:this.element.innerHTML}},{key:"__setElementValue",value:function(e){var t=this;if(!(0,l.isString)(e))throw(0,l.error)("value must be string");if(this.element!==this.container&&e!==this.getElementValue()){var n={value:e},r=this.e.fire("beforeSetElementValue",n);(0,l.callPromise)(r,function(){void 0!==t.element.value?t.element.value=n.value:t.element.innerHTML=n.value,t.e.fire("afterSetElementValue",n)})}}},{key:"registerCommand",value:function(e,t,n){var r=e.toLowerCase(),o=this.commands.get(r);if(void 0===o&&(o=[],this.commands.set(r,o)),o.push(t),!(0,l.isFunction)(t)){var i=this.o.commandToHotkeys[r]||this.o.commandToHotkeys[e]||t.hotkeys;i&&this.registerHotkeyToCommand(i,r,null==n?void 0:n.stopPropagation)}return this}},{key:"registerHotkeyToCommand",value:function(e,t){var n=this,r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=(0,l.asArray)(e).map(l.normalizeKeyAliases).map(function(e){return e+".hotkey"}).join(" ");this.e.off(o).on(o,function(e,o){return o&&(o.shouldStop=null==r||r),n.execCommand(t)})}},{key:"execCommand",value:function(e,t,n){for(var r,i,a,s=arguments.length,u=Array(s>3?s-3:0),c=3;s>c;c++)u[c-3]=arguments[c];if(this.s.isFocused()||this.s.focus(),!this.o.readonly||this.o.allowCommandsInReadOnly.includes(e)){if(e=e.toLowerCase(),!1!==(i=(r=this.e).fire.apply(r,["beforeCommand".concat((0,l.ucfirst)(e)),t,n].concat(g(u))))&&(i=(a=this.e).fire.apply(a,["beforeCommand",e,t,n].concat(g(u)))),!1!==i&&(i=this.__execCustomCommands.apply(this,[e,t,n].concat(g(u)))),!1!==i){this.s.focus();try{i=this.nativeExecCommand(e,t,n)}catch(e){if(!o.IS_PROD)throw e}}return this.e.fire("afterCommand",e,t,n),this.__imdSynchronizeValues(),i}}},{key:"nativeExecCommand",value:function(e,t,n){this.__isSilentChange=!0;try{return this.ed.execCommand(e,t,n)}finally{this.__isSilentChange=!1}}},{key:"__execCustomCommands",value:function(e,t,n){for(var r,o=this,i=arguments.length,a=Array(i>3?i-3:0),s=3;i>s;s++)a[s-3]=arguments[s];e=e.toLowerCase();var u=this.commands.get(e);if(void 0!==u)return u.forEach(function(i){var s=(0,l.isFunction)(i)?i:i.exec,u=s.call.apply(s,[o,e,t,n].concat(g(a)));void 0!==u&&(r=u)}),r}},{key:"lock",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return!!h(m(Jodit.prototype),"lock",this).call(this,e)&&(this.__selectionLocked=this.s.save(),this.s.clear(),this.container.classList.add("jodit_lock"),this.e.fire("lock",!0),!0)}},{key:"unlock",value:function(){return!!h(m(Jodit.prototype),"unlock",this).call(this)&&(this.container.classList.remove("jodit_lock"),this.__selectionLocked&&this.s.restore(),this.e.fire("lock",!1),!0)}},{key:"getMode",value:function(){return this.mode}},{key:"isEditorMode",value:function(){return this.getRealMode()===o.MODE_WYSIWYG}},{key:"getRealMode",value:function(){if(this.getMode()!==o.MODE_SPLIT)return this.getMode();var e=this.od.activeElement;return e&&(e===this.iframe||f.Dom.isOrContains(this.editor,e)||f.Dom.isOrContains(this.toolbar.container,e))?o.MODE_WYSIWYG:o.MODE_SOURCE}},{key:"setMode",value:function(e){var t=this,n=this.getMode(),r={mode:parseInt(e.toString(),10)},i=["jodit-wysiwyg_mode","jodit-source__mode","jodit_split_mode"];!1!==this.e.fire("beforeSetMode",r)&&(this.__mode=[o.MODE_SOURCE,o.MODE_WYSIWYG,o.MODE_SPLIT].includes(r.mode)?r.mode:o.MODE_WYSIWYG,this.o.saveModeInStorage&&this.storage.set("jodit_default_mode",this.mode),i.forEach(function(e){t.container.classList.remove(e)}),this.container.classList.add(i[this.mode-1]),n!==this.getMode()&&this.e.fire("afterSetMode"))}},{key:"toggleMode",value:function(){var e=this.getMode();[o.MODE_SOURCE,o.MODE_WYSIWYG,this.o.useSplitMode?o.MODE_SPLIT:9].includes(e+1)?e+=1:e=o.MODE_WYSIWYG,this.setMode(e)}},{key:"setDisabled",value:function(e){this.o.disabled=e;var t=this.__wasReadOnly;this.setReadOnly(e||t),this.__wasReadOnly=t,this.editor&&(this.editor.setAttribute("aria-disabled",e.toString()),this.container.classList.toggle("jodit_disabled",e),this.e.fire("disabled",e))}},{key:"getDisabled",value:function(){return this.o.disabled}},{key:"setReadOnly",value:function(e){this.__wasReadOnly!==e&&(this.__wasReadOnly=e,this.o.readonly=e,e?this.editor&&this.editor.removeAttribute("contenteditable"):this.editor&&this.editor.setAttribute("contenteditable","true"),this.e&&this.e.fire("readonly",e))}},{key:"getReadOnly",value:function(){return this.o.readonly}},{key:"focus",value:function(){this.getMode()!==o.MODE_SOURCE&&this.s.focus()}},{key:"isFocused",get:function(){return this.s.isFocused()}},{key:"beforeInitHook",value:function(){}},{key:"afterInitHook",value:function(){}},{key:"initOptions",value:function(e){this.options=(0,l.ConfigProto)(e||{},c.Config.defaultOptions)}},{key:"initOwners",value:function(){this.editorWindow=this.o.ownerWindow,this.ownerWindow=this.o.ownerWindow}},{key:"addPlace",value:function(e,t){var n=this,r=(0,l.resolveElement)(e,this.o.shadowRoot||this.od);this.attachEvents(t),r.attributes&&(0,l.toArray)(r.attributes).forEach(function(e){var r=e.name,o=e.value;void 0===c.Config.defaultOptions[r]||t&&void 0!==t[r]||(-1!==["readonly","disabled"].indexOf(r)&&(o=""===o||"true"===o),/^[0-9]+(\.)?([0-9]+)?$/.test(o.toString())&&(o=Number(o)),n.options[r]=o)});var o=this.c.div("jodit-container");o.classList.add("jodit"),o.classList.add("jodit-container"),o.classList.add("jodit_theme_".concat(this.o.theme||"default")),j(this.o.className,o),this.o.containerStyle&&(0,l.css)(o,this.o.containerStyle);var i=this.o.styleValues;Object.keys(i).forEach(function(e){var t=(0,l.kebabCase)(e);o.style.setProperty("--jd-".concat(t),i[e])}),o.setAttribute("contenteditable","false");var a=null;this.o.inline&&(-1===["TEXTAREA","INPUT"].indexOf(r.nodeName)&&(o=r,r.setAttribute(_,r.className.toString()),a=o.innerHTML,o.innerHTML=""),o.classList.add("jodit_inline"),o.classList.add("jodit-container")),r!==o&&(r.style.display&&r.setAttribute(S,r.style.display),r.style.display="none");var s="workplace-slot",u=this.c.div(this.getFullElName(s,"top"),C);o.appendChild(u);var d=this.c.div(this.getFullElName(s,"center"),C),p=this.c.div("jodit-workplace",C),h=this.c.div(this.getFullElName(s,"left"),C),m=this.c.div(this.getFullElName(s,"right"),C);d.appendChild(h),d.appendChild(p),d.appendChild(m),o.appendChild(d);var v=this.c.div(this.getFullElName(s,"bottom"),C);o.appendChild(v),r.parentNode&&r!==o&&r.parentNode.insertBefore(o,r),Object.defineProperty(r,"component",{enumerable:!1,configurable:!0,value:this});var y=this.c.div("jodit-wysiwyg",{contenteditable:!0,"aria-disabled":!1,tabindex:this.o.tabIndex});p.appendChild(y);var g={editor:y,element:r,container:o,workplace:p,slots:{top:u,bottom:v,center:d,left:h,right:m},statusbar:new f.StatusBar(this,o),options:this.isReady?(0,l.ConfigProto)(t||{},c.Config.defaultOptions):this.options,history:new f.History(this),editorWindow:this.ow};this.__elementToPlace.set(y,g),this.setCurrentPlace(g),this.places.push(g),this.setNativeEditorValue(this.getElementValue());var b=this.__initEditor(a),w=this.options;return(0,l.callPromise)(b,function(){w.enableDragAndDropFileToEditor&&w.uploader&&(w.uploader.url||w.uploader.insertImageAsBase64URI)&&n.uploader.bind(n.editor),n.__elementToPlace.get(n.editor)||n.__elementToPlace.set(n.editor,g),n.e.fire("afterAddPlace",g)})}},{key:"addDisclaimer",value:function(e){this.workplace.appendChild(e)}},{key:"setCurrentPlace",value:function(e){this.currentPlace!==e&&(this.isEditorMode()||this.setMode(o.MODE_WYSIWYG),this.currentPlace=e,this.buildToolbar(),this.isReady&&this.e.fire("changePlace",e))}},{key:"__initEditor",value:function(e){var t=this,n=this.__createEditor();return(0,l.callPromise)(n,function(){if(!t.isInDestruct){if(t.element!==t.container){var n=t.getElementValue();n!==t.getEditorValue()&&t.setEditorValue(n)}else null!=e&&t.setEditorValue(e);var r=t.o.defaultMode;if(t.o.saveModeInStorage){var o=t.storage.get("jodit_default_mode");"string"==typeof o&&(r=parseInt(o,10))}t.setMode(r),t.o.readonly&&(t.__wasReadOnly=!1,t.setReadOnly(!0)),t.o.disabled&&t.setDisabled(!0);try{t.ed.execCommand("defaultParagraphSeparator",!1,t.o.enter.toLowerCase())}catch(e){}}})}},{key:"__createEditor",value:function(){var e=this,t=this.editor,n=this.e.fire("createEditor",this);return(0,l.callPromise)(n,function(){!e.isInDestruct&&((!1===n||(0,l.isPromise)(n))&&f.Dom.safeRemove(t),j(e.o.editorClassName,e.editor),e.o.style&&(0,l.css)(e.editor,e.o.style),e.e.on("synchro",function(){e.setEditorValue()}).on("focus",function(){e.editorIsActive=!0}).on("blur",function(){return e.editorIsActive=!1}),e.__prepareWYSIWYGEditor(),e.o.triggerChangeEvent&&e.e.on("change",e.async.debounce(function(){e.e&&e.e.fire(e.element,"change")},e.defaultTimeout)))})}},{key:"__prepareWYSIWYGEditor",value:function(){var e=this,t=this.editor;if(this.o.direction){var n="rtl"===this.o.direction.toLowerCase()?"rtl":"ltr";this.editor.style.direction=n,this.editor.setAttribute("dir",n),this.container.style.direction=n,this.container.setAttribute("dir",n),this.toolbar.setDirection(n)}this.e.on(t,"mousedown touchstart focus",function(){var n=e.__elementToPlace.get(t);n&&e.setCurrentPlace(n)}).on(t,"compositionend",this.synchronizeValues).on(t,"selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup click copy cut dragstart drop dragover paste resize touchstart touchend focus blur",function(t){if(!e.o.readonly&&!e.__isSilentChange){var n;if(((null!=(n=e.ew.KeyboardEvent)&&"u">typeof Symbol&&n[Symbol.hasInstance]?!n[Symbol.hasInstance](t):!(t instanceof n))||!t.isComposing)&&e.e&&e.e.fire){if(!1===e.e.fire(t.type,t))return!1;e.synchronizeValues()}}})}},{key:"fetch",value:function(e,t){var n=this,r=new s.Ajax(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({url:e},t),this.o.defaultAjaxOptions),o=function(){n.e.off("beforeDestruct",o),n.progressbar.progress(100).hide(),r.destruct()};this.e.one("beforeDestruct",o),this.progressbar.show().progress(30);var i=r.send();return i.finally(o).catch(function(){return null}),i}},{key:"destruct",value:function(){var e,t,n=this;if(!this.isInDestruct){this.setStatus(f.STATUSES.beforeDestruct),this.__elementToPlace.clear(),null==(e=(0,i.cached)(this,"storage"))||e.clear(),null==(t=(0,i.cached)(this,"buffer"))||t.clear(),this.commands.clear(),this.__selectionLocked=null,this.e.off(this.ow,"resize"),this.e.off(this.ow),this.e.off(this.od),this.e.off(this.od.body);var r=this.editor?this.getEditorValue():"";this.places.forEach(function(e){var t=e.container,o=e.workplace,i=e.statusbar,a=e.element,s=e.iframe,u=e.editor,c=e.history;if(a){if(a!==t)if(a.hasAttribute(S)){var d=(0,l.attr)(a,S);d&&(a.style.display=d,a.removeAttribute(S))}else a.style.display="";else a.hasAttribute(_)&&(a.className=(0,l.attr)(a,_)||"",a.removeAttribute(_));a.hasAttribute("style")&&!(0,l.attr)(a,"style")&&a.removeAttribute("style"),i.destruct(),n.e.off(t),n.e.off(a),n.e.off(u),f.Dom.safeRemove(o),f.Dom.safeRemove(u),t!==a&&f.Dom.safeRemove(t),Object.defineProperty(a,"component",{enumerable:!1,configurable:!0,value:null}),f.Dom.safeRemove(s),t===a&&(a.innerHTML=r),c.destruct()}}),this.places.length=0,this.currentPlace={},delete a.instances[this.id],h(m(Jodit.prototype),"destruct",this).call(this)}}}],n=[{key:"ready",get:function(){return new Promise(function(e){a.eventEmitter.on("joditready",e)})}},{key:"atom",value:function(e){return(0,l.markAsAtomic)(e)}},{key:"make",value:function(e,t){return new this(e,t)}},{key:"isJoditAssigned",value:function(e){return e&&(0,l.isJoditObject)(e.component)&&!e.component.isInDestruct}},{key:"defaultOptions",get:function(){return c.Config.defaultOptions}}],t&&p(Jodit.prototype,t),n&&p(Jodit,n),Jodit}(f.ViewWithToolbar);function j(e,t){e&&e.split(/\s+/).forEach(function(e){return t.classList.add(e)})}Jodit.fatMode=o.FAT_MODE,Jodit.plugins=a.pluginSystem,Jodit.modules=a.modules,Jodit.ns=a.modules,Jodit.decorators={},Jodit.constants=o,Jodit.instances=a.instances,Jodit.lang=o.lang,Jodit.core={Plugin:f.Plugin},k([i.cache],Jodit.prototype,"createInside",null),k([i.cache],Jodit.prototype,"message",null),k([i.cache],Jodit.prototype,"s",null),k([i.cache],Jodit.prototype,"uploader",null),k([i.cache],Jodit.prototype,"filebrowser",null),k([(0,i.throttle)()],Jodit.prototype,"synchronizeValues",null),k([(0,i.watch)(":internalChange")],Jodit.prototype,"updateElementValue",null),k([i.autobind],Jodit.prototype,"__prepareWYSIWYGEditor",null),Jodit=r=k([(0,i.derive)(u.Dlgs)],Jodit)},2525:function(e,t,n){n.d(t,{UIBlock:function(){return r.UIBlock},UICheckbox:function(){return i.UICheckbox},UIFileInput:function(){return i.UIFileInput},UIForm:function(){return o.UIForm},UIInput:function(){return i.UIInput},UISelect:function(){return i.UISelect},UITextArea:function(){return i.UITextArea}});var r=n(19070),o=n(86327),i=n(8959)},2536:function(e,t){t.default={"copy-format":"Copiar formato"}},2621:function(e,t,n){n.d(t,{IndexedDBProvider:function(){return c},canUseIndexedDB:function(){return p},clearUseIndexedDBCache:function(){return d}});var r=n(82758);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function i(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){n(e);return}l.done?t(s):Promise.resolve(s).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function l(e){i(a,r,o,l,s,"next",e)}function s(e){i(a,r,o,l,s,"throw",e)}l(void 0)})}}function l(e,t){return function(e){