@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251012.0 → 0.0.0-nightly-20251013.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,6 +20,6 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x258bb9,Command as _0x546caf}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x1ea53e,IconGooglePhotos as _0x5352ab,IconGoogleDrive as _0x14c72d,IconFacebook as _0x442d12,IconDropbox as _0x266c23,IconUploadcareLink as _0x1608cb,IconUploadcareImageUpload as _0xd94a4d,IconError as _0x657aa0,IconUploadcareImageEdit as _0x2ff4df}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xc427b7,MenuBarMenuListItemButtonView as _0x553ec7,View as _0x53a3ac,FocusCycler as _0x7158dd,Dialog as _0x332b40,DialogViewPosition as _0x6aa5f7,SpinnerView as _0x4f34d2,IconView as _0x4d2d30,Notification as _0x3cca75}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x3829f8,DomEmitterMixin as _0x2817ee,global as _0x41af39,getAncestors as _0x30c1cd,ObservableMixin as _0x318366,uid as _0x1dc706,createElement as _0x396a1f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x5c7bc1}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x4497ba,info as _0x43651d}from'@uploadcare/upload-client';import*as _0x285eda from'@uploadcare/file-uploader';var i=function(_0x551f98){return _0x551f98['Local']='local',_0x551f98['URL']='url',_0x551f98['Dropbox']='dropbox',_0x551f98['GDrive']='gdrive',_0x551f98['Facebook']='facebook',_0x551f98['GPhotos']='gphotos',_0x551f98['OneDrive']='onedrive',_0x551f98;}({});function _(_0x182a76,_0x135a73,_0x5ee68e){const t=_0x182a76['t'],_0xc9a8e3=_0x182a76['t'];switch(_0x135a73){case i['Local']:return{'text':_0xc9a8e3('Insert'===_0x5ee68e?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0xc9a8e3('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x5ee68e?_0xc9a8e3('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0xc9a8e3('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x5ee68e?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x5ee68e?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x5ee68e?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x5ee68e?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x5ee68e?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x135a73;}}class e extends _0x258bb9{['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 _0x1daaf9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x57fa15;for(const _0xa7081c in _0x1daaf9){const _0x17b5db=_0xa7081c,_0x1843d8=_0x1daaf9[_0x17b5db];if('uploadcareLicenseKeyValid'==_0x1843d8||'uploadcareLicenseKeyInvalid'==_0x1843d8||'uploadcareLicenseKeyExpired'==_0x1843d8||'uploadcareLicenseKeyDomainLimit'==_0x1843d8||'uploadcareLicenseKeyNotAllowed'==_0x1843d8||'uploadcareLicenseKeyEvaluationLimit'==_0x1843d8||'uploadcareLicenseKeyTrialLimit'==_0x1843d8||'uploadcareLicenseKeyUsageLimit'==_0x1843d8){delete _0x1daaf9[_0x17b5db],_0x57fa15=_0x1843d8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x57fa15&&_0x1daaf9['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x57fa15&&_0x1daaf9['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x57fa15&&_0x1daaf9['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x57fa15&&_0x1daaf9['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x57fa15&&_0x1daaf9['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x57fa15&&_0x1daaf9['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x57fa15&&_0x1daaf9['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x216ce1}=this,_0x531d94=_0x216ce1['commands']['get']('uploadcare');if(!_0x531d94)return;const _0x3e65e8=this['_normalizeConfigSourceList'](_0x216ce1['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x35f8a8,_0x59c4b5)=>{const _0x2ffae5=this['_getIntegrationKey'](_0x59c4b5['type']);return _0x35f8a8[_0x2ffae5]||(_0x35f8a8[_0x2ffae5]=[]),_0x35f8a8[_0x2ffae5]['push'](_0x59c4b5),_0x35f8a8;},{});_0x216ce1['plugins']['has']('ImageInsertUI')&&_0x216ce1['commands']['get']('uploadcare')&&Object['entries'](_0x3e65e8)['forEach'](([_0xee82ca,_0x3024a0])=>{_0x216ce1['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0xee82ca,'observable':()=>_0x531d94,'buttonViewCreator':()=>this['_createToolbarButton'](_0x3024a0),'formViewCreator':()=>this['_createDropdownButtons'](_0x3024a0),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x3024a0),'override':'assetManager'!==_0xee82ca});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x53914){const {locale:_0x2b3663}=this['editor'];return _0x53914['map'](_0x38dd52=>{const _0x2ffae4=_(_0x2b3663,_0x38dd52,'Insert');switch(_0x38dd52){case i['Local']:return{'icon':_0xd94a4d,'type':i['Local'],..._0x2ffae4};case i['URL']:return{'icon':_0x1608cb,'type':i['URL'],..._0x2ffae4};case i['Dropbox']:return{'icon':_0x266c23,'type':i['Dropbox'],..._0x2ffae4};case i['Facebook']:return{'icon':_0x442d12,'type':i['Facebook'],..._0x2ffae4};case i['GDrive']:return{'icon':_0x14c72d,'type':i['GDrive'],..._0x2ffae4};case i['GPhotos']:return{'icon':_0x5352ab,'type':i['GPhotos'],..._0x2ffae4};case i['OneDrive']:return{'icon':_0x1ea53e,'type':i['OneDrive'],..._0x2ffae4};}});}['_getIntegrationKey'](_0x48de52){switch(_0x48de52){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x171606,_0x581426){const _0x51651e=this['editor'],_0x43cb9f=new _0x171606(_0x51651e['locale']),_0x4485cc=_0x51651e['commands']['get']('uploadcare');return _0x43cb9f['bind']('isEnabled')['to'](_0x4485cc),_0x43cb9f['on']('execute',()=>{_0x4485cc['execute'](_0x581426);}),_0x43cb9f;}['_createToolbarButton'](_0x1a15b2){const {locale:_0x3cc74a}=this['editor'],_0x5acc96=this['editor']['plugins']['get']('ImageInsertUI'),_0x390ee7=_0x1a15b2[0x0],_0x53ac99=this['_createButton'](_0xc427b7,_0x390ee7['type']);return _0x53ac99['icon']=_0x390ee7['icon'],_0x53ac99['bind']('label')['to'](_0x5acc96,'isImageSelected',_0x1e429a=>_(_0x3cc74a,_0x390ee7['type'],_0x1e429a?'Replace':'Insert')['text']),_0x53ac99['tooltip']=!0x0,_0x53ac99;}['_createDropdownButtons'](_0x5660f2){const {locale:_0x194ab3}=this['editor'],_0x2a70fa=this['editor']['plugins']['get']('ImageInsertUI');return _0x5660f2['map'](_0x11dc8c=>{const _0xe5c060=this['_createButton'](_0xc427b7,_0x11dc8c['type']);return _0xe5c060['withText']=!0x0,_0xe5c060['icon']=_0x11dc8c['icon'],_0xe5c060['bind']('label')['to'](_0x2a70fa,'isImageSelected',_0x14521d=>_(_0x194ab3,_0x11dc8c['type'],_0x14521d?'Replace':'Insert')['text']),_0xe5c060;});}['_createMenuBarButtons'](_0x241a97){return _0x241a97['map'](_0x41288c=>{const _0x34e474=this['_createButton'](_0x553ec7,_0x41288c['type']);return _0x34e474['icon']=_0x41288c['icon'],_0x34e474['label']=_0x41288c['shortText'],_0x34e474;});}}class F extends _0x53a3ac{['focusTracker'];['focusCycler'];constructor(_0x4ab6a7){super(_0x4ab6a7),this['focusTracker']=new _0x3829f8(),this['focusCycler']=new _0x7158dd({'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(_0x31482f,_0x4c9cd9){super(_0x31482f),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-'+_0x4c9cd9}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0xc77e57,_0x382406){const _0x50ce5c=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x199dc4=>_0x199dc4<=_0x382406)['map'](_0x3387db=>_0xc77e57['replace'](/\/$/,'')+'/-/resize/'+_0x3387db+'x/\x20'+_0x3387db+'w');return{'imageFallbackUrl':_0xc77e57,'imageSources':[{'srcset':_0x50ce5c['join'](',\x20'),'sizes':'(max-width:\x20'+_0x382406+'px)\x20100vw,\x20'+_0x382406+'px','type':'image/webp'}]};}function S(_0xf49ce7,_0xc0c53d,_0x2dd633){const _0x48bb56=_0xf49ce7['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x48bb56?parseInt(_0x48bb56[0x1],0xa):_0xc0c53d,'height':_0x48bb56?parseInt(_0x48bb56[0x2],0xa):_0x2dd633};}function p(_0x5ca0eb,_0x112aef){const _0x557cf8=new(_0x2817ee())(),_0xe9144f=_0x5ca0eb['plugins']['get']('ImageUtils'),_0x54c0d2=_0x5ca0eb['editing']['mapper']['toViewElement'](_0x112aef),_0x81e9c4=_0xe9144f['findViewImgElement'](_0x54c0d2),_0x2b0b3c=_0x5ca0eb['editing']['view']['domConverter']['viewToDom'](_0x81e9c4),_0x25ff72=_0x112aef['getAttribute']('width'),_0x3b44f7=_0x112aef['getAttribute']('height'),_0x52f756='image-processing';_0x5ca0eb['editing']['view']['change'](_0x2607bd=>{_0x2607bd['addClass'](_0x52f756,_0x54c0d2),_0x2607bd['setStyle']('aspect-ratio',_0x25ff72+'/'+_0x3b44f7,_0x81e9c4);}),_0x557cf8['listenTo'](_0x2b0b3c,'load',()=>{_0x557cf8['stopListening'](_0x2b0b3c,'load'),_0x5ca0eb['editing']['view']['change'](_0x55d4b5=>{_0x55d4b5['removeClass'](_0x52f756,_0x54c0d2),_0x55d4b5['removeStyle']('aspect-ratio',_0x81e9c4);});});}function z(_0x25e6d4){if(Array['isArray'](_0x25e6d4)){const _0x3181ac=_0x25e6d4['map'](z);return _0x2e777a=>_0x3181ac['some'](_0x54def9=>_0x54def9(_0x2e777a));}if('origin'==_0x25e6d4){const _0x32d61e=_0x41af39['window']['location']['origin'];return _0x4379a8=>new URL(_0x4379a8,_0x41af39['document']['baseURI'])['origin']==_0x32d61e;}return'function'==typeof _0x25e6d4?_0x25e6d4:_0x25e6d4 instanceof RegExp?_0xff8dde=>!(!_0xff8dde['match'](_0x25e6d4)&&!_0xff8dde['replace'](/^https?:\/\//,'')['match'](_0x25e6d4)):()=>!0x1;}function A(_0x1542f6,_0x3910ab){return _0x30c1cd(_0x1542f6['target'])['includes'](_0x3910ab);}class n extends/* #__PURE__ -- @preserve */
24
- _0x318366(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2c26c6,_0x10a7b1,_0x5003e7){super(),this['_editor']=_0x2c26c6,this['_editing']=_0x10a7b1,this['_dialog']=_0x2c26c6['plugins']['get'](_0x332b40),this['_api']=_0x10a7b1['ctxElement']['getAPI'](),this['_type']=_0x5003e7,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:_0x9dd42b,model:_0x566e97}=this['_editor'],_0x1591cb=_0x566e97['document']['selection']['getSelectedElement'](),_0x63591e=_0x1591cb&&(_0x1591cb['is']('element','imageBlock')||_0x1591cb['is']('element','imageInline'));this['_formView']=new x(_0x9dd42b,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0xd94a4d,'title':_(_0x9dd42b,this['_type'],_0x63591e?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x6aa5f7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x442070=>!A(_0x442070,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0xe73be8}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x24b47b=>{const _0x2a713b=_0xe73be8['length'];for(const _0x1ce6d5 of _0xe73be8){const _0x4c8936=_0x1ce6d5===_0xe73be8[_0x2a713b-0x1],{cdnUrl:_0x2cb184,fileInfo:_0x123403}=_0x1ce6d5;if(!_0x2cb184||!_0x123403)continue;const {width:_0x10355f,height:_0xdedab3}=_0x123403['imageInfo'],_0x3ab75a=S(_0x2cb184,_0x10355f,_0xdedab3),_0x3ec7d4=C(_0x2cb184,_0x3ab75a['width']),_0x2eea94={'id':_0x123403['uuid'],'type':'image','attributes':{'imageDimension':_0x3ab75a,..._0x3ec7d4}};this['_insertAsset'](_0x2eea94,_0x4c8936,_0x24b47b);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2c0f49=>{'idle'===_0x2c0f49['detail']['status']&&!_0x2c0f49['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x44fe2e,_0x1df71c,_0x2a6120){const _0x230fe6=this['_editor']['model']['document']['selection'],_0x435db6=_0x230fe6['getSelectedElement'](),_0x509021=!(!_0x435db6||!_0x435db6['is']('element','imageInline'));_0x2a6120['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x44fe2e,_0x509021),_0x1df71c||_0x2a6120['setSelection'](_0x230fe6['getLastPosition']());}['_insertImage'](_0x3a35de,_0x41ca88){const _0x4cf790=this['_editor'],{imageDimension:_0x12635f,imageFallbackUrl:_0x26d0fe,imageSources:_0x21e83c}=_0x3a35de['attributes'];_0x4cf790['execute']('insertImage',{'imageType':_0x41ca88?'imageInline':null,'source':{'uploadcareImageId':_0x3a35de['id'],'src':_0x26d0fe,'sources':_0x21e83c,..._0x12635f}});}}class w extends _0x546caf{['_editing'];['_controller']=null;static get['requires'](){return[_0x332b40,o];}constructor(_0x42d051){super(_0x42d051),this['_editing']=_0x42d051['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x731f62){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x731f62);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x495af0,..._0x292f56}){return _0x4497ba(_0x495af0,_0x292f56);}static['getInfo'](_0x4d9b12,_0x8aaee6){return _0x43651d(_0x4d9b12,_0x8aaee6);}}class f extends _0x258bb9{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x5c7bc1,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x4bc7a5=this['editor'];if(!!!_0x4bc7a5['config']['get']('uploadcare'))return;_0x4bc7a5['plugins']['get'](_0x5c7bc1)['createUploadAdapter']=_0x1ecef2=>new k(_0x1ecef2,_0x4bc7a5),_0x4bc7a5['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x45df18,{imageElement:_0x2f976f,data:_0x6ae417})=>{_0x4bc7a5['model']['change'](_0xc889b7=>{_0xc889b7['setAttribute']('uploadcareImageId',_0x6ae417['uploadcareImageId'],_0x2f976f);});});}}class k{['loader'];['editor'];['controller'];constructor(_0xd7ff64,_0x2f1f6a){this['loader']=_0xd7ff64,this['editor']=_0x2f1f6a,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x27cc46=await this['loader']['file'];return j['upload']({'file':_0x27cc46,'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':_0x10b16b=>{_0x10b16b&&_0x10b16b['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x10b16b['value']);}})['then'](async _0x4d6aa4=>{const {imageFallbackUrl:_0x4df639,imageSources:_0x805b84}=C(_0x4d6aa4['cdnUrl'],_0x4d6aa4['imageInfo']['width']);return{'uploadcareImageId':_0x4d6aa4['uuid'],'default':_0x4df639,'sources':_0x805b84};})['catch'](()=>{const _0xb165b6=t('Cannot\x20upload\x20file:')+('\x20'+_0x27cc46['name']+'.');return Promise['reject'](_0xb165b6);});}['abort'](){this['controller']['abort']();}}class o extends _0x258bb9{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x332b40];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x15fd11){super(_0x15fd11),this['ucContextId']=_0x1dc706();}['init'](){const _0x2b8c0c=this['editor'];_0x2b8c0c['commands']['add']('uploadcare',new w(_0x2b8c0c));}['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 _0x1ad13c=_0x41af39['document']['querySelector']('input[uploadcare-file-input]');_0x1ad13c&&_0x1ad13c['remove']();}),async function(_0xa66276){const _0x4a0014=_0x5bcf44([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x229391=0x3d8d0df,_0x34974b=0x3dfa527^_0x229391,_0x482ce7=window[_0x5bcf44([0x44,0x61,0x74,0x65])][_0x5bcf44([0x6e,0x6f,0x77])](),_0x5878aa=_0xa66276[_0x5bcf44([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x567a2d=new window[(_0x5bcf44([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ebc33=>{_0x5878aa[_0x5bcf44([0x6f,0x6e,0x63,0x65])](_0x5bcf44([0x72,0x65,0x61,0x64,0x79]),_0x5ebc33);}),_0xfef786={[_0x5bcf44([0x6b,0x74,0x79])]:_0x5bcf44([0x45,0x43]),[_0x5bcf44([0x75,0x73,0x65])]:_0x5bcf44([0x73,0x69,0x67]),[_0x5bcf44([0x63,0x72,0x76])]:_0x5bcf44([0x50,0x2d,0x32,0x35,0x36]),[_0x5bcf44([0x78])]:_0x5bcf44([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]),[_0x5bcf44([0x79])]:_0x5bcf44([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]),[_0x5bcf44([0x61,0x6c,0x67])]:_0x5bcf44([0x45,0x53,0x32,0x35,0x36])},_0x2b6c8c=_0x5878aa[_0x5bcf44([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5bcf44([0x67,0x65,0x74])](_0x5bcf44([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5142cf(){let _0x3f3cba,_0x4c3773=null,_0x1ea17e=null;try{if(_0x2b6c8c==_0x5bcf44([0x47,0x50,0x4c]))return _0x5bcf44([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3f3cba=_0x2ae57d(),!_0x3f3cba)return _0x5bcf44([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3f3cba[_0x5bcf44([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1ea17e=_0x3b423a(_0x3f3cba[_0x5bcf44([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3f3cba[_0x5bcf44([0x6a,0x74,0x69])])),await _0x3d3936()?_0x53625d()?_0x6f436e()?_0x5bcf44([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x240271()?(_0x3f3cba[_0x5bcf44([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5bcf44([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4c3773=_0x272d9e(_0x5bcf44([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3f3cba[_0x5bcf44([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5bcf44([0x74,0x72,0x69,0x61,0x6c])&&(_0x4c3773=_0x272d9e(_0x5bcf44([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x54cc3b()):_0x5bcf44([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5bcf44([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5bcf44([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5bcf44([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x6f436e(){const _0x4f20e2=[_0x5bcf44([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5bcf44([0x74,0x72,0x69,0x61,0x6c])][_0x5bcf44([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f3cba[_0x5bcf44([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x482ce7/0x3e8:0xe10*_0x34974b;return _0x3f3cba[_0x5bcf44([0x65,0x78,0x70])]<_0x4f20e2;}function _0x53625d(){const _0x2c0e2b=_0x3f3cba[_0x5bcf44([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2c0e2b&&(!!_0x2c0e2b[_0x5bcf44([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5bcf44([0x2a]))||!!_0x2c0e2b[_0x5bcf44([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5bcf44([0x55,0x50,0x4c,0x43])));}function _0x240271(){const _0x3ddc1c=_0x3f3cba[_0x5bcf44([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3ddc1c||0x0==_0x3ddc1c[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x455d61}=new URL(window[_0x5bcf44([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3ddc1c[_0x5bcf44([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x455d61))return!0x0;const _0x39b02d=_0x455d61[_0x5bcf44([0x73,0x70,0x6c,0x69,0x74])](_0x5bcf44([0x2e]));return _0x3ddc1c[_0x5bcf44([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2c69f5=>_0x2c69f5[_0x5bcf44([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5bcf44([0x2a])))[_0x5bcf44([0x6d,0x61,0x70])](_0x26e484=>_0x26e484[_0x5bcf44([0x73,0x70,0x6c,0x69,0x74])](_0x5bcf44([0x2e])))[_0x5bcf44([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x553612=>_0x553612[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x39b02d[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5bcf44([0x6d,0x61,0x70])](_0x50c35a=>Array(_0x39b02d[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x50c35a[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5bcf44([0x66,0x69,0x6c,0x6c])](_0x50c35a[0x0]===_0x5bcf44([0x2a])?_0x5bcf44([0x2a]):'')[_0x5bcf44([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x50c35a))[_0x5bcf44([0x73,0x6f,0x6d,0x65])](_0x3c0910=>_0x39b02d[_0x5bcf44([0x65,0x76,0x65,0x72,0x79])]((_0x318d26,_0x7861ff)=>_0x3c0910[_0x7861ff]===_0x318d26||_0x3c0910[_0x7861ff]===_0x5bcf44([0x2a])));}function _0x54cc3b(){return _0x4c3773&&_0x1ea17e?new window[(_0x5bcf44([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3675f5,_0x44252a)=>{_0x4c3773[_0x5bcf44([0x74,0x68,0x65,0x6e])](_0x3675f5,_0x44252a),_0x1ea17e[_0x5bcf44([0x74,0x68,0x65,0x6e])](_0x52c2e9=>{_0x52c2e9!=_0x5bcf44([0x56,0x61,0x6c,0x69,0x64])&&_0x3675f5(_0x52c2e9);},_0x44252a);}):_0x4c3773||_0x1ea17e||_0x5bcf44([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3b423a(_0x4cd5d3,_0x33d7f7){return new window[(_0x5bcf44([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x14934d=>{if(_0x5e515b())return _0x14934d(_0x5bcf44([0x56,0x61,0x6c,0x69,0x64]));_0xe0f6bf(),_0x5878aa[_0x5bcf44([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5bcf44([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3afd35=!0x1;const _0x39ac8a=_0x1dc706();function _0x1552e3(_0x30f709){return!!_0x30f709&&(typeof _0x30f709===_0x5bcf44([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x30f709===_0x5bcf44([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x30f709[_0x5bcf44([0x74,0x68,0x65,0x6e])]===_0x5bcf44([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x30f709[_0x5bcf44([0x63,0x61,0x74,0x63,0x68])]===_0x5bcf44([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5a187c(_0x5c7d32){_0x1ca7c6(_0x5c7d32)[_0x5bcf44([0x74,0x68,0x65,0x6e])](_0x1e822c=>{if(!_0x1e822c||_0x1e822c[_0x5bcf44([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5bcf44([0x6f,0x6b]))return _0x5bcf44([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1cf1be(_0x11ff8e(_0x39ac8a+_0x33d7f7))!=_0x1e822c[_0x5bcf44([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5bcf44([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5bcf44([0x56,0x61,0x6c,0x69,0x64]);})[_0x5bcf44([0x74,0x68,0x65,0x6e])](_0x33225c=>(_0x5a9c3(),_0x33225c),()=>{const _0x337991=_0x1aa566();return null==_0x337991?(_0x5a9c3(),_0x5bcf44([0x56,0x61,0x6c,0x69,0x64])):_0x5bcf44(_0x482ce7-_0x337991>(0x27d454df^_0x229391)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5bcf44([0x74,0x68,0x65,0x6e])](_0x14934d)[_0x5bcf44([0x63,0x61,0x74,0x63,0x68])](()=>{_0x14934d(_0x5bcf44([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x29d598=0x3ee3e5f^_0x229391;function _0x5a9c3(){const _0x4c6347=_0x5bcf44([0x6c,0x6c,0x63,0x74,0x2d])+_0x1cf1be(_0x11ff8e(_0x4cd5d3)),_0x5594cd=_0x18172d(_0x1cf1be(window[_0x5bcf44([0x4d,0x61,0x74,0x68])][_0x5bcf44([0x63,0x65,0x69,0x6c])](_0x482ce7/_0x29d598)));window[_0x5bcf44([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5bcf44([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4c6347,_0x5594cd);}function _0x1aa566(){const _0x167cbb=_0x5bcf44([0x6c,0x6c,0x63,0x74,0x2d])+_0x1cf1be(_0x11ff8e(_0x4cd5d3)),_0x3028ae=window[_0x5bcf44([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5bcf44([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x167cbb);return _0x3028ae?window[_0x5bcf44([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18172d(_0x3028ae),0x10)*_0x29d598:null;}function _0x1ca7c6(_0x4a1c70){return new window[(_0x5bcf44([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x36745d,_0x276483)=>{_0x4a1c70[_0x5bcf44([0x74,0x68,0x65,0x6e])](_0x36745d,_0x276483),window[_0x5bcf44([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x276483,0x3d9041f^_0x229391);});}}_0x5878aa[_0x5bcf44([0x6f,0x6e])](_0x5bcf44([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x56dab5,_0x46bb3b)=>{if(_0x46bb3b[0x0]!=_0x4cd5d3)return _0x14934d(_0x5bcf44([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x46bb3b[0x1]={..._0x46bb3b[0x1],[_0x5bcf44([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x39ac8a};},{[_0x5bcf44([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5bcf44([0x68,0x69,0x67,0x68])}),_0x5878aa[_0x5bcf44([0x6f,0x6e])](_0x5bcf44([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1130b4=>{_0x1552e3(_0x1130b4[_0x5bcf44([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3afd35=!0x0,_0x5a187c(_0x1130b4[_0x5bcf44([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5bcf44([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5bcf44([0x6c,0x6f,0x77])}),_0x567a2d[_0x5bcf44([0x74,0x68,0x65,0x6e])](()=>{_0x3afd35||_0x14934d(_0x5bcf44([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5e515b(){return _0x5878aa[_0x5bcf44([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5bcf44([0x76,0x69,0x65,0x77])][_0x5bcf44([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5bcf44([0x61,0x75,0x74,0x6f]);}function _0xe0f6bf(){_0x5878aa[_0x5bcf44([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5bcf44([0x76,0x69,0x65,0x77])][_0x5bcf44([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5bcf44([0x61,0x75,0x74,0x6f]);}}function _0x272d9e(_0x40d403){const _0x1fe81c=[new window[(_0x5bcf44([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53b809=>setTimeout(_0x53b809,0x3d1ee13^_0x229391)),_0x567a2d[_0x5bcf44([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5bcf44([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f5d60=>{let _0x1d9fff=0x0;_0x5878aa[_0x5bcf44([0x6d,0x6f,0x64,0x65,0x6c])][_0x5bcf44([0x6f,0x6e])](_0x5bcf44([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1c61f3,_0x10d040)=>{_0x10d040[0x0][_0x5bcf44([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1d9fff++,_0x1d9fff==(0x3d8d127^_0x229391)&&(_0x5f5d60(),_0x1c61f3[_0x5bcf44([0x6f,0x66,0x66])]());});}))];return window[_0x5bcf44([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5bcf44([0x72,0x61,0x63,0x65])](_0x1fe81c)[_0x5bcf44([0x74,0x68,0x65,0x6e])](()=>_0x40d403);}async function _0x281e84(){await _0x567a2d,_0x5878aa[_0x5bcf44([0x6d,0x6f,0x64,0x65,0x6c])][_0x5bcf44([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x17e03c,_0x5878aa[_0x5bcf44([0x6d,0x6f,0x64,0x65,0x6c])][_0x5bcf44([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x17e03c,_0x5878aa[_0x5bcf44([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5bcf44([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x32df44(_0x408be5){const _0x55b3cf=_0x3dcfe4();_0x5878aa[_0x55b3cf]=_0x5bcf44([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x408be5,_0x408be5!=_0x5bcf44([0x56,0x61,0x6c,0x69,0x64])&&_0x281e84();}function _0x3dcfe4(){const _0x4ca5e5=window[_0x5bcf44([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5bcf44([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5bcf44([0x6e,0x6f,0x77])]())[_0x5bcf44([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5bcf44([0x2e]),'');let _0x24352a=_0x5bcf44([0x52]);for(let _0x52448b=0x0;_0x52448b<_0x4ca5e5[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x52448b+=0x2){let _0x165ae4=window[_0x5bcf44([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ca5e5[_0x5bcf44([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x52448b,_0x52448b+0x2));_0x165ae4>=_0x4a0014[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x165ae4-=_0x4a0014[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x24352a+=_0x4a0014[_0x165ae4];}return _0x24352a;}function _0x2ae57d(){const _0x18641d=_0x2b6c8c[_0x5bcf44([0x73,0x70,0x6c,0x69,0x74])](_0x5bcf44([0x2e]));if(0x3!=_0x18641d[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x336202(_0x18641d[0x1]);function _0x336202(_0x426843){const _0x3713f1=_0x323986(_0x426843);return _0x3713f1&&_0x4523bd()?_0x3713f1:null;function _0x4523bd(){const _0xaead5f=_0x3713f1[_0x5bcf44([0x6a,0x74,0x69])],_0x2877c0=window[_0x5bcf44([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xaead5f[_0x5bcf44([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xaead5f[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x22d833={..._0x3713f1,[_0x5bcf44([0x6a,0x74,0x69])]:_0xaead5f[_0x5bcf44([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xaead5f[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x22d833[_0x5bcf44([0x76,0x63])],_0x11ff8e(_0x22d833)==_0x2877c0;}}}async function _0x3d3936(){let _0x1388b3=!0x0;try{const _0x5f286b=_0x2b6c8c[_0x5bcf44([0x73,0x70,0x6c,0x69,0x74])](_0x5bcf44([0x2e])),[_0x39351e,_0x48551f,_0x4d75fc]=_0x5f286b;return _0x2b6c43(_0x39351e),await _0x1d8895(_0x39351e,_0x48551f,_0x4d75fc),_0x1388b3;}catch{return!0x1;}function _0x2b6c43(_0x435583){const _0x4a5a8f=_0x323986(_0x435583);_0x4a5a8f&&_0x4a5a8f[_0x5bcf44([0x61,0x6c,0x67])]==_0x5bcf44([0x45,0x53,0x32,0x35,0x36])||(_0x1388b3=!0x1);}async function _0x1d8895(_0x44d02b,_0x2d2e81,_0x30335c){const _0x4983f0=window[_0x5bcf44([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5bcf44([0x66,0x72,0x6f,0x6d])](_0x35c92a(_0x30335c),_0x499a8e=>_0x499a8e[_0x5bcf44([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x25422d=new window[(_0x5bcf44([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5bcf44([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x44d02b+_0x5bcf44([0x2e])+_0x2d2e81),_0x334dd0=window[_0x5bcf44([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5bcf44([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x334dd0)return;const _0x46160b=await _0x334dd0[_0x5bcf44([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5bcf44([0x6a,0x77,0x6b]),_0xfef786,{[_0x5bcf44([0x6e,0x61,0x6d,0x65])]:_0x5bcf44([0x45,0x43,0x44,0x53,0x41]),[_0x5bcf44([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5bcf44([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5bcf44([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x334dd0[_0x5bcf44([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5bcf44([0x6e,0x61,0x6d,0x65])]:_0x5bcf44([0x45,0x43,0x44,0x53,0x41]),[_0x5bcf44([0x68,0x61,0x73,0x68])]:{[_0x5bcf44([0x6e,0x61,0x6d,0x65])]:_0x5bcf44([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x46160b,_0x4983f0,_0x25422d)||(_0x1388b3=!0x1);}}function _0x323986(_0x553ea8){return _0x553ea8[_0x5bcf44([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5bcf44([0x65,0x79]))?JSON[_0x5bcf44([0x70,0x61,0x72,0x73,0x65])](_0x35c92a(_0x553ea8)):null;}function _0x35c92a(_0x249a38){return window[_0x5bcf44([0x61,0x74,0x6f,0x62])](_0x249a38[_0x5bcf44([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5bcf44([0x2b]))[_0x5bcf44([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5bcf44([0x2f])));}function _0x11ff8e(_0x44e6ea){let _0x193edb=0x1505;function _0x5e0a58(_0x10b5af){for(let _0x561b6c=0x0;_0x561b6c<_0x10b5af[_0x5bcf44([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x561b6c++){const _0xf52210=_0x10b5af[_0x5bcf44([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x561b6c);_0x193edb=(_0x193edb<<0x5)+_0x193edb+_0xf52210,_0x193edb&=_0x193edb;}}function _0x72dab0(_0x344950){Array[_0x5bcf44([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x344950)?_0x344950[_0x5bcf44([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x72dab0):_0x344950&&typeof _0x344950==_0x5bcf44([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5bcf44([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x344950)[_0x5bcf44([0x73,0x6f,0x72,0x74])]()[_0x5bcf44([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1ab19c,_0x5113cf])=>{_0x5e0a58(_0x1ab19c),_0x72dab0(_0x5113cf);}):_0x5e0a58(window[_0x5bcf44([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x344950));}return _0x72dab0(_0x44e6ea),_0x193edb>>>0x0;}function _0x1cf1be(_0x380e8e){return _0x380e8e[_0x5bcf44([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5bcf44([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5bcf44([0x30]));}function _0x18172d(_0xd619a3){return _0xd619a3[_0x5bcf44([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5bcf44([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5bcf44([0x6a,0x6f,0x69,0x6e])]('');}function _0x17e03c(){}function _0x5bcf44(_0x3e5fe9){return _0x3e5fe9['map'](_0x33a2d6=>String['fromCharCode'](_0x33a2d6))['join']('');}_0x32df44(await _0x5142cf());}(this);}['_initSchema'](){const _0xd810e8=this['editor']['model']['schema'];_0xd810e8['isRegistered']('imageBlock')&&_0xd810e8['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0xd810e8['isRegistered']('imageInline')&&_0xd810e8['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x431206=this['editor'];_0x431206['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x431206['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x44ca7b=>_0x44ca7b['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x297f05=_0x431206['commands']['get']('replaceImageSource');_0x297f05&&this['listenTo'](_0x297f05,'cleanupImage',(_0x2a2042,[_0x541fc1,_0x19d2e8])=>{_0x541fc1['removeAttribute']('uploadcareImageId',_0x19d2e8);});}['_initConfig'](){const _0xd5c94=this['editor']['config']['get']('uploadcare.uploader')||{},_0x4b84a=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x396a1f(_0x41af39['document'],'uc-config',{..._0xd5c94,'pubkey':_0x4b84a,'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']=_0x4131d3=>{if('closeMax'==_0x4131d3)return'#uc-icon-arrow-down';},_0x41af39['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x396a1f(_0x41af39['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x41af39['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x12c182=this['editor']['commands']['get']('insertImage');_0x12c182&&this['listenTo'](_0x12c182,'execute',()=>{const _0x1c88aa=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1c88aa&&_0x1c88aa['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1c88aa);});});const _0x91886e=this['editor']['commands']['get']('uploadcareImageReplace');_0x91886e&&this['listenTo'](_0x91886e,'execute',()=>{const _0x320257=this['editor']['model']['document']['selection']['getSelectedElement']();_0x320257&&_0x320257['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x320257);});});}}class tt extends _0x258bb9{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a4368){super(_0x5a4368),_0x5a4368['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x285eda['defineComponents'](_0x285eda);}}class ii extends _0x53a3ac{constructor(_0x218b5a){super(_0x218b5a);const t=_0x218b5a['t'],_0x2b7a86=this['bindTemplate'],_0x220206=new _0x4f34d2();_0x220206['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':[_0x220206,{'text':_0x2b7a86['to']('imageUploadProgress',_0x20ce3c=>t('Loading\x20image...')+'\x20('+(_0x20ce3c||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 _0x53a3ac{constructor(_0x3317e8){super(_0x3317e8);const t=_0x3317e8['t'];this['set']('errorType',null);const _0x4d0ff2=new _0xc427b7(_0x3317e8);_0x4d0ff2['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4d0ff2['withText']=!0x0,_0x4d0ff2['class']='ck-button-action',_0x4d0ff2['on']('execute',()=>{this['fire']('retry');}),_0x4d0ff2['bind']('isVisible')['to'](this,'errorType',_0x1a3b52=>'NotFound'!==_0x1a3b52);const _0xaf0b7=new _0x4d2d30();_0xaf0b7['content']=_0x657aa0,_0xaf0b7['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x51ce35=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':[_0xaf0b7,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x51ce35['to']('errorType',_0x57eeff=>t('NotFound'!==_0x57eeff?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4d0ff2]},{'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 _0x53a3ac{constructor(_0x63121b,_0x3f858c){super(_0x63121b);const _0x5d6062=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x3f858c,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x5d6062['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x14ec62,_0x5becdf,_0x15335e){super(_0x14ec62),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x14ec62),this['_errorView']=new ti(_0x14ec62),this['_editingView']=new ei(_0x14ec62,_0x15335e),this['_focusableView']=new _0x53a3ac(_0x14ec62),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5becdf),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'],_0x1d893c=>{this['_addUploadcareImageEditorListeners'](_0x1d893c);});}),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'](_0x4a5591,_0x5f311){const _0x185624='uc-cloud-image-editor',_0xa773ac=_0x4a5591['querySelector'](_0x185624);if(_0xa773ac)return _0x5f311(_0xa773ac);const _0x40083b=new MutationObserver(_0x2da4d8=>{const _0x52932f=_0x2da4d8['filter'](_0x2a9255=>_0x2a9255['target']===_0x4a5591&&_0x2a9255['addedNodes']['length']>0x0&&_0x2a9255['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x185624);_0x52932f['length']&&(_0x40083b['disconnect'](),_0x5f311(_0x52932f[0x0]['addedNodes'][0x0]));});_0x40083b['observe'](_0x4a5591,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x4bbb68){_0x4bbb68['addEventListener']('apply',_0x74b2b3=>{this['fire']('apply',{'imageSrc':_0x74b2b3['detail']['cdnUrl']});}),_0x4bbb68['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
- _0x318366(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x43bbe4,_0x28bf14,_0x2b8bf3){super(),this['_editor']=_0x43bbe4,this['_dialog']=_0x28bf14,this['_imageElement']=_0x2b8bf3,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 _0x5eab4c=this['_imageElement'],_0x3a22a6=_0x5eab4c['getAttribute']('uploadcareImageId'),_0x5c6702=_0x5eab4c['getAttribute']('src');if(_0x3a22a6)await this['_loadImageInfo'](_0x3a22a6,_0x5c6702);else{if(this['_imageCache']['has'](_0x5c6702)){const _0x44eeae=this['_imageCache']['get'](_0x5c6702);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x44eeae['url'],this['imageDimension']=_0x44eeae['dimension'],this['imageId']=_0x44eeae['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x26544d}=this['_editor'],t=_0x26544d['t'],_0x377405=new X(_0x26544d,this['imageStatus'],this['_attributes']);_0x377405['bind']('status')['to'](this,'imageStatus'),_0x377405['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x377405['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x377405['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x377405,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2ff4df,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x377405,'position':_0x6aa5f7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x377405['focus']();},'onHide':()=>{_0x377405['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x50689a=>!A(_0x50689a,_0x377405['element'])}});}['_loadImageInfo'](_0x2e6ecf,_0x3338d0){return j['getInfo'](_0x2e6ecf,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x1b19c6=>{const {width:_0xa46d42,height:_0x20a538}=_0x1b19c6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3338d0,this['imageDimension']={'width':_0xa46d42,'height':_0x20a538},this['imageId']=_0x2e6ecf;})['catch'](_0x52da2f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x52da2f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3e2ec4,_0x89bf69){return this['_getImageAsFile'](_0x3e2ec4)['then'](_0x55f810=>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':_0x89bf69['signal'],'file':_0x55f810,'onProgress':_0x169a9f=>{_0x169a9f&&_0x169a9f['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x169a9f['value']));}}))['then'](_0x1bae4b=>{const {width:_0x5cb1db,height:_0x1b3690}=_0x1bae4b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1bae4b['cdnUrl'],this['imageDimension']={'width':_0x5cb1db,'height':_0x1b3690},this['imageId']=_0x1bae4b['uuid'],this['imageUploadProgress']=null;const _0x22125c=_0x3e2ec4['getAttribute']('src');this['_imageCache']['set'](_0x22125c,{'id':_0x1bae4b['uuid'],'url':_0x1bae4b['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0xeae5fe=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xeae5fe['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2884e8,_0x3b6417){_0x2884e8['on']('apply',(_0x266170,_0x275fb2)=>{this['_replaceImage'](_0x3b6417,_0x275fb2['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2884e8['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2884e8['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5e1a46,_0x42762c,_0x5cc089){const _0x2830c2=this['_editor'],{width:_0x85ca51,height:_0x4b8159}=S(_0x42762c,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x469b29,imageSources:_0x39d1b2}=C(_0x42762c,_0x85ca51);_0x2830c2['model']['change'](_0x335b41=>{if('$graveyard'===_0x5e1a46['root']['rootName']){_0x2830c2['execute']('insertImage',{'imageType':_0x5e1a46['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5e1a46['getAttributes']()),'uploadcareImageId':_0x5cc089,'src':_0x469b29,'sources':_0x39d1b2,'width':_0x85ca51,'height':_0x4b8159}});const _0x297f61=_0x5e1a46['getChildren']();_0x5e1a46=_0x2830c2['model']['document']['selection']['getSelectedElement']();for(const _0x3c2a05 of _0x297f61)_0x335b41['append'](_0x335b41['cloneElement'](_0x3c2a05),_0x5e1a46);}else _0x335b41['setSelection'](_0x5e1a46,'on'),_0x2830c2['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5e1a46['getAttributes']()),'uploadcareImageId':_0x5cc089,'src':_0x469b29,'sources':_0x39d1b2,'width':_0x85ca51,'height':_0x4b8159},_0x5e1a46);_0x335b41['setSelection'](_0x5e1a46,'on');});}async['_getImageAsFile'](_0x4f2d0c){const _0x4d4b18=_0x41af39['window'],_0x1fc1d1=_0x41af39['document']['location']['href'],_0x40ca00=new _0x4d4b18['URL'](_0x4f2d0c['getAttribute']('src'),_0x1fc1d1);if('data:'===_0x40ca00['protocol']){const _0x273a7f=_0x40ca00['href']['split'](','),_0x2cfb2b=_0x273a7f[0x0]['match'](/:(.*?);/)[0x1],_0xb75568=_0x2cfb2b['split']('/')[0x1],_0xfa2af1=_0x4d4b18['atob'](_0x273a7f[_0x273a7f['length']-0x1]);let _0x2279f2=_0xfa2af1['length'];const _0x214bac=new _0x4d4b18['Uint8Array'](_0x2279f2);for(;_0x2279f2--;)_0x214bac[_0x2279f2]=_0xfa2af1['charCodeAt'](_0x2279f2);return new _0x4d4b18['File']([_0x214bac],'image.'+_0xb75568,{'type':_0x2cfb2b});}const _0x543936=_0x40ca00['href']['split']('/'),_0x431ac0=_0x543936[_0x543936['length']-0x1],_0x578e8c=_0x431ac0['split']('.')[0x1];return _0x4d4b18['fetch'](_0x40ca00['href'])['then'](_0x35cb53=>_0x35cb53['clone']()['blob']())['then'](_0x3e8416=>new _0x4d4b18['File']([_0x3e8416],_0x431ac0,{'type':'image/'+_0x578e8c}));}}class Q extends _0x546caf{['imageEditController'];static get['requires'](){return[_0x332b40];}['_isEditable'];constructor(_0x43f71e){super(_0x43f71e),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xeb6865){const _0x49c3db=z(_0xeb6865);return _0x24ae93=>!(!_0x24ae93||!_0x24ae93['is']('element','imageBlock')&&!_0x24ae93['is']('element','imageInline'))&&(!!_0x24ae93['hasAttribute']('uploadcareImageId')||!!_0x24ae93['hasAttribute']('src')&&_0x49c3db(_0x24ae93['getAttribute']('src')));}(_0x43f71e['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x3a0d5f=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x3a0d5f);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x15145b=this['editor']['model']['document']['selection']['getSelectedElement']();_0x15145b&&(_0x15145b['is']('element','imageBlock')||_0x15145b['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x332b40),_0x15145b),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x546caf{['refresh'](){const _0x5ca289=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x5ca289&&(_0x5ca289['is']('element','imageBlock')||_0x5ca289['is']('element','imageInline')));}['execute'](_0x5a84ab){const _0x1e3e15=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x7831b0=>{_0x7831b0['setAttributes'](_0x5a84ab,_0x1e3e15),_0x7831b0['removeAttribute']('srcset',_0x1e3e15),_0x7831b0['removeAttribute']('sizes',_0x1e3e15);});}}class m extends _0x258bb9{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x3cca75,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x223d3c}=this;_0x223d3c['commands']['add']('uploadcareImageEdit',new Q(_0x223d3c)),_0x223d3c['commands']['add']('uploadcareImageReplace',new V(_0x223d3c));}}class g extends _0x258bb9{['_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 _0x3fda81=this['editor'];_0x3fda81['ui']['componentFactory']['add']('uploadcareImageEdit',_0x235e94=>{const _0x390ca1=_0x3fda81['commands']['get']('uploadcareImageEdit'),_0x20ba47=new _0xc427b7(_0x235e94),t=_0x235e94['t'];return _0x20ba47['set']({'icon':_0x2ff4df,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x20ba47['bind']('isEnabled')['to'](_0x390ca1),_0x20ba47['bind']('isOn')['to'](_0x390ca1,'isActive'),this['listenTo'](_0x20ba47,'execute',()=>{_0x3fda81['execute']('uploadcareImageEdit'),_0x3fda81['editing']['view']['focus']();}),_0x20ba47;}),this['_initConfig']();}['_initConfig'](){const _0xe16ef0=_0x396a1f(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xe16ef0),this['listenTo'](this['editor'],'destroy',()=>{_0xe16ef0['remove']();});}}class et extends _0x258bb9{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
23
+ import{Plugin as _0x3c1180,Command as _0x316df6}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4022ee,IconGooglePhotos as _0x2495cb,IconGoogleDrive as _0x40b2fc,IconFacebook as _0x5cd74e,IconDropbox as _0x531c88,IconUploadcareLink as _0x666d84,IconUploadcareImageUpload as _0xb2bc43,IconError as _0x16049a,IconUploadcareImageEdit as _0x447f52}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x4a2eae,MenuBarMenuListItemButtonView as _0x396279,View as _0x4c4a39,FocusCycler as _0x712482,Dialog as _0x46539f,DialogViewPosition as _0x16dad4,SpinnerView as _0xb15fb0,IconView as _0x53bca2,Notification as _0x334bb3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x330518,DomEmitterMixin as _0x12f8c7,global as _0x2a2a88,getAncestors as _0x50dff6,ObservableMixin as _0x558bcb,uid as _0x42a876,createElement as _0x1737e0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x5c3117}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x54e1e3,info as _0x5832b1}from'@uploadcare/upload-client';import*as _0x4ebd6d from'@uploadcare/file-uploader';var i=function(_0x61d2b0){return _0x61d2b0['Local']='local',_0x61d2b0['URL']='url',_0x61d2b0['Dropbox']='dropbox',_0x61d2b0['GDrive']='gdrive',_0x61d2b0['Facebook']='facebook',_0x61d2b0['GPhotos']='gphotos',_0x61d2b0['OneDrive']='onedrive',_0x61d2b0;}({});function _(_0x297719,_0x5510a6,_0x1a887a){const t=_0x297719['t'],_0x21b124=_0x297719['t'];switch(_0x5510a6){case i['Local']:return{'text':_0x21b124('Insert'===_0x1a887a?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x21b124('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x1a887a?_0x21b124('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x21b124('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x1a887a?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x5510a6;}}class e extends _0x3c1180{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'UploadcareUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5ceb7d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x183014;for(const _0x190edc in _0x5ceb7d){const _0x47a61a=_0x190edc,_0x2481f6=_0x5ceb7d[_0x47a61a];if('uploadcareLicenseKeyValid'==_0x2481f6||'uploadcareLicenseKeyInvalid'==_0x2481f6||'uploadcareLicenseKeyExpired'==_0x2481f6||'uploadcareLicenseKeyDomainLimit'==_0x2481f6||'uploadcareLicenseKeyNotAllowed'==_0x2481f6||'uploadcareLicenseKeyEvaluationLimit'==_0x2481f6||'uploadcareLicenseKeyTrialLimit'==_0x2481f6||'uploadcareLicenseKeyUsageLimit'==_0x2481f6){delete _0x5ceb7d[_0x47a61a],_0x183014=_0x2481f6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x183014&&_0x5ceb7d['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x183014&&_0x5ceb7d['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x183014&&_0x5ceb7d['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x183014&&_0x5ceb7d['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x183014&&_0x5ceb7d['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x183014&&_0x5ceb7d['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x183014&&_0x5ceb7d['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x5ce28e}=this,_0x4d66cd=_0x5ce28e['commands']['get']('uploadcare');if(!_0x4d66cd)return;const _0x5f5bf7=this['_normalizeConfigSourceList'](_0x5ce28e['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x3b97cf,_0x1aad77)=>{const _0x180fd0=this['_getIntegrationKey'](_0x1aad77['type']);return _0x3b97cf[_0x180fd0]||(_0x3b97cf[_0x180fd0]=[]),_0x3b97cf[_0x180fd0]['push'](_0x1aad77),_0x3b97cf;},{});_0x5ce28e['plugins']['has']('ImageInsertUI')&&_0x5ce28e['commands']['get']('uploadcare')&&Object['entries'](_0x5f5bf7)['forEach'](([_0x1d8bd1,_0x349ebc])=>{_0x5ce28e['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x1d8bd1,'observable':()=>_0x4d66cd,'buttonViewCreator':()=>this['_createToolbarButton'](_0x349ebc),'formViewCreator':()=>this['_createDropdownButtons'](_0x349ebc),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x349ebc),'override':'assetManager'!==_0x1d8bd1});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x435926){const {locale:_0x2bd35a}=this['editor'];return _0x435926['map'](_0xaa2665=>{const _0xc37c2d=_(_0x2bd35a,_0xaa2665,'Insert');switch(_0xaa2665){case i['Local']:return{'icon':_0xb2bc43,'type':i['Local'],..._0xc37c2d};case i['URL']:return{'icon':_0x666d84,'type':i['URL'],..._0xc37c2d};case i['Dropbox']:return{'icon':_0x531c88,'type':i['Dropbox'],..._0xc37c2d};case i['Facebook']:return{'icon':_0x5cd74e,'type':i['Facebook'],..._0xc37c2d};case i['GDrive']:return{'icon':_0x40b2fc,'type':i['GDrive'],..._0xc37c2d};case i['GPhotos']:return{'icon':_0x2495cb,'type':i['GPhotos'],..._0xc37c2d};case i['OneDrive']:return{'icon':_0x4022ee,'type':i['OneDrive'],..._0xc37c2d};}});}['_getIntegrationKey'](_0x3f3bb0){switch(_0x3f3bb0){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x33ebd1,_0x5543fd){const _0x475234=this['editor'],_0x4bd5e4=new _0x33ebd1(_0x475234['locale']),_0x5ad49e=_0x475234['commands']['get']('uploadcare');return _0x4bd5e4['bind']('isEnabled')['to'](_0x5ad49e),_0x4bd5e4['on']('execute',()=>{_0x5ad49e['execute'](_0x5543fd);}),_0x4bd5e4;}['_createToolbarButton'](_0x4827bd){const {locale:_0x19d677}=this['editor'],_0x915e82=this['editor']['plugins']['get']('ImageInsertUI'),_0x25cd5c=_0x4827bd[0x0],_0x5894fd=this['_createButton'](_0x4a2eae,_0x25cd5c['type']);return _0x5894fd['icon']=_0x25cd5c['icon'],_0x5894fd['bind']('label')['to'](_0x915e82,'isImageSelected',_0x6ffbb7=>_(_0x19d677,_0x25cd5c['type'],_0x6ffbb7?'Replace':'Insert')['text']),_0x5894fd['tooltip']=!0x0,_0x5894fd;}['_createDropdownButtons'](_0x59d9ba){const {locale:_0x181316}=this['editor'],_0x4a86e6=this['editor']['plugins']['get']('ImageInsertUI');return _0x59d9ba['map'](_0x1f8f18=>{const _0x383232=this['_createButton'](_0x4a2eae,_0x1f8f18['type']);return _0x383232['withText']=!0x0,_0x383232['icon']=_0x1f8f18['icon'],_0x383232['bind']('label')['to'](_0x4a86e6,'isImageSelected',_0x37f6c0=>_(_0x181316,_0x1f8f18['type'],_0x37f6c0?'Replace':'Insert')['text']),_0x383232;});}['_createMenuBarButtons'](_0x1c954c){return _0x1c954c['map'](_0x361616=>{const _0x435aa8=this['_createButton'](_0x396279,_0x361616['type']);return _0x435aa8['icon']=_0x361616['icon'],_0x435aa8['label']=_0x361616['shortText'],_0x435aa8;});}}class F extends _0x4c4a39{['focusTracker'];['focusCycler'];constructor(_0x468874){super(_0x468874),this['focusTracker']=new _0x330518(),this['focusCycler']=new _0x712482({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0x1c0d93,_0x49f85a){super(_0x1c0d93),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader-'+_0x49f85a}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x2be080,_0x5b75c5){const _0x269b78=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x5504d2=>_0x5504d2<=_0x5b75c5)['map'](_0x2baf32=>_0x2be080['replace'](/\/$/,'')+'/-/resize/'+_0x2baf32+'x/\x20'+_0x2baf32+'w');return{'imageFallbackUrl':_0x2be080,'imageSources':[{'srcset':_0x269b78['join'](',\x20'),'sizes':'(max-width:\x20'+_0x5b75c5+'px)\x20100vw,\x20'+_0x5b75c5+'px','type':'image/webp'}]};}function S(_0x416555,_0x544698,_0xb2e39d){const _0x1b39d9=_0x416555['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1b39d9?parseInt(_0x1b39d9[0x1],0xa):_0x544698,'height':_0x1b39d9?parseInt(_0x1b39d9[0x2],0xa):_0xb2e39d};}function p(_0x2732a8,_0x223385){const _0x2cf1db=new(_0x12f8c7())(),_0x5f1e59=_0x2732a8['plugins']['get']('ImageUtils'),_0xf2741b=_0x2732a8['editing']['mapper']['toViewElement'](_0x223385),_0xec6d96=_0x5f1e59['findViewImgElement'](_0xf2741b),_0x974153=_0x2732a8['editing']['view']['domConverter']['viewToDom'](_0xec6d96),_0x40bbc1=_0x223385['getAttribute']('width'),_0x2287c4=_0x223385['getAttribute']('height'),_0x3e7375='image-processing';_0x2732a8['editing']['view']['change'](_0x2aa3b8=>{_0x2aa3b8['addClass'](_0x3e7375,_0xf2741b),_0x2aa3b8['setStyle']('aspect-ratio',_0x40bbc1+'/'+_0x2287c4,_0xec6d96);}),_0x2cf1db['listenTo'](_0x974153,'load',()=>{_0x2cf1db['stopListening'](_0x974153,'load'),_0x2732a8['editing']['view']['change'](_0x4e1c9e=>{_0x4e1c9e['removeClass'](_0x3e7375,_0xf2741b),_0x4e1c9e['removeStyle']('aspect-ratio',_0xec6d96);});});}function G(_0x40b5a6){if(Array['isArray'](_0x40b5a6)){const _0x24a163=_0x40b5a6['map'](G);return _0x125f6a=>_0x24a163['some'](_0x1f8cef=>_0x1f8cef(_0x125f6a));}if('origin'==_0x40b5a6){const _0x3bdf25=_0x2a2a88['window']['location']['origin'];return _0xf78513=>new URL(_0xf78513,_0x2a2a88['document']['baseURI'])['origin']==_0x3bdf25;}return'function'==typeof _0x40b5a6?_0x40b5a6:_0x40b5a6 instanceof RegExp?_0x5bfb9a=>!(!_0x5bfb9a['match'](_0x40b5a6)&&!_0x5bfb9a['replace'](/^https?:\/\//,'')['match'](_0x40b5a6)):()=>!0x1;}function A(_0x4291a2,_0x3f8ea1){return _0x50dff6(_0x4291a2['target'])['includes'](_0x3f8ea1);}class n extends/* #__PURE__ -- @preserve */
24
+ _0x558bcb(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x3a50df,_0x15a459,_0x490499){super(),this['_editor']=_0x3a50df,this['_editing']=_0x15a459,this['_dialog']=_0x3a50df['plugins']['get'](_0x46539f),this['_api']=_0x15a459['ctxElement']['getAPI'](),this['_type']=_0x490499,this['_editing']['configElement']['setAttribute']('source-list',this['_type']),this['_initDialog'](),this['_initListeners'](),this['_api']['initFlow']();}['destroy'](){this['_formView']&&(this['_formView']['destroy'](),this['_formView']=null),this['_api']&&this['_api']['doneFlow'](),this['stopListening'](),this['stopDelegating']();}['_initDialog'](){const {locale:_0x2aee8c,model:_0x31560d}=this['_editor'],_0x2d8e02=_0x31560d['document']['selection']['getSelectedElement'](),_0x5c52c4=_0x2d8e02&&(_0x2d8e02['is']('element','imageBlock')||_0x2d8e02['is']('element','imageInline'));this['_formView']=new x(_0x2aee8c,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0xb2bc43,'title':_(_0x2aee8c,this['_type'],_0x5c52c4?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x16dad4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x395347=>!A(_0x395347,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x18c891}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x1f6b36=>{const _0x3f098f=_0x18c891['length'];for(const _0x12d5e6 of _0x18c891){const _0x4df2ed=_0x12d5e6===_0x18c891[_0x3f098f-0x1],{cdnUrl:_0x5e6064,fileInfo:_0x385450}=_0x12d5e6;if(!_0x5e6064||!_0x385450)continue;const {width:_0x47641e,height:_0x51bc8c}=_0x385450['imageInfo'],_0x4e0fa6=S(_0x5e6064,_0x47641e,_0x51bc8c),_0x2717a3=C(_0x5e6064,_0x4e0fa6['width']),_0x10da70={'id':_0x385450['uuid'],'type':'image','attributes':{'imageDimension':_0x4e0fa6,..._0x2717a3}};this['_insertAsset'](_0x10da70,_0x4df2ed,_0x1f6b36);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x289230=>{'idle'===_0x289230['detail']['status']&&!_0x289230['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x43ecff,_0x4e7760,_0x50269e){const _0x36443a=this['_editor']['model']['document']['selection'],_0x2abeb0=_0x36443a['getSelectedElement'](),_0x4a2285=!(!_0x2abeb0||!_0x2abeb0['is']('element','imageInline'));_0x50269e['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x43ecff,_0x4a2285),_0x4e7760||_0x50269e['setSelection'](_0x36443a['getLastPosition']());}['_insertImage'](_0x4e343a,_0x1d7058){const _0x23484b=this['_editor'],{imageDimension:_0x2cfa2b,imageFallbackUrl:_0x2cbe47,imageSources:_0x3351ed}=_0x4e343a['attributes'];_0x23484b['execute']('insertImage',{'imageType':_0x1d7058?'imageInline':null,'source':{'uploadcareImageId':_0x4e343a['id'],'src':_0x2cbe47,'sources':_0x3351ed,..._0x2cfa2b}});}}class w extends _0x316df6{['_editing'];['_controller']=null;static get['requires'](){return[_0x46539f,o];}constructor(_0x223394){super(_0x223394),this['_editing']=_0x223394['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x1175a5){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x1175a5);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x358177,..._0x5cc367}){return _0x54e1e3(_0x358177,_0x5cc367);}static['getInfo'](_0x429553,_0x490db0){return _0x5832b1(_0x429553,_0x490db0);}}class f extends _0x3c1180{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x5c3117,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x18a0a5=this['editor'];if(!!!_0x18a0a5['config']['get']('uploadcare'))return;_0x18a0a5['plugins']['get'](_0x5c3117)['createUploadAdapter']=_0x374721=>new k(_0x374721,_0x18a0a5),_0x18a0a5['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x54eb73,{imageElement:_0x219a1c,data:_0x1474c3})=>{_0x18a0a5['model']['change'](_0x29b5f9=>{_0x29b5f9['setAttribute']('uploadcareImageId',_0x1474c3['uploadcareImageId'],_0x219a1c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x19d57c,_0x437afb){this['loader']=_0x19d57c,this['editor']=_0x437afb,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x398e7d=await this['loader']['file'];return j['upload']({'file':_0x398e7d,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x2fa285=>{_0x2fa285&&_0x2fa285['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x2fa285['value']);}})['then'](async _0x28c1f1=>{const {imageFallbackUrl:_0x11a64e,imageSources:_0x4b15cf}=C(_0x28c1f1['cdnUrl'],_0x28c1f1['imageInfo']['width']);return{'uploadcareImageId':_0x28c1f1['uuid'],'default':_0x11a64e,'sources':_0x4b15cf};})['catch'](()=>{const _0x235466=t('Cannot\x20upload\x20file:')+('\x20'+_0x398e7d['name']+'.');return Promise['reject'](_0x235466);});}['abort'](){this['controller']['abort']();}}class o extends _0x3c1180{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x46539f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x3e2428){super(_0x3e2428),this['ucContextId']=_0x42a876();}['init'](){const _0x4ea1ad=this['editor'];_0x4ea1ad['commands']['add']('uploadcare',new w(_0x4ea1ad));}['afterInit'](){this['_initSchema'](),this['_initConversion'](),this['_initConfig'](),this['_initCtx'](),this['_initImageProcessingIndicator'](),this['listenTo'](this['editor'],'destroy',()=>{this['_configElement']&&(this['_configElement']['remove'](),this['_configElement']=null),this['_ctxElement']&&(this['_ctxElement']['remove'](),this['_ctxElement']=null);const _0x4d4792=_0x2a2a88['document']['querySelector']('input[uploadcare-file-input]');_0x4d4792&&_0x4d4792['remove']();}),async function(_0x518d76){const _0x36fe3f=_0xa8a344([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x3d54bf=0x3d8d0df,_0x6b5a08=0x3dfa6cf^_0x3d54bf,_0x2dc182=window[_0xa8a344([0x44,0x61,0x74,0x65])][_0xa8a344([0x6e,0x6f,0x77])](),_0x586bc1=_0x518d76[_0xa8a344([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xe78ba9=new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x29dfbb=>{_0x586bc1[_0xa8a344([0x6f,0x6e,0x63,0x65])](_0xa8a344([0x72,0x65,0x61,0x64,0x79]),_0x29dfbb);}),_0x499021={[_0xa8a344([0x6b,0x74,0x79])]:_0xa8a344([0x45,0x43]),[_0xa8a344([0x75,0x73,0x65])]:_0xa8a344([0x73,0x69,0x67]),[_0xa8a344([0x63,0x72,0x76])]:_0xa8a344([0x50,0x2d,0x32,0x35,0x36]),[_0xa8a344([0x78])]:_0xa8a344([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0xa8a344([0x79])]:_0xa8a344([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0xa8a344([0x61,0x6c,0x67])]:_0xa8a344([0x45,0x53,0x32,0x35,0x36])},_0x131bda=_0x586bc1[_0xa8a344([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xa8a344([0x67,0x65,0x74])](_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xf78a4a(){let _0x4606e9,_0x3ab0fc=null,_0x5c3863=null;try{if(_0x131bda==_0xa8a344([0x47,0x50,0x4c]))return _0xa8a344([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4606e9=_0x13872d(),!_0x4606e9)return _0xa8a344([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4606e9[_0xa8a344([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5c3863=_0x2d5737(_0x4606e9[_0xa8a344([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4606e9[_0xa8a344([0x6a,0x74,0x69])])),await _0x82e2fd()?_0x3993b7()?_0x5b3638()?_0xa8a344([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x51015d()?(_0x4606e9[_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xa8a344([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3ab0fc=_0x3d0b7f(_0xa8a344([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4606e9[_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xa8a344([0x74,0x72,0x69,0x61,0x6c])&&(_0x3ab0fc=_0x3d0b7f(_0xa8a344([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a3695()):_0xa8a344([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xa8a344([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xa8a344([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xa8a344([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5b3638(){const _0xee9fc3=[_0xa8a344([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xa8a344([0x74,0x72,0x69,0x61,0x6c])][_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4606e9[_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2dc182/0x3e8:0xe10*_0x6b5a08;return _0x4606e9[_0xa8a344([0x65,0x78,0x70])]<_0xee9fc3;}function _0x3993b7(){const _0x357674=_0x4606e9[_0xa8a344([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x357674&&(!!_0x357674[_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa8a344([0x2a]))||!!_0x357674[_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa8a344([0x55,0x50,0x4c,0x43])));}function _0x51015d(){const _0x1f04ca=_0x4606e9[_0xa8a344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1f04ca||0x0==_0x1f04ca[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x282b28}=new URL(window[_0xa8a344([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1f04ca[_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x282b28))return!0x0;const _0x358a65=_0x282b28[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])](_0xa8a344([0x2e]));return _0x1f04ca[_0xa8a344([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x131cfe=>_0x131cfe[_0xa8a344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa8a344([0x2a])))[_0xa8a344([0x6d,0x61,0x70])](_0x2f999e=>_0x2f999e[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])](_0xa8a344([0x2e])))[_0xa8a344([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x54b90e=>_0x54b90e[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x358a65[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xa8a344([0x6d,0x61,0x70])](_0x48998b=>Array(_0x358a65[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x48998b[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xa8a344([0x66,0x69,0x6c,0x6c])](_0x48998b[0x0]===_0xa8a344([0x2a])?_0xa8a344([0x2a]):'')[_0xa8a344([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x48998b))[_0xa8a344([0x73,0x6f,0x6d,0x65])](_0x49db43=>_0x358a65[_0xa8a344([0x65,0x76,0x65,0x72,0x79])]((_0x5ab986,_0x8bc00b)=>_0x49db43[_0x8bc00b]===_0x5ab986||_0x49db43[_0x8bc00b]===_0xa8a344([0x2a])));}function _0x5a3695(){return _0x3ab0fc&&_0x5c3863?new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x508b9f,_0x561f04)=>{_0x3ab0fc[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x508b9f,_0x561f04),_0x5c3863[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x557467=>{_0x557467!=_0xa8a344([0x56,0x61,0x6c,0x69,0x64])&&_0x508b9f(_0x557467);},_0x561f04);}):_0x3ab0fc||_0x5c3863||_0xa8a344([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2d5737(_0x21862e,_0x19f60a){return new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x550034=>{if(_0x14a473())return _0x550034(_0xa8a344([0x56,0x61,0x6c,0x69,0x64]));_0xcc6919(),_0x586bc1[_0xa8a344([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xa8a344([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x19dd38=!0x1;const _0x479589=_0x42a876();function _0x1025b0(_0x471b17){return!!_0x471b17&&(typeof _0x471b17===_0xa8a344([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x471b17===_0xa8a344([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x471b17[_0xa8a344([0x74,0x68,0x65,0x6e])]===_0xa8a344([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x471b17[_0xa8a344([0x63,0x61,0x74,0x63,0x68])]===_0xa8a344([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4da9a9(_0x40cb08){_0x555971(_0x40cb08)[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x9a49bc=>{if(!_0x9a49bc||_0x9a49bc[_0xa8a344([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xa8a344([0x6f,0x6b]))return _0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x470183(_0x24e4b6(_0x479589+_0x19f60a))!=_0x9a49bc[_0xa8a344([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xa8a344([0x56,0x61,0x6c,0x69,0x64]);})[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x34eac2=>(_0xa735a6(),_0x34eac2),()=>{const _0x330d47=_0x49d6bb();return null==_0x330d47?(_0xa735a6(),_0xa8a344([0x56,0x61,0x6c,0x69,0x64])):_0xa8a344(_0x2dc182-_0x330d47>(0x27d454df^_0x3d54bf)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x550034)[_0xa8a344([0x63,0x61,0x74,0x63,0x68])](()=>{_0x550034(_0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5c52d2=0x3ee3e5f^_0x3d54bf;function _0xa735a6(){const _0x227218=_0xa8a344([0x6c,0x6c,0x63,0x74,0x2d])+_0x470183(_0x24e4b6(_0x21862e)),_0x20a8e2=_0x58d57c(_0x470183(window[_0xa8a344([0x4d,0x61,0x74,0x68])][_0xa8a344([0x63,0x65,0x69,0x6c])](_0x2dc182/_0x5c52d2)));window[_0xa8a344([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xa8a344([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x227218,_0x20a8e2);}function _0x49d6bb(){const _0x3b9f09=_0xa8a344([0x6c,0x6c,0x63,0x74,0x2d])+_0x470183(_0x24e4b6(_0x21862e)),_0x3f8251=window[_0xa8a344([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xa8a344([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b9f09);return _0x3f8251?window[_0xa8a344([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58d57c(_0x3f8251),0x10)*_0x5c52d2:null;}function _0x555971(_0x5869bb){return new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x10172e,_0x133425)=>{_0x5869bb[_0xa8a344([0x74,0x68,0x65,0x6e])](_0x10172e,_0x133425),window[_0xa8a344([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x133425,0x3d9041f^_0x3d54bf);});}}_0x586bc1[_0xa8a344([0x6f,0x6e])](_0xa8a344([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2c928c,_0x100ee1)=>{if(_0x100ee1[0x0]!=_0x21862e)return _0x550034(_0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x100ee1[0x1]={..._0x100ee1[0x1],[_0xa8a344([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x479589};},{[_0xa8a344([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xa8a344([0x68,0x69,0x67,0x68])}),_0x586bc1[_0xa8a344([0x6f,0x6e])](_0xa8a344([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3f05dc=>{_0x1025b0(_0x3f05dc[_0xa8a344([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x19dd38=!0x0,_0x4da9a9(_0x3f05dc[_0xa8a344([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xa8a344([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xa8a344([0x6c,0x6f,0x77])}),_0xe78ba9[_0xa8a344([0x74,0x68,0x65,0x6e])](()=>{_0x19dd38||_0x550034(_0xa8a344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x14a473(){return _0x586bc1[_0xa8a344([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa8a344([0x76,0x69,0x65,0x77])][_0xa8a344([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xa8a344([0x61,0x75,0x74,0x6f]);}function _0xcc6919(){_0x586bc1[_0xa8a344([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa8a344([0x76,0x69,0x65,0x77])][_0xa8a344([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xa8a344([0x61,0x75,0x74,0x6f]);}}function _0x3d0b7f(_0x4e64ed){const _0x4bde88=[new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45e874=>setTimeout(_0x45e874,0x3d1ee13^_0x3d54bf)),_0xe78ba9[_0xa8a344([0x74,0x68,0x65,0x6e])](()=>new window[(_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5b61dd=>{let _0x4cf283=0x0;_0x586bc1[_0xa8a344([0x6d,0x6f,0x64,0x65,0x6c])][_0xa8a344([0x6f,0x6e])](_0xa8a344([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x31d1a4,_0x293d79)=>{_0x293d79[0x0][_0xa8a344([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4cf283++,_0x4cf283==(0x3d8d127^_0x3d54bf)&&(_0x5b61dd(),_0x31d1a4[_0xa8a344([0x6f,0x66,0x66])]());});}))];return window[_0xa8a344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xa8a344([0x72,0x61,0x63,0x65])](_0x4bde88)[_0xa8a344([0x74,0x68,0x65,0x6e])](()=>_0x4e64ed);}async function _0x5def21(){await _0xe78ba9,_0x586bc1[_0xa8a344([0x6d,0x6f,0x64,0x65,0x6c])][_0xa8a344([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x116518,_0x586bc1[_0xa8a344([0x6d,0x6f,0x64,0x65,0x6c])][_0xa8a344([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x116518,_0x586bc1[_0xa8a344([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xa8a344([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x31c7d1(_0x3358f3){const _0xbaa01d=_0x596832();_0x586bc1[_0xbaa01d]=_0xa8a344([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3358f3,_0x3358f3!=_0xa8a344([0x56,0x61,0x6c,0x69,0x64])&&_0x5def21();}function _0x596832(){const _0x3a7829=window[_0xa8a344([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xa8a344([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xa8a344([0x6e,0x6f,0x77])]())[_0xa8a344([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xa8a344([0x2e]),'');let _0x2aa3a3=_0xa8a344([0x52]);for(let _0x1b5cf6=0x0;_0x1b5cf6<_0x3a7829[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1b5cf6+=0x2){let _0xfdd08f=window[_0xa8a344([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a7829[_0xa8a344([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b5cf6,_0x1b5cf6+0x2));_0xfdd08f>=_0x36fe3f[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xfdd08f-=_0x36fe3f[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2aa3a3+=_0x36fe3f[_0xfdd08f];}return _0x2aa3a3;}function _0x13872d(){const _0x8d5350=_0x131bda[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])](_0xa8a344([0x2e]));if(0x3!=_0x8d5350[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3179ab(_0x8d5350[0x1]);function _0x3179ab(_0x1ae0d2){const _0x1fd2af=_0x2c6b95(_0x1ae0d2);return _0x1fd2af&&_0x333cff()?_0x1fd2af:null;function _0x333cff(){const _0x4ea6f9=_0x1fd2af[_0xa8a344([0x6a,0x74,0x69])],_0x272e5e=window[_0xa8a344([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ea6f9[_0xa8a344([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4ea6f9[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x22d515={..._0x1fd2af,[_0xa8a344([0x6a,0x74,0x69])]:_0x4ea6f9[_0xa8a344([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4ea6f9[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x22d515[_0xa8a344([0x76,0x63])],_0x24e4b6(_0x22d515)==_0x272e5e;}}}async function _0x82e2fd(){let _0x531991=!0x0;try{const _0x4fcd5b=_0x131bda[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])](_0xa8a344([0x2e])),[_0x4ddac9,_0x599713,_0x2e9f0e]=_0x4fcd5b;return _0xed7ee3(_0x4ddac9),await _0x1a458d(_0x4ddac9,_0x599713,_0x2e9f0e),_0x531991;}catch{return!0x1;}function _0xed7ee3(_0x3e964b){const _0x3c0ffb=_0x2c6b95(_0x3e964b);_0x3c0ffb&&_0x3c0ffb[_0xa8a344([0x61,0x6c,0x67])]==_0xa8a344([0x45,0x53,0x32,0x35,0x36])||(_0x531991=!0x1);}async function _0x1a458d(_0x3da148,_0x2543ad,_0x214554){const _0x35c766=window[_0xa8a344([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xa8a344([0x66,0x72,0x6f,0x6d])](_0x180cfe(_0x214554),_0x3f8cc0=>_0x3f8cc0[_0xa8a344([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1834ec=new window[(_0xa8a344([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xa8a344([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3da148+_0xa8a344([0x2e])+_0x2543ad),_0x1c6231=window[_0xa8a344([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xa8a344([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1c6231)return;const _0x4eb0cd=await _0x1c6231[_0xa8a344([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xa8a344([0x6a,0x77,0x6b]),_0x499021,{[_0xa8a344([0x6e,0x61,0x6d,0x65])]:_0xa8a344([0x45,0x43,0x44,0x53,0x41]),[_0xa8a344([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xa8a344([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xa8a344([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1c6231[_0xa8a344([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xa8a344([0x6e,0x61,0x6d,0x65])]:_0xa8a344([0x45,0x43,0x44,0x53,0x41]),[_0xa8a344([0x68,0x61,0x73,0x68])]:{[_0xa8a344([0x6e,0x61,0x6d,0x65])]:_0xa8a344([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4eb0cd,_0x35c766,_0x1834ec)||(_0x531991=!0x1);}}function _0x2c6b95(_0x270be9){return _0x270be9[_0xa8a344([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xa8a344([0x65,0x79]))?JSON[_0xa8a344([0x70,0x61,0x72,0x73,0x65])](_0x180cfe(_0x270be9)):null;}function _0x180cfe(_0x27b9b6){return window[_0xa8a344([0x61,0x74,0x6f,0x62])](_0x27b9b6[_0xa8a344([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xa8a344([0x2b]))[_0xa8a344([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xa8a344([0x2f])));}function _0x24e4b6(_0x3d7008){let _0xf4cbda=0x1505;function _0x4c5c14(_0x33b73c){for(let _0x1a1573=0x0;_0x1a1573<_0x33b73c[_0xa8a344([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a1573++){const _0x69b147=_0x33b73c[_0xa8a344([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1a1573);_0xf4cbda=(_0xf4cbda<<0x5)+_0xf4cbda+_0x69b147,_0xf4cbda&=_0xf4cbda;}}function _0x4cea93(_0x10c96e){Array[_0xa8a344([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x10c96e)?_0x10c96e[_0xa8a344([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4cea93):_0x10c96e&&typeof _0x10c96e==_0xa8a344([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xa8a344([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x10c96e)[_0xa8a344([0x73,0x6f,0x72,0x74])]()[_0xa8a344([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5b715d,_0x2ac6b9])=>{_0x4c5c14(_0x5b715d),_0x4cea93(_0x2ac6b9);}):_0x4c5c14(window[_0xa8a344([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x10c96e));}return _0x4cea93(_0x3d7008),_0xf4cbda>>>0x0;}function _0x470183(_0x50554f){return _0x50554f[_0xa8a344([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xa8a344([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xa8a344([0x30]));}function _0x58d57c(_0x17256d){return _0x17256d[_0xa8a344([0x73,0x70,0x6c,0x69,0x74])]('')[_0xa8a344([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xa8a344([0x6a,0x6f,0x69,0x6e])]('');}function _0x116518(){}function _0xa8a344(_0x5ebce8){return _0x5ebce8['map'](_0xbaf8c0=>String['fromCharCode'](_0xbaf8c0))['join']('');}_0x31c7d1(await _0xf78a4a());}(this);}['_initSchema'](){const _0x5d7e35=this['editor']['model']['schema'];_0x5d7e35['isRegistered']('imageBlock')&&_0x5d7e35['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x5d7e35['isRegistered']('imageInline')&&_0x5d7e35['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0xe94088=this['editor'];_0xe94088['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0xe94088['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x9dd0f5=>_0x9dd0f5['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x523793=_0xe94088['commands']['get']('replaceImageSource');_0x523793&&this['listenTo'](_0x523793,'cleanupImage',(_0x4a8575,[_0x5c99e1,_0x56659f])=>{_0x5c99e1['removeAttribute']('uploadcareImageId',_0x56659f);});}['_initConfig'](){const _0x28dfa2=this['editor']['config']['get']('uploadcare.uploader')||{},_0xc733a4=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1737e0(_0x2a2a88['document'],'uc-config',{..._0x28dfa2,'pubkey':_0xc733a4,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x5a7550=>{if('closeMax'==_0x5a7550)return'#uc-icon-arrow-down';},_0x2a2a88['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1737e0(_0x2a2a88['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x2a2a88['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0xf84fee=this['editor']['commands']['get']('insertImage');_0xf84fee&&this['listenTo'](_0xf84fee,'execute',()=>{const _0x3d20cc=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3d20cc&&_0x3d20cc['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3d20cc);});});const _0x54c563=this['editor']['commands']['get']('uploadcareImageReplace');_0x54c563&&this['listenTo'](_0x54c563,'execute',()=>{const _0x3661d0=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3661d0&&_0x3661d0['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3661d0);});});}}class tt extends _0x3c1180{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe599b3){super(_0xe599b3),_0xe599b3['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4ebd6d['defineComponents'](_0x4ebd6d);}}class ii extends _0x4c4a39{constructor(_0x1e79f5){super(_0x1e79f5);const t=_0x1e79f5['t'],_0x11f5ea=this['bindTemplate'],_0x2c1c41=new _0xb15fb0();_0x2c1c41['isVisible']=!0x0,this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__loading'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__loading-spinner']},'children':[_0x2c1c41,{'text':_0x11f5ea['to']('imageUploadProgress',_0xf7dce6=>t('Loading\x20image...')+'\x20('+(_0xf7dce6||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x4c4a39{constructor(_0x4f240e){super(_0x4f240e);const t=_0x4f240e['t'];this['set']('errorType',null);const _0x204847=new _0x4a2eae(_0x4f240e);_0x204847['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x204847['withText']=!0x0,_0x204847['class']='ck-button-action',_0x204847['on']('execute',()=>{this['fire']('retry');}),_0x204847['bind']('isVisible')['to'](this,'errorType',_0x5b9c44=>'NotFound'!==_0x5b9c44);const _0x233cda=new _0x53bca2();_0x233cda['content']=_0x16049a,_0x233cda['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5d024c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x233cda,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5d024c['to']('errorType',_0x58639f=>t('NotFound'!==_0x58639f?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x204847]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x4c4a39{constructor(_0x2cdb11,_0x5e3a30){super(_0x2cdb11);const _0x44ecbb=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5e3a30,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x44ecbb['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x267f80,_0x4bf5c9,_0x38e336){super(_0x267f80),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x267f80),this['_errorView']=new ti(_0x267f80),this['_editingView']=new ei(_0x267f80,_0x38e336),this['_focusableView']=new _0x4c4a39(_0x267f80),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x4bf5c9),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':this['_items']}),this['_setView'](),this['once']('render',()=>{this['_waitForImageEditorComponent'](this['element'],_0x4c3936=>{this['_addUploadcareImageEditorListeners'](_0x4c3936);});}),this['on']('change:status',()=>{this['_setView']();}),this['_addErrorViewListeners']();}['focus'](){this['element']['focus']();}['_setView'](){switch(this['_items']['clear'](),this['status']){case'uploading':this['_items']['add'](this['_loadingView']);break;case'error':this['_items']['add'](this['_errorView']);break;case'ready':this['_items']['addMany']([this['_editingView'],this['_focusableView']]);}}['_waitForImageEditorComponent'](_0x99b81d,_0x26423c){const _0x5c3da5='uc-cloud-image-editor',_0x5a2fa5=_0x99b81d['querySelector'](_0x5c3da5);if(_0x5a2fa5)return _0x26423c(_0x5a2fa5);const _0x854211=new MutationObserver(_0x3383cc=>{const _0x560039=_0x3383cc['filter'](_0x2c54bb=>_0x2c54bb['target']===_0x99b81d&&_0x2c54bb['addedNodes']['length']>0x0&&_0x2c54bb['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5c3da5);_0x560039['length']&&(_0x854211['disconnect'](),_0x26423c(_0x560039[0x0]['addedNodes'][0x0]));});_0x854211['observe'](_0x99b81d,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x1e15b9){_0x1e15b9['addEventListener']('apply',_0x112fde=>{this['fire']('apply',{'imageSrc':_0x112fde['detail']['cdnUrl']});}),_0x1e15b9['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
+ _0x558bcb(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x298c85,_0x3e6870,_0x5515d4){super(),this['_editor']=_0x298c85,this['_dialog']=_0x3e6870,this['_imageElement']=_0x5515d4,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x1c6a85=this['_imageElement'],_0x66ac7e=_0x1c6a85['getAttribute']('uploadcareImageId'),_0x3db6f2=_0x1c6a85['getAttribute']('src');if(_0x66ac7e)await this['_loadImageInfo'](_0x66ac7e,_0x3db6f2);else{if(this['_imageCache']['has'](_0x3db6f2)){const _0x1f172e=this['_imageCache']['get'](_0x3db6f2);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1f172e['url'],this['imageDimension']=_0x1f172e['dimension'],this['imageId']=_0x1f172e['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x409fdc}=this['_editor'],t=_0x409fdc['t'],_0x1d8b84=new X(_0x409fdc,this['imageStatus'],this['_attributes']);_0x1d8b84['bind']('status')['to'](this,'imageStatus'),_0x1d8b84['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1d8b84['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1d8b84['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1d8b84,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x447f52,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1d8b84,'position':_0x16dad4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1d8b84['focus']();},'onHide':()=>{_0x1d8b84['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2db7d5=>!A(_0x2db7d5,_0x1d8b84['element'])}});}['_loadImageInfo'](_0x41911a,_0xb4a90f){return j['getInfo'](_0x41911a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x11fa2b=>{const {width:_0x19f003,height:_0x4bfda3}=_0x11fa2b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xb4a90f,this['imageDimension']={'width':_0x19f003,'height':_0x4bfda3},this['imageId']=_0x41911a;})['catch'](_0x380faa=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x380faa['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x40ea71,_0x4b619b){return this['_getImageAsFile'](_0x40ea71)['then'](_0x1626aa=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x4b619b['signal'],'file':_0x1626aa,'onProgress':_0x4cb467=>{_0x4cb467&&_0x4cb467['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4cb467['value']));}}))['then'](_0xa3d734=>{const {width:_0x8baece,height:_0x438258}=_0xa3d734['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xa3d734['cdnUrl'],this['imageDimension']={'width':_0x8baece,'height':_0x438258},this['imageId']=_0xa3d734['uuid'],this['imageUploadProgress']=null;const _0x8f2b9e=_0x40ea71['getAttribute']('src');this['_imageCache']['set'](_0x8f2b9e,{'id':_0xa3d734['uuid'],'url':_0xa3d734['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x51d4eb=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x51d4eb['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x214c1d,_0xcb1368){_0x214c1d['on']('apply',(_0x20afd4,_0x42f33c)=>{this['_replaceImage'](_0xcb1368,_0x42f33c['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x214c1d['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x214c1d['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5c91ab,_0x1de678,_0x1c15bc){const _0x482a51=this['_editor'],{width:_0xccd9b1,height:_0x2a400d}=S(_0x1de678,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x41a086,imageSources:_0x23f230}=C(_0x1de678,_0xccd9b1);_0x482a51['model']['change'](_0x19fc57=>{if('$graveyard'===_0x5c91ab['root']['rootName']){_0x482a51['execute']('insertImage',{'imageType':_0x5c91ab['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5c91ab['getAttributes']()),'uploadcareImageId':_0x1c15bc,'src':_0x41a086,'sources':_0x23f230,'width':_0xccd9b1,'height':_0x2a400d}});const _0x384e58=_0x5c91ab['getChildren']();_0x5c91ab=_0x482a51['model']['document']['selection']['getSelectedElement']();for(const _0x5f487f of _0x384e58)_0x19fc57['append'](_0x19fc57['cloneElement'](_0x5f487f),_0x5c91ab);}else _0x19fc57['setSelection'](_0x5c91ab,'on'),_0x482a51['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5c91ab['getAttributes']()),'uploadcareImageId':_0x1c15bc,'src':_0x41a086,'sources':_0x23f230,'width':_0xccd9b1,'height':_0x2a400d},_0x5c91ab);_0x19fc57['setSelection'](_0x5c91ab,'on');});}async['_getImageAsFile'](_0x5d4ffe){const _0x5c13f6=_0x2a2a88['window'],_0x44f6f4=_0x2a2a88['document']['location']['href'],_0x191a38=new _0x5c13f6['URL'](_0x5d4ffe['getAttribute']('src'),_0x44f6f4);if('data:'===_0x191a38['protocol']){const _0x4006e6=_0x191a38['href']['split'](','),_0x3f6d1a=_0x4006e6[0x0]['match'](/:(.*?);/)[0x1],_0x4e2d51=_0x3f6d1a['split']('/')[0x1],_0x2db72b=_0x5c13f6['atob'](_0x4006e6[_0x4006e6['length']-0x1]);let _0x3d121b=_0x2db72b['length'];const _0x3348b9=new _0x5c13f6['Uint8Array'](_0x3d121b);for(;_0x3d121b--;)_0x3348b9[_0x3d121b]=_0x2db72b['charCodeAt'](_0x3d121b);return new _0x5c13f6['File']([_0x3348b9],'image.'+_0x4e2d51,{'type':_0x3f6d1a});}const _0x4fdb91=_0x191a38['href']['split']('/'),_0x408804=_0x4fdb91[_0x4fdb91['length']-0x1],_0x48716e=_0x408804['split']('.')[0x1];return _0x5c13f6['fetch'](_0x191a38['href'])['then'](_0xaf6fb8=>_0xaf6fb8['clone']()['blob']())['then'](_0xb10d48=>new _0x5c13f6['File']([_0xb10d48],_0x408804,{'type':'image/'+_0x48716e}));}}class O extends _0x316df6{['imageEditController'];static get['requires'](){return[_0x46539f];}['_isEditable'];constructor(_0xf88c93){super(_0xf88c93),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xad24e7){const _0x5312b1=G(_0xad24e7);return _0x982a1c=>!(!_0x982a1c||!_0x982a1c['is']('element','imageBlock')&&!_0x982a1c['is']('element','imageInline'))&&(!!_0x982a1c['hasAttribute']('uploadcareImageId')||!!_0x982a1c['hasAttribute']('src')&&_0x5312b1(_0x982a1c['getAttribute']('src')));}(_0xf88c93['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x3b2f24=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x3b2f24);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x10c42f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x10c42f&&(_0x10c42f['is']('element','imageBlock')||_0x10c42f['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x46539f),_0x10c42f),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x316df6{['refresh'](){const _0x1b34dc=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1b34dc&&(_0x1b34dc['is']('element','imageBlock')||_0x1b34dc['is']('element','imageInline')));}['execute'](_0x21957a){const _0x3fb532=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x565772=>{_0x565772['setAttributes'](_0x21957a,_0x3fb532),_0x565772['removeAttribute']('srcset',_0x3fb532),_0x565772['removeAttribute']('sizes',_0x3fb532);});}}class m extends _0x3c1180{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x334bb3,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x7de919}=this;_0x7de919['commands']['add']('uploadcareImageEdit',new O(_0x7de919)),_0x7de919['commands']['add']('uploadcareImageReplace',new R(_0x7de919));}}class g extends _0x3c1180{['_imageCache']=new Map();static get['pluginName'](){return'UploadcareImageEditUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['imageCache'](){return this['_imageCache'];}['init'](){const _0x4e596b=this['editor'];_0x4e596b['ui']['componentFactory']['add']('uploadcareImageEdit',_0x5f0f30=>{const _0x243527=_0x4e596b['commands']['get']('uploadcareImageEdit'),_0x587b61=new _0x4a2eae(_0x5f0f30),t=_0x5f0f30['t'];return _0x587b61['set']({'icon':_0x447f52,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x587b61['bind']('isEnabled')['to'](_0x243527),_0x587b61['bind']('isOn')['to'](_0x243527,'isActive'),this['listenTo'](_0x587b61,'execute',()=>{_0x4e596b['execute']('uploadcareImageEdit'),_0x4e596b['editing']['view']['focus']();}),_0x587b61;}),this['_initConfig']();}['_initConfig'](){const _0x393760=_0x1737e0(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x393760),this['listenTo'](this['editor'],'destroy',()=>{_0x393760['remove']();});}}class et extends _0x3c1180{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "0.0.0-nightly-20251012.0",
3
+ "version": "0.0.0-nightly-20251013.0",
4
4
  "description": "Uploadcare feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,14 +23,14 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-20251012.0",
27
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251012.0",
28
- "@ckeditor/ckeditor5-image": "0.0.0-nightly-20251012.0",
29
- "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251012.0",
30
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251012.0",
31
- "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251012.0",
32
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251012.0",
33
- "ckeditor5": "0.0.0-nightly-20251012.0",
26
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-20251013.0",
27
+ "@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251013.0",
28
+ "@ckeditor/ckeditor5-image": "0.0.0-nightly-20251013.0",
29
+ "@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251013.0",
30
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251013.0",
31
+ "@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251013.0",
32
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251013.0",
33
+ "ckeditor5": "0.0.0-nightly-20251013.0",
34
34
  "@uploadcare/file-uploader": "1.19.4",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x540320=_0x3232;(function(_0x18230f,_0x2e760b){const _0x28bc7f=_0x3232,_0x444a43=_0x18230f();while(!![]){try{const _0x3f7ece=-parseInt(_0x28bc7f(0xd0))/0x1+parseInt(_0x28bc7f(0x85))/0x2+-parseInt(_0x28bc7f(0xbc))/0x3+-parseInt(_0x28bc7f(0xa7))/0x4*(parseInt(_0x28bc7f(0xb5))/0x5)+-parseInt(_0x28bc7f(0xc8))/0x6*(-parseInt(_0x28bc7f(0xb0))/0x7)+parseInt(_0x28bc7f(0xb3))/0x8*(parseInt(_0x28bc7f(0x84))/0x9)+-parseInt(_0x28bc7f(0xd4))/0xa*(-parseInt(_0x28bc7f(0x96))/0xb);if(_0x3f7ece===_0x2e760b)break;else _0x444a43['push'](_0x444a43['shift']());}catch(_0x46d1b6){_0x444a43['push'](_0x444a43['shift']());}}}(_0x3003,0xe3dc2));function _0x3232(_0x45d555,_0x5a89a2){const _0x300316=_0x3003();return _0x3232=function(_0x3232cb,_0x1db0d8){_0x3232cb=_0x3232cb-0x7f;let _0x58072c=_0x300316[_0x3232cb];return _0x58072c;},_0x3232(_0x45d555,_0x5a89a2);}import{Plugin as _0x3e9090}from'ckeditor5/src/core.js';import{Dialog as _0x1d9296}from'ckeditor5/src/ui.js';function _0x3003(){const _0x3e3e11=['destroy','#uc-icon-arrow-down','uploadcareImageId','editor','document','for','upcast','extend','map','ctxElement','join','data-uc-image-id','insertImage','236alyndS','imageInline','contentLanguage','href','_initImageProcessingIndicator','uploadcare','pluginName','uploadcare.pubkey','uc-config','7cRxdfm','remove','editing','164336scSYKU','_initConfig','90845swveXi','imageBlock','isPremiumPlugin','downcast','_configElement','closeMax','init','4105974Ldildt','_initSchema','render','fromCharCode','iconHrefResolver','execute','querySelector','afterInit','appendChild','listenTo','elementToAttribute','view','4469664jMynWG','get','isOfficialPlugin','selection','conversion','input[uploadcare-file-input]','replaceImageSource','schema','1345627COpsbd','uploader-','attributeToAttribute','PictureEditing','32535960eKOYxm','uploadcareImageReplace','once','model','_initCtx','_ctxElement','9qzoDIn','1400976oPrtqK','true','cleanupImage','UploadcareEditing','\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','uploadcare.uploader','configElement','ucContextId','_initConversion','config','commands','add','body','getAttribute','locale','isRegistered','11BJCibx','getSelectedElement','requires','uc-upload-ctx-provider'];_0x3003=function(){return _0x3e3e11;};return _0x3003();}import{createElement as _0x1506f9,global as _0x1e1bc5,uid as _0x50dba6}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x3f97f6}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x3c21e8}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x1c383f}from'./utils/editingutils.js';export class UploadcareEditing extends _0x3e9090{[_0x540320(0xb9)]=null;[_0x540320(0x83)]=null;static get[_0x540320(0xad)](){const _0x5c51ff=_0x540320;return _0x5c51ff(0x88);}static get[_0x540320(0x98)](){const _0x27d915=_0x540320;return[_0x27d915(0xd3),_0x3c21e8,_0x1d9296];}static get[_0x540320(0xca)](){return!0x0;}static get[_0x540320(0xb7)](){return!0x0;}[_0x540320(0x8d)];get[_0x540320(0x8c)](){const _0x570bf3=_0x540320;return this[_0x570bf3(0xb9)];}get[_0x540320(0xa3)](){const _0x83b543=_0x540320;return this[_0x83b543(0x83)];}constructor(_0x43a055){const _0x217d69=_0x540320;super(_0x43a055),this[_0x217d69(0x8d)]=_0x50dba6();}[_0x540320(0xbb)](){const _0x46916e=_0x540320,_0x49d530=this[_0x46916e(0x9d)];_0x49d530[_0x46916e(0x90)][_0x46916e(0x91)](_0x46916e(0xac),new _0x3f97f6(_0x49d530));}[_0x540320(0xc3)](){const _0x90b4c6=_0x540320;this[_0x90b4c6(0xbd)](),this[_0x90b4c6(0x8e)](),this[_0x90b4c6(0xb4)](),this[_0x90b4c6(0x82)](),this[_0x90b4c6(0xab)](),this[_0x90b4c6(0xc5)](this[_0x90b4c6(0x9d)],_0x90b4c6(0x9a),()=>{const _0x3af2c1=_0x90b4c6;this[_0x3af2c1(0xb9)]&&(this[_0x3af2c1(0xb9)][_0x3af2c1(0xb1)](),this[_0x3af2c1(0xb9)]=null),this[_0x3af2c1(0x83)]&&(this[_0x3af2c1(0x83)][_0x3af2c1(0xb1)](),this[_0x3af2c1(0x83)]=null);const _0x3f21aa=_0x1e1bc5[_0x3af2c1(0x9e)][_0x3af2c1(0xc2)](_0x3af2c1(0xcd));_0x3f21aa&&_0x3f21aa[_0x3af2c1(0xb1)]();}),async function(_0x32e991){const _0x5a5cee=_0xd009d4([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x47d945=0x3d8d0df,_0x493fb5=0x3dfa527^_0x47d945,_0x5636d3=window[_0xd009d4([0x44,0x61,0x74,0x65])][_0xd009d4([0x6e,0x6f,0x77])](),_0x5ca5c7=_0x32e991[_0xd009d4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x546c9e=new window[(_0xd009d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd5bd3a=>{_0x5ca5c7[_0xd009d4([0x6f,0x6e,0x63,0x65])](_0xd009d4([0x72,0x65,0x61,0x64,0x79]),_0xd5bd3a);}),_0x1727b7={[_0xd009d4([0x6b,0x74,0x79])]:_0xd009d4([0x45,0x43]),[_0xd009d4([0x75,0x73,0x65])]:_0xd009d4([0x73,0x69,0x67]),[_0xd009d4([0x63,0x72,0x76])]:_0xd009d4([0x50,0x2d,0x32,0x35,0x36]),[_0xd009d4([0x78])]:_0xd009d4([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]),[_0xd009d4([0x79])]:_0xd009d4([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]),[_0xd009d4([0x61,0x6c,0x67])]:_0xd009d4([0x45,0x53,0x32,0x35,0x36])},_0x8c7129=_0x5ca5c7[_0xd009d4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xd009d4([0x67,0x65,0x74])](_0xd009d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2082c5(){let _0x208171,_0x5d55d9=null,_0x2a7712=null;try{if(_0x8c7129==_0xd009d4([0x47,0x50,0x4c]))return _0xd009d4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x208171=_0x3bd7ec(),!_0x208171)return _0xd009d4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x208171[_0xd009d4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2a7712=_0x39222d(_0x208171[_0xd009d4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x208171[_0xd009d4([0x6a,0x74,0x69])])),await _0x2fedee()?_0x542ce4()?_0x49d89d()?_0xd009d4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x41f03a()?(_0x208171[_0xd009d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xd009d4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5d55d9=_0x466b25(_0xd009d4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x208171[_0xd009d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xd009d4([0x74,0x72,0x69,0x61,0x6c])&&(_0x5d55d9=_0x466b25(_0xd009d4([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4e2a5c()):_0xd009d4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xd009d4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xd009d4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xd009d4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x49d89d(){const _0x1c0de8=[_0xd009d4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xd009d4([0x74,0x72,0x69,0x61,0x6c])][_0xd009d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x208171[_0xd009d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5636d3/0x3e8:0xe10*_0x493fb5;return _0x208171[_0xd009d4([0x65,0x78,0x70])]<_0x1c0de8;}function _0x542ce4(){const _0x586040=_0x208171[_0xd009d4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x586040&&(!!_0x586040[_0xd009d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd009d4([0x2a]))||!!_0x586040[_0xd009d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd009d4([0x55,0x50,0x4c,0x43])));}function _0x41f03a(){const _0x3acc4d=_0x3232,_0x28a325=_0x208171[_0xd009d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x28a325||0x0==_0x28a325[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4f299b}=new URL(window[_0xd009d4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x3acc4d(0xaa)]);if(_0x28a325[_0xd009d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f299b))return!0x0;const _0x327167=_0x4f299b[_0xd009d4([0x73,0x70,0x6c,0x69,0x74])](_0xd009d4([0x2e]));return _0x28a325[_0xd009d4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12f058=>_0x12f058[_0xd009d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd009d4([0x2a])))[_0xd009d4([0x6d,0x61,0x70])](_0xa6f156=>_0xa6f156[_0xd009d4([0x73,0x70,0x6c,0x69,0x74])](_0xd009d4([0x2e])))[_0xd009d4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x556967=>_0x556967[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x327167[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xd009d4([0x6d,0x61,0x70])](_0x38ca7=>Array(_0x327167[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x38ca7[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xd009d4([0x66,0x69,0x6c,0x6c])](_0x38ca7[0x0]===_0xd009d4([0x2a])?_0xd009d4([0x2a]):'')[_0xd009d4([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x38ca7))[_0xd009d4([0x73,0x6f,0x6d,0x65])](_0x992ac7=>_0x327167[_0xd009d4([0x65,0x76,0x65,0x72,0x79])]((_0x2acd36,_0x11e77c)=>_0x992ac7[_0x11e77c]===_0x2acd36||_0x992ac7[_0x11e77c]===_0xd009d4([0x2a])));}function _0x4e2a5c(){return _0x5d55d9&&_0x2a7712?new window[(_0xd009d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2f8e39,_0x16c454)=>{_0x5d55d9[_0xd009d4([0x74,0x68,0x65,0x6e])](_0x2f8e39,_0x16c454),_0x2a7712[_0xd009d4([0x74,0x68,0x65,0x6e])](_0x5a2cff=>{_0x5a2cff!=_0xd009d4([0x56,0x61,0x6c,0x69,0x64])&&_0x2f8e39(_0x5a2cff);},_0x16c454);}):_0x5d55d9||_0x2a7712||_0xd009d4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x39222d(_0x17178c,_0x51bc7a){return new window[(_0xd009d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x359e5b=>{if(_0x10e7b3())return _0x359e5b(_0xd009d4([0x56,0x61,0x6c,0x69,0x64]));_0x5adbe1(),_0x5ca5c7[_0xd009d4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xd009d4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x22c22a=!0x1;const _0x228446=_0x50dba6();function _0x24b86b(_0x22c7c6){return!!_0x22c7c6&&(typeof _0x22c7c6===_0xd009d4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x22c7c6===_0xd009d4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x22c7c6[_0xd009d4([0x74,0x68,0x65,0x6e])]===_0xd009d4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x22c7c6[_0xd009d4([0x63,0x61,0x74,0x63,0x68])]===_0xd009d4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3eeb39(_0x5ec553){_0x2fb435(_0x5ec553)[_0xd009d4([0x74,0x68,0x65,0x6e])](_0x3eb401=>{if(!_0x3eb401||_0x3eb401[_0xd009d4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xd009d4([0x6f,0x6b]))return _0xd009d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4c902e(_0x3fce6e(_0x228446+_0x51bc7a))!=_0x3eb401[_0xd009d4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xd009d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xd009d4([0x56,0x61,0x6c,0x69,0x64]);})[_0xd009d4([0x74,0x68,0x65,0x6e])](_0x5aef7d=>(_0x4e7258(),_0x5aef7d),()=>{const _0x222253=_0x25f29c();return null==_0x222253?(_0x4e7258(),_0xd009d4([0x56,0x61,0x6c,0x69,0x64])):_0xd009d4(_0x5636d3-_0x222253>(0x27d454df^_0x47d945)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xd009d4([0x74,0x68,0x65,0x6e])](_0x359e5b)[_0xd009d4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x359e5b(_0xd009d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3ed309=0x3ee3e5f^_0x47d945;function _0x4e7258(){const _0x9161d0=_0xd009d4([0x6c,0x6c,0x63,0x74,0x2d])+_0x4c902e(_0x3fce6e(_0x17178c)),_0x329f83=_0x5a1535(_0x4c902e(window[_0xd009d4([0x4d,0x61,0x74,0x68])][_0xd009d4([0x63,0x65,0x69,0x6c])](_0x5636d3/_0x3ed309)));window[_0xd009d4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xd009d4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x9161d0,_0x329f83);}function _0x25f29c(){const _0x449655=_0xd009d4([0x6c,0x6c,0x63,0x74,0x2d])+_0x4c902e(_0x3fce6e(_0x17178c)),_0x41fe97=window[_0xd009d4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xd009d4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x449655);return _0x41fe97?window[_0xd009d4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a1535(_0x41fe97),0x10)*_0x3ed309:null;}function _0x2fb435(_0x24e8d6){return new window[(_0xd009d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3a7b84,_0x2fa952)=>{_0x24e8d6[_0xd009d4([0x74,0x68,0x65,0x6e])](_0x3a7b84,_0x2fa952),window[_0xd009d4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2fa952,0x3d9041f^_0x47d945);});}}_0x5ca5c7[_0xd009d4([0x6f,0x6e])](_0xd009d4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xc00671,_0x113afe)=>{if(_0x113afe[0x0]!=_0x17178c)return _0x359e5b(_0xd009d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x113afe[0x1]={..._0x113afe[0x1],[_0xd009d4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x228446};},{[_0xd009d4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xd009d4([0x68,0x69,0x67,0x68])}),_0x5ca5c7[_0xd009d4([0x6f,0x6e])](_0xd009d4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x21b2b1=>{_0x24b86b(_0x21b2b1[_0xd009d4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x22c22a=!0x0,_0x3eeb39(_0x21b2b1[_0xd009d4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xd009d4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xd009d4([0x6c,0x6f,0x77])}),_0x546c9e[_0xd009d4([0x74,0x68,0x65,0x6e])](()=>{_0x22c22a||_0x359e5b(_0xd009d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x10e7b3(){return _0x5ca5c7[_0xd009d4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xd009d4([0x76,0x69,0x65,0x77])][_0xd009d4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xd009d4([0x61,0x75,0x74,0x6f]);}function _0x5adbe1(){_0x5ca5c7[_0xd009d4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xd009d4([0x76,0x69,0x65,0x77])][_0xd009d4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xd009d4([0x61,0x75,0x74,0x6f]);}}function _0x466b25(_0xb0f531){const _0x18d010=[new window[(_0xd009d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e5ace=>setTimeout(_0x3e5ace,0x3d1ee13^_0x47d945)),_0x546c9e[_0xd009d4([0x74,0x68,0x65,0x6e])](()=>new window[(_0xd009d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4f2f50=>{let _0x5035a1=0x0;_0x5ca5c7[_0xd009d4([0x6d,0x6f,0x64,0x65,0x6c])][_0xd009d4([0x6f,0x6e])](_0xd009d4([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xece7e1,_0x45d474)=>{_0x45d474[0x0][_0xd009d4([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5035a1++,_0x5035a1==(0x3d8d127^_0x47d945)&&(_0x4f2f50(),_0xece7e1[_0xd009d4([0x6f,0x66,0x66])]());});}))];return window[_0xd009d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xd009d4([0x72,0x61,0x63,0x65])](_0x18d010)[_0xd009d4([0x74,0x68,0x65,0x6e])](()=>_0xb0f531);}async function _0x236abe(){await _0x546c9e,_0x5ca5c7[_0xd009d4([0x6d,0x6f,0x64,0x65,0x6c])][_0xd009d4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x111458,_0x5ca5c7[_0xd009d4([0x6d,0x6f,0x64,0x65,0x6c])][_0xd009d4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x111458,_0x5ca5c7[_0xd009d4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xd009d4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x11e907(_0x15aea9){const _0x457088=_0x3da046();_0x5ca5c7[_0x457088]=_0xd009d4([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x15aea9,_0x15aea9!=_0xd009d4([0x56,0x61,0x6c,0x69,0x64])&&_0x236abe();}function _0x3da046(){const _0x270b89=window[_0xd009d4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xd009d4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xd009d4([0x6e,0x6f,0x77])]())[_0xd009d4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xd009d4([0x2e]),'');let _0x43a728=_0xd009d4([0x52]);for(let _0x14468f=0x0;_0x14468f<_0x270b89[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x14468f+=0x2){let _0x2c36a5=window[_0xd009d4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x270b89[_0xd009d4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x14468f,_0x14468f+0x2));_0x2c36a5>=_0x5a5cee[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2c36a5-=_0x5a5cee[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x43a728+=_0x5a5cee[_0x2c36a5];}return _0x43a728;}function _0x3bd7ec(){const _0x2f9add=_0x8c7129[_0xd009d4([0x73,0x70,0x6c,0x69,0x74])](_0xd009d4([0x2e]));if(0x3!=_0x2f9add[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x24db51(_0x2f9add[0x1]);function _0x24db51(_0x9bb5f5){const _0x1ab5fe=_0x2c047a(_0x9bb5f5);return _0x1ab5fe&&_0x4b0a42()?_0x1ab5fe:null;function _0x4b0a42(){const _0x5ae8f2=_0x1ab5fe[_0xd009d4([0x6a,0x74,0x69])],_0x5c9697=window[_0xd009d4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5ae8f2[_0xd009d4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5ae8f2[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x33a0bf={..._0x1ab5fe,[_0xd009d4([0x6a,0x74,0x69])]:_0x5ae8f2[_0xd009d4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5ae8f2[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x33a0bf[_0xd009d4([0x76,0x63])],_0x3fce6e(_0x33a0bf)==_0x5c9697;}}}async function _0x2fedee(){let _0x1358de=!0x0;try{const _0x20972e=_0x8c7129[_0xd009d4([0x73,0x70,0x6c,0x69,0x74])](_0xd009d4([0x2e])),[_0x9ec7a0,_0x761243,_0x5ef82c]=_0x20972e;return _0xc85e0b(_0x9ec7a0),await _0x4e33d8(_0x9ec7a0,_0x761243,_0x5ef82c),_0x1358de;}catch{return!0x1;}function _0xc85e0b(_0x55afa2){const _0x2071f7=_0x2c047a(_0x55afa2);_0x2071f7&&_0x2071f7[_0xd009d4([0x61,0x6c,0x67])]==_0xd009d4([0x45,0x53,0x32,0x35,0x36])||(_0x1358de=!0x1);}async function _0x4e33d8(_0x8c8a01,_0x3e1cc4,_0x1a831b){const _0x22a6a9=window[_0xd009d4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xd009d4([0x66,0x72,0x6f,0x6d])](_0x2f942f(_0x1a831b),_0x5cb6d0=>_0x5cb6d0[_0xd009d4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x432e59=new window[(_0xd009d4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xd009d4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x8c8a01+_0xd009d4([0x2e])+_0x3e1cc4),_0x457baf=window[_0xd009d4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xd009d4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x457baf)return;const _0x284eff=await _0x457baf[_0xd009d4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xd009d4([0x6a,0x77,0x6b]),_0x1727b7,{[_0xd009d4([0x6e,0x61,0x6d,0x65])]:_0xd009d4([0x45,0x43,0x44,0x53,0x41]),[_0xd009d4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xd009d4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xd009d4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x457baf[_0xd009d4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xd009d4([0x6e,0x61,0x6d,0x65])]:_0xd009d4([0x45,0x43,0x44,0x53,0x41]),[_0xd009d4([0x68,0x61,0x73,0x68])]:{[_0xd009d4([0x6e,0x61,0x6d,0x65])]:_0xd009d4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x284eff,_0x22a6a9,_0x432e59)||(_0x1358de=!0x1);}}function _0x2c047a(_0x204b24){return _0x204b24[_0xd009d4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xd009d4([0x65,0x79]))?JSON[_0xd009d4([0x70,0x61,0x72,0x73,0x65])](_0x2f942f(_0x204b24)):null;}function _0x2f942f(_0x317886){return window[_0xd009d4([0x61,0x74,0x6f,0x62])](_0x317886[_0xd009d4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xd009d4([0x2b]))[_0xd009d4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xd009d4([0x2f])));}function _0x3fce6e(_0x471172){let _0x5ead89=0x1505;function _0x303a96(_0x536723){for(let _0x38af64=0x0;_0x38af64<_0x536723[_0xd009d4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x38af64++){const _0x4eb6cc=_0x536723[_0xd009d4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x38af64);_0x5ead89=(_0x5ead89<<0x5)+_0x5ead89+_0x4eb6cc,_0x5ead89&=_0x5ead89;}}function _0x514d5c(_0x37dbaa){Array[_0xd009d4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x37dbaa)?_0x37dbaa[_0xd009d4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x514d5c):_0x37dbaa&&typeof _0x37dbaa==_0xd009d4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xd009d4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x37dbaa)[_0xd009d4([0x73,0x6f,0x72,0x74])]()[_0xd009d4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xc8795c,_0x3d0c1a])=>{_0x303a96(_0xc8795c),_0x514d5c(_0x3d0c1a);}):_0x303a96(window[_0xd009d4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x37dbaa));}return _0x514d5c(_0x471172),_0x5ead89>>>0x0;}function _0x4c902e(_0x2b011c){return _0x2b011c[_0xd009d4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xd009d4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xd009d4([0x30]));}function _0x5a1535(_0x4553de){return _0x4553de[_0xd009d4([0x73,0x70,0x6c,0x69,0x74])]('')[_0xd009d4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xd009d4([0x6a,0x6f,0x69,0x6e])]('');}function _0x111458(){}function _0xd009d4(_0x5b98fe){const _0x51c9c2=_0x3232;return _0x5b98fe[_0x51c9c2(0xa2)](_0xe980ff=>String[_0x51c9c2(0xbf)](_0xe980ff))[_0x51c9c2(0xa4)]('');}_0x11e907(await _0x2082c5());}(this);}[_0x540320(0xbd)](){const _0x32fc29=_0x540320,_0x2d0d4e=this[_0x32fc29(0x9d)][_0x32fc29(0x81)][_0x32fc29(0xcf)];_0x2d0d4e[_0x32fc29(0x95)](_0x32fc29(0xb6))&&_0x2d0d4e[_0x32fc29(0xa1)](_0x32fc29(0xb6),{'allowAttributes':[_0x32fc29(0x9c)]}),_0x2d0d4e[_0x32fc29(0x95)](_0x32fc29(0xa8))&&_0x2d0d4e[_0x32fc29(0xa1)](_0x32fc29(0xa8),{'allowAttributes':[_0x32fc29(0x9c)]});}[_0x540320(0x8e)](){const _0x54f71c=_0x540320,_0x4979d9=this[_0x54f71c(0x9d)];_0x4979d9[_0x54f71c(0xcc)][_0x54f71c(0x9f)](_0x54f71c(0xb8))[_0x54f71c(0xd2)]({'model':_0x54f71c(0x9c),'view':_0x54f71c(0xa5)}),_0x4979d9[_0x54f71c(0xcc)][_0x54f71c(0x9f)](_0x54f71c(0xa0))[_0x54f71c(0xc6)]({'model':{'key':_0x54f71c(0x9c),'value':_0x51a564=>_0x51a564[_0x54f71c(0x93)](_0x54f71c(0xa5))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x389a12=_0x4979d9[_0x54f71c(0x90)][_0x54f71c(0xc9)](_0x54f71c(0xce));_0x389a12&&this[_0x54f71c(0xc5)](_0x389a12,_0x54f71c(0x87),(_0x47ef93,[_0x41799a,_0x8738e7])=>{const _0x38fedd=_0x54f71c;_0x41799a[_0x38fedd(0x8a)](_0x38fedd(0x9c),_0x8738e7);});}[_0x540320(0xb4)](){const _0x1d8819=_0x540320,_0x2dfeb7=this[_0x1d8819(0x9d)][_0x1d8819(0x8f)][_0x1d8819(0xc9)](_0x1d8819(0x8b))||{},_0x5b26a4=this[_0x1d8819(0x9d)][_0x1d8819(0x8f)][_0x1d8819(0xc9)](_0x1d8819(0xae))||'';this[_0x1d8819(0xb9)]=_0x1506f9(_0x1e1bc5[_0x1d8819(0x9e)],_0x1d8819(0xaf),{..._0x2dfeb7,'pubkey':_0x5b26a4,'ctx-name':_0x1d8819(0xd1)+this[_0x1d8819(0x8d)],'sourceList':'','imgOnly':_0x1d8819(0x86),'removeCopyright':_0x1d8819(0x86),'localeName':this[_0x1d8819(0x9d)][_0x1d8819(0x94)][_0x1d8819(0xa9)],'externalSourcesEmbedCss':_0x1d8819(0x89)}),this[_0x1d8819(0xb9)][_0x1d8819(0xc0)]=_0x21716d=>{const _0x95bf80=_0x1d8819;if(_0x95bf80(0xba)==_0x21716d)return _0x95bf80(0x9b);},_0x1e1bc5[_0x1d8819(0x9e)][_0x1d8819(0x92)][_0x1d8819(0xc4)](this[_0x1d8819(0xb9)]);}[_0x540320(0x82)](){const _0x4fd256=_0x540320;this[_0x4fd256(0x83)]=_0x1506f9(_0x1e1bc5[_0x4fd256(0x9e)],_0x4fd256(0x99),{'ctx-name':_0x4fd256(0xd1)+this[_0x4fd256(0x8d)]}),_0x1e1bc5[_0x4fd256(0x9e)][_0x4fd256(0x92)][_0x4fd256(0xc4)](this[_0x4fd256(0x83)]);}[_0x540320(0xab)](){const _0x338f30=_0x540320,_0x5c76d5=this[_0x338f30(0x9d)][_0x338f30(0x90)][_0x338f30(0xc9)](_0x338f30(0xa6));_0x5c76d5&&this[_0x338f30(0xc5)](_0x5c76d5,_0x338f30(0xc1),()=>{const _0x4a4965=_0x338f30,_0x4b97d1=this[_0x4a4965(0x9d)][_0x4a4965(0x81)][_0x4a4965(0x9e)][_0x4a4965(0xcb)][_0x4a4965(0x97)]();_0x4b97d1&&_0x4b97d1[_0x4a4965(0x93)](_0x4a4965(0x9c))&&this[_0x4a4965(0x9d)][_0x4a4965(0xb2)][_0x4a4965(0xc7)][_0x4a4965(0x80)](_0x4a4965(0xbe),()=>{const _0x1a4797=_0x4a4965;_0x1c383f(this[_0x1a4797(0x9d)],_0x4b97d1);});});const _0x34ae7e=this[_0x338f30(0x9d)][_0x338f30(0x90)][_0x338f30(0xc9)](_0x338f30(0x7f));_0x34ae7e&&this[_0x338f30(0xc5)](_0x34ae7e,_0x338f30(0xc1),()=>{const _0x4a6c39=_0x338f30,_0x2fdad9=this[_0x4a6c39(0x9d)][_0x4a6c39(0x81)][_0x4a6c39(0x9e)][_0x4a6c39(0xcb)][_0x4a6c39(0x97)]();_0x2fdad9&&_0x2fdad9[_0x4a6c39(0x93)](_0x4a6c39(0x9c))&&this[_0x4a6c39(0x9d)][_0x4a6c39(0xb2)][_0x4a6c39(0xc7)][_0x4a6c39(0x80)](_0x4a6c39(0xbe),()=>{const _0x2d3187=_0x4a6c39;_0x1c383f(this[_0x2d3187(0x9d)],_0x2fdad9);});});}}
23
+ const _0x590443=_0x22f5;(function(_0x51d288,_0x69e168){const _0x1d7d0c=_0x22f5,_0x13f4e1=_0x51d288();while(!![]){try{const _0x7b6624=-parseInt(_0x1d7d0c(0xb8))/0x1+parseInt(_0x1d7d0c(0xa5))/0x2+-parseInt(_0x1d7d0c(0x94))/0x3+parseInt(_0x1d7d0c(0xa1))/0x4+parseInt(_0x1d7d0c(0x9d))/0x5+parseInt(_0x1d7d0c(0xe4))/0x6*(-parseInt(_0x1d7d0c(0xc9))/0x7)+-parseInt(_0x1d7d0c(0xd6))/0x8;if(_0x7b6624===_0x69e168)break;else _0x13f4e1['push'](_0x13f4e1['shift']());}catch(_0x3166ee){_0x13f4e1['push'](_0x13f4e1['shift']());}}}(_0x5789,0x76c3e));import{Plugin as _0xd83da9}from'ckeditor5/src/core.js';import{Dialog as _0x2b7fe0}from'ckeditor5/src/ui.js';import{createElement as _0x5ab1be,global as _0x57b849,uid as _0x502934}from'ckeditor5/src/utils.js';function _0x22f5(_0x2daabb,_0x501d29){const _0x5789d8=_0x5789();return _0x22f5=function(_0x22f515,_0x4efc82){_0x22f515=_0x22f515-0x94;let _0x47ad00=_0x5789d8[_0x22f515];return _0x47ad00;},_0x22f5(_0x2daabb,_0x501d29);}import{UploadcareCommand as _0x5bc4dd}from'./uploadcarecommand.js';function _0x5789(){const _0x9c3a47=['_configElement','uploadcare','_initConversion','configElement','_initSchema','map','join','locale','commands','#uc-icon-arrow-down','7IdPYkU','imageInline','PictureEditing','appendChild','execute','view','data-uc-image-id','elementToAttribute','_initConfig','isPremiumPlugin','iconHrefResolver','\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09','downcast','2037760kJqKbX','imageBlock','requires','listenTo','once','getAttribute','body','_ctxElement','cleanupImage','editor','_initImageProcessingIndicator','insertImage','upcast','uploadcareImageId','3803484cFhvUE','document','uc-upload-ctx-provider','545295EltuDe','editing','input[uploadcare-file-input]','uploadcare.uploader','true','conversion','querySelector','extend','get','3440040vdbvVh','isOfficialPlugin','uploader-','model','1722508kofhcL','uploadcare.pubkey','for','getSelectedElement','1806834bpEVin','uploadcareImageReplace','UploadcareEditing','fromCharCode','replaceImageSource','_initCtx','config','uc-config','removeAttribute','attributeToAttribute','add','selection','pluginName','remove','ctxElement','render','isRegistered','href','ucContextId','465191IGHrcG','closeMax','afterInit','destroy','contentLanguage','init','schema'];_0x5789=function(){return _0x9c3a47;};return _0x5789();}import{UploadcareUploadAdapter as _0x2153ce}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x4f5a05}from'./utils/editingutils.js';export class UploadcareEditing extends _0xd83da9{[_0x590443(0xbf)]=null;[_0x590443(0xdd)]=null;static get[_0x590443(0xb1)](){const _0x480533=_0x590443;return _0x480533(0xa7);}static get[_0x590443(0xd8)](){const _0x1134c1=_0x590443;return[_0x1134c1(0xcb),_0x2153ce,_0x2b7fe0];}static get[_0x590443(0x9e)](){return!0x0;}static get[_0x590443(0xd2)](){return!0x0;}[_0x590443(0xb7)];get[_0x590443(0xc2)](){const _0x21883a=_0x590443;return this[_0x21883a(0xbf)];}get[_0x590443(0xb3)](){const _0x81dc4=_0x590443;return this[_0x81dc4(0xdd)];}constructor(_0x1e8cee){const _0x5a556e=_0x590443;super(_0x1e8cee),this[_0x5a556e(0xb7)]=_0x502934();}[_0x590443(0xbd)](){const _0x32b8a9=_0x590443,_0x962178=this[_0x32b8a9(0xdf)];_0x962178[_0x32b8a9(0xc7)][_0x32b8a9(0xaf)](_0x32b8a9(0xc0),new _0x5bc4dd(_0x962178));}[_0x590443(0xba)](){const _0x45a3fb=_0x590443;this[_0x45a3fb(0xc3)](),this[_0x45a3fb(0xc1)](),this[_0x45a3fb(0xd1)](),this[_0x45a3fb(0xaa)](),this[_0x45a3fb(0xe0)](),this[_0x45a3fb(0xd9)](this[_0x45a3fb(0xdf)],_0x45a3fb(0xbb),()=>{const _0x158261=_0x45a3fb;this[_0x158261(0xbf)]&&(this[_0x158261(0xbf)][_0x158261(0xb2)](),this[_0x158261(0xbf)]=null),this[_0x158261(0xdd)]&&(this[_0x158261(0xdd)][_0x158261(0xb2)](),this[_0x158261(0xdd)]=null);const _0x3fb4d0=_0x57b849[_0x158261(0xe5)][_0x158261(0x9a)](_0x158261(0x96));_0x3fb4d0&&_0x3fb4d0[_0x158261(0xb2)]();}),async function(_0x54b06f){const _0x235cf2=_0x1136c9([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x24e099=0x3d8d0df,_0x21562c=0x3dfa6cf^_0x24e099,_0x382eed=window[_0x1136c9([0x44,0x61,0x74,0x65])][_0x1136c9([0x6e,0x6f,0x77])](),_0x5456bf=_0x54b06f[_0x1136c9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5872ef=new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x306949=>{_0x5456bf[_0x1136c9([0x6f,0x6e,0x63,0x65])](_0x1136c9([0x72,0x65,0x61,0x64,0x79]),_0x306949);}),_0x5a25c5={[_0x1136c9([0x6b,0x74,0x79])]:_0x1136c9([0x45,0x43]),[_0x1136c9([0x75,0x73,0x65])]:_0x1136c9([0x73,0x69,0x67]),[_0x1136c9([0x63,0x72,0x76])]:_0x1136c9([0x50,0x2d,0x32,0x35,0x36]),[_0x1136c9([0x78])]:_0x1136c9([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x1136c9([0x79])]:_0x1136c9([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x1136c9([0x61,0x6c,0x67])]:_0x1136c9([0x45,0x53,0x32,0x35,0x36])},_0x58e875=_0x5456bf[_0x1136c9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1136c9([0x67,0x65,0x74])](_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xeb4a42(){let _0x4b9a44,_0x5610a5=null,_0x4aac25=null;try{if(_0x58e875==_0x1136c9([0x47,0x50,0x4c]))return _0x1136c9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4b9a44=_0x4cbea8(),!_0x4b9a44)return _0x1136c9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4b9a44[_0x1136c9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4aac25=_0x3d84d6(_0x4b9a44[_0x1136c9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4b9a44[_0x1136c9([0x6a,0x74,0x69])])),await _0x4b7058()?_0x5d08b2()?_0x36969f()?_0x1136c9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x381095()?(_0x4b9a44[_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1136c9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5610a5=_0x1452fe(_0x1136c9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4b9a44[_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1136c9([0x74,0x72,0x69,0x61,0x6c])&&(_0x5610a5=_0x1452fe(_0x1136c9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2201b5()):_0x1136c9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1136c9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1136c9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1136c9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x36969f(){const _0x30a6b8=[_0x1136c9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1136c9([0x74,0x72,0x69,0x61,0x6c])][_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4b9a44[_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x382eed/0x3e8:0xe10*_0x21562c;return _0x4b9a44[_0x1136c9([0x65,0x78,0x70])]<_0x30a6b8;}function _0x5d08b2(){const _0x37ec53=_0x4b9a44[_0x1136c9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x37ec53&&(!!_0x37ec53[_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1136c9([0x2a]))||!!_0x37ec53[_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1136c9([0x55,0x50,0x4c,0x43])));}function _0x381095(){const _0x23813f=_0x22f5,_0x413ba4=_0x4b9a44[_0x1136c9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x413ba4||0x0==_0x413ba4[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5a26c7}=new URL(window[_0x1136c9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x23813f(0xb6)]);if(_0x413ba4[_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a26c7))return!0x0;const _0x5d3fef=_0x5a26c7[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])](_0x1136c9([0x2e]));return _0x413ba4[_0x1136c9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x900f79=>_0x900f79[_0x1136c9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1136c9([0x2a])))[_0x1136c9([0x6d,0x61,0x70])](_0xc88a06=>_0xc88a06[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])](_0x1136c9([0x2e])))[_0x1136c9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb252b1=>_0xb252b1[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5d3fef[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1136c9([0x6d,0x61,0x70])](_0x5acf91=>Array(_0x5d3fef[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5acf91[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1136c9([0x66,0x69,0x6c,0x6c])](_0x5acf91[0x0]===_0x1136c9([0x2a])?_0x1136c9([0x2a]):'')[_0x1136c9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5acf91))[_0x1136c9([0x73,0x6f,0x6d,0x65])](_0x15b769=>_0x5d3fef[_0x1136c9([0x65,0x76,0x65,0x72,0x79])]((_0x58155c,_0x4e968d)=>_0x15b769[_0x4e968d]===_0x58155c||_0x15b769[_0x4e968d]===_0x1136c9([0x2a])));}function _0x2201b5(){return _0x5610a5&&_0x4aac25?new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa6476d,_0x48cc22)=>{_0x5610a5[_0x1136c9([0x74,0x68,0x65,0x6e])](_0xa6476d,_0x48cc22),_0x4aac25[_0x1136c9([0x74,0x68,0x65,0x6e])](_0x79e9ff=>{_0x79e9ff!=_0x1136c9([0x56,0x61,0x6c,0x69,0x64])&&_0xa6476d(_0x79e9ff);},_0x48cc22);}):_0x5610a5||_0x4aac25||_0x1136c9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3d84d6(_0x214a5f,_0x438007){return new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55e242=>{if(_0x35addf())return _0x55e242(_0x1136c9([0x56,0x61,0x6c,0x69,0x64]));_0x9f78dd(),_0x5456bf[_0x1136c9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1136c9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1d6202=!0x1;const _0x391ec1=_0x502934();function _0x9190b5(_0xe7ec81){return!!_0xe7ec81&&(typeof _0xe7ec81===_0x1136c9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xe7ec81===_0x1136c9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xe7ec81[_0x1136c9([0x74,0x68,0x65,0x6e])]===_0x1136c9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xe7ec81[_0x1136c9([0x63,0x61,0x74,0x63,0x68])]===_0x1136c9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x525675(_0x52336a){_0x35a204(_0x52336a)[_0x1136c9([0x74,0x68,0x65,0x6e])](_0x2aab88=>{if(!_0x2aab88||_0x2aab88[_0x1136c9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1136c9([0x6f,0x6b]))return _0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4014c2(_0x6e71fc(_0x391ec1+_0x438007))!=_0x2aab88[_0x1136c9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1136c9([0x56,0x61,0x6c,0x69,0x64]);})[_0x1136c9([0x74,0x68,0x65,0x6e])](_0x4c704a=>(_0x25d435(),_0x4c704a),()=>{const _0x46618e=_0x4f66d1();return null==_0x46618e?(_0x25d435(),_0x1136c9([0x56,0x61,0x6c,0x69,0x64])):_0x1136c9(_0x382eed-_0x46618e>(0x27d454df^_0x24e099)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1136c9([0x74,0x68,0x65,0x6e])](_0x55e242)[_0x1136c9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x55e242(_0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x106757=0x3ee3e5f^_0x24e099;function _0x25d435(){const _0x30a438=_0x1136c9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4014c2(_0x6e71fc(_0x214a5f)),_0x53fbd1=_0x58462c(_0x4014c2(window[_0x1136c9([0x4d,0x61,0x74,0x68])][_0x1136c9([0x63,0x65,0x69,0x6c])](_0x382eed/_0x106757)));window[_0x1136c9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1136c9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30a438,_0x53fbd1);}function _0x4f66d1(){const _0x18dbfe=_0x1136c9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4014c2(_0x6e71fc(_0x214a5f)),_0xc951fe=window[_0x1136c9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1136c9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x18dbfe);return _0xc951fe?window[_0x1136c9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58462c(_0xc951fe),0x10)*_0x106757:null;}function _0x35a204(_0x361cd9){return new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc59439,_0x53de74)=>{_0x361cd9[_0x1136c9([0x74,0x68,0x65,0x6e])](_0xc59439,_0x53de74),window[_0x1136c9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x53de74,0x3d9041f^_0x24e099);});}}_0x5456bf[_0x1136c9([0x6f,0x6e])](_0x1136c9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x420367,_0x19d0ff)=>{if(_0x19d0ff[0x0]!=_0x214a5f)return _0x55e242(_0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x19d0ff[0x1]={..._0x19d0ff[0x1],[_0x1136c9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x391ec1};},{[_0x1136c9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1136c9([0x68,0x69,0x67,0x68])}),_0x5456bf[_0x1136c9([0x6f,0x6e])](_0x1136c9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x53621e=>{_0x9190b5(_0x53621e[_0x1136c9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1d6202=!0x0,_0x525675(_0x53621e[_0x1136c9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1136c9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1136c9([0x6c,0x6f,0x77])}),_0x5872ef[_0x1136c9([0x74,0x68,0x65,0x6e])](()=>{_0x1d6202||_0x55e242(_0x1136c9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x35addf(){return _0x5456bf[_0x1136c9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1136c9([0x76,0x69,0x65,0x77])][_0x1136c9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1136c9([0x61,0x75,0x74,0x6f]);}function _0x9f78dd(){_0x5456bf[_0x1136c9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1136c9([0x76,0x69,0x65,0x77])][_0x1136c9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1136c9([0x61,0x75,0x74,0x6f]);}}function _0x1452fe(_0x19f9ad){const _0xc79407=[new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x147b14=>setTimeout(_0x147b14,0x3d1ee13^_0x24e099)),_0x5872ef[_0x1136c9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x39a5c7=>{let _0x35ba2e=0x0;_0x5456bf[_0x1136c9([0x6d,0x6f,0x64,0x65,0x6c])][_0x1136c9([0x6f,0x6e])](_0x1136c9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x10417c,_0x5dcd4b)=>{_0x5dcd4b[0x0][_0x1136c9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x35ba2e++,_0x35ba2e==(0x3d8d127^_0x24e099)&&(_0x39a5c7(),_0x10417c[_0x1136c9([0x6f,0x66,0x66])]());});}))];return window[_0x1136c9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1136c9([0x72,0x61,0x63,0x65])](_0xc79407)[_0x1136c9([0x74,0x68,0x65,0x6e])](()=>_0x19f9ad);}async function _0x3ddadb(){await _0x5872ef,_0x5456bf[_0x1136c9([0x6d,0x6f,0x64,0x65,0x6c])][_0x1136c9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x7ef2fd,_0x5456bf[_0x1136c9([0x6d,0x6f,0x64,0x65,0x6c])][_0x1136c9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x7ef2fd,_0x5456bf[_0x1136c9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1136c9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x515830(_0x1356f5){const _0x3bc906=_0x2391e1();_0x5456bf[_0x3bc906]=_0x1136c9([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1356f5,_0x1356f5!=_0x1136c9([0x56,0x61,0x6c,0x69,0x64])&&_0x3ddadb();}function _0x2391e1(){const _0x2e97f7=window[_0x1136c9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1136c9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1136c9([0x6e,0x6f,0x77])]())[_0x1136c9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1136c9([0x2e]),'');let _0x203d91=_0x1136c9([0x52]);for(let _0x207e65=0x0;_0x207e65<_0x2e97f7[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x207e65+=0x2){let _0x273668=window[_0x1136c9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2e97f7[_0x1136c9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x207e65,_0x207e65+0x2));_0x273668>=_0x235cf2[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x273668-=_0x235cf2[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x203d91+=_0x235cf2[_0x273668];}return _0x203d91;}function _0x4cbea8(){const _0x408cc8=_0x58e875[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])](_0x1136c9([0x2e]));if(0x3!=_0x408cc8[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x59009f(_0x408cc8[0x1]);function _0x59009f(_0x48ede8){const _0x43c9f5=_0x3495a4(_0x48ede8);return _0x43c9f5&&_0x2cf018()?_0x43c9f5:null;function _0x2cf018(){const _0x47873e=_0x43c9f5[_0x1136c9([0x6a,0x74,0x69])],_0x51a242=window[_0x1136c9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x47873e[_0x1136c9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x47873e[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x33f806={..._0x43c9f5,[_0x1136c9([0x6a,0x74,0x69])]:_0x47873e[_0x1136c9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x47873e[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x33f806[_0x1136c9([0x76,0x63])],_0x6e71fc(_0x33f806)==_0x51a242;}}}async function _0x4b7058(){let _0x3d394c=!0x0;try{const _0x148dcb=_0x58e875[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])](_0x1136c9([0x2e])),[_0x3c18f9,_0x1013f3,_0x1bee3a]=_0x148dcb;return _0x314dfc(_0x3c18f9),await _0x20acfc(_0x3c18f9,_0x1013f3,_0x1bee3a),_0x3d394c;}catch{return!0x1;}function _0x314dfc(_0x14375d){const _0x17062b=_0x3495a4(_0x14375d);_0x17062b&&_0x17062b[_0x1136c9([0x61,0x6c,0x67])]==_0x1136c9([0x45,0x53,0x32,0x35,0x36])||(_0x3d394c=!0x1);}async function _0x20acfc(_0x5e6933,_0x543956,_0x394ce1){const _0x37dcb8=window[_0x1136c9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1136c9([0x66,0x72,0x6f,0x6d])](_0x5719df(_0x394ce1),_0x521572=>_0x521572[_0x1136c9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2ab1eb=new window[(_0x1136c9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1136c9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5e6933+_0x1136c9([0x2e])+_0x543956),_0x57d1f1=window[_0x1136c9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1136c9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x57d1f1)return;const _0x1aa7fe=await _0x57d1f1[_0x1136c9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1136c9([0x6a,0x77,0x6b]),_0x5a25c5,{[_0x1136c9([0x6e,0x61,0x6d,0x65])]:_0x1136c9([0x45,0x43,0x44,0x53,0x41]),[_0x1136c9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1136c9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1136c9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x57d1f1[_0x1136c9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1136c9([0x6e,0x61,0x6d,0x65])]:_0x1136c9([0x45,0x43,0x44,0x53,0x41]),[_0x1136c9([0x68,0x61,0x73,0x68])]:{[_0x1136c9([0x6e,0x61,0x6d,0x65])]:_0x1136c9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1aa7fe,_0x37dcb8,_0x2ab1eb)||(_0x3d394c=!0x1);}}function _0x3495a4(_0x115e92){return _0x115e92[_0x1136c9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1136c9([0x65,0x79]))?JSON[_0x1136c9([0x70,0x61,0x72,0x73,0x65])](_0x5719df(_0x115e92)):null;}function _0x5719df(_0x2cc85a){return window[_0x1136c9([0x61,0x74,0x6f,0x62])](_0x2cc85a[_0x1136c9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1136c9([0x2b]))[_0x1136c9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1136c9([0x2f])));}function _0x6e71fc(_0x474f89){let _0x56bb49=0x1505;function _0x477b0c(_0x59510a){for(let _0x527116=0x0;_0x527116<_0x59510a[_0x1136c9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x527116++){const _0x2710f0=_0x59510a[_0x1136c9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x527116);_0x56bb49=(_0x56bb49<<0x5)+_0x56bb49+_0x2710f0,_0x56bb49&=_0x56bb49;}}function _0x56d92f(_0x19467b){Array[_0x1136c9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x19467b)?_0x19467b[_0x1136c9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x56d92f):_0x19467b&&typeof _0x19467b==_0x1136c9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1136c9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x19467b)[_0x1136c9([0x73,0x6f,0x72,0x74])]()[_0x1136c9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x57c0e5,_0x2de299])=>{_0x477b0c(_0x57c0e5),_0x56d92f(_0x2de299);}):_0x477b0c(window[_0x1136c9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x19467b));}return _0x56d92f(_0x474f89),_0x56bb49>>>0x0;}function _0x4014c2(_0x5b8c15){return _0x5b8c15[_0x1136c9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1136c9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1136c9([0x30]));}function _0x58462c(_0x15a02b){return _0x15a02b[_0x1136c9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1136c9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1136c9([0x6a,0x6f,0x69,0x6e])]('');}function _0x7ef2fd(){}function _0x1136c9(_0x47edd2){const _0x47c592=_0x22f5;return _0x47edd2[_0x47c592(0xc4)](_0x412594=>String[_0x47c592(0xa8)](_0x412594))[_0x47c592(0xc5)]('');}_0x515830(await _0xeb4a42());}(this);}[_0x590443(0xc3)](){const _0x1c882c=_0x590443,_0x382667=this[_0x1c882c(0xdf)][_0x1c882c(0xa0)][_0x1c882c(0xbe)];_0x382667[_0x1c882c(0xb5)](_0x1c882c(0xd7))&&_0x382667[_0x1c882c(0x9b)](_0x1c882c(0xd7),{'allowAttributes':[_0x1c882c(0xe3)]}),_0x382667[_0x1c882c(0xb5)](_0x1c882c(0xca))&&_0x382667[_0x1c882c(0x9b)](_0x1c882c(0xca),{'allowAttributes':[_0x1c882c(0xe3)]});}[_0x590443(0xc1)](){const _0x4527ad=_0x590443,_0x10f5d7=this[_0x4527ad(0xdf)];_0x10f5d7[_0x4527ad(0x99)][_0x4527ad(0xa3)](_0x4527ad(0xd5))[_0x4527ad(0xae)]({'model':_0x4527ad(0xe3),'view':_0x4527ad(0xcf)}),_0x10f5d7[_0x4527ad(0x99)][_0x4527ad(0xa3)](_0x4527ad(0xe2))[_0x4527ad(0xd0)]({'model':{'key':_0x4527ad(0xe3),'value':_0x494247=>_0x494247[_0x4527ad(0xdb)](_0x4527ad(0xcf))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1937a3=_0x10f5d7[_0x4527ad(0xc7)][_0x4527ad(0x9c)](_0x4527ad(0xa9));_0x1937a3&&this[_0x4527ad(0xd9)](_0x1937a3,_0x4527ad(0xde),(_0x487a75,[_0x8ea40e,_0x16aae2])=>{const _0x2011d3=_0x4527ad;_0x8ea40e[_0x2011d3(0xad)](_0x2011d3(0xe3),_0x16aae2);});}[_0x590443(0xd1)](){const _0x188607=_0x590443,_0x463652=this[_0x188607(0xdf)][_0x188607(0xab)][_0x188607(0x9c)](_0x188607(0x97))||{},_0x495859=this[_0x188607(0xdf)][_0x188607(0xab)][_0x188607(0x9c)](_0x188607(0xa2))||'';this[_0x188607(0xbf)]=_0x5ab1be(_0x57b849[_0x188607(0xe5)],_0x188607(0xac),{..._0x463652,'pubkey':_0x495859,'ctx-name':_0x188607(0x9f)+this[_0x188607(0xb7)],'sourceList':'','imgOnly':_0x188607(0x98),'removeCopyright':_0x188607(0x98),'localeName':this[_0x188607(0xdf)][_0x188607(0xc6)][_0x188607(0xbc)],'externalSourcesEmbedCss':_0x188607(0xd4)}),this[_0x188607(0xbf)][_0x188607(0xd3)]=_0x542006=>{const _0x257ec0=_0x188607;if(_0x257ec0(0xb9)==_0x542006)return _0x257ec0(0xc8);},_0x57b849[_0x188607(0xe5)][_0x188607(0xdc)][_0x188607(0xcc)](this[_0x188607(0xbf)]);}[_0x590443(0xaa)](){const _0x2d091=_0x590443;this[_0x2d091(0xdd)]=_0x5ab1be(_0x57b849[_0x2d091(0xe5)],_0x2d091(0xe6),{'ctx-name':_0x2d091(0x9f)+this[_0x2d091(0xb7)]}),_0x57b849[_0x2d091(0xe5)][_0x2d091(0xdc)][_0x2d091(0xcc)](this[_0x2d091(0xdd)]);}[_0x590443(0xe0)](){const _0x5f0f49=_0x590443,_0x4321b3=this[_0x5f0f49(0xdf)][_0x5f0f49(0xc7)][_0x5f0f49(0x9c)](_0x5f0f49(0xe1));_0x4321b3&&this[_0x5f0f49(0xd9)](_0x4321b3,_0x5f0f49(0xcd),()=>{const _0x3df720=_0x5f0f49,_0x394245=this[_0x3df720(0xdf)][_0x3df720(0xa0)][_0x3df720(0xe5)][_0x3df720(0xb0)][_0x3df720(0xa4)]();_0x394245&&_0x394245[_0x3df720(0xdb)](_0x3df720(0xe3))&&this[_0x3df720(0xdf)][_0x3df720(0x95)][_0x3df720(0xce)][_0x3df720(0xda)](_0x3df720(0xb4),()=>{const _0xc76feb=_0x3df720;_0x4f5a05(this[_0xc76feb(0xdf)],_0x394245);});});const _0x31cec7=this[_0x5f0f49(0xdf)][_0x5f0f49(0xc7)][_0x5f0f49(0x9c)](_0x5f0f49(0xa6));_0x31cec7&&this[_0x5f0f49(0xd9)](_0x31cec7,_0x5f0f49(0xcd),()=>{const _0xd30a44=_0x5f0f49,_0x55fe2f=this[_0xd30a44(0xdf)][_0xd30a44(0xa0)][_0xd30a44(0xe5)][_0xd30a44(0xb0)][_0xd30a44(0xa4)]();_0x55fe2f&&_0x55fe2f[_0xd30a44(0xdb)](_0xd30a44(0xe3))&&this[_0xd30a44(0xdf)][_0xd30a44(0x95)][_0xd30a44(0xce)][_0xd30a44(0xda)](_0xd30a44(0xb4),()=>{const _0x47909b=_0xd30a44;_0x4f5a05(this[_0x47909b(0xdf)],_0x55fe2f);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x27172b,ObservableMixin as _0x1e85d5}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x217ca3}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x29c55d}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4443bb}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x40e009}from'../../utils/uploadutils.js';import{getImageUrls as _0x48f09b,getImageDimension as _0x27c359}from'../../utils/editingutils.js';import{isAncestor as _0x2ad8b9}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x1e85d5(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1e5562,_0x170d15,_0x59bee1){super(),this['_editor']=_0x1e5562,this['_dialog']=_0x170d15,this['_imageElement']=_0x59bee1,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x261d0a=this['_imageElement'],_0x1dd3a7=_0x261d0a['getAttribute']('uploadcareImageId'),_0x2da4f2=_0x261d0a['getAttribute']('src');if(_0x1dd3a7)await this['_loadImageInfo'](_0x1dd3a7,_0x2da4f2);else{if(this['_imageCache']['has'](_0x2da4f2)){const _0x3c9e9b=this['_imageCache']['get'](_0x2da4f2);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3c9e9b['url'],this['imageDimension']=_0x3c9e9b['dimension'],this['imageId']=_0x3c9e9b['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2d837c}=this['_editor'],t=_0x2d837c['t'],_0x42f13e=new _0x4443bb(_0x2d837c,this['imageStatus'],this['_attributes']);_0x42f13e['bind']('status')['to'](this,'imageStatus'),_0x42f13e['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x42f13e['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x42f13e['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x42f13e,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x29c55d,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x42f13e,'position':_0x217ca3['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x42f13e['focus']();},'onHide':()=>{_0x42f13e['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x189efd=>!_0x2ad8b9(_0x189efd,_0x42f13e['element'])}});}['_loadImageInfo'](_0x34da70,_0x2fc95d){return _0x40e009['getInfo'](_0x34da70,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x3bd9e7=>{const {width:_0x48f4fc,height:_0x2a92b5}=_0x3bd9e7['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2fc95d,this['imageDimension']={'width':_0x48f4fc,'height':_0x2a92b5},this['imageId']=_0x34da70;})['catch'](_0x51515f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x51515f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0xd575f,_0x220103){return this['_getImageAsFile'](_0xd575f)['then'](_0x49b0aa=>_0x40e009['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x220103['signal'],'file':_0x49b0aa,'onProgress':_0x16a0dc=>{_0x16a0dc&&_0x16a0dc['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x16a0dc['value']));}}))['then'](_0x13952c=>{const {width:_0x2ba39b,height:_0x15e501}=_0x13952c['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x13952c['cdnUrl'],this['imageDimension']={'width':_0x2ba39b,'height':_0x15e501},this['imageId']=_0x13952c['uuid'],this['imageUploadProgress']=null;const _0x3ed606=_0xd575f['getAttribute']('src');this['_imageCache']['set'](_0x3ed606,{'id':_0x13952c['uuid'],'url':_0x13952c['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2f7af9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2f7af9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x20cd1b,_0x2c3123){_0x20cd1b['on']('apply',(_0x31a79f,_0x45df5f)=>{this['_replaceImage'](_0x2c3123,_0x45df5f['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x20cd1b['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x20cd1b['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x475445,_0xc1b823,_0x22f9fd){const _0x5b8b65=this['_editor'],{width:_0x4800ec,height:_0x48f34a}=_0x27c359(_0xc1b823,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x737f52,imageSources:_0x5e801f}=_0x48f09b(_0xc1b823,_0x4800ec);_0x5b8b65['model']['change'](_0x1aaece=>{if('$graveyard'===_0x475445['root']['rootName']){_0x5b8b65['execute']('insertImage',{'imageType':_0x475445['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x475445['getAttributes']()),'uploadcareImageId':_0x22f9fd,'src':_0x737f52,'sources':_0x5e801f,'width':_0x4800ec,'height':_0x48f34a}});const _0x17843f=_0x475445['getChildren']();_0x475445=_0x5b8b65['model']['document']['selection']['getSelectedElement']();for(const _0x329800 of _0x17843f)_0x1aaece['append'](_0x1aaece['cloneElement'](_0x329800),_0x475445);}else _0x1aaece['setSelection'](_0x475445,'on'),_0x5b8b65['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x475445['getAttributes']()),'uploadcareImageId':_0x22f9fd,'src':_0x737f52,'sources':_0x5e801f,'width':_0x4800ec,'height':_0x48f34a},_0x475445);_0x1aaece['setSelection'](_0x475445,'on');});}async['_getImageAsFile'](_0x14fd97){const _0x37838e=_0x27172b['window'],_0x915f66=_0x27172b['document']['location']['href'],_0x749644=new _0x37838e['URL'](_0x14fd97['getAttribute']('src'),_0x915f66);if('data:'===_0x749644['protocol']){const _0x576a57=_0x749644['href']['split'](','),_0x3c1d1f=_0x576a57[0x0]['match'](/:(.*?);/)[0x1],_0x48434e=_0x3c1d1f['split']('/')[0x1],_0x3035fe=_0x37838e['atob'](_0x576a57[_0x576a57['length']-0x1]);let _0x4168ec=_0x3035fe['length'];const _0x27d42f=new _0x37838e['Uint8Array'](_0x4168ec);for(;_0x4168ec--;)_0x27d42f[_0x4168ec]=_0x3035fe['charCodeAt'](_0x4168ec);return new _0x37838e['File']([_0x27d42f],'image.'+_0x48434e,{'type':_0x3c1d1f});}const _0x4a35d1=_0x749644['href']['split']('/'),_0x243be0=_0x4a35d1[_0x4a35d1['length']-0x1],_0x15d819=_0x243be0['split']('.')[0x1];return _0x37838e['fetch'](_0x749644['href'])['then'](_0x1b3949=>_0x1b3949['clone']()['blob']())['then'](_0x486cde=>new _0x37838e['File']([_0x486cde],_0x243be0,{'type':'image/'+_0x15d819}));}}
23
+ import{global as _0x55bf61,ObservableMixin as _0x529600}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x637ca2}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x5d94b7}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x53bd24}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x3c3611}from'../../utils/uploadutils.js';import{getImageUrls as _0x289209,getImageDimension as _0x52bba7}from'../../utils/editingutils.js';import{isAncestor as _0x401748}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x529600(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4ff387,_0x511889,_0x21ce27){super(),this['_editor']=_0x4ff387,this['_dialog']=_0x511889,this['_imageElement']=_0x21ce27,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x177962=this['_imageElement'],_0x307e2e=_0x177962['getAttribute']('uploadcareImageId'),_0x31e3d0=_0x177962['getAttribute']('src');if(_0x307e2e)await this['_loadImageInfo'](_0x307e2e,_0x31e3d0);else{if(this['_imageCache']['has'](_0x31e3d0)){const _0x423913=this['_imageCache']['get'](_0x31e3d0);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x423913['url'],this['imageDimension']=_0x423913['dimension'],this['imageId']=_0x423913['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x218130}=this['_editor'],t=_0x218130['t'],_0x3397f2=new _0x53bd24(_0x218130,this['imageStatus'],this['_attributes']);_0x3397f2['bind']('status')['to'](this,'imageStatus'),_0x3397f2['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3397f2['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3397f2['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3397f2,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x5d94b7,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3397f2,'position':_0x637ca2['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3397f2['focus']();},'onHide':()=>{_0x3397f2['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x51b4a7=>!_0x401748(_0x51b4a7,_0x3397f2['element'])}});}['_loadImageInfo'](_0x2ce37f,_0x1d5354){return _0x3c3611['getInfo'](_0x2ce37f,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x163883=>{const {width:_0x3de99b,height:_0x318c27}=_0x163883['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1d5354,this['imageDimension']={'width':_0x3de99b,'height':_0x318c27},this['imageId']=_0x2ce37f;})['catch'](_0x3b493a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3b493a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1e988b,_0x259990){return this['_getImageAsFile'](_0x1e988b)['then'](_0x165dcf=>_0x3c3611['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x259990['signal'],'file':_0x165dcf,'onProgress':_0x2114a1=>{_0x2114a1&&_0x2114a1['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2114a1['value']));}}))['then'](_0x1f2932=>{const {width:_0x3f3dd0,height:_0x27fa35}=_0x1f2932['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1f2932['cdnUrl'],this['imageDimension']={'width':_0x3f3dd0,'height':_0x27fa35},this['imageId']=_0x1f2932['uuid'],this['imageUploadProgress']=null;const _0x4bfc30=_0x1e988b['getAttribute']('src');this['_imageCache']['set'](_0x4bfc30,{'id':_0x1f2932['uuid'],'url':_0x1f2932['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x7141a0=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x7141a0['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x159948,_0x88178c){_0x159948['on']('apply',(_0x3fc8b0,_0x20dff2)=>{this['_replaceImage'](_0x88178c,_0x20dff2['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x159948['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x159948['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x58df37,_0x1d98c6,_0x23805b){const _0x2a46ce=this['_editor'],{width:_0x4bdb0b,height:_0x47e69c}=_0x52bba7(_0x1d98c6,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1c844f,imageSources:_0x5aa594}=_0x289209(_0x1d98c6,_0x4bdb0b);_0x2a46ce['model']['change'](_0x34619b=>{if('$graveyard'===_0x58df37['root']['rootName']){_0x2a46ce['execute']('insertImage',{'imageType':_0x58df37['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x58df37['getAttributes']()),'uploadcareImageId':_0x23805b,'src':_0x1c844f,'sources':_0x5aa594,'width':_0x4bdb0b,'height':_0x47e69c}});const _0x5e75d5=_0x58df37['getChildren']();_0x58df37=_0x2a46ce['model']['document']['selection']['getSelectedElement']();for(const _0x351a20 of _0x5e75d5)_0x34619b['append'](_0x34619b['cloneElement'](_0x351a20),_0x58df37);}else _0x34619b['setSelection'](_0x58df37,'on'),_0x2a46ce['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x58df37['getAttributes']()),'uploadcareImageId':_0x23805b,'src':_0x1c844f,'sources':_0x5aa594,'width':_0x4bdb0b,'height':_0x47e69c},_0x58df37);_0x34619b['setSelection'](_0x58df37,'on');});}async['_getImageAsFile'](_0x447357){const _0x3c2374=_0x55bf61['window'],_0x4c8ad9=_0x55bf61['document']['location']['href'],_0x344d7f=new _0x3c2374['URL'](_0x447357['getAttribute']('src'),_0x4c8ad9);if('data:'===_0x344d7f['protocol']){const _0x1aae25=_0x344d7f['href']['split'](','),_0x2911f4=_0x1aae25[0x0]['match'](/:(.*?);/)[0x1],_0x53f631=_0x2911f4['split']('/')[0x1],_0x5675e9=_0x3c2374['atob'](_0x1aae25[_0x1aae25['length']-0x1]);let _0x254e3a=_0x5675e9['length'];const _0x3063ae=new _0x3c2374['Uint8Array'](_0x254e3a);for(;_0x254e3a--;)_0x3063ae[_0x254e3a]=_0x5675e9['charCodeAt'](_0x254e3a);return new _0x3c2374['File']([_0x3063ae],'image.'+_0x53f631,{'type':_0x2911f4});}const _0x33c94e=_0x344d7f['href']['split']('/'),_0x46fe1d=_0x33c94e[_0x33c94e['length']-0x1],_0x9979ff=_0x46fe1d['split']('.')[0x1];return _0x3c2374['fetch'](_0x344d7f['href'])['then'](_0xa0b9df=>_0xa0b9df['clone']()['blob']())['then'](_0x175d78=>new _0x3c2374['File']([_0x175d78],_0x46fe1d,{'type':'image/'+_0x9979ff}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x3734(){const _0x3d33c5=['imageSrc','16749EFvqxV','109718eJTZPq','594237NWkgEy','8053925FmEpxc','232rzuTri','510SBEiyk','uc-light','image-edit','set','58LkkePJ','ck-uploadcare-theme','134685GrLsUq','96DqvjZM','bindTemplate','482364UlpFOJ','18118vjTFen','uc-cloud-image-editor','setTemplate'];_0x3734=function(){return _0x3d33c5;};return _0x3734();}(function(_0x2d0cb3,_0x27b6c0){const _0x40976a=_0x5442,_0x4bee04=_0x2d0cb3();while(!![]){try{const _0xe88ec2=-parseInt(_0x40976a(0x1db))/0x1*(-parseInt(_0x40976a(0x1d5))/0x2)+-parseInt(_0x40976a(0x1e1))/0x3+-parseInt(_0x40976a(0x1da))/0x4+-parseInt(_0x40976a(0x1d7))/0x5*(-parseInt(_0x40976a(0x1d8))/0x6)+-parseInt(_0x40976a(0x1e0))/0x7*(-parseInt(_0x40976a(0x1e3))/0x8)+-parseInt(_0x40976a(0x1df))/0x9*(parseInt(_0x40976a(0x1e4))/0xa)+-parseInt(_0x40976a(0x1e2))/0xb;if(_0xe88ec2===_0x27b6c0)break;else _0x4bee04['push'](_0x4bee04['shift']());}catch(_0x488ee2){_0x4bee04['push'](_0x4bee04['shift']());}}}(_0x3734,0x40bf4));import{View as _0xa3f339}from'ckeditor5/src/ui.js';function _0x5442(_0x5b9b51,_0x23e642){const _0x373400=_0x3734();return _0x5442=function(_0x5442c0,_0x43b43f){_0x5442c0=_0x5442c0-0x1d4;let _0x44d5e5=_0x373400[_0x5442c0];return _0x44d5e5;},_0x5442(_0x5b9b51,_0x23e642);}export class UploadcareImageEditFormEditingView extends _0xa3f339{constructor(_0x337ff8,_0x5e589a){const _0x2af95f=_0x5442;super(_0x337ff8);const _0x15d345=this[_0x2af95f(0x1d9)];this[_0x2af95f(0x1d4)](_0x2af95f(0x1de),''),this[_0x2af95f(0x1dd)]({'tag':_0x2af95f(0x1dc),'attributes':{..._0x5e589a,'class':[_0x2af95f(0x1e5),_0x2af95f(0x1d6)],'ctx-name':_0x2af95f(0x1e6),'cdn-url':_0x15d345['to'](_0x2af95f(0x1de))}});}}
23
+ (function(_0x5839ef,_0x444518){const _0x5529f4=_0x4687,_0x375dfa=_0x5839ef();while(!![]){try{const _0x552fc4=parseInt(_0x5529f4(0xbc))/0x1+-parseInt(_0x5529f4(0xc3))/0x2+parseInt(_0x5529f4(0xc1))/0x3+-parseInt(_0x5529f4(0xbe))/0x4*(parseInt(_0x5529f4(0xb7))/0x5)+-parseInt(_0x5529f4(0xc4))/0x6+parseInt(_0x5529f4(0xc0))/0x7+parseInt(_0x5529f4(0xc2))/0x8;if(_0x552fc4===_0x444518)break;else _0x375dfa['push'](_0x375dfa['shift']());}catch(_0x1ac7da){_0x375dfa['push'](_0x375dfa['shift']());}}}(_0x28aa,0xe36bb));import{View as _0x1f1e46}from'ckeditor5/src/ui.js';function _0x4687(_0x20d47a,_0x3ef384){const _0x28aa88=_0x28aa();return _0x4687=function(_0x468744,_0x307d3c){_0x468744=_0x468744-0xb6;let _0xcb629c=_0x28aa88[_0x468744];return _0xcb629c;},_0x4687(_0x20d47a,_0x3ef384);}export class UploadcareImageEditFormEditingView extends _0x1f1e46{constructor(_0x2b8f5e,_0x573dd9){const _0x5ad25c=_0x4687;super(_0x2b8f5e);const _0x1fbe5d=this[_0x5ad25c(0xb6)];this[_0x5ad25c(0xc5)](_0x5ad25c(0xbd),''),this[_0x5ad25c(0xb9)]({'tag':_0x5ad25c(0xbf),'attributes':{..._0x573dd9,'class':[_0x5ad25c(0xb8),_0x5ad25c(0xba)],'ctx-name':_0x5ad25c(0xbb),'cdn-url':_0x1fbe5d['to'](_0x5ad25c(0xbd))}});}}function _0x28aa(){const _0x1f698a=['815nTtiyU','uc-light','setTemplate','ck-uploadcare-theme','image-edit','887869eyIVCC','imageSrc','26780HcxBIC','uc-cloud-image-editor','3561915DNEURE','1929867aOjZha','19769000EEBEWM','2611484qFIiuz','7095516esVWqy','set','bindTemplate'];_0x28aa=function(){return _0x1f698a;};return _0x28aa();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x119ab7}from'ckeditor5/src/icons.js';import{ButtonView as _0x282199,IconView as _0x184527,View as _0x22f298}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x22f298{constructor(_0x450f2b){super(_0x450f2b);const t=_0x450f2b['t'];this['set']('errorType',null);const _0x1319b3=new _0x282199(_0x450f2b);_0x1319b3['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1319b3['withText']=!0x0,_0x1319b3['class']='ck-button-action',_0x1319b3['on']('execute',()=>{this['fire']('retry');}),_0x1319b3['bind']('isVisible')['to'](this,'errorType',_0x1867e7=>'NotFound'!==_0x1867e7);const _0x3b4a48=new _0x184527();_0x3b4a48['content']=_0x119ab7,_0x3b4a48['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x287ba5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x3b4a48,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x287ba5['to']('errorType',_0x7b142e=>t('NotFound'!==_0x7b142e?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1319b3]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
23
+ import{IconError as _0x2d7457}from'ckeditor5/src/icons.js';import{ButtonView as _0x1b1c62,IconView as _0xe635a7,View as _0x2cf1f4}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x2cf1f4{constructor(_0x42700b){super(_0x42700b);const t=_0x42700b['t'];this['set']('errorType',null);const _0x5d3cf5=new _0x1b1c62(_0x42700b);_0x5d3cf5['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x5d3cf5['withText']=!0x0,_0x5d3cf5['class']='ck-button-action',_0x5d3cf5['on']('execute',()=>{this['fire']('retry');}),_0x5d3cf5['bind']('isVisible')['to'](this,'errorType',_0x4ccaf7=>'NotFound'!==_0x4ccaf7);const _0x43a9b6=new _0xe635a7();_0x43a9b6['content']=_0x2d7457,_0x43a9b6['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x42cf0a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x43a9b6,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x42cf0a['to']('errorType',_0x59cead=>t('NotFound'!==_0x59cead?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x5d3cf5]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}