@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20250524.0 → 0.0.0-nightly-20250525.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/uploadcareimageedit/uploadcareimagereplacecommand.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 _0x4daa69,Command as _0x487dc3}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x5310b,IconGooglePhotos as _0x1986a7,IconGoogleDrive as _0x5b5d56,IconFacebook as _0x15e34f,IconDropbox as _0x4ce0c9,IconUploadcareLink as _0x17f9ce,IconUploadcareImageUpload as _0x56362c,IconError as et,IconUploadcareImageEdit as _0x35d3d0}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xc33676,MenuBarMenuListItemButtonView as _0x34a21a,View as _0x5e3cbd,FocusCycler as _0x384813,Dialog as _0x452c78,DialogViewPosition as _0x37b78f,SpinnerView as _0x5f0405,IconView as at,Notification as _0x5bdaf4}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2b8415,DomEmitterMixin as _0x430019,global as _0x169304,getAncestors as _0x4eaa4b,ObservableMixin as _0x48cde8,createElement as _0x28e428,uid as _0x37fad2}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x199b70}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x1ead00,info as _0x453766}from'@uploadcare/upload-client';import*as _0x44bfc2 from'@uploadcare/file-uploader';var o=function(_0x32d875){return _0x32d875['Local']='local',_0x32d875['URL']='url',_0x32d875['Dropbox']='dropbox',_0x32d875['GDrive']='gdrive',_0x32d875['Facebook']='facebook',_0x32d875['GPhotos']='gphotos',_0x32d875['OneDrive']='onedrive',_0x32d875;}({});function _(_0x58db01,_0x45bb6c,_0x249c1f){const t=_0x58db01['t'],_0x159b0b=_0x58db01['t'];switch(_0x45bb6c){case o['Local']:return{'text':_0x159b0b('Insert'===_0x249c1f?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x159b0b('From\x20computer')};case o['URL']:return{'text':'Insert'===_0x249c1f?_0x159b0b('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x159b0b('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0x249c1f?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0x249c1f?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0x249c1f?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0x249c1f?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['OneDrive']:return{'text':t('Insert'===_0x249c1f?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x45bb6c;}}class e extends _0x4daa69{['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 _0x4981be=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xb11ac9;for(const _0x57072b in _0x4981be){const _0x2f9940=_0x57072b,_0x1965b2=_0x4981be[_0x2f9940];if('uploadcareLicenseKeyValid'==_0x1965b2||'uploadcareLicenseKeyInvalid'==_0x1965b2||'uploadcareLicenseKeyExpired'==_0x1965b2||'uploadcareLicenseKeyDomainLimit'==_0x1965b2||'uploadcareLicenseKeyNotAllowed'==_0x1965b2||'uploadcareLicenseKeyEvaluationLimit'==_0x1965b2||'uploadcareLicenseKeyTrialLimit'==_0x1965b2||'uploadcareLicenseKeyUsageLimit'==_0x1965b2){delete _0x4981be[_0x2f9940],_0xb11ac9=_0x1965b2,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0xb11ac9&&_0x4981be['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0xb11ac9&&_0x4981be['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0xb11ac9&&_0x4981be['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0xb11ac9&&_0x4981be['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0xb11ac9&&_0x4981be['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0xb11ac9&&_0x4981be['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0xb11ac9&&_0x4981be['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x3ed9d7}=this,_0x56bed7=_0x3ed9d7['commands']['get']('uploadcare');if(!_0x56bed7)return;const _0x2d1fa5=this['_normalizeConfigSourceList'](_0x3ed9d7['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x34bc9a,_0x438332)=>{const _0x41edb3=this['_getIntegrationKey'](_0x438332['type']);return _0x34bc9a[_0x41edb3]||(_0x34bc9a[_0x41edb3]=[]),_0x34bc9a[_0x41edb3]['push'](_0x438332),_0x34bc9a;},{});_0x3ed9d7['plugins']['has']('ImageInsertUI')&&_0x3ed9d7['commands']['get']('uploadcare')&&Object['entries'](_0x2d1fa5)['forEach'](([_0x15619f,_0x19754a])=>{_0x3ed9d7['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x15619f,'observable':()=>_0x56bed7,'buttonViewCreator':()=>this['_createToolbarButton'](_0x19754a),'formViewCreator':()=>this['_createDropdownButtons'](_0x19754a),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x19754a),'override':'assetManager'!==_0x15619f});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x35da63){const {locale:_0x4ce4c7}=this['editor'];return _0x35da63['map'](_0x57bde9=>{const _0x829f9a=_(_0x4ce4c7,_0x57bde9,'Insert');switch(_0x57bde9){case o['Local']:return{'icon':_0x56362c,'type':o['Local'],..._0x829f9a};case o['URL']:return{'icon':_0x17f9ce,'type':o['URL'],..._0x829f9a};case o['Dropbox']:return{'icon':_0x4ce0c9,'type':o['Dropbox'],..._0x829f9a};case o['Facebook']:return{'icon':_0x15e34f,'type':o['Facebook'],..._0x829f9a};case o['GDrive']:return{'icon':_0x5b5d56,'type':o['GDrive'],..._0x829f9a};case o['GPhotos']:return{'icon':_0x1986a7,'type':o['GPhotos'],..._0x829f9a};case o['OneDrive']:return{'icon':_0x5310b,'type':o['OneDrive'],..._0x829f9a};}});}['_getIntegrationKey'](_0x4836e8){switch(_0x4836e8){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x5479e1,_0x26e496){const _0x44f66d=this['editor'],_0x2a06f3=new _0x5479e1(_0x44f66d['locale']),_0x195032=_0x44f66d['commands']['get']('uploadcare');return _0x2a06f3['bind']('isEnabled')['to'](_0x195032),_0x2a06f3['on']('execute',()=>{_0x195032['execute'](_0x26e496);}),_0x2a06f3;}['_createToolbarButton'](_0xe7c17d){const {locale:_0xb686c}=this['editor'],_0x3e73c0=this['editor']['plugins']['get']('ImageInsertUI'),_0x19f404=_0xe7c17d[0x0],_0x3f6ef8=this['_createButton'](_0xc33676,_0x19f404['type']);return _0x3f6ef8['icon']=_0x19f404['icon'],_0x3f6ef8['bind']('label')['to'](_0x3e73c0,'isImageSelected',_0x5d9f49=>_(_0xb686c,_0x19f404['type'],_0x5d9f49?'Replace':'Insert')['text']),_0x3f6ef8['tooltip']=!0x0,_0x3f6ef8;}['_createDropdownButtons'](_0x26a99b){const {locale:_0xd6c5b8}=this['editor'],_0xb16389=this['editor']['plugins']['get']('ImageInsertUI');return _0x26a99b['map'](_0x14391=>{const _0x205412=this['_createButton'](_0xc33676,_0x14391['type']);return _0x205412['withText']=!0x0,_0x205412['icon']=_0x14391['icon'],_0x205412['bind']('label')['to'](_0xb16389,'isImageSelected',_0x19571a=>_(_0xd6c5b8,_0x14391['type'],_0x19571a?'Replace':'Insert')['text']),_0x205412;});}['_createMenuBarButtons'](_0x5234ad){return _0x5234ad['map'](_0xa3edcd=>{const _0xfdd60a=this['_createButton'](_0x34a21a,_0xa3edcd['type']);return _0xfdd60a['icon']=_0xa3edcd['icon'],_0xfdd60a['label']=_0xa3edcd['shortText'],_0xfdd60a;});}}class q extends _0x5e3cbd{['focusTracker'];['focusCycler'];constructor(_0x1b7d6d){super(_0x1b7d6d),this['focusTracker']=new _0x2b8415(),this['focusCycler']=new _0x384813({'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 S extends q{constructor(_0x28bce7){super(_0x28bce7),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'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x5c490d,_0x216da5){const _0x1b7a60=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x462727=>_0x462727<=_0x216da5)['map'](_0x55e799=>_0x5c490d['replace'](/\/$/,'')+'/-/resize/'+_0x55e799+'x/\x20'+_0x55e799+'w');return{'imageFallbackUrl':_0x5c490d,'imageSources':[{'srcset':_0x1b7a60['join'](',\x20'),'sizes':'(max-width:\x20'+_0x216da5+'px)\x20100vw,\x20'+_0x216da5+'px','type':'image/webp'}]};}function A(_0x563a25,_0x3be240,_0x4d100d){const _0x59d1d0=_0x563a25['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x59d1d0?parseInt(_0x59d1d0[0x1],0xa):_0x3be240,'height':_0x59d1d0?parseInt(_0x59d1d0[0x2],0xa):_0x4d100d};}function m(_0x2843f3,_0x11ee7b){const _0x3cf324=Object['create'](_0x430019),_0x5789d3=_0x2843f3['plugins']['get']('ImageUtils'),_0x477bdc=_0x2843f3['editing']['mapper']['toViewElement'](_0x11ee7b),_0x51d441=_0x5789d3['findViewImgElement'](_0x477bdc),_0x58ab27=_0x2843f3['editing']['view']['domConverter']['viewToDom'](_0x51d441),_0x3acce2=_0x11ee7b['getAttribute']('width'),_0x20ec07=_0x11ee7b['getAttribute']('height'),_0x59da1e='image-processing';_0x2843f3['editing']['view']['change'](_0xc01c9e=>{_0xc01c9e['addClass'](_0x59da1e,_0x477bdc),_0xc01c9e['setStyle']('aspect-ratio',_0x3acce2+'/'+_0x20ec07,_0x51d441);}),_0x3cf324['listenTo'](_0x58ab27,'load',()=>{_0x3cf324['stopListening'](_0x58ab27,'load'),_0x2843f3['editing']['view']['change'](_0x3b8ca7=>{_0x3b8ca7['removeClass'](_0x59da1e,_0x477bdc),_0x3b8ca7['removeStyle']('aspect-ratio',_0x51d441);});});}function V(_0x8c3a93){if(Array['isArray'](_0x8c3a93)){const _0x34c3eb=_0x8c3a93['map'](V);return _0x2410f5=>_0x34c3eb['some'](_0x2789a2=>_0x2789a2(_0x2410f5));}if('origin'==_0x8c3a93){const _0x1e5e92=_0x169304['window']['location']['origin'];return _0x5d9ebf=>new URL(_0x5d9ebf,_0x169304['document']['baseURI'])['origin']==_0x1e5e92;}return'function'==typeof _0x8c3a93?_0x8c3a93:_0x8c3a93 instanceof RegExp?_0x86e84b=>!(!_0x86e84b['match'](_0x8c3a93)&&!_0x86e84b['replace'](/^https?:\/\//,'')['match'](_0x8c3a93)):()=>!0x1;}function F(_0x2ace2e,_0xe14b86){return _0x4eaa4b(_0x2ace2e['target'])['includes'](_0xe14b86);}class l extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x48cde8(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x311b34,_0x3efd36,_0x15cbc3){super(),this['_editor']=_0x311b34,this['_editing']=_0x3efd36,this['_dialog']=_0x311b34['plugins']['get'](_0x452c78),this['_api']=_0x3efd36['ctxElement']['getAPI'](),this['_type']=_0x15cbc3,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:_0x4bf5f5,model:_0x472a99}=this['_editor'],_0x3fc21a=_0x472a99['document']['selection']['getSelectedElement'](),_0x39e0bb=_0x3fc21a&&(_0x3fc21a['is']('element','imageBlock')||_0x3fc21a['is']('element','imageInline'));this['_formView']=new S(_0x4bf5f5),this['_dialog']['show']({'id':'uploadCare','icon':_0x56362c,'title':_(_0x4bf5f5,this['_type'],_0x39e0bb?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x37b78f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x594df6=>!F(_0x594df6,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x486fee}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x2efa8d=>{const _0x1eae12=_0x486fee['length'];for(const _0x4ed838 of _0x486fee){const _0x7a9158=_0x4ed838===_0x486fee[_0x1eae12-0x1],{cdnUrl:_0x520077,fileInfo:_0x5c35f5}=_0x4ed838;if(!_0x520077||!_0x5c35f5)continue;const {width:_0x4737c,height:_0x2b074f}=_0x5c35f5['imageInfo'],_0x1964eb=A(_0x520077,_0x4737c,_0x2b074f),_0x1e5ea7=E(_0x520077,_0x1964eb['width']),_0x1a7b69={'id':_0x5c35f5['uuid'],'type':'image','attributes':{'imageDimension':_0x1964eb,..._0x1e5ea7}};this['_insertAsset'](_0x1a7b69,_0x7a9158,_0x2efa8d);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x54059d=>{'idle'===_0x54059d['detail']['status']&&!_0x54059d['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x1fca26,_0x496a52,_0x489d05){const _0x511dad=this['_editor']['model']['document']['selection'],_0x16495a=_0x511dad['getSelectedElement'](),_0x5ecb64=!(!_0x16495a||!_0x16495a['is']('element','imageInline'));_0x489d05['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x1fca26,_0x5ecb64),_0x496a52||_0x489d05['setSelection'](_0x511dad['getLastPosition']());}['_insertImage'](_0x44f178,_0xabb837){const _0x12bd9e=this['_editor'],{imageDimension:_0x401928,imageFallbackUrl:_0x1f9ad3,imageSources:_0x78e725}=_0x44f178['attributes'];_0x12bd9e['execute']('insertImage',{'imageType':_0xabb837?'imageInline':null,'source':{'uploadcareImageId':_0x44f178['id'],'src':_0x1f9ad3,'sources':_0x78e725,..._0x401928}});}}class n extends _0x487dc3{['_editing'];['_controller']=null;static get['requires'](){return[_0x452c78,i];}constructor(_0x3af612){super(_0x3af612),this['_editing']=_0x3af612['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x5d4ff6){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x5d4ff6);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x1a3690,publicKey:_0x4292da,signal:_0x12734f,onProgress:_0x4fe57f}){return _0x1ead00(_0x1a3690,{'publicKey':_0x4292da,'store':'auto','signal':_0x12734f,'onProgress':_0x4fe57f});}static['getInfo'](_0x4426d6,_0x1965f7){return _0x453766(_0x4426d6,_0x1965f7);}}class p extends _0x4daa69{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x199b70,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0xe12f8=this['editor'];if(!!!_0xe12f8['config']['get']('uploadcare'))return;_0xe12f8['plugins']['get'](_0x199b70)['createUploadAdapter']=_0x2c079c=>new x(_0x2c079c,_0xe12f8),_0xe12f8['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x26b0b3,{imageElement:_0x74ef81,data:_0x49760a})=>{_0xe12f8['model']['change'](_0x410d08=>{_0x410d08['setAttribute']('uploadcareImageId',_0x49760a['uploadcareImageId'],_0x74ef81);});});}}class x{['loader'];['editor'];['controller'];constructor(_0xaac1d4,_0xfe6819){this['loader']=_0xaac1d4,this['editor']=_0xfe6819,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x517197=this['editor']['config']['get']('uploadcare.pubkey'),_0x414911=await this['loader']['file'];return C['upload']({'file':_0x414911,'publicKey':_0x517197,'signal':this['controller']['signal'],'onProgress':_0x3a89bb=>{_0x3a89bb&&_0x3a89bb['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3a89bb['value']);}})['then'](async _0x2548e6=>{const {imageFallbackUrl:_0x405450,imageSources:_0x3e0e45}=E(_0x2548e6['cdnUrl'],_0x2548e6['imageInfo']['width']);return{'uploadcareImageId':_0x2548e6['uuid'],'default':_0x405450,'sources':_0x3e0e45};})['catch'](()=>{const _0x52d719=t('Cannot\x20upload\x20file:')+('\x20'+_0x414911['name']+'.');return Promise['reject'](_0x52d719);});}['abort'](){this['controller']['abort']();}}class i extends _0x4daa69{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x452c78];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x40d5dc=this['editor'];_0x40d5dc['commands']['add']('uploadcare',new n(_0x40d5dc));}['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 _0x4ede0f=_0x169304['document']['querySelector']('input[uploadcare-file-input]');_0x4ede0f&&_0x4ede0f['remove']();}),async function(_0x198ae8){const _0x2cd6f7=_0x29cbc9([0x50,0x62,0x4d,0x54,0x78,0x73,0x6f,0x4e,0x58,0x38,0x43,0x41,0x76,0x55,0x45,0x56,0x36,0x75,0x34,0x74,0x46,0x65,0x32,0x68,0x6e,0x42,0x66,0x39,0x6b,0x4f,0x57,0x6c,0x71,0x67,0x64,0x61,0x63,0x49,0x35,0x4a,0x4c,0x79,0x6d,0x7a,0x69,0x77,0x51,0x31,0x5a,0x33,0x44,0x70,0x52,0x4b,0x37,0x53,0x47,0x48,0x59,0x6a,0x30,0x72]),_0x5a0725=0x529025cf,_0x12ebd7=0x52974d0f^_0x5a0725,_0x468765=window[_0x29cbc9([0x44,0x61,0x74,0x65])][_0x29cbc9([0x6e,0x6f,0x77])](),_0x3c3a28=_0x198ae8[_0x29cbc9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4b5a2b=new window[(_0x29cbc9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a8907=>{_0x3c3a28[_0x29cbc9([0x6f,0x6e,0x63,0x65])](_0x29cbc9([0x72,0x65,0x61,0x64,0x79]),_0x4a8907);}),_0x56714a={[_0x29cbc9([0x6b,0x74,0x79])]:_0x29cbc9([0x45,0x43]),[_0x29cbc9([0x75,0x73,0x65])]:_0x29cbc9([0x73,0x69,0x67]),[_0x29cbc9([0x63,0x72,0x76])]:_0x29cbc9([0x50,0x2d,0x32,0x35,0x36]),[_0x29cbc9([0x78])]:_0x29cbc9([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]),[_0x29cbc9([0x79])]:_0x29cbc9([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]),[_0x29cbc9([0x61,0x6c,0x67])]:_0x29cbc9([0x45,0x53,0x32,0x35,0x36])},_0x5daeb4=_0x3c3a28[_0x29cbc9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x29cbc9([0x67,0x65,0x74])](_0x29cbc9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xf28679(){let _0x1f9a2d,_0x2438ec=null,_0x2ad351=null;try{if(_0x5daeb4==_0x29cbc9([0x47,0x50,0x4c]))return _0x29cbc9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1f9a2d=_0x2359cd(),!_0x1f9a2d)return _0x29cbc9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1f9a2d[_0x29cbc9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2ad351=_0x12766c(_0x1f9a2d[_0x29cbc9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1f9a2d[_0x29cbc9([0x6a,0x74,0x69])])),await _0x3efdb5()?_0x168cc1()?_0x280158()?_0x29cbc9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x449bf9()?(_0x1f9a2d[_0x29cbc9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x29cbc9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2438ec=_0x4b29c8(_0x29cbc9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1f9a2d[_0x29cbc9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x29cbc9([0x74,0x72,0x69,0x61,0x6c])&&(_0x2438ec=_0x4b29c8(_0x29cbc9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x52e621()):_0x29cbc9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x29cbc9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x29cbc9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4954fe){return _0x29cbc9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x280158(){const _0xc17fcc=[_0x29cbc9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x29cbc9([0x74,0x72,0x69,0x61,0x6c])][_0x29cbc9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f9a2d[_0x29cbc9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x468765/0x3e8:0xe10*_0x12ebd7;return _0x1f9a2d[_0x29cbc9([0x65,0x78,0x70])]<_0xc17fcc;}function _0x168cc1(){const _0x1e80bb=_0x1f9a2d[_0x29cbc9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1e80bb&&(!!_0x1e80bb[_0x29cbc9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29cbc9([0x2a]))||!!_0x1e80bb[_0x29cbc9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29cbc9([0x55,0x50,0x4c,0x43])));}function _0x449bf9(){const _0x38e37c=_0x1f9a2d[_0x29cbc9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x38e37c||0x0==_0x38e37c[_0x29cbc9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4aecec}=new URL(window[_0x29cbc9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x38e37c[_0x29cbc9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4aecec))return!0x0;const _0x1dc12b=_0x4aecec[_0x29cbc9([0x73,0x70,0x6c,0x69,0x74])](_0x29cbc9([0x2e]));return _0x38e37c[_0x29cbc9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3111bc=>_0x3111bc[_0x29cbc9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29cbc9([0x2a])))[_0x29cbc9([0x6d,0x61,0x70])](_0x284c9f=>_0x284c9f[_0x29cbc9([0x73,0x70,0x6c,0x69,0x74])](_0x29cbc9([0x2e])))[_0x29cbc9([0x73,0x6f,0x6d,0x65])](_0x195ece=>_0x1dc12b[_0x29cbc9([0x65,0x76,0x65,0x72,0x79])]((_0x675367,_0x594dd3)=>_0x195ece[_0x594dd3]===_0x675367||_0x195ece[_0x594dd3]===_0x29cbc9([0x2a])));}function _0x52e621(){return _0x2438ec&&_0x2ad351?new window[(_0x29cbc9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x27fcc9,_0x2b66f8)=>{_0x2438ec[_0x29cbc9([0x74,0x68,0x65,0x6e])](_0x27fcc9,_0x2b66f8),_0x2ad351[_0x29cbc9([0x74,0x68,0x65,0x6e])](_0x467be6=>{_0x467be6!=_0x29cbc9([0x56,0x61,0x6c,0x69,0x64])&&_0x27fcc9(_0x467be6);},_0x2b66f8);}):_0x2438ec||_0x2ad351||_0x29cbc9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x12766c(_0x3f3f27,_0x263c43){return new window[(_0x29cbc9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a829e=>{if(_0x151a88())return _0x3a829e(_0x29cbc9([0x56,0x61,0x6c,0x69,0x64]));_0x372661(),_0x3c3a28[_0x29cbc9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x29cbc9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3b45c0=!0x1;const _0x3e5f4e=_0x37fad2();function _0x44415d(_0xc34ebb){return!!_0xc34ebb&&(typeof _0xc34ebb===_0x29cbc9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xc34ebb===_0x29cbc9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xc34ebb[_0x29cbc9([0x74,0x68,0x65,0x6e])]===_0x29cbc9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xc34ebb[_0x29cbc9([0x63,0x61,0x74,0x63,0x68])]===_0x29cbc9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x284e54(_0xe9e360){_0x29b924(_0xe9e360)[_0x29cbc9([0x74,0x68,0x65,0x6e])](_0x2a0ac9=>{if(!_0x2a0ac9||_0x2a0ac9[_0x29cbc9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x29cbc9([0x6f,0x6b]))return _0x29cbc9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4734aa(_0x415d0c(_0x3e5f4e+_0x263c43))!=_0x2a0ac9[_0x29cbc9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x29cbc9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x29cbc9([0x56,0x61,0x6c,0x69,0x64]);})[_0x29cbc9([0x74,0x68,0x65,0x6e])](_0x26f978=>(_0x16c851(),_0x26f978),()=>{const _0x1fbc0f=_0x455c07();return null==_0x1fbc0f?(_0x16c851(),_0x29cbc9([0x56,0x61,0x6c,0x69,0x64])):_0x29cbc9(_0x468765-_0x1fbc0f>(0x769ca1cf^_0x5a0725)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x29cbc9([0x74,0x68,0x65,0x6e])](_0x3a829e)[_0x29cbc9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3a829e(_0x29cbc9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5eb2ea=0x52a6cb4f^_0x5a0725;function _0x16c851(){const _0x4d3bbb=_0x29cbc9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4734aa(_0x415d0c(_0x3f3f27)),_0x94f590=_0x13681c(_0x4734aa(window[_0x29cbc9([0x4d,0x61,0x74,0x68])][_0x29cbc9([0x63,0x65,0x69,0x6c])](_0x468765/_0x5eb2ea)));window[_0x29cbc9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x29cbc9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d3bbb,_0x94f590);}function _0x455c07(){const _0x57cbf8=_0x29cbc9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4734aa(_0x415d0c(_0x3f3f27)),_0x5bd169=window[_0x29cbc9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x29cbc9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x57cbf8);return _0x5bd169?window[_0x29cbc9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x13681c(_0x5bd169),0x10)*_0x5eb2ea:null;}function _0x29b924(_0x32b123){return new window[(_0x29cbc9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xaa5063,_0x36d2dd)=>{_0x32b123[_0x29cbc9([0x74,0x68,0x65,0x6e])](_0xaa5063,_0x36d2dd),window[_0x29cbc9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x36d2dd,0x5291f10f^_0x5a0725);});}}_0x3c3a28[_0x29cbc9([0x6f,0x6e])](_0x29cbc9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5ceae5,_0x4644cd)=>{if(_0x4644cd[0x0]!=_0x3f3f27)return _0x3a829e(_0x29cbc9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4644cd[0x1]={..._0x4644cd[0x1],[_0x29cbc9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3e5f4e};},{[_0x29cbc9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x29cbc9([0x68,0x69,0x67,0x68])}),_0x3c3a28[_0x29cbc9([0x6f,0x6e])](_0x29cbc9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x468f90=>{_0x44415d(_0x468f90[_0x29cbc9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3b45c0=!0x0,_0x284e54(_0x468f90[_0x29cbc9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x29cbc9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x29cbc9([0x6c,0x6f,0x77])}),_0x4b5a2b[_0x29cbc9([0x74,0x68,0x65,0x6e])](()=>{_0x3b45c0||_0x3a829e(_0x29cbc9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x151a88(){return _0x3c3a28[_0x29cbc9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x29cbc9([0x76,0x69,0x65,0x77])][_0x29cbc9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x29cbc9([0x61,0x75,0x74,0x6f]);}function _0x372661(){_0x3c3a28[_0x29cbc9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x29cbc9([0x76,0x69,0x65,0x77])][_0x29cbc9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x29cbc9([0x61,0x75,0x74,0x6f]);}}function _0x4b29c8(_0x1dfd09){const _0x38e961=[new window[(_0x29cbc9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x236492=>setTimeout(_0x236492,0x52991b03^_0x5a0725)),_0x4b5a2b[_0x29cbc9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x29cbc9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x39b796=>{let _0x5f4240=0x0;_0x3c3a28[_0x29cbc9([0x6d,0x6f,0x64,0x65,0x6c])][_0x29cbc9([0x6f,0x6e])](_0x29cbc9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x328795,_0x87859d)=>{_0x87859d[0x0][_0x29cbc9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5f4240++,_0x5f4240==(0x52902437^_0x5a0725)&&(_0x39b796(),_0x328795[_0x29cbc9([0x6f,0x66,0x66])]());});}))];return window[_0x29cbc9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x29cbc9([0x72,0x61,0x63,0x65])](_0x38e961)[_0x29cbc9([0x74,0x68,0x65,0x6e])](()=>_0x1dfd09);}async function _0x455f86(){await _0x4b5a2b,_0x3c3a28[_0x29cbc9([0x6d,0x6f,0x64,0x65,0x6c])][_0x29cbc9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x148d6e,_0x3c3a28[_0x29cbc9([0x6d,0x6f,0x64,0x65,0x6c])][_0x29cbc9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x148d6e,_0x3c3a28[_0x29cbc9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x29cbc9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x206629(_0x2771d6){const _0x32cc90=_0xaebb0();_0x3c3a28[_0x32cc90]=_0x29cbc9([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2771d6,_0x2771d6!=_0x29cbc9([0x56,0x61,0x6c,0x69,0x64])&&_0x455f86();}function _0xaebb0(){const _0x355110=window[_0x29cbc9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x29cbc9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x29cbc9([0x6e,0x6f,0x77])]())[_0x29cbc9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x29cbc9([0x2e]),'');let _0x28e418=_0x29cbc9([0x50]);for(let _0x13f97f=0x0;_0x13f97f<_0x355110[_0x29cbc9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x13f97f+=0x2){let _0x4484e0=window[_0x29cbc9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x355110[_0x29cbc9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x13f97f,_0x13f97f+0x2));_0x4484e0>=_0x2cd6f7[_0x29cbc9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4484e0-=_0x2cd6f7[_0x29cbc9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x28e418+=_0x2cd6f7[_0x4484e0];}return _0x28e418;}function _0x2359cd(){const _0x41f93a=_0x5daeb4[_0x29cbc9([0x73,0x70,0x6c,0x69,0x74])](_0x29cbc9([0x2e]));if(0x3!=_0x41f93a[_0x29cbc9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x39f76e(_0x41f93a[0x1]);function _0x39f76e(_0x3692be){const _0x80602a=_0x44b888(_0x3692be);return _0x80602a&&_0x372050()?_0x80602a:null;function _0x372050(){const _0x5523a=_0x80602a[_0x29cbc9([0x6a,0x74,0x69])],_0x4c3cdf=window[_0x29cbc9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5523a[_0x29cbc9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5523a[_0x29cbc9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4affaf={..._0x80602a,[_0x29cbc9([0x6a,0x74,0x69])]:_0x5523a[_0x29cbc9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5523a[_0x29cbc9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4affaf[_0x29cbc9([0x76,0x63])],_0x415d0c(_0x4affaf)==_0x4c3cdf;}}}async function _0x3efdb5(){let _0x47ac3d=!0x0;try{const _0x5de6a9=_0x5daeb4[_0x29cbc9([0x73,0x70,0x6c,0x69,0x74])](_0x29cbc9([0x2e])),[_0x1609c1,_0xdea37c,_0x50641]=_0x5de6a9;return _0x13eca8(_0x1609c1),await _0x3d591c(_0x1609c1,_0xdea37c,_0x50641),_0x47ac3d;}catch(_0x2536bc){return!0x1;}function _0x13eca8(_0x2123f6){const _0x4a6a5c=_0x44b888(_0x2123f6);_0x4a6a5c&&_0x4a6a5c[_0x29cbc9([0x61,0x6c,0x67])]==_0x29cbc9([0x45,0x53,0x32,0x35,0x36])||(_0x47ac3d=!0x1);}async function _0x3d591c(_0x55d309,_0x1b4ab5,_0x27d58f){const _0x167da9=window[_0x29cbc9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x29cbc9([0x66,0x72,0x6f,0x6d])](_0xbb7d3(_0x27d58f),_0x3c57de=>_0x3c57de[_0x29cbc9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x174b86=new window[(_0x29cbc9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x29cbc9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x55d309+_0x29cbc9([0x2e])+_0x1b4ab5),_0x186ad4=window[_0x29cbc9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x29cbc9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x186ad4)return;const _0xf9507d=await _0x186ad4[_0x29cbc9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x29cbc9([0x6a,0x77,0x6b]),_0x56714a,{[_0x29cbc9([0x6e,0x61,0x6d,0x65])]:_0x29cbc9([0x45,0x43,0x44,0x53,0x41]),[_0x29cbc9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x29cbc9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x29cbc9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x186ad4[_0x29cbc9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x29cbc9([0x6e,0x61,0x6d,0x65])]:_0x29cbc9([0x45,0x43,0x44,0x53,0x41]),[_0x29cbc9([0x68,0x61,0x73,0x68])]:{[_0x29cbc9([0x6e,0x61,0x6d,0x65])]:_0x29cbc9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xf9507d,_0x167da9,_0x174b86)||(_0x47ac3d=!0x1);}}function _0x44b888(_0x55d86f){return _0x55d86f[_0x29cbc9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x29cbc9([0x65,0x79]))?JSON[_0x29cbc9([0x70,0x61,0x72,0x73,0x65])](_0xbb7d3(_0x55d86f)):null;}function _0xbb7d3(_0x3203c7){return window[_0x29cbc9([0x61,0x74,0x6f,0x62])](_0x3203c7[_0x29cbc9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x29cbc9([0x2b]))[_0x29cbc9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x29cbc9([0x2f])));}function _0x415d0c(_0x11572c){let _0x245f4c=0x1505;function _0x557059(_0x1920c7){for(let _0xdba2c6=0x0;_0xdba2c6<_0x1920c7[_0x29cbc9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xdba2c6++){const _0x274ce3=_0x1920c7[_0x29cbc9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xdba2c6);_0x245f4c=(_0x245f4c<<0x5)+_0x245f4c+_0x274ce3,_0x245f4c&=_0x245f4c;}}function _0x504cd9(_0xcbf766){Array[_0x29cbc9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xcbf766)?_0xcbf766[_0x29cbc9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x504cd9):_0xcbf766&&typeof _0xcbf766==_0x29cbc9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x29cbc9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xcbf766)[_0x29cbc9([0x73,0x6f,0x72,0x74])]()[_0x29cbc9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x445800,_0x375af0])=>{_0x557059(_0x445800),_0x504cd9(_0x375af0);}):_0x557059(window[_0x29cbc9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xcbf766));}return _0x504cd9(_0x11572c),_0x245f4c>>>0x0;}function _0x4734aa(_0x47d59a){return _0x47d59a[_0x29cbc9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x29cbc9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x29cbc9([0x30]));}function _0x13681c(_0x44b7f8){return _0x44b7f8[_0x29cbc9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x29cbc9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x29cbc9([0x6a,0x6f,0x69,0x6e])]('');}function _0x148d6e(){}function _0x29cbc9(_0x5a6c86){return _0x5a6c86['map'](_0x4b85e7=>String['fromCharCode'](_0x4b85e7))['join']('');}_0x206629(await _0xf28679());}(this);}['_initSchema'](){const _0x3a1d42=this['editor']['model']['schema'];_0x3a1d42['isRegistered']('imageBlock')&&_0x3a1d42['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x3a1d42['isRegistered']('imageInline')&&_0x3a1d42['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x2b99a6=this['editor'];_0x2b99a6['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x2b99a6['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x3fd004=>_0x3fd004['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x581b3a=_0x2b99a6['commands']['get']('replaceImageSource');_0x581b3a&&this['listenTo'](_0x581b3a,'cleanupImage',(_0x468eff,[_0x6381c4,_0x3704a8])=>{_0x6381c4['removeAttribute']('uploadcareImageId',_0x3704a8);});}['_initConfig'](){const _0x1c83e8=this['editor']['config']['get']('uploadcare.uploader')||{},_0x5d1eba=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x28e428(_0x169304['document'],'uc-config',{..._0x1c83e8,'pubkey':_0x5d1eba,'ctx-name':'uploader','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']=_0x16ca7a=>{if('closeMax'==_0x16ca7a)return'#uc-icon-arrow-down';},_0x169304['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x28e428(_0x169304['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x169304['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x3038df=this['editor']['commands']['get']('insertImage');_0x3038df&&this['listenTo'](_0x3038df,'execute',()=>{const _0x19d930=this['editor']['model']['document']['selection']['getSelectedElement']();_0x19d930&&_0x19d930['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x19d930);});});const _0x26f2d2=this['editor']['commands']['get']('uploadcareImageReplace');_0x26f2d2&&this['listenTo'](_0x26f2d2,'execute',()=>{const _0x429cdf=this['editor']['model']['document']['selection']['getSelectedElement']();_0x429cdf&&_0x429cdf['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x429cdf);});});}}class u extends _0x4daa69{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5ee9e0){super(_0x5ee9e0),_0x5ee9e0['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x44bfc2['defineComponents'](_0x44bfc2);}}class ta extends _0x5e3cbd{constructor(_0x47732e){super(_0x47732e);const t=_0x47732e['t'],_0x2711f1=this['bindTemplate'],_0xd53ab6=new _0x5f0405();_0xd53ab6['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':[_0xd53ab6,{'text':_0x2711f1['to']('imageUploadProgress',_0x176dcd=>t('Loading\x20image...')+'\x20('+(_0x176dcd||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 rt extends _0x5e3cbd{constructor(_0x4f93ba){super(_0x4f93ba);const t=_0x4f93ba['t'];this['set']('errorType',null);const _0xa7dbe1=new _0xc33676(_0x4f93ba);_0xa7dbe1['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xa7dbe1['withText']=!0x0,_0xa7dbe1['class']='ck-button-action',_0xa7dbe1['on']('execute',()=>{this['fire']('retry');}),_0xa7dbe1['bind']('isVisible')['to'](this,'errorType',_0x33bc48=>'NotFound'!==_0x33bc48);const _0x2225f1=new at();_0x2225f1['content']=et,_0x2225f1['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x11f065=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':[_0x2225f1,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x11f065['to']('errorType',_0x414e88=>t('NotFound'!==_0x414e88?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xa7dbe1]},{'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 tt extends _0x5e3cbd{constructor(_0x27d637,_0x1bce69){super(_0x27d637);const _0x5ee7bb=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1bce69,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x5ee7bb['to']('imageSrc')}});}}class Z extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4e8860,_0x3480c6,_0x1800bb){super(_0x4e8860),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x4e8860),this['_errorView']=new rt(_0x4e8860),this['_editingView']=new tt(_0x4e8860,_0x1800bb),this['_focusableView']=new _0x5e3cbd(_0x4e8860),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x3480c6),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'],_0x22af5c=>{this['_addUploadcareImageEditorListeners'](_0x22af5c);});}),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'](_0x49d24d,_0x4d423f){const _0x361162='uc-cloud-image-editor',_0x144bbe=_0x49d24d['querySelector'](_0x361162);if(_0x144bbe)return _0x4d423f(_0x144bbe);const _0x280ee4=new MutationObserver(_0x35a90d=>{const _0x39d369=_0x35a90d['filter'](_0x2675be=>_0x2675be['target']===_0x49d24d&&_0x2675be['addedNodes']['length']>0x0&&_0x2675be['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x361162);_0x39d369['length']&&(_0x280ee4['disconnect'](),_0x4d423f(_0x39d369[0x0]['addedNodes'][0x0]));});_0x280ee4['observe'](_0x49d24d,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x270687){_0x270687['addEventListener']('apply',_0x12358e=>{this['fire']('apply',{'imageSrc':_0x12358e['detail']['cdnUrl']});}),_0x270687['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class z extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x48cde8(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5b83bb,_0x361149,_0x67b1b2){super(),this['_editor']=_0x5b83bb,this['_dialog']=_0x361149,this['_imageElement']=_0x67b1b2,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 _0x483b35=this['_imageElement'],_0x31c038=_0x483b35['getAttribute']('uploadcareImageId'),_0x149d2c=_0x483b35['getAttribute']('src');if(_0x31c038)await this['_loadImageInfo'](_0x31c038,_0x149d2c);else{if(this['_imageCache']['has'](_0x149d2c)){const _0x1af255=this['_imageCache']['get'](_0x149d2c);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1af255['url'],this['imageDimension']=_0x1af255['dimension'],this['imageId']=_0x1af255['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x54542e}=this['_editor'],t=_0x54542e['t'],_0x120050=new Z(_0x54542e,this['imageStatus'],this['_attributes']);_0x120050['bind']('status')['to'](this,'imageStatus'),_0x120050['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x120050['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x120050['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x120050,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x35d3d0,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x120050,'position':_0x37b78f['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x120050['focus']();},'onHide':()=>{_0x120050['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x56e677=>!F(_0x56e677,_0x120050['element'])}});}['_loadImageInfo'](_0x5cd9d0,_0x5383ab){return C['getInfo'](_0x5cd9d0,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x130a29=>{const {width:_0x2acf34,height:_0xb76d9c}=_0x130a29['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5383ab,this['imageDimension']={'width':_0x2acf34,'height':_0xb76d9c},this['imageId']=_0x5cd9d0;})['catch'](_0x58eaa4=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x58eaa4['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4bc8fe,_0x45fdd8){return this['_getImageAsFile'](_0x4bc8fe)['then'](_0x4ffbb3=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x45fdd8['signal'],'file':_0x4ffbb3,'onProgress':_0x2fd81c=>{_0x2fd81c&&_0x2fd81c['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2fd81c['value']));}}))['then'](_0x4f8b38=>{const {width:_0x42035b,height:_0x14d87e}=_0x4f8b38['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4f8b38['cdnUrl'],this['imageDimension']={'width':_0x42035b,'height':_0x14d87e},this['imageId']=_0x4f8b38['uuid'],this['imageUploadProgress']=null;const _0x50c359=_0x4bc8fe['getAttribute']('src');this['_imageCache']['set'](_0x50c359,{'id':_0x4f8b38['uuid'],'url':_0x4f8b38['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x28da15=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x28da15['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x39aa70,_0x23c758){_0x39aa70['on']('apply',(_0x2703e3,_0x2da52c)=>{this['_replaceImage'](_0x23c758,_0x2da52c['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x39aa70['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x39aa70['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x4187ea,_0x228720,_0x512d1a){const _0x28943a=this['_editor'],{width:_0x475bfb,height:_0x196032}=A(_0x228720,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x2f48ec,imageSources:_0x7555c6}=E(_0x228720,_0x475bfb);_0x28943a['model']['change'](_0x448cb8=>{if('$graveyard'===_0x4187ea['root']['rootName']){_0x28943a['execute']('insertImage',{'imageType':_0x4187ea['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x4187ea['getAttributes']()),'uploadcareImageId':_0x512d1a,'src':_0x2f48ec,'sources':_0x7555c6,'width':_0x475bfb,'height':_0x196032}});const _0xff68bd=_0x4187ea['getChildren']();_0x4187ea=_0x28943a['model']['document']['selection']['getSelectedElement']();for(const _0x2020b3 of _0xff68bd)_0x448cb8['append'](_0x448cb8['cloneElement'](_0x2020b3),_0x4187ea);}else _0x448cb8['setSelection'](_0x4187ea,'on'),_0x28943a['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x4187ea['getAttributes']()),'uploadcareImageId':_0x512d1a,'src':_0x2f48ec,'sources':_0x7555c6,'width':_0x475bfb,'height':_0x196032},_0x4187ea);_0x448cb8['setSelection'](_0x4187ea,'on');});}async['_getImageAsFile'](_0x121a92){const _0x4e6bbf=_0x169304['window'],_0x5b4fd0=_0x169304['document']['location']['href'],_0x4f92d7=new _0x4e6bbf['URL'](_0x121a92['getAttribute']('src'),_0x5b4fd0);if('data:'===_0x4f92d7['protocol']){const _0x224301=_0x4f92d7['href']['split'](','),_0x81e463=_0x224301[0x0]['match'](/:(.*?);/)[0x1],_0x41db39=_0x81e463['split']('/')[0x1],_0x276db1=_0x4e6bbf['atob'](_0x224301[_0x224301['length']-0x1]);let _0x3caf46=_0x276db1['length'];const _0xcca910=new _0x4e6bbf['Uint8Array'](_0x3caf46);for(;_0x3caf46--;)_0xcca910[_0x3caf46]=_0x276db1['charCodeAt'](_0x3caf46);return new _0x4e6bbf['File']([_0xcca910],'image.'+_0x41db39,{'type':_0x81e463});}const _0x22e0a1=_0x4f92d7['href']['split']('/'),_0x439dad=_0x22e0a1[_0x22e0a1['length']-0x1],_0x34938b=_0x439dad['split']('.')[0x1];return _0x4e6bbf['fetch'](_0x4f92d7['href'])['then'](_0x42d347=>_0x42d347['clone']()['blob']())['then'](_0x39c7c6=>new _0x4e6bbf['File']([_0x39c7c6],_0x439dad,{'type':'image/'+_0x34938b}));}}class J extends _0x487dc3{['imageEditController'];static get['requires'](){return[_0x452c78];}['_isEditable'];constructor(_0x2316b2){super(_0x2316b2),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x3ae4ab){const _0x1a3359=V(_0x3ae4ab);return _0x4b1fe2=>!(!_0x4b1fe2||!_0x4b1fe2['is']('element','imageBlock')&&!_0x4b1fe2['is']('element','imageInline'))&&(!!_0x4b1fe2['hasAttribute']('uploadcareImageId')||!!_0x4b1fe2['hasAttribute']('src')&&_0x1a3359(_0x4b1fe2['getAttribute']('src')));}(_0x2316b2['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x3dd82a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x3dd82a);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x2b2fc9=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2b2fc9&&(_0x2b2fc9['is']('element','imageBlock')||_0x2b2fc9['is']('element','imageInline'))&&(this['imageEditController']=new z(this['editor'],this['editor']['plugins']['get'](_0x452c78),_0x2b2fc9),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class O extends _0x487dc3{['refresh'](){const _0xb3f6d=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0xb3f6d&&(_0xb3f6d['is']('element','imageBlock')||_0xb3f6d['is']('element','imageInline')));}['execute'](_0x26e913){const _0x41c490=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x43eb80=>{_0x43eb80['setAttributes'](_0x26e913,_0x41c490),_0x43eb80['removeAttribute']('srcset',_0x41c490),_0x43eb80['removeAttribute']('sizes',_0x41c490);});}}class g extends _0x4daa69{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x5bdaf4,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5bc1ff}=this;_0x5bc1ff['commands']['add']('uploadcareImageEdit',new J(_0x5bc1ff)),_0x5bc1ff['commands']['add']('uploadcareImageReplace',new O(_0x5bc1ff));}}class j extends _0x4daa69{['_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 _0x7fb189=this['editor'];_0x7fb189['ui']['componentFactory']['add']('uploadcareImageEdit',_0xc01688=>{const _0x66b6fc=_0x7fb189['commands']['get']('uploadcareImageEdit'),_0x16fb98=new _0xc33676(_0xc01688),t=_0xc01688['t'];return _0x16fb98['set']({'icon':_0x35d3d0,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x16fb98['bind']('isEnabled')['to'](_0x66b6fc),_0x16fb98['bind']('isOn')['to'](_0x66b6fc,'isActive'),this['listenTo'](_0x16fb98,'execute',()=>{_0x7fb189['execute']('uploadcareImageEdit'),_0x7fb189['editing']['view']['focus']();}),_0x16fb98;}),this['_initConfig']();}['_initConfig'](){const _0x3531f0=_0x28e428(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x3531f0),this['listenTo'](this['editor'],'destroy',()=>{_0x3531f0['remove']();});}}class P extends _0x4daa69{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[g,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,P as UploadcareImageEdit,g as UploadcareImageEditEditing,j as UploadcareImageEditUI,e as UploadcareUI};
|
|
23
|
+
import{Plugin as _0x3b3d22,Command as _0x1376a6}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0xcbaf02,IconGooglePhotos as _0x3343e4,IconGoogleDrive as _0x55ec43,IconFacebook as _0xca1371,IconDropbox as _0x4c4c68,IconUploadcareLink as _0x174dcf,IconUploadcareImageUpload as _0x225132,IconError as et,IconUploadcareImageEdit as _0xb1f3f5}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xeb584,MenuBarMenuListItemButtonView as _0x4cc523,View as _0x182c89,FocusCycler as _0x2b684a,Dialog as _0x137a31,DialogViewPosition as _0x34e3d0,SpinnerView as _0x60a5d7,IconView as at,Notification as _0x27d959}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x2c3bfc,DomEmitterMixin as _0x3102e1,global as _0x261a41,getAncestors as _0x3932f5,ObservableMixin as _0x9d7baf,createElement as _0x3c19db,uid as _0x3d74a3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x493b29}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2d74d5,info as _0x1565af}from'@uploadcare/upload-client';import*as _0x4b5396 from'@uploadcare/file-uploader';var o=function(_0x4451fb){return _0x4451fb['Local']='local',_0x4451fb['URL']='url',_0x4451fb['Dropbox']='dropbox',_0x4451fb['GDrive']='gdrive',_0x4451fb['Facebook']='facebook',_0x4451fb['GPhotos']='gphotos',_0x4451fb['OneDrive']='onedrive',_0x4451fb;}({});function _(_0x403f8f,_0x38153f,_0xfa3e62){const t=_0x403f8f['t'],_0x5dfe50=_0x403f8f['t'];switch(_0x38153f){case o['Local']:return{'text':_0x5dfe50('Insert'===_0xfa3e62?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x5dfe50('From\x20computer')};case o['URL']:return{'text':'Insert'===_0xfa3e62?_0x5dfe50('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x5dfe50('Via\x20URL')};case o['Dropbox']:return{'text':t('Insert'===_0xfa3e62?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case o['Facebook']:return{'text':t('Insert'===_0xfa3e62?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case o['GDrive']:return{'text':t('Insert'===_0xfa3e62?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case o['GPhotos']:return{'text':t('Insert'===_0xfa3e62?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case o['OneDrive']:return{'text':t('Insert'===_0xfa3e62?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x38153f;}}class e extends _0x3b3d22{['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 _0x417b47=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4b1de0;for(const _0x3ff645 in _0x417b47){const _0x205421=_0x3ff645,_0x264c14=_0x417b47[_0x205421];if('uploadcareLicenseKeyValid'==_0x264c14||'uploadcareLicenseKeyInvalid'==_0x264c14||'uploadcareLicenseKeyExpired'==_0x264c14||'uploadcareLicenseKeyDomainLimit'==_0x264c14||'uploadcareLicenseKeyNotAllowed'==_0x264c14||'uploadcareLicenseKeyEvaluationLimit'==_0x264c14||'uploadcareLicenseKeyTrialLimit'==_0x264c14||'uploadcareLicenseKeyUsageLimit'==_0x264c14){delete _0x417b47[_0x205421],_0x4b1de0=_0x264c14,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x4b1de0&&_0x417b47['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x4b1de0&&_0x417b47['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x4b1de0&&_0x417b47['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x4b1de0&&_0x417b47['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x4b1de0&&_0x417b47['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x4b1de0&&_0x417b47['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x4b1de0&&_0x417b47['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x3031ee}=this,_0x36d82b=_0x3031ee['commands']['get']('uploadcare');if(!_0x36d82b)return;const _0x127273=this['_normalizeConfigSourceList'](_0x3031ee['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x5bc299,_0x3937e3)=>{const _0x864355=this['_getIntegrationKey'](_0x3937e3['type']);return _0x5bc299[_0x864355]||(_0x5bc299[_0x864355]=[]),_0x5bc299[_0x864355]['push'](_0x3937e3),_0x5bc299;},{});_0x3031ee['plugins']['has']('ImageInsertUI')&&_0x3031ee['commands']['get']('uploadcare')&&Object['entries'](_0x127273)['forEach'](([_0x4e34d2,_0x17079c])=>{_0x3031ee['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x4e34d2,'observable':()=>_0x36d82b,'buttonViewCreator':()=>this['_createToolbarButton'](_0x17079c),'formViewCreator':()=>this['_createDropdownButtons'](_0x17079c),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x17079c),'override':'assetManager'!==_0x4e34d2});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x12b790){const {locale:_0x3b3f03}=this['editor'];return _0x12b790['map'](_0x2dc547=>{const _0x5d818e=_(_0x3b3f03,_0x2dc547,'Insert');switch(_0x2dc547){case o['Local']:return{'icon':_0x225132,'type':o['Local'],..._0x5d818e};case o['URL']:return{'icon':_0x174dcf,'type':o['URL'],..._0x5d818e};case o['Dropbox']:return{'icon':_0x4c4c68,'type':o['Dropbox'],..._0x5d818e};case o['Facebook']:return{'icon':_0xca1371,'type':o['Facebook'],..._0x5d818e};case o['GDrive']:return{'icon':_0x55ec43,'type':o['GDrive'],..._0x5d818e};case o['GPhotos']:return{'icon':_0x3343e4,'type':o['GPhotos'],..._0x5d818e};case o['OneDrive']:return{'icon':_0xcbaf02,'type':o['OneDrive'],..._0x5d818e};}});}['_getIntegrationKey'](_0x379ac0){switch(_0x379ac0){case o['Local']:return'upload';case o['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x3cfeb6,_0x5ea0ed){const _0x366af1=this['editor'],_0xf4a397=new _0x3cfeb6(_0x366af1['locale']),_0x574611=_0x366af1['commands']['get']('uploadcare');return _0xf4a397['bind']('isEnabled')['to'](_0x574611),_0xf4a397['on']('execute',()=>{_0x574611['execute'](_0x5ea0ed);}),_0xf4a397;}['_createToolbarButton'](_0x59fc06){const {locale:_0x2a5462}=this['editor'],_0x13a340=this['editor']['plugins']['get']('ImageInsertUI'),_0xdac4f9=_0x59fc06[0x0],_0x420e70=this['_createButton'](_0xeb584,_0xdac4f9['type']);return _0x420e70['icon']=_0xdac4f9['icon'],_0x420e70['bind']('label')['to'](_0x13a340,'isImageSelected',_0x1a0294=>_(_0x2a5462,_0xdac4f9['type'],_0x1a0294?'Replace':'Insert')['text']),_0x420e70['tooltip']=!0x0,_0x420e70;}['_createDropdownButtons'](_0x37e644){const {locale:_0xb5373c}=this['editor'],_0x34003b=this['editor']['plugins']['get']('ImageInsertUI');return _0x37e644['map'](_0x348195=>{const _0x44d2ec=this['_createButton'](_0xeb584,_0x348195['type']);return _0x44d2ec['withText']=!0x0,_0x44d2ec['icon']=_0x348195['icon'],_0x44d2ec['bind']('label')['to'](_0x34003b,'isImageSelected',_0x27ed00=>_(_0xb5373c,_0x348195['type'],_0x27ed00?'Replace':'Insert')['text']),_0x44d2ec;});}['_createMenuBarButtons'](_0x197afb){return _0x197afb['map'](_0x2115d1=>{const _0xbbfefd=this['_createButton'](_0x4cc523,_0x2115d1['type']);return _0xbbfefd['icon']=_0x2115d1['icon'],_0xbbfefd['label']=_0x2115d1['shortText'],_0xbbfefd;});}}class q extends _0x182c89{['focusTracker'];['focusCycler'];constructor(_0x452f8a){super(_0x452f8a),this['focusTracker']=new _0x2c3bfc(),this['focusCycler']=new _0x2b684a({'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 S extends q{constructor(_0x2b6070){super(_0x2b6070),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'}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function E(_0x1ddf85,_0x44ba56){const _0xf81c1=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x3ef305=>_0x3ef305<=_0x44ba56)['map'](_0x14ad68=>_0x1ddf85['replace'](/\/$/,'')+'/-/resize/'+_0x14ad68+'x/\x20'+_0x14ad68+'w');return{'imageFallbackUrl':_0x1ddf85,'imageSources':[{'srcset':_0xf81c1['join'](',\x20'),'sizes':'(max-width:\x20'+_0x44ba56+'px)\x20100vw,\x20'+_0x44ba56+'px','type':'image/webp'}]};}function A(_0x232a19,_0x3253bc,_0x2442b4){const _0x119090=_0x232a19['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x119090?parseInt(_0x119090[0x1],0xa):_0x3253bc,'height':_0x119090?parseInt(_0x119090[0x2],0xa):_0x2442b4};}function m(_0x171bc5,_0x2db910){const _0x19409f=Object['create'](_0x3102e1),_0x2f0fed=_0x171bc5['plugins']['get']('ImageUtils'),_0x15c3c8=_0x171bc5['editing']['mapper']['toViewElement'](_0x2db910),_0x4e5bed=_0x2f0fed['findViewImgElement'](_0x15c3c8),_0x412636=_0x171bc5['editing']['view']['domConverter']['viewToDom'](_0x4e5bed),_0x4e9147=_0x2db910['getAttribute']('width'),_0x74e03c=_0x2db910['getAttribute']('height'),_0xb03a5a='image-processing';_0x171bc5['editing']['view']['change'](_0x388b8b=>{_0x388b8b['addClass'](_0xb03a5a,_0x15c3c8),_0x388b8b['setStyle']('aspect-ratio',_0x4e9147+'/'+_0x74e03c,_0x4e5bed);}),_0x19409f['listenTo'](_0x412636,'load',()=>{_0x19409f['stopListening'](_0x412636,'load'),_0x171bc5['editing']['view']['change'](_0xeea451=>{_0xeea451['removeClass'](_0xb03a5a,_0x15c3c8),_0xeea451['removeStyle']('aspect-ratio',_0x4e5bed);});});}function R(_0x29916a){if(Array['isArray'](_0x29916a)){const _0xb2fecd=_0x29916a['map'](R);return _0x1bbcba=>_0xb2fecd['some'](_0x3a5415=>_0x3a5415(_0x1bbcba));}if('origin'==_0x29916a){const _0x535a37=_0x261a41['window']['location']['origin'];return _0x52b1bc=>new URL(_0x52b1bc,_0x261a41['document']['baseURI'])['origin']==_0x535a37;}return'function'==typeof _0x29916a?_0x29916a:_0x29916a instanceof RegExp?_0x2df8aa=>!(!_0x2df8aa['match'](_0x29916a)&&!_0x2df8aa['replace'](/^https?:\/\//,'')['match'](_0x29916a)):()=>!0x1;}function F(_0x42dd1e,_0x5c236e){return _0x3932f5(_0x42dd1e['target'])['includes'](_0x5c236e);}class l extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x9d7baf(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x55f452,_0x3bec7e,_0x4b2090){super(),this['_editor']=_0x55f452,this['_editing']=_0x3bec7e,this['_dialog']=_0x55f452['plugins']['get'](_0x137a31),this['_api']=_0x3bec7e['ctxElement']['getAPI'](),this['_type']=_0x4b2090,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:_0x31b2ec,model:_0x2ddab2}=this['_editor'],_0x2416cc=_0x2ddab2['document']['selection']['getSelectedElement'](),_0x5a58b4=_0x2416cc&&(_0x2416cc['is']('element','imageBlock')||_0x2416cc['is']('element','imageInline'));this['_formView']=new S(_0x31b2ec),this['_dialog']['show']({'id':'uploadCare','icon':_0x225132,'title':_(_0x31b2ec,this['_type'],_0x5a58b4?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x34e3d0['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x4a8815=>!F(_0x4a8815,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x3ebef3}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x12bd5c=>{const _0x26636b=_0x3ebef3['length'];for(const _0x1fe543 of _0x3ebef3){const _0x3d03a5=_0x1fe543===_0x3ebef3[_0x26636b-0x1],{cdnUrl:_0x4a5c0a,fileInfo:_0x1a42a8}=_0x1fe543;if(!_0x4a5c0a||!_0x1a42a8)continue;const {width:_0x3d4600,height:_0x6a86b}=_0x1a42a8['imageInfo'],_0x2d8b5f=A(_0x4a5c0a,_0x3d4600,_0x6a86b),_0xbdf5ee=E(_0x4a5c0a,_0x2d8b5f['width']),_0x3915ba={'id':_0x1a42a8['uuid'],'type':'image','attributes':{'imageDimension':_0x2d8b5f,..._0xbdf5ee}};this['_insertAsset'](_0x3915ba,_0x3d03a5,_0x12bd5c);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x53a4ea=>{'idle'===_0x53a4ea['detail']['status']&&!_0x53a4ea['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===o['Local']?this['_api']['setCurrentActivity'](o['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0xe1ab0b,_0x345f1b,_0x572547){const _0x3c0471=this['_editor']['model']['document']['selection'],_0x11d70a=_0x3c0471['getSelectedElement'](),_0x5bce89=!(!_0x11d70a||!_0x11d70a['is']('element','imageInline'));_0x572547['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0xe1ab0b,_0x5bce89),_0x345f1b||_0x572547['setSelection'](_0x3c0471['getLastPosition']());}['_insertImage'](_0x50900b,_0x1335a6){const _0x276952=this['_editor'],{imageDimension:_0x4a475e,imageFallbackUrl:_0x1acc72,imageSources:_0x343bf1}=_0x50900b['attributes'];_0x276952['execute']('insertImage',{'imageType':_0x1335a6?'imageInline':null,'source':{'uploadcareImageId':_0x50900b['id'],'src':_0x1acc72,'sources':_0x343bf1,..._0x4a475e}});}}class n extends _0x1376a6{['_editing'];['_controller']=null;static get['requires'](){return[_0x137a31,i];}constructor(_0x37b258){super(_0x37b258),this['_editing']=_0x37b258['plugins']['get'](i);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x58c281){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new l(this['editor'],this['_editing'],_0x58c281);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class C{static['upload']({file:_0x468a3f,publicKey:_0x169de6,signal:_0x4976fc,onProgress:_0xad8580}){return _0x2d74d5(_0x468a3f,{'publicKey':_0x169de6,'store':'auto','signal':_0x4976fc,'onProgress':_0xad8580});}static['getInfo'](_0x3496d1,_0x1fc7c2){return _0x1565af(_0x3496d1,_0x1fc7c2);}}class p extends _0x3b3d22{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x493b29,i];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x3bbd76=this['editor'];if(!!!_0x3bbd76['config']['get']('uploadcare'))return;_0x3bbd76['plugins']['get'](_0x493b29)['createUploadAdapter']=_0xe7e40b=>new x(_0xe7e40b,_0x3bbd76),_0x3bbd76['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0xe86806,{imageElement:_0x16a9ef,data:_0x912d90})=>{_0x3bbd76['model']['change'](_0x210217=>{_0x210217['setAttribute']('uploadcareImageId',_0x912d90['uploadcareImageId'],_0x16a9ef);});});}}class x{['loader'];['editor'];['controller'];constructor(_0x4cb933,_0x39f7e7){this['loader']=_0x4cb933,this['editor']=_0x39f7e7,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1e1467=this['editor']['config']['get']('uploadcare.pubkey'),_0xbb4824=await this['loader']['file'];return C['upload']({'file':_0xbb4824,'publicKey':_0x1e1467,'signal':this['controller']['signal'],'onProgress':_0x512685=>{_0x512685&&_0x512685['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x512685['value']);}})['then'](async _0x5e9824=>{const {imageFallbackUrl:_0x40ca18,imageSources:_0x52ea7f}=E(_0x5e9824['cdnUrl'],_0x5e9824['imageInfo']['width']);return{'uploadcareImageId':_0x5e9824['uuid'],'default':_0x40ca18,'sources':_0x52ea7f};})['catch'](()=>{const _0x5bd541=t('Cannot\x20upload\x20file:')+('\x20'+_0xbb4824['name']+'.');return Promise['reject'](_0x5bd541);});}['abort'](){this['controller']['abort']();}}class i extends _0x3b3d22{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',p,_0x137a31];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}['init'](){const _0x2e1aac=this['editor'];_0x2e1aac['commands']['add']('uploadcare',new n(_0x2e1aac));}['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 _0x5b3c3a=_0x261a41['document']['querySelector']('input[uploadcare-file-input]');_0x5b3c3a&&_0x5b3c3a['remove']();}),async function(_0x5e2d35){const _0x461afb=_0x533c94([0x4e,0x42,0x6c,0x30,0x73,0x78,0x71,0x52,0x44,0x58,0x76,0x72,0x6e,0x6a,0x54,0x68,0x38,0x6d,0x79,0x69,0x4f,0x74,0x50,0x70,0x43,0x36,0x59,0x65,0x32,0x48,0x75,0x64,0x33,0x53,0x56,0x66,0x4c,0x39,0x49,0x34,0x61,0x63,0x45,0x51,0x77,0x31,0x4b,0x6b,0x46,0x55,0x4a,0x37,0x41,0x6f,0x5a,0x35,0x47,0x4d,0x62,0x7a,0x57,0x67]),_0x291234=0x169d4413,_0x961464=0x169a2ccb^_0x291234,_0x3ef25d=window[_0x533c94([0x44,0x61,0x74,0x65])][_0x533c94([0x6e,0x6f,0x77])](),_0x198df2=_0x5e2d35[_0x533c94([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x35d998=new window[(_0x533c94([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x22670f=>{_0x198df2[_0x533c94([0x6f,0x6e,0x63,0x65])](_0x533c94([0x72,0x65,0x61,0x64,0x79]),_0x22670f);}),_0x5263e3={[_0x533c94([0x6b,0x74,0x79])]:_0x533c94([0x45,0x43]),[_0x533c94([0x75,0x73,0x65])]:_0x533c94([0x73,0x69,0x67]),[_0x533c94([0x63,0x72,0x76])]:_0x533c94([0x50,0x2d,0x32,0x35,0x36]),[_0x533c94([0x78])]:_0x533c94([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]),[_0x533c94([0x79])]:_0x533c94([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]),[_0x533c94([0x61,0x6c,0x67])]:_0x533c94([0x45,0x53,0x32,0x35,0x36])},_0x9f6f4e=_0x198df2[_0x533c94([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x533c94([0x67,0x65,0x74])](_0x533c94([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1a9ee1(){let _0x46c804,_0x2e65d7=null,_0x741c5e=null;try{if(_0x9f6f4e==_0x533c94([0x47,0x50,0x4c]))return _0x533c94([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46c804=_0xdcbca8(),!_0x46c804)return _0x533c94([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46c804[_0x533c94([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x741c5e=_0x4eb70c(_0x46c804[_0x533c94([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46c804[_0x533c94([0x6a,0x74,0x69])])),await _0x3139e3()?_0x4e9fd2()?_0x4ca14e()?_0x533c94([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x48e5c0()?(_0x46c804[_0x533c94([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x533c94([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e65d7=_0x4b6517(_0x533c94([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x46c804[_0x533c94([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x533c94([0x74,0x72,0x69,0x61,0x6c])&&(_0x2e65d7=_0x4b6517(_0x533c94([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5e783b()):_0x533c94([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x533c94([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x533c94([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x2e90a1){return _0x533c94([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4ca14e(){const _0x476f70=[_0x533c94([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x533c94([0x74,0x72,0x69,0x61,0x6c])][_0x533c94([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46c804[_0x533c94([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3ef25d/0x3e8:0xe10*_0x961464;return _0x46c804[_0x533c94([0x65,0x78,0x70])]<_0x476f70;}function _0x4e9fd2(){const _0x3ab469=_0x46c804[_0x533c94([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3ab469&&(!!_0x3ab469[_0x533c94([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x533c94([0x2a]))||!!_0x3ab469[_0x533c94([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x533c94([0x55,0x50,0x4c,0x43])));}function _0x48e5c0(){const _0x46724d=_0x46c804[_0x533c94([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x46724d||0x0==_0x46724d[_0x533c94([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4bdd05}=new URL(window[_0x533c94([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x46724d[_0x533c94([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bdd05))return!0x0;const _0x26b515=_0x4bdd05[_0x533c94([0x73,0x70,0x6c,0x69,0x74])](_0x533c94([0x2e]));return _0x46724d[_0x533c94([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4f0ae1=>_0x4f0ae1[_0x533c94([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x533c94([0x2a])))[_0x533c94([0x6d,0x61,0x70])](_0x1c399d=>_0x1c399d[_0x533c94([0x73,0x70,0x6c,0x69,0x74])](_0x533c94([0x2e])))[_0x533c94([0x73,0x6f,0x6d,0x65])](_0x33491b=>_0x26b515[_0x533c94([0x65,0x76,0x65,0x72,0x79])]((_0xe3244f,_0x830f6e)=>_0x33491b[_0x830f6e]===_0xe3244f||_0x33491b[_0x830f6e]===_0x533c94([0x2a])));}function _0x5e783b(){return _0x2e65d7&&_0x741c5e?new window[(_0x533c94([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x406c52,_0x746a70)=>{_0x2e65d7[_0x533c94([0x74,0x68,0x65,0x6e])](_0x406c52,_0x746a70),_0x741c5e[_0x533c94([0x74,0x68,0x65,0x6e])](_0x322ad4=>{_0x322ad4!=_0x533c94([0x56,0x61,0x6c,0x69,0x64])&&_0x406c52(_0x322ad4);},_0x746a70);}):_0x2e65d7||_0x741c5e||_0x533c94([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4eb70c(_0x1937cf,_0x17c1e9){return new window[(_0x533c94([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5bdece=>{if(_0x149d0f())return _0x5bdece(_0x533c94([0x56,0x61,0x6c,0x69,0x64]));_0x42aad4(),_0x198df2[_0x533c94([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x533c94([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1cd7ba=!0x1;const _0x220d6d=_0x3d74a3();function _0x32c9c1(_0x1031dc){return!!_0x1031dc&&(typeof _0x1031dc===_0x533c94([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1031dc===_0x533c94([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1031dc[_0x533c94([0x74,0x68,0x65,0x6e])]===_0x533c94([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1031dc[_0x533c94([0x63,0x61,0x74,0x63,0x68])]===_0x533c94([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3ebaf3(_0x591026){_0x13a7eb(_0x591026)[_0x533c94([0x74,0x68,0x65,0x6e])](_0x4090b4=>{if(!_0x4090b4||_0x4090b4[_0x533c94([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x533c94([0x6f,0x6b]))return _0x533c94([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x327751(_0x143380(_0x220d6d+_0x17c1e9))!=_0x4090b4[_0x533c94([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x533c94([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x533c94([0x56,0x61,0x6c,0x69,0x64]);})[_0x533c94([0x74,0x68,0x65,0x6e])](_0x2dc6d6=>(_0x5ab41b(),_0x2dc6d6),()=>{const _0x1f460f=_0x57a9e8();return null==_0x1f460f?(_0x5ab41b(),_0x533c94([0x56,0x61,0x6c,0x69,0x64])):_0x533c94(_0x3ef25d-_0x1f460f>(0x3291c013^_0x291234)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x533c94([0x74,0x68,0x65,0x6e])](_0x5bdece)[_0x533c94([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5bdece(_0x533c94([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x580a13=0x16abaa93^_0x291234;function _0x5ab41b(){const _0x19aaad=_0x533c94([0x6c,0x6c,0x63,0x74,0x2d])+_0x327751(_0x143380(_0x1937cf)),_0x384e0f=_0x489297(_0x327751(window[_0x533c94([0x4d,0x61,0x74,0x68])][_0x533c94([0x63,0x65,0x69,0x6c])](_0x3ef25d/_0x580a13)));window[_0x533c94([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x533c94([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x19aaad,_0x384e0f);}function _0x57a9e8(){const _0x311d8e=_0x533c94([0x6c,0x6c,0x63,0x74,0x2d])+_0x327751(_0x143380(_0x1937cf)),_0x517a06=window[_0x533c94([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x533c94([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x311d8e);return _0x517a06?window[_0x533c94([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x489297(_0x517a06),0x10)*_0x580a13:null;}function _0x13a7eb(_0x556c60){return new window[(_0x533c94([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x6b71fd,_0x56f2cd)=>{_0x556c60[_0x533c94([0x74,0x68,0x65,0x6e])](_0x6b71fd,_0x56f2cd),window[_0x533c94([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x56f2cd,0x169c90d3^_0x291234);});}}_0x198df2[_0x533c94([0x6f,0x6e])](_0x533c94([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4ee244,_0x1d96b0)=>{if(_0x1d96b0[0x0]!=_0x1937cf)return _0x5bdece(_0x533c94([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1d96b0[0x1]={..._0x1d96b0[0x1],[_0x533c94([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x220d6d};},{[_0x533c94([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x533c94([0x68,0x69,0x67,0x68])}),_0x198df2[_0x533c94([0x6f,0x6e])](_0x533c94([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2b5a57=>{_0x32c9c1(_0x2b5a57[_0x533c94([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1cd7ba=!0x0,_0x3ebaf3(_0x2b5a57[_0x533c94([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x533c94([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x533c94([0x6c,0x6f,0x77])}),_0x35d998[_0x533c94([0x74,0x68,0x65,0x6e])](()=>{_0x1cd7ba||_0x5bdece(_0x533c94([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x149d0f(){return _0x198df2[_0x533c94([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x533c94([0x76,0x69,0x65,0x77])][_0x533c94([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x533c94([0x61,0x75,0x74,0x6f]);}function _0x42aad4(){_0x198df2[_0x533c94([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x533c94([0x76,0x69,0x65,0x77])][_0x533c94([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x533c94([0x61,0x75,0x74,0x6f]);}}function _0x4b6517(_0x455072){const _0x5bef28=[new window[(_0x533c94([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4236e0=>setTimeout(_0x4236e0,0x16947adf^_0x291234)),_0x35d998[_0x533c94([0x74,0x68,0x65,0x6e])](()=>new window[(_0x533c94([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x340740=>{let _0x44a4fe=0x0;_0x198df2[_0x533c94([0x6d,0x6f,0x64,0x65,0x6c])][_0x533c94([0x6f,0x6e])](_0x533c94([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2af78e,_0x1fbcf7)=>{_0x1fbcf7[0x0][_0x533c94([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x44a4fe++,_0x44a4fe==(0x169d45eb^_0x291234)&&(_0x340740(),_0x2af78e[_0x533c94([0x6f,0x66,0x66])]());});}))];return window[_0x533c94([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x533c94([0x72,0x61,0x63,0x65])](_0x5bef28)[_0x533c94([0x74,0x68,0x65,0x6e])](()=>_0x455072);}async function _0x537a94(){await _0x35d998,_0x198df2[_0x533c94([0x6d,0x6f,0x64,0x65,0x6c])][_0x533c94([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xd73cc9,_0x198df2[_0x533c94([0x6d,0x6f,0x64,0x65,0x6c])][_0x533c94([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xd73cc9,_0x198df2[_0x533c94([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x533c94([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3279e7(_0x294a7f){const _0x35d163=_0xcef893();_0x198df2[_0x35d163]=_0x533c94([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x294a7f,_0x294a7f!=_0x533c94([0x56,0x61,0x6c,0x69,0x64])&&_0x537a94();}function _0xcef893(){const _0x273ddd=window[_0x533c94([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x533c94([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x533c94([0x6e,0x6f,0x77])]())[_0x533c94([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x533c94([0x2e]),'');let _0x27348b=_0x533c94([0x4e]);for(let _0x57452d=0x0;_0x57452d<_0x273ddd[_0x533c94([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x57452d+=0x2){let _0x471650=window[_0x533c94([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x273ddd[_0x533c94([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57452d,_0x57452d+0x2));_0x471650>=_0x461afb[_0x533c94([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x471650-=_0x461afb[_0x533c94([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x27348b+=_0x461afb[_0x471650];}return _0x27348b;}function _0xdcbca8(){const _0x57e69a=_0x9f6f4e[_0x533c94([0x73,0x70,0x6c,0x69,0x74])](_0x533c94([0x2e]));if(0x3!=_0x57e69a[_0x533c94([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x24917d(_0x57e69a[0x1]);function _0x24917d(_0x432223){const _0x3f6d49=_0x1daf39(_0x432223);return _0x3f6d49&&_0x3e8ca9()?_0x3f6d49:null;function _0x3e8ca9(){const _0x949e79=_0x3f6d49[_0x533c94([0x6a,0x74,0x69])],_0x36cb12=window[_0x533c94([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x949e79[_0x533c94([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x949e79[_0x533c94([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4b7f1d={..._0x3f6d49,[_0x533c94([0x6a,0x74,0x69])]:_0x949e79[_0x533c94([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x949e79[_0x533c94([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4b7f1d[_0x533c94([0x76,0x63])],_0x143380(_0x4b7f1d)==_0x36cb12;}}}async function _0x3139e3(){let _0x2379c0=!0x0;try{const _0x3271f5=_0x9f6f4e[_0x533c94([0x73,0x70,0x6c,0x69,0x74])](_0x533c94([0x2e])),[_0x20d584,_0x5ebfca,_0x322ba5]=_0x3271f5;return _0x4719cc(_0x20d584),await _0x4ec909(_0x20d584,_0x5ebfca,_0x322ba5),_0x2379c0;}catch(_0x498e99){return!0x1;}function _0x4719cc(_0x33c0d1){const _0x39ef95=_0x1daf39(_0x33c0d1);_0x39ef95&&_0x39ef95[_0x533c94([0x61,0x6c,0x67])]==_0x533c94([0x45,0x53,0x32,0x35,0x36])||(_0x2379c0=!0x1);}async function _0x4ec909(_0x29752b,_0x3292e9,_0x2444af){const _0x37b2c4=window[_0x533c94([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x533c94([0x66,0x72,0x6f,0x6d])](_0x236530(_0x2444af),_0x9dff87=>_0x9dff87[_0x533c94([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3442fe=new window[(_0x533c94([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x533c94([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x29752b+_0x533c94([0x2e])+_0x3292e9),_0x5d8a0a=window[_0x533c94([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x533c94([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5d8a0a)return;const _0x6c873b=await _0x5d8a0a[_0x533c94([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x533c94([0x6a,0x77,0x6b]),_0x5263e3,{[_0x533c94([0x6e,0x61,0x6d,0x65])]:_0x533c94([0x45,0x43,0x44,0x53,0x41]),[_0x533c94([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x533c94([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x533c94([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5d8a0a[_0x533c94([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x533c94([0x6e,0x61,0x6d,0x65])]:_0x533c94([0x45,0x43,0x44,0x53,0x41]),[_0x533c94([0x68,0x61,0x73,0x68])]:{[_0x533c94([0x6e,0x61,0x6d,0x65])]:_0x533c94([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x6c873b,_0x37b2c4,_0x3442fe)||(_0x2379c0=!0x1);}}function _0x1daf39(_0x4403c2){return _0x4403c2[_0x533c94([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x533c94([0x65,0x79]))?JSON[_0x533c94([0x70,0x61,0x72,0x73,0x65])](_0x236530(_0x4403c2)):null;}function _0x236530(_0x1b5ca2){return window[_0x533c94([0x61,0x74,0x6f,0x62])](_0x1b5ca2[_0x533c94([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x533c94([0x2b]))[_0x533c94([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x533c94([0x2f])));}function _0x143380(_0x82b963){let _0x357ce6=0x1505;function _0x25f8c0(_0x2b6337){for(let _0x5cdf7b=0x0;_0x5cdf7b<_0x2b6337[_0x533c94([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5cdf7b++){const _0x48d831=_0x2b6337[_0x533c94([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5cdf7b);_0x357ce6=(_0x357ce6<<0x5)+_0x357ce6+_0x48d831,_0x357ce6&=_0x357ce6;}}function _0x2ef1a5(_0x56449a){Array[_0x533c94([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x56449a)?_0x56449a[_0x533c94([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2ef1a5):_0x56449a&&typeof _0x56449a==_0x533c94([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x533c94([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x56449a)[_0x533c94([0x73,0x6f,0x72,0x74])]()[_0x533c94([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xd7652f,_0x2123a6])=>{_0x25f8c0(_0xd7652f),_0x2ef1a5(_0x2123a6);}):_0x25f8c0(window[_0x533c94([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x56449a));}return _0x2ef1a5(_0x82b963),_0x357ce6>>>0x0;}function _0x327751(_0x4d73af){return _0x4d73af[_0x533c94([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x533c94([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x533c94([0x30]));}function _0x489297(_0x42f843){return _0x42f843[_0x533c94([0x73,0x70,0x6c,0x69,0x74])]('')[_0x533c94([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x533c94([0x6a,0x6f,0x69,0x6e])]('');}function _0xd73cc9(){}function _0x533c94(_0x42beb9){return _0x42beb9['map'](_0x4dfe08=>String['fromCharCode'](_0x4dfe08))['join']('');}_0x3279e7(await _0x1a9ee1());}(this);}['_initSchema'](){const _0x382047=this['editor']['model']['schema'];_0x382047['isRegistered']('imageBlock')&&_0x382047['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x382047['isRegistered']('imageInline')&&_0x382047['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x500dd0=this['editor'];_0x500dd0['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x500dd0['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0xf0a7b=>_0xf0a7b['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3ad5e0=_0x500dd0['commands']['get']('replaceImageSource');_0x3ad5e0&&this['listenTo'](_0x3ad5e0,'cleanupImage',(_0x4ee90b,[_0x5735ed,_0x1ff146])=>{_0x5735ed['removeAttribute']('uploadcareImageId',_0x1ff146);});}['_initConfig'](){const _0x3a877a=this['editor']['config']['get']('uploadcare.uploader')||{},_0x1013bb=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3c19db(_0x261a41['document'],'uc-config',{..._0x3a877a,'pubkey':_0x1013bb,'ctx-name':'uploader','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']=_0x4e8adb=>{if('closeMax'==_0x4e8adb)return'#uc-icon-arrow-down';},_0x261a41['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3c19db(_0x261a41['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader'}),_0x261a41['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x1a831a=this['editor']['commands']['get']('insertImage');_0x1a831a&&this['listenTo'](_0x1a831a,'execute',()=>{const _0x3fe2da=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3fe2da&&_0x3fe2da['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x3fe2da);});});const _0x599b64=this['editor']['commands']['get']('uploadcareImageReplace');_0x599b64&&this['listenTo'](_0x599b64,'execute',()=>{const _0x5b10d3=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5b10d3&&_0x5b10d3['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{m(this['editor'],_0x5b10d3);});});}}class u extends _0x3b3d22{static get['requires'](){return[i,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x32607c){super(_0x32607c),_0x32607c['config']['define']('uploadcare.uploader.sourceList',[o['Local'],o['URL']]),_0x4b5396['defineComponents'](_0x4b5396);}}class ta extends _0x182c89{constructor(_0x569ed9){super(_0x569ed9);const t=_0x569ed9['t'],_0x1fc859=this['bindTemplate'],_0x35c086=new _0x60a5d7();_0x35c086['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':[_0x35c086,{'text':_0x1fc859['to']('imageUploadProgress',_0x1b9fec=>t('Loading\x20image...')+'\x20('+(_0x1b9fec||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 rt extends _0x182c89{constructor(_0x49de1b){super(_0x49de1b);const t=_0x49de1b['t'];this['set']('errorType',null);const _0xd434e9=new _0xeb584(_0x49de1b);_0xd434e9['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xd434e9['withText']=!0x0,_0xd434e9['class']='ck-button-action',_0xd434e9['on']('execute',()=>{this['fire']('retry');}),_0xd434e9['bind']('isVisible')['to'](this,'errorType',_0x48a580=>'NotFound'!==_0x48a580);const _0x4d8a43=new at();_0x4d8a43['content']=et,_0x4d8a43['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x49d4e5=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':[_0x4d8a43,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x49d4e5['to']('errorType',_0x59d020=>t('NotFound'!==_0x59d020?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xd434e9]},{'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 tt extends _0x182c89{constructor(_0xc7ece3,_0x4c8369){super(_0xc7ece3);const _0x6be96a=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x4c8369,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x6be96a['to']('imageSrc')}});}}class Z extends q{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x504a6f,_0x33103a,_0xc1a84a){super(_0x504a6f),this['_items']=this['createCollection'](),this['_loadingView']=new ta(_0x504a6f),this['_errorView']=new rt(_0x504a6f),this['_editingView']=new tt(_0x504a6f,_0xc1a84a),this['_focusableView']=new _0x182c89(_0x504a6f),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x33103a),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'],_0x1534d2=>{this['_addUploadcareImageEditorListeners'](_0x1534d2);});}),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'](_0x6e35c5,_0x5e942b){const _0x17ed3d='uc-cloud-image-editor',_0x4b1f8a=_0x6e35c5['querySelector'](_0x17ed3d);if(_0x4b1f8a)return _0x5e942b(_0x4b1f8a);const _0x5c91d7=new MutationObserver(_0xd50678=>{const _0x42d25d=_0xd50678['filter'](_0x3b0065=>_0x3b0065['target']===_0x6e35c5&&_0x3b0065['addedNodes']['length']>0x0&&_0x3b0065['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x17ed3d);_0x42d25d['length']&&(_0x5c91d7['disconnect'](),_0x5e942b(_0x42d25d[0x0]['addedNodes'][0x0]));});_0x5c91d7['observe'](_0x6e35c5,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x5f7089){_0x5f7089['addEventListener']('apply',_0x3b76c5=>{this['fire']('apply',{'imageSrc':_0x3b76c5['detail']['cdnUrl']});}),_0x5f7089['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class O extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x9d7baf(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x13741b,_0xf7be06,_0x2b943a){super(),this['_editor']=_0x13741b,this['_dialog']=_0xf7be06,this['_imageElement']=_0x2b943a,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 _0x296ae9=this['_imageElement'],_0x21988c=_0x296ae9['getAttribute']('uploadcareImageId'),_0x399d9c=_0x296ae9['getAttribute']('src');if(_0x21988c)await this['_loadImageInfo'](_0x21988c,_0x399d9c);else{if(this['_imageCache']['has'](_0x399d9c)){const _0x2382bc=this['_imageCache']['get'](_0x399d9c);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2382bc['url'],this['imageDimension']=_0x2382bc['dimension'],this['imageId']=_0x2382bc['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x247eba}=this['_editor'],t=_0x247eba['t'],_0x122ba3=new Z(_0x247eba,this['imageStatus'],this['_attributes']);_0x122ba3['bind']('status')['to'](this,'imageStatus'),_0x122ba3['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x122ba3['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x122ba3['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x122ba3,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0xb1f3f5,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x122ba3,'position':_0x34e3d0['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x122ba3['focus']();},'onHide':()=>{_0x122ba3['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x92032d=>!F(_0x92032d,_0x122ba3['element'])}});}['_loadImageInfo'](_0x305ef8,_0x508eda){return C['getInfo'](_0x305ef8,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x425b84=>{const {width:_0x59c241,height:_0x3b7724}=_0x425b84['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x508eda,this['imageDimension']={'width':_0x59c241,'height':_0x3b7724},this['imageId']=_0x305ef8;})['catch'](_0x1d0c33=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1d0c33['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x11e5d0,_0x42e241){return this['_getImageAsFile'](_0x11e5d0)['then'](_0x222718=>C['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x42e241['signal'],'file':_0x222718,'onProgress':_0x1474f5=>{_0x1474f5&&_0x1474f5['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1474f5['value']));}}))['then'](_0xbfd924=>{const {width:_0x3c9ebd,height:_0x3e6c31}=_0xbfd924['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xbfd924['cdnUrl'],this['imageDimension']={'width':_0x3c9ebd,'height':_0x3e6c31},this['imageId']=_0xbfd924['uuid'],this['imageUploadProgress']=null;const _0x40a53f=_0x11e5d0['getAttribute']('src');this['_imageCache']['set'](_0x40a53f,{'id':_0xbfd924['uuid'],'url':_0xbfd924['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x5b103d=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5b103d['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x32d138,_0x5cc026){_0x32d138['on']('apply',(_0x9badb2,_0x5287ed)=>{this['_replaceImage'](_0x5cc026,_0x5287ed['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x32d138['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x32d138['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1e7bb8,_0x5918c7,_0x38e8eb){const _0x2737a2=this['_editor'],{width:_0x5c3000,height:_0x1c754e}=A(_0x5918c7,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x58b1ce,imageSources:_0x37b96a}=E(_0x5918c7,_0x5c3000);_0x2737a2['model']['change'](_0x4378fd=>{if('$graveyard'===_0x1e7bb8['root']['rootName']){_0x2737a2['execute']('insertImage',{'imageType':_0x1e7bb8['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1e7bb8['getAttributes']()),'uploadcareImageId':_0x38e8eb,'src':_0x58b1ce,'sources':_0x37b96a,'width':_0x5c3000,'height':_0x1c754e}});const _0x3d1d34=_0x1e7bb8['getChildren']();_0x1e7bb8=_0x2737a2['model']['document']['selection']['getSelectedElement']();for(const _0x58befd of _0x3d1d34)_0x4378fd['append'](_0x4378fd['cloneElement'](_0x58befd),_0x1e7bb8);}else _0x4378fd['setSelection'](_0x1e7bb8,'on'),_0x2737a2['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1e7bb8['getAttributes']()),'uploadcareImageId':_0x38e8eb,'src':_0x58b1ce,'sources':_0x37b96a,'width':_0x5c3000,'height':_0x1c754e},_0x1e7bb8);_0x4378fd['setSelection'](_0x1e7bb8,'on');});}async['_getImageAsFile'](_0x3a80c4){const _0x34114a=_0x261a41['window'],_0x1a42da=_0x261a41['document']['location']['href'],_0x592fe5=new _0x34114a['URL'](_0x3a80c4['getAttribute']('src'),_0x1a42da);if('data:'===_0x592fe5['protocol']){const _0x125b70=_0x592fe5['href']['split'](','),_0x2b2261=_0x125b70[0x0]['match'](/:(.*?);/)[0x1],_0x43f49=_0x2b2261['split']('/')[0x1],_0x202ad0=_0x34114a['atob'](_0x125b70[_0x125b70['length']-0x1]);let _0x3b1a39=_0x202ad0['length'];const _0x54f86d=new _0x34114a['Uint8Array'](_0x3b1a39);for(;_0x3b1a39--;)_0x54f86d[_0x3b1a39]=_0x202ad0['charCodeAt'](_0x3b1a39);return new _0x34114a['File']([_0x54f86d],'image.'+_0x43f49,{'type':_0x2b2261});}const _0xdb9c29=_0x592fe5['href']['split']('/'),_0x57f80c=_0xdb9c29[_0xdb9c29['length']-0x1],_0x2dddab=_0x57f80c['split']('.')[0x1];return _0x34114a['fetch'](_0x592fe5['href'])['then'](_0x363b58=>_0x363b58['clone']()['blob']())['then'](_0x2275f5=>new _0x34114a['File']([_0x2275f5],_0x57f80c,{'type':'image/'+_0x2dddab}));}}class V extends _0x1376a6{['imageEditController'];static get['requires'](){return[_0x137a31];}['_isEditable'];constructor(_0x4b3859){super(_0x4b3859),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x29d8dd){const _0x26db78=R(_0x29d8dd);return _0x1692f1=>!(!_0x1692f1||!_0x1692f1['is']('element','imageBlock')&&!_0x1692f1['is']('element','imageInline'))&&(!!_0x1692f1['hasAttribute']('uploadcareImageId')||!!_0x1692f1['hasAttribute']('src')&&_0x26db78(_0x1692f1['getAttribute']('src')));}(_0x4b3859['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x53bbc5=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x53bbc5);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x6c0c6e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x6c0c6e&&(_0x6c0c6e['is']('element','imageBlock')||_0x6c0c6e['is']('element','imageInline'))&&(this['imageEditController']=new O(this['editor'],this['editor']['plugins']['get'](_0x137a31),_0x6c0c6e),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class X extends _0x1376a6{['refresh'](){const _0x252b07=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x252b07&&(_0x252b07['is']('element','imageBlock')||_0x252b07['is']('element','imageInline')));}['execute'](_0x473191){const _0x5eeb82=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x28c984=>{_0x28c984['setAttributes'](_0x473191,_0x5eeb82),_0x28c984['removeAttribute']('srcset',_0x5eeb82),_0x28c984['removeAttribute']('sizes',_0x5eeb82);});}}class g extends _0x3b3d22{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[i,_0x27d959,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x349e18}=this;_0x349e18['commands']['add']('uploadcareImageEdit',new V(_0x349e18)),_0x349e18['commands']['add']('uploadcareImageReplace',new X(_0x349e18));}}class j extends _0x3b3d22{['_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 _0x29d3ef=this['editor'];_0x29d3ef['ui']['componentFactory']['add']('uploadcareImageEdit',_0xafee1e=>{const _0xd9d8e8=_0x29d3ef['commands']['get']('uploadcareImageEdit'),_0x15d92d=new _0xeb584(_0xafee1e),t=_0xafee1e['t'];return _0x15d92d['set']({'icon':_0xb1f3f5,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x15d92d['bind']('isEnabled')['to'](_0xd9d8e8),_0x15d92d['bind']('isOn')['to'](_0xd9d8e8,'isActive'),this['listenTo'](_0x15d92d,'execute',()=>{_0x29d3ef['execute']('uploadcareImageEdit'),_0x29d3ef['editing']['view']['focus']();}),_0x15d92d;}),this['_initConfig']();}['_initConfig'](){const _0x1f700c=_0x3c19db(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1f700c),this['listenTo'](this['editor'],'destroy',()=>{_0x1f700c['remove']();});}}class P extends _0x3b3d22{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[g,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{u as Uploadcare,i as UploadcareEditing,P as UploadcareImageEdit,g as UploadcareImageEditEditing,j as UploadcareImageEditUI,e as UploadcareUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250525.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20250525.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250525.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20250525.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20250525.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250525.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20250525.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250525.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20250525.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.12.0",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.1"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x24a07a=_0x11d4;(function(_0x2b3f0b,_0x26f7a8){const _0x32668f=_0x11d4,_0x406059=_0x2b3f0b();while(!![]){try{const _0x344f79=-parseInt(_0x32668f(0x17d))/0x1*(-parseInt(_0x32668f(0x17a))/0x2)+-parseInt(_0x32668f(0x18f))/0x3+-parseInt(_0x32668f(0x18a))/0x4*(parseInt(_0x32668f(0x16b))/0x5)+-parseInt(_0x32668f(0x181))/0x6*(parseInt(_0x32668f(0x172))/0x7)+-parseInt(_0x32668f(0x18e))/0x8*(parseInt(_0x32668f(0x1a5))/0x9)+parseInt(_0x32668f(0x18d))/0xa*(-parseInt(_0x32668f(0x1a6))/0xb)+parseInt(_0x32668f(0x19b))/0xc*(parseInt(_0x32668f(0x183))/0xd);if(_0x344f79===_0x26f7a8)break;else _0x406059['push'](_0x406059['shift']());}catch(_0x3f1329){_0x406059['push'](_0x406059['shift']());}}}(_0x206b,0x82b67));import{Plugin as _0x52936f}from'ckeditor5/src/core.js';import{Dialog as _0xd122ea}from'ckeditor5/src/ui.js';import{createElement as _0x808606,global as _0x50239a,uid as _0x2b20c3}from'ckeditor5/src/utils.js';import _0xda8eda from'./uploadcarecommand.js';import _0x441ca9 from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x397c11}from'./utils/editingutils.js';function _0x11d4(_0x1b37ee,_0xbb6a5e){const _0x206b94=_0x206b();return _0x11d4=function(_0x11d4fa,_0x1fe28a){_0x11d4fa=_0x11d4fa-0x155;let _0x618378=_0x206b94[_0x11d4fa];return _0x618378;},_0x11d4(_0x1b37ee,_0xbb6a5e);}export default class i extends _0x52936f{[_0x24a07a(0x157)]=null;[_0x24a07a(0x17b)]=null;static get[_0x24a07a(0x163)](){const _0x352ec3=_0x24a07a;return _0x352ec3(0x190);}static get[_0x24a07a(0x184)](){const _0x1c70e9=_0x24a07a;return[_0x1c70e9(0x16a),_0x441ca9,_0xd122ea];}static get[_0x24a07a(0x1a7)](){return!0x0;}static get[_0x24a07a(0x17f)](){return!0x0;}get[_0x24a07a(0x1a3)](){const _0x5521b6=_0x24a07a;return this[_0x5521b6(0x157)];}get[_0x24a07a(0x188)](){const _0x447e38=_0x24a07a;return this[_0x447e38(0x17b)];}[_0x24a07a(0x15d)](){const _0x56cf4e=_0x24a07a,_0x2775d3=this[_0x56cf4e(0x1a8)];_0x2775d3[_0x56cf4e(0x17c)][_0x56cf4e(0x1a0)](_0x56cf4e(0x19f),new _0xda8eda(_0x2775d3));}[_0x24a07a(0x176)](){const _0x14fbed=_0x24a07a;this[_0x14fbed(0x1a9)](),this[_0x14fbed(0x182)](),this[_0x14fbed(0x155)](),this[_0x14fbed(0x195)](),this[_0x14fbed(0x1aa)](),this[_0x14fbed(0x1a4)](this[_0x14fbed(0x1a8)],_0x14fbed(0x16f),()=>{const _0x1c8840=_0x14fbed;this[_0x1c8840(0x157)]&&(this[_0x1c8840(0x157)][_0x1c8840(0x1ab)](),this[_0x1c8840(0x157)]=null),this[_0x1c8840(0x17b)]&&(this[_0x1c8840(0x17b)][_0x1c8840(0x1ab)](),this[_0x1c8840(0x17b)]=null);const _0x3e4e47=_0x50239a[_0x1c8840(0x196)][_0x1c8840(0x19a)](_0x1c8840(0x189));_0x3e4e47&&_0x3e4e47[_0x1c8840(0x1ab)]();}),async function(_0x527dc4){const _0x1b3a95=_0x44c22e([0x50,0x62,0x4d,0x54,0x78,0x73,0x6f,0x4e,0x58,0x38,0x43,0x41,0x76,0x55,0x45,0x56,0x36,0x75,0x34,0x74,0x46,0x65,0x32,0x68,0x6e,0x42,0x66,0x39,0x6b,0x4f,0x57,0x6c,0x71,0x67,0x64,0x61,0x63,0x49,0x35,0x4a,0x4c,0x79,0x6d,0x7a,0x69,0x77,0x51,0x31,0x5a,0x33,0x44,0x70,0x52,0x4b,0x37,0x53,0x47,0x48,0x59,0x6a,0x30,0x72]),_0x4c8df5=0x529025cf,_0xd8ba60=0x52974d0f^_0x4c8df5,_0x453fc5=window[_0x44c22e([0x44,0x61,0x74,0x65])][_0x44c22e([0x6e,0x6f,0x77])](),_0x575c7e=_0x527dc4[_0x44c22e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x9a12b2=new window[(_0x44c22e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x13d622=>{_0x575c7e[_0x44c22e([0x6f,0x6e,0x63,0x65])](_0x44c22e([0x72,0x65,0x61,0x64,0x79]),_0x13d622);}),_0x59c282={[_0x44c22e([0x6b,0x74,0x79])]:_0x44c22e([0x45,0x43]),[_0x44c22e([0x75,0x73,0x65])]:_0x44c22e([0x73,0x69,0x67]),[_0x44c22e([0x63,0x72,0x76])]:_0x44c22e([0x50,0x2d,0x32,0x35,0x36]),[_0x44c22e([0x78])]:_0x44c22e([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]),[_0x44c22e([0x79])]:_0x44c22e([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]),[_0x44c22e([0x61,0x6c,0x67])]:_0x44c22e([0x45,0x53,0x32,0x35,0x36])},_0x6e9ce7=_0x575c7e[_0x44c22e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x44c22e([0x67,0x65,0x74])](_0x44c22e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2ac3e1(){let _0xff3d9a,_0x399e19=null,_0x10ef43=null;try{if(_0x6e9ce7==_0x44c22e([0x47,0x50,0x4c]))return _0x44c22e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xff3d9a=_0x3283ad(),!_0xff3d9a)return _0x44c22e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xff3d9a[_0x44c22e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x10ef43=_0x19a069(_0xff3d9a[_0x44c22e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xff3d9a[_0x44c22e([0x6a,0x74,0x69])])),await _0x412f03()?_0x46c35f()?_0x2ecd1f()?_0x44c22e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x37cb6f()?(_0xff3d9a[_0x44c22e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x44c22e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x399e19=_0x4fcd22(_0x44c22e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xff3d9a[_0x44c22e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x44c22e([0x74,0x72,0x69,0x61,0x6c])&&(_0x399e19=_0x4fcd22(_0x44c22e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x439ec0()):_0x44c22e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x44c22e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x44c22e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x3e5653){return _0x44c22e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2ecd1f(){const _0x37f1f6=[_0x44c22e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x44c22e([0x74,0x72,0x69,0x61,0x6c])][_0x44c22e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xff3d9a[_0x44c22e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x453fc5/0x3e8:0xe10*_0xd8ba60;return _0xff3d9a[_0x44c22e([0x65,0x78,0x70])]<_0x37f1f6;}function _0x46c35f(){const _0x138fd8=_0xff3d9a[_0x44c22e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x138fd8&&(!!_0x138fd8[_0x44c22e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44c22e([0x2a]))||!!_0x138fd8[_0x44c22e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44c22e([0x55,0x50,0x4c,0x43])));}function _0x37cb6f(){const _0x443fb0=_0x11d4,_0x1c9a6e=_0xff3d9a[_0x44c22e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1c9a6e||0x0==_0x1c9a6e[_0x44c22e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4e3e92}=new URL(window[_0x44c22e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x443fb0(0x174)]);if(_0x1c9a6e[_0x44c22e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e3e92))return!0x0;const _0x4d445f=_0x4e3e92[_0x44c22e([0x73,0x70,0x6c,0x69,0x74])](_0x44c22e([0x2e]));return _0x1c9a6e[_0x44c22e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x56a303=>_0x56a303[_0x44c22e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44c22e([0x2a])))[_0x44c22e([0x6d,0x61,0x70])](_0x2292ea=>_0x2292ea[_0x44c22e([0x73,0x70,0x6c,0x69,0x74])](_0x44c22e([0x2e])))[_0x44c22e([0x73,0x6f,0x6d,0x65])](_0x288602=>_0x4d445f[_0x44c22e([0x65,0x76,0x65,0x72,0x79])]((_0x2dc2eb,_0x537f66)=>_0x288602[_0x537f66]===_0x2dc2eb||_0x288602[_0x537f66]===_0x44c22e([0x2a])));}function _0x439ec0(){return _0x399e19&&_0x10ef43?new window[(_0x44c22e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xbcb0f4,_0x475a7d)=>{_0x399e19[_0x44c22e([0x74,0x68,0x65,0x6e])](_0xbcb0f4,_0x475a7d),_0x10ef43[_0x44c22e([0x74,0x68,0x65,0x6e])](_0x3879a3=>{_0x3879a3!=_0x44c22e([0x56,0x61,0x6c,0x69,0x64])&&_0xbcb0f4(_0x3879a3);},_0x475a7d);}):_0x399e19||_0x10ef43||_0x44c22e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x19a069(_0x50dd5c,_0x2c1ac8){return new window[(_0x44c22e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1eee17=>{if(_0x12dbdf())return _0x1eee17(_0x44c22e([0x56,0x61,0x6c,0x69,0x64]));_0x40e2ab(),_0x575c7e[_0x44c22e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x44c22e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x389f48=!0x1;const _0x12d834=_0x2b20c3();function _0x4edc64(_0x107baa){return!!_0x107baa&&(typeof _0x107baa===_0x44c22e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x107baa===_0x44c22e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x107baa[_0x44c22e([0x74,0x68,0x65,0x6e])]===_0x44c22e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x107baa[_0x44c22e([0x63,0x61,0x74,0x63,0x68])]===_0x44c22e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x41b1c8(_0x8f25f1){_0x5e2fac(_0x8f25f1)[_0x44c22e([0x74,0x68,0x65,0x6e])](_0xd9a6e4=>{if(!_0xd9a6e4||_0xd9a6e4[_0x44c22e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x44c22e([0x6f,0x6b]))return _0x44c22e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x194424(_0x5502ca(_0x12d834+_0x2c1ac8))!=_0xd9a6e4[_0x44c22e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x44c22e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x44c22e([0x56,0x61,0x6c,0x69,0x64]);})[_0x44c22e([0x74,0x68,0x65,0x6e])](_0x246732=>(_0x2205ac(),_0x246732),()=>{const _0x4e5d04=_0x46bf60();return null==_0x4e5d04?(_0x2205ac(),_0x44c22e([0x56,0x61,0x6c,0x69,0x64])):_0x44c22e(_0x453fc5-_0x4e5d04>(0x769ca1cf^_0x4c8df5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x44c22e([0x74,0x68,0x65,0x6e])](_0x1eee17)[_0x44c22e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1eee17(_0x44c22e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x129bc3=0x52a6cb4f^_0x4c8df5;function _0x2205ac(){const _0x443617=_0x44c22e([0x6c,0x6c,0x63,0x74,0x2d])+_0x194424(_0x5502ca(_0x50dd5c)),_0xa4060=_0xd11de2(_0x194424(window[_0x44c22e([0x4d,0x61,0x74,0x68])][_0x44c22e([0x63,0x65,0x69,0x6c])](_0x453fc5/_0x129bc3)));window[_0x44c22e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x44c22e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x443617,_0xa4060);}function _0x46bf60(){const _0x432c6c=_0x44c22e([0x6c,0x6c,0x63,0x74,0x2d])+_0x194424(_0x5502ca(_0x50dd5c)),_0x17a9ce=window[_0x44c22e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x44c22e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x432c6c);return _0x17a9ce?window[_0x44c22e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xd11de2(_0x17a9ce),0x10)*_0x129bc3:null;}function _0x5e2fac(_0x3b62a9){return new window[(_0x44c22e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x6f5a2e,_0x5e7116)=>{_0x3b62a9[_0x44c22e([0x74,0x68,0x65,0x6e])](_0x6f5a2e,_0x5e7116),window[_0x44c22e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5e7116,0x5291f10f^_0x4c8df5);});}}_0x575c7e[_0x44c22e([0x6f,0x6e])](_0x44c22e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x173db4,_0x290469)=>{if(_0x290469[0x0]!=_0x50dd5c)return _0x1eee17(_0x44c22e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x290469[0x1]={..._0x290469[0x1],[_0x44c22e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x12d834};},{[_0x44c22e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x44c22e([0x68,0x69,0x67,0x68])}),_0x575c7e[_0x44c22e([0x6f,0x6e])](_0x44c22e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2b69be=>{_0x4edc64(_0x2b69be[_0x44c22e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x389f48=!0x0,_0x41b1c8(_0x2b69be[_0x44c22e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x44c22e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x44c22e([0x6c,0x6f,0x77])}),_0x9a12b2[_0x44c22e([0x74,0x68,0x65,0x6e])](()=>{_0x389f48||_0x1eee17(_0x44c22e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x12dbdf(){return _0x575c7e[_0x44c22e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44c22e([0x76,0x69,0x65,0x77])][_0x44c22e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x44c22e([0x61,0x75,0x74,0x6f]);}function _0x40e2ab(){_0x575c7e[_0x44c22e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44c22e([0x76,0x69,0x65,0x77])][_0x44c22e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x44c22e([0x61,0x75,0x74,0x6f]);}}function _0x4fcd22(_0x2c8939){const _0x16b52f=[new window[(_0x44c22e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x267091=>setTimeout(_0x267091,0x52991b03^_0x4c8df5)),_0x9a12b2[_0x44c22e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x44c22e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2285f8=>{let _0x474df6=0x0;_0x575c7e[_0x44c22e([0x6d,0x6f,0x64,0x65,0x6c])][_0x44c22e([0x6f,0x6e])](_0x44c22e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1a4ec5,_0x1cbecb)=>{_0x1cbecb[0x0][_0x44c22e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x474df6++,_0x474df6==(0x52902437^_0x4c8df5)&&(_0x2285f8(),_0x1a4ec5[_0x44c22e([0x6f,0x66,0x66])]());});}))];return window[_0x44c22e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x44c22e([0x72,0x61,0x63,0x65])](_0x16b52f)[_0x44c22e([0x74,0x68,0x65,0x6e])](()=>_0x2c8939);}async function _0x759818(){await _0x9a12b2,_0x575c7e[_0x44c22e([0x6d,0x6f,0x64,0x65,0x6c])][_0x44c22e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x37b3a5,_0x575c7e[_0x44c22e([0x6d,0x6f,0x64,0x65,0x6c])][_0x44c22e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x37b3a5,_0x575c7e[_0x44c22e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x44c22e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x276f9b(_0x32fad4){const _0x301f42=_0x1584b7();_0x575c7e[_0x301f42]=_0x44c22e([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x32fad4,_0x32fad4!=_0x44c22e([0x56,0x61,0x6c,0x69,0x64])&&_0x759818();}function _0x1584b7(){const _0x110d4e=window[_0x44c22e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x44c22e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x44c22e([0x6e,0x6f,0x77])]())[_0x44c22e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x44c22e([0x2e]),'');let _0x6ac92e=_0x44c22e([0x50]);for(let _0x103f6a=0x0;_0x103f6a<_0x110d4e[_0x44c22e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x103f6a+=0x2){let _0xedaacc=window[_0x44c22e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x110d4e[_0x44c22e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x103f6a,_0x103f6a+0x2));_0xedaacc>=_0x1b3a95[_0x44c22e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xedaacc-=_0x1b3a95[_0x44c22e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x6ac92e+=_0x1b3a95[_0xedaacc];}return _0x6ac92e;}function _0x3283ad(){const _0x5af408=_0x6e9ce7[_0x44c22e([0x73,0x70,0x6c,0x69,0x74])](_0x44c22e([0x2e]));if(0x3!=_0x5af408[_0x44c22e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x21ee6d(_0x5af408[0x1]);function _0x21ee6d(_0x4c8920){const _0x1dc64=_0x119013(_0x4c8920);return _0x1dc64&&_0x54287b()?_0x1dc64:null;function _0x54287b(){const _0x22ef83=_0x1dc64[_0x44c22e([0x6a,0x74,0x69])],_0x1ce594=window[_0x44c22e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x22ef83[_0x44c22e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x22ef83[_0x44c22e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4ec68e={..._0x1dc64,[_0x44c22e([0x6a,0x74,0x69])]:_0x22ef83[_0x44c22e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x22ef83[_0x44c22e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4ec68e[_0x44c22e([0x76,0x63])],_0x5502ca(_0x4ec68e)==_0x1ce594;}}}async function _0x412f03(){let _0x4467b3=!0x0;try{const _0x5ad87f=_0x6e9ce7[_0x44c22e([0x73,0x70,0x6c,0x69,0x74])](_0x44c22e([0x2e])),[_0x2597a8,_0xd79cec,_0x4c73fd]=_0x5ad87f;return _0x53bb4a(_0x2597a8),await _0x26a2b5(_0x2597a8,_0xd79cec,_0x4c73fd),_0x4467b3;}catch(_0x54f0f1){return!0x1;}function _0x53bb4a(_0x1c0f74){const _0x4768c5=_0x119013(_0x1c0f74);_0x4768c5&&_0x4768c5[_0x44c22e([0x61,0x6c,0x67])]==_0x44c22e([0x45,0x53,0x32,0x35,0x36])||(_0x4467b3=!0x1);}async function _0x26a2b5(_0x4b8e86,_0x1ff122,_0xb68edb){const _0x23d096=window[_0x44c22e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x44c22e([0x66,0x72,0x6f,0x6d])](_0x188aec(_0xb68edb),_0x9c3238=>_0x9c3238[_0x44c22e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3ccab2=new window[(_0x44c22e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x44c22e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4b8e86+_0x44c22e([0x2e])+_0x1ff122),_0x3b49ba=window[_0x44c22e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x44c22e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3b49ba)return;const _0x549f22=await _0x3b49ba[_0x44c22e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x44c22e([0x6a,0x77,0x6b]),_0x59c282,{[_0x44c22e([0x6e,0x61,0x6d,0x65])]:_0x44c22e([0x45,0x43,0x44,0x53,0x41]),[_0x44c22e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x44c22e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x44c22e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3b49ba[_0x44c22e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x44c22e([0x6e,0x61,0x6d,0x65])]:_0x44c22e([0x45,0x43,0x44,0x53,0x41]),[_0x44c22e([0x68,0x61,0x73,0x68])]:{[_0x44c22e([0x6e,0x61,0x6d,0x65])]:_0x44c22e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x549f22,_0x23d096,_0x3ccab2)||(_0x4467b3=!0x1);}}function _0x119013(_0x3c4645){return _0x3c4645[_0x44c22e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x44c22e([0x65,0x79]))?JSON[_0x44c22e([0x70,0x61,0x72,0x73,0x65])](_0x188aec(_0x3c4645)):null;}function _0x188aec(_0x288694){return window[_0x44c22e([0x61,0x74,0x6f,0x62])](_0x288694[_0x44c22e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x44c22e([0x2b]))[_0x44c22e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x44c22e([0x2f])));}function _0x5502ca(_0x2c5e8a){let _0x12e0e3=0x1505;function _0x55f2a3(_0x502659){for(let _0xe39d16=0x0;_0xe39d16<_0x502659[_0x44c22e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xe39d16++){const _0x46ab1d=_0x502659[_0x44c22e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xe39d16);_0x12e0e3=(_0x12e0e3<<0x5)+_0x12e0e3+_0x46ab1d,_0x12e0e3&=_0x12e0e3;}}function _0x43d0a2(_0x3259cb){Array[_0x44c22e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3259cb)?_0x3259cb[_0x44c22e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x43d0a2):_0x3259cb&&typeof _0x3259cb==_0x44c22e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x44c22e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3259cb)[_0x44c22e([0x73,0x6f,0x72,0x74])]()[_0x44c22e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x42f0e9,_0x3b69cc])=>{_0x55f2a3(_0x42f0e9),_0x43d0a2(_0x3b69cc);}):_0x55f2a3(window[_0x44c22e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3259cb));}return _0x43d0a2(_0x2c5e8a),_0x12e0e3>>>0x0;}function _0x194424(_0x10e80d){return _0x10e80d[_0x44c22e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x44c22e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x44c22e([0x30]));}function _0xd11de2(_0x58ef5d){return _0x58ef5d[_0x44c22e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x44c22e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x44c22e([0x6a,0x6f,0x69,0x6e])]('');}function _0x37b3a5(){}function _0x44c22e(_0x4da9ff){const _0x3d56ac=_0x11d4;return _0x4da9ff[_0x3d56ac(0x18c)](_0x103736=>String[_0x3d56ac(0x199)](_0x103736))[_0x3d56ac(0x159)]('');}_0x276f9b(await _0x2ac3e1());}(this);}[_0x24a07a(0x1a9)](){const _0x2ff389=_0x24a07a,_0x27301c=this[_0x2ff389(0x1a8)][_0x2ff389(0x197)][_0x2ff389(0x156)];_0x27301c[_0x2ff389(0x173)](_0x2ff389(0x16d))&&_0x27301c[_0x2ff389(0x162)](_0x2ff389(0x16d),{'allowAttributes':[_0x2ff389(0x1a2)]}),_0x27301c[_0x2ff389(0x173)](_0x2ff389(0x160))&&_0x27301c[_0x2ff389(0x162)](_0x2ff389(0x160),{'allowAttributes':[_0x2ff389(0x1a2)]});}[_0x24a07a(0x182)](){const _0x2240d2=_0x24a07a,_0x10093b=this[_0x2240d2(0x1a8)];_0x10093b[_0x2240d2(0x15b)][_0x2240d2(0x19d)](_0x2240d2(0x192))[_0x2240d2(0x161)]({'model':_0x2240d2(0x1a2),'view':_0x2240d2(0x166)}),_0x10093b[_0x2240d2(0x15b)][_0x2240d2(0x19d)](_0x2240d2(0x18b))[_0x2240d2(0x191)]({'model':{'key':_0x2240d2(0x1a2),'value':_0x5b0a44=>_0x5b0a44[_0x2240d2(0x194)](_0x2240d2(0x166))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x215e98=_0x10093b[_0x2240d2(0x17c)][_0x2240d2(0x15f)](_0x2240d2(0x16e));_0x215e98&&this[_0x2240d2(0x1a4)](_0x215e98,_0x2240d2(0x167),(_0x786688,[_0x13a60d,_0x5f5527])=>{const _0x258736=_0x2240d2;_0x13a60d[_0x258736(0x168)](_0x258736(0x1a2),_0x5f5527);});}[_0x24a07a(0x155)](){const _0x197ce3=_0x24a07a,_0x4bb458=this[_0x197ce3(0x1a8)][_0x197ce3(0x15a)][_0x197ce3(0x15f)](_0x197ce3(0x193))||{},_0x1d5a6f=this[_0x197ce3(0x1a8)][_0x197ce3(0x15a)][_0x197ce3(0x15f)](_0x197ce3(0x171))||'';this[_0x197ce3(0x157)]=_0x808606(_0x50239a[_0x197ce3(0x196)],_0x197ce3(0x17e),{..._0x4bb458,'pubkey':_0x1d5a6f,'ctx-name':_0x197ce3(0x180),'sourceList':'','imgOnly':_0x197ce3(0x198),'removeCopyright':_0x197ce3(0x198),'localeName':this[_0x197ce3(0x1a8)][_0x197ce3(0x1a1)][_0x197ce3(0x158)],'externalSourcesEmbedCss':_0x197ce3(0x164)}),this[_0x197ce3(0x157)][_0x197ce3(0x169)]=_0x3b43e6=>{const _0x4032cf=_0x197ce3;if(_0x4032cf(0x187)==_0x3b43e6)return _0x4032cf(0x186);},_0x50239a[_0x197ce3(0x196)][_0x197ce3(0x175)][_0x197ce3(0x15e)](this[_0x197ce3(0x157)]);}[_0x24a07a(0x195)](){const _0x506e9a=_0x24a07a;this[_0x506e9a(0x17b)]=_0x808606(_0x50239a[_0x506e9a(0x196)],_0x506e9a(0x170),{'ctx-name':_0x506e9a(0x180)}),_0x50239a[_0x506e9a(0x196)][_0x506e9a(0x175)][_0x506e9a(0x15e)](this[_0x506e9a(0x17b)]);}[_0x24a07a(0x1aa)](){const _0x39d5d3=_0x24a07a,_0xc26e99=this[_0x39d5d3(0x1a8)][_0x39d5d3(0x17c)][_0x39d5d3(0x15f)](_0x39d5d3(0x179));_0xc26e99&&this[_0x39d5d3(0x1a4)](_0xc26e99,_0x39d5d3(0x15c),()=>{const _0x8bb031=_0x39d5d3,_0x1799bc=this[_0x8bb031(0x1a8)][_0x8bb031(0x197)][_0x8bb031(0x196)][_0x8bb031(0x165)][_0x8bb031(0x16c)]();_0x1799bc&&_0x1799bc[_0x8bb031(0x194)](_0x8bb031(0x1a2))&&this[_0x8bb031(0x1a8)][_0x8bb031(0x19c)][_0x8bb031(0x185)][_0x8bb031(0x19e)](_0x8bb031(0x177),()=>{const _0x1ed345=_0x8bb031;_0x397c11(this[_0x1ed345(0x1a8)],_0x1799bc);});});const _0xa4601=this[_0x39d5d3(0x1a8)][_0x39d5d3(0x17c)][_0x39d5d3(0x15f)](_0x39d5d3(0x178));_0xa4601&&this[_0x39d5d3(0x1a4)](_0xa4601,_0x39d5d3(0x15c),()=>{const _0xd5877d=_0x39d5d3,_0x55a3c5=this[_0xd5877d(0x1a8)][_0xd5877d(0x197)][_0xd5877d(0x196)][_0xd5877d(0x165)][_0xd5877d(0x16c)]();_0x55a3c5&&_0x55a3c5[_0xd5877d(0x194)](_0xd5877d(0x1a2))&&this[_0xd5877d(0x1a8)][_0xd5877d(0x19c)][_0xd5877d(0x185)][_0xd5877d(0x19e)](_0xd5877d(0x177),()=>{const _0x2aa8bf=_0xd5877d;_0x397c11(this[_0x2aa8bf(0x1a8)],_0x55a3c5);});});}}function _0x206b(){const _0x5a87dd=['data-uc-image-id','cleanupImage','removeAttribute','iconHrefResolver','PictureEditing','2259970bjIHtx','getSelectedElement','imageBlock','replaceImageSource','destroy','uc-upload-ctx-provider','uploadcare.pubkey','42UlWLIM','isRegistered','href','body','afterInit','render','uploadcareImageReplace','insertImage','2htUUTN','_ctxElement','commands','862627oVJSCA','uc-config','isPremiumPlugin','uploader','381450nuHGVn','_initConversion','863759WBZoiA','requires','view','#uc-icon-arrow-down','closeMax','ctxElement','input[uploadcare-file-input]','8xHPskb','upcast','map','80MdMiYh','24DWUibX','2310618bqAHyb','UploadcareEditing','elementToAttribute','downcast','uploadcare.uploader','getAttribute','_initCtx','document','model','true','fromCharCode','querySelector','492RrrbBM','editing','for','once','uploadcare','add','locale','uploadcareImageId','configElement','listenTo','20529LWjqPY','1359743djWdSG','isOfficialPlugin','editor','_initSchema','_initImageProcessingIndicator','remove','_initConfig','schema','_configElement','contentLanguage','join','config','conversion','execute','init','appendChild','get','imageInline','attributeToAttribute','extend','pluginName','\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','selection'];_0x206b=function(){return _0x5a87dd;};return _0x206b();}
|
|
23
|
+
const _0x29e3cc=_0xfe76;(function(_0x2f4661,_0x3deff0){const _0x486844=_0xfe76,_0x309c19=_0x2f4661();while(!![]){try{const _0x168555=parseInt(_0x486844(0x1b5))/0x1+-parseInt(_0x486844(0x1e9))/0x2+-parseInt(_0x486844(0x1d1))/0x3+-parseInt(_0x486844(0x1ef))/0x4*(parseInt(_0x486844(0x1c4))/0x5)+-parseInt(_0x486844(0x1c9))/0x6*(-parseInt(_0x486844(0x1d5))/0x7)+-parseInt(_0x486844(0x1ca))/0x8*(-parseInt(_0x486844(0x1c1))/0x9)+-parseInt(_0x486844(0x1b7))/0xa*(-parseInt(_0x486844(0x1f9))/0xb);if(_0x168555===_0x3deff0)break;else _0x309c19['push'](_0x309c19['shift']());}catch(_0x4e3876){_0x309c19['push'](_0x309c19['shift']());}}}(_0x25ee,0x58d37));import{Plugin as _0x2aada5}from'ckeditor5/src/core.js';import{Dialog as _0x6de04d}from'ckeditor5/src/ui.js';import{createElement as _0x29c041,global as _0x1af7f9,uid as _0x35652c}from'ckeditor5/src/utils.js';import _0x371731 from'./uploadcarecommand.js';function _0xfe76(_0x4423f6,_0xb6204f){const _0x25ee12=_0x25ee();return _0xfe76=function(_0xfe76e9,_0x275a5f){_0xfe76e9=_0xfe76e9-0x1b3;let _0x25560e=_0x25ee12[_0xfe76e9];return _0x25560e;},_0xfe76(_0x4423f6,_0xb6204f);}import _0x505d87 from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x522da5}from'./utils/editingutils.js';function _0x25ee(){const _0x4ffe96=['once','extend','#uc-icon-arrow-down','getSelectedElement','12cbNgTz','142504fnNHuY','commands','closeMax','true','execute','upcast','uc-config','2169456BfPjLL','document','listenTo','afterInit','2203964tHXGHw','editing','map','ctxElement','uploadcareImageId','imageBlock','removeAttribute','_initConversion','isRegistered','configElement','schema','model','getAttribute','destroy','PictureEditing','_initConfig','editor','replaceImageSource','uploadcare.pubkey','\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','1408404HSCkIy','render','data-uc-image-id','pluginName','downcast','add','4yZGuLg','locale','uploadcareImageReplace','attributeToAttribute','_initImageProcessingIndicator','href','appendChild','config','_ctxElement','view','22MhuXvf','init','_initCtx','UploadcareEditing','isOfficialPlugin','querySelector','join','uploadcare','fromCharCode','requires','cleanupImage','_configElement','isPremiumPlugin','input[uploadcare-file-input]','uc-upload-ctx-provider','get','iconHrefResolver','11750ntkuvH','uploader','8506870xGjypV','contentLanguage','_initSchema','selection','for','body','remove','imageInline','conversion','uploadcare.uploader','27peomlN','elementToAttribute','insertImage','3025410RCxBbc'];_0x25ee=function(){return _0x4ffe96;};return _0x25ee();}export default class i extends _0x2aada5{[_0x29e3cc(0x204)]=null;[_0x29e3cc(0x1f7)]=null;static get[_0x29e3cc(0x1ec)](){const _0x598999=_0x29e3cc;return _0x598999(0x1fc);}static get[_0x29e3cc(0x202)](){const _0x6bf219=_0x29e3cc;return[_0x6bf219(0x1e3),_0x505d87,_0x6de04d];}static get[_0x29e3cc(0x1fd)](){return!0x0;}static get[_0x29e3cc(0x205)](){return!0x0;}get[_0x29e3cc(0x1de)](){const _0x4259f5=_0x29e3cc;return this[_0x4259f5(0x204)];}get[_0x29e3cc(0x1d8)](){const _0x601645=_0x29e3cc;return this[_0x601645(0x1f7)];}[_0x29e3cc(0x1fa)](){const _0x83e4c3=_0x29e3cc,_0x72ab9a=this[_0x83e4c3(0x1e5)];_0x72ab9a[_0x83e4c3(0x1cb)][_0x83e4c3(0x1ee)](_0x83e4c3(0x200),new _0x371731(_0x72ab9a));}[_0x29e3cc(0x1d4)](){const _0x3a231a=_0x29e3cc;this[_0x3a231a(0x1b9)](),this[_0x3a231a(0x1dc)](),this[_0x3a231a(0x1e4)](),this[_0x3a231a(0x1fb)](),this[_0x3a231a(0x1f3)](),this[_0x3a231a(0x1d3)](this[_0x3a231a(0x1e5)],_0x3a231a(0x1e2),()=>{const _0x297e53=_0x3a231a;this[_0x297e53(0x204)]&&(this[_0x297e53(0x204)][_0x297e53(0x1bd)](),this[_0x297e53(0x204)]=null),this[_0x297e53(0x1f7)]&&(this[_0x297e53(0x1f7)][_0x297e53(0x1bd)](),this[_0x297e53(0x1f7)]=null);const _0x149283=_0x1af7f9[_0x297e53(0x1d2)][_0x297e53(0x1fe)](_0x297e53(0x206));_0x149283&&_0x149283[_0x297e53(0x1bd)]();}),async function(_0x538087){const _0x186e47=_0x5a413e([0x4e,0x42,0x6c,0x30,0x73,0x78,0x71,0x52,0x44,0x58,0x76,0x72,0x6e,0x6a,0x54,0x68,0x38,0x6d,0x79,0x69,0x4f,0x74,0x50,0x70,0x43,0x36,0x59,0x65,0x32,0x48,0x75,0x64,0x33,0x53,0x56,0x66,0x4c,0x39,0x49,0x34,0x61,0x63,0x45,0x51,0x77,0x31,0x4b,0x6b,0x46,0x55,0x4a,0x37,0x41,0x6f,0x5a,0x35,0x47,0x4d,0x62,0x7a,0x57,0x67]),_0x388419=0x169d4413,_0x63b9db=0x169a2ccb^_0x388419,_0x19a794=window[_0x5a413e([0x44,0x61,0x74,0x65])][_0x5a413e([0x6e,0x6f,0x77])](),_0x422adf=_0x538087[_0x5a413e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4c94d7=new window[(_0x5a413e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f547a=>{_0x422adf[_0x5a413e([0x6f,0x6e,0x63,0x65])](_0x5a413e([0x72,0x65,0x61,0x64,0x79]),_0x3f547a);}),_0x49ec49={[_0x5a413e([0x6b,0x74,0x79])]:_0x5a413e([0x45,0x43]),[_0x5a413e([0x75,0x73,0x65])]:_0x5a413e([0x73,0x69,0x67]),[_0x5a413e([0x63,0x72,0x76])]:_0x5a413e([0x50,0x2d,0x32,0x35,0x36]),[_0x5a413e([0x78])]:_0x5a413e([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]),[_0x5a413e([0x79])]:_0x5a413e([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]),[_0x5a413e([0x61,0x6c,0x67])]:_0x5a413e([0x45,0x53,0x32,0x35,0x36])},_0x49b391=_0x422adf[_0x5a413e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5a413e([0x67,0x65,0x74])](_0x5a413e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x145ec3(){let _0x69b0c4,_0x2fe12e=null,_0x2b5142=null;try{if(_0x49b391==_0x5a413e([0x47,0x50,0x4c]))return _0x5a413e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x69b0c4=_0x39c684(),!_0x69b0c4)return _0x5a413e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x69b0c4[_0x5a413e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2b5142=_0xfc60df(_0x69b0c4[_0x5a413e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x69b0c4[_0x5a413e([0x6a,0x74,0x69])])),await _0x3a1dd3()?_0x579ab7()?_0x2270bc()?_0x5a413e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5a8723()?(_0x69b0c4[_0x5a413e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5a413e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2fe12e=_0x1950cb(_0x5a413e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x69b0c4[_0x5a413e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5a413e([0x74,0x72,0x69,0x61,0x6c])&&(_0x2fe12e=_0x1950cb(_0x5a413e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x16077c()):_0x5a413e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5a413e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5a413e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x11c0e6){return _0x5a413e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2270bc(){const _0x1670e0=[_0x5a413e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5a413e([0x74,0x72,0x69,0x61,0x6c])][_0x5a413e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x69b0c4[_0x5a413e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x19a794/0x3e8:0xe10*_0x63b9db;return _0x69b0c4[_0x5a413e([0x65,0x78,0x70])]<_0x1670e0;}function _0x579ab7(){const _0xe905c8=_0x69b0c4[_0x5a413e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xe905c8&&(!!_0xe905c8[_0x5a413e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a413e([0x2a]))||!!_0xe905c8[_0x5a413e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a413e([0x55,0x50,0x4c,0x43])));}function _0x5a8723(){const _0x5b9bb2=_0xfe76,_0x555e4a=_0x69b0c4[_0x5a413e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x555e4a||0x0==_0x555e4a[_0x5a413e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x419c3a}=new URL(window[_0x5a413e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x5b9bb2(0x1f4)]);if(_0x555e4a[_0x5a413e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x419c3a))return!0x0;const _0x320e5f=_0x419c3a[_0x5a413e([0x73,0x70,0x6c,0x69,0x74])](_0x5a413e([0x2e]));return _0x555e4a[_0x5a413e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3d7a0d=>_0x3d7a0d[_0x5a413e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a413e([0x2a])))[_0x5a413e([0x6d,0x61,0x70])](_0x12616e=>_0x12616e[_0x5a413e([0x73,0x70,0x6c,0x69,0x74])](_0x5a413e([0x2e])))[_0x5a413e([0x73,0x6f,0x6d,0x65])](_0x44222d=>_0x320e5f[_0x5a413e([0x65,0x76,0x65,0x72,0x79])]((_0x2e59b5,_0x1424bc)=>_0x44222d[_0x1424bc]===_0x2e59b5||_0x44222d[_0x1424bc]===_0x5a413e([0x2a])));}function _0x16077c(){return _0x2fe12e&&_0x2b5142?new window[(_0x5a413e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2b58e6,_0x14ac98)=>{_0x2fe12e[_0x5a413e([0x74,0x68,0x65,0x6e])](_0x2b58e6,_0x14ac98),_0x2b5142[_0x5a413e([0x74,0x68,0x65,0x6e])](_0x5c0f63=>{_0x5c0f63!=_0x5a413e([0x56,0x61,0x6c,0x69,0x64])&&_0x2b58e6(_0x5c0f63);},_0x14ac98);}):_0x2fe12e||_0x2b5142||_0x5a413e([0x56,0x61,0x6c,0x69,0x64]);}}function _0xfc60df(_0x47a6be,_0x313548){return new window[(_0x5a413e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18e453=>{if(_0x43faa0())return _0x18e453(_0x5a413e([0x56,0x61,0x6c,0x69,0x64]));_0x32c803(),_0x422adf[_0x5a413e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5a413e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x410416=!0x1;const _0x324c22=_0x35652c();function _0x26b822(_0x1e3268){return!!_0x1e3268&&(typeof _0x1e3268===_0x5a413e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1e3268===_0x5a413e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1e3268[_0x5a413e([0x74,0x68,0x65,0x6e])]===_0x5a413e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1e3268[_0x5a413e([0x63,0x61,0x74,0x63,0x68])]===_0x5a413e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4bdf52(_0x509175){_0x41f521(_0x509175)[_0x5a413e([0x74,0x68,0x65,0x6e])](_0x307ae2=>{if(!_0x307ae2||_0x307ae2[_0x5a413e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5a413e([0x6f,0x6b]))return _0x5a413e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x585dbb(_0x129a0d(_0x324c22+_0x313548))!=_0x307ae2[_0x5a413e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5a413e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5a413e([0x56,0x61,0x6c,0x69,0x64]);})[_0x5a413e([0x74,0x68,0x65,0x6e])](_0xdd70f0=>(_0x193405(),_0xdd70f0),()=>{const _0x365ebf=_0x1a696a();return null==_0x365ebf?(_0x193405(),_0x5a413e([0x56,0x61,0x6c,0x69,0x64])):_0x5a413e(_0x19a794-_0x365ebf>(0x3291c013^_0x388419)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5a413e([0x74,0x68,0x65,0x6e])](_0x18e453)[_0x5a413e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x18e453(_0x5a413e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x257f3a=0x16abaa93^_0x388419;function _0x193405(){const _0x16fcd0=_0x5a413e([0x6c,0x6c,0x63,0x74,0x2d])+_0x585dbb(_0x129a0d(_0x47a6be)),_0x8b6832=_0x24c7c9(_0x585dbb(window[_0x5a413e([0x4d,0x61,0x74,0x68])][_0x5a413e([0x63,0x65,0x69,0x6c])](_0x19a794/_0x257f3a)));window[_0x5a413e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5a413e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x16fcd0,_0x8b6832);}function _0x1a696a(){const _0x1671a5=_0x5a413e([0x6c,0x6c,0x63,0x74,0x2d])+_0x585dbb(_0x129a0d(_0x47a6be)),_0x3412a2=window[_0x5a413e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5a413e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1671a5);return _0x3412a2?window[_0x5a413e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x24c7c9(_0x3412a2),0x10)*_0x257f3a:null;}function _0x41f521(_0x2d50c8){return new window[(_0x5a413e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x46cb10,_0xc8f92a)=>{_0x2d50c8[_0x5a413e([0x74,0x68,0x65,0x6e])](_0x46cb10,_0xc8f92a),window[_0x5a413e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xc8f92a,0x169c90d3^_0x388419);});}}_0x422adf[_0x5a413e([0x6f,0x6e])](_0x5a413e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x36cc0f,_0x5f3e4d)=>{if(_0x5f3e4d[0x0]!=_0x47a6be)return _0x18e453(_0x5a413e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5f3e4d[0x1]={..._0x5f3e4d[0x1],[_0x5a413e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x324c22};},{[_0x5a413e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5a413e([0x68,0x69,0x67,0x68])}),_0x422adf[_0x5a413e([0x6f,0x6e])](_0x5a413e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5ac92c=>{_0x26b822(_0x5ac92c[_0x5a413e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x410416=!0x0,_0x4bdf52(_0x5ac92c[_0x5a413e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5a413e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5a413e([0x6c,0x6f,0x77])}),_0x4c94d7[_0x5a413e([0x74,0x68,0x65,0x6e])](()=>{_0x410416||_0x18e453(_0x5a413e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x43faa0(){return _0x422adf[_0x5a413e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5a413e([0x76,0x69,0x65,0x77])][_0x5a413e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5a413e([0x61,0x75,0x74,0x6f]);}function _0x32c803(){_0x422adf[_0x5a413e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5a413e([0x76,0x69,0x65,0x77])][_0x5a413e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5a413e([0x61,0x75,0x74,0x6f]);}}function _0x1950cb(_0x1ff70b){const _0x25760d=[new window[(_0x5a413e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x134963=>setTimeout(_0x134963,0x16947adf^_0x388419)),_0x4c94d7[_0x5a413e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5a413e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x263ba4=>{let _0x437dc5=0x0;_0x422adf[_0x5a413e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a413e([0x6f,0x6e])](_0x5a413e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x423598,_0x70d773)=>{_0x70d773[0x0][_0x5a413e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x437dc5++,_0x437dc5==(0x169d45eb^_0x388419)&&(_0x263ba4(),_0x423598[_0x5a413e([0x6f,0x66,0x66])]());});}))];return window[_0x5a413e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5a413e([0x72,0x61,0x63,0x65])](_0x25760d)[_0x5a413e([0x74,0x68,0x65,0x6e])](()=>_0x1ff70b);}async function _0x38bac5(){await _0x4c94d7,_0x422adf[_0x5a413e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a413e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5dd634,_0x422adf[_0x5a413e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5a413e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5dd634,_0x422adf[_0x5a413e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5a413e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4fb5f4(_0x5eea2a){const _0x882dc4=_0x211de9();_0x422adf[_0x882dc4]=_0x5a413e([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5eea2a,_0x5eea2a!=_0x5a413e([0x56,0x61,0x6c,0x69,0x64])&&_0x38bac5();}function _0x211de9(){const _0x2d738b=window[_0x5a413e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5a413e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5a413e([0x6e,0x6f,0x77])]())[_0x5a413e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5a413e([0x2e]),'');let _0x1fb8f5=_0x5a413e([0x4e]);for(let _0x304efd=0x0;_0x304efd<_0x2d738b[_0x5a413e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x304efd+=0x2){let _0x5e64ed=window[_0x5a413e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d738b[_0x5a413e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x304efd,_0x304efd+0x2));_0x5e64ed>=_0x186e47[_0x5a413e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5e64ed-=_0x186e47[_0x5a413e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1fb8f5+=_0x186e47[_0x5e64ed];}return _0x1fb8f5;}function _0x39c684(){const _0x3dffbe=_0x49b391[_0x5a413e([0x73,0x70,0x6c,0x69,0x74])](_0x5a413e([0x2e]));if(0x3!=_0x3dffbe[_0x5a413e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x26a9dd(_0x3dffbe[0x1]);function _0x26a9dd(_0x4c0013){const _0x42a871=_0x6928e3(_0x4c0013);return _0x42a871&&_0xba87bb()?_0x42a871:null;function _0xba87bb(){const _0x559709=_0x42a871[_0x5a413e([0x6a,0x74,0x69])],_0x40ecc1=window[_0x5a413e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x559709[_0x5a413e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x559709[_0x5a413e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2873da={..._0x42a871,[_0x5a413e([0x6a,0x74,0x69])]:_0x559709[_0x5a413e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x559709[_0x5a413e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2873da[_0x5a413e([0x76,0x63])],_0x129a0d(_0x2873da)==_0x40ecc1;}}}async function _0x3a1dd3(){let _0x5209db=!0x0;try{const _0x3b5057=_0x49b391[_0x5a413e([0x73,0x70,0x6c,0x69,0x74])](_0x5a413e([0x2e])),[_0x52abf9,_0xb95919,_0x4a3996]=_0x3b5057;return _0xed38fd(_0x52abf9),await _0x1f8c34(_0x52abf9,_0xb95919,_0x4a3996),_0x5209db;}catch(_0x338041){return!0x1;}function _0xed38fd(_0x325a36){const _0x256836=_0x6928e3(_0x325a36);_0x256836&&_0x256836[_0x5a413e([0x61,0x6c,0x67])]==_0x5a413e([0x45,0x53,0x32,0x35,0x36])||(_0x5209db=!0x1);}async function _0x1f8c34(_0x4b405a,_0x372340,_0x3ad948){const _0xd58150=window[_0x5a413e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5a413e([0x66,0x72,0x6f,0x6d])](_0x348a5b(_0x3ad948),_0x26fc75=>_0x26fc75[_0x5a413e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5af9a6=new window[(_0x5a413e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5a413e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4b405a+_0x5a413e([0x2e])+_0x372340),_0x43327b=window[_0x5a413e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5a413e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x43327b)return;const _0x5cd80b=await _0x43327b[_0x5a413e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5a413e([0x6a,0x77,0x6b]),_0x49ec49,{[_0x5a413e([0x6e,0x61,0x6d,0x65])]:_0x5a413e([0x45,0x43,0x44,0x53,0x41]),[_0x5a413e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5a413e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5a413e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x43327b[_0x5a413e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5a413e([0x6e,0x61,0x6d,0x65])]:_0x5a413e([0x45,0x43,0x44,0x53,0x41]),[_0x5a413e([0x68,0x61,0x73,0x68])]:{[_0x5a413e([0x6e,0x61,0x6d,0x65])]:_0x5a413e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5cd80b,_0xd58150,_0x5af9a6)||(_0x5209db=!0x1);}}function _0x6928e3(_0x48f642){return _0x48f642[_0x5a413e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5a413e([0x65,0x79]))?JSON[_0x5a413e([0x70,0x61,0x72,0x73,0x65])](_0x348a5b(_0x48f642)):null;}function _0x348a5b(_0x12627f){return window[_0x5a413e([0x61,0x74,0x6f,0x62])](_0x12627f[_0x5a413e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5a413e([0x2b]))[_0x5a413e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5a413e([0x2f])));}function _0x129a0d(_0x14f0c6){let _0x1f88f9=0x1505;function _0x1a0e75(_0x4fbb1c){for(let _0x19038c=0x0;_0x19038c<_0x4fbb1c[_0x5a413e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x19038c++){const _0x2e3fa7=_0x4fbb1c[_0x5a413e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x19038c);_0x1f88f9=(_0x1f88f9<<0x5)+_0x1f88f9+_0x2e3fa7,_0x1f88f9&=_0x1f88f9;}}function _0x3a408f(_0x1b56bd){Array[_0x5a413e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1b56bd)?_0x1b56bd[_0x5a413e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3a408f):_0x1b56bd&&typeof _0x1b56bd==_0x5a413e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5a413e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1b56bd)[_0x5a413e([0x73,0x6f,0x72,0x74])]()[_0x5a413e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4fd69e,_0x178b2e])=>{_0x1a0e75(_0x4fd69e),_0x3a408f(_0x178b2e);}):_0x1a0e75(window[_0x5a413e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1b56bd));}return _0x3a408f(_0x14f0c6),_0x1f88f9>>>0x0;}function _0x585dbb(_0x475785){return _0x475785[_0x5a413e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5a413e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5a413e([0x30]));}function _0x24c7c9(_0x2e90b4){return _0x2e90b4[_0x5a413e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5a413e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5a413e([0x6a,0x6f,0x69,0x6e])]('');}function _0x5dd634(){}function _0x5a413e(_0x4256f9){const _0x13907c=_0xfe76;return _0x4256f9[_0x13907c(0x1d7)](_0x371229=>String[_0x13907c(0x201)](_0x371229))[_0x13907c(0x1ff)]('');}_0x4fb5f4(await _0x145ec3());}(this);}[_0x29e3cc(0x1b9)](){const _0x2f1943=_0x29e3cc,_0x4de793=this[_0x2f1943(0x1e5)][_0x2f1943(0x1e0)][_0x2f1943(0x1df)];_0x4de793[_0x2f1943(0x1dd)](_0x2f1943(0x1da))&&_0x4de793[_0x2f1943(0x1c6)](_0x2f1943(0x1da),{'allowAttributes':[_0x2f1943(0x1d9)]}),_0x4de793[_0x2f1943(0x1dd)](_0x2f1943(0x1be))&&_0x4de793[_0x2f1943(0x1c6)](_0x2f1943(0x1be),{'allowAttributes':[_0x2f1943(0x1d9)]});}[_0x29e3cc(0x1dc)](){const _0x354605=_0x29e3cc,_0x3bb947=this[_0x354605(0x1e5)];_0x3bb947[_0x354605(0x1bf)][_0x354605(0x1bb)](_0x354605(0x1ed))[_0x354605(0x1f2)]({'model':_0x354605(0x1d9),'view':_0x354605(0x1eb)}),_0x3bb947[_0x354605(0x1bf)][_0x354605(0x1bb)](_0x354605(0x1cf))[_0x354605(0x1c2)]({'model':{'key':_0x354605(0x1d9),'value':_0x2ec760=>_0x2ec760[_0x354605(0x1e1)](_0x354605(0x1eb))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x416977=_0x3bb947[_0x354605(0x1cb)][_0x354605(0x1b3)](_0x354605(0x1e6));_0x416977&&this[_0x354605(0x1d3)](_0x416977,_0x354605(0x203),(_0x23bdaf,[_0x511594,_0x12e432])=>{const _0x4493e1=_0x354605;_0x511594[_0x4493e1(0x1db)](_0x4493e1(0x1d9),_0x12e432);});}[_0x29e3cc(0x1e4)](){const _0x1ef009=_0x29e3cc,_0x455c53=this[_0x1ef009(0x1e5)][_0x1ef009(0x1f6)][_0x1ef009(0x1b3)](_0x1ef009(0x1c0))||{},_0x3a2f43=this[_0x1ef009(0x1e5)][_0x1ef009(0x1f6)][_0x1ef009(0x1b3)](_0x1ef009(0x1e7))||'';this[_0x1ef009(0x204)]=_0x29c041(_0x1af7f9[_0x1ef009(0x1d2)],_0x1ef009(0x1d0),{..._0x455c53,'pubkey':_0x3a2f43,'ctx-name':_0x1ef009(0x1b6),'sourceList':'','imgOnly':_0x1ef009(0x1cd),'removeCopyright':_0x1ef009(0x1cd),'localeName':this[_0x1ef009(0x1e5)][_0x1ef009(0x1f0)][_0x1ef009(0x1b8)],'externalSourcesEmbedCss':_0x1ef009(0x1e8)}),this[_0x1ef009(0x204)][_0x1ef009(0x1b4)]=_0x50e72b=>{const _0x21a7f0=_0x1ef009;if(_0x21a7f0(0x1cc)==_0x50e72b)return _0x21a7f0(0x1c7);},_0x1af7f9[_0x1ef009(0x1d2)][_0x1ef009(0x1bc)][_0x1ef009(0x1f5)](this[_0x1ef009(0x204)]);}[_0x29e3cc(0x1fb)](){const _0x400b05=_0x29e3cc;this[_0x400b05(0x1f7)]=_0x29c041(_0x1af7f9[_0x400b05(0x1d2)],_0x400b05(0x207),{'ctx-name':_0x400b05(0x1b6)}),_0x1af7f9[_0x400b05(0x1d2)][_0x400b05(0x1bc)][_0x400b05(0x1f5)](this[_0x400b05(0x1f7)]);}[_0x29e3cc(0x1f3)](){const _0x511a56=_0x29e3cc,_0x4589bf=this[_0x511a56(0x1e5)][_0x511a56(0x1cb)][_0x511a56(0x1b3)](_0x511a56(0x1c3));_0x4589bf&&this[_0x511a56(0x1d3)](_0x4589bf,_0x511a56(0x1ce),()=>{const _0x33c659=_0x511a56,_0x1d4aa2=this[_0x33c659(0x1e5)][_0x33c659(0x1e0)][_0x33c659(0x1d2)][_0x33c659(0x1ba)][_0x33c659(0x1c8)]();_0x1d4aa2&&_0x1d4aa2[_0x33c659(0x1e1)](_0x33c659(0x1d9))&&this[_0x33c659(0x1e5)][_0x33c659(0x1d6)][_0x33c659(0x1f8)][_0x33c659(0x1c5)](_0x33c659(0x1ea),()=>{const _0x436f47=_0x33c659;_0x522da5(this[_0x436f47(0x1e5)],_0x1d4aa2);});});const _0x36f18a=this[_0x511a56(0x1e5)][_0x511a56(0x1cb)][_0x511a56(0x1b3)](_0x511a56(0x1f1));_0x36f18a&&this[_0x511a56(0x1d3)](_0x36f18a,_0x511a56(0x1ce),()=>{const _0x352a5a=_0x511a56,_0x4095f5=this[_0x352a5a(0x1e5)][_0x352a5a(0x1e0)][_0x352a5a(0x1d2)][_0x352a5a(0x1ba)][_0x352a5a(0x1c8)]();_0x4095f5&&_0x4095f5[_0x352a5a(0x1e1)](_0x352a5a(0x1d9))&&this[_0x352a5a(0x1e5)][_0x352a5a(0x1d6)][_0x352a5a(0x1f8)][_0x352a5a(0x1c5)](_0x352a5a(0x1ea),()=>{const _0x1b321c=_0x352a5a;_0x522da5(this[_0x1b321c(0x1e5)],_0x4095f5);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x4c8f74,ObservableMixin as _0x202fb9}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x27e6f5}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x441ffa}from'ckeditor5/src/icons.js';import _0x4dec4f from'./uploadcareimageeditformview.js';import _0x24e7c9 from'../../utils/uploadutils.js';import{getImageUrls as _0x5ea021,getImageDimension as _0x1d4e46}from'../../utils/editingutils.js';import{isAncestor as _0x4e3fa8}from'../../utils/isancestor.js';export default class O extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x202fb9(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x1138b4,_0x3f920d,_0xff2446){super(),this['_editor']=_0x1138b4,this['_dialog']=_0x3f920d,this['_imageElement']=_0xff2446,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 _0x1052d5=this['_imageElement'],_0x13aa1d=_0x1052d5['getAttribute']('uploadcareImageId'),_0x4b392f=_0x1052d5['getAttribute']('src');if(_0x13aa1d)await this['_loadImageInfo'](_0x13aa1d,_0x4b392f);else{if(this['_imageCache']['has'](_0x4b392f)){const _0x497820=this['_imageCache']['get'](_0x4b392f);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x497820['url'],this['imageDimension']=_0x497820['dimension'],this['imageId']=_0x497820['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3a580a}=this['_editor'],t=_0x3a580a['t'],_0x4a2fb1=new _0x4dec4f(_0x3a580a,this['imageStatus'],this['_attributes']);_0x4a2fb1['bind']('status')['to'](this,'imageStatus'),_0x4a2fb1['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x4a2fb1['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x4a2fb1['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x4a2fb1,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x441ffa,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x4a2fb1,'position':_0x27e6f5['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x4a2fb1['focus']();},'onHide':()=>{_0x4a2fb1['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x292aaf=>!_0x4e3fa8(_0x292aaf,_0x4a2fb1['element'])}});}['_loadImageInfo'](_0x551926,_0x4c26a0){return _0x24e7c9['getInfo'](_0x551926,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x28604a=>{const {width:_0x3d7d56,height:_0x21f063}=_0x28604a['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4c26a0,this['imageDimension']={'width':_0x3d7d56,'height':_0x21f063},this['imageId']=_0x551926;})['catch'](_0x4af8f3=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4af8f3['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x44eadf,_0x5eeebf){return this['_getImageAsFile'](_0x44eadf)['then'](_0x5011e2=>_0x24e7c9['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x5eeebf['signal'],'file':_0x5011e2,'onProgress':_0x1d3042=>{_0x1d3042&&_0x1d3042['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1d3042['value']));}}))['then'](_0x1b6eb5=>{const {width:_0x329dbb,height:_0x56ee5e}=_0x1b6eb5['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1b6eb5['cdnUrl'],this['imageDimension']={'width':_0x329dbb,'height':_0x56ee5e},this['imageId']=_0x1b6eb5['uuid'],this['imageUploadProgress']=null;const _0x52704c=_0x44eadf['getAttribute']('src');this['_imageCache']['set'](_0x52704c,{'id':_0x1b6eb5['uuid'],'url':_0x1b6eb5['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x173c67=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x173c67['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x351f67,_0x14614b){_0x351f67['on']('apply',(_0x5abf1e,_0x563277)=>{this['_replaceImage'](_0x14614b,_0x563277['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x351f67['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x351f67['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x9a056f,_0x254c55,_0x25ba2b){const _0x12487d=this['_editor'],{width:_0x451874,height:_0x4ddf6b}=_0x1d4e46(_0x254c55,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x563569,imageSources:_0x30feb6}=_0x5ea021(_0x254c55,_0x451874);_0x12487d['model']['change'](_0x4cb563=>{if('$graveyard'===_0x9a056f['root']['rootName']){_0x12487d['execute']('insertImage',{'imageType':_0x9a056f['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x9a056f['getAttributes']()),'uploadcareImageId':_0x25ba2b,'src':_0x563569,'sources':_0x30feb6,'width':_0x451874,'height':_0x4ddf6b}});const _0xc2f347=_0x9a056f['getChildren']();_0x9a056f=_0x12487d['model']['document']['selection']['getSelectedElement']();for(const _0x36ff45 of _0xc2f347)_0x4cb563['append'](_0x4cb563['cloneElement'](_0x36ff45),_0x9a056f);}else _0x4cb563['setSelection'](_0x9a056f,'on'),_0x12487d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x9a056f['getAttributes']()),'uploadcareImageId':_0x25ba2b,'src':_0x563569,'sources':_0x30feb6,'width':_0x451874,'height':_0x4ddf6b},_0x9a056f);_0x4cb563['setSelection'](_0x9a056f,'on');});}async['_getImageAsFile'](_0x5863dc){const _0x4dc023=_0x4c8f74['window'],_0x2c6732=_0x4c8f74['document']['location']['href'],_0x275d68=new _0x4dc023['URL'](_0x5863dc['getAttribute']('src'),_0x2c6732);if('data:'===_0x275d68['protocol']){const _0x3eee2a=_0x275d68['href']['split'](','),_0x116e4a=_0x3eee2a[0x0]['match'](/:(.*?);/)[0x1],_0x439eac=_0x116e4a['split']('/')[0x1],_0x507f8b=_0x4dc023['atob'](_0x3eee2a[_0x3eee2a['length']-0x1]);let _0x590604=_0x507f8b['length'];const _0x137608=new _0x4dc023['Uint8Array'](_0x590604);for(;_0x590604--;)_0x137608[_0x590604]=_0x507f8b['charCodeAt'](_0x590604);return new _0x4dc023['File']([_0x137608],'image.'+_0x439eac,{'type':_0x116e4a});}const _0x18e75d=_0x275d68['href']['split']('/'),_0x1b7029=_0x18e75d[_0x18e75d['length']-0x1],_0x62f88f=_0x1b7029['split']('.')[0x1];return _0x4dc023['fetch'](_0x275d68['href'])['then'](_0x1c2a32=>_0x1c2a32['clone']()['blob']())['then'](_0x3112c9=>new _0x4dc023['File']([_0x3112c9],_0x1b7029,{'type':'image/'+_0x62f88f}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x3c17(_0x47a71d,_0x4b96dc){const _0x4e5b9b=_0x4e5b();return _0x3c17=function(_0x3c17b7,_0xbd4b7e){_0x3c17b7=_0x3c17b7-0x17b;let _0x5befaa=_0x4e5b9b[_0x3c17b7];return _0x5befaa;},_0x3c17(_0x47a71d,_0x4b96dc);}function _0x4e5b(){const _0x16fd92=['imageSrc','image-edit','863120TEHHku','2204540rtAWZy','setTemplate','635zTbvHp','690363rCwynb','21mETQbw','bindTemplate','set','6NovqcG','200228inYvSd','5519088rdJGjD','ck-uploadcare-theme','1252734nrZzWo','uc-cloud-image-editor','396gKcTGK','uc-light'];_0x4e5b=function(){return _0x16fd92;};return _0x4e5b();}(function(_0x155e41,_0x96d6b8){const _0x3d1b84=_0x3c17,_0x2349ea=_0x155e41();while(!![]){try{const _0x507458=-parseInt(_0x3d1b84(0x183))/0x1*(-parseInt(_0x3d1b84(0x184))/0x2)+parseInt(_0x3d1b84(0x17f))/0x3+-parseInt(_0x3d1b84(0x189))/0x4*(parseInt(_0x3d1b84(0x17e))/0x5)+parseInt(_0x3d1b84(0x187))/0x6+-parseInt(_0x3d1b84(0x180))/0x7*(-parseInt(_0x3d1b84(0x17b))/0x8)+-parseInt(_0x3d1b84(0x185))/0x9+-parseInt(_0x3d1b84(0x17c))/0xa;if(_0x507458===_0x96d6b8)break;else _0x2349ea['push'](_0x2349ea['shift']());}catch(_0x10a350){_0x2349ea['push'](_0x2349ea['shift']());}}}(_0x4e5b,0x7e38d));import{View as _0x9eb88f}from'ckeditor5/src/ui.js';export default class tt extends _0x9eb88f{constructor(_0x3e9379,_0x344dc1){const _0x5c65ec=_0x3c17;super(_0x3e9379);const _0x314484=this[_0x5c65ec(0x181)];this[_0x5c65ec(0x182)](_0x5c65ec(0x18b),''),this[_0x5c65ec(0x17d)]({'tag':_0x5c65ec(0x188),'attributes':{..._0x344dc1,'class':[_0x5c65ec(0x18a),_0x5c65ec(0x186)],'ctx-name':_0x5c65ec(0x18c),'cdn-url':_0x314484['to'](_0x5c65ec(0x18b))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as et}from'ckeditor5/src/icons.js';import{ButtonView as
|
|
23
|
+
import{IconError as et}from'ckeditor5/src/icons.js';import{ButtonView as _0x165c06,IconView as at,View as _0x295ff5}from'ckeditor5/src/ui.js';export default class rt extends _0x295ff5{constructor(_0x2fa377){super(_0x2fa377);const t=_0x2fa377['t'];this['set']('errorType',null);const _0xe62c2=new _0x165c06(_0x2fa377);_0xe62c2['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xe62c2['withText']=!0x0,_0xe62c2['class']='ck-button-action',_0xe62c2['on']('execute',()=>{this['fire']('retry');}),_0xe62c2['bind']('isVisible')['to'](this,'errorType',_0x429126=>'NotFound'!==_0x429126);const _0x1e66b2=new at();_0x1e66b2['content']=et,_0x1e66b2['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0xec787c=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':[_0x1e66b2,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0xec787c['to']('errorType',_0x234dff=>t('NotFound'!==_0x234dff?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xe62c2]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{SpinnerView as
|
|
23
|
+
import{SpinnerView as _0x30537c,View as _0x42ab41}from'ckeditor5/src/ui.js';export default class ta extends _0x42ab41{constructor(_0x156121){super(_0x156121);const t=_0x156121['t'],_0x480bfe=this['bindTemplate'],_0x4a9e5a=new _0x30537c();_0x4a9e5a['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':[_0x4a9e5a,{'text':_0x480bfe['to']('imageUploadProgress',_0x19ecb2=>t('Loading\x20image...')+'\x20('+(_0x19ecb2||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'}]}]}]});}}
|