@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20260106.0 → 0.0.0-nightly-next-20260107.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/dist/index.js +3 -3
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x393cb0,Command as _0x14fce6}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3ece2a,IconGooglePhotos as _0x359411,IconGoogleDrive as _0x39ccb0,IconFacebook as _0x48a015,IconDropbox as _0x5abe0c,IconUploadcareLink as _0x335b5f,IconUploadcareImageUpload as _0x4f69ca,IconError as _0x3b505b,IconUploadcareImageEdit as _0x4d436f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x205a9f,MenuBarMenuListItemButtonView as _0x6c4937,View as _0x499e59,FocusCycler as _0x1dcd86,Dialog as _0x9a7777,DialogViewPosition as _0x62811e,SpinnerView as _0x1327c8,IconView as _0x12817f,Notification as _0x143939}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x33438e,DomEmitterMixin as _0x32dfb1,global as _0x3bcb22,getAncestors as _0x3da32d,ObservableMixin as _0x4b976d,uid as _0x1bb90a,createElement as _0x4c3830}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x852788}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x18963d,info as _0x3c46d6}from'@uploadcare/upload-client';import*as _0x2fb1ea from'@uploadcare/file-uploader';var K=function(_0x31af03){return _0x31af03['Local']='local',_0x31af03['URL']='url',_0x31af03['Dropbox']='dropbox',_0x31af03['GDrive']='gdrive',_0x31af03['Facebook']='facebook',_0x31af03['GPhotos']='gphotos',_0x31af03['OneDrive']='onedrive',_0x31af03;}({});function R(_0x494763,_0xc01444,_0x6cda6f){const t=_0x494763['t'],_0x4bf5d4=_0x494763['t'];switch(_0xc01444){case K['Local']:return{'text':_0x4bf5d4('Insert'===_0x6cda6f?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4bf5d4('From\x20computer')};case K['URL']:return{'text':'Insert'===_0x6cda6f?_0x4bf5d4('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4bf5d4('Via\x20URL')};case K['Dropbox']:return{'text':t('Insert'===_0x6cda6f?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case K['Facebook']:return{'text':t('Insert'===_0x6cda6f?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case K['GDrive']:return{'text':t('Insert'===_0x6cda6f?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case K['GPhotos']:return{'text':t('Insert'===_0x6cda6f?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case K['OneDrive']:return{'text':t('Insert'===_0x6cda6f?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0xc01444;}}class S extends _0x393cb0{['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 _0x3f2248=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5bb922;for(const _0x3ea66b in _0x3f2248){const _0x53a53f=_0x3ea66b,_0x2cb41d=_0x3f2248[_0x53a53f];if('uploadcareLicenseKeyValid'==_0x2cb41d||'uploadcareLicenseKeyInvalid'==_0x2cb41d||'uploadcareLicenseKeyExpired'==_0x2cb41d||'uploadcareLicenseKeyDomainLimit'==_0x2cb41d||'uploadcareLicenseKeyNotAllowed'==_0x2cb41d||'uploadcareLicenseKeyEvaluationLimit'==_0x2cb41d||'uploadcareLicenseKeyTrialLimit'==_0x2cb41d||'uploadcareLicenseKeyUsageLimit'==_0x2cb41d){delete _0x3f2248[_0x53a53f],_0x5bb922=_0x2cb41d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x5bb922&&_0x3f2248['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x5bb922&&_0x3f2248['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x5bb922&&_0x3f2248['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x5bb922&&_0x3f2248['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x5bb922&&_0x3f2248['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x5bb922&&_0x3f2248['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x5bb922&&_0x3f2248['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x172549}=this,_0x113d88=_0x172549['commands']['get']('uploadcare');if(!_0x113d88)return;const _0x25c318=this['_normalizeConfigSourceList'](_0x172549['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x5218c7,_0x3d46c3)=>{const _0x468dd7=this['_getIntegrationKey'](_0x3d46c3['type']);return _0x5218c7[_0x468dd7]||(_0x5218c7[_0x468dd7]=[]),_0x5218c7[_0x468dd7]['push'](_0x3d46c3),_0x5218c7;},{});_0x172549['plugins']['has']('ImageInsertUI')&&_0x172549['commands']['get']('uploadcare')&&Object['entries'](_0x25c318)['forEach'](([_0x448204,_0x119b73])=>{_0x172549['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x448204,'observable':()=>_0x113d88,'buttonViewCreator':()=>this['_createToolbarButton'](_0x119b73),'formViewCreator':()=>this['_createDropdownButtons'](_0x119b73),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x119b73),'override':'assetManager'!==_0x448204});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x2117e9){const {locale:_0x2d0bfa}=this['editor'];return _0x2117e9['map'](_0xad5d86=>{const _0x12f1fa=R(_0x2d0bfa,_0xad5d86,'Insert');switch(_0xad5d86){case K['Local']:return{'icon':_0x4f69ca,'type':K['Local'],..._0x12f1fa};case K['URL']:return{'icon':_0x335b5f,'type':K['URL'],..._0x12f1fa};case K['Dropbox']:return{'icon':_0x5abe0c,'type':K['Dropbox'],..._0x12f1fa};case K['Facebook']:return{'icon':_0x48a015,'type':K['Facebook'],..._0x12f1fa};case K['GDrive']:return{'icon':_0x39ccb0,'type':K['GDrive'],..._0x12f1fa};case K['GPhotos']:return{'icon':_0x359411,'type':K['GPhotos'],..._0x12f1fa};case K['OneDrive']:return{'icon':_0x3ece2a,'type':K['OneDrive'],..._0x12f1fa};}});}['_getIntegrationKey'](_0x29e550){switch(_0x29e550){case K['Local']:return'upload';case K['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x487911,_0x4e52ec){const _0x2c7d07=this['editor'],_0x188e6a=new _0x487911(_0x2c7d07['locale']),_0x1cb338=_0x2c7d07['commands']['get']('uploadcare');return _0x188e6a['bind']('isEnabled')['to'](_0x1cb338),_0x188e6a['on']('execute',()=>{_0x1cb338['execute'](_0x4e52ec);}),_0x188e6a;}['_createToolbarButton'](_0x5ed846){const {locale:_0x9be110}=this['editor'],_0x4acb18=this['editor']['plugins']['get']('ImageInsertUI'),_0x187547=_0x5ed846[0x0],_0x6bf886=this['_createButton'](_0x205a9f,_0x187547['type']);return _0x6bf886['icon']=_0x187547['icon'],_0x6bf886['bind']('label')['to'](_0x4acb18,'isImageSelected',_0x3157b7=>R(_0x9be110,_0x187547['type'],_0x3157b7?'Replace':'Insert')['text']),_0x6bf886['tooltip']=!0x0,_0x6bf886;}['_createDropdownButtons'](_0x640c3){const {locale:_0x2dfaed}=this['editor'],_0x46d8b9=this['editor']['plugins']['get']('ImageInsertUI');return _0x640c3['map'](_0x5b56bb=>{const _0x3bca02=this['_createButton'](_0x205a9f,_0x5b56bb['type']);return _0x3bca02['withText']=!0x0,_0x3bca02['icon']=_0x5b56bb['icon'],_0x3bca02['bind']('label')['to'](_0x46d8b9,'isImageSelected',_0x99d04a=>R(_0x2dfaed,_0x5b56bb['type'],_0x99d04a?'Replace':'Insert')['text']),_0x3bca02;});}['_createMenuBarButtons'](_0x156e8c){return _0x156e8c['map'](_0x59e48d=>{const _0x3959a7=this['_createButton'](_0x6c4937,_0x59e48d['type']);return _0x3959a7['icon']=_0x59e48d['icon'],_0x3959a7['label']=_0x59e48d['shortText'],_0x3959a7;});}}class A extends _0x499e59{['focusTracker'];['focusCycler'];constructor(_0x3428e5){super(_0x3428e5),this['focusTracker']=new _0x33438e(),this['focusCycler']=new _0x1dcd86({'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 O extends A{constructor(_0x5ae57c,_0x12952a){super(_0x5ae57c),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-'+_0x12952a}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x1e78f3,_0x21cc7a){const _0x36e868=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x165983=>_0x165983<=_0x21cc7a)['map'](_0x370deb=>_0x1e78f3['replace'](/\/$/,'')+'/-/resize/'+_0x370deb+'x/\x20'+_0x370deb+'w');return{'imageFallbackUrl':_0x1e78f3,'imageSources':[{'srcset':_0x36e868['join'](',\x20'),'sizes':'(max-width:\x20'+_0x21cc7a+'px)\x20100vw,\x20'+_0x21cc7a+'px','type':'image/webp'}]};}function F(_0x41a09a,_0x4f7bb4,_0x53ea9d){const _0x43ccd2=_0x41a09a['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x43ccd2?parseInt(_0x43ccd2[0x1],0xa):_0x4f7bb4,'height':_0x43ccd2?parseInt(_0x43ccd2[0x2],0xa):_0x53ea9d};}function $(_0x59c14c,_0x1baa15){const _0x427c50=new(_0x32dfb1())(),_0x1f389f=_0x59c14c['plugins']['get']('ImageUtils'),_0x2cac47=_0x59c14c['editing']['mapper']['toViewElement'](_0x1baa15),_0x32c71a=_0x1f389f['findViewImgElement'](_0x2cac47),_0x36c638=_0x59c14c['editing']['view']['domConverter']['viewToDom'](_0x32c71a),_0x34297a=_0x1baa15['getAttribute']('width'),_0x10eac4=_0x1baa15['getAttribute']('height'),_0x397e31='image-processing';_0x59c14c['editing']['view']['change'](_0x4eecb9=>{_0x4eecb9['addClass'](_0x397e31,_0x2cac47),_0x4eecb9['setStyle']('aspect-ratio',_0x34297a+'/'+_0x10eac4,_0x32c71a);}),_0x427c50['listenTo'](_0x36c638,'load',()=>{_0x427c50['stopListening'](_0x36c638,'load'),_0x59c14c['editing']['view']['change'](_0x4cff66=>{_0x4cff66['removeClass'](_0x397e31,_0x2cac47),_0x4cff66['removeStyle']('aspect-ratio',_0x32c71a);});});}function B(_0x209848){if(Array['isArray'](_0x209848)){const _0x2ee9ac=_0x209848['map'](B);return _0xb9d2c9=>_0x2ee9ac['some'](_0x25926a=>_0x25926a(_0xb9d2c9));}if('origin'==_0x209848){const _0x1406d0=_0x3bcb22['window']['location']['origin'];return _0x88f489=>new URL(_0x88f489,_0x3bcb22['document']['baseURI'])['origin']==_0x1406d0;}return'function'==typeof _0x209848?_0x209848:_0x209848 instanceof RegExp?_0x103daf=>!(!_0x103daf['match'](_0x209848)&&!_0x103daf['replace'](/^https?:\/\//,'')['match'](_0x209848)):()=>!0x1;}function V(_0x8bf85f,_0xa2539e){return _0x3da32d(_0x8bf85f['target'])['includes'](_0xa2539e);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x4b976d(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x4f1679,_0x38fcf8,_0x44be87){super(),this['_editor']=_0x4f1679,this['_editing']=_0x38fcf8,this['_dialog']=_0x4f1679['plugins']['get'](_0x9a7777),this['_api']=_0x38fcf8['ctxElement']['getAPI'](),this['_type']=_0x44be87,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:_0x80ed2e,model:_0x2101d9}=this['_editor'],_0x3a2911=_0x2101d9['document']['selection']['getSelectedElement'](),_0x4c9730=_0x3a2911&&(_0x3a2911['is']('element','imageBlock')||_0x3a2911['is']('element','imageInline'));this['_formView']=new O(_0x80ed2e,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x4f69ca,'title':R(_0x80ed2e,this['_type'],_0x4c9730?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x62811e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2c81be=>!V(_0x2c81be,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x31355e}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x255106=>{const _0x411e5a=_0x31355e['length'];for(const _0x33e08e of _0x31355e){const _0x23f907=_0x33e08e===_0x31355e[_0x411e5a-0x1],{cdnUrl:_0x591bf7,fileInfo:_0x314493}=_0x33e08e;if(!_0x591bf7||!_0x314493)continue;const {width:_0x20c11f,height:_0x3de71b}=_0x314493['imageInfo'],_0x559d9f=F(_0x591bf7,_0x20c11f,_0x3de71b),_0x3654b7=D(_0x591bf7,_0x559d9f['width']),_0x3ed154={'id':_0x314493['uuid'],'type':'image','attributes':{'imageDimension':_0x559d9f,..._0x3654b7}};this['_insertAsset'](_0x3ed154,_0x23f907,_0x255106);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2ee848=>{'idle'===_0x2ee848['detail']['status']&&!_0x2ee848['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===K['Local']?this['_api']['setCurrentActivity'](K['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x3d1376,_0x344006,_0xf2a523){const _0x5da675=this['_editor']['model']['document']['selection'],_0x41b9dc=_0x5da675['getSelectedElement'](),_0xc8e163=!(!_0x41b9dc||!_0x41b9dc['is']('element','imageInline'));_0xf2a523['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x3d1376,_0xc8e163),_0x344006||_0xf2a523['setSelection'](_0x5da675['getLastPosition']());}['_insertImage'](_0x3f6df9,_0x2bcde1){const _0x2cc04e=this['_editor'],{imageDimension:_0x5e2256,imageFallbackUrl:_0x35f025,imageSources:_0x3adcb3}=_0x3f6df9['attributes'];_0x2cc04e['execute']('insertImage',{'imageType':_0x2bcde1?'imageInline':null,'source':{'uploadcareImageId':_0x3f6df9['id'],'src':_0x35f025,'sources':_0x3adcb3,..._0x5e2256}});}}class M extends _0x14fce6{['_editing'];['_controller']=null;static get['requires'](){return[_0x9a7777,z];}constructor(_0x105e63){super(_0x105e63),this['_editing']=_0x105e63['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x444796){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x444796);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x388045,..._0x43179b}){return _0x18963d(_0x388045,_0x43179b);}static['getInfo'](_0x2cea9d,_0x25303a){return _0x3c46d6(_0x2cea9d,_0x25303a);}}class W extends _0x393cb0{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x852788,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x7313=this['editor'];if(!!!_0x7313['config']['get']('uploadcare'))return;_0x7313['plugins']['get'](_0x852788)['createUploadAdapter']=_0x233140=>new G(_0x233140,_0x7313),_0x7313['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x502e3a,{imageElement:_0x140b2b,data:_0x2d690e})=>{_0x7313['model']['change'](_0x33c677=>{_0x33c677['setAttribute']('uploadcareImageId',_0x2d690e['uploadcareImageId'],_0x140b2b);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x52ca22,_0x5af3f9){this['loader']=_0x52ca22,this['editor']=_0x5af3f9,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x25d808=await this['loader']['file'];return q['upload']({'file':_0x25d808,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x4ea97e=>{_0x4ea97e&&_0x4ea97e['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x4ea97e['value']);}})['then'](async _0x12e707=>{const {imageFallbackUrl:_0x3bbae9,imageSources:_0x42ff66}=D(_0x12e707['cdnUrl'],_0x12e707['imageInfo']['width']);return{'uploadcareImageId':_0x12e707['uuid'],'default':_0x3bbae9,'sources':_0x42ff66};})['catch'](()=>{const _0x64840c=t('Cannot\x20upload\x20file:')+('\x20'+_0x25d808['name']+'.');return Promise['reject'](_0x64840c);});}['abort'](){this['controller']['abort']();}}class z extends _0x393cb0{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x9a7777];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x455561){super(_0x455561),this['ucContextId']=_0x1bb90a();}['init'](){const _0x45420a=this['editor'];_0x45420a['commands']['add']('uploadcare',new M(_0x45420a));}['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 _0x2c1620=_0x3bcb22['document']['querySelector']('input[uploadcare-file-input]');_0x2c1620&&_0x2c1620['remove']();}),async function(_0x5931f8){const _0x4d99fb=_0xb1081f([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x3eabc4=0x535f8c3a,_0x332768=0x5358f232^_0x3eabc4,_0x34be0a=window[_0xb1081f([0x44,0x61,0x74,0x65])][_0xb1081f([0x6e,0x6f,0x77])](),_0x5d549b=_0x5931f8[_0xb1081f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5d97e9=new window[(_0xb1081f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b7a59=>{_0x5d549b[_0xb1081f([0x6f,0x6e,0x63,0x65])](_0xb1081f([0x72,0x65,0x61,0x64,0x79]),_0x3b7a59);}),_0x5b1cc6={[_0xb1081f([0x6b,0x74,0x79])]:_0xb1081f([0x45,0x43]),[_0xb1081f([0x75,0x73,0x65])]:_0xb1081f([0x73,0x69,0x67]),[_0xb1081f([0x63,0x72,0x76])]:_0xb1081f([0x50,0x2d,0x32,0x35,0x36]),[_0xb1081f([0x78])]:_0xb1081f([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]),[_0xb1081f([0x79])]:_0xb1081f([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]),[_0xb1081f([0x61,0x6c,0x67])]:_0xb1081f([0x45,0x53,0x32,0x35,0x36])},_0x4e448c=_0x5d549b[_0xb1081f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xb1081f([0x67,0x65,0x74])](_0xb1081f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1d2b85(){let _0x6f7309,_0x251b29=null,_0x516a59=null;try{if(_0x4e448c==_0xb1081f([0x47,0x50,0x4c]))return _0xb1081f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x6f7309=_0x527815(),!_0x6f7309)return _0xb1081f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x6f7309[_0xb1081f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x516a59=_0x43f246(_0x6f7309[_0xb1081f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x6f7309[_0xb1081f([0x6a,0x74,0x69])])),await _0x24b911()?_0x23115b()?_0x527df5()?_0xb1081f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x8edd32()?(_0x6f7309[_0xb1081f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xb1081f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x251b29=_0x2eed3a(_0xb1081f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x6f7309[_0xb1081f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xb1081f([0x74,0x72,0x69,0x61,0x6c])&&(_0x251b29=_0x2eed3a(_0xb1081f([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x141ccc()):_0xb1081f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xb1081f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xb1081f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xb1081f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x527df5(){const _0x579119=[_0xb1081f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xb1081f([0x74,0x72,0x69,0x61,0x6c])][_0xb1081f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6f7309[_0xb1081f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x34be0a/0x3e8:0xe10*_0x332768;return _0x6f7309[_0xb1081f([0x65,0x78,0x70])]<_0x579119;}function _0x23115b(){const _0x54ba80=_0x6f7309[_0xb1081f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x54ba80&&(!!_0x54ba80[_0xb1081f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb1081f([0x2a]))||!!_0x54ba80[_0xb1081f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb1081f([0x55,0x50,0x4c,0x43])));}function _0x8edd32(){const _0x33171b=_0x6f7309[_0xb1081f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x33171b||0x0==_0x33171b[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x477881}=new URL(window[_0xb1081f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x33171b[_0xb1081f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x477881))return!0x0;const _0x4e68c1=_0x477881[_0xb1081f([0x73,0x70,0x6c,0x69,0x74])](_0xb1081f([0x2e]));return _0x33171b[_0xb1081f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x116329=>_0x116329[_0xb1081f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb1081f([0x2a])))[_0xb1081f([0x6d,0x61,0x70])](_0xcb9607=>_0xcb9607[_0xb1081f([0x73,0x70,0x6c,0x69,0x74])](_0xb1081f([0x2e])))[_0xb1081f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d25d4=>_0x2d25d4[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4e68c1[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xb1081f([0x6d,0x61,0x70])](_0x1fa023=>Array(_0x4e68c1[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1fa023[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xb1081f([0x66,0x69,0x6c,0x6c])](_0x1fa023[0x0]===_0xb1081f([0x2a])?_0xb1081f([0x2a]):'')[_0xb1081f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1fa023))[_0xb1081f([0x73,0x6f,0x6d,0x65])](_0x4904e3=>_0x4e68c1[_0xb1081f([0x65,0x76,0x65,0x72,0x79])]((_0x515dd1,_0xd3fd96)=>_0x4904e3[_0xd3fd96]===_0x515dd1||_0x4904e3[_0xd3fd96]===_0xb1081f([0x2a])));}function _0x141ccc(){return _0x251b29&&_0x516a59?new window[(_0xb1081f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4b9cfa,_0x590934)=>{_0x251b29[_0xb1081f([0x74,0x68,0x65,0x6e])](_0x4b9cfa,_0x590934),_0x516a59[_0xb1081f([0x74,0x68,0x65,0x6e])](_0x477cfb=>{_0x477cfb!=_0xb1081f([0x56,0x61,0x6c,0x69,0x64])&&_0x4b9cfa(_0x477cfb);},_0x590934);}):_0x251b29||_0x516a59||_0xb1081f([0x56,0x61,0x6c,0x69,0x64]);}}function _0x43f246(_0x12ed4b,_0x464795){return new window[(_0xb1081f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c91ae=>{if(_0x1536a8())return _0x3c91ae(_0xb1081f([0x56,0x61,0x6c,0x69,0x64]));_0x442413(),_0x5d549b[_0xb1081f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xb1081f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3f76a8=!0x1;const _0x30f58f=_0x1bb90a();function _0x9908a8(_0x1f918c){return!!_0x1f918c&&(typeof _0x1f918c===_0xb1081f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1f918c===_0xb1081f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1f918c[_0xb1081f([0x74,0x68,0x65,0x6e])]===_0xb1081f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1f918c[_0xb1081f([0x63,0x61,0x74,0x63,0x68])]===_0xb1081f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4b9a76(_0x3c59ba){_0x5548d6(_0x3c59ba)[_0xb1081f([0x74,0x68,0x65,0x6e])](_0x37ed3f=>{if(!_0x37ed3f||_0x37ed3f[_0xb1081f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xb1081f([0x6f,0x6b]))return _0xb1081f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1846db(_0xe5d05d(_0x30f58f+_0x464795))!=_0x37ed3f[_0xb1081f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xb1081f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xb1081f([0x56,0x61,0x6c,0x69,0x64]);})[_0xb1081f([0x74,0x68,0x65,0x6e])](_0x5b0c74=>(_0x56b4f2(),_0x5b0c74),()=>{const _0x4749a1=_0x4c5348();return null==_0x4749a1?(_0x56b4f2(),_0xb1081f([0x56,0x61,0x6c,0x69,0x64])):_0xb1081f(_0x34be0a-_0x4749a1>(0x7753083a^_0x3eabc4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xb1081f([0x74,0x68,0x65,0x6e])](_0x3c91ae)[_0xb1081f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3c91ae(_0xb1081f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5c5df4=0x536962ba^_0x3eabc4;function _0x56b4f2(){const _0x513f59=_0xb1081f([0x6c,0x6c,0x63,0x74,0x2d])+_0x1846db(_0xe5d05d(_0x12ed4b)),_0x10e6fb=_0x1c2a64(_0x1846db(window[_0xb1081f([0x4d,0x61,0x74,0x68])][_0xb1081f([0x63,0x65,0x69,0x6c])](_0x34be0a/_0x5c5df4)));window[_0xb1081f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xb1081f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x513f59,_0x10e6fb);}function _0x4c5348(){const _0x435dd9=_0xb1081f([0x6c,0x6c,0x63,0x74,0x2d])+_0x1846db(_0xe5d05d(_0x12ed4b)),_0x51ad41=window[_0xb1081f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xb1081f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x435dd9);return _0x51ad41?window[_0xb1081f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c2a64(_0x51ad41),0x10)*_0x5c5df4:null;}function _0x5548d6(_0x5502f7){return new window[(_0xb1081f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x812d12,_0x3075b2)=>{_0x5502f7[_0xb1081f([0x74,0x68,0x65,0x6e])](_0x812d12,_0x3075b2),window[_0xb1081f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3075b2,0x535e58fa^_0x3eabc4);});}}_0x5d549b[_0xb1081f([0x6f,0x6e])](_0xb1081f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4ede50,_0x26160f)=>{if(_0x26160f[0x0]!=_0x12ed4b)return _0x3c91ae(_0xb1081f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x26160f[0x1]={..._0x26160f[0x1],[_0xb1081f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x30f58f};},{[_0xb1081f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xb1081f([0x68,0x69,0x67,0x68])}),_0x5d549b[_0xb1081f([0x6f,0x6e])](_0xb1081f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1a1cbc=>{_0x9908a8(_0x1a1cbc[_0xb1081f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3f76a8=!0x0,_0x4b9a76(_0x1a1cbc[_0xb1081f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xb1081f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xb1081f([0x6c,0x6f,0x77])}),_0x5d97e9[_0xb1081f([0x74,0x68,0x65,0x6e])](()=>{_0x3f76a8||_0x3c91ae(_0xb1081f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1536a8(){return _0x5d549b[_0xb1081f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xb1081f([0x76,0x69,0x65,0x77])][_0xb1081f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xb1081f([0x61,0x75,0x74,0x6f]);}function _0x442413(){_0x5d549b[_0xb1081f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xb1081f([0x76,0x69,0x65,0x77])][_0xb1081f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xb1081f([0x61,0x75,0x74,0x6f]);}}function _0x2eed3a(_0x3bb7f7){const _0xd46830=[new window[(_0xb1081f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x314c3d=>setTimeout(_0x314c3d,0x5356b2f6^_0x3eabc4)),_0x5d97e9[_0xb1081f([0x74,0x68,0x65,0x6e])](()=>new window[(_0xb1081f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x27c44f=>{let _0x29908b=0x0;_0x5d549b[_0xb1081f([0x6d,0x6f,0x64,0x65,0x6c])][_0xb1081f([0x6f,0x6e])](_0xb1081f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x182458,_0x22fbd5)=>{_0x22fbd5[0x0][_0xb1081f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x29908b++,_0x29908b==(0x535f89d2^_0x3eabc4)&&(_0x27c44f(),_0x182458[_0xb1081f([0x6f,0x66,0x66])]());});}))];return window[_0xb1081f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xb1081f([0x72,0x61,0x63,0x65])](_0xd46830)[_0xb1081f([0x74,0x68,0x65,0x6e])](()=>_0x3bb7f7);}async function _0x489557(){await _0x5d97e9,_0x5d549b[_0xb1081f([0x6d,0x6f,0x64,0x65,0x6c])][_0xb1081f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2e4b25,_0x5d549b[_0xb1081f([0x6d,0x6f,0x64,0x65,0x6c])][_0xb1081f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2e4b25,_0x5d549b[_0xb1081f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xb1081f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x49ddea(_0xa26b4a){const _0x24c33d=_0x2339ba();_0x5d549b[_0x24c33d]=_0xb1081f([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xa26b4a,_0xa26b4a!=_0xb1081f([0x56,0x61,0x6c,0x69,0x64])&&_0x489557();}function _0x2339ba(){const _0x770dbc=window[_0xb1081f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xb1081f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xb1081f([0x6e,0x6f,0x77])]())[_0xb1081f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xb1081f([0x2e]),'');let _0x400b9d=_0xb1081f([0x68]);for(let _0x2a459d=0x0;_0x2a459d<_0x770dbc[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2a459d+=0x2){let _0x33c1b1=window[_0xb1081f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x770dbc[_0xb1081f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2a459d,_0x2a459d+0x2));_0x33c1b1>=_0x4d99fb[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x33c1b1-=_0x4d99fb[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x400b9d+=_0x4d99fb[_0x33c1b1];}return _0x400b9d;}function _0x527815(){const _0x253fcd=_0x4e448c[_0xb1081f([0x73,0x70,0x6c,0x69,0x74])](_0xb1081f([0x2e]));if(0x3!=_0x253fcd[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3687ff(_0x253fcd[0x1]);function _0x3687ff(_0xdfd9e6){const _0x5c90d0=_0x249656(_0xdfd9e6);return _0x5c90d0&&_0x98aa9a()?_0x5c90d0:null;function _0x98aa9a(){const _0x22e2e6=_0x5c90d0[_0xb1081f([0x6a,0x74,0x69])],_0x1fca20=window[_0xb1081f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x22e2e6[_0xb1081f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x22e2e6[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x56fae3={..._0x5c90d0,[_0xb1081f([0x6a,0x74,0x69])]:_0x22e2e6[_0xb1081f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x22e2e6[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x56fae3[_0xb1081f([0x76,0x63])],_0xe5d05d(_0x56fae3)==_0x1fca20;}}}async function _0x24b911(){let _0x98d943=!0x0;try{const _0x5a441f=_0x4e448c[_0xb1081f([0x73,0x70,0x6c,0x69,0x74])](_0xb1081f([0x2e])),[_0x2652ea,_0x1b9ce8,_0x33b7a5]=_0x5a441f;return _0x3e87b9(_0x2652ea),await _0x5ada9f(_0x2652ea,_0x1b9ce8,_0x33b7a5),_0x98d943;}catch{return!0x1;}function _0x3e87b9(_0x1d7f52){const _0xfdbb4c=_0x249656(_0x1d7f52);_0xfdbb4c&&_0xfdbb4c[_0xb1081f([0x61,0x6c,0x67])]==_0xb1081f([0x45,0x53,0x32,0x35,0x36])||(_0x98d943=!0x1);}async function _0x5ada9f(_0x241d19,_0x4019b9,_0x1b807c){const _0x5b0728=window[_0xb1081f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xb1081f([0x66,0x72,0x6f,0x6d])](_0x1823e2(_0x1b807c),_0x49a98b=>_0x49a98b[_0xb1081f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5855e3=new window[(_0xb1081f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xb1081f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x241d19+_0xb1081f([0x2e])+_0x4019b9),_0x29b0f4=window[_0xb1081f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xb1081f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x29b0f4)return;const _0x3ddecc=await _0x29b0f4[_0xb1081f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xb1081f([0x6a,0x77,0x6b]),_0x5b1cc6,{[_0xb1081f([0x6e,0x61,0x6d,0x65])]:_0xb1081f([0x45,0x43,0x44,0x53,0x41]),[_0xb1081f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xb1081f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xb1081f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x29b0f4[_0xb1081f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xb1081f([0x6e,0x61,0x6d,0x65])]:_0xb1081f([0x45,0x43,0x44,0x53,0x41]),[_0xb1081f([0x68,0x61,0x73,0x68])]:{[_0xb1081f([0x6e,0x61,0x6d,0x65])]:_0xb1081f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3ddecc,_0x5b0728,_0x5855e3)||(_0x98d943=!0x1);}}function _0x249656(_0x39dbc0){return _0x39dbc0[_0xb1081f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xb1081f([0x65,0x79]))?JSON[_0xb1081f([0x70,0x61,0x72,0x73,0x65])](_0x1823e2(_0x39dbc0)):null;}function _0x1823e2(_0x46b2e1){return window[_0xb1081f([0x61,0x74,0x6f,0x62])](_0x46b2e1[_0xb1081f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xb1081f([0x2b]))[_0xb1081f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xb1081f([0x2f])));}function _0xe5d05d(_0x2e210e){let _0x3f7c2e=0x1505;function _0x5f18bb(_0x231097){for(let _0x1ee60a=0x0;_0x1ee60a<_0x231097[_0xb1081f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ee60a++){const _0x2b5229=_0x231097[_0xb1081f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1ee60a);_0x3f7c2e=(_0x3f7c2e<<0x5)+_0x3f7c2e+_0x2b5229,_0x3f7c2e&=_0x3f7c2e;}}function _0x3eac04(_0x28f52c){Array[_0xb1081f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x28f52c)?_0x28f52c[_0xb1081f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3eac04):_0x28f52c&&typeof _0x28f52c==_0xb1081f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xb1081f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x28f52c)[_0xb1081f([0x73,0x6f,0x72,0x74])]()[_0xb1081f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x10cda8,_0x34df21])=>{_0x5f18bb(_0x10cda8),_0x3eac04(_0x34df21);}):_0x5f18bb(window[_0xb1081f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x28f52c));}return _0x3eac04(_0x2e210e),_0x3f7c2e>>>0x0;}function _0x1846db(_0x301804){return _0x301804[_0xb1081f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xb1081f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xb1081f([0x30]));}function _0x1c2a64(_0x27d8b8){return _0x27d8b8[_0xb1081f([0x73,0x70,0x6c,0x69,0x74])]('')[_0xb1081f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xb1081f([0x6a,0x6f,0x69,0x6e])]('');}function _0x2e4b25(){}function _0xb1081f(_0x3a54a9){return _0x3a54a9['map'](_0x2f489a=>String['fromCharCode'](_0x2f489a))['join']('');}_0x49ddea(await _0x1d2b85());}(this);}['_initSchema'](){const _0x530034=this['editor']['model']['schema'];_0x530034['isRegistered']('imageBlock')&&_0x530034['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x530034['isRegistered']('imageInline')&&_0x530034['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x268187=this['editor'];_0x268187['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x268187['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x11669f=>_0x11669f['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x177bd0=_0x268187['commands']['get']('replaceImageSource');_0x177bd0&&this['listenTo'](_0x177bd0,'cleanupImage',(_0x3db38b,[_0x2c4381,_0x3ff935])=>{_0x2c4381['removeAttribute']('uploadcareImageId',_0x3ff935);});}['_initConfig'](){const _0x2d6464=this['editor']['config']['get']('uploadcare.uploader')||{},_0x199bde=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4c3830(_0x3bcb22['document'],'uc-config',{..._0x2d6464,'pubkey':_0x199bde,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x180180=>{if('closeMax'==_0x180180)return'#uc-icon-arrow-down';},_0x3bcb22['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4c3830(_0x3bcb22['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x3bcb22['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x5bb646=this['editor']['commands']['get']('insertImage');_0x5bb646&&this['listenTo'](_0x5bb646,'execute',()=>{const _0x1a5f5a=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1a5f5a&&_0x1a5f5a['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x1a5f5a);});});const _0x4d19b0=this['editor']['commands']['get']('uploadcareImageReplace');_0x4d19b0&&this['listenTo'](_0x4d19b0,'execute',()=>{const _0x47588f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x47588f&&_0x47588f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x47588f);});});}}class H extends _0x393cb0{static get['requires'](){return[z,S];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x18fadd){super(_0x18fadd),_0x18fadd['config']['define']('uploadcare.uploader.sourceList',[K['Local'],K['URL']]),_0x2fb1ea['defineComponents'](_0x2fb1ea),this['_defineLocale']();}['_defineLocale'](){const _0x17ca1c=this['editor']['config']['get']('uploadcare.locale'),_0x5eb832=this['editor']['locale']['contentLanguage'];_0x17ca1c&&_0x2fb1ea['defineLocale'](_0x5eb832,_0x17ca1c);}}class J extends _0x499e59{constructor(_0x35b8e4){super(_0x35b8e4);const t=_0x35b8e4['t'],_0x1fb01b=this['bindTemplate'],_0x43772e=new _0x1327c8();_0x43772e['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':[_0x43772e,{'text':_0x1fb01b['to']('imageUploadProgress',_0x2cd3b1=>t('Loading\x20image...')+'\x20('+(_0x2cd3b1||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 Z extends _0x499e59{constructor(_0x129dac){super(_0x129dac);const t=_0x129dac['t'];this['set']('errorType',null);const _0x477101=new _0x205a9f(_0x129dac);_0x477101['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x477101['withText']=!0x0,_0x477101['class']='ck-button-action',_0x477101['on']('execute',()=>{this['fire']('retry');}),_0x477101['bind']('isVisible')['to'](this,'errorType',_0x9fe1e5=>'NotFound'!==_0x9fe1e5);const _0x443538=new _0x12817f();_0x443538['content']=_0x3b505b,_0x443538['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x39e63e=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':[_0x443538,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x39e63e['to']('errorType',_0x3d0e6c=>t('NotFound'!==_0x3d0e6c?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x477101]},{'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 Q extends _0x499e59{constructor(_0x3dc9d8,_0x9e01d5){super(_0x3dc9d8);const _0x22a3cc=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x9e01d5,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x22a3cc['to']('imageSrc')}});}}class X extends A{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x3b43a0,_0x1eb914,_0xfe66be){super(_0x3b43a0),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x3b43a0),this['_errorView']=new Z(_0x3b43a0),this['_editingView']=new Q(_0x3b43a0,_0xfe66be),this['_focusableView']=new _0x499e59(_0x3b43a0),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x1eb914),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'],_0x313a89=>{this['_addUploadcareImageEditorListeners'](_0x313a89);});}),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'](_0x209a0e,_0x5a3918){const _0x4e481c='uc-cloud-image-editor',_0x142107=_0x209a0e['querySelector'](_0x4e481c);if(_0x142107)return _0x5a3918(_0x142107);const _0xe9d25f=new MutationObserver(_0x39c265=>{const _0x55d8c9=_0x39c265['filter'](_0x5c6718=>_0x5c6718['target']===_0x209a0e&&_0x5c6718['addedNodes']['length']>0x0&&_0x5c6718['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4e481c);_0x55d8c9['length']&&(_0xe9d25f['disconnect'](),_0x5a3918(_0x55d8c9[0x0]['addedNodes'][0x0]));});_0xe9d25f['observe'](_0x209a0e,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x20574e){_0x20574e['addEventListener']('apply',_0x39d842=>{this['fire']('apply',{'imageSrc':_0x39d842['detail']['cdnUrl']});}),_0x20574e['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x4b976d(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x55c3e7,_0x1727b4,_0x5b54b7){super(),this['_editor']=_0x55c3e7,this['_dialog']=_0x1727b4,this['_imageElement']=_0x5b54b7,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 _0xbd7211=this['_imageElement'],_0x3fa1a9=_0xbd7211['getAttribute']('uploadcareImageId'),_0x2c6a66=_0xbd7211['getAttribute']('src');if(_0x3fa1a9)await this['_loadImageInfo'](_0x3fa1a9,_0x2c6a66);else{if(this['_imageCache']['has'](_0x2c6a66)){const _0x5bd4a0=this['_imageCache']['get'](_0x2c6a66);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5bd4a0['url'],this['imageDimension']=_0x5bd4a0['dimension'],this['imageId']=_0x5bd4a0['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x52605f}=this['_editor'],t=_0x52605f['t'],_0x335abc=new X(_0x52605f,this['imageStatus'],this['_attributes']);_0x335abc['bind']('status')['to'](this,'imageStatus'),_0x335abc['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x335abc['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x335abc['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x335abc,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x4d436f,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x335abc,'position':_0x62811e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x335abc['focus']();},'onHide':()=>{_0x335abc['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x472094=>!V(_0x472094,_0x335abc['element'])}});}['_loadImageInfo'](_0x5752f1,_0x1d3a73){return q['getInfo'](_0x5752f1,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x157628=>{const {width:_0x52c1af,height:_0x54a03d}=_0x157628['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1d3a73,this['imageDimension']={'width':_0x52c1af,'height':_0x54a03d},this['imageId']=_0x5752f1;})['catch'](_0x560e64=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x560e64['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x425c83,_0x56678c){return this['_getImageAsFile'](_0x425c83)['then'](_0x582346=>q['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x56678c['signal'],'file':_0x582346,'onProgress':_0x558713=>{_0x558713&&_0x558713['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x558713['value']));}}))['then'](_0x39db17=>{const {width:_0x58b912,height:_0x241cdc}=_0x39db17['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x39db17['cdnUrl'],this['imageDimension']={'width':_0x58b912,'height':_0x241cdc},this['imageId']=_0x39db17['uuid'],this['imageUploadProgress']=null;const _0x1370ed=_0x425c83['getAttribute']('src');this['_imageCache']['set'](_0x1370ed,{'id':_0x39db17['uuid'],'url':_0x39db17['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0xb4d764=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0xb4d764['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2e5f15,_0x16dd94){_0x2e5f15['on']('apply',(_0x67c9e,_0x49b9a6)=>{this['_replaceImage'](_0x16dd94,_0x49b9a6['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2e5f15['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2e5f15['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x3bd7e1,_0x2a64b3,_0x10531b){const _0x38d7ed=this['_editor'],{width:_0x4d38ea,height:_0x11bd8b}=F(_0x2a64b3,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x402efb,imageSources:_0x2f114b}=D(_0x2a64b3,_0x4d38ea);_0x38d7ed['model']['change'](_0x2f8d6f=>{if('$graveyard'===_0x3bd7e1['root']['rootName']){_0x38d7ed['execute']('insertImage',{'imageType':_0x3bd7e1['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x3bd7e1['getAttributes']()),'uploadcareImageId':_0x10531b,'src':_0x402efb,'sources':_0x2f114b,'width':_0x4d38ea,'height':_0x11bd8b}});const _0x463b2d=_0x3bd7e1['getChildren']();_0x3bd7e1=_0x38d7ed['model']['document']['selection']['getSelectedElement']();for(const _0x171d6d of _0x463b2d)_0x2f8d6f['append'](_0x2f8d6f['cloneElement'](_0x171d6d),_0x3bd7e1);}else _0x2f8d6f['setSelection'](_0x3bd7e1,'on'),_0x38d7ed['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x3bd7e1['getAttributes']()),'uploadcareImageId':_0x10531b,'src':_0x402efb,'sources':_0x2f114b,'width':_0x4d38ea,'height':_0x11bd8b},_0x3bd7e1);_0x2f8d6f['setSelection'](_0x3bd7e1,'on');});}async['_getImageAsFile'](_0x1954af){const _0x11a273=_0x3bcb22['window'],_0x1306d1=_0x3bcb22['document']['location']['href'],_0x486fbc=new _0x11a273['URL'](_0x1954af['getAttribute']('src'),_0x1306d1);if('data:'===_0x486fbc['protocol']){const _0x58f928=_0x486fbc['href']['split'](','),_0xda620f=_0x58f928[0x0]['match'](/:(.*?);/)[0x1],_0x2ae0b0=_0xda620f['split']('/')[0x1],_0x1b1394=_0x11a273['atob'](_0x58f928[_0x58f928['length']-0x1]);let _0x5d13c4=_0x1b1394['length'];const _0x2b1854=new _0x11a273['Uint8Array'](_0x5d13c4);for(;_0x5d13c4--;)_0x2b1854[_0x5d13c4]=_0x1b1394['charCodeAt'](_0x5d13c4);return new _0x11a273['File']([_0x2b1854],'image.'+_0x2ae0b0,{'type':_0xda620f});}const _0x173027=_0x486fbc['href']['split']('/'),_0x1d7214=_0x173027[_0x173027['length']-0x1],_0x5d4f11=_0x1d7214['split']('.')[0x1];return _0x11a273['fetch'](_0x486fbc['href'])['then'](_0x5dd42d=>_0x5dd42d['clone']()['blob']())['then'](_0x1c0935=>new _0x11a273['File']([_0x1c0935],_0x1d7214,{'type':'image/'+_0x5d4f11}));}}class tt extends _0x14fce6{['imageEditController'];static get['requires'](){return[_0x9a7777];}['_isEditable'];constructor(_0x36a432){super(_0x36a432),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x1cffbe){const _0x5d7c10=B(_0x1cffbe);return _0x46af3e=>!(!_0x46af3e||!_0x46af3e['is']('element','imageBlock')&&!_0x46af3e['is']('element','imageInline'))&&(!!_0x46af3e['hasAttribute']('uploadcareImageId')||!!_0x46af3e['hasAttribute']('src')&&_0x5d7c10(_0x46af3e['getAttribute']('src')));}(_0x36a432['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x39d5f1=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x39d5f1);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x521fa9=this['editor']['model']['document']['selection']['getSelectedElement']();_0x521fa9&&(_0x521fa9['is']('element','imageBlock')||_0x521fa9['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x9a7777),_0x521fa9),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x14fce6{['refresh'](){const _0x50f967=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x50f967&&(_0x50f967['is']('element','imageBlock')||_0x50f967['is']('element','imageInline')));}['execute'](_0xd42c05){const _0x55640a=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x34207f=>{_0x34207f['setAttributes'](_0xd42c05,_0x55640a),_0x34207f['removeAttribute']('srcset',_0x55640a),_0x34207f['removeAttribute']('sizes',_0x55640a);});}}class it extends _0x393cb0{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x143939,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x46a8ce}=this;_0x46a8ce['commands']['add']('uploadcareImageEdit',new tt(_0x46a8ce)),_0x46a8ce['commands']['add']('uploadcareImageReplace',new et(_0x46a8ce));}}class st extends _0x393cb0{['_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 _0x7fac40=this['editor'];_0x7fac40['ui']['componentFactory']['add']('uploadcareImageEdit',_0x3a6214=>{const _0xb77e00=_0x7fac40['commands']['get']('uploadcareImageEdit'),_0x296960=new _0x205a9f(_0x3a6214),t=_0x3a6214['t'];return _0x296960['set']({'icon':_0x4d436f,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x296960['bind']('isEnabled')['to'](_0xb77e00),_0x296960['bind']('isOn')['to'](_0xb77e00,'isActive'),this['listenTo'](_0x296960,'execute',()=>{_0x7fac40['execute']('uploadcareImageEdit'),_0x7fac40['editing']['view']['focus']();}),_0x296960;}),this['_initConfig']();}['_initConfig'](){const _0x7e5b3e=_0x4c3830(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x7e5b3e),this['listenTo'](this['editor'],'destroy',()=>{_0x7e5b3e['remove']();});}}class nt extends _0x393cb0{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[it,st];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{H as Uploadcare,M as UploadcareCommand,z as UploadcareEditing,nt as UploadcareImageEdit,tt as UploadcareImageEditCommand,it as UploadcareImageEditEditing,st as UploadcareImageEditUI,S as UploadcareUI,W as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0xa7313f,Command as _0x20d127}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4883b8,IconGooglePhotos as _0x434744,IconGoogleDrive as _0x198cf0,IconFacebook as _0x189f6f,IconDropbox as _0x3723b6,IconUploadcareLink as _0x38340d,IconUploadcareImageUpload as _0x38cc43,IconError as _0xc3e620,IconUploadcareImageEdit as _0x2622f3}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x33cbd5,MenuBarMenuListItemButtonView as _0x418114,View as _0xcae530,FocusCycler as _0x5f469c,Dialog as _0x479684,DialogViewPosition as _0xdd4e71,SpinnerView as _0x523e4d,IconView as _0x3b03f7,Notification as _0xe7f899}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x99e339,DomEmitterMixin as _0x14c5d7,global as _0x3997ed,getAncestors as _0x30dcf9,ObservableMixin as _0x11d3dc,uid as _0x110a1a,createElement as _0x4aaac7}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x15dd7e}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x2a0406,info as _0x40f4c2}from'@uploadcare/upload-client';import*as _0x53a18b from'@uploadcare/file-uploader';var K=function(_0x316ce9){return _0x316ce9['Local']='local',_0x316ce9['URL']='url',_0x316ce9['Dropbox']='dropbox',_0x316ce9['GDrive']='gdrive',_0x316ce9['Facebook']='facebook',_0x316ce9['GPhotos']='gphotos',_0x316ce9['OneDrive']='onedrive',_0x316ce9;}({});function R(_0x2d92b4,_0x1af8f1,_0x5085f8){const t=_0x2d92b4['t'],_0x1cddf9=_0x2d92b4['t'];switch(_0x1af8f1){case K['Local']:return{'text':_0x1cddf9('Insert'===_0x5085f8?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x1cddf9('From\x20computer')};case K['URL']:return{'text':'Insert'===_0x5085f8?_0x1cddf9('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x1cddf9('Via\x20URL')};case K['Dropbox']:return{'text':t('Insert'===_0x5085f8?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case K['Facebook']:return{'text':t('Insert'===_0x5085f8?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case K['GDrive']:return{'text':t('Insert'===_0x5085f8?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case K['GPhotos']:return{'text':t('Insert'===_0x5085f8?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case K['OneDrive']:return{'text':t('Insert'===_0x5085f8?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x1af8f1;}}class S extends _0xa7313f{['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 _0x569736=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x25f9a1;for(const _0x1af592 in _0x569736){const _0x105f2b=_0x1af592,_0x386893=_0x569736[_0x105f2b];if('uploadcareLicenseKeyValid'==_0x386893||'uploadcareLicenseKeyInvalid'==_0x386893||'uploadcareLicenseKeyExpired'==_0x386893||'uploadcareLicenseKeyDomainLimit'==_0x386893||'uploadcareLicenseKeyNotAllowed'==_0x386893||'uploadcareLicenseKeyEvaluationLimit'==_0x386893||'uploadcareLicenseKeyTrialLimit'==_0x386893||'uploadcareLicenseKeyUsageLimit'==_0x386893){delete _0x569736[_0x105f2b],_0x25f9a1=_0x386893,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x25f9a1&&_0x569736['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x25f9a1&&_0x569736['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x25f9a1&&_0x569736['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x25f9a1&&_0x569736['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x25f9a1&&_0x569736['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x25f9a1&&_0x569736['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x25f9a1&&_0x569736['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x40f4dc}=this,_0x5cc45a=_0x40f4dc['commands']['get']('uploadcare');if(!_0x5cc45a)return;const _0x2bc41b=this['_normalizeConfigSourceList'](_0x40f4dc['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x452c26,_0x96fb4a)=>{const _0x3535c2=this['_getIntegrationKey'](_0x96fb4a['type']);return _0x452c26[_0x3535c2]||(_0x452c26[_0x3535c2]=[]),_0x452c26[_0x3535c2]['push'](_0x96fb4a),_0x452c26;},{});_0x40f4dc['plugins']['has']('ImageInsertUI')&&_0x40f4dc['commands']['get']('uploadcare')&&Object['entries'](_0x2bc41b)['forEach'](([_0x3d8942,_0x801712])=>{_0x40f4dc['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3d8942,'observable':()=>_0x5cc45a,'buttonViewCreator':()=>this['_createToolbarButton'](_0x801712),'formViewCreator':()=>this['_createDropdownButtons'](_0x801712),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x801712),'override':'assetManager'!==_0x3d8942});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x3cd725){const {locale:_0x1c6a01}=this['editor'];return _0x3cd725['map'](_0x4f77cf=>{const _0x9bde3b=R(_0x1c6a01,_0x4f77cf,'Insert');switch(_0x4f77cf){case K['Local']:return{'icon':_0x38cc43,'type':K['Local'],..._0x9bde3b};case K['URL']:return{'icon':_0x38340d,'type':K['URL'],..._0x9bde3b};case K['Dropbox']:return{'icon':_0x3723b6,'type':K['Dropbox'],..._0x9bde3b};case K['Facebook']:return{'icon':_0x189f6f,'type':K['Facebook'],..._0x9bde3b};case K['GDrive']:return{'icon':_0x198cf0,'type':K['GDrive'],..._0x9bde3b};case K['GPhotos']:return{'icon':_0x434744,'type':K['GPhotos'],..._0x9bde3b};case K['OneDrive']:return{'icon':_0x4883b8,'type':K['OneDrive'],..._0x9bde3b};}});}['_getIntegrationKey'](_0x5e4108){switch(_0x5e4108){case K['Local']:return'upload';case K['URL']:return'url';default:return'assetManager';}}['_createButton'](_0xc3144c,_0x21c6a8){const _0x14ef1c=this['editor'],_0xc93a73=new _0xc3144c(_0x14ef1c['locale']),_0x4ba83e=_0x14ef1c['commands']['get']('uploadcare');return _0xc93a73['bind']('isEnabled')['to'](_0x4ba83e),_0xc93a73['on']('execute',()=>{_0x4ba83e['execute'](_0x21c6a8);}),_0xc93a73;}['_createToolbarButton'](_0x57478c){const {locale:_0x5390f8}=this['editor'],_0x545cec=this['editor']['plugins']['get']('ImageInsertUI'),_0x432d15=_0x57478c[0x0],_0xb7f8f1=this['_createButton'](_0x33cbd5,_0x432d15['type']);return _0xb7f8f1['icon']=_0x432d15['icon'],_0xb7f8f1['bind']('label')['to'](_0x545cec,'isImageSelected',_0x60d0f3=>R(_0x5390f8,_0x432d15['type'],_0x60d0f3?'Replace':'Insert')['text']),_0xb7f8f1['tooltip']=!0x0,_0xb7f8f1;}['_createDropdownButtons'](_0x59ee84){const {locale:_0x324ec4}=this['editor'],_0xb75db9=this['editor']['plugins']['get']('ImageInsertUI');return _0x59ee84['map'](_0x1b257c=>{const _0xd7b158=this['_createButton'](_0x33cbd5,_0x1b257c['type']);return _0xd7b158['withText']=!0x0,_0xd7b158['icon']=_0x1b257c['icon'],_0xd7b158['bind']('label')['to'](_0xb75db9,'isImageSelected',_0x483294=>R(_0x324ec4,_0x1b257c['type'],_0x483294?'Replace':'Insert')['text']),_0xd7b158;});}['_createMenuBarButtons'](_0x404dd8){return _0x404dd8['map'](_0x3b313e=>{const _0x3582af=this['_createButton'](_0x418114,_0x3b313e['type']);return _0x3582af['icon']=_0x3b313e['icon'],_0x3582af['label']=_0x3b313e['shortText'],_0x3582af;});}}class A extends _0xcae530{['focusTracker'];['focusCycler'];constructor(_0x1d5471){super(_0x1d5471),this['focusTracker']=new _0x99e339(),this['focusCycler']=new _0x5f469c({'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 O extends A{constructor(_0x861ea7,_0x3f579f){super(_0x861ea7),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-'+_0x3f579f}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x275022,_0xe848d0){const _0x415b9f=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4a65d9=>_0x4a65d9<=_0xe848d0)['map'](_0x1c4865=>_0x275022['replace'](/\/$/,'')+'/-/resize/'+_0x1c4865+'x/\x20'+_0x1c4865+'w');return{'imageFallbackUrl':_0x275022,'imageSources':[{'srcset':_0x415b9f['join'](',\x20'),'sizes':'(max-width:\x20'+_0xe848d0+'px)\x20100vw,\x20'+_0xe848d0+'px','type':'image/webp'}]};}function F(_0x471ce5,_0x30c15e,_0x4a9b10){const _0x52af17=_0x471ce5['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x52af17?parseInt(_0x52af17[0x1],0xa):_0x30c15e,'height':_0x52af17?parseInt(_0x52af17[0x2],0xa):_0x4a9b10};}function $(_0x300d86,_0x408aad){const _0x3f3055=new(_0x14c5d7())(),_0x28f524=_0x300d86['plugins']['get']('ImageUtils'),_0x2e0206=_0x300d86['editing']['mapper']['toViewElement'](_0x408aad),_0x1c3fa9=_0x28f524['findViewImgElement'](_0x2e0206),_0x4d72f6=_0x300d86['editing']['view']['domConverter']['viewToDom'](_0x1c3fa9),_0x165050=_0x408aad['getAttribute']('width'),_0x58df4a=_0x408aad['getAttribute']('height'),_0x3f0b19='image-processing';_0x300d86['editing']['view']['change'](_0x2f27e1=>{_0x2f27e1['addClass'](_0x3f0b19,_0x2e0206),_0x2f27e1['setStyle']('aspect-ratio',_0x165050+'/'+_0x58df4a,_0x1c3fa9);}),_0x3f3055['listenTo'](_0x4d72f6,'load',()=>{_0x3f3055['stopListening'](_0x4d72f6,'load'),_0x300d86['editing']['view']['change'](_0x1b4c5e=>{_0x1b4c5e['removeClass'](_0x3f0b19,_0x2e0206),_0x1b4c5e['removeStyle']('aspect-ratio',_0x1c3fa9);});});}function B(_0x2ae0c8){if(Array['isArray'](_0x2ae0c8)){const _0x46dd4f=_0x2ae0c8['map'](B);return _0x218ed8=>_0x46dd4f['some'](_0x4f35a2=>_0x4f35a2(_0x218ed8));}if('origin'==_0x2ae0c8){const _0x1c250a=_0x3997ed['window']['location']['origin'];return _0x1559b0=>new URL(_0x1559b0,_0x3997ed['document']['baseURI'])['origin']==_0x1c250a;}return'function'==typeof _0x2ae0c8?_0x2ae0c8:_0x2ae0c8 instanceof RegExp?_0x40abc2=>!(!_0x40abc2['match'](_0x2ae0c8)&&!_0x40abc2['replace'](/^https?:\/\//,'')['match'](_0x2ae0c8)):()=>!0x1;}function V(_0x3e5ecf,_0x24a70d){return _0x30dcf9(_0x3e5ecf['target'])['includes'](_0x24a70d);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x11d3dc(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x91e752,_0x527a82,_0x55c9f4){super(),this['_editor']=_0x91e752,this['_editing']=_0x527a82,this['_dialog']=_0x91e752['plugins']['get'](_0x479684),this['_api']=_0x527a82['ctxElement']['getAPI'](),this['_type']=_0x55c9f4,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:_0x30d042,model:_0x443bba}=this['_editor'],_0x55206a=_0x443bba['document']['selection']['getSelectedElement'](),_0x1701b6=_0x55206a&&(_0x55206a['is']('element','imageBlock')||_0x55206a['is']('element','imageInline'));this['_formView']=new O(_0x30d042,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x38cc43,'title':R(_0x30d042,this['_type'],_0x1701b6?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0xdd4e71['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x17b8d5=>!V(_0x17b8d5,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x314a0a}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x344685=>{const _0x3be181=_0x314a0a['length'];for(const _0x1d49e8 of _0x314a0a){const _0x118fdd=_0x1d49e8===_0x314a0a[_0x3be181-0x1],{cdnUrl:_0x3a8d9f,fileInfo:_0x518469}=_0x1d49e8;if(!_0x3a8d9f||!_0x518469)continue;const {width:_0x453771,height:_0x1143d9}=_0x518469['imageInfo'],_0x32570e=F(_0x3a8d9f,_0x453771,_0x1143d9),_0x1f87cd=D(_0x3a8d9f,_0x32570e['width']),_0x1c6cbf={'id':_0x518469['uuid'],'type':'image','attributes':{'imageDimension':_0x32570e,..._0x1f87cd}};this['_insertAsset'](_0x1c6cbf,_0x118fdd,_0x344685);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x34488e=>{'idle'===_0x34488e['detail']['status']&&!_0x34488e['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===K['Local']?this['_api']['setCurrentActivity'](K['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x215a7a,_0x5c5b03,_0x36e89b){const _0x3aa73a=this['_editor']['model']['document']['selection'],_0x24abe0=_0x3aa73a['getSelectedElement'](),_0x360c08=!(!_0x24abe0||!_0x24abe0['is']('element','imageInline'));_0x36e89b['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x215a7a,_0x360c08),_0x5c5b03||_0x36e89b['setSelection'](_0x3aa73a['getLastPosition']());}['_insertImage'](_0x3d318c,_0xf67463){const _0x225e8b=this['_editor'],{imageDimension:_0x21f39b,imageFallbackUrl:_0x38c4f4,imageSources:_0x339444}=_0x3d318c['attributes'];_0x225e8b['execute']('insertImage',{'imageType':_0xf67463?'imageInline':null,'source':{'uploadcareImageId':_0x3d318c['id'],'src':_0x38c4f4,'sources':_0x339444,..._0x21f39b}});}}class M extends _0x20d127{['_editing'];['_controller']=null;static get['requires'](){return[_0x479684,z];}constructor(_0x5094a5){super(_0x5094a5),this['_editing']=_0x5094a5['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x2e987c){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x2e987c);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x3fbe94,..._0x2ac7e2}){return _0x2a0406(_0x3fbe94,_0x2ac7e2);}static['getInfo'](_0x5d0c96,_0x18f60f){return _0x40f4c2(_0x5d0c96,_0x18f60f);}}class W extends _0xa7313f{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x15dd7e,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x524796=this['editor'];if(!!!_0x524796['config']['get']('uploadcare'))return;_0x524796['plugins']['get'](_0x15dd7e)['createUploadAdapter']=_0x5941a8=>new G(_0x5941a8,_0x524796),_0x524796['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x5ccaa4,{imageElement:_0x2a488e,data:_0x297031})=>{_0x524796['model']['change'](_0x489850=>{_0x489850['setAttribute']('uploadcareImageId',_0x297031['uploadcareImageId'],_0x2a488e);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x18bb85,_0x15cbba){this['loader']=_0x18bb85,this['editor']=_0x15cbba,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0xd9d8ff=await this['loader']['file'];return q['upload']({'file':_0xd9d8ff,'publicKey':this['editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':this['controller']['signal'],'onProgress':_0x127e54=>{_0x127e54&&_0x127e54['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x127e54['value']);}})['then'](async _0x42dfcb=>{const {imageFallbackUrl:_0x564722,imageSources:_0x55e650}=D(_0x42dfcb['cdnUrl'],_0x42dfcb['imageInfo']['width']);return{'uploadcareImageId':_0x42dfcb['uuid'],'default':_0x564722,'sources':_0x55e650};})['catch'](()=>{const _0xd97f3f=t('Cannot\x20upload\x20file:')+('\x20'+_0xd9d8ff['name']+'.');return Promise['reject'](_0xd97f3f);});}['abort'](){this['controller']['abort']();}}class z extends _0xa7313f{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x479684];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x3ada2d){super(_0x3ada2d),this['ucContextId']=_0x110a1a();}['init'](){const _0x523ece=this['editor'];_0x523ece['commands']['add']('uploadcare',new M(_0x523ece));}['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 _0x525150=_0x3997ed['document']['querySelector']('input[uploadcare-file-input]');_0x525150&&_0x525150['remove']();}),async function(_0x307178){const _0x134122=_0x4f462f([0x68,0x67,0x50,0x36,0x38,0x70,0x71,0x63,0x37,0x4f,0x42,0x4a,0x78,0x39,0x75,0x33,0x7a,0x72,0x48,0x61,0x74,0x59,0x55,0x58,0x66,0x30,0x34,0x54,0x64,0x56,0x6b,0x4d,0x46,0x6d,0x77,0x43,0x73,0x35,0x53,0x44,0x41,0x76,0x6a,0x32,0x31,0x69,0x57,0x51,0x47,0x65,0x5a,0x4b,0x4c,0x79,0x52,0x6c,0x45,0x4e,0x6e,0x6f,0x49,0x62]),_0x1272bb=0x535f8c3a,_0x4e3276=0x5358f21a^_0x1272bb,_0x12cd19=window[_0x4f462f([0x44,0x61,0x74,0x65])][_0x4f462f([0x6e,0x6f,0x77])](),_0x426518=_0x307178[_0x4f462f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5f4126=new window[(_0x4f462f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a2cbe=>{_0x426518[_0x4f462f([0x6f,0x6e,0x63,0x65])](_0x4f462f([0x72,0x65,0x61,0x64,0x79]),_0x5a2cbe);}),_0x356a24={[_0x4f462f([0x6b,0x74,0x79])]:_0x4f462f([0x45,0x43]),[_0x4f462f([0x75,0x73,0x65])]:_0x4f462f([0x73,0x69,0x67]),[_0x4f462f([0x63,0x72,0x76])]:_0x4f462f([0x50,0x2d,0x32,0x35,0x36]),[_0x4f462f([0x78])]:_0x4f462f([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]),[_0x4f462f([0x79])]:_0x4f462f([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]),[_0x4f462f([0x61,0x6c,0x67])]:_0x4f462f([0x45,0x53,0x32,0x35,0x36])},_0x9fd2a8=_0x426518[_0x4f462f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f462f([0x67,0x65,0x74])](_0x4f462f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2aceca(){let _0x429af2,_0x38ae67=null,_0x4a9bfa=null;try{if(_0x9fd2a8==_0x4f462f([0x47,0x50,0x4c]))return _0x4f462f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x429af2=_0x3cc19e(),!_0x429af2)return _0x4f462f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x429af2[_0x4f462f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4a9bfa=_0x1fbbc3(_0x429af2[_0x4f462f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x429af2[_0x4f462f([0x6a,0x74,0x69])])),await _0x43e71c()?_0x59aee0()?_0x2ac229()?_0x4f462f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x23bb00()?(_0x429af2[_0x4f462f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f462f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x38ae67=_0x18e0ca(_0x4f462f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x429af2[_0x4f462f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f462f([0x74,0x72,0x69,0x61,0x6c])&&(_0x38ae67=_0x18e0ca(_0x4f462f([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5ab445()):_0x4f462f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f462f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f462f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4f462f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2ac229(){const _0x47f5ef=[_0x4f462f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f462f([0x74,0x72,0x69,0x61,0x6c])][_0x4f462f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x429af2[_0x4f462f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x12cd19/0x3e8:0xe10*_0x4e3276;return _0x429af2[_0x4f462f([0x65,0x78,0x70])]<_0x47f5ef;}function _0x59aee0(){const _0x47a9d0=_0x429af2[_0x4f462f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x47a9d0&&(!!_0x47a9d0[_0x4f462f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f462f([0x2a]))||!!_0x47a9d0[_0x4f462f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f462f([0x55,0x50,0x4c,0x43])));}function _0x23bb00(){const _0x50de14=_0x429af2[_0x4f462f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x50de14||0x0==_0x50de14[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x32f4f2}=new URL(window[_0x4f462f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x50de14[_0x4f462f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32f4f2))return!0x0;const _0x1682ce=_0x32f4f2[_0x4f462f([0x73,0x70,0x6c,0x69,0x74])](_0x4f462f([0x2e]));return _0x50de14[_0x4f462f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xd5cd61=>_0xd5cd61[_0x4f462f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f462f([0x2a])))[_0x4f462f([0x6d,0x61,0x70])](_0x2273cc=>_0x2273cc[_0x4f462f([0x73,0x70,0x6c,0x69,0x74])](_0x4f462f([0x2e])))[_0x4f462f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xfa6155=>_0xfa6155[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1682ce[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f462f([0x6d,0x61,0x70])](_0x1317b7=>Array(_0x1682ce[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1317b7[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f462f([0x66,0x69,0x6c,0x6c])](_0x1317b7[0x0]===_0x4f462f([0x2a])?_0x4f462f([0x2a]):'')[_0x4f462f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1317b7))[_0x4f462f([0x73,0x6f,0x6d,0x65])](_0xdb7a99=>_0x1682ce[_0x4f462f([0x65,0x76,0x65,0x72,0x79])]((_0x421b7f,_0x3390c7)=>_0xdb7a99[_0x3390c7]===_0x421b7f||_0xdb7a99[_0x3390c7]===_0x4f462f([0x2a])));}function _0x5ab445(){return _0x38ae67&&_0x4a9bfa?new window[(_0x4f462f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x58ba0f,_0x34a2ff)=>{_0x38ae67[_0x4f462f([0x74,0x68,0x65,0x6e])](_0x58ba0f,_0x34a2ff),_0x4a9bfa[_0x4f462f([0x74,0x68,0x65,0x6e])](_0x2f6b66=>{_0x2f6b66!=_0x4f462f([0x56,0x61,0x6c,0x69,0x64])&&_0x58ba0f(_0x2f6b66);},_0x34a2ff);}):_0x38ae67||_0x4a9bfa||_0x4f462f([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1fbbc3(_0x338f15,_0x3ca8ba){return new window[(_0x4f462f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x377002=>{if(_0x12eebc())return _0x377002(_0x4f462f([0x56,0x61,0x6c,0x69,0x64]));_0x2c8bae(),_0x426518[_0x4f462f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f462f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4cb766=!0x1;const _0x55e073=_0x110a1a();function _0x26645e(_0x140727){return!!_0x140727&&(typeof _0x140727===_0x4f462f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x140727===_0x4f462f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x140727[_0x4f462f([0x74,0x68,0x65,0x6e])]===_0x4f462f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x140727[_0x4f462f([0x63,0x61,0x74,0x63,0x68])]===_0x4f462f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x351cb4(_0x508d93){_0x2298b9(_0x508d93)[_0x4f462f([0x74,0x68,0x65,0x6e])](_0x58c66d=>{if(!_0x58c66d||_0x58c66d[_0x4f462f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f462f([0x6f,0x6b]))return _0x4f462f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5d1fb0(_0x597bc9(_0x55e073+_0x3ca8ba))!=_0x58c66d[_0x4f462f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f462f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f462f([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f462f([0x74,0x68,0x65,0x6e])](_0x2d5934=>(_0x170e09(),_0x2d5934),()=>{const _0x221bb4=_0x266a2c();return null==_0x221bb4?(_0x170e09(),_0x4f462f([0x56,0x61,0x6c,0x69,0x64])):_0x4f462f(_0x12cd19-_0x221bb4>(0x7753083a^_0x1272bb)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f462f([0x74,0x68,0x65,0x6e])](_0x377002)[_0x4f462f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x377002(_0x4f462f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x57f69b=0x536962ba^_0x1272bb;function _0x170e09(){const _0x265aa3=_0x4f462f([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d1fb0(_0x597bc9(_0x338f15)),_0xaf878d=_0x309556(_0x5d1fb0(window[_0x4f462f([0x4d,0x61,0x74,0x68])][_0x4f462f([0x63,0x65,0x69,0x6c])](_0x12cd19/_0x57f69b)));window[_0x4f462f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f462f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x265aa3,_0xaf878d);}function _0x266a2c(){const _0x393d94=_0x4f462f([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d1fb0(_0x597bc9(_0x338f15)),_0x3774e3=window[_0x4f462f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f462f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x393d94);return _0x3774e3?window[_0x4f462f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x309556(_0x3774e3),0x10)*_0x57f69b:null;}function _0x2298b9(_0x407b84){return new window[(_0x4f462f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x582478,_0x589027)=>{_0x407b84[_0x4f462f([0x74,0x68,0x65,0x6e])](_0x582478,_0x589027),window[_0x4f462f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x589027,0x535e58fa^_0x1272bb);});}}_0x426518[_0x4f462f([0x6f,0x6e])](_0x4f462f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x40977e,_0x376802)=>{if(_0x376802[0x0]!=_0x338f15)return _0x377002(_0x4f462f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x376802[0x1]={..._0x376802[0x1],[_0x4f462f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x55e073};},{[_0x4f462f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f462f([0x68,0x69,0x67,0x68])}),_0x426518[_0x4f462f([0x6f,0x6e])](_0x4f462f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x36061d=>{_0x26645e(_0x36061d[_0x4f462f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4cb766=!0x0,_0x351cb4(_0x36061d[_0x4f462f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f462f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f462f([0x6c,0x6f,0x77])}),_0x5f4126[_0x4f462f([0x74,0x68,0x65,0x6e])](()=>{_0x4cb766||_0x377002(_0x4f462f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x12eebc(){return _0x426518[_0x4f462f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f462f([0x76,0x69,0x65,0x77])][_0x4f462f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f462f([0x61,0x75,0x74,0x6f]);}function _0x2c8bae(){_0x426518[_0x4f462f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f462f([0x76,0x69,0x65,0x77])][_0x4f462f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f462f([0x61,0x75,0x74,0x6f]);}}function _0x18e0ca(_0x51fc25){const _0x3addf0=[new window[(_0x4f462f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ffc1c=>setTimeout(_0x4ffc1c,0x5356b2f6^_0x1272bb)),_0x5f4126[_0x4f462f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f462f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x329e09=>{let _0xeb877=0x0;_0x426518[_0x4f462f([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f462f([0x6f,0x6e])](_0x4f462f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1a33fc,_0x927dcb)=>{_0x927dcb[0x0][_0x4f462f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xeb877++,_0xeb877==(0x535f89d2^_0x1272bb)&&(_0x329e09(),_0x1a33fc[_0x4f462f([0x6f,0x66,0x66])]());});}))];return window[_0x4f462f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f462f([0x72,0x61,0x63,0x65])](_0x3addf0)[_0x4f462f([0x74,0x68,0x65,0x6e])](()=>_0x51fc25);}async function _0x41baa3(){await _0x5f4126,_0x426518[_0x4f462f([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f462f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x404bdb,_0x426518[_0x4f462f([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f462f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x404bdb,_0x426518[_0x4f462f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f462f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x24e262(_0x59633d){const _0x450c08=_0x137791();_0x426518[_0x450c08]=_0x4f462f([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x59633d,_0x59633d!=_0x4f462f([0x56,0x61,0x6c,0x69,0x64])&&_0x41baa3();}function _0x137791(){const _0x6687a6=window[_0x4f462f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f462f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f462f([0x6e,0x6f,0x77])]())[_0x4f462f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f462f([0x2e]),'');let _0x2b441c=_0x4f462f([0x68]);for(let _0x5b342d=0x0;_0x5b342d<_0x6687a6[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5b342d+=0x2){let _0x791baf=window[_0x4f462f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x6687a6[_0x4f462f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b342d,_0x5b342d+0x2));_0x791baf>=_0x134122[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x791baf-=_0x134122[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2b441c+=_0x134122[_0x791baf];}return _0x2b441c;}function _0x3cc19e(){const _0x3f1fcc=_0x9fd2a8[_0x4f462f([0x73,0x70,0x6c,0x69,0x74])](_0x4f462f([0x2e]));if(0x3!=_0x3f1fcc[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2def86(_0x3f1fcc[0x1]);function _0x2def86(_0x195a94){const _0x41cc81=_0x40b923(_0x195a94);return _0x41cc81&&_0x32c043()?_0x41cc81:null;function _0x32c043(){const _0x35b670=_0x41cc81[_0x4f462f([0x6a,0x74,0x69])],_0x416e2f=window[_0x4f462f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x35b670[_0x4f462f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x35b670[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x295af4={..._0x41cc81,[_0x4f462f([0x6a,0x74,0x69])]:_0x35b670[_0x4f462f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x35b670[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x295af4[_0x4f462f([0x76,0x63])],_0x597bc9(_0x295af4)==_0x416e2f;}}}async function _0x43e71c(){let _0x2d5fc5=!0x0;try{const _0x2ab865=_0x9fd2a8[_0x4f462f([0x73,0x70,0x6c,0x69,0x74])](_0x4f462f([0x2e])),[_0x1a7d04,_0x35e128,_0x26f346]=_0x2ab865;return _0xfa4a26(_0x1a7d04),await _0xd2e69e(_0x1a7d04,_0x35e128,_0x26f346),_0x2d5fc5;}catch{return!0x1;}function _0xfa4a26(_0x47713b){const _0x511369=_0x40b923(_0x47713b);_0x511369&&_0x511369[_0x4f462f([0x61,0x6c,0x67])]==_0x4f462f([0x45,0x53,0x32,0x35,0x36])||(_0x2d5fc5=!0x1);}async function _0xd2e69e(_0x53b0f3,_0xb6119,_0x3941bc){const _0x2197e7=window[_0x4f462f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f462f([0x66,0x72,0x6f,0x6d])](_0x2a6d21(_0x3941bc),_0x913c7d=>_0x913c7d[_0x4f462f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x50f460=new window[(_0x4f462f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f462f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x53b0f3+_0x4f462f([0x2e])+_0xb6119),_0x434089=window[_0x4f462f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f462f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x434089)return;const _0x1618c9=await _0x434089[_0x4f462f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f462f([0x6a,0x77,0x6b]),_0x356a24,{[_0x4f462f([0x6e,0x61,0x6d,0x65])]:_0x4f462f([0x45,0x43,0x44,0x53,0x41]),[_0x4f462f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f462f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f462f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x434089[_0x4f462f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f462f([0x6e,0x61,0x6d,0x65])]:_0x4f462f([0x45,0x43,0x44,0x53,0x41]),[_0x4f462f([0x68,0x61,0x73,0x68])]:{[_0x4f462f([0x6e,0x61,0x6d,0x65])]:_0x4f462f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1618c9,_0x2197e7,_0x50f460)||(_0x2d5fc5=!0x1);}}function _0x40b923(_0x5337da){return _0x5337da[_0x4f462f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f462f([0x65,0x79]))?JSON[_0x4f462f([0x70,0x61,0x72,0x73,0x65])](_0x2a6d21(_0x5337da)):null;}function _0x2a6d21(_0x5924c4){return window[_0x4f462f([0x61,0x74,0x6f,0x62])](_0x5924c4[_0x4f462f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f462f([0x2b]))[_0x4f462f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f462f([0x2f])));}function _0x597bc9(_0x1f2e98){let _0x14d1f3=0x1505;function _0xff13c9(_0x1ac209){for(let _0x43730f=0x0;_0x43730f<_0x1ac209[_0x4f462f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x43730f++){const _0x50a8c0=_0x1ac209[_0x4f462f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x43730f);_0x14d1f3=(_0x14d1f3<<0x5)+_0x14d1f3+_0x50a8c0,_0x14d1f3&=_0x14d1f3;}}function _0x17b7c6(_0x19e773){Array[_0x4f462f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x19e773)?_0x19e773[_0x4f462f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x17b7c6):_0x19e773&&typeof _0x19e773==_0x4f462f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f462f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x19e773)[_0x4f462f([0x73,0x6f,0x72,0x74])]()[_0x4f462f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3333d6,_0x5efe65])=>{_0xff13c9(_0x3333d6),_0x17b7c6(_0x5efe65);}):_0xff13c9(window[_0x4f462f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x19e773));}return _0x17b7c6(_0x1f2e98),_0x14d1f3>>>0x0;}function _0x5d1fb0(_0xb6d900){return _0xb6d900[_0x4f462f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f462f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f462f([0x30]));}function _0x309556(_0x278e2d){return _0x278e2d[_0x4f462f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f462f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f462f([0x6a,0x6f,0x69,0x6e])]('');}function _0x404bdb(){}function _0x4f462f(_0x168cf3){return _0x168cf3['map'](_0x32dc5e=>String['fromCharCode'](_0x32dc5e))['join']('');}_0x24e262(await _0x2aceca());}(this);}['_initSchema'](){const _0x343f57=this['editor']['model']['schema'];_0x343f57['isRegistered']('imageBlock')&&_0x343f57['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x343f57['isRegistered']('imageInline')&&_0x343f57['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x390a96=this['editor'];_0x390a96['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x390a96['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0xef2155=>_0xef2155['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x5f3ac0=_0x390a96['commands']['get']('replaceImageSource');_0x5f3ac0&&this['listenTo'](_0x5f3ac0,'cleanupImage',(_0x1c9028,[_0xc6df40,_0x3a36b7])=>{_0xc6df40['removeAttribute']('uploadcareImageId',_0x3a36b7);});}['_initConfig'](){const _0x15aafc=this['editor']['config']['get']('uploadcare.uploader')||{},_0x4f75d4=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x4aaac7(_0x3997ed['document'],'uc-config',{..._0x15aafc,'pubkey':_0x4f75d4,'ctx-name':'uploader-'+this['ucContextId'],'sourceList':'','imgOnly':'true','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage'],'externalSourcesEmbedCss':'\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09'}),this['_configElement']['iconHrefResolver']=_0x48e635=>{if('closeMax'==_0x48e635)return'#uc-icon-arrow-down';},_0x3997ed['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x4aaac7(_0x3997ed['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x3997ed['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x8f440c=this['editor']['commands']['get']('insertImage');_0x8f440c&&this['listenTo'](_0x8f440c,'execute',()=>{const _0x274537=this['editor']['model']['document']['selection']['getSelectedElement']();_0x274537&&_0x274537['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x274537);});});const _0x5dd39e=this['editor']['commands']['get']('uploadcareImageReplace');_0x5dd39e&&this['listenTo'](_0x5dd39e,'execute',()=>{const _0x338752=this['editor']['model']['document']['selection']['getSelectedElement']();_0x338752&&_0x338752['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x338752);});});}}class H extends _0xa7313f{static get['requires'](){return[z,S];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x81295a){super(_0x81295a),_0x81295a['config']['define']('uploadcare.uploader.sourceList',[K['Local'],K['URL']]),_0x53a18b['defineComponents'](_0x53a18b),this['_defineLocale']();}['_defineLocale'](){const _0x12a919=this['editor']['config']['get']('uploadcare.locale'),_0x1cec24=this['editor']['locale']['contentLanguage'];_0x12a919&&_0x53a18b['defineLocale'](_0x1cec24,_0x12a919);}}class J extends _0xcae530{constructor(_0x85725f){super(_0x85725f);const t=_0x85725f['t'],_0x560c12=this['bindTemplate'],_0x5a75a2=new _0x523e4d();_0x5a75a2['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':[_0x5a75a2,{'text':_0x560c12['to']('imageUploadProgress',_0x1b749e=>t('Loading\x20image...')+'\x20('+(_0x1b749e||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 Z extends _0xcae530{constructor(_0x1e7b5c){super(_0x1e7b5c);const t=_0x1e7b5c['t'];this['set']('errorType',null);const _0x208574=new _0x33cbd5(_0x1e7b5c);_0x208574['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x208574['withText']=!0x0,_0x208574['class']='ck-button-action',_0x208574['on']('execute',()=>{this['fire']('retry');}),_0x208574['bind']('isVisible')['to'](this,'errorType',_0x46534f=>'NotFound'!==_0x46534f);const _0x421b9f=new _0x3b03f7();_0x421b9f['content']=_0xc3e620,_0x421b9f['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x16a94=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':[_0x421b9f,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x16a94['to']('errorType',_0x2daafa=>t('NotFound'!==_0x2daafa?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x208574]},{'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 Q extends _0xcae530{constructor(_0x303db3,_0x3c5936){super(_0x303db3);const _0x5a2bce=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x3c5936,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x5a2bce['to']('imageSrc')}});}}class X extends A{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0xf3b72f,_0xf58605,_0x5a7cb5){super(_0xf3b72f),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0xf3b72f),this['_errorView']=new Z(_0xf3b72f),this['_editingView']=new Q(_0xf3b72f,_0x5a7cb5),this['_focusableView']=new _0xcae530(_0xf3b72f),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0xf58605),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'],_0x529af0=>{this['_addUploadcareImageEditorListeners'](_0x529af0);});}),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'](_0x4f73c9,_0x3267b8){const _0x4a9f95='uc-cloud-image-editor',_0x19af70=_0x4f73c9['querySelector'](_0x4a9f95);if(_0x19af70)return _0x3267b8(_0x19af70);const _0x2abba4=new MutationObserver(_0x4f48e5=>{const _0x42bd2b=_0x4f48e5['filter'](_0x1dcb72=>_0x1dcb72['target']===_0x4f73c9&&_0x1dcb72['addedNodes']['length']>0x0&&_0x1dcb72['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x4a9f95);_0x42bd2b['length']&&(_0x2abba4['disconnect'](),_0x3267b8(_0x42bd2b[0x0]['addedNodes'][0x0]));});_0x2abba4['observe'](_0x4f73c9,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x52beb0){_0x52beb0['addEventListener']('apply',_0x1d1c92=>{this['fire']('apply',{'imageSrc':_0x1d1c92['detail']['cdnUrl']});}),_0x52beb0['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x11d3dc(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0xc72b7e,_0x4ec740,_0x3fa4b7){super(),this['_editor']=_0xc72b7e,this['_dialog']=_0x4ec740,this['_imageElement']=_0x3fa4b7,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 _0x5d91a3=this['_imageElement'],_0x548a0e=_0x5d91a3['getAttribute']('uploadcareImageId'),_0x5e530a=_0x5d91a3['getAttribute']('src');if(_0x548a0e)await this['_loadImageInfo'](_0x548a0e,_0x5e530a);else{if(this['_imageCache']['has'](_0x5e530a)){const _0x3a322c=this['_imageCache']['get'](_0x5e530a);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3a322c['url'],this['imageDimension']=_0x3a322c['dimension'],this['imageId']=_0x3a322c['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x56dfa6}=this['_editor'],t=_0x56dfa6['t'],_0x689d31=new X(_0x56dfa6,this['imageStatus'],this['_attributes']);_0x689d31['bind']('status')['to'](this,'imageStatus'),_0x689d31['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x689d31['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x689d31['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x689d31,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x2622f3,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x689d31,'position':_0xdd4e71['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x689d31['focus']();},'onHide':()=>{_0x689d31['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x464d97=>!V(_0x464d97,_0x689d31['element'])}});}['_loadImageInfo'](_0x2a4860,_0x214078){return q['getInfo'](_0x2a4860,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x2a9f67=>{const {width:_0x39ab48,height:_0x20997c}=_0x2a9f67['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x214078,this['imageDimension']={'width':_0x39ab48,'height':_0x20997c},this['imageId']=_0x2a4860;})['catch'](_0x130cd3=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x130cd3['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3decdd,_0x59290a){return this['_getImageAsFile'](_0x3decdd)['then'](_0x263012=>q['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x59290a['signal'],'file':_0x263012,'onProgress':_0x51ccbe=>{_0x51ccbe&&_0x51ccbe['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x51ccbe['value']));}}))['then'](_0x44d024=>{const {width:_0x25237b,height:_0x48a5a0}=_0x44d024['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x44d024['cdnUrl'],this['imageDimension']={'width':_0x25237b,'height':_0x48a5a0},this['imageId']=_0x44d024['uuid'],this['imageUploadProgress']=null;const _0x3c48ef=_0x3decdd['getAttribute']('src');this['_imageCache']['set'](_0x3c48ef,{'id':_0x44d024['uuid'],'url':_0x44d024['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x5d72b3=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5d72b3['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2a08e1,_0x17182c){_0x2a08e1['on']('apply',(_0x490e58,_0x412b3d)=>{this['_replaceImage'](_0x17182c,_0x412b3d['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2a08e1['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2a08e1['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x9248da,_0x3b7357,_0x21d853){const _0x419aef=this['_editor'],{width:_0x37ee8d,height:_0x2c5e5d}=F(_0x3b7357,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x224caa,imageSources:_0x2ffa37}=D(_0x3b7357,_0x37ee8d);_0x419aef['model']['change'](_0x202f0e=>{if('$graveyard'===_0x9248da['root']['rootName']){_0x419aef['execute']('insertImage',{'imageType':_0x9248da['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x9248da['getAttributes']()),'uploadcareImageId':_0x21d853,'src':_0x224caa,'sources':_0x2ffa37,'width':_0x37ee8d,'height':_0x2c5e5d}});const _0x120b6e=_0x9248da['getChildren']();_0x9248da=_0x419aef['model']['document']['selection']['getSelectedElement']();for(const _0x367ef4 of _0x120b6e)_0x202f0e['append'](_0x202f0e['cloneElement'](_0x367ef4),_0x9248da);}else _0x202f0e['setSelection'](_0x9248da,'on'),_0x419aef['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x9248da['getAttributes']()),'uploadcareImageId':_0x21d853,'src':_0x224caa,'sources':_0x2ffa37,'width':_0x37ee8d,'height':_0x2c5e5d},_0x9248da);_0x202f0e['setSelection'](_0x9248da,'on');});}async['_getImageAsFile'](_0x2ec6ca){const _0x337327=_0x3997ed['window'],_0x4c3afa=_0x3997ed['document']['location']['href'],_0x196737=new _0x337327['URL'](_0x2ec6ca['getAttribute']('src'),_0x4c3afa);if('data:'===_0x196737['protocol']){const _0x46825e=_0x196737['href']['split'](','),_0x32bd08=_0x46825e[0x0]['match'](/:(.*?);/)[0x1],_0x2d01fd=_0x32bd08['split']('/')[0x1],_0x3dbfd5=_0x337327['atob'](_0x46825e[_0x46825e['length']-0x1]);let _0x19ebe2=_0x3dbfd5['length'];const _0x585911=new _0x337327['Uint8Array'](_0x19ebe2);for(;_0x19ebe2--;)_0x585911[_0x19ebe2]=_0x3dbfd5['charCodeAt'](_0x19ebe2);return new _0x337327['File']([_0x585911],'image.'+_0x2d01fd,{'type':_0x32bd08});}const _0x1e1f4d=_0x196737['href']['split']('/'),_0x1d0c92=_0x1e1f4d[_0x1e1f4d['length']-0x1],_0x126552=_0x1d0c92['split']('.')[0x1];return _0x337327['fetch'](_0x196737['href'])['then'](_0x2856fa=>_0x2856fa['clone']()['blob']())['then'](_0x844178=>new _0x337327['File']([_0x844178],_0x1d0c92,{'type':'image/'+_0x126552}));}}class tt extends _0x20d127{['imageEditController'];static get['requires'](){return[_0x479684];}['_isEditable'];constructor(_0x50904d){super(_0x50904d),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x5a517d){const _0x4d6f2e=B(_0x5a517d);return _0x5e77c5=>!(!_0x5e77c5||!_0x5e77c5['is']('element','imageBlock')&&!_0x5e77c5['is']('element','imageInline'))&&(!!_0x5e77c5['hasAttribute']('uploadcareImageId')||!!_0x5e77c5['hasAttribute']('src')&&_0x4d6f2e(_0x5e77c5['getAttribute']('src')));}(_0x50904d['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x213671=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x213671);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x2b2faf=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2b2faf&&(_0x2b2faf['is']('element','imageBlock')||_0x2b2faf['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x479684),_0x2b2faf),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x20d127{['refresh'](){const _0x12e250=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x12e250&&(_0x12e250['is']('element','imageBlock')||_0x12e250['is']('element','imageInline')));}['execute'](_0x194a0f){const _0x1e216a=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x3ba9c1=>{_0x3ba9c1['setAttributes'](_0x194a0f,_0x1e216a),_0x3ba9c1['removeAttribute']('srcset',_0x1e216a),_0x3ba9c1['removeAttribute']('sizes',_0x1e216a);});}}class it extends _0xa7313f{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0xe7f899,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x51b56e}=this;_0x51b56e['commands']['add']('uploadcareImageEdit',new tt(_0x51b56e)),_0x51b56e['commands']['add']('uploadcareImageReplace',new et(_0x51b56e));}}class st extends _0xa7313f{['_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 _0x5ac267=this['editor'];_0x5ac267['ui']['componentFactory']['add']('uploadcareImageEdit',_0x34251d=>{const _0x3dd0d8=_0x5ac267['commands']['get']('uploadcareImageEdit'),_0x27de86=new _0x33cbd5(_0x34251d),t=_0x34251d['t'];return _0x27de86['set']({'icon':_0x2622f3,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x27de86['bind']('isEnabled')['to'](_0x3dd0d8),_0x27de86['bind']('isOn')['to'](_0x3dd0d8,'isActive'),this['listenTo'](_0x27de86,'execute',()=>{_0x5ac267['execute']('uploadcareImageEdit'),_0x5ac267['editing']['view']['focus']();}),_0x27de86;}),this['_initConfig']();}['_initConfig'](){const _0xe6d176=_0x4aaac7(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0xe6d176),this['listenTo'](this['editor'],'destroy',()=>{_0xe6d176['remove']();});}}class nt extends _0xa7313f{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[it,st];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{H as Uploadcare,M as UploadcareCommand,z as UploadcareEditing,nt as UploadcareImageEdit,tt as UploadcareImageEditCommand,it as UploadcareImageEditEditing,st as UploadcareImageEditUI,S as UploadcareUI,W as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-next-
|
|
3
|
+
"version": "0.0.0-nightly-next-20260107.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"dist/translations/*.umd.js"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-
|
|
36
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-
|
|
37
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-
|
|
38
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-
|
|
39
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-
|
|
40
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-
|
|
41
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-
|
|
42
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-
|
|
35
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20260107.0",
|
|
36
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20260107.0",
|
|
37
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20260107.0",
|
|
38
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20260107.0",
|
|
39
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20260107.0",
|
|
40
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20260107.0",
|
|
41
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20260107.0",
|
|
42
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20260107.0",
|
|
43
43
|
"@uploadcare/file-uploader": "1.24.5",
|
|
44
44
|
"@uploadcare/upload-client": "6.14.3"
|
|
45
45
|
},
|