@ckeditor/ckeditor5-ckbox 0.0.0-nightly-20231205.0 → 0.0.0-nightly-20231207.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. package/build/ckbox.js +2 -2
  2. package/build/translations/ar.js +1 -1
  3. package/build/translations/az.js +1 -1
  4. package/build/translations/bg.js +1 -1
  5. package/build/translations/bn.js +1 -1
  6. package/build/translations/ca.js +1 -1
  7. package/build/translations/cs.js +1 -1
  8. package/build/translations/da.js +1 -1
  9. package/build/translations/de.js +1 -1
  10. package/build/translations/el.js +1 -1
  11. package/build/translations/en-au.js +1 -1
  12. package/build/translations/es-co.js +1 -1
  13. package/build/translations/es.js +1 -1
  14. package/build/translations/et.js +1 -1
  15. package/build/translations/fa.js +1 -1
  16. package/build/translations/fi.js +1 -1
  17. package/build/translations/fr.js +1 -1
  18. package/build/translations/gl.js +1 -1
  19. package/build/translations/he.js +1 -1
  20. package/build/translations/hi.js +1 -1
  21. package/build/translations/hr.js +1 -1
  22. package/build/translations/hu.js +1 -1
  23. package/build/translations/id.js +1 -1
  24. package/build/translations/it.js +1 -1
  25. package/build/translations/ja.js +1 -1
  26. package/build/translations/ko.js +1 -1
  27. package/build/translations/lt.js +1 -1
  28. package/build/translations/lv.js +1 -1
  29. package/build/translations/ms.js +1 -1
  30. package/build/translations/nl.js +1 -1
  31. package/build/translations/no.js +1 -1
  32. package/build/translations/pl.js +1 -1
  33. package/build/translations/pt-br.js +1 -1
  34. package/build/translations/pt.js +1 -1
  35. package/build/translations/ro.js +1 -1
  36. package/build/translations/ru.js +1 -1
  37. package/build/translations/sk.js +1 -1
  38. package/build/translations/sq.js +1 -1
  39. package/build/translations/sr-latn.js +1 -1
  40. package/build/translations/sr.js +1 -1
  41. package/build/translations/sv.js +1 -1
  42. package/build/translations/th.js +1 -1
  43. package/build/translations/tr.js +1 -1
  44. package/build/translations/ug.js +1 -1
  45. package/build/translations/uk.js +1 -1
  46. package/build/translations/ur.js +1 -1
  47. package/build/translations/uz.js +1 -1
  48. package/build/translations/vi.js +1 -1
  49. package/build/translations/zh-cn.js +1 -1
  50. package/build/translations/zh.js +1 -1
  51. package/lang/contexts.json +2 -1
  52. package/lang/translations/ar.po +18 -2
  53. package/lang/translations/az.po +18 -2
  54. package/lang/translations/bg.po +18 -2
  55. package/lang/translations/bn.po +18 -2
  56. package/lang/translations/ca.po +18 -2
  57. package/lang/translations/cs.po +18 -2
  58. package/lang/translations/da.po +18 -2
  59. package/lang/translations/de.po +18 -2
  60. package/lang/translations/el.po +18 -2
  61. package/lang/translations/en-au.po +18 -2
  62. package/lang/translations/en.po +18 -2
  63. package/lang/translations/es-co.po +18 -2
  64. package/lang/translations/es.po +18 -2
  65. package/lang/translations/et.po +18 -2
  66. package/lang/translations/fa.po +18 -2
  67. package/lang/translations/fi.po +18 -2
  68. package/lang/translations/fr.po +18 -2
  69. package/lang/translations/gl.po +18 -2
  70. package/lang/translations/he.po +18 -2
  71. package/lang/translations/hi.po +18 -2
  72. package/lang/translations/hr.po +18 -2
  73. package/lang/translations/hu.po +18 -2
  74. package/lang/translations/id.po +18 -2
  75. package/lang/translations/it.po +18 -2
  76. package/lang/translations/ja.po +18 -2
  77. package/lang/translations/ko.po +18 -2
  78. package/lang/translations/lt.po +18 -2
  79. package/lang/translations/lv.po +18 -2
  80. package/lang/translations/ms.po +18 -2
  81. package/lang/translations/nl.po +18 -2
  82. package/lang/translations/no.po +18 -2
  83. package/lang/translations/pl.po +18 -2
  84. package/lang/translations/pt-br.po +18 -2
  85. package/lang/translations/pt.po +18 -2
  86. package/lang/translations/ro.po +18 -2
  87. package/lang/translations/ru.po +18 -2
  88. package/lang/translations/sk.po +18 -2
  89. package/lang/translations/sq.po +18 -2
  90. package/lang/translations/sr-latn.po +18 -2
  91. package/lang/translations/sr.po +18 -2
  92. package/lang/translations/sv.po +18 -2
  93. package/lang/translations/th.po +18 -2
  94. package/lang/translations/tr.po +18 -2
  95. package/lang/translations/ug.po +18 -2
  96. package/lang/translations/uk.po +18 -2
  97. package/lang/translations/ur.po +18 -2
  98. package/lang/translations/uz.po +18 -2
  99. package/lang/translations/vi.po +18 -2
  100. package/lang/translations/zh-cn.po +18 -2
  101. package/lang/translations/zh.po +18 -2
  102. package/package.json +2 -2
  103. package/src/ckboxconfig.d.ts +18 -0
  104. package/src/ckboxediting.d.ts +5 -12
  105. package/src/ckboxediting.js +7 -55
  106. package/src/ckboximageedit/ckboximageeditcommand.d.ts +10 -1
  107. package/src/ckboximageedit/ckboximageeditcommand.js +55 -23
  108. package/src/ckboximageedit/ckboximageeditediting.d.ts +3 -1
  109. package/src/ckboximageedit/ckboximageeditediting.js +3 -1
  110. package/src/ckboximageedit/utils.d.ts +10 -0
  111. package/src/ckboximageedit/utils.js +48 -0
  112. package/src/ckboximageedit.d.ts +1 -2
  113. package/src/ckboximageedit.js +1 -2
  114. package/src/ckboxui.js +28 -1
  115. package/src/ckboxuploadadapter.d.ts +0 -5
  116. package/src/ckboxuploadadapter.js +10 -111
  117. package/src/ckboxutils.d.ts +51 -0
  118. package/src/ckboxutils.js +184 -0
  119. package/src/utils.d.ts +8 -0
  120. package/src/utils.js +36 -0
  121. package/theme/icons/ckbox-image-edit.svg +1 -1
package/build/ckbox.js CHANGED
@@ -1,5 +1,5 @@
1
- !function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Cannot access default workspace.":"Cannot access default workspace.","Cannot determine a category for the uploaded file.":"Cannot determine a category for the uploaded file.","Open file manager":"Open file manager"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
1
+ !function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Cannot access default workspace.":"Cannot access default workspace.","Cannot determine a category for the uploaded file.":"Cannot determine a category for the uploaded file.","Edit image":"Edit image","Failed to determine category of edited image.":"Failed to determine category of edited image.","Open file manager":"Open file manager","Processing the edited image.":"Processing the edited image.","Server failed to process the image.":"Server failed to process the image."})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var e={70:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,':root{--ck-image-processing-highlight-color:#f9fafa;--ck-image-processing-background-color:#e3e5e8}.ck.ck-editor__editable .image.image-processing{position:relative}.ck.ck-editor__editable .image.image-processing:before{animation:ck-image-processing-animation 2s linear infinite;background:linear-gradient(90deg,var(--ck-image-processing-background-color),var(--ck-image-processing-highlight-color),var(--ck-image-processing-background-color));background-size:200% 100%;content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ck.ck-editor__editable .image.image-processing img{height:100%}@keyframes ck-image-processing-animation{0%{background-position:200% 0}to{background-position:-200% 0}}',""]);const i=o},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(o[s]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);r&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},62:(e,t,n)=>{"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function a(e){for(var t=-1,n=0;n<s.length;n++)if(s[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],c=t.base?i[0]+t.base:i[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var d=a(u),g={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(s[d].references++,s[d].updater(g)):s.push({identifier:u,updater:m(g,t),references:1}),r.push(u)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var s=i(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function g(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,o);else{var i=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function h(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,f=0;function m(e,t){var n,r,o;if(t.singleton){var i=f++;n=p||(p=l(t)),r=g.bind(null,n,i,!1),o=g.bind(null,n,i,!0)}else n=l(t),r=h.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=a(n[r]);s[o].references--}for(var i=c(e,t),l=0;l<n.length;l++){var u=a(n[l]);0===s[u].references&&(s[u].updater(),s.splice(u,1))}n=i}}}},704:(e,t,n)=>{e.exports=n(79)("./src/core.js")},492:(e,t,n)=>{e.exports=n(79)("./src/engine.js")},273:(e,t,n)=>{e.exports=n(79)("./src/ui.js")},448:(e,t,n)=>{e.exports=n(79)("./src/upload.js")},209:(e,t,n)=>{e.exports=n(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};(()=>{"use strict";n.r(r),n.d(r,{CKBox:()=>P,CKBoxEditing:()=>E,CKBoxImageEdit:()=>jn,CKBoxImageEditEditing:()=>_n,CKBoxImageEditUI:()=>kn,CKBoxUI:()=>o});var e=n(704),t=n(273);class o extends e.Plugin{static get pluginName(){return"CKBoxUI"}afterInit(){const e=this.editor,n=e.commands.get("ckbox");if(!n)return;const r=e.t;e.ui.componentFactory.add("ckbox",(o=>{const i=new t.ButtonView(o);return i.set({label:r("Open file manager"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',tooltip:!0}),i.bind("isOn","isEnabled").to(n,"value","isEnabled"),i.on("execute",(()=>{e.execute("ckbox")})),i}))}}var i=n(492),s=n(209),a=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],c=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e[n];t=83*t+a.indexOf(r)}return t},l=e=>{let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},u=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(12.92*t*255+.5):Math.trunc(255*(1.055*Math.pow(t,.4166666666666667)-.055)+.5)},d=(e,t)=>(e=>e<0?-1:1)(e)*Math.pow(Math.abs(e),t),g=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e}},h=e=>{if(!e||e.length<6)throw new g("The blurhash string must be at least 6 characters");let t=c(e[0]),n=Math.floor(t/9)+1,r=t%9+1;if(e.length!==4+2*r*n)throw new g(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*r*n}`)},p=e=>{let t=e>>8&255,n=255&e;return[l(e>>16),l(t),l(n)]},f=(e,t)=>{let n=Math.floor(e/361),r=Math.floor(e/19)%19,o=e%19;return[d((n-9)/9,2)*t,d((r-9)/9,2)*t,d((o-9)/9,2)*t]},m=(e,t,n,r)=>{h(e),r|=1;let o=c(e[0]),i=Math.floor(o/9)+1,s=o%9+1,a=(c(e[1])+1)/166,l=new Array(s*i);for(let t=0;t<l.length;t++)if(0===t){let n=c(e.substring(2,6));l[t]=p(n)}else{let n=c(e.substring(4+2*t,6+2*t));l[t]=f(n,a*r)}let d=4*t,g=new Uint8ClampedArray(d*n);for(let e=0;e<n;e++)for(let r=0;r<t;r++){let o=0,a=0,c=0;for(let u=0;u<i;u++)for(let i=0;i<s;i++){let d=Math.cos(Math.PI*r*i/t)*Math.cos(Math.PI*e*u/n),g=l[i+u*s];o+=g[0]*d,a+=g[1]*d,c+=g[2]*d}let h=u(o),p=u(a),f=u(c);g[4*r+0+e*d]=h,g[4*r+1+e*d]=p,g[4*r+2+e*d]=f,g[4*r+3+e*d]=255}return g};function b(e){const t=[];let n=0;for(const r in e){const o=parseInt(r,10);isNaN(o)||(o>n&&(n=o),t.push(`${e[r]} ${r}w`))}const r=[{srcset:t.join(","),sizes:`(max-width: ${n}px) 100vw, ${n}px`,type:"image/webp"}];return{imageFallbackUrl:e.default,imageSources:r}}const v=32;function _({url:e,method:t="GET",data:n,onUploadProgress:r,signal:o,authorization:i}){const s=new XMLHttpRequest;s.open(t,e.toString()),s.setRequestHeader("Authorization",i),s.setRequestHeader("CKBox-Version","CKEditor 5"),s.responseType="json";const a=()=>{s.abort()};return new Promise(((e,t)=>{o.throwIfAborted(),o.addEventListener("abort",a),s.addEventListener("loadstart",(()=>{o.addEventListener("abort",a)})),s.addEventListener("loadend",(()=>{o.removeEventListener("abort",a)})),s.addEventListener("error",(()=>{t()})),s.addEventListener("abort",(()=>{t()})),s.addEventListener("load",(()=>{const n=s.response;if(!n||n.statusCode>=400)return t(n&&n.message);e(n)})),r&&s.upload.addEventListener("progress",(e=>{r(e)})),s.send(n)}))}class k extends e.Command{constructor(e){super(e),this._chosenAssets=new Set,this._wrapper=null,this._initListeners()}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){this.fire("ckbox:open")}_getValue(){return null!==this._wrapper}_checkEnabled(){const e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");return!(!e.isEnabled&&!t.isEnabled)}_prepareOptions(){const e=this.editor.config.get("ckbox");return{theme:e.theme,language:e.language,tokenUrl:e.tokenUrl,serviceOrigin:e.serviceOrigin,dialog:{onClose:()=>this.fire("ckbox:close")},assets:{onChoose:e=>this.fire("ckbox:choose",e)}}}_initListeners(){const e=this.editor,t=e.model,n=!e.config.get("ckbox.ignoreDataId");this.on("ckbox",(()=>{this.refresh()}),{priority:"low"}),this.on("ckbox:open",(()=>{this.isEnabled&&!this.value&&(this._wrapper=(0,s.createElement)(document,"div",{class:"ck ckbox-wrapper"}),document.body.appendChild(this._wrapper),window.CKBox.mount(this._wrapper,this._prepareOptions()))})),this.on("ckbox:close",(()=>{this.value&&(this._wrapper.remove(),this._wrapper=null,e.editing.view.focus())})),this.on("ckbox:choose",((r,o)=>{if(!this.isEnabled)return;const i=e.commands.get("insertImage"),s=e.commands.get("link"),a=function({assets:e,isImageAllowed:t,isLinkAllowed:n}){return e.map((e=>function(e){const t=e.data.metadata;if(!t)return!1;return t.width&&t.height}(e)?{id:e.data.id,type:"image",attributes:y(e)}:{id:e.data.id,type:"link",attributes:w(e)})).filter((e=>"image"===e.type?t:n))}({assets:o,isImageAllowed:i.isEnabled,isLinkAllowed:s.isEnabled}),c=a.length;0!==c&&(t.change((e=>{for(const t of a){const r=t===a[c-1],o=1===c;this._insertAsset(t,r,e,o),n&&(setTimeout((()=>this._chosenAssets.delete(t)),1e3),this._chosenAssets.add(t))}})),e.editing.view.focus())})),this.listenTo(e,"destroy",(()=>{this.fire("ckbox:close"),this._chosenAssets.clear()}))}_insertAsset(e,t,n,r){const o=this.editor.model.document.selection;n.removeSelectionAttribute("linkHref"),"image"===e.type?this._insertImage(e):this._insertLink(e,n,r),t||n.setSelection(o.getLastPosition())}_insertImage(e){const t=this.editor,{imageFallbackUrl:n,imageSources:r,imageTextAlternative:o,imageWidth:i,imageHeight:s,imagePlaceholder:a}=e.attributes;t.execute("insertImage",{source:{src:n,sources:r,alt:o,width:i,height:s,...a?{placeholder:a}:null}})}_insertLink(e,t,n){const r=this.editor,o=r.model,i=o.document.selection,{linkName:a,linkHref:c}=e.attributes;if(i.isCollapsed){const e=(0,s.toMap)(i.getAttributes()),l=t.createText(a,e);if(!n){const e=i.getLastPosition(),n=e.parent;"paragraph"===n.name&&n.isEmpty||r.execute("insertParagraph",{position:e});const s=o.insertContent(l);return t.setSelection(s),void r.execute("link",c)}const u=o.insertContent(l);t.setSelection(u)}r.execute("link",c)}}function y(e){const{imageFallbackUrl:t,imageSources:n}=b(e.data.imageUrls),{description:r,width:o,height:i,blurHash:s}=e.data.metadata,a=function(e){if(e)try{const t=`${v}px`,n=document.createElement("canvas");n.setAttribute("width",t),n.setAttribute("height",t);const r=n.getContext("2d");if(!r)return;const o=r.createImageData(v,v),i=m(e,v,v);return o.data.set(i),r.putImageData(o,0,0),n.toDataURL()}catch(e){return}}(s);return{imageFallbackUrl:t,imageSources:n,imageTextAlternative:r||"",imageWidth:o,imageHeight:i,...a?{imagePlaceholder:a}:null}}function w(e){return{linkName:e.data.name,linkHref:x(e)}}function x(e){const t=new URL(e.data.url);return t.searchParams.set("download","true"),t.toString()}var I=n(448);class j extends e.Plugin{static get requires(){return["ImageUploadEditing","ImageUploadProgress",I.FileRepository,E]}static get pluginName(){return"CKBoxUploadAdapter"}async afterInit(){const e=this.editor,t=!!e.config.get("ckbox"),n=!!window.CKBox;if(!t&&!n)return;const r=e.plugins.get(I.FileRepository),o=e.plugins.get(E);r.createUploadAdapter=t=>new A(t,o.getToken(),e);const i=!e.config.get("ckbox.ignoreDataId"),s=e.plugins.get("ImageUploadEditing");i&&s.on("uploadComplete",((t,{imageElement:n,data:r})=>{e.model.change((e=>{e.setAttribute("ckboxImageId",r.ckboxImageId,n)}))}))}}class A{constructor(e,t,n){this.loader=e,this.token=t,this.editor=n,this.controller=new AbortController,this.serviceOrigin=n.config.get("ckbox.serviceOrigin")}getWorkspaceId(){const e=(0,this.editor.t)("Cannot access default workspace."),t=this.editor.config.get("ckbox.defaultUploadWorkspaceId"),n=function(e,t){const[,n]=e.value.split("."),r=JSON.parse(atob(n)),o=r.auth&&r.auth.ckbox&&r.auth.ckbox.workspaces||[r.aud];return t?"superadmin"==(r.auth&&r.auth.ckbox&&r.auth.ckbox.role)||o.includes(t)?t:null:o[0]}(this.token,t);if(null==n)throw(0,s.logError)("ckbox-access-default-workspace-error"),e;return n}async getAvailableCategories(e=0){const t=new URL("categories",this.serviceOrigin);return t.searchParams.set("limit",50..toString()),t.searchParams.set("offset",e.toString()),t.searchParams.set("workspaceId",this.getWorkspaceId()),_({url:t,signal:this.controller.signal,authorization:this.token.value}).then((async t=>{if(t.totalCount-(e+50)>0){const n=await this.getAvailableCategories(e+50);return[...t.items,...n]}return t.items})).catch((()=>{this.controller.signal.throwIfAborted(),(0,s.logError)("ckbox-fetch-category-http-error")}))}async getCategoryIdForFile(e){const t=function(e){const t=/\.(?<ext>[^.]+)$/;return e.match(t).groups.ext.toLowerCase()}(e.name),n=await this.getAvailableCategories();if(!n)return null;const r=this.editor.config.get("ckbox.defaultUploadCategories");if(r){const e=Object.keys(r).find((e=>r[e].find((e=>e.toLowerCase()==t))));if(e){const t=n.find((t=>t.id===e||t.name===e));return t?t.id:null}}const o=n.find((e=>e.extensions.find((e=>e.toLowerCase()==t))));return o?o.id:null}async upload(){const e=this.editor.t,t=e("Cannot determine a category for the uploaded file."),n=await this.loader.file,r=await this.getCategoryIdForFile(n);if(!r)return Promise.reject(t);const o=new URL("assets",this.serviceOrigin),i=new FormData;o.searchParams.set("workspaceId",this.getWorkspaceId()),i.append("categoryId",r),i.append("file",n);return _({method:"POST",url:o,data:i,onUploadProgress:e=>{e.lengthComputable&&(this.loader.uploadTotal=e.total,this.loader.uploaded=e.loaded)},signal:this.controller.signal,authorization:this.token.value}).then((async e=>{const t=b(e.imageUrls);return{ckboxImageId:e.id,default:t.imageFallbackUrl,sources:t.imageSources}})).catch((()=>{const t=e("Cannot upload file:")+` ${n.name}.`;return Promise.reject(t)}))}abort(){this.controller.abort()}}class E extends e.Plugin{static get pluginName(){return"CKBoxEditing"}static get requires(){return["CloudServices","LinkEditing","PictureEditing",j]}async init(){const e=this.editor,t=!!e.config.get("ckbox"),n=!!window.CKBox;if(!t&&!n)return;this._initConfig();const r=e.plugins.get("CloudServicesCore"),o=e.config.get("ckbox.tokenUrl");if(o===e.config.get("cloudServices.tokenUrl")){const t=e.plugins.get("CloudServices");this._token=t.token}else this._token=await r.createToken(o).init();e.config.get("ckbox.ignoreDataId")||(this._initSchema(),this._initConversion(),this._initFixers()),n&&e.commands.add("ckbox",new k(e))}getToken(){return this._token}_initConfig(){const e=this.editor;e.config.define("ckbox",{serviceOrigin:"https://api.ckbox.io",defaultUploadCategories:null,ignoreDataId:!1,language:e.locale.uiLanguage,theme:"lark",tokenUrl:e.config.get("cloudServices.tokenUrl")});if(!e.config.get("ckbox.tokenUrl"))throw new s.CKEditorError("ckbox-plugin-missing-token-url",this);e.plugins.has("ImageBlockEditing")||e.plugins.has("ImageInlineEditing")||(0,s.logError)("ckbox-plugin-image-feature-missing",e)}_initSchema(){const e=this.editor.model.schema;e.extend("$text",{allowAttributes:"ckboxLinkId"}),e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.addAttributeCheck(((e,t)=>{if(!!!e.last.getAttribute("linkHref")&&"ckboxLinkId"===t)return!1}))}_initConversion(){const e=this.editor;e.conversion.for("downcast").add((e=>{e.on("attribute:ckboxLinkId:imageBlock",((e,t,n)=>{const{writer:r,mapper:o,consumable:i}=n;if(!i.consume(t.item,e.name))return;const s=[...o.toViewElement(t.item).getChildren()].find((e=>"a"===e.name));s&&(t.item.hasAttribute("ckboxLinkId")?r.setAttribute("data-ckbox-resource-id",t.item.getAttribute("ckboxLinkId"),s):r.removeAttribute("data-ckbox-resource-id",s))}),{priority:"low"}),e.on("attribute:ckboxLinkId",((e,t,n)=>{const{writer:r,mapper:o,consumable:i}=n;if(i.consume(t.item,e.name)){if(t.attributeOldValue){const e=S(r,t.attributeOldValue);r.unwrap(o.toViewRange(t.range),e)}if(t.attributeNewValue){const e=S(r,t.attributeNewValue);if(t.item.is("selection")){const t=r.document.selection;r.wrap(t.getFirstRange(),e)}else r.wrap(o.toViewRange(t.range),e)}}}),{priority:"low"})})),e.conversion.for("upcast").add((e=>{e.on("element:a",((e,t,n)=>{const{writer:r,consumable:o}=n;if(!t.viewItem.getAttribute("href"))return;if(!o.consume(t.viewItem,{attributes:["data-ckbox-resource-id"]}))return;const i=t.viewItem.getAttribute("data-ckbox-resource-id");if(i)if(t.modelRange)for(let e of t.modelRange.getItems())e.is("$textProxy")&&(e=e.textNode),O(e)&&r.setAttribute("ckboxLinkId",i,e);else{const e=t.modelCursor.nodeBefore||t.modelCursor.parent;r.setAttribute("ckboxLinkId",i,e)}}),{priority:"low"})})),e.conversion.for("downcast").attributeToAttribute({model:"ckboxImageId",view:"data-ckbox-resource-id"}),e.conversion.for("upcast").elementToAttribute({model:{key:"ckboxImageId",value:e=>e.getAttribute("data-ckbox-resource-id")},view:{attributes:{"data-ckbox-resource-id":/[\s\S]+/}}});const t=e.commands.get("replaceImageSource");t&&this.listenTo(t,"cleanupImage",((e,[t,n])=>{t.removeAttribute("ckboxImageId",n)}))}_initFixers(){const e=this.editor,t=e.model,n=t.document.selection;t.document.registerPostFixer(function(e){return t=>{let n=!1;const r=e.model,o=e.commands.get("ckbox");if(!o)return n;for(const e of r.document.differ.getChanges()){if("insert"!==e.type&&"attribute"!==e.type)continue;const r="insert"===e.type?new i.Range(e.position,e.position.getShiftedBy(e.length)):e.range,s="attribute"===e.type&&"linkHref"===e.attributeKey&&null===e.attributeNewValue;for(const e of r.getItems()){if(s&&e.hasAttribute("ckboxLinkId")){t.removeAttribute("ckboxLinkId",e),n=!0;continue}const r=C(e,o._chosenAssets);for(const o of r){const r="image"===o.type?"ckboxImageId":"ckboxLinkId";o.id!==e.getAttribute(r)&&(t.setAttribute(r,o.id,e),n=!0)}}}return n}}(e)),t.document.registerPostFixer(function(e){return t=>!(e.hasAttribute("linkHref")||!e.hasAttribute("ckboxLinkId"))&&(t.removeSelectionAttribute("ckboxLinkId"),!0)}(n))}}function C(e,t){const n=e.is("element","imageInline")||e.is("element","imageBlock"),r=e.hasAttribute("linkHref");return[...t].filter((t=>"image"===t.type&&n?t.attributes.imageFallbackUrl===e.getAttribute("src"):"link"===t.type&&r?t.attributes.linkHref===e.getAttribute("linkHref"):void 0))}function S(e,t){const n=e.createAttributeElement("a",{"data-ckbox-resource-id":t},{priority:5});return e.setCustomProperty("link",!0,n),n}function O(e){return!!e.is("$text")||!(!e.is("element","imageInline")&&!e.is("element","imageBlock"))}class P extends e.Plugin{static get pluginName(){return"CKBox"}static get requires(){return[E,o]}}const L=function(){this.__data__=[],this.size=0};const U=function(e,t){return e===t||e!=e&&t!=t};const T=function(e,t){for(var n=e.length;n--;)if(U(e[n][0],t))return n;return-1};var M=Array.prototype.splice;const B=function(e){var t=this.__data__,n=T(t,e);return!(n<0)&&(n==t.length-1?t.pop():M.call(t,n,1),--this.size,!0)};const z=function(e){var t=this.__data__,n=T(t,e);return n<0?void 0:t[n][1]};const F=function(e){return T(this.__data__,e)>-1};const N=function(e,t){var n=this.__data__,r=T(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function K(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}K.prototype.clear=L,K.prototype.delete=B,K.prototype.get=z,K.prototype.has=F,K.prototype.set=N;const R=K;const V=function(){this.__data__=new R,this.size=0};const H=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const $=function(e){return this.__data__.get(e)};const D=function(e){return this.__data__.has(e)};const q="object"==typeof global&&global&&global.Object===Object&&global;var W="object"==typeof self&&self&&self.Object===Object&&self;const Z=q||W||Function("return this")();const G=Z.Symbol;var J=Object.prototype,X=J.hasOwnProperty,Q=J.toString,Y=G?G.toStringTag:void 0;const ee=function(e){var t=X.call(e,Y),n=e[Y];try{e[Y]=void 0;var r=!0}catch(e){}var o=Q.call(e);return r&&(t?e[Y]=n:delete e[Y]),o};var te=Object.prototype.toString;const ne=function(e){return te.call(e)};var re=G?G.toStringTag:void 0;const oe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":re&&re in Object(e)?ee(e):ne(e)};const ie=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const se=function(e){if(!ie(e))return!1;var t=oe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const ae=Z["__core-js_shared__"];var ce,le=(ce=/[^.]+$/.exec(ae&&ae.keys&&ae.keys.IE_PROTO||""))?"Symbol(src)_1."+ce:"";const ue=function(e){return!!le&&le in e};var de=Function.prototype.toString;const ge=function(e){if(null!=e){try{return de.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var he=/^\[object .+?Constructor\]$/,pe=Function.prototype,fe=Object.prototype,me=pe.toString,be=fe.hasOwnProperty,ve=RegExp("^"+me.call(be).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _e=function(e){return!(!ie(e)||ue(e))&&(se(e)?ve:he).test(ge(e))};const ke=function(e,t){return null==e?void 0:e[t]};const ye=function(e,t){var n=ke(e,t);return _e(n)?n:void 0};const we=ye(Z,"Map");const xe=ye(Object,"create");const Ie=function(){this.__data__=xe?xe(null):{},this.size=0};const je=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var Ae=Object.prototype.hasOwnProperty;const Ee=function(e){var t=this.__data__;if(xe){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ae.call(t,e)?t[e]:void 0};var Ce=Object.prototype.hasOwnProperty;const Se=function(e){var t=this.__data__;return xe?void 0!==t[e]:Ce.call(t,e)};const Oe=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xe&&void 0===t?"__lodash_hash_undefined__":t,this};function Pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pe.prototype.clear=Ie,Pe.prototype.delete=je,Pe.prototype.get=Ee,Pe.prototype.has=Se,Pe.prototype.set=Oe;const Le=Pe;const Ue=function(){this.size=0,this.__data__={hash:new Le,map:new(we||R),string:new Le}};const Te=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Me=function(e,t){var n=e.__data__;return Te(t)?n["string"==typeof t?"string":"hash"]:n.map};const Be=function(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t};const ze=function(e){return Me(this,e).get(e)};const Fe=function(e){return Me(this,e).has(e)};const Ne=function(e,t){var n=Me(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ke(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ke.prototype.clear=Ue,Ke.prototype.delete=Be,Ke.prototype.get=ze,Ke.prototype.has=Fe,Ke.prototype.set=Ne;const Re=Ke;const Ve=function(e,t){var n=this.__data__;if(n instanceof R){var r=n.__data__;if(!we||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Re(r)}return n.set(e,t),this.size=n.size,this};function He(e){var t=this.__data__=new R(e);this.size=t.size}He.prototype.clear=V,He.prototype.delete=H,He.prototype.get=$,He.prototype.has=D,He.prototype.set=Ve;const $e=He;const De=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const qe=function(e){return this.__data__.has(e)};function We(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Re;++t<n;)this.add(e[t])}We.prototype.add=We.prototype.push=De,We.prototype.has=qe;const Ze=We;const Ge=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};const Je=function(e,t){return e.has(t)};const Xe=function(e,t,n,r,o,i){var s=1&n,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var l=i.get(e),u=i.get(t);if(l&&u)return l==t&&u==e;var d=-1,g=!0,h=2&n?new Ze:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var p=e[d],f=t[d];if(r)var m=s?r(f,p,d,t,e,i):r(p,f,d,e,t,i);if(void 0!==m){if(m)continue;g=!1;break}if(h){if(!Ge(t,(function(e,t){if(!Je(h,t)&&(p===e||o(p,e,n,r,i)))return h.push(t)}))){g=!1;break}}else if(p!==f&&!o(p,f,n,r,i)){g=!1;break}}return i.delete(e),i.delete(t),g};const Qe=Z.Uint8Array;const Ye=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};const et=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var tt=G?G.prototype:void 0,nt=tt?tt.valueOf:void 0;const rt=function(e,t,n,r,o,i,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Qe(e),new Qe(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return U(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Ye;case"[object Set]":var c=1&r;if(a||(a=et),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;r|=2,s.set(e,t);var u=Xe(a(e),a(t),r,o,i,s);return s.delete(e),u;case"[object Symbol]":if(nt)return nt.call(e)==nt.call(t)}return!1};const ot=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};const it=Array.isArray;const st=function(e,t,n){var r=t(e);return it(e)?r:ot(r,n(e))};const at=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i};const ct=function(){return[]};var lt=Object.prototype.propertyIsEnumerable,ut=Object.getOwnPropertySymbols;const dt=ut?function(e){return null==e?[]:(e=Object(e),at(ut(e),(function(t){return lt.call(e,t)})))}:ct;const gt=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};const ht=function(e){return null!=e&&"object"==typeof e};const pt=function(e){return ht(e)&&"[object Arguments]"==oe(e)};var ft=Object.prototype,mt=ft.hasOwnProperty,bt=ft.propertyIsEnumerable;const vt=pt(function(){return arguments}())?pt:function(e){return ht(e)&&mt.call(e,"callee")&&!bt.call(e,"callee")};const _t=function(){return!1};var kt="object"==typeof exports&&exports&&!exports.nodeType&&exports,yt=kt&&"object"==typeof module&&module&&!module.nodeType&&module,wt=yt&&yt.exports===kt?Z.Buffer:void 0;const xt=(wt?wt.isBuffer:void 0)||_t;var It=/^(?:0|[1-9]\d*)$/;const jt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&It.test(e))&&e>-1&&e%1==0&&e<t};const At=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Et={};Et["[object Float32Array]"]=Et["[object Float64Array]"]=Et["[object Int8Array]"]=Et["[object Int16Array]"]=Et["[object Int32Array]"]=Et["[object Uint8Array]"]=Et["[object Uint8ClampedArray]"]=Et["[object Uint16Array]"]=Et["[object Uint32Array]"]=!0,Et["[object Arguments]"]=Et["[object Array]"]=Et["[object ArrayBuffer]"]=Et["[object Boolean]"]=Et["[object DataView]"]=Et["[object Date]"]=Et["[object Error]"]=Et["[object Function]"]=Et["[object Map]"]=Et["[object Number]"]=Et["[object Object]"]=Et["[object RegExp]"]=Et["[object Set]"]=Et["[object String]"]=Et["[object WeakMap]"]=!1;const Ct=function(e){return ht(e)&&At(e.length)&&!!Et[oe(e)]};const St=function(e){return function(t){return e(t)}};var Ot="object"==typeof exports&&exports&&!exports.nodeType&&exports,Pt=Ot&&"object"==typeof module&&module&&!module.nodeType&&module,Lt=Pt&&Pt.exports===Ot&&q.process,Ut=function(){try{var e=Pt&&Pt.require&&Pt.require("util").types;return e||Lt&&Lt.binding&&Lt.binding("util")}catch(e){}}();var Tt=Ut&&Ut.isTypedArray;const Mt=Tt?St(Tt):Ct;var Bt=Object.prototype.hasOwnProperty;const zt=function(e,t){var n=it(e),r=!n&&vt(e),o=!n&&!r&&xt(e),i=!n&&!r&&!o&&Mt(e),s=n||r||o||i,a=s?gt(e.length,String):[],c=a.length;for(var l in e)!t&&!Bt.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||jt(l,c))||a.push(l);return a};var Ft=Object.prototype;const Nt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ft)};const Kt=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Rt=Object.prototype.hasOwnProperty;const Vt=function(e){if(!Nt(e))return Kt(e);var t=[];for(var n in Object(e))Rt.call(e,n)&&"constructor"!=n&&t.push(n);return t};const Ht=function(e){return null!=e&&At(e.length)&&!se(e)};const $t=function(e){return Ht(e)?zt(e):Vt(e)};const Dt=function(e){return st(e,$t,dt)};var qt=Object.prototype.hasOwnProperty;const Wt=function(e,t,n,r,o,i){var s=1&n,a=Dt(e),c=a.length;if(c!=Dt(t).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in t:qt.call(t,u)))return!1}var d=i.get(e),g=i.get(t);if(d&&g)return d==t&&g==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=s;++l<c;){var f=e[u=a[l]],m=t[u];if(r)var b=s?r(m,f,u,t,e,i):r(f,m,u,e,t,i);if(!(void 0===b?f===m||o(f,m,n,r,i):b)){h=!1;break}p||(p="constructor"==u)}if(h&&!p){var v=e.constructor,_=t.constructor;v==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _||(h=!1)}return i.delete(e),i.delete(t),h};const Zt=ye(Z,"DataView");const Gt=ye(Z,"Promise");const Jt=ye(Z,"Set");const Xt=ye(Z,"WeakMap");var Qt="[object Map]",Yt="[object Promise]",en="[object Set]",tn="[object WeakMap]",nn="[object DataView]",rn=ge(Zt),on=ge(we),sn=ge(Gt),an=ge(Jt),cn=ge(Xt),ln=oe;(Zt&&ln(new Zt(new ArrayBuffer(1)))!=nn||we&&ln(new we)!=Qt||Gt&&ln(Gt.resolve())!=Yt||Jt&&ln(new Jt)!=en||Xt&&ln(new Xt)!=tn)&&(ln=function(e){var t=oe(e),n="[object Object]"==t?e.constructor:void 0,r=n?ge(n):"";if(r)switch(r){case rn:return nn;case on:return Qt;case sn:return Yt;case an:return en;case cn:return tn}return t});const un=ln;var dn="[object Arguments]",gn="[object Array]",hn="[object Object]",pn=Object.prototype.hasOwnProperty;const fn=function(e,t,n,r,o,i){var s=it(e),a=it(t),c=s?gn:un(e),l=a?gn:un(t),u=(c=c==dn?hn:c)==hn,d=(l=l==dn?hn:l)==hn,g=c==l;if(g&&xt(e)){if(!xt(t))return!1;s=!0,u=!1}if(g&&!u)return i||(i=new $e),s||Mt(e)?Xe(e,t,n,r,o,i):rt(e,t,c,n,r,o,i);if(!(1&n)){var h=u&&pn.call(e,"__wrapped__"),p=d&&pn.call(t,"__wrapped__");if(h||p){var f=h?e.value():e,m=p?t.value():t;return i||(i=new $e),o(f,m,n,r,i)}}return!!g&&(i||(i=new $e),Wt(e,t,n,r,o,i))};const mn=function e(t,n,r,o,i){return t===n||(null==t||null==n||!ht(t)&&!ht(n)?t!=t&&n!=n:fn(t,n,r,o,e,i))};const bn=function(e,t){return mn(e,t)};class vn extends e.Command{constructor(e){super(e),this._wrapper=null,this._processInProgress=new Map,this.value=!1,this._prepareListeners()}refresh(){const e=this.editor;this.value=this._getValue();const t=e.model.document.selection.getSelectedElement(),n=t&&(t.is("element","imageInline")||t.is("element","imageBlock")),r=Array.from(this._processInProgress.values()).some((({element:e})=>bn(e,t)));n&&t.hasAttribute("ckboxImageId")&&!r?this.isEnabled=!0:this.isEnabled=!1}execute(){if(this._getValue())return;this.value=!0,this._wrapper=(0,s.createElement)(document,"div",{class:"ck ckbox-wrapper"}),document.body.appendChild(this._wrapper);const e=this.editor.model.document.selection.getSelectedElement(),t={ckboxImageId:e.getAttribute("ckboxImageId"),element:e,controller:new AbortController};window.CKBox.mountImageEditor(this._wrapper,this._prepareOptions(t))}destroy(){this._handleImageEditorClose();for(const e of this._processInProgress.values())e.controller.abort();super.destroy()}_getValue(){return null!==this._wrapper}_prepareOptions(e){const t=this.editor.config.get("ckbox");return{assetId:e.ckboxImageId,imageEditing:{allowOverwrite:!1},tokenUrl:t.tokenUrl,onClose:()=>this._handleImageEditorClose(),onSave:t=>this._handleImageEditorSave(e,t)}}_prepareListeners(){this.listenTo(this.editor.model.document,"change:data",(()=>{this._getProcessingStatesOfDeletedImages().forEach((e=>{e.controller.abort()}))}))}_getProcessingStatesOfDeletedImages(){const e=[];for(const t of this._processInProgress.values())"$graveyard"==t.element.root.rootName&&e.push(t);return e}_handleImageEditorClose(){this._wrapper&&(this._wrapper.remove(),this._wrapper=null,this.editor.editing.view.focus())}_handleImageEditorSave(n,r){const o=this.editor.locale.t,i=this.editor.plugins.get(t.Notification),a=this.editor.plugins.get(e.PendingActions),c=a.add(o("Processing the edited image."));this._processInProgress.set(n.ckboxImageId,n),this._showImageProcessingIndicator(n.element,r),this.refresh(),this._waitForAssetProcessed(r.data.id,n.controller.signal).then((e=>{this._replaceImage(n.element,e)}),(e=>{this.editor.editing.reconvertItem(n.element),n.controller.signal.aborted||(!e||e instanceof s.CKEditorError?i.showWarning(o("Server failed to process the image."),{namespace:"ckbox"}):console.error(e))})).finally((()=>{this._processInProgress.delete(n.ckboxImageId),a.remove(c),this.refresh()}))}async _getAssetStatusFromServer(e,t){const n=this.editor.plugins.get(E),r=new URL("assets/"+e,this.editor.config.get("ckbox.serviceOrigin")),o=await _({url:r,signal:t,authorization:n.getToken().value}),i=o.metadata.metadataProcessingStatus;if(!i||"queued"==i)throw new s.CKEditorError("ckbox-image-not-processed");return{data:{...o}}}async _waitForAssetProcessed(e,t){const n=await(0,s.retry)((()=>this._getAssetStatusFromServer(e,t)),{signal:t,maxAttempts:5});if("success"!=n.data.metadata.metadataProcessingStatus)throw new s.CKEditorError("ckbox-image-processing-failed");return n}_showImageProcessingIndicator(e,t){const n=this.editor;n.editing.view.change((r=>{const o=n.editing.mapper.toViewElement(e),i=this.editor.plugins.get("ImageUtils").findViewImgElement(o);r.removeStyle("aspect-ratio",i),r.setAttribute("width",t.data.metadata.width,i),r.setAttribute("height",t.data.metadata.height,i),r.setStyle("width",`${t.data.metadata.width}px`,i),r.setStyle("height",`${t.data.metadata.height}px`,i),r.addClass("image-processing",o)}))}_replaceImage(e,t){const n=this.editor,{imageFallbackUrl:r,imageSources:o,imageWidth:i,imageHeight:s,imagePlaceholder:a}=y(t),c=Array.from(n.model.document.selection.getRanges());n.model.change((l=>{l.setSelection(e,"on"),n.execute("insertImage",{source:{src:r,sources:o,alt:e.getAttribute("alt"),width:i,height:s,...a?{placeholder:a}:null}});const u=e.getChildren();e=n.model.document.selection.getSelectedElement();for(const t of u)l.append(l.cloneElement(t),e);l.setAttribute("ckboxImageId",t.data.id,e),l.setSelection(c)}))}}class _n extends e.Plugin{static get pluginName(){return"CKBoxImageEditEditing"}static get requires(){return[e.PendingActions,t.Notification,"ImageUtils","ImageEditing"]}init(){const{editor:e}=this;e.commands.add("ckboxImageEdit",new vn(e))}}class kn extends e.Plugin{static get pluginName(){return"CKBoxImageEditUI"}init(){const e=this.editor;e.ui.componentFactory.add("ckboxImageEdit",(n=>{const r=e.commands.get("ckboxImageEdit"),o=new t.ButtonView(n),i=n.t;return o.set({label:i("Edit image"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M5.802 8.942a.607.607 0 0 0-.838-.029L1.429 12.8V3.158h12.93v5.25l1.429-1.319V2.758c0-.553-.467-1-1.039-1H1.05c-.582 0-1.049.447-1.049 1v11.281c0 .562.467 1.01 1.039 1.01h6.583v-.228c0-.124.052-.242.143-.326l4.504-4.157-.312-.367a.61.61 0 0 0-.829 0l-2.124 1.962-3.202-2.991Zm3.74-2.578a1.87 1.87 0 1 0 3.707-.486 1.87 1.87 0 0 0-3.707.486Z"/><path d="M8.874 15.926v2.316h2.317l6.836-6.834-2.32-2.32-6.833 6.84v-.002Zm10.944-6.312a.612.612 0 0 0 0-.87L18.372 7.3a.614.614 0 0 0-.87 0l-1.133 1.128 2.32 2.319 1.13-1.133Z"/></svg>',tooltip:!0}),o.bind("isOn").to(r,"value",r,"isEnabled",((e,t)=>e&&t)),o.bind("isEnabled").to(r),this.listenTo(o,"execute",(()=>{e.execute("ckboxImageEdit"),e.editing.view.focus()})),o}))}}var yn=n(62),wn=n.n(yn),xn=n(70),In={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};wn()(xn.Z,In);xn.Z.locals;class jn extends e.Plugin{static get pluginName(){return"CKBoxImageEdit"}static get requires(){return[E,_n,kn]}}})(),(window.CKEditor5=window.CKEditor5||{}).ckbox=r})();
5
+ */(()=>{var e={70:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(609),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,':root{--ck-image-processing-highlight-color:#f9fafa;--ck-image-processing-background-color:#e3e5e8}.ck.ck-editor__editable .image.image-processing{position:relative}.ck.ck-editor__editable .image.image-processing:before{animation:ck-image-processing-animation 2s linear infinite;background:linear-gradient(90deg,var(--ck-image-processing-background-color),var(--ck-image-processing-highlight-color),var(--ck-image-processing-background-color));background-size:200% 100%;content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ck.ck-editor__editable .image.image-processing img{height:100%}@keyframes ck-image-processing-animation{0%{background-position:200% 0}to{background-position:-200% 0}}',""]);const i=o},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(o[s]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);n&&o[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),t.push(c))}},t}},62:(e,t,r)=>{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),s=[];function a(e){for(var t=-1,r=0;r<s.length;r++)if(s[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},n=[],o=0;o<e.length;o++){var i=e[o],c=t.base?i[0]+t.base:i[0],l=r[c]||0,u="".concat(c," ").concat(l);r[c]=l+1;var d=a(u),g={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(s[d].references++,s[d].updater(g)):s.push({identifier:u,updater:m(g,t),references:1}),n.push(u)}return n}function l(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=r.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var s=i(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function g(e,t,r,n){var o=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,o);else{var i=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function h(e,t,r){var n=r.css,o=r.media,i=r.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,f=0;function m(e,t){var r,n,o;if(t.singleton){var i=f++;r=p||(p=l(t)),n=g.bind(null,r,i,!1),o=g.bind(null,r,i,!0)}else r=l(t),n=h.bind(null,r,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var o=a(r[n]);s[o].references--}for(var i=c(e,t),l=0;l<r.length;l++){var u=a(r[l]);0===s[u].references&&(s[u].updater(),s.splice(u,1))}r=i}}}},704:(e,t,r)=>{e.exports=r(79)("./src/core.js")},492:(e,t,r)=>{e.exports=r(79)("./src/engine.js")},273:(e,t,r)=>{e.exports=r(79)("./src/ui.js")},448:(e,t,r)=>{e.exports=r(79)("./src/upload.js")},209:(e,t,r)=>{e.exports=r(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var n={};(()=>{"use strict";r.r(n),r.d(n,{CKBox:()=>U,CKBoxEditing:()=>S,CKBoxImageEdit:()=>jr,CKBoxImageEditEditing:()=>_r,CKBoxImageEditUI:()=>kr,CKBoxUI:()=>o});var e=r(704),t=r(273);class o extends e.Plugin{static get pluginName(){return"CKBoxUI"}afterInit(){const r=this.editor,n=r.commands.get("ckbox");if(!n)return;const o=r.t;if(r.ui.componentFactory.add("ckbox",(e=>{const i=new t.ButtonView(e);return i.set({label:o("Open file manager"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.627 16.5zm5.873-.196zm0-7.001V8h-13v8.5h4.341c.191.54.457 1.044.785 1.5H2a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 2 2h4.5a1.5 1.5 0 0 1 1.06.44L9.122 4H16a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 19 8v2.531a6.027 6.027 0 0 0-1.5-1.228zM16 6.5v-1H8.5l-2-2H2v13h1V8a1.5 1.5 0 0 1 1.5-1.5H16z"/><path d="M14.5 19.5a5 5 0 1 1 0-10 5 5 0 0 1 0 10zM15 14v-2h-1v2h-2v1h2v2h1v-2h2v-1h-2z"/></svg>',tooltip:!0}),i.bind("isOn","isEnabled").to(n,"value","isEnabled"),i.on("execute",(()=>{r.execute("ckbox")})),i})),r.plugins.has("ImageInsertUI")){const t=r.plugins.get("ImageInsertUI");t.registerIntegration({name:"assetManager",observable:n,buttonViewCreator:()=>{const r=this.editor.ui.componentFactory.create("ckbox");return r.icon=e.icons.imageAssetManager,r.bind("label").to(t,"isImageSelected",(e=>o(e?"Replace image with file manager":"Insert image with file manager"))),r},formViewCreator:()=>{const r=this.editor.ui.componentFactory.create("ckbox");return r.icon=e.icons.imageAssetManager,r.withText=!0,r.bind("label").to(t,"isImageSelected",(e=>o(e?"Replace with file manager":"Insert with file manager"))),r.on("execute",(()=>{t.dropdownView.isOpen=!1})),r}})}}}var i=r(492),s=r(209),a=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],c=e=>{let t=0;for(let r=0;r<e.length;r++){let n=e[r];t=83*t+a.indexOf(n)}return t},l=e=>{let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},u=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(12.92*t*255+.5):Math.trunc(255*(1.055*Math.pow(t,.4166666666666667)-.055)+.5)},d=(e,t)=>(e=>e<0?-1:1)(e)*Math.pow(Math.abs(e),t),g=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e}},h=e=>{if(!e||e.length<6)throw new g("The blurhash string must be at least 6 characters");let t=c(e[0]),r=Math.floor(t/9)+1,n=t%9+1;if(e.length!==4+2*n*r)throw new g(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*n*r}`)},p=e=>{let t=e>>8&255,r=255&e;return[l(e>>16),l(t),l(r)]},f=(e,t)=>{let r=Math.floor(e/361),n=Math.floor(e/19)%19,o=e%19;return[d((r-9)/9,2)*t,d((n-9)/9,2)*t,d((o-9)/9,2)*t]},m=(e,t,r,n)=>{h(e),n|=1;let o=c(e[0]),i=Math.floor(o/9)+1,s=o%9+1,a=(c(e[1])+1)/166,l=new Array(s*i);for(let t=0;t<l.length;t++)if(0===t){let r=c(e.substring(2,6));l[t]=p(r)}else{let r=c(e.substring(4+2*t,6+2*t));l[t]=f(r,a*n)}let d=4*t,g=new Uint8ClampedArray(d*r);for(let e=0;e<r;e++)for(let n=0;n<t;n++){let o=0,a=0,c=0;for(let u=0;u<i;u++)for(let i=0;i<s;i++){let d=Math.cos(Math.PI*n*i/t)*Math.cos(Math.PI*e*u/r),g=l[i+u*s];o+=g[0]*d,a+=g[1]*d,c+=g[2]*d}let h=u(o),p=u(a),f=u(c);g[4*n+0+e*d]=h,g[4*n+1+e*d]=p,g[4*n+2+e*d]=f,g[4*n+3+e*d]=255}return g};function b(e){const t=[];let r=0;for(const n in e){const o=parseInt(n,10);isNaN(o)||(o>r&&(r=o),t.push(`${e[n]} ${n}w`))}const n=[{srcset:t.join(","),sizes:`(max-width: ${r}px) 100vw, ${r}px`,type:"image/webp"}];return{imageFallbackUrl:e.default,imageSources:n}}const v=32;function w({url:e,method:t="GET",data:r,onUploadProgress:n,signal:o,authorization:i}){const s=new XMLHttpRequest;s.open(t,e.toString()),s.setRequestHeader("Authorization",i),s.setRequestHeader("CKBox-Version","CKEditor 5"),s.responseType="json";const a=()=>{s.abort()};return new Promise(((e,t)=>{o.throwIfAborted(),o.addEventListener("abort",a),s.addEventListener("loadstart",(()=>{o.addEventListener("abort",a)})),s.addEventListener("loadend",(()=>{o.removeEventListener("abort",a)})),s.addEventListener("error",(()=>{t()})),s.addEventListener("abort",(()=>{t()})),s.addEventListener("load",(()=>{const r=s.response;if(!r||r.statusCode>=400)return t(r&&r.message);e(r)})),n&&s.upload.addEventListener("progress",(e=>{n(e)})),s.send(r)}))}const y={"image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"};class _ extends e.Command{constructor(e){super(e),this._chosenAssets=new Set,this._wrapper=null,this._initListeners()}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){this.fire("ckbox:open")}_getValue(){return null!==this._wrapper}_checkEnabled(){const e=this.editor.commands.get("insertImage"),t=this.editor.commands.get("link");return!(!e.isEnabled&&!t.isEnabled)}_prepareOptions(){const e=this.editor.config.get("ckbox");return{theme:e.theme,language:e.language,tokenUrl:e.tokenUrl,serviceOrigin:e.serviceOrigin,dialog:{onClose:()=>this.fire("ckbox:close")},assets:{onChoose:e=>this.fire("ckbox:choose",e)}}}_initListeners(){const e=this.editor,t=e.model,r=!e.config.get("ckbox.ignoreDataId");this.on("ckbox",(()=>{this.refresh()}),{priority:"low"}),this.on("ckbox:open",(()=>{this.isEnabled&&!this.value&&(this._wrapper=(0,s.createElement)(document,"div",{class:"ck ckbox-wrapper"}),document.body.appendChild(this._wrapper),window.CKBox.mount(this._wrapper,this._prepareOptions()))})),this.on("ckbox:close",(()=>{this.value&&(this._wrapper.remove(),this._wrapper=null,e.editing.view.focus())})),this.on("ckbox:choose",((n,o)=>{if(!this.isEnabled)return;const i=e.commands.get("insertImage"),s=e.commands.get("link"),a=function({assets:e,isImageAllowed:t,isLinkAllowed:r}){return e.map((e=>function(e){const t=e.data.metadata;if(!t)return!1;return t.width&&t.height}(e)?{id:e.data.id,type:"image",attributes:k(e)}:{id:e.data.id,type:"link",attributes:x(e)})).filter((e=>"image"===e.type?t:r))}({assets:o,isImageAllowed:i.isEnabled,isLinkAllowed:s.isEnabled}),c=a.length;0!==c&&(t.change((e=>{for(const t of a){const n=t===a[c-1],o=1===c;this._insertAsset(t,n,e,o),r&&(setTimeout((()=>this._chosenAssets.delete(t)),1e3),this._chosenAssets.add(t))}})),e.editing.view.focus())})),this.listenTo(e,"destroy",(()=>{this.fire("ckbox:close"),this._chosenAssets.clear()}))}_insertAsset(e,t,r,n){const o=this.editor.model.document.selection;r.removeSelectionAttribute("linkHref"),"image"===e.type?this._insertImage(e):this._insertLink(e,r,n),t||r.setSelection(o.getLastPosition())}_insertImage(e){const t=this.editor,{imageFallbackUrl:r,imageSources:n,imageTextAlternative:o,imageWidth:i,imageHeight:s,imagePlaceholder:a}=e.attributes;t.execute("insertImage",{source:{src:r,sources:n,alt:o,width:i,height:s,...a?{placeholder:a}:null}})}_insertLink(e,t,r){const n=this.editor,o=n.model,i=o.document.selection,{linkName:a,linkHref:c}=e.attributes;if(i.isCollapsed){const e=(0,s.toMap)(i.getAttributes()),l=t.createText(a,e);if(!r){const e=i.getLastPosition(),r=e.parent;"paragraph"===r.name&&r.isEmpty||n.execute("insertParagraph",{position:e});const s=o.insertContent(l);return t.setSelection(s),void n.execute("link",c)}const u=o.insertContent(l);t.setSelection(u)}n.execute("link",c)}}function k(e){const{imageFallbackUrl:t,imageSources:r}=b(e.data.imageUrls),{description:n,width:o,height:i,blurHash:s}=e.data.metadata,a=function(e){if(e)try{const t=`${v}px`,r=document.createElement("canvas");r.setAttribute("width",t),r.setAttribute("height",t);const n=r.getContext("2d");if(!n)return;const o=n.createImageData(v,v),i=m(e,v,v);return o.data.set(i),n.putImageData(o,0,0),r.toDataURL()}catch(e){return}}(s);return{imageFallbackUrl:t,imageSources:r,imageTextAlternative:n||"",imageWidth:o,imageHeight:i,...a?{imagePlaceholder:a}:null}}function x(e){return{linkName:e.data.name,linkHref:I(e)}}function I(e){const t=new URL(e.data.url);return t.searchParams.set("download","true"),t.toString()}var A=r(448);class E extends e.Plugin{static get pluginName(){return"CKBoxUtils"}static get requires(){return["CloudServices"]}async init(){const e=this.editor,t=!!e.config.get("ckbox"),r=!!window.CKBox;if(!t&&!r)return;e.config.define("ckbox",{serviceOrigin:"https://api.ckbox.io",defaultUploadCategories:null,ignoreDataId:!1,language:e.locale.uiLanguage,theme:"lark",tokenUrl:e.config.get("cloudServices.tokenUrl")});const n=e.plugins.get("CloudServices"),o=e.config.get("cloudServices.tokenUrl"),i=e.config.get("ckbox.tokenUrl");if(!i)throw new s.CKEditorError("ckbox-plugin-missing-token-url",this);this._token=i==o?n.token:await n.registerTokenUrl(i)}getToken(){return this._token}getWorkspaceId(){const e=(0,this.editor.t)("Cannot access default workspace."),t=this.editor.config.get("ckbox.defaultUploadWorkspaceId"),r=function(e,t){const[,r]=e.value.split("."),n=JSON.parse(atob(r)),o=n.auth&&n.auth.ckbox&&n.auth.ckbox.workspaces||[n.aud];return t?"superadmin"==(n.auth&&n.auth.ckbox&&n.auth.ckbox.role)||o.includes(t)?t:null:o[0]}(this._token,t);if(null==r)throw(0,s.logError)("ckbox-access-default-workspace-error"),e;return r}async getCategoryIdForFile(e,t){const r=(0,this.editor.t)("Cannot determine a category for the uploaded file."),n=this.editor.config.get("ckbox.defaultUploadCategories"),o=this._getAvailableCategories(t),i="string"==typeof e?(s=await async function(e,t){try{const r=await fetch(e,{method:"HEAD",cache:"force-cache",...t});return r.ok&&r.headers.get("content-type")||""}catch{return""}}(e,t),y[s]):e.name.match(/\.(?<ext>[^.]+)$/).groups.ext.toLowerCase();var s;const a=await o;if(!a)throw r;if(n){const e=Object.keys(n).find((e=>n[e].find((e=>e.toLowerCase()==i))));if(e){const t=a.find((t=>t.id===e||t.name===e));if(!t)throw r;return t.id}}const c=a.find((e=>e.extensions.find((e=>e.toLowerCase()==i))));if(!c)throw r;return c.id}async _getAvailableCategories(e){const t=this.editor,r=this._token,{signal:n}=e,o=t.config.get("ckbox.serviceOrigin"),i=this.getWorkspaceId();try{const e=[];let t,r=0;do{const n=await a(r);e.push(...n.items),t=n.totalCount-(r+50),r+=50}while(t>0);return e}catch{return n.throwIfAborted(),void(0,s.logError)("ckbox-fetch-category-http-error")}function a(e){const t=new URL("categories",o);return t.searchParams.set("limit",50..toString()),t.searchParams.set("offset",e.toString()),t.searchParams.set("workspaceId",i),w({url:t,signal:n,authorization:r.value})}}}class j extends e.Plugin{static get requires(){return["ImageUploadEditing","ImageUploadProgress",A.FileRepository,S]}static get pluginName(){return"CKBoxUploadAdapter"}async afterInit(){const e=this.editor,t=!!e.config.get("ckbox"),r=!!window.CKBox;if(!t&&!r)return;const n=e.plugins.get(A.FileRepository),o=e.plugins.get(E);n.createUploadAdapter=t=>new C(t,e,o);const i=!e.config.get("ckbox.ignoreDataId"),s=e.plugins.get("ImageUploadEditing");i&&s.on("uploadComplete",((t,{imageElement:r,data:n})=>{e.model.change((e=>{e.setAttribute("ckboxImageId",n.ckboxImageId,r)}))}))}}class C{constructor(e,t,r){this.loader=e,this.token=r.getToken(),this.ckboxUtils=r,this.editor=t,this.controller=new AbortController,this.serviceOrigin=t.config.get("ckbox.serviceOrigin")}async upload(){const e=this.ckboxUtils,t=this.editor.t,r=await this.loader.file,n=await e.getCategoryIdForFile(r,{signal:this.controller.signal}),o=new URL("assets",this.serviceOrigin),i=new FormData;o.searchParams.set("workspaceId",e.getWorkspaceId()),i.append("categoryId",n),i.append("file",r);return w({method:"POST",url:o,data:i,onUploadProgress:e=>{e.lengthComputable&&(this.loader.uploadTotal=e.total,this.loader.uploaded=e.loaded)},signal:this.controller.signal,authorization:this.token.value}).then((async e=>{const t=b(e.imageUrls);return{ckboxImageId:e.id,default:t.imageFallbackUrl,sources:t.imageSources}})).catch((()=>{const e=t("Cannot upload file:")+` ${r.name}.`;return Promise.reject(e)}))}abort(){this.controller.abort()}}class S extends e.Plugin{static get pluginName(){return"CKBoxEditing"}static get requires(){return["LinkEditing","PictureEditing",j,E]}init(){const e=this.editor,t=!!e.config.get("ckbox"),r=!!window.CKBox;(t||r)&&(this._checkImagePlugins(),e.config.get("ckbox.ignoreDataId")||(this._initSchema(),this._initConversion(),this._initFixers()),r&&e.commands.add("ckbox",new _(e)))}_checkImagePlugins(){const e=this.editor;e.plugins.has("ImageBlockEditing")||e.plugins.has("ImageInlineEditing")||(0,s.logError)("ckbox-plugin-image-feature-missing",e)}_initSchema(){const e=this.editor.model.schema;e.extend("$text",{allowAttributes:"ckboxLinkId"}),e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),e.addAttributeCheck(((e,t)=>{if(!!!e.last.getAttribute("linkHref")&&"ckboxLinkId"===t)return!1}))}_initConversion(){const e=this.editor;e.conversion.for("downcast").add((e=>{e.on("attribute:ckboxLinkId:imageBlock",((e,t,r)=>{const{writer:n,mapper:o,consumable:i}=r;if(!i.consume(t.item,e.name))return;const s=[...o.toViewElement(t.item).getChildren()].find((e=>"a"===e.name));s&&(t.item.hasAttribute("ckboxLinkId")?n.setAttribute("data-ckbox-resource-id",t.item.getAttribute("ckboxLinkId"),s):n.removeAttribute("data-ckbox-resource-id",s))}),{priority:"low"}),e.on("attribute:ckboxLinkId",((e,t,r)=>{const{writer:n,mapper:o,consumable:i}=r;if(i.consume(t.item,e.name)){if(t.attributeOldValue){const e=P(n,t.attributeOldValue);n.unwrap(o.toViewRange(t.range),e)}if(t.attributeNewValue){const e=P(n,t.attributeNewValue);if(t.item.is("selection")){const t=n.document.selection;n.wrap(t.getFirstRange(),e)}else n.wrap(o.toViewRange(t.range),e)}}}),{priority:"low"})})),e.conversion.for("upcast").add((e=>{e.on("element:a",((e,t,r)=>{const{writer:n,consumable:o}=r;if(!t.viewItem.getAttribute("href"))return;if(!o.consume(t.viewItem,{attributes:["data-ckbox-resource-id"]}))return;const i=t.viewItem.getAttribute("data-ckbox-resource-id");if(i)if(t.modelRange)for(let e of t.modelRange.getItems())e.is("$textProxy")&&(e=e.textNode),L(e)&&n.setAttribute("ckboxLinkId",i,e);else{const e=t.modelCursor.nodeBefore||t.modelCursor.parent;n.setAttribute("ckboxLinkId",i,e)}}),{priority:"low"})})),e.conversion.for("downcast").attributeToAttribute({model:"ckboxImageId",view:"data-ckbox-resource-id"}),e.conversion.for("upcast").elementToAttribute({model:{key:"ckboxImageId",value:e=>e.getAttribute("data-ckbox-resource-id")},view:{attributes:{"data-ckbox-resource-id":/[\s\S]+/}}});const t=e.commands.get("replaceImageSource");t&&this.listenTo(t,"cleanupImage",((e,[t,r])=>{t.removeAttribute("ckboxImageId",r)}))}_initFixers(){const e=this.editor,t=e.model,r=t.document.selection;t.document.registerPostFixer(function(e){return t=>{let r=!1;const n=e.model,o=e.commands.get("ckbox");if(!o)return r;for(const e of n.document.differ.getChanges()){if("insert"!==e.type&&"attribute"!==e.type)continue;const n="insert"===e.type?new i.Range(e.position,e.position.getShiftedBy(e.length)):e.range,s="attribute"===e.type&&"linkHref"===e.attributeKey&&null===e.attributeNewValue;for(const e of n.getItems()){if(s&&e.hasAttribute("ckboxLinkId")){t.removeAttribute("ckboxLinkId",e),r=!0;continue}const n=O(e,o._chosenAssets);for(const o of n){const n="image"===o.type?"ckboxImageId":"ckboxLinkId";o.id!==e.getAttribute(n)&&(t.setAttribute(n,o.id,e),r=!0)}}}return r}}(e)),t.document.registerPostFixer(function(e){return t=>!(e.hasAttribute("linkHref")||!e.hasAttribute("ckboxLinkId"))&&(t.removeSelectionAttribute("ckboxLinkId"),!0)}(r))}}function O(e,t){const r=e.is("element","imageInline")||e.is("element","imageBlock"),n=e.hasAttribute("linkHref");return[...t].filter((t=>"image"===t.type&&r?t.attributes.imageFallbackUrl===e.getAttribute("src"):"link"===t.type&&n?t.attributes.linkHref===e.getAttribute("linkHref"):void 0))}function P(e,t){const r=e.createAttributeElement("a",{"data-ckbox-resource-id":t},{priority:5});return e.setCustomProperty("link",!0,r),r}function L(e){return!!e.is("$text")||!(!e.is("element","imageInline")&&!e.is("element","imageBlock"))}class U extends e.Plugin{static get pluginName(){return"CKBox"}static get requires(){return[S,o]}}const B=function(){this.__data__=[],this.size=0};const T=function(e,t){return e===t||e!=e&&t!=t};const M=function(e,t){for(var r=e.length;r--;)if(T(e[r][0],t))return r;return-1};var F=Array.prototype.splice;const z=function(e){var t=this.__data__,r=M(t,e);return!(r<0)&&(r==t.length-1?t.pop():F.call(t,r,1),--this.size,!0)};const N=function(e){var t=this.__data__,r=M(t,e);return r<0?void 0:t[r][1]};const R=function(e){return M(this.__data__,e)>-1};const K=function(e,t){var r=this.__data__,n=M(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function V(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}V.prototype.clear=B,V.prototype.delete=z,V.prototype.get=N,V.prototype.has=R,V.prototype.set=K;const H=V;const $=function(){this.__data__=new H,this.size=0};const D=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};const q=function(e){return this.__data__.get(e)};const W=function(e){return this.__data__.has(e)};const Z="object"==typeof global&&global&&global.Object===Object&&global;var G="object"==typeof self&&self&&self.Object===Object&&self;const J=Z||G||Function("return this")();const X=J.Symbol;var Q=Object.prototype,Y=Q.hasOwnProperty,ee=Q.toString,te=X?X.toStringTag:void 0;const re=function(e){var t=Y.call(e,te),r=e[te];try{e[te]=void 0;var n=!0}catch(e){}var o=ee.call(e);return n&&(t?e[te]=r:delete e[te]),o};var ne=Object.prototype.toString;const oe=function(e){return ne.call(e)};var ie=X?X.toStringTag:void 0;const se=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ie&&ie in Object(e)?re(e):oe(e)};const ae=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const ce=function(e){if(!ae(e))return!1;var t=se(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const le=J["__core-js_shared__"];var ue,de=(ue=/[^.]+$/.exec(le&&le.keys&&le.keys.IE_PROTO||""))?"Symbol(src)_1."+ue:"";const ge=function(e){return!!de&&de in e};var he=Function.prototype.toString;const pe=function(e){if(null!=e){try{return he.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var fe=/^\[object .+?Constructor\]$/,me=Function.prototype,be=Object.prototype,ve=me.toString,we=be.hasOwnProperty,ye=RegExp("^"+ve.call(we).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const _e=function(e){return!(!ae(e)||ge(e))&&(ce(e)?ye:fe).test(pe(e))};const ke=function(e,t){return null==e?void 0:e[t]};const xe=function(e,t){var r=ke(e,t);return _e(r)?r:void 0};const Ie=xe(J,"Map");const Ae=xe(Object,"create");const Ee=function(){this.__data__=Ae?Ae(null):{},this.size=0};const je=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var Ce=Object.prototype.hasOwnProperty;const Se=function(e){var t=this.__data__;if(Ae){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Ce.call(t,e)?t[e]:void 0};var Oe=Object.prototype.hasOwnProperty;const Pe=function(e){var t=this.__data__;return Ae?void 0!==t[e]:Oe.call(t,e)};const Le=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ae&&void 0===t?"__lodash_hash_undefined__":t,this};function Ue(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ue.prototype.clear=Ee,Ue.prototype.delete=je,Ue.prototype.get=Se,Ue.prototype.has=Pe,Ue.prototype.set=Le;const Be=Ue;const Te=function(){this.size=0,this.__data__={hash:new Be,map:new(Ie||H),string:new Be}};const Me=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Fe=function(e,t){var r=e.__data__;return Me(t)?r["string"==typeof t?"string":"hash"]:r.map};const ze=function(e){var t=Fe(this,e).delete(e);return this.size-=t?1:0,t};const Ne=function(e){return Fe(this,e).get(e)};const Re=function(e){return Fe(this,e).has(e)};const Ke=function(e,t){var r=Fe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Ve(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ve.prototype.clear=Te,Ve.prototype.delete=ze,Ve.prototype.get=Ne,Ve.prototype.has=Re,Ve.prototype.set=Ke;const He=Ve;const $e=function(e,t){var r=this.__data__;if(r instanceof H){var n=r.__data__;if(!Ie||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new He(n)}return r.set(e,t),this.size=r.size,this};function De(e){var t=this.__data__=new H(e);this.size=t.size}De.prototype.clear=$,De.prototype.delete=D,De.prototype.get=q,De.prototype.has=W,De.prototype.set=$e;const qe=De;const We=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const Ze=function(e){return this.__data__.has(e)};function Ge(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new He;++t<r;)this.add(e[t])}Ge.prototype.add=Ge.prototype.push=We,Ge.prototype.has=Ze;const Je=Ge;const Xe=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};const Qe=function(e,t){return e.has(t)};const Ye=function(e,t,r,n,o,i){var s=1&r,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var l=i.get(e),u=i.get(t);if(l&&u)return l==t&&u==e;var d=-1,g=!0,h=2&r?new Je:void 0;for(i.set(e,t),i.set(t,e);++d<a;){var p=e[d],f=t[d];if(n)var m=s?n(f,p,d,t,e,i):n(p,f,d,e,t,i);if(void 0!==m){if(m)continue;g=!1;break}if(h){if(!Xe(t,(function(e,t){if(!Qe(h,t)&&(p===e||o(p,e,r,n,i)))return h.push(t)}))){g=!1;break}}else if(p!==f&&!o(p,f,r,n,i)){g=!1;break}}return i.delete(e),i.delete(t),g};const et=J.Uint8Array;const tt=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r};const rt=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r};var nt=X?X.prototype:void 0,ot=nt?nt.valueOf:void 0;const it=function(e,t,r,n,o,i,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new et(e),new et(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return T(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=tt;case"[object Set]":var c=1&n;if(a||(a=rt),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;n|=2,s.set(e,t);var u=Ye(a(e),a(t),n,o,i,s);return s.delete(e),u;case"[object Symbol]":if(ot)return ot.call(e)==ot.call(t)}return!1};const st=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e};const at=Array.isArray;const ct=function(e,t,r){var n=t(e);return at(e)?n:st(n,r(e))};const lt=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i};const ut=function(){return[]};var dt=Object.prototype.propertyIsEnumerable,gt=Object.getOwnPropertySymbols;const ht=gt?function(e){return null==e?[]:(e=Object(e),lt(gt(e),(function(t){return dt.call(e,t)})))}:ut;const pt=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};const ft=function(e){return null!=e&&"object"==typeof e};const mt=function(e){return ft(e)&&"[object Arguments]"==se(e)};var bt=Object.prototype,vt=bt.hasOwnProperty,wt=bt.propertyIsEnumerable;const yt=mt(function(){return arguments}())?mt:function(e){return ft(e)&&vt.call(e,"callee")&&!wt.call(e,"callee")};const _t=function(){return!1};var kt="object"==typeof exports&&exports&&!exports.nodeType&&exports,xt=kt&&"object"==typeof module&&module&&!module.nodeType&&module,It=xt&&xt.exports===kt?J.Buffer:void 0;const At=(It?It.isBuffer:void 0)||_t;var Et=/^(?:0|[1-9]\d*)$/;const jt=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Et.test(e))&&e>-1&&e%1==0&&e<t};const Ct=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var St={};St["[object Float32Array]"]=St["[object Float64Array]"]=St["[object Int8Array]"]=St["[object Int16Array]"]=St["[object Int32Array]"]=St["[object Uint8Array]"]=St["[object Uint8ClampedArray]"]=St["[object Uint16Array]"]=St["[object Uint32Array]"]=!0,St["[object Arguments]"]=St["[object Array]"]=St["[object ArrayBuffer]"]=St["[object Boolean]"]=St["[object DataView]"]=St["[object Date]"]=St["[object Error]"]=St["[object Function]"]=St["[object Map]"]=St["[object Number]"]=St["[object Object]"]=St["[object RegExp]"]=St["[object Set]"]=St["[object String]"]=St["[object WeakMap]"]=!1;const Ot=function(e){return ft(e)&&Ct(e.length)&&!!St[se(e)]};const Pt=function(e){return function(t){return e(t)}};var Lt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ut=Lt&&"object"==typeof module&&module&&!module.nodeType&&module,Bt=Ut&&Ut.exports===Lt&&Z.process,Tt=function(){try{var e=Ut&&Ut.require&&Ut.require("util").types;return e||Bt&&Bt.binding&&Bt.binding("util")}catch(e){}}();var Mt=Tt&&Tt.isTypedArray;const Ft=Mt?Pt(Mt):Ot;var zt=Object.prototype.hasOwnProperty;const Nt=function(e,t){var r=at(e),n=!r&&yt(e),o=!r&&!n&&At(e),i=!r&&!n&&!o&&Ft(e),s=r||n||o||i,a=s?pt(e.length,String):[],c=a.length;for(var l in e)!t&&!zt.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||jt(l,c))||a.push(l);return a};var Rt=Object.prototype;const Kt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Rt)};const Vt=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object);var Ht=Object.prototype.hasOwnProperty;const $t=function(e){if(!Kt(e))return Vt(e);var t=[];for(var r in Object(e))Ht.call(e,r)&&"constructor"!=r&&t.push(r);return t};const Dt=function(e){return null!=e&&Ct(e.length)&&!ce(e)};const qt=function(e){return Dt(e)?Nt(e):$t(e)};const Wt=function(e){return ct(e,qt,ht)};var Zt=Object.prototype.hasOwnProperty;const Gt=function(e,t,r,n,o,i){var s=1&r,a=Wt(e),c=a.length;if(c!=Wt(t).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in t:Zt.call(t,u)))return!1}var d=i.get(e),g=i.get(t);if(d&&g)return d==t&&g==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=s;++l<c;){var f=e[u=a[l]],m=t[u];if(n)var b=s?n(m,f,u,t,e,i):n(f,m,u,e,t,i);if(!(void 0===b?f===m||o(f,m,r,n,i):b)){h=!1;break}p||(p="constructor"==u)}if(h&&!p){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(h=!1)}return i.delete(e),i.delete(t),h};const Jt=xe(J,"DataView");const Xt=xe(J,"Promise");const Qt=xe(J,"Set");const Yt=xe(J,"WeakMap");var er="[object Map]",tr="[object Promise]",rr="[object Set]",nr="[object WeakMap]",or="[object DataView]",ir=pe(Jt),sr=pe(Ie),ar=pe(Xt),cr=pe(Qt),lr=pe(Yt),ur=se;(Jt&&ur(new Jt(new ArrayBuffer(1)))!=or||Ie&&ur(new Ie)!=er||Xt&&ur(Xt.resolve())!=tr||Qt&&ur(new Qt)!=rr||Yt&&ur(new Yt)!=nr)&&(ur=function(e){var t=se(e),r="[object Object]"==t?e.constructor:void 0,n=r?pe(r):"";if(n)switch(n){case ir:return or;case sr:return er;case ar:return tr;case cr:return rr;case lr:return nr}return t});const dr=ur;var gr="[object Arguments]",hr="[object Array]",pr="[object Object]",fr=Object.prototype.hasOwnProperty;const mr=function(e,t,r,n,o,i){var s=at(e),a=at(t),c=s?hr:dr(e),l=a?hr:dr(t),u=(c=c==gr?pr:c)==pr,d=(l=l==gr?pr:l)==pr,g=c==l;if(g&&At(e)){if(!At(t))return!1;s=!0,u=!1}if(g&&!u)return i||(i=new qe),s||Ft(e)?Ye(e,t,r,n,o,i):it(e,t,c,r,n,o,i);if(!(1&r)){var h=u&&fr.call(e,"__wrapped__"),p=d&&fr.call(t,"__wrapped__");if(h||p){var f=h?e.value():e,m=p?t.value():t;return i||(i=new qe),o(f,m,r,n,i)}}return!!g&&(i||(i=new qe),Gt(e,t,r,n,o,i))};const br=function e(t,r,n,o,i){return t===r||(null==t||null==r||!ft(t)&&!ft(r)?t!=t&&r!=r:mr(t,r,n,o,e,i))};const vr=function(e,t){return br(e,t)};function wr(e){if(Array.isArray(e)){const t=e.map(wr);return e=>t.some((t=>t(e)))}if("origin"==e){const e=s.global.window.location.origin;return t=>t.startsWith(e+"/")}if("function"==typeof e)return e;if(e instanceof RegExp)return t=>!(!t.match(e)&&!t.replace(/^https?:\/\//,"").match(e));return()=>!1}class yr extends e.Command{constructor(e){super(e),this._wrapper=null,this._processInProgress=new Set,this.value=!1,this._canEdit=function(e){const t=wr(e);return e=>!(!e.is("element","imageInline")&&!e.is("element","imageBlock"))&&(!!e.hasAttribute("ckboxImageId")||!!e.hasAttribute("src")&&t(e.getAttribute("src")))}(e.config.get("ckbox.allowExternalImagesEditing")),this._prepareOptions=(0,s.abortableDebounce)(((e,t)=>this._prepareOptionsAbortable(e,t))),this._prepareListeners()}refresh(){const e=this.editor;this.value=this._getValue();const t=e.model.document.selection.getSelectedElement();this.isEnabled=!!t&&this._canEdit(t)&&!this._checkIfElementIsBeingProcessed(t)}execute(){if(this._getValue())return;const e=(0,s.createElement)(document,"div",{class:"ck ckbox-wrapper"});this._wrapper=e,this.value=!0,document.body.appendChild(this._wrapper);const r={element:this.editor.model.document.selection.getSelectedElement(),controller:new AbortController};this._prepareOptions(r).then((t=>window.CKBox.mountImageEditor(e,t)),(e=>{const r=this.editor,n=r.t;r.plugins.get(t.Notification).showWarning(n("Failed to determine category of edited image."),{namespace:"ckbox"}),console.error(e),this._handleImageEditorClose()}))}destroy(){this._handleImageEditorClose(),this._prepareOptions.abort();for(const e of this._processInProgress.values())e.controller.abort();super.destroy()}_getValue(){return null!==this._wrapper}async _prepareOptionsAbortable(e,t){const r=this.editor,n=r.config.get("ckbox"),o=r.plugins.get(E),{element:i}=t;let s;const a=i.getAttribute("ckboxImageId");if(a)s={assetId:a};else{const t=i.getAttribute("src");s={imageUrl:t,uploadCategoryId:await o.getCategoryIdForFile(t,{signal:e})}}return{...s,imageEditing:{allowOverwrite:!1},tokenUrl:n.tokenUrl,onClose:()=>this._handleImageEditorClose(),onSave:e=>this._handleImageEditorSave(t,e)}}_prepareListeners(){this.listenTo(this.editor.model.document,"change:data",(()=>{this._getProcessingStatesOfDeletedImages().forEach((e=>{e.controller.abort()}))}))}_getProcessingStatesOfDeletedImages(){const e=[];for(const t of this._processInProgress.values())"$graveyard"==t.element.root.rootName&&e.push(t);return e}_checkIfElementIsBeingProcessed(e){for(const{element:t}of this._processInProgress)if(vr(t,e))return!0;return!1}_handleImageEditorClose(){this._wrapper&&(this._wrapper.remove(),this._wrapper=null,this.editor.editing.view.focus(),this.refresh())}_handleImageEditorSave(r,n){const o=this.editor.locale.t,i=this.editor.plugins.get(t.Notification),a=this.editor.plugins.get(e.PendingActions),c=a.add(o("Processing the edited image."));this._processInProgress.add(r),this._showImageProcessingIndicator(r.element,n),this.refresh(),this._waitForAssetProcessed(n.data.id,r.controller.signal).then((e=>{this._replaceImage(r.element,e)}),(e=>{this.editor.editing.reconvertItem(r.element),r.controller.signal.aborted||(!e||e instanceof s.CKEditorError?i.showWarning(o("Server failed to process the image."),{namespace:"ckbox"}):console.error(e))})).finally((()=>{this._processInProgress.delete(r),a.remove(c),this.refresh()}))}async _getAssetStatusFromServer(e,t){const r=this.editor.plugins.get(E),n=new URL("assets/"+e,this.editor.config.get("ckbox.serviceOrigin")),o=await w({url:n,signal:t,authorization:r.getToken().value}),i=o.metadata.metadataProcessingStatus;if(!i||"queued"==i)throw new s.CKEditorError("ckbox-image-not-processed");return{data:{...o}}}async _waitForAssetProcessed(e,t){const r=await(0,s.retry)((()=>this._getAssetStatusFromServer(e,t)),{signal:t,maxAttempts:5});if("success"!=r.data.metadata.metadataProcessingStatus)throw new s.CKEditorError("ckbox-image-processing-failed");return r}_showImageProcessingIndicator(e,t){const r=this.editor;r.editing.view.change((n=>{const o=r.editing.mapper.toViewElement(e),i=this.editor.plugins.get("ImageUtils").findViewImgElement(o);n.removeStyle("aspect-ratio",i),n.setAttribute("width",t.data.metadata.width,i),n.setAttribute("height",t.data.metadata.height,i),n.setStyle("width",`${t.data.metadata.width}px`,i),n.setStyle("height",`${t.data.metadata.height}px`,i),n.addClass("image-processing",o)}))}_replaceImage(e,t){const r=this.editor,{imageFallbackUrl:n,imageSources:o,imageWidth:i,imageHeight:s,imagePlaceholder:a}=k(t),c=Array.from(r.model.document.selection.getRanges());r.model.change((l=>{l.setSelection(e,"on"),r.execute("insertImage",{source:{src:n,sources:o,alt:e.getAttribute("alt"),width:i,height:s,...a?{placeholder:a}:null}});const u=e.getChildren();e=r.model.document.selection.getSelectedElement();for(const t of u)l.append(l.cloneElement(t),e);l.setAttribute("ckboxImageId",t.data.id,e),l.setSelection(c)}))}}class _r extends e.Plugin{static get pluginName(){return"CKBoxImageEditEditing"}static get requires(){return[S,E,e.PendingActions,t.Notification,"ImageUtils","ImageEditing"]}init(){const{editor:e}=this;e.commands.add("ckboxImageEdit",new yr(e))}}class kr extends e.Plugin{static get pluginName(){return"CKBoxImageEditUI"}init(){const e=this.editor;e.ui.componentFactory.add("ckboxImageEdit",(r=>{const n=e.commands.get("ckboxImageEdit"),o=new t.ButtonView(r),i=r.t;return o.set({label:i("Edit image"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.201 1C.538 1 0 1.47 0 2.1v12.86C0 15.603.534 16 1.186 16H6.45l3.647-3.596-3.48-3.254a.694.694 0 0 0-.958-.033L1.5 13.6V2.5h15v4.59a3.477 3.477 0 0 1 1.5.15V2.1c0-.63-.547-1.1-1.2-1.1H1.202Zm11.723 2.805a2.137 2.137 0 0 0-2.045 2.406 2.13 2.13 0 0 0 4.172.277 2.134 2.134 0 0 0-.76-2.244 2.13 2.13 0 0 0-1.367-.44Z"/><path d="M8.1 17.612V20h2.39l7.046-7.046-2.39-2.39L8.1 17.612Zm11.283-6.506a.638.638 0 0 0 .139-.692.603.603 0 0 0-.139-.206L17.892 8.72a.63.63 0 0 0-.898 0l-1.167 1.163 2.391 2.39 1.165-1.167Z"/></svg>',tooltip:!0}),o.bind("isOn").to(n,"value",n,"isEnabled",((e,t)=>e&&t)),o.bind("isEnabled").to(n),this.listenTo(o,"execute",(()=>{e.execute("ckboxImageEdit"),e.editing.view.focus()})),o}))}}var xr=r(62),Ir=r.n(xr),Ar=r(70),Er={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Ir()(Ar.Z,Er);Ar.Z.locals;class jr extends e.Plugin{static get pluginName(){return"CKBoxImageEdit"}static get requires(){return[_r,kr]}}})(),(window.CKEditor5=window.CKEditor5||{}).ckbox=n})();
@@ -1 +1 @@
1
- !function(a){const n=a.ar=a.ar||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"لا يمكن الوصول إلى مساحة العمل الافتراضية.","Cannot determine a category for the uploaded file.":"تعذر تحديد فئة الملف الذي تم رفعه","Open file manager":"فتح مدير الملفات"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.ar=e.ar||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"لا يمكن الوصول إلى مساحة العمل الافتراضية.","Cannot determine a category for the uploaded file.":"تعذر تحديد فئة الملف الذي تم رفعه","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"فتح مدير الملفات","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const n=a.az=a.az||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Yüklənmiş fayl üçün kateqoriya müəyyən olunmadı.","Open file manager":"Fayl menecerini aç"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.az=e.az||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Yüklənmiş fayl üçün kateqoriya müəyyən olunmadı.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Fayl menecerini aç","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.bg=n.bg||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"Нямате достъп до работното пространство по подразбиране.","Cannot determine a category for the uploaded file.":"Не може да бъде определена категория за качения файл.","Open file manager":"Отвори управление на файлове"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.bg=e.bg||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Нямате достъп до работното пространство по подразбиране.","Cannot determine a category for the uploaded file.":"Не може да бъде определена категория за качения файл.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Отвори управление на файлове","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.bn=n.bn||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"ডিফল্ট ওয়ার্কস্পেস অ্যাক্সেস করতে পারবেন না।","Cannot determine a category for the uploaded file.":"আপলোড করা ফাইলের জন্য একটি বিভাগ নির্ধারণ করা যাচ্ছে না।","Open file manager":"ফাইল ম্যানেজার খুলুন"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.bn=e.bn||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"ডিফল্ট ওয়ার্কস্পেস অ্যাক্সেস করতে পারবেন না।","Cannot determine a category for the uploaded file.":"আপলোড করা ফাইলের জন্য একটি বিভাগ নির্ধারণ করা যাচ্ছে না।","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"ফাইল ম্যানেজার খুলুন","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const a=e.ca=e.ca||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"No es pot accedir a l'espai de treball predeterminat.","Cannot determine a category for the uploaded file.":"No es pot determinar una categoria per al fitxer penjat.","Open file manager":"Obrir el gestor de fitxers"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.ca=e.ca||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"No es pot accedir a l'espai de treball predeterminat.","Cannot determine a category for the uploaded file.":"No es pot determinar una categoria per al fitxer penjat.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Obrir el gestor de fitxers","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const o=e.cs=e.cs||{};o.dictionary=Object.assign(o.dictionary||{},{"Cannot access default workspace.":"Nelze získat přístup k výchozímu pracovišti.","Cannot determine a category for the uploaded file.":"Nelze určit kategorii pro nahraný soubor.","Open file manager":"Otevřít správce souborů"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.cs=e.cs||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Nelze získat přístup k výchozímu pracovišti.","Cannot determine a category for the uploaded file.":"Nelze určit kategorii pro nahraný soubor.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Otevřít správce souborů","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const n=e.da=e.da||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"Kan ikke opnå adgang til standard arbejdsområde.","Cannot determine a category for the uploaded file.":"Kan ikke bestemme en kategori for den uploadede fil.","Open file manager":"Open filhåndtering"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.da=e.da||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Kan ikke opnå adgang til standard arbejdsområde.","Cannot determine a category for the uploaded file.":"Kan ikke bestemme en kategori for den uploadede fil.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Open filhåndtering","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const n=e.de=e.de||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"Zugriff auf Standardarbeitsbereich nicht möglich.","Cannot determine a category for the uploaded file.":"Die Kategorie für die hochgeladene Datei konnte nicht bestimmt werden.","Open file manager":"Dateimanager öffnen"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.de=e.de||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Zugriff auf Standardarbeitsbereich nicht möglich.","Cannot determine a category for the uploaded file.":"Die Kategorie für die hochgeladene Datei konnte nicht bestimmt werden.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Dateimanager öffnen","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const n=e.el=e.el||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"Δεν είναι δυνατή η πρόσβαση στον προεπιλεγμένο χώρο εργασίας","Cannot determine a category for the uploaded file.":"Δεν μπορεί να οριστεί κατηγορία για το αρχείο που μεταφορτώθηκε.","Open file manager":"Άνοιγμα διαχειριστή αρχείων"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.el=e.el||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Δεν είναι δυνατή η πρόσβαση στον προεπιλεγμένο χώρο εργασίας","Cannot determine a category for the uploaded file.":"Δεν μπορεί να οριστεί κατηγορία για το αρχείο που μεταφορτώθηκε.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Άνοιγμα διαχειριστή αρχείων","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const n=e["en-au"]=e["en-au"]||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Cannot determine a category for the uploaded file.","Open file manager":"Open file manager"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e["en-au"]=e["en-au"]||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Cannot determine a category for the uploaded file.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Open file manager","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const e=a["es-co"]=a["es-co"]||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"No se pudo determinar una categoría para el archivo cargado.","Open file manager":"Abrir administrador de archivos"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e["es-co"]=e["es-co"]||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"No se pudo determinar una categoría para el archivo cargado.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Abrir administrador de archivos","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const a=e.es=e.es||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"No se puede acceder al espacio de trabajo predeterminado.","Cannot determine a category for the uploaded file.":"No se puede determinar una categoría para el archivo subido.","Open file manager":"Abrir gestor de archivos"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.es=e.es||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"No se puede acceder al espacio de trabajo predeterminado.","Cannot determine a category for the uploaded file.":"No se puede determinar una categoría para el archivo subido.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Abrir gestor de archivos","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const e=a.et=a.et||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"Puudub juurdepääs vaiketööruumile.","Cannot determine a category for the uploaded file.":"Ei suuda üles laaditud faili kategooriat tuvastada.","Open file manager":"Ava failihaldur"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.et=e.et||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Puudub juurdepääs vaiketööruumile.","Cannot determine a category for the uploaded file.":"Ei suuda üles laaditud faili kategooriat tuvastada.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Ava failihaldur","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const n=a.fa=a.fa||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"فضای کاری پیش فرض قابل دسترس نیست.","Cannot determine a category for the uploaded file.":"نمی توان یک دسته برای فایل آپلود شده تعیین کرد","Open file manager":"مدیریت فایل را باز کنید"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.fa=e.fa||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"فضای کاری پیش فرض قابل دسترس نیست.","Cannot determine a category for the uploaded file.":"نمی توان یک دسته برای فایل آپلود شده تعیین کرد","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"مدیریت فایل را باز کنید","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(t){const a=t.fi=t.fi||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Oletustyötilan käyttöoikeudet puuttuvat.","Cannot determine a category for the uploaded file.":"Emme voi määrittää ladatun tiedoston kategoriaa.","Open file manager":"Avaa tiedostonhallinnointityökalu"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const t=e.fi=e.fi||{};t.dictionary=Object.assign(t.dictionary||{},{"Cannot access default workspace.":"Oletustyötilan käyttöoikeudet puuttuvat.","Cannot determine a category for the uploaded file.":"Emme voi määrittää ladatun tiedoston kategoriaa.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Avaa tiedostonhallinnointityökalu","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const i=e.fr=e.fr||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Impossible d'accéder à l'espace de travail par défaut.","Cannot determine a category for the uploaded file.":"Impossible de déterminer une catégorie pour le fichier téléchargé.","Open file manager":"Ouvrir le gestionnaire de fichiers"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.fr=e.fr||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Impossible d'accéder à l'espace de travail par défaut.","Cannot determine a category for the uploaded file.":"Impossible de déterminer une catégorie pour le fichier téléchargé.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Ouvrir le gestionnaire de fichiers","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const o=e.gl=e.gl||{};o.dictionary=Object.assign(o.dictionary||{},{"Cannot access default workspace.":"Non é posíbel acceder ao espazo de traballo predeterminado.","Cannot determine a category for the uploaded file.":"Non é posíbel determinar unha categoría para o ficheiro enviado.","Open file manager":"Abrir o xestor de ficheiros"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.gl=e.gl||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Non é posíbel acceder ao espazo de traballo predeterminado.","Cannot determine a category for the uploaded file.":"Non é posíbel determinar unha categoría para o ficheiro enviado.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Abrir o xestor de ficheiros","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const n=e.he=e.he||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"אין גישה למרחב העבודה של ברירת המחדל.","Cannot determine a category for the uploaded file.":"לא ניתן לקבוע קטגוריה עבור הקובץ שהועלה.","Open file manager":"פתח את מנהל הקבצים"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.he=e.he||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"אין גישה למרחב העבודה של ברירת המחדל.","Cannot determine a category for the uploaded file.":"לא ניתן לקבוע קטגוריה עבור הקובץ שהועלה.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"פתח את מנהל הקבצים","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.hi=n.hi||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"डिफ़ॉल्ट वर्कस्पेस को ऐक्सेस नहीं किया जा सकता.","Cannot determine a category for the uploaded file.":"अपलोड की गई फ़ाइल के लिए एक केटेगरी डिटर्माइन नहीं कर पा रहें.","Open file manager":"फाइल मैनेजर खोलें"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.hi=e.hi||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"डिफ़ॉल्ट वर्कस्पेस को ऐक्सेस नहीं किया जा सकता.","Cannot determine a category for the uploaded file.":"अपलोड की गई फ़ाइल के लिए एक केटेगरी डिटर्माइन नहीं कर पा रहें.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"फाइल मैनेजर खोलें","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const t=e.hr=e.hr||{};t.dictionary=Object.assign(t.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Nije moguće utvrditi kategoriju prenesene datoteke.","Open file manager":"Otvori upravitelj datoteka"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const t=e.hr=e.hr||{};t.dictionary=Object.assign(t.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Nije moguće utvrditi kategoriju prenesene datoteke.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Otvori upravitelj datoteka","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const t=e.hu=e.hu||{};t.dictionary=Object.assign(t.dictionary||{},{"Cannot access default workspace.":"Nem lehetséges hozzáférni az alapértelmezett munkaterülethez.","Cannot determine a category for the uploaded file.":"Nem sikerült meghatározni a feltöltött fájl kategóriáját.","Open file manager":"Fájlkezelő megnyitása"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const t=e.hu=e.hu||{};t.dictionary=Object.assign(t.dictionary||{},{"Cannot access default workspace.":"Nem lehetséges hozzáférni az alapértelmezett munkaterülethez.","Cannot determine a category for the uploaded file.":"Nem sikerült meghatározni a feltöltött fájl kategóriáját.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Fájlkezelő megnyitása","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const e=a.id=a.id||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"Tidak dapat mengakses ruang kerja baku.","Cannot determine a category for the uploaded file.":"Tak dapat menentukan kategori untuk berkas yang terunggah.","Open file manager":"Buka manajer berkas"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.id=e.id||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Tidak dapat mengakses ruang kerja baku.","Cannot determine a category for the uploaded file.":"Tak dapat menentukan kategori untuk berkas yang terunggah.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Buka manajer berkas","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const i=e.it=e.it||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Impossibile accedere all'area di lavoro predefinita.","Cannot determine a category for the uploaded file.":"Impossibile determinare la categoria del file caricato.","Open file manager":"Apri il gestore dei file"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.it=e.it||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Impossibile accedere all'area di lavoro predefinita.","Cannot determine a category for the uploaded file.":"Impossibile determinare la categoria del file caricato.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Apri il gestore dei file","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const n=a.ja=a.ja||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"デフォルトワークスペースにアクセスできません。","Cannot determine a category for the uploaded file.":"アップロードされたファイルのカテゴリを特定することができません。","Open file manager":"ファイルマネージャーを開く"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.ja=e.ja||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"デフォルトワークスペースにアクセスできません。","Cannot determine a category for the uploaded file.":"アップロードされたファイルのカテゴリを特定することができません。","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"ファイルマネージャーを開く","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.ko=n.ko||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"기본 작업 공간에 액세스할 수 없습니다.","Cannot determine a category for the uploaded file.":"업로드된 파일의 카테고리를 확인할 수 없습니다.","Open file manager":"파일 관리자 열기"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.ko=e.ko||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"기본 작업 공간에 액세스할 수 없습니다.","Cannot determine a category for the uploaded file.":"업로드된 파일의 카테고리를 확인할 수 없습니다.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"파일 관리자 열기","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const i=a.lt=a.lt||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Negalima pasiekti numatytosios darbo erdvės.","Cannot determine a category for the uploaded file.":"Negalima apibrėžti įkelto failo kategorijos.","Open file manager":"Atidaryti failų tvarkyklę"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.lt=e.lt||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Negalima pasiekti numatytosios darbo erdvės.","Cannot determine a category for the uploaded file.":"Negalima apibrėžti įkelto failo kategorijos.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Atidaryti failų tvarkyklę","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const e=a.lv=a.lv||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"Nevar piekļūt noklusējuma darbvietai.","Cannot determine a category for the uploaded file.":"Nav iespējams noteikt augšupielādētā faila kategoriju","Open file manager":"Atvērt failu pārvaldnieku"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.lv=e.lv||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Nevar piekļūt noklusējuma darbvietai.","Cannot determine a category for the uploaded file.":"Nav iespējams noteikt augšupielādētā faila kategoriju","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Atvērt failu pārvaldnieku","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const n=a.ms=a.ms||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"Tidak dapat mengakses ruang kerja lalai.","Cannot determine a category for the uploaded file.":"Gagal menentukan kategori bagi fail yang dimuat naik.","Open file manager":"Buka pengurus fail"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.ms=e.ms||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Tidak dapat mengakses ruang kerja lalai.","Cannot determine a category for the uploaded file.":"Gagal menentukan kategori bagi fail yang dimuat naik.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Buka pengurus fail","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const n=e.nl=e.nl||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"Geen toegang mogelijk tot standaard werkplek.","Cannot determine a category for the uploaded file.":"Kan geen categorie bepalen voor het geüploade bestand.","Open file manager":"Open bestandsmanager"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.nl=e.nl||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Geen toegang mogelijk tot standaard werkplek.","Cannot determine a category for the uploaded file.":"Kan geen categorie bepalen voor het geüploade bestand.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Open bestandsmanager","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const n=e.no=e.no||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"Får ikke tilgang til standard arbeidsflate.","Cannot determine a category for the uploaded file.":"Kunne ikke avgjøre kategori for den opplastede filen.","Open file manager":"Åpne filutforsker"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.no=e.no||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Får ikke tilgang til standard arbeidsflate.","Cannot determine a category for the uploaded file.":"Kunne ikke avgjøre kategori for den opplastede filen.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Åpne filutforsker","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const o=e.pl=e.pl||{};o.dictionary=Object.assign(o.dictionary||{},{"Cannot access default workspace.":"Nie można uzyskać dostępu do domyślnego obszaru roboczego.","Cannot determine a category for the uploaded file.":"Nie można ustalić kategorii przesłanego pliku.","Open file manager":"Otwórz menedżer plików"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const o=e.pl=e.pl||{};o.dictionary=Object.assign(o.dictionary||{},{"Cannot access default workspace.":"Nie można uzyskać dostępu do domyślnego obszaru roboczego.","Cannot determine a category for the uploaded file.":"Nie można ustalić kategorii przesłanego pliku.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Otwórz menedżer plików","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const o=a["pt-br"]=a["pt-br"]||{};o.dictionary=Object.assign(o.dictionary||{},{"Cannot access default workspace.":"Não é possível acessar o espaço de trabalho padrão.","Cannot determine a category for the uploaded file.":"Não foi possível determinar a categoria para o arquivo enviado.","Open file manager":"Abrir gerenciador de arquivos"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e["pt-br"]=e["pt-br"]||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Não é possível acessar o espaço de trabalho padrão.","Cannot determine a category for the uploaded file.":"Não foi possível determinar a categoria para o arquivo enviado.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Abrir gerenciador de arquivos","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const o=e.pt=e.pt||{};o.dictionary=Object.assign(o.dictionary||{},{"Cannot access default workspace.":"Não é possível aceder ao espaço de trabalho padrão.","Cannot determine a category for the uploaded file.":"Não é possível determinar a categoria do ficheiro carregado.","Open file manager":"Abrir gestor de ficheiros"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.pt=e.pt||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Não é possível aceder ao espaço de trabalho padrão.","Cannot determine a category for the uploaded file.":"Não é possível determinar a categoria do ficheiro carregado.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Abrir gestor de ficheiros","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(i){const e=i.ro=i.ro||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"Nu poți accesa spațiul de lucru implicit.","Cannot determine a category for the uploaded file.":"Categoria fișierului încărcat nu poate fi stabilită.","Open file manager":"Deschidere manager fișiere"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.ro=e.ro||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Nu poți accesa spațiul de lucru implicit.","Cannot determine a category for the uploaded file.":"Categoria fișierului încărcat nu poate fi stabilită.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Deschidere manager fișiere","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.ru=n.ru||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"Не удается получить доступ к рабочему пространству по умолчанию.","Cannot determine a category for the uploaded file.":"Не удаётся определить категорию для загруженного файла.","Open file manager":"Открыть менеджер файлов"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.ru=e.ru||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Не удается получить доступ к рабочему пространству по умолчанию.","Cannot determine a category for the uploaded file.":"Не удаётся определить категорию для загруженного файла.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Открыть менеджер файлов","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const e=a.sk=a.sk||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"Nie je možné získať prístup k predvolenému pracovnému priestoru.","Cannot determine a category for the uploaded file.":"Neznáma kategória pre nahratý súbor.","Open file manager":"Otvoriť manažér súborov"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.sk=e.sk||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Nie je možné získať prístup k predvolenému pracovnému priestoru.","Cannot determine a category for the uploaded file.":"Neznáma kategória pre nahratý súbor.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Otvoriť manažér súborov","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(e){const a=e.sq=e.sq||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Nuk mund të përcaktohet kategori për skedarin e ngarkuar.","Open file manager":"Hap menaxhuesin e skedarëve"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.sq=e.sq||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Nuk mund të përcaktohet kategori për skedarin e ngarkuar.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Hap menaxhuesin e skedarëve","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const e=a["sr-latn"]=a["sr-latn"]||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Nije moguće odrediti kategoriju za otpremljenu datoteku.","Open file manager":"Otvori upravljač datotekama"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e["sr-latn"]=e["sr-latn"]||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Nije moguće pristupiti podrazumevanom radnom prostoru.","Cannot determine a category for the uploaded file.":"Nije moguće odrediti kategoriju za otpremljenu datoteku.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Otvori upravljač datotekama","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(o){const e=o.sr=o.sr||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"Nije moguće pristupiti podrazumevanom radnom prostoru.","Cannot determine a category for the uploaded file.":"Није могуће одредити категорију за отпремлјену датотеку.","Open file manager":"Oтвори управљач датотекама."})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.sr=e.sr||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Nije moguće pristupiti podrazumevanom radnom prostoru.","Cannot determine a category for the uploaded file.":"Није могуће одредити категорију за отпремлјену датотеку.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Oтвори управљач датотекама.","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const n=a.sv=a.sv||{};n.dictionary=Object.assign(n.dictionary||{},{"Cannot access default workspace.":"Kan inte komma åt standardarbetsytan.","Cannot determine a category for the uploaded file.":"Kan inte avgöra kategorin på den uppladdade filen.","Open file manager":"Öppna filhanterare"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const a=e.sv=e.sv||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"Kan inte komma åt standardarbetsytan.","Cannot determine a category for the uploaded file.":"Kan inte avgöra kategorin på den uppladdade filen.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Öppna filhanterare","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.th=n.th||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"ไม่สามารถเข้าถึงพื้นที่ทำงานเริ่มต้น","Cannot determine a category for the uploaded file.":"ไม่สามารถกำหนดหมวดหมู่สำหรับไฟล์ที่อัปโหลด","Open file manager":"เปิดเครื่องมือจัดการไฟล์"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.th=e.th||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"ไม่สามารถเข้าถึงพื้นที่ทำงานเริ่มต้น","Cannot determine a category for the uploaded file.":"ไม่สามารถกำหนดหมวดหมู่สำหรับไฟล์ที่อัปโหลด","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"เปิดเครื่องมือจัดการไฟล์","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(a){const i=a.tr=a.tr||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Varsayılan çalışma alanına erişilemiyor.","Cannot determine a category for the uploaded file.":"Yüklenen dosya için bir kategori belirlenemiyor.","Open file manager":"Dosya yöneticisini aç"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.tr=e.tr||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Varsayılan çalışma alanına erişilemiyor.","Cannot determine a category for the uploaded file.":"Yüklenen dosya için bir kategori belirlenemiyor.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Dosya yöneticisini aç","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.ug=n.ug||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"كۆڭۈلدىكى خىزمەت بوشلۇقىنى زىيارەت قىلالمايدۇ","Cannot determine a category for the uploaded file.":"يۈكلەيدىغان ھۆججەتنىڭ تۈرىنى جەزملىيەلمىدى.","Open file manager":"ھۆججەت باشقۇرغۇچنى ئاچ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.ug=e.ug||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"كۆڭۈلدىكى خىزمەت بوشلۇقىنى زىيارەت قىلالمايدۇ","Cannot determine a category for the uploaded file.":"يۈكلەيدىغان ھۆججەتنىڭ تۈرىنى جەزملىيەلمىدى.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"ھۆججەت باشقۇرغۇچنى ئاچ","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.uk=n.uk||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"Немає доступу до робочого простору за замовчуванням.","Cannot determine a category for the uploaded file.":"Не вдається визначити категорію для завантаженого файлу.","Open file manager":"Відкрити менеджер файлів"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.uk=e.uk||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Немає доступу до робочого простору за замовчуванням.","Cannot determine a category for the uploaded file.":"Не вдається визначити категорію для завантаженого файлу.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Відкрити менеджер файлів","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.ur=n.ur||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"اپلوڈ کی گئی فائل کا ذمرے کا تعین نہیں ہو سکا","Open file manager":"فائل مینیجر کھولیں"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.ur=e.ur||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"اپلوڈ کی گئی فائل کا ذمرے کا تعین نہیں ہو سکا","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"فائل مینیجر کھولیں","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const a=n.uz=n.uz||{};a.dictionary=Object.assign(a.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Yuklangan fayl uchun toifani aniqlab bo‘lmadi.","Open file manager":"Fayl menejerini ochish"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.uz=e.uz||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"","Cannot determine a category for the uploaded file.":"Yuklangan fayl uchun toifani aniqlab bo‘lmadi.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Fayl menejerini ochish","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const t=n.vi=n.vi||{};t.dictionary=Object.assign(t.dictionary||{},{"Cannot access default workspace.":"Không thể truy cập vào không gian làm việc mặc định.","Cannot determine a category for the uploaded file.":"Không thể xác định danh mục cho tệp được tải lên.","Open file manager":"Mở trình quản lý tệp"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.vi=e.vi||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"Không thể truy cập vào không gian làm việc mặc định.","Cannot determine a category for the uploaded file.":"Không thể xác định danh mục cho tệp được tải lên.","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"Mở trình quản lý tệp","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n["zh-cn"]=n["zh-cn"]||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"无法访问默认工作区","Cannot determine a category for the uploaded file.":"无法确定上传文件的类别。","Open file manager":"打开文件管理器"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e["zh-cn"]=e["zh-cn"]||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"无法访问默认工作区","Cannot determine a category for the uploaded file.":"无法确定上传文件的类别。","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"打开文件管理器","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -1 +1 @@
1
- !function(n){const e=n.zh=n.zh||{};e.dictionary=Object.assign(e.dictionary||{},{"Cannot access default workspace.":"無法存取預設工作區。","Cannot determine a category for the uploaded file.":"無法確定上傳檔案的分類。","Open file manager":"開啟檔案管理程式"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(e){const i=e.zh=e.zh||{};i.dictionary=Object.assign(i.dictionary||{},{"Cannot access default workspace.":"無法存取預設工作區。","Cannot determine a category for the uploaded file.":"無法確定上傳檔案的分類。","Edit image":"","Failed to determine category of edited image.":"","Open file manager":"開啟檔案管理程式","Processing the edited image.":"","Server failed to process the image.":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -4,5 +4,6 @@
4
4
  "Cannot access default workspace.": "A message is displayed when the user is not authorised to access the CKBox workspace configured as default one.",
5
5
  "Edit image": "Image toolbar button tooltip for opening a dialog to manipulate the image.",
6
6
  "Processing the edited image.": "A message stating that image editing is in progress.",
7
- "Server failed to process the image.": "A message is displayed when the server fails to process an image or doesn't respond."
7
+ "Server failed to process the image.": "A message is displayed when the server fails to process an image or doesn't respond.",
8
+ "Failed to determine category of edited image.": "A message is displayed when category of the image user wants to edit can't be determined."
8
9
  }