@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20250618.0 → 0.0.0-nightly-20250619.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x3b8fd4,Command as _0x408a34}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3f266d,IconGooglePhotos as _0x4e6070,IconGoogleDrive as _0xebf2b2,IconFacebook as _0x3b8ed6,IconDropbox as _0x48374d,IconUploadcareLink as _0x398b2e,IconUploadcareImageUpload as _0x2d5487,IconError as _0x1a6cda,IconUploadcareImageEdit as _0x1b431c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1408d8,MenuBarMenuListItemButtonView as _0x48fa69,View as _0x15ccb4,FocusCycler as _0x2f5877,Dialog as _0x4188d0,DialogViewPosition as _0x2cece5,SpinnerView as _0x234043,IconView as _0xebe885,Notification as _0x398ded}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x35b0e5,DomEmitterMixin as _0x2b9be7,global as _0x39fc81,getAncestors as _0x4b8854,ObservableMixin as _0x2a058a,uid as _0x113c55,createElement as _0x5ea37a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x220fa9}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x6a223f,info as _0x39d56d}from'@uploadcare/upload-client';import*as _0x359d49 from'@uploadcare/file-uploader';var i=function(_0x5b2b43){return _0x5b2b43['Local']='local',_0x5b2b43['URL']='url',_0x5b2b43['Dropbox']='dropbox',_0x5b2b43['GDrive']='gdrive',_0x5b2b43['Facebook']='facebook',_0x5b2b43['GPhotos']='gphotos',_0x5b2b43['OneDrive']='onedrive',_0x5b2b43;}({});function _(_0x1b0530,_0x16ac67,_0x19d02e){const t=_0x1b0530['t'],_0x21b655=_0x1b0530['t'];switch(_0x16ac67){case i['Local']:return{'text':_0x21b655('Insert'===_0x19d02e?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x21b655('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x19d02e?_0x21b655('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x21b655('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x19d02e?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x16ac67;}}class e extends _0x3b8fd4{['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 _0x5d5b42=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x22d4ab;for(const _0x274f5d in _0x5d5b42){const _0x61adfa=_0x274f5d,_0x2f6663=_0x5d5b42[_0x61adfa];if('uploadcareLicenseKeyValid'==_0x2f6663||'uploadcareLicenseKeyInvalid'==_0x2f6663||'uploadcareLicenseKeyExpired'==_0x2f6663||'uploadcareLicenseKeyDomainLimit'==_0x2f6663||'uploadcareLicenseKeyNotAllowed'==_0x2f6663||'uploadcareLicenseKeyEvaluationLimit'==_0x2f6663||'uploadcareLicenseKeyTrialLimit'==_0x2f6663||'uploadcareLicenseKeyUsageLimit'==_0x2f6663){delete _0x5d5b42[_0x61adfa],_0x22d4ab=_0x2f6663,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x22d4ab&&_0x5d5b42['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x206bca}=this,_0x1c0e41=_0x206bca['commands']['get']('uploadcare');if(!_0x1c0e41)return;const _0x360033=this['_normalizeConfigSourceList'](_0x206bca['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x1bbfb0,_0xb77f68)=>{const _0x1a358f=this['_getIntegrationKey'](_0xb77f68['type']);return _0x1bbfb0[_0x1a358f]||(_0x1bbfb0[_0x1a358f]=[]),_0x1bbfb0[_0x1a358f]['push'](_0xb77f68),_0x1bbfb0;},{});_0x206bca['plugins']['has']('ImageInsertUI')&&_0x206bca['commands']['get']('uploadcare')&&Object['entries'](_0x360033)['forEach'](([_0x322688,_0x206f28])=>{_0x206bca['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x322688,'observable':()=>_0x1c0e41,'buttonViewCreator':()=>this['_createToolbarButton'](_0x206f28),'formViewCreator':()=>this['_createDropdownButtons'](_0x206f28),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x206f28),'override':'assetManager'!==_0x322688});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x4a83f1){const {locale:_0x813cfc}=this['editor'];return _0x4a83f1['map'](_0x12aae4=>{const _0x4d818f=_(_0x813cfc,_0x12aae4,'Insert');switch(_0x12aae4){case i['Local']:return{'icon':_0x2d5487,'type':i['Local'],..._0x4d818f};case i['URL']:return{'icon':_0x398b2e,'type':i['URL'],..._0x4d818f};case i['Dropbox']:return{'icon':_0x48374d,'type':i['Dropbox'],..._0x4d818f};case i['Facebook']:return{'icon':_0x3b8ed6,'type':i['Facebook'],..._0x4d818f};case i['GDrive']:return{'icon':_0xebf2b2,'type':i['GDrive'],..._0x4d818f};case i['GPhotos']:return{'icon':_0x4e6070,'type':i['GPhotos'],..._0x4d818f};case i['OneDrive']:return{'icon':_0x3f266d,'type':i['OneDrive'],..._0x4d818f};}});}['_getIntegrationKey'](_0x59d089){switch(_0x59d089){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x4d3d4e,_0x3db7ff){const _0x2c183c=this['editor'],_0x3b01ce=new _0x4d3d4e(_0x2c183c['locale']),_0xe63e93=_0x2c183c['commands']['get']('uploadcare');return _0x3b01ce['bind']('isEnabled')['to'](_0xe63e93),_0x3b01ce['on']('execute',()=>{_0xe63e93['execute'](_0x3db7ff);}),_0x3b01ce;}['_createToolbarButton'](_0x228c3c){const {locale:_0x2b08b8}=this['editor'],_0x58526f=this['editor']['plugins']['get']('ImageInsertUI'),_0x260487=_0x228c3c[0x0],_0x383ef1=this['_createButton'](_0x1408d8,_0x260487['type']);return _0x383ef1['icon']=_0x260487['icon'],_0x383ef1['bind']('label')['to'](_0x58526f,'isImageSelected',_0x347fb1=>_(_0x2b08b8,_0x260487['type'],_0x347fb1?'Replace':'Insert')['text']),_0x383ef1['tooltip']=!0x0,_0x383ef1;}['_createDropdownButtons'](_0x14b0e1){const {locale:_0x3ec8d7}=this['editor'],_0x5999e8=this['editor']['plugins']['get']('ImageInsertUI');return _0x14b0e1['map'](_0x21354f=>{const _0x429b1d=this['_createButton'](_0x1408d8,_0x21354f['type']);return _0x429b1d['withText']=!0x0,_0x429b1d['icon']=_0x21354f['icon'],_0x429b1d['bind']('label')['to'](_0x5999e8,'isImageSelected',_0x2ab48e=>_(_0x3ec8d7,_0x21354f['type'],_0x2ab48e?'Replace':'Insert')['text']),_0x429b1d;});}['_createMenuBarButtons'](_0x3ac418){return _0x3ac418['map'](_0x40e3df=>{const _0x2cdf59=this['_createButton'](_0x48fa69,_0x40e3df['type']);return _0x2cdf59['icon']=_0x40e3df['icon'],_0x2cdf59['label']=_0x40e3df['shortText'],_0x2cdf59;});}}class F extends _0x15ccb4{['focusTracker'];['focusCycler'];constructor(_0x1402d6){super(_0x1402d6),this['focusTracker']=new _0x35b0e5(),this['focusCycler']=new _0x2f5877({'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 x extends F{constructor(_0x35dfce,_0x155510){super(_0x35dfce),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-'+_0x155510}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x209b25,_0x3542ec){const _0x116ec9=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x34bb51=>_0x34bb51<=_0x3542ec)['map'](_0x18349c=>_0x209b25['replace'](/\/$/,'')+'/-/resize/'+_0x18349c+'x/\x20'+_0x18349c+'w');return{'imageFallbackUrl':_0x209b25,'imageSources':[{'srcset':_0x116ec9['join'](',\x20'),'sizes':'(max-width:\x20'+_0x3542ec+'px)\x20100vw,\x20'+_0x3542ec+'px','type':'image/webp'}]};}function C(_0x255f47,_0x12325d,_0x31b57d){const _0x5d4129=_0x255f47['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5d4129?parseInt(_0x5d4129[0x1],0xa):_0x12325d,'height':_0x5d4129?parseInt(_0x5d4129[0x2],0xa):_0x31b57d};}function p(_0x471807,_0xf1a5d7){const _0x40f0e3=new(_0x2b9be7())(),_0x48c6ab=_0x471807['plugins']['get']('ImageUtils'),_0x10fee8=_0x471807['editing']['mapper']['toViewElement'](_0xf1a5d7),_0x4f973c=_0x48c6ab['findViewImgElement'](_0x10fee8),_0x4195da=_0x471807['editing']['view']['domConverter']['viewToDom'](_0x4f973c),_0x2d78ad=_0xf1a5d7['getAttribute']('width'),_0x162af7=_0xf1a5d7['getAttribute']('height'),_0x3753a2='image-processing';_0x471807['editing']['view']['change'](_0x485aef=>{_0x485aef['addClass'](_0x3753a2,_0x10fee8),_0x485aef['setStyle']('aspect-ratio',_0x2d78ad+'/'+_0x162af7,_0x4f973c);}),_0x40f0e3['listenTo'](_0x4195da,'load',()=>{_0x40f0e3['stopListening'](_0x4195da,'load'),_0x471807['editing']['view']['change'](_0x2f7296=>{_0x2f7296['removeClass'](_0x3753a2,_0x10fee8),_0x2f7296['removeStyle']('aspect-ratio',_0x4f973c);});});}function z(_0x329bdf){if(Array['isArray'](_0x329bdf)){const _0x384478=_0x329bdf['map'](z);return _0x271325=>_0x384478['some'](_0x31c02f=>_0x31c02f(_0x271325));}if('origin'==_0x329bdf){const _0x5559c9=_0x39fc81['window']['location']['origin'];return _0x38ec7e=>new URL(_0x38ec7e,_0x39fc81['document']['baseURI'])['origin']==_0x5559c9;}return'function'==typeof _0x329bdf?_0x329bdf:_0x329bdf instanceof RegExp?_0x41b432=>!(!_0x41b432['match'](_0x329bdf)&&!_0x41b432['replace'](/^https?:\/\//,'')['match'](_0x329bdf)):()=>!0x1;}function S(_0x2e5057,_0x3aa072){return _0x4b8854(_0x2e5057['target'])['includes'](_0x3aa072);}class n extends/* #__PURE__ -- @preserve */
24
- _0x2a058a(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x47758d,_0xed786d,_0x57d491){super(),this['_editor']=_0x47758d,this['_editing']=_0xed786d,this['_dialog']=_0x47758d['plugins']['get'](_0x4188d0),this['_api']=_0xed786d['ctxElement']['getAPI'](),this['_type']=_0x57d491,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:_0xf42729,model:_0x130991}=this['_editor'],_0xd56b19=_0x130991['document']['selection']['getSelectedElement'](),_0x47483e=_0xd56b19&&(_0xd56b19['is']('element','imageBlock')||_0xd56b19['is']('element','imageInline'));this['_formView']=new x(_0xf42729,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x2d5487,'title':_(_0xf42729,this['_type'],_0x47483e?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x2cece5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xd91bee=>!S(_0xd91bee,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x2feb11}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2af6d1=>{const _0xa4e960=_0x2feb11['length'];for(const _0x291f42 of _0x2feb11){const _0x15d331=_0x291f42===_0x2feb11[_0xa4e960-0x1],{cdnUrl:_0x2b46e0,fileInfo:_0x90b78f}=_0x291f42;if(!_0x2b46e0||!_0x90b78f)continue;const {width:_0x37a429,height:_0x42b06e}=_0x90b78f['imageInfo'],_0x258ac4=C(_0x2b46e0,_0x37a429,_0x42b06e),_0x288556=k(_0x2b46e0,_0x258ac4['width']),_0xd5ad97={'id':_0x90b78f['uuid'],'type':'image','attributes':{'imageDimension':_0x258ac4,..._0x288556}};this['_insertAsset'](_0xd5ad97,_0x15d331,_0x2af6d1);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x209bf3=>{'idle'===_0x209bf3['detail']['status']&&!_0x209bf3['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x10f076,_0x34ebd0,_0x13e4f3){const _0x216fd3=this['_editor']['model']['document']['selection'],_0x2f0851=_0x216fd3['getSelectedElement'](),_0x1b1717=!(!_0x2f0851||!_0x2f0851['is']('element','imageInline'));_0x13e4f3['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x10f076,_0x1b1717),_0x34ebd0||_0x13e4f3['setSelection'](_0x216fd3['getLastPosition']());}['_insertImage'](_0x1ce86e,_0x4ea8db){const _0x428f90=this['_editor'],{imageDimension:_0x49c187,imageFallbackUrl:_0x4b19b5,imageSources:_0x52dbd3}=_0x1ce86e['attributes'];_0x428f90['execute']('insertImage',{'imageType':_0x4ea8db?'imageInline':null,'source':{'uploadcareImageId':_0x1ce86e['id'],'src':_0x4b19b5,'sources':_0x52dbd3,..._0x49c187}});}}class w extends _0x408a34{['_editing'];['_controller']=null;static get['requires'](){return[_0x4188d0,o];}constructor(_0x54d0e9){super(_0x54d0e9),this['_editing']=_0x54d0e9['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x5961a9){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x5961a9);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x1eec86,publicKey:_0x11630e,signal:_0x2ec33c,onProgress:_0x338ef8}){return _0x6a223f(_0x1eec86,{'publicKey':_0x11630e,'store':'auto','signal':_0x2ec33c,'onProgress':_0x338ef8});}static['getInfo'](_0x2955f5,_0x21c11a){return _0x39d56d(_0x2955f5,_0x21c11a);}}class f extends _0x3b8fd4{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x220fa9,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2eb03b=this['editor'];if(!!!_0x2eb03b['config']['get']('uploadcare'))return;_0x2eb03b['plugins']['get'](_0x220fa9)['createUploadAdapter']=_0x1a92d5=>new A(_0x1a92d5,_0x2eb03b),_0x2eb03b['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x5ba4a3,{imageElement:_0x16c37d,data:_0x2e14d0})=>{_0x2eb03b['model']['change'](_0x3cc8af=>{_0x3cc8af['setAttribute']('uploadcareImageId',_0x2e14d0['uploadcareImageId'],_0x16c37d);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x359c62,_0x46ec67){this['loader']=_0x359c62,this['editor']=_0x46ec67,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4345f9=this['editor']['config']['get']('uploadcare.pubkey'),_0x5623db=await this['loader']['file'];return j['upload']({'file':_0x5623db,'publicKey':_0x4345f9,'signal':this['controller']['signal'],'onProgress':_0x28436b=>{_0x28436b&&_0x28436b['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x28436b['value']);}})['then'](async _0x26ba7a=>{const {imageFallbackUrl:_0x47a568,imageSources:_0x2204e6}=k(_0x26ba7a['cdnUrl'],_0x26ba7a['imageInfo']['width']);return{'uploadcareImageId':_0x26ba7a['uuid'],'default':_0x47a568,'sources':_0x2204e6};})['catch'](()=>{const _0x20697d=t('Cannot\x20upload\x20file:')+('\x20'+_0x5623db['name']+'.');return Promise['reject'](_0x20697d);});}['abort'](){this['controller']['abort']();}}class o extends _0x3b8fd4{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x4188d0];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x366865){super(_0x366865),this['ucContextId']=_0x113c55();}['init'](){const _0x13d8fe=this['editor'];_0x13d8fe['commands']['add']('uploadcare',new w(_0x13d8fe));}['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 _0xf7d7c3=_0x39fc81['document']['querySelector']('input[uploadcare-file-input]');_0xf7d7c3&&_0xf7d7c3['remove']();}),async function(_0x47844c){const _0x28a3ee=_0x5e4764([0x53,0x4a,0x71,0x63,0x57,0x72,0x58,0x6a,0x56,0x79,0x45,0x70,0x4d,0x6f,0x39,0x67,0x61,0x69,0x48,0x64,0x73,0x31,0x33,0x6d,0x32,0x51,0x77,0x75,0x66,0x5a,0x50,0x38,0x55,0x4b,0x65,0x59,0x4e,0x68,0x52,0x62,0x37,0x44,0x54,0x4f,0x6b,0x47,0x6e,0x43,0x30,0x46,0x76,0x6c,0x34,0x49,0x42,0x78,0x41,0x4c,0x36,0x35,0x74,0x7a]),_0x9a6bdd=0x667c0cb1,_0x180d87=0x667b67a9^_0x9a6bdd,_0x1a8e05=window[_0x5e4764([0x44,0x61,0x74,0x65])][_0x5e4764([0x6e,0x6f,0x77])](),_0x4b10e1=_0x47844c[_0x5e4764([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2a86a5=new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56bfc2=>{_0x4b10e1[_0x5e4764([0x6f,0x6e,0x63,0x65])](_0x5e4764([0x72,0x65,0x61,0x64,0x79]),_0x56bfc2);}),_0x2bb309={[_0x5e4764([0x6b,0x74,0x79])]:_0x5e4764([0x45,0x43]),[_0x5e4764([0x75,0x73,0x65])]:_0x5e4764([0x73,0x69,0x67]),[_0x5e4764([0x63,0x72,0x76])]:_0x5e4764([0x50,0x2d,0x32,0x35,0x36]),[_0x5e4764([0x78])]:_0x5e4764([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]),[_0x5e4764([0x79])]:_0x5e4764([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]),[_0x5e4764([0x61,0x6c,0x67])]:_0x5e4764([0x45,0x53,0x32,0x35,0x36])},_0x34aff0=_0x4b10e1[_0x5e4764([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5e4764([0x67,0x65,0x74])](_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x39b555(){let _0x420ea3,_0x44dd00=null,_0x5713ff=null;try{if(_0x34aff0==_0x5e4764([0x47,0x50,0x4c]))return _0x5e4764([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x420ea3=_0x297c6c(),!_0x420ea3)return _0x5e4764([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x420ea3[_0x5e4764([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5713ff=_0x206408(_0x420ea3[_0x5e4764([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x420ea3[_0x5e4764([0x6a,0x74,0x69])])),await _0x66485a()?_0x484e6d()?_0x264391()?_0x5e4764([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x237aab()?(_0x420ea3[_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5e4764([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x44dd00=_0x33983f(_0x5e4764([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x420ea3[_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5e4764([0x74,0x72,0x69,0x61,0x6c])&&(_0x44dd00=_0x33983f(_0x5e4764([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x114eea()):_0x5e4764([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5e4764([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5e4764([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5e4764([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x264391(){const _0x581562=[_0x5e4764([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5e4764([0x74,0x72,0x69,0x61,0x6c])][_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x420ea3[_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1a8e05/0x3e8:0xe10*_0x180d87;return _0x420ea3[_0x5e4764([0x65,0x78,0x70])]<_0x581562;}function _0x484e6d(){const _0x50d4e3=_0x420ea3[_0x5e4764([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x50d4e3&&(!!_0x50d4e3[_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e4764([0x2a]))||!!_0x50d4e3[_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e4764([0x55,0x50,0x4c,0x43])));}function _0x237aab(){const _0x55d92e=_0x420ea3[_0x5e4764([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x55d92e||0x0==_0x55d92e[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x333703}=new URL(window[_0x5e4764([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x55d92e[_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x333703))return!0x0;const _0x143b95=_0x333703[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])](_0x5e4764([0x2e]));return _0x55d92e[_0x5e4764([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x532971=>_0x532971[_0x5e4764([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e4764([0x2a])))[_0x5e4764([0x6d,0x61,0x70])](_0x206e08=>_0x206e08[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])](_0x5e4764([0x2e])))[_0x5e4764([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x536a95=>_0x536a95[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x143b95[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5e4764([0x6d,0x61,0x70])](_0x3b13fa=>Array(_0x143b95[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3b13fa[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5e4764([0x66,0x69,0x6c,0x6c])](_0x3b13fa[0x0]===_0x5e4764([0x2a])?_0x5e4764([0x2a]):'')[_0x5e4764([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3b13fa))[_0x5e4764([0x73,0x6f,0x6d,0x65])](_0x431699=>_0x143b95[_0x5e4764([0x65,0x76,0x65,0x72,0x79])]((_0x2ccd7f,_0x2b49f1)=>_0x431699[_0x2b49f1]===_0x2ccd7f||_0x431699[_0x2b49f1]===_0x5e4764([0x2a])));}function _0x114eea(){return _0x44dd00&&_0x5713ff?new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x289083,_0x34299a)=>{_0x44dd00[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x289083,_0x34299a),_0x5713ff[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x38c562=>{_0x38c562!=_0x5e4764([0x56,0x61,0x6c,0x69,0x64])&&_0x289083(_0x38c562);},_0x34299a);}):_0x44dd00||_0x5713ff||_0x5e4764([0x56,0x61,0x6c,0x69,0x64]);}}function _0x206408(_0x544fd5,_0x18e2e2){return new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31a4d0=>{if(_0x3340e5())return _0x31a4d0(_0x5e4764([0x56,0x61,0x6c,0x69,0x64]));_0x311ed9(),_0x4b10e1[_0x5e4764([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5e4764([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x56c6ae=!0x1;const _0x154898=_0x113c55();function _0x4ccaa5(_0x534d46){return!!_0x534d46&&(typeof _0x534d46===_0x5e4764([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x534d46===_0x5e4764([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x534d46[_0x5e4764([0x74,0x68,0x65,0x6e])]===_0x5e4764([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x534d46[_0x5e4764([0x63,0x61,0x74,0x63,0x68])]===_0x5e4764([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x515d8b(_0x487a9c){_0x564d0f(_0x487a9c)[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x5278ae=>{if(!_0x5278ae||_0x5278ae[_0x5e4764([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5e4764([0x6f,0x6b]))return _0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x14ab6a(_0x49b313(_0x154898+_0x18e2e2))!=_0x5278ae[_0x5e4764([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5e4764([0x56,0x61,0x6c,0x69,0x64]);})[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x165d3c=>(_0x7e4607(),_0x165d3c),()=>{const _0x28b5e3=_0x571372();return null==_0x28b5e3?(_0x7e4607(),_0x5e4764([0x56,0x61,0x6c,0x69,0x64])):_0x5e4764(_0x1a8e05-_0x28b5e3>(0x427088b1^_0x9a6bdd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x31a4d0)[_0x5e4764([0x63,0x61,0x74,0x63,0x68])](()=>{_0x31a4d0(_0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x231351=0x664ae231^_0x9a6bdd;function _0x7e4607(){const _0x487b7e=_0x5e4764([0x6c,0x6c,0x63,0x74,0x2d])+_0x14ab6a(_0x49b313(_0x544fd5)),_0x5e3656=_0x1ae957(_0x14ab6a(window[_0x5e4764([0x4d,0x61,0x74,0x68])][_0x5e4764([0x63,0x65,0x69,0x6c])](_0x1a8e05/_0x231351)));window[_0x5e4764([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5e4764([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x487b7e,_0x5e3656);}function _0x571372(){const _0x121256=_0x5e4764([0x6c,0x6c,0x63,0x74,0x2d])+_0x14ab6a(_0x49b313(_0x544fd5)),_0x5e7eb2=window[_0x5e4764([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5e4764([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x121256);return _0x5e7eb2?window[_0x5e4764([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ae957(_0x5e7eb2),0x10)*_0x231351:null;}function _0x564d0f(_0x6322d2){return new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5efd65,_0x34e112)=>{_0x6322d2[_0x5e4764([0x74,0x68,0x65,0x6e])](_0x5efd65,_0x34e112),window[_0x5e4764([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x34e112,0x667dd871^_0x9a6bdd);});}}_0x4b10e1[_0x5e4764([0x6f,0x6e])](_0x5e4764([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1f391a,_0x4f85e6)=>{if(_0x4f85e6[0x0]!=_0x544fd5)return _0x31a4d0(_0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4f85e6[0x1]={..._0x4f85e6[0x1],[_0x5e4764([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x154898};},{[_0x5e4764([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5e4764([0x68,0x69,0x67,0x68])}),_0x4b10e1[_0x5e4764([0x6f,0x6e])](_0x5e4764([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5d7aa5=>{_0x4ccaa5(_0x5d7aa5[_0x5e4764([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x56c6ae=!0x0,_0x515d8b(_0x5d7aa5[_0x5e4764([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5e4764([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5e4764([0x6c,0x6f,0x77])}),_0x2a86a5[_0x5e4764([0x74,0x68,0x65,0x6e])](()=>{_0x56c6ae||_0x31a4d0(_0x5e4764([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3340e5(){return _0x4b10e1[_0x5e4764([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e4764([0x76,0x69,0x65,0x77])][_0x5e4764([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5e4764([0x61,0x75,0x74,0x6f]);}function _0x311ed9(){_0x4b10e1[_0x5e4764([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e4764([0x76,0x69,0x65,0x77])][_0x5e4764([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5e4764([0x61,0x75,0x74,0x6f]);}}function _0x33983f(_0x132c6a){const _0x41c55b=[new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x525268=>setTimeout(_0x525268,0x6675327d^_0x9a6bdd)),_0x2a86a5[_0x5e4764([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5168b7=>{let _0x15cc2e=0x0;_0x4b10e1[_0x5e4764([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e4764([0x6f,0x6e])](_0x5e4764([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5621c1,_0x798a7e)=>{_0x798a7e[0x0][_0x5e4764([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x15cc2e++,_0x15cc2e==(0x667c0d49^_0x9a6bdd)&&(_0x5168b7(),_0x5621c1[_0x5e4764([0x6f,0x66,0x66])]());});}))];return window[_0x5e4764([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5e4764([0x72,0x61,0x63,0x65])](_0x41c55b)[_0x5e4764([0x74,0x68,0x65,0x6e])](()=>_0x132c6a);}async function _0x561f66(){await _0x2a86a5,_0x4b10e1[_0x5e4764([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e4764([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x34a055,_0x4b10e1[_0x5e4764([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e4764([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x34a055,_0x4b10e1[_0x5e4764([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5e4764([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x32a7da(_0x4cf19b){const _0xed06d8=_0x10014a();_0x4b10e1[_0xed06d8]=_0x5e4764([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4cf19b,_0x4cf19b!=_0x5e4764([0x56,0x61,0x6c,0x69,0x64])&&_0x561f66();}function _0x10014a(){const _0x3842a4=window[_0x5e4764([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5e4764([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5e4764([0x6e,0x6f,0x77])]())[_0x5e4764([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5e4764([0x2e]),'');let _0x10bfda=_0x5e4764([0x53]);for(let _0x22a0d4=0x0;_0x22a0d4<_0x3842a4[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x22a0d4+=0x2){let _0x6b4398=window[_0x5e4764([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3842a4[_0x5e4764([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x22a0d4,_0x22a0d4+0x2));_0x6b4398>=_0x28a3ee[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x6b4398-=_0x28a3ee[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x10bfda+=_0x28a3ee[_0x6b4398];}return _0x10bfda;}function _0x297c6c(){const _0x98acfb=_0x34aff0[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])](_0x5e4764([0x2e]));if(0x3!=_0x98acfb[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x52f04d(_0x98acfb[0x1]);function _0x52f04d(_0x31fc28){const _0x49462b=_0xb4ef6e(_0x31fc28);return _0x49462b&&_0x58c333()?_0x49462b:null;function _0x58c333(){const _0x243ab4=_0x49462b[_0x5e4764([0x6a,0x74,0x69])],_0x3e24d4=window[_0x5e4764([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x243ab4[_0x5e4764([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x243ab4[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x39d4c6={..._0x49462b,[_0x5e4764([0x6a,0x74,0x69])]:_0x243ab4[_0x5e4764([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x243ab4[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x39d4c6[_0x5e4764([0x76,0x63])],_0x49b313(_0x39d4c6)==_0x3e24d4;}}}async function _0x66485a(){let _0x559593=!0x0;try{const _0x84eac5=_0x34aff0[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])](_0x5e4764([0x2e])),[_0x2dbc6d,_0x505b65,_0x5950b8]=_0x84eac5;return _0x1441db(_0x2dbc6d),await _0x1a3b2d(_0x2dbc6d,_0x505b65,_0x5950b8),_0x559593;}catch{return!0x1;}function _0x1441db(_0x14e9d7){const _0x2e956d=_0xb4ef6e(_0x14e9d7);_0x2e956d&&_0x2e956d[_0x5e4764([0x61,0x6c,0x67])]==_0x5e4764([0x45,0x53,0x32,0x35,0x36])||(_0x559593=!0x1);}async function _0x1a3b2d(_0x23e08,_0x4a1348,_0x13cc0d){const _0x59ab82=window[_0x5e4764([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5e4764([0x66,0x72,0x6f,0x6d])](_0x285f59(_0x13cc0d),_0x2b6298=>_0x2b6298[_0x5e4764([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2ae5e0=new window[(_0x5e4764([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5e4764([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x23e08+_0x5e4764([0x2e])+_0x4a1348),_0x47ecf1=window[_0x5e4764([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5e4764([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x47ecf1)return;const _0x1a3998=await _0x47ecf1[_0x5e4764([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5e4764([0x6a,0x77,0x6b]),_0x2bb309,{[_0x5e4764([0x6e,0x61,0x6d,0x65])]:_0x5e4764([0x45,0x43,0x44,0x53,0x41]),[_0x5e4764([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5e4764([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5e4764([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x47ecf1[_0x5e4764([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5e4764([0x6e,0x61,0x6d,0x65])]:_0x5e4764([0x45,0x43,0x44,0x53,0x41]),[_0x5e4764([0x68,0x61,0x73,0x68])]:{[_0x5e4764([0x6e,0x61,0x6d,0x65])]:_0x5e4764([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1a3998,_0x59ab82,_0x2ae5e0)||(_0x559593=!0x1);}}function _0xb4ef6e(_0xc88e74){return _0xc88e74[_0x5e4764([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5e4764([0x65,0x79]))?JSON[_0x5e4764([0x70,0x61,0x72,0x73,0x65])](_0x285f59(_0xc88e74)):null;}function _0x285f59(_0x506bfa){return window[_0x5e4764([0x61,0x74,0x6f,0x62])](_0x506bfa[_0x5e4764([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5e4764([0x2b]))[_0x5e4764([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5e4764([0x2f])));}function _0x49b313(_0x2f8e4e){let _0x4bb407=0x1505;function _0x53eb3a(_0x49fdaa){for(let _0xdaa2b0=0x0;_0xdaa2b0<_0x49fdaa[_0x5e4764([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xdaa2b0++){const _0x14e8fa=_0x49fdaa[_0x5e4764([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xdaa2b0);_0x4bb407=(_0x4bb407<<0x5)+_0x4bb407+_0x14e8fa,_0x4bb407&=_0x4bb407;}}function _0x2105e2(_0xb115ff){Array[_0x5e4764([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xb115ff)?_0xb115ff[_0x5e4764([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2105e2):_0xb115ff&&typeof _0xb115ff==_0x5e4764([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5e4764([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xb115ff)[_0x5e4764([0x73,0x6f,0x72,0x74])]()[_0x5e4764([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2789b3,_0x4ed852])=>{_0x53eb3a(_0x2789b3),_0x2105e2(_0x4ed852);}):_0x53eb3a(window[_0x5e4764([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xb115ff));}return _0x2105e2(_0x2f8e4e),_0x4bb407>>>0x0;}function _0x14ab6a(_0x17b4c7){return _0x17b4c7[_0x5e4764([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5e4764([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5e4764([0x30]));}function _0x1ae957(_0x45e391){return _0x45e391[_0x5e4764([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5e4764([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5e4764([0x6a,0x6f,0x69,0x6e])]('');}function _0x34a055(){}function _0x5e4764(_0x3b7dc0){return _0x3b7dc0['map'](_0x1a87c7=>String['fromCharCode'](_0x1a87c7))['join']('');}_0x32a7da(await _0x39b555());}(this);}['_initSchema'](){const _0x5d517d=this['editor']['model']['schema'];_0x5d517d['isRegistered']('imageBlock')&&_0x5d517d['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x5d517d['isRegistered']('imageInline')&&_0x5d517d['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x69c207=this['editor'];_0x69c207['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x69c207['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x4395d0=>_0x4395d0['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x39dd4f=_0x69c207['commands']['get']('replaceImageSource');_0x39dd4f&&this['listenTo'](_0x39dd4f,'cleanupImage',(_0xa141bf,[_0x3a5c13,_0x1dcb09])=>{_0x3a5c13['removeAttribute']('uploadcareImageId',_0x1dcb09);});}['_initConfig'](){const _0xb17e13=this['editor']['config']['get']('uploadcare.uploader')||{},_0x160339=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x5ea37a(_0x39fc81['document'],'uc-config',{..._0xb17e13,'pubkey':_0x160339,'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']=_0xa21de=>{if('closeMax'==_0xa21de)return'#uc-icon-arrow-down';},_0x39fc81['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x5ea37a(_0x39fc81['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x39fc81['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x33e05e=this['editor']['commands']['get']('insertImage');_0x33e05e&&this['listenTo'](_0x33e05e,'execute',()=>{const _0x2d1ecb=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2d1ecb&&_0x2d1ecb['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x2d1ecb);});});const _0xfcfbcd=this['editor']['commands']['get']('uploadcareImageReplace');_0xfcfbcd&&this['listenTo'](_0xfcfbcd,'execute',()=>{const _0x237397=this['editor']['model']['document']['selection']['getSelectedElement']();_0x237397&&_0x237397['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x237397);});});}}class tt extends _0x3b8fd4{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x17c6a5){super(_0x17c6a5),_0x17c6a5['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x359d49['defineComponents'](_0x359d49);}}class ii extends _0x15ccb4{constructor(_0x55ebe6){super(_0x55ebe6);const t=_0x55ebe6['t'],_0x50464d=this['bindTemplate'],_0x25444e=new _0x234043();_0x25444e['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':[_0x25444e,{'text':_0x50464d['to']('imageUploadProgress',_0x4e7629=>t('Loading\x20image...')+'\x20('+(_0x4e7629||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 ti extends _0x15ccb4{constructor(_0x4aba66){super(_0x4aba66);const t=_0x4aba66['t'];this['set']('errorType',null);const _0x518c05=new _0x1408d8(_0x4aba66);_0x518c05['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x518c05['withText']=!0x0,_0x518c05['class']='ck-button-action',_0x518c05['on']('execute',()=>{this['fire']('retry');}),_0x518c05['bind']('isVisible')['to'](this,'errorType',_0x504c5a=>'NotFound'!==_0x504c5a);const _0x3b6cdf=new _0xebe885();_0x3b6cdf['content']=_0x1a6cda,_0x3b6cdf['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xfdadd9=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':[_0x3b6cdf,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xfdadd9['to']('errorType',_0x16dcf3=>t('NotFound'!==_0x16dcf3?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x518c05]},{'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 ei extends _0x15ccb4{constructor(_0xb1eedd,_0x55d4fd){super(_0xb1eedd);const _0x5e4cfa=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x55d4fd,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x5e4cfa['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x13a12e,_0x5af972,_0xca8c29){super(_0x13a12e),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x13a12e),this['_errorView']=new ti(_0x13a12e),this['_editingView']=new ei(_0x13a12e,_0xca8c29),this['_focusableView']=new _0x15ccb4(_0x13a12e),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5af972),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'],_0x3a38cf=>{this['_addUploadcareImageEditorListeners'](_0x3a38cf);});}),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'](_0x4f9493,_0x61f42){const _0x35c231='uc-cloud-image-editor',_0x5647d8=_0x4f9493['querySelector'](_0x35c231);if(_0x5647d8)return _0x61f42(_0x5647d8);const _0x248f98=new MutationObserver(_0x2509bc=>{const _0x376437=_0x2509bc['filter'](_0x4355c6=>_0x4355c6['target']===_0x4f9493&&_0x4355c6['addedNodes']['length']>0x0&&_0x4355c6['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x35c231);_0x376437['length']&&(_0x248f98['disconnect'](),_0x61f42(_0x376437[0x0]['addedNodes'][0x0]));});_0x248f98['observe'](_0x4f9493,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x2fc2ca){_0x2fc2ca['addEventListener']('apply',_0x41e944=>{this['fire']('apply',{'imageSrc':_0x41e944['detail']['cdnUrl']});}),_0x2fc2ca['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
- _0x2a058a(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x339e51,_0x2dcd19,_0x48f5a5){super(),this['_editor']=_0x339e51,this['_dialog']=_0x2dcd19,this['_imageElement']=_0x48f5a5,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 _0x505b7e=this['_imageElement'],_0x3d07cb=_0x505b7e['getAttribute']('uploadcareImageId'),_0x5188fe=_0x505b7e['getAttribute']('src');if(_0x3d07cb)await this['_loadImageInfo'](_0x3d07cb,_0x5188fe);else{if(this['_imageCache']['has'](_0x5188fe)){const _0x5efd67=this['_imageCache']['get'](_0x5188fe);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5efd67['url'],this['imageDimension']=_0x5efd67['dimension'],this['imageId']=_0x5efd67['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x50589a}=this['_editor'],t=_0x50589a['t'],_0x473df3=new X(_0x50589a,this['imageStatus'],this['_attributes']);_0x473df3['bind']('status')['to'](this,'imageStatus'),_0x473df3['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x473df3['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x473df3['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x473df3,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1b431c,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x473df3,'position':_0x2cece5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x473df3['focus']();},'onHide':()=>{_0x473df3['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4126f3=>!S(_0x4126f3,_0x473df3['element'])}});}['_loadImageInfo'](_0x3705c9,_0x263476){return j['getInfo'](_0x3705c9,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x249b29=>{const {width:_0x407808,height:_0x15c8b9}=_0x249b29['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x263476,this['imageDimension']={'width':_0x407808,'height':_0x15c8b9},this['imageId']=_0x3705c9;})['catch'](_0x3e873a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3e873a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x171639,_0x221376){return this['_getImageAsFile'](_0x171639)['then'](_0x131b91=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x221376['signal'],'file':_0x131b91,'onProgress':_0x480344=>{_0x480344&&_0x480344['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x480344['value']));}}))['then'](_0x52cc9c=>{const {width:_0x373496,height:_0x5a2a8e}=_0x52cc9c['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x52cc9c['cdnUrl'],this['imageDimension']={'width':_0x373496,'height':_0x5a2a8e},this['imageId']=_0x52cc9c['uuid'],this['imageUploadProgress']=null;const _0x23dad9=_0x171639['getAttribute']('src');this['_imageCache']['set'](_0x23dad9,{'id':_0x52cc9c['uuid'],'url':_0x52cc9c['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0xf9aa74=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xf9aa74['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x36d739,_0x3cd26e){_0x36d739['on']('apply',(_0x430812,_0x2db4a0)=>{this['_replaceImage'](_0x3cd26e,_0x2db4a0['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x36d739['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x36d739['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x160705,_0x16e602,_0x25b8cc){const _0x3a0696=this['_editor'],{width:_0x1cd34c,height:_0x3f5d5e}=C(_0x16e602,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1d645b,imageSources:_0x591463}=k(_0x16e602,_0x1cd34c);_0x3a0696['model']['change'](_0x487e0e=>{if('$graveyard'===_0x160705['root']['rootName']){_0x3a0696['execute']('insertImage',{'imageType':_0x160705['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x160705['getAttributes']()),'uploadcareImageId':_0x25b8cc,'src':_0x1d645b,'sources':_0x591463,'width':_0x1cd34c,'height':_0x3f5d5e}});const _0x22c6a9=_0x160705['getChildren']();_0x160705=_0x3a0696['model']['document']['selection']['getSelectedElement']();for(const _0x4cabc5 of _0x22c6a9)_0x487e0e['append'](_0x487e0e['cloneElement'](_0x4cabc5),_0x160705);}else _0x487e0e['setSelection'](_0x160705,'on'),_0x3a0696['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x160705['getAttributes']()),'uploadcareImageId':_0x25b8cc,'src':_0x1d645b,'sources':_0x591463,'width':_0x1cd34c,'height':_0x3f5d5e},_0x160705);_0x487e0e['setSelection'](_0x160705,'on');});}async['_getImageAsFile'](_0x366ab0){const _0x2cbe76=_0x39fc81['window'],_0x2858ce=_0x39fc81['document']['location']['href'],_0xde250b=new _0x2cbe76['URL'](_0x366ab0['getAttribute']('src'),_0x2858ce);if('data:'===_0xde250b['protocol']){const _0x11561d=_0xde250b['href']['split'](','),_0x295d2d=_0x11561d[0x0]['match'](/:(.*?);/)[0x1],_0x3f3995=_0x295d2d['split']('/')[0x1],_0x4f7b2b=_0x2cbe76['atob'](_0x11561d[_0x11561d['length']-0x1]);let _0x1dcd0e=_0x4f7b2b['length'];const _0x1f14e0=new _0x2cbe76['Uint8Array'](_0x1dcd0e);for(;_0x1dcd0e--;)_0x1f14e0[_0x1dcd0e]=_0x4f7b2b['charCodeAt'](_0x1dcd0e);return new _0x2cbe76['File']([_0x1f14e0],'image.'+_0x3f3995,{'type':_0x295d2d});}const _0x516294=_0xde250b['href']['split']('/'),_0x5fa327=_0x516294[_0x516294['length']-0x1],_0x6b1f0=_0x5fa327['split']('.')[0x1];return _0x2cbe76['fetch'](_0xde250b['href'])['then'](_0x4ed5a7=>_0x4ed5a7['clone']()['blob']())['then'](_0x252091=>new _0x2cbe76['File']([_0x252091],_0x5fa327,{'type':'image/'+_0x6b1f0}));}}class Q extends _0x408a34{['imageEditController'];static get['requires'](){return[_0x4188d0];}['_isEditable'];constructor(_0x2c5b68){super(_0x2c5b68),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x142742){const _0x28fdc1=z(_0x142742);return _0x9a6ee2=>!(!_0x9a6ee2||!_0x9a6ee2['is']('element','imageBlock')&&!_0x9a6ee2['is']('element','imageInline'))&&(!!_0x9a6ee2['hasAttribute']('uploadcareImageId')||!!_0x9a6ee2['hasAttribute']('src')&&_0x28fdc1(_0x9a6ee2['getAttribute']('src')));}(_0x2c5b68['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x20b983=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x20b983);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x35354c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x35354c&&(_0x35354c['is']('element','imageBlock')||_0x35354c['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x4188d0),_0x35354c),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x408a34{['refresh'](){const _0x108ec7=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x108ec7&&(_0x108ec7['is']('element','imageBlock')||_0x108ec7['is']('element','imageInline')));}['execute'](_0x2eefb1){const _0x575986=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x471799=>{_0x471799['setAttributes'](_0x2eefb1,_0x575986),_0x471799['removeAttribute']('srcset',_0x575986),_0x471799['removeAttribute']('sizes',_0x575986);});}}class m extends _0x3b8fd4{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x398ded,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3fb506}=this;_0x3fb506['commands']['add']('uploadcareImageEdit',new Q(_0x3fb506)),_0x3fb506['commands']['add']('uploadcareImageReplace',new V(_0x3fb506));}}class g extends _0x3b8fd4{['_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 _0x27aeb4=this['editor'];_0x27aeb4['ui']['componentFactory']['add']('uploadcareImageEdit',_0x395e64=>{const _0x1450d8=_0x27aeb4['commands']['get']('uploadcareImageEdit'),_0x1fc215=new _0x1408d8(_0x395e64),t=_0x395e64['t'];return _0x1fc215['set']({'icon':_0x1b431c,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x1fc215['bind']('isEnabled')['to'](_0x1450d8),_0x1fc215['bind']('isOn')['to'](_0x1450d8,'isActive'),this['listenTo'](_0x1fc215,'execute',()=>{_0x27aeb4['execute']('uploadcareImageEdit'),_0x27aeb4['editing']['view']['focus']();}),_0x1fc215;}),this['_initConfig']();}['_initConfig'](){const _0x57d100=_0x5ea37a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x57d100),this['listenTo'](this['editor'],'destroy',()=>{_0x57d100['remove']();});}}class et extends _0x3b8fd4{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
23
+ import{Plugin as _0x2c88ff,Command as _0x5d4826}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x37a08f,IconGooglePhotos as _0x410eca,IconGoogleDrive as _0x59251c,IconFacebook as _0x129144,IconDropbox as _0x1d2a7d,IconUploadcareLink as _0x4b94e5,IconUploadcareImageUpload as _0xc9c387,IconError as _0x352e5d,IconUploadcareImageEdit as _0x9dea16}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x2b5452,MenuBarMenuListItemButtonView as _0x325206,View as _0x258d69,FocusCycler as _0x2c3c6e,Dialog as _0x48111a,DialogViewPosition as _0x12813e,SpinnerView as _0x12a9ea,IconView as _0x34ba7c,Notification as _0x4d24c3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x5f3997,DomEmitterMixin as _0x5000db,global as _0x4bdf66,getAncestors as _0xf4f5f6,ObservableMixin as _0x5482f1,uid as _0x5ad672,createElement as _0x78e887}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0xea7249}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x203f72,info as _0xf3189f}from'@uploadcare/upload-client';import*as _0x30c460 from'@uploadcare/file-uploader';var i=function(_0x3e92d1){return _0x3e92d1['Local']='local',_0x3e92d1['URL']='url',_0x3e92d1['Dropbox']='dropbox',_0x3e92d1['GDrive']='gdrive',_0x3e92d1['Facebook']='facebook',_0x3e92d1['GPhotos']='gphotos',_0x3e92d1['OneDrive']='onedrive',_0x3e92d1;}({});function _(_0x49cb10,_0x30a237,_0x4fccac){const t=_0x49cb10['t'],_0x38060b=_0x49cb10['t'];switch(_0x30a237){case i['Local']:return{'text':_0x38060b('Insert'===_0x4fccac?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x38060b('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x4fccac?_0x38060b('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x38060b('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x4fccac?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x4fccac?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x4fccac?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x4fccac?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x4fccac?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x30a237;}}class e extends _0x2c88ff{['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 _0x55c051=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1f8823;for(const _0xd1439a in _0x55c051){const _0x5851c2=_0xd1439a,_0x53966f=_0x55c051[_0x5851c2];if('uploadcareLicenseKeyValid'==_0x53966f||'uploadcareLicenseKeyInvalid'==_0x53966f||'uploadcareLicenseKeyExpired'==_0x53966f||'uploadcareLicenseKeyDomainLimit'==_0x53966f||'uploadcareLicenseKeyNotAllowed'==_0x53966f||'uploadcareLicenseKeyEvaluationLimit'==_0x53966f||'uploadcareLicenseKeyTrialLimit'==_0x53966f||'uploadcareLicenseKeyUsageLimit'==_0x53966f){delete _0x55c051[_0x5851c2],_0x1f8823=_0x53966f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x1f8823&&_0x55c051['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x1f8823&&_0x55c051['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x1f8823&&_0x55c051['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x1f8823&&_0x55c051['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x1f8823&&_0x55c051['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x1f8823&&_0x55c051['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x1f8823&&_0x55c051['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0xe341c3}=this,_0x34fb81=_0xe341c3['commands']['get']('uploadcare');if(!_0x34fb81)return;const _0x2d07ba=this['_normalizeConfigSourceList'](_0xe341c3['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x59cefe,_0x59cd04)=>{const _0x4b5b01=this['_getIntegrationKey'](_0x59cd04['type']);return _0x59cefe[_0x4b5b01]||(_0x59cefe[_0x4b5b01]=[]),_0x59cefe[_0x4b5b01]['push'](_0x59cd04),_0x59cefe;},{});_0xe341c3['plugins']['has']('ImageInsertUI')&&_0xe341c3['commands']['get']('uploadcare')&&Object['entries'](_0x2d07ba)['forEach'](([_0x24f19f,_0x2cde03])=>{_0xe341c3['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x24f19f,'observable':()=>_0x34fb81,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2cde03),'formViewCreator':()=>this['_createDropdownButtons'](_0x2cde03),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2cde03),'override':'assetManager'!==_0x24f19f});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0xca4192){const {locale:_0x332fc7}=this['editor'];return _0xca4192['map'](_0x1aa6be=>{const _0x1f2eba=_(_0x332fc7,_0x1aa6be,'Insert');switch(_0x1aa6be){case i['Local']:return{'icon':_0xc9c387,'type':i['Local'],..._0x1f2eba};case i['URL']:return{'icon':_0x4b94e5,'type':i['URL'],..._0x1f2eba};case i['Dropbox']:return{'icon':_0x1d2a7d,'type':i['Dropbox'],..._0x1f2eba};case i['Facebook']:return{'icon':_0x129144,'type':i['Facebook'],..._0x1f2eba};case i['GDrive']:return{'icon':_0x59251c,'type':i['GDrive'],..._0x1f2eba};case i['GPhotos']:return{'icon':_0x410eca,'type':i['GPhotos'],..._0x1f2eba};case i['OneDrive']:return{'icon':_0x37a08f,'type':i['OneDrive'],..._0x1f2eba};}});}['_getIntegrationKey'](_0x257718){switch(_0x257718){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x4d8c72,_0x4d65d5){const _0x220a67=this['editor'],_0x5259f9=new _0x4d8c72(_0x220a67['locale']),_0x1c2342=_0x220a67['commands']['get']('uploadcare');return _0x5259f9['bind']('isEnabled')['to'](_0x1c2342),_0x5259f9['on']('execute',()=>{_0x1c2342['execute'](_0x4d65d5);}),_0x5259f9;}['_createToolbarButton'](_0x490047){const {locale:_0x5f119e}=this['editor'],_0x170c26=this['editor']['plugins']['get']('ImageInsertUI'),_0x52388b=_0x490047[0x0],_0x28015c=this['_createButton'](_0x2b5452,_0x52388b['type']);return _0x28015c['icon']=_0x52388b['icon'],_0x28015c['bind']('label')['to'](_0x170c26,'isImageSelected',_0x5ebd22=>_(_0x5f119e,_0x52388b['type'],_0x5ebd22?'Replace':'Insert')['text']),_0x28015c['tooltip']=!0x0,_0x28015c;}['_createDropdownButtons'](_0xe7bbec){const {locale:_0x5c5ff1}=this['editor'],_0x4497fc=this['editor']['plugins']['get']('ImageInsertUI');return _0xe7bbec['map'](_0x12d410=>{const _0x1e51ad=this['_createButton'](_0x2b5452,_0x12d410['type']);return _0x1e51ad['withText']=!0x0,_0x1e51ad['icon']=_0x12d410['icon'],_0x1e51ad['bind']('label')['to'](_0x4497fc,'isImageSelected',_0x56340c=>_(_0x5c5ff1,_0x12d410['type'],_0x56340c?'Replace':'Insert')['text']),_0x1e51ad;});}['_createMenuBarButtons'](_0x1b6881){return _0x1b6881['map'](_0x108014=>{const _0x5937d1=this['_createButton'](_0x325206,_0x108014['type']);return _0x5937d1['icon']=_0x108014['icon'],_0x5937d1['label']=_0x108014['shortText'],_0x5937d1;});}}class F extends _0x258d69{['focusTracker'];['focusCycler'];constructor(_0x57a82c){super(_0x57a82c),this['focusTracker']=new _0x5f3997(),this['focusCycler']=new _0x2c3c6e({'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 x extends F{constructor(_0x38b05b,_0x521594){super(_0x38b05b),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-'+_0x521594}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x101d38,_0x34f102){const _0x408a26=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x471bd8=>_0x471bd8<=_0x34f102)['map'](_0xb2b91=>_0x101d38['replace'](/\/$/,'')+'/-/resize/'+_0xb2b91+'x/\x20'+_0xb2b91+'w');return{'imageFallbackUrl':_0x101d38,'imageSources':[{'srcset':_0x408a26['join'](',\x20'),'sizes':'(max-width:\x20'+_0x34f102+'px)\x20100vw,\x20'+_0x34f102+'px','type':'image/webp'}]};}function C(_0x2e5ee0,_0x450bd4,_0x1ae19d){const _0x3c223f=_0x2e5ee0['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3c223f?parseInt(_0x3c223f[0x1],0xa):_0x450bd4,'height':_0x3c223f?parseInt(_0x3c223f[0x2],0xa):_0x1ae19d};}function p(_0x55c500,_0x409325){const _0x34247f=new(_0x5000db())(),_0x14a4a7=_0x55c500['plugins']['get']('ImageUtils'),_0xfdea16=_0x55c500['editing']['mapper']['toViewElement'](_0x409325),_0x1ca880=_0x14a4a7['findViewImgElement'](_0xfdea16),_0x5321a8=_0x55c500['editing']['view']['domConverter']['viewToDom'](_0x1ca880),_0x5c3f8f=_0x409325['getAttribute']('width'),_0x4fbfe5=_0x409325['getAttribute']('height'),_0x2fd7b7='image-processing';_0x55c500['editing']['view']['change'](_0x740695=>{_0x740695['addClass'](_0x2fd7b7,_0xfdea16),_0x740695['setStyle']('aspect-ratio',_0x5c3f8f+'/'+_0x4fbfe5,_0x1ca880);}),_0x34247f['listenTo'](_0x5321a8,'load',()=>{_0x34247f['stopListening'](_0x5321a8,'load'),_0x55c500['editing']['view']['change'](_0x515f33=>{_0x515f33['removeClass'](_0x2fd7b7,_0xfdea16),_0x515f33['removeStyle']('aspect-ratio',_0x1ca880);});});}function G(_0x247342){if(Array['isArray'](_0x247342)){const _0x246649=_0x247342['map'](G);return _0x152666=>_0x246649['some'](_0x3e6eb1=>_0x3e6eb1(_0x152666));}if('origin'==_0x247342){const _0x450472=_0x4bdf66['window']['location']['origin'];return _0x1c0937=>new URL(_0x1c0937,_0x4bdf66['document']['baseURI'])['origin']==_0x450472;}return'function'==typeof _0x247342?_0x247342:_0x247342 instanceof RegExp?_0xc31654=>!(!_0xc31654['match'](_0x247342)&&!_0xc31654['replace'](/^https?:\/\//,'')['match'](_0x247342)):()=>!0x1;}function S(_0xfb6d6d,_0x3bc294){return _0xf4f5f6(_0xfb6d6d['target'])['includes'](_0x3bc294);}class n extends/* #__PURE__ -- @preserve */
24
+ _0x5482f1(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x3df0b7,_0x4dac73,_0x7a44f8){super(),this['_editor']=_0x3df0b7,this['_editing']=_0x4dac73,this['_dialog']=_0x3df0b7['plugins']['get'](_0x48111a),this['_api']=_0x4dac73['ctxElement']['getAPI'](),this['_type']=_0x7a44f8,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:_0x22c584,model:_0x196aba}=this['_editor'],_0x334840=_0x196aba['document']['selection']['getSelectedElement'](),_0x50dcbb=_0x334840&&(_0x334840['is']('element','imageBlock')||_0x334840['is']('element','imageInline'));this['_formView']=new x(_0x22c584,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0xc9c387,'title':_(_0x22c584,this['_type'],_0x50dcbb?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x12813e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xf9254a=>!S(_0xf9254a,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x30d795}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x454abd=>{const _0x3f7f1e=_0x30d795['length'];for(const _0x4642c2 of _0x30d795){const _0x531054=_0x4642c2===_0x30d795[_0x3f7f1e-0x1],{cdnUrl:_0x23656f,fileInfo:_0x1367a5}=_0x4642c2;if(!_0x23656f||!_0x1367a5)continue;const {width:_0x1b47bd,height:_0x515c24}=_0x1367a5['imageInfo'],_0x5be1ba=C(_0x23656f,_0x1b47bd,_0x515c24),_0x597282=k(_0x23656f,_0x5be1ba['width']),_0x40a00f={'id':_0x1367a5['uuid'],'type':'image','attributes':{'imageDimension':_0x5be1ba,..._0x597282}};this['_insertAsset'](_0x40a00f,_0x531054,_0x454abd);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x4a5a3b=>{'idle'===_0x4a5a3b['detail']['status']&&!_0x4a5a3b['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x429f9a,_0x4c4e22,_0x3a0d41){const _0x142425=this['_editor']['model']['document']['selection'],_0xb95de1=_0x142425['getSelectedElement'](),_0x5af105=!(!_0xb95de1||!_0xb95de1['is']('element','imageInline'));_0x3a0d41['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x429f9a,_0x5af105),_0x4c4e22||_0x3a0d41['setSelection'](_0x142425['getLastPosition']());}['_insertImage'](_0x195a2e,_0xd4159d){const _0x53d7cd=this['_editor'],{imageDimension:_0x40138d,imageFallbackUrl:_0x5b815e,imageSources:_0x11ad56}=_0x195a2e['attributes'];_0x53d7cd['execute']('insertImage',{'imageType':_0xd4159d?'imageInline':null,'source':{'uploadcareImageId':_0x195a2e['id'],'src':_0x5b815e,'sources':_0x11ad56,..._0x40138d}});}}class w extends _0x5d4826{['_editing'];['_controller']=null;static get['requires'](){return[_0x48111a,o];}constructor(_0x40fdea){super(_0x40fdea),this['_editing']=_0x40fdea['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0xf209c3){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0xf209c3);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x57957b,publicKey:_0x1bd41e,signal:_0x2716b7,onProgress:_0x48ecb4}){return _0x203f72(_0x57957b,{'publicKey':_0x1bd41e,'store':'auto','signal':_0x2716b7,'onProgress':_0x48ecb4});}static['getInfo'](_0x12caa1,_0x1f81b3){return _0xf3189f(_0x12caa1,_0x1f81b3);}}class f extends _0x2c88ff{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0xea7249,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x80731c=this['editor'];if(!!!_0x80731c['config']['get']('uploadcare'))return;_0x80731c['plugins']['get'](_0xea7249)['createUploadAdapter']=_0xda573=>new A(_0xda573,_0x80731c),_0x80731c['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x10817a,{imageElement:_0x7e3cf0,data:_0x7719e7})=>{_0x80731c['model']['change'](_0x2e6982=>{_0x2e6982['setAttribute']('uploadcareImageId',_0x7719e7['uploadcareImageId'],_0x7e3cf0);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x4e1d97,_0x408067){this['loader']=_0x4e1d97,this['editor']=_0x408067,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x16bcaa=this['editor']['config']['get']('uploadcare.pubkey'),_0x25e442=await this['loader']['file'];return j['upload']({'file':_0x25e442,'publicKey':_0x16bcaa,'signal':this['controller']['signal'],'onProgress':_0x9ac584=>{_0x9ac584&&_0x9ac584['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x9ac584['value']);}})['then'](async _0x118bf9=>{const {imageFallbackUrl:_0x5f4859,imageSources:_0x16d84d}=k(_0x118bf9['cdnUrl'],_0x118bf9['imageInfo']['width']);return{'uploadcareImageId':_0x118bf9['uuid'],'default':_0x5f4859,'sources':_0x16d84d};})['catch'](()=>{const _0x5e7ecf=t('Cannot\x20upload\x20file:')+('\x20'+_0x25e442['name']+'.');return Promise['reject'](_0x5e7ecf);});}['abort'](){this['controller']['abort']();}}class o extends _0x2c88ff{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x48111a];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x234bd7){super(_0x234bd7),this['ucContextId']=_0x5ad672();}['init'](){const _0x20da17=this['editor'];_0x20da17['commands']['add']('uploadcare',new w(_0x20da17));}['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 _0x2d6f40=_0x4bdf66['document']['querySelector']('input[uploadcare-file-input]');_0x2d6f40&&_0x2d6f40['remove']();}),async function(_0xe756f4){const _0xf3819c=_0x1f3dce([0x38,0x31,0x41,0x74,0x45,0x42,0x58,0x56,0x4a,0x48,0x63,0x76,0x73,0x4d,0x59,0x6b,0x67,0x54,0x39,0x46,0x6f,0x64,0x43,0x50,0x35,0x44,0x4e,0x6c,0x72,0x7a,0x5a,0x51,0x55,0x6e,0x6d,0x33,0x36,0x77,0x6a,0x69,0x32,0x68,0x70,0x30,0x75,0x61,0x47,0x66,0x4f,0x71,0x52,0x78,0x57,0x62,0x34,0x79,0x4b,0x53,0x37,0x65,0x49,0x4c]),_0x80e084=0x2fc52870,_0x3b984f=0x2fc24340^_0x80e084,_0x1ee9ea=window[_0x1f3dce([0x44,0x61,0x74,0x65])][_0x1f3dce([0x6e,0x6f,0x77])](),_0x3627ae=_0xe756f4[_0x1f3dce([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x325c9d=new window[(_0x1f3dce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x797feb=>{_0x3627ae[_0x1f3dce([0x6f,0x6e,0x63,0x65])](_0x1f3dce([0x72,0x65,0x61,0x64,0x79]),_0x797feb);}),_0x3d0cfd={[_0x1f3dce([0x6b,0x74,0x79])]:_0x1f3dce([0x45,0x43]),[_0x1f3dce([0x75,0x73,0x65])]:_0x1f3dce([0x73,0x69,0x67]),[_0x1f3dce([0x63,0x72,0x76])]:_0x1f3dce([0x50,0x2d,0x32,0x35,0x36]),[_0x1f3dce([0x78])]:_0x1f3dce([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]),[_0x1f3dce([0x79])]:_0x1f3dce([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]),[_0x1f3dce([0x61,0x6c,0x67])]:_0x1f3dce([0x45,0x53,0x32,0x35,0x36])},_0xa888de=_0x3627ae[_0x1f3dce([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1f3dce([0x67,0x65,0x74])](_0x1f3dce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3e4df4(){let _0x71357f,_0x26982e=null,_0x13a901=null;try{if(_0xa888de==_0x1f3dce([0x47,0x50,0x4c]))return _0x1f3dce([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x71357f=_0x22bc1a(),!_0x71357f)return _0x1f3dce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x71357f[_0x1f3dce([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x13a901=_0x254419(_0x71357f[_0x1f3dce([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x71357f[_0x1f3dce([0x6a,0x74,0x69])])),await _0x49f40d()?_0xd51a4c()?_0x514e87()?_0x1f3dce([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3cb79d()?(_0x71357f[_0x1f3dce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1f3dce([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x26982e=_0x106e26(_0x1f3dce([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x71357f[_0x1f3dce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1f3dce([0x74,0x72,0x69,0x61,0x6c])&&(_0x26982e=_0x106e26(_0x1f3dce([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x27fd49()):_0x1f3dce([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1f3dce([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1f3dce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1f3dce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x514e87(){const _0x563567=[_0x1f3dce([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1f3dce([0x74,0x72,0x69,0x61,0x6c])][_0x1f3dce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x71357f[_0x1f3dce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1ee9ea/0x3e8:0xe10*_0x3b984f;return _0x71357f[_0x1f3dce([0x65,0x78,0x70])]<_0x563567;}function _0xd51a4c(){const _0x210789=_0x71357f[_0x1f3dce([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x210789&&(!!_0x210789[_0x1f3dce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f3dce([0x2a]))||!!_0x210789[_0x1f3dce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f3dce([0x55,0x50,0x4c,0x43])));}function _0x3cb79d(){const _0x3c41ac=_0x71357f[_0x1f3dce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3c41ac||0x0==_0x3c41ac[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3bc12f}=new URL(window[_0x1f3dce([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3c41ac[_0x1f3dce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bc12f))return!0x0;const _0x527be1=_0x3bc12f[_0x1f3dce([0x73,0x70,0x6c,0x69,0x74])](_0x1f3dce([0x2e]));return _0x3c41ac[_0x1f3dce([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2fdc82=>_0x2fdc82[_0x1f3dce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f3dce([0x2a])))[_0x1f3dce([0x6d,0x61,0x70])](_0x1cd6ec=>_0x1cd6ec[_0x1f3dce([0x73,0x70,0x6c,0x69,0x74])](_0x1f3dce([0x2e])))[_0x1f3dce([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1d8595=>_0x1d8595[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x527be1[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1f3dce([0x6d,0x61,0x70])](_0x5dda8c=>Array(_0x527be1[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5dda8c[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1f3dce([0x66,0x69,0x6c,0x6c])](_0x5dda8c[0x0]===_0x1f3dce([0x2a])?_0x1f3dce([0x2a]):'')[_0x1f3dce([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5dda8c))[_0x1f3dce([0x73,0x6f,0x6d,0x65])](_0x4f1e36=>_0x527be1[_0x1f3dce([0x65,0x76,0x65,0x72,0x79])]((_0x58eaf6,_0x6756b6)=>_0x4f1e36[_0x6756b6]===_0x58eaf6||_0x4f1e36[_0x6756b6]===_0x1f3dce([0x2a])));}function _0x27fd49(){return _0x26982e&&_0x13a901?new window[(_0x1f3dce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x399710,_0x24ba73)=>{_0x26982e[_0x1f3dce([0x74,0x68,0x65,0x6e])](_0x399710,_0x24ba73),_0x13a901[_0x1f3dce([0x74,0x68,0x65,0x6e])](_0x1fd3ed=>{_0x1fd3ed!=_0x1f3dce([0x56,0x61,0x6c,0x69,0x64])&&_0x399710(_0x1fd3ed);},_0x24ba73);}):_0x26982e||_0x13a901||_0x1f3dce([0x56,0x61,0x6c,0x69,0x64]);}}function _0x254419(_0x11b0c8,_0x5feb){return new window[(_0x1f3dce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1597d9=>{if(_0x123d13())return _0x1597d9(_0x1f3dce([0x56,0x61,0x6c,0x69,0x64]));_0x50799c(),_0x3627ae[_0x1f3dce([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1f3dce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x41df4d=!0x1;const _0x338f04=_0x5ad672();function _0x12921c(_0x508c71){return!!_0x508c71&&(typeof _0x508c71===_0x1f3dce([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x508c71===_0x1f3dce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x508c71[_0x1f3dce([0x74,0x68,0x65,0x6e])]===_0x1f3dce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x508c71[_0x1f3dce([0x63,0x61,0x74,0x63,0x68])]===_0x1f3dce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4a236f(_0x18aa45){_0x595073(_0x18aa45)[_0x1f3dce([0x74,0x68,0x65,0x6e])](_0x238a98=>{if(!_0x238a98||_0x238a98[_0x1f3dce([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1f3dce([0x6f,0x6b]))return _0x1f3dce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1ee024(_0x1a5968(_0x338f04+_0x5feb))!=_0x238a98[_0x1f3dce([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1f3dce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1f3dce([0x56,0x61,0x6c,0x69,0x64]);})[_0x1f3dce([0x74,0x68,0x65,0x6e])](_0x4c2325=>(_0x4d9319(),_0x4c2325),()=>{const _0x425bce=_0x406bf1();return null==_0x425bce?(_0x4d9319(),_0x1f3dce([0x56,0x61,0x6c,0x69,0x64])):_0x1f3dce(_0x1ee9ea-_0x425bce>(0xbc9ac70^_0x80e084)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1f3dce([0x74,0x68,0x65,0x6e])](_0x1597d9)[_0x1f3dce([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1597d9(_0x1f3dce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4e3055=0x2ff3c6f0^_0x80e084;function _0x4d9319(){const _0x5ec0f4=_0x1f3dce([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ee024(_0x1a5968(_0x11b0c8)),_0x33ea2a=_0xa68cf6(_0x1ee024(window[_0x1f3dce([0x4d,0x61,0x74,0x68])][_0x1f3dce([0x63,0x65,0x69,0x6c])](_0x1ee9ea/_0x4e3055)));window[_0x1f3dce([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1f3dce([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5ec0f4,_0x33ea2a);}function _0x406bf1(){const _0x5328ee=_0x1f3dce([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ee024(_0x1a5968(_0x11b0c8)),_0x5e16aa=window[_0x1f3dce([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1f3dce([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5328ee);return _0x5e16aa?window[_0x1f3dce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xa68cf6(_0x5e16aa),0x10)*_0x4e3055:null;}function _0x595073(_0x3c8354){return new window[(_0x1f3dce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1fc14c,_0x3a1e1c)=>{_0x3c8354[_0x1f3dce([0x74,0x68,0x65,0x6e])](_0x1fc14c,_0x3a1e1c),window[_0x1f3dce([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3a1e1c,0x2fc4fcb0^_0x80e084);});}}_0x3627ae[_0x1f3dce([0x6f,0x6e])](_0x1f3dce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4bfac3,_0x5b5509)=>{if(_0x5b5509[0x0]!=_0x11b0c8)return _0x1597d9(_0x1f3dce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5b5509[0x1]={..._0x5b5509[0x1],[_0x1f3dce([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x338f04};},{[_0x1f3dce([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1f3dce([0x68,0x69,0x67,0x68])}),_0x3627ae[_0x1f3dce([0x6f,0x6e])](_0x1f3dce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x406e0a=>{_0x12921c(_0x406e0a[_0x1f3dce([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x41df4d=!0x0,_0x4a236f(_0x406e0a[_0x1f3dce([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1f3dce([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1f3dce([0x6c,0x6f,0x77])}),_0x325c9d[_0x1f3dce([0x74,0x68,0x65,0x6e])](()=>{_0x41df4d||_0x1597d9(_0x1f3dce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x123d13(){return _0x3627ae[_0x1f3dce([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1f3dce([0x76,0x69,0x65,0x77])][_0x1f3dce([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1f3dce([0x61,0x75,0x74,0x6f]);}function _0x50799c(){_0x3627ae[_0x1f3dce([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1f3dce([0x76,0x69,0x65,0x77])][_0x1f3dce([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1f3dce([0x61,0x75,0x74,0x6f]);}}function _0x106e26(_0x297c73){const _0x1d2606=[new window[(_0x1f3dce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ae3af=>setTimeout(_0x3ae3af,0x2fcc16bc^_0x80e084)),_0x325c9d[_0x1f3dce([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1f3dce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2cfcd8=>{let _0x309d72=0x0;_0x3627ae[_0x1f3dce([0x6d,0x6f,0x64,0x65,0x6c])][_0x1f3dce([0x6f,0x6e])](_0x1f3dce([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x394ecc,_0x68abb8)=>{_0x68abb8[0x0][_0x1f3dce([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x309d72++,_0x309d72==(0x2fc52988^_0x80e084)&&(_0x2cfcd8(),_0x394ecc[_0x1f3dce([0x6f,0x66,0x66])]());});}))];return window[_0x1f3dce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1f3dce([0x72,0x61,0x63,0x65])](_0x1d2606)[_0x1f3dce([0x74,0x68,0x65,0x6e])](()=>_0x297c73);}async function _0x343c8e(){await _0x325c9d,_0x3627ae[_0x1f3dce([0x6d,0x6f,0x64,0x65,0x6c])][_0x1f3dce([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5bcfb7,_0x3627ae[_0x1f3dce([0x6d,0x6f,0x64,0x65,0x6c])][_0x1f3dce([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5bcfb7,_0x3627ae[_0x1f3dce([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1f3dce([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xb53639(_0x2be4c9){const _0x228a09=_0x1862ce();_0x3627ae[_0x228a09]=_0x1f3dce([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2be4c9,_0x2be4c9!=_0x1f3dce([0x56,0x61,0x6c,0x69,0x64])&&_0x343c8e();}function _0x1862ce(){const _0x34b74e=window[_0x1f3dce([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1f3dce([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1f3dce([0x6e,0x6f,0x77])]())[_0x1f3dce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1f3dce([0x2e]),'');let _0x16bdf1=_0x1f3dce([0x41]);for(let _0xcd9b63=0x0;_0xcd9b63<_0x34b74e[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcd9b63+=0x2){let _0x94c516=window[_0x1f3dce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34b74e[_0x1f3dce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xcd9b63,_0xcd9b63+0x2));_0x94c516>=_0xf3819c[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x94c516-=_0xf3819c[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x16bdf1+=_0xf3819c[_0x94c516];}return _0x16bdf1;}function _0x22bc1a(){const _0x3f411d=_0xa888de[_0x1f3dce([0x73,0x70,0x6c,0x69,0x74])](_0x1f3dce([0x2e]));if(0x3!=_0x3f411d[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5dcaba(_0x3f411d[0x1]);function _0x5dcaba(_0xd4861f){const _0x60e706=_0x3b44b6(_0xd4861f);return _0x60e706&&_0x3f18a9()?_0x60e706:null;function _0x3f18a9(){const _0x7280e7=_0x60e706[_0x1f3dce([0x6a,0x74,0x69])],_0x5846c8=window[_0x1f3dce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x7280e7[_0x1f3dce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x7280e7[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1a7b2d={..._0x60e706,[_0x1f3dce([0x6a,0x74,0x69])]:_0x7280e7[_0x1f3dce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x7280e7[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1a7b2d[_0x1f3dce([0x76,0x63])],_0x1a5968(_0x1a7b2d)==_0x5846c8;}}}async function _0x49f40d(){let _0x3d0379=!0x0;try{const _0x313785=_0xa888de[_0x1f3dce([0x73,0x70,0x6c,0x69,0x74])](_0x1f3dce([0x2e])),[_0x55b8f2,_0x39130a,_0x518404]=_0x313785;return _0x16644e(_0x55b8f2),await _0x291042(_0x55b8f2,_0x39130a,_0x518404),_0x3d0379;}catch{return!0x1;}function _0x16644e(_0x42989b){const _0x4b8055=_0x3b44b6(_0x42989b);_0x4b8055&&_0x4b8055[_0x1f3dce([0x61,0x6c,0x67])]==_0x1f3dce([0x45,0x53,0x32,0x35,0x36])||(_0x3d0379=!0x1);}async function _0x291042(_0x3d54d8,_0x18179d,_0x1a35f1){const _0x5f139d=window[_0x1f3dce([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1f3dce([0x66,0x72,0x6f,0x6d])](_0x436502(_0x1a35f1),_0x3c321e=>_0x3c321e[_0x1f3dce([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x442667=new window[(_0x1f3dce([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1f3dce([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3d54d8+_0x1f3dce([0x2e])+_0x18179d),_0x3a7ec4=window[_0x1f3dce([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1f3dce([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3a7ec4)return;const _0x1a692d=await _0x3a7ec4[_0x1f3dce([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1f3dce([0x6a,0x77,0x6b]),_0x3d0cfd,{[_0x1f3dce([0x6e,0x61,0x6d,0x65])]:_0x1f3dce([0x45,0x43,0x44,0x53,0x41]),[_0x1f3dce([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1f3dce([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1f3dce([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3a7ec4[_0x1f3dce([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1f3dce([0x6e,0x61,0x6d,0x65])]:_0x1f3dce([0x45,0x43,0x44,0x53,0x41]),[_0x1f3dce([0x68,0x61,0x73,0x68])]:{[_0x1f3dce([0x6e,0x61,0x6d,0x65])]:_0x1f3dce([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1a692d,_0x5f139d,_0x442667)||(_0x3d0379=!0x1);}}function _0x3b44b6(_0x2a0ea7){return _0x2a0ea7[_0x1f3dce([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1f3dce([0x65,0x79]))?JSON[_0x1f3dce([0x70,0x61,0x72,0x73,0x65])](_0x436502(_0x2a0ea7)):null;}function _0x436502(_0x39dcb3){return window[_0x1f3dce([0x61,0x74,0x6f,0x62])](_0x39dcb3[_0x1f3dce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1f3dce([0x2b]))[_0x1f3dce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1f3dce([0x2f])));}function _0x1a5968(_0xf2d9fd){let _0x2b0140=0x1505;function _0x30fdad(_0x447371){for(let _0x56eece=0x0;_0x56eece<_0x447371[_0x1f3dce([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x56eece++){const _0x57c63e=_0x447371[_0x1f3dce([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x56eece);_0x2b0140=(_0x2b0140<<0x5)+_0x2b0140+_0x57c63e,_0x2b0140&=_0x2b0140;}}function _0x5a0933(_0x29912e){Array[_0x1f3dce([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x29912e)?_0x29912e[_0x1f3dce([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5a0933):_0x29912e&&typeof _0x29912e==_0x1f3dce([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1f3dce([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x29912e)[_0x1f3dce([0x73,0x6f,0x72,0x74])]()[_0x1f3dce([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x308190,_0x14cd8c])=>{_0x30fdad(_0x308190),_0x5a0933(_0x14cd8c);}):_0x30fdad(window[_0x1f3dce([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x29912e));}return _0x5a0933(_0xf2d9fd),_0x2b0140>>>0x0;}function _0x1ee024(_0x1d1697){return _0x1d1697[_0x1f3dce([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1f3dce([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1f3dce([0x30]));}function _0xa68cf6(_0x333ea7){return _0x333ea7[_0x1f3dce([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1f3dce([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1f3dce([0x6a,0x6f,0x69,0x6e])]('');}function _0x5bcfb7(){}function _0x1f3dce(_0x5904f7){return _0x5904f7['map'](_0x4ad573=>String['fromCharCode'](_0x4ad573))['join']('');}_0xb53639(await _0x3e4df4());}(this);}['_initSchema'](){const _0x37aebd=this['editor']['model']['schema'];_0x37aebd['isRegistered']('imageBlock')&&_0x37aebd['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x37aebd['isRegistered']('imageInline')&&_0x37aebd['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x1842e0=this['editor'];_0x1842e0['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x1842e0['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x2b2bcd=>_0x2b2bcd['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1c8fe5=_0x1842e0['commands']['get']('replaceImageSource');_0x1c8fe5&&this['listenTo'](_0x1c8fe5,'cleanupImage',(_0xf651e2,[_0x11beaf,_0x163ab8])=>{_0x11beaf['removeAttribute']('uploadcareImageId',_0x163ab8);});}['_initConfig'](){const _0x4fa218=this['editor']['config']['get']('uploadcare.uploader')||{},_0xf1f7ad=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x78e887(_0x4bdf66['document'],'uc-config',{..._0x4fa218,'pubkey':_0xf1f7ad,'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']=_0x272791=>{if('closeMax'==_0x272791)return'#uc-icon-arrow-down';},_0x4bdf66['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x78e887(_0x4bdf66['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x4bdf66['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x3619e7=this['editor']['commands']['get']('insertImage');_0x3619e7&&this['listenTo'](_0x3619e7,'execute',()=>{const _0x49df8d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x49df8d&&_0x49df8d['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x49df8d);});});const _0x20fc5c=this['editor']['commands']['get']('uploadcareImageReplace');_0x20fc5c&&this['listenTo'](_0x20fc5c,'execute',()=>{const _0x38e5b6=this['editor']['model']['document']['selection']['getSelectedElement']();_0x38e5b6&&_0x38e5b6['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x38e5b6);});});}}class tt extends _0x2c88ff{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x416071){super(_0x416071),_0x416071['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x30c460['defineComponents'](_0x30c460);}}class ii extends _0x258d69{constructor(_0x5a864c){super(_0x5a864c);const t=_0x5a864c['t'],_0x50e0f3=this['bindTemplate'],_0x45b863=new _0x12a9ea();_0x45b863['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':[_0x45b863,{'text':_0x50e0f3['to']('imageUploadProgress',_0x327583=>t('Loading\x20image...')+'\x20('+(_0x327583||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 ti extends _0x258d69{constructor(_0x5b0f6d){super(_0x5b0f6d);const t=_0x5b0f6d['t'];this['set']('errorType',null);const _0x25fe25=new _0x2b5452(_0x5b0f6d);_0x25fe25['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x25fe25['withText']=!0x0,_0x25fe25['class']='ck-button-action',_0x25fe25['on']('execute',()=>{this['fire']('retry');}),_0x25fe25['bind']('isVisible')['to'](this,'errorType',_0x56cadf=>'NotFound'!==_0x56cadf);const _0x3e2bf2=new _0x34ba7c();_0x3e2bf2['content']=_0x352e5d,_0x3e2bf2['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4f00a4=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':[_0x3e2bf2,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4f00a4['to']('errorType',_0x1fa22f=>t('NotFound'!==_0x1fa22f?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x25fe25]},{'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 ei extends _0x258d69{constructor(_0x1f6e70,_0x323b21){super(_0x1f6e70);const _0x1ea940=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x323b21,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x1ea940['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x31bba4,_0x6d41b6,_0x3f92d6){super(_0x31bba4),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x31bba4),this['_errorView']=new ti(_0x31bba4),this['_editingView']=new ei(_0x31bba4,_0x3f92d6),this['_focusableView']=new _0x258d69(_0x31bba4),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x6d41b6),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'],_0x11ed1b=>{this['_addUploadcareImageEditorListeners'](_0x11ed1b);});}),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'](_0x2f1d0b,_0x34a416){const _0x27af11='uc-cloud-image-editor',_0x143422=_0x2f1d0b['querySelector'](_0x27af11);if(_0x143422)return _0x34a416(_0x143422);const _0x2e610d=new MutationObserver(_0x4975ff=>{const _0xbfab26=_0x4975ff['filter'](_0xa6d2f2=>_0xa6d2f2['target']===_0x2f1d0b&&_0xa6d2f2['addedNodes']['length']>0x0&&_0xa6d2f2['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x27af11);_0xbfab26['length']&&(_0x2e610d['disconnect'](),_0x34a416(_0xbfab26[0x0]['addedNodes'][0x0]));});_0x2e610d['observe'](_0x2f1d0b,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x58da77){_0x58da77['addEventListener']('apply',_0x840c51=>{this['fire']('apply',{'imageSrc':_0x840c51['detail']['cdnUrl']});}),_0x58da77['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
+ _0x5482f1(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4ff08f,_0x133368,_0xca5446){super(),this['_editor']=_0x4ff08f,this['_dialog']=_0x133368,this['_imageElement']=_0xca5446,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 _0x1b8b1a=this['_imageElement'],_0x314d48=_0x1b8b1a['getAttribute']('uploadcareImageId'),_0x55b98b=_0x1b8b1a['getAttribute']('src');if(_0x314d48)await this['_loadImageInfo'](_0x314d48,_0x55b98b);else{if(this['_imageCache']['has'](_0x55b98b)){const _0x527a22=this['_imageCache']['get'](_0x55b98b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x527a22['url'],this['imageDimension']=_0x527a22['dimension'],this['imageId']=_0x527a22['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2563bc}=this['_editor'],t=_0x2563bc['t'],_0x5a5907=new X(_0x2563bc,this['imageStatus'],this['_attributes']);_0x5a5907['bind']('status')['to'](this,'imageStatus'),_0x5a5907['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5a5907['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5a5907['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5a5907,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x9dea16,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5a5907,'position':_0x12813e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5a5907['focus']();},'onHide':()=>{_0x5a5907['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1329af=>!S(_0x1329af,_0x5a5907['element'])}});}['_loadImageInfo'](_0x32463d,_0x288726){return j['getInfo'](_0x32463d,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x3dc01a=>{const {width:_0x1b1862,height:_0x3d57b5}=_0x3dc01a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x288726,this['imageDimension']={'width':_0x1b1862,'height':_0x3d57b5},this['imageId']=_0x32463d;})['catch'](_0x4d681d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4d681d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1acd65,_0x2d5425){return this['_getImageAsFile'](_0x1acd65)['then'](_0x42e9d4=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x2d5425['signal'],'file':_0x42e9d4,'onProgress':_0x46b602=>{_0x46b602&&_0x46b602['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x46b602['value']));}}))['then'](_0x582de6=>{const {width:_0x21c9ed,height:_0x5e2c25}=_0x582de6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x582de6['cdnUrl'],this['imageDimension']={'width':_0x21c9ed,'height':_0x5e2c25},this['imageId']=_0x582de6['uuid'],this['imageUploadProgress']=null;const _0x818f99=_0x1acd65['getAttribute']('src');this['_imageCache']['set'](_0x818f99,{'id':_0x582de6['uuid'],'url':_0x582de6['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x30ac1a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x30ac1a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3f75b7,_0x38ccb7){_0x3f75b7['on']('apply',(_0x21e94e,_0x108169)=>{this['_replaceImage'](_0x38ccb7,_0x108169['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3f75b7['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3f75b7['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x154e66,_0x105195,_0x38004d){const _0x573bd9=this['_editor'],{width:_0x4e6e6f,height:_0x25c55d}=C(_0x105195,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x2f292b,imageSources:_0x2f3e8d}=k(_0x105195,_0x4e6e6f);_0x573bd9['model']['change'](_0x44fb5b=>{if('$graveyard'===_0x154e66['root']['rootName']){_0x573bd9['execute']('insertImage',{'imageType':_0x154e66['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x154e66['getAttributes']()),'uploadcareImageId':_0x38004d,'src':_0x2f292b,'sources':_0x2f3e8d,'width':_0x4e6e6f,'height':_0x25c55d}});const _0x9b60da=_0x154e66['getChildren']();_0x154e66=_0x573bd9['model']['document']['selection']['getSelectedElement']();for(const _0xae6da1 of _0x9b60da)_0x44fb5b['append'](_0x44fb5b['cloneElement'](_0xae6da1),_0x154e66);}else _0x44fb5b['setSelection'](_0x154e66,'on'),_0x573bd9['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x154e66['getAttributes']()),'uploadcareImageId':_0x38004d,'src':_0x2f292b,'sources':_0x2f3e8d,'width':_0x4e6e6f,'height':_0x25c55d},_0x154e66);_0x44fb5b['setSelection'](_0x154e66,'on');});}async['_getImageAsFile'](_0x58c75f){const _0x333231=_0x4bdf66['window'],_0x1f1b36=_0x4bdf66['document']['location']['href'],_0x2aa39b=new _0x333231['URL'](_0x58c75f['getAttribute']('src'),_0x1f1b36);if('data:'===_0x2aa39b['protocol']){const _0x46f1f9=_0x2aa39b['href']['split'](','),_0x4a9399=_0x46f1f9[0x0]['match'](/:(.*?);/)[0x1],_0x4cc36a=_0x4a9399['split']('/')[0x1],_0x24805c=_0x333231['atob'](_0x46f1f9[_0x46f1f9['length']-0x1]);let _0x4f7ea7=_0x24805c['length'];const _0x51203a=new _0x333231['Uint8Array'](_0x4f7ea7);for(;_0x4f7ea7--;)_0x51203a[_0x4f7ea7]=_0x24805c['charCodeAt'](_0x4f7ea7);return new _0x333231['File']([_0x51203a],'image.'+_0x4cc36a,{'type':_0x4a9399});}const _0x4c5751=_0x2aa39b['href']['split']('/'),_0x14b64a=_0x4c5751[_0x4c5751['length']-0x1],_0x1d009b=_0x14b64a['split']('.')[0x1];return _0x333231['fetch'](_0x2aa39b['href'])['then'](_0x197d16=>_0x197d16['clone']()['blob']())['then'](_0x332eac=>new _0x333231['File']([_0x332eac],_0x14b64a,{'type':'image/'+_0x1d009b}));}}class O extends _0x5d4826{['imageEditController'];static get['requires'](){return[_0x48111a];}['_isEditable'];constructor(_0x3a56b8){super(_0x3a56b8),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x3ba4d3){const _0x1458d7=G(_0x3ba4d3);return _0x11b25d=>!(!_0x11b25d||!_0x11b25d['is']('element','imageBlock')&&!_0x11b25d['is']('element','imageInline'))&&(!!_0x11b25d['hasAttribute']('uploadcareImageId')||!!_0x11b25d['hasAttribute']('src')&&_0x1458d7(_0x11b25d['getAttribute']('src')));}(_0x3a56b8['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0xe7e696=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0xe7e696);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x49a594=this['editor']['model']['document']['selection']['getSelectedElement']();_0x49a594&&(_0x49a594['is']('element','imageBlock')||_0x49a594['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x48111a),_0x49a594),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x5d4826{['refresh'](){const _0x540267=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x540267&&(_0x540267['is']('element','imageBlock')||_0x540267['is']('element','imageInline')));}['execute'](_0x4fef36){const _0x511013=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5b58ca=>{_0x5b58ca['setAttributes'](_0x4fef36,_0x511013),_0x5b58ca['removeAttribute']('srcset',_0x511013),_0x5b58ca['removeAttribute']('sizes',_0x511013);});}}class m extends _0x2c88ff{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x4d24c3,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2400df}=this;_0x2400df['commands']['add']('uploadcareImageEdit',new O(_0x2400df)),_0x2400df['commands']['add']('uploadcareImageReplace',new R(_0x2400df));}}class g extends _0x2c88ff{['_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 _0x43a634=this['editor'];_0x43a634['ui']['componentFactory']['add']('uploadcareImageEdit',_0x73a36b=>{const _0x393d28=_0x43a634['commands']['get']('uploadcareImageEdit'),_0x3f057b=new _0x2b5452(_0x73a36b),t=_0x73a36b['t'];return _0x3f057b['set']({'icon':_0x9dea16,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x3f057b['bind']('isEnabled')['to'](_0x393d28),_0x3f057b['bind']('isOn')['to'](_0x393d28,'isActive'),this['listenTo'](_0x3f057b,'execute',()=>{_0x43a634['execute']('uploadcareImageEdit'),_0x43a634['editing']['view']['focus']();}),_0x3f057b;}),this['_initConfig']();}['_initConfig'](){const _0x4d0504=_0x78e887(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4d0504),this['listenTo'](this['editor'],'destroy',()=>{_0x4d0504['remove']();});}}class et extends _0x2c88ff{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "0.0.0-nightly-20250618.0",
3
+ "version": "0.0.0-nightly-20250619.0",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,14 +23,14 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-20250618.0",
27
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250618.0",
28
- "@ckeditor/ckeditor5-image": "0.0.0-nightly-20250618.0",
29
- "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20250618.0",
30
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250618.0",
31
- "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20250618.0",
32
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250618.0",
33
- "ckeditor5": "0.0.0-nightly-20250618.0",
26
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-20250619.0",
27
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250619.0",
28
+ "@ckeditor/ckeditor5-image": "0.0.0-nightly-20250619.0",
29
+ "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20250619.0",
30
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250619.0",
31
+ "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20250619.0",
32
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250619.0",
33
+ "ckeditor5": "0.0.0-nightly-20250619.0",
34
34
  "@uploadcare/file-uploader": "1.16.3-alpha.0",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5a7dd5=_0x5dc1;(function(_0x1bd708,_0x5cdbaf){const _0x59a980=_0x5dc1,_0x544da3=_0x1bd708();while(!![]){try{const _0xe7f43=-parseInt(_0x59a980(0x1a4))/0x1+parseInt(_0x59a980(0x17c))/0x2+parseInt(_0x59a980(0x19c))/0x3*(-parseInt(_0x59a980(0x178))/0x4)+parseInt(_0x59a980(0x183))/0x5+parseInt(_0x59a980(0x168))/0x6*(-parseInt(_0x59a980(0x195))/0x7)+parseInt(_0x59a980(0x1a3))/0x8*(parseInt(_0x59a980(0x18d))/0x9)+parseInt(_0x59a980(0x170))/0xa;if(_0xe7f43===_0x5cdbaf)break;else _0x544da3['push'](_0x544da3['shift']());}catch(_0x3f0b70){_0x544da3['push'](_0x544da3['shift']());}}}(_0xe0c8,0x65e32));import{Plugin as _0x272503}from'ckeditor5/src/core.js';function _0x5dc1(_0x43d2bc,_0x4afc10){const _0xe0c83b=_0xe0c8();return _0x5dc1=function(_0x5dc14,_0x5d4486){_0x5dc14=_0x5dc14-0x15e;let _0x7cb58f=_0xe0c83b[_0x5dc14];return _0x7cb58f;},_0x5dc1(_0x43d2bc,_0x4afc10);}function _0xe0c8(){const _0x4c9fb1=['extend','\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','getAttribute','1325088uhIScl','isOfficialPlugin','editing','input[uploadcare-file-input]','schema','iconHrefResolver','imageBlock','1399370HmSKoR','_ctxElement','cleanupImage','imageInline','_initConfig','editor','requires','once','init','uploadcareImageId','9DwNwhx','uc-upload-ctx-provider','body','afterInit','isPremiumPlugin','render','#uc-icon-arrow-down','data-uc-image-id','7903eWrMaa','PictureEditing','ctxElement','true','downcast','join','_configElement','1857kASNmj','document','uc-config','_initConversion','insertImage','uploadcare.pubkey','attributeToAttribute','307112tsnMwT','774398TlYMTn','getSelectedElement','configElement','destroy','replaceImageSource','map','add','pluginName','ucContextId','view','_initCtx','uploadcareImageReplace','for','conversion','uploadcare.uploader','href','uploadcare','_initImageProcessingIndicator','model','locale','fromCharCode','config','querySelector','remove','UploadcareEditing','2808tcLoLE','isRegistered','commands','upcast','contentLanguage','selection','uploader-','get','13347710WRviWW','listenTo','closeMax','_initSchema','appendChild','removeAttribute','execute','elementToAttribute','3848iKJMue'];_0xe0c8=function(){return _0x4c9fb1;};return _0xe0c8();}import{Dialog as _0xc10aa}from'ckeditor5/src/ui.js';import{createElement as _0x84b03b,global as _0x46391f,uid as _0x1ace9c}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x36cbef}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x53e7be}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x10ad1b}from'./utils/editingutils.js';export class UploadcareEditing extends _0x272503{[_0x5a7dd5(0x19b)]=null;[_0x5a7dd5(0x184)]=null;static get[_0x5a7dd5(0x1ab)](){const _0x69944f=_0x5a7dd5;return _0x69944f(0x167);}static get[_0x5a7dd5(0x189)](){const _0x4f9db0=_0x5a7dd5;return[_0x4f9db0(0x196),_0x53e7be,_0xc10aa];}static get[_0x5a7dd5(0x17d)](){return!0x0;}static get[_0x5a7dd5(0x191)](){return!0x0;}[_0x5a7dd5(0x1ac)];get[_0x5a7dd5(0x1a6)](){const _0x108017=_0x5a7dd5;return this[_0x108017(0x19b)];}get[_0x5a7dd5(0x197)](){const _0x1c375a=_0x5a7dd5;return this[_0x1c375a(0x184)];}constructor(_0x49a582){const _0x46ab97=_0x5a7dd5;super(_0x49a582),this[_0x46ab97(0x1ac)]=_0x1ace9c();}[_0x5a7dd5(0x18b)](){const _0x2df1d5=_0x5a7dd5,_0x423aee=this[_0x2df1d5(0x188)];_0x423aee[_0x2df1d5(0x16a)][_0x2df1d5(0x1aa)](_0x2df1d5(0x15f),new _0x36cbef(_0x423aee));}[_0x5a7dd5(0x190)](){const _0x13960b=_0x5a7dd5;this[_0x13960b(0x173)](),this[_0x13960b(0x19f)](),this[_0x13960b(0x187)](),this[_0x13960b(0x1ae)](),this[_0x13960b(0x160)](),this[_0x13960b(0x171)](this[_0x13960b(0x188)],_0x13960b(0x1a7),()=>{const _0x32e5bf=_0x13960b;this[_0x32e5bf(0x19b)]&&(this[_0x32e5bf(0x19b)][_0x32e5bf(0x166)](),this[_0x32e5bf(0x19b)]=null),this[_0x32e5bf(0x184)]&&(this[_0x32e5bf(0x184)][_0x32e5bf(0x166)](),this[_0x32e5bf(0x184)]=null);const _0xa9a1f=_0x46391f[_0x32e5bf(0x19d)][_0x32e5bf(0x165)](_0x32e5bf(0x17f));_0xa9a1f&&_0xa9a1f[_0x32e5bf(0x166)]();}),async function(_0xa09db6){const _0x4edc2c=_0x54ce0e([0x53,0x4a,0x71,0x63,0x57,0x72,0x58,0x6a,0x56,0x79,0x45,0x70,0x4d,0x6f,0x39,0x67,0x61,0x69,0x48,0x64,0x73,0x31,0x33,0x6d,0x32,0x51,0x77,0x75,0x66,0x5a,0x50,0x38,0x55,0x4b,0x65,0x59,0x4e,0x68,0x52,0x62,0x37,0x44,0x54,0x4f,0x6b,0x47,0x6e,0x43,0x30,0x46,0x76,0x6c,0x34,0x49,0x42,0x78,0x41,0x4c,0x36,0x35,0x74,0x7a]),_0x1406ac=0x667c0cb1,_0x28e463=0x667b67a9^_0x1406ac,_0x18556f=window[_0x54ce0e([0x44,0x61,0x74,0x65])][_0x54ce0e([0x6e,0x6f,0x77])](),_0x1874b6=_0xa09db6[_0x54ce0e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x51e4ea=new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b8652=>{_0x1874b6[_0x54ce0e([0x6f,0x6e,0x63,0x65])](_0x54ce0e([0x72,0x65,0x61,0x64,0x79]),_0x3b8652);}),_0x3c74fa={[_0x54ce0e([0x6b,0x74,0x79])]:_0x54ce0e([0x45,0x43]),[_0x54ce0e([0x75,0x73,0x65])]:_0x54ce0e([0x73,0x69,0x67]),[_0x54ce0e([0x63,0x72,0x76])]:_0x54ce0e([0x50,0x2d,0x32,0x35,0x36]),[_0x54ce0e([0x78])]:_0x54ce0e([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]),[_0x54ce0e([0x79])]:_0x54ce0e([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]),[_0x54ce0e([0x61,0x6c,0x67])]:_0x54ce0e([0x45,0x53,0x32,0x35,0x36])},_0x110fbe=_0x1874b6[_0x54ce0e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x54ce0e([0x67,0x65,0x74])](_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3b83c6(){let _0xfc02fd,_0x1051f3=null,_0x3f43b8=null;try{if(_0x110fbe==_0x54ce0e([0x47,0x50,0x4c]))return _0x54ce0e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xfc02fd=_0x1aad2f(),!_0xfc02fd)return _0x54ce0e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xfc02fd[_0x54ce0e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3f43b8=_0x28d911(_0xfc02fd[_0x54ce0e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xfc02fd[_0x54ce0e([0x6a,0x74,0x69])])),await _0x1d49ac()?_0x208176()?_0x5eeaeb()?_0x54ce0e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x11885c()?(_0xfc02fd[_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x54ce0e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1051f3=_0x62721c(_0x54ce0e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xfc02fd[_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x54ce0e([0x74,0x72,0x69,0x61,0x6c])&&(_0x1051f3=_0x62721c(_0x54ce0e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x13d78c()):_0x54ce0e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x54ce0e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x54ce0e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x54ce0e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5eeaeb(){const _0x1d972a=[_0x54ce0e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x54ce0e([0x74,0x72,0x69,0x61,0x6c])][_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xfc02fd[_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x18556f/0x3e8:0xe10*_0x28e463;return _0xfc02fd[_0x54ce0e([0x65,0x78,0x70])]<_0x1d972a;}function _0x208176(){const _0x556374=_0xfc02fd[_0x54ce0e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x556374&&(!!_0x556374[_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54ce0e([0x2a]))||!!_0x556374[_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54ce0e([0x55,0x50,0x4c,0x43])));}function _0x11885c(){const _0x4e9b93=_0x5dc1,_0x1f9a2e=_0xfc02fd[_0x54ce0e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1f9a2e||0x0==_0x1f9a2e[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5d2892}=new URL(window[_0x54ce0e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4e9b93(0x15e)]);if(_0x1f9a2e[_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d2892))return!0x0;const _0x2044ed=_0x5d2892[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])](_0x54ce0e([0x2e]));return _0x1f9a2e[_0x54ce0e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5f3444=>_0x5f3444[_0x54ce0e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54ce0e([0x2a])))[_0x54ce0e([0x6d,0x61,0x70])](_0x36c17e=>_0x36c17e[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])](_0x54ce0e([0x2e])))[_0x54ce0e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x389fa0=>_0x389fa0[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2044ed[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x54ce0e([0x6d,0x61,0x70])](_0x2111ce=>Array(_0x2044ed[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2111ce[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x54ce0e([0x66,0x69,0x6c,0x6c])](_0x2111ce[0x0]===_0x54ce0e([0x2a])?_0x54ce0e([0x2a]):'')[_0x54ce0e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2111ce))[_0x54ce0e([0x73,0x6f,0x6d,0x65])](_0x12a855=>_0x2044ed[_0x54ce0e([0x65,0x76,0x65,0x72,0x79])]((_0x1a360d,_0x47e1d6)=>_0x12a855[_0x47e1d6]===_0x1a360d||_0x12a855[_0x47e1d6]===_0x54ce0e([0x2a])));}function _0x13d78c(){return _0x1051f3&&_0x3f43b8?new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x42a728,_0x10164a)=>{_0x1051f3[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x42a728,_0x10164a),_0x3f43b8[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x4beb6c=>{_0x4beb6c!=_0x54ce0e([0x56,0x61,0x6c,0x69,0x64])&&_0x42a728(_0x4beb6c);},_0x10164a);}):_0x1051f3||_0x3f43b8||_0x54ce0e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x28d911(_0x2a8275,_0x41e2cc){return new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e7801=>{if(_0x2e1465())return _0x5e7801(_0x54ce0e([0x56,0x61,0x6c,0x69,0x64]));_0x1ec411(),_0x1874b6[_0x54ce0e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x54ce0e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x523f77=!0x1;const _0x44ebcc=_0x1ace9c();function _0x55600c(_0x1a7d4c){return!!_0x1a7d4c&&(typeof _0x1a7d4c===_0x54ce0e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1a7d4c===_0x54ce0e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1a7d4c[_0x54ce0e([0x74,0x68,0x65,0x6e])]===_0x54ce0e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1a7d4c[_0x54ce0e([0x63,0x61,0x74,0x63,0x68])]===_0x54ce0e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4081e2(_0x1190c2){_0x3f6405(_0x1190c2)[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x3ebdfe=>{if(!_0x3ebdfe||_0x3ebdfe[_0x54ce0e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x54ce0e([0x6f,0x6b]))return _0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x572547(_0x3842bf(_0x44ebcc+_0x41e2cc))!=_0x3ebdfe[_0x54ce0e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x54ce0e([0x56,0x61,0x6c,0x69,0x64]);})[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x5cea00=>(_0xfcf1aa(),_0x5cea00),()=>{const _0x5c0b1c=_0x559504();return null==_0x5c0b1c?(_0xfcf1aa(),_0x54ce0e([0x56,0x61,0x6c,0x69,0x64])):_0x54ce0e(_0x18556f-_0x5c0b1c>(0x427088b1^_0x1406ac)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x5e7801)[_0x54ce0e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5e7801(_0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d8b09=0x664ae231^_0x1406ac;function _0xfcf1aa(){const _0x1faab9=_0x54ce0e([0x6c,0x6c,0x63,0x74,0x2d])+_0x572547(_0x3842bf(_0x2a8275)),_0x166c43=_0x372c57(_0x572547(window[_0x54ce0e([0x4d,0x61,0x74,0x68])][_0x54ce0e([0x63,0x65,0x69,0x6c])](_0x18556f/_0x3d8b09)));window[_0x54ce0e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x54ce0e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1faab9,_0x166c43);}function _0x559504(){const _0xb21b66=_0x54ce0e([0x6c,0x6c,0x63,0x74,0x2d])+_0x572547(_0x3842bf(_0x2a8275)),_0x43c203=window[_0x54ce0e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x54ce0e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xb21b66);return _0x43c203?window[_0x54ce0e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x372c57(_0x43c203),0x10)*_0x3d8b09:null;}function _0x3f6405(_0x4e8532){return new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x24fda3,_0x29aa3d)=>{_0x4e8532[_0x54ce0e([0x74,0x68,0x65,0x6e])](_0x24fda3,_0x29aa3d),window[_0x54ce0e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x29aa3d,0x667dd871^_0x1406ac);});}}_0x1874b6[_0x54ce0e([0x6f,0x6e])](_0x54ce0e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2ebd66,_0x3ce862)=>{if(_0x3ce862[0x0]!=_0x2a8275)return _0x5e7801(_0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3ce862[0x1]={..._0x3ce862[0x1],[_0x54ce0e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x44ebcc};},{[_0x54ce0e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x54ce0e([0x68,0x69,0x67,0x68])}),_0x1874b6[_0x54ce0e([0x6f,0x6e])](_0x54ce0e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2db4ed=>{_0x55600c(_0x2db4ed[_0x54ce0e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x523f77=!0x0,_0x4081e2(_0x2db4ed[_0x54ce0e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x54ce0e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x54ce0e([0x6c,0x6f,0x77])}),_0x51e4ea[_0x54ce0e([0x74,0x68,0x65,0x6e])](()=>{_0x523f77||_0x5e7801(_0x54ce0e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2e1465(){return _0x1874b6[_0x54ce0e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x54ce0e([0x76,0x69,0x65,0x77])][_0x54ce0e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x54ce0e([0x61,0x75,0x74,0x6f]);}function _0x1ec411(){_0x1874b6[_0x54ce0e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x54ce0e([0x76,0x69,0x65,0x77])][_0x54ce0e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x54ce0e([0x61,0x75,0x74,0x6f]);}}function _0x62721c(_0x167fd5){const _0x134b03=[new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35e0d5=>setTimeout(_0x35e0d5,0x6675327d^_0x1406ac)),_0x51e4ea[_0x54ce0e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x34e365=>{let _0x3a5c2b=0x0;_0x1874b6[_0x54ce0e([0x6d,0x6f,0x64,0x65,0x6c])][_0x54ce0e([0x6f,0x6e])](_0x54ce0e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2c177d,_0x4576b7)=>{_0x4576b7[0x0][_0x54ce0e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3a5c2b++,_0x3a5c2b==(0x667c0d49^_0x1406ac)&&(_0x34e365(),_0x2c177d[_0x54ce0e([0x6f,0x66,0x66])]());});}))];return window[_0x54ce0e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x54ce0e([0x72,0x61,0x63,0x65])](_0x134b03)[_0x54ce0e([0x74,0x68,0x65,0x6e])](()=>_0x167fd5);}async function _0x397043(){await _0x51e4ea,_0x1874b6[_0x54ce0e([0x6d,0x6f,0x64,0x65,0x6c])][_0x54ce0e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xe5ce3d,_0x1874b6[_0x54ce0e([0x6d,0x6f,0x64,0x65,0x6c])][_0x54ce0e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xe5ce3d,_0x1874b6[_0x54ce0e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x54ce0e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x51a1a7(_0x127e8b){const _0xb77989=_0x199009();_0x1874b6[_0xb77989]=_0x54ce0e([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x127e8b,_0x127e8b!=_0x54ce0e([0x56,0x61,0x6c,0x69,0x64])&&_0x397043();}function _0x199009(){const _0x107158=window[_0x54ce0e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x54ce0e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x54ce0e([0x6e,0x6f,0x77])]())[_0x54ce0e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x54ce0e([0x2e]),'');let _0x584fc2=_0x54ce0e([0x53]);for(let _0x20cb34=0x0;_0x20cb34<_0x107158[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20cb34+=0x2){let _0x2cc33e=window[_0x54ce0e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x107158[_0x54ce0e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x20cb34,_0x20cb34+0x2));_0x2cc33e>=_0x4edc2c[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2cc33e-=_0x4edc2c[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x584fc2+=_0x4edc2c[_0x2cc33e];}return _0x584fc2;}function _0x1aad2f(){const _0x883913=_0x110fbe[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])](_0x54ce0e([0x2e]));if(0x3!=_0x883913[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x45b596(_0x883913[0x1]);function _0x45b596(_0x547b76){const _0x3833b6=_0x4b5710(_0x547b76);return _0x3833b6&&_0x529379()?_0x3833b6:null;function _0x529379(){const _0x31fad8=_0x3833b6[_0x54ce0e([0x6a,0x74,0x69])],_0x24030b=window[_0x54ce0e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x31fad8[_0x54ce0e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x31fad8[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3d1378={..._0x3833b6,[_0x54ce0e([0x6a,0x74,0x69])]:_0x31fad8[_0x54ce0e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x31fad8[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3d1378[_0x54ce0e([0x76,0x63])],_0x3842bf(_0x3d1378)==_0x24030b;}}}async function _0x1d49ac(){let _0x561133=!0x0;try{const _0x1c689d=_0x110fbe[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])](_0x54ce0e([0x2e])),[_0x2509c0,_0x533bf0,_0x4efafe]=_0x1c689d;return _0x2567bd(_0x2509c0),await _0x2bc7e5(_0x2509c0,_0x533bf0,_0x4efafe),_0x561133;}catch{return!0x1;}function _0x2567bd(_0x4d709a){const _0x4f3806=_0x4b5710(_0x4d709a);_0x4f3806&&_0x4f3806[_0x54ce0e([0x61,0x6c,0x67])]==_0x54ce0e([0x45,0x53,0x32,0x35,0x36])||(_0x561133=!0x1);}async function _0x2bc7e5(_0x3c7f5b,_0x420293,_0x1af55b){const _0x512608=window[_0x54ce0e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x54ce0e([0x66,0x72,0x6f,0x6d])](_0x3e3e9f(_0x1af55b),_0x48ecd6=>_0x48ecd6[_0x54ce0e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4d654b=new window[(_0x54ce0e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x54ce0e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3c7f5b+_0x54ce0e([0x2e])+_0x420293),_0x2540f6=window[_0x54ce0e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x54ce0e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2540f6)return;const _0x1361e0=await _0x2540f6[_0x54ce0e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x54ce0e([0x6a,0x77,0x6b]),_0x3c74fa,{[_0x54ce0e([0x6e,0x61,0x6d,0x65])]:_0x54ce0e([0x45,0x43,0x44,0x53,0x41]),[_0x54ce0e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x54ce0e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x54ce0e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2540f6[_0x54ce0e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x54ce0e([0x6e,0x61,0x6d,0x65])]:_0x54ce0e([0x45,0x43,0x44,0x53,0x41]),[_0x54ce0e([0x68,0x61,0x73,0x68])]:{[_0x54ce0e([0x6e,0x61,0x6d,0x65])]:_0x54ce0e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1361e0,_0x512608,_0x4d654b)||(_0x561133=!0x1);}}function _0x4b5710(_0x18d516){return _0x18d516[_0x54ce0e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x54ce0e([0x65,0x79]))?JSON[_0x54ce0e([0x70,0x61,0x72,0x73,0x65])](_0x3e3e9f(_0x18d516)):null;}function _0x3e3e9f(_0x5b43dc){return window[_0x54ce0e([0x61,0x74,0x6f,0x62])](_0x5b43dc[_0x54ce0e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x54ce0e([0x2b]))[_0x54ce0e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x54ce0e([0x2f])));}function _0x3842bf(_0x3a728f){let _0x4d7735=0x1505;function _0x4ce21f(_0x4a2948){for(let _0x27fa2f=0x0;_0x27fa2f<_0x4a2948[_0x54ce0e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x27fa2f++){const _0x57c45e=_0x4a2948[_0x54ce0e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x27fa2f);_0x4d7735=(_0x4d7735<<0x5)+_0x4d7735+_0x57c45e,_0x4d7735&=_0x4d7735;}}function _0x3fb9b2(_0x466381){Array[_0x54ce0e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x466381)?_0x466381[_0x54ce0e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3fb9b2):_0x466381&&typeof _0x466381==_0x54ce0e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x54ce0e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x466381)[_0x54ce0e([0x73,0x6f,0x72,0x74])]()[_0x54ce0e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1d50a4,_0x106548])=>{_0x4ce21f(_0x1d50a4),_0x3fb9b2(_0x106548);}):_0x4ce21f(window[_0x54ce0e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x466381));}return _0x3fb9b2(_0x3a728f),_0x4d7735>>>0x0;}function _0x572547(_0xd876a){return _0xd876a[_0x54ce0e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x54ce0e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x54ce0e([0x30]));}function _0x372c57(_0xf1666d){return _0xf1666d[_0x54ce0e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x54ce0e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x54ce0e([0x6a,0x6f,0x69,0x6e])]('');}function _0xe5ce3d(){}function _0x54ce0e(_0x4faaaa){const _0x23ffbc=_0x5dc1;return _0x4faaaa[_0x23ffbc(0x1a9)](_0x50c2fa=>String[_0x23ffbc(0x163)](_0x50c2fa))[_0x23ffbc(0x19a)]('');}_0x51a1a7(await _0x3b83c6());}(this);}[_0x5a7dd5(0x173)](){const _0x1ae2ce=_0x5a7dd5,_0x4c852d=this[_0x1ae2ce(0x188)][_0x1ae2ce(0x161)][_0x1ae2ce(0x180)];_0x4c852d[_0x1ae2ce(0x169)](_0x1ae2ce(0x182))&&_0x4c852d[_0x1ae2ce(0x179)](_0x1ae2ce(0x182),{'allowAttributes':[_0x1ae2ce(0x18c)]}),_0x4c852d[_0x1ae2ce(0x169)](_0x1ae2ce(0x186))&&_0x4c852d[_0x1ae2ce(0x179)](_0x1ae2ce(0x186),{'allowAttributes':[_0x1ae2ce(0x18c)]});}[_0x5a7dd5(0x19f)](){const _0x1cb3cb=_0x5a7dd5,_0xa88969=this[_0x1cb3cb(0x188)];_0xa88969[_0x1cb3cb(0x1b1)][_0x1cb3cb(0x1b0)](_0x1cb3cb(0x199))[_0x1cb3cb(0x1a2)]({'model':_0x1cb3cb(0x18c),'view':_0x1cb3cb(0x194)}),_0xa88969[_0x1cb3cb(0x1b1)][_0x1cb3cb(0x1b0)](_0x1cb3cb(0x16b))[_0x1cb3cb(0x177)]({'model':{'key':_0x1cb3cb(0x18c),'value':_0x538a9e=>_0x538a9e[_0x1cb3cb(0x17b)](_0x1cb3cb(0x194))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x528032=_0xa88969[_0x1cb3cb(0x16a)][_0x1cb3cb(0x16f)](_0x1cb3cb(0x1a8));_0x528032&&this[_0x1cb3cb(0x171)](_0x528032,_0x1cb3cb(0x185),(_0x4fee09,[_0x31c184,_0x3232b9])=>{const _0x113aee=_0x1cb3cb;_0x31c184[_0x113aee(0x175)](_0x113aee(0x18c),_0x3232b9);});}[_0x5a7dd5(0x187)](){const _0x5ddd2e=_0x5a7dd5,_0x2835a2=this[_0x5ddd2e(0x188)][_0x5ddd2e(0x164)][_0x5ddd2e(0x16f)](_0x5ddd2e(0x1b2))||{},_0x27bd6e=this[_0x5ddd2e(0x188)][_0x5ddd2e(0x164)][_0x5ddd2e(0x16f)](_0x5ddd2e(0x1a1))||'';this[_0x5ddd2e(0x19b)]=_0x84b03b(_0x46391f[_0x5ddd2e(0x19d)],_0x5ddd2e(0x19e),{..._0x2835a2,'pubkey':_0x27bd6e,'ctx-name':_0x5ddd2e(0x16e)+this[_0x5ddd2e(0x1ac)],'sourceList':'','imgOnly':_0x5ddd2e(0x198),'removeCopyright':_0x5ddd2e(0x198),'localeName':this[_0x5ddd2e(0x188)][_0x5ddd2e(0x162)][_0x5ddd2e(0x16c)],'externalSourcesEmbedCss':_0x5ddd2e(0x17a)}),this[_0x5ddd2e(0x19b)][_0x5ddd2e(0x181)]=_0x42aa27=>{const _0x180dba=_0x5ddd2e;if(_0x180dba(0x172)==_0x42aa27)return _0x180dba(0x193);},_0x46391f[_0x5ddd2e(0x19d)][_0x5ddd2e(0x18f)][_0x5ddd2e(0x174)](this[_0x5ddd2e(0x19b)]);}[_0x5a7dd5(0x1ae)](){const _0x23019d=_0x5a7dd5;this[_0x23019d(0x184)]=_0x84b03b(_0x46391f[_0x23019d(0x19d)],_0x23019d(0x18e),{'ctx-name':_0x23019d(0x16e)+this[_0x23019d(0x1ac)]}),_0x46391f[_0x23019d(0x19d)][_0x23019d(0x18f)][_0x23019d(0x174)](this[_0x23019d(0x184)]);}[_0x5a7dd5(0x160)](){const _0x465533=_0x5a7dd5,_0x3f4cac=this[_0x465533(0x188)][_0x465533(0x16a)][_0x465533(0x16f)](_0x465533(0x1a0));_0x3f4cac&&this[_0x465533(0x171)](_0x3f4cac,_0x465533(0x176),()=>{const _0x3785a2=_0x465533,_0x2cd4dd=this[_0x3785a2(0x188)][_0x3785a2(0x161)][_0x3785a2(0x19d)][_0x3785a2(0x16d)][_0x3785a2(0x1a5)]();_0x2cd4dd&&_0x2cd4dd[_0x3785a2(0x17b)](_0x3785a2(0x18c))&&this[_0x3785a2(0x188)][_0x3785a2(0x17e)][_0x3785a2(0x1ad)][_0x3785a2(0x18a)](_0x3785a2(0x192),()=>{const _0x2c0b4d=_0x3785a2;_0x10ad1b(this[_0x2c0b4d(0x188)],_0x2cd4dd);});});const _0x36d232=this[_0x465533(0x188)][_0x465533(0x16a)][_0x465533(0x16f)](_0x465533(0x1af));_0x36d232&&this[_0x465533(0x171)](_0x36d232,_0x465533(0x176),()=>{const _0x34cb1c=_0x465533,_0x161cb5=this[_0x34cb1c(0x188)][_0x34cb1c(0x161)][_0x34cb1c(0x19d)][_0x34cb1c(0x16d)][_0x34cb1c(0x1a5)]();_0x161cb5&&_0x161cb5[_0x34cb1c(0x17b)](_0x34cb1c(0x18c))&&this[_0x34cb1c(0x188)][_0x34cb1c(0x17e)][_0x34cb1c(0x1ad)][_0x34cb1c(0x18a)](_0x34cb1c(0x192),()=>{const _0x307716=_0x34cb1c;_0x10ad1b(this[_0x307716(0x188)],_0x161cb5);});});}}
23
+ const _0x4b3863=_0x214e;(function(_0xad4752,_0x4eef3a){const _0x17fb67=_0x214e,_0x5c9bfa=_0xad4752();while(!![]){try{const _0x59fddd=-parseInt(_0x17fb67(0xbc))/0x1+parseInt(_0x17fb67(0xec))/0x2+parseInt(_0x17fb67(0xb3))/0x3*(-parseInt(_0x17fb67(0xf5))/0x4)+parseInt(_0x17fb67(0xc9))/0x5*(-parseInt(_0x17fb67(0xc8))/0x6)+-parseInt(_0x17fb67(0xb2))/0x7*(-parseInt(_0x17fb67(0xf2))/0x8)+parseInt(_0x17fb67(0xc6))/0x9+parseInt(_0x17fb67(0xd8))/0xa;if(_0x59fddd===_0x4eef3a)break;else _0x5c9bfa['push'](_0x5c9bfa['shift']());}catch(_0x5f138b){_0x5c9bfa['push'](_0x5c9bfa['shift']());}}}(_0x2b67,0xb0eaa));function _0x2b67(){const _0x1804fe=['querySelector','execute','body','add','ctxElement','init','remove','_initSchema','11414439EbdJKd','_configElement','20226GJGUFW','865sFOkqd','\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','elementToAttribute','getSelectedElement','afterInit','uc-config','getAttribute','document','locale','_initConversion','selection','ucContextId','_initImageProcessingIndicator','view','map','10064610FlUxRz','contentLanguage','insertImage','uploadcareImageId','replaceImageSource','uploadcare','uploader-','schema','imageBlock','PictureEditing','input[uploadcare-file-input]','once','editing','get','href','removeAttribute','config','extend','appendChild','_initCtx','2142854ArkEBg','UploadcareEditing','editor','_ctxElement','closeMax','uploadcare.pubkey','9144UZuqUl','#uc-icon-arrow-down','listenTo','926556QwEHjR','true','data-uc-image-id','pluginName','isPremiumPlugin','imageInline','isRegistered','fromCharCode','configElement','uploadcareImageReplace','conversion','uc-upload-ctx-provider','downcast','model','join','_initConfig','cleanupImage','upcast','2975HaEEia','18BPBVrg','attributeToAttribute','for','render','uploadcare.uploader','iconHrefResolver','commands','isOfficialPlugin','destroy','1134267IRQSCL','requires'];_0x2b67=function(){return _0x1804fe;};return _0x2b67();}import{Plugin as _0x45134b}from'ckeditor5/src/core.js';function _0x214e(_0x3b322e,_0x206376){const _0x2b6776=_0x2b67();return _0x214e=function(_0x214ef3,_0x3b7679){_0x214ef3=_0x214ef3-0xb2;let _0x42ec81=_0x2b6776[_0x214ef3];return _0x42ec81;},_0x214e(_0x3b322e,_0x206376);}import{Dialog as _0x2884de}from'ckeditor5/src/ui.js';import{createElement as _0xa354a7,global as _0x111a30,uid as _0x40f7f4}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x222127}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x472b88}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x406f12}from'./utils/editingutils.js';export class UploadcareEditing extends _0x45134b{[_0x4b3863(0xc7)]=null;[_0x4b3863(0xef)]=null;static get[_0x4b3863(0xf8)](){const _0x267001=_0x4b3863;return _0x267001(0xed);}static get[_0x4b3863(0xbd)](){const _0x128370=_0x4b3863;return[_0x128370(0xe1),_0x472b88,_0x2884de];}static get[_0x4b3863(0xba)](){return!0x0;}static get[_0x4b3863(0xf9)](){return!0x0;}[_0x4b3863(0xd4)];get[_0x4b3863(0xfd)](){const _0x4d5092=_0x4b3863;return this[_0x4d5092(0xc7)];}get[_0x4b3863(0xc2)](){const _0x149375=_0x4b3863;return this[_0x149375(0xef)];}constructor(_0x4e02a8){const _0x363379=_0x4b3863;super(_0x4e02a8),this[_0x363379(0xd4)]=_0x40f7f4();}[_0x4b3863(0xc3)](){const _0x55086c=_0x4b3863,_0xb4b4c4=this[_0x55086c(0xee)];_0xb4b4c4[_0x55086c(0xb9)][_0x55086c(0xc1)](_0x55086c(0xdd),new _0x222127(_0xb4b4c4));}[_0x4b3863(0xcd)](){const _0x41980d=_0x4b3863;this[_0x41980d(0xc5)](),this[_0x41980d(0xd2)](),this[_0x41980d(0x104)](),this[_0x41980d(0xeb)](),this[_0x41980d(0xd5)](),this[_0x41980d(0xf4)](this[_0x41980d(0xee)],_0x41980d(0xbb),()=>{const _0x53c325=_0x41980d;this[_0x53c325(0xc7)]&&(this[_0x53c325(0xc7)][_0x53c325(0xc4)](),this[_0x53c325(0xc7)]=null),this[_0x53c325(0xef)]&&(this[_0x53c325(0xef)][_0x53c325(0xc4)](),this[_0x53c325(0xef)]=null);const _0x1b0705=_0x111a30[_0x53c325(0xd0)][_0x53c325(0xbe)](_0x53c325(0xe2));_0x1b0705&&_0x1b0705[_0x53c325(0xc4)]();}),async function(_0x429ffe){const _0x57044e=_0x63e864([0x38,0x31,0x41,0x74,0x45,0x42,0x58,0x56,0x4a,0x48,0x63,0x76,0x73,0x4d,0x59,0x6b,0x67,0x54,0x39,0x46,0x6f,0x64,0x43,0x50,0x35,0x44,0x4e,0x6c,0x72,0x7a,0x5a,0x51,0x55,0x6e,0x6d,0x33,0x36,0x77,0x6a,0x69,0x32,0x68,0x70,0x30,0x75,0x61,0x47,0x66,0x4f,0x71,0x52,0x78,0x57,0x62,0x34,0x79,0x4b,0x53,0x37,0x65,0x49,0x4c]),_0x1b89bd=0x2fc52870,_0x23a650=0x2fc24340^_0x1b89bd,_0x14d5fc=window[_0x63e864([0x44,0x61,0x74,0x65])][_0x63e864([0x6e,0x6f,0x77])](),_0x7838a0=_0x429ffe[_0x63e864([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2e5c64=new window[(_0x63e864([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x301d1a=>{_0x7838a0[_0x63e864([0x6f,0x6e,0x63,0x65])](_0x63e864([0x72,0x65,0x61,0x64,0x79]),_0x301d1a);}),_0x1c67bf={[_0x63e864([0x6b,0x74,0x79])]:_0x63e864([0x45,0x43]),[_0x63e864([0x75,0x73,0x65])]:_0x63e864([0x73,0x69,0x67]),[_0x63e864([0x63,0x72,0x76])]:_0x63e864([0x50,0x2d,0x32,0x35,0x36]),[_0x63e864([0x78])]:_0x63e864([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]),[_0x63e864([0x79])]:_0x63e864([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]),[_0x63e864([0x61,0x6c,0x67])]:_0x63e864([0x45,0x53,0x32,0x35,0x36])},_0x3b1df3=_0x7838a0[_0x63e864([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x63e864([0x67,0x65,0x74])](_0x63e864([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5e388f(){let _0xed3379,_0x12c84b=null,_0x46a6e7=null;try{if(_0x3b1df3==_0x63e864([0x47,0x50,0x4c]))return _0x63e864([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xed3379=_0x374999(),!_0xed3379)return _0x63e864([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xed3379[_0x63e864([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x46a6e7=_0x2b8261(_0xed3379[_0x63e864([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xed3379[_0x63e864([0x6a,0x74,0x69])])),await _0xf2ea7a()?_0x38fdbc()?_0x33131c()?_0x63e864([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x191c73()?(_0xed3379[_0x63e864([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x63e864([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x12c84b=_0x3f9ca3(_0x63e864([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xed3379[_0x63e864([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x63e864([0x74,0x72,0x69,0x61,0x6c])&&(_0x12c84b=_0x3f9ca3(_0x63e864([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x257d0a()):_0x63e864([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x63e864([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x63e864([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x63e864([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x33131c(){const _0x575ff3=[_0x63e864([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x63e864([0x74,0x72,0x69,0x61,0x6c])][_0x63e864([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xed3379[_0x63e864([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x14d5fc/0x3e8:0xe10*_0x23a650;return _0xed3379[_0x63e864([0x65,0x78,0x70])]<_0x575ff3;}function _0x38fdbc(){const _0x47037d=_0xed3379[_0x63e864([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x47037d&&(!!_0x47037d[_0x63e864([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x63e864([0x2a]))||!!_0x47037d[_0x63e864([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x63e864([0x55,0x50,0x4c,0x43])));}function _0x191c73(){const _0x1b2729=_0x214e,_0x55ead3=_0xed3379[_0x63e864([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x55ead3||0x0==_0x55ead3[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4f022a}=new URL(window[_0x63e864([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x1b2729(0xe6)]);if(_0x55ead3[_0x63e864([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f022a))return!0x0;const _0x264eb4=_0x4f022a[_0x63e864([0x73,0x70,0x6c,0x69,0x74])](_0x63e864([0x2e]));return _0x55ead3[_0x63e864([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x30166b=>_0x30166b[_0x63e864([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x63e864([0x2a])))[_0x63e864([0x6d,0x61,0x70])](_0x3b7b9a=>_0x3b7b9a[_0x63e864([0x73,0x70,0x6c,0x69,0x74])](_0x63e864([0x2e])))[_0x63e864([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4ca091=>_0x4ca091[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x264eb4[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x63e864([0x6d,0x61,0x70])](_0x412409=>Array(_0x264eb4[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x412409[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x63e864([0x66,0x69,0x6c,0x6c])](_0x412409[0x0]===_0x63e864([0x2a])?_0x63e864([0x2a]):'')[_0x63e864([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x412409))[_0x63e864([0x73,0x6f,0x6d,0x65])](_0x48e08d=>_0x264eb4[_0x63e864([0x65,0x76,0x65,0x72,0x79])]((_0x17a59a,_0x3174de)=>_0x48e08d[_0x3174de]===_0x17a59a||_0x48e08d[_0x3174de]===_0x63e864([0x2a])));}function _0x257d0a(){return _0x12c84b&&_0x46a6e7?new window[(_0x63e864([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xd8161d,_0x42b2cc)=>{_0x12c84b[_0x63e864([0x74,0x68,0x65,0x6e])](_0xd8161d,_0x42b2cc),_0x46a6e7[_0x63e864([0x74,0x68,0x65,0x6e])](_0x3f439f=>{_0x3f439f!=_0x63e864([0x56,0x61,0x6c,0x69,0x64])&&_0xd8161d(_0x3f439f);},_0x42b2cc);}):_0x12c84b||_0x46a6e7||_0x63e864([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2b8261(_0x576d4a,_0x310772){return new window[(_0x63e864([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x277fd4=>{if(_0x23c881())return _0x277fd4(_0x63e864([0x56,0x61,0x6c,0x69,0x64]));_0x4ca843(),_0x7838a0[_0x63e864([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x63e864([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3faf4a=!0x1;const _0x48a58a=_0x40f7f4();function _0x467455(_0x265e20){return!!_0x265e20&&(typeof _0x265e20===_0x63e864([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x265e20===_0x63e864([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x265e20[_0x63e864([0x74,0x68,0x65,0x6e])]===_0x63e864([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x265e20[_0x63e864([0x63,0x61,0x74,0x63,0x68])]===_0x63e864([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x7bec92(_0x26bbb2){_0xb027c7(_0x26bbb2)[_0x63e864([0x74,0x68,0x65,0x6e])](_0x9d1cb3=>{if(!_0x9d1cb3||_0x9d1cb3[_0x63e864([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x63e864([0x6f,0x6b]))return _0x63e864([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4b7229(_0x4fba07(_0x48a58a+_0x310772))!=_0x9d1cb3[_0x63e864([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x63e864([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x63e864([0x56,0x61,0x6c,0x69,0x64]);})[_0x63e864([0x74,0x68,0x65,0x6e])](_0x2a82d8=>(_0x4497a4(),_0x2a82d8),()=>{const _0x5c7770=_0xdb7498();return null==_0x5c7770?(_0x4497a4(),_0x63e864([0x56,0x61,0x6c,0x69,0x64])):_0x63e864(_0x14d5fc-_0x5c7770>(0xbc9ac70^_0x1b89bd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x63e864([0x74,0x68,0x65,0x6e])](_0x277fd4)[_0x63e864([0x63,0x61,0x74,0x63,0x68])](()=>{_0x277fd4(_0x63e864([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1ab264=0x2ff3c6f0^_0x1b89bd;function _0x4497a4(){const _0x4fbf6f=_0x63e864([0x6c,0x6c,0x63,0x74,0x2d])+_0x4b7229(_0x4fba07(_0x576d4a)),_0x18ee06=_0x107ed0(_0x4b7229(window[_0x63e864([0x4d,0x61,0x74,0x68])][_0x63e864([0x63,0x65,0x69,0x6c])](_0x14d5fc/_0x1ab264)));window[_0x63e864([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x63e864([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4fbf6f,_0x18ee06);}function _0xdb7498(){const _0x129ff7=_0x63e864([0x6c,0x6c,0x63,0x74,0x2d])+_0x4b7229(_0x4fba07(_0x576d4a)),_0x2c650f=window[_0x63e864([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x63e864([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x129ff7);return _0x2c650f?window[_0x63e864([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x107ed0(_0x2c650f),0x10)*_0x1ab264:null;}function _0xb027c7(_0x43aaca){return new window[(_0x63e864([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x30bcdb,_0x33df49)=>{_0x43aaca[_0x63e864([0x74,0x68,0x65,0x6e])](_0x30bcdb,_0x33df49),window[_0x63e864([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x33df49,0x2fc4fcb0^_0x1b89bd);});}}_0x7838a0[_0x63e864([0x6f,0x6e])](_0x63e864([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x46aef4,_0x3e9985)=>{if(_0x3e9985[0x0]!=_0x576d4a)return _0x277fd4(_0x63e864([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3e9985[0x1]={..._0x3e9985[0x1],[_0x63e864([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x48a58a};},{[_0x63e864([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x63e864([0x68,0x69,0x67,0x68])}),_0x7838a0[_0x63e864([0x6f,0x6e])](_0x63e864([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5945b8=>{_0x467455(_0x5945b8[_0x63e864([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3faf4a=!0x0,_0x7bec92(_0x5945b8[_0x63e864([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x63e864([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x63e864([0x6c,0x6f,0x77])}),_0x2e5c64[_0x63e864([0x74,0x68,0x65,0x6e])](()=>{_0x3faf4a||_0x277fd4(_0x63e864([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x23c881(){return _0x7838a0[_0x63e864([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x63e864([0x76,0x69,0x65,0x77])][_0x63e864([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x63e864([0x61,0x75,0x74,0x6f]);}function _0x4ca843(){_0x7838a0[_0x63e864([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x63e864([0x76,0x69,0x65,0x77])][_0x63e864([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x63e864([0x61,0x75,0x74,0x6f]);}}function _0x3f9ca3(_0x212aa6){const _0x160393=[new window[(_0x63e864([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a30ca=>setTimeout(_0x3a30ca,0x2fcc16bc^_0x1b89bd)),_0x2e5c64[_0x63e864([0x74,0x68,0x65,0x6e])](()=>new window[(_0x63e864([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x344477=>{let _0x440fdd=0x0;_0x7838a0[_0x63e864([0x6d,0x6f,0x64,0x65,0x6c])][_0x63e864([0x6f,0x6e])](_0x63e864([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x523ea2,_0x3eacd3)=>{_0x3eacd3[0x0][_0x63e864([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x440fdd++,_0x440fdd==(0x2fc52988^_0x1b89bd)&&(_0x344477(),_0x523ea2[_0x63e864([0x6f,0x66,0x66])]());});}))];return window[_0x63e864([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x63e864([0x72,0x61,0x63,0x65])](_0x160393)[_0x63e864([0x74,0x68,0x65,0x6e])](()=>_0x212aa6);}async function _0x6d1b89(){await _0x2e5c64,_0x7838a0[_0x63e864([0x6d,0x6f,0x64,0x65,0x6c])][_0x63e864([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x107174,_0x7838a0[_0x63e864([0x6d,0x6f,0x64,0x65,0x6c])][_0x63e864([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x107174,_0x7838a0[_0x63e864([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x63e864([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x36d05f(_0x1bc534){const _0x50c908=_0x2d8a1f();_0x7838a0[_0x50c908]=_0x63e864([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1bc534,_0x1bc534!=_0x63e864([0x56,0x61,0x6c,0x69,0x64])&&_0x6d1b89();}function _0x2d8a1f(){const _0x2d5c78=window[_0x63e864([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x63e864([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x63e864([0x6e,0x6f,0x77])]())[_0x63e864([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x63e864([0x2e]),'');let _0x2cefbd=_0x63e864([0x41]);for(let _0x16b408=0x0;_0x16b408<_0x2d5c78[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x16b408+=0x2){let _0x1bad79=window[_0x63e864([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d5c78[_0x63e864([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x16b408,_0x16b408+0x2));_0x1bad79>=_0x57044e[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1bad79-=_0x57044e[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2cefbd+=_0x57044e[_0x1bad79];}return _0x2cefbd;}function _0x374999(){const _0x2c142e=_0x3b1df3[_0x63e864([0x73,0x70,0x6c,0x69,0x74])](_0x63e864([0x2e]));if(0x3!=_0x2c142e[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1e6c95(_0x2c142e[0x1]);function _0x1e6c95(_0x5afb52){const _0x4ba8fd=_0x360fff(_0x5afb52);return _0x4ba8fd&&_0x29b354()?_0x4ba8fd:null;function _0x29b354(){const _0x1f8cfe=_0x4ba8fd[_0x63e864([0x6a,0x74,0x69])],_0xa16e04=window[_0x63e864([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f8cfe[_0x63e864([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1f8cfe[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x9a66b0={..._0x4ba8fd,[_0x63e864([0x6a,0x74,0x69])]:_0x1f8cfe[_0x63e864([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1f8cfe[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x9a66b0[_0x63e864([0x76,0x63])],_0x4fba07(_0x9a66b0)==_0xa16e04;}}}async function _0xf2ea7a(){let _0x4f408d=!0x0;try{const _0xcf1868=_0x3b1df3[_0x63e864([0x73,0x70,0x6c,0x69,0x74])](_0x63e864([0x2e])),[_0x53e41f,_0x5ea97b,_0x41be5f]=_0xcf1868;return _0x4b67db(_0x53e41f),await _0x38a375(_0x53e41f,_0x5ea97b,_0x41be5f),_0x4f408d;}catch{return!0x1;}function _0x4b67db(_0x2a11b6){const _0x3bc5b9=_0x360fff(_0x2a11b6);_0x3bc5b9&&_0x3bc5b9[_0x63e864([0x61,0x6c,0x67])]==_0x63e864([0x45,0x53,0x32,0x35,0x36])||(_0x4f408d=!0x1);}async function _0x38a375(_0xe73dd3,_0x2cfaea,_0x4bb640){const _0x1c4d28=window[_0x63e864([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x63e864([0x66,0x72,0x6f,0x6d])](_0x41a75a(_0x4bb640),_0x2e4950=>_0x2e4950[_0x63e864([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1b9563=new window[(_0x63e864([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x63e864([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xe73dd3+_0x63e864([0x2e])+_0x2cfaea),_0xd7782e=window[_0x63e864([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x63e864([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xd7782e)return;const _0x383285=await _0xd7782e[_0x63e864([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x63e864([0x6a,0x77,0x6b]),_0x1c67bf,{[_0x63e864([0x6e,0x61,0x6d,0x65])]:_0x63e864([0x45,0x43,0x44,0x53,0x41]),[_0x63e864([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x63e864([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x63e864([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xd7782e[_0x63e864([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x63e864([0x6e,0x61,0x6d,0x65])]:_0x63e864([0x45,0x43,0x44,0x53,0x41]),[_0x63e864([0x68,0x61,0x73,0x68])]:{[_0x63e864([0x6e,0x61,0x6d,0x65])]:_0x63e864([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x383285,_0x1c4d28,_0x1b9563)||(_0x4f408d=!0x1);}}function _0x360fff(_0x1d64e1){return _0x1d64e1[_0x63e864([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x63e864([0x65,0x79]))?JSON[_0x63e864([0x70,0x61,0x72,0x73,0x65])](_0x41a75a(_0x1d64e1)):null;}function _0x41a75a(_0x2a848f){return window[_0x63e864([0x61,0x74,0x6f,0x62])](_0x2a848f[_0x63e864([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x63e864([0x2b]))[_0x63e864([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x63e864([0x2f])));}function _0x4fba07(_0x1b4a47){let _0x24b3d8=0x1505;function _0xea93f(_0x725494){for(let _0xdf510=0x0;_0xdf510<_0x725494[_0x63e864([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xdf510++){const _0x32db1e=_0x725494[_0x63e864([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xdf510);_0x24b3d8=(_0x24b3d8<<0x5)+_0x24b3d8+_0x32db1e,_0x24b3d8&=_0x24b3d8;}}function _0x5db781(_0x1f3910){Array[_0x63e864([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1f3910)?_0x1f3910[_0x63e864([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5db781):_0x1f3910&&typeof _0x1f3910==_0x63e864([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x63e864([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1f3910)[_0x63e864([0x73,0x6f,0x72,0x74])]()[_0x63e864([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1ebdb1,_0x3c2da0])=>{_0xea93f(_0x1ebdb1),_0x5db781(_0x3c2da0);}):_0xea93f(window[_0x63e864([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1f3910));}return _0x5db781(_0x1b4a47),_0x24b3d8>>>0x0;}function _0x4b7229(_0x12d0d1){return _0x12d0d1[_0x63e864([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x63e864([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x63e864([0x30]));}function _0x107ed0(_0x21cff6){return _0x21cff6[_0x63e864([0x73,0x70,0x6c,0x69,0x74])]('')[_0x63e864([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x63e864([0x6a,0x6f,0x69,0x6e])]('');}function _0x107174(){}function _0x63e864(_0x57bf4a){const _0x34e319=_0x214e;return _0x57bf4a[_0x34e319(0xd7)](_0x2a7716=>String[_0x34e319(0xfc)](_0x2a7716))[_0x34e319(0x103)]('');}_0x36d05f(await _0x5e388f());}(this);}[_0x4b3863(0xc5)](){const _0x1d8766=_0x4b3863,_0x46d8c2=this[_0x1d8766(0xee)][_0x1d8766(0x102)][_0x1d8766(0xdf)];_0x46d8c2[_0x1d8766(0xfb)](_0x1d8766(0xe0))&&_0x46d8c2[_0x1d8766(0xe9)](_0x1d8766(0xe0),{'allowAttributes':[_0x1d8766(0xdb)]}),_0x46d8c2[_0x1d8766(0xfb)](_0x1d8766(0xfa))&&_0x46d8c2[_0x1d8766(0xe9)](_0x1d8766(0xfa),{'allowAttributes':[_0x1d8766(0xdb)]});}[_0x4b3863(0xd2)](){const _0x5dfbc7=_0x4b3863,_0x735d44=this[_0x5dfbc7(0xee)];_0x735d44[_0x5dfbc7(0xff)][_0x5dfbc7(0xb5)](_0x5dfbc7(0x101))[_0x5dfbc7(0xb4)]({'model':_0x5dfbc7(0xdb),'view':_0x5dfbc7(0xf7)}),_0x735d44[_0x5dfbc7(0xff)][_0x5dfbc7(0xb5)](_0x5dfbc7(0x106))[_0x5dfbc7(0xcb)]({'model':{'key':_0x5dfbc7(0xdb),'value':_0x17492b=>_0x17492b[_0x5dfbc7(0xcf)](_0x5dfbc7(0xf7))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xc5f6ac=_0x735d44[_0x5dfbc7(0xb9)][_0x5dfbc7(0xe5)](_0x5dfbc7(0xdc));_0xc5f6ac&&this[_0x5dfbc7(0xf4)](_0xc5f6ac,_0x5dfbc7(0x105),(_0x593700,[_0x3a6d83,_0xd04f91])=>{const _0x47fb1d=_0x5dfbc7;_0x3a6d83[_0x47fb1d(0xe7)](_0x47fb1d(0xdb),_0xd04f91);});}[_0x4b3863(0x104)](){const _0x5d3b50=_0x4b3863,_0x583fd2=this[_0x5d3b50(0xee)][_0x5d3b50(0xe8)][_0x5d3b50(0xe5)](_0x5d3b50(0xb7))||{},_0x33bd0c=this[_0x5d3b50(0xee)][_0x5d3b50(0xe8)][_0x5d3b50(0xe5)](_0x5d3b50(0xf1))||'';this[_0x5d3b50(0xc7)]=_0xa354a7(_0x111a30[_0x5d3b50(0xd0)],_0x5d3b50(0xce),{..._0x583fd2,'pubkey':_0x33bd0c,'ctx-name':_0x5d3b50(0xde)+this[_0x5d3b50(0xd4)],'sourceList':'','imgOnly':_0x5d3b50(0xf6),'removeCopyright':_0x5d3b50(0xf6),'localeName':this[_0x5d3b50(0xee)][_0x5d3b50(0xd1)][_0x5d3b50(0xd9)],'externalSourcesEmbedCss':_0x5d3b50(0xca)}),this[_0x5d3b50(0xc7)][_0x5d3b50(0xb8)]=_0x1e7e8a=>{const _0x3ad716=_0x5d3b50;if(_0x3ad716(0xf0)==_0x1e7e8a)return _0x3ad716(0xf3);},_0x111a30[_0x5d3b50(0xd0)][_0x5d3b50(0xc0)][_0x5d3b50(0xea)](this[_0x5d3b50(0xc7)]);}[_0x4b3863(0xeb)](){const _0xd0d7a3=_0x4b3863;this[_0xd0d7a3(0xef)]=_0xa354a7(_0x111a30[_0xd0d7a3(0xd0)],_0xd0d7a3(0x100),{'ctx-name':_0xd0d7a3(0xde)+this[_0xd0d7a3(0xd4)]}),_0x111a30[_0xd0d7a3(0xd0)][_0xd0d7a3(0xc0)][_0xd0d7a3(0xea)](this[_0xd0d7a3(0xef)]);}[_0x4b3863(0xd5)](){const _0x4dc5f6=_0x4b3863,_0x33ea83=this[_0x4dc5f6(0xee)][_0x4dc5f6(0xb9)][_0x4dc5f6(0xe5)](_0x4dc5f6(0xda));_0x33ea83&&this[_0x4dc5f6(0xf4)](_0x33ea83,_0x4dc5f6(0xbf),()=>{const _0xafafd4=_0x4dc5f6,_0x439d3f=this[_0xafafd4(0xee)][_0xafafd4(0x102)][_0xafafd4(0xd0)][_0xafafd4(0xd3)][_0xafafd4(0xcc)]();_0x439d3f&&_0x439d3f[_0xafafd4(0xcf)](_0xafafd4(0xdb))&&this[_0xafafd4(0xee)][_0xafafd4(0xe4)][_0xafafd4(0xd6)][_0xafafd4(0xe3)](_0xafafd4(0xb6),()=>{const _0x4ee321=_0xafafd4;_0x406f12(this[_0x4ee321(0xee)],_0x439d3f);});});const _0x13dc48=this[_0x4dc5f6(0xee)][_0x4dc5f6(0xb9)][_0x4dc5f6(0xe5)](_0x4dc5f6(0xfe));_0x13dc48&&this[_0x4dc5f6(0xf4)](_0x13dc48,_0x4dc5f6(0xbf),()=>{const _0x3b9175=_0x4dc5f6,_0x43be5d=this[_0x3b9175(0xee)][_0x3b9175(0x102)][_0x3b9175(0xd0)][_0x3b9175(0xd3)][_0x3b9175(0xcc)]();_0x43be5d&&_0x43be5d[_0x3b9175(0xcf)](_0x3b9175(0xdb))&&this[_0x3b9175(0xee)][_0x3b9175(0xe4)][_0x3b9175(0xd6)][_0x3b9175(0xe3)](_0x3b9175(0xb6),()=>{const _0x5cefcd=_0x3b9175;_0x406f12(this[_0x5cefcd(0xee)],_0x43be5d);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x5b140c,ObservableMixin as _0x39bfdf}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x14fe81}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x25aa26}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x5ec5c6}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x2c08ba}from'../../utils/uploadutils.js';import{getImageUrls as _0x480131,getImageDimension as _0xa80f66}from'../../utils/editingutils.js';import{isAncestor as _0x48a91b}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x39bfdf(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3d1ba9,_0x23072b,_0x15cc03){super(),this['_editor']=_0x3d1ba9,this['_dialog']=_0x23072b,this['_imageElement']=_0x15cc03,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 _0x3f5f51=this['_imageElement'],_0x5be9f5=_0x3f5f51['getAttribute']('uploadcareImageId'),_0x2051d5=_0x3f5f51['getAttribute']('src');if(_0x5be9f5)await this['_loadImageInfo'](_0x5be9f5,_0x2051d5);else{if(this['_imageCache']['has'](_0x2051d5)){const _0x27295e=this['_imageCache']['get'](_0x2051d5);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x27295e['url'],this['imageDimension']=_0x27295e['dimension'],this['imageId']=_0x27295e['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4f577c}=this['_editor'],t=_0x4f577c['t'],_0x4da0ea=new _0x5ec5c6(_0x4f577c,this['imageStatus'],this['_attributes']);_0x4da0ea['bind']('status')['to'](this,'imageStatus'),_0x4da0ea['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4da0ea['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4da0ea['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4da0ea,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x25aa26,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4da0ea,'position':_0x14fe81['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4da0ea['focus']();},'onHide':()=>{_0x4da0ea['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3b58c8=>!_0x48a91b(_0x3b58c8,_0x4da0ea['element'])}});}['_loadImageInfo'](_0x56fa0b,_0x90a429){return _0x2c08ba['getInfo'](_0x56fa0b,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x1d089e=>{const {width:_0x18e565,height:_0x453477}=_0x1d089e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x90a429,this['imageDimension']={'width':_0x18e565,'height':_0x453477},this['imageId']=_0x56fa0b;})['catch'](_0x19d59f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x19d59f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x44a8fc,_0x35dfc8){return this['_getImageAsFile'](_0x44a8fc)['then'](_0x2cc9fe=>_0x2c08ba['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x35dfc8['signal'],'file':_0x2cc9fe,'onProgress':_0x414de5=>{_0x414de5&&_0x414de5['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x414de5['value']));}}))['then'](_0x3b3043=>{const {width:_0x30f8c2,height:_0x373566}=_0x3b3043['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3b3043['cdnUrl'],this['imageDimension']={'width':_0x30f8c2,'height':_0x373566},this['imageId']=_0x3b3043['uuid'],this['imageUploadProgress']=null;const _0x4afbe2=_0x44a8fc['getAttribute']('src');this['_imageCache']['set'](_0x4afbe2,{'id':_0x3b3043['uuid'],'url':_0x3b3043['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1890d9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1890d9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x411de7,_0x38e1d7){_0x411de7['on']('apply',(_0x2f795a,_0x5f3b66)=>{this['_replaceImage'](_0x38e1d7,_0x5f3b66['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x411de7['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x411de7['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x124911,_0x1b7fe2,_0x11fde8){const _0x30f4c7=this['_editor'],{width:_0x260b55,height:_0x385d94}=_0xa80f66(_0x1b7fe2,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1941fa,imageSources:_0x652380}=_0x480131(_0x1b7fe2,_0x260b55);_0x30f4c7['model']['change'](_0x3c2110=>{if('$graveyard'===_0x124911['root']['rootName']){_0x30f4c7['execute']('insertImage',{'imageType':_0x124911['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x124911['getAttributes']()),'uploadcareImageId':_0x11fde8,'src':_0x1941fa,'sources':_0x652380,'width':_0x260b55,'height':_0x385d94}});const _0x516b31=_0x124911['getChildren']();_0x124911=_0x30f4c7['model']['document']['selection']['getSelectedElement']();for(const _0x451257 of _0x516b31)_0x3c2110['append'](_0x3c2110['cloneElement'](_0x451257),_0x124911);}else _0x3c2110['setSelection'](_0x124911,'on'),_0x30f4c7['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x124911['getAttributes']()),'uploadcareImageId':_0x11fde8,'src':_0x1941fa,'sources':_0x652380,'width':_0x260b55,'height':_0x385d94},_0x124911);_0x3c2110['setSelection'](_0x124911,'on');});}async['_getImageAsFile'](_0x4ae249){const _0x59409b=_0x5b140c['window'],_0x4203f4=_0x5b140c['document']['location']['href'],_0x5d934e=new _0x59409b['URL'](_0x4ae249['getAttribute']('src'),_0x4203f4);if('data:'===_0x5d934e['protocol']){const _0x2eaa4c=_0x5d934e['href']['split'](','),_0x250c0f=_0x2eaa4c[0x0]['match'](/:(.*?);/)[0x1],_0x44e888=_0x250c0f['split']('/')[0x1],_0x53a4d4=_0x59409b['atob'](_0x2eaa4c[_0x2eaa4c['length']-0x1]);let _0x2b0dff=_0x53a4d4['length'];const _0x483017=new _0x59409b['Uint8Array'](_0x2b0dff);for(;_0x2b0dff--;)_0x483017[_0x2b0dff]=_0x53a4d4['charCodeAt'](_0x2b0dff);return new _0x59409b['File']([_0x483017],'image.'+_0x44e888,{'type':_0x250c0f});}const _0x2060d0=_0x5d934e['href']['split']('/'),_0x108b20=_0x2060d0[_0x2060d0['length']-0x1],_0x5e9bf5=_0x108b20['split']('.')[0x1];return _0x59409b['fetch'](_0x5d934e['href'])['then'](_0x3776e1=>_0x3776e1['clone']()['blob']())['then'](_0xb1713d=>new _0x59409b['File']([_0xb1713d],_0x108b20,{'type':'image/'+_0x5e9bf5}));}}
23
+ import{global as _0x5deddc,ObservableMixin as _0x2f74cf}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x25d3b2}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0xbd1a9a}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x58d5c5}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x134dd9}from'../../utils/uploadutils.js';import{getImageUrls as _0x2d116f,getImageDimension as _0x43b231}from'../../utils/editingutils.js';import{isAncestor as _0x521abc}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x2f74cf(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x51417c,_0x27a691,_0x24f0e5){super(),this['_editor']=_0x51417c,this['_dialog']=_0x27a691,this['_imageElement']=_0x24f0e5,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 _0x2430b6=this['_imageElement'],_0x2c7f27=_0x2430b6['getAttribute']('uploadcareImageId'),_0x4adb6b=_0x2430b6['getAttribute']('src');if(_0x2c7f27)await this['_loadImageInfo'](_0x2c7f27,_0x4adb6b);else{if(this['_imageCache']['has'](_0x4adb6b)){const _0xdebace=this['_imageCache']['get'](_0x4adb6b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xdebace['url'],this['imageDimension']=_0xdebace['dimension'],this['imageId']=_0xdebace['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5bd947}=this['_editor'],t=_0x5bd947['t'],_0x3de2c1=new _0x58d5c5(_0x5bd947,this['imageStatus'],this['_attributes']);_0x3de2c1['bind']('status')['to'](this,'imageStatus'),_0x3de2c1['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3de2c1['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3de2c1['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3de2c1,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0xbd1a9a,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3de2c1,'position':_0x25d3b2['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3de2c1['focus']();},'onHide':()=>{_0x3de2c1['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x47a75f=>!_0x521abc(_0x47a75f,_0x3de2c1['element'])}});}['_loadImageInfo'](_0x3ae66f,_0x53baa2){return _0x134dd9['getInfo'](_0x3ae66f,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x4169a8=>{const {width:_0xa15787,height:_0x469a96}=_0x4169a8['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x53baa2,this['imageDimension']={'width':_0xa15787,'height':_0x469a96},this['imageId']=_0x3ae66f;})['catch'](_0x248590=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x248590['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3b8da1,_0x1fbdf9){return this['_getImageAsFile'](_0x3b8da1)['then'](_0x4bb571=>_0x134dd9['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x1fbdf9['signal'],'file':_0x4bb571,'onProgress':_0x4eb428=>{_0x4eb428&&_0x4eb428['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4eb428['value']));}}))['then'](_0x105cc5=>{const {width:_0x115987,height:_0x4b6c3e}=_0x105cc5['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x105cc5['cdnUrl'],this['imageDimension']={'width':_0x115987,'height':_0x4b6c3e},this['imageId']=_0x105cc5['uuid'],this['imageUploadProgress']=null;const _0x3cb19c=_0x3b8da1['getAttribute']('src');this['_imageCache']['set'](_0x3cb19c,{'id':_0x105cc5['uuid'],'url':_0x105cc5['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x335888=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x335888['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1eaa3c,_0x10488c){_0x1eaa3c['on']('apply',(_0x4a1032,_0x2bd341)=>{this['_replaceImage'](_0x10488c,_0x2bd341['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1eaa3c['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1eaa3c['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x4b68d3,_0x1bd17a,_0x28c9fd){const _0xba964=this['_editor'],{width:_0xb360a8,height:_0x758dde}=_0x43b231(_0x1bd17a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x215d8e,imageSources:_0x64b322}=_0x2d116f(_0x1bd17a,_0xb360a8);_0xba964['model']['change'](_0x4a86cb=>{if('$graveyard'===_0x4b68d3['root']['rootName']){_0xba964['execute']('insertImage',{'imageType':_0x4b68d3['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x4b68d3['getAttributes']()),'uploadcareImageId':_0x28c9fd,'src':_0x215d8e,'sources':_0x64b322,'width':_0xb360a8,'height':_0x758dde}});const _0x336246=_0x4b68d3['getChildren']();_0x4b68d3=_0xba964['model']['document']['selection']['getSelectedElement']();for(const _0x18216b of _0x336246)_0x4a86cb['append'](_0x4a86cb['cloneElement'](_0x18216b),_0x4b68d3);}else _0x4a86cb['setSelection'](_0x4b68d3,'on'),_0xba964['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x4b68d3['getAttributes']()),'uploadcareImageId':_0x28c9fd,'src':_0x215d8e,'sources':_0x64b322,'width':_0xb360a8,'height':_0x758dde},_0x4b68d3);_0x4a86cb['setSelection'](_0x4b68d3,'on');});}async['_getImageAsFile'](_0x3a8dff){const _0x1b2a28=_0x5deddc['window'],_0x4a0172=_0x5deddc['document']['location']['href'],_0x2cb9d2=new _0x1b2a28['URL'](_0x3a8dff['getAttribute']('src'),_0x4a0172);if('data:'===_0x2cb9d2['protocol']){const _0x4a513f=_0x2cb9d2['href']['split'](','),_0x16d5a4=_0x4a513f[0x0]['match'](/:(.*?);/)[0x1],_0x25b9d8=_0x16d5a4['split']('/')[0x1],_0x4067a3=_0x1b2a28['atob'](_0x4a513f[_0x4a513f['length']-0x1]);let _0x3689d0=_0x4067a3['length'];const _0x22993f=new _0x1b2a28['Uint8Array'](_0x3689d0);for(;_0x3689d0--;)_0x22993f[_0x3689d0]=_0x4067a3['charCodeAt'](_0x3689d0);return new _0x1b2a28['File']([_0x22993f],'image.'+_0x25b9d8,{'type':_0x16d5a4});}const _0x39d9b2=_0x2cb9d2['href']['split']('/'),_0x42b2e6=_0x39d9b2[_0x39d9b2['length']-0x1],_0x589808=_0x42b2e6['split']('.')[0x1];return _0x1b2a28['fetch'](_0x2cb9d2['href'])['then'](_0xe6cec9=>_0xe6cec9['clone']()['blob']())['then'](_0x4eca99=>new _0x1b2a28['File']([_0x4eca99],_0x42b2e6,{'type':'image/'+_0x589808}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x29b290,_0x622aea){const _0x4fc4df=_0x2d0d,_0x1ec078=_0x29b290();while(!![]){try{const _0x189bf4=parseInt(_0x4fc4df(0x87))/0x1+parseInt(_0x4fc4df(0x7d))/0x2*(parseInt(_0x4fc4df(0x89))/0x3)+-parseInt(_0x4fc4df(0x82))/0x4*(-parseInt(_0x4fc4df(0x84))/0x5)+parseInt(_0x4fc4df(0x78))/0x6+parseInt(_0x4fc4df(0x79))/0x7*(-parseInt(_0x4fc4df(0x7f))/0x8)+-parseInt(_0x4fc4df(0x83))/0x9*(-parseInt(_0x4fc4df(0x7a))/0xa)+-parseInt(_0x4fc4df(0x7e))/0xb*(parseInt(_0x4fc4df(0x77))/0xc);if(_0x189bf4===_0x622aea)break;else _0x1ec078['push'](_0x1ec078['shift']());}catch(_0x416b4d){_0x1ec078['push'](_0x1ec078['shift']());}}}(_0x59c5,0x4b8e6));function _0x59c5(){const _0x431116=['uc-light','setTemplate','4NayAyR','279WCwuGZ','2939950HEVOQy','image-edit','uc-cloud-image-editor','139192oxQxgY','imageSrc','291BpiiJJ','set','10478700ithJMe','1257018yRYgdk','150360cUEJHM','3290oyuJWz','ck-uploadcare-theme','bindTemplate','9734MtaiCN','11gxXrYC','88wiWzQf'];_0x59c5=function(){return _0x431116;};return _0x59c5();}function _0x2d0d(_0xdfb509,_0x2c547e){const _0x59c52d=_0x59c5();return _0x2d0d=function(_0x2d0dd4,_0x5520b5){_0x2d0dd4=_0x2d0dd4-0x76;let _0x5318eb=_0x59c52d[_0x2d0dd4];return _0x5318eb;},_0x2d0d(_0xdfb509,_0x2c547e);}import{View as _0x17858c}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x17858c{constructor(_0x1b06a8,_0x1aef74){const _0x30b71c=_0x2d0d;super(_0x1b06a8);const _0x111176=this[_0x30b71c(0x7c)];this[_0x30b71c(0x76)](_0x30b71c(0x88),''),this[_0x30b71c(0x81)]({'tag':_0x30b71c(0x86),'attributes':{..._0x1aef74,'class':[_0x30b71c(0x80),_0x30b71c(0x7b)],'ctx-name':_0x30b71c(0x85),'cdn-url':_0x111176['to'](_0x30b71c(0x88))}});}}
23
+ (function(_0x594fd7,_0x4b6073){const _0x13eb2f=_0x3872,_0x35a565=_0x594fd7();while(!![]){try{const _0x4b72d3=parseInt(_0x13eb2f(0xc5))/0x1*(parseInt(_0x13eb2f(0xbb))/0x2)+-parseInt(_0x13eb2f(0xb8))/0x3+parseInt(_0x13eb2f(0xc2))/0x4*(parseInt(_0x13eb2f(0xc0))/0x5)+-parseInt(_0x13eb2f(0xbc))/0x6*(-parseInt(_0x13eb2f(0xc3))/0x7)+parseInt(_0x13eb2f(0xb9))/0x8+parseInt(_0x13eb2f(0xbd))/0x9+-parseInt(_0x13eb2f(0xc7))/0xa*(parseInt(_0x13eb2f(0xc8))/0xb);if(_0x4b72d3===_0x4b6073)break;else _0x35a565['push'](_0x35a565['shift']());}catch(_0x4a3f60){_0x35a565['push'](_0x35a565['shift']());}}}(_0x3729,0x346d9));import{View as _0x1d3967}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x1d3967{constructor(_0x71a96c,_0x3964c9){const _0xb7197e=_0x3872;super(_0x71a96c);const _0x1e10c7=this[_0xb7197e(0xbf)];this[_0xb7197e(0xba)](_0xb7197e(0xc9),''),this[_0xb7197e(0xc1)]({'tag':_0xb7197e(0xca),'attributes':{..._0x3964c9,'class':[_0xb7197e(0xc6),_0xb7197e(0xbe)],'ctx-name':_0xb7197e(0xc4),'cdn-url':_0x1e10c7['to'](_0xb7197e(0xc9))}});}}function _0x3872(_0x3d8db9,_0x347f22){const _0x372951=_0x3729();return _0x3872=function(_0x3872b7,_0x1a135b){_0x3872b7=_0x3872b7-0xb8;let _0x39a6b4=_0x372951[_0x3872b7];return _0x39a6b4;},_0x3872(_0x3d8db9,_0x347f22);}function _0x3729(){const _0x1b7ed6=['24jatxkz','798RBvgRg','image-edit','3073ajvAqm','uc-light','790Bdcibc','159995LjbANy','imageSrc','uc-cloud-image-editor','159873SmZcSp','1150240Exrsvz','set','278nGVGMm','10506YNAggQ','3809772EeEvGR','ck-uploadcare-theme','bindTemplate','186035zCcvAT','setTemplate'];_0x3729=function(){return _0x1b7ed6;};return _0x3729();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x374369}from'ckeditor5/src/icons.js';import{ButtonView as _0x551d57,IconView as _0x1bfb2f,View as _0x1fb808}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x1fb808{constructor(_0x2d1e80){super(_0x2d1e80);const t=_0x2d1e80['t'];this['set']('errorType',null);const _0x46903a=new _0x551d57(_0x2d1e80);_0x46903a['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x46903a['withText']=!0x0,_0x46903a['class']='ck-button-action',_0x46903a['on']('execute',()=>{this['fire']('retry');}),_0x46903a['bind']('isVisible')['to'](this,'errorType',_0x213b13=>'NotFound'!==_0x213b13);const _0x4376f6=new _0x1bfb2f();_0x4376f6['content']=_0x374369,_0x4376f6['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x22fb5e=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':[_0x4376f6,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x22fb5e['to']('errorType',_0x35c1e4=>t('NotFound'!==_0x35c1e4?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x46903a]},{'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'}]}]}]});}}
23
+ import{IconError as _0x501383}from'ckeditor5/src/icons.js';import{ButtonView as _0x722f14,IconView as _0x4c3a14,View as _0x5b5d6d}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x5b5d6d{constructor(_0x57cdb4){super(_0x57cdb4);const t=_0x57cdb4['t'];this['set']('errorType',null);const _0x511eb0=new _0x722f14(_0x57cdb4);_0x511eb0['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x511eb0['withText']=!0x0,_0x511eb0['class']='ck-button-action',_0x511eb0['on']('execute',()=>{this['fire']('retry');}),_0x511eb0['bind']('isVisible')['to'](this,'errorType',_0x5bfdcb=>'NotFound'!==_0x5bfdcb);const _0x1ccdf0=new _0x4c3a14();_0x1ccdf0['content']=_0x501383,_0x1ccdf0['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x36c2a4=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':[_0x1ccdf0,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x36c2a4['to']('errorType',_0x399148=>t('NotFound'!==_0x399148?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x511eb0]},{'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'}]}]}]});}}