@ckeditor/ckeditor5-uploadcare 47.0.0-alpha.9 → 47.0.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/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 _0x212eed,Command as _0x14d6c3}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x62ee11,IconGooglePhotos as _0x449d2f,IconGoogleDrive as _0x507ce8,IconFacebook as _0x1a7152,IconDropbox as _0x55d6b9,IconUploadcareLink as _0xcfe089,IconUploadcareImageUpload as _0x2b5b10,IconError as _0x1b1e66,IconUploadcareImageEdit as _0x2b2c62}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xf752b,MenuBarMenuListItemButtonView as _0x278d25,View as _0x1d3ac5,FocusCycler as _0x481d50,Dialog as _0xe84605,DialogViewPosition as _0x138b5a,SpinnerView as _0x5cb9fc,IconView as _0x3f5515,Notification as _0x16830c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x131869,DomEmitterMixin as _0x2b50e7,global as _0x147924,getAncestors as _0x4e8a22,ObservableMixin as _0x478f17,uid as _0x222cea,createElement as _0x3b9c8c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x5412bf}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x25b681,info as _0x58f2ce}from'@uploadcare/upload-client';import*as _0x444962 from'@uploadcare/file-uploader';var i=function(_0xf9cd0e){return _0xf9cd0e['Local']='local',_0xf9cd0e['URL']='url',_0xf9cd0e['Dropbox']='dropbox',_0xf9cd0e['GDrive']='gdrive',_0xf9cd0e['Facebook']='facebook',_0xf9cd0e['GPhotos']='gphotos',_0xf9cd0e['OneDrive']='onedrive',_0xf9cd0e;}({});function _(_0x248bbc,_0x158787,_0x20304f){const t=_0x248bbc['t'],_0x4f9f4b=_0x248bbc['t'];switch(_0x158787){case i['Local']:return{'text':_0x4f9f4b('Insert'===_0x20304f?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4f9f4b('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x20304f?_0x4f9f4b('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4f9f4b('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x20304f?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x20304f?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x20304f?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x20304f?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x20304f?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x158787;}}class e extends _0x212eed{['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 _0x56d8c2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x11bff7;for(const _0x18c412 in _0x56d8c2){const _0x11ffd0=_0x18c412,_0x57bbd6=_0x56d8c2[_0x11ffd0];if('uploadcareLicenseKeyValid'==_0x57bbd6||'uploadcareLicenseKeyInvalid'==_0x57bbd6||'uploadcareLicenseKeyExpired'==_0x57bbd6||'uploadcareLicenseKeyDomainLimit'==_0x57bbd6||'uploadcareLicenseKeyNotAllowed'==_0x57bbd6||'uploadcareLicenseKeyEvaluationLimit'==_0x57bbd6||'uploadcareLicenseKeyTrialLimit'==_0x57bbd6||'uploadcareLicenseKeyUsageLimit'==_0x57bbd6){delete _0x56d8c2[_0x11ffd0],_0x11bff7=_0x57bbd6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x11bff7&&_0x56d8c2['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x11bff7&&_0x56d8c2['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x11bff7&&_0x56d8c2['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x11bff7&&_0x56d8c2['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x11bff7&&_0x56d8c2['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x11bff7&&_0x56d8c2['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x11bff7&&_0x56d8c2['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x1b1411}=this,_0x199452=_0x1b1411['commands']['get']('uploadcare');if(!_0x199452)return;const _0x46e8a3=this['_normalizeConfigSourceList'](_0x1b1411['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x36fcf7,_0x4d416d)=>{const _0x30b3fd=this['_getIntegrationKey'](_0x4d416d['type']);return _0x36fcf7[_0x30b3fd]||(_0x36fcf7[_0x30b3fd]=[]),_0x36fcf7[_0x30b3fd]['push'](_0x4d416d),_0x36fcf7;},{});_0x1b1411['plugins']['has']('ImageInsertUI')&&_0x1b1411['commands']['get']('uploadcare')&&Object['entries'](_0x46e8a3)['forEach'](([_0x29c6b7,_0x47f0a7])=>{_0x1b1411['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x29c6b7,'observable':()=>_0x199452,'buttonViewCreator':()=>this['_createToolbarButton'](_0x47f0a7),'formViewCreator':()=>this['_createDropdownButtons'](_0x47f0a7),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x47f0a7),'override':'assetManager'!==_0x29c6b7});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x19f0ea){const {locale:_0x48f210}=this['editor'];return _0x19f0ea['map'](_0x4ebdf5=>{const _0x444182=_(_0x48f210,_0x4ebdf5,'Insert');switch(_0x4ebdf5){case i['Local']:return{'icon':_0x2b5b10,'type':i['Local'],..._0x444182};case i['URL']:return{'icon':_0xcfe089,'type':i['URL'],..._0x444182};case i['Dropbox']:return{'icon':_0x55d6b9,'type':i['Dropbox'],..._0x444182};case i['Facebook']:return{'icon':_0x1a7152,'type':i['Facebook'],..._0x444182};case i['GDrive']:return{'icon':_0x507ce8,'type':i['GDrive'],..._0x444182};case i['GPhotos']:return{'icon':_0x449d2f,'type':i['GPhotos'],..._0x444182};case i['OneDrive']:return{'icon':_0x62ee11,'type':i['OneDrive'],..._0x444182};}});}['_getIntegrationKey'](_0x411bbe){switch(_0x411bbe){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3280b1,_0x12380d){const _0x355ab2=this['editor'],_0x18cedd=new _0x3280b1(_0x355ab2['locale']),_0x41565e=_0x355ab2['commands']['get']('uploadcare');return _0x18cedd['bind']('isEnabled')['to'](_0x41565e),_0x18cedd['on']('execute',()=>{_0x41565e['execute'](_0x12380d);}),_0x18cedd;}['_createToolbarButton'](_0x457888){const {locale:_0x2a94b1}=this['editor'],_0x48ed2e=this['editor']['plugins']['get']('ImageInsertUI'),_0x583333=_0x457888[0x0],_0xffe683=this['_createButton'](_0xf752b,_0x583333['type']);return _0xffe683['icon']=_0x583333['icon'],_0xffe683['bind']('label')['to'](_0x48ed2e,'isImageSelected',_0x38a831=>_(_0x2a94b1,_0x583333['type'],_0x38a831?'Replace':'Insert')['text']),_0xffe683['tooltip']=!0x0,_0xffe683;}['_createDropdownButtons'](_0x59f751){const {locale:_0x187e1a}=this['editor'],_0x4b9290=this['editor']['plugins']['get']('ImageInsertUI');return _0x59f751['map'](_0x5a5f98=>{const _0x432426=this['_createButton'](_0xf752b,_0x5a5f98['type']);return _0x432426['withText']=!0x0,_0x432426['icon']=_0x5a5f98['icon'],_0x432426['bind']('label')['to'](_0x4b9290,'isImageSelected',_0x56742d=>_(_0x187e1a,_0x5a5f98['type'],_0x56742d?'Replace':'Insert')['text']),_0x432426;});}['_createMenuBarButtons'](_0x2cabc8){return _0x2cabc8['map'](_0x35d4d1=>{const _0x13bab4=this['_createButton'](_0x278d25,_0x35d4d1['type']);return _0x13bab4['icon']=_0x35d4d1['icon'],_0x13bab4['label']=_0x35d4d1['shortText'],_0x13bab4;});}}class F extends _0x1d3ac5{['focusTracker'];['focusCycler'];constructor(_0x22d744){super(_0x22d744),this['focusTracker']=new _0x131869(),this['focusCycler']=new _0x481d50({'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(_0x3a220f,_0x35f440){super(_0x3a220f),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-'+_0x35f440}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x161e2e,_0x338998){const _0x32d32b=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x1b34e1=>_0x1b34e1<=_0x338998)['map'](_0xfb532f=>_0x161e2e['replace'](/\/$/,'')+'/-/resize/'+_0xfb532f+'x/\x20'+_0xfb532f+'w');return{'imageFallbackUrl':_0x161e2e,'imageSources':[{'srcset':_0x32d32b['join'](',\x20'),'sizes':'(max-width:\x20'+_0x338998+'px)\x20100vw,\x20'+_0x338998+'px','type':'image/webp'}]};}function S(_0x11fc51,_0x286506,_0x2a0a3e){const _0x507e97=_0x11fc51['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x507e97?parseInt(_0x507e97[0x1],0xa):_0x286506,'height':_0x507e97?parseInt(_0x507e97[0x2],0xa):_0x2a0a3e};}function p(_0x4a8856,_0x5dc04e){const _0x6c8eb1=new(_0x2b50e7())(),_0x2ac17c=_0x4a8856['plugins']['get']('ImageUtils'),_0x1aa18a=_0x4a8856['editing']['mapper']['toViewElement'](_0x5dc04e),_0x4cbe44=_0x2ac17c['findViewImgElement'](_0x1aa18a),_0x4058b4=_0x4a8856['editing']['view']['domConverter']['viewToDom'](_0x4cbe44),_0x54bd82=_0x5dc04e['getAttribute']('width'),_0x1ddb5b=_0x5dc04e['getAttribute']('height'),_0x36fa7b='image-processing';_0x4a8856['editing']['view']['change'](_0x2ef9d4=>{_0x2ef9d4['addClass'](_0x36fa7b,_0x1aa18a),_0x2ef9d4['setStyle']('aspect-ratio',_0x54bd82+'/'+_0x1ddb5b,_0x4cbe44);}),_0x6c8eb1['listenTo'](_0x4058b4,'load',()=>{_0x6c8eb1['stopListening'](_0x4058b4,'load'),_0x4a8856['editing']['view']['change'](_0x12867a=>{_0x12867a['removeClass'](_0x36fa7b,_0x1aa18a),_0x12867a['removeStyle']('aspect-ratio',_0x4cbe44);});});}function z(_0x52f79a){if(Array['isArray'](_0x52f79a)){const _0xf5653c=_0x52f79a['map'](z);return _0x513270=>_0xf5653c['some'](_0x1522f6=>_0x1522f6(_0x513270));}if('origin'==_0x52f79a){const _0x37cffb=_0x147924['window']['location']['origin'];return _0x5a40c9=>new URL(_0x5a40c9,_0x147924['document']['baseURI'])['origin']==_0x37cffb;}return'function'==typeof _0x52f79a?_0x52f79a:_0x52f79a instanceof RegExp?_0x3dffc8=>!(!_0x3dffc8['match'](_0x52f79a)&&!_0x3dffc8['replace'](/^https?:\/\//,'')['match'](_0x52f79a)):()=>!0x1;}function A(_0x2eca6b,_0x50af07){return _0x4e8a22(_0x2eca6b['target'])['includes'](_0x50af07);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x478f17(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x363c5f,_0x3fc849,_0x50ecfd){super(),this['_editor']=_0x363c5f,this['_editing']=_0x3fc849,this['_dialog']=_0x363c5f['plugins']['get'](_0xe84605),this['_api']=_0x3fc849['ctxElement']['getAPI'](),this['_type']=_0x50ecfd,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:_0x17491b,model:_0x5412ba}=this['_editor'],_0x390531=_0x5412ba['document']['selection']['getSelectedElement'](),_0x1f7e0b=_0x390531&&(_0x390531['is']('element','imageBlock')||_0x390531['is']('element','imageInline'));this['_formView']=new x(_0x17491b,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x2b5b10,'title':_(_0x17491b,this['_type'],_0x1f7e0b?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x138b5a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5046c6=>!A(_0x5046c6,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x198570}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x15da35=>{const _0x32748b=_0x198570['length'];for(const _0x4657f3 of _0x198570){const _0x3e5ac8=_0x4657f3===_0x198570[_0x32748b-0x1],{cdnUrl:_0x48c2e5,fileInfo:_0x53663f}=_0x4657f3;if(!_0x48c2e5||!_0x53663f)continue;const {width:_0x187c6f,height:_0x16903b}=_0x53663f['imageInfo'],_0x44a003=S(_0x48c2e5,_0x187c6f,_0x16903b),_0x334797=C(_0x48c2e5,_0x44a003['width']),_0x345300={'id':_0x53663f['uuid'],'type':'image','attributes':{'imageDimension':_0x44a003,..._0x334797}};this['_insertAsset'](_0x345300,_0x3e5ac8,_0x15da35);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x20ace6=>{'idle'===_0x20ace6['detail']['status']&&!_0x20ace6['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x152f68,_0x5c5a3f,_0x141a7a){const _0x16d9e6=this['_editor']['model']['document']['selection'],_0x3fe2d8=_0x16d9e6['getSelectedElement'](),_0x4d52b2=!(!_0x3fe2d8||!_0x3fe2d8['is']('element','imageInline'));_0x141a7a['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x152f68,_0x4d52b2),_0x5c5a3f||_0x141a7a['setSelection'](_0x16d9e6['getLastPosition']());}['_insertImage'](_0x4acbb0,_0x3e9e7f){const _0x201823=this['_editor'],{imageDimension:_0xe64a0a,imageFallbackUrl:_0x4db4e5,imageSources:_0x5ab45a}=_0x4acbb0['attributes'];_0x201823['execute']('insertImage',{'imageType':_0x3e9e7f?'imageInline':null,'source':{'uploadcareImageId':_0x4acbb0['id'],'src':_0x4db4e5,'sources':_0x5ab45a,..._0xe64a0a}});}}class w extends _0x14d6c3{['_editing'];['_controller']=null;static get['requires'](){return[_0xe84605,o];}constructor(_0x144bef){super(_0x144bef),this['_editing']=_0x144bef['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x1090ee){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x1090ee);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x4d5ee8,..._0x4e56fc}){return _0x25b681(_0x4d5ee8,_0x4e56fc);}static['getInfo'](_0x142407,_0x584e88){return _0x58f2ce(_0x142407,_0x584e88);}}class f extends _0x212eed{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x5412bf,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x5c8bf6=this['editor'];if(!!!_0x5c8bf6['config']['get']('uploadcare'))return;_0x5c8bf6['plugins']['get'](_0x5412bf)['createUploadAdapter']=_0x39389a=>new k(_0x39389a,_0x5c8bf6),_0x5c8bf6['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x162a41,{imageElement:_0xf3daf2,data:_0x34716b})=>{_0x5c8bf6['model']['change'](_0x130280=>{_0x130280['setAttribute']('uploadcareImageId',_0x34716b['uploadcareImageId'],_0xf3daf2);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x11288d,_0x385ac2){this['loader']=_0x11288d,this['editor']=_0x385ac2,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x3ec77e=await this['loader']['file'];return j['upload']({'file':_0x3ec77e,'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':_0x2e89de=>{_0x2e89de&&_0x2e89de['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x2e89de['value']);}})['then'](async _0x48e8db=>{const {imageFallbackUrl:_0x529a23,imageSources:_0x2c4102}=C(_0x48e8db['cdnUrl'],_0x48e8db['imageInfo']['width']);return{'uploadcareImageId':_0x48e8db['uuid'],'default':_0x529a23,'sources':_0x2c4102};})['catch'](()=>{const _0x5bec29=t('Cannot\x20upload\x20file:')+('\x20'+_0x3ec77e['name']+'.');return Promise['reject'](_0x5bec29);});}['abort'](){this['controller']['abort']();}}class o extends _0x212eed{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0xe84605];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x106e6e){super(_0x106e6e),this['ucContextId']=_0x222cea();}['init'](){const _0x19f5b=this['editor'];_0x19f5b['commands']['add']('uploadcare',new w(_0x19f5b));}['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 _0x1abc88=_0x147924['document']['querySelector']('input[uploadcare-file-input]');_0x1abc88&&_0x1abc88['remove']();}),async function(_0x3ae484){const _0x5b823b=_0x1585e7([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x4ae7b2=0x3d8d0df,_0x597c62=0x3dfa42f^_0x4ae7b2,_0x460058=window[_0x1585e7([0x44,0x61,0x74,0x65])][_0x1585e7([0x6e,0x6f,0x77])](),_0x2cbf1d=_0x3ae484[_0x1585e7([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x17f7c1=new window[(_0x1585e7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45409c=>{_0x2cbf1d[_0x1585e7([0x6f,0x6e,0x63,0x65])](_0x1585e7([0x72,0x65,0x61,0x64,0x79]),_0x45409c);}),_0x79a2fc={[_0x1585e7([0x6b,0x74,0x79])]:_0x1585e7([0x45,0x43]),[_0x1585e7([0x75,0x73,0x65])]:_0x1585e7([0x73,0x69,0x67]),[_0x1585e7([0x63,0x72,0x76])]:_0x1585e7([0x50,0x2d,0x32,0x35,0x36]),[_0x1585e7([0x78])]:_0x1585e7([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]),[_0x1585e7([0x79])]:_0x1585e7([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]),[_0x1585e7([0x61,0x6c,0x67])]:_0x1585e7([0x45,0x53,0x32,0x35,0x36])},_0x413fc6=_0x2cbf1d[_0x1585e7([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1585e7([0x67,0x65,0x74])](_0x1585e7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x30c3ed(){let _0x326823,_0x1560af=null,_0x1147f3=null;try{if(_0x413fc6==_0x1585e7([0x47,0x50,0x4c]))return _0x1585e7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x326823=_0x4da96c(),!_0x326823)return _0x1585e7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x326823[_0x1585e7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1147f3=_0x3163d2(_0x326823[_0x1585e7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x326823[_0x1585e7([0x6a,0x74,0x69])])),await _0x55c9fd()?_0x11277c()?_0xc5d2eb()?_0x1585e7([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x74b5e()?(_0x326823[_0x1585e7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1585e7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1560af=_0x3522e4(_0x1585e7([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x326823[_0x1585e7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1585e7([0x74,0x72,0x69,0x61,0x6c])&&(_0x1560af=_0x3522e4(_0x1585e7([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2e294f()):_0x1585e7([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1585e7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1585e7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1585e7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xc5d2eb(){const _0x1810cb=[_0x1585e7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1585e7([0x74,0x72,0x69,0x61,0x6c])][_0x1585e7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x326823[_0x1585e7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x460058/0x3e8:0xe10*_0x597c62;return _0x326823[_0x1585e7([0x65,0x78,0x70])]<_0x1810cb;}function _0x11277c(){const _0x3be59d=_0x326823[_0x1585e7([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3be59d&&(!!_0x3be59d[_0x1585e7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1585e7([0x2a]))||!!_0x3be59d[_0x1585e7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1585e7([0x55,0x50,0x4c,0x43])));}function _0x74b5e(){const _0x2f5e35=_0x326823[_0x1585e7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2f5e35||0x0==_0x2f5e35[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x157611}=new URL(window[_0x1585e7([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2f5e35[_0x1585e7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x157611))return!0x0;const _0x1cb4b6=_0x157611[_0x1585e7([0x73,0x70,0x6c,0x69,0x74])](_0x1585e7([0x2e]));return _0x2f5e35[_0x1585e7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x169dda=>_0x169dda[_0x1585e7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1585e7([0x2a])))[_0x1585e7([0x6d,0x61,0x70])](_0x5b37ce=>_0x5b37ce[_0x1585e7([0x73,0x70,0x6c,0x69,0x74])](_0x1585e7([0x2e])))[_0x1585e7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xbfaa17=>_0xbfaa17[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1cb4b6[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1585e7([0x6d,0x61,0x70])](_0x80c0ed=>Array(_0x1cb4b6[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x80c0ed[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1585e7([0x66,0x69,0x6c,0x6c])](_0x80c0ed[0x0]===_0x1585e7([0x2a])?_0x1585e7([0x2a]):'')[_0x1585e7([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x80c0ed))[_0x1585e7([0x73,0x6f,0x6d,0x65])](_0x3c8673=>_0x1cb4b6[_0x1585e7([0x65,0x76,0x65,0x72,0x79])]((_0x37fd85,_0xfcbca)=>_0x3c8673[_0xfcbca]===_0x37fd85||_0x3c8673[_0xfcbca]===_0x1585e7([0x2a])));}function _0x2e294f(){return _0x1560af&&_0x1147f3?new window[(_0x1585e7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x47a1f8,_0x5da54c)=>{_0x1560af[_0x1585e7([0x74,0x68,0x65,0x6e])](_0x47a1f8,_0x5da54c),_0x1147f3[_0x1585e7([0x74,0x68,0x65,0x6e])](_0x1177fb=>{_0x1177fb!=_0x1585e7([0x56,0x61,0x6c,0x69,0x64])&&_0x47a1f8(_0x1177fb);},_0x5da54c);}):_0x1560af||_0x1147f3||_0x1585e7([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3163d2(_0x350fd7,_0x578a6d){return new window[(_0x1585e7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e05f9=>{if(_0x209d00())return _0x3e05f9(_0x1585e7([0x56,0x61,0x6c,0x69,0x64]));_0x220a03(),_0x2cbf1d[_0x1585e7([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1585e7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4b6976=!0x1;const _0x4dae09=_0x222cea();function _0xe4bda0(_0x111e9b){return!!_0x111e9b&&(typeof _0x111e9b===_0x1585e7([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x111e9b===_0x1585e7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x111e9b[_0x1585e7([0x74,0x68,0x65,0x6e])]===_0x1585e7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x111e9b[_0x1585e7([0x63,0x61,0x74,0x63,0x68])]===_0x1585e7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xba0446(_0x4c209a){_0x1ebdb4(_0x4c209a)[_0x1585e7([0x74,0x68,0x65,0x6e])](_0x546251=>{if(!_0x546251||_0x546251[_0x1585e7([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1585e7([0x6f,0x6b]))return _0x1585e7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x45dc35(_0x4847fc(_0x4dae09+_0x578a6d))!=_0x546251[_0x1585e7([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1585e7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1585e7([0x56,0x61,0x6c,0x69,0x64]);})[_0x1585e7([0x74,0x68,0x65,0x6e])](_0x44c7fb=>(_0x291435(),_0x44c7fb),()=>{const _0x94761c=_0x550c26();return null==_0x94761c?(_0x291435(),_0x1585e7([0x56,0x61,0x6c,0x69,0x64])):_0x1585e7(_0x460058-_0x94761c>(0x27d454df^_0x4ae7b2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1585e7([0x74,0x68,0x65,0x6e])](_0x3e05f9)[_0x1585e7([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3e05f9(_0x1585e7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x45c4cd=0x3ee3e5f^_0x4ae7b2;function _0x291435(){const _0x28f678=_0x1585e7([0x6c,0x6c,0x63,0x74,0x2d])+_0x45dc35(_0x4847fc(_0x350fd7)),_0x2b99cc=_0xb719fa(_0x45dc35(window[_0x1585e7([0x4d,0x61,0x74,0x68])][_0x1585e7([0x63,0x65,0x69,0x6c])](_0x460058/_0x45c4cd)));window[_0x1585e7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1585e7([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x28f678,_0x2b99cc);}function _0x550c26(){const _0x3eb5e6=_0x1585e7([0x6c,0x6c,0x63,0x74,0x2d])+_0x45dc35(_0x4847fc(_0x350fd7)),_0x3a30f2=window[_0x1585e7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1585e7([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3eb5e6);return _0x3a30f2?window[_0x1585e7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb719fa(_0x3a30f2),0x10)*_0x45c4cd:null;}function _0x1ebdb4(_0x11c3bd){return new window[(_0x1585e7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5e329f,_0x4bcbfa)=>{_0x11c3bd[_0x1585e7([0x74,0x68,0x65,0x6e])](_0x5e329f,_0x4bcbfa),window[_0x1585e7([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4bcbfa,0x3d9041f^_0x4ae7b2);});}}_0x2cbf1d[_0x1585e7([0x6f,0x6e])](_0x1585e7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x125538,_0x4922be)=>{if(_0x4922be[0x0]!=_0x350fd7)return _0x3e05f9(_0x1585e7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4922be[0x1]={..._0x4922be[0x1],[_0x1585e7([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4dae09};},{[_0x1585e7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1585e7([0x68,0x69,0x67,0x68])}),_0x2cbf1d[_0x1585e7([0x6f,0x6e])](_0x1585e7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4782b2=>{_0xe4bda0(_0x4782b2[_0x1585e7([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4b6976=!0x0,_0xba0446(_0x4782b2[_0x1585e7([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1585e7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1585e7([0x6c,0x6f,0x77])}),_0x17f7c1[_0x1585e7([0x74,0x68,0x65,0x6e])](()=>{_0x4b6976||_0x3e05f9(_0x1585e7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x209d00(){return _0x2cbf1d[_0x1585e7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1585e7([0x76,0x69,0x65,0x77])][_0x1585e7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1585e7([0x61,0x75,0x74,0x6f]);}function _0x220a03(){_0x2cbf1d[_0x1585e7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1585e7([0x76,0x69,0x65,0x77])][_0x1585e7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1585e7([0x61,0x75,0x74,0x6f]);}}function _0x3522e4(_0x22466b){const _0x37841c=[new window[(_0x1585e7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x8fd7a1=>setTimeout(_0x8fd7a1,0x3d1ee13^_0x4ae7b2)),_0x17f7c1[_0x1585e7([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1585e7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x469936=>{let _0x551463=0x0;_0x2cbf1d[_0x1585e7([0x6d,0x6f,0x64,0x65,0x6c])][_0x1585e7([0x6f,0x6e])](_0x1585e7([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x390fc3,_0x32312d)=>{_0x32312d[0x0][_0x1585e7([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x551463++,_0x551463==(0x3d8d127^_0x4ae7b2)&&(_0x469936(),_0x390fc3[_0x1585e7([0x6f,0x66,0x66])]());});}))];return window[_0x1585e7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1585e7([0x72,0x61,0x63,0x65])](_0x37841c)[_0x1585e7([0x74,0x68,0x65,0x6e])](()=>_0x22466b);}async function _0x58bc86(){await _0x17f7c1,_0x2cbf1d[_0x1585e7([0x6d,0x6f,0x64,0x65,0x6c])][_0x1585e7([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x43c65b,_0x2cbf1d[_0x1585e7([0x6d,0x6f,0x64,0x65,0x6c])][_0x1585e7([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x43c65b,_0x2cbf1d[_0x1585e7([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1585e7([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x354504(_0x4067f4){const _0x31463b=_0x12da7a();_0x2cbf1d[_0x31463b]=_0x1585e7([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4067f4,_0x4067f4!=_0x1585e7([0x56,0x61,0x6c,0x69,0x64])&&_0x58bc86();}function _0x12da7a(){const _0x231aa9=window[_0x1585e7([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1585e7([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1585e7([0x6e,0x6f,0x77])]())[_0x1585e7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1585e7([0x2e]),'');let _0x18b0f5=_0x1585e7([0x52]);for(let _0x3b0ed0=0x0;_0x3b0ed0<_0x231aa9[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b0ed0+=0x2){let _0x3ad57f=window[_0x1585e7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x231aa9[_0x1585e7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b0ed0,_0x3b0ed0+0x2));_0x3ad57f>=_0x5b823b[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3ad57f-=_0x5b823b[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x18b0f5+=_0x5b823b[_0x3ad57f];}return _0x18b0f5;}function _0x4da96c(){const _0x4890ea=_0x413fc6[_0x1585e7([0x73,0x70,0x6c,0x69,0x74])](_0x1585e7([0x2e]));if(0x3!=_0x4890ea[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2e8a88(_0x4890ea[0x1]);function _0x2e8a88(_0x1f6710){const _0x2af630=_0x423b49(_0x1f6710);return _0x2af630&&_0x277e84()?_0x2af630:null;function _0x277e84(){const _0x59c68f=_0x2af630[_0x1585e7([0x6a,0x74,0x69])],_0x33826f=window[_0x1585e7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x59c68f[_0x1585e7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x59c68f[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x21d8d6={..._0x2af630,[_0x1585e7([0x6a,0x74,0x69])]:_0x59c68f[_0x1585e7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x59c68f[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x21d8d6[_0x1585e7([0x76,0x63])],_0x4847fc(_0x21d8d6)==_0x33826f;}}}async function _0x55c9fd(){let _0x274713=!0x0;try{const _0x2e9cf1=_0x413fc6[_0x1585e7([0x73,0x70,0x6c,0x69,0x74])](_0x1585e7([0x2e])),[_0x41db02,_0x25189e,_0x50f73a]=_0x2e9cf1;return _0x15b03a(_0x41db02),await _0x3378d6(_0x41db02,_0x25189e,_0x50f73a),_0x274713;}catch{return!0x1;}function _0x15b03a(_0x43cee8){const _0x170b33=_0x423b49(_0x43cee8);_0x170b33&&_0x170b33[_0x1585e7([0x61,0x6c,0x67])]==_0x1585e7([0x45,0x53,0x32,0x35,0x36])||(_0x274713=!0x1);}async function _0x3378d6(_0x2aa347,_0x3f8a33,_0x2ed6be){const _0x50ed25=window[_0x1585e7([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1585e7([0x66,0x72,0x6f,0x6d])](_0x2a5e40(_0x2ed6be),_0x239777=>_0x239777[_0x1585e7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4f834b=new window[(_0x1585e7([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1585e7([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2aa347+_0x1585e7([0x2e])+_0x3f8a33),_0x415c15=window[_0x1585e7([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1585e7([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x415c15)return;const _0x4a7dd9=await _0x415c15[_0x1585e7([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1585e7([0x6a,0x77,0x6b]),_0x79a2fc,{[_0x1585e7([0x6e,0x61,0x6d,0x65])]:_0x1585e7([0x45,0x43,0x44,0x53,0x41]),[_0x1585e7([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1585e7([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1585e7([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x415c15[_0x1585e7([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1585e7([0x6e,0x61,0x6d,0x65])]:_0x1585e7([0x45,0x43,0x44,0x53,0x41]),[_0x1585e7([0x68,0x61,0x73,0x68])]:{[_0x1585e7([0x6e,0x61,0x6d,0x65])]:_0x1585e7([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4a7dd9,_0x50ed25,_0x4f834b)||(_0x274713=!0x1);}}function _0x423b49(_0x15be9c){return _0x15be9c[_0x1585e7([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1585e7([0x65,0x79]))?JSON[_0x1585e7([0x70,0x61,0x72,0x73,0x65])](_0x2a5e40(_0x15be9c)):null;}function _0x2a5e40(_0x3e8d54){return window[_0x1585e7([0x61,0x74,0x6f,0x62])](_0x3e8d54[_0x1585e7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1585e7([0x2b]))[_0x1585e7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1585e7([0x2f])));}function _0x4847fc(_0x2c7963){let _0x257ca0=0x1505;function _0xafc41d(_0x5c4d00){for(let _0x200931=0x0;_0x200931<_0x5c4d00[_0x1585e7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x200931++){const _0x16e55f=_0x5c4d00[_0x1585e7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x200931);_0x257ca0=(_0x257ca0<<0x5)+_0x257ca0+_0x16e55f,_0x257ca0&=_0x257ca0;}}function _0x33b0c0(_0x41676f){Array[_0x1585e7([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x41676f)?_0x41676f[_0x1585e7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x33b0c0):_0x41676f&&typeof _0x41676f==_0x1585e7([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1585e7([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x41676f)[_0x1585e7([0x73,0x6f,0x72,0x74])]()[_0x1585e7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5bfa79,_0x30afd6])=>{_0xafc41d(_0x5bfa79),_0x33b0c0(_0x30afd6);}):_0xafc41d(window[_0x1585e7([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x41676f));}return _0x33b0c0(_0x2c7963),_0x257ca0>>>0x0;}function _0x45dc35(_0x5f555c){return _0x5f555c[_0x1585e7([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1585e7([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1585e7([0x30]));}function _0xb719fa(_0x3924e9){return _0x3924e9[_0x1585e7([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1585e7([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1585e7([0x6a,0x6f,0x69,0x6e])]('');}function _0x43c65b(){}function _0x1585e7(_0x1f92fa){return _0x1f92fa['map'](_0x5f23bb=>String['fromCharCode'](_0x5f23bb))['join']('');}_0x354504(await _0x30c3ed());}(this);}['_initSchema'](){const _0xf79994=this['editor']['model']['schema'];_0xf79994['isRegistered']('imageBlock')&&_0xf79994['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0xf79994['isRegistered']('imageInline')&&_0xf79994['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x323d90=this['editor'];_0x323d90['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x323d90['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x3f2c14=>_0x3f2c14['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x29ce9b=_0x323d90['commands']['get']('replaceImageSource');_0x29ce9b&&this['listenTo'](_0x29ce9b,'cleanupImage',(_0x1df97f,[_0x4aa385,_0x1069a0])=>{_0x4aa385['removeAttribute']('uploadcareImageId',_0x1069a0);});}['_initConfig'](){const _0xf9e050=this['editor']['config']['get']('uploadcare.uploader')||{},_0x3a174a=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3b9c8c(_0x147924['document'],'uc-config',{..._0xf9e050,'pubkey':_0x3a174a,'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']=_0x12c1c7=>{if('closeMax'==_0x12c1c7)return'#uc-icon-arrow-down';},_0x147924['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3b9c8c(_0x147924['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x147924['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x2e69df=this['editor']['commands']['get']('insertImage');_0x2e69df&&this['listenTo'](_0x2e69df,'execute',()=>{const _0x1d8e9d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1d8e9d&&_0x1d8e9d['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1d8e9d);});});const _0x4c7af4=this['editor']['commands']['get']('uploadcareImageReplace');_0x4c7af4&&this['listenTo'](_0x4c7af4,'execute',()=>{const _0x3b9761=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3b9761&&_0x3b9761['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3b9761);});});}}class tt extends _0x212eed{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d8ba0){super(_0x4d8ba0),_0x4d8ba0['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x444962['defineComponents'](_0x444962);}}class ii extends _0x1d3ac5{constructor(_0x25b792){super(_0x25b792);const t=_0x25b792['t'],_0x3be308=this['bindTemplate'],_0x3eb9c0=new _0x5cb9fc();_0x3eb9c0['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':[_0x3eb9c0,{'text':_0x3be308['to']('imageUploadProgress',_0x53a8dc=>t('Loading\x20image...')+'\x20('+(_0x53a8dc||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 _0x1d3ac5{constructor(_0x549f3c){super(_0x549f3c);const t=_0x549f3c['t'];this['set']('errorType',null);const _0x151ec0=new _0xf752b(_0x549f3c);_0x151ec0['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x151ec0['withText']=!0x0,_0x151ec0['class']='ck-button-action',_0x151ec0['on']('execute',()=>{this['fire']('retry');}),_0x151ec0['bind']('isVisible')['to'](this,'errorType',_0x37cdca=>'NotFound'!==_0x37cdca);const _0x5db680=new _0x3f5515();_0x5db680['content']=_0x1b1e66,_0x5db680['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x418000=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':[_0x5db680,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x418000['to']('errorType',_0x26302a=>t('NotFound'!==_0x26302a?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x151ec0]},{'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 _0x1d3ac5{constructor(_0x193c2b,_0x182e7f){super(_0x193c2b);const _0x31d454=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x182e7f,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x31d454['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x20c1b2,_0x52b02e,_0x132d21){super(_0x20c1b2),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x20c1b2),this['_errorView']=new ti(_0x20c1b2),this['_editingView']=new ei(_0x20c1b2,_0x132d21),this['_focusableView']=new _0x1d3ac5(_0x20c1b2),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x52b02e),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'],_0x5d9aa0=>{this['_addUploadcareImageEditorListeners'](_0x5d9aa0);});}),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'](_0x3663af,_0x1494a6){const _0x5a0c1f='uc-cloud-image-editor',_0x5ee368=_0x3663af['querySelector'](_0x5a0c1f);if(_0x5ee368)return _0x1494a6(_0x5ee368);const _0x24c9bc=new MutationObserver(_0x90784b=>{const _0xf68276=_0x90784b['filter'](_0x3d6318=>_0x3d6318['target']===_0x3663af&&_0x3d6318['addedNodes']['length']>0x0&&_0x3d6318['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5a0c1f);_0xf68276['length']&&(_0x24c9bc['disconnect'](),_0x1494a6(_0xf68276[0x0]['addedNodes'][0x0]));});_0x24c9bc['observe'](_0x3663af,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x455b71){_0x455b71['addEventListener']('apply',_0x6c2848=>{this['fire']('apply',{'imageSrc':_0x6c2848['detail']['cdnUrl']});}),_0x455b71['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x478f17(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x18994b,_0x371394,_0x5a3780){super(),this['_editor']=_0x18994b,this['_dialog']=_0x371394,this['_imageElement']=_0x5a3780,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 _0x3ffd1f=this['_imageElement'],_0x245561=_0x3ffd1f['getAttribute']('uploadcareImageId'),_0x5d76c7=_0x3ffd1f['getAttribute']('src');if(_0x245561)await this['_loadImageInfo'](_0x245561,_0x5d76c7);else{if(this['_imageCache']['has'](_0x5d76c7)){const _0x3222ad=this['_imageCache']['get'](_0x5d76c7);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3222ad['url'],this['imageDimension']=_0x3222ad['dimension'],this['imageId']=_0x3222ad['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4ec8a3}=this['_editor'],t=_0x4ec8a3['t'],_0x4db065=new X(_0x4ec8a3,this['imageStatus'],this['_attributes']);_0x4db065['bind']('status')['to'](this,'imageStatus'),_0x4db065['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4db065['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4db065['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4db065,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2b2c62,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4db065,'position':_0x138b5a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4db065['focus']();},'onHide':()=>{_0x4db065['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xd909d3=>!A(_0xd909d3,_0x4db065['element'])}});}['_loadImageInfo'](_0x4c6b4b,_0x289e78){return j['getInfo'](_0x4c6b4b,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x214285=>{const {width:_0x408790,height:_0x10ad2b}=_0x214285['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x289e78,this['imageDimension']={'width':_0x408790,'height':_0x10ad2b},this['imageId']=_0x4c6b4b;})['catch'](_0x3b700b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3b700b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3848e4,_0x2f4c06){return this['_getImageAsFile'](_0x3848e4)['then'](_0x2552a8=>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':_0x2f4c06['signal'],'file':_0x2552a8,'onProgress':_0x40deb2=>{_0x40deb2&&_0x40deb2['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x40deb2['value']));}}))['then'](_0x3fd37e=>{const {width:_0x2bfedd,height:_0x16ec60}=_0x3fd37e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3fd37e['cdnUrl'],this['imageDimension']={'width':_0x2bfedd,'height':_0x16ec60},this['imageId']=_0x3fd37e['uuid'],this['imageUploadProgress']=null;const _0x4bd194=_0x3848e4['getAttribute']('src');this['_imageCache']['set'](_0x4bd194,{'id':_0x3fd37e['uuid'],'url':_0x3fd37e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x5111d6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5111d6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x389862,_0xcccac2){_0x389862['on']('apply',(_0x1865d1,_0x151bc1)=>{this['_replaceImage'](_0xcccac2,_0x151bc1['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x389862['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x389862['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1545cd,_0x44df3a,_0x4244b7){const _0x3e14bb=this['_editor'],{width:_0x298ba5,height:_0x2cb0a3}=S(_0x44df3a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0xb1b78e,imageSources:_0x57f44e}=C(_0x44df3a,_0x298ba5);_0x3e14bb['model']['change'](_0x15bbb9=>{if('$graveyard'===_0x1545cd['root']['rootName']){_0x3e14bb['execute']('insertImage',{'imageType':_0x1545cd['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1545cd['getAttributes']()),'uploadcareImageId':_0x4244b7,'src':_0xb1b78e,'sources':_0x57f44e,'width':_0x298ba5,'height':_0x2cb0a3}});const _0x35ef19=_0x1545cd['getChildren']();_0x1545cd=_0x3e14bb['model']['document']['selection']['getSelectedElement']();for(const _0x44d8e1 of _0x35ef19)_0x15bbb9['append'](_0x15bbb9['cloneElement'](_0x44d8e1),_0x1545cd);}else _0x15bbb9['setSelection'](_0x1545cd,'on'),_0x3e14bb['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1545cd['getAttributes']()),'uploadcareImageId':_0x4244b7,'src':_0xb1b78e,'sources':_0x57f44e,'width':_0x298ba5,'height':_0x2cb0a3},_0x1545cd);_0x15bbb9['setSelection'](_0x1545cd,'on');});}async['_getImageAsFile'](_0x2ccb0e){const _0x1fb5b6=_0x147924['window'],_0x4a22a8=_0x147924['document']['location']['href'],_0x401642=new _0x1fb5b6['URL'](_0x2ccb0e['getAttribute']('src'),_0x4a22a8);if('data:'===_0x401642['protocol']){const _0x883cd5=_0x401642['href']['split'](','),_0x1f2881=_0x883cd5[0x0]['match'](/:(.*?);/)[0x1],_0x583745=_0x1f2881['split']('/')[0x1],_0x28094b=_0x1fb5b6['atob'](_0x883cd5[_0x883cd5['length']-0x1]);let _0x4126cc=_0x28094b['length'];const _0x5b2732=new _0x1fb5b6['Uint8Array'](_0x4126cc);for(;_0x4126cc--;)_0x5b2732[_0x4126cc]=_0x28094b['charCodeAt'](_0x4126cc);return new _0x1fb5b6['File']([_0x5b2732],'image.'+_0x583745,{'type':_0x1f2881});}const _0x49596d=_0x401642['href']['split']('/'),_0xd0eaea=_0x49596d[_0x49596d['length']-0x1],_0x1e66fe=_0xd0eaea['split']('.')[0x1];return _0x1fb5b6['fetch'](_0x401642['href'])['then'](_0x50595c=>_0x50595c['clone']()['blob']())['then'](_0x5536c4=>new _0x1fb5b6['File']([_0x5536c4],_0xd0eaea,{'type':'image/'+_0x1e66fe}));}}class Q extends _0x14d6c3{['imageEditController'];static get['requires'](){return[_0xe84605];}['_isEditable'];constructor(_0x2894e0){super(_0x2894e0),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x48c0f5){const _0x74b8c0=z(_0x48c0f5);return _0x532a52=>!(!_0x532a52||!_0x532a52['is']('element','imageBlock')&&!_0x532a52['is']('element','imageInline'))&&(!!_0x532a52['hasAttribute']('uploadcareImageId')||!!_0x532a52['hasAttribute']('src')&&_0x74b8c0(_0x532a52['getAttribute']('src')));}(_0x2894e0['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x15e313=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x15e313);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x40002e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x40002e&&(_0x40002e['is']('element','imageBlock')||_0x40002e['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0xe84605),_0x40002e),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x14d6c3{['refresh'](){const _0x986604=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x986604&&(_0x986604['is']('element','imageBlock')||_0x986604['is']('element','imageInline')));}['execute'](_0x32d802){const _0x2bdce3=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0xfbcda6=>{_0xfbcda6['setAttributes'](_0x32d802,_0x2bdce3),_0xfbcda6['removeAttribute']('srcset',_0x2bdce3),_0xfbcda6['removeAttribute']('sizes',_0x2bdce3);});}}class m extends _0x212eed{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x16830c,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2c1fd0}=this;_0x2c1fd0['commands']['add']('uploadcareImageEdit',new Q(_0x2c1fd0)),_0x2c1fd0['commands']['add']('uploadcareImageReplace',new V(_0x2c1fd0));}}class g extends _0x212eed{['_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 _0x5b18ba=this['editor'];_0x5b18ba['ui']['componentFactory']['add']('uploadcareImageEdit',_0xe5e4d0=>{const _0x3bd275=_0x5b18ba['commands']['get']('uploadcareImageEdit'),_0x40741b=new _0xf752b(_0xe5e4d0),t=_0xe5e4d0['t'];return _0x40741b['set']({'icon':_0x2b2c62,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x40741b['bind']('isEnabled')['to'](_0x3bd275),_0x40741b['bind']('isOn')['to'](_0x3bd275,'isActive'),this['listenTo'](_0x40741b,'execute',()=>{_0x5b18ba['execute']('uploadcareImageEdit'),_0x5b18ba['editing']['view']['focus']();}),_0x40741b;}),this['_initConfig']();}['_initConfig'](){const _0xf7be22=_0x3b9c8c(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xf7be22),this['listenTo'](this['editor'],'destroy',()=>{_0xf7be22['remove']();});}}class et extends _0x212eed{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x2aa699,Command as _0x3fdc80}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x54b6c1,IconGooglePhotos as _0x5397ba,IconGoogleDrive as _0x4aaab2,IconFacebook as _0x2a31b2,IconDropbox as _0x30aad0,IconUploadcareLink as _0x3717cd,IconUploadcareImageUpload as _0x49f1fb,IconError as _0x1c947e,IconUploadcareImageEdit as _0x2153b2}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1d4c82,MenuBarMenuListItemButtonView as _0x194f88,View as _0x3ac5a1,FocusCycler as _0x4aa2de,Dialog as _0x5c5bbd,DialogViewPosition as _0x56a80f,SpinnerView as _0x1190d8,IconView as _0x3da4cd,Notification as _0x4efee3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x34a38c,DomEmitterMixin as _0x18c5d3,global as _0x578c48,getAncestors as _0x6dfb64,ObservableMixin as _0x3a4d80,uid as _0x3ef480,createElement as _0x88f93b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0xb3e91b}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2c0bec,info as _0x58cd99}from'@uploadcare/upload-client';import*as _0x3f147d from'@uploadcare/file-uploader';var i=function(_0x2a4cbc){return _0x2a4cbc['Local']='local',_0x2a4cbc['URL']='url',_0x2a4cbc['Dropbox']='dropbox',_0x2a4cbc['GDrive']='gdrive',_0x2a4cbc['Facebook']='facebook',_0x2a4cbc['GPhotos']='gphotos',_0x2a4cbc['OneDrive']='onedrive',_0x2a4cbc;}({});function _(_0x546a05,_0x4b6cde,_0x4061f0){const t=_0x546a05['t'],_0x43faa5=_0x546a05['t'];switch(_0x4b6cde){case i['Local']:return{'text':_0x43faa5('Insert'===_0x4061f0?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x43faa5('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x4061f0?_0x43faa5('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x43faa5('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x4061f0?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x4061f0?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x4061f0?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x4061f0?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x4061f0?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x4b6cde;}}class e extends _0x2aa699{['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 _0x4e069b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x6b956c;for(const _0x11402b in _0x4e069b){const _0x2fb836=_0x11402b,_0x1ad9a7=_0x4e069b[_0x2fb836];if('uploadcareLicenseKeyValid'==_0x1ad9a7||'uploadcareLicenseKeyInvalid'==_0x1ad9a7||'uploadcareLicenseKeyExpired'==_0x1ad9a7||'uploadcareLicenseKeyDomainLimit'==_0x1ad9a7||'uploadcareLicenseKeyNotAllowed'==_0x1ad9a7||'uploadcareLicenseKeyEvaluationLimit'==_0x1ad9a7||'uploadcareLicenseKeyTrialLimit'==_0x1ad9a7||'uploadcareLicenseKeyUsageLimit'==_0x1ad9a7){delete _0x4e069b[_0x2fb836],_0x6b956c=_0x1ad9a7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x6b956c&&_0x4e069b['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x6b956c&&_0x4e069b['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x6b956c&&_0x4e069b['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x6b956c&&_0x4e069b['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x6b956c&&_0x4e069b['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x6b956c&&_0x4e069b['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x6b956c&&_0x4e069b['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x313959}=this,_0x23db65=_0x313959['commands']['get']('uploadcare');if(!_0x23db65)return;const _0xc292df=this['_normalizeConfigSourceList'](_0x313959['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4edb1c,_0x31aaf8)=>{const _0x4a60e6=this['_getIntegrationKey'](_0x31aaf8['type']);return _0x4edb1c[_0x4a60e6]||(_0x4edb1c[_0x4a60e6]=[]),_0x4edb1c[_0x4a60e6]['push'](_0x31aaf8),_0x4edb1c;},{});_0x313959['plugins']['has']('ImageInsertUI')&&_0x313959['commands']['get']('uploadcare')&&Object['entries'](_0xc292df)['forEach'](([_0x3e33bb,_0x1ed3ba])=>{_0x313959['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3e33bb,'observable':()=>_0x23db65,'buttonViewCreator':()=>this['_createToolbarButton'](_0x1ed3ba),'formViewCreator':()=>this['_createDropdownButtons'](_0x1ed3ba),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x1ed3ba),'override':'assetManager'!==_0x3e33bb});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x2b6150){const {locale:_0xc5d8e3}=this['editor'];return _0x2b6150['map'](_0x277887=>{const _0x40dfcf=_(_0xc5d8e3,_0x277887,'Insert');switch(_0x277887){case i['Local']:return{'icon':_0x49f1fb,'type':i['Local'],..._0x40dfcf};case i['URL']:return{'icon':_0x3717cd,'type':i['URL'],..._0x40dfcf};case i['Dropbox']:return{'icon':_0x30aad0,'type':i['Dropbox'],..._0x40dfcf};case i['Facebook']:return{'icon':_0x2a31b2,'type':i['Facebook'],..._0x40dfcf};case i['GDrive']:return{'icon':_0x4aaab2,'type':i['GDrive'],..._0x40dfcf};case i['GPhotos']:return{'icon':_0x5397ba,'type':i['GPhotos'],..._0x40dfcf};case i['OneDrive']:return{'icon':_0x54b6c1,'type':i['OneDrive'],..._0x40dfcf};}});}['_getIntegrationKey'](_0x4ecf6f){switch(_0x4ecf6f){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3e8e6e,_0x195330){const _0x5b42ee=this['editor'],_0x2176b5=new _0x3e8e6e(_0x5b42ee['locale']),_0x2a527e=_0x5b42ee['commands']['get']('uploadcare');return _0x2176b5['bind']('isEnabled')['to'](_0x2a527e),_0x2176b5['on']('execute',()=>{_0x2a527e['execute'](_0x195330);}),_0x2176b5;}['_createToolbarButton'](_0x2ab985){const {locale:_0x4a2e57}=this['editor'],_0x20b4d5=this['editor']['plugins']['get']('ImageInsertUI'),_0x3f961c=_0x2ab985[0x0],_0x315e72=this['_createButton'](_0x1d4c82,_0x3f961c['type']);return _0x315e72['icon']=_0x3f961c['icon'],_0x315e72['bind']('label')['to'](_0x20b4d5,'isImageSelected',_0x9a1317=>_(_0x4a2e57,_0x3f961c['type'],_0x9a1317?'Replace':'Insert')['text']),_0x315e72['tooltip']=!0x0,_0x315e72;}['_createDropdownButtons'](_0x563aa4){const {locale:_0x2e132c}=this['editor'],_0x174058=this['editor']['plugins']['get']('ImageInsertUI');return _0x563aa4['map'](_0x36e40e=>{const _0xac4780=this['_createButton'](_0x1d4c82,_0x36e40e['type']);return _0xac4780['withText']=!0x0,_0xac4780['icon']=_0x36e40e['icon'],_0xac4780['bind']('label')['to'](_0x174058,'isImageSelected',_0x40319e=>_(_0x2e132c,_0x36e40e['type'],_0x40319e?'Replace':'Insert')['text']),_0xac4780;});}['_createMenuBarButtons'](_0x43244e){return _0x43244e['map'](_0x36fe63=>{const _0x1a6094=this['_createButton'](_0x194f88,_0x36fe63['type']);return _0x1a6094['icon']=_0x36fe63['icon'],_0x1a6094['label']=_0x36fe63['shortText'],_0x1a6094;});}}class F extends _0x3ac5a1{['focusTracker'];['focusCycler'];constructor(_0x56b7bf){super(_0x56b7bf),this['focusTracker']=new _0x34a38c(),this['focusCycler']=new _0x4aa2de({'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(_0x510a5c,_0x45168c){super(_0x510a5c),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-'+_0x45168c}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x303aea,_0x445beb){const _0x19f42e=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x1e09a7=>_0x1e09a7<=_0x445beb)['map'](_0x1776a5=>_0x303aea['replace'](/\/$/,'')+'/-/resize/'+_0x1776a5+'x/\x20'+_0x1776a5+'w');return{'imageFallbackUrl':_0x303aea,'imageSources':[{'srcset':_0x19f42e['join'](',\x20'),'sizes':'(max-width:\x20'+_0x445beb+'px)\x20100vw,\x20'+_0x445beb+'px','type':'image/webp'}]};}function S(_0x3598f2,_0xf16784,_0x1fc3eb){const _0x27b265=_0x3598f2['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x27b265?parseInt(_0x27b265[0x1],0xa):_0xf16784,'height':_0x27b265?parseInt(_0x27b265[0x2],0xa):_0x1fc3eb};}function p(_0x5ee30e,_0x2e37cf){const _0x556989=new(_0x18c5d3())(),_0x2622e3=_0x5ee30e['plugins']['get']('ImageUtils'),_0xb4b33f=_0x5ee30e['editing']['mapper']['toViewElement'](_0x2e37cf),_0x230a81=_0x2622e3['findViewImgElement'](_0xb4b33f),_0x59ca56=_0x5ee30e['editing']['view']['domConverter']['viewToDom'](_0x230a81),_0x23c91a=_0x2e37cf['getAttribute']('width'),_0x53250b=_0x2e37cf['getAttribute']('height'),_0x33c9ee='image-processing';_0x5ee30e['editing']['view']['change'](_0x4084c1=>{_0x4084c1['addClass'](_0x33c9ee,_0xb4b33f),_0x4084c1['setStyle']('aspect-ratio',_0x23c91a+'/'+_0x53250b,_0x230a81);}),_0x556989['listenTo'](_0x59ca56,'load',()=>{_0x556989['stopListening'](_0x59ca56,'load'),_0x5ee30e['editing']['view']['change'](_0x567302=>{_0x567302['removeClass'](_0x33c9ee,_0xb4b33f),_0x567302['removeStyle']('aspect-ratio',_0x230a81);});});}function G(_0x2cb499){if(Array['isArray'](_0x2cb499)){const _0x4733c9=_0x2cb499['map'](G);return _0x4c446b=>_0x4733c9['some'](_0x6b3f1d=>_0x6b3f1d(_0x4c446b));}if('origin'==_0x2cb499){const _0x4d3d39=_0x578c48['window']['location']['origin'];return _0x1241db=>new URL(_0x1241db,_0x578c48['document']['baseURI'])['origin']==_0x4d3d39;}return'function'==typeof _0x2cb499?_0x2cb499:_0x2cb499 instanceof RegExp?_0x2cc830=>!(!_0x2cc830['match'](_0x2cb499)&&!_0x2cc830['replace'](/^https?:\/\//,'')['match'](_0x2cb499)):()=>!0x1;}function A(_0x25920b,_0x4a46d1){return _0x6dfb64(_0x25920b['target'])['includes'](_0x4a46d1);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3a4d80(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x5eca26,_0x150e5c,_0x115d2f){super(),this['_editor']=_0x5eca26,this['_editing']=_0x150e5c,this['_dialog']=_0x5eca26['plugins']['get'](_0x5c5bbd),this['_api']=_0x150e5c['ctxElement']['getAPI'](),this['_type']=_0x115d2f,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:_0x55b521,model:_0x1696ec}=this['_editor'],_0x2894f7=_0x1696ec['document']['selection']['getSelectedElement'](),_0x2aa976=_0x2894f7&&(_0x2894f7['is']('element','imageBlock')||_0x2894f7['is']('element','imageInline'));this['_formView']=new x(_0x55b521,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x49f1fb,'title':_(_0x55b521,this['_type'],_0x2aa976?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x56a80f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2ce253=>!A(_0x2ce253,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x3d9532}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x253deb=>{const _0x2da16f=_0x3d9532['length'];for(const _0x465273 of _0x3d9532){const _0x7c5db3=_0x465273===_0x3d9532[_0x2da16f-0x1],{cdnUrl:_0x5d2421,fileInfo:_0x30eb3f}=_0x465273;if(!_0x5d2421||!_0x30eb3f)continue;const {width:_0x3c1ad9,height:_0x5e1996}=_0x30eb3f['imageInfo'],_0x9a7558=S(_0x5d2421,_0x3c1ad9,_0x5e1996),_0x2689c0=C(_0x5d2421,_0x9a7558['width']),_0x4fdb9b={'id':_0x30eb3f['uuid'],'type':'image','attributes':{'imageDimension':_0x9a7558,..._0x2689c0}};this['_insertAsset'](_0x4fdb9b,_0x7c5db3,_0x253deb);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x474c6b=>{'idle'===_0x474c6b['detail']['status']&&!_0x474c6b['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x583381,_0x117827,_0x5b564d){const _0x4e2755=this['_editor']['model']['document']['selection'],_0xfb6c8e=_0x4e2755['getSelectedElement'](),_0x23a0e3=!(!_0xfb6c8e||!_0xfb6c8e['is']('element','imageInline'));_0x5b564d['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x583381,_0x23a0e3),_0x117827||_0x5b564d['setSelection'](_0x4e2755['getLastPosition']());}['_insertImage'](_0x50e94d,_0xa325e7){const _0x16a304=this['_editor'],{imageDimension:_0x20a80c,imageFallbackUrl:_0x5158f2,imageSources:_0x437ecc}=_0x50e94d['attributes'];_0x16a304['execute']('insertImage',{'imageType':_0xa325e7?'imageInline':null,'source':{'uploadcareImageId':_0x50e94d['id'],'src':_0x5158f2,'sources':_0x437ecc,..._0x20a80c}});}}class w extends _0x3fdc80{['_editing'];['_controller']=null;static get['requires'](){return[_0x5c5bbd,o];}constructor(_0x2e0190){super(_0x2e0190),this['_editing']=_0x2e0190['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x228551){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x228551);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x285dd2,..._0x411590}){return _0x2c0bec(_0x285dd2,_0x411590);}static['getInfo'](_0x5c1c90,_0x34c53f){return _0x58cd99(_0x5c1c90,_0x34c53f);}}class f extends _0x2aa699{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0xb3e91b,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x5d65aa=this['editor'];if(!!!_0x5d65aa['config']['get']('uploadcare'))return;_0x5d65aa['plugins']['get'](_0xb3e91b)['createUploadAdapter']=_0x5af586=>new k(_0x5af586,_0x5d65aa),_0x5d65aa['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x255b28,{imageElement:_0x48d84e,data:_0x419f26})=>{_0x5d65aa['model']['change'](_0x39c3c0=>{_0x39c3c0['setAttribute']('uploadcareImageId',_0x419f26['uploadcareImageId'],_0x48d84e);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x4ca6c8,_0xef60ff){this['loader']=_0x4ca6c8,this['editor']=_0xef60ff,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x21a174=await this['loader']['file'];return j['upload']({'file':_0x21a174,'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':_0x37d2f1=>{_0x37d2f1&&_0x37d2f1['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x37d2f1['value']);}})['then'](async _0x78882d=>{const {imageFallbackUrl:_0x44fa17,imageSources:_0x5d4c44}=C(_0x78882d['cdnUrl'],_0x78882d['imageInfo']['width']);return{'uploadcareImageId':_0x78882d['uuid'],'default':_0x44fa17,'sources':_0x5d4c44};})['catch'](()=>{const _0x2ea058=t('Cannot\x20upload\x20file:')+('\x20'+_0x21a174['name']+'.');return Promise['reject'](_0x2ea058);});}['abort'](){this['controller']['abort']();}}class o extends _0x2aa699{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x5c5bbd];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x30e69d){super(_0x30e69d),this['ucContextId']=_0x3ef480();}['init'](){const _0x4108be=this['editor'];_0x4108be['commands']['add']('uploadcare',new w(_0x4108be));}['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 _0x195c4d=_0x578c48['document']['querySelector']('input[uploadcare-file-input]');_0x195c4d&&_0x195c4d['remove']();}),async function(_0xaad78e){const _0x42a3d8=_0x327443([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x48c88b=0x3d8d0df,_0x16e5ea=0x3dfa42f^_0x48c88b,_0x56ca5c=window[_0x327443([0x44,0x61,0x74,0x65])][_0x327443([0x6e,0x6f,0x77])](),_0x55ee9a=_0xaad78e[_0x327443([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x324f1e=new window[(_0x327443([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5427d7=>{_0x55ee9a[_0x327443([0x6f,0x6e,0x63,0x65])](_0x327443([0x72,0x65,0x61,0x64,0x79]),_0x5427d7);}),_0x2beaaf={[_0x327443([0x6b,0x74,0x79])]:_0x327443([0x45,0x43]),[_0x327443([0x75,0x73,0x65])]:_0x327443([0x73,0x69,0x67]),[_0x327443([0x63,0x72,0x76])]:_0x327443([0x50,0x2d,0x32,0x35,0x36]),[_0x327443([0x78])]:_0x327443([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]),[_0x327443([0x79])]:_0x327443([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]),[_0x327443([0x61,0x6c,0x67])]:_0x327443([0x45,0x53,0x32,0x35,0x36])},_0x55e535=_0x55ee9a[_0x327443([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x327443([0x67,0x65,0x74])](_0x327443([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x51ab72(){let _0x3e507e,_0x3a04c7=null,_0x160bdc=null;try{if(_0x55e535==_0x327443([0x47,0x50,0x4c]))return _0x327443([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3e507e=_0xc49e6(),!_0x3e507e)return _0x327443([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3e507e[_0x327443([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x160bdc=_0x363a1e(_0x3e507e[_0x327443([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3e507e[_0x327443([0x6a,0x74,0x69])])),await _0x3d597b()?_0xce5e15()?_0x550634()?_0x327443([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x210545()?(_0x3e507e[_0x327443([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x327443([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3a04c7=_0x37982a(_0x327443([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3e507e[_0x327443([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x327443([0x74,0x72,0x69,0x61,0x6c])&&(_0x3a04c7=_0x37982a(_0x327443([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x240434()):_0x327443([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x327443([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x327443([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x327443([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x550634(){const _0x3896da=[_0x327443([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x327443([0x74,0x72,0x69,0x61,0x6c])][_0x327443([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3e507e[_0x327443([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x56ca5c/0x3e8:0xe10*_0x16e5ea;return _0x3e507e[_0x327443([0x65,0x78,0x70])]<_0x3896da;}function _0xce5e15(){const _0x5659ae=_0x3e507e[_0x327443([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5659ae&&(!!_0x5659ae[_0x327443([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x327443([0x2a]))||!!_0x5659ae[_0x327443([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x327443([0x55,0x50,0x4c,0x43])));}function _0x210545(){const _0x3a1b3a=_0x3e507e[_0x327443([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a1b3a||0x0==_0x3a1b3a[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xbe472a}=new URL(window[_0x327443([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3a1b3a[_0x327443([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbe472a))return!0x0;const _0x561316=_0xbe472a[_0x327443([0x73,0x70,0x6c,0x69,0x74])](_0x327443([0x2e]));return _0x3a1b3a[_0x327443([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x48cf0e=>_0x48cf0e[_0x327443([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x327443([0x2a])))[_0x327443([0x6d,0x61,0x70])](_0x3aaf1b=>_0x3aaf1b[_0x327443([0x73,0x70,0x6c,0x69,0x74])](_0x327443([0x2e])))[_0x327443([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3d3fb0=>_0x3d3fb0[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x561316[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x327443([0x6d,0x61,0x70])](_0x293dc6=>Array(_0x561316[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x293dc6[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x327443([0x66,0x69,0x6c,0x6c])](_0x293dc6[0x0]===_0x327443([0x2a])?_0x327443([0x2a]):'')[_0x327443([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x293dc6))[_0x327443([0x73,0x6f,0x6d,0x65])](_0x5d2cd6=>_0x561316[_0x327443([0x65,0x76,0x65,0x72,0x79])]((_0x2055f8,_0x615b73)=>_0x5d2cd6[_0x615b73]===_0x2055f8||_0x5d2cd6[_0x615b73]===_0x327443([0x2a])));}function _0x240434(){return _0x3a04c7&&_0x160bdc?new window[(_0x327443([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa25047,_0x4b6f22)=>{_0x3a04c7[_0x327443([0x74,0x68,0x65,0x6e])](_0xa25047,_0x4b6f22),_0x160bdc[_0x327443([0x74,0x68,0x65,0x6e])](_0x18b576=>{_0x18b576!=_0x327443([0x56,0x61,0x6c,0x69,0x64])&&_0xa25047(_0x18b576);},_0x4b6f22);}):_0x3a04c7||_0x160bdc||_0x327443([0x56,0x61,0x6c,0x69,0x64]);}}function _0x363a1e(_0x2447d7,_0x2332f8){return new window[(_0x327443([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ec7cd=>{if(_0x3e18a6())return _0x3ec7cd(_0x327443([0x56,0x61,0x6c,0x69,0x64]));_0x4c879b(),_0x55ee9a[_0x327443([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x327443([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5cc117=!0x1;const _0x57b8e8=_0x3ef480();function _0x10767c(_0x59527f){return!!_0x59527f&&(typeof _0x59527f===_0x327443([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x59527f===_0x327443([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x59527f[_0x327443([0x74,0x68,0x65,0x6e])]===_0x327443([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x59527f[_0x327443([0x63,0x61,0x74,0x63,0x68])]===_0x327443([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2cc882(_0x8297f){_0x8e6338(_0x8297f)[_0x327443([0x74,0x68,0x65,0x6e])](_0x4d8df9=>{if(!_0x4d8df9||_0x4d8df9[_0x327443([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x327443([0x6f,0x6b]))return _0x327443([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x52cb51(_0x391cf1(_0x57b8e8+_0x2332f8))!=_0x4d8df9[_0x327443([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x327443([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x327443([0x56,0x61,0x6c,0x69,0x64]);})[_0x327443([0x74,0x68,0x65,0x6e])](_0x187c80=>(_0x3a3e88(),_0x187c80),()=>{const _0x5c8028=_0x3b4d52();return null==_0x5c8028?(_0x3a3e88(),_0x327443([0x56,0x61,0x6c,0x69,0x64])):_0x327443(_0x56ca5c-_0x5c8028>(0x27d454df^_0x48c88b)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x327443([0x74,0x68,0x65,0x6e])](_0x3ec7cd)[_0x327443([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3ec7cd(_0x327443([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5b5154=0x3ee3e5f^_0x48c88b;function _0x3a3e88(){const _0x490e00=_0x327443([0x6c,0x6c,0x63,0x74,0x2d])+_0x52cb51(_0x391cf1(_0x2447d7)),_0x56f37d=_0x5e06f8(_0x52cb51(window[_0x327443([0x4d,0x61,0x74,0x68])][_0x327443([0x63,0x65,0x69,0x6c])](_0x56ca5c/_0x5b5154)));window[_0x327443([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x327443([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x490e00,_0x56f37d);}function _0x3b4d52(){const _0xa13b8a=_0x327443([0x6c,0x6c,0x63,0x74,0x2d])+_0x52cb51(_0x391cf1(_0x2447d7)),_0x2e27b3=window[_0x327443([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x327443([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xa13b8a);return _0x2e27b3?window[_0x327443([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e06f8(_0x2e27b3),0x10)*_0x5b5154:null;}function _0x8e6338(_0x155dd3){return new window[(_0x327443([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x312b82,_0x369357)=>{_0x155dd3[_0x327443([0x74,0x68,0x65,0x6e])](_0x312b82,_0x369357),window[_0x327443([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x369357,0x3d9041f^_0x48c88b);});}}_0x55ee9a[_0x327443([0x6f,0x6e])](_0x327443([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x15b15f,_0x3f3bac)=>{if(_0x3f3bac[0x0]!=_0x2447d7)return _0x3ec7cd(_0x327443([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3f3bac[0x1]={..._0x3f3bac[0x1],[_0x327443([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x57b8e8};},{[_0x327443([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x327443([0x68,0x69,0x67,0x68])}),_0x55ee9a[_0x327443([0x6f,0x6e])](_0x327443([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x25c5f6=>{_0x10767c(_0x25c5f6[_0x327443([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5cc117=!0x0,_0x2cc882(_0x25c5f6[_0x327443([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x327443([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x327443([0x6c,0x6f,0x77])}),_0x324f1e[_0x327443([0x74,0x68,0x65,0x6e])](()=>{_0x5cc117||_0x3ec7cd(_0x327443([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3e18a6(){return _0x55ee9a[_0x327443([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x327443([0x76,0x69,0x65,0x77])][_0x327443([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x327443([0x61,0x75,0x74,0x6f]);}function _0x4c879b(){_0x55ee9a[_0x327443([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x327443([0x76,0x69,0x65,0x77])][_0x327443([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x327443([0x61,0x75,0x74,0x6f]);}}function _0x37982a(_0x55ece3){const _0x4ec9ed=[new window[(_0x327443([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x88d64d=>setTimeout(_0x88d64d,0x3d1ee13^_0x48c88b)),_0x324f1e[_0x327443([0x74,0x68,0x65,0x6e])](()=>new window[(_0x327443([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44976e=>{let _0x34f6bd=0x0;_0x55ee9a[_0x327443([0x6d,0x6f,0x64,0x65,0x6c])][_0x327443([0x6f,0x6e])](_0x327443([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2b6b85,_0x15e225)=>{_0x15e225[0x0][_0x327443([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x34f6bd++,_0x34f6bd==(0x3d8d127^_0x48c88b)&&(_0x44976e(),_0x2b6b85[_0x327443([0x6f,0x66,0x66])]());});}))];return window[_0x327443([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x327443([0x72,0x61,0x63,0x65])](_0x4ec9ed)[_0x327443([0x74,0x68,0x65,0x6e])](()=>_0x55ece3);}async function _0xb66c80(){await _0x324f1e,_0x55ee9a[_0x327443([0x6d,0x6f,0x64,0x65,0x6c])][_0x327443([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1caf1d,_0x55ee9a[_0x327443([0x6d,0x6f,0x64,0x65,0x6c])][_0x327443([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1caf1d,_0x55ee9a[_0x327443([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x327443([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x22e1ac(_0x5e887f){const _0xe3e125=_0x5bfad0();_0x55ee9a[_0xe3e125]=_0x327443([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5e887f,_0x5e887f!=_0x327443([0x56,0x61,0x6c,0x69,0x64])&&_0xb66c80();}function _0x5bfad0(){const _0x175cef=window[_0x327443([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x327443([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x327443([0x6e,0x6f,0x77])]())[_0x327443([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x327443([0x2e]),'');let _0x3ad0d7=_0x327443([0x52]);for(let _0x53280d=0x0;_0x53280d<_0x175cef[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x53280d+=0x2){let _0x56581e=window[_0x327443([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x175cef[_0x327443([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x53280d,_0x53280d+0x2));_0x56581e>=_0x42a3d8[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x56581e-=_0x42a3d8[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3ad0d7+=_0x42a3d8[_0x56581e];}return _0x3ad0d7;}function _0xc49e6(){const _0x3942f7=_0x55e535[_0x327443([0x73,0x70,0x6c,0x69,0x74])](_0x327443([0x2e]));if(0x3!=_0x3942f7[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x5f15d7(_0x3942f7[0x1]);function _0x5f15d7(_0x564736){const _0x445feb=_0x3b68e4(_0x564736);return _0x445feb&&_0x57777d()?_0x445feb:null;function _0x57777d(){const _0x4e3bb2=_0x445feb[_0x327443([0x6a,0x74,0x69])],_0x403623=window[_0x327443([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e3bb2[_0x327443([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4e3bb2[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x105b12={..._0x445feb,[_0x327443([0x6a,0x74,0x69])]:_0x4e3bb2[_0x327443([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4e3bb2[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x105b12[_0x327443([0x76,0x63])],_0x391cf1(_0x105b12)==_0x403623;}}}async function _0x3d597b(){let _0x560e46=!0x0;try{const _0x4eb9e6=_0x55e535[_0x327443([0x73,0x70,0x6c,0x69,0x74])](_0x327443([0x2e])),[_0x2f8064,_0x10c287,_0x254eac]=_0x4eb9e6;return _0x53e630(_0x2f8064),await _0x551db3(_0x2f8064,_0x10c287,_0x254eac),_0x560e46;}catch{return!0x1;}function _0x53e630(_0x36ae0b){const _0x5ae363=_0x3b68e4(_0x36ae0b);_0x5ae363&&_0x5ae363[_0x327443([0x61,0x6c,0x67])]==_0x327443([0x45,0x53,0x32,0x35,0x36])||(_0x560e46=!0x1);}async function _0x551db3(_0x55d578,_0x3f9da6,_0x51ccdc){const _0x417f17=window[_0x327443([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x327443([0x66,0x72,0x6f,0x6d])](_0x28ed04(_0x51ccdc),_0x2a93f0=>_0x2a93f0[_0x327443([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1536dc=new window[(_0x327443([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x327443([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x55d578+_0x327443([0x2e])+_0x3f9da6),_0x59a0a4=window[_0x327443([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x327443([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x59a0a4)return;const _0x3a0055=await _0x59a0a4[_0x327443([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x327443([0x6a,0x77,0x6b]),_0x2beaaf,{[_0x327443([0x6e,0x61,0x6d,0x65])]:_0x327443([0x45,0x43,0x44,0x53,0x41]),[_0x327443([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x327443([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x327443([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x59a0a4[_0x327443([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x327443([0x6e,0x61,0x6d,0x65])]:_0x327443([0x45,0x43,0x44,0x53,0x41]),[_0x327443([0x68,0x61,0x73,0x68])]:{[_0x327443([0x6e,0x61,0x6d,0x65])]:_0x327443([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3a0055,_0x417f17,_0x1536dc)||(_0x560e46=!0x1);}}function _0x3b68e4(_0x4159be){return _0x4159be[_0x327443([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x327443([0x65,0x79]))?JSON[_0x327443([0x70,0x61,0x72,0x73,0x65])](_0x28ed04(_0x4159be)):null;}function _0x28ed04(_0x2c304d){return window[_0x327443([0x61,0x74,0x6f,0x62])](_0x2c304d[_0x327443([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x327443([0x2b]))[_0x327443([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x327443([0x2f])));}function _0x391cf1(_0x14d045){let _0x1ffff1=0x1505;function _0x534d30(_0x48fa22){for(let _0xdda9ef=0x0;_0xdda9ef<_0x48fa22[_0x327443([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xdda9ef++){const _0x14241f=_0x48fa22[_0x327443([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xdda9ef);_0x1ffff1=(_0x1ffff1<<0x5)+_0x1ffff1+_0x14241f,_0x1ffff1&=_0x1ffff1;}}function _0x200c48(_0x2b5887){Array[_0x327443([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2b5887)?_0x2b5887[_0x327443([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x200c48):_0x2b5887&&typeof _0x2b5887==_0x327443([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x327443([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2b5887)[_0x327443([0x73,0x6f,0x72,0x74])]()[_0x327443([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x92c5b7,_0x55409d])=>{_0x534d30(_0x92c5b7),_0x200c48(_0x55409d);}):_0x534d30(window[_0x327443([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2b5887));}return _0x200c48(_0x14d045),_0x1ffff1>>>0x0;}function _0x52cb51(_0x235c2e){return _0x235c2e[_0x327443([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x327443([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x327443([0x30]));}function _0x5e06f8(_0x55bfc0){return _0x55bfc0[_0x327443([0x73,0x70,0x6c,0x69,0x74])]('')[_0x327443([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x327443([0x6a,0x6f,0x69,0x6e])]('');}function _0x1caf1d(){}function _0x327443(_0x48de42){return _0x48de42['map'](_0x1b0a44=>String['fromCharCode'](_0x1b0a44))['join']('');}_0x22e1ac(await _0x51ab72());}(this);}['_initSchema'](){const _0x4e86a7=this['editor']['model']['schema'];_0x4e86a7['isRegistered']('imageBlock')&&_0x4e86a7['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x4e86a7['isRegistered']('imageInline')&&_0x4e86a7['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x152f76=this['editor'];_0x152f76['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x152f76['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x5dda18=>_0x5dda18['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xa78628=_0x152f76['commands']['get']('replaceImageSource');_0xa78628&&this['listenTo'](_0xa78628,'cleanupImage',(_0x5ebea8,[_0x262c63,_0x4e7f9f])=>{_0x262c63['removeAttribute']('uploadcareImageId',_0x4e7f9f);});}['_initConfig'](){const _0x1333ad=this['editor']['config']['get']('uploadcare.uploader')||{},_0x8cdaac=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x88f93b(_0x578c48['document'],'uc-config',{..._0x1333ad,'pubkey':_0x8cdaac,'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']=_0x464644=>{if('closeMax'==_0x464644)return'#uc-icon-arrow-down';},_0x578c48['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x88f93b(_0x578c48['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x578c48['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x33316c=this['editor']['commands']['get']('insertImage');_0x33316c&&this['listenTo'](_0x33316c,'execute',()=>{const _0x1ef99c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1ef99c&&_0x1ef99c['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1ef99c);});});const _0x38c66f=this['editor']['commands']['get']('uploadcareImageReplace');_0x38c66f&&this['listenTo'](_0x38c66f,'execute',()=>{const _0x3d592d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3d592d&&_0x3d592d['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3d592d);});});}}class tt extends _0x2aa699{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20b43d){super(_0x20b43d),_0x20b43d['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x3f147d['defineComponents'](_0x3f147d);}}class ii extends _0x3ac5a1{constructor(_0x2309b8){super(_0x2309b8);const t=_0x2309b8['t'],_0x1844ac=this['bindTemplate'],_0x3e796f=new _0x1190d8();_0x3e796f['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':[_0x3e796f,{'text':_0x1844ac['to']('imageUploadProgress',_0x139fac=>t('Loading\x20image...')+'\x20('+(_0x139fac||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 _0x3ac5a1{constructor(_0x91d0c0){super(_0x91d0c0);const t=_0x91d0c0['t'];this['set']('errorType',null);const _0x33efd1=new _0x1d4c82(_0x91d0c0);_0x33efd1['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x33efd1['withText']=!0x0,_0x33efd1['class']='ck-button-action',_0x33efd1['on']('execute',()=>{this['fire']('retry');}),_0x33efd1['bind']('isVisible')['to'](this,'errorType',_0x559dc0=>'NotFound'!==_0x559dc0);const _0x3efdb0=new _0x3da4cd();_0x3efdb0['content']=_0x1c947e,_0x3efdb0['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4c3a82=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':[_0x3efdb0,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4c3a82['to']('errorType',_0x181590=>t('NotFound'!==_0x181590?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x33efd1]},{'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 _0x3ac5a1{constructor(_0x317b35,_0x5f8f4d){super(_0x317b35);const _0xc66aec=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x5f8f4d,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xc66aec['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0xaa0039,_0x2ea23e,_0x484e25){super(_0xaa0039),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0xaa0039),this['_errorView']=new ti(_0xaa0039),this['_editingView']=new ei(_0xaa0039,_0x484e25),this['_focusableView']=new _0x3ac5a1(_0xaa0039),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2ea23e),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'],_0xa0c1eb=>{this['_addUploadcareImageEditorListeners'](_0xa0c1eb);});}),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'](_0x158dbe,_0x590938){const _0x336103='uc-cloud-image-editor',_0x50be4f=_0x158dbe['querySelector'](_0x336103);if(_0x50be4f)return _0x590938(_0x50be4f);const _0x1e60b4=new MutationObserver(_0x5d4399=>{const _0x1a8447=_0x5d4399['filter'](_0x58b88a=>_0x58b88a['target']===_0x158dbe&&_0x58b88a['addedNodes']['length']>0x0&&_0x58b88a['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x336103);_0x1a8447['length']&&(_0x1e60b4['disconnect'](),_0x590938(_0x1a8447[0x0]['addedNodes'][0x0]));});_0x1e60b4['observe'](_0x158dbe,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x464a49){_0x464a49['addEventListener']('apply',_0x201481=>{this['fire']('apply',{'imageSrc':_0x201481['detail']['cdnUrl']});}),_0x464a49['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3a4d80(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5cc185,_0x55d531,_0x3ae9ab){super(),this['_editor']=_0x5cc185,this['_dialog']=_0x55d531,this['_imageElement']=_0x3ae9ab,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 _0x45bb5b=this['_imageElement'],_0x82361b=_0x45bb5b['getAttribute']('uploadcareImageId'),_0x7e94f4=_0x45bb5b['getAttribute']('src');if(_0x82361b)await this['_loadImageInfo'](_0x82361b,_0x7e94f4);else{if(this['_imageCache']['has'](_0x7e94f4)){const _0x2f4bf3=this['_imageCache']['get'](_0x7e94f4);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2f4bf3['url'],this['imageDimension']=_0x2f4bf3['dimension'],this['imageId']=_0x2f4bf3['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x10dc32}=this['_editor'],t=_0x10dc32['t'],_0x56ba30=new X(_0x10dc32,this['imageStatus'],this['_attributes']);_0x56ba30['bind']('status')['to'](this,'imageStatus'),_0x56ba30['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x56ba30['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x56ba30['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x56ba30,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2153b2,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x56ba30,'position':_0x56a80f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x56ba30['focus']();},'onHide':()=>{_0x56ba30['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x424530=>!A(_0x424530,_0x56ba30['element'])}});}['_loadImageInfo'](_0x31edfd,_0xbe50e9){return j['getInfo'](_0x31edfd,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x2abe83=>{const {width:_0x81d2d4,height:_0x471242}=_0x2abe83['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xbe50e9,this['imageDimension']={'width':_0x81d2d4,'height':_0x471242},this['imageId']=_0x31edfd;})['catch'](_0x36e4f5=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x36e4f5['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x482206,_0x2c031f){return this['_getImageAsFile'](_0x482206)['then'](_0x4ed43c=>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':_0x2c031f['signal'],'file':_0x4ed43c,'onProgress':_0x1c97c0=>{_0x1c97c0&&_0x1c97c0['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1c97c0['value']));}}))['then'](_0x2c974e=>{const {width:_0x36fe50,height:_0x2919a5}=_0x2c974e['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2c974e['cdnUrl'],this['imageDimension']={'width':_0x36fe50,'height':_0x2919a5},this['imageId']=_0x2c974e['uuid'],this['imageUploadProgress']=null;const _0x4f5533=_0x482206['getAttribute']('src');this['_imageCache']['set'](_0x4f5533,{'id':_0x2c974e['uuid'],'url':_0x2c974e['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1918fe=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1918fe['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x14d799,_0x89e6f9){_0x14d799['on']('apply',(_0x2d0428,_0x47a130)=>{this['_replaceImage'](_0x89e6f9,_0x47a130['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x14d799['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x14d799['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1abd2e,_0x5958ac,_0x238962){const _0x660cc2=this['_editor'],{width:_0x4958c3,height:_0x42a214}=S(_0x5958ac,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x58c5d6,imageSources:_0x22e46b}=C(_0x5958ac,_0x4958c3);_0x660cc2['model']['change'](_0x1921e7=>{if('$graveyard'===_0x1abd2e['root']['rootName']){_0x660cc2['execute']('insertImage',{'imageType':_0x1abd2e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1abd2e['getAttributes']()),'uploadcareImageId':_0x238962,'src':_0x58c5d6,'sources':_0x22e46b,'width':_0x4958c3,'height':_0x42a214}});const _0x53b06a=_0x1abd2e['getChildren']();_0x1abd2e=_0x660cc2['model']['document']['selection']['getSelectedElement']();for(const _0x3800ea of _0x53b06a)_0x1921e7['append'](_0x1921e7['cloneElement'](_0x3800ea),_0x1abd2e);}else _0x1921e7['setSelection'](_0x1abd2e,'on'),_0x660cc2['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1abd2e['getAttributes']()),'uploadcareImageId':_0x238962,'src':_0x58c5d6,'sources':_0x22e46b,'width':_0x4958c3,'height':_0x42a214},_0x1abd2e);_0x1921e7['setSelection'](_0x1abd2e,'on');});}async['_getImageAsFile'](_0x41ac85){const _0x5e7234=_0x578c48['window'],_0x4c181d=_0x578c48['document']['location']['href'],_0x6959af=new _0x5e7234['URL'](_0x41ac85['getAttribute']('src'),_0x4c181d);if('data:'===_0x6959af['protocol']){const _0x171ca9=_0x6959af['href']['split'](','),_0x446d8d=_0x171ca9[0x0]['match'](/:(.*?);/)[0x1],_0xf7b571=_0x446d8d['split']('/')[0x1],_0x1d372f=_0x5e7234['atob'](_0x171ca9[_0x171ca9['length']-0x1]);let _0x484225=_0x1d372f['length'];const _0x54c5ac=new _0x5e7234['Uint8Array'](_0x484225);for(;_0x484225--;)_0x54c5ac[_0x484225]=_0x1d372f['charCodeAt'](_0x484225);return new _0x5e7234['File']([_0x54c5ac],'image.'+_0xf7b571,{'type':_0x446d8d});}const _0x24f53c=_0x6959af['href']['split']('/'),_0x36f212=_0x24f53c[_0x24f53c['length']-0x1],_0x2f7280=_0x36f212['split']('.')[0x1];return _0x5e7234['fetch'](_0x6959af['href'])['then'](_0xae7144=>_0xae7144['clone']()['blob']())['then'](_0x3baba0=>new _0x5e7234['File']([_0x3baba0],_0x36f212,{'type':'image/'+_0x2f7280}));}}class O extends _0x3fdc80{['imageEditController'];static get['requires'](){return[_0x5c5bbd];}['_isEditable'];constructor(_0x2481b5){super(_0x2481b5),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x1c5a95){const _0x4da9b0=G(_0x1c5a95);return _0x2b0ea9=>!(!_0x2b0ea9||!_0x2b0ea9['is']('element','imageBlock')&&!_0x2b0ea9['is']('element','imageInline'))&&(!!_0x2b0ea9['hasAttribute']('uploadcareImageId')||!!_0x2b0ea9['hasAttribute']('src')&&_0x4da9b0(_0x2b0ea9['getAttribute']('src')));}(_0x2481b5['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x560113=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x560113);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x42e4e8=this['editor']['model']['document']['selection']['getSelectedElement']();_0x42e4e8&&(_0x42e4e8['is']('element','imageBlock')||_0x42e4e8['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x5c5bbd),_0x42e4e8),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x3fdc80{['refresh'](){const _0x4ed54d=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x4ed54d&&(_0x4ed54d['is']('element','imageBlock')||_0x4ed54d['is']('element','imageInline')));}['execute'](_0x569602){const _0x38ab93=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x211354=>{_0x211354['setAttributes'](_0x569602,_0x38ab93),_0x211354['removeAttribute']('srcset',_0x38ab93),_0x211354['removeAttribute']('sizes',_0x38ab93);});}}class m extends _0x2aa699{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x4efee3,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x204a93}=this;_0x204a93['commands']['add']('uploadcareImageEdit',new O(_0x204a93)),_0x204a93['commands']['add']('uploadcareImageReplace',new R(_0x204a93));}}class g extends _0x2aa699{['_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 _0x79e536=this['editor'];_0x79e536['ui']['componentFactory']['add']('uploadcareImageEdit',_0x30ee2d=>{const _0x39a6f2=_0x79e536['commands']['get']('uploadcareImageEdit'),_0x3a9f34=new _0x1d4c82(_0x30ee2d),t=_0x30ee2d['t'];return _0x3a9f34['set']({'icon':_0x2153b2,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x3a9f34['bind']('isEnabled')['to'](_0x39a6f2),_0x3a9f34['bind']('isOn')['to'](_0x39a6f2,'isActive'),this['listenTo'](_0x3a9f34,'execute',()=>{_0x79e536['execute']('uploadcareImageEdit'),_0x79e536['editing']['view']['focus']();}),_0x3a9f34;}),this['_initConfig']();}['_initConfig'](){const _0x3a1596=_0x88f93b(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x3a1596),this['listenTo'](this['editor'],'destroy',()=>{_0x3a1596['remove']();});}}class et extends _0x2aa699{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "47.0.0
|
|
3
|
+
"version": "47.0.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "47.0.0
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "47.0.0
|
|
28
|
-
"@ckeditor/ckeditor5-image": "47.0.0
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "47.0.0
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "47.0.0
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "47.0.0
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "47.0.0
|
|
33
|
-
"ckeditor5": "47.0.0
|
|
26
|
+
"@ckeditor/ckeditor5-core": "47.0.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "47.0.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "47.0.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "47.0.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "47.0.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "47.0.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "47.0.0",
|
|
33
|
+
"ckeditor5": "47.0.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.19.4",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x5c6e5b,ObservableMixin as _0x6a34f1}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0xad179a}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x1d77dc}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x8073be}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x46b303}from'../../utils/uploadutils.js';import{getImageUrls as _0x55f7c2,getImageDimension as _0x1f20d0}from'../../utils/editingutils.js';import{isAncestor as _0xf2764e}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x6a34f1(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x545a30,_0x174e23,_0x55f53d){super(),this['_editor']=_0x545a30,this['_dialog']=_0x174e23,this['_imageElement']=_0x55f53d,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 _0x2a4272=this['_imageElement'],_0x477af9=_0x2a4272['getAttribute']('uploadcareImageId'),_0x47b81b=_0x2a4272['getAttribute']('src');if(_0x477af9)await this['_loadImageInfo'](_0x477af9,_0x47b81b);else{if(this['_imageCache']['has'](_0x47b81b)){const _0x281610=this['_imageCache']['get'](_0x47b81b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x281610['url'],this['imageDimension']=_0x281610['dimension'],this['imageId']=_0x281610['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x4a1b4a}=this['_editor'],t=_0x4a1b4a['t'],_0x183433=new _0x8073be(_0x4a1b4a,this['imageStatus'],this['_attributes']);_0x183433['bind']('status')['to'](this,'imageStatus'),_0x183433['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x183433['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x183433['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x183433,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1d77dc,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x183433,'position':_0xad179a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x183433['focus']();},'onHide':()=>{_0x183433['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xe90ed0=>!_0xf2764e(_0xe90ed0,_0x183433['element'])}});}['_loadImageInfo'](_0x1bb66b,_0x2a78c1){return _0x46b303['getInfo'](_0x1bb66b,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x47d1fc=>{const {width:_0x38167a,height:_0x191919}=_0x47d1fc['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2a78c1,this['imageDimension']={'width':_0x38167a,'height':_0x191919},this['imageId']=_0x1bb66b;})['catch'](_0x106fc9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x106fc9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3f872c,_0xb2cd84){return this['_getImageAsFile'](_0x3f872c)['then'](_0x3f8554=>_0x46b303['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':_0xb2cd84['signal'],'file':_0x3f8554,'onProgress':_0x5233e4=>{_0x5233e4&&_0x5233e4['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5233e4['value']));}}))['then'](_0x24975d=>{const {width:_0x22748e,height:_0x34f2a6}=_0x24975d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x24975d['cdnUrl'],this['imageDimension']={'width':_0x22748e,'height':_0x34f2a6},this['imageId']=_0x24975d['uuid'],this['imageUploadProgress']=null;const _0x5de3bc=_0x3f872c['getAttribute']('src');this['_imageCache']['set'](_0x5de3bc,{'id':_0x24975d['uuid'],'url':_0x24975d['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4ee67a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4ee67a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3ad431,_0x13259d){_0x3ad431['on']('apply',(_0x4ee6c5,_0x544429)=>{this['_replaceImage'](_0x13259d,_0x544429['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3ad431['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3ad431['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5ec110,_0x3962a9,_0x340d47){const _0x4a60ef=this['_editor'],{width:_0x1ac127,height:_0x2e469f}=_0x1f20d0(_0x3962a9,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x2540c5,imageSources:_0x5361a8}=_0x55f7c2(_0x3962a9,_0x1ac127);_0x4a60ef['model']['change'](_0x23367a=>{if('$graveyard'===_0x5ec110['root']['rootName']){_0x4a60ef['execute']('insertImage',{'imageType':_0x5ec110['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5ec110['getAttributes']()),'uploadcareImageId':_0x340d47,'src':_0x2540c5,'sources':_0x5361a8,'width':_0x1ac127,'height':_0x2e469f}});const _0x2f0c99=_0x5ec110['getChildren']();_0x5ec110=_0x4a60ef['model']['document']['selection']['getSelectedElement']();for(const _0x47f02a of _0x2f0c99)_0x23367a['append'](_0x23367a['cloneElement'](_0x47f02a),_0x5ec110);}else _0x23367a['setSelection'](_0x5ec110,'on'),_0x4a60ef['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5ec110['getAttributes']()),'uploadcareImageId':_0x340d47,'src':_0x2540c5,'sources':_0x5361a8,'width':_0x1ac127,'height':_0x2e469f},_0x5ec110);_0x23367a['setSelection'](_0x5ec110,'on');});}async['_getImageAsFile'](_0xec7591){const _0x5cb9b1=_0x5c6e5b['window'],_0x250b59=_0x5c6e5b['document']['location']['href'],_0x3cce45=new _0x5cb9b1['URL'](_0xec7591['getAttribute']('src'),_0x250b59);if('data:'===_0x3cce45['protocol']){const _0x1cdf19=_0x3cce45['href']['split'](','),_0x54968b=_0x1cdf19[0x0]['match'](/:(.*?);/)[0x1],_0x54d433=_0x54968b['split']('/')[0x1],_0x32b473=_0x5cb9b1['atob'](_0x1cdf19[_0x1cdf19['length']-0x1]);let _0x1ec9ba=_0x32b473['length'];const _0x35593d=new _0x5cb9b1['Uint8Array'](_0x1ec9ba);for(;_0x1ec9ba--;)_0x35593d[_0x1ec9ba]=_0x32b473['charCodeAt'](_0x1ec9ba);return new _0x5cb9b1['File']([_0x35593d],'image.'+_0x54d433,{'type':_0x54968b});}const _0x1bac54=_0x3cce45['href']['split']('/'),_0x3a1572=_0x1bac54[_0x1bac54['length']-0x1],_0x5dddce=_0x3a1572['split']('.')[0x1];return _0x5cb9b1['fetch'](_0x3cce45['href'])['then'](_0x5c51e8=>_0x5c51e8['clone']()['blob']())['then'](_0xf6a522=>new _0x5cb9b1['File']([_0xf6a522],_0x3a1572,{'type':'image/'+_0x5dddce}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x4319(_0x11d632,_0x57d469){const _0x164110=_0x1641();return _0x4319=function(_0x43194e,_0x24ac60){_0x43194e=_0x43194e-0x7a;let _0x1f571d=_0x164110[_0x43194e];return _0x1f571d;},_0x4319(_0x11d632,_0x57d469);}function _0x1641(){const _0x26e586=['image-edit','5347vNfskA','imageSrc','ck-uploadcare-theme','675RyjNMC','5958810qVVGfl','2637006snowHj','setTemplate','839272qwFfJj','74UEORCn','bindTemplate','881886kuywXy','uc-light','2797776hYhCSt','uc-cloud-image-editor','9188kiCHYX','set'];_0x1641=function(){return _0x26e586;};return _0x1641();}(function(_0x42e417,_0x51d01e){const _0x2a8baf=_0x4319,_0x343a18=_0x42e417();while(!![]){try{const _0x55d13f=parseInt(_0x2a8baf(0x7a))/0x1*(parseInt(_0x2a8baf(0x82))/0x2)+-parseInt(_0x2a8baf(0x84))/0x3+parseInt(_0x2a8baf(0x88))/0x4*(parseInt(_0x2a8baf(0x7d))/0x5)+parseInt(_0x2a8baf(0x7f))/0x6+-parseInt(_0x2a8baf(0x81))/0x7+parseInt(_0x2a8baf(0x86))/0x8+-parseInt(_0x2a8baf(0x7e))/0x9;if(_0x55d13f===_0x51d01e)break;else _0x343a18['push'](_0x343a18['shift']());}catch(_0x461b8b){_0x343a18['push'](_0x343a18['shift']());}}}(_0x1641,0x36019));import{View as _0x58aaa3}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x58aaa3{constructor(_0x498eac,_0x14dc0f){const _0x2eb910=_0x4319;super(_0x498eac);const _0xe0f51f=this[_0x2eb910(0x83)];this[_0x2eb910(0x89)](_0x2eb910(0x7b),''),this[_0x2eb910(0x80)]({'tag':_0x2eb910(0x87),'attributes':{..._0x14dc0f,'class':[_0x2eb910(0x85),_0x2eb910(0x7c)],'ctx-name':_0x2eb910(0x8a),'cdn-url':_0xe0f51f['to'](_0x2eb910(0x7b))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x530dbd}from'ckeditor5/src/icons.js';import{ButtonView as _0x552487,IconView as _0x13655c,View as _0x2a1fed}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x2a1fed{constructor(_0x21d074){super(_0x21d074);const t=_0x21d074['t'];this['set']('errorType',null);const _0xe80346=new _0x552487(_0x21d074);_0xe80346['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xe80346['withText']=!0x0,_0xe80346['class']='ck-button-action',_0xe80346['on']('execute',()=>{this['fire']('retry');}),_0xe80346['bind']('isVisible')['to'](this,'errorType',_0x453101=>'NotFound'!==_0x453101);const _0x58c050=new _0x13655c();_0x58c050['content']=_0x530dbd,_0x58c050['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3e2505=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':[_0x58c050,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3e2505['to']('errorType',_0xf6ee71=>t('NotFound'!==_0xf6ee71?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xe80346]},{'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'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{SpinnerView as
|
|
23
|
+
import{SpinnerView as _0x36d08a,View as _0x1b8874}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormLoadingView extends _0x1b8874{constructor(_0x125f8d){super(_0x125f8d);const t=_0x125f8d['t'],_0x183763=this['bindTemplate'],_0x4b4d08=new _0x36d08a();_0x4b4d08['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':[_0x4b4d08,{'text':_0x183763['to']('imageUploadProgress',_0xc52271=>t('Loading\x20image...')+'\x20('+(_0xc52271||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'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x54d89a=_0x731c;(function(_0xb840b8,_0x1a5efc){const _0x2c060a=_0x731c,_0x1fa10f=_0xb840b8();while(!![]){try{const _0x5c4b40=parseInt(_0x2c060a(0xba))/0x1+-parseInt(_0x2c060a(0xd1))/0x2+-parseInt(_0x2c060a(0xcd))/0x3*(-parseInt(_0x2c060a(0xdd))/0x4)+-parseInt(_0x2c060a(0xb4))/0x5*(parseInt(_0x2c060a(0xb3))/0x6)+parseInt(_0x2c060a(0xd3))/0x7+parseInt(_0x2c060a(0xdc))/0x8*(parseInt(_0x2c060a(0xb5))/0x9)+parseInt(_0x2c060a(0xde))/0xa*(parseInt(_0x2c060a(0xb1))/0xb);if(_0x5c4b40===_0x1a5efc)break;else _0x1fa10f['push'](_0x1fa10f['shift']());}catch(_0x6f1a74){_0x1fa10f['push'](_0x1fa10f['shift']());}}}(_0x3486,0xbaa47));import{View as _0x511b7a}from'ckeditor5/src/ui.js';function _0x731c(_0x5d0507,_0x3347df){const _0x34869e=_0x3486();return _0x731c=function(_0x731c3c,_0x7df12b){_0x731c3c=_0x731c3c-0xaf;let _0x3ad74c=_0x34869e[_0x731c3c];return _0x3ad74c;},_0x731c(_0x5d0507,_0x3347df);}function _0x3486(){const _0xa6d97e=['add','status','filter','div','60152PtTGgw','1532812ZlwgLw','40nXIqER','_focusableView','observe','addEventListener','error','length','focus','retry','_waitForImageEditorComponent','_editingView','ck-reset_all-excluded','2104058KSkjei','uploading','3845046VEtzkY','10bInvqL','99FgHgUW','_errorView','ck-uploadcare-form','_addErrorViewListeners','ready','157055SrRBno','change:status','createCollection','cdnUrl','clear','getFocusableElement','_setView','addedNodes','uc-cloud-image-editor','setTemplate','_addUploadcareImageEditorListeners','nodeName','once','render','element','_loadingView','set','disconnect','cancel','9etKoAW','apply','querySelector','fire','535462eIRXol','detail','1115905RTKvsh','addMany','toLowerCase','target','_items'];_0x3486=function(){return _0xa6d97e;};return _0x3486();}import{UploadcareImageEditFormLoadingView as _0x28d9b7}from'./uploadcareimageeditformloadingview.js';import{UploadcareImageEditFormErrorView as _0x1eafb5}from'./uploadcareimageeditformerrorview.js';import{UploadcareImageEditFormEditingView as _0x27575c}from'./uploadcareimageeditformeditingview.js';import{DialogFocusManagerView as _0x394b82}from'../../utils/dialogfocusmanagerview.js';import'../../../theme/uploadcare-form.css';export class UploadcareImageEditFormView extends _0x394b82{[_0x54d89a(0xd7)];[_0x54d89a(0xc9)];[_0x54d89a(0xb6)];[_0x54d89a(0xaf)];[_0x54d89a(0xdf)];constructor(_0x1ff2fc,_0x43c5ff,_0x1e402b){const _0x563773=_0x54d89a;super(_0x1ff2fc),this[_0x563773(0xd7)]=this[_0x563773(0xbc)](),this[_0x563773(0xc9)]=new _0x28d9b7(_0x1ff2fc),this[_0x563773(0xb6)]=new _0x1eafb5(_0x1ff2fc),this[_0x563773(0xaf)]=new _0x27575c(_0x1ff2fc,_0x1e402b),this[_0x563773(0xdf)]=new _0x511b7a(_0x1ff2fc),this[_0x563773(0xdf)][_0x563773(0xc3)](this[_0x563773(0xbf)]()),this[_0x563773(0xca)](_0x563773(0xd9),_0x43c5ff),this[_0x563773(0xc3)]({'tag':_0x563773(0xdb),'attributes':{'class':['ck',_0x563773(0xb0),_0x563773(0xb7)],'tabindex':'-1'},'children':this[_0x563773(0xd7)]}),this[_0x563773(0xc0)](),this[_0x563773(0xc6)](_0x563773(0xc7),()=>{const _0x59e2d5=_0x563773;this[_0x59e2d5(0xe6)](this[_0x59e2d5(0xc8)],_0x1a39aa=>{const _0xd2e57b=_0x59e2d5;this[_0xd2e57b(0xc4)](_0x1a39aa);});}),this['on'](_0x563773(0xbb),()=>{const _0x2101cc=_0x563773;this[_0x2101cc(0xc0)]();}),this[_0x563773(0xb8)]();}[_0x54d89a(0xe4)](){const _0x394ca4=_0x54d89a;this[_0x394ca4(0xc8)][_0x394ca4(0xe4)]();}[_0x54d89a(0xc0)](){const _0x2c490e=_0x54d89a;switch(this[_0x2c490e(0xd7)][_0x2c490e(0xbe)](),this[_0x2c490e(0xd9)]){case _0x2c490e(0xb2):this[_0x2c490e(0xd7)][_0x2c490e(0xd8)](this[_0x2c490e(0xc9)]);break;case _0x2c490e(0xe2):this[_0x2c490e(0xd7)][_0x2c490e(0xd8)](this[_0x2c490e(0xb6)]);break;case _0x2c490e(0xb9):this[_0x2c490e(0xd7)][_0x2c490e(0xd4)]([this[_0x2c490e(0xaf)],this[_0x2c490e(0xdf)]]);}}[_0x54d89a(0xe6)](_0x2a9893,_0x5ec3a3){const _0xaafa44=_0x54d89a,_0x3a12e=_0xaafa44(0xc2),_0x49ba54=_0x2a9893[_0xaafa44(0xcf)](_0x3a12e);if(_0x49ba54)return _0x5ec3a3(_0x49ba54);const _0x431c6f=new MutationObserver(_0x4f8064=>{const _0x546820=_0xaafa44,_0x47ac46=_0x4f8064[_0x546820(0xda)](_0x3c4777=>_0x3c4777[_0x546820(0xd6)]===_0x2a9893&&_0x3c4777[_0x546820(0xc1)][_0x546820(0xe3)]>0x0&&_0x3c4777[_0x546820(0xc1)][0x0][_0x546820(0xc5)][_0x546820(0xd5)]()===_0x3a12e);_0x47ac46[_0x546820(0xe3)]&&(_0x431c6f[_0x546820(0xcb)](),_0x5ec3a3(_0x47ac46[0x0][_0x546820(0xc1)][0x0]));});_0x431c6f[_0xaafa44(0xe0)](_0x2a9893,{'childList':!0x0,'subtree':!0x0});}[_0x54d89a(0xc4)](_0x50e66e){const _0x59acca=_0x54d89a;_0x50e66e[_0x59acca(0xe1)](_0x59acca(0xce),_0xbdfa2a=>{const _0x11fde9=_0x59acca;this[_0x11fde9(0xd0)](_0x11fde9(0xce),{'imageSrc':_0xbdfa2a[_0x11fde9(0xd2)][_0x11fde9(0xbd)]});}),_0x50e66e[_0x59acca(0xe1)](_0x59acca(0xcc),()=>{const _0x434b7e=_0x59acca;this[_0x434b7e(0xd0)](_0x434b7e(0xcc));});}[_0x54d89a(0xb8)](){const _0x3804ba=_0x54d89a;this[_0x3804ba(0xb6)]['on'](_0x3804ba(0xe5),()=>{const _0xd3ecd=_0x3804ba;this[_0xd3ecd(0xd0)](_0xd3ecd(0xe5));});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function _0x121f(_0x51a6a0,_0x3eacec){const _0x3efb57=_0x3efb();return _0x121f=function(_0x121f30,_0x33fcf7){_0x121f30=_0x121f30-0x1b5;let _0x1ec8c2=_0x3efb57[_0x121f30];return _0x1ec8c2;},_0x121f(_0x51a6a0,_0x3eacec);}const _0x261235=_0x121f;function _0x3efb(){const _0x583f0b=['uploadcare.allowExternalImagesEditing','set','3lDZTEW','model','isActive','get','7259682sUETLa','2782424RRdHho','editor','requires','isEnabled','_isEditable','3141222nbWTKr','document','1chPTbA','5784364FJYrrD','540338owOEtV','execute','imageInline','imageEditController','unbind','config','refresh','selection','24555429cRzWWB','2354525AdzbWr','getSelectedElement','bind','element','plugins','imageBlock'];_0x3efb=function(){return _0x583f0b;};return _0x3efb();}(function(_0x3e865e,_0x2b4a66){const _0x1a2dac=_0x121f,_0x2fbff7=_0x3e865e();while(!![]){try{const _0x3a87b0=parseInt(_0x1a2dac(0x1c2))/0x1*(parseInt(_0x1a2dac(0x1c4))/0x2)+-parseInt(_0x1a2dac(0x1b6))/0x3*(-parseInt(_0x1a2dac(0x1c3))/0x4)+parseInt(_0x1a2dac(0x1cd))/0x5+parseInt(_0x1a2dac(0x1ba))/0x6+parseInt(_0x1a2dac(0x1c0))/0x7+-parseInt(_0x1a2dac(0x1bb))/0x8+-parseInt(_0x1a2dac(0x1cc))/0x9;if(_0x3a87b0===_0x2b4a66)break;else _0x2fbff7['push'](_0x2fbff7['shift']());}catch(_0x39e6b9){_0x2fbff7['push'](_0x2fbff7['shift']());}}}(_0x3efb,0xbbe8a));import{Command as _0x31d3b8}from'ckeditor5/src/core.js';import{Dialog as _0xe2083e}from'ckeditor5/src/ui.js';import{UploadcareImageEditController as _0x40f12d}from'./ui/uploadcareimageeditcontroller.js';import{createEditabilityChecker as _0x2416d8}from'../utils/editingutils.js';export class UploadcareImageEditCommand extends _0x31d3b8{[_0x261235(0x1c7)];static get[_0x261235(0x1bd)](){return[_0xe2083e];}[_0x261235(0x1bf)];constructor(_0xb7e0b9){const _0x2058b4=_0x261235;super(_0xb7e0b9),this[_0x2058b4(0x1c7)]=void 0x0,this[_0x2058b4(0x1bf)]=_0x2416d8(_0xb7e0b9[_0x2058b4(0x1c9)][_0x2058b4(0x1b9)](_0x2058b4(0x1d3))||[]),this[_0x2058b4(0x1b5)]({'isActive':!0x1});}[_0x261235(0x1ca)](){const _0x384c78=_0x261235,_0x1252bb=this[_0x384c78(0x1bc)][_0x384c78(0x1b7)][_0x384c78(0x1c1)][_0x384c78(0x1cb)][_0x384c78(0x1ce)]();this[_0x384c78(0x1be)]=this[_0x384c78(0x1bf)](_0x1252bb);}[_0x261235(0x1c5)](){const _0x222ba5=_0x261235;this[_0x222ba5(0x1c7)]&&(this[_0x222ba5(0x1c8)](_0x222ba5(0x1b8)),this[_0x222ba5(0x1c7)]=void 0x0);const _0x2175d8=this[_0x222ba5(0x1bc)][_0x222ba5(0x1b7)][_0x222ba5(0x1c1)][_0x222ba5(0x1cb)][_0x222ba5(0x1ce)]();_0x2175d8&&(_0x2175d8['is'](_0x222ba5(0x1d0),_0x222ba5(0x1d2))||_0x2175d8['is'](_0x222ba5(0x1d0),_0x222ba5(0x1c6)))&&(this[_0x222ba5(0x1c7)]=new _0x40f12d(this[_0x222ba5(0x1bc)],this[_0x222ba5(0x1bc)][_0x222ba5(0x1d1)][_0x222ba5(0x1b9)](_0xe2083e),_0x2175d8),this[_0x222ba5(0x1cf)](_0x222ba5(0x1b8))['to'](this[_0x222ba5(0x1c7)],_0x222ba5(0x1b8)));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x18f271=_0x2503;(function(_0xc8e5e2,_0x474bfa){const _0x52857d=_0x2503,_0x13decf=_0xc8e5e2();while(!![]){try{const _0x450739=parseInt(_0x52857d(0xe8))/0x1+parseInt(_0x52857d(0xf7))/0x2*(-parseInt(_0x52857d(0xf5))/0x3)+parseInt(_0x52857d(0xe9))/0x4+parseInt(_0x52857d(0xf3))/0x5+parseInt(_0x52857d(0xe3))/0x6+-parseInt(_0x52857d(0xe4))/0x7+parseInt(_0x52857d(0xef))/0x8*(-parseInt(_0x52857d(0xe6))/0x9);if(_0x450739===_0x474bfa)break;else _0x13decf['push'](_0x13decf['shift']());}catch(_0x1c7f00){_0x13decf['push'](_0x13decf['shift']());}}}(_0x30d4,0x864ac));import{Plugin as _0x495cf3}from'ckeditor5/src/core.js';import{Notification as _0x4ca72c}from'ckeditor5/src/ui.js';import{UploadcareImageEditCommand as _0x4c110d}from'./uploadcareimageeditcommand.js';import{UploadcareImageReplaceCommand as _0x36ebdd}from'./uploadcareimagereplacecommand.js';function _0x2503(_0x475fd8,_0x2b20ad){const _0x30d4eb=_0x30d4();return _0x2503=function(_0x250354,_0x14a021){_0x250354=_0x250354-0xe3;let _0x495a99=_0x30d4eb[_0x250354];return _0x495a99;},_0x2503(_0x475fd8,_0x2b20ad);}import{UploadcareEditing as _0x54a957}from'../uploadcareediting.js';export class UploadcareImageEditEditing extends _0x495cf3{static get[_0x18f271(0xf1)](){const _0x5c7013=_0x18f271;return _0x5c7013(0xf2);}static get[_0x18f271(0xee)](){const _0x289758=_0x18f271;return[_0x54a957,_0x4ca72c,_0x289758(0xec),_0x289758(0xe7)];}static get[_0x18f271(0xf0)](){return!0x0;}static get[_0x18f271(0xf6)](){return!0x0;}[_0x18f271(0xed)](){const _0x3b4a1a=_0x18f271,{editor:_0xc26dc9}=this;_0xc26dc9[_0x3b4a1a(0xeb)][_0x3b4a1a(0xea)](_0x3b4a1a(0xf4),new _0x4c110d(_0xc26dc9)),_0xc26dc9[_0x3b4a1a(0xeb)][_0x3b4a1a(0xea)](_0x3b4a1a(0xe5),new _0x36ebdd(_0xc26dc9));}}function _0x30d4(){const _0x805b08=['uploadcareImageEdit','133761plQNIe','isPremiumPlugin','4jMJqbU','810504RRlCiY','2561699LHBmkW','uploadcareImageReplace','109143LRuzzB','ImageEditing','664521nOdakx','1415376sNXuCl','add','commands','ImageUtils','init','requires','312LAUThW','isOfficialPlugin','pluginName','UploadcareImageEditEditing','1623475tcTRRf'];_0x30d4=function(){return _0x805b08;};return _0x30d4();}
|