@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20260104.0 → 0.0.0-nightly-next-20260105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/ui/uploadcarecontroller.js +2 -2
- package/src/ui/uploadcareformview.js +1 -1
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x2e0fac,ObservableMixin as _0x18c15a}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x1a460a}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x1ac5a7}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x1d790d}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x5a7516}from'../../utils/uploadutils.js';import{getImageUrls as _0x101311,getImageDimension as _0x5e7389}from'../../utils/editingutils.js';import{isAncestor as _0x35d780}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x18c15a(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x51809a,_0x7ed88,_0x1c115a){super(),this['_editor']=_0x51809a,this['_dialog']=_0x7ed88,this['_imageElement']=_0x1c115a,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x48d076=this['_imageElement'],_0x199216=_0x48d076['getAttribute']('uploadcareImageId'),_0x11d185=_0x48d076['getAttribute']('src');if(_0x199216)await this['_loadImageInfo'](_0x199216,_0x11d185);else{if(this['_imageCache']['has'](_0x11d185)){const _0x3ace58=this['_imageCache']['get'](_0x11d185);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3ace58['url'],this['imageDimension']=_0x3ace58['dimension'],this['imageId']=_0x3ace58['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x26638d}=this['_editor'],t=_0x26638d['t'],_0x46c4bf=new _0x1d790d(_0x26638d,this['imageStatus'],this['_attributes']);_0x46c4bf['bind']('status')['to'](this,'imageStatus'),_0x46c4bf['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x46c4bf['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x46c4bf['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x46c4bf,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1ac5a7,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x46c4bf,'position':_0x1a460a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x46c4bf['focus']();},'onHide':()=>{_0x46c4bf['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x43aad4=>!_0x35d780(_0x43aad4,_0x46c4bf['element'])}});}['_loadImageInfo'](_0x433239,_0x50b848){return _0x5a7516['getInfo'](_0x433239,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x558c5d=>{const {width:_0x3fcbd2,height:_0x369576}=_0x558c5d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x50b848,this['imageDimension']={'width':_0x3fcbd2,'height':_0x369576},this['imageId']=_0x433239;})['catch'](_0x3aa8d8=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3aa8d8['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x111ed8,_0x83e3ba){return this['_getImageAsFile'](_0x111ed8)['then'](_0x3ad967=>_0x5a7516['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x83e3ba['signal'],'file':_0x3ad967,'onProgress':_0x36b701=>{_0x36b701&&_0x36b701['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x36b701['value']));}}))['then'](_0x581a8a=>{const {width:_0x2c2379,height:_0x43dc40}=_0x581a8a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x581a8a['cdnUrl'],this['imageDimension']={'width':_0x2c2379,'height':_0x43dc40},this['imageId']=_0x581a8a['uuid'],this['imageUploadProgress']=null;const _0x1e5c5c=_0x111ed8['getAttribute']('src');this['_imageCache']['set'](_0x1e5c5c,{'id':_0x581a8a['uuid'],'url':_0x581a8a['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1a2fa1=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1a2fa1['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x18c5c7,_0x434c0d){_0x18c5c7['on']('apply',(_0x5dee1e,_0x34e198)=>{this['_replaceImage'](_0x434c0d,_0x34e198['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x18c5c7['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x18c5c7['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0xddc7d8,_0x45a7ea,_0x315cb9){const _0x31b07d=this['_editor'],{width:_0x229d64,height:_0x1024cd}=_0x5e7389(_0x45a7ea,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4dd22e,imageSources:_0x29b12a}=_0x101311(_0x45a7ea,_0x229d64);_0x31b07d['model']['change'](_0x2c2686=>{if('$graveyard'===_0xddc7d8['root']['rootName']){_0x31b07d['execute']('insertImage',{'imageType':_0xddc7d8['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0xddc7d8['getAttributes']()),'uploadcareImageId':_0x315cb9,'src':_0x4dd22e,'sources':_0x29b12a,'width':_0x229d64,'height':_0x1024cd}});const _0x471ca7=_0xddc7d8['getChildren']();_0xddc7d8=_0x31b07d['model']['document']['selection']['getSelectedElement']();for(const _0x39396e of _0x471ca7)_0x2c2686['append'](_0x2c2686['cloneElement'](_0x39396e),_0xddc7d8);}else _0x2c2686['setSelection'](_0xddc7d8,'on'),_0x31b07d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0xddc7d8['getAttributes']()),'uploadcareImageId':_0x315cb9,'src':_0x4dd22e,'sources':_0x29b12a,'width':_0x229d64,'height':_0x1024cd},_0xddc7d8);_0x2c2686['setSelection'](_0xddc7d8,'on');});}async['_getImageAsFile'](_0x483946){const _0x5d65c3=_0x2e0fac['window'],_0x34897b=_0x2e0fac['document']['location']['href'],_0x3f8f07=new _0x5d65c3['URL'](_0x483946['getAttribute']('src'),_0x34897b);if('data:'===_0x3f8f07['protocol']){const _0x165c46=_0x3f8f07['href']['split'](','),_0x38e3bd=_0x165c46[0x0]['match'](/:(.*?);/)[0x1],_0x742b8=_0x38e3bd['split']('/')[0x1],_0x1dc38a=_0x5d65c3['atob'](_0x165c46[_0x165c46['length']-0x1]);let _0x1901e2=_0x1dc38a['length'];const _0x6a4ea6=new _0x5d65c3['Uint8Array'](_0x1901e2);for(;_0x1901e2--;)_0x6a4ea6[_0x1901e2]=_0x1dc38a['charCodeAt'](_0x1901e2);return new _0x5d65c3['File']([_0x6a4ea6],'image.'+_0x742b8,{'type':_0x38e3bd});}const _0x16db71=_0x3f8f07['href']['split']('/'),_0xbd87d7=_0x16db71[_0x16db71['length']-0x1],_0x18c784=_0xbd87d7['split']('.')[0x1];return _0x5d65c3['fetch'](_0x3f8f07['href'])['then'](_0x45669a=>_0x45669a['clone']()['blob']())['then'](_0x328bcc=>new _0x5d65c3['File']([_0x328bcc],_0xbd87d7,{'type':'image/'+_0x18c784}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x5aba(_0x45523b,_0x22aa91){const _0x28c962=_0x28c9();return _0x5aba=function(_0x5aba4a,_0x402f8a){_0x5aba4a=_0x5aba4a-0x95;let _0x219181=_0x28c962[_0x5aba4a];return _0x219181;},_0x5aba(_0x45523b,_0x22aa91);}function _0x28c9(){const _0xce3aa0=['1062018dCLTba','uc-cloud-image-editor','2518764qUxihX','2926490xItbvv','set','18OgCZQs','1445830BQVWol','uc-light','24FGyibL','setTemplate','bindTemplate','ck-uploadcare-theme','269694GcpGYm','641110KaojLb','image-edit','398583xxWKAX','imageSrc'];_0x28c9=function(){return _0xce3aa0;};return _0x28c9();}(function(_0x962f71,_0x4a79dd){const _0x39bd41=_0x5aba,_0x394e69=_0x962f71();while(!![]){try{const _0x318f58=-parseInt(_0x39bd41(0xa1))/0x1+parseInt(_0x39bd41(0x98))/0x2+parseInt(_0x39bd41(0xa3))/0x3+parseInt(_0x39bd41(0xa5))/0x4+-parseInt(_0x39bd41(0x9f))/0x5*(parseInt(_0x39bd41(0x97))/0x6)+-parseInt(_0x39bd41(0x95))/0x7+-parseInt(_0x39bd41(0x9a))/0x8*(parseInt(_0x39bd41(0x9e))/0x9);if(_0x318f58===_0x4a79dd)break;else _0x394e69['push'](_0x394e69['shift']());}catch(_0x4b2dcd){_0x394e69['push'](_0x394e69['shift']());}}}(_0x28c9,0x656a3));import{View as _0x5697bd}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x5697bd{constructor(_0x2b581a,_0x3f5225){const _0x243fd2=_0x5aba;super(_0x2b581a);const _0x3e7ad0=this[_0x243fd2(0x9c)];this[_0x243fd2(0x96)](_0x243fd2(0xa2),''),this[_0x243fd2(0x9b)]({'tag':_0x243fd2(0xa4),'attributes':{..._0x3f5225,'class':[_0x243fd2(0x99),_0x243fd2(0x9d)],'ctx-name':_0x243fd2(0xa0),'cdn-url':_0x3e7ad0['to'](_0x243fd2(0xa2))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x1f6e26}from'ckeditor5/src/icons.js';import{ButtonView as _0x3a963d,IconView as _0x3aa2a0,View as _0x6ea6c6}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x6ea6c6{constructor(_0x433299){super(_0x433299);const t=_0x433299['t'];this['set']('errorType',null);const _0x31336b=new _0x3a963d(_0x433299);_0x31336b['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x31336b['withText']=!0x0,_0x31336b['class']='ck-button-action',_0x31336b['on']('execute',()=>{this['fire']('retry');}),_0x31336b['bind']('isVisible')['to'](this,'errorType',_0x2289d4=>'NotFound'!==_0x2289d4);const _0x500d45=new _0x3aa2a0();_0x500d45['content']=_0x1f6e26,_0x500d45['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x2e8410=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x500d45,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x2e8410['to']('errorType',_0x5e20ba=>t('NotFound'!==_0x5e20ba?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x31336b]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{SpinnerView as
|
|
23
|
+
import{SpinnerView as _0x5a3a64,View as _0x592e2f}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x592e2f{constructor(_0x39f9a0){super(_0x39f9a0);const t=_0x39f9a0['t'],_0x52b053=this['bindTemplate'],_0x18a783=new _0x5a3a64();_0x18a783['isVisible']=!0x0,this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__loading'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__loading-spinner']},'children':[_0x18a783,{'text':_0x52b053['to']('imageUploadProgress',_0x273b20=>t('Loading\x20image...')+'\x20('+(_0x273b20||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4a80a8=_0x579e;function _0x3e5a(){const _0x447ba8=['observe','apply','_editingView','toLowerCase','91749ZjUwtI','8PHAjIo','_waitForImageEditorComponent','nodeName','5NVgRif','render','122968PwYQAh','ready','detail','set','cdnUrl','add','addEventListener','uc-cloud-image-editor','15130uhqHDZ','disconnect','target','change:status','2388591cBkjTL','_items','querySelector','ck-reset_all-excluded','_setView','fire','3531fmWmcW','addMany','_errorView','div','uploading','clear','element','_addErrorViewListeners','setTemplate','focus','_focusableView','length','762816vaoNAZ','once','error','415479vBxEZW','retry','createCollection','ck-uploadcare-form','status','4ZvpTDP','186786RvCcpq','_loadingView','_addUploadcareImageEditorListeners','addedNodes','filter','getFocusableElement','cancel'];_0x3e5a=function(){return _0x447ba8;};return _0x3e5a();}(function(_0x1393be,_0x2c1703){const _0x2af0fd=_0x579e,_0x14c56e=_0x1393be();while(!![]){try{const _0x1b3ac6=-parseInt(_0x2af0fd(0x13f))/0x1+parseInt(_0x2af0fd(0x12d))/0x2*(parseInt(_0x2af0fd(0x128))/0x3)+-parseInt(_0x2af0fd(0x125))/0x4+parseInt(_0x2af0fd(0x13d))/0x5*(-parseInt(_0x2af0fd(0x12e))/0x6)+parseInt(_0x2af0fd(0x139))/0x7*(-parseInt(_0x2af0fd(0x13a))/0x8)+-parseInt(_0x2af0fd(0x113))/0x9+-parseInt(_0x2af0fd(0x10f))/0xa*(-parseInt(_0x2af0fd(0x119))/0xb);if(_0x1b3ac6===_0x2c1703)break;else _0x14c56e['push'](_0x14c56e['shift']());}catch(_0x236c10){_0x14c56e['push'](_0x14c56e['shift']());}}}(_0x3e5a,0x22056));import{View as _0x15071e}from'ckeditor5/src/ui.js';import{UploadcareImageEditFormLoadingView as _0x5577d7}from'./uploadcareimageeditformloadingview.js';function _0x579e(_0x3d908c,_0x47b1e8){const _0x3e5a6e=_0x3e5a();return _0x579e=function(_0x579e70,_0x2968cd){_0x579e70=_0x579e70-0x10e;let _0x500cbc=_0x3e5a6e[_0x579e70];return _0x500cbc;},_0x579e(_0x3d908c,_0x47b1e8);}import{UploadcareImageEditFormErrorView as _0x499060}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x328f21}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x4a51f7}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x4a51f7{[_0x4a80a8(0x114)];[_0x4a80a8(0x12f)];[_0x4a80a8(0x11b)];[_0x4a80a8(0x137)];[_0x4a80a8(0x123)];constructor(_0x13024b,_0x31cc6d,_0xa58f7f){const _0x579082=_0x4a80a8;super(_0x13024b),this[_0x579082(0x114)]=this[_0x579082(0x12a)](),this[_0x579082(0x12f)]=new _0x5577d7(_0x13024b),this[_0x579082(0x11b)]=new _0x499060(_0x13024b),this[_0x579082(0x137)]=new _0x328f21(_0x13024b,_0xa58f7f),this[_0x579082(0x123)]=new _0x15071e(_0x13024b),this[_0x579082(0x123)][_0x579082(0x121)](this[_0x579082(0x133)]()),this[_0x579082(0x142)](_0x579082(0x12c),_0x31cc6d),this[_0x579082(0x121)]({'tag':_0x579082(0x11c),'attributes':{'class':['ck',_0x579082(0x116),_0x579082(0x12b)],'tabindex':'-1'},'children':this[_0x579082(0x114)]}),this[_0x579082(0x117)](),this[_0x579082(0x126)](_0x579082(0x13e),()=>{const _0x845143=_0x579082;this[_0x845143(0x13b)](this[_0x845143(0x11f)],_0x1ecb9c=>{const _0x741098=_0x845143;this[_0x741098(0x130)](_0x1ecb9c);});}),this['on'](_0x579082(0x112),()=>{const _0x5c9e65=_0x579082;this[_0x5c9e65(0x117)]();}),this[_0x579082(0x120)]();}[_0x4a80a8(0x122)](){const _0x2d8e7f=_0x4a80a8;this[_0x2d8e7f(0x11f)][_0x2d8e7f(0x122)]();}[_0x4a80a8(0x117)](){const _0x29565d=_0x4a80a8;switch(this[_0x29565d(0x114)][_0x29565d(0x11e)](),this[_0x29565d(0x12c)]){case _0x29565d(0x11d):this[_0x29565d(0x114)][_0x29565d(0x144)](this[_0x29565d(0x12f)]);break;case _0x29565d(0x127):this[_0x29565d(0x114)][_0x29565d(0x144)](this[_0x29565d(0x11b)]);break;case _0x29565d(0x140):this[_0x29565d(0x114)][_0x29565d(0x11a)]([this[_0x29565d(0x137)],this[_0x29565d(0x123)]]);}}[_0x4a80a8(0x13b)](_0x2a69e0,_0x49470c){const _0x95b444=_0x4a80a8,_0xcd846a=_0x95b444(0x10e),_0x3157ac=_0x2a69e0[_0x95b444(0x115)](_0xcd846a);if(_0x3157ac)return _0x49470c(_0x3157ac);const _0x3e4d72=new MutationObserver(_0x204b1=>{const _0x10e26a=_0x95b444,_0x54bf49=_0x204b1[_0x10e26a(0x132)](_0x3fecca=>_0x3fecca[_0x10e26a(0x111)]===_0x2a69e0&&_0x3fecca[_0x10e26a(0x131)][_0x10e26a(0x124)]>0x0&&_0x3fecca[_0x10e26a(0x131)][0x0][_0x10e26a(0x13c)][_0x10e26a(0x138)]()===_0xcd846a);_0x54bf49[_0x10e26a(0x124)]&&(_0x3e4d72[_0x10e26a(0x110)](),_0x49470c(_0x54bf49[0x0][_0x10e26a(0x131)][0x0]));});_0x3e4d72[_0x95b444(0x135)](_0x2a69e0,{'childList':!0x0,'subtree':!0x0});}[_0x4a80a8(0x130)](_0x241139){const _0x3f9a3c=_0x4a80a8;_0x241139[_0x3f9a3c(0x145)](_0x3f9a3c(0x136),_0x3e6518=>{const _0xbe0e92=_0x3f9a3c;this[_0xbe0e92(0x118)](_0xbe0e92(0x136),{'imageSrc':_0x3e6518[_0xbe0e92(0x141)][_0xbe0e92(0x143)]});}),_0x241139[_0x3f9a3c(0x145)](_0x3f9a3c(0x134),()=>{const _0x275b60=_0x3f9a3c;this[_0x275b60(0x118)](_0x275b60(0x134));});}[_0x4a80a8(0x120)](){const _0x169570=_0x4a80a8;this[_0x169570(0x11b)]['on'](_0x169570(0x129),()=>{const _0x53d77d=_0x169570;this[_0x53d77d(0x118)](_0x53d77d(0x129));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x302e01=_0x3d92;(function(_0x5191c1,_0x83267f){const _0x47ff7d=_0x3d92,_0x1049b6=_0x5191c1();while(!![]){try{const _0x4aba2c=-parseInt(_0x47ff7d(0xd0))/0x1*(-parseInt(_0x47ff7d(0xd8))/0x2)+-parseInt(_0x47ff7d(0xe5))/0x3+parseInt(_0x47ff7d(0xe0))/0x4+-parseInt(_0x47ff7d(0xdc))/0x5+parseInt(_0x47ff7d(0xdf))/0x6+parseInt(_0x47ff7d(0xdd))/0x7*(-parseInt(_0x47ff7d(0xde))/0x8)+-parseInt(_0x47ff7d(0xea))/0x9*(-parseInt(_0x47ff7d(0xe8))/0xa);if(_0x4aba2c===_0x83267f)break;else _0x1049b6['push'](_0x1049b6['shift']());}catch(_0x40c933){_0x1049b6['push'](_0x1049b6['shift']());}}}(_0x37b3,0x45caa));import{Command as _0x4c6bd6}from'ckeditor5/src/core.js';function _0x3d92(_0x20616d,_0x324fe0){const _0x37b31c=_0x37b3();return _0x3d92=function(_0x3d92fc,_0x3fe125){_0x3d92fc=_0x3d92fc-0xcf;let _0x56bff6=_0x37b31c[_0x3d92fc];return _0x56bff6;},_0x3d92(_0x20616d,_0x324fe0);}import{Dialog as _0x31bd87}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x16dbaa}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x2816ef}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x4c6bd6{[_0x302e01(0xd2)];static get[_0x302e01(0xe3)](){return[_0x31bd87];}[_0x302e01(0xd1)];constructor(_0x15644c){const _0x16bea5=_0x302e01;super(_0x15644c),this[_0x16bea5(0xd2)]=void 0x0,this[_0x16bea5(0xd1)]=_0x2816ef(_0x15644c[_0x16bea5(0xe1)][_0x16bea5(0xd9)](_0x16bea5(0xd5))||[]),this[_0x16bea5(0xe2)]({'isActive':!0x1});}[_0x302e01(0xd6)](){const _0x564f28=_0x302e01,_0x153556=this[_0x564f28(0xe4)][_0x564f28(0xe6)][_0x564f28(0xdb)][_0x564f28(0xec)][_0x564f28(0xed)]();this[_0x564f28(0xe7)]=this[_0x564f28(0xd1)](_0x153556);}[_0x302e01(0xcf)](){const _0x22f2aa=_0x302e01;this[_0x22f2aa(0xd2)]&&(this[_0x22f2aa(0xee)](_0x22f2aa(0xeb)),this[_0x22f2aa(0xd2)]=void 0x0);const _0x15409a=this[_0x22f2aa(0xe4)][_0x22f2aa(0xe6)][_0x22f2aa(0xdb)][_0x22f2aa(0xec)][_0x22f2aa(0xed)]();_0x15409a&&(_0x15409a['is'](_0x22f2aa(0xda),_0x22f2aa(0xe9))||_0x15409a['is'](_0x22f2aa(0xda),_0x22f2aa(0xd4)))&&(this[_0x22f2aa(0xd2)]=new _0x16dbaa(this[_0x22f2aa(0xe4)],this[_0x22f2aa(0xe4)][_0x22f2aa(0xd7)][_0x22f2aa(0xd9)](_0x31bd87),_0x15409a),this[_0x22f2aa(0xd3)](_0x22f2aa(0xeb))['to'](this[_0x22f2aa(0xd2)],_0x22f2aa(0xeb)));}}function _0x37b3(){const _0x1edef8=['requires','editor','1606362tlPRzF','model','isEnabled','56850SSjrwJ','imageBlock','864dCjSzY','isActive','selection','getSelectedElement','unbind','execute','188827jXcXIG','_isEditable','imageEditController','bind','imageInline','uploadcare.allowExternalImagesEditing','refresh','plugins','4PhqAoG','get','element','document','2512730fzuwFM','13643FmERJb','56gkTTFg','737034mQlcxr','1165024jrGWOy','config','set'];_0x37b3=function(){return _0x1edef8;};return _0x37b3();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x900f7a=_0x41ec;(function(_0x209fe6,_0x4d793b){const _0x2ea236=_0x41ec,_0x480d9d=_0x209fe6();while(!![]){try{const _0x27ce05=parseInt(_0x2ea236(0x1c8))/0x1+parseInt(_0x2ea236(0x1c1))/0x2+parseInt(_0x2ea236(0x1c4))/0x3+-parseInt(_0x2ea236(0x1cc))/0x4*(-parseInt(_0x2ea236(0x1bc))/0x5)+parseInt(_0x2ea236(0x1c7))/0x6*(-parseInt(_0x2ea236(0x1cb))/0x7)+-parseInt(_0x2ea236(0x1c6))/0x8*(-parseInt(_0x2ea236(0x1c5))/0x9)+-parseInt(_0x2ea236(0x1c0))/0xa*(parseInt(_0x2ea236(0x1ca))/0xb);if(_0x27ce05===_0x4d793b)break;else _0x480d9d['push'](_0x480d9d['shift']());}catch(_0x2c178a){_0x480d9d['push'](_0x480d9d['shift']());}}}(_0x7fbd,0x1bc20));import{Plugin as _0x16e827}from'ckeditor5/src/core.js';import{Notification as _0x39bd88}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x16012c}from'./uploadcareimageeditcommand.js';function _0x7fbd(){const _0x545e1c=['35zOiUFp','UploadcareImageEditEditing','pluginName','init','5443730dvUTWB','403260IgGrhN','uploadcareImageReplace','isOfficialPlugin','385737qfreOm','1807911KRlnBg','8nOdDFQ','1458oqQPRH','133655dGqamF','commands','11bRRgst','3346uheqvu','62560YHNwEs','ImageEditing','ImageUtils','isPremiumPlugin','add','requires','uploadcareImageEdit'];_0x7fbd=function(){return _0x545e1c;};return _0x7fbd();}function _0x41ec(_0x478065,_0x5e6d15){const _0x7fbd4a=_0x7fbd();return _0x41ec=function(_0x41ecfe,_0x519266){_0x41ecfe=_0x41ecfe-0x1bc;let _0xfe5d92=_0x7fbd4a[_0x41ecfe];return _0xfe5d92;},_0x41ec(_0x478065,_0x5e6d15);}import{UploadcareImageReplaceCommand as _0x1b743e}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x217293}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x16e827{static get[_0x900f7a(0x1be)](){const _0x5c10f3=_0x900f7a;return _0x5c10f3(0x1bd);}static get[_0x900f7a(0x1d1)](){const _0x3cdfa0=_0x900f7a;return[_0x217293,_0x39bd88,_0x3cdfa0(0x1ce),_0x3cdfa0(0x1cd)];}static get[_0x900f7a(0x1c3)](){return!0x0;}static get[_0x900f7a(0x1cf)](){return!0x0;}[_0x900f7a(0x1bf)](){const _0x2e33f5=_0x900f7a,{editor:_0x4499e6}=this;_0x4499e6[_0x2e33f5(0x1c9)][_0x2e33f5(0x1d0)](_0x2e33f5(0x1d2),new _0x16012c(_0x4499e6)),_0x4499e6[_0x2e33f5(0x1c9)][_0x2e33f5(0x1d0)](_0x2e33f5(0x1c2),new _0x1b743e(_0x4499e6));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x44f71b}from'ckeditor5/src/core.js';import{ButtonView as _0x402da8}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x14ca08}from'ckeditor5/src/icons.js';import{createElement as _0x408c54}from'ckeditor5/src/utils.js';import'@uploadcare/file-uploader/web/uc-cloud-image-editor.min.css';import'../../theme/uploadcare-theme.css';export class UploadcareImageEditUI extends _0x44f71b{['_imageCache']=new Map();static get['pluginName'](){return'UploadcareImageEditUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['imageCache'](){return this['_imageCache'];}['init'](){const _0x2076da=this['editor'];_0x2076da['ui']['componentFactory']['add']('uploadcareImageEdit',_0x2f2090=>{const _0x75bd4a=_0x2076da['commands']['get']('uploadcareImageEdit'),_0x187b1d=new _0x402da8(_0x2f2090),t=_0x2f2090['t'];return _0x187b1d['set']({'icon':_0x14ca08,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x187b1d['bind']('isEnabled')['to'](_0x75bd4a),_0x187b1d['bind']('isOn')['to'](_0x75bd4a,'isActive'),this['listenTo'](_0x187b1d,'execute',()=>{_0x2076da['execute']('uploadcareImageEdit'),_0x2076da['editing']['view']['focus']();}),_0x187b1d;}),this['_initConfig']();}['_initConfig'](){const _0x54f255=_0x408c54(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x54f255),this['listenTo'](this['editor'],'destroy',()=>{_0x54f255['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
function _0x4225(_0x25e47d,_0x56207c){var _0x313bcb=_0x313b();return _0x4225=function(_0x4225e0,_0x521f45){_0x4225e0=_0x4225e0-0x189;var _0x8fb624=_0x313bcb[_0x4225e0];return _0x8fb624;},_0x4225(_0x25e47d,_0x56207c);}var _0x4cc643=_0x4225;(function(_0x503444,_0x22154d){var _0x5ce740=_0x4225,_0x194560=_0x503444();while(!![]){try{var _0x53ef5c=-parseInt(_0x5ce740(0x193))/0x1*(parseInt(_0x5ce740(0x18f))/0x2)+-parseInt(_0x5ce740(0x19c))/0x3*(parseInt(_0x5ce740(0x198))/0x4)+parseInt(_0x5ce740(0x189))/0x5*(-parseInt(_0x5ce740(0x19a))/0x6)+parseInt(_0x5ce740(0x18a))/0x7+parseInt(_0x5ce740(0x18b))/0x8+-parseInt(_0x5ce740(0x192))/0x9*(parseInt(_0x5ce740(0x19d))/0xa)+parseInt(_0x5ce740(0x18d))/0xb*(parseInt(_0x5ce740(0x195))/0xc);if(_0x53ef5c===_0x22154d)break;else _0x194560['push'](_0x194560['shift']());}catch(_0x50b9c2){_0x194560['push'](_0x194560['shift']());}}}(_0x313b,0x7711f));import{FocusTracker as _0x5ab4ea}from'ckeditor5/src/utils.js';import{View as _0xf7bfff,FocusCycler as _0x129cbe}from'ckeditor5/src/ui.js';function _0x313b(){var _0x305fff=['27647IvKfTe','true','1512036aeUOZl','div','createCollection','4204IabGPn','forwardCycle','62958DdaVFV','focusCycler','2319FtBFhC','9130rwuhkg','40roxVDs','5680269QMHDPF','793416bzwZAY','focusTracker','165AlUYBx','getFocusableElement','54WRXJYv','bindTemplate','fire','6606DcRdCL'];_0x313b=function(){return _0x305fff;};return _0x313b();}import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0xf7bfff{[_0x4cc643(0x18c)];[_0x4cc643(0x19b)];constructor(_0x37d376){var _0x21c629=_0x4cc643;super(_0x37d376),this[_0x21c629(0x18c)]=new _0x5ab4ea(),this[_0x21c629(0x19b)]=new _0x129cbe({'focusables':this[_0x21c629(0x197)](),'focusTracker':this[_0x21c629(0x18c)]});}[_0x4cc643(0x18e)](){var _0x1842cb=_0x4cc643;return{'tag':_0x1842cb(0x196),'attributes':{'aria-hidden':_0x1842cb(0x194),'tabindex':'0'},'on':{'focus':this[_0x1842cb(0x190)]['to'](()=>{var _0x475d4d=_0x1842cb;this[_0x475d4d(0x19b)][_0x475d4d(0x191)](_0x475d4d(0x199));})}};}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x950f82,_0x4b52f0){const _0x21a650=_0x4dba,_0x30f042=_0x950f82();while(!![]){try{const _0x3b43b5=-parseInt(_0x21a650(0x108))/0x1*(-parseInt(_0x21a650(0xef))/0x2)+parseInt(_0x21a650(0xf7))/0x3*(parseInt(_0x21a650(0xe5))/0x4)+parseInt(_0x21a650(0x10b))/0x5*(parseInt(_0x21a650(0xe9))/0x6)+-parseInt(_0x21a650(0xeb))/0x7+-parseInt(_0x21a650(0xfa))/0x8*(parseInt(_0x21a650(0xf4))/0x9)+parseInt(_0x21a650(0x10d))/0xa+parseInt(_0x21a650(0xfe))/0xb*(parseInt(_0x21a650(0xf1))/0xc);if(_0x3b43b5===_0x4b52f0)break;else _0x30f042['push'](_0x30f042['shift']());}catch(_0x2a62aa){_0x30f042['push'](_0x30f042['shift']());}}}(_0x4dbb,0x8a57a));function _0x4dba(_0x56684e,_0x13a6e8){const _0x4dbbc9=_0x4dbb();return _0x4dba=function(_0x4dba0f,_0x23fb69){_0x4dba0f=_0x4dba0f-0xd3;let _0x1e5f2c=_0x4dbbc9[_0x4dba0f];return _0x1e5f2c;},_0x4dba(_0x56684e,_0x13a6e8);}import{global as _0x31fe3a,DomEmitterMixin as _0x46805a}from'ckeditor5/src/utils.js';export function createEditabilityChecker(_0x43b1ff){const _0x5e075a=_0x4dba,_0x2f2eef=R(_0x43b1ff);return _0x2b96d6=>!(!_0x2b96d6||!_0x2b96d6['is'](_0x5e075a(0xf8),_0x5e075a(0xe7))&&!_0x2b96d6['is'](_0x5e075a(0xf8),_0x5e075a(0xd3)))&&(!!_0x2b96d6[_0x5e075a(0x10a)](_0x5e075a(0xf9))||!!_0x2b96d6[_0x5e075a(0x10a)](_0x5e075a(0x107))&&_0x2f2eef(_0x2b96d6[_0x5e075a(0xdb)](_0x5e075a(0x107))));}export function getImageUrls(_0x4971b7,_0x2e14cd){const _0x43bde3=_0x4dba,_0x2acfcd=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960][_0x43bde3(0xf6)](_0x47cf16=>_0x47cf16<=_0x2e14cd)[_0x43bde3(0x109)](_0x4a2fe6=>_0x4971b7[_0x43bde3(0xe3)](/\/$/,'')+_0x43bde3(0xd8)+_0x4a2fe6+_0x43bde3(0xde)+_0x4a2fe6+'w');return{'imageFallbackUrl':_0x4971b7,'imageSources':[{'srcset':_0x2acfcd[_0x43bde3(0xf5)](',\x20'),'sizes':_0x43bde3(0xe4)+_0x2e14cd+_0x43bde3(0xea)+_0x2e14cd+'px','type':_0x43bde3(0x104)}]};}export function getImageDimension(_0x45dfdc,_0x1f2ef9,_0x55bb00){const _0x2e160c=_0x4dba,_0x1d83c6=_0x45dfdc[_0x2e160c(0xe1)](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1d83c6?parseInt(_0x1d83c6[0x1],0xa):_0x1f2ef9,'height':_0x1d83c6?parseInt(_0x1d83c6[0x2],0xa):_0x55bb00};}export function showImageProcessingIndicator(_0x5df907,_0x389b15){const _0x52af3c=_0x4dba,_0x4d23e8=new(_0x46805a())(),_0x44d6db=_0x5df907[_0x52af3c(0xdd)][_0x52af3c(0xd4)](_0x52af3c(0xdf)),_0x40e54d=_0x5df907[_0x52af3c(0xe0)][_0x52af3c(0x10c)][_0x52af3c(0xd6)](_0x389b15),_0x407644=_0x44d6db[_0x52af3c(0xd5)](_0x40e54d),_0x468fd7=_0x5df907[_0x52af3c(0xe0)][_0x52af3c(0xf2)][_0x52af3c(0xfc)][_0x52af3c(0xe2)](_0x407644),_0x4e8e4c=_0x389b15[_0x52af3c(0xdb)](_0x52af3c(0xf3)),_0x37dd48=_0x389b15[_0x52af3c(0xdb)](_0x52af3c(0x106)),_0x4b25b5=_0x52af3c(0x103);_0x5df907[_0x52af3c(0xe0)][_0x52af3c(0xf2)][_0x52af3c(0xff)](_0x593f0f=>{const _0x1a3f28=_0x52af3c;_0x593f0f[_0x1a3f28(0x101)](_0x4b25b5,_0x40e54d),_0x593f0f[_0x1a3f28(0x105)](_0x1a3f28(0xd7),_0x4e8e4c+'/'+_0x37dd48,_0x407644);}),_0x4d23e8[_0x52af3c(0xee)](_0x468fd7,_0x52af3c(0x100),()=>{const _0x3851ab=_0x52af3c;_0x4d23e8[_0x3851ab(0xfd)](_0x468fd7,_0x3851ab(0x100)),_0x5df907[_0x3851ab(0xe0)][_0x3851ab(0xf2)][_0x3851ab(0xff)](_0x1602e0=>{const _0x537d83=_0x3851ab;_0x1602e0[_0x537d83(0xe6)](_0x4b25b5,_0x40e54d),_0x1602e0[_0x537d83(0xed)](_0x537d83(0xd7),_0x407644);});});}function R(_0x4613b5){const _0xf5abe4=_0x4dba;if(Array[_0xf5abe4(0xdc)](_0x4613b5)){const _0x9ffc11=_0x4613b5[_0xf5abe4(0x109)](R);return _0x15ae7a=>_0x9ffc11[_0xf5abe4(0xda)](_0x3d1d5b=>_0x3d1d5b(_0x15ae7a));}if(_0xf5abe4(0xec)==_0x4613b5){const _0x193ac1=_0x31fe3a[_0xf5abe4(0xf0)][_0xf5abe4(0xe8)][_0xf5abe4(0xec)];return _0x5b0340=>new URL(_0x5b0340,_0x31fe3a[_0xf5abe4(0xd9)][_0xf5abe4(0x102)])[_0xf5abe4(0xec)]==_0x193ac1;}return _0xf5abe4(0xfb)==typeof _0x4613b5?_0x4613b5:_0x4613b5 instanceof RegExp?_0x8acd12=>!(!_0x8acd12[_0xf5abe4(0xe1)](_0x4613b5)&&!_0x8acd12[_0xf5abe4(0xe3)](/^https?:\/\//,'')[_0xf5abe4(0xe1)](_0x4613b5)):()=>!0x1;}function _0x4dbb(){const _0x592fb1=['uploadcareImageId','2286264fzxibR','function','domConverter','stopListening','5104iatpkE','change','load','addClass','baseURI','image-processing','image/webp','setStyle','height','src','45DLZJcU','map','hasAttribute','1095ZUBaTU','mapper','43500nUlDMS','imageInline','get','findViewImgElement','toViewElement','aspect-ratio','/-/resize/','document','some','getAttribute','isArray','plugins','x/\x20','ImageUtils','editing','match','viewToDom','replace','(max-width:\x20','12mcyvgJ','removeClass','imageBlock','location','8862rlwyNR','px)\x20100vw,\x20','3479007wmcNBt','origin','removeStyle','listenTo','982hWeclv','window','13812AfqiQx','view','width','27WoAexL','join','filter','1037028rzYfCY','element'];_0x4dbb=function(){return _0x592fb1;};return _0x4dbb();}
|