@ckeditor/ckeditor5-uploadcare 47.4.0-alpha.2 → 47.4.0-alpha.4

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 _0x2c9ec5,Command as _0x340ba3}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x2487e4,IconGooglePhotos as _0x4795c0,IconGoogleDrive as _0x3f9010,IconFacebook as _0x16d930,IconDropbox as _0x1013a5,IconUploadcareLink as _0x379d01,IconUploadcareImageUpload as _0x4fca51,IconError as _0x367b8c,IconUploadcareImageEdit as _0x4ba6e4}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1f56a3,MenuBarMenuListItemButtonView as _0x29e4df,View as _0x56856a,FocusCycler as _0x166141,Dialog as _0x53818d,DialogViewPosition as _0xdf23b5,SpinnerView as _0x49c774,IconView as _0x36c794,Notification as _0x258fba}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2af186,DomEmitterMixin as _0xd9e5e8,global as _0x391e65,getAncestors as _0x48e23b,ObservableMixin as _0x553239,uid as _0x379c4a,createElement as _0x4c768c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x3e7ba4}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2a9864,info as _0x3ab88b}from'@uploadcare/upload-client';import*as _0x40bc2f from'@uploadcare/file-uploader';var i=function(_0x338f0b){return _0x338f0b['Local']='local',_0x338f0b['URL']='url',_0x338f0b['Dropbox']='dropbox',_0x338f0b['GDrive']='gdrive',_0x338f0b['Facebook']='facebook',_0x338f0b['GPhotos']='gphotos',_0x338f0b['OneDrive']='onedrive',_0x338f0b;}({});function _(_0x2e58c2,_0x52b36c,_0x296d97){const t=_0x2e58c2['t'],_0x235e5d=_0x2e58c2['t'];switch(_0x52b36c){case i['Local']:return{'text':_0x235e5d('Insert'===_0x296d97?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x235e5d('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x296d97?_0x235e5d('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x235e5d('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x296d97?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x52b36c;}}class e extends _0x2c9ec5{['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 _0x42120f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x17f7b5;for(const _0x4e5bc8 in _0x42120f){const _0x5dd3b0=_0x4e5bc8,_0x47d709=_0x42120f[_0x5dd3b0];if('uploadcareLicenseKeyValid'==_0x47d709||'uploadcareLicenseKeyInvalid'==_0x47d709||'uploadcareLicenseKeyExpired'==_0x47d709||'uploadcareLicenseKeyDomainLimit'==_0x47d709||'uploadcareLicenseKeyNotAllowed'==_0x47d709||'uploadcareLicenseKeyEvaluationLimit'==_0x47d709||'uploadcareLicenseKeyUsageLimit'==_0x47d709){delete _0x42120f[_0x5dd3b0],_0x17f7b5=_0x47d709,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x17f7b5&&_0x42120f['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x17f7b5&&_0x42120f['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x17f7b5&&_0x42120f['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x17f7b5&&_0x42120f['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x17f7b5&&_0x42120f['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x17f7b5&&_0x42120f['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x514e6d}=this,_0x30339d=_0x514e6d['commands']['get']('uploadcare');if(!_0x30339d)return;const _0x5507da=this['_normalizeConfigSourceList'](_0x514e6d['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x1d8102,_0x3f0816)=>{const _0x21b7b5=this['_getIntegrationKey'](_0x3f0816['type']);return _0x1d8102[_0x21b7b5]||(_0x1d8102[_0x21b7b5]=[]),_0x1d8102[_0x21b7b5]['push'](_0x3f0816),_0x1d8102;},{});_0x514e6d['plugins']['has']('ImageInsertUI')&&_0x514e6d['commands']['get']('uploadcare')&&Object['entries'](_0x5507da)['forEach'](([_0x24dc2f,_0x4eafa9])=>{_0x514e6d['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x24dc2f,'observable':()=>_0x30339d,'buttonViewCreator':()=>this['_createToolbarButton'](_0x4eafa9),'formViewCreator':()=>this['_createDropdownButtons'](_0x4eafa9),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x4eafa9),'override':'assetManager'!==_0x24dc2f});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x5e78c0){const {locale:_0x1e184d}=this['editor'];return _0x5e78c0['map'](_0x2ffd0c=>{const _0x4a99dd=_(_0x1e184d,_0x2ffd0c,'Insert');switch(_0x2ffd0c){case i['Local']:return{'icon':_0x4fca51,'type':i['Local'],..._0x4a99dd};case i['URL']:return{'icon':_0x379d01,'type':i['URL'],..._0x4a99dd};case i['Dropbox']:return{'icon':_0x1013a5,'type':i['Dropbox'],..._0x4a99dd};case i['Facebook']:return{'icon':_0x16d930,'type':i['Facebook'],..._0x4a99dd};case i['GDrive']:return{'icon':_0x3f9010,'type':i['GDrive'],..._0x4a99dd};case i['GPhotos']:return{'icon':_0x4795c0,'type':i['GPhotos'],..._0x4a99dd};case i['OneDrive']:return{'icon':_0x2487e4,'type':i['OneDrive'],..._0x4a99dd};}});}['_getIntegrationKey'](_0x537064){switch(_0x537064){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x592572,_0x4f4216){const _0x360a95=this['editor'],_0x2d5ab8=new _0x592572(_0x360a95['locale']),_0x5037c1=_0x360a95['commands']['get']('uploadcare');return _0x2d5ab8['bind']('isEnabled')['to'](_0x5037c1),_0x2d5ab8['on']('execute',()=>{_0x5037c1['execute'](_0x4f4216);}),_0x2d5ab8;}['_createToolbarButton'](_0x1cfc0b){const {locale:_0x2ab8d7}=this['editor'],_0x2d9bf5=this['editor']['plugins']['get']('ImageInsertUI'),_0x29c39b=_0x1cfc0b[0x0],_0x27cdd1=this['_createButton'](_0x1f56a3,_0x29c39b['type']);return _0x27cdd1['icon']=_0x29c39b['icon'],_0x27cdd1['bind']('label')['to'](_0x2d9bf5,'isImageSelected',_0x4ceffe=>_(_0x2ab8d7,_0x29c39b['type'],_0x4ceffe?'Replace':'Insert')['text']),_0x27cdd1['tooltip']=!0x0,_0x27cdd1;}['_createDropdownButtons'](_0x26c527){const {locale:_0x977894}=this['editor'],_0x296f5c=this['editor']['plugins']['get']('ImageInsertUI');return _0x26c527['map'](_0x3da9e6=>{const _0x4b4cad=this['_createButton'](_0x1f56a3,_0x3da9e6['type']);return _0x4b4cad['withText']=!0x0,_0x4b4cad['icon']=_0x3da9e6['icon'],_0x4b4cad['bind']('label')['to'](_0x296f5c,'isImageSelected',_0x1990d8=>_(_0x977894,_0x3da9e6['type'],_0x1990d8?'Replace':'Insert')['text']),_0x4b4cad;});}['_createMenuBarButtons'](_0x2ff2e8){return _0x2ff2e8['map'](_0x477f76=>{const _0x485840=this['_createButton'](_0x29e4df,_0x477f76['type']);return _0x485840['icon']=_0x477f76['icon'],_0x485840['label']=_0x477f76['shortText'],_0x485840;});}}class F extends _0x56856a{['focusTracker'];['focusCycler'];constructor(_0x55e261){super(_0x55e261),this['focusTracker']=new _0x2af186(),this['focusCycler']=new _0x166141({'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(_0x2046ad,_0x493490){super(_0x2046ad),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-'+_0x493490}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x46c2b5,_0x557f22){const _0x341d50=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x43d81e=>_0x43d81e<=_0x557f22)['map'](_0x2a7b7f=>_0x46c2b5['replace'](/\/$/,'')+'/-/resize/'+_0x2a7b7f+'x/\x20'+_0x2a7b7f+'w');return{'imageFallbackUrl':_0x46c2b5,'imageSources':[{'srcset':_0x341d50['join'](',\x20'),'sizes':'(max-width:\x20'+_0x557f22+'px)\x20100vw,\x20'+_0x557f22+'px','type':'image/webp'}]};}function S(_0x4994dc,_0x109bee,_0xe90e35){const _0xce24bf=_0x4994dc['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0xce24bf?parseInt(_0xce24bf[0x1],0xa):_0x109bee,'height':_0xce24bf?parseInt(_0xce24bf[0x2],0xa):_0xe90e35};}function p(_0x5dc235,_0x381d29){const _0x5b3764=new(_0xd9e5e8())(),_0x23a06a=_0x5dc235['plugins']['get']('ImageUtils'),_0x4a1f47=_0x5dc235['editing']['mapper']['toViewElement'](_0x381d29),_0x2b5dbd=_0x23a06a['findViewImgElement'](_0x4a1f47),_0x27d40e=_0x5dc235['editing']['view']['domConverter']['viewToDom'](_0x2b5dbd),_0x4ce95f=_0x381d29['getAttribute']('width'),_0x544307=_0x381d29['getAttribute']('height'),_0x394e34='image-processing';_0x5dc235['editing']['view']['change'](_0x38aa27=>{_0x38aa27['addClass'](_0x394e34,_0x4a1f47),_0x38aa27['setStyle']('aspect-ratio',_0x4ce95f+'/'+_0x544307,_0x2b5dbd);}),_0x5b3764['listenTo'](_0x27d40e,'load',()=>{_0x5b3764['stopListening'](_0x27d40e,'load'),_0x5dc235['editing']['view']['change'](_0x220d8b=>{_0x220d8b['removeClass'](_0x394e34,_0x4a1f47),_0x220d8b['removeStyle']('aspect-ratio',_0x2b5dbd);});});}function G(_0x4e836b){if(Array['isArray'](_0x4e836b)){const _0x54d988=_0x4e836b['map'](G);return _0xf39895=>_0x54d988['some'](_0x31d0b5=>_0x31d0b5(_0xf39895));}if('origin'==_0x4e836b){const _0x4bb54c=_0x391e65['window']['location']['origin'];return _0x28b820=>new URL(_0x28b820,_0x391e65['document']['baseURI'])['origin']==_0x4bb54c;}return'function'==typeof _0x4e836b?_0x4e836b:_0x4e836b instanceof RegExp?_0x2b9755=>!(!_0x2b9755['match'](_0x4e836b)&&!_0x2b9755['replace'](/^https?:\/\//,'')['match'](_0x4e836b)):()=>!0x1;}function A(_0x577145,_0x5ea058){return _0x48e23b(_0x577145['target'])['includes'](_0x5ea058);}class n extends/* #__PURE__ -- @preserve */
24
- _0x553239(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x55cbeb,_0x3b4bc4,_0x41199d){super(),this['_editor']=_0x55cbeb,this['_editing']=_0x3b4bc4,this['_dialog']=_0x55cbeb['plugins']['get'](_0x53818d),this['_api']=_0x3b4bc4['ctxElement']['getAPI'](),this['_type']=_0x41199d,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:_0x1f59a5,model:_0xe142dd}=this['_editor'],_0x2ac62c=_0xe142dd['document']['selection']['getSelectedElement'](),_0x1d21cb=_0x2ac62c&&(_0x2ac62c['is']('element','imageBlock')||_0x2ac62c['is']('element','imageInline'));this['_formView']=new x(_0x1f59a5,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4fca51,'title':_(_0x1f59a5,this['_type'],_0x1d21cb?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xdf23b5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x177afe=>!A(_0x177afe,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x21c5a0}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x8d7c01=>{const _0x3b31b4=_0x21c5a0['length'];for(const _0x5525dd of _0x21c5a0){const _0x9eba88=_0x5525dd===_0x21c5a0[_0x3b31b4-0x1],{cdnUrl:_0x1d2340,fileInfo:_0x598c85}=_0x5525dd;if(!_0x1d2340||!_0x598c85)continue;const {width:_0x3e0b87,height:_0x54ac79}=_0x598c85['imageInfo'],_0x37abac=S(_0x1d2340,_0x3e0b87,_0x54ac79),_0x1f15fc=C(_0x1d2340,_0x37abac['width']),_0x439368={'id':_0x598c85['uuid'],'type':'image','attributes':{'imageDimension':_0x37abac,..._0x1f15fc}};this['_insertAsset'](_0x439368,_0x9eba88,_0x8d7c01);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1694c4=>{'idle'===_0x1694c4['detail']['status']&&!_0x1694c4['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4dab0e,_0x5c1ce5,_0x33af2b){const _0x499498=this['_editor']['model']['document']['selection'],_0x3d371a=_0x499498['getSelectedElement'](),_0x364f4f=!(!_0x3d371a||!_0x3d371a['is']('element','imageInline'));_0x33af2b['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4dab0e,_0x364f4f),_0x5c1ce5||_0x33af2b['setSelection'](_0x499498['getLastPosition']());}['_insertImage'](_0x23198a,_0x3bfba6){const _0x19be75=this['_editor'],{imageDimension:_0x41a812,imageFallbackUrl:_0x394647,imageSources:_0x3f60c6}=_0x23198a['attributes'];_0x19be75['execute']('insertImage',{'imageType':_0x3bfba6?'imageInline':null,'source':{'uploadcareImageId':_0x23198a['id'],'src':_0x394647,'sources':_0x3f60c6,..._0x41a812}});}}class w extends _0x340ba3{['_editing'];['_controller']=null;static get['requires'](){return[_0x53818d,o];}constructor(_0x6c650){super(_0x6c650),this['_editing']=_0x6c650['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x845361){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x845361);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x30e146,..._0x10b58b}){return _0x2a9864(_0x30e146,_0x10b58b);}static['getInfo'](_0x1cb687,_0xf5fe54){return _0x3ab88b(_0x1cb687,_0xf5fe54);}}class f extends _0x2c9ec5{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x3e7ba4,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x9bfea5=this['editor'];if(!!!_0x9bfea5['config']['get']('uploadcare'))return;_0x9bfea5['plugins']['get'](_0x3e7ba4)['createUploadAdapter']=_0x4d749b=>new k(_0x4d749b,_0x9bfea5),_0x9bfea5['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4c9125,{imageElement:_0x43f27c,data:_0x59accf})=>{_0x9bfea5['model']['change'](_0x1f7b94=>{_0x1f7b94['setAttribute']('uploadcareImageId',_0x59accf['uploadcareImageId'],_0x43f27c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x41fff7,_0x21313c){this['loader']=_0x41fff7,this['editor']=_0x21313c,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x3a8266=await this['loader']['file'];return j['upload']({'file':_0x3a8266,'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':_0x4d4831=>{_0x4d4831&&_0x4d4831['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x4d4831['value']);}})['then'](async _0x3163ce=>{const {imageFallbackUrl:_0x114150,imageSources:_0xeed8dc}=C(_0x3163ce['cdnUrl'],_0x3163ce['imageInfo']['width']);return{'uploadcareImageId':_0x3163ce['uuid'],'default':_0x114150,'sources':_0xeed8dc};})['catch'](()=>{const _0x4aa0c4=t('Cannot\x20upload\x20file:')+('\x20'+_0x3a8266['name']+'.');return Promise['reject'](_0x4aa0c4);});}['abort'](){this['controller']['abort']();}}class o extends _0x2c9ec5{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x53818d];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x76a733){super(_0x76a733),this['ucContextId']=_0x379c4a();}['init'](){const _0x4141e8=this['editor'];_0x4141e8['commands']['add']('uploadcare',new w(_0x4141e8));}['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 _0x476f5a=_0x391e65['document']['querySelector']('input[uploadcare-file-input]');_0x476f5a&&_0x476f5a['remove']();}),async function(_0x584050){const _0x735bf1=_0x45c2fe([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x430c93=0x535f8c3a,_0x57e004=0x5358f252^_0x430c93,_0x1a0483=window[_0x45c2fe([0x44,0x61,0x74,0x65])][_0x45c2fe([0x6e,0x6f,0x77])](),_0x3e1ad8=_0x584050[_0x45c2fe([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4310d1=new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17d991=>{_0x3e1ad8[_0x45c2fe([0x6f,0x6e,0x63,0x65])](_0x45c2fe([0x72,0x65,0x61,0x64,0x79]),_0x17d991);}),_0xf2fe0b={[_0x45c2fe([0x6b,0x74,0x79])]:_0x45c2fe([0x45,0x43]),[_0x45c2fe([0x75,0x73,0x65])]:_0x45c2fe([0x73,0x69,0x67]),[_0x45c2fe([0x63,0x72,0x76])]:_0x45c2fe([0x50,0x2d,0x32,0x35,0x36]),[_0x45c2fe([0x78])]:_0x45c2fe([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]),[_0x45c2fe([0x79])]:_0x45c2fe([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]),[_0x45c2fe([0x61,0x6c,0x67])]:_0x45c2fe([0x45,0x53,0x32,0x35,0x36])},_0x4961dc=_0x3e1ad8[_0x45c2fe([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x45c2fe([0x67,0x65,0x74])](_0x45c2fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3386fb(){let _0x4ab03f,_0x484e3b=null,_0x260696=null;try{if(_0x4961dc==_0x45c2fe([0x47,0x50,0x4c]))return _0x45c2fe([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4ab03f=_0x33bc18(),!_0x4ab03f)return _0x45c2fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4ab03f[_0x45c2fe([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x260696=_0x4c64d3(_0x4ab03f[_0x45c2fe([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4ab03f[_0x45c2fe([0x6a,0x74,0x69])])),await _0x2e6635()?_0x2613b4()?_0x3387c3()?_0x45c2fe([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x31e7f5()?(_0x4ab03f[_0x45c2fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x45c2fe([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x484e3b=_0x3d77c2(_0x45c2fe([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x298f44()):_0x45c2fe([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x45c2fe([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x45c2fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x45c2fe([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3387c3(){const _0x85e950=[_0x45c2fe([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x45c2fe([0x74,0x72,0x69,0x61,0x6c])][_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ab03f[_0x45c2fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1a0483/0x3e8:0xe10*_0x57e004;return _0x4ab03f[_0x45c2fe([0x65,0x78,0x70])]<_0x85e950;}function _0x2613b4(){const _0x363193=_0x4ab03f[_0x45c2fe([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x363193&&(!!_0x363193[_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45c2fe([0x2a]))||!!_0x363193[_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45c2fe([0x55,0x50,0x4c,0x43])));}function _0x31e7f5(){const _0xa39fde=_0x4ab03f[_0x45c2fe([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xa39fde||0x0==_0xa39fde[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x20514a}=new URL(window[_0x45c2fe([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xa39fde[_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x20514a))return!0x0;const _0x30a8b6=_0x20514a[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])](_0x45c2fe([0x2e]));return _0xa39fde[_0x45c2fe([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5627f3=>_0x5627f3[_0x45c2fe([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45c2fe([0x2a])))[_0x45c2fe([0x6d,0x61,0x70])](_0x2258b2=>_0x2258b2[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])](_0x45c2fe([0x2e])))[_0x45c2fe([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x389ecd=>_0x389ecd[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x30a8b6[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45c2fe([0x6d,0x61,0x70])](_0x44a066=>Array(_0x30a8b6[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x44a066[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x45c2fe([0x66,0x69,0x6c,0x6c])](_0x44a066[0x0]===_0x45c2fe([0x2a])?_0x45c2fe([0x2a]):'')[_0x45c2fe([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x44a066))[_0x45c2fe([0x73,0x6f,0x6d,0x65])](_0x2847ed=>_0x30a8b6[_0x45c2fe([0x65,0x76,0x65,0x72,0x79])]((_0x8813e3,_0x1a7da3)=>_0x2847ed[_0x1a7da3]===_0x8813e3||_0x2847ed[_0x1a7da3]===_0x45c2fe([0x2a])));}function _0x298f44(){return _0x484e3b&&_0x260696?new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57391e,_0x1e32fb)=>{_0x484e3b[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0x57391e,_0x1e32fb),_0x260696[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0x425a87=>{_0x425a87!=_0x45c2fe([0x56,0x61,0x6c,0x69,0x64])&&_0x57391e(_0x425a87);},_0x1e32fb);}):_0x484e3b||_0x260696||_0x45c2fe([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4c64d3(_0x363481,_0x5ce32d){return new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x405939=>{if(_0x1b6c53())return _0x405939(_0x45c2fe([0x56,0x61,0x6c,0x69,0x64]));_0xbf23a6(),_0x3e1ad8[_0x45c2fe([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x45c2fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x54e196=!0x1;const _0x28cc13=_0x379c4a();function _0x3f3dc6(_0x3f7814){return!!_0x3f7814&&(typeof _0x3f7814===_0x45c2fe([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3f7814===_0x45c2fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3f7814[_0x45c2fe([0x74,0x68,0x65,0x6e])]===_0x45c2fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3f7814[_0x45c2fe([0x63,0x61,0x74,0x63,0x68])]===_0x45c2fe([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x35bbb0(_0x4156b0){_0x8ac2a7(_0x4156b0)[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0xf70176=>{if(!_0xf70176||_0xf70176[_0x45c2fe([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x45c2fe([0x6f,0x6b]))return _0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5c8e19(_0x39f88c(_0x28cc13+_0x5ce32d))!=_0xf70176[_0x45c2fe([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x45c2fe([0x56,0x61,0x6c,0x69,0x64]);})[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0xf49578=>(_0x1593fa(),_0xf49578),()=>{const _0x7fcb75=_0x1cfc05();return null==_0x7fcb75?(_0x1593fa(),_0x45c2fe([0x56,0x61,0x6c,0x69,0x64])):_0x45c2fe(_0x1a0483-_0x7fcb75>(0x7753083a^_0x430c93)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0x405939)[_0x45c2fe([0x63,0x61,0x74,0x63,0x68])](()=>{_0x405939(_0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x379341=0x536962ba^_0x430c93;function _0x1593fa(){const _0x50ae0f=_0x45c2fe([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c8e19(_0x39f88c(_0x363481)),_0xfd4af0=_0x55f9a3(_0x5c8e19(window[_0x45c2fe([0x4d,0x61,0x74,0x68])][_0x45c2fe([0x63,0x65,0x69,0x6c])](_0x1a0483/_0x379341)));window[_0x45c2fe([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45c2fe([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x50ae0f,_0xfd4af0);}function _0x1cfc05(){const _0x35f18a=_0x45c2fe([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c8e19(_0x39f88c(_0x363481)),_0x56cf19=window[_0x45c2fe([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x45c2fe([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35f18a);return _0x56cf19?window[_0x45c2fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x55f9a3(_0x56cf19),0x10)*_0x379341:null;}function _0x8ac2a7(_0x29f415){return new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x21eb1e,_0x12007b)=>{_0x29f415[_0x45c2fe([0x74,0x68,0x65,0x6e])](_0x21eb1e,_0x12007b),window[_0x45c2fe([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x12007b,0x535e58fa^_0x430c93);});}}_0x3e1ad8[_0x45c2fe([0x6f,0x6e])](_0x45c2fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x15d491,_0x22dc12)=>{if(_0x22dc12[0x0]!=_0x363481)return _0x405939(_0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x22dc12[0x1]={..._0x22dc12[0x1],[_0x45c2fe([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x28cc13};},{[_0x45c2fe([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45c2fe([0x68,0x69,0x67,0x68])}),_0x3e1ad8[_0x45c2fe([0x6f,0x6e])](_0x45c2fe([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x150860=>{_0x3f3dc6(_0x150860[_0x45c2fe([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x54e196=!0x0,_0x35bbb0(_0x150860[_0x45c2fe([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x45c2fe([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x45c2fe([0x6c,0x6f,0x77])}),_0x4310d1[_0x45c2fe([0x74,0x68,0x65,0x6e])](()=>{_0x54e196||_0x405939(_0x45c2fe([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1b6c53(){return _0x3e1ad8[_0x45c2fe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45c2fe([0x76,0x69,0x65,0x77])][_0x45c2fe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x45c2fe([0x61,0x75,0x74,0x6f]);}function _0xbf23a6(){_0x3e1ad8[_0x45c2fe([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x45c2fe([0x76,0x69,0x65,0x77])][_0x45c2fe([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x45c2fe([0x61,0x75,0x74,0x6f]);}}function _0x3d77c2(_0x391407){const _0x47086c=[new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f774a=>setTimeout(_0x2f774a,0x5356b2f6^_0x430c93)),_0x4310d1[_0x45c2fe([0x74,0x68,0x65,0x6e])](()=>new window[(_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31652c=>{let _0xfcaa95=0x0;_0x3e1ad8[_0x45c2fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x45c2fe([0x6f,0x6e])](_0x45c2fe([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x236513,_0x917922)=>{_0x917922[0x0][_0x45c2fe([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xfcaa95++,_0xfcaa95==(0x535f89d2^_0x430c93)&&(_0x31652c(),_0x236513[_0x45c2fe([0x6f,0x66,0x66])]());});}))];return window[_0x45c2fe([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x45c2fe([0x72,0x61,0x63,0x65])](_0x47086c)[_0x45c2fe([0x74,0x68,0x65,0x6e])](()=>_0x391407);}async function _0x3e61ea(){await _0x4310d1,_0x3e1ad8[_0x45c2fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x45c2fe([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x44c079,_0x3e1ad8[_0x45c2fe([0x6d,0x6f,0x64,0x65,0x6c])][_0x45c2fe([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x44c079,_0x3e1ad8[_0x45c2fe([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x45c2fe([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4683a5(_0x48a0a3){const _0x13c5a8=_0x538d03();_0x3e1ad8[_0x13c5a8]=_0x45c2fe([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x48a0a3,_0x48a0a3!=_0x45c2fe([0x56,0x61,0x6c,0x69,0x64])&&_0x3e61ea();}function _0x538d03(){const _0x5e0eb7=window[_0x45c2fe([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x45c2fe([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x45c2fe([0x6e,0x6f,0x77])]())[_0x45c2fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x45c2fe([0x2e]),'');let _0x42fe52=_0x45c2fe([0x68]);for(let _0x1e1561=0x0;_0x1e1561<_0x5e0eb7[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1e1561+=0x2){let _0x5edd53=window[_0x45c2fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e0eb7[_0x45c2fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1e1561,_0x1e1561+0x2));_0x5edd53>=_0x735bf1[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5edd53-=_0x735bf1[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x42fe52+=_0x735bf1[_0x5edd53];}return _0x42fe52;}function _0x33bc18(){const _0x298682=_0x4961dc[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])](_0x45c2fe([0x2e]));if(0x3!=_0x298682[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2eecf9(_0x298682[0x1]);function _0x2eecf9(_0x51381c){const _0x544ccc=_0x17c4f6(_0x51381c);return _0x544ccc&&_0x577af7()?_0x544ccc:null;function _0x577af7(){const _0x15f2c6=_0x544ccc[_0x45c2fe([0x6a,0x74,0x69])],_0x2c2817=window[_0x45c2fe([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15f2c6[_0x45c2fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15f2c6[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x28a0b3={..._0x544ccc,[_0x45c2fe([0x6a,0x74,0x69])]:_0x15f2c6[_0x45c2fe([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x15f2c6[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x28a0b3[_0x45c2fe([0x76,0x63])],_0x39f88c(_0x28a0b3)==_0x2c2817;}}}async function _0x2e6635(){let _0x5577c6=!0x0;try{const _0x593ad=_0x4961dc[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])](_0x45c2fe([0x2e])),[_0x4a54f6,_0x373846,_0x33690e]=_0x593ad;return _0x273640(_0x4a54f6),await _0xa514bb(_0x4a54f6,_0x373846,_0x33690e),_0x5577c6;}catch{return!0x1;}function _0x273640(_0xc20ba3){const _0x26535b=_0x17c4f6(_0xc20ba3);_0x26535b&&_0x26535b[_0x45c2fe([0x61,0x6c,0x67])]==_0x45c2fe([0x45,0x53,0x32,0x35,0x36])||(_0x5577c6=!0x1);}async function _0xa514bb(_0x23cf0e,_0x4c98ed,_0x19fd2f){const _0x5efa8a=window[_0x45c2fe([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x45c2fe([0x66,0x72,0x6f,0x6d])](_0x4be939(_0x19fd2f),_0x4766ac=>_0x4766ac[_0x45c2fe([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x52d160=new window[(_0x45c2fe([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x45c2fe([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x23cf0e+_0x45c2fe([0x2e])+_0x4c98ed),_0x1e1f14=window[_0x45c2fe([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x45c2fe([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1e1f14)return;const _0x12d703=await _0x1e1f14[_0x45c2fe([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x45c2fe([0x6a,0x77,0x6b]),_0xf2fe0b,{[_0x45c2fe([0x6e,0x61,0x6d,0x65])]:_0x45c2fe([0x45,0x43,0x44,0x53,0x41]),[_0x45c2fe([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x45c2fe([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x45c2fe([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1e1f14[_0x45c2fe([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x45c2fe([0x6e,0x61,0x6d,0x65])]:_0x45c2fe([0x45,0x43,0x44,0x53,0x41]),[_0x45c2fe([0x68,0x61,0x73,0x68])]:{[_0x45c2fe([0x6e,0x61,0x6d,0x65])]:_0x45c2fe([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x12d703,_0x5efa8a,_0x52d160)||(_0x5577c6=!0x1);}}function _0x17c4f6(_0x3856b0){return _0x3856b0[_0x45c2fe([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x45c2fe([0x65,0x79]))?JSON[_0x45c2fe([0x70,0x61,0x72,0x73,0x65])](_0x4be939(_0x3856b0)):null;}function _0x4be939(_0x582974){return window[_0x45c2fe([0x61,0x74,0x6f,0x62])](_0x582974[_0x45c2fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x45c2fe([0x2b]))[_0x45c2fe([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x45c2fe([0x2f])));}function _0x39f88c(_0x45e12b){let _0x1e3361=0x1505;function _0x193f2c(_0x489e99){for(let _0x360ad8=0x0;_0x360ad8<_0x489e99[_0x45c2fe([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x360ad8++){const _0x5334ac=_0x489e99[_0x45c2fe([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x360ad8);_0x1e3361=(_0x1e3361<<0x5)+_0x1e3361+_0x5334ac,_0x1e3361&=_0x1e3361;}}function _0x2d6c05(_0x4fcc04){Array[_0x45c2fe([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4fcc04)?_0x4fcc04[_0x45c2fe([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2d6c05):_0x4fcc04&&typeof _0x4fcc04==_0x45c2fe([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x45c2fe([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4fcc04)[_0x45c2fe([0x73,0x6f,0x72,0x74])]()[_0x45c2fe([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1f9c67,_0x97a805])=>{_0x193f2c(_0x1f9c67),_0x2d6c05(_0x97a805);}):_0x193f2c(window[_0x45c2fe([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4fcc04));}return _0x2d6c05(_0x45e12b),_0x1e3361>>>0x0;}function _0x5c8e19(_0x542592){return _0x542592[_0x45c2fe([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x45c2fe([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x45c2fe([0x30]));}function _0x55f9a3(_0x42802f){return _0x42802f[_0x45c2fe([0x73,0x70,0x6c,0x69,0x74])]('')[_0x45c2fe([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x45c2fe([0x6a,0x6f,0x69,0x6e])]('');}function _0x44c079(){}function _0x45c2fe(_0x3747a2){return _0x3747a2['map'](_0x411122=>String['fromCharCode'](_0x411122))['join']('');}_0x4683a5(await _0x3386fb());}(this);}['_initSchema'](){const _0x95490e=this['editor']['model']['schema'];_0x95490e['isRegistered']('imageBlock')&&_0x95490e['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x95490e['isRegistered']('imageInline')&&_0x95490e['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x53f4bb=this['editor'];_0x53f4bb['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x53f4bb['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x6a69b3=>_0x6a69b3['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x2f931d=_0x53f4bb['commands']['get']('replaceImageSource');_0x2f931d&&this['listenTo'](_0x2f931d,'cleanupImage',(_0x2bc013,[_0x5d1f51,_0x121e8b])=>{_0x5d1f51['removeAttribute']('uploadcareImageId',_0x121e8b);});}['_initConfig'](){const _0x14bb72=this['editor']['config']['get']('uploadcare.uploader')||{},_0x2b1dbc=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4c768c(_0x391e65['document'],'uc-config',{..._0x14bb72,'pubkey':_0x2b1dbc,'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']=_0x2b039c=>{if('closeMax'==_0x2b039c)return'#uc-icon-arrow-down';},_0x391e65['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4c768c(_0x391e65['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x391e65['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0xd591fa=this['editor']['commands']['get']('insertImage');_0xd591fa&&this['listenTo'](_0xd591fa,'execute',()=>{const _0x17e220=this['editor']['model']['document']['selection']['getSelectedElement']();_0x17e220&&_0x17e220['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x17e220);});});const _0x1b6604=this['editor']['commands']['get']('uploadcareImageReplace');_0x1b6604&&this['listenTo'](_0x1b6604,'execute',()=>{const _0x32aa86=this['editor']['model']['document']['selection']['getSelectedElement']();_0x32aa86&&_0x32aa86['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x32aa86);});});}}class tt extends _0x2c9ec5{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x151ee2){super(_0x151ee2),_0x151ee2['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x40bc2f['defineComponents'](_0x40bc2f),this['_defineLocale']();}['_defineLocale'](){const _0x39e909=this['editor']['config']['get']('uploadcare.locale'),_0x4c30b5=this['editor']['locale']['contentLanguage'];_0x39e909&&_0x40bc2f['defineLocale'](_0x4c30b5,_0x39e909);}}class ii extends _0x56856a{constructor(_0x9440c8){super(_0x9440c8);const t=_0x9440c8['t'],_0x4db71d=this['bindTemplate'],_0x540d88=new _0x49c774();_0x540d88['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':[_0x540d88,{'text':_0x4db71d['to']('imageUploadProgress',_0x3a0bfa=>t('Loading\x20image...')+'\x20('+(_0x3a0bfa||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 _0x56856a{constructor(_0x2b3fe3){super(_0x2b3fe3);const t=_0x2b3fe3['t'];this['set']('errorType',null);const _0x575e8d=new _0x1f56a3(_0x2b3fe3);_0x575e8d['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x575e8d['withText']=!0x0,_0x575e8d['class']='ck-button-action',_0x575e8d['on']('execute',()=>{this['fire']('retry');}),_0x575e8d['bind']('isVisible')['to'](this,'errorType',_0x3de963=>'NotFound'!==_0x3de963);const _0xf932ee=new _0x36c794();_0xf932ee['content']=_0x367b8c,_0xf932ee['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3b9fd8=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':[_0xf932ee,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3b9fd8['to']('errorType',_0x47a6a2=>t('NotFound'!==_0x47a6a2?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x575e8d]},{'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 _0x56856a{constructor(_0x23522a,_0x200e87){super(_0x23522a);const _0x405691=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x200e87,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x405691['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4f943c,_0x69d467,_0x538a5f){super(_0x4f943c),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x4f943c),this['_errorView']=new ti(_0x4f943c),this['_editingView']=new ei(_0x4f943c,_0x538a5f),this['_focusableView']=new _0x56856a(_0x4f943c),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x69d467),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'],_0x5c9fde=>{this['_addUploadcareImageEditorListeners'](_0x5c9fde);});}),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'](_0x57b224,_0x1b52ae){const _0x3bf474='uc-cloud-image-editor',_0x20989e=_0x57b224['querySelector'](_0x3bf474);if(_0x20989e)return _0x1b52ae(_0x20989e);const _0x4f2bdb=new MutationObserver(_0x2d8203=>{const _0x2b96db=_0x2d8203['filter'](_0x48eb5b=>_0x48eb5b['target']===_0x57b224&&_0x48eb5b['addedNodes']['length']>0x0&&_0x48eb5b['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x3bf474);_0x2b96db['length']&&(_0x4f2bdb['disconnect'](),_0x1b52ae(_0x2b96db[0x0]['addedNodes'][0x0]));});_0x4f2bdb['observe'](_0x57b224,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x3d8906){_0x3d8906['addEventListener']('apply',_0x232f45=>{this['fire']('apply',{'imageSrc':_0x232f45['detail']['cdnUrl']});}),_0x3d8906['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
- _0x553239(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4cfb91,_0x16d3eb,_0x5d8270){super(),this['_editor']=_0x4cfb91,this['_dialog']=_0x16d3eb,this['_imageElement']=_0x5d8270,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 _0x211fd1=this['_imageElement'],_0x49c6f3=_0x211fd1['getAttribute']('uploadcareImageId'),_0x39a3e6=_0x211fd1['getAttribute']('src');if(_0x49c6f3)await this['_loadImageInfo'](_0x49c6f3,_0x39a3e6);else{if(this['_imageCache']['has'](_0x39a3e6)){const _0x3d75bd=this['_imageCache']['get'](_0x39a3e6);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3d75bd['url'],this['imageDimension']=_0x3d75bd['dimension'],this['imageId']=_0x3d75bd['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x52597c}=this['_editor'],t=_0x52597c['t'],_0x515c09=new X(_0x52597c,this['imageStatus'],this['_attributes']);_0x515c09['bind']('status')['to'](this,'imageStatus'),_0x515c09['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x515c09['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x515c09['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x515c09,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4ba6e4,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x515c09,'position':_0xdf23b5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x515c09['focus']();},'onHide':()=>{_0x515c09['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2e5a6b=>!A(_0x2e5a6b,_0x515c09['element'])}});}['_loadImageInfo'](_0x3b8f25,_0x639e27){return j['getInfo'](_0x3b8f25,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x41793e=>{const {width:_0x2afddd,height:_0x23c8de}=_0x41793e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x639e27,this['imageDimension']={'width':_0x2afddd,'height':_0x23c8de},this['imageId']=_0x3b8f25;})['catch'](_0x2cd916=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2cd916['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4b001d,_0x12f820){return this['_getImageAsFile'](_0x4b001d)['then'](_0x51f68d=>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':_0x12f820['signal'],'file':_0x51f68d,'onProgress':_0x625b6d=>{_0x625b6d&&_0x625b6d['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x625b6d['value']));}}))['then'](_0x3f824e=>{const {width:_0x63d3cc,height:_0x38dc14}=_0x3f824e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3f824e['cdnUrl'],this['imageDimension']={'width':_0x63d3cc,'height':_0x38dc14},this['imageId']=_0x3f824e['uuid'],this['imageUploadProgress']=null;const _0xe15deb=_0x4b001d['getAttribute']('src');this['_imageCache']['set'](_0xe15deb,{'id':_0x3f824e['uuid'],'url':_0x3f824e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3c551a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3c551a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4907c0,_0x587d91){_0x4907c0['on']('apply',(_0x10fcf5,_0x2499b4)=>{this['_replaceImage'](_0x587d91,_0x2499b4['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4907c0['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4907c0['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x44b1fd,_0x84bbf2,_0x3c9af7){const _0x2fffe1=this['_editor'],{width:_0x40e7fe,height:_0x8849c5}=S(_0x84bbf2,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1ffb99,imageSources:_0x3d3224}=C(_0x84bbf2,_0x40e7fe);_0x2fffe1['model']['change'](_0x46bf0d=>{if('$graveyard'===_0x44b1fd['root']['rootName']){_0x2fffe1['execute']('insertImage',{'imageType':_0x44b1fd['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x44b1fd['getAttributes']()),'uploadcareImageId':_0x3c9af7,'src':_0x1ffb99,'sources':_0x3d3224,'width':_0x40e7fe,'height':_0x8849c5}});const _0x5be425=_0x44b1fd['getChildren']();_0x44b1fd=_0x2fffe1['model']['document']['selection']['getSelectedElement']();for(const _0x18b22f of _0x5be425)_0x46bf0d['append'](_0x46bf0d['cloneElement'](_0x18b22f),_0x44b1fd);}else _0x46bf0d['setSelection'](_0x44b1fd,'on'),_0x2fffe1['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x44b1fd['getAttributes']()),'uploadcareImageId':_0x3c9af7,'src':_0x1ffb99,'sources':_0x3d3224,'width':_0x40e7fe,'height':_0x8849c5},_0x44b1fd);_0x46bf0d['setSelection'](_0x44b1fd,'on');});}async['_getImageAsFile'](_0x1d8224){const _0x4275aa=_0x391e65['window'],_0x46ec3e=_0x391e65['document']['location']['href'],_0x10a0c0=new _0x4275aa['URL'](_0x1d8224['getAttribute']('src'),_0x46ec3e);if('data:'===_0x10a0c0['protocol']){const _0x3e0903=_0x10a0c0['href']['split'](','),_0x24548b=_0x3e0903[0x0]['match'](/:(.*?);/)[0x1],_0x38f7fe=_0x24548b['split']('/')[0x1],_0x3aed16=_0x4275aa['atob'](_0x3e0903[_0x3e0903['length']-0x1]);let _0x462203=_0x3aed16['length'];const _0x4155fd=new _0x4275aa['Uint8Array'](_0x462203);for(;_0x462203--;)_0x4155fd[_0x462203]=_0x3aed16['charCodeAt'](_0x462203);return new _0x4275aa['File']([_0x4155fd],'image.'+_0x38f7fe,{'type':_0x24548b});}const _0x48e6e8=_0x10a0c0['href']['split']('/'),_0x2182bd=_0x48e6e8[_0x48e6e8['length']-0x1],_0x1072c3=_0x2182bd['split']('.')[0x1];return _0x4275aa['fetch'](_0x10a0c0['href'])['then'](_0x153fd2=>_0x153fd2['clone']()['blob']())['then'](_0xfb02b8=>new _0x4275aa['File']([_0xfb02b8],_0x2182bd,{'type':'image/'+_0x1072c3}));}}class O extends _0x340ba3{['imageEditController'];static get['requires'](){return[_0x53818d];}['_isEditable'];constructor(_0x9b2bed){super(_0x9b2bed),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xa1e46a){const _0x2cf1d6=G(_0xa1e46a);return _0x1cea7b=>!(!_0x1cea7b||!_0x1cea7b['is']('element','imageBlock')&&!_0x1cea7b['is']('element','imageInline'))&&(!!_0x1cea7b['hasAttribute']('uploadcareImageId')||!!_0x1cea7b['hasAttribute']('src')&&_0x2cf1d6(_0x1cea7b['getAttribute']('src')));}(_0x9b2bed['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2d2d98=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2d2d98);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x4d68e8=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4d68e8&&(_0x4d68e8['is']('element','imageBlock')||_0x4d68e8['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x53818d),_0x4d68e8),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x340ba3{['refresh'](){const _0x2446b7=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x2446b7&&(_0x2446b7['is']('element','imageBlock')||_0x2446b7['is']('element','imageInline')));}['execute'](_0x7b4d00){const _0x1240f3=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x1fb91b=>{_0x1fb91b['setAttributes'](_0x7b4d00,_0x1240f3),_0x1fb91b['removeAttribute']('srcset',_0x1240f3),_0x1fb91b['removeAttribute']('sizes',_0x1240f3);});}}class m extends _0x2c9ec5{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x258fba,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xcdd39c}=this;_0xcdd39c['commands']['add']('uploadcareImageEdit',new O(_0xcdd39c)),_0xcdd39c['commands']['add']('uploadcareImageReplace',new R(_0xcdd39c));}}class g extends _0x2c9ec5{['_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 _0x4446cf=this['editor'];_0x4446cf['ui']['componentFactory']['add']('uploadcareImageEdit',_0x5670f2=>{const _0x3b54ef=_0x4446cf['commands']['get']('uploadcareImageEdit'),_0x3758f1=new _0x1f56a3(_0x5670f2),t=_0x5670f2['t'];return _0x3758f1['set']({'icon':_0x4ba6e4,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x3758f1['bind']('isEnabled')['to'](_0x3b54ef),_0x3758f1['bind']('isOn')['to'](_0x3b54ef,'isActive'),this['listenTo'](_0x3758f1,'execute',()=>{_0x4446cf['execute']('uploadcareImageEdit'),_0x4446cf['editing']['view']['focus']();}),_0x3758f1;}),this['_initConfig']();}['_initConfig'](){const _0x4317b3=_0x4c768c(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x4317b3),this['listenTo'](this['editor'],'destroy',()=>{_0x4317b3['remove']();});}}class et extends _0x2c9ec5{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};
23
+ import{Plugin as _0x5e5b75,Command as _0x5b5250}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x7a380c,IconGooglePhotos as _0x577ced,IconGoogleDrive as _0x493a4c,IconFacebook as _0x50f466,IconDropbox as _0x251fa4,IconUploadcareLink as _0x58efce,IconUploadcareImageUpload as _0x21d571,IconError as _0x29e476,IconUploadcareImageEdit as _0x3a6507}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x2fdd6d,MenuBarMenuListItemButtonView as _0x41414e,View as _0x4e29b2,FocusCycler as _0xb089db,Dialog as _0x4f93e4,DialogViewPosition as _0x5965e9,SpinnerView as _0x3f513c,IconView as _0x270023,Notification as _0x51acdf}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x485e34,DomEmitterMixin as _0x6d4950,global as _0x3b421d,getAncestors as _0xf3e525,ObservableMixin as _0x3d34e2,uid as _0x72b675,createElement as _0x51e8e3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x22e926}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x3a01d7,info as _0x30fa2b}from'@uploadcare/upload-client';import*as _0x4bf5a8 from'@uploadcare/file-uploader';var i=function(_0x5d54d5){return _0x5d54d5['Local']='local',_0x5d54d5['URL']='url',_0x5d54d5['Dropbox']='dropbox',_0x5d54d5['GDrive']='gdrive',_0x5d54d5['Facebook']='facebook',_0x5d54d5['GPhotos']='gphotos',_0x5d54d5['OneDrive']='onedrive',_0x5d54d5;}({});function _(_0x2a061a,_0x2f0d52,_0x2536b8){const t=_0x2a061a['t'],_0x137af6=_0x2a061a['t'];switch(_0x2f0d52){case i['Local']:return{'text':_0x137af6('Insert'===_0x2536b8?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x137af6('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x2536b8?_0x137af6('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x137af6('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x2536b8?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x2536b8?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x2536b8?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x2536b8?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x2536b8?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2f0d52;}}class e extends _0x5e5b75{['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 _0x43950b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1bcd4a;for(const _0x166987 in _0x43950b){const _0x32f04d=_0x166987,_0x219025=_0x43950b[_0x32f04d];if('uploadcareLicenseKeyValid'==_0x219025||'uploadcareLicenseKeyInvalid'==_0x219025||'uploadcareLicenseKeyExpired'==_0x219025||'uploadcareLicenseKeyDomainLimit'==_0x219025||'uploadcareLicenseKeyNotAllowed'==_0x219025||'uploadcareLicenseKeyEvaluationLimit'==_0x219025||'uploadcareLicenseKeyUsageLimit'==_0x219025){delete _0x43950b[_0x32f04d],_0x1bcd4a=_0x219025,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x1bcd4a&&_0x43950b['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x1bcd4a&&_0x43950b['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x1bcd4a&&_0x43950b['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x1bcd4a&&_0x43950b['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x1bcd4a&&_0x43950b['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x1bcd4a&&_0x43950b['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x28ffce}=this,_0x5a7f38=_0x28ffce['commands']['get']('uploadcare');if(!_0x5a7f38)return;const _0x2f9a20=this['_normalizeConfigSourceList'](_0x28ffce['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x2fe5a2,_0x16e471)=>{const _0x3fdfa1=this['_getIntegrationKey'](_0x16e471['type']);return _0x2fe5a2[_0x3fdfa1]||(_0x2fe5a2[_0x3fdfa1]=[]),_0x2fe5a2[_0x3fdfa1]['push'](_0x16e471),_0x2fe5a2;},{});_0x28ffce['plugins']['has']('ImageInsertUI')&&_0x28ffce['commands']['get']('uploadcare')&&Object['entries'](_0x2f9a20)['forEach'](([_0x57a9f5,_0x31ea82])=>{_0x28ffce['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x57a9f5,'observable':()=>_0x5a7f38,'buttonViewCreator':()=>this['_createToolbarButton'](_0x31ea82),'formViewCreator':()=>this['_createDropdownButtons'](_0x31ea82),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x31ea82),'override':'assetManager'!==_0x57a9f5});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x372d3f){const {locale:_0x17f4a9}=this['editor'];return _0x372d3f['map'](_0x562926=>{const _0x406393=_(_0x17f4a9,_0x562926,'Insert');switch(_0x562926){case i['Local']:return{'icon':_0x21d571,'type':i['Local'],..._0x406393};case i['URL']:return{'icon':_0x58efce,'type':i['URL'],..._0x406393};case i['Dropbox']:return{'icon':_0x251fa4,'type':i['Dropbox'],..._0x406393};case i['Facebook']:return{'icon':_0x50f466,'type':i['Facebook'],..._0x406393};case i['GDrive']:return{'icon':_0x493a4c,'type':i['GDrive'],..._0x406393};case i['GPhotos']:return{'icon':_0x577ced,'type':i['GPhotos'],..._0x406393};case i['OneDrive']:return{'icon':_0x7a380c,'type':i['OneDrive'],..._0x406393};}});}['_getIntegrationKey'](_0x2ef5d7){switch(_0x2ef5d7){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x316e6e,_0x27ac6e){const _0x1c186b=this['editor'],_0x5603d5=new _0x316e6e(_0x1c186b['locale']),_0x143a4d=_0x1c186b['commands']['get']('uploadcare');return _0x5603d5['bind']('isEnabled')['to'](_0x143a4d),_0x5603d5['on']('execute',()=>{_0x143a4d['execute'](_0x27ac6e);}),_0x5603d5;}['_createToolbarButton'](_0x2890d2){const {locale:_0x31d9cc}=this['editor'],_0x122846=this['editor']['plugins']['get']('ImageInsertUI'),_0x3fded0=_0x2890d2[0x0],_0x2f747c=this['_createButton'](_0x2fdd6d,_0x3fded0['type']);return _0x2f747c['icon']=_0x3fded0['icon'],_0x2f747c['bind']('label')['to'](_0x122846,'isImageSelected',_0x1206a7=>_(_0x31d9cc,_0x3fded0['type'],_0x1206a7?'Replace':'Insert')['text']),_0x2f747c['tooltip']=!0x0,_0x2f747c;}['_createDropdownButtons'](_0xdfc87b){const {locale:_0x1066f5}=this['editor'],_0x13d500=this['editor']['plugins']['get']('ImageInsertUI');return _0xdfc87b['map'](_0x29b594=>{const _0x41acf7=this['_createButton'](_0x2fdd6d,_0x29b594['type']);return _0x41acf7['withText']=!0x0,_0x41acf7['icon']=_0x29b594['icon'],_0x41acf7['bind']('label')['to'](_0x13d500,'isImageSelected',_0x1063c8=>_(_0x1066f5,_0x29b594['type'],_0x1063c8?'Replace':'Insert')['text']),_0x41acf7;});}['_createMenuBarButtons'](_0x4f4417){return _0x4f4417['map'](_0x221ba9=>{const _0x754614=this['_createButton'](_0x41414e,_0x221ba9['type']);return _0x754614['icon']=_0x221ba9['icon'],_0x754614['label']=_0x221ba9['shortText'],_0x754614;});}}class F extends _0x4e29b2{['focusTracker'];['focusCycler'];constructor(_0x26d5a3){super(_0x26d5a3),this['focusTracker']=new _0x485e34(),this['focusCycler']=new _0xb089db({'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(_0x50b5b3,_0x2526c1){super(_0x50b5b3),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-'+_0x2526c1}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x39335a,_0x185ca7){const _0x4cb508=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x22749c=>_0x22749c<=_0x185ca7)['map'](_0x123ed2=>_0x39335a['replace'](/\/$/,'')+'/-/resize/'+_0x123ed2+'x/\x20'+_0x123ed2+'w');return{'imageFallbackUrl':_0x39335a,'imageSources':[{'srcset':_0x4cb508['join'](',\x20'),'sizes':'(max-width:\x20'+_0x185ca7+'px)\x20100vw,\x20'+_0x185ca7+'px','type':'image/webp'}]};}function S(_0x148502,_0x5c0159,_0x11b9c6){const _0x573f9b=_0x148502['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x573f9b?parseInt(_0x573f9b[0x1],0xa):_0x5c0159,'height':_0x573f9b?parseInt(_0x573f9b[0x2],0xa):_0x11b9c6};}function p(_0x3b4b26,_0x62a5f6){const _0x451ca8=new(_0x6d4950())(),_0x5e58a2=_0x3b4b26['plugins']['get']('ImageUtils'),_0x3309a5=_0x3b4b26['editing']['mapper']['toViewElement'](_0x62a5f6),_0x17ae09=_0x5e58a2['findViewImgElement'](_0x3309a5),_0x3c5670=_0x3b4b26['editing']['view']['domConverter']['viewToDom'](_0x17ae09),_0x2500a3=_0x62a5f6['getAttribute']('width'),_0x166b18=_0x62a5f6['getAttribute']('height'),_0x4e79c4='image-processing';_0x3b4b26['editing']['view']['change'](_0x284f09=>{_0x284f09['addClass'](_0x4e79c4,_0x3309a5),_0x284f09['setStyle']('aspect-ratio',_0x2500a3+'/'+_0x166b18,_0x17ae09);}),_0x451ca8['listenTo'](_0x3c5670,'load',()=>{_0x451ca8['stopListening'](_0x3c5670,'load'),_0x3b4b26['editing']['view']['change'](_0x3ba8ac=>{_0x3ba8ac['removeClass'](_0x4e79c4,_0x3309a5),_0x3ba8ac['removeStyle']('aspect-ratio',_0x17ae09);});});}function z(_0x5b8297){if(Array['isArray'](_0x5b8297)){const _0x780def=_0x5b8297['map'](z);return _0x4ca7ae=>_0x780def['some'](_0x474079=>_0x474079(_0x4ca7ae));}if('origin'==_0x5b8297){const _0x4ce223=_0x3b421d['window']['location']['origin'];return _0x3f462e=>new URL(_0x3f462e,_0x3b421d['document']['baseURI'])['origin']==_0x4ce223;}return'function'==typeof _0x5b8297?_0x5b8297:_0x5b8297 instanceof RegExp?_0x28a53b=>!(!_0x28a53b['match'](_0x5b8297)&&!_0x28a53b['replace'](/^https?:\/\//,'')['match'](_0x5b8297)):()=>!0x1;}function A(_0x18ccc4,_0x2e5169){return _0xf3e525(_0x18ccc4['target'])['includes'](_0x2e5169);}class n extends/* #__PURE__ -- @preserve */
24
+ _0x3d34e2(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x18c44c,_0x227004,_0xf1bd5d){super(),this['_editor']=_0x18c44c,this['_editing']=_0x227004,this['_dialog']=_0x18c44c['plugins']['get'](_0x4f93e4),this['_api']=_0x227004['ctxElement']['getAPI'](),this['_type']=_0xf1bd5d,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:_0x4a231a,model:_0x2c87c1}=this['_editor'],_0x57cbc3=_0x2c87c1['document']['selection']['getSelectedElement'](),_0x1e9429=_0x57cbc3&&(_0x57cbc3['is']('element','imageBlock')||_0x57cbc3['is']('element','imageInline'));this['_formView']=new x(_0x4a231a,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x21d571,'title':_(_0x4a231a,this['_type'],_0x1e9429?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5965e9['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x46bdcf=>!A(_0x46bdcf,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x33aacf}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x3c2486=>{const _0x322ec3=_0x33aacf['length'];for(const _0x3b1938 of _0x33aacf){const _0x3af473=_0x3b1938===_0x33aacf[_0x322ec3-0x1],{cdnUrl:_0x188920,fileInfo:_0xb4e6c2}=_0x3b1938;if(!_0x188920||!_0xb4e6c2)continue;const {width:_0x59d41f,height:_0x5ef177}=_0xb4e6c2['imageInfo'],_0x2ba84c=S(_0x188920,_0x59d41f,_0x5ef177),_0x61467=C(_0x188920,_0x2ba84c['width']),_0x374c2d={'id':_0xb4e6c2['uuid'],'type':'image','attributes':{'imageDimension':_0x2ba84c,..._0x61467}};this['_insertAsset'](_0x374c2d,_0x3af473,_0x3c2486);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x467069=>{'idle'===_0x467069['detail']['status']&&!_0x467069['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x2ec3e1,_0x553158,_0xbd3aba){const _0x4a750d=this['_editor']['model']['document']['selection'],_0x1aa77b=_0x4a750d['getSelectedElement'](),_0x4b2546=!(!_0x1aa77b||!_0x1aa77b['is']('element','imageInline'));_0xbd3aba['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x2ec3e1,_0x4b2546),_0x553158||_0xbd3aba['setSelection'](_0x4a750d['getLastPosition']());}['_insertImage'](_0xd80b2a,_0x41909d){const _0x5efabb=this['_editor'],{imageDimension:_0xa2a215,imageFallbackUrl:_0x43ef1c,imageSources:_0x776539}=_0xd80b2a['attributes'];_0x5efabb['execute']('insertImage',{'imageType':_0x41909d?'imageInline':null,'source':{'uploadcareImageId':_0xd80b2a['id'],'src':_0x43ef1c,'sources':_0x776539,..._0xa2a215}});}}class w extends _0x5b5250{['_editing'];['_controller']=null;static get['requires'](){return[_0x4f93e4,o];}constructor(_0x1fb7fb){super(_0x1fb7fb),this['_editing']=_0x1fb7fb['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x156e7f){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x156e7f);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x46012e,..._0x11a0b5}){return _0x3a01d7(_0x46012e,_0x11a0b5);}static['getInfo'](_0x1ad1a3,_0x2d105d){return _0x30fa2b(_0x1ad1a3,_0x2d105d);}}class f extends _0x5e5b75{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x22e926,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x50377b=this['editor'];if(!!!_0x50377b['config']['get']('uploadcare'))return;_0x50377b['plugins']['get'](_0x22e926)['createUploadAdapter']=_0x3642cf=>new k(_0x3642cf,_0x50377b),_0x50377b['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x15b510,{imageElement:_0x5adc06,data:_0x452f1f})=>{_0x50377b['model']['change'](_0x16c387=>{_0x16c387['setAttribute']('uploadcareImageId',_0x452f1f['uploadcareImageId'],_0x5adc06);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x9edb9c,_0x4d2b1c){this['loader']=_0x9edb9c,this['editor']=_0x4d2b1c,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x593344=await this['loader']['file'];return j['upload']({'file':_0x593344,'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':_0x1458fa=>{_0x1458fa&&_0x1458fa['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x1458fa['value']);}})['then'](async _0x4cb910=>{const {imageFallbackUrl:_0x125c22,imageSources:_0x232acd}=C(_0x4cb910['cdnUrl'],_0x4cb910['imageInfo']['width']);return{'uploadcareImageId':_0x4cb910['uuid'],'default':_0x125c22,'sources':_0x232acd};})['catch'](()=>{const _0x33cb5a=t('Cannot\x20upload\x20file:')+('\x20'+_0x593344['name']+'.');return Promise['reject'](_0x33cb5a);});}['abort'](){this['controller']['abort']();}}class o extends _0x5e5b75{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x4f93e4];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0xd512db){super(_0xd512db),this['ucContextId']=_0x72b675();}['init'](){const _0x23303f=this['editor'];_0x23303f['commands']['add']('uploadcare',new w(_0x23303f));}['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 _0x2bf034=_0x3b421d['document']['querySelector']('input[uploadcare-file-input]');_0x2bf034&&_0x2bf034['remove']();}),async function(_0x513e7d){const _0x49c745=_0x2dbdeb([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x27ecb6=0x535f8c3a,_0x45a180=0x5358f2a2^_0x27ecb6,_0x1bff4e=window[_0x2dbdeb([0x44,0x61,0x74,0x65])][_0x2dbdeb([0x6e,0x6f,0x77])](),_0x48a3c0=_0x513e7d[_0x2dbdeb([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3ff0ef=new window[(_0x2dbdeb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15b0db=>{_0x48a3c0[_0x2dbdeb([0x6f,0x6e,0x63,0x65])](_0x2dbdeb([0x72,0x65,0x61,0x64,0x79]),_0x15b0db);}),_0x351da4={[_0x2dbdeb([0x6b,0x74,0x79])]:_0x2dbdeb([0x45,0x43]),[_0x2dbdeb([0x75,0x73,0x65])]:_0x2dbdeb([0x73,0x69,0x67]),[_0x2dbdeb([0x63,0x72,0x76])]:_0x2dbdeb([0x50,0x2d,0x32,0x35,0x36]),[_0x2dbdeb([0x78])]:_0x2dbdeb([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]),[_0x2dbdeb([0x79])]:_0x2dbdeb([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]),[_0x2dbdeb([0x61,0x6c,0x67])]:_0x2dbdeb([0x45,0x53,0x32,0x35,0x36])},_0x2b744e=_0x48a3c0[_0x2dbdeb([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2dbdeb([0x67,0x65,0x74])](_0x2dbdeb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x54c182(){let _0x9a42f1,_0x57eb47=null,_0x2418a0=null;try{if(_0x2b744e==_0x2dbdeb([0x47,0x50,0x4c]))return _0x2dbdeb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x9a42f1=_0x5494d7(),!_0x9a42f1)return _0x2dbdeb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x9a42f1[_0x2dbdeb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2418a0=_0x102717(_0x9a42f1[_0x2dbdeb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x9a42f1[_0x2dbdeb([0x6a,0x74,0x69])])),await _0x269fe1()?_0x2e4db0()?_0x3e1025()?_0x2dbdeb([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5800ef()?(_0x9a42f1[_0x2dbdeb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dbdeb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x57eb47=_0x24d6a1(_0x2dbdeb([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x59850f()):_0x2dbdeb([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2dbdeb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2dbdeb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2dbdeb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3e1025(){const _0x330f68=[_0x2dbdeb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2dbdeb([0x74,0x72,0x69,0x61,0x6c])][_0x2dbdeb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x9a42f1[_0x2dbdeb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1bff4e/0x3e8:0xe10*_0x45a180;return _0x9a42f1[_0x2dbdeb([0x65,0x78,0x70])]<_0x330f68;}function _0x2e4db0(){const _0x56d53c=_0x9a42f1[_0x2dbdeb([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x56d53c&&(!!_0x56d53c[_0x2dbdeb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dbdeb([0x2a]))||!!_0x56d53c[_0x2dbdeb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dbdeb([0x55,0x50,0x4c,0x43])));}function _0x5800ef(){const _0x20c4a3=_0x9a42f1[_0x2dbdeb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x20c4a3||0x0==_0x20c4a3[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xfbf3bf}=new URL(window[_0x2dbdeb([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x20c4a3[_0x2dbdeb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xfbf3bf))return!0x0;const _0x4564f7=_0xfbf3bf[_0x2dbdeb([0x73,0x70,0x6c,0x69,0x74])](_0x2dbdeb([0x2e]));return _0x20c4a3[_0x2dbdeb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x251d7f=>_0x251d7f[_0x2dbdeb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dbdeb([0x2a])))[_0x2dbdeb([0x6d,0x61,0x70])](_0x4a0034=>_0x4a0034[_0x2dbdeb([0x73,0x70,0x6c,0x69,0x74])](_0x2dbdeb([0x2e])))[_0x2dbdeb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x452ae6=>_0x452ae6[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4564f7[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2dbdeb([0x6d,0x61,0x70])](_0x2c87dc=>Array(_0x4564f7[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2c87dc[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2dbdeb([0x66,0x69,0x6c,0x6c])](_0x2c87dc[0x0]===_0x2dbdeb([0x2a])?_0x2dbdeb([0x2a]):'')[_0x2dbdeb([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2c87dc))[_0x2dbdeb([0x73,0x6f,0x6d,0x65])](_0x5264a2=>_0x4564f7[_0x2dbdeb([0x65,0x76,0x65,0x72,0x79])]((_0x376ee9,_0x334823)=>_0x5264a2[_0x334823]===_0x376ee9||_0x5264a2[_0x334823]===_0x2dbdeb([0x2a])));}function _0x59850f(){return _0x57eb47&&_0x2418a0?new window[(_0x2dbdeb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x167af4,_0x48c55c)=>{_0x57eb47[_0x2dbdeb([0x74,0x68,0x65,0x6e])](_0x167af4,_0x48c55c),_0x2418a0[_0x2dbdeb([0x74,0x68,0x65,0x6e])](_0x28d7dd=>{_0x28d7dd!=_0x2dbdeb([0x56,0x61,0x6c,0x69,0x64])&&_0x167af4(_0x28d7dd);},_0x48c55c);}):_0x57eb47||_0x2418a0||_0x2dbdeb([0x56,0x61,0x6c,0x69,0x64]);}}function _0x102717(_0x49a0f5,_0xe70c41){return new window[(_0x2dbdeb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2fc593=>{if(_0x5812e2())return _0x2fc593(_0x2dbdeb([0x56,0x61,0x6c,0x69,0x64]));_0x2ccec1(),_0x48a3c0[_0x2dbdeb([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2dbdeb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1c509e=!0x1;const _0x5679a2=_0x72b675();function _0x3c0c78(_0x20fabb){return!!_0x20fabb&&(typeof _0x20fabb===_0x2dbdeb([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x20fabb===_0x2dbdeb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x20fabb[_0x2dbdeb([0x74,0x68,0x65,0x6e])]===_0x2dbdeb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x20fabb[_0x2dbdeb([0x63,0x61,0x74,0x63,0x68])]===_0x2dbdeb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1e8818(_0x5d2bc4){_0x50c149(_0x5d2bc4)[_0x2dbdeb([0x74,0x68,0x65,0x6e])](_0x45729d=>{if(!_0x45729d||_0x45729d[_0x2dbdeb([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2dbdeb([0x6f,0x6b]))return _0x2dbdeb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4a004e(_0x39b6a4(_0x5679a2+_0xe70c41))!=_0x45729d[_0x2dbdeb([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2dbdeb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2dbdeb([0x56,0x61,0x6c,0x69,0x64]);})[_0x2dbdeb([0x74,0x68,0x65,0x6e])](_0x3f3c67=>(_0x3c9212(),_0x3f3c67),()=>{const _0x29ecde=_0x2fd3e8();return null==_0x29ecde?(_0x3c9212(),_0x2dbdeb([0x56,0x61,0x6c,0x69,0x64])):_0x2dbdeb(_0x1bff4e-_0x29ecde>(0x7753083a^_0x27ecb6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2dbdeb([0x74,0x68,0x65,0x6e])](_0x2fc593)[_0x2dbdeb([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2fc593(_0x2dbdeb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x27f9a8=0x536962ba^_0x27ecb6;function _0x3c9212(){const _0x539c88=_0x2dbdeb([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a004e(_0x39b6a4(_0x49a0f5)),_0x2114a1=_0x530de6(_0x4a004e(window[_0x2dbdeb([0x4d,0x61,0x74,0x68])][_0x2dbdeb([0x63,0x65,0x69,0x6c])](_0x1bff4e/_0x27f9a8)));window[_0x2dbdeb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dbdeb([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x539c88,_0x2114a1);}function _0x2fd3e8(){const _0x36f197=_0x2dbdeb([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a004e(_0x39b6a4(_0x49a0f5)),_0x29277f=window[_0x2dbdeb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dbdeb([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x36f197);return _0x29277f?window[_0x2dbdeb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x530de6(_0x29277f),0x10)*_0x27f9a8:null;}function _0x50c149(_0x2f3d96){return new window[(_0x2dbdeb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3c5bf8,_0x5d4ebf)=>{_0x2f3d96[_0x2dbdeb([0x74,0x68,0x65,0x6e])](_0x3c5bf8,_0x5d4ebf),window[_0x2dbdeb([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5d4ebf,0x535e58fa^_0x27ecb6);});}}_0x48a3c0[_0x2dbdeb([0x6f,0x6e])](_0x2dbdeb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x22b332,_0x2997f7)=>{if(_0x2997f7[0x0]!=_0x49a0f5)return _0x2fc593(_0x2dbdeb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2997f7[0x1]={..._0x2997f7[0x1],[_0x2dbdeb([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5679a2};},{[_0x2dbdeb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dbdeb([0x68,0x69,0x67,0x68])}),_0x48a3c0[_0x2dbdeb([0x6f,0x6e])](_0x2dbdeb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x216059=>{_0x3c0c78(_0x216059[_0x2dbdeb([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1c509e=!0x0,_0x1e8818(_0x216059[_0x2dbdeb([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2dbdeb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dbdeb([0x6c,0x6f,0x77])}),_0x3ff0ef[_0x2dbdeb([0x74,0x68,0x65,0x6e])](()=>{_0x1c509e||_0x2fc593(_0x2dbdeb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5812e2(){return _0x48a3c0[_0x2dbdeb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dbdeb([0x76,0x69,0x65,0x77])][_0x2dbdeb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2dbdeb([0x61,0x75,0x74,0x6f]);}function _0x2ccec1(){_0x48a3c0[_0x2dbdeb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dbdeb([0x76,0x69,0x65,0x77])][_0x2dbdeb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2dbdeb([0x61,0x75,0x74,0x6f]);}}function _0x24d6a1(_0x5cf242){const _0x3a7782=[new window[(_0x2dbdeb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x476d5a=>setTimeout(_0x476d5a,0x5356b2f6^_0x27ecb6)),_0x3ff0ef[_0x2dbdeb([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2dbdeb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52b576=>{let _0x5e028d=0x0;_0x48a3c0[_0x2dbdeb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dbdeb([0x6f,0x6e])](_0x2dbdeb([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x461d27,_0xeb023e)=>{_0xeb023e[0x0][_0x2dbdeb([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5e028d++,_0x5e028d==(0x535f89d2^_0x27ecb6)&&(_0x52b576(),_0x461d27[_0x2dbdeb([0x6f,0x66,0x66])]());});}))];return window[_0x2dbdeb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2dbdeb([0x72,0x61,0x63,0x65])](_0x3a7782)[_0x2dbdeb([0x74,0x68,0x65,0x6e])](()=>_0x5cf242);}async function _0x40885b(){await _0x3ff0ef,_0x48a3c0[_0x2dbdeb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dbdeb([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x20f44e,_0x48a3c0[_0x2dbdeb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dbdeb([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x20f44e,_0x48a3c0[_0x2dbdeb([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2dbdeb([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x40474d(_0x2d6c8e){const _0x3dc709=_0x2f9dcf();_0x48a3c0[_0x3dc709]=_0x2dbdeb([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2d6c8e,_0x2d6c8e!=_0x2dbdeb([0x56,0x61,0x6c,0x69,0x64])&&_0x40885b();}function _0x2f9dcf(){const _0x129266=window[_0x2dbdeb([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2dbdeb([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2dbdeb([0x6e,0x6f,0x77])]())[_0x2dbdeb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2dbdeb([0x2e]),'');let _0x5415e6=_0x2dbdeb([0x68]);for(let _0x3b6baa=0x0;_0x3b6baa<_0x129266[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b6baa+=0x2){let _0x2ee73a=window[_0x2dbdeb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x129266[_0x2dbdeb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b6baa,_0x3b6baa+0x2));_0x2ee73a>=_0x49c745[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2ee73a-=_0x49c745[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5415e6+=_0x49c745[_0x2ee73a];}return _0x5415e6;}function _0x5494d7(){const _0x592305=_0x2b744e[_0x2dbdeb([0x73,0x70,0x6c,0x69,0x74])](_0x2dbdeb([0x2e]));if(0x3!=_0x592305[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5313fc(_0x592305[0x1]);function _0x5313fc(_0x25e114){const _0x4f14db=_0x54f9f7(_0x25e114);return _0x4f14db&&_0x39fbeb()?_0x4f14db:null;function _0x39fbeb(){const _0x285401=_0x4f14db[_0x2dbdeb([0x6a,0x74,0x69])],_0x4ff788=window[_0x2dbdeb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x285401[_0x2dbdeb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x285401[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1f723e={..._0x4f14db,[_0x2dbdeb([0x6a,0x74,0x69])]:_0x285401[_0x2dbdeb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x285401[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1f723e[_0x2dbdeb([0x76,0x63])],_0x39b6a4(_0x1f723e)==_0x4ff788;}}}async function _0x269fe1(){let _0x1a03bc=!0x0;try{const _0x35c79f=_0x2b744e[_0x2dbdeb([0x73,0x70,0x6c,0x69,0x74])](_0x2dbdeb([0x2e])),[_0x499563,_0x1148bd,_0x575226]=_0x35c79f;return _0xd65154(_0x499563),await _0x138c6d(_0x499563,_0x1148bd,_0x575226),_0x1a03bc;}catch{return!0x1;}function _0xd65154(_0x13ec1a){const _0x2c7e02=_0x54f9f7(_0x13ec1a);_0x2c7e02&&_0x2c7e02[_0x2dbdeb([0x61,0x6c,0x67])]==_0x2dbdeb([0x45,0x53,0x32,0x35,0x36])||(_0x1a03bc=!0x1);}async function _0x138c6d(_0x124424,_0x3e0046,_0x23acc0){const _0x3e5bd9=window[_0x2dbdeb([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2dbdeb([0x66,0x72,0x6f,0x6d])](_0x3dd178(_0x23acc0),_0x2db057=>_0x2db057[_0x2dbdeb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x559e18=new window[(_0x2dbdeb([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2dbdeb([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x124424+_0x2dbdeb([0x2e])+_0x3e0046),_0x3680ea=window[_0x2dbdeb([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2dbdeb([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3680ea)return;const _0x258e4d=await _0x3680ea[_0x2dbdeb([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2dbdeb([0x6a,0x77,0x6b]),_0x351da4,{[_0x2dbdeb([0x6e,0x61,0x6d,0x65])]:_0x2dbdeb([0x45,0x43,0x44,0x53,0x41]),[_0x2dbdeb([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2dbdeb([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2dbdeb([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3680ea[_0x2dbdeb([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2dbdeb([0x6e,0x61,0x6d,0x65])]:_0x2dbdeb([0x45,0x43,0x44,0x53,0x41]),[_0x2dbdeb([0x68,0x61,0x73,0x68])]:{[_0x2dbdeb([0x6e,0x61,0x6d,0x65])]:_0x2dbdeb([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x258e4d,_0x3e5bd9,_0x559e18)||(_0x1a03bc=!0x1);}}function _0x54f9f7(_0x4d6729){return _0x4d6729[_0x2dbdeb([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2dbdeb([0x65,0x79]))?JSON[_0x2dbdeb([0x70,0x61,0x72,0x73,0x65])](_0x3dd178(_0x4d6729)):null;}function _0x3dd178(_0x5831bf){return window[_0x2dbdeb([0x61,0x74,0x6f,0x62])](_0x5831bf[_0x2dbdeb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2dbdeb([0x2b]))[_0x2dbdeb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2dbdeb([0x2f])));}function _0x39b6a4(_0xc957b0){let _0x1e5f3e=0x1505;function _0x2b8563(_0x507ce0){for(let _0x2064cd=0x0;_0x2064cd<_0x507ce0[_0x2dbdeb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2064cd++){const _0x5b3809=_0x507ce0[_0x2dbdeb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2064cd);_0x1e5f3e=(_0x1e5f3e<<0x5)+_0x1e5f3e+_0x5b3809,_0x1e5f3e&=_0x1e5f3e;}}function _0x108a36(_0x265302){Array[_0x2dbdeb([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x265302)?_0x265302[_0x2dbdeb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x108a36):_0x265302&&typeof _0x265302==_0x2dbdeb([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2dbdeb([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x265302)[_0x2dbdeb([0x73,0x6f,0x72,0x74])]()[_0x2dbdeb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x411047,_0x421012])=>{_0x2b8563(_0x411047),_0x108a36(_0x421012);}):_0x2b8563(window[_0x2dbdeb([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x265302));}return _0x108a36(_0xc957b0),_0x1e5f3e>>>0x0;}function _0x4a004e(_0x1611e0){return _0x1611e0[_0x2dbdeb([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2dbdeb([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2dbdeb([0x30]));}function _0x530de6(_0x5605fe){return _0x5605fe[_0x2dbdeb([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2dbdeb([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2dbdeb([0x6a,0x6f,0x69,0x6e])]('');}function _0x20f44e(){}function _0x2dbdeb(_0x3f56a1){return _0x3f56a1['map'](_0x542535=>String['fromCharCode'](_0x542535))['join']('');}_0x40474d(await _0x54c182());}(this);}['_initSchema'](){const _0x177891=this['editor']['model']['schema'];_0x177891['isRegistered']('imageBlock')&&_0x177891['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x177891['isRegistered']('imageInline')&&_0x177891['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x350b12=this['editor'];_0x350b12['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x350b12['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x185483=>_0x185483['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x2fabad=_0x350b12['commands']['get']('replaceImageSource');_0x2fabad&&this['listenTo'](_0x2fabad,'cleanupImage',(_0x3d3907,[_0x946cc2,_0x4a18b5])=>{_0x946cc2['removeAttribute']('uploadcareImageId',_0x4a18b5);});}['_initConfig'](){const _0x110b99=this['editor']['config']['get']('uploadcare.uploader')||{},_0x31755b=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x51e8e3(_0x3b421d['document'],'uc-config',{..._0x110b99,'pubkey':_0x31755b,'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']=_0x28c19a=>{if('closeMax'==_0x28c19a)return'#uc-icon-arrow-down';},_0x3b421d['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x51e8e3(_0x3b421d['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x3b421d['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x121c08=this['editor']['commands']['get']('insertImage');_0x121c08&&this['listenTo'](_0x121c08,'execute',()=>{const _0x1a8bd4=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1a8bd4&&_0x1a8bd4['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1a8bd4);});});const _0x7b2c49=this['editor']['commands']['get']('uploadcareImageReplace');_0x7b2c49&&this['listenTo'](_0x7b2c49,'execute',()=>{const _0x3349ed=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3349ed&&_0x3349ed['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3349ed);});});}}class tt extends _0x5e5b75{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e2b13){super(_0x1e2b13),_0x1e2b13['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4bf5a8['defineComponents'](_0x4bf5a8),this['_defineLocale']();}['_defineLocale'](){const _0x301209=this['editor']['config']['get']('uploadcare.locale'),_0x2ef21f=this['editor']['locale']['contentLanguage'];_0x301209&&_0x4bf5a8['defineLocale'](_0x2ef21f,_0x301209);}}class ii extends _0x4e29b2{constructor(_0x48eca8){super(_0x48eca8);const t=_0x48eca8['t'],_0xf38b6e=this['bindTemplate'],_0x45934b=new _0x3f513c();_0x45934b['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':[_0x45934b,{'text':_0xf38b6e['to']('imageUploadProgress',_0x44efd0=>t('Loading\x20image...')+'\x20('+(_0x44efd0||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 _0x4e29b2{constructor(_0x27eb43){super(_0x27eb43);const t=_0x27eb43['t'];this['set']('errorType',null);const _0x382074=new _0x2fdd6d(_0x27eb43);_0x382074['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x382074['withText']=!0x0,_0x382074['class']='ck-button-action',_0x382074['on']('execute',()=>{this['fire']('retry');}),_0x382074['bind']('isVisible')['to'](this,'errorType',_0x4e8994=>'NotFound'!==_0x4e8994);const _0x12f04e=new _0x270023();_0x12f04e['content']=_0x29e476,_0x12f04e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x56f755=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':[_0x12f04e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x56f755['to']('errorType',_0x2d527d=>t('NotFound'!==_0x2d527d?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x382074]},{'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 _0x4e29b2{constructor(_0x54f414,_0x13db58){super(_0x54f414);const _0x591f25=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x13db58,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x591f25['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4e0273,_0x4b99ce,_0x8a7d88){super(_0x4e0273),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x4e0273),this['_errorView']=new ti(_0x4e0273),this['_editingView']=new ei(_0x4e0273,_0x8a7d88),this['_focusableView']=new _0x4e29b2(_0x4e0273),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x4b99ce),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'],_0x3f1e4c=>{this['_addUploadcareImageEditorListeners'](_0x3f1e4c);});}),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'](_0x33ea75,_0x1e5cee){const _0x44cacd='uc-cloud-image-editor',_0x18e9fb=_0x33ea75['querySelector'](_0x44cacd);if(_0x18e9fb)return _0x1e5cee(_0x18e9fb);const _0x4c2269=new MutationObserver(_0x25b7ea=>{const _0x37278c=_0x25b7ea['filter'](_0x49ee4e=>_0x49ee4e['target']===_0x33ea75&&_0x49ee4e['addedNodes']['length']>0x0&&_0x49ee4e['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x44cacd);_0x37278c['length']&&(_0x4c2269['disconnect'](),_0x1e5cee(_0x37278c[0x0]['addedNodes'][0x0]));});_0x4c2269['observe'](_0x33ea75,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x41d25a){_0x41d25a['addEventListener']('apply',_0x5bac27=>{this['fire']('apply',{'imageSrc':_0x5bac27['detail']['cdnUrl']});}),_0x41d25a['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
+ _0x3d34e2(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x340b4f,_0x33b8af,_0x4a1a97){super(),this['_editor']=_0x340b4f,this['_dialog']=_0x33b8af,this['_imageElement']=_0x4a1a97,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 _0x46794e=this['_imageElement'],_0x5a5c66=_0x46794e['getAttribute']('uploadcareImageId'),_0x18cf4e=_0x46794e['getAttribute']('src');if(_0x5a5c66)await this['_loadImageInfo'](_0x5a5c66,_0x18cf4e);else{if(this['_imageCache']['has'](_0x18cf4e)){const _0x1eda9c=this['_imageCache']['get'](_0x18cf4e);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1eda9c['url'],this['imageDimension']=_0x1eda9c['dimension'],this['imageId']=_0x1eda9c['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x402174}=this['_editor'],t=_0x402174['t'],_0x3aae36=new X(_0x402174,this['imageStatus'],this['_attributes']);_0x3aae36['bind']('status')['to'](this,'imageStatus'),_0x3aae36['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3aae36['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3aae36['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3aae36,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3a6507,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3aae36,'position':_0x5965e9['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3aae36['focus']();},'onHide':()=>{_0x3aae36['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2bf158=>!A(_0x2bf158,_0x3aae36['element'])}});}['_loadImageInfo'](_0x26232c,_0x4ff4d3){return j['getInfo'](_0x26232c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x35f498=>{const {width:_0x23f849,height:_0x2bad25}=_0x35f498['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4ff4d3,this['imageDimension']={'width':_0x23f849,'height':_0x2bad25},this['imageId']=_0x26232c;})['catch'](_0x19df4f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x19df4f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x431d5e,_0x355c0b){return this['_getImageAsFile'](_0x431d5e)['then'](_0x339f3e=>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':_0x355c0b['signal'],'file':_0x339f3e,'onProgress':_0x18c61a=>{_0x18c61a&&_0x18c61a['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x18c61a['value']));}}))['then'](_0x55da5e=>{const {width:_0x3b8c4e,height:_0x271fa2}=_0x55da5e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x55da5e['cdnUrl'],this['imageDimension']={'width':_0x3b8c4e,'height':_0x271fa2},this['imageId']=_0x55da5e['uuid'],this['imageUploadProgress']=null;const _0x5e95ed=_0x431d5e['getAttribute']('src');this['_imageCache']['set'](_0x5e95ed,{'id':_0x55da5e['uuid'],'url':_0x55da5e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x592735=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x592735['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3ba7f2,_0x106c0d){_0x3ba7f2['on']('apply',(_0x3f7c03,_0x3538e3)=>{this['_replaceImage'](_0x106c0d,_0x3538e3['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3ba7f2['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3ba7f2['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x30cac7,_0x38cca9,_0x342437){const _0x1fbf43=this['_editor'],{width:_0x32314a,height:_0x173d90}=S(_0x38cca9,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x4ca542,imageSources:_0x56df11}=C(_0x38cca9,_0x32314a);_0x1fbf43['model']['change'](_0x287fe0=>{if('$graveyard'===_0x30cac7['root']['rootName']){_0x1fbf43['execute']('insertImage',{'imageType':_0x30cac7['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x30cac7['getAttributes']()),'uploadcareImageId':_0x342437,'src':_0x4ca542,'sources':_0x56df11,'width':_0x32314a,'height':_0x173d90}});const _0x1af68a=_0x30cac7['getChildren']();_0x30cac7=_0x1fbf43['model']['document']['selection']['getSelectedElement']();for(const _0x4b5785 of _0x1af68a)_0x287fe0['append'](_0x287fe0['cloneElement'](_0x4b5785),_0x30cac7);}else _0x287fe0['setSelection'](_0x30cac7,'on'),_0x1fbf43['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x30cac7['getAttributes']()),'uploadcareImageId':_0x342437,'src':_0x4ca542,'sources':_0x56df11,'width':_0x32314a,'height':_0x173d90},_0x30cac7);_0x287fe0['setSelection'](_0x30cac7,'on');});}async['_getImageAsFile'](_0x2d6219){const _0x5a5604=_0x3b421d['window'],_0x402572=_0x3b421d['document']['location']['href'],_0x27e38f=new _0x5a5604['URL'](_0x2d6219['getAttribute']('src'),_0x402572);if('data:'===_0x27e38f['protocol']){const _0x1d9356=_0x27e38f['href']['split'](','),_0x3944b8=_0x1d9356[0x0]['match'](/:(.*?);/)[0x1],_0x406cce=_0x3944b8['split']('/')[0x1],_0x5010b7=_0x5a5604['atob'](_0x1d9356[_0x1d9356['length']-0x1]);let _0x5a40e4=_0x5010b7['length'];const _0x350c63=new _0x5a5604['Uint8Array'](_0x5a40e4);for(;_0x5a40e4--;)_0x350c63[_0x5a40e4]=_0x5010b7['charCodeAt'](_0x5a40e4);return new _0x5a5604['File']([_0x350c63],'image.'+_0x406cce,{'type':_0x3944b8});}const _0x1e03cd=_0x27e38f['href']['split']('/'),_0x4cbc59=_0x1e03cd[_0x1e03cd['length']-0x1],_0x4834f2=_0x4cbc59['split']('.')[0x1];return _0x5a5604['fetch'](_0x27e38f['href'])['then'](_0x2a58c4=>_0x2a58c4['clone']()['blob']())['then'](_0x5911cb=>new _0x5a5604['File']([_0x5911cb],_0x4cbc59,{'type':'image/'+_0x4834f2}));}}class Q extends _0x5b5250{['imageEditController'];static get['requires'](){return[_0x4f93e4];}['_isEditable'];constructor(_0x106a42){super(_0x106a42),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x139a3a){const _0x9f6516=z(_0x139a3a);return _0x3aa791=>!(!_0x3aa791||!_0x3aa791['is']('element','imageBlock')&&!_0x3aa791['is']('element','imageInline'))&&(!!_0x3aa791['hasAttribute']('uploadcareImageId')||!!_0x3aa791['hasAttribute']('src')&&_0x9f6516(_0x3aa791['getAttribute']('src')));}(_0x106a42['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x133823=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x133823);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5632a3=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5632a3&&(_0x5632a3['is']('element','imageBlock')||_0x5632a3['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x4f93e4),_0x5632a3),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x5b5250{['refresh'](){const _0x42d60f=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x42d60f&&(_0x42d60f['is']('element','imageBlock')||_0x42d60f['is']('element','imageInline')));}['execute'](_0x2c519d){const _0x5a6c55=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x551fe5=>{_0x551fe5['setAttributes'](_0x2c519d,_0x5a6c55),_0x551fe5['removeAttribute']('srcset',_0x5a6c55),_0x551fe5['removeAttribute']('sizes',_0x5a6c55);});}}class m extends _0x5e5b75{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x51acdf,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x42bf69}=this;_0x42bf69['commands']['add']('uploadcareImageEdit',new Q(_0x42bf69)),_0x42bf69['commands']['add']('uploadcareImageReplace',new V(_0x42bf69));}}class g extends _0x5e5b75{['_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 _0x545d02=this['editor'];_0x545d02['ui']['componentFactory']['add']('uploadcareImageEdit',_0x35596d=>{const _0x3b9b16=_0x545d02['commands']['get']('uploadcareImageEdit'),_0x241b7e=new _0x2fdd6d(_0x35596d),t=_0x35596d['t'];return _0x241b7e['set']({'icon':_0x3a6507,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x241b7e['bind']('isEnabled')['to'](_0x3b9b16),_0x241b7e['bind']('isOn')['to'](_0x3b9b16,'isActive'),this['listenTo'](_0x241b7e,'execute',()=>{_0x545d02['execute']('uploadcareImageEdit'),_0x545d02['editing']['view']['focus']();}),_0x241b7e;}),this['_initConfig']();}['_initConfig'](){const _0x1f04f8=_0x51e8e3(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1f04f8),this['listenTo'](this['editor'],'destroy',()=>{_0x1f04f8['remove']();});}}class et extends _0x5e5b75{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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "47.4.0-alpha.2",
3
+ "version": "47.4.0-alpha.4",
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": "47.4.0-alpha.2",
27
- "@ckeditor/ckeditor5-icons": "47.4.0-alpha.2",
28
- "@ckeditor/ckeditor5-image": "47.4.0-alpha.2",
29
- "@ckeditor/ckeditor5-theme-lark": "47.4.0-alpha.2",
30
- "@ckeditor/ckeditor5-ui": "47.4.0-alpha.2",
31
- "@ckeditor/ckeditor5-upload": "47.4.0-alpha.2",
32
- "@ckeditor/ckeditor5-utils": "47.4.0-alpha.2",
33
- "ckeditor5": "47.4.0-alpha.2",
26
+ "@ckeditor/ckeditor5-core": "47.4.0-alpha.4",
27
+ "@ckeditor/ckeditor5-icons": "47.4.0-alpha.4",
28
+ "@ckeditor/ckeditor5-image": "47.4.0-alpha.4",
29
+ "@ckeditor/ckeditor5-theme-lark": "47.4.0-alpha.4",
30
+ "@ckeditor/ckeditor5-ui": "47.4.0-alpha.4",
31
+ "@ckeditor/ckeditor5-upload": "47.4.0-alpha.4",
32
+ "@ckeditor/ckeditor5-utils": "47.4.0-alpha.4",
33
+ "ckeditor5": "47.4.0-alpha.4",
34
34
  "@uploadcare/file-uploader": "1.24.5",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x3ae6(_0x5a310a,_0x12df87){const _0x18aa63=_0x18aa();return _0x3ae6=function(_0x3ae62b,_0x15b196){_0x3ae62b=_0x3ae62b-0xcf;let _0x3fe39b=_0x18aa63[_0x3ae62b];return _0x3fe39b;},_0x3ae6(_0x5a310a,_0x12df87);}const _0x49774d=_0x3ae6;(function(_0x59331c,_0x472f89){const _0x46cec5=_0x3ae6,_0x40ab07=_0x59331c();while(!![]){try{const _0x470783=-parseInt(_0x46cec5(0xe2))/0x1*(parseInt(_0x46cec5(0x115))/0x2)+parseInt(_0x46cec5(0x119))/0x3+-parseInt(_0x46cec5(0xff))/0x4*(-parseInt(_0x46cec5(0xd4))/0x5)+-parseInt(_0x46cec5(0x101))/0x6*(-parseInt(_0x46cec5(0xe9))/0x7)+-parseInt(_0x46cec5(0x105))/0x8+parseInt(_0x46cec5(0x11e))/0x9*(parseInt(_0x46cec5(0xdd))/0xa)+-parseInt(_0x46cec5(0x124))/0xb;if(_0x470783===_0x472f89)break;else _0x40ab07['push'](_0x40ab07['shift']());}catch(_0x4d0cdd){_0x40ab07['push'](_0x40ab07['shift']());}}}(_0x18aa,0x5ceda));import{Plugin as _0xa17aa0}from'ckeditor5/src/core.js';import{Dialog as _0x364330}from'ckeditor5/src/ui.js';import{createElement as _0x25ef46,global as _0x3c570c,uid as _0x416873}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0xe32566}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x443d61}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x5b1da0}from'./utils/editingutils.js';function _0x18aa(){const _0x20c3de=['querySelector','_configElement','4bhXbPL','config','495024qYRAvU','uc-upload-ctx-provider','init','body','5709976dVrZgF','appendChild','ctxElement','requires','configElement','elementToAttribute','listenTo','isPremiumPlugin','removeAttribute','_initImageProcessingIndicator','getAttribute','isOfficialPlugin','execute','_initConversion','conversion','_initConfig','556PorBSO','href','uploadcareImageId','replaceImageSource','1551978KcAgBx','view','upcast','UploadcareEditing','closeMax','1223577rkbARs','_ctxElement','remove','downcast','uploadcare','render','3731794ppgfHO','ucContextId','get','map','schema','\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','2895270ALJMMV','locale','uploader-','destroy','true','cleanupImage','afterInit','uploadcare.pubkey','_initCtx','10XzPUCg','document','getSelectedElement','PictureEditing','uploadcare.uploader','463GwiLvJ','contentLanguage','iconHrefResolver','_initSchema','selection','once','add','28MKNIdD','imageInline','editor','for','fromCharCode','insertImage','join','pluginName','#uc-icon-arrow-down','extend','uc-config','model','attributeToAttribute','editing','data-uc-image-id','isRegistered','input[uploadcare-file-input]','commands','imageBlock','uploadcareImageReplace'];_0x18aa=function(){return _0x20c3de;};return _0x18aa();}export class UploadcareEditing extends _0xa17aa0{[_0x49774d(0xfe)]=null;[_0x49774d(0x11f)]=null;static get[_0x49774d(0xf0)](){const _0x261f4a=_0x49774d;return _0x261f4a(0x11c);}static get[_0x49774d(0x108)](){const _0x4d6acc=_0x49774d;return[_0x4d6acc(0xe0),_0x443d61,_0x364330];}static get[_0x49774d(0x110)](){return!0x0;}static get[_0x49774d(0x10c)](){return!0x0;}[_0x49774d(0xcf)];get[_0x49774d(0x109)](){const _0xaed505=_0x49774d;return this[_0xaed505(0xfe)];}get[_0x49774d(0x107)](){const _0x13e1b6=_0x49774d;return this[_0x13e1b6(0x11f)];}constructor(_0x201ecc){const _0x416d31=_0x49774d;super(_0x201ecc),this[_0x416d31(0xcf)]=_0x416873();}[_0x49774d(0x103)](){const _0x1be327=_0x49774d,_0x18c48f=this[_0x1be327(0xeb)];_0x18c48f[_0x1be327(0xfa)][_0x1be327(0xe8)](_0x1be327(0x122),new _0xe32566(_0x18c48f));}[_0x49774d(0xda)](){const _0x49f7e8=_0x49774d;this[_0x49f7e8(0xe5)](),this[_0x49f7e8(0x112)](),this[_0x49f7e8(0x114)](),this[_0x49f7e8(0xdc)](),this[_0x49f7e8(0x10e)](),this[_0x49f7e8(0x10b)](this[_0x49f7e8(0xeb)],_0x49f7e8(0xd7),()=>{const _0x1fc58f=_0x49f7e8;this[_0x1fc58f(0xfe)]&&(this[_0x1fc58f(0xfe)][_0x1fc58f(0x120)](),this[_0x1fc58f(0xfe)]=null),this[_0x1fc58f(0x11f)]&&(this[_0x1fc58f(0x11f)][_0x1fc58f(0x120)](),this[_0x1fc58f(0x11f)]=null);const _0x3d6484=_0x3c570c[_0x1fc58f(0xde)][_0x1fc58f(0xfd)](_0x1fc58f(0xf9));_0x3d6484&&_0x3d6484[_0x1fc58f(0x120)]();}),async function(_0x2611d4){const _0x585ad8=_0x560fd1([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x380ea4=0x535f8c3a,_0x3769a5=0x5358f252^_0x380ea4,_0x360aa2=window[_0x560fd1([0x44,0x61,0x74,0x65])][_0x560fd1([0x6e,0x6f,0x77])](),_0x4fd690=_0x2611d4[_0x560fd1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x326deb=new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e416c=>{_0x4fd690[_0x560fd1([0x6f,0x6e,0x63,0x65])](_0x560fd1([0x72,0x65,0x61,0x64,0x79]),_0x2e416c);}),_0x10298f={[_0x560fd1([0x6b,0x74,0x79])]:_0x560fd1([0x45,0x43]),[_0x560fd1([0x75,0x73,0x65])]:_0x560fd1([0x73,0x69,0x67]),[_0x560fd1([0x63,0x72,0x76])]:_0x560fd1([0x50,0x2d,0x32,0x35,0x36]),[_0x560fd1([0x78])]:_0x560fd1([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]),[_0x560fd1([0x79])]:_0x560fd1([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]),[_0x560fd1([0x61,0x6c,0x67])]:_0x560fd1([0x45,0x53,0x32,0x35,0x36])},_0x2c9838=_0x4fd690[_0x560fd1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x560fd1([0x67,0x65,0x74])](_0x560fd1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x37a6d9(){let _0x46d89e,_0xa29c82=null,_0x369a85=null;try{if(_0x2c9838==_0x560fd1([0x47,0x50,0x4c]))return _0x560fd1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46d89e=_0x54c8ea(),!_0x46d89e)return _0x560fd1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46d89e[_0x560fd1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x369a85=_0x2d303c(_0x46d89e[_0x560fd1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46d89e[_0x560fd1([0x6a,0x74,0x69])])),await _0x215cec()?_0x6696b4()?_0x56444c()?_0x560fd1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x58f45f()?(_0x46d89e[_0x560fd1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x560fd1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xa29c82=_0x108125(_0x560fd1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f6019()):_0x560fd1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x560fd1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x560fd1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x560fd1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x56444c(){const _0x450dcc=[_0x560fd1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x560fd1([0x74,0x72,0x69,0x61,0x6c])][_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46d89e[_0x560fd1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x360aa2/0x3e8:0xe10*_0x3769a5;return _0x46d89e[_0x560fd1([0x65,0x78,0x70])]<_0x450dcc;}function _0x6696b4(){const _0xa0baad=_0x46d89e[_0x560fd1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xa0baad&&(!!_0xa0baad[_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560fd1([0x2a]))||!!_0xa0baad[_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560fd1([0x55,0x50,0x4c,0x43])));}function _0x58f45f(){const _0x5f3636=_0x3ae6,_0x1c8c23=_0x46d89e[_0x560fd1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1c8c23||0x0==_0x1c8c23[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5b3135}=new URL(window[_0x560fd1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x5f3636(0x116)]);if(_0x1c8c23[_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b3135))return!0x0;const _0x5f09e0=_0x5b3135[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])](_0x560fd1([0x2e]));return _0x1c8c23[_0x560fd1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2c4abb=>_0x2c4abb[_0x560fd1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560fd1([0x2a])))[_0x560fd1([0x6d,0x61,0x70])](_0x376916=>_0x376916[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])](_0x560fd1([0x2e])))[_0x560fd1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x28b04f=>_0x28b04f[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5f09e0[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x560fd1([0x6d,0x61,0x70])](_0x3b58f4=>Array(_0x5f09e0[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3b58f4[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x560fd1([0x66,0x69,0x6c,0x6c])](_0x3b58f4[0x0]===_0x560fd1([0x2a])?_0x560fd1([0x2a]):'')[_0x560fd1([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3b58f4))[_0x560fd1([0x73,0x6f,0x6d,0x65])](_0x4569ed=>_0x5f09e0[_0x560fd1([0x65,0x76,0x65,0x72,0x79])]((_0x5e95ea,_0x1984da)=>_0x4569ed[_0x1984da]===_0x5e95ea||_0x4569ed[_0x1984da]===_0x560fd1([0x2a])));}function _0x2f6019(){return _0xa29c82&&_0x369a85?new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc8aff3,_0x29a629)=>{_0xa29c82[_0x560fd1([0x74,0x68,0x65,0x6e])](_0xc8aff3,_0x29a629),_0x369a85[_0x560fd1([0x74,0x68,0x65,0x6e])](_0x3166fd=>{_0x3166fd!=_0x560fd1([0x56,0x61,0x6c,0x69,0x64])&&_0xc8aff3(_0x3166fd);},_0x29a629);}):_0xa29c82||_0x369a85||_0x560fd1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2d303c(_0x19a539,_0x50305e){return new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f4aca=>{if(_0x459d55())return _0x2f4aca(_0x560fd1([0x56,0x61,0x6c,0x69,0x64]));_0x560bb7(),_0x4fd690[_0x560fd1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x560fd1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x319b5d=!0x1;const _0x3b834c=_0x416873();function _0x39c651(_0x1fb435){return!!_0x1fb435&&(typeof _0x1fb435===_0x560fd1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1fb435===_0x560fd1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1fb435[_0x560fd1([0x74,0x68,0x65,0x6e])]===_0x560fd1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1fb435[_0x560fd1([0x63,0x61,0x74,0x63,0x68])]===_0x560fd1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x487954(_0x2caa21){_0xeee4ff(_0x2caa21)[_0x560fd1([0x74,0x68,0x65,0x6e])](_0x1abd64=>{if(!_0x1abd64||_0x1abd64[_0x560fd1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x560fd1([0x6f,0x6b]))return _0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5be772(_0x418c5f(_0x3b834c+_0x50305e))!=_0x1abd64[_0x560fd1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x560fd1([0x56,0x61,0x6c,0x69,0x64]);})[_0x560fd1([0x74,0x68,0x65,0x6e])](_0xf2f9dd=>(_0x257c61(),_0xf2f9dd),()=>{const _0x4169e1=_0x8b964b();return null==_0x4169e1?(_0x257c61(),_0x560fd1([0x56,0x61,0x6c,0x69,0x64])):_0x560fd1(_0x360aa2-_0x4169e1>(0x7753083a^_0x380ea4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x560fd1([0x74,0x68,0x65,0x6e])](_0x2f4aca)[_0x560fd1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2f4aca(_0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5b502e=0x536962ba^_0x380ea4;function _0x257c61(){const _0x46dc26=_0x560fd1([0x6c,0x6c,0x63,0x74,0x2d])+_0x5be772(_0x418c5f(_0x19a539)),_0x44c16a=_0x330902(_0x5be772(window[_0x560fd1([0x4d,0x61,0x74,0x68])][_0x560fd1([0x63,0x65,0x69,0x6c])](_0x360aa2/_0x5b502e)));window[_0x560fd1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x560fd1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46dc26,_0x44c16a);}function _0x8b964b(){const _0x4c7e59=_0x560fd1([0x6c,0x6c,0x63,0x74,0x2d])+_0x5be772(_0x418c5f(_0x19a539)),_0x2ac6d9=window[_0x560fd1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x560fd1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4c7e59);return _0x2ac6d9?window[_0x560fd1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x330902(_0x2ac6d9),0x10)*_0x5b502e:null;}function _0xeee4ff(_0x380a28){return new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x44ed70,_0x1f5507)=>{_0x380a28[_0x560fd1([0x74,0x68,0x65,0x6e])](_0x44ed70,_0x1f5507),window[_0x560fd1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1f5507,0x535e58fa^_0x380ea4);});}}_0x4fd690[_0x560fd1([0x6f,0x6e])](_0x560fd1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1dd7b7,_0x34d4ab)=>{if(_0x34d4ab[0x0]!=_0x19a539)return _0x2f4aca(_0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x34d4ab[0x1]={..._0x34d4ab[0x1],[_0x560fd1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3b834c};},{[_0x560fd1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x560fd1([0x68,0x69,0x67,0x68])}),_0x4fd690[_0x560fd1([0x6f,0x6e])](_0x560fd1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x15a5d7=>{_0x39c651(_0x15a5d7[_0x560fd1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x319b5d=!0x0,_0x487954(_0x15a5d7[_0x560fd1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x560fd1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x560fd1([0x6c,0x6f,0x77])}),_0x326deb[_0x560fd1([0x74,0x68,0x65,0x6e])](()=>{_0x319b5d||_0x2f4aca(_0x560fd1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x459d55(){return _0x4fd690[_0x560fd1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x560fd1([0x76,0x69,0x65,0x77])][_0x560fd1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x560fd1([0x61,0x75,0x74,0x6f]);}function _0x560bb7(){_0x4fd690[_0x560fd1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x560fd1([0x76,0x69,0x65,0x77])][_0x560fd1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x560fd1([0x61,0x75,0x74,0x6f]);}}function _0x108125(_0x9d392d){const _0x125a31=[new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35fbec=>setTimeout(_0x35fbec,0x5356b2f6^_0x380ea4)),_0x326deb[_0x560fd1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb22166=>{let _0xcc1bef=0x0;_0x4fd690[_0x560fd1([0x6d,0x6f,0x64,0x65,0x6c])][_0x560fd1([0x6f,0x6e])](_0x560fd1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xea29de,_0x43934d)=>{_0x43934d[0x0][_0x560fd1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xcc1bef++,_0xcc1bef==(0x535f89d2^_0x380ea4)&&(_0xb22166(),_0xea29de[_0x560fd1([0x6f,0x66,0x66])]());});}))];return window[_0x560fd1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x560fd1([0x72,0x61,0x63,0x65])](_0x125a31)[_0x560fd1([0x74,0x68,0x65,0x6e])](()=>_0x9d392d);}async function _0x3100fc(){await _0x326deb,_0x4fd690[_0x560fd1([0x6d,0x6f,0x64,0x65,0x6c])][_0x560fd1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x56d6f7,_0x4fd690[_0x560fd1([0x6d,0x6f,0x64,0x65,0x6c])][_0x560fd1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x56d6f7,_0x4fd690[_0x560fd1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x560fd1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x440ccf(_0x24ff54){const _0x45e23c=_0x131dbe();_0x4fd690[_0x45e23c]=_0x560fd1([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x24ff54,_0x24ff54!=_0x560fd1([0x56,0x61,0x6c,0x69,0x64])&&_0x3100fc();}function _0x131dbe(){const _0xc98a21=window[_0x560fd1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x560fd1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x560fd1([0x6e,0x6f,0x77])]())[_0x560fd1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x560fd1([0x2e]),'');let _0x15f395=_0x560fd1([0x68]);for(let _0x3776e1=0x0;_0x3776e1<_0xc98a21[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3776e1+=0x2){let _0x47afe8=window[_0x560fd1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc98a21[_0x560fd1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3776e1,_0x3776e1+0x2));_0x47afe8>=_0x585ad8[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x47afe8-=_0x585ad8[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x15f395+=_0x585ad8[_0x47afe8];}return _0x15f395;}function _0x54c8ea(){const _0x4ce738=_0x2c9838[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])](_0x560fd1([0x2e]));if(0x3!=_0x4ce738[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5be1b1(_0x4ce738[0x1]);function _0x5be1b1(_0x16183c){const _0x1b4606=_0x53afdc(_0x16183c);return _0x1b4606&&_0x2dceba()?_0x1b4606:null;function _0x2dceba(){const _0xb1a827=_0x1b4606[_0x560fd1([0x6a,0x74,0x69])],_0x33978c=window[_0x560fd1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb1a827[_0x560fd1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xb1a827[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x430bd1={..._0x1b4606,[_0x560fd1([0x6a,0x74,0x69])]:_0xb1a827[_0x560fd1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xb1a827[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x430bd1[_0x560fd1([0x76,0x63])],_0x418c5f(_0x430bd1)==_0x33978c;}}}async function _0x215cec(){let _0x93482=!0x0;try{const _0xcad3bb=_0x2c9838[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])](_0x560fd1([0x2e])),[_0x5a37f9,_0x5aac36,_0x387140]=_0xcad3bb;return _0x43db96(_0x5a37f9),await _0x4a59e1(_0x5a37f9,_0x5aac36,_0x387140),_0x93482;}catch{return!0x1;}function _0x43db96(_0x3102bc){const _0xa062aa=_0x53afdc(_0x3102bc);_0xa062aa&&_0xa062aa[_0x560fd1([0x61,0x6c,0x67])]==_0x560fd1([0x45,0x53,0x32,0x35,0x36])||(_0x93482=!0x1);}async function _0x4a59e1(_0x52e0ab,_0x1eab93,_0x2567ba){const _0xdc9a80=window[_0x560fd1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x560fd1([0x66,0x72,0x6f,0x6d])](_0x52a372(_0x2567ba),_0x524e0f=>_0x524e0f[_0x560fd1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x45728e=new window[(_0x560fd1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x560fd1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x52e0ab+_0x560fd1([0x2e])+_0x1eab93),_0x4fbc96=window[_0x560fd1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x560fd1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4fbc96)return;const _0x213f6a=await _0x4fbc96[_0x560fd1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x560fd1([0x6a,0x77,0x6b]),_0x10298f,{[_0x560fd1([0x6e,0x61,0x6d,0x65])]:_0x560fd1([0x45,0x43,0x44,0x53,0x41]),[_0x560fd1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x560fd1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x560fd1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4fbc96[_0x560fd1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x560fd1([0x6e,0x61,0x6d,0x65])]:_0x560fd1([0x45,0x43,0x44,0x53,0x41]),[_0x560fd1([0x68,0x61,0x73,0x68])]:{[_0x560fd1([0x6e,0x61,0x6d,0x65])]:_0x560fd1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x213f6a,_0xdc9a80,_0x45728e)||(_0x93482=!0x1);}}function _0x53afdc(_0x302660){return _0x302660[_0x560fd1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x560fd1([0x65,0x79]))?JSON[_0x560fd1([0x70,0x61,0x72,0x73,0x65])](_0x52a372(_0x302660)):null;}function _0x52a372(_0x84b9c3){return window[_0x560fd1([0x61,0x74,0x6f,0x62])](_0x84b9c3[_0x560fd1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x560fd1([0x2b]))[_0x560fd1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x560fd1([0x2f])));}function _0x418c5f(_0x5ef35f){let _0x3d1ab9=0x1505;function _0x23473f(_0x4b5979){for(let _0x4823d3=0x0;_0x4823d3<_0x4b5979[_0x560fd1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4823d3++){const _0x11db53=_0x4b5979[_0x560fd1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4823d3);_0x3d1ab9=(_0x3d1ab9<<0x5)+_0x3d1ab9+_0x11db53,_0x3d1ab9&=_0x3d1ab9;}}function _0x4944bf(_0x464715){Array[_0x560fd1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x464715)?_0x464715[_0x560fd1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4944bf):_0x464715&&typeof _0x464715==_0x560fd1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x560fd1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x464715)[_0x560fd1([0x73,0x6f,0x72,0x74])]()[_0x560fd1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2d9f56,_0x557637])=>{_0x23473f(_0x2d9f56),_0x4944bf(_0x557637);}):_0x23473f(window[_0x560fd1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x464715));}return _0x4944bf(_0x5ef35f),_0x3d1ab9>>>0x0;}function _0x5be772(_0x8137f4){return _0x8137f4[_0x560fd1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x560fd1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x560fd1([0x30]));}function _0x330902(_0x45a512){return _0x45a512[_0x560fd1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x560fd1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x560fd1([0x6a,0x6f,0x69,0x6e])]('');}function _0x56d6f7(){}function _0x560fd1(_0x2dc306){const _0x31dc7e=_0x3ae6;return _0x2dc306[_0x31dc7e(0xd1)](_0x562fcd=>String[_0x31dc7e(0xed)](_0x562fcd))[_0x31dc7e(0xef)]('');}_0x440ccf(await _0x37a6d9());}(this);}[_0x49774d(0xe5)](){const _0x29b5b3=_0x49774d,_0x4937f6=this[_0x29b5b3(0xeb)][_0x29b5b3(0xf4)][_0x29b5b3(0xd2)];_0x4937f6[_0x29b5b3(0xf8)](_0x29b5b3(0xfb))&&_0x4937f6[_0x29b5b3(0xf2)](_0x29b5b3(0xfb),{'allowAttributes':[_0x29b5b3(0x117)]}),_0x4937f6[_0x29b5b3(0xf8)](_0x29b5b3(0xea))&&_0x4937f6[_0x29b5b3(0xf2)](_0x29b5b3(0xea),{'allowAttributes':[_0x29b5b3(0x117)]});}[_0x49774d(0x112)](){const _0x194c40=_0x49774d,_0x16a5ab=this[_0x194c40(0xeb)];_0x16a5ab[_0x194c40(0x113)][_0x194c40(0xec)](_0x194c40(0x121))[_0x194c40(0xf5)]({'model':_0x194c40(0x117),'view':_0x194c40(0xf7)}),_0x16a5ab[_0x194c40(0x113)][_0x194c40(0xec)](_0x194c40(0x11b))[_0x194c40(0x10a)]({'model':{'key':_0x194c40(0x117),'value':_0x23a54d=>_0x23a54d[_0x194c40(0x10f)](_0x194c40(0xf7))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x27e29c=_0x16a5ab[_0x194c40(0xfa)][_0x194c40(0xd0)](_0x194c40(0x118));_0x27e29c&&this[_0x194c40(0x10b)](_0x27e29c,_0x194c40(0xd9),(_0x225ba0,[_0x3a374a,_0xe98c27])=>{const _0x243af8=_0x194c40;_0x3a374a[_0x243af8(0x10d)](_0x243af8(0x117),_0xe98c27);});}[_0x49774d(0x114)](){const _0x481cf1=_0x49774d,_0x90bcda=this[_0x481cf1(0xeb)][_0x481cf1(0x100)][_0x481cf1(0xd0)](_0x481cf1(0xe1))||{},_0x38cf4c=this[_0x481cf1(0xeb)][_0x481cf1(0x100)][_0x481cf1(0xd0)](_0x481cf1(0xdb))||'';this[_0x481cf1(0xfe)]=_0x25ef46(_0x3c570c[_0x481cf1(0xde)],_0x481cf1(0xf3),{..._0x90bcda,'pubkey':_0x38cf4c,'ctx-name':_0x481cf1(0xd6)+this[_0x481cf1(0xcf)],'sourceList':'','imgOnly':_0x481cf1(0xd8),'removeCopyright':_0x481cf1(0xd8),'localeName':this[_0x481cf1(0xeb)][_0x481cf1(0xd5)][_0x481cf1(0xe3)],'externalSourcesEmbedCss':_0x481cf1(0xd3)}),this[_0x481cf1(0xfe)][_0x481cf1(0xe4)]=_0x4298cc=>{const _0x5f2093=_0x481cf1;if(_0x5f2093(0x11d)==_0x4298cc)return _0x5f2093(0xf1);},_0x3c570c[_0x481cf1(0xde)][_0x481cf1(0x104)][_0x481cf1(0x106)](this[_0x481cf1(0xfe)]);}[_0x49774d(0xdc)](){const _0x2817db=_0x49774d;this[_0x2817db(0x11f)]=_0x25ef46(_0x3c570c[_0x2817db(0xde)],_0x2817db(0x102),{'ctx-name':_0x2817db(0xd6)+this[_0x2817db(0xcf)]}),_0x3c570c[_0x2817db(0xde)][_0x2817db(0x104)][_0x2817db(0x106)](this[_0x2817db(0x11f)]);}[_0x49774d(0x10e)](){const _0x39bb24=_0x49774d,_0x3d9797=this[_0x39bb24(0xeb)][_0x39bb24(0xfa)][_0x39bb24(0xd0)](_0x39bb24(0xee));_0x3d9797&&this[_0x39bb24(0x10b)](_0x3d9797,_0x39bb24(0x111),()=>{const _0x4f5517=_0x39bb24,_0x4f64ba=this[_0x4f5517(0xeb)][_0x4f5517(0xf4)][_0x4f5517(0xde)][_0x4f5517(0xe6)][_0x4f5517(0xdf)]();_0x4f64ba&&_0x4f64ba[_0x4f5517(0x10f)](_0x4f5517(0x117))&&this[_0x4f5517(0xeb)][_0x4f5517(0xf6)][_0x4f5517(0x11a)][_0x4f5517(0xe7)](_0x4f5517(0x123),()=>{const _0x5e86b4=_0x4f5517;_0x5b1da0(this[_0x5e86b4(0xeb)],_0x4f64ba);});});const _0x1ee5d1=this[_0x39bb24(0xeb)][_0x39bb24(0xfa)][_0x39bb24(0xd0)](_0x39bb24(0xfc));_0x1ee5d1&&this[_0x39bb24(0x10b)](_0x1ee5d1,_0x39bb24(0x111),()=>{const _0x272572=_0x39bb24,_0x14f4fb=this[_0x272572(0xeb)][_0x272572(0xf4)][_0x272572(0xde)][_0x272572(0xe6)][_0x272572(0xdf)]();_0x14f4fb&&_0x14f4fb[_0x272572(0x10f)](_0x272572(0x117))&&this[_0x272572(0xeb)][_0x272572(0xf6)][_0x272572(0x11a)][_0x272572(0xe7)](_0x272572(0x123),()=>{const _0x131b40=_0x272572;_0x5b1da0(this[_0x131b40(0xeb)],_0x14f4fb);});});}}
23
+ const _0x1bd54b=_0x1298;(function(_0xe73190,_0x5c9525){const _0x58c492=_0x1298,_0x1b24af=_0xe73190();while(!![]){try{const _0x458754=parseInt(_0x58c492(0xf6))/0x1+parseInt(_0x58c492(0x133))/0x2*(-parseInt(_0x58c492(0x103))/0x3)+parseInt(_0x58c492(0x11c))/0x4+parseInt(_0x58c492(0x12e))/0x5+parseInt(_0x58c492(0xe2))/0x6+-parseInt(_0x58c492(0x127))/0x7*(parseInt(_0x58c492(0x118))/0x8)+-parseInt(_0x58c492(0x100))/0x9*(parseInt(_0x58c492(0x120))/0xa);if(_0x458754===_0x5c9525)break;else _0x1b24af['push'](_0x1b24af['shift']());}catch(_0x37ae2d){_0x1b24af['push'](_0x1b24af['shift']());}}}(_0x17b3,0x8d95f));function _0x1298(_0x287b35,_0x54936c){const _0x17b35c=_0x17b3();return _0x1298=function(_0x1298a0,_0x1ed9f1){_0x1298a0=_0x1298a0-0xe0;let _0x2c2796=_0x17b35c[_0x1298a0];return _0x2c2796;},_0x1298(_0x287b35,_0x54936c);}function _0x17b3(){const _0x33acd0=['appendChild','join','177vYiJii','remove','schema','model','contentLanguage','locale','uploadcareImageReplace','view','imageBlock','_configElement','pluginName','_initSchema','\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','upcast','_initImageProcessingIndicator','ucContextId','execute','attributeToAttribute','afterInit','imageInline','get','23248RubaBO','PictureEditing','true','destroy','741992ChidkA','iconHrefResolver','config','render','2290CFxkjF','uc-config','uploader-','isPremiumPlugin','removeAttribute','uploadcareImageId','uc-upload-ctx-provider','455WtTwXu','getSelectedElement','editing','data-uc-image-id','href','conversion','_initConfig','1968660QiIrST','once','closeMax','#uc-icon-arrow-down','add','10196MPkdbv','_initCtx','document','uploadcare','6415602soNbMT','commands','editor','downcast','input[uploadcare-file-input]','ctxElement','body','requires','insertImage','isRegistered','elementToAttribute','init','uploadcare.uploader','map','querySelector','selection','isOfficialPlugin','fromCharCode','_initConversion','replaceImageSource','59791KCcuCH','uploadcare.pubkey','extend','configElement','_ctxElement','cleanupImage','for','getAttribute','UploadcareEditing','listenTo','25101iYcZaM'];_0x17b3=function(){return _0x33acd0;};return _0x17b3();}import{Plugin as _0x478ef0}from'ckeditor5/src/core.js';import{Dialog as _0x3adbfb}from'ckeditor5/src/ui.js';import{createElement as _0x109b6e,global as _0x2c7bcc,uid as _0x3c17b7}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x5bd243}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x514ae3}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0xca0bf5}from'./utils/editingutils.js';export class UploadcareEditing extends _0x478ef0{[_0x1bd54b(0x10c)]=null;[_0x1bd54b(0xfa)]=null;static get[_0x1bd54b(0x10d)](){const _0x4eef58=_0x1bd54b;return _0x4eef58(0xfe);}static get[_0x1bd54b(0xe9)](){const _0x48bad1=_0x1bd54b;return[_0x48bad1(0x119),_0x514ae3,_0x3adbfb];}static get[_0x1bd54b(0xf2)](){return!0x0;}static get[_0x1bd54b(0x123)](){return!0x0;}[_0x1bd54b(0x112)];get[_0x1bd54b(0xf9)](){const _0x29b1ed=_0x1bd54b;return this[_0x29b1ed(0x10c)];}get[_0x1bd54b(0xe7)](){const _0x4583af=_0x1bd54b;return this[_0x4583af(0xfa)];}constructor(_0x344cd5){const _0x4cb2de=_0x1bd54b;super(_0x344cd5),this[_0x4cb2de(0x112)]=_0x3c17b7();}[_0x1bd54b(0xed)](){const _0x35ac7f=_0x1bd54b,_0x4d4f6e=this[_0x35ac7f(0xe4)];_0x4d4f6e[_0x35ac7f(0xe3)][_0x35ac7f(0x132)](_0x35ac7f(0xe1),new _0x5bd243(_0x4d4f6e));}[_0x1bd54b(0x115)](){const _0x3dad9d=_0x1bd54b;this[_0x3dad9d(0x10e)](),this[_0x3dad9d(0xf4)](),this[_0x3dad9d(0x12d)](),this[_0x3dad9d(0x134)](),this[_0x3dad9d(0x111)](),this[_0x3dad9d(0xff)](this[_0x3dad9d(0xe4)],_0x3dad9d(0x11b),()=>{const _0x6807c7=_0x3dad9d;this[_0x6807c7(0x10c)]&&(this[_0x6807c7(0x10c)][_0x6807c7(0x104)](),this[_0x6807c7(0x10c)]=null),this[_0x6807c7(0xfa)]&&(this[_0x6807c7(0xfa)][_0x6807c7(0x104)](),this[_0x6807c7(0xfa)]=null);const _0x44e6e7=_0x2c7bcc[_0x6807c7(0xe0)][_0x6807c7(0xf0)](_0x6807c7(0xe6));_0x44e6e7&&_0x44e6e7[_0x6807c7(0x104)]();}),async function(_0x38c747){const _0x5892f2=_0x14ee4a([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x2c41e1=0x535f8c3a,_0x570c06=0x5358f2a2^_0x2c41e1,_0x1b6611=window[_0x14ee4a([0x44,0x61,0x74,0x65])][_0x14ee4a([0x6e,0x6f,0x77])](),_0x266394=_0x38c747[_0x14ee4a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1792a3=new window[(_0x14ee4a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc1e260=>{_0x266394[_0x14ee4a([0x6f,0x6e,0x63,0x65])](_0x14ee4a([0x72,0x65,0x61,0x64,0x79]),_0xc1e260);}),_0x4d158d={[_0x14ee4a([0x6b,0x74,0x79])]:_0x14ee4a([0x45,0x43]),[_0x14ee4a([0x75,0x73,0x65])]:_0x14ee4a([0x73,0x69,0x67]),[_0x14ee4a([0x63,0x72,0x76])]:_0x14ee4a([0x50,0x2d,0x32,0x35,0x36]),[_0x14ee4a([0x78])]:_0x14ee4a([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]),[_0x14ee4a([0x79])]:_0x14ee4a([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]),[_0x14ee4a([0x61,0x6c,0x67])]:_0x14ee4a([0x45,0x53,0x32,0x35,0x36])},_0x1f80a1=_0x266394[_0x14ee4a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x14ee4a([0x67,0x65,0x74])](_0x14ee4a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x17f509(){let _0x1067e0,_0x4bd6de=null,_0x589b01=null;try{if(_0x1f80a1==_0x14ee4a([0x47,0x50,0x4c]))return _0x14ee4a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1067e0=_0x422170(),!_0x1067e0)return _0x14ee4a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1067e0[_0x14ee4a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x589b01=_0x15fdc7(_0x1067e0[_0x14ee4a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1067e0[_0x14ee4a([0x6a,0x74,0x69])])),await _0x504626()?_0x784f08()?_0x13b72c()?_0x14ee4a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1c9865()?(_0x1067e0[_0x14ee4a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x14ee4a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4bd6de=_0x4ee378(_0x14ee4a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3b0ead()):_0x14ee4a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x14ee4a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x14ee4a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x14ee4a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x13b72c(){const _0x37f897=[_0x14ee4a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x14ee4a([0x74,0x72,0x69,0x61,0x6c])][_0x14ee4a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1067e0[_0x14ee4a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1b6611/0x3e8:0xe10*_0x570c06;return _0x1067e0[_0x14ee4a([0x65,0x78,0x70])]<_0x37f897;}function _0x784f08(){const _0xbd3e6b=_0x1067e0[_0x14ee4a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xbd3e6b&&(!!_0xbd3e6b[_0x14ee4a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14ee4a([0x2a]))||!!_0xbd3e6b[_0x14ee4a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14ee4a([0x55,0x50,0x4c,0x43])));}function _0x1c9865(){const _0x408158=_0x1298,_0x116c71=_0x1067e0[_0x14ee4a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x116c71||0x0==_0x116c71[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x585c4d}=new URL(window[_0x14ee4a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x408158(0x12b)]);if(_0x116c71[_0x14ee4a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x585c4d))return!0x0;const _0xeecb1e=_0x585c4d[_0x14ee4a([0x73,0x70,0x6c,0x69,0x74])](_0x14ee4a([0x2e]));return _0x116c71[_0x14ee4a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4b3ae8=>_0x4b3ae8[_0x14ee4a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14ee4a([0x2a])))[_0x14ee4a([0x6d,0x61,0x70])](_0x4838f8=>_0x4838f8[_0x14ee4a([0x73,0x70,0x6c,0x69,0x74])](_0x14ee4a([0x2e])))[_0x14ee4a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4b9c44=>_0x4b9c44[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xeecb1e[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x14ee4a([0x6d,0x61,0x70])](_0x55ae82=>Array(_0xeecb1e[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x55ae82[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x14ee4a([0x66,0x69,0x6c,0x6c])](_0x55ae82[0x0]===_0x14ee4a([0x2a])?_0x14ee4a([0x2a]):'')[_0x14ee4a([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x55ae82))[_0x14ee4a([0x73,0x6f,0x6d,0x65])](_0x301fb7=>_0xeecb1e[_0x14ee4a([0x65,0x76,0x65,0x72,0x79])]((_0xe73b29,_0x50cf5c)=>_0x301fb7[_0x50cf5c]===_0xe73b29||_0x301fb7[_0x50cf5c]===_0x14ee4a([0x2a])));}function _0x3b0ead(){return _0x4bd6de&&_0x589b01?new window[(_0x14ee4a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x48ff9e,_0x499eae)=>{_0x4bd6de[_0x14ee4a([0x74,0x68,0x65,0x6e])](_0x48ff9e,_0x499eae),_0x589b01[_0x14ee4a([0x74,0x68,0x65,0x6e])](_0x2ce6a8=>{_0x2ce6a8!=_0x14ee4a([0x56,0x61,0x6c,0x69,0x64])&&_0x48ff9e(_0x2ce6a8);},_0x499eae);}):_0x4bd6de||_0x589b01||_0x14ee4a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x15fdc7(_0x278e21,_0x4f59cf){return new window[(_0x14ee4a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5be05c=>{if(_0x1fd17a())return _0x5be05c(_0x14ee4a([0x56,0x61,0x6c,0x69,0x64]));_0x9ef5d4(),_0x266394[_0x14ee4a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x14ee4a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x408aa4=!0x1;const _0x33f585=_0x3c17b7();function _0x16a878(_0x37cd26){return!!_0x37cd26&&(typeof _0x37cd26===_0x14ee4a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x37cd26===_0x14ee4a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x37cd26[_0x14ee4a([0x74,0x68,0x65,0x6e])]===_0x14ee4a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x37cd26[_0x14ee4a([0x63,0x61,0x74,0x63,0x68])]===_0x14ee4a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x44a376(_0x216a5a){_0x3bc5d6(_0x216a5a)[_0x14ee4a([0x74,0x68,0x65,0x6e])](_0x57da33=>{if(!_0x57da33||_0x57da33[_0x14ee4a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x14ee4a([0x6f,0x6b]))return _0x14ee4a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x25a717(_0x2d9de7(_0x33f585+_0x4f59cf))!=_0x57da33[_0x14ee4a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x14ee4a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x14ee4a([0x56,0x61,0x6c,0x69,0x64]);})[_0x14ee4a([0x74,0x68,0x65,0x6e])](_0x265a12=>(_0x3ab822(),_0x265a12),()=>{const _0xc14d2=_0x5f3959();return null==_0xc14d2?(_0x3ab822(),_0x14ee4a([0x56,0x61,0x6c,0x69,0x64])):_0x14ee4a(_0x1b6611-_0xc14d2>(0x7753083a^_0x2c41e1)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x14ee4a([0x74,0x68,0x65,0x6e])](_0x5be05c)[_0x14ee4a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5be05c(_0x14ee4a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x40c38b=0x536962ba^_0x2c41e1;function _0x3ab822(){const _0x35a331=_0x14ee4a([0x6c,0x6c,0x63,0x74,0x2d])+_0x25a717(_0x2d9de7(_0x278e21)),_0xd1febc=_0x1998e6(_0x25a717(window[_0x14ee4a([0x4d,0x61,0x74,0x68])][_0x14ee4a([0x63,0x65,0x69,0x6c])](_0x1b6611/_0x40c38b)));window[_0x14ee4a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x14ee4a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35a331,_0xd1febc);}function _0x5f3959(){const _0x31cf06=_0x14ee4a([0x6c,0x6c,0x63,0x74,0x2d])+_0x25a717(_0x2d9de7(_0x278e21)),_0x4db94b=window[_0x14ee4a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x14ee4a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31cf06);return _0x4db94b?window[_0x14ee4a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1998e6(_0x4db94b),0x10)*_0x40c38b:null;}function _0x3bc5d6(_0x27976f){return new window[(_0x14ee4a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5d8f2a,_0x3233ef)=>{_0x27976f[_0x14ee4a([0x74,0x68,0x65,0x6e])](_0x5d8f2a,_0x3233ef),window[_0x14ee4a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3233ef,0x535e58fa^_0x2c41e1);});}}_0x266394[_0x14ee4a([0x6f,0x6e])](_0x14ee4a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x219900,_0x55c0e9)=>{if(_0x55c0e9[0x0]!=_0x278e21)return _0x5be05c(_0x14ee4a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x55c0e9[0x1]={..._0x55c0e9[0x1],[_0x14ee4a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x33f585};},{[_0x14ee4a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x14ee4a([0x68,0x69,0x67,0x68])}),_0x266394[_0x14ee4a([0x6f,0x6e])](_0x14ee4a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x56ab09=>{_0x16a878(_0x56ab09[_0x14ee4a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x408aa4=!0x0,_0x44a376(_0x56ab09[_0x14ee4a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x14ee4a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x14ee4a([0x6c,0x6f,0x77])}),_0x1792a3[_0x14ee4a([0x74,0x68,0x65,0x6e])](()=>{_0x408aa4||_0x5be05c(_0x14ee4a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1fd17a(){return _0x266394[_0x14ee4a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x14ee4a([0x76,0x69,0x65,0x77])][_0x14ee4a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x14ee4a([0x61,0x75,0x74,0x6f]);}function _0x9ef5d4(){_0x266394[_0x14ee4a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x14ee4a([0x76,0x69,0x65,0x77])][_0x14ee4a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x14ee4a([0x61,0x75,0x74,0x6f]);}}function _0x4ee378(_0x5e4111){const _0x56a01c=[new window[(_0x14ee4a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ca751=>setTimeout(_0x1ca751,0x5356b2f6^_0x2c41e1)),_0x1792a3[_0x14ee4a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x14ee4a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f2c60=>{let _0x2ea5f5=0x0;_0x266394[_0x14ee4a([0x6d,0x6f,0x64,0x65,0x6c])][_0x14ee4a([0x6f,0x6e])](_0x14ee4a([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x303bfd,_0x38d33e)=>{_0x38d33e[0x0][_0x14ee4a([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2ea5f5++,_0x2ea5f5==(0x535f89d2^_0x2c41e1)&&(_0x1f2c60(),_0x303bfd[_0x14ee4a([0x6f,0x66,0x66])]());});}))];return window[_0x14ee4a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x14ee4a([0x72,0x61,0x63,0x65])](_0x56a01c)[_0x14ee4a([0x74,0x68,0x65,0x6e])](()=>_0x5e4111);}async function _0x4c33d6(){await _0x1792a3,_0x266394[_0x14ee4a([0x6d,0x6f,0x64,0x65,0x6c])][_0x14ee4a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x247049,_0x266394[_0x14ee4a([0x6d,0x6f,0x64,0x65,0x6c])][_0x14ee4a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x247049,_0x266394[_0x14ee4a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x14ee4a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xad6a16(_0xc282d5){const _0x59d6fc=_0x5341e9();_0x266394[_0x59d6fc]=_0x14ee4a([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xc282d5,_0xc282d5!=_0x14ee4a([0x56,0x61,0x6c,0x69,0x64])&&_0x4c33d6();}function _0x5341e9(){const _0xe8459c=window[_0x14ee4a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x14ee4a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x14ee4a([0x6e,0x6f,0x77])]())[_0x14ee4a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x14ee4a([0x2e]),'');let _0x502ddb=_0x14ee4a([0x68]);for(let _0x2e5fc3=0x0;_0x2e5fc3<_0xe8459c[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e5fc3+=0x2){let _0x432f2e=window[_0x14ee4a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xe8459c[_0x14ee4a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2e5fc3,_0x2e5fc3+0x2));_0x432f2e>=_0x5892f2[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x432f2e-=_0x5892f2[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x502ddb+=_0x5892f2[_0x432f2e];}return _0x502ddb;}function _0x422170(){const _0x464b4b=_0x1f80a1[_0x14ee4a([0x73,0x70,0x6c,0x69,0x74])](_0x14ee4a([0x2e]));if(0x3!=_0x464b4b[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x42e51b(_0x464b4b[0x1]);function _0x42e51b(_0x409940){const _0x22e8ae=_0x1e48fc(_0x409940);return _0x22e8ae&&_0x1aed79()?_0x22e8ae:null;function _0x1aed79(){const _0x2c3a93=_0x22e8ae[_0x14ee4a([0x6a,0x74,0x69])],_0x3d25aa=window[_0x14ee4a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c3a93[_0x14ee4a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2c3a93[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x26714e={..._0x22e8ae,[_0x14ee4a([0x6a,0x74,0x69])]:_0x2c3a93[_0x14ee4a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2c3a93[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x26714e[_0x14ee4a([0x76,0x63])],_0x2d9de7(_0x26714e)==_0x3d25aa;}}}async function _0x504626(){let _0x2c08c3=!0x0;try{const _0x22562e=_0x1f80a1[_0x14ee4a([0x73,0x70,0x6c,0x69,0x74])](_0x14ee4a([0x2e])),[_0x2378d9,_0x335c3e,_0x596857]=_0x22562e;return _0x2a4bf0(_0x2378d9),await _0x1e66ef(_0x2378d9,_0x335c3e,_0x596857),_0x2c08c3;}catch{return!0x1;}function _0x2a4bf0(_0x4ac2a9){const _0x12163d=_0x1e48fc(_0x4ac2a9);_0x12163d&&_0x12163d[_0x14ee4a([0x61,0x6c,0x67])]==_0x14ee4a([0x45,0x53,0x32,0x35,0x36])||(_0x2c08c3=!0x1);}async function _0x1e66ef(_0xbec541,_0x24e95d,_0x509fea){const _0x3c1c34=window[_0x14ee4a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x14ee4a([0x66,0x72,0x6f,0x6d])](_0x33d9aa(_0x509fea),_0x19d0a7=>_0x19d0a7[_0x14ee4a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x486bfe=new window[(_0x14ee4a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x14ee4a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xbec541+_0x14ee4a([0x2e])+_0x24e95d),_0x3889f=window[_0x14ee4a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x14ee4a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3889f)return;const _0x5ce501=await _0x3889f[_0x14ee4a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x14ee4a([0x6a,0x77,0x6b]),_0x4d158d,{[_0x14ee4a([0x6e,0x61,0x6d,0x65])]:_0x14ee4a([0x45,0x43,0x44,0x53,0x41]),[_0x14ee4a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x14ee4a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x14ee4a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3889f[_0x14ee4a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x14ee4a([0x6e,0x61,0x6d,0x65])]:_0x14ee4a([0x45,0x43,0x44,0x53,0x41]),[_0x14ee4a([0x68,0x61,0x73,0x68])]:{[_0x14ee4a([0x6e,0x61,0x6d,0x65])]:_0x14ee4a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5ce501,_0x3c1c34,_0x486bfe)||(_0x2c08c3=!0x1);}}function _0x1e48fc(_0x311ecd){return _0x311ecd[_0x14ee4a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x14ee4a([0x65,0x79]))?JSON[_0x14ee4a([0x70,0x61,0x72,0x73,0x65])](_0x33d9aa(_0x311ecd)):null;}function _0x33d9aa(_0x4995b0){return window[_0x14ee4a([0x61,0x74,0x6f,0x62])](_0x4995b0[_0x14ee4a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x14ee4a([0x2b]))[_0x14ee4a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x14ee4a([0x2f])));}function _0x2d9de7(_0x370e97){let _0x560ac2=0x1505;function _0x43a48c(_0x33f289){for(let _0x2e6aab=0x0;_0x2e6aab<_0x33f289[_0x14ee4a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e6aab++){const _0x38d8a2=_0x33f289[_0x14ee4a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2e6aab);_0x560ac2=(_0x560ac2<<0x5)+_0x560ac2+_0x38d8a2,_0x560ac2&=_0x560ac2;}}function _0x3b30c5(_0x424565){Array[_0x14ee4a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x424565)?_0x424565[_0x14ee4a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3b30c5):_0x424565&&typeof _0x424565==_0x14ee4a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x14ee4a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x424565)[_0x14ee4a([0x73,0x6f,0x72,0x74])]()[_0x14ee4a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x26df7c,_0x3a303e])=>{_0x43a48c(_0x26df7c),_0x3b30c5(_0x3a303e);}):_0x43a48c(window[_0x14ee4a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x424565));}return _0x3b30c5(_0x370e97),_0x560ac2>>>0x0;}function _0x25a717(_0x197657){return _0x197657[_0x14ee4a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x14ee4a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x14ee4a([0x30]));}function _0x1998e6(_0x1c4730){return _0x1c4730[_0x14ee4a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x14ee4a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x14ee4a([0x6a,0x6f,0x69,0x6e])]('');}function _0x247049(){}function _0x14ee4a(_0x521214){const _0x386269=_0x1298;return _0x521214[_0x386269(0xef)](_0x56c648=>String[_0x386269(0xf3)](_0x56c648))[_0x386269(0x102)]('');}_0xad6a16(await _0x17f509());}(this);}[_0x1bd54b(0x10e)](){const _0x2a4a22=_0x1bd54b,_0x2c9f12=this[_0x2a4a22(0xe4)][_0x2a4a22(0x106)][_0x2a4a22(0x105)];_0x2c9f12[_0x2a4a22(0xeb)](_0x2a4a22(0x10b))&&_0x2c9f12[_0x2a4a22(0xf8)](_0x2a4a22(0x10b),{'allowAttributes':[_0x2a4a22(0x125)]}),_0x2c9f12[_0x2a4a22(0xeb)](_0x2a4a22(0x116))&&_0x2c9f12[_0x2a4a22(0xf8)](_0x2a4a22(0x116),{'allowAttributes':[_0x2a4a22(0x125)]});}[_0x1bd54b(0xf4)](){const _0x23dbe3=_0x1bd54b,_0x290421=this[_0x23dbe3(0xe4)];_0x290421[_0x23dbe3(0x12c)][_0x23dbe3(0xfc)](_0x23dbe3(0xe5))[_0x23dbe3(0x114)]({'model':_0x23dbe3(0x125),'view':_0x23dbe3(0x12a)}),_0x290421[_0x23dbe3(0x12c)][_0x23dbe3(0xfc)](_0x23dbe3(0x110))[_0x23dbe3(0xec)]({'model':{'key':_0x23dbe3(0x125),'value':_0x285886=>_0x285886[_0x23dbe3(0xfd)](_0x23dbe3(0x12a))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5ddad7=_0x290421[_0x23dbe3(0xe3)][_0x23dbe3(0x117)](_0x23dbe3(0xf5));_0x5ddad7&&this[_0x23dbe3(0xff)](_0x5ddad7,_0x23dbe3(0xfb),(_0x159da9,[_0x33e435,_0x2ab15b])=>{const _0x43086e=_0x23dbe3;_0x33e435[_0x43086e(0x124)](_0x43086e(0x125),_0x2ab15b);});}[_0x1bd54b(0x12d)](){const _0x1b1904=_0x1bd54b,_0x34b4d3=this[_0x1b1904(0xe4)][_0x1b1904(0x11e)][_0x1b1904(0x117)](_0x1b1904(0xee))||{},_0xfde3bf=this[_0x1b1904(0xe4)][_0x1b1904(0x11e)][_0x1b1904(0x117)](_0x1b1904(0xf7))||'';this[_0x1b1904(0x10c)]=_0x109b6e(_0x2c7bcc[_0x1b1904(0xe0)],_0x1b1904(0x121),{..._0x34b4d3,'pubkey':_0xfde3bf,'ctx-name':_0x1b1904(0x122)+this[_0x1b1904(0x112)],'sourceList':'','imgOnly':_0x1b1904(0x11a),'removeCopyright':_0x1b1904(0x11a),'localeName':this[_0x1b1904(0xe4)][_0x1b1904(0x108)][_0x1b1904(0x107)],'externalSourcesEmbedCss':_0x1b1904(0x10f)}),this[_0x1b1904(0x10c)][_0x1b1904(0x11d)]=_0x2d67ff=>{const _0x583314=_0x1b1904;if(_0x583314(0x130)==_0x2d67ff)return _0x583314(0x131);},_0x2c7bcc[_0x1b1904(0xe0)][_0x1b1904(0xe8)][_0x1b1904(0x101)](this[_0x1b1904(0x10c)]);}[_0x1bd54b(0x134)](){const _0x4b5bd8=_0x1bd54b;this[_0x4b5bd8(0xfa)]=_0x109b6e(_0x2c7bcc[_0x4b5bd8(0xe0)],_0x4b5bd8(0x126),{'ctx-name':_0x4b5bd8(0x122)+this[_0x4b5bd8(0x112)]}),_0x2c7bcc[_0x4b5bd8(0xe0)][_0x4b5bd8(0xe8)][_0x4b5bd8(0x101)](this[_0x4b5bd8(0xfa)]);}[_0x1bd54b(0x111)](){const _0x575bd8=_0x1bd54b,_0x5f0ad6=this[_0x575bd8(0xe4)][_0x575bd8(0xe3)][_0x575bd8(0x117)](_0x575bd8(0xea));_0x5f0ad6&&this[_0x575bd8(0xff)](_0x5f0ad6,_0x575bd8(0x113),()=>{const _0x183f02=_0x575bd8,_0x2ebcce=this[_0x183f02(0xe4)][_0x183f02(0x106)][_0x183f02(0xe0)][_0x183f02(0xf1)][_0x183f02(0x128)]();_0x2ebcce&&_0x2ebcce[_0x183f02(0xfd)](_0x183f02(0x125))&&this[_0x183f02(0xe4)][_0x183f02(0x129)][_0x183f02(0x10a)][_0x183f02(0x12f)](_0x183f02(0x11f),()=>{const _0xa45e7c=_0x183f02;_0xca0bf5(this[_0xa45e7c(0xe4)],_0x2ebcce);});});const _0x4fe282=this[_0x575bd8(0xe4)][_0x575bd8(0xe3)][_0x575bd8(0x117)](_0x575bd8(0x109));_0x4fe282&&this[_0x575bd8(0xff)](_0x4fe282,_0x575bd8(0x113),()=>{const _0x8a302d=_0x575bd8,_0x4aec69=this[_0x8a302d(0xe4)][_0x8a302d(0x106)][_0x8a302d(0xe0)][_0x8a302d(0xf1)][_0x8a302d(0x128)]();_0x4aec69&&_0x4aec69[_0x8a302d(0xfd)](_0x8a302d(0x125))&&this[_0x8a302d(0xe4)][_0x8a302d(0x129)][_0x8a302d(0x10a)][_0x8a302d(0x12f)](_0x8a302d(0x11f),()=>{const _0x9cb252=_0x8a302d;_0xca0bf5(this[_0x9cb252(0xe4)],_0x4aec69);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x5a4979,ObservableMixin as _0x8e4ddf}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x4eea66}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4cad63}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x2bce1b}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x128a8d}from'../../utils/uploadutils.js';import{getImageUrls as _0xdef215,getImageDimension as _0x228910}from'../../utils/editingutils.js';import{isAncestor as _0x4092a8}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x8e4ddf(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1411e8,_0x5d403d,_0x251bcc){super(),this['_editor']=_0x1411e8,this['_dialog']=_0x5d403d,this['_imageElement']=_0x251bcc,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 _0x2e3cad=this['_imageElement'],_0x20c29a=_0x2e3cad['getAttribute']('uploadcareImageId'),_0x171867=_0x2e3cad['getAttribute']('src');if(_0x20c29a)await this['_loadImageInfo'](_0x20c29a,_0x171867);else{if(this['_imageCache']['has'](_0x171867)){const _0x42216e=this['_imageCache']['get'](_0x171867);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x42216e['url'],this['imageDimension']=_0x42216e['dimension'],this['imageId']=_0x42216e['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x555b9d}=this['_editor'],t=_0x555b9d['t'],_0x3dbfb4=new _0x2bce1b(_0x555b9d,this['imageStatus'],this['_attributes']);_0x3dbfb4['bind']('status')['to'](this,'imageStatus'),_0x3dbfb4['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3dbfb4['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3dbfb4['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3dbfb4,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4cad63,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3dbfb4,'position':_0x4eea66['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3dbfb4['focus']();},'onHide':()=>{_0x3dbfb4['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1ab03a=>!_0x4092a8(_0x1ab03a,_0x3dbfb4['element'])}});}['_loadImageInfo'](_0x489f2f,_0x105c38){return _0x128a8d['getInfo'](_0x489f2f,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x17d7fa=>{const {width:_0x21d452,height:_0x4e2255}=_0x17d7fa['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x105c38,this['imageDimension']={'width':_0x21d452,'height':_0x4e2255},this['imageId']=_0x489f2f;})['catch'](_0x253639=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x253639['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3c3268,_0x3d0edb){return this['_getImageAsFile'](_0x3c3268)['then'](_0x1ec569=>_0x128a8d['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':_0x3d0edb['signal'],'file':_0x1ec569,'onProgress':_0x29586e=>{_0x29586e&&_0x29586e['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x29586e['value']));}}))['then'](_0x551e20=>{const {width:_0x478c9c,height:_0x110e17}=_0x551e20['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x551e20['cdnUrl'],this['imageDimension']={'width':_0x478c9c,'height':_0x110e17},this['imageId']=_0x551e20['uuid'],this['imageUploadProgress']=null;const _0x560cbb=_0x3c3268['getAttribute']('src');this['_imageCache']['set'](_0x560cbb,{'id':_0x551e20['uuid'],'url':_0x551e20['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4cb9e6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4cb9e6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x198b59,_0x134e0d){_0x198b59['on']('apply',(_0x27b25c,_0x414e6f)=>{this['_replaceImage'](_0x134e0d,_0x414e6f['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x198b59['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x198b59['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x315947,_0x4c82f7,_0x22a323){const _0x36f157=this['_editor'],{width:_0x35f736,height:_0x427070}=_0x228910(_0x4c82f7,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x18cb36,imageSources:_0x258ed6}=_0xdef215(_0x4c82f7,_0x35f736);_0x36f157['model']['change'](_0x3109af=>{if('$graveyard'===_0x315947['root']['rootName']){_0x36f157['execute']('insertImage',{'imageType':_0x315947['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x315947['getAttributes']()),'uploadcareImageId':_0x22a323,'src':_0x18cb36,'sources':_0x258ed6,'width':_0x35f736,'height':_0x427070}});const _0x331088=_0x315947['getChildren']();_0x315947=_0x36f157['model']['document']['selection']['getSelectedElement']();for(const _0x1915d3 of _0x331088)_0x3109af['append'](_0x3109af['cloneElement'](_0x1915d3),_0x315947);}else _0x3109af['setSelection'](_0x315947,'on'),_0x36f157['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x315947['getAttributes']()),'uploadcareImageId':_0x22a323,'src':_0x18cb36,'sources':_0x258ed6,'width':_0x35f736,'height':_0x427070},_0x315947);_0x3109af['setSelection'](_0x315947,'on');});}async['_getImageAsFile'](_0x22f0f6){const _0x1b149b=_0x5a4979['window'],_0x50310e=_0x5a4979['document']['location']['href'],_0x4fe7b7=new _0x1b149b['URL'](_0x22f0f6['getAttribute']('src'),_0x50310e);if('data:'===_0x4fe7b7['protocol']){const _0x5ddee0=_0x4fe7b7['href']['split'](','),_0x1c1fd4=_0x5ddee0[0x0]['match'](/:(.*?);/)[0x1],_0x316aaf=_0x1c1fd4['split']('/')[0x1],_0xf94097=_0x1b149b['atob'](_0x5ddee0[_0x5ddee0['length']-0x1]);let _0x26676c=_0xf94097['length'];const _0x3f33ca=new _0x1b149b['Uint8Array'](_0x26676c);for(;_0x26676c--;)_0x3f33ca[_0x26676c]=_0xf94097['charCodeAt'](_0x26676c);return new _0x1b149b['File']([_0x3f33ca],'image.'+_0x316aaf,{'type':_0x1c1fd4});}const _0x4b6577=_0x4fe7b7['href']['split']('/'),_0x32e319=_0x4b6577[_0x4b6577['length']-0x1],_0xdf7ce=_0x32e319['split']('.')[0x1];return _0x1b149b['fetch'](_0x4fe7b7['href'])['then'](_0x1a5587=>_0x1a5587['clone']()['blob']())['then'](_0x284fca=>new _0x1b149b['File']([_0x284fca],_0x32e319,{'type':'image/'+_0xdf7ce}));}}
23
+ import{global as _0x1926d9,ObservableMixin as _0x581978}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x9f1512}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x115756}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x183ae8}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x2234eb}from'../../utils/uploadutils.js';import{getImageUrls as _0x308a6a,getImageDimension as _0x67e557}from'../../utils/editingutils.js';import{isAncestor as _0x2d6df3}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x581978(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3d24b6,_0x4063e2,_0x26e629){super(),this['_editor']=_0x3d24b6,this['_dialog']=_0x4063e2,this['_imageElement']=_0x26e629,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 _0x92e876=this['_imageElement'],_0x1a2d30=_0x92e876['getAttribute']('uploadcareImageId'),_0x2aa084=_0x92e876['getAttribute']('src');if(_0x1a2d30)await this['_loadImageInfo'](_0x1a2d30,_0x2aa084);else{if(this['_imageCache']['has'](_0x2aa084)){const _0x349bdf=this['_imageCache']['get'](_0x2aa084);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x349bdf['url'],this['imageDimension']=_0x349bdf['dimension'],this['imageId']=_0x349bdf['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x382833}=this['_editor'],t=_0x382833['t'],_0x2e8aa8=new _0x183ae8(_0x382833,this['imageStatus'],this['_attributes']);_0x2e8aa8['bind']('status')['to'](this,'imageStatus'),_0x2e8aa8['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2e8aa8['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2e8aa8['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2e8aa8,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x115756,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2e8aa8,'position':_0x9f1512['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2e8aa8['focus']();},'onHide':()=>{_0x2e8aa8['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x32d1de=>!_0x2d6df3(_0x32d1de,_0x2e8aa8['element'])}});}['_loadImageInfo'](_0x5cdf83,_0x26a9b8){return _0x2234eb['getInfo'](_0x5cdf83,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x237aa5=>{const {width:_0x4e2a8f,height:_0x2c2fea}=_0x237aa5['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x26a9b8,this['imageDimension']={'width':_0x4e2a8f,'height':_0x2c2fea},this['imageId']=_0x5cdf83;})['catch'](_0x3873fe=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3873fe['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x148e7c,_0x50dc05){return this['_getImageAsFile'](_0x148e7c)['then'](_0x164a37=>_0x2234eb['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':_0x50dc05['signal'],'file':_0x164a37,'onProgress':_0x39a5c6=>{_0x39a5c6&&_0x39a5c6['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x39a5c6['value']));}}))['then'](_0x256be7=>{const {width:_0x3a7c75,height:_0x2cd582}=_0x256be7['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x256be7['cdnUrl'],this['imageDimension']={'width':_0x3a7c75,'height':_0x2cd582},this['imageId']=_0x256be7['uuid'],this['imageUploadProgress']=null;const _0x518b97=_0x148e7c['getAttribute']('src');this['_imageCache']['set'](_0x518b97,{'id':_0x256be7['uuid'],'url':_0x256be7['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x145d99=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x145d99['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5e04ca,_0x321e19){_0x5e04ca['on']('apply',(_0x4ece9c,_0x51c9bc)=>{this['_replaceImage'](_0x321e19,_0x51c9bc['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5e04ca['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5e04ca['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x506a9e,_0x4e6b65,_0x21db5e){const _0x167285=this['_editor'],{width:_0x2d0e78,height:_0x4a230b}=_0x67e557(_0x4e6b65,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x171362,imageSources:_0x387528}=_0x308a6a(_0x4e6b65,_0x2d0e78);_0x167285['model']['change'](_0x440d35=>{if('$graveyard'===_0x506a9e['root']['rootName']){_0x167285['execute']('insertImage',{'imageType':_0x506a9e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x506a9e['getAttributes']()),'uploadcareImageId':_0x21db5e,'src':_0x171362,'sources':_0x387528,'width':_0x2d0e78,'height':_0x4a230b}});const _0x2964d4=_0x506a9e['getChildren']();_0x506a9e=_0x167285['model']['document']['selection']['getSelectedElement']();for(const _0x7bfe2b of _0x2964d4)_0x440d35['append'](_0x440d35['cloneElement'](_0x7bfe2b),_0x506a9e);}else _0x440d35['setSelection'](_0x506a9e,'on'),_0x167285['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x506a9e['getAttributes']()),'uploadcareImageId':_0x21db5e,'src':_0x171362,'sources':_0x387528,'width':_0x2d0e78,'height':_0x4a230b},_0x506a9e);_0x440d35['setSelection'](_0x506a9e,'on');});}async['_getImageAsFile'](_0x332512){const _0x21bd60=_0x1926d9['window'],_0x282bcf=_0x1926d9['document']['location']['href'],_0xc7acfa=new _0x21bd60['URL'](_0x332512['getAttribute']('src'),_0x282bcf);if('data:'===_0xc7acfa['protocol']){const _0x23482d=_0xc7acfa['href']['split'](','),_0x36dfb7=_0x23482d[0x0]['match'](/:(.*?);/)[0x1],_0x27a56b=_0x36dfb7['split']('/')[0x1],_0x27f536=_0x21bd60['atob'](_0x23482d[_0x23482d['length']-0x1]);let _0x41c589=_0x27f536['length'];const _0x2a1cb3=new _0x21bd60['Uint8Array'](_0x41c589);for(;_0x41c589--;)_0x2a1cb3[_0x41c589]=_0x27f536['charCodeAt'](_0x41c589);return new _0x21bd60['File']([_0x2a1cb3],'image.'+_0x27a56b,{'type':_0x36dfb7});}const _0x182314=_0xc7acfa['href']['split']('/'),_0x101440=_0x182314[_0x182314['length']-0x1],_0x4dea6f=_0x101440['split']('.')[0x1];return _0x21bd60['fetch'](_0xc7acfa['href'])['then'](_0xb9f76d=>_0xb9f76d['clone']()['blob']())['then'](_0x4e5d44=>new _0x21bd60['File']([_0x4e5d44],_0x101440,{'type':'image/'+_0x4dea6f}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x31f4(){const _0xc1419d=['setTemplate','5457240zrSkKu','624sEBAML','5237RTjUQP','4063932IyjJqv','94CwxIBM','uc-cloud-image-editor','bindTemplate','image-edit','uc-light','imageSrc','ck-uploadcare-theme','1116535rIpDRv','10iuzjBY','set','16375689cNPdfK','14552yQvazp','3236245GoWwjO'];_0x31f4=function(){return _0xc1419d;};return _0x31f4();}(function(_0x2e4c3f,_0x160889){const _0x35f1be=_0x3f05,_0x53ee69=_0x2e4c3f();while(!![]){try{const _0x33ce8a=parseInt(_0x35f1be(0x1ad))/0x1*(-parseInt(_0x35f1be(0x1af))/0x2)+-parseInt(_0x35f1be(0x1ac))/0x3*(-parseInt(_0x35f1be(0x1a8))/0x4)+parseInt(_0x35f1be(0x1a9))/0x5+parseInt(_0x35f1be(0x1ae))/0x6+-parseInt(_0x35f1be(0x1b6))/0x7+parseInt(_0x35f1be(0x1ab))/0x8+parseInt(_0x35f1be(0x1a7))/0x9*(-parseInt(_0x35f1be(0x1b7))/0xa);if(_0x33ce8a===_0x160889)break;else _0x53ee69['push'](_0x53ee69['shift']());}catch(_0x5b6694){_0x53ee69['push'](_0x53ee69['shift']());}}}(_0x31f4,0x83699));function _0x3f05(_0x48b52f,_0x5e522e){const _0x31f4c2=_0x31f4();return _0x3f05=function(_0x3f05e3,_0x56f7f8){_0x3f05e3=_0x3f05e3-0x1a6;let _0x1f8a60=_0x31f4c2[_0x3f05e3];return _0x1f8a60;},_0x3f05(_0x48b52f,_0x5e522e);}import{View as _0x377d47}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x377d47{constructor(_0x391948,_0x35c258){const _0x5f2797=_0x3f05;super(_0x391948);const _0x1a04a1=this[_0x5f2797(0x1b1)];this[_0x5f2797(0x1a6)](_0x5f2797(0x1b4),''),this[_0x5f2797(0x1aa)]({'tag':_0x5f2797(0x1b0),'attributes':{..._0x35c258,'class':[_0x5f2797(0x1b3),_0x5f2797(0x1b5)],'ctx-name':_0x5f2797(0x1b2),'cdn-url':_0x1a04a1['to'](_0x5f2797(0x1b4))}});}}
23
+ function _0x1711(){const _0x4ca18f=['4986505gZoZut','3282RFVSKv','set','443988dHSngJ','imageSrc','uc-light','uc-cloud-image-editor','5003200nlKQJD','ck-uploadcare-theme','6300324HzTjNJ','bindTemplate','2114754jHafvG','image-edit','setTemplate','14ubzGtJ','285343fKLhtO','309zBiKhQ'];_0x1711=function(){return _0x4ca18f;};return _0x1711();}function _0x53e2(_0x2ae990,_0x14175f){const _0x1711f0=_0x1711();return _0x53e2=function(_0x53e28c,_0x43a4de){_0x53e28c=_0x53e28c-0x17b;let _0x2d5221=_0x1711f0[_0x53e28c];return _0x2d5221;},_0x53e2(_0x2ae990,_0x14175f);}(function(_0x4bf889,_0x33ea2b){const _0x1cb4df=_0x53e2,_0x5987fb=_0x4bf889();while(!![]){try{const _0x594181=parseInt(_0x1cb4df(0x17e))/0x1+parseInt(_0x1cb4df(0x181))/0x2*(-parseInt(_0x1cb4df(0x17f))/0x3)+-parseInt(_0x1cb4df(0x189))/0x4+parseInt(_0x1cb4df(0x180))/0x5+-parseInt(_0x1cb4df(0x18b))/0x6*(-parseInt(_0x1cb4df(0x17d))/0x7)+parseInt(_0x1cb4df(0x187))/0x8+-parseInt(_0x1cb4df(0x183))/0x9;if(_0x594181===_0x33ea2b)break;else _0x5987fb['push'](_0x5987fb['shift']());}catch(_0x42e20a){_0x5987fb['push'](_0x5987fb['shift']());}}}(_0x1711,0xc8146));import{View as _0x33ab1c}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x33ab1c{constructor(_0x2fba27,_0x11f6de){const _0x82ca6c=_0x53e2;super(_0x2fba27);const _0x5e2f45=this[_0x82ca6c(0x18a)];this[_0x82ca6c(0x182)](_0x82ca6c(0x184),''),this[_0x82ca6c(0x17c)]({'tag':_0x82ca6c(0x186),'attributes':{..._0x11f6de,'class':[_0x82ca6c(0x185),_0x82ca6c(0x188)],'ctx-name':_0x82ca6c(0x17b),'cdn-url':_0x5e2f45['to'](_0x82ca6c(0x184))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0xa42e50}from'ckeditor5/src/icons.js';import{ButtonView as _0x1d4279,IconView as _0x3b2aa9,View as _0x31572d}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x31572d{constructor(_0x8347d1){super(_0x8347d1);const t=_0x8347d1['t'];this['set']('errorType',null);const _0x1498f0=new _0x1d4279(_0x8347d1);_0x1498f0['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1498f0['withText']=!0x0,_0x1498f0['class']='ck-button-action',_0x1498f0['on']('execute',()=>{this['fire']('retry');}),_0x1498f0['bind']('isVisible')['to'](this,'errorType',_0x19a392=>'NotFound'!==_0x19a392);const _0x50d016=new _0x3b2aa9();_0x50d016['content']=_0xa42e50,_0x50d016['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x85550=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':[_0x50d016,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x85550['to']('errorType',_0x13af95=>t('NotFound'!==_0x13af95?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1498f0]},{'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 _0x479808}from'ckeditor5/src/icons.js';import{ButtonView as _0xcfb4b3,IconView as _0x21a8dd,View as _0x1b904c}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x1b904c{constructor(_0x3a4c53){super(_0x3a4c53);const t=_0x3a4c53['t'];this['set']('errorType',null);const _0x2996e8=new _0xcfb4b3(_0x3a4c53);_0x2996e8['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2996e8['withText']=!0x0,_0x2996e8['class']='ck-button-action',_0x2996e8['on']('execute',()=>{this['fire']('retry');}),_0x2996e8['bind']('isVisible')['to'](this,'errorType',_0x532f3e=>'NotFound'!==_0x532f3e);const _0x221d34=new _0x21a8dd();_0x221d34['content']=_0x479808,_0x221d34['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x15dbf3=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':[_0x221d34,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x15dbf3['to']('errorType',_0x2e8cfa=>t('NotFound'!==_0x2e8cfa?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2996e8]},{'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'}]}]}]});}}