@ckeditor/ckeditor5-uploadcare 48.0.0-alpha.0 → 48.0.0-alpha.2

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x3879b3,Command as _0x53a55c}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x449da0,IconGooglePhotos as _0x4517af,IconGoogleDrive as _0x305f05,IconFacebook as _0xa47dc1,IconDropbox as _0x335f45,IconUploadcareLink as _0x551f91,IconUploadcareImageUpload as _0x2a9c38,IconError as _0x431cce,IconUploadcareImageEdit as _0x2c0064}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xabf6cd,MenuBarMenuListItemButtonView as _0x199c13,View as _0x490590,FocusCycler as _0x1d8abe,Dialog as _0x33060a,DialogViewPosition as _0x372aaf,SpinnerView as _0x511963,IconView as _0x425035,Notification as _0x42c8de}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0xe8aa22,DomEmitterMixin as _0x34d661,global as _0x31a047,getAncestors as _0x1243f4,ObservableMixin as _0x1b6433,uid as _0x297137,createElement as _0xa26b29}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ImageUploadEditing as _0x37cfc0,ImageUploadProgress as _0x2c575a,PictureEditing as _0x516c99,ImageUtils as _0x302b27,ImageEditing as _0x565891}from'@ckeditor/ckeditor5-image/dist/index.js';import{FileRepository as _0x2558a1}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x37aea7,info as _0x7a5a16}from'@uploadcare/upload-client';import*as _0x4dd133 from'@uploadcare/file-uploader';var D=function(_0x429b4e){return _0x429b4e['Local']='local',_0x429b4e['URL']='url',_0x429b4e['Dropbox']='dropbox',_0x429b4e['GDrive']='gdrive',_0x429b4e['Facebook']='facebook',_0x429b4e['GPhotos']='gphotos',_0x429b4e['OneDrive']='onedrive',_0x429b4e;}({});function F(_0x114e30,_0x2f64ae,_0x585931){const t=_0x114e30['t'],_0x3127e0=_0x114e30['t'];switch(_0x2f64ae){case D['Local']:return{'text':_0x3127e0('Insert'===_0x585931?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x3127e0('From\x20computer')};case D['URL']:return{'text':'Insert'===_0x585931?_0x3127e0('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x3127e0('Via\x20URL')};case D['Dropbox']:return{'text':t('Insert'===_0x585931?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case D['Facebook']:return{'text':t('Insert'===_0x585931?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case D['GDrive']:return{'text':t('Insert'===_0x585931?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case D['GPhotos']:return{'text':t('Insert'===_0x585931?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case D['OneDrive']:return{'text':t('Insert'===_0x585931?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2f64ae;}}class $ extends _0x3879b3{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'UploadcareUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5aa362=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x22ae70;for(const _0x3fbcec in _0x5aa362){const _0x4166c3=_0x3fbcec,_0x1e74d1=_0x5aa362[_0x4166c3];if('uploadcareLicenseKeyValid'==_0x1e74d1||'uploadcareLicenseKeyInvalid'==_0x1e74d1||'uploadcareLicenseKeyExpired'==_0x1e74d1||'uploadcareLicenseKeyDomainLimit'==_0x1e74d1||'uploadcareLicenseKeyNotAllowed'==_0x1e74d1||'uploadcareLicenseKeyEvaluationLimit'==_0x1e74d1||'uploadcareLicenseKeyUsageLimit'==_0x1e74d1){delete _0x5aa362[_0x4166c3],_0x22ae70=_0x1e74d1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x22ae70&&_0x5aa362['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x22ae70&&_0x5aa362['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x22ae70&&_0x5aa362['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x22ae70&&_0x5aa362['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x22ae70&&_0x5aa362['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x22ae70&&_0x5aa362['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x186ebc}=this,_0x146921=_0x186ebc['commands']['get']('uploadcare');if(!_0x146921)return;const _0x55856c=this['_normalizeConfigSourceList'](_0x186ebc['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x3527bc,_0x32b0ff)=>{const _0x58942b=this['_getIntegrationKey'](_0x32b0ff['type']);return _0x3527bc[_0x58942b]||(_0x3527bc[_0x58942b]=[]),_0x3527bc[_0x58942b]['push'](_0x32b0ff),_0x3527bc;},{});_0x186ebc['plugins']['has']('ImageInsertUI')&&_0x186ebc['commands']['get']('uploadcare')&&Object['entries'](_0x55856c)['forEach'](([_0x1b69c8,_0x128069])=>{_0x186ebc['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x1b69c8,'observable':()=>_0x146921,'buttonViewCreator':()=>this['_createToolbarButton'](_0x128069),'formViewCreator':()=>this['_createDropdownButtons'](_0x128069),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x128069),'override':'assetManager'!==_0x1b69c8});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x1df83f){const {locale:_0x42a0e2}=this['editor'];return _0x1df83f['map'](_0x293e7e=>{const _0x3befc6=F(_0x42a0e2,_0x293e7e,'Insert');switch(_0x293e7e){case D['Local']:return{'icon':_0x2a9c38,'type':D['Local'],..._0x3befc6};case D['URL']:return{'icon':_0x551f91,'type':D['URL'],..._0x3befc6};case D['Dropbox']:return{'icon':_0x335f45,'type':D['Dropbox'],..._0x3befc6};case D['Facebook']:return{'icon':_0xa47dc1,'type':D['Facebook'],..._0x3befc6};case D['GDrive']:return{'icon':_0x305f05,'type':D['GDrive'],..._0x3befc6};case D['GPhotos']:return{'icon':_0x4517af,'type':D['GPhotos'],..._0x3befc6};case D['OneDrive']:return{'icon':_0x449da0,'type':D['OneDrive'],..._0x3befc6};}});}['_getIntegrationKey'](_0x2f4de5){switch(_0x2f4de5){case D['Local']:return'upload';case D['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x181cca,_0xc415e9){const _0x74bf7e=this['editor'],_0x3a2326=new _0x181cca(_0x74bf7e['locale']),_0x1fc656=_0x74bf7e['commands']['get']('uploadcare');return _0x3a2326['bind']('isEnabled')['to'](_0x1fc656),_0x3a2326['on']('execute',()=>{_0x1fc656['execute'](_0xc415e9);}),_0x3a2326;}['_createToolbarButton'](_0x1ae360){const {locale:_0x2c9a52}=this['editor'],_0x324aee=this['editor']['plugins']['get']('ImageInsertUI'),_0x359ac1=_0x1ae360[0x0],_0x49e746=this['_createButton'](_0xabf6cd,_0x359ac1['type']);return _0x49e746['icon']=_0x359ac1['icon'],_0x49e746['bind']('label')['to'](_0x324aee,'isImageSelected',_0x12b956=>F(_0x2c9a52,_0x359ac1['type'],_0x12b956?'Replace':'Insert')['text']),_0x49e746['tooltip']=!0x0,_0x49e746;}['_createDropdownButtons'](_0x45aace){const {locale:_0x5527e2}=this['editor'],_0x411c01=this['editor']['plugins']['get']('ImageInsertUI');return _0x45aace['map'](_0x2d8e4c=>{const _0x573d78=this['_createButton'](_0xabf6cd,_0x2d8e4c['type']);return _0x573d78['withText']=!0x0,_0x573d78['icon']=_0x2d8e4c['icon'],_0x573d78['bind']('label')['to'](_0x411c01,'isImageSelected',_0x466920=>F(_0x5527e2,_0x2d8e4c['type'],_0x466920?'Replace':'Insert')['text']),_0x573d78;});}['_createMenuBarButtons'](_0x2630c7){return _0x2630c7['map'](_0x27e438=>{const _0x2df842=this['_createButton'](_0x199c13,_0x27e438['type']);return _0x2df842['icon']=_0x27e438['icon'],_0x2df842['label']=_0x27e438['shortText'],_0x2df842;});}}class B extends _0x490590{['focusTracker'];['focusCycler'];constructor(_0x130ff6){super(_0x130ff6),this['focusTracker']=new _0xe8aa22(),this['focusCycler']=new _0x1d8abe({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class V extends B{constructor(_0x2e0c52,_0x17b234){super(_0x2e0c52),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader-'+_0x17b234}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function j(_0x8e6354,_0x5cd58d){const _0x4f03c8=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0xbc3453=>_0xbc3453<=_0x5cd58d)['map'](_0x3827b9=>_0x8e6354['replace'](/\/$/,'')+'/-/resize/'+_0x3827b9+'x/\x20'+_0x3827b9+'w');return{'imageFallbackUrl':_0x8e6354,'imageSources':[{'srcset':_0x4f03c8['join'](',\x20'),'sizes':'(max-width:\x20'+_0x5cd58d+'px)\x20100vw,\x20'+_0x5cd58d+'px','type':'image/webp'}]};}function M(_0x54775c,_0x1844d7,_0x1de1da){const _0x558a8a=_0x54775c['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x558a8a?parseInt(_0x558a8a[0x1],0xa):_0x1844d7,'height':_0x558a8a?parseInt(_0x558a8a[0x2],0xa):_0x1de1da};}function q(_0x48d992,_0x58e37d){const _0x2d9046=new(_0x34d661())(),_0x20ad80=_0x48d992['plugins']['get']('ImageUtils'),_0x204872=_0x48d992['editing']['mapper']['toViewElement'](_0x58e37d),_0x3e9dae=_0x20ad80['findViewImgElement'](_0x204872),_0x54b107=_0x48d992['editing']['view']['domConverter']['viewToDom'](_0x3e9dae),_0x444bd0=_0x58e37d['getAttribute']('width'),_0x14731b=_0x58e37d['getAttribute']('height'),_0x988a3f='image-processing';_0x48d992['editing']['view']['change'](_0x1e8ec2=>{_0x1e8ec2['addClass'](_0x988a3f,_0x204872),_0x1e8ec2['setStyle']('aspect-ratio',_0x444bd0+'/'+_0x14731b,_0x3e9dae);}),_0x2d9046['listenTo'](_0x54b107,'load',()=>{_0x2d9046['stopListening'](_0x54b107,'load'),_0x48d992['editing']['view']['change'](_0x451baf=>{_0x451baf['removeClass'](_0x988a3f,_0x204872),_0x451baf['removeStyle']('aspect-ratio',_0x3e9dae);});});}function W(_0x44ff7b){if(Array['isArray'](_0x44ff7b)){const _0x5909d7=_0x44ff7b['map'](W);return _0x473f6f=>_0x5909d7['some'](_0x4a2c82=>_0x4a2c82(_0x473f6f));}if('origin'==_0x44ff7b){const _0x3d0e7d=_0x31a047['window']['location']['origin'];return _0x433ec5=>new URL(_0x433ec5,_0x31a047['document']['baseURI'])['origin']==_0x3d0e7d;}return'function'==typeof _0x44ff7b?_0x44ff7b:_0x44ff7b instanceof RegExp?_0x4ab1c2=>!(!_0x4ab1c2['match'](_0x44ff7b)&&!_0x4ab1c2['replace'](/^https?:\/\//,'')['match'](_0x44ff7b)):()=>!0x1;}function G(_0x339904,_0x2333de){return _0x1243f4(_0x339904['target'])['includes'](_0x2333de);}class z extends/* #__PURE__ -- @preserve */
24
- _0x1b6433(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x3697b5,_0x110030,_0x1104a9){super(),this['_editor']=_0x3697b5,this['_editing']=_0x110030,this['_dialog']=_0x3697b5['plugins']['get'](_0x33060a),this['_api']=_0x110030['ctxElement']['getAPI'](),this['_type']=_0x1104a9,this['_editing']['configElement']['setAttribute']('source-list',this['_type']),this['_initDialog'](),this['_initListeners'](),this['_api']['initFlow']();}['destroy'](){this['_formView']&&(this['_formView']['destroy'](),this['_formView']=null),this['_api']&&this['_api']['doneFlow'](),this['stopListening'](),this['stopDelegating']();}['_initDialog'](){const {locale:_0x2a0cb8,model:_0x180aad}=this['_editor'],_0x58c2eb=_0x180aad['document']['selection']['getSelectedElement'](),_0x1c188b=_0x58c2eb&&(_0x58c2eb['is']('element','imageBlock')||_0x58c2eb['is']('element','imageInline'));this['_formView']=new V(_0x2a0cb8,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x2a9c38,'title':F(_0x2a0cb8,this['_type'],_0x1c188b?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x372aaf['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3435de=>!G(_0x3435de,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x1062b0}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x241b87=>{const _0x56eb84=_0x1062b0['length'];for(const _0x1074fa of _0x1062b0){const _0x5cf5a4=_0x1074fa===_0x1062b0[_0x56eb84-0x1],{cdnUrl:_0x2b17f1,fileInfo:_0x511835}=_0x1074fa;if(!_0x2b17f1||!_0x511835)continue;const {width:_0x5f7c66,height:_0x338dcb}=_0x511835['imageInfo'],_0x186050=M(_0x2b17f1,_0x5f7c66,_0x338dcb),_0x2e4786=j(_0x2b17f1,_0x186050['width']),_0x24ab0d={'id':_0x511835['uuid'],'type':'image','attributes':{'imageDimension':_0x186050,..._0x2e4786}};this['_insertAsset'](_0x24ab0d,_0x5cf5a4,_0x241b87);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x56311f=>{'idle'===_0x56311f['detail']['status']&&!_0x56311f['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===D['Local']?this['_api']['setCurrentActivity'](D['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x119193,_0x5ced81,_0x25024a){const _0x48bc3b=this['_editor']['model']['document']['selection'],_0xd7c226=_0x48bc3b['getSelectedElement'](),_0x1de80e=!(!_0xd7c226||!_0xd7c226['is']('element','imageInline'));_0x25024a['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x119193,_0x1de80e),_0x5ced81||_0x25024a['setSelection'](_0x48bc3b['getLastPosition']());}['_insertImage'](_0x25fd82,_0x46b907){const _0x11df59=this['_editor'],{imageDimension:_0xd6f292,imageFallbackUrl:_0x11890f,imageSources:_0x13e6ab}=_0x25fd82['attributes'];_0x11df59['execute']('insertImage',{'imageType':_0x46b907?'imageInline':null,'source':{'uploadcareImageId':_0x25fd82['id'],'src':_0x11890f,'sources':_0x13e6ab,..._0xd6f292}});}}class H extends _0x53a55c{['_editing'];['_controller']=null;static get['requires'](){return[_0x33060a,X];}constructor(_0x4dad22){super(_0x4dad22),this['_editing']=_0x4dad22['plugins']['get'](X);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x338b5c){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new z(this['editor'],this['_editing'],_0x338b5c);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class J{static['upload']({file:_0x35b2b1,..._0x572a79}){return _0x37aea7(_0x35b2b1,_0x572a79);}static['getInfo'](_0x5c6e37,_0x49d258){return _0x7a5a16(_0x5c6e37,_0x49d258);}}class Z extends _0x3879b3{static get['requires'](){return[_0x37cfc0,_0x2c575a,_0x2558a1,X];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0xf28702=this['editor'];if(!!!_0xf28702['config']['get']('uploadcare'))return;_0xf28702['plugins']['get'](_0x2558a1)['createUploadAdapter']=_0x5f08c2=>new Q(_0x5f08c2,_0xf28702),_0xf28702['plugins']['get'](_0x37cfc0)['on']('uploadComplete',(_0x4703bf,{imageElement:_0x3b6b1d,data:_0x3c7dff})=>{_0xf28702['model']['change'](_0x195e63=>{_0x195e63['setAttribute']('uploadcareImageId',_0x3c7dff['uploadcareImageId'],_0x3b6b1d);});});}}class Q{['loader'];['editor'];['controller'];constructor(_0x2d08c3,_0x1725fc){this['loader']=_0x2d08c3,this['editor']=_0x1725fc,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x21b6bf=await this['loader']['file'];return J['upload']({'file':_0x21b6bf,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x30d3d8=>{_0x30d3d8&&_0x30d3d8['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x30d3d8['value']);}})['then'](async _0x4fd035=>{const {imageFallbackUrl:_0x1419b7,imageSources:_0x27681c}=j(_0x4fd035['cdnUrl'],_0x4fd035['imageInfo']['width']);return{'uploadcareImageId':_0x4fd035['uuid'],'default':_0x1419b7,'sources':_0x27681c};})['catch'](()=>{const _0x4e36f9=t('Cannot\x20upload\x20file:')+('\x20'+_0x21b6bf['name']+'.');return Promise['reject'](_0x4e36f9);});}['abort'](){this['controller']['abort']();}}class X extends _0x3879b3{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return[_0x516c99,Z,_0x33060a];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x7fa5c2){super(_0x7fa5c2),this['ucContextId']=_0x297137();}['init'](){const _0x3bd35b=this['editor'];_0x3bd35b['commands']['add']('uploadcare',new H(_0x3bd35b));}['afterInit'](){this['_initSchema'](),this['_initConversion'](),this['_initConfig'](),this['_initCtx'](),this['_initImageProcessingIndicator'](),this['listenTo'](this['editor'],'destroy',()=>{this['_configElement']&&(this['_configElement']['remove'](),this['_configElement']=null),this['_ctxElement']&&(this['_ctxElement']['remove'](),this['_ctxElement']=null);const _0x49ff90=_0x31a047['document']['querySelector']('input[uploadcare-file-input]');_0x49ff90&&_0x49ff90['remove']();}),async function(_0x20557f){const _0x1f4def=_0x34eb22([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x16e7f3=0x535f8c3a,_0x1e1e3c=0x535808f2^_0x16e7f3,_0x217c5e=window[_0x34eb22([0x44,0x61,0x74,0x65])][_0x34eb22([0x6e,0x6f,0x77])](),_0x2d9af1=_0x20557f[_0x34eb22([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x262e2e=new window[(_0x34eb22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5862ad=>{_0x2d9af1[_0x34eb22([0x6f,0x6e,0x63,0x65])](_0x34eb22([0x72,0x65,0x61,0x64,0x79]),_0x5862ad);}),_0x5d5a95={[_0x34eb22([0x6b,0x74,0x79])]:_0x34eb22([0x45,0x43]),[_0x34eb22([0x75,0x73,0x65])]:_0x34eb22([0x73,0x69,0x67]),[_0x34eb22([0x63,0x72,0x76])]:_0x34eb22([0x50,0x2d,0x32,0x35,0x36]),[_0x34eb22([0x78])]:_0x34eb22([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x34eb22([0x79])]:_0x34eb22([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x34eb22([0x61,0x6c,0x67])]:_0x34eb22([0x45,0x53,0x32,0x35,0x36])},_0x50906b=_0x2d9af1[_0x34eb22([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x34eb22([0x67,0x65,0x74])](_0x34eb22([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x544f1b(){let _0x2c1c9b,_0x39d1ec=null,_0x28d725=null;try{if(_0x50906b==_0x34eb22([0x47,0x50,0x4c]))return _0x34eb22([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2c1c9b=_0xcae0fe(),!_0x2c1c9b)return _0x34eb22([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2c1c9b[_0x34eb22([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x28d725=_0x5496bf(_0x2c1c9b[_0x34eb22([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2c1c9b[_0x34eb22([0x6a,0x74,0x69])])),await _0x139302()?_0x2517f8()?_0x38b817()?_0x34eb22([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3a2b1a()?(_0x2c1c9b[_0x34eb22([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x34eb22([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x39d1ec=_0x40bae5(_0x34eb22([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4dd2a6()):_0x34eb22([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x34eb22([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x34eb22([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x34eb22([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x38b817(){const _0xf72b5b=[_0x34eb22([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x34eb22([0x74,0x72,0x69,0x61,0x6c])][_0x34eb22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c1c9b[_0x34eb22([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x217c5e/0x3e8:0xe10*_0x1e1e3c;return _0x2c1c9b[_0x34eb22([0x65,0x78,0x70])]<_0xf72b5b;}function _0x2517f8(){const _0x5067f9=_0x2c1c9b[_0x34eb22([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5067f9&&(!!_0x5067f9[_0x34eb22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34eb22([0x2a]))||!!_0x5067f9[_0x34eb22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34eb22([0x55,0x50,0x4c,0x43])));}function _0x3a2b1a(){const _0x5e41db=_0x2c1c9b[_0x34eb22([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5e41db||0x0==_0x5e41db[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3828e1}=new URL(window[_0x34eb22([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5e41db[_0x34eb22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3828e1))return!0x0;const _0x1cba95=_0x3828e1[_0x34eb22([0x73,0x70,0x6c,0x69,0x74])](_0x34eb22([0x2e]));return _0x5e41db[_0x34eb22([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x17a89e=>_0x17a89e[_0x34eb22([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34eb22([0x2a])))[_0x34eb22([0x6d,0x61,0x70])](_0x438cf9=>_0x438cf9[_0x34eb22([0x73,0x70,0x6c,0x69,0x74])](_0x34eb22([0x2e])))[_0x34eb22([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x38eaf8=>_0x38eaf8[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1cba95[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x34eb22([0x6d,0x61,0x70])](_0x4e8073=>Array(_0x1cba95[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4e8073[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x34eb22([0x66,0x69,0x6c,0x6c])](_0x4e8073[0x0]===_0x34eb22([0x2a])?_0x34eb22([0x2a]):'')[_0x34eb22([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4e8073))[_0x34eb22([0x73,0x6f,0x6d,0x65])](_0x547f82=>_0x1cba95[_0x34eb22([0x65,0x76,0x65,0x72,0x79])]((_0x4de6a3,_0x29e799)=>_0x547f82[_0x29e799]===_0x4de6a3||_0x547f82[_0x29e799]===_0x34eb22([0x2a])));}function _0x4dd2a6(){return _0x39d1ec&&_0x28d725?new window[(_0x34eb22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x275baa,_0xe1b863)=>{_0x39d1ec[_0x34eb22([0x74,0x68,0x65,0x6e])](_0x275baa,_0xe1b863),_0x28d725[_0x34eb22([0x74,0x68,0x65,0x6e])](_0x11992b=>{_0x11992b!=_0x34eb22([0x56,0x61,0x6c,0x69,0x64])&&_0x275baa(_0x11992b);},_0xe1b863);}):_0x39d1ec||_0x28d725||_0x34eb22([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5496bf(_0xeecea3,_0x480012){return new window[(_0x34eb22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59ce4b=>{if(_0x1d3d33())return _0x59ce4b(_0x34eb22([0x56,0x61,0x6c,0x69,0x64]));_0x1cf474(),_0x2d9af1[_0x34eb22([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x34eb22([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4a246e=!0x1;const _0xe20628=_0x297137();function _0x3898d0(_0x2ce6b1){return!!_0x2ce6b1&&(typeof _0x2ce6b1===_0x34eb22([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2ce6b1===_0x34eb22([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2ce6b1[_0x34eb22([0x74,0x68,0x65,0x6e])]===_0x34eb22([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2ce6b1[_0x34eb22([0x63,0x61,0x74,0x63,0x68])]===_0x34eb22([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x48b698(_0x12bcc8){_0x452813(_0x12bcc8)[_0x34eb22([0x74,0x68,0x65,0x6e])](_0x444988=>{if(!_0x444988||_0x444988[_0x34eb22([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x34eb22([0x6f,0x6b]))return _0x34eb22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x21bd5d(_0x41d0d3(_0xe20628+_0x480012))!=_0x444988[_0x34eb22([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x34eb22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x34eb22([0x56,0x61,0x6c,0x69,0x64]);})[_0x34eb22([0x74,0x68,0x65,0x6e])](_0x127866=>(_0x31abbc(),_0x127866),()=>{const _0x468845=_0x4749c5();return null==_0x468845?(_0x31abbc(),_0x34eb22([0x56,0x61,0x6c,0x69,0x64])):_0x34eb22(_0x217c5e-_0x468845>(0x7753083a^_0x16e7f3)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x34eb22([0x74,0x68,0x65,0x6e])](_0x59ce4b)[_0x34eb22([0x63,0x61,0x74,0x63,0x68])](()=>{_0x59ce4b(_0x34eb22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x19bea0=0x536962ba^_0x16e7f3;function _0x31abbc(){const _0x563cfa=_0x34eb22([0x6c,0x6c,0x63,0x74,0x2d])+_0x21bd5d(_0x41d0d3(_0xeecea3)),_0x213f3a=_0x47adbd(_0x21bd5d(window[_0x34eb22([0x4d,0x61,0x74,0x68])][_0x34eb22([0x63,0x65,0x69,0x6c])](_0x217c5e/_0x19bea0)));window[_0x34eb22([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x34eb22([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x563cfa,_0x213f3a);}function _0x4749c5(){const _0x1bbe22=_0x34eb22([0x6c,0x6c,0x63,0x74,0x2d])+_0x21bd5d(_0x41d0d3(_0xeecea3)),_0x547111=window[_0x34eb22([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x34eb22([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1bbe22);return _0x547111?window[_0x34eb22([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x47adbd(_0x547111),0x10)*_0x19bea0:null;}function _0x452813(_0x2aef22){return new window[(_0x34eb22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15de08,_0x280e13)=>{_0x2aef22[_0x34eb22([0x74,0x68,0x65,0x6e])](_0x15de08,_0x280e13),window[_0x34eb22([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x280e13,0x535e58fa^_0x16e7f3);});}}_0x2d9af1[_0x34eb22([0x6f,0x6e])](_0x34eb22([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x16d411,_0x3806ce)=>{if(_0x3806ce[0x0]!=_0xeecea3)return _0x59ce4b(_0x34eb22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3806ce[0x1]={..._0x3806ce[0x1],[_0x34eb22([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xe20628};},{[_0x34eb22([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x34eb22([0x68,0x69,0x67,0x68])}),_0x2d9af1[_0x34eb22([0x6f,0x6e])](_0x34eb22([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x29cb0d=>{_0x3898d0(_0x29cb0d[_0x34eb22([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4a246e=!0x0,_0x48b698(_0x29cb0d[_0x34eb22([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x34eb22([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x34eb22([0x6c,0x6f,0x77])}),_0x262e2e[_0x34eb22([0x74,0x68,0x65,0x6e])](()=>{_0x4a246e||_0x59ce4b(_0x34eb22([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1d3d33(){return _0x2d9af1[_0x34eb22([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x34eb22([0x76,0x69,0x65,0x77])][_0x34eb22([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x34eb22([0x61,0x75,0x74,0x6f]);}function _0x1cf474(){_0x2d9af1[_0x34eb22([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x34eb22([0x76,0x69,0x65,0x77])][_0x34eb22([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x34eb22([0x61,0x75,0x74,0x6f]);}}function _0x40bae5(_0x50fa0e){const _0x4602cd=[new window[(_0x34eb22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1b8f6c=>setTimeout(_0x1b8f6c,0x5356b2f6^_0x16e7f3)),_0x262e2e[_0x34eb22([0x74,0x68,0x65,0x6e])](()=>new window[(_0x34eb22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x570993=>{let _0x3ec979=0x0;_0x2d9af1[_0x34eb22([0x6d,0x6f,0x64,0x65,0x6c])][_0x34eb22([0x6f,0x6e])](_0x34eb22([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4a0e80,_0x2d1bf6)=>{_0x2d1bf6[0x0][_0x34eb22([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3ec979++,_0x3ec979==(0x535f89d2^_0x16e7f3)&&(_0x570993(),_0x4a0e80[_0x34eb22([0x6f,0x66,0x66])]());});}))];return window[_0x34eb22([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x34eb22([0x72,0x61,0x63,0x65])](_0x4602cd)[_0x34eb22([0x74,0x68,0x65,0x6e])](()=>_0x50fa0e);}async function _0x16caec(){await _0x262e2e,_0x2d9af1[_0x34eb22([0x6d,0x6f,0x64,0x65,0x6c])][_0x34eb22([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x558abb,_0x2d9af1[_0x34eb22([0x6d,0x6f,0x64,0x65,0x6c])][_0x34eb22([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x558abb,_0x2d9af1[_0x34eb22([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x34eb22([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2c2e56(_0x139e4f){const _0x56644a=_0x1ce0a7();_0x2d9af1[_0x56644a]=_0x34eb22([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x139e4f,_0x139e4f!=_0x34eb22([0x56,0x61,0x6c,0x69,0x64])&&_0x16caec();}function _0x1ce0a7(){const _0x2be581=window[_0x34eb22([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x34eb22([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x34eb22([0x6e,0x6f,0x77])]())[_0x34eb22([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x34eb22([0x2e]),'');let _0x102e69=_0x34eb22([0x68]);for(let _0x50b11b=0x0;_0x50b11b<_0x2be581[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x50b11b+=0x2){let _0x5f285a=window[_0x34eb22([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2be581[_0x34eb22([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x50b11b,_0x50b11b+0x2));_0x5f285a>=_0x1f4def[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5f285a-=_0x1f4def[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x102e69+=_0x1f4def[_0x5f285a];}return _0x102e69;}function _0xcae0fe(){const _0x475bd3=_0x50906b[_0x34eb22([0x73,0x70,0x6c,0x69,0x74])](_0x34eb22([0x2e]));if(0x3!=_0x475bd3[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x116b0f(_0x475bd3[0x1]);function _0x116b0f(_0x12b1cf){const _0x2f1a7b=_0x40b162(_0x12b1cf);return _0x2f1a7b&&_0x2771c7()?_0x2f1a7b:null;function _0x2771c7(){const _0x3be600=_0x2f1a7b[_0x34eb22([0x6a,0x74,0x69])],_0x5a29c4=window[_0x34eb22([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3be600[_0x34eb22([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3be600[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2f35c5={..._0x2f1a7b,[_0x34eb22([0x6a,0x74,0x69])]:_0x3be600[_0x34eb22([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3be600[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2f35c5[_0x34eb22([0x76,0x63])],_0x41d0d3(_0x2f35c5)==_0x5a29c4;}}}async function _0x139302(){let _0x50de1b=!0x0;try{const _0x3b8098=_0x50906b[_0x34eb22([0x73,0x70,0x6c,0x69,0x74])](_0x34eb22([0x2e])),[_0x544183,_0x52dd78,_0x48dde9]=_0x3b8098;return _0x404225(_0x544183),await _0x2075ff(_0x544183,_0x52dd78,_0x48dde9),_0x50de1b;}catch{return!0x1;}function _0x404225(_0x34e648){const _0x35cbe0=_0x40b162(_0x34e648);_0x35cbe0&&_0x35cbe0[_0x34eb22([0x61,0x6c,0x67])]==_0x34eb22([0x45,0x53,0x32,0x35,0x36])||(_0x50de1b=!0x1);}async function _0x2075ff(_0x5d9d61,_0x39796f,_0x2f99f7){const _0x459507=window[_0x34eb22([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x34eb22([0x66,0x72,0x6f,0x6d])](_0x2328ad(_0x2f99f7),_0x1fce8d=>_0x1fce8d[_0x34eb22([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x148f43=new window[(_0x34eb22([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x34eb22([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5d9d61+_0x34eb22([0x2e])+_0x39796f),_0x34f53c=window[_0x34eb22([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x34eb22([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x34f53c)return;const _0x528f0c=await _0x34f53c[_0x34eb22([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x34eb22([0x6a,0x77,0x6b]),_0x5d5a95,{[_0x34eb22([0x6e,0x61,0x6d,0x65])]:_0x34eb22([0x45,0x43,0x44,0x53,0x41]),[_0x34eb22([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x34eb22([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x34eb22([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x34f53c[_0x34eb22([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x34eb22([0x6e,0x61,0x6d,0x65])]:_0x34eb22([0x45,0x43,0x44,0x53,0x41]),[_0x34eb22([0x68,0x61,0x73,0x68])]:{[_0x34eb22([0x6e,0x61,0x6d,0x65])]:_0x34eb22([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x528f0c,_0x459507,_0x148f43)||(_0x50de1b=!0x1);}}function _0x40b162(_0xc9d9b){return _0xc9d9b[_0x34eb22([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x34eb22([0x65,0x79]))?JSON[_0x34eb22([0x70,0x61,0x72,0x73,0x65])](_0x2328ad(_0xc9d9b)):null;}function _0x2328ad(_0x9b2828){return window[_0x34eb22([0x61,0x74,0x6f,0x62])](_0x9b2828[_0x34eb22([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x34eb22([0x2b]))[_0x34eb22([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x34eb22([0x2f])));}function _0x41d0d3(_0x1a5c5d){let _0x564f33=0x1505;function _0xe43aa5(_0x13ad53){for(let _0x1ece29=0x0;_0x1ece29<_0x13ad53[_0x34eb22([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ece29++){const _0x50d082=_0x13ad53[_0x34eb22([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1ece29);_0x564f33=(_0x564f33<<0x5)+_0x564f33+_0x50d082,_0x564f33&=_0x564f33;}}function _0x5af648(_0x31843c){Array[_0x34eb22([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x31843c)?_0x31843c[_0x34eb22([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5af648):_0x31843c&&typeof _0x31843c==_0x34eb22([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x34eb22([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x31843c)[_0x34eb22([0x73,0x6f,0x72,0x74])]()[_0x34eb22([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x549047,_0x41aa04])=>{_0xe43aa5(_0x549047),_0x5af648(_0x41aa04);}):_0xe43aa5(window[_0x34eb22([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x31843c));}return _0x5af648(_0x1a5c5d),_0x564f33>>>0x0;}function _0x21bd5d(_0x227d67){return _0x227d67[_0x34eb22([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x34eb22([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x34eb22([0x30]));}function _0x47adbd(_0x37ad64){return _0x37ad64[_0x34eb22([0x73,0x70,0x6c,0x69,0x74])]('')[_0x34eb22([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x34eb22([0x6a,0x6f,0x69,0x6e])]('');}function _0x558abb(){}function _0x34eb22(_0x313f70){return _0x313f70['map'](_0x4b14ca=>String['fromCharCode'](_0x4b14ca))['join']('');}_0x2c2e56(await _0x544f1b());}(this);}['_initSchema'](){const _0x1a9f15=this['editor']['model']['schema'];_0x1a9f15['isRegistered']('imageBlock')&&_0x1a9f15['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x1a9f15['isRegistered']('imageInline')&&_0x1a9f15['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x14ffb5=this['editor'];_0x14ffb5['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x14ffb5['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x1ab37f=>_0x1ab37f['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5c4e54=_0x14ffb5['commands']['get']('replaceImageSource');_0x5c4e54&&this['listenTo'](_0x5c4e54,'cleanupImage',(_0x281227,[_0x475a72,_0x50c3e1])=>{_0x475a72['removeAttribute']('uploadcareImageId',_0x50c3e1);});}['_initConfig'](){const _0x26ca4f=this['editor']['config']['get']('uploadcare.uploader')||{},_0x37ff71=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0xa26b29(_0x31a047['document'],'uc-config',{..._0x26ca4f,'pubkey':_0x37ff71,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x51cfdc=>{if('closeMax'==_0x51cfdc)return'#uc-icon-arrow-down';},_0x31a047['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0xa26b29(_0x31a047['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x31a047['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0xfcb6b7=this['editor']['commands']['get']('insertImage');_0xfcb6b7&&this['listenTo'](_0xfcb6b7,'execute',()=>{const _0x3b021a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3b021a&&_0x3b021a['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x3b021a);});});const _0x5c44cd=this['editor']['commands']['get']('uploadcareImageReplace');_0x5c44cd&&this['listenTo'](_0x5c44cd,'execute',()=>{const _0x34d738=this['editor']['model']['document']['selection']['getSelectedElement']();_0x34d738&&_0x34d738['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x34d738);});});}}class Y extends _0x3879b3{static get['requires'](){return[X,$];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x404c6d){super(_0x404c6d),_0x404c6d['config']['define']('uploadcare.uploader.sourceList',[D['Local'],D['URL']]),_0x4dd133['defineComponents'](_0x4dd133),this['_defineLocale']();}['_defineLocale'](){const _0x3e645e=this['editor']['config']['get']('uploadcare.locale'),_0x182663=this['editor']['locale']['contentLanguage'];_0x3e645e&&_0x4dd133['defineLocale'](_0x182663,_0x3e645e);}}class tt extends _0x490590{constructor(_0x342702){super(_0x342702);const t=_0x342702['t'],_0x1d06ce=this['bindTemplate'],_0x1ac591=new _0x511963();_0x1ac591['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':[_0x1ac591,{'text':_0x1d06ce['to']('imageUploadProgress',_0x40bc5c=>t('Loading\x20image...')+'\x20('+(_0x40bc5c||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'}]}]}]});}}class et extends _0x490590{constructor(_0x78d40c){super(_0x78d40c);const t=_0x78d40c['t'];this['set']('errorType',null);const _0x3e1068=new _0xabf6cd(_0x78d40c);_0x3e1068['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x3e1068['withText']=!0x0,_0x3e1068['class']='ck-button-action',_0x3e1068['on']('execute',()=>{this['fire']('retry');}),_0x3e1068['bind']('isVisible')['to'](this,'errorType',_0x439ed5=>'NotFound'!==_0x439ed5);const _0x3bfd9b=new _0x425035();_0x3bfd9b['content']=_0x431cce,_0x3bfd9b['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5b0a4f=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':[_0x3bfd9b,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5b0a4f['to']('errorType',_0x51e9b5=>t('NotFound'!==_0x51e9b5?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x3e1068]},{'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'}]}]}]});}}class it extends _0x490590{constructor(_0x25c71e,_0x2dca13){super(_0x25c71e);const _0x11b711=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x2dca13,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x11b711['to']('imageSrc')}});}}class st extends B{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x17f049,_0x3ea7ee,_0x2f8e41){super(_0x17f049),this['_items']=this['createCollection'](),this['_loadingView']=new tt(_0x17f049),this['_errorView']=new et(_0x17f049),this['_editingView']=new it(_0x17f049,_0x2f8e41),this['_focusableView']=new _0x490590(_0x17f049),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x3ea7ee),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':this['_items']}),this['_setView'](),this['once']('render',()=>{this['_waitForImageEditorComponent'](this['element'],_0x5b4a6d=>{this['_addUploadcareImageEditorListeners'](_0x5b4a6d);});}),this['on']('change:status',()=>{this['_setView']();}),this['_addErrorViewListeners']();}['focus'](){this['element']['focus']();}['_setView'](){switch(this['_items']['clear'](),this['status']){case'uploading':this['_items']['add'](this['_loadingView']);break;case'error':this['_items']['add'](this['_errorView']);break;case'ready':this['_items']['addMany']([this['_editingView'],this['_focusableView']]);}}['_waitForImageEditorComponent'](_0x29f6cf,_0x250fa9){const _0x3f3396='uc-cloud-image-editor',_0x3c38af=_0x29f6cf['querySelector'](_0x3f3396);if(_0x3c38af)return _0x250fa9(_0x3c38af);const _0x571109=new MutationObserver(_0x3bab0c=>{const _0x5e9b15=_0x3bab0c['filter'](_0x4c0ba7=>_0x4c0ba7['target']===_0x29f6cf&&_0x4c0ba7['addedNodes']['length']>0x0&&_0x4c0ba7['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x3f3396);_0x5e9b15['length']&&(_0x571109['disconnect'](),_0x250fa9(_0x5e9b15[0x0]['addedNodes'][0x0]));});_0x571109['observe'](_0x29f6cf,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x51ebfa){_0x51ebfa['addEventListener']('apply',_0x15dac=>{this['fire']('apply',{'imageSrc':_0x15dac['detail']['cdnUrl']});}),_0x51ebfa['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class nt extends/* #__PURE__ -- @preserve */
25
- _0x1b6433(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x48efe2,_0x513a8e,_0x127cf1){super(),this['_editor']=_0x48efe2,this['_dialog']=_0x513a8e,this['_imageElement']=_0x127cf1,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 _0x14afe1=this['_imageElement'],_0x441170=_0x14afe1['getAttribute']('uploadcareImageId'),_0x579d6e=_0x14afe1['getAttribute']('src');if(_0x441170)await this['_loadImageInfo'](_0x441170,_0x579d6e);else{if(this['_imageCache']['has'](_0x579d6e)){const _0x11fef7=this['_imageCache']['get'](_0x579d6e);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x11fef7['url'],this['imageDimension']=_0x11fef7['dimension'],this['imageId']=_0x11fef7['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x503685}=this['_editor'],t=_0x503685['t'],_0x46923f=new st(_0x503685,this['imageStatus'],this['_attributes']);_0x46923f['bind']('status')['to'](this,'imageStatus'),_0x46923f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x46923f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x46923f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x46923f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2c0064,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x46923f,'position':_0x372aaf['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x46923f['focus']();},'onHide':()=>{_0x46923f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x125c76=>!G(_0x125c76,_0x46923f['element'])}});}['_loadImageInfo'](_0x1dc9cc,_0x9d7282){return J['getInfo'](_0x1dc9cc,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x22c345=>{const {width:_0x3d763b,height:_0x4259e2}=_0x22c345['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x9d7282,this['imageDimension']={'width':_0x3d763b,'height':_0x4259e2},this['imageId']=_0x1dc9cc;})['catch'](_0x403c4a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x403c4a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3be1c1,_0x44acfb){return this['_getImageAsFile'](_0x3be1c1)['then'](_0x320d0b=>J['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':_0x44acfb['signal'],'file':_0x320d0b,'onProgress':_0x35161b=>{_0x35161b&&_0x35161b['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x35161b['value']));}}))['then'](_0x5ca006=>{const {width:_0x12dc94,height:_0x98458f}=_0x5ca006['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5ca006['cdnUrl'],this['imageDimension']={'width':_0x12dc94,'height':_0x98458f},this['imageId']=_0x5ca006['uuid'],this['imageUploadProgress']=null;const _0x298833=_0x3be1c1['getAttribute']('src');this['_imageCache']['set'](_0x298833,{'id':_0x5ca006['uuid'],'url':_0x5ca006['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x18fe5f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x18fe5f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x411db2,_0x246f1e){_0x411db2['on']('apply',(_0x3c3bef,_0xbb73bd)=>{this['_replaceImage'](_0x246f1e,_0xbb73bd['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x411db2['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x411db2['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x914065,_0x5387fb,_0x30dded){const _0x47d87c=this['_editor'],{width:_0x1bc6a6,height:_0x5a877e}=M(_0x5387fb,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x441497,imageSources:_0x47a800}=j(_0x5387fb,_0x1bc6a6);_0x47d87c['model']['change'](_0x10a077=>{if('$graveyard'===_0x914065['root']['rootName']){_0x47d87c['execute']('insertImage',{'imageType':_0x914065['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x914065['getAttributes']()),'uploadcareImageId':_0x30dded,'src':_0x441497,'sources':_0x47a800,'width':_0x1bc6a6,'height':_0x5a877e}});const _0x307911=_0x914065['getChildren']();_0x914065=_0x47d87c['model']['document']['selection']['getSelectedElement']();for(const _0x21d75a of _0x307911)_0x10a077['append'](_0x10a077['cloneElement'](_0x21d75a),_0x914065);}else _0x10a077['setSelection'](_0x914065,'on'),_0x47d87c['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x914065['getAttributes']()),'uploadcareImageId':_0x30dded,'src':_0x441497,'sources':_0x47a800,'width':_0x1bc6a6,'height':_0x5a877e},_0x914065);_0x10a077['setSelection'](_0x914065,'on');});}async['_getImageAsFile'](_0x3b1e4b){const _0x31f7ef=_0x31a047['window'],_0x535d52=_0x31a047['document']['location']['href'],_0x736dcc=new _0x31f7ef['URL'](_0x3b1e4b['getAttribute']('src'),_0x535d52);if('data:'===_0x736dcc['protocol']){const _0xb8e9df=_0x736dcc['href']['split'](','),_0x3b8d6f=_0xb8e9df[0x0]['match'](/:(.*?);/)[0x1],_0x25974b=_0x3b8d6f['split']('/')[0x1],_0x4c536c=_0x31f7ef['atob'](_0xb8e9df[_0xb8e9df['length']-0x1]);let _0x4d41c0=_0x4c536c['length'];const _0x17bac9=new _0x31f7ef['Uint8Array'](_0x4d41c0);for(;_0x4d41c0--;)_0x17bac9[_0x4d41c0]=_0x4c536c['charCodeAt'](_0x4d41c0);return new _0x31f7ef['File']([_0x17bac9],'image.'+_0x25974b,{'type':_0x3b8d6f});}const _0x3bcc4f=_0x736dcc['href']['split']('/'),_0x2ad405=_0x3bcc4f[_0x3bcc4f['length']-0x1],_0x40b370=_0x2ad405['split']('.')[0x1];return _0x31f7ef['fetch'](_0x736dcc['href'])['then'](_0x57d7e0=>_0x57d7e0['clone']()['blob']())['then'](_0x6f40ea=>new _0x31f7ef['File']([_0x6f40ea],_0x2ad405,{'type':'image/'+_0x40b370}));}}class rt extends _0x53a55c{['imageEditController'];static get['requires'](){return[_0x33060a];}['_isEditable'];constructor(_0x11bf65){super(_0x11bf65),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x3297e5){const _0x2b0eae=W(_0x3297e5);return _0x4c25c7=>!(!_0x4c25c7||!_0x4c25c7['is']('element','imageBlock')&&!_0x4c25c7['is']('element','imageInline'))&&(!!_0x4c25c7['hasAttribute']('uploadcareImageId')||!!_0x4c25c7['hasAttribute']('src')&&_0x2b0eae(_0x4c25c7['getAttribute']('src')));}(_0x11bf65['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x491758=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x491758);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x40cc8b=this['editor']['model']['document']['selection']['getSelectedElement']();_0x40cc8b&&(_0x40cc8b['is']('element','imageBlock')||_0x40cc8b['is']('element','imageInline'))&&(this['imageEditController']=new nt(this['editor'],this['editor']['plugins']['get'](_0x33060a),_0x40cc8b),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class at extends _0x53a55c{['refresh'](){const _0x369310=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x369310&&(_0x369310['is']('element','imageBlock')||_0x369310['is']('element','imageInline')));}['execute'](_0x838a4){const _0xc9f483=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5df42b=>{_0x5df42b['setAttributes'](_0x838a4,_0xc9f483),_0x5df42b['removeAttribute']('srcset',_0xc9f483),_0x5df42b['removeAttribute']('sizes',_0xc9f483);});}}class ot extends _0x3879b3{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[X,_0x42c8de,_0x302b27,_0x565891];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1c474c}=this;_0x1c474c['commands']['add']('uploadcareImageEdit',new rt(_0x1c474c)),_0x1c474c['commands']['add']('uploadcareImageReplace',new at(_0x1c474c));}}class ct extends _0x3879b3{['_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 _0xed814=this['editor'];_0xed814['ui']['componentFactory']['add']('uploadcareImageEdit',_0x2af132=>{const _0x38b618=_0xed814['commands']['get']('uploadcareImageEdit'),_0x3917e6=new _0xabf6cd(_0x2af132),t=_0x2af132['t'];return _0x3917e6['set']({'icon':_0x2c0064,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x3917e6['bind']('isEnabled')['to'](_0x38b618),_0x3917e6['bind']('isOn')['to'](_0x38b618,'isActive'),this['listenTo'](_0x3917e6,'execute',()=>{_0xed814['execute']('uploadcareImageEdit'),_0xed814['editing']['view']['focus']();}),_0x3917e6;}),this['_initConfig']();}['_initConfig'](){const _0x1a16e3=_0xa26b29(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1a16e3),this['listenTo'](this['editor'],'destroy',()=>{_0x1a16e3['remove']();});}}class lt extends _0x3879b3{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[ot,ct];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{Y as Uploadcare,H as UploadcareCommand,X as UploadcareEditing,lt as UploadcareImageEdit,rt as UploadcareImageEditCommand,ot as UploadcareImageEditEditing,ct as UploadcareImageEditUI,$ as UploadcareUI,Z as UploadcareUploadAdapter};
23
+ import{Plugin as _0x2b498e,Command as _0x27989f}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2bee1e,IconGooglePhotos as _0x2f0d24,IconGoogleDrive as _0x1b3073,IconFacebook as _0x3e8b19,IconDropbox as _0x580824,IconUploadcareLink as _0x226f38,IconUploadcareImageUpload as _0x17ef19,IconError as _0x27f1a7,IconUploadcareImageEdit as _0x3c7e92}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x818bcb,MenuBarMenuListItemButtonView as _0xc4abfa,View as _0x59df62,FocusCycler as _0x165883,Dialog as _0xd4409f,DialogViewPosition as _0x474297,SpinnerView as _0x3c19ec,IconView as _0x5ca6ba,Notification as _0x22f7fb}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x11cb3b,DomEmitterMixin as _0x1e0b76,global as _0xe88406,getAncestors as _0x3e0c43,ObservableMixin as _0x4c7b3d,uid as _0x18b926,createElement as _0x1cb64c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ImageUploadEditing as _0x2b9972,ImageUploadProgress as _0x2039ee,PictureEditing as _0x2f8c59,ImageUtils as _0x57e4e6,ImageEditing as _0x14f923}from'@ckeditor/ckeditor5-image/dist/index.js';import{FileRepository as _0x5ad755}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x15129c,info as _0x3d3837}from'@uploadcare/upload-client';import*as _0x57e39d from'@uploadcare/file-uploader';var D=function(_0x7536d3){return _0x7536d3['Local']='local',_0x7536d3['URL']='url',_0x7536d3['Dropbox']='dropbox',_0x7536d3['GDrive']='gdrive',_0x7536d3['Facebook']='facebook',_0x7536d3['GPhotos']='gphotos',_0x7536d3['OneDrive']='onedrive',_0x7536d3;}({});function F(_0x1c5085,_0x21d1d8,_0x32e6bc){const t=_0x1c5085['t'],_0x3ac2bd=_0x1c5085['t'];switch(_0x21d1d8){case D['Local']:return{'text':_0x3ac2bd('Insert'===_0x32e6bc?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x3ac2bd('From\x20computer')};case D['URL']:return{'text':'Insert'===_0x32e6bc?_0x3ac2bd('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x3ac2bd('Via\x20URL')};case D['Dropbox']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case D['Facebook']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case D['GDrive']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case D['GPhotos']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case D['OneDrive']:return{'text':t('Insert'===_0x32e6bc?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x21d1d8;}}class $ extends _0x2b498e{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'UploadcareUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x19a44a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x37fd50;for(const _0x2148f9 in _0x19a44a){const _0x368ef5=_0x2148f9,_0x10bfb4=_0x19a44a[_0x368ef5];if('uploadcareLicenseKeyValid'==_0x10bfb4||'uploadcareLicenseKeyInvalid'==_0x10bfb4||'uploadcareLicenseKeyExpired'==_0x10bfb4||'uploadcareLicenseKeyDomainLimit'==_0x10bfb4||'uploadcareLicenseKeyNotAllowed'==_0x10bfb4||'uploadcareLicenseKeyEvaluationLimit'==_0x10bfb4||'uploadcareLicenseKeyUsageLimit'==_0x10bfb4){delete _0x19a44a[_0x368ef5],_0x37fd50=_0x10bfb4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x37fd50&&_0x19a44a['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x37fd50&&_0x19a44a['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x37fd50&&_0x19a44a['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x37fd50&&_0x19a44a['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x37fd50&&_0x19a44a['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x37fd50&&_0x19a44a['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x487ee0}=this,_0xf64faf=_0x487ee0['commands']['get']('uploadcare');if(!_0xf64faf)return;const _0x4e800d=this['_normalizeConfigSourceList'](_0x487ee0['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4626c1,_0x21e5ad)=>{const _0x53a3c0=this['_getIntegrationKey'](_0x21e5ad['type']);return _0x4626c1[_0x53a3c0]||(_0x4626c1[_0x53a3c0]=[]),_0x4626c1[_0x53a3c0]['push'](_0x21e5ad),_0x4626c1;},{});_0x487ee0['plugins']['has']('ImageInsertUI')&&_0x487ee0['commands']['get']('uploadcare')&&Object['entries'](_0x4e800d)['forEach'](([_0xeb4bd1,_0x49f737])=>{_0x487ee0['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0xeb4bd1,'observable':()=>_0xf64faf,'buttonViewCreator':()=>this['_createToolbarButton'](_0x49f737),'formViewCreator':()=>this['_createDropdownButtons'](_0x49f737),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x49f737),'override':'assetManager'!==_0xeb4bd1});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x2b1fad){const {locale:_0xaae43e}=this['editor'];return _0x2b1fad['map'](_0x4f348b=>{const _0x4b74e0=F(_0xaae43e,_0x4f348b,'Insert');switch(_0x4f348b){case D['Local']:return{'icon':_0x17ef19,'type':D['Local'],..._0x4b74e0};case D['URL']:return{'icon':_0x226f38,'type':D['URL'],..._0x4b74e0};case D['Dropbox']:return{'icon':_0x580824,'type':D['Dropbox'],..._0x4b74e0};case D['Facebook']:return{'icon':_0x3e8b19,'type':D['Facebook'],..._0x4b74e0};case D['GDrive']:return{'icon':_0x1b3073,'type':D['GDrive'],..._0x4b74e0};case D['GPhotos']:return{'icon':_0x2f0d24,'type':D['GPhotos'],..._0x4b74e0};case D['OneDrive']:return{'icon':_0x2bee1e,'type':D['OneDrive'],..._0x4b74e0};}});}['_getIntegrationKey'](_0x499b6b){switch(_0x499b6b){case D['Local']:return'upload';case D['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x1d90fd,_0x1f88fc){const _0xa75308=this['editor'],_0x330365=new _0x1d90fd(_0xa75308['locale']),_0x333a58=_0xa75308['commands']['get']('uploadcare');return _0x330365['bind']('isEnabled')['to'](_0x333a58),_0x330365['on']('execute',()=>{_0x333a58['execute'](_0x1f88fc);}),_0x330365;}['_createToolbarButton'](_0x2e565f){const {locale:_0x2bc123}=this['editor'],_0x1974ba=this['editor']['plugins']['get']('ImageInsertUI'),_0x149eeb=_0x2e565f[0x0],_0x4f03fd=this['_createButton'](_0x818bcb,_0x149eeb['type']);return _0x4f03fd['icon']=_0x149eeb['icon'],_0x4f03fd['bind']('label')['to'](_0x1974ba,'isImageSelected',_0x24b2d8=>F(_0x2bc123,_0x149eeb['type'],_0x24b2d8?'Replace':'Insert')['text']),_0x4f03fd['tooltip']=!0x0,_0x4f03fd;}['_createDropdownButtons'](_0x5a1325){const {locale:_0x55eab6}=this['editor'],_0x5e0dfa=this['editor']['plugins']['get']('ImageInsertUI');return _0x5a1325['map'](_0x56169d=>{const _0x269c32=this['_createButton'](_0x818bcb,_0x56169d['type']);return _0x269c32['withText']=!0x0,_0x269c32['icon']=_0x56169d['icon'],_0x269c32['bind']('label')['to'](_0x5e0dfa,'isImageSelected',_0xeb8cf9=>F(_0x55eab6,_0x56169d['type'],_0xeb8cf9?'Replace':'Insert')['text']),_0x269c32;});}['_createMenuBarButtons'](_0x461347){return _0x461347['map'](_0xb0e7af=>{const _0x5e0b82=this['_createButton'](_0xc4abfa,_0xb0e7af['type']);return _0x5e0b82['icon']=_0xb0e7af['icon'],_0x5e0b82['label']=_0xb0e7af['shortText'],_0x5e0b82;});}}class B extends _0x59df62{['focusTracker'];['focusCycler'];constructor(_0x4c0e28){super(_0x4c0e28),this['focusTracker']=new _0x11cb3b(),this['focusCycler']=new _0x165883({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class V extends B{constructor(_0x5e58cd,_0x1d33d4){super(_0x5e58cd),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader-'+_0x1d33d4}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function j(_0x14b354,_0x2598d1){const _0x7248aa=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x464ada=>_0x464ada<=_0x2598d1)['map'](_0xaf6e4e=>_0x14b354['replace'](/\/$/,'')+'/-/resize/'+_0xaf6e4e+'x/\x20'+_0xaf6e4e+'w');return{'imageFallbackUrl':_0x14b354,'imageSources':[{'srcset':_0x7248aa['join'](',\x20'),'sizes':'(max-width:\x20'+_0x2598d1+'px)\x20100vw,\x20'+_0x2598d1+'px','type':'image/webp'}]};}function M(_0x49736a,_0x115693,_0x885f32){const _0x1f7f43=_0x49736a['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1f7f43?parseInt(_0x1f7f43[0x1],0xa):_0x115693,'height':_0x1f7f43?parseInt(_0x1f7f43[0x2],0xa):_0x885f32};}function q(_0x26a0b4,_0x3665d1){const _0x395421=new(_0x1e0b76())(),_0x51215e=_0x26a0b4['plugins']['get']('ImageUtils'),_0x109115=_0x26a0b4['editing']['mapper']['toViewElement'](_0x3665d1),_0x34831f=_0x51215e['findViewImgElement'](_0x109115),_0x3ef1d2=_0x26a0b4['editing']['view']['domConverter']['viewToDom'](_0x34831f),_0x3d0899=_0x3665d1['getAttribute']('width'),_0x3afddc=_0x3665d1['getAttribute']('height'),_0x175b13='image-processing';_0x26a0b4['editing']['view']['change'](_0x444f29=>{_0x444f29['addClass'](_0x175b13,_0x109115),_0x444f29['setStyle']('aspect-ratio',_0x3d0899+'/'+_0x3afddc,_0x34831f);}),_0x395421['listenTo'](_0x3ef1d2,'load',()=>{_0x395421['stopListening'](_0x3ef1d2,'load'),_0x26a0b4['editing']['view']['change'](_0x5e0f67=>{_0x5e0f67['removeClass'](_0x175b13,_0x109115),_0x5e0f67['removeStyle']('aspect-ratio',_0x34831f);});});}function W(_0x36383f){if(Array['isArray'](_0x36383f)){const _0x2bca73=_0x36383f['map'](W);return _0x29cd2f=>_0x2bca73['some'](_0x235eaa=>_0x235eaa(_0x29cd2f));}if('origin'==_0x36383f){const _0x421561=_0xe88406['window']['location']['origin'];return _0x74a42=>new URL(_0x74a42,_0xe88406['document']['baseURI'])['origin']==_0x421561;}return'function'==typeof _0x36383f?_0x36383f:_0x36383f instanceof RegExp?_0x58f44e=>!(!_0x58f44e['match'](_0x36383f)&&!_0x58f44e['replace'](/^https?:\/\//,'')['match'](_0x36383f)):()=>!0x1;}function G(_0x3e8ff3,_0x5b8639){return _0x3e0c43(_0x3e8ff3['target'])['includes'](_0x5b8639);}class z extends/* #__PURE__ -- @preserve */
24
+ _0x4c7b3d(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0xc06d4e,_0xcbfe19,_0x5a6f2b){super(),this['_editor']=_0xc06d4e,this['_editing']=_0xcbfe19,this['_dialog']=_0xc06d4e['plugins']['get'](_0xd4409f),this['_api']=_0xcbfe19['ctxElement']['getAPI'](),this['_type']=_0x5a6f2b,this['_editing']['configElement']['setAttribute']('source-list',this['_type']),this['_initDialog'](),this['_initListeners'](),this['_api']['initFlow']();}['destroy'](){this['_formView']&&(this['_formView']['destroy'](),this['_formView']=null),this['_api']&&this['_api']['doneFlow'](),this['stopListening'](),this['stopDelegating']();}['_initDialog'](){const {locale:_0x46faf0,model:_0x453bab}=this['_editor'],_0x338685=_0x453bab['document']['selection']['getSelectedElement'](),_0x56f05d=_0x338685&&(_0x338685['is']('element','imageBlock')||_0x338685['is']('element','imageInline'));this['_formView']=new V(_0x46faf0,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x17ef19,'title':F(_0x46faf0,this['_type'],_0x56f05d?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x474297['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1b5431=>!G(_0x1b5431,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x2f2a17}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4f1dd4=>{const _0x1562eb=_0x2f2a17['length'];for(const _0x293c7e of _0x2f2a17){const _0x524a68=_0x293c7e===_0x2f2a17[_0x1562eb-0x1],{cdnUrl:_0x349e44,fileInfo:_0x20694c}=_0x293c7e;if(!_0x349e44||!_0x20694c)continue;const {width:_0x56adc8,height:_0x3c73c4}=_0x20694c['imageInfo'],_0x5c4726=M(_0x349e44,_0x56adc8,_0x3c73c4),_0x3b01d9=j(_0x349e44,_0x5c4726['width']),_0x51252e={'id':_0x20694c['uuid'],'type':'image','attributes':{'imageDimension':_0x5c4726,..._0x3b01d9}};this['_insertAsset'](_0x51252e,_0x524a68,_0x4f1dd4);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x440e8f=>{'idle'===_0x440e8f['detail']['status']&&!_0x440e8f['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===D['Local']?this['_api']['setCurrentActivity'](D['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x3362f6,_0x3225b5,_0x36b753){const _0x1032fd=this['_editor']['model']['document']['selection'],_0x2e0148=_0x1032fd['getSelectedElement'](),_0x96d2b0=!(!_0x2e0148||!_0x2e0148['is']('element','imageInline'));_0x36b753['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x3362f6,_0x96d2b0),_0x3225b5||_0x36b753['setSelection'](_0x1032fd['getLastPosition']());}['_insertImage'](_0x209a69,_0x14a413){const _0x50825f=this['_editor'],{imageDimension:_0x16fc94,imageFallbackUrl:_0x295c5b,imageSources:_0x12604a}=_0x209a69['attributes'];_0x50825f['execute']('insertImage',{'imageType':_0x14a413?'imageInline':null,'source':{'uploadcareImageId':_0x209a69['id'],'src':_0x295c5b,'sources':_0x12604a,..._0x16fc94}});}}class H extends _0x27989f{['_editing'];['_controller']=null;static get['requires'](){return[_0xd4409f,X];}constructor(_0x51527f){super(_0x51527f),this['_editing']=_0x51527f['plugins']['get'](X);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x4173a2){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new z(this['editor'],this['_editing'],_0x4173a2);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class J{static['upload']({file:_0x5ba504,..._0x3acb48}){return _0x15129c(_0x5ba504,_0x3acb48);}static['getInfo'](_0x26ed1c,_0x27868c){return _0x3d3837(_0x26ed1c,_0x27868c);}}class Z extends _0x2b498e{static get['requires'](){return[_0x2b9972,_0x2039ee,_0x5ad755,X];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x11b453=this['editor'];if(!!!_0x11b453['config']['get']('uploadcare'))return;_0x11b453['plugins']['get'](_0x5ad755)['createUploadAdapter']=_0x5680cc=>new Q(_0x5680cc,_0x11b453),_0x11b453['plugins']['get'](_0x2b9972)['on']('uploadComplete',(_0x477be3,{imageElement:_0x3105d8,data:_0x2d5bfc})=>{_0x11b453['model']['change'](_0x1e2ed2=>{_0x1e2ed2['setAttribute']('uploadcareImageId',_0x2d5bfc['uploadcareImageId'],_0x3105d8);});});}}class Q{['loader'];['editor'];['controller'];constructor(_0x293450,_0x117cbf){this['loader']=_0x293450,this['editor']=_0x117cbf,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x6e74aa=await this['loader']['file'];return J['upload']({'file':_0x6e74aa,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x10750a=>{_0x10750a&&_0x10750a['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x10750a['value']);}})['then'](async _0x1f8585=>{const {imageFallbackUrl:_0x43587f,imageSources:_0x13b212}=j(_0x1f8585['cdnUrl'],_0x1f8585['imageInfo']['width']);return{'uploadcareImageId':_0x1f8585['uuid'],'default':_0x43587f,'sources':_0x13b212};})['catch'](()=>{const _0x2bf466=t('Cannot\x20upload\x20file:')+('\x20'+_0x6e74aa['name']+'.');return Promise['reject'](_0x2bf466);});}['abort'](){this['controller']['abort']();}}class X extends _0x2b498e{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return[_0x2f8c59,Z,_0xd4409f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x571eb1){super(_0x571eb1),this['ucContextId']=_0x18b926();}['init'](){const _0x319073=this['editor'];_0x319073['commands']['add']('uploadcare',new H(_0x319073));}['afterInit'](){this['_initSchema'](),this['_initConversion'](),this['_initConfig'](),this['_initCtx'](),this['_initImageProcessingIndicator'](),this['listenTo'](this['editor'],'destroy',()=>{this['_configElement']&&(this['_configElement']['remove'](),this['_configElement']=null),this['_ctxElement']&&(this['_ctxElement']['remove'](),this['_ctxElement']=null);const _0x52174f=_0xe88406['document']['querySelector']('input[uploadcare-file-input]');_0x52174f&&_0x52174f['remove']();}),async function(_0x5f086e){const _0xece1af=_0x154713([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x5524c4=0x535f8c3a,_0x1efa8c=0x535808c2^_0x5524c4,_0x3e6f50=window[_0x154713([0x44,0x61,0x74,0x65])][_0x154713([0x6e,0x6f,0x77])](),_0x47b9ad=_0x5f086e[_0x154713([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2f9516=new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22355e=>{_0x47b9ad[_0x154713([0x6f,0x6e,0x63,0x65])](_0x154713([0x72,0x65,0x61,0x64,0x79]),_0x22355e);}),_0x2a60e8={[_0x154713([0x6b,0x74,0x79])]:_0x154713([0x45,0x43]),[_0x154713([0x75,0x73,0x65])]:_0x154713([0x73,0x69,0x67]),[_0x154713([0x63,0x72,0x76])]:_0x154713([0x50,0x2d,0x32,0x35,0x36]),[_0x154713([0x78])]:_0x154713([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x154713([0x79])]:_0x154713([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x154713([0x61,0x6c,0x67])]:_0x154713([0x45,0x53,0x32,0x35,0x36])},_0x4714e0=_0x47b9ad[_0x154713([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x154713([0x67,0x65,0x74])](_0x154713([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x243d6b(){let _0x144676,_0x5a66a8=null,_0x5d1276=null;try{if(_0x4714e0==_0x154713([0x47,0x50,0x4c]))return _0x154713([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x144676=_0x24ac37(),!_0x144676)return _0x154713([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x144676[_0x154713([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5d1276=_0xf26d28(_0x144676[_0x154713([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x144676[_0x154713([0x6a,0x74,0x69])])),await _0x572daa()?_0x2ba277()?_0x2647bf()?_0x154713([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3effb9()?(_0x144676[_0x154713([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x154713([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5a66a8=_0x3d433d(_0x154713([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5c8aec()):_0x154713([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x154713([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x154713([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x154713([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2647bf(){const _0x7e75c3=[_0x154713([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x154713([0x74,0x72,0x69,0x61,0x6c])][_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x144676[_0x154713([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3e6f50/0x3e8:0xe10*_0x1efa8c;return _0x144676[_0x154713([0x65,0x78,0x70])]<_0x7e75c3;}function _0x2ba277(){const _0x4d5217=_0x144676[_0x154713([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4d5217&&(!!_0x4d5217[_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x154713([0x2a]))||!!_0x4d5217[_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x154713([0x55,0x50,0x4c,0x43])));}function _0x3effb9(){const _0x1a0630=_0x144676[_0x154713([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1a0630||0x0==_0x1a0630[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1a885}=new URL(window[_0x154713([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1a0630[_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a885))return!0x0;const _0x239bb9=_0x1a885[_0x154713([0x73,0x70,0x6c,0x69,0x74])](_0x154713([0x2e]));return _0x1a0630[_0x154713([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1f5139=>_0x1f5139[_0x154713([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x154713([0x2a])))[_0x154713([0x6d,0x61,0x70])](_0x382ad6=>_0x382ad6[_0x154713([0x73,0x70,0x6c,0x69,0x74])](_0x154713([0x2e])))[_0x154713([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x403432=>_0x403432[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x239bb9[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x154713([0x6d,0x61,0x70])](_0x8f5716=>Array(_0x239bb9[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x8f5716[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x154713([0x66,0x69,0x6c,0x6c])](_0x8f5716[0x0]===_0x154713([0x2a])?_0x154713([0x2a]):'')[_0x154713([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x8f5716))[_0x154713([0x73,0x6f,0x6d,0x65])](_0x3157b0=>_0x239bb9[_0x154713([0x65,0x76,0x65,0x72,0x79])]((_0x2462cf,_0x4fc66a)=>_0x3157b0[_0x4fc66a]===_0x2462cf||_0x3157b0[_0x4fc66a]===_0x154713([0x2a])));}function _0x5c8aec(){return _0x5a66a8&&_0x5d1276?new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x10dc9e,_0x3ba403)=>{_0x5a66a8[_0x154713([0x74,0x68,0x65,0x6e])](_0x10dc9e,_0x3ba403),_0x5d1276[_0x154713([0x74,0x68,0x65,0x6e])](_0x161d9b=>{_0x161d9b!=_0x154713([0x56,0x61,0x6c,0x69,0x64])&&_0x10dc9e(_0x161d9b);},_0x3ba403);}):_0x5a66a8||_0x5d1276||_0x154713([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf26d28(_0x3d4dde,_0x227a40){return new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x481ba5=>{if(_0x213edf())return _0x481ba5(_0x154713([0x56,0x61,0x6c,0x69,0x64]));_0x33b152(),_0x47b9ad[_0x154713([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x154713([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3d719a=!0x1;const _0x547c88=_0x18b926();function _0x4246c3(_0x3ccb66){return!!_0x3ccb66&&(typeof _0x3ccb66===_0x154713([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3ccb66===_0x154713([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3ccb66[_0x154713([0x74,0x68,0x65,0x6e])]===_0x154713([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3ccb66[_0x154713([0x63,0x61,0x74,0x63,0x68])]===_0x154713([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x509e84(_0x67eda9){_0x160acf(_0x67eda9)[_0x154713([0x74,0x68,0x65,0x6e])](_0x553527=>{if(!_0x553527||_0x553527[_0x154713([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x154713([0x6f,0x6b]))return _0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x453d5a(_0x1cf1e7(_0x547c88+_0x227a40))!=_0x553527[_0x154713([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x154713([0x56,0x61,0x6c,0x69,0x64]);})[_0x154713([0x74,0x68,0x65,0x6e])](_0x1190f2=>(_0x46c261(),_0x1190f2),()=>{const _0x5be969=_0x246257();return null==_0x5be969?(_0x46c261(),_0x154713([0x56,0x61,0x6c,0x69,0x64])):_0x154713(_0x3e6f50-_0x5be969>(0x7753083a^_0x5524c4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x154713([0x74,0x68,0x65,0x6e])](_0x481ba5)[_0x154713([0x63,0x61,0x74,0x63,0x68])](()=>{_0x481ba5(_0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1bac33=0x536962ba^_0x5524c4;function _0x46c261(){const _0x5de973=_0x154713([0x6c,0x6c,0x63,0x74,0x2d])+_0x453d5a(_0x1cf1e7(_0x3d4dde)),_0x265b73=_0x322997(_0x453d5a(window[_0x154713([0x4d,0x61,0x74,0x68])][_0x154713([0x63,0x65,0x69,0x6c])](_0x3e6f50/_0x1bac33)));window[_0x154713([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x154713([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5de973,_0x265b73);}function _0x246257(){const _0x10b0a6=_0x154713([0x6c,0x6c,0x63,0x74,0x2d])+_0x453d5a(_0x1cf1e7(_0x3d4dde)),_0x58fae4=window[_0x154713([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x154713([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10b0a6);return _0x58fae4?window[_0x154713([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x322997(_0x58fae4),0x10)*_0x1bac33:null;}function _0x160acf(_0x1f7a82){return new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x514350,_0x4db5d8)=>{_0x1f7a82[_0x154713([0x74,0x68,0x65,0x6e])](_0x514350,_0x4db5d8),window[_0x154713([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4db5d8,0x535e58fa^_0x5524c4);});}}_0x47b9ad[_0x154713([0x6f,0x6e])](_0x154713([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2805e5,_0x3d07b4)=>{if(_0x3d07b4[0x0]!=_0x3d4dde)return _0x481ba5(_0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3d07b4[0x1]={..._0x3d07b4[0x1],[_0x154713([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x547c88};},{[_0x154713([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x154713([0x68,0x69,0x67,0x68])}),_0x47b9ad[_0x154713([0x6f,0x6e])](_0x154713([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x20573c=>{_0x4246c3(_0x20573c[_0x154713([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3d719a=!0x0,_0x509e84(_0x20573c[_0x154713([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x154713([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x154713([0x6c,0x6f,0x77])}),_0x2f9516[_0x154713([0x74,0x68,0x65,0x6e])](()=>{_0x3d719a||_0x481ba5(_0x154713([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x213edf(){return _0x47b9ad[_0x154713([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x154713([0x76,0x69,0x65,0x77])][_0x154713([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x154713([0x61,0x75,0x74,0x6f]);}function _0x33b152(){_0x47b9ad[_0x154713([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x154713([0x76,0x69,0x65,0x77])][_0x154713([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x154713([0x61,0x75,0x74,0x6f]);}}function _0x3d433d(_0x4a63de){const _0x86e913=[new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e2efd=>setTimeout(_0x1e2efd,0x5356b2f6^_0x5524c4)),_0x2f9516[_0x154713([0x74,0x68,0x65,0x6e])](()=>new window[(_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3bd877=>{let _0x1462b5=0x0;_0x47b9ad[_0x154713([0x6d,0x6f,0x64,0x65,0x6c])][_0x154713([0x6f,0x6e])](_0x154713([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5cc00b,_0x331b95)=>{_0x331b95[0x0][_0x154713([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1462b5++,_0x1462b5==(0x535f89d2^_0x5524c4)&&(_0x3bd877(),_0x5cc00b[_0x154713([0x6f,0x66,0x66])]());});}))];return window[_0x154713([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x154713([0x72,0x61,0x63,0x65])](_0x86e913)[_0x154713([0x74,0x68,0x65,0x6e])](()=>_0x4a63de);}async function _0x5465f6(){await _0x2f9516,_0x47b9ad[_0x154713([0x6d,0x6f,0x64,0x65,0x6c])][_0x154713([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x58c722,_0x47b9ad[_0x154713([0x6d,0x6f,0x64,0x65,0x6c])][_0x154713([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x58c722,_0x47b9ad[_0x154713([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x154713([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x18cfa2(_0x33fc8c){const _0x1fae09=_0x3f29ab();_0x47b9ad[_0x1fae09]=_0x154713([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x33fc8c,_0x33fc8c!=_0x154713([0x56,0x61,0x6c,0x69,0x64])&&_0x5465f6();}function _0x3f29ab(){const _0x10eb17=window[_0x154713([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x154713([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x154713([0x6e,0x6f,0x77])]())[_0x154713([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x154713([0x2e]),'');let _0x14bddf=_0x154713([0x68]);for(let _0x709224=0x0;_0x709224<_0x10eb17[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x709224+=0x2){let _0x4cc795=window[_0x154713([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10eb17[_0x154713([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x709224,_0x709224+0x2));_0x4cc795>=_0xece1af[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4cc795-=_0xece1af[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x14bddf+=_0xece1af[_0x4cc795];}return _0x14bddf;}function _0x24ac37(){const _0x4c3ffa=_0x4714e0[_0x154713([0x73,0x70,0x6c,0x69,0x74])](_0x154713([0x2e]));if(0x3!=_0x4c3ffa[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3e4ed1(_0x4c3ffa[0x1]);function _0x3e4ed1(_0x1aba58){const _0x2d12fa=_0x3756a2(_0x1aba58);return _0x2d12fa&&_0x22ad1c()?_0x2d12fa:null;function _0x22ad1c(){const _0x215727=_0x2d12fa[_0x154713([0x6a,0x74,0x69])],_0x3b9ee8=window[_0x154713([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x215727[_0x154713([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x215727[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2ec881={..._0x2d12fa,[_0x154713([0x6a,0x74,0x69])]:_0x215727[_0x154713([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x215727[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2ec881[_0x154713([0x76,0x63])],_0x1cf1e7(_0x2ec881)==_0x3b9ee8;}}}async function _0x572daa(){let _0x7af4ef=!0x0;try{const _0x25e70f=_0x4714e0[_0x154713([0x73,0x70,0x6c,0x69,0x74])](_0x154713([0x2e])),[_0x28e60d,_0x19da07,_0x6cd878]=_0x25e70f;return _0x8e8c7c(_0x28e60d),await _0x4b8534(_0x28e60d,_0x19da07,_0x6cd878),_0x7af4ef;}catch{return!0x1;}function _0x8e8c7c(_0x1cb311){const _0x55f09a=_0x3756a2(_0x1cb311);_0x55f09a&&_0x55f09a[_0x154713([0x61,0x6c,0x67])]==_0x154713([0x45,0x53,0x32,0x35,0x36])||(_0x7af4ef=!0x1);}async function _0x4b8534(_0x1ff1c1,_0x528207,_0x436ffb){const _0x2f3350=window[_0x154713([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x154713([0x66,0x72,0x6f,0x6d])](_0x539054(_0x436ffb),_0x34b28c=>_0x34b28c[_0x154713([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x44b44e=new window[(_0x154713([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x154713([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1ff1c1+_0x154713([0x2e])+_0x528207),_0x5498fc=window[_0x154713([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x154713([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5498fc)return;const _0x1f9fb2=await _0x5498fc[_0x154713([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x154713([0x6a,0x77,0x6b]),_0x2a60e8,{[_0x154713([0x6e,0x61,0x6d,0x65])]:_0x154713([0x45,0x43,0x44,0x53,0x41]),[_0x154713([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x154713([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x154713([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5498fc[_0x154713([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x154713([0x6e,0x61,0x6d,0x65])]:_0x154713([0x45,0x43,0x44,0x53,0x41]),[_0x154713([0x68,0x61,0x73,0x68])]:{[_0x154713([0x6e,0x61,0x6d,0x65])]:_0x154713([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1f9fb2,_0x2f3350,_0x44b44e)||(_0x7af4ef=!0x1);}}function _0x3756a2(_0x570c12){return _0x570c12[_0x154713([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x154713([0x65,0x79]))?JSON[_0x154713([0x70,0x61,0x72,0x73,0x65])](_0x539054(_0x570c12)):null;}function _0x539054(_0x451340){return window[_0x154713([0x61,0x74,0x6f,0x62])](_0x451340[_0x154713([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x154713([0x2b]))[_0x154713([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x154713([0x2f])));}function _0x1cf1e7(_0xf4de4){let _0x678d61=0x1505;function _0x6a1c3c(_0x204db5){for(let _0x37e60b=0x0;_0x37e60b<_0x204db5[_0x154713([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x37e60b++){const _0x3f86ad=_0x204db5[_0x154713([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x37e60b);_0x678d61=(_0x678d61<<0x5)+_0x678d61+_0x3f86ad,_0x678d61&=_0x678d61;}}function _0x231eb4(_0x2daa83){Array[_0x154713([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2daa83)?_0x2daa83[_0x154713([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x231eb4):_0x2daa83&&typeof _0x2daa83==_0x154713([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x154713([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2daa83)[_0x154713([0x73,0x6f,0x72,0x74])]()[_0x154713([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x21dfe4,_0x4519d7])=>{_0x6a1c3c(_0x21dfe4),_0x231eb4(_0x4519d7);}):_0x6a1c3c(window[_0x154713([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2daa83));}return _0x231eb4(_0xf4de4),_0x678d61>>>0x0;}function _0x453d5a(_0x56fc8f){return _0x56fc8f[_0x154713([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x154713([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x154713([0x30]));}function _0x322997(_0x262fc2){return _0x262fc2[_0x154713([0x73,0x70,0x6c,0x69,0x74])]('')[_0x154713([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x154713([0x6a,0x6f,0x69,0x6e])]('');}function _0x58c722(){}function _0x154713(_0x4ecadb){return _0x4ecadb['map'](_0x356227=>String['fromCharCode'](_0x356227))['join']('');}_0x18cfa2(await _0x243d6b());}(this);}['_initSchema'](){const _0x447a48=this['editor']['model']['schema'];_0x447a48['isRegistered']('imageBlock')&&_0x447a48['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x447a48['isRegistered']('imageInline')&&_0x447a48['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x3f7cc0=this['editor'];_0x3f7cc0['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x3f7cc0['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x102642=>_0x102642['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5d8b64=_0x3f7cc0['commands']['get']('replaceImageSource');_0x5d8b64&&this['listenTo'](_0x5d8b64,'cleanupImage',(_0x4398bd,[_0x2292a7,_0x3c5833])=>{_0x2292a7['removeAttribute']('uploadcareImageId',_0x3c5833);});}['_initConfig'](){const _0x1c6d8e=this['editor']['config']['get']('uploadcare.uploader')||{},_0x5b7409=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1cb64c(_0xe88406['document'],'uc-config',{..._0x1c6d8e,'pubkey':_0x5b7409,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x5e7d97=>{if('closeMax'==_0x5e7d97)return'#uc-icon-arrow-down';},_0xe88406['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1cb64c(_0xe88406['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0xe88406['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x599549=this['editor']['commands']['get']('insertImage');_0x599549&&this['listenTo'](_0x599549,'execute',()=>{const _0x34ffaf=this['editor']['model']['document']['selection']['getSelectedElement']();_0x34ffaf&&_0x34ffaf['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x34ffaf);});});const _0x93156e=this['editor']['commands']['get']('uploadcareImageReplace');_0x93156e&&this['listenTo'](_0x93156e,'execute',()=>{const _0x47e49b=this['editor']['model']['document']['selection']['getSelectedElement']();_0x47e49b&&_0x47e49b['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{q(this['editor'],_0x47e49b);});});}}class Y extends _0x2b498e{static get['requires'](){return[X,$];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d395f){super(_0x3d395f),_0x3d395f['config']['define']('uploadcare.uploader.sourceList',[D['Local'],D['URL']]),_0x57e39d['defineComponents'](_0x57e39d),this['_defineLocale']();}['_defineLocale'](){const _0x5dc5b1=this['editor']['config']['get']('uploadcare.locale'),_0x4973ac=this['editor']['locale']['contentLanguage'];_0x5dc5b1&&_0x57e39d['defineLocale'](_0x4973ac,_0x5dc5b1);}}class tt extends _0x59df62{constructor(_0x9156cd){super(_0x9156cd);const t=_0x9156cd['t'],_0x9c9c1c=this['bindTemplate'],_0x1a7129=new _0x3c19ec();_0x1a7129['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':[_0x1a7129,{'text':_0x9c9c1c['to']('imageUploadProgress',_0x250871=>t('Loading\x20image...')+'\x20('+(_0x250871||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'}]}]}]});}}class et extends _0x59df62{constructor(_0x4b2865){super(_0x4b2865);const t=_0x4b2865['t'];this['set']('errorType',null);const _0x25e94c=new _0x818bcb(_0x4b2865);_0x25e94c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x25e94c['withText']=!0x0,_0x25e94c['class']='ck-button-action',_0x25e94c['on']('execute',()=>{this['fire']('retry');}),_0x25e94c['bind']('isVisible')['to'](this,'errorType',_0x1b4e21=>'NotFound'!==_0x1b4e21);const _0x5d7800=new _0x5ca6ba();_0x5d7800['content']=_0x27f1a7,_0x5d7800['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x38af17=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':[_0x5d7800,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x38af17['to']('errorType',_0x3b3ec7=>t('NotFound'!==_0x3b3ec7?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x25e94c]},{'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'}]}]}]});}}class it extends _0x59df62{constructor(_0x1b12f6,_0x905913){super(_0x1b12f6);const _0x2341a2=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x905913,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2341a2['to']('imageSrc')}});}}class st extends B{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x1c7f6d,_0x147fe7,_0x420e0c){super(_0x1c7f6d),this['_items']=this['createCollection'](),this['_loadingView']=new tt(_0x1c7f6d),this['_errorView']=new et(_0x1c7f6d),this['_editingView']=new it(_0x1c7f6d,_0x420e0c),this['_focusableView']=new _0x59df62(_0x1c7f6d),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x147fe7),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':this['_items']}),this['_setView'](),this['once']('render',()=>{this['_waitForImageEditorComponent'](this['element'],_0x2209c8=>{this['_addUploadcareImageEditorListeners'](_0x2209c8);});}),this['on']('change:status',()=>{this['_setView']();}),this['_addErrorViewListeners']();}['focus'](){this['element']['focus']();}['_setView'](){switch(this['_items']['clear'](),this['status']){case'uploading':this['_items']['add'](this['_loadingView']);break;case'error':this['_items']['add'](this['_errorView']);break;case'ready':this['_items']['addMany']([this['_editingView'],this['_focusableView']]);}}['_waitForImageEditorComponent'](_0x1ca1f0,_0x182a1a){const _0x382ae3='uc-cloud-image-editor',_0x4088c0=_0x1ca1f0['querySelector'](_0x382ae3);if(_0x4088c0)return _0x182a1a(_0x4088c0);const _0x4c111e=new MutationObserver(_0x367cac=>{const _0x237d78=_0x367cac['filter'](_0x3c245b=>_0x3c245b['target']===_0x1ca1f0&&_0x3c245b['addedNodes']['length']>0x0&&_0x3c245b['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x382ae3);_0x237d78['length']&&(_0x4c111e['disconnect'](),_0x182a1a(_0x237d78[0x0]['addedNodes'][0x0]));});_0x4c111e['observe'](_0x1ca1f0,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x14aeb9){_0x14aeb9['addEventListener']('apply',_0x337347=>{this['fire']('apply',{'imageSrc':_0x337347['detail']['cdnUrl']});}),_0x14aeb9['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class nt extends/* #__PURE__ -- @preserve */
25
+ _0x4c7b3d(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2a4bb4,_0x26f742,_0x3f44e4){super(),this['_editor']=_0x2a4bb4,this['_dialog']=_0x26f742,this['_imageElement']=_0x3f44e4,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 _0x31cacb=this['_imageElement'],_0x33978b=_0x31cacb['getAttribute']('uploadcareImageId'),_0x3efe73=_0x31cacb['getAttribute']('src');if(_0x33978b)await this['_loadImageInfo'](_0x33978b,_0x3efe73);else{if(this['_imageCache']['has'](_0x3efe73)){const _0x951897=this['_imageCache']['get'](_0x3efe73);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x951897['url'],this['imageDimension']=_0x951897['dimension'],this['imageId']=_0x951897['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2aedab}=this['_editor'],t=_0x2aedab['t'],_0x3dd5d6=new st(_0x2aedab,this['imageStatus'],this['_attributes']);_0x3dd5d6['bind']('status')['to'](this,'imageStatus'),_0x3dd5d6['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3dd5d6['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3dd5d6['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3dd5d6,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3c7e92,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3dd5d6,'position':_0x474297['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3dd5d6['focus']();},'onHide':()=>{_0x3dd5d6['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4f3622=>!G(_0x4f3622,_0x3dd5d6['element'])}});}['_loadImageInfo'](_0x24ab77,_0x5e3083){return J['getInfo'](_0x24ab77,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x1871c2=>{const {width:_0x4ed8e2,height:_0x30c331}=_0x1871c2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5e3083,this['imageDimension']={'width':_0x4ed8e2,'height':_0x30c331},this['imageId']=_0x24ab77;})['catch'](_0x36b962=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x36b962['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x18f2bb,_0x13c8cd){return this['_getImageAsFile'](_0x18f2bb)['then'](_0x251986=>J['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':_0x13c8cd['signal'],'file':_0x251986,'onProgress':_0xff75bd=>{_0xff75bd&&_0xff75bd['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0xff75bd['value']));}}))['then'](_0x2e9db9=>{const {width:_0x441eb2,height:_0x12d67b}=_0x2e9db9['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2e9db9['cdnUrl'],this['imageDimension']={'width':_0x441eb2,'height':_0x12d67b},this['imageId']=_0x2e9db9['uuid'],this['imageUploadProgress']=null;const _0x3631dc=_0x18f2bb['getAttribute']('src');this['_imageCache']['set'](_0x3631dc,{'id':_0x2e9db9['uuid'],'url':_0x2e9db9['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x387a7c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x387a7c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x6e6de7,_0x3105c5){_0x6e6de7['on']('apply',(_0x40f321,_0x499d3e)=>{this['_replaceImage'](_0x3105c5,_0x499d3e['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x6e6de7['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x6e6de7['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2ee1ae,_0x46cdcf,_0x5c0fc9){const _0x63e094=this['_editor'],{width:_0x3f8cc2,height:_0x3572b6}=M(_0x46cdcf,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x42052c,imageSources:_0x1db6bd}=j(_0x46cdcf,_0x3f8cc2);_0x63e094['model']['change'](_0x1a6a33=>{if('$graveyard'===_0x2ee1ae['root']['rootName']){_0x63e094['execute']('insertImage',{'imageType':_0x2ee1ae['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2ee1ae['getAttributes']()),'uploadcareImageId':_0x5c0fc9,'src':_0x42052c,'sources':_0x1db6bd,'width':_0x3f8cc2,'height':_0x3572b6}});const _0x21dab5=_0x2ee1ae['getChildren']();_0x2ee1ae=_0x63e094['model']['document']['selection']['getSelectedElement']();for(const _0x25124f of _0x21dab5)_0x1a6a33['append'](_0x1a6a33['cloneElement'](_0x25124f),_0x2ee1ae);}else _0x1a6a33['setSelection'](_0x2ee1ae,'on'),_0x63e094['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2ee1ae['getAttributes']()),'uploadcareImageId':_0x5c0fc9,'src':_0x42052c,'sources':_0x1db6bd,'width':_0x3f8cc2,'height':_0x3572b6},_0x2ee1ae);_0x1a6a33['setSelection'](_0x2ee1ae,'on');});}async['_getImageAsFile'](_0x3d53db){const _0x5d6391=_0xe88406['window'],_0x3db86f=_0xe88406['document']['location']['href'],_0x1fa061=new _0x5d6391['URL'](_0x3d53db['getAttribute']('src'),_0x3db86f);if('data:'===_0x1fa061['protocol']){const _0x5bdd6b=_0x1fa061['href']['split'](','),_0x231359=_0x5bdd6b[0x0]['match'](/:(.*?);/)[0x1],_0x1d0d5f=_0x231359['split']('/')[0x1],_0x4d63a7=_0x5d6391['atob'](_0x5bdd6b[_0x5bdd6b['length']-0x1]);let _0x3e677d=_0x4d63a7['length'];const _0x21d011=new _0x5d6391['Uint8Array'](_0x3e677d);for(;_0x3e677d--;)_0x21d011[_0x3e677d]=_0x4d63a7['charCodeAt'](_0x3e677d);return new _0x5d6391['File']([_0x21d011],'image.'+_0x1d0d5f,{'type':_0x231359});}const _0x528ee7=_0x1fa061['href']['split']('/'),_0x29a03a=_0x528ee7[_0x528ee7['length']-0x1],_0x4acc82=_0x29a03a['split']('.')[0x1];return _0x5d6391['fetch'](_0x1fa061['href'])['then'](_0x53f12d=>_0x53f12d['clone']()['blob']())['then'](_0x5cef3b=>new _0x5d6391['File']([_0x5cef3b],_0x29a03a,{'type':'image/'+_0x4acc82}));}}class rt extends _0x27989f{['imageEditController'];static get['requires'](){return[_0xd4409f];}['_isEditable'];constructor(_0x56b694){super(_0x56b694),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4a9e2b){const _0x44c1cc=W(_0x4a9e2b);return _0x1e2c25=>!(!_0x1e2c25||!_0x1e2c25['is']('element','imageBlock')&&!_0x1e2c25['is']('element','imageInline'))&&(!!_0x1e2c25['hasAttribute']('uploadcareImageId')||!!_0x1e2c25['hasAttribute']('src')&&_0x44c1cc(_0x1e2c25['getAttribute']('src')));}(_0x56b694['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x32ede1=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x32ede1);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x22b6bc=this['editor']['model']['document']['selection']['getSelectedElement']();_0x22b6bc&&(_0x22b6bc['is']('element','imageBlock')||_0x22b6bc['is']('element','imageInline'))&&(this['imageEditController']=new nt(this['editor'],this['editor']['plugins']['get'](_0xd4409f),_0x22b6bc),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class at extends _0x27989f{['refresh'](){const _0x1ce28c=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1ce28c&&(_0x1ce28c['is']('element','imageBlock')||_0x1ce28c['is']('element','imageInline')));}['execute'](_0xf5e6ff){const _0x1762a9=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0xc4e8e8=>{_0xc4e8e8['setAttributes'](_0xf5e6ff,_0x1762a9),_0xc4e8e8['removeAttribute']('srcset',_0x1762a9),_0xc4e8e8['removeAttribute']('sizes',_0x1762a9);});}}class ot extends _0x2b498e{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[X,_0x22f7fb,_0x57e4e6,_0x14f923];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2d6935}=this;_0x2d6935['commands']['add']('uploadcareImageEdit',new rt(_0x2d6935)),_0x2d6935['commands']['add']('uploadcareImageReplace',new at(_0x2d6935));}}class ct extends _0x2b498e{['_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 _0x545b79=this['editor'];_0x545b79['ui']['componentFactory']['add']('uploadcareImageEdit',_0x25d539=>{const _0x15753f=_0x545b79['commands']['get']('uploadcareImageEdit'),_0x16e7f1=new _0x818bcb(_0x25d539),t=_0x25d539['t'];return _0x16e7f1['set']({'icon':_0x3c7e92,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x16e7f1['bind']('isEnabled')['to'](_0x15753f),_0x16e7f1['bind']('isOn')['to'](_0x15753f,'isActive'),this['listenTo'](_0x16e7f1,'execute',()=>{_0x545b79['execute']('uploadcareImageEdit'),_0x545b79['editing']['view']['focus']();}),_0x16e7f1;}),this['_initConfig']();}['_initConfig'](){const _0x1f9d1c=_0x1cb64c(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1f9d1c),this['listenTo'](this['editor'],'destroy',()=>{_0x1f9d1c['remove']();});}}class lt extends _0x2b498e{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[ot,ct];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{Y as Uploadcare,H as UploadcareCommand,X as UploadcareEditing,lt as UploadcareImageEdit,rt as UploadcareImageEditCommand,ot as UploadcareImageEditEditing,ct as UploadcareImageEditUI,$ as UploadcareUI,Z as UploadcareUploadAdapter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "48.0.0-alpha.0",
3
+ "version": "48.0.0-alpha.2",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -37,13 +37,13 @@
37
37
  "dist/translations/*.umd.js"
38
38
  ],
39
39
  "dependencies": {
40
- "@ckeditor/ckeditor5-core": "48.0.0-alpha.0",
41
- "@ckeditor/ckeditor5-engine": "48.0.0-alpha.0",
42
- "@ckeditor/ckeditor5-icons": "48.0.0-alpha.0",
43
- "@ckeditor/ckeditor5-image": "48.0.0-alpha.0",
44
- "@ckeditor/ckeditor5-ui": "48.0.0-alpha.0",
45
- "@ckeditor/ckeditor5-upload": "48.0.0-alpha.0",
46
- "@ckeditor/ckeditor5-utils": "48.0.0-alpha.0",
40
+ "@ckeditor/ckeditor5-core": "48.0.0-alpha.2",
41
+ "@ckeditor/ckeditor5-engine": "48.0.0-alpha.2",
42
+ "@ckeditor/ckeditor5-icons": "48.0.0-alpha.2",
43
+ "@ckeditor/ckeditor5-image": "48.0.0-alpha.2",
44
+ "@ckeditor/ckeditor5-ui": "48.0.0-alpha.2",
45
+ "@ckeditor/ckeditor5-upload": "48.0.0-alpha.2",
46
+ "@ckeditor/ckeditor5-utils": "48.0.0-alpha.2",
47
47
  "@uploadcare/file-uploader": "1.24.5",
48
48
  "@uploadcare/upload-client": "6.14.3"
49
49
  },