@ckeditor/ckeditor5-uploadcare 47.7.0-alpha.4 → 47.7.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 _0x119478,Command as _0x5a302f}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4fc631,IconGooglePhotos as _0x384fb9,IconGoogleDrive as _0x1b4ed6,IconFacebook as _0x5e0be5,IconDropbox as _0x27642c,IconUploadcareLink as _0x4fb7ea,IconUploadcareImageUpload as _0x4af863,IconError as _0x865b41,IconUploadcareImageEdit as _0x5e16d8}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x216d81,MenuBarMenuListItemButtonView as _0x378842,View as _0x40225d,FocusCycler as _0x4e5110,Dialog as _0x32cc17,DialogViewPosition as _0x26d252,SpinnerView as _0x163080,IconView as _0x3375e8,Notification as _0x5bf28a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x391338,DomEmitterMixin as _0x8c9f25,global as _0x229c53,getAncestors as _0x3cbf6e,ObservableMixin as _0x1c82b3,uid as _0x2afc25,createElement as _0x3c83c1}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x43f3c6}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x128b85,info as _0x4fb0b1}from'@uploadcare/upload-client';import*as _0x7f75ce from'@uploadcare/file-uploader';var i=function(_0x165cf7){return _0x165cf7['Local']='local',_0x165cf7['URL']='url',_0x165cf7['Dropbox']='dropbox',_0x165cf7['GDrive']='gdrive',_0x165cf7['Facebook']='facebook',_0x165cf7['GPhotos']='gphotos',_0x165cf7['OneDrive']='onedrive',_0x165cf7;}({});function _(_0x59ecb8,_0x55a439,_0x414b48){const t=_0x59ecb8['t'],_0x4cc979=_0x59ecb8['t'];switch(_0x55a439){case i['Local']:return{'text':_0x4cc979('Insert'===_0x414b48?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4cc979('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x414b48?_0x4cc979('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4cc979('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x414b48?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x414b48?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x414b48?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x414b48?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x414b48?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x55a439;}}class e extends _0x119478{['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 _0x58f943=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x408964;for(const _0x365851 in _0x58f943){const _0x1eff86=_0x365851,_0x359158=_0x58f943[_0x1eff86];if('uploadcareLicenseKeyValid'==_0x359158||'uploadcareLicenseKeyInvalid'==_0x359158||'uploadcareLicenseKeyExpired'==_0x359158||'uploadcareLicenseKeyDomainLimit'==_0x359158||'uploadcareLicenseKeyNotAllowed'==_0x359158||'uploadcareLicenseKeyEvaluationLimit'==_0x359158||'uploadcareLicenseKeyUsageLimit'==_0x359158){delete _0x58f943[_0x1eff86],_0x408964=_0x359158,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x408964&&_0x58f943['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x408964&&_0x58f943['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x408964&&_0x58f943['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x408964&&_0x58f943['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x408964&&_0x58f943['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x408964&&_0x58f943['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x4d82a8}=this,_0x18b1ce=_0x4d82a8['commands']['get']('uploadcare');if(!_0x18b1ce)return;const _0x102d77=this['_normalizeConfigSourceList'](_0x4d82a8['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4d5b0d,_0x5aac7d)=>{const _0x16d145=this['_getIntegrationKey'](_0x5aac7d['type']);return _0x4d5b0d[_0x16d145]||(_0x4d5b0d[_0x16d145]=[]),_0x4d5b0d[_0x16d145]['push'](_0x5aac7d),_0x4d5b0d;},{});_0x4d82a8['plugins']['has']('ImageInsertUI')&&_0x4d82a8['commands']['get']('uploadcare')&&Object['entries'](_0x102d77)['forEach'](([_0x48e407,_0x5d3c8c])=>{_0x4d82a8['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x48e407,'observable':()=>_0x18b1ce,'buttonViewCreator':()=>this['_createToolbarButton'](_0x5d3c8c),'formViewCreator':()=>this['_createDropdownButtons'](_0x5d3c8c),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x5d3c8c),'override':'assetManager'!==_0x48e407});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x23cb6a){const {locale:_0x2c735f}=this['editor'];return _0x23cb6a['map'](_0x211fd5=>{const _0x1b5a9a=_(_0x2c735f,_0x211fd5,'Insert');switch(_0x211fd5){case i['Local']:return{'icon':_0x4af863,'type':i['Local'],..._0x1b5a9a};case i['URL']:return{'icon':_0x4fb7ea,'type':i['URL'],..._0x1b5a9a};case i['Dropbox']:return{'icon':_0x27642c,'type':i['Dropbox'],..._0x1b5a9a};case i['Facebook']:return{'icon':_0x5e0be5,'type':i['Facebook'],..._0x1b5a9a};case i['GDrive']:return{'icon':_0x1b4ed6,'type':i['GDrive'],..._0x1b5a9a};case i['GPhotos']:return{'icon':_0x384fb9,'type':i['GPhotos'],..._0x1b5a9a};case i['OneDrive']:return{'icon':_0x4fc631,'type':i['OneDrive'],..._0x1b5a9a};}});}['_getIntegrationKey'](_0x2fc0ce){switch(_0x2fc0ce){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3a12a9,_0x55d9b6){const _0x43c256=this['editor'],_0x2029b7=new _0x3a12a9(_0x43c256['locale']),_0x1202a5=_0x43c256['commands']['get']('uploadcare');return _0x2029b7['bind']('isEnabled')['to'](_0x1202a5),_0x2029b7['on']('execute',()=>{_0x1202a5['execute'](_0x55d9b6);}),_0x2029b7;}['_createToolbarButton'](_0x34eb07){const {locale:_0x3d2288}=this['editor'],_0x405466=this['editor']['plugins']['get']('ImageInsertUI'),_0x25fdce=_0x34eb07[0x0],_0x5102d4=this['_createButton'](_0x216d81,_0x25fdce['type']);return _0x5102d4['icon']=_0x25fdce['icon'],_0x5102d4['bind']('label')['to'](_0x405466,'isImageSelected',_0x3ac537=>_(_0x3d2288,_0x25fdce['type'],_0x3ac537?'Replace':'Insert')['text']),_0x5102d4['tooltip']=!0x0,_0x5102d4;}['_createDropdownButtons'](_0x5028f8){const {locale:_0x467fb1}=this['editor'],_0x2376a4=this['editor']['plugins']['get']('ImageInsertUI');return _0x5028f8['map'](_0xeddcf3=>{const _0x41fd39=this['_createButton'](_0x216d81,_0xeddcf3['type']);return _0x41fd39['withText']=!0x0,_0x41fd39['icon']=_0xeddcf3['icon'],_0x41fd39['bind']('label')['to'](_0x2376a4,'isImageSelected',_0x316705=>_(_0x467fb1,_0xeddcf3['type'],_0x316705?'Replace':'Insert')['text']),_0x41fd39;});}['_createMenuBarButtons'](_0x2eb1a3){return _0x2eb1a3['map'](_0x2daf2f=>{const _0x269b59=this['_createButton'](_0x378842,_0x2daf2f['type']);return _0x269b59['icon']=_0x2daf2f['icon'],_0x269b59['label']=_0x2daf2f['shortText'],_0x269b59;});}}class F extends _0x40225d{['focusTracker'];['focusCycler'];constructor(_0x2a3c98){super(_0x2a3c98),this['focusTracker']=new _0x391338(),this['focusCycler']=new _0x4e5110({'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(_0x11458e,_0x1276c4){super(_0x11458e),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-'+_0x1276c4}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x322c12,_0x1b202a){const _0x49ef31=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4dd1aa=>_0x4dd1aa<=_0x1b202a)['map'](_0x3a459d=>_0x322c12['replace'](/\/$/,'')+'/-/resize/'+_0x3a459d+'x/\x20'+_0x3a459d+'w');return{'imageFallbackUrl':_0x322c12,'imageSources':[{'srcset':_0x49ef31['join'](',\x20'),'sizes':'(max-width:\x20'+_0x1b202a+'px)\x20100vw,\x20'+_0x1b202a+'px','type':'image/webp'}]};}function S(_0x57d4c9,_0x3a0bef,_0x4100bc){const _0x1898e2=_0x57d4c9['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1898e2?parseInt(_0x1898e2[0x1],0xa):_0x3a0bef,'height':_0x1898e2?parseInt(_0x1898e2[0x2],0xa):_0x4100bc};}function p(_0x1d4ecd,_0x4406c3){const _0x268d63=new(_0x8c9f25())(),_0x2fbef1=_0x1d4ecd['plugins']['get']('ImageUtils'),_0x49a3e6=_0x1d4ecd['editing']['mapper']['toViewElement'](_0x4406c3),_0x3c770c=_0x2fbef1['findViewImgElement'](_0x49a3e6),_0x885073=_0x1d4ecd['editing']['view']['domConverter']['viewToDom'](_0x3c770c),_0x22798b=_0x4406c3['getAttribute']('width'),_0x25c288=_0x4406c3['getAttribute']('height'),_0x38a1d0='image-processing';_0x1d4ecd['editing']['view']['change'](_0x5112d3=>{_0x5112d3['addClass'](_0x38a1d0,_0x49a3e6),_0x5112d3['setStyle']('aspect-ratio',_0x22798b+'/'+_0x25c288,_0x3c770c);}),_0x268d63['listenTo'](_0x885073,'load',()=>{_0x268d63['stopListening'](_0x885073,'load'),_0x1d4ecd['editing']['view']['change'](_0x488d14=>{_0x488d14['removeClass'](_0x38a1d0,_0x49a3e6),_0x488d14['removeStyle']('aspect-ratio',_0x3c770c);});});}function z(_0x314129){if(Array['isArray'](_0x314129)){const _0x21dffd=_0x314129['map'](z);return _0xb025e5=>_0x21dffd['some'](_0x38995b=>_0x38995b(_0xb025e5));}if('origin'==_0x314129){const _0x5670cd=_0x229c53['window']['location']['origin'];return _0x24e910=>new URL(_0x24e910,_0x229c53['document']['baseURI'])['origin']==_0x5670cd;}return'function'==typeof _0x314129?_0x314129:_0x314129 instanceof RegExp?_0xc76a44=>!(!_0xc76a44['match'](_0x314129)&&!_0xc76a44['replace'](/^https?:\/\//,'')['match'](_0x314129)):()=>!0x1;}function A(_0x45011c,_0x113a51){return _0x3cbf6e(_0x45011c['target'])['includes'](_0x113a51);}class n extends/* #__PURE__ -- @preserve */
24
- _0x1c82b3(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2a3017,_0x410ef4,_0x4aa511){super(),this['_editor']=_0x2a3017,this['_editing']=_0x410ef4,this['_dialog']=_0x2a3017['plugins']['get'](_0x32cc17),this['_api']=_0x410ef4['ctxElement']['getAPI'](),this['_type']=_0x4aa511,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:_0x31ea7d,model:_0x2612f0}=this['_editor'],_0x50d31f=_0x2612f0['document']['selection']['getSelectedElement'](),_0x5a23e8=_0x50d31f&&(_0x50d31f['is']('element','imageBlock')||_0x50d31f['is']('element','imageInline'));this['_formView']=new x(_0x31ea7d,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4af863,'title':_(_0x31ea7d,this['_type'],_0x5a23e8?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x26d252['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xc7b206=>!A(_0xc7b206,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x3b8924}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x112a37=>{const _0x5d42bd=_0x3b8924['length'];for(const _0x1c9119 of _0x3b8924){const _0x3fb3c4=_0x1c9119===_0x3b8924[_0x5d42bd-0x1],{cdnUrl:_0x25d01d,fileInfo:_0x58ea1f}=_0x1c9119;if(!_0x25d01d||!_0x58ea1f)continue;const {width:_0x493102,height:_0x28046d}=_0x58ea1f['imageInfo'],_0x5050fc=S(_0x25d01d,_0x493102,_0x28046d),_0x4eba2a=C(_0x25d01d,_0x5050fc['width']),_0x4271a8={'id':_0x58ea1f['uuid'],'type':'image','attributes':{'imageDimension':_0x5050fc,..._0x4eba2a}};this['_insertAsset'](_0x4271a8,_0x3fb3c4,_0x112a37);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x29a947=>{'idle'===_0x29a947['detail']['status']&&!_0x29a947['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4e8f73,_0x5c7427,_0x3c6250){const _0x2a2e84=this['_editor']['model']['document']['selection'],_0x5565f1=_0x2a2e84['getSelectedElement'](),_0x1cf8f9=!(!_0x5565f1||!_0x5565f1['is']('element','imageInline'));_0x3c6250['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4e8f73,_0x1cf8f9),_0x5c7427||_0x3c6250['setSelection'](_0x2a2e84['getLastPosition']());}['_insertImage'](_0x310411,_0x435168){const _0x4fe0a0=this['_editor'],{imageDimension:_0x19f38f,imageFallbackUrl:_0x1e67c0,imageSources:_0x5249a4}=_0x310411['attributes'];_0x4fe0a0['execute']('insertImage',{'imageType':_0x435168?'imageInline':null,'source':{'uploadcareImageId':_0x310411['id'],'src':_0x1e67c0,'sources':_0x5249a4,..._0x19f38f}});}}class w extends _0x5a302f{['_editing'];['_controller']=null;static get['requires'](){return[_0x32cc17,o];}constructor(_0x3cf89b){super(_0x3cf89b),this['_editing']=_0x3cf89b['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0xd9504b){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0xd9504b);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x881a97,..._0x595f21}){return _0x128b85(_0x881a97,_0x595f21);}static['getInfo'](_0x52fa59,_0x2a7518){return _0x4fb0b1(_0x52fa59,_0x2a7518);}}class f extends _0x119478{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x43f3c6,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x226d36=this['editor'];if(!!!_0x226d36['config']['get']('uploadcare'))return;_0x226d36['plugins']['get'](_0x43f3c6)['createUploadAdapter']=_0x5cb870=>new k(_0x5cb870,_0x226d36),_0x226d36['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x3c09a0,{imageElement:_0x285e2c,data:_0x598710})=>{_0x226d36['model']['change'](_0x425c04=>{_0x425c04['setAttribute']('uploadcareImageId',_0x598710['uploadcareImageId'],_0x285e2c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x59f02f,_0x4d200c){this['loader']=_0x59f02f,this['editor']=_0x4d200c,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1e5c34=await this['loader']['file'];return j['upload']({'file':_0x1e5c34,'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':_0x5d12ee=>{_0x5d12ee&&_0x5d12ee['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x5d12ee['value']);}})['then'](async _0x493ad3=>{const {imageFallbackUrl:_0x469a17,imageSources:_0x4b5b24}=C(_0x493ad3['cdnUrl'],_0x493ad3['imageInfo']['width']);return{'uploadcareImageId':_0x493ad3['uuid'],'default':_0x469a17,'sources':_0x4b5b24};})['catch'](()=>{const _0x184f20=t('Cannot\x20upload\x20file:')+('\x20'+_0x1e5c34['name']+'.');return Promise['reject'](_0x184f20);});}['abort'](){this['controller']['abort']();}}class o extends _0x119478{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x32cc17];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x47405c){super(_0x47405c),this['ucContextId']=_0x2afc25();}['init'](){const _0x4745e0=this['editor'];_0x4745e0['commands']['add']('uploadcare',new w(_0x4745e0));}['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 _0x4edc37=_0x229c53['document']['querySelector']('input[uploadcare-file-input]');_0x4edc37&&_0x4edc37['remove']();}),async function(_0x1ede7f){const _0x4f4c80=_0x26274c([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x10c920=0x535f8c3a,_0x1e1d28=0x53580b6a^_0x10c920,_0x1c4507=window[_0x26274c([0x44,0x61,0x74,0x65])][_0x26274c([0x6e,0x6f,0x77])](),_0x2318ec=_0x1ede7f[_0x26274c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xd99114=new window[(_0x26274c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4387d9=>{_0x2318ec[_0x26274c([0x6f,0x6e,0x63,0x65])](_0x26274c([0x72,0x65,0x61,0x64,0x79]),_0x4387d9);}),_0x3b067f={[_0x26274c([0x6b,0x74,0x79])]:_0x26274c([0x45,0x43]),[_0x26274c([0x75,0x73,0x65])]:_0x26274c([0x73,0x69,0x67]),[_0x26274c([0x63,0x72,0x76])]:_0x26274c([0x50,0x2d,0x32,0x35,0x36]),[_0x26274c([0x78])]:_0x26274c([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]),[_0x26274c([0x79])]:_0x26274c([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]),[_0x26274c([0x61,0x6c,0x67])]:_0x26274c([0x45,0x53,0x32,0x35,0x36])},_0x3889a4=_0x2318ec[_0x26274c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x26274c([0x67,0x65,0x74])](_0x26274c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x549b15(){let _0x46cc48,_0x13c705=null,_0x12e509=null;try{if(_0x3889a4==_0x26274c([0x47,0x50,0x4c]))return _0x26274c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46cc48=_0x5782f1(),!_0x46cc48)return _0x26274c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46cc48[_0x26274c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x12e509=_0x18f89b(_0x46cc48[_0x26274c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46cc48[_0x26274c([0x6a,0x74,0x69])])),await _0x2ef6fe()?_0x5bdfd9()?_0x47a725()?_0x26274c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xc6b675()?(_0x46cc48[_0x26274c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x26274c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x13c705=_0x5ce053(_0x26274c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x54799c()):_0x26274c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x26274c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x26274c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x26274c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x47a725(){const _0x1e8f46=[_0x26274c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x26274c([0x74,0x72,0x69,0x61,0x6c])][_0x26274c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46cc48[_0x26274c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1c4507/0x3e8:0xe10*_0x1e1d28;return _0x46cc48[_0x26274c([0x65,0x78,0x70])]<_0x1e8f46;}function _0x5bdfd9(){const _0x549dce=_0x46cc48[_0x26274c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x549dce&&(!!_0x549dce[_0x26274c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26274c([0x2a]))||!!_0x549dce[_0x26274c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26274c([0x55,0x50,0x4c,0x43])));}function _0xc6b675(){const _0x511d0f=_0x46cc48[_0x26274c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x511d0f||0x0==_0x511d0f[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3ca6f4}=new URL(window[_0x26274c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x511d0f[_0x26274c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3ca6f4))return!0x0;const _0x1f0ead=_0x3ca6f4[_0x26274c([0x73,0x70,0x6c,0x69,0x74])](_0x26274c([0x2e]));return _0x511d0f[_0x26274c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3fa07f=>_0x3fa07f[_0x26274c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26274c([0x2a])))[_0x26274c([0x6d,0x61,0x70])](_0x329827=>_0x329827[_0x26274c([0x73,0x70,0x6c,0x69,0x74])](_0x26274c([0x2e])))[_0x26274c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11d363=>_0x11d363[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1f0ead[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x26274c([0x6d,0x61,0x70])](_0x198f68=>Array(_0x1f0ead[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x198f68[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x26274c([0x66,0x69,0x6c,0x6c])](_0x198f68[0x0]===_0x26274c([0x2a])?_0x26274c([0x2a]):'')[_0x26274c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x198f68))[_0x26274c([0x73,0x6f,0x6d,0x65])](_0x32436a=>_0x1f0ead[_0x26274c([0x65,0x76,0x65,0x72,0x79])]((_0x465adf,_0x37f41c)=>_0x32436a[_0x37f41c]===_0x465adf||_0x32436a[_0x37f41c]===_0x26274c([0x2a])));}function _0x54799c(){return _0x13c705&&_0x12e509?new window[(_0x26274c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x596848,_0x529187)=>{_0x13c705[_0x26274c([0x74,0x68,0x65,0x6e])](_0x596848,_0x529187),_0x12e509[_0x26274c([0x74,0x68,0x65,0x6e])](_0x20de28=>{_0x20de28!=_0x26274c([0x56,0x61,0x6c,0x69,0x64])&&_0x596848(_0x20de28);},_0x529187);}):_0x13c705||_0x12e509||_0x26274c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x18f89b(_0x5b4424,_0x14b734){return new window[(_0x26274c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x49f92e=>{if(_0x343bde())return _0x49f92e(_0x26274c([0x56,0x61,0x6c,0x69,0x64]));_0x1dc364(),_0x2318ec[_0x26274c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x26274c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x284cee=!0x1;const _0x4e22c2=_0x2afc25();function _0x7160cb(_0x5c0ba6){return!!_0x5c0ba6&&(typeof _0x5c0ba6===_0x26274c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5c0ba6===_0x26274c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5c0ba6[_0x26274c([0x74,0x68,0x65,0x6e])]===_0x26274c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5c0ba6[_0x26274c([0x63,0x61,0x74,0x63,0x68])]===_0x26274c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x528a74(_0x18a8d3){_0xeef47(_0x18a8d3)[_0x26274c([0x74,0x68,0x65,0x6e])](_0x12908b=>{if(!_0x12908b||_0x12908b[_0x26274c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x26274c([0x6f,0x6b]))return _0x26274c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x973fb1(_0x1d0365(_0x4e22c2+_0x14b734))!=_0x12908b[_0x26274c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x26274c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x26274c([0x56,0x61,0x6c,0x69,0x64]);})[_0x26274c([0x74,0x68,0x65,0x6e])](_0x93aca6=>(_0x4df1c7(),_0x93aca6),()=>{const _0x4319c7=_0x35402c();return null==_0x4319c7?(_0x4df1c7(),_0x26274c([0x56,0x61,0x6c,0x69,0x64])):_0x26274c(_0x1c4507-_0x4319c7>(0x7753083a^_0x10c920)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x26274c([0x74,0x68,0x65,0x6e])](_0x49f92e)[_0x26274c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x49f92e(_0x26274c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x34d68d=0x536962ba^_0x10c920;function _0x4df1c7(){const _0x121516=_0x26274c([0x6c,0x6c,0x63,0x74,0x2d])+_0x973fb1(_0x1d0365(_0x5b4424)),_0x46e9ef=_0x34af82(_0x973fb1(window[_0x26274c([0x4d,0x61,0x74,0x68])][_0x26274c([0x63,0x65,0x69,0x6c])](_0x1c4507/_0x34d68d)));window[_0x26274c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26274c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x121516,_0x46e9ef);}function _0x35402c(){const _0x8e8736=_0x26274c([0x6c,0x6c,0x63,0x74,0x2d])+_0x973fb1(_0x1d0365(_0x5b4424)),_0x18acc2=window[_0x26274c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26274c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x8e8736);return _0x18acc2?window[_0x26274c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34af82(_0x18acc2),0x10)*_0x34d68d:null;}function _0xeef47(_0x5f5b97){return new window[(_0x26274c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x371b70,_0x4ab7b3)=>{_0x5f5b97[_0x26274c([0x74,0x68,0x65,0x6e])](_0x371b70,_0x4ab7b3),window[_0x26274c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4ab7b3,0x535e58fa^_0x10c920);});}}_0x2318ec[_0x26274c([0x6f,0x6e])](_0x26274c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5f06e3,_0x5968fd)=>{if(_0x5968fd[0x0]!=_0x5b4424)return _0x49f92e(_0x26274c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5968fd[0x1]={..._0x5968fd[0x1],[_0x26274c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4e22c2};},{[_0x26274c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26274c([0x68,0x69,0x67,0x68])}),_0x2318ec[_0x26274c([0x6f,0x6e])](_0x26274c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xa2aa7b=>{_0x7160cb(_0xa2aa7b[_0x26274c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x284cee=!0x0,_0x528a74(_0xa2aa7b[_0x26274c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x26274c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26274c([0x6c,0x6f,0x77])}),_0xd99114[_0x26274c([0x74,0x68,0x65,0x6e])](()=>{_0x284cee||_0x49f92e(_0x26274c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x343bde(){return _0x2318ec[_0x26274c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26274c([0x76,0x69,0x65,0x77])][_0x26274c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x26274c([0x61,0x75,0x74,0x6f]);}function _0x1dc364(){_0x2318ec[_0x26274c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26274c([0x76,0x69,0x65,0x77])][_0x26274c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x26274c([0x61,0x75,0x74,0x6f]);}}function _0x5ce053(_0x560c38){const _0x41acef=[new window[(_0x26274c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x216da3=>setTimeout(_0x216da3,0x5356b2f6^_0x10c920)),_0xd99114[_0x26274c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x26274c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47c1ac=>{let _0x539138=0x0;_0x2318ec[_0x26274c([0x6d,0x6f,0x64,0x65,0x6c])][_0x26274c([0x6f,0x6e])](_0x26274c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1c3adf,_0x5663f7)=>{_0x5663f7[0x0][_0x26274c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x539138++,_0x539138==(0x535f89d2^_0x10c920)&&(_0x47c1ac(),_0x1c3adf[_0x26274c([0x6f,0x66,0x66])]());});}))];return window[_0x26274c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x26274c([0x72,0x61,0x63,0x65])](_0x41acef)[_0x26274c([0x74,0x68,0x65,0x6e])](()=>_0x560c38);}async function _0x4fc964(){await _0xd99114,_0x2318ec[_0x26274c([0x6d,0x6f,0x64,0x65,0x6c])][_0x26274c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x455b3e,_0x2318ec[_0x26274c([0x6d,0x6f,0x64,0x65,0x6c])][_0x26274c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x455b3e,_0x2318ec[_0x26274c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x26274c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3860a2(_0xaec490){const _0x142427=_0x112a55();_0x2318ec[_0x142427]=_0x26274c([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xaec490,_0xaec490!=_0x26274c([0x56,0x61,0x6c,0x69,0x64])&&_0x4fc964();}function _0x112a55(){const _0x492494=window[_0x26274c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x26274c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x26274c([0x6e,0x6f,0x77])]())[_0x26274c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x26274c([0x2e]),'');let _0x34262c=_0x26274c([0x68]);for(let _0x54c1c2=0x0;_0x54c1c2<_0x492494[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x54c1c2+=0x2){let _0x191a26=window[_0x26274c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x492494[_0x26274c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x54c1c2,_0x54c1c2+0x2));_0x191a26>=_0x4f4c80[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x191a26-=_0x4f4c80[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x34262c+=_0x4f4c80[_0x191a26];}return _0x34262c;}function _0x5782f1(){const _0x496a0a=_0x3889a4[_0x26274c([0x73,0x70,0x6c,0x69,0x74])](_0x26274c([0x2e]));if(0x3!=_0x496a0a[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xd89fa5(_0x496a0a[0x1]);function _0xd89fa5(_0x248995){const _0x13e136=_0x144463(_0x248995);return _0x13e136&&_0x501ec7()?_0x13e136:null;function _0x501ec7(){const _0x1a0333=_0x13e136[_0x26274c([0x6a,0x74,0x69])],_0xfd4101=window[_0x26274c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1a0333[_0x26274c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1a0333[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1b81a0={..._0x13e136,[_0x26274c([0x6a,0x74,0x69])]:_0x1a0333[_0x26274c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1a0333[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1b81a0[_0x26274c([0x76,0x63])],_0x1d0365(_0x1b81a0)==_0xfd4101;}}}async function _0x2ef6fe(){let _0x14b418=!0x0;try{const _0x37a439=_0x3889a4[_0x26274c([0x73,0x70,0x6c,0x69,0x74])](_0x26274c([0x2e])),[_0x1df7e1,_0x41b3d7,_0x5b2cd6]=_0x37a439;return _0x297f4c(_0x1df7e1),await _0x711815(_0x1df7e1,_0x41b3d7,_0x5b2cd6),_0x14b418;}catch{return!0x1;}function _0x297f4c(_0x358f58){const _0x538dbd=_0x144463(_0x358f58);_0x538dbd&&_0x538dbd[_0x26274c([0x61,0x6c,0x67])]==_0x26274c([0x45,0x53,0x32,0x35,0x36])||(_0x14b418=!0x1);}async function _0x711815(_0x391261,_0x4ca0f1,_0x2cf518){const _0x5ba278=window[_0x26274c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x26274c([0x66,0x72,0x6f,0x6d])](_0x5d8437(_0x2cf518),_0x24013e=>_0x24013e[_0x26274c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x567da1=new window[(_0x26274c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x26274c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x391261+_0x26274c([0x2e])+_0x4ca0f1),_0x248a62=window[_0x26274c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x26274c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x248a62)return;const _0x1babc1=await _0x248a62[_0x26274c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x26274c([0x6a,0x77,0x6b]),_0x3b067f,{[_0x26274c([0x6e,0x61,0x6d,0x65])]:_0x26274c([0x45,0x43,0x44,0x53,0x41]),[_0x26274c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x26274c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x26274c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x248a62[_0x26274c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x26274c([0x6e,0x61,0x6d,0x65])]:_0x26274c([0x45,0x43,0x44,0x53,0x41]),[_0x26274c([0x68,0x61,0x73,0x68])]:{[_0x26274c([0x6e,0x61,0x6d,0x65])]:_0x26274c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1babc1,_0x5ba278,_0x567da1)||(_0x14b418=!0x1);}}function _0x144463(_0x130cac){return _0x130cac[_0x26274c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x26274c([0x65,0x79]))?JSON[_0x26274c([0x70,0x61,0x72,0x73,0x65])](_0x5d8437(_0x130cac)):null;}function _0x5d8437(_0x34f9f4){return window[_0x26274c([0x61,0x74,0x6f,0x62])](_0x34f9f4[_0x26274c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x26274c([0x2b]))[_0x26274c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x26274c([0x2f])));}function _0x1d0365(_0x173916){let _0x4a6c82=0x1505;function _0xb1dd20(_0x47ec0b){for(let _0x14b9be=0x0;_0x14b9be<_0x47ec0b[_0x26274c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x14b9be++){const _0x469ddb=_0x47ec0b[_0x26274c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x14b9be);_0x4a6c82=(_0x4a6c82<<0x5)+_0x4a6c82+_0x469ddb,_0x4a6c82&=_0x4a6c82;}}function _0x31a7bb(_0x1d573b){Array[_0x26274c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1d573b)?_0x1d573b[_0x26274c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x31a7bb):_0x1d573b&&typeof _0x1d573b==_0x26274c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x26274c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1d573b)[_0x26274c([0x73,0x6f,0x72,0x74])]()[_0x26274c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3491ad,_0x5c557c])=>{_0xb1dd20(_0x3491ad),_0x31a7bb(_0x5c557c);}):_0xb1dd20(window[_0x26274c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1d573b));}return _0x31a7bb(_0x173916),_0x4a6c82>>>0x0;}function _0x973fb1(_0x13c62f){return _0x13c62f[_0x26274c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x26274c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x26274c([0x30]));}function _0x34af82(_0x1128dd){return _0x1128dd[_0x26274c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x26274c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x26274c([0x6a,0x6f,0x69,0x6e])]('');}function _0x455b3e(){}function _0x26274c(_0x3a5272){return _0x3a5272['map'](_0x2d0ebc=>String['fromCharCode'](_0x2d0ebc))['join']('');}_0x3860a2(await _0x549b15());}(this);}['_initSchema'](){const _0x101ccc=this['editor']['model']['schema'];_0x101ccc['isRegistered']('imageBlock')&&_0x101ccc['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x101ccc['isRegistered']('imageInline')&&_0x101ccc['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x30e32a=this['editor'];_0x30e32a['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x30e32a['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x78930d=>_0x78930d['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1429b8=_0x30e32a['commands']['get']('replaceImageSource');_0x1429b8&&this['listenTo'](_0x1429b8,'cleanupImage',(_0x4b316d,[_0x11752d,_0x42103b])=>{_0x11752d['removeAttribute']('uploadcareImageId',_0x42103b);});}['_initConfig'](){const _0x5ecb1e=this['editor']['config']['get']('uploadcare.uploader')||{},_0x3883ed=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3c83c1(_0x229c53['document'],'uc-config',{..._0x5ecb1e,'pubkey':_0x3883ed,'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']=_0x3392a4=>{if('closeMax'==_0x3392a4)return'#uc-icon-arrow-down';},_0x229c53['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3c83c1(_0x229c53['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x229c53['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x4aa957=this['editor']['commands']['get']('insertImage');_0x4aa957&&this['listenTo'](_0x4aa957,'execute',()=>{const _0x44e84f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x44e84f&&_0x44e84f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x44e84f);});});const _0x42c744=this['editor']['commands']['get']('uploadcareImageReplace');_0x42c744&&this['listenTo'](_0x42c744,'execute',()=>{const _0x2f921d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2f921d&&_0x2f921d['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x2f921d);});});}}class tt extends _0x119478{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20f674){super(_0x20f674),_0x20f674['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x7f75ce['defineComponents'](_0x7f75ce),this['_defineLocale']();}['_defineLocale'](){const _0xb3744e=this['editor']['config']['get']('uploadcare.locale'),_0x17018b=this['editor']['locale']['contentLanguage'];_0xb3744e&&_0x7f75ce['defineLocale'](_0x17018b,_0xb3744e);}}class ii extends _0x40225d{constructor(_0x2da586){super(_0x2da586);const t=_0x2da586['t'],_0x3da8f4=this['bindTemplate'],_0x3e3374=new _0x163080();_0x3e3374['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':[_0x3e3374,{'text':_0x3da8f4['to']('imageUploadProgress',_0x47a0e3=>t('Loading\x20image...')+'\x20('+(_0x47a0e3||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 _0x40225d{constructor(_0x3f0c16){super(_0x3f0c16);const t=_0x3f0c16['t'];this['set']('errorType',null);const _0x1e175e=new _0x216d81(_0x3f0c16);_0x1e175e['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1e175e['withText']=!0x0,_0x1e175e['class']='ck-button-action',_0x1e175e['on']('execute',()=>{this['fire']('retry');}),_0x1e175e['bind']('isVisible')['to'](this,'errorType',_0x5200a1=>'NotFound'!==_0x5200a1);const _0x3ae858=new _0x3375e8();_0x3ae858['content']=_0x865b41,_0x3ae858['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x2b886a=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':[_0x3ae858,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x2b886a['to']('errorType',_0x550165=>t('NotFound'!==_0x550165?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1e175e]},{'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 _0x40225d{constructor(_0x40e778,_0x10344c){super(_0x40e778);const _0xadb6e6=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x10344c,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xadb6e6['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x3e4cab,_0x3dbbd9,_0xcb6d75){super(_0x3e4cab),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x3e4cab),this['_errorView']=new ti(_0x3e4cab),this['_editingView']=new ei(_0x3e4cab,_0xcb6d75),this['_focusableView']=new _0x40225d(_0x3e4cab),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x3dbbd9),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'],_0x3a0627=>{this['_addUploadcareImageEditorListeners'](_0x3a0627);});}),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'](_0x20b7bb,_0x28b295){const _0x4c0437='uc-cloud-image-editor',_0x2a027f=_0x20b7bb['querySelector'](_0x4c0437);if(_0x2a027f)return _0x28b295(_0x2a027f);const _0x53555c=new MutationObserver(_0x1acd98=>{const _0x314435=_0x1acd98['filter'](_0x1ce2ee=>_0x1ce2ee['target']===_0x20b7bb&&_0x1ce2ee['addedNodes']['length']>0x0&&_0x1ce2ee['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4c0437);_0x314435['length']&&(_0x53555c['disconnect'](),_0x28b295(_0x314435[0x0]['addedNodes'][0x0]));});_0x53555c['observe'](_0x20b7bb,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x388e8c){_0x388e8c['addEventListener']('apply',_0x121b32=>{this['fire']('apply',{'imageSrc':_0x121b32['detail']['cdnUrl']});}),_0x388e8c['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
- _0x1c82b3(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4c2763,_0x2c6ff9,_0x106f29){super(),this['_editor']=_0x4c2763,this['_dialog']=_0x2c6ff9,this['_imageElement']=_0x106f29,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 _0x5a5adc=this['_imageElement'],_0x511d23=_0x5a5adc['getAttribute']('uploadcareImageId'),_0x34c414=_0x5a5adc['getAttribute']('src');if(_0x511d23)await this['_loadImageInfo'](_0x511d23,_0x34c414);else{if(this['_imageCache']['has'](_0x34c414)){const _0xc73a69=this['_imageCache']['get'](_0x34c414);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xc73a69['url'],this['imageDimension']=_0xc73a69['dimension'],this['imageId']=_0xc73a69['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x303cb7}=this['_editor'],t=_0x303cb7['t'],_0xb92e7c=new X(_0x303cb7,this['imageStatus'],this['_attributes']);_0xb92e7c['bind']('status')['to'](this,'imageStatus'),_0xb92e7c['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xb92e7c['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xb92e7c['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xb92e7c,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x5e16d8,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xb92e7c,'position':_0x26d252['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xb92e7c['focus']();},'onHide':()=>{_0xb92e7c['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3276bf=>!A(_0x3276bf,_0xb92e7c['element'])}});}['_loadImageInfo'](_0xf502e2,_0x3bddc4){return j['getInfo'](_0xf502e2,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x48e14a=>{const {width:_0xd569b,height:_0x179607}=_0x48e14a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3bddc4,this['imageDimension']={'width':_0xd569b,'height':_0x179607},this['imageId']=_0xf502e2;})['catch'](_0x2824aa=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2824aa['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3e6d69,_0x197436){return this['_getImageAsFile'](_0x3e6d69)['then'](_0x1c73f3=>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':_0x197436['signal'],'file':_0x1c73f3,'onProgress':_0x2a2b65=>{_0x2a2b65&&_0x2a2b65['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2a2b65['value']));}}))['then'](_0x3abb9a=>{const {width:_0x142b40,height:_0x55d2dc}=_0x3abb9a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3abb9a['cdnUrl'],this['imageDimension']={'width':_0x142b40,'height':_0x55d2dc},this['imageId']=_0x3abb9a['uuid'],this['imageUploadProgress']=null;const _0x4a3a5f=_0x3e6d69['getAttribute']('src');this['_imageCache']['set'](_0x4a3a5f,{'id':_0x3abb9a['uuid'],'url':_0x3abb9a['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x42809d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x42809d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5c4e81,_0x43ea14){_0x5c4e81['on']('apply',(_0x22aeaf,_0x11abc8)=>{this['_replaceImage'](_0x43ea14,_0x11abc8['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5c4e81['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5c4e81['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2e5dba,_0x443b3e,_0x246a2b){const _0x23fcbb=this['_editor'],{width:_0x20598f,height:_0x98537b}=S(_0x443b3e,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x965ebc,imageSources:_0x464030}=C(_0x443b3e,_0x20598f);_0x23fcbb['model']['change'](_0x5f114e=>{if('$graveyard'===_0x2e5dba['root']['rootName']){_0x23fcbb['execute']('insertImage',{'imageType':_0x2e5dba['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2e5dba['getAttributes']()),'uploadcareImageId':_0x246a2b,'src':_0x965ebc,'sources':_0x464030,'width':_0x20598f,'height':_0x98537b}});const _0x4b2c5b=_0x2e5dba['getChildren']();_0x2e5dba=_0x23fcbb['model']['document']['selection']['getSelectedElement']();for(const _0x19359e of _0x4b2c5b)_0x5f114e['append'](_0x5f114e['cloneElement'](_0x19359e),_0x2e5dba);}else _0x5f114e['setSelection'](_0x2e5dba,'on'),_0x23fcbb['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2e5dba['getAttributes']()),'uploadcareImageId':_0x246a2b,'src':_0x965ebc,'sources':_0x464030,'width':_0x20598f,'height':_0x98537b},_0x2e5dba);_0x5f114e['setSelection'](_0x2e5dba,'on');});}async['_getImageAsFile'](_0x45c2a0){const _0x3c7afc=_0x229c53['window'],_0x5af4f6=_0x229c53['document']['location']['href'],_0x4c009f=new _0x3c7afc['URL'](_0x45c2a0['getAttribute']('src'),_0x5af4f6);if('data:'===_0x4c009f['protocol']){const _0x3ebdef=_0x4c009f['href']['split'](','),_0xbd67a2=_0x3ebdef[0x0]['match'](/:(.*?);/)[0x1],_0x146f1b=_0xbd67a2['split']('/')[0x1],_0x4c76d0=_0x3c7afc['atob'](_0x3ebdef[_0x3ebdef['length']-0x1]);let _0x4ec238=_0x4c76d0['length'];const _0x4c152e=new _0x3c7afc['Uint8Array'](_0x4ec238);for(;_0x4ec238--;)_0x4c152e[_0x4ec238]=_0x4c76d0['charCodeAt'](_0x4ec238);return new _0x3c7afc['File']([_0x4c152e],'image.'+_0x146f1b,{'type':_0xbd67a2});}const _0x59d948=_0x4c009f['href']['split']('/'),_0x350751=_0x59d948[_0x59d948['length']-0x1],_0x33f9fe=_0x350751['split']('.')[0x1];return _0x3c7afc['fetch'](_0x4c009f['href'])['then'](_0x2e7e33=>_0x2e7e33['clone']()['blob']())['then'](_0x20bba0=>new _0x3c7afc['File']([_0x20bba0],_0x350751,{'type':'image/'+_0x33f9fe}));}}class Q extends _0x5a302f{['imageEditController'];static get['requires'](){return[_0x32cc17];}['_isEditable'];constructor(_0x541496){super(_0x541496),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4ab3e0){const _0x2e19de=z(_0x4ab3e0);return _0x33f472=>!(!_0x33f472||!_0x33f472['is']('element','imageBlock')&&!_0x33f472['is']('element','imageInline'))&&(!!_0x33f472['hasAttribute']('uploadcareImageId')||!!_0x33f472['hasAttribute']('src')&&_0x2e19de(_0x33f472['getAttribute']('src')));}(_0x541496['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x48b8d3=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x48b8d3);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x12f36a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x12f36a&&(_0x12f36a['is']('element','imageBlock')||_0x12f36a['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x32cc17),_0x12f36a),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x5a302f{['refresh'](){const _0x59657d=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x59657d&&(_0x59657d['is']('element','imageBlock')||_0x59657d['is']('element','imageInline')));}['execute'](_0x3c85e5){const _0x123d7f=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x52bf05=>{_0x52bf05['setAttributes'](_0x3c85e5,_0x123d7f),_0x52bf05['removeAttribute']('srcset',_0x123d7f),_0x52bf05['removeAttribute']('sizes',_0x123d7f);});}}class m extends _0x119478{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x5bf28a,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x46a10f}=this;_0x46a10f['commands']['add']('uploadcareImageEdit',new Q(_0x46a10f)),_0x46a10f['commands']['add']('uploadcareImageReplace',new V(_0x46a10f));}}class g extends _0x119478{['_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 _0x442cd7=this['editor'];_0x442cd7['ui']['componentFactory']['add']('uploadcareImageEdit',_0x39c412=>{const _0x4cb12c=_0x442cd7['commands']['get']('uploadcareImageEdit'),_0x16ee02=new _0x216d81(_0x39c412),t=_0x39c412['t'];return _0x16ee02['set']({'icon':_0x5e16d8,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x16ee02['bind']('isEnabled')['to'](_0x4cb12c),_0x16ee02['bind']('isOn')['to'](_0x4cb12c,'isActive'),this['listenTo'](_0x16ee02,'execute',()=>{_0x442cd7['execute']('uploadcareImageEdit'),_0x442cd7['editing']['view']['focus']();}),_0x16ee02;}),this['_initConfig']();}['_initConfig'](){const _0x2fa6f1=_0x3c83c1(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x2fa6f1),this['listenTo'](this['editor'],'destroy',()=>{_0x2fa6f1['remove']();});}}class et extends _0x119478{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 _0x564f3e,Command as _0x149129}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x211c39,IconGooglePhotos as _0x716706,IconGoogleDrive as _0x139345,IconFacebook as _0x185d1f,IconDropbox as _0x12af59,IconUploadcareLink as _0x40beb5,IconUploadcareImageUpload as _0x177f65,IconError as _0x24c7c4,IconUploadcareImageEdit as _0x220a10}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x4ec294,MenuBarMenuListItemButtonView as _0x492a86,View as _0x46cd47,FocusCycler as _0x367f0e,Dialog as _0x5a4cdb,DialogViewPosition as _0x2e726e,SpinnerView as _0x26a512,IconView as _0x4fa485,Notification as _0x2df98d}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x5daf83,DomEmitterMixin as _0x50efa2,global as _0x52a0bb,getAncestors as _0x70c6b8,ObservableMixin as _0x577878,uid as _0x540acc,createElement as _0x4d5915}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x8c8020}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x586f2e,info as _0x594be7}from'@uploadcare/upload-client';import*as _0x408393 from'@uploadcare/file-uploader';var i=function(_0x5956eb){return _0x5956eb['Local']='local',_0x5956eb['URL']='url',_0x5956eb['Dropbox']='dropbox',_0x5956eb['GDrive']='gdrive',_0x5956eb['Facebook']='facebook',_0x5956eb['GPhotos']='gphotos',_0x5956eb['OneDrive']='onedrive',_0x5956eb;}({});function _(_0x20b4b7,_0x1ebf7f,_0x35bcf2){const t=_0x20b4b7['t'],_0x1318bf=_0x20b4b7['t'];switch(_0x1ebf7f){case i['Local']:return{'text':_0x1318bf('Insert'===_0x35bcf2?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x1318bf('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x35bcf2?_0x1318bf('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x1318bf('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x35bcf2?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x35bcf2?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x35bcf2?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x35bcf2?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x35bcf2?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x1ebf7f;}}class e extends _0x564f3e{['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 _0x443a52=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4ee67d;for(const _0x542595 in _0x443a52){const _0xcc72a=_0x542595,_0x17ba27=_0x443a52[_0xcc72a];if('uploadcareLicenseKeyValid'==_0x17ba27||'uploadcareLicenseKeyInvalid'==_0x17ba27||'uploadcareLicenseKeyExpired'==_0x17ba27||'uploadcareLicenseKeyDomainLimit'==_0x17ba27||'uploadcareLicenseKeyNotAllowed'==_0x17ba27||'uploadcareLicenseKeyEvaluationLimit'==_0x17ba27||'uploadcareLicenseKeyUsageLimit'==_0x17ba27){delete _0x443a52[_0xcc72a],_0x4ee67d=_0x17ba27,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x4ee67d&&_0x443a52['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x4ee67d&&_0x443a52['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x4ee67d&&_0x443a52['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x4ee67d&&_0x443a52['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x4ee67d&&_0x443a52['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x4ee67d&&_0x443a52['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x2864fa}=this,_0x1254d2=_0x2864fa['commands']['get']('uploadcare');if(!_0x1254d2)return;const _0x482f81=this['_normalizeConfigSourceList'](_0x2864fa['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0xddc172,_0x2bbf87)=>{const _0x36e8ef=this['_getIntegrationKey'](_0x2bbf87['type']);return _0xddc172[_0x36e8ef]||(_0xddc172[_0x36e8ef]=[]),_0xddc172[_0x36e8ef]['push'](_0x2bbf87),_0xddc172;},{});_0x2864fa['plugins']['has']('ImageInsertUI')&&_0x2864fa['commands']['get']('uploadcare')&&Object['entries'](_0x482f81)['forEach'](([_0x557e1d,_0x9398ef])=>{_0x2864fa['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x557e1d,'observable':()=>_0x1254d2,'buttonViewCreator':()=>this['_createToolbarButton'](_0x9398ef),'formViewCreator':()=>this['_createDropdownButtons'](_0x9398ef),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x9398ef),'override':'assetManager'!==_0x557e1d});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x36b91a){const {locale:_0x543507}=this['editor'];return _0x36b91a['map'](_0x4ac730=>{const _0x5dcc5c=_(_0x543507,_0x4ac730,'Insert');switch(_0x4ac730){case i['Local']:return{'icon':_0x177f65,'type':i['Local'],..._0x5dcc5c};case i['URL']:return{'icon':_0x40beb5,'type':i['URL'],..._0x5dcc5c};case i['Dropbox']:return{'icon':_0x12af59,'type':i['Dropbox'],..._0x5dcc5c};case i['Facebook']:return{'icon':_0x185d1f,'type':i['Facebook'],..._0x5dcc5c};case i['GDrive']:return{'icon':_0x139345,'type':i['GDrive'],..._0x5dcc5c};case i['GPhotos']:return{'icon':_0x716706,'type':i['GPhotos'],..._0x5dcc5c};case i['OneDrive']:return{'icon':_0x211c39,'type':i['OneDrive'],..._0x5dcc5c};}});}['_getIntegrationKey'](_0x25e7e5){switch(_0x25e7e5){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x2a28e3,_0x236e51){const _0x3064e2=this['editor'],_0x23f347=new _0x2a28e3(_0x3064e2['locale']),_0x572446=_0x3064e2['commands']['get']('uploadcare');return _0x23f347['bind']('isEnabled')['to'](_0x572446),_0x23f347['on']('execute',()=>{_0x572446['execute'](_0x236e51);}),_0x23f347;}['_createToolbarButton'](_0x1195c9){const {locale:_0x484761}=this['editor'],_0x55fb6d=this['editor']['plugins']['get']('ImageInsertUI'),_0x44eb7e=_0x1195c9[0x0],_0x2ce698=this['_createButton'](_0x4ec294,_0x44eb7e['type']);return _0x2ce698['icon']=_0x44eb7e['icon'],_0x2ce698['bind']('label')['to'](_0x55fb6d,'isImageSelected',_0x10cb55=>_(_0x484761,_0x44eb7e['type'],_0x10cb55?'Replace':'Insert')['text']),_0x2ce698['tooltip']=!0x0,_0x2ce698;}['_createDropdownButtons'](_0x1ca2eb){const {locale:_0x5164b6}=this['editor'],_0x5a01ff=this['editor']['plugins']['get']('ImageInsertUI');return _0x1ca2eb['map'](_0x14225e=>{const _0x2093cd=this['_createButton'](_0x4ec294,_0x14225e['type']);return _0x2093cd['withText']=!0x0,_0x2093cd['icon']=_0x14225e['icon'],_0x2093cd['bind']('label')['to'](_0x5a01ff,'isImageSelected',_0x5c89f7=>_(_0x5164b6,_0x14225e['type'],_0x5c89f7?'Replace':'Insert')['text']),_0x2093cd;});}['_createMenuBarButtons'](_0x555a46){return _0x555a46['map'](_0x8b375=>{const _0x378ca0=this['_createButton'](_0x492a86,_0x8b375['type']);return _0x378ca0['icon']=_0x8b375['icon'],_0x378ca0['label']=_0x8b375['shortText'],_0x378ca0;});}}class F extends _0x46cd47{['focusTracker'];['focusCycler'];constructor(_0x3de29d){super(_0x3de29d),this['focusTracker']=new _0x5daf83(),this['focusCycler']=new _0x367f0e({'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(_0x55bed2,_0x100947){super(_0x55bed2),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-'+_0x100947}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x2daf71,_0x3f0ccd){const _0x300081=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x874ef3=>_0x874ef3<=_0x3f0ccd)['map'](_0x11fa56=>_0x2daf71['replace'](/\/$/,'')+'/-/resize/'+_0x11fa56+'x/\x20'+_0x11fa56+'w');return{'imageFallbackUrl':_0x2daf71,'imageSources':[{'srcset':_0x300081['join'](',\x20'),'sizes':'(max-width:\x20'+_0x3f0ccd+'px)\x20100vw,\x20'+_0x3f0ccd+'px','type':'image/webp'}]};}function S(_0x27b151,_0x49b105,_0x173bf3){const _0x3e74a6=_0x27b151['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3e74a6?parseInt(_0x3e74a6[0x1],0xa):_0x49b105,'height':_0x3e74a6?parseInt(_0x3e74a6[0x2],0xa):_0x173bf3};}function p(_0x424c35,_0x4f17dc){const _0x3bbf3b=new(_0x50efa2())(),_0x289cea=_0x424c35['plugins']['get']('ImageUtils'),_0x55bc6f=_0x424c35['editing']['mapper']['toViewElement'](_0x4f17dc),_0x5a0896=_0x289cea['findViewImgElement'](_0x55bc6f),_0x25870b=_0x424c35['editing']['view']['domConverter']['viewToDom'](_0x5a0896),_0x1cb914=_0x4f17dc['getAttribute']('width'),_0xd53d85=_0x4f17dc['getAttribute']('height'),_0x462397='image-processing';_0x424c35['editing']['view']['change'](_0x45130a=>{_0x45130a['addClass'](_0x462397,_0x55bc6f),_0x45130a['setStyle']('aspect-ratio',_0x1cb914+'/'+_0xd53d85,_0x5a0896);}),_0x3bbf3b['listenTo'](_0x25870b,'load',()=>{_0x3bbf3b['stopListening'](_0x25870b,'load'),_0x424c35['editing']['view']['change'](_0x550b17=>{_0x550b17['removeClass'](_0x462397,_0x55bc6f),_0x550b17['removeStyle']('aspect-ratio',_0x5a0896);});});}function G(_0x39a82b){if(Array['isArray'](_0x39a82b)){const _0x3a7333=_0x39a82b['map'](G);return _0x52c2df=>_0x3a7333['some'](_0x229a59=>_0x229a59(_0x52c2df));}if('origin'==_0x39a82b){const _0x3cb600=_0x52a0bb['window']['location']['origin'];return _0x1a6e62=>new URL(_0x1a6e62,_0x52a0bb['document']['baseURI'])['origin']==_0x3cb600;}return'function'==typeof _0x39a82b?_0x39a82b:_0x39a82b instanceof RegExp?_0x27719d=>!(!_0x27719d['match'](_0x39a82b)&&!_0x27719d['replace'](/^https?:\/\//,'')['match'](_0x39a82b)):()=>!0x1;}function A(_0x115142,_0x42bb2a){return _0x70c6b8(_0x115142['target'])['includes'](_0x42bb2a);}class n extends/* #__PURE__ -- @preserve */
24
+ _0x577878(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x8561c2,_0x381c56,_0x18e603){super(),this['_editor']=_0x8561c2,this['_editing']=_0x381c56,this['_dialog']=_0x8561c2['plugins']['get'](_0x5a4cdb),this['_api']=_0x381c56['ctxElement']['getAPI'](),this['_type']=_0x18e603,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:_0x5d7713,model:_0x4b2b79}=this['_editor'],_0x2301d5=_0x4b2b79['document']['selection']['getSelectedElement'](),_0xfd6e32=_0x2301d5&&(_0x2301d5['is']('element','imageBlock')||_0x2301d5['is']('element','imageInline'));this['_formView']=new x(_0x5d7713,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x177f65,'title':_(_0x5d7713,this['_type'],_0xfd6e32?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x2e726e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x573e87=>!A(_0x573e87,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x47b32c}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x25ddaf=>{const _0x113bbf=_0x47b32c['length'];for(const _0x18adb6 of _0x47b32c){const _0x585c03=_0x18adb6===_0x47b32c[_0x113bbf-0x1],{cdnUrl:_0x5d15ac,fileInfo:_0x2fe714}=_0x18adb6;if(!_0x5d15ac||!_0x2fe714)continue;const {width:_0x2448a0,height:_0xbe3844}=_0x2fe714['imageInfo'],_0x221209=S(_0x5d15ac,_0x2448a0,_0xbe3844),_0x93ecec=C(_0x5d15ac,_0x221209['width']),_0x28e6f8={'id':_0x2fe714['uuid'],'type':'image','attributes':{'imageDimension':_0x221209,..._0x93ecec}};this['_insertAsset'](_0x28e6f8,_0x585c03,_0x25ddaf);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x37713c=>{'idle'===_0x37713c['detail']['status']&&!_0x37713c['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x30b032,_0x22c913,_0x5797af){const _0x40d0bb=this['_editor']['model']['document']['selection'],_0x20f866=_0x40d0bb['getSelectedElement'](),_0x5e7b04=!(!_0x20f866||!_0x20f866['is']('element','imageInline'));_0x5797af['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x30b032,_0x5e7b04),_0x22c913||_0x5797af['setSelection'](_0x40d0bb['getLastPosition']());}['_insertImage'](_0x4f6cb0,_0x8462b6){const _0x528596=this['_editor'],{imageDimension:_0x5b20a3,imageFallbackUrl:_0x18ac29,imageSources:_0x2e57ce}=_0x4f6cb0['attributes'];_0x528596['execute']('insertImage',{'imageType':_0x8462b6?'imageInline':null,'source':{'uploadcareImageId':_0x4f6cb0['id'],'src':_0x18ac29,'sources':_0x2e57ce,..._0x5b20a3}});}}class w extends _0x149129{['_editing'];['_controller']=null;static get['requires'](){return[_0x5a4cdb,o];}constructor(_0x232311){super(_0x232311),this['_editing']=_0x232311['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x154fa0){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x154fa0);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x3a0f15,..._0x1010e7}){return _0x586f2e(_0x3a0f15,_0x1010e7);}static['getInfo'](_0x31b592,_0x4d3186){return _0x594be7(_0x31b592,_0x4d3186);}}class f extends _0x564f3e{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x8c8020,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x51dbaa=this['editor'];if(!!!_0x51dbaa['config']['get']('uploadcare'))return;_0x51dbaa['plugins']['get'](_0x8c8020)['createUploadAdapter']=_0x93e2af=>new k(_0x93e2af,_0x51dbaa),_0x51dbaa['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x382357,{imageElement:_0x33ddf8,data:_0x3d69ef})=>{_0x51dbaa['model']['change'](_0x356316=>{_0x356316['setAttribute']('uploadcareImageId',_0x3d69ef['uploadcareImageId'],_0x33ddf8);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x1eb1b2,_0x5e3627){this['loader']=_0x1eb1b2,this['editor']=_0x5e3627,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4f9f7e=await this['loader']['file'];return j['upload']({'file':_0x4f9f7e,'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':_0x153b28=>{_0x153b28&&_0x153b28['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x153b28['value']);}})['then'](async _0x648cc9=>{const {imageFallbackUrl:_0x2140a2,imageSources:_0x2a45fc}=C(_0x648cc9['cdnUrl'],_0x648cc9['imageInfo']['width']);return{'uploadcareImageId':_0x648cc9['uuid'],'default':_0x2140a2,'sources':_0x2a45fc};})['catch'](()=>{const _0x2ff3cc=t('Cannot\x20upload\x20file:')+('\x20'+_0x4f9f7e['name']+'.');return Promise['reject'](_0x2ff3cc);});}['abort'](){this['controller']['abort']();}}class o extends _0x564f3e{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x5a4cdb];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x515461){super(_0x515461),this['ucContextId']=_0x540acc();}['init'](){const _0x3944ef=this['editor'];_0x3944ef['commands']['add']('uploadcare',new w(_0x3944ef));}['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 _0x56335e=_0x52a0bb['document']['querySelector']('input[uploadcare-file-input]');_0x56335e&&_0x56335e['remove']();}),async function(_0x9dd1ff){const _0x141112=_0x329ec5([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0xd3ba78=0x535f8c3a,_0x4007b3=0x53580b52^_0xd3ba78,_0x1bf473=window[_0x329ec5([0x44,0x61,0x74,0x65])][_0x329ec5([0x6e,0x6f,0x77])](),_0x1a4449=_0x9dd1ff[_0x329ec5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3b82a1=new window[(_0x329ec5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d466a=>{_0x1a4449[_0x329ec5([0x6f,0x6e,0x63,0x65])](_0x329ec5([0x72,0x65,0x61,0x64,0x79]),_0x5d466a);}),_0x58a86b={[_0x329ec5([0x6b,0x74,0x79])]:_0x329ec5([0x45,0x43]),[_0x329ec5([0x75,0x73,0x65])]:_0x329ec5([0x73,0x69,0x67]),[_0x329ec5([0x63,0x72,0x76])]:_0x329ec5([0x50,0x2d,0x32,0x35,0x36]),[_0x329ec5([0x78])]:_0x329ec5([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]),[_0x329ec5([0x79])]:_0x329ec5([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]),[_0x329ec5([0x61,0x6c,0x67])]:_0x329ec5([0x45,0x53,0x32,0x35,0x36])},_0x2f6275=_0x1a4449[_0x329ec5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x329ec5([0x67,0x65,0x74])](_0x329ec5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x387df8(){let _0x52e5fc,_0x27e4e9=null,_0x561e07=null;try{if(_0x2f6275==_0x329ec5([0x47,0x50,0x4c]))return _0x329ec5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x52e5fc=_0x351744(),!_0x52e5fc)return _0x329ec5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x52e5fc[_0x329ec5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x561e07=_0x1140e4(_0x52e5fc[_0x329ec5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x52e5fc[_0x329ec5([0x6a,0x74,0x69])])),await _0x3afbf7()?_0x57d884()?_0x2f574e()?_0x329ec5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x57bcb9()?(_0x52e5fc[_0x329ec5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x329ec5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x27e4e9=_0x1e02f2(_0x329ec5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x50b9cc()):_0x329ec5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x329ec5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x329ec5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x329ec5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2f574e(){const _0x2ca0ab=[_0x329ec5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x329ec5([0x74,0x72,0x69,0x61,0x6c])][_0x329ec5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52e5fc[_0x329ec5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1bf473/0x3e8:0xe10*_0x4007b3;return _0x52e5fc[_0x329ec5([0x65,0x78,0x70])]<_0x2ca0ab;}function _0x57d884(){const _0x512c9a=_0x52e5fc[_0x329ec5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x512c9a&&(!!_0x512c9a[_0x329ec5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329ec5([0x2a]))||!!_0x512c9a[_0x329ec5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329ec5([0x55,0x50,0x4c,0x43])));}function _0x57bcb9(){const _0x34195d=_0x52e5fc[_0x329ec5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x34195d||0x0==_0x34195d[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x7f0a57}=new URL(window[_0x329ec5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x34195d[_0x329ec5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7f0a57))return!0x0;const _0x1aa7ea=_0x7f0a57[_0x329ec5([0x73,0x70,0x6c,0x69,0x74])](_0x329ec5([0x2e]));return _0x34195d[_0x329ec5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x364dd6=>_0x364dd6[_0x329ec5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x329ec5([0x2a])))[_0x329ec5([0x6d,0x61,0x70])](_0x4dd487=>_0x4dd487[_0x329ec5([0x73,0x70,0x6c,0x69,0x74])](_0x329ec5([0x2e])))[_0x329ec5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3027cf=>_0x3027cf[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1aa7ea[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x329ec5([0x6d,0x61,0x70])](_0x1e97d5=>Array(_0x1aa7ea[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1e97d5[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x329ec5([0x66,0x69,0x6c,0x6c])](_0x1e97d5[0x0]===_0x329ec5([0x2a])?_0x329ec5([0x2a]):'')[_0x329ec5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1e97d5))[_0x329ec5([0x73,0x6f,0x6d,0x65])](_0x491d24=>_0x1aa7ea[_0x329ec5([0x65,0x76,0x65,0x72,0x79])]((_0x59f853,_0x59c381)=>_0x491d24[_0x59c381]===_0x59f853||_0x491d24[_0x59c381]===_0x329ec5([0x2a])));}function _0x50b9cc(){return _0x27e4e9&&_0x561e07?new window[(_0x329ec5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4e3572,_0x4e330f)=>{_0x27e4e9[_0x329ec5([0x74,0x68,0x65,0x6e])](_0x4e3572,_0x4e330f),_0x561e07[_0x329ec5([0x74,0x68,0x65,0x6e])](_0x58223b=>{_0x58223b!=_0x329ec5([0x56,0x61,0x6c,0x69,0x64])&&_0x4e3572(_0x58223b);},_0x4e330f);}):_0x27e4e9||_0x561e07||_0x329ec5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1140e4(_0x4a5e56,_0x443c84){return new window[(_0x329ec5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25bad7=>{if(_0x13b042())return _0x25bad7(_0x329ec5([0x56,0x61,0x6c,0x69,0x64]));_0x2cebd5(),_0x1a4449[_0x329ec5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x329ec5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x20db2a=!0x1;const _0xb4ec6b=_0x540acc();function _0x26f707(_0x376a48){return!!_0x376a48&&(typeof _0x376a48===_0x329ec5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x376a48===_0x329ec5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x376a48[_0x329ec5([0x74,0x68,0x65,0x6e])]===_0x329ec5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x376a48[_0x329ec5([0x63,0x61,0x74,0x63,0x68])]===_0x329ec5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xbc7515(_0x2881f8){_0x366763(_0x2881f8)[_0x329ec5([0x74,0x68,0x65,0x6e])](_0x15aef7=>{if(!_0x15aef7||_0x15aef7[_0x329ec5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x329ec5([0x6f,0x6b]))return _0x329ec5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5cb386(_0x193574(_0xb4ec6b+_0x443c84))!=_0x15aef7[_0x329ec5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x329ec5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x329ec5([0x56,0x61,0x6c,0x69,0x64]);})[_0x329ec5([0x74,0x68,0x65,0x6e])](_0x5575c0=>(_0x240270(),_0x5575c0),()=>{const _0x40d118=_0x5bb8db();return null==_0x40d118?(_0x240270(),_0x329ec5([0x56,0x61,0x6c,0x69,0x64])):_0x329ec5(_0x1bf473-_0x40d118>(0x7753083a^_0xd3ba78)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x329ec5([0x74,0x68,0x65,0x6e])](_0x25bad7)[_0x329ec5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x25bad7(_0x329ec5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x30b473=0x536962ba^_0xd3ba78;function _0x240270(){const _0x390643=_0x329ec5([0x6c,0x6c,0x63,0x74,0x2d])+_0x5cb386(_0x193574(_0x4a5e56)),_0x46645f=_0x1a9132(_0x5cb386(window[_0x329ec5([0x4d,0x61,0x74,0x68])][_0x329ec5([0x63,0x65,0x69,0x6c])](_0x1bf473/_0x30b473)));window[_0x329ec5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x329ec5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x390643,_0x46645f);}function _0x5bb8db(){const _0x480a65=_0x329ec5([0x6c,0x6c,0x63,0x74,0x2d])+_0x5cb386(_0x193574(_0x4a5e56)),_0x2a8a39=window[_0x329ec5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x329ec5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x480a65);return _0x2a8a39?window[_0x329ec5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1a9132(_0x2a8a39),0x10)*_0x30b473:null;}function _0x366763(_0x160e1d){return new window[(_0x329ec5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x403fb0,_0x1743df)=>{_0x160e1d[_0x329ec5([0x74,0x68,0x65,0x6e])](_0x403fb0,_0x1743df),window[_0x329ec5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1743df,0x535e58fa^_0xd3ba78);});}}_0x1a4449[_0x329ec5([0x6f,0x6e])](_0x329ec5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xd79d52,_0x15b5de)=>{if(_0x15b5de[0x0]!=_0x4a5e56)return _0x25bad7(_0x329ec5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x15b5de[0x1]={..._0x15b5de[0x1],[_0x329ec5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xb4ec6b};},{[_0x329ec5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x329ec5([0x68,0x69,0x67,0x68])}),_0x1a4449[_0x329ec5([0x6f,0x6e])](_0x329ec5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4554b6=>{_0x26f707(_0x4554b6[_0x329ec5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x20db2a=!0x0,_0xbc7515(_0x4554b6[_0x329ec5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x329ec5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x329ec5([0x6c,0x6f,0x77])}),_0x3b82a1[_0x329ec5([0x74,0x68,0x65,0x6e])](()=>{_0x20db2a||_0x25bad7(_0x329ec5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x13b042(){return _0x1a4449[_0x329ec5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x329ec5([0x76,0x69,0x65,0x77])][_0x329ec5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x329ec5([0x61,0x75,0x74,0x6f]);}function _0x2cebd5(){_0x1a4449[_0x329ec5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x329ec5([0x76,0x69,0x65,0x77])][_0x329ec5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x329ec5([0x61,0x75,0x74,0x6f]);}}function _0x1e02f2(_0x19e853){const _0x1a5ab9=[new window[(_0x329ec5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c628b=>setTimeout(_0x2c628b,0x5356b2f6^_0xd3ba78)),_0x3b82a1[_0x329ec5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x329ec5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x483516=>{let _0x42b508=0x0;_0x1a4449[_0x329ec5([0x6d,0x6f,0x64,0x65,0x6c])][_0x329ec5([0x6f,0x6e])](_0x329ec5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x45f5aa,_0x74311f)=>{_0x74311f[0x0][_0x329ec5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x42b508++,_0x42b508==(0x535f89d2^_0xd3ba78)&&(_0x483516(),_0x45f5aa[_0x329ec5([0x6f,0x66,0x66])]());});}))];return window[_0x329ec5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x329ec5([0x72,0x61,0x63,0x65])](_0x1a5ab9)[_0x329ec5([0x74,0x68,0x65,0x6e])](()=>_0x19e853);}async function _0x8b2413(){await _0x3b82a1,_0x1a4449[_0x329ec5([0x6d,0x6f,0x64,0x65,0x6c])][_0x329ec5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1dd8d5,_0x1a4449[_0x329ec5([0x6d,0x6f,0x64,0x65,0x6c])][_0x329ec5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1dd8d5,_0x1a4449[_0x329ec5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x329ec5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x55c3bf(_0x42e8f3){const _0x39cefc=_0x59b7fc();_0x1a4449[_0x39cefc]=_0x329ec5([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x42e8f3,_0x42e8f3!=_0x329ec5([0x56,0x61,0x6c,0x69,0x64])&&_0x8b2413();}function _0x59b7fc(){const _0x3b9e67=window[_0x329ec5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x329ec5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x329ec5([0x6e,0x6f,0x77])]())[_0x329ec5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x329ec5([0x2e]),'');let _0x576437=_0x329ec5([0x68]);for(let _0x589459=0x0;_0x589459<_0x3b9e67[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x589459+=0x2){let _0x14856c=window[_0x329ec5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b9e67[_0x329ec5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x589459,_0x589459+0x2));_0x14856c>=_0x141112[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x14856c-=_0x141112[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x576437+=_0x141112[_0x14856c];}return _0x576437;}function _0x351744(){const _0x172919=_0x2f6275[_0x329ec5([0x73,0x70,0x6c,0x69,0x74])](_0x329ec5([0x2e]));if(0x3!=_0x172919[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x57ebab(_0x172919[0x1]);function _0x57ebab(_0x1dbe28){const _0x31c905=_0x3f0591(_0x1dbe28);return _0x31c905&&_0x305232()?_0x31c905:null;function _0x305232(){const _0x2263ce=_0x31c905[_0x329ec5([0x6a,0x74,0x69])],_0x3d552d=window[_0x329ec5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2263ce[_0x329ec5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2263ce[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x174580={..._0x31c905,[_0x329ec5([0x6a,0x74,0x69])]:_0x2263ce[_0x329ec5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2263ce[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x174580[_0x329ec5([0x76,0x63])],_0x193574(_0x174580)==_0x3d552d;}}}async function _0x3afbf7(){let _0x1597cc=!0x0;try{const _0x4a0610=_0x2f6275[_0x329ec5([0x73,0x70,0x6c,0x69,0x74])](_0x329ec5([0x2e])),[_0x50bfc9,_0x1c42a5,_0x1c74ba]=_0x4a0610;return _0x4c77b7(_0x50bfc9),await _0x59bec8(_0x50bfc9,_0x1c42a5,_0x1c74ba),_0x1597cc;}catch{return!0x1;}function _0x4c77b7(_0xdfccaf){const _0x2d79b4=_0x3f0591(_0xdfccaf);_0x2d79b4&&_0x2d79b4[_0x329ec5([0x61,0x6c,0x67])]==_0x329ec5([0x45,0x53,0x32,0x35,0x36])||(_0x1597cc=!0x1);}async function _0x59bec8(_0x2ad750,_0x27b2a6,_0x621371){const _0x1d005d=window[_0x329ec5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x329ec5([0x66,0x72,0x6f,0x6d])](_0x4a3144(_0x621371),_0x580a03=>_0x580a03[_0x329ec5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1849ef=new window[(_0x329ec5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x329ec5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2ad750+_0x329ec5([0x2e])+_0x27b2a6),_0x5050f9=window[_0x329ec5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x329ec5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5050f9)return;const _0x44b26f=await _0x5050f9[_0x329ec5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x329ec5([0x6a,0x77,0x6b]),_0x58a86b,{[_0x329ec5([0x6e,0x61,0x6d,0x65])]:_0x329ec5([0x45,0x43,0x44,0x53,0x41]),[_0x329ec5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x329ec5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x329ec5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5050f9[_0x329ec5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x329ec5([0x6e,0x61,0x6d,0x65])]:_0x329ec5([0x45,0x43,0x44,0x53,0x41]),[_0x329ec5([0x68,0x61,0x73,0x68])]:{[_0x329ec5([0x6e,0x61,0x6d,0x65])]:_0x329ec5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x44b26f,_0x1d005d,_0x1849ef)||(_0x1597cc=!0x1);}}function _0x3f0591(_0x19b852){return _0x19b852[_0x329ec5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x329ec5([0x65,0x79]))?JSON[_0x329ec5([0x70,0x61,0x72,0x73,0x65])](_0x4a3144(_0x19b852)):null;}function _0x4a3144(_0x5e9ee5){return window[_0x329ec5([0x61,0x74,0x6f,0x62])](_0x5e9ee5[_0x329ec5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x329ec5([0x2b]))[_0x329ec5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x329ec5([0x2f])));}function _0x193574(_0x20c13b){let _0x5d006d=0x1505;function _0x581bf9(_0x1c25fb){for(let _0x3e4344=0x0;_0x3e4344<_0x1c25fb[_0x329ec5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3e4344++){const _0x5484c5=_0x1c25fb[_0x329ec5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3e4344);_0x5d006d=(_0x5d006d<<0x5)+_0x5d006d+_0x5484c5,_0x5d006d&=_0x5d006d;}}function _0x2184e7(_0x1fc4e6){Array[_0x329ec5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1fc4e6)?_0x1fc4e6[_0x329ec5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2184e7):_0x1fc4e6&&typeof _0x1fc4e6==_0x329ec5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x329ec5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1fc4e6)[_0x329ec5([0x73,0x6f,0x72,0x74])]()[_0x329ec5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x755765,_0x3d18bb])=>{_0x581bf9(_0x755765),_0x2184e7(_0x3d18bb);}):_0x581bf9(window[_0x329ec5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1fc4e6));}return _0x2184e7(_0x20c13b),_0x5d006d>>>0x0;}function _0x5cb386(_0x48fc82){return _0x48fc82[_0x329ec5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x329ec5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x329ec5([0x30]));}function _0x1a9132(_0x579b3e){return _0x579b3e[_0x329ec5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x329ec5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x329ec5([0x6a,0x6f,0x69,0x6e])]('');}function _0x1dd8d5(){}function _0x329ec5(_0x1c8cff){return _0x1c8cff['map'](_0x7f16e8=>String['fromCharCode'](_0x7f16e8))['join']('');}_0x55c3bf(await _0x387df8());}(this);}['_initSchema'](){const _0x5277c2=this['editor']['model']['schema'];_0x5277c2['isRegistered']('imageBlock')&&_0x5277c2['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x5277c2['isRegistered']('imageInline')&&_0x5277c2['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x439da7=this['editor'];_0x439da7['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x439da7['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x5b460d=>_0x5b460d['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5d8b56=_0x439da7['commands']['get']('replaceImageSource');_0x5d8b56&&this['listenTo'](_0x5d8b56,'cleanupImage',(_0x533372,[_0x9764de,_0x5ea645])=>{_0x9764de['removeAttribute']('uploadcareImageId',_0x5ea645);});}['_initConfig'](){const _0x231178=this['editor']['config']['get']('uploadcare.uploader')||{},_0xecfaa6=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4d5915(_0x52a0bb['document'],'uc-config',{..._0x231178,'pubkey':_0xecfaa6,'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']=_0x12e774=>{if('closeMax'==_0x12e774)return'#uc-icon-arrow-down';},_0x52a0bb['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4d5915(_0x52a0bb['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x52a0bb['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x22d278=this['editor']['commands']['get']('insertImage');_0x22d278&&this['listenTo'](_0x22d278,'execute',()=>{const _0x39a8c1=this['editor']['model']['document']['selection']['getSelectedElement']();_0x39a8c1&&_0x39a8c1['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x39a8c1);});});const _0x113c5c=this['editor']['commands']['get']('uploadcareImageReplace');_0x113c5c&&this['listenTo'](_0x113c5c,'execute',()=>{const _0x503861=this['editor']['model']['document']['selection']['getSelectedElement']();_0x503861&&_0x503861['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x503861);});});}}class tt extends _0x564f3e{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x33ccf6){super(_0x33ccf6),_0x33ccf6['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x408393['defineComponents'](_0x408393),this['_defineLocale']();}['_defineLocale'](){const _0x560889=this['editor']['config']['get']('uploadcare.locale'),_0x1c90c9=this['editor']['locale']['contentLanguage'];_0x560889&&_0x408393['defineLocale'](_0x1c90c9,_0x560889);}}class ii extends _0x46cd47{constructor(_0x22a0d9){super(_0x22a0d9);const t=_0x22a0d9['t'],_0x455d88=this['bindTemplate'],_0x384d49=new _0x26a512();_0x384d49['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':[_0x384d49,{'text':_0x455d88['to']('imageUploadProgress',_0x1b927e=>t('Loading\x20image...')+'\x20('+(_0x1b927e||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 _0x46cd47{constructor(_0x1c824e){super(_0x1c824e);const t=_0x1c824e['t'];this['set']('errorType',null);const _0x79b5e1=new _0x4ec294(_0x1c824e);_0x79b5e1['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x79b5e1['withText']=!0x0,_0x79b5e1['class']='ck-button-action',_0x79b5e1['on']('execute',()=>{this['fire']('retry');}),_0x79b5e1['bind']('isVisible')['to'](this,'errorType',_0x35808d=>'NotFound'!==_0x35808d);const _0x5311fe=new _0x4fa485();_0x5311fe['content']=_0x24c7c4,_0x5311fe['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5e80f8=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':[_0x5311fe,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5e80f8['to']('errorType',_0x285b0a=>t('NotFound'!==_0x285b0a?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x79b5e1]},{'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 _0x46cd47{constructor(_0x590da7,_0x1e4534){super(_0x590da7);const _0x3c388c=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1e4534,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3c388c['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x413fa0,_0x1196a7,_0x46edfb){super(_0x413fa0),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x413fa0),this['_errorView']=new ti(_0x413fa0),this['_editingView']=new ei(_0x413fa0,_0x46edfb),this['_focusableView']=new _0x46cd47(_0x413fa0),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x1196a7),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'],_0x55169f=>{this['_addUploadcareImageEditorListeners'](_0x55169f);});}),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'](_0x2c174d,_0x3a9464){const _0x5dbe9c='uc-cloud-image-editor',_0x5a888e=_0x2c174d['querySelector'](_0x5dbe9c);if(_0x5a888e)return _0x3a9464(_0x5a888e);const _0x439e14=new MutationObserver(_0x386670=>{const _0x13a295=_0x386670['filter'](_0xac8a34=>_0xac8a34['target']===_0x2c174d&&_0xac8a34['addedNodes']['length']>0x0&&_0xac8a34['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5dbe9c);_0x13a295['length']&&(_0x439e14['disconnect'](),_0x3a9464(_0x13a295[0x0]['addedNodes'][0x0]));});_0x439e14['observe'](_0x2c174d,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0xd6ff40){_0xd6ff40['addEventListener']('apply',_0x371552=>{this['fire']('apply',{'imageSrc':_0x371552['detail']['cdnUrl']});}),_0xd6ff40['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
+ _0x577878(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5f4590,_0x58a486,_0x206c3a){super(),this['_editor']=_0x5f4590,this['_dialog']=_0x58a486,this['_imageElement']=_0x206c3a,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 _0x889264=this['_imageElement'],_0x172c77=_0x889264['getAttribute']('uploadcareImageId'),_0x112777=_0x889264['getAttribute']('src');if(_0x172c77)await this['_loadImageInfo'](_0x172c77,_0x112777);else{if(this['_imageCache']['has'](_0x112777)){const _0x204a56=this['_imageCache']['get'](_0x112777);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x204a56['url'],this['imageDimension']=_0x204a56['dimension'],this['imageId']=_0x204a56['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4e258f}=this['_editor'],t=_0x4e258f['t'],_0x354750=new X(_0x4e258f,this['imageStatus'],this['_attributes']);_0x354750['bind']('status')['to'](this,'imageStatus'),_0x354750['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x354750['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x354750['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x354750,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x220a10,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x354750,'position':_0x2e726e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x354750['focus']();},'onHide':()=>{_0x354750['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x138d35=>!A(_0x138d35,_0x354750['element'])}});}['_loadImageInfo'](_0x1a8763,_0x128020){return j['getInfo'](_0x1a8763,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x51d6fc=>{const {width:_0x35b54f,height:_0x5159d3}=_0x51d6fc['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x128020,this['imageDimension']={'width':_0x35b54f,'height':_0x5159d3},this['imageId']=_0x1a8763;})['catch'](_0x101ba7=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x101ba7['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x5207bf,_0x2a6bd6){return this['_getImageAsFile'](_0x5207bf)['then'](_0x5111de=>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':_0x2a6bd6['signal'],'file':_0x5111de,'onProgress':_0x572391=>{_0x572391&&_0x572391['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x572391['value']));}}))['then'](_0x5ad943=>{const {width:_0x264e18,height:_0x4dde74}=_0x5ad943['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5ad943['cdnUrl'],this['imageDimension']={'width':_0x264e18,'height':_0x4dde74},this['imageId']=_0x5ad943['uuid'],this['imageUploadProgress']=null;const _0x297813=_0x5207bf['getAttribute']('src');this['_imageCache']['set'](_0x297813,{'id':_0x5ad943['uuid'],'url':_0x5ad943['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x105834=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x105834['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x78455e,_0x50408b){_0x78455e['on']('apply',(_0x4ff454,_0x3b4871)=>{this['_replaceImage'](_0x50408b,_0x3b4871['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x78455e['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x78455e['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x3ebdbc,_0x53e903,_0x376810){const _0x5990ae=this['_editor'],{width:_0x15fa67,height:_0x37b400}=S(_0x53e903,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0xf9bcaf,imageSources:_0x25060b}=C(_0x53e903,_0x15fa67);_0x5990ae['model']['change'](_0x38847b=>{if('$graveyard'===_0x3ebdbc['root']['rootName']){_0x5990ae['execute']('insertImage',{'imageType':_0x3ebdbc['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x3ebdbc['getAttributes']()),'uploadcareImageId':_0x376810,'src':_0xf9bcaf,'sources':_0x25060b,'width':_0x15fa67,'height':_0x37b400}});const _0x491877=_0x3ebdbc['getChildren']();_0x3ebdbc=_0x5990ae['model']['document']['selection']['getSelectedElement']();for(const _0x53da3c of _0x491877)_0x38847b['append'](_0x38847b['cloneElement'](_0x53da3c),_0x3ebdbc);}else _0x38847b['setSelection'](_0x3ebdbc,'on'),_0x5990ae['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x3ebdbc['getAttributes']()),'uploadcareImageId':_0x376810,'src':_0xf9bcaf,'sources':_0x25060b,'width':_0x15fa67,'height':_0x37b400},_0x3ebdbc);_0x38847b['setSelection'](_0x3ebdbc,'on');});}async['_getImageAsFile'](_0x1e203f){const _0xf571e8=_0x52a0bb['window'],_0x5c8c36=_0x52a0bb['document']['location']['href'],_0x7da007=new _0xf571e8['URL'](_0x1e203f['getAttribute']('src'),_0x5c8c36);if('data:'===_0x7da007['protocol']){const _0x5da7f5=_0x7da007['href']['split'](','),_0x3ea4a2=_0x5da7f5[0x0]['match'](/:(.*?);/)[0x1],_0x6d98f0=_0x3ea4a2['split']('/')[0x1],_0xae193=_0xf571e8['atob'](_0x5da7f5[_0x5da7f5['length']-0x1]);let _0x5eb607=_0xae193['length'];const _0x18c7c5=new _0xf571e8['Uint8Array'](_0x5eb607);for(;_0x5eb607--;)_0x18c7c5[_0x5eb607]=_0xae193['charCodeAt'](_0x5eb607);return new _0xf571e8['File']([_0x18c7c5],'image.'+_0x6d98f0,{'type':_0x3ea4a2});}const _0x36f993=_0x7da007['href']['split']('/'),_0x513030=_0x36f993[_0x36f993['length']-0x1],_0x2cf27f=_0x513030['split']('.')[0x1];return _0xf571e8['fetch'](_0x7da007['href'])['then'](_0x57c7e0=>_0x57c7e0['clone']()['blob']())['then'](_0x30c793=>new _0xf571e8['File']([_0x30c793],_0x513030,{'type':'image/'+_0x2cf27f}));}}class O extends _0x149129{['imageEditController'];static get['requires'](){return[_0x5a4cdb];}['_isEditable'];constructor(_0x4e5760){super(_0x4e5760),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x54f826){const _0x2ac3f2=G(_0x54f826);return _0x32d534=>!(!_0x32d534||!_0x32d534['is']('element','imageBlock')&&!_0x32d534['is']('element','imageInline'))&&(!!_0x32d534['hasAttribute']('uploadcareImageId')||!!_0x32d534['hasAttribute']('src')&&_0x2ac3f2(_0x32d534['getAttribute']('src')));}(_0x4e5760['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x583e6e=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x583e6e);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x35da07=this['editor']['model']['document']['selection']['getSelectedElement']();_0x35da07&&(_0x35da07['is']('element','imageBlock')||_0x35da07['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x5a4cdb),_0x35da07),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x149129{['refresh'](){const _0x13b2c4=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x13b2c4&&(_0x13b2c4['is']('element','imageBlock')||_0x13b2c4['is']('element','imageInline')));}['execute'](_0x37ee1c){const _0x82d4ea=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x13c5cf=>{_0x13c5cf['setAttributes'](_0x37ee1c,_0x82d4ea),_0x13c5cf['removeAttribute']('srcset',_0x82d4ea),_0x13c5cf['removeAttribute']('sizes',_0x82d4ea);});}}class m extends _0x564f3e{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2df98d,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x10d4ea}=this;_0x10d4ea['commands']['add']('uploadcareImageEdit',new O(_0x10d4ea)),_0x10d4ea['commands']['add']('uploadcareImageReplace',new R(_0x10d4ea));}}class g extends _0x564f3e{['_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 _0x327eb5=this['editor'];_0x327eb5['ui']['componentFactory']['add']('uploadcareImageEdit',_0x277d3d=>{const _0x34308e=_0x327eb5['commands']['get']('uploadcareImageEdit'),_0x82041=new _0x4ec294(_0x277d3d),t=_0x277d3d['t'];return _0x82041['set']({'icon':_0x220a10,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x82041['bind']('isEnabled')['to'](_0x34308e),_0x82041['bind']('isOn')['to'](_0x34308e,'isActive'),this['listenTo'](_0x82041,'execute',()=>{_0x327eb5['execute']('uploadcareImageEdit'),_0x327eb5['editing']['view']['focus']();}),_0x82041;}),this['_initConfig']();}['_initConfig'](){const _0x57ac89=_0x4d5915(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x57ac89),this['listenTo'](this['editor'],'destroy',()=>{_0x57ac89['remove']();});}}class et extends _0x564f3e{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": "47.7.0-alpha.4",
3
+ "version": "47.7.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": "47.7.0-alpha.4",
27
- "@ckeditor/ckeditor5-icons": "47.7.0-alpha.4",
28
- "@ckeditor/ckeditor5-image": "47.7.0-alpha.4",
29
- "@ckeditor/ckeditor5-theme-lark": "47.7.0-alpha.4",
30
- "@ckeditor/ckeditor5-ui": "47.7.0-alpha.4",
31
- "@ckeditor/ckeditor5-upload": "47.7.0-alpha.4",
32
- "@ckeditor/ckeditor5-utils": "47.7.0-alpha.4",
33
- "ckeditor5": "47.7.0-alpha.4",
26
+ "@ckeditor/ckeditor5-core": "47.7.0",
27
+ "@ckeditor/ckeditor5-icons": "47.7.0",
28
+ "@ckeditor/ckeditor5-image": "47.7.0",
29
+ "@ckeditor/ckeditor5-theme-lark": "47.7.0",
30
+ "@ckeditor/ckeditor5-ui": "47.7.0",
31
+ "@ckeditor/ckeditor5-upload": "47.7.0",
32
+ "@ckeditor/ckeditor5-utils": "47.7.0",
33
+ "ckeditor5": "47.7.0",
34
34
  "@uploadcare/file-uploader": "1.24.5",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x139a22=_0x58fd;(function(_0xc79359,_0x133702){const _0x28f1f1=_0x58fd,_0x2d7405=_0xc79359();while(!![]){try{const _0x501bc2=parseInt(_0x28f1f1(0xf4))/0x1+parseInt(_0x28f1f1(0xf2))/0x2*(-parseInt(_0x28f1f1(0xdb))/0x3)+-parseInt(_0x28f1f1(0x108))/0x4*(-parseInt(_0x28f1f1(0x103))/0x5)+parseInt(_0x28f1f1(0xda))/0x6+parseInt(_0x28f1f1(0x123))/0x7+-parseInt(_0x28f1f1(0xdd))/0x8+parseInt(_0x28f1f1(0x129))/0x9*(-parseInt(_0x28f1f1(0x120))/0xa);if(_0x501bc2===_0x133702)break;else _0x2d7405['push'](_0x2d7405['shift']());}catch(_0x115ecc){_0x2d7405['push'](_0x2d7405['shift']());}}}(_0x39c9,0xe2bdc));import{Plugin as _0x3f1d30}from'ckeditor5/src/core.js';import{Dialog as _0x8f9d93}from'ckeditor5/src/ui.js';import{createElement as _0x1fe38e,global as _0x2810fe,uid as _0x59bb61}from'ckeditor5/src/utils.js';function _0x58fd(_0x220410,_0x54e026){const _0x39c956=_0x39c9();return _0x58fd=function(_0x58fd12,_0xbaa7c7){_0x58fd12=_0x58fd12-0xd5;let _0xcb9e9e=_0x39c956[_0x58fd12];return _0xcb9e9e;},_0x58fd(_0x220410,_0x54e026);}import{UploadcareCommand as _0x20be4d}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x362b5b}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x5d2e95}from'./utils/editingutils.js';function _0x39c9(){const _0x241b7a=['appendChild','add','imageBlock','locale','_ctxElement','body','getSelectedElement','uploadcare.uploader','once','elementToAttribute','attributeToAttribute','render','_configElement','configElement','isRegistered','editor','contentLanguage','807770nyGsRY','true','join','12267115scgouC','replaceImageSource','#uc-icon-arrow-down','imageInline','cleanupImage','getAttribute','207BMPESA','_initConfig','uc-upload-ctx-provider','get','data-uc-image-id','pluginName','1548480jtyhfr','380634ZMNjeK','_initImageProcessingIndicator','13836504ibtEfo','ctxElement','ucContextId','href','map','uploader-','uploadcareImageId','remove','\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09','upcast','removeAttribute','isOfficialPlugin','execute','destroy','fromCharCode','uploadcare','_initConversion','init','_initSchema','uploadcareImageReplace','schema','10glBjxH','closeMax','1471736QFkKPM','selection','document','model','input[uploadcare-file-input]','for','PictureEditing','isPremiumPlugin','querySelector','listenTo','requires','config','insertImage','iconHrefResolver','uploadcare.pubkey','475KsYEEM','downcast','afterInit','view','commands','70244UAvCUZ','UploadcareEditing','editing','extend','conversion','_initCtx','uc-config'];_0x39c9=function(){return _0x241b7a;};return _0x39c9();}export class UploadcareEditing extends _0x3f1d30{[_0x139a22(0x11b)]=null;[_0x139a22(0x113)]=null;static get[_0x139a22(0xd9)](){const _0x5d3c9a=_0x139a22;return _0x5d3c9a(0x109);}static get[_0x139a22(0xfe)](){const _0x451ae1=_0x139a22;return[_0x451ae1(0xfa),_0x362b5b,_0x8f9d93];}static get[_0x139a22(0xe8)](){return!0x0;}static get[_0x139a22(0xfb)](){return!0x0;}[_0x139a22(0xdf)];get[_0x139a22(0x11c)](){const _0x302254=_0x139a22;return this[_0x302254(0x11b)];}get[_0x139a22(0xde)](){const _0x2c24eb=_0x139a22;return this[_0x2c24eb(0x113)];}constructor(_0x7bfa3f){const _0x4c5bda=_0x139a22;super(_0x7bfa3f),this[_0x4c5bda(0xdf)]=_0x59bb61();}[_0x139a22(0xee)](){const _0x3c6402=_0x139a22,_0x3502f8=this[_0x3c6402(0x11e)];_0x3502f8[_0x3c6402(0x107)][_0x3c6402(0x110)](_0x3c6402(0xec),new _0x20be4d(_0x3502f8));}[_0x139a22(0x105)](){const _0x317bdf=_0x139a22;this[_0x317bdf(0xef)](),this[_0x317bdf(0xed)](),this[_0x317bdf(0xd5)](),this[_0x317bdf(0x10d)](),this[_0x317bdf(0xdc)](),this[_0x317bdf(0xfd)](this[_0x317bdf(0x11e)],_0x317bdf(0xea),()=>{const _0x1262a7=_0x317bdf;this[_0x1262a7(0x11b)]&&(this[_0x1262a7(0x11b)][_0x1262a7(0xe4)](),this[_0x1262a7(0x11b)]=null),this[_0x1262a7(0x113)]&&(this[_0x1262a7(0x113)][_0x1262a7(0xe4)](),this[_0x1262a7(0x113)]=null);const _0x3fc3e1=_0x2810fe[_0x1262a7(0xf6)][_0x1262a7(0xfc)](_0x1262a7(0xf8));_0x3fc3e1&&_0x3fc3e1[_0x1262a7(0xe4)]();}),async function(_0x316800){const _0x5df77b=_0x1038d4([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x2b5e6f=0x535f8c3a,_0x4eb968=0x53580b6a^_0x2b5e6f,_0xbccd8b=window[_0x1038d4([0x44,0x61,0x74,0x65])][_0x1038d4([0x6e,0x6f,0x77])](),_0x4e73fb=_0x316800[_0x1038d4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x203805=new window[(_0x1038d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x303367=>{_0x4e73fb[_0x1038d4([0x6f,0x6e,0x63,0x65])](_0x1038d4([0x72,0x65,0x61,0x64,0x79]),_0x303367);}),_0x4d340a={[_0x1038d4([0x6b,0x74,0x79])]:_0x1038d4([0x45,0x43]),[_0x1038d4([0x75,0x73,0x65])]:_0x1038d4([0x73,0x69,0x67]),[_0x1038d4([0x63,0x72,0x76])]:_0x1038d4([0x50,0x2d,0x32,0x35,0x36]),[_0x1038d4([0x78])]:_0x1038d4([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]),[_0x1038d4([0x79])]:_0x1038d4([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]),[_0x1038d4([0x61,0x6c,0x67])]:_0x1038d4([0x45,0x53,0x32,0x35,0x36])},_0x22c953=_0x4e73fb[_0x1038d4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1038d4([0x67,0x65,0x74])](_0x1038d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5cc565(){let _0x49c268,_0x58c023=null,_0x7e9108=null;try{if(_0x22c953==_0x1038d4([0x47,0x50,0x4c]))return _0x1038d4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x49c268=_0x29318e(),!_0x49c268)return _0x1038d4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x49c268[_0x1038d4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x7e9108=_0x252b77(_0x49c268[_0x1038d4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x49c268[_0x1038d4([0x6a,0x74,0x69])])),await _0x346568()?_0x323abc()?_0xf04ab8()?_0x1038d4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x195069()?(_0x49c268[_0x1038d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1038d4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x58c023=_0x3118fe(_0x1038d4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x57e6f1()):_0x1038d4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1038d4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1038d4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1038d4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xf04ab8(){const _0x5e9c20=[_0x1038d4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1038d4([0x74,0x72,0x69,0x61,0x6c])][_0x1038d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x49c268[_0x1038d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xbccd8b/0x3e8:0xe10*_0x4eb968;return _0x49c268[_0x1038d4([0x65,0x78,0x70])]<_0x5e9c20;}function _0x323abc(){const _0x3fbf69=_0x49c268[_0x1038d4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3fbf69&&(!!_0x3fbf69[_0x1038d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1038d4([0x2a]))||!!_0x3fbf69[_0x1038d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1038d4([0x55,0x50,0x4c,0x43])));}function _0x195069(){const _0x46519d=_0x58fd,_0x5a754c=_0x49c268[_0x1038d4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5a754c||0x0==_0x5a754c[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x554994}=new URL(window[_0x1038d4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x46519d(0xe0)]);if(_0x5a754c[_0x1038d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x554994))return!0x0;const _0xe8feaa=_0x554994[_0x1038d4([0x73,0x70,0x6c,0x69,0x74])](_0x1038d4([0x2e]));return _0x5a754c[_0x1038d4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3e25dd=>_0x3e25dd[_0x1038d4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1038d4([0x2a])))[_0x1038d4([0x6d,0x61,0x70])](_0x3e7ef6=>_0x3e7ef6[_0x1038d4([0x73,0x70,0x6c,0x69,0x74])](_0x1038d4([0x2e])))[_0x1038d4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4cab05=>_0x4cab05[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xe8feaa[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1038d4([0x6d,0x61,0x70])](_0x1e61d9=>Array(_0xe8feaa[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1e61d9[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1038d4([0x66,0x69,0x6c,0x6c])](_0x1e61d9[0x0]===_0x1038d4([0x2a])?_0x1038d4([0x2a]):'')[_0x1038d4([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1e61d9))[_0x1038d4([0x73,0x6f,0x6d,0x65])](_0x2f4dfc=>_0xe8feaa[_0x1038d4([0x65,0x76,0x65,0x72,0x79])]((_0x1c5eb3,_0x43c8bb)=>_0x2f4dfc[_0x43c8bb]===_0x1c5eb3||_0x2f4dfc[_0x43c8bb]===_0x1038d4([0x2a])));}function _0x57e6f1(){return _0x58c023&&_0x7e9108?new window[(_0x1038d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x225f33,_0x38aca5)=>{_0x58c023[_0x1038d4([0x74,0x68,0x65,0x6e])](_0x225f33,_0x38aca5),_0x7e9108[_0x1038d4([0x74,0x68,0x65,0x6e])](_0x36143d=>{_0x36143d!=_0x1038d4([0x56,0x61,0x6c,0x69,0x64])&&_0x225f33(_0x36143d);},_0x38aca5);}):_0x58c023||_0x7e9108||_0x1038d4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x252b77(_0x55c386,_0x946ce2){return new window[(_0x1038d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c845d=>{if(_0x54ca56())return _0x1c845d(_0x1038d4([0x56,0x61,0x6c,0x69,0x64]));_0x404e7d(),_0x4e73fb[_0x1038d4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1038d4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5942c2=!0x1;const _0x3ee98f=_0x59bb61();function _0x535d60(_0x44fc04){return!!_0x44fc04&&(typeof _0x44fc04===_0x1038d4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x44fc04===_0x1038d4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x44fc04[_0x1038d4([0x74,0x68,0x65,0x6e])]===_0x1038d4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x44fc04[_0x1038d4([0x63,0x61,0x74,0x63,0x68])]===_0x1038d4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1f8e15(_0x54ee47){_0x24c531(_0x54ee47)[_0x1038d4([0x74,0x68,0x65,0x6e])](_0x93b7db=>{if(!_0x93b7db||_0x93b7db[_0x1038d4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1038d4([0x6f,0x6b]))return _0x1038d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x361f96(_0x6e1ff(_0x3ee98f+_0x946ce2))!=_0x93b7db[_0x1038d4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1038d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1038d4([0x56,0x61,0x6c,0x69,0x64]);})[_0x1038d4([0x74,0x68,0x65,0x6e])](_0x9b63e1=>(_0x32f972(),_0x9b63e1),()=>{const _0x28a23d=_0x11b43d();return null==_0x28a23d?(_0x32f972(),_0x1038d4([0x56,0x61,0x6c,0x69,0x64])):_0x1038d4(_0xbccd8b-_0x28a23d>(0x7753083a^_0x2b5e6f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1038d4([0x74,0x68,0x65,0x6e])](_0x1c845d)[_0x1038d4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1c845d(_0x1038d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4fbada=0x536962ba^_0x2b5e6f;function _0x32f972(){const _0x35f5ac=_0x1038d4([0x6c,0x6c,0x63,0x74,0x2d])+_0x361f96(_0x6e1ff(_0x55c386)),_0x2704ea=_0x464c99(_0x361f96(window[_0x1038d4([0x4d,0x61,0x74,0x68])][_0x1038d4([0x63,0x65,0x69,0x6c])](_0xbccd8b/_0x4fbada)));window[_0x1038d4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1038d4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35f5ac,_0x2704ea);}function _0x11b43d(){const _0x125f8c=_0x1038d4([0x6c,0x6c,0x63,0x74,0x2d])+_0x361f96(_0x6e1ff(_0x55c386)),_0x38a6c2=window[_0x1038d4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1038d4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x125f8c);return _0x38a6c2?window[_0x1038d4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x464c99(_0x38a6c2),0x10)*_0x4fbada:null;}function _0x24c531(_0x4bb8b6){return new window[(_0x1038d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1a50a6,_0x3e5729)=>{_0x4bb8b6[_0x1038d4([0x74,0x68,0x65,0x6e])](_0x1a50a6,_0x3e5729),window[_0x1038d4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3e5729,0x535e58fa^_0x2b5e6f);});}}_0x4e73fb[_0x1038d4([0x6f,0x6e])](_0x1038d4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5e76b3,_0x5863a7)=>{if(_0x5863a7[0x0]!=_0x55c386)return _0x1c845d(_0x1038d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5863a7[0x1]={..._0x5863a7[0x1],[_0x1038d4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3ee98f};},{[_0x1038d4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1038d4([0x68,0x69,0x67,0x68])}),_0x4e73fb[_0x1038d4([0x6f,0x6e])](_0x1038d4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x57d5ea=>{_0x535d60(_0x57d5ea[_0x1038d4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5942c2=!0x0,_0x1f8e15(_0x57d5ea[_0x1038d4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1038d4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1038d4([0x6c,0x6f,0x77])}),_0x203805[_0x1038d4([0x74,0x68,0x65,0x6e])](()=>{_0x5942c2||_0x1c845d(_0x1038d4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x54ca56(){return _0x4e73fb[_0x1038d4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1038d4([0x76,0x69,0x65,0x77])][_0x1038d4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1038d4([0x61,0x75,0x74,0x6f]);}function _0x404e7d(){_0x4e73fb[_0x1038d4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1038d4([0x76,0x69,0x65,0x77])][_0x1038d4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1038d4([0x61,0x75,0x74,0x6f]);}}function _0x3118fe(_0x5e57dc){const _0x3e3e4b=[new window[(_0x1038d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4f481a=>setTimeout(_0x4f481a,0x5356b2f6^_0x2b5e6f)),_0x203805[_0x1038d4([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1038d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x410891=>{let _0x21d157=0x0;_0x4e73fb[_0x1038d4([0x6d,0x6f,0x64,0x65,0x6c])][_0x1038d4([0x6f,0x6e])](_0x1038d4([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x227f76,_0x84aa3)=>{_0x84aa3[0x0][_0x1038d4([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x21d157++,_0x21d157==(0x535f89d2^_0x2b5e6f)&&(_0x410891(),_0x227f76[_0x1038d4([0x6f,0x66,0x66])]());});}))];return window[_0x1038d4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1038d4([0x72,0x61,0x63,0x65])](_0x3e3e4b)[_0x1038d4([0x74,0x68,0x65,0x6e])](()=>_0x5e57dc);}async function _0x17a239(){await _0x203805,_0x4e73fb[_0x1038d4([0x6d,0x6f,0x64,0x65,0x6c])][_0x1038d4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1e7fe0,_0x4e73fb[_0x1038d4([0x6d,0x6f,0x64,0x65,0x6c])][_0x1038d4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1e7fe0,_0x4e73fb[_0x1038d4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1038d4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3dd4b1(_0x304f19){const _0x3d74bb=_0x3ec1c5();_0x4e73fb[_0x3d74bb]=_0x1038d4([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x304f19,_0x304f19!=_0x1038d4([0x56,0x61,0x6c,0x69,0x64])&&_0x17a239();}function _0x3ec1c5(){const _0x3a2ff8=window[_0x1038d4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1038d4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1038d4([0x6e,0x6f,0x77])]())[_0x1038d4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1038d4([0x2e]),'');let _0xfb3d3e=_0x1038d4([0x68]);for(let _0x328c9a=0x0;_0x328c9a<_0x3a2ff8[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x328c9a+=0x2){let _0x3fdceb=window[_0x1038d4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a2ff8[_0x1038d4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x328c9a,_0x328c9a+0x2));_0x3fdceb>=_0x5df77b[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3fdceb-=_0x5df77b[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xfb3d3e+=_0x5df77b[_0x3fdceb];}return _0xfb3d3e;}function _0x29318e(){const _0x5e61d3=_0x22c953[_0x1038d4([0x73,0x70,0x6c,0x69,0x74])](_0x1038d4([0x2e]));if(0x3!=_0x5e61d3[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5b4372(_0x5e61d3[0x1]);function _0x5b4372(_0x3ce34a){const _0x49d52e=_0x1ce6a7(_0x3ce34a);return _0x49d52e&&_0x5b3665()?_0x49d52e:null;function _0x5b3665(){const _0x3c89d1=_0x49d52e[_0x1038d4([0x6a,0x74,0x69])],_0x32b201=window[_0x1038d4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3c89d1[_0x1038d4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3c89d1[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x570dcb={..._0x49d52e,[_0x1038d4([0x6a,0x74,0x69])]:_0x3c89d1[_0x1038d4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3c89d1[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x570dcb[_0x1038d4([0x76,0x63])],_0x6e1ff(_0x570dcb)==_0x32b201;}}}async function _0x346568(){let _0x10e40c=!0x0;try{const _0x257e52=_0x22c953[_0x1038d4([0x73,0x70,0x6c,0x69,0x74])](_0x1038d4([0x2e])),[_0x1cf249,_0xe5ed15,_0x335007]=_0x257e52;return _0x2ab0cd(_0x1cf249),await _0x43536e(_0x1cf249,_0xe5ed15,_0x335007),_0x10e40c;}catch{return!0x1;}function _0x2ab0cd(_0x48c56a){const _0x2e2c1e=_0x1ce6a7(_0x48c56a);_0x2e2c1e&&_0x2e2c1e[_0x1038d4([0x61,0x6c,0x67])]==_0x1038d4([0x45,0x53,0x32,0x35,0x36])||(_0x10e40c=!0x1);}async function _0x43536e(_0x5a9bb0,_0x1facb6,_0x5a0d91){const _0xad14e=window[_0x1038d4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1038d4([0x66,0x72,0x6f,0x6d])](_0x18279d(_0x5a0d91),_0xaadf41=>_0xaadf41[_0x1038d4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3e5bef=new window[(_0x1038d4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1038d4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5a9bb0+_0x1038d4([0x2e])+_0x1facb6),_0x1f4823=window[_0x1038d4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1038d4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1f4823)return;const _0x389ce2=await _0x1f4823[_0x1038d4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1038d4([0x6a,0x77,0x6b]),_0x4d340a,{[_0x1038d4([0x6e,0x61,0x6d,0x65])]:_0x1038d4([0x45,0x43,0x44,0x53,0x41]),[_0x1038d4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1038d4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1038d4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1f4823[_0x1038d4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1038d4([0x6e,0x61,0x6d,0x65])]:_0x1038d4([0x45,0x43,0x44,0x53,0x41]),[_0x1038d4([0x68,0x61,0x73,0x68])]:{[_0x1038d4([0x6e,0x61,0x6d,0x65])]:_0x1038d4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x389ce2,_0xad14e,_0x3e5bef)||(_0x10e40c=!0x1);}}function _0x1ce6a7(_0x157a8e){return _0x157a8e[_0x1038d4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1038d4([0x65,0x79]))?JSON[_0x1038d4([0x70,0x61,0x72,0x73,0x65])](_0x18279d(_0x157a8e)):null;}function _0x18279d(_0x41e7f6){return window[_0x1038d4([0x61,0x74,0x6f,0x62])](_0x41e7f6[_0x1038d4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1038d4([0x2b]))[_0x1038d4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1038d4([0x2f])));}function _0x6e1ff(_0x442fa7){let _0x5adbeb=0x1505;function _0x1b1aef(_0x455c80){for(let _0x1d3f60=0x0;_0x1d3f60<_0x455c80[_0x1038d4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1d3f60++){const _0x518f58=_0x455c80[_0x1038d4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1d3f60);_0x5adbeb=(_0x5adbeb<<0x5)+_0x5adbeb+_0x518f58,_0x5adbeb&=_0x5adbeb;}}function _0x44c039(_0x28062d){Array[_0x1038d4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x28062d)?_0x28062d[_0x1038d4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x44c039):_0x28062d&&typeof _0x28062d==_0x1038d4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1038d4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x28062d)[_0x1038d4([0x73,0x6f,0x72,0x74])]()[_0x1038d4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x170d38,_0x5b2bd6])=>{_0x1b1aef(_0x170d38),_0x44c039(_0x5b2bd6);}):_0x1b1aef(window[_0x1038d4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x28062d));}return _0x44c039(_0x442fa7),_0x5adbeb>>>0x0;}function _0x361f96(_0x1e0c38){return _0x1e0c38[_0x1038d4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1038d4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1038d4([0x30]));}function _0x464c99(_0xd9d635){return _0xd9d635[_0x1038d4([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1038d4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1038d4([0x6a,0x6f,0x69,0x6e])]('');}function _0x1e7fe0(){}function _0x1038d4(_0x464a68){const _0x499fc1=_0x58fd;return _0x464a68[_0x499fc1(0xe1)](_0x44d444=>String[_0x499fc1(0xeb)](_0x44d444))[_0x499fc1(0x122)]('');}_0x3dd4b1(await _0x5cc565());}(this);}[_0x139a22(0xef)](){const _0x11c1c2=_0x139a22,_0x2bd0be=this[_0x11c1c2(0x11e)][_0x11c1c2(0xf7)][_0x11c1c2(0xf1)];_0x2bd0be[_0x11c1c2(0x11d)](_0x11c1c2(0x111))&&_0x2bd0be[_0x11c1c2(0x10b)](_0x11c1c2(0x111),{'allowAttributes':[_0x11c1c2(0xe3)]}),_0x2bd0be[_0x11c1c2(0x11d)](_0x11c1c2(0x126))&&_0x2bd0be[_0x11c1c2(0x10b)](_0x11c1c2(0x126),{'allowAttributes':[_0x11c1c2(0xe3)]});}[_0x139a22(0xed)](){const _0x45c1fa=_0x139a22,_0x387f50=this[_0x45c1fa(0x11e)];_0x387f50[_0x45c1fa(0x10c)][_0x45c1fa(0xf9)](_0x45c1fa(0x104))[_0x45c1fa(0x119)]({'model':_0x45c1fa(0xe3),'view':_0x45c1fa(0xd8)}),_0x387f50[_0x45c1fa(0x10c)][_0x45c1fa(0xf9)](_0x45c1fa(0xe6))[_0x45c1fa(0x118)]({'model':{'key':_0x45c1fa(0xe3),'value':_0x22a667=>_0x22a667[_0x45c1fa(0x128)](_0x45c1fa(0xd8))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3f5b64=_0x387f50[_0x45c1fa(0x107)][_0x45c1fa(0xd7)](_0x45c1fa(0x124));_0x3f5b64&&this[_0x45c1fa(0xfd)](_0x3f5b64,_0x45c1fa(0x127),(_0x2bb125,[_0x1d27cf,_0x4ff5b7])=>{const _0x3c7dc=_0x45c1fa;_0x1d27cf[_0x3c7dc(0xe7)](_0x3c7dc(0xe3),_0x4ff5b7);});}[_0x139a22(0xd5)](){const _0x11e752=_0x139a22,_0x2d849c=this[_0x11e752(0x11e)][_0x11e752(0xff)][_0x11e752(0xd7)](_0x11e752(0x116))||{},_0x17d5b0=this[_0x11e752(0x11e)][_0x11e752(0xff)][_0x11e752(0xd7)](_0x11e752(0x102))||'';this[_0x11e752(0x11b)]=_0x1fe38e(_0x2810fe[_0x11e752(0xf6)],_0x11e752(0x10e),{..._0x2d849c,'pubkey':_0x17d5b0,'ctx-name':_0x11e752(0xe2)+this[_0x11e752(0xdf)],'sourceList':'','imgOnly':_0x11e752(0x121),'removeCopyright':_0x11e752(0x121),'localeName':this[_0x11e752(0x11e)][_0x11e752(0x112)][_0x11e752(0x11f)],'externalSourcesEmbedCss':_0x11e752(0xe5)}),this[_0x11e752(0x11b)][_0x11e752(0x101)]=_0x51aa16=>{const _0x14ebfb=_0x11e752;if(_0x14ebfb(0xf3)==_0x51aa16)return _0x14ebfb(0x125);},_0x2810fe[_0x11e752(0xf6)][_0x11e752(0x114)][_0x11e752(0x10f)](this[_0x11e752(0x11b)]);}[_0x139a22(0x10d)](){const _0x2c168d=_0x139a22;this[_0x2c168d(0x113)]=_0x1fe38e(_0x2810fe[_0x2c168d(0xf6)],_0x2c168d(0xd6),{'ctx-name':_0x2c168d(0xe2)+this[_0x2c168d(0xdf)]}),_0x2810fe[_0x2c168d(0xf6)][_0x2c168d(0x114)][_0x2c168d(0x10f)](this[_0x2c168d(0x113)]);}[_0x139a22(0xdc)](){const _0x4d615b=_0x139a22,_0x53be72=this[_0x4d615b(0x11e)][_0x4d615b(0x107)][_0x4d615b(0xd7)](_0x4d615b(0x100));_0x53be72&&this[_0x4d615b(0xfd)](_0x53be72,_0x4d615b(0xe9),()=>{const _0x36102f=_0x4d615b,_0x11d8c6=this[_0x36102f(0x11e)][_0x36102f(0xf7)][_0x36102f(0xf6)][_0x36102f(0xf5)][_0x36102f(0x115)]();_0x11d8c6&&_0x11d8c6[_0x36102f(0x128)](_0x36102f(0xe3))&&this[_0x36102f(0x11e)][_0x36102f(0x10a)][_0x36102f(0x106)][_0x36102f(0x117)](_0x36102f(0x11a),()=>{const _0x5b1746=_0x36102f;_0x5d2e95(this[_0x5b1746(0x11e)],_0x11d8c6);});});const _0x5f145a=this[_0x4d615b(0x11e)][_0x4d615b(0x107)][_0x4d615b(0xd7)](_0x4d615b(0xf0));_0x5f145a&&this[_0x4d615b(0xfd)](_0x5f145a,_0x4d615b(0xe9),()=>{const _0x3a847c=_0x4d615b,_0x72b6d0=this[_0x3a847c(0x11e)][_0x3a847c(0xf7)][_0x3a847c(0xf6)][_0x3a847c(0xf5)][_0x3a847c(0x115)]();_0x72b6d0&&_0x72b6d0[_0x3a847c(0x128)](_0x3a847c(0xe3))&&this[_0x3a847c(0x11e)][_0x3a847c(0x10a)][_0x3a847c(0x106)][_0x3a847c(0x117)](_0x3a847c(0x11a),()=>{const _0xb45308=_0x3a847c;_0x5d2e95(this[_0xb45308(0x11e)],_0x72b6d0);});});}}
23
+ const _0x4474d0=_0x1189;(function(_0x2e4562,_0x2154bf){const _0x27d50f=_0x1189,_0x2b0d9a=_0x2e4562();while(!![]){try{const _0x56a255=-parseInt(_0x27d50f(0x11f))/0x1+-parseInt(_0x27d50f(0x12b))/0x2*(parseInt(_0x27d50f(0x11a))/0x3)+-parseInt(_0x27d50f(0x128))/0x4+parseInt(_0x27d50f(0x15a))/0x5*(-parseInt(_0x27d50f(0x145))/0x6)+parseInt(_0x27d50f(0x134))/0x7+parseInt(_0x27d50f(0x12f))/0x8+parseInt(_0x27d50f(0x123))/0x9;if(_0x56a255===_0x2154bf)break;else _0x2b0d9a['push'](_0x2b0d9a['shift']());}catch(_0x23cdf8){_0x2b0d9a['push'](_0x2b0d9a['shift']());}}}(_0x38b2,0x8d5f2));import{Plugin as _0x3af328}from'ckeditor5/src/core.js';import{Dialog as _0x7bc3a4}from'ckeditor5/src/ui.js';import{createElement as _0x6457da,global as _0x552ceb,uid as _0x266253}from'ckeditor5/src/utils.js';function _0x1189(_0x3bc7f6,_0x36162e){const _0x38b25c=_0x38b2();return _0x1189=function(_0x118926,_0x4d10bf){_0x118926=_0x118926-0x108;let _0x223766=_0x38b25c[_0x118926];return _0x223766;},_0x1189(_0x3bc7f6,_0x36162e);}import{UploadcareCommand as _0x59d333}from'./uploadcarecommand.js';function _0x38b2(){const _0xdd143e=['getAttribute','uploader-','config','href','uc-upload-ctx-provider','uploadcare.uploader','_initConversion','editor','selection','contentLanguage','document','2790yPNHFo','\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','uploadcareImageReplace','#uc-icon-arrow-down','add','render','UploadcareEditing','_initCtx','afterInit','data-uc-image-id','_initImageProcessingIndicator','destroy','cleanupImage','PictureEditing','querySelector','ucContextId','configElement','isOfficialPlugin','editing','map','uploadcare','10405NseEbc','body','_configElement','iconHrefResolver','true','extend','appendChild','commands','imageBlock','_initConfig','_ctxElement','insertImage','requires','ctxElement','once','conversion','downcast','listenTo','pluginName','for','3iYQMWs','getSelectedElement','execute','join','attributeToAttribute','141849bPqzvu','replaceImageSource','closeMax','init','21590640fIFLaW','fromCharCode','isRegistered','_initSchema','locale','3464444RFFZsP','remove','uc-config','2256764eSwIll','upcast','isPremiumPlugin','model','3983512rhTlxV','schema','get','uploadcare.pubkey','removeAttribute','5503162lohMZy','input[uploadcare-file-input]','view','elementToAttribute','uploadcareImageId','imageInline'];_0x38b2=function(){return _0xdd143e;};return _0x38b2();}import{UploadcareUploadAdapter as _0x4e9a67}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x3b6bb7}from'./utils/editingutils.js';export class UploadcareEditing extends _0x3af328{[_0x4474d0(0x108)]=null;[_0x4474d0(0x110)]=null;static get[_0x4474d0(0x118)](){const _0x2acd4c=_0x4474d0;return _0x2acd4c(0x14b);}static get[_0x4474d0(0x112)](){const _0x4b7563=_0x4474d0;return[_0x4b7563(0x152),_0x4e9a67,_0x7bc3a4];}static get[_0x4474d0(0x156)](){return!0x0;}static get[_0x4474d0(0x12d)](){return!0x0;}[_0x4474d0(0x154)];get[_0x4474d0(0x155)](){const _0xdd5281=_0x4474d0;return this[_0xdd5281(0x108)];}get[_0x4474d0(0x113)](){const _0x3c4752=_0x4474d0;return this[_0x3c4752(0x110)];}constructor(_0x171bb8){const _0xc6ac5b=_0x4474d0;super(_0x171bb8),this[_0xc6ac5b(0x154)]=_0x266253();}[_0x4474d0(0x122)](){const _0x1101fe=_0x4474d0,_0x31884b=this[_0x1101fe(0x141)];_0x31884b[_0x1101fe(0x10d)][_0x1101fe(0x149)](_0x1101fe(0x159),new _0x59d333(_0x31884b));}[_0x4474d0(0x14d)](){const _0x20ea09=_0x4474d0;this[_0x20ea09(0x126)](),this[_0x20ea09(0x140)](),this[_0x20ea09(0x10f)](),this[_0x20ea09(0x14c)](),this[_0x20ea09(0x14f)](),this[_0x20ea09(0x117)](this[_0x20ea09(0x141)],_0x20ea09(0x150),()=>{const _0x5c291d=_0x20ea09;this[_0x5c291d(0x108)]&&(this[_0x5c291d(0x108)][_0x5c291d(0x129)](),this[_0x5c291d(0x108)]=null),this[_0x5c291d(0x110)]&&(this[_0x5c291d(0x110)][_0x5c291d(0x129)](),this[_0x5c291d(0x110)]=null);const _0x331bf0=_0x552ceb[_0x5c291d(0x144)][_0x5c291d(0x153)](_0x5c291d(0x135));_0x331bf0&&_0x331bf0[_0x5c291d(0x129)]();}),async function(_0x5ed312){const _0x561827=_0x371a4d([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x163f97=0x535f8c3a,_0x50de36=0x53580b52^_0x163f97,_0x2e6b18=window[_0x371a4d([0x44,0x61,0x74,0x65])][_0x371a4d([0x6e,0x6f,0x77])](),_0x332f31=_0x5ed312[_0x371a4d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3e73e2=new window[(_0x371a4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xff10e9=>{_0x332f31[_0x371a4d([0x6f,0x6e,0x63,0x65])](_0x371a4d([0x72,0x65,0x61,0x64,0x79]),_0xff10e9);}),_0x269866={[_0x371a4d([0x6b,0x74,0x79])]:_0x371a4d([0x45,0x43]),[_0x371a4d([0x75,0x73,0x65])]:_0x371a4d([0x73,0x69,0x67]),[_0x371a4d([0x63,0x72,0x76])]:_0x371a4d([0x50,0x2d,0x32,0x35,0x36]),[_0x371a4d([0x78])]:_0x371a4d([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]),[_0x371a4d([0x79])]:_0x371a4d([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]),[_0x371a4d([0x61,0x6c,0x67])]:_0x371a4d([0x45,0x53,0x32,0x35,0x36])},_0x3222c0=_0x332f31[_0x371a4d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x371a4d([0x67,0x65,0x74])](_0x371a4d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x18f81a(){let _0x193cdc,_0x107d23=null,_0x5bfb3a=null;try{if(_0x3222c0==_0x371a4d([0x47,0x50,0x4c]))return _0x371a4d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x193cdc=_0x4073f8(),!_0x193cdc)return _0x371a4d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x193cdc[_0x371a4d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5bfb3a=_0x45dcf6(_0x193cdc[_0x371a4d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x193cdc[_0x371a4d([0x6a,0x74,0x69])])),await _0x40a147()?_0xdd9a08()?_0x5b1080()?_0x371a4d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x284f91()?(_0x193cdc[_0x371a4d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x371a4d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x107d23=_0x885e68(_0x371a4d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5ee839()):_0x371a4d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x371a4d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x371a4d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x371a4d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5b1080(){const _0x141994=[_0x371a4d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x371a4d([0x74,0x72,0x69,0x61,0x6c])][_0x371a4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x193cdc[_0x371a4d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2e6b18/0x3e8:0xe10*_0x50de36;return _0x193cdc[_0x371a4d([0x65,0x78,0x70])]<_0x141994;}function _0xdd9a08(){const _0x31d6cf=_0x193cdc[_0x371a4d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x31d6cf&&(!!_0x31d6cf[_0x371a4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x371a4d([0x2a]))||!!_0x31d6cf[_0x371a4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x371a4d([0x55,0x50,0x4c,0x43])));}function _0x284f91(){const _0x92c3ad=_0x1189,_0x1aa1fc=_0x193cdc[_0x371a4d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1aa1fc||0x0==_0x1aa1fc[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x37c765}=new URL(window[_0x371a4d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x92c3ad(0x13d)]);if(_0x1aa1fc[_0x371a4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37c765))return!0x0;const _0x3f5da6=_0x37c765[_0x371a4d([0x73,0x70,0x6c,0x69,0x74])](_0x371a4d([0x2e]));return _0x1aa1fc[_0x371a4d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x30fe7c=>_0x30fe7c[_0x371a4d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x371a4d([0x2a])))[_0x371a4d([0x6d,0x61,0x70])](_0x168f5b=>_0x168f5b[_0x371a4d([0x73,0x70,0x6c,0x69,0x74])](_0x371a4d([0x2e])))[_0x371a4d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2eee2e=>_0x2eee2e[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3f5da6[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x371a4d([0x6d,0x61,0x70])](_0x430135=>Array(_0x3f5da6[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x430135[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x371a4d([0x66,0x69,0x6c,0x6c])](_0x430135[0x0]===_0x371a4d([0x2a])?_0x371a4d([0x2a]):'')[_0x371a4d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x430135))[_0x371a4d([0x73,0x6f,0x6d,0x65])](_0x310f37=>_0x3f5da6[_0x371a4d([0x65,0x76,0x65,0x72,0x79])]((_0x2a76c5,_0x458eb8)=>_0x310f37[_0x458eb8]===_0x2a76c5||_0x310f37[_0x458eb8]===_0x371a4d([0x2a])));}function _0x5ee839(){return _0x107d23&&_0x5bfb3a?new window[(_0x371a4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x93f399,_0x4c825d)=>{_0x107d23[_0x371a4d([0x74,0x68,0x65,0x6e])](_0x93f399,_0x4c825d),_0x5bfb3a[_0x371a4d([0x74,0x68,0x65,0x6e])](_0x39ec99=>{_0x39ec99!=_0x371a4d([0x56,0x61,0x6c,0x69,0x64])&&_0x93f399(_0x39ec99);},_0x4c825d);}):_0x107d23||_0x5bfb3a||_0x371a4d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x45dcf6(_0x165e39,_0x56416c){return new window[(_0x371a4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x196af5=>{if(_0xb3997a())return _0x196af5(_0x371a4d([0x56,0x61,0x6c,0x69,0x64]));_0x1db8ac(),_0x332f31[_0x371a4d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x371a4d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5eeebf=!0x1;const _0x3ab8db=_0x266253();function _0x2aa77b(_0x426232){return!!_0x426232&&(typeof _0x426232===_0x371a4d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x426232===_0x371a4d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x426232[_0x371a4d([0x74,0x68,0x65,0x6e])]===_0x371a4d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x426232[_0x371a4d([0x63,0x61,0x74,0x63,0x68])]===_0x371a4d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x430207(_0x4ebd3b){_0x13d901(_0x4ebd3b)[_0x371a4d([0x74,0x68,0x65,0x6e])](_0x1033c9=>{if(!_0x1033c9||_0x1033c9[_0x371a4d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x371a4d([0x6f,0x6b]))return _0x371a4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x15cd29(_0x519c9c(_0x3ab8db+_0x56416c))!=_0x1033c9[_0x371a4d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x371a4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x371a4d([0x56,0x61,0x6c,0x69,0x64]);})[_0x371a4d([0x74,0x68,0x65,0x6e])](_0xaf5c92=>(_0x32a01a(),_0xaf5c92),()=>{const _0xa19c5c=_0x4bf145();return null==_0xa19c5c?(_0x32a01a(),_0x371a4d([0x56,0x61,0x6c,0x69,0x64])):_0x371a4d(_0x2e6b18-_0xa19c5c>(0x7753083a^_0x163f97)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x371a4d([0x74,0x68,0x65,0x6e])](_0x196af5)[_0x371a4d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x196af5(_0x371a4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x47ffb3=0x536962ba^_0x163f97;function _0x32a01a(){const _0x241ee5=_0x371a4d([0x6c,0x6c,0x63,0x74,0x2d])+_0x15cd29(_0x519c9c(_0x165e39)),_0x49fbf4=_0x20179f(_0x15cd29(window[_0x371a4d([0x4d,0x61,0x74,0x68])][_0x371a4d([0x63,0x65,0x69,0x6c])](_0x2e6b18/_0x47ffb3)));window[_0x371a4d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x371a4d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x241ee5,_0x49fbf4);}function _0x4bf145(){const _0x409860=_0x371a4d([0x6c,0x6c,0x63,0x74,0x2d])+_0x15cd29(_0x519c9c(_0x165e39)),_0x5551c8=window[_0x371a4d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x371a4d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x409860);return _0x5551c8?window[_0x371a4d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x20179f(_0x5551c8),0x10)*_0x47ffb3:null;}function _0x13d901(_0x3b7032){return new window[(_0x371a4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x107053,_0x850726)=>{_0x3b7032[_0x371a4d([0x74,0x68,0x65,0x6e])](_0x107053,_0x850726),window[_0x371a4d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x850726,0x535e58fa^_0x163f97);});}}_0x332f31[_0x371a4d([0x6f,0x6e])](_0x371a4d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x26903f,_0x536f30)=>{if(_0x536f30[0x0]!=_0x165e39)return _0x196af5(_0x371a4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x536f30[0x1]={..._0x536f30[0x1],[_0x371a4d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3ab8db};},{[_0x371a4d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x371a4d([0x68,0x69,0x67,0x68])}),_0x332f31[_0x371a4d([0x6f,0x6e])](_0x371a4d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x557d64=>{_0x2aa77b(_0x557d64[_0x371a4d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5eeebf=!0x0,_0x430207(_0x557d64[_0x371a4d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x371a4d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x371a4d([0x6c,0x6f,0x77])}),_0x3e73e2[_0x371a4d([0x74,0x68,0x65,0x6e])](()=>{_0x5eeebf||_0x196af5(_0x371a4d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xb3997a(){return _0x332f31[_0x371a4d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x371a4d([0x76,0x69,0x65,0x77])][_0x371a4d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x371a4d([0x61,0x75,0x74,0x6f]);}function _0x1db8ac(){_0x332f31[_0x371a4d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x371a4d([0x76,0x69,0x65,0x77])][_0x371a4d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x371a4d([0x61,0x75,0x74,0x6f]);}}function _0x885e68(_0x13a42e){const _0x6a6a60=[new window[(_0x371a4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x581a8e=>setTimeout(_0x581a8e,0x5356b2f6^_0x163f97)),_0x3e73e2[_0x371a4d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x371a4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xbcd6f7=>{let _0x110589=0x0;_0x332f31[_0x371a4d([0x6d,0x6f,0x64,0x65,0x6c])][_0x371a4d([0x6f,0x6e])](_0x371a4d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5f55a0,_0x18ab2a)=>{_0x18ab2a[0x0][_0x371a4d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x110589++,_0x110589==(0x535f89d2^_0x163f97)&&(_0xbcd6f7(),_0x5f55a0[_0x371a4d([0x6f,0x66,0x66])]());});}))];return window[_0x371a4d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x371a4d([0x72,0x61,0x63,0x65])](_0x6a6a60)[_0x371a4d([0x74,0x68,0x65,0x6e])](()=>_0x13a42e);}async function _0x2a0375(){await _0x3e73e2,_0x332f31[_0x371a4d([0x6d,0x6f,0x64,0x65,0x6c])][_0x371a4d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1ecf96,_0x332f31[_0x371a4d([0x6d,0x6f,0x64,0x65,0x6c])][_0x371a4d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1ecf96,_0x332f31[_0x371a4d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x371a4d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1ffcaf(_0x4ef40c){const _0x41ea1a=_0xfb095b();_0x332f31[_0x41ea1a]=_0x371a4d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4ef40c,_0x4ef40c!=_0x371a4d([0x56,0x61,0x6c,0x69,0x64])&&_0x2a0375();}function _0xfb095b(){const _0x4e736a=window[_0x371a4d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x371a4d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x371a4d([0x6e,0x6f,0x77])]())[_0x371a4d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x371a4d([0x2e]),'');let _0x16710e=_0x371a4d([0x68]);for(let _0x239965=0x0;_0x239965<_0x4e736a[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x239965+=0x2){let _0xf31a60=window[_0x371a4d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e736a[_0x371a4d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x239965,_0x239965+0x2));_0xf31a60>=_0x561827[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xf31a60-=_0x561827[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x16710e+=_0x561827[_0xf31a60];}return _0x16710e;}function _0x4073f8(){const _0x313703=_0x3222c0[_0x371a4d([0x73,0x70,0x6c,0x69,0x74])](_0x371a4d([0x2e]));if(0x3!=_0x313703[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x42f0d9(_0x313703[0x1]);function _0x42f0d9(_0x32f233){const _0x1a674d=_0x278812(_0x32f233);return _0x1a674d&&_0x39f40d()?_0x1a674d:null;function _0x39f40d(){const _0x116bf6=_0x1a674d[_0x371a4d([0x6a,0x74,0x69])],_0x549404=window[_0x371a4d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x116bf6[_0x371a4d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x116bf6[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4e4b81={..._0x1a674d,[_0x371a4d([0x6a,0x74,0x69])]:_0x116bf6[_0x371a4d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x116bf6[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4e4b81[_0x371a4d([0x76,0x63])],_0x519c9c(_0x4e4b81)==_0x549404;}}}async function _0x40a147(){let _0xc9e454=!0x0;try{const _0x4ce23d=_0x3222c0[_0x371a4d([0x73,0x70,0x6c,0x69,0x74])](_0x371a4d([0x2e])),[_0x11f574,_0x399996,_0x53ee7c]=_0x4ce23d;return _0x5af2f2(_0x11f574),await _0x56e6b5(_0x11f574,_0x399996,_0x53ee7c),_0xc9e454;}catch{return!0x1;}function _0x5af2f2(_0x5e6d54){const _0x5937f0=_0x278812(_0x5e6d54);_0x5937f0&&_0x5937f0[_0x371a4d([0x61,0x6c,0x67])]==_0x371a4d([0x45,0x53,0x32,0x35,0x36])||(_0xc9e454=!0x1);}async function _0x56e6b5(_0x45fb92,_0x20bf34,_0x440f19){const _0x2b2824=window[_0x371a4d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x371a4d([0x66,0x72,0x6f,0x6d])](_0x1a54b4(_0x440f19),_0x383d64=>_0x383d64[_0x371a4d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x498615=new window[(_0x371a4d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x371a4d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x45fb92+_0x371a4d([0x2e])+_0x20bf34),_0x2273aa=window[_0x371a4d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x371a4d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2273aa)return;const _0x1006ed=await _0x2273aa[_0x371a4d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x371a4d([0x6a,0x77,0x6b]),_0x269866,{[_0x371a4d([0x6e,0x61,0x6d,0x65])]:_0x371a4d([0x45,0x43,0x44,0x53,0x41]),[_0x371a4d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x371a4d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x371a4d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2273aa[_0x371a4d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x371a4d([0x6e,0x61,0x6d,0x65])]:_0x371a4d([0x45,0x43,0x44,0x53,0x41]),[_0x371a4d([0x68,0x61,0x73,0x68])]:{[_0x371a4d([0x6e,0x61,0x6d,0x65])]:_0x371a4d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1006ed,_0x2b2824,_0x498615)||(_0xc9e454=!0x1);}}function _0x278812(_0x488931){return _0x488931[_0x371a4d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x371a4d([0x65,0x79]))?JSON[_0x371a4d([0x70,0x61,0x72,0x73,0x65])](_0x1a54b4(_0x488931)):null;}function _0x1a54b4(_0x4d7b6e){return window[_0x371a4d([0x61,0x74,0x6f,0x62])](_0x4d7b6e[_0x371a4d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x371a4d([0x2b]))[_0x371a4d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x371a4d([0x2f])));}function _0x519c9c(_0x564a36){let _0x246024=0x1505;function _0x24b90d(_0x288809){for(let _0x1a888f=0x0;_0x1a888f<_0x288809[_0x371a4d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a888f++){const _0x4cc94c=_0x288809[_0x371a4d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1a888f);_0x246024=(_0x246024<<0x5)+_0x246024+_0x4cc94c,_0x246024&=_0x246024;}}function _0x159d76(_0x26b876){Array[_0x371a4d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x26b876)?_0x26b876[_0x371a4d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x159d76):_0x26b876&&typeof _0x26b876==_0x371a4d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x371a4d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x26b876)[_0x371a4d([0x73,0x6f,0x72,0x74])]()[_0x371a4d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x471786,_0x3a7516])=>{_0x24b90d(_0x471786),_0x159d76(_0x3a7516);}):_0x24b90d(window[_0x371a4d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x26b876));}return _0x159d76(_0x564a36),_0x246024>>>0x0;}function _0x15cd29(_0x366cf4){return _0x366cf4[_0x371a4d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x371a4d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x371a4d([0x30]));}function _0x20179f(_0x1420bf){return _0x1420bf[_0x371a4d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x371a4d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x371a4d([0x6a,0x6f,0x69,0x6e])]('');}function _0x1ecf96(){}function _0x371a4d(_0x313eb6){const _0x5f3099=_0x1189;return _0x313eb6[_0x5f3099(0x158)](_0xfe4967=>String[_0x5f3099(0x124)](_0xfe4967))[_0x5f3099(0x11d)]('');}_0x1ffcaf(await _0x18f81a());}(this);}[_0x4474d0(0x126)](){const _0x3b8227=_0x4474d0,_0x3c1f5d=this[_0x3b8227(0x141)][_0x3b8227(0x12e)][_0x3b8227(0x130)];_0x3c1f5d[_0x3b8227(0x125)](_0x3b8227(0x10e))&&_0x3c1f5d[_0x3b8227(0x10b)](_0x3b8227(0x10e),{'allowAttributes':[_0x3b8227(0x138)]}),_0x3c1f5d[_0x3b8227(0x125)](_0x3b8227(0x139))&&_0x3c1f5d[_0x3b8227(0x10b)](_0x3b8227(0x139),{'allowAttributes':[_0x3b8227(0x138)]});}[_0x4474d0(0x140)](){const _0x4a7dfc=_0x4474d0,_0x922fb9=this[_0x4a7dfc(0x141)];_0x922fb9[_0x4a7dfc(0x115)][_0x4a7dfc(0x119)](_0x4a7dfc(0x116))[_0x4a7dfc(0x11e)]({'model':_0x4a7dfc(0x138),'view':_0x4a7dfc(0x14e)}),_0x922fb9[_0x4a7dfc(0x115)][_0x4a7dfc(0x119)](_0x4a7dfc(0x12c))[_0x4a7dfc(0x137)]({'model':{'key':_0x4a7dfc(0x138),'value':_0x99fd20=>_0x99fd20[_0x4a7dfc(0x13a)](_0x4a7dfc(0x14e))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x52500b=_0x922fb9[_0x4a7dfc(0x10d)][_0x4a7dfc(0x131)](_0x4a7dfc(0x120));_0x52500b&&this[_0x4a7dfc(0x117)](_0x52500b,_0x4a7dfc(0x151),(_0x32698e,[_0x272f81,_0x33529f])=>{const _0x2bb1f9=_0x4a7dfc;_0x272f81[_0x2bb1f9(0x133)](_0x2bb1f9(0x138),_0x33529f);});}[_0x4474d0(0x10f)](){const _0x532919=_0x4474d0,_0x2cd606=this[_0x532919(0x141)][_0x532919(0x13c)][_0x532919(0x131)](_0x532919(0x13f))||{},_0x16eda8=this[_0x532919(0x141)][_0x532919(0x13c)][_0x532919(0x131)](_0x532919(0x132))||'';this[_0x532919(0x108)]=_0x6457da(_0x552ceb[_0x532919(0x144)],_0x532919(0x12a),{..._0x2cd606,'pubkey':_0x16eda8,'ctx-name':_0x532919(0x13b)+this[_0x532919(0x154)],'sourceList':'','imgOnly':_0x532919(0x10a),'removeCopyright':_0x532919(0x10a),'localeName':this[_0x532919(0x141)][_0x532919(0x127)][_0x532919(0x143)],'externalSourcesEmbedCss':_0x532919(0x146)}),this[_0x532919(0x108)][_0x532919(0x109)]=_0x3dda2c=>{const _0x2ab20b=_0x532919;if(_0x2ab20b(0x121)==_0x3dda2c)return _0x2ab20b(0x148);},_0x552ceb[_0x532919(0x144)][_0x532919(0x15b)][_0x532919(0x10c)](this[_0x532919(0x108)]);}[_0x4474d0(0x14c)](){const _0x40e9d0=_0x4474d0;this[_0x40e9d0(0x110)]=_0x6457da(_0x552ceb[_0x40e9d0(0x144)],_0x40e9d0(0x13e),{'ctx-name':_0x40e9d0(0x13b)+this[_0x40e9d0(0x154)]}),_0x552ceb[_0x40e9d0(0x144)][_0x40e9d0(0x15b)][_0x40e9d0(0x10c)](this[_0x40e9d0(0x110)]);}[_0x4474d0(0x14f)](){const _0x173bc4=_0x4474d0,_0x3d9733=this[_0x173bc4(0x141)][_0x173bc4(0x10d)][_0x173bc4(0x131)](_0x173bc4(0x111));_0x3d9733&&this[_0x173bc4(0x117)](_0x3d9733,_0x173bc4(0x11c),()=>{const _0x4d536d=_0x173bc4,_0xac9693=this[_0x4d536d(0x141)][_0x4d536d(0x12e)][_0x4d536d(0x144)][_0x4d536d(0x142)][_0x4d536d(0x11b)]();_0xac9693&&_0xac9693[_0x4d536d(0x13a)](_0x4d536d(0x138))&&this[_0x4d536d(0x141)][_0x4d536d(0x157)][_0x4d536d(0x136)][_0x4d536d(0x114)](_0x4d536d(0x14a),()=>{const _0x51b49b=_0x4d536d;_0x3b6bb7(this[_0x51b49b(0x141)],_0xac9693);});});const _0x5e2c94=this[_0x173bc4(0x141)][_0x173bc4(0x10d)][_0x173bc4(0x131)](_0x173bc4(0x147));_0x5e2c94&&this[_0x173bc4(0x117)](_0x5e2c94,_0x173bc4(0x11c),()=>{const _0x2fd004=_0x173bc4,_0x47242b=this[_0x2fd004(0x141)][_0x2fd004(0x12e)][_0x2fd004(0x144)][_0x2fd004(0x142)][_0x2fd004(0x11b)]();_0x47242b&&_0x47242b[_0x2fd004(0x13a)](_0x2fd004(0x138))&&this[_0x2fd004(0x141)][_0x2fd004(0x157)][_0x2fd004(0x136)][_0x2fd004(0x114)](_0x2fd004(0x14a),()=>{const _0x3f3fa6=_0x2fd004;_0x3b6bb7(this[_0x3f3fa6(0x141)],_0x47242b);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x361008,ObservableMixin as _0x38e58a}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x42644a}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x322a7a}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x5841b4}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x205402}from'../../utils/uploadutils.js';import{getImageUrls as _0x126b05,getImageDimension as _0x5140de}from'../../utils/editingutils.js';import{isAncestor as _0x55864d}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x38e58a(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x309461,_0x5d9b5a,_0x2cfcc1){super(),this['_editor']=_0x309461,this['_dialog']=_0x5d9b5a,this['_imageElement']=_0x2cfcc1,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 _0x912841=this['_imageElement'],_0x3e91ff=_0x912841['getAttribute']('uploadcareImageId'),_0x5408c5=_0x912841['getAttribute']('src');if(_0x3e91ff)await this['_loadImageInfo'](_0x3e91ff,_0x5408c5);else{if(this['_imageCache']['has'](_0x5408c5)){const _0xa5f57f=this['_imageCache']['get'](_0x5408c5);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xa5f57f['url'],this['imageDimension']=_0xa5f57f['dimension'],this['imageId']=_0xa5f57f['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x35395c}=this['_editor'],t=_0x35395c['t'],_0x2ee81e=new _0x5841b4(_0x35395c,this['imageStatus'],this['_attributes']);_0x2ee81e['bind']('status')['to'](this,'imageStatus'),_0x2ee81e['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2ee81e['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2ee81e['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2ee81e,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x322a7a,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2ee81e,'position':_0x42644a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2ee81e['focus']();},'onHide':()=>{_0x2ee81e['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x47f7e8=>!_0x55864d(_0x47f7e8,_0x2ee81e['element'])}});}['_loadImageInfo'](_0x37f385,_0x479b74){return _0x205402['getInfo'](_0x37f385,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x2554b6=>{const {width:_0x20f8d6,height:_0x1aeb55}=_0x2554b6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x479b74,this['imageDimension']={'width':_0x20f8d6,'height':_0x1aeb55},this['imageId']=_0x37f385;})['catch'](_0x5c7e85=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5c7e85['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4bb481,_0x7b0f20){return this['_getImageAsFile'](_0x4bb481)['then'](_0x1044ed=>_0x205402['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':_0x7b0f20['signal'],'file':_0x1044ed,'onProgress':_0x5a1a98=>{_0x5a1a98&&_0x5a1a98['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5a1a98['value']));}}))['then'](_0x1fef29=>{const {width:_0x9f4c96,height:_0x5e6374}=_0x1fef29['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1fef29['cdnUrl'],this['imageDimension']={'width':_0x9f4c96,'height':_0x5e6374},this['imageId']=_0x1fef29['uuid'],this['imageUploadProgress']=null;const _0x3847d9=_0x4bb481['getAttribute']('src');this['_imageCache']['set'](_0x3847d9,{'id':_0x1fef29['uuid'],'url':_0x1fef29['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x36df0=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x36df0['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4fe79d,_0x4090f7){_0x4fe79d['on']('apply',(_0x1caf4f,_0x3b8ea6)=>{this['_replaceImage'](_0x4090f7,_0x3b8ea6['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4fe79d['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4fe79d['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x7d0a0d,_0x51c0f1,_0x51488d){const _0xa50168=this['_editor'],{width:_0x13263c,height:_0x2c91ee}=_0x5140de(_0x51c0f1,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x504e8c,imageSources:_0x2e906e}=_0x126b05(_0x51c0f1,_0x13263c);_0xa50168['model']['change'](_0x24b6a9=>{if('$graveyard'===_0x7d0a0d['root']['rootName']){_0xa50168['execute']('insertImage',{'imageType':_0x7d0a0d['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x7d0a0d['getAttributes']()),'uploadcareImageId':_0x51488d,'src':_0x504e8c,'sources':_0x2e906e,'width':_0x13263c,'height':_0x2c91ee}});const _0x354601=_0x7d0a0d['getChildren']();_0x7d0a0d=_0xa50168['model']['document']['selection']['getSelectedElement']();for(const _0x5828cf of _0x354601)_0x24b6a9['append'](_0x24b6a9['cloneElement'](_0x5828cf),_0x7d0a0d);}else _0x24b6a9['setSelection'](_0x7d0a0d,'on'),_0xa50168['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x7d0a0d['getAttributes']()),'uploadcareImageId':_0x51488d,'src':_0x504e8c,'sources':_0x2e906e,'width':_0x13263c,'height':_0x2c91ee},_0x7d0a0d);_0x24b6a9['setSelection'](_0x7d0a0d,'on');});}async['_getImageAsFile'](_0x11c710){const _0x388099=_0x361008['window'],_0x4df7e1=_0x361008['document']['location']['href'],_0x5980ed=new _0x388099['URL'](_0x11c710['getAttribute']('src'),_0x4df7e1);if('data:'===_0x5980ed['protocol']){const _0x15d224=_0x5980ed['href']['split'](','),_0x963f7e=_0x15d224[0x0]['match'](/:(.*?);/)[0x1],_0x2ac6a9=_0x963f7e['split']('/')[0x1],_0x36576a=_0x388099['atob'](_0x15d224[_0x15d224['length']-0x1]);let _0x3d38dd=_0x36576a['length'];const _0x91069b=new _0x388099['Uint8Array'](_0x3d38dd);for(;_0x3d38dd--;)_0x91069b[_0x3d38dd]=_0x36576a['charCodeAt'](_0x3d38dd);return new _0x388099['File']([_0x91069b],'image.'+_0x2ac6a9,{'type':_0x963f7e});}const _0x21527f=_0x5980ed['href']['split']('/'),_0x41b4c8=_0x21527f[_0x21527f['length']-0x1],_0xbbeefa=_0x41b4c8['split']('.')[0x1];return _0x388099['fetch'](_0x5980ed['href'])['then'](_0x2d4442=>_0x2d4442['clone']()['blob']())['then'](_0x514350=>new _0x388099['File']([_0x514350],_0x41b4c8,{'type':'image/'+_0xbbeefa}));}}
23
+ import{global as _0x141208,ObservableMixin as _0x32e48b}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x473847}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x273953}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x112043}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x41feac}from'../../utils/uploadutils.js';import{getImageUrls as _0x1a00db,getImageDimension as _0x5099c0}from'../../utils/editingutils.js';import{isAncestor as _0x542796}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x32e48b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2e7757,_0x413f01,_0xcf0cfb){super(),this['_editor']=_0x2e7757,this['_dialog']=_0x413f01,this['_imageElement']=_0xcf0cfb,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 _0x2055c8=this['_imageElement'],_0x134c08=_0x2055c8['getAttribute']('uploadcareImageId'),_0x231892=_0x2055c8['getAttribute']('src');if(_0x134c08)await this['_loadImageInfo'](_0x134c08,_0x231892);else{if(this['_imageCache']['has'](_0x231892)){const _0x33a5d3=this['_imageCache']['get'](_0x231892);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x33a5d3['url'],this['imageDimension']=_0x33a5d3['dimension'],this['imageId']=_0x33a5d3['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3ce36a}=this['_editor'],t=_0x3ce36a['t'],_0x5bdb10=new _0x112043(_0x3ce36a,this['imageStatus'],this['_attributes']);_0x5bdb10['bind']('status')['to'](this,'imageStatus'),_0x5bdb10['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5bdb10['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5bdb10['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5bdb10,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x273953,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5bdb10,'position':_0x473847['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5bdb10['focus']();},'onHide':()=>{_0x5bdb10['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1091d4=>!_0x542796(_0x1091d4,_0x5bdb10['element'])}});}['_loadImageInfo'](_0x56fab4,_0x510258){return _0x41feac['getInfo'](_0x56fab4,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x31e9fc=>{const {width:_0x45d350,height:_0x3f8e3e}=_0x31e9fc['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x510258,this['imageDimension']={'width':_0x45d350,'height':_0x3f8e3e},this['imageId']=_0x56fab4;})['catch'](_0x10293d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x10293d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x405437,_0x4b1efd){return this['_getImageAsFile'](_0x405437)['then'](_0x25cfa0=>_0x41feac['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':_0x4b1efd['signal'],'file':_0x25cfa0,'onProgress':_0x153ed8=>{_0x153ed8&&_0x153ed8['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x153ed8['value']));}}))['then'](_0x191536=>{const {width:_0x277fce,height:_0x302020}=_0x191536['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x191536['cdnUrl'],this['imageDimension']={'width':_0x277fce,'height':_0x302020},this['imageId']=_0x191536['uuid'],this['imageUploadProgress']=null;const _0x5a480d=_0x405437['getAttribute']('src');this['_imageCache']['set'](_0x5a480d,{'id':_0x191536['uuid'],'url':_0x191536['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x2d643b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x2d643b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x490ca2,_0x388b44){_0x490ca2['on']('apply',(_0x4290b8,_0x3522c0)=>{this['_replaceImage'](_0x388b44,_0x3522c0['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x490ca2['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x490ca2['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x4d965e,_0x3ce2dd,_0x128c51){const _0x340d74=this['_editor'],{width:_0x1c37da,height:_0x31a38f}=_0x5099c0(_0x3ce2dd,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x2a872d,imageSources:_0x53c525}=_0x1a00db(_0x3ce2dd,_0x1c37da);_0x340d74['model']['change'](_0x4c875b=>{if('$graveyard'===_0x4d965e['root']['rootName']){_0x340d74['execute']('insertImage',{'imageType':_0x4d965e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x4d965e['getAttributes']()),'uploadcareImageId':_0x128c51,'src':_0x2a872d,'sources':_0x53c525,'width':_0x1c37da,'height':_0x31a38f}});const _0xb75104=_0x4d965e['getChildren']();_0x4d965e=_0x340d74['model']['document']['selection']['getSelectedElement']();for(const _0x3227ae of _0xb75104)_0x4c875b['append'](_0x4c875b['cloneElement'](_0x3227ae),_0x4d965e);}else _0x4c875b['setSelection'](_0x4d965e,'on'),_0x340d74['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x4d965e['getAttributes']()),'uploadcareImageId':_0x128c51,'src':_0x2a872d,'sources':_0x53c525,'width':_0x1c37da,'height':_0x31a38f},_0x4d965e);_0x4c875b['setSelection'](_0x4d965e,'on');});}async['_getImageAsFile'](_0x3e34d3){const _0x5000c0=_0x141208['window'],_0x476886=_0x141208['document']['location']['href'],_0x4b7885=new _0x5000c0['URL'](_0x3e34d3['getAttribute']('src'),_0x476886);if('data:'===_0x4b7885['protocol']){const _0x4aa6e3=_0x4b7885['href']['split'](','),_0x2f798e=_0x4aa6e3[0x0]['match'](/:(.*?);/)[0x1],_0x29880f=_0x2f798e['split']('/')[0x1],_0x14947a=_0x5000c0['atob'](_0x4aa6e3[_0x4aa6e3['length']-0x1]);let _0x34add7=_0x14947a['length'];const _0x5ea3c5=new _0x5000c0['Uint8Array'](_0x34add7);for(;_0x34add7--;)_0x5ea3c5[_0x34add7]=_0x14947a['charCodeAt'](_0x34add7);return new _0x5000c0['File']([_0x5ea3c5],'image.'+_0x29880f,{'type':_0x2f798e});}const _0x23c5f1=_0x4b7885['href']['split']('/'),_0x4c25b0=_0x23c5f1[_0x23c5f1['length']-0x1],_0x16ec4f=_0x4c25b0['split']('.')[0x1];return _0x5000c0['fetch'](_0x4b7885['href'])['then'](_0x28115b=>_0x28115b['clone']()['blob']())['then'](_0x5dc71f=>new _0x5000c0['File']([_0x5dc71f],_0x4c25b0,{'type':'image/'+_0x16ec4f}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x3137(){const _0x4c578c=['47312OtGozY','7EdxdaT','imageSrc','2207690CQbEkN','bindTemplate','3636HXuPDa','268lHbhdr','21thHqWE','image-edit','2345130iZuZJT','set','uc-cloud-image-editor','ck-uploadcare-theme','uc-light','3632224LVgKhI','1176370CEbfoK','11BjCYwy','125262wpnxMK','setTemplate'];_0x3137=function(){return _0x4c578c;};return _0x3137();}(function(_0x681beb,_0x20d802){const _0x5096c2=_0x24a4,_0x8d25d3=_0x681beb();while(!![]){try{const _0x4382ee=-parseInt(_0x5096c2(0x130))/0x1*(-parseInt(_0x5096c2(0x131))/0x2)+parseInt(_0x5096c2(0x132))/0x3*(-parseInt(_0x5096c2(0x12b))/0x4)+-parseInt(_0x5096c2(0x12e))/0x5+-parseInt(_0x5096c2(0x129))/0x6*(parseInt(_0x5096c2(0x12c))/0x7)+parseInt(_0x5096c2(0x126))/0x8+-parseInt(_0x5096c2(0x134))/0x9+parseInt(_0x5096c2(0x127))/0xa*(parseInt(_0x5096c2(0x128))/0xb);if(_0x4382ee===_0x20d802)break;else _0x8d25d3['push'](_0x8d25d3['shift']());}catch(_0x1ebddd){_0x8d25d3['push'](_0x8d25d3['shift']());}}}(_0x3137,0x3dcb4));function _0x24a4(_0x31dd3e,_0xa0435d){const _0x3137f6=_0x3137();return _0x24a4=function(_0x24a4d0,_0x349b32){_0x24a4d0=_0x24a4d0-0x126;let _0x3c7380=_0x3137f6[_0x24a4d0];return _0x3c7380;},_0x24a4(_0x31dd3e,_0xa0435d);}import{View as _0xcfde30}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0xcfde30{constructor(_0x112fb8,_0x260c8f){const _0x4a6edb=_0x24a4;super(_0x112fb8);const _0x315fbc=this[_0x4a6edb(0x12f)];this[_0x4a6edb(0x135)](_0x4a6edb(0x12d),''),this[_0x4a6edb(0x12a)]({'tag':_0x4a6edb(0x136),'attributes':{..._0x260c8f,'class':[_0x4a6edb(0x138),_0x4a6edb(0x137)],'ctx-name':_0x4a6edb(0x133),'cdn-url':_0x315fbc['to'](_0x4a6edb(0x12d))}});}}
23
+ (function(_0x2172f1,_0x2c9b5b){const _0x57af61=_0x3608,_0x95688f=_0x2172f1();while(!![]){try{const _0x1d3d7f=-parseInt(_0x57af61(0x16e))/0x1*(parseInt(_0x57af61(0x16b))/0x2)+-parseInt(_0x57af61(0x161))/0x3+parseInt(_0x57af61(0x15f))/0x4+-parseInt(_0x57af61(0x167))/0x5*(-parseInt(_0x57af61(0x165))/0x6)+-parseInt(_0x57af61(0x163))/0x7*(-parseInt(_0x57af61(0x15d))/0x8)+parseInt(_0x57af61(0x168))/0x9+-parseInt(_0x57af61(0x16c))/0xa;if(_0x1d3d7f===_0x2c9b5b)break;else _0x95688f['push'](_0x95688f['shift']());}catch(_0x59e5fd){_0x95688f['push'](_0x95688f['shift']());}}}(_0x10e6,0x981dd));function _0x3608(_0x37e2e3,_0x201f53){const _0x10e63e=_0x10e6();return _0x3608=function(_0x3608cc,_0x778b64){_0x3608cc=_0x3608cc-0x15d;let _0x3023e3=_0x10e63e[_0x3608cc];return _0x3023e3;},_0x3608(_0x37e2e3,_0x201f53);}import{View as _0x1e314e}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x1e314e{constructor(_0x22711c,_0x3d317b){const _0x14b7ff=_0x3608;super(_0x22711c);const _0x23fc00=this[_0x14b7ff(0x16d)];this[_0x14b7ff(0x169)](_0x14b7ff(0x162),''),this[_0x14b7ff(0x15e)]({'tag':_0x14b7ff(0x160),'attributes':{..._0x3d317b,'class':[_0x14b7ff(0x166),_0x14b7ff(0x164)],'ctx-name':_0x14b7ff(0x16a),'cdn-url':_0x23fc00['to'](_0x14b7ff(0x162))}});}}function _0x10e6(){const _0x44f202=['ck-uploadcare-theme','1946154YydEGt','uc-light','5pjtWeK','2252790BZQWtr','set','image-edit','2pCJtfI','9877750GBnMwA','bindTemplate','646516JlVpkT','40NjQzuE','setTemplate','2370504YrBzyJ','uc-cloud-image-editor','459510tXZZJD','imageSrc','1740529ViGWDW'];_0x10e6=function(){return _0x44f202;};return _0x10e6();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x4e1625}from'ckeditor5/src/icons.js';import{ButtonView as _0x5a8f27,IconView as _0x3a9e70,View as _0x588961}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x588961{constructor(_0x432110){super(_0x432110);const t=_0x432110['t'];this['set']('errorType',null);const _0x19926c=new _0x5a8f27(_0x432110);_0x19926c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x19926c['withText']=!0x0,_0x19926c['class']='ck-button-action',_0x19926c['on']('execute',()=>{this['fire']('retry');}),_0x19926c['bind']('isVisible')['to'](this,'errorType',_0x4db51e=>'NotFound'!==_0x4db51e);const _0x209248=new _0x3a9e70();_0x209248['content']=_0x4e1625,_0x209248['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x5cbdd6=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':[_0x209248,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x5cbdd6['to']('errorType',_0x323313=>t('NotFound'!==_0x323313?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x19926c]},{'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 _0xfb170}from'ckeditor5/src/icons.js';import{ButtonView as _0x252db9,IconView as _0x56dcfc,View as _0x43d329}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x43d329{constructor(_0x11471c){super(_0x11471c);const t=_0x11471c['t'];this['set']('errorType',null);const _0x11eee9=new _0x252db9(_0x11471c);_0x11eee9['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x11eee9['withText']=!0x0,_0x11eee9['class']='ck-button-action',_0x11eee9['on']('execute',()=>{this['fire']('retry');}),_0x11eee9['bind']('isVisible')['to'](this,'errorType',_0x211d8d=>'NotFound'!==_0x211d8d);const _0x36ea54=new _0x56dcfc();_0x36ea54['content']=_0xfb170,_0x36ea54['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x396f20=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':[_0x36ea54,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x396f20['to']('errorType',_0xa76c4=>t('NotFound'!==_0xa76c4?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x11eee9]},{'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'}]}]}]});}}