@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251126.0 → 0.0.0-nightly-20251127.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x9edcba,Command as _0x29c7ff}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x234ec2,IconGooglePhotos as _0x197806,IconGoogleDrive as _0x361a87,IconFacebook as _0x9bdb1f,IconDropbox as _0x15e84f,IconUploadcareLink as _0xc4de25,IconUploadcareImageUpload as _0x3b887d,IconError as _0x559812,IconUploadcareImageEdit as _0x5ee898}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x570821,MenuBarMenuListItemButtonView as _0x13a2c9,View as _0x130440,FocusCycler as _0x12a9ca,Dialog as _0xadced8,DialogViewPosition as _0x333918,SpinnerView as _0xca99f9,IconView as _0x3a5aaf,Notification as _0x284348}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2183e0,DomEmitterMixin as _0x4c5504,global as _0x206eec,getAncestors as _0x2b9835,ObservableMixin as _0xc15507,uid as _0x4c6026,createElement as _0x3bf56a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2c0cb1}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x21c228,info as _0x6faec4}from'@uploadcare/upload-client';import*as _0x5b0283 from'@uploadcare/file-uploader';var i=function(_0x15e9e1){return _0x15e9e1['Local']='local',_0x15e9e1['URL']='url',_0x15e9e1['Dropbox']='dropbox',_0x15e9e1['GDrive']='gdrive',_0x15e9e1['Facebook']='facebook',_0x15e9e1['GPhotos']='gphotos',_0x15e9e1['OneDrive']='onedrive',_0x15e9e1;}({});function _(_0x11ce6d,_0x21face,_0xc1f1c1){const t=_0x11ce6d['t'],_0x4dda94=_0x11ce6d['t'];switch(_0x21face){case i['Local']:return{'text':_0x4dda94('Insert'===_0xc1f1c1?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4dda94('From\x20computer')};case i['URL']:return{'text':'Insert'===_0xc1f1c1?_0x4dda94('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4dda94('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0xc1f1c1?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0xc1f1c1?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0xc1f1c1?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0xc1f1c1?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0xc1f1c1?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x21face;}}class e extends _0x9edcba{['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 _0x77f7b2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3e0bed;for(const _0x1eb0b5 in _0x77f7b2){const _0x192a26=_0x1eb0b5,_0x17df52=_0x77f7b2[_0x192a26];if('uploadcareLicenseKeyValid'==_0x17df52||'uploadcareLicenseKeyInvalid'==_0x17df52||'uploadcareLicenseKeyExpired'==_0x17df52||'uploadcareLicenseKeyDomainLimit'==_0x17df52||'uploadcareLicenseKeyNotAllowed'==_0x17df52||'uploadcareLicenseKeyEvaluationLimit'==_0x17df52||'uploadcareLicenseKeyTrialLimit'==_0x17df52||'uploadcareLicenseKeyUsageLimit'==_0x17df52){delete _0x77f7b2[_0x192a26],_0x3e0bed=_0x17df52,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x3e0bed&&_0x77f7b2['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x3e0bed&&_0x77f7b2['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x3e0bed&&_0x77f7b2['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x3e0bed&&_0x77f7b2['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x3e0bed&&_0x77f7b2['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x3e0bed&&_0x77f7b2['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x3e0bed&&_0x77f7b2['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x5ec2d0}=this,_0x139aa8=_0x5ec2d0['commands']['get']('uploadcare');if(!_0x139aa8)return;const _0x3a9ff7=this['_normalizeConfigSourceList'](_0x5ec2d0['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x2ba288,_0x4a4e4e)=>{const _0x56d218=this['_getIntegrationKey'](_0x4a4e4e['type']);return _0x2ba288[_0x56d218]||(_0x2ba288[_0x56d218]=[]),_0x2ba288[_0x56d218]['push'](_0x4a4e4e),_0x2ba288;},{});_0x5ec2d0['plugins']['has']('ImageInsertUI')&&_0x5ec2d0['commands']['get']('uploadcare')&&Object['entries'](_0x3a9ff7)['forEach'](([_0x184f1b,_0x161bdd])=>{_0x5ec2d0['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x184f1b,'observable':()=>_0x139aa8,'buttonViewCreator':()=>this['_createToolbarButton'](_0x161bdd),'formViewCreator':()=>this['_createDropdownButtons'](_0x161bdd),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x161bdd),'override':'assetManager'!==_0x184f1b});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x3cf272){const {locale:_0x47ca47}=this['editor'];return _0x3cf272['map'](_0x379ae9=>{const _0x235f99=_(_0x47ca47,_0x379ae9,'Insert');switch(_0x379ae9){case i['Local']:return{'icon':_0x3b887d,'type':i['Local'],..._0x235f99};case i['URL']:return{'icon':_0xc4de25,'type':i['URL'],..._0x235f99};case i['Dropbox']:return{'icon':_0x15e84f,'type':i['Dropbox'],..._0x235f99};case i['Facebook']:return{'icon':_0x9bdb1f,'type':i['Facebook'],..._0x235f99};case i['GDrive']:return{'icon':_0x361a87,'type':i['GDrive'],..._0x235f99};case i['GPhotos']:return{'icon':_0x197806,'type':i['GPhotos'],..._0x235f99};case i['OneDrive']:return{'icon':_0x234ec2,'type':i['OneDrive'],..._0x235f99};}});}['_getIntegrationKey'](_0x45fa4b){switch(_0x45fa4b){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x5a77bf,_0x28d1ac){const _0x55c2a5=this['editor'],_0x611b86=new _0x5a77bf(_0x55c2a5['locale']),_0x3a8485=_0x55c2a5['commands']['get']('uploadcare');return _0x611b86['bind']('isEnabled')['to'](_0x3a8485),_0x611b86['on']('execute',()=>{_0x3a8485['execute'](_0x28d1ac);}),_0x611b86;}['_createToolbarButton'](_0x3c1e90){const {locale:_0x198e35}=this['editor'],_0x468bb4=this['editor']['plugins']['get']('ImageInsertUI'),_0x463267=_0x3c1e90[0x0],_0x5b5a8a=this['_createButton'](_0x570821,_0x463267['type']);return _0x5b5a8a['icon']=_0x463267['icon'],_0x5b5a8a['bind']('label')['to'](_0x468bb4,'isImageSelected',_0x2f8265=>_(_0x198e35,_0x463267['type'],_0x2f8265?'Replace':'Insert')['text']),_0x5b5a8a['tooltip']=!0x0,_0x5b5a8a;}['_createDropdownButtons'](_0xb2ab37){const {locale:_0x4d9933}=this['editor'],_0x1d0c22=this['editor']['plugins']['get']('ImageInsertUI');return _0xb2ab37['map'](_0x32c976=>{const _0x4a7131=this['_createButton'](_0x570821,_0x32c976['type']);return _0x4a7131['withText']=!0x0,_0x4a7131['icon']=_0x32c976['icon'],_0x4a7131['bind']('label')['to'](_0x1d0c22,'isImageSelected',_0x38a9c9=>_(_0x4d9933,_0x32c976['type'],_0x38a9c9?'Replace':'Insert')['text']),_0x4a7131;});}['_createMenuBarButtons'](_0x556a93){return _0x556a93['map'](_0xceacac=>{const _0x2c6af5=this['_createButton'](_0x13a2c9,_0xceacac['type']);return _0x2c6af5['icon']=_0xceacac['icon'],_0x2c6af5['label']=_0xceacac['shortText'],_0x2c6af5;});}}class F extends _0x130440{['focusTracker'];['focusCycler'];constructor(_0x54bf3e){super(_0x54bf3e),this['focusTracker']=new _0x2183e0(),this['focusCycler']=new _0x12a9ca({'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(_0x34ba71,_0xbc084f){super(_0x34ba71),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-'+_0xbc084f}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x258035,_0x561e90){const _0x300999=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x35855f=>_0x35855f<=_0x561e90)['map'](_0x10f2fd=>_0x258035['replace'](/\/$/,'')+'/-/resize/'+_0x10f2fd+'x/\x20'+_0x10f2fd+'w');return{'imageFallbackUrl':_0x258035,'imageSources':[{'srcset':_0x300999['join'](',\x20'),'sizes':'(max-width:\x20'+_0x561e90+'px)\x20100vw,\x20'+_0x561e90+'px','type':'image/webp'}]};}function S(_0x4141b8,_0x582616,_0x4bd4cd){const _0xc8f95=_0x4141b8['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0xc8f95?parseInt(_0xc8f95[0x1],0xa):_0x582616,'height':_0xc8f95?parseInt(_0xc8f95[0x2],0xa):_0x4bd4cd};}function p(_0x3a323b,_0x3cd8f6){const _0x2baa9e=new(_0x4c5504())(),_0x74391c=_0x3a323b['plugins']['get']('ImageUtils'),_0x3efdfe=_0x3a323b['editing']['mapper']['toViewElement'](_0x3cd8f6),_0x857966=_0x74391c['findViewImgElement'](_0x3efdfe),_0x2c18d5=_0x3a323b['editing']['view']['domConverter']['viewToDom'](_0x857966),_0x4fff67=_0x3cd8f6['getAttribute']('width'),_0x176a8c=_0x3cd8f6['getAttribute']('height'),_0x1489ff='image-processing';_0x3a323b['editing']['view']['change'](_0x26d45f=>{_0x26d45f['addClass'](_0x1489ff,_0x3efdfe),_0x26d45f['setStyle']('aspect-ratio',_0x4fff67+'/'+_0x176a8c,_0x857966);}),_0x2baa9e['listenTo'](_0x2c18d5,'load',()=>{_0x2baa9e['stopListening'](_0x2c18d5,'load'),_0x3a323b['editing']['view']['change'](_0x1fd7d3=>{_0x1fd7d3['removeClass'](_0x1489ff,_0x3efdfe),_0x1fd7d3['removeStyle']('aspect-ratio',_0x857966);});});}function G(_0x44a076){if(Array['isArray'](_0x44a076)){const _0x237344=_0x44a076['map'](G);return _0x463667=>_0x237344['some'](_0x3e82ef=>_0x3e82ef(_0x463667));}if('origin'==_0x44a076){const _0x5200c6=_0x206eec['window']['location']['origin'];return _0x38306d=>new URL(_0x38306d,_0x206eec['document']['baseURI'])['origin']==_0x5200c6;}return'function'==typeof _0x44a076?_0x44a076:_0x44a076 instanceof RegExp?_0x142ac6=>!(!_0x142ac6['match'](_0x44a076)&&!_0x142ac6['replace'](/^https?:\/\//,'')['match'](_0x44a076)):()=>!0x1;}function A(_0x30a96d,_0x4f33a5){return _0x2b9835(_0x30a96d['target'])['includes'](_0x4f33a5);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0xc15507(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2199dc,_0x215c08,_0x29c298){super(),this['_editor']=_0x2199dc,this['_editing']=_0x215c08,this['_dialog']=_0x2199dc['plugins']['get'](_0xadced8),this['_api']=_0x215c08['ctxElement']['getAPI'](),this['_type']=_0x29c298,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:_0x2eddec,model:_0x4fd0e0}=this['_editor'],_0x50b9fc=_0x4fd0e0['document']['selection']['getSelectedElement'](),_0x77d2bd=_0x50b9fc&&(_0x50b9fc['is']('element','imageBlock')||_0x50b9fc['is']('element','imageInline'));this['_formView']=new x(_0x2eddec,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x3b887d,'title':_(_0x2eddec,this['_type'],_0x77d2bd?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x333918['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x28b382=>!A(_0x28b382,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x5f4966}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x301778=>{const _0x378c89=_0x5f4966['length'];for(const _0x3fd3ba of _0x5f4966){const _0xece680=_0x3fd3ba===_0x5f4966[_0x378c89-0x1],{cdnUrl:_0x5e1cd4,fileInfo:_0x507ee2}=_0x3fd3ba;if(!_0x5e1cd4||!_0x507ee2)continue;const {width:_0x4d759f,height:_0x239397}=_0x507ee2['imageInfo'],_0x56ec8e=S(_0x5e1cd4,_0x4d759f,_0x239397),_0x38c0bb=C(_0x5e1cd4,_0x56ec8e['width']),_0x56a4ea={'id':_0x507ee2['uuid'],'type':'image','attributes':{'imageDimension':_0x56ec8e,..._0x38c0bb}};this['_insertAsset'](_0x56a4ea,_0xece680,_0x301778);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x59d5f2=>{'idle'===_0x59d5f2['detail']['status']&&!_0x59d5f2['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x35eeb8,_0x155478,_0x354255){const _0x153123=this['_editor']['model']['document']['selection'],_0x586796=_0x153123['getSelectedElement'](),_0xd45383=!(!_0x586796||!_0x586796['is']('element','imageInline'));_0x354255['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x35eeb8,_0xd45383),_0x155478||_0x354255['setSelection'](_0x153123['getLastPosition']());}['_insertImage'](_0x9cfc06,_0x568cf6){const _0x593537=this['_editor'],{imageDimension:_0x5ec548,imageFallbackUrl:_0x4fd20a,imageSources:_0x52aced}=_0x9cfc06['attributes'];_0x593537['execute']('insertImage',{'imageType':_0x568cf6?'imageInline':null,'source':{'uploadcareImageId':_0x9cfc06['id'],'src':_0x4fd20a,'sources':_0x52aced,..._0x5ec548}});}}class w extends _0x29c7ff{['_editing'];['_controller']=null;static get['requires'](){return[_0xadced8,o];}constructor(_0x4f08da){super(_0x4f08da),this['_editing']=_0x4f08da['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x547b48){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x547b48);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x5dada4,..._0x1dd5c2}){return _0x21c228(_0x5dada4,_0x1dd5c2);}static['getInfo'](_0x5aa8b2,_0x387c3f){return _0x6faec4(_0x5aa8b2,_0x387c3f);}}class f extends _0x9edcba{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2c0cb1,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x7cf5fb=this['editor'];if(!!!_0x7cf5fb['config']['get']('uploadcare'))return;_0x7cf5fb['plugins']['get'](_0x2c0cb1)['createUploadAdapter']=_0x15ed57=>new k(_0x15ed57,_0x7cf5fb),_0x7cf5fb['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x78c94f,{imageElement:_0x20358e,data:_0x4335b7})=>{_0x7cf5fb['model']['change'](_0x67f6fa=>{_0x67f6fa['setAttribute']('uploadcareImageId',_0x4335b7['uploadcareImageId'],_0x20358e);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x1effd6,_0x5b2208){this['loader']=_0x1effd6,this['editor']=_0x5b2208,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x550264=await this['loader']['file'];return j['upload']({'file':_0x550264,'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':_0x5d1865=>{_0x5d1865&&_0x5d1865['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x5d1865['value']);}})['then'](async _0x3028e5=>{const {imageFallbackUrl:_0x37677e,imageSources:_0x16c395}=C(_0x3028e5['cdnUrl'],_0x3028e5['imageInfo']['width']);return{'uploadcareImageId':_0x3028e5['uuid'],'default':_0x37677e,'sources':_0x16c395};})['catch'](()=>{const _0x249e50=t('Cannot\x20upload\x20file:')+('\x20'+_0x550264['name']+'.');return Promise['reject'](_0x249e50);});}['abort'](){this['controller']['abort']();}}class o extends _0x9edcba{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0xadced8];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x1a1bdc){super(_0x1a1bdc),this['ucContextId']=_0x4c6026();}['init'](){const _0x33c1a9=this['editor'];_0x33c1a9['commands']['add']('uploadcare',new w(_0x33c1a9));}['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 _0x40aca8=_0x206eec['document']['querySelector']('input[uploadcare-file-input]');_0x40aca8&&_0x40aca8['remove']();}),async function(_0x3e3def){const _0x52213f=_0x31cfb9([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]),_0x1612f3=0x535f8c3a,_0x20de88=0x5358f60a^_0x1612f3,_0x16e63b=window[_0x31cfb9([0x44,0x61,0x74,0x65])][_0x31cfb9([0x6e,0x6f,0x77])](),_0x556efe=_0x3e3def[_0x31cfb9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x235b50=new window[(_0x31cfb9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3db636=>{_0x556efe[_0x31cfb9([0x6f,0x6e,0x63,0x65])](_0x31cfb9([0x72,0x65,0x61,0x64,0x79]),_0x3db636);}),_0x2cb5ef={[_0x31cfb9([0x6b,0x74,0x79])]:_0x31cfb9([0x45,0x43]),[_0x31cfb9([0x75,0x73,0x65])]:_0x31cfb9([0x73,0x69,0x67]),[_0x31cfb9([0x63,0x72,0x76])]:_0x31cfb9([0x50,0x2d,0x32,0x35,0x36]),[_0x31cfb9([0x78])]:_0x31cfb9([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]),[_0x31cfb9([0x79])]:_0x31cfb9([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]),[_0x31cfb9([0x61,0x6c,0x67])]:_0x31cfb9([0x45,0x53,0x32,0x35,0x36])},_0x37dc6f=_0x556efe[_0x31cfb9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x31cfb9([0x67,0x65,0x74])](_0x31cfb9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3436b9(){let _0x27bebd,_0x3c2903=null,_0x1dfa46=null;try{if(_0x37dc6f==_0x31cfb9([0x47,0x50,0x4c]))return _0x31cfb9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x27bebd=_0x2fb6ce(),!_0x27bebd)return _0x31cfb9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x27bebd[_0x31cfb9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1dfa46=_0x12fd5b(_0x27bebd[_0x31cfb9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x27bebd[_0x31cfb9([0x6a,0x74,0x69])])),await _0x567b68()?_0x551b92()?_0x5e7ccf()?_0x31cfb9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1819fd()?(_0x27bebd[_0x31cfb9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x31cfb9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3c2903=_0x4f46c3(_0x31cfb9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x27bebd[_0x31cfb9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x31cfb9([0x74,0x72,0x69,0x61,0x6c])&&(_0x3c2903=_0x4f46c3(_0x31cfb9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x38363e()):_0x31cfb9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x31cfb9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x31cfb9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x31cfb9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5e7ccf(){const _0x1c3315=[_0x31cfb9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x31cfb9([0x74,0x72,0x69,0x61,0x6c])][_0x31cfb9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27bebd[_0x31cfb9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x16e63b/0x3e8:0xe10*_0x20de88;return _0x27bebd[_0x31cfb9([0x65,0x78,0x70])]<_0x1c3315;}function _0x551b92(){const _0x79bf3=_0x27bebd[_0x31cfb9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x79bf3&&(!!_0x79bf3[_0x31cfb9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31cfb9([0x2a]))||!!_0x79bf3[_0x31cfb9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31cfb9([0x55,0x50,0x4c,0x43])));}function _0x1819fd(){const _0x164a61=_0x27bebd[_0x31cfb9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x164a61||0x0==_0x164a61[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x8f3e93}=new URL(window[_0x31cfb9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x164a61[_0x31cfb9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8f3e93))return!0x0;const _0x37b93b=_0x8f3e93[_0x31cfb9([0x73,0x70,0x6c,0x69,0x74])](_0x31cfb9([0x2e]));return _0x164a61[_0x31cfb9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x8445a5=>_0x8445a5[_0x31cfb9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31cfb9([0x2a])))[_0x31cfb9([0x6d,0x61,0x70])](_0x1ba428=>_0x1ba428[_0x31cfb9([0x73,0x70,0x6c,0x69,0x74])](_0x31cfb9([0x2e])))[_0x31cfb9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x13f2ff=>_0x13f2ff[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x37b93b[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x31cfb9([0x6d,0x61,0x70])](_0x2193dd=>Array(_0x37b93b[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2193dd[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x31cfb9([0x66,0x69,0x6c,0x6c])](_0x2193dd[0x0]===_0x31cfb9([0x2a])?_0x31cfb9([0x2a]):'')[_0x31cfb9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2193dd))[_0x31cfb9([0x73,0x6f,0x6d,0x65])](_0x5e0fa4=>_0x37b93b[_0x31cfb9([0x65,0x76,0x65,0x72,0x79])]((_0x4f9a92,_0x43b4dc)=>_0x5e0fa4[_0x43b4dc]===_0x4f9a92||_0x5e0fa4[_0x43b4dc]===_0x31cfb9([0x2a])));}function _0x38363e(){return _0x3c2903&&_0x1dfa46?new window[(_0x31cfb9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xdd389e,_0x1f6ef9)=>{_0x3c2903[_0x31cfb9([0x74,0x68,0x65,0x6e])](_0xdd389e,_0x1f6ef9),_0x1dfa46[_0x31cfb9([0x74,0x68,0x65,0x6e])](_0x219662=>{_0x219662!=_0x31cfb9([0x56,0x61,0x6c,0x69,0x64])&&_0xdd389e(_0x219662);},_0x1f6ef9);}):_0x3c2903||_0x1dfa46||_0x31cfb9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x12fd5b(_0x210fa0,_0xc49382){return new window[(_0x31cfb9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c7ac5=>{if(_0x55e129())return _0x4c7ac5(_0x31cfb9([0x56,0x61,0x6c,0x69,0x64]));_0x2844d8(),_0x556efe[_0x31cfb9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x31cfb9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x261d65=!0x1;const _0x5d2be6=_0x4c6026();function _0x1f31bd(_0x191672){return!!_0x191672&&(typeof _0x191672===_0x31cfb9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x191672===_0x31cfb9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x191672[_0x31cfb9([0x74,0x68,0x65,0x6e])]===_0x31cfb9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x191672[_0x31cfb9([0x63,0x61,0x74,0x63,0x68])]===_0x31cfb9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x469d61(_0x327e9b){_0xf8d9eb(_0x327e9b)[_0x31cfb9([0x74,0x68,0x65,0x6e])](_0x578007=>{if(!_0x578007||_0x578007[_0x31cfb9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x31cfb9([0x6f,0x6b]))return _0x31cfb9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x33a1ab(_0x44c779(_0x5d2be6+_0xc49382))!=_0x578007[_0x31cfb9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x31cfb9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x31cfb9([0x56,0x61,0x6c,0x69,0x64]);})[_0x31cfb9([0x74,0x68,0x65,0x6e])](_0x59ccd8=>(_0x8ab0f5(),_0x59ccd8),()=>{const _0x2cbfc8=_0x1e6baa();return null==_0x2cbfc8?(_0x8ab0f5(),_0x31cfb9([0x56,0x61,0x6c,0x69,0x64])):_0x31cfb9(_0x16e63b-_0x2cbfc8>(0x7753083a^_0x1612f3)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x31cfb9([0x74,0x68,0x65,0x6e])](_0x4c7ac5)[_0x31cfb9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4c7ac5(_0x31cfb9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2f6a1a=0x536962ba^_0x1612f3;function _0x8ab0f5(){const _0x462896=_0x31cfb9([0x6c,0x6c,0x63,0x74,0x2d])+_0x33a1ab(_0x44c779(_0x210fa0)),_0xa6426c=_0x3a9c26(_0x33a1ab(window[_0x31cfb9([0x4d,0x61,0x74,0x68])][_0x31cfb9([0x63,0x65,0x69,0x6c])](_0x16e63b/_0x2f6a1a)));window[_0x31cfb9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x31cfb9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x462896,_0xa6426c);}function _0x1e6baa(){const _0x1c6004=_0x31cfb9([0x6c,0x6c,0x63,0x74,0x2d])+_0x33a1ab(_0x44c779(_0x210fa0)),_0x1be098=window[_0x31cfb9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x31cfb9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1c6004);return _0x1be098?window[_0x31cfb9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a9c26(_0x1be098),0x10)*_0x2f6a1a:null;}function _0xf8d9eb(_0x277539){return new window[(_0x31cfb9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x542f66,_0x5bffcd)=>{_0x277539[_0x31cfb9([0x74,0x68,0x65,0x6e])](_0x542f66,_0x5bffcd),window[_0x31cfb9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5bffcd,0x535e58fa^_0x1612f3);});}}_0x556efe[_0x31cfb9([0x6f,0x6e])](_0x31cfb9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3e64d9,_0x34d3b8)=>{if(_0x34d3b8[0x0]!=_0x210fa0)return _0x4c7ac5(_0x31cfb9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x34d3b8[0x1]={..._0x34d3b8[0x1],[_0x31cfb9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5d2be6};},{[_0x31cfb9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x31cfb9([0x68,0x69,0x67,0x68])}),_0x556efe[_0x31cfb9([0x6f,0x6e])](_0x31cfb9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2a0c39=>{_0x1f31bd(_0x2a0c39[_0x31cfb9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x261d65=!0x0,_0x469d61(_0x2a0c39[_0x31cfb9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x31cfb9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x31cfb9([0x6c,0x6f,0x77])}),_0x235b50[_0x31cfb9([0x74,0x68,0x65,0x6e])](()=>{_0x261d65||_0x4c7ac5(_0x31cfb9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x55e129(){return _0x556efe[_0x31cfb9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x31cfb9([0x76,0x69,0x65,0x77])][_0x31cfb9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x31cfb9([0x61,0x75,0x74,0x6f]);}function _0x2844d8(){_0x556efe[_0x31cfb9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x31cfb9([0x76,0x69,0x65,0x77])][_0x31cfb9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x31cfb9([0x61,0x75,0x74,0x6f]);}}function _0x4f46c3(_0x1da464){const _0x1971c8=[new window[(_0x31cfb9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x400de2=>setTimeout(_0x400de2,0x5356b2f6^_0x1612f3)),_0x235b50[_0x31cfb9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x31cfb9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x210bec=>{let _0x3048ed=0x0;_0x556efe[_0x31cfb9([0x6d,0x6f,0x64,0x65,0x6c])][_0x31cfb9([0x6f,0x6e])](_0x31cfb9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x44a5d0,_0x333ec9)=>{_0x333ec9[0x0][_0x31cfb9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3048ed++,_0x3048ed==(0x535f8dc2^_0x1612f3)&&(_0x210bec(),_0x44a5d0[_0x31cfb9([0x6f,0x66,0x66])]());});}))];return window[_0x31cfb9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x31cfb9([0x72,0x61,0x63,0x65])](_0x1971c8)[_0x31cfb9([0x74,0x68,0x65,0x6e])](()=>_0x1da464);}async function _0xc4712e(){await _0x235b50,_0x556efe[_0x31cfb9([0x6d,0x6f,0x64,0x65,0x6c])][_0x31cfb9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4d0894,_0x556efe[_0x31cfb9([0x6d,0x6f,0x64,0x65,0x6c])][_0x31cfb9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4d0894,_0x556efe[_0x31cfb9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x31cfb9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x29f4e8(_0x2701fa){const _0x56f25a=_0x4eb6e2();_0x556efe[_0x56f25a]=_0x31cfb9([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2701fa,_0x2701fa!=_0x31cfb9([0x56,0x61,0x6c,0x69,0x64])&&_0xc4712e();}function _0x4eb6e2(){const _0x90a60e=window[_0x31cfb9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x31cfb9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x31cfb9([0x6e,0x6f,0x77])]())[_0x31cfb9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x31cfb9([0x2e]),'');let _0x540667=_0x31cfb9([0x68]);for(let _0x26c4d7=0x0;_0x26c4d7<_0x90a60e[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x26c4d7+=0x2){let _0x5e0b0a=window[_0x31cfb9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x90a60e[_0x31cfb9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x26c4d7,_0x26c4d7+0x2));_0x5e0b0a>=_0x52213f[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5e0b0a-=_0x52213f[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x540667+=_0x52213f[_0x5e0b0a];}return _0x540667;}function _0x2fb6ce(){const _0x49d63d=_0x37dc6f[_0x31cfb9([0x73,0x70,0x6c,0x69,0x74])](_0x31cfb9([0x2e]));if(0x3!=_0x49d63d[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x262e5e(_0x49d63d[0x1]);function _0x262e5e(_0xd0dc03){const _0xd2e8d4=_0xadaaf6(_0xd0dc03);return _0xd2e8d4&&_0x129a85()?_0xd2e8d4:null;function _0x129a85(){const _0xef8314=_0xd2e8d4[_0x31cfb9([0x6a,0x74,0x69])],_0x421ee4=window[_0x31cfb9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xef8314[_0x31cfb9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xef8314[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2bfb9f={..._0xd2e8d4,[_0x31cfb9([0x6a,0x74,0x69])]:_0xef8314[_0x31cfb9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xef8314[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2bfb9f[_0x31cfb9([0x76,0x63])],_0x44c779(_0x2bfb9f)==_0x421ee4;}}}async function _0x567b68(){let _0x17acb7=!0x0;try{const _0x2505fe=_0x37dc6f[_0x31cfb9([0x73,0x70,0x6c,0x69,0x74])](_0x31cfb9([0x2e])),[_0x200073,_0x2b3d85,_0x2da1e7]=_0x2505fe;return _0x4dece8(_0x200073),await _0x338981(_0x200073,_0x2b3d85,_0x2da1e7),_0x17acb7;}catch{return!0x1;}function _0x4dece8(_0x25e366){const _0x52e032=_0xadaaf6(_0x25e366);_0x52e032&&_0x52e032[_0x31cfb9([0x61,0x6c,0x67])]==_0x31cfb9([0x45,0x53,0x32,0x35,0x36])||(_0x17acb7=!0x1);}async function _0x338981(_0x51a0e7,_0x55ea06,_0x458237){const _0x2b461d=window[_0x31cfb9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x31cfb9([0x66,0x72,0x6f,0x6d])](_0x307dfd(_0x458237),_0x522098=>_0x522098[_0x31cfb9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5df8a2=new window[(_0x31cfb9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x31cfb9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x51a0e7+_0x31cfb9([0x2e])+_0x55ea06),_0x1e2cf2=window[_0x31cfb9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x31cfb9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1e2cf2)return;const _0x3ed9bf=await _0x1e2cf2[_0x31cfb9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x31cfb9([0x6a,0x77,0x6b]),_0x2cb5ef,{[_0x31cfb9([0x6e,0x61,0x6d,0x65])]:_0x31cfb9([0x45,0x43,0x44,0x53,0x41]),[_0x31cfb9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x31cfb9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x31cfb9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1e2cf2[_0x31cfb9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x31cfb9([0x6e,0x61,0x6d,0x65])]:_0x31cfb9([0x45,0x43,0x44,0x53,0x41]),[_0x31cfb9([0x68,0x61,0x73,0x68])]:{[_0x31cfb9([0x6e,0x61,0x6d,0x65])]:_0x31cfb9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3ed9bf,_0x2b461d,_0x5df8a2)||(_0x17acb7=!0x1);}}function _0xadaaf6(_0x36ee82){return _0x36ee82[_0x31cfb9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x31cfb9([0x65,0x79]))?JSON[_0x31cfb9([0x70,0x61,0x72,0x73,0x65])](_0x307dfd(_0x36ee82)):null;}function _0x307dfd(_0x5c3208){return window[_0x31cfb9([0x61,0x74,0x6f,0x62])](_0x5c3208[_0x31cfb9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x31cfb9([0x2b]))[_0x31cfb9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x31cfb9([0x2f])));}function _0x44c779(_0x290bef){let _0x46d2a1=0x1505;function _0x5ddf92(_0x5cdc70){for(let _0x67afdf=0x0;_0x67afdf<_0x5cdc70[_0x31cfb9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x67afdf++){const _0x15ef5f=_0x5cdc70[_0x31cfb9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x67afdf);_0x46d2a1=(_0x46d2a1<<0x5)+_0x46d2a1+_0x15ef5f,_0x46d2a1&=_0x46d2a1;}}function _0x54b26f(_0x21c2c0){Array[_0x31cfb9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x21c2c0)?_0x21c2c0[_0x31cfb9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x54b26f):_0x21c2c0&&typeof _0x21c2c0==_0x31cfb9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x31cfb9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x21c2c0)[_0x31cfb9([0x73,0x6f,0x72,0x74])]()[_0x31cfb9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x999988,_0x2c16ad])=>{_0x5ddf92(_0x999988),_0x54b26f(_0x2c16ad);}):_0x5ddf92(window[_0x31cfb9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x21c2c0));}return _0x54b26f(_0x290bef),_0x46d2a1>>>0x0;}function _0x33a1ab(_0x32ac97){return _0x32ac97[_0x31cfb9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x31cfb9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x31cfb9([0x30]));}function _0x3a9c26(_0x386936){return _0x386936[_0x31cfb9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x31cfb9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x31cfb9([0x6a,0x6f,0x69,0x6e])]('');}function _0x4d0894(){}function _0x31cfb9(_0x9360ed){return _0x9360ed['map'](_0x3aca29=>String['fromCharCode'](_0x3aca29))['join']('');}_0x29f4e8(await _0x3436b9());}(this);}['_initSchema'](){const _0x1f317e=this['editor']['model']['schema'];_0x1f317e['isRegistered']('imageBlock')&&_0x1f317e['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x1f317e['isRegistered']('imageInline')&&_0x1f317e['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x55cb92=this['editor'];_0x55cb92['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x55cb92['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x25ee45=>_0x25ee45['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x32e76c=_0x55cb92['commands']['get']('replaceImageSource');_0x32e76c&&this['listenTo'](_0x32e76c,'cleanupImage',(_0x33cd58,[_0x35261f,_0x455204])=>{_0x35261f['removeAttribute']('uploadcareImageId',_0x455204);});}['_initConfig'](){const _0x413519=this['editor']['config']['get']('uploadcare.uploader')||{},_0x598d3f=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3bf56a(_0x206eec['document'],'uc-config',{..._0x413519,'pubkey':_0x598d3f,'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']=_0x574445=>{if('closeMax'==_0x574445)return'#uc-icon-arrow-down';},_0x206eec['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3bf56a(_0x206eec['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x206eec['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x3de974=this['editor']['commands']['get']('insertImage');_0x3de974&&this['listenTo'](_0x3de974,'execute',()=>{const _0xe2a946=this['editor']['model']['document']['selection']['getSelectedElement']();_0xe2a946&&_0xe2a946['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0xe2a946);});});const _0x2c21f2=this['editor']['commands']['get']('uploadcareImageReplace');_0x2c21f2&&this['listenTo'](_0x2c21f2,'execute',()=>{const _0x58c252=this['editor']['model']['document']['selection']['getSelectedElement']();_0x58c252&&_0x58c252['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x58c252);});});}}class tt extends _0x9edcba{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x30b2d7){super(_0x30b2d7),_0x30b2d7['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x5b0283['defineComponents'](_0x5b0283),this['_defineLocale']();}['_defineLocale'](){const _0x1a78f0=this['editor']['config']['get']('uploadcare.locale'),_0x4d13d9=this['editor']['locale']['contentLanguage'];_0x1a78f0&&_0x5b0283['defineLocale'](_0x4d13d9,_0x1a78f0);}}class ii extends _0x130440{constructor(_0x2f18ce){super(_0x2f18ce);const t=_0x2f18ce['t'],_0x131466=this['bindTemplate'],_0x40fd42=new _0xca99f9();_0x40fd42['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':[_0x40fd42,{'text':_0x131466['to']('imageUploadProgress',_0x12b983=>t('Loading\x20image...')+'\x20('+(_0x12b983||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 _0x130440{constructor(_0x3c3950){super(_0x3c3950);const t=_0x3c3950['t'];this['set']('errorType',null);const _0x248aea=new _0x570821(_0x3c3950);_0x248aea['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x248aea['withText']=!0x0,_0x248aea['class']='ck-button-action',_0x248aea['on']('execute',()=>{this['fire']('retry');}),_0x248aea['bind']('isVisible')['to'](this,'errorType',_0xf182d8=>'NotFound'!==_0xf182d8);const _0x393607=new _0x3a5aaf();_0x393607['content']=_0x559812,_0x393607['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x2f2d79=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':[_0x393607,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x2f2d79['to']('errorType',_0x51efdf=>t('NotFound'!==_0x51efdf?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x248aea]},{'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 _0x130440{constructor(_0x40de58,_0x44d936){super(_0x40de58);const _0x18b19b=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x44d936,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x18b19b['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2df95f,_0x15b31d,_0xe52137){super(_0x2df95f),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x2df95f),this['_errorView']=new ti(_0x2df95f),this['_editingView']=new ei(_0x2df95f,_0xe52137),this['_focusableView']=new _0x130440(_0x2df95f),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x15b31d),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'],_0x5bd950=>{this['_addUploadcareImageEditorListeners'](_0x5bd950);});}),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'](_0x2452b3,_0x49875e){const _0x50cbe2='uc-cloud-image-editor',_0x25887a=_0x2452b3['querySelector'](_0x50cbe2);if(_0x25887a)return _0x49875e(_0x25887a);const _0x51b15f=new MutationObserver(_0x607542=>{const _0x4e9296=_0x607542['filter'](_0x3cbad5=>_0x3cbad5['target']===_0x2452b3&&_0x3cbad5['addedNodes']['length']>0x0&&_0x3cbad5['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x50cbe2);_0x4e9296['length']&&(_0x51b15f['disconnect'](),_0x49875e(_0x4e9296[0x0]['addedNodes'][0x0]));});_0x51b15f['observe'](_0x2452b3,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x5fff9e){_0x5fff9e['addEventListener']('apply',_0x4b2f62=>{this['fire']('apply',{'imageSrc':_0x4b2f62['detail']['cdnUrl']});}),_0x5fff9e['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0xc15507(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5d4ee3,_0x200f73,_0x19a8b5){super(),this['_editor']=_0x5d4ee3,this['_dialog']=_0x200f73,this['_imageElement']=_0x19a8b5,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 _0x221716=this['_imageElement'],_0x4f47f5=_0x221716['getAttribute']('uploadcareImageId'),_0x1fcf7e=_0x221716['getAttribute']('src');if(_0x4f47f5)await this['_loadImageInfo'](_0x4f47f5,_0x1fcf7e);else{if(this['_imageCache']['has'](_0x1fcf7e)){const _0x133b19=this['_imageCache']['get'](_0x1fcf7e);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x133b19['url'],this['imageDimension']=_0x133b19['dimension'],this['imageId']=_0x133b19['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x433fbb}=this['_editor'],t=_0x433fbb['t'],_0x324f44=new X(_0x433fbb,this['imageStatus'],this['_attributes']);_0x324f44['bind']('status')['to'](this,'imageStatus'),_0x324f44['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x324f44['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x324f44['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x324f44,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x5ee898,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x324f44,'position':_0x333918['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x324f44['focus']();},'onHide':()=>{_0x324f44['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xa7c6be=>!A(_0xa7c6be,_0x324f44['element'])}});}['_loadImageInfo'](_0x366541,_0x5682fe){return j['getInfo'](_0x366541,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x573226=>{const {width:_0x4e3048,height:_0xae803b}=_0x573226['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5682fe,this['imageDimension']={'width':_0x4e3048,'height':_0xae803b},this['imageId']=_0x366541;})['catch'](_0x469bde=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x469bde['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x6509e2,_0x3163c0){return this['_getImageAsFile'](_0x6509e2)['then'](_0x174f21=>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':_0x3163c0['signal'],'file':_0x174f21,'onProgress':_0x392df9=>{_0x392df9&&_0x392df9['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x392df9['value']));}}))['then'](_0x317b15=>{const {width:_0x149473,height:_0x16775a}=_0x317b15['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x317b15['cdnUrl'],this['imageDimension']={'width':_0x149473,'height':_0x16775a},this['imageId']=_0x317b15['uuid'],this['imageUploadProgress']=null;const _0x2b4edd=_0x6509e2['getAttribute']('src');this['_imageCache']['set'](_0x2b4edd,{'id':_0x317b15['uuid'],'url':_0x317b15['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x16d397=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x16d397['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0xe9270e,_0x111fd1){_0xe9270e['on']('apply',(_0x356cfc,_0x1b4571)=>{this['_replaceImage'](_0x111fd1,_0x1b4571['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0xe9270e['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0xe9270e['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x522a,_0x109dad,_0x15cf88){const _0x3c5f44=this['_editor'],{width:_0x12ba0d,height:_0x8f21c1}=S(_0x109dad,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x5d985b,imageSources:_0x1e6782}=C(_0x109dad,_0x12ba0d);_0x3c5f44['model']['change'](_0x404dbd=>{if('$graveyard'===_0x522a['root']['rootName']){_0x3c5f44['execute']('insertImage',{'imageType':_0x522a['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x522a['getAttributes']()),'uploadcareImageId':_0x15cf88,'src':_0x5d985b,'sources':_0x1e6782,'width':_0x12ba0d,'height':_0x8f21c1}});const _0x1a012f=_0x522a['getChildren']();_0x522a=_0x3c5f44['model']['document']['selection']['getSelectedElement']();for(const _0xfe1f09 of _0x1a012f)_0x404dbd['append'](_0x404dbd['cloneElement'](_0xfe1f09),_0x522a);}else _0x404dbd['setSelection'](_0x522a,'on'),_0x3c5f44['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x522a['getAttributes']()),'uploadcareImageId':_0x15cf88,'src':_0x5d985b,'sources':_0x1e6782,'width':_0x12ba0d,'height':_0x8f21c1},_0x522a);_0x404dbd['setSelection'](_0x522a,'on');});}async['_getImageAsFile'](_0x37cdf2){const _0x5fe9b9=_0x206eec['window'],_0x5ee3bd=_0x206eec['document']['location']['href'],_0x3322c1=new _0x5fe9b9['URL'](_0x37cdf2['getAttribute']('src'),_0x5ee3bd);if('data:'===_0x3322c1['protocol']){const _0x44318e=_0x3322c1['href']['split'](','),_0x3908fc=_0x44318e[0x0]['match'](/:(.*?);/)[0x1],_0xd2bac6=_0x3908fc['split']('/')[0x1],_0x34229b=_0x5fe9b9['atob'](_0x44318e[_0x44318e['length']-0x1]);let _0x5206f9=_0x34229b['length'];const _0x8cb423=new _0x5fe9b9['Uint8Array'](_0x5206f9);for(;_0x5206f9--;)_0x8cb423[_0x5206f9]=_0x34229b['charCodeAt'](_0x5206f9);return new _0x5fe9b9['File']([_0x8cb423],'image.'+_0xd2bac6,{'type':_0x3908fc});}const _0x1520f6=_0x3322c1['href']['split']('/'),_0x4160b0=_0x1520f6[_0x1520f6['length']-0x1],_0x576385=_0x4160b0['split']('.')[0x1];return _0x5fe9b9['fetch'](_0x3322c1['href'])['then'](_0x4ba7b0=>_0x4ba7b0['clone']()['blob']())['then'](_0x6c41a=>new _0x5fe9b9['File']([_0x6c41a],_0x4160b0,{'type':'image/'+_0x576385}));}}class O extends _0x29c7ff{['imageEditController'];static get['requires'](){return[_0xadced8];}['_isEditable'];constructor(_0x144a2f){super(_0x144a2f),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x33e792){const _0x5c3fda=G(_0x33e792);return _0x57d8f9=>!(!_0x57d8f9||!_0x57d8f9['is']('element','imageBlock')&&!_0x57d8f9['is']('element','imageInline'))&&(!!_0x57d8f9['hasAttribute']('uploadcareImageId')||!!_0x57d8f9['hasAttribute']('src')&&_0x5c3fda(_0x57d8f9['getAttribute']('src')));}(_0x144a2f['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x169cde=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x169cde);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x543258=this['editor']['model']['document']['selection']['getSelectedElement']();_0x543258&&(_0x543258['is']('element','imageBlock')||_0x543258['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0xadced8),_0x543258),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x29c7ff{['refresh'](){const _0x46f02=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x46f02&&(_0x46f02['is']('element','imageBlock')||_0x46f02['is']('element','imageInline')));}['execute'](_0xf5e54b){const _0x4df41b=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x567164=>{_0x567164['setAttributes'](_0xf5e54b,_0x4df41b),_0x567164['removeAttribute']('srcset',_0x4df41b),_0x567164['removeAttribute']('sizes',_0x4df41b);});}}class m extends _0x9edcba{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x284348,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3a275d}=this;_0x3a275d['commands']['add']('uploadcareImageEdit',new O(_0x3a275d)),_0x3a275d['commands']['add']('uploadcareImageReplace',new R(_0x3a275d));}}class g extends _0x9edcba{['_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 _0x3428a1=this['editor'];_0x3428a1['ui']['componentFactory']['add']('uploadcareImageEdit',_0x1e80e4=>{const _0x11507b=_0x3428a1['commands']['get']('uploadcareImageEdit'),_0x1bedfd=new _0x570821(_0x1e80e4),t=_0x1e80e4['t'];return _0x1bedfd['set']({'icon':_0x5ee898,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x1bedfd['bind']('isEnabled')['to'](_0x11507b),_0x1bedfd['bind']('isOn')['to'](_0x11507b,'isActive'),this['listenTo'](_0x1bedfd,'execute',()=>{_0x3428a1['execute']('uploadcareImageEdit'),_0x3428a1['editing']['view']['focus']();}),_0x1bedfd;}),this['_initConfig']();}['_initConfig'](){const _0xc695d0=_0x3bf56a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xc695d0),this['listenTo'](this['editor'],'destroy',()=>{_0xc695d0['remove']();});}}class et extends _0x9edcba{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 _0x3bd795,Command as _0x2b6c67}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3dae0a,IconGooglePhotos as _0x24ad2a,IconGoogleDrive as _0xfa8fa1,IconFacebook as _0x29c12c,IconDropbox as _0x4bf518,IconUploadcareLink as _0x3bf0a3,IconUploadcareImageUpload as _0x560df5,IconError as _0x5c74cf,IconUploadcareImageEdit as _0x1028ed}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x172be1,MenuBarMenuListItemButtonView as _0x34ec69,View as _0x385054,FocusCycler as _0x4a9a0f,Dialog as _0xbe1041,DialogViewPosition as _0x18301e,SpinnerView as _0x596a6a,IconView as _0x4b9e44,Notification as _0x358e78}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x192bc1,DomEmitterMixin as _0x559077,global as _0x544b6e,getAncestors as _0x347472,ObservableMixin as _0x6d5f1b,uid as _0x4dfcd6,createElement as _0x39ed0a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x522ef2}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x46c247,info as _0x2d800f}from'@uploadcare/upload-client';import*as _0x4ae532 from'@uploadcare/file-uploader';var i=function(_0x30d7ff){return _0x30d7ff['Local']='local',_0x30d7ff['URL']='url',_0x30d7ff['Dropbox']='dropbox',_0x30d7ff['GDrive']='gdrive',_0x30d7ff['Facebook']='facebook',_0x30d7ff['GPhotos']='gphotos',_0x30d7ff['OneDrive']='onedrive',_0x30d7ff;}({});function _(_0x5d7d15,_0x4333fe,_0x2826a7){const t=_0x5d7d15['t'],_0x4292f6=_0x5d7d15['t'];switch(_0x4333fe){case i['Local']:return{'text':_0x4292f6('Insert'===_0x2826a7?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4292f6('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x2826a7?_0x4292f6('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4292f6('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x4333fe;}}class e extends _0x3bd795{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'UploadcareUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x33b739=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xf820ac;for(const _0x4555ef in _0x33b739){const _0x49e04c=_0x4555ef,_0x171325=_0x33b739[_0x49e04c];if('uploadcareLicenseKeyValid'==_0x171325||'uploadcareLicenseKeyInvalid'==_0x171325||'uploadcareLicenseKeyExpired'==_0x171325||'uploadcareLicenseKeyDomainLimit'==_0x171325||'uploadcareLicenseKeyNotAllowed'==_0x171325||'uploadcareLicenseKeyEvaluationLimit'==_0x171325||'uploadcareLicenseKeyTrialLimit'==_0x171325||'uploadcareLicenseKeyUsageLimit'==_0x171325){delete _0x33b739[_0x49e04c],_0xf820ac=_0x171325,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0xf820ac&&_0x33b739['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0xf820ac&&_0x33b739['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0xf820ac&&_0x33b739['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x35068f}=this,_0x516d47=_0x35068f['commands']['get']('uploadcare');if(!_0x516d47)return;const _0x50786a=this['_normalizeConfigSourceList'](_0x35068f['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x19adb6,_0x481c65)=>{const _0x4b2f7d=this['_getIntegrationKey'](_0x481c65['type']);return _0x19adb6[_0x4b2f7d]||(_0x19adb6[_0x4b2f7d]=[]),_0x19adb6[_0x4b2f7d]['push'](_0x481c65),_0x19adb6;},{});_0x35068f['plugins']['has']('ImageInsertUI')&&_0x35068f['commands']['get']('uploadcare')&&Object['entries'](_0x50786a)['forEach'](([_0x3e2969,_0x413c6e])=>{_0x35068f['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3e2969,'observable':()=>_0x516d47,'buttonViewCreator':()=>this['_createToolbarButton'](_0x413c6e),'formViewCreator':()=>this['_createDropdownButtons'](_0x413c6e),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x413c6e),'override':'assetManager'!==_0x3e2969});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x50015c){const {locale:_0x530388}=this['editor'];return _0x50015c['map'](_0x30bcfa=>{const _0x248377=_(_0x530388,_0x30bcfa,'Insert');switch(_0x30bcfa){case i['Local']:return{'icon':_0x560df5,'type':i['Local'],..._0x248377};case i['URL']:return{'icon':_0x3bf0a3,'type':i['URL'],..._0x248377};case i['Dropbox']:return{'icon':_0x4bf518,'type':i['Dropbox'],..._0x248377};case i['Facebook']:return{'icon':_0x29c12c,'type':i['Facebook'],..._0x248377};case i['GDrive']:return{'icon':_0xfa8fa1,'type':i['GDrive'],..._0x248377};case i['GPhotos']:return{'icon':_0x24ad2a,'type':i['GPhotos'],..._0x248377};case i['OneDrive']:return{'icon':_0x3dae0a,'type':i['OneDrive'],..._0x248377};}});}['_getIntegrationKey'](_0x2fc021){switch(_0x2fc021){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0xff8cb8,_0x590adc){const _0x383734=this['editor'],_0x3cc846=new _0xff8cb8(_0x383734['locale']),_0x36d859=_0x383734['commands']['get']('uploadcare');return _0x3cc846['bind']('isEnabled')['to'](_0x36d859),_0x3cc846['on']('execute',()=>{_0x36d859['execute'](_0x590adc);}),_0x3cc846;}['_createToolbarButton'](_0x589d35){const {locale:_0x8b7ce7}=this['editor'],_0x5a25c6=this['editor']['plugins']['get']('ImageInsertUI'),_0x172860=_0x589d35[0x0],_0x5b6273=this['_createButton'](_0x172be1,_0x172860['type']);return _0x5b6273['icon']=_0x172860['icon'],_0x5b6273['bind']('label')['to'](_0x5a25c6,'isImageSelected',_0x17e2e5=>_(_0x8b7ce7,_0x172860['type'],_0x17e2e5?'Replace':'Insert')['text']),_0x5b6273['tooltip']=!0x0,_0x5b6273;}['_createDropdownButtons'](_0x102b60){const {locale:_0x13e30b}=this['editor'],_0x252573=this['editor']['plugins']['get']('ImageInsertUI');return _0x102b60['map'](_0x2cb1de=>{const _0x455264=this['_createButton'](_0x172be1,_0x2cb1de['type']);return _0x455264['withText']=!0x0,_0x455264['icon']=_0x2cb1de['icon'],_0x455264['bind']('label')['to'](_0x252573,'isImageSelected',_0x4a265b=>_(_0x13e30b,_0x2cb1de['type'],_0x4a265b?'Replace':'Insert')['text']),_0x455264;});}['_createMenuBarButtons'](_0x107e1d){return _0x107e1d['map'](_0x5375f4=>{const _0x3816fc=this['_createButton'](_0x34ec69,_0x5375f4['type']);return _0x3816fc['icon']=_0x5375f4['icon'],_0x3816fc['label']=_0x5375f4['shortText'],_0x3816fc;});}}class F extends _0x385054{['focusTracker'];['focusCycler'];constructor(_0x256c0f){super(_0x256c0f),this['focusTracker']=new _0x192bc1(),this['focusCycler']=new _0x4a9a0f({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0x568102,_0x2a9651){super(_0x568102),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':[{'tag':'uc-file-uploader-inline','attributes':{'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'uploader-'+_0x2a9651}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x47ce31,_0xb2ca9f){const _0x43ff11=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x366edc=>_0x366edc<=_0xb2ca9f)['map'](_0x236c40=>_0x47ce31['replace'](/\/$/,'')+'/-/resize/'+_0x236c40+'x/\x20'+_0x236c40+'w');return{'imageFallbackUrl':_0x47ce31,'imageSources':[{'srcset':_0x43ff11['join'](',\x20'),'sizes':'(max-width:\x20'+_0xb2ca9f+'px)\x20100vw,\x20'+_0xb2ca9f+'px','type':'image/webp'}]};}function S(_0x1c219d,_0x1d70ec,_0x1c4d0b){const _0x3f9c49=_0x1c219d['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3f9c49?parseInt(_0x3f9c49[0x1],0xa):_0x1d70ec,'height':_0x3f9c49?parseInt(_0x3f9c49[0x2],0xa):_0x1c4d0b};}function p(_0x3159ef,_0xbfc5b5){const _0x39050f=new(_0x559077())(),_0x45ee84=_0x3159ef['plugins']['get']('ImageUtils'),_0x2ca80c=_0x3159ef['editing']['mapper']['toViewElement'](_0xbfc5b5),_0x45ab31=_0x45ee84['findViewImgElement'](_0x2ca80c),_0x50d631=_0x3159ef['editing']['view']['domConverter']['viewToDom'](_0x45ab31),_0xa111f0=_0xbfc5b5['getAttribute']('width'),_0x45d168=_0xbfc5b5['getAttribute']('height'),_0x196efd='image-processing';_0x3159ef['editing']['view']['change'](_0x175a45=>{_0x175a45['addClass'](_0x196efd,_0x2ca80c),_0x175a45['setStyle']('aspect-ratio',_0xa111f0+'/'+_0x45d168,_0x45ab31);}),_0x39050f['listenTo'](_0x50d631,'load',()=>{_0x39050f['stopListening'](_0x50d631,'load'),_0x3159ef['editing']['view']['change'](_0x3f2c91=>{_0x3f2c91['removeClass'](_0x196efd,_0x2ca80c),_0x3f2c91['removeStyle']('aspect-ratio',_0x45ab31);});});}function z(_0x61fc64){if(Array['isArray'](_0x61fc64)){const _0x34575e=_0x61fc64['map'](z);return _0x5ddb4e=>_0x34575e['some'](_0x55ee74=>_0x55ee74(_0x5ddb4e));}if('origin'==_0x61fc64){const _0xc1ee5c=_0x544b6e['window']['location']['origin'];return _0x35f88f=>new URL(_0x35f88f,_0x544b6e['document']['baseURI'])['origin']==_0xc1ee5c;}return'function'==typeof _0x61fc64?_0x61fc64:_0x61fc64 instanceof RegExp?_0xca63a4=>!(!_0xca63a4['match'](_0x61fc64)&&!_0xca63a4['replace'](/^https?:\/\//,'')['match'](_0x61fc64)):()=>!0x1;}function A(_0x4ad895,_0x4205c5){return _0x347472(_0x4ad895['target'])['includes'](_0x4205c5);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x6d5f1b(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x6aab2c,_0x5c2b96,_0x564cd0){super(),this['_editor']=_0x6aab2c,this['_editing']=_0x5c2b96,this['_dialog']=_0x6aab2c['plugins']['get'](_0xbe1041),this['_api']=_0x5c2b96['ctxElement']['getAPI'](),this['_type']=_0x564cd0,this['_editing']['configElement']['setAttribute']('source-list',this['_type']),this['_initDialog'](),this['_initListeners'](),this['_api']['initFlow']();}['destroy'](){this['_formView']&&(this['_formView']['destroy'](),this['_formView']=null),this['_api']&&this['_api']['doneFlow'](),this['stopListening'](),this['stopDelegating']();}['_initDialog'](){const {locale:_0x162c14,model:_0x23bf20}=this['_editor'],_0x2be23d=_0x23bf20['document']['selection']['getSelectedElement'](),_0x105cf7=_0x2be23d&&(_0x2be23d['is']('element','imageBlock')||_0x2be23d['is']('element','imageInline'));this['_formView']=new x(_0x162c14,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x560df5,'title':_(_0x162c14,this['_type'],_0x105cf7?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x18301e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xfe1d26=>!A(_0xfe1d26,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x3a4a6f}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x25e103=>{const _0x34f4e9=_0x3a4a6f['length'];for(const _0x105d7a of _0x3a4a6f){const _0x55104d=_0x105d7a===_0x3a4a6f[_0x34f4e9-0x1],{cdnUrl:_0x3d9e09,fileInfo:_0x2ad9db}=_0x105d7a;if(!_0x3d9e09||!_0x2ad9db)continue;const {width:_0x58ecab,height:_0x2c9ac0}=_0x2ad9db['imageInfo'],_0x34f8ed=S(_0x3d9e09,_0x58ecab,_0x2c9ac0),_0x2ad30d=C(_0x3d9e09,_0x34f8ed['width']),_0x5e981e={'id':_0x2ad9db['uuid'],'type':'image','attributes':{'imageDimension':_0x34f8ed,..._0x2ad30d}};this['_insertAsset'](_0x5e981e,_0x55104d,_0x25e103);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2c21aa=>{'idle'===_0x2c21aa['detail']['status']&&!_0x2c21aa['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0xb04f17,_0x18345a,_0x421c8){const _0x392d01=this['_editor']['model']['document']['selection'],_0x2dec84=_0x392d01['getSelectedElement'](),_0x5d0116=!(!_0x2dec84||!_0x2dec84['is']('element','imageInline'));_0x421c8['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0xb04f17,_0x5d0116),_0x18345a||_0x421c8['setSelection'](_0x392d01['getLastPosition']());}['_insertImage'](_0x2bcd11,_0x4d3831){const _0x2691d6=this['_editor'],{imageDimension:_0x1edf15,imageFallbackUrl:_0x2e5ffc,imageSources:_0x95bfc7}=_0x2bcd11['attributes'];_0x2691d6['execute']('insertImage',{'imageType':_0x4d3831?'imageInline':null,'source':{'uploadcareImageId':_0x2bcd11['id'],'src':_0x2e5ffc,'sources':_0x95bfc7,..._0x1edf15}});}}class w extends _0x2b6c67{['_editing'];['_controller']=null;static get['requires'](){return[_0xbe1041,o];}constructor(_0x1577cc){super(_0x1577cc),this['_editing']=_0x1577cc['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3195d8){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x3195d8);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x1282f9,..._0x3145de}){return _0x46c247(_0x1282f9,_0x3145de);}static['getInfo'](_0x5e5fd4,_0x4c2a34){return _0x2d800f(_0x5e5fd4,_0x4c2a34);}}class f extends _0x3bd795{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x522ef2,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1256c9=this['editor'];if(!!!_0x1256c9['config']['get']('uploadcare'))return;_0x1256c9['plugins']['get'](_0x522ef2)['createUploadAdapter']=_0x580ee8=>new k(_0x580ee8,_0x1256c9),_0x1256c9['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x14def7,{imageElement:_0x1e2bf1,data:_0xadc252})=>{_0x1256c9['model']['change'](_0x7a980e=>{_0x7a980e['setAttribute']('uploadcareImageId',_0xadc252['uploadcareImageId'],_0x1e2bf1);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x5480e3,_0x1780ee){this['loader']=_0x5480e3,this['editor']=_0x1780ee,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1d6fa7=await this['loader']['file'];return j['upload']({'file':_0x1d6fa7,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x31e7a7=>{_0x31e7a7&&_0x31e7a7['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x31e7a7['value']);}})['then'](async _0x2cdfcc=>{const {imageFallbackUrl:_0x144571,imageSources:_0x2e14f8}=C(_0x2cdfcc['cdnUrl'],_0x2cdfcc['imageInfo']['width']);return{'uploadcareImageId':_0x2cdfcc['uuid'],'default':_0x144571,'sources':_0x2e14f8};})['catch'](()=>{const _0x50d666=t('Cannot\x20upload\x20file:')+('\x20'+_0x1d6fa7['name']+'.');return Promise['reject'](_0x50d666);});}['abort'](){this['controller']['abort']();}}class o extends _0x3bd795{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0xbe1041];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0xedb602){super(_0xedb602),this['ucContextId']=_0x4dfcd6();}['init'](){const _0x287b8a=this['editor'];_0x287b8a['commands']['add']('uploadcare',new w(_0x287b8a));}['afterInit'](){this['_initSchema'](),this['_initConversion'](),this['_initConfig'](),this['_initCtx'](),this['_initImageProcessingIndicator'](),this['listenTo'](this['editor'],'destroy',()=>{this['_configElement']&&(this['_configElement']['remove'](),this['_configElement']=null),this['_ctxElement']&&(this['_ctxElement']['remove'](),this['_ctxElement']=null);const _0x1ed41f=_0x544b6e['document']['querySelector']('input[uploadcare-file-input]');_0x1ed41f&&_0x1ed41f['remove']();}),async function(_0x2ffe83){const _0x333a03=_0x41f30d([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x441afa=0x535f8c3a,_0x1b70b0=0x5358f672^_0x441afa,_0xc737a0=window[_0x41f30d([0x44,0x61,0x74,0x65])][_0x41f30d([0x6e,0x6f,0x77])](),_0x3b2e46=_0x2ffe83[_0x41f30d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xce099b=new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1b4350=>{_0x3b2e46[_0x41f30d([0x6f,0x6e,0x63,0x65])](_0x41f30d([0x72,0x65,0x61,0x64,0x79]),_0x1b4350);}),_0x3b3267={[_0x41f30d([0x6b,0x74,0x79])]:_0x41f30d([0x45,0x43]),[_0x41f30d([0x75,0x73,0x65])]:_0x41f30d([0x73,0x69,0x67]),[_0x41f30d([0x63,0x72,0x76])]:_0x41f30d([0x50,0x2d,0x32,0x35,0x36]),[_0x41f30d([0x78])]:_0x41f30d([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x41f30d([0x79])]:_0x41f30d([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x41f30d([0x61,0x6c,0x67])]:_0x41f30d([0x45,0x53,0x32,0x35,0x36])},_0x120f0f=_0x3b2e46[_0x41f30d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x41f30d([0x67,0x65,0x74])](_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x34ef0a(){let _0x1ef546,_0x3ca47c=null,_0x3bcf1c=null;try{if(_0x120f0f==_0x41f30d([0x47,0x50,0x4c]))return _0x41f30d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1ef546=_0x196b84(),!_0x1ef546)return _0x41f30d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1ef546[_0x41f30d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3bcf1c=_0x335f82(_0x1ef546[_0x41f30d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1ef546[_0x41f30d([0x6a,0x74,0x69])])),await _0x6bda32()?_0x577857()?_0x4c4788()?_0x41f30d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x12f510()?(_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41f30d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3ca47c=_0x565d69(_0x41f30d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41f30d([0x74,0x72,0x69,0x61,0x6c])&&(_0x3ca47c=_0x565d69(_0x41f30d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5261ae()):_0x41f30d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x41f30d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x41f30d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x41f30d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4c4788(){const _0x1ff132=[_0x41f30d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x41f30d([0x74,0x72,0x69,0x61,0x6c])][_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xc737a0/0x3e8:0xe10*_0x1b70b0;return _0x1ef546[_0x41f30d([0x65,0x78,0x70])]<_0x1ff132;}function _0x577857(){const _0x158a9d=_0x1ef546[_0x41f30d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x158a9d&&(!!_0x158a9d[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f30d([0x2a]))||!!_0x158a9d[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f30d([0x55,0x50,0x4c,0x43])));}function _0x12f510(){const _0x285325=_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x285325||0x0==_0x285325[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x39dde1}=new URL(window[_0x41f30d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x285325[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39dde1))return!0x0;const _0x4b02e2=_0x39dde1[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e]));return _0x285325[_0x41f30d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2ad00a=>_0x2ad00a[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f30d([0x2a])))[_0x41f30d([0x6d,0x61,0x70])](_0x5c94ca=>_0x5c94ca[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e])))[_0x41f30d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5c7de0=>_0x5c7de0[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4b02e2[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41f30d([0x6d,0x61,0x70])](_0x43b2bc=>Array(_0x4b02e2[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x43b2bc[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41f30d([0x66,0x69,0x6c,0x6c])](_0x43b2bc[0x0]===_0x41f30d([0x2a])?_0x41f30d([0x2a]):'')[_0x41f30d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x43b2bc))[_0x41f30d([0x73,0x6f,0x6d,0x65])](_0x163c19=>_0x4b02e2[_0x41f30d([0x65,0x76,0x65,0x72,0x79])]((_0x16de0b,_0x330894)=>_0x163c19[_0x330894]===_0x16de0b||_0x163c19[_0x330894]===_0x41f30d([0x2a])));}function _0x5261ae(){return _0x3ca47c&&_0x3bcf1c?new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x592825,_0x7a9da4)=>{_0x3ca47c[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x592825,_0x7a9da4),_0x3bcf1c[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x3b660d=>{_0x3b660d!=_0x41f30d([0x56,0x61,0x6c,0x69,0x64])&&_0x592825(_0x3b660d);},_0x7a9da4);}):_0x3ca47c||_0x3bcf1c||_0x41f30d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x335f82(_0x1541f5,_0x3bba52){return new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x102f10=>{if(_0x3d291b())return _0x102f10(_0x41f30d([0x56,0x61,0x6c,0x69,0x64]));_0x43731b(),_0x3b2e46[_0x41f30d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x41f30d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x203e27=!0x1;const _0x4f95aa=_0x4dfcd6();function _0x3fc86d(_0x735d93){return!!_0x735d93&&(typeof _0x735d93===_0x41f30d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x735d93===_0x41f30d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x735d93[_0x41f30d([0x74,0x68,0x65,0x6e])]===_0x41f30d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x735d93[_0x41f30d([0x63,0x61,0x74,0x63,0x68])]===_0x41f30d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x236101(_0x1ebfa5){_0x13a463(_0x1ebfa5)[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x44d8a2=>{if(!_0x44d8a2||_0x44d8a2[_0x41f30d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x41f30d([0x6f,0x6b]))return _0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4e3383(_0x3402a5(_0x4f95aa+_0x3bba52))!=_0x44d8a2[_0x41f30d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x41f30d([0x56,0x61,0x6c,0x69,0x64]);})[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x50eaf6=>(_0x44d77e(),_0x50eaf6),()=>{const _0x45b644=_0x223c5d();return null==_0x45b644?(_0x44d77e(),_0x41f30d([0x56,0x61,0x6c,0x69,0x64])):_0x41f30d(_0xc737a0-_0x45b644>(0x7753083a^_0x441afa)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x102f10)[_0x41f30d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x102f10(_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x99f2c1=0x536962ba^_0x441afa;function _0x44d77e(){const _0x2f8472=_0x41f30d([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e3383(_0x3402a5(_0x1541f5)),_0x596e94=_0x495fb9(_0x4e3383(window[_0x41f30d([0x4d,0x61,0x74,0x68])][_0x41f30d([0x63,0x65,0x69,0x6c])](_0xc737a0/_0x99f2c1)));window[_0x41f30d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41f30d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f8472,_0x596e94);}function _0x223c5d(){const _0x3be93c=_0x41f30d([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e3383(_0x3402a5(_0x1541f5)),_0x1aea26=window[_0x41f30d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41f30d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3be93c);return _0x1aea26?window[_0x41f30d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x495fb9(_0x1aea26),0x10)*_0x99f2c1:null;}function _0x13a463(_0x1547aa){return new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x8ee6f6,_0x561a16)=>{_0x1547aa[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x8ee6f6,_0x561a16),window[_0x41f30d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x561a16,0x535e58fa^_0x441afa);});}}_0x3b2e46[_0x41f30d([0x6f,0x6e])](_0x41f30d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x26ad40,_0x42f9cd)=>{if(_0x42f9cd[0x0]!=_0x1541f5)return _0x102f10(_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x42f9cd[0x1]={..._0x42f9cd[0x1],[_0x41f30d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4f95aa};},{[_0x41f30d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41f30d([0x68,0x69,0x67,0x68])}),_0x3b2e46[_0x41f30d([0x6f,0x6e])](_0x41f30d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1dcd73=>{_0x3fc86d(_0x1dcd73[_0x41f30d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x203e27=!0x0,_0x236101(_0x1dcd73[_0x41f30d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x41f30d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41f30d([0x6c,0x6f,0x77])}),_0xce099b[_0x41f30d([0x74,0x68,0x65,0x6e])](()=>{_0x203e27||_0x102f10(_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3d291b(){return _0x3b2e46[_0x41f30d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41f30d([0x76,0x69,0x65,0x77])][_0x41f30d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x41f30d([0x61,0x75,0x74,0x6f]);}function _0x43731b(){_0x3b2e46[_0x41f30d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41f30d([0x76,0x69,0x65,0x77])][_0x41f30d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x41f30d([0x61,0x75,0x74,0x6f]);}}function _0x565d69(_0x4f4186){const _0x5b48c2=[new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2fa265=>setTimeout(_0x2fa265,0x5356b2f6^_0x441afa)),_0xce099b[_0x41f30d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d5986=>{let _0x634819=0x0;_0x3b2e46[_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41f30d([0x6f,0x6e])](_0x41f30d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x44b72f,_0x58dd48)=>{_0x58dd48[0x0][_0x41f30d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x634819++,_0x634819==(0x535f8dc2^_0x441afa)&&(_0x4d5986(),_0x44b72f[_0x41f30d([0x6f,0x66,0x66])]());});}))];return window[_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x41f30d([0x72,0x61,0x63,0x65])](_0x5b48c2)[_0x41f30d([0x74,0x68,0x65,0x6e])](()=>_0x4f4186);}async function _0x568fc7(){await _0xce099b,_0x3b2e46[_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41f30d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x13beca,_0x3b2e46[_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41f30d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x13beca,_0x3b2e46[_0x41f30d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x24e709(_0x38d8fd){const _0x4b178f=_0x1af17b();_0x3b2e46[_0x4b178f]=_0x41f30d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x38d8fd,_0x38d8fd!=_0x41f30d([0x56,0x61,0x6c,0x69,0x64])&&_0x568fc7();}function _0x1af17b(){const _0x2456d1=window[_0x41f30d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x41f30d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x41f30d([0x6e,0x6f,0x77])]())[_0x41f30d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x41f30d([0x2e]),'');let _0x36bec6=_0x41f30d([0x68]);for(let _0xf69eb7=0x0;_0xf69eb7<_0x2456d1[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xf69eb7+=0x2){let _0x5e71f1=window[_0x41f30d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2456d1[_0x41f30d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xf69eb7,_0xf69eb7+0x2));_0x5e71f1>=_0x333a03[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5e71f1-=_0x333a03[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x36bec6+=_0x333a03[_0x5e71f1];}return _0x36bec6;}function _0x196b84(){const _0x4cdc2e=_0x120f0f[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e]));if(0x3!=_0x4cdc2e[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x12420b(_0x4cdc2e[0x1]);function _0x12420b(_0x3e7642){const _0x3e89ab=_0x233aa1(_0x3e7642);return _0x3e89ab&&_0x56111d()?_0x3e89ab:null;function _0x56111d(){const _0x69eedf=_0x3e89ab[_0x41f30d([0x6a,0x74,0x69])],_0x591dfd=window[_0x41f30d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x69eedf[_0x41f30d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x69eedf[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2cb47b={..._0x3e89ab,[_0x41f30d([0x6a,0x74,0x69])]:_0x69eedf[_0x41f30d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x69eedf[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2cb47b[_0x41f30d([0x76,0x63])],_0x3402a5(_0x2cb47b)==_0x591dfd;}}}async function _0x6bda32(){let _0x24c231=!0x0;try{const _0x111855=_0x120f0f[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e])),[_0x35a360,_0x246dff,_0x4ee607]=_0x111855;return _0x2a5821(_0x35a360),await _0x2a5f6f(_0x35a360,_0x246dff,_0x4ee607),_0x24c231;}catch{return!0x1;}function _0x2a5821(_0x196a83){const _0x196c16=_0x233aa1(_0x196a83);_0x196c16&&_0x196c16[_0x41f30d([0x61,0x6c,0x67])]==_0x41f30d([0x45,0x53,0x32,0x35,0x36])||(_0x24c231=!0x1);}async function _0x2a5f6f(_0x34cecc,_0x1301a3,_0x8a5f5b){const _0x4e1287=window[_0x41f30d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x41f30d([0x66,0x72,0x6f,0x6d])](_0x6a73c7(_0x8a5f5b),_0x3bd588=>_0x3bd588[_0x41f30d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x362dfc=new window[(_0x41f30d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x41f30d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x34cecc+_0x41f30d([0x2e])+_0x1301a3),_0x2195f3=window[_0x41f30d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x41f30d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2195f3)return;const _0x1345de=await _0x2195f3[_0x41f30d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x41f30d([0x6a,0x77,0x6b]),_0x3b3267,{[_0x41f30d([0x6e,0x61,0x6d,0x65])]:_0x41f30d([0x45,0x43,0x44,0x53,0x41]),[_0x41f30d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x41f30d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x41f30d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2195f3[_0x41f30d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x41f30d([0x6e,0x61,0x6d,0x65])]:_0x41f30d([0x45,0x43,0x44,0x53,0x41]),[_0x41f30d([0x68,0x61,0x73,0x68])]:{[_0x41f30d([0x6e,0x61,0x6d,0x65])]:_0x41f30d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1345de,_0x4e1287,_0x362dfc)||(_0x24c231=!0x1);}}function _0x233aa1(_0x20ee04){return _0x20ee04[_0x41f30d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x41f30d([0x65,0x79]))?JSON[_0x41f30d([0x70,0x61,0x72,0x73,0x65])](_0x6a73c7(_0x20ee04)):null;}function _0x6a73c7(_0x44e923){return window[_0x41f30d([0x61,0x74,0x6f,0x62])](_0x44e923[_0x41f30d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x41f30d([0x2b]))[_0x41f30d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x41f30d([0x2f])));}function _0x3402a5(_0x432512){let _0x4300a2=0x1505;function _0x316a1b(_0x2636f8){for(let _0x2e69fb=0x0;_0x2e69fb<_0x2636f8[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e69fb++){const _0x480a2b=_0x2636f8[_0x41f30d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2e69fb);_0x4300a2=(_0x4300a2<<0x5)+_0x4300a2+_0x480a2b,_0x4300a2&=_0x4300a2;}}function _0x392087(_0x4f7c6b){Array[_0x41f30d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f7c6b)?_0x4f7c6b[_0x41f30d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x392087):_0x4f7c6b&&typeof _0x4f7c6b==_0x41f30d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x41f30d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f7c6b)[_0x41f30d([0x73,0x6f,0x72,0x74])]()[_0x41f30d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x25122f,_0x234244])=>{_0x316a1b(_0x25122f),_0x392087(_0x234244);}):_0x316a1b(window[_0x41f30d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f7c6b));}return _0x392087(_0x432512),_0x4300a2>>>0x0;}function _0x4e3383(_0x3167d8){return _0x3167d8[_0x41f30d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x41f30d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x41f30d([0x30]));}function _0x495fb9(_0x42ea1f){return _0x42ea1f[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x41f30d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x41f30d([0x6a,0x6f,0x69,0x6e])]('');}function _0x13beca(){}function _0x41f30d(_0x2a1474){return _0x2a1474['map'](_0x147a1f=>String['fromCharCode'](_0x147a1f))['join']('');}_0x24e709(await _0x34ef0a());}(this);}['_initSchema'](){const _0x213c2b=this['editor']['model']['schema'];_0x213c2b['isRegistered']('imageBlock')&&_0x213c2b['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x213c2b['isRegistered']('imageInline')&&_0x213c2b['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5bd22a=this['editor'];_0x5bd22a['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5bd22a['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x4bd8dd=>_0x4bd8dd['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x21ddf9=_0x5bd22a['commands']['get']('replaceImageSource');_0x21ddf9&&this['listenTo'](_0x21ddf9,'cleanupImage',(_0x5ca11b,[_0x4bfb17,_0x28b239])=>{_0x4bfb17['removeAttribute']('uploadcareImageId',_0x28b239);});}['_initConfig'](){const _0x7bf39d=this['editor']['config']['get']('uploadcare.uploader')||{},_0x5b9776=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x39ed0a(_0x544b6e['document'],'uc-config',{..._0x7bf39d,'pubkey':_0x5b9776,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x383376=>{if('closeMax'==_0x383376)return'#uc-icon-arrow-down';},_0x544b6e['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x39ed0a(_0x544b6e['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x544b6e['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x54c9cb=this['editor']['commands']['get']('insertImage');_0x54c9cb&&this['listenTo'](_0x54c9cb,'execute',()=>{const _0x557c14=this['editor']['model']['document']['selection']['getSelectedElement']();_0x557c14&&_0x557c14['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x557c14);});});const _0x225e0b=this['editor']['commands']['get']('uploadcareImageReplace');_0x225e0b&&this['listenTo'](_0x225e0b,'execute',()=>{const _0x509f6c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x509f6c&&_0x509f6c['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x509f6c);});});}}class tt extends _0x3bd795{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe0f7bd){super(_0xe0f7bd),_0xe0f7bd['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4ae532['defineComponents'](_0x4ae532),this['_defineLocale']();}['_defineLocale'](){const _0x279839=this['editor']['config']['get']('uploadcare.locale'),_0x484951=this['editor']['locale']['contentLanguage'];_0x279839&&_0x4ae532['defineLocale'](_0x484951,_0x279839);}}class ii extends _0x385054{constructor(_0x37558d){super(_0x37558d);const t=_0x37558d['t'],_0x4fa1b5=this['bindTemplate'],_0x108a0e=new _0x596a6a();_0x108a0e['isVisible']=!0x0,this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__loading'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__loading-spinner']},'children':[_0x108a0e,{'text':_0x4fa1b5['to']('imageUploadProgress',_0x19d08c=>t('Loading\x20image...')+'\x20('+(_0x19d08c||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x385054{constructor(_0x2b5520){super(_0x2b5520);const t=_0x2b5520['t'];this['set']('errorType',null);const _0x4bab26=new _0x172be1(_0x2b5520);_0x4bab26['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4bab26['withText']=!0x0,_0x4bab26['class']='ck-button-action',_0x4bab26['on']('execute',()=>{this['fire']('retry');}),_0x4bab26['bind']('isVisible')['to'](this,'errorType',_0x5337a0=>'NotFound'!==_0x5337a0);const _0x34de5e=new _0x4b9e44();_0x34de5e['content']=_0x5c74cf,_0x34de5e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x73ad67=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x34de5e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x73ad67['to']('errorType',_0x3083e7=>t('NotFound'!==_0x3083e7?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4bab26]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x385054{constructor(_0x4540e6,_0x1c8c0f){super(_0x4540e6);const _0x2d11c1=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1c8c0f,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2d11c1['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x30431b,_0xcd9896,_0x5cfec4){super(_0x30431b),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x30431b),this['_errorView']=new ti(_0x30431b),this['_editingView']=new ei(_0x30431b,_0x5cfec4),this['_focusableView']=new _0x385054(_0x30431b),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0xcd9896),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all-excluded','ck-uploadcare-form'],'tabindex':'-1'},'children':this['_items']}),this['_setView'](),this['once']('render',()=>{this['_waitForImageEditorComponent'](this['element'],_0x1f1eb1=>{this['_addUploadcareImageEditorListeners'](_0x1f1eb1);});}),this['on']('change:status',()=>{this['_setView']();}),this['_addErrorViewListeners']();}['focus'](){this['element']['focus']();}['_setView'](){switch(this['_items']['clear'](),this['status']){case'uploading':this['_items']['add'](this['_loadingView']);break;case'error':this['_items']['add'](this['_errorView']);break;case'ready':this['_items']['addMany']([this['_editingView'],this['_focusableView']]);}}['_waitForImageEditorComponent'](_0x54c163,_0x328acb){const _0x475d94='uc-cloud-image-editor',_0x445a0e=_0x54c163['querySelector'](_0x475d94);if(_0x445a0e)return _0x328acb(_0x445a0e);const _0x442508=new MutationObserver(_0x26e307=>{const _0x5ddffd=_0x26e307['filter'](_0x37ab30=>_0x37ab30['target']===_0x54c163&&_0x37ab30['addedNodes']['length']>0x0&&_0x37ab30['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x475d94);_0x5ddffd['length']&&(_0x442508['disconnect'](),_0x328acb(_0x5ddffd[0x0]['addedNodes'][0x0]));});_0x442508['observe'](_0x54c163,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0xb24aae){_0xb24aae['addEventListener']('apply',_0x30e50b=>{this['fire']('apply',{'imageSrc':_0x30e50b['detail']['cdnUrl']});}),_0xb24aae['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x6d5f1b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x37ad70,_0x32b919,_0x4da984){super(),this['_editor']=_0x37ad70,this['_dialog']=_0x32b919,this['_imageElement']=_0x4da984,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x39fd0e=this['_imageElement'],_0x5d4e54=_0x39fd0e['getAttribute']('uploadcareImageId'),_0x2112b9=_0x39fd0e['getAttribute']('src');if(_0x5d4e54)await this['_loadImageInfo'](_0x5d4e54,_0x2112b9);else{if(this['_imageCache']['has'](_0x2112b9)){const _0x6e9576=this['_imageCache']['get'](_0x2112b9);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x6e9576['url'],this['imageDimension']=_0x6e9576['dimension'],this['imageId']=_0x6e9576['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x561ebf}=this['_editor'],t=_0x561ebf['t'],_0x1c1a9d=new X(_0x561ebf,this['imageStatus'],this['_attributes']);_0x1c1a9d['bind']('status')['to'](this,'imageStatus'),_0x1c1a9d['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1c1a9d['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1c1a9d['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1c1a9d,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1028ed,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1c1a9d,'position':_0x18301e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1c1a9d['focus']();},'onHide':()=>{_0x1c1a9d['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xf1909=>!A(_0xf1909,_0x1c1a9d['element'])}});}['_loadImageInfo'](_0x2cacd0,_0xc4a8a3){return j['getInfo'](_0x2cacd0,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x13bbb4=>{const {width:_0x479b53,height:_0x8e0da6}=_0x13bbb4['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xc4a8a3,this['imageDimension']={'width':_0x479b53,'height':_0x8e0da6},this['imageId']=_0x2cacd0;})['catch'](_0x4b710a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4b710a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x26635d,_0x191805){return this['_getImageAsFile'](_0x26635d)['then'](_0xd203a2=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x191805['signal'],'file':_0xd203a2,'onProgress':_0x2430dc=>{_0x2430dc&&_0x2430dc['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2430dc['value']));}}))['then'](_0x337a8b=>{const {width:_0x100e40,height:_0x5e1dc9}=_0x337a8b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x337a8b['cdnUrl'],this['imageDimension']={'width':_0x100e40,'height':_0x5e1dc9},this['imageId']=_0x337a8b['uuid'],this['imageUploadProgress']=null;const _0x3743ad=_0x26635d['getAttribute']('src');this['_imageCache']['set'](_0x3743ad,{'id':_0x337a8b['uuid'],'url':_0x337a8b['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x490b03=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x490b03['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x194190,_0x26f3aa){_0x194190['on']('apply',(_0x3c7441,_0x4aa2af)=>{this['_replaceImage'](_0x26f3aa,_0x4aa2af['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x194190['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x194190['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2e0481,_0x4929e1,_0x58d05f){const _0x2f7900=this['_editor'],{width:_0x23ea04,height:_0x54022c}=S(_0x4929e1,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3bbb66,imageSources:_0x1d7852}=C(_0x4929e1,_0x23ea04);_0x2f7900['model']['change'](_0x34dc05=>{if('$graveyard'===_0x2e0481['root']['rootName']){_0x2f7900['execute']('insertImage',{'imageType':_0x2e0481['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2e0481['getAttributes']()),'uploadcareImageId':_0x58d05f,'src':_0x3bbb66,'sources':_0x1d7852,'width':_0x23ea04,'height':_0x54022c}});const _0x51498b=_0x2e0481['getChildren']();_0x2e0481=_0x2f7900['model']['document']['selection']['getSelectedElement']();for(const _0x155205 of _0x51498b)_0x34dc05['append'](_0x34dc05['cloneElement'](_0x155205),_0x2e0481);}else _0x34dc05['setSelection'](_0x2e0481,'on'),_0x2f7900['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2e0481['getAttributes']()),'uploadcareImageId':_0x58d05f,'src':_0x3bbb66,'sources':_0x1d7852,'width':_0x23ea04,'height':_0x54022c},_0x2e0481);_0x34dc05['setSelection'](_0x2e0481,'on');});}async['_getImageAsFile'](_0x4f4de7){const _0x3522ba=_0x544b6e['window'],_0x12e2d6=_0x544b6e['document']['location']['href'],_0x36da8a=new _0x3522ba['URL'](_0x4f4de7['getAttribute']('src'),_0x12e2d6);if('data:'===_0x36da8a['protocol']){const _0x25e496=_0x36da8a['href']['split'](','),_0x1f554c=_0x25e496[0x0]['match'](/:(.*?);/)[0x1],_0x1eecae=_0x1f554c['split']('/')[0x1],_0x23a437=_0x3522ba['atob'](_0x25e496[_0x25e496['length']-0x1]);let _0x5bfd7b=_0x23a437['length'];const _0x1457cf=new _0x3522ba['Uint8Array'](_0x5bfd7b);for(;_0x5bfd7b--;)_0x1457cf[_0x5bfd7b]=_0x23a437['charCodeAt'](_0x5bfd7b);return new _0x3522ba['File']([_0x1457cf],'image.'+_0x1eecae,{'type':_0x1f554c});}const _0x43201c=_0x36da8a['href']['split']('/'),_0x3475b0=_0x43201c[_0x43201c['length']-0x1],_0x545338=_0x3475b0['split']('.')[0x1];return _0x3522ba['fetch'](_0x36da8a['href'])['then'](_0x4f685e=>_0x4f685e['clone']()['blob']())['then'](_0x3cf134=>new _0x3522ba['File']([_0x3cf134],_0x3475b0,{'type':'image/'+_0x545338}));}}class Q extends _0x2b6c67{['imageEditController'];static get['requires'](){return[_0xbe1041];}['_isEditable'];constructor(_0x232cd2){super(_0x232cd2),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x2ef950){const _0x5b118a=z(_0x2ef950);return _0x53e78f=>!(!_0x53e78f||!_0x53e78f['is']('element','imageBlock')&&!_0x53e78f['is']('element','imageInline'))&&(!!_0x53e78f['hasAttribute']('uploadcareImageId')||!!_0x53e78f['hasAttribute']('src')&&_0x5b118a(_0x53e78f['getAttribute']('src')));}(_0x232cd2['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x17b984=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x17b984);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5a5383=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5a5383&&(_0x5a5383['is']('element','imageBlock')||_0x5a5383['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0xbe1041),_0x5a5383),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x2b6c67{['refresh'](){const _0x32dbef=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x32dbef&&(_0x32dbef['is']('element','imageBlock')||_0x32dbef['is']('element','imageInline')));}['execute'](_0x15d4eb){const _0x2a6bbf=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5e8d91=>{_0x5e8d91['setAttributes'](_0x15d4eb,_0x2a6bbf),_0x5e8d91['removeAttribute']('srcset',_0x2a6bbf),_0x5e8d91['removeAttribute']('sizes',_0x2a6bbf);});}}class m extends _0x3bd795{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x358e78,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4f3937}=this;_0x4f3937['commands']['add']('uploadcareImageEdit',new Q(_0x4f3937)),_0x4f3937['commands']['add']('uploadcareImageReplace',new V(_0x4f3937));}}class g extends _0x3bd795{['_imageCache']=new Map();static get['pluginName'](){return'UploadcareImageEditUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['imageCache'](){return this['_imageCache'];}['init'](){const _0x2fb395=this['editor'];_0x2fb395['ui']['componentFactory']['add']('uploadcareImageEdit',_0x403102=>{const _0x31b923=_0x2fb395['commands']['get']('uploadcareImageEdit'),_0x421082=new _0x172be1(_0x403102),t=_0x403102['t'];return _0x421082['set']({'icon':_0x1028ed,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x421082['bind']('isEnabled')['to'](_0x31b923),_0x421082['bind']('isOn')['to'](_0x31b923,'isActive'),this['listenTo'](_0x421082,'execute',()=>{_0x2fb395['execute']('uploadcareImageEdit'),_0x2fb395['editing']['view']['focus']();}),_0x421082;}),this['_initConfig']();}['_initConfig'](){const _0x438f5a=_0x39ed0a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x438f5a),this['listenTo'](this['editor'],'destroy',()=>{_0x438f5a['remove']();});}}class et extends _0x3bd795{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251127.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20251127.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251127.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20251127.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251127.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251127.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251127.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251127.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251127.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.19.4",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x704e24=_0x4040;(function(_0x2af535,_0xa6b0d3){const _0x5ab8a4=_0x4040,_0x24f116=_0x2af535();while(!![]){try{const _0x19db48=parseInt(_0x5ab8a4(0xec))/0x1+parseInt(_0x5ab8a4(0x126))/0x2*(parseInt(_0x5ab8a4(0x118))/0x3)+parseInt(_0x5ab8a4(0x12d))/0x4+-parseInt(_0x5ab8a4(0x120))/0x5*(parseInt(_0x5ab8a4(0x10b))/0x6)+parseInt(_0x5ab8a4(0x13d))/0x7+parseInt(_0x5ab8a4(0x136))/0x8+-parseInt(_0x5ab8a4(0x12c))/0x9*(parseInt(_0x5ab8a4(0xfc))/0xa);if(_0x19db48===_0xa6b0d3)break;else _0x24f116['push'](_0x24f116['shift']());}catch(_0x2c39f8){_0x24f116['push'](_0x24f116['shift']());}}}(_0x2cff,0x5a82d));import{Plugin as _0xe79a03}from'ckeditor5/src/core.js';import{Dialog as _0x3111bb}from'ckeditor5/src/ui.js';function _0x4040(_0x45d0d6,_0x542705){const _0x2cff72=_0x2cff();return _0x4040=function(_0x4040ed,_0x3488b9){_0x4040ed=_0x4040ed-0xea;let _0xb6e4bf=_0x2cff72[_0x4040ed];return _0xb6e4bf;},_0x4040(_0x45d0d6,_0x542705);}import{createElement as _0xccb8e2,global as _0xf78b76,uid as _0x40747c}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x3f70bd}from'./uploadcarecommand.js';function _0x2cff(){const _0x566db6=['uploadcareImageReplace','#uc-icon-arrow-down','conversion','get','appendChild','downcast','_initSchema','1060465FYAKoY','contentLanguage','configElement','getAttribute','isRegistered','_initConversion','1293668WRJdzC','destroy','once','elementToAttribute','uc-upload-ctx-provider','join','114183mTTLUP','435884djBhCz','iconHrefResolver','listenTo','editor','config','isOfficialPlugin','body','editing','_initImageProcessingIndicator','2254896yOdLog','uploadcare.uploader','PictureEditing','closeMax','upcast','uploadcare.pubkey','for','2414923yNJFID','UploadcareEditing','view','true','684549Fozjrq','data-uc-image-id','model','ucContextId','_initConfig','replaceImageSource','cleanupImage','map','insertImage','remove','getSelectedElement','init','render','imageInline','document','imageBlock','1170snPiZo','isPremiumPlugin','ctxElement','execute','uploadcareImageId','querySelector','uploader-','\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','locale','extend','input[uploadcare-file-input]','selection','removeAttribute','commands','pluginName','6eluFBW','fromCharCode','schema','uploadcare','_configElement','href','_initCtx','attributeToAttribute','requires','uc-config','add','_ctxElement','afterInit','3hIrowh'];_0x2cff=function(){return _0x566db6;};return _0x2cff();}import{UploadcareUploadAdapter as _0x2d39da}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x546879}from'./utils/editingutils.js';export class UploadcareEditing extends _0xe79a03{[_0x704e24(0x10f)]=null;[_0x704e24(0x116)]=null;static get[_0x704e24(0x10a)](){const _0x4184c7=_0x704e24;return _0x4184c7(0x13e);}static get[_0x704e24(0x113)](){const _0x5525e7=_0x704e24;return[_0x5525e7(0x138),_0x2d39da,_0x3111bb];}static get[_0x704e24(0x132)](){return!0x0;}static get[_0x704e24(0xfd)](){return!0x0;}[_0x704e24(0xef)];get[_0x704e24(0x122)](){const _0x3335eb=_0x704e24;return this[_0x3335eb(0x10f)];}get[_0x704e24(0xfe)](){const _0x2d9e66=_0x704e24;return this[_0x2d9e66(0x116)];}constructor(_0x484aab){const _0x1c9aaf=_0x704e24;super(_0x484aab),this[_0x1c9aaf(0xef)]=_0x40747c();}[_0x704e24(0xf7)](){const _0xc40a5e=_0x704e24,_0x4a286e=this[_0xc40a5e(0x130)];_0x4a286e[_0xc40a5e(0x109)][_0xc40a5e(0x115)](_0xc40a5e(0x10e),new _0x3f70bd(_0x4a286e));}[_0x704e24(0x117)](){const _0x555b03=_0x704e24;this[_0x555b03(0x11f)](),this[_0x555b03(0x125)](),this[_0x555b03(0xf0)](),this[_0x555b03(0x111)](),this[_0x555b03(0x135)](),this[_0x555b03(0x12f)](this[_0x555b03(0x130)],_0x555b03(0x127),()=>{const _0x529e20=_0x555b03;this[_0x529e20(0x10f)]&&(this[_0x529e20(0x10f)][_0x529e20(0xf5)](),this[_0x529e20(0x10f)]=null),this[_0x529e20(0x116)]&&(this[_0x529e20(0x116)][_0x529e20(0xf5)](),this[_0x529e20(0x116)]=null);const _0x4a5d7c=_0xf78b76[_0x529e20(0xfa)][_0x529e20(0x101)](_0x529e20(0x106));_0x4a5d7c&&_0x4a5d7c[_0x529e20(0xf5)]();}),async function(_0x2f1fde){const _0xcebe92=_0x4cff47([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]),_0x1c4480=0x535f8c3a,_0x2c751d=0x5358f60a^_0x1c4480,_0x2d3fb2=window[_0x4cff47([0x44,0x61,0x74,0x65])][_0x4cff47([0x6e,0x6f,0x77])](),_0x41a545=_0x2f1fde[_0x4cff47([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2cc1fa=new window[(_0x4cff47([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b05ec=>{_0x41a545[_0x4cff47([0x6f,0x6e,0x63,0x65])](_0x4cff47([0x72,0x65,0x61,0x64,0x79]),_0x3b05ec);}),_0x531d93={[_0x4cff47([0x6b,0x74,0x79])]:_0x4cff47([0x45,0x43]),[_0x4cff47([0x75,0x73,0x65])]:_0x4cff47([0x73,0x69,0x67]),[_0x4cff47([0x63,0x72,0x76])]:_0x4cff47([0x50,0x2d,0x32,0x35,0x36]),[_0x4cff47([0x78])]:_0x4cff47([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]),[_0x4cff47([0x79])]:_0x4cff47([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]),[_0x4cff47([0x61,0x6c,0x67])]:_0x4cff47([0x45,0x53,0x32,0x35,0x36])},_0x233c84=_0x41a545[_0x4cff47([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4cff47([0x67,0x65,0x74])](_0x4cff47([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4762ed(){let _0x8ae983,_0xe5ed2e=null,_0x302e10=null;try{if(_0x233c84==_0x4cff47([0x47,0x50,0x4c]))return _0x4cff47([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x8ae983=_0x1aa774(),!_0x8ae983)return _0x4cff47([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x8ae983[_0x4cff47([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x302e10=_0x19385d(_0x8ae983[_0x4cff47([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x8ae983[_0x4cff47([0x6a,0x74,0x69])])),await _0x28cedd()?_0x16f700()?_0xa29d58()?_0x4cff47([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x52654e()?(_0x8ae983[_0x4cff47([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4cff47([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xe5ed2e=_0x3579ef(_0x4cff47([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x8ae983[_0x4cff47([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4cff47([0x74,0x72,0x69,0x61,0x6c])&&(_0xe5ed2e=_0x3579ef(_0x4cff47([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xebc73a()):_0x4cff47([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4cff47([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4cff47([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4cff47([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xa29d58(){const _0x2d4eac=[_0x4cff47([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4cff47([0x74,0x72,0x69,0x61,0x6c])][_0x4cff47([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8ae983[_0x4cff47([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2d3fb2/0x3e8:0xe10*_0x2c751d;return _0x8ae983[_0x4cff47([0x65,0x78,0x70])]<_0x2d4eac;}function _0x16f700(){const _0x359906=_0x8ae983[_0x4cff47([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x359906&&(!!_0x359906[_0x4cff47([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4cff47([0x2a]))||!!_0x359906[_0x4cff47([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4cff47([0x55,0x50,0x4c,0x43])));}function _0x52654e(){const _0x43a610=_0x4040,_0x5e4c81=_0x8ae983[_0x4cff47([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5e4c81||0x0==_0x5e4c81[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x16f8d4}=new URL(window[_0x4cff47([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x43a610(0x110)]);if(_0x5e4c81[_0x4cff47([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x16f8d4))return!0x0;const _0x248446=_0x16f8d4[_0x4cff47([0x73,0x70,0x6c,0x69,0x74])](_0x4cff47([0x2e]));return _0x5e4c81[_0x4cff47([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x9f116d=>_0x9f116d[_0x4cff47([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4cff47([0x2a])))[_0x4cff47([0x6d,0x61,0x70])](_0x2febca=>_0x2febca[_0x4cff47([0x73,0x70,0x6c,0x69,0x74])](_0x4cff47([0x2e])))[_0x4cff47([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x112f5e=>_0x112f5e[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x248446[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4cff47([0x6d,0x61,0x70])](_0x54c8bb=>Array(_0x248446[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x54c8bb[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4cff47([0x66,0x69,0x6c,0x6c])](_0x54c8bb[0x0]===_0x4cff47([0x2a])?_0x4cff47([0x2a]):'')[_0x4cff47([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x54c8bb))[_0x4cff47([0x73,0x6f,0x6d,0x65])](_0x5ba3f6=>_0x248446[_0x4cff47([0x65,0x76,0x65,0x72,0x79])]((_0x51d62c,_0x2422f3)=>_0x5ba3f6[_0x2422f3]===_0x51d62c||_0x5ba3f6[_0x2422f3]===_0x4cff47([0x2a])));}function _0xebc73a(){return _0xe5ed2e&&_0x302e10?new window[(_0x4cff47([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5b7129,_0x3cddf3)=>{_0xe5ed2e[_0x4cff47([0x74,0x68,0x65,0x6e])](_0x5b7129,_0x3cddf3),_0x302e10[_0x4cff47([0x74,0x68,0x65,0x6e])](_0x2f99f1=>{_0x2f99f1!=_0x4cff47([0x56,0x61,0x6c,0x69,0x64])&&_0x5b7129(_0x2f99f1);},_0x3cddf3);}):_0xe5ed2e||_0x302e10||_0x4cff47([0x56,0x61,0x6c,0x69,0x64]);}}function _0x19385d(_0x1e7f45,_0x39ec4c){return new window[(_0x4cff47([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ab652=>{if(_0x25a344())return _0x4ab652(_0x4cff47([0x56,0x61,0x6c,0x69,0x64]));_0x28469b(),_0x41a545[_0x4cff47([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4cff47([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2442d3=!0x1;const _0x2d807=_0x40747c();function _0x5eea05(_0x1bb823){return!!_0x1bb823&&(typeof _0x1bb823===_0x4cff47([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1bb823===_0x4cff47([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1bb823[_0x4cff47([0x74,0x68,0x65,0x6e])]===_0x4cff47([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1bb823[_0x4cff47([0x63,0x61,0x74,0x63,0x68])]===_0x4cff47([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2e3e22(_0x565b64){_0x1e474a(_0x565b64)[_0x4cff47([0x74,0x68,0x65,0x6e])](_0x470cfe=>{if(!_0x470cfe||_0x470cfe[_0x4cff47([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4cff47([0x6f,0x6b]))return _0x4cff47([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4c3bbd(_0x44e756(_0x2d807+_0x39ec4c))!=_0x470cfe[_0x4cff47([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4cff47([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4cff47([0x56,0x61,0x6c,0x69,0x64]);})[_0x4cff47([0x74,0x68,0x65,0x6e])](_0x3fdc62=>(_0x3b6bc4(),_0x3fdc62),()=>{const _0x161287=_0x46acb4();return null==_0x161287?(_0x3b6bc4(),_0x4cff47([0x56,0x61,0x6c,0x69,0x64])):_0x4cff47(_0x2d3fb2-_0x161287>(0x7753083a^_0x1c4480)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4cff47([0x74,0x68,0x65,0x6e])](_0x4ab652)[_0x4cff47([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4ab652(_0x4cff47([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x23e9c1=0x536962ba^_0x1c4480;function _0x3b6bc4(){const _0x43e449=_0x4cff47([0x6c,0x6c,0x63,0x74,0x2d])+_0x4c3bbd(_0x44e756(_0x1e7f45)),_0x15ebd7=_0x52abfa(_0x4c3bbd(window[_0x4cff47([0x4d,0x61,0x74,0x68])][_0x4cff47([0x63,0x65,0x69,0x6c])](_0x2d3fb2/_0x23e9c1)));window[_0x4cff47([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4cff47([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x43e449,_0x15ebd7);}function _0x46acb4(){const _0x2e06fd=_0x4cff47([0x6c,0x6c,0x63,0x74,0x2d])+_0x4c3bbd(_0x44e756(_0x1e7f45)),_0x4dd758=window[_0x4cff47([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4cff47([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2e06fd);return _0x4dd758?window[_0x4cff47([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x52abfa(_0x4dd758),0x10)*_0x23e9c1:null;}function _0x1e474a(_0x50ee17){return new window[(_0x4cff47([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xc614bb,_0x547198)=>{_0x50ee17[_0x4cff47([0x74,0x68,0x65,0x6e])](_0xc614bb,_0x547198),window[_0x4cff47([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x547198,0x535e58fa^_0x1c4480);});}}_0x41a545[_0x4cff47([0x6f,0x6e])](_0x4cff47([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4ddec3,_0x58a8ea)=>{if(_0x58a8ea[0x0]!=_0x1e7f45)return _0x4ab652(_0x4cff47([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x58a8ea[0x1]={..._0x58a8ea[0x1],[_0x4cff47([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2d807};},{[_0x4cff47([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4cff47([0x68,0x69,0x67,0x68])}),_0x41a545[_0x4cff47([0x6f,0x6e])](_0x4cff47([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x546c52=>{_0x5eea05(_0x546c52[_0x4cff47([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2442d3=!0x0,_0x2e3e22(_0x546c52[_0x4cff47([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4cff47([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4cff47([0x6c,0x6f,0x77])}),_0x2cc1fa[_0x4cff47([0x74,0x68,0x65,0x6e])](()=>{_0x2442d3||_0x4ab652(_0x4cff47([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x25a344(){return _0x41a545[_0x4cff47([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4cff47([0x76,0x69,0x65,0x77])][_0x4cff47([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4cff47([0x61,0x75,0x74,0x6f]);}function _0x28469b(){_0x41a545[_0x4cff47([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4cff47([0x76,0x69,0x65,0x77])][_0x4cff47([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4cff47([0x61,0x75,0x74,0x6f]);}}function _0x3579ef(_0x254c8f){const _0x5acd35=[new window[(_0x4cff47([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x489901=>setTimeout(_0x489901,0x5356b2f6^_0x1c4480)),_0x2cc1fa[_0x4cff47([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4cff47([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x8fbec=>{let _0x2c4cd5=0x0;_0x41a545[_0x4cff47([0x6d,0x6f,0x64,0x65,0x6c])][_0x4cff47([0x6f,0x6e])](_0x4cff47([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x32c5ba,_0x39d94d)=>{_0x39d94d[0x0][_0x4cff47([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2c4cd5++,_0x2c4cd5==(0x535f8dc2^_0x1c4480)&&(_0x8fbec(),_0x32c5ba[_0x4cff47([0x6f,0x66,0x66])]());});}))];return window[_0x4cff47([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4cff47([0x72,0x61,0x63,0x65])](_0x5acd35)[_0x4cff47([0x74,0x68,0x65,0x6e])](()=>_0x254c8f);}async function _0x32e5fa(){await _0x2cc1fa,_0x41a545[_0x4cff47([0x6d,0x6f,0x64,0x65,0x6c])][_0x4cff47([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xa3ce7d,_0x41a545[_0x4cff47([0x6d,0x6f,0x64,0x65,0x6c])][_0x4cff47([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xa3ce7d,_0x41a545[_0x4cff47([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4cff47([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x275e6c(_0x147161){const _0x32a21a=_0x2c5c62();_0x41a545[_0x32a21a]=_0x4cff47([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x147161,_0x147161!=_0x4cff47([0x56,0x61,0x6c,0x69,0x64])&&_0x32e5fa();}function _0x2c5c62(){const _0x995569=window[_0x4cff47([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4cff47([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4cff47([0x6e,0x6f,0x77])]())[_0x4cff47([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4cff47([0x2e]),'');let _0x26a822=_0x4cff47([0x68]);for(let _0x42fca9=0x0;_0x42fca9<_0x995569[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x42fca9+=0x2){let _0x138991=window[_0x4cff47([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x995569[_0x4cff47([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x42fca9,_0x42fca9+0x2));_0x138991>=_0xcebe92[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x138991-=_0xcebe92[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x26a822+=_0xcebe92[_0x138991];}return _0x26a822;}function _0x1aa774(){const _0x4fc282=_0x233c84[_0x4cff47([0x73,0x70,0x6c,0x69,0x74])](_0x4cff47([0x2e]));if(0x3!=_0x4fc282[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4c763a(_0x4fc282[0x1]);function _0x4c763a(_0x3bb03d){const _0xa27597=_0x2b5f6d(_0x3bb03d);return _0xa27597&&_0x264b2d()?_0xa27597:null;function _0x264b2d(){const _0x4f731e=_0xa27597[_0x4cff47([0x6a,0x74,0x69])],_0x1b0bdb=window[_0x4cff47([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f731e[_0x4cff47([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f731e[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x504597={..._0xa27597,[_0x4cff47([0x6a,0x74,0x69])]:_0x4f731e[_0x4cff47([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4f731e[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x504597[_0x4cff47([0x76,0x63])],_0x44e756(_0x504597)==_0x1b0bdb;}}}async function _0x28cedd(){let _0x18956f=!0x0;try{const _0x3da249=_0x233c84[_0x4cff47([0x73,0x70,0x6c,0x69,0x74])](_0x4cff47([0x2e])),[_0x115ead,_0x32e205,_0x15f1e3]=_0x3da249;return _0x545ec1(_0x115ead),await _0x55b40f(_0x115ead,_0x32e205,_0x15f1e3),_0x18956f;}catch{return!0x1;}function _0x545ec1(_0xe3a5a1){const _0x1927b3=_0x2b5f6d(_0xe3a5a1);_0x1927b3&&_0x1927b3[_0x4cff47([0x61,0x6c,0x67])]==_0x4cff47([0x45,0x53,0x32,0x35,0x36])||(_0x18956f=!0x1);}async function _0x55b40f(_0x41766d,_0x1876b2,_0x37b8d2){const _0x239c8d=window[_0x4cff47([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4cff47([0x66,0x72,0x6f,0x6d])](_0x55cd8a(_0x37b8d2),_0x4334d1=>_0x4334d1[_0x4cff47([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x356284=new window[(_0x4cff47([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4cff47([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x41766d+_0x4cff47([0x2e])+_0x1876b2),_0x38b015=window[_0x4cff47([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4cff47([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x38b015)return;const _0x1b9bc8=await _0x38b015[_0x4cff47([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4cff47([0x6a,0x77,0x6b]),_0x531d93,{[_0x4cff47([0x6e,0x61,0x6d,0x65])]:_0x4cff47([0x45,0x43,0x44,0x53,0x41]),[_0x4cff47([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4cff47([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4cff47([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x38b015[_0x4cff47([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4cff47([0x6e,0x61,0x6d,0x65])]:_0x4cff47([0x45,0x43,0x44,0x53,0x41]),[_0x4cff47([0x68,0x61,0x73,0x68])]:{[_0x4cff47([0x6e,0x61,0x6d,0x65])]:_0x4cff47([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1b9bc8,_0x239c8d,_0x356284)||(_0x18956f=!0x1);}}function _0x2b5f6d(_0x1d6258){return _0x1d6258[_0x4cff47([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4cff47([0x65,0x79]))?JSON[_0x4cff47([0x70,0x61,0x72,0x73,0x65])](_0x55cd8a(_0x1d6258)):null;}function _0x55cd8a(_0xaae3c3){return window[_0x4cff47([0x61,0x74,0x6f,0x62])](_0xaae3c3[_0x4cff47([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4cff47([0x2b]))[_0x4cff47([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4cff47([0x2f])));}function _0x44e756(_0x35df23){let _0x31e5ed=0x1505;function _0x1ede93(_0x186c10){for(let _0x1dbbad=0x0;_0x1dbbad<_0x186c10[_0x4cff47([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1dbbad++){const _0x18c6e8=_0x186c10[_0x4cff47([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1dbbad);_0x31e5ed=(_0x31e5ed<<0x5)+_0x31e5ed+_0x18c6e8,_0x31e5ed&=_0x31e5ed;}}function _0x3887c5(_0x567bc3){Array[_0x4cff47([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x567bc3)?_0x567bc3[_0x4cff47([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3887c5):_0x567bc3&&typeof _0x567bc3==_0x4cff47([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4cff47([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x567bc3)[_0x4cff47([0x73,0x6f,0x72,0x74])]()[_0x4cff47([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x87675a,_0x963df8])=>{_0x1ede93(_0x87675a),_0x3887c5(_0x963df8);}):_0x1ede93(window[_0x4cff47([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x567bc3));}return _0x3887c5(_0x35df23),_0x31e5ed>>>0x0;}function _0x4c3bbd(_0x223fcb){return _0x223fcb[_0x4cff47([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4cff47([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4cff47([0x30]));}function _0x52abfa(_0x5819d1){return _0x5819d1[_0x4cff47([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4cff47([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4cff47([0x6a,0x6f,0x69,0x6e])]('');}function _0xa3ce7d(){}function _0x4cff47(_0x154d26){const _0x594d57=_0x4040;return _0x154d26[_0x594d57(0xf3)](_0x23f810=>String[_0x594d57(0x10c)](_0x23f810))[_0x594d57(0x12b)]('');}_0x275e6c(await _0x4762ed());}(this);}[_0x704e24(0x11f)](){const _0x6eb09f=_0x704e24,_0x378404=this[_0x6eb09f(0x130)][_0x6eb09f(0xee)][_0x6eb09f(0x10d)];_0x378404[_0x6eb09f(0x124)](_0x6eb09f(0xfb))&&_0x378404[_0x6eb09f(0x105)](_0x6eb09f(0xfb),{'allowAttributes':[_0x6eb09f(0x100)]}),_0x378404[_0x6eb09f(0x124)](_0x6eb09f(0xf9))&&_0x378404[_0x6eb09f(0x105)](_0x6eb09f(0xf9),{'allowAttributes':[_0x6eb09f(0x100)]});}[_0x704e24(0x125)](){const _0x533d33=_0x704e24,_0x362432=this[_0x533d33(0x130)];_0x362432[_0x533d33(0x11b)][_0x533d33(0x13c)](_0x533d33(0x11e))[_0x533d33(0x112)]({'model':_0x533d33(0x100),'view':_0x533d33(0xed)}),_0x362432[_0x533d33(0x11b)][_0x533d33(0x13c)](_0x533d33(0x13a))[_0x533d33(0x129)]({'model':{'key':_0x533d33(0x100),'value':_0x5f16cc=>_0x5f16cc[_0x533d33(0x123)](_0x533d33(0xed))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x492b67=_0x362432[_0x533d33(0x109)][_0x533d33(0x11c)](_0x533d33(0xf1));_0x492b67&&this[_0x533d33(0x12f)](_0x492b67,_0x533d33(0xf2),(_0x2f3c33,[_0x292d06,_0x740fdc])=>{const _0x30e619=_0x533d33;_0x292d06[_0x30e619(0x108)](_0x30e619(0x100),_0x740fdc);});}[_0x704e24(0xf0)](){const _0x3154a3=_0x704e24,_0x31cb29=this[_0x3154a3(0x130)][_0x3154a3(0x131)][_0x3154a3(0x11c)](_0x3154a3(0x137))||{},_0x5bcc9b=this[_0x3154a3(0x130)][_0x3154a3(0x131)][_0x3154a3(0x11c)](_0x3154a3(0x13b))||'';this[_0x3154a3(0x10f)]=_0xccb8e2(_0xf78b76[_0x3154a3(0xfa)],_0x3154a3(0x114),{..._0x31cb29,'pubkey':_0x5bcc9b,'ctx-name':_0x3154a3(0x102)+this[_0x3154a3(0xef)],'sourceList':'','imgOnly':_0x3154a3(0xeb),'removeCopyright':_0x3154a3(0xeb),'localeName':this[_0x3154a3(0x130)][_0x3154a3(0x104)][_0x3154a3(0x121)],'externalSourcesEmbedCss':_0x3154a3(0x103)}),this[_0x3154a3(0x10f)][_0x3154a3(0x12e)]=_0xc59a84=>{const _0x9f2689=_0x3154a3;if(_0x9f2689(0x139)==_0xc59a84)return _0x9f2689(0x11a);},_0xf78b76[_0x3154a3(0xfa)][_0x3154a3(0x133)][_0x3154a3(0x11d)](this[_0x3154a3(0x10f)]);}[_0x704e24(0x111)](){const _0x2d2bf9=_0x704e24;this[_0x2d2bf9(0x116)]=_0xccb8e2(_0xf78b76[_0x2d2bf9(0xfa)],_0x2d2bf9(0x12a),{'ctx-name':_0x2d2bf9(0x102)+this[_0x2d2bf9(0xef)]}),_0xf78b76[_0x2d2bf9(0xfa)][_0x2d2bf9(0x133)][_0x2d2bf9(0x11d)](this[_0x2d2bf9(0x116)]);}[_0x704e24(0x135)](){const _0x42e0ba=_0x704e24,_0x3c957d=this[_0x42e0ba(0x130)][_0x42e0ba(0x109)][_0x42e0ba(0x11c)](_0x42e0ba(0xf4));_0x3c957d&&this[_0x42e0ba(0x12f)](_0x3c957d,_0x42e0ba(0xff),()=>{const _0xcb2b65=_0x42e0ba,_0x52259d=this[_0xcb2b65(0x130)][_0xcb2b65(0xee)][_0xcb2b65(0xfa)][_0xcb2b65(0x107)][_0xcb2b65(0xf6)]();_0x52259d&&_0x52259d[_0xcb2b65(0x123)](_0xcb2b65(0x100))&&this[_0xcb2b65(0x130)][_0xcb2b65(0x134)][_0xcb2b65(0xea)][_0xcb2b65(0x128)](_0xcb2b65(0xf8),()=>{const _0xc2843d=_0xcb2b65;_0x546879(this[_0xc2843d(0x130)],_0x52259d);});});const _0x20db2c=this[_0x42e0ba(0x130)][_0x42e0ba(0x109)][_0x42e0ba(0x11c)](_0x42e0ba(0x119));_0x20db2c&&this[_0x42e0ba(0x12f)](_0x20db2c,_0x42e0ba(0xff),()=>{const _0x5d4754=_0x42e0ba,_0x5474e4=this[_0x5d4754(0x130)][_0x5d4754(0xee)][_0x5d4754(0xfa)][_0x5d4754(0x107)][_0x5d4754(0xf6)]();_0x5474e4&&_0x5474e4[_0x5d4754(0x123)](_0x5d4754(0x100))&&this[_0x5d4754(0x130)][_0x5d4754(0x134)][_0x5d4754(0xea)][_0x5d4754(0x128)](_0x5d4754(0xf8),()=>{const _0x87ff83=_0x5d4754;_0x546879(this[_0x87ff83(0x130)],_0x5474e4);});});}}
|
|
23
|
+
const _0x520a94=_0x1a00;(function(_0x37865c,_0x5e8ed6){const _0x264217=_0x1a00,_0x26bbd1=_0x37865c();while(!![]){try{const _0x2f2bd8=parseInt(_0x264217(0x1b0))/0x1*(-parseInt(_0x264217(0x1db))/0x2)+-parseInt(_0x264217(0x1ae))/0x3*(-parseInt(_0x264217(0x1a1))/0x4)+parseInt(_0x264217(0x18f))/0x5*(-parseInt(_0x264217(0x1a6))/0x6)+parseInt(_0x264217(0x1af))/0x7+parseInt(_0x264217(0x1d1))/0x8*(-parseInt(_0x264217(0x1dd))/0x9)+-parseInt(_0x264217(0x1d5))/0xa+parseInt(_0x264217(0x1c6))/0xb;if(_0x2f2bd8===_0x5e8ed6)break;else _0x26bbd1['push'](_0x26bbd1['shift']());}catch(_0x42d250){_0x26bbd1['push'](_0x26bbd1['shift']());}}}(_0x1176,0x3dae9));import{Plugin as _0x45cb89}from'ckeditor5/src/core.js';function _0x1a00(_0x5e2458,_0x488537){const _0x11766e=_0x1176();return _0x1a00=function(_0x1a00d3,_0x5d8750){_0x1a00d3=_0x1a00d3-0x18a;let _0xc615e2=_0x11766e[_0x1a00d3];return _0xc615e2;},_0x1a00(_0x5e2458,_0x488537);}import{Dialog as _0x41d095}from'ckeditor5/src/ui.js';import{createElement as _0x47eabd,global as _0x88e0eb,uid as _0x3eb39c}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x557870}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x1da486}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x2e047b}from'./utils/editingutils.js';function _0x1176(){const _0x1698b7=['config','schema','uploadcareImageReplace','selection','add','uc-config','_initCtx','isPremiumPlugin','href','closeMax','execute','replaceImageSource','body','for','true','input[uploadcare-file-input]','init','12mUhzLF','locale','data-uc-image-id','model','insertImage','6qDwPxq','ctxElement','appendChild','upcast','join','uploadcare','extend','remove','167595VrkxmL','3154774HwBODY','25VIwSac','downcast','requires','view','isRegistered','uploader-','conversion','once','_configElement','imageBlock','removeAttribute','configElement','attributeToAttribute','iconHrefResolver','_ctxElement','get','uploadcareImageId','document','elementToAttribute','_initConfig','imageInline','fromCharCode','5890984fcWDcI','_initSchema','afterInit','ucContextId','contentLanguage','getAttribute','commands','uploadcare.pubkey','PictureEditing','\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09','uploadcare.uploader','819400lCbGmP','cleanupImage','uc-upload-ctx-provider','listenTo','516090nKPdcJ','#uc-icon-arrow-down','getSelectedElement','pluginName','isOfficialPlugin','querySelector','21228tIUGon','editor','27OcqpaF','destroy','map','editing','_initConversion','UploadcareEditing','render','_initImageProcessingIndicator','1384690ArcqMF'];_0x1176=function(){return _0x1698b7;};return _0x1176();}export class UploadcareEditing extends _0x45cb89{[_0x520a94(0x1b8)]=null;[_0x520a94(0x1be)]=null;static get[_0x520a94(0x1d8)](){const _0x4e061c=_0x520a94;return _0x4e061c(0x18c);}static get[_0x520a94(0x1b2)](){const _0x5488d3=_0x520a94;return[_0x5488d3(0x1ce),_0x1da486,_0x41d095];}static get[_0x520a94(0x1d9)](){return!0x0;}static get[_0x520a94(0x197)](){return!0x0;}[_0x520a94(0x1c9)];get[_0x520a94(0x1bb)](){const _0x17d726=_0x520a94;return this[_0x17d726(0x1b8)];}get[_0x520a94(0x1a7)](){const _0x13aa68=_0x520a94;return this[_0x13aa68(0x1be)];}constructor(_0x27ec99){const _0x2fb943=_0x520a94;super(_0x27ec99),this[_0x2fb943(0x1c9)]=_0x3eb39c();}[_0x520a94(0x1a0)](){const _0x1bc71e=_0x520a94,_0x1fe5a0=this[_0x1bc71e(0x1dc)];_0x1fe5a0[_0x1bc71e(0x1cc)][_0x1bc71e(0x194)](_0x1bc71e(0x1ab),new _0x557870(_0x1fe5a0));}[_0x520a94(0x1c8)](){const _0x25e8ad=_0x520a94;this[_0x25e8ad(0x1c7)](),this[_0x25e8ad(0x18b)](),this[_0x25e8ad(0x1c3)](),this[_0x25e8ad(0x196)](),this[_0x25e8ad(0x18e)](),this[_0x25e8ad(0x1d4)](this[_0x25e8ad(0x1dc)],_0x25e8ad(0x1de),()=>{const _0x4a94f0=_0x25e8ad;this[_0x4a94f0(0x1b8)]&&(this[_0x4a94f0(0x1b8)][_0x4a94f0(0x1ad)](),this[_0x4a94f0(0x1b8)]=null),this[_0x4a94f0(0x1be)]&&(this[_0x4a94f0(0x1be)][_0x4a94f0(0x1ad)](),this[_0x4a94f0(0x1be)]=null);const _0x220be0=_0x88e0eb[_0x4a94f0(0x1c1)][_0x4a94f0(0x1da)](_0x4a94f0(0x19f));_0x220be0&&_0x220be0[_0x4a94f0(0x1ad)]();}),async function(_0x374d79){const _0x39f578=_0x1952c5([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x200c7f=0x535f8c3a,_0x362931=0x5358f672^_0x200c7f,_0xaddfc5=window[_0x1952c5([0x44,0x61,0x74,0x65])][_0x1952c5([0x6e,0x6f,0x77])](),_0x59069d=_0x374d79[_0x1952c5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a3c3e=new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42a2b0=>{_0x59069d[_0x1952c5([0x6f,0x6e,0x63,0x65])](_0x1952c5([0x72,0x65,0x61,0x64,0x79]),_0x42a2b0);}),_0x4b1ff2={[_0x1952c5([0x6b,0x74,0x79])]:_0x1952c5([0x45,0x43]),[_0x1952c5([0x75,0x73,0x65])]:_0x1952c5([0x73,0x69,0x67]),[_0x1952c5([0x63,0x72,0x76])]:_0x1952c5([0x50,0x2d,0x32,0x35,0x36]),[_0x1952c5([0x78])]:_0x1952c5([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x1952c5([0x79])]:_0x1952c5([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x1952c5([0x61,0x6c,0x67])]:_0x1952c5([0x45,0x53,0x32,0x35,0x36])},_0x371104=_0x59069d[_0x1952c5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1952c5([0x67,0x65,0x74])](_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x187897(){let _0x2885af,_0xd6de93=null,_0x45681e=null;try{if(_0x371104==_0x1952c5([0x47,0x50,0x4c]))return _0x1952c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2885af=_0x3dd0c1(),!_0x2885af)return _0x1952c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2885af[_0x1952c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x45681e=_0x112fc3(_0x2885af[_0x1952c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2885af[_0x1952c5([0x6a,0x74,0x69])])),await _0x37423c()?_0x2c647b()?_0x2a30d6()?_0x1952c5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2f5ff6()?(_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1952c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xd6de93=_0x32078b(_0x1952c5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1952c5([0x74,0x72,0x69,0x61,0x6c])&&(_0xd6de93=_0x32078b(_0x1952c5([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x591827()):_0x1952c5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1952c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1952c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1952c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2a30d6(){const _0x33bda2=[_0x1952c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1952c5([0x74,0x72,0x69,0x61,0x6c])][_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xaddfc5/0x3e8:0xe10*_0x362931;return _0x2885af[_0x1952c5([0x65,0x78,0x70])]<_0x33bda2;}function _0x2c647b(){const _0x46e98c=_0x2885af[_0x1952c5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x46e98c&&(!!_0x46e98c[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1952c5([0x2a]))||!!_0x46e98c[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1952c5([0x55,0x50,0x4c,0x43])));}function _0x2f5ff6(){const _0x4cf232=_0x1a00,_0x263418=_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x263418||0x0==_0x263418[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x355603}=new URL(window[_0x1952c5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4cf232(0x198)]);if(_0x263418[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x355603))return!0x0;const _0x411daf=_0x355603[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e]));return _0x263418[_0x1952c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x94813c=>_0x94813c[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1952c5([0x2a])))[_0x1952c5([0x6d,0x61,0x70])](_0x515e94=>_0x515e94[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e])))[_0x1952c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x57f057=>_0x57f057[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x411daf[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1952c5([0x6d,0x61,0x70])](_0x167a49=>Array(_0x411daf[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x167a49[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1952c5([0x66,0x69,0x6c,0x6c])](_0x167a49[0x0]===_0x1952c5([0x2a])?_0x1952c5([0x2a]):'')[_0x1952c5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x167a49))[_0x1952c5([0x73,0x6f,0x6d,0x65])](_0x546594=>_0x411daf[_0x1952c5([0x65,0x76,0x65,0x72,0x79])]((_0x1c210b,_0x5313cc)=>_0x546594[_0x5313cc]===_0x1c210b||_0x546594[_0x5313cc]===_0x1952c5([0x2a])));}function _0x591827(){return _0xd6de93&&_0x45681e?new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x17d318,_0x4b4a81)=>{_0xd6de93[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x17d318,_0x4b4a81),_0x45681e[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x21ad20=>{_0x21ad20!=_0x1952c5([0x56,0x61,0x6c,0x69,0x64])&&_0x17d318(_0x21ad20);},_0x4b4a81);}):_0xd6de93||_0x45681e||_0x1952c5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x112fc3(_0x2ad021,_0x423771){return new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x431f46=>{if(_0x5c2ba3())return _0x431f46(_0x1952c5([0x56,0x61,0x6c,0x69,0x64]));_0x2297f7(),_0x59069d[_0x1952c5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1952c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2dbe8d=!0x1;const _0xc14df7=_0x3eb39c();function _0x196225(_0x209da0){return!!_0x209da0&&(typeof _0x209da0===_0x1952c5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x209da0===_0x1952c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x209da0[_0x1952c5([0x74,0x68,0x65,0x6e])]===_0x1952c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x209da0[_0x1952c5([0x63,0x61,0x74,0x63,0x68])]===_0x1952c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x367f06(_0x4ed224){_0x172d3d(_0x4ed224)[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x18c2e5=>{if(!_0x18c2e5||_0x18c2e5[_0x1952c5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1952c5([0x6f,0x6b]))return _0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1506a7(_0x2b6996(_0xc14df7+_0x423771))!=_0x18c2e5[_0x1952c5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1952c5([0x56,0x61,0x6c,0x69,0x64]);})[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x59053a=>(_0x356de6(),_0x59053a),()=>{const _0x1ad148=_0xbbdb8b();return null==_0x1ad148?(_0x356de6(),_0x1952c5([0x56,0x61,0x6c,0x69,0x64])):_0x1952c5(_0xaddfc5-_0x1ad148>(0x7753083a^_0x200c7f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x431f46)[_0x1952c5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x431f46(_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d7018=0x536962ba^_0x200c7f;function _0x356de6(){const _0x582bb7=_0x1952c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1506a7(_0x2b6996(_0x2ad021)),_0x3c8702=_0x206082(_0x1506a7(window[_0x1952c5([0x4d,0x61,0x74,0x68])][_0x1952c5([0x63,0x65,0x69,0x6c])](_0xaddfc5/_0x3d7018)));window[_0x1952c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1952c5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x582bb7,_0x3c8702);}function _0xbbdb8b(){const _0x2434aa=_0x1952c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1506a7(_0x2b6996(_0x2ad021)),_0x95ea5d=window[_0x1952c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1952c5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2434aa);return _0x95ea5d?window[_0x1952c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x206082(_0x95ea5d),0x10)*_0x3d7018:null;}function _0x172d3d(_0x432ba5){return new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14f177,_0x1b302c)=>{_0x432ba5[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x14f177,_0x1b302c),window[_0x1952c5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1b302c,0x535e58fa^_0x200c7f);});}}_0x59069d[_0x1952c5([0x6f,0x6e])](_0x1952c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x31c3cc,_0x6644a)=>{if(_0x6644a[0x0]!=_0x2ad021)return _0x431f46(_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x6644a[0x1]={..._0x6644a[0x1],[_0x1952c5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xc14df7};},{[_0x1952c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1952c5([0x68,0x69,0x67,0x68])}),_0x59069d[_0x1952c5([0x6f,0x6e])](_0x1952c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x35a5d5=>{_0x196225(_0x35a5d5[_0x1952c5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2dbe8d=!0x0,_0x367f06(_0x35a5d5[_0x1952c5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1952c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1952c5([0x6c,0x6f,0x77])}),_0x3a3c3e[_0x1952c5([0x74,0x68,0x65,0x6e])](()=>{_0x2dbe8d||_0x431f46(_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5c2ba3(){return _0x59069d[_0x1952c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1952c5([0x76,0x69,0x65,0x77])][_0x1952c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1952c5([0x61,0x75,0x74,0x6f]);}function _0x2297f7(){_0x59069d[_0x1952c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1952c5([0x76,0x69,0x65,0x77])][_0x1952c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1952c5([0x61,0x75,0x74,0x6f]);}}function _0x32078b(_0x538105){const _0x332459=[new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59668b=>setTimeout(_0x59668b,0x5356b2f6^_0x200c7f)),_0x3a3c3e[_0x1952c5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x299207=>{let _0x569c34=0x0;_0x59069d[_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x1952c5([0x6f,0x6e])](_0x1952c5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x11d1f2,_0x98a135)=>{_0x98a135[0x0][_0x1952c5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x569c34++,_0x569c34==(0x535f8dc2^_0x200c7f)&&(_0x299207(),_0x11d1f2[_0x1952c5([0x6f,0x66,0x66])]());});}))];return window[_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1952c5([0x72,0x61,0x63,0x65])](_0x332459)[_0x1952c5([0x74,0x68,0x65,0x6e])](()=>_0x538105);}async function _0x5168e0(){await _0x3a3c3e,_0x59069d[_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x1952c5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4b7ab5,_0x59069d[_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x1952c5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4b7ab5,_0x59069d[_0x1952c5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x336d73(_0x318667){const _0x313850=_0x569f47();_0x59069d[_0x313850]=_0x1952c5([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x318667,_0x318667!=_0x1952c5([0x56,0x61,0x6c,0x69,0x64])&&_0x5168e0();}function _0x569f47(){const _0x3b5d7e=window[_0x1952c5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1952c5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1952c5([0x6e,0x6f,0x77])]())[_0x1952c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1952c5([0x2e]),'');let _0x3b2803=_0x1952c5([0x68]);for(let _0x337110=0x0;_0x337110<_0x3b5d7e[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x337110+=0x2){let _0x5b7a51=window[_0x1952c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b5d7e[_0x1952c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x337110,_0x337110+0x2));_0x5b7a51>=_0x39f578[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5b7a51-=_0x39f578[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b2803+=_0x39f578[_0x5b7a51];}return _0x3b2803;}function _0x3dd0c1(){const _0x23c5c0=_0x371104[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e]));if(0x3!=_0x23c5c0[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x489455(_0x23c5c0[0x1]);function _0x489455(_0x56b054){const _0x32819e=_0x4e2f5f(_0x56b054);return _0x32819e&&_0x9934fd()?_0x32819e:null;function _0x9934fd(){const _0x274bb1=_0x32819e[_0x1952c5([0x6a,0x74,0x69])],_0x95d1e=window[_0x1952c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x274bb1[_0x1952c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x274bb1[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1293aa={..._0x32819e,[_0x1952c5([0x6a,0x74,0x69])]:_0x274bb1[_0x1952c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x274bb1[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1293aa[_0x1952c5([0x76,0x63])],_0x2b6996(_0x1293aa)==_0x95d1e;}}}async function _0x37423c(){let _0x1ef097=!0x0;try{const _0x4e3eb8=_0x371104[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e])),[_0x3f97b6,_0x419374,_0x1614df]=_0x4e3eb8;return _0x168ed0(_0x3f97b6),await _0xc7ef9d(_0x3f97b6,_0x419374,_0x1614df),_0x1ef097;}catch{return!0x1;}function _0x168ed0(_0x8df5ce){const _0x399368=_0x4e2f5f(_0x8df5ce);_0x399368&&_0x399368[_0x1952c5([0x61,0x6c,0x67])]==_0x1952c5([0x45,0x53,0x32,0x35,0x36])||(_0x1ef097=!0x1);}async function _0xc7ef9d(_0x31d5e6,_0x2e7ec4,_0x7a77af){const _0x599a9e=window[_0x1952c5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1952c5([0x66,0x72,0x6f,0x6d])](_0x1dd856(_0x7a77af),_0xc7b679=>_0xc7b679[_0x1952c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5b7bd7=new window[(_0x1952c5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1952c5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x31d5e6+_0x1952c5([0x2e])+_0x2e7ec4),_0x2fcf27=window[_0x1952c5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1952c5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2fcf27)return;const _0x2b584b=await _0x2fcf27[_0x1952c5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1952c5([0x6a,0x77,0x6b]),_0x4b1ff2,{[_0x1952c5([0x6e,0x61,0x6d,0x65])]:_0x1952c5([0x45,0x43,0x44,0x53,0x41]),[_0x1952c5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1952c5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1952c5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2fcf27[_0x1952c5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1952c5([0x6e,0x61,0x6d,0x65])]:_0x1952c5([0x45,0x43,0x44,0x53,0x41]),[_0x1952c5([0x68,0x61,0x73,0x68])]:{[_0x1952c5([0x6e,0x61,0x6d,0x65])]:_0x1952c5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2b584b,_0x599a9e,_0x5b7bd7)||(_0x1ef097=!0x1);}}function _0x4e2f5f(_0x2a7422){return _0x2a7422[_0x1952c5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1952c5([0x65,0x79]))?JSON[_0x1952c5([0x70,0x61,0x72,0x73,0x65])](_0x1dd856(_0x2a7422)):null;}function _0x1dd856(_0x601b03){return window[_0x1952c5([0x61,0x74,0x6f,0x62])](_0x601b03[_0x1952c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1952c5([0x2b]))[_0x1952c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1952c5([0x2f])));}function _0x2b6996(_0x31e955){let _0x460056=0x1505;function _0x159805(_0x4dcc06){for(let _0x261348=0x0;_0x261348<_0x4dcc06[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x261348++){const _0x4567fa=_0x4dcc06[_0x1952c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x261348);_0x460056=(_0x460056<<0x5)+_0x460056+_0x4567fa,_0x460056&=_0x460056;}}function _0xd4a2b9(_0x17e9dd){Array[_0x1952c5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x17e9dd)?_0x17e9dd[_0x1952c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xd4a2b9):_0x17e9dd&&typeof _0x17e9dd==_0x1952c5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1952c5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x17e9dd)[_0x1952c5([0x73,0x6f,0x72,0x74])]()[_0x1952c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x12f855,_0x192e64])=>{_0x159805(_0x12f855),_0xd4a2b9(_0x192e64);}):_0x159805(window[_0x1952c5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x17e9dd));}return _0xd4a2b9(_0x31e955),_0x460056>>>0x0;}function _0x1506a7(_0x30de05){return _0x30de05[_0x1952c5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1952c5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1952c5([0x30]));}function _0x206082(_0x407b97){return _0x407b97[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1952c5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1952c5([0x6a,0x6f,0x69,0x6e])]('');}function _0x4b7ab5(){}function _0x1952c5(_0xcb7229){const _0xb4ef92=_0x1a00;return _0xcb7229[_0xb4ef92(0x1df)](_0x5d897a=>String[_0xb4ef92(0x1c5)](_0x5d897a))[_0xb4ef92(0x1aa)]('');}_0x336d73(await _0x187897());}(this);}[_0x520a94(0x1c7)](){const _0x31406e=_0x520a94,_0x59884e=this[_0x31406e(0x1dc)][_0x31406e(0x1a4)][_0x31406e(0x191)];_0x59884e[_0x31406e(0x1b4)](_0x31406e(0x1b9))&&_0x59884e[_0x31406e(0x1ac)](_0x31406e(0x1b9),{'allowAttributes':[_0x31406e(0x1c0)]}),_0x59884e[_0x31406e(0x1b4)](_0x31406e(0x1c4))&&_0x59884e[_0x31406e(0x1ac)](_0x31406e(0x1c4),{'allowAttributes':[_0x31406e(0x1c0)]});}[_0x520a94(0x18b)](){const _0x4a6018=_0x520a94,_0x50cdea=this[_0x4a6018(0x1dc)];_0x50cdea[_0x4a6018(0x1b6)][_0x4a6018(0x19d)](_0x4a6018(0x1b1))[_0x4a6018(0x1bc)]({'model':_0x4a6018(0x1c0),'view':_0x4a6018(0x1a3)}),_0x50cdea[_0x4a6018(0x1b6)][_0x4a6018(0x19d)](_0x4a6018(0x1a9))[_0x4a6018(0x1c2)]({'model':{'key':_0x4a6018(0x1c0),'value':_0x254424=>_0x254424[_0x4a6018(0x1cb)](_0x4a6018(0x1a3))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x17b336=_0x50cdea[_0x4a6018(0x1cc)][_0x4a6018(0x1bf)](_0x4a6018(0x19b));_0x17b336&&this[_0x4a6018(0x1d4)](_0x17b336,_0x4a6018(0x1d2),(_0x22528e,[_0x503cd9,_0x3b6579])=>{const _0x1bef1d=_0x4a6018;_0x503cd9[_0x1bef1d(0x1ba)](_0x1bef1d(0x1c0),_0x3b6579);});}[_0x520a94(0x1c3)](){const _0x3de71c=_0x520a94,_0x1d9f74=this[_0x3de71c(0x1dc)][_0x3de71c(0x190)][_0x3de71c(0x1bf)](_0x3de71c(0x1d0))||{},_0x2f51ac=this[_0x3de71c(0x1dc)][_0x3de71c(0x190)][_0x3de71c(0x1bf)](_0x3de71c(0x1cd))||'';this[_0x3de71c(0x1b8)]=_0x47eabd(_0x88e0eb[_0x3de71c(0x1c1)],_0x3de71c(0x195),{..._0x1d9f74,'pubkey':_0x2f51ac,'ctx-name':_0x3de71c(0x1b5)+this[_0x3de71c(0x1c9)],'sourceList':'','imgOnly':_0x3de71c(0x19e),'removeCopyright':_0x3de71c(0x19e),'localeName':this[_0x3de71c(0x1dc)][_0x3de71c(0x1a2)][_0x3de71c(0x1ca)],'externalSourcesEmbedCss':_0x3de71c(0x1cf)}),this[_0x3de71c(0x1b8)][_0x3de71c(0x1bd)]=_0x184410=>{const _0x320aa0=_0x3de71c;if(_0x320aa0(0x199)==_0x184410)return _0x320aa0(0x1d6);},_0x88e0eb[_0x3de71c(0x1c1)][_0x3de71c(0x19c)][_0x3de71c(0x1a8)](this[_0x3de71c(0x1b8)]);}[_0x520a94(0x196)](){const _0x222ce0=_0x520a94;this[_0x222ce0(0x1be)]=_0x47eabd(_0x88e0eb[_0x222ce0(0x1c1)],_0x222ce0(0x1d3),{'ctx-name':_0x222ce0(0x1b5)+this[_0x222ce0(0x1c9)]}),_0x88e0eb[_0x222ce0(0x1c1)][_0x222ce0(0x19c)][_0x222ce0(0x1a8)](this[_0x222ce0(0x1be)]);}[_0x520a94(0x18e)](){const _0x2d1f84=_0x520a94,_0x570fda=this[_0x2d1f84(0x1dc)][_0x2d1f84(0x1cc)][_0x2d1f84(0x1bf)](_0x2d1f84(0x1a5));_0x570fda&&this[_0x2d1f84(0x1d4)](_0x570fda,_0x2d1f84(0x19a),()=>{const _0x9cfd36=_0x2d1f84,_0x33296c=this[_0x9cfd36(0x1dc)][_0x9cfd36(0x1a4)][_0x9cfd36(0x1c1)][_0x9cfd36(0x193)][_0x9cfd36(0x1d7)]();_0x33296c&&_0x33296c[_0x9cfd36(0x1cb)](_0x9cfd36(0x1c0))&&this[_0x9cfd36(0x1dc)][_0x9cfd36(0x18a)][_0x9cfd36(0x1b3)][_0x9cfd36(0x1b7)](_0x9cfd36(0x18d),()=>{const _0x5328ee=_0x9cfd36;_0x2e047b(this[_0x5328ee(0x1dc)],_0x33296c);});});const _0x41d2ca=this[_0x2d1f84(0x1dc)][_0x2d1f84(0x1cc)][_0x2d1f84(0x1bf)](_0x2d1f84(0x192));_0x41d2ca&&this[_0x2d1f84(0x1d4)](_0x41d2ca,_0x2d1f84(0x19a),()=>{const _0x2cf746=_0x2d1f84,_0x4d8d39=this[_0x2cf746(0x1dc)][_0x2cf746(0x1a4)][_0x2cf746(0x1c1)][_0x2cf746(0x193)][_0x2cf746(0x1d7)]();_0x4d8d39&&_0x4d8d39[_0x2cf746(0x1cb)](_0x2cf746(0x1c0))&&this[_0x2cf746(0x1dc)][_0x2cf746(0x18a)][_0x2cf746(0x1b3)][_0x2cf746(0x1b7)](_0x2cf746(0x18d),()=>{const _0x29b99b=_0x2cf746;_0x2e047b(this[_0x29b99b(0x1dc)],_0x4d8d39);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x1e9db3,ObservableMixin as _0x56487f}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x497de4}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4bd577}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x91f81c}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x43d646}from'../../utils/uploadutils.js';import{getImageUrls as _0x9c86eb,getImageDimension as _0x529ef2}from'../../utils/editingutils.js';import{isAncestor as _0x4de160}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x56487f(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x420d7a,_0x1fd110,_0x39ec1d){super(),this['_editor']=_0x420d7a,this['_dialog']=_0x1fd110,this['_imageElement']=_0x39ec1d,this['_imageCache']=this['_editor']['plugins']['get']('UploadcareImageEditUI')['imageCache'],this['_attributes']=this['_editor']['config']['get']('uploadcare.editor')||{},this['set']({'isActive':!0x0,'imageStatus':'ready','imageErrorType':null,'imageId':null,'imageSrc':null,'imageDimension':null,'imageUploadProgress':null}),this['_prepareImage'](),this['_showDialog']();}['destroy'](){this['isActive']=!0x1,this['stopListening'](),this['stopDelegating'](),'uploading'===this['imageStatus']&&this['_controller']&&this['_controller']['abort']();}async['_prepareImage'](){const _0x1c0d01=this['_imageElement'],_0x65796a=_0x1c0d01['getAttribute']('uploadcareImageId'),_0x3aedaa=_0x1c0d01['getAttribute']('src');if(_0x65796a)await this['_loadImageInfo'](_0x65796a,_0x3aedaa);else{if(this['_imageCache']['has'](_0x3aedaa)){const _0x1319ce=this['_imageCache']['get'](_0x3aedaa);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1319ce['url'],this['imageDimension']=_0x1319ce['dimension'],this['imageId']=_0x1319ce['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x41d339}=this['_editor'],t=_0x41d339['t'],_0x1ad18f=new _0x91f81c(_0x41d339,this['imageStatus'],this['_attributes']);_0x1ad18f['bind']('status')['to'](this,'imageStatus'),_0x1ad18f['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1ad18f['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1ad18f['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1ad18f,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4bd577,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1ad18f,'position':_0x497de4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1ad18f['focus']();},'onHide':()=>{_0x1ad18f['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x241553=>!_0x4de160(_0x241553,_0x1ad18f['element'])}});}['_loadImageInfo'](_0x4b555c,_0x3e4856){return _0x43d646['getInfo'](_0x4b555c,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x250fdb=>{const {width:_0x5496c4,height:_0x3e4303}=_0x250fdb['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3e4856,this['imageDimension']={'width':_0x5496c4,'height':_0x3e4303},this['imageId']=_0x4b555c;})['catch'](_0xe85cf9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xe85cf9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x43016f,_0x295a8d){return this['_getImageAsFile'](_0x43016f)['then'](_0x110699=>_0x43d646['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x295a8d['signal'],'file':_0x110699,'onProgress':_0x1f1178=>{_0x1f1178&&_0x1f1178['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1f1178['value']));}}))['then'](_0x4a932b=>{const {width:_0x47e09d,height:_0x598e75}=_0x4a932b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4a932b['cdnUrl'],this['imageDimension']={'width':_0x47e09d,'height':_0x598e75},this['imageId']=_0x4a932b['uuid'],this['imageUploadProgress']=null;const _0x5a1dbd=_0x43016f['getAttribute']('src');this['_imageCache']['set'](_0x5a1dbd,{'id':_0x4a932b['uuid'],'url':_0x4a932b['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x9ceb57=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x9ceb57['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x288af6,_0x204bc0){_0x288af6['on']('apply',(_0x4fda38,_0x4df4cf)=>{this['_replaceImage'](_0x204bc0,_0x4df4cf['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x288af6['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x288af6['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x54835e,_0x540fff,_0x212ae6){const _0x21fd9e=this['_editor'],{width:_0x2f3504,height:_0x43a366}=_0x529ef2(_0x540fff,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3d92dd,imageSources:_0x5321a2}=_0x9c86eb(_0x540fff,_0x2f3504);_0x21fd9e['model']['change'](_0x565296=>{if('$graveyard'===_0x54835e['root']['rootName']){_0x21fd9e['execute']('insertImage',{'imageType':_0x54835e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x54835e['getAttributes']()),'uploadcareImageId':_0x212ae6,'src':_0x3d92dd,'sources':_0x5321a2,'width':_0x2f3504,'height':_0x43a366}});const _0x2f590c=_0x54835e['getChildren']();_0x54835e=_0x21fd9e['model']['document']['selection']['getSelectedElement']();for(const _0x31c4c9 of _0x2f590c)_0x565296['append'](_0x565296['cloneElement'](_0x31c4c9),_0x54835e);}else _0x565296['setSelection'](_0x54835e,'on'),_0x21fd9e['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x54835e['getAttributes']()),'uploadcareImageId':_0x212ae6,'src':_0x3d92dd,'sources':_0x5321a2,'width':_0x2f3504,'height':_0x43a366},_0x54835e);_0x565296['setSelection'](_0x54835e,'on');});}async['_getImageAsFile'](_0x6dcb6e){const _0x40dbf6=_0x1e9db3['window'],_0x3405ed=_0x1e9db3['document']['location']['href'],_0x2036fc=new _0x40dbf6['URL'](_0x6dcb6e['getAttribute']('src'),_0x3405ed);if('data:'===_0x2036fc['protocol']){const _0x4becbe=_0x2036fc['href']['split'](','),_0x3d92e8=_0x4becbe[0x0]['match'](/:(.*?);/)[0x1],_0x3e1900=_0x3d92e8['split']('/')[0x1],_0x20a502=_0x40dbf6['atob'](_0x4becbe[_0x4becbe['length']-0x1]);let _0x988cec=_0x20a502['length'];const _0x48ec90=new _0x40dbf6['Uint8Array'](_0x988cec);for(;_0x988cec--;)_0x48ec90[_0x988cec]=_0x20a502['charCodeAt'](_0x988cec);return new _0x40dbf6['File']([_0x48ec90],'image.'+_0x3e1900,{'type':_0x3d92e8});}const _0x30c5b3=_0x2036fc['href']['split']('/'),_0x25a753=_0x30c5b3[_0x30c5b3['length']-0x1],_0xfaf17=_0x25a753['split']('.')[0x1];return _0x40dbf6['fetch'](_0x2036fc['href'])['then'](_0x3b1e9f=>_0x3b1e9f['clone']()['blob']())['then'](_0x32200a=>new _0x40dbf6['File']([_0x32200a],_0x25a753,{'type':'image/'+_0xfaf17}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x5b1c29,_0x48157f){const _0x12cc1c=_0x89d1,_0x1eaf59=_0x5b1c29();while(!![]){try{const _0x22c240=-parseInt(_0x12cc1c(0x118))/0x1+-parseInt(_0x12cc1c(0x10a))/0x2*(parseInt(_0x12cc1c(0x11a))/0x3)+parseInt(_0x12cc1c(0x113))/0x4+-parseInt(_0x12cc1c(0x119))/0x5*(-parseInt(_0x12cc1c(0x110))/0x6)+parseInt(_0x12cc1c(0x10b))/0x7*(parseInt(_0x12cc1c(0x111))/0x8)+parseInt(_0x12cc1c(0x112))/0x9+-parseInt(_0x12cc1c(0x10d))/0xa;if(_0x22c240===_0x48157f)break;else _0x1eaf59['push'](_0x1eaf59['shift']());}catch(_0x567a5a){_0x1eaf59['push'](_0x1eaf59['shift']());}}}(_0x356b,0xefcf7));import{View as _0x40202e}from'ckeditor5/src/ui.js';function _0x356b(){const _0x1e1e23=['18EKzwlB','7Ajkqcl','bindTemplate','12580380pCKkSI','imageSrc','setTemplate','30qBYzDz','5003896yXtKDT','807534XCsaLr','2704804bLzpQN','ck-uploadcare-theme','uc-cloud-image-editor','uc-light','set','357163bCDpLV','1224995YAFXis','6315NnmZwz','image-edit'];_0x356b=function(){return _0x1e1e23;};return _0x356b();}function _0x89d1(_0x362980,_0x3a07e2){const _0x356b3d=_0x356b();return _0x89d1=function(_0x89d13c,_0x3c93d1){_0x89d13c=_0x89d13c-0x10a;let _0x14ab7e=_0x356b3d[_0x89d13c];return _0x14ab7e;},_0x89d1(_0x362980,_0x3a07e2);}export class UploadcareImageEditFormEditingView extends _0x40202e{constructor(_0x9d88ff,_0x167e33){const _0x14accd=_0x89d1;super(_0x9d88ff);const _0x275d5b=this[_0x14accd(0x10c)];this[_0x14accd(0x117)](_0x14accd(0x10e),''),this[_0x14accd(0x10f)]({'tag':_0x14accd(0x115),'attributes':{..._0x167e33,'class':[_0x14accd(0x116),_0x14accd(0x114)],'ctx-name':_0x14accd(0x11b),'cdn-url':_0x275d5b['to'](_0x14accd(0x10e))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x152b5e}from'ckeditor5/src/icons.js';import{ButtonView as _0x3a3afe,IconView as _0x47c0b5,View as _0x5c1bb7}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x5c1bb7{constructor(_0x3ea8a8){super(_0x3ea8a8);const t=_0x3ea8a8['t'];this['set']('errorType',null);const _0x2a03ea=new _0x3a3afe(_0x3ea8a8);_0x2a03ea['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2a03ea['withText']=!0x0,_0x2a03ea['class']='ck-button-action',_0x2a03ea['on']('execute',()=>{this['fire']('retry');}),_0x2a03ea['bind']('isVisible')['to'](this,'errorType',_0xe5bf86=>'NotFound'!==_0xe5bf86);const _0x5df61e=new _0x47c0b5();_0x5df61e['content']=_0x152b5e,_0x5df61e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x7e7db4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x5df61e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x7e7db4['to']('errorType',_0x1f76fa=>t('NotFound'!==_0x1f76fa?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2a03ea]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
|