@ckeditor/ckeditor5-uploadcare 46.0.2-alpha.1 → 46.0.2
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 _0x85db89,Command as _0x7a04f3}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x57b9f9,IconGooglePhotos as _0xfa0da1,IconGoogleDrive as _0x25161f,IconFacebook as _0xa72235,IconDropbox as _0x10b382,IconUploadcareLink as _0x2aa6c5,IconUploadcareImageUpload as _0x167e5a,IconError as _0x418721,IconUploadcareImageEdit as _0x392839}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x288df0,MenuBarMenuListItemButtonView as _0x530a55,View as _0x258260,FocusCycler as _0x2fcde6,Dialog as _0x383e34,DialogViewPosition as _0x1dd8f4,SpinnerView as _0x73833e,IconView as _0x25a90d,Notification as _0x50f59e}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x432df6,DomEmitterMixin as _0x41890b,global as _0x58c016,getAncestors as _0x283a9e,ObservableMixin as _0x1191c4,uid as _0x22fb7c,createElement as _0xe7009b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2e92b5}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0xd0ea36,info as _0x455418}from'@uploadcare/upload-client';import*as _0x3bf6e4 from'@uploadcare/file-uploader';var i=function(_0x56e962){return _0x56e962['Local']='local',_0x56e962['URL']='url',_0x56e962['Dropbox']='dropbox',_0x56e962['GDrive']='gdrive',_0x56e962['Facebook']='facebook',_0x56e962['GPhotos']='gphotos',_0x56e962['OneDrive']='onedrive',_0x56e962;}({});function _(_0x471e11,_0x13a226,_0x3447b5){const t=_0x471e11['t'],_0x3a9bc9=_0x471e11['t'];switch(_0x13a226){case i['Local']:return{'text':_0x3a9bc9('Insert'===_0x3447b5?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x3a9bc9('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x3447b5?_0x3a9bc9('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x3a9bc9('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x3447b5?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x3447b5?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x3447b5?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x3447b5?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x3447b5?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x13a226;}}class e extends _0x85db89{['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 _0x1d410c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x59cf68;for(const _0x314501 in _0x1d410c){const _0x42c857=_0x314501,_0x389458=_0x1d410c[_0x42c857];if('uploadcareLicenseKeyValid'==_0x389458||'uploadcareLicenseKeyInvalid'==_0x389458||'uploadcareLicenseKeyExpired'==_0x389458||'uploadcareLicenseKeyDomainLimit'==_0x389458||'uploadcareLicenseKeyNotAllowed'==_0x389458||'uploadcareLicenseKeyEvaluationLimit'==_0x389458||'uploadcareLicenseKeyTrialLimit'==_0x389458||'uploadcareLicenseKeyUsageLimit'==_0x389458){delete _0x1d410c[_0x42c857],_0x59cf68=_0x389458,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x59cf68&&_0x1d410c['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x59cf68&&_0x1d410c['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x59cf68&&_0x1d410c['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x59cf68&&_0x1d410c['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x59cf68&&_0x1d410c['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x59cf68&&_0x1d410c['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x59cf68&&_0x1d410c['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x47f7f9}=this,_0x58db0e=_0x47f7f9['commands']['get']('uploadcare');if(!_0x58db0e)return;const _0x1e1e87=this['_normalizeConfigSourceList'](_0x47f7f9['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x551313,_0x2091ac)=>{const _0x1f9a24=this['_getIntegrationKey'](_0x2091ac['type']);return _0x551313[_0x1f9a24]||(_0x551313[_0x1f9a24]=[]),_0x551313[_0x1f9a24]['push'](_0x2091ac),_0x551313;},{});_0x47f7f9['plugins']['has']('ImageInsertUI')&&_0x47f7f9['commands']['get']('uploadcare')&&Object['entries'](_0x1e1e87)['forEach'](([_0x52ea0f,_0x10b8da])=>{_0x47f7f9['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x52ea0f,'observable':()=>_0x58db0e,'buttonViewCreator':()=>this['_createToolbarButton'](_0x10b8da),'formViewCreator':()=>this['_createDropdownButtons'](_0x10b8da),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x10b8da),'override':'assetManager'!==_0x52ea0f});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x2e1599){const {locale:_0x53b8f4}=this['editor'];return _0x2e1599['map'](_0x1f6fbd=>{const _0x45d5e6=_(_0x53b8f4,_0x1f6fbd,'Insert');switch(_0x1f6fbd){case i['Local']:return{'icon':_0x167e5a,'type':i['Local'],..._0x45d5e6};case i['URL']:return{'icon':_0x2aa6c5,'type':i['URL'],..._0x45d5e6};case i['Dropbox']:return{'icon':_0x10b382,'type':i['Dropbox'],..._0x45d5e6};case i['Facebook']:return{'icon':_0xa72235,'type':i['Facebook'],..._0x45d5e6};case i['GDrive']:return{'icon':_0x25161f,'type':i['GDrive'],..._0x45d5e6};case i['GPhotos']:return{'icon':_0xfa0da1,'type':i['GPhotos'],..._0x45d5e6};case i['OneDrive']:return{'icon':_0x57b9f9,'type':i['OneDrive'],..._0x45d5e6};}});}['_getIntegrationKey'](_0x197854){switch(_0x197854){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x53747c,_0x2bfdcb){const _0x35114f=this['editor'],_0x43179d=new _0x53747c(_0x35114f['locale']),_0x2dac18=_0x35114f['commands']['get']('uploadcare');return _0x43179d['bind']('isEnabled')['to'](_0x2dac18),_0x43179d['on']('execute',()=>{_0x2dac18['execute'](_0x2bfdcb);}),_0x43179d;}['_createToolbarButton'](_0x47e76c){const {locale:_0x5a4f48}=this['editor'],_0x288c3f=this['editor']['plugins']['get']('ImageInsertUI'),_0x57c690=_0x47e76c[0x0],_0x351d25=this['_createButton'](_0x288df0,_0x57c690['type']);return _0x351d25['icon']=_0x57c690['icon'],_0x351d25['bind']('label')['to'](_0x288c3f,'isImageSelected',_0x5a72f1=>_(_0x5a4f48,_0x57c690['type'],_0x5a72f1?'Replace':'Insert')['text']),_0x351d25['tooltip']=!0x0,_0x351d25;}['_createDropdownButtons'](_0x3c1cf2){const {locale:_0x5d4b50}=this['editor'],_0x258328=this['editor']['plugins']['get']('ImageInsertUI');return _0x3c1cf2['map'](_0x211844=>{const _0x31157d=this['_createButton'](_0x288df0,_0x211844['type']);return _0x31157d['withText']=!0x0,_0x31157d['icon']=_0x211844['icon'],_0x31157d['bind']('label')['to'](_0x258328,'isImageSelected',_0x3f0364=>_(_0x5d4b50,_0x211844['type'],_0x3f0364?'Replace':'Insert')['text']),_0x31157d;});}['_createMenuBarButtons'](_0x14a4e0){return _0x14a4e0['map'](_0x22bb10=>{const _0x3116a8=this['_createButton'](_0x530a55,_0x22bb10['type']);return _0x3116a8['icon']=_0x22bb10['icon'],_0x3116a8['label']=_0x22bb10['shortText'],_0x3116a8;});}}class F extends _0x258260{['focusTracker'];['focusCycler'];constructor(_0x457ba5){super(_0x457ba5),this['focusTracker']=new _0x432df6(),this['focusCycler']=new _0x2fcde6({'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(_0x320d29,_0x567dd3){super(_0x320d29),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-'+_0x567dd3}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x45f470,_0x495011){const _0xcbc4ea=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x2eacb2=>_0x2eacb2<=_0x495011)['map'](_0x4ac4ec=>_0x45f470['replace'](/\/$/,'')+'/-/resize/'+_0x4ac4ec+'x/\x20'+_0x4ac4ec+'w');return{'imageFallbackUrl':_0x45f470,'imageSources':[{'srcset':_0xcbc4ea['join'](',\x20'),'sizes':'(max-width:\x20'+_0x495011+'px)\x20100vw,\x20'+_0x495011+'px','type':'image/webp'}]};}function C(_0xd34ca6,_0x36af80,_0x3c92d1){const _0x25c222=_0xd34ca6['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x25c222?parseInt(_0x25c222[0x1],0xa):_0x36af80,'height':_0x25c222?parseInt(_0x25c222[0x2],0xa):_0x3c92d1};}function p(_0x143fb6,_0x364c0f){const _0x27125a=new(_0x41890b())(),_0x547dc1=_0x143fb6['plugins']['get']('ImageUtils'),_0x57d5cd=_0x143fb6['editing']['mapper']['toViewElement'](_0x364c0f),_0x362cf5=_0x547dc1['findViewImgElement'](_0x57d5cd),_0x27a76d=_0x143fb6['editing']['view']['domConverter']['viewToDom'](_0x362cf5),_0x226462=_0x364c0f['getAttribute']('width'),_0x32b0a8=_0x364c0f['getAttribute']('height'),_0x4ca355='image-processing';_0x143fb6['editing']['view']['change'](_0x205c4c=>{_0x205c4c['addClass'](_0x4ca355,_0x57d5cd),_0x205c4c['setStyle']('aspect-ratio',_0x226462+'/'+_0x32b0a8,_0x362cf5);}),_0x27125a['listenTo'](_0x27a76d,'load',()=>{_0x27125a['stopListening'](_0x27a76d,'load'),_0x143fb6['editing']['view']['change'](_0x23d45e=>{_0x23d45e['removeClass'](_0x4ca355,_0x57d5cd),_0x23d45e['removeStyle']('aspect-ratio',_0x362cf5);});});}function G(_0x1e5430){if(Array['isArray'](_0x1e5430)){const _0x49613e=_0x1e5430['map'](G);return _0x184bba=>_0x49613e['some'](_0x3775aa=>_0x3775aa(_0x184bba));}if('origin'==_0x1e5430){const _0x355ec1=_0x58c016['window']['location']['origin'];return _0x52f1a5=>new URL(_0x52f1a5,_0x58c016['document']['baseURI'])['origin']==_0x355ec1;}return'function'==typeof _0x1e5430?_0x1e5430:_0x1e5430 instanceof RegExp?_0x10fc25=>!(!_0x10fc25['match'](_0x1e5430)&&!_0x10fc25['replace'](/^https?:\/\//,'')['match'](_0x1e5430)):()=>!0x1;}function S(_0x2d0736,_0x4b7abe){return _0x283a9e(_0x2d0736['target'])['includes'](_0x4b7abe);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x1191c4(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x3f1eac,_0x109b70,_0x2e256b){super(),this['_editor']=_0x3f1eac,this['_editing']=_0x109b70,this['_dialog']=_0x3f1eac['plugins']['get'](_0x383e34),this['_api']=_0x109b70['ctxElement']['getAPI'](),this['_type']=_0x2e256b,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:_0x43d3af,model:_0x4601f0}=this['_editor'],_0x4855f1=_0x4601f0['document']['selection']['getSelectedElement'](),_0x15be2c=_0x4855f1&&(_0x4855f1['is']('element','imageBlock')||_0x4855f1['is']('element','imageInline'));this['_formView']=new x(_0x43d3af,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x167e5a,'title':_(_0x43d3af,this['_type'],_0x15be2c?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x1dd8f4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1697e5=>!S(_0x1697e5,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x5d5ab4}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4bcf9b=>{const _0x2cf5a3=_0x5d5ab4['length'];for(const _0xaefe3d of _0x5d5ab4){const _0x40584d=_0xaefe3d===_0x5d5ab4[_0x2cf5a3-0x1],{cdnUrl:_0x410e92,fileInfo:_0x5a2e46}=_0xaefe3d;if(!_0x410e92||!_0x5a2e46)continue;const {width:_0x32dfe6,height:_0x26326a}=_0x5a2e46['imageInfo'],_0xa241f6=C(_0x410e92,_0x32dfe6,_0x26326a),_0x4109b7=k(_0x410e92,_0xa241f6['width']),_0x2a2ec2={'id':_0x5a2e46['uuid'],'type':'image','attributes':{'imageDimension':_0xa241f6,..._0x4109b7}};this['_insertAsset'](_0x2a2ec2,_0x40584d,_0x4bcf9b);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2e9e50=>{'idle'===_0x2e9e50['detail']['status']&&!_0x2e9e50['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x181e5b,_0x1bcc61,_0x5f4ae5){const _0x1402d7=this['_editor']['model']['document']['selection'],_0x194f42=_0x1402d7['getSelectedElement'](),_0x8cceaf=!(!_0x194f42||!_0x194f42['is']('element','imageInline'));_0x5f4ae5['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x181e5b,_0x8cceaf),_0x1bcc61||_0x5f4ae5['setSelection'](_0x1402d7['getLastPosition']());}['_insertImage'](_0x597971,_0x3acf30){const _0x359104=this['_editor'],{imageDimension:_0x596974,imageFallbackUrl:_0x214daf,imageSources:_0xf80aff}=_0x597971['attributes'];_0x359104['execute']('insertImage',{'imageType':_0x3acf30?'imageInline':null,'source':{'uploadcareImageId':_0x597971['id'],'src':_0x214daf,'sources':_0xf80aff,..._0x596974}});}}class w extends _0x7a04f3{['_editing'];['_controller']=null;static get['requires'](){return[_0x383e34,o];}constructor(_0x4aeb54){super(_0x4aeb54),this['_editing']=_0x4aeb54['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0xdcb44f){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0xdcb44f);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x21a04f,publicKey:_0x34aef7,signal:_0x24eb02,onProgress:_0xc6f206}){return _0xd0ea36(_0x21a04f,{'publicKey':_0x34aef7,'store':'auto','signal':_0x24eb02,'onProgress':_0xc6f206});}static['getInfo'](_0x4471d1,_0x6f48e8){return _0x455418(_0x4471d1,_0x6f48e8);}}class f extends _0x85db89{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2e92b5,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x5d0724=this['editor'];if(!!!_0x5d0724['config']['get']('uploadcare'))return;_0x5d0724['plugins']['get'](_0x2e92b5)['createUploadAdapter']=_0x49e021=>new A(_0x49e021,_0x5d0724),_0x5d0724['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0xc94c6c,{imageElement:_0x3d89c5,data:_0x4f02a0})=>{_0x5d0724['model']['change'](_0x12d009=>{_0x12d009['setAttribute']('uploadcareImageId',_0x4f02a0['uploadcareImageId'],_0x3d89c5);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x519975,_0x15cc58){this['loader']=_0x519975,this['editor']=_0x15cc58,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0xa34e61=this['editor']['config']['get']('uploadcare.pubkey'),_0xa71abf=await this['loader']['file'];return j['upload']({'file':_0xa71abf,'publicKey':_0xa34e61,'signal':this['controller']['signal'],'onProgress':_0x256070=>{_0x256070&&_0x256070['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x256070['value']);}})['then'](async _0x33bc9a=>{const {imageFallbackUrl:_0x2c7733,imageSources:_0x4dfa2e}=k(_0x33bc9a['cdnUrl'],_0x33bc9a['imageInfo']['width']);return{'uploadcareImageId':_0x33bc9a['uuid'],'default':_0x2c7733,'sources':_0x4dfa2e};})['catch'](()=>{const _0x3c081a=t('Cannot\x20upload\x20file:')+('\x20'+_0xa71abf['name']+'.');return Promise['reject'](_0x3c081a);});}['abort'](){this['controller']['abort']();}}class o extends _0x85db89{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x383e34];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x4bbb7b){super(_0x4bbb7b),this['ucContextId']=_0x22fb7c();}['init'](){const _0x43d5ed=this['editor'];_0x43d5ed['commands']['add']('uploadcare',new w(_0x43d5ed));}['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 _0x4eff45=_0x58c016['document']['querySelector']('input[uploadcare-file-input]');_0x4eff45&&_0x4eff45['remove']();}),async function(_0x450b78){const _0x5d6bc8=_0x40784d([0x49,0x45,0x68,0x61,0x4e,0x57,0x31,0x65,0x41,0x47,0x52,0x78,0x6c,0x77,0x39,0x73,0x51,0x76,0x43,0x50,0x59,0x46,0x69,0x4c,0x42,0x56,0x4f,0x4d,0x58,0x62,0x34,0x36,0x33,0x63,0x4a,0x37,0x7a,0x54,0x55,0x67,0x6a,0x53,0x44,0x66,0x6b,0x71,0x74,0x32,0x64,0x35,0x48,0x38,0x70,0x75,0x5a,0x72,0x6e,0x79,0x4b,0x6d,0x30,0x6f]),_0x1c1bc0=0x3cb71520,_0x53bc1b=0x3cb065c8^_0x1c1bc0,_0x299192=window[_0x40784d([0x44,0x61,0x74,0x65])][_0x40784d([0x6e,0x6f,0x77])](),_0x18b156=_0x450b78[_0x40784d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5c4dd9=new window[(_0x40784d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4af472=>{_0x18b156[_0x40784d([0x6f,0x6e,0x63,0x65])](_0x40784d([0x72,0x65,0x61,0x64,0x79]),_0x4af472);}),_0x5f29d9={[_0x40784d([0x6b,0x74,0x79])]:_0x40784d([0x45,0x43]),[_0x40784d([0x75,0x73,0x65])]:_0x40784d([0x73,0x69,0x67]),[_0x40784d([0x63,0x72,0x76])]:_0x40784d([0x50,0x2d,0x32,0x35,0x36]),[_0x40784d([0x78])]:_0x40784d([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]),[_0x40784d([0x79])]:_0x40784d([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]),[_0x40784d([0x61,0x6c,0x67])]:_0x40784d([0x45,0x53,0x32,0x35,0x36])},_0x369183=_0x18b156[_0x40784d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x40784d([0x67,0x65,0x74])](_0x40784d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x256462(){let _0x657d7e,_0x43d5e6=null,_0x431a4c=null;try{if(_0x369183==_0x40784d([0x47,0x50,0x4c]))return _0x40784d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x657d7e=_0x44f938(),!_0x657d7e)return _0x40784d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x657d7e[_0x40784d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x431a4c=_0x542b5a(_0x657d7e[_0x40784d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x657d7e[_0x40784d([0x6a,0x74,0x69])])),await _0x607671()?_0x7ec4ad()?_0x542f8f()?_0x40784d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2f8442()?(_0x657d7e[_0x40784d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x40784d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x43d5e6=_0x2dfaf4(_0x40784d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x657d7e[_0x40784d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x40784d([0x74,0x72,0x69,0x61,0x6c])&&(_0x43d5e6=_0x2dfaf4(_0x40784d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5955e1()):_0x40784d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x40784d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x40784d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x40784d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x542f8f(){const _0x581af3=[_0x40784d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x40784d([0x74,0x72,0x69,0x61,0x6c])][_0x40784d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x657d7e[_0x40784d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x299192/0x3e8:0xe10*_0x53bc1b;return _0x657d7e[_0x40784d([0x65,0x78,0x70])]<_0x581af3;}function _0x7ec4ad(){const _0x45cef1=_0x657d7e[_0x40784d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x45cef1&&(!!_0x45cef1[_0x40784d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x40784d([0x2a]))||!!_0x45cef1[_0x40784d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x40784d([0x55,0x50,0x4c,0x43])));}function _0x2f8442(){const _0x377d4c=_0x657d7e[_0x40784d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x377d4c||0x0==_0x377d4c[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x47b557}=new URL(window[_0x40784d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x377d4c[_0x40784d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47b557))return!0x0;const _0x2f06eb=_0x47b557[_0x40784d([0x73,0x70,0x6c,0x69,0x74])](_0x40784d([0x2e]));return _0x377d4c[_0x40784d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x55052e=>_0x55052e[_0x40784d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x40784d([0x2a])))[_0x40784d([0x6d,0x61,0x70])](_0x1f9f95=>_0x1f9f95[_0x40784d([0x73,0x70,0x6c,0x69,0x74])](_0x40784d([0x2e])))[_0x40784d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2aa5f3=>_0x2aa5f3[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2f06eb[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x40784d([0x6d,0x61,0x70])](_0x3f67c9=>Array(_0x2f06eb[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3f67c9[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x40784d([0x66,0x69,0x6c,0x6c])](_0x3f67c9[0x0]===_0x40784d([0x2a])?_0x40784d([0x2a]):'')[_0x40784d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3f67c9))[_0x40784d([0x73,0x6f,0x6d,0x65])](_0x4cb14c=>_0x2f06eb[_0x40784d([0x65,0x76,0x65,0x72,0x79])]((_0x1ae69b,_0x3a7800)=>_0x4cb14c[_0x3a7800]===_0x1ae69b||_0x4cb14c[_0x3a7800]===_0x40784d([0x2a])));}function _0x5955e1(){return _0x43d5e6&&_0x431a4c?new window[(_0x40784d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xf1e18c,_0x30c790)=>{_0x43d5e6[_0x40784d([0x74,0x68,0x65,0x6e])](_0xf1e18c,_0x30c790),_0x431a4c[_0x40784d([0x74,0x68,0x65,0x6e])](_0x40803c=>{_0x40803c!=_0x40784d([0x56,0x61,0x6c,0x69,0x64])&&_0xf1e18c(_0x40803c);},_0x30c790);}):_0x43d5e6||_0x431a4c||_0x40784d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x542b5a(_0x38104c,_0x3c114c){return new window[(_0x40784d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ede36=>{if(_0x16671b())return _0x2ede36(_0x40784d([0x56,0x61,0x6c,0x69,0x64]));_0x2c7499(),_0x18b156[_0x40784d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x40784d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3f0e4d=!0x1;const _0x216bd8=_0x22fb7c();function _0x20cd52(_0x188c8a){return!!_0x188c8a&&(typeof _0x188c8a===_0x40784d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x188c8a===_0x40784d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x188c8a[_0x40784d([0x74,0x68,0x65,0x6e])]===_0x40784d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x188c8a[_0x40784d([0x63,0x61,0x74,0x63,0x68])]===_0x40784d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1c3f8e(_0x54f235){_0x1899b5(_0x54f235)[_0x40784d([0x74,0x68,0x65,0x6e])](_0x3f3ba5=>{if(!_0x3f3ba5||_0x3f3ba5[_0x40784d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x40784d([0x6f,0x6b]))return _0x40784d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5399b0(_0x521571(_0x216bd8+_0x3c114c))!=_0x3f3ba5[_0x40784d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x40784d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x40784d([0x56,0x61,0x6c,0x69,0x64]);})[_0x40784d([0x74,0x68,0x65,0x6e])](_0x1b4f7c=>(_0x3e0eac(),_0x1b4f7c),()=>{const _0x3137f3=_0x1e2ebf();return null==_0x3137f3?(_0x3e0eac(),_0x40784d([0x56,0x61,0x6c,0x69,0x64])):_0x40784d(_0x299192-_0x3137f3>(0x18bb9120^_0x1c1bc0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x40784d([0x74,0x68,0x65,0x6e])](_0x2ede36)[_0x40784d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2ede36(_0x40784d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2174d1=0x3c81fba0^_0x1c1bc0;function _0x3e0eac(){const _0x42cb32=_0x40784d([0x6c,0x6c,0x63,0x74,0x2d])+_0x5399b0(_0x521571(_0x38104c)),_0xc94df8=_0x5f5e6f(_0x5399b0(window[_0x40784d([0x4d,0x61,0x74,0x68])][_0x40784d([0x63,0x65,0x69,0x6c])](_0x299192/_0x2174d1)));window[_0x40784d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x40784d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x42cb32,_0xc94df8);}function _0x1e2ebf(){const _0x12b19b=_0x40784d([0x6c,0x6c,0x63,0x74,0x2d])+_0x5399b0(_0x521571(_0x38104c)),_0x1de983=window[_0x40784d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x40784d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x12b19b);return _0x1de983?window[_0x40784d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5f5e6f(_0x1de983),0x10)*_0x2174d1:null;}function _0x1899b5(_0x48f911){return new window[(_0x40784d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4f1095,_0x51eaa7)=>{_0x48f911[_0x40784d([0x74,0x68,0x65,0x6e])](_0x4f1095,_0x51eaa7),window[_0x40784d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x51eaa7,0x3cb6c1e0^_0x1c1bc0);});}}_0x18b156[_0x40784d([0x6f,0x6e])](_0x40784d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1830ab,_0x50b3dd)=>{if(_0x50b3dd[0x0]!=_0x38104c)return _0x2ede36(_0x40784d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x50b3dd[0x1]={..._0x50b3dd[0x1],[_0x40784d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x216bd8};},{[_0x40784d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x40784d([0x68,0x69,0x67,0x68])}),_0x18b156[_0x40784d([0x6f,0x6e])](_0x40784d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x495df5=>{_0x20cd52(_0x495df5[_0x40784d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3f0e4d=!0x0,_0x1c3f8e(_0x495df5[_0x40784d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x40784d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x40784d([0x6c,0x6f,0x77])}),_0x5c4dd9[_0x40784d([0x74,0x68,0x65,0x6e])](()=>{_0x3f0e4d||_0x2ede36(_0x40784d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x16671b(){return _0x18b156[_0x40784d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x40784d([0x76,0x69,0x65,0x77])][_0x40784d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x40784d([0x61,0x75,0x74,0x6f]);}function _0x2c7499(){_0x18b156[_0x40784d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x40784d([0x76,0x69,0x65,0x77])][_0x40784d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x40784d([0x61,0x75,0x74,0x6f]);}}function _0x2dfaf4(_0x41db0c){const _0x2d4300=[new window[(_0x40784d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x11b394=>setTimeout(_0x11b394,0x3cbe2bec^_0x1c1bc0)),_0x5c4dd9[_0x40784d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x40784d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5934bb=>{let _0xdb4e88=0x0;_0x18b156[_0x40784d([0x6d,0x6f,0x64,0x65,0x6c])][_0x40784d([0x6f,0x6e])](_0x40784d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4971c7,_0x123ce8)=>{_0x123ce8[0x0][_0x40784d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xdb4e88++,_0xdb4e88==(0x3cb714d8^_0x1c1bc0)&&(_0x5934bb(),_0x4971c7[_0x40784d([0x6f,0x66,0x66])]());});}))];return window[_0x40784d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x40784d([0x72,0x61,0x63,0x65])](_0x2d4300)[_0x40784d([0x74,0x68,0x65,0x6e])](()=>_0x41db0c);}async function _0x3b4746(){await _0x5c4dd9,_0x18b156[_0x40784d([0x6d,0x6f,0x64,0x65,0x6c])][_0x40784d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x21a229,_0x18b156[_0x40784d([0x6d,0x6f,0x64,0x65,0x6c])][_0x40784d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x21a229,_0x18b156[_0x40784d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x40784d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3b65c8(_0x19164f){const _0x5174bd=_0x43bff2();_0x18b156[_0x5174bd]=_0x40784d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x19164f,_0x19164f!=_0x40784d([0x56,0x61,0x6c,0x69,0x64])&&_0x3b4746();}function _0x43bff2(){const _0x2606a0=window[_0x40784d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x40784d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x40784d([0x6e,0x6f,0x77])]())[_0x40784d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x40784d([0x2e]),'');let _0x152fd3=_0x40784d([0x49]);for(let _0x34bd6d=0x0;_0x34bd6d<_0x2606a0[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x34bd6d+=0x2){let _0x545294=window[_0x40784d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2606a0[_0x40784d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x34bd6d,_0x34bd6d+0x2));_0x545294>=_0x5d6bc8[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x545294-=_0x5d6bc8[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x152fd3+=_0x5d6bc8[_0x545294];}return _0x152fd3;}function _0x44f938(){const _0xad78bb=_0x369183[_0x40784d([0x73,0x70,0x6c,0x69,0x74])](_0x40784d([0x2e]));if(0x3!=_0xad78bb[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x23cdec(_0xad78bb[0x1]);function _0x23cdec(_0xc7897b){const _0x2b43c1=_0x9c296b(_0xc7897b);return _0x2b43c1&&_0x5ab476()?_0x2b43c1:null;function _0x5ab476(){const _0x25184c=_0x2b43c1[_0x40784d([0x6a,0x74,0x69])],_0x23abbc=window[_0x40784d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x25184c[_0x40784d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x25184c[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1e3740={..._0x2b43c1,[_0x40784d([0x6a,0x74,0x69])]:_0x25184c[_0x40784d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x25184c[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1e3740[_0x40784d([0x76,0x63])],_0x521571(_0x1e3740)==_0x23abbc;}}}async function _0x607671(){let _0x53affe=!0x0;try{const _0x1caa0b=_0x369183[_0x40784d([0x73,0x70,0x6c,0x69,0x74])](_0x40784d([0x2e])),[_0x5d1ee6,_0x17fa91,_0x795c9b]=_0x1caa0b;return _0x108f30(_0x5d1ee6),await _0x3dd912(_0x5d1ee6,_0x17fa91,_0x795c9b),_0x53affe;}catch{return!0x1;}function _0x108f30(_0x11b8e8){const _0x44fadf=_0x9c296b(_0x11b8e8);_0x44fadf&&_0x44fadf[_0x40784d([0x61,0x6c,0x67])]==_0x40784d([0x45,0x53,0x32,0x35,0x36])||(_0x53affe=!0x1);}async function _0x3dd912(_0x523b41,_0x2711b0,_0x2755d5){const _0x1e5556=window[_0x40784d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x40784d([0x66,0x72,0x6f,0x6d])](_0x4a584c(_0x2755d5),_0x5ea42f=>_0x5ea42f[_0x40784d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x35b5c9=new window[(_0x40784d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x40784d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x523b41+_0x40784d([0x2e])+_0x2711b0),_0x58918c=window[_0x40784d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x40784d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x58918c)return;const _0xab014c=await _0x58918c[_0x40784d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x40784d([0x6a,0x77,0x6b]),_0x5f29d9,{[_0x40784d([0x6e,0x61,0x6d,0x65])]:_0x40784d([0x45,0x43,0x44,0x53,0x41]),[_0x40784d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x40784d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x40784d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x58918c[_0x40784d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x40784d([0x6e,0x61,0x6d,0x65])]:_0x40784d([0x45,0x43,0x44,0x53,0x41]),[_0x40784d([0x68,0x61,0x73,0x68])]:{[_0x40784d([0x6e,0x61,0x6d,0x65])]:_0x40784d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xab014c,_0x1e5556,_0x35b5c9)||(_0x53affe=!0x1);}}function _0x9c296b(_0x43060a){return _0x43060a[_0x40784d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x40784d([0x65,0x79]))?JSON[_0x40784d([0x70,0x61,0x72,0x73,0x65])](_0x4a584c(_0x43060a)):null;}function _0x4a584c(_0x50d7d5){return window[_0x40784d([0x61,0x74,0x6f,0x62])](_0x50d7d5[_0x40784d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x40784d([0x2b]))[_0x40784d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x40784d([0x2f])));}function _0x521571(_0x11da8c){let _0x24098f=0x1505;function _0x3b4f98(_0x2a498d){for(let _0x145201=0x0;_0x145201<_0x2a498d[_0x40784d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x145201++){const _0x17625f=_0x2a498d[_0x40784d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x145201);_0x24098f=(_0x24098f<<0x5)+_0x24098f+_0x17625f,_0x24098f&=_0x24098f;}}function _0x4d37d6(_0x16435c){Array[_0x40784d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x16435c)?_0x16435c[_0x40784d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4d37d6):_0x16435c&&typeof _0x16435c==_0x40784d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x40784d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x16435c)[_0x40784d([0x73,0x6f,0x72,0x74])]()[_0x40784d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x53fb85,_0x1b701f])=>{_0x3b4f98(_0x53fb85),_0x4d37d6(_0x1b701f);}):_0x3b4f98(window[_0x40784d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x16435c));}return _0x4d37d6(_0x11da8c),_0x24098f>>>0x0;}function _0x5399b0(_0x4a3270){return _0x4a3270[_0x40784d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x40784d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x40784d([0x30]));}function _0x5f5e6f(_0x37b8ef){return _0x37b8ef[_0x40784d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x40784d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x40784d([0x6a,0x6f,0x69,0x6e])]('');}function _0x21a229(){}function _0x40784d(_0x1c5b00){return _0x1c5b00['map'](_0x270d26=>String['fromCharCode'](_0x270d26))['join']('');}_0x3b65c8(await _0x256462());}(this);}['_initSchema'](){const _0x4ecbc6=this['editor']['model']['schema'];_0x4ecbc6['isRegistered']('imageBlock')&&_0x4ecbc6['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x4ecbc6['isRegistered']('imageInline')&&_0x4ecbc6['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x1c7134=this['editor'];_0x1c7134['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x1c7134['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x58dfc9=>_0x58dfc9['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5da55d=_0x1c7134['commands']['get']('replaceImageSource');_0x5da55d&&this['listenTo'](_0x5da55d,'cleanupImage',(_0x120d97,[_0x31ec02,_0x51ef80])=>{_0x31ec02['removeAttribute']('uploadcareImageId',_0x51ef80);});}['_initConfig'](){const _0x500a2c=this['editor']['config']['get']('uploadcare.uploader')||{},_0x55559d=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0xe7009b(_0x58c016['document'],'uc-config',{..._0x500a2c,'pubkey':_0x55559d,'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']=_0x38cad0=>{if('closeMax'==_0x38cad0)return'#uc-icon-arrow-down';},_0x58c016['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0xe7009b(_0x58c016['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x58c016['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x19a061=this['editor']['commands']['get']('insertImage');_0x19a061&&this['listenTo'](_0x19a061,'execute',()=>{const _0x29682f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x29682f&&_0x29682f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x29682f);});});const _0x3bb169=this['editor']['commands']['get']('uploadcareImageReplace');_0x3bb169&&this['listenTo'](_0x3bb169,'execute',()=>{const _0x2ee9e2=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2ee9e2&&_0x2ee9e2['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x2ee9e2);});});}}class tt extends _0x85db89{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x472a36){super(_0x472a36),_0x472a36['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x3bf6e4['defineComponents'](_0x3bf6e4);}}class ii extends _0x258260{constructor(_0x23654f){super(_0x23654f);const t=_0x23654f['t'],_0x1069b6=this['bindTemplate'],_0x4dea2c=new _0x73833e();_0x4dea2c['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':[_0x4dea2c,{'text':_0x1069b6['to']('imageUploadProgress',_0x5d13ee=>t('Loading\x20image...')+'\x20('+(_0x5d13ee||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 _0x258260{constructor(_0x33969a){super(_0x33969a);const t=_0x33969a['t'];this['set']('errorType',null);const _0x51c2fd=new _0x288df0(_0x33969a);_0x51c2fd['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x51c2fd['withText']=!0x0,_0x51c2fd['class']='ck-button-action',_0x51c2fd['on']('execute',()=>{this['fire']('retry');}),_0x51c2fd['bind']('isVisible')['to'](this,'errorType',_0x48f658=>'NotFound'!==_0x48f658);const _0x3d0384=new _0x25a90d();_0x3d0384['content']=_0x418721,_0x3d0384['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x32a278=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':[_0x3d0384,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x32a278['to']('errorType',_0x31cc58=>t('NotFound'!==_0x31cc58?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x51c2fd]},{'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 _0x258260{constructor(_0x3924b2,_0x44d9f8){super(_0x3924b2);const _0x1d1117=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x44d9f8,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x1d1117['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x5510a8,_0x2fea01,_0x4661f8){super(_0x5510a8),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x5510a8),this['_errorView']=new ti(_0x5510a8),this['_editingView']=new ei(_0x5510a8,_0x4661f8),this['_focusableView']=new _0x258260(_0x5510a8),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2fea01),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'],_0x3f071d=>{this['_addUploadcareImageEditorListeners'](_0x3f071d);});}),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'](_0x158a88,_0x57af27){const _0x261463='uc-cloud-image-editor',_0xf00e92=_0x158a88['querySelector'](_0x261463);if(_0xf00e92)return _0x57af27(_0xf00e92);const _0x5d9c89=new MutationObserver(_0x26a7f1=>{const _0x2cf263=_0x26a7f1['filter'](_0x4ad482=>_0x4ad482['target']===_0x158a88&&_0x4ad482['addedNodes']['length']>0x0&&_0x4ad482['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x261463);_0x2cf263['length']&&(_0x5d9c89['disconnect'](),_0x57af27(_0x2cf263[0x0]['addedNodes'][0x0]));});_0x5d9c89['observe'](_0x158a88,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x2a8d47){_0x2a8d47['addEventListener']('apply',_0x55cc68=>{this['fire']('apply',{'imageSrc':_0x55cc68['detail']['cdnUrl']});}),_0x2a8d47['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x1191c4(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x72baf3,_0x50d993,_0x231eb9){super(),this['_editor']=_0x72baf3,this['_dialog']=_0x50d993,this['_imageElement']=_0x231eb9,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 _0x4a62c2=this['_imageElement'],_0x4e0eec=_0x4a62c2['getAttribute']('uploadcareImageId'),_0x57f949=_0x4a62c2['getAttribute']('src');if(_0x4e0eec)await this['_loadImageInfo'](_0x4e0eec,_0x57f949);else{if(this['_imageCache']['has'](_0x57f949)){const _0x51c370=this['_imageCache']['get'](_0x57f949);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x51c370['url'],this['imageDimension']=_0x51c370['dimension'],this['imageId']=_0x51c370['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x488ad8}=this['_editor'],t=_0x488ad8['t'],_0x383e8c=new X(_0x488ad8,this['imageStatus'],this['_attributes']);_0x383e8c['bind']('status')['to'](this,'imageStatus'),_0x383e8c['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x383e8c['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x383e8c['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x383e8c,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x392839,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x383e8c,'position':_0x1dd8f4['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x383e8c['focus']();},'onHide':()=>{_0x383e8c['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4f3cd6=>!S(_0x4f3cd6,_0x383e8c['element'])}});}['_loadImageInfo'](_0x1a5124,_0x5d55a2){return j['getInfo'](_0x1a5124,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x26ff5b=>{const {width:_0x523212,height:_0x3c2506}=_0x26ff5b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5d55a2,this['imageDimension']={'width':_0x523212,'height':_0x3c2506},this['imageId']=_0x1a5124;})['catch'](_0x17f37c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x17f37c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x39fd07,_0x4bf527){return this['_getImageAsFile'](_0x39fd07)['then'](_0x4e9a5c=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x4bf527['signal'],'file':_0x4e9a5c,'onProgress':_0x43b20e=>{_0x43b20e&&_0x43b20e['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x43b20e['value']));}}))['then'](_0x145b33=>{const {width:_0x3a7846,height:_0x2cb136}=_0x145b33['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x145b33['cdnUrl'],this['imageDimension']={'width':_0x3a7846,'height':_0x2cb136},this['imageId']=_0x145b33['uuid'],this['imageUploadProgress']=null;const _0x3f01d1=_0x39fd07['getAttribute']('src');this['_imageCache']['set'](_0x3f01d1,{'id':_0x145b33['uuid'],'url':_0x145b33['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x517778=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x517778['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x489619,_0xffe88c){_0x489619['on']('apply',(_0x58a245,_0x2a4609)=>{this['_replaceImage'](_0xffe88c,_0x2a4609['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x489619['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x489619['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x438a13,_0x52ed25,_0x3a9478){const _0x17dfa6=this['_editor'],{width:_0x13e12c,height:_0xfb18f5}=C(_0x52ed25,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x236d9f,imageSources:_0x2dffd8}=k(_0x52ed25,_0x13e12c);_0x17dfa6['model']['change'](_0x43316f=>{if('$graveyard'===_0x438a13['root']['rootName']){_0x17dfa6['execute']('insertImage',{'imageType':_0x438a13['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x438a13['getAttributes']()),'uploadcareImageId':_0x3a9478,'src':_0x236d9f,'sources':_0x2dffd8,'width':_0x13e12c,'height':_0xfb18f5}});const _0x2f833d=_0x438a13['getChildren']();_0x438a13=_0x17dfa6['model']['document']['selection']['getSelectedElement']();for(const _0x51e0cb of _0x2f833d)_0x43316f['append'](_0x43316f['cloneElement'](_0x51e0cb),_0x438a13);}else _0x43316f['setSelection'](_0x438a13,'on'),_0x17dfa6['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x438a13['getAttributes']()),'uploadcareImageId':_0x3a9478,'src':_0x236d9f,'sources':_0x2dffd8,'width':_0x13e12c,'height':_0xfb18f5},_0x438a13);_0x43316f['setSelection'](_0x438a13,'on');});}async['_getImageAsFile'](_0x5b943f){const _0xc001b3=_0x58c016['window'],_0x17c1ef=_0x58c016['document']['location']['href'],_0x2143f9=new _0xc001b3['URL'](_0x5b943f['getAttribute']('src'),_0x17c1ef);if('data:'===_0x2143f9['protocol']){const _0x396a9e=_0x2143f9['href']['split'](','),_0x2e4671=_0x396a9e[0x0]['match'](/:(.*?);/)[0x1],_0x17e597=_0x2e4671['split']('/')[0x1],_0x304dc2=_0xc001b3['atob'](_0x396a9e[_0x396a9e['length']-0x1]);let _0x2caeff=_0x304dc2['length'];const _0xd42e48=new _0xc001b3['Uint8Array'](_0x2caeff);for(;_0x2caeff--;)_0xd42e48[_0x2caeff]=_0x304dc2['charCodeAt'](_0x2caeff);return new _0xc001b3['File']([_0xd42e48],'image.'+_0x17e597,{'type':_0x2e4671});}const _0x52e24f=_0x2143f9['href']['split']('/'),_0x57ca6d=_0x52e24f[_0x52e24f['length']-0x1],_0x57a59b=_0x57ca6d['split']('.')[0x1];return _0xc001b3['fetch'](_0x2143f9['href'])['then'](_0x2b1578=>_0x2b1578['clone']()['blob']())['then'](_0x1f74bc=>new _0xc001b3['File']([_0x1f74bc],_0x57ca6d,{'type':'image/'+_0x57a59b}));}}class O extends _0x7a04f3{['imageEditController'];static get['requires'](){return[_0x383e34];}['_isEditable'];constructor(_0x1ac7ec){super(_0x1ac7ec),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4ac8e2){const _0x3895ad=G(_0x4ac8e2);return _0x2a0009=>!(!_0x2a0009||!_0x2a0009['is']('element','imageBlock')&&!_0x2a0009['is']('element','imageInline'))&&(!!_0x2a0009['hasAttribute']('uploadcareImageId')||!!_0x2a0009['hasAttribute']('src')&&_0x3895ad(_0x2a0009['getAttribute']('src')));}(_0x1ac7ec['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x23931a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x23931a);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x4eedd4=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4eedd4&&(_0x4eedd4['is']('element','imageBlock')||_0x4eedd4['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x383e34),_0x4eedd4),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x7a04f3{['refresh'](){const _0x12a283=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x12a283&&(_0x12a283['is']('element','imageBlock')||_0x12a283['is']('element','imageInline')));}['execute'](_0x27f28d){const _0xfc956f=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x596f50=>{_0x596f50['setAttributes'](_0x27f28d,_0xfc956f),_0x596f50['removeAttribute']('srcset',_0xfc956f),_0x596f50['removeAttribute']('sizes',_0xfc956f);});}}class m extends _0x85db89{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x50f59e,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x447337}=this;_0x447337['commands']['add']('uploadcareImageEdit',new O(_0x447337)),_0x447337['commands']['add']('uploadcareImageReplace',new R(_0x447337));}}class g extends _0x85db89{['_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 _0x5195d0=this['editor'];_0x5195d0['ui']['componentFactory']['add']('uploadcareImageEdit',_0x45bcbf=>{const _0x49346f=_0x5195d0['commands']['get']('uploadcareImageEdit'),_0x2e8406=new _0x288df0(_0x45bcbf),t=_0x45bcbf['t'];return _0x2e8406['set']({'icon':_0x392839,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x2e8406['bind']('isEnabled')['to'](_0x49346f),_0x2e8406['bind']('isOn')['to'](_0x49346f,'isActive'),this['listenTo'](_0x2e8406,'execute',()=>{_0x5195d0['execute']('uploadcareImageEdit'),_0x5195d0['editing']['view']['focus']();}),_0x2e8406;}),this['_initConfig']();}['_initConfig'](){const _0xe7a982=_0xe7009b(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xe7a982),this['listenTo'](this['editor'],'destroy',()=>{_0xe7a982['remove']();});}}class et extends _0x85db89{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x4f7446,Command as _0x3ee3d2}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x424d88,IconGooglePhotos as _0x3c9c60,IconGoogleDrive as _0x32ebc5,IconFacebook as _0x51676f,IconDropbox as _0x385a84,IconUploadcareLink as _0x19db34,IconUploadcareImageUpload as _0x49ed03,IconError as _0xca020d,IconUploadcareImageEdit as _0x4fa5d8}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x4dd829,MenuBarMenuListItemButtonView as _0x1c3f18,View as _0x109d61,FocusCycler as _0x5c0dff,Dialog as _0xe36578,DialogViewPosition as _0x3d1f50,SpinnerView as _0xd149cf,IconView as _0x47ff6a,Notification as _0x50e187}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x3018b3,DomEmitterMixin as _0x4b432f,global as _0x155dda,getAncestors as _0x5bacdc,ObservableMixin as _0x28aecd,uid as _0x782983,createElement as _0x38b357}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x1b56fb}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2b215d,info as _0x23d54c}from'@uploadcare/upload-client';import*as _0xbf4ebd from'@uploadcare/file-uploader';var i=function(_0x548a4f){return _0x548a4f['Local']='local',_0x548a4f['URL']='url',_0x548a4f['Dropbox']='dropbox',_0x548a4f['GDrive']='gdrive',_0x548a4f['Facebook']='facebook',_0x548a4f['GPhotos']='gphotos',_0x548a4f['OneDrive']='onedrive',_0x548a4f;}({});function _(_0x14b957,_0x199e86,_0x33d21e){const t=_0x14b957['t'],_0x11e91b=_0x14b957['t'];switch(_0x199e86){case i['Local']:return{'text':_0x11e91b('Insert'===_0x33d21e?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x11e91b('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x33d21e?_0x11e91b('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x11e91b('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x33d21e?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x33d21e?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x33d21e?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x33d21e?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x33d21e?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x199e86;}}class e extends _0x4f7446{['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 _0x275f96=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x25ff3b;for(const _0x36c1c7 in _0x275f96){const _0x57ed42=_0x36c1c7,_0x40b47d=_0x275f96[_0x57ed42];if('uploadcareLicenseKeyValid'==_0x40b47d||'uploadcareLicenseKeyInvalid'==_0x40b47d||'uploadcareLicenseKeyExpired'==_0x40b47d||'uploadcareLicenseKeyDomainLimit'==_0x40b47d||'uploadcareLicenseKeyNotAllowed'==_0x40b47d||'uploadcareLicenseKeyEvaluationLimit'==_0x40b47d||'uploadcareLicenseKeyTrialLimit'==_0x40b47d||'uploadcareLicenseKeyUsageLimit'==_0x40b47d){delete _0x275f96[_0x57ed42],_0x25ff3b=_0x40b47d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x25ff3b&&_0x275f96['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x25ff3b&&_0x275f96['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x25ff3b&&_0x275f96['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x25ff3b&&_0x275f96['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x25ff3b&&_0x275f96['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x25ff3b&&_0x275f96['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x25ff3b&&_0x275f96['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x56b99e}=this,_0x4c6388=_0x56b99e['commands']['get']('uploadcare');if(!_0x4c6388)return;const _0x1d2058=this['_normalizeConfigSourceList'](_0x56b99e['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x4dcae5,_0x18df8c)=>{const _0x20150a=this['_getIntegrationKey'](_0x18df8c['type']);return _0x4dcae5[_0x20150a]||(_0x4dcae5[_0x20150a]=[]),_0x4dcae5[_0x20150a]['push'](_0x18df8c),_0x4dcae5;},{});_0x56b99e['plugins']['has']('ImageInsertUI')&&_0x56b99e['commands']['get']('uploadcare')&&Object['entries'](_0x1d2058)['forEach'](([_0x5bb816,_0x42c486])=>{_0x56b99e['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x5bb816,'observable':()=>_0x4c6388,'buttonViewCreator':()=>this['_createToolbarButton'](_0x42c486),'formViewCreator':()=>this['_createDropdownButtons'](_0x42c486),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x42c486),'override':'assetManager'!==_0x5bb816});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x142dd5){const {locale:_0x443ebb}=this['editor'];return _0x142dd5['map'](_0x5249a2=>{const _0x17eb44=_(_0x443ebb,_0x5249a2,'Insert');switch(_0x5249a2){case i['Local']:return{'icon':_0x49ed03,'type':i['Local'],..._0x17eb44};case i['URL']:return{'icon':_0x19db34,'type':i['URL'],..._0x17eb44};case i['Dropbox']:return{'icon':_0x385a84,'type':i['Dropbox'],..._0x17eb44};case i['Facebook']:return{'icon':_0x51676f,'type':i['Facebook'],..._0x17eb44};case i['GDrive']:return{'icon':_0x32ebc5,'type':i['GDrive'],..._0x17eb44};case i['GPhotos']:return{'icon':_0x3c9c60,'type':i['GPhotos'],..._0x17eb44};case i['OneDrive']:return{'icon':_0x424d88,'type':i['OneDrive'],..._0x17eb44};}});}['_getIntegrationKey'](_0x2a456e){switch(_0x2a456e){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x39bb3e,_0x5d64b3){const _0x2dac9f=this['editor'],_0x1a0a65=new _0x39bb3e(_0x2dac9f['locale']),_0x56c31a=_0x2dac9f['commands']['get']('uploadcare');return _0x1a0a65['bind']('isEnabled')['to'](_0x56c31a),_0x1a0a65['on']('execute',()=>{_0x56c31a['execute'](_0x5d64b3);}),_0x1a0a65;}['_createToolbarButton'](_0x282459){const {locale:_0x1acaae}=this['editor'],_0x516e80=this['editor']['plugins']['get']('ImageInsertUI'),_0x1afaa2=_0x282459[0x0],_0x3a489d=this['_createButton'](_0x4dd829,_0x1afaa2['type']);return _0x3a489d['icon']=_0x1afaa2['icon'],_0x3a489d['bind']('label')['to'](_0x516e80,'isImageSelected',_0x156dd6=>_(_0x1acaae,_0x1afaa2['type'],_0x156dd6?'Replace':'Insert')['text']),_0x3a489d['tooltip']=!0x0,_0x3a489d;}['_createDropdownButtons'](_0x48bfd0){const {locale:_0x568614}=this['editor'],_0x44811e=this['editor']['plugins']['get']('ImageInsertUI');return _0x48bfd0['map'](_0x23327b=>{const _0x522bcc=this['_createButton'](_0x4dd829,_0x23327b['type']);return _0x522bcc['withText']=!0x0,_0x522bcc['icon']=_0x23327b['icon'],_0x522bcc['bind']('label')['to'](_0x44811e,'isImageSelected',_0x690e9d=>_(_0x568614,_0x23327b['type'],_0x690e9d?'Replace':'Insert')['text']),_0x522bcc;});}['_createMenuBarButtons'](_0x39ca7f){return _0x39ca7f['map'](_0x1963cd=>{const _0x2d8860=this['_createButton'](_0x1c3f18,_0x1963cd['type']);return _0x2d8860['icon']=_0x1963cd['icon'],_0x2d8860['label']=_0x1963cd['shortText'],_0x2d8860;});}}class F extends _0x109d61{['focusTracker'];['focusCycler'];constructor(_0x19f593){super(_0x19f593),this['focusTracker']=new _0x3018b3(),this['focusCycler']=new _0x5c0dff({'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(_0x1b4562,_0x20bbd7){super(_0x1b4562),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-'+_0x20bbd7}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x58ca2b,_0x4515f6){const _0x13cb89=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x26babe=>_0x26babe<=_0x4515f6)['map'](_0x18d7d9=>_0x58ca2b['replace'](/\/$/,'')+'/-/resize/'+_0x18d7d9+'x/\x20'+_0x18d7d9+'w');return{'imageFallbackUrl':_0x58ca2b,'imageSources':[{'srcset':_0x13cb89['join'](',\x20'),'sizes':'(max-width:\x20'+_0x4515f6+'px)\x20100vw,\x20'+_0x4515f6+'px','type':'image/webp'}]};}function C(_0x309708,_0x3324b9,_0x166377){const _0x3795ab=_0x309708['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3795ab?parseInt(_0x3795ab[0x1],0xa):_0x3324b9,'height':_0x3795ab?parseInt(_0x3795ab[0x2],0xa):_0x166377};}function p(_0xf48e36,_0x32f3b4){const _0x37315c=new(_0x4b432f())(),_0xfbd63b=_0xf48e36['plugins']['get']('ImageUtils'),_0x5d7033=_0xf48e36['editing']['mapper']['toViewElement'](_0x32f3b4),_0x2610eb=_0xfbd63b['findViewImgElement'](_0x5d7033),_0x5b21aa=_0xf48e36['editing']['view']['domConverter']['viewToDom'](_0x2610eb),_0x4bdaa4=_0x32f3b4['getAttribute']('width'),_0x49e044=_0x32f3b4['getAttribute']('height'),_0x4d166b='image-processing';_0xf48e36['editing']['view']['change'](_0x5040e5=>{_0x5040e5['addClass'](_0x4d166b,_0x5d7033),_0x5040e5['setStyle']('aspect-ratio',_0x4bdaa4+'/'+_0x49e044,_0x2610eb);}),_0x37315c['listenTo'](_0x5b21aa,'load',()=>{_0x37315c['stopListening'](_0x5b21aa,'load'),_0xf48e36['editing']['view']['change'](_0x2785d6=>{_0x2785d6['removeClass'](_0x4d166b,_0x5d7033),_0x2785d6['removeStyle']('aspect-ratio',_0x2610eb);});});}function z(_0x37bf84){if(Array['isArray'](_0x37bf84)){const _0x543612=_0x37bf84['map'](z);return _0x148cb6=>_0x543612['some'](_0x3e5ed4=>_0x3e5ed4(_0x148cb6));}if('origin'==_0x37bf84){const _0x489e56=_0x155dda['window']['location']['origin'];return _0x561f10=>new URL(_0x561f10,_0x155dda['document']['baseURI'])['origin']==_0x489e56;}return'function'==typeof _0x37bf84?_0x37bf84:_0x37bf84 instanceof RegExp?_0x5dbdd6=>!(!_0x5dbdd6['match'](_0x37bf84)&&!_0x5dbdd6['replace'](/^https?:\/\//,'')['match'](_0x37bf84)):()=>!0x1;}function S(_0x9c85a5,_0x3578a6){return _0x5bacdc(_0x9c85a5['target'])['includes'](_0x3578a6);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x28aecd(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2a45fd,_0x21eca5,_0x207b25){super(),this['_editor']=_0x2a45fd,this['_editing']=_0x21eca5,this['_dialog']=_0x2a45fd['plugins']['get'](_0xe36578),this['_api']=_0x21eca5['ctxElement']['getAPI'](),this['_type']=_0x207b25,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:_0x1a25e3,model:_0xf1092c}=this['_editor'],_0x5c8a4f=_0xf1092c['document']['selection']['getSelectedElement'](),_0x3b2609=_0x5c8a4f&&(_0x5c8a4f['is']('element','imageBlock')||_0x5c8a4f['is']('element','imageInline'));this['_formView']=new x(_0x1a25e3,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x49ed03,'title':_(_0x1a25e3,this['_type'],_0x3b2609?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x3d1f50['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2408af=>!S(_0x2408af,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x2e1515}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x4bb3cf=>{const _0x33d1a6=_0x2e1515['length'];for(const _0x166803 of _0x2e1515){const _0x27dc0a=_0x166803===_0x2e1515[_0x33d1a6-0x1],{cdnUrl:_0x9da278,fileInfo:_0xb563df}=_0x166803;if(!_0x9da278||!_0xb563df)continue;const {width:_0xfea1d1,height:_0x4e84e9}=_0xb563df['imageInfo'],_0x1129fa=C(_0x9da278,_0xfea1d1,_0x4e84e9),_0xfd1151=k(_0x9da278,_0x1129fa['width']),_0xc77bc8={'id':_0xb563df['uuid'],'type':'image','attributes':{'imageDimension':_0x1129fa,..._0xfd1151}};this['_insertAsset'](_0xc77bc8,_0x27dc0a,_0x4bb3cf);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x5bc72d=>{'idle'===_0x5bc72d['detail']['status']&&!_0x5bc72d['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x384090,_0x136654,_0x24c4a8){const _0x5b7ccd=this['_editor']['model']['document']['selection'],_0x4b58ef=_0x5b7ccd['getSelectedElement'](),_0x243c04=!(!_0x4b58ef||!_0x4b58ef['is']('element','imageInline'));_0x24c4a8['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x384090,_0x243c04),_0x136654||_0x24c4a8['setSelection'](_0x5b7ccd['getLastPosition']());}['_insertImage'](_0x1dd9fe,_0x37bf4d){const _0x5eef01=this['_editor'],{imageDimension:_0x3a678a,imageFallbackUrl:_0x15be5e,imageSources:_0x24fee1}=_0x1dd9fe['attributes'];_0x5eef01['execute']('insertImage',{'imageType':_0x37bf4d?'imageInline':null,'source':{'uploadcareImageId':_0x1dd9fe['id'],'src':_0x15be5e,'sources':_0x24fee1,..._0x3a678a}});}}class w extends _0x3ee3d2{['_editing'];['_controller']=null;static get['requires'](){return[_0xe36578,o];}constructor(_0x1d231d){super(_0x1d231d),this['_editing']=_0x1d231d['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3d54dd){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x3d54dd);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x520c39,publicKey:_0x5f5c54,signal:_0x182c84,onProgress:_0x134b65}){return _0x2b215d(_0x520c39,{'publicKey':_0x5f5c54,'store':'auto','signal':_0x182c84,'onProgress':_0x134b65});}static['getInfo'](_0x144f06,_0x2f0f32){return _0x23d54c(_0x144f06,_0x2f0f32);}}class f extends _0x4f7446{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x1b56fb,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x587dbe=this['editor'];if(!!!_0x587dbe['config']['get']('uploadcare'))return;_0x587dbe['plugins']['get'](_0x1b56fb)['createUploadAdapter']=_0x125e70=>new A(_0x125e70,_0x587dbe),_0x587dbe['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x564550,{imageElement:_0x3c5a48,data:_0x5100a1})=>{_0x587dbe['model']['change'](_0x45ec2c=>{_0x45ec2c['setAttribute']('uploadcareImageId',_0x5100a1['uploadcareImageId'],_0x3c5a48);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x37d78d,_0x546754){this['loader']=_0x37d78d,this['editor']=_0x546754,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x107e7d=this['editor']['config']['get']('uploadcare.pubkey'),_0x59f611=await this['loader']['file'];return j['upload']({'file':_0x59f611,'publicKey':_0x107e7d,'signal':this['controller']['signal'],'onProgress':_0x3c0114=>{_0x3c0114&&_0x3c0114['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3c0114['value']);}})['then'](async _0x2e39e8=>{const {imageFallbackUrl:_0x4c6f33,imageSources:_0x2ea054}=k(_0x2e39e8['cdnUrl'],_0x2e39e8['imageInfo']['width']);return{'uploadcareImageId':_0x2e39e8['uuid'],'default':_0x4c6f33,'sources':_0x2ea054};})['catch'](()=>{const _0x186a52=t('Cannot\x20upload\x20file:')+('\x20'+_0x59f611['name']+'.');return Promise['reject'](_0x186a52);});}['abort'](){this['controller']['abort']();}}class o extends _0x4f7446{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0xe36578];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x276076){super(_0x276076),this['ucContextId']=_0x782983();}['init'](){const _0x1206b7=this['editor'];_0x1206b7['commands']['add']('uploadcare',new w(_0x1206b7));}['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 _0x5141a3=_0x155dda['document']['querySelector']('input[uploadcare-file-input]');_0x5141a3&&_0x5141a3['remove']();}),async function(_0x3a926a){const _0x2cb628=_0x321ff3([0x46,0x73,0x79,0x69,0x71,0x61,0x30,0x72,0x62,0x58,0x45,0x47,0x4f,0x67,0x52,0x55,0x38,0x6d,0x59,0x32,0x76,0x65,0x51,0x77,0x43,0x78,0x4d,0x66,0x6e,0x4b,0x36,0x63,0x31,0x39,0x6b,0x74,0x7a,0x34,0x57,0x44,0x6a,0x37,0x48,0x5a,0x4e,0x54,0x6f,0x33,0x64,0x50,0x49,0x41,0x68,0x35,0x6c,0x53,0x75,0x4c,0x4a,0x56,0x42,0x70]),_0x585fa7=0x2cbbfe0c,_0x12e8f0=0x2cbc8ee4^_0x585fa7,_0x11d4cd=window[_0x321ff3([0x44,0x61,0x74,0x65])][_0x321ff3([0x6e,0x6f,0x77])](),_0x495465=_0x3a926a[_0x321ff3([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x543dac=new window[(_0x321ff3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2060bf=>{_0x495465[_0x321ff3([0x6f,0x6e,0x63,0x65])](_0x321ff3([0x72,0x65,0x61,0x64,0x79]),_0x2060bf);}),_0xb8959b={[_0x321ff3([0x6b,0x74,0x79])]:_0x321ff3([0x45,0x43]),[_0x321ff3([0x75,0x73,0x65])]:_0x321ff3([0x73,0x69,0x67]),[_0x321ff3([0x63,0x72,0x76])]:_0x321ff3([0x50,0x2d,0x32,0x35,0x36]),[_0x321ff3([0x78])]:_0x321ff3([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]),[_0x321ff3([0x79])]:_0x321ff3([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]),[_0x321ff3([0x61,0x6c,0x67])]:_0x321ff3([0x45,0x53,0x32,0x35,0x36])},_0x377520=_0x495465[_0x321ff3([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x321ff3([0x67,0x65,0x74])](_0x321ff3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x54f51a(){let _0x3d8c96,_0x487c31=null,_0x13c5bf=null;try{if(_0x377520==_0x321ff3([0x47,0x50,0x4c]))return _0x321ff3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3d8c96=_0x127be6(),!_0x3d8c96)return _0x321ff3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3d8c96[_0x321ff3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x13c5bf=_0x3ac1f0(_0x3d8c96[_0x321ff3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3d8c96[_0x321ff3([0x6a,0x74,0x69])])),await _0x3df6ba()?_0x1862de()?_0x45a187()?_0x321ff3([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x412ece()?(_0x3d8c96[_0x321ff3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x321ff3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x487c31=_0x364531(_0x321ff3([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3d8c96[_0x321ff3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x321ff3([0x74,0x72,0x69,0x61,0x6c])&&(_0x487c31=_0x364531(_0x321ff3([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x510da5()):_0x321ff3([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x321ff3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x321ff3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x321ff3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x45a187(){const _0x5c54d8=[_0x321ff3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x321ff3([0x74,0x72,0x69,0x61,0x6c])][_0x321ff3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d8c96[_0x321ff3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x11d4cd/0x3e8:0xe10*_0x12e8f0;return _0x3d8c96[_0x321ff3([0x65,0x78,0x70])]<_0x5c54d8;}function _0x1862de(){const _0x1383e5=_0x3d8c96[_0x321ff3([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1383e5&&(!!_0x1383e5[_0x321ff3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x321ff3([0x2a]))||!!_0x1383e5[_0x321ff3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x321ff3([0x55,0x50,0x4c,0x43])));}function _0x412ece(){const _0x4bb961=_0x3d8c96[_0x321ff3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4bb961||0x0==_0x4bb961[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2c883e}=new URL(window[_0x321ff3([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4bb961[_0x321ff3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c883e))return!0x0;const _0xc5b2cd=_0x2c883e[_0x321ff3([0x73,0x70,0x6c,0x69,0x74])](_0x321ff3([0x2e]));return _0x4bb961[_0x321ff3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xeb2623=>_0xeb2623[_0x321ff3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x321ff3([0x2a])))[_0x321ff3([0x6d,0x61,0x70])](_0x24f380=>_0x24f380[_0x321ff3([0x73,0x70,0x6c,0x69,0x74])](_0x321ff3([0x2e])))[_0x321ff3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x30df76=>_0x30df76[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xc5b2cd[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x321ff3([0x6d,0x61,0x70])](_0x16baef=>Array(_0xc5b2cd[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x16baef[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x321ff3([0x66,0x69,0x6c,0x6c])](_0x16baef[0x0]===_0x321ff3([0x2a])?_0x321ff3([0x2a]):'')[_0x321ff3([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x16baef))[_0x321ff3([0x73,0x6f,0x6d,0x65])](_0x352516=>_0xc5b2cd[_0x321ff3([0x65,0x76,0x65,0x72,0x79])]((_0x27a84d,_0x4fbce6)=>_0x352516[_0x4fbce6]===_0x27a84d||_0x352516[_0x4fbce6]===_0x321ff3([0x2a])));}function _0x510da5(){return _0x487c31&&_0x13c5bf?new window[(_0x321ff3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x74197,_0x4a15b6)=>{_0x487c31[_0x321ff3([0x74,0x68,0x65,0x6e])](_0x74197,_0x4a15b6),_0x13c5bf[_0x321ff3([0x74,0x68,0x65,0x6e])](_0x1858aa=>{_0x1858aa!=_0x321ff3([0x56,0x61,0x6c,0x69,0x64])&&_0x74197(_0x1858aa);},_0x4a15b6);}):_0x487c31||_0x13c5bf||_0x321ff3([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3ac1f0(_0x54f846,_0x663429){return new window[(_0x321ff3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e73a9=>{if(_0x3c0f56())return _0x2e73a9(_0x321ff3([0x56,0x61,0x6c,0x69,0x64]));_0x2aa54b(),_0x495465[_0x321ff3([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x321ff3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5deac3=!0x1;const _0x45b7d2=_0x782983();function _0x3fd66a(_0x2cc3dc){return!!_0x2cc3dc&&(typeof _0x2cc3dc===_0x321ff3([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2cc3dc===_0x321ff3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2cc3dc[_0x321ff3([0x74,0x68,0x65,0x6e])]===_0x321ff3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2cc3dc[_0x321ff3([0x63,0x61,0x74,0x63,0x68])]===_0x321ff3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x431c72(_0x1d9e68){_0x5f5bdf(_0x1d9e68)[_0x321ff3([0x74,0x68,0x65,0x6e])](_0x1fab78=>{if(!_0x1fab78||_0x1fab78[_0x321ff3([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x321ff3([0x6f,0x6b]))return _0x321ff3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x318851(_0x57cfbf(_0x45b7d2+_0x663429))!=_0x1fab78[_0x321ff3([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x321ff3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x321ff3([0x56,0x61,0x6c,0x69,0x64]);})[_0x321ff3([0x74,0x68,0x65,0x6e])](_0x3b90b0=>(_0x490d1b(),_0x3b90b0),()=>{const _0x5a2299=_0x485154();return null==_0x5a2299?(_0x490d1b(),_0x321ff3([0x56,0x61,0x6c,0x69,0x64])):_0x321ff3(_0x11d4cd-_0x5a2299>(0x8b77a0c^_0x585fa7)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x321ff3([0x74,0x68,0x65,0x6e])](_0x2e73a9)[_0x321ff3([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2e73a9(_0x321ff3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5cfdbf=0x2c8d108c^_0x585fa7;function _0x490d1b(){const _0x490390=_0x321ff3([0x6c,0x6c,0x63,0x74,0x2d])+_0x318851(_0x57cfbf(_0x54f846)),_0x17656a=_0x2c6179(_0x318851(window[_0x321ff3([0x4d,0x61,0x74,0x68])][_0x321ff3([0x63,0x65,0x69,0x6c])](_0x11d4cd/_0x5cfdbf)));window[_0x321ff3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x321ff3([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x490390,_0x17656a);}function _0x485154(){const _0x293dba=_0x321ff3([0x6c,0x6c,0x63,0x74,0x2d])+_0x318851(_0x57cfbf(_0x54f846)),_0x4e51d1=window[_0x321ff3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x321ff3([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x293dba);return _0x4e51d1?window[_0x321ff3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2c6179(_0x4e51d1),0x10)*_0x5cfdbf:null;}function _0x5f5bdf(_0x190f02){return new window[(_0x321ff3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x135bed,_0x465cc4)=>{_0x190f02[_0x321ff3([0x74,0x68,0x65,0x6e])](_0x135bed,_0x465cc4),window[_0x321ff3([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x465cc4,0x2cba2acc^_0x585fa7);});}}_0x495465[_0x321ff3([0x6f,0x6e])](_0x321ff3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x31da2b,_0x4b66cd)=>{if(_0x4b66cd[0x0]!=_0x54f846)return _0x2e73a9(_0x321ff3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4b66cd[0x1]={..._0x4b66cd[0x1],[_0x321ff3([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x45b7d2};},{[_0x321ff3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x321ff3([0x68,0x69,0x67,0x68])}),_0x495465[_0x321ff3([0x6f,0x6e])](_0x321ff3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x122871=>{_0x3fd66a(_0x122871[_0x321ff3([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5deac3=!0x0,_0x431c72(_0x122871[_0x321ff3([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x321ff3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x321ff3([0x6c,0x6f,0x77])}),_0x543dac[_0x321ff3([0x74,0x68,0x65,0x6e])](()=>{_0x5deac3||_0x2e73a9(_0x321ff3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3c0f56(){return _0x495465[_0x321ff3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x321ff3([0x76,0x69,0x65,0x77])][_0x321ff3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x321ff3([0x61,0x75,0x74,0x6f]);}function _0x2aa54b(){_0x495465[_0x321ff3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x321ff3([0x76,0x69,0x65,0x77])][_0x321ff3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x321ff3([0x61,0x75,0x74,0x6f]);}}function _0x364531(_0x2a2110){const _0x1a6c6e=[new window[(_0x321ff3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21a110=>setTimeout(_0x21a110,0x2cb2c0c0^_0x585fa7)),_0x543dac[_0x321ff3([0x74,0x68,0x65,0x6e])](()=>new window[(_0x321ff3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x348876=>{let _0xfbc017=0x0;_0x495465[_0x321ff3([0x6d,0x6f,0x64,0x65,0x6c])][_0x321ff3([0x6f,0x6e])](_0x321ff3([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x304994,_0x5ca642)=>{_0x5ca642[0x0][_0x321ff3([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xfbc017++,_0xfbc017==(0x2cbbfff4^_0x585fa7)&&(_0x348876(),_0x304994[_0x321ff3([0x6f,0x66,0x66])]());});}))];return window[_0x321ff3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x321ff3([0x72,0x61,0x63,0x65])](_0x1a6c6e)[_0x321ff3([0x74,0x68,0x65,0x6e])](()=>_0x2a2110);}async function _0x551dd5(){await _0x543dac,_0x495465[_0x321ff3([0x6d,0x6f,0x64,0x65,0x6c])][_0x321ff3([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x17b49c,_0x495465[_0x321ff3([0x6d,0x6f,0x64,0x65,0x6c])][_0x321ff3([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x17b49c,_0x495465[_0x321ff3([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x321ff3([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x35109e(_0x92bfcd){const _0x4aca0f=_0x598d70();_0x495465[_0x4aca0f]=_0x321ff3([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x92bfcd,_0x92bfcd!=_0x321ff3([0x56,0x61,0x6c,0x69,0x64])&&_0x551dd5();}function _0x598d70(){const _0x2a9aeb=window[_0x321ff3([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x321ff3([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x321ff3([0x6e,0x6f,0x77])]())[_0x321ff3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x321ff3([0x2e]),'');let _0x17cab2=_0x321ff3([0x46]);for(let _0x2a2ee8=0x0;_0x2a2ee8<_0x2a9aeb[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2a2ee8+=0x2){let _0x400d89=window[_0x321ff3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2a9aeb[_0x321ff3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2a2ee8,_0x2a2ee8+0x2));_0x400d89>=_0x2cb628[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x400d89-=_0x2cb628[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x17cab2+=_0x2cb628[_0x400d89];}return _0x17cab2;}function _0x127be6(){const _0x528477=_0x377520[_0x321ff3([0x73,0x70,0x6c,0x69,0x74])](_0x321ff3([0x2e]));if(0x3!=_0x528477[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x454fe4(_0x528477[0x1]);function _0x454fe4(_0x26eb3f){const _0x1ffa85=_0x4aef29(_0x26eb3f);return _0x1ffa85&&_0x585e63()?_0x1ffa85:null;function _0x585e63(){const _0x5952c6=_0x1ffa85[_0x321ff3([0x6a,0x74,0x69])],_0x371878=window[_0x321ff3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5952c6[_0x321ff3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5952c6[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x57fa17={..._0x1ffa85,[_0x321ff3([0x6a,0x74,0x69])]:_0x5952c6[_0x321ff3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5952c6[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x57fa17[_0x321ff3([0x76,0x63])],_0x57cfbf(_0x57fa17)==_0x371878;}}}async function _0x3df6ba(){let _0x150aa2=!0x0;try{const _0x2fa834=_0x377520[_0x321ff3([0x73,0x70,0x6c,0x69,0x74])](_0x321ff3([0x2e])),[_0x252f8a,_0x5a4347,_0x11a622]=_0x2fa834;return _0x5a3a1c(_0x252f8a),await _0x42d90b(_0x252f8a,_0x5a4347,_0x11a622),_0x150aa2;}catch{return!0x1;}function _0x5a3a1c(_0x5460c5){const _0x1f98a8=_0x4aef29(_0x5460c5);_0x1f98a8&&_0x1f98a8[_0x321ff3([0x61,0x6c,0x67])]==_0x321ff3([0x45,0x53,0x32,0x35,0x36])||(_0x150aa2=!0x1);}async function _0x42d90b(_0x469552,_0x4b454e,_0x470d4b){const _0x389f41=window[_0x321ff3([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x321ff3([0x66,0x72,0x6f,0x6d])](_0x5411a3(_0x470d4b),_0x32e182=>_0x32e182[_0x321ff3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1d3ce6=new window[(_0x321ff3([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x321ff3([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x469552+_0x321ff3([0x2e])+_0x4b454e),_0x32522d=window[_0x321ff3([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x321ff3([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x32522d)return;const _0x13c52f=await _0x32522d[_0x321ff3([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x321ff3([0x6a,0x77,0x6b]),_0xb8959b,{[_0x321ff3([0x6e,0x61,0x6d,0x65])]:_0x321ff3([0x45,0x43,0x44,0x53,0x41]),[_0x321ff3([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x321ff3([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x321ff3([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x32522d[_0x321ff3([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x321ff3([0x6e,0x61,0x6d,0x65])]:_0x321ff3([0x45,0x43,0x44,0x53,0x41]),[_0x321ff3([0x68,0x61,0x73,0x68])]:{[_0x321ff3([0x6e,0x61,0x6d,0x65])]:_0x321ff3([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x13c52f,_0x389f41,_0x1d3ce6)||(_0x150aa2=!0x1);}}function _0x4aef29(_0x52252a){return _0x52252a[_0x321ff3([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x321ff3([0x65,0x79]))?JSON[_0x321ff3([0x70,0x61,0x72,0x73,0x65])](_0x5411a3(_0x52252a)):null;}function _0x5411a3(_0x323b86){return window[_0x321ff3([0x61,0x74,0x6f,0x62])](_0x323b86[_0x321ff3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x321ff3([0x2b]))[_0x321ff3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x321ff3([0x2f])));}function _0x57cfbf(_0x4b4ce6){let _0x4ab10b=0x1505;function _0x337953(_0x1355fc){for(let _0x1ee764=0x0;_0x1ee764<_0x1355fc[_0x321ff3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ee764++){const _0x1e27a4=_0x1355fc[_0x321ff3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1ee764);_0x4ab10b=(_0x4ab10b<<0x5)+_0x4ab10b+_0x1e27a4,_0x4ab10b&=_0x4ab10b;}}function _0x4e0bb8(_0x4e275d){Array[_0x321ff3([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4e275d)?_0x4e275d[_0x321ff3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4e0bb8):_0x4e275d&&typeof _0x4e275d==_0x321ff3([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x321ff3([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4e275d)[_0x321ff3([0x73,0x6f,0x72,0x74])]()[_0x321ff3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1335d0,_0x3f4d11])=>{_0x337953(_0x1335d0),_0x4e0bb8(_0x3f4d11);}):_0x337953(window[_0x321ff3([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4e275d));}return _0x4e0bb8(_0x4b4ce6),_0x4ab10b>>>0x0;}function _0x318851(_0x30b358){return _0x30b358[_0x321ff3([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x321ff3([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x321ff3([0x30]));}function _0x2c6179(_0x43793a){return _0x43793a[_0x321ff3([0x73,0x70,0x6c,0x69,0x74])]('')[_0x321ff3([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x321ff3([0x6a,0x6f,0x69,0x6e])]('');}function _0x17b49c(){}function _0x321ff3(_0x308ae5){return _0x308ae5['map'](_0x5ca83f=>String['fromCharCode'](_0x5ca83f))['join']('');}_0x35109e(await _0x54f51a());}(this);}['_initSchema'](){const _0x44347a=this['editor']['model']['schema'];_0x44347a['isRegistered']('imageBlock')&&_0x44347a['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x44347a['isRegistered']('imageInline')&&_0x44347a['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x26a730=this['editor'];_0x26a730['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x26a730['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x5da6ba=>_0x5da6ba['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5c9f0c=_0x26a730['commands']['get']('replaceImageSource');_0x5c9f0c&&this['listenTo'](_0x5c9f0c,'cleanupImage',(_0xa21c66,[_0x4e9f2b,_0x358ea2])=>{_0x4e9f2b['removeAttribute']('uploadcareImageId',_0x358ea2);});}['_initConfig'](){const _0x35786b=this['editor']['config']['get']('uploadcare.uploader')||{},_0x4cfeca=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x38b357(_0x155dda['document'],'uc-config',{..._0x35786b,'pubkey':_0x4cfeca,'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']=_0x43c413=>{if('closeMax'==_0x43c413)return'#uc-icon-arrow-down';},_0x155dda['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x38b357(_0x155dda['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x155dda['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x356e1b=this['editor']['commands']['get']('insertImage');_0x356e1b&&this['listenTo'](_0x356e1b,'execute',()=>{const _0x507ed9=this['editor']['model']['document']['selection']['getSelectedElement']();_0x507ed9&&_0x507ed9['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x507ed9);});});const _0x40a1cc=this['editor']['commands']['get']('uploadcareImageReplace');_0x40a1cc&&this['listenTo'](_0x40a1cc,'execute',()=>{const _0x5b273=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5b273&&_0x5b273['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x5b273);});});}}class tt extends _0x4f7446{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2596a6){super(_0x2596a6),_0x2596a6['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0xbf4ebd['defineComponents'](_0xbf4ebd);}}class ii extends _0x109d61{constructor(_0x1911ee){super(_0x1911ee);const t=_0x1911ee['t'],_0x512612=this['bindTemplate'],_0xe678e1=new _0xd149cf();_0xe678e1['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':[_0xe678e1,{'text':_0x512612['to']('imageUploadProgress',_0x15e9ea=>t('Loading\x20image...')+'\x20('+(_0x15e9ea||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 _0x109d61{constructor(_0x491780){super(_0x491780);const t=_0x491780['t'];this['set']('errorType',null);const _0x26a485=new _0x4dd829(_0x491780);_0x26a485['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x26a485['withText']=!0x0,_0x26a485['class']='ck-button-action',_0x26a485['on']('execute',()=>{this['fire']('retry');}),_0x26a485['bind']('isVisible')['to'](this,'errorType',_0x5d4ae8=>'NotFound'!==_0x5d4ae8);const _0x157ca6=new _0x47ff6a();_0x157ca6['content']=_0xca020d,_0x157ca6['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x57d178=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':[_0x157ca6,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x57d178['to']('errorType',_0x2128e2=>t('NotFound'!==_0x2128e2?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x26a485]},{'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 _0x109d61{constructor(_0xfee2cb,_0x432315){super(_0xfee2cb);const _0x4dc115=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x432315,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x4dc115['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x1e7308,_0x119b0a,_0xd1577e){super(_0x1e7308),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x1e7308),this['_errorView']=new ti(_0x1e7308),this['_editingView']=new ei(_0x1e7308,_0xd1577e),this['_focusableView']=new _0x109d61(_0x1e7308),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x119b0a),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'],_0x37de51=>{this['_addUploadcareImageEditorListeners'](_0x37de51);});}),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'](_0x4bfd4d,_0x12d8e5){const _0x5243e9='uc-cloud-image-editor',_0x5601a1=_0x4bfd4d['querySelector'](_0x5243e9);if(_0x5601a1)return _0x12d8e5(_0x5601a1);const _0x2c3fb3=new MutationObserver(_0x4404ea=>{const _0x456094=_0x4404ea['filter'](_0x365808=>_0x365808['target']===_0x4bfd4d&&_0x365808['addedNodes']['length']>0x0&&_0x365808['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5243e9);_0x456094['length']&&(_0x2c3fb3['disconnect'](),_0x12d8e5(_0x456094[0x0]['addedNodes'][0x0]));});_0x2c3fb3['observe'](_0x4bfd4d,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x450c0b){_0x450c0b['addEventListener']('apply',_0x37f93b=>{this['fire']('apply',{'imageSrc':_0x37f93b['detail']['cdnUrl']});}),_0x450c0b['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x28aecd(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x10116a,_0x3f4cd9,_0xfdc25d){super(),this['_editor']=_0x10116a,this['_dialog']=_0x3f4cd9,this['_imageElement']=_0xfdc25d,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 _0xf3759c=this['_imageElement'],_0x4195a7=_0xf3759c['getAttribute']('uploadcareImageId'),_0x1a76aa=_0xf3759c['getAttribute']('src');if(_0x4195a7)await this['_loadImageInfo'](_0x4195a7,_0x1a76aa);else{if(this['_imageCache']['has'](_0x1a76aa)){const _0x13c6fb=this['_imageCache']['get'](_0x1a76aa);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x13c6fb['url'],this['imageDimension']=_0x13c6fb['dimension'],this['imageId']=_0x13c6fb['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x57eace}=this['_editor'],t=_0x57eace['t'],_0x2debfa=new X(_0x57eace,this['imageStatus'],this['_attributes']);_0x2debfa['bind']('status')['to'](this,'imageStatus'),_0x2debfa['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2debfa['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2debfa['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2debfa,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4fa5d8,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2debfa,'position':_0x3d1f50['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2debfa['focus']();},'onHide':()=>{_0x2debfa['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x38c8d3=>!S(_0x38c8d3,_0x2debfa['element'])}});}['_loadImageInfo'](_0x516d6d,_0x55b5de){return j['getInfo'](_0x516d6d,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x177f04=>{const {width:_0x2f4b9e,height:_0x47d736}=_0x177f04['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x55b5de,this['imageDimension']={'width':_0x2f4b9e,'height':_0x47d736},this['imageId']=_0x516d6d;})['catch'](_0x5225fa=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5225fa['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2fe3ff,_0x4ea8b9){return this['_getImageAsFile'](_0x2fe3ff)['then'](_0x495025=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x4ea8b9['signal'],'file':_0x495025,'onProgress':_0x3f9a52=>{_0x3f9a52&&_0x3f9a52['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3f9a52['value']));}}))['then'](_0x109f1f=>{const {width:_0x30d2c3,height:_0x3936c2}=_0x109f1f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x109f1f['cdnUrl'],this['imageDimension']={'width':_0x30d2c3,'height':_0x3936c2},this['imageId']=_0x109f1f['uuid'],this['imageUploadProgress']=null;const _0xc0731b=_0x2fe3ff['getAttribute']('src');this['_imageCache']['set'](_0xc0731b,{'id':_0x109f1f['uuid'],'url':_0x109f1f['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x29767e=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x29767e['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x5bf64f,_0x27a686){_0x5bf64f['on']('apply',(_0x30b61a,_0x14781d)=>{this['_replaceImage'](_0x27a686,_0x14781d['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x5bf64f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x5bf64f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x3c8c61,_0x1ae745,_0x534784){const _0x38aa05=this['_editor'],{width:_0x12e3d6,height:_0x9e0e03}=C(_0x1ae745,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x2c55cf,imageSources:_0x30bbfe}=k(_0x1ae745,_0x12e3d6);_0x38aa05['model']['change'](_0x580954=>{if('$graveyard'===_0x3c8c61['root']['rootName']){_0x38aa05['execute']('insertImage',{'imageType':_0x3c8c61['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x3c8c61['getAttributes']()),'uploadcareImageId':_0x534784,'src':_0x2c55cf,'sources':_0x30bbfe,'width':_0x12e3d6,'height':_0x9e0e03}});const _0x11a2a9=_0x3c8c61['getChildren']();_0x3c8c61=_0x38aa05['model']['document']['selection']['getSelectedElement']();for(const _0x2c79f7 of _0x11a2a9)_0x580954['append'](_0x580954['cloneElement'](_0x2c79f7),_0x3c8c61);}else _0x580954['setSelection'](_0x3c8c61,'on'),_0x38aa05['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x3c8c61['getAttributes']()),'uploadcareImageId':_0x534784,'src':_0x2c55cf,'sources':_0x30bbfe,'width':_0x12e3d6,'height':_0x9e0e03},_0x3c8c61);_0x580954['setSelection'](_0x3c8c61,'on');});}async['_getImageAsFile'](_0x519dea){const _0x45f318=_0x155dda['window'],_0x16f280=_0x155dda['document']['location']['href'],_0x442390=new _0x45f318['URL'](_0x519dea['getAttribute']('src'),_0x16f280);if('data:'===_0x442390['protocol']){const _0x2265dc=_0x442390['href']['split'](','),_0x1f7034=_0x2265dc[0x0]['match'](/:(.*?);/)[0x1],_0x1d0795=_0x1f7034['split']('/')[0x1],_0x56cb76=_0x45f318['atob'](_0x2265dc[_0x2265dc['length']-0x1]);let _0x5269be=_0x56cb76['length'];const _0x1b17f0=new _0x45f318['Uint8Array'](_0x5269be);for(;_0x5269be--;)_0x1b17f0[_0x5269be]=_0x56cb76['charCodeAt'](_0x5269be);return new _0x45f318['File']([_0x1b17f0],'image.'+_0x1d0795,{'type':_0x1f7034});}const _0x14a63e=_0x442390['href']['split']('/'),_0x4209c9=_0x14a63e[_0x14a63e['length']-0x1],_0x25dcfc=_0x4209c9['split']('.')[0x1];return _0x45f318['fetch'](_0x442390['href'])['then'](_0x2241c1=>_0x2241c1['clone']()['blob']())['then'](_0x4643b7=>new _0x45f318['File']([_0x4643b7],_0x4209c9,{'type':'image/'+_0x25dcfc}));}}class Q extends _0x3ee3d2{['imageEditController'];static get['requires'](){return[_0xe36578];}['_isEditable'];constructor(_0x1ba7c1){super(_0x1ba7c1),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x393abd){const _0x1fb108=z(_0x393abd);return _0x15eb30=>!(!_0x15eb30||!_0x15eb30['is']('element','imageBlock')&&!_0x15eb30['is']('element','imageInline'))&&(!!_0x15eb30['hasAttribute']('uploadcareImageId')||!!_0x15eb30['hasAttribute']('src')&&_0x1fb108(_0x15eb30['getAttribute']('src')));}(_0x1ba7c1['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2c7ab0=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2c7ab0);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x4d6712=this['editor']['model']['document']['selection']['getSelectedElement']();_0x4d6712&&(_0x4d6712['is']('element','imageBlock')||_0x4d6712['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0xe36578),_0x4d6712),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x3ee3d2{['refresh'](){const _0x518cf7=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x518cf7&&(_0x518cf7['is']('element','imageBlock')||_0x518cf7['is']('element','imageInline')));}['execute'](_0x31cb4f){const _0x39fc76=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x23d8a1=>{_0x23d8a1['setAttributes'](_0x31cb4f,_0x39fc76),_0x23d8a1['removeAttribute']('srcset',_0x39fc76),_0x23d8a1['removeAttribute']('sizes',_0x39fc76);});}}class m extends _0x4f7446{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x50e187,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x31939b}=this;_0x31939b['commands']['add']('uploadcareImageEdit',new Q(_0x31939b)),_0x31939b['commands']['add']('uploadcareImageReplace',new V(_0x31939b));}}class g extends _0x4f7446{['_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 _0x1bf299=this['editor'];_0x1bf299['ui']['componentFactory']['add']('uploadcareImageEdit',_0x3ce6e2=>{const _0x337a95=_0x1bf299['commands']['get']('uploadcareImageEdit'),_0x39640c=new _0x4dd829(_0x3ce6e2),t=_0x3ce6e2['t'];return _0x39640c['set']({'icon':_0x4fa5d8,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x39640c['bind']('isEnabled')['to'](_0x337a95),_0x39640c['bind']('isOn')['to'](_0x337a95,'isActive'),this['listenTo'](_0x39640c,'execute',()=>{_0x1bf299['execute']('uploadcareImageEdit'),_0x1bf299['editing']['view']['focus']();}),_0x39640c;}),this['_initConfig']();}['_initConfig'](){const _0x19e98d=_0x38b357(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x19e98d),this['listenTo'](this['editor'],'destroy',()=>{_0x19e98d['remove']();});}}class et extends _0x4f7446{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "46.0.2
|
|
3
|
+
"version": "46.0.2",
|
|
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": "46.0.2
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "46.0.2
|
|
28
|
-
"@ckeditor/ckeditor5-image": "46.0.2
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "46.0.2
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "46.0.2
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "46.0.2
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "46.0.2
|
|
33
|
-
"ckeditor5": "46.0.2
|
|
26
|
+
"@ckeditor/ckeditor5-core": "46.0.2",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "46.0.2",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "46.0.2",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "46.0.2",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "46.0.2",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "46.0.2",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "46.0.2",
|
|
33
|
+
"ckeditor5": "46.0.2",
|
|
34
34
|
"@uploadcare/file-uploader": "1.17.1",
|
|
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 _0x2840ed=_0x236b;(function(_0x2edf29,_0x422aad){const _0x122e13=_0x236b,_0x240915=_0x2edf29();while(!![]){try{const _0x3aff97=-parseInt(_0x122e13(0x1ba))/0x1+-parseInt(_0x122e13(0x191))/0x2+-parseInt(_0x122e13(0x1b1))/0x3+parseInt(_0x122e13(0x174))/0x4*(-parseInt(_0x122e13(0x17e))/0x5)+parseInt(_0x122e13(0x1b9))/0x6*(-parseInt(_0x122e13(0x184))/0x7)+-parseInt(_0x122e13(0x175))/0x8+-parseInt(_0x122e13(0x181))/0x9*(-parseInt(_0x122e13(0x18d))/0xa);if(_0x3aff97===_0x422aad)break;else _0x240915['push'](_0x240915['shift']());}catch(_0x3131b7){_0x240915['push'](_0x240915['shift']());}}}(_0x50b1,0x394b3));function _0x50b1(){const _0x291244=['_initConfig','render','207kODWkq','_initConversion','once','7FEMEQY','upcast','cleanupImage','destroy','uploadcareImageReplace','isOfficialPlugin','insertImage','map','join','675170tyPvox','querySelector','conversion','editing','116390BOhdGc','_initSchema','model','_initImageProcessingIndicator','imageInline','selection','removeAttribute','PictureEditing','closeMax','configElement','view','uploadcareImageId','appendChild','init','fromCharCode','true','document','uploadcare.uploader','editor','#uc-icon-arrow-down','getSelectedElement','ctxElement','replaceImageSource','contentLanguage','uploader-','extend','afterInit','get','_ctxElement','isPremiumPlugin','_initCtx','requires','1156599TCTdYJ','for','execute','listenTo','uc-upload-ctx-provider','\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','uc-config','pluginName','358962moEyCr','314008DSGYSC','uploadcare','uploadcare.pubkey','input[uploadcare-file-input]','elementToAttribute','downcast','_configElement','iconHrefResolver','commands','locale','UploadcareEditing','isRegistered','getAttribute','body','ucContextId','236BeaSGL','3058392CKLwnP','add','data-uc-image-id','href','remove','schema','attributeToAttribute','config','imageBlock','10030OsjTOQ'];_0x50b1=function(){return _0x291244;};return _0x50b1();}import{Plugin as _0x372b84}from'ckeditor5/src/core.js';function _0x236b(_0x271df1,_0x10b779){const _0x50b1d5=_0x50b1();return _0x236b=function(_0x236b77,_0x41e7a4){_0x236b77=_0x236b77-0x171;let _0x4d32db=_0x50b1d5[_0x236b77];return _0x4d32db;},_0x236b(_0x271df1,_0x10b779);}import{Dialog as _0x5ca3b0}from'ckeditor5/src/ui.js';import{createElement as _0x3cd583,global as _0x4d54cd,uid as _0xa236b4}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x33ea07}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x39c228}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x4fe1b9}from'./utils/editingutils.js';export class UploadcareEditing extends _0x372b84{[_0x2840ed(0x1c0)]=null;[_0x2840ed(0x1ad)]=null;static get[_0x2840ed(0x1b8)](){const _0x1d0219=_0x2840ed;return _0x1d0219(0x1c4);}static get[_0x2840ed(0x1b0)](){const _0x3d5d76=_0x2840ed;return[_0x3d5d76(0x198),_0x39c228,_0x5ca3b0];}static get[_0x2840ed(0x189)](){return!0x0;}static get[_0x2840ed(0x1ae)](){return!0x0;}[_0x2840ed(0x173)];get[_0x2840ed(0x19a)](){const _0x7f8e4b=_0x2840ed;return this[_0x7f8e4b(0x1c0)];}get[_0x2840ed(0x1a6)](){const _0x1d1486=_0x2840ed;return this[_0x1d1486(0x1ad)];}constructor(_0x3da663){const _0xf5e2ab=_0x2840ed;super(_0x3da663),this[_0xf5e2ab(0x173)]=_0xa236b4();}[_0x2840ed(0x19e)](){const _0x52a67b=_0x2840ed,_0x5ab6ff=this[_0x52a67b(0x1a3)];_0x5ab6ff[_0x52a67b(0x1c2)][_0x52a67b(0x176)](_0x52a67b(0x1bb),new _0x33ea07(_0x5ab6ff));}[_0x2840ed(0x1ab)](){const _0x329018=_0x2840ed;this[_0x329018(0x192)](),this[_0x329018(0x182)](),this[_0x329018(0x17f)](),this[_0x329018(0x1af)](),this[_0x329018(0x194)](),this[_0x329018(0x1b4)](this[_0x329018(0x1a3)],_0x329018(0x187),()=>{const _0x451a73=_0x329018;this[_0x451a73(0x1c0)]&&(this[_0x451a73(0x1c0)][_0x451a73(0x179)](),this[_0x451a73(0x1c0)]=null),this[_0x451a73(0x1ad)]&&(this[_0x451a73(0x1ad)][_0x451a73(0x179)](),this[_0x451a73(0x1ad)]=null);const _0x2f0480=_0x4d54cd[_0x451a73(0x1a1)][_0x451a73(0x18e)](_0x451a73(0x1bd));_0x2f0480&&_0x2f0480[_0x451a73(0x179)]();}),async function(_0x23c50b){const _0x4649ed=_0x2cd4ce([0x49,0x45,0x68,0x61,0x4e,0x57,0x31,0x65,0x41,0x47,0x52,0x78,0x6c,0x77,0x39,0x73,0x51,0x76,0x43,0x50,0x59,0x46,0x69,0x4c,0x42,0x56,0x4f,0x4d,0x58,0x62,0x34,0x36,0x33,0x63,0x4a,0x37,0x7a,0x54,0x55,0x67,0x6a,0x53,0x44,0x66,0x6b,0x71,0x74,0x32,0x64,0x35,0x48,0x38,0x70,0x75,0x5a,0x72,0x6e,0x79,0x4b,0x6d,0x30,0x6f]),_0xf673b2=0x3cb71520,_0x4a5722=0x3cb065c8^_0xf673b2,_0x2487bc=window[_0x2cd4ce([0x44,0x61,0x74,0x65])][_0x2cd4ce([0x6e,0x6f,0x77])](),_0x2add55=_0x23c50b[_0x2cd4ce([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2e8c0b=new window[(_0x2cd4ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xbaf34b=>{_0x2add55[_0x2cd4ce([0x6f,0x6e,0x63,0x65])](_0x2cd4ce([0x72,0x65,0x61,0x64,0x79]),_0xbaf34b);}),_0x3c41df={[_0x2cd4ce([0x6b,0x74,0x79])]:_0x2cd4ce([0x45,0x43]),[_0x2cd4ce([0x75,0x73,0x65])]:_0x2cd4ce([0x73,0x69,0x67]),[_0x2cd4ce([0x63,0x72,0x76])]:_0x2cd4ce([0x50,0x2d,0x32,0x35,0x36]),[_0x2cd4ce([0x78])]:_0x2cd4ce([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]),[_0x2cd4ce([0x79])]:_0x2cd4ce([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]),[_0x2cd4ce([0x61,0x6c,0x67])]:_0x2cd4ce([0x45,0x53,0x32,0x35,0x36])},_0x104601=_0x2add55[_0x2cd4ce([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2cd4ce([0x67,0x65,0x74])](_0x2cd4ce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3a533b(){let _0x5a2aeb,_0x2179d7=null,_0x1d8cfe=null;try{if(_0x104601==_0x2cd4ce([0x47,0x50,0x4c]))return _0x2cd4ce([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5a2aeb=_0x2aaf8f(),!_0x5a2aeb)return _0x2cd4ce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5a2aeb[_0x2cd4ce([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1d8cfe=_0x47259e(_0x5a2aeb[_0x2cd4ce([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5a2aeb[_0x2cd4ce([0x6a,0x74,0x69])])),await _0xa1b256()?_0x1d4fda()?_0x2e6251()?_0x2cd4ce([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x29d658()?(_0x5a2aeb[_0x2cd4ce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2cd4ce([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2179d7=_0x344d7a(_0x2cd4ce([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5a2aeb[_0x2cd4ce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2cd4ce([0x74,0x72,0x69,0x61,0x6c])&&(_0x2179d7=_0x344d7a(_0x2cd4ce([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3a31ec()):_0x2cd4ce([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2cd4ce([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2cd4ce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2cd4ce([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2e6251(){const _0x28985b=[_0x2cd4ce([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2cd4ce([0x74,0x72,0x69,0x61,0x6c])][_0x2cd4ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a2aeb[_0x2cd4ce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2487bc/0x3e8:0xe10*_0x4a5722;return _0x5a2aeb[_0x2cd4ce([0x65,0x78,0x70])]<_0x28985b;}function _0x1d4fda(){const _0x3a5500=_0x5a2aeb[_0x2cd4ce([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3a5500&&(!!_0x3a5500[_0x2cd4ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cd4ce([0x2a]))||!!_0x3a5500[_0x2cd4ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cd4ce([0x55,0x50,0x4c,0x43])));}function _0x29d658(){const _0x53d4b3=_0x236b,_0x3ee85d=_0x5a2aeb[_0x2cd4ce([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3ee85d||0x0==_0x3ee85d[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x252e9a}=new URL(window[_0x2cd4ce([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x53d4b3(0x178)]);if(_0x3ee85d[_0x2cd4ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x252e9a))return!0x0;const _0x30fd0f=_0x252e9a[_0x2cd4ce([0x73,0x70,0x6c,0x69,0x74])](_0x2cd4ce([0x2e]));return _0x3ee85d[_0x2cd4ce([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d3816=>_0x2d3816[_0x2cd4ce([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cd4ce([0x2a])))[_0x2cd4ce([0x6d,0x61,0x70])](_0x554cb7=>_0x554cb7[_0x2cd4ce([0x73,0x70,0x6c,0x69,0x74])](_0x2cd4ce([0x2e])))[_0x2cd4ce([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x577619=>_0x577619[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x30fd0f[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2cd4ce([0x6d,0x61,0x70])](_0x58befb=>Array(_0x30fd0f[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x58befb[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2cd4ce([0x66,0x69,0x6c,0x6c])](_0x58befb[0x0]===_0x2cd4ce([0x2a])?_0x2cd4ce([0x2a]):'')[_0x2cd4ce([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x58befb))[_0x2cd4ce([0x73,0x6f,0x6d,0x65])](_0x479e60=>_0x30fd0f[_0x2cd4ce([0x65,0x76,0x65,0x72,0x79])]((_0x320b6a,_0x36db04)=>_0x479e60[_0x36db04]===_0x320b6a||_0x479e60[_0x36db04]===_0x2cd4ce([0x2a])));}function _0x3a31ec(){return _0x2179d7&&_0x1d8cfe?new window[(_0x2cd4ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x362bb2,_0x3cfece)=>{_0x2179d7[_0x2cd4ce([0x74,0x68,0x65,0x6e])](_0x362bb2,_0x3cfece),_0x1d8cfe[_0x2cd4ce([0x74,0x68,0x65,0x6e])](_0xd70701=>{_0xd70701!=_0x2cd4ce([0x56,0x61,0x6c,0x69,0x64])&&_0x362bb2(_0xd70701);},_0x3cfece);}):_0x2179d7||_0x1d8cfe||_0x2cd4ce([0x56,0x61,0x6c,0x69,0x64]);}}function _0x47259e(_0x9f5f1a,_0x2da888){return new window[(_0x2cd4ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20ea19=>{if(_0x39573a())return _0x20ea19(_0x2cd4ce([0x56,0x61,0x6c,0x69,0x64]));_0x37e19b(),_0x2add55[_0x2cd4ce([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2cd4ce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x28fed5=!0x1;const _0x3887b3=_0xa236b4();function _0x484394(_0x340547){return!!_0x340547&&(typeof _0x340547===_0x2cd4ce([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x340547===_0x2cd4ce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x340547[_0x2cd4ce([0x74,0x68,0x65,0x6e])]===_0x2cd4ce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x340547[_0x2cd4ce([0x63,0x61,0x74,0x63,0x68])]===_0x2cd4ce([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x310119(_0x167637){_0x1d53be(_0x167637)[_0x2cd4ce([0x74,0x68,0x65,0x6e])](_0x56187b=>{if(!_0x56187b||_0x56187b[_0x2cd4ce([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2cd4ce([0x6f,0x6b]))return _0x2cd4ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xc9db13(_0x1dd6f4(_0x3887b3+_0x2da888))!=_0x56187b[_0x2cd4ce([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2cd4ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2cd4ce([0x56,0x61,0x6c,0x69,0x64]);})[_0x2cd4ce([0x74,0x68,0x65,0x6e])](_0x5591a2=>(_0x4c1ed6(),_0x5591a2),()=>{const _0x288f59=_0xa447c1();return null==_0x288f59?(_0x4c1ed6(),_0x2cd4ce([0x56,0x61,0x6c,0x69,0x64])):_0x2cd4ce(_0x2487bc-_0x288f59>(0x18bb9120^_0xf673b2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2cd4ce([0x74,0x68,0x65,0x6e])](_0x20ea19)[_0x2cd4ce([0x63,0x61,0x74,0x63,0x68])](()=>{_0x20ea19(_0x2cd4ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2e54fc=0x3c81fba0^_0xf673b2;function _0x4c1ed6(){const _0x2618b4=_0x2cd4ce([0x6c,0x6c,0x63,0x74,0x2d])+_0xc9db13(_0x1dd6f4(_0x9f5f1a)),_0xcf363d=_0x549ad8(_0xc9db13(window[_0x2cd4ce([0x4d,0x61,0x74,0x68])][_0x2cd4ce([0x63,0x65,0x69,0x6c])](_0x2487bc/_0x2e54fc)));window[_0x2cd4ce([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2cd4ce([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2618b4,_0xcf363d);}function _0xa447c1(){const _0x5f5c66=_0x2cd4ce([0x6c,0x6c,0x63,0x74,0x2d])+_0xc9db13(_0x1dd6f4(_0x9f5f1a)),_0x4e0e6b=window[_0x2cd4ce([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2cd4ce([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5f5c66);return _0x4e0e6b?window[_0x2cd4ce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x549ad8(_0x4e0e6b),0x10)*_0x2e54fc:null;}function _0x1d53be(_0x566650){return new window[(_0x2cd4ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5d2473,_0x175e56)=>{_0x566650[_0x2cd4ce([0x74,0x68,0x65,0x6e])](_0x5d2473,_0x175e56),window[_0x2cd4ce([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x175e56,0x3cb6c1e0^_0xf673b2);});}}_0x2add55[_0x2cd4ce([0x6f,0x6e])](_0x2cd4ce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x370577,_0x1fb88d)=>{if(_0x1fb88d[0x0]!=_0x9f5f1a)return _0x20ea19(_0x2cd4ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1fb88d[0x1]={..._0x1fb88d[0x1],[_0x2cd4ce([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3887b3};},{[_0x2cd4ce([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2cd4ce([0x68,0x69,0x67,0x68])}),_0x2add55[_0x2cd4ce([0x6f,0x6e])](_0x2cd4ce([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3b5081=>{_0x484394(_0x3b5081[_0x2cd4ce([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x28fed5=!0x0,_0x310119(_0x3b5081[_0x2cd4ce([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2cd4ce([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2cd4ce([0x6c,0x6f,0x77])}),_0x2e8c0b[_0x2cd4ce([0x74,0x68,0x65,0x6e])](()=>{_0x28fed5||_0x20ea19(_0x2cd4ce([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x39573a(){return _0x2add55[_0x2cd4ce([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2cd4ce([0x76,0x69,0x65,0x77])][_0x2cd4ce([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2cd4ce([0x61,0x75,0x74,0x6f]);}function _0x37e19b(){_0x2add55[_0x2cd4ce([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2cd4ce([0x76,0x69,0x65,0x77])][_0x2cd4ce([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2cd4ce([0x61,0x75,0x74,0x6f]);}}function _0x344d7a(_0x5f15b5){const _0x33b459=[new window[(_0x2cd4ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x208793=>setTimeout(_0x208793,0x3cbe2bec^_0xf673b2)),_0x2e8c0b[_0x2cd4ce([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2cd4ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x279f69=>{let _0x376648=0x0;_0x2add55[_0x2cd4ce([0x6d,0x6f,0x64,0x65,0x6c])][_0x2cd4ce([0x6f,0x6e])](_0x2cd4ce([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x66f173,_0x5f30f6)=>{_0x5f30f6[0x0][_0x2cd4ce([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x376648++,_0x376648==(0x3cb714d8^_0xf673b2)&&(_0x279f69(),_0x66f173[_0x2cd4ce([0x6f,0x66,0x66])]());});}))];return window[_0x2cd4ce([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2cd4ce([0x72,0x61,0x63,0x65])](_0x33b459)[_0x2cd4ce([0x74,0x68,0x65,0x6e])](()=>_0x5f15b5);}async function _0x688b63(){await _0x2e8c0b,_0x2add55[_0x2cd4ce([0x6d,0x6f,0x64,0x65,0x6c])][_0x2cd4ce([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3c270c,_0x2add55[_0x2cd4ce([0x6d,0x6f,0x64,0x65,0x6c])][_0x2cd4ce([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3c270c,_0x2add55[_0x2cd4ce([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2cd4ce([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x131a24(_0x303fb9){const _0x35f23e=_0xd512c();_0x2add55[_0x35f23e]=_0x2cd4ce([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x303fb9,_0x303fb9!=_0x2cd4ce([0x56,0x61,0x6c,0x69,0x64])&&_0x688b63();}function _0xd512c(){const _0x4994f9=window[_0x2cd4ce([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2cd4ce([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2cd4ce([0x6e,0x6f,0x77])]())[_0x2cd4ce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2cd4ce([0x2e]),'');let _0x2c8e41=_0x2cd4ce([0x49]);for(let _0x2a5737=0x0;_0x2a5737<_0x4994f9[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2a5737+=0x2){let _0xaa1a61=window[_0x2cd4ce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4994f9[_0x2cd4ce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2a5737,_0x2a5737+0x2));_0xaa1a61>=_0x4649ed[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xaa1a61-=_0x4649ed[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2c8e41+=_0x4649ed[_0xaa1a61];}return _0x2c8e41;}function _0x2aaf8f(){const _0x21cdef=_0x104601[_0x2cd4ce([0x73,0x70,0x6c,0x69,0x74])](_0x2cd4ce([0x2e]));if(0x3!=_0x21cdef[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x289110(_0x21cdef[0x1]);function _0x289110(_0x382a9f){const _0x5adf35=_0x1d95e3(_0x382a9f);return _0x5adf35&&_0x1e1306()?_0x5adf35:null;function _0x1e1306(){const _0x582bef=_0x5adf35[_0x2cd4ce([0x6a,0x74,0x69])],_0x205531=window[_0x2cd4ce([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x582bef[_0x2cd4ce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x582bef[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2f7b35={..._0x5adf35,[_0x2cd4ce([0x6a,0x74,0x69])]:_0x582bef[_0x2cd4ce([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x582bef[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2f7b35[_0x2cd4ce([0x76,0x63])],_0x1dd6f4(_0x2f7b35)==_0x205531;}}}async function _0xa1b256(){let _0x4e4f70=!0x0;try{const _0x4315ca=_0x104601[_0x2cd4ce([0x73,0x70,0x6c,0x69,0x74])](_0x2cd4ce([0x2e])),[_0x51672d,_0xe76e13,_0x4a7c25]=_0x4315ca;return _0x4cd768(_0x51672d),await _0x5585fd(_0x51672d,_0xe76e13,_0x4a7c25),_0x4e4f70;}catch{return!0x1;}function _0x4cd768(_0xf32f48){const _0x4dd5d5=_0x1d95e3(_0xf32f48);_0x4dd5d5&&_0x4dd5d5[_0x2cd4ce([0x61,0x6c,0x67])]==_0x2cd4ce([0x45,0x53,0x32,0x35,0x36])||(_0x4e4f70=!0x1);}async function _0x5585fd(_0x235bb9,_0x65ee97,_0x367b21){const _0x28140d=window[_0x2cd4ce([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2cd4ce([0x66,0x72,0x6f,0x6d])](_0x322468(_0x367b21),_0x34e279=>_0x34e279[_0x2cd4ce([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1b7a19=new window[(_0x2cd4ce([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2cd4ce([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x235bb9+_0x2cd4ce([0x2e])+_0x65ee97),_0x5bdf80=window[_0x2cd4ce([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2cd4ce([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5bdf80)return;const _0x54bf71=await _0x5bdf80[_0x2cd4ce([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2cd4ce([0x6a,0x77,0x6b]),_0x3c41df,{[_0x2cd4ce([0x6e,0x61,0x6d,0x65])]:_0x2cd4ce([0x45,0x43,0x44,0x53,0x41]),[_0x2cd4ce([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2cd4ce([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2cd4ce([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5bdf80[_0x2cd4ce([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2cd4ce([0x6e,0x61,0x6d,0x65])]:_0x2cd4ce([0x45,0x43,0x44,0x53,0x41]),[_0x2cd4ce([0x68,0x61,0x73,0x68])]:{[_0x2cd4ce([0x6e,0x61,0x6d,0x65])]:_0x2cd4ce([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x54bf71,_0x28140d,_0x1b7a19)||(_0x4e4f70=!0x1);}}function _0x1d95e3(_0x15b8d3){return _0x15b8d3[_0x2cd4ce([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2cd4ce([0x65,0x79]))?JSON[_0x2cd4ce([0x70,0x61,0x72,0x73,0x65])](_0x322468(_0x15b8d3)):null;}function _0x322468(_0x37f89c){return window[_0x2cd4ce([0x61,0x74,0x6f,0x62])](_0x37f89c[_0x2cd4ce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2cd4ce([0x2b]))[_0x2cd4ce([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2cd4ce([0x2f])));}function _0x1dd6f4(_0x471988){let _0x50f156=0x1505;function _0x31d988(_0x1b1c19){for(let _0x3e7457=0x0;_0x3e7457<_0x1b1c19[_0x2cd4ce([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3e7457++){const _0x469d84=_0x1b1c19[_0x2cd4ce([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3e7457);_0x50f156=(_0x50f156<<0x5)+_0x50f156+_0x469d84,_0x50f156&=_0x50f156;}}function _0x4b6fb4(_0x361276){Array[_0x2cd4ce([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x361276)?_0x361276[_0x2cd4ce([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4b6fb4):_0x361276&&typeof _0x361276==_0x2cd4ce([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2cd4ce([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x361276)[_0x2cd4ce([0x73,0x6f,0x72,0x74])]()[_0x2cd4ce([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x57ebbe,_0x2e306a])=>{_0x31d988(_0x57ebbe),_0x4b6fb4(_0x2e306a);}):_0x31d988(window[_0x2cd4ce([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x361276));}return _0x4b6fb4(_0x471988),_0x50f156>>>0x0;}function _0xc9db13(_0x2378d0){return _0x2378d0[_0x2cd4ce([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2cd4ce([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2cd4ce([0x30]));}function _0x549ad8(_0x277c15){return _0x277c15[_0x2cd4ce([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2cd4ce([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2cd4ce([0x6a,0x6f,0x69,0x6e])]('');}function _0x3c270c(){}function _0x2cd4ce(_0xa21340){const _0x5d5ede=_0x236b;return _0xa21340[_0x5d5ede(0x18b)](_0x352218=>String[_0x5d5ede(0x19f)](_0x352218))[_0x5d5ede(0x18c)]('');}_0x131a24(await _0x3a533b());}(this);}[_0x2840ed(0x192)](){const _0x13e015=_0x2840ed,_0x37180b=this[_0x13e015(0x1a3)][_0x13e015(0x193)][_0x13e015(0x17a)];_0x37180b[_0x13e015(0x1c5)](_0x13e015(0x17d))&&_0x37180b[_0x13e015(0x1aa)](_0x13e015(0x17d),{'allowAttributes':[_0x13e015(0x19c)]}),_0x37180b[_0x13e015(0x1c5)](_0x13e015(0x195))&&_0x37180b[_0x13e015(0x1aa)](_0x13e015(0x195),{'allowAttributes':[_0x13e015(0x19c)]});}[_0x2840ed(0x182)](){const _0x35e0d3=_0x2840ed,_0x4ae891=this[_0x35e0d3(0x1a3)];_0x4ae891[_0x35e0d3(0x18f)][_0x35e0d3(0x1b2)](_0x35e0d3(0x1bf))[_0x35e0d3(0x17b)]({'model':_0x35e0d3(0x19c),'view':_0x35e0d3(0x177)}),_0x4ae891[_0x35e0d3(0x18f)][_0x35e0d3(0x1b2)](_0x35e0d3(0x185))[_0x35e0d3(0x1be)]({'model':{'key':_0x35e0d3(0x19c),'value':_0x506d8e=>_0x506d8e[_0x35e0d3(0x171)](_0x35e0d3(0x177))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x58b6da=_0x4ae891[_0x35e0d3(0x1c2)][_0x35e0d3(0x1ac)](_0x35e0d3(0x1a7));_0x58b6da&&this[_0x35e0d3(0x1b4)](_0x58b6da,_0x35e0d3(0x186),(_0x59782d,[_0xe074d6,_0xb1f92])=>{const _0x4840b0=_0x35e0d3;_0xe074d6[_0x4840b0(0x197)](_0x4840b0(0x19c),_0xb1f92);});}[_0x2840ed(0x17f)](){const _0x14933f=_0x2840ed,_0x3098e7=this[_0x14933f(0x1a3)][_0x14933f(0x17c)][_0x14933f(0x1ac)](_0x14933f(0x1a2))||{},_0x3b9336=this[_0x14933f(0x1a3)][_0x14933f(0x17c)][_0x14933f(0x1ac)](_0x14933f(0x1bc))||'';this[_0x14933f(0x1c0)]=_0x3cd583(_0x4d54cd[_0x14933f(0x1a1)],_0x14933f(0x1b7),{..._0x3098e7,'pubkey':_0x3b9336,'ctx-name':_0x14933f(0x1a9)+this[_0x14933f(0x173)],'sourceList':'','imgOnly':_0x14933f(0x1a0),'removeCopyright':_0x14933f(0x1a0),'localeName':this[_0x14933f(0x1a3)][_0x14933f(0x1c3)][_0x14933f(0x1a8)],'externalSourcesEmbedCss':_0x14933f(0x1b6)}),this[_0x14933f(0x1c0)][_0x14933f(0x1c1)]=_0x3ba545=>{const _0x51f04a=_0x14933f;if(_0x51f04a(0x199)==_0x3ba545)return _0x51f04a(0x1a4);},_0x4d54cd[_0x14933f(0x1a1)][_0x14933f(0x172)][_0x14933f(0x19d)](this[_0x14933f(0x1c0)]);}[_0x2840ed(0x1af)](){const _0x3ae774=_0x2840ed;this[_0x3ae774(0x1ad)]=_0x3cd583(_0x4d54cd[_0x3ae774(0x1a1)],_0x3ae774(0x1b5),{'ctx-name':_0x3ae774(0x1a9)+this[_0x3ae774(0x173)]}),_0x4d54cd[_0x3ae774(0x1a1)][_0x3ae774(0x172)][_0x3ae774(0x19d)](this[_0x3ae774(0x1ad)]);}[_0x2840ed(0x194)](){const _0x18dd82=_0x2840ed,_0x4979db=this[_0x18dd82(0x1a3)][_0x18dd82(0x1c2)][_0x18dd82(0x1ac)](_0x18dd82(0x18a));_0x4979db&&this[_0x18dd82(0x1b4)](_0x4979db,_0x18dd82(0x1b3),()=>{const _0x280bef=_0x18dd82,_0x57df75=this[_0x280bef(0x1a3)][_0x280bef(0x193)][_0x280bef(0x1a1)][_0x280bef(0x196)][_0x280bef(0x1a5)]();_0x57df75&&_0x57df75[_0x280bef(0x171)](_0x280bef(0x19c))&&this[_0x280bef(0x1a3)][_0x280bef(0x190)][_0x280bef(0x19b)][_0x280bef(0x183)](_0x280bef(0x180),()=>{const _0x5b9156=_0x280bef;_0x4fe1b9(this[_0x5b9156(0x1a3)],_0x57df75);});});const _0x52f71c=this[_0x18dd82(0x1a3)][_0x18dd82(0x1c2)][_0x18dd82(0x1ac)](_0x18dd82(0x188));_0x52f71c&&this[_0x18dd82(0x1b4)](_0x52f71c,_0x18dd82(0x1b3),()=>{const _0x386aaa=_0x18dd82,_0xae27ca=this[_0x386aaa(0x1a3)][_0x386aaa(0x193)][_0x386aaa(0x1a1)][_0x386aaa(0x196)][_0x386aaa(0x1a5)]();_0xae27ca&&_0xae27ca[_0x386aaa(0x171)](_0x386aaa(0x19c))&&this[_0x386aaa(0x1a3)][_0x386aaa(0x190)][_0x386aaa(0x19b)][_0x386aaa(0x183)](_0x386aaa(0x180),()=>{const _0x5f56e1=_0x386aaa;_0x4fe1b9(this[_0x5f56e1(0x1a3)],_0xae27ca);});});}}
|
|
23
|
+
const _0xd364dd=_0x51b1;(function(_0x19567c,_0x14759e){const _0x3441f0=_0x51b1,_0x3a9916=_0x19567c();while(!![]){try{const _0x60392=-parseInt(_0x3441f0(0x109))/0x1*(parseInt(_0x3441f0(0x12d))/0x2)+parseInt(_0x3441f0(0x140))/0x3+-parseInt(_0x3441f0(0x107))/0x4+parseInt(_0x3441f0(0x152))/0x5*(parseInt(_0x3441f0(0x154))/0x6)+-parseInt(_0x3441f0(0x112))/0x7*(-parseInt(_0x3441f0(0x158))/0x8)+parseInt(_0x3441f0(0x127))/0x9*(parseInt(_0x3441f0(0x131))/0xa)+parseInt(_0x3441f0(0x141))/0xb;if(_0x60392===_0x14759e)break;else _0x3a9916['push'](_0x3a9916['shift']());}catch(_0x3129cb){_0x3a9916['push'](_0x3a9916['shift']());}}}(_0x505d,0xa3942));import{Plugin as _0x1db495}from'ckeditor5/src/core.js';import{Dialog as _0x38d495}from'ckeditor5/src/ui.js';import{createElement as _0x28de30,global as _0x45e48d,uid as _0x3434bd}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x268236}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x40ed1d}from'./uploadcareuploadadapter.js';function _0x505d(){const _0x556f13=['execute','map','uploadcare','commands','href','UploadcareEditing','attributeToAttribute','editing','closeMax','_initConfig','44755xJPXYR','downcast','330pZmHbU','schema','_ctxElement','data-uc-image-id','37112MBmVQp','uploadcare.uploader','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','destroy','3713132qCvfxO','_initCtx','139TtyyeK','uploader-','conversion','replaceImageSource','body','insertImage','imageBlock','model','init','595MgBTIS','uploadcareImageId','_initSchema','uc-upload-ctx-provider','_configElement','elementToAttribute','extend','join','#uc-icon-arrow-down','PictureEditing','uc-config','selection','pluginName','appendChild','render','cleanupImage','editor','uploadcare.pubkey','ctxElement','getSelectedElement','configElement','1449CRUIrJ','querySelector','removeAttribute','contentLanguage','add','_initImageProcessingIndicator','11894ChdLdM','upcast','isPremiumPlugin','document','26170lmrikI','get','uploadcareImageReplace','afterInit','imageInline','for','isRegistered','true','view','isOfficialPlugin','fromCharCode','ucContextId','getAttribute','listenTo','requires','1382985SItYBA','7215802mqMVXN','_initConversion','remove','iconHrefResolver','once','input[uploadcare-file-input]','config'];_0x505d=function(){return _0x556f13;};return _0x505d();}function _0x51b1(_0x25a0a9,_0x6decbb){const _0x505dd7=_0x505d();return _0x51b1=function(_0x51b164,_0x254f79){_0x51b164=_0x51b164-0x107;let _0x54c2dd=_0x505dd7[_0x51b164];return _0x54c2dd;},_0x51b1(_0x25a0a9,_0x6decbb);}import{showImageProcessingIndicator as _0x3f4cfa}from'./utils/editingutils.js';export class UploadcareEditing extends _0x1db495{[_0xd364dd(0x116)]=null;[_0xd364dd(0x156)]=null;static get[_0xd364dd(0x11e)](){const _0x23fe52=_0xd364dd;return _0x23fe52(0x14d);}static get[_0xd364dd(0x13f)](){const _0x1869d1=_0xd364dd;return[_0x1869d1(0x11b),_0x40ed1d,_0x38d495];}static get[_0xd364dd(0x13a)](){return!0x0;}static get[_0xd364dd(0x12f)](){return!0x0;}[_0xd364dd(0x13c)];get[_0xd364dd(0x126)](){const _0x4999aa=_0xd364dd;return this[_0x4999aa(0x116)];}get[_0xd364dd(0x124)](){const _0x1d4433=_0xd364dd;return this[_0x1d4433(0x156)];}constructor(_0x1859f5){const _0x381069=_0xd364dd;super(_0x1859f5),this[_0x381069(0x13c)]=_0x3434bd();}[_0xd364dd(0x111)](){const _0x25c5a4=_0xd364dd,_0xd28893=this[_0x25c5a4(0x122)];_0xd28893[_0x25c5a4(0x14b)][_0x25c5a4(0x12b)](_0x25c5a4(0x14a),new _0x268236(_0xd28893));}[_0xd364dd(0x134)](){const _0x86c122=_0xd364dd;this[_0x86c122(0x114)](),this[_0x86c122(0x142)](),this[_0x86c122(0x151)](),this[_0x86c122(0x108)](),this[_0x86c122(0x12c)](),this[_0x86c122(0x13e)](this[_0x86c122(0x122)],_0x86c122(0x15c),()=>{const _0x550845=_0x86c122;this[_0x550845(0x116)]&&(this[_0x550845(0x116)][_0x550845(0x143)](),this[_0x550845(0x116)]=null),this[_0x550845(0x156)]&&(this[_0x550845(0x156)][_0x550845(0x143)](),this[_0x550845(0x156)]=null);const _0x12ee28=_0x45e48d[_0x550845(0x130)][_0x550845(0x128)](_0x550845(0x146));_0x12ee28&&_0x12ee28[_0x550845(0x143)]();}),async function(_0x125806){const _0x4da1a1=_0x48da8d([0x46,0x73,0x79,0x69,0x71,0x61,0x30,0x72,0x62,0x58,0x45,0x47,0x4f,0x67,0x52,0x55,0x38,0x6d,0x59,0x32,0x76,0x65,0x51,0x77,0x43,0x78,0x4d,0x66,0x6e,0x4b,0x36,0x63,0x31,0x39,0x6b,0x74,0x7a,0x34,0x57,0x44,0x6a,0x37,0x48,0x5a,0x4e,0x54,0x6f,0x33,0x64,0x50,0x49,0x41,0x68,0x35,0x6c,0x53,0x75,0x4c,0x4a,0x56,0x42,0x70]),_0x4774fa=0x2cbbfe0c,_0x28136b=0x2cbc8ee4^_0x4774fa,_0x5cba50=window[_0x48da8d([0x44,0x61,0x74,0x65])][_0x48da8d([0x6e,0x6f,0x77])](),_0x213431=_0x125806[_0x48da8d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5dbb96=new window[(_0x48da8d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x186c76=>{_0x213431[_0x48da8d([0x6f,0x6e,0x63,0x65])](_0x48da8d([0x72,0x65,0x61,0x64,0x79]),_0x186c76);}),_0x43bb4d={[_0x48da8d([0x6b,0x74,0x79])]:_0x48da8d([0x45,0x43]),[_0x48da8d([0x75,0x73,0x65])]:_0x48da8d([0x73,0x69,0x67]),[_0x48da8d([0x63,0x72,0x76])]:_0x48da8d([0x50,0x2d,0x32,0x35,0x36]),[_0x48da8d([0x78])]:_0x48da8d([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]),[_0x48da8d([0x79])]:_0x48da8d([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]),[_0x48da8d([0x61,0x6c,0x67])]:_0x48da8d([0x45,0x53,0x32,0x35,0x36])},_0x55af8f=_0x213431[_0x48da8d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x48da8d([0x67,0x65,0x74])](_0x48da8d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3209a4(){let _0x2004e1,_0x529bf5=null,_0x3c3541=null;try{if(_0x55af8f==_0x48da8d([0x47,0x50,0x4c]))return _0x48da8d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2004e1=_0x217f29(),!_0x2004e1)return _0x48da8d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2004e1[_0x48da8d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3c3541=_0x498ecf(_0x2004e1[_0x48da8d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2004e1[_0x48da8d([0x6a,0x74,0x69])])),await _0x16f3f4()?_0xd34124()?_0x30dc76()?_0x48da8d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4045e9()?(_0x2004e1[_0x48da8d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x48da8d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x529bf5=_0x5e2b91(_0x48da8d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2004e1[_0x48da8d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x48da8d([0x74,0x72,0x69,0x61,0x6c])&&(_0x529bf5=_0x5e2b91(_0x48da8d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5a5cf6()):_0x48da8d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x48da8d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x48da8d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x48da8d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x30dc76(){const _0x103db3=[_0x48da8d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x48da8d([0x74,0x72,0x69,0x61,0x6c])][_0x48da8d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2004e1[_0x48da8d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5cba50/0x3e8:0xe10*_0x28136b;return _0x2004e1[_0x48da8d([0x65,0x78,0x70])]<_0x103db3;}function _0xd34124(){const _0x2c886e=_0x2004e1[_0x48da8d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2c886e&&(!!_0x2c886e[_0x48da8d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x48da8d([0x2a]))||!!_0x2c886e[_0x48da8d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x48da8d([0x55,0x50,0x4c,0x43])));}function _0x4045e9(){const _0x4546e2=_0x51b1,_0x365006=_0x2004e1[_0x48da8d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x365006||0x0==_0x365006[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5796dc}=new URL(window[_0x48da8d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4546e2(0x14c)]);if(_0x365006[_0x48da8d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5796dc))return!0x0;const _0x2e23d8=_0x5796dc[_0x48da8d([0x73,0x70,0x6c,0x69,0x74])](_0x48da8d([0x2e]));return _0x365006[_0x48da8d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x61d6c7=>_0x61d6c7[_0x48da8d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x48da8d([0x2a])))[_0x48da8d([0x6d,0x61,0x70])](_0x21de10=>_0x21de10[_0x48da8d([0x73,0x70,0x6c,0x69,0x74])](_0x48da8d([0x2e])))[_0x48da8d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf4d6a8=>_0xf4d6a8[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2e23d8[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x48da8d([0x6d,0x61,0x70])](_0xfd4a7=>Array(_0x2e23d8[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xfd4a7[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x48da8d([0x66,0x69,0x6c,0x6c])](_0xfd4a7[0x0]===_0x48da8d([0x2a])?_0x48da8d([0x2a]):'')[_0x48da8d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xfd4a7))[_0x48da8d([0x73,0x6f,0x6d,0x65])](_0x26d330=>_0x2e23d8[_0x48da8d([0x65,0x76,0x65,0x72,0x79])]((_0x623c6d,_0x16c034)=>_0x26d330[_0x16c034]===_0x623c6d||_0x26d330[_0x16c034]===_0x48da8d([0x2a])));}function _0x5a5cf6(){return _0x529bf5&&_0x3c3541?new window[(_0x48da8d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x37b7c3,_0x123cfa)=>{_0x529bf5[_0x48da8d([0x74,0x68,0x65,0x6e])](_0x37b7c3,_0x123cfa),_0x3c3541[_0x48da8d([0x74,0x68,0x65,0x6e])](_0x1790e9=>{_0x1790e9!=_0x48da8d([0x56,0x61,0x6c,0x69,0x64])&&_0x37b7c3(_0x1790e9);},_0x123cfa);}):_0x529bf5||_0x3c3541||_0x48da8d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x498ecf(_0x20887c,_0x4c0f21){return new window[(_0x48da8d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10b082=>{if(_0xe2bbd1())return _0x10b082(_0x48da8d([0x56,0x61,0x6c,0x69,0x64]));_0x26cb33(),_0x213431[_0x48da8d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x48da8d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x29bf4e=!0x1;const _0x58bd78=_0x3434bd();function _0x3c3663(_0x2b34b8){return!!_0x2b34b8&&(typeof _0x2b34b8===_0x48da8d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2b34b8===_0x48da8d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2b34b8[_0x48da8d([0x74,0x68,0x65,0x6e])]===_0x48da8d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2b34b8[_0x48da8d([0x63,0x61,0x74,0x63,0x68])]===_0x48da8d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4af75d(_0x197985){_0x5971f8(_0x197985)[_0x48da8d([0x74,0x68,0x65,0x6e])](_0x4e74c6=>{if(!_0x4e74c6||_0x4e74c6[_0x48da8d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x48da8d([0x6f,0x6b]))return _0x48da8d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5105e6(_0x7ab5a4(_0x58bd78+_0x4c0f21))!=_0x4e74c6[_0x48da8d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x48da8d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x48da8d([0x56,0x61,0x6c,0x69,0x64]);})[_0x48da8d([0x74,0x68,0x65,0x6e])](_0x4d7f44=>(_0x1c2e74(),_0x4d7f44),()=>{const _0x312556=_0xa23975();return null==_0x312556?(_0x1c2e74(),_0x48da8d([0x56,0x61,0x6c,0x69,0x64])):_0x48da8d(_0x5cba50-_0x312556>(0x8b77a0c^_0x4774fa)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x48da8d([0x74,0x68,0x65,0x6e])](_0x10b082)[_0x48da8d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x10b082(_0x48da8d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3b4a18=0x2c8d108c^_0x4774fa;function _0x1c2e74(){const _0x56eedc=_0x48da8d([0x6c,0x6c,0x63,0x74,0x2d])+_0x5105e6(_0x7ab5a4(_0x20887c)),_0x18c537=_0x16b93f(_0x5105e6(window[_0x48da8d([0x4d,0x61,0x74,0x68])][_0x48da8d([0x63,0x65,0x69,0x6c])](_0x5cba50/_0x3b4a18)));window[_0x48da8d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x48da8d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x56eedc,_0x18c537);}function _0xa23975(){const _0x3cb858=_0x48da8d([0x6c,0x6c,0x63,0x74,0x2d])+_0x5105e6(_0x7ab5a4(_0x20887c)),_0x465bb3=window[_0x48da8d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x48da8d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3cb858);return _0x465bb3?window[_0x48da8d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x16b93f(_0x465bb3),0x10)*_0x3b4a18:null;}function _0x5971f8(_0x525fcc){return new window[(_0x48da8d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x445676,_0x1842e2)=>{_0x525fcc[_0x48da8d([0x74,0x68,0x65,0x6e])](_0x445676,_0x1842e2),window[_0x48da8d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1842e2,0x2cba2acc^_0x4774fa);});}}_0x213431[_0x48da8d([0x6f,0x6e])](_0x48da8d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x34f97f,_0x85c8cf)=>{if(_0x85c8cf[0x0]!=_0x20887c)return _0x10b082(_0x48da8d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x85c8cf[0x1]={..._0x85c8cf[0x1],[_0x48da8d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x58bd78};},{[_0x48da8d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x48da8d([0x68,0x69,0x67,0x68])}),_0x213431[_0x48da8d([0x6f,0x6e])](_0x48da8d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x405694=>{_0x3c3663(_0x405694[_0x48da8d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x29bf4e=!0x0,_0x4af75d(_0x405694[_0x48da8d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x48da8d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x48da8d([0x6c,0x6f,0x77])}),_0x5dbb96[_0x48da8d([0x74,0x68,0x65,0x6e])](()=>{_0x29bf4e||_0x10b082(_0x48da8d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xe2bbd1(){return _0x213431[_0x48da8d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x48da8d([0x76,0x69,0x65,0x77])][_0x48da8d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x48da8d([0x61,0x75,0x74,0x6f]);}function _0x26cb33(){_0x213431[_0x48da8d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x48da8d([0x76,0x69,0x65,0x77])][_0x48da8d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x48da8d([0x61,0x75,0x74,0x6f]);}}function _0x5e2b91(_0xbcac3d){const _0x1e890f=[new window[(_0x48da8d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43aaf8=>setTimeout(_0x43aaf8,0x2cb2c0c0^_0x4774fa)),_0x5dbb96[_0x48da8d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x48da8d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3cc3a3=>{let _0x25d8bf=0x0;_0x213431[_0x48da8d([0x6d,0x6f,0x64,0x65,0x6c])][_0x48da8d([0x6f,0x6e])](_0x48da8d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x52ea61,_0x910955)=>{_0x910955[0x0][_0x48da8d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x25d8bf++,_0x25d8bf==(0x2cbbfff4^_0x4774fa)&&(_0x3cc3a3(),_0x52ea61[_0x48da8d([0x6f,0x66,0x66])]());});}))];return window[_0x48da8d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x48da8d([0x72,0x61,0x63,0x65])](_0x1e890f)[_0x48da8d([0x74,0x68,0x65,0x6e])](()=>_0xbcac3d);}async function _0x15af1c(){await _0x5dbb96,_0x213431[_0x48da8d([0x6d,0x6f,0x64,0x65,0x6c])][_0x48da8d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x170564,_0x213431[_0x48da8d([0x6d,0x6f,0x64,0x65,0x6c])][_0x48da8d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x170564,_0x213431[_0x48da8d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x48da8d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x147763(_0x1104f8){const _0x4949b9=_0x352b39();_0x213431[_0x4949b9]=_0x48da8d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1104f8,_0x1104f8!=_0x48da8d([0x56,0x61,0x6c,0x69,0x64])&&_0x15af1c();}function _0x352b39(){const _0xcd527b=window[_0x48da8d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x48da8d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x48da8d([0x6e,0x6f,0x77])]())[_0x48da8d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x48da8d([0x2e]),'');let _0x4cf94c=_0x48da8d([0x46]);for(let _0x7ae59a=0x0;_0x7ae59a<_0xcd527b[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x7ae59a+=0x2){let _0x5027cc=window[_0x48da8d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xcd527b[_0x48da8d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x7ae59a,_0x7ae59a+0x2));_0x5027cc>=_0x4da1a1[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5027cc-=_0x4da1a1[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4cf94c+=_0x4da1a1[_0x5027cc];}return _0x4cf94c;}function _0x217f29(){const _0xf9cc99=_0x55af8f[_0x48da8d([0x73,0x70,0x6c,0x69,0x74])](_0x48da8d([0x2e]));if(0x3!=_0xf9cc99[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x50be15(_0xf9cc99[0x1]);function _0x50be15(_0x1736dc){const _0x1a8885=_0x5230a8(_0x1736dc);return _0x1a8885&&_0x3e84c5()?_0x1a8885:null;function _0x3e84c5(){const _0x29417f=_0x1a8885[_0x48da8d([0x6a,0x74,0x69])],_0x47d9f8=window[_0x48da8d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29417f[_0x48da8d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x29417f[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2ac875={..._0x1a8885,[_0x48da8d([0x6a,0x74,0x69])]:_0x29417f[_0x48da8d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x29417f[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2ac875[_0x48da8d([0x76,0x63])],_0x7ab5a4(_0x2ac875)==_0x47d9f8;}}}async function _0x16f3f4(){let _0x15df2d=!0x0;try{const _0x5f52c1=_0x55af8f[_0x48da8d([0x73,0x70,0x6c,0x69,0x74])](_0x48da8d([0x2e])),[_0x4bb96f,_0x1f5ff9,_0x53ed92]=_0x5f52c1;return _0x142f94(_0x4bb96f),await _0x3f816e(_0x4bb96f,_0x1f5ff9,_0x53ed92),_0x15df2d;}catch{return!0x1;}function _0x142f94(_0xb50d9e){const _0x505cfa=_0x5230a8(_0xb50d9e);_0x505cfa&&_0x505cfa[_0x48da8d([0x61,0x6c,0x67])]==_0x48da8d([0x45,0x53,0x32,0x35,0x36])||(_0x15df2d=!0x1);}async function _0x3f816e(_0x54a59d,_0x2be647,_0x4116d2){const _0x274d6a=window[_0x48da8d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x48da8d([0x66,0x72,0x6f,0x6d])](_0xa49049(_0x4116d2),_0xad5018=>_0xad5018[_0x48da8d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xcf9ccf=new window[(_0x48da8d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x48da8d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x54a59d+_0x48da8d([0x2e])+_0x2be647),_0x2634fa=window[_0x48da8d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x48da8d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2634fa)return;const _0x4c439a=await _0x2634fa[_0x48da8d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x48da8d([0x6a,0x77,0x6b]),_0x43bb4d,{[_0x48da8d([0x6e,0x61,0x6d,0x65])]:_0x48da8d([0x45,0x43,0x44,0x53,0x41]),[_0x48da8d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x48da8d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x48da8d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2634fa[_0x48da8d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x48da8d([0x6e,0x61,0x6d,0x65])]:_0x48da8d([0x45,0x43,0x44,0x53,0x41]),[_0x48da8d([0x68,0x61,0x73,0x68])]:{[_0x48da8d([0x6e,0x61,0x6d,0x65])]:_0x48da8d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4c439a,_0x274d6a,_0xcf9ccf)||(_0x15df2d=!0x1);}}function _0x5230a8(_0x3fd3ed){return _0x3fd3ed[_0x48da8d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x48da8d([0x65,0x79]))?JSON[_0x48da8d([0x70,0x61,0x72,0x73,0x65])](_0xa49049(_0x3fd3ed)):null;}function _0xa49049(_0x1001b0){return window[_0x48da8d([0x61,0x74,0x6f,0x62])](_0x1001b0[_0x48da8d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x48da8d([0x2b]))[_0x48da8d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x48da8d([0x2f])));}function _0x7ab5a4(_0x1c912a){let _0x2b0dbf=0x1505;function _0x95d5e0(_0x59d158){for(let _0x9b9875=0x0;_0x9b9875<_0x59d158[_0x48da8d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x9b9875++){const _0x1ba9b2=_0x59d158[_0x48da8d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x9b9875);_0x2b0dbf=(_0x2b0dbf<<0x5)+_0x2b0dbf+_0x1ba9b2,_0x2b0dbf&=_0x2b0dbf;}}function _0x39e451(_0x5c5086){Array[_0x48da8d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5c5086)?_0x5c5086[_0x48da8d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39e451):_0x5c5086&&typeof _0x5c5086==_0x48da8d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x48da8d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5c5086)[_0x48da8d([0x73,0x6f,0x72,0x74])]()[_0x48da8d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x6988ba,_0x23cc19])=>{_0x95d5e0(_0x6988ba),_0x39e451(_0x23cc19);}):_0x95d5e0(window[_0x48da8d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5c5086));}return _0x39e451(_0x1c912a),_0x2b0dbf>>>0x0;}function _0x5105e6(_0x516764){return _0x516764[_0x48da8d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x48da8d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x48da8d([0x30]));}function _0x16b93f(_0x340c94){return _0x340c94[_0x48da8d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x48da8d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x48da8d([0x6a,0x6f,0x69,0x6e])]('');}function _0x170564(){}function _0x48da8d(_0x3fa339){const _0x26ffd9=_0x51b1;return _0x3fa339[_0x26ffd9(0x149)](_0x255830=>String[_0x26ffd9(0x13b)](_0x255830))[_0x26ffd9(0x119)]('');}_0x147763(await _0x3209a4());}(this);}[_0xd364dd(0x114)](){const _0x504a9d=_0xd364dd,_0x42b1d7=this[_0x504a9d(0x122)][_0x504a9d(0x110)][_0x504a9d(0x155)];_0x42b1d7[_0x504a9d(0x137)](_0x504a9d(0x10f))&&_0x42b1d7[_0x504a9d(0x118)](_0x504a9d(0x10f),{'allowAttributes':[_0x504a9d(0x113)]}),_0x42b1d7[_0x504a9d(0x137)](_0x504a9d(0x135))&&_0x42b1d7[_0x504a9d(0x118)](_0x504a9d(0x135),{'allowAttributes':[_0x504a9d(0x113)]});}[_0xd364dd(0x142)](){const _0x4b5b5a=_0xd364dd,_0x51bc8a=this[_0x4b5b5a(0x122)];_0x51bc8a[_0x4b5b5a(0x10b)][_0x4b5b5a(0x136)](_0x4b5b5a(0x153))[_0x4b5b5a(0x14e)]({'model':_0x4b5b5a(0x113),'view':_0x4b5b5a(0x157)}),_0x51bc8a[_0x4b5b5a(0x10b)][_0x4b5b5a(0x136)](_0x4b5b5a(0x12e))[_0x4b5b5a(0x117)]({'model':{'key':_0x4b5b5a(0x113),'value':_0x12da2f=>_0x12da2f[_0x4b5b5a(0x13d)](_0x4b5b5a(0x157))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1ceba6=_0x51bc8a[_0x4b5b5a(0x14b)][_0x4b5b5a(0x132)](_0x4b5b5a(0x10c));_0x1ceba6&&this[_0x4b5b5a(0x13e)](_0x1ceba6,_0x4b5b5a(0x121),(_0x5c370b,[_0x3be8b1,_0x10f626])=>{const _0x3b2fec=_0x4b5b5a;_0x3be8b1[_0x3b2fec(0x129)](_0x3b2fec(0x113),_0x10f626);});}[_0xd364dd(0x151)](){const _0x177d25=_0xd364dd,_0x657ea4=this[_0x177d25(0x122)][_0x177d25(0x147)][_0x177d25(0x132)](_0x177d25(0x159))||{},_0x5f1814=this[_0x177d25(0x122)][_0x177d25(0x147)][_0x177d25(0x132)](_0x177d25(0x123))||'';this[_0x177d25(0x116)]=_0x28de30(_0x45e48d[_0x177d25(0x130)],_0x177d25(0x11c),{..._0x657ea4,'pubkey':_0x5f1814,'ctx-name':_0x177d25(0x10a)+this[_0x177d25(0x13c)],'sourceList':'','imgOnly':_0x177d25(0x138),'removeCopyright':_0x177d25(0x138),'localeName':this[_0x177d25(0x122)][_0x177d25(0x15a)][_0x177d25(0x12a)],'externalSourcesEmbedCss':_0x177d25(0x15b)}),this[_0x177d25(0x116)][_0x177d25(0x144)]=_0x11afee=>{const _0x44e40d=_0x177d25;if(_0x44e40d(0x150)==_0x11afee)return _0x44e40d(0x11a);},_0x45e48d[_0x177d25(0x130)][_0x177d25(0x10d)][_0x177d25(0x11f)](this[_0x177d25(0x116)]);}[_0xd364dd(0x108)](){const _0x2941ee=_0xd364dd;this[_0x2941ee(0x156)]=_0x28de30(_0x45e48d[_0x2941ee(0x130)],_0x2941ee(0x115),{'ctx-name':_0x2941ee(0x10a)+this[_0x2941ee(0x13c)]}),_0x45e48d[_0x2941ee(0x130)][_0x2941ee(0x10d)][_0x2941ee(0x11f)](this[_0x2941ee(0x156)]);}[_0xd364dd(0x12c)](){const _0x469dfa=_0xd364dd,_0x44dc2f=this[_0x469dfa(0x122)][_0x469dfa(0x14b)][_0x469dfa(0x132)](_0x469dfa(0x10e));_0x44dc2f&&this[_0x469dfa(0x13e)](_0x44dc2f,_0x469dfa(0x148),()=>{const _0x1e054e=_0x469dfa,_0x500b3e=this[_0x1e054e(0x122)][_0x1e054e(0x110)][_0x1e054e(0x130)][_0x1e054e(0x11d)][_0x1e054e(0x125)]();_0x500b3e&&_0x500b3e[_0x1e054e(0x13d)](_0x1e054e(0x113))&&this[_0x1e054e(0x122)][_0x1e054e(0x14f)][_0x1e054e(0x139)][_0x1e054e(0x145)](_0x1e054e(0x120),()=>{const _0x299c18=_0x1e054e;_0x3f4cfa(this[_0x299c18(0x122)],_0x500b3e);});});const _0x4394a9=this[_0x469dfa(0x122)][_0x469dfa(0x14b)][_0x469dfa(0x132)](_0x469dfa(0x133));_0x4394a9&&this[_0x469dfa(0x13e)](_0x4394a9,_0x469dfa(0x148),()=>{const _0x58630e=_0x469dfa,_0x4cf7cb=this[_0x58630e(0x122)][_0x58630e(0x110)][_0x58630e(0x130)][_0x58630e(0x11d)][_0x58630e(0x125)]();_0x4cf7cb&&_0x4cf7cb[_0x58630e(0x13d)](_0x58630e(0x113))&&this[_0x58630e(0x122)][_0x58630e(0x14f)][_0x58630e(0x139)][_0x58630e(0x145)](_0x58630e(0x120),()=>{const _0x109064=_0x58630e;_0x3f4cfa(this[_0x109064(0x122)],_0x4cf7cb);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x148d68,ObservableMixin as _0x191722}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x2f1ea3}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x48ef82}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x18362c}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x2c27e0}from'../../utils/uploadutils.js';import{getImageUrls as _0xb33318,getImageDimension as _0x3d1480}from'../../utils/editingutils.js';import{isAncestor as _0x28798d}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x191722(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x456adf,_0x5dd3b9,_0x595f90){super(),this['_editor']=_0x456adf,this['_dialog']=_0x5dd3b9,this['_imageElement']=_0x595f90,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 _0x104e1b=this['_imageElement'],_0x3be4d1=_0x104e1b['getAttribute']('uploadcareImageId'),_0x409c23=_0x104e1b['getAttribute']('src');if(_0x3be4d1)await this['_loadImageInfo'](_0x3be4d1,_0x409c23);else{if(this['_imageCache']['has'](_0x409c23)){const _0x111c47=this['_imageCache']['get'](_0x409c23);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x111c47['url'],this['imageDimension']=_0x111c47['dimension'],this['imageId']=_0x111c47['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x59b44e}=this['_editor'],t=_0x59b44e['t'],_0x40fdd2=new _0x18362c(_0x59b44e,this['imageStatus'],this['_attributes']);_0x40fdd2['bind']('status')['to'](this,'imageStatus'),_0x40fdd2['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x40fdd2['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x40fdd2['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x40fdd2,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x48ef82,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x40fdd2,'position':_0x2f1ea3['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x40fdd2['focus']();},'onHide':()=>{_0x40fdd2['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3ba9d7=>!_0x28798d(_0x3ba9d7,_0x40fdd2['element'])}});}['_loadImageInfo'](_0x4d7760,_0x3f6fc2){return _0x2c27e0['getInfo'](_0x4d7760,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x5efa5a=>{const {width:_0x4e37c5,height:_0x385823}=_0x5efa5a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3f6fc2,this['imageDimension']={'width':_0x4e37c5,'height':_0x385823},this['imageId']=_0x4d7760;})['catch'](_0x1e174a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1e174a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x22e89b,_0x215ee6){return this['_getImageAsFile'](_0x22e89b)['then'](_0x3b662c=>_0x2c27e0['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x215ee6['signal'],'file':_0x3b662c,'onProgress':_0x2a2d76=>{_0x2a2d76&&_0x2a2d76['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2a2d76['value']));}}))['then'](_0x506193=>{const {width:_0x1de684,height:_0x5cb79e}=_0x506193['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x506193['cdnUrl'],this['imageDimension']={'width':_0x1de684,'height':_0x5cb79e},this['imageId']=_0x506193['uuid'],this['imageUploadProgress']=null;const _0x24edbc=_0x22e89b['getAttribute']('src');this['_imageCache']['set'](_0x24edbc,{'id':_0x506193['uuid'],'url':_0x506193['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x9777ee=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x9777ee['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1d9ab4,_0x5ef6ef){_0x1d9ab4['on']('apply',(_0x39700b,_0x53c560)=>{this['_replaceImage'](_0x5ef6ef,_0x53c560['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1d9ab4['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1d9ab4['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x523716,_0x4fb4db,_0x117d2e){const _0x29c85f=this['_editor'],{width:_0x1e9831,height:_0x581932}=_0x3d1480(_0x4fb4db,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x5ab260,imageSources:_0x28c2ac}=_0xb33318(_0x4fb4db,_0x1e9831);_0x29c85f['model']['change'](_0x51a9c8=>{if('$graveyard'===_0x523716['root']['rootName']){_0x29c85f['execute']('insertImage',{'imageType':_0x523716['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x523716['getAttributes']()),'uploadcareImageId':_0x117d2e,'src':_0x5ab260,'sources':_0x28c2ac,'width':_0x1e9831,'height':_0x581932}});const _0x5e3aa5=_0x523716['getChildren']();_0x523716=_0x29c85f['model']['document']['selection']['getSelectedElement']();for(const _0x4ebe51 of _0x5e3aa5)_0x51a9c8['append'](_0x51a9c8['cloneElement'](_0x4ebe51),_0x523716);}else _0x51a9c8['setSelection'](_0x523716,'on'),_0x29c85f['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x523716['getAttributes']()),'uploadcareImageId':_0x117d2e,'src':_0x5ab260,'sources':_0x28c2ac,'width':_0x1e9831,'height':_0x581932},_0x523716);_0x51a9c8['setSelection'](_0x523716,'on');});}async['_getImageAsFile'](_0x3f289c){const _0x5f3c88=_0x148d68['window'],_0x39fad7=_0x148d68['document']['location']['href'],_0x3e5e22=new _0x5f3c88['URL'](_0x3f289c['getAttribute']('src'),_0x39fad7);if('data:'===_0x3e5e22['protocol']){const _0x580f8e=_0x3e5e22['href']['split'](','),_0x288764=_0x580f8e[0x0]['match'](/:(.*?);/)[0x1],_0x35abc0=_0x288764['split']('/')[0x1],_0x510050=_0x5f3c88['atob'](_0x580f8e[_0x580f8e['length']-0x1]);let _0x463e4b=_0x510050['length'];const _0x19e119=new _0x5f3c88['Uint8Array'](_0x463e4b);for(;_0x463e4b--;)_0x19e119[_0x463e4b]=_0x510050['charCodeAt'](_0x463e4b);return new _0x5f3c88['File']([_0x19e119],'image.'+_0x35abc0,{'type':_0x288764});}const _0x22332e=_0x3e5e22['href']['split']('/'),_0x14ccf5=_0x22332e[_0x22332e['length']-0x1],_0x514e83=_0x14ccf5['split']('.')[0x1];return _0x5f3c88['fetch'](_0x3e5e22['href'])['then'](_0x4e542d=>_0x4e542d['clone']()['blob']())['then'](_0x441d07=>new _0x5f3c88['File']([_0x441d07],_0x14ccf5,{'type':'image/'+_0x514e83}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x307bde,_0x3d6e07){const _0x298ddb=_0x1b30,_0x1b418f=_0x307bde();while(!![]){try{const _0x5eaae9=-parseInt(_0x298ddb(0xe1))/0x1+parseInt(_0x298ddb(0xd8))/0x2+parseInt(_0x298ddb(0xdb))/0x3*(parseInt(_0x298ddb(0xdc))/0x4)+-parseInt(_0x298ddb(0xd4))/0x5+-parseInt(_0x298ddb(0xdd))/0x6+parseInt(_0x298ddb(0xde))/0x7*(parseInt(_0x298ddb(0xd6))/0x8)+parseInt(_0x298ddb(0xe2))/0x9;if(_0x5eaae9===_0x3d6e07)break;else _0x1b418f['push'](_0x1b418f['shift']());}catch(_0x5ebd8e){_0x1b418f['push'](_0x1b418f['shift']());}}}(_0x365b,0x5c074));import{View as _0x5731cf}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x5731cf{constructor(_0x5106c3,_0x2eaa8d){const _0x15f1c5=_0x1b30;super(_0x5106c3);const _0x4a02f1=this[_0x15f1c5(0xda)];this[_0x15f1c5(0xe3)](_0x15f1c5(0xdf),''),this[_0x15f1c5(0xd5)]({'tag':_0x15f1c5(0xe4),'attributes':{..._0x2eaa8d,'class':[_0x15f1c5(0xd7),_0x15f1c5(0xe0)],'ctx-name':_0x15f1c5(0xd9),'cdn-url':_0x4a02f1['to'](_0x15f1c5(0xdf))}});}}function _0x1b30(_0x45ffda,_0x368bcf){const _0x365b71=_0x365b();return _0x1b30=function(_0x1b30a4,_0x2057a9){_0x1b30a4=_0x1b30a4-0xd4;let _0x59ff26=_0x365b71[_0x1b30a4];return _0x59ff26;},_0x1b30(_0x45ffda,_0x368bcf);}function _0x365b(){const _0x1a2dce=['9212238yuaKgy','set','uc-cloud-image-editor','1507780NntXMP','setTemplate','1307272dhgMjI','uc-light','96206RKtVmP','image-edit','bindTemplate','16341FUlECW','184JHrWuB','1462092CaEBQc','7QKauDM','imageSrc','ck-uploadcare-theme','563470XeCBhh'];_0x365b=function(){return _0x1a2dce;};return _0x365b();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x14d406}from'ckeditor5/src/icons.js';import{ButtonView as _0x17fc8a,IconView as _0x1b5e8c,View as _0x590037}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x590037{constructor(_0x3776b3){super(_0x3776b3);const t=_0x3776b3['t'];this['set']('errorType',null);const _0x33fc6f=new _0x17fc8a(_0x3776b3);_0x33fc6f['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x33fc6f['withText']=!0x0,_0x33fc6f['class']='ck-button-action',_0x33fc6f['on']('execute',()=>{this['fire']('retry');}),_0x33fc6f['bind']('isVisible')['to'](this,'errorType',_0x383360=>'NotFound'!==_0x383360);const _0x367ab7=new _0x1b5e8c();_0x367ab7['content']=_0x14d406,_0x367ab7['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x10a338=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':[_0x367ab7,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x10a338['to']('errorType',_0x418c88=>t('NotFound'!==_0x418c88?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x33fc6f]},{'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'}]}]}]});}}
|