UNPKG

jodit-pro

Version:

PRO Version of Jodit Editor

8 lines 1.81 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(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var r=n();for(var o in r)("object"==typeof exports?exports:t)[o]=r[o]}}(self,function(){var t={117:function(t,n,r){"use strict";r.d(n,{askInsertTypeDialog:function(){return f},getAllTypes:function(){return c},pasteInsertHtml:function(){return l}});var o=r(82758),i=r(2748),a=r(27613),s=r(10830);function u(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,o=Array(n);n>r;r++)o[r]=t[r];return o}function l(t,n,r){if(!n.isInDestruct){t&&"drop"===t.type&&n.s.insertCursorAtPoint(t.clientX,t.clientY);var o,s,u,l=n.e.fire("beforePasteInsert",r);!(0,a.isVoid)(l)&&((0,a.isString)(l)||(0,a.isNumber)(l)||i.Dom.isNode(l))&&(r=l),(0,a.isString)(r)&&(-1!==(s=(o=(o=r).replace(/<meta[^>]+?>/g,"")).search(/<!--StartFragment-->/i))&&(o=o.substring(s+20)),-1!==(u=o.search(/<!--EndFragment-->/i))&&(o=o.substring(0,u)),r=o),n.s.insertHTML(r)}}function c(t){var n=t.types,r="";if((0,a.isArray)(n)||"[object DOMStringList]"===({}).toString.call(n))for(var i=0;i<n.length;i+=1)r+=n[i]+";";else r=(n||o.TEXT_PLAIN).toString()+";";return r}function f(t,n,r,o,i){if(!1!==t.e.fire("beforeOpenPasteDialog",n,r,o,i)){var a=t.confirm('<div style="word-break: normal; white-space: normal">'.concat(t.i18n(n),"</div>"),t.i18n(r)),l=i.map(function(n){var r=n.text,i=n.value;return(0,s.Button)(t,{text:r,name:r.toLowerCase(),tabIndex:0}).onAction(function(){a.close(),o(i)})});a.e.one(a,"afterClose",function(){t.s.isFocused()||t.s.focus()});var c=(0,s.Button)(t,{text:"Cancel",tabIndex:0}).onAction(function(){a.close()});return a.setFooter(((function(t){if(Array.isArray(t))return u(t)})(l)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(l)||function(t){if(t){if("string"==typeof t)return u(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,void 0)}}(l)||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([c])),l[0].focus(),l[0].state.variant="primary",t.e.fire("afterOpenPasteDialog",a,n,r,o,i),a}}},159:function(t,n,r){"use strict";r.d(n,{FileBrowserItem:function(){return a}});var o=r(21537);function i(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var a=function(){var t,n;function r(t){var n=this;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");this.data=t,Object.keys(t).forEach(function(r){n[r]=t[r]})}return t=[{key:"path",get:function(){return(0,o.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")}},{key:"imageURL",get:function(){var t=this.time||new Date().getTime().toString(),n=this.data,r=n.thumbIsAbsolute,i=n.source,a=n.thumb,s=n.file,u=a||s;return r&&u?u:(0,o.normalizeUrl)(i.baseurl,i.path,u||"")+"?_tmst="+encodeURIComponent(t)}},{key:"fileURL",get:function(){var t=this.data.name,n=this.data,r=n.file,i=n.fileIsAbsolute,a=n.source;return void 0!==r&&(t=r),i&&t?t:(0,o.normalizeUrl)(a.baseurl,a.path,t||"")}},{key:"time",get:function(){var t=this.data.changed;return t&&("number"==typeof t?new Date(t).toLocaleString():t)||""}},{key:"uniqueHashKey",get:function(){var t=this.data;return[t.sourceName,t.name,t.file,this.time,t.thumb].join("_").toLowerCase().replace(/[^0-9a-z\-.]/g,"-")}},{key:"toJSON",value:function(){return this.data}}],n=[{key:"create",value:function(t){return(null!=r&&"u">typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](t):t instanceof r)?t:new r(t)}}],t&&i(r.prototype,t),n&&i(r,n),r}()},302:function(t,n,r){"use strict";r.d(n,{getKey:function(){return i}});var o=r(2748),i=function(t,n){return"".concat(o.Dom.isCell(n)?"padding":"margin").concat("rtl"===t?"Right":"Left")}},384:function(t,n,r){"use strict";r.d(n,{sanitizeAttributes:function(){return a}});var o=r(2748),i=r(21537);function a(t,n,r){return!!(o.Dom.isElement(n)&&(0,i.sanitizeHTMLElement)(n,{safeJavaScriptLink:t.options.cleanHTML.safeJavaScriptLink,removeOnError:t.options.cleanHTML.removeOnError}))||r}},445:function(t,n){"use strict";n.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> '},473:function(t,n,r){"use strict";r.d(n,{handleBackToList:function(){return p},handleConversationSearch:function(){return m},handleConversationSelect:function(){return h},handleToolApproval:function(){return f},handleToolDenial:function(){return d}});var o=r(77688),i=r(56075),a=r(11886),s=r(94899),u=r(62361),l=r(79078),c=r(82758);function f(t,n,r,s,l){return(0,o._)(function(){var o,c,f;return(0,u._)(this,function(u){switch(u.label){case 0:if(!(o=r.getPendingToolCalls().find(function(n){return n.id===t})))return[2,null];if(c=s.grantPermission(o.name,n),!(f=r.getCurrentConversation()))return[3,2];return f.permissions.push(c),[4,l.save(f)];case 1:u.sent(),u.label=2;case 2:return r.removePendingToolCall(t),[2,(0,a._)((0,i._)({},o),{status:"approved"})]}})})()}function d(t,n,r,c){return(0,o._)(function(){var o,f,d,h,p,m,g;return(0,u._)(this,function(u){switch(u.label){case 0:if(!(o=r.getPendingToolCalls().find(function(t){return t.id===n}))||!(f=r.getCurrentConversation())||-1===(d=f.messages.findIndex(function(t){var r;return null==(r=t.toolCalls)?void 0:r.find(function(t){return t.id===n})})))return[2];return h=f.messages[d],p=(0,a._)((0,i._)({},o),{result:{error:"Tool call denied by user."},status:"denied"}),m=(0,l.updateToolCallInMessage)(h,p),(g=(0,s._)(f.messages))[d]=m,f=(0,a._)((0,i._)({},f),{messages:g,updated:Date.now()}),r.setCurrentConversation(f),[4,c.save(f)];case 1:return u.sent(),t.e.fire("toolCallDenied.ai-assistant-pro",o),r.removePendingToolCall(n),[2]}})})()}function h(t,n,r){return(0,o._)(function(){var o;return(0,u._)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),r.setLoading(!0),[4,n.get(t)];case 1:if(!(o=a.sent()))throw Error("Conversation not found: "+t);return r.setCurrentConversation((0,i._)({},o)),[3,4];case 2:return a.sent(),c.IS_PROD,[3,4];case 3:return r.setLoading(!1),[7];case 4:return[2]}})})()}function p(t,n){return(0,o._)(function(){var r;return(0,u._)(this,function(o){switch(o.label){case 0:n.setView("conversationList"),o.label=1;case 1:return o.trys.push([1,,3,4]),n.setLoading(!0),[4,t.list().catch(function(){return[]})];case 2:return r=o.sent(),n.setConversations(r),[3,4];case 3:return n.setLoading(!1),[7];case 4:return[2]}})})()}function m(t,n,r){return(0,o._)(function(){var o;return(0,u._)(this,function(i){switch(i.label){case 0:r.setLoading(!0),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,n.list(t||void 0)];case 2:return o=i.sent(),r.setConversations(o),r.setView("conversationList"),[3,4];case 3:return r.setLoading(!1),[7];case 4:return[2]}})})()}},482:function(t,n,r){"use strict";var o=r(77688),i=r(80294),a=r(20616),s=r(67709),u=r(82749),l=r(18766),c=r(56075),f=r(94899),d=r(23078),h=r(31635),p=r(62361);r(55029),r(99413);var m=r(17298),g=r(61818),v=r(67912),y=r(92931),b=r(65805),_=r(4774),w=r(82758),k=r(65478),C=r(21537),E=r(50911),S=r(62843),F=r(78584),A=r(92762),D=r(2692);window.JoditGoogleReadyHandler=v.GoogleReadyHandler;var x=function(t){function n(){var t;return(0,a._)(this,n),t=(0,i._)(this,n,arguments),(0,u._)(t,"buttons",[{group:"media",name:"googleMaps"}]),(0,u._)(t,"dialog",null),t}return(0,l._)(n,t),(0,s._)(n,[{key:"className",value:function(){return"google-maps"}},{key:"afterInit",value:function(t){var n=this;t.registerCommand(m.COMMAND_OPEN_DIALOG,function(){n.openMapEditor(null,{})})}},{key:"beforeDestruct",value:function(t){}},{key:"onOpenOnDblClick",value:function(t){if(t.dataset.googleMaps){var n;try{n=JSON.parse(this.j.ow.atob(t.dataset.googleMaps))}catch(t){}return this.openMapEditor(t,n),!1}}},{key:"openMapEditor",value:function(t,n){return(0,o._)(function(){var r,o,i,a,s,u,l,d,h,g;return(0,p._)(this,function(p){return r=this,i=this.j,a=this.getDialog(),s=this.j.o.googleMaps.saveStateInStorage?a.storage.get(m.STORAGE_KEY):void 0,u=this.jodit.o.googleMaps.apiUrl,(0,v.isApiAvailable)()||(0,C.appendScriptAsync)(this.jodit,u.replace(/\${([^}]+)}/g,function(t,n){var o;return null!=(o=r.get(n))?o:""})),l=(0,c._)({type:this.j.o.googleMaps.map.type,layer:this.j.o.googleMaps.map.layer,size:this.j.o.googleMaps.map.size},s,n),(d=new _.UIMap(a,l,this.j.options)).container.classList.add(a.getFullElName("map")),(h=new b.UIComboBox(i,{icon:"search",placeholder:"Search",clearButton:!0}).setMod("in-header",!0)).container.classList.add(a.getFullElName("search")),this.j.async.promise(function(t){if((0,v.isApiAvailable)())return void t(0);var n=function(){(0,v.isApiAvailable)()?t(0):r.j.async.setTimeout(n,100)};n(),(0,v.googleReady)(t)}).then(function(){d.setStatus("ready"),h.setStatus("ready")}),this.j.e.on(h,"select",function(t,n){n?d.map.fitBounds(n):t&&(d.state.center=[t.lat(),t.lng()])}),s||("auto"===this.j.o.googleMaps.map.center?navigator.geolocation.getCurrentPosition(function(t){d.state.center=[t.coords.latitude,t.coords.longitude]},function(){d.state.center=r.j.o.googleMaps.map.defaultCenter}):d.state.center=this.j.o.googleMaps.map.center),(o=a).setSize.apply(o,(0,f._)(i.o.googleMaps.dialog.size)).setHeader([h,"&nbsp;",(0,S.Button)(i,"eye").onAction(function(){var t=r.jodit.createInside.element("img");t.src=(0,y.staticUrl)(d),t.dataset.googleMaps=btoa(d.json());var n={value:t.outerHTML};r.onAfterGetValueFromEditor(n),i.execCommand("preview",null,n.value)})]).setContent((0,A.TabsWidget)(i,[{name:"Map",icon:"map",content:d},{name:"Settings",content:new _.UIMapsPropsForm(i,d.state)},{name:"Controls",icon:"menu",content:new _.UIMapsControlsForm(i,d.state)}])).setFooter([(0,S.Button)(i,"cancel","Cancel","default").onAction(function(){return a.close()}),(0,S.Button)(i,"ok",t?"Save":"Insert","primary").onAction(function(){d.destruct(),h.destruct(),a.e.off("beforeClose",g),a.close(),r.insertMap(t,d)})]).open(),g=function(){if(d.state.elements.length&&JSON.stringify(d.state.elements)!==JSON.stringify(l.elements)&&!w.IS_TEST&&!confirm(r.i18n("Are you sure?")))return!1;d.destruct(),h.destruct(),a.e.off("beforeClose",g)},a.e.on("beforeClose",g),[2]})}).call(this)}},{key:"getDialog",value:function(){if(!this.dialog){var t=new F.Dialog({language:this.j.o.language});t.container.classList.add(this.getFullElName("")),this.dialog=t}return this.dialog}},{key:"insertMap",value:function(t,n){var r=null!=t?t:this.jodit.createInside.element("img");r.src=(0,y.staticUrl)(n),r.dataset.googleMaps=btoa(n.json()),t||this.jodit.s.insertImage(r)}},{key:"onBeforeSetNativeEditorValue",value:function(t){t.value=t.value.replace(RegExp("<script[^>]+jodit-google-maps-init[^>]+>.*?<\\/script>","gs"),"")}},{key:"onAfterGetValueFromEditor",value:function(t,n){var r=this;this.j.o.googleMaps.useStaticImage||n===w.SOURCE_CONSUMER||(t.value=t.value.replace(RegExp("(<img[^>]+)([\"']?)data-google-maps\\2\\s*=([\"'])([^\"']+)\\3([^>]*>)","gs"),function(t,n,o,i,a,s){var u={};try{u=JSON.parse(r.j.ow.atob(a))}catch(t){}return"".concat(n,' id="').concat(u.uid,'" ').concat(o,"data-google-maps").concat(o,"=").concat(i).concat(a).concat(i).concat(s).concat((0,g.generateJSScript)(r.j,u))}))}}]),n}((0,d._)(E.Plugin));(0,u._)(x,"requires",["license","color-picker"]),(0,h.__decorate)([(0,k.watch)("?:openOnDblClick")],x.prototype,"onOpenOnDblClick",null),(0,h.__decorate)([(0,k.watch)(":beforeSetNativeEditorValue")],x.prototype,"onBeforeSetNativeEditorValue",null),(0,h.__decorate)([(0,k.watch)(":afterGetValueFromEditor")],x.prototype,"onAfterGetValueFromEditor",null),D.JoditPro.plugins.add("google-maps",x)},575:function(t,n,r){"use strict";var o=r(82758),i=r(65478),a=r(2748),s=r(580),u=r(87612),l=r(20356),c=r(35399);function f(t,n,r){return(f=g()?Reflect.construct:function(t,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(t,o));return r&&h(i,r.prototype),i}).apply(null,arguments)}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,n){return(h=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function p(t){return t&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function m(t){var n="function"==typeof Map?new Map:void 0;return(m=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return f(t,arguments,d(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,t)})(t)}function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(g=function(){return!!t})()}var v=function(t){var n;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function r(){var t,n;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=d(t),function(t,n){if(n&&("object"===p(n)||"function"==typeof n))return n;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,g()?Reflect.construct(t,n||[],d(this).constructor):t.apply(this,n))}return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&h(r,t),n=[{key:"afterInit",value:function(t){var n=this,r=t.o.enter.toLowerCase(),i=r===o.BR.toLowerCase();t.o.enterBlock||(t.o.enterBlock=i?o.PARAGRAPH:r),t.registerCommand("enter",function(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.onEnter(o)})}},{key:"onEnterKeyDown",value:function(t){if(t.key===o.KEY_ENTER){var n=this.j,r=n.e.fire("beforeEnter",t);return void 0!==r?r:(n.s.isCollapsed()||n.execCommand("Delete"),n.s.focus(),this.onEnter(t),n.e.fire("afterEnter",t),n.synchronizeValues(),!1)}}},{key:"onEnter",value:function(t){var n=this.jodit,r=n.createInside.fake();try{a.Dom.safeInsertNode(n.s.range,r),(0,c.moveCursorOutFromSpecialTags)(n,r,["a"]);var o=(0,c.getBlockWrapper)(r,n),i=a.Dom.isLeaf(o);if((!i||(null==t?void 0:t.shiftKey))&&(0,c.checkBR)(r,n,null==t?void 0:t.shiftKey))return!1;if(o||(0,c.hasPreviousBlock)(r,n)||(o=(0,c.wrapText)(r,n)),!o)return(0,c.insertParagraph)(r,n,i?"li":n.o.enter),!1;if(!(0,c.checkUnsplittableBox)(r,n,o))return!1;if(i&&this.__isEmptyListLeaf(o))return(0,c.processEmptyLILeaf)(r,n,o),!1;(0,c.splitFragment)(r,n,o)}finally{r.isConnected&&n.s.setCursorBefore(r),a.Dom.safeRemove(r)}}},{key:"__isEmptyListLeaf",value:function(t){var n=this.j.e.fire("enterIsEmptyListLeaf",t);return(0,u.isBoolean)(n)?n:a.Dom.isEmpty(t)}},{key:"beforeDestruct",value:function(t){t.e.off("keydown.enter")}}],function(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}(r.prototype,n),r}(m(l.Plugin));!function(t,n,r,o){var i,a=arguments.length,s=a<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,r):o;if(("u"<typeof Reflect?"undefined":p(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,r,o);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(a<3?i(s):a>3?i(n,r,s):i(n,r))||s);a>3&&s&&Object.defineProperty(n,r,s)}([(0,i.watch)(":keydown.enter")],v.prototype,"onEnterKeyDown",null),s.pluginSystem.add("enter",v)},580:function(t,n,r){"use strict";r.d(n,{eventEmitter:function(){return E},extendLang:function(){return _},getContainer:function(){return k},getPopupViewRoot:function(){return C},instances:function(){return p},modules:function(){return b},pluginSystem:function(){return y},uniqueUid:function(){return v}});var o=r(19306),i=r(70799),a=r(39955),s=r(12475),u=r(41180),l=r(80568),c=r(41876),f=r(57012),d=r(82758),h=r(22732),p={},m=1,g=new Set;function v(){function t(){return Math.round(m+=10*(Math.random()+1)).toString(16)}for(var n=t();g.has(n);)n=t();return g.add(n),n}var y=new c.PluginSystem({getContainer:k}),b={},_=function(t){Object.keys(t).forEach(function(n){d.lang[n]?Object.assign(d.lang[n],t[n]):d.lang[n]=t[n]})},w=new WeakMap;function k(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"div",u=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c=(0,i.isString)(n)?n:n?(0,l.getClassName)(n.prototype):"jodit-utils",f=w.get(t)||{},d=c+r,p=(0,a.isViewObject)(t)?t:t.j,m=null;if(!f[d]){var g=p.c;if(m=C(p.o,p.container,t.od.body),u&&(0,o.isJoditObject)(t)&&t.od!==t.ed){g=t.createInside;var v="style"===r?t.ed.head:t.ed.body;m=(0,o.isJoditObject)(t)&&t.o.shadowRoot?t.o.shadowRoot:v}var y=g.element(r,{className:"jodit jodit-".concat((0,s.kebabCase)(c),"-container jodit-box")});y.classList.add("jodit_theme_".concat(p.o.theme||"default")),m.appendChild(y),f[d]=y,t.hookStatus("beforeDestruct",function(){p.events.off(y),h.Dom.safeRemove(y),delete f[d],Object.keys(f).length&&w.delete(t)}),w.set(t,f),p.events.fire("getContainer",y)}return f[d].classList.remove("jodit_theme_default","jodit_theme_dark"),f[d].classList.add("jodit_theme_".concat(p.o.theme||"default")),f[d]}function C(t,n,r){var o,i,a;return null!=(a=null!=(i=null!=(o=t.popupRoot)?o:t.shadowRoot)?i:h.Dom.closest(n,function(t){return h.Dom.isHTMLElement(t)&&(h.Dom.isTag(t,"dialog")||["fixed","absolute"].includes((0,u.css)(t,"position")))},r))?a:r}var E=f.eventEmitter},638:function(t,n,r){"use strict";r.d(n,{Alert:function(){return o.Alert},Confirm:function(){return i.Confirm},Dialog:function(){return a.Dialog},Prompt:function(){return s.Prompt}});var o=r(71568),i=r(26866),a=r(78584),s=r(36806)},757:function(t,n,r){"use strict";var o=r(6441);o.Config.prototype.mediaFakeTag="jodit-media",o.Config.prototype.mediaInFakeBlock=!0,o.Config.prototype.mediaBlocks=["video","audio"]},767:function(t,n,r){"use strict";var o=r(82758),i=r(65478),a=r(580),s=r(50911);r(66288);var u=r(47686);function l(t,n,r){return(l=p()?Reflect.construct:function(t,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(t,o));return r&&f(i,r.prototype),i}).apply(null,arguments)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,n){return(f=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function d(t){return t&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function h(t){var n="function"==typeof Map?new Map:void 0;return(h=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return l(t,arguments,c(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,t)})(t)}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}var m=function(t,n,r,o){var i,a=arguments.length,s=a<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,r):o;if(("u"<typeof Reflect?"undefined":d(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,r,o);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(a<3?i(s):a>3?i(n,r,s):i(n,r))||s);return a>3&&s&&Object.defineProperty(n,r,s),s},g=function(t){var n;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function r(){var t,n;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=c(t),function(t,n){if(n&&("object"===d(n)||"function"==typeof n))return n;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,p()?Reflect.construct(t,n||[],c(this).constructor):t.apply(this,n))}return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&f(r,t),n=[{key:"afterInit",value:function(t){}},{key:"__onTab",value:function(t){if(t.key===o.KEY_TAB&&this.__onShift(t.shiftKey))return!1}},{key:"__onCommand",value:function(t){if(("indent"===t||"outdent"===t)&&this.__onShift("outdent"===t))return!1}},{key:"__onShift",value:function(t){var n=(0,u.onTabInsideLi)(this.j,t);return n&&this.j.e.fire("afterTab",t),n}},{key:"beforeDestruct",value:function(t){}}],function(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}(r.prototype,n),r}(h(s.Plugin));m([(0,i.watch)(":keydown.tab")],g.prototype,"__onTab",null),m([(0,i.watch)(":beforeCommand.tab")],g.prototype,"__onCommand",null),a.pluginSystem.add("tab",g)},820:function(t,n){"use strict";n.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> '},1050:function(t,n,r){"use strict";var o=r(80294),i=r(20616),a=r(67709),s=r(82749),u=r(18766),l=r(23078),c=r(31635);r(88092);var f=r(29744),d=r(65478),h=r(22732),p=r(21537),m=r(50911),g=r(62843),v=r(41409),y=r(2692),b=function(t){function n(){var t;return(0,i._)(this,n),t=(0,o._)(this,n,arguments),(0,s._)(t,"buttons",[{group:"form",name:"iframeEditor"}]),(0,s._)(t,"__dialog",void 0),t}return(0,u._)(n,t),(0,a._)(n,[{key:"afterInit",value:function(t){t.e.on("toggleIframeEditor",this.toggleEditor)}},{key:"toggleEditor",value:function(t){var n,r,o,i,a,s=this;this.__dialog||(this.__dialog=new v.Dialog({language:this.j.o.language,theme:this.j.o.theme}),this.__dialog.setHeader("Iframe Properties").setSize(470,400)),t&&!h.Dom.isTag(t,"iframe")&&(t=void 0);var u=new f.UIIframeEditor(this.__dialog,{src:null!=(n=null==t?void 0:t.src)?n:"",name:null!=(r=null==t?void 0:t.name)?r:"",title:null!=(o=null==t?void 0:t.title)?o:"",frameBorder:(null==t?void 0:t.frameBorder)==="1"||(null==t?void 0:t.frameBorder)==="yes",width:null!=(i=null==t?void 0:t.offsetWidth)?i:700,height:null!=(a=null==t?void 0:t.offsetHeight)?a:400});this.__dialog.setContent(u);var l=this.__dialog;l.isOpened?l.close():(l.setFooter([(0,g.Button)(l,"cancel","Cancel","default").onAction(function(){return l.close()}),(0,g.Button)(l,"ok",t?"Update":"Insert","primary").onAction(function(){if(!u.srcField.value){u.srcField.validate(),u.srcField.focus();return}t||(t=s.j.createInside.element("iframe"),s.j.s.insertNode(t,!0,!1)),t.className=u.state.className||"",(0,p.attr)(t,{src:u.state.src,title:u.state.title,name:u.state.name,frameborder:u.state.frameBorder?"1":"0",width:u.state.width,height:u.state.height}),h.Dom.isTag(t.parentElement,"jodit")&&(0,p.css)(t.parentElement,{width:u.state.width,height:u.state.height}),s.jodit.e.fire("synchro"),l.close()})]).open(),this.jodit.async.requestIdleCallback(function(){u.srcField.focus()}))}},{key:"onDblClick",value:function(t){h.Dom.isTag(t.target,"iframe")&&this.toggleEditor(t.target)}},{key:"beforeDestruct",value:function(t){var n;null==(n=this.__dialog)||n.destruct()}}]),n}((0,l._)(m.Plugin));(0,s._)(b,"requires",["license","color-picker"]),(0,c.__decorate)([d.autobind],b.prototype,"toggleEditor",null),(0,c.__decorate)([(0,d.watch)(":dblclick")],b.prototype,"onDblClick",null),y.JoditPro.plugins.add("iframe-editor",b)},1115:function(t,n,r){"use strict";r.r(n),n.default={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"\xc4\xe4ni","Interim Results":"V\xe4litulokset"}},1172:function(t,n){"use strict";n.default={"copy-format":"复制格式"}},1255:function(t,n,r){"use strict";var o,i,a=r(65478),s=r(22732),u=r(580),l=r(21537),c=r(50911);function f(t,n,r){return(f=g()?Reflect.construct:function(t,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(t,o));return r&&h(i,r.prototype),i}).apply(null,arguments)}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,n){return(h=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function p(t){return t&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function m(t){var n="function"==typeof Map?new Map:void 0;return(m=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return f(t,arguments,d(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,t)})(t)}function g(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(g=function(){return!!t})()}r(44586);var v=function(t,n,r,o){var i,a=arguments.length,s=a<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,r):o;if(("u"<typeof Reflect?"undefined":p(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,r,o);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(a<3?i(s):a>3?i(n,r,s):i(n,r))||s);return a>3&&s&&Object.defineProperty(n,r,s),s};(o=i||(i={}))[o.IDLE=0]="IDLE",o[o.WAIT_DRAGGING=1]="WAIT_DRAGGING",o[o.DRAGGING=2]="DRAGGING";var y=function(t){var n;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function r(){var t,n,o;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return n=r,o=arguments,n=d(n),(t=function(t,n){if(n&&("object"===p(n)||"function"==typeof n))return n;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,g()?Reflect.construct(n,o||[],d(this).constructor):n.apply(this,o))).dragList=[],t.draggable=null,t.isCopyMode=!1,t.diffStep=10,t.startX=0,t.startY=0,t.state=i.IDLE,t}return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&h(r,t),n=[{key:"afterInit",value:function(){this.dragList=this.j.o.draggableTags?(0,l.splitArray)(this.j.o.draggableTags).filter(Boolean).map(function(t){return t.toLowerCase()}):[],this.dragList.length&&this.j.e.on("mousedown dragstart",this.onDragStart)}},{key:"onDragStart",value:function(t){var n=this;if("dragstart"===t.type&&this.draggable)return!1;if(!(this.state>i.IDLE)){var r=t.target;if(this.dragList.length&&r){var o=function(t){return!!(t&&n.dragList.includes(t.nodeName.toLowerCase()))},a=s.Dom.furthest(r,o,this.j.editor)||(o(r)?r:null);a&&(s.Dom.isTag(a.parentElement,"a")&&a.parentElement.firstChild===a&&a.parentElement.lastChild===a&&(a=a.parentElement),this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,l.ctrlKey)(t),this.draggable=a.cloneNode(!0),(0,l.dataBind)(this.draggable,"target",a),this.state=i.WAIT_DRAGGING,this.addDragListeners())}}}},{key:"onDrag",value:function(t){if(this.draggable&&this.state!==i.IDLE){var n,o,a=t.clientX,s=t.clientY;if(!(this.state===i.WAIT_DRAGGING&&Math.sqrt(Math.pow(a-this.startX,2)+Math.pow(s-this.startY,2))<this.diffStep)){if(this.state===i.WAIT_DRAGGING&&(this.j.lock("drag-and-drop-element"),this.state=i.DRAGGING),this.j.e.fire("hidePopup hideResizer"),!this.draggable.parentNode){var c=(0,l.dataBind)(this.draggable,"target");(0,l.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:t.clientX,top:t.clientY,width:null!=(n=null==c?void 0:c.offsetWidth)?n:100,height:null!=(o=null==c?void 0:c.offsetHeight)?o:100}),(0,u.getContainer)(this.j,r).appendChild(this.draggable)}(0,l.css)(this.draggable,{left:t.clientX,top:t.clientY}),this.j.s.insertCursorAtPoint(t.clientX,t.clientY)}}}},{key:"onDragEnd",value:function(){!this.isInDestruct&&(this.removeDragListeners(),this.j.unlock(),this.state=i.IDLE,this.draggable&&(s.Dom.safeRemove(this.draggable),this.draggable=null))}},{key:"onDrop",value:function(){if(!this.draggable||this.state<i.DRAGGING)return void this.onDragEnd();var t=(0,l.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(t=t.cloneNode(!0));var n=t.parentElement;this.j.s.insertNode(t,!0,!1),n&&s.Dom.isEmpty(n)&&!s.Dom.isCell(n)&&s.Dom.safeRemove(n),s.Dom.isTag(t,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",t),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(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}(r.prototype,n),r}(m(c.Plugin));v([a.autobind],y.prototype,"onDragStart",null),v([(0,a.throttle)(function(t){return t.defaultTimeout/10})],y.prototype,"onDrag",null),v([a.autobind],y.prototype,"onDragEnd",null),v([a.autobind],y.prototype,"onDrop",null),u.pluginSystem.add("dragAndDropElement",y)},1322:function(t,n,r){"use strict";r.r(n),n.default={Spellcheck:"Stavekontroll"}},1475:function(t,n,r){"use strict";r.d(n,{initOrUpdateElementFromState:function(){return c}});var o=r(53454),i=r(11079),a=r(72690),s=r(580),u=r(12153),l=r(67912);function c(t,n){var r,c,f=this,d=this.mapElements[n];if(d){if(d.state.type===t.type)return a.updateStateAndGme.call(this,t,n);d.gme.setMap(null)}switch(t.type){case"text":r=new google.maps.Marker({position:new google.maps.LatLng(t.coordinates[0],t.coordinates[1]),draggable:!0,title:t.text,map:this.map});break;case"marker":r=new google.maps.Marker({position:new google.maps.LatLng(t.coordinates[0],t.coordinates[1]),draggable:!0,label:t.showCaption?t.title:"",title:t.title,icon:t.icon?u.Icon.get(t.icon):void 0,map:this.map});break;case"polyline":case"polygon":var h=(0,l.arrayToPath)(t.coordinates);r=new google.maps["polygon"===t.type?"Polygon":"Polyline"]({path:h,strokeColor:t.strokeColor,fillColor:t.fillColor,strokeWeight:t.strokeWeight,editable:!0,draggable:!0,map:this.map,fillOpacity:"polygon"===t.type?t.fillOpacity:1});break;case"circle":r=new google.maps.Circle({center:new google.maps.LatLng(t.coordinates[0],t.coordinates[1]),radius:t.radius,strokeColor:t.strokeColor,fillColor:t.fillColor,strokeWeight:t.strokeWeight,editable:!0,draggable:!0,map:this.map,fillOpacity:null!=(c=t.fillOpacity)?c:1})}var p={type:t.type,uid:(0,s.uniqueUid)(),state:t,gme:r};"dragend radius_changed center_changed".split(" ").forEach(function(t){return r.addListener(t,function(){return o.onChangeGeometries.call(f,p,n)})}),("polygon"===p.type||"polyline"===p.type)&&"insert_at set_at remove_at".split(" ").forEach(function(t){return p.gme.getPath().addListener(t,function(){return o.onChangeGeometries.call(f,p,n)})}),r.addListener("click",function(){return i.openPropsDialog.call(f,p,n)}),this.mapElements[n]=p}},1580:function(t,n,r){"use strict";r.d(n,{processImage:function(){return i}});var o=r(21537),i=function(t,n){if(n.rtf&&"#comment"===t.name&&t.attributes.nodeValue&&-1!==t.attributes.nodeValue.indexOf("<v:shape")){n.shapes||(n.shapes={});var r=n.jodit.create.fromHTML(t.attributes.nodeValue);return(0,o.toArray)(r.getElementsByTagName("v:shape")).forEach(function(t){n.shapes[t.id]=t.getAttribute("o:spid")}),t}if("img"!==t.name)return t;if(n.rtf&&t.attributes["v:shapes"]){var i=null==(s=n.shapes)?void 0:s[t.attributes["v:shapes"]];if(i){var s,u,l=null!=(u=n.imageMap)?u:{};n.imageMap||(n.imageMap=l,a(n.rtf,"i","\\shppict",n.imageMap),a(n.rtf,"s","\\shp{",n.imageMap));var c=l[i.substring(7)];if(c){var f=[],d=c.hex.match(/[0-9a-f]{2}/gi);if(d){for(var h=0;h<d.length;h++){var p=parseInt(d[h],16);f.push(String.fromCharCode(p))}t.attributes.src="data:"+c.type+";base64,"+btoa(f.join(""))}}}}return t};function a(t,n,r,o){var i=t.split(r),a=!0,s=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=l.value.split("shplid");if(1<f.length){for(var d=f[1],h="",p=0;p<d.length&&!/[{ \r\n\\]/.test(d[p]);p++)h+=d[p];var m=d.split("bliptag");if(m&&m.length<2)continue;var g=null;if(m[0].indexOf("pngblip")?g="image/png":-1!==m[0].indexOf("jpegblip")&&(g="image/jpeg"),!g)continue;var v=m[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()}o[n+h]={hex:y.join(""),type:g}}}}catch(t){s=!0,u=t}finally{try{a||null==c.return||c.return()}finally{if(s)throw u}}}},1808:function(t,n,r){"use strict";r.d(n,{UIMessages:function(){return d}});var o=r(87325),i=r(41180),a=r(62405),s=r(68389);function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,n){return(l=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function c(t){return t&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}var d=function(t){var n;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function r(t,n){var o,i,a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{defaultTimeout:3e3,defaultOffset:5};if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return o=r,i=[t],o=u(o),(a=function(t,n){if(n&&("object"===c(n)||"function"==typeof n))return n;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(this,f()?Reflect.construct(o,i||[],u(this).constructor):o.apply(this,i))).__box=n,a.options=s,a.__messages=new Set,a}return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&l(r,t),n=[{key:"className",value:function(){return"UIMessages"}},{key:"info",value:function(t,n){this.__message(t,"info",n)}},{key:"success",value:function(t,n){this.__message(t,"success",n)}},{key:"error",value:function(t,n){this.__message(t,"error",n)}},{key:"message",value:function(t,n,r){this.__message(t,n,r)}},{key:"__message",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",r=arguments.length>2?arguments[2]:void 0,o=t+":"+n;if(this.__messages.has(o))return void this.async.updateTimeout(o,r||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+o);this.__box.appendChild(this.container);var i=new s.UIMessage(this.j,{text:t,variant:n});this.append(i),this.__calcOffsets(),this.__messages.add(o);var a=this.__getRemoveCallback(i,o);this.j.e.on(i.container,"pointerdown",a),this.async.setTimeout(a,{label:o,timeout:r||this.options.defaultTimeout})}},{key:"__getRemoveCallback",value:function(t,n){var r=this,o=function(i){i&&i.preventDefault(),t.isInDestruct||(r.async.clearTimeout(n),r.j.e.off(t.container,"pointerdown",o),r.__messages.delete(n),t.setMod("active",!1),r.async.setTimeout(function(){r.remove(t),t.destruct(),r.__calcOffsets()},300))};return o}},{key:"__calcOffsets",value:function(){var t=this,n=5;this.elements.forEach(function(r){(0,i.css)(r.container,"bottom",n+"px"),n+=r.container.offsetHeight+t.options.defaultOffset})}}],function(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}(r.prototype,n),r}(a.UIGroup);d=function(t,n,r,o){var i,a=arguments.length,s=a<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,r):o;if(("u"<typeof Reflect?"undefined":c(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,r,o);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(a<3?i(s):a>3?i(n,r,s):i(n,r))||s);return a>3&&s&&Object.defineProperty(n,r,s),s}([o.component],d)},1830:function(t,n){"use strict";n.default={"Type something":"Start writing...",pencil:"Edit",Quadrate:"Square"}},1879:function(t,n,r){"use strict";r.r(n),n.default={Spellcheck:"Spellingcontrole"}},2020:function(t,n,r){"use strict";var o=r(56075),i=r(11886),a=r(96675),s=r(3091);n.default=(0,i._)((0,o._)({},a),{execute:s.execute})},2169:function(t,n,r){"use strict";var o=r(580),i=r(19306),a=r(41180);r(99823);var s=new Set;o.pluginSystem.add("fullsize",function(t){t.registerButton({name:"fullsize"});var n=!1,r=0,o=0,u=!1,l=function(){var i=t.container;t.events&&(n?(r=(0,a.css)(i,"height",!0),o=(0,a.css)(i,"width",!0),(0,a.css)(i,{height:t.ow.innerHeight,width:t.ow.innerWidth}),u=!0):u&&(0,a.css)(i,{height:r||"auto",width:o||"auto"}))},c=function(r){var o,u=t.container,c=t.events;if(u){if(void 0===r&&(r=!u.classList.contains("jodit_fullsize")),t.setMod("fullsize",r),t.o.fullsize=r,n=r,u.classList.toggle("jodit_fullsize",r),t.toolbar&&((0,i.isJoditObject)(t)&&(null==(o=t.toolbarContainer)||o.appendChild(t.toolbar.container)),(0,a.css)(t.toolbar.container,"width","auto")),r?s.add(u):s.delete(u),t.o.globalFullSize&&(1===s.size&&r||0===s.size&&!r)){for(var f=u.parentNode;f&&f.nodeType!==Node.DOCUMENT_NODE&&f.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)f.classList.toggle("jodit_fullsize-box_true",r),f=f.parentNode;l()}c.fire("afterResize")}};t.o.globalFullSize&&t.e.on(t.ow,"resize",l),t.e.on("afterInit afterOpen",function(){var n;t.toggleFullSize(null==(n=null==t?void 0:t.options)?void 0:n.fullsize)}).on("toggleFullSize",c).on("beforeDestruct",function(){n&&c(!1)}).on("beforeDestruct",function(){t.events&&t.e.off(t.ow,"resize",l)})})},2303:function(t,n,r){"use strict";r.d(n,{Jodit:function(){return Jodit}});var o,i=r(82758),a=r(65478),s=r(580),u=r(21537),l=r(41601),c=r(70231),f=r(6441),d=r(41409);function h(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,o=Array(n);n>r;r++)o[r]=t[r];return o}function p(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function m(t,n,r){return(m="u">typeof Reflect&&Reflect.get?Reflect.get:function(t,n,r){var o=function(t,n){for(;!Object.prototype.hasOwnProperty.call(t,n)&&null!==(t=g(t)););return t}(t,n);if(o){var i=Object.getOwnPropertyDescriptor(o,n);return i.get?i.get.call(r||t):i.value}})(t,n,r||t)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,n){if(n&&("object"===_(n)||"function"==typeof n))return n;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t,n){return(y=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function b(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t){if(t){if("string"==typeof t)return h(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(t,void 0)}}(t)||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 _(t){return t&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(w=function(){return!!t})()}var k=function(t,n,r,o){var i,a=arguments.length,s=a<3?n:null===o?o=Object.getOwnPropertyDescriptor(n,r):o;if(("u"<typeof Reflect?"undefined":_(Reflect))==="object"&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,n,r,o);else for(var u=t.length-1;u>=0;u--)(i=t[u])&&(s=(a<3?i(s):a>3?i(n,r,s):i(n,r))||s);return a>3&&s&&Object.defineProperty(n,r,s),s},C="data-jodit-default-style-display",E="data-jodit-default-classes",S={contenteditable:!1},Jodit=o=function(t){var n,r;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function Jodit(t,n){if(!(this instanceof Jodit))throw TypeError("Cannot call a class as a function");r=Jodit,a=[n,!0],r=g(r),(l=v(this,w()?Reflect.construct(r,a||[],g(this).constructor):r.apply(this,a))).isJodit=!0,l.commands=new Map,l.__selectionLocked=null,l.__wasReadOnly=!1,l.editorIsActive=!1,l.__mode=i.MODE_WYSIWYG,l.__callChangeCount=0,l.__isSilentChange=!1,l.currentPlace={options:l.__options,container:l.__container},l.places=[],l.__elementToPlace=new Map;try{var r,a,l,c=(0,u.resolveElement)(t,l.options.shadowRoot||l.od);if(o.isJoditAssigned(c))return v(l,c.component)}catch(t){if(!i.IS_PROD)throw t;throw l.destruct(),t}l.setStatus(d.STATUSES.beforeInit),l.id=(0,u.attr)((0,u.resolveElement)(t,l.o.shadowRoot||l.od),"id")||new Date().getTime().toString(),s.instances[l.id]=l,l.attachEvents(n),l.e.on(l.ow,"resize",function(){l.e&&l.e.fire("resize")}),l.e.on("prepareWYSIWYGEditor",l.__prepareWYSIWYGEditor),l.selection=new d.Selection(l);var f=l.beforeInitHook();return(0,u.callPromise)(f,function(){if(!l.isInDestruct){l.e.fire("beforeInit",l),s.pluginSystem.__init(l),l.e.fire("afterPluginSystemInit",l),l.e.on("changePlace",function(){l.setReadOnly(l.o.readonly),l.setDisabled(l.o.disabled)}),l.places.length=0;var r=l.addPlace(t,n);s.instances[l.id]=l,(0,u.callPromise)(r,function(){l.isInDestruct||(l.e&&l.e.fire("afterInit",l),(0,u.callPromise)(l.afterInitHook()),l.setStatus(d.STATUSES.ready),l.e.fire("afterConstructor",l))})}}),l}return Jodit.prototype=Object.create(t&&t.prototype,{constructor:{value:Jodit,writable:!0,configurable:!0}}),t&&y(Jodit,t),n=[{key:"className",value:function(){return"Jodit"}},{key:"waitForReady",value:function(){var t=this;return this.isReady?Promise.resolve(this):this.async.promise(function(n){t.hookStatus("ready",function(){return n(t)})})}},{key:"text",get:function(){if(this.editor)return this.editor.innerText||"";var t=this.createInside.div();return t.innerHTML=this.getElementValue(),t.innerText||""}},{key:"defaultTimeout",get:function(){return(0,u.isNumber)(this.o.defaultTimeout)?this.o.defaultTimeout:f.Config.defaultOptions.defaultTimeout}},{key:"createInside",get:function(){var t=this;return new d.Create(function(){return t.ed},this.o.createAttributes)}},{key:"__setPlaceField",value:function(t,n){this.currentPlace||(this.currentPlace={},this.places=[this.currentPlace]),this.currentPlace[t]=n}},{key:"element",get:function(){return this.currentPlace.element}},{key:"editor",get:function(){return this.currentPlace.editor},set:function(t){this.__setPlaceField("editor",t)}},{key:"container",get:function(){return this.currentPlace.container},set:function(t){this.__setPlaceField("container",t)}},{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(t){this.__setPlaceField("iframe",t)}},{key:"history",get:function(){return this.currentPlace.history}},{key:"editorWindow",get:function(){return this.currentPlace.editorWindow},set:function(t){this.__setPlaceField("editorWindow",t)}},{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(t){this.__options=t,this.__setPlaceField("options",t)}},{key:"s",get:function(){return this.selection}},{key:"uploader",get:function(){return this.getInstance("Uploader",this.o.uploader)}},{key:"filebrowser",get:function(){var t=this,n=(0,u.ConfigProto)({defaultTimeout:t.defaultTimeout,uploader:t.o.uploader,language:t.o.language,license:t.o.license,theme:t.o.theme,shadowRoot:t.o.shadowRoot,defaultCallback:function(n){n.files&&n.files.length&&n.files.forEach(function(r,o){var i=n.baseurl+r;n.isImages&&n.isImages[o]?t.s.insertImage(i,null,t.o.imageDefaultWidth):t.s.insertNode(t.createInside.fromHTML("<a href='".concat(i,"' title='").concat(i,"'>").concat(i,"</a>")))})}},this.o.filebrowser);return t.getInstance("FileBrowser",n)}},{key:"mode",get:function(){return this.__mode},set:function(t){this.setMode(t)}},{key:"getNativeEditorValue",value:function(){var t=this.e.fire("beforeGetNativeEditorValue");return(0,u.isString)(t)?t:this.editor?this.editor.innerHTML:this.getElementValue()}},{key:"setNativeEditorValue",value:function(t){var n={value:t};!this.e.fire("beforeSetNativeEditorValue",n)&&this.editor&&(this.editor.innerHTML=n.value)}},{key:"value",get:function(){return this.getEditorValue()},set:function(t){this.setEditorValue(t),this.history.__processChanges()}},{key:"synchronizeValues",value:function(){this.__imdSynchronizeValues()}},{key:"__imdSynchronizeValues",value:function(){this.setEditorValue()}},{key:"getEditorValue",value:function(){var t,n=!(arguments.length>0)||void 0===arguments[0]||arguments[0],r=arguments.length>1?arguments[1]:void 0;if(void 0!==(t=this.e.fire("beforeGetValueFromEditor",r)))return t;t=this.getNativeEditorValue().replace(i.INVISIBLE_SPACE_REG_EXP(),""),n&&(t=t.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g,"")),"<br>"===t&&(t="");var o={value:t};return this.e.fire("afterGetValueFromEditor",o,r),o.value}},{key:"setEditorValue",value:function(t){var n=this.e.fire("beforeSetValueToEditor",t);if(!1!==n){if((0,u.isString)(n)&&(t=n),!this.editor){void 0!==t&&this.__setElementValue(t);return}if(!(0,u.isString)(t)&&!(0,u.isVoid)(t))throw(0,u.error)("value must be string");(0,u.isVoid)(t)||this.getNativeEditorValue()===t||this.setNativeEditorValue(t),this.e.fire("postProcessSetEditorValue");var r=this.getElementValue(),o=this.getEditorValue();if(!this.__isSilentChange&&r!==o&&this.__callChangeCount<i.SAFE_COUNT_CHANGE_CALL){this.__setElementValue(o),this.__callChangeCount+=1,i.IS_PROD||this.__callChangeCount;try{this.history.__upTick(),this.e.fire("change",o,r),this.e.fire(this.history,"change",o,r)}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(t){var n=this;if(!(0,u.isString)(t))throw(0,u.error)("value must be string");if(this.element!==this.container&&t!==this.getElementValue()){var r={value:t},o=this.e.fire("beforeSetElementValue",r);(0,u.callPromise)(o,function(){void 0!==n.element.value?n.element.value=r.value:n.element.innerHTML=r.value,n.e.fire("afterSetElementValue",r)})}}},{key:"registerCommand",value:function(t,n,r){var o=t.toLowerCase(),i=this.commands.get(o);if(void 0===i&&(i=[],this.commands.set(o,i)),i.push(n),!(0,u.isFunction)(n)){var a=this.o.commandToHotkeys[o]||this.o.commandToHotkeys[t]||n.hotkeys;a&&this.registerHotkeyToCommand(a,o,null==r?void 0:r.stopPropagation)}return this}},{key:"registerHotkeyToCommand",value:function(t,n){var r=this,o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=(0,u.asArray)(t).map(u.normalizeKeyAliases).map(function(t){return t+".hotkey"}).join(" ");this.e.off(i).on(i,function(t,i){return i&&(i.shouldStop=null==o||o),r.execCommand(n)})}},{key:"execCommand",value:function(t,n,r){for(var o,a,s,l=arguments.length,c=Array(l>3?l-3:0),f=3;l>f;f++)c[f-3]=arguments[f];if(this.s.isFocused()||this.s.focus(),!this.o.readonly||this.o.allowCommandsInReadOnly.includes(t)){if(t=t.toLowerCase(),!1!==(a=(o=this.e).fire.apply(o,["beforeCommand".concat((0,u.ucfirst)(t)),n,r].concat(b(c))))&&(a=(s=this.e).fire.apply(s,["beforeCommand",t,n,r].concat(b(c)))),!1!==a&&(a=this.__execCustomCommands.apply(this,[t,n,r].concat(b(c)))),!1!==a){this.s.focus();try{a=this.nativeExecCommand(t,n,r)}catch(t){if(!i.IS_PROD)throw t}}return this.e.fire("afterCommand",t,n,r),this.__imdSynchronizeValues(),a}}},{key:"nativeExecCommand",value:function(t,n,r){this.__isSilentChange=!0;try{return this.ed.execCommand(t,n,r)}finally{this.__isSilentChange=!1}}},{key:"__execCustomCommands",value:function(t,n,r){for(var o,i=this,a=arguments.length,s=Array(a>3?a-3:0),l=3;a>l;l++)s[l-3]=arguments[l]