@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20260103.0 → 0.0.0-nightly-next-20260104.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 _0x34d38a,Command as _0xf6b32}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x375cf5,IconGooglePhotos as _0xd0c45a,IconGoogleDrive as _0x4cdaaf,IconFacebook as _0x1c6db0,IconDropbox as _0x2deeee,IconUploadcareLink as _0x46fd5a,IconUploadcareImageUpload as _0x425a6e,IconError as _0x82326e,IconUploadcareImageEdit as _0x3a9237}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x263a80,MenuBarMenuListItemButtonView as _0x48a26a,View as _0x3cbde3,FocusCycler as _0x57d486,Dialog as _0xc05314,DialogViewPosition as _0xf22514,SpinnerView as _0x3f2835,IconView as _0x3962fd,Notification as _0x1c3bce}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x46f1d9,DomEmitterMixin as _0xf648ce,global as _0x33c98d,getAncestors as _0x529640,ObservableMixin as _0x2407e2,uid as _0x381c20,createElement as _0x532c90}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x1baefc}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x21a464,info as _0x4c6b27}from'@uploadcare/upload-client';import*as _0x2c1e9b from'@uploadcare/file-uploader';var i=function(_0xacb08e){return _0xacb08e['Local']='local',_0xacb08e['URL']='url',_0xacb08e['Dropbox']='dropbox',_0xacb08e['GDrive']='gdrive',_0xacb08e['Facebook']='facebook',_0xacb08e['GPhotos']='gphotos',_0xacb08e['OneDrive']='onedrive',_0xacb08e;}({});function _(_0x510c25,_0x43405c,_0x3cf0da){const t=_0x510c25['t'],_0x69d714=_0x510c25['t'];switch(_0x43405c){case i['Local']:return{'text':_0x69d714('Insert'===_0x3cf0da?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x69d714('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x3cf0da?_0x69d714('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x69d714('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x3cf0da?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x3cf0da?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x3cf0da?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x3cf0da?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x3cf0da?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x43405c;}}class e extends _0x34d38a{['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 _0x1bd951=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x412a14;for(const _0x21e3b4 in _0x1bd951){const _0x5da822=_0x21e3b4,_0x5ef2b7=_0x1bd951[_0x5da822];if('uploadcareLicenseKeyValid'==_0x5ef2b7||'uploadcareLicenseKeyInvalid'==_0x5ef2b7||'uploadcareLicenseKeyExpired'==_0x5ef2b7||'uploadcareLicenseKeyDomainLimit'==_0x5ef2b7||'uploadcareLicenseKeyNotAllowed'==_0x5ef2b7||'uploadcareLicenseKeyEvaluationLimit'==_0x5ef2b7||'uploadcareLicenseKeyTrialLimit'==_0x5ef2b7||'uploadcareLicenseKeyUsageLimit'==_0x5ef2b7){delete _0x1bd951[_0x5da822],_0x412a14=_0x5ef2b7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x412a14&&_0x1bd951['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x412a14&&_0x1bd951['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x412a14&&_0x1bd951['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x412a14&&_0x1bd951['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x412a14&&_0x1bd951['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x412a14&&_0x1bd951['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x412a14&&_0x1bd951['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x572ac0}=this,_0x5b7bf4=_0x572ac0['commands']['get']('uploadcare');if(!_0x5b7bf4)return;const _0x1ee26e=this['_normalizeConfigSourceList'](_0x572ac0['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x1178c9,_0x5ad1a0)=>{const _0x4e199a=this['_getIntegrationKey'](_0x5ad1a0['type']);return _0x1178c9[_0x4e199a]||(_0x1178c9[_0x4e199a]=[]),_0x1178c9[_0x4e199a]['push'](_0x5ad1a0),_0x1178c9;},{});_0x572ac0['plugins']['has']('ImageInsertUI')&&_0x572ac0['commands']['get']('uploadcare')&&Object['entries'](_0x1ee26e)['forEach'](([_0x3a44d2,_0xb308ae])=>{_0x572ac0['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3a44d2,'observable':()=>_0x5b7bf4,'buttonViewCreator':()=>this['_createToolbarButton'](_0xb308ae),'formViewCreator':()=>this['_createDropdownButtons'](_0xb308ae),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0xb308ae),'override':'assetManager'!==_0x3a44d2});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x39ccf1){const {locale:_0x4aa1b4}=this['editor'];return _0x39ccf1['map'](_0x526db7=>{const _0x55d1dd=_(_0x4aa1b4,_0x526db7,'Insert');switch(_0x526db7){case i['Local']:return{'icon':_0x425a6e,'type':i['Local'],..._0x55d1dd};case i['URL']:return{'icon':_0x46fd5a,'type':i['URL'],..._0x55d1dd};case i['Dropbox']:return{'icon':_0x2deeee,'type':i['Dropbox'],..._0x55d1dd};case i['Facebook']:return{'icon':_0x1c6db0,'type':i['Facebook'],..._0x55d1dd};case i['GDrive']:return{'icon':_0x4cdaaf,'type':i['GDrive'],..._0x55d1dd};case i['GPhotos']:return{'icon':_0xd0c45a,'type':i['GPhotos'],..._0x55d1dd};case i['OneDrive']:return{'icon':_0x375cf5,'type':i['OneDrive'],..._0x55d1dd};}});}['_getIntegrationKey'](_0x28445c){switch(_0x28445c){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x4e5738,_0x108aec){const _0x4e17f5=this['editor'],_0x53debf=new _0x4e5738(_0x4e17f5['locale']),_0x4ee96e=_0x4e17f5['commands']['get']('uploadcare');return _0x53debf['bind']('isEnabled')['to'](_0x4ee96e),_0x53debf['on']('execute',()=>{_0x4ee96e['execute'](_0x108aec);}),_0x53debf;}['_createToolbarButton'](_0x297d62){const {locale:_0x402cef}=this['editor'],_0x251dee=this['editor']['plugins']['get']('ImageInsertUI'),_0x164f0f=_0x297d62[0x0],_0x4ff9b7=this['_createButton'](_0x263a80,_0x164f0f['type']);return _0x4ff9b7['icon']=_0x164f0f['icon'],_0x4ff9b7['bind']('label')['to'](_0x251dee,'isImageSelected',_0x3ff3d1=>_(_0x402cef,_0x164f0f['type'],_0x3ff3d1?'Replace':'Insert')['text']),_0x4ff9b7['tooltip']=!0x0,_0x4ff9b7;}['_createDropdownButtons'](_0x1ed37e){const {locale:_0x20a0a0}=this['editor'],_0x5365cc=this['editor']['plugins']['get']('ImageInsertUI');return _0x1ed37e['map'](_0x391ded=>{const _0x7cf4f2=this['_createButton'](_0x263a80,_0x391ded['type']);return _0x7cf4f2['withText']=!0x0,_0x7cf4f2['icon']=_0x391ded['icon'],_0x7cf4f2['bind']('label')['to'](_0x5365cc,'isImageSelected',_0x2fb9ef=>_(_0x20a0a0,_0x391ded['type'],_0x2fb9ef?'Replace':'Insert')['text']),_0x7cf4f2;});}['_createMenuBarButtons'](_0x316009){return _0x316009['map'](_0x28ea9f=>{const _0x2b2f86=this['_createButton'](_0x48a26a,_0x28ea9f['type']);return _0x2b2f86['icon']=_0x28ea9f['icon'],_0x2b2f86['label']=_0x28ea9f['shortText'],_0x2b2f86;});}}class F extends _0x3cbde3{['focusTracker'];['focusCycler'];constructor(_0x3fc762){super(_0x3fc762),this['focusTracker']=new _0x46f1d9(),this['focusCycler']=new _0x57d486({'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(_0x300b39,_0x48bae3){super(_0x300b39),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-'+_0x48bae3}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x328cff,_0x29fcc9){const _0x18107d=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x30655b=>_0x30655b<=_0x29fcc9)['map'](_0x252773=>_0x328cff['replace'](/\/$/,'')+'/-/resize/'+_0x252773+'x/\x20'+_0x252773+'w');return{'imageFallbackUrl':_0x328cff,'imageSources':[{'srcset':_0x18107d['join'](',\x20'),'sizes':'(max-width:\x20'+_0x29fcc9+'px)\x20100vw,\x20'+_0x29fcc9+'px','type':'image/webp'}]};}function S(_0x3e43ee,_0x482e6b,_0x189d9f){const _0x2a49b6=_0x3e43ee['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x2a49b6?parseInt(_0x2a49b6[0x1],0xa):_0x482e6b,'height':_0x2a49b6?parseInt(_0x2a49b6[0x2],0xa):_0x189d9f};}function p(_0x157704,_0x4310ae){const _0x33a00b=new(_0xf648ce())(),_0xb76510=_0x157704['plugins']['get']('ImageUtils'),_0x363dc7=_0x157704['editing']['mapper']['toViewElement'](_0x4310ae),_0x39f045=_0xb76510['findViewImgElement'](_0x363dc7),_0x1e8d24=_0x157704['editing']['view']['domConverter']['viewToDom'](_0x39f045),_0x19d570=_0x4310ae['getAttribute']('width'),_0xd21c1f=_0x4310ae['getAttribute']('height'),_0x3ca778='image-processing';_0x157704['editing']['view']['change'](_0x5e910f=>{_0x5e910f['addClass'](_0x3ca778,_0x363dc7),_0x5e910f['setStyle']('aspect-ratio',_0x19d570+'/'+_0xd21c1f,_0x39f045);}),_0x33a00b['listenTo'](_0x1e8d24,'load',()=>{_0x33a00b['stopListening'](_0x1e8d24,'load'),_0x157704['editing']['view']['change'](_0x1c17bf=>{_0x1c17bf['removeClass'](_0x3ca778,_0x363dc7),_0x1c17bf['removeStyle']('aspect-ratio',_0x39f045);});});}function z(_0xbe59a1){if(Array['isArray'](_0xbe59a1)){const _0x364ac5=_0xbe59a1['map'](z);return _0x4b0ba1=>_0x364ac5['some'](_0x4074e4=>_0x4074e4(_0x4b0ba1));}if('origin'==_0xbe59a1){const _0x41f42a=_0x33c98d['window']['location']['origin'];return _0x2abe35=>new URL(_0x2abe35,_0x33c98d['document']['baseURI'])['origin']==_0x41f42a;}return'function'==typeof _0xbe59a1?_0xbe59a1:_0xbe59a1 instanceof RegExp?_0x1218fd=>!(!_0x1218fd['match'](_0xbe59a1)&&!_0x1218fd['replace'](/^https?:\/\//,'')['match'](_0xbe59a1)):()=>!0x1;}function A(_0x25e509,_0x3fa3b6){return _0x529640(_0x25e509['target'])['includes'](_0x3fa3b6);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x2407e2(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x1aeb47,_0x442044,_0x524d5a){super(),this['_editor']=_0x1aeb47,this['_editing']=_0x442044,this['_dialog']=_0x1aeb47['plugins']['get'](_0xc05314),this['_api']=_0x442044['ctxElement']['getAPI'](),this['_type']=_0x524d5a,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:_0x54aa10,model:_0x44aac6}=this['_editor'],_0x257c80=_0x44aac6['document']['selection']['getSelectedElement'](),_0x5cbe40=_0x257c80&&(_0x257c80['is']('element','imageBlock')||_0x257c80['is']('element','imageInline'));this['_formView']=new x(_0x54aa10,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x425a6e,'title':_(_0x54aa10,this['_type'],_0x5cbe40?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xf22514['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x27f550=>!A(_0x27f550,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x38cce2}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2ba14c=>{const _0x324435=_0x38cce2['length'];for(const _0xaff3de of _0x38cce2){const _0x2ed86d=_0xaff3de===_0x38cce2[_0x324435-0x1],{cdnUrl:_0x49c02e,fileInfo:_0x40d744}=_0xaff3de;if(!_0x49c02e||!_0x40d744)continue;const {width:_0x4362ea,height:_0x5aa793}=_0x40d744['imageInfo'],_0x5b05d8=S(_0x49c02e,_0x4362ea,_0x5aa793),_0x31f97=C(_0x49c02e,_0x5b05d8['width']),_0xc6796c={'id':_0x40d744['uuid'],'type':'image','attributes':{'imageDimension':_0x5b05d8,..._0x31f97}};this['_insertAsset'](_0xc6796c,_0x2ed86d,_0x2ba14c);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2c9931=>{'idle'===_0x2c9931['detail']['status']&&!_0x2c9931['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x243cff,_0xd1eca8,_0x28b1c5){const _0x4c4f00=this['_editor']['model']['document']['selection'],_0x2bb23d=_0x4c4f00['getSelectedElement'](),_0x364026=!(!_0x2bb23d||!_0x2bb23d['is']('element','imageInline'));_0x28b1c5['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x243cff,_0x364026),_0xd1eca8||_0x28b1c5['setSelection'](_0x4c4f00['getLastPosition']());}['_insertImage'](_0x2a7707,_0x46cad4){const _0xbd3bee=this['_editor'],{imageDimension:_0x5a10de,imageFallbackUrl:_0x53be55,imageSources:_0x3cf880}=_0x2a7707['attributes'];_0xbd3bee['execute']('insertImage',{'imageType':_0x46cad4?'imageInline':null,'source':{'uploadcareImageId':_0x2a7707['id'],'src':_0x53be55,'sources':_0x3cf880,..._0x5a10de}});}}class w extends _0xf6b32{['_editing'];['_controller']=null;static get['requires'](){return[_0xc05314,o];}constructor(_0x9da53d){super(_0x9da53d),this['_editing']=_0x9da53d['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2bbed7){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x2bbed7);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x21fa40,..._0x1f9b61}){return _0x21a464(_0x21fa40,_0x1f9b61);}static['getInfo'](_0x37939e,_0x5d4f3e){return _0x4c6b27(_0x37939e,_0x5d4f3e);}}class f extends _0x34d38a{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x1baefc,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x50acc6=this['editor'];if(!!!_0x50acc6['config']['get']('uploadcare'))return;_0x50acc6['plugins']['get'](_0x1baefc)['createUploadAdapter']=_0x5dca42=>new k(_0x5dca42,_0x50acc6),_0x50acc6['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x421acf,{imageElement:_0x2efda0,data:_0x4af1e2})=>{_0x50acc6['model']['change'](_0x2d0ef1=>{_0x2d0ef1['setAttribute']('uploadcareImageId',_0x4af1e2['uploadcareImageId'],_0x2efda0);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x1bb569,_0x1bcb1a){this['loader']=_0x1bb569,this['editor']=_0x1bcb1a,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x52453b=await this['loader']['file'];return j['upload']({'file':_0x52453b,'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':_0x671de7=>{_0x671de7&&_0x671de7['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x671de7['value']);}})['then'](async _0xc6f34a=>{const {imageFallbackUrl:_0x11b150,imageSources:_0x2f0aad}=C(_0xc6f34a['cdnUrl'],_0xc6f34a['imageInfo']['width']);return{'uploadcareImageId':_0xc6f34a['uuid'],'default':_0x11b150,'sources':_0x2f0aad};})['catch'](()=>{const _0x3bb552=t('Cannot\x20upload\x20file:')+('\x20'+_0x52453b['name']+'.');return Promise['reject'](_0x3bb552);});}['abort'](){this['controller']['abort']();}}class o extends _0x34d38a{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0xc05314];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x5108b4){super(_0x5108b4),this['ucContextId']=_0x381c20();}['init'](){const _0x222fd8=this['editor'];_0x222fd8['commands']['add']('uploadcare',new w(_0x222fd8));}['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 _0x5a49f7=_0x33c98d['document']['querySelector']('input[uploadcare-file-input]');_0x5a49f7&&_0x5a49f7['remove']();}),async function(_0x10c138){const _0x128669=_0x5e7b8c([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x5bccba=0x535f8c3a,_0xe6309b=0x5358f1fa^_0x5bccba,_0x29cdae=window[_0x5e7b8c([0x44,0x61,0x74,0x65])][_0x5e7b8c([0x6e,0x6f,0x77])](),_0x449bbf=_0x10c138[_0x5e7b8c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3333a9=new window[(_0x5e7b8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x218162=>{_0x449bbf[_0x5e7b8c([0x6f,0x6e,0x63,0x65])](_0x5e7b8c([0x72,0x65,0x61,0x64,0x79]),_0x218162);}),_0x31d45f={[_0x5e7b8c([0x6b,0x74,0x79])]:_0x5e7b8c([0x45,0x43]),[_0x5e7b8c([0x75,0x73,0x65])]:_0x5e7b8c([0x73,0x69,0x67]),[_0x5e7b8c([0x63,0x72,0x76])]:_0x5e7b8c([0x50,0x2d,0x32,0x35,0x36]),[_0x5e7b8c([0x78])]:_0x5e7b8c([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]),[_0x5e7b8c([0x79])]:_0x5e7b8c([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]),[_0x5e7b8c([0x61,0x6c,0x67])]:_0x5e7b8c([0x45,0x53,0x32,0x35,0x36])},_0x6bb893=_0x449bbf[_0x5e7b8c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5e7b8c([0x67,0x65,0x74])](_0x5e7b8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x51eb35(){let _0x3866ca,_0x2a8e9e=null,_0x2c67d5=null;try{if(_0x6bb893==_0x5e7b8c([0x47,0x50,0x4c]))return _0x5e7b8c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3866ca=_0x28d07e(),!_0x3866ca)return _0x5e7b8c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3866ca[_0x5e7b8c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2c67d5=_0xb46ab8(_0x3866ca[_0x5e7b8c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3866ca[_0x5e7b8c([0x6a,0x74,0x69])])),await _0x2f5903()?_0x5cc93c()?_0x25ce14()?_0x5e7b8c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4bc324()?(_0x3866ca[_0x5e7b8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5e7b8c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2a8e9e=_0x4e98b3(_0x5e7b8c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3866ca[_0x5e7b8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5e7b8c([0x74,0x72,0x69,0x61,0x6c])&&(_0x2a8e9e=_0x4e98b3(_0x5e7b8c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x463a35()):_0x5e7b8c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5e7b8c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5e7b8c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5e7b8c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x25ce14(){const _0xdb244=[_0x5e7b8c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5e7b8c([0x74,0x72,0x69,0x61,0x6c])][_0x5e7b8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3866ca[_0x5e7b8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x29cdae/0x3e8:0xe10*_0xe6309b;return _0x3866ca[_0x5e7b8c([0x65,0x78,0x70])]<_0xdb244;}function _0x5cc93c(){const _0x561cfa=_0x3866ca[_0x5e7b8c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x561cfa&&(!!_0x561cfa[_0x5e7b8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e7b8c([0x2a]))||!!_0x561cfa[_0x5e7b8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e7b8c([0x55,0x50,0x4c,0x43])));}function _0x4bc324(){const _0x504f25=_0x3866ca[_0x5e7b8c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x504f25||0x0==_0x504f25[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3f4863}=new URL(window[_0x5e7b8c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x504f25[_0x5e7b8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f4863))return!0x0;const _0x4dfa3c=_0x3f4863[_0x5e7b8c([0x73,0x70,0x6c,0x69,0x74])](_0x5e7b8c([0x2e]));return _0x504f25[_0x5e7b8c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x126f8e=>_0x126f8e[_0x5e7b8c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e7b8c([0x2a])))[_0x5e7b8c([0x6d,0x61,0x70])](_0x577611=>_0x577611[_0x5e7b8c([0x73,0x70,0x6c,0x69,0x74])](_0x5e7b8c([0x2e])))[_0x5e7b8c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4c0a3a=>_0x4c0a3a[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4dfa3c[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5e7b8c([0x6d,0x61,0x70])](_0x5d9cce=>Array(_0x4dfa3c[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5d9cce[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5e7b8c([0x66,0x69,0x6c,0x6c])](_0x5d9cce[0x0]===_0x5e7b8c([0x2a])?_0x5e7b8c([0x2a]):'')[_0x5e7b8c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5d9cce))[_0x5e7b8c([0x73,0x6f,0x6d,0x65])](_0x5a018f=>_0x4dfa3c[_0x5e7b8c([0x65,0x76,0x65,0x72,0x79])]((_0x21bb94,_0x3069bc)=>_0x5a018f[_0x3069bc]===_0x21bb94||_0x5a018f[_0x3069bc]===_0x5e7b8c([0x2a])));}function _0x463a35(){return _0x2a8e9e&&_0x2c67d5?new window[(_0x5e7b8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5ec9e0,_0x2b9e3)=>{_0x2a8e9e[_0x5e7b8c([0x74,0x68,0x65,0x6e])](_0x5ec9e0,_0x2b9e3),_0x2c67d5[_0x5e7b8c([0x74,0x68,0x65,0x6e])](_0x2df851=>{_0x2df851!=_0x5e7b8c([0x56,0x61,0x6c,0x69,0x64])&&_0x5ec9e0(_0x2df851);},_0x2b9e3);}):_0x2a8e9e||_0x2c67d5||_0x5e7b8c([0x56,0x61,0x6c,0x69,0x64]);}}function _0xb46ab8(_0x559e9a,_0x2299bd){return new window[(_0x5e7b8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1541b7=>{if(_0x4897a8())return _0x1541b7(_0x5e7b8c([0x56,0x61,0x6c,0x69,0x64]));_0x4b0c10(),_0x449bbf[_0x5e7b8c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5e7b8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3277e9=!0x1;const _0x282d59=_0x381c20();function _0x3ec460(_0x4b8baa){return!!_0x4b8baa&&(typeof _0x4b8baa===_0x5e7b8c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4b8baa===_0x5e7b8c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4b8baa[_0x5e7b8c([0x74,0x68,0x65,0x6e])]===_0x5e7b8c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4b8baa[_0x5e7b8c([0x63,0x61,0x74,0x63,0x68])]===_0x5e7b8c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x33b4f2(_0x5d2cfc){_0x5ec1c5(_0x5d2cfc)[_0x5e7b8c([0x74,0x68,0x65,0x6e])](_0x10da9f=>{if(!_0x10da9f||_0x10da9f[_0x5e7b8c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5e7b8c([0x6f,0x6b]))return _0x5e7b8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x426c59(_0x269bc2(_0x282d59+_0x2299bd))!=_0x10da9f[_0x5e7b8c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5e7b8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5e7b8c([0x56,0x61,0x6c,0x69,0x64]);})[_0x5e7b8c([0x74,0x68,0x65,0x6e])](_0xdd5341=>(_0xf3bdcb(),_0xdd5341),()=>{const _0x136fe6=_0x3f20d7();return null==_0x136fe6?(_0xf3bdcb(),_0x5e7b8c([0x56,0x61,0x6c,0x69,0x64])):_0x5e7b8c(_0x29cdae-_0x136fe6>(0x7753083a^_0x5bccba)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5e7b8c([0x74,0x68,0x65,0x6e])](_0x1541b7)[_0x5e7b8c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1541b7(_0x5e7b8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x40c71c=0x536962ba^_0x5bccba;function _0xf3bdcb(){const _0x2f9ed3=_0x5e7b8c([0x6c,0x6c,0x63,0x74,0x2d])+_0x426c59(_0x269bc2(_0x559e9a)),_0x38574b=_0x42a776(_0x426c59(window[_0x5e7b8c([0x4d,0x61,0x74,0x68])][_0x5e7b8c([0x63,0x65,0x69,0x6c])](_0x29cdae/_0x40c71c)));window[_0x5e7b8c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5e7b8c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f9ed3,_0x38574b);}function _0x3f20d7(){const _0x40a127=_0x5e7b8c([0x6c,0x6c,0x63,0x74,0x2d])+_0x426c59(_0x269bc2(_0x559e9a)),_0x23650b=window[_0x5e7b8c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5e7b8c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x40a127);return _0x23650b?window[_0x5e7b8c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x42a776(_0x23650b),0x10)*_0x40c71c:null;}function _0x5ec1c5(_0x35c37f){return new window[(_0x5e7b8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d7f2d,_0x3af0ad)=>{_0x35c37f[_0x5e7b8c([0x74,0x68,0x65,0x6e])](_0x2d7f2d,_0x3af0ad),window[_0x5e7b8c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3af0ad,0x535e58fa^_0x5bccba);});}}_0x449bbf[_0x5e7b8c([0x6f,0x6e])](_0x5e7b8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x182332,_0x10a0f2)=>{if(_0x10a0f2[0x0]!=_0x559e9a)return _0x1541b7(_0x5e7b8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x10a0f2[0x1]={..._0x10a0f2[0x1],[_0x5e7b8c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x282d59};},{[_0x5e7b8c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5e7b8c([0x68,0x69,0x67,0x68])}),_0x449bbf[_0x5e7b8c([0x6f,0x6e])](_0x5e7b8c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x33747a=>{_0x3ec460(_0x33747a[_0x5e7b8c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3277e9=!0x0,_0x33b4f2(_0x33747a[_0x5e7b8c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5e7b8c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5e7b8c([0x6c,0x6f,0x77])}),_0x3333a9[_0x5e7b8c([0x74,0x68,0x65,0x6e])](()=>{_0x3277e9||_0x1541b7(_0x5e7b8c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4897a8(){return _0x449bbf[_0x5e7b8c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e7b8c([0x76,0x69,0x65,0x77])][_0x5e7b8c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5e7b8c([0x61,0x75,0x74,0x6f]);}function _0x4b0c10(){_0x449bbf[_0x5e7b8c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e7b8c([0x76,0x69,0x65,0x77])][_0x5e7b8c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5e7b8c([0x61,0x75,0x74,0x6f]);}}function _0x4e98b3(_0xac24f9){const _0x4b9826=[new window[(_0x5e7b8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x129cfb=>setTimeout(_0x129cfb,0x5356b2f6^_0x5bccba)),_0x3333a9[_0x5e7b8c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5e7b8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d1914=>{let _0x3ce509=0x0;_0x449bbf[_0x5e7b8c([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e7b8c([0x6f,0x6e])](_0x5e7b8c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xf72938,_0xd51cc6)=>{_0xd51cc6[0x0][_0x5e7b8c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3ce509++,_0x3ce509==(0x535f89d2^_0x5bccba)&&(_0x1d1914(),_0xf72938[_0x5e7b8c([0x6f,0x66,0x66])]());});}))];return window[_0x5e7b8c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5e7b8c([0x72,0x61,0x63,0x65])](_0x4b9826)[_0x5e7b8c([0x74,0x68,0x65,0x6e])](()=>_0xac24f9);}async function _0x1be227(){await _0x3333a9,_0x449bbf[_0x5e7b8c([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e7b8c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x7325ff,_0x449bbf[_0x5e7b8c([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e7b8c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x7325ff,_0x449bbf[_0x5e7b8c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5e7b8c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x596840(_0x3c097f){const _0x4ad178=_0xcfb74d();_0x449bbf[_0x4ad178]=_0x5e7b8c([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3c097f,_0x3c097f!=_0x5e7b8c([0x56,0x61,0x6c,0x69,0x64])&&_0x1be227();}function _0xcfb74d(){const _0x327ba8=window[_0x5e7b8c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5e7b8c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5e7b8c([0x6e,0x6f,0x77])]())[_0x5e7b8c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5e7b8c([0x2e]),'');let _0x5a3015=_0x5e7b8c([0x68]);for(let _0x50c186=0x0;_0x50c186<_0x327ba8[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x50c186+=0x2){let _0x242ccd=window[_0x5e7b8c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x327ba8[_0x5e7b8c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x50c186,_0x50c186+0x2));_0x242ccd>=_0x128669[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x242ccd-=_0x128669[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5a3015+=_0x128669[_0x242ccd];}return _0x5a3015;}function _0x28d07e(){const _0x417828=_0x6bb893[_0x5e7b8c([0x73,0x70,0x6c,0x69,0x74])](_0x5e7b8c([0x2e]));if(0x3!=_0x417828[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1b0b31(_0x417828[0x1]);function _0x1b0b31(_0x3fd690){const _0x163d25=_0xa402d9(_0x3fd690);return _0x163d25&&_0x20ba2b()?_0x163d25:null;function _0x20ba2b(){const _0x1b6bbe=_0x163d25[_0x5e7b8c([0x6a,0x74,0x69])],_0x167bf9=window[_0x5e7b8c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b6bbe[_0x5e7b8c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b6bbe[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x21c5be={..._0x163d25,[_0x5e7b8c([0x6a,0x74,0x69])]:_0x1b6bbe[_0x5e7b8c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b6bbe[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x21c5be[_0x5e7b8c([0x76,0x63])],_0x269bc2(_0x21c5be)==_0x167bf9;}}}async function _0x2f5903(){let _0x34eec4=!0x0;try{const _0x5859c0=_0x6bb893[_0x5e7b8c([0x73,0x70,0x6c,0x69,0x74])](_0x5e7b8c([0x2e])),[_0x278598,_0x26096e,_0x38ce3b]=_0x5859c0;return _0x3b7374(_0x278598),await _0x11b0bc(_0x278598,_0x26096e,_0x38ce3b),_0x34eec4;}catch{return!0x1;}function _0x3b7374(_0x58b893){const _0x539de8=_0xa402d9(_0x58b893);_0x539de8&&_0x539de8[_0x5e7b8c([0x61,0x6c,0x67])]==_0x5e7b8c([0x45,0x53,0x32,0x35,0x36])||(_0x34eec4=!0x1);}async function _0x11b0bc(_0x1d1250,_0x1f3dc6,_0x2ff776){const _0x4e6371=window[_0x5e7b8c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5e7b8c([0x66,0x72,0x6f,0x6d])](_0x4ed976(_0x2ff776),_0x3b8a52=>_0x3b8a52[_0x5e7b8c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x240beb=new window[(_0x5e7b8c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5e7b8c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1d1250+_0x5e7b8c([0x2e])+_0x1f3dc6),_0xcb0b06=window[_0x5e7b8c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5e7b8c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xcb0b06)return;const _0x3e0ee8=await _0xcb0b06[_0x5e7b8c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5e7b8c([0x6a,0x77,0x6b]),_0x31d45f,{[_0x5e7b8c([0x6e,0x61,0x6d,0x65])]:_0x5e7b8c([0x45,0x43,0x44,0x53,0x41]),[_0x5e7b8c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5e7b8c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5e7b8c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xcb0b06[_0x5e7b8c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5e7b8c([0x6e,0x61,0x6d,0x65])]:_0x5e7b8c([0x45,0x43,0x44,0x53,0x41]),[_0x5e7b8c([0x68,0x61,0x73,0x68])]:{[_0x5e7b8c([0x6e,0x61,0x6d,0x65])]:_0x5e7b8c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3e0ee8,_0x4e6371,_0x240beb)||(_0x34eec4=!0x1);}}function _0xa402d9(_0x328989){return _0x328989[_0x5e7b8c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5e7b8c([0x65,0x79]))?JSON[_0x5e7b8c([0x70,0x61,0x72,0x73,0x65])](_0x4ed976(_0x328989)):null;}function _0x4ed976(_0xb02a26){return window[_0x5e7b8c([0x61,0x74,0x6f,0x62])](_0xb02a26[_0x5e7b8c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5e7b8c([0x2b]))[_0x5e7b8c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5e7b8c([0x2f])));}function _0x269bc2(_0x2e4938){let _0xaec7f5=0x1505;function _0x132e19(_0x3534ed){for(let _0x3a6bd1=0x0;_0x3a6bd1<_0x3534ed[_0x5e7b8c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3a6bd1++){const _0x5d58fb=_0x3534ed[_0x5e7b8c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3a6bd1);_0xaec7f5=(_0xaec7f5<<0x5)+_0xaec7f5+_0x5d58fb,_0xaec7f5&=_0xaec7f5;}}function _0x257e93(_0x5e876f){Array[_0x5e7b8c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5e876f)?_0x5e876f[_0x5e7b8c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x257e93):_0x5e876f&&typeof _0x5e876f==_0x5e7b8c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5e7b8c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5e876f)[_0x5e7b8c([0x73,0x6f,0x72,0x74])]()[_0x5e7b8c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x45f84c,_0x8b649e])=>{_0x132e19(_0x45f84c),_0x257e93(_0x8b649e);}):_0x132e19(window[_0x5e7b8c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5e876f));}return _0x257e93(_0x2e4938),_0xaec7f5>>>0x0;}function _0x426c59(_0x4c11d7){return _0x4c11d7[_0x5e7b8c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5e7b8c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5e7b8c([0x30]));}function _0x42a776(_0x48e4a9){return _0x48e4a9[_0x5e7b8c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5e7b8c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5e7b8c([0x6a,0x6f,0x69,0x6e])]('');}function _0x7325ff(){}function _0x5e7b8c(_0x5b7595){return _0x5b7595['map'](_0x3d5eb8=>String['fromCharCode'](_0x3d5eb8))['join']('');}_0x596840(await _0x51eb35());}(this);}['_initSchema'](){const _0x1b09b1=this['editor']['model']['schema'];_0x1b09b1['isRegistered']('imageBlock')&&_0x1b09b1['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x1b09b1['isRegistered']('imageInline')&&_0x1b09b1['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x1f2b22=this['editor'];_0x1f2b22['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x1f2b22['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x10b217=>_0x10b217['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x489794=_0x1f2b22['commands']['get']('replaceImageSource');_0x489794&&this['listenTo'](_0x489794,'cleanupImage',(_0x3a1a4e,[_0x4c7d04,_0x4e7a93])=>{_0x4c7d04['removeAttribute']('uploadcareImageId',_0x4e7a93);});}['_initConfig'](){const _0x3d896b=this['editor']['config']['get']('uploadcare.uploader')||{},_0x17738a=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x532c90(_0x33c98d['document'],'uc-config',{..._0x3d896b,'pubkey':_0x17738a,'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']=_0xec156a=>{if('closeMax'==_0xec156a)return'#uc-icon-arrow-down';},_0x33c98d['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x532c90(_0x33c98d['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x33c98d['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x2af801=this['editor']['commands']['get']('insertImage');_0x2af801&&this['listenTo'](_0x2af801,'execute',()=>{const _0x1a6aa7=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1a6aa7&&_0x1a6aa7['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1a6aa7);});});const _0x182eec=this['editor']['commands']['get']('uploadcareImageReplace');_0x182eec&&this['listenTo'](_0x182eec,'execute',()=>{const _0x276c08=this['editor']['model']['document']['selection']['getSelectedElement']();_0x276c08&&_0x276c08['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x276c08);});});}}class tt extends _0x34d38a{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x68ec54){super(_0x68ec54),_0x68ec54['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x2c1e9b['defineComponents'](_0x2c1e9b),this['_defineLocale']();}['_defineLocale'](){const _0xfab74=this['editor']['config']['get']('uploadcare.locale'),_0x20fbad=this['editor']['locale']['contentLanguage'];_0xfab74&&_0x2c1e9b['defineLocale'](_0x20fbad,_0xfab74);}}class ii extends _0x3cbde3{constructor(_0x155314){super(_0x155314);const t=_0x155314['t'],_0x4423dd=this['bindTemplate'],_0x26a93a=new _0x3f2835();_0x26a93a['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':[_0x26a93a,{'text':_0x4423dd['to']('imageUploadProgress',_0x42fbf1=>t('Loading\x20image...')+'\x20('+(_0x42fbf1||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 _0x3cbde3{constructor(_0x42df08){super(_0x42df08);const t=_0x42df08['t'];this['set']('errorType',null);const _0x55f5d6=new _0x263a80(_0x42df08);_0x55f5d6['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x55f5d6['withText']=!0x0,_0x55f5d6['class']='ck-button-action',_0x55f5d6['on']('execute',()=>{this['fire']('retry');}),_0x55f5d6['bind']('isVisible')['to'](this,'errorType',_0x10f9b8=>'NotFound'!==_0x10f9b8);const _0x4a1103=new _0x3962fd();_0x4a1103['content']=_0x82326e,_0x4a1103['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x34dd35=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':[_0x4a1103,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x34dd35['to']('errorType',_0x20eee2=>t('NotFound'!==_0x20eee2?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x55f5d6]},{'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 _0x3cbde3{constructor(_0x1945e4,_0x40d407){super(_0x1945e4);const _0x55ba68=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x40d407,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x55ba68['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0xeae503,_0x5d0543,_0x16029a){super(_0xeae503),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0xeae503),this['_errorView']=new ti(_0xeae503),this['_editingView']=new ei(_0xeae503,_0x16029a),this['_focusableView']=new _0x3cbde3(_0xeae503),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5d0543),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'],_0x1008d0=>{this['_addUploadcareImageEditorListeners'](_0x1008d0);});}),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'](_0x479af2,_0x549228){const _0x30af7b='uc-cloud-image-editor',_0x555544=_0x479af2['querySelector'](_0x30af7b);if(_0x555544)return _0x549228(_0x555544);const _0x1534ff=new MutationObserver(_0x4a9d81=>{const _0x1a7c12=_0x4a9d81['filter'](_0x5aa595=>_0x5aa595['target']===_0x479af2&&_0x5aa595['addedNodes']['length']>0x0&&_0x5aa595['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x30af7b);_0x1a7c12['length']&&(_0x1534ff['disconnect'](),_0x549228(_0x1a7c12[0x0]['addedNodes'][0x0]));});_0x1534ff['observe'](_0x479af2,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x2766c2){_0x2766c2['addEventListener']('apply',_0x28ff42=>{this['fire']('apply',{'imageSrc':_0x28ff42['detail']['cdnUrl']});}),_0x2766c2['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x2407e2(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x3b355c,_0x18c1f0,_0x2e4a93){super(),this['_editor']=_0x3b355c,this['_dialog']=_0x18c1f0,this['_imageElement']=_0x2e4a93,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 _0x1ba6c3=this['_imageElement'],_0x3955aa=_0x1ba6c3['getAttribute']('uploadcareImageId'),_0x2ee0b=_0x1ba6c3['getAttribute']('src');if(_0x3955aa)await this['_loadImageInfo'](_0x3955aa,_0x2ee0b);else{if(this['_imageCache']['has'](_0x2ee0b)){const _0x13db75=this['_imageCache']['get'](_0x2ee0b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x13db75['url'],this['imageDimension']=_0x13db75['dimension'],this['imageId']=_0x13db75['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3a1a32}=this['_editor'],t=_0x3a1a32['t'],_0x151b10=new X(_0x3a1a32,this['imageStatus'],this['_attributes']);_0x151b10['bind']('status')['to'](this,'imageStatus'),_0x151b10['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x151b10['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x151b10['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x151b10,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3a9237,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x151b10,'position':_0xf22514['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x151b10['focus']();},'onHide':()=>{_0x151b10['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x59686f=>!A(_0x59686f,_0x151b10['element'])}});}['_loadImageInfo'](_0x203559,_0x4f52e6){return j['getInfo'](_0x203559,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0xd006c1=>{const {width:_0x4320b4,height:_0x1d7cac}=_0xd006c1['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4f52e6,this['imageDimension']={'width':_0x4320b4,'height':_0x1d7cac},this['imageId']=_0x203559;})['catch'](_0x5cc345=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5cc345['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x5a66bb,_0x5b5741){return this['_getImageAsFile'](_0x5a66bb)['then'](_0x4ce811=>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':_0x5b5741['signal'],'file':_0x4ce811,'onProgress':_0x40e56d=>{_0x40e56d&&_0x40e56d['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x40e56d['value']));}}))['then'](_0x4bc668=>{const {width:_0x296a1d,height:_0x14466b}=_0x4bc668['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4bc668['cdnUrl'],this['imageDimension']={'width':_0x296a1d,'height':_0x14466b},this['imageId']=_0x4bc668['uuid'],this['imageUploadProgress']=null;const _0x5764a5=_0x5a66bb['getAttribute']('src');this['_imageCache']['set'](_0x5764a5,{'id':_0x4bc668['uuid'],'url':_0x4bc668['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x39ca32=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x39ca32['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2f77d8,_0xad420a){_0x2f77d8['on']('apply',(_0x43f4bd,_0x390884)=>{this['_replaceImage'](_0xad420a,_0x390884['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2f77d8['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2f77d8['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x3350f7,_0x3aff84,_0x408585){const _0x2a62ed=this['_editor'],{width:_0x2a945e,height:_0x1b7e07}=S(_0x3aff84,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x24a83d,imageSources:_0xaf112}=C(_0x3aff84,_0x2a945e);_0x2a62ed['model']['change'](_0x518dad=>{if('$graveyard'===_0x3350f7['root']['rootName']){_0x2a62ed['execute']('insertImage',{'imageType':_0x3350f7['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x3350f7['getAttributes']()),'uploadcareImageId':_0x408585,'src':_0x24a83d,'sources':_0xaf112,'width':_0x2a945e,'height':_0x1b7e07}});const _0x51fcd3=_0x3350f7['getChildren']();_0x3350f7=_0x2a62ed['model']['document']['selection']['getSelectedElement']();for(const _0x26b868 of _0x51fcd3)_0x518dad['append'](_0x518dad['cloneElement'](_0x26b868),_0x3350f7);}else _0x518dad['setSelection'](_0x3350f7,'on'),_0x2a62ed['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x3350f7['getAttributes']()),'uploadcareImageId':_0x408585,'src':_0x24a83d,'sources':_0xaf112,'width':_0x2a945e,'height':_0x1b7e07},_0x3350f7);_0x518dad['setSelection'](_0x3350f7,'on');});}async['_getImageAsFile'](_0x53630b){const _0xb1e11=_0x33c98d['window'],_0xede9a6=_0x33c98d['document']['location']['href'],_0x41861d=new _0xb1e11['URL'](_0x53630b['getAttribute']('src'),_0xede9a6);if('data:'===_0x41861d['protocol']){const _0x3cf1bc=_0x41861d['href']['split'](','),_0x1c771f=_0x3cf1bc[0x0]['match'](/:(.*?);/)[0x1],_0x1ee858=_0x1c771f['split']('/')[0x1],_0x278d13=_0xb1e11['atob'](_0x3cf1bc[_0x3cf1bc['length']-0x1]);let _0x1038d5=_0x278d13['length'];const _0x25809d=new _0xb1e11['Uint8Array'](_0x1038d5);for(;_0x1038d5--;)_0x25809d[_0x1038d5]=_0x278d13['charCodeAt'](_0x1038d5);return new _0xb1e11['File']([_0x25809d],'image.'+_0x1ee858,{'type':_0x1c771f});}const _0x4f61c6=_0x41861d['href']['split']('/'),_0x18b25a=_0x4f61c6[_0x4f61c6['length']-0x1],_0x5a446f=_0x18b25a['split']('.')[0x1];return _0xb1e11['fetch'](_0x41861d['href'])['then'](_0x2d8241=>_0x2d8241['clone']()['blob']())['then'](_0x52d2ad=>new _0xb1e11['File']([_0x52d2ad],_0x18b25a,{'type':'image/'+_0x5a446f}));}}class Q extends _0xf6b32{['imageEditController'];static get['requires'](){return[_0xc05314];}['_isEditable'];constructor(_0x1273ae){super(_0x1273ae),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x3eb04c){const _0x290a50=z(_0x3eb04c);return _0x26cb88=>!(!_0x26cb88||!_0x26cb88['is']('element','imageBlock')&&!_0x26cb88['is']('element','imageInline'))&&(!!_0x26cb88['hasAttribute']('uploadcareImageId')||!!_0x26cb88['hasAttribute']('src')&&_0x290a50(_0x26cb88['getAttribute']('src')));}(_0x1273ae['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x1af329=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x1af329);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x503e35=this['editor']['model']['document']['selection']['getSelectedElement']();_0x503e35&&(_0x503e35['is']('element','imageBlock')||_0x503e35['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0xc05314),_0x503e35),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0xf6b32{['refresh'](){const _0x1db32e=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x1db32e&&(_0x1db32e['is']('element','imageBlock')||_0x1db32e['is']('element','imageInline')));}['execute'](_0x53486c){const _0x2dd7dc=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x56da3c=>{_0x56da3c['setAttributes'](_0x53486c,_0x2dd7dc),_0x56da3c['removeAttribute']('srcset',_0x2dd7dc),_0x56da3c['removeAttribute']('sizes',_0x2dd7dc);});}}class m extends _0x34d38a{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x1c3bce,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5d348d}=this;_0x5d348d['commands']['add']('uploadcareImageEdit',new Q(_0x5d348d)),_0x5d348d['commands']['add']('uploadcareImageReplace',new V(_0x5d348d));}}class g extends _0x34d38a{['_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 _0x34e4c7=this['editor'];_0x34e4c7['ui']['componentFactory']['add']('uploadcareImageEdit',_0x24645b=>{const _0x41abd1=_0x34e4c7['commands']['get']('uploadcareImageEdit'),_0x2e3f9c=new _0x263a80(_0x24645b),t=_0x24645b['t'];return _0x2e3f9c['set']({'icon':_0x3a9237,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x2e3f9c['bind']('isEnabled')['to'](_0x41abd1),_0x2e3f9c['bind']('isOn')['to'](_0x41abd1,'isActive'),this['listenTo'](_0x2e3f9c,'execute',()=>{_0x34e4c7['execute']('uploadcareImageEdit'),_0x34e4c7['editing']['view']['focus']();}),_0x2e3f9c;}),this['_initConfig']();}['_initConfig'](){const _0x2f6a53=_0x532c90(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x2f6a53),this['listenTo'](this['editor'],'destroy',()=>{_0x2f6a53['remove']();});}}class et extends _0x34d38a{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x1eb42f,Command as _0x1b6628}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x311341,IconGooglePhotos as _0x3757d8,IconGoogleDrive as _0x4ccfa7,IconFacebook as _0x4e9d98,IconDropbox as _0x1980a9,IconUploadcareLink as _0x43a45c,IconUploadcareImageUpload as _0x305e34,IconError as _0xf4a164,IconUploadcareImageEdit as _0x2b5f05}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x1b73cf,MenuBarMenuListItemButtonView as _0xb62d23,View as _0x330511,FocusCycler as _0x216d75,Dialog as _0x20eb2c,DialogViewPosition as _0x2915d5,SpinnerView as _0x320917,IconView as _0x50fb93,Notification as _0x16ed00}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x3794c3,DomEmitterMixin as _0x4ceaca,global as _0x57318e,getAncestors as _0x15f677,ObservableMixin as _0x10cec6,uid as _0x3d9af7,createElement as _0x3a69f0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2f0a80}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x4c6983,info as _0x56a9cc}from'@uploadcare/upload-client';import*as _0x2dab71 from'@uploadcare/file-uploader';var i=function(_0x59bc8f){return _0x59bc8f['Local']='local',_0x59bc8f['URL']='url',_0x59bc8f['Dropbox']='dropbox',_0x59bc8f['GDrive']='gdrive',_0x59bc8f['Facebook']='facebook',_0x59bc8f['GPhotos']='gphotos',_0x59bc8f['OneDrive']='onedrive',_0x59bc8f;}({});function _(_0x264cb4,_0x54f072,_0x4ca5c0){const t=_0x264cb4['t'],_0x2d46c9=_0x264cb4['t'];switch(_0x54f072){case i['Local']:return{'text':_0x2d46c9('Insert'===_0x4ca5c0?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x2d46c9('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x4ca5c0?_0x2d46c9('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x2d46c9('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x4ca5c0?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x4ca5c0?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x4ca5c0?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x4ca5c0?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x4ca5c0?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x54f072;}}class e extends _0x1eb42f{['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 _0x2e14b1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x56fa2c;for(const _0x2859ea in _0x2e14b1){const _0x334b04=_0x2859ea,_0x1361a1=_0x2e14b1[_0x334b04];if('uploadcareLicenseKeyValid'==_0x1361a1||'uploadcareLicenseKeyInvalid'==_0x1361a1||'uploadcareLicenseKeyExpired'==_0x1361a1||'uploadcareLicenseKeyDomainLimit'==_0x1361a1||'uploadcareLicenseKeyNotAllowed'==_0x1361a1||'uploadcareLicenseKeyEvaluationLimit'==_0x1361a1||'uploadcareLicenseKeyTrialLimit'==_0x1361a1||'uploadcareLicenseKeyUsageLimit'==_0x1361a1){delete _0x2e14b1[_0x334b04],_0x56fa2c=_0x1361a1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x56fa2c&&_0x2e14b1['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x56fa2c&&_0x2e14b1['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x56fa2c&&_0x2e14b1['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x56fa2c&&_0x2e14b1['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x56fa2c&&_0x2e14b1['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x56fa2c&&_0x2e14b1['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x56fa2c&&_0x2e14b1['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x52d4fe}=this,_0x37e39d=_0x52d4fe['commands']['get']('uploadcare');if(!_0x37e39d)return;const _0x354efc=this['_normalizeConfigSourceList'](_0x52d4fe['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x28401e,_0x1e1960)=>{const _0x4d2075=this['_getIntegrationKey'](_0x1e1960['type']);return _0x28401e[_0x4d2075]||(_0x28401e[_0x4d2075]=[]),_0x28401e[_0x4d2075]['push'](_0x1e1960),_0x28401e;},{});_0x52d4fe['plugins']['has']('ImageInsertUI')&&_0x52d4fe['commands']['get']('uploadcare')&&Object['entries'](_0x354efc)['forEach'](([_0x176fc7,_0x35e9ff])=>{_0x52d4fe['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x176fc7,'observable':()=>_0x37e39d,'buttonViewCreator':()=>this['_createToolbarButton'](_0x35e9ff),'formViewCreator':()=>this['_createDropdownButtons'](_0x35e9ff),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x35e9ff),'override':'assetManager'!==_0x176fc7});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x4bc6ef){const {locale:_0xdece64}=this['editor'];return _0x4bc6ef['map'](_0x5ef73f=>{const _0x42459d=_(_0xdece64,_0x5ef73f,'Insert');switch(_0x5ef73f){case i['Local']:return{'icon':_0x305e34,'type':i['Local'],..._0x42459d};case i['URL']:return{'icon':_0x43a45c,'type':i['URL'],..._0x42459d};case i['Dropbox']:return{'icon':_0x1980a9,'type':i['Dropbox'],..._0x42459d};case i['Facebook']:return{'icon':_0x4e9d98,'type':i['Facebook'],..._0x42459d};case i['GDrive']:return{'icon':_0x4ccfa7,'type':i['GDrive'],..._0x42459d};case i['GPhotos']:return{'icon':_0x3757d8,'type':i['GPhotos'],..._0x42459d};case i['OneDrive']:return{'icon':_0x311341,'type':i['OneDrive'],..._0x42459d};}});}['_getIntegrationKey'](_0x54120e){switch(_0x54120e){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x33710d,_0x48e0cd){const _0x2a68b0=this['editor'],_0x325e8b=new _0x33710d(_0x2a68b0['locale']),_0x4b138e=_0x2a68b0['commands']['get']('uploadcare');return _0x325e8b['bind']('isEnabled')['to'](_0x4b138e),_0x325e8b['on']('execute',()=>{_0x4b138e['execute'](_0x48e0cd);}),_0x325e8b;}['_createToolbarButton'](_0x415451){const {locale:_0x33dfd2}=this['editor'],_0x568603=this['editor']['plugins']['get']('ImageInsertUI'),_0x35806e=_0x415451[0x0],_0x373fe7=this['_createButton'](_0x1b73cf,_0x35806e['type']);return _0x373fe7['icon']=_0x35806e['icon'],_0x373fe7['bind']('label')['to'](_0x568603,'isImageSelected',_0x1b2611=>_(_0x33dfd2,_0x35806e['type'],_0x1b2611?'Replace':'Insert')['text']),_0x373fe7['tooltip']=!0x0,_0x373fe7;}['_createDropdownButtons'](_0x473456){const {locale:_0x56d7e2}=this['editor'],_0x2acbbb=this['editor']['plugins']['get']('ImageInsertUI');return _0x473456['map'](_0x38d843=>{const _0x5a6377=this['_createButton'](_0x1b73cf,_0x38d843['type']);return _0x5a6377['withText']=!0x0,_0x5a6377['icon']=_0x38d843['icon'],_0x5a6377['bind']('label')['to'](_0x2acbbb,'isImageSelected',_0x4c0799=>_(_0x56d7e2,_0x38d843['type'],_0x4c0799?'Replace':'Insert')['text']),_0x5a6377;});}['_createMenuBarButtons'](_0xd774f3){return _0xd774f3['map'](_0x161b21=>{const _0x3776dd=this['_createButton'](_0xb62d23,_0x161b21['type']);return _0x3776dd['icon']=_0x161b21['icon'],_0x3776dd['label']=_0x161b21['shortText'],_0x3776dd;});}}class F extends _0x330511{['focusTracker'];['focusCycler'];constructor(_0x2b7148){super(_0x2b7148),this['focusTracker']=new _0x3794c3(),this['focusCycler']=new _0x216d75({'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(_0x9a9302,_0x3c7eec){super(_0x9a9302),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-'+_0x3c7eec}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x38e586,_0x54dd20){const _0x4eef9e=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x12e5e8=>_0x12e5e8<=_0x54dd20)['map'](_0x2d67df=>_0x38e586['replace'](/\/$/,'')+'/-/resize/'+_0x2d67df+'x/\x20'+_0x2d67df+'w');return{'imageFallbackUrl':_0x38e586,'imageSources':[{'srcset':_0x4eef9e['join'](',\x20'),'sizes':'(max-width:\x20'+_0x54dd20+'px)\x20100vw,\x20'+_0x54dd20+'px','type':'image/webp'}]};}function S(_0x3faaa8,_0x311b0f,_0x540c2f){const _0x5da988=_0x3faaa8['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x5da988?parseInt(_0x5da988[0x1],0xa):_0x311b0f,'height':_0x5da988?parseInt(_0x5da988[0x2],0xa):_0x540c2f};}function p(_0x3fa2d2,_0x5f358b){const _0x8ce34c=new(_0x4ceaca())(),_0x21eab7=_0x3fa2d2['plugins']['get']('ImageUtils'),_0x4f38c7=_0x3fa2d2['editing']['mapper']['toViewElement'](_0x5f358b),_0x4530d2=_0x21eab7['findViewImgElement'](_0x4f38c7),_0x185f85=_0x3fa2d2['editing']['view']['domConverter']['viewToDom'](_0x4530d2),_0x52aed5=_0x5f358b['getAttribute']('width'),_0xb861ab=_0x5f358b['getAttribute']('height'),_0xf1ba92='image-processing';_0x3fa2d2['editing']['view']['change'](_0x482689=>{_0x482689['addClass'](_0xf1ba92,_0x4f38c7),_0x482689['setStyle']('aspect-ratio',_0x52aed5+'/'+_0xb861ab,_0x4530d2);}),_0x8ce34c['listenTo'](_0x185f85,'load',()=>{_0x8ce34c['stopListening'](_0x185f85,'load'),_0x3fa2d2['editing']['view']['change'](_0x21507a=>{_0x21507a['removeClass'](_0xf1ba92,_0x4f38c7),_0x21507a['removeStyle']('aspect-ratio',_0x4530d2);});});}function G(_0x219ad4){if(Array['isArray'](_0x219ad4)){const _0x18b8d8=_0x219ad4['map'](G);return _0x44af1f=>_0x18b8d8['some'](_0x2b7c6f=>_0x2b7c6f(_0x44af1f));}if('origin'==_0x219ad4){const _0x3330a6=_0x57318e['window']['location']['origin'];return _0x426379=>new URL(_0x426379,_0x57318e['document']['baseURI'])['origin']==_0x3330a6;}return'function'==typeof _0x219ad4?_0x219ad4:_0x219ad4 instanceof RegExp?_0x46f64c=>!(!_0x46f64c['match'](_0x219ad4)&&!_0x46f64c['replace'](/^https?:\/\//,'')['match'](_0x219ad4)):()=>!0x1;}function A(_0x4a533a,_0x14df0a){return _0x15f677(_0x4a533a['target'])['includes'](_0x14df0a);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x10cec6(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x1f615e,_0x2cb7e9,_0x8d741){super(),this['_editor']=_0x1f615e,this['_editing']=_0x2cb7e9,this['_dialog']=_0x1f615e['plugins']['get'](_0x20eb2c),this['_api']=_0x2cb7e9['ctxElement']['getAPI'](),this['_type']=_0x8d741,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:_0x5f17ec,model:_0x446a3a}=this['_editor'],_0xed2c1e=_0x446a3a['document']['selection']['getSelectedElement'](),_0x441da7=_0xed2c1e&&(_0xed2c1e['is']('element','imageBlock')||_0xed2c1e['is']('element','imageInline'));this['_formView']=new x(_0x5f17ec,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x305e34,'title':_(_0x5f17ec,this['_type'],_0x441da7?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x2915d5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x448292=>!A(_0x448292,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x221999}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x415ab1=>{const _0x2817da=_0x221999['length'];for(const _0x2d39fc of _0x221999){const _0x362b3d=_0x2d39fc===_0x221999[_0x2817da-0x1],{cdnUrl:_0x798aed,fileInfo:_0x2ff1dc}=_0x2d39fc;if(!_0x798aed||!_0x2ff1dc)continue;const {width:_0x5dd0dd,height:_0x574ea5}=_0x2ff1dc['imageInfo'],_0x1c60de=S(_0x798aed,_0x5dd0dd,_0x574ea5),_0x135c3e=C(_0x798aed,_0x1c60de['width']),_0x1a6199={'id':_0x2ff1dc['uuid'],'type':'image','attributes':{'imageDimension':_0x1c60de,..._0x135c3e}};this['_insertAsset'](_0x1a6199,_0x362b3d,_0x415ab1);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x41c351=>{'idle'===_0x41c351['detail']['status']&&!_0x41c351['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x21fc85,_0x28c35d,_0x1e0ec5){const _0x704e6d=this['_editor']['model']['document']['selection'],_0x5edd76=_0x704e6d['getSelectedElement'](),_0x50af4e=!(!_0x5edd76||!_0x5edd76['is']('element','imageInline'));_0x1e0ec5['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x21fc85,_0x50af4e),_0x28c35d||_0x1e0ec5['setSelection'](_0x704e6d['getLastPosition']());}['_insertImage'](_0x216bc6,_0x3a231e){const _0x5c4134=this['_editor'],{imageDimension:_0x3f0f3a,imageFallbackUrl:_0x311b83,imageSources:_0x541ef3}=_0x216bc6['attributes'];_0x5c4134['execute']('insertImage',{'imageType':_0x3a231e?'imageInline':null,'source':{'uploadcareImageId':_0x216bc6['id'],'src':_0x311b83,'sources':_0x541ef3,..._0x3f0f3a}});}}class w extends _0x1b6628{['_editing'];['_controller']=null;static get['requires'](){return[_0x20eb2c,o];}constructor(_0x3fbb20){super(_0x3fbb20),this['_editing']=_0x3fbb20['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2fadba){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x2fadba);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x463aaf,..._0x2c4fc3}){return _0x4c6983(_0x463aaf,_0x2c4fc3);}static['getInfo'](_0x5b1011,_0xcccb5d){return _0x56a9cc(_0x5b1011,_0xcccb5d);}}class f extends _0x1eb42f{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2f0a80,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x3770b0=this['editor'];if(!!!_0x3770b0['config']['get']('uploadcare'))return;_0x3770b0['plugins']['get'](_0x2f0a80)['createUploadAdapter']=_0x256eb8=>new k(_0x256eb8,_0x3770b0),_0x3770b0['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x2389e4,{imageElement:_0x25696c,data:_0x4b6f38})=>{_0x3770b0['model']['change'](_0x35f9e6=>{_0x35f9e6['setAttribute']('uploadcareImageId',_0x4b6f38['uploadcareImageId'],_0x25696c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x40ea5b,_0x9abb3){this['loader']=_0x40ea5b,this['editor']=_0x9abb3,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x5dee3e=await this['loader']['file'];return j['upload']({'file':_0x5dee3e,'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':_0x4b81ef=>{_0x4b81ef&&_0x4b81ef['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x4b81ef['value']);}})['then'](async _0x1709ac=>{const {imageFallbackUrl:_0x10e5de,imageSources:_0x2a044d}=C(_0x1709ac['cdnUrl'],_0x1709ac['imageInfo']['width']);return{'uploadcareImageId':_0x1709ac['uuid'],'default':_0x10e5de,'sources':_0x2a044d};})['catch'](()=>{const _0x55d9e4=t('Cannot\x20upload\x20file:')+('\x20'+_0x5dee3e['name']+'.');return Promise['reject'](_0x55d9e4);});}['abort'](){this['controller']['abort']();}}class o extends _0x1eb42f{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x20eb2c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x489d94){super(_0x489d94),this['ucContextId']=_0x3d9af7();}['init'](){const _0x51b95a=this['editor'];_0x51b95a['commands']['add']('uploadcare',new w(_0x51b95a));}['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 _0x35346e=_0x57318e['document']['querySelector']('input[uploadcare-file-input]');_0x35346e&&_0x35346e['remove']();}),async function(_0x10b974){const _0x31552c=_0x3e0e4c([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x227379=0x535f8c3a,_0x155cfd=0x5358f1e2^_0x227379,_0x11069a=window[_0x3e0e4c([0x44,0x61,0x74,0x65])][_0x3e0e4c([0x6e,0x6f,0x77])](),_0x2756ac=_0x10b974[_0x3e0e4c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3af322=new window[(_0x3e0e4c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e1b86=>{_0x2756ac[_0x3e0e4c([0x6f,0x6e,0x63,0x65])](_0x3e0e4c([0x72,0x65,0x61,0x64,0x79]),_0x4e1b86);}),_0x5d7148={[_0x3e0e4c([0x6b,0x74,0x79])]:_0x3e0e4c([0x45,0x43]),[_0x3e0e4c([0x75,0x73,0x65])]:_0x3e0e4c([0x73,0x69,0x67]),[_0x3e0e4c([0x63,0x72,0x76])]:_0x3e0e4c([0x50,0x2d,0x32,0x35,0x36]),[_0x3e0e4c([0x78])]:_0x3e0e4c([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]),[_0x3e0e4c([0x79])]:_0x3e0e4c([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]),[_0x3e0e4c([0x61,0x6c,0x67])]:_0x3e0e4c([0x45,0x53,0x32,0x35,0x36])},_0x29166a=_0x2756ac[_0x3e0e4c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3e0e4c([0x67,0x65,0x74])](_0x3e0e4c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3b6bde(){let _0x30452c,_0xade206=null,_0x2a8497=null;try{if(_0x29166a==_0x3e0e4c([0x47,0x50,0x4c]))return _0x3e0e4c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x30452c=_0x1d56b0(),!_0x30452c)return _0x3e0e4c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x30452c[_0x3e0e4c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2a8497=_0x385cf0(_0x30452c[_0x3e0e4c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x30452c[_0x3e0e4c([0x6a,0x74,0x69])])),await _0x11bf42()?_0x2ae1c7()?_0x5c1e73()?_0x3e0e4c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4cc64a()?(_0x30452c[_0x3e0e4c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3e0e4c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xade206=_0x27ab21(_0x3e0e4c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x30452c[_0x3e0e4c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3e0e4c([0x74,0x72,0x69,0x61,0x6c])&&(_0xade206=_0x27ab21(_0x3e0e4c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x33e558()):_0x3e0e4c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3e0e4c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3e0e4c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3e0e4c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5c1e73(){const _0x3e82c4=[_0x3e0e4c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3e0e4c([0x74,0x72,0x69,0x61,0x6c])][_0x3e0e4c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x30452c[_0x3e0e4c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x11069a/0x3e8:0xe10*_0x155cfd;return _0x30452c[_0x3e0e4c([0x65,0x78,0x70])]<_0x3e82c4;}function _0x2ae1c7(){const _0x308175=_0x30452c[_0x3e0e4c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x308175&&(!!_0x308175[_0x3e0e4c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3e0e4c([0x2a]))||!!_0x308175[_0x3e0e4c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3e0e4c([0x55,0x50,0x4c,0x43])));}function _0x4cc64a(){const _0x3f14c6=_0x30452c[_0x3e0e4c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3f14c6||0x0==_0x3f14c6[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3c14c5}=new URL(window[_0x3e0e4c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3f14c6[_0x3e0e4c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c14c5))return!0x0;const _0x9df8eb=_0x3c14c5[_0x3e0e4c([0x73,0x70,0x6c,0x69,0x74])](_0x3e0e4c([0x2e]));return _0x3f14c6[_0x3e0e4c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e81ab=>_0x1e81ab[_0x3e0e4c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3e0e4c([0x2a])))[_0x3e0e4c([0x6d,0x61,0x70])](_0x434386=>_0x434386[_0x3e0e4c([0x73,0x70,0x6c,0x69,0x74])](_0x3e0e4c([0x2e])))[_0x3e0e4c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xa5e813=>_0xa5e813[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x9df8eb[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3e0e4c([0x6d,0x61,0x70])](_0x18d20e=>Array(_0x9df8eb[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x18d20e[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3e0e4c([0x66,0x69,0x6c,0x6c])](_0x18d20e[0x0]===_0x3e0e4c([0x2a])?_0x3e0e4c([0x2a]):'')[_0x3e0e4c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x18d20e))[_0x3e0e4c([0x73,0x6f,0x6d,0x65])](_0x495fd9=>_0x9df8eb[_0x3e0e4c([0x65,0x76,0x65,0x72,0x79])]((_0x32c5a5,_0x39ae5c)=>_0x495fd9[_0x39ae5c]===_0x32c5a5||_0x495fd9[_0x39ae5c]===_0x3e0e4c([0x2a])));}function _0x33e558(){return _0xade206&&_0x2a8497?new window[(_0x3e0e4c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x424122,_0x552f4a)=>{_0xade206[_0x3e0e4c([0x74,0x68,0x65,0x6e])](_0x424122,_0x552f4a),_0x2a8497[_0x3e0e4c([0x74,0x68,0x65,0x6e])](_0xc1da62=>{_0xc1da62!=_0x3e0e4c([0x56,0x61,0x6c,0x69,0x64])&&_0x424122(_0xc1da62);},_0x552f4a);}):_0xade206||_0x2a8497||_0x3e0e4c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x385cf0(_0x1ed73e,_0x17a49c){return new window[(_0x3e0e4c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2049b0=>{if(_0x423897())return _0x2049b0(_0x3e0e4c([0x56,0x61,0x6c,0x69,0x64]));_0x37563(),_0x2756ac[_0x3e0e4c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3e0e4c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x50d8a1=!0x1;const _0x136b7b=_0x3d9af7();function _0x401090(_0x3b4ecb){return!!_0x3b4ecb&&(typeof _0x3b4ecb===_0x3e0e4c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3b4ecb===_0x3e0e4c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3b4ecb[_0x3e0e4c([0x74,0x68,0x65,0x6e])]===_0x3e0e4c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3b4ecb[_0x3e0e4c([0x63,0x61,0x74,0x63,0x68])]===_0x3e0e4c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x46fdca(_0x347873){_0x4a5978(_0x347873)[_0x3e0e4c([0x74,0x68,0x65,0x6e])](_0x559b5b=>{if(!_0x559b5b||_0x559b5b[_0x3e0e4c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3e0e4c([0x6f,0x6b]))return _0x3e0e4c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4ffdac(_0xa23695(_0x136b7b+_0x17a49c))!=_0x559b5b[_0x3e0e4c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3e0e4c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3e0e4c([0x56,0x61,0x6c,0x69,0x64]);})[_0x3e0e4c([0x74,0x68,0x65,0x6e])](_0x53b6b5=>(_0x6b04c(),_0x53b6b5),()=>{const _0x356229=_0x55fce4();return null==_0x356229?(_0x6b04c(),_0x3e0e4c([0x56,0x61,0x6c,0x69,0x64])):_0x3e0e4c(_0x11069a-_0x356229>(0x7753083a^_0x227379)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3e0e4c([0x74,0x68,0x65,0x6e])](_0x2049b0)[_0x3e0e4c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2049b0(_0x3e0e4c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x412fa9=0x536962ba^_0x227379;function _0x6b04c(){const _0x14810f=_0x3e0e4c([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ffdac(_0xa23695(_0x1ed73e)),_0x8b7683=_0x83358f(_0x4ffdac(window[_0x3e0e4c([0x4d,0x61,0x74,0x68])][_0x3e0e4c([0x63,0x65,0x69,0x6c])](_0x11069a/_0x412fa9)));window[_0x3e0e4c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3e0e4c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x14810f,_0x8b7683);}function _0x55fce4(){const _0x22ca6b=_0x3e0e4c([0x6c,0x6c,0x63,0x74,0x2d])+_0x4ffdac(_0xa23695(_0x1ed73e)),_0x17c8ff=window[_0x3e0e4c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3e0e4c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x22ca6b);return _0x17c8ff?window[_0x3e0e4c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x83358f(_0x17c8ff),0x10)*_0x412fa9:null;}function _0x4a5978(_0x2da891){return new window[(_0x3e0e4c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x49fb5b,_0x456f7c)=>{_0x2da891[_0x3e0e4c([0x74,0x68,0x65,0x6e])](_0x49fb5b,_0x456f7c),window[_0x3e0e4c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x456f7c,0x535e58fa^_0x227379);});}}_0x2756ac[_0x3e0e4c([0x6f,0x6e])](_0x3e0e4c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3b980b,_0x5a7a17)=>{if(_0x5a7a17[0x0]!=_0x1ed73e)return _0x2049b0(_0x3e0e4c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5a7a17[0x1]={..._0x5a7a17[0x1],[_0x3e0e4c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x136b7b};},{[_0x3e0e4c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3e0e4c([0x68,0x69,0x67,0x68])}),_0x2756ac[_0x3e0e4c([0x6f,0x6e])](_0x3e0e4c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1a389c=>{_0x401090(_0x1a389c[_0x3e0e4c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x50d8a1=!0x0,_0x46fdca(_0x1a389c[_0x3e0e4c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3e0e4c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3e0e4c([0x6c,0x6f,0x77])}),_0x3af322[_0x3e0e4c([0x74,0x68,0x65,0x6e])](()=>{_0x50d8a1||_0x2049b0(_0x3e0e4c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x423897(){return _0x2756ac[_0x3e0e4c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3e0e4c([0x76,0x69,0x65,0x77])][_0x3e0e4c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3e0e4c([0x61,0x75,0x74,0x6f]);}function _0x37563(){_0x2756ac[_0x3e0e4c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3e0e4c([0x76,0x69,0x65,0x77])][_0x3e0e4c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3e0e4c([0x61,0x75,0x74,0x6f]);}}function _0x27ab21(_0x5cac3b){const _0x320d70=[new window[(_0x3e0e4c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x129493=>setTimeout(_0x129493,0x5356b2f6^_0x227379)),_0x3af322[_0x3e0e4c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3e0e4c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4454b7=>{let _0x393f4f=0x0;_0x2756ac[_0x3e0e4c([0x6d,0x6f,0x64,0x65,0x6c])][_0x3e0e4c([0x6f,0x6e])](_0x3e0e4c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x229144,_0x40d74d)=>{_0x40d74d[0x0][_0x3e0e4c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x393f4f++,_0x393f4f==(0x535f89d2^_0x227379)&&(_0x4454b7(),_0x229144[_0x3e0e4c([0x6f,0x66,0x66])]());});}))];return window[_0x3e0e4c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3e0e4c([0x72,0x61,0x63,0x65])](_0x320d70)[_0x3e0e4c([0x74,0x68,0x65,0x6e])](()=>_0x5cac3b);}async function _0xf4ba9e(){await _0x3af322,_0x2756ac[_0x3e0e4c([0x6d,0x6f,0x64,0x65,0x6c])][_0x3e0e4c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4ce51d,_0x2756ac[_0x3e0e4c([0x6d,0x6f,0x64,0x65,0x6c])][_0x3e0e4c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4ce51d,_0x2756ac[_0x3e0e4c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3e0e4c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1bd750(_0x3b3751){const _0x816670=_0x4e5f11();_0x2756ac[_0x816670]=_0x3e0e4c([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3b3751,_0x3b3751!=_0x3e0e4c([0x56,0x61,0x6c,0x69,0x64])&&_0xf4ba9e();}function _0x4e5f11(){const _0x165215=window[_0x3e0e4c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3e0e4c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3e0e4c([0x6e,0x6f,0x77])]())[_0x3e0e4c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3e0e4c([0x2e]),'');let _0x57cc0d=_0x3e0e4c([0x68]);for(let _0x1e85b7=0x0;_0x1e85b7<_0x165215[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1e85b7+=0x2){let _0x3ccdce=window[_0x3e0e4c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x165215[_0x3e0e4c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1e85b7,_0x1e85b7+0x2));_0x3ccdce>=_0x31552c[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3ccdce-=_0x31552c[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x57cc0d+=_0x31552c[_0x3ccdce];}return _0x57cc0d;}function _0x1d56b0(){const _0x28be67=_0x29166a[_0x3e0e4c([0x73,0x70,0x6c,0x69,0x74])](_0x3e0e4c([0x2e]));if(0x3!=_0x28be67[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1aee47(_0x28be67[0x1]);function _0x1aee47(_0x389cdc){const _0x3bd48c=_0x1f5c6b(_0x389cdc);return _0x3bd48c&&_0x1deb2d()?_0x3bd48c:null;function _0x1deb2d(){const _0x14c89d=_0x3bd48c[_0x3e0e4c([0x6a,0x74,0x69])],_0x36290a=window[_0x3e0e4c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x14c89d[_0x3e0e4c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x14c89d[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x871c29={..._0x3bd48c,[_0x3e0e4c([0x6a,0x74,0x69])]:_0x14c89d[_0x3e0e4c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x14c89d[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x871c29[_0x3e0e4c([0x76,0x63])],_0xa23695(_0x871c29)==_0x36290a;}}}async function _0x11bf42(){let _0x4ebdce=!0x0;try{const _0x4c5d51=_0x29166a[_0x3e0e4c([0x73,0x70,0x6c,0x69,0x74])](_0x3e0e4c([0x2e])),[_0x3efcd4,_0x3b81ef,_0x12db52]=_0x4c5d51;return _0xe06feb(_0x3efcd4),await _0x328586(_0x3efcd4,_0x3b81ef,_0x12db52),_0x4ebdce;}catch{return!0x1;}function _0xe06feb(_0xf6cd57){const _0x29b6d3=_0x1f5c6b(_0xf6cd57);_0x29b6d3&&_0x29b6d3[_0x3e0e4c([0x61,0x6c,0x67])]==_0x3e0e4c([0x45,0x53,0x32,0x35,0x36])||(_0x4ebdce=!0x1);}async function _0x328586(_0x563d67,_0x23abbc,_0x416329){const _0x72e9f3=window[_0x3e0e4c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3e0e4c([0x66,0x72,0x6f,0x6d])](_0x565dc9(_0x416329),_0x33d416=>_0x33d416[_0x3e0e4c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5a76b3=new window[(_0x3e0e4c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3e0e4c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x563d67+_0x3e0e4c([0x2e])+_0x23abbc),_0x125516=window[_0x3e0e4c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3e0e4c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x125516)return;const _0x51e393=await _0x125516[_0x3e0e4c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3e0e4c([0x6a,0x77,0x6b]),_0x5d7148,{[_0x3e0e4c([0x6e,0x61,0x6d,0x65])]:_0x3e0e4c([0x45,0x43,0x44,0x53,0x41]),[_0x3e0e4c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3e0e4c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3e0e4c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x125516[_0x3e0e4c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3e0e4c([0x6e,0x61,0x6d,0x65])]:_0x3e0e4c([0x45,0x43,0x44,0x53,0x41]),[_0x3e0e4c([0x68,0x61,0x73,0x68])]:{[_0x3e0e4c([0x6e,0x61,0x6d,0x65])]:_0x3e0e4c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x51e393,_0x72e9f3,_0x5a76b3)||(_0x4ebdce=!0x1);}}function _0x1f5c6b(_0xbfb6d0){return _0xbfb6d0[_0x3e0e4c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3e0e4c([0x65,0x79]))?JSON[_0x3e0e4c([0x70,0x61,0x72,0x73,0x65])](_0x565dc9(_0xbfb6d0)):null;}function _0x565dc9(_0x4c2072){return window[_0x3e0e4c([0x61,0x74,0x6f,0x62])](_0x4c2072[_0x3e0e4c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3e0e4c([0x2b]))[_0x3e0e4c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3e0e4c([0x2f])));}function _0xa23695(_0x171680){let _0x40a07d=0x1505;function _0x3731ca(_0x56d005){for(let _0x3f71ad=0x0;_0x3f71ad<_0x56d005[_0x3e0e4c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3f71ad++){const _0x4514da=_0x56d005[_0x3e0e4c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3f71ad);_0x40a07d=(_0x40a07d<<0x5)+_0x40a07d+_0x4514da,_0x40a07d&=_0x40a07d;}}function _0x383c0f(_0x2dea4b){Array[_0x3e0e4c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2dea4b)?_0x2dea4b[_0x3e0e4c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x383c0f):_0x2dea4b&&typeof _0x2dea4b==_0x3e0e4c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3e0e4c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2dea4b)[_0x3e0e4c([0x73,0x6f,0x72,0x74])]()[_0x3e0e4c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1e19ba,_0x2c926e])=>{_0x3731ca(_0x1e19ba),_0x383c0f(_0x2c926e);}):_0x3731ca(window[_0x3e0e4c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2dea4b));}return _0x383c0f(_0x171680),_0x40a07d>>>0x0;}function _0x4ffdac(_0x480fa0){return _0x480fa0[_0x3e0e4c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3e0e4c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3e0e4c([0x30]));}function _0x83358f(_0x29ace8){return _0x29ace8[_0x3e0e4c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3e0e4c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3e0e4c([0x6a,0x6f,0x69,0x6e])]('');}function _0x4ce51d(){}function _0x3e0e4c(_0x2d3a89){return _0x2d3a89['map'](_0x18e5f5=>String['fromCharCode'](_0x18e5f5))['join']('');}_0x1bd750(await _0x3b6bde());}(this);}['_initSchema'](){const _0x183292=this['editor']['model']['schema'];_0x183292['isRegistered']('imageBlock')&&_0x183292['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x183292['isRegistered']('imageInline')&&_0x183292['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x11cf93=this['editor'];_0x11cf93['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x11cf93['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x34a45d=>_0x34a45d['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1fe940=_0x11cf93['commands']['get']('replaceImageSource');_0x1fe940&&this['listenTo'](_0x1fe940,'cleanupImage',(_0x5cb2f4,[_0x100fa8,_0x621ddd])=>{_0x100fa8['removeAttribute']('uploadcareImageId',_0x621ddd);});}['_initConfig'](){const _0x414087=this['editor']['config']['get']('uploadcare.uploader')||{},_0x428fa3=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3a69f0(_0x57318e['document'],'uc-config',{..._0x414087,'pubkey':_0x428fa3,'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']=_0x31d869=>{if('closeMax'==_0x31d869)return'#uc-icon-arrow-down';},_0x57318e['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3a69f0(_0x57318e['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x57318e['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x39f294=this['editor']['commands']['get']('insertImage');_0x39f294&&this['listenTo'](_0x39f294,'execute',()=>{const _0x57b62e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x57b62e&&_0x57b62e['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x57b62e);});});const _0x5614c0=this['editor']['commands']['get']('uploadcareImageReplace');_0x5614c0&&this['listenTo'](_0x5614c0,'execute',()=>{const _0x44e8b9=this['editor']['model']['document']['selection']['getSelectedElement']();_0x44e8b9&&_0x44e8b9['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x44e8b9);});});}}class tt extends _0x1eb42f{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x419003){super(_0x419003),_0x419003['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x2dab71['defineComponents'](_0x2dab71),this['_defineLocale']();}['_defineLocale'](){const _0x287e8a=this['editor']['config']['get']('uploadcare.locale'),_0x570655=this['editor']['locale']['contentLanguage'];_0x287e8a&&_0x2dab71['defineLocale'](_0x570655,_0x287e8a);}}class ii extends _0x330511{constructor(_0x2bb23a){super(_0x2bb23a);const t=_0x2bb23a['t'],_0x503cd4=this['bindTemplate'],_0x54a569=new _0x320917();_0x54a569['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':[_0x54a569,{'text':_0x503cd4['to']('imageUploadProgress',_0x2c65f1=>t('Loading\x20image...')+'\x20('+(_0x2c65f1||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 _0x330511{constructor(_0x10b1b3){super(_0x10b1b3);const t=_0x10b1b3['t'];this['set']('errorType',null);const _0x12de28=new _0x1b73cf(_0x10b1b3);_0x12de28['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x12de28['withText']=!0x0,_0x12de28['class']='ck-button-action',_0x12de28['on']('execute',()=>{this['fire']('retry');}),_0x12de28['bind']('isVisible')['to'](this,'errorType',_0x4f81b8=>'NotFound'!==_0x4f81b8);const _0x2bcef8=new _0x50fb93();_0x2bcef8['content']=_0xf4a164,_0x2bcef8['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x2b4b57=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':[_0x2bcef8,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x2b4b57['to']('errorType',_0xfb3b0d=>t('NotFound'!==_0xfb3b0d?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x12de28]},{'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 _0x330511{constructor(_0x19bc2c,_0x21ead9){super(_0x19bc2c);const _0x3ff633=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x21ead9,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x3ff633['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x34ea07,_0x194562,_0x3c42ea){super(_0x34ea07),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x34ea07),this['_errorView']=new ti(_0x34ea07),this['_editingView']=new ei(_0x34ea07,_0x3c42ea),this['_focusableView']=new _0x330511(_0x34ea07),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x194562),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'],_0xcc7b30=>{this['_addUploadcareImageEditorListeners'](_0xcc7b30);});}),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'](_0x3b286e,_0x349e3b){const _0x413327='uc-cloud-image-editor',_0x18e418=_0x3b286e['querySelector'](_0x413327);if(_0x18e418)return _0x349e3b(_0x18e418);const _0x47f32b=new MutationObserver(_0x2e774d=>{const _0x208c30=_0x2e774d['filter'](_0x2392a5=>_0x2392a5['target']===_0x3b286e&&_0x2392a5['addedNodes']['length']>0x0&&_0x2392a5['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x413327);_0x208c30['length']&&(_0x47f32b['disconnect'](),_0x349e3b(_0x208c30[0x0]['addedNodes'][0x0]));});_0x47f32b['observe'](_0x3b286e,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x41b201){_0x41b201['addEventListener']('apply',_0x3d4549=>{this['fire']('apply',{'imageSrc':_0x3d4549['detail']['cdnUrl']});}),_0x41b201['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x10cec6(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x16ab30,_0x2ad631,_0xdeb706){super(),this['_editor']=_0x16ab30,this['_dialog']=_0x2ad631,this['_imageElement']=_0xdeb706,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 _0x3595af=this['_imageElement'],_0x487fc5=_0x3595af['getAttribute']('uploadcareImageId'),_0x2eb5c6=_0x3595af['getAttribute']('src');if(_0x487fc5)await this['_loadImageInfo'](_0x487fc5,_0x2eb5c6);else{if(this['_imageCache']['has'](_0x2eb5c6)){const _0x4c41ba=this['_imageCache']['get'](_0x2eb5c6);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4c41ba['url'],this['imageDimension']=_0x4c41ba['dimension'],this['imageId']=_0x4c41ba['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x282ca5}=this['_editor'],t=_0x282ca5['t'],_0x1697e7=new X(_0x282ca5,this['imageStatus'],this['_attributes']);_0x1697e7['bind']('status')['to'](this,'imageStatus'),_0x1697e7['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1697e7['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1697e7['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1697e7,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2b5f05,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1697e7,'position':_0x2915d5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1697e7['focus']();},'onHide':()=>{_0x1697e7['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x5b3420=>!A(_0x5b3420,_0x1697e7['element'])}});}['_loadImageInfo'](_0x512f63,_0x226506){return j['getInfo'](_0x512f63,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x16045b=>{const {width:_0x1b38b2,height:_0x3e65dd}=_0x16045b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x226506,this['imageDimension']={'width':_0x1b38b2,'height':_0x3e65dd},this['imageId']=_0x512f63;})['catch'](_0xf34f8b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xf34f8b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x5c6938,_0x4a43ab){return this['_getImageAsFile'](_0x5c6938)['then'](_0x47b2b5=>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':_0x4a43ab['signal'],'file':_0x47b2b5,'onProgress':_0x5175d7=>{_0x5175d7&&_0x5175d7['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5175d7['value']));}}))['then'](_0x2175e9=>{const {width:_0x128e2e,height:_0x1aedb8}=_0x2175e9['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2175e9['cdnUrl'],this['imageDimension']={'width':_0x128e2e,'height':_0x1aedb8},this['imageId']=_0x2175e9['uuid'],this['imageUploadProgress']=null;const _0x157753=_0x5c6938['getAttribute']('src');this['_imageCache']['set'](_0x157753,{'id':_0x2175e9['uuid'],'url':_0x2175e9['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x539500=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x539500['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3cae50,_0x11c791){_0x3cae50['on']('apply',(_0x26884e,_0x35f271)=>{this['_replaceImage'](_0x11c791,_0x35f271['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3cae50['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3cae50['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x565ca7,_0x1f1358,_0xb36250){const _0x10ad18=this['_editor'],{width:_0x309ec8,height:_0xb4028e}=S(_0x1f1358,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1d0d09,imageSources:_0x2bc547}=C(_0x1f1358,_0x309ec8);_0x10ad18['model']['change'](_0x2f5718=>{if('$graveyard'===_0x565ca7['root']['rootName']){_0x10ad18['execute']('insertImage',{'imageType':_0x565ca7['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x565ca7['getAttributes']()),'uploadcareImageId':_0xb36250,'src':_0x1d0d09,'sources':_0x2bc547,'width':_0x309ec8,'height':_0xb4028e}});const _0x49488c=_0x565ca7['getChildren']();_0x565ca7=_0x10ad18['model']['document']['selection']['getSelectedElement']();for(const _0x2b16e3 of _0x49488c)_0x2f5718['append'](_0x2f5718['cloneElement'](_0x2b16e3),_0x565ca7);}else _0x2f5718['setSelection'](_0x565ca7,'on'),_0x10ad18['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x565ca7['getAttributes']()),'uploadcareImageId':_0xb36250,'src':_0x1d0d09,'sources':_0x2bc547,'width':_0x309ec8,'height':_0xb4028e},_0x565ca7);_0x2f5718['setSelection'](_0x565ca7,'on');});}async['_getImageAsFile'](_0x47516f){const _0x394f13=_0x57318e['window'],_0x14b71d=_0x57318e['document']['location']['href'],_0xd957df=new _0x394f13['URL'](_0x47516f['getAttribute']('src'),_0x14b71d);if('data:'===_0xd957df['protocol']){const _0x5f04db=_0xd957df['href']['split'](','),_0x11b58d=_0x5f04db[0x0]['match'](/:(.*?);/)[0x1],_0x2c4edc=_0x11b58d['split']('/')[0x1],_0x4eb355=_0x394f13['atob'](_0x5f04db[_0x5f04db['length']-0x1]);let _0x3d62e5=_0x4eb355['length'];const _0x2e58a7=new _0x394f13['Uint8Array'](_0x3d62e5);for(;_0x3d62e5--;)_0x2e58a7[_0x3d62e5]=_0x4eb355['charCodeAt'](_0x3d62e5);return new _0x394f13['File']([_0x2e58a7],'image.'+_0x2c4edc,{'type':_0x11b58d});}const _0x3480af=_0xd957df['href']['split']('/'),_0x1d9bdb=_0x3480af[_0x3480af['length']-0x1],_0x3d8439=_0x1d9bdb['split']('.')[0x1];return _0x394f13['fetch'](_0xd957df['href'])['then'](_0x468c26=>_0x468c26['clone']()['blob']())['then'](_0x4d6660=>new _0x394f13['File']([_0x4d6660],_0x1d9bdb,{'type':'image/'+_0x3d8439}));}}class O extends _0x1b6628{['imageEditController'];static get['requires'](){return[_0x20eb2c];}['_isEditable'];constructor(_0x1a823b){super(_0x1a823b),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x51a780){const _0x18d312=G(_0x51a780);return _0x4b941b=>!(!_0x4b941b||!_0x4b941b['is']('element','imageBlock')&&!_0x4b941b['is']('element','imageInline'))&&(!!_0x4b941b['hasAttribute']('uploadcareImageId')||!!_0x4b941b['hasAttribute']('src')&&_0x18d312(_0x4b941b['getAttribute']('src')));}(_0x1a823b['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x276a79=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x276a79);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x510ce0=this['editor']['model']['document']['selection']['getSelectedElement']();_0x510ce0&&(_0x510ce0['is']('element','imageBlock')||_0x510ce0['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x20eb2c),_0x510ce0),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x1b6628{['refresh'](){const _0x3f653a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3f653a&&(_0x3f653a['is']('element','imageBlock')||_0x3f653a['is']('element','imageInline')));}['execute'](_0x18f2c5){const _0x33080a=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x170998=>{_0x170998['setAttributes'](_0x18f2c5,_0x33080a),_0x170998['removeAttribute']('srcset',_0x33080a),_0x170998['removeAttribute']('sizes',_0x33080a);});}}class m extends _0x1eb42f{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x16ed00,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x165d00}=this;_0x165d00['commands']['add']('uploadcareImageEdit',new O(_0x165d00)),_0x165d00['commands']['add']('uploadcareImageReplace',new R(_0x165d00));}}class g extends _0x1eb42f{['_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 _0x40196c=this['editor'];_0x40196c['ui']['componentFactory']['add']('uploadcareImageEdit',_0x4c524e=>{const _0x5d66a7=_0x40196c['commands']['get']('uploadcareImageEdit'),_0x5c07b2=new _0x1b73cf(_0x4c524e),t=_0x4c524e['t'];return _0x5c07b2['set']({'icon':_0x2b5f05,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x5c07b2['bind']('isEnabled')['to'](_0x5d66a7),_0x5c07b2['bind']('isOn')['to'](_0x5d66a7,'isActive'),this['listenTo'](_0x5c07b2,'execute',()=>{_0x40196c['execute']('uploadcareImageEdit'),_0x40196c['editing']['view']['focus']();}),_0x5c07b2;}),this['_initConfig']();}['_initConfig'](){const _0x3644af=_0x3a69f0(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x3644af),this['listenTo'](this['editor'],'destroy',()=>{_0x3644af['remove']();});}}class et extends _0x1eb42f{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-next-
|
|
3
|
+
"version": "0.0.0-nightly-next-20260104.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-next-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-next-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20260104.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20260104.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20260104.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20260104.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20260104.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20260104.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20260104.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-next-20260104.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.24.5",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x13ef7d=_0x8387;(function(_0x1f0530,_0x330c27){const _0x159c0e=_0x8387,_0x435820=_0x1f0530();while(!![]){try{const _0x5cafc3=-parseInt(_0x159c0e(0x147))/0x1*(-parseInt(_0x159c0e(0x159))/0x2)+-parseInt(_0x159c0e(0x15f))/0x3+parseInt(_0x159c0e(0x132))/0x4*(-parseInt(_0x159c0e(0x13c))/0x5)+parseInt(_0x159c0e(0x182))/0x6*(-parseInt(_0x159c0e(0x12e))/0x7)+parseInt(_0x159c0e(0x135))/0x8*(-parseInt(_0x159c0e(0x139))/0x9)+parseInt(_0x159c0e(0x131))/0xa*(-parseInt(_0x159c0e(0x176))/0xb)+parseInt(_0x159c0e(0x15b))/0xc;if(_0x5cafc3===_0x330c27)break;else _0x435820['push'](_0x435820['shift']());}catch(_0x2372b5){_0x435820['push'](_0x435820['shift']());}}}(_0x3beb,0x22928));import{Plugin as _0x283950}from'ckeditor5/src/core.js';import{Dialog as _0xce4caf}from'ckeditor5/src/ui.js';import{createElement as _0x47f862,global as _0x55db96,uid as _0x4fdd9e}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x34c1c0}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x5a1abe}from'./uploadcareuploadadapter.js';function _0x3beb(){const _0x13c311=['ucContextId','replaceImageSource','145090vdGqts','isPremiumPlugin','destroy','closeMax','listenTo','contentLanguage','UploadcareEditing','uploadcareImageId','configElement','uploader-','editor','model','6VkFCzf','upcast','fromCharCode','1219841jALlbX','uploadcare.uploader','_initImageProcessingIndicator','40SVLwab','8yhtuJb','data-uc-image-id','uc-config','2504RbRBnz','extend','appendChild','imageBlock','7956ZcQPAq','execute','insertImage','502905briIgX','for','imageInline','uploadcare','join','conversion','#uc-icon-arrow-down','document','attributeToAttribute','cleanupImage','_initConfig','24831DzQwgd','\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','pluginName','add','iconHrefResolver','isRegistered','once','isOfficialPlugin','true','_initSchema','render','_ctxElement','_configElement','uploadcareImageReplace','afterInit','href','PictureEditing','_initCtx','18HlGFMb','config','7825416nnKmmz','uploadcare.pubkey','downcast','body','87336EtNaBA','ctxElement','requires','schema','remove','locale','removeAttribute','editing','elementToAttribute','commands','get','_initConversion','selection','uc-upload-ctx-provider','init','map','getSelectedElement','getAttribute','querySelector','view','input[uploadcare-file-input]'];_0x3beb=function(){return _0x13c311;};return _0x3beb();}import{showImageProcessingIndicator as _0x633b38}from'./utils/editingutils.js';function _0x8387(_0x3c4b99,_0x2185ea){const _0x3bebdf=_0x3beb();return _0x8387=function(_0x8387d9,_0x565524){_0x8387d9=_0x8387d9-0x12c;let _0x43c3aa=_0x3bebdf[_0x8387d9];return _0x43c3aa;},_0x8387(_0x3c4b99,_0x2185ea);}export class UploadcareEditing extends _0x283950{[_0x13ef7d(0x153)]=null;[_0x13ef7d(0x152)]=null;static get[_0x13ef7d(0x149)](){const _0x23c63c=_0x13ef7d;return _0x23c63c(0x17c);}static get[_0x13ef7d(0x161)](){const _0x3dd4ca=_0x13ef7d;return[_0x3dd4ca(0x157),_0x5a1abe,_0xce4caf];}static get[_0x13ef7d(0x14e)](){return!0x0;}static get[_0x13ef7d(0x177)](){return!0x0;}[_0x13ef7d(0x174)];get[_0x13ef7d(0x17e)](){const _0x313656=_0x13ef7d;return this[_0x313656(0x153)];}get[_0x13ef7d(0x160)](){const _0x2b9597=_0x13ef7d;return this[_0x2b9597(0x152)];}constructor(_0x336028){const _0x4090ae=_0x13ef7d;super(_0x336028),this[_0x4090ae(0x174)]=_0x4fdd9e();}[_0x13ef7d(0x16d)](){const _0x571517=_0x13ef7d,_0x5bf9aa=this[_0x571517(0x180)];_0x5bf9aa[_0x571517(0x168)][_0x571517(0x14a)](_0x571517(0x13f),new _0x34c1c0(_0x5bf9aa));}[_0x13ef7d(0x155)](){const _0x330921=_0x13ef7d;this[_0x330921(0x150)](),this[_0x330921(0x16a)](),this[_0x330921(0x146)](),this[_0x330921(0x158)](),this[_0x330921(0x130)](),this[_0x330921(0x17a)](this[_0x330921(0x180)],_0x330921(0x178),()=>{const _0x1cd381=_0x330921;this[_0x1cd381(0x153)]&&(this[_0x1cd381(0x153)][_0x1cd381(0x163)](),this[_0x1cd381(0x153)]=null),this[_0x1cd381(0x152)]&&(this[_0x1cd381(0x152)][_0x1cd381(0x163)](),this[_0x1cd381(0x152)]=null);const _0xa8b50a=_0x55db96[_0x1cd381(0x143)][_0x1cd381(0x171)](_0x1cd381(0x173));_0xa8b50a&&_0xa8b50a[_0x1cd381(0x163)]();}),async function(_0x4af46d){const _0x6275af=_0x287344([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x3c3569=0x535f8c3a,_0x52779b=0x5358f1fa^_0x3c3569,_0x5097a6=window[_0x287344([0x44,0x61,0x74,0x65])][_0x287344([0x6e,0x6f,0x77])](),_0x22645b=_0x4af46d[_0x287344([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xbf06c=new window[(_0x287344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x28280a=>{_0x22645b[_0x287344([0x6f,0x6e,0x63,0x65])](_0x287344([0x72,0x65,0x61,0x64,0x79]),_0x28280a);}),_0x9c513a={[_0x287344([0x6b,0x74,0x79])]:_0x287344([0x45,0x43]),[_0x287344([0x75,0x73,0x65])]:_0x287344([0x73,0x69,0x67]),[_0x287344([0x63,0x72,0x76])]:_0x287344([0x50,0x2d,0x32,0x35,0x36]),[_0x287344([0x78])]:_0x287344([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]),[_0x287344([0x79])]:_0x287344([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]),[_0x287344([0x61,0x6c,0x67])]:_0x287344([0x45,0x53,0x32,0x35,0x36])},_0x4cad43=_0x22645b[_0x287344([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x287344([0x67,0x65,0x74])](_0x287344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x254709(){let _0x403c8f,_0x291833=null,_0x16e269=null;try{if(_0x4cad43==_0x287344([0x47,0x50,0x4c]))return _0x287344([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x403c8f=_0x4ed35c(),!_0x403c8f)return _0x287344([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x403c8f[_0x287344([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x16e269=_0x99ed13(_0x403c8f[_0x287344([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x403c8f[_0x287344([0x6a,0x74,0x69])])),await _0x20326e()?_0x24a170()?_0x2bf94c()?_0x287344([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x81f89c()?(_0x403c8f[_0x287344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x287344([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x291833=_0x574f9a(_0x287344([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x403c8f[_0x287344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x287344([0x74,0x72,0x69,0x61,0x6c])&&(_0x291833=_0x574f9a(_0x287344([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5c89be()):_0x287344([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x287344([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x287344([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x287344([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2bf94c(){const _0x20c665=[_0x287344([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x287344([0x74,0x72,0x69,0x61,0x6c])][_0x287344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x403c8f[_0x287344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5097a6/0x3e8:0xe10*_0x52779b;return _0x403c8f[_0x287344([0x65,0x78,0x70])]<_0x20c665;}function _0x24a170(){const _0x49dc1d=_0x403c8f[_0x287344([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x49dc1d&&(!!_0x49dc1d[_0x287344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x287344([0x2a]))||!!_0x49dc1d[_0x287344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x287344([0x55,0x50,0x4c,0x43])));}function _0x81f89c(){const _0x564d23=_0x8387,_0x1ed872=_0x403c8f[_0x287344([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1ed872||0x0==_0x1ed872[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2510fd}=new URL(window[_0x287344([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x564d23(0x156)]);if(_0x1ed872[_0x287344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2510fd))return!0x0;const _0x1bbc0d=_0x2510fd[_0x287344([0x73,0x70,0x6c,0x69,0x74])](_0x287344([0x2e]));return _0x1ed872[_0x287344([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x284560=>_0x284560[_0x287344([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x287344([0x2a])))[_0x287344([0x6d,0x61,0x70])](_0x5b4646=>_0x5b4646[_0x287344([0x73,0x70,0x6c,0x69,0x74])](_0x287344([0x2e])))[_0x287344([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5c6b89=>_0x5c6b89[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1bbc0d[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x287344([0x6d,0x61,0x70])](_0x4c4558=>Array(_0x1bbc0d[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4c4558[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x287344([0x66,0x69,0x6c,0x6c])](_0x4c4558[0x0]===_0x287344([0x2a])?_0x287344([0x2a]):'')[_0x287344([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4c4558))[_0x287344([0x73,0x6f,0x6d,0x65])](_0x34f38d=>_0x1bbc0d[_0x287344([0x65,0x76,0x65,0x72,0x79])]((_0x55c90d,_0xe40499)=>_0x34f38d[_0xe40499]===_0x55c90d||_0x34f38d[_0xe40499]===_0x287344([0x2a])));}function _0x5c89be(){return _0x291833&&_0x16e269?new window[(_0x287344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14f34e,_0x1f409a)=>{_0x291833[_0x287344([0x74,0x68,0x65,0x6e])](_0x14f34e,_0x1f409a),_0x16e269[_0x287344([0x74,0x68,0x65,0x6e])](_0x1a0d9a=>{_0x1a0d9a!=_0x287344([0x56,0x61,0x6c,0x69,0x64])&&_0x14f34e(_0x1a0d9a);},_0x1f409a);}):_0x291833||_0x16e269||_0x287344([0x56,0x61,0x6c,0x69,0x64]);}}function _0x99ed13(_0x1c3f86,_0x5307c9){return new window[(_0x287344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ef105=>{if(_0x59dfc7())return _0x1ef105(_0x287344([0x56,0x61,0x6c,0x69,0x64]));_0x304285(),_0x22645b[_0x287344([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x287344([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x26a7f9=!0x1;const _0x26c1d6=_0x4fdd9e();function _0x5a6b4d(_0x556a26){return!!_0x556a26&&(typeof _0x556a26===_0x287344([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x556a26===_0x287344([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x556a26[_0x287344([0x74,0x68,0x65,0x6e])]===_0x287344([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x556a26[_0x287344([0x63,0x61,0x74,0x63,0x68])]===_0x287344([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x387537(_0x581743){_0x344311(_0x581743)[_0x287344([0x74,0x68,0x65,0x6e])](_0x58d691=>{if(!_0x58d691||_0x58d691[_0x287344([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x287344([0x6f,0x6b]))return _0x287344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5c2c07(_0x2a7676(_0x26c1d6+_0x5307c9))!=_0x58d691[_0x287344([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x287344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x287344([0x56,0x61,0x6c,0x69,0x64]);})[_0x287344([0x74,0x68,0x65,0x6e])](_0x5d7ecc=>(_0xf3746(),_0x5d7ecc),()=>{const _0x16bc38=_0x1dec01();return null==_0x16bc38?(_0xf3746(),_0x287344([0x56,0x61,0x6c,0x69,0x64])):_0x287344(_0x5097a6-_0x16bc38>(0x7753083a^_0x3c3569)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x287344([0x74,0x68,0x65,0x6e])](_0x1ef105)[_0x287344([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1ef105(_0x287344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1eef9e=0x536962ba^_0x3c3569;function _0xf3746(){const _0x304293=_0x287344([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c2c07(_0x2a7676(_0x1c3f86)),_0x55729b=_0x18ecde(_0x5c2c07(window[_0x287344([0x4d,0x61,0x74,0x68])][_0x287344([0x63,0x65,0x69,0x6c])](_0x5097a6/_0x1eef9e)));window[_0x287344([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x287344([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x304293,_0x55729b);}function _0x1dec01(){const _0x5899d2=_0x287344([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c2c07(_0x2a7676(_0x1c3f86)),_0x9a83a8=window[_0x287344([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x287344([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5899d2);return _0x9a83a8?window[_0x287344([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x18ecde(_0x9a83a8),0x10)*_0x1eef9e:null;}function _0x344311(_0x31c70e){return new window[(_0x287344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x18a9ac,_0xa55166)=>{_0x31c70e[_0x287344([0x74,0x68,0x65,0x6e])](_0x18a9ac,_0xa55166),window[_0x287344([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xa55166,0x535e58fa^_0x3c3569);});}}_0x22645b[_0x287344([0x6f,0x6e])](_0x287344([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xaca106,_0x2a8831)=>{if(_0x2a8831[0x0]!=_0x1c3f86)return _0x1ef105(_0x287344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2a8831[0x1]={..._0x2a8831[0x1],[_0x287344([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x26c1d6};},{[_0x287344([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x287344([0x68,0x69,0x67,0x68])}),_0x22645b[_0x287344([0x6f,0x6e])](_0x287344([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x374f46=>{_0x5a6b4d(_0x374f46[_0x287344([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x26a7f9=!0x0,_0x387537(_0x374f46[_0x287344([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x287344([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x287344([0x6c,0x6f,0x77])}),_0xbf06c[_0x287344([0x74,0x68,0x65,0x6e])](()=>{_0x26a7f9||_0x1ef105(_0x287344([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x59dfc7(){return _0x22645b[_0x287344([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x287344([0x76,0x69,0x65,0x77])][_0x287344([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x287344([0x61,0x75,0x74,0x6f]);}function _0x304285(){_0x22645b[_0x287344([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x287344([0x76,0x69,0x65,0x77])][_0x287344([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x287344([0x61,0x75,0x74,0x6f]);}}function _0x574f9a(_0x39ffd7){const _0x3737df=[new window[(_0x287344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x476a7b=>setTimeout(_0x476a7b,0x5356b2f6^_0x3c3569)),_0xbf06c[_0x287344([0x74,0x68,0x65,0x6e])](()=>new window[(_0x287344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3bedf9=>{let _0x2f6930=0x0;_0x22645b[_0x287344([0x6d,0x6f,0x64,0x65,0x6c])][_0x287344([0x6f,0x6e])](_0x287344([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x53ecd8,_0x5b359a)=>{_0x5b359a[0x0][_0x287344([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2f6930++,_0x2f6930==(0x535f89d2^_0x3c3569)&&(_0x3bedf9(),_0x53ecd8[_0x287344([0x6f,0x66,0x66])]());});}))];return window[_0x287344([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x287344([0x72,0x61,0x63,0x65])](_0x3737df)[_0x287344([0x74,0x68,0x65,0x6e])](()=>_0x39ffd7);}async function _0x4649fc(){await _0xbf06c,_0x22645b[_0x287344([0x6d,0x6f,0x64,0x65,0x6c])][_0x287344([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2f8536,_0x22645b[_0x287344([0x6d,0x6f,0x64,0x65,0x6c])][_0x287344([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2f8536,_0x22645b[_0x287344([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x287344([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x30ee2d(_0x4a5af7){const _0xc87f90=_0x238d3c();_0x22645b[_0xc87f90]=_0x287344([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4a5af7,_0x4a5af7!=_0x287344([0x56,0x61,0x6c,0x69,0x64])&&_0x4649fc();}function _0x238d3c(){const _0x409ed5=window[_0x287344([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x287344([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x287344([0x6e,0x6f,0x77])]())[_0x287344([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x287344([0x2e]),'');let _0x5705e5=_0x287344([0x68]);for(let _0x257a06=0x0;_0x257a06<_0x409ed5[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x257a06+=0x2){let _0x25bb6a=window[_0x287344([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x409ed5[_0x287344([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x257a06,_0x257a06+0x2));_0x25bb6a>=_0x6275af[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x25bb6a-=_0x6275af[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5705e5+=_0x6275af[_0x25bb6a];}return _0x5705e5;}function _0x4ed35c(){const _0x5078d3=_0x4cad43[_0x287344([0x73,0x70,0x6c,0x69,0x74])](_0x287344([0x2e]));if(0x3!=_0x5078d3[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xe9a3a1(_0x5078d3[0x1]);function _0xe9a3a1(_0x93bce7){const _0x3ebe28=_0x3699bf(_0x93bce7);return _0x3ebe28&&_0x173851()?_0x3ebe28:null;function _0x173851(){const _0x270681=_0x3ebe28[_0x287344([0x6a,0x74,0x69])],_0x194810=window[_0x287344([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x270681[_0x287344([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x270681[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x110615={..._0x3ebe28,[_0x287344([0x6a,0x74,0x69])]:_0x270681[_0x287344([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x270681[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x110615[_0x287344([0x76,0x63])],_0x2a7676(_0x110615)==_0x194810;}}}async function _0x20326e(){let _0x1cc5a8=!0x0;try{const _0xab4334=_0x4cad43[_0x287344([0x73,0x70,0x6c,0x69,0x74])](_0x287344([0x2e])),[_0x4c7464,_0x4a85ac,_0x450625]=_0xab4334;return _0x1e73e6(_0x4c7464),await _0x1fda6a(_0x4c7464,_0x4a85ac,_0x450625),_0x1cc5a8;}catch{return!0x1;}function _0x1e73e6(_0x281554){const _0x3e5396=_0x3699bf(_0x281554);_0x3e5396&&_0x3e5396[_0x287344([0x61,0x6c,0x67])]==_0x287344([0x45,0x53,0x32,0x35,0x36])||(_0x1cc5a8=!0x1);}async function _0x1fda6a(_0x1772cc,_0x277cb9,_0x162487){const _0x111082=window[_0x287344([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x287344([0x66,0x72,0x6f,0x6d])](_0x3f608a(_0x162487),_0x172fcc=>_0x172fcc[_0x287344([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1c7127=new window[(_0x287344([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x287344([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1772cc+_0x287344([0x2e])+_0x277cb9),_0x5e4560=window[_0x287344([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x287344([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5e4560)return;const _0x506aa9=await _0x5e4560[_0x287344([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x287344([0x6a,0x77,0x6b]),_0x9c513a,{[_0x287344([0x6e,0x61,0x6d,0x65])]:_0x287344([0x45,0x43,0x44,0x53,0x41]),[_0x287344([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x287344([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x287344([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5e4560[_0x287344([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x287344([0x6e,0x61,0x6d,0x65])]:_0x287344([0x45,0x43,0x44,0x53,0x41]),[_0x287344([0x68,0x61,0x73,0x68])]:{[_0x287344([0x6e,0x61,0x6d,0x65])]:_0x287344([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x506aa9,_0x111082,_0x1c7127)||(_0x1cc5a8=!0x1);}}function _0x3699bf(_0x2b304f){return _0x2b304f[_0x287344([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x287344([0x65,0x79]))?JSON[_0x287344([0x70,0x61,0x72,0x73,0x65])](_0x3f608a(_0x2b304f)):null;}function _0x3f608a(_0x5a8c77){return window[_0x287344([0x61,0x74,0x6f,0x62])](_0x5a8c77[_0x287344([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x287344([0x2b]))[_0x287344([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x287344([0x2f])));}function _0x2a7676(_0x4ec3d1){let _0x369adf=0x1505;function _0x269932(_0x1c7f9d){for(let _0x4edaa3=0x0;_0x4edaa3<_0x1c7f9d[_0x287344([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4edaa3++){const _0xab6613=_0x1c7f9d[_0x287344([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4edaa3);_0x369adf=(_0x369adf<<0x5)+_0x369adf+_0xab6613,_0x369adf&=_0x369adf;}}function _0x4a78d6(_0x3d9dca){Array[_0x287344([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3d9dca)?_0x3d9dca[_0x287344([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4a78d6):_0x3d9dca&&typeof _0x3d9dca==_0x287344([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x287344([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3d9dca)[_0x287344([0x73,0x6f,0x72,0x74])]()[_0x287344([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3c793a,_0x135290])=>{_0x269932(_0x3c793a),_0x4a78d6(_0x135290);}):_0x269932(window[_0x287344([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3d9dca));}return _0x4a78d6(_0x4ec3d1),_0x369adf>>>0x0;}function _0x5c2c07(_0x48e8fc){return _0x48e8fc[_0x287344([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x287344([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x287344([0x30]));}function _0x18ecde(_0x3c3355){return _0x3c3355[_0x287344([0x73,0x70,0x6c,0x69,0x74])]('')[_0x287344([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x287344([0x6a,0x6f,0x69,0x6e])]('');}function _0x2f8536(){}function _0x287344(_0x19fb84){const _0x18099f=_0x8387;return _0x19fb84[_0x18099f(0x16e)](_0x9facdd=>String[_0x18099f(0x12d)](_0x9facdd))[_0x18099f(0x140)]('');}_0x30ee2d(await _0x254709());}(this);}[_0x13ef7d(0x150)](){const _0x1fb9e9=_0x13ef7d,_0x5f0300=this[_0x1fb9e9(0x180)][_0x1fb9e9(0x181)][_0x1fb9e9(0x162)];_0x5f0300[_0x1fb9e9(0x14c)](_0x1fb9e9(0x138))&&_0x5f0300[_0x1fb9e9(0x136)](_0x1fb9e9(0x138),{'allowAttributes':[_0x1fb9e9(0x17d)]}),_0x5f0300[_0x1fb9e9(0x14c)](_0x1fb9e9(0x13e))&&_0x5f0300[_0x1fb9e9(0x136)](_0x1fb9e9(0x13e),{'allowAttributes':[_0x1fb9e9(0x17d)]});}[_0x13ef7d(0x16a)](){const _0x4b631c=_0x13ef7d,_0x4d90c7=this[_0x4b631c(0x180)];_0x4d90c7[_0x4b631c(0x141)][_0x4b631c(0x13d)](_0x4b631c(0x15d))[_0x4b631c(0x144)]({'model':_0x4b631c(0x17d),'view':_0x4b631c(0x133)}),_0x4d90c7[_0x4b631c(0x141)][_0x4b631c(0x13d)](_0x4b631c(0x12c))[_0x4b631c(0x167)]({'model':{'key':_0x4b631c(0x17d),'value':_0x3e7239=>_0x3e7239[_0x4b631c(0x170)](_0x4b631c(0x133))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x7fe95b=_0x4d90c7[_0x4b631c(0x168)][_0x4b631c(0x169)](_0x4b631c(0x175));_0x7fe95b&&this[_0x4b631c(0x17a)](_0x7fe95b,_0x4b631c(0x145),(_0x1a510f,[_0x4a3cce,_0x18843d])=>{const _0x264f2b=_0x4b631c;_0x4a3cce[_0x264f2b(0x165)](_0x264f2b(0x17d),_0x18843d);});}[_0x13ef7d(0x146)](){const _0x5443a9=_0x13ef7d,_0x241241=this[_0x5443a9(0x180)][_0x5443a9(0x15a)][_0x5443a9(0x169)](_0x5443a9(0x12f))||{},_0x512664=this[_0x5443a9(0x180)][_0x5443a9(0x15a)][_0x5443a9(0x169)](_0x5443a9(0x15c))||'';this[_0x5443a9(0x153)]=_0x47f862(_0x55db96[_0x5443a9(0x143)],_0x5443a9(0x134),{..._0x241241,'pubkey':_0x512664,'ctx-name':_0x5443a9(0x17f)+this[_0x5443a9(0x174)],'sourceList':'','imgOnly':_0x5443a9(0x14f),'removeCopyright':_0x5443a9(0x14f),'localeName':this[_0x5443a9(0x180)][_0x5443a9(0x164)][_0x5443a9(0x17b)],'externalSourcesEmbedCss':_0x5443a9(0x148)}),this[_0x5443a9(0x153)][_0x5443a9(0x14b)]=_0x5adf28=>{const _0x1ae8c4=_0x5443a9;if(_0x1ae8c4(0x179)==_0x5adf28)return _0x1ae8c4(0x142);},_0x55db96[_0x5443a9(0x143)][_0x5443a9(0x15e)][_0x5443a9(0x137)](this[_0x5443a9(0x153)]);}[_0x13ef7d(0x158)](){const _0x565ee1=_0x13ef7d;this[_0x565ee1(0x152)]=_0x47f862(_0x55db96[_0x565ee1(0x143)],_0x565ee1(0x16c),{'ctx-name':_0x565ee1(0x17f)+this[_0x565ee1(0x174)]}),_0x55db96[_0x565ee1(0x143)][_0x565ee1(0x15e)][_0x565ee1(0x137)](this[_0x565ee1(0x152)]);}[_0x13ef7d(0x130)](){const _0x2893d0=_0x13ef7d,_0x4746ce=this[_0x2893d0(0x180)][_0x2893d0(0x168)][_0x2893d0(0x169)](_0x2893d0(0x13b));_0x4746ce&&this[_0x2893d0(0x17a)](_0x4746ce,_0x2893d0(0x13a),()=>{const _0x24ccda=_0x2893d0,_0x4d7ed4=this[_0x24ccda(0x180)][_0x24ccda(0x181)][_0x24ccda(0x143)][_0x24ccda(0x16b)][_0x24ccda(0x16f)]();_0x4d7ed4&&_0x4d7ed4[_0x24ccda(0x170)](_0x24ccda(0x17d))&&this[_0x24ccda(0x180)][_0x24ccda(0x166)][_0x24ccda(0x172)][_0x24ccda(0x14d)](_0x24ccda(0x151),()=>{const _0xe60ead=_0x24ccda;_0x633b38(this[_0xe60ead(0x180)],_0x4d7ed4);});});const _0x24fb09=this[_0x2893d0(0x180)][_0x2893d0(0x168)][_0x2893d0(0x169)](_0x2893d0(0x154));_0x24fb09&&this[_0x2893d0(0x17a)](_0x24fb09,_0x2893d0(0x13a),()=>{const _0x5444d1=_0x2893d0,_0x1db7e6=this[_0x5444d1(0x180)][_0x5444d1(0x181)][_0x5444d1(0x143)][_0x5444d1(0x16b)][_0x5444d1(0x16f)]();_0x1db7e6&&_0x1db7e6[_0x5444d1(0x170)](_0x5444d1(0x17d))&&this[_0x5444d1(0x180)][_0x5444d1(0x166)][_0x5444d1(0x172)][_0x5444d1(0x14d)](_0x5444d1(0x151),()=>{const _0x1ebc6e=_0x5444d1;_0x633b38(this[_0x1ebc6e(0x180)],_0x1db7e6);});});}}
|
|
23
|
+
const _0x376094=_0x55aa;(function(_0x46e3fb,_0x257f7e){const _0x4c14c2=_0x55aa,_0x2d3a87=_0x46e3fb();while(!![]){try{const _0x301b0c=parseInt(_0x4c14c2(0x184))/0x1+parseInt(_0x4c14c2(0x16a))/0x2+parseInt(_0x4c14c2(0x167))/0x3+-parseInt(_0x4c14c2(0x19a))/0x4*(parseInt(_0x4c14c2(0x1b2))/0x5)+parseInt(_0x4c14c2(0x164))/0x6*(parseInt(_0x4c14c2(0x19f))/0x7)+parseInt(_0x4c14c2(0x199))/0x8*(-parseInt(_0x4c14c2(0x1a0))/0x9)+-parseInt(_0x4c14c2(0x162))/0xa*(parseInt(_0x4c14c2(0x17c))/0xb);if(_0x301b0c===_0x257f7e)break;else _0x2d3a87['push'](_0x2d3a87['shift']());}catch(_0x56462f){_0x2d3a87['push'](_0x2d3a87['shift']());}}}(_0x39f7,0x8c002));import{Plugin as _0x57a6fa}from'ckeditor5/src/core.js';import{Dialog as _0x35c0df}from'ckeditor5/src/ui.js';function _0x39f7(){const _0x3eb80c=['uc-config','_initSchema','selection','96341yTfrAs','9270sXynqx','appendChild','input[uploadcare-file-input]','isOfficialPlugin','for','commands','document','ucContextId','data-uc-image-id','config','once','conversion','locale','destroy','_initConversion','attributeToAttribute','uc-upload-ctx-provider','_configElement','12605tRzHhd','elementToAttribute','requires','replaceImageSource','join','map','7459060TIofLL','upcast','474UfbDHe','imageBlock','querySelector','3089109FFkodM','uploadcare.uploader','\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09','1838436ptSJVj','add','render','ctxElement','fromCharCode','uploadcare.pubkey','true','_initConfig','remove','schema','listenTo','_initCtx','isPremiumPlugin','init','href','configElement','editor','get','22GcLUOv','afterInit','getSelectedElement','isRegistered','_initImageProcessingIndicator','uploadcareImageId','execute','uploadcare','340997bkCwuv','downcast','_ctxElement','iconHrefResolver','getAttribute','UploadcareEditing','#uc-icon-arrow-down','contentLanguage','view','editing','insertImage','body','closeMax','uploadcareImageReplace','pluginName','uploader-','PictureEditing','extend','cleanupImage','removeAttribute','imageInline','8408kutKeh','364ztpzOY','model'];_0x39f7=function(){return _0x3eb80c;};return _0x39f7();}import{createElement as _0x3be59a,global as _0x70ec66,uid as _0x4d65ff}from'ckeditor5/src/utils.js';function _0x55aa(_0x21d10b,_0x21161a){const _0x39f708=_0x39f7();return _0x55aa=function(_0x55aadb,_0x19e4a3){_0x55aadb=_0x55aadb-0x160;let _0xab0807=_0x39f708[_0x55aadb];return _0xab0807;},_0x55aa(_0x21d10b,_0x21161a);}import{UploadcareCommand as _0x4bcb60}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x2ad8d3}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x4a2f34}from'./utils/editingutils.js';export class UploadcareEditing extends _0x57a6fa{[_0x376094(0x1b1)]=null;[_0x376094(0x186)]=null;static get[_0x376094(0x192)](){const _0x2b15a0=_0x376094;return _0x2b15a0(0x189);}static get[_0x376094(0x1b4)](){const _0xdc2a7c=_0x376094;return[_0xdc2a7c(0x194),_0x2ad8d3,_0x35c0df];}static get[_0x376094(0x1a3)](){return!0x0;}static get[_0x376094(0x176)](){return!0x0;}[_0x376094(0x1a7)];get[_0x376094(0x179)](){const _0x1ca3e0=_0x376094;return this[_0x1ca3e0(0x1b1)];}get[_0x376094(0x16d)](){const _0x14ded7=_0x376094;return this[_0x14ded7(0x186)];}constructor(_0x91767b){const _0x2fcdc7=_0x376094;super(_0x91767b),this[_0x2fcdc7(0x1a7)]=_0x4d65ff();}[_0x376094(0x177)](){const _0x3dd974=_0x376094,_0x1406ef=this[_0x3dd974(0x17a)];_0x1406ef[_0x3dd974(0x1a5)][_0x3dd974(0x16b)](_0x3dd974(0x183),new _0x4bcb60(_0x1406ef));}[_0x376094(0x17d)](){const _0x10d9b0=_0x376094;this[_0x10d9b0(0x19d)](),this[_0x10d9b0(0x1ae)](),this[_0x10d9b0(0x171)](),this[_0x10d9b0(0x175)](),this[_0x10d9b0(0x180)](),this[_0x10d9b0(0x174)](this[_0x10d9b0(0x17a)],_0x10d9b0(0x1ad),()=>{const _0x2b6253=_0x10d9b0;this[_0x2b6253(0x1b1)]&&(this[_0x2b6253(0x1b1)][_0x2b6253(0x172)](),this[_0x2b6253(0x1b1)]=null),this[_0x2b6253(0x186)]&&(this[_0x2b6253(0x186)][_0x2b6253(0x172)](),this[_0x2b6253(0x186)]=null);const _0x55d063=_0x70ec66[_0x2b6253(0x1a6)][_0x2b6253(0x166)](_0x2b6253(0x1a2));_0x55d063&&_0x55d063[_0x2b6253(0x172)]();}),async function(_0x38e05e){const _0x1d3690=_0x821afc([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x550aaa=0x535f8c3a,_0x2806a6=0x5358f1e2^_0x550aaa,_0x4ee221=window[_0x821afc([0x44,0x61,0x74,0x65])][_0x821afc([0x6e,0x6f,0x77])](),_0xc8ba29=_0x38e05e[_0x821afc([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x512477=new window[(_0x821afc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x572e9f=>{_0xc8ba29[_0x821afc([0x6f,0x6e,0x63,0x65])](_0x821afc([0x72,0x65,0x61,0x64,0x79]),_0x572e9f);}),_0x3d5f9b={[_0x821afc([0x6b,0x74,0x79])]:_0x821afc([0x45,0x43]),[_0x821afc([0x75,0x73,0x65])]:_0x821afc([0x73,0x69,0x67]),[_0x821afc([0x63,0x72,0x76])]:_0x821afc([0x50,0x2d,0x32,0x35,0x36]),[_0x821afc([0x78])]:_0x821afc([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]),[_0x821afc([0x79])]:_0x821afc([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]),[_0x821afc([0x61,0x6c,0x67])]:_0x821afc([0x45,0x53,0x32,0x35,0x36])},_0xa15b81=_0xc8ba29[_0x821afc([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x821afc([0x67,0x65,0x74])](_0x821afc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3967d4(){let _0x5232e4,_0x4034b1=null,_0x452393=null;try{if(_0xa15b81==_0x821afc([0x47,0x50,0x4c]))return _0x821afc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5232e4=_0x4fdd0b(),!_0x5232e4)return _0x821afc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5232e4[_0x821afc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x452393=_0x15a3af(_0x5232e4[_0x821afc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5232e4[_0x821afc([0x6a,0x74,0x69])])),await _0x331965()?_0x5126ab()?_0x135613()?_0x821afc([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x38e7c5()?(_0x5232e4[_0x821afc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x821afc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4034b1=_0x2bcf35(_0x821afc([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5232e4[_0x821afc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x821afc([0x74,0x72,0x69,0x61,0x6c])&&(_0x4034b1=_0x2bcf35(_0x821afc([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4e8541()):_0x821afc([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x821afc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x821afc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x821afc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x135613(){const _0x52647a=[_0x821afc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x821afc([0x74,0x72,0x69,0x61,0x6c])][_0x821afc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5232e4[_0x821afc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4ee221/0x3e8:0xe10*_0x2806a6;return _0x5232e4[_0x821afc([0x65,0x78,0x70])]<_0x52647a;}function _0x5126ab(){const _0x289131=_0x5232e4[_0x821afc([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x289131&&(!!_0x289131[_0x821afc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x821afc([0x2a]))||!!_0x289131[_0x821afc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x821afc([0x55,0x50,0x4c,0x43])));}function _0x38e7c5(){const _0x4719c9=_0x55aa,_0x5e563e=_0x5232e4[_0x821afc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5e563e||0x0==_0x5e563e[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2b4680}=new URL(window[_0x821afc([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4719c9(0x178)]);if(_0x5e563e[_0x821afc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b4680))return!0x0;const _0x4168b5=_0x2b4680[_0x821afc([0x73,0x70,0x6c,0x69,0x74])](_0x821afc([0x2e]));return _0x5e563e[_0x821afc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x756ae7=>_0x756ae7[_0x821afc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x821afc([0x2a])))[_0x821afc([0x6d,0x61,0x70])](_0xd5a3f9=>_0xd5a3f9[_0x821afc([0x73,0x70,0x6c,0x69,0x74])](_0x821afc([0x2e])))[_0x821afc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x410d55=>_0x410d55[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4168b5[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x821afc([0x6d,0x61,0x70])](_0x3295ac=>Array(_0x4168b5[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3295ac[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x821afc([0x66,0x69,0x6c,0x6c])](_0x3295ac[0x0]===_0x821afc([0x2a])?_0x821afc([0x2a]):'')[_0x821afc([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3295ac))[_0x821afc([0x73,0x6f,0x6d,0x65])](_0xc2af84=>_0x4168b5[_0x821afc([0x65,0x76,0x65,0x72,0x79])]((_0x814bac,_0x46fef1)=>_0xc2af84[_0x46fef1]===_0x814bac||_0xc2af84[_0x46fef1]===_0x821afc([0x2a])));}function _0x4e8541(){return _0x4034b1&&_0x452393?new window[(_0x821afc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x742172,_0x119867)=>{_0x4034b1[_0x821afc([0x74,0x68,0x65,0x6e])](_0x742172,_0x119867),_0x452393[_0x821afc([0x74,0x68,0x65,0x6e])](_0x3bc19f=>{_0x3bc19f!=_0x821afc([0x56,0x61,0x6c,0x69,0x64])&&_0x742172(_0x3bc19f);},_0x119867);}):_0x4034b1||_0x452393||_0x821afc([0x56,0x61,0x6c,0x69,0x64]);}}function _0x15a3af(_0x18e588,_0x69a7ce){return new window[(_0x821afc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x28847e=>{if(_0x4ba2ce())return _0x28847e(_0x821afc([0x56,0x61,0x6c,0x69,0x64]));_0x1f814a(),_0xc8ba29[_0x821afc([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x821afc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3a7489=!0x1;const _0x440f1b=_0x4d65ff();function _0x4b0a08(_0x668c75){return!!_0x668c75&&(typeof _0x668c75===_0x821afc([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x668c75===_0x821afc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x668c75[_0x821afc([0x74,0x68,0x65,0x6e])]===_0x821afc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x668c75[_0x821afc([0x63,0x61,0x74,0x63,0x68])]===_0x821afc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4ff84c(_0x38daa1){_0x581e6b(_0x38daa1)[_0x821afc([0x74,0x68,0x65,0x6e])](_0x48291f=>{if(!_0x48291f||_0x48291f[_0x821afc([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x821afc([0x6f,0x6b]))return _0x821afc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x28e8f5(_0x239ba5(_0x440f1b+_0x69a7ce))!=_0x48291f[_0x821afc([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x821afc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x821afc([0x56,0x61,0x6c,0x69,0x64]);})[_0x821afc([0x74,0x68,0x65,0x6e])](_0x18f3ac=>(_0x8cf220(),_0x18f3ac),()=>{const _0x6ab554=_0x311e72();return null==_0x6ab554?(_0x8cf220(),_0x821afc([0x56,0x61,0x6c,0x69,0x64])):_0x821afc(_0x4ee221-_0x6ab554>(0x7753083a^_0x550aaa)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x821afc([0x74,0x68,0x65,0x6e])](_0x28847e)[_0x821afc([0x63,0x61,0x74,0x63,0x68])](()=>{_0x28847e(_0x821afc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5d64f9=0x536962ba^_0x550aaa;function _0x8cf220(){const _0x5f3d04=_0x821afc([0x6c,0x6c,0x63,0x74,0x2d])+_0x28e8f5(_0x239ba5(_0x18e588)),_0x28c74a=_0x1d30f0(_0x28e8f5(window[_0x821afc([0x4d,0x61,0x74,0x68])][_0x821afc([0x63,0x65,0x69,0x6c])](_0x4ee221/_0x5d64f9)));window[_0x821afc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x821afc([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5f3d04,_0x28c74a);}function _0x311e72(){const _0x4f1b04=_0x821afc([0x6c,0x6c,0x63,0x74,0x2d])+_0x28e8f5(_0x239ba5(_0x18e588)),_0x5334b4=window[_0x821afc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x821afc([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f1b04);return _0x5334b4?window[_0x821afc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1d30f0(_0x5334b4),0x10)*_0x5d64f9:null;}function _0x581e6b(_0x4d826d){return new window[(_0x821afc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x38dc7b,_0x4605ea)=>{_0x4d826d[_0x821afc([0x74,0x68,0x65,0x6e])](_0x38dc7b,_0x4605ea),window[_0x821afc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4605ea,0x535e58fa^_0x550aaa);});}}_0xc8ba29[_0x821afc([0x6f,0x6e])](_0x821afc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xb6b412,_0x4a0899)=>{if(_0x4a0899[0x0]!=_0x18e588)return _0x28847e(_0x821afc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4a0899[0x1]={..._0x4a0899[0x1],[_0x821afc([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x440f1b};},{[_0x821afc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x821afc([0x68,0x69,0x67,0x68])}),_0xc8ba29[_0x821afc([0x6f,0x6e])](_0x821afc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4588b7=>{_0x4b0a08(_0x4588b7[_0x821afc([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3a7489=!0x0,_0x4ff84c(_0x4588b7[_0x821afc([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x821afc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x821afc([0x6c,0x6f,0x77])}),_0x512477[_0x821afc([0x74,0x68,0x65,0x6e])](()=>{_0x3a7489||_0x28847e(_0x821afc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4ba2ce(){return _0xc8ba29[_0x821afc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x821afc([0x76,0x69,0x65,0x77])][_0x821afc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x821afc([0x61,0x75,0x74,0x6f]);}function _0x1f814a(){_0xc8ba29[_0x821afc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x821afc([0x76,0x69,0x65,0x77])][_0x821afc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x821afc([0x61,0x75,0x74,0x6f]);}}function _0x2bcf35(_0x4979ac){const _0x5b3eed=[new window[(_0x821afc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x131c5b=>setTimeout(_0x131c5b,0x5356b2f6^_0x550aaa)),_0x512477[_0x821afc([0x74,0x68,0x65,0x6e])](()=>new window[(_0x821afc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1833be=>{let _0x513bd1=0x0;_0xc8ba29[_0x821afc([0x6d,0x6f,0x64,0x65,0x6c])][_0x821afc([0x6f,0x6e])](_0x821afc([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3a93e6,_0x596d90)=>{_0x596d90[0x0][_0x821afc([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x513bd1++,_0x513bd1==(0x535f89d2^_0x550aaa)&&(_0x1833be(),_0x3a93e6[_0x821afc([0x6f,0x66,0x66])]());});}))];return window[_0x821afc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x821afc([0x72,0x61,0x63,0x65])](_0x5b3eed)[_0x821afc([0x74,0x68,0x65,0x6e])](()=>_0x4979ac);}async function _0x40247b(){await _0x512477,_0xc8ba29[_0x821afc([0x6d,0x6f,0x64,0x65,0x6c])][_0x821afc([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x50ca84,_0xc8ba29[_0x821afc([0x6d,0x6f,0x64,0x65,0x6c])][_0x821afc([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x50ca84,_0xc8ba29[_0x821afc([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x821afc([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2979b4(_0x496432){const _0x5f2878=_0x5dfc2d();_0xc8ba29[_0x5f2878]=_0x821afc([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x496432,_0x496432!=_0x821afc([0x56,0x61,0x6c,0x69,0x64])&&_0x40247b();}function _0x5dfc2d(){const _0x2cc63f=window[_0x821afc([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x821afc([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x821afc([0x6e,0x6f,0x77])]())[_0x821afc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x821afc([0x2e]),'');let _0x4f4c6a=_0x821afc([0x68]);for(let _0x43669d=0x0;_0x43669d<_0x2cc63f[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x43669d+=0x2){let _0x9ede59=window[_0x821afc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2cc63f[_0x821afc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x43669d,_0x43669d+0x2));_0x9ede59>=_0x1d3690[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x9ede59-=_0x1d3690[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4f4c6a+=_0x1d3690[_0x9ede59];}return _0x4f4c6a;}function _0x4fdd0b(){const _0x5468d0=_0xa15b81[_0x821afc([0x73,0x70,0x6c,0x69,0x74])](_0x821afc([0x2e]));if(0x3!=_0x5468d0[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x90b656(_0x5468d0[0x1]);function _0x90b656(_0x3f7d19){const _0x397bed=_0x5c6f34(_0x3f7d19);return _0x397bed&&_0x2e1d9a()?_0x397bed:null;function _0x2e1d9a(){const _0x480063=_0x397bed[_0x821afc([0x6a,0x74,0x69])],_0x22dada=window[_0x821afc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x480063[_0x821afc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x480063[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xbc24a2={..._0x397bed,[_0x821afc([0x6a,0x74,0x69])]:_0x480063[_0x821afc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x480063[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xbc24a2[_0x821afc([0x76,0x63])],_0x239ba5(_0xbc24a2)==_0x22dada;}}}async function _0x331965(){let _0x30feb0=!0x0;try{const _0x236c82=_0xa15b81[_0x821afc([0x73,0x70,0x6c,0x69,0x74])](_0x821afc([0x2e])),[_0x25f77b,_0x3de70c,_0x58d512]=_0x236c82;return _0x40d5d3(_0x25f77b),await _0x195961(_0x25f77b,_0x3de70c,_0x58d512),_0x30feb0;}catch{return!0x1;}function _0x40d5d3(_0x1082a7){const _0x5eb68c=_0x5c6f34(_0x1082a7);_0x5eb68c&&_0x5eb68c[_0x821afc([0x61,0x6c,0x67])]==_0x821afc([0x45,0x53,0x32,0x35,0x36])||(_0x30feb0=!0x1);}async function _0x195961(_0xcfd2bd,_0x27e5b7,_0x287efa){const _0x14d432=window[_0x821afc([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x821afc([0x66,0x72,0x6f,0x6d])](_0x14f775(_0x287efa),_0x4dec12=>_0x4dec12[_0x821afc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2aa179=new window[(_0x821afc([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x821afc([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xcfd2bd+_0x821afc([0x2e])+_0x27e5b7),_0x4fd1a6=window[_0x821afc([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x821afc([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4fd1a6)return;const _0x4ec7c1=await _0x4fd1a6[_0x821afc([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x821afc([0x6a,0x77,0x6b]),_0x3d5f9b,{[_0x821afc([0x6e,0x61,0x6d,0x65])]:_0x821afc([0x45,0x43,0x44,0x53,0x41]),[_0x821afc([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x821afc([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x821afc([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4fd1a6[_0x821afc([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x821afc([0x6e,0x61,0x6d,0x65])]:_0x821afc([0x45,0x43,0x44,0x53,0x41]),[_0x821afc([0x68,0x61,0x73,0x68])]:{[_0x821afc([0x6e,0x61,0x6d,0x65])]:_0x821afc([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4ec7c1,_0x14d432,_0x2aa179)||(_0x30feb0=!0x1);}}function _0x5c6f34(_0x2ac241){return _0x2ac241[_0x821afc([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x821afc([0x65,0x79]))?JSON[_0x821afc([0x70,0x61,0x72,0x73,0x65])](_0x14f775(_0x2ac241)):null;}function _0x14f775(_0xf15433){return window[_0x821afc([0x61,0x74,0x6f,0x62])](_0xf15433[_0x821afc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x821afc([0x2b]))[_0x821afc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x821afc([0x2f])));}function _0x239ba5(_0x1d8a1c){let _0x346f89=0x1505;function _0x5eff99(_0x40259f){for(let _0x253b4a=0x0;_0x253b4a<_0x40259f[_0x821afc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x253b4a++){const _0x4624ad=_0x40259f[_0x821afc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x253b4a);_0x346f89=(_0x346f89<<0x5)+_0x346f89+_0x4624ad,_0x346f89&=_0x346f89;}}function _0x25c6f9(_0x357541){Array[_0x821afc([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x357541)?_0x357541[_0x821afc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x25c6f9):_0x357541&&typeof _0x357541==_0x821afc([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x821afc([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x357541)[_0x821afc([0x73,0x6f,0x72,0x74])]()[_0x821afc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4b868f,_0x347758])=>{_0x5eff99(_0x4b868f),_0x25c6f9(_0x347758);}):_0x5eff99(window[_0x821afc([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x357541));}return _0x25c6f9(_0x1d8a1c),_0x346f89>>>0x0;}function _0x28e8f5(_0x59e828){return _0x59e828[_0x821afc([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x821afc([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x821afc([0x30]));}function _0x1d30f0(_0x4564f3){return _0x4564f3[_0x821afc([0x73,0x70,0x6c,0x69,0x74])]('')[_0x821afc([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x821afc([0x6a,0x6f,0x69,0x6e])]('');}function _0x50ca84(){}function _0x821afc(_0x41e636){const _0x27d05a=_0x55aa;return _0x41e636[_0x27d05a(0x161)](_0x58a858=>String[_0x27d05a(0x16e)](_0x58a858))[_0x27d05a(0x160)]('');}_0x2979b4(await _0x3967d4());}(this);}[_0x376094(0x19d)](){const _0x3d1dc6=_0x376094,_0x2cc32d=this[_0x3d1dc6(0x17a)][_0x3d1dc6(0x19b)][_0x3d1dc6(0x173)];_0x2cc32d[_0x3d1dc6(0x17f)](_0x3d1dc6(0x165))&&_0x2cc32d[_0x3d1dc6(0x195)](_0x3d1dc6(0x165),{'allowAttributes':[_0x3d1dc6(0x181)]}),_0x2cc32d[_0x3d1dc6(0x17f)](_0x3d1dc6(0x198))&&_0x2cc32d[_0x3d1dc6(0x195)](_0x3d1dc6(0x198),{'allowAttributes':[_0x3d1dc6(0x181)]});}[_0x376094(0x1ae)](){const _0x287bca=_0x376094,_0x574fac=this[_0x287bca(0x17a)];_0x574fac[_0x287bca(0x1ab)][_0x287bca(0x1a4)](_0x287bca(0x185))[_0x287bca(0x1af)]({'model':_0x287bca(0x181),'view':_0x287bca(0x1a8)}),_0x574fac[_0x287bca(0x1ab)][_0x287bca(0x1a4)](_0x287bca(0x163))[_0x287bca(0x1b3)]({'model':{'key':_0x287bca(0x181),'value':_0x370b50=>_0x370b50[_0x287bca(0x188)](_0x287bca(0x1a8))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5d102e=_0x574fac[_0x287bca(0x1a5)][_0x287bca(0x17b)](_0x287bca(0x1b5));_0x5d102e&&this[_0x287bca(0x174)](_0x5d102e,_0x287bca(0x196),(_0x43a5c4,[_0x4043f0,_0x3bde62])=>{const _0x4d68ac=_0x287bca;_0x4043f0[_0x4d68ac(0x197)](_0x4d68ac(0x181),_0x3bde62);});}[_0x376094(0x171)](){const _0x35d5c5=_0x376094,_0x25b522=this[_0x35d5c5(0x17a)][_0x35d5c5(0x1a9)][_0x35d5c5(0x17b)](_0x35d5c5(0x168))||{},_0x445cf5=this[_0x35d5c5(0x17a)][_0x35d5c5(0x1a9)][_0x35d5c5(0x17b)](_0x35d5c5(0x16f))||'';this[_0x35d5c5(0x1b1)]=_0x3be59a(_0x70ec66[_0x35d5c5(0x1a6)],_0x35d5c5(0x19c),{..._0x25b522,'pubkey':_0x445cf5,'ctx-name':_0x35d5c5(0x193)+this[_0x35d5c5(0x1a7)],'sourceList':'','imgOnly':_0x35d5c5(0x170),'removeCopyright':_0x35d5c5(0x170),'localeName':this[_0x35d5c5(0x17a)][_0x35d5c5(0x1ac)][_0x35d5c5(0x18b)],'externalSourcesEmbedCss':_0x35d5c5(0x169)}),this[_0x35d5c5(0x1b1)][_0x35d5c5(0x187)]=_0x20db24=>{const _0x3c49ae=_0x35d5c5;if(_0x3c49ae(0x190)==_0x20db24)return _0x3c49ae(0x18a);},_0x70ec66[_0x35d5c5(0x1a6)][_0x35d5c5(0x18f)][_0x35d5c5(0x1a1)](this[_0x35d5c5(0x1b1)]);}[_0x376094(0x175)](){const _0x1b6166=_0x376094;this[_0x1b6166(0x186)]=_0x3be59a(_0x70ec66[_0x1b6166(0x1a6)],_0x1b6166(0x1b0),{'ctx-name':_0x1b6166(0x193)+this[_0x1b6166(0x1a7)]}),_0x70ec66[_0x1b6166(0x1a6)][_0x1b6166(0x18f)][_0x1b6166(0x1a1)](this[_0x1b6166(0x186)]);}[_0x376094(0x180)](){const _0x26b056=_0x376094,_0x250476=this[_0x26b056(0x17a)][_0x26b056(0x1a5)][_0x26b056(0x17b)](_0x26b056(0x18e));_0x250476&&this[_0x26b056(0x174)](_0x250476,_0x26b056(0x182),()=>{const _0x283afa=_0x26b056,_0x147eac=this[_0x283afa(0x17a)][_0x283afa(0x19b)][_0x283afa(0x1a6)][_0x283afa(0x19e)][_0x283afa(0x17e)]();_0x147eac&&_0x147eac[_0x283afa(0x188)](_0x283afa(0x181))&&this[_0x283afa(0x17a)][_0x283afa(0x18d)][_0x283afa(0x18c)][_0x283afa(0x1aa)](_0x283afa(0x16c),()=>{const _0x20e3cd=_0x283afa;_0x4a2f34(this[_0x20e3cd(0x17a)],_0x147eac);});});const _0x53ad32=this[_0x26b056(0x17a)][_0x26b056(0x1a5)][_0x26b056(0x17b)](_0x26b056(0x191));_0x53ad32&&this[_0x26b056(0x174)](_0x53ad32,_0x26b056(0x182),()=>{const _0x41ce65=_0x26b056,_0x7bf69c=this[_0x41ce65(0x17a)][_0x41ce65(0x19b)][_0x41ce65(0x1a6)][_0x41ce65(0x19e)][_0x41ce65(0x17e)]();_0x7bf69c&&_0x7bf69c[_0x41ce65(0x188)](_0x41ce65(0x181))&&this[_0x41ce65(0x17a)][_0x41ce65(0x18d)][_0x41ce65(0x18c)][_0x41ce65(0x1aa)](_0x41ce65(0x16c),()=>{const _0x587724=_0x41ce65;_0x4a2f34(this[_0x587724(0x17a)],_0x7bf69c);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x4ff9e3,ObservableMixin as _0x1df00b}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x35cbb2}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x29f055}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x3caa03}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x306019}from'../../utils/uploadutils.js';import{getImageUrls as _0x2a6451,getImageDimension as _0x5d59c0}from'../../utils/editingutils.js';import{isAncestor as _0x35c99d}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1df00b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1a6ea8,_0x4e0c36,_0x1af0d2){super(),this['_editor']=_0x1a6ea8,this['_dialog']=_0x4e0c36,this['_imageElement']=_0x1af0d2,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 _0x2c30b0=this['_imageElement'],_0x209c0e=_0x2c30b0['getAttribute']('uploadcareImageId'),_0x1add2e=_0x2c30b0['getAttribute']('src');if(_0x209c0e)await this['_loadImageInfo'](_0x209c0e,_0x1add2e);else{if(this['_imageCache']['has'](_0x1add2e)){const _0x2a770e=this['_imageCache']['get'](_0x1add2e);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2a770e['url'],this['imageDimension']=_0x2a770e['dimension'],this['imageId']=_0x2a770e['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x47f6d2}=this['_editor'],t=_0x47f6d2['t'],_0xe0d592=new _0x3caa03(_0x47f6d2,this['imageStatus'],this['_attributes']);_0xe0d592['bind']('status')['to'](this,'imageStatus'),_0xe0d592['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xe0d592['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xe0d592['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xe0d592,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x29f055,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xe0d592,'position':_0x35cbb2['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xe0d592['focus']();},'onHide':()=>{_0xe0d592['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3d9c7a=>!_0x35c99d(_0x3d9c7a,_0xe0d592['element'])}});}['_loadImageInfo'](_0x1fac67,_0x348908){return _0x306019['getInfo'](_0x1fac67,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0xff52c2=>{const {width:_0x46f5d7,height:_0x5d0b05}=_0xff52c2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x348908,this['imageDimension']={'width':_0x46f5d7,'height':_0x5d0b05},this['imageId']=_0x1fac67;})['catch'](_0x456c24=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x456c24['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x154ad6,_0x380d78){return this['_getImageAsFile'](_0x154ad6)['then'](_0x480399=>_0x306019['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':_0x380d78['signal'],'file':_0x480399,'onProgress':_0x5a2e37=>{_0x5a2e37&&_0x5a2e37['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5a2e37['value']));}}))['then'](_0x583297=>{const {width:_0x13f86d,height:_0x1e0496}=_0x583297['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x583297['cdnUrl'],this['imageDimension']={'width':_0x13f86d,'height':_0x1e0496},this['imageId']=_0x583297['uuid'],this['imageUploadProgress']=null;const _0x228d63=_0x154ad6['getAttribute']('src');this['_imageCache']['set'](_0x228d63,{'id':_0x583297['uuid'],'url':_0x583297['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x38011f=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x38011f['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x24300a,_0x4a64ab){_0x24300a['on']('apply',(_0x238424,_0x30bd75)=>{this['_replaceImage'](_0x4a64ab,_0x30bd75['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x24300a['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x24300a['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x469c3f,_0x17d78b,_0x408dac){const _0x2d55a3=this['_editor'],{width:_0x86ea91,height:_0x428501}=_0x5d59c0(_0x17d78b,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x8e0e1f,imageSources:_0x3343ae}=_0x2a6451(_0x17d78b,_0x86ea91);_0x2d55a3['model']['change'](_0x19de99=>{if('$graveyard'===_0x469c3f['root']['rootName']){_0x2d55a3['execute']('insertImage',{'imageType':_0x469c3f['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x469c3f['getAttributes']()),'uploadcareImageId':_0x408dac,'src':_0x8e0e1f,'sources':_0x3343ae,'width':_0x86ea91,'height':_0x428501}});const _0x18ebbb=_0x469c3f['getChildren']();_0x469c3f=_0x2d55a3['model']['document']['selection']['getSelectedElement']();for(const _0x326b12 of _0x18ebbb)_0x19de99['append'](_0x19de99['cloneElement'](_0x326b12),_0x469c3f);}else _0x19de99['setSelection'](_0x469c3f,'on'),_0x2d55a3['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x469c3f['getAttributes']()),'uploadcareImageId':_0x408dac,'src':_0x8e0e1f,'sources':_0x3343ae,'width':_0x86ea91,'height':_0x428501},_0x469c3f);_0x19de99['setSelection'](_0x469c3f,'on');});}async['_getImageAsFile'](_0xb2e0ee){const _0x305c11=_0x4ff9e3['window'],_0x7f27b6=_0x4ff9e3['document']['location']['href'],_0x11cf9f=new _0x305c11['URL'](_0xb2e0ee['getAttribute']('src'),_0x7f27b6);if('data:'===_0x11cf9f['protocol']){const _0x4a0c96=_0x11cf9f['href']['split'](','),_0x54075c=_0x4a0c96[0x0]['match'](/:(.*?);/)[0x1],_0x294d04=_0x54075c['split']('/')[0x1],_0x5d5e8a=_0x305c11['atob'](_0x4a0c96[_0x4a0c96['length']-0x1]);let _0x2677d4=_0x5d5e8a['length'];const _0x57d745=new _0x305c11['Uint8Array'](_0x2677d4);for(;_0x2677d4--;)_0x57d745[_0x2677d4]=_0x5d5e8a['charCodeAt'](_0x2677d4);return new _0x305c11['File']([_0x57d745],'image.'+_0x294d04,{'type':_0x54075c});}const _0x5c6ec7=_0x11cf9f['href']['split']('/'),_0x45691a=_0x5c6ec7[_0x5c6ec7['length']-0x1],_0x43a5a0=_0x45691a['split']('.')[0x1];return _0x305c11['fetch'](_0x11cf9f['href'])['then'](_0x4a9319=>_0x4a9319['clone']()['blob']())['then'](_0xcf6b85=>new _0x305c11['File']([_0xcf6b85],_0x45691a,{'type':'image/'+_0x43a5a0}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x4bbb0a,_0x3fac90){const _0x374b0c=_0x7dd6,_0x1b4b7c=_0x4bbb0a();while(!![]){try{const _0x3bff0a=-parseInt(_0x374b0c(0x19c))/0x1+parseInt(_0x374b0c(0x1a4))/0x2*(-parseInt(_0x374b0c(0x19e))/0x3)+-parseInt(_0x374b0c(0x19d))/0x4*(parseInt(_0x374b0c(0x1a1))/0x5)+parseInt(_0x374b0c(0x197))/0x6+parseInt(_0x374b0c(0x1a8))/0x7+parseInt(_0x374b0c(0x19f))/0x8*(-parseInt(_0x374b0c(0x198))/0x9)+parseInt(_0x374b0c(0x1a2))/0xa*(parseInt(_0x374b0c(0x19a))/0xb);if(_0x3bff0a===_0x3fac90)break;else _0x1b4b7c['push'](_0x1b4b7c['shift']());}catch(_0xd58ee7){_0x1b4b7c['push'](_0x1b4b7c['shift']());}}}(_0x12fd,0xdeb75));import{View as _0x4ebdee}from'ckeditor5/src/ui.js';function _0x12fd(){const _0xdb109f=['ck-uploadcare-theme','setTemplate','10594367OkUHlu','bindTemplate','1439214vZFfpX','8389323GrlQPU','image-edit','22khJQUR','uc-light','581496jhfXrc','4eJAzIL','5007iGtqjT','8biWKph','uc-cloud-image-editor','7907705gUkMqA','13364990Qsxsur','imageSrc','502grQPdn','set'];_0x12fd=function(){return _0xdb109f;};return _0x12fd();}function _0x7dd6(_0x37d55d,_0x4b7110){const _0x12fd28=_0x12fd();return _0x7dd6=function(_0x7dd6b1,_0x1e52d1){_0x7dd6b1=_0x7dd6b1-0x197;let _0x5421ad=_0x12fd28[_0x7dd6b1];return _0x5421ad;},_0x7dd6(_0x37d55d,_0x4b7110);}export class UploadcareImageEditFormEditingView extends _0x4ebdee{constructor(_0x9686bf,_0x3d8b40){const _0x121fb1=_0x7dd6;super(_0x9686bf);const _0x136e9a=this[_0x121fb1(0x1a9)];this[_0x121fb1(0x1a5)](_0x121fb1(0x1a3),''),this[_0x121fb1(0x1a7)]({'tag':_0x121fb1(0x1a0),'attributes':{..._0x3d8b40,'class':[_0x121fb1(0x19b),_0x121fb1(0x1a6)],'ctx-name':_0x121fb1(0x199),'cdn-url':_0x136e9a['to'](_0x121fb1(0x1a3))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x4024d6}from'ckeditor5/src/icons.js';import{ButtonView as _0x498d0d,IconView as _0x2f7568,View as _0x371cdf}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x371cdf{constructor(_0x4b4717){super(_0x4b4717);const t=_0x4b4717['t'];this['set']('errorType',null);const _0x2a5212=new _0x498d0d(_0x4b4717);_0x2a5212['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x2a5212['withText']=!0x0,_0x2a5212['class']='ck-button-action',_0x2a5212['on']('execute',()=>{this['fire']('retry');}),_0x2a5212['bind']('isVisible')['to'](this,'errorType',_0x3ca368=>'NotFound'!==_0x3ca368);const _0x42ecec=new _0x2f7568();_0x42ecec['content']=_0x4024d6,_0x42ecec['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x47c708=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':[_0x42ecec,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x47c708['to']('errorType',_0x1b715f=>t('NotFound'!==_0x1b715f?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x2a5212]},{'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'}]}]}]});}}
|