@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251127.0 → 0.0.0-nightly-20251129.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x3bd795,Command as _0x2b6c67}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3dae0a,IconGooglePhotos as _0x24ad2a,IconGoogleDrive as _0xfa8fa1,IconFacebook as _0x29c12c,IconDropbox as _0x4bf518,IconUploadcareLink as _0x3bf0a3,IconUploadcareImageUpload as _0x560df5,IconError as _0x5c74cf,IconUploadcareImageEdit as _0x1028ed}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x172be1,MenuBarMenuListItemButtonView as _0x34ec69,View as _0x385054,FocusCycler as _0x4a9a0f,Dialog as _0xbe1041,DialogViewPosition as _0x18301e,SpinnerView as _0x596a6a,IconView as _0x4b9e44,Notification as _0x358e78}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x192bc1,DomEmitterMixin as _0x559077,global as _0x544b6e,getAncestors as _0x347472,ObservableMixin as _0x6d5f1b,uid as _0x4dfcd6,createElement as _0x39ed0a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x522ef2}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x46c247,info as _0x2d800f}from'@uploadcare/upload-client';import*as _0x4ae532 from'@uploadcare/file-uploader';var i=function(_0x30d7ff){return _0x30d7ff['Local']='local',_0x30d7ff['URL']='url',_0x30d7ff['Dropbox']='dropbox',_0x30d7ff['GDrive']='gdrive',_0x30d7ff['Facebook']='facebook',_0x30d7ff['GPhotos']='gphotos',_0x30d7ff['OneDrive']='onedrive',_0x30d7ff;}({});function _(_0x5d7d15,_0x4333fe,_0x2826a7){const t=_0x5d7d15['t'],_0x4292f6=_0x5d7d15['t'];switch(_0x4333fe){case i['Local']:return{'text':_0x4292f6('Insert'===_0x2826a7?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4292f6('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x2826a7?_0x4292f6('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4292f6('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x4333fe;}}class e extends _0x3bd795{['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 _0x33b739=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xf820ac;for(const _0x4555ef in _0x33b739){const _0x49e04c=_0x4555ef,_0x171325=_0x33b739[_0x49e04c];if('uploadcareLicenseKeyValid'==_0x171325||'uploadcareLicenseKeyInvalid'==_0x171325||'uploadcareLicenseKeyExpired'==_0x171325||'uploadcareLicenseKeyDomainLimit'==_0x171325||'uploadcareLicenseKeyNotAllowed'==_0x171325||'uploadcareLicenseKeyEvaluationLimit'==_0x171325||'uploadcareLicenseKeyTrialLimit'==_0x171325||'uploadcareLicenseKeyUsageLimit'==_0x171325){delete _0x33b739[_0x49e04c],_0xf820ac=_0x171325,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0xf820ac&&_0x33b739['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0xf820ac&&_0x33b739['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0xf820ac&&_0x33b739['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x35068f}=this,_0x516d47=_0x35068f['commands']['get']('uploadcare');if(!_0x516d47)return;const _0x50786a=this['_normalizeConfigSourceList'](_0x35068f['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x19adb6,_0x481c65)=>{const _0x4b2f7d=this['_getIntegrationKey'](_0x481c65['type']);return _0x19adb6[_0x4b2f7d]||(_0x19adb6[_0x4b2f7d]=[]),_0x19adb6[_0x4b2f7d]['push'](_0x481c65),_0x19adb6;},{});_0x35068f['plugins']['has']('ImageInsertUI')&&_0x35068f['commands']['get']('uploadcare')&&Object['entries'](_0x50786a)['forEach'](([_0x3e2969,_0x413c6e])=>{_0x35068f['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3e2969,'observable':()=>_0x516d47,'buttonViewCreator':()=>this['_createToolbarButton'](_0x413c6e),'formViewCreator':()=>this['_createDropdownButtons'](_0x413c6e),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x413c6e),'override':'assetManager'!==_0x3e2969});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x50015c){const {locale:_0x530388}=this['editor'];return _0x50015c['map'](_0x30bcfa=>{const _0x248377=_(_0x530388,_0x30bcfa,'Insert');switch(_0x30bcfa){case i['Local']:return{'icon':_0x560df5,'type':i['Local'],..._0x248377};case i['URL']:return{'icon':_0x3bf0a3,'type':i['URL'],..._0x248377};case i['Dropbox']:return{'icon':_0x4bf518,'type':i['Dropbox'],..._0x248377};case i['Facebook']:return{'icon':_0x29c12c,'type':i['Facebook'],..._0x248377};case i['GDrive']:return{'icon':_0xfa8fa1,'type':i['GDrive'],..._0x248377};case i['GPhotos']:return{'icon':_0x24ad2a,'type':i['GPhotos'],..._0x248377};case i['OneDrive']:return{'icon':_0x3dae0a,'type':i['OneDrive'],..._0x248377};}});}['_getIntegrationKey'](_0x2fc021){switch(_0x2fc021){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0xff8cb8,_0x590adc){const _0x383734=this['editor'],_0x3cc846=new _0xff8cb8(_0x383734['locale']),_0x36d859=_0x383734['commands']['get']('uploadcare');return _0x3cc846['bind']('isEnabled')['to'](_0x36d859),_0x3cc846['on']('execute',()=>{_0x36d859['execute'](_0x590adc);}),_0x3cc846;}['_createToolbarButton'](_0x589d35){const {locale:_0x8b7ce7}=this['editor'],_0x5a25c6=this['editor']['plugins']['get']('ImageInsertUI'),_0x172860=_0x589d35[0x0],_0x5b6273=this['_createButton'](_0x172be1,_0x172860['type']);return _0x5b6273['icon']=_0x172860['icon'],_0x5b6273['bind']('label')['to'](_0x5a25c6,'isImageSelected',_0x17e2e5=>_(_0x8b7ce7,_0x172860['type'],_0x17e2e5?'Replace':'Insert')['text']),_0x5b6273['tooltip']=!0x0,_0x5b6273;}['_createDropdownButtons'](_0x102b60){const {locale:_0x13e30b}=this['editor'],_0x252573=this['editor']['plugins']['get']('ImageInsertUI');return _0x102b60['map'](_0x2cb1de=>{const _0x455264=this['_createButton'](_0x172be1,_0x2cb1de['type']);return _0x455264['withText']=!0x0,_0x455264['icon']=_0x2cb1de['icon'],_0x455264['bind']('label')['to'](_0x252573,'isImageSelected',_0x4a265b=>_(_0x13e30b,_0x2cb1de['type'],_0x4a265b?'Replace':'Insert')['text']),_0x455264;});}['_createMenuBarButtons'](_0x107e1d){return _0x107e1d['map'](_0x5375f4=>{const _0x3816fc=this['_createButton'](_0x34ec69,_0x5375f4['type']);return _0x3816fc['icon']=_0x5375f4['icon'],_0x3816fc['label']=_0x5375f4['shortText'],_0x3816fc;});}}class F extends _0x385054{['focusTracker'];['focusCycler'];constructor(_0x256c0f){super(_0x256c0f),this['focusTracker']=new _0x192bc1(),this['focusCycler']=new _0x4a9a0f({'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(_0x568102,_0x2a9651){super(_0x568102),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-'+_0x2a9651}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x47ce31,_0xb2ca9f){const _0x43ff11=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x366edc=>_0x366edc<=_0xb2ca9f)['map'](_0x236c40=>_0x47ce31['replace'](/\/$/,'')+'/-/resize/'+_0x236c40+'x/\x20'+_0x236c40+'w');return{'imageFallbackUrl':_0x47ce31,'imageSources':[{'srcset':_0x43ff11['join'](',\x20'),'sizes':'(max-width:\x20'+_0xb2ca9f+'px)\x20100vw,\x20'+_0xb2ca9f+'px','type':'image/webp'}]};}function S(_0x1c219d,_0x1d70ec,_0x1c4d0b){const _0x3f9c49=_0x1c219d['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3f9c49?parseInt(_0x3f9c49[0x1],0xa):_0x1d70ec,'height':_0x3f9c49?parseInt(_0x3f9c49[0x2],0xa):_0x1c4d0b};}function p(_0x3159ef,_0xbfc5b5){const _0x39050f=new(_0x559077())(),_0x45ee84=_0x3159ef['plugins']['get']('ImageUtils'),_0x2ca80c=_0x3159ef['editing']['mapper']['toViewElement'](_0xbfc5b5),_0x45ab31=_0x45ee84['findViewImgElement'](_0x2ca80c),_0x50d631=_0x3159ef['editing']['view']['domConverter']['viewToDom'](_0x45ab31),_0xa111f0=_0xbfc5b5['getAttribute']('width'),_0x45d168=_0xbfc5b5['getAttribute']('height'),_0x196efd='image-processing';_0x3159ef['editing']['view']['change'](_0x175a45=>{_0x175a45['addClass'](_0x196efd,_0x2ca80c),_0x175a45['setStyle']('aspect-ratio',_0xa111f0+'/'+_0x45d168,_0x45ab31);}),_0x39050f['listenTo'](_0x50d631,'load',()=>{_0x39050f['stopListening'](_0x50d631,'load'),_0x3159ef['editing']['view']['change'](_0x3f2c91=>{_0x3f2c91['removeClass'](_0x196efd,_0x2ca80c),_0x3f2c91['removeStyle']('aspect-ratio',_0x45ab31);});});}function z(_0x61fc64){if(Array['isArray'](_0x61fc64)){const _0x34575e=_0x61fc64['map'](z);return _0x5ddb4e=>_0x34575e['some'](_0x55ee74=>_0x55ee74(_0x5ddb4e));}if('origin'==_0x61fc64){const _0xc1ee5c=_0x544b6e['window']['location']['origin'];return _0x35f88f=>new URL(_0x35f88f,_0x544b6e['document']['baseURI'])['origin']==_0xc1ee5c;}return'function'==typeof _0x61fc64?_0x61fc64:_0x61fc64 instanceof RegExp?_0xca63a4=>!(!_0xca63a4['match'](_0x61fc64)&&!_0xca63a4['replace'](/^https?:\/\//,'')['match'](_0x61fc64)):()=>!0x1;}function A(_0x4ad895,_0x4205c5){return _0x347472(_0x4ad895['target'])['includes'](_0x4205c5);}class n extends/* #__PURE__ -- @preserve */
24
- _0x6d5f1b(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x6aab2c,_0x5c2b96,_0x564cd0){super(),this['_editor']=_0x6aab2c,this['_editing']=_0x5c2b96,this['_dialog']=_0x6aab2c['plugins']['get'](_0xbe1041),this['_api']=_0x5c2b96['ctxElement']['getAPI'](),this['_type']=_0x564cd0,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:_0x162c14,model:_0x23bf20}=this['_editor'],_0x2be23d=_0x23bf20['document']['selection']['getSelectedElement'](),_0x105cf7=_0x2be23d&&(_0x2be23d['is']('element','imageBlock')||_0x2be23d['is']('element','imageInline'));this['_formView']=new x(_0x162c14,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x560df5,'title':_(_0x162c14,this['_type'],_0x105cf7?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x18301e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xfe1d26=>!A(_0xfe1d26,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x3a4a6f}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x25e103=>{const _0x34f4e9=_0x3a4a6f['length'];for(const _0x105d7a of _0x3a4a6f){const _0x55104d=_0x105d7a===_0x3a4a6f[_0x34f4e9-0x1],{cdnUrl:_0x3d9e09,fileInfo:_0x2ad9db}=_0x105d7a;if(!_0x3d9e09||!_0x2ad9db)continue;const {width:_0x58ecab,height:_0x2c9ac0}=_0x2ad9db['imageInfo'],_0x34f8ed=S(_0x3d9e09,_0x58ecab,_0x2c9ac0),_0x2ad30d=C(_0x3d9e09,_0x34f8ed['width']),_0x5e981e={'id':_0x2ad9db['uuid'],'type':'image','attributes':{'imageDimension':_0x34f8ed,..._0x2ad30d}};this['_insertAsset'](_0x5e981e,_0x55104d,_0x25e103);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2c21aa=>{'idle'===_0x2c21aa['detail']['status']&&!_0x2c21aa['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0xb04f17,_0x18345a,_0x421c8){const _0x392d01=this['_editor']['model']['document']['selection'],_0x2dec84=_0x392d01['getSelectedElement'](),_0x5d0116=!(!_0x2dec84||!_0x2dec84['is']('element','imageInline'));_0x421c8['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0xb04f17,_0x5d0116),_0x18345a||_0x421c8['setSelection'](_0x392d01['getLastPosition']());}['_insertImage'](_0x2bcd11,_0x4d3831){const _0x2691d6=this['_editor'],{imageDimension:_0x1edf15,imageFallbackUrl:_0x2e5ffc,imageSources:_0x95bfc7}=_0x2bcd11['attributes'];_0x2691d6['execute']('insertImage',{'imageType':_0x4d3831?'imageInline':null,'source':{'uploadcareImageId':_0x2bcd11['id'],'src':_0x2e5ffc,'sources':_0x95bfc7,..._0x1edf15}});}}class w extends _0x2b6c67{['_editing'];['_controller']=null;static get['requires'](){return[_0xbe1041,o];}constructor(_0x1577cc){super(_0x1577cc),this['_editing']=_0x1577cc['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3195d8){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x3195d8);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x1282f9,..._0x3145de}){return _0x46c247(_0x1282f9,_0x3145de);}static['getInfo'](_0x5e5fd4,_0x4c2a34){return _0x2d800f(_0x5e5fd4,_0x4c2a34);}}class f extends _0x3bd795{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x522ef2,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1256c9=this['editor'];if(!!!_0x1256c9['config']['get']('uploadcare'))return;_0x1256c9['plugins']['get'](_0x522ef2)['createUploadAdapter']=_0x580ee8=>new k(_0x580ee8,_0x1256c9),_0x1256c9['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x14def7,{imageElement:_0x1e2bf1,data:_0xadc252})=>{_0x1256c9['model']['change'](_0x7a980e=>{_0x7a980e['setAttribute']('uploadcareImageId',_0xadc252['uploadcareImageId'],_0x1e2bf1);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x5480e3,_0x1780ee){this['loader']=_0x5480e3,this['editor']=_0x1780ee,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1d6fa7=await this['loader']['file'];return j['upload']({'file':_0x1d6fa7,'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':_0x31e7a7=>{_0x31e7a7&&_0x31e7a7['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x31e7a7['value']);}})['then'](async _0x2cdfcc=>{const {imageFallbackUrl:_0x144571,imageSources:_0x2e14f8}=C(_0x2cdfcc['cdnUrl'],_0x2cdfcc['imageInfo']['width']);return{'uploadcareImageId':_0x2cdfcc['uuid'],'default':_0x144571,'sources':_0x2e14f8};})['catch'](()=>{const _0x50d666=t('Cannot\x20upload\x20file:')+('\x20'+_0x1d6fa7['name']+'.');return Promise['reject'](_0x50d666);});}['abort'](){this['controller']['abort']();}}class o extends _0x3bd795{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0xbe1041];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0xedb602){super(_0xedb602),this['ucContextId']=_0x4dfcd6();}['init'](){const _0x287b8a=this['editor'];_0x287b8a['commands']['add']('uploadcare',new w(_0x287b8a));}['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 _0x1ed41f=_0x544b6e['document']['querySelector']('input[uploadcare-file-input]');_0x1ed41f&&_0x1ed41f['remove']();}),async function(_0x2ffe83){const _0x333a03=_0x41f30d([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]),_0x441afa=0x535f8c3a,_0x1b70b0=0x5358f672^_0x441afa,_0xc737a0=window[_0x41f30d([0x44,0x61,0x74,0x65])][_0x41f30d([0x6e,0x6f,0x77])](),_0x3b2e46=_0x2ffe83[_0x41f30d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xce099b=new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1b4350=>{_0x3b2e46[_0x41f30d([0x6f,0x6e,0x63,0x65])](_0x41f30d([0x72,0x65,0x61,0x64,0x79]),_0x1b4350);}),_0x3b3267={[_0x41f30d([0x6b,0x74,0x79])]:_0x41f30d([0x45,0x43]),[_0x41f30d([0x75,0x73,0x65])]:_0x41f30d([0x73,0x69,0x67]),[_0x41f30d([0x63,0x72,0x76])]:_0x41f30d([0x50,0x2d,0x32,0x35,0x36]),[_0x41f30d([0x78])]:_0x41f30d([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]),[_0x41f30d([0x79])]:_0x41f30d([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]),[_0x41f30d([0x61,0x6c,0x67])]:_0x41f30d([0x45,0x53,0x32,0x35,0x36])},_0x120f0f=_0x3b2e46[_0x41f30d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x41f30d([0x67,0x65,0x74])](_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x34ef0a(){let _0x1ef546,_0x3ca47c=null,_0x3bcf1c=null;try{if(_0x120f0f==_0x41f30d([0x47,0x50,0x4c]))return _0x41f30d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1ef546=_0x196b84(),!_0x1ef546)return _0x41f30d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1ef546[_0x41f30d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3bcf1c=_0x335f82(_0x1ef546[_0x41f30d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1ef546[_0x41f30d([0x6a,0x74,0x69])])),await _0x6bda32()?_0x577857()?_0x4c4788()?_0x41f30d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x12f510()?(_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41f30d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3ca47c=_0x565d69(_0x41f30d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41f30d([0x74,0x72,0x69,0x61,0x6c])&&(_0x3ca47c=_0x565d69(_0x41f30d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5261ae()):_0x41f30d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x41f30d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x41f30d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x41f30d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4c4788(){const _0x1ff132=[_0x41f30d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x41f30d([0x74,0x72,0x69,0x61,0x6c])][_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xc737a0/0x3e8:0xe10*_0x1b70b0;return _0x1ef546[_0x41f30d([0x65,0x78,0x70])]<_0x1ff132;}function _0x577857(){const _0x158a9d=_0x1ef546[_0x41f30d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x158a9d&&(!!_0x158a9d[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f30d([0x2a]))||!!_0x158a9d[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f30d([0x55,0x50,0x4c,0x43])));}function _0x12f510(){const _0x285325=_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x285325||0x0==_0x285325[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x39dde1}=new URL(window[_0x41f30d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x285325[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39dde1))return!0x0;const _0x4b02e2=_0x39dde1[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e]));return _0x285325[_0x41f30d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2ad00a=>_0x2ad00a[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f30d([0x2a])))[_0x41f30d([0x6d,0x61,0x70])](_0x5c94ca=>_0x5c94ca[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e])))[_0x41f30d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5c7de0=>_0x5c7de0[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4b02e2[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41f30d([0x6d,0x61,0x70])](_0x43b2bc=>Array(_0x4b02e2[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x43b2bc[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41f30d([0x66,0x69,0x6c,0x6c])](_0x43b2bc[0x0]===_0x41f30d([0x2a])?_0x41f30d([0x2a]):'')[_0x41f30d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x43b2bc))[_0x41f30d([0x73,0x6f,0x6d,0x65])](_0x163c19=>_0x4b02e2[_0x41f30d([0x65,0x76,0x65,0x72,0x79])]((_0x16de0b,_0x330894)=>_0x163c19[_0x330894]===_0x16de0b||_0x163c19[_0x330894]===_0x41f30d([0x2a])));}function _0x5261ae(){return _0x3ca47c&&_0x3bcf1c?new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x592825,_0x7a9da4)=>{_0x3ca47c[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x592825,_0x7a9da4),_0x3bcf1c[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x3b660d=>{_0x3b660d!=_0x41f30d([0x56,0x61,0x6c,0x69,0x64])&&_0x592825(_0x3b660d);},_0x7a9da4);}):_0x3ca47c||_0x3bcf1c||_0x41f30d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x335f82(_0x1541f5,_0x3bba52){return new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x102f10=>{if(_0x3d291b())return _0x102f10(_0x41f30d([0x56,0x61,0x6c,0x69,0x64]));_0x43731b(),_0x3b2e46[_0x41f30d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x41f30d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x203e27=!0x1;const _0x4f95aa=_0x4dfcd6();function _0x3fc86d(_0x735d93){return!!_0x735d93&&(typeof _0x735d93===_0x41f30d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x735d93===_0x41f30d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x735d93[_0x41f30d([0x74,0x68,0x65,0x6e])]===_0x41f30d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x735d93[_0x41f30d([0x63,0x61,0x74,0x63,0x68])]===_0x41f30d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x236101(_0x1ebfa5){_0x13a463(_0x1ebfa5)[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x44d8a2=>{if(!_0x44d8a2||_0x44d8a2[_0x41f30d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x41f30d([0x6f,0x6b]))return _0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4e3383(_0x3402a5(_0x4f95aa+_0x3bba52))!=_0x44d8a2[_0x41f30d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x41f30d([0x56,0x61,0x6c,0x69,0x64]);})[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x50eaf6=>(_0x44d77e(),_0x50eaf6),()=>{const _0x45b644=_0x223c5d();return null==_0x45b644?(_0x44d77e(),_0x41f30d([0x56,0x61,0x6c,0x69,0x64])):_0x41f30d(_0xc737a0-_0x45b644>(0x7753083a^_0x441afa)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x102f10)[_0x41f30d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x102f10(_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x99f2c1=0x536962ba^_0x441afa;function _0x44d77e(){const _0x2f8472=_0x41f30d([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e3383(_0x3402a5(_0x1541f5)),_0x596e94=_0x495fb9(_0x4e3383(window[_0x41f30d([0x4d,0x61,0x74,0x68])][_0x41f30d([0x63,0x65,0x69,0x6c])](_0xc737a0/_0x99f2c1)));window[_0x41f30d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41f30d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f8472,_0x596e94);}function _0x223c5d(){const _0x3be93c=_0x41f30d([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e3383(_0x3402a5(_0x1541f5)),_0x1aea26=window[_0x41f30d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41f30d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3be93c);return _0x1aea26?window[_0x41f30d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x495fb9(_0x1aea26),0x10)*_0x99f2c1:null;}function _0x13a463(_0x1547aa){return new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x8ee6f6,_0x561a16)=>{_0x1547aa[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x8ee6f6,_0x561a16),window[_0x41f30d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x561a16,0x535e58fa^_0x441afa);});}}_0x3b2e46[_0x41f30d([0x6f,0x6e])](_0x41f30d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x26ad40,_0x42f9cd)=>{if(_0x42f9cd[0x0]!=_0x1541f5)return _0x102f10(_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x42f9cd[0x1]={..._0x42f9cd[0x1],[_0x41f30d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4f95aa};},{[_0x41f30d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41f30d([0x68,0x69,0x67,0x68])}),_0x3b2e46[_0x41f30d([0x6f,0x6e])](_0x41f30d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1dcd73=>{_0x3fc86d(_0x1dcd73[_0x41f30d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x203e27=!0x0,_0x236101(_0x1dcd73[_0x41f30d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x41f30d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41f30d([0x6c,0x6f,0x77])}),_0xce099b[_0x41f30d([0x74,0x68,0x65,0x6e])](()=>{_0x203e27||_0x102f10(_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3d291b(){return _0x3b2e46[_0x41f30d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41f30d([0x76,0x69,0x65,0x77])][_0x41f30d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x41f30d([0x61,0x75,0x74,0x6f]);}function _0x43731b(){_0x3b2e46[_0x41f30d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41f30d([0x76,0x69,0x65,0x77])][_0x41f30d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x41f30d([0x61,0x75,0x74,0x6f]);}}function _0x565d69(_0x4f4186){const _0x5b48c2=[new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2fa265=>setTimeout(_0x2fa265,0x5356b2f6^_0x441afa)),_0xce099b[_0x41f30d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d5986=>{let _0x634819=0x0;_0x3b2e46[_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41f30d([0x6f,0x6e])](_0x41f30d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x44b72f,_0x58dd48)=>{_0x58dd48[0x0][_0x41f30d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x634819++,_0x634819==(0x535f8dc2^_0x441afa)&&(_0x4d5986(),_0x44b72f[_0x41f30d([0x6f,0x66,0x66])]());});}))];return window[_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x41f30d([0x72,0x61,0x63,0x65])](_0x5b48c2)[_0x41f30d([0x74,0x68,0x65,0x6e])](()=>_0x4f4186);}async function _0x568fc7(){await _0xce099b,_0x3b2e46[_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41f30d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x13beca,_0x3b2e46[_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41f30d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x13beca,_0x3b2e46[_0x41f30d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x24e709(_0x38d8fd){const _0x4b178f=_0x1af17b();_0x3b2e46[_0x4b178f]=_0x41f30d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x38d8fd,_0x38d8fd!=_0x41f30d([0x56,0x61,0x6c,0x69,0x64])&&_0x568fc7();}function _0x1af17b(){const _0x2456d1=window[_0x41f30d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x41f30d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x41f30d([0x6e,0x6f,0x77])]())[_0x41f30d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x41f30d([0x2e]),'');let _0x36bec6=_0x41f30d([0x68]);for(let _0xf69eb7=0x0;_0xf69eb7<_0x2456d1[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xf69eb7+=0x2){let _0x5e71f1=window[_0x41f30d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2456d1[_0x41f30d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xf69eb7,_0xf69eb7+0x2));_0x5e71f1>=_0x333a03[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5e71f1-=_0x333a03[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x36bec6+=_0x333a03[_0x5e71f1];}return _0x36bec6;}function _0x196b84(){const _0x4cdc2e=_0x120f0f[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e]));if(0x3!=_0x4cdc2e[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x12420b(_0x4cdc2e[0x1]);function _0x12420b(_0x3e7642){const _0x3e89ab=_0x233aa1(_0x3e7642);return _0x3e89ab&&_0x56111d()?_0x3e89ab:null;function _0x56111d(){const _0x69eedf=_0x3e89ab[_0x41f30d([0x6a,0x74,0x69])],_0x591dfd=window[_0x41f30d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x69eedf[_0x41f30d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x69eedf[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2cb47b={..._0x3e89ab,[_0x41f30d([0x6a,0x74,0x69])]:_0x69eedf[_0x41f30d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x69eedf[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2cb47b[_0x41f30d([0x76,0x63])],_0x3402a5(_0x2cb47b)==_0x591dfd;}}}async function _0x6bda32(){let _0x24c231=!0x0;try{const _0x111855=_0x120f0f[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e])),[_0x35a360,_0x246dff,_0x4ee607]=_0x111855;return _0x2a5821(_0x35a360),await _0x2a5f6f(_0x35a360,_0x246dff,_0x4ee607),_0x24c231;}catch{return!0x1;}function _0x2a5821(_0x196a83){const _0x196c16=_0x233aa1(_0x196a83);_0x196c16&&_0x196c16[_0x41f30d([0x61,0x6c,0x67])]==_0x41f30d([0x45,0x53,0x32,0x35,0x36])||(_0x24c231=!0x1);}async function _0x2a5f6f(_0x34cecc,_0x1301a3,_0x8a5f5b){const _0x4e1287=window[_0x41f30d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x41f30d([0x66,0x72,0x6f,0x6d])](_0x6a73c7(_0x8a5f5b),_0x3bd588=>_0x3bd588[_0x41f30d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x362dfc=new window[(_0x41f30d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x41f30d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x34cecc+_0x41f30d([0x2e])+_0x1301a3),_0x2195f3=window[_0x41f30d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x41f30d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2195f3)return;const _0x1345de=await _0x2195f3[_0x41f30d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x41f30d([0x6a,0x77,0x6b]),_0x3b3267,{[_0x41f30d([0x6e,0x61,0x6d,0x65])]:_0x41f30d([0x45,0x43,0x44,0x53,0x41]),[_0x41f30d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x41f30d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x41f30d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2195f3[_0x41f30d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x41f30d([0x6e,0x61,0x6d,0x65])]:_0x41f30d([0x45,0x43,0x44,0x53,0x41]),[_0x41f30d([0x68,0x61,0x73,0x68])]:{[_0x41f30d([0x6e,0x61,0x6d,0x65])]:_0x41f30d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1345de,_0x4e1287,_0x362dfc)||(_0x24c231=!0x1);}}function _0x233aa1(_0x20ee04){return _0x20ee04[_0x41f30d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x41f30d([0x65,0x79]))?JSON[_0x41f30d([0x70,0x61,0x72,0x73,0x65])](_0x6a73c7(_0x20ee04)):null;}function _0x6a73c7(_0x44e923){return window[_0x41f30d([0x61,0x74,0x6f,0x62])](_0x44e923[_0x41f30d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x41f30d([0x2b]))[_0x41f30d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x41f30d([0x2f])));}function _0x3402a5(_0x432512){let _0x4300a2=0x1505;function _0x316a1b(_0x2636f8){for(let _0x2e69fb=0x0;_0x2e69fb<_0x2636f8[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e69fb++){const _0x480a2b=_0x2636f8[_0x41f30d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2e69fb);_0x4300a2=(_0x4300a2<<0x5)+_0x4300a2+_0x480a2b,_0x4300a2&=_0x4300a2;}}function _0x392087(_0x4f7c6b){Array[_0x41f30d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f7c6b)?_0x4f7c6b[_0x41f30d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x392087):_0x4f7c6b&&typeof _0x4f7c6b==_0x41f30d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x41f30d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f7c6b)[_0x41f30d([0x73,0x6f,0x72,0x74])]()[_0x41f30d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x25122f,_0x234244])=>{_0x316a1b(_0x25122f),_0x392087(_0x234244);}):_0x316a1b(window[_0x41f30d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f7c6b));}return _0x392087(_0x432512),_0x4300a2>>>0x0;}function _0x4e3383(_0x3167d8){return _0x3167d8[_0x41f30d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x41f30d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x41f30d([0x30]));}function _0x495fb9(_0x42ea1f){return _0x42ea1f[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x41f30d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x41f30d([0x6a,0x6f,0x69,0x6e])]('');}function _0x13beca(){}function _0x41f30d(_0x2a1474){return _0x2a1474['map'](_0x147a1f=>String['fromCharCode'](_0x147a1f))['join']('');}_0x24e709(await _0x34ef0a());}(this);}['_initSchema'](){const _0x213c2b=this['editor']['model']['schema'];_0x213c2b['isRegistered']('imageBlock')&&_0x213c2b['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x213c2b['isRegistered']('imageInline')&&_0x213c2b['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5bd22a=this['editor'];_0x5bd22a['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5bd22a['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x4bd8dd=>_0x4bd8dd['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x21ddf9=_0x5bd22a['commands']['get']('replaceImageSource');_0x21ddf9&&this['listenTo'](_0x21ddf9,'cleanupImage',(_0x5ca11b,[_0x4bfb17,_0x28b239])=>{_0x4bfb17['removeAttribute']('uploadcareImageId',_0x28b239);});}['_initConfig'](){const _0x7bf39d=this['editor']['config']['get']('uploadcare.uploader')||{},_0x5b9776=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x39ed0a(_0x544b6e['document'],'uc-config',{..._0x7bf39d,'pubkey':_0x5b9776,'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']=_0x383376=>{if('closeMax'==_0x383376)return'#uc-icon-arrow-down';},_0x544b6e['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x39ed0a(_0x544b6e['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x544b6e['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x54c9cb=this['editor']['commands']['get']('insertImage');_0x54c9cb&&this['listenTo'](_0x54c9cb,'execute',()=>{const _0x557c14=this['editor']['model']['document']['selection']['getSelectedElement']();_0x557c14&&_0x557c14['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x557c14);});});const _0x225e0b=this['editor']['commands']['get']('uploadcareImageReplace');_0x225e0b&&this['listenTo'](_0x225e0b,'execute',()=>{const _0x509f6c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x509f6c&&_0x509f6c['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x509f6c);});});}}class tt extends _0x3bd795{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe0f7bd){super(_0xe0f7bd),_0xe0f7bd['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4ae532['defineComponents'](_0x4ae532),this['_defineLocale']();}['_defineLocale'](){const _0x279839=this['editor']['config']['get']('uploadcare.locale'),_0x484951=this['editor']['locale']['contentLanguage'];_0x279839&&_0x4ae532['defineLocale'](_0x484951,_0x279839);}}class ii extends _0x385054{constructor(_0x37558d){super(_0x37558d);const t=_0x37558d['t'],_0x4fa1b5=this['bindTemplate'],_0x108a0e=new _0x596a6a();_0x108a0e['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':[_0x108a0e,{'text':_0x4fa1b5['to']('imageUploadProgress',_0x19d08c=>t('Loading\x20image...')+'\x20('+(_0x19d08c||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 _0x385054{constructor(_0x2b5520){super(_0x2b5520);const t=_0x2b5520['t'];this['set']('errorType',null);const _0x4bab26=new _0x172be1(_0x2b5520);_0x4bab26['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4bab26['withText']=!0x0,_0x4bab26['class']='ck-button-action',_0x4bab26['on']('execute',()=>{this['fire']('retry');}),_0x4bab26['bind']('isVisible')['to'](this,'errorType',_0x5337a0=>'NotFound'!==_0x5337a0);const _0x34de5e=new _0x4b9e44();_0x34de5e['content']=_0x5c74cf,_0x34de5e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x73ad67=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':[_0x34de5e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x73ad67['to']('errorType',_0x3083e7=>t('NotFound'!==_0x3083e7?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4bab26]},{'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 _0x385054{constructor(_0x4540e6,_0x1c8c0f){super(_0x4540e6);const _0x2d11c1=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1c8c0f,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2d11c1['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x30431b,_0xcd9896,_0x5cfec4){super(_0x30431b),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x30431b),this['_errorView']=new ti(_0x30431b),this['_editingView']=new ei(_0x30431b,_0x5cfec4),this['_focusableView']=new _0x385054(_0x30431b),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0xcd9896),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'],_0x1f1eb1=>{this['_addUploadcareImageEditorListeners'](_0x1f1eb1);});}),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'](_0x54c163,_0x328acb){const _0x475d94='uc-cloud-image-editor',_0x445a0e=_0x54c163['querySelector'](_0x475d94);if(_0x445a0e)return _0x328acb(_0x445a0e);const _0x442508=new MutationObserver(_0x26e307=>{const _0x5ddffd=_0x26e307['filter'](_0x37ab30=>_0x37ab30['target']===_0x54c163&&_0x37ab30['addedNodes']['length']>0x0&&_0x37ab30['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x475d94);_0x5ddffd['length']&&(_0x442508['disconnect'](),_0x328acb(_0x5ddffd[0x0]['addedNodes'][0x0]));});_0x442508['observe'](_0x54c163,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0xb24aae){_0xb24aae['addEventListener']('apply',_0x30e50b=>{this['fire']('apply',{'imageSrc':_0x30e50b['detail']['cdnUrl']});}),_0xb24aae['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
- _0x6d5f1b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x37ad70,_0x32b919,_0x4da984){super(),this['_editor']=_0x37ad70,this['_dialog']=_0x32b919,this['_imageElement']=_0x4da984,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 _0x39fd0e=this['_imageElement'],_0x5d4e54=_0x39fd0e['getAttribute']('uploadcareImageId'),_0x2112b9=_0x39fd0e['getAttribute']('src');if(_0x5d4e54)await this['_loadImageInfo'](_0x5d4e54,_0x2112b9);else{if(this['_imageCache']['has'](_0x2112b9)){const _0x6e9576=this['_imageCache']['get'](_0x2112b9);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x6e9576['url'],this['imageDimension']=_0x6e9576['dimension'],this['imageId']=_0x6e9576['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x561ebf}=this['_editor'],t=_0x561ebf['t'],_0x1c1a9d=new X(_0x561ebf,this['imageStatus'],this['_attributes']);_0x1c1a9d['bind']('status')['to'](this,'imageStatus'),_0x1c1a9d['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1c1a9d['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1c1a9d['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1c1a9d,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1028ed,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1c1a9d,'position':_0x18301e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1c1a9d['focus']();},'onHide':()=>{_0x1c1a9d['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xf1909=>!A(_0xf1909,_0x1c1a9d['element'])}});}['_loadImageInfo'](_0x2cacd0,_0xc4a8a3){return j['getInfo'](_0x2cacd0,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x13bbb4=>{const {width:_0x479b53,height:_0x8e0da6}=_0x13bbb4['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xc4a8a3,this['imageDimension']={'width':_0x479b53,'height':_0x8e0da6},this['imageId']=_0x2cacd0;})['catch'](_0x4b710a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4b710a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x26635d,_0x191805){return this['_getImageAsFile'](_0x26635d)['then'](_0xd203a2=>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':_0x191805['signal'],'file':_0xd203a2,'onProgress':_0x2430dc=>{_0x2430dc&&_0x2430dc['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2430dc['value']));}}))['then'](_0x337a8b=>{const {width:_0x100e40,height:_0x5e1dc9}=_0x337a8b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x337a8b['cdnUrl'],this['imageDimension']={'width':_0x100e40,'height':_0x5e1dc9},this['imageId']=_0x337a8b['uuid'],this['imageUploadProgress']=null;const _0x3743ad=_0x26635d['getAttribute']('src');this['_imageCache']['set'](_0x3743ad,{'id':_0x337a8b['uuid'],'url':_0x337a8b['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x490b03=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x490b03['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x194190,_0x26f3aa){_0x194190['on']('apply',(_0x3c7441,_0x4aa2af)=>{this['_replaceImage'](_0x26f3aa,_0x4aa2af['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x194190['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x194190['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2e0481,_0x4929e1,_0x58d05f){const _0x2f7900=this['_editor'],{width:_0x23ea04,height:_0x54022c}=S(_0x4929e1,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3bbb66,imageSources:_0x1d7852}=C(_0x4929e1,_0x23ea04);_0x2f7900['model']['change'](_0x34dc05=>{if('$graveyard'===_0x2e0481['root']['rootName']){_0x2f7900['execute']('insertImage',{'imageType':_0x2e0481['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2e0481['getAttributes']()),'uploadcareImageId':_0x58d05f,'src':_0x3bbb66,'sources':_0x1d7852,'width':_0x23ea04,'height':_0x54022c}});const _0x51498b=_0x2e0481['getChildren']();_0x2e0481=_0x2f7900['model']['document']['selection']['getSelectedElement']();for(const _0x155205 of _0x51498b)_0x34dc05['append'](_0x34dc05['cloneElement'](_0x155205),_0x2e0481);}else _0x34dc05['setSelection'](_0x2e0481,'on'),_0x2f7900['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2e0481['getAttributes']()),'uploadcareImageId':_0x58d05f,'src':_0x3bbb66,'sources':_0x1d7852,'width':_0x23ea04,'height':_0x54022c},_0x2e0481);_0x34dc05['setSelection'](_0x2e0481,'on');});}async['_getImageAsFile'](_0x4f4de7){const _0x3522ba=_0x544b6e['window'],_0x12e2d6=_0x544b6e['document']['location']['href'],_0x36da8a=new _0x3522ba['URL'](_0x4f4de7['getAttribute']('src'),_0x12e2d6);if('data:'===_0x36da8a['protocol']){const _0x25e496=_0x36da8a['href']['split'](','),_0x1f554c=_0x25e496[0x0]['match'](/:(.*?);/)[0x1],_0x1eecae=_0x1f554c['split']('/')[0x1],_0x23a437=_0x3522ba['atob'](_0x25e496[_0x25e496['length']-0x1]);let _0x5bfd7b=_0x23a437['length'];const _0x1457cf=new _0x3522ba['Uint8Array'](_0x5bfd7b);for(;_0x5bfd7b--;)_0x1457cf[_0x5bfd7b]=_0x23a437['charCodeAt'](_0x5bfd7b);return new _0x3522ba['File']([_0x1457cf],'image.'+_0x1eecae,{'type':_0x1f554c});}const _0x43201c=_0x36da8a['href']['split']('/'),_0x3475b0=_0x43201c[_0x43201c['length']-0x1],_0x545338=_0x3475b0['split']('.')[0x1];return _0x3522ba['fetch'](_0x36da8a['href'])['then'](_0x4f685e=>_0x4f685e['clone']()['blob']())['then'](_0x3cf134=>new _0x3522ba['File']([_0x3cf134],_0x3475b0,{'type':'image/'+_0x545338}));}}class Q extends _0x2b6c67{['imageEditController'];static get['requires'](){return[_0xbe1041];}['_isEditable'];constructor(_0x232cd2){super(_0x232cd2),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x2ef950){const _0x5b118a=z(_0x2ef950);return _0x53e78f=>!(!_0x53e78f||!_0x53e78f['is']('element','imageBlock')&&!_0x53e78f['is']('element','imageInline'))&&(!!_0x53e78f['hasAttribute']('uploadcareImageId')||!!_0x53e78f['hasAttribute']('src')&&_0x5b118a(_0x53e78f['getAttribute']('src')));}(_0x232cd2['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x17b984=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x17b984);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5a5383=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5a5383&&(_0x5a5383['is']('element','imageBlock')||_0x5a5383['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0xbe1041),_0x5a5383),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x2b6c67{['refresh'](){const _0x32dbef=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x32dbef&&(_0x32dbef['is']('element','imageBlock')||_0x32dbef['is']('element','imageInline')));}['execute'](_0x15d4eb){const _0x2a6bbf=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5e8d91=>{_0x5e8d91['setAttributes'](_0x15d4eb,_0x2a6bbf),_0x5e8d91['removeAttribute']('srcset',_0x2a6bbf),_0x5e8d91['removeAttribute']('sizes',_0x2a6bbf);});}}class m extends _0x3bd795{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x358e78,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4f3937}=this;_0x4f3937['commands']['add']('uploadcareImageEdit',new Q(_0x4f3937)),_0x4f3937['commands']['add']('uploadcareImageReplace',new V(_0x4f3937));}}class g extends _0x3bd795{['_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 _0x2fb395=this['editor'];_0x2fb395['ui']['componentFactory']['add']('uploadcareImageEdit',_0x403102=>{const _0x31b923=_0x2fb395['commands']['get']('uploadcareImageEdit'),_0x421082=new _0x172be1(_0x403102),t=_0x403102['t'];return _0x421082['set']({'icon':_0x1028ed,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x421082['bind']('isEnabled')['to'](_0x31b923),_0x421082['bind']('isOn')['to'](_0x31b923,'isActive'),this['listenTo'](_0x421082,'execute',()=>{_0x2fb395['execute']('uploadcareImageEdit'),_0x2fb395['editing']['view']['focus']();}),_0x421082;}),this['_initConfig']();}['_initConfig'](){const _0x438f5a=_0x39ed0a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x438f5a),this['listenTo'](this['editor'],'destroy',()=>{_0x438f5a['remove']();});}}class et extends _0x3bd795{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
23
+ import{Plugin as _0x20fef7,Command as _0x252380}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x461cd9,IconGooglePhotos as _0x286a4b,IconGoogleDrive as _0x4dab0,IconFacebook as _0x95ae7b,IconDropbox as _0x54af93,IconUploadcareLink as _0x2af3a1,IconUploadcareImageUpload as _0x24b477,IconError as _0x71f2d3,IconUploadcareImageEdit as _0x2e734e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x166585,MenuBarMenuListItemButtonView as _0x1ad5fb,View as _0x168403,FocusCycler as _0x25b54f,Dialog as _0x289807,DialogViewPosition as _0x59eb6a,SpinnerView as _0x1fdc1f,IconView as _0x1d7b20,Notification as _0x2654f3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x58f0e2,DomEmitterMixin as _0x323d1a,global as _0x1424b6,getAncestors as _0x54da65,ObservableMixin as _0xf74261,uid as _0x484902,createElement as _0x62c1a3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x138367}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x48d7e6,info as _0x3c3b62}from'@uploadcare/upload-client';import*as _0x4fc6b from'@uploadcare/file-uploader';var i=function(_0x328e9d){return _0x328e9d['Local']='local',_0x328e9d['URL']='url',_0x328e9d['Dropbox']='dropbox',_0x328e9d['GDrive']='gdrive',_0x328e9d['Facebook']='facebook',_0x328e9d['GPhotos']='gphotos',_0x328e9d['OneDrive']='onedrive',_0x328e9d;}({});function _(_0x1c98ed,_0x14e7b6,_0xc4a2c8){const t=_0x1c98ed['t'],_0x486bda=_0x1c98ed['t'];switch(_0x14e7b6){case i['Local']:return{'text':_0x486bda('Insert'===_0xc4a2c8?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x486bda('From\x20computer')};case i['URL']:return{'text':'Insert'===_0xc4a2c8?_0x486bda('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x486bda('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0xc4a2c8?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x14e7b6;}}class e extends _0x20fef7{['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 _0x12b686=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x48659f;for(const _0x461e70 in _0x12b686){const _0x28b623=_0x461e70,_0x665365=_0x12b686[_0x28b623];if('uploadcareLicenseKeyValid'==_0x665365||'uploadcareLicenseKeyInvalid'==_0x665365||'uploadcareLicenseKeyExpired'==_0x665365||'uploadcareLicenseKeyDomainLimit'==_0x665365||'uploadcareLicenseKeyNotAllowed'==_0x665365||'uploadcareLicenseKeyEvaluationLimit'==_0x665365||'uploadcareLicenseKeyTrialLimit'==_0x665365||'uploadcareLicenseKeyUsageLimit'==_0x665365){delete _0x12b686[_0x28b623],_0x48659f=_0x665365,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x48659f&&_0x12b686['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x48659f&&_0x12b686['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x48659f&&_0x12b686['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x48659f&&_0x12b686['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x48659f&&_0x12b686['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x48659f&&_0x12b686['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x48659f&&_0x12b686['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0xeabdd2}=this,_0xeb4009=_0xeabdd2['commands']['get']('uploadcare');if(!_0xeb4009)return;const _0x4086b9=this['_normalizeConfigSourceList'](_0xeabdd2['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4a6f42,_0x5034ab)=>{const _0x731afe=this['_getIntegrationKey'](_0x5034ab['type']);return _0x4a6f42[_0x731afe]||(_0x4a6f42[_0x731afe]=[]),_0x4a6f42[_0x731afe]['push'](_0x5034ab),_0x4a6f42;},{});_0xeabdd2['plugins']['has']('ImageInsertUI')&&_0xeabdd2['commands']['get']('uploadcare')&&Object['entries'](_0x4086b9)['forEach'](([_0x47f5c1,_0x24e5a9])=>{_0xeabdd2['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x47f5c1,'observable':()=>_0xeb4009,'buttonViewCreator':()=>this['_createToolbarButton'](_0x24e5a9),'formViewCreator':()=>this['_createDropdownButtons'](_0x24e5a9),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x24e5a9),'override':'assetManager'!==_0x47f5c1});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x43d232){const {locale:_0x264026}=this['editor'];return _0x43d232['map'](_0x1a9700=>{const _0x361fff=_(_0x264026,_0x1a9700,'Insert');switch(_0x1a9700){case i['Local']:return{'icon':_0x24b477,'type':i['Local'],..._0x361fff};case i['URL']:return{'icon':_0x2af3a1,'type':i['URL'],..._0x361fff};case i['Dropbox']:return{'icon':_0x54af93,'type':i['Dropbox'],..._0x361fff};case i['Facebook']:return{'icon':_0x95ae7b,'type':i['Facebook'],..._0x361fff};case i['GDrive']:return{'icon':_0x4dab0,'type':i['GDrive'],..._0x361fff};case i['GPhotos']:return{'icon':_0x286a4b,'type':i['GPhotos'],..._0x361fff};case i['OneDrive']:return{'icon':_0x461cd9,'type':i['OneDrive'],..._0x361fff};}});}['_getIntegrationKey'](_0x344d30){switch(_0x344d30){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x46ce00,_0x5df03d){const _0x5e4030=this['editor'],_0x4e6f93=new _0x46ce00(_0x5e4030['locale']),_0x3225bf=_0x5e4030['commands']['get']('uploadcare');return _0x4e6f93['bind']('isEnabled')['to'](_0x3225bf),_0x4e6f93['on']('execute',()=>{_0x3225bf['execute'](_0x5df03d);}),_0x4e6f93;}['_createToolbarButton'](_0x2997ee){const {locale:_0x3ffdd2}=this['editor'],_0x18dbe3=this['editor']['plugins']['get']('ImageInsertUI'),_0x15496c=_0x2997ee[0x0],_0x2a96be=this['_createButton'](_0x166585,_0x15496c['type']);return _0x2a96be['icon']=_0x15496c['icon'],_0x2a96be['bind']('label')['to'](_0x18dbe3,'isImageSelected',_0x3a7ba7=>_(_0x3ffdd2,_0x15496c['type'],_0x3a7ba7?'Replace':'Insert')['text']),_0x2a96be['tooltip']=!0x0,_0x2a96be;}['_createDropdownButtons'](_0x59843b){const {locale:_0x36ad6b}=this['editor'],_0x3a5f34=this['editor']['plugins']['get']('ImageInsertUI');return _0x59843b['map'](_0x2e7287=>{const _0x47bd01=this['_createButton'](_0x166585,_0x2e7287['type']);return _0x47bd01['withText']=!0x0,_0x47bd01['icon']=_0x2e7287['icon'],_0x47bd01['bind']('label')['to'](_0x3a5f34,'isImageSelected',_0x3db811=>_(_0x36ad6b,_0x2e7287['type'],_0x3db811?'Replace':'Insert')['text']),_0x47bd01;});}['_createMenuBarButtons'](_0x5e8d78){return _0x5e8d78['map'](_0x5caeb5=>{const _0x32ebcc=this['_createButton'](_0x1ad5fb,_0x5caeb5['type']);return _0x32ebcc['icon']=_0x5caeb5['icon'],_0x32ebcc['label']=_0x5caeb5['shortText'],_0x32ebcc;});}}class F extends _0x168403{['focusTracker'];['focusCycler'];constructor(_0x2e592e){super(_0x2e592e),this['focusTracker']=new _0x58f0e2(),this['focusCycler']=new _0x25b54f({'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(_0x26f942,_0x31008a){super(_0x26f942),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-'+_0x31008a}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x375325,_0x1a7063){const _0x23572d=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x36f375=>_0x36f375<=_0x1a7063)['map'](_0x586b2f=>_0x375325['replace'](/\/$/,'')+'/-/resize/'+_0x586b2f+'x/\x20'+_0x586b2f+'w');return{'imageFallbackUrl':_0x375325,'imageSources':[{'srcset':_0x23572d['join'](',\x20'),'sizes':'(max-width:\x20'+_0x1a7063+'px)\x20100vw,\x20'+_0x1a7063+'px','type':'image/webp'}]};}function S(_0x269143,_0x1bcd55,_0xb7451b){const _0x3e5b13=_0x269143['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3e5b13?parseInt(_0x3e5b13[0x1],0xa):_0x1bcd55,'height':_0x3e5b13?parseInt(_0x3e5b13[0x2],0xa):_0xb7451b};}function p(_0x4208ca,_0x5e8eeb){const _0x382053=new(_0x323d1a())(),_0x3952c0=_0x4208ca['plugins']['get']('ImageUtils'),_0x348318=_0x4208ca['editing']['mapper']['toViewElement'](_0x5e8eeb),_0x3c2045=_0x3952c0['findViewImgElement'](_0x348318),_0x58881f=_0x4208ca['editing']['view']['domConverter']['viewToDom'](_0x3c2045),_0x508375=_0x5e8eeb['getAttribute']('width'),_0x308ffa=_0x5e8eeb['getAttribute']('height'),_0x235f1b='image-processing';_0x4208ca['editing']['view']['change'](_0x38536a=>{_0x38536a['addClass'](_0x235f1b,_0x348318),_0x38536a['setStyle']('aspect-ratio',_0x508375+'/'+_0x308ffa,_0x3c2045);}),_0x382053['listenTo'](_0x58881f,'load',()=>{_0x382053['stopListening'](_0x58881f,'load'),_0x4208ca['editing']['view']['change'](_0x27f22f=>{_0x27f22f['removeClass'](_0x235f1b,_0x348318),_0x27f22f['removeStyle']('aspect-ratio',_0x3c2045);});});}function G(_0x313861){if(Array['isArray'](_0x313861)){const _0x4c8148=_0x313861['map'](G);return _0x47e8ec=>_0x4c8148['some'](_0x54e8ac=>_0x54e8ac(_0x47e8ec));}if('origin'==_0x313861){const _0x512d0e=_0x1424b6['window']['location']['origin'];return _0x43c0dc=>new URL(_0x43c0dc,_0x1424b6['document']['baseURI'])['origin']==_0x512d0e;}return'function'==typeof _0x313861?_0x313861:_0x313861 instanceof RegExp?_0x9c4f3d=>!(!_0x9c4f3d['match'](_0x313861)&&!_0x9c4f3d['replace'](/^https?:\/\//,'')['match'](_0x313861)):()=>!0x1;}function A(_0x11f9e6,_0x1f006d){return _0x54da65(_0x11f9e6['target'])['includes'](_0x1f006d);}class n extends/* #__PURE__ -- @preserve */
24
+ _0xf74261(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x15262d,_0x3467f9,_0x266d00){super(),this['_editor']=_0x15262d,this['_editing']=_0x3467f9,this['_dialog']=_0x15262d['plugins']['get'](_0x289807),this['_api']=_0x3467f9['ctxElement']['getAPI'](),this['_type']=_0x266d00,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:_0x3a4b4e,model:_0x41e4aa}=this['_editor'],_0x281e98=_0x41e4aa['document']['selection']['getSelectedElement'](),_0x170376=_0x281e98&&(_0x281e98['is']('element','imageBlock')||_0x281e98['is']('element','imageInline'));this['_formView']=new x(_0x3a4b4e,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x24b477,'title':_(_0x3a4b4e,this['_type'],_0x170376?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x59eb6a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x305195=>!A(_0x305195,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x4e1b4}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4ebecf=>{const _0x46b56c=_0x4e1b4['length'];for(const _0x412b8f of _0x4e1b4){const _0x14eac4=_0x412b8f===_0x4e1b4[_0x46b56c-0x1],{cdnUrl:_0x39c697,fileInfo:_0x4ecd3a}=_0x412b8f;if(!_0x39c697||!_0x4ecd3a)continue;const {width:_0x41c240,height:_0x1902e3}=_0x4ecd3a['imageInfo'],_0xd088cb=S(_0x39c697,_0x41c240,_0x1902e3),_0x20d364=C(_0x39c697,_0xd088cb['width']),_0x59eb5c={'id':_0x4ecd3a['uuid'],'type':'image','attributes':{'imageDimension':_0xd088cb,..._0x20d364}};this['_insertAsset'](_0x59eb5c,_0x14eac4,_0x4ebecf);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x15507e=>{'idle'===_0x15507e['detail']['status']&&!_0x15507e['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x458b13,_0x52def5,_0x4de6da){const _0x3b980e=this['_editor']['model']['document']['selection'],_0xb4d778=_0x3b980e['getSelectedElement'](),_0x3b2752=!(!_0xb4d778||!_0xb4d778['is']('element','imageInline'));_0x4de6da['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x458b13,_0x3b2752),_0x52def5||_0x4de6da['setSelection'](_0x3b980e['getLastPosition']());}['_insertImage'](_0x1063a6,_0x207ffc){const _0x5851d4=this['_editor'],{imageDimension:_0x1cf5e6,imageFallbackUrl:_0x4b886a,imageSources:_0x5c1c6}=_0x1063a6['attributes'];_0x5851d4['execute']('insertImage',{'imageType':_0x207ffc?'imageInline':null,'source':{'uploadcareImageId':_0x1063a6['id'],'src':_0x4b886a,'sources':_0x5c1c6,..._0x1cf5e6}});}}class w extends _0x252380{['_editing'];['_controller']=null;static get['requires'](){return[_0x289807,o];}constructor(_0x5b2e6a){super(_0x5b2e6a),this['_editing']=_0x5b2e6a['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x25d175){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x25d175);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x5ba274,..._0x113e8c}){return _0x48d7e6(_0x5ba274,_0x113e8c);}static['getInfo'](_0x332ca1,_0x532ba0){return _0x3c3b62(_0x332ca1,_0x532ba0);}}class f extends _0x20fef7{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x138367,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x11708c=this['editor'];if(!!!_0x11708c['config']['get']('uploadcare'))return;_0x11708c['plugins']['get'](_0x138367)['createUploadAdapter']=_0x4649c9=>new k(_0x4649c9,_0x11708c),_0x11708c['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x1dca1d,{imageElement:_0x2ccee3,data:_0x50d893})=>{_0x11708c['model']['change'](_0x3165f6=>{_0x3165f6['setAttribute']('uploadcareImageId',_0x50d893['uploadcareImageId'],_0x2ccee3);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x4f318a,_0x1d6897){this['loader']=_0x4f318a,this['editor']=_0x1d6897,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0xb7e544=await this['loader']['file'];return j['upload']({'file':_0xb7e544,'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':_0x1e1e3d=>{_0x1e1e3d&&_0x1e1e3d['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x1e1e3d['value']);}})['then'](async _0x373240=>{const {imageFallbackUrl:_0x221614,imageSources:_0xcf459}=C(_0x373240['cdnUrl'],_0x373240['imageInfo']['width']);return{'uploadcareImageId':_0x373240['uuid'],'default':_0x221614,'sources':_0xcf459};})['catch'](()=>{const _0x4893db=t('Cannot\x20upload\x20file:')+('\x20'+_0xb7e544['name']+'.');return Promise['reject'](_0x4893db);});}['abort'](){this['controller']['abort']();}}class o extends _0x20fef7{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x289807];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x4606bf){super(_0x4606bf),this['ucContextId']=_0x484902();}['init'](){const _0x55d78b=this['editor'];_0x55d78b['commands']['add']('uploadcare',new w(_0x55d78b));}['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 _0x29602d=_0x1424b6['document']['querySelector']('input[uploadcare-file-input]');_0x29602d&&_0x29602d['remove']();}),async function(_0x4cccb1){const _0x361c58=_0x24e524([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]),_0x48843c=0x535f8c3a,_0x2604e1=0x5358f642^_0x48843c,_0x132163=window[_0x24e524([0x44,0x61,0x74,0x65])][_0x24e524([0x6e,0x6f,0x77])](),_0x9fba3c=_0x4cccb1[_0x24e524([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xc8ed69=new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x513c40=>{_0x9fba3c[_0x24e524([0x6f,0x6e,0x63,0x65])](_0x24e524([0x72,0x65,0x61,0x64,0x79]),_0x513c40);}),_0x5d1f90={[_0x24e524([0x6b,0x74,0x79])]:_0x24e524([0x45,0x43]),[_0x24e524([0x75,0x73,0x65])]:_0x24e524([0x73,0x69,0x67]),[_0x24e524([0x63,0x72,0x76])]:_0x24e524([0x50,0x2d,0x32,0x35,0x36]),[_0x24e524([0x78])]:_0x24e524([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]),[_0x24e524([0x79])]:_0x24e524([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]),[_0x24e524([0x61,0x6c,0x67])]:_0x24e524([0x45,0x53,0x32,0x35,0x36])},_0x2c3993=_0x9fba3c[_0x24e524([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x24e524([0x67,0x65,0x74])](_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x561ba0(){let _0x485a39,_0x54df64=null,_0x90be0=null;try{if(_0x2c3993==_0x24e524([0x47,0x50,0x4c]))return _0x24e524([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x485a39=_0x423a8c(),!_0x485a39)return _0x24e524([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x485a39[_0x24e524([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x90be0=_0x486ad7(_0x485a39[_0x24e524([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x485a39[_0x24e524([0x6a,0x74,0x69])])),await _0x4d5f69()?_0x2269ed()?_0x50f8bb()?_0x24e524([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x394d81()?(_0x485a39[_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x24e524([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x54df64=_0x19e8eb(_0x24e524([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x485a39[_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x24e524([0x74,0x72,0x69,0x61,0x6c])&&(_0x54df64=_0x19e8eb(_0x24e524([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1f2a13()):_0x24e524([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x24e524([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x24e524([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x24e524([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x50f8bb(){const _0x49b66a=[_0x24e524([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x24e524([0x74,0x72,0x69,0x61,0x6c])][_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x485a39[_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x132163/0x3e8:0xe10*_0x2604e1;return _0x485a39[_0x24e524([0x65,0x78,0x70])]<_0x49b66a;}function _0x2269ed(){const _0x4c610=_0x485a39[_0x24e524([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4c610&&(!!_0x4c610[_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24e524([0x2a]))||!!_0x4c610[_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24e524([0x55,0x50,0x4c,0x43])));}function _0x394d81(){const _0x361d3e=_0x485a39[_0x24e524([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x361d3e||0x0==_0x361d3e[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5034c6}=new URL(window[_0x24e524([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x361d3e[_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5034c6))return!0x0;const _0x46464b=_0x5034c6[_0x24e524([0x73,0x70,0x6c,0x69,0x74])](_0x24e524([0x2e]));return _0x361d3e[_0x24e524([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x41a904=>_0x41a904[_0x24e524([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x24e524([0x2a])))[_0x24e524([0x6d,0x61,0x70])](_0x4d9b74=>_0x4d9b74[_0x24e524([0x73,0x70,0x6c,0x69,0x74])](_0x24e524([0x2e])))[_0x24e524([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x188e1c=>_0x188e1c[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x46464b[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24e524([0x6d,0x61,0x70])](_0x6b6f4f=>Array(_0x46464b[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x6b6f4f[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x24e524([0x66,0x69,0x6c,0x6c])](_0x6b6f4f[0x0]===_0x24e524([0x2a])?_0x24e524([0x2a]):'')[_0x24e524([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x6b6f4f))[_0x24e524([0x73,0x6f,0x6d,0x65])](_0x4b9f59=>_0x46464b[_0x24e524([0x65,0x76,0x65,0x72,0x79])]((_0x59ba85,_0x319302)=>_0x4b9f59[_0x319302]===_0x59ba85||_0x4b9f59[_0x319302]===_0x24e524([0x2a])));}function _0x1f2a13(){return _0x54df64&&_0x90be0?new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x542b57,_0x2cff7d)=>{_0x54df64[_0x24e524([0x74,0x68,0x65,0x6e])](_0x542b57,_0x2cff7d),_0x90be0[_0x24e524([0x74,0x68,0x65,0x6e])](_0x35e7e0=>{_0x35e7e0!=_0x24e524([0x56,0x61,0x6c,0x69,0x64])&&_0x542b57(_0x35e7e0);},_0x2cff7d);}):_0x54df64||_0x90be0||_0x24e524([0x56,0x61,0x6c,0x69,0x64]);}}function _0x486ad7(_0x3fee39,_0x35692f){return new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xef874d=>{if(_0x313c53())return _0xef874d(_0x24e524([0x56,0x61,0x6c,0x69,0x64]));_0x2df828(),_0x9fba3c[_0x24e524([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x24e524([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x230e55=!0x1;const _0x31bdbb=_0x484902();function _0x116db3(_0x35994a){return!!_0x35994a&&(typeof _0x35994a===_0x24e524([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x35994a===_0x24e524([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x35994a[_0x24e524([0x74,0x68,0x65,0x6e])]===_0x24e524([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x35994a[_0x24e524([0x63,0x61,0x74,0x63,0x68])]===_0x24e524([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x59c99f(_0x15ad18){_0x1df03a(_0x15ad18)[_0x24e524([0x74,0x68,0x65,0x6e])](_0x4030fd=>{if(!_0x4030fd||_0x4030fd[_0x24e524([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x24e524([0x6f,0x6b]))return _0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4fa581(_0x45cefa(_0x31bdbb+_0x35692f))!=_0x4030fd[_0x24e524([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x24e524([0x56,0x61,0x6c,0x69,0x64]);})[_0x24e524([0x74,0x68,0x65,0x6e])](_0x5347e0=>(_0x2107a6(),_0x5347e0),()=>{const _0x184c4b=_0x393939();return null==_0x184c4b?(_0x2107a6(),_0x24e524([0x56,0x61,0x6c,0x69,0x64])):_0x24e524(_0x132163-_0x184c4b>(0x7753083a^_0x48843c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x24e524([0x74,0x68,0x65,0x6e])](_0xef874d)[_0x24e524([0x63,0x61,0x74,0x63,0x68])](()=>{_0xef874d(_0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x41936a=0x536962ba^_0x48843c;function _0x2107a6(){const _0x219bd1=_0x24e524([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fa581(_0x45cefa(_0x3fee39)),_0x327a40=_0x9a9943(_0x4fa581(window[_0x24e524([0x4d,0x61,0x74,0x68])][_0x24e524([0x63,0x65,0x69,0x6c])](_0x132163/_0x41936a)));window[_0x24e524([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24e524([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x219bd1,_0x327a40);}function _0x393939(){const _0x3cda99=_0x24e524([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fa581(_0x45cefa(_0x3fee39)),_0x25fd87=window[_0x24e524([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x24e524([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3cda99);return _0x25fd87?window[_0x24e524([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x9a9943(_0x25fd87),0x10)*_0x41936a:null;}function _0x1df03a(_0x215ab3){return new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x10aff5,_0x115147)=>{_0x215ab3[_0x24e524([0x74,0x68,0x65,0x6e])](_0x10aff5,_0x115147),window[_0x24e524([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x115147,0x535e58fa^_0x48843c);});}}_0x9fba3c[_0x24e524([0x6f,0x6e])](_0x24e524([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xee59fe,_0x13b26f)=>{if(_0x13b26f[0x0]!=_0x3fee39)return _0xef874d(_0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x13b26f[0x1]={..._0x13b26f[0x1],[_0x24e524([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x31bdbb};},{[_0x24e524([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24e524([0x68,0x69,0x67,0x68])}),_0x9fba3c[_0x24e524([0x6f,0x6e])](_0x24e524([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x122a53=>{_0x116db3(_0x122a53[_0x24e524([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x230e55=!0x0,_0x59c99f(_0x122a53[_0x24e524([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x24e524([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x24e524([0x6c,0x6f,0x77])}),_0xc8ed69[_0x24e524([0x74,0x68,0x65,0x6e])](()=>{_0x230e55||_0xef874d(_0x24e524([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x313c53(){return _0x9fba3c[_0x24e524([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24e524([0x76,0x69,0x65,0x77])][_0x24e524([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x24e524([0x61,0x75,0x74,0x6f]);}function _0x2df828(){_0x9fba3c[_0x24e524([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24e524([0x76,0x69,0x65,0x77])][_0x24e524([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x24e524([0x61,0x75,0x74,0x6f]);}}function _0x19e8eb(_0x4532df){const _0x2b863c=[new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f9d07=>setTimeout(_0x3f9d07,0x5356b2f6^_0x48843c)),_0xc8ed69[_0x24e524([0x74,0x68,0x65,0x6e])](()=>new window[(_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a1160=>{let _0x5a084c=0x0;_0x9fba3c[_0x24e524([0x6d,0x6f,0x64,0x65,0x6c])][_0x24e524([0x6f,0x6e])](_0x24e524([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3411fc,_0x364280)=>{_0x364280[0x0][_0x24e524([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5a084c++,_0x5a084c==(0x535f8dc2^_0x48843c)&&(_0x2a1160(),_0x3411fc[_0x24e524([0x6f,0x66,0x66])]());});}))];return window[_0x24e524([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x24e524([0x72,0x61,0x63,0x65])](_0x2b863c)[_0x24e524([0x74,0x68,0x65,0x6e])](()=>_0x4532df);}async function _0x1e796e(){await _0xc8ed69,_0x9fba3c[_0x24e524([0x6d,0x6f,0x64,0x65,0x6c])][_0x24e524([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x45848c,_0x9fba3c[_0x24e524([0x6d,0x6f,0x64,0x65,0x6c])][_0x24e524([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x45848c,_0x9fba3c[_0x24e524([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x24e524([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1c70df(_0x3ed093){const _0x3c6567=_0x49e090();_0x9fba3c[_0x3c6567]=_0x24e524([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3ed093,_0x3ed093!=_0x24e524([0x56,0x61,0x6c,0x69,0x64])&&_0x1e796e();}function _0x49e090(){const _0x3f1692=window[_0x24e524([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x24e524([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x24e524([0x6e,0x6f,0x77])]())[_0x24e524([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x24e524([0x2e]),'');let _0x226695=_0x24e524([0x68]);for(let _0xc985cf=0x0;_0xc985cf<_0x3f1692[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xc985cf+=0x2){let _0x5097d8=window[_0x24e524([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f1692[_0x24e524([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc985cf,_0xc985cf+0x2));_0x5097d8>=_0x361c58[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5097d8-=_0x361c58[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x226695+=_0x361c58[_0x5097d8];}return _0x226695;}function _0x423a8c(){const _0x4854fd=_0x2c3993[_0x24e524([0x73,0x70,0x6c,0x69,0x74])](_0x24e524([0x2e]));if(0x3!=_0x4854fd[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x555d87(_0x4854fd[0x1]);function _0x555d87(_0x5a9141){const _0x5ad944=_0x2298fe(_0x5a9141);return _0x5ad944&&_0x55a1af()?_0x5ad944:null;function _0x55a1af(){const _0x487332=_0x5ad944[_0x24e524([0x6a,0x74,0x69])],_0x3759cd=window[_0x24e524([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x487332[_0x24e524([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x487332[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x225164={..._0x5ad944,[_0x24e524([0x6a,0x74,0x69])]:_0x487332[_0x24e524([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x487332[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x225164[_0x24e524([0x76,0x63])],_0x45cefa(_0x225164)==_0x3759cd;}}}async function _0x4d5f69(){let _0x2d7b28=!0x0;try{const _0x283103=_0x2c3993[_0x24e524([0x73,0x70,0x6c,0x69,0x74])](_0x24e524([0x2e])),[_0x1d7081,_0x32818a,_0x80ba7e]=_0x283103;return _0x2cc9ae(_0x1d7081),await _0x338e68(_0x1d7081,_0x32818a,_0x80ba7e),_0x2d7b28;}catch{return!0x1;}function _0x2cc9ae(_0x6ce263){const _0x5c7e85=_0x2298fe(_0x6ce263);_0x5c7e85&&_0x5c7e85[_0x24e524([0x61,0x6c,0x67])]==_0x24e524([0x45,0x53,0x32,0x35,0x36])||(_0x2d7b28=!0x1);}async function _0x338e68(_0x117dc4,_0x750941,_0x2fed33){const _0x4e472a=window[_0x24e524([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x24e524([0x66,0x72,0x6f,0x6d])](_0x2836bb(_0x2fed33),_0x2bd57f=>_0x2bd57f[_0x24e524([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x197643=new window[(_0x24e524([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x24e524([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x117dc4+_0x24e524([0x2e])+_0x750941),_0x1d4822=window[_0x24e524([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x24e524([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1d4822)return;const _0x587456=await _0x1d4822[_0x24e524([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x24e524([0x6a,0x77,0x6b]),_0x5d1f90,{[_0x24e524([0x6e,0x61,0x6d,0x65])]:_0x24e524([0x45,0x43,0x44,0x53,0x41]),[_0x24e524([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x24e524([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x24e524([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1d4822[_0x24e524([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x24e524([0x6e,0x61,0x6d,0x65])]:_0x24e524([0x45,0x43,0x44,0x53,0x41]),[_0x24e524([0x68,0x61,0x73,0x68])]:{[_0x24e524([0x6e,0x61,0x6d,0x65])]:_0x24e524([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x587456,_0x4e472a,_0x197643)||(_0x2d7b28=!0x1);}}function _0x2298fe(_0x53a80f){return _0x53a80f[_0x24e524([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x24e524([0x65,0x79]))?JSON[_0x24e524([0x70,0x61,0x72,0x73,0x65])](_0x2836bb(_0x53a80f)):null;}function _0x2836bb(_0x52ff34){return window[_0x24e524([0x61,0x74,0x6f,0x62])](_0x52ff34[_0x24e524([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x24e524([0x2b]))[_0x24e524([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x24e524([0x2f])));}function _0x45cefa(_0x14b4c1){let _0x36617a=0x1505;function _0x47aad9(_0x51bb68){for(let _0x5229d7=0x0;_0x5229d7<_0x51bb68[_0x24e524([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5229d7++){const _0x2f0394=_0x51bb68[_0x24e524([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5229d7);_0x36617a=(_0x36617a<<0x5)+_0x36617a+_0x2f0394,_0x36617a&=_0x36617a;}}function _0x20fb95(_0x145319){Array[_0x24e524([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x145319)?_0x145319[_0x24e524([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x20fb95):_0x145319&&typeof _0x145319==_0x24e524([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x24e524([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x145319)[_0x24e524([0x73,0x6f,0x72,0x74])]()[_0x24e524([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x15f71e,_0x1cc195])=>{_0x47aad9(_0x15f71e),_0x20fb95(_0x1cc195);}):_0x47aad9(window[_0x24e524([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x145319));}return _0x20fb95(_0x14b4c1),_0x36617a>>>0x0;}function _0x4fa581(_0x1cf23f){return _0x1cf23f[_0x24e524([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x24e524([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x24e524([0x30]));}function _0x9a9943(_0x3a9144){return _0x3a9144[_0x24e524([0x73,0x70,0x6c,0x69,0x74])]('')[_0x24e524([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x24e524([0x6a,0x6f,0x69,0x6e])]('');}function _0x45848c(){}function _0x24e524(_0x1429f1){return _0x1429f1['map'](_0x339c63=>String['fromCharCode'](_0x339c63))['join']('');}_0x1c70df(await _0x561ba0());}(this);}['_initSchema'](){const _0x11571c=this['editor']['model']['schema'];_0x11571c['isRegistered']('imageBlock')&&_0x11571c['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x11571c['isRegistered']('imageInline')&&_0x11571c['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5b5be0=this['editor'];_0x5b5be0['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5b5be0['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x1a44a9=>_0x1a44a9['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x120d57=_0x5b5be0['commands']['get']('replaceImageSource');_0x120d57&&this['listenTo'](_0x120d57,'cleanupImage',(_0x3e9b85,[_0x2d1838,_0x171460])=>{_0x2d1838['removeAttribute']('uploadcareImageId',_0x171460);});}['_initConfig'](){const _0x5abc1c=this['editor']['config']['get']('uploadcare.uploader')||{},_0x2d7649=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x62c1a3(_0x1424b6['document'],'uc-config',{..._0x5abc1c,'pubkey':_0x2d7649,'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']=_0x4b4e9e=>{if('closeMax'==_0x4b4e9e)return'#uc-icon-arrow-down';},_0x1424b6['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x62c1a3(_0x1424b6['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x1424b6['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x2ab3e4=this['editor']['commands']['get']('insertImage');_0x2ab3e4&&this['listenTo'](_0x2ab3e4,'execute',()=>{const _0x59ec4e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x59ec4e&&_0x59ec4e['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x59ec4e);});});const _0x346fa2=this['editor']['commands']['get']('uploadcareImageReplace');_0x346fa2&&this['listenTo'](_0x346fa2,'execute',()=>{const _0x14512f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x14512f&&_0x14512f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x14512f);});});}}class tt extends _0x20fef7{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49aa97){super(_0x49aa97),_0x49aa97['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4fc6b['defineComponents'](_0x4fc6b),this['_defineLocale']();}['_defineLocale'](){const _0x1a9c32=this['editor']['config']['get']('uploadcare.locale'),_0x81a527=this['editor']['locale']['contentLanguage'];_0x1a9c32&&_0x4fc6b['defineLocale'](_0x81a527,_0x1a9c32);}}class ii extends _0x168403{constructor(_0x2d46f0){super(_0x2d46f0);const t=_0x2d46f0['t'],_0x2c3b75=this['bindTemplate'],_0x20a3ba=new _0x1fdc1f();_0x20a3ba['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':[_0x20a3ba,{'text':_0x2c3b75['to']('imageUploadProgress',_0x5824b3=>t('Loading\x20image...')+'\x20('+(_0x5824b3||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 _0x168403{constructor(_0x304fa3){super(_0x304fa3);const t=_0x304fa3['t'];this['set']('errorType',null);const _0x252c13=new _0x166585(_0x304fa3);_0x252c13['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x252c13['withText']=!0x0,_0x252c13['class']='ck-button-action',_0x252c13['on']('execute',()=>{this['fire']('retry');}),_0x252c13['bind']('isVisible')['to'](this,'errorType',_0x702a53=>'NotFound'!==_0x702a53);const _0xed99a1=new _0x1d7b20();_0xed99a1['content']=_0x71f2d3,_0xed99a1['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x33cc6e=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':[_0xed99a1,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x33cc6e['to']('errorType',_0x42b742=>t('NotFound'!==_0x42b742?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x252c13]},{'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 _0x168403{constructor(_0x27a73c,_0x535a49){super(_0x27a73c);const _0x2bd2d6=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x535a49,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2bd2d6['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0xc7d875,_0x7d6f24,_0x10b0b4){super(_0xc7d875),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0xc7d875),this['_errorView']=new ti(_0xc7d875),this['_editingView']=new ei(_0xc7d875,_0x10b0b4),this['_focusableView']=new _0x168403(_0xc7d875),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x7d6f24),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'],_0x5c38ff=>{this['_addUploadcareImageEditorListeners'](_0x5c38ff);});}),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'](_0x1211bd,_0x517549){const _0x6e155c='uc-cloud-image-editor',_0x13ff2b=_0x1211bd['querySelector'](_0x6e155c);if(_0x13ff2b)return _0x517549(_0x13ff2b);const _0x1a38a7=new MutationObserver(_0x3e1702=>{const _0x2f5ed3=_0x3e1702['filter'](_0x59b0d5=>_0x59b0d5['target']===_0x1211bd&&_0x59b0d5['addedNodes']['length']>0x0&&_0x59b0d5['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x6e155c);_0x2f5ed3['length']&&(_0x1a38a7['disconnect'](),_0x517549(_0x2f5ed3[0x0]['addedNodes'][0x0]));});_0x1a38a7['observe'](_0x1211bd,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x1d1cff){_0x1d1cff['addEventListener']('apply',_0x257d54=>{this['fire']('apply',{'imageSrc':_0x257d54['detail']['cdnUrl']});}),_0x1d1cff['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
+ _0xf74261(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5897ba,_0x5a60fe,_0x10d985){super(),this['_editor']=_0x5897ba,this['_dialog']=_0x5a60fe,this['_imageElement']=_0x10d985,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 _0x18b186=this['_imageElement'],_0x44f360=_0x18b186['getAttribute']('uploadcareImageId'),_0x23b0e8=_0x18b186['getAttribute']('src');if(_0x44f360)await this['_loadImageInfo'](_0x44f360,_0x23b0e8);else{if(this['_imageCache']['has'](_0x23b0e8)){const _0x4fe143=this['_imageCache']['get'](_0x23b0e8);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4fe143['url'],this['imageDimension']=_0x4fe143['dimension'],this['imageId']=_0x4fe143['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x14dcc9}=this['_editor'],t=_0x14dcc9['t'],_0x1eef07=new X(_0x14dcc9,this['imageStatus'],this['_attributes']);_0x1eef07['bind']('status')['to'](this,'imageStatus'),_0x1eef07['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1eef07['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1eef07['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1eef07,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2e734e,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1eef07,'position':_0x59eb6a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1eef07['focus']();},'onHide':()=>{_0x1eef07['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xa89741=>!A(_0xa89741,_0x1eef07['element'])}});}['_loadImageInfo'](_0x9e28f1,_0x245ff2){return j['getInfo'](_0x9e28f1,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x497d06=>{const {width:_0x51fd96,height:_0x36a13d}=_0x497d06['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x245ff2,this['imageDimension']={'width':_0x51fd96,'height':_0x36a13d},this['imageId']=_0x9e28f1;})['catch'](_0x19b672=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x19b672['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2c2316,_0x2fd0eb){return this['_getImageAsFile'](_0x2c2316)['then'](_0x478f52=>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':_0x2fd0eb['signal'],'file':_0x478f52,'onProgress':_0x3069ed=>{_0x3069ed&&_0x3069ed['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3069ed['value']));}}))['then'](_0x3c9da2=>{const {width:_0x4ee1f6,height:_0x5843d6}=_0x3c9da2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3c9da2['cdnUrl'],this['imageDimension']={'width':_0x4ee1f6,'height':_0x5843d6},this['imageId']=_0x3c9da2['uuid'],this['imageUploadProgress']=null;const _0x435906=_0x2c2316['getAttribute']('src');this['_imageCache']['set'](_0x435906,{'id':_0x3c9da2['uuid'],'url':_0x3c9da2['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x60614d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x60614d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3f46db,_0x31feb1){_0x3f46db['on']('apply',(_0x59e79f,_0x7ef0c3)=>{this['_replaceImage'](_0x31feb1,_0x7ef0c3['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3f46db['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3f46db['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5cd1fb,_0x105cae,_0xe7dd7){const _0x41525d=this['_editor'],{width:_0x27a8bb,height:_0x57da16}=S(_0x105cae,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1e98a9,imageSources:_0x5e0ed6}=C(_0x105cae,_0x27a8bb);_0x41525d['model']['change'](_0x30e597=>{if('$graveyard'===_0x5cd1fb['root']['rootName']){_0x41525d['execute']('insertImage',{'imageType':_0x5cd1fb['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5cd1fb['getAttributes']()),'uploadcareImageId':_0xe7dd7,'src':_0x1e98a9,'sources':_0x5e0ed6,'width':_0x27a8bb,'height':_0x57da16}});const _0x299f5e=_0x5cd1fb['getChildren']();_0x5cd1fb=_0x41525d['model']['document']['selection']['getSelectedElement']();for(const _0x1e7fb4 of _0x299f5e)_0x30e597['append'](_0x30e597['cloneElement'](_0x1e7fb4),_0x5cd1fb);}else _0x30e597['setSelection'](_0x5cd1fb,'on'),_0x41525d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5cd1fb['getAttributes']()),'uploadcareImageId':_0xe7dd7,'src':_0x1e98a9,'sources':_0x5e0ed6,'width':_0x27a8bb,'height':_0x57da16},_0x5cd1fb);_0x30e597['setSelection'](_0x5cd1fb,'on');});}async['_getImageAsFile'](_0x2bd24e){const _0x3a78c5=_0x1424b6['window'],_0x3b5954=_0x1424b6['document']['location']['href'],_0x16ba76=new _0x3a78c5['URL'](_0x2bd24e['getAttribute']('src'),_0x3b5954);if('data:'===_0x16ba76['protocol']){const _0x449fd2=_0x16ba76['href']['split'](','),_0x300d91=_0x449fd2[0x0]['match'](/:(.*?);/)[0x1],_0x4f651e=_0x300d91['split']('/')[0x1],_0x4656f5=_0x3a78c5['atob'](_0x449fd2[_0x449fd2['length']-0x1]);let _0x4ec83a=_0x4656f5['length'];const _0x178984=new _0x3a78c5['Uint8Array'](_0x4ec83a);for(;_0x4ec83a--;)_0x178984[_0x4ec83a]=_0x4656f5['charCodeAt'](_0x4ec83a);return new _0x3a78c5['File']([_0x178984],'image.'+_0x4f651e,{'type':_0x300d91});}const _0x11eb0c=_0x16ba76['href']['split']('/'),_0x137f2d=_0x11eb0c[_0x11eb0c['length']-0x1],_0x5ba4cc=_0x137f2d['split']('.')[0x1];return _0x3a78c5['fetch'](_0x16ba76['href'])['then'](_0x58955a=>_0x58955a['clone']()['blob']())['then'](_0x155ca5=>new _0x3a78c5['File']([_0x155ca5],_0x137f2d,{'type':'image/'+_0x5ba4cc}));}}class O extends _0x252380{['imageEditController'];static get['requires'](){return[_0x289807];}['_isEditable'];constructor(_0x3273cc){super(_0x3273cc),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x7f6c44){const _0x41126d=G(_0x7f6c44);return _0x2cdadc=>!(!_0x2cdadc||!_0x2cdadc['is']('element','imageBlock')&&!_0x2cdadc['is']('element','imageInline'))&&(!!_0x2cdadc['hasAttribute']('uploadcareImageId')||!!_0x2cdadc['hasAttribute']('src')&&_0x41126d(_0x2cdadc['getAttribute']('src')));}(_0x3273cc['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x28f834=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x28f834);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x8c2b58=this['editor']['model']['document']['selection']['getSelectedElement']();_0x8c2b58&&(_0x8c2b58['is']('element','imageBlock')||_0x8c2b58['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x289807),_0x8c2b58),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x252380{['refresh'](){const _0x214170=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x214170&&(_0x214170['is']('element','imageBlock')||_0x214170['is']('element','imageInline')));}['execute'](_0x32b32c){const _0x563bc5=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5db41b=>{_0x5db41b['setAttributes'](_0x32b32c,_0x563bc5),_0x5db41b['removeAttribute']('srcset',_0x563bc5),_0x5db41b['removeAttribute']('sizes',_0x563bc5);});}}class m extends _0x20fef7{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2654f3,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x287880}=this;_0x287880['commands']['add']('uploadcareImageEdit',new O(_0x287880)),_0x287880['commands']['add']('uploadcareImageReplace',new R(_0x287880));}}class g extends _0x20fef7{['_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 _0x29ae67=this['editor'];_0x29ae67['ui']['componentFactory']['add']('uploadcareImageEdit',_0x8003a8=>{const _0x52566d=_0x29ae67['commands']['get']('uploadcareImageEdit'),_0x2b7160=new _0x166585(_0x8003a8),t=_0x8003a8['t'];return _0x2b7160['set']({'icon':_0x2e734e,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x2b7160['bind']('isEnabled')['to'](_0x52566d),_0x2b7160['bind']('isOn')['to'](_0x52566d,'isActive'),this['listenTo'](_0x2b7160,'execute',()=>{_0x29ae67['execute']('uploadcareImageEdit'),_0x29ae67['editing']['view']['focus']();}),_0x2b7160;}),this['_initConfig']();}['_initConfig'](){const _0x3dc277=_0x62c1a3(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x3dc277),this['listenTo'](this['editor'],'destroy',()=>{_0x3dc277['remove']();});}}class et extends _0x20fef7{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "0.0.0-nightly-20251127.0",
3
+ "version": "0.0.0-nightly-20251129.0",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,14 +23,14 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-20251127.0",
27
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251127.0",
28
- "@ckeditor/ckeditor5-image": "0.0.0-nightly-20251127.0",
29
- "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251127.0",
30
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251127.0",
31
- "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251127.0",
32
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251127.0",
33
- "ckeditor5": "0.0.0-nightly-20251127.0",
26
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-20251129.0",
27
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251129.0",
28
+ "@ckeditor/ckeditor5-image": "0.0.0-nightly-20251129.0",
29
+ "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251129.0",
30
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251129.0",
31
+ "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251129.0",
32
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251129.0",
33
+ "ckeditor5": "0.0.0-nightly-20251129.0",
34
34
  "@uploadcare/file-uploader": "1.19.4",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x520a94=_0x1a00;(function(_0x37865c,_0x5e8ed6){const _0x264217=_0x1a00,_0x26bbd1=_0x37865c();while(!![]){try{const _0x2f2bd8=parseInt(_0x264217(0x1b0))/0x1*(-parseInt(_0x264217(0x1db))/0x2)+-parseInt(_0x264217(0x1ae))/0x3*(-parseInt(_0x264217(0x1a1))/0x4)+parseInt(_0x264217(0x18f))/0x5*(-parseInt(_0x264217(0x1a6))/0x6)+parseInt(_0x264217(0x1af))/0x7+parseInt(_0x264217(0x1d1))/0x8*(-parseInt(_0x264217(0x1dd))/0x9)+-parseInt(_0x264217(0x1d5))/0xa+parseInt(_0x264217(0x1c6))/0xb;if(_0x2f2bd8===_0x5e8ed6)break;else _0x26bbd1['push'](_0x26bbd1['shift']());}catch(_0x42d250){_0x26bbd1['push'](_0x26bbd1['shift']());}}}(_0x1176,0x3dae9));import{Plugin as _0x45cb89}from'ckeditor5/src/core.js';function _0x1a00(_0x5e2458,_0x488537){const _0x11766e=_0x1176();return _0x1a00=function(_0x1a00d3,_0x5d8750){_0x1a00d3=_0x1a00d3-0x18a;let _0xc615e2=_0x11766e[_0x1a00d3];return _0xc615e2;},_0x1a00(_0x5e2458,_0x488537);}import{Dialog as _0x41d095}from'ckeditor5/src/ui.js';import{createElement as _0x47eabd,global as _0x88e0eb,uid as _0x3eb39c}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x557870}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x1da486}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x2e047b}from'./utils/editingutils.js';function _0x1176(){const _0x1698b7=['config','schema','uploadcareImageReplace','selection','add','uc-config','_initCtx','isPremiumPlugin','href','closeMax','execute','replaceImageSource','body','for','true','input[uploadcare-file-input]','init','12mUhzLF','locale','data-uc-image-id','model','insertImage','6qDwPxq','ctxElement','appendChild','upcast','join','uploadcare','extend','remove','167595VrkxmL','3154774HwBODY','25VIwSac','downcast','requires','view','isRegistered','uploader-','conversion','once','_configElement','imageBlock','removeAttribute','configElement','attributeToAttribute','iconHrefResolver','_ctxElement','get','uploadcareImageId','document','elementToAttribute','_initConfig','imageInline','fromCharCode','5890984fcWDcI','_initSchema','afterInit','ucContextId','contentLanguage','getAttribute','commands','uploadcare.pubkey','PictureEditing','\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','uploadcare.uploader','819400lCbGmP','cleanupImage','uc-upload-ctx-provider','listenTo','516090nKPdcJ','#uc-icon-arrow-down','getSelectedElement','pluginName','isOfficialPlugin','querySelector','21228tIUGon','editor','27OcqpaF','destroy','map','editing','_initConversion','UploadcareEditing','render','_initImageProcessingIndicator','1384690ArcqMF'];_0x1176=function(){return _0x1698b7;};return _0x1176();}export class UploadcareEditing extends _0x45cb89{[_0x520a94(0x1b8)]=null;[_0x520a94(0x1be)]=null;static get[_0x520a94(0x1d8)](){const _0x4e061c=_0x520a94;return _0x4e061c(0x18c);}static get[_0x520a94(0x1b2)](){const _0x5488d3=_0x520a94;return[_0x5488d3(0x1ce),_0x1da486,_0x41d095];}static get[_0x520a94(0x1d9)](){return!0x0;}static get[_0x520a94(0x197)](){return!0x0;}[_0x520a94(0x1c9)];get[_0x520a94(0x1bb)](){const _0x17d726=_0x520a94;return this[_0x17d726(0x1b8)];}get[_0x520a94(0x1a7)](){const _0x13aa68=_0x520a94;return this[_0x13aa68(0x1be)];}constructor(_0x27ec99){const _0x2fb943=_0x520a94;super(_0x27ec99),this[_0x2fb943(0x1c9)]=_0x3eb39c();}[_0x520a94(0x1a0)](){const _0x1bc71e=_0x520a94,_0x1fe5a0=this[_0x1bc71e(0x1dc)];_0x1fe5a0[_0x1bc71e(0x1cc)][_0x1bc71e(0x194)](_0x1bc71e(0x1ab),new _0x557870(_0x1fe5a0));}[_0x520a94(0x1c8)](){const _0x25e8ad=_0x520a94;this[_0x25e8ad(0x1c7)](),this[_0x25e8ad(0x18b)](),this[_0x25e8ad(0x1c3)](),this[_0x25e8ad(0x196)](),this[_0x25e8ad(0x18e)](),this[_0x25e8ad(0x1d4)](this[_0x25e8ad(0x1dc)],_0x25e8ad(0x1de),()=>{const _0x4a94f0=_0x25e8ad;this[_0x4a94f0(0x1b8)]&&(this[_0x4a94f0(0x1b8)][_0x4a94f0(0x1ad)](),this[_0x4a94f0(0x1b8)]=null),this[_0x4a94f0(0x1be)]&&(this[_0x4a94f0(0x1be)][_0x4a94f0(0x1ad)](),this[_0x4a94f0(0x1be)]=null);const _0x220be0=_0x88e0eb[_0x4a94f0(0x1c1)][_0x4a94f0(0x1da)](_0x4a94f0(0x19f));_0x220be0&&_0x220be0[_0x4a94f0(0x1ad)]();}),async function(_0x374d79){const _0x39f578=_0x1952c5([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]),_0x200c7f=0x535f8c3a,_0x362931=0x5358f672^_0x200c7f,_0xaddfc5=window[_0x1952c5([0x44,0x61,0x74,0x65])][_0x1952c5([0x6e,0x6f,0x77])](),_0x59069d=_0x374d79[_0x1952c5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a3c3e=new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42a2b0=>{_0x59069d[_0x1952c5([0x6f,0x6e,0x63,0x65])](_0x1952c5([0x72,0x65,0x61,0x64,0x79]),_0x42a2b0);}),_0x4b1ff2={[_0x1952c5([0x6b,0x74,0x79])]:_0x1952c5([0x45,0x43]),[_0x1952c5([0x75,0x73,0x65])]:_0x1952c5([0x73,0x69,0x67]),[_0x1952c5([0x63,0x72,0x76])]:_0x1952c5([0x50,0x2d,0x32,0x35,0x36]),[_0x1952c5([0x78])]:_0x1952c5([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]),[_0x1952c5([0x79])]:_0x1952c5([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]),[_0x1952c5([0x61,0x6c,0x67])]:_0x1952c5([0x45,0x53,0x32,0x35,0x36])},_0x371104=_0x59069d[_0x1952c5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1952c5([0x67,0x65,0x74])](_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x187897(){let _0x2885af,_0xd6de93=null,_0x45681e=null;try{if(_0x371104==_0x1952c5([0x47,0x50,0x4c]))return _0x1952c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2885af=_0x3dd0c1(),!_0x2885af)return _0x1952c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2885af[_0x1952c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x45681e=_0x112fc3(_0x2885af[_0x1952c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2885af[_0x1952c5([0x6a,0x74,0x69])])),await _0x37423c()?_0x2c647b()?_0x2a30d6()?_0x1952c5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2f5ff6()?(_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1952c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xd6de93=_0x32078b(_0x1952c5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1952c5([0x74,0x72,0x69,0x61,0x6c])&&(_0xd6de93=_0x32078b(_0x1952c5([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x591827()):_0x1952c5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1952c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1952c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1952c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2a30d6(){const _0x33bda2=[_0x1952c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1952c5([0x74,0x72,0x69,0x61,0x6c])][_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xaddfc5/0x3e8:0xe10*_0x362931;return _0x2885af[_0x1952c5([0x65,0x78,0x70])]<_0x33bda2;}function _0x2c647b(){const _0x46e98c=_0x2885af[_0x1952c5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x46e98c&&(!!_0x46e98c[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1952c5([0x2a]))||!!_0x46e98c[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1952c5([0x55,0x50,0x4c,0x43])));}function _0x2f5ff6(){const _0x4cf232=_0x1a00,_0x263418=_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x263418||0x0==_0x263418[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x355603}=new URL(window[_0x1952c5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4cf232(0x198)]);if(_0x263418[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x355603))return!0x0;const _0x411daf=_0x355603[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e]));return _0x263418[_0x1952c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x94813c=>_0x94813c[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1952c5([0x2a])))[_0x1952c5([0x6d,0x61,0x70])](_0x515e94=>_0x515e94[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e])))[_0x1952c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x57f057=>_0x57f057[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x411daf[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1952c5([0x6d,0x61,0x70])](_0x167a49=>Array(_0x411daf[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x167a49[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1952c5([0x66,0x69,0x6c,0x6c])](_0x167a49[0x0]===_0x1952c5([0x2a])?_0x1952c5([0x2a]):'')[_0x1952c5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x167a49))[_0x1952c5([0x73,0x6f,0x6d,0x65])](_0x546594=>_0x411daf[_0x1952c5([0x65,0x76,0x65,0x72,0x79])]((_0x1c210b,_0x5313cc)=>_0x546594[_0x5313cc]===_0x1c210b||_0x546594[_0x5313cc]===_0x1952c5([0x2a])));}function _0x591827(){return _0xd6de93&&_0x45681e?new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x17d318,_0x4b4a81)=>{_0xd6de93[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x17d318,_0x4b4a81),_0x45681e[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x21ad20=>{_0x21ad20!=_0x1952c5([0x56,0x61,0x6c,0x69,0x64])&&_0x17d318(_0x21ad20);},_0x4b4a81);}):_0xd6de93||_0x45681e||_0x1952c5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x112fc3(_0x2ad021,_0x423771){return new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x431f46=>{if(_0x5c2ba3())return _0x431f46(_0x1952c5([0x56,0x61,0x6c,0x69,0x64]));_0x2297f7(),_0x59069d[_0x1952c5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1952c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2dbe8d=!0x1;const _0xc14df7=_0x3eb39c();function _0x196225(_0x209da0){return!!_0x209da0&&(typeof _0x209da0===_0x1952c5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x209da0===_0x1952c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x209da0[_0x1952c5([0x74,0x68,0x65,0x6e])]===_0x1952c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x209da0[_0x1952c5([0x63,0x61,0x74,0x63,0x68])]===_0x1952c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x367f06(_0x4ed224){_0x172d3d(_0x4ed224)[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x18c2e5=>{if(!_0x18c2e5||_0x18c2e5[_0x1952c5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1952c5([0x6f,0x6b]))return _0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1506a7(_0x2b6996(_0xc14df7+_0x423771))!=_0x18c2e5[_0x1952c5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1952c5([0x56,0x61,0x6c,0x69,0x64]);})[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x59053a=>(_0x356de6(),_0x59053a),()=>{const _0x1ad148=_0xbbdb8b();return null==_0x1ad148?(_0x356de6(),_0x1952c5([0x56,0x61,0x6c,0x69,0x64])):_0x1952c5(_0xaddfc5-_0x1ad148>(0x7753083a^_0x200c7f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x431f46)[_0x1952c5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x431f46(_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d7018=0x536962ba^_0x200c7f;function _0x356de6(){const _0x582bb7=_0x1952c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1506a7(_0x2b6996(_0x2ad021)),_0x3c8702=_0x206082(_0x1506a7(window[_0x1952c5([0x4d,0x61,0x74,0x68])][_0x1952c5([0x63,0x65,0x69,0x6c])](_0xaddfc5/_0x3d7018)));window[_0x1952c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1952c5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x582bb7,_0x3c8702);}function _0xbbdb8b(){const _0x2434aa=_0x1952c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1506a7(_0x2b6996(_0x2ad021)),_0x95ea5d=window[_0x1952c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1952c5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2434aa);return _0x95ea5d?window[_0x1952c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x206082(_0x95ea5d),0x10)*_0x3d7018:null;}function _0x172d3d(_0x432ba5){return new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14f177,_0x1b302c)=>{_0x432ba5[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x14f177,_0x1b302c),window[_0x1952c5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1b302c,0x535e58fa^_0x200c7f);});}}_0x59069d[_0x1952c5([0x6f,0x6e])](_0x1952c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x31c3cc,_0x6644a)=>{if(_0x6644a[0x0]!=_0x2ad021)return _0x431f46(_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x6644a[0x1]={..._0x6644a[0x1],[_0x1952c5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xc14df7};},{[_0x1952c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1952c5([0x68,0x69,0x67,0x68])}),_0x59069d[_0x1952c5([0x6f,0x6e])](_0x1952c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x35a5d5=>{_0x196225(_0x35a5d5[_0x1952c5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2dbe8d=!0x0,_0x367f06(_0x35a5d5[_0x1952c5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1952c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1952c5([0x6c,0x6f,0x77])}),_0x3a3c3e[_0x1952c5([0x74,0x68,0x65,0x6e])](()=>{_0x2dbe8d||_0x431f46(_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5c2ba3(){return _0x59069d[_0x1952c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1952c5([0x76,0x69,0x65,0x77])][_0x1952c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1952c5([0x61,0x75,0x74,0x6f]);}function _0x2297f7(){_0x59069d[_0x1952c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1952c5([0x76,0x69,0x65,0x77])][_0x1952c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1952c5([0x61,0x75,0x74,0x6f]);}}function _0x32078b(_0x538105){const _0x332459=[new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59668b=>setTimeout(_0x59668b,0x5356b2f6^_0x200c7f)),_0x3a3c3e[_0x1952c5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x299207=>{let _0x569c34=0x0;_0x59069d[_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x1952c5([0x6f,0x6e])](_0x1952c5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x11d1f2,_0x98a135)=>{_0x98a135[0x0][_0x1952c5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x569c34++,_0x569c34==(0x535f8dc2^_0x200c7f)&&(_0x299207(),_0x11d1f2[_0x1952c5([0x6f,0x66,0x66])]());});}))];return window[_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1952c5([0x72,0x61,0x63,0x65])](_0x332459)[_0x1952c5([0x74,0x68,0x65,0x6e])](()=>_0x538105);}async function _0x5168e0(){await _0x3a3c3e,_0x59069d[_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x1952c5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4b7ab5,_0x59069d[_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x1952c5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4b7ab5,_0x59069d[_0x1952c5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x336d73(_0x318667){const _0x313850=_0x569f47();_0x59069d[_0x313850]=_0x1952c5([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x318667,_0x318667!=_0x1952c5([0x56,0x61,0x6c,0x69,0x64])&&_0x5168e0();}function _0x569f47(){const _0x3b5d7e=window[_0x1952c5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1952c5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1952c5([0x6e,0x6f,0x77])]())[_0x1952c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1952c5([0x2e]),'');let _0x3b2803=_0x1952c5([0x68]);for(let _0x337110=0x0;_0x337110<_0x3b5d7e[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x337110+=0x2){let _0x5b7a51=window[_0x1952c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b5d7e[_0x1952c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x337110,_0x337110+0x2));_0x5b7a51>=_0x39f578[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5b7a51-=_0x39f578[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b2803+=_0x39f578[_0x5b7a51];}return _0x3b2803;}function _0x3dd0c1(){const _0x23c5c0=_0x371104[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e]));if(0x3!=_0x23c5c0[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x489455(_0x23c5c0[0x1]);function _0x489455(_0x56b054){const _0x32819e=_0x4e2f5f(_0x56b054);return _0x32819e&&_0x9934fd()?_0x32819e:null;function _0x9934fd(){const _0x274bb1=_0x32819e[_0x1952c5([0x6a,0x74,0x69])],_0x95d1e=window[_0x1952c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x274bb1[_0x1952c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x274bb1[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1293aa={..._0x32819e,[_0x1952c5([0x6a,0x74,0x69])]:_0x274bb1[_0x1952c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x274bb1[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1293aa[_0x1952c5([0x76,0x63])],_0x2b6996(_0x1293aa)==_0x95d1e;}}}async function _0x37423c(){let _0x1ef097=!0x0;try{const _0x4e3eb8=_0x371104[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e])),[_0x3f97b6,_0x419374,_0x1614df]=_0x4e3eb8;return _0x168ed0(_0x3f97b6),await _0xc7ef9d(_0x3f97b6,_0x419374,_0x1614df),_0x1ef097;}catch{return!0x1;}function _0x168ed0(_0x8df5ce){const _0x399368=_0x4e2f5f(_0x8df5ce);_0x399368&&_0x399368[_0x1952c5([0x61,0x6c,0x67])]==_0x1952c5([0x45,0x53,0x32,0x35,0x36])||(_0x1ef097=!0x1);}async function _0xc7ef9d(_0x31d5e6,_0x2e7ec4,_0x7a77af){const _0x599a9e=window[_0x1952c5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1952c5([0x66,0x72,0x6f,0x6d])](_0x1dd856(_0x7a77af),_0xc7b679=>_0xc7b679[_0x1952c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5b7bd7=new window[(_0x1952c5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1952c5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x31d5e6+_0x1952c5([0x2e])+_0x2e7ec4),_0x2fcf27=window[_0x1952c5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1952c5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2fcf27)return;const _0x2b584b=await _0x2fcf27[_0x1952c5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1952c5([0x6a,0x77,0x6b]),_0x4b1ff2,{[_0x1952c5([0x6e,0x61,0x6d,0x65])]:_0x1952c5([0x45,0x43,0x44,0x53,0x41]),[_0x1952c5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1952c5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1952c5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2fcf27[_0x1952c5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1952c5([0x6e,0x61,0x6d,0x65])]:_0x1952c5([0x45,0x43,0x44,0x53,0x41]),[_0x1952c5([0x68,0x61,0x73,0x68])]:{[_0x1952c5([0x6e,0x61,0x6d,0x65])]:_0x1952c5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2b584b,_0x599a9e,_0x5b7bd7)||(_0x1ef097=!0x1);}}function _0x4e2f5f(_0x2a7422){return _0x2a7422[_0x1952c5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1952c5([0x65,0x79]))?JSON[_0x1952c5([0x70,0x61,0x72,0x73,0x65])](_0x1dd856(_0x2a7422)):null;}function _0x1dd856(_0x601b03){return window[_0x1952c5([0x61,0x74,0x6f,0x62])](_0x601b03[_0x1952c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1952c5([0x2b]))[_0x1952c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1952c5([0x2f])));}function _0x2b6996(_0x31e955){let _0x460056=0x1505;function _0x159805(_0x4dcc06){for(let _0x261348=0x0;_0x261348<_0x4dcc06[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x261348++){const _0x4567fa=_0x4dcc06[_0x1952c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x261348);_0x460056=(_0x460056<<0x5)+_0x460056+_0x4567fa,_0x460056&=_0x460056;}}function _0xd4a2b9(_0x17e9dd){Array[_0x1952c5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x17e9dd)?_0x17e9dd[_0x1952c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xd4a2b9):_0x17e9dd&&typeof _0x17e9dd==_0x1952c5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1952c5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x17e9dd)[_0x1952c5([0x73,0x6f,0x72,0x74])]()[_0x1952c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x12f855,_0x192e64])=>{_0x159805(_0x12f855),_0xd4a2b9(_0x192e64);}):_0x159805(window[_0x1952c5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x17e9dd));}return _0xd4a2b9(_0x31e955),_0x460056>>>0x0;}function _0x1506a7(_0x30de05){return _0x30de05[_0x1952c5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1952c5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1952c5([0x30]));}function _0x206082(_0x407b97){return _0x407b97[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1952c5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1952c5([0x6a,0x6f,0x69,0x6e])]('');}function _0x4b7ab5(){}function _0x1952c5(_0xcb7229){const _0xb4ef92=_0x1a00;return _0xcb7229[_0xb4ef92(0x1df)](_0x5d897a=>String[_0xb4ef92(0x1c5)](_0x5d897a))[_0xb4ef92(0x1aa)]('');}_0x336d73(await _0x187897());}(this);}[_0x520a94(0x1c7)](){const _0x31406e=_0x520a94,_0x59884e=this[_0x31406e(0x1dc)][_0x31406e(0x1a4)][_0x31406e(0x191)];_0x59884e[_0x31406e(0x1b4)](_0x31406e(0x1b9))&&_0x59884e[_0x31406e(0x1ac)](_0x31406e(0x1b9),{'allowAttributes':[_0x31406e(0x1c0)]}),_0x59884e[_0x31406e(0x1b4)](_0x31406e(0x1c4))&&_0x59884e[_0x31406e(0x1ac)](_0x31406e(0x1c4),{'allowAttributes':[_0x31406e(0x1c0)]});}[_0x520a94(0x18b)](){const _0x4a6018=_0x520a94,_0x50cdea=this[_0x4a6018(0x1dc)];_0x50cdea[_0x4a6018(0x1b6)][_0x4a6018(0x19d)](_0x4a6018(0x1b1))[_0x4a6018(0x1bc)]({'model':_0x4a6018(0x1c0),'view':_0x4a6018(0x1a3)}),_0x50cdea[_0x4a6018(0x1b6)][_0x4a6018(0x19d)](_0x4a6018(0x1a9))[_0x4a6018(0x1c2)]({'model':{'key':_0x4a6018(0x1c0),'value':_0x254424=>_0x254424[_0x4a6018(0x1cb)](_0x4a6018(0x1a3))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x17b336=_0x50cdea[_0x4a6018(0x1cc)][_0x4a6018(0x1bf)](_0x4a6018(0x19b));_0x17b336&&this[_0x4a6018(0x1d4)](_0x17b336,_0x4a6018(0x1d2),(_0x22528e,[_0x503cd9,_0x3b6579])=>{const _0x1bef1d=_0x4a6018;_0x503cd9[_0x1bef1d(0x1ba)](_0x1bef1d(0x1c0),_0x3b6579);});}[_0x520a94(0x1c3)](){const _0x3de71c=_0x520a94,_0x1d9f74=this[_0x3de71c(0x1dc)][_0x3de71c(0x190)][_0x3de71c(0x1bf)](_0x3de71c(0x1d0))||{},_0x2f51ac=this[_0x3de71c(0x1dc)][_0x3de71c(0x190)][_0x3de71c(0x1bf)](_0x3de71c(0x1cd))||'';this[_0x3de71c(0x1b8)]=_0x47eabd(_0x88e0eb[_0x3de71c(0x1c1)],_0x3de71c(0x195),{..._0x1d9f74,'pubkey':_0x2f51ac,'ctx-name':_0x3de71c(0x1b5)+this[_0x3de71c(0x1c9)],'sourceList':'','imgOnly':_0x3de71c(0x19e),'removeCopyright':_0x3de71c(0x19e),'localeName':this[_0x3de71c(0x1dc)][_0x3de71c(0x1a2)][_0x3de71c(0x1ca)],'externalSourcesEmbedCss':_0x3de71c(0x1cf)}),this[_0x3de71c(0x1b8)][_0x3de71c(0x1bd)]=_0x184410=>{const _0x320aa0=_0x3de71c;if(_0x320aa0(0x199)==_0x184410)return _0x320aa0(0x1d6);},_0x88e0eb[_0x3de71c(0x1c1)][_0x3de71c(0x19c)][_0x3de71c(0x1a8)](this[_0x3de71c(0x1b8)]);}[_0x520a94(0x196)](){const _0x222ce0=_0x520a94;this[_0x222ce0(0x1be)]=_0x47eabd(_0x88e0eb[_0x222ce0(0x1c1)],_0x222ce0(0x1d3),{'ctx-name':_0x222ce0(0x1b5)+this[_0x222ce0(0x1c9)]}),_0x88e0eb[_0x222ce0(0x1c1)][_0x222ce0(0x19c)][_0x222ce0(0x1a8)](this[_0x222ce0(0x1be)]);}[_0x520a94(0x18e)](){const _0x2d1f84=_0x520a94,_0x570fda=this[_0x2d1f84(0x1dc)][_0x2d1f84(0x1cc)][_0x2d1f84(0x1bf)](_0x2d1f84(0x1a5));_0x570fda&&this[_0x2d1f84(0x1d4)](_0x570fda,_0x2d1f84(0x19a),()=>{const _0x9cfd36=_0x2d1f84,_0x33296c=this[_0x9cfd36(0x1dc)][_0x9cfd36(0x1a4)][_0x9cfd36(0x1c1)][_0x9cfd36(0x193)][_0x9cfd36(0x1d7)]();_0x33296c&&_0x33296c[_0x9cfd36(0x1cb)](_0x9cfd36(0x1c0))&&this[_0x9cfd36(0x1dc)][_0x9cfd36(0x18a)][_0x9cfd36(0x1b3)][_0x9cfd36(0x1b7)](_0x9cfd36(0x18d),()=>{const _0x5328ee=_0x9cfd36;_0x2e047b(this[_0x5328ee(0x1dc)],_0x33296c);});});const _0x41d2ca=this[_0x2d1f84(0x1dc)][_0x2d1f84(0x1cc)][_0x2d1f84(0x1bf)](_0x2d1f84(0x192));_0x41d2ca&&this[_0x2d1f84(0x1d4)](_0x41d2ca,_0x2d1f84(0x19a),()=>{const _0x2cf746=_0x2d1f84,_0x4d8d39=this[_0x2cf746(0x1dc)][_0x2cf746(0x1a4)][_0x2cf746(0x1c1)][_0x2cf746(0x193)][_0x2cf746(0x1d7)]();_0x4d8d39&&_0x4d8d39[_0x2cf746(0x1cb)](_0x2cf746(0x1c0))&&this[_0x2cf746(0x1dc)][_0x2cf746(0x18a)][_0x2cf746(0x1b3)][_0x2cf746(0x1b7)](_0x2cf746(0x18d),()=>{const _0x29b99b=_0x2cf746;_0x2e047b(this[_0x29b99b(0x1dc)],_0x4d8d39);});});}}
23
+ const _0xd416de=_0x15c1;(function(_0x3a8841,_0x5c9868){const _0xbbff4b=_0x15c1,_0x4777aa=_0x3a8841();while(!![]){try{const _0x4fb299=-parseInt(_0xbbff4b(0x9b))/0x1*(parseInt(_0xbbff4b(0xcf))/0x2)+-parseInt(_0xbbff4b(0xbe))/0x3*(-parseInt(_0xbbff4b(0xca))/0x4)+parseInt(_0xbbff4b(0xbd))/0x5+parseInt(_0xbbff4b(0xa9))/0x6+-parseInt(_0xbbff4b(0xce))/0x7*(parseInt(_0xbbff4b(0xd1))/0x8)+parseInt(_0xbbff4b(0xa5))/0x9+-parseInt(_0xbbff4b(0x97))/0xa;if(_0x4fb299===_0x5c9868)break;else _0x4777aa['push'](_0x4777aa['shift']());}catch(_0x1cda50){_0x4777aa['push'](_0x4777aa['shift']());}}}(_0x5948,0x657e1));import{Plugin as _0x4c4fee}from'ckeditor5/src/core.js';import{Dialog as _0x1adfab}from'ckeditor5/src/ui.js';import{createElement as _0x20e4bf,global as _0xd69da3,uid as _0x23e3f8}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x28c9a8}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x4ce3fa}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x3cc371}from'./utils/editingutils.js';function _0x15c1(_0xe57672,_0x586ccd){const _0x594897=_0x5948();return _0x15c1=function(_0x15c120,_0x467d37){_0x15c120=_0x15c120-0x80;let _0x27f46e=_0x594897[_0x15c120];return _0x27f46e;},_0x15c1(_0xe57672,_0x586ccd);}function _0x5948(){const _0x1d8ce1=['cleanupImage','contentLanguage','conversion','pluginName','uc-config','uploadcareImageReplace','isOfficialPlugin','input[uploadcare-file-input]','_initCtx','editor','ucContextId','closeMax','_ctxElement','for','schema','uc-upload-ctx-provider','1691705mniuYH','206520SwpgJH','render','iconHrefResolver','model','requires','replaceImageSource','insertImage','UploadcareEditing','fromCharCode','uploadcareImageId','getSelectedElement','once','32Zrjgkj','\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','removeAttribute','uploader-','78113rVKtTX','47330Ajmjdw','appendChild','136MrTmyw','ctxElement','execute','locale','document','remove','view','commands','listenTo','config','add','imageInline','uploadcare.uploader','_initImageProcessingIndicator','_initConfig','isRegistered','downcast','data-uc-image-id','destroy','true','uploadcare','uploadcare.pubkey','body','href','getAttribute','querySelector','configElement','15223900xzhfQG','_initConversion','_initSchema','_configElement','5nfvTlk','editing','#uc-icon-arrow-down','selection','init','elementToAttribute','upcast','isPremiumPlugin','imageBlock','PictureEditing','7001406HcEDZc','map','extend','afterInit','3474816mcTTTt','join','get','attributeToAttribute'];_0x5948=function(){return _0x1d8ce1;};return _0x5948();}export class UploadcareEditing extends _0x4c4fee{[_0xd416de(0x9a)]=null;[_0xd416de(0xb9)]=null;static get[_0xd416de(0xb0)](){const _0x2df56f=_0xd416de;return _0x2df56f(0xc5);}static get[_0xd416de(0xc2)](){const _0xd9c04d=_0xd416de;return[_0xd9c04d(0xa4),_0x4ce3fa,_0x1adfab];}static get[_0xd416de(0xb3)](){return!0x0;}static get[_0xd416de(0xa2)](){return!0x0;}[_0xd416de(0xb7)];get[_0xd416de(0x96)](){const _0x41278b=_0xd416de;return this[_0x41278b(0x9a)];}get[_0xd416de(0xd2)](){const _0x302114=_0xd416de;return this[_0x302114(0xb9)];}constructor(_0x5991e2){const _0x2b789b=_0xd416de;super(_0x5991e2),this[_0x2b789b(0xb7)]=_0x23e3f8();}[_0xd416de(0x9f)](){const _0x4e3099=_0xd416de,_0x18aece=this[_0x4e3099(0xb6)];_0x18aece[_0x4e3099(0x83)][_0x4e3099(0x86)](_0x4e3099(0x90),new _0x28c9a8(_0x18aece));}[_0xd416de(0xa8)](){const _0x1bbfca=_0xd416de;this[_0x1bbfca(0x99)](),this[_0x1bbfca(0x98)](),this[_0x1bbfca(0x8a)](),this[_0x1bbfca(0xb5)](),this[_0x1bbfca(0x89)](),this[_0x1bbfca(0x84)](this[_0x1bbfca(0xb6)],_0x1bbfca(0x8e),()=>{const _0x22a662=_0x1bbfca;this[_0x22a662(0x9a)]&&(this[_0x22a662(0x9a)][_0x22a662(0x81)](),this[_0x22a662(0x9a)]=null),this[_0x22a662(0xb9)]&&(this[_0x22a662(0xb9)][_0x22a662(0x81)](),this[_0x22a662(0xb9)]=null);const _0x3c6b8a=_0xd69da3[_0x22a662(0x80)][_0x22a662(0x95)](_0x22a662(0xb4));_0x3c6b8a&&_0x3c6b8a[_0x22a662(0x81)]();}),async function(_0x3565ad){const _0x4d9363=_0x5122ed([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]),_0x17e0bc=0x535f8c3a,_0x179255=0x5358f642^_0x17e0bc,_0x268be6=window[_0x5122ed([0x44,0x61,0x74,0x65])][_0x5122ed([0x6e,0x6f,0x77])](),_0x1c7585=_0x3565ad[_0x5122ed([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2541f1=new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1b4374=>{_0x1c7585[_0x5122ed([0x6f,0x6e,0x63,0x65])](_0x5122ed([0x72,0x65,0x61,0x64,0x79]),_0x1b4374);}),_0x4c4009={[_0x5122ed([0x6b,0x74,0x79])]:_0x5122ed([0x45,0x43]),[_0x5122ed([0x75,0x73,0x65])]:_0x5122ed([0x73,0x69,0x67]),[_0x5122ed([0x63,0x72,0x76])]:_0x5122ed([0x50,0x2d,0x32,0x35,0x36]),[_0x5122ed([0x78])]:_0x5122ed([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]),[_0x5122ed([0x79])]:_0x5122ed([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]),[_0x5122ed([0x61,0x6c,0x67])]:_0x5122ed([0x45,0x53,0x32,0x35,0x36])},_0x619ae3=_0x1c7585[_0x5122ed([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5122ed([0x67,0x65,0x74])](_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x510afe(){let _0x305707,_0x3392e9=null,_0xa1f92b=null;try{if(_0x619ae3==_0x5122ed([0x47,0x50,0x4c]))return _0x5122ed([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x305707=_0x5255fa(),!_0x305707)return _0x5122ed([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x305707[_0x5122ed([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xa1f92b=_0x29c11d(_0x305707[_0x5122ed([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x305707[_0x5122ed([0x6a,0x74,0x69])])),await _0x48ac59()?_0x4861be()?_0x3cf648()?_0x5122ed([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1b4d72()?(_0x305707[_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5122ed([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3392e9=_0xa8ad4d(_0x5122ed([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x305707[_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5122ed([0x74,0x72,0x69,0x61,0x6c])&&(_0x3392e9=_0xa8ad4d(_0x5122ed([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f16d6()):_0x5122ed([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5122ed([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5122ed([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5122ed([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3cf648(){const _0x131516=[_0x5122ed([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5122ed([0x74,0x72,0x69,0x61,0x6c])][_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x305707[_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x268be6/0x3e8:0xe10*_0x179255;return _0x305707[_0x5122ed([0x65,0x78,0x70])]<_0x131516;}function _0x4861be(){const _0x513533=_0x305707[_0x5122ed([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x513533&&(!!_0x513533[_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5122ed([0x2a]))||!!_0x513533[_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5122ed([0x55,0x50,0x4c,0x43])));}function _0x1b4d72(){const _0x10f1fa=_0x15c1,_0x1fe847=_0x305707[_0x5122ed([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1fe847||0x0==_0x1fe847[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3b45dc}=new URL(window[_0x5122ed([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x10f1fa(0x93)]);if(_0x1fe847[_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b45dc))return!0x0;const _0x118635=_0x3b45dc[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])](_0x5122ed([0x2e]));return _0x1fe847[_0x5122ed([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4f7b8a=>_0x4f7b8a[_0x5122ed([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5122ed([0x2a])))[_0x5122ed([0x6d,0x61,0x70])](_0x47f2ce=>_0x47f2ce[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])](_0x5122ed([0x2e])))[_0x5122ed([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3c77f3=>_0x3c77f3[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x118635[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5122ed([0x6d,0x61,0x70])](_0x439a50=>Array(_0x118635[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x439a50[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5122ed([0x66,0x69,0x6c,0x6c])](_0x439a50[0x0]===_0x5122ed([0x2a])?_0x5122ed([0x2a]):'')[_0x5122ed([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x439a50))[_0x5122ed([0x73,0x6f,0x6d,0x65])](_0x3c42ef=>_0x118635[_0x5122ed([0x65,0x76,0x65,0x72,0x79])]((_0x5cc3b1,_0x1f6feb)=>_0x3c42ef[_0x1f6feb]===_0x5cc3b1||_0x3c42ef[_0x1f6feb]===_0x5122ed([0x2a])));}function _0x2f16d6(){return _0x3392e9&&_0xa1f92b?new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59f338,_0x3e55ed)=>{_0x3392e9[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x59f338,_0x3e55ed),_0xa1f92b[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x2472f6=>{_0x2472f6!=_0x5122ed([0x56,0x61,0x6c,0x69,0x64])&&_0x59f338(_0x2472f6);},_0x3e55ed);}):_0x3392e9||_0xa1f92b||_0x5122ed([0x56,0x61,0x6c,0x69,0x64]);}}function _0x29c11d(_0x19eef9,_0x997a6a){return new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25510a=>{if(_0x589510())return _0x25510a(_0x5122ed([0x56,0x61,0x6c,0x69,0x64]));_0xc64d27(),_0x1c7585[_0x5122ed([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5122ed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x552600=!0x1;const _0x2facca=_0x23e3f8();function _0x49e375(_0xf5a6c8){return!!_0xf5a6c8&&(typeof _0xf5a6c8===_0x5122ed([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xf5a6c8===_0x5122ed([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xf5a6c8[_0x5122ed([0x74,0x68,0x65,0x6e])]===_0x5122ed([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xf5a6c8[_0x5122ed([0x63,0x61,0x74,0x63,0x68])]===_0x5122ed([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xd4e76b(_0x4ec719){_0x5f5aac(_0x4ec719)[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x37fdfd=>{if(!_0x37fdfd||_0x37fdfd[_0x5122ed([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5122ed([0x6f,0x6b]))return _0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x18aea1(_0xaf3793(_0x2facca+_0x997a6a))!=_0x37fdfd[_0x5122ed([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5122ed([0x56,0x61,0x6c,0x69,0x64]);})[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x4de30a=>(_0x16240d(),_0x4de30a),()=>{const _0x5564f7=_0x248f21();return null==_0x5564f7?(_0x16240d(),_0x5122ed([0x56,0x61,0x6c,0x69,0x64])):_0x5122ed(_0x268be6-_0x5564f7>(0x7753083a^_0x17e0bc)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x25510a)[_0x5122ed([0x63,0x61,0x74,0x63,0x68])](()=>{_0x25510a(_0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x419a2e=0x536962ba^_0x17e0bc;function _0x16240d(){const _0x2c63ed=_0x5122ed([0x6c,0x6c,0x63,0x74,0x2d])+_0x18aea1(_0xaf3793(_0x19eef9)),_0xb7eb02=_0x441814(_0x18aea1(window[_0x5122ed([0x4d,0x61,0x74,0x68])][_0x5122ed([0x63,0x65,0x69,0x6c])](_0x268be6/_0x419a2e)));window[_0x5122ed([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5122ed([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c63ed,_0xb7eb02);}function _0x248f21(){const _0x56446a=_0x5122ed([0x6c,0x6c,0x63,0x74,0x2d])+_0x18aea1(_0xaf3793(_0x19eef9)),_0x96a34e=window[_0x5122ed([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5122ed([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x56446a);return _0x96a34e?window[_0x5122ed([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x441814(_0x96a34e),0x10)*_0x419a2e:null;}function _0x5f5aac(_0x31351f){return new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x26c0dc,_0x221793)=>{_0x31351f[_0x5122ed([0x74,0x68,0x65,0x6e])](_0x26c0dc,_0x221793),window[_0x5122ed([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x221793,0x535e58fa^_0x17e0bc);});}}_0x1c7585[_0x5122ed([0x6f,0x6e])](_0x5122ed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x19ff40,_0x40d62d)=>{if(_0x40d62d[0x0]!=_0x19eef9)return _0x25510a(_0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x40d62d[0x1]={..._0x40d62d[0x1],[_0x5122ed([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2facca};},{[_0x5122ed([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5122ed([0x68,0x69,0x67,0x68])}),_0x1c7585[_0x5122ed([0x6f,0x6e])](_0x5122ed([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2fff7c=>{_0x49e375(_0x2fff7c[_0x5122ed([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x552600=!0x0,_0xd4e76b(_0x2fff7c[_0x5122ed([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5122ed([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5122ed([0x6c,0x6f,0x77])}),_0x2541f1[_0x5122ed([0x74,0x68,0x65,0x6e])](()=>{_0x552600||_0x25510a(_0x5122ed([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x589510(){return _0x1c7585[_0x5122ed([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5122ed([0x76,0x69,0x65,0x77])][_0x5122ed([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5122ed([0x61,0x75,0x74,0x6f]);}function _0xc64d27(){_0x1c7585[_0x5122ed([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5122ed([0x76,0x69,0x65,0x77])][_0x5122ed([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5122ed([0x61,0x75,0x74,0x6f]);}}function _0xa8ad4d(_0x492c5c){const _0xc7bd93=[new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x132cc9=>setTimeout(_0x132cc9,0x5356b2f6^_0x17e0bc)),_0x2541f1[_0x5122ed([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4bd839=>{let _0x59a556=0x0;_0x1c7585[_0x5122ed([0x6d,0x6f,0x64,0x65,0x6c])][_0x5122ed([0x6f,0x6e])](_0x5122ed([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5b31a1,_0x525ecd)=>{_0x525ecd[0x0][_0x5122ed([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x59a556++,_0x59a556==(0x535f8dc2^_0x17e0bc)&&(_0x4bd839(),_0x5b31a1[_0x5122ed([0x6f,0x66,0x66])]());});}))];return window[_0x5122ed([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5122ed([0x72,0x61,0x63,0x65])](_0xc7bd93)[_0x5122ed([0x74,0x68,0x65,0x6e])](()=>_0x492c5c);}async function _0x5288d5(){await _0x2541f1,_0x1c7585[_0x5122ed([0x6d,0x6f,0x64,0x65,0x6c])][_0x5122ed([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3637cc,_0x1c7585[_0x5122ed([0x6d,0x6f,0x64,0x65,0x6c])][_0x5122ed([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3637cc,_0x1c7585[_0x5122ed([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5122ed([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5bedbe(_0x59dce4){const _0x2a0f8c=_0x3c1691();_0x1c7585[_0x2a0f8c]=_0x5122ed([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x59dce4,_0x59dce4!=_0x5122ed([0x56,0x61,0x6c,0x69,0x64])&&_0x5288d5();}function _0x3c1691(){const _0xad175e=window[_0x5122ed([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5122ed([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5122ed([0x6e,0x6f,0x77])]())[_0x5122ed([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5122ed([0x2e]),'');let _0x325faa=_0x5122ed([0x68]);for(let _0x4bc5fa=0x0;_0x4bc5fa<_0xad175e[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4bc5fa+=0x2){let _0x54bd8e=window[_0x5122ed([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xad175e[_0x5122ed([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4bc5fa,_0x4bc5fa+0x2));_0x54bd8e>=_0x4d9363[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x54bd8e-=_0x4d9363[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x325faa+=_0x4d9363[_0x54bd8e];}return _0x325faa;}function _0x5255fa(){const _0x5af8c8=_0x619ae3[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])](_0x5122ed([0x2e]));if(0x3!=_0x5af8c8[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x591ef1(_0x5af8c8[0x1]);function _0x591ef1(_0x5a4462){const _0x14a4ac=_0x5e6f95(_0x5a4462);return _0x14a4ac&&_0x5794d5()?_0x14a4ac:null;function _0x5794d5(){const _0x2825ba=_0x14a4ac[_0x5122ed([0x6a,0x74,0x69])],_0xf24ef1=window[_0x5122ed([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2825ba[_0x5122ed([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2825ba[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5d2cc0={..._0x14a4ac,[_0x5122ed([0x6a,0x74,0x69])]:_0x2825ba[_0x5122ed([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2825ba[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5d2cc0[_0x5122ed([0x76,0x63])],_0xaf3793(_0x5d2cc0)==_0xf24ef1;}}}async function _0x48ac59(){let _0x2e14fa=!0x0;try{const _0x1914fe=_0x619ae3[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])](_0x5122ed([0x2e])),[_0xd93aec,_0x19bebe,_0x245221]=_0x1914fe;return _0x5bb384(_0xd93aec),await _0x181548(_0xd93aec,_0x19bebe,_0x245221),_0x2e14fa;}catch{return!0x1;}function _0x5bb384(_0x527ebe){const _0x358c6a=_0x5e6f95(_0x527ebe);_0x358c6a&&_0x358c6a[_0x5122ed([0x61,0x6c,0x67])]==_0x5122ed([0x45,0x53,0x32,0x35,0x36])||(_0x2e14fa=!0x1);}async function _0x181548(_0x1f3e3a,_0x3f8600,_0xc3c2c8){const _0x5e4dc5=window[_0x5122ed([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5122ed([0x66,0x72,0x6f,0x6d])](_0x67bba7(_0xc3c2c8),_0x35e016=>_0x35e016[_0x5122ed([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x23028=new window[(_0x5122ed([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5122ed([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1f3e3a+_0x5122ed([0x2e])+_0x3f8600),_0x43f8d8=window[_0x5122ed([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5122ed([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x43f8d8)return;const _0x34a198=await _0x43f8d8[_0x5122ed([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5122ed([0x6a,0x77,0x6b]),_0x4c4009,{[_0x5122ed([0x6e,0x61,0x6d,0x65])]:_0x5122ed([0x45,0x43,0x44,0x53,0x41]),[_0x5122ed([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5122ed([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5122ed([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x43f8d8[_0x5122ed([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5122ed([0x6e,0x61,0x6d,0x65])]:_0x5122ed([0x45,0x43,0x44,0x53,0x41]),[_0x5122ed([0x68,0x61,0x73,0x68])]:{[_0x5122ed([0x6e,0x61,0x6d,0x65])]:_0x5122ed([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x34a198,_0x5e4dc5,_0x23028)||(_0x2e14fa=!0x1);}}function _0x5e6f95(_0x5f59ac){return _0x5f59ac[_0x5122ed([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5122ed([0x65,0x79]))?JSON[_0x5122ed([0x70,0x61,0x72,0x73,0x65])](_0x67bba7(_0x5f59ac)):null;}function _0x67bba7(_0x1b05f3){return window[_0x5122ed([0x61,0x74,0x6f,0x62])](_0x1b05f3[_0x5122ed([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5122ed([0x2b]))[_0x5122ed([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5122ed([0x2f])));}function _0xaf3793(_0x40b80c){let _0x872a44=0x1505;function _0x5b5fe0(_0x59bf0a){for(let _0x2db10d=0x0;_0x2db10d<_0x59bf0a[_0x5122ed([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2db10d++){const _0x48b82f=_0x59bf0a[_0x5122ed([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2db10d);_0x872a44=(_0x872a44<<0x5)+_0x872a44+_0x48b82f,_0x872a44&=_0x872a44;}}function _0x4a6146(_0x4f8c55){Array[_0x5122ed([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f8c55)?_0x4f8c55[_0x5122ed([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4a6146):_0x4f8c55&&typeof _0x4f8c55==_0x5122ed([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5122ed([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f8c55)[_0x5122ed([0x73,0x6f,0x72,0x74])]()[_0x5122ed([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1c8d61,_0x1aeeeb])=>{_0x5b5fe0(_0x1c8d61),_0x4a6146(_0x1aeeeb);}):_0x5b5fe0(window[_0x5122ed([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f8c55));}return _0x4a6146(_0x40b80c),_0x872a44>>>0x0;}function _0x18aea1(_0x17e1d3){return _0x17e1d3[_0x5122ed([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5122ed([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5122ed([0x30]));}function _0x441814(_0x4fec9b){return _0x4fec9b[_0x5122ed([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5122ed([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5122ed([0x6a,0x6f,0x69,0x6e])]('');}function _0x3637cc(){}function _0x5122ed(_0x2850dc){const _0x2df30c=_0x15c1;return _0x2850dc[_0x2df30c(0xa6)](_0x16186f=>String[_0x2df30c(0xc6)](_0x16186f))[_0x2df30c(0xaa)]('');}_0x5bedbe(await _0x510afe());}(this);}[_0xd416de(0x99)](){const _0x1974ea=_0xd416de,_0x57390d=this[_0x1974ea(0xb6)][_0x1974ea(0xc1)][_0x1974ea(0xbb)];_0x57390d[_0x1974ea(0x8b)](_0x1974ea(0xa3))&&_0x57390d[_0x1974ea(0xa7)](_0x1974ea(0xa3),{'allowAttributes':[_0x1974ea(0xc7)]}),_0x57390d[_0x1974ea(0x8b)](_0x1974ea(0x87))&&_0x57390d[_0x1974ea(0xa7)](_0x1974ea(0x87),{'allowAttributes':[_0x1974ea(0xc7)]});}[_0xd416de(0x98)](){const _0x1bc77f=_0xd416de,_0x3c88e2=this[_0x1bc77f(0xb6)];_0x3c88e2[_0x1bc77f(0xaf)][_0x1bc77f(0xba)](_0x1bc77f(0x8c))[_0x1bc77f(0xac)]({'model':_0x1bc77f(0xc7),'view':_0x1bc77f(0x8d)}),_0x3c88e2[_0x1bc77f(0xaf)][_0x1bc77f(0xba)](_0x1bc77f(0xa1))[_0x1bc77f(0xa0)]({'model':{'key':_0x1bc77f(0xc7),'value':_0x3af3bf=>_0x3af3bf[_0x1bc77f(0x94)](_0x1bc77f(0x8d))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4e0ffa=_0x3c88e2[_0x1bc77f(0x83)][_0x1bc77f(0xab)](_0x1bc77f(0xc3));_0x4e0ffa&&this[_0x1bc77f(0x84)](_0x4e0ffa,_0x1bc77f(0xad),(_0x5ea0ab,[_0x451e45,_0x2f8592])=>{const _0x471df9=_0x1bc77f;_0x451e45[_0x471df9(0xcc)](_0x471df9(0xc7),_0x2f8592);});}[_0xd416de(0x8a)](){const _0x2e453d=_0xd416de,_0xb0b541=this[_0x2e453d(0xb6)][_0x2e453d(0x85)][_0x2e453d(0xab)](_0x2e453d(0x88))||{},_0x251c8b=this[_0x2e453d(0xb6)][_0x2e453d(0x85)][_0x2e453d(0xab)](_0x2e453d(0x91))||'';this[_0x2e453d(0x9a)]=_0x20e4bf(_0xd69da3[_0x2e453d(0x80)],_0x2e453d(0xb1),{..._0xb0b541,'pubkey':_0x251c8b,'ctx-name':_0x2e453d(0xcd)+this[_0x2e453d(0xb7)],'sourceList':'','imgOnly':_0x2e453d(0x8f),'removeCopyright':_0x2e453d(0x8f),'localeName':this[_0x2e453d(0xb6)][_0x2e453d(0xd4)][_0x2e453d(0xae)],'externalSourcesEmbedCss':_0x2e453d(0xcb)}),this[_0x2e453d(0x9a)][_0x2e453d(0xc0)]=_0x25d56f=>{const _0x14a561=_0x2e453d;if(_0x14a561(0xb8)==_0x25d56f)return _0x14a561(0x9d);},_0xd69da3[_0x2e453d(0x80)][_0x2e453d(0x92)][_0x2e453d(0xd0)](this[_0x2e453d(0x9a)]);}[_0xd416de(0xb5)](){const _0x3de3a9=_0xd416de;this[_0x3de3a9(0xb9)]=_0x20e4bf(_0xd69da3[_0x3de3a9(0x80)],_0x3de3a9(0xbc),{'ctx-name':_0x3de3a9(0xcd)+this[_0x3de3a9(0xb7)]}),_0xd69da3[_0x3de3a9(0x80)][_0x3de3a9(0x92)][_0x3de3a9(0xd0)](this[_0x3de3a9(0xb9)]);}[_0xd416de(0x89)](){const _0x3003a1=_0xd416de,_0x24825b=this[_0x3003a1(0xb6)][_0x3003a1(0x83)][_0x3003a1(0xab)](_0x3003a1(0xc4));_0x24825b&&this[_0x3003a1(0x84)](_0x24825b,_0x3003a1(0xd3),()=>{const _0x4f7e3c=_0x3003a1,_0x2a7e56=this[_0x4f7e3c(0xb6)][_0x4f7e3c(0xc1)][_0x4f7e3c(0x80)][_0x4f7e3c(0x9e)][_0x4f7e3c(0xc8)]();_0x2a7e56&&_0x2a7e56[_0x4f7e3c(0x94)](_0x4f7e3c(0xc7))&&this[_0x4f7e3c(0xb6)][_0x4f7e3c(0x9c)][_0x4f7e3c(0x82)][_0x4f7e3c(0xc9)](_0x4f7e3c(0xbf),()=>{const _0x4ed509=_0x4f7e3c;_0x3cc371(this[_0x4ed509(0xb6)],_0x2a7e56);});});const _0x12b107=this[_0x3003a1(0xb6)][_0x3003a1(0x83)][_0x3003a1(0xab)](_0x3003a1(0xb2));_0x12b107&&this[_0x3003a1(0x84)](_0x12b107,_0x3003a1(0xd3),()=>{const _0x2516f2=_0x3003a1,_0xd6a4aa=this[_0x2516f2(0xb6)][_0x2516f2(0xc1)][_0x2516f2(0x80)][_0x2516f2(0x9e)][_0x2516f2(0xc8)]();_0xd6a4aa&&_0xd6a4aa[_0x2516f2(0x94)](_0x2516f2(0xc7))&&this[_0x2516f2(0xb6)][_0x2516f2(0x9c)][_0x2516f2(0x82)][_0x2516f2(0xc9)](_0x2516f2(0xbf),()=>{const _0x1393ce=_0x2516f2;_0x3cc371(this[_0x1393ce(0xb6)],_0xd6a4aa);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x1e9db3,ObservableMixin as _0x56487f}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x497de4}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4bd577}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x91f81c}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x43d646}from'../../utils/uploadutils.js';import{getImageUrls as _0x9c86eb,getImageDimension as _0x529ef2}from'../../utils/editingutils.js';import{isAncestor as _0x4de160}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x56487f(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x420d7a,_0x1fd110,_0x39ec1d){super(),this['_editor']=_0x420d7a,this['_dialog']=_0x1fd110,this['_imageElement']=_0x39ec1d,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 _0x1c0d01=this['_imageElement'],_0x65796a=_0x1c0d01['getAttribute']('uploadcareImageId'),_0x3aedaa=_0x1c0d01['getAttribute']('src');if(_0x65796a)await this['_loadImageInfo'](_0x65796a,_0x3aedaa);else{if(this['_imageCache']['has'](_0x3aedaa)){const _0x1319ce=this['_imageCache']['get'](_0x3aedaa);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1319ce['url'],this['imageDimension']=_0x1319ce['dimension'],this['imageId']=_0x1319ce['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x41d339}=this['_editor'],t=_0x41d339['t'],_0x1ad18f=new _0x91f81c(_0x41d339,this['imageStatus'],this['_attributes']);_0x1ad18f['bind']('status')['to'](this,'imageStatus'),_0x1ad18f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1ad18f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1ad18f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1ad18f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4bd577,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1ad18f,'position':_0x497de4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1ad18f['focus']();},'onHide':()=>{_0x1ad18f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x241553=>!_0x4de160(_0x241553,_0x1ad18f['element'])}});}['_loadImageInfo'](_0x4b555c,_0x3e4856){return _0x43d646['getInfo'](_0x4b555c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x250fdb=>{const {width:_0x5496c4,height:_0x3e4303}=_0x250fdb['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3e4856,this['imageDimension']={'width':_0x5496c4,'height':_0x3e4303},this['imageId']=_0x4b555c;})['catch'](_0xe85cf9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xe85cf9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x43016f,_0x295a8d){return this['_getImageAsFile'](_0x43016f)['then'](_0x110699=>_0x43d646['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':_0x295a8d['signal'],'file':_0x110699,'onProgress':_0x1f1178=>{_0x1f1178&&_0x1f1178['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1f1178['value']));}}))['then'](_0x4a932b=>{const {width:_0x47e09d,height:_0x598e75}=_0x4a932b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4a932b['cdnUrl'],this['imageDimension']={'width':_0x47e09d,'height':_0x598e75},this['imageId']=_0x4a932b['uuid'],this['imageUploadProgress']=null;const _0x5a1dbd=_0x43016f['getAttribute']('src');this['_imageCache']['set'](_0x5a1dbd,{'id':_0x4a932b['uuid'],'url':_0x4a932b['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x9ceb57=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x9ceb57['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x288af6,_0x204bc0){_0x288af6['on']('apply',(_0x4fda38,_0x4df4cf)=>{this['_replaceImage'](_0x204bc0,_0x4df4cf['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x288af6['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x288af6['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x54835e,_0x540fff,_0x212ae6){const _0x21fd9e=this['_editor'],{width:_0x2f3504,height:_0x43a366}=_0x529ef2(_0x540fff,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3d92dd,imageSources:_0x5321a2}=_0x9c86eb(_0x540fff,_0x2f3504);_0x21fd9e['model']['change'](_0x565296=>{if('$graveyard'===_0x54835e['root']['rootName']){_0x21fd9e['execute']('insertImage',{'imageType':_0x54835e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x54835e['getAttributes']()),'uploadcareImageId':_0x212ae6,'src':_0x3d92dd,'sources':_0x5321a2,'width':_0x2f3504,'height':_0x43a366}});const _0x2f590c=_0x54835e['getChildren']();_0x54835e=_0x21fd9e['model']['document']['selection']['getSelectedElement']();for(const _0x31c4c9 of _0x2f590c)_0x565296['append'](_0x565296['cloneElement'](_0x31c4c9),_0x54835e);}else _0x565296['setSelection'](_0x54835e,'on'),_0x21fd9e['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x54835e['getAttributes']()),'uploadcareImageId':_0x212ae6,'src':_0x3d92dd,'sources':_0x5321a2,'width':_0x2f3504,'height':_0x43a366},_0x54835e);_0x565296['setSelection'](_0x54835e,'on');});}async['_getImageAsFile'](_0x6dcb6e){const _0x40dbf6=_0x1e9db3['window'],_0x3405ed=_0x1e9db3['document']['location']['href'],_0x2036fc=new _0x40dbf6['URL'](_0x6dcb6e['getAttribute']('src'),_0x3405ed);if('data:'===_0x2036fc['protocol']){const _0x4becbe=_0x2036fc['href']['split'](','),_0x3d92e8=_0x4becbe[0x0]['match'](/:(.*?);/)[0x1],_0x3e1900=_0x3d92e8['split']('/')[0x1],_0x20a502=_0x40dbf6['atob'](_0x4becbe[_0x4becbe['length']-0x1]);let _0x988cec=_0x20a502['length'];const _0x48ec90=new _0x40dbf6['Uint8Array'](_0x988cec);for(;_0x988cec--;)_0x48ec90[_0x988cec]=_0x20a502['charCodeAt'](_0x988cec);return new _0x40dbf6['File']([_0x48ec90],'image.'+_0x3e1900,{'type':_0x3d92e8});}const _0x30c5b3=_0x2036fc['href']['split']('/'),_0x25a753=_0x30c5b3[_0x30c5b3['length']-0x1],_0xfaf17=_0x25a753['split']('.')[0x1];return _0x40dbf6['fetch'](_0x2036fc['href'])['then'](_0x3b1e9f=>_0x3b1e9f['clone']()['blob']())['then'](_0x32200a=>new _0x40dbf6['File']([_0x32200a],_0x25a753,{'type':'image/'+_0xfaf17}));}}
23
+ import{global as _0x32342e,ObservableMixin as _0x29be2c}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x11da6a}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x1e7c15}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x3d037a}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x350ce1}from'../../utils/uploadutils.js';import{getImageUrls as _0x12c91f,getImageDimension as _0x4da9fc}from'../../utils/editingutils.js';import{isAncestor as _0x569f98}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x29be2c(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2e8b28,_0x5964c0,_0x1dec3b){super(),this['_editor']=_0x2e8b28,this['_dialog']=_0x5964c0,this['_imageElement']=_0x1dec3b,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 _0x5a8280=this['_imageElement'],_0x1168cb=_0x5a8280['getAttribute']('uploadcareImageId'),_0xf2c186=_0x5a8280['getAttribute']('src');if(_0x1168cb)await this['_loadImageInfo'](_0x1168cb,_0xf2c186);else{if(this['_imageCache']['has'](_0xf2c186)){const _0x16b71d=this['_imageCache']['get'](_0xf2c186);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x16b71d['url'],this['imageDimension']=_0x16b71d['dimension'],this['imageId']=_0x16b71d['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2f2848}=this['_editor'],t=_0x2f2848['t'],_0x251774=new _0x3d037a(_0x2f2848,this['imageStatus'],this['_attributes']);_0x251774['bind']('status')['to'](this,'imageStatus'),_0x251774['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x251774['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x251774['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x251774,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1e7c15,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x251774,'position':_0x11da6a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x251774['focus']();},'onHide':()=>{_0x251774['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x30759c=>!_0x569f98(_0x30759c,_0x251774['element'])}});}['_loadImageInfo'](_0x2438fd,_0x4fa207){return _0x350ce1['getInfo'](_0x2438fd,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x184fbd=>{const {width:_0x2a9293,height:_0x54138e}=_0x184fbd['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4fa207,this['imageDimension']={'width':_0x2a9293,'height':_0x54138e},this['imageId']=_0x2438fd;})['catch'](_0x11c4f8=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x11c4f8['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x303abf,_0x479cf5){return this['_getImageAsFile'](_0x303abf)['then'](_0x47e9d2=>_0x350ce1['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':_0x479cf5['signal'],'file':_0x47e9d2,'onProgress':_0x5e48e4=>{_0x5e48e4&&_0x5e48e4['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5e48e4['value']));}}))['then'](_0x4ff820=>{const {width:_0x30e71d,height:_0x1f90a9}=_0x4ff820['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4ff820['cdnUrl'],this['imageDimension']={'width':_0x30e71d,'height':_0x1f90a9},this['imageId']=_0x4ff820['uuid'],this['imageUploadProgress']=null;const _0x159a43=_0x303abf['getAttribute']('src');this['_imageCache']['set'](_0x159a43,{'id':_0x4ff820['uuid'],'url':_0x4ff820['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x191c42=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x191c42['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x405f01,_0x276819){_0x405f01['on']('apply',(_0x1adbf3,_0x2c3347)=>{this['_replaceImage'](_0x276819,_0x2c3347['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x405f01['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x405f01['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x579f09,_0x1b7d8f,_0x19795f){const _0x1898c9=this['_editor'],{width:_0x15a6f4,height:_0x5ac38c}=_0x4da9fc(_0x1b7d8f,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x94412c,imageSources:_0x272bc8}=_0x12c91f(_0x1b7d8f,_0x15a6f4);_0x1898c9['model']['change'](_0x1e4427=>{if('$graveyard'===_0x579f09['root']['rootName']){_0x1898c9['execute']('insertImage',{'imageType':_0x579f09['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x579f09['getAttributes']()),'uploadcareImageId':_0x19795f,'src':_0x94412c,'sources':_0x272bc8,'width':_0x15a6f4,'height':_0x5ac38c}});const _0x3839b6=_0x579f09['getChildren']();_0x579f09=_0x1898c9['model']['document']['selection']['getSelectedElement']();for(const _0x4d071e of _0x3839b6)_0x1e4427['append'](_0x1e4427['cloneElement'](_0x4d071e),_0x579f09);}else _0x1e4427['setSelection'](_0x579f09,'on'),_0x1898c9['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x579f09['getAttributes']()),'uploadcareImageId':_0x19795f,'src':_0x94412c,'sources':_0x272bc8,'width':_0x15a6f4,'height':_0x5ac38c},_0x579f09);_0x1e4427['setSelection'](_0x579f09,'on');});}async['_getImageAsFile'](_0x17db75){const _0x4e77f8=_0x32342e['window'],_0x125784=_0x32342e['document']['location']['href'],_0x1d1050=new _0x4e77f8['URL'](_0x17db75['getAttribute']('src'),_0x125784);if('data:'===_0x1d1050['protocol']){const _0x127b78=_0x1d1050['href']['split'](','),_0x4fcdb9=_0x127b78[0x0]['match'](/:(.*?);/)[0x1],_0x532e81=_0x4fcdb9['split']('/')[0x1],_0x3964c2=_0x4e77f8['atob'](_0x127b78[_0x127b78['length']-0x1]);let _0x7d8af8=_0x3964c2['length'];const _0x4ddcf4=new _0x4e77f8['Uint8Array'](_0x7d8af8);for(;_0x7d8af8--;)_0x4ddcf4[_0x7d8af8]=_0x3964c2['charCodeAt'](_0x7d8af8);return new _0x4e77f8['File']([_0x4ddcf4],'image.'+_0x532e81,{'type':_0x4fcdb9});}const _0x4a18b8=_0x1d1050['href']['split']('/'),_0x2a5cce=_0x4a18b8[_0x4a18b8['length']-0x1],_0x491b3e=_0x2a5cce['split']('.')[0x1];return _0x4e77f8['fetch'](_0x1d1050['href'])['then'](_0x4bb483=>_0x4bb483['clone']()['blob']())['then'](_0x3281eb=>new _0x4e77f8['File']([_0x3281eb],_0x2a5cce,{'type':'image/'+_0x491b3e}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (function(_0x5b1c29,_0x48157f){const _0x12cc1c=_0x89d1,_0x1eaf59=_0x5b1c29();while(!![]){try{const _0x22c240=-parseInt(_0x12cc1c(0x118))/0x1+-parseInt(_0x12cc1c(0x10a))/0x2*(parseInt(_0x12cc1c(0x11a))/0x3)+parseInt(_0x12cc1c(0x113))/0x4+-parseInt(_0x12cc1c(0x119))/0x5*(-parseInt(_0x12cc1c(0x110))/0x6)+parseInt(_0x12cc1c(0x10b))/0x7*(parseInt(_0x12cc1c(0x111))/0x8)+parseInt(_0x12cc1c(0x112))/0x9+-parseInt(_0x12cc1c(0x10d))/0xa;if(_0x22c240===_0x48157f)break;else _0x1eaf59['push'](_0x1eaf59['shift']());}catch(_0x567a5a){_0x1eaf59['push'](_0x1eaf59['shift']());}}}(_0x356b,0xefcf7));import{View as _0x40202e}from'ckeditor5/src/ui.js';function _0x356b(){const _0x1e1e23=['18EKzwlB','7Ajkqcl','bindTemplate','12580380pCKkSI','imageSrc','setTemplate','30qBYzDz','5003896yXtKDT','807534XCsaLr','2704804bLzpQN','ck-uploadcare-theme','uc-cloud-image-editor','uc-light','set','357163bCDpLV','1224995YAFXis','6315NnmZwz','image-edit'];_0x356b=function(){return _0x1e1e23;};return _0x356b();}function _0x89d1(_0x362980,_0x3a07e2){const _0x356b3d=_0x356b();return _0x89d1=function(_0x89d13c,_0x3c93d1){_0x89d13c=_0x89d13c-0x10a;let _0x14ab7e=_0x356b3d[_0x89d13c];return _0x14ab7e;},_0x89d1(_0x362980,_0x3a07e2);}export class UploadcareImageEditFormEditingView extends _0x40202e{constructor(_0x9d88ff,_0x167e33){const _0x14accd=_0x89d1;super(_0x9d88ff);const _0x275d5b=this[_0x14accd(0x10c)];this[_0x14accd(0x117)](_0x14accd(0x10e),''),this[_0x14accd(0x10f)]({'tag':_0x14accd(0x115),'attributes':{..._0x167e33,'class':[_0x14accd(0x116),_0x14accd(0x114)],'ctx-name':_0x14accd(0x11b),'cdn-url':_0x275d5b['to'](_0x14accd(0x10e))}});}}
23
+ function _0x4c8d(_0x2de57a,_0x57c28f){const _0x563090=_0x5630();return _0x4c8d=function(_0x4c8d4e,_0x546d37){_0x4c8d4e=_0x4c8d4e-0xa4;let _0x2f031d=_0x563090[_0x4c8d4e];return _0x2f031d;},_0x4c8d(_0x2de57a,_0x57c28f);}(function(_0x136795,_0x30cce8){const _0x49ba03=_0x4c8d,_0x2330ad=_0x136795();while(!![]){try{const _0x6459c4=parseInt(_0x49ba03(0xb0))/0x1*(parseInt(_0x49ba03(0xb4))/0x2)+parseInt(_0x49ba03(0xa6))/0x3*(-parseInt(_0x49ba03(0xaa))/0x4)+parseInt(_0x49ba03(0xaf))/0x5+parseInt(_0x49ba03(0xac))/0x6+parseInt(_0x49ba03(0xb5))/0x7+parseInt(_0x49ba03(0xa5))/0x8*(-parseInt(_0x49ba03(0xb3))/0x9)+-parseInt(_0x49ba03(0xb2))/0xa;if(_0x6459c4===_0x30cce8)break;else _0x2330ad['push'](_0x2330ad['shift']());}catch(_0xfc5f4){_0x2330ad['push'](_0x2330ad['shift']());}}}(_0x5630,0xbc024));import{View as _0x45418f}from'ckeditor5/src/ui.js';function _0x5630(){const _0x338422=['6201PbSDzF','bindTemplate','ck-uploadcare-theme','uc-light','344qoawDI','uc-cloud-image-editor','8897862lqhvSe','setTemplate','image-edit','6137000nlzDTS','37gszNnB','set','15437190rgAoLb','4122aaAnFl','11238kmEgXt','3569265jacyvY','imageSrc','16360SUHsSh'];_0x5630=function(){return _0x338422;};return _0x5630();}export class UploadcareImageEditFormEditingView extends _0x45418f{constructor(_0x513626,_0x174f46){const _0x3b3883=_0x4c8d;super(_0x513626);const _0x2db864=this[_0x3b3883(0xa7)];this[_0x3b3883(0xb1)](_0x3b3883(0xa4),''),this[_0x3b3883(0xad)]({'tag':_0x3b3883(0xab),'attributes':{..._0x174f46,'class':[_0x3b3883(0xa9),_0x3b3883(0xa8)],'ctx-name':_0x3b3883(0xae),'cdn-url':_0x2db864['to'](_0x3b3883(0xa4))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x152b5e}from'ckeditor5/src/icons.js';import{ButtonView as _0x3a3afe,IconView as _0x47c0b5,View as _0x5c1bb7}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x5c1bb7{constructor(_0x3ea8a8){super(_0x3ea8a8);const t=_0x3ea8a8['t'];this['set']('errorType',null);const _0x2a03ea=new _0x3a3afe(_0x3ea8a8);_0x2a03ea['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2a03ea['withText']=!0x0,_0x2a03ea['class']='ck-button-action',_0x2a03ea['on']('execute',()=>{this['fire']('retry');}),_0x2a03ea['bind']('isVisible')['to'](this,'errorType',_0xe5bf86=>'NotFound'!==_0xe5bf86);const _0x5df61e=new _0x47c0b5();_0x5df61e['content']=_0x152b5e,_0x5df61e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x7e7db4=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':[_0x5df61e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x7e7db4['to']('errorType',_0x1f76fa=>t('NotFound'!==_0x1f76fa?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2a03ea]},{'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 _0x2c43cb}from'ckeditor5/src/icons.js';import{ButtonView as _0x167ece,IconView as _0x2dd70b,View as _0x13a0ee}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x13a0ee{constructor(_0x1ea025){super(_0x1ea025);const t=_0x1ea025['t'];this['set']('errorType',null);const _0x304cc3=new _0x167ece(_0x1ea025);_0x304cc3['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x304cc3['withText']=!0x0,_0x304cc3['class']='ck-button-action',_0x304cc3['on']('execute',()=>{this['fire']('retry');}),_0x304cc3['bind']('isVisible')['to'](this,'errorType',_0x422872=>'NotFound'!==_0x422872);const _0x4a7121=new _0x2dd70b();_0x4a7121['content']=_0x2c43cb,_0x4a7121['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x99b1ae=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':[_0x4a7121,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x99b1ae['to']('errorType',_0x50e9d2=>t('NotFound'!==_0x50e9d2?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x304cc3]},{'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'}]}]}]});}}