@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20250929.0 → 0.0.0-nightly-20251001.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 _0x203eca,ObservableMixin as _0x419143}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x3268a6}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x422993}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x563dc2}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x26238a}from'../../utils/uploadutils.js';import{getImageUrls as _0x392862,getImageDimension as _0x2af238}from'../../utils/editingutils.js';import{isAncestor as _0x2fd581}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x419143(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4275eb,_0x429a03,_0x564479){super(),this['_editor']=_0x4275eb,this['_dialog']=_0x429a03,this['_imageElement']=_0x564479,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 _0x1c8cf7=this['_imageElement'],_0x5e0495=_0x1c8cf7['getAttribute']('uploadcareImageId'),_0x31fd91=_0x1c8cf7['getAttribute']('src');if(_0x5e0495)await this['_loadImageInfo'](_0x5e0495,_0x31fd91);else{if(this['_imageCache']['has'](_0x31fd91)){const _0x4a3fcc=this['_imageCache']['get'](_0x31fd91);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4a3fcc['url'],this['imageDimension']=_0x4a3fcc['dimension'],this['imageId']=_0x4a3fcc['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x43d018}=this['_editor'],t=_0x43d018['t'],_0x303f43=new _0x563dc2(_0x43d018,this['imageStatus'],this['_attributes']);_0x303f43['bind']('status')['to'](this,'imageStatus'),_0x303f43['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x303f43['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x303f43['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x303f43,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x422993,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x303f43,'position':_0x3268a6['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x303f43['focus']();},'onHide':()=>{_0x303f43['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5b8023=>!_0x2fd581(_0x5b8023,_0x303f43['element'])}});}['_loadImageInfo'](_0x30ea76,_0x17169d){return _0x26238a['getInfo'](_0x30ea76,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x37cfcf=>{const {width:_0x3c8d03,height:_0x3dbd87}=_0x37cfcf['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x17169d,this['imageDimension']={'width':_0x3c8d03,'height':_0x3dbd87},this['imageId']=_0x30ea76;})['catch'](_0x3a8623=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3a8623['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4d97f8,_0x41fa4f){return this['_getImageAsFile'](_0x4d97f8)['then'](_0x5255e6=>_0x26238a['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':_0x41fa4f['signal'],'file':_0x5255e6,'onProgress':_0x3cd4d9=>{_0x3cd4d9&&_0x3cd4d9['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3cd4d9['value']));}}))['then'](_0x1f7214=>{const {width:_0x30dd1d,height:_0x5103f0}=_0x1f7214['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1f7214['cdnUrl'],this['imageDimension']={'width':_0x30dd1d,'height':_0x5103f0},this['imageId']=_0x1f7214['uuid'],this['imageUploadProgress']=null;const _0x1c2ad3=_0x4d97f8['getAttribute']('src');this['_imageCache']['set'](_0x1c2ad3,{'id':_0x1f7214['uuid'],'url':_0x1f7214['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x371cdf=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x371cdf['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3413b9,_0x4bd58c){_0x3413b9['on']('apply',(_0x3a5ac6,_0x2ebb89)=>{this['_replaceImage'](_0x4bd58c,_0x2ebb89['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3413b9['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3413b9['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0xe1c49e,_0x5c333d,_0x153a2c){const _0x50442b=this['_editor'],{width:_0x5a32d2,height:_0x3daf90}=_0x2af238(_0x5c333d,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x76ea6e,imageSources:_0x1edba4}=_0x392862(_0x5c333d,_0x5a32d2);_0x50442b['model']['change'](_0x47af2a=>{if('$graveyard'===_0xe1c49e['root']['rootName']){_0x50442b['execute']('insertImage',{'imageType':_0xe1c49e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0xe1c49e['getAttributes']()),'uploadcareImageId':_0x153a2c,'src':_0x76ea6e,'sources':_0x1edba4,'width':_0x5a32d2,'height':_0x3daf90}});const _0x5b2727=_0xe1c49e['getChildren']();_0xe1c49e=_0x50442b['model']['document']['selection']['getSelectedElement']();for(const _0x5dffad of _0x5b2727)_0x47af2a['append'](_0x47af2a['cloneElement'](_0x5dffad),_0xe1c49e);}else _0x47af2a['setSelection'](_0xe1c49e,'on'),_0x50442b['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0xe1c49e['getAttributes']()),'uploadcareImageId':_0x153a2c,'src':_0x76ea6e,'sources':_0x1edba4,'width':_0x5a32d2,'height':_0x3daf90},_0xe1c49e);_0x47af2a['setSelection'](_0xe1c49e,'on');});}async['_getImageAsFile'](_0x24a47e){const _0x4a3b94=_0x203eca['window'],_0x167786=_0x203eca['document']['location']['href'],_0x484c1e=new _0x4a3b94['URL'](_0x24a47e['getAttribute']('src'),_0x167786);if('data:'===_0x484c1e['protocol']){const _0x46af50=_0x484c1e['href']['split'](','),_0x1d2c8a=_0x46af50[0x0]['match'](/:(.*?);/)[0x1],_0x286653=_0x1d2c8a['split']('/')[0x1],_0xabc7e0=_0x4a3b94['atob'](_0x46af50[_0x46af50['length']-0x1]);let _0x402f99=_0xabc7e0['length'];const _0x4ff441=new _0x4a3b94['Uint8Array'](_0x402f99);for(;_0x402f99--;)_0x4ff441[_0x402f99]=_0xabc7e0['charCodeAt'](_0x402f99);return new _0x4a3b94['File']([_0x4ff441],'image.'+_0x286653,{'type':_0x1d2c8a});}const _0x50eb35=_0x484c1e['href']['split']('/'),_0x30194f=_0x50eb35[_0x50eb35['length']-0x1],_0x3382c7=_0x30194f['split']('.')[0x1];return _0x4a3b94['fetch'](_0x484c1e['href'])['then'](_0x48d261=>_0x48d261['clone']()['blob']())['then'](_0x71b274=>new _0x4a3b94['File']([_0x71b274],_0x30194f,{'type':'image/'+_0x3382c7}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x1913(_0x469ed4,_0x310805){const _0x2d0e50=_0x2d0e();return _0x1913=function(_0x1913de,_0x2c7af5){_0x1913de=_0x1913de-0x132;let _0x53d742=_0x2d0e50[_0x1913de];return _0x53d742;},_0x1913(_0x469ed4,_0x310805);}(function(_0x5402ed,_0x11dc55){const _0x490478=_0x1913,_0x44839c=_0x5402ed();while(!![]){try{const _0x43d499=parseInt(_0x490478(0x133))/0x1+parseInt(_0x490478(0x13d))/0x2*(parseInt(_0x490478(0x13e))/0x3)+-parseInt(_0x490478(0x142))/0x4*(parseInt(_0x490478(0x13f))/0x5)+parseInt(_0x490478(0x13c))/0x6*(parseInt(_0x490478(0x136))/0x7)+parseInt(_0x490478(0x145))/0x8*(parseInt(_0x490478(0x13b))/0x9)+-parseInt(_0x490478(0x141))/0xa+parseInt(_0x490478(0x143))/0xb*(parseInt(_0x490478(0x13a))/0xc);if(_0x43d499===_0x11dc55)break;else _0x44839c['push'](_0x44839c['shift']());}catch(_0x158600){_0x44839c['push'](_0x44839c['shift']());}}}(_0x2d0e,0xa2190));function _0x2d0e(){const _0x1d4de5=['8sTCbxH','11UmKnwO','bindTemplate','8GpVLfx','setTemplate','261122kptKDO','imageSrc','uc-light','2417065hmxSPa','uc-cloud-image-editor','ck-uploadcare-theme','image-edit','8599692mxMPMb','1516338AIXBfu','6bJEWPV','2oIzIRS','1359066qpziTw','104770hgjvMZ','set','12387020KGWRHn'];_0x2d0e=function(){return _0x1d4de5;};return _0x2d0e();}import{View as _0x5eca9c}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x5eca9c{constructor(_0x24ce19,_0x579edd){const _0x1e9fb7=_0x1913;super(_0x24ce19);const _0x4cb3b0=this[_0x1e9fb7(0x144)];this[_0x1e9fb7(0x140)](_0x1e9fb7(0x134),''),this[_0x1e9fb7(0x132)]({'tag':_0x1e9fb7(0x137),'attributes':{..._0x579edd,'class':[_0x1e9fb7(0x135),_0x1e9fb7(0x138)],'ctx-name':_0x1e9fb7(0x139),'cdn-url':_0x4cb3b0['to'](_0x1e9fb7(0x134))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x335c8d}from'ckeditor5/src/icons.js';import{ButtonView as _0x3f6d15,IconView as _0x271e25,View as _0x5de9dc}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x5de9dc{constructor(_0x4677f8){super(_0x4677f8);const t=_0x4677f8['t'];this['set']('errorType',null);const _0x48248c=new _0x3f6d15(_0x4677f8);_0x48248c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x48248c['withText']=!0x0,_0x48248c['class']='ck-button-action',_0x48248c['on']('execute',()=>{this['fire']('retry');}),_0x48248c['bind']('isVisible')['to'](this,'errorType',_0xd49bad=>'NotFound'!==_0xd49bad);const _0x1bcd92=new _0x271e25();_0x1bcd92['content']=_0x335c8d,_0x1bcd92['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x2fb65a=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':[_0x1bcd92,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x2fb65a['to']('errorType',_0x3aa6c4=>t('NotFound'!==_0x3aa6c4?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x48248c]},{'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 _0x339c2c,View as _0x53aebe}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x53aebe{constructor(_0x27a88d){super(_0x27a88d);const t=_0x27a88d['t'],_0x1fae27=this['bindTemplate'],_0x233ba4=new _0x339c2c();_0x233ba4['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':[_0x233ba4,{'text':_0x1fae27['to']('imageUploadProgress',_0xd2cadc=>t('Loading\x20image...')+'\x20('+(_0xd2cadc||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
|
-
|
|
23
|
+
const _0x522351=_0x568a;(function(_0x2ba76b,_0x30301a){const _0x8ca10=_0x568a,_0x586100=_0x2ba76b();while(!![]){try{const _0xd866aa=parseInt(_0x8ca10(0x12b))/0x1*(-parseInt(_0x8ca10(0x136))/0x2)+-parseInt(_0x8ca10(0x122))/0x3*(parseInt(_0x8ca10(0x118))/0x4)+-parseInt(_0x8ca10(0x127))/0x5+parseInt(_0x8ca10(0x135))/0x6+-parseInt(_0x8ca10(0x11f))/0x7+parseInt(_0x8ca10(0x139))/0x8+parseInt(_0x8ca10(0x116))/0x9;if(_0xd866aa===_0x30301a)break;else _0x586100['push'](_0x586100['shift']());}catch(_0x18dfe5){_0x586100['push'](_0x586100['shift']());}}}(_0x51a1,0x4a7d8));import{View as _0x300216}from'ckeditor5/src/ui.js';function _0x568a(_0x50e56d,_0x1049fd){const _0x51a152=_0x51a1();return _0x568a=function(_0x568a68,_0x8bd550){_0x568a68=_0x568a68-0x108;let _0x272770=_0x51a152[_0x568a68];return _0x272770;},_0x568a(_0x50e56d,_0x1049fd);}import{UploadcareImageEditFormLoadingView as _0x3f7626}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0x1e2e43}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0xc8d79a}from'./uploadcareimageeditformeditingview.js';function _0x51a1(){const _0x1d0850=['length','cancel','_addUploadcareImageEditorListeners','_errorView','getFocusableElement','8863146qsWEGh','detail','32544RMdBHd','addMany','_items','_loadingView','_focusableView','filter','add','4243946KiMhvz','set','status','99hmguiU','uc-cloud-image-editor','ready','error','ck-reset_all-excluded','1214175vLJEoP','once','setTemplate','render','224987NoEGHm','div','_addErrorViewListeners','fire','toLowerCase','focus','_setView','addedNodes','disconnect','_editingView','2159010fiEyIa','2HCIsMd','apply','createCollection','2424568TpZlYf','nodeName','addEventListener','retry','cdnUrl','element','observe','uploading','_waitForImageEditorComponent','target','change:status','clear','ck-uploadcare-form','querySelector'];_0x51a1=function(){return _0x1d0850;};return _0x51a1();}import{DialogFocusManagerView as _0x4794f4}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x4794f4{[_0x522351(0x11a)];[_0x522351(0x11b)];[_0x522351(0x114)];[_0x522351(0x134)];[_0x522351(0x11c)];constructor(_0x230b68,_0x48c7e2,_0x15f763){const _0x18d240=_0x522351;super(_0x230b68),this[_0x18d240(0x11a)]=this[_0x18d240(0x138)](),this[_0x18d240(0x11b)]=new _0x3f7626(_0x230b68),this[_0x18d240(0x114)]=new _0x1e2e43(_0x230b68),this[_0x18d240(0x134)]=new _0xc8d79a(_0x230b68,_0x15f763),this[_0x18d240(0x11c)]=new _0x300216(_0x230b68),this[_0x18d240(0x11c)][_0x18d240(0x129)](this[_0x18d240(0x115)]()),this[_0x18d240(0x120)](_0x18d240(0x121),_0x48c7e2),this[_0x18d240(0x129)]({'tag':_0x18d240(0x12c),'attributes':{'class':['ck',_0x18d240(0x126),_0x18d240(0x10f)],'tabindex':'-1'},'children':this[_0x18d240(0x11a)]}),this[_0x18d240(0x131)](),this[_0x18d240(0x128)](_0x18d240(0x12a),()=>{const _0x677c79=_0x18d240;this[_0x677c79(0x10b)](this[_0x677c79(0x108)],_0x31d127=>{const _0x559155=_0x677c79;this[_0x559155(0x113)](_0x31d127);});}),this['on'](_0x18d240(0x10d),()=>{const _0x4e6506=_0x18d240;this[_0x4e6506(0x131)]();}),this[_0x18d240(0x12d)]();}[_0x522351(0x130)](){const _0x62986d=_0x522351;this[_0x62986d(0x108)][_0x62986d(0x130)]();}[_0x522351(0x131)](){const _0x3fc662=_0x522351;switch(this[_0x3fc662(0x11a)][_0x3fc662(0x10e)](),this[_0x3fc662(0x121)]){case _0x3fc662(0x10a):this[_0x3fc662(0x11a)][_0x3fc662(0x11e)](this[_0x3fc662(0x11b)]);break;case _0x3fc662(0x125):this[_0x3fc662(0x11a)][_0x3fc662(0x11e)](this[_0x3fc662(0x114)]);break;case _0x3fc662(0x124):this[_0x3fc662(0x11a)][_0x3fc662(0x119)]([this[_0x3fc662(0x134)],this[_0x3fc662(0x11c)]]);}}[_0x522351(0x10b)](_0x8c9869,_0x1f1cdf){const _0xe11444=_0x522351,_0x255b97=_0xe11444(0x123),_0x43a4bf=_0x8c9869[_0xe11444(0x110)](_0x255b97);if(_0x43a4bf)return _0x1f1cdf(_0x43a4bf);const _0x33e5b3=new MutationObserver(_0xbd17b2=>{const _0x2357c5=_0xe11444,_0xdc94c7=_0xbd17b2[_0x2357c5(0x11d)](_0x7d1276=>_0x7d1276[_0x2357c5(0x10c)]===_0x8c9869&&_0x7d1276[_0x2357c5(0x132)][_0x2357c5(0x111)]>0x0&&_0x7d1276[_0x2357c5(0x132)][0x0][_0x2357c5(0x13a)][_0x2357c5(0x12f)]()===_0x255b97);_0xdc94c7[_0x2357c5(0x111)]&&(_0x33e5b3[_0x2357c5(0x133)](),_0x1f1cdf(_0xdc94c7[0x0][_0x2357c5(0x132)][0x0]));});_0x33e5b3[_0xe11444(0x109)](_0x8c9869,{'childList':!0x0,'subtree':!0x0});}[_0x522351(0x113)](_0x15b9b2){const _0x1c0fcc=_0x522351;_0x15b9b2[_0x1c0fcc(0x13b)](_0x1c0fcc(0x137),_0x435f94=>{const _0x3d17d9=_0x1c0fcc;this[_0x3d17d9(0x12e)](_0x3d17d9(0x137),{'imageSrc':_0x435f94[_0x3d17d9(0x117)][_0x3d17d9(0x13d)]});}),_0x15b9b2[_0x1c0fcc(0x13b)](_0x1c0fcc(0x112),()=>{const _0x24dbe5=_0x1c0fcc;this[_0x24dbe5(0x12e)](_0x24dbe5(0x112));});}[_0x522351(0x12d)](){const _0x265a8c=_0x522351;this[_0x265a8c(0x114)]['on'](_0x265a8c(0x13c),()=>{const _0x20205e=_0x265a8c;this[_0x20205e(0x12e)](_0x20205e(0x13c));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x2790(_0x30a13a,_0x55c7a2){const _0x3cb656=_0x3cb6();return _0x2790=function(_0x279042,_0x2f5197){_0x279042=_0x279042-0x1e5;let _0x5316aa=_0x3cb656[_0x279042];return _0x5316aa;},_0x2790(_0x30a13a,_0x55c7a2);}const _0x55e9b2=_0x2790;(function(_0x35a0e2,_0x2e71f4){const _0x2f74d0=_0x2790,_0x5a0eda=_0x35a0e2();while(!![]){try{const _0x2e2014=parseInt(_0x2f74d0(0x1f6))/0x1*(-parseInt(_0x2f74d0(0x1e8))/0x2)+-parseInt(_0x2f74d0(0x1ee))/0x3*(-parseInt(_0x2f74d0(0x1ed))/0x4)+-parseInt(_0x2f74d0(0x1f2))/0x5+-parseInt(_0x2f74d0(0x1fe))/0x6+parseInt(_0x2f74d0(0x1fb))/0x7*(parseInt(_0x2f74d0(0x1e7))/0x8)+-parseInt(_0x2f74d0(0x1ea))/0x9+parseInt(_0x2f74d0(0x1f7))/0xa*(parseInt(_0x2f74d0(0x1fc))/0xb);if(_0x2e2014===_0x2e71f4)break;else _0x5a0eda['push'](_0x5a0eda['shift']());}catch(_0x48204a){_0x5a0eda['push'](_0x5a0eda['shift']());}}}(_0x3cb6,0xaffc0));import{Command as _0xa53048}from'ckeditor5/src/core.js';import{Dialog as _0x302b7e}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x1ab91a}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x508479}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0xa53048{[_0x55e9b2(0x1f9)];static get[_0x55e9b2(0x201)](){return[_0x302b7e];}[_0x55e9b2(0x202)];constructor(_0x11cdb3){const _0x26e9f5=_0x55e9b2;super(_0x11cdb3),this[_0x26e9f5(0x1f9)]=void 0x0,this[_0x26e9f5(0x202)]=_0x508479(_0x11cdb3[_0x26e9f5(0x1e6)][_0x26e9f5(0x1e9)](_0x26e9f5(0x1f5))||[]),this[_0x26e9f5(0x200)]({'isActive':!0x1});}[_0x55e9b2(0x205)](){const _0x561d39=_0x55e9b2,_0x30985b=this[_0x561d39(0x1f3)][_0x561d39(0x1fd)][_0x561d39(0x1eb)][_0x561d39(0x1e5)][_0x561d39(0x1f0)]();this[_0x561d39(0x1ec)]=this[_0x561d39(0x202)](_0x30985b);}[_0x55e9b2(0x1ff)](){const _0x343dcf=_0x55e9b2;this[_0x343dcf(0x1f9)]&&(this[_0x343dcf(0x1f8)](_0x343dcf(0x1fa)),this[_0x343dcf(0x1f9)]=void 0x0);const _0xf73f7d=this[_0x343dcf(0x1f3)][_0x343dcf(0x1fd)][_0x343dcf(0x1eb)][_0x343dcf(0x1e5)][_0x343dcf(0x1f0)]();_0xf73f7d&&(_0xf73f7d['is'](_0x343dcf(0x1ef),_0x343dcf(0x204))||_0xf73f7d['is'](_0x343dcf(0x1ef),_0x343dcf(0x1f1)))&&(this[_0x343dcf(0x1f9)]=new _0x1ab91a(this[_0x343dcf(0x1f3)],this[_0x343dcf(0x1f3)][_0x343dcf(0x203)][_0x343dcf(0x1e9)](_0x302b7e),_0xf73f7d),this[_0x343dcf(0x1f4)](_0x343dcf(0x1fa))['to'](this[_0x343dcf(0x1f9)],_0x343dcf(0x1fa)));}}function _0x3cb6(){const _0x2e3aee=['isActive','21rsMvvA','2808971chjsMQ','model','6673500GjWHAQ','execute','set','requires','_isEditable','plugins','imageBlock','refresh','selection','config','527560ZQtwTc','684pRRwwj','get','8087229VMDslK','document','isEnabled','1445684SIUxmn','3poYLVz','element','getSelectedElement','imageInline','1657500gUQcgJ','editor','bind','uploadcare.allowExternalImagesEditing','892gpjAmu','110klVDaI','unbind','imageEditController'];_0x3cb6=function(){return _0x2e3aee;};return _0x3cb6();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5ef032=_0x3d93;(function(_0x5df21a,_0x5d4987){const _0x31f495=_0x3d93,_0x58f84c=_0x5df21a();while(!![]){try{const _0x3402a9=-parseInt(_0x31f495(0x1e6))/0x1*(parseInt(_0x31f495(0x1de))/0x2)+-parseInt(_0x31f495(0x1db))/0x3*(-parseInt(_0x31f495(0x1e5))/0x4)+parseInt(_0x31f495(0x1da))/0x5+parseInt(_0x31f495(0x1d8))/0x6+-parseInt(_0x31f495(0x1dd))/0x7+-parseInt(_0x31f495(0x1e4))/0x8*(-parseInt(_0x31f495(0x1e8))/0x9)+-parseInt(_0x31f495(0x1df))/0xa;if(_0x3402a9===_0x5d4987)break;else _0x58f84c['push'](_0x58f84c['shift']());}catch(_0xdd039c){_0x58f84c['push'](_0x58f84c['shift']());}}}(_0x1f88,0x7015d));import{Plugin as _0x4dcd45}from'ckeditor5/src/core.js';import{Notification as _0x3bc9c1}from'ckeditor5/src/ui.js';function _0x1f88(){const _0x3872cd=['isPremiumPlugin','uploadcareImageReplace','ImageEditing','uploadcareImageEdit','2539902jraezZ','isOfficialPlugin','2240390BYEMOA','3yInQJo','pluginName','82320cLeQya','407698SsiCID','735440ZlMVps','add','requires','ImageUtils','UploadcareImageEditEditing','198928KItCzS','1257376LgQXCb','4lWFLqC','commands','63ekbqmo','init'];_0x1f88=function(){return _0x3872cd;};return _0x1f88();}import{UploadcareImageEditCommand as _0x521267}from'./uploadcareimageeditcommand.js';function _0x3d93(_0x2b2892,_0x230ed0){const _0x1f8894=_0x1f88();return _0x3d93=function(_0x3d93c9,_0x555bcb){_0x3d93c9=_0x3d93c9-0x1d4;let _0x52952e=_0x1f8894[_0x3d93c9];return _0x52952e;},_0x3d93(_0x2b2892,_0x230ed0);}import{UploadcareImageReplaceCommand as _0x1f6923}from'./uploadcareimagereplacecommand.js';import{UploadcareEditing as _0x4e3b2a}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x4dcd45{static get[_0x5ef032(0x1dc)](){const _0x5a3954=_0x5ef032;return _0x5a3954(0x1e3);}static get[_0x5ef032(0x1e1)](){const _0xed3b69=_0x5ef032;return[_0x4e3b2a,_0x3bc9c1,_0xed3b69(0x1e2),_0xed3b69(0x1d6)];}static get[_0x5ef032(0x1d9)](){return!0x0;}static get[_0x5ef032(0x1d4)](){return!0x0;}[_0x5ef032(0x1e9)](){const _0xae7ae9=_0x5ef032,{editor:_0x5a58da}=this;_0x5a58da[_0xae7ae9(0x1e7)][_0xae7ae9(0x1e0)](_0xae7ae9(0x1d7),new _0x521267(_0x5a58da)),_0x5a58da[_0xae7ae9(0x1e7)][_0xae7ae9(0x1e0)](_0xae7ae9(0x1d5),new _0x1f6923(_0x5a58da));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x2154e7}from'ckeditor5/src/core.js';import{ButtonView as _0x36a98}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4db1ce}from'ckeditor5/src/icons.js';import{createElement as _0x2e4c46}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 _0x2154e7{['_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 _0x477ee7=this['editor'];_0x477ee7['ui']['componentFactory']['add']('uploadcareImageEdit',_0x3f5e00=>{const _0x4a7667=_0x477ee7['commands']['get']('uploadcareImageEdit'),_0x11d7f5=new _0x36a98(_0x3f5e00),t=_0x3f5e00['t'];return _0x11d7f5['set']({'icon':_0x4db1ce,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x11d7f5['bind']('isEnabled')['to'](_0x4a7667),_0x11d7f5['bind']('isOn')['to'](_0x4a7667,'isActive'),this['listenTo'](_0x11d7f5,'execute',()=>{_0x477ee7['execute']('uploadcareImageEdit'),_0x477ee7['editing']['view']['focus']();}),_0x11d7f5;}),this['_initConfig']();}['_initConfig'](){const _0x4d0dec=_0x2e4c46(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4d0dec),this['listenTo'](this['editor'],'destroy',()=>{_0x4d0dec['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
var _0x53ec14=_0x25e3;function _0x25e3(_0xa802a6,_0x25f972){var _0x34a995=_0x34a9();return _0x25e3=function(_0x25e3c6,_0x9f782){_0x25e3c6=_0x25e3c6-0x19c;var _0x559792=_0x34a995[_0x25e3c6];return _0x559792;},_0x25e3(_0xa802a6,_0x25f972);}(function(_0x497a42,_0x3da17e){var _0x6416ea=_0x25e3,_0x4fdf57=_0x497a42();while(!![]){try{var _0x32b673=-parseInt(_0x6416ea(0x1ab))/0x1*(-parseInt(_0x6416ea(0x1ac))/0x2)+-parseInt(_0x6416ea(0x1a3))/0x3+-parseInt(_0x6416ea(0x1ae))/0x4+-parseInt(_0x6416ea(0x1a9))/0x5*(parseInt(_0x6416ea(0x19c))/0x6)+-parseInt(_0x6416ea(0x1a4))/0x7*(parseInt(_0x6416ea(0x19d))/0x8)+parseInt(_0x6416ea(0x1a7))/0x9+parseInt(_0x6416ea(0x1aa))/0xa;if(_0x32b673===_0x3da17e)break;else _0x4fdf57['push'](_0x4fdf57['shift']());}catch(_0x30deb9){_0x4fdf57['push'](_0x4fdf57['shift']());}}}(_0x34a9,0x65ef1));function _0x34a9(){var _0x3374f1=['focusCycler','div','92787ryEPzN','14mAvtzo','true','bindTemplate','1277982ENiiPm','getFocusableElement','5YgNJRM','15700260PeVFJv','1Akuutu','697054setsmE','focusTracker','1546304CjsxtX','3303522QPcpzm','2699752QIuOLU','createCollection','forwardCycle','fire'];_0x34a9=function(){return _0x3374f1;};return _0x34a9();}import{FocusTracker as _0x239b00}from'ckeditor5/src/utils.js';import{View as _0x5b9995,FocusCycler as _0x4c67cd}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0x5b9995{[_0x53ec14(0x1ad)];[_0x53ec14(0x1a1)];constructor(_0x259448){var _0x422b81=_0x53ec14;super(_0x259448),this[_0x422b81(0x1ad)]=new _0x239b00(),this[_0x422b81(0x1a1)]=new _0x4c67cd({'focusables':this[_0x422b81(0x19e)](),'focusTracker':this[_0x422b81(0x1ad)]});}[_0x53ec14(0x1a8)](){var _0x181f43=_0x53ec14;return{'tag':_0x181f43(0x1a2),'attributes':{'aria-hidden':_0x181f43(0x1a5),'tabindex':'0'},'on':{'focus':this[_0x181f43(0x1a6)]['to'](()=>{var _0x1fdfbf=_0x181f43;this[_0x1fdfbf(0x1a1)][_0x1fdfbf(0x1a0)](_0x1fdfbf(0x19f));})}};}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x900f(_0x2cdc84,_0x1926e9){const _0x58463e=_0x5846();return _0x900f=function(_0x900f49,_0x227a12){_0x900f49=_0x900f49-0xc9;let _0x36534d=_0x58463e[_0x900f49];return _0x36534d;},_0x900f(_0x2cdc84,_0x1926e9);}(function(_0x309000,_0x6ad9d7){const _0x531aea=_0x900f,_0x4134c0=_0x309000();while(!![]){try{const _0x424bfe=-parseInt(_0x531aea(0xf9))/0x1+parseInt(_0x531aea(0xde))/0x2+parseInt(_0x531aea(0xe4))/0x3+parseInt(_0x531aea(0xe1))/0x4*(parseInt(_0x531aea(0xf5))/0x5)+-parseInt(_0x531aea(0xef))/0x6+-parseInt(_0x531aea(0xdf))/0x7*(-parseInt(_0x531aea(0xed))/0x8)+-parseInt(_0x531aea(0xf1))/0x9*(parseInt(_0x531aea(0xdd))/0xa);if(_0x424bfe===_0x6ad9d7)break;else _0x4134c0['push'](_0x4134c0['shift']());}catch(_0x56aa29){_0x4134c0['push'](_0x4134c0['shift']());}}}(_0x5846,0x7654c));function _0x5846(){const _0x34b6ef=['listenTo','map','44060KMrxnS','166208vcgsGh','21CBhGPd','x/\x20','269636SuFMqR','px)\x20100vw,\x20','removeClass','2158467TdufzN','isArray','getAttribute','imageInline','hasAttribute','setStyle','editing','plugins','findViewImgElement','1373432xOxvHx','toViewElement','4743444HIqeVV','view','1377QDWcXg','ImageUtils','domConverter','change','65OxcVwn','replace','image/webp','viewToDom','244571RJGVYr','uploadcareImageId','match','addClass','get','aspect-ratio','function','baseURI','mapper','stopListening','document','height','element','removeStyle','src','origin','/-/resize/','join','window','imageBlock','some','filter','location','width','(max-width:\x20','load','image-processing'];_0x5846=function(){return _0x34b6ef;};return _0x5846();}import{global as _0x22da9f,DomEmitterMixin as _0x3d581e}from'ckeditor5/src/utils.js';export function createEditabilityChecker(_0x14f235){const _0xf59feb=_0x900f,_0x136c45=R(_0x14f235);return _0x5e94dd=>!(!_0x5e94dd||!_0x5e94dd['is'](_0xf59feb(0xcc),_0xf59feb(0xd3))&&!_0x5e94dd['is'](_0xf59feb(0xcc),_0xf59feb(0xe7)))&&(!!_0x5e94dd[_0xf59feb(0xe8)](_0xf59feb(0xfa))||!!_0x5e94dd[_0xf59feb(0xe8)](_0xf59feb(0xce))&&_0x136c45(_0x5e94dd[_0xf59feb(0xe6)](_0xf59feb(0xce))));}export function getImageUrls(_0xc0a0cd,_0xb4cf01){const _0x1a1596=_0x900f,_0x3b5bb4=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960][_0x1a1596(0xd5)](_0x1cd79e=>_0x1cd79e<=_0xb4cf01)[_0x1a1596(0xdc)](_0x529221=>_0xc0a0cd[_0x1a1596(0xf6)](/\/$/,'')+_0x1a1596(0xd0)+_0x529221+_0x1a1596(0xe0)+_0x529221+'w');return{'imageFallbackUrl':_0xc0a0cd,'imageSources':[{'srcset':_0x3b5bb4[_0x1a1596(0xd1)](',\x20'),'sizes':_0x1a1596(0xd8)+_0xb4cf01+_0x1a1596(0xe2)+_0xb4cf01+'px','type':_0x1a1596(0xf7)}]};}export function getImageDimension(_0x5ee98a,_0x37c317,_0x3a40cb){const _0x26b7c1=_0x900f,_0x31b67d=_0x5ee98a[_0x26b7c1(0xfb)](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x31b67d?parseInt(_0x31b67d[0x1],0xa):_0x37c317,'height':_0x31b67d?parseInt(_0x31b67d[0x2],0xa):_0x3a40cb};}export function showImageProcessingIndicator(_0x1af694,_0x3785d1){const _0x536684=_0x900f,_0x56f701=new(_0x3d581e())(),_0x7bcca7=_0x1af694[_0x536684(0xeb)][_0x536684(0xfd)](_0x536684(0xf2)),_0x269b25=_0x1af694[_0x536684(0xea)][_0x536684(0x101)][_0x536684(0xee)](_0x3785d1),_0x3ff18c=_0x7bcca7[_0x536684(0xec)](_0x269b25),_0x213a48=_0x1af694[_0x536684(0xea)][_0x536684(0xf0)][_0x536684(0xf3)][_0x536684(0xf8)](_0x3ff18c),_0x14016c=_0x3785d1[_0x536684(0xe6)](_0x536684(0xd7)),_0x1e6166=_0x3785d1[_0x536684(0xe6)](_0x536684(0xcb)),_0x2be8d5=_0x536684(0xda);_0x1af694[_0x536684(0xea)][_0x536684(0xf0)][_0x536684(0xf4)](_0xa2008f=>{const _0x42efaf=_0x536684;_0xa2008f[_0x42efaf(0xfc)](_0x2be8d5,_0x269b25),_0xa2008f[_0x42efaf(0xe9)](_0x42efaf(0xfe),_0x14016c+'/'+_0x1e6166,_0x3ff18c);}),_0x56f701[_0x536684(0xdb)](_0x213a48,_0x536684(0xd9),()=>{const _0x5820bd=_0x536684;_0x56f701[_0x5820bd(0xc9)](_0x213a48,_0x5820bd(0xd9)),_0x1af694[_0x5820bd(0xea)][_0x5820bd(0xf0)][_0x5820bd(0xf4)](_0x40a637=>{const _0x4f823a=_0x5820bd;_0x40a637[_0x4f823a(0xe3)](_0x2be8d5,_0x269b25),_0x40a637[_0x4f823a(0xcd)](_0x4f823a(0xfe),_0x3ff18c);});});}function R(_0x59db21){const _0x24d6e9=_0x900f;if(Array[_0x24d6e9(0xe5)](_0x59db21)){const _0x5996e7=_0x59db21[_0x24d6e9(0xdc)](R);return _0xee4906=>_0x5996e7[_0x24d6e9(0xd4)](_0x7b3f1=>_0x7b3f1(_0xee4906));}if(_0x24d6e9(0xcf)==_0x59db21){const _0x281060=_0x22da9f[_0x24d6e9(0xd2)][_0x24d6e9(0xd6)][_0x24d6e9(0xcf)];return _0x45c3b8=>new URL(_0x45c3b8,_0x22da9f[_0x24d6e9(0xca)][_0x24d6e9(0x100)])[_0x24d6e9(0xcf)]==_0x281060;}return _0x24d6e9(0xff)==typeof _0x59db21?_0x59db21:_0x59db21 instanceof RegExp?_0x244fd0=>!(!_0x244fd0[_0x24d6e9(0xfb)](_0x59db21)&&!_0x244fd0[_0x24d6e9(0xf6)](/^https?:\/\//,'')[_0x24d6e9(0xfb)](_0x59db21)):()=>!0x1;}
|