@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251011.0 → 0.0.0-nightly-20251013.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 _0x55795a,Command as _0x453090}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x30fb44,IconGooglePhotos as _0x1cb31d,IconGoogleDrive as _0x6115df,IconFacebook as _0xf283f6,IconDropbox as _0x54fa39,IconUploadcareLink as _0x30b2fd,IconUploadcareImageUpload as _0x10ba8f,IconError as _0x461168,IconUploadcareImageEdit as _0x4b0aab}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x17b7cf,MenuBarMenuListItemButtonView as _0x322e65,View as _0x2b7683,FocusCycler as _0x40883d,Dialog as _0x23db15,DialogViewPosition as _0x3461e1,SpinnerView as _0x4d0e0e,IconView as _0x1b02c3,Notification as _0x163e8c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x22b15f,DomEmitterMixin as _0x28671e,global as _0x506da4,getAncestors as _0x4fbc2a,ObservableMixin as _0x15a8fe,uid as _0x2c4b05,createElement as _0x1d5897}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x5b75c7}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0xd23dd4,info as _0x122251}from'@uploadcare/upload-client';import*as _0x4b2ba7 from'@uploadcare/file-uploader';var i=function(_0x17de4e){return _0x17de4e['Local']='local',_0x17de4e['URL']='url',_0x17de4e['Dropbox']='dropbox',_0x17de4e['GDrive']='gdrive',_0x17de4e['Facebook']='facebook',_0x17de4e['GPhotos']='gphotos',_0x17de4e['OneDrive']='onedrive',_0x17de4e;}({});function _(_0x310800,_0xbdeacb,_0x3897d){const t=_0x310800['t'],_0x2d2acf=_0x310800['t'];switch(_0xbdeacb){case i['Local']:return{'text':_0x2d2acf('Insert'===_0x3897d?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x2d2acf('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x3897d?_0x2d2acf('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x2d2acf('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x3897d?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x3897d?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x3897d?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x3897d?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x3897d?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0xbdeacb;}}class e extends _0x55795a{['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 _0x2ee2c0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5446a1;for(const _0x4cbeda in _0x2ee2c0){const _0x820e73=_0x4cbeda,_0x4996ed=_0x2ee2c0[_0x820e73];if('uploadcareLicenseKeyValid'==_0x4996ed||'uploadcareLicenseKeyInvalid'==_0x4996ed||'uploadcareLicenseKeyExpired'==_0x4996ed||'uploadcareLicenseKeyDomainLimit'==_0x4996ed||'uploadcareLicenseKeyNotAllowed'==_0x4996ed||'uploadcareLicenseKeyEvaluationLimit'==_0x4996ed||'uploadcareLicenseKeyTrialLimit'==_0x4996ed||'uploadcareLicenseKeyUsageLimit'==_0x4996ed){delete _0x2ee2c0[_0x820e73],_0x5446a1=_0x4996ed,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x5446a1&&_0x2ee2c0['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x5446a1&&_0x2ee2c0['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x5446a1&&_0x2ee2c0['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x5446a1&&_0x2ee2c0['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x5446a1&&_0x2ee2c0['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x5446a1&&_0x2ee2c0['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x5446a1&&_0x2ee2c0['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x290d91}=this,_0x3fa1d9=_0x290d91['commands']['get']('uploadcare');if(!_0x3fa1d9)return;const _0x16cf65=this['_normalizeConfigSourceList'](_0x290d91['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x510679,_0x5707c4)=>{const _0x5efdd5=this['_getIntegrationKey'](_0x5707c4['type']);return _0x510679[_0x5efdd5]||(_0x510679[_0x5efdd5]=[]),_0x510679[_0x5efdd5]['push'](_0x5707c4),_0x510679;},{});_0x290d91['plugins']['has']('ImageInsertUI')&&_0x290d91['commands']['get']('uploadcare')&&Object['entries'](_0x16cf65)['forEach'](([_0x44c559,_0x5cb4c9])=>{_0x290d91['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x44c559,'observable':()=>_0x3fa1d9,'buttonViewCreator':()=>this['_createToolbarButton'](_0x5cb4c9),'formViewCreator':()=>this['_createDropdownButtons'](_0x5cb4c9),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x5cb4c9),'override':'assetManager'!==_0x44c559});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x44d7cd){const {locale:_0x22efc5}=this['editor'];return _0x44d7cd['map'](_0x3e37f5=>{const _0x3628a4=_(_0x22efc5,_0x3e37f5,'Insert');switch(_0x3e37f5){case i['Local']:return{'icon':_0x10ba8f,'type':i['Local'],..._0x3628a4};case i['URL']:return{'icon':_0x30b2fd,'type':i['URL'],..._0x3628a4};case i['Dropbox']:return{'icon':_0x54fa39,'type':i['Dropbox'],..._0x3628a4};case i['Facebook']:return{'icon':_0xf283f6,'type':i['Facebook'],..._0x3628a4};case i['GDrive']:return{'icon':_0x6115df,'type':i['GDrive'],..._0x3628a4};case i['GPhotos']:return{'icon':_0x1cb31d,'type':i['GPhotos'],..._0x3628a4};case i['OneDrive']:return{'icon':_0x30fb44,'type':i['OneDrive'],..._0x3628a4};}});}['_getIntegrationKey'](_0x3eb7c9){switch(_0x3eb7c9){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x28643b,_0x206238){const _0x336c4c=this['editor'],_0xe95ca=new _0x28643b(_0x336c4c['locale']),_0x2bb86d=_0x336c4c['commands']['get']('uploadcare');return _0xe95ca['bind']('isEnabled')['to'](_0x2bb86d),_0xe95ca['on']('execute',()=>{_0x2bb86d['execute'](_0x206238);}),_0xe95ca;}['_createToolbarButton'](_0x31b556){const {locale:_0x440d2b}=this['editor'],_0x5af12f=this['editor']['plugins']['get']('ImageInsertUI'),_0x214483=_0x31b556[0x0],_0x393727=this['_createButton'](_0x17b7cf,_0x214483['type']);return _0x393727['icon']=_0x214483['icon'],_0x393727['bind']('label')['to'](_0x5af12f,'isImageSelected',_0x3c894c=>_(_0x440d2b,_0x214483['type'],_0x3c894c?'Replace':'Insert')['text']),_0x393727['tooltip']=!0x0,_0x393727;}['_createDropdownButtons'](_0x43ec92){const {locale:_0x161aca}=this['editor'],_0x1dfb66=this['editor']['plugins']['get']('ImageInsertUI');return _0x43ec92['map'](_0x1ced60=>{const _0x5a80f0=this['_createButton'](_0x17b7cf,_0x1ced60['type']);return _0x5a80f0['withText']=!0x0,_0x5a80f0['icon']=_0x1ced60['icon'],_0x5a80f0['bind']('label')['to'](_0x1dfb66,'isImageSelected',_0x4eb242=>_(_0x161aca,_0x1ced60['type'],_0x4eb242?'Replace':'Insert')['text']),_0x5a80f0;});}['_createMenuBarButtons'](_0x26d7bc){return _0x26d7bc['map'](_0x335e78=>{const _0x1633a6=this['_createButton'](_0x322e65,_0x335e78['type']);return _0x1633a6['icon']=_0x335e78['icon'],_0x1633a6['label']=_0x335e78['shortText'],_0x1633a6;});}}class F extends _0x2b7683{['focusTracker'];['focusCycler'];constructor(_0x340816){super(_0x340816),this['focusTracker']=new _0x22b15f(),this['focusCycler']=new _0x40883d({'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(_0x1bf050,_0x1fa7d5){super(_0x1bf050),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-'+_0x1fa7d5}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x321d04,_0x2d2641){const _0x48e8d2=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x5bc6f4=>_0x5bc6f4<=_0x2d2641)['map'](_0x5e6d8c=>_0x321d04['replace'](/\/$/,'')+'/-/resize/'+_0x5e6d8c+'x/\x20'+_0x5e6d8c+'w');return{'imageFallbackUrl':_0x321d04,'imageSources':[{'srcset':_0x48e8d2['join'](',\x20'),'sizes':'(max-width:\x20'+_0x2d2641+'px)\x20100vw,\x20'+_0x2d2641+'px','type':'image/webp'}]};}function S(_0x12fd06,_0x140c50,_0x21f4dc){const _0x5498ca=_0x12fd06['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5498ca?parseInt(_0x5498ca[0x1],0xa):_0x140c50,'height':_0x5498ca?parseInt(_0x5498ca[0x2],0xa):_0x21f4dc};}function p(_0x242d98,_0x1caa4a){const _0x520160=new(_0x28671e())(),_0x222e17=_0x242d98['plugins']['get']('ImageUtils'),_0x20e8ed=_0x242d98['editing']['mapper']['toViewElement'](_0x1caa4a),_0x8aa2d9=_0x222e17['findViewImgElement'](_0x20e8ed),_0x4356a7=_0x242d98['editing']['view']['domConverter']['viewToDom'](_0x8aa2d9),_0xf74a44=_0x1caa4a['getAttribute']('width'),_0x2e980a=_0x1caa4a['getAttribute']('height'),_0x31041a='image-processing';_0x242d98['editing']['view']['change'](_0x3775d4=>{_0x3775d4['addClass'](_0x31041a,_0x20e8ed),_0x3775d4['setStyle']('aspect-ratio',_0xf74a44+'/'+_0x2e980a,_0x8aa2d9);}),_0x520160['listenTo'](_0x4356a7,'load',()=>{_0x520160['stopListening'](_0x4356a7,'load'),_0x242d98['editing']['view']['change'](_0x4d0dd6=>{_0x4d0dd6['removeClass'](_0x31041a,_0x20e8ed),_0x4d0dd6['removeStyle']('aspect-ratio',_0x8aa2d9);});});}function z(_0x238070){if(Array['isArray'](_0x238070)){const _0x12e394=_0x238070['map'](z);return _0x4c2911=>_0x12e394['some'](_0x4c1299=>_0x4c1299(_0x4c2911));}if('origin'==_0x238070){const _0xf66644=_0x506da4['window']['location']['origin'];return _0x2ff320=>new URL(_0x2ff320,_0x506da4['document']['baseURI'])['origin']==_0xf66644;}return'function'==typeof _0x238070?_0x238070:_0x238070 instanceof RegExp?_0x20c6a0=>!(!_0x20c6a0['match'](_0x238070)&&!_0x20c6a0['replace'](/^https?:\/\//,'')['match'](_0x238070)):()=>!0x1;}function A(_0x462a52,_0x17f326){return _0x4fbc2a(_0x462a52['target'])['includes'](_0x17f326);}class n extends/* #__PURE__ -- @preserve */
24
- _0x15a8fe(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x903cbc,_0x501104,_0x1840dc){super(),this['_editor']=_0x903cbc,this['_editing']=_0x501104,this['_dialog']=_0x903cbc['plugins']['get'](_0x23db15),this['_api']=_0x501104['ctxElement']['getAPI'](),this['_type']=_0x1840dc,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:_0x22099f,model:_0x25897c}=this['_editor'],_0x1d34cd=_0x25897c['document']['selection']['getSelectedElement'](),_0x23104c=_0x1d34cd&&(_0x1d34cd['is']('element','imageBlock')||_0x1d34cd['is']('element','imageInline'));this['_formView']=new x(_0x22099f,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x10ba8f,'title':_(_0x22099f,this['_type'],_0x23104c?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x3461e1['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1ed970=>!A(_0x1ed970,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x5ee201}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x35e2a3=>{const _0x3621a0=_0x5ee201['length'];for(const _0x1a8fd7 of _0x5ee201){const _0x24bfc3=_0x1a8fd7===_0x5ee201[_0x3621a0-0x1],{cdnUrl:_0x532a01,fileInfo:_0x3c4de4}=_0x1a8fd7;if(!_0x532a01||!_0x3c4de4)continue;const {width:_0x2170c4,height:_0xfacf0c}=_0x3c4de4['imageInfo'],_0x45b021=S(_0x532a01,_0x2170c4,_0xfacf0c),_0x148acc=C(_0x532a01,_0x45b021['width']),_0x5785a3={'id':_0x3c4de4['uuid'],'type':'image','attributes':{'imageDimension':_0x45b021,..._0x148acc}};this['_insertAsset'](_0x5785a3,_0x24bfc3,_0x35e2a3);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x16b2ad=>{'idle'===_0x16b2ad['detail']['status']&&!_0x16b2ad['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x56e934,_0x5e8075,_0x174d2e){const _0x2e2530=this['_editor']['model']['document']['selection'],_0x8c9b38=_0x2e2530['getSelectedElement'](),_0x311e8d=!(!_0x8c9b38||!_0x8c9b38['is']('element','imageInline'));_0x174d2e['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x56e934,_0x311e8d),_0x5e8075||_0x174d2e['setSelection'](_0x2e2530['getLastPosition']());}['_insertImage'](_0x56155f,_0xf8c3f4){const _0x2e1157=this['_editor'],{imageDimension:_0x15b411,imageFallbackUrl:_0x40a781,imageSources:_0x3c85ae}=_0x56155f['attributes'];_0x2e1157['execute']('insertImage',{'imageType':_0xf8c3f4?'imageInline':null,'source':{'uploadcareImageId':_0x56155f['id'],'src':_0x40a781,'sources':_0x3c85ae,..._0x15b411}});}}class w extends _0x453090{['_editing'];['_controller']=null;static get['requires'](){return[_0x23db15,o];}constructor(_0xf77d0c){super(_0xf77d0c),this['_editing']=_0xf77d0c['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x44ab78){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x44ab78);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x5125d6,..._0x37de83}){return _0xd23dd4(_0x5125d6,_0x37de83);}static['getInfo'](_0x150990,_0x2e7199){return _0x122251(_0x150990,_0x2e7199);}}class f extends _0x55795a{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x5b75c7,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x100ff0=this['editor'];if(!!!_0x100ff0['config']['get']('uploadcare'))return;_0x100ff0['plugins']['get'](_0x5b75c7)['createUploadAdapter']=_0x119797=>new k(_0x119797,_0x100ff0),_0x100ff0['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x37d3bc,{imageElement:_0x57435d,data:_0x343727})=>{_0x100ff0['model']['change'](_0x7c94c2=>{_0x7c94c2['setAttribute']('uploadcareImageId',_0x343727['uploadcareImageId'],_0x57435d);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x4e616e,_0x7408e2){this['loader']=_0x4e616e,this['editor']=_0x7408e2,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x465be6=await this['loader']['file'];return j['upload']({'file':_0x465be6,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x5b8977=>{_0x5b8977&&_0x5b8977['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x5b8977['value']);}})['then'](async _0x4f75ef=>{const {imageFallbackUrl:_0x2f183c,imageSources:_0x3047b0}=C(_0x4f75ef['cdnUrl'],_0x4f75ef['imageInfo']['width']);return{'uploadcareImageId':_0x4f75ef['uuid'],'default':_0x2f183c,'sources':_0x3047b0};})['catch'](()=>{const _0x472045=t('Cannot\x20upload\x20file:')+('\x20'+_0x465be6['name']+'.');return Promise['reject'](_0x472045);});}['abort'](){this['controller']['abort']();}}class o extends _0x55795a{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x23db15];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x2a4220){super(_0x2a4220),this['ucContextId']=_0x2c4b05();}['init'](){const _0x21f3df=this['editor'];_0x21f3df['commands']['add']('uploadcare',new w(_0x21f3df));}['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 _0xa6acc6=_0x506da4['document']['querySelector']('input[uploadcare-file-input]');_0xa6acc6&&_0xa6acc6['remove']();}),async function(_0x153d17){const _0x4fdb7b=_0x4b8fce([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x211393=0x3d8d0df,_0x4fc3d0=0x3dfa53f^_0x211393,_0x1b9cf6=window[_0x4b8fce([0x44,0x61,0x74,0x65])][_0x4b8fce([0x6e,0x6f,0x77])](),_0x2ab94c=_0x153d17[_0x4b8fce([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x425862=new window[(_0x4b8fce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x12f05d=>{_0x2ab94c[_0x4b8fce([0x6f,0x6e,0x63,0x65])](_0x4b8fce([0x72,0x65,0x61,0x64,0x79]),_0x12f05d);}),_0x14e59e={[_0x4b8fce([0x6b,0x74,0x79])]:_0x4b8fce([0x45,0x43]),[_0x4b8fce([0x75,0x73,0x65])]:_0x4b8fce([0x73,0x69,0x67]),[_0x4b8fce([0x63,0x72,0x76])]:_0x4b8fce([0x50,0x2d,0x32,0x35,0x36]),[_0x4b8fce([0x78])]:_0x4b8fce([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]),[_0x4b8fce([0x79])]:_0x4b8fce([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]),[_0x4b8fce([0x61,0x6c,0x67])]:_0x4b8fce([0x45,0x53,0x32,0x35,0x36])},_0x714561=_0x2ab94c[_0x4b8fce([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4b8fce([0x67,0x65,0x74])](_0x4b8fce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4b5afd(){let _0x5150e5,_0x263173=null,_0x113198=null;try{if(_0x714561==_0x4b8fce([0x47,0x50,0x4c]))return _0x4b8fce([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5150e5=_0x323f36(),!_0x5150e5)return _0x4b8fce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5150e5[_0x4b8fce([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x113198=_0x20737b(_0x5150e5[_0x4b8fce([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5150e5[_0x4b8fce([0x6a,0x74,0x69])])),await _0x37f494()?_0x1fcbbb()?_0x3d67e5()?_0x4b8fce([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x27ce82()?(_0x5150e5[_0x4b8fce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4b8fce([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x263173=_0x5848c2(_0x4b8fce([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5150e5[_0x4b8fce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4b8fce([0x74,0x72,0x69,0x61,0x6c])&&(_0x263173=_0x5848c2(_0x4b8fce([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xf5098e()):_0x4b8fce([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4b8fce([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4b8fce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4b8fce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3d67e5(){const _0x2a889b=[_0x4b8fce([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4b8fce([0x74,0x72,0x69,0x61,0x6c])][_0x4b8fce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5150e5[_0x4b8fce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1b9cf6/0x3e8:0xe10*_0x4fc3d0;return _0x5150e5[_0x4b8fce([0x65,0x78,0x70])]<_0x2a889b;}function _0x1fcbbb(){const _0x1228ee=_0x5150e5[_0x4b8fce([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1228ee&&(!!_0x1228ee[_0x4b8fce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b8fce([0x2a]))||!!_0x1228ee[_0x4b8fce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b8fce([0x55,0x50,0x4c,0x43])));}function _0x27ce82(){const _0x35ff7f=_0x5150e5[_0x4b8fce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x35ff7f||0x0==_0x35ff7f[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x8b2184}=new URL(window[_0x4b8fce([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x35ff7f[_0x4b8fce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8b2184))return!0x0;const _0x18f3b9=_0x8b2184[_0x4b8fce([0x73,0x70,0x6c,0x69,0x74])](_0x4b8fce([0x2e]));return _0x35ff7f[_0x4b8fce([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3ea97f=>_0x3ea97f[_0x4b8fce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b8fce([0x2a])))[_0x4b8fce([0x6d,0x61,0x70])](_0x3f74b5=>_0x3f74b5[_0x4b8fce([0x73,0x70,0x6c,0x69,0x74])](_0x4b8fce([0x2e])))[_0x4b8fce([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5400b1=>_0x5400b1[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x18f3b9[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4b8fce([0x6d,0x61,0x70])](_0x5893f7=>Array(_0x18f3b9[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5893f7[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4b8fce([0x66,0x69,0x6c,0x6c])](_0x5893f7[0x0]===_0x4b8fce([0x2a])?_0x4b8fce([0x2a]):'')[_0x4b8fce([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5893f7))[_0x4b8fce([0x73,0x6f,0x6d,0x65])](_0x1e2622=>_0x18f3b9[_0x4b8fce([0x65,0x76,0x65,0x72,0x79])]((_0x4b57ce,_0x131ab3)=>_0x1e2622[_0x131ab3]===_0x4b57ce||_0x1e2622[_0x131ab3]===_0x4b8fce([0x2a])));}function _0xf5098e(){return _0x263173&&_0x113198?new window[(_0x4b8fce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1448db,_0x135ef5)=>{_0x263173[_0x4b8fce([0x74,0x68,0x65,0x6e])](_0x1448db,_0x135ef5),_0x113198[_0x4b8fce([0x74,0x68,0x65,0x6e])](_0x471b9c=>{_0x471b9c!=_0x4b8fce([0x56,0x61,0x6c,0x69,0x64])&&_0x1448db(_0x471b9c);},_0x135ef5);}):_0x263173||_0x113198||_0x4b8fce([0x56,0x61,0x6c,0x69,0x64]);}}function _0x20737b(_0x47a930,_0x565d3f){return new window[(_0x4b8fce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35b114=>{if(_0x34b31f())return _0x35b114(_0x4b8fce([0x56,0x61,0x6c,0x69,0x64]));_0x1eb495(),_0x2ab94c[_0x4b8fce([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4b8fce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3ac57a=!0x1;const _0x586b24=_0x2c4b05();function _0x3ab377(_0x2bc405){return!!_0x2bc405&&(typeof _0x2bc405===_0x4b8fce([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2bc405===_0x4b8fce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2bc405[_0x4b8fce([0x74,0x68,0x65,0x6e])]===_0x4b8fce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2bc405[_0x4b8fce([0x63,0x61,0x74,0x63,0x68])]===_0x4b8fce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4fdc87(_0x134fb4){_0x11121c(_0x134fb4)[_0x4b8fce([0x74,0x68,0x65,0x6e])](_0x514ddd=>{if(!_0x514ddd||_0x514ddd[_0x4b8fce([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4b8fce([0x6f,0x6b]))return _0x4b8fce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5e111b(_0x273e0d(_0x586b24+_0x565d3f))!=_0x514ddd[_0x4b8fce([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4b8fce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4b8fce([0x56,0x61,0x6c,0x69,0x64]);})[_0x4b8fce([0x74,0x68,0x65,0x6e])](_0x313e23=>(_0x8420a9(),_0x313e23),()=>{const _0x311476=_0x22c759();return null==_0x311476?(_0x8420a9(),_0x4b8fce([0x56,0x61,0x6c,0x69,0x64])):_0x4b8fce(_0x1b9cf6-_0x311476>(0x27d454df^_0x211393)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4b8fce([0x74,0x68,0x65,0x6e])](_0x35b114)[_0x4b8fce([0x63,0x61,0x74,0x63,0x68])](()=>{_0x35b114(_0x4b8fce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3ac25d=0x3ee3e5f^_0x211393;function _0x8420a9(){const _0x3917f8=_0x4b8fce([0x6c,0x6c,0x63,0x74,0x2d])+_0x5e111b(_0x273e0d(_0x47a930)),_0x5addd8=_0x564e7c(_0x5e111b(window[_0x4b8fce([0x4d,0x61,0x74,0x68])][_0x4b8fce([0x63,0x65,0x69,0x6c])](_0x1b9cf6/_0x3ac25d)));window[_0x4b8fce([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4b8fce([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3917f8,_0x5addd8);}function _0x22c759(){const _0x4cfc9d=_0x4b8fce([0x6c,0x6c,0x63,0x74,0x2d])+_0x5e111b(_0x273e0d(_0x47a930)),_0x40c838=window[_0x4b8fce([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4b8fce([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4cfc9d);return _0x40c838?window[_0x4b8fce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x564e7c(_0x40c838),0x10)*_0x3ac25d:null;}function _0x11121c(_0x1f5654){return new window[(_0x4b8fce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa82b74,_0x2f1bf7)=>{_0x1f5654[_0x4b8fce([0x74,0x68,0x65,0x6e])](_0xa82b74,_0x2f1bf7),window[_0x4b8fce([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2f1bf7,0x3d9041f^_0x211393);});}}_0x2ab94c[_0x4b8fce([0x6f,0x6e])](_0x4b8fce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x20d023,_0x3a8ced)=>{if(_0x3a8ced[0x0]!=_0x47a930)return _0x35b114(_0x4b8fce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3a8ced[0x1]={..._0x3a8ced[0x1],[_0x4b8fce([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x586b24};},{[_0x4b8fce([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4b8fce([0x68,0x69,0x67,0x68])}),_0x2ab94c[_0x4b8fce([0x6f,0x6e])](_0x4b8fce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x77cf2f=>{_0x3ab377(_0x77cf2f[_0x4b8fce([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3ac57a=!0x0,_0x4fdc87(_0x77cf2f[_0x4b8fce([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4b8fce([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4b8fce([0x6c,0x6f,0x77])}),_0x425862[_0x4b8fce([0x74,0x68,0x65,0x6e])](()=>{_0x3ac57a||_0x35b114(_0x4b8fce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x34b31f(){return _0x2ab94c[_0x4b8fce([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4b8fce([0x76,0x69,0x65,0x77])][_0x4b8fce([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4b8fce([0x61,0x75,0x74,0x6f]);}function _0x1eb495(){_0x2ab94c[_0x4b8fce([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4b8fce([0x76,0x69,0x65,0x77])][_0x4b8fce([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4b8fce([0x61,0x75,0x74,0x6f]);}}function _0x5848c2(_0x53661a){const _0x3ebcdf=[new window[(_0x4b8fce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24a87f=>setTimeout(_0x24a87f,0x3d1ee13^_0x211393)),_0x425862[_0x4b8fce([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4b8fce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f5919=>{let _0xee2610=0x0;_0x2ab94c[_0x4b8fce([0x6d,0x6f,0x64,0x65,0x6c])][_0x4b8fce([0x6f,0x6e])](_0x4b8fce([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4664e1,_0x1f66b4)=>{_0x1f66b4[0x0][_0x4b8fce([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xee2610++,_0xee2610==(0x3d8d127^_0x211393)&&(_0x2f5919(),_0x4664e1[_0x4b8fce([0x6f,0x66,0x66])]());});}))];return window[_0x4b8fce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4b8fce([0x72,0x61,0x63,0x65])](_0x3ebcdf)[_0x4b8fce([0x74,0x68,0x65,0x6e])](()=>_0x53661a);}async function _0x443506(){await _0x425862,_0x2ab94c[_0x4b8fce([0x6d,0x6f,0x64,0x65,0x6c])][_0x4b8fce([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x597b30,_0x2ab94c[_0x4b8fce([0x6d,0x6f,0x64,0x65,0x6c])][_0x4b8fce([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x597b30,_0x2ab94c[_0x4b8fce([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4b8fce([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4936f3(_0x5e29e0){const _0x30ef10=_0x166cd9();_0x2ab94c[_0x30ef10]=_0x4b8fce([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5e29e0,_0x5e29e0!=_0x4b8fce([0x56,0x61,0x6c,0x69,0x64])&&_0x443506();}function _0x166cd9(){const _0x393edc=window[_0x4b8fce([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4b8fce([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4b8fce([0x6e,0x6f,0x77])]())[_0x4b8fce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4b8fce([0x2e]),'');let _0x2b4854=_0x4b8fce([0x52]);for(let _0xd6685=0x0;_0xd6685<_0x393edc[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd6685+=0x2){let _0x1aa9d4=window[_0x4b8fce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x393edc[_0x4b8fce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd6685,_0xd6685+0x2));_0x1aa9d4>=_0x4fdb7b[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1aa9d4-=_0x4fdb7b[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2b4854+=_0x4fdb7b[_0x1aa9d4];}return _0x2b4854;}function _0x323f36(){const _0x58613e=_0x714561[_0x4b8fce([0x73,0x70,0x6c,0x69,0x74])](_0x4b8fce([0x2e]));if(0x3!=_0x58613e[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4701ab(_0x58613e[0x1]);function _0x4701ab(_0x2c218e){const _0x279fd0=_0x3d5ede(_0x2c218e);return _0x279fd0&&_0x56d6d1()?_0x279fd0:null;function _0x56d6d1(){const _0x2facb3=_0x279fd0[_0x4b8fce([0x6a,0x74,0x69])],_0x137dd1=window[_0x4b8fce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2facb3[_0x4b8fce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2facb3[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x253fb4={..._0x279fd0,[_0x4b8fce([0x6a,0x74,0x69])]:_0x2facb3[_0x4b8fce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2facb3[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x253fb4[_0x4b8fce([0x76,0x63])],_0x273e0d(_0x253fb4)==_0x137dd1;}}}async function _0x37f494(){let _0x206eac=!0x0;try{const _0x232c2f=_0x714561[_0x4b8fce([0x73,0x70,0x6c,0x69,0x74])](_0x4b8fce([0x2e])),[_0x30e87a,_0x1e4f61,_0x3ea081]=_0x232c2f;return _0x3956a3(_0x30e87a),await _0x354c8e(_0x30e87a,_0x1e4f61,_0x3ea081),_0x206eac;}catch{return!0x1;}function _0x3956a3(_0x5a8320){const _0x10d806=_0x3d5ede(_0x5a8320);_0x10d806&&_0x10d806[_0x4b8fce([0x61,0x6c,0x67])]==_0x4b8fce([0x45,0x53,0x32,0x35,0x36])||(_0x206eac=!0x1);}async function _0x354c8e(_0x1947da,_0x274f0c,_0x9b5011){const _0x43e0a5=window[_0x4b8fce([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4b8fce([0x66,0x72,0x6f,0x6d])](_0x31e86d(_0x9b5011),_0x427f49=>_0x427f49[_0x4b8fce([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x347b82=new window[(_0x4b8fce([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4b8fce([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1947da+_0x4b8fce([0x2e])+_0x274f0c),_0x551e85=window[_0x4b8fce([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4b8fce([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x551e85)return;const _0x8e6659=await _0x551e85[_0x4b8fce([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4b8fce([0x6a,0x77,0x6b]),_0x14e59e,{[_0x4b8fce([0x6e,0x61,0x6d,0x65])]:_0x4b8fce([0x45,0x43,0x44,0x53,0x41]),[_0x4b8fce([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4b8fce([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4b8fce([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x551e85[_0x4b8fce([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4b8fce([0x6e,0x61,0x6d,0x65])]:_0x4b8fce([0x45,0x43,0x44,0x53,0x41]),[_0x4b8fce([0x68,0x61,0x73,0x68])]:{[_0x4b8fce([0x6e,0x61,0x6d,0x65])]:_0x4b8fce([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x8e6659,_0x43e0a5,_0x347b82)||(_0x206eac=!0x1);}}function _0x3d5ede(_0x2019e3){return _0x2019e3[_0x4b8fce([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4b8fce([0x65,0x79]))?JSON[_0x4b8fce([0x70,0x61,0x72,0x73,0x65])](_0x31e86d(_0x2019e3)):null;}function _0x31e86d(_0x10c323){return window[_0x4b8fce([0x61,0x74,0x6f,0x62])](_0x10c323[_0x4b8fce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4b8fce([0x2b]))[_0x4b8fce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4b8fce([0x2f])));}function _0x273e0d(_0x48a996){let _0x3dde11=0x1505;function _0x14950e(_0x46999a){for(let _0x4e9e34=0x0;_0x4e9e34<_0x46999a[_0x4b8fce([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4e9e34++){const _0x3079b4=_0x46999a[_0x4b8fce([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4e9e34);_0x3dde11=(_0x3dde11<<0x5)+_0x3dde11+_0x3079b4,_0x3dde11&=_0x3dde11;}}function _0x443d9f(_0x238b7e){Array[_0x4b8fce([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x238b7e)?_0x238b7e[_0x4b8fce([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x443d9f):_0x238b7e&&typeof _0x238b7e==_0x4b8fce([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4b8fce([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x238b7e)[_0x4b8fce([0x73,0x6f,0x72,0x74])]()[_0x4b8fce([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x6a8666,_0x477fc4])=>{_0x14950e(_0x6a8666),_0x443d9f(_0x477fc4);}):_0x14950e(window[_0x4b8fce([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x238b7e));}return _0x443d9f(_0x48a996),_0x3dde11>>>0x0;}function _0x5e111b(_0x29855){return _0x29855[_0x4b8fce([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4b8fce([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4b8fce([0x30]));}function _0x564e7c(_0x1e0288){return _0x1e0288[_0x4b8fce([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4b8fce([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4b8fce([0x6a,0x6f,0x69,0x6e])]('');}function _0x597b30(){}function _0x4b8fce(_0x37cfee){return _0x37cfee['map'](_0x582dfa=>String['fromCharCode'](_0x582dfa))['join']('');}_0x4936f3(await _0x4b5afd());}(this);}['_initSchema'](){const _0x2c5eb3=this['editor']['model']['schema'];_0x2c5eb3['isRegistered']('imageBlock')&&_0x2c5eb3['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x2c5eb3['isRegistered']('imageInline')&&_0x2c5eb3['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x2bbc2c=this['editor'];_0x2bbc2c['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x2bbc2c['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x29c1d4=>_0x29c1d4['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4a9e3b=_0x2bbc2c['commands']['get']('replaceImageSource');_0x4a9e3b&&this['listenTo'](_0x4a9e3b,'cleanupImage',(_0x125d8f,[_0x4de4fa,_0x48cdb7])=>{_0x4de4fa['removeAttribute']('uploadcareImageId',_0x48cdb7);});}['_initConfig'](){const _0x205f35=this['editor']['config']['get']('uploadcare.uploader')||{},_0x42de6b=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1d5897(_0x506da4['document'],'uc-config',{..._0x205f35,'pubkey':_0x42de6b,'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']=_0x4371ab=>{if('closeMax'==_0x4371ab)return'#uc-icon-arrow-down';},_0x506da4['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1d5897(_0x506da4['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x506da4['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x49d574=this['editor']['commands']['get']('insertImage');_0x49d574&&this['listenTo'](_0x49d574,'execute',()=>{const _0x1f4468=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1f4468&&_0x1f4468['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1f4468);});});const _0x42bce4=this['editor']['commands']['get']('uploadcareImageReplace');_0x42bce4&&this['listenTo'](_0x42bce4,'execute',()=>{const _0xae8cf8=this['editor']['model']['document']['selection']['getSelectedElement']();_0xae8cf8&&_0xae8cf8['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0xae8cf8);});});}}class tt extends _0x55795a{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f0dd7){super(_0x1f0dd7),_0x1f0dd7['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4b2ba7['defineComponents'](_0x4b2ba7);}}class ii extends _0x2b7683{constructor(_0x3b7192){super(_0x3b7192);const t=_0x3b7192['t'],_0x189e2c=this['bindTemplate'],_0x5d9ba6=new _0x4d0e0e();_0x5d9ba6['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':[_0x5d9ba6,{'text':_0x189e2c['to']('imageUploadProgress',_0x30e08b=>t('Loading\x20image...')+'\x20('+(_0x30e08b||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 _0x2b7683{constructor(_0x409c09){super(_0x409c09);const t=_0x409c09['t'];this['set']('errorType',null);const _0x4a27ab=new _0x17b7cf(_0x409c09);_0x4a27ab['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4a27ab['withText']=!0x0,_0x4a27ab['class']='ck-button-action',_0x4a27ab['on']('execute',()=>{this['fire']('retry');}),_0x4a27ab['bind']('isVisible')['to'](this,'errorType',_0x5b61cc=>'NotFound'!==_0x5b61cc);const _0x4de064=new _0x1b02c3();_0x4de064['content']=_0x461168,_0x4de064['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x53923e=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':[_0x4de064,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x53923e['to']('errorType',_0x36a5e0=>t('NotFound'!==_0x36a5e0?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4a27ab]},{'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 _0x2b7683{constructor(_0x469ceb,_0x5e2753){super(_0x469ceb);const _0x30a7bf=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5e2753,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x30a7bf['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2a74b7,_0x5de3d4,_0x568372){super(_0x2a74b7),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x2a74b7),this['_errorView']=new ti(_0x2a74b7),this['_editingView']=new ei(_0x2a74b7,_0x568372),this['_focusableView']=new _0x2b7683(_0x2a74b7),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5de3d4),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'],_0x366a33=>{this['_addUploadcareImageEditorListeners'](_0x366a33);});}),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'](_0x371a24,_0xef5718){const _0x580281='uc-cloud-image-editor',_0x3665c7=_0x371a24['querySelector'](_0x580281);if(_0x3665c7)return _0xef5718(_0x3665c7);const _0x24a335=new MutationObserver(_0x42e657=>{const _0x257ebe=_0x42e657['filter'](_0x2097c0=>_0x2097c0['target']===_0x371a24&&_0x2097c0['addedNodes']['length']>0x0&&_0x2097c0['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x580281);_0x257ebe['length']&&(_0x24a335['disconnect'](),_0xef5718(_0x257ebe[0x0]['addedNodes'][0x0]));});_0x24a335['observe'](_0x371a24,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x1d0433){_0x1d0433['addEventListener']('apply',_0x102c6e=>{this['fire']('apply',{'imageSrc':_0x102c6e['detail']['cdnUrl']});}),_0x1d0433['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
- _0x15a8fe(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2f3c36,_0x3919db,_0x3752ae){super(),this['_editor']=_0x2f3c36,this['_dialog']=_0x3919db,this['_imageElement']=_0x3752ae,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 _0x41a641=this['_imageElement'],_0x3633fe=_0x41a641['getAttribute']('uploadcareImageId'),_0x10dd0b=_0x41a641['getAttribute']('src');if(_0x3633fe)await this['_loadImageInfo'](_0x3633fe,_0x10dd0b);else{if(this['_imageCache']['has'](_0x10dd0b)){const _0xee12db=this['_imageCache']['get'](_0x10dd0b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xee12db['url'],this['imageDimension']=_0xee12db['dimension'],this['imageId']=_0xee12db['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2b3b16}=this['_editor'],t=_0x2b3b16['t'],_0x3bb1dc=new X(_0x2b3b16,this['imageStatus'],this['_attributes']);_0x3bb1dc['bind']('status')['to'](this,'imageStatus'),_0x3bb1dc['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3bb1dc['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3bb1dc['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3bb1dc,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4b0aab,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3bb1dc,'position':_0x3461e1['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3bb1dc['focus']();},'onHide':()=>{_0x3bb1dc['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5d433b=>!A(_0x5d433b,_0x3bb1dc['element'])}});}['_loadImageInfo'](_0x39d07c,_0x235a11){return j['getInfo'](_0x39d07c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x4407e1=>{const {width:_0x2a7a66,height:_0x3212c5}=_0x4407e1['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x235a11,this['imageDimension']={'width':_0x2a7a66,'height':_0x3212c5},this['imageId']=_0x39d07c;})['catch'](_0x5807fb=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5807fb['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x18a82c,_0x3defd1){return this['_getImageAsFile'](_0x18a82c)['then'](_0x387cc1=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x3defd1['signal'],'file':_0x387cc1,'onProgress':_0x43301a=>{_0x43301a&&_0x43301a['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x43301a['value']));}}))['then'](_0x5a0acd=>{const {width:_0x479d3a,height:_0x1b5b91}=_0x5a0acd['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5a0acd['cdnUrl'],this['imageDimension']={'width':_0x479d3a,'height':_0x1b5b91},this['imageId']=_0x5a0acd['uuid'],this['imageUploadProgress']=null;const _0x32d561=_0x18a82c['getAttribute']('src');this['_imageCache']['set'](_0x32d561,{'id':_0x5a0acd['uuid'],'url':_0x5a0acd['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x97b856=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x97b856['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x16fbaa,_0x8217f1){_0x16fbaa['on']('apply',(_0x3e3ddf,_0x2537f0)=>{this['_replaceImage'](_0x8217f1,_0x2537f0['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x16fbaa['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x16fbaa['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1c6cbf,_0x341243,_0x9e6f56){const _0x2baf92=this['_editor'],{width:_0xbab3c,height:_0x12237d}=S(_0x341243,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x11834c,imageSources:_0x33727c}=C(_0x341243,_0xbab3c);_0x2baf92['model']['change'](_0x3cccbd=>{if('$graveyard'===_0x1c6cbf['root']['rootName']){_0x2baf92['execute']('insertImage',{'imageType':_0x1c6cbf['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1c6cbf['getAttributes']()),'uploadcareImageId':_0x9e6f56,'src':_0x11834c,'sources':_0x33727c,'width':_0xbab3c,'height':_0x12237d}});const _0x3922b1=_0x1c6cbf['getChildren']();_0x1c6cbf=_0x2baf92['model']['document']['selection']['getSelectedElement']();for(const _0x5df722 of _0x3922b1)_0x3cccbd['append'](_0x3cccbd['cloneElement'](_0x5df722),_0x1c6cbf);}else _0x3cccbd['setSelection'](_0x1c6cbf,'on'),_0x2baf92['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1c6cbf['getAttributes']()),'uploadcareImageId':_0x9e6f56,'src':_0x11834c,'sources':_0x33727c,'width':_0xbab3c,'height':_0x12237d},_0x1c6cbf);_0x3cccbd['setSelection'](_0x1c6cbf,'on');});}async['_getImageAsFile'](_0x1bb578){const _0xa3282e=_0x506da4['window'],_0x173718=_0x506da4['document']['location']['href'],_0x496a9f=new _0xa3282e['URL'](_0x1bb578['getAttribute']('src'),_0x173718);if('data:'===_0x496a9f['protocol']){const _0xa62769=_0x496a9f['href']['split'](','),_0x2750da=_0xa62769[0x0]['match'](/:(.*?);/)[0x1],_0x153f3b=_0x2750da['split']('/')[0x1],_0x293d94=_0xa3282e['atob'](_0xa62769[_0xa62769['length']-0x1]);let _0x206e9d=_0x293d94['length'];const _0x2a798a=new _0xa3282e['Uint8Array'](_0x206e9d);for(;_0x206e9d--;)_0x2a798a[_0x206e9d]=_0x293d94['charCodeAt'](_0x206e9d);return new _0xa3282e['File']([_0x2a798a],'image.'+_0x153f3b,{'type':_0x2750da});}const _0x3bbee9=_0x496a9f['href']['split']('/'),_0x13238f=_0x3bbee9[_0x3bbee9['length']-0x1],_0x256474=_0x13238f['split']('.')[0x1];return _0xa3282e['fetch'](_0x496a9f['href'])['then'](_0x123126=>_0x123126['clone']()['blob']())['then'](_0xeeba35=>new _0xa3282e['File']([_0xeeba35],_0x13238f,{'type':'image/'+_0x256474}));}}class Q extends _0x453090{['imageEditController'];static get['requires'](){return[_0x23db15];}['_isEditable'];constructor(_0x149f4b){super(_0x149f4b),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4f8d02){const _0x5d7251=z(_0x4f8d02);return _0x5a3813=>!(!_0x5a3813||!_0x5a3813['is']('element','imageBlock')&&!_0x5a3813['is']('element','imageInline'))&&(!!_0x5a3813['hasAttribute']('uploadcareImageId')||!!_0x5a3813['hasAttribute']('src')&&_0x5d7251(_0x5a3813['getAttribute']('src')));}(_0x149f4b['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x35eed1=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x35eed1);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x403581=this['editor']['model']['document']['selection']['getSelectedElement']();_0x403581&&(_0x403581['is']('element','imageBlock')||_0x403581['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x23db15),_0x403581),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x453090{['refresh'](){const _0x1d3df5=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1d3df5&&(_0x1d3df5['is']('element','imageBlock')||_0x1d3df5['is']('element','imageInline')));}['execute'](_0x3a4d39){const _0x553945=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x2465b2=>{_0x2465b2['setAttributes'](_0x3a4d39,_0x553945),_0x2465b2['removeAttribute']('srcset',_0x553945),_0x2465b2['removeAttribute']('sizes',_0x553945);});}}class m extends _0x55795a{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x163e8c,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x17e078}=this;_0x17e078['commands']['add']('uploadcareImageEdit',new Q(_0x17e078)),_0x17e078['commands']['add']('uploadcareImageReplace',new V(_0x17e078));}}class g extends _0x55795a{['_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 _0x56a4aa=this['editor'];_0x56a4aa['ui']['componentFactory']['add']('uploadcareImageEdit',_0x52305b=>{const _0x36b1c0=_0x56a4aa['commands']['get']('uploadcareImageEdit'),_0x560b35=new _0x17b7cf(_0x52305b),t=_0x52305b['t'];return _0x560b35['set']({'icon':_0x4b0aab,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x560b35['bind']('isEnabled')['to'](_0x36b1c0),_0x560b35['bind']('isOn')['to'](_0x36b1c0,'isActive'),this['listenTo'](_0x560b35,'execute',()=>{_0x56a4aa['execute']('uploadcareImageEdit'),_0x56a4aa['editing']['view']['focus']();}),_0x560b35;}),this['_initConfig']();}['_initConfig'](){const _0x4df272=_0x1d5897(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4df272),this['listenTo'](this['editor'],'destroy',()=>{_0x4df272['remove']();});}}class et extends _0x55795a{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 _0x3c1180,Command as _0x316df6}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4022ee,IconGooglePhotos as _0x2495cb,IconGoogleDrive as _0x40b2fc,IconFacebook as _0x5cd74e,IconDropbox as _0x531c88,IconUploadcareLink as _0x666d84,IconUploadcareImageUpload as _0xb2bc43,IconError as _0x16049a,IconUploadcareImageEdit as _0x447f52}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x4a2eae,MenuBarMenuListItemButtonView as _0x396279,View as _0x4c4a39,FocusCycler as _0x712482,Dialog as _0x46539f,DialogViewPosition as _0x16dad4,SpinnerView as _0xb15fb0,IconView as _0x53bca2,Notification as _0x334bb3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x330518,DomEmitterMixin as _0x12f8c7,global as _0x2a2a88,getAncestors as _0x50dff6,ObservableMixin as _0x558bcb,uid as _0x42a876,createElement as _0x1737e0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x5c3117}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x54e1e3,info as _0x5832b1}from'@uploadcare/upload-client';import*as _0x4ebd6d from'@uploadcare/file-uploader';var i=function(_0x61d2b0){return _0x61d2b0['Local']='local',_0x61d2b0['URL']='url',_0x61d2b0['Dropbox']='dropbox',_0x61d2b0['GDrive']='gdrive',_0x61d2b0['Facebook']='facebook',_0x61d2b0['GPhotos']='gphotos',_0x61d2b0['OneDrive']='onedrive',_0x61d2b0;}({});function _(_0x297719,_0x5510a6,_0x1a887a){const t=_0x297719['t'],_0x21b124=_0x297719['t'];switch(_0x5510a6){case i['Local']:return{'text':_0x21b124('Insert'===_0x1a887a?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x21b124('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x1a887a?_0x21b124('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x21b124('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x5510a6;}}class e extends _0x3c1180{['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 _0x5ceb7d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x183014;for(const _0x190edc in _0x5ceb7d){const _0x47a61a=_0x190edc,_0x2481f6=_0x5ceb7d[_0x47a61a];if('uploadcareLicenseKeyValid'==_0x2481f6||'uploadcareLicenseKeyInvalid'==_0x2481f6||'uploadcareLicenseKeyExpired'==_0x2481f6||'uploadcareLicenseKeyDomainLimit'==_0x2481f6||'uploadcareLicenseKeyNotAllowed'==_0x2481f6||'uploadcareLicenseKeyEvaluationLimit'==_0x2481f6||'uploadcareLicenseKeyTrialLimit'==_0x2481f6||'uploadcareLicenseKeyUsageLimit'==_0x2481f6){delete _0x5ceb7d[_0x47a61a],_0x183014=_0x2481f6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x183014&&_0x5ceb7d['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x183014&&_0x5ceb7d['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x183014&&_0x5ceb7d['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x183014&&_0x5ceb7d['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x183014&&_0x5ceb7d['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x183014&&_0x5ceb7d['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x183014&&_0x5ceb7d['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x5ce28e}=this,_0x4d66cd=_0x5ce28e['commands']['get']('uploadcare');if(!_0x4d66cd)return;const _0x5f5bf7=this['_normalizeConfigSourceList'](_0x5ce28e['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x3b97cf,_0x1aad77)=>{const _0x180fd0=this['_getIntegrationKey'](_0x1aad77['type']);return _0x3b97cf[_0x180fd0]||(_0x3b97cf[_0x180fd0]=[]),_0x3b97cf[_0x180fd0]['push'](_0x1aad77),_0x3b97cf;},{});_0x5ce28e['plugins']['has']('ImageInsertUI')&&_0x5ce28e['commands']['get']('uploadcare')&&Object['entries'](_0x5f5bf7)['forEach'](([_0x1d8bd1,_0x349ebc])=>{_0x5ce28e['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x1d8bd1,'observable':()=>_0x4d66cd,'buttonViewCreator':()=>this['_createToolbarButton'](_0x349ebc),'formViewCreator':()=>this['_createDropdownButtons'](_0x349ebc),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x349ebc),'override':'assetManager'!==_0x1d8bd1});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x435926){const {locale:_0x2bd35a}=this['editor'];return _0x435926['map'](_0xaa2665=>{const _0xc37c2d=_(_0x2bd35a,_0xaa2665,'Insert');switch(_0xaa2665){case i['Local']:return{'icon':_0xb2bc43,'type':i['Local'],..._0xc37c2d};case i['URL']:return{'icon':_0x666d84,'type':i['URL'],..._0xc37c2d};case i['Dropbox']:return{'icon':_0x531c88,'type':i['Dropbox'],..._0xc37c2d};case i['Facebook']:return{'icon':_0x5cd74e,'type':i['Facebook'],..._0xc37c2d};case i['GDrive']:return{'icon':_0x40b2fc,'type':i['GDrive'],..._0xc37c2d};case i['GPhotos']:return{'icon':_0x2495cb,'type':i['GPhotos'],..._0xc37c2d};case i['OneDrive']:return{'icon':_0x4022ee,'type':i['OneDrive'],..._0xc37c2d};}});}['_getIntegrationKey'](_0x3f3bb0){switch(_0x3f3bb0){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x33ebd1,_0x5543fd){const _0x475234=this['editor'],_0x4bd5e4=new _0x33ebd1(_0x475234['locale']),_0x5ad49e=_0x475234['commands']['get']('uploadcare');return _0x4bd5e4['bind']('isEnabled')['to'](_0x5ad49e),_0x4bd5e4['on']('execute',()=>{_0x5ad49e['execute'](_0x5543fd);}),_0x4bd5e4;}['_createToolbarButton'](_0x4827bd){const {locale:_0x19d677}=this['editor'],_0x915e82=this['editor']['plugins']['get']('ImageInsertUI'),_0x25cd5c=_0x4827bd[0x0],_0x5894fd=this['_createButton'](_0x4a2eae,_0x25cd5c['type']);return _0x5894fd['icon']=_0x25cd5c['icon'],_0x5894fd['bind']('label')['to'](_0x915e82,'isImageSelected',_0x6ffbb7=>_(_0x19d677,_0x25cd5c['type'],_0x6ffbb7?'Replace':'Insert')['text']),_0x5894fd['tooltip']=!0x0,_0x5894fd;}['_createDropdownButtons'](_0x59d9ba){const {locale:_0x181316}=this['editor'],_0x4a86e6=this['editor']['plugins']['get']('ImageInsertUI');return _0x59d9ba['map'](_0x1f8f18=>{const _0x383232=this['_createButton'](_0x4a2eae,_0x1f8f18['type']);return _0x383232['withText']=!0x0,_0x383232['icon']=_0x1f8f18['icon'],_0x383232['bind']('label')['to'](_0x4a86e6,'isImageSelected',_0x37f6c0=>_(_0x181316,_0x1f8f18['type'],_0x37f6c0?'Replace':'Insert')['text']),_0x383232;});}['_createMenuBarButtons'](_0x1c954c){return _0x1c954c['map'](_0x361616=>{const _0x435aa8=this['_createButton'](_0x396279,_0x361616['type']);return _0x435aa8['icon']=_0x361616['icon'],_0x435aa8['label']=_0x361616['shortText'],_0x435aa8;});}}class F extends _0x4c4a39{['focusTracker'];['focusCycler'];constructor(_0x468874){super(_0x468874),this['focusTracker']=new _0x330518(),this['focusCycler']=new _0x712482({'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(_0x1c0d93,_0x49f85a){super(_0x1c0d93),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-'+_0x49f85a}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x2be080,_0x5b75c5){const _0x269b78=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x5504d2=>_0x5504d2<=_0x5b75c5)['map'](_0x2baf32=>_0x2be080['replace'](/\/$/,'')+'/-/resize/'+_0x2baf32+'x/\x20'+_0x2baf32+'w');return{'imageFallbackUrl':_0x2be080,'imageSources':[{'srcset':_0x269b78['join'](',\x20'),'sizes':'(max-width:\x20'+_0x5b75c5+'px)\x20100vw,\x20'+_0x5b75c5+'px','type':'image/webp'}]};}function S(_0x416555,_0x544698,_0xb2e39d){const _0x1b39d9=_0x416555['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1b39d9?parseInt(_0x1b39d9[0x1],0xa):_0x544698,'height':_0x1b39d9?parseInt(_0x1b39d9[0x2],0xa):_0xb2e39d};}function p(_0x2732a8,_0x223385){const _0x2cf1db=new(_0x12f8c7())(),_0x5f1e59=_0x2732a8['plugins']['get']('ImageUtils'),_0xf2741b=_0x2732a8['editing']['mapper']['toViewElement'](_0x223385),_0xec6d96=_0x5f1e59['findViewImgElement'](_0xf2741b),_0x974153=_0x2732a8['editing']['view']['domConverter']['viewToDom'](_0xec6d96),_0x40bbc1=_0x223385['getAttribute']('width'),_0x2287c4=_0x223385['getAttribute']('height'),_0x3e7375='image-processing';_0x2732a8['editing']['view']['change'](_0x2aa3b8=>{_0x2aa3b8['addClass'](_0x3e7375,_0xf2741b),_0x2aa3b8['setStyle']('aspect-ratio',_0x40bbc1+'/'+_0x2287c4,_0xec6d96);}),_0x2cf1db['listenTo'](_0x974153,'load',()=>{_0x2cf1db['stopListening'](_0x974153,'load'),_0x2732a8['editing']['view']['change'](_0x4e1c9e=>{_0x4e1c9e['removeClass'](_0x3e7375,_0xf2741b),_0x4e1c9e['removeStyle']('aspect-ratio',_0xec6d96);});});}function G(_0x40b5a6){if(Array['isArray'](_0x40b5a6)){const _0x24a163=_0x40b5a6['map'](G);return _0x125f6a=>_0x24a163['some'](_0x1f8cef=>_0x1f8cef(_0x125f6a));}if('origin'==_0x40b5a6){const _0x3bdf25=_0x2a2a88['window']['location']['origin'];return _0xf78513=>new URL(_0xf78513,_0x2a2a88['document']['baseURI'])['origin']==_0x3bdf25;}return'function'==typeof _0x40b5a6?_0x40b5a6:_0x40b5a6 instanceof RegExp?_0x5bfb9a=>!(!_0x5bfb9a['match'](_0x40b5a6)&&!_0x5bfb9a['replace'](/^https?:\/\//,'')['match'](_0x40b5a6)):()=>!0x1;}function A(_0x4291a2,_0x3f8ea1){return _0x50dff6(_0x4291a2['target'])['includes'](_0x3f8ea1);}class n extends/* #__PURE__ -- @preserve */
24
+ _0x558bcb(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x3a50df,_0x15a459,_0x490499){super(),this['_editor']=_0x3a50df,this['_editing']=_0x15a459,this['_dialog']=_0x3a50df['plugins']['get'](_0x46539f),this['_api']=_0x15a459['ctxElement']['getAPI'](),this['_type']=_0x490499,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:_0x2aee8c,model:_0x31560d}=this['_editor'],_0x2d8e02=_0x31560d['document']['selection']['getSelectedElement'](),_0x5c52c4=_0x2d8e02&&(_0x2d8e02['is']('element','imageBlock')||_0x2d8e02['is']('element','imageInline'));this['_formView']=new x(_0x2aee8c,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0xb2bc43,'title':_(_0x2aee8c,this['_type'],_0x5c52c4?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x16dad4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x395347=>!A(_0x395347,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x18c891}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1f6b36=>{const _0x3f098f=_0x18c891['length'];for(const _0x12d5e6 of _0x18c891){const _0x4df2ed=_0x12d5e6===_0x18c891[_0x3f098f-0x1],{cdnUrl:_0x5e6064,fileInfo:_0x385450}=_0x12d5e6;if(!_0x5e6064||!_0x385450)continue;const {width:_0x47641e,height:_0x51bc8c}=_0x385450['imageInfo'],_0x4e0fa6=S(_0x5e6064,_0x47641e,_0x51bc8c),_0x2717a3=C(_0x5e6064,_0x4e0fa6['width']),_0x10da70={'id':_0x385450['uuid'],'type':'image','attributes':{'imageDimension':_0x4e0fa6,..._0x2717a3}};this['_insertAsset'](_0x10da70,_0x4df2ed,_0x1f6b36);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x289230=>{'idle'===_0x289230['detail']['status']&&!_0x289230['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x43ecff,_0x4e7760,_0x50269e){const _0x36443a=this['_editor']['model']['document']['selection'],_0x2abeb0=_0x36443a['getSelectedElement'](),_0x4a2285=!(!_0x2abeb0||!_0x2abeb0['is']('element','imageInline'));_0x50269e['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x43ecff,_0x4a2285),_0x4e7760||_0x50269e['setSelection'](_0x36443a['getLastPosition']());}['_insertImage'](_0x4e343a,_0x1d7058){const _0x23484b=this['_editor'],{imageDimension:_0x2cfa2b,imageFallbackUrl:_0x2cbe47,imageSources:_0x3351ed}=_0x4e343a['attributes'];_0x23484b['execute']('insertImage',{'imageType':_0x1d7058?'imageInline':null,'source':{'uploadcareImageId':_0x4e343a['id'],'src':_0x2cbe47,'sources':_0x3351ed,..._0x2cfa2b}});}}class w extends _0x316df6{['_editing'];['_controller']=null;static get['requires'](){return[_0x46539f,o];}constructor(_0x223394){super(_0x223394),this['_editing']=_0x223394['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x1175a5){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x1175a5);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x358177,..._0x5cc367}){return _0x54e1e3(_0x358177,_0x5cc367);}static['getInfo'](_0x429553,_0x490db0){return _0x5832b1(_0x429553,_0x490db0);}}class f extends _0x3c1180{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x5c3117,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x18a0a5=this['editor'];if(!!!_0x18a0a5['config']['get']('uploadcare'))return;_0x18a0a5['plugins']['get'](_0x5c3117)['createUploadAdapter']=_0x374721=>new k(_0x374721,_0x18a0a5),_0x18a0a5['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x54eb73,{imageElement:_0x219a1c,data:_0x1474c3})=>{_0x18a0a5['model']['change'](_0x29b5f9=>{_0x29b5f9['setAttribute']('uploadcareImageId',_0x1474c3['uploadcareImageId'],_0x219a1c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x19d57c,_0x437afb){this['loader']=_0x19d57c,this['editor']=_0x437afb,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x398e7d=await this['loader']['file'];return j['upload']({'file':_0x398e7d,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x2fa285=>{_0x2fa285&&_0x2fa285['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x2fa285['value']);}})['then'](async _0x28c1f1=>{const {imageFallbackUrl:_0x11a64e,imageSources:_0x4b15cf}=C(_0x28c1f1['cdnUrl'],_0x28c1f1['imageInfo']['width']);return{'uploadcareImageId':_0x28c1f1['uuid'],'default':_0x11a64e,'sources':_0x4b15cf};})['catch'](()=>{const _0x235466=t('Cannot\x20upload\x20file:')+('\x20'+_0x398e7d['name']+'.');return Promise['reject'](_0x235466);});}['abort'](){this['controller']['abort']();}}class o extends _0x3c1180{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x46539f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x3e2428){super(_0x3e2428),this['ucContextId']=_0x42a876();}['init'](){const _0x4ea1ad=this['editor'];_0x4ea1ad['commands']['add']('uploadcare',new w(_0x4ea1ad));}['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 _0x4d4792=_0x2a2a88['document']['querySelector']('input[uploadcare-file-input]');_0x4d4792&&_0x4d4792['remove']();}),async function(_0x518d76){const _0x36fe3f=_0xa8a344([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x3d54bf=0x3d8d0df,_0x6b5a08=0x3dfa6cf^_0x3d54bf,_0x2dc182=window[_0xa8a344([0x44,0x61,0x74,0x65])][_0xa8a344([0x6e,0x6f,0x77])](),_0x586bc1=_0x518d76[_0xa8a344([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xe78ba9=new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x29dfbb=>{_0x586bc1[_0xa8a344([0x6f,0x6e,0x63,0x65])](_0xa8a344([0x72,0x65,0x61,0x64,0x79]),_0x29dfbb);}),_0x499021={[_0xa8a344([0x6b,0x74,0x79])]:_0xa8a344([0x45,0x43]),[_0xa8a344([0x75,0x73,0x65])]:_0xa8a344([0x73,0x69,0x67]),[_0xa8a344([0x63,0x72,0x76])]:_0xa8a344([0x50,0x2d,0x32,0x35,0x36]),[_0xa8a344([0x78])]:_0xa8a344([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]),[_0xa8a344([0x79])]:_0xa8a344([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]),[_0xa8a344([0x61,0x6c,0x67])]:_0xa8a344([0x45,0x53,0x32,0x35,0x36])},_0x131bda=_0x586bc1[_0xa8a344([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xa8a344([0x67,0x65,0x74])](_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xf78a4a(){let _0x4606e9,_0x3ab0fc=null,_0x5c3863=null;try{if(_0x131bda==_0xa8a344([0x47,0x50,0x4c]))return _0xa8a344([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4606e9=_0x13872d(),!_0x4606e9)return _0xa8a344([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4606e9[_0xa8a344([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5c3863=_0x2d5737(_0x4606e9[_0xa8a344([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4606e9[_0xa8a344([0x6a,0x74,0x69])])),await _0x82e2fd()?_0x3993b7()?_0x5b3638()?_0xa8a344([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x51015d()?(_0x4606e9[_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xa8a344([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3ab0fc=_0x3d0b7f(_0xa8a344([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4606e9[_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xa8a344([0x74,0x72,0x69,0x61,0x6c])&&(_0x3ab0fc=_0x3d0b7f(_0xa8a344([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a3695()):_0xa8a344([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xa8a344([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xa8a344([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xa8a344([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5b3638(){const _0xee9fc3=[_0xa8a344([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xa8a344([0x74,0x72,0x69,0x61,0x6c])][_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4606e9[_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2dc182/0x3e8:0xe10*_0x6b5a08;return _0x4606e9[_0xa8a344([0x65,0x78,0x70])]<_0xee9fc3;}function _0x3993b7(){const _0x357674=_0x4606e9[_0xa8a344([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x357674&&(!!_0x357674[_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa8a344([0x2a]))||!!_0x357674[_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa8a344([0x55,0x50,0x4c,0x43])));}function _0x51015d(){const _0x1f04ca=_0x4606e9[_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1f04ca||0x0==_0x1f04ca[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x282b28}=new URL(window[_0xa8a344([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1f04ca[_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x282b28))return!0x0;const _0x358a65=_0x282b28[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])](_0xa8a344([0x2e]));return _0x1f04ca[_0xa8a344([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x131cfe=>_0x131cfe[_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa8a344([0x2a])))[_0xa8a344([0x6d,0x61,0x70])](_0x2f999e=>_0x2f999e[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])](_0xa8a344([0x2e])))[_0xa8a344([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x54b90e=>_0x54b90e[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x358a65[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xa8a344([0x6d,0x61,0x70])](_0x48998b=>Array(_0x358a65[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x48998b[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xa8a344([0x66,0x69,0x6c,0x6c])](_0x48998b[0x0]===_0xa8a344([0x2a])?_0xa8a344([0x2a]):'')[_0xa8a344([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x48998b))[_0xa8a344([0x73,0x6f,0x6d,0x65])](_0x49db43=>_0x358a65[_0xa8a344([0x65,0x76,0x65,0x72,0x79])]((_0x5ab986,_0x8bc00b)=>_0x49db43[_0x8bc00b]===_0x5ab986||_0x49db43[_0x8bc00b]===_0xa8a344([0x2a])));}function _0x5a3695(){return _0x3ab0fc&&_0x5c3863?new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x508b9f,_0x561f04)=>{_0x3ab0fc[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x508b9f,_0x561f04),_0x5c3863[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x557467=>{_0x557467!=_0xa8a344([0x56,0x61,0x6c,0x69,0x64])&&_0x508b9f(_0x557467);},_0x561f04);}):_0x3ab0fc||_0x5c3863||_0xa8a344([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2d5737(_0x21862e,_0x19f60a){return new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x550034=>{if(_0x14a473())return _0x550034(_0xa8a344([0x56,0x61,0x6c,0x69,0x64]));_0xcc6919(),_0x586bc1[_0xa8a344([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xa8a344([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x19dd38=!0x1;const _0x479589=_0x42a876();function _0x1025b0(_0x471b17){return!!_0x471b17&&(typeof _0x471b17===_0xa8a344([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x471b17===_0xa8a344([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x471b17[_0xa8a344([0x74,0x68,0x65,0x6e])]===_0xa8a344([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x471b17[_0xa8a344([0x63,0x61,0x74,0x63,0x68])]===_0xa8a344([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4da9a9(_0x40cb08){_0x555971(_0x40cb08)[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x9a49bc=>{if(!_0x9a49bc||_0x9a49bc[_0xa8a344([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xa8a344([0x6f,0x6b]))return _0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x470183(_0x24e4b6(_0x479589+_0x19f60a))!=_0x9a49bc[_0xa8a344([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xa8a344([0x56,0x61,0x6c,0x69,0x64]);})[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x34eac2=>(_0xa735a6(),_0x34eac2),()=>{const _0x330d47=_0x49d6bb();return null==_0x330d47?(_0xa735a6(),_0xa8a344([0x56,0x61,0x6c,0x69,0x64])):_0xa8a344(_0x2dc182-_0x330d47>(0x27d454df^_0x3d54bf)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x550034)[_0xa8a344([0x63,0x61,0x74,0x63,0x68])](()=>{_0x550034(_0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5c52d2=0x3ee3e5f^_0x3d54bf;function _0xa735a6(){const _0x227218=_0xa8a344([0x6c,0x6c,0x63,0x74,0x2d])+_0x470183(_0x24e4b6(_0x21862e)),_0x20a8e2=_0x58d57c(_0x470183(window[_0xa8a344([0x4d,0x61,0x74,0x68])][_0xa8a344([0x63,0x65,0x69,0x6c])](_0x2dc182/_0x5c52d2)));window[_0xa8a344([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xa8a344([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x227218,_0x20a8e2);}function _0x49d6bb(){const _0x3b9f09=_0xa8a344([0x6c,0x6c,0x63,0x74,0x2d])+_0x470183(_0x24e4b6(_0x21862e)),_0x3f8251=window[_0xa8a344([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xa8a344([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b9f09);return _0x3f8251?window[_0xa8a344([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58d57c(_0x3f8251),0x10)*_0x5c52d2:null;}function _0x555971(_0x5869bb){return new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x10172e,_0x133425)=>{_0x5869bb[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x10172e,_0x133425),window[_0xa8a344([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x133425,0x3d9041f^_0x3d54bf);});}}_0x586bc1[_0xa8a344([0x6f,0x6e])](_0xa8a344([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2c928c,_0x100ee1)=>{if(_0x100ee1[0x0]!=_0x21862e)return _0x550034(_0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x100ee1[0x1]={..._0x100ee1[0x1],[_0xa8a344([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x479589};},{[_0xa8a344([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xa8a344([0x68,0x69,0x67,0x68])}),_0x586bc1[_0xa8a344([0x6f,0x6e])](_0xa8a344([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3f05dc=>{_0x1025b0(_0x3f05dc[_0xa8a344([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x19dd38=!0x0,_0x4da9a9(_0x3f05dc[_0xa8a344([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xa8a344([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xa8a344([0x6c,0x6f,0x77])}),_0xe78ba9[_0xa8a344([0x74,0x68,0x65,0x6e])](()=>{_0x19dd38||_0x550034(_0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x14a473(){return _0x586bc1[_0xa8a344([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa8a344([0x76,0x69,0x65,0x77])][_0xa8a344([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xa8a344([0x61,0x75,0x74,0x6f]);}function _0xcc6919(){_0x586bc1[_0xa8a344([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa8a344([0x76,0x69,0x65,0x77])][_0xa8a344([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xa8a344([0x61,0x75,0x74,0x6f]);}}function _0x3d0b7f(_0x4e64ed){const _0x4bde88=[new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45e874=>setTimeout(_0x45e874,0x3d1ee13^_0x3d54bf)),_0xe78ba9[_0xa8a344([0x74,0x68,0x65,0x6e])](()=>new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b61dd=>{let _0x4cf283=0x0;_0x586bc1[_0xa8a344([0x6d,0x6f,0x64,0x65,0x6c])][_0xa8a344([0x6f,0x6e])](_0xa8a344([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x31d1a4,_0x293d79)=>{_0x293d79[0x0][_0xa8a344([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4cf283++,_0x4cf283==(0x3d8d127^_0x3d54bf)&&(_0x5b61dd(),_0x31d1a4[_0xa8a344([0x6f,0x66,0x66])]());});}))];return window[_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xa8a344([0x72,0x61,0x63,0x65])](_0x4bde88)[_0xa8a344([0x74,0x68,0x65,0x6e])](()=>_0x4e64ed);}async function _0x5def21(){await _0xe78ba9,_0x586bc1[_0xa8a344([0x6d,0x6f,0x64,0x65,0x6c])][_0xa8a344([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x116518,_0x586bc1[_0xa8a344([0x6d,0x6f,0x64,0x65,0x6c])][_0xa8a344([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x116518,_0x586bc1[_0xa8a344([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xa8a344([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x31c7d1(_0x3358f3){const _0xbaa01d=_0x596832();_0x586bc1[_0xbaa01d]=_0xa8a344([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3358f3,_0x3358f3!=_0xa8a344([0x56,0x61,0x6c,0x69,0x64])&&_0x5def21();}function _0x596832(){const _0x3a7829=window[_0xa8a344([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xa8a344([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xa8a344([0x6e,0x6f,0x77])]())[_0xa8a344([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xa8a344([0x2e]),'');let _0x2aa3a3=_0xa8a344([0x52]);for(let _0x1b5cf6=0x0;_0x1b5cf6<_0x3a7829[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1b5cf6+=0x2){let _0xfdd08f=window[_0xa8a344([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a7829[_0xa8a344([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b5cf6,_0x1b5cf6+0x2));_0xfdd08f>=_0x36fe3f[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xfdd08f-=_0x36fe3f[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2aa3a3+=_0x36fe3f[_0xfdd08f];}return _0x2aa3a3;}function _0x13872d(){const _0x8d5350=_0x131bda[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])](_0xa8a344([0x2e]));if(0x3!=_0x8d5350[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3179ab(_0x8d5350[0x1]);function _0x3179ab(_0x1ae0d2){const _0x1fd2af=_0x2c6b95(_0x1ae0d2);return _0x1fd2af&&_0x333cff()?_0x1fd2af:null;function _0x333cff(){const _0x4ea6f9=_0x1fd2af[_0xa8a344([0x6a,0x74,0x69])],_0x272e5e=window[_0xa8a344([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ea6f9[_0xa8a344([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4ea6f9[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x22d515={..._0x1fd2af,[_0xa8a344([0x6a,0x74,0x69])]:_0x4ea6f9[_0xa8a344([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4ea6f9[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x22d515[_0xa8a344([0x76,0x63])],_0x24e4b6(_0x22d515)==_0x272e5e;}}}async function _0x82e2fd(){let _0x531991=!0x0;try{const _0x4fcd5b=_0x131bda[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])](_0xa8a344([0x2e])),[_0x4ddac9,_0x599713,_0x2e9f0e]=_0x4fcd5b;return _0xed7ee3(_0x4ddac9),await _0x1a458d(_0x4ddac9,_0x599713,_0x2e9f0e),_0x531991;}catch{return!0x1;}function _0xed7ee3(_0x3e964b){const _0x3c0ffb=_0x2c6b95(_0x3e964b);_0x3c0ffb&&_0x3c0ffb[_0xa8a344([0x61,0x6c,0x67])]==_0xa8a344([0x45,0x53,0x32,0x35,0x36])||(_0x531991=!0x1);}async function _0x1a458d(_0x3da148,_0x2543ad,_0x214554){const _0x35c766=window[_0xa8a344([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xa8a344([0x66,0x72,0x6f,0x6d])](_0x180cfe(_0x214554),_0x3f8cc0=>_0x3f8cc0[_0xa8a344([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1834ec=new window[(_0xa8a344([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xa8a344([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3da148+_0xa8a344([0x2e])+_0x2543ad),_0x1c6231=window[_0xa8a344([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xa8a344([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1c6231)return;const _0x4eb0cd=await _0x1c6231[_0xa8a344([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xa8a344([0x6a,0x77,0x6b]),_0x499021,{[_0xa8a344([0x6e,0x61,0x6d,0x65])]:_0xa8a344([0x45,0x43,0x44,0x53,0x41]),[_0xa8a344([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xa8a344([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xa8a344([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1c6231[_0xa8a344([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xa8a344([0x6e,0x61,0x6d,0x65])]:_0xa8a344([0x45,0x43,0x44,0x53,0x41]),[_0xa8a344([0x68,0x61,0x73,0x68])]:{[_0xa8a344([0x6e,0x61,0x6d,0x65])]:_0xa8a344([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4eb0cd,_0x35c766,_0x1834ec)||(_0x531991=!0x1);}}function _0x2c6b95(_0x270be9){return _0x270be9[_0xa8a344([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xa8a344([0x65,0x79]))?JSON[_0xa8a344([0x70,0x61,0x72,0x73,0x65])](_0x180cfe(_0x270be9)):null;}function _0x180cfe(_0x27b9b6){return window[_0xa8a344([0x61,0x74,0x6f,0x62])](_0x27b9b6[_0xa8a344([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xa8a344([0x2b]))[_0xa8a344([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xa8a344([0x2f])));}function _0x24e4b6(_0x3d7008){let _0xf4cbda=0x1505;function _0x4c5c14(_0x33b73c){for(let _0x1a1573=0x0;_0x1a1573<_0x33b73c[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a1573++){const _0x69b147=_0x33b73c[_0xa8a344([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1a1573);_0xf4cbda=(_0xf4cbda<<0x5)+_0xf4cbda+_0x69b147,_0xf4cbda&=_0xf4cbda;}}function _0x4cea93(_0x10c96e){Array[_0xa8a344([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x10c96e)?_0x10c96e[_0xa8a344([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4cea93):_0x10c96e&&typeof _0x10c96e==_0xa8a344([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xa8a344([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x10c96e)[_0xa8a344([0x73,0x6f,0x72,0x74])]()[_0xa8a344([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5b715d,_0x2ac6b9])=>{_0x4c5c14(_0x5b715d),_0x4cea93(_0x2ac6b9);}):_0x4c5c14(window[_0xa8a344([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x10c96e));}return _0x4cea93(_0x3d7008),_0xf4cbda>>>0x0;}function _0x470183(_0x50554f){return _0x50554f[_0xa8a344([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xa8a344([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xa8a344([0x30]));}function _0x58d57c(_0x17256d){return _0x17256d[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])]('')[_0xa8a344([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xa8a344([0x6a,0x6f,0x69,0x6e])]('');}function _0x116518(){}function _0xa8a344(_0x5ebce8){return _0x5ebce8['map'](_0xbaf8c0=>String['fromCharCode'](_0xbaf8c0))['join']('');}_0x31c7d1(await _0xf78a4a());}(this);}['_initSchema'](){const _0x5d7e35=this['editor']['model']['schema'];_0x5d7e35['isRegistered']('imageBlock')&&_0x5d7e35['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x5d7e35['isRegistered']('imageInline')&&_0x5d7e35['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0xe94088=this['editor'];_0xe94088['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0xe94088['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x9dd0f5=>_0x9dd0f5['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x523793=_0xe94088['commands']['get']('replaceImageSource');_0x523793&&this['listenTo'](_0x523793,'cleanupImage',(_0x4a8575,[_0x5c99e1,_0x56659f])=>{_0x5c99e1['removeAttribute']('uploadcareImageId',_0x56659f);});}['_initConfig'](){const _0x28dfa2=this['editor']['config']['get']('uploadcare.uploader')||{},_0xc733a4=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1737e0(_0x2a2a88['document'],'uc-config',{..._0x28dfa2,'pubkey':_0xc733a4,'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']=_0x5a7550=>{if('closeMax'==_0x5a7550)return'#uc-icon-arrow-down';},_0x2a2a88['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1737e0(_0x2a2a88['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x2a2a88['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0xf84fee=this['editor']['commands']['get']('insertImage');_0xf84fee&&this['listenTo'](_0xf84fee,'execute',()=>{const _0x3d20cc=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3d20cc&&_0x3d20cc['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3d20cc);});});const _0x54c563=this['editor']['commands']['get']('uploadcareImageReplace');_0x54c563&&this['listenTo'](_0x54c563,'execute',()=>{const _0x3661d0=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3661d0&&_0x3661d0['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3661d0);});});}}class tt extends _0x3c1180{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe599b3){super(_0xe599b3),_0xe599b3['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4ebd6d['defineComponents'](_0x4ebd6d);}}class ii extends _0x4c4a39{constructor(_0x1e79f5){super(_0x1e79f5);const t=_0x1e79f5['t'],_0x11f5ea=this['bindTemplate'],_0x2c1c41=new _0xb15fb0();_0x2c1c41['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':[_0x2c1c41,{'text':_0x11f5ea['to']('imageUploadProgress',_0xf7dce6=>t('Loading\x20image...')+'\x20('+(_0xf7dce6||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 _0x4c4a39{constructor(_0x4f240e){super(_0x4f240e);const t=_0x4f240e['t'];this['set']('errorType',null);const _0x204847=new _0x4a2eae(_0x4f240e);_0x204847['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x204847['withText']=!0x0,_0x204847['class']='ck-button-action',_0x204847['on']('execute',()=>{this['fire']('retry');}),_0x204847['bind']('isVisible')['to'](this,'errorType',_0x5b9c44=>'NotFound'!==_0x5b9c44);const _0x233cda=new _0x53bca2();_0x233cda['content']=_0x16049a,_0x233cda['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5d024c=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':[_0x233cda,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5d024c['to']('errorType',_0x58639f=>t('NotFound'!==_0x58639f?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x204847]},{'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 _0x4c4a39{constructor(_0x2cdb11,_0x5e3a30){super(_0x2cdb11);const _0x44ecbb=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5e3a30,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x44ecbb['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x267f80,_0x4bf5c9,_0x38e336){super(_0x267f80),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x267f80),this['_errorView']=new ti(_0x267f80),this['_editingView']=new ei(_0x267f80,_0x38e336),this['_focusableView']=new _0x4c4a39(_0x267f80),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x4bf5c9),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'],_0x4c3936=>{this['_addUploadcareImageEditorListeners'](_0x4c3936);});}),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'](_0x99b81d,_0x26423c){const _0x5c3da5='uc-cloud-image-editor',_0x5a2fa5=_0x99b81d['querySelector'](_0x5c3da5);if(_0x5a2fa5)return _0x26423c(_0x5a2fa5);const _0x854211=new MutationObserver(_0x3383cc=>{const _0x560039=_0x3383cc['filter'](_0x2c54bb=>_0x2c54bb['target']===_0x99b81d&&_0x2c54bb['addedNodes']['length']>0x0&&_0x2c54bb['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5c3da5);_0x560039['length']&&(_0x854211['disconnect'](),_0x26423c(_0x560039[0x0]['addedNodes'][0x0]));});_0x854211['observe'](_0x99b81d,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x1e15b9){_0x1e15b9['addEventListener']('apply',_0x112fde=>{this['fire']('apply',{'imageSrc':_0x112fde['detail']['cdnUrl']});}),_0x1e15b9['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
+ _0x558bcb(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x298c85,_0x3e6870,_0x5515d4){super(),this['_editor']=_0x298c85,this['_dialog']=_0x3e6870,this['_imageElement']=_0x5515d4,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 _0x1c6a85=this['_imageElement'],_0x66ac7e=_0x1c6a85['getAttribute']('uploadcareImageId'),_0x3db6f2=_0x1c6a85['getAttribute']('src');if(_0x66ac7e)await this['_loadImageInfo'](_0x66ac7e,_0x3db6f2);else{if(this['_imageCache']['has'](_0x3db6f2)){const _0x1f172e=this['_imageCache']['get'](_0x3db6f2);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1f172e['url'],this['imageDimension']=_0x1f172e['dimension'],this['imageId']=_0x1f172e['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x409fdc}=this['_editor'],t=_0x409fdc['t'],_0x1d8b84=new X(_0x409fdc,this['imageStatus'],this['_attributes']);_0x1d8b84['bind']('status')['to'](this,'imageStatus'),_0x1d8b84['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1d8b84['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1d8b84['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1d8b84,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x447f52,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1d8b84,'position':_0x16dad4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1d8b84['focus']();},'onHide':()=>{_0x1d8b84['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2db7d5=>!A(_0x2db7d5,_0x1d8b84['element'])}});}['_loadImageInfo'](_0x41911a,_0xb4a90f){return j['getInfo'](_0x41911a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x11fa2b=>{const {width:_0x19f003,height:_0x4bfda3}=_0x11fa2b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xb4a90f,this['imageDimension']={'width':_0x19f003,'height':_0x4bfda3},this['imageId']=_0x41911a;})['catch'](_0x380faa=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x380faa['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x40ea71,_0x4b619b){return this['_getImageAsFile'](_0x40ea71)['then'](_0x1626aa=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x4b619b['signal'],'file':_0x1626aa,'onProgress':_0x4cb467=>{_0x4cb467&&_0x4cb467['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4cb467['value']));}}))['then'](_0xa3d734=>{const {width:_0x8baece,height:_0x438258}=_0xa3d734['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xa3d734['cdnUrl'],this['imageDimension']={'width':_0x8baece,'height':_0x438258},this['imageId']=_0xa3d734['uuid'],this['imageUploadProgress']=null;const _0x8f2b9e=_0x40ea71['getAttribute']('src');this['_imageCache']['set'](_0x8f2b9e,{'id':_0xa3d734['uuid'],'url':_0xa3d734['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x51d4eb=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x51d4eb['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x214c1d,_0xcb1368){_0x214c1d['on']('apply',(_0x20afd4,_0x42f33c)=>{this['_replaceImage'](_0xcb1368,_0x42f33c['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x214c1d['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x214c1d['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5c91ab,_0x1de678,_0x1c15bc){const _0x482a51=this['_editor'],{width:_0xccd9b1,height:_0x2a400d}=S(_0x1de678,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x41a086,imageSources:_0x23f230}=C(_0x1de678,_0xccd9b1);_0x482a51['model']['change'](_0x19fc57=>{if('$graveyard'===_0x5c91ab['root']['rootName']){_0x482a51['execute']('insertImage',{'imageType':_0x5c91ab['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5c91ab['getAttributes']()),'uploadcareImageId':_0x1c15bc,'src':_0x41a086,'sources':_0x23f230,'width':_0xccd9b1,'height':_0x2a400d}});const _0x384e58=_0x5c91ab['getChildren']();_0x5c91ab=_0x482a51['model']['document']['selection']['getSelectedElement']();for(const _0x5f487f of _0x384e58)_0x19fc57['append'](_0x19fc57['cloneElement'](_0x5f487f),_0x5c91ab);}else _0x19fc57['setSelection'](_0x5c91ab,'on'),_0x482a51['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5c91ab['getAttributes']()),'uploadcareImageId':_0x1c15bc,'src':_0x41a086,'sources':_0x23f230,'width':_0xccd9b1,'height':_0x2a400d},_0x5c91ab);_0x19fc57['setSelection'](_0x5c91ab,'on');});}async['_getImageAsFile'](_0x5d4ffe){const _0x5c13f6=_0x2a2a88['window'],_0x44f6f4=_0x2a2a88['document']['location']['href'],_0x191a38=new _0x5c13f6['URL'](_0x5d4ffe['getAttribute']('src'),_0x44f6f4);if('data:'===_0x191a38['protocol']){const _0x4006e6=_0x191a38['href']['split'](','),_0x3f6d1a=_0x4006e6[0x0]['match'](/:(.*?);/)[0x1],_0x4e2d51=_0x3f6d1a['split']('/')[0x1],_0x2db72b=_0x5c13f6['atob'](_0x4006e6[_0x4006e6['length']-0x1]);let _0x3d121b=_0x2db72b['length'];const _0x3348b9=new _0x5c13f6['Uint8Array'](_0x3d121b);for(;_0x3d121b--;)_0x3348b9[_0x3d121b]=_0x2db72b['charCodeAt'](_0x3d121b);return new _0x5c13f6['File']([_0x3348b9],'image.'+_0x4e2d51,{'type':_0x3f6d1a});}const _0x4fdb91=_0x191a38['href']['split']('/'),_0x408804=_0x4fdb91[_0x4fdb91['length']-0x1],_0x48716e=_0x408804['split']('.')[0x1];return _0x5c13f6['fetch'](_0x191a38['href'])['then'](_0xaf6fb8=>_0xaf6fb8['clone']()['blob']())['then'](_0xb10d48=>new _0x5c13f6['File']([_0xb10d48],_0x408804,{'type':'image/'+_0x48716e}));}}class O extends _0x316df6{['imageEditController'];static get['requires'](){return[_0x46539f];}['_isEditable'];constructor(_0xf88c93){super(_0xf88c93),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xad24e7){const _0x5312b1=G(_0xad24e7);return _0x982a1c=>!(!_0x982a1c||!_0x982a1c['is']('element','imageBlock')&&!_0x982a1c['is']('element','imageInline'))&&(!!_0x982a1c['hasAttribute']('uploadcareImageId')||!!_0x982a1c['hasAttribute']('src')&&_0x5312b1(_0x982a1c['getAttribute']('src')));}(_0xf88c93['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x3b2f24=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x3b2f24);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x10c42f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x10c42f&&(_0x10c42f['is']('element','imageBlock')||_0x10c42f['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x46539f),_0x10c42f),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x316df6{['refresh'](){const _0x1b34dc=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1b34dc&&(_0x1b34dc['is']('element','imageBlock')||_0x1b34dc['is']('element','imageInline')));}['execute'](_0x21957a){const _0x3fb532=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x565772=>{_0x565772['setAttributes'](_0x21957a,_0x3fb532),_0x565772['removeAttribute']('srcset',_0x3fb532),_0x565772['removeAttribute']('sizes',_0x3fb532);});}}class m extends _0x3c1180{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x334bb3,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x7de919}=this;_0x7de919['commands']['add']('uploadcareImageEdit',new O(_0x7de919)),_0x7de919['commands']['add']('uploadcareImageReplace',new R(_0x7de919));}}class g extends _0x3c1180{['_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 _0x4e596b=this['editor'];_0x4e596b['ui']['componentFactory']['add']('uploadcareImageEdit',_0x5f0f30=>{const _0x243527=_0x4e596b['commands']['get']('uploadcareImageEdit'),_0x587b61=new _0x4a2eae(_0x5f0f30),t=_0x5f0f30['t'];return _0x587b61['set']({'icon':_0x447f52,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x587b61['bind']('isEnabled')['to'](_0x243527),_0x587b61['bind']('isOn')['to'](_0x243527,'isActive'),this['listenTo'](_0x587b61,'execute',()=>{_0x4e596b['execute']('uploadcareImageEdit'),_0x4e596b['editing']['view']['focus']();}),_0x587b61;}),this['_initConfig']();}['_initConfig'](){const _0x393760=_0x1737e0(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x393760),this['listenTo'](this['editor'],'destroy',()=>{_0x393760['remove']();});}}class et extends _0x3c1180{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-20251011.0",
3
+ "version": "0.0.0-nightly-20251013.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-20251011.0",
27
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251011.0",
28
- "@ckeditor/ckeditor5-image": "0.0.0-nightly-20251011.0",
29
- "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251011.0",
30
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251011.0",
31
- "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251011.0",
32
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251011.0",
33
- "ckeditor5": "0.0.0-nightly-20251011.0",
26
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-20251013.0",
27
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251013.0",
28
+ "@ckeditor/ckeditor5-image": "0.0.0-nightly-20251013.0",
29
+ "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251013.0",
30
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251013.0",
31
+ "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251013.0",
32
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251013.0",
33
+ "ckeditor5": "0.0.0-nightly-20251013.0",
34
34
  "@uploadcare/file-uploader": "1.19.4",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3d52bc=_0xc0c4;(function(_0x1254d9,_0xe08d3f){const _0x3e9df2=_0xc0c4,_0x2fbbe4=_0x1254d9();while(!![]){try{const _0x4ecc0c=-parseInt(_0x3e9df2(0xa7))/0x1+-parseInt(_0x3e9df2(0xc7))/0x2+-parseInt(_0x3e9df2(0x94))/0x3+-parseInt(_0x3e9df2(0xbd))/0x4+-parseInt(_0x3e9df2(0x7a))/0x5*(-parseInt(_0x3e9df2(0x89))/0x6)+-parseInt(_0x3e9df2(0xc0))/0x7*(parseInt(_0x3e9df2(0xa8))/0x8)+parseInt(_0x3e9df2(0x8b))/0x9;if(_0x4ecc0c===_0xe08d3f)break;else _0x2fbbe4['push'](_0x2fbbe4['shift']());}catch(_0xe45a01){_0x2fbbe4['push'](_0x2fbbe4['shift']());}}}(_0x48b1,0x55e87));import{Plugin as _0x2b62f8}from'ckeditor5/src/core.js';import{Dialog as _0x203f0c}from'ckeditor5/src/ui.js';function _0x48b1(){const _0x527d0f=['_initCtx','map','_ctxElement','downcast','once','getSelectedElement','join','config','iconHrefResolver','_initConfig','true','_initConversion','uc-upload-ctx-provider','init','render','uploader-','1407128XvOEiU','replaceImageSource','isRegistered','38444FVvvFU','isPremiumPlugin','remove','editor','imageInline','closeMax','uploadcareImageId','949346obnFJR','UploadcareEditing','listenTo','#uc-icon-arrow-down','view','commands','_initImageProcessingIndicator','1019050dCLNem','insertImage','elementToAttribute','ctxElement','attributeToAttribute','editing','cleanupImage','fromCharCode','conversion','appendChild','isOfficialPlugin','get','contentLanguage','add','querySelector','6TyjDFq','uploadcareImageReplace','22851450cawPQt','\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','extend','upcast','getAttribute','uploadcare','uploadcare.pubkey','locale','ucContextId','1816776xpLCNA','href','uploadcare.uploader','imageBlock','schema','afterInit','selection','model','input[uploadcare-file-input]','body','for','_configElement','uc-config','configElement','document','PictureEditing','requires','execute','pluginName','695318ZwIkgs','384IFKlmj','_initSchema','removeAttribute','destroy','data-uc-image-id'];_0x48b1=function(){return _0x527d0f;};return _0x48b1();}function _0xc0c4(_0x313b33,_0x1c87ea){const _0x48b19d=_0x48b1();return _0xc0c4=function(_0xc0c41e,_0x47df77){_0xc0c41e=_0xc0c41e-0x7a;let _0x47b781=_0x48b19d[_0xc0c41e];return _0x47b781;},_0xc0c4(_0x313b33,_0x1c87ea);}import{createElement as _0x4340ad,global as _0x3bbfed,uid as _0x49e15b}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x4eb626}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x19a9d7}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x3f1cac}from'./utils/editingutils.js';export class UploadcareEditing extends _0x2b62f8{[_0x3d52bc(0x9f)]=null;[_0x3d52bc(0xaf)]=null;static get[_0x3d52bc(0xa6)](){const _0x24c488=_0x3d52bc;return _0x24c488(0xc8);}static get[_0x3d52bc(0xa4)](){const _0x5dd8d0=_0x3d52bc;return[_0x5dd8d0(0xa3),_0x19a9d7,_0x203f0c];}static get[_0x3d52bc(0x84)](){return!0x0;}static get[_0x3d52bc(0xc1)](){return!0x0;}[_0x3d52bc(0x93)];get[_0x3d52bc(0xa1)](){const _0x4508fd=_0x3d52bc;return this[_0x4508fd(0x9f)];}get[_0x3d52bc(0x7d)](){const _0x4dc971=_0x3d52bc;return this[_0x4dc971(0xaf)];}constructor(_0x270f84){const _0x2a5112=_0x3d52bc;super(_0x270f84),this[_0x2a5112(0x93)]=_0x49e15b();}[_0x3d52bc(0xba)](){const _0x37c1f2=_0x3d52bc,_0x239964=this[_0x37c1f2(0xc3)];_0x239964[_0x37c1f2(0xcc)][_0x37c1f2(0x87)](_0x37c1f2(0x90),new _0x4eb626(_0x239964));}[_0x3d52bc(0x99)](){const _0x2b9f7f=_0x3d52bc;this[_0x2b9f7f(0xa9)](),this[_0x2b9f7f(0xb8)](),this[_0x2b9f7f(0xb6)](),this[_0x2b9f7f(0xad)](),this[_0x2b9f7f(0xcd)](),this[_0x2b9f7f(0xc9)](this[_0x2b9f7f(0xc3)],_0x2b9f7f(0xab),()=>{const _0x4afa1f=_0x2b9f7f;this[_0x4afa1f(0x9f)]&&(this[_0x4afa1f(0x9f)][_0x4afa1f(0xc2)](),this[_0x4afa1f(0x9f)]=null),this[_0x4afa1f(0xaf)]&&(this[_0x4afa1f(0xaf)][_0x4afa1f(0xc2)](),this[_0x4afa1f(0xaf)]=null);const _0x25d1cd=_0x3bbfed[_0x4afa1f(0xa2)][_0x4afa1f(0x88)](_0x4afa1f(0x9c));_0x25d1cd&&_0x25d1cd[_0x4afa1f(0xc2)]();}),async function(_0x56009e){const _0x55b7dd=_0x2e1352([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x32995d=0x3d8d0df,_0x504297=0x3dfa53f^_0x32995d,_0x52509d=window[_0x2e1352([0x44,0x61,0x74,0x65])][_0x2e1352([0x6e,0x6f,0x77])](),_0x2a203f=_0x56009e[_0x2e1352([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3c1386=new window[(_0x2e1352([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56f0a3=>{_0x2a203f[_0x2e1352([0x6f,0x6e,0x63,0x65])](_0x2e1352([0x72,0x65,0x61,0x64,0x79]),_0x56f0a3);}),_0x1507ad={[_0x2e1352([0x6b,0x74,0x79])]:_0x2e1352([0x45,0x43]),[_0x2e1352([0x75,0x73,0x65])]:_0x2e1352([0x73,0x69,0x67]),[_0x2e1352([0x63,0x72,0x76])]:_0x2e1352([0x50,0x2d,0x32,0x35,0x36]),[_0x2e1352([0x78])]:_0x2e1352([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]),[_0x2e1352([0x79])]:_0x2e1352([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]),[_0x2e1352([0x61,0x6c,0x67])]:_0x2e1352([0x45,0x53,0x32,0x35,0x36])},_0x447c3c=_0x2a203f[_0x2e1352([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2e1352([0x67,0x65,0x74])](_0x2e1352([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x38257b(){let _0x498462,_0x3f6650=null,_0x59ffad=null;try{if(_0x447c3c==_0x2e1352([0x47,0x50,0x4c]))return _0x2e1352([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x498462=_0x54a3f7(),!_0x498462)return _0x2e1352([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x498462[_0x2e1352([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x59ffad=_0x4f0fbd(_0x498462[_0x2e1352([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x498462[_0x2e1352([0x6a,0x74,0x69])])),await _0x2a42b5()?_0x3710a7()?_0x12692b()?_0x2e1352([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4913e7()?(_0x498462[_0x2e1352([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2e1352([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3f6650=_0x33e131(_0x2e1352([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x498462[_0x2e1352([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2e1352([0x74,0x72,0x69,0x61,0x6c])&&(_0x3f6650=_0x33e131(_0x2e1352([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x424dd2()):_0x2e1352([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2e1352([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2e1352([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2e1352([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x12692b(){const _0x10f9f6=[_0x2e1352([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2e1352([0x74,0x72,0x69,0x61,0x6c])][_0x2e1352([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x498462[_0x2e1352([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x52509d/0x3e8:0xe10*_0x504297;return _0x498462[_0x2e1352([0x65,0x78,0x70])]<_0x10f9f6;}function _0x3710a7(){const _0x3aab00=_0x498462[_0x2e1352([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3aab00&&(!!_0x3aab00[_0x2e1352([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e1352([0x2a]))||!!_0x3aab00[_0x2e1352([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e1352([0x55,0x50,0x4c,0x43])));}function _0x4913e7(){const _0xadf817=_0xc0c4,_0x40fe67=_0x498462[_0x2e1352([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x40fe67||0x0==_0x40fe67[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x20f702}=new URL(window[_0x2e1352([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0xadf817(0x95)]);if(_0x40fe67[_0x2e1352([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x20f702))return!0x0;const _0x5f51f2=_0x20f702[_0x2e1352([0x73,0x70,0x6c,0x69,0x74])](_0x2e1352([0x2e]));return _0x40fe67[_0x2e1352([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x183908=>_0x183908[_0x2e1352([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e1352([0x2a])))[_0x2e1352([0x6d,0x61,0x70])](_0x3c3912=>_0x3c3912[_0x2e1352([0x73,0x70,0x6c,0x69,0x74])](_0x2e1352([0x2e])))[_0x2e1352([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x303ce6=>_0x303ce6[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5f51f2[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2e1352([0x6d,0x61,0x70])](_0x21492d=>Array(_0x5f51f2[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x21492d[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2e1352([0x66,0x69,0x6c,0x6c])](_0x21492d[0x0]===_0x2e1352([0x2a])?_0x2e1352([0x2a]):'')[_0x2e1352([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x21492d))[_0x2e1352([0x73,0x6f,0x6d,0x65])](_0x38e5ea=>_0x5f51f2[_0x2e1352([0x65,0x76,0x65,0x72,0x79])]((_0x163ca5,_0x254025)=>_0x38e5ea[_0x254025]===_0x163ca5||_0x38e5ea[_0x254025]===_0x2e1352([0x2a])));}function _0x424dd2(){return _0x3f6650&&_0x59ffad?new window[(_0x2e1352([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1cee94,_0x28d658)=>{_0x3f6650[_0x2e1352([0x74,0x68,0x65,0x6e])](_0x1cee94,_0x28d658),_0x59ffad[_0x2e1352([0x74,0x68,0x65,0x6e])](_0x4259ff=>{_0x4259ff!=_0x2e1352([0x56,0x61,0x6c,0x69,0x64])&&_0x1cee94(_0x4259ff);},_0x28d658);}):_0x3f6650||_0x59ffad||_0x2e1352([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4f0fbd(_0x3b4e47,_0x2b42e1){return new window[(_0x2e1352([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5aff95=>{if(_0x7a4869())return _0x5aff95(_0x2e1352([0x56,0x61,0x6c,0x69,0x64]));_0x4f61d2(),_0x2a203f[_0x2e1352([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2e1352([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x228f27=!0x1;const _0x537eae=_0x49e15b();function _0x3877b0(_0x53cd0c){return!!_0x53cd0c&&(typeof _0x53cd0c===_0x2e1352([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x53cd0c===_0x2e1352([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x53cd0c[_0x2e1352([0x74,0x68,0x65,0x6e])]===_0x2e1352([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x53cd0c[_0x2e1352([0x63,0x61,0x74,0x63,0x68])]===_0x2e1352([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3e88fd(_0x5e5305){_0x40ab8c(_0x5e5305)[_0x2e1352([0x74,0x68,0x65,0x6e])](_0x5028d6=>{if(!_0x5028d6||_0x5028d6[_0x2e1352([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2e1352([0x6f,0x6b]))return _0x2e1352([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x394a75(_0x1a1c48(_0x537eae+_0x2b42e1))!=_0x5028d6[_0x2e1352([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2e1352([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2e1352([0x56,0x61,0x6c,0x69,0x64]);})[_0x2e1352([0x74,0x68,0x65,0x6e])](_0xa26d14=>(_0x24621c(),_0xa26d14),()=>{const _0x1f3e30=_0xe003ea();return null==_0x1f3e30?(_0x24621c(),_0x2e1352([0x56,0x61,0x6c,0x69,0x64])):_0x2e1352(_0x52509d-_0x1f3e30>(0x27d454df^_0x32995d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2e1352([0x74,0x68,0x65,0x6e])](_0x5aff95)[_0x2e1352([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5aff95(_0x2e1352([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x222ce2=0x3ee3e5f^_0x32995d;function _0x24621c(){const _0x27fb57=_0x2e1352([0x6c,0x6c,0x63,0x74,0x2d])+_0x394a75(_0x1a1c48(_0x3b4e47)),_0x1257c0=_0x177b99(_0x394a75(window[_0x2e1352([0x4d,0x61,0x74,0x68])][_0x2e1352([0x63,0x65,0x69,0x6c])](_0x52509d/_0x222ce2)));window[_0x2e1352([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2e1352([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x27fb57,_0x1257c0);}function _0xe003ea(){const _0x20c7b0=_0x2e1352([0x6c,0x6c,0x63,0x74,0x2d])+_0x394a75(_0x1a1c48(_0x3b4e47)),_0x8f1e88=window[_0x2e1352([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2e1352([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x20c7b0);return _0x8f1e88?window[_0x2e1352([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x177b99(_0x8f1e88),0x10)*_0x222ce2:null;}function _0x40ab8c(_0x386c88){return new window[(_0x2e1352([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1a91c7,_0xa9542a)=>{_0x386c88[_0x2e1352([0x74,0x68,0x65,0x6e])](_0x1a91c7,_0xa9542a),window[_0x2e1352([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xa9542a,0x3d9041f^_0x32995d);});}}_0x2a203f[_0x2e1352([0x6f,0x6e])](_0x2e1352([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x173c2d,_0x1fd650)=>{if(_0x1fd650[0x0]!=_0x3b4e47)return _0x5aff95(_0x2e1352([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1fd650[0x1]={..._0x1fd650[0x1],[_0x2e1352([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x537eae};},{[_0x2e1352([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2e1352([0x68,0x69,0x67,0x68])}),_0x2a203f[_0x2e1352([0x6f,0x6e])](_0x2e1352([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x172722=>{_0x3877b0(_0x172722[_0x2e1352([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x228f27=!0x0,_0x3e88fd(_0x172722[_0x2e1352([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2e1352([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2e1352([0x6c,0x6f,0x77])}),_0x3c1386[_0x2e1352([0x74,0x68,0x65,0x6e])](()=>{_0x228f27||_0x5aff95(_0x2e1352([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x7a4869(){return _0x2a203f[_0x2e1352([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2e1352([0x76,0x69,0x65,0x77])][_0x2e1352([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2e1352([0x61,0x75,0x74,0x6f]);}function _0x4f61d2(){_0x2a203f[_0x2e1352([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2e1352([0x76,0x69,0x65,0x77])][_0x2e1352([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2e1352([0x61,0x75,0x74,0x6f]);}}function _0x33e131(_0x5bae9f){const _0x2ce380=[new window[(_0x2e1352([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4db8cb=>setTimeout(_0x4db8cb,0x3d1ee13^_0x32995d)),_0x3c1386[_0x2e1352([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2e1352([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17a84f=>{let _0x2b5330=0x0;_0x2a203f[_0x2e1352([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e1352([0x6f,0x6e])](_0x2e1352([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x57d270,_0x2d8218)=>{_0x2d8218[0x0][_0x2e1352([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2b5330++,_0x2b5330==(0x3d8d127^_0x32995d)&&(_0x17a84f(),_0x57d270[_0x2e1352([0x6f,0x66,0x66])]());});}))];return window[_0x2e1352([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2e1352([0x72,0x61,0x63,0x65])](_0x2ce380)[_0x2e1352([0x74,0x68,0x65,0x6e])](()=>_0x5bae9f);}async function _0x433f77(){await _0x3c1386,_0x2a203f[_0x2e1352([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e1352([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3fe8f0,_0x2a203f[_0x2e1352([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e1352([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3fe8f0,_0x2a203f[_0x2e1352([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2e1352([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xcefe43(_0x3f782f){const _0x2cb582=_0x35f663();_0x2a203f[_0x2cb582]=_0x2e1352([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3f782f,_0x3f782f!=_0x2e1352([0x56,0x61,0x6c,0x69,0x64])&&_0x433f77();}function _0x35f663(){const _0x1a71a1=window[_0x2e1352([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2e1352([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2e1352([0x6e,0x6f,0x77])]())[_0x2e1352([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2e1352([0x2e]),'');let _0x23ea7f=_0x2e1352([0x52]);for(let _0x364cc0=0x0;_0x364cc0<_0x1a71a1[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x364cc0+=0x2){let _0x251e19=window[_0x2e1352([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1a71a1[_0x2e1352([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x364cc0,_0x364cc0+0x2));_0x251e19>=_0x55b7dd[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x251e19-=_0x55b7dd[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x23ea7f+=_0x55b7dd[_0x251e19];}return _0x23ea7f;}function _0x54a3f7(){const _0x36f680=_0x447c3c[_0x2e1352([0x73,0x70,0x6c,0x69,0x74])](_0x2e1352([0x2e]));if(0x3!=_0x36f680[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1ec7f4(_0x36f680[0x1]);function _0x1ec7f4(_0x21db09){const _0x4a3fcd=_0x5f342a(_0x21db09);return _0x4a3fcd&&_0x40b5fb()?_0x4a3fcd:null;function _0x40b5fb(){const _0x590ead=_0x4a3fcd[_0x2e1352([0x6a,0x74,0x69])],_0x46c388=window[_0x2e1352([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x590ead[_0x2e1352([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x590ead[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x393a44={..._0x4a3fcd,[_0x2e1352([0x6a,0x74,0x69])]:_0x590ead[_0x2e1352([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x590ead[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x393a44[_0x2e1352([0x76,0x63])],_0x1a1c48(_0x393a44)==_0x46c388;}}}async function _0x2a42b5(){let _0x5249a0=!0x0;try{const _0x105a33=_0x447c3c[_0x2e1352([0x73,0x70,0x6c,0x69,0x74])](_0x2e1352([0x2e])),[_0x47979b,_0x43facd,_0x87d3b4]=_0x105a33;return _0xcf4782(_0x47979b),await _0x51ea54(_0x47979b,_0x43facd,_0x87d3b4),_0x5249a0;}catch{return!0x1;}function _0xcf4782(_0x546e44){const _0x181c21=_0x5f342a(_0x546e44);_0x181c21&&_0x181c21[_0x2e1352([0x61,0x6c,0x67])]==_0x2e1352([0x45,0x53,0x32,0x35,0x36])||(_0x5249a0=!0x1);}async function _0x51ea54(_0x2ddb62,_0x1d2f7e,_0x28b19d){const _0x3309ba=window[_0x2e1352([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2e1352([0x66,0x72,0x6f,0x6d])](_0x2d7671(_0x28b19d),_0x5e8178=>_0x5e8178[_0x2e1352([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x490e5a=new window[(_0x2e1352([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2e1352([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2ddb62+_0x2e1352([0x2e])+_0x1d2f7e),_0x4b9f8a=window[_0x2e1352([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2e1352([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4b9f8a)return;const _0x46ddb0=await _0x4b9f8a[_0x2e1352([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2e1352([0x6a,0x77,0x6b]),_0x1507ad,{[_0x2e1352([0x6e,0x61,0x6d,0x65])]:_0x2e1352([0x45,0x43,0x44,0x53,0x41]),[_0x2e1352([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2e1352([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2e1352([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4b9f8a[_0x2e1352([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2e1352([0x6e,0x61,0x6d,0x65])]:_0x2e1352([0x45,0x43,0x44,0x53,0x41]),[_0x2e1352([0x68,0x61,0x73,0x68])]:{[_0x2e1352([0x6e,0x61,0x6d,0x65])]:_0x2e1352([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x46ddb0,_0x3309ba,_0x490e5a)||(_0x5249a0=!0x1);}}function _0x5f342a(_0x3843f7){return _0x3843f7[_0x2e1352([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2e1352([0x65,0x79]))?JSON[_0x2e1352([0x70,0x61,0x72,0x73,0x65])](_0x2d7671(_0x3843f7)):null;}function _0x2d7671(_0x4677cd){return window[_0x2e1352([0x61,0x74,0x6f,0x62])](_0x4677cd[_0x2e1352([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2e1352([0x2b]))[_0x2e1352([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2e1352([0x2f])));}function _0x1a1c48(_0x246031){let _0x2b7b8e=0x1505;function _0x76536c(_0x87f004){for(let _0x253996=0x0;_0x253996<_0x87f004[_0x2e1352([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x253996++){const _0xe0c732=_0x87f004[_0x2e1352([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x253996);_0x2b7b8e=(_0x2b7b8e<<0x5)+_0x2b7b8e+_0xe0c732,_0x2b7b8e&=_0x2b7b8e;}}function _0x3f1189(_0x1029f5){Array[_0x2e1352([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1029f5)?_0x1029f5[_0x2e1352([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3f1189):_0x1029f5&&typeof _0x1029f5==_0x2e1352([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2e1352([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1029f5)[_0x2e1352([0x73,0x6f,0x72,0x74])]()[_0x2e1352([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x35377d,_0x510e53])=>{_0x76536c(_0x35377d),_0x3f1189(_0x510e53);}):_0x76536c(window[_0x2e1352([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1029f5));}return _0x3f1189(_0x246031),_0x2b7b8e>>>0x0;}function _0x394a75(_0x115c78){return _0x115c78[_0x2e1352([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2e1352([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2e1352([0x30]));}function _0x177b99(_0x1fdda9){return _0x1fdda9[_0x2e1352([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2e1352([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2e1352([0x6a,0x6f,0x69,0x6e])]('');}function _0x3fe8f0(){}function _0x2e1352(_0x39fa84){const _0x3bfb95=_0xc0c4;return _0x39fa84[_0x3bfb95(0xae)](_0xaf4b76=>String[_0x3bfb95(0x81)](_0xaf4b76))[_0x3bfb95(0xb3)]('');}_0xcefe43(await _0x38257b());}(this);}[_0x3d52bc(0xa9)](){const _0x1f6ba2=_0x3d52bc,_0x251b13=this[_0x1f6ba2(0xc3)][_0x1f6ba2(0x9b)][_0x1f6ba2(0x98)];_0x251b13[_0x1f6ba2(0xbf)](_0x1f6ba2(0x97))&&_0x251b13[_0x1f6ba2(0x8d)](_0x1f6ba2(0x97),{'allowAttributes':[_0x1f6ba2(0xc6)]}),_0x251b13[_0x1f6ba2(0xbf)](_0x1f6ba2(0xc4))&&_0x251b13[_0x1f6ba2(0x8d)](_0x1f6ba2(0xc4),{'allowAttributes':[_0x1f6ba2(0xc6)]});}[_0x3d52bc(0xb8)](){const _0x2a2b69=_0x3d52bc,_0x1c9f9d=this[_0x2a2b69(0xc3)];_0x1c9f9d[_0x2a2b69(0x82)][_0x2a2b69(0x9e)](_0x2a2b69(0xb0))[_0x2a2b69(0x7e)]({'model':_0x2a2b69(0xc6),'view':_0x2a2b69(0xac)}),_0x1c9f9d[_0x2a2b69(0x82)][_0x2a2b69(0x9e)](_0x2a2b69(0x8e))[_0x2a2b69(0x7c)]({'model':{'key':_0x2a2b69(0xc6),'value':_0xc8c6bf=>_0xc8c6bf[_0x2a2b69(0x8f)](_0x2a2b69(0xac))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xd30eae=_0x1c9f9d[_0x2a2b69(0xcc)][_0x2a2b69(0x85)](_0x2a2b69(0xbe));_0xd30eae&&this[_0x2a2b69(0xc9)](_0xd30eae,_0x2a2b69(0x80),(_0xb2b0eb,[_0x474793,_0x23802c])=>{const _0x4be91b=_0x2a2b69;_0x474793[_0x4be91b(0xaa)](_0x4be91b(0xc6),_0x23802c);});}[_0x3d52bc(0xb6)](){const _0xf6f190=_0x3d52bc,_0x4bfc0f=this[_0xf6f190(0xc3)][_0xf6f190(0xb4)][_0xf6f190(0x85)](_0xf6f190(0x96))||{},_0x2dd3e9=this[_0xf6f190(0xc3)][_0xf6f190(0xb4)][_0xf6f190(0x85)](_0xf6f190(0x91))||'';this[_0xf6f190(0x9f)]=_0x4340ad(_0x3bbfed[_0xf6f190(0xa2)],_0xf6f190(0xa0),{..._0x4bfc0f,'pubkey':_0x2dd3e9,'ctx-name':_0xf6f190(0xbc)+this[_0xf6f190(0x93)],'sourceList':'','imgOnly':_0xf6f190(0xb7),'removeCopyright':_0xf6f190(0xb7),'localeName':this[_0xf6f190(0xc3)][_0xf6f190(0x92)][_0xf6f190(0x86)],'externalSourcesEmbedCss':_0xf6f190(0x8c)}),this[_0xf6f190(0x9f)][_0xf6f190(0xb5)]=_0x4a699=>{const _0x360c89=_0xf6f190;if(_0x360c89(0xc5)==_0x4a699)return _0x360c89(0xca);},_0x3bbfed[_0xf6f190(0xa2)][_0xf6f190(0x9d)][_0xf6f190(0x83)](this[_0xf6f190(0x9f)]);}[_0x3d52bc(0xad)](){const _0x540dd7=_0x3d52bc;this[_0x540dd7(0xaf)]=_0x4340ad(_0x3bbfed[_0x540dd7(0xa2)],_0x540dd7(0xb9),{'ctx-name':_0x540dd7(0xbc)+this[_0x540dd7(0x93)]}),_0x3bbfed[_0x540dd7(0xa2)][_0x540dd7(0x9d)][_0x540dd7(0x83)](this[_0x540dd7(0xaf)]);}[_0x3d52bc(0xcd)](){const _0x173617=_0x3d52bc,_0xffb5d2=this[_0x173617(0xc3)][_0x173617(0xcc)][_0x173617(0x85)](_0x173617(0x7b));_0xffb5d2&&this[_0x173617(0xc9)](_0xffb5d2,_0x173617(0xa5),()=>{const _0x2ae0ce=_0x173617,_0xeb789d=this[_0x2ae0ce(0xc3)][_0x2ae0ce(0x9b)][_0x2ae0ce(0xa2)][_0x2ae0ce(0x9a)][_0x2ae0ce(0xb2)]();_0xeb789d&&_0xeb789d[_0x2ae0ce(0x8f)](_0x2ae0ce(0xc6))&&this[_0x2ae0ce(0xc3)][_0x2ae0ce(0x7f)][_0x2ae0ce(0xcb)][_0x2ae0ce(0xb1)](_0x2ae0ce(0xbb),()=>{const _0x299f6e=_0x2ae0ce;_0x3f1cac(this[_0x299f6e(0xc3)],_0xeb789d);});});const _0xef8c30=this[_0x173617(0xc3)][_0x173617(0xcc)][_0x173617(0x85)](_0x173617(0x8a));_0xef8c30&&this[_0x173617(0xc9)](_0xef8c30,_0x173617(0xa5),()=>{const _0x158988=_0x173617,_0x1be52b=this[_0x158988(0xc3)][_0x158988(0x9b)][_0x158988(0xa2)][_0x158988(0x9a)][_0x158988(0xb2)]();_0x1be52b&&_0x1be52b[_0x158988(0x8f)](_0x158988(0xc6))&&this[_0x158988(0xc3)][_0x158988(0x7f)][_0x158988(0xcb)][_0x158988(0xb1)](_0x158988(0xbb),()=>{const _0x5644b9=_0x158988;_0x3f1cac(this[_0x5644b9(0xc3)],_0x1be52b);});});}}
23
+ const _0x590443=_0x22f5;(function(_0x51d288,_0x69e168){const _0x1d7d0c=_0x22f5,_0x13f4e1=_0x51d288();while(!![]){try{const _0x7b6624=-parseInt(_0x1d7d0c(0xb8))/0x1+parseInt(_0x1d7d0c(0xa5))/0x2+-parseInt(_0x1d7d0c(0x94))/0x3+parseInt(_0x1d7d0c(0xa1))/0x4+parseInt(_0x1d7d0c(0x9d))/0x5+parseInt(_0x1d7d0c(0xe4))/0x6*(-parseInt(_0x1d7d0c(0xc9))/0x7)+-parseInt(_0x1d7d0c(0xd6))/0x8;if(_0x7b6624===_0x69e168)break;else _0x13f4e1['push'](_0x13f4e1['shift']());}catch(_0x3166ee){_0x13f4e1['push'](_0x13f4e1['shift']());}}}(_0x5789,0x76c3e));import{Plugin as _0xd83da9}from'ckeditor5/src/core.js';import{Dialog as _0x2b7fe0}from'ckeditor5/src/ui.js';import{createElement as _0x5ab1be,global as _0x57b849,uid as _0x502934}from'ckeditor5/src/utils.js';function _0x22f5(_0x2daabb,_0x501d29){const _0x5789d8=_0x5789();return _0x22f5=function(_0x22f515,_0x4efc82){_0x22f515=_0x22f515-0x94;let _0x47ad00=_0x5789d8[_0x22f515];return _0x47ad00;},_0x22f5(_0x2daabb,_0x501d29);}import{UploadcareCommand as _0x5bc4dd}from'./uploadcarecommand.js';function _0x5789(){const _0x9c3a47=['_configElement','uploadcare','_initConversion','configElement','_initSchema','map','join','locale','commands','#uc-icon-arrow-down','7IdPYkU','imageInline','PictureEditing','appendChild','execute','view','data-uc-image-id','elementToAttribute','_initConfig','isPremiumPlugin','iconHrefResolver','\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','downcast','2037760kJqKbX','imageBlock','requires','listenTo','once','getAttribute','body','_ctxElement','cleanupImage','editor','_initImageProcessingIndicator','insertImage','upcast','uploadcareImageId','3803484cFhvUE','document','uc-upload-ctx-provider','545295EltuDe','editing','input[uploadcare-file-input]','uploadcare.uploader','true','conversion','querySelector','extend','get','3440040vdbvVh','isOfficialPlugin','uploader-','model','1722508kofhcL','uploadcare.pubkey','for','getSelectedElement','1806834bpEVin','uploadcareImageReplace','UploadcareEditing','fromCharCode','replaceImageSource','_initCtx','config','uc-config','removeAttribute','attributeToAttribute','add','selection','pluginName','remove','ctxElement','render','isRegistered','href','ucContextId','465191IGHrcG','closeMax','afterInit','destroy','contentLanguage','init','schema'];_0x5789=function(){return _0x9c3a47;};return _0x5789();}import{UploadcareUploadAdapter as _0x2153ce}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x4f5a05}from'./utils/editingutils.js';export class UploadcareEditing extends _0xd83da9{[_0x590443(0xbf)]=null;[_0x590443(0xdd)]=null;static get[_0x590443(0xb1)](){const _0x480533=_0x590443;return _0x480533(0xa7);}static get[_0x590443(0xd8)](){const _0x1134c1=_0x590443;return[_0x1134c1(0xcb),_0x2153ce,_0x2b7fe0];}static get[_0x590443(0x9e)](){return!0x0;}static get[_0x590443(0xd2)](){return!0x0;}[_0x590443(0xb7)];get[_0x590443(0xc2)](){const _0x21883a=_0x590443;return this[_0x21883a(0xbf)];}get[_0x590443(0xb3)](){const _0x81dc4=_0x590443;return this[_0x81dc4(0xdd)];}constructor(_0x1e8cee){const _0x5a556e=_0x590443;super(_0x1e8cee),this[_0x5a556e(0xb7)]=_0x502934();}[_0x590443(0xbd)](){const _0x32b8a9=_0x590443,_0x962178=this[_0x32b8a9(0xdf)];_0x962178[_0x32b8a9(0xc7)][_0x32b8a9(0xaf)](_0x32b8a9(0xc0),new _0x5bc4dd(_0x962178));}[_0x590443(0xba)](){const _0x45a3fb=_0x590443;this[_0x45a3fb(0xc3)](),this[_0x45a3fb(0xc1)](),this[_0x45a3fb(0xd1)](),this[_0x45a3fb(0xaa)](),this[_0x45a3fb(0xe0)](),this[_0x45a3fb(0xd9)](this[_0x45a3fb(0xdf)],_0x45a3fb(0xbb),()=>{const _0x158261=_0x45a3fb;this[_0x158261(0xbf)]&&(this[_0x158261(0xbf)][_0x158261(0xb2)](),this[_0x158261(0xbf)]=null),this[_0x158261(0xdd)]&&(this[_0x158261(0xdd)][_0x158261(0xb2)](),this[_0x158261(0xdd)]=null);const _0x3fb4d0=_0x57b849[_0x158261(0xe5)][_0x158261(0x9a)](_0x158261(0x96));_0x3fb4d0&&_0x3fb4d0[_0x158261(0xb2)]();}),async function(_0x54b06f){const _0x235cf2=_0x1136c9([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x24e099=0x3d8d0df,_0x21562c=0x3dfa6cf^_0x24e099,_0x382eed=window[_0x1136c9([0x44,0x61,0x74,0x65])][_0x1136c9([0x6e,0x6f,0x77])](),_0x5456bf=_0x54b06f[_0x1136c9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5872ef=new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x306949=>{_0x5456bf[_0x1136c9([0x6f,0x6e,0x63,0x65])](_0x1136c9([0x72,0x65,0x61,0x64,0x79]),_0x306949);}),_0x5a25c5={[_0x1136c9([0x6b,0x74,0x79])]:_0x1136c9([0x45,0x43]),[_0x1136c9([0x75,0x73,0x65])]:_0x1136c9([0x73,0x69,0x67]),[_0x1136c9([0x63,0x72,0x76])]:_0x1136c9([0x50,0x2d,0x32,0x35,0x36]),[_0x1136c9([0x78])]:_0x1136c9([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]),[_0x1136c9([0x79])]:_0x1136c9([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]),[_0x1136c9([0x61,0x6c,0x67])]:_0x1136c9([0x45,0x53,0x32,0x35,0x36])},_0x58e875=_0x5456bf[_0x1136c9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1136c9([0x67,0x65,0x74])](_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xeb4a42(){let _0x4b9a44,_0x5610a5=null,_0x4aac25=null;try{if(_0x58e875==_0x1136c9([0x47,0x50,0x4c]))return _0x1136c9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4b9a44=_0x4cbea8(),!_0x4b9a44)return _0x1136c9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4b9a44[_0x1136c9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4aac25=_0x3d84d6(_0x4b9a44[_0x1136c9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4b9a44[_0x1136c9([0x6a,0x74,0x69])])),await _0x4b7058()?_0x5d08b2()?_0x36969f()?_0x1136c9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x381095()?(_0x4b9a44[_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1136c9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5610a5=_0x1452fe(_0x1136c9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4b9a44[_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1136c9([0x74,0x72,0x69,0x61,0x6c])&&(_0x5610a5=_0x1452fe(_0x1136c9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2201b5()):_0x1136c9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1136c9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1136c9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1136c9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x36969f(){const _0x30a6b8=[_0x1136c9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1136c9([0x74,0x72,0x69,0x61,0x6c])][_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b9a44[_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x382eed/0x3e8:0xe10*_0x21562c;return _0x4b9a44[_0x1136c9([0x65,0x78,0x70])]<_0x30a6b8;}function _0x5d08b2(){const _0x37ec53=_0x4b9a44[_0x1136c9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x37ec53&&(!!_0x37ec53[_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1136c9([0x2a]))||!!_0x37ec53[_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1136c9([0x55,0x50,0x4c,0x43])));}function _0x381095(){const _0x23813f=_0x22f5,_0x413ba4=_0x4b9a44[_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x413ba4||0x0==_0x413ba4[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5a26c7}=new URL(window[_0x1136c9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x23813f(0xb6)]);if(_0x413ba4[_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a26c7))return!0x0;const _0x5d3fef=_0x5a26c7[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])](_0x1136c9([0x2e]));return _0x413ba4[_0x1136c9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x900f79=>_0x900f79[_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1136c9([0x2a])))[_0x1136c9([0x6d,0x61,0x70])](_0xc88a06=>_0xc88a06[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])](_0x1136c9([0x2e])))[_0x1136c9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb252b1=>_0xb252b1[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5d3fef[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1136c9([0x6d,0x61,0x70])](_0x5acf91=>Array(_0x5d3fef[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5acf91[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1136c9([0x66,0x69,0x6c,0x6c])](_0x5acf91[0x0]===_0x1136c9([0x2a])?_0x1136c9([0x2a]):'')[_0x1136c9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5acf91))[_0x1136c9([0x73,0x6f,0x6d,0x65])](_0x15b769=>_0x5d3fef[_0x1136c9([0x65,0x76,0x65,0x72,0x79])]((_0x58155c,_0x4e968d)=>_0x15b769[_0x4e968d]===_0x58155c||_0x15b769[_0x4e968d]===_0x1136c9([0x2a])));}function _0x2201b5(){return _0x5610a5&&_0x4aac25?new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa6476d,_0x48cc22)=>{_0x5610a5[_0x1136c9([0x74,0x68,0x65,0x6e])](_0xa6476d,_0x48cc22),_0x4aac25[_0x1136c9([0x74,0x68,0x65,0x6e])](_0x79e9ff=>{_0x79e9ff!=_0x1136c9([0x56,0x61,0x6c,0x69,0x64])&&_0xa6476d(_0x79e9ff);},_0x48cc22);}):_0x5610a5||_0x4aac25||_0x1136c9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3d84d6(_0x214a5f,_0x438007){return new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55e242=>{if(_0x35addf())return _0x55e242(_0x1136c9([0x56,0x61,0x6c,0x69,0x64]));_0x9f78dd(),_0x5456bf[_0x1136c9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1136c9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1d6202=!0x1;const _0x391ec1=_0x502934();function _0x9190b5(_0xe7ec81){return!!_0xe7ec81&&(typeof _0xe7ec81===_0x1136c9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xe7ec81===_0x1136c9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xe7ec81[_0x1136c9([0x74,0x68,0x65,0x6e])]===_0x1136c9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xe7ec81[_0x1136c9([0x63,0x61,0x74,0x63,0x68])]===_0x1136c9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x525675(_0x52336a){_0x35a204(_0x52336a)[_0x1136c9([0x74,0x68,0x65,0x6e])](_0x2aab88=>{if(!_0x2aab88||_0x2aab88[_0x1136c9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1136c9([0x6f,0x6b]))return _0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4014c2(_0x6e71fc(_0x391ec1+_0x438007))!=_0x2aab88[_0x1136c9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1136c9([0x56,0x61,0x6c,0x69,0x64]);})[_0x1136c9([0x74,0x68,0x65,0x6e])](_0x4c704a=>(_0x25d435(),_0x4c704a),()=>{const _0x46618e=_0x4f66d1();return null==_0x46618e?(_0x25d435(),_0x1136c9([0x56,0x61,0x6c,0x69,0x64])):_0x1136c9(_0x382eed-_0x46618e>(0x27d454df^_0x24e099)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1136c9([0x74,0x68,0x65,0x6e])](_0x55e242)[_0x1136c9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x55e242(_0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x106757=0x3ee3e5f^_0x24e099;function _0x25d435(){const _0x30a438=_0x1136c9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4014c2(_0x6e71fc(_0x214a5f)),_0x53fbd1=_0x58462c(_0x4014c2(window[_0x1136c9([0x4d,0x61,0x74,0x68])][_0x1136c9([0x63,0x65,0x69,0x6c])](_0x382eed/_0x106757)));window[_0x1136c9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1136c9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30a438,_0x53fbd1);}function _0x4f66d1(){const _0x18dbfe=_0x1136c9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4014c2(_0x6e71fc(_0x214a5f)),_0xc951fe=window[_0x1136c9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1136c9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x18dbfe);return _0xc951fe?window[_0x1136c9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58462c(_0xc951fe),0x10)*_0x106757:null;}function _0x35a204(_0x361cd9){return new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc59439,_0x53de74)=>{_0x361cd9[_0x1136c9([0x74,0x68,0x65,0x6e])](_0xc59439,_0x53de74),window[_0x1136c9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x53de74,0x3d9041f^_0x24e099);});}}_0x5456bf[_0x1136c9([0x6f,0x6e])](_0x1136c9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x420367,_0x19d0ff)=>{if(_0x19d0ff[0x0]!=_0x214a5f)return _0x55e242(_0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x19d0ff[0x1]={..._0x19d0ff[0x1],[_0x1136c9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x391ec1};},{[_0x1136c9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1136c9([0x68,0x69,0x67,0x68])}),_0x5456bf[_0x1136c9([0x6f,0x6e])](_0x1136c9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x53621e=>{_0x9190b5(_0x53621e[_0x1136c9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1d6202=!0x0,_0x525675(_0x53621e[_0x1136c9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1136c9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1136c9([0x6c,0x6f,0x77])}),_0x5872ef[_0x1136c9([0x74,0x68,0x65,0x6e])](()=>{_0x1d6202||_0x55e242(_0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x35addf(){return _0x5456bf[_0x1136c9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1136c9([0x76,0x69,0x65,0x77])][_0x1136c9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1136c9([0x61,0x75,0x74,0x6f]);}function _0x9f78dd(){_0x5456bf[_0x1136c9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1136c9([0x76,0x69,0x65,0x77])][_0x1136c9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1136c9([0x61,0x75,0x74,0x6f]);}}function _0x1452fe(_0x19f9ad){const _0xc79407=[new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x147b14=>setTimeout(_0x147b14,0x3d1ee13^_0x24e099)),_0x5872ef[_0x1136c9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x39a5c7=>{let _0x35ba2e=0x0;_0x5456bf[_0x1136c9([0x6d,0x6f,0x64,0x65,0x6c])][_0x1136c9([0x6f,0x6e])](_0x1136c9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x10417c,_0x5dcd4b)=>{_0x5dcd4b[0x0][_0x1136c9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x35ba2e++,_0x35ba2e==(0x3d8d127^_0x24e099)&&(_0x39a5c7(),_0x10417c[_0x1136c9([0x6f,0x66,0x66])]());});}))];return window[_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1136c9([0x72,0x61,0x63,0x65])](_0xc79407)[_0x1136c9([0x74,0x68,0x65,0x6e])](()=>_0x19f9ad);}async function _0x3ddadb(){await _0x5872ef,_0x5456bf[_0x1136c9([0x6d,0x6f,0x64,0x65,0x6c])][_0x1136c9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x7ef2fd,_0x5456bf[_0x1136c9([0x6d,0x6f,0x64,0x65,0x6c])][_0x1136c9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x7ef2fd,_0x5456bf[_0x1136c9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1136c9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x515830(_0x1356f5){const _0x3bc906=_0x2391e1();_0x5456bf[_0x3bc906]=_0x1136c9([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1356f5,_0x1356f5!=_0x1136c9([0x56,0x61,0x6c,0x69,0x64])&&_0x3ddadb();}function _0x2391e1(){const _0x2e97f7=window[_0x1136c9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1136c9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1136c9([0x6e,0x6f,0x77])]())[_0x1136c9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1136c9([0x2e]),'');let _0x203d91=_0x1136c9([0x52]);for(let _0x207e65=0x0;_0x207e65<_0x2e97f7[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x207e65+=0x2){let _0x273668=window[_0x1136c9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e97f7[_0x1136c9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x207e65,_0x207e65+0x2));_0x273668>=_0x235cf2[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x273668-=_0x235cf2[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x203d91+=_0x235cf2[_0x273668];}return _0x203d91;}function _0x4cbea8(){const _0x408cc8=_0x58e875[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])](_0x1136c9([0x2e]));if(0x3!=_0x408cc8[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x59009f(_0x408cc8[0x1]);function _0x59009f(_0x48ede8){const _0x43c9f5=_0x3495a4(_0x48ede8);return _0x43c9f5&&_0x2cf018()?_0x43c9f5:null;function _0x2cf018(){const _0x47873e=_0x43c9f5[_0x1136c9([0x6a,0x74,0x69])],_0x51a242=window[_0x1136c9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x47873e[_0x1136c9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x47873e[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x33f806={..._0x43c9f5,[_0x1136c9([0x6a,0x74,0x69])]:_0x47873e[_0x1136c9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x47873e[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x33f806[_0x1136c9([0x76,0x63])],_0x6e71fc(_0x33f806)==_0x51a242;}}}async function _0x4b7058(){let _0x3d394c=!0x0;try{const _0x148dcb=_0x58e875[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])](_0x1136c9([0x2e])),[_0x3c18f9,_0x1013f3,_0x1bee3a]=_0x148dcb;return _0x314dfc(_0x3c18f9),await _0x20acfc(_0x3c18f9,_0x1013f3,_0x1bee3a),_0x3d394c;}catch{return!0x1;}function _0x314dfc(_0x14375d){const _0x17062b=_0x3495a4(_0x14375d);_0x17062b&&_0x17062b[_0x1136c9([0x61,0x6c,0x67])]==_0x1136c9([0x45,0x53,0x32,0x35,0x36])||(_0x3d394c=!0x1);}async function _0x20acfc(_0x5e6933,_0x543956,_0x394ce1){const _0x37dcb8=window[_0x1136c9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1136c9([0x66,0x72,0x6f,0x6d])](_0x5719df(_0x394ce1),_0x521572=>_0x521572[_0x1136c9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2ab1eb=new window[(_0x1136c9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1136c9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5e6933+_0x1136c9([0x2e])+_0x543956),_0x57d1f1=window[_0x1136c9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1136c9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x57d1f1)return;const _0x1aa7fe=await _0x57d1f1[_0x1136c9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1136c9([0x6a,0x77,0x6b]),_0x5a25c5,{[_0x1136c9([0x6e,0x61,0x6d,0x65])]:_0x1136c9([0x45,0x43,0x44,0x53,0x41]),[_0x1136c9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1136c9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1136c9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x57d1f1[_0x1136c9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1136c9([0x6e,0x61,0x6d,0x65])]:_0x1136c9([0x45,0x43,0x44,0x53,0x41]),[_0x1136c9([0x68,0x61,0x73,0x68])]:{[_0x1136c9([0x6e,0x61,0x6d,0x65])]:_0x1136c9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1aa7fe,_0x37dcb8,_0x2ab1eb)||(_0x3d394c=!0x1);}}function _0x3495a4(_0x115e92){return _0x115e92[_0x1136c9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1136c9([0x65,0x79]))?JSON[_0x1136c9([0x70,0x61,0x72,0x73,0x65])](_0x5719df(_0x115e92)):null;}function _0x5719df(_0x2cc85a){return window[_0x1136c9([0x61,0x74,0x6f,0x62])](_0x2cc85a[_0x1136c9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1136c9([0x2b]))[_0x1136c9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1136c9([0x2f])));}function _0x6e71fc(_0x474f89){let _0x56bb49=0x1505;function _0x477b0c(_0x59510a){for(let _0x527116=0x0;_0x527116<_0x59510a[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x527116++){const _0x2710f0=_0x59510a[_0x1136c9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x527116);_0x56bb49=(_0x56bb49<<0x5)+_0x56bb49+_0x2710f0,_0x56bb49&=_0x56bb49;}}function _0x56d92f(_0x19467b){Array[_0x1136c9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x19467b)?_0x19467b[_0x1136c9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x56d92f):_0x19467b&&typeof _0x19467b==_0x1136c9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1136c9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x19467b)[_0x1136c9([0x73,0x6f,0x72,0x74])]()[_0x1136c9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x57c0e5,_0x2de299])=>{_0x477b0c(_0x57c0e5),_0x56d92f(_0x2de299);}):_0x477b0c(window[_0x1136c9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x19467b));}return _0x56d92f(_0x474f89),_0x56bb49>>>0x0;}function _0x4014c2(_0x5b8c15){return _0x5b8c15[_0x1136c9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1136c9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1136c9([0x30]));}function _0x58462c(_0x15a02b){return _0x15a02b[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1136c9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1136c9([0x6a,0x6f,0x69,0x6e])]('');}function _0x7ef2fd(){}function _0x1136c9(_0x47edd2){const _0x47c592=_0x22f5;return _0x47edd2[_0x47c592(0xc4)](_0x412594=>String[_0x47c592(0xa8)](_0x412594))[_0x47c592(0xc5)]('');}_0x515830(await _0xeb4a42());}(this);}[_0x590443(0xc3)](){const _0x1c882c=_0x590443,_0x382667=this[_0x1c882c(0xdf)][_0x1c882c(0xa0)][_0x1c882c(0xbe)];_0x382667[_0x1c882c(0xb5)](_0x1c882c(0xd7))&&_0x382667[_0x1c882c(0x9b)](_0x1c882c(0xd7),{'allowAttributes':[_0x1c882c(0xe3)]}),_0x382667[_0x1c882c(0xb5)](_0x1c882c(0xca))&&_0x382667[_0x1c882c(0x9b)](_0x1c882c(0xca),{'allowAttributes':[_0x1c882c(0xe3)]});}[_0x590443(0xc1)](){const _0x4527ad=_0x590443,_0x10f5d7=this[_0x4527ad(0xdf)];_0x10f5d7[_0x4527ad(0x99)][_0x4527ad(0xa3)](_0x4527ad(0xd5))[_0x4527ad(0xae)]({'model':_0x4527ad(0xe3),'view':_0x4527ad(0xcf)}),_0x10f5d7[_0x4527ad(0x99)][_0x4527ad(0xa3)](_0x4527ad(0xe2))[_0x4527ad(0xd0)]({'model':{'key':_0x4527ad(0xe3),'value':_0x494247=>_0x494247[_0x4527ad(0xdb)](_0x4527ad(0xcf))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1937a3=_0x10f5d7[_0x4527ad(0xc7)][_0x4527ad(0x9c)](_0x4527ad(0xa9));_0x1937a3&&this[_0x4527ad(0xd9)](_0x1937a3,_0x4527ad(0xde),(_0x487a75,[_0x8ea40e,_0x16aae2])=>{const _0x2011d3=_0x4527ad;_0x8ea40e[_0x2011d3(0xad)](_0x2011d3(0xe3),_0x16aae2);});}[_0x590443(0xd1)](){const _0x188607=_0x590443,_0x463652=this[_0x188607(0xdf)][_0x188607(0xab)][_0x188607(0x9c)](_0x188607(0x97))||{},_0x495859=this[_0x188607(0xdf)][_0x188607(0xab)][_0x188607(0x9c)](_0x188607(0xa2))||'';this[_0x188607(0xbf)]=_0x5ab1be(_0x57b849[_0x188607(0xe5)],_0x188607(0xac),{..._0x463652,'pubkey':_0x495859,'ctx-name':_0x188607(0x9f)+this[_0x188607(0xb7)],'sourceList':'','imgOnly':_0x188607(0x98),'removeCopyright':_0x188607(0x98),'localeName':this[_0x188607(0xdf)][_0x188607(0xc6)][_0x188607(0xbc)],'externalSourcesEmbedCss':_0x188607(0xd4)}),this[_0x188607(0xbf)][_0x188607(0xd3)]=_0x542006=>{const _0x257ec0=_0x188607;if(_0x257ec0(0xb9)==_0x542006)return _0x257ec0(0xc8);},_0x57b849[_0x188607(0xe5)][_0x188607(0xdc)][_0x188607(0xcc)](this[_0x188607(0xbf)]);}[_0x590443(0xaa)](){const _0x2d091=_0x590443;this[_0x2d091(0xdd)]=_0x5ab1be(_0x57b849[_0x2d091(0xe5)],_0x2d091(0xe6),{'ctx-name':_0x2d091(0x9f)+this[_0x2d091(0xb7)]}),_0x57b849[_0x2d091(0xe5)][_0x2d091(0xdc)][_0x2d091(0xcc)](this[_0x2d091(0xdd)]);}[_0x590443(0xe0)](){const _0x5f0f49=_0x590443,_0x4321b3=this[_0x5f0f49(0xdf)][_0x5f0f49(0xc7)][_0x5f0f49(0x9c)](_0x5f0f49(0xe1));_0x4321b3&&this[_0x5f0f49(0xd9)](_0x4321b3,_0x5f0f49(0xcd),()=>{const _0x3df720=_0x5f0f49,_0x394245=this[_0x3df720(0xdf)][_0x3df720(0xa0)][_0x3df720(0xe5)][_0x3df720(0xb0)][_0x3df720(0xa4)]();_0x394245&&_0x394245[_0x3df720(0xdb)](_0x3df720(0xe3))&&this[_0x3df720(0xdf)][_0x3df720(0x95)][_0x3df720(0xce)][_0x3df720(0xda)](_0x3df720(0xb4),()=>{const _0xc76feb=_0x3df720;_0x4f5a05(this[_0xc76feb(0xdf)],_0x394245);});});const _0x31cec7=this[_0x5f0f49(0xdf)][_0x5f0f49(0xc7)][_0x5f0f49(0x9c)](_0x5f0f49(0xa6));_0x31cec7&&this[_0x5f0f49(0xd9)](_0x31cec7,_0x5f0f49(0xcd),()=>{const _0xd30a44=_0x5f0f49,_0x55fe2f=this[_0xd30a44(0xdf)][_0xd30a44(0xa0)][_0xd30a44(0xe5)][_0xd30a44(0xb0)][_0xd30a44(0xa4)]();_0x55fe2f&&_0x55fe2f[_0xd30a44(0xdb)](_0xd30a44(0xe3))&&this[_0xd30a44(0xdf)][_0xd30a44(0x95)][_0xd30a44(0xce)][_0xd30a44(0xda)](_0xd30a44(0xb4),()=>{const _0x47909b=_0xd30a44;_0x4f5a05(this[_0x47909b(0xdf)],_0x55fe2f);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x27172b,ObservableMixin as _0x1e85d5}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x217ca3}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x29c55d}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4443bb}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x40e009}from'../../utils/uploadutils.js';import{getImageUrls as _0x48f09b,getImageDimension as _0x27c359}from'../../utils/editingutils.js';import{isAncestor as _0x2ad8b9}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x1e85d5(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1e5562,_0x170d15,_0x59bee1){super(),this['_editor']=_0x1e5562,this['_dialog']=_0x170d15,this['_imageElement']=_0x59bee1,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 _0x261d0a=this['_imageElement'],_0x1dd3a7=_0x261d0a['getAttribute']('uploadcareImageId'),_0x2da4f2=_0x261d0a['getAttribute']('src');if(_0x1dd3a7)await this['_loadImageInfo'](_0x1dd3a7,_0x2da4f2);else{if(this['_imageCache']['has'](_0x2da4f2)){const _0x3c9e9b=this['_imageCache']['get'](_0x2da4f2);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3c9e9b['url'],this['imageDimension']=_0x3c9e9b['dimension'],this['imageId']=_0x3c9e9b['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2d837c}=this['_editor'],t=_0x2d837c['t'],_0x42f13e=new _0x4443bb(_0x2d837c,this['imageStatus'],this['_attributes']);_0x42f13e['bind']('status')['to'](this,'imageStatus'),_0x42f13e['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x42f13e['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x42f13e['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x42f13e,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x29c55d,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x42f13e,'position':_0x217ca3['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x42f13e['focus']();},'onHide':()=>{_0x42f13e['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x189efd=>!_0x2ad8b9(_0x189efd,_0x42f13e['element'])}});}['_loadImageInfo'](_0x34da70,_0x2fc95d){return _0x40e009['getInfo'](_0x34da70,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x3bd9e7=>{const {width:_0x48f4fc,height:_0x2a92b5}=_0x3bd9e7['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2fc95d,this['imageDimension']={'width':_0x48f4fc,'height':_0x2a92b5},this['imageId']=_0x34da70;})['catch'](_0x51515f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x51515f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0xd575f,_0x220103){return this['_getImageAsFile'](_0xd575f)['then'](_0x49b0aa=>_0x40e009['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x220103['signal'],'file':_0x49b0aa,'onProgress':_0x16a0dc=>{_0x16a0dc&&_0x16a0dc['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x16a0dc['value']));}}))['then'](_0x13952c=>{const {width:_0x2ba39b,height:_0x15e501}=_0x13952c['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x13952c['cdnUrl'],this['imageDimension']={'width':_0x2ba39b,'height':_0x15e501},this['imageId']=_0x13952c['uuid'],this['imageUploadProgress']=null;const _0x3ed606=_0xd575f['getAttribute']('src');this['_imageCache']['set'](_0x3ed606,{'id':_0x13952c['uuid'],'url':_0x13952c['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2f7af9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2f7af9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x20cd1b,_0x2c3123){_0x20cd1b['on']('apply',(_0x31a79f,_0x45df5f)=>{this['_replaceImage'](_0x2c3123,_0x45df5f['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x20cd1b['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x20cd1b['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x475445,_0xc1b823,_0x22f9fd){const _0x5b8b65=this['_editor'],{width:_0x4800ec,height:_0x48f34a}=_0x27c359(_0xc1b823,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x737f52,imageSources:_0x5e801f}=_0x48f09b(_0xc1b823,_0x4800ec);_0x5b8b65['model']['change'](_0x1aaece=>{if('$graveyard'===_0x475445['root']['rootName']){_0x5b8b65['execute']('insertImage',{'imageType':_0x475445['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x475445['getAttributes']()),'uploadcareImageId':_0x22f9fd,'src':_0x737f52,'sources':_0x5e801f,'width':_0x4800ec,'height':_0x48f34a}});const _0x17843f=_0x475445['getChildren']();_0x475445=_0x5b8b65['model']['document']['selection']['getSelectedElement']();for(const _0x329800 of _0x17843f)_0x1aaece['append'](_0x1aaece['cloneElement'](_0x329800),_0x475445);}else _0x1aaece['setSelection'](_0x475445,'on'),_0x5b8b65['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x475445['getAttributes']()),'uploadcareImageId':_0x22f9fd,'src':_0x737f52,'sources':_0x5e801f,'width':_0x4800ec,'height':_0x48f34a},_0x475445);_0x1aaece['setSelection'](_0x475445,'on');});}async['_getImageAsFile'](_0x14fd97){const _0x37838e=_0x27172b['window'],_0x915f66=_0x27172b['document']['location']['href'],_0x749644=new _0x37838e['URL'](_0x14fd97['getAttribute']('src'),_0x915f66);if('data:'===_0x749644['protocol']){const _0x576a57=_0x749644['href']['split'](','),_0x3c1d1f=_0x576a57[0x0]['match'](/:(.*?);/)[0x1],_0x48434e=_0x3c1d1f['split']('/')[0x1],_0x3035fe=_0x37838e['atob'](_0x576a57[_0x576a57['length']-0x1]);let _0x4168ec=_0x3035fe['length'];const _0x27d42f=new _0x37838e['Uint8Array'](_0x4168ec);for(;_0x4168ec--;)_0x27d42f[_0x4168ec]=_0x3035fe['charCodeAt'](_0x4168ec);return new _0x37838e['File']([_0x27d42f],'image.'+_0x48434e,{'type':_0x3c1d1f});}const _0x4a35d1=_0x749644['href']['split']('/'),_0x243be0=_0x4a35d1[_0x4a35d1['length']-0x1],_0x15d819=_0x243be0['split']('.')[0x1];return _0x37838e['fetch'](_0x749644['href'])['then'](_0x1b3949=>_0x1b3949['clone']()['blob']())['then'](_0x486cde=>new _0x37838e['File']([_0x486cde],_0x243be0,{'type':'image/'+_0x15d819}));}}
23
+ import{global as _0x55bf61,ObservableMixin as _0x529600}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x637ca2}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x5d94b7}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x53bd24}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x3c3611}from'../../utils/uploadutils.js';import{getImageUrls as _0x289209,getImageDimension as _0x52bba7}from'../../utils/editingutils.js';import{isAncestor as _0x401748}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x529600(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4ff387,_0x511889,_0x21ce27){super(),this['_editor']=_0x4ff387,this['_dialog']=_0x511889,this['_imageElement']=_0x21ce27,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 _0x177962=this['_imageElement'],_0x307e2e=_0x177962['getAttribute']('uploadcareImageId'),_0x31e3d0=_0x177962['getAttribute']('src');if(_0x307e2e)await this['_loadImageInfo'](_0x307e2e,_0x31e3d0);else{if(this['_imageCache']['has'](_0x31e3d0)){const _0x423913=this['_imageCache']['get'](_0x31e3d0);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x423913['url'],this['imageDimension']=_0x423913['dimension'],this['imageId']=_0x423913['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x218130}=this['_editor'],t=_0x218130['t'],_0x3397f2=new _0x53bd24(_0x218130,this['imageStatus'],this['_attributes']);_0x3397f2['bind']('status')['to'](this,'imageStatus'),_0x3397f2['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3397f2['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3397f2['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3397f2,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x5d94b7,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3397f2,'position':_0x637ca2['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3397f2['focus']();},'onHide':()=>{_0x3397f2['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x51b4a7=>!_0x401748(_0x51b4a7,_0x3397f2['element'])}});}['_loadImageInfo'](_0x2ce37f,_0x1d5354){return _0x3c3611['getInfo'](_0x2ce37f,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x163883=>{const {width:_0x3de99b,height:_0x318c27}=_0x163883['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1d5354,this['imageDimension']={'width':_0x3de99b,'height':_0x318c27},this['imageId']=_0x2ce37f;})['catch'](_0x3b493a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3b493a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1e988b,_0x259990){return this['_getImageAsFile'](_0x1e988b)['then'](_0x165dcf=>_0x3c3611['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x259990['signal'],'file':_0x165dcf,'onProgress':_0x2114a1=>{_0x2114a1&&_0x2114a1['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2114a1['value']));}}))['then'](_0x1f2932=>{const {width:_0x3f3dd0,height:_0x27fa35}=_0x1f2932['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1f2932['cdnUrl'],this['imageDimension']={'width':_0x3f3dd0,'height':_0x27fa35},this['imageId']=_0x1f2932['uuid'],this['imageUploadProgress']=null;const _0x4bfc30=_0x1e988b['getAttribute']('src');this['_imageCache']['set'](_0x4bfc30,{'id':_0x1f2932['uuid'],'url':_0x1f2932['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x7141a0=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x7141a0['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x159948,_0x88178c){_0x159948['on']('apply',(_0x3fc8b0,_0x20dff2)=>{this['_replaceImage'](_0x88178c,_0x20dff2['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x159948['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x159948['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x58df37,_0x1d98c6,_0x23805b){const _0x2a46ce=this['_editor'],{width:_0x4bdb0b,height:_0x47e69c}=_0x52bba7(_0x1d98c6,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1c844f,imageSources:_0x5aa594}=_0x289209(_0x1d98c6,_0x4bdb0b);_0x2a46ce['model']['change'](_0x34619b=>{if('$graveyard'===_0x58df37['root']['rootName']){_0x2a46ce['execute']('insertImage',{'imageType':_0x58df37['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x58df37['getAttributes']()),'uploadcareImageId':_0x23805b,'src':_0x1c844f,'sources':_0x5aa594,'width':_0x4bdb0b,'height':_0x47e69c}});const _0x5e75d5=_0x58df37['getChildren']();_0x58df37=_0x2a46ce['model']['document']['selection']['getSelectedElement']();for(const _0x351a20 of _0x5e75d5)_0x34619b['append'](_0x34619b['cloneElement'](_0x351a20),_0x58df37);}else _0x34619b['setSelection'](_0x58df37,'on'),_0x2a46ce['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x58df37['getAttributes']()),'uploadcareImageId':_0x23805b,'src':_0x1c844f,'sources':_0x5aa594,'width':_0x4bdb0b,'height':_0x47e69c},_0x58df37);_0x34619b['setSelection'](_0x58df37,'on');});}async['_getImageAsFile'](_0x447357){const _0x3c2374=_0x55bf61['window'],_0x4c8ad9=_0x55bf61['document']['location']['href'],_0x344d7f=new _0x3c2374['URL'](_0x447357['getAttribute']('src'),_0x4c8ad9);if('data:'===_0x344d7f['protocol']){const _0x1aae25=_0x344d7f['href']['split'](','),_0x2911f4=_0x1aae25[0x0]['match'](/:(.*?);/)[0x1],_0x53f631=_0x2911f4['split']('/')[0x1],_0x5675e9=_0x3c2374['atob'](_0x1aae25[_0x1aae25['length']-0x1]);let _0x254e3a=_0x5675e9['length'];const _0x3063ae=new _0x3c2374['Uint8Array'](_0x254e3a);for(;_0x254e3a--;)_0x3063ae[_0x254e3a]=_0x5675e9['charCodeAt'](_0x254e3a);return new _0x3c2374['File']([_0x3063ae],'image.'+_0x53f631,{'type':_0x2911f4});}const _0x33c94e=_0x344d7f['href']['split']('/'),_0x46fe1d=_0x33c94e[_0x33c94e['length']-0x1],_0x9979ff=_0x46fe1d['split']('.')[0x1];return _0x3c2374['fetch'](_0x344d7f['href'])['then'](_0xa0b9df=>_0xa0b9df['clone']()['blob']())['then'](_0x175d78=>new _0x3c2374['File']([_0x175d78],_0x46fe1d,{'type':'image/'+_0x9979ff}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x3734(){const _0x3d33c5=['imageSrc','16749EFvqxV','109718eJTZPq','594237NWkgEy','8053925FmEpxc','232rzuTri','510SBEiyk','uc-light','image-edit','set','58LkkePJ','ck-uploadcare-theme','134685GrLsUq','96DqvjZM','bindTemplate','482364UlpFOJ','18118vjTFen','uc-cloud-image-editor','setTemplate'];_0x3734=function(){return _0x3d33c5;};return _0x3734();}(function(_0x2d0cb3,_0x27b6c0){const _0x40976a=_0x5442,_0x4bee04=_0x2d0cb3();while(!![]){try{const _0xe88ec2=-parseInt(_0x40976a(0x1db))/0x1*(-parseInt(_0x40976a(0x1d5))/0x2)+-parseInt(_0x40976a(0x1e1))/0x3+-parseInt(_0x40976a(0x1da))/0x4+-parseInt(_0x40976a(0x1d7))/0x5*(-parseInt(_0x40976a(0x1d8))/0x6)+-parseInt(_0x40976a(0x1e0))/0x7*(-parseInt(_0x40976a(0x1e3))/0x8)+-parseInt(_0x40976a(0x1df))/0x9*(parseInt(_0x40976a(0x1e4))/0xa)+-parseInt(_0x40976a(0x1e2))/0xb;if(_0xe88ec2===_0x27b6c0)break;else _0x4bee04['push'](_0x4bee04['shift']());}catch(_0x488ee2){_0x4bee04['push'](_0x4bee04['shift']());}}}(_0x3734,0x40bf4));import{View as _0xa3f339}from'ckeditor5/src/ui.js';function _0x5442(_0x5b9b51,_0x23e642){const _0x373400=_0x3734();return _0x5442=function(_0x5442c0,_0x43b43f){_0x5442c0=_0x5442c0-0x1d4;let _0x44d5e5=_0x373400[_0x5442c0];return _0x44d5e5;},_0x5442(_0x5b9b51,_0x23e642);}export class UploadcareImageEditFormEditingView extends _0xa3f339{constructor(_0x337ff8,_0x5e589a){const _0x2af95f=_0x5442;super(_0x337ff8);const _0x15d345=this[_0x2af95f(0x1d9)];this[_0x2af95f(0x1d4)](_0x2af95f(0x1de),''),this[_0x2af95f(0x1dd)]({'tag':_0x2af95f(0x1dc),'attributes':{..._0x5e589a,'class':[_0x2af95f(0x1e5),_0x2af95f(0x1d6)],'ctx-name':_0x2af95f(0x1e6),'cdn-url':_0x15d345['to'](_0x2af95f(0x1de))}});}}
23
+ (function(_0x5839ef,_0x444518){const _0x5529f4=_0x4687,_0x375dfa=_0x5839ef();while(!![]){try{const _0x552fc4=parseInt(_0x5529f4(0xbc))/0x1+-parseInt(_0x5529f4(0xc3))/0x2+parseInt(_0x5529f4(0xc1))/0x3+-parseInt(_0x5529f4(0xbe))/0x4*(parseInt(_0x5529f4(0xb7))/0x5)+-parseInt(_0x5529f4(0xc4))/0x6+parseInt(_0x5529f4(0xc0))/0x7+parseInt(_0x5529f4(0xc2))/0x8;if(_0x552fc4===_0x444518)break;else _0x375dfa['push'](_0x375dfa['shift']());}catch(_0x1ac7da){_0x375dfa['push'](_0x375dfa['shift']());}}}(_0x28aa,0xe36bb));import{View as _0x1f1e46}from'ckeditor5/src/ui.js';function _0x4687(_0x20d47a,_0x3ef384){const _0x28aa88=_0x28aa();return _0x4687=function(_0x468744,_0x307d3c){_0x468744=_0x468744-0xb6;let _0xcb629c=_0x28aa88[_0x468744];return _0xcb629c;},_0x4687(_0x20d47a,_0x3ef384);}export class UploadcareImageEditFormEditingView extends _0x1f1e46{constructor(_0x2b8f5e,_0x573dd9){const _0x5ad25c=_0x4687;super(_0x2b8f5e);const _0x1fbe5d=this[_0x5ad25c(0xb6)];this[_0x5ad25c(0xc5)](_0x5ad25c(0xbd),''),this[_0x5ad25c(0xb9)]({'tag':_0x5ad25c(0xbf),'attributes':{..._0x573dd9,'class':[_0x5ad25c(0xb8),_0x5ad25c(0xba)],'ctx-name':_0x5ad25c(0xbb),'cdn-url':_0x1fbe5d['to'](_0x5ad25c(0xbd))}});}}function _0x28aa(){const _0x1f698a=['815nTtiyU','uc-light','setTemplate','ck-uploadcare-theme','image-edit','887869eyIVCC','imageSrc','26780HcxBIC','uc-cloud-image-editor','3561915DNEURE','1929867aOjZha','19769000EEBEWM','2611484qFIiuz','7095516esVWqy','set','bindTemplate'];_0x28aa=function(){return _0x1f698a;};return _0x28aa();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x119ab7}from'ckeditor5/src/icons.js';import{ButtonView as _0x282199,IconView as _0x184527,View as _0x22f298}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x22f298{constructor(_0x450f2b){super(_0x450f2b);const t=_0x450f2b['t'];this['set']('errorType',null);const _0x1319b3=new _0x282199(_0x450f2b);_0x1319b3['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1319b3['withText']=!0x0,_0x1319b3['class']='ck-button-action',_0x1319b3['on']('execute',()=>{this['fire']('retry');}),_0x1319b3['bind']('isVisible')['to'](this,'errorType',_0x1867e7=>'NotFound'!==_0x1867e7);const _0x3b4a48=new _0x184527();_0x3b4a48['content']=_0x119ab7,_0x3b4a48['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x287ba5=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':[_0x3b4a48,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x287ba5['to']('errorType',_0x7b142e=>t('NotFound'!==_0x7b142e?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1319b3]},{'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 _0x2d7457}from'ckeditor5/src/icons.js';import{ButtonView as _0x1b1c62,IconView as _0xe635a7,View as _0x2cf1f4}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x2cf1f4{constructor(_0x42700b){super(_0x42700b);const t=_0x42700b['t'];this['set']('errorType',null);const _0x5d3cf5=new _0x1b1c62(_0x42700b);_0x5d3cf5['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x5d3cf5['withText']=!0x0,_0x5d3cf5['class']='ck-button-action',_0x5d3cf5['on']('execute',()=>{this['fire']('retry');}),_0x5d3cf5['bind']('isVisible')['to'](this,'errorType',_0x4ccaf7=>'NotFound'!==_0x4ccaf7);const _0x43a9b6=new _0xe635a7();_0x43a9b6['content']=_0x2d7457,_0x43a9b6['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x42cf0a=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':[_0x43a9b6,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x42cf0a['to']('errorType',_0x59cead=>t('NotFound'!==_0x59cead?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x5d3cf5]},{'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'}]}]}]});}}