@ckeditor/ckeditor5-uploadcare 47.7.1-alpha.0 → 47.7.1

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 _0x1e119d,Command as _0xcf6c66}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3ac9c3,IconGooglePhotos as _0x2a644c,IconGoogleDrive as _0x2ac3bd,IconFacebook as _0x29c9a0,IconDropbox as _0x4d123a,IconUploadcareLink as _0x4b1b9f,IconUploadcareImageUpload as _0x1b6e13,IconError as _0x2a8b34,IconUploadcareImageEdit as _0x34de50}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x4df92e,MenuBarMenuListItemButtonView as _0x15d3ff,View as _0x41c584,FocusCycler as _0xa746d3,Dialog as _0x96891a,DialogViewPosition as _0xfd697d,SpinnerView as _0x457457,IconView as _0x9419a6,Notification as _0x4ddc2f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x4b2f8c,DomEmitterMixin as _0x397614,global as _0x4e845c,getAncestors as _0x365f8d,ObservableMixin as _0x1ad003,uid as _0x5a6318,createElement as _0x14d4e6}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x4101ba}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2a0f30,info as _0x3108df}from'@uploadcare/upload-client';import*as _0x5259ab from'@uploadcare/file-uploader';var i=function(_0x49a5af){return _0x49a5af['Local']='local',_0x49a5af['URL']='url',_0x49a5af['Dropbox']='dropbox',_0x49a5af['GDrive']='gdrive',_0x49a5af['Facebook']='facebook',_0x49a5af['GPhotos']='gphotos',_0x49a5af['OneDrive']='onedrive',_0x49a5af;}({});function _(_0x406bb8,_0x545fc9,_0x1dba76){const t=_0x406bb8['t'],_0x57c9d3=_0x406bb8['t'];switch(_0x545fc9){case i['Local']:return{'text':_0x57c9d3('Insert'===_0x1dba76?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x57c9d3('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x1dba76?_0x57c9d3('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x57c9d3('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x1dba76?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x1dba76?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x1dba76?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x1dba76?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x1dba76?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x545fc9;}}class e extends _0x1e119d{['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 _0x3dabe7=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xff75ad;for(const _0x535411 in _0x3dabe7){const _0x4fae2b=_0x535411,_0xafbaac=_0x3dabe7[_0x4fae2b];if('uploadcareLicenseKeyValid'==_0xafbaac||'uploadcareLicenseKeyInvalid'==_0xafbaac||'uploadcareLicenseKeyExpired'==_0xafbaac||'uploadcareLicenseKeyDomainLimit'==_0xafbaac||'uploadcareLicenseKeyNotAllowed'==_0xafbaac||'uploadcareLicenseKeyEvaluationLimit'==_0xafbaac||'uploadcareLicenseKeyUsageLimit'==_0xafbaac){delete _0x3dabe7[_0x4fae2b],_0xff75ad=_0xafbaac,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0xff75ad&&_0x3dabe7['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0xff75ad&&_0x3dabe7['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0xff75ad&&_0x3dabe7['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0xff75ad&&_0x3dabe7['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0xff75ad&&_0x3dabe7['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0xff75ad&&_0x3dabe7['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x269ba9}=this,_0x52c980=_0x269ba9['commands']['get']('uploadcare');if(!_0x52c980)return;const _0x1bfe21=this['_normalizeConfigSourceList'](_0x269ba9['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x424d8a,_0x384c1e)=>{const _0x646d8a=this['_getIntegrationKey'](_0x384c1e['type']);return _0x424d8a[_0x646d8a]||(_0x424d8a[_0x646d8a]=[]),_0x424d8a[_0x646d8a]['push'](_0x384c1e),_0x424d8a;},{});_0x269ba9['plugins']['has']('ImageInsertUI')&&_0x269ba9['commands']['get']('uploadcare')&&Object['entries'](_0x1bfe21)['forEach'](([_0x2dba64,_0x43bec9])=>{_0x269ba9['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x2dba64,'observable':()=>_0x52c980,'buttonViewCreator':()=>this['_createToolbarButton'](_0x43bec9),'formViewCreator':()=>this['_createDropdownButtons'](_0x43bec9),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x43bec9),'override':'assetManager'!==_0x2dba64});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x4158a8){const {locale:_0x12aaf4}=this['editor'];return _0x4158a8['map'](_0xc6994=>{const _0x5650a3=_(_0x12aaf4,_0xc6994,'Insert');switch(_0xc6994){case i['Local']:return{'icon':_0x1b6e13,'type':i['Local'],..._0x5650a3};case i['URL']:return{'icon':_0x4b1b9f,'type':i['URL'],..._0x5650a3};case i['Dropbox']:return{'icon':_0x4d123a,'type':i['Dropbox'],..._0x5650a3};case i['Facebook']:return{'icon':_0x29c9a0,'type':i['Facebook'],..._0x5650a3};case i['GDrive']:return{'icon':_0x2ac3bd,'type':i['GDrive'],..._0x5650a3};case i['GPhotos']:return{'icon':_0x2a644c,'type':i['GPhotos'],..._0x5650a3};case i['OneDrive']:return{'icon':_0x3ac9c3,'type':i['OneDrive'],..._0x5650a3};}});}['_getIntegrationKey'](_0x414a44){switch(_0x414a44){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0xe2c650,_0x57bea0){const _0x2c66ab=this['editor'],_0x15d09a=new _0xe2c650(_0x2c66ab['locale']),_0x50f7ee=_0x2c66ab['commands']['get']('uploadcare');return _0x15d09a['bind']('isEnabled')['to'](_0x50f7ee),_0x15d09a['on']('execute',()=>{_0x50f7ee['execute'](_0x57bea0);}),_0x15d09a;}['_createToolbarButton'](_0x56d1db){const {locale:_0x5a0421}=this['editor'],_0x260110=this['editor']['plugins']['get']('ImageInsertUI'),_0x8fd841=_0x56d1db[0x0],_0x2c0bca=this['_createButton'](_0x4df92e,_0x8fd841['type']);return _0x2c0bca['icon']=_0x8fd841['icon'],_0x2c0bca['bind']('label')['to'](_0x260110,'isImageSelected',_0x4f5d2d=>_(_0x5a0421,_0x8fd841['type'],_0x4f5d2d?'Replace':'Insert')['text']),_0x2c0bca['tooltip']=!0x0,_0x2c0bca;}['_createDropdownButtons'](_0xb1f100){const {locale:_0x31a51d}=this['editor'],_0x264717=this['editor']['plugins']['get']('ImageInsertUI');return _0xb1f100['map'](_0x4fb6e8=>{const _0x2218f6=this['_createButton'](_0x4df92e,_0x4fb6e8['type']);return _0x2218f6['withText']=!0x0,_0x2218f6['icon']=_0x4fb6e8['icon'],_0x2218f6['bind']('label')['to'](_0x264717,'isImageSelected',_0x53ad35=>_(_0x31a51d,_0x4fb6e8['type'],_0x53ad35?'Replace':'Insert')['text']),_0x2218f6;});}['_createMenuBarButtons'](_0x5c1554){return _0x5c1554['map'](_0x3683c5=>{const _0x42f9a7=this['_createButton'](_0x15d3ff,_0x3683c5['type']);return _0x42f9a7['icon']=_0x3683c5['icon'],_0x42f9a7['label']=_0x3683c5['shortText'],_0x42f9a7;});}}class F extends _0x41c584{['focusTracker'];['focusCycler'];constructor(_0x1e7445){super(_0x1e7445),this['focusTracker']=new _0x4b2f8c(),this['focusCycler']=new _0xa746d3({'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(_0x5ea014,_0x3db272){super(_0x5ea014),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-'+_0x3db272}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x2afad8,_0xbbe9e8){const _0x231239=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x40d791=>_0x40d791<=_0xbbe9e8)['map'](_0x13e997=>_0x2afad8['replace'](/\/$/,'')+'/-/resize/'+_0x13e997+'x/\x20'+_0x13e997+'w');return{'imageFallbackUrl':_0x2afad8,'imageSources':[{'srcset':_0x231239['join'](',\x20'),'sizes':'(max-width:\x20'+_0xbbe9e8+'px)\x20100vw,\x20'+_0xbbe9e8+'px','type':'image/webp'}]};}function S(_0x115ac5,_0x5bedce,_0x406329){const _0x426189=_0x115ac5['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x426189?parseInt(_0x426189[0x1],0xa):_0x5bedce,'height':_0x426189?parseInt(_0x426189[0x2],0xa):_0x406329};}function p(_0x3bca22,_0x3a6b7c){const _0x13dc43=new(_0x397614())(),_0x3b8efb=_0x3bca22['plugins']['get']('ImageUtils'),_0x1843da=_0x3bca22['editing']['mapper']['toViewElement'](_0x3a6b7c),_0x5d5f58=_0x3b8efb['findViewImgElement'](_0x1843da),_0xb691a6=_0x3bca22['editing']['view']['domConverter']['viewToDom'](_0x5d5f58),_0x4a529a=_0x3a6b7c['getAttribute']('width'),_0x1c8bfd=_0x3a6b7c['getAttribute']('height'),_0x2ce8d1='image-processing';_0x3bca22['editing']['view']['change'](_0x1146b2=>{_0x1146b2['addClass'](_0x2ce8d1,_0x1843da),_0x1146b2['setStyle']('aspect-ratio',_0x4a529a+'/'+_0x1c8bfd,_0x5d5f58);}),_0x13dc43['listenTo'](_0xb691a6,'load',()=>{_0x13dc43['stopListening'](_0xb691a6,'load'),_0x3bca22['editing']['view']['change'](_0x34190e=>{_0x34190e['removeClass'](_0x2ce8d1,_0x1843da),_0x34190e['removeStyle']('aspect-ratio',_0x5d5f58);});});}function G(_0x14eec0){if(Array['isArray'](_0x14eec0)){const _0x1a6780=_0x14eec0['map'](G);return _0x42b6e4=>_0x1a6780['some'](_0x5cd76c=>_0x5cd76c(_0x42b6e4));}if('origin'==_0x14eec0){const _0x4b5b53=_0x4e845c['window']['location']['origin'];return _0x3c0a12=>new URL(_0x3c0a12,_0x4e845c['document']['baseURI'])['origin']==_0x4b5b53;}return'function'==typeof _0x14eec0?_0x14eec0:_0x14eec0 instanceof RegExp?_0x440139=>!(!_0x440139['match'](_0x14eec0)&&!_0x440139['replace'](/^https?:\/\//,'')['match'](_0x14eec0)):()=>!0x1;}function A(_0x69d7e7,_0xab19b1){return _0x365f8d(_0x69d7e7['target'])['includes'](_0xab19b1);}class n extends/* #__PURE__ -- @preserve */
24
- _0x1ad003(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2045ba,_0x48f74c,_0x1c6eaa){super(),this['_editor']=_0x2045ba,this['_editing']=_0x48f74c,this['_dialog']=_0x2045ba['plugins']['get'](_0x96891a),this['_api']=_0x48f74c['ctxElement']['getAPI'](),this['_type']=_0x1c6eaa,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:_0x1be74e,model:_0x493c42}=this['_editor'],_0xcdc851=_0x493c42['document']['selection']['getSelectedElement'](),_0x30ace7=_0xcdc851&&(_0xcdc851['is']('element','imageBlock')||_0xcdc851['is']('element','imageInline'));this['_formView']=new x(_0x1be74e,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x1b6e13,'title':_(_0x1be74e,this['_type'],_0x30ace7?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xfd697d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2f70ed=>!A(_0x2f70ed,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x262554}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x40d5c9=>{const _0x2b932f=_0x262554['length'];for(const _0xafe540 of _0x262554){const _0x106498=_0xafe540===_0x262554[_0x2b932f-0x1],{cdnUrl:_0xcf0409,fileInfo:_0x48dffd}=_0xafe540;if(!_0xcf0409||!_0x48dffd)continue;const {width:_0x39ba3d,height:_0x5344e2}=_0x48dffd['imageInfo'],_0x2668c0=S(_0xcf0409,_0x39ba3d,_0x5344e2),_0x4fce11=C(_0xcf0409,_0x2668c0['width']),_0x1badc7={'id':_0x48dffd['uuid'],'type':'image','attributes':{'imageDimension':_0x2668c0,..._0x4fce11}};this['_insertAsset'](_0x1badc7,_0x106498,_0x40d5c9);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x29ecec=>{'idle'===_0x29ecec['detail']['status']&&!_0x29ecec['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x3aebb1,_0x362719,_0x1a4ffa){const _0x33fcab=this['_editor']['model']['document']['selection'],_0x318c58=_0x33fcab['getSelectedElement'](),_0x3b6fec=!(!_0x318c58||!_0x318c58['is']('element','imageInline'));_0x1a4ffa['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x3aebb1,_0x3b6fec),_0x362719||_0x1a4ffa['setSelection'](_0x33fcab['getLastPosition']());}['_insertImage'](_0xc7684d,_0x1c14a1){const _0x59e36d=this['_editor'],{imageDimension:_0x3c37bf,imageFallbackUrl:_0x346cbe,imageSources:_0x13934c}=_0xc7684d['attributes'];_0x59e36d['execute']('insertImage',{'imageType':_0x1c14a1?'imageInline':null,'source':{'uploadcareImageId':_0xc7684d['id'],'src':_0x346cbe,'sources':_0x13934c,..._0x3c37bf}});}}class w extends _0xcf6c66{['_editing'];['_controller']=null;static get['requires'](){return[_0x96891a,o];}constructor(_0x4fedc3){super(_0x4fedc3),this['_editing']=_0x4fedc3['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x1c60bb){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x1c60bb);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x368d39,..._0x3127cc}){return _0x2a0f30(_0x368d39,_0x3127cc);}static['getInfo'](_0x20f885,_0x1f276e){return _0x3108df(_0x20f885,_0x1f276e);}}class f extends _0x1e119d{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x4101ba,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x10eac6=this['editor'];if(!!!_0x10eac6['config']['get']('uploadcare'))return;_0x10eac6['plugins']['get'](_0x4101ba)['createUploadAdapter']=_0x554871=>new k(_0x554871,_0x10eac6),_0x10eac6['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x676c61,{imageElement:_0x51f193,data:_0x5773fd})=>{_0x10eac6['model']['change'](_0x5d75a0=>{_0x5d75a0['setAttribute']('uploadcareImageId',_0x5773fd['uploadcareImageId'],_0x51f193);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x47606b,_0x54888f){this['loader']=_0x47606b,this['editor']=_0x54888f,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x683f98=await this['loader']['file'];return j['upload']({'file':_0x683f98,'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':_0x3d9b03=>{_0x3d9b03&&_0x3d9b03['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3d9b03['value']);}})['then'](async _0xce9867=>{const {imageFallbackUrl:_0x6fdf7,imageSources:_0xefc59e}=C(_0xce9867['cdnUrl'],_0xce9867['imageInfo']['width']);return{'uploadcareImageId':_0xce9867['uuid'],'default':_0x6fdf7,'sources':_0xefc59e};})['catch'](()=>{const _0x1ac139=t('Cannot\x20upload\x20file:')+('\x20'+_0x683f98['name']+'.');return Promise['reject'](_0x1ac139);});}['abort'](){this['controller']['abort']();}}class o extends _0x1e119d{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x96891a];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x54667b){super(_0x54667b),this['ucContextId']=_0x5a6318();}['init'](){const _0xa3b37=this['editor'];_0xa3b37['commands']['add']('uploadcare',new w(_0xa3b37));}['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 _0xb25641=_0x4e845c['document']['querySelector']('input[uploadcare-file-input]');_0xb25641&&_0xb25641['remove']();}),async function(_0x2c9362){const _0x360921=_0x766812([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]),_0x2a2d06=0x535f8c3a,_0xb55258=0x53580bf2^_0x2a2d06,_0x42aa90=window[_0x766812([0x44,0x61,0x74,0x65])][_0x766812([0x6e,0x6f,0x77])](),_0x2026ef=_0x2c9362[_0x766812([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2eeb1e=new window[(_0x766812([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c5f39=>{_0x2026ef[_0x766812([0x6f,0x6e,0x63,0x65])](_0x766812([0x72,0x65,0x61,0x64,0x79]),_0x4c5f39);}),_0x2a0083={[_0x766812([0x6b,0x74,0x79])]:_0x766812([0x45,0x43]),[_0x766812([0x75,0x73,0x65])]:_0x766812([0x73,0x69,0x67]),[_0x766812([0x63,0x72,0x76])]:_0x766812([0x50,0x2d,0x32,0x35,0x36]),[_0x766812([0x78])]:_0x766812([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]),[_0x766812([0x79])]:_0x766812([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]),[_0x766812([0x61,0x6c,0x67])]:_0x766812([0x45,0x53,0x32,0x35,0x36])},_0x2a70c9=_0x2026ef[_0x766812([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x766812([0x67,0x65,0x74])](_0x766812([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3968ea(){let _0x1c5033,_0x2f7ce1=null,_0x2ed6f3=null;try{if(_0x2a70c9==_0x766812([0x47,0x50,0x4c]))return _0x766812([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1c5033=_0x1e59f5(),!_0x1c5033)return _0x766812([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1c5033[_0x766812([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2ed6f3=_0x2916b6(_0x1c5033[_0x766812([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1c5033[_0x766812([0x6a,0x74,0x69])])),await _0x5b0f97()?_0x5a7170()?_0x43202a()?_0x766812([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3f5312()?(_0x1c5033[_0x766812([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x766812([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2f7ce1=_0x46a6b9(_0x766812([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5aeb20()):_0x766812([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x766812([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x766812([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x766812([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x43202a(){const _0x50127f=[_0x766812([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x766812([0x74,0x72,0x69,0x61,0x6c])][_0x766812([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c5033[_0x766812([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x42aa90/0x3e8:0xe10*_0xb55258;return _0x1c5033[_0x766812([0x65,0x78,0x70])]<_0x50127f;}function _0x5a7170(){const _0x3504a7=_0x1c5033[_0x766812([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3504a7&&(!!_0x3504a7[_0x766812([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x766812([0x2a]))||!!_0x3504a7[_0x766812([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x766812([0x55,0x50,0x4c,0x43])));}function _0x3f5312(){const _0x10201f=_0x1c5033[_0x766812([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x10201f||0x0==_0x10201f[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1a79eb}=new URL(window[_0x766812([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x10201f[_0x766812([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1a79eb))return!0x0;const _0x342a8d=_0x1a79eb[_0x766812([0x73,0x70,0x6c,0x69,0x74])](_0x766812([0x2e]));return _0x10201f[_0x766812([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xff5b7b=>_0xff5b7b[_0x766812([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x766812([0x2a])))[_0x766812([0x6d,0x61,0x70])](_0x5bc006=>_0x5bc006[_0x766812([0x73,0x70,0x6c,0x69,0x74])](_0x766812([0x2e])))[_0x766812([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x49456f=>_0x49456f[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x342a8d[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x766812([0x6d,0x61,0x70])](_0x5aa4f8=>Array(_0x342a8d[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5aa4f8[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x766812([0x66,0x69,0x6c,0x6c])](_0x5aa4f8[0x0]===_0x766812([0x2a])?_0x766812([0x2a]):'')[_0x766812([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5aa4f8))[_0x766812([0x73,0x6f,0x6d,0x65])](_0x4984fc=>_0x342a8d[_0x766812([0x65,0x76,0x65,0x72,0x79])]((_0x4ced8f,_0x5a9719)=>_0x4984fc[_0x5a9719]===_0x4ced8f||_0x4984fc[_0x5a9719]===_0x766812([0x2a])));}function _0x5aeb20(){return _0x2f7ce1&&_0x2ed6f3?new window[(_0x766812([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2943b5,_0xbd2eb6)=>{_0x2f7ce1[_0x766812([0x74,0x68,0x65,0x6e])](_0x2943b5,_0xbd2eb6),_0x2ed6f3[_0x766812([0x74,0x68,0x65,0x6e])](_0x1bcafe=>{_0x1bcafe!=_0x766812([0x56,0x61,0x6c,0x69,0x64])&&_0x2943b5(_0x1bcafe);},_0xbd2eb6);}):_0x2f7ce1||_0x2ed6f3||_0x766812([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2916b6(_0x5d17d4,_0x3d0d5e){return new window[(_0x766812([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xfd3c74=>{if(_0x1bf214())return _0xfd3c74(_0x766812([0x56,0x61,0x6c,0x69,0x64]));_0x11828c(),_0x2026ef[_0x766812([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x766812([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x130e6a=!0x1;const _0x27ddf0=_0x5a6318();function _0x4e7d45(_0x45f1dc){return!!_0x45f1dc&&(typeof _0x45f1dc===_0x766812([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x45f1dc===_0x766812([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x45f1dc[_0x766812([0x74,0x68,0x65,0x6e])]===_0x766812([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x45f1dc[_0x766812([0x63,0x61,0x74,0x63,0x68])]===_0x766812([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1c8120(_0x158bb2){_0x3f1ac8(_0x158bb2)[_0x766812([0x74,0x68,0x65,0x6e])](_0x2463e9=>{if(!_0x2463e9||_0x2463e9[_0x766812([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x766812([0x6f,0x6b]))return _0x766812([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x541889(_0x269075(_0x27ddf0+_0x3d0d5e))!=_0x2463e9[_0x766812([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x766812([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x766812([0x56,0x61,0x6c,0x69,0x64]);})[_0x766812([0x74,0x68,0x65,0x6e])](_0x4282a9=>(_0x11745a(),_0x4282a9),()=>{const _0x571bd0=_0x31a42d();return null==_0x571bd0?(_0x11745a(),_0x766812([0x56,0x61,0x6c,0x69,0x64])):_0x766812(_0x42aa90-_0x571bd0>(0x7753083a^_0x2a2d06)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x766812([0x74,0x68,0x65,0x6e])](_0xfd3c74)[_0x766812([0x63,0x61,0x74,0x63,0x68])](()=>{_0xfd3c74(_0x766812([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5564c2=0x536962ba^_0x2a2d06;function _0x11745a(){const _0x29628c=_0x766812([0x6c,0x6c,0x63,0x74,0x2d])+_0x541889(_0x269075(_0x5d17d4)),_0x6d5fb2=_0x3e48a3(_0x541889(window[_0x766812([0x4d,0x61,0x74,0x68])][_0x766812([0x63,0x65,0x69,0x6c])](_0x42aa90/_0x5564c2)));window[_0x766812([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x766812([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x29628c,_0x6d5fb2);}function _0x31a42d(){const _0x11b81c=_0x766812([0x6c,0x6c,0x63,0x74,0x2d])+_0x541889(_0x269075(_0x5d17d4)),_0x316bee=window[_0x766812([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x766812([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x11b81c);return _0x316bee?window[_0x766812([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3e48a3(_0x316bee),0x10)*_0x5564c2:null;}function _0x3f1ac8(_0xe94cb0){return new window[(_0x766812([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x340793,_0x56f44d)=>{_0xe94cb0[_0x766812([0x74,0x68,0x65,0x6e])](_0x340793,_0x56f44d),window[_0x766812([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x56f44d,0x535e58fa^_0x2a2d06);});}}_0x2026ef[_0x766812([0x6f,0x6e])](_0x766812([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x6559c,_0x4177c6)=>{if(_0x4177c6[0x0]!=_0x5d17d4)return _0xfd3c74(_0x766812([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4177c6[0x1]={..._0x4177c6[0x1],[_0x766812([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x27ddf0};},{[_0x766812([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x766812([0x68,0x69,0x67,0x68])}),_0x2026ef[_0x766812([0x6f,0x6e])](_0x766812([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2a28bf=>{_0x4e7d45(_0x2a28bf[_0x766812([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x130e6a=!0x0,_0x1c8120(_0x2a28bf[_0x766812([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x766812([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x766812([0x6c,0x6f,0x77])}),_0x2eeb1e[_0x766812([0x74,0x68,0x65,0x6e])](()=>{_0x130e6a||_0xfd3c74(_0x766812([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1bf214(){return _0x2026ef[_0x766812([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x766812([0x76,0x69,0x65,0x77])][_0x766812([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x766812([0x61,0x75,0x74,0x6f]);}function _0x11828c(){_0x2026ef[_0x766812([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x766812([0x76,0x69,0x65,0x77])][_0x766812([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x766812([0x61,0x75,0x74,0x6f]);}}function _0x46a6b9(_0xe890af){const _0x12e21d=[new window[(_0x766812([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40ea25=>setTimeout(_0x40ea25,0x5356b2f6^_0x2a2d06)),_0x2eeb1e[_0x766812([0x74,0x68,0x65,0x6e])](()=>new window[(_0x766812([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x173a25=>{let _0x2cc91c=0x0;_0x2026ef[_0x766812([0x6d,0x6f,0x64,0x65,0x6c])][_0x766812([0x6f,0x6e])](_0x766812([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xd109eb,_0x1c7870)=>{_0x1c7870[0x0][_0x766812([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2cc91c++,_0x2cc91c==(0x535f89d2^_0x2a2d06)&&(_0x173a25(),_0xd109eb[_0x766812([0x6f,0x66,0x66])]());});}))];return window[_0x766812([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x766812([0x72,0x61,0x63,0x65])](_0x12e21d)[_0x766812([0x74,0x68,0x65,0x6e])](()=>_0xe890af);}async function _0x302df8(){await _0x2eeb1e,_0x2026ef[_0x766812([0x6d,0x6f,0x64,0x65,0x6c])][_0x766812([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x385d7a,_0x2026ef[_0x766812([0x6d,0x6f,0x64,0x65,0x6c])][_0x766812([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x385d7a,_0x2026ef[_0x766812([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x766812([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x320615(_0x148109){const _0x207d2e=_0x3573e1();_0x2026ef[_0x207d2e]=_0x766812([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x148109,_0x148109!=_0x766812([0x56,0x61,0x6c,0x69,0x64])&&_0x302df8();}function _0x3573e1(){const _0x398edf=window[_0x766812([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x766812([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x766812([0x6e,0x6f,0x77])]())[_0x766812([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x766812([0x2e]),'');let _0xd5a7c3=_0x766812([0x68]);for(let _0x2c1c19=0x0;_0x2c1c19<_0x398edf[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2c1c19+=0x2){let _0x48df45=window[_0x766812([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x398edf[_0x766812([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2c1c19,_0x2c1c19+0x2));_0x48df45>=_0x360921[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x48df45-=_0x360921[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xd5a7c3+=_0x360921[_0x48df45];}return _0xd5a7c3;}function _0x1e59f5(){const _0x325433=_0x2a70c9[_0x766812([0x73,0x70,0x6c,0x69,0x74])](_0x766812([0x2e]));if(0x3!=_0x325433[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1d8d43(_0x325433[0x1]);function _0x1d8d43(_0x4a3e64){const _0x117b2d=_0x590cdb(_0x4a3e64);return _0x117b2d&&_0x5847b0()?_0x117b2d:null;function _0x5847b0(){const _0x145070=_0x117b2d[_0x766812([0x6a,0x74,0x69])],_0x5c337c=window[_0x766812([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x145070[_0x766812([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x145070[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2fcca3={..._0x117b2d,[_0x766812([0x6a,0x74,0x69])]:_0x145070[_0x766812([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x145070[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2fcca3[_0x766812([0x76,0x63])],_0x269075(_0x2fcca3)==_0x5c337c;}}}async function _0x5b0f97(){let _0x4f0041=!0x0;try{const _0x769c45=_0x2a70c9[_0x766812([0x73,0x70,0x6c,0x69,0x74])](_0x766812([0x2e])),[_0x1a0538,_0x44352a,_0x253962]=_0x769c45;return _0x354738(_0x1a0538),await _0x598d4f(_0x1a0538,_0x44352a,_0x253962),_0x4f0041;}catch{return!0x1;}function _0x354738(_0x5e25ba){const _0x116600=_0x590cdb(_0x5e25ba);_0x116600&&_0x116600[_0x766812([0x61,0x6c,0x67])]==_0x766812([0x45,0x53,0x32,0x35,0x36])||(_0x4f0041=!0x1);}async function _0x598d4f(_0x58a8c1,_0x386f5b,_0x2cb74c){const _0x1703b2=window[_0x766812([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x766812([0x66,0x72,0x6f,0x6d])](_0x4afc08(_0x2cb74c),_0xacbe87=>_0xacbe87[_0x766812([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x9ef907=new window[(_0x766812([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x766812([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x58a8c1+_0x766812([0x2e])+_0x386f5b),_0x2c09f0=window[_0x766812([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x766812([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2c09f0)return;const _0x26bd5b=await _0x2c09f0[_0x766812([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x766812([0x6a,0x77,0x6b]),_0x2a0083,{[_0x766812([0x6e,0x61,0x6d,0x65])]:_0x766812([0x45,0x43,0x44,0x53,0x41]),[_0x766812([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x766812([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x766812([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2c09f0[_0x766812([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x766812([0x6e,0x61,0x6d,0x65])]:_0x766812([0x45,0x43,0x44,0x53,0x41]),[_0x766812([0x68,0x61,0x73,0x68])]:{[_0x766812([0x6e,0x61,0x6d,0x65])]:_0x766812([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x26bd5b,_0x1703b2,_0x9ef907)||(_0x4f0041=!0x1);}}function _0x590cdb(_0x647d09){return _0x647d09[_0x766812([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x766812([0x65,0x79]))?JSON[_0x766812([0x70,0x61,0x72,0x73,0x65])](_0x4afc08(_0x647d09)):null;}function _0x4afc08(_0x3229ab){return window[_0x766812([0x61,0x74,0x6f,0x62])](_0x3229ab[_0x766812([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x766812([0x2b]))[_0x766812([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x766812([0x2f])));}function _0x269075(_0x33e74c){let _0x40e0a6=0x1505;function _0x580981(_0x18cbbc){for(let _0x16a1b0=0x0;_0x16a1b0<_0x18cbbc[_0x766812([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x16a1b0++){const _0x3b464d=_0x18cbbc[_0x766812([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x16a1b0);_0x40e0a6=(_0x40e0a6<<0x5)+_0x40e0a6+_0x3b464d,_0x40e0a6&=_0x40e0a6;}}function _0x57536f(_0x55667c){Array[_0x766812([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x55667c)?_0x55667c[_0x766812([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x57536f):_0x55667c&&typeof _0x55667c==_0x766812([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x766812([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x55667c)[_0x766812([0x73,0x6f,0x72,0x74])]()[_0x766812([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4c6d18,_0x44ebfe])=>{_0x580981(_0x4c6d18),_0x57536f(_0x44ebfe);}):_0x580981(window[_0x766812([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x55667c));}return _0x57536f(_0x33e74c),_0x40e0a6>>>0x0;}function _0x541889(_0x201c11){return _0x201c11[_0x766812([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x766812([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x766812([0x30]));}function _0x3e48a3(_0x14a41d){return _0x14a41d[_0x766812([0x73,0x70,0x6c,0x69,0x74])]('')[_0x766812([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x766812([0x6a,0x6f,0x69,0x6e])]('');}function _0x385d7a(){}function _0x766812(_0x25048b){return _0x25048b['map'](_0x551d5f=>String['fromCharCode'](_0x551d5f))['join']('');}_0x320615(await _0x3968ea());}(this);}['_initSchema'](){const _0x1794db=this['editor']['model']['schema'];_0x1794db['isRegistered']('imageBlock')&&_0x1794db['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x1794db['isRegistered']('imageInline')&&_0x1794db['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x3b6f4d=this['editor'];_0x3b6f4d['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x3b6f4d['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x160068=>_0x160068['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3a6871=_0x3b6f4d['commands']['get']('replaceImageSource');_0x3a6871&&this['listenTo'](_0x3a6871,'cleanupImage',(_0x2d1fe0,[_0x1b1dec,_0x275a69])=>{_0x1b1dec['removeAttribute']('uploadcareImageId',_0x275a69);});}['_initConfig'](){const _0x3e365d=this['editor']['config']['get']('uploadcare.uploader')||{},_0x5d0fd4=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x14d4e6(_0x4e845c['document'],'uc-config',{..._0x3e365d,'pubkey':_0x5d0fd4,'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']=_0x52d03e=>{if('closeMax'==_0x52d03e)return'#uc-icon-arrow-down';},_0x4e845c['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x14d4e6(_0x4e845c['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x4e845c['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x2d1dc3=this['editor']['commands']['get']('insertImage');_0x2d1dc3&&this['listenTo'](_0x2d1dc3,'execute',()=>{const _0x1ee216=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1ee216&&_0x1ee216['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1ee216);});});const _0x401242=this['editor']['commands']['get']('uploadcareImageReplace');_0x401242&&this['listenTo'](_0x401242,'execute',()=>{const _0x24a43d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x24a43d&&_0x24a43d['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x24a43d);});});}}class tt extends _0x1e119d{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24c08e){super(_0x24c08e),_0x24c08e['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x5259ab['defineComponents'](_0x5259ab),this['_defineLocale']();}['_defineLocale'](){const _0x4a97a5=this['editor']['config']['get']('uploadcare.locale'),_0x499e51=this['editor']['locale']['contentLanguage'];_0x4a97a5&&_0x5259ab['defineLocale'](_0x499e51,_0x4a97a5);}}class ii extends _0x41c584{constructor(_0x19b850){super(_0x19b850);const t=_0x19b850['t'],_0x56278b=this['bindTemplate'],_0x28c8f8=new _0x457457();_0x28c8f8['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':[_0x28c8f8,{'text':_0x56278b['to']('imageUploadProgress',_0x43d90b=>t('Loading\x20image...')+'\x20('+(_0x43d90b||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 _0x41c584{constructor(_0x1850f4){super(_0x1850f4);const t=_0x1850f4['t'];this['set']('errorType',null);const _0x25cd19=new _0x4df92e(_0x1850f4);_0x25cd19['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x25cd19['withText']=!0x0,_0x25cd19['class']='ck-button-action',_0x25cd19['on']('execute',()=>{this['fire']('retry');}),_0x25cd19['bind']('isVisible')['to'](this,'errorType',_0x53e63d=>'NotFound'!==_0x53e63d);const _0x44449f=new _0x9419a6();_0x44449f['content']=_0x2a8b34,_0x44449f['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x2b7074=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':[_0x44449f,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x2b7074['to']('errorType',_0xc6c14b=>t('NotFound'!==_0xc6c14b?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x25cd19]},{'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 _0x41c584{constructor(_0x3d7a5d,_0x14f445){super(_0x3d7a5d);const _0x1f4cf5=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x14f445,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x1f4cf5['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2a1200,_0x11cfc5,_0x5204a9){super(_0x2a1200),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x2a1200),this['_errorView']=new ti(_0x2a1200),this['_editingView']=new ei(_0x2a1200,_0x5204a9),this['_focusableView']=new _0x41c584(_0x2a1200),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x11cfc5),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'],_0xeb016b=>{this['_addUploadcareImageEditorListeners'](_0xeb016b);});}),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'](_0x30f7ce,_0x432140){const _0x264c17='uc-cloud-image-editor',_0x373db3=_0x30f7ce['querySelector'](_0x264c17);if(_0x373db3)return _0x432140(_0x373db3);const _0x3d33b0=new MutationObserver(_0x3d8b00=>{const _0x296369=_0x3d8b00['filter'](_0x44c05b=>_0x44c05b['target']===_0x30f7ce&&_0x44c05b['addedNodes']['length']>0x0&&_0x44c05b['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x264c17);_0x296369['length']&&(_0x3d33b0['disconnect'](),_0x432140(_0x296369[0x0]['addedNodes'][0x0]));});_0x3d33b0['observe'](_0x30f7ce,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x39fff5){_0x39fff5['addEventListener']('apply',_0xbe8b14=>{this['fire']('apply',{'imageSrc':_0xbe8b14['detail']['cdnUrl']});}),_0x39fff5['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
25
- _0x1ad003(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x98e252,_0x3f48ce,_0x1c64cd){super(),this['_editor']=_0x98e252,this['_dialog']=_0x3f48ce,this['_imageElement']=_0x1c64cd,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 _0x2bd2cd=this['_imageElement'],_0xf967b0=_0x2bd2cd['getAttribute']('uploadcareImageId'),_0x2bbf2d=_0x2bd2cd['getAttribute']('src');if(_0xf967b0)await this['_loadImageInfo'](_0xf967b0,_0x2bbf2d);else{if(this['_imageCache']['has'](_0x2bbf2d)){const _0x5989bf=this['_imageCache']['get'](_0x2bbf2d);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5989bf['url'],this['imageDimension']=_0x5989bf['dimension'],this['imageId']=_0x5989bf['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0xbffb33}=this['_editor'],t=_0xbffb33['t'],_0x51408b=new X(_0xbffb33,this['imageStatus'],this['_attributes']);_0x51408b['bind']('status')['to'](this,'imageStatus'),_0x51408b['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x51408b['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x51408b['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x51408b,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x34de50,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x51408b,'position':_0xfd697d['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x51408b['focus']();},'onHide':()=>{_0x51408b['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x9b2e2b=>!A(_0x9b2e2b,_0x51408b['element'])}});}['_loadImageInfo'](_0x3e3d3a,_0x172060){return j['getInfo'](_0x3e3d3a,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x1e5129=>{const {width:_0x44fef0,height:_0x5a4349}=_0x1e5129['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x172060,this['imageDimension']={'width':_0x44fef0,'height':_0x5a4349},this['imageId']=_0x3e3d3a;})['catch'](_0x57a67d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x57a67d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x509dab,_0x1d2745){return this['_getImageAsFile'](_0x509dab)['then'](_0x57c6f0=>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':_0x1d2745['signal'],'file':_0x57c6f0,'onProgress':_0x2bc116=>{_0x2bc116&&_0x2bc116['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2bc116['value']));}}))['then'](_0x4baf63=>{const {width:_0x303890,height:_0x596b05}=_0x4baf63['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4baf63['cdnUrl'],this['imageDimension']={'width':_0x303890,'height':_0x596b05},this['imageId']=_0x4baf63['uuid'],this['imageUploadProgress']=null;const _0x54de18=_0x509dab['getAttribute']('src');this['_imageCache']['set'](_0x54de18,{'id':_0x4baf63['uuid'],'url':_0x4baf63['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x30dd72=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x30dd72['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x6d95ed,_0x2d9f68){_0x6d95ed['on']('apply',(_0x2d049b,_0x1e14d5)=>{this['_replaceImage'](_0x2d9f68,_0x1e14d5['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x6d95ed['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x6d95ed['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x3b4d63,_0x5d8327,_0xd941){const _0x62997b=this['_editor'],{width:_0x4ad45e,height:_0x29608d}=S(_0x5d8327,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x41cc4c,imageSources:_0x7257a}=C(_0x5d8327,_0x4ad45e);_0x62997b['model']['change'](_0x188f9a=>{if('$graveyard'===_0x3b4d63['root']['rootName']){_0x62997b['execute']('insertImage',{'imageType':_0x3b4d63['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x3b4d63['getAttributes']()),'uploadcareImageId':_0xd941,'src':_0x41cc4c,'sources':_0x7257a,'width':_0x4ad45e,'height':_0x29608d}});const _0x4cb510=_0x3b4d63['getChildren']();_0x3b4d63=_0x62997b['model']['document']['selection']['getSelectedElement']();for(const _0x1b7d34 of _0x4cb510)_0x188f9a['append'](_0x188f9a['cloneElement'](_0x1b7d34),_0x3b4d63);}else _0x188f9a['setSelection'](_0x3b4d63,'on'),_0x62997b['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x3b4d63['getAttributes']()),'uploadcareImageId':_0xd941,'src':_0x41cc4c,'sources':_0x7257a,'width':_0x4ad45e,'height':_0x29608d},_0x3b4d63);_0x188f9a['setSelection'](_0x3b4d63,'on');});}async['_getImageAsFile'](_0x2943f5){const _0x1fb390=_0x4e845c['window'],_0x4fb440=_0x4e845c['document']['location']['href'],_0x3ade95=new _0x1fb390['URL'](_0x2943f5['getAttribute']('src'),_0x4fb440);if('data:'===_0x3ade95['protocol']){const _0xe341c2=_0x3ade95['href']['split'](','),_0x119b55=_0xe341c2[0x0]['match'](/:(.*?);/)[0x1],_0xd9f00b=_0x119b55['split']('/')[0x1],_0x211490=_0x1fb390['atob'](_0xe341c2[_0xe341c2['length']-0x1]);let _0x1d13e5=_0x211490['length'];const _0xd0bc98=new _0x1fb390['Uint8Array'](_0x1d13e5);for(;_0x1d13e5--;)_0xd0bc98[_0x1d13e5]=_0x211490['charCodeAt'](_0x1d13e5);return new _0x1fb390['File']([_0xd0bc98],'image.'+_0xd9f00b,{'type':_0x119b55});}const _0x4cfcb1=_0x3ade95['href']['split']('/'),_0x56654f=_0x4cfcb1[_0x4cfcb1['length']-0x1],_0x2362f9=_0x56654f['split']('.')[0x1];return _0x1fb390['fetch'](_0x3ade95['href'])['then'](_0x46d343=>_0x46d343['clone']()['blob']())['then'](_0x486f61=>new _0x1fb390['File']([_0x486f61],_0x56654f,{'type':'image/'+_0x2362f9}));}}class O extends _0xcf6c66{['imageEditController'];static get['requires'](){return[_0x96891a];}['_isEditable'];constructor(_0x452577){super(_0x452577),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x283658){const _0x3f0ab5=G(_0x283658);return _0x1d43b4=>!(!_0x1d43b4||!_0x1d43b4['is']('element','imageBlock')&&!_0x1d43b4['is']('element','imageInline'))&&(!!_0x1d43b4['hasAttribute']('uploadcareImageId')||!!_0x1d43b4['hasAttribute']('src')&&_0x3f0ab5(_0x1d43b4['getAttribute']('src')));}(_0x452577['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x58ae16=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x58ae16);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x1b25bc=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1b25bc&&(_0x1b25bc['is']('element','imageBlock')||_0x1b25bc['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x96891a),_0x1b25bc),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0xcf6c66{['refresh'](){const _0xd8373f=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0xd8373f&&(_0xd8373f['is']('element','imageBlock')||_0xd8373f['is']('element','imageInline')));}['execute'](_0x2a9183){const _0x1e1901=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x318df9=>{_0x318df9['setAttributes'](_0x2a9183,_0x1e1901),_0x318df9['removeAttribute']('srcset',_0x1e1901),_0x318df9['removeAttribute']('sizes',_0x1e1901);});}}class m extends _0x1e119d{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x4ddc2f,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4ab06e}=this;_0x4ab06e['commands']['add']('uploadcareImageEdit',new O(_0x4ab06e)),_0x4ab06e['commands']['add']('uploadcareImageReplace',new R(_0x4ab06e));}}class g extends _0x1e119d{['_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 _0x16ead6=this['editor'];_0x16ead6['ui']['componentFactory']['add']('uploadcareImageEdit',_0x2e7c2b=>{const _0x1ed58a=_0x16ead6['commands']['get']('uploadcareImageEdit'),_0x4864ef=new _0x4df92e(_0x2e7c2b),t=_0x2e7c2b['t'];return _0x4864ef['set']({'icon':_0x34de50,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x4864ef['bind']('isEnabled')['to'](_0x1ed58a),_0x4864ef['bind']('isOn')['to'](_0x1ed58a,'isActive'),this['listenTo'](_0x4864ef,'execute',()=>{_0x16ead6['execute']('uploadcareImageEdit'),_0x16ead6['editing']['view']['focus']();}),_0x4864ef;}),this['_initConfig']();}['_initConfig'](){const _0x2499a5=_0x14d4e6(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x2499a5),this['listenTo'](this['editor'],'destroy',()=>{_0x2499a5['remove']();});}}class et extends _0x1e119d{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
23
+ import{Plugin as _0x1a8265,Command as _0x50fcb7}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4e0182,IconGooglePhotos as _0x270cfd,IconGoogleDrive as _0x4c41ed,IconFacebook as _0xa50d41,IconDropbox as _0x1649ed,IconUploadcareLink as _0x1bd2f5,IconUploadcareImageUpload as _0x573d88,IconError as _0x18ad94,IconUploadcareImageEdit as _0x439420}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1cf473,MenuBarMenuListItemButtonView as _0x5891f7,View as _0x281ed3,FocusCycler as _0x33eb03,Dialog as _0x48281d,DialogViewPosition as _0x26b981,SpinnerView as _0x1ed863,IconView as _0x1cfb12,Notification as _0xc77335}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x1f72be,DomEmitterMixin as _0x4fe6ed,global as _0x353e91,getAncestors as _0x1fbdc0,ObservableMixin as _0xdd4748,uid as _0x6e08c5,createElement as _0x39a7c7}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x5cf537}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x322f8d,info as _0x4afe4b}from'@uploadcare/upload-client';import*as _0x3507d0 from'@uploadcare/file-uploader';var i=function(_0x593a04){return _0x593a04['Local']='local',_0x593a04['URL']='url',_0x593a04['Dropbox']='dropbox',_0x593a04['GDrive']='gdrive',_0x593a04['Facebook']='facebook',_0x593a04['GPhotos']='gphotos',_0x593a04['OneDrive']='onedrive',_0x593a04;}({});function _(_0x18c9b0,_0x498667,_0x1c48a7){const t=_0x18c9b0['t'],_0x442154=_0x18c9b0['t'];switch(_0x498667){case i['Local']:return{'text':_0x442154('Insert'===_0x1c48a7?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x442154('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x1c48a7?_0x442154('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x442154('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x1c48a7?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x1c48a7?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x1c48a7?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x1c48a7?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x1c48a7?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x498667;}}class e extends _0x1a8265{['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 _0x4e9ff0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xdfa28e;for(const _0x59faea in _0x4e9ff0){const _0x4191f3=_0x59faea,_0x5949e1=_0x4e9ff0[_0x4191f3];if('uploadcareLicenseKeyValid'==_0x5949e1||'uploadcareLicenseKeyInvalid'==_0x5949e1||'uploadcareLicenseKeyExpired'==_0x5949e1||'uploadcareLicenseKeyDomainLimit'==_0x5949e1||'uploadcareLicenseKeyNotAllowed'==_0x5949e1||'uploadcareLicenseKeyEvaluationLimit'==_0x5949e1||'uploadcareLicenseKeyUsageLimit'==_0x5949e1){delete _0x4e9ff0[_0x4191f3],_0xdfa28e=_0x5949e1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0xdfa28e&&_0x4e9ff0['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0xdfa28e&&_0x4e9ff0['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0xdfa28e&&_0x4e9ff0['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0xdfa28e&&_0x4e9ff0['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0xdfa28e&&_0x4e9ff0['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0xdfa28e&&_0x4e9ff0['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x5045bb}=this,_0x3948b6=_0x5045bb['commands']['get']('uploadcare');if(!_0x3948b6)return;const _0x22cac0=this['_normalizeConfigSourceList'](_0x5045bb['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x3aa698,_0x53f178)=>{const _0x4e4484=this['_getIntegrationKey'](_0x53f178['type']);return _0x3aa698[_0x4e4484]||(_0x3aa698[_0x4e4484]=[]),_0x3aa698[_0x4e4484]['push'](_0x53f178),_0x3aa698;},{});_0x5045bb['plugins']['has']('ImageInsertUI')&&_0x5045bb['commands']['get']('uploadcare')&&Object['entries'](_0x22cac0)['forEach'](([_0x99608e,_0x7c068a])=>{_0x5045bb['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x99608e,'observable':()=>_0x3948b6,'buttonViewCreator':()=>this['_createToolbarButton'](_0x7c068a),'formViewCreator':()=>this['_createDropdownButtons'](_0x7c068a),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x7c068a),'override':'assetManager'!==_0x99608e});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x2fd197){const {locale:_0x365107}=this['editor'];return _0x2fd197['map'](_0x31842a=>{const _0x5d8368=_(_0x365107,_0x31842a,'Insert');switch(_0x31842a){case i['Local']:return{'icon':_0x573d88,'type':i['Local'],..._0x5d8368};case i['URL']:return{'icon':_0x1bd2f5,'type':i['URL'],..._0x5d8368};case i['Dropbox']:return{'icon':_0x1649ed,'type':i['Dropbox'],..._0x5d8368};case i['Facebook']:return{'icon':_0xa50d41,'type':i['Facebook'],..._0x5d8368};case i['GDrive']:return{'icon':_0x4c41ed,'type':i['GDrive'],..._0x5d8368};case i['GPhotos']:return{'icon':_0x270cfd,'type':i['GPhotos'],..._0x5d8368};case i['OneDrive']:return{'icon':_0x4e0182,'type':i['OneDrive'],..._0x5d8368};}});}['_getIntegrationKey'](_0x437dcb){switch(_0x437dcb){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x117d55,_0x3dfa2c){const _0x335891=this['editor'],_0xdc208e=new _0x117d55(_0x335891['locale']),_0x245079=_0x335891['commands']['get']('uploadcare');return _0xdc208e['bind']('isEnabled')['to'](_0x245079),_0xdc208e['on']('execute',()=>{_0x245079['execute'](_0x3dfa2c);}),_0xdc208e;}['_createToolbarButton'](_0x402079){const {locale:_0x3072ef}=this['editor'],_0xbe598c=this['editor']['plugins']['get']('ImageInsertUI'),_0x47440e=_0x402079[0x0],_0x2e968d=this['_createButton'](_0x1cf473,_0x47440e['type']);return _0x2e968d['icon']=_0x47440e['icon'],_0x2e968d['bind']('label')['to'](_0xbe598c,'isImageSelected',_0x2b0abe=>_(_0x3072ef,_0x47440e['type'],_0x2b0abe?'Replace':'Insert')['text']),_0x2e968d['tooltip']=!0x0,_0x2e968d;}['_createDropdownButtons'](_0x3ab87c){const {locale:_0x4fb805}=this['editor'],_0x208ba3=this['editor']['plugins']['get']('ImageInsertUI');return _0x3ab87c['map'](_0x49a2c6=>{const _0x10bb2c=this['_createButton'](_0x1cf473,_0x49a2c6['type']);return _0x10bb2c['withText']=!0x0,_0x10bb2c['icon']=_0x49a2c6['icon'],_0x10bb2c['bind']('label')['to'](_0x208ba3,'isImageSelected',_0x556643=>_(_0x4fb805,_0x49a2c6['type'],_0x556643?'Replace':'Insert')['text']),_0x10bb2c;});}['_createMenuBarButtons'](_0x3cd673){return _0x3cd673['map'](_0xf9e6e=>{const _0x380c21=this['_createButton'](_0x5891f7,_0xf9e6e['type']);return _0x380c21['icon']=_0xf9e6e['icon'],_0x380c21['label']=_0xf9e6e['shortText'],_0x380c21;});}}class F extends _0x281ed3{['focusTracker'];['focusCycler'];constructor(_0x315dbd){super(_0x315dbd),this['focusTracker']=new _0x1f72be(),this['focusCycler']=new _0x33eb03({'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(_0x518230,_0x4cce90){super(_0x518230),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-'+_0x4cce90}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x2a2f93,_0x3a57f6){const _0x3568df=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x42a966=>_0x42a966<=_0x3a57f6)['map'](_0xe8e649=>_0x2a2f93['replace'](/\/$/,'')+'/-/resize/'+_0xe8e649+'x/\x20'+_0xe8e649+'w');return{'imageFallbackUrl':_0x2a2f93,'imageSources':[{'srcset':_0x3568df['join'](',\x20'),'sizes':'(max-width:\x20'+_0x3a57f6+'px)\x20100vw,\x20'+_0x3a57f6+'px','type':'image/webp'}]};}function S(_0x4d2656,_0x247de9,_0x114f5a){const _0x514e59=_0x4d2656['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x514e59?parseInt(_0x514e59[0x1],0xa):_0x247de9,'height':_0x514e59?parseInt(_0x514e59[0x2],0xa):_0x114f5a};}function p(_0x2eb62a,_0x2e4348){const _0x3df36b=new(_0x4fe6ed())(),_0xa73ca6=_0x2eb62a['plugins']['get']('ImageUtils'),_0x74f222=_0x2eb62a['editing']['mapper']['toViewElement'](_0x2e4348),_0x47e4d4=_0xa73ca6['findViewImgElement'](_0x74f222),_0x20feeb=_0x2eb62a['editing']['view']['domConverter']['viewToDom'](_0x47e4d4),_0x18d54c=_0x2e4348['getAttribute']('width'),_0x34b3ee=_0x2e4348['getAttribute']('height'),_0xc727ad='image-processing';_0x2eb62a['editing']['view']['change'](_0x1fa185=>{_0x1fa185['addClass'](_0xc727ad,_0x74f222),_0x1fa185['setStyle']('aspect-ratio',_0x18d54c+'/'+_0x34b3ee,_0x47e4d4);}),_0x3df36b['listenTo'](_0x20feeb,'load',()=>{_0x3df36b['stopListening'](_0x20feeb,'load'),_0x2eb62a['editing']['view']['change'](_0x3d6beb=>{_0x3d6beb['removeClass'](_0xc727ad,_0x74f222),_0x3d6beb['removeStyle']('aspect-ratio',_0x47e4d4);});});}function z(_0x3b1a2d){if(Array['isArray'](_0x3b1a2d)){const _0x230458=_0x3b1a2d['map'](z);return _0x3f28c8=>_0x230458['some'](_0x3e590e=>_0x3e590e(_0x3f28c8));}if('origin'==_0x3b1a2d){const _0x5c6173=_0x353e91['window']['location']['origin'];return _0x49d7b3=>new URL(_0x49d7b3,_0x353e91['document']['baseURI'])['origin']==_0x5c6173;}return'function'==typeof _0x3b1a2d?_0x3b1a2d:_0x3b1a2d instanceof RegExp?_0x2f1ad0=>!(!_0x2f1ad0['match'](_0x3b1a2d)&&!_0x2f1ad0['replace'](/^https?:\/\//,'')['match'](_0x3b1a2d)):()=>!0x1;}function A(_0x40bce7,_0x2e2e92){return _0x1fbdc0(_0x40bce7['target'])['includes'](_0x2e2e92);}class n extends/* #__PURE__ -- @preserve */
24
+ _0xdd4748(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x325ed9,_0x654e43,_0x17123e){super(),this['_editor']=_0x325ed9,this['_editing']=_0x654e43,this['_dialog']=_0x325ed9['plugins']['get'](_0x48281d),this['_api']=_0x654e43['ctxElement']['getAPI'](),this['_type']=_0x17123e,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:_0x23fb73,model:_0x343f88}=this['_editor'],_0x51d1f8=_0x343f88['document']['selection']['getSelectedElement'](),_0x2cd9e8=_0x51d1f8&&(_0x51d1f8['is']('element','imageBlock')||_0x51d1f8['is']('element','imageInline'));this['_formView']=new x(_0x23fb73,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x573d88,'title':_(_0x23fb73,this['_type'],_0x2cd9e8?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x26b981['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x102547=>!A(_0x102547,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x4907e9}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x113d6=>{const _0x449284=_0x4907e9['length'];for(const _0x279b01 of _0x4907e9){const _0x4368f4=_0x279b01===_0x4907e9[_0x449284-0x1],{cdnUrl:_0x474968,fileInfo:_0x17ecba}=_0x279b01;if(!_0x474968||!_0x17ecba)continue;const {width:_0x23fdba,height:_0x4edbb4}=_0x17ecba['imageInfo'],_0x14d566=S(_0x474968,_0x23fdba,_0x4edbb4),_0x2d8776=C(_0x474968,_0x14d566['width']),_0x352fa9={'id':_0x17ecba['uuid'],'type':'image','attributes':{'imageDimension':_0x14d566,..._0x2d8776}};this['_insertAsset'](_0x352fa9,_0x4368f4,_0x113d6);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x22589d=>{'idle'===_0x22589d['detail']['status']&&!_0x22589d['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x169436,_0x15867e,_0x23f961){const _0x5162d9=this['_editor']['model']['document']['selection'],_0x4e3513=_0x5162d9['getSelectedElement'](),_0x388de7=!(!_0x4e3513||!_0x4e3513['is']('element','imageInline'));_0x23f961['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x169436,_0x388de7),_0x15867e||_0x23f961['setSelection'](_0x5162d9['getLastPosition']());}['_insertImage'](_0x48359e,_0x4fd6d6){const _0x5bc488=this['_editor'],{imageDimension:_0x30b350,imageFallbackUrl:_0x560519,imageSources:_0x342268}=_0x48359e['attributes'];_0x5bc488['execute']('insertImage',{'imageType':_0x4fd6d6?'imageInline':null,'source':{'uploadcareImageId':_0x48359e['id'],'src':_0x560519,'sources':_0x342268,..._0x30b350}});}}class w extends _0x50fcb7{['_editing'];['_controller']=null;static get['requires'](){return[_0x48281d,o];}constructor(_0x9dffdc){super(_0x9dffdc),this['_editing']=_0x9dffdc['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x238c88){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x238c88);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x14b1ec,..._0x2fa0f6}){return _0x322f8d(_0x14b1ec,_0x2fa0f6);}static['getInfo'](_0x473172,_0x51f606){return _0x4afe4b(_0x473172,_0x51f606);}}class f extends _0x1a8265{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x5cf537,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x46ff6f=this['editor'];if(!!!_0x46ff6f['config']['get']('uploadcare'))return;_0x46ff6f['plugins']['get'](_0x5cf537)['createUploadAdapter']=_0x47230d=>new k(_0x47230d,_0x46ff6f),_0x46ff6f['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x38f4c1,{imageElement:_0x10432b,data:_0x5aa467})=>{_0x46ff6f['model']['change'](_0x5a0215=>{_0x5a0215['setAttribute']('uploadcareImageId',_0x5aa467['uploadcareImageId'],_0x10432b);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x24f934,_0x3a319d){this['loader']=_0x24f934,this['editor']=_0x3a319d,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4b2f1c=await this['loader']['file'];return j['upload']({'file':_0x4b2f1c,'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':_0x32d7e3=>{_0x32d7e3&&_0x32d7e3['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x32d7e3['value']);}})['then'](async _0x461311=>{const {imageFallbackUrl:_0x31d59a,imageSources:_0x27b7c3}=C(_0x461311['cdnUrl'],_0x461311['imageInfo']['width']);return{'uploadcareImageId':_0x461311['uuid'],'default':_0x31d59a,'sources':_0x27b7c3};})['catch'](()=>{const _0x5b43d1=t('Cannot\x20upload\x20file:')+('\x20'+_0x4b2f1c['name']+'.');return Promise['reject'](_0x5b43d1);});}['abort'](){this['controller']['abort']();}}class o extends _0x1a8265{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x48281d];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x3f9c12){super(_0x3f9c12),this['ucContextId']=_0x6e08c5();}['init'](){const _0x40bdb=this['editor'];_0x40bdb['commands']['add']('uploadcare',new w(_0x40bdb));}['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 _0x22165c=_0x353e91['document']['querySelector']('input[uploadcare-file-input]');_0x22165c&&_0x22165c['remove']();}),async function(_0x454dda){const _0x570012=_0x575cf0([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]),_0x1121a6=0x535f8c3a,_0x31876e=0x5358042a^_0x1121a6,_0x18be0d=window[_0x575cf0([0x44,0x61,0x74,0x65])][_0x575cf0([0x6e,0x6f,0x77])](),_0xf5ab0d=_0x454dda[_0x575cf0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x12eae5=new window[(_0x575cf0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15282d=>{_0xf5ab0d[_0x575cf0([0x6f,0x6e,0x63,0x65])](_0x575cf0([0x72,0x65,0x61,0x64,0x79]),_0x15282d);}),_0x39b794={[_0x575cf0([0x6b,0x74,0x79])]:_0x575cf0([0x45,0x43]),[_0x575cf0([0x75,0x73,0x65])]:_0x575cf0([0x73,0x69,0x67]),[_0x575cf0([0x63,0x72,0x76])]:_0x575cf0([0x50,0x2d,0x32,0x35,0x36]),[_0x575cf0([0x78])]:_0x575cf0([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]),[_0x575cf0([0x79])]:_0x575cf0([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]),[_0x575cf0([0x61,0x6c,0x67])]:_0x575cf0([0x45,0x53,0x32,0x35,0x36])},_0x54914f=_0xf5ab0d[_0x575cf0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x575cf0([0x67,0x65,0x74])](_0x575cf0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x542dc6(){let _0x2cfc30,_0x6244be=null,_0x32fd56=null;try{if(_0x54914f==_0x575cf0([0x47,0x50,0x4c]))return _0x575cf0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2cfc30=_0x1d4b26(),!_0x2cfc30)return _0x575cf0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2cfc30[_0x575cf0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x32fd56=_0x5dd3b8(_0x2cfc30[_0x575cf0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2cfc30[_0x575cf0([0x6a,0x74,0x69])])),await _0x35d889()?_0x223cc5()?_0x25ee2c()?_0x575cf0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x517388()?(_0x2cfc30[_0x575cf0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x575cf0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x6244be=_0x36cb67(_0x575cf0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3632d5()):_0x575cf0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x575cf0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x575cf0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x575cf0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x25ee2c(){const _0x41b88d=[_0x575cf0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x575cf0([0x74,0x72,0x69,0x61,0x6c])][_0x575cf0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cfc30[_0x575cf0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x18be0d/0x3e8:0xe10*_0x31876e;return _0x2cfc30[_0x575cf0([0x65,0x78,0x70])]<_0x41b88d;}function _0x223cc5(){const _0x516e27=_0x2cfc30[_0x575cf0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x516e27&&(!!_0x516e27[_0x575cf0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x575cf0([0x2a]))||!!_0x516e27[_0x575cf0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x575cf0([0x55,0x50,0x4c,0x43])));}function _0x517388(){const _0x1e6116=_0x2cfc30[_0x575cf0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1e6116||0x0==_0x1e6116[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5e8954}=new URL(window[_0x575cf0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1e6116[_0x575cf0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e8954))return!0x0;const _0x575a92=_0x5e8954[_0x575cf0([0x73,0x70,0x6c,0x69,0x74])](_0x575cf0([0x2e]));return _0x1e6116[_0x575cf0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2cea41=>_0x2cea41[_0x575cf0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x575cf0([0x2a])))[_0x575cf0([0x6d,0x61,0x70])](_0x394221=>_0x394221[_0x575cf0([0x73,0x70,0x6c,0x69,0x74])](_0x575cf0([0x2e])))[_0x575cf0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x59c867=>_0x59c867[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x575a92[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x575cf0([0x6d,0x61,0x70])](_0x207283=>Array(_0x575a92[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x207283[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x575cf0([0x66,0x69,0x6c,0x6c])](_0x207283[0x0]===_0x575cf0([0x2a])?_0x575cf0([0x2a]):'')[_0x575cf0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x207283))[_0x575cf0([0x73,0x6f,0x6d,0x65])](_0x5c70cd=>_0x575a92[_0x575cf0([0x65,0x76,0x65,0x72,0x79])]((_0x387e13,_0x54145a)=>_0x5c70cd[_0x54145a]===_0x387e13||_0x5c70cd[_0x54145a]===_0x575cf0([0x2a])));}function _0x3632d5(){return _0x6244be&&_0x32fd56?new window[(_0x575cf0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5a9298,_0x2d82d5)=>{_0x6244be[_0x575cf0([0x74,0x68,0x65,0x6e])](_0x5a9298,_0x2d82d5),_0x32fd56[_0x575cf0([0x74,0x68,0x65,0x6e])](_0x4d4e9c=>{_0x4d4e9c!=_0x575cf0([0x56,0x61,0x6c,0x69,0x64])&&_0x5a9298(_0x4d4e9c);},_0x2d82d5);}):_0x6244be||_0x32fd56||_0x575cf0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5dd3b8(_0x4b1eb8,_0x48ee47){return new window[(_0x575cf0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3837a4=>{if(_0x3ae31c())return _0x3837a4(_0x575cf0([0x56,0x61,0x6c,0x69,0x64]));_0x564a72(),_0xf5ab0d[_0x575cf0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x575cf0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x244698=!0x1;const _0x53d1af=_0x6e08c5();function _0xdc7df(_0x3b64e3){return!!_0x3b64e3&&(typeof _0x3b64e3===_0x575cf0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3b64e3===_0x575cf0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3b64e3[_0x575cf0([0x74,0x68,0x65,0x6e])]===_0x575cf0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3b64e3[_0x575cf0([0x63,0x61,0x74,0x63,0x68])]===_0x575cf0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x31536f(_0x59faca){_0x498643(_0x59faca)[_0x575cf0([0x74,0x68,0x65,0x6e])](_0x1b233c=>{if(!_0x1b233c||_0x1b233c[_0x575cf0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x575cf0([0x6f,0x6b]))return _0x575cf0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x6db1b2(_0x380efe(_0x53d1af+_0x48ee47))!=_0x1b233c[_0x575cf0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x575cf0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x575cf0([0x56,0x61,0x6c,0x69,0x64]);})[_0x575cf0([0x74,0x68,0x65,0x6e])](_0x171130=>(_0x1ad387(),_0x171130),()=>{const _0x302ffc=_0xf35e45();return null==_0x302ffc?(_0x1ad387(),_0x575cf0([0x56,0x61,0x6c,0x69,0x64])):_0x575cf0(_0x18be0d-_0x302ffc>(0x7753083a^_0x1121a6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x575cf0([0x74,0x68,0x65,0x6e])](_0x3837a4)[_0x575cf0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3837a4(_0x575cf0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4c136d=0x536962ba^_0x1121a6;function _0x1ad387(){const _0x5da58f=_0x575cf0([0x6c,0x6c,0x63,0x74,0x2d])+_0x6db1b2(_0x380efe(_0x4b1eb8)),_0x525222=_0x371b41(_0x6db1b2(window[_0x575cf0([0x4d,0x61,0x74,0x68])][_0x575cf0([0x63,0x65,0x69,0x6c])](_0x18be0d/_0x4c136d)));window[_0x575cf0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x575cf0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5da58f,_0x525222);}function _0xf35e45(){const _0x48bdfd=_0x575cf0([0x6c,0x6c,0x63,0x74,0x2d])+_0x6db1b2(_0x380efe(_0x4b1eb8)),_0x2c1d16=window[_0x575cf0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x575cf0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x48bdfd);return _0x2c1d16?window[_0x575cf0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x371b41(_0x2c1d16),0x10)*_0x4c136d:null;}function _0x498643(_0x5e630e){return new window[(_0x575cf0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x371358,_0x40f4f7)=>{_0x5e630e[_0x575cf0([0x74,0x68,0x65,0x6e])](_0x371358,_0x40f4f7),window[_0x575cf0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x40f4f7,0x535e58fa^_0x1121a6);});}}_0xf5ab0d[_0x575cf0([0x6f,0x6e])](_0x575cf0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x835e1c,_0x42d12b)=>{if(_0x42d12b[0x0]!=_0x4b1eb8)return _0x3837a4(_0x575cf0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x42d12b[0x1]={..._0x42d12b[0x1],[_0x575cf0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x53d1af};},{[_0x575cf0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x575cf0([0x68,0x69,0x67,0x68])}),_0xf5ab0d[_0x575cf0([0x6f,0x6e])](_0x575cf0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x195ea4=>{_0xdc7df(_0x195ea4[_0x575cf0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x244698=!0x0,_0x31536f(_0x195ea4[_0x575cf0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x575cf0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x575cf0([0x6c,0x6f,0x77])}),_0x12eae5[_0x575cf0([0x74,0x68,0x65,0x6e])](()=>{_0x244698||_0x3837a4(_0x575cf0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3ae31c(){return _0xf5ab0d[_0x575cf0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x575cf0([0x76,0x69,0x65,0x77])][_0x575cf0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x575cf0([0x61,0x75,0x74,0x6f]);}function _0x564a72(){_0xf5ab0d[_0x575cf0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x575cf0([0x76,0x69,0x65,0x77])][_0x575cf0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x575cf0([0x61,0x75,0x74,0x6f]);}}function _0x36cb67(_0x2c13f6){const _0x617033=[new window[(_0x575cf0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21f9f5=>setTimeout(_0x21f9f5,0x5356b2f6^_0x1121a6)),_0x12eae5[_0x575cf0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x575cf0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x570afe=>{let _0x2044dc=0x0;_0xf5ab0d[_0x575cf0([0x6d,0x6f,0x64,0x65,0x6c])][_0x575cf0([0x6f,0x6e])](_0x575cf0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4e5c4b,_0x3db0ca)=>{_0x3db0ca[0x0][_0x575cf0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2044dc++,_0x2044dc==(0x535f89d2^_0x1121a6)&&(_0x570afe(),_0x4e5c4b[_0x575cf0([0x6f,0x66,0x66])]());});}))];return window[_0x575cf0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x575cf0([0x72,0x61,0x63,0x65])](_0x617033)[_0x575cf0([0x74,0x68,0x65,0x6e])](()=>_0x2c13f6);}async function _0x242928(){await _0x12eae5,_0xf5ab0d[_0x575cf0([0x6d,0x6f,0x64,0x65,0x6c])][_0x575cf0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x236d97,_0xf5ab0d[_0x575cf0([0x6d,0x6f,0x64,0x65,0x6c])][_0x575cf0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x236d97,_0xf5ab0d[_0x575cf0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x575cf0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xb857ac(_0x56abd8){const _0xddcc25=_0x9737e9();_0xf5ab0d[_0xddcc25]=_0x575cf0([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x56abd8,_0x56abd8!=_0x575cf0([0x56,0x61,0x6c,0x69,0x64])&&_0x242928();}function _0x9737e9(){const _0x539968=window[_0x575cf0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x575cf0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x575cf0([0x6e,0x6f,0x77])]())[_0x575cf0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x575cf0([0x2e]),'');let _0x3acf90=_0x575cf0([0x68]);for(let _0x1f5f3a=0x0;_0x1f5f3a<_0x539968[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1f5f3a+=0x2){let _0x3f30d9=window[_0x575cf0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x539968[_0x575cf0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1f5f3a,_0x1f5f3a+0x2));_0x3f30d9>=_0x570012[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3f30d9-=_0x570012[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3acf90+=_0x570012[_0x3f30d9];}return _0x3acf90;}function _0x1d4b26(){const _0x1bc131=_0x54914f[_0x575cf0([0x73,0x70,0x6c,0x69,0x74])](_0x575cf0([0x2e]));if(0x3!=_0x1bc131[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1d657f(_0x1bc131[0x1]);function _0x1d657f(_0x13b005){const _0x296fdb=_0x587880(_0x13b005);return _0x296fdb&&_0x5dd9a3()?_0x296fdb:null;function _0x5dd9a3(){const _0x156d25=_0x296fdb[_0x575cf0([0x6a,0x74,0x69])],_0x355a31=window[_0x575cf0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x156d25[_0x575cf0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x156d25[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x59ba71={..._0x296fdb,[_0x575cf0([0x6a,0x74,0x69])]:_0x156d25[_0x575cf0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x156d25[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x59ba71[_0x575cf0([0x76,0x63])],_0x380efe(_0x59ba71)==_0x355a31;}}}async function _0x35d889(){let _0x4fa34f=!0x0;try{const _0x110eba=_0x54914f[_0x575cf0([0x73,0x70,0x6c,0x69,0x74])](_0x575cf0([0x2e])),[_0x57f614,_0x137a28,_0x160876]=_0x110eba;return _0x360757(_0x57f614),await _0x1fcdce(_0x57f614,_0x137a28,_0x160876),_0x4fa34f;}catch{return!0x1;}function _0x360757(_0x32d05b){const _0x572c03=_0x587880(_0x32d05b);_0x572c03&&_0x572c03[_0x575cf0([0x61,0x6c,0x67])]==_0x575cf0([0x45,0x53,0x32,0x35,0x36])||(_0x4fa34f=!0x1);}async function _0x1fcdce(_0x4093a3,_0x8cc8a7,_0x57ce2d){const _0xf4e36d=window[_0x575cf0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x575cf0([0x66,0x72,0x6f,0x6d])](_0x5288ae(_0x57ce2d),_0x1733bd=>_0x1733bd[_0x575cf0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x18467f=new window[(_0x575cf0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x575cf0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4093a3+_0x575cf0([0x2e])+_0x8cc8a7),_0xad6e3d=window[_0x575cf0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x575cf0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xad6e3d)return;const _0x3d52f9=await _0xad6e3d[_0x575cf0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x575cf0([0x6a,0x77,0x6b]),_0x39b794,{[_0x575cf0([0x6e,0x61,0x6d,0x65])]:_0x575cf0([0x45,0x43,0x44,0x53,0x41]),[_0x575cf0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x575cf0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x575cf0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xad6e3d[_0x575cf0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x575cf0([0x6e,0x61,0x6d,0x65])]:_0x575cf0([0x45,0x43,0x44,0x53,0x41]),[_0x575cf0([0x68,0x61,0x73,0x68])]:{[_0x575cf0([0x6e,0x61,0x6d,0x65])]:_0x575cf0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3d52f9,_0xf4e36d,_0x18467f)||(_0x4fa34f=!0x1);}}function _0x587880(_0x4e5d34){return _0x4e5d34[_0x575cf0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x575cf0([0x65,0x79]))?JSON[_0x575cf0([0x70,0x61,0x72,0x73,0x65])](_0x5288ae(_0x4e5d34)):null;}function _0x5288ae(_0x44e431){return window[_0x575cf0([0x61,0x74,0x6f,0x62])](_0x44e431[_0x575cf0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x575cf0([0x2b]))[_0x575cf0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x575cf0([0x2f])));}function _0x380efe(_0x2e194b){let _0x1962ac=0x1505;function _0xa3351c(_0x3748d3){for(let _0x2a76b4=0x0;_0x2a76b4<_0x3748d3[_0x575cf0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2a76b4++){const _0xc4d3dc=_0x3748d3[_0x575cf0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2a76b4);_0x1962ac=(_0x1962ac<<0x5)+_0x1962ac+_0xc4d3dc,_0x1962ac&=_0x1962ac;}}function _0x5a2902(_0xa64ebd){Array[_0x575cf0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xa64ebd)?_0xa64ebd[_0x575cf0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5a2902):_0xa64ebd&&typeof _0xa64ebd==_0x575cf0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x575cf0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xa64ebd)[_0x575cf0([0x73,0x6f,0x72,0x74])]()[_0x575cf0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1c823e,_0x1ea989])=>{_0xa3351c(_0x1c823e),_0x5a2902(_0x1ea989);}):_0xa3351c(window[_0x575cf0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xa64ebd));}return _0x5a2902(_0x2e194b),_0x1962ac>>>0x0;}function _0x6db1b2(_0x43fbc7){return _0x43fbc7[_0x575cf0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x575cf0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x575cf0([0x30]));}function _0x371b41(_0x3a1585){return _0x3a1585[_0x575cf0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x575cf0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x575cf0([0x6a,0x6f,0x69,0x6e])]('');}function _0x236d97(){}function _0x575cf0(_0x54e7d9){return _0x54e7d9['map'](_0xcd3073=>String['fromCharCode'](_0xcd3073))['join']('');}_0xb857ac(await _0x542dc6());}(this);}['_initSchema'](){const _0x47401a=this['editor']['model']['schema'];_0x47401a['isRegistered']('imageBlock')&&_0x47401a['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x47401a['isRegistered']('imageInline')&&_0x47401a['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x59eec9=this['editor'];_0x59eec9['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x59eec9['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x296d4f=>_0x296d4f['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5baabd=_0x59eec9['commands']['get']('replaceImageSource');_0x5baabd&&this['listenTo'](_0x5baabd,'cleanupImage',(_0x4534b6,[_0x11336c,_0x120ca1])=>{_0x11336c['removeAttribute']('uploadcareImageId',_0x120ca1);});}['_initConfig'](){const _0x2defa1=this['editor']['config']['get']('uploadcare.uploader')||{},_0x1631ad=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x39a7c7(_0x353e91['document'],'uc-config',{..._0x2defa1,'pubkey':_0x1631ad,'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']=_0x17bc4b=>{if('closeMax'==_0x17bc4b)return'#uc-icon-arrow-down';},_0x353e91['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x39a7c7(_0x353e91['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x353e91['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x57a904=this['editor']['commands']['get']('insertImage');_0x57a904&&this['listenTo'](_0x57a904,'execute',()=>{const _0x44c6f7=this['editor']['model']['document']['selection']['getSelectedElement']();_0x44c6f7&&_0x44c6f7['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x44c6f7);});});const _0x2fa320=this['editor']['commands']['get']('uploadcareImageReplace');_0x2fa320&&this['listenTo'](_0x2fa320,'execute',()=>{const _0x27f9ff=this['editor']['model']['document']['selection']['getSelectedElement']();_0x27f9ff&&_0x27f9ff['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x27f9ff);});});}}class tt extends _0x1a8265{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf3eba5){super(_0xf3eba5),_0xf3eba5['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x3507d0['defineComponents'](_0x3507d0),this['_defineLocale']();}['_defineLocale'](){const _0x428066=this['editor']['config']['get']('uploadcare.locale'),_0x2b15b7=this['editor']['locale']['contentLanguage'];_0x428066&&_0x3507d0['defineLocale'](_0x2b15b7,_0x428066);}}class ii extends _0x281ed3{constructor(_0x352c88){super(_0x352c88);const t=_0x352c88['t'],_0xcc2d6f=this['bindTemplate'],_0x4189ee=new _0x1ed863();_0x4189ee['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':[_0x4189ee,{'text':_0xcc2d6f['to']('imageUploadProgress',_0x175669=>t('Loading\x20image...')+'\x20('+(_0x175669||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 _0x281ed3{constructor(_0x568657){super(_0x568657);const t=_0x568657['t'];this['set']('errorType',null);const _0x4cae9f=new _0x1cf473(_0x568657);_0x4cae9f['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4cae9f['withText']=!0x0,_0x4cae9f['class']='ck-button-action',_0x4cae9f['on']('execute',()=>{this['fire']('retry');}),_0x4cae9f['bind']('isVisible')['to'](this,'errorType',_0x5e7a30=>'NotFound'!==_0x5e7a30);const _0x156d8f=new _0x1cfb12();_0x156d8f['content']=_0x18ad94,_0x156d8f['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x186bf0=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':[_0x156d8f,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x186bf0['to']('errorType',_0xe937cb=>t('NotFound'!==_0xe937cb?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4cae9f]},{'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 _0x281ed3{constructor(_0x4dec35,_0x30948a){super(_0x4dec35);const _0x2955e5=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x30948a,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2955e5['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x433bd2,_0x39b7ac,_0xd68848){super(_0x433bd2),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x433bd2),this['_errorView']=new ti(_0x433bd2),this['_editingView']=new ei(_0x433bd2,_0xd68848),this['_focusableView']=new _0x281ed3(_0x433bd2),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x39b7ac),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'],_0x1bf62d=>{this['_addUploadcareImageEditorListeners'](_0x1bf62d);});}),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'](_0x3c2dee,_0x5a78e3){const _0x4667da='uc-cloud-image-editor',_0x4d739c=_0x3c2dee['querySelector'](_0x4667da);if(_0x4d739c)return _0x5a78e3(_0x4d739c);const _0x2b928c=new MutationObserver(_0x239b0e=>{const _0xa5cca7=_0x239b0e['filter'](_0x4fc364=>_0x4fc364['target']===_0x3c2dee&&_0x4fc364['addedNodes']['length']>0x0&&_0x4fc364['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4667da);_0xa5cca7['length']&&(_0x2b928c['disconnect'](),_0x5a78e3(_0xa5cca7[0x0]['addedNodes'][0x0]));});_0x2b928c['observe'](_0x3c2dee,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x2fc4b4){_0x2fc4b4['addEventListener']('apply',_0x56747d=>{this['fire']('apply',{'imageSrc':_0x56747d['detail']['cdnUrl']});}),_0x2fc4b4['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
25
+ _0xdd4748(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0xcf7efb,_0x2efacc,_0x4ea997){super(),this['_editor']=_0xcf7efb,this['_dialog']=_0x2efacc,this['_imageElement']=_0x4ea997,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 _0xb1e86d=this['_imageElement'],_0x394333=_0xb1e86d['getAttribute']('uploadcareImageId'),_0x5985fd=_0xb1e86d['getAttribute']('src');if(_0x394333)await this['_loadImageInfo'](_0x394333,_0x5985fd);else{if(this['_imageCache']['has'](_0x5985fd)){const _0xe53d6b=this['_imageCache']['get'](_0x5985fd);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xe53d6b['url'],this['imageDimension']=_0xe53d6b['dimension'],this['imageId']=_0xe53d6b['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2a5c05}=this['_editor'],t=_0x2a5c05['t'],_0x3f1677=new X(_0x2a5c05,this['imageStatus'],this['_attributes']);_0x3f1677['bind']('status')['to'](this,'imageStatus'),_0x3f1677['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x3f1677['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x3f1677['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x3f1677,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x439420,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x3f1677,'position':_0x26b981['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x3f1677['focus']();},'onHide':()=>{_0x3f1677['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x45a934=>!A(_0x45a934,_0x3f1677['element'])}});}['_loadImageInfo'](_0x48e91c,_0x2233ac){return j['getInfo'](_0x48e91c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x30899e=>{const {width:_0x485cd1,height:_0x1e21b5}=_0x30899e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2233ac,this['imageDimension']={'width':_0x485cd1,'height':_0x1e21b5},this['imageId']=_0x48e91c;})['catch'](_0x309259=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x309259['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x581bec,_0x10c100){return this['_getImageAsFile'](_0x581bec)['then'](_0x59b100=>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':_0x10c100['signal'],'file':_0x59b100,'onProgress':_0x4c2aa2=>{_0x4c2aa2&&_0x4c2aa2['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4c2aa2['value']));}}))['then'](_0x5ef8ad=>{const {width:_0xa2a379,height:_0x3ddfff}=_0x5ef8ad['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5ef8ad['cdnUrl'],this['imageDimension']={'width':_0xa2a379,'height':_0x3ddfff},this['imageId']=_0x5ef8ad['uuid'],this['imageUploadProgress']=null;const _0x43383b=_0x581bec['getAttribute']('src');this['_imageCache']['set'](_0x43383b,{'id':_0x5ef8ad['uuid'],'url':_0x5ef8ad['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x446de7=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x446de7['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3978e2,_0x39dec7){_0x3978e2['on']('apply',(_0x50e47c,_0x272ec4)=>{this['_replaceImage'](_0x39dec7,_0x272ec4['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3978e2['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3978e2['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x43075d,_0x27eb5e,_0x4519e4){const _0x102c37=this['_editor'],{width:_0x13fe8b,height:_0x148014}=S(_0x27eb5e,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x36523d,imageSources:_0x38fbb8}=C(_0x27eb5e,_0x13fe8b);_0x102c37['model']['change'](_0x40f4e5=>{if('$graveyard'===_0x43075d['root']['rootName']){_0x102c37['execute']('insertImage',{'imageType':_0x43075d['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x43075d['getAttributes']()),'uploadcareImageId':_0x4519e4,'src':_0x36523d,'sources':_0x38fbb8,'width':_0x13fe8b,'height':_0x148014}});const _0x28bd5a=_0x43075d['getChildren']();_0x43075d=_0x102c37['model']['document']['selection']['getSelectedElement']();for(const _0x16b67a of _0x28bd5a)_0x40f4e5['append'](_0x40f4e5['cloneElement'](_0x16b67a),_0x43075d);}else _0x40f4e5['setSelection'](_0x43075d,'on'),_0x102c37['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x43075d['getAttributes']()),'uploadcareImageId':_0x4519e4,'src':_0x36523d,'sources':_0x38fbb8,'width':_0x13fe8b,'height':_0x148014},_0x43075d);_0x40f4e5['setSelection'](_0x43075d,'on');});}async['_getImageAsFile'](_0x3e5cf5){const _0x260cb0=_0x353e91['window'],_0x18c6dd=_0x353e91['document']['location']['href'],_0x2eee34=new _0x260cb0['URL'](_0x3e5cf5['getAttribute']('src'),_0x18c6dd);if('data:'===_0x2eee34['protocol']){const _0x1ed6bf=_0x2eee34['href']['split'](','),_0x18ec02=_0x1ed6bf[0x0]['match'](/:(.*?);/)[0x1],_0x1af124=_0x18ec02['split']('/')[0x1],_0x222baa=_0x260cb0['atob'](_0x1ed6bf[_0x1ed6bf['length']-0x1]);let _0x81cbc5=_0x222baa['length'];const _0x487ae7=new _0x260cb0['Uint8Array'](_0x81cbc5);for(;_0x81cbc5--;)_0x487ae7[_0x81cbc5]=_0x222baa['charCodeAt'](_0x81cbc5);return new _0x260cb0['File']([_0x487ae7],'image.'+_0x1af124,{'type':_0x18ec02});}const _0x1ff291=_0x2eee34['href']['split']('/'),_0x55bed1=_0x1ff291[_0x1ff291['length']-0x1],_0x5dd772=_0x55bed1['split']('.')[0x1];return _0x260cb0['fetch'](_0x2eee34['href'])['then'](_0x22d002=>_0x22d002['clone']()['blob']())['then'](_0x4b5ad8=>new _0x260cb0['File']([_0x4b5ad8],_0x55bed1,{'type':'image/'+_0x5dd772}));}}class Q extends _0x50fcb7{['imageEditController'];static get['requires'](){return[_0x48281d];}['_isEditable'];constructor(_0x2df011){super(_0x2df011),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x455771){const _0x11ad91=z(_0x455771);return _0x77419d=>!(!_0x77419d||!_0x77419d['is']('element','imageBlock')&&!_0x77419d['is']('element','imageInline'))&&(!!_0x77419d['hasAttribute']('uploadcareImageId')||!!_0x77419d['hasAttribute']('src')&&_0x11ad91(_0x77419d['getAttribute']('src')));}(_0x2df011['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0xdebdbc=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0xdebdbc);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x437c7e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x437c7e&&(_0x437c7e['is']('element','imageBlock')||_0x437c7e['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x48281d),_0x437c7e),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x50fcb7{['refresh'](){const _0x39d107=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x39d107&&(_0x39d107['is']('element','imageBlock')||_0x39d107['is']('element','imageInline')));}['execute'](_0x1cd75f){const _0x36199b=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5bc2e4=>{_0x5bc2e4['setAttributes'](_0x1cd75f,_0x36199b),_0x5bc2e4['removeAttribute']('srcset',_0x36199b),_0x5bc2e4['removeAttribute']('sizes',_0x36199b);});}}class m extends _0x1a8265{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0xc77335,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x54a134}=this;_0x54a134['commands']['add']('uploadcareImageEdit',new Q(_0x54a134)),_0x54a134['commands']['add']('uploadcareImageReplace',new V(_0x54a134));}}class g extends _0x1a8265{['_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 _0x5e122c=this['editor'];_0x5e122c['ui']['componentFactory']['add']('uploadcareImageEdit',_0x56bac8=>{const _0x302af5=_0x5e122c['commands']['get']('uploadcareImageEdit'),_0x23682a=new _0x1cf473(_0x56bac8),t=_0x56bac8['t'];return _0x23682a['set']({'icon':_0x439420,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x23682a['bind']('isEnabled')['to'](_0x302af5),_0x23682a['bind']('isOn')['to'](_0x302af5,'isActive'),this['listenTo'](_0x23682a,'execute',()=>{_0x5e122c['execute']('uploadcareImageEdit'),_0x5e122c['editing']['view']['focus']();}),_0x23682a;}),this['_initConfig']();}['_initConfig'](){const _0xe06e20=_0x39a7c7(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xe06e20),this['listenTo'](this['editor'],'destroy',()=>{_0xe06e20['remove']();});}}class et extends _0x1a8265{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-uploadcare",
3
- "version": "47.7.1-alpha.0",
3
+ "version": "47.7.1",
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.1-alpha.0",
27
- "@ckeditor/ckeditor5-icons": "47.7.1-alpha.0",
28
- "@ckeditor/ckeditor5-image": "47.7.1-alpha.0",
29
- "@ckeditor/ckeditor5-theme-lark": "47.7.1-alpha.0",
30
- "@ckeditor/ckeditor5-ui": "47.7.1-alpha.0",
31
- "@ckeditor/ckeditor5-upload": "47.7.1-alpha.0",
32
- "@ckeditor/ckeditor5-utils": "47.7.1-alpha.0",
33
- "ckeditor5": "47.7.1-alpha.0",
26
+ "@ckeditor/ckeditor5-core": "47.7.1",
27
+ "@ckeditor/ckeditor5-icons": "47.7.1",
28
+ "@ckeditor/ckeditor5-image": "47.7.1",
29
+ "@ckeditor/ckeditor5-theme-lark": "47.7.1",
30
+ "@ckeditor/ckeditor5-ui": "47.7.1",
31
+ "@ckeditor/ckeditor5-upload": "47.7.1",
32
+ "@ckeditor/ckeditor5-utils": "47.7.1",
33
+ "ckeditor5": "47.7.1",
34
34
  "@uploadcare/file-uploader": "1.24.5",
35
35
  "@uploadcare/upload-client": "6.14.3"
36
36
  },
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x1427(_0x413e3d,_0x3aa0ee){const _0x998c72=_0x998c();return _0x1427=function(_0x14271e,_0x7b9eb1){_0x14271e=_0x14271e-0xe7;let _0x377db3=_0x998c72[_0x14271e];return _0x377db3;},_0x1427(_0x413e3d,_0x3aa0ee);}const _0x56a764=_0x1427;(function(_0x468aaf,_0x3d33b2){const _0x5e9772=_0x1427,_0xfad81d=_0x468aaf();while(!![]){try{const _0x2eeefd=-parseInt(_0x5e9772(0xed))/0x1+parseInt(_0x5e9772(0xee))/0x2+parseInt(_0x5e9772(0x118))/0x3*(parseInt(_0x5e9772(0x132))/0x4)+-parseInt(_0x5e9772(0x105))/0x5*(-parseInt(_0x5e9772(0x11d))/0x6)+parseInt(_0x5e9772(0xf5))/0x7+-parseInt(_0x5e9772(0x103))/0x8+-parseInt(_0x5e9772(0x106))/0x9;if(_0x2eeefd===_0x3d33b2)break;else _0xfad81d['push'](_0xfad81d['shift']());}catch(_0x20b8c9){_0xfad81d['push'](_0xfad81d['shift']());}}}(_0x998c,0xc21bc));import{Plugin as _0x480bd5}from'ckeditor5/src/core.js';import{Dialog as _0x370306}from'ckeditor5/src/ui.js';import{createElement as _0x464ba8,global as _0x123f63,uid as _0x58a0c1}from'ckeditor5/src/utils.js';function _0x998c(){const _0x22d94f=['href','fromCharCode','isOfficialPlugin','selection','conversion','imageInline','model','ctxElement','map','editor','_initConfig','data-uc-image-id','document','60jYeDvV','destroy','init','_configElement','once','510ZjVNMX','insertImage','uploadcare.pubkey','\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','commands','ucContextId','upcast','getSelectedElement','body','_initCtx','requires','for','_initImageProcessingIndicator','uc-config','pluginName','view','remove','locale','isRegistered','iconHrefResolver','true','97380FmNwkX','UploadcareEditing','uploadcareImageReplace','uploadcare.uploader','getAttribute','closeMax','join','cleanupImage','input[uploadcare-file-input]','uc-upload-ctx-provider','listenTo','configElement','isPremiumPlugin','#uc-icon-arrow-down','removeAttribute','1496684jOKTFR','232336GMvynf','editing','execute','_initConversion','attributeToAttribute','PictureEditing','schema','5310564VujZzL','downcast','afterInit','uploader-','contentLanguage','appendChild','render','uploadcare','elementToAttribute','replaceImageSource','imageBlock','extend','add','uploadcareImageId','713952iFXCed','get','77005bAdryy','2608281RysONk','_ctxElement','config','querySelector','_initSchema'];_0x998c=function(){return _0x22d94f;};return _0x998c();}import{UploadcareCommand as _0x20c48c}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x2661db}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x28580b}from'./utils/editingutils.js';export class UploadcareEditing extends _0x480bd5{[_0x56a764(0x11b)]=null;[_0x56a764(0x107)]=null;static get[_0x56a764(0x12b)](){const _0x2b82fb=_0x56a764;return _0x2b82fb(0x133);}static get[_0x56a764(0x127)](){const _0x277c67=_0x56a764;return[_0x277c67(0xf3),_0x2661db,_0x370306];}static get[_0x56a764(0x10d)](){return!0x0;}static get[_0x56a764(0xea)](){return!0x0;}[_0x56a764(0x122)];get[_0x56a764(0xe9)](){const _0x2eb256=_0x56a764;return this[_0x2eb256(0x11b)];}get[_0x56a764(0x112)](){const _0x2c0fa2=_0x56a764;return this[_0x2c0fa2(0x107)];}constructor(_0x2cbd5a){const _0x254950=_0x56a764;super(_0x2cbd5a),this[_0x254950(0x122)]=_0x58a0c1();}[_0x56a764(0x11a)](){const _0x433f62=_0x56a764,_0x21ed93=this[_0x433f62(0x114)];_0x21ed93[_0x433f62(0x121)][_0x433f62(0x101)](_0x433f62(0xfc),new _0x20c48c(_0x21ed93));}[_0x56a764(0xf7)](){const _0x4c1fdd=_0x56a764;this[_0x4c1fdd(0x10a)](),this[_0x4c1fdd(0xf1)](),this[_0x4c1fdd(0x115)](),this[_0x4c1fdd(0x126)](),this[_0x4c1fdd(0x129)](),this[_0x4c1fdd(0xe8)](this[_0x4c1fdd(0x114)],_0x4c1fdd(0x119),()=>{const _0x5eee20=_0x4c1fdd;this[_0x5eee20(0x11b)]&&(this[_0x5eee20(0x11b)][_0x5eee20(0x12d)](),this[_0x5eee20(0x11b)]=null),this[_0x5eee20(0x107)]&&(this[_0x5eee20(0x107)][_0x5eee20(0x12d)](),this[_0x5eee20(0x107)]=null);const _0x34854b=_0x123f63[_0x5eee20(0x117)][_0x5eee20(0x109)](_0x5eee20(0x13a));_0x34854b&&_0x34854b[_0x5eee20(0x12d)]();}),async function(_0x10f21a){const _0x3672e6=_0xd5ebb([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]),_0x536500=0x535f8c3a,_0x5d56d9=0x53580bf2^_0x536500,_0x50d5ca=window[_0xd5ebb([0x44,0x61,0x74,0x65])][_0xd5ebb([0x6e,0x6f,0x77])](),_0x1fdbde=_0x10f21a[_0xd5ebb([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x43728a=new window[(_0xd5ebb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa9b677=>{_0x1fdbde[_0xd5ebb([0x6f,0x6e,0x63,0x65])](_0xd5ebb([0x72,0x65,0x61,0x64,0x79]),_0xa9b677);}),_0x4e7629={[_0xd5ebb([0x6b,0x74,0x79])]:_0xd5ebb([0x45,0x43]),[_0xd5ebb([0x75,0x73,0x65])]:_0xd5ebb([0x73,0x69,0x67]),[_0xd5ebb([0x63,0x72,0x76])]:_0xd5ebb([0x50,0x2d,0x32,0x35,0x36]),[_0xd5ebb([0x78])]:_0xd5ebb([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]),[_0xd5ebb([0x79])]:_0xd5ebb([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]),[_0xd5ebb([0x61,0x6c,0x67])]:_0xd5ebb([0x45,0x53,0x32,0x35,0x36])},_0x2fd222=_0x1fdbde[_0xd5ebb([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xd5ebb([0x67,0x65,0x74])](_0xd5ebb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x12996d(){let _0x13d09e,_0x55d8b4=null,_0x1e8284=null;try{if(_0x2fd222==_0xd5ebb([0x47,0x50,0x4c]))return _0xd5ebb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x13d09e=_0x593643(),!_0x13d09e)return _0xd5ebb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x13d09e[_0xd5ebb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1e8284=_0x26454c(_0x13d09e[_0xd5ebb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x13d09e[_0xd5ebb([0x6a,0x74,0x69])])),await _0x2f91ff()?_0x5df1d0()?_0x113ec6()?_0xd5ebb([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1235e5()?(_0x13d09e[_0xd5ebb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xd5ebb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x55d8b4=_0x245d3c(_0xd5ebb([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x190c3d()):_0xd5ebb([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xd5ebb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xd5ebb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xd5ebb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x113ec6(){const _0x421175=[_0xd5ebb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xd5ebb([0x74,0x72,0x69,0x61,0x6c])][_0xd5ebb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x13d09e[_0xd5ebb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x50d5ca/0x3e8:0xe10*_0x5d56d9;return _0x13d09e[_0xd5ebb([0x65,0x78,0x70])]<_0x421175;}function _0x5df1d0(){const _0xede85b=_0x13d09e[_0xd5ebb([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xede85b&&(!!_0xede85b[_0xd5ebb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd5ebb([0x2a]))||!!_0xede85b[_0xd5ebb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd5ebb([0x55,0x50,0x4c,0x43])));}function _0x1235e5(){const _0x5a5d27=_0x1427,_0x5d3965=_0x13d09e[_0xd5ebb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5d3965||0x0==_0x5d3965[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x32fc7f}=new URL(window[_0xd5ebb([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x5a5d27(0x10b)]);if(_0x5d3965[_0xd5ebb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32fc7f))return!0x0;const _0xf488b8=_0x32fc7f[_0xd5ebb([0x73,0x70,0x6c,0x69,0x74])](_0xd5ebb([0x2e]));return _0x5d3965[_0xd5ebb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x23db8c=>_0x23db8c[_0xd5ebb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd5ebb([0x2a])))[_0xd5ebb([0x6d,0x61,0x70])](_0x3170e8=>_0x3170e8[_0xd5ebb([0x73,0x70,0x6c,0x69,0x74])](_0xd5ebb([0x2e])))[_0xd5ebb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x34821b=>_0x34821b[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xf488b8[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xd5ebb([0x6d,0x61,0x70])](_0x3a35c2=>Array(_0xf488b8[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3a35c2[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xd5ebb([0x66,0x69,0x6c,0x6c])](_0x3a35c2[0x0]===_0xd5ebb([0x2a])?_0xd5ebb([0x2a]):'')[_0xd5ebb([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3a35c2))[_0xd5ebb([0x73,0x6f,0x6d,0x65])](_0x2a5f74=>_0xf488b8[_0xd5ebb([0x65,0x76,0x65,0x72,0x79])]((_0x19ab18,_0x4fb5f1)=>_0x2a5f74[_0x4fb5f1]===_0x19ab18||_0x2a5f74[_0x4fb5f1]===_0xd5ebb([0x2a])));}function _0x190c3d(){return _0x55d8b4&&_0x1e8284?new window[(_0xd5ebb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x46321e,_0x380e06)=>{_0x55d8b4[_0xd5ebb([0x74,0x68,0x65,0x6e])](_0x46321e,_0x380e06),_0x1e8284[_0xd5ebb([0x74,0x68,0x65,0x6e])](_0x4f9946=>{_0x4f9946!=_0xd5ebb([0x56,0x61,0x6c,0x69,0x64])&&_0x46321e(_0x4f9946);},_0x380e06);}):_0x55d8b4||_0x1e8284||_0xd5ebb([0x56,0x61,0x6c,0x69,0x64]);}}function _0x26454c(_0x2db32e,_0x12fd74){return new window[(_0xd5ebb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xbacd55=>{if(_0x1adb76())return _0xbacd55(_0xd5ebb([0x56,0x61,0x6c,0x69,0x64]));_0x443025(),_0x1fdbde[_0xd5ebb([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xd5ebb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1cbaa5=!0x1;const _0xf1b380=_0x58a0c1();function _0x221ba1(_0xd12683){return!!_0xd12683&&(typeof _0xd12683===_0xd5ebb([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xd12683===_0xd5ebb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xd12683[_0xd5ebb([0x74,0x68,0x65,0x6e])]===_0xd5ebb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xd12683[_0xd5ebb([0x63,0x61,0x74,0x63,0x68])]===_0xd5ebb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2d22d6(_0xcf2bb7){_0x40be85(_0xcf2bb7)[_0xd5ebb([0x74,0x68,0x65,0x6e])](_0x5d68f4=>{if(!_0x5d68f4||_0x5d68f4[_0xd5ebb([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xd5ebb([0x6f,0x6b]))return _0xd5ebb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2c3ced(_0x58c077(_0xf1b380+_0x12fd74))!=_0x5d68f4[_0xd5ebb([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xd5ebb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xd5ebb([0x56,0x61,0x6c,0x69,0x64]);})[_0xd5ebb([0x74,0x68,0x65,0x6e])](_0x4f655c=>(_0x427959(),_0x4f655c),()=>{const _0x4d442e=_0x69fc4e();return null==_0x4d442e?(_0x427959(),_0xd5ebb([0x56,0x61,0x6c,0x69,0x64])):_0xd5ebb(_0x50d5ca-_0x4d442e>(0x7753083a^_0x536500)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xd5ebb([0x74,0x68,0x65,0x6e])](_0xbacd55)[_0xd5ebb([0x63,0x61,0x74,0x63,0x68])](()=>{_0xbacd55(_0xd5ebb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3afa91=0x536962ba^_0x536500;function _0x427959(){const _0x126628=_0xd5ebb([0x6c,0x6c,0x63,0x74,0x2d])+_0x2c3ced(_0x58c077(_0x2db32e)),_0xea446b=_0x1b2fd2(_0x2c3ced(window[_0xd5ebb([0x4d,0x61,0x74,0x68])][_0xd5ebb([0x63,0x65,0x69,0x6c])](_0x50d5ca/_0x3afa91)));window[_0xd5ebb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xd5ebb([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x126628,_0xea446b);}function _0x69fc4e(){const _0x224da9=_0xd5ebb([0x6c,0x6c,0x63,0x74,0x2d])+_0x2c3ced(_0x58c077(_0x2db32e)),_0x1f6e74=window[_0xd5ebb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xd5ebb([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x224da9);return _0x1f6e74?window[_0xd5ebb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b2fd2(_0x1f6e74),0x10)*_0x3afa91:null;}function _0x40be85(_0x238faf){return new window[(_0xd5ebb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x744539,_0x4691de)=>{_0x238faf[_0xd5ebb([0x74,0x68,0x65,0x6e])](_0x744539,_0x4691de),window[_0xd5ebb([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4691de,0x535e58fa^_0x536500);});}}_0x1fdbde[_0xd5ebb([0x6f,0x6e])](_0xd5ebb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5ad45f,_0x24ae0e)=>{if(_0x24ae0e[0x0]!=_0x2db32e)return _0xbacd55(_0xd5ebb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x24ae0e[0x1]={..._0x24ae0e[0x1],[_0xd5ebb([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xf1b380};},{[_0xd5ebb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xd5ebb([0x68,0x69,0x67,0x68])}),_0x1fdbde[_0xd5ebb([0x6f,0x6e])](_0xd5ebb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4cee51=>{_0x221ba1(_0x4cee51[_0xd5ebb([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1cbaa5=!0x0,_0x2d22d6(_0x4cee51[_0xd5ebb([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xd5ebb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xd5ebb([0x6c,0x6f,0x77])}),_0x43728a[_0xd5ebb([0x74,0x68,0x65,0x6e])](()=>{_0x1cbaa5||_0xbacd55(_0xd5ebb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1adb76(){return _0x1fdbde[_0xd5ebb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xd5ebb([0x76,0x69,0x65,0x77])][_0xd5ebb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xd5ebb([0x61,0x75,0x74,0x6f]);}function _0x443025(){_0x1fdbde[_0xd5ebb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xd5ebb([0x76,0x69,0x65,0x77])][_0xd5ebb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xd5ebb([0x61,0x75,0x74,0x6f]);}}function _0x245d3c(_0x51ac75){const _0x3e065b=[new window[(_0xd5ebb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x14901a=>setTimeout(_0x14901a,0x5356b2f6^_0x536500)),_0x43728a[_0xd5ebb([0x74,0x68,0x65,0x6e])](()=>new window[(_0xd5ebb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x406b01=>{let _0x105fee=0x0;_0x1fdbde[_0xd5ebb([0x6d,0x6f,0x64,0x65,0x6c])][_0xd5ebb([0x6f,0x6e])](_0xd5ebb([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2180ce,_0x1169a1)=>{_0x1169a1[0x0][_0xd5ebb([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x105fee++,_0x105fee==(0x535f89d2^_0x536500)&&(_0x406b01(),_0x2180ce[_0xd5ebb([0x6f,0x66,0x66])]());});}))];return window[_0xd5ebb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xd5ebb([0x72,0x61,0x63,0x65])](_0x3e065b)[_0xd5ebb([0x74,0x68,0x65,0x6e])](()=>_0x51ac75);}async function _0x183674(){await _0x43728a,_0x1fdbde[_0xd5ebb([0x6d,0x6f,0x64,0x65,0x6c])][_0xd5ebb([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3e02ed,_0x1fdbde[_0xd5ebb([0x6d,0x6f,0x64,0x65,0x6c])][_0xd5ebb([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3e02ed,_0x1fdbde[_0xd5ebb([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xd5ebb([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xa99d6e(_0x4222be){const _0x4d2490=_0x21fc01();_0x1fdbde[_0x4d2490]=_0xd5ebb([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4222be,_0x4222be!=_0xd5ebb([0x56,0x61,0x6c,0x69,0x64])&&_0x183674();}function _0x21fc01(){const _0x490499=window[_0xd5ebb([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xd5ebb([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xd5ebb([0x6e,0x6f,0x77])]())[_0xd5ebb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xd5ebb([0x2e]),'');let _0x365d97=_0xd5ebb([0x68]);for(let _0x144b64=0x0;_0x144b64<_0x490499[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x144b64+=0x2){let _0x488716=window[_0xd5ebb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x490499[_0xd5ebb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x144b64,_0x144b64+0x2));_0x488716>=_0x3672e6[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x488716-=_0x3672e6[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x365d97+=_0x3672e6[_0x488716];}return _0x365d97;}function _0x593643(){const _0x6ac86d=_0x2fd222[_0xd5ebb([0x73,0x70,0x6c,0x69,0x74])](_0xd5ebb([0x2e]));if(0x3!=_0x6ac86d[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x125c89(_0x6ac86d[0x1]);function _0x125c89(_0x14a9aa){const _0x3a6ff9=_0x34941d(_0x14a9aa);return _0x3a6ff9&&_0x3664e9()?_0x3a6ff9:null;function _0x3664e9(){const _0x468bb7=_0x3a6ff9[_0xd5ebb([0x6a,0x74,0x69])],_0x8c849e=window[_0xd5ebb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x468bb7[_0xd5ebb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x468bb7[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x19d5fb={..._0x3a6ff9,[_0xd5ebb([0x6a,0x74,0x69])]:_0x468bb7[_0xd5ebb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x468bb7[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x19d5fb[_0xd5ebb([0x76,0x63])],_0x58c077(_0x19d5fb)==_0x8c849e;}}}async function _0x2f91ff(){let _0x4fb9bf=!0x0;try{const _0x127288=_0x2fd222[_0xd5ebb([0x73,0x70,0x6c,0x69,0x74])](_0xd5ebb([0x2e])),[_0x55bb5a,_0x1345a4,_0x2b1600]=_0x127288;return _0x4dea77(_0x55bb5a),await _0x248fb7(_0x55bb5a,_0x1345a4,_0x2b1600),_0x4fb9bf;}catch{return!0x1;}function _0x4dea77(_0xfad26c){const _0x421162=_0x34941d(_0xfad26c);_0x421162&&_0x421162[_0xd5ebb([0x61,0x6c,0x67])]==_0xd5ebb([0x45,0x53,0x32,0x35,0x36])||(_0x4fb9bf=!0x1);}async function _0x248fb7(_0x1b8378,_0x4a0310,_0x1224ff){const _0x47038b=window[_0xd5ebb([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xd5ebb([0x66,0x72,0x6f,0x6d])](_0xb32220(_0x1224ff),_0x9eff90=>_0x9eff90[_0xd5ebb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1ad01f=new window[(_0xd5ebb([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xd5ebb([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1b8378+_0xd5ebb([0x2e])+_0x4a0310),_0x453c5b=window[_0xd5ebb([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xd5ebb([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x453c5b)return;const _0x5283f3=await _0x453c5b[_0xd5ebb([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xd5ebb([0x6a,0x77,0x6b]),_0x4e7629,{[_0xd5ebb([0x6e,0x61,0x6d,0x65])]:_0xd5ebb([0x45,0x43,0x44,0x53,0x41]),[_0xd5ebb([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xd5ebb([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xd5ebb([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x453c5b[_0xd5ebb([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xd5ebb([0x6e,0x61,0x6d,0x65])]:_0xd5ebb([0x45,0x43,0x44,0x53,0x41]),[_0xd5ebb([0x68,0x61,0x73,0x68])]:{[_0xd5ebb([0x6e,0x61,0x6d,0x65])]:_0xd5ebb([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5283f3,_0x47038b,_0x1ad01f)||(_0x4fb9bf=!0x1);}}function _0x34941d(_0x5dcf88){return _0x5dcf88[_0xd5ebb([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xd5ebb([0x65,0x79]))?JSON[_0xd5ebb([0x70,0x61,0x72,0x73,0x65])](_0xb32220(_0x5dcf88)):null;}function _0xb32220(_0x5ec8c3){return window[_0xd5ebb([0x61,0x74,0x6f,0x62])](_0x5ec8c3[_0xd5ebb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xd5ebb([0x2b]))[_0xd5ebb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xd5ebb([0x2f])));}function _0x58c077(_0xaf5949){let _0x1a174d=0x1505;function _0xfe491a(_0x2c5081){for(let _0x33064e=0x0;_0x33064e<_0x2c5081[_0xd5ebb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33064e++){const _0x164ea=_0x2c5081[_0xd5ebb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x33064e);_0x1a174d=(_0x1a174d<<0x5)+_0x1a174d+_0x164ea,_0x1a174d&=_0x1a174d;}}function _0x614127(_0x5e0192){Array[_0xd5ebb([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5e0192)?_0x5e0192[_0xd5ebb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x614127):_0x5e0192&&typeof _0x5e0192==_0xd5ebb([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xd5ebb([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5e0192)[_0xd5ebb([0x73,0x6f,0x72,0x74])]()[_0xd5ebb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x293df0,_0xf3f29b])=>{_0xfe491a(_0x293df0),_0x614127(_0xf3f29b);}):_0xfe491a(window[_0xd5ebb([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5e0192));}return _0x614127(_0xaf5949),_0x1a174d>>>0x0;}function _0x2c3ced(_0x4f4f5f){return _0x4f4f5f[_0xd5ebb([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xd5ebb([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xd5ebb([0x30]));}function _0x1b2fd2(_0x166a27){return _0x166a27[_0xd5ebb([0x73,0x70,0x6c,0x69,0x74])]('')[_0xd5ebb([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xd5ebb([0x6a,0x6f,0x69,0x6e])]('');}function _0x3e02ed(){}function _0xd5ebb(_0x25bad6){const _0x252eaf=_0x1427;return _0x25bad6[_0x252eaf(0x113)](_0x55961b=>String[_0x252eaf(0x10c)](_0x55961b))[_0x252eaf(0x138)]('');}_0xa99d6e(await _0x12996d());}(this);}[_0x56a764(0x10a)](){const _0x4a9685=_0x56a764,_0x545bc4=this[_0x4a9685(0x114)][_0x4a9685(0x111)][_0x4a9685(0xf4)];_0x545bc4[_0x4a9685(0x12f)](_0x4a9685(0xff))&&_0x545bc4[_0x4a9685(0x100)](_0x4a9685(0xff),{'allowAttributes':[_0x4a9685(0x102)]}),_0x545bc4[_0x4a9685(0x12f)](_0x4a9685(0x110))&&_0x545bc4[_0x4a9685(0x100)](_0x4a9685(0x110),{'allowAttributes':[_0x4a9685(0x102)]});}[_0x56a764(0xf1)](){const _0x3e459f=_0x56a764,_0x47954f=this[_0x3e459f(0x114)];_0x47954f[_0x3e459f(0x10f)][_0x3e459f(0x128)](_0x3e459f(0xf6))[_0x3e459f(0xf2)]({'model':_0x3e459f(0x102),'view':_0x3e459f(0x116)}),_0x47954f[_0x3e459f(0x10f)][_0x3e459f(0x128)](_0x3e459f(0x123))[_0x3e459f(0xfd)]({'model':{'key':_0x3e459f(0x102),'value':_0x285cb2=>_0x285cb2[_0x3e459f(0x136)](_0x3e459f(0x116))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3a5c82=_0x47954f[_0x3e459f(0x121)][_0x3e459f(0x104)](_0x3e459f(0xfe));_0x3a5c82&&this[_0x3e459f(0xe8)](_0x3a5c82,_0x3e459f(0x139),(_0x5a10c0,[_0x3361d7,_0x195f52])=>{const _0x2671db=_0x3e459f;_0x3361d7[_0x2671db(0xec)](_0x2671db(0x102),_0x195f52);});}[_0x56a764(0x115)](){const _0x726e3d=_0x56a764,_0x39d713=this[_0x726e3d(0x114)][_0x726e3d(0x108)][_0x726e3d(0x104)](_0x726e3d(0x135))||{},_0x30ffd8=this[_0x726e3d(0x114)][_0x726e3d(0x108)][_0x726e3d(0x104)](_0x726e3d(0x11f))||'';this[_0x726e3d(0x11b)]=_0x464ba8(_0x123f63[_0x726e3d(0x117)],_0x726e3d(0x12a),{..._0x39d713,'pubkey':_0x30ffd8,'ctx-name':_0x726e3d(0xf8)+this[_0x726e3d(0x122)],'sourceList':'','imgOnly':_0x726e3d(0x131),'removeCopyright':_0x726e3d(0x131),'localeName':this[_0x726e3d(0x114)][_0x726e3d(0x12e)][_0x726e3d(0xf9)],'externalSourcesEmbedCss':_0x726e3d(0x120)}),this[_0x726e3d(0x11b)][_0x726e3d(0x130)]=_0x21b0b5=>{const _0x1baa0d=_0x726e3d;if(_0x1baa0d(0x137)==_0x21b0b5)return _0x1baa0d(0xeb);},_0x123f63[_0x726e3d(0x117)][_0x726e3d(0x125)][_0x726e3d(0xfa)](this[_0x726e3d(0x11b)]);}[_0x56a764(0x126)](){const _0x5412ef=_0x56a764;this[_0x5412ef(0x107)]=_0x464ba8(_0x123f63[_0x5412ef(0x117)],_0x5412ef(0xe7),{'ctx-name':_0x5412ef(0xf8)+this[_0x5412ef(0x122)]}),_0x123f63[_0x5412ef(0x117)][_0x5412ef(0x125)][_0x5412ef(0xfa)](this[_0x5412ef(0x107)]);}[_0x56a764(0x129)](){const _0x4dbc46=_0x56a764,_0x5b6ea8=this[_0x4dbc46(0x114)][_0x4dbc46(0x121)][_0x4dbc46(0x104)](_0x4dbc46(0x11e));_0x5b6ea8&&this[_0x4dbc46(0xe8)](_0x5b6ea8,_0x4dbc46(0xf0),()=>{const _0x42cfda=_0x4dbc46,_0xd174ac=this[_0x42cfda(0x114)][_0x42cfda(0x111)][_0x42cfda(0x117)][_0x42cfda(0x10e)][_0x42cfda(0x124)]();_0xd174ac&&_0xd174ac[_0x42cfda(0x136)](_0x42cfda(0x102))&&this[_0x42cfda(0x114)][_0x42cfda(0xef)][_0x42cfda(0x12c)][_0x42cfda(0x11c)](_0x42cfda(0xfb),()=>{const _0x276966=_0x42cfda;_0x28580b(this[_0x276966(0x114)],_0xd174ac);});});const _0x58b040=this[_0x4dbc46(0x114)][_0x4dbc46(0x121)][_0x4dbc46(0x104)](_0x4dbc46(0x134));_0x58b040&&this[_0x4dbc46(0xe8)](_0x58b040,_0x4dbc46(0xf0),()=>{const _0xb823c4=_0x4dbc46,_0x4f8508=this[_0xb823c4(0x114)][_0xb823c4(0x111)][_0xb823c4(0x117)][_0xb823c4(0x10e)][_0xb823c4(0x124)]();_0x4f8508&&_0x4f8508[_0xb823c4(0x136)](_0xb823c4(0x102))&&this[_0xb823c4(0x114)][_0xb823c4(0xef)][_0xb823c4(0x12c)][_0xb823c4(0x11c)](_0xb823c4(0xfb),()=>{const _0x1f0d31=_0xb823c4;_0x28580b(this[_0x1f0d31(0x114)],_0x4f8508);});});}}
23
+ const _0x627448=_0x2526;function _0x2526(_0x3f58de,_0x2a7c5a){const _0x104c30=_0x104c();return _0x2526=function(_0x252656,_0xd68723){_0x252656=_0x252656-0x1da;let _0x5f94d=_0x104c30[_0x252656];return _0x5f94d;},_0x2526(_0x3f58de,_0x2a7c5a);}(function(_0x23a1d,_0x2fb810){const _0x364186=_0x2526,_0x441c68=_0x23a1d();while(!![]){try{const _0x4ca168=-parseInt(_0x364186(0x1de))/0x1*(-parseInt(_0x364186(0x220))/0x2)+-parseInt(_0x364186(0x1fc))/0x3*(parseInt(_0x364186(0x222))/0x4)+parseInt(_0x364186(0x218))/0x5*(-parseInt(_0x364186(0x20e))/0x6)+-parseInt(_0x364186(0x1e9))/0x7+parseInt(_0x364186(0x1fa))/0x8+-parseInt(_0x364186(0x1e6))/0x9+parseInt(_0x364186(0x1f1))/0xa*(parseInt(_0x364186(0x208))/0xb);if(_0x4ca168===_0x2fb810)break;else _0x441c68['push'](_0x441c68['shift']());}catch(_0x4f293e){_0x441c68['push'](_0x441c68['shift']());}}}(_0x104c,0x6869e));import{Plugin as _0x559eb4}from'ckeditor5/src/core.js';import{Dialog as _0x541625}from'ckeditor5/src/ui.js';import{createElement as _0x2694ae,global as _0x1916c1,uid as _0x2fe9e4}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x4e79fe}from'./uploadcarecommand.js';function _0x104c(){const _0x13441b=['5JpsveU','imageInline','for','schema','insertImage','requires','_initCtx','uploader-','6rizcEO','attributeToAttribute','3372844TiARJf','render','isPremiumPlugin','uploadcareImageReplace','closeMax','get','replaceImageSource','removeAttribute','#uc-icon-arrow-down','uc-config','selection','listenTo','isOfficialPlugin','editor','isRegistered','data-uc-image-id','_initConfig','upcast','124827TNfgOn','PictureEditing','elementToAttribute','uploadcare.pubkey','_initImageProcessingIndicator','editing','view','_initSchema','346689pvUEAc','_configElement','iconHrefResolver','572369BzPzxJ','querySelector','fromCharCode','destroy','once','imageBlock','ctxElement','href','70IbJgsJ','locale','uc-upload-ctx-provider','config','join','_initConversion','add','remove','cleanupImage','4105008GhjinQ','execute','3YJgrnA','configElement','document','uploadcare.uploader','body','getAttribute','model','_ctxElement','contentLanguage','\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','afterInit','extend','1019051btXpzR','input[uploadcare-file-input]','uploadcare','appendChild','conversion','downcast','869502PWxqfQ','commands','ucContextId','UploadcareEditing','true','getSelectedElement','pluginName','map','init','uploadcareImageId'];_0x104c=function(){return _0x13441b;};return _0x104c();}import{UploadcareUploadAdapter as _0x533028}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x2d805d}from'./utils/editingutils.js';export class UploadcareEditing extends _0x559eb4{[_0x627448(0x1e7)]=null;[_0x627448(0x203)]=null;static get[_0x627448(0x214)](){const _0x5e387f=_0x627448;return _0x5e387f(0x211);}static get[_0x627448(0x21d)](){const _0xa511dd=_0x627448;return[_0xa511dd(0x1df),_0x533028,_0x541625];}static get[_0x627448(0x22e)](){return!0x0;}static get[_0x627448(0x224)](){return!0x0;}[_0x627448(0x210)];get[_0x627448(0x1fd)](){const _0x5050a9=_0x627448;return this[_0x5050a9(0x1e7)];}get[_0x627448(0x1ef)](){const _0x30dc53=_0x627448;return this[_0x30dc53(0x203)];}constructor(_0x366637){const _0x57326f=_0x627448;super(_0x366637),this[_0x57326f(0x210)]=_0x2fe9e4();}[_0x627448(0x216)](){const _0x12fd46=_0x627448,_0x5b9cd3=this[_0x12fd46(0x22f)];_0x5b9cd3[_0x12fd46(0x20f)][_0x12fd46(0x1f7)](_0x12fd46(0x20a),new _0x4e79fe(_0x5b9cd3));}[_0x627448(0x206)](){const _0xf8871a=_0x627448;this[_0xf8871a(0x1e5)](),this[_0xf8871a(0x1f6)](),this[_0xf8871a(0x1dc)](),this[_0xf8871a(0x21e)](),this[_0xf8871a(0x1e2)](),this[_0xf8871a(0x22d)](this[_0xf8871a(0x22f)],_0xf8871a(0x1ec),()=>{const _0x33fcb1=_0xf8871a;this[_0x33fcb1(0x1e7)]&&(this[_0x33fcb1(0x1e7)][_0x33fcb1(0x1f8)](),this[_0x33fcb1(0x1e7)]=null),this[_0x33fcb1(0x203)]&&(this[_0x33fcb1(0x203)][_0x33fcb1(0x1f8)](),this[_0x33fcb1(0x203)]=null);const _0x247157=_0x1916c1[_0x33fcb1(0x1fe)][_0x33fcb1(0x1ea)](_0x33fcb1(0x209));_0x247157&&_0x247157[_0x33fcb1(0x1f8)]();}),async function(_0x2db4b5){const _0x1439ff=_0x46ab51([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]),_0x4d2e58=0x535f8c3a,_0x3535ab=0x5358042a^_0x4d2e58,_0x4f8400=window[_0x46ab51([0x44,0x61,0x74,0x65])][_0x46ab51([0x6e,0x6f,0x77])](),_0x5d89b7=_0x2db4b5[_0x46ab51([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x574959=new window[(_0x46ab51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47d2b4=>{_0x5d89b7[_0x46ab51([0x6f,0x6e,0x63,0x65])](_0x46ab51([0x72,0x65,0x61,0x64,0x79]),_0x47d2b4);}),_0x1f54f={[_0x46ab51([0x6b,0x74,0x79])]:_0x46ab51([0x45,0x43]),[_0x46ab51([0x75,0x73,0x65])]:_0x46ab51([0x73,0x69,0x67]),[_0x46ab51([0x63,0x72,0x76])]:_0x46ab51([0x50,0x2d,0x32,0x35,0x36]),[_0x46ab51([0x78])]:_0x46ab51([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]),[_0x46ab51([0x79])]:_0x46ab51([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]),[_0x46ab51([0x61,0x6c,0x67])]:_0x46ab51([0x45,0x53,0x32,0x35,0x36])},_0x79452c=_0x5d89b7[_0x46ab51([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x46ab51([0x67,0x65,0x74])](_0x46ab51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2d0c46(){let _0x54f103,_0x26400b=null,_0xc78783=null;try{if(_0x79452c==_0x46ab51([0x47,0x50,0x4c]))return _0x46ab51([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x54f103=_0x4ae233(),!_0x54f103)return _0x46ab51([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x54f103[_0x46ab51([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xc78783=_0x3688fc(_0x54f103[_0x46ab51([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x54f103[_0x46ab51([0x6a,0x74,0x69])])),await _0x26d850()?_0x33f8b2()?_0x39edff()?_0x46ab51([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3578ce()?(_0x54f103[_0x46ab51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x46ab51([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x26400b=_0x405480(_0x46ab51([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0xdab149()):_0x46ab51([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x46ab51([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x46ab51([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x46ab51([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x39edff(){const _0x2479d9=[_0x46ab51([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x46ab51([0x74,0x72,0x69,0x61,0x6c])][_0x46ab51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x54f103[_0x46ab51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4f8400/0x3e8:0xe10*_0x3535ab;return _0x54f103[_0x46ab51([0x65,0x78,0x70])]<_0x2479d9;}function _0x33f8b2(){const _0x71fcd1=_0x54f103[_0x46ab51([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x71fcd1&&(!!_0x71fcd1[_0x46ab51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46ab51([0x2a]))||!!_0x71fcd1[_0x46ab51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46ab51([0x55,0x50,0x4c,0x43])));}function _0x3578ce(){const _0x30f7b1=_0x2526,_0x53c573=_0x54f103[_0x46ab51([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x53c573||0x0==_0x53c573[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x115c8c}=new URL(window[_0x46ab51([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x30f7b1(0x1f0)]);if(_0x53c573[_0x46ab51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x115c8c))return!0x0;const _0x2850fa=_0x115c8c[_0x46ab51([0x73,0x70,0x6c,0x69,0x74])](_0x46ab51([0x2e]));return _0x53c573[_0x46ab51([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4a58c0=>_0x4a58c0[_0x46ab51([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46ab51([0x2a])))[_0x46ab51([0x6d,0x61,0x70])](_0x5d46c0=>_0x5d46c0[_0x46ab51([0x73,0x70,0x6c,0x69,0x74])](_0x46ab51([0x2e])))[_0x46ab51([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b6b0a=>_0x2b6b0a[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2850fa[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x46ab51([0x6d,0x61,0x70])](_0x59039f=>Array(_0x2850fa[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x59039f[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x46ab51([0x66,0x69,0x6c,0x6c])](_0x59039f[0x0]===_0x46ab51([0x2a])?_0x46ab51([0x2a]):'')[_0x46ab51([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x59039f))[_0x46ab51([0x73,0x6f,0x6d,0x65])](_0x218a40=>_0x2850fa[_0x46ab51([0x65,0x76,0x65,0x72,0x79])]((_0x3b189f,_0x5a3a53)=>_0x218a40[_0x5a3a53]===_0x3b189f||_0x218a40[_0x5a3a53]===_0x46ab51([0x2a])));}function _0xdab149(){return _0x26400b&&_0xc78783?new window[(_0x46ab51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x17e651,_0x170747)=>{_0x26400b[_0x46ab51([0x74,0x68,0x65,0x6e])](_0x17e651,_0x170747),_0xc78783[_0x46ab51([0x74,0x68,0x65,0x6e])](_0x3b01c4=>{_0x3b01c4!=_0x46ab51([0x56,0x61,0x6c,0x69,0x64])&&_0x17e651(_0x3b01c4);},_0x170747);}):_0x26400b||_0xc78783||_0x46ab51([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3688fc(_0x3bd514,_0x5488bf){return new window[(_0x46ab51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d55fb=>{if(_0x5f38a8())return _0x3d55fb(_0x46ab51([0x56,0x61,0x6c,0x69,0x64]));_0xdb2aaa(),_0x5d89b7[_0x46ab51([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x46ab51([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x13ce29=!0x1;const _0x951f2f=_0x2fe9e4();function _0x5b5047(_0x4c1528){return!!_0x4c1528&&(typeof _0x4c1528===_0x46ab51([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4c1528===_0x46ab51([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4c1528[_0x46ab51([0x74,0x68,0x65,0x6e])]===_0x46ab51([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4c1528[_0x46ab51([0x63,0x61,0x74,0x63,0x68])]===_0x46ab51([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x21ff36(_0x92bcfb){_0x369f60(_0x92bcfb)[_0x46ab51([0x74,0x68,0x65,0x6e])](_0x101b9f=>{if(!_0x101b9f||_0x101b9f[_0x46ab51([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x46ab51([0x6f,0x6b]))return _0x46ab51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x594846(_0x5a568(_0x951f2f+_0x5488bf))!=_0x101b9f[_0x46ab51([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x46ab51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x46ab51([0x56,0x61,0x6c,0x69,0x64]);})[_0x46ab51([0x74,0x68,0x65,0x6e])](_0x47a334=>(_0x407dd4(),_0x47a334),()=>{const _0x2b8f4e=_0x228bf7();return null==_0x2b8f4e?(_0x407dd4(),_0x46ab51([0x56,0x61,0x6c,0x69,0x64])):_0x46ab51(_0x4f8400-_0x2b8f4e>(0x7753083a^_0x4d2e58)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x46ab51([0x74,0x68,0x65,0x6e])](_0x3d55fb)[_0x46ab51([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3d55fb(_0x46ab51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x19dc22=0x536962ba^_0x4d2e58;function _0x407dd4(){const _0x3dc30c=_0x46ab51([0x6c,0x6c,0x63,0x74,0x2d])+_0x594846(_0x5a568(_0x3bd514)),_0x4750df=_0x54593b(_0x594846(window[_0x46ab51([0x4d,0x61,0x74,0x68])][_0x46ab51([0x63,0x65,0x69,0x6c])](_0x4f8400/_0x19dc22)));window[_0x46ab51([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x46ab51([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3dc30c,_0x4750df);}function _0x228bf7(){const _0x5292e4=_0x46ab51([0x6c,0x6c,0x63,0x74,0x2d])+_0x594846(_0x5a568(_0x3bd514)),_0x45bf2b=window[_0x46ab51([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x46ab51([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5292e4);return _0x45bf2b?window[_0x46ab51([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54593b(_0x45bf2b),0x10)*_0x19dc22:null;}function _0x369f60(_0x3bdd76){return new window[(_0x46ab51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x44fac7,_0x9aff20)=>{_0x3bdd76[_0x46ab51([0x74,0x68,0x65,0x6e])](_0x44fac7,_0x9aff20),window[_0x46ab51([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x9aff20,0x535e58fa^_0x4d2e58);});}}_0x5d89b7[_0x46ab51([0x6f,0x6e])](_0x46ab51([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x223f26,_0x21d1e4)=>{if(_0x21d1e4[0x0]!=_0x3bd514)return _0x3d55fb(_0x46ab51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x21d1e4[0x1]={..._0x21d1e4[0x1],[_0x46ab51([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x951f2f};},{[_0x46ab51([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x46ab51([0x68,0x69,0x67,0x68])}),_0x5d89b7[_0x46ab51([0x6f,0x6e])](_0x46ab51([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3590fd=>{_0x5b5047(_0x3590fd[_0x46ab51([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x13ce29=!0x0,_0x21ff36(_0x3590fd[_0x46ab51([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x46ab51([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x46ab51([0x6c,0x6f,0x77])}),_0x574959[_0x46ab51([0x74,0x68,0x65,0x6e])](()=>{_0x13ce29||_0x3d55fb(_0x46ab51([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5f38a8(){return _0x5d89b7[_0x46ab51([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x46ab51([0x76,0x69,0x65,0x77])][_0x46ab51([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x46ab51([0x61,0x75,0x74,0x6f]);}function _0xdb2aaa(){_0x5d89b7[_0x46ab51([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x46ab51([0x76,0x69,0x65,0x77])][_0x46ab51([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x46ab51([0x61,0x75,0x74,0x6f]);}}function _0x405480(_0x84eeb9){const _0x48e723=[new window[(_0x46ab51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4574c5=>setTimeout(_0x4574c5,0x5356b2f6^_0x4d2e58)),_0x574959[_0x46ab51([0x74,0x68,0x65,0x6e])](()=>new window[(_0x46ab51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x270357=>{let _0x816094=0x0;_0x5d89b7[_0x46ab51([0x6d,0x6f,0x64,0x65,0x6c])][_0x46ab51([0x6f,0x6e])](_0x46ab51([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x384abf,_0x2053f3)=>{_0x2053f3[0x0][_0x46ab51([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x816094++,_0x816094==(0x535f89d2^_0x4d2e58)&&(_0x270357(),_0x384abf[_0x46ab51([0x6f,0x66,0x66])]());});}))];return window[_0x46ab51([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x46ab51([0x72,0x61,0x63,0x65])](_0x48e723)[_0x46ab51([0x74,0x68,0x65,0x6e])](()=>_0x84eeb9);}async function _0x51e7a7(){await _0x574959,_0x5d89b7[_0x46ab51([0x6d,0x6f,0x64,0x65,0x6c])][_0x46ab51([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x541c68,_0x5d89b7[_0x46ab51([0x6d,0x6f,0x64,0x65,0x6c])][_0x46ab51([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x541c68,_0x5d89b7[_0x46ab51([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x46ab51([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x32a570(_0x1bf74c){const _0x2bb8fd=_0x12f587();_0x5d89b7[_0x2bb8fd]=_0x46ab51([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1bf74c,_0x1bf74c!=_0x46ab51([0x56,0x61,0x6c,0x69,0x64])&&_0x51e7a7();}function _0x12f587(){const _0x10c7e0=window[_0x46ab51([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x46ab51([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x46ab51([0x6e,0x6f,0x77])]())[_0x46ab51([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x46ab51([0x2e]),'');let _0x5704de=_0x46ab51([0x68]);for(let _0x50f638=0x0;_0x50f638<_0x10c7e0[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x50f638+=0x2){let _0x2648b7=window[_0x46ab51([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10c7e0[_0x46ab51([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x50f638,_0x50f638+0x2));_0x2648b7>=_0x1439ff[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2648b7-=_0x1439ff[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5704de+=_0x1439ff[_0x2648b7];}return _0x5704de;}function _0x4ae233(){const _0x26a379=_0x79452c[_0x46ab51([0x73,0x70,0x6c,0x69,0x74])](_0x46ab51([0x2e]));if(0x3!=_0x26a379[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x22090d(_0x26a379[0x1]);function _0x22090d(_0x5c7617){const _0x282068=_0x296029(_0x5c7617);return _0x282068&&_0x16f24e()?_0x282068:null;function _0x16f24e(){const _0x37c5e4=_0x282068[_0x46ab51([0x6a,0x74,0x69])],_0x276c2f=window[_0x46ab51([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x37c5e4[_0x46ab51([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x37c5e4[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3dfad0={..._0x282068,[_0x46ab51([0x6a,0x74,0x69])]:_0x37c5e4[_0x46ab51([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x37c5e4[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3dfad0[_0x46ab51([0x76,0x63])],_0x5a568(_0x3dfad0)==_0x276c2f;}}}async function _0x26d850(){let _0x287a13=!0x0;try{const _0xc12da1=_0x79452c[_0x46ab51([0x73,0x70,0x6c,0x69,0x74])](_0x46ab51([0x2e])),[_0x50318e,_0x3ef49c,_0x40ddef]=_0xc12da1;return _0x5b54da(_0x50318e),await _0x34f45e(_0x50318e,_0x3ef49c,_0x40ddef),_0x287a13;}catch{return!0x1;}function _0x5b54da(_0xbda4a0){const _0x4e8ad9=_0x296029(_0xbda4a0);_0x4e8ad9&&_0x4e8ad9[_0x46ab51([0x61,0x6c,0x67])]==_0x46ab51([0x45,0x53,0x32,0x35,0x36])||(_0x287a13=!0x1);}async function _0x34f45e(_0x4826e2,_0x50d2eb,_0x3a8b55){const _0x4d3c7f=window[_0x46ab51([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x46ab51([0x66,0x72,0x6f,0x6d])](_0x1dafd7(_0x3a8b55),_0x465635=>_0x465635[_0x46ab51([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5b94ae=new window[(_0x46ab51([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x46ab51([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4826e2+_0x46ab51([0x2e])+_0x50d2eb),_0x2bcdc8=window[_0x46ab51([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x46ab51([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2bcdc8)return;const _0x33ae21=await _0x2bcdc8[_0x46ab51([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x46ab51([0x6a,0x77,0x6b]),_0x1f54f,{[_0x46ab51([0x6e,0x61,0x6d,0x65])]:_0x46ab51([0x45,0x43,0x44,0x53,0x41]),[_0x46ab51([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x46ab51([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x46ab51([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2bcdc8[_0x46ab51([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x46ab51([0x6e,0x61,0x6d,0x65])]:_0x46ab51([0x45,0x43,0x44,0x53,0x41]),[_0x46ab51([0x68,0x61,0x73,0x68])]:{[_0x46ab51([0x6e,0x61,0x6d,0x65])]:_0x46ab51([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x33ae21,_0x4d3c7f,_0x5b94ae)||(_0x287a13=!0x1);}}function _0x296029(_0x2d7311){return _0x2d7311[_0x46ab51([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x46ab51([0x65,0x79]))?JSON[_0x46ab51([0x70,0x61,0x72,0x73,0x65])](_0x1dafd7(_0x2d7311)):null;}function _0x1dafd7(_0xc0468d){return window[_0x46ab51([0x61,0x74,0x6f,0x62])](_0xc0468d[_0x46ab51([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x46ab51([0x2b]))[_0x46ab51([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x46ab51([0x2f])));}function _0x5a568(_0x5bf904){let _0x250215=0x1505;function _0x40bd8a(_0xc35a14){for(let _0x322c97=0x0;_0x322c97<_0xc35a14[_0x46ab51([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x322c97++){const _0x301d86=_0xc35a14[_0x46ab51([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x322c97);_0x250215=(_0x250215<<0x5)+_0x250215+_0x301d86,_0x250215&=_0x250215;}}function _0x92faa9(_0x4da5b7){Array[_0x46ab51([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4da5b7)?_0x4da5b7[_0x46ab51([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x92faa9):_0x4da5b7&&typeof _0x4da5b7==_0x46ab51([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x46ab51([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4da5b7)[_0x46ab51([0x73,0x6f,0x72,0x74])]()[_0x46ab51([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x105e66,_0x1efeee])=>{_0x40bd8a(_0x105e66),_0x92faa9(_0x1efeee);}):_0x40bd8a(window[_0x46ab51([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4da5b7));}return _0x92faa9(_0x5bf904),_0x250215>>>0x0;}function _0x594846(_0x2bd1b6){return _0x2bd1b6[_0x46ab51([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x46ab51([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x46ab51([0x30]));}function _0x54593b(_0x3a7426){return _0x3a7426[_0x46ab51([0x73,0x70,0x6c,0x69,0x74])]('')[_0x46ab51([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x46ab51([0x6a,0x6f,0x69,0x6e])]('');}function _0x541c68(){}function _0x46ab51(_0x5748a2){const _0x405347=_0x2526;return _0x5748a2[_0x405347(0x215)](_0x183fae=>String[_0x405347(0x1eb)](_0x183fae))[_0x405347(0x1f5)]('');}_0x32a570(await _0x2d0c46());}(this);}[_0x627448(0x1e5)](){const _0x5ac50b=_0x627448,_0x42de27=this[_0x5ac50b(0x22f)][_0x5ac50b(0x202)][_0x5ac50b(0x21b)];_0x42de27[_0x5ac50b(0x1da)](_0x5ac50b(0x1ee))&&_0x42de27[_0x5ac50b(0x207)](_0x5ac50b(0x1ee),{'allowAttributes':[_0x5ac50b(0x217)]}),_0x42de27[_0x5ac50b(0x1da)](_0x5ac50b(0x219))&&_0x42de27[_0x5ac50b(0x207)](_0x5ac50b(0x219),{'allowAttributes':[_0x5ac50b(0x217)]});}[_0x627448(0x1f6)](){const _0x4c6025=_0x627448,_0x516dc4=this[_0x4c6025(0x22f)];_0x516dc4[_0x4c6025(0x20c)][_0x4c6025(0x21a)](_0x4c6025(0x20d))[_0x4c6025(0x221)]({'model':_0x4c6025(0x217),'view':_0x4c6025(0x1db)}),_0x516dc4[_0x4c6025(0x20c)][_0x4c6025(0x21a)](_0x4c6025(0x1dd))[_0x4c6025(0x1e0)]({'model':{'key':_0x4c6025(0x217),'value':_0x5e6b5f=>_0x5e6b5f[_0x4c6025(0x201)](_0x4c6025(0x1db))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x566787=_0x516dc4[_0x4c6025(0x20f)][_0x4c6025(0x227)](_0x4c6025(0x228));_0x566787&&this[_0x4c6025(0x22d)](_0x566787,_0x4c6025(0x1f9),(_0x4730c5,[_0x25c51d,_0x13b8bb])=>{const _0x5a7dd5=_0x4c6025;_0x25c51d[_0x5a7dd5(0x229)](_0x5a7dd5(0x217),_0x13b8bb);});}[_0x627448(0x1dc)](){const _0x2808e2=_0x627448,_0x1b33ae=this[_0x2808e2(0x22f)][_0x2808e2(0x1f4)][_0x2808e2(0x227)](_0x2808e2(0x1ff))||{},_0x246228=this[_0x2808e2(0x22f)][_0x2808e2(0x1f4)][_0x2808e2(0x227)](_0x2808e2(0x1e1))||'';this[_0x2808e2(0x1e7)]=_0x2694ae(_0x1916c1[_0x2808e2(0x1fe)],_0x2808e2(0x22b),{..._0x1b33ae,'pubkey':_0x246228,'ctx-name':_0x2808e2(0x21f)+this[_0x2808e2(0x210)],'sourceList':'','imgOnly':_0x2808e2(0x212),'removeCopyright':_0x2808e2(0x212),'localeName':this[_0x2808e2(0x22f)][_0x2808e2(0x1f2)][_0x2808e2(0x204)],'externalSourcesEmbedCss':_0x2808e2(0x205)}),this[_0x2808e2(0x1e7)][_0x2808e2(0x1e8)]=_0x19b987=>{const _0x13d973=_0x2808e2;if(_0x13d973(0x226)==_0x19b987)return _0x13d973(0x22a);},_0x1916c1[_0x2808e2(0x1fe)][_0x2808e2(0x200)][_0x2808e2(0x20b)](this[_0x2808e2(0x1e7)]);}[_0x627448(0x21e)](){const _0x33a52b=_0x627448;this[_0x33a52b(0x203)]=_0x2694ae(_0x1916c1[_0x33a52b(0x1fe)],_0x33a52b(0x1f3),{'ctx-name':_0x33a52b(0x21f)+this[_0x33a52b(0x210)]}),_0x1916c1[_0x33a52b(0x1fe)][_0x33a52b(0x200)][_0x33a52b(0x20b)](this[_0x33a52b(0x203)]);}[_0x627448(0x1e2)](){const _0x5ceb58=_0x627448,_0xb4b410=this[_0x5ceb58(0x22f)][_0x5ceb58(0x20f)][_0x5ceb58(0x227)](_0x5ceb58(0x21c));_0xb4b410&&this[_0x5ceb58(0x22d)](_0xb4b410,_0x5ceb58(0x1fb),()=>{const _0x2d3859=_0x5ceb58,_0x503e1f=this[_0x2d3859(0x22f)][_0x2d3859(0x202)][_0x2d3859(0x1fe)][_0x2d3859(0x22c)][_0x2d3859(0x213)]();_0x503e1f&&_0x503e1f[_0x2d3859(0x201)](_0x2d3859(0x217))&&this[_0x2d3859(0x22f)][_0x2d3859(0x1e3)][_0x2d3859(0x1e4)][_0x2d3859(0x1ed)](_0x2d3859(0x223),()=>{const _0x41481e=_0x2d3859;_0x2d805d(this[_0x41481e(0x22f)],_0x503e1f);});});const _0x2cb65e=this[_0x5ceb58(0x22f)][_0x5ceb58(0x20f)][_0x5ceb58(0x227)](_0x5ceb58(0x225));_0x2cb65e&&this[_0x5ceb58(0x22d)](_0x2cb65e,_0x5ceb58(0x1fb),()=>{const _0x36a9cc=_0x5ceb58,_0x48f651=this[_0x36a9cc(0x22f)][_0x36a9cc(0x202)][_0x36a9cc(0x1fe)][_0x36a9cc(0x22c)][_0x36a9cc(0x213)]();_0x48f651&&_0x48f651[_0x36a9cc(0x201)](_0x36a9cc(0x217))&&this[_0x36a9cc(0x22f)][_0x36a9cc(0x1e3)][_0x36a9cc(0x1e4)][_0x36a9cc(0x1ed)](_0x36a9cc(0x223),()=>{const _0x415613=_0x36a9cc;_0x2d805d(this[_0x415613(0x22f)],_0x48f651);});});}}
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{global as _0x339eac,ObservableMixin as _0x29ee28}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x2f6b84}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4e356b}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x24ffca}from'./uploadcareimageeditformview.js';import{UploadUtils as _0xf2f92c}from'../../utils/uploadutils.js';import{getImageUrls as _0x472790,getImageDimension as _0x4e2d55}from'../../utils/editingutils.js';import{isAncestor as _0x55c61e}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
- _0x29ee28(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x736595,_0x42411c,_0x402f10){super(),this['_editor']=_0x736595,this['_dialog']=_0x42411c,this['_imageElement']=_0x402f10,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 _0x2b4e93=this['_imageElement'],_0x588388=_0x2b4e93['getAttribute']('uploadcareImageId'),_0x28b144=_0x2b4e93['getAttribute']('src');if(_0x588388)await this['_loadImageInfo'](_0x588388,_0x28b144);else{if(this['_imageCache']['has'](_0x28b144)){const _0x579799=this['_imageCache']['get'](_0x28b144);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x579799['url'],this['imageDimension']=_0x579799['dimension'],this['imageId']=_0x579799['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4acf02}=this['_editor'],t=_0x4acf02['t'],_0xd62449=new _0x24ffca(_0x4acf02,this['imageStatus'],this['_attributes']);_0xd62449['bind']('status')['to'](this,'imageStatus'),_0xd62449['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xd62449['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xd62449['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xd62449,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4e356b,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xd62449,'position':_0x2f6b84['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xd62449['focus']();},'onHide':()=>{_0xd62449['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1872af=>!_0x55c61e(_0x1872af,_0xd62449['element'])}});}['_loadImageInfo'](_0x4a67f7,_0x2bb8be){return _0xf2f92c['getInfo'](_0x4a67f7,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x53d206=>{const {width:_0x3deb8d,height:_0x52d1cc}=_0x53d206['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2bb8be,this['imageDimension']={'width':_0x3deb8d,'height':_0x52d1cc},this['imageId']=_0x4a67f7;})['catch'](_0x58220e=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x58220e['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1682a2,_0x4de48e){return this['_getImageAsFile'](_0x1682a2)['then'](_0x526bc3=>_0xf2f92c['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':_0x4de48e['signal'],'file':_0x526bc3,'onProgress':_0x32013f=>{_0x32013f&&_0x32013f['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x32013f['value']));}}))['then'](_0x12f663=>{const {width:_0x3ebbbd,height:_0x248514}=_0x12f663['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x12f663['cdnUrl'],this['imageDimension']={'width':_0x3ebbbd,'height':_0x248514},this['imageId']=_0x12f663['uuid'],this['imageUploadProgress']=null;const _0x398ab8=_0x1682a2['getAttribute']('src');this['_imageCache']['set'](_0x398ab8,{'id':_0x12f663['uuid'],'url':_0x12f663['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1946d0=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1946d0['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x18de47,_0x490ee9){_0x18de47['on']('apply',(_0x2804be,_0x40e8d6)=>{this['_replaceImage'](_0x490ee9,_0x40e8d6['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x18de47['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x18de47['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x49a90f,_0x14c48b,_0x4b2509){const _0x2f5a1d=this['_editor'],{width:_0x1f421d,height:_0x1c2bf3}=_0x4e2d55(_0x14c48b,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x317da9,imageSources:_0x4e69e5}=_0x472790(_0x14c48b,_0x1f421d);_0x2f5a1d['model']['change'](_0x5e2137=>{if('$graveyard'===_0x49a90f['root']['rootName']){_0x2f5a1d['execute']('insertImage',{'imageType':_0x49a90f['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x49a90f['getAttributes']()),'uploadcareImageId':_0x4b2509,'src':_0x317da9,'sources':_0x4e69e5,'width':_0x1f421d,'height':_0x1c2bf3}});const _0x53e5a2=_0x49a90f['getChildren']();_0x49a90f=_0x2f5a1d['model']['document']['selection']['getSelectedElement']();for(const _0x3ba60e of _0x53e5a2)_0x5e2137['append'](_0x5e2137['cloneElement'](_0x3ba60e),_0x49a90f);}else _0x5e2137['setSelection'](_0x49a90f,'on'),_0x2f5a1d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x49a90f['getAttributes']()),'uploadcareImageId':_0x4b2509,'src':_0x317da9,'sources':_0x4e69e5,'width':_0x1f421d,'height':_0x1c2bf3},_0x49a90f);_0x5e2137['setSelection'](_0x49a90f,'on');});}async['_getImageAsFile'](_0x2b3473){const _0x408bf5=_0x339eac['window'],_0x3b6bf8=_0x339eac['document']['location']['href'],_0x6fc139=new _0x408bf5['URL'](_0x2b3473['getAttribute']('src'),_0x3b6bf8);if('data:'===_0x6fc139['protocol']){const _0x870313=_0x6fc139['href']['split'](','),_0x3b1716=_0x870313[0x0]['match'](/:(.*?);/)[0x1],_0x1498c2=_0x3b1716['split']('/')[0x1],_0x12517d=_0x408bf5['atob'](_0x870313[_0x870313['length']-0x1]);let _0x4e003b=_0x12517d['length'];const _0xfd1a9f=new _0x408bf5['Uint8Array'](_0x4e003b);for(;_0x4e003b--;)_0xfd1a9f[_0x4e003b]=_0x12517d['charCodeAt'](_0x4e003b);return new _0x408bf5['File']([_0xfd1a9f],'image.'+_0x1498c2,{'type':_0x3b1716});}const _0x3c70fc=_0x6fc139['href']['split']('/'),_0x338292=_0x3c70fc[_0x3c70fc['length']-0x1],_0x36d05e=_0x338292['split']('.')[0x1];return _0x408bf5['fetch'](_0x6fc139['href'])['then'](_0x27b3f8=>_0x27b3f8['clone']()['blob']())['then'](_0x1c58be=>new _0x408bf5['File']([_0x1c58be],_0x338292,{'type':'image/'+_0x36d05e}));}}
23
+ import{global as _0x785c3f,ObservableMixin as _0x3d91e6}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x44aa02}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x3d395d}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x33100e}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x411d7d}from'../../utils/uploadutils.js';import{getImageUrls as _0x5a312d,getImageDimension as _0x403dfa}from'../../utils/editingutils.js';import{isAncestor as _0x522e9a}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
24
+ _0x3d91e6(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0xc0fb43,_0x286701,_0x3dd9c4){super(),this['_editor']=_0xc0fb43,this['_dialog']=_0x286701,this['_imageElement']=_0x3dd9c4,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 _0x3422a6=this['_imageElement'],_0x353e5c=_0x3422a6['getAttribute']('uploadcareImageId'),_0x271a44=_0x3422a6['getAttribute']('src');if(_0x353e5c)await this['_loadImageInfo'](_0x353e5c,_0x271a44);else{if(this['_imageCache']['has'](_0x271a44)){const _0x11caa8=this['_imageCache']['get'](_0x271a44);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x11caa8['url'],this['imageDimension']=_0x11caa8['dimension'],this['imageId']=_0x11caa8['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x319234}=this['_editor'],t=_0x319234['t'],_0x1fe2b7=new _0x33100e(_0x319234,this['imageStatus'],this['_attributes']);_0x1fe2b7['bind']('status')['to'](this,'imageStatus'),_0x1fe2b7['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1fe2b7['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1fe2b7['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1fe2b7,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3d395d,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1fe2b7,'position':_0x44aa02['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1fe2b7['focus']();},'onHide':()=>{_0x1fe2b7['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x36f835=>!_0x522e9a(_0x36f835,_0x1fe2b7['element'])}});}['_loadImageInfo'](_0x1b9280,_0x1cc7b1){return _0x411d7d['getInfo'](_0x1b9280,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x5ca179=>{const {width:_0x280942,height:_0x3fe34f}=_0x5ca179['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1cc7b1,this['imageDimension']={'width':_0x280942,'height':_0x3fe34f},this['imageId']=_0x1b9280;})['catch'](_0x39fc86=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x39fc86['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2cb971,_0x3fdd0e){return this['_getImageAsFile'](_0x2cb971)['then'](_0xfaea12=>_0x411d7d['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':_0x3fdd0e['signal'],'file':_0xfaea12,'onProgress':_0x646186=>{_0x646186&&_0x646186['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x646186['value']));}}))['then'](_0x44f9f4=>{const {width:_0x2ee410,height:_0x591737}=_0x44f9f4['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x44f9f4['cdnUrl'],this['imageDimension']={'width':_0x2ee410,'height':_0x591737},this['imageId']=_0x44f9f4['uuid'],this['imageUploadProgress']=null;const _0x28f2ca=_0x2cb971['getAttribute']('src');this['_imageCache']['set'](_0x28f2ca,{'id':_0x44f9f4['uuid'],'url':_0x44f9f4['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3bf424=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3bf424['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x294b5a,_0x15f326){_0x294b5a['on']('apply',(_0x5e263a,_0x161dde)=>{this['_replaceImage'](_0x15f326,_0x161dde['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x294b5a['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x294b5a['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x51d88d,_0x1c2ce6,_0x3af88b){const _0x58d61f=this['_editor'],{width:_0x718824,height:_0x260387}=_0x403dfa(_0x1c2ce6,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x5b4590,imageSources:_0x276aa7}=_0x5a312d(_0x1c2ce6,_0x718824);_0x58d61f['model']['change'](_0x35ebb5=>{if('$graveyard'===_0x51d88d['root']['rootName']){_0x58d61f['execute']('insertImage',{'imageType':_0x51d88d['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x51d88d['getAttributes']()),'uploadcareImageId':_0x3af88b,'src':_0x5b4590,'sources':_0x276aa7,'width':_0x718824,'height':_0x260387}});const _0x107af6=_0x51d88d['getChildren']();_0x51d88d=_0x58d61f['model']['document']['selection']['getSelectedElement']();for(const _0x275d5d of _0x107af6)_0x35ebb5['append'](_0x35ebb5['cloneElement'](_0x275d5d),_0x51d88d);}else _0x35ebb5['setSelection'](_0x51d88d,'on'),_0x58d61f['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x51d88d['getAttributes']()),'uploadcareImageId':_0x3af88b,'src':_0x5b4590,'sources':_0x276aa7,'width':_0x718824,'height':_0x260387},_0x51d88d);_0x35ebb5['setSelection'](_0x51d88d,'on');});}async['_getImageAsFile'](_0x5837d5){const _0x2f20e8=_0x785c3f['window'],_0x2d2618=_0x785c3f['document']['location']['href'],_0x8618f3=new _0x2f20e8['URL'](_0x5837d5['getAttribute']('src'),_0x2d2618);if('data:'===_0x8618f3['protocol']){const _0x2adc1b=_0x8618f3['href']['split'](','),_0x2b535a=_0x2adc1b[0x0]['match'](/:(.*?);/)[0x1],_0x5db636=_0x2b535a['split']('/')[0x1],_0x1b09ae=_0x2f20e8['atob'](_0x2adc1b[_0x2adc1b['length']-0x1]);let _0x5087b3=_0x1b09ae['length'];const _0x419444=new _0x2f20e8['Uint8Array'](_0x5087b3);for(;_0x5087b3--;)_0x419444[_0x5087b3]=_0x1b09ae['charCodeAt'](_0x5087b3);return new _0x2f20e8['File']([_0x419444],'image.'+_0x5db636,{'type':_0x2b535a});}const _0x77cf81=_0x8618f3['href']['split']('/'),_0x41356a=_0x77cf81[_0x77cf81['length']-0x1],_0x10017a=_0x41356a['split']('.')[0x1];return _0x2f20e8['fetch'](_0x8618f3['href'])['then'](_0xc86af1=>_0xc86af1['clone']()['blob']())['then'](_0xb34e7f=>new _0x2f20e8['File']([_0xb34e7f],_0x41356a,{'type':'image/'+_0x10017a}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x4fe4(){const _0x5dac82=['978295FAHrwT','uc-cloud-image-editor','329250ZCULfF','bindTemplate','1762446LYpIdW','set','4OkomDC','243bNcoYV','99633ZPxRmS','404046jUSOUu','96312aqagAD','image-edit','441846dhEUMl','uc-light','ck-uploadcare-theme','imageSrc','setTemplate'];_0x4fe4=function(){return _0x5dac82;};return _0x4fe4();}(function(_0x31714d,_0x27260a){const _0x4f54c9=_0x3b53,_0x2a9595=_0x31714d();while(!![]){try{const _0x20eae6=-parseInt(_0x4f54c9(0x135))/0x1+parseInt(_0x4f54c9(0x139))/0x2+-parseInt(_0x4f54c9(0x12f))/0x3+parseInt(_0x4f54c9(0x133))/0x4*(parseInt(_0x4f54c9(0x12d))/0x5)+parseInt(_0x4f54c9(0x136))/0x6+parseInt(_0x4f54c9(0x131))/0x7+parseInt(_0x4f54c9(0x137))/0x8*(-parseInt(_0x4f54c9(0x134))/0x9);if(_0x20eae6===_0x27260a)break;else _0x2a9595['push'](_0x2a9595['shift']());}catch(_0xf857e8){_0x2a9595['push'](_0x2a9595['shift']());}}}(_0x4fe4,0x31231));function _0x3b53(_0x1c494d,_0x4d2dff){const _0x4fe4dc=_0x4fe4();return _0x3b53=function(_0x3b53de,_0x3b5515){_0x3b53de=_0x3b53de-0x129;let _0x38a263=_0x4fe4dc[_0x3b53de];return _0x38a263;},_0x3b53(_0x1c494d,_0x4d2dff);}import{View as _0x3bd7b2}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x3bd7b2{constructor(_0x2e78e5,_0x2a96c2){const _0x578a15=_0x3b53;super(_0x2e78e5);const _0x346464=this[_0x578a15(0x130)];this[_0x578a15(0x132)](_0x578a15(0x12b),''),this[_0x578a15(0x12c)]({'tag':_0x578a15(0x12e),'attributes':{..._0x2a96c2,'class':[_0x578a15(0x129),_0x578a15(0x12a)],'ctx-name':_0x578a15(0x138),'cdn-url':_0x346464['to'](_0x578a15(0x12b))}});}}
23
+ function _0x5e6e(){const _0x789f72=['16Sdvkiv','imageSrc','28785QCoQhJ','21609516aHetdL','set','42bcbYCO','ck-uploadcare-theme','bindTemplate','uc-light','81630xAJHEB','313150teDwJQ','3wHMHac','uc-cloud-image-editor','264738agyUdS','4515753LCJSFz','459vqsUoP','541058zQsavg','image-edit','64eeejrR','setTemplate'];_0x5e6e=function(){return _0x789f72;};return _0x5e6e();}function _0x1a26(_0x45f07b,_0x3505c3){const _0x5e6ecd=_0x5e6e();return _0x1a26=function(_0x1a26ea,_0xdce4ab){_0x1a26ea=_0x1a26ea-0x12a;let _0x499b6b=_0x5e6ecd[_0x1a26ea];return _0x499b6b;},_0x1a26(_0x45f07b,_0x3505c3);}(function(_0x3e4fd7,_0x6c9486){const _0x57d240=_0x1a26,_0x5bc23f=_0x3e4fd7();while(!![]){try{const _0x5d1431=-parseInt(_0x57d240(0x12d))/0x1*(parseInt(_0x57d240(0x12c))/0x2)+-parseInt(_0x57d240(0x12f))/0x3*(parseInt(_0x57d240(0x136))/0x4)+parseInt(_0x57d240(0x138))/0x5*(-parseInt(_0x57d240(0x13b))/0x6)+parseInt(_0x57d240(0x132))/0x7*(-parseInt(_0x57d240(0x134))/0x8)+parseInt(_0x57d240(0x131))/0x9*(parseInt(_0x57d240(0x12b))/0xa)+-parseInt(_0x57d240(0x130))/0xb+parseInt(_0x57d240(0x139))/0xc;if(_0x5d1431===_0x6c9486)break;else _0x5bc23f['push'](_0x5bc23f['shift']());}catch(_0xbea274){_0x5bc23f['push'](_0x5bc23f['shift']());}}}(_0x5e6e,0x4f667));import{View as _0x523efc}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x523efc{constructor(_0x66f385,_0x2ca49d){const _0x16410a=_0x1a26;super(_0x66f385);const _0x17d73c=this[_0x16410a(0x13d)];this[_0x16410a(0x13a)](_0x16410a(0x137),''),this[_0x16410a(0x135)]({'tag':_0x16410a(0x12e),'attributes':{..._0x2ca49d,'class':[_0x16410a(0x12a),_0x16410a(0x13c)],'ctx-name':_0x16410a(0x133),'cdn-url':_0x17d73c['to'](_0x16410a(0x137))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{IconError as _0x1fc408}from'ckeditor5/src/icons.js';import{ButtonView as _0x2f96b6,IconView as _0x206574,View as _0x603ef1}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x603ef1{constructor(_0x30e4ef){super(_0x30e4ef);const t=_0x30e4ef['t'];this['set']('errorType',null);const _0x2c4375=new _0x2f96b6(_0x30e4ef);_0x2c4375['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2c4375['withText']=!0x0,_0x2c4375['class']='ck-button-action',_0x2c4375['on']('execute',()=>{this['fire']('retry');}),_0x2c4375['bind']('isVisible')['to'](this,'errorType',_0x3ce73b=>'NotFound'!==_0x3ce73b);const _0x39c5c6=new _0x206574();_0x39c5c6['content']=_0x1fc408,_0x39c5c6['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x310269=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':[_0x39c5c6,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x310269['to']('errorType',_0x1bcf99=>t('NotFound'!==_0x1bcf99?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2c4375]},{'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 _0x4e3db2}from'ckeditor5/src/icons.js';import{ButtonView as _0x47f0c3,IconView as _0x1c8269,View as _0x286fb4}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x286fb4{constructor(_0x3bfae6){super(_0x3bfae6);const t=_0x3bfae6['t'];this['set']('errorType',null);const _0x2b9692=new _0x47f0c3(_0x3bfae6);_0x2b9692['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2b9692['withText']=!0x0,_0x2b9692['class']='ck-button-action',_0x2b9692['on']('execute',()=>{this['fire']('retry');}),_0x2b9692['bind']('isVisible')['to'](this,'errorType',_0x3ad93a=>'NotFound'!==_0x3ad93a);const _0x4b4f5f=new _0x1c8269();_0x4b4f5f['content']=_0x4e3db2,_0x4b4f5f['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4e6148=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':[_0x4b4f5f,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4e6148['to']('errorType',_0x73bfde=>t('NotFound'!==_0x73bfde?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2b9692]},{'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'}]}]}]});}}