@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251004.0 → 0.0.0-nightly-20251006.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x4e90a5,Command as _0x5f1d1f}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0xefbf34,IconGooglePhotos as _0x5ca237,IconGoogleDrive as _0x4ad234,IconFacebook as _0x26ec44,IconDropbox as _0x13f295,IconUploadcareLink as _0x24a875,IconUploadcareImageUpload as _0x44ac62,IconError as _0x3480a4,IconUploadcareImageEdit as _0x2e3c93}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x566edc,MenuBarMenuListItemButtonView as _0x113034,View as _0x3d5001,FocusCycler as _0x3dff4b,Dialog as _0x1e0111,DialogViewPosition as _0x5a2fae,SpinnerView as _0x5ae89b,IconView as _0x72e258,Notification as _0x56b5e2}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x40aa83,DomEmitterMixin as _0x1b9d30,global as _0x1a5972,getAncestors as _0x1f8380,ObservableMixin as _0x5d37c8,uid as _0x21e5c6,createElement as _0xef2b99}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x49458e}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x20b2c0,info as _0x290f71}from'@uploadcare/upload-client';import*as _0x2fc93b from'@uploadcare/file-uploader';var i=function(_0x4d9ba4){return _0x4d9ba4['Local']='local',_0x4d9ba4['URL']='url',_0x4d9ba4['Dropbox']='dropbox',_0x4d9ba4['GDrive']='gdrive',_0x4d9ba4['Facebook']='facebook',_0x4d9ba4['GPhotos']='gphotos',_0x4d9ba4['OneDrive']='onedrive',_0x4d9ba4;}({});function _(_0x3d0b6b,_0x2f5317,_0x5926da){const t=_0x3d0b6b['t'],_0x5a1d64=_0x3d0b6b['t'];switch(_0x2f5317){case i['Local']:return{'text':_0x5a1d64('Insert'===_0x5926da?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x5a1d64('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x5926da?_0x5a1d64('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x5a1d64('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x5926da?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x5926da?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x5926da?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x5926da?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x5926da?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x2f5317;}}class e extends _0x4e90a5{['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 _0x4dd69d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2b33a9;for(const _0x362e52 in _0x4dd69d){const _0x36bef8=_0x362e52,_0xe54880=_0x4dd69d[_0x36bef8];if('uploadcareLicenseKeyValid'==_0xe54880||'uploadcareLicenseKeyInvalid'==_0xe54880||'uploadcareLicenseKeyExpired'==_0xe54880||'uploadcareLicenseKeyDomainLimit'==_0xe54880||'uploadcareLicenseKeyNotAllowed'==_0xe54880||'uploadcareLicenseKeyEvaluationLimit'==_0xe54880||'uploadcareLicenseKeyTrialLimit'==_0xe54880||'uploadcareLicenseKeyUsageLimit'==_0xe54880){delete _0x4dd69d[_0x36bef8],_0x2b33a9=_0xe54880,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x2b33a9&&_0x4dd69d['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x2b33a9&&_0x4dd69d['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x2b33a9&&_0x4dd69d['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x2b33a9&&_0x4dd69d['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x2b33a9&&_0x4dd69d['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x2b33a9&&_0x4dd69d['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x2b33a9&&_0x4dd69d['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x96666c}=this,_0x21c20a=_0x96666c['commands']['get']('uploadcare');if(!_0x21c20a)return;const _0x4fb71b=this['_normalizeConfigSourceList'](_0x96666c['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x25be8c,_0x185144)=>{const _0x36b135=this['_getIntegrationKey'](_0x185144['type']);return _0x25be8c[_0x36b135]||(_0x25be8c[_0x36b135]=[]),_0x25be8c[_0x36b135]['push'](_0x185144),_0x25be8c;},{});_0x96666c['plugins']['has']('ImageInsertUI')&&_0x96666c['commands']['get']('uploadcare')&&Object['entries'](_0x4fb71b)['forEach'](([_0x2050f7,_0x3d7749])=>{_0x96666c['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x2050f7,'observable':()=>_0x21c20a,'buttonViewCreator':()=>this['_createToolbarButton'](_0x3d7749),'formViewCreator':()=>this['_createDropdownButtons'](_0x3d7749),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x3d7749),'override':'assetManager'!==_0x2050f7});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x131933){const {locale:_0x57d460}=this['editor'];return _0x131933['map'](_0x198a07=>{const _0x4c75ef=_(_0x57d460,_0x198a07,'Insert');switch(_0x198a07){case i['Local']:return{'icon':_0x44ac62,'type':i['Local'],..._0x4c75ef};case i['URL']:return{'icon':_0x24a875,'type':i['URL'],..._0x4c75ef};case i['Dropbox']:return{'icon':_0x13f295,'type':i['Dropbox'],..._0x4c75ef};case i['Facebook']:return{'icon':_0x26ec44,'type':i['Facebook'],..._0x4c75ef};case i['GDrive']:return{'icon':_0x4ad234,'type':i['GDrive'],..._0x4c75ef};case i['GPhotos']:return{'icon':_0x5ca237,'type':i['GPhotos'],..._0x4c75ef};case i['OneDrive']:return{'icon':_0xefbf34,'type':i['OneDrive'],..._0x4c75ef};}});}['_getIntegrationKey'](_0x1dabcf){switch(_0x1dabcf){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x4e4c3e,_0x18b7ef){const _0x1be268=this['editor'],_0x443bb7=new _0x4e4c3e(_0x1be268['locale']),_0x4dfd1c=_0x1be268['commands']['get']('uploadcare');return _0x443bb7['bind']('isEnabled')['to'](_0x4dfd1c),_0x443bb7['on']('execute',()=>{_0x4dfd1c['execute'](_0x18b7ef);}),_0x443bb7;}['_createToolbarButton'](_0x27d310){const {locale:_0x18ecaf}=this['editor'],_0x4908f3=this['editor']['plugins']['get']('ImageInsertUI'),_0x23b268=_0x27d310[0x0],_0x11be6e=this['_createButton'](_0x566edc,_0x23b268['type']);return _0x11be6e['icon']=_0x23b268['icon'],_0x11be6e['bind']('label')['to'](_0x4908f3,'isImageSelected',_0x2d6746=>_(_0x18ecaf,_0x23b268['type'],_0x2d6746?'Replace':'Insert')['text']),_0x11be6e['tooltip']=!0x0,_0x11be6e;}['_createDropdownButtons'](_0x54dd29){const {locale:_0xc3374e}=this['editor'],_0xa96b90=this['editor']['plugins']['get']('ImageInsertUI');return _0x54dd29['map'](_0x4363c6=>{const _0xa78a8d=this['_createButton'](_0x566edc,_0x4363c6['type']);return _0xa78a8d['withText']=!0x0,_0xa78a8d['icon']=_0x4363c6['icon'],_0xa78a8d['bind']('label')['to'](_0xa96b90,'isImageSelected',_0x1620f8=>_(_0xc3374e,_0x4363c6['type'],_0x1620f8?'Replace':'Insert')['text']),_0xa78a8d;});}['_createMenuBarButtons'](_0x41133b){return _0x41133b['map'](_0x5c94e9=>{const _0x561bd8=this['_createButton'](_0x113034,_0x5c94e9['type']);return _0x561bd8['icon']=_0x5c94e9['icon'],_0x561bd8['label']=_0x5c94e9['shortText'],_0x561bd8;});}}class F extends _0x3d5001{['focusTracker'];['focusCycler'];constructor(_0x1e8f7f){super(_0x1e8f7f),this['focusTracker']=new _0x40aa83(),this['focusCycler']=new _0x3dff4b({'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(_0x5ccbfd,_0x50d225){super(_0x5ccbfd),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-'+_0x50d225}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x4b8489,_0x47f212){const _0x173bb4=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x35fb92=>_0x35fb92<=_0x47f212)['map'](_0x240ada=>_0x4b8489['replace'](/\/$/,'')+'/-/resize/'+_0x240ada+'x/\x20'+_0x240ada+'w');return{'imageFallbackUrl':_0x4b8489,'imageSources':[{'srcset':_0x173bb4['join'](',\x20'),'sizes':'(max-width:\x20'+_0x47f212+'px)\x20100vw,\x20'+_0x47f212+'px','type':'image/webp'}]};}function S(_0x3837ea,_0x2ce254,_0xddc663){const _0x5e4296=_0x3837ea['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5e4296?parseInt(_0x5e4296[0x1],0xa):_0x2ce254,'height':_0x5e4296?parseInt(_0x5e4296[0x2],0xa):_0xddc663};}function p(_0x582cd0,_0x193df7){const _0xd9c8da=new(_0x1b9d30())(),_0x2abad1=_0x582cd0['plugins']['get']('ImageUtils'),_0x454b43=_0x582cd0['editing']['mapper']['toViewElement'](_0x193df7),_0x3a6ac5=_0x2abad1['findViewImgElement'](_0x454b43),_0x4686b6=_0x582cd0['editing']['view']['domConverter']['viewToDom'](_0x3a6ac5),_0x23ce9c=_0x193df7['getAttribute']('width'),_0x260f8d=_0x193df7['getAttribute']('height'),_0x1a81cb='image-processing';_0x582cd0['editing']['view']['change'](_0xcaa40e=>{_0xcaa40e['addClass'](_0x1a81cb,_0x454b43),_0xcaa40e['setStyle']('aspect-ratio',_0x23ce9c+'/'+_0x260f8d,_0x3a6ac5);}),_0xd9c8da['listenTo'](_0x4686b6,'load',()=>{_0xd9c8da['stopListening'](_0x4686b6,'load'),_0x582cd0['editing']['view']['change'](_0x3fc5c4=>{_0x3fc5c4['removeClass'](_0x1a81cb,_0x454b43),_0x3fc5c4['removeStyle']('aspect-ratio',_0x3a6ac5);});});}function G(_0x353035){if(Array['isArray'](_0x353035)){const _0x2f3a44=_0x353035['map'](G);return _0x4e180a=>_0x2f3a44['some'](_0x50a79f=>_0x50a79f(_0x4e180a));}if('origin'==_0x353035){const _0x5e4354=_0x1a5972['window']['location']['origin'];return _0xf6ea32=>new URL(_0xf6ea32,_0x1a5972['document']['baseURI'])['origin']==_0x5e4354;}return'function'==typeof _0x353035?_0x353035:_0x353035 instanceof RegExp?_0x4f1547=>!(!_0x4f1547['match'](_0x353035)&&!_0x4f1547['replace'](/^https?:\/\//,'')['match'](_0x353035)):()=>!0x1;}function A(_0x1d8020,_0x5f41fc){return _0x1f8380(_0x1d8020['target'])['includes'](_0x5f41fc);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x5d37c8(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x2c8af6,_0x224ffb,_0x3f0cc3){super(),this['_editor']=_0x2c8af6,this['_editing']=_0x224ffb,this['_dialog']=_0x2c8af6['plugins']['get'](_0x1e0111),this['_api']=_0x224ffb['ctxElement']['getAPI'](),this['_type']=_0x3f0cc3,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:_0x4558bd,model:_0xbbb3f7}=this['_editor'],_0x1d43e6=_0xbbb3f7['document']['selection']['getSelectedElement'](),_0x28034f=_0x1d43e6&&(_0x1d43e6['is']('element','imageBlock')||_0x1d43e6['is']('element','imageInline'));this['_formView']=new x(_0x4558bd,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x44ac62,'title':_(_0x4558bd,this['_type'],_0x28034f?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5a2fae['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3b0225=>!A(_0x3b0225,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x597834}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2d34a4=>{const _0x4ca8c0=_0x597834['length'];for(const _0x3fb01b of _0x597834){const _0xaf7f70=_0x3fb01b===_0x597834[_0x4ca8c0-0x1],{cdnUrl:_0x1710a4,fileInfo:_0xfa90f1}=_0x3fb01b;if(!_0x1710a4||!_0xfa90f1)continue;const {width:_0x2cfa69,height:_0x59c61a}=_0xfa90f1['imageInfo'],_0x50bfe8=S(_0x1710a4,_0x2cfa69,_0x59c61a),_0x4ed66d=C(_0x1710a4,_0x50bfe8['width']),_0x2f8179={'id':_0xfa90f1['uuid'],'type':'image','attributes':{'imageDimension':_0x50bfe8,..._0x4ed66d}};this['_insertAsset'](_0x2f8179,_0xaf7f70,_0x2d34a4);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1267e7=>{'idle'===_0x1267e7['detail']['status']&&!_0x1267e7['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x3b1776,_0xb5fbba,_0x231b0a){const _0x58c9a2=this['_editor']['model']['document']['selection'],_0x1beef2=_0x58c9a2['getSelectedElement'](),_0x59e22e=!(!_0x1beef2||!_0x1beef2['is']('element','imageInline'));_0x231b0a['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x3b1776,_0x59e22e),_0xb5fbba||_0x231b0a['setSelection'](_0x58c9a2['getLastPosition']());}['_insertImage'](_0x1d2dcb,_0x19aed4){const _0x4a1f44=this['_editor'],{imageDimension:_0x2cc1c8,imageFallbackUrl:_0xbc969d,imageSources:_0x54e983}=_0x1d2dcb['attributes'];_0x4a1f44['execute']('insertImage',{'imageType':_0x19aed4?'imageInline':null,'source':{'uploadcareImageId':_0x1d2dcb['id'],'src':_0xbc969d,'sources':_0x54e983,..._0x2cc1c8}});}}class w extends _0x5f1d1f{['_editing'];['_controller']=null;static get['requires'](){return[_0x1e0111,o];}constructor(_0x1fcb54){super(_0x1fcb54),this['_editing']=_0x1fcb54['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x590244){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x590244);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x388d2c,..._0x23cf86}){return _0x20b2c0(_0x388d2c,_0x23cf86);}static['getInfo'](_0x27c599,_0x261227){return _0x290f71(_0x27c599,_0x261227);}}class f extends _0x4e90a5{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x49458e,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x3bedca=this['editor'];if(!!!_0x3bedca['config']['get']('uploadcare'))return;_0x3bedca['plugins']['get'](_0x49458e)['createUploadAdapter']=_0x565726=>new k(_0x565726,_0x3bedca),_0x3bedca['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x14b272,{imageElement:_0x3e01c1,data:_0x5e4700})=>{_0x3bedca['model']['change'](_0x723e22=>{_0x723e22['setAttribute']('uploadcareImageId',_0x5e4700['uploadcareImageId'],_0x3e01c1);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x28d1ac,_0x11bff9){this['loader']=_0x28d1ac,this['editor']=_0x11bff9,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x59dba5=await this['loader']['file'];return j['upload']({'file':_0x59dba5,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x28d03b=>{_0x28d03b&&_0x28d03b['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x28d03b['value']);}})['then'](async _0x49a3af=>{const {imageFallbackUrl:_0x2a0d74,imageSources:_0x40ea65}=C(_0x49a3af['cdnUrl'],_0x49a3af['imageInfo']['width']);return{'uploadcareImageId':_0x49a3af['uuid'],'default':_0x2a0d74,'sources':_0x40ea65};})['catch'](()=>{const _0x3ddcbc=t('Cannot\x20upload\x20file:')+('\x20'+_0x59dba5['name']+'.');return Promise['reject'](_0x3ddcbc);});}['abort'](){this['controller']['abort']();}}class o extends _0x4e90a5{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x1e0111];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0xa89ff9){super(_0xa89ff9),this['ucContextId']=_0x21e5c6();}['init'](){const _0x456b9a=this['editor'];_0x456b9a['commands']['add']('uploadcare',new w(_0x456b9a));}['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 _0x414a6b=_0x1a5972['document']['querySelector']('input[uploadcare-file-input]');_0x414a6b&&_0x414a6b['remove']();}),async function(_0x20f052){const _0x462146=_0x2cdbc6([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x1ca9e2=0x3d8d0df,_0x58484b=0x3dfa5e7^_0x1ca9e2,_0xe3da73=window[_0x2cdbc6([0x44,0x61,0x74,0x65])][_0x2cdbc6([0x6e,0x6f,0x77])](),_0x3367b3=_0x20f052[_0x2cdbc6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x59c1f2=new window[(_0x2cdbc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x37d521=>{_0x3367b3[_0x2cdbc6([0x6f,0x6e,0x63,0x65])](_0x2cdbc6([0x72,0x65,0x61,0x64,0x79]),_0x37d521);}),_0x47addd={[_0x2cdbc6([0x6b,0x74,0x79])]:_0x2cdbc6([0x45,0x43]),[_0x2cdbc6([0x75,0x73,0x65])]:_0x2cdbc6([0x73,0x69,0x67]),[_0x2cdbc6([0x63,0x72,0x76])]:_0x2cdbc6([0x50,0x2d,0x32,0x35,0x36]),[_0x2cdbc6([0x78])]:_0x2cdbc6([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]),[_0x2cdbc6([0x79])]:_0x2cdbc6([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]),[_0x2cdbc6([0x61,0x6c,0x67])]:_0x2cdbc6([0x45,0x53,0x32,0x35,0x36])},_0x59e972=_0x3367b3[_0x2cdbc6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2cdbc6([0x67,0x65,0x74])](_0x2cdbc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5e5e1c(){let _0x19d645,_0x463a89=null,_0x1950b4=null;try{if(_0x59e972==_0x2cdbc6([0x47,0x50,0x4c]))return _0x2cdbc6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x19d645=_0x27e5c4(),!_0x19d645)return _0x2cdbc6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x19d645[_0x2cdbc6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1950b4=_0x2ab04a(_0x19d645[_0x2cdbc6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x19d645[_0x2cdbc6([0x6a,0x74,0x69])])),await _0x38f2ef()?_0x512642()?_0x85e9bd()?_0x2cdbc6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3acad9()?(_0x19d645[_0x2cdbc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2cdbc6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x463a89=_0xb1f36f(_0x2cdbc6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x19d645[_0x2cdbc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2cdbc6([0x74,0x72,0x69,0x61,0x6c])&&(_0x463a89=_0xb1f36f(_0x2cdbc6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x575828()):_0x2cdbc6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2cdbc6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2cdbc6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2cdbc6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x85e9bd(){const _0xc0d0ab=[_0x2cdbc6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2cdbc6([0x74,0x72,0x69,0x61,0x6c])][_0x2cdbc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x19d645[_0x2cdbc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe3da73/0x3e8:0xe10*_0x58484b;return _0x19d645[_0x2cdbc6([0x65,0x78,0x70])]<_0xc0d0ab;}function _0x512642(){const _0x2109f3=_0x19d645[_0x2cdbc6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2109f3&&(!!_0x2109f3[_0x2cdbc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cdbc6([0x2a]))||!!_0x2109f3[_0x2cdbc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cdbc6([0x55,0x50,0x4c,0x43])));}function _0x3acad9(){const _0x67962b=_0x19d645[_0x2cdbc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x67962b||0x0==_0x67962b[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1756ee}=new URL(window[_0x2cdbc6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x67962b[_0x2cdbc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1756ee))return!0x0;const _0xd66a3=_0x1756ee[_0x2cdbc6([0x73,0x70,0x6c,0x69,0x74])](_0x2cdbc6([0x2e]));return _0x67962b[_0x2cdbc6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x41cdee=>_0x41cdee[_0x2cdbc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cdbc6([0x2a])))[_0x2cdbc6([0x6d,0x61,0x70])](_0x119500=>_0x119500[_0x2cdbc6([0x73,0x70,0x6c,0x69,0x74])](_0x2cdbc6([0x2e])))[_0x2cdbc6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1c5844=>_0x1c5844[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xd66a3[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2cdbc6([0x6d,0x61,0x70])](_0xc3b9f1=>Array(_0xd66a3[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xc3b9f1[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2cdbc6([0x66,0x69,0x6c,0x6c])](_0xc3b9f1[0x0]===_0x2cdbc6([0x2a])?_0x2cdbc6([0x2a]):'')[_0x2cdbc6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xc3b9f1))[_0x2cdbc6([0x73,0x6f,0x6d,0x65])](_0x7e9c87=>_0xd66a3[_0x2cdbc6([0x65,0x76,0x65,0x72,0x79])]((_0x4d84a8,_0x1b4648)=>_0x7e9c87[_0x1b4648]===_0x4d84a8||_0x7e9c87[_0x1b4648]===_0x2cdbc6([0x2a])));}function _0x575828(){return _0x463a89&&_0x1950b4?new window[(_0x2cdbc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x54fb43,_0x2b7265)=>{_0x463a89[_0x2cdbc6([0x74,0x68,0x65,0x6e])](_0x54fb43,_0x2b7265),_0x1950b4[_0x2cdbc6([0x74,0x68,0x65,0x6e])](_0x53f922=>{_0x53f922!=_0x2cdbc6([0x56,0x61,0x6c,0x69,0x64])&&_0x54fb43(_0x53f922);},_0x2b7265);}):_0x463a89||_0x1950b4||_0x2cdbc6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2ab04a(_0x33d974,_0xd9561){return new window[(_0x2cdbc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x557344=>{if(_0x55d1f3())return _0x557344(_0x2cdbc6([0x56,0x61,0x6c,0x69,0x64]));_0xc55e4e(),_0x3367b3[_0x2cdbc6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2cdbc6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x54de2d=!0x1;const _0x510ea1=_0x21e5c6();function _0x58b3b8(_0x34f82f){return!!_0x34f82f&&(typeof _0x34f82f===_0x2cdbc6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x34f82f===_0x2cdbc6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x34f82f[_0x2cdbc6([0x74,0x68,0x65,0x6e])]===_0x2cdbc6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x34f82f[_0x2cdbc6([0x63,0x61,0x74,0x63,0x68])]===_0x2cdbc6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xd2bd57(_0x105579){_0x36d412(_0x105579)[_0x2cdbc6([0x74,0x68,0x65,0x6e])](_0x36916e=>{if(!_0x36916e||_0x36916e[_0x2cdbc6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2cdbc6([0x6f,0x6b]))return _0x2cdbc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x898364(_0x2e82dc(_0x510ea1+_0xd9561))!=_0x36916e[_0x2cdbc6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2cdbc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2cdbc6([0x56,0x61,0x6c,0x69,0x64]);})[_0x2cdbc6([0x74,0x68,0x65,0x6e])](_0x54fa79=>(_0x1e4fc4(),_0x54fa79),()=>{const _0x47b8bd=_0x4c3c94();return null==_0x47b8bd?(_0x1e4fc4(),_0x2cdbc6([0x56,0x61,0x6c,0x69,0x64])):_0x2cdbc6(_0xe3da73-_0x47b8bd>(0x27d454df^_0x1ca9e2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2cdbc6([0x74,0x68,0x65,0x6e])](_0x557344)[_0x2cdbc6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x557344(_0x2cdbc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1fddef=0x3ee3e5f^_0x1ca9e2;function _0x1e4fc4(){const _0xaa2244=_0x2cdbc6([0x6c,0x6c,0x63,0x74,0x2d])+_0x898364(_0x2e82dc(_0x33d974)),_0x4e4c2b=_0x443399(_0x898364(window[_0x2cdbc6([0x4d,0x61,0x74,0x68])][_0x2cdbc6([0x63,0x65,0x69,0x6c])](_0xe3da73/_0x1fddef)));window[_0x2cdbc6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2cdbc6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xaa2244,_0x4e4c2b);}function _0x4c3c94(){const _0x286565=_0x2cdbc6([0x6c,0x6c,0x63,0x74,0x2d])+_0x898364(_0x2e82dc(_0x33d974)),_0xee2c26=window[_0x2cdbc6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2cdbc6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x286565);return _0xee2c26?window[_0x2cdbc6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x443399(_0xee2c26),0x10)*_0x1fddef:null;}function _0x36d412(_0x455595){return new window[(_0x2cdbc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2cdd74,_0x41c127)=>{_0x455595[_0x2cdbc6([0x74,0x68,0x65,0x6e])](_0x2cdd74,_0x41c127),window[_0x2cdbc6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x41c127,0x3d9041f^_0x1ca9e2);});}}_0x3367b3[_0x2cdbc6([0x6f,0x6e])](_0x2cdbc6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xb271cf,_0x1f5d87)=>{if(_0x1f5d87[0x0]!=_0x33d974)return _0x557344(_0x2cdbc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1f5d87[0x1]={..._0x1f5d87[0x1],[_0x2cdbc6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x510ea1};},{[_0x2cdbc6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2cdbc6([0x68,0x69,0x67,0x68])}),_0x3367b3[_0x2cdbc6([0x6f,0x6e])](_0x2cdbc6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x13a24e=>{_0x58b3b8(_0x13a24e[_0x2cdbc6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x54de2d=!0x0,_0xd2bd57(_0x13a24e[_0x2cdbc6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2cdbc6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2cdbc6([0x6c,0x6f,0x77])}),_0x59c1f2[_0x2cdbc6([0x74,0x68,0x65,0x6e])](()=>{_0x54de2d||_0x557344(_0x2cdbc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x55d1f3(){return _0x3367b3[_0x2cdbc6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2cdbc6([0x76,0x69,0x65,0x77])][_0x2cdbc6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2cdbc6([0x61,0x75,0x74,0x6f]);}function _0xc55e4e(){_0x3367b3[_0x2cdbc6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2cdbc6([0x76,0x69,0x65,0x77])][_0x2cdbc6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2cdbc6([0x61,0x75,0x74,0x6f]);}}function _0xb1f36f(_0x5c46bf){const _0x698305=[new window[(_0x2cdbc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47c401=>setTimeout(_0x47c401,0x3d1ee13^_0x1ca9e2)),_0x59c1f2[_0x2cdbc6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2cdbc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x522295=>{let _0x55dc16=0x0;_0x3367b3[_0x2cdbc6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2cdbc6([0x6f,0x6e])](_0x2cdbc6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4e8d3f,_0x1b3983)=>{_0x1b3983[0x0][_0x2cdbc6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x55dc16++,_0x55dc16==(0x3d8d127^_0x1ca9e2)&&(_0x522295(),_0x4e8d3f[_0x2cdbc6([0x6f,0x66,0x66])]());});}))];return window[_0x2cdbc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2cdbc6([0x72,0x61,0x63,0x65])](_0x698305)[_0x2cdbc6([0x74,0x68,0x65,0x6e])](()=>_0x5c46bf);}async function _0x42e3b1(){await _0x59c1f2,_0x3367b3[_0x2cdbc6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2cdbc6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x15c4e4,_0x3367b3[_0x2cdbc6([0x6d,0x6f,0x64,0x65,0x6c])][_0x2cdbc6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x15c4e4,_0x3367b3[_0x2cdbc6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2cdbc6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1c7299(_0x2df966){const _0x595211=_0x1706e8();_0x3367b3[_0x595211]=_0x2cdbc6([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2df966,_0x2df966!=_0x2cdbc6([0x56,0x61,0x6c,0x69,0x64])&&_0x42e3b1();}function _0x1706e8(){const _0x173ba9=window[_0x2cdbc6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2cdbc6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2cdbc6([0x6e,0x6f,0x77])]())[_0x2cdbc6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2cdbc6([0x2e]),'');let _0x4fa80c=_0x2cdbc6([0x52]);for(let _0x72ef02=0x0;_0x72ef02<_0x173ba9[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x72ef02+=0x2){let _0x2df548=window[_0x2cdbc6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x173ba9[_0x2cdbc6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x72ef02,_0x72ef02+0x2));_0x2df548>=_0x462146[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2df548-=_0x462146[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4fa80c+=_0x462146[_0x2df548];}return _0x4fa80c;}function _0x27e5c4(){const _0xb82e62=_0x59e972[_0x2cdbc6([0x73,0x70,0x6c,0x69,0x74])](_0x2cdbc6([0x2e]));if(0x3!=_0xb82e62[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1ea30a(_0xb82e62[0x1]);function _0x1ea30a(_0x28f80d){const _0x88348a=_0x45cf9f(_0x28f80d);return _0x88348a&&_0x26b8b7()?_0x88348a:null;function _0x26b8b7(){const _0x193862=_0x88348a[_0x2cdbc6([0x6a,0x74,0x69])],_0x2147ed=window[_0x2cdbc6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x193862[_0x2cdbc6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x193862[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xd7b65f={..._0x88348a,[_0x2cdbc6([0x6a,0x74,0x69])]:_0x193862[_0x2cdbc6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x193862[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xd7b65f[_0x2cdbc6([0x76,0x63])],_0x2e82dc(_0xd7b65f)==_0x2147ed;}}}async function _0x38f2ef(){let _0x4d8e00=!0x0;try{const _0x38cc6e=_0x59e972[_0x2cdbc6([0x73,0x70,0x6c,0x69,0x74])](_0x2cdbc6([0x2e])),[_0x3333ba,_0x361232,_0x20926a]=_0x38cc6e;return _0x4fbdae(_0x3333ba),await _0x44cdc1(_0x3333ba,_0x361232,_0x20926a),_0x4d8e00;}catch{return!0x1;}function _0x4fbdae(_0x1af6c1){const _0x4ad5ae=_0x45cf9f(_0x1af6c1);_0x4ad5ae&&_0x4ad5ae[_0x2cdbc6([0x61,0x6c,0x67])]==_0x2cdbc6([0x45,0x53,0x32,0x35,0x36])||(_0x4d8e00=!0x1);}async function _0x44cdc1(_0xaddb3b,_0x5ac705,_0x1f5be1){const _0x3607f6=window[_0x2cdbc6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2cdbc6([0x66,0x72,0x6f,0x6d])](_0x53559e(_0x1f5be1),_0x1ad5d0=>_0x1ad5d0[_0x2cdbc6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x30deca=new window[(_0x2cdbc6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2cdbc6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xaddb3b+_0x2cdbc6([0x2e])+_0x5ac705),_0x142e15=window[_0x2cdbc6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2cdbc6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x142e15)return;const _0x3c13e3=await _0x142e15[_0x2cdbc6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2cdbc6([0x6a,0x77,0x6b]),_0x47addd,{[_0x2cdbc6([0x6e,0x61,0x6d,0x65])]:_0x2cdbc6([0x45,0x43,0x44,0x53,0x41]),[_0x2cdbc6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2cdbc6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2cdbc6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x142e15[_0x2cdbc6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2cdbc6([0x6e,0x61,0x6d,0x65])]:_0x2cdbc6([0x45,0x43,0x44,0x53,0x41]),[_0x2cdbc6([0x68,0x61,0x73,0x68])]:{[_0x2cdbc6([0x6e,0x61,0x6d,0x65])]:_0x2cdbc6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3c13e3,_0x3607f6,_0x30deca)||(_0x4d8e00=!0x1);}}function _0x45cf9f(_0x349d80){return _0x349d80[_0x2cdbc6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2cdbc6([0x65,0x79]))?JSON[_0x2cdbc6([0x70,0x61,0x72,0x73,0x65])](_0x53559e(_0x349d80)):null;}function _0x53559e(_0x56914d){return window[_0x2cdbc6([0x61,0x74,0x6f,0x62])](_0x56914d[_0x2cdbc6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2cdbc6([0x2b]))[_0x2cdbc6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2cdbc6([0x2f])));}function _0x2e82dc(_0x48b922){let _0x2a6164=0x1505;function _0x1d5e83(_0x131181){for(let _0x3142f9=0x0;_0x3142f9<_0x131181[_0x2cdbc6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3142f9++){const _0x434570=_0x131181[_0x2cdbc6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3142f9);_0x2a6164=(_0x2a6164<<0x5)+_0x2a6164+_0x434570,_0x2a6164&=_0x2a6164;}}function _0xdb76ae(_0x4f6332){Array[_0x2cdbc6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f6332)?_0x4f6332[_0x2cdbc6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xdb76ae):_0x4f6332&&typeof _0x4f6332==_0x2cdbc6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2cdbc6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f6332)[_0x2cdbc6([0x73,0x6f,0x72,0x74])]()[_0x2cdbc6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x417852,_0xa1a708])=>{_0x1d5e83(_0x417852),_0xdb76ae(_0xa1a708);}):_0x1d5e83(window[_0x2cdbc6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f6332));}return _0xdb76ae(_0x48b922),_0x2a6164>>>0x0;}function _0x898364(_0x4a798d){return _0x4a798d[_0x2cdbc6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2cdbc6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2cdbc6([0x30]));}function _0x443399(_0x27fa0c){return _0x27fa0c[_0x2cdbc6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2cdbc6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2cdbc6([0x6a,0x6f,0x69,0x6e])]('');}function _0x15c4e4(){}function _0x2cdbc6(_0x35a2ae){return _0x35a2ae['map'](_0x1562ee=>String['fromCharCode'](_0x1562ee))['join']('');}_0x1c7299(await _0x5e5e1c());}(this);}['_initSchema'](){const _0x41934d=this['editor']['model']['schema'];_0x41934d['isRegistered']('imageBlock')&&_0x41934d['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x41934d['isRegistered']('imageInline')&&_0x41934d['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5b32eb=this['editor'];_0x5b32eb['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5b32eb['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x1c319c=>_0x1c319c['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1db1ad=_0x5b32eb['commands']['get']('replaceImageSource');_0x1db1ad&&this['listenTo'](_0x1db1ad,'cleanupImage',(_0x351b40,[_0x98ccbe,_0x505c4b])=>{_0x98ccbe['removeAttribute']('uploadcareImageId',_0x505c4b);});}['_initConfig'](){const _0x316bfe=this['editor']['config']['get']('uploadcare.uploader')||{},_0x4d41f4=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0xef2b99(_0x1a5972['document'],'uc-config',{..._0x316bfe,'pubkey':_0x4d41f4,'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']=_0x55bd48=>{if('closeMax'==_0x55bd48)return'#uc-icon-arrow-down';},_0x1a5972['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0xef2b99(_0x1a5972['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x1a5972['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x5987f4=this['editor']['commands']['get']('insertImage');_0x5987f4&&this['listenTo'](_0x5987f4,'execute',()=>{const _0x54b742=this['editor']['model']['document']['selection']['getSelectedElement']();_0x54b742&&_0x54b742['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x54b742);});});const _0x2900ce=this['editor']['commands']['get']('uploadcareImageReplace');_0x2900ce&&this['listenTo'](_0x2900ce,'execute',()=>{const _0xdfeae1=this['editor']['model']['document']['selection']['getSelectedElement']();_0xdfeae1&&_0xdfeae1['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0xdfeae1);});});}}class tt extends _0x4e90a5{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f84db){super(_0x1f84db),_0x1f84db['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x2fc93b['defineComponents'](_0x2fc93b);}}class ii extends _0x3d5001{constructor(_0x80e0a8){super(_0x80e0a8);const t=_0x80e0a8['t'],_0x3715da=this['bindTemplate'],_0x44e4ae=new _0x5ae89b();_0x44e4ae['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':[_0x44e4ae,{'text':_0x3715da['to']('imageUploadProgress',_0x595758=>t('Loading\x20image...')+'\x20('+(_0x595758||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 _0x3d5001{constructor(_0x5df11e){super(_0x5df11e);const t=_0x5df11e['t'];this['set']('errorType',null);const _0x9c216b=new _0x566edc(_0x5df11e);_0x9c216b['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x9c216b['withText']=!0x0,_0x9c216b['class']='ck-button-action',_0x9c216b['on']('execute',()=>{this['fire']('retry');}),_0x9c216b['bind']('isVisible')['to'](this,'errorType',_0x1f303=>'NotFound'!==_0x1f303);const _0x1cd938=new _0x72e258();_0x1cd938['content']=_0x3480a4,_0x1cd938['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x41bbc9=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':[_0x1cd938,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x41bbc9['to']('errorType',_0x5624f9=>t('NotFound'!==_0x5624f9?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x9c216b]},{'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 _0x3d5001{constructor(_0x5dd1b6,_0x40ebd3){super(_0x5dd1b6);const _0x14ebb6=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x40ebd3,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x14ebb6['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x1add45,_0x2364d5,_0x449f7d){super(_0x1add45),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x1add45),this['_errorView']=new ti(_0x1add45),this['_editingView']=new ei(_0x1add45,_0x449f7d),this['_focusableView']=new _0x3d5001(_0x1add45),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x2364d5),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'],_0x9866cd=>{this['_addUploadcareImageEditorListeners'](_0x9866cd);});}),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'](_0x1528e4,_0x5b0960){const _0x5a905f='uc-cloud-image-editor',_0x4df5e9=_0x1528e4['querySelector'](_0x5a905f);if(_0x4df5e9)return _0x5b0960(_0x4df5e9);const _0x5a5913=new MutationObserver(_0x59f110=>{const _0xa12018=_0x59f110['filter'](_0x146f81=>_0x146f81['target']===_0x1528e4&&_0x146f81['addedNodes']['length']>0x0&&_0x146f81['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5a905f);_0xa12018['length']&&(_0x5a5913['disconnect'](),_0x5b0960(_0xa12018[0x0]['addedNodes'][0x0]));});_0x5a5913['observe'](_0x1528e4,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x49fb77){_0x49fb77['addEventListener']('apply',_0x371d45=>{this['fire']('apply',{'imageSrc':_0x371d45['detail']['cdnUrl']});}),_0x49fb77['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x5d37c8(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1cfa26,_0x5ebb83,_0x238cd2){super(),this['_editor']=_0x1cfa26,this['_dialog']=_0x5ebb83,this['_imageElement']=_0x238cd2,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 _0xa78bfa=this['_imageElement'],_0x230762=_0xa78bfa['getAttribute']('uploadcareImageId'),_0xcd7612=_0xa78bfa['getAttribute']('src');if(_0x230762)await this['_loadImageInfo'](_0x230762,_0xcd7612);else{if(this['_imageCache']['has'](_0xcd7612)){const _0x7b58a0=this['_imageCache']['get'](_0xcd7612);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x7b58a0['url'],this['imageDimension']=_0x7b58a0['dimension'],this['imageId']=_0x7b58a0['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0xd5140b}=this['_editor'],t=_0xd5140b['t'],_0x161bae=new X(_0xd5140b,this['imageStatus'],this['_attributes']);_0x161bae['bind']('status')['to'](this,'imageStatus'),_0x161bae['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x161bae['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x161bae['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x161bae,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2e3c93,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x161bae,'position':_0x5a2fae['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x161bae['focus']();},'onHide':()=>{_0x161bae['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x11e651=>!A(_0x11e651,_0x161bae['element'])}});}['_loadImageInfo'](_0x2f9757,_0x5ad4f5){return j['getInfo'](_0x2f9757,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x5edfce=>{const {width:_0x48a590,height:_0x39e42d}=_0x5edfce['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5ad4f5,this['imageDimension']={'width':_0x48a590,'height':_0x39e42d},this['imageId']=_0x2f9757;})['catch'](_0xc67d0f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xc67d0f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x484a1e,_0x29179f){return this['_getImageAsFile'](_0x484a1e)['then'](_0x5679fd=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x29179f['signal'],'file':_0x5679fd,'onProgress':_0xb2632f=>{_0xb2632f&&_0xb2632f['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0xb2632f['value']));}}))['then'](_0x349064=>{const {width:_0x5c8e60,height:_0x27a92b}=_0x349064['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x349064['cdnUrl'],this['imageDimension']={'width':_0x5c8e60,'height':_0x27a92b},this['imageId']=_0x349064['uuid'],this['imageUploadProgress']=null;const _0x436e2f=_0x484a1e['getAttribute']('src');this['_imageCache']['set'](_0x436e2f,{'id':_0x349064['uuid'],'url':_0x349064['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x1c8b3d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1c8b3d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1596b6,_0x2eafde){_0x1596b6['on']('apply',(_0x154f13,_0x78c8e0)=>{this['_replaceImage'](_0x2eafde,_0x78c8e0['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1596b6['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1596b6['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x16eeb3,_0x1ac334,_0x39ae1a){const _0x3dfe46=this['_editor'],{width:_0x1f1744,height:_0x48cfb6}=S(_0x1ac334,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x12546,imageSources:_0x597e11}=C(_0x1ac334,_0x1f1744);_0x3dfe46['model']['change'](_0x4bfb86=>{if('$graveyard'===_0x16eeb3['root']['rootName']){_0x3dfe46['execute']('insertImage',{'imageType':_0x16eeb3['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x16eeb3['getAttributes']()),'uploadcareImageId':_0x39ae1a,'src':_0x12546,'sources':_0x597e11,'width':_0x1f1744,'height':_0x48cfb6}});const _0x242104=_0x16eeb3['getChildren']();_0x16eeb3=_0x3dfe46['model']['document']['selection']['getSelectedElement']();for(const _0x20fc9f of _0x242104)_0x4bfb86['append'](_0x4bfb86['cloneElement'](_0x20fc9f),_0x16eeb3);}else _0x4bfb86['setSelection'](_0x16eeb3,'on'),_0x3dfe46['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x16eeb3['getAttributes']()),'uploadcareImageId':_0x39ae1a,'src':_0x12546,'sources':_0x597e11,'width':_0x1f1744,'height':_0x48cfb6},_0x16eeb3);_0x4bfb86['setSelection'](_0x16eeb3,'on');});}async['_getImageAsFile'](_0x54994b){const _0x94a41=_0x1a5972['window'],_0x253be0=_0x1a5972['document']['location']['href'],_0x493091=new _0x94a41['URL'](_0x54994b['getAttribute']('src'),_0x253be0);if('data:'===_0x493091['protocol']){const _0x120fe6=_0x493091['href']['split'](','),_0x3139be=_0x120fe6[0x0]['match'](/:(.*?);/)[0x1],_0x39ff10=_0x3139be['split']('/')[0x1],_0x425130=_0x94a41['atob'](_0x120fe6[_0x120fe6['length']-0x1]);let _0x163dc4=_0x425130['length'];const _0x4c7bc8=new _0x94a41['Uint8Array'](_0x163dc4);for(;_0x163dc4--;)_0x4c7bc8[_0x163dc4]=_0x425130['charCodeAt'](_0x163dc4);return new _0x94a41['File']([_0x4c7bc8],'image.'+_0x39ff10,{'type':_0x3139be});}const _0x20d3cb=_0x493091['href']['split']('/'),_0x5aa84d=_0x20d3cb[_0x20d3cb['length']-0x1],_0x265df2=_0x5aa84d['split']('.')[0x1];return _0x94a41['fetch'](_0x493091['href'])['then'](_0x3293be=>_0x3293be['clone']()['blob']())['then'](_0x2230bc=>new _0x94a41['File']([_0x2230bc],_0x5aa84d,{'type':'image/'+_0x265df2}));}}class O extends _0x5f1d1f{['imageEditController'];static get['requires'](){return[_0x1e0111];}['_isEditable'];constructor(_0x5d2644){super(_0x5d2644),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x268941){const _0x471b2b=G(_0x268941);return _0x372e53=>!(!_0x372e53||!_0x372e53['is']('element','imageBlock')&&!_0x372e53['is']('element','imageInline'))&&(!!_0x372e53['hasAttribute']('uploadcareImageId')||!!_0x372e53['hasAttribute']('src')&&_0x471b2b(_0x372e53['getAttribute']('src')));}(_0x5d2644['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x17f09f=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x17f09f);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x2fe239=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2fe239&&(_0x2fe239['is']('element','imageBlock')||_0x2fe239['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x1e0111),_0x2fe239),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x5f1d1f{['refresh'](){const _0x4753a5=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x4753a5&&(_0x4753a5['is']('element','imageBlock')||_0x4753a5['is']('element','imageInline')));}['execute'](_0x87557){const _0x162717=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x24ac0e=>{_0x24ac0e['setAttributes'](_0x87557,_0x162717),_0x24ac0e['removeAttribute']('srcset',_0x162717),_0x24ac0e['removeAttribute']('sizes',_0x162717);});}}class m extends _0x4e90a5{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x56b5e2,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x411518}=this;_0x411518['commands']['add']('uploadcareImageEdit',new O(_0x411518)),_0x411518['commands']['add']('uploadcareImageReplace',new R(_0x411518));}}class g extends _0x4e90a5{['_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 _0x197d8f=this['editor'];_0x197d8f['ui']['componentFactory']['add']('uploadcareImageEdit',_0x1329be=>{const _0x2dd6a6=_0x197d8f['commands']['get']('uploadcareImageEdit'),_0x53c66e=new _0x566edc(_0x1329be),t=_0x1329be['t'];return _0x53c66e['set']({'icon':_0x2e3c93,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x53c66e['bind']('isEnabled')['to'](_0x2dd6a6),_0x53c66e['bind']('isOn')['to'](_0x2dd6a6,'isActive'),this['listenTo'](_0x53c66e,'execute',()=>{_0x197d8f['execute']('uploadcareImageEdit'),_0x197d8f['editing']['view']['focus']();}),_0x53c66e;}),this['_initConfig']();}['_initConfig'](){const _0x3e9b60=_0xef2b99(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x3e9b60),this['listenTo'](this['editor'],'destroy',()=>{_0x3e9b60['remove']();});}}class et extends _0x4e90a5{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 _0x37d92d,Command as _0x21c411}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x14bf57,IconGooglePhotos as _0x545475,IconGoogleDrive as _0x1a79f5,IconFacebook as _0x13742e,IconDropbox as _0x494785,IconUploadcareLink as _0x113051,IconUploadcareImageUpload as _0x5b31a4,IconError as _0x1310e1,IconUploadcareImageEdit as _0xa47f1f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x2824d3,MenuBarMenuListItemButtonView as _0x15169e,View as _0x2dc7c7,FocusCycler as _0x48d100,Dialog as _0x2a6672,DialogViewPosition as _0x2636d7,SpinnerView as _0xe400d3,IconView as _0x5ac054,Notification as _0x20ad36}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2e4a40,DomEmitterMixin as _0x22c48e,global as _0x224b87,getAncestors as _0x391d8a,ObservableMixin as _0xb798d7,uid as _0x31649b,createElement as _0x1769fd}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0xdeb24a}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x363970,info as _0x5bab32}from'@uploadcare/upload-client';import*as _0x3ae478 from'@uploadcare/file-uploader';var i=function(_0x35077e){return _0x35077e['Local']='local',_0x35077e['URL']='url',_0x35077e['Dropbox']='dropbox',_0x35077e['GDrive']='gdrive',_0x35077e['Facebook']='facebook',_0x35077e['GPhotos']='gphotos',_0x35077e['OneDrive']='onedrive',_0x35077e;}({});function _(_0x48750c,_0x581d1a,_0x1ca879){const t=_0x48750c['t'],_0x113256=_0x48750c['t'];switch(_0x581d1a){case i['Local']:return{'text':_0x113256('Insert'===_0x1ca879?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x113256('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x1ca879?_0x113256('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x113256('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x1ca879?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x1ca879?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x1ca879?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x1ca879?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x1ca879?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x581d1a;}}class e extends _0x37d92d{['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 _0x3fce1c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x600645;for(const _0x548420 in _0x3fce1c){const _0x185485=_0x548420,_0x3c0baa=_0x3fce1c[_0x185485];if('uploadcareLicenseKeyValid'==_0x3c0baa||'uploadcareLicenseKeyInvalid'==_0x3c0baa||'uploadcareLicenseKeyExpired'==_0x3c0baa||'uploadcareLicenseKeyDomainLimit'==_0x3c0baa||'uploadcareLicenseKeyNotAllowed'==_0x3c0baa||'uploadcareLicenseKeyEvaluationLimit'==_0x3c0baa||'uploadcareLicenseKeyTrialLimit'==_0x3c0baa||'uploadcareLicenseKeyUsageLimit'==_0x3c0baa){delete _0x3fce1c[_0x185485],_0x600645=_0x3c0baa,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x600645&&_0x3fce1c['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x600645&&_0x3fce1c['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x600645&&_0x3fce1c['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x600645&&_0x3fce1c['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x600645&&_0x3fce1c['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x600645&&_0x3fce1c['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x600645&&_0x3fce1c['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x258e28}=this,_0x10ac1a=_0x258e28['commands']['get']('uploadcare');if(!_0x10ac1a)return;const _0x2b6df7=this['_normalizeConfigSourceList'](_0x258e28['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x496d75,_0x5cfade)=>{const _0x298a93=this['_getIntegrationKey'](_0x5cfade['type']);return _0x496d75[_0x298a93]||(_0x496d75[_0x298a93]=[]),_0x496d75[_0x298a93]['push'](_0x5cfade),_0x496d75;},{});_0x258e28['plugins']['has']('ImageInsertUI')&&_0x258e28['commands']['get']('uploadcare')&&Object['entries'](_0x2b6df7)['forEach'](([_0x1d4b5a,_0x341dc2])=>{_0x258e28['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x1d4b5a,'observable':()=>_0x10ac1a,'buttonViewCreator':()=>this['_createToolbarButton'](_0x341dc2),'formViewCreator':()=>this['_createDropdownButtons'](_0x341dc2),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x341dc2),'override':'assetManager'!==_0x1d4b5a});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x3a917f){const {locale:_0x1afd59}=this['editor'];return _0x3a917f['map'](_0x2cfdb2=>{const _0xb60f41=_(_0x1afd59,_0x2cfdb2,'Insert');switch(_0x2cfdb2){case i['Local']:return{'icon':_0x5b31a4,'type':i['Local'],..._0xb60f41};case i['URL']:return{'icon':_0x113051,'type':i['URL'],..._0xb60f41};case i['Dropbox']:return{'icon':_0x494785,'type':i['Dropbox'],..._0xb60f41};case i['Facebook']:return{'icon':_0x13742e,'type':i['Facebook'],..._0xb60f41};case i['GDrive']:return{'icon':_0x1a79f5,'type':i['GDrive'],..._0xb60f41};case i['GPhotos']:return{'icon':_0x545475,'type':i['GPhotos'],..._0xb60f41};case i['OneDrive']:return{'icon':_0x14bf57,'type':i['OneDrive'],..._0xb60f41};}});}['_getIntegrationKey'](_0x21305e){switch(_0x21305e){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x29000d,_0x3312ba){const _0x55db1d=this['editor'],_0x1e88f1=new _0x29000d(_0x55db1d['locale']),_0x4c41f9=_0x55db1d['commands']['get']('uploadcare');return _0x1e88f1['bind']('isEnabled')['to'](_0x4c41f9),_0x1e88f1['on']('execute',()=>{_0x4c41f9['execute'](_0x3312ba);}),_0x1e88f1;}['_createToolbarButton'](_0x22548d){const {locale:_0xf6a5f8}=this['editor'],_0x44d8f0=this['editor']['plugins']['get']('ImageInsertUI'),_0x373359=_0x22548d[0x0],_0xe71efe=this['_createButton'](_0x2824d3,_0x373359['type']);return _0xe71efe['icon']=_0x373359['icon'],_0xe71efe['bind']('label')['to'](_0x44d8f0,'isImageSelected',_0x4f0d7d=>_(_0xf6a5f8,_0x373359['type'],_0x4f0d7d?'Replace':'Insert')['text']),_0xe71efe['tooltip']=!0x0,_0xe71efe;}['_createDropdownButtons'](_0x33cc5d){const {locale:_0x284647}=this['editor'],_0x3aa261=this['editor']['plugins']['get']('ImageInsertUI');return _0x33cc5d['map'](_0x594ccd=>{const _0x5795b3=this['_createButton'](_0x2824d3,_0x594ccd['type']);return _0x5795b3['withText']=!0x0,_0x5795b3['icon']=_0x594ccd['icon'],_0x5795b3['bind']('label')['to'](_0x3aa261,'isImageSelected',_0xa6b88d=>_(_0x284647,_0x594ccd['type'],_0xa6b88d?'Replace':'Insert')['text']),_0x5795b3;});}['_createMenuBarButtons'](_0x333429){return _0x333429['map'](_0x30c787=>{const _0x3a4ce7=this['_createButton'](_0x15169e,_0x30c787['type']);return _0x3a4ce7['icon']=_0x30c787['icon'],_0x3a4ce7['label']=_0x30c787['shortText'],_0x3a4ce7;});}}class F extends _0x2dc7c7{['focusTracker'];['focusCycler'];constructor(_0x130e6c){super(_0x130e6c),this['focusTracker']=new _0x2e4a40(),this['focusCycler']=new _0x48d100({'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(_0x8d2bed,_0x4f3c42){super(_0x8d2bed),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-'+_0x4f3c42}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x2dfbfc,_0x1adc2c){const _0x15b891=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x2a4d10=>_0x2a4d10<=_0x1adc2c)['map'](_0x4e185e=>_0x2dfbfc['replace'](/\/$/,'')+'/-/resize/'+_0x4e185e+'x/\x20'+_0x4e185e+'w');return{'imageFallbackUrl':_0x2dfbfc,'imageSources':[{'srcset':_0x15b891['join'](',\x20'),'sizes':'(max-width:\x20'+_0x1adc2c+'px)\x20100vw,\x20'+_0x1adc2c+'px','type':'image/webp'}]};}function S(_0x49eabf,_0x3f9ceb,_0x1b6f27){const _0x151c76=_0x49eabf['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x151c76?parseInt(_0x151c76[0x1],0xa):_0x3f9ceb,'height':_0x151c76?parseInt(_0x151c76[0x2],0xa):_0x1b6f27};}function p(_0x3775fa,_0x57b0ff){const _0x4c3a38=new(_0x22c48e())(),_0x55bce3=_0x3775fa['plugins']['get']('ImageUtils'),_0x51d83d=_0x3775fa['editing']['mapper']['toViewElement'](_0x57b0ff),_0x3602a6=_0x55bce3['findViewImgElement'](_0x51d83d),_0x16be11=_0x3775fa['editing']['view']['domConverter']['viewToDom'](_0x3602a6),_0x4aaec0=_0x57b0ff['getAttribute']('width'),_0x49f89a=_0x57b0ff['getAttribute']('height'),_0x174ecb='image-processing';_0x3775fa['editing']['view']['change'](_0x4a0622=>{_0x4a0622['addClass'](_0x174ecb,_0x51d83d),_0x4a0622['setStyle']('aspect-ratio',_0x4aaec0+'/'+_0x49f89a,_0x3602a6);}),_0x4c3a38['listenTo'](_0x16be11,'load',()=>{_0x4c3a38['stopListening'](_0x16be11,'load'),_0x3775fa['editing']['view']['change'](_0xf246bf=>{_0xf246bf['removeClass'](_0x174ecb,_0x51d83d),_0xf246bf['removeStyle']('aspect-ratio',_0x3602a6);});});}function z(_0x53e0bb){if(Array['isArray'](_0x53e0bb)){const _0x10f145=_0x53e0bb['map'](z);return _0x2c0d07=>_0x10f145['some'](_0x46c395=>_0x46c395(_0x2c0d07));}if('origin'==_0x53e0bb){const _0x49ff7b=_0x224b87['window']['location']['origin'];return _0x4cf2ad=>new URL(_0x4cf2ad,_0x224b87['document']['baseURI'])['origin']==_0x49ff7b;}return'function'==typeof _0x53e0bb?_0x53e0bb:_0x53e0bb instanceof RegExp?_0x1d18c4=>!(!_0x1d18c4['match'](_0x53e0bb)&&!_0x1d18c4['replace'](/^https?:\/\//,'')['match'](_0x53e0bb)):()=>!0x1;}function A(_0x5f219f,_0x4621c8){return _0x391d8a(_0x5f219f['target'])['includes'](_0x4621c8);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xb798d7(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x35b9ae,_0x38d278,_0x49d033){super(),this['_editor']=_0x35b9ae,this['_editing']=_0x38d278,this['_dialog']=_0x35b9ae['plugins']['get'](_0x2a6672),this['_api']=_0x38d278['ctxElement']['getAPI'](),this['_type']=_0x49d033,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:_0x5c0574,model:_0x50dccf}=this['_editor'],_0x48930b=_0x50dccf['document']['selection']['getSelectedElement'](),_0x2a1506=_0x48930b&&(_0x48930b['is']('element','imageBlock')||_0x48930b['is']('element','imageInline'));this['_formView']=new x(_0x5c0574,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x5b31a4,'title':_(_0x5c0574,this['_type'],_0x2a1506?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x2636d7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5551fe=>!A(_0x5551fe,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x1def12}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2aa079=>{const _0x40145f=_0x1def12['length'];for(const _0x5fe6fc of _0x1def12){const _0x32af3c=_0x5fe6fc===_0x1def12[_0x40145f-0x1],{cdnUrl:_0x2d9dd9,fileInfo:_0x187be6}=_0x5fe6fc;if(!_0x2d9dd9||!_0x187be6)continue;const {width:_0xf73377,height:_0x3f1af3}=_0x187be6['imageInfo'],_0x4d10cb=S(_0x2d9dd9,_0xf73377,_0x3f1af3),_0x5d2e1d=C(_0x2d9dd9,_0x4d10cb['width']),_0x1acd7d={'id':_0x187be6['uuid'],'type':'image','attributes':{'imageDimension':_0x4d10cb,..._0x5d2e1d}};this['_insertAsset'](_0x1acd7d,_0x32af3c,_0x2aa079);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x331b6e=>{'idle'===_0x331b6e['detail']['status']&&!_0x331b6e['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x5df5bb,_0x50f3f5,_0x51edcc){const _0x2d8979=this['_editor']['model']['document']['selection'],_0xaa27c3=_0x2d8979['getSelectedElement'](),_0x5328c3=!(!_0xaa27c3||!_0xaa27c3['is']('element','imageInline'));_0x51edcc['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x5df5bb,_0x5328c3),_0x50f3f5||_0x51edcc['setSelection'](_0x2d8979['getLastPosition']());}['_insertImage'](_0x41a4d0,_0x51fb5e){const _0x40f655=this['_editor'],{imageDimension:_0x2498de,imageFallbackUrl:_0x2c292d,imageSources:_0x39bfeb}=_0x41a4d0['attributes'];_0x40f655['execute']('insertImage',{'imageType':_0x51fb5e?'imageInline':null,'source':{'uploadcareImageId':_0x41a4d0['id'],'src':_0x2c292d,'sources':_0x39bfeb,..._0x2498de}});}}class w extends _0x21c411{['_editing'];['_controller']=null;static get['requires'](){return[_0x2a6672,o];}constructor(_0x20ff8a){super(_0x20ff8a),this['_editing']=_0x20ff8a['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2375ad){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x2375ad);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x539a51,..._0x5e78d5}){return _0x363970(_0x539a51,_0x5e78d5);}static['getInfo'](_0x5d8cb2,_0x589fad){return _0x5bab32(_0x5d8cb2,_0x589fad);}}class f extends _0x37d92d{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0xdeb24a,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x157424=this['editor'];if(!!!_0x157424['config']['get']('uploadcare'))return;_0x157424['plugins']['get'](_0xdeb24a)['createUploadAdapter']=_0x52eca0=>new k(_0x52eca0,_0x157424),_0x157424['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x5db977,{imageElement:_0x22c299,data:_0x49193d})=>{_0x157424['model']['change'](_0x53f4a8=>{_0x53f4a8['setAttribute']('uploadcareImageId',_0x49193d['uploadcareImageId'],_0x22c299);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x376853,_0x108e90){this['loader']=_0x376853,this['editor']=_0x108e90,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x448914=await this['loader']['file'];return j['upload']({'file':_0x448914,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x3ec532=>{_0x3ec532&&_0x3ec532['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3ec532['value']);}})['then'](async _0x21bb93=>{const {imageFallbackUrl:_0x1a6794,imageSources:_0x8e922a}=C(_0x21bb93['cdnUrl'],_0x21bb93['imageInfo']['width']);return{'uploadcareImageId':_0x21bb93['uuid'],'default':_0x1a6794,'sources':_0x8e922a};})['catch'](()=>{const _0x4448b3=t('Cannot\x20upload\x20file:')+('\x20'+_0x448914['name']+'.');return Promise['reject'](_0x4448b3);});}['abort'](){this['controller']['abort']();}}class o extends _0x37d92d{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x2a6672];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x3c521d){super(_0x3c521d),this['ucContextId']=_0x31649b();}['init'](){const _0x3dc7e6=this['editor'];_0x3dc7e6['commands']['add']('uploadcare',new w(_0x3dc7e6));}['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 _0x2863b5=_0x224b87['document']['querySelector']('input[uploadcare-file-input]');_0x2863b5&&_0x2863b5['remove']();}),async function(_0x56be9a){const _0x81e8a7=_0x524fc1([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x4bfd94=0x3d8d0df,_0x1052b3=0x3dfa5b7^_0x4bfd94,_0x3f2d19=window[_0x524fc1([0x44,0x61,0x74,0x65])][_0x524fc1([0x6e,0x6f,0x77])](),_0x402ce6=_0x56be9a[_0x524fc1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x6dca83=new window[(_0x524fc1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x461624=>{_0x402ce6[_0x524fc1([0x6f,0x6e,0x63,0x65])](_0x524fc1([0x72,0x65,0x61,0x64,0x79]),_0x461624);}),_0x151aa1={[_0x524fc1([0x6b,0x74,0x79])]:_0x524fc1([0x45,0x43]),[_0x524fc1([0x75,0x73,0x65])]:_0x524fc1([0x73,0x69,0x67]),[_0x524fc1([0x63,0x72,0x76])]:_0x524fc1([0x50,0x2d,0x32,0x35,0x36]),[_0x524fc1([0x78])]:_0x524fc1([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]),[_0x524fc1([0x79])]:_0x524fc1([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]),[_0x524fc1([0x61,0x6c,0x67])]:_0x524fc1([0x45,0x53,0x32,0x35,0x36])},_0x57bc4c=_0x402ce6[_0x524fc1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x524fc1([0x67,0x65,0x74])](_0x524fc1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x50214f(){let _0x3eca78,_0x2cbd6a=null,_0x4e4420=null;try{if(_0x57bc4c==_0x524fc1([0x47,0x50,0x4c]))return _0x524fc1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3eca78=_0x5ef4e7(),!_0x3eca78)return _0x524fc1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3eca78[_0x524fc1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4e4420=_0xc79334(_0x3eca78[_0x524fc1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3eca78[_0x524fc1([0x6a,0x74,0x69])])),await _0x466837()?_0x2d8f1a()?_0x4379aa()?_0x524fc1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2b9f26()?(_0x3eca78[_0x524fc1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x524fc1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2cbd6a=_0x3a4fa8(_0x524fc1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3eca78[_0x524fc1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x524fc1([0x74,0x72,0x69,0x61,0x6c])&&(_0x2cbd6a=_0x3a4fa8(_0x524fc1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4e9c10()):_0x524fc1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x524fc1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x524fc1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x524fc1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4379aa(){const _0x19cad6=[_0x524fc1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x524fc1([0x74,0x72,0x69,0x61,0x6c])][_0x524fc1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3eca78[_0x524fc1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3f2d19/0x3e8:0xe10*_0x1052b3;return _0x3eca78[_0x524fc1([0x65,0x78,0x70])]<_0x19cad6;}function _0x2d8f1a(){const _0xedcfe3=_0x3eca78[_0x524fc1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xedcfe3&&(!!_0xedcfe3[_0x524fc1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x524fc1([0x2a]))||!!_0xedcfe3[_0x524fc1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x524fc1([0x55,0x50,0x4c,0x43])));}function _0x2b9f26(){const _0x4e0c38=_0x3eca78[_0x524fc1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4e0c38||0x0==_0x4e0c38[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5c8363}=new URL(window[_0x524fc1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4e0c38[_0x524fc1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c8363))return!0x0;const _0x26eb15=_0x5c8363[_0x524fc1([0x73,0x70,0x6c,0x69,0x74])](_0x524fc1([0x2e]));return _0x4e0c38[_0x524fc1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5d7246=>_0x5d7246[_0x524fc1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x524fc1([0x2a])))[_0x524fc1([0x6d,0x61,0x70])](_0x3fb1a7=>_0x3fb1a7[_0x524fc1([0x73,0x70,0x6c,0x69,0x74])](_0x524fc1([0x2e])))[_0x524fc1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x131a06=>_0x131a06[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x26eb15[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x524fc1([0x6d,0x61,0x70])](_0x3c284b=>Array(_0x26eb15[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3c284b[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x524fc1([0x66,0x69,0x6c,0x6c])](_0x3c284b[0x0]===_0x524fc1([0x2a])?_0x524fc1([0x2a]):'')[_0x524fc1([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3c284b))[_0x524fc1([0x73,0x6f,0x6d,0x65])](_0x3b6a8c=>_0x26eb15[_0x524fc1([0x65,0x76,0x65,0x72,0x79])]((_0x360679,_0x35d888)=>_0x3b6a8c[_0x35d888]===_0x360679||_0x3b6a8c[_0x35d888]===_0x524fc1([0x2a])));}function _0x4e9c10(){return _0x2cbd6a&&_0x4e4420?new window[(_0x524fc1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x908fa6,_0x43d1ff)=>{_0x2cbd6a[_0x524fc1([0x74,0x68,0x65,0x6e])](_0x908fa6,_0x43d1ff),_0x4e4420[_0x524fc1([0x74,0x68,0x65,0x6e])](_0x3663e2=>{_0x3663e2!=_0x524fc1([0x56,0x61,0x6c,0x69,0x64])&&_0x908fa6(_0x3663e2);},_0x43d1ff);}):_0x2cbd6a||_0x4e4420||_0x524fc1([0x56,0x61,0x6c,0x69,0x64]);}}function _0xc79334(_0x30cb41,_0x42f9f5){return new window[(_0x524fc1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ee81f=>{if(_0x41efd7())return _0x5ee81f(_0x524fc1([0x56,0x61,0x6c,0x69,0x64]));_0x41899b(),_0x402ce6[_0x524fc1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x524fc1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1a64ea=!0x1;const _0x2ab796=_0x31649b();function _0x5cfdca(_0x2a0f4b){return!!_0x2a0f4b&&(typeof _0x2a0f4b===_0x524fc1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2a0f4b===_0x524fc1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2a0f4b[_0x524fc1([0x74,0x68,0x65,0x6e])]===_0x524fc1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2a0f4b[_0x524fc1([0x63,0x61,0x74,0x63,0x68])]===_0x524fc1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5aebc5(_0x5dfaf2){_0x3f4997(_0x5dfaf2)[_0x524fc1([0x74,0x68,0x65,0x6e])](_0x2c20f4=>{if(!_0x2c20f4||_0x2c20f4[_0x524fc1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x524fc1([0x6f,0x6b]))return _0x524fc1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2e3a28(_0xe43446(_0x2ab796+_0x42f9f5))!=_0x2c20f4[_0x524fc1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x524fc1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x524fc1([0x56,0x61,0x6c,0x69,0x64]);})[_0x524fc1([0x74,0x68,0x65,0x6e])](_0x25c48d=>(_0x33557a(),_0x25c48d),()=>{const _0x3ee734=_0x259346();return null==_0x3ee734?(_0x33557a(),_0x524fc1([0x56,0x61,0x6c,0x69,0x64])):_0x524fc1(_0x3f2d19-_0x3ee734>(0x27d454df^_0x4bfd94)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x524fc1([0x74,0x68,0x65,0x6e])](_0x5ee81f)[_0x524fc1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5ee81f(_0x524fc1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x657801=0x3ee3e5f^_0x4bfd94;function _0x33557a(){const _0x303496=_0x524fc1([0x6c,0x6c,0x63,0x74,0x2d])+_0x2e3a28(_0xe43446(_0x30cb41)),_0x39337e=_0x3f0a7a(_0x2e3a28(window[_0x524fc1([0x4d,0x61,0x74,0x68])][_0x524fc1([0x63,0x65,0x69,0x6c])](_0x3f2d19/_0x657801)));window[_0x524fc1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x524fc1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x303496,_0x39337e);}function _0x259346(){const _0x522aa2=_0x524fc1([0x6c,0x6c,0x63,0x74,0x2d])+_0x2e3a28(_0xe43446(_0x30cb41)),_0x347e30=window[_0x524fc1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x524fc1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x522aa2);return _0x347e30?window[_0x524fc1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f0a7a(_0x347e30),0x10)*_0x657801:null;}function _0x3f4997(_0x5c7708){return new window[(_0x524fc1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x299e1a,_0x22d3d4)=>{_0x5c7708[_0x524fc1([0x74,0x68,0x65,0x6e])](_0x299e1a,_0x22d3d4),window[_0x524fc1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x22d3d4,0x3d9041f^_0x4bfd94);});}}_0x402ce6[_0x524fc1([0x6f,0x6e])](_0x524fc1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xca8046,_0x27b943)=>{if(_0x27b943[0x0]!=_0x30cb41)return _0x5ee81f(_0x524fc1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x27b943[0x1]={..._0x27b943[0x1],[_0x524fc1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2ab796};},{[_0x524fc1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x524fc1([0x68,0x69,0x67,0x68])}),_0x402ce6[_0x524fc1([0x6f,0x6e])](_0x524fc1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5c5372=>{_0x5cfdca(_0x5c5372[_0x524fc1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1a64ea=!0x0,_0x5aebc5(_0x5c5372[_0x524fc1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x524fc1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x524fc1([0x6c,0x6f,0x77])}),_0x6dca83[_0x524fc1([0x74,0x68,0x65,0x6e])](()=>{_0x1a64ea||_0x5ee81f(_0x524fc1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x41efd7(){return _0x402ce6[_0x524fc1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x524fc1([0x76,0x69,0x65,0x77])][_0x524fc1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x524fc1([0x61,0x75,0x74,0x6f]);}function _0x41899b(){_0x402ce6[_0x524fc1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x524fc1([0x76,0x69,0x65,0x77])][_0x524fc1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x524fc1([0x61,0x75,0x74,0x6f]);}}function _0x3a4fa8(_0x5110ce){const _0x5c23c9=[new window[(_0x524fc1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3828bb=>setTimeout(_0x3828bb,0x3d1ee13^_0x4bfd94)),_0x6dca83[_0x524fc1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x524fc1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56d8db=>{let _0xb7bbcb=0x0;_0x402ce6[_0x524fc1([0x6d,0x6f,0x64,0x65,0x6c])][_0x524fc1([0x6f,0x6e])](_0x524fc1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x9753c9,_0x4907bc)=>{_0x4907bc[0x0][_0x524fc1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xb7bbcb++,_0xb7bbcb==(0x3d8d127^_0x4bfd94)&&(_0x56d8db(),_0x9753c9[_0x524fc1([0x6f,0x66,0x66])]());});}))];return window[_0x524fc1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x524fc1([0x72,0x61,0x63,0x65])](_0x5c23c9)[_0x524fc1([0x74,0x68,0x65,0x6e])](()=>_0x5110ce);}async function _0x495c67(){await _0x6dca83,_0x402ce6[_0x524fc1([0x6d,0x6f,0x64,0x65,0x6c])][_0x524fc1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5e14d0,_0x402ce6[_0x524fc1([0x6d,0x6f,0x64,0x65,0x6c])][_0x524fc1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5e14d0,_0x402ce6[_0x524fc1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x524fc1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x6932b5(_0x10c284){const _0xa515e=_0x3c8814();_0x402ce6[_0xa515e]=_0x524fc1([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x10c284,_0x10c284!=_0x524fc1([0x56,0x61,0x6c,0x69,0x64])&&_0x495c67();}function _0x3c8814(){const _0x166813=window[_0x524fc1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x524fc1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x524fc1([0x6e,0x6f,0x77])]())[_0x524fc1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x524fc1([0x2e]),'');let _0x571f00=_0x524fc1([0x52]);for(let _0x201822=0x0;_0x201822<_0x166813[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x201822+=0x2){let _0x2fac6f=window[_0x524fc1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x166813[_0x524fc1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x201822,_0x201822+0x2));_0x2fac6f>=_0x81e8a7[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2fac6f-=_0x81e8a7[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x571f00+=_0x81e8a7[_0x2fac6f];}return _0x571f00;}function _0x5ef4e7(){const _0x43a0de=_0x57bc4c[_0x524fc1([0x73,0x70,0x6c,0x69,0x74])](_0x524fc1([0x2e]));if(0x3!=_0x43a0de[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2bdc35(_0x43a0de[0x1]);function _0x2bdc35(_0x38de6e){const _0x374977=_0x436a3f(_0x38de6e);return _0x374977&&_0x3d0c3a()?_0x374977:null;function _0x3d0c3a(){const _0x331c08=_0x374977[_0x524fc1([0x6a,0x74,0x69])],_0x931e2a=window[_0x524fc1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x331c08[_0x524fc1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x331c08[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x58e5da={..._0x374977,[_0x524fc1([0x6a,0x74,0x69])]:_0x331c08[_0x524fc1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x331c08[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x58e5da[_0x524fc1([0x76,0x63])],_0xe43446(_0x58e5da)==_0x931e2a;}}}async function _0x466837(){let _0x7d5c90=!0x0;try{const _0x30c990=_0x57bc4c[_0x524fc1([0x73,0x70,0x6c,0x69,0x74])](_0x524fc1([0x2e])),[_0x296a9e,_0x58f219,_0x1352ec]=_0x30c990;return _0x69c9b0(_0x296a9e),await _0x48ca14(_0x296a9e,_0x58f219,_0x1352ec),_0x7d5c90;}catch{return!0x1;}function _0x69c9b0(_0x57335e){const _0x530cae=_0x436a3f(_0x57335e);_0x530cae&&_0x530cae[_0x524fc1([0x61,0x6c,0x67])]==_0x524fc1([0x45,0x53,0x32,0x35,0x36])||(_0x7d5c90=!0x1);}async function _0x48ca14(_0x20d54f,_0x5aa68c,_0x3ca8fc){const _0x54cea9=window[_0x524fc1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x524fc1([0x66,0x72,0x6f,0x6d])](_0x359df3(_0x3ca8fc),_0x1b5daf=>_0x1b5daf[_0x524fc1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4b3dfb=new window[(_0x524fc1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x524fc1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x20d54f+_0x524fc1([0x2e])+_0x5aa68c),_0xee1d81=window[_0x524fc1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x524fc1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xee1d81)return;const _0x413490=await _0xee1d81[_0x524fc1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x524fc1([0x6a,0x77,0x6b]),_0x151aa1,{[_0x524fc1([0x6e,0x61,0x6d,0x65])]:_0x524fc1([0x45,0x43,0x44,0x53,0x41]),[_0x524fc1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x524fc1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x524fc1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xee1d81[_0x524fc1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x524fc1([0x6e,0x61,0x6d,0x65])]:_0x524fc1([0x45,0x43,0x44,0x53,0x41]),[_0x524fc1([0x68,0x61,0x73,0x68])]:{[_0x524fc1([0x6e,0x61,0x6d,0x65])]:_0x524fc1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x413490,_0x54cea9,_0x4b3dfb)||(_0x7d5c90=!0x1);}}function _0x436a3f(_0x3a55be){return _0x3a55be[_0x524fc1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x524fc1([0x65,0x79]))?JSON[_0x524fc1([0x70,0x61,0x72,0x73,0x65])](_0x359df3(_0x3a55be)):null;}function _0x359df3(_0x176451){return window[_0x524fc1([0x61,0x74,0x6f,0x62])](_0x176451[_0x524fc1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x524fc1([0x2b]))[_0x524fc1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x524fc1([0x2f])));}function _0xe43446(_0x2a961f){let _0x2b5fa3=0x1505;function _0x54281e(_0x543ca0){for(let _0x313609=0x0;_0x313609<_0x543ca0[_0x524fc1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x313609++){const _0x44b47c=_0x543ca0[_0x524fc1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x313609);_0x2b5fa3=(_0x2b5fa3<<0x5)+_0x2b5fa3+_0x44b47c,_0x2b5fa3&=_0x2b5fa3;}}function _0x24a6e3(_0x9425e4){Array[_0x524fc1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x9425e4)?_0x9425e4[_0x524fc1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x24a6e3):_0x9425e4&&typeof _0x9425e4==_0x524fc1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x524fc1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x9425e4)[_0x524fc1([0x73,0x6f,0x72,0x74])]()[_0x524fc1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x15148a,_0x5329ea])=>{_0x54281e(_0x15148a),_0x24a6e3(_0x5329ea);}):_0x54281e(window[_0x524fc1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x9425e4));}return _0x24a6e3(_0x2a961f),_0x2b5fa3>>>0x0;}function _0x2e3a28(_0x18a95b){return _0x18a95b[_0x524fc1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x524fc1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x524fc1([0x30]));}function _0x3f0a7a(_0x12f216){return _0x12f216[_0x524fc1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x524fc1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x524fc1([0x6a,0x6f,0x69,0x6e])]('');}function _0x5e14d0(){}function _0x524fc1(_0x127260){return _0x127260['map'](_0x2a1f2a=>String['fromCharCode'](_0x2a1f2a))['join']('');}_0x6932b5(await _0x50214f());}(this);}['_initSchema'](){const _0x557719=this['editor']['model']['schema'];_0x557719['isRegistered']('imageBlock')&&_0x557719['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x557719['isRegistered']('imageInline')&&_0x557719['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x22f6c6=this['editor'];_0x22f6c6['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x22f6c6['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x172e1=>_0x172e1['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x16ba80=_0x22f6c6['commands']['get']('replaceImageSource');_0x16ba80&&this['listenTo'](_0x16ba80,'cleanupImage',(_0x105d07,[_0x3377ab,_0x499389])=>{_0x3377ab['removeAttribute']('uploadcareImageId',_0x499389);});}['_initConfig'](){const _0x2312bf=this['editor']['config']['get']('uploadcare.uploader')||{},_0x41bf15=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1769fd(_0x224b87['document'],'uc-config',{..._0x2312bf,'pubkey':_0x41bf15,'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']=_0x4b5484=>{if('closeMax'==_0x4b5484)return'#uc-icon-arrow-down';},_0x224b87['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1769fd(_0x224b87['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x224b87['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x51c0ff=this['editor']['commands']['get']('insertImage');_0x51c0ff&&this['listenTo'](_0x51c0ff,'execute',()=>{const _0x513b97=this['editor']['model']['document']['selection']['getSelectedElement']();_0x513b97&&_0x513b97['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x513b97);});});const _0x405b27=this['editor']['commands']['get']('uploadcareImageReplace');_0x405b27&&this['listenTo'](_0x405b27,'execute',()=>{const _0x31df82=this['editor']['model']['document']['selection']['getSelectedElement']();_0x31df82&&_0x31df82['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x31df82);});});}}class tt extends _0x37d92d{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdb95e2){super(_0xdb95e2),_0xdb95e2['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x3ae478['defineComponents'](_0x3ae478);}}class ii extends _0x2dc7c7{constructor(_0x3e79bf){super(_0x3e79bf);const t=_0x3e79bf['t'],_0x5d141e=this['bindTemplate'],_0x2a3420=new _0xe400d3();_0x2a3420['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':[_0x2a3420,{'text':_0x5d141e['to']('imageUploadProgress',_0x31783c=>t('Loading\x20image...')+'\x20('+(_0x31783c||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 _0x2dc7c7{constructor(_0x4f603c){super(_0x4f603c);const t=_0x4f603c['t'];this['set']('errorType',null);const _0x55121d=new _0x2824d3(_0x4f603c);_0x55121d['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x55121d['withText']=!0x0,_0x55121d['class']='ck-button-action',_0x55121d['on']('execute',()=>{this['fire']('retry');}),_0x55121d['bind']('isVisible')['to'](this,'errorType',_0x43acc1=>'NotFound'!==_0x43acc1);const _0x221e13=new _0x5ac054();_0x221e13['content']=_0x1310e1,_0x221e13['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x19e612=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':[_0x221e13,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x19e612['to']('errorType',_0x20bdd5=>t('NotFound'!==_0x20bdd5?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x55121d]},{'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 _0x2dc7c7{constructor(_0x41ef6b,_0x2f55e4){super(_0x41ef6b);const _0x3a9971=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x2f55e4,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3a9971['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x1ae7ee,_0x302516,_0x474d23){super(_0x1ae7ee),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x1ae7ee),this['_errorView']=new ti(_0x1ae7ee),this['_editingView']=new ei(_0x1ae7ee,_0x474d23),this['_focusableView']=new _0x2dc7c7(_0x1ae7ee),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x302516),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'],_0x2a31e8=>{this['_addUploadcareImageEditorListeners'](_0x2a31e8);});}),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'](_0x11e4e9,_0x3bde13){const _0x5ad6cb='uc-cloud-image-editor',_0x1d145b=_0x11e4e9['querySelector'](_0x5ad6cb);if(_0x1d145b)return _0x3bde13(_0x1d145b);const _0x387f42=new MutationObserver(_0x46a8bf=>{const _0x588e3b=_0x46a8bf['filter'](_0x1dfa65=>_0x1dfa65['target']===_0x11e4e9&&_0x1dfa65['addedNodes']['length']>0x0&&_0x1dfa65['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x5ad6cb);_0x588e3b['length']&&(_0x387f42['disconnect'](),_0x3bde13(_0x588e3b[0x0]['addedNodes'][0x0]));});_0x387f42['observe'](_0x11e4e9,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x45c7b2){_0x45c7b2['addEventListener']('apply',_0x5e0f49=>{this['fire']('apply',{'imageSrc':_0x5e0f49['detail']['cdnUrl']});}),_0x45c7b2['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0xb798d7(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x43874e,_0x2d1f46,_0x3adc41){super(),this['_editor']=_0x43874e,this['_dialog']=_0x2d1f46,this['_imageElement']=_0x3adc41,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 _0x32862e=this['_imageElement'],_0x305cb8=_0x32862e['getAttribute']('uploadcareImageId'),_0x44db2c=_0x32862e['getAttribute']('src');if(_0x305cb8)await this['_loadImageInfo'](_0x305cb8,_0x44db2c);else{if(this['_imageCache']['has'](_0x44db2c)){const _0x3d3ce2=this['_imageCache']['get'](_0x44db2c);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3d3ce2['url'],this['imageDimension']=_0x3d3ce2['dimension'],this['imageId']=_0x3d3ce2['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x1fad88}=this['_editor'],t=_0x1fad88['t'],_0x229eeb=new X(_0x1fad88,this['imageStatus'],this['_attributes']);_0x229eeb['bind']('status')['to'](this,'imageStatus'),_0x229eeb['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x229eeb['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x229eeb['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x229eeb,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0xa47f1f,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x229eeb,'position':_0x2636d7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x229eeb['focus']();},'onHide':()=>{_0x229eeb['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x38b964=>!A(_0x38b964,_0x229eeb['element'])}});}['_loadImageInfo'](_0x2df2ae,_0x3c719c){return j['getInfo'](_0x2df2ae,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x5caec8=>{const {width:_0x31d042,height:_0x1532e3}=_0x5caec8['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3c719c,this['imageDimension']={'width':_0x31d042,'height':_0x1532e3},this['imageId']=_0x2df2ae;})['catch'](_0x90ca8c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x90ca8c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x2c4753,_0x5b22fd){return this['_getImageAsFile'](_0x2c4753)['then'](_0x4db9ff=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x5b22fd['signal'],'file':_0x4db9ff,'onProgress':_0x32c1c6=>{_0x32c1c6&&_0x32c1c6['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x32c1c6['value']));}}))['then'](_0x3ff16f=>{const {width:_0x2b7b5d,height:_0x20e526}=_0x3ff16f['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3ff16f['cdnUrl'],this['imageDimension']={'width':_0x2b7b5d,'height':_0x20e526},this['imageId']=_0x3ff16f['uuid'],this['imageUploadProgress']=null;const _0x498d47=_0x2c4753['getAttribute']('src');this['_imageCache']['set'](_0x498d47,{'id':_0x3ff16f['uuid'],'url':_0x3ff16f['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x13af42=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x13af42['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x63a08b,_0x5eb490){_0x63a08b['on']('apply',(_0x2a74f8,_0x2fd019)=>{this['_replaceImage'](_0x5eb490,_0x2fd019['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x63a08b['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x63a08b['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2cf16e,_0x425ad5,_0x5548dc){const _0x406088=this['_editor'],{width:_0x117b45,height:_0x27bfd6}=S(_0x425ad5,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x346efa,imageSources:_0x573bd9}=C(_0x425ad5,_0x117b45);_0x406088['model']['change'](_0x7d18a0=>{if('$graveyard'===_0x2cf16e['root']['rootName']){_0x406088['execute']('insertImage',{'imageType':_0x2cf16e['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2cf16e['getAttributes']()),'uploadcareImageId':_0x5548dc,'src':_0x346efa,'sources':_0x573bd9,'width':_0x117b45,'height':_0x27bfd6}});const _0x530452=_0x2cf16e['getChildren']();_0x2cf16e=_0x406088['model']['document']['selection']['getSelectedElement']();for(const _0x419015 of _0x530452)_0x7d18a0['append'](_0x7d18a0['cloneElement'](_0x419015),_0x2cf16e);}else _0x7d18a0['setSelection'](_0x2cf16e,'on'),_0x406088['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2cf16e['getAttributes']()),'uploadcareImageId':_0x5548dc,'src':_0x346efa,'sources':_0x573bd9,'width':_0x117b45,'height':_0x27bfd6},_0x2cf16e);_0x7d18a0['setSelection'](_0x2cf16e,'on');});}async['_getImageAsFile'](_0x105c92){const _0x2baf21=_0x224b87['window'],_0x27bbdd=_0x224b87['document']['location']['href'],_0x147a70=new _0x2baf21['URL'](_0x105c92['getAttribute']('src'),_0x27bbdd);if('data:'===_0x147a70['protocol']){const _0x29bb74=_0x147a70['href']['split'](','),_0x2096f5=_0x29bb74[0x0]['match'](/:(.*?);/)[0x1],_0x189bef=_0x2096f5['split']('/')[0x1],_0x9f0954=_0x2baf21['atob'](_0x29bb74[_0x29bb74['length']-0x1]);let _0x246045=_0x9f0954['length'];const _0x575a59=new _0x2baf21['Uint8Array'](_0x246045);for(;_0x246045--;)_0x575a59[_0x246045]=_0x9f0954['charCodeAt'](_0x246045);return new _0x2baf21['File']([_0x575a59],'image.'+_0x189bef,{'type':_0x2096f5});}const _0x24e785=_0x147a70['href']['split']('/'),_0x5829cf=_0x24e785[_0x24e785['length']-0x1],_0x2c0c8c=_0x5829cf['split']('.')[0x1];return _0x2baf21['fetch'](_0x147a70['href'])['then'](_0x31d144=>_0x31d144['clone']()['blob']())['then'](_0x3d7e2c=>new _0x2baf21['File']([_0x3d7e2c],_0x5829cf,{'type':'image/'+_0x2c0c8c}));}}class Q extends _0x21c411{['imageEditController'];static get['requires'](){return[_0x2a6672];}['_isEditable'];constructor(_0x241600){super(_0x241600),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x4dc5b7){const _0x521434=z(_0x4dc5b7);return _0x2f6cb3=>!(!_0x2f6cb3||!_0x2f6cb3['is']('element','imageBlock')&&!_0x2f6cb3['is']('element','imageInline'))&&(!!_0x2f6cb3['hasAttribute']('uploadcareImageId')||!!_0x2f6cb3['hasAttribute']('src')&&_0x521434(_0x2f6cb3['getAttribute']('src')));}(_0x241600['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x506420=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x506420);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5206fb=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5206fb&&(_0x5206fb['is']('element','imageBlock')||_0x5206fb['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x2a6672),_0x5206fb),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x21c411{['refresh'](){const _0x3eca34=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3eca34&&(_0x3eca34['is']('element','imageBlock')||_0x3eca34['is']('element','imageInline')));}['execute'](_0x565882){const _0x5206e0=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x129119=>{_0x129119['setAttributes'](_0x565882,_0x5206e0),_0x129119['removeAttribute']('srcset',_0x5206e0),_0x129119['removeAttribute']('sizes',_0x5206e0);});}}class m extends _0x37d92d{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x20ad36,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2c37ef}=this;_0x2c37ef['commands']['add']('uploadcareImageEdit',new Q(_0x2c37ef)),_0x2c37ef['commands']['add']('uploadcareImageReplace',new V(_0x2c37ef));}}class g extends _0x37d92d{['_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 _0x12992b=this['editor'];_0x12992b['ui']['componentFactory']['add']('uploadcareImageEdit',_0x488f0b=>{const _0x20984f=_0x12992b['commands']['get']('uploadcareImageEdit'),_0x5db64b=new _0x2824d3(_0x488f0b),t=_0x488f0b['t'];return _0x5db64b['set']({'icon':_0xa47f1f,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x5db64b['bind']('isEnabled')['to'](_0x20984f),_0x5db64b['bind']('isOn')['to'](_0x20984f,'isActive'),this['listenTo'](_0x5db64b,'execute',()=>{_0x12992b['execute']('uploadcareImageEdit'),_0x12992b['editing']['view']['focus']();}),_0x5db64b;}),this['_initConfig']();}['_initConfig'](){const _0x282ec0=_0x1769fd(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x282ec0),this['listenTo'](this['editor'],'destroy',()=>{_0x282ec0['remove']();});}}class et extends _0x37d92d{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251006.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20251006.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251006.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20251006.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251006.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251006.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251006.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251006.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251006.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.19.4",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x13bf(){const _0x28a383=['destroy','data-uc-image-id','removeAttribute','config','once','editor','uploader-','afterInit','downcast','266229NzSABl','_initConfig','configElement','isOfficialPlugin','selection','UploadcareEditing','26ETvQdR','conversion','imageInline','for','22953870sCsukJ','fromCharCode','getAttribute','1444xtPmeP','1162213mEAkka','render','uploadcareImageReplace','9811000WFgkSU','commands','7786242LkoZra','editing','input[uploadcare-file-input]','pluginName','upcast','ucContextId','isPremiumPlugin','get','body','attributeToAttribute','1211OcIkEF','closeMax','_configElement','uploadcareImageId','schema','locale','elementToAttribute','_initImageProcessingIndicator','58326mBubiL','view','contentLanguage','map','uploadcare.pubkey','cleanupImage','uploadcare','_initConversion','uploadcare.uploader','true','href','getSelectedElement','imageBlock','listenTo','model','\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','remove','isRegistered','uc-upload-ctx-provider','join','init','_initSchema','appendChild','document','ctxElement','replaceImageSource','#uc-icon-arrow-down','335azewTW','_ctxElement','requires','insertImage','execute','add','iconHrefResolver','PictureEditing','_initCtx','uc-config','extend','querySelector'];_0x13bf=function(){return _0x28a383;};return _0x13bf();}const _0x40bde4=_0x2c37;function _0x2c37(_0x3c06a8,_0x3000ac){const _0x13bfd6=_0x13bf();return _0x2c37=function(_0x2c370c,_0x3978ca){_0x2c370c=_0x2c370c-0x12b;let _0x131a66=_0x13bfd6[_0x2c370c];return _0x131a66;},_0x2c37(_0x3c06a8,_0x3000ac);}(function(_0x40cf7d,_0x17e72e){const _0x7979f3=_0x2c37,_0x5a294f=_0x40cf7d();while(!![]){try{const _0x1553de=parseInt(_0x7979f3(0x13b))/0x1+parseInt(_0x7979f3(0x133))/0x2*(-parseInt(_0x7979f3(0x12d))/0x3)+-parseInt(_0x7979f3(0x13a))/0x4*(parseInt(_0x7979f3(0x16d))/0x5)+-parseInt(_0x7979f3(0x152))/0x6*(parseInt(_0x7979f3(0x14a))/0x7)+parseInt(_0x7979f3(0x13e))/0x8+-parseInt(_0x7979f3(0x140))/0x9+parseInt(_0x7979f3(0x137))/0xa;if(_0x1553de===_0x17e72e)break;else _0x5a294f['push'](_0x5a294f['shift']());}catch(_0x4d6176){_0x5a294f['push'](_0x5a294f['shift']());}}}(_0x13bf,0xea31a));import{Plugin as _0x1deb27}from'ckeditor5/src/core.js';import{Dialog as _0x301d62}from'ckeditor5/src/ui.js';import{createElement as _0x34def0,global as _0x2aff99,uid as _0x1c9d2d}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x258d89}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x5efc46}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x46ec16}from'./utils/editingutils.js';export class UploadcareEditing extends _0x1deb27{[_0x40bde4(0x14c)]=null;[_0x40bde4(0x16e)]=null;static get[_0x40bde4(0x143)](){const _0x3b3ab9=_0x40bde4;return _0x3b3ab9(0x132);}static get[_0x40bde4(0x16f)](){const _0x2590fe=_0x40bde4;return[_0x2590fe(0x174),_0x5efc46,_0x301d62];}static get[_0x40bde4(0x130)](){return!0x0;}static get[_0x40bde4(0x146)](){return!0x0;}[_0x40bde4(0x145)];get[_0x40bde4(0x12f)](){const _0x3ec7ae=_0x40bde4;return this[_0x3ec7ae(0x14c)];}get[_0x40bde4(0x16a)](){const _0x1ab699=_0x40bde4;return this[_0x1ab699(0x16e)];}constructor(_0x40f2bb){const _0x142736=_0x40bde4;super(_0x40f2bb),this[_0x142736(0x145)]=_0x1c9d2d();}[_0x40bde4(0x166)](){const _0x439345=_0x40bde4,_0xc7e12a=this[_0x439345(0x17e)];_0xc7e12a[_0x439345(0x13f)][_0x439345(0x172)](_0x439345(0x158),new _0x258d89(_0xc7e12a));}[_0x40bde4(0x12b)](){const _0x27527e=_0x40bde4;this[_0x27527e(0x167)](),this[_0x27527e(0x159)](),this[_0x27527e(0x12e)](),this[_0x27527e(0x175)](),this[_0x27527e(0x151)](),this[_0x27527e(0x15f)](this[_0x27527e(0x17e)],_0x27527e(0x179),()=>{const _0x4227f6=_0x27527e;this[_0x4227f6(0x14c)]&&(this[_0x4227f6(0x14c)][_0x4227f6(0x162)](),this[_0x4227f6(0x14c)]=null),this[_0x4227f6(0x16e)]&&(this[_0x4227f6(0x16e)][_0x4227f6(0x162)](),this[_0x4227f6(0x16e)]=null);const _0x353d05=_0x2aff99[_0x4227f6(0x169)][_0x4227f6(0x178)](_0x4227f6(0x142));_0x353d05&&_0x353d05[_0x4227f6(0x162)]();}),async function(_0x5a9b3d){const _0x44ce9b=_0x513808([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x45fc13=0x3d8d0df,_0x2d9171=0x3dfa5e7^_0x45fc13,_0x2f0ef6=window[_0x513808([0x44,0x61,0x74,0x65])][_0x513808([0x6e,0x6f,0x77])](),_0x59112e=_0x5a9b3d[_0x513808([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xe5ee3e=new window[(_0x513808([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x559533=>{_0x59112e[_0x513808([0x6f,0x6e,0x63,0x65])](_0x513808([0x72,0x65,0x61,0x64,0x79]),_0x559533);}),_0x47be9d={[_0x513808([0x6b,0x74,0x79])]:_0x513808([0x45,0x43]),[_0x513808([0x75,0x73,0x65])]:_0x513808([0x73,0x69,0x67]),[_0x513808([0x63,0x72,0x76])]:_0x513808([0x50,0x2d,0x32,0x35,0x36]),[_0x513808([0x78])]:_0x513808([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]),[_0x513808([0x79])]:_0x513808([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]),[_0x513808([0x61,0x6c,0x67])]:_0x513808([0x45,0x53,0x32,0x35,0x36])},_0x1055da=_0x59112e[_0x513808([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x513808([0x67,0x65,0x74])](_0x513808([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4da140(){let _0x2453f0,_0x1452f2=null,_0x23e96e=null;try{if(_0x1055da==_0x513808([0x47,0x50,0x4c]))return _0x513808([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2453f0=_0x3fe415(),!_0x2453f0)return _0x513808([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2453f0[_0x513808([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x23e96e=_0xeeaa5a(_0x2453f0[_0x513808([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2453f0[_0x513808([0x6a,0x74,0x69])])),await _0x24618d()?_0x172255()?_0x36c8e8()?_0x513808([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x145c76()?(_0x2453f0[_0x513808([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x513808([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1452f2=_0x2d2b23(_0x513808([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2453f0[_0x513808([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x513808([0x74,0x72,0x69,0x61,0x6c])&&(_0x1452f2=_0x2d2b23(_0x513808([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4b3bdd()):_0x513808([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x513808([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x513808([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x513808([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x36c8e8(){const _0x355ae2=[_0x513808([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x513808([0x74,0x72,0x69,0x61,0x6c])][_0x513808([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2453f0[_0x513808([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2f0ef6/0x3e8:0xe10*_0x2d9171;return _0x2453f0[_0x513808([0x65,0x78,0x70])]<_0x355ae2;}function _0x172255(){const _0x1f5ebe=_0x2453f0[_0x513808([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1f5ebe&&(!!_0x1f5ebe[_0x513808([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x513808([0x2a]))||!!_0x1f5ebe[_0x513808([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x513808([0x55,0x50,0x4c,0x43])));}function _0x145c76(){const _0x270c00=_0x2c37,_0x311d66=_0x2453f0[_0x513808([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x311d66||0x0==_0x311d66[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4c8486}=new URL(window[_0x513808([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x270c00(0x15c)]);if(_0x311d66[_0x513808([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c8486))return!0x0;const _0x5305b7=_0x4c8486[_0x513808([0x73,0x70,0x6c,0x69,0x74])](_0x513808([0x2e]));return _0x311d66[_0x513808([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5c2b0d=>_0x5c2b0d[_0x513808([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x513808([0x2a])))[_0x513808([0x6d,0x61,0x70])](_0x383b0d=>_0x383b0d[_0x513808([0x73,0x70,0x6c,0x69,0x74])](_0x513808([0x2e])))[_0x513808([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3ea0a4=>_0x3ea0a4[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5305b7[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x513808([0x6d,0x61,0x70])](_0x5b1478=>Array(_0x5305b7[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5b1478[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x513808([0x66,0x69,0x6c,0x6c])](_0x5b1478[0x0]===_0x513808([0x2a])?_0x513808([0x2a]):'')[_0x513808([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5b1478))[_0x513808([0x73,0x6f,0x6d,0x65])](_0x36c08d=>_0x5305b7[_0x513808([0x65,0x76,0x65,0x72,0x79])]((_0xdbca7b,_0xec65d1)=>_0x36c08d[_0xec65d1]===_0xdbca7b||_0x36c08d[_0xec65d1]===_0x513808([0x2a])));}function _0x4b3bdd(){return _0x1452f2&&_0x23e96e?new window[(_0x513808([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x39da1d,_0x1e7c3c)=>{_0x1452f2[_0x513808([0x74,0x68,0x65,0x6e])](_0x39da1d,_0x1e7c3c),_0x23e96e[_0x513808([0x74,0x68,0x65,0x6e])](_0x5ce271=>{_0x5ce271!=_0x513808([0x56,0x61,0x6c,0x69,0x64])&&_0x39da1d(_0x5ce271);},_0x1e7c3c);}):_0x1452f2||_0x23e96e||_0x513808([0x56,0x61,0x6c,0x69,0x64]);}}function _0xeeaa5a(_0x4952d3,_0x175c28){return new window[(_0x513808([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x245d8c=>{if(_0x1049c7())return _0x245d8c(_0x513808([0x56,0x61,0x6c,0x69,0x64]));_0x27512b(),_0x59112e[_0x513808([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x513808([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x493f2f=!0x1;const _0x5b514b=_0x1c9d2d();function _0x241227(_0x2642b9){return!!_0x2642b9&&(typeof _0x2642b9===_0x513808([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2642b9===_0x513808([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2642b9[_0x513808([0x74,0x68,0x65,0x6e])]===_0x513808([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2642b9[_0x513808([0x63,0x61,0x74,0x63,0x68])]===_0x513808([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x10b98e(_0x4113c1){_0x3070d0(_0x4113c1)[_0x513808([0x74,0x68,0x65,0x6e])](_0x4f6bdb=>{if(!_0x4f6bdb||_0x4f6bdb[_0x513808([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x513808([0x6f,0x6b]))return _0x513808([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x19680a(_0x20ee95(_0x5b514b+_0x175c28))!=_0x4f6bdb[_0x513808([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x513808([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x513808([0x56,0x61,0x6c,0x69,0x64]);})[_0x513808([0x74,0x68,0x65,0x6e])](_0x273204=>(_0x1f3b6e(),_0x273204),()=>{const _0x262735=_0x2e4a9a();return null==_0x262735?(_0x1f3b6e(),_0x513808([0x56,0x61,0x6c,0x69,0x64])):_0x513808(_0x2f0ef6-_0x262735>(0x27d454df^_0x45fc13)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x513808([0x74,0x68,0x65,0x6e])](_0x245d8c)[_0x513808([0x63,0x61,0x74,0x63,0x68])](()=>{_0x245d8c(_0x513808([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x548105=0x3ee3e5f^_0x45fc13;function _0x1f3b6e(){const _0x5242a4=_0x513808([0x6c,0x6c,0x63,0x74,0x2d])+_0x19680a(_0x20ee95(_0x4952d3)),_0x215f3c=_0x51c9a9(_0x19680a(window[_0x513808([0x4d,0x61,0x74,0x68])][_0x513808([0x63,0x65,0x69,0x6c])](_0x2f0ef6/_0x548105)));window[_0x513808([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x513808([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5242a4,_0x215f3c);}function _0x2e4a9a(){const _0x1a921a=_0x513808([0x6c,0x6c,0x63,0x74,0x2d])+_0x19680a(_0x20ee95(_0x4952d3)),_0x30b7dc=window[_0x513808([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x513808([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1a921a);return _0x30b7dc?window[_0x513808([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x51c9a9(_0x30b7dc),0x10)*_0x548105:null;}function _0x3070d0(_0x45b185){return new window[(_0x513808([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4d9e15,_0x424f62)=>{_0x45b185[_0x513808([0x74,0x68,0x65,0x6e])](_0x4d9e15,_0x424f62),window[_0x513808([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x424f62,0x3d9041f^_0x45fc13);});}}_0x59112e[_0x513808([0x6f,0x6e])](_0x513808([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2887c4,_0xe6120b)=>{if(_0xe6120b[0x0]!=_0x4952d3)return _0x245d8c(_0x513808([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xe6120b[0x1]={..._0xe6120b[0x1],[_0x513808([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5b514b};},{[_0x513808([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x513808([0x68,0x69,0x67,0x68])}),_0x59112e[_0x513808([0x6f,0x6e])](_0x513808([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x19751a=>{_0x241227(_0x19751a[_0x513808([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x493f2f=!0x0,_0x10b98e(_0x19751a[_0x513808([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x513808([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x513808([0x6c,0x6f,0x77])}),_0xe5ee3e[_0x513808([0x74,0x68,0x65,0x6e])](()=>{_0x493f2f||_0x245d8c(_0x513808([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1049c7(){return _0x59112e[_0x513808([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x513808([0x76,0x69,0x65,0x77])][_0x513808([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x513808([0x61,0x75,0x74,0x6f]);}function _0x27512b(){_0x59112e[_0x513808([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x513808([0x76,0x69,0x65,0x77])][_0x513808([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x513808([0x61,0x75,0x74,0x6f]);}}function _0x2d2b23(_0x4db538){const _0x5a1d36=[new window[(_0x513808([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5add01=>setTimeout(_0x5add01,0x3d1ee13^_0x45fc13)),_0xe5ee3e[_0x513808([0x74,0x68,0x65,0x6e])](()=>new window[(_0x513808([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x345663=>{let _0x33f981=0x0;_0x59112e[_0x513808([0x6d,0x6f,0x64,0x65,0x6c])][_0x513808([0x6f,0x6e])](_0x513808([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5c59c3,_0x1c58b9)=>{_0x1c58b9[0x0][_0x513808([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x33f981++,_0x33f981==(0x3d8d127^_0x45fc13)&&(_0x345663(),_0x5c59c3[_0x513808([0x6f,0x66,0x66])]());});}))];return window[_0x513808([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x513808([0x72,0x61,0x63,0x65])](_0x5a1d36)[_0x513808([0x74,0x68,0x65,0x6e])](()=>_0x4db538);}async function _0x3163a9(){await _0xe5ee3e,_0x59112e[_0x513808([0x6d,0x6f,0x64,0x65,0x6c])][_0x513808([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x521700,_0x59112e[_0x513808([0x6d,0x6f,0x64,0x65,0x6c])][_0x513808([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x521700,_0x59112e[_0x513808([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x513808([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1e2a92(_0x19cb7d){const _0xc9ea0a=_0x3d4181();_0x59112e[_0xc9ea0a]=_0x513808([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x19cb7d,_0x19cb7d!=_0x513808([0x56,0x61,0x6c,0x69,0x64])&&_0x3163a9();}function _0x3d4181(){const _0xb93d8a=window[_0x513808([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x513808([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x513808([0x6e,0x6f,0x77])]())[_0x513808([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x513808([0x2e]),'');let _0xdc5f3c=_0x513808([0x52]);for(let _0x5c2c06=0x0;_0x5c2c06<_0xb93d8a[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5c2c06+=0x2){let _0x2d4256=window[_0x513808([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb93d8a[_0x513808([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5c2c06,_0x5c2c06+0x2));_0x2d4256>=_0x44ce9b[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2d4256-=_0x44ce9b[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xdc5f3c+=_0x44ce9b[_0x2d4256];}return _0xdc5f3c;}function _0x3fe415(){const _0x2e487b=_0x1055da[_0x513808([0x73,0x70,0x6c,0x69,0x74])](_0x513808([0x2e]));if(0x3!=_0x2e487b[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4d8cfc(_0x2e487b[0x1]);function _0x4d8cfc(_0x58a07d){const _0x516e3e=_0xdfa0d(_0x58a07d);return _0x516e3e&&_0x51ab54()?_0x516e3e:null;function _0x51ab54(){const _0x176e36=_0x516e3e[_0x513808([0x6a,0x74,0x69])],_0x1bdb0b=window[_0x513808([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x176e36[_0x513808([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x176e36[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x11781f={..._0x516e3e,[_0x513808([0x6a,0x74,0x69])]:_0x176e36[_0x513808([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x176e36[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x11781f[_0x513808([0x76,0x63])],_0x20ee95(_0x11781f)==_0x1bdb0b;}}}async function _0x24618d(){let _0x2e140c=!0x0;try{const _0x1c4c9b=_0x1055da[_0x513808([0x73,0x70,0x6c,0x69,0x74])](_0x513808([0x2e])),[_0x49ffab,_0x48dc0c,_0x42e7a7]=_0x1c4c9b;return _0x54bd0a(_0x49ffab),await _0x318fd1(_0x49ffab,_0x48dc0c,_0x42e7a7),_0x2e140c;}catch{return!0x1;}function _0x54bd0a(_0x5cba59){const _0xfa1eb2=_0xdfa0d(_0x5cba59);_0xfa1eb2&&_0xfa1eb2[_0x513808([0x61,0x6c,0x67])]==_0x513808([0x45,0x53,0x32,0x35,0x36])||(_0x2e140c=!0x1);}async function _0x318fd1(_0x48b1bb,_0x40fa72,_0x36fd9d){const _0x1164d8=window[_0x513808([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x513808([0x66,0x72,0x6f,0x6d])](_0x314d13(_0x36fd9d),_0x483437=>_0x483437[_0x513808([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x32210b=new window[(_0x513808([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x513808([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x48b1bb+_0x513808([0x2e])+_0x40fa72),_0x3c519e=window[_0x513808([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x513808([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3c519e)return;const _0x29a521=await _0x3c519e[_0x513808([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x513808([0x6a,0x77,0x6b]),_0x47be9d,{[_0x513808([0x6e,0x61,0x6d,0x65])]:_0x513808([0x45,0x43,0x44,0x53,0x41]),[_0x513808([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x513808([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x513808([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3c519e[_0x513808([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x513808([0x6e,0x61,0x6d,0x65])]:_0x513808([0x45,0x43,0x44,0x53,0x41]),[_0x513808([0x68,0x61,0x73,0x68])]:{[_0x513808([0x6e,0x61,0x6d,0x65])]:_0x513808([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x29a521,_0x1164d8,_0x32210b)||(_0x2e140c=!0x1);}}function _0xdfa0d(_0x38acd8){return _0x38acd8[_0x513808([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x513808([0x65,0x79]))?JSON[_0x513808([0x70,0x61,0x72,0x73,0x65])](_0x314d13(_0x38acd8)):null;}function _0x314d13(_0x4b9827){return window[_0x513808([0x61,0x74,0x6f,0x62])](_0x4b9827[_0x513808([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x513808([0x2b]))[_0x513808([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x513808([0x2f])));}function _0x20ee95(_0x13ff82){let _0x497ee2=0x1505;function _0x262fd4(_0x607944){for(let _0x11d83a=0x0;_0x11d83a<_0x607944[_0x513808([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x11d83a++){const _0x86a242=_0x607944[_0x513808([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x11d83a);_0x497ee2=(_0x497ee2<<0x5)+_0x497ee2+_0x86a242,_0x497ee2&=_0x497ee2;}}function _0x26d06e(_0x3be619){Array[_0x513808([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3be619)?_0x3be619[_0x513808([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x26d06e):_0x3be619&&typeof _0x3be619==_0x513808([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x513808([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3be619)[_0x513808([0x73,0x6f,0x72,0x74])]()[_0x513808([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x53ff2a,_0x927903])=>{_0x262fd4(_0x53ff2a),_0x26d06e(_0x927903);}):_0x262fd4(window[_0x513808([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3be619));}return _0x26d06e(_0x13ff82),_0x497ee2>>>0x0;}function _0x19680a(_0x2e42c6){return _0x2e42c6[_0x513808([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x513808([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x513808([0x30]));}function _0x51c9a9(_0x3d0980){return _0x3d0980[_0x513808([0x73,0x70,0x6c,0x69,0x74])]('')[_0x513808([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x513808([0x6a,0x6f,0x69,0x6e])]('');}function _0x521700(){}function _0x513808(_0x40b315){const _0x380ed1=_0x2c37;return _0x40b315[_0x380ed1(0x155)](_0x33073c=>String[_0x380ed1(0x138)](_0x33073c))[_0x380ed1(0x165)]('');}_0x1e2a92(await _0x4da140());}(this);}[_0x40bde4(0x167)](){const _0x3976d9=_0x40bde4,_0x4a399f=this[_0x3976d9(0x17e)][_0x3976d9(0x160)][_0x3976d9(0x14e)];_0x4a399f[_0x3976d9(0x163)](_0x3976d9(0x15e))&&_0x4a399f[_0x3976d9(0x177)](_0x3976d9(0x15e),{'allowAttributes':[_0x3976d9(0x14d)]}),_0x4a399f[_0x3976d9(0x163)](_0x3976d9(0x135))&&_0x4a399f[_0x3976d9(0x177)](_0x3976d9(0x135),{'allowAttributes':[_0x3976d9(0x14d)]});}[_0x40bde4(0x159)](){const _0x291145=_0x40bde4,_0x150bdb=this[_0x291145(0x17e)];_0x150bdb[_0x291145(0x134)][_0x291145(0x136)](_0x291145(0x12c))[_0x291145(0x149)]({'model':_0x291145(0x14d),'view':_0x291145(0x17a)}),_0x150bdb[_0x291145(0x134)][_0x291145(0x136)](_0x291145(0x144))[_0x291145(0x150)]({'model':{'key':_0x291145(0x14d),'value':_0x4e4d3a=>_0x4e4d3a[_0x291145(0x139)](_0x291145(0x17a))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4fdb0d=_0x150bdb[_0x291145(0x13f)][_0x291145(0x147)](_0x291145(0x16b));_0x4fdb0d&&this[_0x291145(0x15f)](_0x4fdb0d,_0x291145(0x157),(_0x35b786,[_0x36a07f,_0x5bf072])=>{const _0x1c578f=_0x291145;_0x36a07f[_0x1c578f(0x17b)](_0x1c578f(0x14d),_0x5bf072);});}[_0x40bde4(0x12e)](){const _0x310f9f=_0x40bde4,_0x1d952e=this[_0x310f9f(0x17e)][_0x310f9f(0x17c)][_0x310f9f(0x147)](_0x310f9f(0x15a))||{},_0x19875b=this[_0x310f9f(0x17e)][_0x310f9f(0x17c)][_0x310f9f(0x147)](_0x310f9f(0x156))||'';this[_0x310f9f(0x14c)]=_0x34def0(_0x2aff99[_0x310f9f(0x169)],_0x310f9f(0x176),{..._0x1d952e,'pubkey':_0x19875b,'ctx-name':_0x310f9f(0x17f)+this[_0x310f9f(0x145)],'sourceList':'','imgOnly':_0x310f9f(0x15b),'removeCopyright':_0x310f9f(0x15b),'localeName':this[_0x310f9f(0x17e)][_0x310f9f(0x14f)][_0x310f9f(0x154)],'externalSourcesEmbedCss':_0x310f9f(0x161)}),this[_0x310f9f(0x14c)][_0x310f9f(0x173)]=_0x2ff159=>{const _0x475f6b=_0x310f9f;if(_0x475f6b(0x14b)==_0x2ff159)return _0x475f6b(0x16c);},_0x2aff99[_0x310f9f(0x169)][_0x310f9f(0x148)][_0x310f9f(0x168)](this[_0x310f9f(0x14c)]);}[_0x40bde4(0x175)](){const _0x143cba=_0x40bde4;this[_0x143cba(0x16e)]=_0x34def0(_0x2aff99[_0x143cba(0x169)],_0x143cba(0x164),{'ctx-name':_0x143cba(0x17f)+this[_0x143cba(0x145)]}),_0x2aff99[_0x143cba(0x169)][_0x143cba(0x148)][_0x143cba(0x168)](this[_0x143cba(0x16e)]);}[_0x40bde4(0x151)](){const _0x40b722=_0x40bde4,_0x5e18b2=this[_0x40b722(0x17e)][_0x40b722(0x13f)][_0x40b722(0x147)](_0x40b722(0x170));_0x5e18b2&&this[_0x40b722(0x15f)](_0x5e18b2,_0x40b722(0x171),()=>{const _0x3bac56=_0x40b722,_0xb87a31=this[_0x3bac56(0x17e)][_0x3bac56(0x160)][_0x3bac56(0x169)][_0x3bac56(0x131)][_0x3bac56(0x15d)]();_0xb87a31&&_0xb87a31[_0x3bac56(0x139)](_0x3bac56(0x14d))&&this[_0x3bac56(0x17e)][_0x3bac56(0x141)][_0x3bac56(0x153)][_0x3bac56(0x17d)](_0x3bac56(0x13c),()=>{const _0x36f203=_0x3bac56;_0x46ec16(this[_0x36f203(0x17e)],_0xb87a31);});});const _0x2c043a=this[_0x40b722(0x17e)][_0x40b722(0x13f)][_0x40b722(0x147)](_0x40b722(0x13d));_0x2c043a&&this[_0x40b722(0x15f)](_0x2c043a,_0x40b722(0x171),()=>{const _0x45fa3d=_0x40b722,_0x189aa6=this[_0x45fa3d(0x17e)][_0x45fa3d(0x160)][_0x45fa3d(0x169)][_0x45fa3d(0x131)][_0x45fa3d(0x15d)]();_0x189aa6&&_0x189aa6[_0x45fa3d(0x139)](_0x45fa3d(0x14d))&&this[_0x45fa3d(0x17e)][_0x45fa3d(0x141)][_0x45fa3d(0x153)][_0x45fa3d(0x17d)](_0x45fa3d(0x13c),()=>{const _0x2d44ed=_0x45fa3d;_0x46ec16(this[_0x2d44ed(0x17e)],_0x189aa6);});});}}
|
|
23
|
+
const _0x5260e0=_0x30f2;(function(_0x67d127,_0x404707){const _0x44d2b6=_0x30f2,_0x3c1c66=_0x67d127();while(!![]){try{const _0x4527f2=parseInt(_0x44d2b6(0x214))/0x1+parseInt(_0x44d2b6(0x20c))/0x2+-parseInt(_0x44d2b6(0x222))/0x3*(parseInt(_0x44d2b6(0x1f7))/0x4)+-parseInt(_0x44d2b6(0x206))/0x5+parseInt(_0x44d2b6(0x1f2))/0x6*(-parseInt(_0x44d2b6(0x203))/0x7)+-parseInt(_0x44d2b6(0x1ef))/0x8+parseInt(_0x44d2b6(0x219))/0x9;if(_0x4527f2===_0x404707)break;else _0x3c1c66['push'](_0x3c1c66['shift']());}catch(_0xb64d96){_0x3c1c66['push'](_0x3c1c66['shift']());}}}(_0x5556,0xbf44e));import{Plugin as _0x31445b}from'ckeditor5/src/core.js';import{Dialog as _0x21c8b8}from'ckeditor5/src/ui.js';import{createElement as _0x30ae0d,global as _0x55dae6,uid as _0x193c6c}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x1df44d}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x3b4bf5}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x363b13}from'./utils/editingutils.js';function _0x5556(){const _0x4682e4=['ucContextId','upcast','_initConversion','schema','2042710ylXUCm','downcast','#uc-icon-arrow-down','configElement','conversion','removeAttribute','getAttribute','selection','1348594DuDSMH','join','uploadcare.uploader','ctxElement','render','25837128uokXJC','editor','_initSchema','extend','input[uploadcare-file-input]','once','querySelector','get','commands','330588SauBGj','UploadcareEditing','uploader-','attributeToAttribute','listenTo','isOfficialPlugin','insertImage','getSelectedElement','isPremiumPlugin','imageInline','imageBlock','pluginName','add','uc-config','href','_configElement','uc-upload-ctx-provider','for','uploadcare','uploadcare.pubkey','afterInit','appendChild','elementToAttribute','map','init','isRegistered','closeMax','destroy','_initImageProcessingIndicator','requires','_initCtx','uploadcareImageId','data-uc-image-id','9958272iXHzrC','\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','execute','16812kaiJtZ','_ctxElement','true','document','view','52niSkIV','_initConfig','iconHrefResolver','locale','cleanupImage','replaceImageSource','PictureEditing','remove','contentLanguage','uploadcareImageReplace','fromCharCode','config','3101owoLDX','body','editing','2693425MXwpXS','model'];_0x5556=function(){return _0x4682e4;};return _0x5556();}function _0x30f2(_0x5dd73f,_0x2bbcdd){const _0x5556b4=_0x5556();return _0x30f2=function(_0x30f2c2,_0x13f026){_0x30f2c2=_0x30f2c2-0x1eb;let _0x200dc7=_0x5556b4[_0x30f2c2];return _0x200dc7;},_0x30f2(_0x5dd73f,_0x2bbcdd);}export class UploadcareEditing extends _0x31445b{[_0x5260e0(0x231)]=null;[_0x5260e0(0x1f3)]=null;static get[_0x5260e0(0x22d)](){const _0x2f08cf=_0x5260e0;return _0x2f08cf(0x223);}static get[_0x5260e0(0x1eb)](){const _0x29eb91=_0x5260e0;return[_0x29eb91(0x1fd),_0x3b4bf5,_0x21c8b8];}static get[_0x5260e0(0x227)](){return!0x0;}static get[_0x5260e0(0x22a)](){return!0x0;}[_0x5260e0(0x208)];get[_0x5260e0(0x20f)](){const _0x4f6d0d=_0x5260e0;return this[_0x4f6d0d(0x231)];}get[_0x5260e0(0x217)](){const _0x37b29b=_0x5260e0;return this[_0x37b29b(0x1f3)];}constructor(_0xb710aa){const _0x322560=_0x5260e0;super(_0xb710aa),this[_0x322560(0x208)]=_0x193c6c();}[_0x5260e0(0x23a)](){const _0x2a301b=_0x5260e0,_0x5e7cbf=this[_0x2a301b(0x21a)];_0x5e7cbf[_0x2a301b(0x221)][_0x2a301b(0x22e)](_0x2a301b(0x234),new _0x1df44d(_0x5e7cbf));}[_0x5260e0(0x236)](){const _0x26fcdb=_0x5260e0;this[_0x26fcdb(0x21b)](),this[_0x26fcdb(0x20a)](),this[_0x26fcdb(0x1f8)](),this[_0x26fcdb(0x1ec)](),this[_0x26fcdb(0x23e)](),this[_0x26fcdb(0x226)](this[_0x26fcdb(0x21a)],_0x26fcdb(0x23d),()=>{const _0x1daf85=_0x26fcdb;this[_0x1daf85(0x231)]&&(this[_0x1daf85(0x231)][_0x1daf85(0x1fe)](),this[_0x1daf85(0x231)]=null),this[_0x1daf85(0x1f3)]&&(this[_0x1daf85(0x1f3)][_0x1daf85(0x1fe)](),this[_0x1daf85(0x1f3)]=null);const _0x4d9f42=_0x55dae6[_0x1daf85(0x1f5)][_0x1daf85(0x21f)](_0x1daf85(0x21d));_0x4d9f42&&_0x4d9f42[_0x1daf85(0x1fe)]();}),async function(_0x1fa0e6){const _0x2d7b4a=_0x359bdf([0x52,0x42,0x63,0x58,0x64,0x47,0x66,0x35,0x36,0x37,0x6d,0x4e,0x6a,0x4b,0x39,0x44,0x54,0x70,0x50,0x30,0x49,0x79,0x69,0x33,0x67,0x65,0x61,0x38,0x5a,0x76,0x7a,0x6c,0x45,0x34,0x62,0x46,0x75,0x57,0x72,0x77,0x73,0x48,0x31,0x68,0x6e,0x4f,0x53,0x4c,0x71,0x6b,0x59,0x32,0x4d,0x51,0x4a,0x78,0x6f,0x56,0x41,0x55,0x74,0x43]),_0x1d5d0c=0x3d8d0df,_0x1b57c8=0x3dfa5b7^_0x1d5d0c,_0x390ee0=window[_0x359bdf([0x44,0x61,0x74,0x65])][_0x359bdf([0x6e,0x6f,0x77])](),_0x3974c3=_0x1fa0e6[_0x359bdf([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a48ad=new window[(_0x359bdf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x404612=>{_0x3974c3[_0x359bdf([0x6f,0x6e,0x63,0x65])](_0x359bdf([0x72,0x65,0x61,0x64,0x79]),_0x404612);}),_0x271dde={[_0x359bdf([0x6b,0x74,0x79])]:_0x359bdf([0x45,0x43]),[_0x359bdf([0x75,0x73,0x65])]:_0x359bdf([0x73,0x69,0x67]),[_0x359bdf([0x63,0x72,0x76])]:_0x359bdf([0x50,0x2d,0x32,0x35,0x36]),[_0x359bdf([0x78])]:_0x359bdf([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]),[_0x359bdf([0x79])]:_0x359bdf([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]),[_0x359bdf([0x61,0x6c,0x67])]:_0x359bdf([0x45,0x53,0x32,0x35,0x36])},_0x246d78=_0x3974c3[_0x359bdf([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x359bdf([0x67,0x65,0x74])](_0x359bdf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x22a101(){let _0x4daf1f,_0x4ebe83=null,_0x18937b=null;try{if(_0x246d78==_0x359bdf([0x47,0x50,0x4c]))return _0x359bdf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4daf1f=_0x46df6(),!_0x4daf1f)return _0x359bdf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4daf1f[_0x359bdf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x18937b=_0x1b7987(_0x4daf1f[_0x359bdf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4daf1f[_0x359bdf([0x6a,0x74,0x69])])),await _0x3a6599()?_0x544165()?_0x3b8874()?_0x359bdf([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x26cf64()?(_0x4daf1f[_0x359bdf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x359bdf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4ebe83=_0x53794f(_0x359bdf([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4daf1f[_0x359bdf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x359bdf([0x74,0x72,0x69,0x61,0x6c])&&(_0x4ebe83=_0x53794f(_0x359bdf([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1bc0e3()):_0x359bdf([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x359bdf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x359bdf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x359bdf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3b8874(){const _0x362422=[_0x359bdf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x359bdf([0x74,0x72,0x69,0x61,0x6c])][_0x359bdf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4daf1f[_0x359bdf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x390ee0/0x3e8:0xe10*_0x1b57c8;return _0x4daf1f[_0x359bdf([0x65,0x78,0x70])]<_0x362422;}function _0x544165(){const _0x39336f=_0x4daf1f[_0x359bdf([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x39336f&&(!!_0x39336f[_0x359bdf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x359bdf([0x2a]))||!!_0x39336f[_0x359bdf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x359bdf([0x55,0x50,0x4c,0x43])));}function _0x26cf64(){const _0x5a6128=_0x30f2,_0x282817=_0x4daf1f[_0x359bdf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x282817||0x0==_0x282817[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3830f4}=new URL(window[_0x359bdf([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x5a6128(0x230)]);if(_0x282817[_0x359bdf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3830f4))return!0x0;const _0x233385=_0x3830f4[_0x359bdf([0x73,0x70,0x6c,0x69,0x74])](_0x359bdf([0x2e]));return _0x282817[_0x359bdf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x24fa19=>_0x24fa19[_0x359bdf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x359bdf([0x2a])))[_0x359bdf([0x6d,0x61,0x70])](_0x301722=>_0x301722[_0x359bdf([0x73,0x70,0x6c,0x69,0x74])](_0x359bdf([0x2e])))[_0x359bdf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x539dc6=>_0x539dc6[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x233385[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x359bdf([0x6d,0x61,0x70])](_0x40a081=>Array(_0x233385[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x40a081[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x359bdf([0x66,0x69,0x6c,0x6c])](_0x40a081[0x0]===_0x359bdf([0x2a])?_0x359bdf([0x2a]):'')[_0x359bdf([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x40a081))[_0x359bdf([0x73,0x6f,0x6d,0x65])](_0xc46ddc=>_0x233385[_0x359bdf([0x65,0x76,0x65,0x72,0x79])]((_0x3a491d,_0x13ebba)=>_0xc46ddc[_0x13ebba]===_0x3a491d||_0xc46ddc[_0x13ebba]===_0x359bdf([0x2a])));}function _0x1bc0e3(){return _0x4ebe83&&_0x18937b?new window[(_0x359bdf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x566f36,_0x195b8b)=>{_0x4ebe83[_0x359bdf([0x74,0x68,0x65,0x6e])](_0x566f36,_0x195b8b),_0x18937b[_0x359bdf([0x74,0x68,0x65,0x6e])](_0x2269a8=>{_0x2269a8!=_0x359bdf([0x56,0x61,0x6c,0x69,0x64])&&_0x566f36(_0x2269a8);},_0x195b8b);}):_0x4ebe83||_0x18937b||_0x359bdf([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1b7987(_0x594238,_0x475c7e){return new window[(_0x359bdf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1c4be8=>{if(_0x21c111())return _0x1c4be8(_0x359bdf([0x56,0x61,0x6c,0x69,0x64]));_0x44342e(),_0x3974c3[_0x359bdf([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x359bdf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4372a8=!0x1;const _0x4b8981=_0x193c6c();function _0x53909a(_0x4ea3c2){return!!_0x4ea3c2&&(typeof _0x4ea3c2===_0x359bdf([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4ea3c2===_0x359bdf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4ea3c2[_0x359bdf([0x74,0x68,0x65,0x6e])]===_0x359bdf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4ea3c2[_0x359bdf([0x63,0x61,0x74,0x63,0x68])]===_0x359bdf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x430452(_0x2a0ed9){_0x3e6131(_0x2a0ed9)[_0x359bdf([0x74,0x68,0x65,0x6e])](_0x4d18e5=>{if(!_0x4d18e5||_0x4d18e5[_0x359bdf([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x359bdf([0x6f,0x6b]))return _0x359bdf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4a9b02(_0x58cb8b(_0x4b8981+_0x475c7e))!=_0x4d18e5[_0x359bdf([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x359bdf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x359bdf([0x56,0x61,0x6c,0x69,0x64]);})[_0x359bdf([0x74,0x68,0x65,0x6e])](_0xe46351=>(_0x47c15a(),_0xe46351),()=>{const _0x1a9467=_0x23658d();return null==_0x1a9467?(_0x47c15a(),_0x359bdf([0x56,0x61,0x6c,0x69,0x64])):_0x359bdf(_0x390ee0-_0x1a9467>(0x27d454df^_0x1d5d0c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x359bdf([0x74,0x68,0x65,0x6e])](_0x1c4be8)[_0x359bdf([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1c4be8(_0x359bdf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3e1edc=0x3ee3e5f^_0x1d5d0c;function _0x47c15a(){const _0x335354=_0x359bdf([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a9b02(_0x58cb8b(_0x594238)),_0x315dd1=_0x193fa4(_0x4a9b02(window[_0x359bdf([0x4d,0x61,0x74,0x68])][_0x359bdf([0x63,0x65,0x69,0x6c])](_0x390ee0/_0x3e1edc)));window[_0x359bdf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x359bdf([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x335354,_0x315dd1);}function _0x23658d(){const _0x242d46=_0x359bdf([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a9b02(_0x58cb8b(_0x594238)),_0x4fecd5=window[_0x359bdf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x359bdf([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x242d46);return _0x4fecd5?window[_0x359bdf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x193fa4(_0x4fecd5),0x10)*_0x3e1edc:null;}function _0x3e6131(_0x188d4a){return new window[(_0x359bdf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x44577d,_0x3a1d55)=>{_0x188d4a[_0x359bdf([0x74,0x68,0x65,0x6e])](_0x44577d,_0x3a1d55),window[_0x359bdf([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3a1d55,0x3d9041f^_0x1d5d0c);});}}_0x3974c3[_0x359bdf([0x6f,0x6e])](_0x359bdf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5b9fa2,_0x4a96c9)=>{if(_0x4a96c9[0x0]!=_0x594238)return _0x1c4be8(_0x359bdf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4a96c9[0x1]={..._0x4a96c9[0x1],[_0x359bdf([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4b8981};},{[_0x359bdf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x359bdf([0x68,0x69,0x67,0x68])}),_0x3974c3[_0x359bdf([0x6f,0x6e])](_0x359bdf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5d9fff=>{_0x53909a(_0x5d9fff[_0x359bdf([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4372a8=!0x0,_0x430452(_0x5d9fff[_0x359bdf([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x359bdf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x359bdf([0x6c,0x6f,0x77])}),_0x3a48ad[_0x359bdf([0x74,0x68,0x65,0x6e])](()=>{_0x4372a8||_0x1c4be8(_0x359bdf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x21c111(){return _0x3974c3[_0x359bdf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x359bdf([0x76,0x69,0x65,0x77])][_0x359bdf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x359bdf([0x61,0x75,0x74,0x6f]);}function _0x44342e(){_0x3974c3[_0x359bdf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x359bdf([0x76,0x69,0x65,0x77])][_0x359bdf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x359bdf([0x61,0x75,0x74,0x6f]);}}function _0x53794f(_0x21781a){const _0x317c00=[new window[(_0x359bdf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5dabfa=>setTimeout(_0x5dabfa,0x3d1ee13^_0x1d5d0c)),_0x3a48ad[_0x359bdf([0x74,0x68,0x65,0x6e])](()=>new window[(_0x359bdf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x281f99=>{let _0x771c71=0x0;_0x3974c3[_0x359bdf([0x6d,0x6f,0x64,0x65,0x6c])][_0x359bdf([0x6f,0x6e])](_0x359bdf([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x55b896,_0x1edd37)=>{_0x1edd37[0x0][_0x359bdf([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x771c71++,_0x771c71==(0x3d8d127^_0x1d5d0c)&&(_0x281f99(),_0x55b896[_0x359bdf([0x6f,0x66,0x66])]());});}))];return window[_0x359bdf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x359bdf([0x72,0x61,0x63,0x65])](_0x317c00)[_0x359bdf([0x74,0x68,0x65,0x6e])](()=>_0x21781a);}async function _0x10ee5c(){await _0x3a48ad,_0x3974c3[_0x359bdf([0x6d,0x6f,0x64,0x65,0x6c])][_0x359bdf([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x58e3cf,_0x3974c3[_0x359bdf([0x6d,0x6f,0x64,0x65,0x6c])][_0x359bdf([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x58e3cf,_0x3974c3[_0x359bdf([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x359bdf([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x8cfd82(_0x4ac218){const _0x49b7ab=_0x4340ce();_0x3974c3[_0x49b7ab]=_0x359bdf([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4ac218,_0x4ac218!=_0x359bdf([0x56,0x61,0x6c,0x69,0x64])&&_0x10ee5c();}function _0x4340ce(){const _0x58d706=window[_0x359bdf([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x359bdf([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x359bdf([0x6e,0x6f,0x77])]())[_0x359bdf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x359bdf([0x2e]),'');let _0x52f06b=_0x359bdf([0x52]);for(let _0x4eaa4b=0x0;_0x4eaa4b<_0x58d706[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4eaa4b+=0x2){let _0x2336c1=window[_0x359bdf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58d706[_0x359bdf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4eaa4b,_0x4eaa4b+0x2));_0x2336c1>=_0x2d7b4a[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2336c1-=_0x2d7b4a[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x52f06b+=_0x2d7b4a[_0x2336c1];}return _0x52f06b;}function _0x46df6(){const _0x5c7a1d=_0x246d78[_0x359bdf([0x73,0x70,0x6c,0x69,0x74])](_0x359bdf([0x2e]));if(0x3!=_0x5c7a1d[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2ec4b3(_0x5c7a1d[0x1]);function _0x2ec4b3(_0x13836a){const _0xd75d47=_0x2d0d84(_0x13836a);return _0xd75d47&&_0x78749c()?_0xd75d47:null;function _0x78749c(){const _0x15fe4d=_0xd75d47[_0x359bdf([0x6a,0x74,0x69])],_0x5a787e=window[_0x359bdf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15fe4d[_0x359bdf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15fe4d[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x24a75c={..._0xd75d47,[_0x359bdf([0x6a,0x74,0x69])]:_0x15fe4d[_0x359bdf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x15fe4d[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x24a75c[_0x359bdf([0x76,0x63])],_0x58cb8b(_0x24a75c)==_0x5a787e;}}}async function _0x3a6599(){let _0x104730=!0x0;try{const _0x587905=_0x246d78[_0x359bdf([0x73,0x70,0x6c,0x69,0x74])](_0x359bdf([0x2e])),[_0x438fe4,_0x297d08,_0x162c8b]=_0x587905;return _0x49fb42(_0x438fe4),await _0x10d192(_0x438fe4,_0x297d08,_0x162c8b),_0x104730;}catch{return!0x1;}function _0x49fb42(_0x1bcded){const _0x493499=_0x2d0d84(_0x1bcded);_0x493499&&_0x493499[_0x359bdf([0x61,0x6c,0x67])]==_0x359bdf([0x45,0x53,0x32,0x35,0x36])||(_0x104730=!0x1);}async function _0x10d192(_0x323edc,_0x3a2faa,_0x41814b){const _0x7d1f1=window[_0x359bdf([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x359bdf([0x66,0x72,0x6f,0x6d])](_0x3a9f43(_0x41814b),_0x4fe382=>_0x4fe382[_0x359bdf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x7c73a6=new window[(_0x359bdf([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x359bdf([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x323edc+_0x359bdf([0x2e])+_0x3a2faa),_0x1bc524=window[_0x359bdf([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x359bdf([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1bc524)return;const _0x22ecf4=await _0x1bc524[_0x359bdf([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x359bdf([0x6a,0x77,0x6b]),_0x271dde,{[_0x359bdf([0x6e,0x61,0x6d,0x65])]:_0x359bdf([0x45,0x43,0x44,0x53,0x41]),[_0x359bdf([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x359bdf([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x359bdf([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1bc524[_0x359bdf([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x359bdf([0x6e,0x61,0x6d,0x65])]:_0x359bdf([0x45,0x43,0x44,0x53,0x41]),[_0x359bdf([0x68,0x61,0x73,0x68])]:{[_0x359bdf([0x6e,0x61,0x6d,0x65])]:_0x359bdf([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x22ecf4,_0x7d1f1,_0x7c73a6)||(_0x104730=!0x1);}}function _0x2d0d84(_0x4b5130){return _0x4b5130[_0x359bdf([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x359bdf([0x65,0x79]))?JSON[_0x359bdf([0x70,0x61,0x72,0x73,0x65])](_0x3a9f43(_0x4b5130)):null;}function _0x3a9f43(_0x233b89){return window[_0x359bdf([0x61,0x74,0x6f,0x62])](_0x233b89[_0x359bdf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x359bdf([0x2b]))[_0x359bdf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x359bdf([0x2f])));}function _0x58cb8b(_0x2ceadf){let _0x274479=0x1505;function _0x2eebaa(_0xfdb918){for(let _0x4b0a3e=0x0;_0x4b0a3e<_0xfdb918[_0x359bdf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b0a3e++){const _0x59405a=_0xfdb918[_0x359bdf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4b0a3e);_0x274479=(_0x274479<<0x5)+_0x274479+_0x59405a,_0x274479&=_0x274479;}}function _0x385e46(_0x483e61){Array[_0x359bdf([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x483e61)?_0x483e61[_0x359bdf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x385e46):_0x483e61&&typeof _0x483e61==_0x359bdf([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x359bdf([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x483e61)[_0x359bdf([0x73,0x6f,0x72,0x74])]()[_0x359bdf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x362f1d,_0xe288c9])=>{_0x2eebaa(_0x362f1d),_0x385e46(_0xe288c9);}):_0x2eebaa(window[_0x359bdf([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x483e61));}return _0x385e46(_0x2ceadf),_0x274479>>>0x0;}function _0x4a9b02(_0x5a29b7){return _0x5a29b7[_0x359bdf([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x359bdf([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x359bdf([0x30]));}function _0x193fa4(_0x484bff){return _0x484bff[_0x359bdf([0x73,0x70,0x6c,0x69,0x74])]('')[_0x359bdf([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x359bdf([0x6a,0x6f,0x69,0x6e])]('');}function _0x58e3cf(){}function _0x359bdf(_0x5d2178){const _0x3d9d10=_0x30f2;return _0x5d2178[_0x3d9d10(0x239)](_0x5c99e0=>String[_0x3d9d10(0x201)](_0x5c99e0))[_0x3d9d10(0x215)]('');}_0x8cfd82(await _0x22a101());}(this);}[_0x5260e0(0x21b)](){const _0x5df450=_0x5260e0,_0x33d927=this[_0x5df450(0x21a)][_0x5df450(0x207)][_0x5df450(0x20b)];_0x33d927[_0x5df450(0x23b)](_0x5df450(0x22c))&&_0x33d927[_0x5df450(0x21c)](_0x5df450(0x22c),{'allowAttributes':[_0x5df450(0x1ed)]}),_0x33d927[_0x5df450(0x23b)](_0x5df450(0x22b))&&_0x33d927[_0x5df450(0x21c)](_0x5df450(0x22b),{'allowAttributes':[_0x5df450(0x1ed)]});}[_0x5260e0(0x20a)](){const _0xdce65f=_0x5260e0,_0x1da95b=this[_0xdce65f(0x21a)];_0x1da95b[_0xdce65f(0x210)][_0xdce65f(0x233)](_0xdce65f(0x20d))[_0xdce65f(0x225)]({'model':_0xdce65f(0x1ed),'view':_0xdce65f(0x1ee)}),_0x1da95b[_0xdce65f(0x210)][_0xdce65f(0x233)](_0xdce65f(0x209))[_0xdce65f(0x238)]({'model':{'key':_0xdce65f(0x1ed),'value':_0x5aefb4=>_0x5aefb4[_0xdce65f(0x212)](_0xdce65f(0x1ee))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x29efdc=_0x1da95b[_0xdce65f(0x221)][_0xdce65f(0x220)](_0xdce65f(0x1fc));_0x29efdc&&this[_0xdce65f(0x226)](_0x29efdc,_0xdce65f(0x1fb),(_0x47e058,[_0x5ab8af,_0x287e4b])=>{const _0x5a70bc=_0xdce65f;_0x5ab8af[_0x5a70bc(0x211)](_0x5a70bc(0x1ed),_0x287e4b);});}[_0x5260e0(0x1f8)](){const _0x5e1c19=_0x5260e0,_0x3c0b45=this[_0x5e1c19(0x21a)][_0x5e1c19(0x202)][_0x5e1c19(0x220)](_0x5e1c19(0x216))||{},_0x1fe834=this[_0x5e1c19(0x21a)][_0x5e1c19(0x202)][_0x5e1c19(0x220)](_0x5e1c19(0x235))||'';this[_0x5e1c19(0x231)]=_0x30ae0d(_0x55dae6[_0x5e1c19(0x1f5)],_0x5e1c19(0x22f),{..._0x3c0b45,'pubkey':_0x1fe834,'ctx-name':_0x5e1c19(0x224)+this[_0x5e1c19(0x208)],'sourceList':'','imgOnly':_0x5e1c19(0x1f4),'removeCopyright':_0x5e1c19(0x1f4),'localeName':this[_0x5e1c19(0x21a)][_0x5e1c19(0x1fa)][_0x5e1c19(0x1ff)],'externalSourcesEmbedCss':_0x5e1c19(0x1f0)}),this[_0x5e1c19(0x231)][_0x5e1c19(0x1f9)]=_0x46f06a=>{const _0x33c4bd=_0x5e1c19;if(_0x33c4bd(0x23c)==_0x46f06a)return _0x33c4bd(0x20e);},_0x55dae6[_0x5e1c19(0x1f5)][_0x5e1c19(0x204)][_0x5e1c19(0x237)](this[_0x5e1c19(0x231)]);}[_0x5260e0(0x1ec)](){const _0xe761a8=_0x5260e0;this[_0xe761a8(0x1f3)]=_0x30ae0d(_0x55dae6[_0xe761a8(0x1f5)],_0xe761a8(0x232),{'ctx-name':_0xe761a8(0x224)+this[_0xe761a8(0x208)]}),_0x55dae6[_0xe761a8(0x1f5)][_0xe761a8(0x204)][_0xe761a8(0x237)](this[_0xe761a8(0x1f3)]);}[_0x5260e0(0x23e)](){const _0x3ef3fd=_0x5260e0,_0x2d3305=this[_0x3ef3fd(0x21a)][_0x3ef3fd(0x221)][_0x3ef3fd(0x220)](_0x3ef3fd(0x228));_0x2d3305&&this[_0x3ef3fd(0x226)](_0x2d3305,_0x3ef3fd(0x1f1),()=>{const _0x562442=_0x3ef3fd,_0x4ccd68=this[_0x562442(0x21a)][_0x562442(0x207)][_0x562442(0x1f5)][_0x562442(0x213)][_0x562442(0x229)]();_0x4ccd68&&_0x4ccd68[_0x562442(0x212)](_0x562442(0x1ed))&&this[_0x562442(0x21a)][_0x562442(0x205)][_0x562442(0x1f6)][_0x562442(0x21e)](_0x562442(0x218),()=>{const _0x818f20=_0x562442;_0x363b13(this[_0x818f20(0x21a)],_0x4ccd68);});});const _0x2ac57c=this[_0x3ef3fd(0x21a)][_0x3ef3fd(0x221)][_0x3ef3fd(0x220)](_0x3ef3fd(0x200));_0x2ac57c&&this[_0x3ef3fd(0x226)](_0x2ac57c,_0x3ef3fd(0x1f1),()=>{const _0x331efc=_0x3ef3fd,_0x16f890=this[_0x331efc(0x21a)][_0x331efc(0x207)][_0x331efc(0x1f5)][_0x331efc(0x213)][_0x331efc(0x229)]();_0x16f890&&_0x16f890[_0x331efc(0x212)](_0x331efc(0x1ed))&&this[_0x331efc(0x21a)][_0x331efc(0x205)][_0x331efc(0x1f6)][_0x331efc(0x21e)](_0x331efc(0x218),()=>{const _0x1e34db=_0x331efc;_0x363b13(this[_0x1e34db(0x21a)],_0x16f890);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x4db81b,ObservableMixin as _0x4592e8}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x217ded}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x2ab407}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x49f54b}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x390d48}from'../../utils/uploadutils.js';import{getImageUrls as _0x30b509,getImageDimension as _0x56d85e}from'../../utils/editingutils.js';import{isAncestor as _0x3534f7}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4592e8(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5ee9f5,_0x42e15d,_0x40fcd1){super(),this['_editor']=_0x5ee9f5,this['_dialog']=_0x42e15d,this['_imageElement']=_0x40fcd1,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 _0x56c12d=this['_imageElement'],_0x4f66b6=_0x56c12d['getAttribute']('uploadcareImageId'),_0x417bc9=_0x56c12d['getAttribute']('src');if(_0x4f66b6)await this['_loadImageInfo'](_0x4f66b6,_0x417bc9);else{if(this['_imageCache']['has'](_0x417bc9)){const _0x19d3aa=this['_imageCache']['get'](_0x417bc9);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x19d3aa['url'],this['imageDimension']=_0x19d3aa['dimension'],this['imageId']=_0x19d3aa['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5760a1}=this['_editor'],t=_0x5760a1['t'],_0x4535dd=new _0x49f54b(_0x5760a1,this['imageStatus'],this['_attributes']);_0x4535dd['bind']('status')['to'](this,'imageStatus'),_0x4535dd['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4535dd['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4535dd['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4535dd,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2ab407,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4535dd,'position':_0x217ded['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4535dd['focus']();},'onHide':()=>{_0x4535dd['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x58b747=>!_0x3534f7(_0x58b747,_0x4535dd['element'])}});}['_loadImageInfo'](_0x32f0ea,_0x2908f9){return _0x390d48['getInfo'](_0x32f0ea,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x915cab=>{const {width:_0x280738,height:_0x4e549d}=_0x915cab['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2908f9,this['imageDimension']={'width':_0x280738,'height':_0x4e549d},this['imageId']=_0x32f0ea;})['catch'](_0x1d1233=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1d1233['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x5cf42c,_0x2c0a40){return this['_getImageAsFile'](_0x5cf42c)['then'](_0x1d7f29=>_0x390d48['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x2c0a40['signal'],'file':_0x1d7f29,'onProgress':_0x2e09c8=>{_0x2e09c8&&_0x2e09c8['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2e09c8['value']));}}))['then'](_0x3f9a20=>{const {width:_0x3f9be6,height:_0xe5331}=_0x3f9a20['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3f9a20['cdnUrl'],this['imageDimension']={'width':_0x3f9be6,'height':_0xe5331},this['imageId']=_0x3f9a20['uuid'],this['imageUploadProgress']=null;const _0x3e0cc0=_0x5cf42c['getAttribute']('src');this['_imageCache']['set'](_0x3e0cc0,{'id':_0x3f9a20['uuid'],'url':_0x3f9a20['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x28cf71=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x28cf71['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x261b33,_0xa79232){_0x261b33['on']('apply',(_0x5b2737,_0x56a713)=>{this['_replaceImage'](_0xa79232,_0x56a713['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x261b33['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x261b33['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x43be43,_0x56968a,_0x1d55f7){const _0x5de621=this['_editor'],{width:_0x49d62c,height:_0x5d9bed}=_0x56d85e(_0x56968a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x43bfc9,imageSources:_0x4aa9f6}=_0x30b509(_0x56968a,_0x49d62c);_0x5de621['model']['change'](_0x135684=>{if('$graveyard'===_0x43be43['root']['rootName']){_0x5de621['execute']('insertImage',{'imageType':_0x43be43['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x43be43['getAttributes']()),'uploadcareImageId':_0x1d55f7,'src':_0x43bfc9,'sources':_0x4aa9f6,'width':_0x49d62c,'height':_0x5d9bed}});const _0x144e24=_0x43be43['getChildren']();_0x43be43=_0x5de621['model']['document']['selection']['getSelectedElement']();for(const _0x4d2488 of _0x144e24)_0x135684['append'](_0x135684['cloneElement'](_0x4d2488),_0x43be43);}else _0x135684['setSelection'](_0x43be43,'on'),_0x5de621['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x43be43['getAttributes']()),'uploadcareImageId':_0x1d55f7,'src':_0x43bfc9,'sources':_0x4aa9f6,'width':_0x49d62c,'height':_0x5d9bed},_0x43be43);_0x135684['setSelection'](_0x43be43,'on');});}async['_getImageAsFile'](_0x2a4ee8){const _0x30897f=_0x4db81b['window'],_0x4d4881=_0x4db81b['document']['location']['href'],_0xa61c7a=new _0x30897f['URL'](_0x2a4ee8['getAttribute']('src'),_0x4d4881);if('data:'===_0xa61c7a['protocol']){const _0x47aee6=_0xa61c7a['href']['split'](','),_0x2f2f8=_0x47aee6[0x0]['match'](/:(.*?);/)[0x1],_0x2b5182=_0x2f2f8['split']('/')[0x1],_0x21594c=_0x30897f['atob'](_0x47aee6[_0x47aee6['length']-0x1]);let _0x354052=_0x21594c['length'];const _0x53f57d=new _0x30897f['Uint8Array'](_0x354052);for(;_0x354052--;)_0x53f57d[_0x354052]=_0x21594c['charCodeAt'](_0x354052);return new _0x30897f['File']([_0x53f57d],'image.'+_0x2b5182,{'type':_0x2f2f8});}const _0x4dfc10=_0xa61c7a['href']['split']('/'),_0xf89d59=_0x4dfc10[_0x4dfc10['length']-0x1],_0x5b4129=_0xf89d59['split']('.')[0x1];return _0x30897f['fetch'](_0xa61c7a['href'])['then'](_0x50f575=>_0x50f575['clone']()['blob']())['then'](_0x2b6246=>new _0x30897f['File']([_0x2b6246],_0xf89d59,{'type':'image/'+_0x5b4129}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x43c454,_0x12405f){const _0x54f4d5=_0x3c4c,_0x48c94a=_0x43c454();while(!![]){try{const _0x222850=parseInt(_0x54f4d5(0xbc))/0x1+parseInt(_0x54f4d5(0xbf))/0x2*(-parseInt(_0x54f4d5(0xb8))/0x3)+parseInt(_0x54f4d5(0xbd))/0x4+-parseInt(_0x54f4d5(0xc2))/0x5*(parseInt(_0x54f4d5(0xb6))/0x6)+parseInt(_0x54f4d5(0xc3))/0x7+-parseInt(_0x54f4d5(0xbb))/0x8+-parseInt(_0x54f4d5(0xb5))/0x9;if(_0x222850===_0x12405f)break;else _0x48c94a['push'](_0x48c94a['shift']());}catch(_0x1155ce){_0x48c94a['push'](_0x48c94a['shift']());}}}(_0x5da6,0x4d8c9));function _0x3c4c(_0x12b502,_0x5501b3){const _0x5da60c=_0x5da6();return _0x3c4c=function(_0x3c4cd5,_0x4f3969){_0x3c4cd5=_0x3c4cd5-0xb5;let _0x15a73b=_0x5da60c[_0x3c4cd5];return _0x15a73b;},_0x3c4c(_0x12b502,_0x5501b3);}import{View as _0x2b10f7}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x2b10f7{constructor(_0xa1893,_0x5a5e10){const _0x2bfb8d=_0x3c4c;super(_0xa1893);const _0x23ba1b=this[_0x2bfb8d(0xc5)];this[_0x2bfb8d(0xbe)](_0x2bfb8d(0xba),''),this[_0x2bfb8d(0xb7)]({'tag':_0x2bfb8d(0xc1),'attributes':{..._0x5a5e10,'class':[_0x2bfb8d(0xc4),_0x2bfb8d(0xb9)],'ctx-name':_0x2bfb8d(0xc0),'cdn-url':_0x23ba1b['to'](_0x2bfb8d(0xba))}});}}function _0x5da6(){const _0x73a4e4=['809847OVRTvC','324xQMplP','setTemplate','6RgVigz','ck-uploadcare-theme','imageSrc','2125872bboFZs','286887tqQMEr','2523228jffrPZ','set','598318VzDKUP','image-edit','uc-cloud-image-editor','9825BTcJFX','3220644oGezfc','uc-light','bindTemplate'];_0x5da6=function(){return _0x73a4e4;};return _0x5da6();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x4a79c6}from'ckeditor5/src/icons.js';import{ButtonView as _0xca2165,IconView as _0x79f1,View as _0x1a02ed}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x1a02ed{constructor(_0x1e44da){super(_0x1e44da);const t=_0x1e44da['t'];this['set']('errorType',null);const _0x38d5b3=new _0xca2165(_0x1e44da);_0x38d5b3['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x38d5b3['withText']=!0x0,_0x38d5b3['class']='ck-button-action',_0x38d5b3['on']('execute',()=>{this['fire']('retry');}),_0x38d5b3['bind']('isVisible')['to'](this,'errorType',_0x2a69e7=>'NotFound'!==_0x2a69e7);const _0x3e8cdb=new _0x79f1();_0x3e8cdb['content']=_0x4a79c6,_0x3e8cdb['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x46ae02=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':[_0x3e8cdb,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x46ae02['to']('errorType',_0x4ffd28=>t('NotFound'!==_0x4ffd28?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x38d5b3]},{'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'}]}]}]});}}
|