jodit-pro 1.3.4 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/build/jodit.css +1 -1
  2. package/build/jodit.es5.css +2 -2
  3. package/build/jodit.es5.js +1 -1
  4. package/build/jodit.fat.css +1 -1
  5. package/build/jodit.fat.es5.css +1 -1
  6. package/build/jodit.fat.es5.js +1 -1
  7. package/build/jodit.fat.js +1 -1
  8. package/build/jodit.js +1 -1
  9. package/build/plugins/autocomplete/autocomplete.es5.js +1 -1
  10. package/build/plugins/autocomplete/autocomplete.js +1 -1
  11. package/build/plugins/backup/backup.es5.js +1 -1
  12. package/build/plugins/backup/backup.js +1 -1
  13. package/build/plugins/button-generator/button-generator.es5.js +1 -1
  14. package/build/plugins/button-generator/button-generator.js +1 -1
  15. package/build/plugins/change-case/change-case.es5.js +1 -1
  16. package/build/plugins/change-case/change-case.js +1 -1
  17. package/build/plugins/color-picker/color-picker.es5.js +1 -1
  18. package/build/plugins/color-picker/color-picker.js +1 -1
  19. package/build/plugins/emoji/emoji.es5.js +1 -1
  20. package/build/plugins/emoji/emoji.js +1 -1
  21. package/build/plugins/export-docs/export-docs.es5.js +1 -1
  22. package/build/plugins/export-docs/export-docs.js +1 -1
  23. package/build/plugins/finder/finder.es5.js +1 -1
  24. package/build/plugins/finder/finder.js +1 -1
  25. package/build/plugins/google-maps/google-maps.es5.js +1 -1
  26. package/build/plugins/google-maps/google-maps.js +1 -1
  27. package/build/plugins/google-search/google-search.es5.js +1 -1
  28. package/build/plugins/google-search/google-search.js +1 -1
  29. package/build/plugins/highlight-signature/highlight-signature.es5.js +1 -1
  30. package/build/plugins/highlight-signature/highlight-signature.js +1 -1
  31. package/build/plugins/iframe-editor/iframe-editor.es5.js +1 -1
  32. package/build/plugins/iframe-editor/iframe-editor.js +1 -1
  33. package/build/plugins/keyboard/keyboard.es5.js +1 -1
  34. package/build/plugins/keyboard/keyboard.js +1 -1
  35. package/build/plugins/page-break/page-break.es5.js +1 -1
  36. package/build/plugins/page-break/page-break.js +1 -1
  37. package/build/plugins/paste-code/paste-code.es5.js +1 -1
  38. package/build/plugins/paste-code/paste-code.js +1 -1
  39. package/build/plugins/paste-from-word/paste-from-word.es5.js +1 -1
  40. package/build/plugins/paste-from-word/paste-from-word.js +1 -1
  41. package/build/plugins/show-blocks/show-blocks.es5.js +1 -1
  42. package/build/plugins/show-blocks/show-blocks.js +1 -1
  43. package/build/plugins/tune-block/tune-block.es5.js +1 -1
  44. package/build/plugins/tune-block/tune-block.js +1 -1
  45. package/package.json +1 -1
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[630],{880:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(151),n=r(229);o.Config.prototype.exportDocs={css:"",pdf:{allow:!0,options:{format:"A4",page_orientation:"portrait"}}},o.Config.prototype.controls.exportDocs={tooltip:"Export",isDisabled:function(e){return n.Dom.isEmptyContent(e.editor)},icon:r(881),list:{exportToPdf:"Export to PDF"},command:"exportToPDF"}},879:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExportDocs=void 0;var o=r(1),n=r(365),s=r(184),i=r(2);r(880);var a=r(882),c=r(229),u=r(153),l=r(607),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t.buttons=[{name:"exportDocs",group:"media"}],t}return o.__extends(t,e),t.prototype.afterInit=function(e){var r=this;e.registerCommand("exportToPDF",(function(){return o.__awaiter(r,void 0,void 0,(function(){var r,n,i,l,p,f;return o.__generator(this,(function(d){switch(d.label){case 0:r=(0,a.generateCriticalCSS)(e),n=new s.Ajax(e,o.__assign(o.__assign({},null!==(f=e.o.exportDocs.ajax)&&void 0!==f?f:e.o.filebrowser.ajax),{method:"POST",responseType:"blob",onProgress:function(t){e.progressbar.show().progress(t)},data:{action:"generatePdf",html:"<style>".concat(r+e.o.exportDocs.css,"</style>").concat(t.getValue(e))}})),d.label=1;case 1:return d.trys.push([1,4,5,7]),[4,n.send()];case 2:return[4,d.sent().blob()];case 3:return i=d.sent(),(l=this.j.create.a()).href=URL.createObjectURL(i),l.download="document.pdf",l.click(),c.Dom.safeRemove(l),URL.revokeObjectURL(l.href),[3,7];case 4:return(p=d.sent()).message&&(0,u.Alert)(p.message),[3,7];case 5:return e.progressbar.progress(100),[4,e.async.delay(200)];case 6:return d.sent(),e.progressbar.hide(),[7];case 7:return[2]}}))}))}))},t.getValue=function(e){return(0,l.previewBox)(e).innerHTML},t.prototype.beforeDestruct=function(){},t}(n.Plugin);t.ExportDocs=p,i.Jodit.plugins.add("exportDocs",p)},882:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateCriticalCSS=void 0;var o=r(1),n=r(185);t.generateCriticalCSS=function(e){var t=function(e,t){return void 0===t&&(t=e.ownerDocument.styleSheets),(0,n.toArray)(t).map((function(e){try{return(0,n.toArray)(e.cssRules)}catch(e){}return[]})).flat().filter((function(t){try{return Boolean(t&&e.matches(t.selectorText))}catch(e){}return!1}))};return new(function(){function r(r,n,s){var i=this;this.css={};var a=s||{},c=function(t){var r=t.selectorText.split(",").map((function(e){return e.trim()})).sort().join(",");!1===Boolean(i.css[r])&&(i.css[r]={});for(var n=t.style.cssText.split(/;(?![A-Za-z0-9])/),s=0;n.length>s;s++)if(n[s]){var a=n[s].split(":");a[0]=a[0].trim(),a[1]=a[1].trim(),i.css[r][a[0]]=a[1].replace(/var\(([^)]+)\)/g,(function(t,r){var n=o.__read(r.split(","),2),s=n[0],i=n[1];return(e.ew.getComputedStyle(e.editor).getPropertyValue(s.trim())||i||t).trim()}))}};!function(){for(var o=r.innerHeight,s=n.createTreeWalker(e.editor,NodeFilter.SHOW_ELEMENT,(function(){return NodeFilter.FILTER_ACCEPT}));s.nextNode();){var i=s.currentNode;if(o>i.getBoundingClientRect().top||a.scanFullPage){var u=t(i);if(u)for(var l=0;u.length>l;l++)c(u[l])}}}()}return r.prototype.generateCSS=function(){var e="";for(var t in this.css)if(!/:not\(/.test(t)){for(var r in e+=t+" { ",this.css[t])e+=r+": "+this.css[t][r]+"; ";e+="}\n"}return e},r}())(e.ew,e.ed,{scanFullPage:!0}).generateCSS()}},881:function(e){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19,21H5a2,2,0,0,1-2-2V17a1,1,0,0,1,2,0v2H19V17a1,1,0,0,1,2,0v2A2,2,0,0,1,19,21Z"/> <path d="M18,5H6A1,1,0,0,1,6,3H18a1,1,0,0,1,0,2Z"/> <path d="M15.71,10.29l-3-3a1,1,0,0,0-.33-.21,1,1,0,0,0-.76,0,1,1,0,0,0-.33.21l-3,3a1,1,0,0,0-.21,1.09A1,1,0,0,0,9,12h2v3a1,1,0,0,0,2,0V12h2a1,1,0,0,0,.92-.62A1,1,0,0,0,15.71,10.29Z"/> </svg>'}},function(e){return e(e.s=879)}])}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[630],{887:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(152),n=o(235);r.Config.prototype.exportDocs={css:"",pdf:{allow:!0,options:{format:"A4",page_orientation:"portrait"}}},r.Config.prototype.controls.exportDocs={tooltip:"Export",isDisabled:function(e){return n.Dom.isEmptyContent(e.editor)},icon:o(888),list:{exportToPdf:"Export to PDF"},command:"exportToPDF"}},886:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExportDocs=void 0;var r=o(1),n=o(371),s=o(190),a=o(2);o(887);var i=o(615),c=o(235),p=o(154),u=o(613),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t.buttons=[{name:"exportDocs",group:"media"}],t}return r.__extends(t,e),t.prototype.afterInit=function(e){var o=this;e.registerCommand("exportToPDF",(function(){return r.__awaiter(o,void 0,void 0,(function(){var o,n,a,u,f,l;return r.__generator(this,(function(d){switch(d.label){case 0:o=(0,i.generateCriticalCSS)(e),n=new s.Ajax(e,r.__assign(r.__assign({},null!==(l=e.o.exportDocs.ajax)&&void 0!==l?l:e.o.filebrowser.ajax),{method:"POST",responseType:"blob",onProgress:function(t){e.progressbar.show().progress(t)},data:{action:"generatePdf",html:"<style>".concat(o+e.o.exportDocs.css,"</style>").concat(t.getValue(e))}})),d.label=1;case 1:return d.trys.push([1,4,5,7]),[4,n.send()];case 2:return[4,d.sent().blob()];case 3:return a=d.sent(),(u=this.j.create.a()).href=URL.createObjectURL(a),u.download="document.pdf",u.click(),c.Dom.safeRemove(u),URL.revokeObjectURL(u.href),[3,7];case 4:return(f=d.sent()).message&&(0,p.Alert)(f.message),[3,7];case 5:return e.progressbar.progress(100),[4,e.async.delay(200)];case 6:return d.sent(),e.progressbar.hide(),[7];case 7:return[2]}}))}))}))},t.getValue=function(e){return(0,u.previewBox)(e).innerHTML},t.prototype.beforeDestruct=function(){},t}(n.Plugin);t.ExportDocs=f,a.Jodit.plugins.add("exportDocs",f)},888:function(e){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19,21H5a2,2,0,0,1-2-2V17a1,1,0,0,1,2,0v2H19V17a1,1,0,0,1,2,0v2A2,2,0,0,1,19,21Z"/> <path d="M18,5H6A1,1,0,0,1,6,3H18a1,1,0,0,1,0,2Z"/> <path d="M15.71,10.29l-3-3a1,1,0,0,0-.33-.21,1,1,0,0,0-.76,0,1,1,0,0,0-.33.21l-3,3a1,1,0,0,0-.21,1.09A1,1,0,0,0,9,12h2v3a1,1,0,0,0,2,0V12h2a1,1,0,0,0,.92-.62A1,1,0,0,0,15.71,10.29Z"/> </svg>'}},function(e){return e(e.s=886)}])}));
@@ -1 +1 @@
1
- ((e,t)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var s in o)("object"==typeof exports?exports:e)[s]=o[s]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[630],{290(e,t,o){"use strict";o.r(t),o.d(t,{ExportDocs:()=>d});var s=o(95),r=o(31),n=o(1),a=o(2),i=o(51);a.D.prototype.exportDocs={css:"",pdf:{allow:!0,options:{format:"A4",page_orientation:"portrait"}}},a.D.prototype.controls.exportDocs={tooltip:"Export",isDisabled:e=>i.i.isEmptyContent(e.editor),icon:o(291),list:{exportToPdf:"Export to PDF"},command:"exportToPDF"};var c=o(32),l=o(4),p=o(135);class d extends s.S{constructor(){super(...arguments),this.requires=["license"],this.buttons=[{name:"exportDocs",group:"media"}]}afterInit(e){e.registerCommand("exportToPDF",(async()=>{var t;const o=function(e){const t=(e,t=e.ownerDocument.styleSheets)=>(0,c.toArray)(t).map((e=>{try{return(0,c.toArray)(e.cssRules)}catch(e){}return[]})).flat().filter((t=>{try{return!(!t||!e.matches(t.selectorText))}catch(e){}return!1}));return new class{constructor(o,s,r){this.css={};const n=r||{},a=t=>{const o=t.selectorText.split(",").map((e=>e.trim())).sort().join(",");0==!!this.css[o]&&(this.css[o]={});const s=t.style.cssText.split(/;(?![A-Za-z0-9])/);for(let t=0;s.length>t;t++){if(!s[t])continue;const r=s[t].split(":");r[0]=r[0].trim(),r[1]=r[1].trim(),this.css[o][r[0]]=r[1].replace(/var\(([^)]+)\)/g,((t,o)=>{const[s,r]=o.split(",");return(e.ew.getComputedStyle(e.editor).getPropertyValue(s.trim())||r||t).trim()}))}};(()=>{const r=o.innerHeight,i=s.createTreeWalker(e.editor,NodeFilter.SHOW_ELEMENT,(()=>NodeFilter.FILTER_ACCEPT));for(;i.nextNode();){const e=i.currentNode;if(r>e.getBoundingClientRect().top||n.scanFullPage){const o=t(e);if(o)for(let e=0;o.length>e;e++)a(o[e])}}})()}generateCSS(){let e="";for(const t in this.css)if(!/:not\(/.test(t)){e+=t+" { ";for(const o in this.css[t])e+=o+": "+this.css[t][o]+"; ";e+="}\n"}return e}}(e.ew,e.ed,{scanFullPage:!0}).generateCSS()}(e),s=new r.t(e,{...null!==(t=e.o.exportDocs.ajax)&&void 0!==t?t:e.o.filebrowser.ajax,method:"POST",responseType:"blob",onProgress(t){e.progressbar.show().progress(t)},data:{action:"generatePdf",html:`<style>${o+e.o.exportDocs.css}</style>${d.getValue(e)}`}});try{const t=await s.send(),o=await t.blob(),r=this.j.create.a(),n="document.pdf";r.href=URL.createObjectURL(o),r.download=n,r.click(),i.i.safeRemove(r),URL.revokeObjectURL(r.href)}catch(e){e.message&&(0,l.Alert)(e.message)}finally{e.progressbar.progress(100),await e.async.delay(200),e.progressbar.hide()}}))}static getValue(e){return(0,p.$)(e).innerHTML}beforeDestruct(){}}n.Jodit.plugins.add("exportDocs",d)},291(e){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19,21H5a2,2,0,0,1-2-2V17a1,1,0,0,1,2,0v2H19V17a1,1,0,0,1,2,0v2A2,2,0,0,1,19,21Z"/> <path d="M18,5H6A1,1,0,0,1,6,3H18a1,1,0,0,1,0,2Z"/> <path d="M15.71,10.29l-3-3a1,1,0,0,0-.33-.21,1,1,0,0,0-.76,0,1,1,0,0,0-.33.21l-3,3a1,1,0,0,0-.21,1.09A1,1,0,0,0,9,12h2v3a1,1,0,0,0,2,0V12h2a1,1,0,0,0,.92-.62A1,1,0,0,0,15.71,10.29Z"/> </svg>'}},e=>e(e.s=290)])}));
1
+ ((e,o)=>{if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}})(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[630],{291(e,o,t){"use strict";t.r(o),t.d(o,{ExportDocs:()=>d});var r=t(95),s=t(31),a=t(1),p=t(2),i=t(51);p.D.prototype.exportDocs={css:"",pdf:{allow:!0,options:{format:"A4",page_orientation:"portrait"}}},p.D.prototype.controls.exportDocs={tooltip:"Export",isDisabled:e=>i.i.isEmptyContent(e.editor),icon:t(292),list:{exportToPdf:"Export to PDF"},command:"exportToPDF"};var n=t(136),c=t(4),l=t(135);class d extends r.S{constructor(){super(...arguments),this.requires=["license"],this.buttons=[{name:"exportDocs",group:"media"}]}afterInit(e){e.registerCommand("exportToPDF",(async()=>{var o;const t=(0,n.a)(e),r=new s.t(e,{...null!==(o=e.o.exportDocs.ajax)&&void 0!==o?o:e.o.filebrowser.ajax,method:"POST",responseType:"blob",onProgress(o){e.progressbar.show().progress(o)},data:{action:"generatePdf",html:`<style>${t+e.o.exportDocs.css}</style>${d.getValue(e)}`}});try{const o=await r.send(),t=await o.blob(),s=this.j.create.a(),a="document.pdf";s.href=URL.createObjectURL(t),s.download=a,s.click(),i.i.safeRemove(s),URL.revokeObjectURL(s.href)}catch(e){e.message&&(0,c.Alert)(e.message)}finally{e.progressbar.progress(100),await e.async.delay(200),e.progressbar.hide()}}))}static getValue(e){return(0,l.$)(e).innerHTML}beforeDestruct(){}}a.Jodit.plugins.add("exportDocs",d)},292(e){e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M19,21H5a2,2,0,0,1-2-2V17a1,1,0,0,1,2,0v2H19V17a1,1,0,0,1,2,0v2A2,2,0,0,1,19,21Z"/> <path d="M18,5H6A1,1,0,0,1,6,3H18a1,1,0,0,1,0,2Z"/> <path d="M15.71,10.29l-3-3a1,1,0,0,0-.33-.21,1,1,0,0,0-.76,0,1,1,0,0,0-.33.21l-3,3a1,1,0,0,0-.21,1.09A1,1,0,0,0,9,12h2v3a1,1,0,0,0,2,0V12h2a1,1,0,0,0,.92-.62A1,1,0,0,0,15.71,10.29Z"/> </svg>'}},e=>e(e.s=291)])}));
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[524],{700:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBrowserPro=void 0;var n=o(1);o(701),o(702);var r=o(153),i=o(322),s=o(705),a=o(185),c=o(231),l=o(152),u=o(734),h=o(735),d=o(382),p=o(151),f=o(737),v=o(373),m=o(739),g=o(740),y=o(741),_=o(742),w=o(2),b=o(697),I=o(743),S=o(745),C=function(e){function t(t){var o=e.call(this,(0,a.ConfigProto)(Object.assign(t||{},{resizable:!0,draggable:!0,toolbarButtons:(null==t?void 0:t.buttons)||p.Config.defaultOptions.filebrowser.buttons,buttons:w.Jodit.atom(["filebrowser.settings","fullsize","dialog.close"])}),p.Config.defaultOptions.filebrowser))||this;return o.dataProvider=(0,v.makeDataProvider)(o,o.options),o.state=(0,r.observable)({onSelectCallBack:null,theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,showPreview:!1,withFolders:!0,foldersPosition:"bottom",info:"",metaInfo:null,currentPath:"",currentSource:"",currentBaseUrl:"",tree:[],activeElements:[],favorites:[],progress:0,lastSelectedIndex:0,elements:[],messages:[],sources:[],view:"tiles",tileSize:"default",sortBy:"name-asc",filterWord:"",onlyImages:!1}),o.persistent=new m.PersistentStore(o,o.state),o.loadingManager=new S.LoadingManager(o,o.state),o.stateManager=new u.StateManager(o.state),o.historyManager=new g.HistoryManager(o,o.state),o.contextMenuManager=new y.ContextMenuManager(o),o.header=new h.UIBrowserHeader(o,o.options,o.stateManager),o.panel=new s.UIBrowserPanel(o,o.stateManager),o.files=o.panel,o.tree=o.panel,o.progressbar=new f.UIProgress(o,o.stateManager.state),b.license.make(o),!o.persistent.theme&&o.options.theme&&(o.persistent.theme=o.options.theme),o.panel.append(o.progressbar),o.toolbar.setMod("mode","header"),o.setSize(Math.min(o.options.width,screen.width),Math.min(o.options.height,screen.height)).setHeader(o.header),o.onResizeWindow(),o.initUploader(),o.onChangeTheme(),o.fullFillOptions(),o.dataProvider.onProgress((function(e){0===e&&(e=30),o.state.progress=e})),o.e.on("beforeClose",o.removeGlobalListeners),o.e.fire("afterInit"),w.Jodit.prototype.afterInitHook.call(o),o}return n.__extends(t,e),t.prototype.className=function(){return"FileBrowserPro"},t.prototype.lock=function(t){return void 0===t&&(t="any"),this.container.classList.add("jodit_disabled"),e.prototype.lock.call(this,t)},t.prototype.unlock=function(){return this.container.classList.remove("jodit_disabled"),e.prototype.unlock.call(this)},t.prototype.status=function(e,t){var o=this;void 0===t&&(t=!(e instanceof Error));var n={message:(0,a.isString)(e)?e:e.message,type:t?"success":"error"};this.stateManager.addMessage(n),this.async.setTimeout((function(){o.stateManager.removeMessage(n)}),this.options.howLongShowMsg)},t.prototype.addDisclaimer=function(e){this.dialog.appendChild(e)},t.prototype.open=function(t,o){return void 0===t&&(t=this.o.defaultCallback),n.__awaiter(this,void 0,Promise,(function(){return n.__generator(this,(function(n){return this.state.onlyImages=Boolean(o),this.prepareOpening(t),e.prototype.open.call(this,this.panel.container),[2,this.e.fire("update.filebrowser")]}))}))},t.prototype.onResizeWindow=function(){(0,a.css)(this.dialog,{maxWidth:screen.width,minHeight:Math.min(this.options.height,screen.height),minWidth:Math.min(this.options.width,screen.width)})},t.prototype.onChangePath=function(){var e=this.state,t=e.currentSource;this.uploader.setPath(e.currentPath),this.uploader.setSource(t)},t.prototype.onChangeTheme=function(){this.setMod("theme",this.state.theme),this.header.setMod("theme",this.state.theme),this.panel.setMod("theme",this.state.theme),this.options.theme=this.state.theme},t.prototype.onToggleSettings=function(){this.state.showSettings=!this.state.showSettings},t.prototype.prepareOpening=function(e){var t=this;this.registerGlobalListeners(),e&&(this.state.onSelectCallBack=function(o){t.close(),e(o)}),this.persistent.syncWithState()},t.prototype.registerGlobalListeners=function(){this.e.on(this.ow,"keydown",this.onKeyPress)},t.prototype.onKeyPress=function(e){var t=this.od.activeElement;if(this.state.activeElements.length&&t&&r.Dom.isOrContains(this.panel.items.container,t)){var o=this.state.elements;switch(e.key){case l.KEY_ENTER:return this.onChooseItems();case l.KEY_DELETE:return this.onFileRemove();case l.KEY_RIGHT:case l.KEY_LEFT:case l.KEY_DOWN:case l.KEY_UP:var n=e.key===l.KEY_RIGHT||e.key===l.KEY_DOWN,i=this.state.lastSelectedIndex,s=void 0;if([l.KEY_RIGHT,l.KEY_LEFT].includes(e.key))s=n?o[i+1]?i+1:0:o[i-1]?i-1:o.length-1;else{var a=this.panel.countInRow;s=Math.round(((i+1)/a+(n?1:-1))*a-1)}return o[s]&&this.stateManager.addActive(o[s],e.shiftKey),!1}}},t.prototype.removeGlobalListeners=function(){this.e.off(this.ow,"keydown",this.onKeyPress)},t.prototype.onFileRemove=function(){var e=this;this.state.activeElements.length&&(0,r.Confirm)(this.i18n("Are you sure?"),"",(function(t){if(t){var o=[];e.state.activeElements.forEach((function(t){e.stateManager.isFavorite(t)&&e.stateManager.toggleFavorite(t),o.push(e.deleteFile(t.file||t.name||"",t.sourceName))})),e.state.activeElements=[],Promise.all(o).then((function(){e.loadingManager.loadItems()}))}})).bindDestruct(this)},t.prototype.onFileEdit=function(){if(1===this.state.activeElements.length){var e=n.__read(this.state.activeElements,1)[0];d.openImageEditor.call(this,e.fileURL,e.file||"",e.path,e.sourceName,void 0,this.status)}},t.prototype.onFolderRename=function(e){var t=this;(0,r.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(function(o){if(!(0,a.isValidName)(o)||o===e.name)return t.status(t.i18n("Enter new name")),!1;t.dataProvider.folderRename((0,_.parentPath)(e.path),e.name,o,e.sourceName).then((function(n){t.state.activeElements=[],t.status(n,!0),t.state.currentPath=(0,_.parentPath)(e.path)+"/"+o,t.state.currentSource=e.sourceName,t.historyManager.updateCurrent(),t.loadingManager.loadFolders()})).catch(t.status)}),this.i18n("type name"),e.name).bindDestruct(this)},t.prototype.onFolderRemove=function(e){var t=this;(0,r.Confirm)(this.i18n("Are you sure?"),this.i18n("Delete"),(function(o){o&&t.dataProvider.folderRemove((0,_.parentPath)(e.path),e.name,e.sourceName).then((function(o){t.status(o,!0),t.state.currentPath=(0,_.parentPath)(e.path),t.state.currentSource=e.sourceName,t.loadingManager.loadFolders()})).catch(t.status)})).bindDestruct(this)},t.prototype.onFolderCreate=function(e){var t=this;(0,r.Prompt)(this.i18n("Enter Directory name"),this.i18n("Create directory"),(function(o){var n=e.path||"/";t.dataProvider.createFolder(o,e.path||"/",e.sourceName).then((function(){t.state.currentSource===e.sourceName&&t.state.currentPath===n?t.e.fire("update.filebrowser"):(t.state.currentSource=e.sourceName,t.state.currentPath=n),t.historyManager.updateCurrent()}),t.status)}),this.i18n("type name")).bindDestruct(this)},t.prototype.onFileRename=function(e){var t=this,o=e.file||e.name||"";1===this.state.activeElements.length&&o&&(0,r.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(function(e){if(!(0,a.isValidName)(e))return t.status(t.i18n("Enter new name")),!1;t.dataProvider.fileRename(t.state.currentPath,o,e,t.state.currentSource).then((function(e){t.state.activeElements=[],t.status(e,!0),t.loadingManager.loadItems()})).catch(t.status)}),this.i18n("type name"),o).bindDestruct(this)},t.prototype.onChooseItems=function(){var e=this.stateManager.state.activeElements;if(e.length){if("folder"===e[0].type)return this.state.currentPath=this.state.currentPath+"/"+e[0].name,this.state.currentSource=e[0].sourceName,void this.e.fire("afterOpenFolder.filebrowser");this.state.onSelectCallBack?this.stateManager.callSelectHandler():this.onOpenLightBox(e[0])}},t.prototype.onOpenLightBox=function(e){I.UILightBox.open(this,e,this.state.elements)},t.prototype.deleteFile=function(e,t){var o=this;return this.dataProvider.fileRemove(this.state.currentPath,e,t).then((function(t){o.status(t||o.i18n('File "%s" was deleted',e),!0)})).catch(this.status)},t.prototype.initUploader=function(){var e=this,t=this,o=(0,a.ConfigProto)(t.o.uploader||{},p.Config.defaultOptions.uploader),n=function(){return e.loadingManager.loadItems()};t.uploader=t.getInstance("Uploader",o),t.uploader.bind(t.panel.container,n,t.status),t.e.on("bindUploader.filebrowser",(function(e){t.uploader.bind(e,n,t.status)}))},t.prototype.destruct=function(){this.removeGlobalListeners(),this.header.destruct(),this.panel.destruct(),e.prototype.destruct.call(this)},t.prototype.fullFillOptions=function(){var e=this;["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach((function(t){null!=e.options[t]&&(e.options[t]=(0,a.ConfigProto)(e.options[t],e.o.ajax))}))},n.__decorate([c.autobind],t.prototype,"status",null),n.__decorate([(0,c.watch)(":resize",window)],t.prototype,"onResizeWindow",null),n.__decorate([(0,c.watch)(["state.currentPath","state.currentSource"])],t.prototype,"onChangePath",null),n.__decorate([(0,c.watch)("state.theme")],t.prototype,"onChangeTheme",null),n.__decorate([(0,c.watch)(":toggleSettings.filebrowser")],t.prototype,"onToggleSettings",null),n.__decorate([c.autobind],t.prototype,"onKeyPress",null),n.__decorate([c.autobind],t.prototype,"removeGlobalListeners",null),n.__decorate([(0,c.watch)(":fileRemove.filebrowser")],t.prototype,"onFileRemove",null),n.__decorate([(0,c.watch)(":edit.filebrowser")],t.prototype,"onFileEdit",null),n.__decorate([(0,c.watch)(":folderRename.filebrowser")],t.prototype,"onFolderRename",null),n.__decorate([(0,c.watch)(":folderRemove.filebrowser")],t.prototype,"onFolderRemove",null),n.__decorate([(0,c.watch)(":folderCreate.filebrowser")],t.prototype,"onFolderCreate",null),n.__decorate([(0,c.watch)(":fileRename.filebrowser")],t.prototype,"onFileRename",null),n.__decorate([(0,c.watch)(":select.filebrowser")],t.prototype,"onChooseItems",null),n.__decorate([(0,c.watch)(":openLightBox.filebrowser")],t.prototype,"onOpenLightBox",null),n.__decorate([c.component],t)}(i.Dialog);t.FileBrowserPro=C,w.Jodit.modules.FileBrowserPro=C},746:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(151);(0,o(237).extendLang)(o(747));var r=n.Config.prototype.controls.filebrowser;r.settings={icon:"settings",exec:function(e){e.e.fire("toggleSettings.filebrowser")}},r.home={icon:"home",exec:function(e){e.e.fire("goHome.filebrowser")}},r.preview={icon:"eye",isDisabled:function(e){return 0===e.state.activeElements.length},exec:function(e){e.e.fire("togglePreview.filebrowser")}},r.next={icon:"angle-right",isDisabled:function(e){return!e.historyManager.canNext()},exec:function(e){e.historyManager.next()}},r.previous={icon:"angle-left",isDisabled:function(e){return!e.historyManager.canPrevious()},exec:function(e){e.historyManager.previous()}},Object.assign(n.Config.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.preview","about"],sort:!1,pixelOffsetLoadNewChunk:200,width:750,height:400,previewOfficeURL:"https://view.officeapps.live.com/op/view.aspx?src="})},699:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finder=void 0;var n=o(1),r=o(365),i=o(700),s=o(2);o(746);var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t.hasStyle=!s.Jodit.fatMode,t}return n.__extends(t,e),t.prototype.afterInit=function(e){var t=this;e.e.on("getInstanceFileBrowser",(function(e){return t.__instance||(t.__instance=new i.FileBrowserPro(e)),t.__instance}))},t.prototype.beforeDestruct=function(e){var t;e.e.off("getInstanceFileBrowser"),null===(t=this.__instance)||void 0===t||t.destruct()},t}(r.Plugin);t.finder=a,s.Jodit.plugins.add("finder",a)},741:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuManager=void 0;var n=o(1),r=o(373),i=o(235),s=o(231),a=o(382),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.className=function(){return"ContextMenuManager"},t.prototype.onFolderContext=function(e,t){return this.buildContextItemMenu(this.getFolderContextActions(e),t),!1},t.prototype.onItemContext=function(e,t,o){return this.buildContextItemMenu(this.getItemContextActions(e),o),!1},t.prototype.onSourceContext=function(e,t){return this.buildContextItemMenu(this.getSourceContextActions(e),t),!1},t.prototype.buildContextItemMenu=function(e,t){if(this.j.o.contextMenu){var o=(0,r.makeContextMenu)(this.j).setMod("theme",this.j.state.theme);o.show(t.clientX,t.clientY,e.filter((function(e){return e&&!1!==e.enabled}))),this.j.e.on(this.j,"afterClose",(function(){o.isOpened&&o.close()}))}},t.prototype.getItemContextActions=function(e){var t=this;if(this.j.stateManager.isActive(e)||this.j.stateManager.addActive(e,this.j.state.activeElements.length>1),"folder"===e.type)return this.getFolderContextActions({type:"directory",children:[],name:e.name||"",path:e.path,sourceName:e.sourceName});var o=this.j.options,n=this.j.dataProvider,r=1===this.j.state.activeElements.length;return[{icon:"pencil",title:"Edit",enabled:Boolean(e.isImage)&&o.editImage&&r&&(n.canI("ImageResize")||n.canI("ImageCrop")),exec:function(){a.openImageEditor.call(t.j,e.imageURL,e.name||"",t.j.state.currentPath,t.j.state.currentSource)}},{icon:"italic",title:"Rename",enabled:n.canI("FileRename")&&r,exec:function(){return t.j.e.fire("fileRename.filebrowser",e)}},{icon:"bin",title:"Delete",enabled:n.canI("FileRemove"),exec:function(){return t.j.e.fire("fileRemove.filebrowser",e)}},{icon:"eye",title:"Preview",enabled:Boolean(e.isImage||"file"===e.type)&&o.preview&&r,exec:function(){return t.j.e.fire("openLightBox.filebrowser",e)}},{icon:"upload",title:"Download",exec:function(){e.fileURL&&t.j.ow.open(e.fileURL)}}]},t.prototype.getFolderContextActions=function(e){var t=this,o=this.j.dataProvider;return[{icon:"pencil",title:"Rename",exec:function(){t.j.e.fire("folderRename.filebrowser",e)},enabled:o.canI("FolderRename")},{icon:"bin",title:"Delete",exec:function(){t.j.e.fire("folderRemove.filebrowser",e)},enabled:o.canI("FolderRemove")},{icon:"plus",title:"Add folder",exec:function(){t.j.e.fire("folderCreate.filebrowser",e)},enabled:o.canI("FolderCreate")}]},t.prototype.getSourceContextActions=function(e){var t=this;return[{icon:"plus",title:"Create folder",exec:function(){t.j.e.fire("folderCreate.filebrowser",e)}}]},n.__decorate([(0,s.watch)(":contextmenuFolder.filebrowser")],t.prototype,"onFolderContext",null),n.__decorate([(0,s.watch)(":contextmenuItem.filebrowser")],t.prototype,"onItemContext",null),n.__decorate([(0,s.watch)(":contextmenuSource.filebrowser")],t.prototype,"onSourceContext",null),n.__decorate([s.component],t)}(i.ViewComponent);t.ContextMenuManager=c},742:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parentPath=void 0,t.parentPath=function(e){var t=e.split("/").filter((function(e){return e.length}));return t.pop(),t.join("/")||"/"}},740:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryManager=void 0;var n=o(1),r=o(185),i=o(235),s=o(231),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.history=[],n.historyIndex=0,n}return n.__extends(t,e),t.prototype.className=function(){return"HistoryManager"},t.prototype.canNext=function(){return this.history.length-1>this.historyIndex},t.prototype.canPrevious=function(){return this.historyIndex>0},t.prototype.push=function(e){var t=this.historyIndex,o=this.history[t];if(!o||o.currentSource!==e.currentSource||o.currentPath!==e.currentPath){var r=n.__spreadArray([],n.__read(this.history),!1);r.length-1!==t&&(r=r.slice(0,t+1)),r.push(e),o&&(t+=1),this.history=r,this.historyIndex=t}},t.prototype.next=function(){this.canNext()&&(this.historyIndex+=1,this.updateState())},t.prototype.previous=function(){this.canPrevious()&&(this.historyIndex-=1,this.updateState())},t.prototype.updateCurrent=function(){this.history[this.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:(0,r.fastClone)(this.state.tree),elements:n.__spreadArray([],n.__read(this.state.elements),!1)}},t.prototype.onHome=function(){this.state.currentPath="",this.state.currentSource="",this.j.e.fire("afterOpenFolder.filebrowser update.filebrowser")},t.prototype.onOpenFolder=function(){this.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),this.j.e.fire("changeSelection")},t.prototype.updateState=function(){var e=this.history[this.historyIndex],t=e.tree,o=e.elements,r=e.currentSource,i=e.currentPath;this.state.activeElements=[],this.state.elements=n.__spreadArray([],n.__read(o),!1),this.state.tree=n.__spreadArray([],n.__read(t),!1),this.state.currentSource=r,this.state.currentPath=i,this.j.e.fire("changeSelection")},n.__decorate([(0,s.watch)(["state.elements","state.tree"])],t.prototype,"updateCurrent",null),n.__decorate([(0,s.watch)(":goHome.filebrowser")],t.prototype,"onHome",null),n.__decorate([(0,s.watch)(":afterOpenFolder.filebrowser")],t.prototype,"onOpenFolder",null),n.__decorate([s.component],t)}(i.ViewComponent);t.HistoryManager=a},745:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoadingManager=void 0;var n=o(1),r=o(235),i=o(231),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.offset=0,n.countInOneChunk=20,n.stopLoadingParts=!1,n}return n.__extends(t,e),t.prototype.className=function(){return"LoadingManager"},t.prototype.onUpdateFileBrowser=function(){return n.__awaiter(this,void 0,Promise,(function(){return n.__generator(this,(function(e){switch(e.label){case 0:return this.j.state.activeElements=[],this.j.panel.setMod("loading",!0),[4,Promise.all([this.loadFolders(),this.loadItems()])];case 1:return e.sent(),this.j.panel.setMod("loading",!1),[2]}}))}))},t.prototype.loadFolders=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t,o,r,i;return n.__generator(this,(function(n){switch(n.label){case 0:if(!this.j.isOpened)return[2];t=(e=this.j.state).currentPath,o=e.currentSource,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.j.dataProvider.tree(t,o)];case 2:return r=n.sent(),this.j.stateManager.fillSources(r,t),this.j.state.sources=r,[3,4];case 3:return i=n.sent(),this.j.status(i),[3,4];case 4:return[2]}}))}))},t.prototype.loadItems=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t;return n.__generator(this,(function(o){switch(o.label){case 0:if(!this.j.isOpened)return[2];o.label=1;case 1:return o.trys.push([1,6,,7]),this.offset=0,this.stopLoadingParts=!1,e=this.j.state,[4,this.loadPartItems()];case 2:e.elements=o.sent(),this.stopLoadingParts=this.countInOneChunk>this.j.state.elements.length,o.label=3;case 3:return this.stopLoadingParts||this.j.state.elements.length>this.j.panel.countInColumn*this.j.panel.countInRow?[3,5]:[4,this.loadItemsChunk()];case 4:return o.sent(),[3,3];case 5:return[3,7];case 6:return t=o.sent(),this.j.status(t),[3,7];case 7:return[2]}}))}))},t.prototype.loadItemsChunk=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t;return n.__generator(this,(function(o){switch(o.label){case 0:if(this.stopLoadingParts)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),this.offset+=this.countInOneChunk,[4,this.loadPartItems()];case 2:return e=o.sent(),this.stopLoadingParts=this.countInOneChunk>e.length,e.length&&(this.j.state.elements=this.j.state.elements.concat(e)),[3,4];case 3:return t=o.sent(),this.j.status(t),[3,4];case 4:return[2]}}))}))},t.prototype.loadPartItems=function(){var e=this.j.state;return this.j.dataProvider.items(e.currentPath,e.currentSource,{offset:this.offset,limit:this.countInOneChunk,sortBy:e.sortBy,withFolders:e.withFolders,foldersPosition:e.foldersPosition,onlyImages:e.onlyImages,filterWord:e.filterWord})},n.__decorate([(0,i.watch)(":update.filebrowser")],t.prototype,"onUpdateFileBrowser",null),n.__decorate([(0,i.watch)(["state.currentPath","state.currentSource"]),(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadFolders",null),n.__decorate([(0,i.watch)(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItems",null),n.__decorate([(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItemsChunk",null),n.__decorate([i.component],t)}(r.ViewComponent);t.LoadingManager=s},739:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PersistentStore=void 0;var n=o(1),r=o(235),i=o(231),s=o(375),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.sortBy="changed-desc",n.view="tiles",n.foldersPosition="top",n.tileSize="default",n.favorites=[],n.showSideBar=!0,n.showPreview=!1,n.showFavorites=!0,n}return n.__extends(t,e),t.prototype.className=function(){return"PersistentStore"},t.prototype.onChangeThemeSetField=function(){this.theme=this.state.theme},t.prototype.onChangeView=function(){this.view=this.state.view},t.prototype.onChangeSortBy=function(){this.sortBy=this.state.sortBy},t.prototype.onChangeTileSize=function(){this.tileSize=this.state.tileSize},t.prototype.onChangeFavorites=function(){this.favorites=this.state.favorites},t.prototype.onChangeShowSideBar=function(){this.showSideBar=this.state.showSideBar},t.prototype.onChangeShowPreview=function(){this.showPreview=this.state.showPreview},t.prototype.onChangeShowFavorites=function(){this.showFavorites=this.state.showFavorites},t.prototype.onChangeFoldersPosition=function(){this.foldersPosition=this.state.foldersPosition},t.prototype.syncWithState=function(){this.state.tileSize=this.tileSize,this.state.favorites=this.favorites.map((function(e){return e instanceof s.FileBrowserItem?e:s.FileBrowserItem.create(e)})),this.state.view=this.view,this.state.theme=this.theme,this.state.showSideBar=this.showSideBar,this.state.showPreview=this.showPreview,this.state.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition},n.__decorate([i.persistent],t.prototype,"theme",void 0),n.__decorate([i.persistent],t.prototype,"sortBy",void 0),n.__decorate([i.persistent],t.prototype,"view",void 0),n.__decorate([i.persistent],t.prototype,"foldersPosition",void 0),n.__decorate([i.persistent],t.prototype,"tileSize",void 0),n.__decorate([i.persistent],t.prototype,"favorites",void 0),n.__decorate([i.persistent],t.prototype,"showSideBar",void 0),n.__decorate([i.persistent],t.prototype,"showPreview",void 0),n.__decorate([i.persistent],t.prototype,"showFavorites",void 0),n.__decorate([(0,i.watch)("state.theme")],t.prototype,"onChangeThemeSetField",null),n.__decorate([(0,i.watch)("state.view")],t.prototype,"onChangeView",null),n.__decorate([(0,i.watch)("state.sortBy")],t.prototype,"onChangeSortBy",null),n.__decorate([(0,i.watch)("state.tileSize")],t.prototype,"onChangeTileSize",null),n.__decorate([(0,i.watch)("state.favorites")],t.prototype,"onChangeFavorites",null),n.__decorate([(0,i.watch)("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),n.__decorate([(0,i.watch)("state.showPreview")],t.prototype,"onChangeShowPreview",null),n.__decorate([(0,i.watch)("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),n.__decorate([(0,i.watch)("state.foldersPosition")],t.prototype,"onChangeFoldersPosition",null),n.__decorate([i.component],t)}(r.ViewComponent);t.PersistentStore=a},734:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateManager=void 0;var n=o(1),r=o(231),i=function(){function e(e){this.state=e}return e.prototype.getIndex=function(e,t){return void 0===t&&(t=this.state.elements),t.findIndex((function(t){return t.uniqueHashKey===e.uniqueHashKey}))},e.prototype.isActive=function(e){return Boolean(this.state.activeElements.find((function(t){return t.uniqueHashKey===e.uniqueHashKey})))},e.prototype.isFavorite=function(e){return Boolean(this.state.favorites.find((function(t){return t.uniqueHashKey===e.uniqueHashKey})))},e.prototype.addActive=function(e,t){var o;this.state.metaInfo=e,this.state.info=null!==(o=e.file)&&void 0!==o?o:"",this.state.lastSelectedIndex=this.getIndex(e),this.state.activeElements=t?n.__spreadArray(n.__spreadArray([],n.__read(this.state.activeElements),!1),[e],!1):[e]},e.prototype.callSelectHandler=function(){var e,t=this.state.activeElements;null===(e=this.state.onSelectCallBack)||void 0===e||e.call(this,{baseurl:"",files:t.map((function(e){return e.fileURL})),isImages:t.map((function(e){return Boolean(e.isImage)}))})},e.prototype.setFilter=function(e){this.state.filterWord=e},e.prototype.addMessage=function(e){var t,o=this.state.messages;(null===(t=o[o.length-1])||void 0===t?void 0:t.message)!==e.message&&(this.state.messages=n.__spreadArray(n.__spreadArray([],n.__read(o),!1),[e],!1))},e.prototype.removeMessage=function(e){var t=this.state.messages.indexOf(e);if(-1!==t){var o=n.__spreadArray([],n.__read(this.state.messages),!1);o.splice(t,1),this.state.messages=o}},e.prototype.toggleFavorite=function(e){var t=this.getIndex(e,this.state.favorites),o=n.__spreadArray([],n.__read(this.state.favorites),!1);-1===t?o.push(e):o.splice(t,1),this.state.favorites=o},e.prototype.fillSources=function(e,t){var o=this,n=function(e){return e.filter((function(e){return"."!==e&&".."!==e}))};if(this.state.tree.length&&t){var r=function(e,t){var o;return null!==(o=e.find((function(e){return e.name===t})))&&void 0!==o?o:null};this.removeActive(this.state.tree),e.forEach((function(e){var i=r(o.state.tree,e.name);if(i){i.isActive=!0;var s=t.split("/").reduce((function(e,t){return e&&r(e.children,t)}),i);s&&(s.isActive=!0,s.children=n(e.folders).map((function(o){return{type:"directory",name:o,path:t+"/"+o,sourceName:e.name,children:[]}})))}}))}else this.state.tree=e.map((function(e){return{type:"source",name:e.name,title:e.title,sourceName:e.name,path:"/",children:n(e.folders).map((function(t){return{type:"directory",name:t,path:t,sourceName:e.name,children:[]}}))}}))},e.prototype.removeActive=function(e){var t=this;e.forEach((function(e){e.isActive=!1,t.removeActive(e.children)}))},Object.defineProperty(e.prototype,"isFavoriteItems",{get:function(){return this.state.favorites===this.state.elements},enumerable:!1,configurable:!0}),n.__decorate([r.autobind],e.prototype,"getIndex",null),n.__decorate([r.autobind],e.prototype,"isActive",null),n.__decorate([r.autobind],e.prototype,"isFavorite",null),e}();t.StateManager=i},747:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ru=void 0;var n=o(748);t.ru=n},702:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(335),r=o(703),i=o(704);n.Icon.set("heart",String(r)),n.Icon.set("home",String(i))},728:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserFolder=void 0;var n=o(1);o(729);var r=o(335),i=o(231),s=o(185),a=function(e){function t(t,o){var n=e.call(this,t)||this;n.item=o,n.syncMod=!0;var r=n.getElm("name");return(0,s.assert)(null!=r,"name element does not exists"),r.innerText=o.name,t.e.on(n.container,"click",(function(){return n.getMod("active")||n.setMod("loading",!0),t.e.fire("openFolder",o)})).on(n.container,"contextmenu",(function(e){return t.e.fire("contextmenuFolder.filebrowser",o,e)})),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserFolder"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="&__icon">\n\t\t\t\t<div class=\'&__loader\'></div>\n\t\t\t\t<div class="&__icon-wrapper">\n\t\t\t\t\t*folder*\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__arrow">*angle-right*</div>\n\t\t</div>'},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserFolder=a},735:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserHeader=void 0;var n=o(1);o(736);var r=o(335),i=o(231),s=o(332),a=function(e){function t(t,o,n){var i,a=this;return(a=e.call(this,t)||this).options=o,a.stateManager=n,a.syncMod=!0,a.toolbar=(0,s.makeCollection)(a.j),a.filter=new r.UIInput(a.j,{icon:"search",placeholder:"Filter",clearButton:!0,onChange:function(e){a.stateManager.setFilter(e)}}),a.append(a.toolbar).append(a.filter),a.filter.container.classList.add(a.getFullElName("filter")),a.toolbar.setMod("mode","header").build(null!==(i=a.options.toolbarButtons)&&void 0!==i?i:[]),a}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserHeader"},n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserHeader=a},709:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserItem=void 0;var n=o(1);o(710);var r=o(335),i=o(231),s=o(375),a=o(153),c=o(185),l=o(185),u=function(e){function t(t,o){var n=e.call(this,t)||this;return n.item=s.FileBrowserItem.create(o),t.e.on(n.container,"click contextmenu dblclick",(function(e){return t.e.fire(e.type+"Item.filebrowser",n.item,(0,c.ctrlKey)(e)||e.shiftKey,e),!1})),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserItem"},t.prototype.render=function(){return"<div tabindex='-1'>\n\t\t\t<div class='&__image'></div>\n\t\t\t<div class='&__info'></div>\n\t\t\t<div class='&__heart'>*heart*</div>\n\t\t</div>"},t.prototype.onClickFavorite=function(){var e=this;return this.bubble((function(t){e.jodit.e.fire(t,"toggleFavoriteItem",e.item)})),!1},t.prototype.onAction=function(e){return this.jodit.e.fire(e.type+"Item.filebrowser",this.item,(0,c.ctrlKey)(e)||e.shiftKey,e),!1},t.prototype.update=function(){var t,o=this.getElm("image");(0,l.assert)(null!=o,"image element does not exists"),(0,c.css)(o,"backgroundImage","url(".concat(this.item.imageURL,")")),this.setMod("is-file",!1===this.item.isImage).setMod("type",null!==(t=this.item.type)&&void 0!==t?t:"file").setElementValue("name",this.item.file).setElementValue("time",this.item.time).setElementValue("filesize",this.item.size),(0,c.attr)(this.container,"title","".concat(this.item.file," ").concat(this.item.time," ").concat(this.item.size)),e.prototype.update.call(this)},t.prototype.setElementValue=function(e,t){var o=this.getFullElName(e),n=this.getElm(e);if(!t)return n&&a.Dom.safeRemove(n),this;if(!n){var r=this.getElm("info");(0,l.assert)(null!=r,"wrapper element does not exist"),n=this.j.create.div(o),r.appendChild(n)}return n.innerText=t,this},n.__decorate([(0,i.watch)("heart:click")],t.prototype,"onClickFavorite",null),n.__decorate([(0,i.watch)(["container:click","container:contextmenu","container:dblclick"])],t.prototype,"onAction",null),n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserItem=u},743:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UILightBox=void 0;var n=o(1);o(744);var r=o(153),i=o(231),s=o(185),a=o(152),c=o(185),l=function(e){function t(t,o,n){var i=e.call(this,t)||this;i.current=o,i.elements=n,i.dialog=new r.Dialog;var s=i.dialog;return s.setMod("theme",t.state.theme).toolbar.setMod("mode","header"),s.open(i),i.elements=i.elements.filter((function(e){return e.isImage})),s.e.on(s,"afterClose",(function(){i.destruct()})),i.addGlobalListeners(),i.onChangeCurrent(),s.toolbar.build([{icon:"check",exec:function(){t.stateManager.addActive(i.current,!1),t.e.fire("select.filebrowser"),s.close()}},"dialog.close"]),i}var o;return n.__extends(t,e),o=t,t.prototype.className=function(){return"UILightBox"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__previous'>*angle-left*</div>\n\t\t\t<div class='&__preview'></div>\n\t\t\t<div class='&__loader'></div>\n\t\t\t<div class='&__next'>*angle-right*</div>\n\t\t</div>"},t.prototype.onChangeCurrent=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t,o,i;return n.__generator(this,(function(n){switch(n.label){case 0:return e=this.current,this.setMod("loading",!0),t=this.getElm("preview"),(0,c.assert)(null!=t,"preview element does not exist"),r.Dom.detach(t),(0,s.css)(t,{backgroundImage:null}),e.isImage?[4,(0,s.loadImage)(e.fileURL,this.j)]:[3,2];case 1:return o=n.sent(),this.dialog.setPosition(),(0,s.css)(t,{width:Math.min(this.jodit.ow.innerWidth,o.naturalWidth),height:Math.min(this.jodit.ow.innerHeight-100,o.naturalHeight),backgroundImage:"url(".concat(o.src,")")}),[3,4];case 2:return[4,this.makeIframe(e.fileURL)];case 3:i=n.sent(),t.appendChild(i),n.label=4;case 4:return this.dialog.setSize(),this.dialog.setPosition(),this.setMod("loading",!1),[2]}}))}))},t.prototype.makeIframe=function(e){var t=this.j.c.element("iframe");return t.classList.add(this.getFullElName("office-iframe")),t.src=/\.pdf/.test(e)?e:this.j.o.previewOfficeURL+encodeURIComponent(e),t},t.prototype.onPreviousClick=function(){var e=this.j.stateManager.getIndex(this.current,this.elements);e>0?e-=1:e=this.elements.length-1,this.current=this.elements[e]},t.prototype.onNextClick=function(){var e=this.j.stateManager.getIndex(this.current,this.elements);this.elements.length-1>e?e+=1:e=0,this.current=this.elements[e]},t.open=function(e,t,n){return new o(e,t,n)},t.prototype.addGlobalListeners=function(){this.j.e.on(this.j.od,"keydown",this.onKeyPress)},t.prototype.onKeyPress=function(e){if(e.key===a.KEY_LEFT||e.key===a.KEY_RIGHT||e.key===a.KEY_SPACE)return e.key===a.KEY_LEFT?this.onPreviousClick():this.onNextClick(),!1},t.prototype.removeGlobalListeners=function(){this.j.e.off(this.j.od,"keydown",this.onKeyPress)},t.prototype.destruct=function(){return this.removeGlobalListeners(),this.dialog.destruct(),e.prototype.destruct.call(this)},n.__decorate([(0,i.watch)("current")],t.prototype,"onChangeCurrent",null),n.__decorate([(0,i.watch)("previous:click")],t.prototype,"onPreviousClick",null),n.__decorate([(0,i.watch)("next:click")],t.prototype,"onNextClick",null),n.__decorate([i.autobind],t.prototype,"onKeyPress",null),o=n.__decorate([i.component],t)}(r.UIElement);t.UILightBox=l},715:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessage=void 0;var n=o(1),r=o(335),i=o(231),s=o(185),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.container.innerText=(0,s.isString)(o)?o:o.message,n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserMessage"},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserMessage=a},713:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessages=void 0;var n=o(1);o(714);var r=o(335),i=o(231),s=o(715),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserMessages"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){var o=new s.UIBrowserMessage(t.jodit,e.message);o.setMod("type",e.type),t.append(o)}))},n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserMessages=a},705:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserPanel=void 0;var n=o(1);o(706);var r=o(335),i=o(707),s=o(713),a=o(231),c=o(716),l=o(720),u=o(185),h=o(722),d=o(730),p=o(732),f=function(e){function t(t,o){var n=e.call(this,t)||this;return n.stateManager=o,n.syncMod=!0,n.sources=new h.UIBrowserSources(n.j),n.sidebar=new c.UISidebar(n.jodit,[n.sources],n.stateManager.state),n.preview=new p.UIPreview(n.jodit,n.stateManager.state),n.statusbar=new d.UIBrowserStatusBar(n.j),n.items=new i.UIVirtualScroll(n.j,n.stateManager),n.settings=new l.UIBrowserSettings(n.jodit,n.stateManager.state),n.messages=new s.UIBrowserMessages(n.j),n.state=o.state,n.append(n.sidebar,"content"),n.append(n.items,"content"),n.append(n.messages,"footer"),n.append(n.settings,"content"),n.append(n.preview,"content"),n.append(n.statusbar,"footer"),n.onChangeElements(),n.onChangeSources(),n.onChangeView(),n.onChangeTileSize(),n.onChangeShowFavorites(),n.onChangeMessages(),n.onChangeActiveElements(),n.onChangeFavorites(),n.onChangeShowSideBar(),n.onChangeShowSettings(),n.onChangeShowPreview(),n.onChangeTheme(),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserPanel"},Object.defineProperty(t.prototype,"countInRow",{get:function(){if("list"===this.state.view)return 1;var e=this.items.elements[0].container,t=(0,u.css)(e,"marginLeft");return Math.floor(this.items.container.offsetWidth/(e.offsetWidth+((0,u.isNumber)(t)?t:0)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"countInColumn",{get:function(){var e=this.items.elements[0].container,t=(0,u.css)(e,"marginTop");return Math.floor(this.items.container.offsetHeight/(e.offsetHeight+((0,u.isNumber)(t)?t:0)))},enumerable:!1,configurable:!0}),t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__content'></div>\n\t\t\t<div class='&__footer'></div>\n\t\t</div>"},t.prototype.onChangeTheme=function(){this.setMod("theme",this.stateManager.state.theme)},t.prototype.onChangeElements=function(){this.items.build(this.stateManager.state.elements)},t.prototype.onChangeActiveElements=function(){var e=this;this.state.activeElements.length||(this.state.info="",this.state.metaInfo=null),this.items.elements.forEach((function(t){t.setMod("active",Boolean(e.stateManager.isActive(t.item)))})),this.j.e.fire("changeSelection")},t.prototype.onChangeFavorites=function(){var e=this;this.items.elements.forEach((function(t){t.setMod("favorite",Boolean(e.stateManager.isFavorite(t.item)))}))},t.prototype.onChangeSources=function(){this.sources.build(this.stateManager.state.tree)},t.prototype.onChangeLastSelectedIndex=function(){var e,t=null===(e=this.items.elements[this.stateManager.state.lastSelectedIndex])||void 0===e?void 0:e.container;t&&((0,u.scrollIntoViewIfNeeded)(t,this.items.container,this.j.od),t.focus())},t.prototype.onChangeInfo=function(){this.statusbar.value(this.state.info,"center")},t.prototype.onChangePathOrSource=function(){this.statusbar.value(this.state.currentPath?"".concat(this.state.currentPath," (").concat(this.state.currentSource,")"):this.i18n("Home"),"left")},t.prototype.onChangeShowSettings=function(){this.settings.setMod("hidden",!this.stateManager.state.showSettings)},t.prototype.onChangeShowPreview=function(){this.preview.setMod("hidden",!this.stateManager.state.showPreview)},t.prototype.onChangeShowSideBar=function(){this.sidebar.setMod("hidden",!this.stateManager.state.showSideBar)},t.prototype.onChangeView=function(){this.items.setMod("view",this.stateManager.state.view)},t.prototype.onChangeTileSize=function(){this.items.setMod("size",this.stateManager.state.tileSize)},t.prototype.onChangeShowFavorites=function(){this.sidebar.setMod("show-favorites",this.stateManager.state.showFavorites),this.items.setMod("show-favorites",this.stateManager.state.showFavorites)},t.prototype.onChangeMessages=function(){this.messages.build(this.stateManager.state.messages)},t.prototype.onItemDblClick=function(){return this.j.e.fire("select.filebrowser"),!1},t.prototype.onItemClick=function(e,t){this.stateManager.addActive(e,t)},t.prototype.onTogglePreview=function(){return this.state.showPreview=!this.state.showPreview,!1},t.prototype.onToggleFavoriteItem=function(e){this.stateManager.toggleFavorite(e)},t.prototype.onFolderClick=function(e){this.stateManager.state.currentSource=e.sourceName,this.stateManager.state.currentPath=e.path||"/",this.j.e.fire("afterOpenFolder.filebrowser")},n.__decorate([(0,a.watch)("state.theme")],t.prototype,"onChangeTheme",null),n.__decorate([(0,a.watch)("state.elements")],t.prototype,"onChangeElements",null),n.__decorate([(0,a.watch)("state.activeElements")],t.prototype,"onChangeActiveElements",null),n.__decorate([(0,a.watch)(["state.favorites","state.elements"])],t.prototype,"onChangeFavorites",null),n.__decorate([(0,a.watch)("state.sources")],t.prototype,"onChangeSources",null),n.__decorate([(0,a.watch)("state.lastSelectedIndex")],t.prototype,"onChangeLastSelectedIndex",null),n.__decorate([(0,a.watch)("state.info")],t.prototype,"onChangeInfo",null),n.__decorate([(0,a.watch)(["state.currentPath","state.currentSource"])],t.prototype,"onChangePathOrSource",null),n.__decorate([(0,a.watch)("state.showSettings")],t.prototype,"onChangeShowSettings",null),n.__decorate([(0,a.watch)("state.showPreview")],t.prototype,"onChangeShowPreview",null),n.__decorate([(0,a.watch)("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),n.__decorate([(0,a.watch)("state.view")],t.prototype,"onChangeView",null),n.__decorate([(0,a.watch)("state.tileSize")],t.prototype,"onChangeTileSize",null),n.__decorate([(0,a.watch)("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),n.__decorate([(0,a.watch)("state.messages")],t.prototype,"onChangeMessages",null),n.__decorate([(0,a.watch)(":dblclickItem.filebrowser")],t.prototype,"onItemDblClick",null),n.__decorate([(0,a.watch)(":clickItem.filebrowser")],t.prototype,"onItemClick",null),n.__decorate([(0,a.watch)(":togglePreview.filebrowser")],t.prototype,"onTogglePreview",null),n.__decorate([(0,a.watch)(":toggleFavoriteItem")],t.prototype,"onToggleFavoriteItem",null),n.__decorate([(0,a.watch)(":openFolder")],t.prototype,"onFolderClick",null),n.__decorate([a.component],t)}(r.UIGroup);t.UIBrowserPanel=f},732:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIPreview=void 0;var n=o(1);o(733);var r=o(335),i=o(231),s=o(718),a=o(185),c=o(229),l=o(709),u=o(185),h=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.lastLoadPromise=null,n.onChangeMetaInfo(),n}return n.__extends(t,e),t.prototype.className=function(){return"UIPreview"},t.prototype.addResize=function(){s.UIResize.remove(this),s.UIResize.install(this,screen.width>450?"left":"top")},t.prototype.render=function(){return'<div>\n\t\t\t\t<div class="&__image"></div>\n\t\t\t\t<div class="&__info"></div>\n\t\t\t\t<div class="&__loader"></div>\n\t\t\t\t<div class="&__empty-message">~Select image~</div>\n\t\t\t</div>'},t.prototype.setMod=function(t,o){return e.prototype.setMod.call(this,t,o),"hidden"===t&&!1===o&&this.onChangeMetaInfo(),this},t.prototype.onChangeMetaInfo=function(){var e,t,o=this;if(!this.getMod("hidden")){var n=this.state.metaInfo;this.setMod("empty",!n);var r=this.getElm("info");(0,u.assert)(null!=r,"info element does not exists"),c.Dom.detach(r);var i=this.getElm("image");(0,u.assert)(null!=i,"image element does not exists"),(0,a.css)(i,{backgroundImage:null}),n&&(this.setMod("is-file",!1===n.isImage).setMod("type",null!==(e=n.type)&&void 0!==e?e:"file"),l.UIBrowserItem.prototype.setElementValue.call(this,"name",n.file),l.UIBrowserItem.prototype.setElementValue.call(this,"time",n.time),l.UIBrowserItem.prototype.setElementValue.call(this,"filesize",n.size),this.setMod("loading",!0),null===(t=this.lastLoadPromise)||void 0===t||t.rejectCallback(),this.lastLoadPromise=(0,a.loadImage)(n.isImage?n.fileURL:n.imageURL,this.j),this.lastLoadPromise.then((function(e){var t=o.getElm("image");(0,u.assert)(null!=t,"image element does not exist"),e&&(0,a.css)(t,{backgroundImage:"url(".concat(e.src,")")})})).finally((function(){o.setMod("loading",!1)})).catch((function(){})))}},n.__decorate([(0,i.hook)("ready"),(0,i.watch)(":resize",window),(0,i.debounce)()],t.prototype,"addResize",null),n.__decorate([(0,i.watch)("state.metaInfo")],t.prototype,"onChangeMetaInfo",null),n.__decorate([i.component],t)}(r.UIGroup);t.UIPreview=h},737:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIProgress=void 0;var n=o(1);o(738);var r=o(335),i=o(231),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.onProgress(),n}return n.__extends(t,e),t.prototype.className=function(){return"UIProgress"},t.prototype.onProgress=function(){this.state.progress?this.show():this.hide(),this.progress(this.state.progress)},t.prototype.hide=function(){return this.setMod("hidden",!0),this},t.prototype.progress=function(e){var t=this;return this.container.style.width=e.toFixed(2)+"%",98>e||this.j.async.setTimeout((function(){t.hide()}),{label:"progress",timeout:300}),this},t.prototype.show=function(){return this.setMod("hidden",!1),this},n.__decorate([(0,i.watch)("state.progress")],t.prototype,"onProgress",null),n.__decorate([i.component],t)}(r.ProgressBar);t.UIProgress=s},720:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSettings=void 0;var n=o(1);o(721);var r=o(335),i=o(231),s=o(185),a=function(e){function t(t,o){var n=e.call(this,t)||this;n.state=o;var r=n.getElm("close");return(0,s.assert)(null!=r,"close element does not exists"),t.e.on(r,"click",(function(){n.state.showSettings=!1})),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserSettings"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="'.concat(this.getFullElName("close"),'">').concat(r.Icon.get("cancel"),'</div>\n\t\t\t<div class="').concat(this.getFullElName("title"),'">').concat(this.j.i18n("Settings"),'</div>\n\t\t\t<div class="').concat(this.getFullElName("options"),'"></div>\n\t\t</div>')},t.prototype.appendChildToContainer=function(e){var t=this.getElm("options");(0,s.assert)(null!=t,"options element does not exists"),t.appendChild(e)},t.prototype.setMod=function(t,o){return"hidden"===t&&!1===o&&this.generateSettings(),e.prototype.setMod.call(this,t,o)},t.prototype.onChangeView=function(){var e=this.getElm("tile-size");e&&(e.style.display="tiles"===this.state.view?"block":"none")},t.prototype.generateSettings=function(){var e=this;this.clear();var t=this.j;this.append([new r.UIButtonGroup(t,{label:"Theme",name:"theme",value:this.state.theme,radio:!0,options:[{value:"default",text:"Light"},{value:"dark",text:"Dark"}],onChange:function(t){e.state.theme=t[0].value}}),new r.UIButtonGroup(t,{label:"Show favorites",name:"showFavorites",value:this.state.showFavorites,radio:!0,options:[{value:!0,text:"Show"},{value:!1,text:"Hide"}],onChange:function(t){e.state.showFavorites=t[0].value}}),new r.UIButtonGroup(t,{label:"View",name:"view",value:this.state.view,radio:!0,options:[{value:"tiles",text:"Tiles"},{value:"list",text:"List"},{value:"compact",text:"Compact"}],onChange:function(t){e.state.view=t[0].value}}),new r.UIButtonGroup(t,{label:"Folders position",name:"foldersPosition",value:this.state.foldersPosition,radio:!0,options:[{value:"top",text:"Top"},{value:"bottom",text:"Bottom"},{value:"default",text:"Default"}],onChange:function(t){e.state.foldersPosition=t[0].value}}),new r.UISelect(t,{label:"Sort by",name:"sort-by",value:this.state.sortBy,options:[{value:"changed-asc",text:t.i18n("Sort by changed")+"(⬆)"},{value:"changed-desc",text:t.i18n("Sort by changed")+"(⬇)"},{value:"name-asc",text:t.i18n("Sort by name")+"(⬆)"},{value:"name-desc",text:t.i18n("Sort by name")+"(⬇)"},{value:"size-asc",text:t.i18n("Sort by size")+"(⬆)"},{value:"size-desc",text:t.i18n("Sort by size")+"(⬇)"}],onChange:function(t){e.state.sortBy=t}}),new r.UISelect(t,{label:"Tile size",name:"tile-size",value:this.state.tileSize,options:[{value:"xsmall",text:"Extra small"},{value:"small",text:"Small"},{value:"default",text:"Default"},{value:"large",text:"Large"},{value:"xlarge",text:"Extra large"}],onChange:function(t){e.state.tileSize=t}})]),this.onChangeView()},n.__decorate([(0,i.watch)("state.view")],t.prototype,"onChangeView",null),n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserSettings=a},716:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISidebar=void 0;var n=o(1);o(717);var r=o(335),i=o(231),s=o(718),a=o(185),c=function(e){function t(t,o,n){var r=e.call(this,t,o)||this;return r.state=n,r.onChangeFavorites(),r}return n.__extends(t,e),t.prototype.className=function(){return"UISidebar"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__hide-btn'>*angle-left*</div>\n\t\t\t<div class='&__favorites'>*heart* ~Favorites~</div>\n\t\t\t<div class='&__box'></div>\n\t\t</div>"},t.prototype.appendChildToContainer=function(e){var t=this.getElm("box");(0,a.assert)(null!=t,"box element does not exists"),t.appendChild(e)},t.prototype.addResize=function(){s.UIResize.remove(this),s.UIResize.install(this,screen.width>450?"right":"bottom")},t.prototype.onChangeFavorites=function(){this.setMod("has-favorites",Boolean(this.state.favorites.length))},t.prototype.onClickHideButton=function(){return this.state.showSideBar=!this.state.showSideBar,!1},t.prototype.onClickFavorites=function(){return this.state.elements=this.state.favorites,!1},n.__decorate([(0,i.hook)("ready"),(0,i.watch)(":resize",window),(0,i.debounce)()],t.prototype,"addResize",null),n.__decorate([(0,i.watch)("state.favorites")],t.prototype,"onChangeFavorites",null),n.__decorate([(0,i.watch)("hide-btn:click")],t.prototype,"onClickHideButton",null),n.__decorate([(0,i.watch)("favorites:click")],t.prototype,"onClickFavorites",null),n.__decorate([i.component],t)}(r.UIGroup);t.UISidebar=c},724:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSource=void 0;var n=o(1);o(725);var r=o(335),i=o(231),s=o(726),a=o(185),c=function(e){function t(t,o){var n=e.call(this,t,o)||this;n.data=o,n.tree=new s.UITree(n.j,n.data.children),n.syncMod=!0;var r=n.getElm("name");(0,a.assert)(null!=r,"name element does not exists"),r.innerText=o.title||o.name;var i=n.getElm("tree");return(0,a.assert)(null!=i,"tree element does not exists"),i.appendChild(n.tree.container),t.e.on(n.container,"contextmenu",(function(e){return t.e.fire("contextmenuSource.filebrowser",o,e)})),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserSource"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__tree"></div>\n\t\t</div>'},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserSource=c},722:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSources=void 0;var n=o(1);o(723);var r=o(335),i=o(231),s=o(724),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.syncMod=!0,t}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserSources"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){t.append(new s.UIBrowserSource(t.jodit,e))}))},n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserSources=a},730:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserStatusBar=void 0;var n=o(1);o(731);var r=o(335),i=o(231),s=o(185),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserStatusBar"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__slot-left'></div>\n\t\t\t<div class='&__slot-center'></div>\n\t\t\t<div class='&__slot-right'></div>\n\t\t</div>"},t.prototype.value=function(e,t){void 0===t&&(t="left");var o=this.getElm("slot-".concat(t));return(0,s.assert)(null!=o,"Slot does not exists"),o.innerText=e,this},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserStatusBar=a},726:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UITree=void 0;var n=o(1);o(727);var r=o(335),i=o(231),s=o(728),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.syncMod=!0,n.build(o),n}var o;return n.__extends(t,e),o=t,t.prototype.className=function(){return"UITree"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){var n=new s.UIBrowserFolder(t.jodit,e);t.append(n),e.isActive&&n.setMod("active",!0),e.children.length&&t.append(new o(t.jodit,e.children))}))},o=n.__decorate([i.component],t)}(r.UIGroup);t.UITree=a},707:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIVirtualScroll=void 0;var n=o(1);o(708);var r=o(335),i=o(231),s=o(709),a=o(375),c=o(711),l=o(185),u=function(e){function t(t,o){var n=e.call(this,t)||this;return n.stateManager=o,n.syncMod=!0,n.addItemsSelector(),n}var o;return n.__extends(t,e),o=t,t.prototype.className=function(){return"UIVirtualScroll"},t.prototype.render=function(){return"<div>\n\t\t\t\t<div class=\"&__empty-message\">~There are no files~</div>\n\t\t\t\t<div class='&__loader'></div>\n\t\t\t\t<div class='&__drag-area'>~Drop image~</div>\n\t\t\t</div>"},t.prototype.build=function(e){var t=this,o=this.elements.findIndex((function(t,o){return!e[o]||t.item.uniqueHashKey!==a.FileBrowserItem.create(e[o]).uniqueHashKey}));if(o>-1){for(var n=o;this.elements.length>n;n+=1)this.elements[n].destruct();this.elements.length=o}e.slice(o>-1?o:this.elements.length).forEach((function(e){var o=new s.UIBrowserItem(t.jodit,e);Object.keys(t.mods).forEach((function(e){o.setMod(e,t.mods[e])})),t.append(o)})),this.setMod("empty",!this.elements.length)},t.prototype.onScrollLoadChunk=function(){!this.stateManager.isFavoriteItems&&this.j.o.pixelOffsetLoadNewChunk>this.container.scrollHeight-(this.container.scrollTop+this.container.offsetHeight)&&this.j.loadingManager.loadItemsChunk()},t.prototype.onDragOver=function(e){e.preventDefault(),this.setMod("dragover",!0)},t.prototype.onDragLeave=function(e){e.preventDefault(),this.setMod("dragover",!1)},t.prototype.addItemsSelector=function(){c.UISelectItems.install(this)},t.intersectRect=function(e,t){return!(t.left>e.left+e.width||e.left>t.left+t.width||t.top>e.top+e.height||e.top>t.top+t.height)},t.prototype.onSelectItems=function(e){var t=[];this.elements.forEach((function(n){var r=(0,l.position)(n.container);o.intersectRect(r,e)&&t.push(n.item)})),this.stateManager.state.activeElements=t},n.__decorate([(0,i.watch)(":afterResize"),(0,i.watch)(":resize"),(0,i.watch)("container:scroll"),(0,i.throttle)()],t.prototype,"onScrollLoadChunk",null),n.__decorate([(0,i.watch)("container:dragover")],t.prototype,"onDragOver",null),n.__decorate([(0,i.watch)(["container:dragleave","container:drop"])],t.prototype,"onDragLeave",null),o=n.__decorate([i.component],t)}(r.UIGroup);t.UIVirtualScroll=u},718:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIResize=void 0,o(719);var n=o(185),r=o(229),i=function(){function e(){}return e.remove=function(e){(0,n.css)(e.container,{width:null,height:null}),e.container.classList.remove("jodit-ui-resize"),r.Dom.safeRemove(e.container.querySelector(".jodit-ui-resize__handle"))},e.install=function(e,t){e.container.classList.add("jodit-ui-resize"),"static"===(0,n.css)(e.container,"position")&&(0,n.css)(e.container,"position","relative");var o=e.j.c.div("jodit-ui-resize__handle");o.classList.add("jodit-ui-resize__handle_type_"+t),e.container.appendChild(o),e.j.e.on(o,"mousedown touchstart",this.onStartResize.bind(this,e,t))},e.onStartResize=function(e,t,o){var n=e.j.async.throttle(this.onResize.bind(this,e,{x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight,direction:t}),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",n).one(e.j.ow,"mouseup touchend",this.onEndResize.bind(this,e,n))},e.onResize=function(e,t,o){var r=["left","right"].includes(t.direction),i=e.container.parentElement;i&&(0,n.css)(e.container,r?"width":"height",100*(r?(t.w+(o.clientX-t.x)*("right"===t.direction?1:-1))/i.offsetWidth:(t.h+(o.clientY-t.y)*("top"===t.direction?1:-1))/i.offsetHeight)+"%")},e.onEndResize=function(e,t,o){e.j.e.off(e.j.ow,"mousemove touchmove",t),e.j.unlock()},e}();t.UIResize=i},711:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISelectItems=void 0,o(712);var n=o(229),r=o(185),i=function(){function e(){}return e.remove=function(e){n.Dom.safeRemove(e.container.querySelector(".jodit-ui-select-items")),e.j.e.off(e.container,"mousedown.uiselectitems touchstart.uiselectitems")},e.install=function(e){var t=e.j.c.div("jodit-ui-select-items");e.j.e.on(e.container,"mousedown.uiselectitems touchstart.uiselectitems",this.onStartSelect.bind(this,e,t))},e.onStartSelect=function(e,t,o){if(o.target===e.container){(0,r.css)(t,{width:0,height:0}),e.container.appendChild(t);var n={x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight},i=e.j.async.throttle(this.onSelect.bind(this,e,t,n),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",i).one(e.j.ow,"mouseup touchend",this.onEndSelect.bind(this,e,t,i)),e.onSelectItems({left:n.x,top:n.y,width:0,height:0})}},e.onSelect=function(e,t,o,n){var i={left:o.x>n.clientX?n.clientX:o.x,top:o.y>n.clientY?n.clientY:o.y,width:Math.abs(o.x-n.clientX),height:Math.abs(o.y-n.clientY)};(0,r.css)(t,i),e.onSelectItems(i)},e.onEndSelect=function(e,t,o,r){n.Dom.safeRemove(t),e.j.e.off(e.j.ow,"mousemove touchmove",o),e.j.unlock()},e}();t.UISelectItems=i},748:function(e){e.exports={Favorites:"Избранное",Settings:"Настройки",Light:"Светлая",Dark:"Темная",Theme:"Тема",Show:"Показать",Hide:"Скрыть","Show favorites":"Показывать избранное",Tiles:"Плитка",List:"Список",Compact:"Компактный",View:"Отображение","Folders position":"Позиция папок","Sort by":"Сортировать по","Extra small":"Очень маленькие",Small:"Маленькие",Large:"Большие","Extra large":"Очень большие","Tile size":"Размер плитки"}},703:function(e){e.exports='<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> <path d="M365.4,59.628c60.56,0,109.6,49.03,109.6,109.47c0,109.47-109.6,171.8-219.06,281.271 C146.47,340.898,37,278.568,37,169.099c0-60.44,49.04-109.47,109.47-109.47c54.73,0,82.1,27.37,109.47,82.1 C283.3,86.999,310.67,59.628,365.4,59.628z"/> </svg>'},704:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <path d="M28.7,16.3l-12-13c-0.4-0.4-1.1-0.4-1.5,0l-12,13C3,16.6,2.9,17,3.1,17.4C3.2,17.8,3.6,18,4,18h3v10c0,0.6,0.4,1,1,1h16 c0.6,0,1-0.4,1-1V18h3c0.4,0,0.8-0.2,0.9-0.6C29.1,17,29,16.6,28.7,16.3z"/> </svg>'},701:function(e,t,o){"use strict";o.r(t)},729:function(e,t,o){"use strict";o.r(t)},736:function(e,t,o){"use strict";o.r(t)},710:function(e,t,o){"use strict";o.r(t)},744:function(e,t,o){"use strict";o.r(t)},714:function(e,t,o){"use strict";o.r(t)},706:function(e,t,o){"use strict";o.r(t)},733:function(e,t,o){"use strict";o.r(t)},738:function(e,t,o){"use strict";o.r(t)},721:function(e,t,o){"use strict";o.r(t)},717:function(e,t,o){"use strict";o.r(t)},725:function(e,t,o){"use strict";o.r(t)},723:function(e,t,o){"use strict";o.r(t)},731:function(e,t,o){"use strict";o.r(t)},727:function(e,t,o){"use strict";o.r(t)},708:function(e,t,o){"use strict";o.r(t)},719:function(e,t,o){"use strict";o.r(t)},712:function(e,t,o){"use strict";o.r(t)}},function(e){return e(e.s=699)}])}));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var o=t();for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[524],{707:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileBrowserPro=void 0;var n=o(1);o(708),o(709);var r=o(154),i=o(328),s=o(712),a=o(191),c=o(237),l=o(153),u=o(741),h=o(742),d=o(388),p=o(152),f=o(744),v=o(379),m=o(746),g=o(747),y=o(748),_=o(749),w=o(2),b=o(704),I=o(750),S=o(752),C=function(e){function t(t){var o=e.call(this,(0,a.ConfigProto)(Object.assign(t||{},{resizable:!0,draggable:!0,toolbarButtons:(null==t?void 0:t.buttons)||p.Config.defaultOptions.filebrowser.buttons,buttons:w.Jodit.atom(["filebrowser.settings","fullsize","dialog.close"])}),p.Config.defaultOptions.filebrowser))||this;return o.dataProvider=(0,v.makeDataProvider)(o,o.options),o.state=(0,r.observable)({onSelectCallBack:null,theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,showPreview:!1,withFolders:!0,foldersPosition:"bottom",info:"",metaInfo:null,currentPath:"",currentSource:"",currentBaseUrl:"",tree:[],activeElements:[],favorites:[],progress:0,lastSelectedIndex:0,elements:[],messages:[],sources:[],view:"tiles",tileSize:"default",sortBy:"name-asc",filterWord:"",onlyImages:!1}),o.persistent=new m.PersistentStore(o,o.state),o.loadingManager=new S.LoadingManager(o,o.state),o.stateManager=new u.StateManager(o.state),o.historyManager=new g.HistoryManager(o,o.state),o.contextMenuManager=new y.ContextMenuManager(o),o.header=new h.UIBrowserHeader(o,o.options,o.stateManager),o.panel=new s.UIBrowserPanel(o,o.stateManager),o.files=o.panel,o.tree=o.panel,o.progressbar=new f.UIProgress(o,o.stateManager.state),b.license.make(o),!o.persistent.theme&&o.options.theme&&(o.persistent.theme=o.options.theme),o.panel.append(o.progressbar),o.toolbar.setMod("mode","header"),o.setSize(Math.min(o.options.width,screen.width),Math.min(o.options.height,screen.height)).setHeader(o.header),o.onResizeWindow(),o.initUploader(),o.onChangeTheme(),o.fullFillOptions(),o.dataProvider.onProgress((function(e){0===e&&(e=30),o.state.progress=e})),o.e.on("beforeClose",o.removeGlobalListeners),o.e.fire("afterInit"),w.Jodit.prototype.afterInitHook.call(o),o}return n.__extends(t,e),t.prototype.className=function(){return"FileBrowserPro"},t.prototype.lock=function(t){return void 0===t&&(t="any"),this.container.classList.add("jodit_disabled"),e.prototype.lock.call(this,t)},t.prototype.unlock=function(){return this.container.classList.remove("jodit_disabled"),e.prototype.unlock.call(this)},t.prototype.status=function(e,t){var o=this;if(void 0===t&&(t=!(e instanceof Error)),!(0,a.isAbort)(e)){var n={message:(0,a.isString)(e)?e:e.message,type:t?"success":"error"};this.stateManager.addMessage(n),this.async.setTimeout((function(){o.stateManager.removeMessage(n)}),this.options.howLongShowMsg)}},t.prototype.addDisclaimer=function(e){this.dialog.appendChild(e)},t.prototype.open=function(t,o){return void 0===t&&(t=this.o.defaultCallback),n.__awaiter(this,void 0,Promise,(function(){return n.__generator(this,(function(n){return this.state.onlyImages=Boolean(o),this.prepareOpening(t),e.prototype.open.call(this,this.panel.container),[2,this.e.fire("update.filebrowser")]}))}))},t.prototype.onResizeWindow=function(){(0,a.css)(this.dialog,{maxWidth:screen.width,minHeight:Math.min(this.options.height,screen.height),minWidth:Math.min(this.options.width,screen.width)})},t.prototype.onChangePath=function(){var e=this.state,t=e.currentSource;this.uploader.setPath(e.currentPath),this.uploader.setSource(t)},t.prototype.onChangeTheme=function(){this.setMod("theme",this.state.theme),this.header.setMod("theme",this.state.theme),this.panel.setMod("theme",this.state.theme),this.options.theme=this.state.theme},t.prototype.onToggleSettings=function(){this.state.showSettings=!this.state.showSettings},t.prototype.prepareOpening=function(e){var t=this;this.registerGlobalListeners(),e&&(this.state.onSelectCallBack=function(o){t.close(),e(o)}),this.persistent.syncWithState()},t.prototype.registerGlobalListeners=function(){this.e.on(this.ow,"keydown",this.onKeyPress)},t.prototype.onKeyPress=function(e){var t=this.od.activeElement;if(this.state.activeElements.length&&t&&r.Dom.isOrContains(this.panel.items.container,t)){var o=this.state.elements;switch(e.key){case l.KEY_ENTER:return this.onChooseItems();case l.KEY_DELETE:return this.onFileRemove();case l.KEY_RIGHT:case l.KEY_LEFT:case l.KEY_DOWN:case l.KEY_UP:var n=e.key===l.KEY_RIGHT||e.key===l.KEY_DOWN,i=this.state.lastSelectedIndex,s=void 0;if([l.KEY_RIGHT,l.KEY_LEFT].includes(e.key))s=n?o[i+1]?i+1:0:o[i-1]?i-1:o.length-1;else{var a=this.panel.countInRow;s=Math.round(((i+1)/a+(n?1:-1))*a-1)}return o[s]&&this.stateManager.addActive(o[s],e.shiftKey),!1}}},t.prototype.removeGlobalListeners=function(){this.e.off(this.ow,"keydown",this.onKeyPress)},t.prototype.onFileRemove=function(){var e=this;this.state.activeElements.length&&(0,r.Confirm)(this.i18n("Are you sure?"),"",(function(t){if(t){var o=[];e.state.activeElements.forEach((function(t){e.stateManager.isFavorite(t)&&e.stateManager.toggleFavorite(t),o.push(e.deleteFile(t.file||t.name||"",t.sourceName))})),e.state.activeElements=[],Promise.all(o).then((function(){e.loadingManager.loadItems()}))}})).bindDestruct(this)},t.prototype.onFileEdit=function(){if(1===this.state.activeElements.length){var e=n.__read(this.state.activeElements,1)[0];d.openImageEditor.call(this,e.fileURL,e.file||"",e.path,e.sourceName,void 0,this.status)}},t.prototype.onFolderRename=function(e){var t=this;(0,r.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(function(o){if(!(0,a.isValidName)(o)||o===e.name)return t.status(t.i18n("Enter new name")),!1;t.dataProvider.folderRename((0,_.parentPath)(e.path),e.name,o,e.sourceName).then((function(n){t.state.activeElements=[],t.status(n,!0),t.state.currentPath=(0,_.parentPath)(e.path)+"/"+o,t.state.currentSource=e.sourceName,t.historyManager.updateCurrent(),t.loadingManager.loadFolders()})).catch(t.status)}),this.i18n("type name"),e.name).bindDestruct(this)},t.prototype.onFolderRemove=function(e){var t=this;(0,r.Confirm)(this.i18n("Are you sure?"),this.i18n("Delete"),(function(o){o&&t.dataProvider.folderRemove((0,_.parentPath)(e.path),e.name,e.sourceName).then((function(o){t.status(o,!0),t.state.currentPath=(0,_.parentPath)(e.path),t.state.currentSource=e.sourceName,t.loadingManager.loadFolders()})).catch(t.status)})).bindDestruct(this)},t.prototype.onFolderCreate=function(e){var t=this;(0,r.Prompt)(this.i18n("Enter Directory name"),this.i18n("Create directory"),(function(o){var n=e.path||"/";t.dataProvider.createFolder(o,e.path||"/",e.sourceName).then((function(){t.state.currentSource===e.sourceName&&t.state.currentPath===n?t.e.fire("update.filebrowser"):(t.state.currentSource=e.sourceName,t.state.currentPath=n),t.historyManager.updateCurrent()}),t.status)}),this.i18n("type name")).bindDestruct(this)},t.prototype.onFileRename=function(e){var t=this,o=e.file||e.name||"";1===this.state.activeElements.length&&o&&(0,r.Prompt)(this.i18n("Enter new name"),this.i18n("Rename"),(function(e){if(!(0,a.isValidName)(e))return t.status(t.i18n("Enter new name")),!1;t.dataProvider.fileRename(t.state.currentPath,o,e,t.state.currentSource).then((function(e){t.state.activeElements=[],t.status(e,!0),t.loadingManager.loadItems()})).catch(t.status)}),this.i18n("type name"),o).bindDestruct(this)},t.prototype.onChooseItems=function(){var e=this.stateManager.state.activeElements;if(e.length){if("folder"===e[0].type)return this.state.currentPath=this.state.currentPath+"/"+e[0].name,this.state.currentSource=e[0].sourceName,void this.e.fire("afterOpenFolder.filebrowser");this.state.onSelectCallBack?this.stateManager.callSelectHandler():this.onOpenLightBox(e[0])}},t.prototype.onOpenLightBox=function(e){I.UILightBox.open(this,e,this.state.elements)},t.prototype.deleteFile=function(e,t){var o=this;return this.dataProvider.fileRemove(this.state.currentPath,e,t).then((function(t){o.status(t||o.i18n('File "%s" was deleted',e),!0)})).catch(this.status)},t.prototype.initUploader=function(){var e=this,t=this,o=(0,a.ConfigProto)(t.o.uploader||{},p.Config.defaultOptions.uploader),n=function(){return e.loadingManager.loadItems()};t.uploader=t.getInstance("Uploader",o),t.uploader.bind(t.panel.container,n,t.status),t.e.on("bindUploader.filebrowser",(function(e){t.uploader.bind(e,n,t.status)}))},t.prototype.destruct=function(){this.removeGlobalListeners(),this.header.destruct(),this.panel.destruct(),e.prototype.destruct.call(this)},t.prototype.fullFillOptions=function(){var e=this;["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach((function(t){null!=e.options[t]&&(e.options[t]=(0,a.ConfigProto)(e.options[t],e.o.ajax))}))},n.__decorate([c.autobind],t.prototype,"status",null),n.__decorate([(0,c.watch)(":resize",window)],t.prototype,"onResizeWindow",null),n.__decorate([(0,c.watch)(["state.currentPath","state.currentSource"])],t.prototype,"onChangePath",null),n.__decorate([(0,c.watch)("state.theme")],t.prototype,"onChangeTheme",null),n.__decorate([(0,c.watch)(":toggleSettings.filebrowser")],t.prototype,"onToggleSettings",null),n.__decorate([c.autobind],t.prototype,"onKeyPress",null),n.__decorate([c.autobind],t.prototype,"removeGlobalListeners",null),n.__decorate([(0,c.watch)(":fileRemove.filebrowser")],t.prototype,"onFileRemove",null),n.__decorate([(0,c.watch)(":edit.filebrowser")],t.prototype,"onFileEdit",null),n.__decorate([(0,c.watch)(":folderRename.filebrowser")],t.prototype,"onFolderRename",null),n.__decorate([(0,c.watch)(":folderRemove.filebrowser")],t.prototype,"onFolderRemove",null),n.__decorate([(0,c.watch)(":folderCreate.filebrowser")],t.prototype,"onFolderCreate",null),n.__decorate([(0,c.watch)(":fileRename.filebrowser")],t.prototype,"onFileRename",null),n.__decorate([(0,c.watch)(":select.filebrowser")],t.prototype,"onChooseItems",null),n.__decorate([(0,c.watch)(":openLightBox.filebrowser")],t.prototype,"onOpenLightBox",null),n.__decorate([c.component],t)}(i.Dialog);t.FileBrowserPro=C,w.Jodit.modules.FileBrowserPro=C},753:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(152);(0,o(243).extendLang)(o(754));var r=n.Config.prototype.controls.filebrowser;r.settings={icon:"settings",exec:function(e){e.e.fire("toggleSettings.filebrowser")}},r.home={icon:"home",exec:function(e){e.e.fire("goHome.filebrowser")}},r.preview={icon:"eye",isDisabled:function(e){return 0===e.state.activeElements.length},exec:function(e){e.e.fire("togglePreview.filebrowser")}},r.next={icon:"angle-right",isDisabled:function(e){return!e.historyManager.canNext()},exec:function(e){e.historyManager.next()}},r.previous={icon:"angle-left",isDisabled:function(e){return!e.historyManager.canPrevious()},exec:function(e){e.historyManager.previous()}},Object.assign(n.Config.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.preview","about"],sort:!1,pixelOffsetLoadNewChunk:200,width:750,height:400,previewOfficeURL:"https://view.officeapps.live.com/op/view.aspx?src="})},706:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finder=void 0;var n=o(1),r=o(371),i=o(707),s=o(2);o(753);var a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.requires=["license"],t.hasStyle=!s.Jodit.fatMode,t}return n.__extends(t,e),t.prototype.afterInit=function(e){var t=this;e.e.on("getInstanceFileBrowser",(function(e){return t.__instance||(t.__instance=new i.FileBrowserPro(e)),t.__instance}))},t.prototype.beforeDestruct=function(e){var t;e.e.off("getInstanceFileBrowser"),null===(t=this.__instance)||void 0===t||t.destruct()},t}(r.Plugin);t.finder=a,s.Jodit.plugins.add("finder",a)},748:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuManager=void 0;var n=o(1),r=o(379),i=o(241),s=o(237),a=o(388),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.className=function(){return"ContextMenuManager"},t.prototype.onFolderContext=function(e,t){return this.buildContextItemMenu(this.getFolderContextActions(e),t),!1},t.prototype.onItemContext=function(e,t,o){return this.buildContextItemMenu(this.getItemContextActions(e),o),!1},t.prototype.onSourceContext=function(e,t){return this.buildContextItemMenu(this.getSourceContextActions(e),t),!1},t.prototype.buildContextItemMenu=function(e,t){if(this.j.o.contextMenu){var o=(0,r.makeContextMenu)(this.j).setMod("theme",this.j.state.theme);o.show(t.clientX,t.clientY,e.filter((function(e){return e&&!1!==e.enabled}))),this.j.e.on(this.j,"afterClose",(function(){o.isOpened&&o.close()}))}},t.prototype.getItemContextActions=function(e){var t=this;if(this.j.stateManager.isActive(e)||this.j.stateManager.addActive(e,this.j.state.activeElements.length>1),"folder"===e.type)return this.getFolderContextActions({type:"directory",children:[],name:e.name||"",path:e.path,sourceName:e.sourceName});var o=this.j.options,n=this.j.dataProvider,r=1===this.j.state.activeElements.length;return[{icon:"pencil",title:"Edit",enabled:Boolean(e.isImage)&&o.editImage&&r&&(n.canI("ImageResize")||n.canI("ImageCrop")),exec:function(){a.openImageEditor.call(t.j,e.imageURL,e.name||"",t.j.state.currentPath,t.j.state.currentSource)}},{icon:"italic",title:"Rename",enabled:n.canI("FileRename")&&r,exec:function(){return t.j.e.fire("fileRename.filebrowser",e)}},{icon:"bin",title:"Delete",enabled:n.canI("FileRemove"),exec:function(){return t.j.e.fire("fileRemove.filebrowser",e)}},{icon:"eye",title:"Preview",enabled:Boolean(e.isImage||"file"===e.type)&&o.preview&&r,exec:function(){return t.j.e.fire("openLightBox.filebrowser",e)}},{icon:"upload",title:"Download",exec:function(){e.fileURL&&t.j.ow.open(e.fileURL)}}]},t.prototype.getFolderContextActions=function(e){var t=this,o=this.j.dataProvider;return[{icon:"pencil",title:"Rename",exec:function(){t.j.e.fire("folderRename.filebrowser",e)},enabled:o.canI("FolderRename")},{icon:"bin",title:"Delete",exec:function(){t.j.e.fire("folderRemove.filebrowser",e)},enabled:o.canI("FolderRemove")},{icon:"plus",title:"Add folder",exec:function(){t.j.e.fire("folderCreate.filebrowser",e)},enabled:o.canI("FolderCreate")}]},t.prototype.getSourceContextActions=function(e){var t=this;return[{icon:"plus",title:"Create folder",exec:function(){t.j.e.fire("folderCreate.filebrowser",e)}}]},n.__decorate([(0,s.watch)(":contextmenuFolder.filebrowser")],t.prototype,"onFolderContext",null),n.__decorate([(0,s.watch)(":contextmenuItem.filebrowser")],t.prototype,"onItemContext",null),n.__decorate([(0,s.watch)(":contextmenuSource.filebrowser")],t.prototype,"onSourceContext",null),n.__decorate([s.component],t)}(i.ViewComponent);t.ContextMenuManager=c},749:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parentPath=void 0,t.parentPath=function(e){var t=e.split("/").filter((function(e){return e.length}));return t.pop(),t.join("/")||"/"}},747:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryManager=void 0;var n=o(1),r=o(191),i=o(241),s=o(237),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.history=[],n.historyIndex=0,n}return n.__extends(t,e),t.prototype.className=function(){return"HistoryManager"},t.prototype.canNext=function(){return this.history.length-1>this.historyIndex},t.prototype.canPrevious=function(){return this.historyIndex>0},t.prototype.push=function(e){var t=this.historyIndex,o=this.history[t];if(!o||o.currentSource!==e.currentSource||o.currentPath!==e.currentPath){var r=n.__spreadArray([],n.__read(this.history),!1);r.length-1!==t&&(r=r.slice(0,t+1)),r.push(e),o&&(t+=1),this.history=r,this.historyIndex=t}},t.prototype.next=function(){this.canNext()&&(this.historyIndex+=1,this.updateState())},t.prototype.previous=function(){this.canPrevious()&&(this.historyIndex-=1,this.updateState())},t.prototype.updateCurrent=function(){this.history[this.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:(0,r.fastClone)(this.state.tree),elements:n.__spreadArray([],n.__read(this.state.elements),!1)}},t.prototype.onHome=function(){this.state.currentPath="",this.state.currentSource="",this.j.e.fire("afterOpenFolder.filebrowser update.filebrowser")},t.prototype.onOpenFolder=function(){this.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),this.j.e.fire("changeSelection")},t.prototype.updateState=function(){var e=this.history[this.historyIndex],t=e.tree,o=e.elements,r=e.currentSource,i=e.currentPath;this.state.activeElements=[],this.state.elements=n.__spreadArray([],n.__read(o),!1),this.state.tree=n.__spreadArray([],n.__read(t),!1),this.state.currentSource=r,this.state.currentPath=i,this.j.e.fire("changeSelection")},n.__decorate([(0,s.watch)(["state.elements","state.tree"])],t.prototype,"updateCurrent",null),n.__decorate([(0,s.watch)(":goHome.filebrowser")],t.prototype,"onHome",null),n.__decorate([(0,s.watch)(":afterOpenFolder.filebrowser")],t.prototype,"onOpenFolder",null),n.__decorate([s.component],t)}(i.ViewComponent);t.HistoryManager=a},752:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoadingManager=void 0;var n=o(1),r=o(241),i=o(237),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.offset=0,n.countInOneChunk=20,n.stopLoadingParts=!1,n}return n.__extends(t,e),t.prototype.className=function(){return"LoadingManager"},t.prototype.onUpdateFileBrowser=function(){return n.__awaiter(this,void 0,Promise,(function(){return n.__generator(this,(function(e){switch(e.label){case 0:return this.j.state.activeElements=[],this.j.panel.setMod("loading",!0),[4,Promise.all([this.loadFolders(),this.loadItems()])];case 1:return e.sent(),this.j.panel.setMod("loading",!1),[2]}}))}))},t.prototype.loadFolders=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t,o,r,i;return n.__generator(this,(function(n){switch(n.label){case 0:if(!this.j.isOpened)return[2];t=(e=this.j.state).currentPath,o=e.currentSource,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.j.dataProvider.tree(t,o)];case 2:return r=n.sent(),this.j.stateManager.fillSources(r,t),this.j.state.sources=r,[3,4];case 3:return i=n.sent(),this.j.status(i),[3,4];case 4:return[2]}}))}))},t.prototype.loadItems=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t;return n.__generator(this,(function(o){switch(o.label){case 0:if(!this.j.isOpened)return[2];o.label=1;case 1:return o.trys.push([1,6,,7]),this.offset=0,this.stopLoadingParts=!1,e=this.j.state,[4,this.loadPartItems()];case 2:e.elements=o.sent(),this.stopLoadingParts=this.countInOneChunk>this.j.state.elements.length,o.label=3;case 3:return this.stopLoadingParts||this.j.state.elements.length>this.j.panel.countInColumn*this.j.panel.countInRow?[3,5]:[4,this.loadItemsChunk()];case 4:return o.sent(),[3,3];case 5:return[3,7];case 6:return t=o.sent(),this.j.status(t),[3,7];case 7:return[2]}}))}))},t.prototype.loadItemsChunk=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t;return n.__generator(this,(function(o){switch(o.label){case 0:if(this.stopLoadingParts)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),this.offset+=this.countInOneChunk,[4,this.loadPartItems()];case 2:return e=o.sent(),this.stopLoadingParts=this.countInOneChunk>e.length,e.length&&(this.j.state.elements=this.j.state.elements.concat(e)),[3,4];case 3:return t=o.sent(),this.j.status(t),[3,4];case 4:return[2]}}))}))},t.prototype.loadPartItems=function(){var e=this.j.state;return this.j.dataProvider.items(e.currentPath,e.currentSource,{offset:this.offset,limit:this.countInOneChunk,sortBy:e.sortBy,withFolders:e.withFolders,foldersPosition:e.foldersPosition,onlyImages:e.onlyImages,filterWord:e.filterWord})},n.__decorate([(0,i.watch)(":update.filebrowser")],t.prototype,"onUpdateFileBrowser",null),n.__decorate([(0,i.watch)(["state.currentPath","state.currentSource"]),(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadFolders",null),n.__decorate([(0,i.watch)(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItems",null),n.__decorate([(0,i.debounce)((function(e){return{timeout:e.defaultTimeout,promisify:!0}}))],t.prototype,"loadItemsChunk",null),n.__decorate([i.component],t)}(r.ViewComponent);t.LoadingManager=s},746:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PersistentStore=void 0;var n=o(1),r=o(241),i=o(237),s=o(381),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.sortBy="changed-desc",n.view="tiles",n.foldersPosition="top",n.tileSize="default",n.favorites=[],n.showSideBar=!0,n.showPreview=!1,n.showFavorites=!0,n}return n.__extends(t,e),t.prototype.className=function(){return"PersistentStore"},t.prototype.onChangeThemeSetField=function(){this.theme=this.state.theme},t.prototype.onChangeView=function(){this.view=this.state.view},t.prototype.onChangeSortBy=function(){this.sortBy=this.state.sortBy},t.prototype.onChangeTileSize=function(){this.tileSize=this.state.tileSize},t.prototype.onChangeFavorites=function(){this.favorites=this.state.favorites},t.prototype.onChangeShowSideBar=function(){this.showSideBar=this.state.showSideBar},t.prototype.onChangeShowPreview=function(){this.showPreview=this.state.showPreview},t.prototype.onChangeShowFavorites=function(){this.showFavorites=this.state.showFavorites},t.prototype.onChangeFoldersPosition=function(){this.foldersPosition=this.state.foldersPosition},t.prototype.syncWithState=function(){this.state.tileSize=this.tileSize,this.state.favorites=this.favorites.map((function(e){return e instanceof s.FileBrowserItem?e:s.FileBrowserItem.create(e)})),this.state.view=this.view,this.state.theme=this.theme,this.state.showSideBar=this.showSideBar,this.state.showPreview=this.showPreview,this.state.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition},n.__decorate([i.persistent],t.prototype,"theme",void 0),n.__decorate([i.persistent],t.prototype,"sortBy",void 0),n.__decorate([i.persistent],t.prototype,"view",void 0),n.__decorate([i.persistent],t.prototype,"foldersPosition",void 0),n.__decorate([i.persistent],t.prototype,"tileSize",void 0),n.__decorate([i.persistent],t.prototype,"favorites",void 0),n.__decorate([i.persistent],t.prototype,"showSideBar",void 0),n.__decorate([i.persistent],t.prototype,"showPreview",void 0),n.__decorate([i.persistent],t.prototype,"showFavorites",void 0),n.__decorate([(0,i.watch)("state.theme")],t.prototype,"onChangeThemeSetField",null),n.__decorate([(0,i.watch)("state.view")],t.prototype,"onChangeView",null),n.__decorate([(0,i.watch)("state.sortBy")],t.prototype,"onChangeSortBy",null),n.__decorate([(0,i.watch)("state.tileSize")],t.prototype,"onChangeTileSize",null),n.__decorate([(0,i.watch)("state.favorites")],t.prototype,"onChangeFavorites",null),n.__decorate([(0,i.watch)("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),n.__decorate([(0,i.watch)("state.showPreview")],t.prototype,"onChangeShowPreview",null),n.__decorate([(0,i.watch)("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),n.__decorate([(0,i.watch)("state.foldersPosition")],t.prototype,"onChangeFoldersPosition",null),n.__decorate([i.component],t)}(r.ViewComponent);t.PersistentStore=a},741:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateManager=void 0;var n=o(1),r=o(237),i=function(){function e(e){this.state=e}return e.prototype.getIndex=function(e,t){return void 0===t&&(t=this.state.elements),t.findIndex((function(t){return t.uniqueHashKey===e.uniqueHashKey}))},e.prototype.isActive=function(e){return Boolean(this.state.activeElements.find((function(t){return t.uniqueHashKey===e.uniqueHashKey})))},e.prototype.isFavorite=function(e){return Boolean(this.state.favorites.find((function(t){return t.uniqueHashKey===e.uniqueHashKey})))},e.prototype.addActive=function(e,t){var o;this.state.metaInfo=e,this.state.info=null!==(o=e.file)&&void 0!==o?o:"",this.state.lastSelectedIndex=this.getIndex(e),this.state.activeElements=t?n.__spreadArray(n.__spreadArray([],n.__read(this.state.activeElements),!1),[e],!1):[e]},e.prototype.callSelectHandler=function(){var e,t=this.state.activeElements;null===(e=this.state.onSelectCallBack)||void 0===e||e.call(this,{baseurl:"",files:t.map((function(e){return e.fileURL})),isImages:t.map((function(e){return Boolean(e.isImage)}))})},e.prototype.setFilter=function(e){this.state.filterWord=e},e.prototype.addMessage=function(e){var t,o=this.state.messages;(null===(t=o[o.length-1])||void 0===t?void 0:t.message)!==e.message&&(this.state.messages=n.__spreadArray(n.__spreadArray([],n.__read(o),!1),[e],!1))},e.prototype.removeMessage=function(e){var t=this.state.messages.indexOf(e);if(-1!==t){var o=n.__spreadArray([],n.__read(this.state.messages),!1);o.splice(t,1),this.state.messages=o}},e.prototype.toggleFavorite=function(e){var t=this.getIndex(e,this.state.favorites),o=n.__spreadArray([],n.__read(this.state.favorites),!1);-1===t?o.push(e):o.splice(t,1),this.state.favorites=o},e.prototype.fillSources=function(e,t){var o=this,n=function(e){return e.filter((function(e){return"."!==e&&".."!==e}))};if(this.state.tree.length&&t){var r=function(e,t){var o;return null!==(o=e.find((function(e){return e.name===t})))&&void 0!==o?o:null};this.removeActive(this.state.tree),e.forEach((function(e){var i=r(o.state.tree,e.name);if(i){i.isActive=!0;var s=t.split("/").reduce((function(e,t){return e&&r(e.children,t)}),i);s&&(s.isActive=!0,s.children=n(e.folders).map((function(o){return{type:"directory",name:o,path:t+"/"+o,sourceName:e.name,children:[]}})))}}))}else this.state.tree=e.map((function(e){return{type:"source",name:e.name,title:e.title,sourceName:e.name,path:"/",children:n(e.folders).map((function(t){return{type:"directory",name:t,path:t,sourceName:e.name,children:[]}}))}}))},e.prototype.removeActive=function(e){var t=this;e.forEach((function(e){e.isActive=!1,t.removeActive(e.children)}))},Object.defineProperty(e.prototype,"isFavoriteItems",{get:function(){return this.state.favorites===this.state.elements},enumerable:!1,configurable:!0}),n.__decorate([r.autobind],e.prototype,"getIndex",null),n.__decorate([r.autobind],e.prototype,"isActive",null),n.__decorate([r.autobind],e.prototype,"isFavorite",null),e}();t.StateManager=i},754:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ru=void 0;var n=o(755);t.ru=n},709:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(341),r=o(710),i=o(711);n.Icon.set("heart",String(r)),n.Icon.set("home",String(i))},735:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserFolder=void 0;var n=o(1);o(736);var r=o(341),i=o(237),s=o(191),a=function(e){function t(t,o){var n=e.call(this,t)||this;n.item=o,n.syncMod=!0;var r=n.getElm("name");return(0,s.assert)(null!=r,"name element does not exists"),r.innerText=o.name,t.e.on(n.container,"click",(function(){return n.getMod("active")||n.setMod("loading",!0),t.e.fire("openFolder",o)})).on(n.container,"contextmenu",(function(e){return t.e.fire("contextmenuFolder.filebrowser",o,e)})),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserFolder"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="&__icon">\n\t\t\t\t<div class=\'&__loader\'></div>\n\t\t\t\t<div class="&__icon-wrapper">\n\t\t\t\t\t*folder*\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__arrow">*angle-right*</div>\n\t\t</div>'},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserFolder=a},742:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserHeader=void 0;var n=o(1);o(743);var r=o(341),i=o(237),s=o(338),a=function(e){function t(t,o,n){var i,a=this;return(a=e.call(this,t)||this).options=o,a.stateManager=n,a.syncMod=!0,a.toolbar=(0,s.makeCollection)(a.j),a.filter=new r.UIInput(a.j,{icon:"search",placeholder:"Filter",clearButton:!0,onChange:function(e){a.stateManager.setFilter(e)}}),a.append(a.toolbar).append(a.filter),a.filter.container.classList.add(a.getFullElName("filter")),a.toolbar.setMod("mode","header").build(null!==(i=a.options.toolbarButtons)&&void 0!==i?i:[]),a}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserHeader"},n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserHeader=a},716:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserItem=void 0;var n=o(1);o(717);var r=o(341),i=o(237),s=o(381),a=o(154),c=o(191),l=o(191),u=function(e){function t(t,o){var n=e.call(this,t)||this;return n.item=s.FileBrowserItem.create(o),t.e.on(n.container,"click contextmenu dblclick",(function(e){return t.e.fire(e.type+"Item.filebrowser",n.item,(0,c.ctrlKey)(e)||e.shiftKey,e),!1})),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserItem"},t.prototype.render=function(){return"<div tabindex='-1'>\n\t\t\t<div class='&__image'></div>\n\t\t\t<div class='&__info'></div>\n\t\t\t<div class='&__heart'>*heart*</div>\n\t\t</div>"},t.prototype.onClickFavorite=function(){var e=this;return this.bubble((function(t){e.jodit.e.fire(t,"toggleFavoriteItem",e.item)})),!1},t.prototype.onAction=function(e){return this.jodit.e.fire(e.type+"Item.filebrowser",this.item,(0,c.ctrlKey)(e)||e.shiftKey,e),!1},t.prototype.update=function(){var t,o=this.getElm("image");(0,l.assert)(null!=o,"image element does not exists"),(0,c.css)(o,"backgroundImage","url(".concat(this.item.imageURL,")")),this.setMod("is-file",!1===this.item.isImage).setMod("type",null!==(t=this.item.type)&&void 0!==t?t:"file").setElementValue("name",this.item.file).setElementValue("time",this.item.time).setElementValue("filesize",this.item.size),(0,c.attr)(this.container,"title","".concat(this.item.file," ").concat(this.item.time," ").concat(this.item.size)),e.prototype.update.call(this)},t.prototype.setElementValue=function(e,t){var o=this.getFullElName(e),n=this.getElm(e);if(!t)return n&&a.Dom.safeRemove(n),this;if(!n){var r=this.getElm("info");(0,l.assert)(null!=r,"wrapper element does not exist"),n=this.j.create.div(o),r.appendChild(n)}return n.innerText=t,this},n.__decorate([(0,i.watch)("heart:click")],t.prototype,"onClickFavorite",null),n.__decorate([(0,i.watch)(["container:click","container:contextmenu","container:dblclick"])],t.prototype,"onAction",null),n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserItem=u},750:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UILightBox=void 0;var n=o(1);o(751);var r=o(154),i=o(237),s=o(191),a=o(153),c=o(191),l=function(e){function t(t,o,n){var i=e.call(this,t)||this;i.current=o,i.elements=n,i.dialog=new r.Dialog;var s=i.dialog;return s.setMod("theme",t.state.theme).toolbar.setMod("mode","header"),s.open(i),i.elements=i.elements.filter((function(e){return e.isImage})),s.e.on(s,"afterClose",(function(){i.destruct()})),i.addGlobalListeners(),i.onChangeCurrent(),s.toolbar.build([{icon:"check",exec:function(){t.stateManager.addActive(i.current,!1),t.e.fire("select.filebrowser"),s.close()}},"dialog.close"]),i}var o;return n.__extends(t,e),o=t,t.prototype.className=function(){return"UILightBox"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__previous'>*angle-left*</div>\n\t\t\t<div class='&__preview'></div>\n\t\t\t<div class='&__loader'></div>\n\t\t\t<div class='&__next'>*angle-right*</div>\n\t\t</div>"},t.prototype.onChangeCurrent=function(){return n.__awaiter(this,void 0,Promise,(function(){var e,t,o,i;return n.__generator(this,(function(n){switch(n.label){case 0:return e=this.current,this.setMod("loading",!0),t=this.getElm("preview"),(0,c.assert)(null!=t,"preview element does not exist"),r.Dom.detach(t),(0,s.css)(t,{backgroundImage:null}),e.isImage?[4,(0,s.loadImage)(e.fileURL,this.j)]:[3,2];case 1:return o=n.sent(),this.dialog.setPosition(),(0,s.css)(t,{width:Math.min(this.jodit.ow.innerWidth,o.naturalWidth),height:Math.min(this.jodit.ow.innerHeight-100,o.naturalHeight),backgroundImage:"url(".concat(o.src,")")}),[3,4];case 2:return[4,this.makeIframe(e.fileURL)];case 3:i=n.sent(),t.appendChild(i),n.label=4;case 4:return this.dialog.setSize(),this.dialog.setPosition(),this.setMod("loading",!1),[2]}}))}))},t.prototype.makeIframe=function(e){var t=this.j.c.element("iframe");return t.classList.add(this.getFullElName("office-iframe")),t.src=/\.pdf/.test(e)?e:this.j.o.previewOfficeURL+encodeURIComponent(e),t},t.prototype.onPreviousClick=function(){var e=this.j.stateManager.getIndex(this.current,this.elements);e>0?e-=1:e=this.elements.length-1,this.current=this.elements[e]},t.prototype.onNextClick=function(){var e=this.j.stateManager.getIndex(this.current,this.elements);this.elements.length-1>e?e+=1:e=0,this.current=this.elements[e]},t.open=function(e,t,n){return new o(e,t,n)},t.prototype.addGlobalListeners=function(){this.j.e.on(this.j.od,"keydown",this.onKeyPress)},t.prototype.onKeyPress=function(e){if(e.key===a.KEY_LEFT||e.key===a.KEY_RIGHT||e.key===a.KEY_SPACE)return e.key===a.KEY_LEFT?this.onPreviousClick():this.onNextClick(),!1},t.prototype.removeGlobalListeners=function(){this.j.e.off(this.j.od,"keydown",this.onKeyPress)},t.prototype.destruct=function(){return this.removeGlobalListeners(),this.dialog.destruct(),e.prototype.destruct.call(this)},n.__decorate([(0,i.watch)("current")],t.prototype,"onChangeCurrent",null),n.__decorate([(0,i.watch)("previous:click")],t.prototype,"onPreviousClick",null),n.__decorate([(0,i.watch)("next:click")],t.prototype,"onNextClick",null),n.__decorate([i.autobind],t.prototype,"onKeyPress",null),o=n.__decorate([i.component],t)}(r.UIElement);t.UILightBox=l},722:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessage=void 0;var n=o(1),r=o(341),i=o(237),s=o(191),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.container.innerText=(0,s.isString)(o)?o:o.message,n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserMessage"},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserMessage=a},720:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserMessages=void 0;var n=o(1);o(721);var r=o(341),i=o(237),s=o(722),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserMessages"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){var o=new s.UIBrowserMessage(t.jodit,e.message);o.setMod("type",e.type),t.append(o)}))},n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserMessages=a},712:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserPanel=void 0;var n=o(1);o(713);var r=o(341),i=o(714),s=o(720),a=o(237),c=o(723),l=o(727),u=o(191),h=o(729),d=o(737),p=o(739),f=function(e){function t(t,o){var n=e.call(this,t)||this;return n.stateManager=o,n.syncMod=!0,n.sources=new h.UIBrowserSources(n.j),n.sidebar=new c.UISidebar(n.jodit,[n.sources],n.stateManager.state),n.preview=new p.UIPreview(n.jodit,n.stateManager.state),n.statusbar=new d.UIBrowserStatusBar(n.j),n.items=new i.UIVirtualScroll(n.j,n.stateManager),n.settings=new l.UIBrowserSettings(n.jodit,n.stateManager.state),n.messages=new s.UIBrowserMessages(n.j),n.state=o.state,n.append(n.sidebar,"content"),n.append(n.items,"content"),n.append(n.messages,"footer"),n.append(n.settings,"content"),n.append(n.preview,"content"),n.append(n.statusbar,"footer"),n.onChangeElements(),n.onChangeSources(),n.onChangeView(),n.onChangeTileSize(),n.onChangeShowFavorites(),n.onChangeMessages(),n.onChangeActiveElements(),n.onChangeFavorites(),n.onChangeShowSideBar(),n.onChangeShowSettings(),n.onChangeShowPreview(),n.onChangeTheme(),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserPanel"},Object.defineProperty(t.prototype,"countInRow",{get:function(){if("list"===this.state.view)return 1;var e=this.items.elements[0].container,t=(0,u.css)(e,"marginLeft");return Math.floor(this.items.container.offsetWidth/(e.offsetWidth+((0,u.isNumber)(t)?t:0)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"countInColumn",{get:function(){var e=this.items.elements[0].container,t=(0,u.css)(e,"marginTop");return Math.floor(this.items.container.offsetHeight/(e.offsetHeight+((0,u.isNumber)(t)?t:0)))},enumerable:!1,configurable:!0}),t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__content'></div>\n\t\t\t<div class='&__footer'></div>\n\t\t</div>"},t.prototype.onChangeTheme=function(){this.setMod("theme",this.stateManager.state.theme)},t.prototype.onChangeElements=function(){this.items.build(this.stateManager.state.elements)},t.prototype.onChangeActiveElements=function(){var e=this;this.state.activeElements.length||(this.state.info="",this.state.metaInfo=null),this.items.elements.forEach((function(t){t.setMod("active",Boolean(e.stateManager.isActive(t.item)))})),this.j.e.fire("changeSelection")},t.prototype.onChangeFavorites=function(){var e=this;this.items.elements.forEach((function(t){t.setMod("favorite",Boolean(e.stateManager.isFavorite(t.item)))}))},t.prototype.onChangeSources=function(){this.sources.build(this.stateManager.state.tree)},t.prototype.onChangeLastSelectedIndex=function(){var e,t=null===(e=this.items.elements[this.stateManager.state.lastSelectedIndex])||void 0===e?void 0:e.container;t&&((0,u.scrollIntoViewIfNeeded)(t,this.items.container,this.j.od),t.focus())},t.prototype.onChangeInfo=function(){this.statusbar.value(this.state.info,"center")},t.prototype.onChangePathOrSource=function(){this.statusbar.value(this.state.currentPath?"".concat(this.state.currentPath," (").concat(this.state.currentSource,")"):this.i18n("Home"),"left")},t.prototype.onChangeShowSettings=function(){this.settings.setMod("hidden",!this.stateManager.state.showSettings)},t.prototype.onChangeShowPreview=function(){this.preview.setMod("hidden",!this.stateManager.state.showPreview)},t.prototype.onChangeShowSideBar=function(){this.sidebar.setMod("hidden",!this.stateManager.state.showSideBar)},t.prototype.onChangeView=function(){this.items.setMod("view",this.stateManager.state.view)},t.prototype.onChangeTileSize=function(){this.items.setMod("size",this.stateManager.state.tileSize)},t.prototype.onChangeShowFavorites=function(){this.sidebar.setMod("show-favorites",this.stateManager.state.showFavorites),this.items.setMod("show-favorites",this.stateManager.state.showFavorites)},t.prototype.onChangeMessages=function(){this.messages.build(this.stateManager.state.messages)},t.prototype.onItemDblClick=function(){return this.j.e.fire("select.filebrowser"),!1},t.prototype.onItemClick=function(e,t){this.stateManager.addActive(e,t)},t.prototype.onTogglePreview=function(){return this.state.showPreview=!this.state.showPreview,!1},t.prototype.onToggleFavoriteItem=function(e){this.stateManager.toggleFavorite(e)},t.prototype.onFolderClick=function(e){this.stateManager.state.currentSource=e.sourceName,this.stateManager.state.currentPath=e.path||"/",this.j.e.fire("afterOpenFolder.filebrowser")},n.__decorate([(0,a.watch)("state.theme")],t.prototype,"onChangeTheme",null),n.__decorate([(0,a.watch)("state.elements")],t.prototype,"onChangeElements",null),n.__decorate([(0,a.watch)("state.activeElements")],t.prototype,"onChangeActiveElements",null),n.__decorate([(0,a.watch)(["state.favorites","state.elements"])],t.prototype,"onChangeFavorites",null),n.__decorate([(0,a.watch)("state.sources")],t.prototype,"onChangeSources",null),n.__decorate([(0,a.watch)("state.lastSelectedIndex")],t.prototype,"onChangeLastSelectedIndex",null),n.__decorate([(0,a.watch)("state.info")],t.prototype,"onChangeInfo",null),n.__decorate([(0,a.watch)(["state.currentPath","state.currentSource"])],t.prototype,"onChangePathOrSource",null),n.__decorate([(0,a.watch)("state.showSettings")],t.prototype,"onChangeShowSettings",null),n.__decorate([(0,a.watch)("state.showPreview")],t.prototype,"onChangeShowPreview",null),n.__decorate([(0,a.watch)("state.showSideBar")],t.prototype,"onChangeShowSideBar",null),n.__decorate([(0,a.watch)("state.view")],t.prototype,"onChangeView",null),n.__decorate([(0,a.watch)("state.tileSize")],t.prototype,"onChangeTileSize",null),n.__decorate([(0,a.watch)("state.showFavorites")],t.prototype,"onChangeShowFavorites",null),n.__decorate([(0,a.watch)("state.messages")],t.prototype,"onChangeMessages",null),n.__decorate([(0,a.watch)(":dblclickItem.filebrowser")],t.prototype,"onItemDblClick",null),n.__decorate([(0,a.watch)(":clickItem.filebrowser")],t.prototype,"onItemClick",null),n.__decorate([(0,a.watch)(":togglePreview.filebrowser")],t.prototype,"onTogglePreview",null),n.__decorate([(0,a.watch)(":toggleFavoriteItem")],t.prototype,"onToggleFavoriteItem",null),n.__decorate([(0,a.watch)(":openFolder")],t.prototype,"onFolderClick",null),n.__decorate([a.component],t)}(r.UIGroup);t.UIBrowserPanel=f},739:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIPreview=void 0;var n=o(1);o(740);var r=o(341),i=o(237),s=o(725),a=o(191),c=o(235),l=o(716),u=o(191),h=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.lastLoadPromise=null,n.onChangeMetaInfo(),n}return n.__extends(t,e),t.prototype.className=function(){return"UIPreview"},t.prototype.addResize=function(){s.UIResize.remove(this),s.UIResize.install(this,screen.width>450?"left":"top")},t.prototype.render=function(){return'<div>\n\t\t\t\t<div class="&__image"></div>\n\t\t\t\t<div class="&__info"></div>\n\t\t\t\t<div class="&__loader"></div>\n\t\t\t\t<div class="&__empty-message">~Select image~</div>\n\t\t\t</div>'},t.prototype.setMod=function(t,o){return e.prototype.setMod.call(this,t,o),"hidden"===t&&!1===o&&this.onChangeMetaInfo(),this},t.prototype.onChangeMetaInfo=function(){var e,t,o=this;if(!this.getMod("hidden")){var n=this.state.metaInfo;this.setMod("empty",!n);var r=this.getElm("info");(0,u.assert)(null!=r,"info element does not exists"),c.Dom.detach(r);var i=this.getElm("image");(0,u.assert)(null!=i,"image element does not exists"),(0,a.css)(i,{backgroundImage:null}),n&&(this.setMod("is-file",!1===n.isImage).setMod("type",null!==(e=n.type)&&void 0!==e?e:"file"),l.UIBrowserItem.prototype.setElementValue.call(this,"name",n.file),l.UIBrowserItem.prototype.setElementValue.call(this,"time",n.time),l.UIBrowserItem.prototype.setElementValue.call(this,"filesize",n.size),this.setMod("loading",!0),null===(t=this.lastLoadPromise)||void 0===t||t.rejectCallback(),this.lastLoadPromise=(0,a.loadImage)(n.isImage?n.fileURL:n.imageURL,this.j),this.lastLoadPromise.then((function(e){var t=o.getElm("image");(0,u.assert)(null!=t,"image element does not exist"),e&&(0,a.css)(t,{backgroundImage:"url(".concat(e.src,")")})})).finally((function(){o.setMod("loading",!1)})).catch((function(){})))}},n.__decorate([(0,i.hook)("ready"),(0,i.watch)(":resize",window),(0,i.debounce)()],t.prototype,"addResize",null),n.__decorate([(0,i.watch)("state.metaInfo")],t.prototype,"onChangeMetaInfo",null),n.__decorate([i.component],t)}(r.UIGroup);t.UIPreview=h},744:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIProgress=void 0;var n=o(1);o(745);var r=o(341),i=o(237),s=function(e){function t(t,o){var n=e.call(this,t)||this;return n.state=o,n.onProgress(),n}return n.__extends(t,e),t.prototype.className=function(){return"UIProgress"},t.prototype.onProgress=function(){this.state.progress?this.show():this.hide(),this.progress(this.state.progress)},t.prototype.hide=function(){return this.setMod("hidden",!0),this},t.prototype.progress=function(e){var t=this;return this.container.style.width=e.toFixed(2)+"%",98>e||this.j.async.setTimeout((function(){t.hide()}),{label:"progress",timeout:300}),this},t.prototype.show=function(){return this.setMod("hidden",!1),this},n.__decorate([(0,i.watch)("state.progress")],t.prototype,"onProgress",null),n.__decorate([i.component],t)}(r.ProgressBar);t.UIProgress=s},727:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSettings=void 0;var n=o(1);o(728);var r=o(341),i=o(237),s=o(191),a=function(e){function t(t,o){var n=e.call(this,t)||this;n.state=o;var r=n.getElm("close");return(0,s.assert)(null!=r,"close element does not exists"),t.e.on(r,"click",(function(){n.state.showSettings=!1})),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserSettings"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="'.concat(this.getFullElName("close"),'">').concat(r.Icon.get("cancel"),'</div>\n\t\t\t<div class="').concat(this.getFullElName("title"),'">').concat(this.j.i18n("Settings"),'</div>\n\t\t\t<div class="').concat(this.getFullElName("options"),'"></div>\n\t\t</div>')},t.prototype.appendChildToContainer=function(e){var t=this.getElm("options");(0,s.assert)(null!=t,"options element does not exists"),t.appendChild(e)},t.prototype.setMod=function(t,o){return"hidden"===t&&!1===o&&this.generateSettings(),e.prototype.setMod.call(this,t,o)},t.prototype.onChangeView=function(){var e=this.getElm("tile-size");e&&(e.style.display="tiles"===this.state.view?"block":"none")},t.prototype.generateSettings=function(){var e=this;this.clear();var t=this.j;this.append([new r.UIButtonGroup(t,{label:"Theme",name:"theme",value:this.state.theme,radio:!0,options:[{value:"default",text:"Light"},{value:"dark",text:"Dark"}],onChange:function(t){e.state.theme=t[0].value}}),new r.UIButtonGroup(t,{label:"Show favorites",name:"showFavorites",value:this.state.showFavorites,radio:!0,options:[{value:!0,text:"Show"},{value:!1,text:"Hide"}],onChange:function(t){e.state.showFavorites=t[0].value}}),new r.UIButtonGroup(t,{label:"View",name:"view",value:this.state.view,radio:!0,options:[{value:"tiles",text:"Tiles"},{value:"list",text:"List"},{value:"compact",text:"Compact"}],onChange:function(t){e.state.view=t[0].value}}),new r.UIButtonGroup(t,{label:"Folders position",name:"foldersPosition",value:this.state.foldersPosition,radio:!0,options:[{value:"top",text:"Top"},{value:"bottom",text:"Bottom"},{value:"default",text:"Default"}],onChange:function(t){e.state.foldersPosition=t[0].value}}),new r.UISelect(t,{label:"Sort by",name:"sort-by",value:this.state.sortBy,options:[{value:"changed-asc",text:t.i18n("Sort by changed")+"(⬆)"},{value:"changed-desc",text:t.i18n("Sort by changed")+"(⬇)"},{value:"name-asc",text:t.i18n("Sort by name")+"(⬆)"},{value:"name-desc",text:t.i18n("Sort by name")+"(⬇)"},{value:"size-asc",text:t.i18n("Sort by size")+"(⬆)"},{value:"size-desc",text:t.i18n("Sort by size")+"(⬇)"}],onChange:function(t){e.state.sortBy=t}}),new r.UISelect(t,{label:"Tile size",name:"tile-size",value:this.state.tileSize,options:[{value:"xsmall",text:"Extra small"},{value:"small",text:"Small"},{value:"default",text:"Default"},{value:"large",text:"Large"},{value:"xlarge",text:"Extra large"}],onChange:function(t){e.state.tileSize=t}})]),this.onChangeView()},n.__decorate([(0,i.watch)("state.view")],t.prototype,"onChangeView",null),n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserSettings=a},723:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISidebar=void 0;var n=o(1);o(724);var r=o(341),i=o(237),s=o(725),a=o(191),c=function(e){function t(t,o,n){var r=e.call(this,t,o)||this;return r.state=n,r.onChangeFavorites(),r}return n.__extends(t,e),t.prototype.className=function(){return"UISidebar"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__hide-btn'>*angle-left*</div>\n\t\t\t<div class='&__favorites'>*heart* ~Favorites~</div>\n\t\t\t<div class='&__box'></div>\n\t\t</div>"},t.prototype.appendChildToContainer=function(e){var t=this.getElm("box");(0,a.assert)(null!=t,"box element does not exists"),t.appendChild(e)},t.prototype.addResize=function(){s.UIResize.remove(this),s.UIResize.install(this,screen.width>450?"right":"bottom")},t.prototype.onChangeFavorites=function(){this.setMod("has-favorites",Boolean(this.state.favorites.length))},t.prototype.onClickHideButton=function(){return this.state.showSideBar=!this.state.showSideBar,!1},t.prototype.onClickFavorites=function(){return this.state.elements=this.state.favorites,!1},n.__decorate([(0,i.hook)("ready"),(0,i.watch)(":resize",window),(0,i.debounce)()],t.prototype,"addResize",null),n.__decorate([(0,i.watch)("state.favorites")],t.prototype,"onChangeFavorites",null),n.__decorate([(0,i.watch)("hide-btn:click")],t.prototype,"onClickHideButton",null),n.__decorate([(0,i.watch)("favorites:click")],t.prototype,"onClickFavorites",null),n.__decorate([i.component],t)}(r.UIGroup);t.UISidebar=c},731:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSource=void 0;var n=o(1);o(732);var r=o(341),i=o(237),s=o(733),a=o(191),c=function(e){function t(t,o){var n=e.call(this,t,o)||this;n.data=o,n.tree=new s.UITree(n.j,n.data.children),n.syncMod=!0;var r=n.getElm("name");(0,a.assert)(null!=r,"name element does not exists"),r.innerText=o.title||o.name;var i=n.getElm("tree");return(0,a.assert)(null!=i,"tree element does not exists"),i.appendChild(n.tree.container),t.e.on(n.container,"contextmenu",(function(e){return t.e.fire("contextmenuSource.filebrowser",o,e)})),n}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserSource"},t.prototype.render=function(){return'<div>\n\t\t\t<div class="&__name"></div>\n\t\t\t<div class="&__tree"></div>\n\t\t</div>'},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserSource=c},729:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserSources=void 0;var n=o(1);o(730);var r=o(341),i=o(237),s=o(731),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.syncMod=!0,t}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserSources"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){t.append(new s.UIBrowserSource(t.jodit,e))}))},n.__decorate([i.component],t)}(r.UIGroup);t.UIBrowserSources=a},737:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIBrowserStatusBar=void 0;var n=o(1);o(738);var r=o(341),i=o(237),s=o(191),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.className=function(){return"UIBrowserStatusBar"},t.prototype.render=function(){return"<div>\n\t\t\t<div class='&__slot-left'></div>\n\t\t\t<div class='&__slot-center'></div>\n\t\t\t<div class='&__slot-right'></div>\n\t\t</div>"},t.prototype.value=function(e,t){void 0===t&&(t="left");var o=this.getElm("slot-".concat(t));return(0,s.assert)(null!=o,"Slot does not exists"),o.innerText=e,this},n.__decorate([i.component],t)}(r.UIElement);t.UIBrowserStatusBar=a},733:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UITree=void 0;var n=o(1);o(734);var r=o(341),i=o(237),s=o(735),a=function(e){function t(t,o){var n=e.call(this,t)||this;return n.syncMod=!0,n.build(o),n}var o;return n.__extends(t,e),o=t,t.prototype.className=function(){return"UITree"},t.prototype.build=function(e){var t=this;this.clear(),e.forEach((function(e){var n=new s.UIBrowserFolder(t.jodit,e);t.append(n),e.isActive&&n.setMod("active",!0),e.children.length&&t.append(new o(t.jodit,e.children))}))},o=n.__decorate([i.component],t)}(r.UIGroup);t.UITree=a},714:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIVirtualScroll=void 0;var n=o(1);o(715);var r=o(341),i=o(237),s=o(716),a=o(381),c=o(718),l=o(191),u=function(e){function t(t,o){var n=e.call(this,t)||this;return n.stateManager=o,n.syncMod=!0,n.addItemsSelector(),n}var o;return n.__extends(t,e),o=t,t.prototype.className=function(){return"UIVirtualScroll"},t.prototype.render=function(){return"<div>\n\t\t\t\t<div class=\"&__empty-message\">~There are no files~</div>\n\t\t\t\t<div class='&__loader'></div>\n\t\t\t\t<div class='&__drag-area'>~Drop image~</div>\n\t\t\t</div>"},t.prototype.build=function(e){var t=this,o=this.elements.findIndex((function(t,o){return!e[o]||t.item.uniqueHashKey!==a.FileBrowserItem.create(e[o]).uniqueHashKey}));if(o>-1){for(var n=o;this.elements.length>n;n+=1)this.elements[n].destruct();this.elements.length=o}e.slice(o>-1?o:this.elements.length).forEach((function(e){var o=new s.UIBrowserItem(t.jodit,e);Object.keys(t.mods).forEach((function(e){o.setMod(e,t.mods[e])})),t.append(o)})),this.setMod("empty",!this.elements.length)},t.prototype.onScrollLoadChunk=function(){!this.stateManager.isFavoriteItems&&this.j.o.pixelOffsetLoadNewChunk>this.container.scrollHeight-(this.container.scrollTop+this.container.offsetHeight)&&this.j.loadingManager.loadItemsChunk()},t.prototype.onDragOver=function(e){e.preventDefault(),this.setMod("dragover",!0)},t.prototype.onDragLeave=function(e){e.preventDefault(),this.setMod("dragover",!1)},t.prototype.addItemsSelector=function(){c.UISelectItems.install(this)},t.intersectRect=function(e,t){return!(t.left>e.left+e.width||e.left>t.left+t.width||t.top>e.top+e.height||e.top>t.top+t.height)},t.prototype.onSelectItems=function(e){var t=[];this.elements.forEach((function(n){var r=(0,l.position)(n.container);o.intersectRect(r,e)&&t.push(n.item)})),this.stateManager.state.activeElements=t},n.__decorate([(0,i.watch)(":afterResize"),(0,i.watch)(":resize"),(0,i.watch)("container:scroll"),(0,i.throttle)()],t.prototype,"onScrollLoadChunk",null),n.__decorate([(0,i.watch)("container:dragover")],t.prototype,"onDragOver",null),n.__decorate([(0,i.watch)(["container:dragleave","container:drop"])],t.prototype,"onDragLeave",null),o=n.__decorate([i.component],t)}(r.UIGroup);t.UIVirtualScroll=u},725:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UIResize=void 0,o(726);var n=o(191),r=o(235),i=function(){function e(){}return e.remove=function(e){(0,n.css)(e.container,{width:null,height:null}),e.container.classList.remove("jodit-ui-resize"),r.Dom.safeRemove(e.container.querySelector(".jodit-ui-resize__handle"))},e.install=function(e,t){e.container.classList.add("jodit-ui-resize"),"static"===(0,n.css)(e.container,"position")&&(0,n.css)(e.container,"position","relative");var o=e.j.c.div("jodit-ui-resize__handle");o.classList.add("jodit-ui-resize__handle_type_"+t),e.container.appendChild(o),e.j.e.on(o,"mousedown touchstart",this.onStartResize.bind(this,e,t))},e.onStartResize=function(e,t,o){var n=e.j.async.throttle(this.onResize.bind(this,e,{x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight,direction:t}),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",n).one(e.j.ow,"mouseup touchend",this.onEndResize.bind(this,e,n))},e.onResize=function(e,t,o){var r=["left","right"].includes(t.direction),i=e.container.parentElement;i&&(0,n.css)(e.container,r?"width":"height",100*(r?(t.w+(o.clientX-t.x)*("right"===t.direction?1:-1))/i.offsetWidth:(t.h+(o.clientY-t.y)*("top"===t.direction?1:-1))/i.offsetHeight)+"%")},e.onEndResize=function(e,t,o){e.j.e.off(e.j.ow,"mousemove touchmove",t),e.j.unlock()},e}();t.UIResize=i},718:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UISelectItems=void 0,o(719);var n=o(235),r=o(191),i=function(){function e(){}return e.remove=function(e){n.Dom.safeRemove(e.container.querySelector(".jodit-ui-select-items")),e.j.e.off(e.container,"mousedown.uiselectitems touchstart.uiselectitems")},e.install=function(e){var t=e.j.c.div("jodit-ui-select-items");e.j.e.on(e.container,"mousedown.uiselectitems touchstart.uiselectitems",this.onStartSelect.bind(this,e,t))},e.onStartSelect=function(e,t,o){if(o.target===e.container){(0,r.css)(t,{width:0,height:0}),e.container.appendChild(t);var n={x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight},i=e.j.async.throttle(this.onSelect.bind(this,e,t,n),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",i).one(e.j.ow,"mouseup touchend",this.onEndSelect.bind(this,e,t,i)),e.onSelectItems({left:n.x,top:n.y,width:0,height:0})}},e.onSelect=function(e,t,o,n){var i={left:o.x>n.clientX?n.clientX:o.x,top:o.y>n.clientY?n.clientY:o.y,width:Math.abs(o.x-n.clientX),height:Math.abs(o.y-n.clientY)};(0,r.css)(t,i),e.onSelectItems(i)},e.onEndSelect=function(e,t,o,r){n.Dom.safeRemove(t),e.j.e.off(e.j.ow,"mousemove touchmove",o),e.j.unlock()},e}();t.UISelectItems=i},755:function(e){e.exports={Favorites:"Избранное",Settings:"Настройки",Light:"Светлая",Dark:"Темная",Theme:"Тема",Show:"Показать",Hide:"Скрыть","Show favorites":"Показывать избранное",Tiles:"Плитка",List:"Список",Compact:"Компактный",View:"Отображение","Folders position":"Позиция папок","Sort by":"Сортировать по","Extra small":"Очень маленькие",Small:"Маленькие",Large:"Большие","Extra large":"Очень большие","Tile size":"Размер плитки"}},710:function(e){e.exports='<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"> <path d="M365.4,59.628c60.56,0,109.6,49.03,109.6,109.47c0,109.47-109.6,171.8-219.06,281.271 C146.47,340.898,37,278.568,37,169.099c0-60.44,49.04-109.47,109.47-109.47c54.73,0,82.1,27.37,109.47,82.1 C283.3,86.999,310.67,59.628,365.4,59.628z"/> </svg>'},711:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <path d="M28.7,16.3l-12-13c-0.4-0.4-1.1-0.4-1.5,0l-12,13C3,16.6,2.9,17,3.1,17.4C3.2,17.8,3.6,18,4,18h3v10c0,0.6,0.4,1,1,1h16 c0.6,0,1-0.4,1-1V18h3c0.4,0,0.8-0.2,0.9-0.6C29.1,17,29,16.6,28.7,16.3z"/> </svg>'},708:function(e,t,o){"use strict";o.r(t)},736:function(e,t,o){"use strict";o.r(t)},743:function(e,t,o){"use strict";o.r(t)},717:function(e,t,o){"use strict";o.r(t)},751:function(e,t,o){"use strict";o.r(t)},721:function(e,t,o){"use strict";o.r(t)},713:function(e,t,o){"use strict";o.r(t)},740:function(e,t,o){"use strict";o.r(t)},745:function(e,t,o){"use strict";o.r(t)},728:function(e,t,o){"use strict";o.r(t)},724:function(e,t,o){"use strict";o.r(t)},732:function(e,t,o){"use strict";o.r(t)},730:function(e,t,o){"use strict";o.r(t)},738:function(e,t,o){"use strict";o.r(t)},734:function(e,t,o){"use strict";o.r(t)},715:function(e,t,o){"use strict";o.r(t)},726:function(e,t,o){"use strict";o.r(t)},719:function(e,t,o){"use strict";o.r(t)}},function(e){return e(e.s=706)}])}));