1import{Accessibility as T,Command as R,CommandCollection as F,Context as U,ContextPlugin as L,EditingKeystrokeHandler as A,Editor as K,ElementApiMixin as w,MultiCommand as y,PendingActions as I,Plugin as c,_DEFAULT_ACCESSIBILITY_GROUP_ID as P,_getEditorUsageData as q,attachToForm as O,secureSourceElement as b}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-core$dist$index.js.js";import{Base64UploadAdapter as S,FileReader as D,FileRepository as s,SimpleUploadAdapter as v}from"../../../frontend-editor-ckeditor-web/__liferay__/exports/@ckeditor$ckeditor5-upload$dist$index.js.js";var p="ckCsrfToken",h=40,C="abcdefghijklmnopqrstuvwxyz0123456789";function g(){let o=m(p);return(!o||o.length!=h)&&(o=_(h),f(p,o)),o}function m(o){o=o.toLowerCase();let e=document.cookie.split(";");for(let t of e){let r=t.split("=");if(decodeURIComponent(r[0].trim().toLowerCase())===o)return decodeURIComponent(r[1])}return null}function f(o,e){document.cookie=encodeURIComponent(o)+"="+encodeURIComponent(e)+";path=/"}function _(o){let e="",t=new Uint8Array(o);window.crypto.getRandomValues(t);for(let r=0;r<t.length;r++){let i=C.charAt(t[r]%C.length);e+=Math.random()>.5?i.toUpperCase():i}return e}var a=class extends c{static get requires(){return[s]}static get pluginName(){return"CKFinderUploadAdapter"}static get isOfficialPlugin(){return!0}init(){let e=this.editor.config.get("ckfinder.uploadUrl");e&&(this.editor.plugins.get(s).createUploadAdapter=t=>new d(t,e,this.editor.t))}},d=class{loader;url;t;xhr;constructor(e,t,r){this.loader=e,this.url=t,this.t=r}upload(){return this.loader.file.then(e=>new Promise((t,r)=>{this._initRequest(),this._initListeners(t,r,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){let e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,r){let i=this.xhr,l=this.loader,k=this.t,u=k("Cannot upload file:")+` ${r.name}.`;i.addEventListener("error",()=>t(u)),i.addEventListener("abort",()=>t()),i.addEventListener("load",()=>{let n=i.response;if(!n||!n.uploaded)return t(n&&n.error&&n.error.message?n.error.message:u);e({default:n.url})});i.upload&&i.upload.addEventListener("progress",n=>{n.lengthComputable&&(l.uploadTotal=n.total,l.uploaded=n.loaded)})}_sendRequest(e){let t=new FormData;t.append("upload",e),t.append("ckCsrfToken",g()),this.xhr.send(t)}};export{a as CKFinderUploadAdapter,m as _getCKFinderCookie,g as _getCKFinderCsrfToken,f as _setCKFinderCookie}; 2/*! Bundled license information: 3 4@ckeditor/ckeditor5-adapter-ckfinder/dist/index.js: 5 (** 6 * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. 7 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options 8 *) 9 (* istanbul ignore else -- @preserve *) 10*/ 11//# sourceMappingURL=@ckeditor$ckeditor5-adapter-ckfinder$dist$index.js.(A7RLYGOE).js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.