@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251122.0 → 0.0.0-nightly-20251123.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 _0x3e5d64,ObservableMixin as _0x58f516}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x77456e}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x1854e7}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x2b026e}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x46c791}from'../../utils/uploadutils.js';import{getImageUrls as _0x595463,getImageDimension as _0x1d595a}from'../../utils/editingutils.js';import{isAncestor as _0x315d0b}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x58f516(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x507638,_0x12631b,_0x2ffb6d){super(),this['_editor']=_0x507638,this['_dialog']=_0x12631b,this['_imageElement']=_0x2ffb6d,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 _0x4683a2=this['_imageElement'],_0x1b5452=_0x4683a2['getAttribute']('uploadcareImageId'),_0x2f62be=_0x4683a2['getAttribute']('src');if(_0x1b5452)await this['_loadImageInfo'](_0x1b5452,_0x2f62be);else{if(this['_imageCache']['has'](_0x2f62be)){const _0x2aeb6e=this['_imageCache']['get'](_0x2f62be);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2aeb6e['url'],this['imageDimension']=_0x2aeb6e['dimension'],this['imageId']=_0x2aeb6e['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x573862}=this['_editor'],t=_0x573862['t'],_0x48f135=new _0x2b026e(_0x573862,this['imageStatus'],this['_attributes']);_0x48f135['bind']('status')['to'](this,'imageStatus'),_0x48f135['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x48f135['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x48f135['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x48f135,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1854e7,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x48f135,'position':_0x77456e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x48f135['focus']();},'onHide':()=>{_0x48f135['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x42ee8f=>!_0x315d0b(_0x42ee8f,_0x48f135['element'])}});}['_loadImageInfo'](_0x3f2040,_0x24af7d){return _0x46c791['getInfo'](_0x3f2040,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0xade516=>{const {width:_0x276d36,height:_0x52f947}=_0xade516['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x24af7d,this['imageDimension']={'width':_0x276d36,'height':_0x52f947},this['imageId']=_0x3f2040;})['catch'](_0x212284=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x212284['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x407a65,_0x23ebd5){return this['_getImageAsFile'](_0x407a65)['then'](_0x381fff=>_0x46c791['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':_0x23ebd5['signal'],'file':_0x381fff,'onProgress':_0x3feb5a=>{_0x3feb5a&&_0x3feb5a['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3feb5a['value']));}}))['then'](_0xb3b637=>{const {width:_0x1636c7,height:_0x596d8f}=_0xb3b637['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xb3b637['cdnUrl'],this['imageDimension']={'width':_0x1636c7,'height':_0x596d8f},this['imageId']=_0xb3b637['uuid'],this['imageUploadProgress']=null;const _0x1c4041=_0x407a65['getAttribute']('src');this['_imageCache']['set'](_0x1c4041,{'id':_0xb3b637['uuid'],'url':_0xb3b637['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3f63f6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3f63f6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x265b08,_0x53826d){_0x265b08['on']('apply',(_0x1bbe57,_0x1fa288)=>{this['_replaceImage'](_0x53826d,_0x1fa288['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x265b08['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x265b08['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x275da8,_0x46482b,_0x40801a){const _0x1ab34c=this['_editor'],{width:_0x23dfb7,height:_0x4f579b}=_0x1d595a(_0x46482b,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0xd7e1e1,imageSources:_0x3df806}=_0x595463(_0x46482b,_0x23dfb7);_0x1ab34c['model']['change'](_0x44dab8=>{if('$graveyard'===_0x275da8['root']['rootName']){_0x1ab34c['execute']('insertImage',{'imageType':_0x275da8['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x275da8['getAttributes']()),'uploadcareImageId':_0x40801a,'src':_0xd7e1e1,'sources':_0x3df806,'width':_0x23dfb7,'height':_0x4f579b}});const _0x2fc7e5=_0x275da8['getChildren']();_0x275da8=_0x1ab34c['model']['document']['selection']['getSelectedElement']();for(const _0x591196 of _0x2fc7e5)_0x44dab8['append'](_0x44dab8['cloneElement'](_0x591196),_0x275da8);}else _0x44dab8['setSelection'](_0x275da8,'on'),_0x1ab34c['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x275da8['getAttributes']()),'uploadcareImageId':_0x40801a,'src':_0xd7e1e1,'sources':_0x3df806,'width':_0x23dfb7,'height':_0x4f579b},_0x275da8);_0x44dab8['setSelection'](_0x275da8,'on');});}async['_getImageAsFile'](_0x3054f6){const _0x5e5036=_0x3e5d64['window'],_0xe5d741=_0x3e5d64['document']['location']['href'],_0x92d173=new _0x5e5036['URL'](_0x3054f6['getAttribute']('src'),_0xe5d741);if('data:'===_0x92d173['protocol']){const _0x1ac68c=_0x92d173['href']['split'](','),_0x185d1e=_0x1ac68c[0x0]['match'](/:(.*?);/)[0x1],_0x59df98=_0x185d1e['split']('/')[0x1],_0x4ab8f9=_0x5e5036['atob'](_0x1ac68c[_0x1ac68c['length']-0x1]);let _0x1a1493=_0x4ab8f9['length'];const _0x1f8259=new _0x5e5036['Uint8Array'](_0x1a1493);for(;_0x1a1493--;)_0x1f8259[_0x1a1493]=_0x4ab8f9['charCodeAt'](_0x1a1493);return new _0x5e5036['File']([_0x1f8259],'image.'+_0x59df98,{'type':_0x185d1e});}const _0x3968e7=_0x92d173['href']['split']('/'),_0x58ee93=_0x3968e7[_0x3968e7['length']-0x1],_0x144499=_0x58ee93['split']('.')[0x1];return _0x5e5036['fetch'](_0x92d173['href'])['then'](_0x5355f8=>_0x5355f8['clone']()['blob']())['then'](_0x5203d6=>new _0x5e5036['File']([_0x5203d6],_0x58ee93,{'type':'image/'+_0x144499}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x1811dd,_0x243464){const _0x4b2c8e=_0x51c6,_0x141f12=_0x1811dd();while(!![]){try{const _0x5278a1=parseInt(_0x4b2c8e(0x19a))/0x1*(-parseInt(_0x4b2c8e(0x18e))/0x2)+-parseInt(_0x4b2c8e(0x19b))/0x3*(-parseInt(_0x4b2c8e(0x192))/0x4)+-parseInt(_0x4b2c8e(0x19e))/0x5+parseInt(_0x4b2c8e(0x190))/0x6*(parseInt(_0x4b2c8e(0x199))/0x7)+parseInt(_0x4b2c8e(0x194))/0x8+-parseInt(_0x4b2c8e(0x19d))/0x9*(-parseInt(_0x4b2c8e(0x18f))/0xa)+parseInt(_0x4b2c8e(0x197))/0xb*(-parseInt(_0x4b2c8e(0x1a1))/0xc);if(_0x5278a1===_0x243464)break;else _0x141f12['push'](_0x141f12['shift']());}catch(_0x3ed263){_0x141f12['push'](_0x141f12['shift']());}}}(_0x9618,0xd0673));import{View as _0x163625}from'ckeditor5/src/ui.js';function _0x9618(){const _0x504a7f=['1767hvPfIQ','3eHrQYE','setTemplate','27iCOthr','2122500VmBdxC','image-edit','bindTemplate','24465828cXbczY','732XsEprq','5180190rfoWpZ','8589264Kxpehx','set','2823596cypQjl','uc-cloud-image-editor','2177280aZnAJd','imageSrc','uc-light','11rKioEI','ck-uploadcare-theme','7yAaJZf'];_0x9618=function(){return _0x504a7f;};return _0x9618();}function _0x51c6(_0xa0626a,_0x35e3ef){const _0x9618c8=_0x9618();return _0x51c6=function(_0x51c6fb,_0x4e8250){_0x51c6fb=_0x51c6fb-0x18e;let _0x56758b=_0x9618c8[_0x51c6fb];return _0x56758b;},_0x51c6(_0xa0626a,_0x35e3ef);}export class UploadcareImageEditFormEditingView extends _0x163625{constructor(_0x1a403e,_0x41eafc){const _0x4696be=_0x51c6;super(_0x1a403e);const _0x269efd=this[_0x4696be(0x1a0)];this[_0x4696be(0x191)](_0x4696be(0x195),''),this[_0x4696be(0x19c)]({'tag':_0x4696be(0x193),'attributes':{..._0x41eafc,'class':[_0x4696be(0x196),_0x4696be(0x198)],'ctx-name':_0x4696be(0x19f),'cdn-url':_0x269efd['to'](_0x4696be(0x195))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x16365a}from'ckeditor5/src/icons.js';import{ButtonView as _0x14481e,IconView as _0x51df3a,View as _0x5a95ea}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x5a95ea{constructor(_0x4cbd44){super(_0x4cbd44);const t=_0x4cbd44['t'];this['set']('errorType',null);const _0xfecb02=new _0x14481e(_0x4cbd44);_0xfecb02['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xfecb02['withText']=!0x0,_0xfecb02['class']='ck-button-action',_0xfecb02['on']('execute',()=>{this['fire']('retry');}),_0xfecb02['bind']('isVisible')['to'](this,'errorType',_0x562288=>'NotFound'!==_0x562288);const _0x15e0b4=new _0x51df3a();_0x15e0b4['content']=_0x16365a,_0x15e0b4['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x11fb35=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':[_0x15e0b4,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x11fb35['to']('errorType',_0x2af958=>t('NotFound'!==_0x2af958?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xfecb02]},{'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 _0x47bc0e,View as _0x415c4b}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x415c4b{constructor(_0x146045){super(_0x146045);const t=_0x146045['t'],_0x4d9f56=this['bindTemplate'],_0x2a8b1a=new _0x47bc0e();_0x2a8b1a['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':[_0x2a8b1a,{'text':_0x4d9f56['to']('imageUploadProgress',_0x57f1b5=>t('Loading\x20image...')+'\x20('+(_0x57f1b5||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 _0x5ca5b3=_0x1a97;(function(_0x52d8a1,_0x2339dc){const _0x50b6a1=_0x1a97,_0x3f91ff=_0x52d8a1();while(!![]){try{const _0x49820b=-parseInt(_0x50b6a1(0x191))/0x1+parseInt(_0x50b6a1(0x184))/0x2*(-parseInt(_0x50b6a1(0x182))/0x3)+-parseInt(_0x50b6a1(0x173))/0x4+parseInt(_0x50b6a1(0x1a3))/0x5+parseInt(_0x50b6a1(0x176))/0x6*(-parseInt(_0x50b6a1(0x1a1))/0x7)+parseInt(_0x50b6a1(0x17e))/0x8*(parseInt(_0x50b6a1(0x1a0))/0x9)+parseInt(_0x50b6a1(0x190))/0xa*(parseInt(_0x50b6a1(0x19b))/0xb);if(_0x49820b===_0x2339dc)break;else _0x3f91ff['push'](_0x3f91ff['shift']());}catch(_0x1782bf){_0x3f91ff['push'](_0x3f91ff['shift']());}}}(_0x3caa,0x32b65));import{View as _0x3404fe}from'ckeditor5/src/ui.js';function _0x1a97(_0x8a6a05,_0x543c97){const _0x3caa24=_0x3caa();return _0x1a97=function(_0x1a9749,_0x1987ce){_0x1a9749=_0x1a9749-0x170;let _0x17719f=_0x3caa24[_0x1a9749];return _0x17719f;},_0x1a97(_0x8a6a05,_0x543c97);}import{UploadcareImageEditFormLoadingView as _0x4141e4}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0x3bd13f}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x356e41}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x412808}from'../../utils/dialogfocusmanagerview.js';function _0x3caa(){const _0x10e068=['ck-reset_all-excluded','cancel','ck-uploadcare-form','_errorView','clear','_setView','disconnect','3277744iZtYsa','uploading','querySelector','length','1212807uEioHS','uc-cloud-image-editor','2jIqmuZ','createCollection','apply','add','filter','_addErrorViewListeners','_waitForImageEditorComponent','element','_focusableView','fire','status','toLowerCase','10xmBkkN','95060jyQsSI','render','_editingView','_items','addedNodes','set','cdnUrl','detail','change:status','retry','4218236ZGXWxl','observe','addMany','once','focus','9zvsGsI','385266hEiQwU','getFocusableElement','696560IPCzRG','_addUploadcareImageEditorListeners','target','nodeName','setTemplate','addEventListener','div','_loadingView','461536jRnjUp','error','ready','12zdbhlw'];_0x3caa=function(){return _0x10e068;};return _0x3caa();}import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x412808{[_0x5ca5b3(0x194)];[_0x5ca5b3(0x172)];[_0x5ca5b3(0x17a)];[_0x5ca5b3(0x193)];[_0x5ca5b3(0x18c)];constructor(_0x1c9a92,_0x504096,_0x4e2fe7){const _0x3dee2c=_0x5ca5b3;super(_0x1c9a92),this[_0x3dee2c(0x194)]=this[_0x3dee2c(0x185)](),this[_0x3dee2c(0x172)]=new _0x4141e4(_0x1c9a92),this[_0x3dee2c(0x17a)]=new _0x3bd13f(_0x1c9a92),this[_0x3dee2c(0x193)]=new _0x356e41(_0x1c9a92,_0x4e2fe7),this[_0x3dee2c(0x18c)]=new _0x3404fe(_0x1c9a92),this[_0x3dee2c(0x18c)][_0x3dee2c(0x1a7)](this[_0x3dee2c(0x1a2)]()),this[_0x3dee2c(0x196)](_0x3dee2c(0x18e),_0x504096),this[_0x3dee2c(0x1a7)]({'tag':_0x3dee2c(0x171),'attributes':{'class':['ck',_0x3dee2c(0x177),_0x3dee2c(0x179)],'tabindex':'-1'},'children':this[_0x3dee2c(0x194)]}),this[_0x3dee2c(0x17c)](),this[_0x3dee2c(0x19e)](_0x3dee2c(0x192),()=>{const _0x5c598b=_0x3dee2c;this[_0x5c598b(0x18a)](this[_0x5c598b(0x18b)],_0x76d6a9=>{const _0x194092=_0x5c598b;this[_0x194092(0x1a4)](_0x76d6a9);});}),this['on'](_0x3dee2c(0x199),()=>{const _0x1e7638=_0x3dee2c;this[_0x1e7638(0x17c)]();}),this[_0x3dee2c(0x189)]();}[_0x5ca5b3(0x19f)](){const _0x47d497=_0x5ca5b3;this[_0x47d497(0x18b)][_0x47d497(0x19f)]();}[_0x5ca5b3(0x17c)](){const _0x107647=_0x5ca5b3;switch(this[_0x107647(0x194)][_0x107647(0x17b)](),this[_0x107647(0x18e)]){case _0x107647(0x17f):this[_0x107647(0x194)][_0x107647(0x187)](this[_0x107647(0x172)]);break;case _0x107647(0x174):this[_0x107647(0x194)][_0x107647(0x187)](this[_0x107647(0x17a)]);break;case _0x107647(0x175):this[_0x107647(0x194)][_0x107647(0x19d)]([this[_0x107647(0x193)],this[_0x107647(0x18c)]]);}}[_0x5ca5b3(0x18a)](_0x28357c,_0x253769){const _0x2c8b1c=_0x5ca5b3,_0x267b71=_0x2c8b1c(0x183),_0x581d9e=_0x28357c[_0x2c8b1c(0x180)](_0x267b71);if(_0x581d9e)return _0x253769(_0x581d9e);const _0x13c023=new MutationObserver(_0x4a8c8f=>{const _0x2f4014=_0x2c8b1c,_0x35711f=_0x4a8c8f[_0x2f4014(0x188)](_0x5661de=>_0x5661de[_0x2f4014(0x1a5)]===_0x28357c&&_0x5661de[_0x2f4014(0x195)][_0x2f4014(0x181)]>0x0&&_0x5661de[_0x2f4014(0x195)][0x0][_0x2f4014(0x1a6)][_0x2f4014(0x18f)]()===_0x267b71);_0x35711f[_0x2f4014(0x181)]&&(_0x13c023[_0x2f4014(0x17d)](),_0x253769(_0x35711f[0x0][_0x2f4014(0x195)][0x0]));});_0x13c023[_0x2c8b1c(0x19c)](_0x28357c,{'childList':!0x0,'subtree':!0x0});}[_0x5ca5b3(0x1a4)](_0xd4b7d8){const _0x3a5d76=_0x5ca5b3;_0xd4b7d8[_0x3a5d76(0x170)](_0x3a5d76(0x186),_0x2be8c3=>{const _0x1d33ac=_0x3a5d76;this[_0x1d33ac(0x18d)](_0x1d33ac(0x186),{'imageSrc':_0x2be8c3[_0x1d33ac(0x198)][_0x1d33ac(0x197)]});}),_0xd4b7d8[_0x3a5d76(0x170)](_0x3a5d76(0x178),()=>{const _0x1ef2fc=_0x3a5d76;this[_0x1ef2fc(0x18d)](_0x1ef2fc(0x178));});}[_0x5ca5b3(0x189)](){const _0x320964=_0x5ca5b3;this[_0x320964(0x17a)]['on'](_0x320964(0x19a),()=>{const _0x3b41f3=_0x320964;this[_0x3b41f3(0x18d)](_0x3b41f3(0x19a));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x7874(_0x4365aa,_0x530d98){const _0xd76dc4=_0xd76d();return _0x7874=function(_0x78746b,_0x56081a){_0x78746b=_0x78746b-0x19c;let _0xf6ed64=_0xd76dc4[_0x78746b];return _0xf6ed64;},_0x7874(_0x4365aa,_0x530d98);}const _0x2075a7=_0x7874;(function(_0x33ec15,_0x107465){const _0x32276a=_0x7874,_0x5b35ef=_0x33ec15();while(!![]){try{const _0x551144=-parseInt(_0x32276a(0x1a4))/0x1+parseInt(_0x32276a(0x1a9))/0x2*(parseInt(_0x32276a(0x1b5))/0x3)+parseInt(_0x32276a(0x1b0))/0x4+parseInt(_0x32276a(0x1a7))/0x5+parseInt(_0x32276a(0x1b1))/0x6+-parseInt(_0x32276a(0x1a8))/0x7+-parseInt(_0x32276a(0x1b8))/0x8;if(_0x551144===_0x107465)break;else _0x5b35ef['push'](_0x5b35ef['shift']());}catch(_0x163e0b){_0x5b35ef['push'](_0x5b35ef['shift']());}}}(_0xd76d,0xe9b23));import{Command as _0x357ec6}from'ckeditor5/src/core.js';import{Dialog as _0x11acae}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x3b23a1}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x48a248}from'../utils/editingutils.js';function _0xd76d(){const _0x29535f=['unbind','imageInline','requires','1900484sdfQLa','6698592VhfHrA','getSelectedElement','editor','_isEditable','1031073OjwxNm','bind','element','19701992tInqFw','imageEditController','isEnabled','get','model','selection','refresh','document','config','imageBlock','104989YhkLSa','plugins','set','6286210sJIROm','78540NLFPib','4IvrhpI','uploadcare.allowExternalImagesEditing','execute','isActive'];_0xd76d=function(){return _0x29535f;};return _0xd76d();}export class UploadcareImageEditCommand extends _0x357ec6{[_0x2075a7(0x1b9)];static get[_0x2075a7(0x1af)](){return[_0x11acae];}[_0x2075a7(0x1b4)];constructor(_0x3c8f23){const _0x38f243=_0x2075a7;super(_0x3c8f23),this[_0x38f243(0x1b9)]=void 0x0,this[_0x38f243(0x1b4)]=_0x48a248(_0x3c8f23[_0x38f243(0x1a2)][_0x38f243(0x19d)](_0x38f243(0x1aa))||[]),this[_0x38f243(0x1a6)]({'isActive':!0x1});}[_0x2075a7(0x1a0)](){const _0x56ea27=_0x2075a7,_0x4bc07a=this[_0x56ea27(0x1b3)][_0x56ea27(0x19e)][_0x56ea27(0x1a1)][_0x56ea27(0x19f)][_0x56ea27(0x1b2)]();this[_0x56ea27(0x19c)]=this[_0x56ea27(0x1b4)](_0x4bc07a);}[_0x2075a7(0x1ab)](){const _0x5eeb11=_0x2075a7;this[_0x5eeb11(0x1b9)]&&(this[_0x5eeb11(0x1ad)](_0x5eeb11(0x1ac)),this[_0x5eeb11(0x1b9)]=void 0x0);const _0x21dac7=this[_0x5eeb11(0x1b3)][_0x5eeb11(0x19e)][_0x5eeb11(0x1a1)][_0x5eeb11(0x19f)][_0x5eeb11(0x1b2)]();_0x21dac7&&(_0x21dac7['is'](_0x5eeb11(0x1b7),_0x5eeb11(0x1a3))||_0x21dac7['is'](_0x5eeb11(0x1b7),_0x5eeb11(0x1ae)))&&(this[_0x5eeb11(0x1b9)]=new _0x3b23a1(this[_0x5eeb11(0x1b3)],this[_0x5eeb11(0x1b3)][_0x5eeb11(0x1a5)][_0x5eeb11(0x19d)](_0x11acae),_0x21dac7),this[_0x5eeb11(0x1b6)](_0x5eeb11(0x1ac))['to'](this[_0x5eeb11(0x1b9)],_0x5eeb11(0x1ac)));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x36cf28=_0x46fb;(function(_0x3ef526,_0x2adc32){const _0x3ea3e2=_0x46fb,_0x1050cc=_0x3ef526();while(!![]){try{const _0x14584b=parseInt(_0x3ea3e2(0x10b))/0x1+-parseInt(_0x3ea3e2(0xf5))/0x2+-parseInt(_0x3ea3e2(0x10a))/0x3+parseInt(_0x3ea3e2(0x108))/0x4*(parseInt(_0x3ea3e2(0x101))/0x5)+parseInt(_0x3ea3e2(0xfe))/0x6*(parseInt(_0x3ea3e2(0xff))/0x7)+-parseInt(_0x3ea3e2(0x106))/0x8*(-parseInt(_0x3ea3e2(0xfd))/0x9)+-parseInt(_0x3ea3e2(0xf7))/0xa*(-parseInt(_0x3ea3e2(0x107))/0xb);if(_0x14584b===_0x2adc32)break;else _0x1050cc['push'](_0x1050cc['shift']());}catch(_0x232cfc){_0x1050cc['push'](_0x1050cc['shift']());}}}(_0xddf6,0xc6c7a));import{Plugin as _0x3f244c}from'ckeditor5/src/core.js';function _0x46fb(_0x176482,_0x122448){const _0xddf68d=_0xddf6();return _0x46fb=function(_0x46fb52,_0x332745){_0x46fb52=_0x46fb52-0xf5;let _0x5f53d3=_0xddf68d[_0x46fb52];return _0x5f53d3;},_0x46fb(_0x176482,_0x122448);}import{Notification as _0x4c193f}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x378d34}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x4ace19}from'./uploadcareimagereplacecommand.js';function _0xddf6(){const _0x16e7bc=['add','ImageUtils','isPremiumPlugin','24cVnBFz','11IvPsgq','2657692jcsqXL','requires','3405510cQqxHs','62182JAUruH','1685164tYtwKN','init','10745870osQwrL','commands','uploadcareImageEdit','ImageEditing','isOfficialPlugin','uploadcareImageReplace','1764405zvTYDn','2415762dqKHIg','7WJFrMz','pluginName','5IxhntM','UploadcareImageEditEditing'];_0xddf6=function(){return _0x16e7bc;};return _0xddf6();}import{UploadcareEditing as _0x58ccf4}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x3f244c{static get[_0x36cf28(0x100)](){const _0x18791c=_0x36cf28;return _0x18791c(0x102);}static get[_0x36cf28(0x109)](){const _0x3b07e7=_0x36cf28;return[_0x58ccf4,_0x4c193f,_0x3b07e7(0x104),_0x3b07e7(0xfa)];}static get[_0x36cf28(0xfb)](){return!0x0;}static get[_0x36cf28(0x105)](){return!0x0;}[_0x36cf28(0xf6)](){const _0x563e25=_0x36cf28,{editor:_0x3affad}=this;_0x3affad[_0x563e25(0xf8)][_0x563e25(0x103)](_0x563e25(0xf9),new _0x378d34(_0x3affad)),_0x3affad[_0x563e25(0xf8)][_0x563e25(0x103)](_0x563e25(0xfc),new _0x4ace19(_0x3affad));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as
|
|
23
|
+
import{Plugin as _0x1d7fa3}from'ckeditor5/src/core.js';import{ButtonView as _0x4495b0}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x5f3898}from'ckeditor5/src/icons.js';import{createElement as _0x358bfa}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 _0x1d7fa3{['_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 _0x2ad09c=this['editor'];_0x2ad09c['ui']['componentFactory']['add']('uploadcareImageEdit',_0x2033fb=>{const _0x3a8be9=_0x2ad09c['commands']['get']('uploadcareImageEdit'),_0x317833=new _0x4495b0(_0x2033fb),t=_0x2033fb['t'];return _0x317833['set']({'icon':_0x5f3898,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x317833['bind']('isEnabled')['to'](_0x3a8be9),_0x317833['bind']('isOn')['to'](_0x3a8be9,'isActive'),this['listenTo'](_0x317833,'execute',()=>{_0x2ad09c['execute']('uploadcareImageEdit'),_0x2ad09c['editing']['view']['focus']();}),_0x317833;}),this['_initConfig']();}['_initConfig'](){const _0x55f4c3=_0x358bfa(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x55f4c3),this['listenTo'](this['editor'],'destroy',()=>{_0x55f4c3['remove']();});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function _0x336b(){var _0x1dd701=['focusCycler','472230Fblbcy','getFocusableElement','forwardCycle','1809963AsyFGv','62MxaJrV','div','58SxytSu','focusTracker','127300XahtCB','3378548MisIzf','createCollection','1503htuUcC','1227208Qllcwa','bindTemplate','49QimGNO','true','3378095wYqRcS','fire'];_0x336b=function(){return _0x1dd701;};return _0x336b();}var _0x294c68=_0xd1a8;function _0xd1a8(_0x2e5413,_0x5b6cde){var _0x336bc9=_0x336b();return _0xd1a8=function(_0xd1a807,_0xf8ee55){_0xd1a807=_0xd1a807-0x85;var _0x3b2be1=_0x336bc9[_0xd1a807];return _0x3b2be1;},_0xd1a8(_0x2e5413,_0x5b6cde);}(function(_0x169b9d,_0x305e20){var _0x48aa6e=_0xd1a8,_0x43dab7=_0x169b9d();while(!![]){try{var _0x33e036=-parseInt(_0x48aa6e(0x93))/0x1*(-parseInt(_0x48aa6e(0x95))/0x2)+-parseInt(_0x48aa6e(0x92))/0x3+parseInt(_0x48aa6e(0x85))/0x4+-parseInt(_0x48aa6e(0x8c))/0x5+-parseInt(_0x48aa6e(0x8f))/0x6+-parseInt(_0x48aa6e(0x8a))/0x7*(parseInt(_0x48aa6e(0x88))/0x8)+parseInt(_0x48aa6e(0x87))/0x9*(parseInt(_0x48aa6e(0x97))/0xa);if(_0x33e036===_0x305e20)break;else _0x43dab7['push'](_0x43dab7['shift']());}catch(_0x3c04a1){_0x43dab7['push'](_0x43dab7['shift']());}}}(_0x336b,0x840dd));import{FocusTracker as _0x43466d}from'ckeditor5/src/utils.js';import{View as _0x11667a,FocusCycler as _0x3f69a0}from'ckeditor5/src/ui.js';import'../../theme/uploadcare-form.css';export class DialogFocusManagerView extends _0x11667a{[_0x294c68(0x96)];[_0x294c68(0x8e)];constructor(_0x4519eb){var _0x2d6fd1=_0x294c68;super(_0x4519eb),this[_0x2d6fd1(0x96)]=new _0x43466d(),this[_0x2d6fd1(0x8e)]=new _0x3f69a0({'focusables':this[_0x2d6fd1(0x86)](),'focusTracker':this[_0x2d6fd1(0x96)]});}[_0x294c68(0x90)](){var _0x5b6efb=_0x294c68;return{'tag':_0x5b6efb(0x94),'attributes':{'aria-hidden':_0x5b6efb(0x8b),'tabindex':'0'},'on':{'focus':this[_0x5b6efb(0x89)]['to'](()=>{var _0x34eb76=_0x5b6efb;this[_0x34eb76(0x8e)][_0x34eb76(0x8d)](_0x34eb76(0x91));})}};}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x6b91fe,_0x347314){const _0x525a71=_0x14e0,_0x21f579=_0x6b91fe();while(!![]){try{const _0x1fcd7d=parseInt(_0x525a71(0x109))/0x1+parseInt(_0x525a71(0x110))/0x2*(-parseInt(_0x525a71(0x11a))/0x3)+-parseInt(_0x525a71(0x128))/0x4*(-parseInt(_0x525a71(0x106))/0x5)+parseInt(_0x525a71(0x100))/0x6*(-parseInt(_0x525a71(0xfd))/0x7)+-parseInt(_0x525a71(0x10e))/0x8+-parseInt(_0x525a71(0x12f))/0x9+-parseInt(_0x525a71(0x10d))/0xa*(-parseInt(_0x525a71(0xff))/0xb);if(_0x1fcd7d===_0x347314)break;else _0x21f579['push'](_0x21f579['shift']());}catch(_0x5ace98){_0x21f579['push'](_0x21f579['shift']());}}}(_0x222e,0x84471));import{global as _0x488025,DomEmitterMixin as _0x28bbac}from'ckeditor5/src/utils.js';function _0x14e0(_0x2e94f7,_0x3873e2){const _0x222e60=_0x222e();return _0x14e0=function(_0x14e06b,_0x1dee68){_0x14e06b=_0x14e06b-0xfb;let _0x11b04e=_0x222e60[_0x14e06b];return _0x11b04e;},_0x14e0(_0x2e94f7,_0x3873e2);}export function createEditabilityChecker(_0x41bab7){const _0x3302f3=_0x14e0,_0x3b1c5d=G(_0x41bab7);return _0x411d34=>!(!_0x411d34||!_0x411d34['is'](_0x3302f3(0x130),_0x3302f3(0x105))&&!_0x411d34['is'](_0x3302f3(0x130),_0x3302f3(0x119)))&&(!!_0x411d34[_0x3302f3(0x132)](_0x3302f3(0x125))||!!_0x411d34[_0x3302f3(0x132)](_0x3302f3(0x12c))&&_0x3b1c5d(_0x411d34[_0x3302f3(0x103)](_0x3302f3(0x12c))));}function _0x222e(){const _0x8553dd=['width','baseURI','editing','isArray','listenTo','replace','mapper','stopListening','viewToDom','height','uploadcareImageId','match','removeClass','120904kvmzEQ','px)\x20100vw,\x20','removeStyle','map','src','some','filter','6000021ABIiPm','element','change','hasAttribute','/-/resize/','location','addClass','load','499625ZsSyyv','aspect-ratio','297PyLzyz','84GSqFdK','(max-width:\x20','x/\x20','getAttribute','document','imageBlock','95AhAHMd','image-processing','plugins','578526LPzIrz','join','origin','findViewImgElement','777190gxjsnZ','7775672quEtRb','image/webp','332wXFIbq','setStyle','function','ImageUtils','window','view','get','domConverter','toViewElement','imageInline','1293snzrTP'];_0x222e=function(){return _0x8553dd;};return _0x222e();}export function getImageUrls(_0x321764,_0x4dec29){const _0x34f8e6=_0x14e0,_0x45b5c3=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960][_0x34f8e6(0x12e)](_0x3ed8c3=>_0x3ed8c3<=_0x4dec29)[_0x34f8e6(0x12b)](_0x2100e0=>_0x321764[_0x34f8e6(0x120)](/\/$/,'')+_0x34f8e6(0x133)+_0x2100e0+_0x34f8e6(0x102)+_0x2100e0+'w');return{'imageFallbackUrl':_0x321764,'imageSources':[{'srcset':_0x45b5c3[_0x34f8e6(0x10a)](',\x20'),'sizes':_0x34f8e6(0x101)+_0x4dec29+_0x34f8e6(0x129)+_0x4dec29+'px','type':_0x34f8e6(0x10f)}]};}export function getImageDimension(_0x4a6baf,_0x1e5810,_0x1dd6e2){const _0x12e646=_0x14e0,_0x5ee21e=_0x4a6baf[_0x12e646(0x126)](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5ee21e?parseInt(_0x5ee21e[0x1],0xa):_0x1e5810,'height':_0x5ee21e?parseInt(_0x5ee21e[0x2],0xa):_0x1dd6e2};}export function showImageProcessingIndicator(_0x12a50a,_0xbff6e6){const _0x1bdeea=_0x14e0,_0x417bad=new(_0x28bbac())(),_0xb5bc51=_0x12a50a[_0x1bdeea(0x108)][_0x1bdeea(0x116)](_0x1bdeea(0x113)),_0x19a0f1=_0x12a50a[_0x1bdeea(0x11d)][_0x1bdeea(0x121)][_0x1bdeea(0x118)](_0xbff6e6),_0x3fdae0=_0xb5bc51[_0x1bdeea(0x10c)](_0x19a0f1),_0x35fe09=_0x12a50a[_0x1bdeea(0x11d)][_0x1bdeea(0x115)][_0x1bdeea(0x117)][_0x1bdeea(0x123)](_0x3fdae0),_0x45e18c=_0xbff6e6[_0x1bdeea(0x103)](_0x1bdeea(0x11b)),_0x1d6d57=_0xbff6e6[_0x1bdeea(0x103)](_0x1bdeea(0x124)),_0x4dfff3=_0x1bdeea(0x107);_0x12a50a[_0x1bdeea(0x11d)][_0x1bdeea(0x115)][_0x1bdeea(0x131)](_0x5842f3=>{const _0x30df79=_0x1bdeea;_0x5842f3[_0x30df79(0xfb)](_0x4dfff3,_0x19a0f1),_0x5842f3[_0x30df79(0x111)](_0x30df79(0xfe),_0x45e18c+'/'+_0x1d6d57,_0x3fdae0);}),_0x417bad[_0x1bdeea(0x11f)](_0x35fe09,_0x1bdeea(0xfc),()=>{const _0x282c9f=_0x1bdeea;_0x417bad[_0x282c9f(0x122)](_0x35fe09,_0x282c9f(0xfc)),_0x12a50a[_0x282c9f(0x11d)][_0x282c9f(0x115)][_0x282c9f(0x131)](_0x2ebf34=>{const _0x433de1=_0x282c9f;_0x2ebf34[_0x433de1(0x127)](_0x4dfff3,_0x19a0f1),_0x2ebf34[_0x433de1(0x12a)](_0x433de1(0xfe),_0x3fdae0);});});}function G(_0x53141d){const _0x18fc2e=_0x14e0;if(Array[_0x18fc2e(0x11e)](_0x53141d)){const _0x1f6371=_0x53141d[_0x18fc2e(0x12b)](G);return _0x1bd421=>_0x1f6371[_0x18fc2e(0x12d)](_0xcf2a85=>_0xcf2a85(_0x1bd421));}if(_0x18fc2e(0x10b)==_0x53141d){const _0x1f9f56=_0x488025[_0x18fc2e(0x114)][_0x18fc2e(0x134)][_0x18fc2e(0x10b)];return _0x453c76=>new URL(_0x453c76,_0x488025[_0x18fc2e(0x104)][_0x18fc2e(0x11c)])[_0x18fc2e(0x10b)]==_0x1f9f56;}return _0x18fc2e(0x112)==typeof _0x53141d?_0x53141d:_0x53141d instanceof RegExp?_0x2b8dd2=>!(!_0x2b8dd2[_0x18fc2e(0x126)](_0x53141d)&&!_0x2b8dd2[_0x18fc2e(0x120)](/^https?:\/\//,'')[_0x18fc2e(0x126)](_0x53141d)):()=>!0x1;}
|