@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251020.0 → 0.0.0-nightly-20251021.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x159463,Command as _0x2fd80b}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4cf387,IconGooglePhotos as _0x18729b,IconGoogleDrive as _0x2e07e9,IconFacebook as _0x11670e,IconDropbox as _0x32de3f,IconUploadcareLink as _0x27186a,IconUploadcareImageUpload as _0x4aecb6,IconError as _0x5349d9,IconUploadcareImageEdit as _0x45f58d}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xd996ec,MenuBarMenuListItemButtonView as _0x1d6cdd,View as _0x4ab4cf,FocusCycler as _0x1357ec,Dialog as _0x4d5e13,DialogViewPosition as _0x276675,SpinnerView as _0x72792d,IconView as _0x348336,Notification as _0x3d897b}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x5c9522,DomEmitterMixin as _0x4dc9d0,global as _0x8c5385,getAncestors as _0x3b8d11,ObservableMixin as _0x4f966e,uid as _0x2f8a51,createElement as _0x1386b0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2b3678}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2b1e13,info as _0x3bd0ac}from'@uploadcare/upload-client';import*as _0x34addb from'@uploadcare/file-uploader';var i=function(_0x5e5793){return _0x5e5793['Local']='local',_0x5e5793['URL']='url',_0x5e5793['Dropbox']='dropbox',_0x5e5793['GDrive']='gdrive',_0x5e5793['Facebook']='facebook',_0x5e5793['GPhotos']='gphotos',_0x5e5793['OneDrive']='onedrive',_0x5e5793;}({});function _(_0x47855d,_0x1b6ea5,_0x279f60){const t=_0x47855d['t'],_0xcddbe4=_0x47855d['t'];switch(_0x1b6ea5){case i['Local']:return{'text':_0xcddbe4('Insert'===_0x279f60?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0xcddbe4('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x279f60?_0xcddbe4('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0xcddbe4('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x279f60?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x279f60?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x279f60?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x279f60?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x279f60?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x1b6ea5;}}class e extends _0x159463{['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 _0x1b2bac=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x230150;for(const _0x5d2267 in _0x1b2bac){const _0x4322ba=_0x5d2267,_0x260147=_0x1b2bac[_0x4322ba];if('uploadcareLicenseKeyValid'==_0x260147||'uploadcareLicenseKeyInvalid'==_0x260147||'uploadcareLicenseKeyExpired'==_0x260147||'uploadcareLicenseKeyDomainLimit'==_0x260147||'uploadcareLicenseKeyNotAllowed'==_0x260147||'uploadcareLicenseKeyEvaluationLimit'==_0x260147||'uploadcareLicenseKeyTrialLimit'==_0x260147||'uploadcareLicenseKeyUsageLimit'==_0x260147){delete _0x1b2bac[_0x4322ba],_0x230150=_0x260147,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x230150&&_0x1b2bac['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x230150&&_0x1b2bac['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x230150&&_0x1b2bac['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x230150&&_0x1b2bac['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x230150&&_0x1b2bac['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x230150&&_0x1b2bac['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x230150&&_0x1b2bac['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x1cbf18}=this,_0x36e2a8=_0x1cbf18['commands']['get']('uploadcare');if(!_0x36e2a8)return;const _0x3ed878=this['_normalizeConfigSourceList'](_0x1cbf18['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x5bc074,_0x53c1b2)=>{const _0x1177f5=this['_getIntegrationKey'](_0x53c1b2['type']);return _0x5bc074[_0x1177f5]||(_0x5bc074[_0x1177f5]=[]),_0x5bc074[_0x1177f5]['push'](_0x53c1b2),_0x5bc074;},{});_0x1cbf18['plugins']['has']('ImageInsertUI')&&_0x1cbf18['commands']['get']('uploadcare')&&Object['entries'](_0x3ed878)['forEach'](([_0x2682f9,_0x5d5652])=>{_0x1cbf18['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x2682f9,'observable':()=>_0x36e2a8,'buttonViewCreator':()=>this['_createToolbarButton'](_0x5d5652),'formViewCreator':()=>this['_createDropdownButtons'](_0x5d5652),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x5d5652),'override':'assetManager'!==_0x2682f9});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x485710){const {locale:_0x35fe36}=this['editor'];return _0x485710['map'](_0x5644ca=>{const _0x59465c=_(_0x35fe36,_0x5644ca,'Insert');switch(_0x5644ca){case i['Local']:return{'icon':_0x4aecb6,'type':i['Local'],..._0x59465c};case i['URL']:return{'icon':_0x27186a,'type':i['URL'],..._0x59465c};case i['Dropbox']:return{'icon':_0x32de3f,'type':i['Dropbox'],..._0x59465c};case i['Facebook']:return{'icon':_0x11670e,'type':i['Facebook'],..._0x59465c};case i['GDrive']:return{'icon':_0x2e07e9,'type':i['GDrive'],..._0x59465c};case i['GPhotos']:return{'icon':_0x18729b,'type':i['GPhotos'],..._0x59465c};case i['OneDrive']:return{'icon':_0x4cf387,'type':i['OneDrive'],..._0x59465c};}});}['_getIntegrationKey'](_0x45959b){switch(_0x45959b){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x30d125,_0x1a96e8){const _0xdc0d96=this['editor'],_0x164b4c=new _0x30d125(_0xdc0d96['locale']),_0x469bfa=_0xdc0d96['commands']['get']('uploadcare');return _0x164b4c['bind']('isEnabled')['to'](_0x469bfa),_0x164b4c['on']('execute',()=>{_0x469bfa['execute'](_0x1a96e8);}),_0x164b4c;}['_createToolbarButton'](_0x3220f1){const {locale:_0x289c1f}=this['editor'],_0x8dcfe0=this['editor']['plugins']['get']('ImageInsertUI'),_0x11f449=_0x3220f1[0x0],_0x3eb177=this['_createButton'](_0xd996ec,_0x11f449['type']);return _0x3eb177['icon']=_0x11f449['icon'],_0x3eb177['bind']('label')['to'](_0x8dcfe0,'isImageSelected',_0x45fbfa=>_(_0x289c1f,_0x11f449['type'],_0x45fbfa?'Replace':'Insert')['text']),_0x3eb177['tooltip']=!0x0,_0x3eb177;}['_createDropdownButtons'](_0x42745c){const {locale:_0xddc6cc}=this['editor'],_0x478fdd=this['editor']['plugins']['get']('ImageInsertUI');return _0x42745c['map'](_0x2d80f9=>{const _0x51473d=this['_createButton'](_0xd996ec,_0x2d80f9['type']);return _0x51473d['withText']=!0x0,_0x51473d['icon']=_0x2d80f9['icon'],_0x51473d['bind']('label')['to'](_0x478fdd,'isImageSelected',_0x27f581=>_(_0xddc6cc,_0x2d80f9['type'],_0x27f581?'Replace':'Insert')['text']),_0x51473d;});}['_createMenuBarButtons'](_0x32b416){return _0x32b416['map'](_0x5c7fd3=>{const _0x25b3a0=this['_createButton'](_0x1d6cdd,_0x5c7fd3['type']);return _0x25b3a0['icon']=_0x5c7fd3['icon'],_0x25b3a0['label']=_0x5c7fd3['shortText'],_0x25b3a0;});}}class F extends _0x4ab4cf{['focusTracker'];['focusCycler'];constructor(_0x3140df){super(_0x3140df),this['focusTracker']=new _0x5c9522(),this['focusCycler']=new _0x1357ec({'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(_0x27a563,_0x3f398a){super(_0x27a563),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-'+_0x3f398a}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x35edf7,_0x5ab29c){const _0x256b9e=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x399eee=>_0x399eee<=_0x5ab29c)['map'](_0xeff32b=>_0x35edf7['replace'](/\/$/,'')+'/-/resize/'+_0xeff32b+'x/\x20'+_0xeff32b+'w');return{'imageFallbackUrl':_0x35edf7,'imageSources':[{'srcset':_0x256b9e['join'](',\x20'),'sizes':'(max-width:\x20'+_0x5ab29c+'px)\x20100vw,\x20'+_0x5ab29c+'px','type':'image/webp'}]};}function S(_0x31f9b6,_0x33cae8,_0x34955a){const _0x1a5df9=_0x31f9b6['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1a5df9?parseInt(_0x1a5df9[0x1],0xa):_0x33cae8,'height':_0x1a5df9?parseInt(_0x1a5df9[0x2],0xa):_0x34955a};}function p(_0x1f7757,_0x341eb7){const _0xf85604=new(_0x4dc9d0())(),_0x57ad77=_0x1f7757['plugins']['get']('ImageUtils'),_0x284dcc=_0x1f7757['editing']['mapper']['toViewElement'](_0x341eb7),_0x17c8ac=_0x57ad77['findViewImgElement'](_0x284dcc),_0x311bd6=_0x1f7757['editing']['view']['domConverter']['viewToDom'](_0x17c8ac),_0x2e9f54=_0x341eb7['getAttribute']('width'),_0x42045f=_0x341eb7['getAttribute']('height'),_0x438294='image-processing';_0x1f7757['editing']['view']['change'](_0x193d64=>{_0x193d64['addClass'](_0x438294,_0x284dcc),_0x193d64['setStyle']('aspect-ratio',_0x2e9f54+'/'+_0x42045f,_0x17c8ac);}),_0xf85604['listenTo'](_0x311bd6,'load',()=>{_0xf85604['stopListening'](_0x311bd6,'load'),_0x1f7757['editing']['view']['change'](_0x560c0b=>{_0x560c0b['removeClass'](_0x438294,_0x284dcc),_0x560c0b['removeStyle']('aspect-ratio',_0x17c8ac);});});}function z(_0x17cc28){if(Array['isArray'](_0x17cc28)){const _0x2d4b31=_0x17cc28['map'](z);return _0x1c362e=>_0x2d4b31['some'](_0x25857e=>_0x25857e(_0x1c362e));}if('origin'==_0x17cc28){const _0x4ff972=_0x8c5385['window']['location']['origin'];return _0x5736a7=>new URL(_0x5736a7,_0x8c5385['document']['baseURI'])['origin']==_0x4ff972;}return'function'==typeof _0x17cc28?_0x17cc28:_0x17cc28 instanceof RegExp?_0x33d391=>!(!_0x33d391['match'](_0x17cc28)&&!_0x33d391['replace'](/^https?:\/\//,'')['match'](_0x17cc28)):()=>!0x1;}function A(_0xd0db0d,_0x583f5e){return _0x3b8d11(_0xd0db0d['target'])['includes'](_0x583f5e);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x4f966e(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x559f45,_0x4f5fce,_0x5c62ab){super(),this['_editor']=_0x559f45,this['_editing']=_0x4f5fce,this['_dialog']=_0x559f45['plugins']['get'](_0x4d5e13),this['_api']=_0x4f5fce['ctxElement']['getAPI'](),this['_type']=_0x5c62ab,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:_0xfb7aa2,model:_0x11b96a}=this['_editor'],_0x4d39f8=_0x11b96a['document']['selection']['getSelectedElement'](),_0x4a8812=_0x4d39f8&&(_0x4d39f8['is']('element','imageBlock')||_0x4d39f8['is']('element','imageInline'));this['_formView']=new x(_0xfb7aa2,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4aecb6,'title':_(_0xfb7aa2,this['_type'],_0x4a8812?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x276675['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x31af3c=>!A(_0x31af3c,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x17e140}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x58bcf4=>{const _0x2aaceb=_0x17e140['length'];for(const _0x2546d0 of _0x17e140){const _0x4d38ef=_0x2546d0===_0x17e140[_0x2aaceb-0x1],{cdnUrl:_0x36b447,fileInfo:_0x287988}=_0x2546d0;if(!_0x36b447||!_0x287988)continue;const {width:_0xa3e912,height:_0x1e8059}=_0x287988['imageInfo'],_0xdd1289=S(_0x36b447,_0xa3e912,_0x1e8059),_0x57f323=C(_0x36b447,_0xdd1289['width']),_0x93a79d={'id':_0x287988['uuid'],'type':'image','attributes':{'imageDimension':_0xdd1289,..._0x57f323}};this['_insertAsset'](_0x93a79d,_0x4d38ef,_0x58bcf4);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x512205=>{'idle'===_0x512205['detail']['status']&&!_0x512205['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0xf85c93,_0x446058,_0x5dc5e5){const _0x2cacd8=this['_editor']['model']['document']['selection'],_0x24a6ac=_0x2cacd8['getSelectedElement'](),_0x2d499c=!(!_0x24a6ac||!_0x24a6ac['is']('element','imageInline'));_0x5dc5e5['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0xf85c93,_0x2d499c),_0x446058||_0x5dc5e5['setSelection'](_0x2cacd8['getLastPosition']());}['_insertImage'](_0x357fda,_0x546b66){const _0x4e2a8f=this['_editor'],{imageDimension:_0x53f0eb,imageFallbackUrl:_0x104454,imageSources:_0x18670f}=_0x357fda['attributes'];_0x4e2a8f['execute']('insertImage',{'imageType':_0x546b66?'imageInline':null,'source':{'uploadcareImageId':_0x357fda['id'],'src':_0x104454,'sources':_0x18670f,..._0x53f0eb}});}}class w extends _0x2fd80b{['_editing'];['_controller']=null;static get['requires'](){return[_0x4d5e13,o];}constructor(_0x38ebe9){super(_0x38ebe9),this['_editing']=_0x38ebe9['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3f039e){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x3f039e);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x3d5558,..._0x5170b1}){return _0x2b1e13(_0x3d5558,_0x5170b1);}static['getInfo'](_0x4cc571,_0x19d69a){return _0x3bd0ac(_0x4cc571,_0x19d69a);}}class f extends _0x159463{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2b3678,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x407b6d=this['editor'];if(!!!_0x407b6d['config']['get']('uploadcare'))return;_0x407b6d['plugins']['get'](_0x2b3678)['createUploadAdapter']=_0xfd6f79=>new k(_0xfd6f79,_0x407b6d),_0x407b6d['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x2d40c0,{imageElement:_0x1d0e1f,data:_0x1073ce})=>{_0x407b6d['model']['change'](_0x3de6df=>{_0x3de6df['setAttribute']('uploadcareImageId',_0x1073ce['uploadcareImageId'],_0x1d0e1f);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x4eda2d,_0x3f4394){this['loader']=_0x4eda2d,this['editor']=_0x3f4394,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x3723d5=await this['loader']['file'];return j['upload']({'file':_0x3723d5,'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':_0x2c6421=>{_0x2c6421&&_0x2c6421['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x2c6421['value']);}})['then'](async _0x4a70bb=>{const {imageFallbackUrl:_0x37fcc5,imageSources:_0x9615f}=C(_0x4a70bb['cdnUrl'],_0x4a70bb['imageInfo']['width']);return{'uploadcareImageId':_0x4a70bb['uuid'],'default':_0x37fcc5,'sources':_0x9615f};})['catch'](()=>{const _0x440e2c=t('Cannot\x20upload\x20file:')+('\x20'+_0x3723d5['name']+'.');return Promise['reject'](_0x440e2c);});}['abort'](){this['controller']['abort']();}}class o extends _0x159463{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x4d5e13];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x2211d7){super(_0x2211d7),this['ucContextId']=_0x2f8a51();}['init'](){const _0x4dfc42=this['editor'];_0x4dfc42['commands']['add']('uploadcare',new w(_0x4dfc42));}['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 _0x34cc6a=_0x8c5385['document']['querySelector']('input[uploadcare-file-input]');_0x34cc6a&&_0x34cc6a['remove']();}),async function(_0x7b7ade){const _0x1c5d9e=_0x175bda([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x4ed95e=0x535f8c3a,_0x4fd495=0x5358fa82^_0x4ed95e,_0x5e3fcd=window[_0x175bda([0x44,0x61,0x74,0x65])][_0x175bda([0x6e,0x6f,0x77])](),_0x1ec7d5=_0x7b7ade[_0x175bda([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1cb4ba=new window[(_0x175bda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x422c66=>{_0x1ec7d5[_0x175bda([0x6f,0x6e,0x63,0x65])](_0x175bda([0x72,0x65,0x61,0x64,0x79]),_0x422c66);}),_0x24a252={[_0x175bda([0x6b,0x74,0x79])]:_0x175bda([0x45,0x43]),[_0x175bda([0x75,0x73,0x65])]:_0x175bda([0x73,0x69,0x67]),[_0x175bda([0x63,0x72,0x76])]:_0x175bda([0x50,0x2d,0x32,0x35,0x36]),[_0x175bda([0x78])]:_0x175bda([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]),[_0x175bda([0x79])]:_0x175bda([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]),[_0x175bda([0x61,0x6c,0x67])]:_0x175bda([0x45,0x53,0x32,0x35,0x36])},_0x32839f=_0x1ec7d5[_0x175bda([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x175bda([0x67,0x65,0x74])](_0x175bda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1f8b63(){let _0x22a84b,_0x2e9653=null,_0xd74c3d=null;try{if(_0x32839f==_0x175bda([0x47,0x50,0x4c]))return _0x175bda([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x22a84b=_0x54cce2(),!_0x22a84b)return _0x175bda([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x22a84b[_0x175bda([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xd74c3d=_0x47d9d8(_0x22a84b[_0x175bda([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x22a84b[_0x175bda([0x6a,0x74,0x69])])),await _0x3c2417()?_0x90b400()?_0x49ce87()?_0x175bda([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x30cffb()?(_0x22a84b[_0x175bda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x175bda([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e9653=_0x2b24ad(_0x175bda([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x22a84b[_0x175bda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x175bda([0x74,0x72,0x69,0x61,0x6c])&&(_0x2e9653=_0x2b24ad(_0x175bda([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2d7452()):_0x175bda([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x175bda([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x175bda([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x175bda([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x49ce87(){const _0x51402f=[_0x175bda([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x175bda([0x74,0x72,0x69,0x61,0x6c])][_0x175bda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22a84b[_0x175bda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5e3fcd/0x3e8:0xe10*_0x4fd495;return _0x22a84b[_0x175bda([0x65,0x78,0x70])]<_0x51402f;}function _0x90b400(){const _0x920629=_0x22a84b[_0x175bda([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x920629&&(!!_0x920629[_0x175bda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x175bda([0x2a]))||!!_0x920629[_0x175bda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x175bda([0x55,0x50,0x4c,0x43])));}function _0x30cffb(){const _0x5eace7=_0x22a84b[_0x175bda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5eace7||0x0==_0x5eace7[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4882d1}=new URL(window[_0x175bda([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5eace7[_0x175bda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4882d1))return!0x0;const _0x47e785=_0x4882d1[_0x175bda([0x73,0x70,0x6c,0x69,0x74])](_0x175bda([0x2e]));return _0x5eace7[_0x175bda([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x58ec87=>_0x58ec87[_0x175bda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x175bda([0x2a])))[_0x175bda([0x6d,0x61,0x70])](_0x4d0541=>_0x4d0541[_0x175bda([0x73,0x70,0x6c,0x69,0x74])](_0x175bda([0x2e])))[_0x175bda([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a2e7b=>_0x1a2e7b[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x47e785[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x175bda([0x6d,0x61,0x70])](_0x182277=>Array(_0x47e785[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x182277[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x175bda([0x66,0x69,0x6c,0x6c])](_0x182277[0x0]===_0x175bda([0x2a])?_0x175bda([0x2a]):'')[_0x175bda([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x182277))[_0x175bda([0x73,0x6f,0x6d,0x65])](_0x311f5a=>_0x47e785[_0x175bda([0x65,0x76,0x65,0x72,0x79])]((_0x3823d7,_0x7d16de)=>_0x311f5a[_0x7d16de]===_0x3823d7||_0x311f5a[_0x7d16de]===_0x175bda([0x2a])));}function _0x2d7452(){return _0x2e9653&&_0xd74c3d?new window[(_0x175bda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x245b12,_0x4ee64a)=>{_0x2e9653[_0x175bda([0x74,0x68,0x65,0x6e])](_0x245b12,_0x4ee64a),_0xd74c3d[_0x175bda([0x74,0x68,0x65,0x6e])](_0xec2f9e=>{_0xec2f9e!=_0x175bda([0x56,0x61,0x6c,0x69,0x64])&&_0x245b12(_0xec2f9e);},_0x4ee64a);}):_0x2e9653||_0xd74c3d||_0x175bda([0x56,0x61,0x6c,0x69,0x64]);}}function _0x47d9d8(_0x302e21,_0x29afdf){return new window[(_0x175bda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9b145f=>{if(_0x193455())return _0x9b145f(_0x175bda([0x56,0x61,0x6c,0x69,0x64]));_0x35c95f(),_0x1ec7d5[_0x175bda([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x175bda([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x26bece=!0x1;const _0x28f621=_0x2f8a51();function _0x44d18f(_0x3bfc03){return!!_0x3bfc03&&(typeof _0x3bfc03===_0x175bda([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3bfc03===_0x175bda([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3bfc03[_0x175bda([0x74,0x68,0x65,0x6e])]===_0x175bda([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3bfc03[_0x175bda([0x63,0x61,0x74,0x63,0x68])]===_0x175bda([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x14648a(_0x4c950e){_0x5b5c6a(_0x4c950e)[_0x175bda([0x74,0x68,0x65,0x6e])](_0x1ad421=>{if(!_0x1ad421||_0x1ad421[_0x175bda([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x175bda([0x6f,0x6b]))return _0x175bda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5718b4(_0x266ebb(_0x28f621+_0x29afdf))!=_0x1ad421[_0x175bda([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x175bda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x175bda([0x56,0x61,0x6c,0x69,0x64]);})[_0x175bda([0x74,0x68,0x65,0x6e])](_0x49f424=>(_0x238e32(),_0x49f424),()=>{const _0x5811af=_0x1f8552();return null==_0x5811af?(_0x238e32(),_0x175bda([0x56,0x61,0x6c,0x69,0x64])):_0x175bda(_0x5e3fcd-_0x5811af>(0x7753083a^_0x4ed95e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x175bda([0x74,0x68,0x65,0x6e])](_0x9b145f)[_0x175bda([0x63,0x61,0x74,0x63,0x68])](()=>{_0x9b145f(_0x175bda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x51375f=0x536962ba^_0x4ed95e;function _0x238e32(){const _0x39f6bc=_0x175bda([0x6c,0x6c,0x63,0x74,0x2d])+_0x5718b4(_0x266ebb(_0x302e21)),_0x34b0fa=_0x247945(_0x5718b4(window[_0x175bda([0x4d,0x61,0x74,0x68])][_0x175bda([0x63,0x65,0x69,0x6c])](_0x5e3fcd/_0x51375f)));window[_0x175bda([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x175bda([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x39f6bc,_0x34b0fa);}function _0x1f8552(){const _0x3f9b97=_0x175bda([0x6c,0x6c,0x63,0x74,0x2d])+_0x5718b4(_0x266ebb(_0x302e21)),_0x2d1ba0=window[_0x175bda([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x175bda([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f9b97);return _0x2d1ba0?window[_0x175bda([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x247945(_0x2d1ba0),0x10)*_0x51375f:null;}function _0x5b5c6a(_0x40e487){return new window[(_0x175bda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x41b0e7,_0x37cad4)=>{_0x40e487[_0x175bda([0x74,0x68,0x65,0x6e])](_0x41b0e7,_0x37cad4),window[_0x175bda([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x37cad4,0x535e58fa^_0x4ed95e);});}}_0x1ec7d5[_0x175bda([0x6f,0x6e])](_0x175bda([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x143662,_0x47506a)=>{if(_0x47506a[0x0]!=_0x302e21)return _0x9b145f(_0x175bda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x47506a[0x1]={..._0x47506a[0x1],[_0x175bda([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x28f621};},{[_0x175bda([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x175bda([0x68,0x69,0x67,0x68])}),_0x1ec7d5[_0x175bda([0x6f,0x6e])](_0x175bda([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x343ff8=>{_0x44d18f(_0x343ff8[_0x175bda([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x26bece=!0x0,_0x14648a(_0x343ff8[_0x175bda([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x175bda([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x175bda([0x6c,0x6f,0x77])}),_0x1cb4ba[_0x175bda([0x74,0x68,0x65,0x6e])](()=>{_0x26bece||_0x9b145f(_0x175bda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x193455(){return _0x1ec7d5[_0x175bda([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x175bda([0x76,0x69,0x65,0x77])][_0x175bda([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x175bda([0x61,0x75,0x74,0x6f]);}function _0x35c95f(){_0x1ec7d5[_0x175bda([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x175bda([0x76,0x69,0x65,0x77])][_0x175bda([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x175bda([0x61,0x75,0x74,0x6f]);}}function _0x2b24ad(_0x4e11c7){const _0x2354e2=[new window[(_0x175bda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c418c=>setTimeout(_0x1c418c,0x5356b2f6^_0x4ed95e)),_0x1cb4ba[_0x175bda([0x74,0x68,0x65,0x6e])](()=>new window[(_0x175bda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33b753=>{let _0x4f9c81=0x0;_0x1ec7d5[_0x175bda([0x6d,0x6f,0x64,0x65,0x6c])][_0x175bda([0x6f,0x6e])](_0x175bda([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1a240e,_0xd9ca1b)=>{_0xd9ca1b[0x0][_0x175bda([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4f9c81++,_0x4f9c81==(0x535f8dc2^_0x4ed95e)&&(_0x33b753(),_0x1a240e[_0x175bda([0x6f,0x66,0x66])]());});}))];return window[_0x175bda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x175bda([0x72,0x61,0x63,0x65])](_0x2354e2)[_0x175bda([0x74,0x68,0x65,0x6e])](()=>_0x4e11c7);}async function _0x3bc4cb(){await _0x1cb4ba,_0x1ec7d5[_0x175bda([0x6d,0x6f,0x64,0x65,0x6c])][_0x175bda([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4cbd80,_0x1ec7d5[_0x175bda([0x6d,0x6f,0x64,0x65,0x6c])][_0x175bda([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4cbd80,_0x1ec7d5[_0x175bda([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x175bda([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xcd45db(_0x48dbb1){const _0x285be0=_0x36f779();_0x1ec7d5[_0x285be0]=_0x175bda([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x48dbb1,_0x48dbb1!=_0x175bda([0x56,0x61,0x6c,0x69,0x64])&&_0x3bc4cb();}function _0x36f779(){const _0x36af1b=window[_0x175bda([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x175bda([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x175bda([0x6e,0x6f,0x77])]())[_0x175bda([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x175bda([0x2e]),'');let _0x1e26a4=_0x175bda([0x68]);for(let _0x2194cd=0x0;_0x2194cd<_0x36af1b[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2194cd+=0x2){let _0xf46709=window[_0x175bda([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36af1b[_0x175bda([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2194cd,_0x2194cd+0x2));_0xf46709>=_0x1c5d9e[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xf46709-=_0x1c5d9e[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1e26a4+=_0x1c5d9e[_0xf46709];}return _0x1e26a4;}function _0x54cce2(){const _0x4f31d8=_0x32839f[_0x175bda([0x73,0x70,0x6c,0x69,0x74])](_0x175bda([0x2e]));if(0x3!=_0x4f31d8[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3eeb29(_0x4f31d8[0x1]);function _0x3eeb29(_0x5e01b0){const _0x2ce749=_0x394d0c(_0x5e01b0);return _0x2ce749&&_0x4e58d6()?_0x2ce749:null;function _0x4e58d6(){const _0x271722=_0x2ce749[_0x175bda([0x6a,0x74,0x69])],_0x9d8614=window[_0x175bda([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x271722[_0x175bda([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x271722[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x29b6e8={..._0x2ce749,[_0x175bda([0x6a,0x74,0x69])]:_0x271722[_0x175bda([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x271722[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x29b6e8[_0x175bda([0x76,0x63])],_0x266ebb(_0x29b6e8)==_0x9d8614;}}}async function _0x3c2417(){let _0x17c733=!0x0;try{const _0x298491=_0x32839f[_0x175bda([0x73,0x70,0x6c,0x69,0x74])](_0x175bda([0x2e])),[_0x5cf828,_0x1892bf,_0x162e58]=_0x298491;return _0x385e0a(_0x5cf828),await _0x2b1228(_0x5cf828,_0x1892bf,_0x162e58),_0x17c733;}catch{return!0x1;}function _0x385e0a(_0x282188){const _0x2a4eba=_0x394d0c(_0x282188);_0x2a4eba&&_0x2a4eba[_0x175bda([0x61,0x6c,0x67])]==_0x175bda([0x45,0x53,0x32,0x35,0x36])||(_0x17c733=!0x1);}async function _0x2b1228(_0x3fa26b,_0x399ac6,_0x3b0564){const _0x1c921c=window[_0x175bda([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x175bda([0x66,0x72,0x6f,0x6d])](_0x24ee62(_0x3b0564),_0x1a7c43=>_0x1a7c43[_0x175bda([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xc7e824=new window[(_0x175bda([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x175bda([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3fa26b+_0x175bda([0x2e])+_0x399ac6),_0x37e84a=window[_0x175bda([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x175bda([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x37e84a)return;const _0x506cd2=await _0x37e84a[_0x175bda([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x175bda([0x6a,0x77,0x6b]),_0x24a252,{[_0x175bda([0x6e,0x61,0x6d,0x65])]:_0x175bda([0x45,0x43,0x44,0x53,0x41]),[_0x175bda([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x175bda([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x175bda([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x37e84a[_0x175bda([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x175bda([0x6e,0x61,0x6d,0x65])]:_0x175bda([0x45,0x43,0x44,0x53,0x41]),[_0x175bda([0x68,0x61,0x73,0x68])]:{[_0x175bda([0x6e,0x61,0x6d,0x65])]:_0x175bda([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x506cd2,_0x1c921c,_0xc7e824)||(_0x17c733=!0x1);}}function _0x394d0c(_0x4ea6af){return _0x4ea6af[_0x175bda([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x175bda([0x65,0x79]))?JSON[_0x175bda([0x70,0x61,0x72,0x73,0x65])](_0x24ee62(_0x4ea6af)):null;}function _0x24ee62(_0x1fe9a1){return window[_0x175bda([0x61,0x74,0x6f,0x62])](_0x1fe9a1[_0x175bda([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x175bda([0x2b]))[_0x175bda([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x175bda([0x2f])));}function _0x266ebb(_0x40c763){let _0x4a47d1=0x1505;function _0x58028b(_0x5835a4){for(let _0x3d371f=0x0;_0x3d371f<_0x5835a4[_0x175bda([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d371f++){const _0x1d808b=_0x5835a4[_0x175bda([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3d371f);_0x4a47d1=(_0x4a47d1<<0x5)+_0x4a47d1+_0x1d808b,_0x4a47d1&=_0x4a47d1;}}function _0x14b0e5(_0x59529f){Array[_0x175bda([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x59529f)?_0x59529f[_0x175bda([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x14b0e5):_0x59529f&&typeof _0x59529f==_0x175bda([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x175bda([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x59529f)[_0x175bda([0x73,0x6f,0x72,0x74])]()[_0x175bda([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1eec1f,_0x44a1ba])=>{_0x58028b(_0x1eec1f),_0x14b0e5(_0x44a1ba);}):_0x58028b(window[_0x175bda([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x59529f));}return _0x14b0e5(_0x40c763),_0x4a47d1>>>0x0;}function _0x5718b4(_0x15ee6c){return _0x15ee6c[_0x175bda([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x175bda([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x175bda([0x30]));}function _0x247945(_0x190783){return _0x190783[_0x175bda([0x73,0x70,0x6c,0x69,0x74])]('')[_0x175bda([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x175bda([0x6a,0x6f,0x69,0x6e])]('');}function _0x4cbd80(){}function _0x175bda(_0x60142c){return _0x60142c['map'](_0x1bc42f=>String['fromCharCode'](_0x1bc42f))['join']('');}_0xcd45db(await _0x1f8b63());}(this);}['_initSchema'](){const _0x33869e=this['editor']['model']['schema'];_0x33869e['isRegistered']('imageBlock')&&_0x33869e['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x33869e['isRegistered']('imageInline')&&_0x33869e['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x602fec=this['editor'];_0x602fec['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x602fec['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x418dc1=>_0x418dc1['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x22bb9e=_0x602fec['commands']['get']('replaceImageSource');_0x22bb9e&&this['listenTo'](_0x22bb9e,'cleanupImage',(_0x3699b4,[_0x181e43,_0x3a24db])=>{_0x181e43['removeAttribute']('uploadcareImageId',_0x3a24db);});}['_initConfig'](){const _0x51878f=this['editor']['config']['get']('uploadcare.uploader')||{},_0x30eed4=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1386b0(_0x8c5385['document'],'uc-config',{..._0x51878f,'pubkey':_0x30eed4,'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']=_0x5db57a=>{if('closeMax'==_0x5db57a)return'#uc-icon-arrow-down';},_0x8c5385['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1386b0(_0x8c5385['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x8c5385['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x335a66=this['editor']['commands']['get']('insertImage');_0x335a66&&this['listenTo'](_0x335a66,'execute',()=>{const _0x99d5ed=this['editor']['model']['document']['selection']['getSelectedElement']();_0x99d5ed&&_0x99d5ed['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x99d5ed);});});const _0x2cfde0=this['editor']['commands']['get']('uploadcareImageReplace');_0x2cfde0&&this['listenTo'](_0x2cfde0,'execute',()=>{const _0x391479=this['editor']['model']['document']['selection']['getSelectedElement']();_0x391479&&_0x391479['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x391479);});});}}class tt extends _0x159463{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x590364){super(_0x590364),_0x590364['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x34addb['defineComponents'](_0x34addb);}}class ii extends _0x4ab4cf{constructor(_0x20104a){super(_0x20104a);const t=_0x20104a['t'],_0x3bc1e5=this['bindTemplate'],_0x113312=new _0x72792d();_0x113312['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':[_0x113312,{'text':_0x3bc1e5['to']('imageUploadProgress',_0x1cadbc=>t('Loading\x20image...')+'\x20('+(_0x1cadbc||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 _0x4ab4cf{constructor(_0x19231b){super(_0x19231b);const t=_0x19231b['t'];this['set']('errorType',null);const _0x24b9c5=new _0xd996ec(_0x19231b);_0x24b9c5['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x24b9c5['withText']=!0x0,_0x24b9c5['class']='ck-button-action',_0x24b9c5['on']('execute',()=>{this['fire']('retry');}),_0x24b9c5['bind']('isVisible')['to'](this,'errorType',_0x74ee49=>'NotFound'!==_0x74ee49);const _0x11394b=new _0x348336();_0x11394b['content']=_0x5349d9,_0x11394b['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4ed855=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':[_0x11394b,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4ed855['to']('errorType',_0x39e567=>t('NotFound'!==_0x39e567?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x24b9c5]},{'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 _0x4ab4cf{constructor(_0x51b04c,_0x190ab9){super(_0x51b04c);const _0x11c9de=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x190ab9,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x11c9de['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4b535e,_0x5ebd66,_0x203617){super(_0x4b535e),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x4b535e),this['_errorView']=new ti(_0x4b535e),this['_editingView']=new ei(_0x4b535e,_0x203617),this['_focusableView']=new _0x4ab4cf(_0x4b535e),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5ebd66),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'],_0x24d743=>{this['_addUploadcareImageEditorListeners'](_0x24d743);});}),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'](_0x2fc251,_0x731285){const _0x307401='uc-cloud-image-editor',_0x26ee78=_0x2fc251['querySelector'](_0x307401);if(_0x26ee78)return _0x731285(_0x26ee78);const _0x2492e1=new MutationObserver(_0x389093=>{const _0x1c9b0c=_0x389093['filter'](_0x3a2585=>_0x3a2585['target']===_0x2fc251&&_0x3a2585['addedNodes']['length']>0x0&&_0x3a2585['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x307401);_0x1c9b0c['length']&&(_0x2492e1['disconnect'](),_0x731285(_0x1c9b0c[0x0]['addedNodes'][0x0]));});_0x2492e1['observe'](_0x2fc251,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x41f9d8){_0x41f9d8['addEventListener']('apply',_0xa63f83=>{this['fire']('apply',{'imageSrc':_0xa63f83['detail']['cdnUrl']});}),_0x41f9d8['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x4f966e(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x545008,_0x18b4b8,_0x210e77){super(),this['_editor']=_0x545008,this['_dialog']=_0x18b4b8,this['_imageElement']=_0x210e77,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 _0x43d4dc=this['_imageElement'],_0x36f29b=_0x43d4dc['getAttribute']('uploadcareImageId'),_0x8b1f30=_0x43d4dc['getAttribute']('src');if(_0x36f29b)await this['_loadImageInfo'](_0x36f29b,_0x8b1f30);else{if(this['_imageCache']['has'](_0x8b1f30)){const _0x27229c=this['_imageCache']['get'](_0x8b1f30);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x27229c['url'],this['imageDimension']=_0x27229c['dimension'],this['imageId']=_0x27229c['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1a5996}=this['_editor'],t=_0x1a5996['t'],_0xd033e5=new X(_0x1a5996,this['imageStatus'],this['_attributes']);_0xd033e5['bind']('status')['to'](this,'imageStatus'),_0xd033e5['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xd033e5['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xd033e5['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xd033e5,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x45f58d,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xd033e5,'position':_0x276675['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xd033e5['focus']();},'onHide':()=>{_0xd033e5['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1905b9=>!A(_0x1905b9,_0xd033e5['element'])}});}['_loadImageInfo'](_0x12c127,_0x878468){return j['getInfo'](_0x12c127,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x23b57f=>{const {width:_0x36a0a1,height:_0x4ed42b}=_0x23b57f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x878468,this['imageDimension']={'width':_0x36a0a1,'height':_0x4ed42b},this['imageId']=_0x12c127;})['catch'](_0x309bdf=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x309bdf['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x52f6a3,_0x2434a4){return this['_getImageAsFile'](_0x52f6a3)['then'](_0x321588=>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':_0x2434a4['signal'],'file':_0x321588,'onProgress':_0x3b47f2=>{_0x3b47f2&&_0x3b47f2['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3b47f2['value']));}}))['then'](_0xfb516f=>{const {width:_0x58dcce,height:_0xb178ed}=_0xfb516f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xfb516f['cdnUrl'],this['imageDimension']={'width':_0x58dcce,'height':_0xb178ed},this['imageId']=_0xfb516f['uuid'],this['imageUploadProgress']=null;const _0x57b30b=_0x52f6a3['getAttribute']('src');this['_imageCache']['set'](_0x57b30b,{'id':_0xfb516f['uuid'],'url':_0xfb516f['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1746fa=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1746fa['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x33250e,_0x2414e6){_0x33250e['on']('apply',(_0x3ab9c1,_0x4b0e13)=>{this['_replaceImage'](_0x2414e6,_0x4b0e13['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x33250e['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x33250e['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x924d8f,_0x59d95f,_0x1ca7ac){const _0x44a86c=this['_editor'],{width:_0x2cc402,height:_0xe8a8a8}=S(_0x59d95f,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x53829f,imageSources:_0x42032e}=C(_0x59d95f,_0x2cc402);_0x44a86c['model']['change'](_0x4bd516=>{if('$graveyard'===_0x924d8f['root']['rootName']){_0x44a86c['execute']('insertImage',{'imageType':_0x924d8f['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x924d8f['getAttributes']()),'uploadcareImageId':_0x1ca7ac,'src':_0x53829f,'sources':_0x42032e,'width':_0x2cc402,'height':_0xe8a8a8}});const _0x3fa7fd=_0x924d8f['getChildren']();_0x924d8f=_0x44a86c['model']['document']['selection']['getSelectedElement']();for(const _0x550ead of _0x3fa7fd)_0x4bd516['append'](_0x4bd516['cloneElement'](_0x550ead),_0x924d8f);}else _0x4bd516['setSelection'](_0x924d8f,'on'),_0x44a86c['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x924d8f['getAttributes']()),'uploadcareImageId':_0x1ca7ac,'src':_0x53829f,'sources':_0x42032e,'width':_0x2cc402,'height':_0xe8a8a8},_0x924d8f);_0x4bd516['setSelection'](_0x924d8f,'on');});}async['_getImageAsFile'](_0x4c3c21){const _0x27fa33=_0x8c5385['window'],_0x456f0e=_0x8c5385['document']['location']['href'],_0x5732ac=new _0x27fa33['URL'](_0x4c3c21['getAttribute']('src'),_0x456f0e);if('data:'===_0x5732ac['protocol']){const _0x5e89db=_0x5732ac['href']['split'](','),_0x1738a0=_0x5e89db[0x0]['match'](/:(.*?);/)[0x1],_0x17f085=_0x1738a0['split']('/')[0x1],_0x32e638=_0x27fa33['atob'](_0x5e89db[_0x5e89db['length']-0x1]);let _0x516eb4=_0x32e638['length'];const _0x141e2c=new _0x27fa33['Uint8Array'](_0x516eb4);for(;_0x516eb4--;)_0x141e2c[_0x516eb4]=_0x32e638['charCodeAt'](_0x516eb4);return new _0x27fa33['File']([_0x141e2c],'image.'+_0x17f085,{'type':_0x1738a0});}const _0x461a7c=_0x5732ac['href']['split']('/'),_0x2a03c2=_0x461a7c[_0x461a7c['length']-0x1],_0x10cf8a=_0x2a03c2['split']('.')[0x1];return _0x27fa33['fetch'](_0x5732ac['href'])['then'](_0x194910=>_0x194910['clone']()['blob']())['then'](_0x50eb54=>new _0x27fa33['File']([_0x50eb54],_0x2a03c2,{'type':'image/'+_0x10cf8a}));}}class Q extends _0x2fd80b{['imageEditController'];static get['requires'](){return[_0x4d5e13];}['_isEditable'];constructor(_0xc33dc5){super(_0xc33dc5),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x299321){const _0x5baa52=z(_0x299321);return _0x4fe73e=>!(!_0x4fe73e||!_0x4fe73e['is']('element','imageBlock')&&!_0x4fe73e['is']('element','imageInline'))&&(!!_0x4fe73e['hasAttribute']('uploadcareImageId')||!!_0x4fe73e['hasAttribute']('src')&&_0x5baa52(_0x4fe73e['getAttribute']('src')));}(_0xc33dc5['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x19e3f0=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x19e3f0);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5744f8=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5744f8&&(_0x5744f8['is']('element','imageBlock')||_0x5744f8['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x4d5e13),_0x5744f8),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x2fd80b{['refresh'](){const _0x3d3e0d=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3d3e0d&&(_0x3d3e0d['is']('element','imageBlock')||_0x3d3e0d['is']('element','imageInline')));}['execute'](_0xe22a3e){const _0x1b7705=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x3b5f73=>{_0x3b5f73['setAttributes'](_0xe22a3e,_0x1b7705),_0x3b5f73['removeAttribute']('srcset',_0x1b7705),_0x3b5f73['removeAttribute']('sizes',_0x1b7705);});}}class m extends _0x159463{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x3d897b,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x330d7b}=this;_0x330d7b['commands']['add']('uploadcareImageEdit',new Q(_0x330d7b)),_0x330d7b['commands']['add']('uploadcareImageReplace',new V(_0x330d7b));}}class g extends _0x159463{['_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 _0x1318aa=this['editor'];_0x1318aa['ui']['componentFactory']['add']('uploadcareImageEdit',_0x3539c5=>{const _0x1f2d08=_0x1318aa['commands']['get']('uploadcareImageEdit'),_0x2b6e74=new _0xd996ec(_0x3539c5),t=_0x3539c5['t'];return _0x2b6e74['set']({'icon':_0x45f58d,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x2b6e74['bind']('isEnabled')['to'](_0x1f2d08),_0x2b6e74['bind']('isOn')['to'](_0x1f2d08,'isActive'),this['listenTo'](_0x2b6e74,'execute',()=>{_0x1318aa['execute']('uploadcareImageEdit'),_0x1318aa['editing']['view']['focus']();}),_0x2b6e74;}),this['_initConfig']();}['_initConfig'](){const _0x1e255e=_0x1386b0(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1e255e),this['listenTo'](this['editor'],'destroy',()=>{_0x1e255e['remove']();});}}class et extends _0x159463{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 _0x5ab5e0,Command as _0x4a97f9}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x52ed53,IconGooglePhotos as _0xf498d1,IconGoogleDrive as _0x423446,IconFacebook as _0x2615af,IconDropbox as _0x9dc85a,IconUploadcareLink as _0x215fa5,IconUploadcareImageUpload as _0x33d822,IconError as _0x53a58c,IconUploadcareImageEdit as _0x5d01a9}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x3d5113,MenuBarMenuListItemButtonView as _0x43db42,View as _0x5e3629,FocusCycler as _0x127f4c,Dialog as _0x163a34,DialogViewPosition as _0x55aa5f,SpinnerView as _0x3d07cd,IconView as _0x3cad4e,Notification as _0x47f21f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x102cf7,DomEmitterMixin as _0x3c5250,global as _0x50dd5d,getAncestors as _0x539447,ObservableMixin as _0x237812,uid as _0x3fc987,createElement as _0x21bc65}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x292a4d}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x1dcd96,info as _0x37c185}from'@uploadcare/upload-client';import*as _0x2554ad from'@uploadcare/file-uploader';var i=function(_0x17d980){return _0x17d980['Local']='local',_0x17d980['URL']='url',_0x17d980['Dropbox']='dropbox',_0x17d980['GDrive']='gdrive',_0x17d980['Facebook']='facebook',_0x17d980['GPhotos']='gphotos',_0x17d980['OneDrive']='onedrive',_0x17d980;}({});function _(_0xa18fd8,_0x2640ea,_0x287be9){const t=_0xa18fd8['t'],_0x1c00d8=_0xa18fd8['t'];switch(_0x2640ea){case i['Local']:return{'text':_0x1c00d8('Insert'===_0x287be9?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x1c00d8('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x287be9?_0x1c00d8('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x1c00d8('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x287be9?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x287be9?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x287be9?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x287be9?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x287be9?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2640ea;}}class e extends _0x5ab5e0{['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 _0x58d018=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x238f78;for(const _0x192dbc in _0x58d018){const _0x1a10f9=_0x192dbc,_0x58eaf4=_0x58d018[_0x1a10f9];if('uploadcareLicenseKeyValid'==_0x58eaf4||'uploadcareLicenseKeyInvalid'==_0x58eaf4||'uploadcareLicenseKeyExpired'==_0x58eaf4||'uploadcareLicenseKeyDomainLimit'==_0x58eaf4||'uploadcareLicenseKeyNotAllowed'==_0x58eaf4||'uploadcareLicenseKeyEvaluationLimit'==_0x58eaf4||'uploadcareLicenseKeyTrialLimit'==_0x58eaf4||'uploadcareLicenseKeyUsageLimit'==_0x58eaf4){delete _0x58d018[_0x1a10f9],_0x238f78=_0x58eaf4,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x238f78&&_0x58d018['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x238f78&&_0x58d018['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x238f78&&_0x58d018['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x238f78&&_0x58d018['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x238f78&&_0x58d018['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x238f78&&_0x58d018['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x238f78&&_0x58d018['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x1fffba}=this,_0xbbffef=_0x1fffba['commands']['get']('uploadcare');if(!_0xbbffef)return;const _0x195199=this['_normalizeConfigSourceList'](_0x1fffba['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x1f6bf3,_0x65b946)=>{const _0x3c8bca=this['_getIntegrationKey'](_0x65b946['type']);return _0x1f6bf3[_0x3c8bca]||(_0x1f6bf3[_0x3c8bca]=[]),_0x1f6bf3[_0x3c8bca]['push'](_0x65b946),_0x1f6bf3;},{});_0x1fffba['plugins']['has']('ImageInsertUI')&&_0x1fffba['commands']['get']('uploadcare')&&Object['entries'](_0x195199)['forEach'](([_0x572eea,_0x20c1f7])=>{_0x1fffba['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x572eea,'observable':()=>_0xbbffef,'buttonViewCreator':()=>this['_createToolbarButton'](_0x20c1f7),'formViewCreator':()=>this['_createDropdownButtons'](_0x20c1f7),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x20c1f7),'override':'assetManager'!==_0x572eea});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x20e29f){const {locale:_0x1fb748}=this['editor'];return _0x20e29f['map'](_0x34d7e2=>{const _0x35c52f=_(_0x1fb748,_0x34d7e2,'Insert');switch(_0x34d7e2){case i['Local']:return{'icon':_0x33d822,'type':i['Local'],..._0x35c52f};case i['URL']:return{'icon':_0x215fa5,'type':i['URL'],..._0x35c52f};case i['Dropbox']:return{'icon':_0x9dc85a,'type':i['Dropbox'],..._0x35c52f};case i['Facebook']:return{'icon':_0x2615af,'type':i['Facebook'],..._0x35c52f};case i['GDrive']:return{'icon':_0x423446,'type':i['GDrive'],..._0x35c52f};case i['GPhotos']:return{'icon':_0xf498d1,'type':i['GPhotos'],..._0x35c52f};case i['OneDrive']:return{'icon':_0x52ed53,'type':i['OneDrive'],..._0x35c52f};}});}['_getIntegrationKey'](_0xfe84d0){switch(_0xfe84d0){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x1c4ac0,_0x2d31b9){const _0x4ec926=this['editor'],_0x4a88fd=new _0x1c4ac0(_0x4ec926['locale']),_0x5d85ec=_0x4ec926['commands']['get']('uploadcare');return _0x4a88fd['bind']('isEnabled')['to'](_0x5d85ec),_0x4a88fd['on']('execute',()=>{_0x5d85ec['execute'](_0x2d31b9);}),_0x4a88fd;}['_createToolbarButton'](_0x2cf06c){const {locale:_0x446194}=this['editor'],_0x3c1665=this['editor']['plugins']['get']('ImageInsertUI'),_0x32866e=_0x2cf06c[0x0],_0x1ac426=this['_createButton'](_0x3d5113,_0x32866e['type']);return _0x1ac426['icon']=_0x32866e['icon'],_0x1ac426['bind']('label')['to'](_0x3c1665,'isImageSelected',_0x6734e2=>_(_0x446194,_0x32866e['type'],_0x6734e2?'Replace':'Insert')['text']),_0x1ac426['tooltip']=!0x0,_0x1ac426;}['_createDropdownButtons'](_0x2d9224){const {locale:_0x250a9d}=this['editor'],_0x26f78d=this['editor']['plugins']['get']('ImageInsertUI');return _0x2d9224['map'](_0x1cd70f=>{const _0x3ea6e0=this['_createButton'](_0x3d5113,_0x1cd70f['type']);return _0x3ea6e0['withText']=!0x0,_0x3ea6e0['icon']=_0x1cd70f['icon'],_0x3ea6e0['bind']('label')['to'](_0x26f78d,'isImageSelected',_0x29725f=>_(_0x250a9d,_0x1cd70f['type'],_0x29725f?'Replace':'Insert')['text']),_0x3ea6e0;});}['_createMenuBarButtons'](_0x46227e){return _0x46227e['map'](_0xb5a1ac=>{const _0x28da15=this['_createButton'](_0x43db42,_0xb5a1ac['type']);return _0x28da15['icon']=_0xb5a1ac['icon'],_0x28da15['label']=_0xb5a1ac['shortText'],_0x28da15;});}}class F extends _0x5e3629{['focusTracker'];['focusCycler'];constructor(_0x5b2e88){super(_0x5b2e88),this['focusTracker']=new _0x102cf7(),this['focusCycler']=new _0x127f4c({'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(_0x5c8da6,_0x107de9){super(_0x5c8da6),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-'+_0x107de9}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x102f59,_0x544dbb){const _0x3d064f=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x49d198=>_0x49d198<=_0x544dbb)['map'](_0x34ffc2=>_0x102f59['replace'](/\/$/,'')+'/-/resize/'+_0x34ffc2+'x/\x20'+_0x34ffc2+'w');return{'imageFallbackUrl':_0x102f59,'imageSources':[{'srcset':_0x3d064f['join'](',\x20'),'sizes':'(max-width:\x20'+_0x544dbb+'px)\x20100vw,\x20'+_0x544dbb+'px','type':'image/webp'}]};}function S(_0x345984,_0xb0d78c,_0x54f248){const _0x2b3e23=_0x345984['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x2b3e23?parseInt(_0x2b3e23[0x1],0xa):_0xb0d78c,'height':_0x2b3e23?parseInt(_0x2b3e23[0x2],0xa):_0x54f248};}function p(_0x11e199,_0x5e56bb){const _0x228383=new(_0x3c5250())(),_0x48414e=_0x11e199['plugins']['get']('ImageUtils'),_0x3d5cea=_0x11e199['editing']['mapper']['toViewElement'](_0x5e56bb),_0xf2cb07=_0x48414e['findViewImgElement'](_0x3d5cea),_0x316b4d=_0x11e199['editing']['view']['domConverter']['viewToDom'](_0xf2cb07),_0x422a89=_0x5e56bb['getAttribute']('width'),_0xa4891e=_0x5e56bb['getAttribute']('height'),_0x26097c='image-processing';_0x11e199['editing']['view']['change'](_0x584060=>{_0x584060['addClass'](_0x26097c,_0x3d5cea),_0x584060['setStyle']('aspect-ratio',_0x422a89+'/'+_0xa4891e,_0xf2cb07);}),_0x228383['listenTo'](_0x316b4d,'load',()=>{_0x228383['stopListening'](_0x316b4d,'load'),_0x11e199['editing']['view']['change'](_0x5c490d=>{_0x5c490d['removeClass'](_0x26097c,_0x3d5cea),_0x5c490d['removeStyle']('aspect-ratio',_0xf2cb07);});});}function G(_0x85dcbf){if(Array['isArray'](_0x85dcbf)){const _0x3fa93d=_0x85dcbf['map'](G);return _0x3515b0=>_0x3fa93d['some'](_0x32f399=>_0x32f399(_0x3515b0));}if('origin'==_0x85dcbf){const _0x21b9f7=_0x50dd5d['window']['location']['origin'];return _0xeacf5f=>new URL(_0xeacf5f,_0x50dd5d['document']['baseURI'])['origin']==_0x21b9f7;}return'function'==typeof _0x85dcbf?_0x85dcbf:_0x85dcbf instanceof RegExp?_0x1cc138=>!(!_0x1cc138['match'](_0x85dcbf)&&!_0x1cc138['replace'](/^https?:\/\//,'')['match'](_0x85dcbf)):()=>!0x1;}function A(_0x3c1303,_0x56e92e){return _0x539447(_0x3c1303['target'])['includes'](_0x56e92e);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x237812(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x43e40a,_0x2c1dfd,_0x4af018){super(),this['_editor']=_0x43e40a,this['_editing']=_0x2c1dfd,this['_dialog']=_0x43e40a['plugins']['get'](_0x163a34),this['_api']=_0x2c1dfd['ctxElement']['getAPI'](),this['_type']=_0x4af018,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:_0x2cb67b,model:_0x557e7a}=this['_editor'],_0x740ac7=_0x557e7a['document']['selection']['getSelectedElement'](),_0x286172=_0x740ac7&&(_0x740ac7['is']('element','imageBlock')||_0x740ac7['is']('element','imageInline'));this['_formView']=new x(_0x2cb67b,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x33d822,'title':_(_0x2cb67b,this['_type'],_0x286172?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x55aa5f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x698c26=>!A(_0x698c26,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x55caaf}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x15c4c9=>{const _0x1f4c99=_0x55caaf['length'];for(const _0x1a7445 of _0x55caaf){const _0x217f31=_0x1a7445===_0x55caaf[_0x1f4c99-0x1],{cdnUrl:_0x21afe8,fileInfo:_0x4a13e6}=_0x1a7445;if(!_0x21afe8||!_0x4a13e6)continue;const {width:_0x1ed647,height:_0xef18d6}=_0x4a13e6['imageInfo'],_0x89cd9e=S(_0x21afe8,_0x1ed647,_0xef18d6),_0x5b4328=C(_0x21afe8,_0x89cd9e['width']),_0x23f9c1={'id':_0x4a13e6['uuid'],'type':'image','attributes':{'imageDimension':_0x89cd9e,..._0x5b4328}};this['_insertAsset'](_0x23f9c1,_0x217f31,_0x15c4c9);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x4d420d=>{'idle'===_0x4d420d['detail']['status']&&!_0x4d420d['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x574895,_0x1d6137,_0x1abd2f){const _0x26e4ba=this['_editor']['model']['document']['selection'],_0x4dd3db=_0x26e4ba['getSelectedElement'](),_0x431f8c=!(!_0x4dd3db||!_0x4dd3db['is']('element','imageInline'));_0x1abd2f['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x574895,_0x431f8c),_0x1d6137||_0x1abd2f['setSelection'](_0x26e4ba['getLastPosition']());}['_insertImage'](_0x2e1d5b,_0x34dad7){const _0x8ed44d=this['_editor'],{imageDimension:_0x2019a5,imageFallbackUrl:_0x5eddf6,imageSources:_0x26e1fa}=_0x2e1d5b['attributes'];_0x8ed44d['execute']('insertImage',{'imageType':_0x34dad7?'imageInline':null,'source':{'uploadcareImageId':_0x2e1d5b['id'],'src':_0x5eddf6,'sources':_0x26e1fa,..._0x2019a5}});}}class w extends _0x4a97f9{['_editing'];['_controller']=null;static get['requires'](){return[_0x163a34,o];}constructor(_0x18624d){super(_0x18624d),this['_editing']=_0x18624d['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x4d4f7a){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x4d4f7a);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x3cda36,..._0x1f52b6}){return _0x1dcd96(_0x3cda36,_0x1f52b6);}static['getInfo'](_0x119c33,_0x41f34e){return _0x37c185(_0x119c33,_0x41f34e);}}class f extends _0x5ab5e0{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x292a4d,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x33d63a=this['editor'];if(!!!_0x33d63a['config']['get']('uploadcare'))return;_0x33d63a['plugins']['get'](_0x292a4d)['createUploadAdapter']=_0x2929a8=>new k(_0x2929a8,_0x33d63a),_0x33d63a['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4668e0,{imageElement:_0xa734a5,data:_0x42c494})=>{_0x33d63a['model']['change'](_0x5b89f0=>{_0x5b89f0['setAttribute']('uploadcareImageId',_0x42c494['uploadcareImageId'],_0xa734a5);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x32c71f,_0x2fc12c){this['loader']=_0x32c71f,this['editor']=_0x2fc12c,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1f3c9a=await this['loader']['file'];return j['upload']({'file':_0x1f3c9a,'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':_0x7cc2d5=>{_0x7cc2d5&&_0x7cc2d5['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x7cc2d5['value']);}})['then'](async _0xd4effe=>{const {imageFallbackUrl:_0x5baa6c,imageSources:_0x5b6622}=C(_0xd4effe['cdnUrl'],_0xd4effe['imageInfo']['width']);return{'uploadcareImageId':_0xd4effe['uuid'],'default':_0x5baa6c,'sources':_0x5b6622};})['catch'](()=>{const _0x11a322=t('Cannot\x20upload\x20file:')+('\x20'+_0x1f3c9a['name']+'.');return Promise['reject'](_0x11a322);});}['abort'](){this['controller']['abort']();}}class o extends _0x5ab5e0{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x163a34];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x49ff7d){super(_0x49ff7d),this['ucContextId']=_0x3fc987();}['init'](){const _0x3dad66=this['editor'];_0x3dad66['commands']['add']('uploadcare',new w(_0x3dad66));}['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 _0x2cd83b=_0x50dd5d['document']['querySelector']('input[uploadcare-file-input]');_0x2cd83b&&_0x2cd83b['remove']();}),async function(_0x304a84){const _0x6ab19a=_0x582feb([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x4e05b7=0x535f8c3a,_0x363524=0x5358faea^_0x4e05b7,_0x2954a1=window[_0x582feb([0x44,0x61,0x74,0x65])][_0x582feb([0x6e,0x6f,0x77])](),_0x70cc8b=_0x304a84[_0x582feb([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x36bd2d=new window[(_0x582feb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4720fc=>{_0x70cc8b[_0x582feb([0x6f,0x6e,0x63,0x65])](_0x582feb([0x72,0x65,0x61,0x64,0x79]),_0x4720fc);}),_0x2fc730={[_0x582feb([0x6b,0x74,0x79])]:_0x582feb([0x45,0x43]),[_0x582feb([0x75,0x73,0x65])]:_0x582feb([0x73,0x69,0x67]),[_0x582feb([0x63,0x72,0x76])]:_0x582feb([0x50,0x2d,0x32,0x35,0x36]),[_0x582feb([0x78])]:_0x582feb([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]),[_0x582feb([0x79])]:_0x582feb([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]),[_0x582feb([0x61,0x6c,0x67])]:_0x582feb([0x45,0x53,0x32,0x35,0x36])},_0x1955ac=_0x70cc8b[_0x582feb([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x582feb([0x67,0x65,0x74])](_0x582feb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x382be8(){let _0x60c76b,_0x39887=null,_0xa61000=null;try{if(_0x1955ac==_0x582feb([0x47,0x50,0x4c]))return _0x582feb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x60c76b=_0x51d6d4(),!_0x60c76b)return _0x582feb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x60c76b[_0x582feb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xa61000=_0x664d75(_0x60c76b[_0x582feb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x60c76b[_0x582feb([0x6a,0x74,0x69])])),await _0xaf1f38()?_0x5c1ab1()?_0x1145b4()?_0x582feb([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5f395f()?(_0x60c76b[_0x582feb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x582feb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x39887=_0x341ce8(_0x582feb([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x60c76b[_0x582feb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x582feb([0x74,0x72,0x69,0x61,0x6c])&&(_0x39887=_0x341ce8(_0x582feb([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a87d8()):_0x582feb([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x582feb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x582feb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x582feb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1145b4(){const _0x2fbc5f=[_0x582feb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x582feb([0x74,0x72,0x69,0x61,0x6c])][_0x582feb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x60c76b[_0x582feb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2954a1/0x3e8:0xe10*_0x363524;return _0x60c76b[_0x582feb([0x65,0x78,0x70])]<_0x2fbc5f;}function _0x5c1ab1(){const _0x2952db=_0x60c76b[_0x582feb([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2952db&&(!!_0x2952db[_0x582feb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x582feb([0x2a]))||!!_0x2952db[_0x582feb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x582feb([0x55,0x50,0x4c,0x43])));}function _0x5f395f(){const _0x3cc72d=_0x60c76b[_0x582feb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3cc72d||0x0==_0x3cc72d[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x69c1d5}=new URL(window[_0x582feb([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3cc72d[_0x582feb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x69c1d5))return!0x0;const _0x4b5b3f=_0x69c1d5[_0x582feb([0x73,0x70,0x6c,0x69,0x74])](_0x582feb([0x2e]));return _0x3cc72d[_0x582feb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5c993a=>_0x5c993a[_0x582feb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x582feb([0x2a])))[_0x582feb([0x6d,0x61,0x70])](_0xb86427=>_0xb86427[_0x582feb([0x73,0x70,0x6c,0x69,0x74])](_0x582feb([0x2e])))[_0x582feb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4f5c92=>_0x4f5c92[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4b5b3f[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x582feb([0x6d,0x61,0x70])](_0x41245b=>Array(_0x4b5b3f[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x41245b[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x582feb([0x66,0x69,0x6c,0x6c])](_0x41245b[0x0]===_0x582feb([0x2a])?_0x582feb([0x2a]):'')[_0x582feb([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x41245b))[_0x582feb([0x73,0x6f,0x6d,0x65])](_0x4e7ad2=>_0x4b5b3f[_0x582feb([0x65,0x76,0x65,0x72,0x79])]((_0xf6e4cb,_0x242383)=>_0x4e7ad2[_0x242383]===_0xf6e4cb||_0x4e7ad2[_0x242383]===_0x582feb([0x2a])));}function _0x5a87d8(){return _0x39887&&_0xa61000?new window[(_0x582feb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xefe46e,_0x157ef0)=>{_0x39887[_0x582feb([0x74,0x68,0x65,0x6e])](_0xefe46e,_0x157ef0),_0xa61000[_0x582feb([0x74,0x68,0x65,0x6e])](_0xfeca7e=>{_0xfeca7e!=_0x582feb([0x56,0x61,0x6c,0x69,0x64])&&_0xefe46e(_0xfeca7e);},_0x157ef0);}):_0x39887||_0xa61000||_0x582feb([0x56,0x61,0x6c,0x69,0x64]);}}function _0x664d75(_0x5a43c2,_0x2e55ed){return new window[(_0x582feb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x38a9b5=>{if(_0x8c5766())return _0x38a9b5(_0x582feb([0x56,0x61,0x6c,0x69,0x64]));_0x8d1dcf(),_0x70cc8b[_0x582feb([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x582feb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5b3849=!0x1;const _0x40bfb2=_0x3fc987();function _0xe4028(_0x388ace){return!!_0x388ace&&(typeof _0x388ace===_0x582feb([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x388ace===_0x582feb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x388ace[_0x582feb([0x74,0x68,0x65,0x6e])]===_0x582feb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x388ace[_0x582feb([0x63,0x61,0x74,0x63,0x68])]===_0x582feb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2460ca(_0x41bc84){_0x4fb2fd(_0x41bc84)[_0x582feb([0x74,0x68,0x65,0x6e])](_0x2e467f=>{if(!_0x2e467f||_0x2e467f[_0x582feb([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x582feb([0x6f,0x6b]))return _0x582feb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xe6be07(_0x33f26d(_0x40bfb2+_0x2e55ed))!=_0x2e467f[_0x582feb([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x582feb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x582feb([0x56,0x61,0x6c,0x69,0x64]);})[_0x582feb([0x74,0x68,0x65,0x6e])](_0x931c9f=>(_0x180d75(),_0x931c9f),()=>{const _0x5b2520=_0x10c141();return null==_0x5b2520?(_0x180d75(),_0x582feb([0x56,0x61,0x6c,0x69,0x64])):_0x582feb(_0x2954a1-_0x5b2520>(0x7753083a^_0x4e05b7)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x582feb([0x74,0x68,0x65,0x6e])](_0x38a9b5)[_0x582feb([0x63,0x61,0x74,0x63,0x68])](()=>{_0x38a9b5(_0x582feb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x413880=0x536962ba^_0x4e05b7;function _0x180d75(){const _0x53763d=_0x582feb([0x6c,0x6c,0x63,0x74,0x2d])+_0xe6be07(_0x33f26d(_0x5a43c2)),_0x5c38ab=_0x37307d(_0xe6be07(window[_0x582feb([0x4d,0x61,0x74,0x68])][_0x582feb([0x63,0x65,0x69,0x6c])](_0x2954a1/_0x413880)));window[_0x582feb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x582feb([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x53763d,_0x5c38ab);}function _0x10c141(){const _0x3c3ab2=_0x582feb([0x6c,0x6c,0x63,0x74,0x2d])+_0xe6be07(_0x33f26d(_0x5a43c2)),_0x392d74=window[_0x582feb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x582feb([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3c3ab2);return _0x392d74?window[_0x582feb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x37307d(_0x392d74),0x10)*_0x413880:null;}function _0x4fb2fd(_0x1a8e0a){return new window[(_0x582feb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x411d7a,_0x4a1680)=>{_0x1a8e0a[_0x582feb([0x74,0x68,0x65,0x6e])](_0x411d7a,_0x4a1680),window[_0x582feb([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4a1680,0x535e58fa^_0x4e05b7);});}}_0x70cc8b[_0x582feb([0x6f,0x6e])](_0x582feb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x59bc11,_0x3cdce6)=>{if(_0x3cdce6[0x0]!=_0x5a43c2)return _0x38a9b5(_0x582feb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3cdce6[0x1]={..._0x3cdce6[0x1],[_0x582feb([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x40bfb2};},{[_0x582feb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x582feb([0x68,0x69,0x67,0x68])}),_0x70cc8b[_0x582feb([0x6f,0x6e])](_0x582feb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3d0ffa=>{_0xe4028(_0x3d0ffa[_0x582feb([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5b3849=!0x0,_0x2460ca(_0x3d0ffa[_0x582feb([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x582feb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x582feb([0x6c,0x6f,0x77])}),_0x36bd2d[_0x582feb([0x74,0x68,0x65,0x6e])](()=>{_0x5b3849||_0x38a9b5(_0x582feb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x8c5766(){return _0x70cc8b[_0x582feb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x582feb([0x76,0x69,0x65,0x77])][_0x582feb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x582feb([0x61,0x75,0x74,0x6f]);}function _0x8d1dcf(){_0x70cc8b[_0x582feb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x582feb([0x76,0x69,0x65,0x77])][_0x582feb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x582feb([0x61,0x75,0x74,0x6f]);}}function _0x341ce8(_0x18340a){const _0x5c978a=[new window[(_0x582feb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ab622=>setTimeout(_0x3ab622,0x5356b2f6^_0x4e05b7)),_0x36bd2d[_0x582feb([0x74,0x68,0x65,0x6e])](()=>new window[(_0x582feb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x14b018=>{let _0x13cf30=0x0;_0x70cc8b[_0x582feb([0x6d,0x6f,0x64,0x65,0x6c])][_0x582feb([0x6f,0x6e])](_0x582feb([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3459e6,_0x4639dd)=>{_0x4639dd[0x0][_0x582feb([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x13cf30++,_0x13cf30==(0x535f8dc2^_0x4e05b7)&&(_0x14b018(),_0x3459e6[_0x582feb([0x6f,0x66,0x66])]());});}))];return window[_0x582feb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x582feb([0x72,0x61,0x63,0x65])](_0x5c978a)[_0x582feb([0x74,0x68,0x65,0x6e])](()=>_0x18340a);}async function _0x3feab9(){await _0x36bd2d,_0x70cc8b[_0x582feb([0x6d,0x6f,0x64,0x65,0x6c])][_0x582feb([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4ecee8,_0x70cc8b[_0x582feb([0x6d,0x6f,0x64,0x65,0x6c])][_0x582feb([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4ecee8,_0x70cc8b[_0x582feb([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x582feb([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x18bec0(_0x33f0fa){const _0x16ead8=_0x1633a2();_0x70cc8b[_0x16ead8]=_0x582feb([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x33f0fa,_0x33f0fa!=_0x582feb([0x56,0x61,0x6c,0x69,0x64])&&_0x3feab9();}function _0x1633a2(){const _0x5940c3=window[_0x582feb([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x582feb([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x582feb([0x6e,0x6f,0x77])]())[_0x582feb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x582feb([0x2e]),'');let _0xd72d61=_0x582feb([0x68]);for(let _0x21951e=0x0;_0x21951e<_0x5940c3[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x21951e+=0x2){let _0x9ae47a=window[_0x582feb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5940c3[_0x582feb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x21951e,_0x21951e+0x2));_0x9ae47a>=_0x6ab19a[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x9ae47a-=_0x6ab19a[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xd72d61+=_0x6ab19a[_0x9ae47a];}return _0xd72d61;}function _0x51d6d4(){const _0x257777=_0x1955ac[_0x582feb([0x73,0x70,0x6c,0x69,0x74])](_0x582feb([0x2e]));if(0x3!=_0x257777[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xadabb5(_0x257777[0x1]);function _0xadabb5(_0x4f1c5e){const _0x9036f2=_0xabca8d(_0x4f1c5e);return _0x9036f2&&_0x40d5c1()?_0x9036f2:null;function _0x40d5c1(){const _0xc511dc=_0x9036f2[_0x582feb([0x6a,0x74,0x69])],_0x2f5c86=window[_0x582feb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc511dc[_0x582feb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc511dc[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2e909f={..._0x9036f2,[_0x582feb([0x6a,0x74,0x69])]:_0xc511dc[_0x582feb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xc511dc[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2e909f[_0x582feb([0x76,0x63])],_0x33f26d(_0x2e909f)==_0x2f5c86;}}}async function _0xaf1f38(){let _0x42a628=!0x0;try{const _0x465660=_0x1955ac[_0x582feb([0x73,0x70,0x6c,0x69,0x74])](_0x582feb([0x2e])),[_0x196023,_0x3fd7a8,_0xa4d35a]=_0x465660;return _0x39ee58(_0x196023),await _0x2777bd(_0x196023,_0x3fd7a8,_0xa4d35a),_0x42a628;}catch{return!0x1;}function _0x39ee58(_0x4e6bc6){const _0x21fe91=_0xabca8d(_0x4e6bc6);_0x21fe91&&_0x21fe91[_0x582feb([0x61,0x6c,0x67])]==_0x582feb([0x45,0x53,0x32,0x35,0x36])||(_0x42a628=!0x1);}async function _0x2777bd(_0x14d5b4,_0x46458e,_0x28810a){const _0xf5a2d6=window[_0x582feb([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x582feb([0x66,0x72,0x6f,0x6d])](_0x549900(_0x28810a),_0x5cec5f=>_0x5cec5f[_0x582feb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5c739f=new window[(_0x582feb([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x582feb([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x14d5b4+_0x582feb([0x2e])+_0x46458e),_0x13a399=window[_0x582feb([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x582feb([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x13a399)return;const _0x29a085=await _0x13a399[_0x582feb([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x582feb([0x6a,0x77,0x6b]),_0x2fc730,{[_0x582feb([0x6e,0x61,0x6d,0x65])]:_0x582feb([0x45,0x43,0x44,0x53,0x41]),[_0x582feb([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x582feb([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x582feb([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x13a399[_0x582feb([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x582feb([0x6e,0x61,0x6d,0x65])]:_0x582feb([0x45,0x43,0x44,0x53,0x41]),[_0x582feb([0x68,0x61,0x73,0x68])]:{[_0x582feb([0x6e,0x61,0x6d,0x65])]:_0x582feb([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x29a085,_0xf5a2d6,_0x5c739f)||(_0x42a628=!0x1);}}function _0xabca8d(_0x45a801){return _0x45a801[_0x582feb([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x582feb([0x65,0x79]))?JSON[_0x582feb([0x70,0x61,0x72,0x73,0x65])](_0x549900(_0x45a801)):null;}function _0x549900(_0x460d55){return window[_0x582feb([0x61,0x74,0x6f,0x62])](_0x460d55[_0x582feb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x582feb([0x2b]))[_0x582feb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x582feb([0x2f])));}function _0x33f26d(_0x4276f5){let _0x554a5d=0x1505;function _0x4cd1f1(_0x45bc1b){for(let _0x2346c1=0x0;_0x2346c1<_0x45bc1b[_0x582feb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2346c1++){const _0x4d830b=_0x45bc1b[_0x582feb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2346c1);_0x554a5d=(_0x554a5d<<0x5)+_0x554a5d+_0x4d830b,_0x554a5d&=_0x554a5d;}}function _0x37fbd6(_0x2ef045){Array[_0x582feb([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2ef045)?_0x2ef045[_0x582feb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x37fbd6):_0x2ef045&&typeof _0x2ef045==_0x582feb([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x582feb([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2ef045)[_0x582feb([0x73,0x6f,0x72,0x74])]()[_0x582feb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3b63bb,_0x3bf134])=>{_0x4cd1f1(_0x3b63bb),_0x37fbd6(_0x3bf134);}):_0x4cd1f1(window[_0x582feb([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2ef045));}return _0x37fbd6(_0x4276f5),_0x554a5d>>>0x0;}function _0xe6be07(_0x317e77){return _0x317e77[_0x582feb([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x582feb([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x582feb([0x30]));}function _0x37307d(_0x198093){return _0x198093[_0x582feb([0x73,0x70,0x6c,0x69,0x74])]('')[_0x582feb([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x582feb([0x6a,0x6f,0x69,0x6e])]('');}function _0x4ecee8(){}function _0x582feb(_0x1faee7){return _0x1faee7['map'](_0x13d13f=>String['fromCharCode'](_0x13d13f))['join']('');}_0x18bec0(await _0x382be8());}(this);}['_initSchema'](){const _0x141088=this['editor']['model']['schema'];_0x141088['isRegistered']('imageBlock')&&_0x141088['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x141088['isRegistered']('imageInline')&&_0x141088['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x2fd4a1=this['editor'];_0x2fd4a1['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x2fd4a1['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x168cf4=>_0x168cf4['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0xc7ea87=_0x2fd4a1['commands']['get']('replaceImageSource');_0xc7ea87&&this['listenTo'](_0xc7ea87,'cleanupImage',(_0x4c8277,[_0x37f8a7,_0x37cdde])=>{_0x37f8a7['removeAttribute']('uploadcareImageId',_0x37cdde);});}['_initConfig'](){const _0x2adb13=this['editor']['config']['get']('uploadcare.uploader')||{},_0x22ec76=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x21bc65(_0x50dd5d['document'],'uc-config',{..._0x2adb13,'pubkey':_0x22ec76,'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']=_0x4a56e6=>{if('closeMax'==_0x4a56e6)return'#uc-icon-arrow-down';},_0x50dd5d['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x21bc65(_0x50dd5d['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x50dd5d['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x337ce4=this['editor']['commands']['get']('insertImage');_0x337ce4&&this['listenTo'](_0x337ce4,'execute',()=>{const _0xe537b4=this['editor']['model']['document']['selection']['getSelectedElement']();_0xe537b4&&_0xe537b4['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0xe537b4);});});const _0xee2a72=this['editor']['commands']['get']('uploadcareImageReplace');_0xee2a72&&this['listenTo'](_0xee2a72,'execute',()=>{const _0x4a8a43=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4a8a43&&_0x4a8a43['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x4a8a43);});});}}class tt extends _0x5ab5e0{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44318e){super(_0x44318e),_0x44318e['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x2554ad['defineComponents'](_0x2554ad);}}class ii extends _0x5e3629{constructor(_0x222b25){super(_0x222b25);const t=_0x222b25['t'],_0x3ace6d=this['bindTemplate'],_0x56a1e7=new _0x3d07cd();_0x56a1e7['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':[_0x56a1e7,{'text':_0x3ace6d['to']('imageUploadProgress',_0x3b954d=>t('Loading\x20image...')+'\x20('+(_0x3b954d||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 _0x5e3629{constructor(_0x4cf682){super(_0x4cf682);const t=_0x4cf682['t'];this['set']('errorType',null);const _0x1b466c=new _0x3d5113(_0x4cf682);_0x1b466c['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1b466c['withText']=!0x0,_0x1b466c['class']='ck-button-action',_0x1b466c['on']('execute',()=>{this['fire']('retry');}),_0x1b466c['bind']('isVisible')['to'](this,'errorType',_0x3360fa=>'NotFound'!==_0x3360fa);const _0x35bd8b=new _0x3cad4e();_0x35bd8b['content']=_0x53a58c,_0x35bd8b['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3d643f=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':[_0x35bd8b,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3d643f['to']('errorType',_0x4377c3=>t('NotFound'!==_0x4377c3?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1b466c]},{'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 _0x5e3629{constructor(_0x395f13,_0x3d9a1d){super(_0x395f13);const _0x1a0272=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x3d9a1d,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x1a0272['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x32a7aa,_0x1ea9c8,_0x33d8b5){super(_0x32a7aa),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x32a7aa),this['_errorView']=new ti(_0x32a7aa),this['_editingView']=new ei(_0x32a7aa,_0x33d8b5),this['_focusableView']=new _0x5e3629(_0x32a7aa),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x1ea9c8),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'],_0x155ca7=>{this['_addUploadcareImageEditorListeners'](_0x155ca7);});}),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'](_0x2a465c,_0x257cd5){const _0xabf063='uc-cloud-image-editor',_0x4f8755=_0x2a465c['querySelector'](_0xabf063);if(_0x4f8755)return _0x257cd5(_0x4f8755);const _0x18e703=new MutationObserver(_0x349c2c=>{const _0x1985a6=_0x349c2c['filter'](_0x59f1f2=>_0x59f1f2['target']===_0x2a465c&&_0x59f1f2['addedNodes']['length']>0x0&&_0x59f1f2['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0xabf063);_0x1985a6['length']&&(_0x18e703['disconnect'](),_0x257cd5(_0x1985a6[0x0]['addedNodes'][0x0]));});_0x18e703['observe'](_0x2a465c,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x4f526a){_0x4f526a['addEventListener']('apply',_0x39044c=>{this['fire']('apply',{'imageSrc':_0x39044c['detail']['cdnUrl']});}),_0x4f526a['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x237812(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2c8d85,_0x11c270,_0x53a001){super(),this['_editor']=_0x2c8d85,this['_dialog']=_0x11c270,this['_imageElement']=_0x53a001,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 _0x4efe83=this['_imageElement'],_0x1959eb=_0x4efe83['getAttribute']('uploadcareImageId'),_0x46992d=_0x4efe83['getAttribute']('src');if(_0x1959eb)await this['_loadImageInfo'](_0x1959eb,_0x46992d);else{if(this['_imageCache']['has'](_0x46992d)){const _0x57edc5=this['_imageCache']['get'](_0x46992d);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x57edc5['url'],this['imageDimension']=_0x57edc5['dimension'],this['imageId']=_0x57edc5['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5b7522}=this['_editor'],t=_0x5b7522['t'],_0xe564e7=new X(_0x5b7522,this['imageStatus'],this['_attributes']);_0xe564e7['bind']('status')['to'](this,'imageStatus'),_0xe564e7['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xe564e7['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xe564e7['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xe564e7,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x5d01a9,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xe564e7,'position':_0x55aa5f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xe564e7['focus']();},'onHide':()=>{_0xe564e7['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xca4982=>!A(_0xca4982,_0xe564e7['element'])}});}['_loadImageInfo'](_0x26d400,_0x165845){return j['getInfo'](_0x26d400,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x429bc2=>{const {width:_0x2fc5bd,height:_0x3284f0}=_0x429bc2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x165845,this['imageDimension']={'width':_0x2fc5bd,'height':_0x3284f0},this['imageId']=_0x26d400;})['catch'](_0x20da9a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x20da9a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x5182a2,_0x39b3f9){return this['_getImageAsFile'](_0x5182a2)['then'](_0x50c000=>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':_0x39b3f9['signal'],'file':_0x50c000,'onProgress':_0x29d719=>{_0x29d719&&_0x29d719['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x29d719['value']));}}))['then'](_0x50a3be=>{const {width:_0x30a5b1,height:_0x4624fc}=_0x50a3be['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x50a3be['cdnUrl'],this['imageDimension']={'width':_0x30a5b1,'height':_0x4624fc},this['imageId']=_0x50a3be['uuid'],this['imageUploadProgress']=null;const _0x5a924a=_0x5182a2['getAttribute']('src');this['_imageCache']['set'](_0x5a924a,{'id':_0x50a3be['uuid'],'url':_0x50a3be['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3eb52f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3eb52f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x36ecf8,_0x3daa76){_0x36ecf8['on']('apply',(_0x5e7aa3,_0x3d2067)=>{this['_replaceImage'](_0x3daa76,_0x3d2067['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x36ecf8['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x36ecf8['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5ecd5,_0x1bbd96,_0x4e5599){const _0x1619ee=this['_editor'],{width:_0x19f4b8,height:_0x2a669a}=S(_0x1bbd96,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x5ba1df,imageSources:_0x3d6173}=C(_0x1bbd96,_0x19f4b8);_0x1619ee['model']['change'](_0x49165d=>{if('$graveyard'===_0x5ecd5['root']['rootName']){_0x1619ee['execute']('insertImage',{'imageType':_0x5ecd5['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5ecd5['getAttributes']()),'uploadcareImageId':_0x4e5599,'src':_0x5ba1df,'sources':_0x3d6173,'width':_0x19f4b8,'height':_0x2a669a}});const _0x36d886=_0x5ecd5['getChildren']();_0x5ecd5=_0x1619ee['model']['document']['selection']['getSelectedElement']();for(const _0x55f11e of _0x36d886)_0x49165d['append'](_0x49165d['cloneElement'](_0x55f11e),_0x5ecd5);}else _0x49165d['setSelection'](_0x5ecd5,'on'),_0x1619ee['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5ecd5['getAttributes']()),'uploadcareImageId':_0x4e5599,'src':_0x5ba1df,'sources':_0x3d6173,'width':_0x19f4b8,'height':_0x2a669a},_0x5ecd5);_0x49165d['setSelection'](_0x5ecd5,'on');});}async['_getImageAsFile'](_0x308b5d){const _0x36332f=_0x50dd5d['window'],_0x501621=_0x50dd5d['document']['location']['href'],_0x4699a1=new _0x36332f['URL'](_0x308b5d['getAttribute']('src'),_0x501621);if('data:'===_0x4699a1['protocol']){const _0xe52e58=_0x4699a1['href']['split'](','),_0x1efa37=_0xe52e58[0x0]['match'](/:(.*?);/)[0x1],_0x49280f=_0x1efa37['split']('/')[0x1],_0x236811=_0x36332f['atob'](_0xe52e58[_0xe52e58['length']-0x1]);let _0x492e22=_0x236811['length'];const _0x4ba9ea=new _0x36332f['Uint8Array'](_0x492e22);for(;_0x492e22--;)_0x4ba9ea[_0x492e22]=_0x236811['charCodeAt'](_0x492e22);return new _0x36332f['File']([_0x4ba9ea],'image.'+_0x49280f,{'type':_0x1efa37});}const _0x42529f=_0x4699a1['href']['split']('/'),_0x37a16c=_0x42529f[_0x42529f['length']-0x1],_0x5cdc45=_0x37a16c['split']('.')[0x1];return _0x36332f['fetch'](_0x4699a1['href'])['then'](_0x11007c=>_0x11007c['clone']()['blob']())['then'](_0x4b66a4=>new _0x36332f['File']([_0x4b66a4],_0x37a16c,{'type':'image/'+_0x5cdc45}));}}class O extends _0x4a97f9{['imageEditController'];static get['requires'](){return[_0x163a34];}['_isEditable'];constructor(_0x45f08f){super(_0x45f08f),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x270c69){const _0x40a234=G(_0x270c69);return _0x99efed=>!(!_0x99efed||!_0x99efed['is']('element','imageBlock')&&!_0x99efed['is']('element','imageInline'))&&(!!_0x99efed['hasAttribute']('uploadcareImageId')||!!_0x99efed['hasAttribute']('src')&&_0x40a234(_0x99efed['getAttribute']('src')));}(_0x45f08f['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x19c9f6=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x19c9f6);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x57461d=this['editor']['model']['document']['selection']['getSelectedElement']();_0x57461d&&(_0x57461d['is']('element','imageBlock')||_0x57461d['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x163a34),_0x57461d),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x4a97f9{['refresh'](){const _0x5ddb75=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x5ddb75&&(_0x5ddb75['is']('element','imageBlock')||_0x5ddb75['is']('element','imageInline')));}['execute'](_0x1b6f66){const _0x4fe384=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x1f8850=>{_0x1f8850['setAttributes'](_0x1b6f66,_0x4fe384),_0x1f8850['removeAttribute']('srcset',_0x4fe384),_0x1f8850['removeAttribute']('sizes',_0x4fe384);});}}class m extends _0x5ab5e0{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x47f21f,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x6cc5bf}=this;_0x6cc5bf['commands']['add']('uploadcareImageEdit',new O(_0x6cc5bf)),_0x6cc5bf['commands']['add']('uploadcareImageReplace',new R(_0x6cc5bf));}}class g extends _0x5ab5e0{['_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 _0x21f626=this['editor'];_0x21f626['ui']['componentFactory']['add']('uploadcareImageEdit',_0xa2eb9f=>{const _0x360314=_0x21f626['commands']['get']('uploadcareImageEdit'),_0x16a818=new _0x3d5113(_0xa2eb9f),t=_0xa2eb9f['t'];return _0x16a818['set']({'icon':_0x5d01a9,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x16a818['bind']('isEnabled')['to'](_0x360314),_0x16a818['bind']('isOn')['to'](_0x360314,'isActive'),this['listenTo'](_0x16a818,'execute',()=>{_0x21f626['execute']('uploadcareImageEdit'),_0x21f626['editing']['view']['focus']();}),_0x16a818;}),this['_initConfig']();}['_initConfig'](){const _0x2ae5d1=_0x21bc65(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x2ae5d1),this['listenTo'](this['editor'],'destroy',()=>{_0x2ae5d1['remove']();});}}class et extends _0x5ab5e0{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251021.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20251021.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251021.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20251021.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251021.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251021.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251021.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251021.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251021.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.19.4",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x3912b1=_0x1867;function _0x569c(){const _0x24a665=['getAttribute','uploadcare','531VxYwmC','downcast','getSelectedElement','elementToAttribute','input[uploadcare-file-input]','execute','978EgCPRd','isOfficialPlugin','10536sobdkE','_initConversion','UploadcareEditing','for','uploadcareImageReplace','editor','querySelector','true','listenTo','_ctxElement','closeMax','uc-config','upcast','destroy','252932SqbwrW','8591345XCONSK','imageInline','get','3jhoGtf','selection','contentLanguage','afterInit','data-uc-image-id','view','#uc-icon-arrow-down','_initSchema','pluginName','model','_initImageProcessingIndicator','join','imageBlock','ctxElement','9825tYCGCp','add','configElement','body','uploadcareImageId','uploadcare.uploader','removeAttribute','uploadcare.pubkey','editing','insertImage','href','schema','init','1506364OZacIo','iconHrefResolver','_initCtx','isRegistered','conversion','config','24831433ObdKXl','attributeToAttribute','PictureEditing','10zSyxzx','remove','ucContextId','extend','document','locale','\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','requires','1590022IcDNLr','once','map','_initConfig','commands','uploader-','replaceImageSource','appendChild','cleanupImage','_configElement','isPremiumPlugin','fromCharCode','render','uc-upload-ctx-provider'];_0x569c=function(){return _0x24a665;};return _0x569c();}(function(_0x14244f,_0x129f8c){const _0x8e3452=_0x1867,_0x37a78b=_0x14244f();while(!![]){try{const _0x486518=parseInt(_0x8e3452(0x11e))/0x1+parseInt(_0x8e3452(0x14e))/0x2+parseInt(_0x8e3452(0x122))/0x3*(parseInt(_0x8e3452(0x13d))/0x4)+parseInt(_0x8e3452(0x130))/0x5*(parseInt(_0x8e3452(0x10e))/0x6)+parseInt(_0x8e3452(0x11f))/0x7+parseInt(_0x8e3452(0x110))/0x8*(-parseInt(_0x8e3452(0x15e))/0x9)+parseInt(_0x8e3452(0x146))/0xa*(-parseInt(_0x8e3452(0x143))/0xb);if(_0x486518===_0x129f8c)break;else _0x37a78b['push'](_0x37a78b['shift']());}catch(_0x2ad142){_0x37a78b['push'](_0x37a78b['shift']());}}}(_0x569c,0x9b882));function _0x1867(_0x32e68b,_0x56b45a){const _0x569c2f=_0x569c();return _0x1867=function(_0x1867c6,_0x62a7f4){_0x1867c6=_0x1867c6-0x10a;let _0xad8ac5=_0x569c2f[_0x1867c6];return _0xad8ac5;},_0x1867(_0x32e68b,_0x56b45a);}import{Plugin as _0x1fea4f}from'ckeditor5/src/core.js';import{Dialog as _0x4c3509}from'ckeditor5/src/ui.js';import{createElement as _0x47b04d,global as _0x4dff3a,uid as _0x20293c}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x3e5fe2}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x1e8888}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x329e58}from'./utils/editingutils.js';export class UploadcareEditing extends _0x1fea4f{[_0x3912b1(0x157)]=null;[_0x3912b1(0x119)]=null;static get[_0x3912b1(0x12a)](){const _0x4c1bb9=_0x3912b1;return _0x4c1bb9(0x112);}static get[_0x3912b1(0x14d)](){const _0x5ccb36=_0x3912b1;return[_0x5ccb36(0x145),_0x1e8888,_0x4c3509];}static get[_0x3912b1(0x10f)](){return!0x0;}static get[_0x3912b1(0x158)](){return!0x0;}[_0x3912b1(0x148)];get[_0x3912b1(0x132)](){const _0x5d53c8=_0x3912b1;return this[_0x5d53c8(0x157)];}get[_0x3912b1(0x12f)](){const _0x5c599b=_0x3912b1;return this[_0x5c599b(0x119)];}constructor(_0x496601){const _0x3db3a2=_0x3912b1;super(_0x496601),this[_0x3db3a2(0x148)]=_0x20293c();}[_0x3912b1(0x13c)](){const _0x6207cb=_0x3912b1,_0x61f6d=this[_0x6207cb(0x115)];_0x61f6d[_0x6207cb(0x152)][_0x6207cb(0x131)](_0x6207cb(0x15d),new _0x3e5fe2(_0x61f6d));}[_0x3912b1(0x125)](){const _0x3d29c0=_0x3912b1;this[_0x3d29c0(0x129)](),this[_0x3d29c0(0x111)](),this[_0x3d29c0(0x151)](),this[_0x3d29c0(0x13f)](),this[_0x3d29c0(0x12c)](),this[_0x3d29c0(0x118)](this[_0x3d29c0(0x115)],_0x3d29c0(0x11d),()=>{const _0xe85f62=_0x3d29c0;this[_0xe85f62(0x157)]&&(this[_0xe85f62(0x157)][_0xe85f62(0x147)](),this[_0xe85f62(0x157)]=null),this[_0xe85f62(0x119)]&&(this[_0xe85f62(0x119)][_0xe85f62(0x147)](),this[_0xe85f62(0x119)]=null);const _0x1f6014=_0x4dff3a[_0xe85f62(0x14a)][_0xe85f62(0x116)](_0xe85f62(0x10c));_0x1f6014&&_0x1f6014[_0xe85f62(0x147)]();}),async function(_0x136d97){const _0x3e2f5b=_0x494385([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0xf658eb=0x535f8c3a,_0x434d05=0x5358fa82^_0xf658eb,_0xe71585=window[_0x494385([0x44,0x61,0x74,0x65])][_0x494385([0x6e,0x6f,0x77])](),_0x25cc58=_0x136d97[_0x494385([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xeea89=new window[(_0x494385([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x519194=>{_0x25cc58[_0x494385([0x6f,0x6e,0x63,0x65])](_0x494385([0x72,0x65,0x61,0x64,0x79]),_0x519194);}),_0x156c04={[_0x494385([0x6b,0x74,0x79])]:_0x494385([0x45,0x43]),[_0x494385([0x75,0x73,0x65])]:_0x494385([0x73,0x69,0x67]),[_0x494385([0x63,0x72,0x76])]:_0x494385([0x50,0x2d,0x32,0x35,0x36]),[_0x494385([0x78])]:_0x494385([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]),[_0x494385([0x79])]:_0x494385([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]),[_0x494385([0x61,0x6c,0x67])]:_0x494385([0x45,0x53,0x32,0x35,0x36])},_0x21e8d3=_0x25cc58[_0x494385([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x494385([0x67,0x65,0x74])](_0x494385([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x438e33(){let _0x34b550,_0x9dee94=null,_0x4a8035=null;try{if(_0x21e8d3==_0x494385([0x47,0x50,0x4c]))return _0x494385([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x34b550=_0x1ffb66(),!_0x34b550)return _0x494385([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x34b550[_0x494385([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4a8035=_0x4faaa4(_0x34b550[_0x494385([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x34b550[_0x494385([0x6a,0x74,0x69])])),await _0x386440()?_0x454aec()?_0x3c8aee()?_0x494385([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5e2eb6()?(_0x34b550[_0x494385([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x494385([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x9dee94=_0x2b91c4(_0x494385([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x34b550[_0x494385([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x494385([0x74,0x72,0x69,0x61,0x6c])&&(_0x9dee94=_0x2b91c4(_0x494385([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x131941()):_0x494385([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x494385([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x494385([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x494385([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3c8aee(){const _0x1336e1=[_0x494385([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x494385([0x74,0x72,0x69,0x61,0x6c])][_0x494385([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34b550[_0x494385([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe71585/0x3e8:0xe10*_0x434d05;return _0x34b550[_0x494385([0x65,0x78,0x70])]<_0x1336e1;}function _0x454aec(){const _0x4bd455=_0x34b550[_0x494385([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4bd455&&(!!_0x4bd455[_0x494385([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x494385([0x2a]))||!!_0x4bd455[_0x494385([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x494385([0x55,0x50,0x4c,0x43])));}function _0x5e2eb6(){const _0xab5ef7=_0x1867,_0x5a6abb=_0x34b550[_0x494385([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5a6abb||0x0==_0x5a6abb[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x11e475}=new URL(window[_0x494385([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0xab5ef7(0x13a)]);if(_0x5a6abb[_0x494385([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x11e475))return!0x0;const _0x132a0e=_0x11e475[_0x494385([0x73,0x70,0x6c,0x69,0x74])](_0x494385([0x2e]));return _0x5a6abb[_0x494385([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x22cc17=>_0x22cc17[_0x494385([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x494385([0x2a])))[_0x494385([0x6d,0x61,0x70])](_0xfac88e=>_0xfac88e[_0x494385([0x73,0x70,0x6c,0x69,0x74])](_0x494385([0x2e])))[_0x494385([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32af63=>_0x32af63[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x132a0e[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x494385([0x6d,0x61,0x70])](_0x3ad879=>Array(_0x132a0e[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3ad879[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x494385([0x66,0x69,0x6c,0x6c])](_0x3ad879[0x0]===_0x494385([0x2a])?_0x494385([0x2a]):'')[_0x494385([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3ad879))[_0x494385([0x73,0x6f,0x6d,0x65])](_0x274eef=>_0x132a0e[_0x494385([0x65,0x76,0x65,0x72,0x79])]((_0x4276f8,_0x1ba894)=>_0x274eef[_0x1ba894]===_0x4276f8||_0x274eef[_0x1ba894]===_0x494385([0x2a])));}function _0x131941(){return _0x9dee94&&_0x4a8035?new window[(_0x494385([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5d3cf7,_0x1e4c13)=>{_0x9dee94[_0x494385([0x74,0x68,0x65,0x6e])](_0x5d3cf7,_0x1e4c13),_0x4a8035[_0x494385([0x74,0x68,0x65,0x6e])](_0x2ee07d=>{_0x2ee07d!=_0x494385([0x56,0x61,0x6c,0x69,0x64])&&_0x5d3cf7(_0x2ee07d);},_0x1e4c13);}):_0x9dee94||_0x4a8035||_0x494385([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4faaa4(_0x26f6bb,_0x447782){return new window[(_0x494385([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2dd584=>{if(_0x138cf5())return _0x2dd584(_0x494385([0x56,0x61,0x6c,0x69,0x64]));_0x1fd44d(),_0x25cc58[_0x494385([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x494385([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2b9cf2=!0x1;const _0x5449b2=_0x20293c();function _0x1bdbc4(_0x5502fc){return!!_0x5502fc&&(typeof _0x5502fc===_0x494385([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5502fc===_0x494385([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5502fc[_0x494385([0x74,0x68,0x65,0x6e])]===_0x494385([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5502fc[_0x494385([0x63,0x61,0x74,0x63,0x68])]===_0x494385([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2742f3(_0x39432b){_0x6bc6d1(_0x39432b)[_0x494385([0x74,0x68,0x65,0x6e])](_0x4de8ac=>{if(!_0x4de8ac||_0x4de8ac[_0x494385([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x494385([0x6f,0x6b]))return _0x494385([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1b059c(_0x2ce9e2(_0x5449b2+_0x447782))!=_0x4de8ac[_0x494385([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x494385([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x494385([0x56,0x61,0x6c,0x69,0x64]);})[_0x494385([0x74,0x68,0x65,0x6e])](_0xf115d2=>(_0x1742b6(),_0xf115d2),()=>{const _0x24c93e=_0x59b2c7();return null==_0x24c93e?(_0x1742b6(),_0x494385([0x56,0x61,0x6c,0x69,0x64])):_0x494385(_0xe71585-_0x24c93e>(0x7753083a^_0xf658eb)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x494385([0x74,0x68,0x65,0x6e])](_0x2dd584)[_0x494385([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2dd584(_0x494385([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2c2c53=0x536962ba^_0xf658eb;function _0x1742b6(){const _0x21c7e8=_0x494385([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b059c(_0x2ce9e2(_0x26f6bb)),_0x25dd41=_0x3824ef(_0x1b059c(window[_0x494385([0x4d,0x61,0x74,0x68])][_0x494385([0x63,0x65,0x69,0x6c])](_0xe71585/_0x2c2c53)));window[_0x494385([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x494385([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x21c7e8,_0x25dd41);}function _0x59b2c7(){const _0x2007f9=_0x494385([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b059c(_0x2ce9e2(_0x26f6bb)),_0x522684=window[_0x494385([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x494385([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2007f9);return _0x522684?window[_0x494385([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3824ef(_0x522684),0x10)*_0x2c2c53:null;}function _0x6bc6d1(_0x4a8094){return new window[(_0x494385([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x11eeaf,_0x478cd7)=>{_0x4a8094[_0x494385([0x74,0x68,0x65,0x6e])](_0x11eeaf,_0x478cd7),window[_0x494385([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x478cd7,0x535e58fa^_0xf658eb);});}}_0x25cc58[_0x494385([0x6f,0x6e])](_0x494385([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x441b90,_0x3f2f69)=>{if(_0x3f2f69[0x0]!=_0x26f6bb)return _0x2dd584(_0x494385([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3f2f69[0x1]={..._0x3f2f69[0x1],[_0x494385([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5449b2};},{[_0x494385([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x494385([0x68,0x69,0x67,0x68])}),_0x25cc58[_0x494385([0x6f,0x6e])](_0x494385([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x507846=>{_0x1bdbc4(_0x507846[_0x494385([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2b9cf2=!0x0,_0x2742f3(_0x507846[_0x494385([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x494385([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x494385([0x6c,0x6f,0x77])}),_0xeea89[_0x494385([0x74,0x68,0x65,0x6e])](()=>{_0x2b9cf2||_0x2dd584(_0x494385([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x138cf5(){return _0x25cc58[_0x494385([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x494385([0x76,0x69,0x65,0x77])][_0x494385([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x494385([0x61,0x75,0x74,0x6f]);}function _0x1fd44d(){_0x25cc58[_0x494385([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x494385([0x76,0x69,0x65,0x77])][_0x494385([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x494385([0x61,0x75,0x74,0x6f]);}}function _0x2b91c4(_0x546190){const _0x4db27c=[new window[(_0x494385([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x356e9f=>setTimeout(_0x356e9f,0x5356b2f6^_0xf658eb)),_0xeea89[_0x494385([0x74,0x68,0x65,0x6e])](()=>new window[(_0x494385([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36ec68=>{let _0x15cc29=0x0;_0x25cc58[_0x494385([0x6d,0x6f,0x64,0x65,0x6c])][_0x494385([0x6f,0x6e])](_0x494385([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x38cee,_0x5667c0)=>{_0x5667c0[0x0][_0x494385([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x15cc29++,_0x15cc29==(0x535f8dc2^_0xf658eb)&&(_0x36ec68(),_0x38cee[_0x494385([0x6f,0x66,0x66])]());});}))];return window[_0x494385([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x494385([0x72,0x61,0x63,0x65])](_0x4db27c)[_0x494385([0x74,0x68,0x65,0x6e])](()=>_0x546190);}async function _0x7b4015(){await _0xeea89,_0x25cc58[_0x494385([0x6d,0x6f,0x64,0x65,0x6c])][_0x494385([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4b1d2c,_0x25cc58[_0x494385([0x6d,0x6f,0x64,0x65,0x6c])][_0x494385([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4b1d2c,_0x25cc58[_0x494385([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x494385([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3904ec(_0x3cd2b4){const _0x597f96=_0x49f69a();_0x25cc58[_0x597f96]=_0x494385([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3cd2b4,_0x3cd2b4!=_0x494385([0x56,0x61,0x6c,0x69,0x64])&&_0x7b4015();}function _0x49f69a(){const _0x481d54=window[_0x494385([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x494385([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x494385([0x6e,0x6f,0x77])]())[_0x494385([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x494385([0x2e]),'');let _0x236361=_0x494385([0x68]);for(let _0x1eec04=0x0;_0x1eec04<_0x481d54[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1eec04+=0x2){let _0x26a628=window[_0x494385([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x481d54[_0x494385([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1eec04,_0x1eec04+0x2));_0x26a628>=_0x3e2f5b[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x26a628-=_0x3e2f5b[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x236361+=_0x3e2f5b[_0x26a628];}return _0x236361;}function _0x1ffb66(){const _0x4dade1=_0x21e8d3[_0x494385([0x73,0x70,0x6c,0x69,0x74])](_0x494385([0x2e]));if(0x3!=_0x4dade1[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x170dd3(_0x4dade1[0x1]);function _0x170dd3(_0x393604){const _0x293559=_0x4f552f(_0x393604);return _0x293559&&_0x4222bf()?_0x293559:null;function _0x4222bf(){const _0x38330b=_0x293559[_0x494385([0x6a,0x74,0x69])],_0x369432=window[_0x494385([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x38330b[_0x494385([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x38330b[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5d45b6={..._0x293559,[_0x494385([0x6a,0x74,0x69])]:_0x38330b[_0x494385([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x38330b[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5d45b6[_0x494385([0x76,0x63])],_0x2ce9e2(_0x5d45b6)==_0x369432;}}}async function _0x386440(){let _0xc99582=!0x0;try{const _0x940fab=_0x21e8d3[_0x494385([0x73,0x70,0x6c,0x69,0x74])](_0x494385([0x2e])),[_0x55ee24,_0xd9f247,_0x1434f5]=_0x940fab;return _0x1fa85a(_0x55ee24),await _0x21e08a(_0x55ee24,_0xd9f247,_0x1434f5),_0xc99582;}catch{return!0x1;}function _0x1fa85a(_0x23bf14){const _0x5e5365=_0x4f552f(_0x23bf14);_0x5e5365&&_0x5e5365[_0x494385([0x61,0x6c,0x67])]==_0x494385([0x45,0x53,0x32,0x35,0x36])||(_0xc99582=!0x1);}async function _0x21e08a(_0x525567,_0xf82b5f,_0x1b6d8e){const _0x442729=window[_0x494385([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x494385([0x66,0x72,0x6f,0x6d])](_0x388f67(_0x1b6d8e),_0x9f132b=>_0x9f132b[_0x494385([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x33d84c=new window[(_0x494385([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x494385([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x525567+_0x494385([0x2e])+_0xf82b5f),_0x55aab1=window[_0x494385([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x494385([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x55aab1)return;const _0x573839=await _0x55aab1[_0x494385([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x494385([0x6a,0x77,0x6b]),_0x156c04,{[_0x494385([0x6e,0x61,0x6d,0x65])]:_0x494385([0x45,0x43,0x44,0x53,0x41]),[_0x494385([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x494385([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x494385([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x55aab1[_0x494385([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x494385([0x6e,0x61,0x6d,0x65])]:_0x494385([0x45,0x43,0x44,0x53,0x41]),[_0x494385([0x68,0x61,0x73,0x68])]:{[_0x494385([0x6e,0x61,0x6d,0x65])]:_0x494385([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x573839,_0x442729,_0x33d84c)||(_0xc99582=!0x1);}}function _0x4f552f(_0x3d142a){return _0x3d142a[_0x494385([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x494385([0x65,0x79]))?JSON[_0x494385([0x70,0x61,0x72,0x73,0x65])](_0x388f67(_0x3d142a)):null;}function _0x388f67(_0x3da5e2){return window[_0x494385([0x61,0x74,0x6f,0x62])](_0x3da5e2[_0x494385([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x494385([0x2b]))[_0x494385([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x494385([0x2f])));}function _0x2ce9e2(_0x461543){let _0x4f9bcd=0x1505;function _0x3a2bfc(_0x1878c9){for(let _0x243b32=0x0;_0x243b32<_0x1878c9[_0x494385([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x243b32++){const _0xcd0b0f=_0x1878c9[_0x494385([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x243b32);_0x4f9bcd=(_0x4f9bcd<<0x5)+_0x4f9bcd+_0xcd0b0f,_0x4f9bcd&=_0x4f9bcd;}}function _0x57bbc7(_0x4619bc){Array[_0x494385([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4619bc)?_0x4619bc[_0x494385([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x57bbc7):_0x4619bc&&typeof _0x4619bc==_0x494385([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x494385([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4619bc)[_0x494385([0x73,0x6f,0x72,0x74])]()[_0x494385([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2375d2,_0x57959c])=>{_0x3a2bfc(_0x2375d2),_0x57bbc7(_0x57959c);}):_0x3a2bfc(window[_0x494385([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4619bc));}return _0x57bbc7(_0x461543),_0x4f9bcd>>>0x0;}function _0x1b059c(_0x3b3c6b){return _0x3b3c6b[_0x494385([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x494385([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x494385([0x30]));}function _0x3824ef(_0x31b554){return _0x31b554[_0x494385([0x73,0x70,0x6c,0x69,0x74])]('')[_0x494385([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x494385([0x6a,0x6f,0x69,0x6e])]('');}function _0x4b1d2c(){}function _0x494385(_0x4405d8){const _0x311887=_0x1867;return _0x4405d8[_0x311887(0x150)](_0x28cca0=>String[_0x311887(0x159)](_0x28cca0))[_0x311887(0x12d)]('');}_0x3904ec(await _0x438e33());}(this);}[_0x3912b1(0x129)](){const _0x13a7eb=_0x3912b1,_0x81434c=this[_0x13a7eb(0x115)][_0x13a7eb(0x12b)][_0x13a7eb(0x13b)];_0x81434c[_0x13a7eb(0x140)](_0x13a7eb(0x12e))&&_0x81434c[_0x13a7eb(0x149)](_0x13a7eb(0x12e),{'allowAttributes':[_0x13a7eb(0x134)]}),_0x81434c[_0x13a7eb(0x140)](_0x13a7eb(0x120))&&_0x81434c[_0x13a7eb(0x149)](_0x13a7eb(0x120),{'allowAttributes':[_0x13a7eb(0x134)]});}[_0x3912b1(0x111)](){const _0x57ecb4=_0x3912b1,_0xaaa6d=this[_0x57ecb4(0x115)];_0xaaa6d[_0x57ecb4(0x141)][_0x57ecb4(0x113)](_0x57ecb4(0x15f))[_0x57ecb4(0x144)]({'model':_0x57ecb4(0x134),'view':_0x57ecb4(0x126)}),_0xaaa6d[_0x57ecb4(0x141)][_0x57ecb4(0x113)](_0x57ecb4(0x11c))[_0x57ecb4(0x10b)]({'model':{'key':_0x57ecb4(0x134),'value':_0x3c4d07=>_0x3c4d07[_0x57ecb4(0x15c)](_0x57ecb4(0x126))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5a4ed9=_0xaaa6d[_0x57ecb4(0x152)][_0x57ecb4(0x121)](_0x57ecb4(0x154));_0x5a4ed9&&this[_0x57ecb4(0x118)](_0x5a4ed9,_0x57ecb4(0x156),(_0x55ab49,[_0x474ff1,_0x27d47c])=>{const _0x569195=_0x57ecb4;_0x474ff1[_0x569195(0x136)](_0x569195(0x134),_0x27d47c);});}[_0x3912b1(0x151)](){const _0x10f47a=_0x3912b1,_0x32b725=this[_0x10f47a(0x115)][_0x10f47a(0x142)][_0x10f47a(0x121)](_0x10f47a(0x135))||{},_0x25fba1=this[_0x10f47a(0x115)][_0x10f47a(0x142)][_0x10f47a(0x121)](_0x10f47a(0x137))||'';this[_0x10f47a(0x157)]=_0x47b04d(_0x4dff3a[_0x10f47a(0x14a)],_0x10f47a(0x11b),{..._0x32b725,'pubkey':_0x25fba1,'ctx-name':_0x10f47a(0x153)+this[_0x10f47a(0x148)],'sourceList':'','imgOnly':_0x10f47a(0x117),'removeCopyright':_0x10f47a(0x117),'localeName':this[_0x10f47a(0x115)][_0x10f47a(0x14b)][_0x10f47a(0x124)],'externalSourcesEmbedCss':_0x10f47a(0x14c)}),this[_0x10f47a(0x157)][_0x10f47a(0x13e)]=_0x1833d7=>{const _0x3f662c=_0x10f47a;if(_0x3f662c(0x11a)==_0x1833d7)return _0x3f662c(0x128);},_0x4dff3a[_0x10f47a(0x14a)][_0x10f47a(0x133)][_0x10f47a(0x155)](this[_0x10f47a(0x157)]);}[_0x3912b1(0x13f)](){const _0x1f6568=_0x3912b1;this[_0x1f6568(0x119)]=_0x47b04d(_0x4dff3a[_0x1f6568(0x14a)],_0x1f6568(0x15b),{'ctx-name':_0x1f6568(0x153)+this[_0x1f6568(0x148)]}),_0x4dff3a[_0x1f6568(0x14a)][_0x1f6568(0x133)][_0x1f6568(0x155)](this[_0x1f6568(0x119)]);}[_0x3912b1(0x12c)](){const _0x53d0b3=_0x3912b1,_0x8bb1f9=this[_0x53d0b3(0x115)][_0x53d0b3(0x152)][_0x53d0b3(0x121)](_0x53d0b3(0x139));_0x8bb1f9&&this[_0x53d0b3(0x118)](_0x8bb1f9,_0x53d0b3(0x10d),()=>{const _0x7a540d=_0x53d0b3,_0x431a6f=this[_0x7a540d(0x115)][_0x7a540d(0x12b)][_0x7a540d(0x14a)][_0x7a540d(0x123)][_0x7a540d(0x10a)]();_0x431a6f&&_0x431a6f[_0x7a540d(0x15c)](_0x7a540d(0x134))&&this[_0x7a540d(0x115)][_0x7a540d(0x138)][_0x7a540d(0x127)][_0x7a540d(0x14f)](_0x7a540d(0x15a),()=>{const _0x4230b0=_0x7a540d;_0x329e58(this[_0x4230b0(0x115)],_0x431a6f);});});const _0x3c394c=this[_0x53d0b3(0x115)][_0x53d0b3(0x152)][_0x53d0b3(0x121)](_0x53d0b3(0x114));_0x3c394c&&this[_0x53d0b3(0x118)](_0x3c394c,_0x53d0b3(0x10d),()=>{const _0x5895a1=_0x53d0b3,_0x2cc00b=this[_0x5895a1(0x115)][_0x5895a1(0x12b)][_0x5895a1(0x14a)][_0x5895a1(0x123)][_0x5895a1(0x10a)]();_0x2cc00b&&_0x2cc00b[_0x5895a1(0x15c)](_0x5895a1(0x134))&&this[_0x5895a1(0x115)][_0x5895a1(0x138)][_0x5895a1(0x127)][_0x5895a1(0x14f)](_0x5895a1(0x15a),()=>{const _0x4a3fa1=_0x5895a1;_0x329e58(this[_0x4a3fa1(0x115)],_0x2cc00b);});});}}
|
|
23
|
+
const _0x3d3123=_0x4525;(function(_0x56a265,_0x8950ed){const _0x3c4b3a=_0x4525,_0x293877=_0x56a265();while(!![]){try{const _0x50d415=parseInt(_0x3c4b3a(0x1fd))/0x1*(-parseInt(_0x3c4b3a(0x206))/0x2)+-parseInt(_0x3c4b3a(0x1fe))/0x3+parseInt(_0x3c4b3a(0x204))/0x4*(parseInt(_0x3c4b3a(0x240))/0x5)+-parseInt(_0x3c4b3a(0x20b))/0x6*(-parseInt(_0x3c4b3a(0x241))/0x7)+-parseInt(_0x3c4b3a(0x208))/0x8*(-parseInt(_0x3c4b3a(0x210))/0x9)+parseInt(_0x3c4b3a(0x23b))/0xa+-parseInt(_0x3c4b3a(0x20f))/0xb*(parseInt(_0x3c4b3a(0x226))/0xc);if(_0x50d415===_0x8950ed)break;else _0x293877['push'](_0x293877['shift']());}catch(_0x4a0e37){_0x293877['push'](_0x293877['shift']());}}}(_0x3ba0,0x4fa1c));import{Plugin as _0x12efc3}from'ckeditor5/src/core.js';import{Dialog as _0x225bd4}from'ckeditor5/src/ui.js';function _0x3ba0(){const _0x588639=['document','true','UploadcareEditing','elementToAttribute','commands','uploader-','attributeToAttribute','replaceImageSource','isOfficialPlugin','href','locale','2DeFphH','65187hSjgqq','remove','add','closeMax','cleanupImage','extend','88tSYbeL','uc-upload-ctx-provider','444520MrxWyr','execute','282304kNcpUS','pluginName','ctxElement','192tkKgFb','get','uploadcare','schema','6084782QzPMop','162vccJpv','imageInline','fromCharCode','_initImageProcessingIndicator','_ctxElement','requires','iconHrefResolver','_initCtx','\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','once','uploadcare.uploader','body','editing','uploadcareImageId','_initConversion','contentLanguage','isRegistered','upcast','getSelectedElement','uc-config','_configElement','afterInit','24BQyfUQ','PictureEditing','downcast','#uc-icon-arrow-down','render','destroy','view','querySelector','imageBlock','appendChild','_initConfig','listenTo','getAttribute','input[uploadcare-file-input]','data-uc-image-id','removeAttribute','config','uploadcareImageReplace','join','configElement','model','4768350lDQpDC','ucContextId','uploadcare.pubkey','for','conversion','136845atrrmV','40383FZcSeE','isPremiumPlugin','init','insertImage','_initSchema','map','editor','selection'];_0x3ba0=function(){return _0x588639;};return _0x3ba0();}import{createElement as _0x54e05c,global as _0x446359,uid as _0x241b61}from'ckeditor5/src/utils.js';function _0x4525(_0x45a877,_0x1c93eb){const _0x3ba080=_0x3ba0();return _0x4525=function(_0x45251c,_0x2b6ac8){_0x45251c=_0x45251c-0x1ee;let _0x5f2faa=_0x3ba080[_0x45251c];return _0x5f2faa;},_0x4525(_0x45a877,_0x1c93eb);}import{UploadcareCommand as _0xfd159b}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x91f705}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x5ed4aa}from'./utils/editingutils.js';export class UploadcareEditing extends _0x12efc3{[_0x3d3123(0x224)]=null;[_0x3d3123(0x214)]=null;static get[_0x3d3123(0x209)](){const _0x2b383e=_0x3d3123;return _0x2b383e(0x1f4);}static get[_0x3d3123(0x215)](){const _0xd8b576=_0x3d3123;return[_0xd8b576(0x227),_0x91f705,_0x225bd4];}static get[_0x3d3123(0x1fa)](){return!0x0;}static get[_0x3d3123(0x242)](){return!0x0;}[_0x3d3123(0x23c)];get[_0x3d3123(0x239)](){const _0x404c3e=_0x3d3123;return this[_0x404c3e(0x224)];}get[_0x3d3123(0x20a)](){const _0x290374=_0x3d3123;return this[_0x290374(0x214)];}constructor(_0x402a02){const _0x2b12de=_0x3d3123;super(_0x402a02),this[_0x2b12de(0x23c)]=_0x241b61();}[_0x3d3123(0x243)](){const _0xd610c2=_0x3d3123,_0x3954da=this[_0xd610c2(0x1f0)];_0x3954da[_0xd610c2(0x1f6)][_0xd610c2(0x200)](_0xd610c2(0x20d),new _0xfd159b(_0x3954da));}[_0x3d3123(0x225)](){const _0x39485f=_0x3d3123;this[_0x39485f(0x1ee)](),this[_0x39485f(0x21e)](),this[_0x39485f(0x230)](),this[_0x39485f(0x217)](),this[_0x39485f(0x213)](),this[_0x39485f(0x231)](this[_0x39485f(0x1f0)],_0x39485f(0x22b),()=>{const _0x5a9eeb=_0x39485f;this[_0x5a9eeb(0x224)]&&(this[_0x5a9eeb(0x224)][_0x5a9eeb(0x1ff)](),this[_0x5a9eeb(0x224)]=null),this[_0x5a9eeb(0x214)]&&(this[_0x5a9eeb(0x214)][_0x5a9eeb(0x1ff)](),this[_0x5a9eeb(0x214)]=null);const _0x348c88=_0x446359[_0x5a9eeb(0x1f2)][_0x5a9eeb(0x22d)](_0x5a9eeb(0x233));_0x348c88&&_0x348c88[_0x5a9eeb(0x1ff)]();}),async function(_0x4298a9){const _0x2e654b=_0x6ef0f([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x3da315=0x535f8c3a,_0x3b838f=0x5358faea^_0x3da315,_0x1c06ca=window[_0x6ef0f([0x44,0x61,0x74,0x65])][_0x6ef0f([0x6e,0x6f,0x77])](),_0x55aa20=_0x4298a9[_0x6ef0f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x47ff30=new window[(_0x6ef0f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16069f=>{_0x55aa20[_0x6ef0f([0x6f,0x6e,0x63,0x65])](_0x6ef0f([0x72,0x65,0x61,0x64,0x79]),_0x16069f);}),_0x444267={[_0x6ef0f([0x6b,0x74,0x79])]:_0x6ef0f([0x45,0x43]),[_0x6ef0f([0x75,0x73,0x65])]:_0x6ef0f([0x73,0x69,0x67]),[_0x6ef0f([0x63,0x72,0x76])]:_0x6ef0f([0x50,0x2d,0x32,0x35,0x36]),[_0x6ef0f([0x78])]:_0x6ef0f([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]),[_0x6ef0f([0x79])]:_0x6ef0f([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]),[_0x6ef0f([0x61,0x6c,0x67])]:_0x6ef0f([0x45,0x53,0x32,0x35,0x36])},_0x5936ff=_0x55aa20[_0x6ef0f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x6ef0f([0x67,0x65,0x74])](_0x6ef0f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x42810d(){let _0x346a6b,_0x4d8a1f=null,_0x1c7ad3=null;try{if(_0x5936ff==_0x6ef0f([0x47,0x50,0x4c]))return _0x6ef0f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x346a6b=_0x4c400e(),!_0x346a6b)return _0x6ef0f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x346a6b[_0x6ef0f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1c7ad3=_0xbbb8ce(_0x346a6b[_0x6ef0f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x346a6b[_0x6ef0f([0x6a,0x74,0x69])])),await _0x3299e0()?_0x16fb71()?_0x5c85bc()?_0x6ef0f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1e65f0()?(_0x346a6b[_0x6ef0f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x6ef0f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4d8a1f=_0x19b0fc(_0x6ef0f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x346a6b[_0x6ef0f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x6ef0f([0x74,0x72,0x69,0x61,0x6c])&&(_0x4d8a1f=_0x19b0fc(_0x6ef0f([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x27cc97()):_0x6ef0f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x6ef0f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x6ef0f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x6ef0f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5c85bc(){const _0x1b1c9b=[_0x6ef0f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x6ef0f([0x74,0x72,0x69,0x61,0x6c])][_0x6ef0f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x346a6b[_0x6ef0f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1c06ca/0x3e8:0xe10*_0x3b838f;return _0x346a6b[_0x6ef0f([0x65,0x78,0x70])]<_0x1b1c9b;}function _0x16fb71(){const _0x3322bc=_0x346a6b[_0x6ef0f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3322bc&&(!!_0x3322bc[_0x6ef0f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6ef0f([0x2a]))||!!_0x3322bc[_0x6ef0f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6ef0f([0x55,0x50,0x4c,0x43])));}function _0x1e65f0(){const _0x3607b7=_0x4525,_0x5c246b=_0x346a6b[_0x6ef0f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5c246b||0x0==_0x5c246b[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x180428}=new URL(window[_0x6ef0f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x3607b7(0x1fb)]);if(_0x5c246b[_0x6ef0f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x180428))return!0x0;const _0x35ddb5=_0x180428[_0x6ef0f([0x73,0x70,0x6c,0x69,0x74])](_0x6ef0f([0x2e]));return _0x5c246b[_0x6ef0f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xba33a5=>_0xba33a5[_0x6ef0f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6ef0f([0x2a])))[_0x6ef0f([0x6d,0x61,0x70])](_0x5d2378=>_0x5d2378[_0x6ef0f([0x73,0x70,0x6c,0x69,0x74])](_0x6ef0f([0x2e])))[_0x6ef0f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x29ef0c=>_0x29ef0c[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x35ddb5[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x6ef0f([0x6d,0x61,0x70])](_0x767361=>Array(_0x35ddb5[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x767361[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x6ef0f([0x66,0x69,0x6c,0x6c])](_0x767361[0x0]===_0x6ef0f([0x2a])?_0x6ef0f([0x2a]):'')[_0x6ef0f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x767361))[_0x6ef0f([0x73,0x6f,0x6d,0x65])](_0x26b0ed=>_0x35ddb5[_0x6ef0f([0x65,0x76,0x65,0x72,0x79])]((_0x151536,_0x30d45f)=>_0x26b0ed[_0x30d45f]===_0x151536||_0x26b0ed[_0x30d45f]===_0x6ef0f([0x2a])));}function _0x27cc97(){return _0x4d8a1f&&_0x1c7ad3?new window[(_0x6ef0f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x42bf4f,_0x299e5a)=>{_0x4d8a1f[_0x6ef0f([0x74,0x68,0x65,0x6e])](_0x42bf4f,_0x299e5a),_0x1c7ad3[_0x6ef0f([0x74,0x68,0x65,0x6e])](_0x5637f9=>{_0x5637f9!=_0x6ef0f([0x56,0x61,0x6c,0x69,0x64])&&_0x42bf4f(_0x5637f9);},_0x299e5a);}):_0x4d8a1f||_0x1c7ad3||_0x6ef0f([0x56,0x61,0x6c,0x69,0x64]);}}function _0xbbb8ce(_0x510359,_0x1c9264){return new window[(_0x6ef0f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c86a4=>{if(_0x5c24ca())return _0x3c86a4(_0x6ef0f([0x56,0x61,0x6c,0x69,0x64]));_0x4129b8(),_0x55aa20[_0x6ef0f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x6ef0f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5d3cd7=!0x1;const _0x2055a2=_0x241b61();function _0x49263c(_0x20f0f0){return!!_0x20f0f0&&(typeof _0x20f0f0===_0x6ef0f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x20f0f0===_0x6ef0f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x20f0f0[_0x6ef0f([0x74,0x68,0x65,0x6e])]===_0x6ef0f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x20f0f0[_0x6ef0f([0x63,0x61,0x74,0x63,0x68])]===_0x6ef0f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xcab3f6(_0x270744){_0x298cb2(_0x270744)[_0x6ef0f([0x74,0x68,0x65,0x6e])](_0x43afcb=>{if(!_0x43afcb||_0x43afcb[_0x6ef0f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x6ef0f([0x6f,0x6b]))return _0x6ef0f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4e31d6(_0x52f5a4(_0x2055a2+_0x1c9264))!=_0x43afcb[_0x6ef0f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x6ef0f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x6ef0f([0x56,0x61,0x6c,0x69,0x64]);})[_0x6ef0f([0x74,0x68,0x65,0x6e])](_0x533adc=>(_0x3fbd24(),_0x533adc),()=>{const _0x3fba33=_0x25458e();return null==_0x3fba33?(_0x3fbd24(),_0x6ef0f([0x56,0x61,0x6c,0x69,0x64])):_0x6ef0f(_0x1c06ca-_0x3fba33>(0x7753083a^_0x3da315)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x6ef0f([0x74,0x68,0x65,0x6e])](_0x3c86a4)[_0x6ef0f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3c86a4(_0x6ef0f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5d0229=0x536962ba^_0x3da315;function _0x3fbd24(){const _0x2e8faf=_0x6ef0f([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e31d6(_0x52f5a4(_0x510359)),_0x46e255=_0x19ecaf(_0x4e31d6(window[_0x6ef0f([0x4d,0x61,0x74,0x68])][_0x6ef0f([0x63,0x65,0x69,0x6c])](_0x1c06ca/_0x5d0229)));window[_0x6ef0f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x6ef0f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2e8faf,_0x46e255);}function _0x25458e(){const _0x4b826f=_0x6ef0f([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e31d6(_0x52f5a4(_0x510359)),_0x16425d=window[_0x6ef0f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x6ef0f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4b826f);return _0x16425d?window[_0x6ef0f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x19ecaf(_0x16425d),0x10)*_0x5d0229:null;}function _0x298cb2(_0x1ab9ed){return new window[(_0x6ef0f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d82cf,_0x4d22cd)=>{_0x1ab9ed[_0x6ef0f([0x74,0x68,0x65,0x6e])](_0x2d82cf,_0x4d22cd),window[_0x6ef0f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4d22cd,0x535e58fa^_0x3da315);});}}_0x55aa20[_0x6ef0f([0x6f,0x6e])](_0x6ef0f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x24184c,_0x3649f7)=>{if(_0x3649f7[0x0]!=_0x510359)return _0x3c86a4(_0x6ef0f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3649f7[0x1]={..._0x3649f7[0x1],[_0x6ef0f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2055a2};},{[_0x6ef0f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x6ef0f([0x68,0x69,0x67,0x68])}),_0x55aa20[_0x6ef0f([0x6f,0x6e])](_0x6ef0f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x37b346=>{_0x49263c(_0x37b346[_0x6ef0f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5d3cd7=!0x0,_0xcab3f6(_0x37b346[_0x6ef0f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x6ef0f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x6ef0f([0x6c,0x6f,0x77])}),_0x47ff30[_0x6ef0f([0x74,0x68,0x65,0x6e])](()=>{_0x5d3cd7||_0x3c86a4(_0x6ef0f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5c24ca(){return _0x55aa20[_0x6ef0f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x6ef0f([0x76,0x69,0x65,0x77])][_0x6ef0f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x6ef0f([0x61,0x75,0x74,0x6f]);}function _0x4129b8(){_0x55aa20[_0x6ef0f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x6ef0f([0x76,0x69,0x65,0x77])][_0x6ef0f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x6ef0f([0x61,0x75,0x74,0x6f]);}}function _0x19b0fc(_0xc2f83b){const _0x37fad6=[new window[(_0x6ef0f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x143635=>setTimeout(_0x143635,0x5356b2f6^_0x3da315)),_0x47ff30[_0x6ef0f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x6ef0f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a9dfc=>{let _0x25f912=0x0;_0x55aa20[_0x6ef0f([0x6d,0x6f,0x64,0x65,0x6c])][_0x6ef0f([0x6f,0x6e])](_0x6ef0f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4fd98f,_0x34b2d5)=>{_0x34b2d5[0x0][_0x6ef0f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x25f912++,_0x25f912==(0x535f8dc2^_0x3da315)&&(_0x3a9dfc(),_0x4fd98f[_0x6ef0f([0x6f,0x66,0x66])]());});}))];return window[_0x6ef0f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x6ef0f([0x72,0x61,0x63,0x65])](_0x37fad6)[_0x6ef0f([0x74,0x68,0x65,0x6e])](()=>_0xc2f83b);}async function _0x3a28b3(){await _0x47ff30,_0x55aa20[_0x6ef0f([0x6d,0x6f,0x64,0x65,0x6c])][_0x6ef0f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4c2b13,_0x55aa20[_0x6ef0f([0x6d,0x6f,0x64,0x65,0x6c])][_0x6ef0f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4c2b13,_0x55aa20[_0x6ef0f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x6ef0f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x15e0d9(_0x22f2a3){const _0x33d09f=_0x35fee6();_0x55aa20[_0x33d09f]=_0x6ef0f([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x22f2a3,_0x22f2a3!=_0x6ef0f([0x56,0x61,0x6c,0x69,0x64])&&_0x3a28b3();}function _0x35fee6(){const _0x5c0d71=window[_0x6ef0f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x6ef0f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x6ef0f([0x6e,0x6f,0x77])]())[_0x6ef0f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x6ef0f([0x2e]),'');let _0x3d0491=_0x6ef0f([0x68]);for(let _0x235cb0=0x0;_0x235cb0<_0x5c0d71[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x235cb0+=0x2){let _0x5e711f=window[_0x6ef0f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c0d71[_0x6ef0f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x235cb0,_0x235cb0+0x2));_0x5e711f>=_0x2e654b[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5e711f-=_0x2e654b[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3d0491+=_0x2e654b[_0x5e711f];}return _0x3d0491;}function _0x4c400e(){const _0x20e7fd=_0x5936ff[_0x6ef0f([0x73,0x70,0x6c,0x69,0x74])](_0x6ef0f([0x2e]));if(0x3!=_0x20e7fd[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x44fa74(_0x20e7fd[0x1]);function _0x44fa74(_0xdee663){const _0x45461c=_0x439ada(_0xdee663);return _0x45461c&&_0x4e6ac8()?_0x45461c:null;function _0x4e6ac8(){const _0x3c2d98=_0x45461c[_0x6ef0f([0x6a,0x74,0x69])],_0x6729aa=window[_0x6ef0f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3c2d98[_0x6ef0f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3c2d98[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x30e051={..._0x45461c,[_0x6ef0f([0x6a,0x74,0x69])]:_0x3c2d98[_0x6ef0f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3c2d98[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x30e051[_0x6ef0f([0x76,0x63])],_0x52f5a4(_0x30e051)==_0x6729aa;}}}async function _0x3299e0(){let _0x30c6cc=!0x0;try{const _0x39e8e7=_0x5936ff[_0x6ef0f([0x73,0x70,0x6c,0x69,0x74])](_0x6ef0f([0x2e])),[_0x2891c2,_0x27d8b7,_0x36df41]=_0x39e8e7;return _0x42aef5(_0x2891c2),await _0x360e39(_0x2891c2,_0x27d8b7,_0x36df41),_0x30c6cc;}catch{return!0x1;}function _0x42aef5(_0x45d3d){const _0x3ab2df=_0x439ada(_0x45d3d);_0x3ab2df&&_0x3ab2df[_0x6ef0f([0x61,0x6c,0x67])]==_0x6ef0f([0x45,0x53,0x32,0x35,0x36])||(_0x30c6cc=!0x1);}async function _0x360e39(_0x50c328,_0x5aca90,_0x3c6a1e){const _0x28ef64=window[_0x6ef0f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x6ef0f([0x66,0x72,0x6f,0x6d])](_0x198766(_0x3c6a1e),_0x3161d5=>_0x3161d5[_0x6ef0f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3f1d60=new window[(_0x6ef0f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x6ef0f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x50c328+_0x6ef0f([0x2e])+_0x5aca90),_0x637043=window[_0x6ef0f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x6ef0f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x637043)return;const _0x9333cc=await _0x637043[_0x6ef0f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x6ef0f([0x6a,0x77,0x6b]),_0x444267,{[_0x6ef0f([0x6e,0x61,0x6d,0x65])]:_0x6ef0f([0x45,0x43,0x44,0x53,0x41]),[_0x6ef0f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x6ef0f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x6ef0f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x637043[_0x6ef0f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x6ef0f([0x6e,0x61,0x6d,0x65])]:_0x6ef0f([0x45,0x43,0x44,0x53,0x41]),[_0x6ef0f([0x68,0x61,0x73,0x68])]:{[_0x6ef0f([0x6e,0x61,0x6d,0x65])]:_0x6ef0f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x9333cc,_0x28ef64,_0x3f1d60)||(_0x30c6cc=!0x1);}}function _0x439ada(_0x193dc9){return _0x193dc9[_0x6ef0f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x6ef0f([0x65,0x79]))?JSON[_0x6ef0f([0x70,0x61,0x72,0x73,0x65])](_0x198766(_0x193dc9)):null;}function _0x198766(_0x2d426f){return window[_0x6ef0f([0x61,0x74,0x6f,0x62])](_0x2d426f[_0x6ef0f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x6ef0f([0x2b]))[_0x6ef0f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x6ef0f([0x2f])));}function _0x52f5a4(_0x251ecd){let _0x52872c=0x1505;function _0x50730f(_0xdd4d3c){for(let _0x4c1163=0x0;_0x4c1163<_0xdd4d3c[_0x6ef0f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4c1163++){const _0x5c0be1=_0xdd4d3c[_0x6ef0f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4c1163);_0x52872c=(_0x52872c<<0x5)+_0x52872c+_0x5c0be1,_0x52872c&=_0x52872c;}}function _0x18a64a(_0x21eb60){Array[_0x6ef0f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x21eb60)?_0x21eb60[_0x6ef0f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x18a64a):_0x21eb60&&typeof _0x21eb60==_0x6ef0f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x6ef0f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x21eb60)[_0x6ef0f([0x73,0x6f,0x72,0x74])]()[_0x6ef0f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x21ae34,_0x40651c])=>{_0x50730f(_0x21ae34),_0x18a64a(_0x40651c);}):_0x50730f(window[_0x6ef0f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x21eb60));}return _0x18a64a(_0x251ecd),_0x52872c>>>0x0;}function _0x4e31d6(_0x205dc9){return _0x205dc9[_0x6ef0f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x6ef0f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x6ef0f([0x30]));}function _0x19ecaf(_0x24aa5c){return _0x24aa5c[_0x6ef0f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x6ef0f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x6ef0f([0x6a,0x6f,0x69,0x6e])]('');}function _0x4c2b13(){}function _0x6ef0f(_0x80d602){const _0x331c2d=_0x4525;return _0x80d602[_0x331c2d(0x1ef)](_0x5d7467=>String[_0x331c2d(0x212)](_0x5d7467))[_0x331c2d(0x238)]('');}_0x15e0d9(await _0x42810d());}(this);}[_0x3d3123(0x1ee)](){const _0x1dad55=_0x3d3123,_0x287165=this[_0x1dad55(0x1f0)][_0x1dad55(0x23a)][_0x1dad55(0x20e)];_0x287165[_0x1dad55(0x220)](_0x1dad55(0x22e))&&_0x287165[_0x1dad55(0x203)](_0x1dad55(0x22e),{'allowAttributes':[_0x1dad55(0x21d)]}),_0x287165[_0x1dad55(0x220)](_0x1dad55(0x211))&&_0x287165[_0x1dad55(0x203)](_0x1dad55(0x211),{'allowAttributes':[_0x1dad55(0x21d)]});}[_0x3d3123(0x21e)](){const _0x2da62a=_0x3d3123,_0x31bd3f=this[_0x2da62a(0x1f0)];_0x31bd3f[_0x2da62a(0x23f)][_0x2da62a(0x23e)](_0x2da62a(0x228))[_0x2da62a(0x1f8)]({'model':_0x2da62a(0x21d),'view':_0x2da62a(0x234)}),_0x31bd3f[_0x2da62a(0x23f)][_0x2da62a(0x23e)](_0x2da62a(0x221))[_0x2da62a(0x1f5)]({'model':{'key':_0x2da62a(0x21d),'value':_0x5dc847=>_0x5dc847[_0x2da62a(0x232)](_0x2da62a(0x234))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4aab54=_0x31bd3f[_0x2da62a(0x1f6)][_0x2da62a(0x20c)](_0x2da62a(0x1f9));_0x4aab54&&this[_0x2da62a(0x231)](_0x4aab54,_0x2da62a(0x202),(_0xfc5cba,[_0x409166,_0x1c7d34])=>{const _0x144047=_0x2da62a;_0x409166[_0x144047(0x235)](_0x144047(0x21d),_0x1c7d34);});}[_0x3d3123(0x230)](){const _0x4ddf8d=_0x3d3123,_0x113093=this[_0x4ddf8d(0x1f0)][_0x4ddf8d(0x236)][_0x4ddf8d(0x20c)](_0x4ddf8d(0x21a))||{},_0x41628c=this[_0x4ddf8d(0x1f0)][_0x4ddf8d(0x236)][_0x4ddf8d(0x20c)](_0x4ddf8d(0x23d))||'';this[_0x4ddf8d(0x224)]=_0x54e05c(_0x446359[_0x4ddf8d(0x1f2)],_0x4ddf8d(0x223),{..._0x113093,'pubkey':_0x41628c,'ctx-name':_0x4ddf8d(0x1f7)+this[_0x4ddf8d(0x23c)],'sourceList':'','imgOnly':_0x4ddf8d(0x1f3),'removeCopyright':_0x4ddf8d(0x1f3),'localeName':this[_0x4ddf8d(0x1f0)][_0x4ddf8d(0x1fc)][_0x4ddf8d(0x21f)],'externalSourcesEmbedCss':_0x4ddf8d(0x218)}),this[_0x4ddf8d(0x224)][_0x4ddf8d(0x216)]=_0x54c0d0=>{const _0x5d3973=_0x4ddf8d;if(_0x5d3973(0x201)==_0x54c0d0)return _0x5d3973(0x229);},_0x446359[_0x4ddf8d(0x1f2)][_0x4ddf8d(0x21b)][_0x4ddf8d(0x22f)](this[_0x4ddf8d(0x224)]);}[_0x3d3123(0x217)](){const _0x48edaa=_0x3d3123;this[_0x48edaa(0x214)]=_0x54e05c(_0x446359[_0x48edaa(0x1f2)],_0x48edaa(0x205),{'ctx-name':_0x48edaa(0x1f7)+this[_0x48edaa(0x23c)]}),_0x446359[_0x48edaa(0x1f2)][_0x48edaa(0x21b)][_0x48edaa(0x22f)](this[_0x48edaa(0x214)]);}[_0x3d3123(0x213)](){const _0x4bb373=_0x3d3123,_0x259c0d=this[_0x4bb373(0x1f0)][_0x4bb373(0x1f6)][_0x4bb373(0x20c)](_0x4bb373(0x244));_0x259c0d&&this[_0x4bb373(0x231)](_0x259c0d,_0x4bb373(0x207),()=>{const _0x35da95=_0x4bb373,_0x1d641b=this[_0x35da95(0x1f0)][_0x35da95(0x23a)][_0x35da95(0x1f2)][_0x35da95(0x1f1)][_0x35da95(0x222)]();_0x1d641b&&_0x1d641b[_0x35da95(0x232)](_0x35da95(0x21d))&&this[_0x35da95(0x1f0)][_0x35da95(0x21c)][_0x35da95(0x22c)][_0x35da95(0x219)](_0x35da95(0x22a),()=>{const _0x2ab474=_0x35da95;_0x5ed4aa(this[_0x2ab474(0x1f0)],_0x1d641b);});});const _0x3dba02=this[_0x4bb373(0x1f0)][_0x4bb373(0x1f6)][_0x4bb373(0x20c)](_0x4bb373(0x237));_0x3dba02&&this[_0x4bb373(0x231)](_0x3dba02,_0x4bb373(0x207),()=>{const _0x390849=_0x4bb373,_0x35cab2=this[_0x390849(0x1f0)][_0x390849(0x23a)][_0x390849(0x1f2)][_0x390849(0x1f1)][_0x390849(0x222)]();_0x35cab2&&_0x35cab2[_0x390849(0x232)](_0x390849(0x21d))&&this[_0x390849(0x1f0)][_0x390849(0x21c)][_0x390849(0x22c)][_0x390849(0x219)](_0x390849(0x22a),()=>{const _0x4160f6=_0x390849;_0x5ed4aa(this[_0x4160f6(0x1f0)],_0x35cab2);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x206eb4,ObservableMixin as _0x49b5a6}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x2eabe5}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x4f4e1b}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0xb750aa}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x353cbe}from'../../utils/uploadutils.js';import{getImageUrls as _0x42044e,getImageDimension as _0x47d1ad}from'../../utils/editingutils.js';import{isAncestor as _0x276e0d}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x49b5a6(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x16f396,_0x123a01,_0x4a111a){super(),this['_editor']=_0x16f396,this['_dialog']=_0x123a01,this['_imageElement']=_0x4a111a,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 _0x40a720=this['_imageElement'],_0x39d260=_0x40a720['getAttribute']('uploadcareImageId'),_0x1b8f92=_0x40a720['getAttribute']('src');if(_0x39d260)await this['_loadImageInfo'](_0x39d260,_0x1b8f92);else{if(this['_imageCache']['has'](_0x1b8f92)){const _0x4a0c05=this['_imageCache']['get'](_0x1b8f92);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4a0c05['url'],this['imageDimension']=_0x4a0c05['dimension'],this['imageId']=_0x4a0c05['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x51e8a4}=this['_editor'],t=_0x51e8a4['t'],_0x48eccb=new _0xb750aa(_0x51e8a4,this['imageStatus'],this['_attributes']);_0x48eccb['bind']('status')['to'](this,'imageStatus'),_0x48eccb['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x48eccb['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x48eccb['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x48eccb,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4f4e1b,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x48eccb,'position':_0x2eabe5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x48eccb['focus']();},'onHide':()=>{_0x48eccb['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x42e835=>!_0x276e0d(_0x42e835,_0x48eccb['element'])}});}['_loadImageInfo'](_0x56af8d,_0x473390){return _0x353cbe['getInfo'](_0x56af8d,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x5e95e4=>{const {width:_0x49dd6d,height:_0x3f2910}=_0x5e95e4['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x473390,this['imageDimension']={'width':_0x49dd6d,'height':_0x3f2910},this['imageId']=_0x56af8d;})['catch'](_0x420a35=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x420a35['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1de891,_0x5133ce){return this['_getImageAsFile'](_0x1de891)['then'](_0x478d73=>_0x353cbe['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':_0x5133ce['signal'],'file':_0x478d73,'onProgress':_0x5de966=>{_0x5de966&&_0x5de966['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5de966['value']));}}))['then'](_0x539e6d=>{const {width:_0x329e85,height:_0x7c5f33}=_0x539e6d['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x539e6d['cdnUrl'],this['imageDimension']={'width':_0x329e85,'height':_0x7c5f33},this['imageId']=_0x539e6d['uuid'],this['imageUploadProgress']=null;const _0x59d33b=_0x1de891['getAttribute']('src');this['_imageCache']['set'](_0x59d33b,{'id':_0x539e6d['uuid'],'url':_0x539e6d['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x59fbff=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x59fbff['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x4b2846,_0x4e4eb0){_0x4b2846['on']('apply',(_0x4a8030,_0x5e5044)=>{this['_replaceImage'](_0x4e4eb0,_0x5e5044['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x4b2846['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x4b2846['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2b19a0,_0x5e5121,_0x216e0f){const _0x1368db=this['_editor'],{width:_0xd26c5d,height:_0x442012}=_0x47d1ad(_0x5e5121,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x27ca11,imageSources:_0x4dc576}=_0x42044e(_0x5e5121,_0xd26c5d);_0x1368db['model']['change'](_0xfcb466=>{if('$graveyard'===_0x2b19a0['root']['rootName']){_0x1368db['execute']('insertImage',{'imageType':_0x2b19a0['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2b19a0['getAttributes']()),'uploadcareImageId':_0x216e0f,'src':_0x27ca11,'sources':_0x4dc576,'width':_0xd26c5d,'height':_0x442012}});const _0x183406=_0x2b19a0['getChildren']();_0x2b19a0=_0x1368db['model']['document']['selection']['getSelectedElement']();for(const _0x2868bd of _0x183406)_0xfcb466['append'](_0xfcb466['cloneElement'](_0x2868bd),_0x2b19a0);}else _0xfcb466['setSelection'](_0x2b19a0,'on'),_0x1368db['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2b19a0['getAttributes']()),'uploadcareImageId':_0x216e0f,'src':_0x27ca11,'sources':_0x4dc576,'width':_0xd26c5d,'height':_0x442012},_0x2b19a0);_0xfcb466['setSelection'](_0x2b19a0,'on');});}async['_getImageAsFile'](_0x14eaa8){const _0x219512=_0x206eb4['window'],_0x5a4705=_0x206eb4['document']['location']['href'],_0x21bedd=new _0x219512['URL'](_0x14eaa8['getAttribute']('src'),_0x5a4705);if('data:'===_0x21bedd['protocol']){const _0x27d3f1=_0x21bedd['href']['split'](','),_0x448c3d=_0x27d3f1[0x0]['match'](/:(.*?);/)[0x1],_0x1506de=_0x448c3d['split']('/')[0x1],_0x45f3a9=_0x219512['atob'](_0x27d3f1[_0x27d3f1['length']-0x1]);let _0x40f7bf=_0x45f3a9['length'];const _0x51f040=new _0x219512['Uint8Array'](_0x40f7bf);for(;_0x40f7bf--;)_0x51f040[_0x40f7bf]=_0x45f3a9['charCodeAt'](_0x40f7bf);return new _0x219512['File']([_0x51f040],'image.'+_0x1506de,{'type':_0x448c3d});}const _0x47a767=_0x21bedd['href']['split']('/'),_0x52d36e=_0x47a767[_0x47a767['length']-0x1],_0x1eaedb=_0x52d36e['split']('.')[0x1];return _0x219512['fetch'](_0x21bedd['href'])['then'](_0x139cba=>_0x139cba['clone']()['blob']())['then'](_0x148bf8=>new _0x219512['File']([_0x148bf8],_0x52d36e,{'type':'image/'+_0x1eaedb}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x4764af,_0x926991){const _0x48de97=_0x23d2,_0x195016=_0x4764af();while(!![]){try{const _0x21b204=-parseInt(_0x48de97(0x1c6))/0x1+parseInt(_0x48de97(0x1d1))/0x2*(-parseInt(_0x48de97(0x1d3))/0x3)+parseInt(_0x48de97(0x1cf))/0x4+parseInt(_0x48de97(0x1cb))/0x5*(-parseInt(_0x48de97(0x1c8))/0x6)+parseInt(_0x48de97(0x1c5))/0x7+parseInt(_0x48de97(0x1ce))/0x8+-parseInt(_0x48de97(0x1c4))/0x9*(parseInt(_0x48de97(0x1d2))/0xa);if(_0x21b204===_0x926991)break;else _0x195016['push'](_0x195016['shift']());}catch(_0x2bafb7){_0x195016['push'](_0x195016['shift']());}}}(_0x52fb,0xdf58f));function _0x23d2(_0xdcb81c,_0x26e91c){const _0x52fbcb=_0x52fb();return _0x23d2=function(_0x23d229,_0x36c24c){_0x23d229=_0x23d229-0x1c2;let _0x44699a=_0x52fbcb[_0x23d229];return _0x44699a;},_0x23d2(_0xdcb81c,_0x26e91c);}import{View as _0xbad432}from'ckeditor5/src/ui.js';function _0x52fb(){const _0x38fb57=['imageSrc','ck-uploadcare-theme','20065ACOXBP','bindTemplate','set','12949768hdrIph','5105880ezBmqI','uc-light','76534iBsaxM','490uNGcKK','60aNyxsv','uc-cloud-image-editor','image-edit','20133UzgOaw','7568176LQHeng','1331806VsKUIB','setTemplate','1278OvOtxf'];_0x52fb=function(){return _0x38fb57;};return _0x52fb();}export class UploadcareImageEditFormEditingView extends _0xbad432{constructor(_0x35d0ea,_0x99dcfe){const _0xa78046=_0x23d2;super(_0x35d0ea);const _0x4868f1=this[_0xa78046(0x1cc)];this[_0xa78046(0x1cd)](_0xa78046(0x1c9),''),this[_0xa78046(0x1c7)]({'tag':_0xa78046(0x1c2),'attributes':{..._0x99dcfe,'class':[_0xa78046(0x1d0),_0xa78046(0x1ca)],'ctx-name':_0xa78046(0x1c3),'cdn-url':_0x4868f1['to'](_0xa78046(0x1c9))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0xb352da}from'ckeditor5/src/icons.js';import{ButtonView as _0x2c7d7c,IconView as _0x10b6e7,View as _0xc8d0c9}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0xc8d0c9{constructor(_0x601443){super(_0x601443);const t=_0x601443['t'];this['set']('errorType',null);const _0x4b0897=new _0x2c7d7c(_0x601443);_0x4b0897['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4b0897['withText']=!0x0,_0x4b0897['class']='ck-button-action',_0x4b0897['on']('execute',()=>{this['fire']('retry');}),_0x4b0897['bind']('isVisible')['to'](this,'errorType',_0x13dced=>'NotFound'!==_0x13dced);const _0x28d5d6=new _0x10b6e7();_0x28d5d6['content']=_0xb352da,_0x28d5d6['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xe9a040=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':[_0x28d5d6,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xe9a040['to']('errorType',_0xc537ff=>t('NotFound'!==_0xc537ff?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4b0897]},{'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'}]}]}]});}}
|