@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-next-20260108.0 → 0.0.0-nightly-next-20260109.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 _0x563d32,Command as _0x340173}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0xc1ba55,IconGooglePhotos as _0x2d458a,IconGoogleDrive as _0x319f48,IconFacebook as _0x31b73a,IconDropbox as _0x4d8829,IconUploadcareLink as _0x5308aa,IconUploadcareImageUpload as _0x5019ae,IconError as _0x1cd0c4,IconUploadcareImageEdit as _0x14ca36}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xc28d4f,MenuBarMenuListItemButtonView as _0x26275d,View as _0x12e055,FocusCycler as _0x1f8da5,Dialog as _0x58e17d,DialogViewPosition as _0x4f83bd,SpinnerView as _0x13d23f,IconView as _0x3f7b31,Notification as _0x5df520}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x226452,DomEmitterMixin as _0x65b6d9,global as _0x18328e,getAncestors as _0x43ba8f,ObservableMixin as _0x9f08b1,uid as _0x469bd6,createElement as _0x3f310}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x2e178d}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x3212b1,info as _0x5cc00e}from'@uploadcare/upload-client';import*as _0x2a34cf from'@uploadcare/file-uploader';var S=function(_0x1e2340){return _0x1e2340['Local']='local',_0x1e2340['URL']='url',_0x1e2340['Dropbox']='dropbox',_0x1e2340['GDrive']='gdrive',_0x1e2340['Facebook']='facebook',_0x1e2340['GPhotos']='gphotos',_0x1e2340['OneDrive']='onedrive',_0x1e2340;}({});function T(_0x2a9c81,_0x1bf9e4,_0x595a1c){const t=_0x2a9c81['t'],_0x19c9e0=_0x2a9c81['t'];switch(_0x1bf9e4){case S['Local']:return{'text':_0x19c9e0('Insert'===_0x595a1c?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x19c9e0('From\x20computer')};case S['URL']:return{'text':'Insert'===_0x595a1c?_0x19c9e0('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x19c9e0('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0x595a1c?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0x595a1c?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0x595a1c?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0x595a1c?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0x595a1c?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x1bf9e4;}}class A extends _0x563d32{['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 _0x266b70=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4bace0;for(const _0x39a775 in _0x266b70){const _0x3f9770=_0x39a775,_0x1812ae=_0x266b70[_0x3f9770];if('uploadcareLicenseKeyValid'==_0x1812ae||'uploadcareLicenseKeyInvalid'==_0x1812ae||'uploadcareLicenseKeyExpired'==_0x1812ae||'uploadcareLicenseKeyDomainLimit'==_0x1812ae||'uploadcareLicenseKeyNotAllowed'==_0x1812ae||'uploadcareLicenseKeyEvaluationLimit'==_0x1812ae||'uploadcareLicenseKeyUsageLimit'==_0x1812ae){delete _0x266b70[_0x3f9770],_0x4bace0=_0x1812ae,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x4bace0&&_0x266b70['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x4bace0&&_0x266b70['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x4bace0&&_0x266b70['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x4bace0&&_0x266b70['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x4bace0&&_0x266b70['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x4bace0&&_0x266b70['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x25678d}=this,_0x1ef9da=_0x25678d['commands']['get']('uploadcare');if(!_0x1ef9da)return;const _0x1344fa=this['_normalizeConfigSourceList'](_0x25678d['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x2ae337,_0x489383)=>{const _0x26adff=this['_getIntegrationKey'](_0x489383['type']);return _0x2ae337[_0x26adff]||(_0x2ae337[_0x26adff]=[]),_0x2ae337[_0x26adff]['push'](_0x489383),_0x2ae337;},{});_0x25678d['plugins']['has']('ImageInsertUI')&&_0x25678d['commands']['get']('uploadcare')&&Object['entries'](_0x1344fa)['forEach'](([_0x34a90c,_0x4955fe])=>{_0x25678d['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x34a90c,'observable':()=>_0x1ef9da,'buttonViewCreator':()=>this['_createToolbarButton'](_0x4955fe),'formViewCreator':()=>this['_createDropdownButtons'](_0x4955fe),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x4955fe),'override':'assetManager'!==_0x34a90c});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x6d2826){const {locale:_0xd1e9d9}=this['editor'];return _0x6d2826['map'](_0x32d3ee=>{const _0x5b54ce=T(_0xd1e9d9,_0x32d3ee,'Insert');switch(_0x32d3ee){case S['Local']:return{'icon':_0x5019ae,'type':S['Local'],..._0x5b54ce};case S['URL']:return{'icon':_0x5308aa,'type':S['URL'],..._0x5b54ce};case S['Dropbox']:return{'icon':_0x4d8829,'type':S['Dropbox'],..._0x5b54ce};case S['Facebook']:return{'icon':_0x31b73a,'type':S['Facebook'],..._0x5b54ce};case S['GDrive']:return{'icon':_0x319f48,'type':S['GDrive'],..._0x5b54ce};case S['GPhotos']:return{'icon':_0x2d458a,'type':S['GPhotos'],..._0x5b54ce};case S['OneDrive']:return{'icon':_0xc1ba55,'type':S['OneDrive'],..._0x5b54ce};}});}['_getIntegrationKey'](_0x1e97c1){switch(_0x1e97c1){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x156ef6,_0x23d0ae){const _0xdc7f90=this['editor'],_0xf40180=new _0x156ef6(_0xdc7f90['locale']),_0x2b72b3=_0xdc7f90['commands']['get']('uploadcare');return _0xf40180['bind']('isEnabled')['to'](_0x2b72b3),_0xf40180['on']('execute',()=>{_0x2b72b3['execute'](_0x23d0ae);}),_0xf40180;}['_createToolbarButton'](_0x5f2b35){const {locale:_0x4ca4be}=this['editor'],_0x398be0=this['editor']['plugins']['get']('ImageInsertUI'),_0x346d24=_0x5f2b35[0x0],_0x52607b=this['_createButton'](_0xc28d4f,_0x346d24['type']);return _0x52607b['icon']=_0x346d24['icon'],_0x52607b['bind']('label')['to'](_0x398be0,'isImageSelected',_0x4a668f=>T(_0x4ca4be,_0x346d24['type'],_0x4a668f?'Replace':'Insert')['text']),_0x52607b['tooltip']=!0x0,_0x52607b;}['_createDropdownButtons'](_0x2fe3f0){const {locale:_0x19ae44}=this['editor'],_0x3d2e68=this['editor']['plugins']['get']('ImageInsertUI');return _0x2fe3f0['map'](_0x47b832=>{const _0x30c1f7=this['_createButton'](_0xc28d4f,_0x47b832['type']);return _0x30c1f7['withText']=!0x0,_0x30c1f7['icon']=_0x47b832['icon'],_0x30c1f7['bind']('label')['to'](_0x3d2e68,'isImageSelected',_0x2717fe=>T(_0x19ae44,_0x47b832['type'],_0x2717fe?'Replace':'Insert')['text']),_0x30c1f7;});}['_createMenuBarButtons'](_0x35cbcc){return _0x35cbcc['map'](_0x36507c=>{const _0x4a67c7=this['_createButton'](_0x26275d,_0x36507c['type']);return _0x4a67c7['icon']=_0x36507c['icon'],_0x4a67c7['label']=_0x36507c['shortText'],_0x4a67c7;});}}class K extends _0x12e055{['focusTracker'];['focusCycler'];constructor(_0x30174f){super(_0x30174f),this['focusTracker']=new _0x226452(),this['focusCycler']=new _0x1f8da5({'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 K{constructor(_0xb5fa3e,_0x239c12){super(_0xb5fa3e),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-'+_0x239c12}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x33dc6c,_0x8d0ef3){const _0x33d015=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x372327=>_0x372327<=_0x8d0ef3)['map'](_0x286637=>_0x33dc6c['replace'](/\/$/,'')+'/-/resize/'+_0x286637+'x/\x20'+_0x286637+'w');return{'imageFallbackUrl':_0x33dc6c,'imageSources':[{'srcset':_0x33d015['join'](',\x20'),'sizes':'(max-width:\x20'+_0x8d0ef3+'px)\x20100vw,\x20'+_0x8d0ef3+'px','type':'image/webp'}]};}function F(_0x1a980a,_0x309a23,_0x351b66){const _0x4a501e=_0x1a980a['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x4a501e?parseInt(_0x4a501e[0x1],0xa):_0x309a23,'height':_0x4a501e?parseInt(_0x4a501e[0x2],0xa):_0x351b66};}function $(_0x336ae6,_0x21cec5){const _0x2a7c27=new(_0x65b6d9())(),_0x1affff=_0x336ae6['plugins']['get']('ImageUtils'),_0x6424b=_0x336ae6['editing']['mapper']['toViewElement'](_0x21cec5),_0x250b0a=_0x1affff['findViewImgElement'](_0x6424b),_0x31e47a=_0x336ae6['editing']['view']['domConverter']['viewToDom'](_0x250b0a),_0x1b09d0=_0x21cec5['getAttribute']('width'),_0x4fcce2=_0x21cec5['getAttribute']('height'),_0x2adced='image-processing';_0x336ae6['editing']['view']['change'](_0x14f298=>{_0x14f298['addClass'](_0x2adced,_0x6424b),_0x14f298['setStyle']('aspect-ratio',_0x1b09d0+'/'+_0x4fcce2,_0x250b0a);}),_0x2a7c27['listenTo'](_0x31e47a,'load',()=>{_0x2a7c27['stopListening'](_0x31e47a,'load'),_0x336ae6['editing']['view']['change'](_0x4f500b=>{_0x4f500b['removeClass'](_0x2adced,_0x6424b),_0x4f500b['removeStyle']('aspect-ratio',_0x250b0a);});});}function B(_0x3be910){if(Array['isArray'](_0x3be910)){const _0x10f79a=_0x3be910['map'](B);return _0xb13723=>_0x10f79a['some'](_0x8d7753=>_0x8d7753(_0xb13723));}if('origin'==_0x3be910){const _0x4fcac2=_0x18328e['window']['location']['origin'];return _0x1081bf=>new URL(_0x1081bf,_0x18328e['document']['baseURI'])['origin']==_0x4fcac2;}return'function'==typeof _0x3be910?_0x3be910:_0x3be910 instanceof RegExp?_0x599df4=>!(!_0x599df4['match'](_0x3be910)&&!_0x599df4['replace'](/^https?:\/\//,'')['match'](_0x3be910)):()=>!0x1;}function V(_0x41b0e9,_0x263638){return _0x43ba8f(_0x41b0e9['target'])['includes'](_0x263638);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x9f08b1(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x101110,_0xa7accd,_0x3ae433){super(),this['_editor']=_0x101110,this['_editing']=_0xa7accd,this['_dialog']=_0x101110['plugins']['get'](_0x58e17d),this['_api']=_0xa7accd['ctxElement']['getAPI'](),this['_type']=_0x3ae433,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:_0xdd8524,model:_0x419f30}=this['_editor'],_0x5b7cef=_0x419f30['document']['selection']['getSelectedElement'](),_0x174380=_0x5b7cef&&(_0x5b7cef['is']('element','imageBlock')||_0x5b7cef['is']('element','imageInline'));this['_formView']=new O(_0xdd8524,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x5019ae,'title':T(_0xdd8524,this['_type'],_0x174380?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x4f83bd['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3e9248=>!V(_0x3e9248,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x14e7d7}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0xa8c3dc=>{const _0x14b110=_0x14e7d7['length'];for(const _0x558fde of _0x14e7d7){const _0x4876be=_0x558fde===_0x14e7d7[_0x14b110-0x1],{cdnUrl:_0xcae523,fileInfo:_0x5279bc}=_0x558fde;if(!_0xcae523||!_0x5279bc)continue;const {width:_0x5eadd6,height:_0x5335fa}=_0x5279bc['imageInfo'],_0x36f9d0=F(_0xcae523,_0x5eadd6,_0x5335fa),_0x5f1823=D(_0xcae523,_0x36f9d0['width']),_0x1cd474={'id':_0x5279bc['uuid'],'type':'image','attributes':{'imageDimension':_0x36f9d0,..._0x5f1823}};this['_insertAsset'](_0x1cd474,_0x4876be,_0xa8c3dc);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0xd51b0d=>{'idle'===_0xd51b0d['detail']['status']&&!_0xd51b0d['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x57b3dc,_0x11a436,_0x1a1bac){const _0x2cc56f=this['_editor']['model']['document']['selection'],_0x18e179=_0x2cc56f['getSelectedElement'](),_0xdaa721=!(!_0x18e179||!_0x18e179['is']('element','imageInline'));_0x1a1bac['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x57b3dc,_0xdaa721),_0x11a436||_0x1a1bac['setSelection'](_0x2cc56f['getLastPosition']());}['_insertImage'](_0x4e58e3,_0x778687){const _0x1f53ec=this['_editor'],{imageDimension:_0x556472,imageFallbackUrl:_0x5c731a,imageSources:_0x2c3a49}=_0x4e58e3['attributes'];_0x1f53ec['execute']('insertImage',{'imageType':_0x778687?'imageInline':null,'source':{'uploadcareImageId':_0x4e58e3['id'],'src':_0x5c731a,'sources':_0x2c3a49,..._0x556472}});}}class M extends _0x340173{['_editing'];['_controller']=null;static get['requires'](){return[_0x58e17d,z];}constructor(_0x26816b){super(_0x26816b),this['_editing']=_0x26816b['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x205a12){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x205a12);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x5082e8,..._0x3722ed}){return _0x3212b1(_0x5082e8,_0x3722ed);}static['getInfo'](_0x48c709,_0x29ceae){return _0x5cc00e(_0x48c709,_0x29ceae);}}class W extends _0x563d32{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x2e178d,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x2aa819=this['editor'];if(!!!_0x2aa819['config']['get']('uploadcare'))return;_0x2aa819['plugins']['get'](_0x2e178d)['createUploadAdapter']=_0x2a2186=>new G(_0x2a2186,_0x2aa819),_0x2aa819['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x344af0,{imageElement:_0x4a610c,data:_0x518203})=>{_0x2aa819['model']['change'](_0x30069b=>{_0x30069b['setAttribute']('uploadcareImageId',_0x518203['uploadcareImageId'],_0x4a610c);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x32d07d,_0x444148){this['loader']=_0x32d07d,this['editor']=_0x444148,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x270348=await this['loader']['file'];return q['upload']({'file':_0x270348,'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':_0x5a5968=>{_0x5a5968&&_0x5a5968['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x5a5968['value']);}})['then'](async _0x555deb=>{const {imageFallbackUrl:_0x4b0461,imageSources:_0x2d6570}=D(_0x555deb['cdnUrl'],_0x555deb['imageInfo']['width']);return{'uploadcareImageId':_0x555deb['uuid'],'default':_0x4b0461,'sources':_0x2d6570};})['catch'](()=>{const _0x26be6c=t('Cannot\x20upload\x20file:')+('\x20'+_0x270348['name']+'.');return Promise['reject'](_0x26be6c);});}['abort'](){this['controller']['abort']();}}class z extends _0x563d32{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x58e17d];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x36380b){super(_0x36380b),this['ucContextId']=_0x469bd6();}['init'](){const _0x209bc9=this['editor'];_0x209bc9['commands']['add']('uploadcare',new M(_0x209bc9));}['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 _0x40f235=_0x18328e['document']['querySelector']('input[uploadcare-file-input]');_0x40f235&&_0x40f235['remove']();}),async function(_0x222ae8){const _0x4096d8=_0x529110([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]),_0x4f2699=0x535f8c3a,_0x17275d=0x5358f202^_0x4f2699,_0x25d9a0=window[_0x529110([0x44,0x61,0x74,0x65])][_0x529110([0x6e,0x6f,0x77])](),_0x56922b=_0x222ae8[_0x529110([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3737dd=new window[(_0x529110([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x8d7c5d=>{_0x56922b[_0x529110([0x6f,0x6e,0x63,0x65])](_0x529110([0x72,0x65,0x61,0x64,0x79]),_0x8d7c5d);}),_0x200a5f={[_0x529110([0x6b,0x74,0x79])]:_0x529110([0x45,0x43]),[_0x529110([0x75,0x73,0x65])]:_0x529110([0x73,0x69,0x67]),[_0x529110([0x63,0x72,0x76])]:_0x529110([0x50,0x2d,0x32,0x35,0x36]),[_0x529110([0x78])]:_0x529110([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]),[_0x529110([0x79])]:_0x529110([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]),[_0x529110([0x61,0x6c,0x67])]:_0x529110([0x45,0x53,0x32,0x35,0x36])},_0x322a59=_0x56922b[_0x529110([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x529110([0x67,0x65,0x74])](_0x529110([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4633db(){let _0x472f44,_0x36f8fe=null,_0x27de90=null;try{if(_0x322a59==_0x529110([0x47,0x50,0x4c]))return _0x529110([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x472f44=_0x202326(),!_0x472f44)return _0x529110([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x472f44[_0x529110([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x27de90=_0x9e5f92(_0x472f44[_0x529110([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x472f44[_0x529110([0x6a,0x74,0x69])])),await _0x4d94e3()?_0x33838e()?_0x29fd4c()?_0x529110([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xae44eb()?(_0x472f44[_0x529110([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x529110([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x36f8fe=_0x1f5afa(_0x529110([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1554e3()):_0x529110([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x529110([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x529110([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x529110([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x29fd4c(){const _0x2bc49e=[_0x529110([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x529110([0x74,0x72,0x69,0x61,0x6c])][_0x529110([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x472f44[_0x529110([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x25d9a0/0x3e8:0xe10*_0x17275d;return _0x472f44[_0x529110([0x65,0x78,0x70])]<_0x2bc49e;}function _0x33838e(){const _0xc4fdba=_0x472f44[_0x529110([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xc4fdba&&(!!_0xc4fdba[_0x529110([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x529110([0x2a]))||!!_0xc4fdba[_0x529110([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x529110([0x55,0x50,0x4c,0x43])));}function _0xae44eb(){const _0x2f8e78=_0x472f44[_0x529110([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2f8e78||0x0==_0x2f8e78[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2548b6}=new URL(window[_0x529110([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2f8e78[_0x529110([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2548b6))return!0x0;const _0x8045c0=_0x2548b6[_0x529110([0x73,0x70,0x6c,0x69,0x74])](_0x529110([0x2e]));return _0x2f8e78[_0x529110([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5e00c8=>_0x5e00c8[_0x529110([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x529110([0x2a])))[_0x529110([0x6d,0x61,0x70])](_0x1d0459=>_0x1d0459[_0x529110([0x73,0x70,0x6c,0x69,0x74])](_0x529110([0x2e])))[_0x529110([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x52857d=>_0x52857d[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x8045c0[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x529110([0x6d,0x61,0x70])](_0x1bc1bc=>Array(_0x8045c0[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1bc1bc[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x529110([0x66,0x69,0x6c,0x6c])](_0x1bc1bc[0x0]===_0x529110([0x2a])?_0x529110([0x2a]):'')[_0x529110([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1bc1bc))[_0x529110([0x73,0x6f,0x6d,0x65])](_0x1d2653=>_0x8045c0[_0x529110([0x65,0x76,0x65,0x72,0x79])]((_0x4e1ec5,_0x3e880f)=>_0x1d2653[_0x3e880f]===_0x4e1ec5||_0x1d2653[_0x3e880f]===_0x529110([0x2a])));}function _0x1554e3(){return _0x36f8fe&&_0x27de90?new window[(_0x529110([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3fd099,_0x534de9)=>{_0x36f8fe[_0x529110([0x74,0x68,0x65,0x6e])](_0x3fd099,_0x534de9),_0x27de90[_0x529110([0x74,0x68,0x65,0x6e])](_0x81924c=>{_0x81924c!=_0x529110([0x56,0x61,0x6c,0x69,0x64])&&_0x3fd099(_0x81924c);},_0x534de9);}):_0x36f8fe||_0x27de90||_0x529110([0x56,0x61,0x6c,0x69,0x64]);}}function _0x9e5f92(_0x4c8e39,_0x59c67f){return new window[(_0x529110([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e21f1=>{if(_0x11b8c9())return _0x4e21f1(_0x529110([0x56,0x61,0x6c,0x69,0x64]));_0xad3bf0(),_0x56922b[_0x529110([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x529110([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1d8158=!0x1;const _0x201b82=_0x469bd6();function _0x382fdf(_0x1d80b5){return!!_0x1d80b5&&(typeof _0x1d80b5===_0x529110([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1d80b5===_0x529110([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1d80b5[_0x529110([0x74,0x68,0x65,0x6e])]===_0x529110([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1d80b5[_0x529110([0x63,0x61,0x74,0x63,0x68])]===_0x529110([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x37ffd2(_0x13efc9){_0x4e91d7(_0x13efc9)[_0x529110([0x74,0x68,0x65,0x6e])](_0x34c1d1=>{if(!_0x34c1d1||_0x34c1d1[_0x529110([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x529110([0x6f,0x6b]))return _0x529110([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x35f9c3(_0x5458f2(_0x201b82+_0x59c67f))!=_0x34c1d1[_0x529110([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x529110([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x529110([0x56,0x61,0x6c,0x69,0x64]);})[_0x529110([0x74,0x68,0x65,0x6e])](_0x1d7997=>(_0x3b8e73(),_0x1d7997),()=>{const _0x2e6310=_0x33a67c();return null==_0x2e6310?(_0x3b8e73(),_0x529110([0x56,0x61,0x6c,0x69,0x64])):_0x529110(_0x25d9a0-_0x2e6310>(0x7753083a^_0x4f2699)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x529110([0x74,0x68,0x65,0x6e])](_0x4e21f1)[_0x529110([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4e21f1(_0x529110([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x23cd75=0x536962ba^_0x4f2699;function _0x3b8e73(){const _0x481eb8=_0x529110([0x6c,0x6c,0x63,0x74,0x2d])+_0x35f9c3(_0x5458f2(_0x4c8e39)),_0x305649=_0x703522(_0x35f9c3(window[_0x529110([0x4d,0x61,0x74,0x68])][_0x529110([0x63,0x65,0x69,0x6c])](_0x25d9a0/_0x23cd75)));window[_0x529110([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x529110([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x481eb8,_0x305649);}function _0x33a67c(){const _0x3d3d8d=_0x529110([0x6c,0x6c,0x63,0x74,0x2d])+_0x35f9c3(_0x5458f2(_0x4c8e39)),_0x46900b=window[_0x529110([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x529110([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d3d8d);return _0x46900b?window[_0x529110([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x703522(_0x46900b),0x10)*_0x23cd75:null;}function _0x4e91d7(_0x414a64){return new window[(_0x529110([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4081a,_0x1bf271)=>{_0x414a64[_0x529110([0x74,0x68,0x65,0x6e])](_0x4081a,_0x1bf271),window[_0x529110([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1bf271,0x535e58fa^_0x4f2699);});}}_0x56922b[_0x529110([0x6f,0x6e])](_0x529110([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x574365,_0x44144d)=>{if(_0x44144d[0x0]!=_0x4c8e39)return _0x4e21f1(_0x529110([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x44144d[0x1]={..._0x44144d[0x1],[_0x529110([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x201b82};},{[_0x529110([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x529110([0x68,0x69,0x67,0x68])}),_0x56922b[_0x529110([0x6f,0x6e])](_0x529110([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xe1050f=>{_0x382fdf(_0xe1050f[_0x529110([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1d8158=!0x0,_0x37ffd2(_0xe1050f[_0x529110([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x529110([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x529110([0x6c,0x6f,0x77])}),_0x3737dd[_0x529110([0x74,0x68,0x65,0x6e])](()=>{_0x1d8158||_0x4e21f1(_0x529110([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x11b8c9(){return _0x56922b[_0x529110([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x529110([0x76,0x69,0x65,0x77])][_0x529110([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x529110([0x61,0x75,0x74,0x6f]);}function _0xad3bf0(){_0x56922b[_0x529110([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x529110([0x76,0x69,0x65,0x77])][_0x529110([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x529110([0x61,0x75,0x74,0x6f]);}}function _0x1f5afa(_0x6845cc){const _0x2241b6=[new window[(_0x529110([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x266449=>setTimeout(_0x266449,0x5356b2f6^_0x4f2699)),_0x3737dd[_0x529110([0x74,0x68,0x65,0x6e])](()=>new window[(_0x529110([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x29c72b=>{let _0x54c875=0x0;_0x56922b[_0x529110([0x6d,0x6f,0x64,0x65,0x6c])][_0x529110([0x6f,0x6e])](_0x529110([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x279eba,_0x3b8e4b)=>{_0x3b8e4b[0x0][_0x529110([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x54c875++,_0x54c875==(0x535f89d2^_0x4f2699)&&(_0x29c72b(),_0x279eba[_0x529110([0x6f,0x66,0x66])]());});}))];return window[_0x529110([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x529110([0x72,0x61,0x63,0x65])](_0x2241b6)[_0x529110([0x74,0x68,0x65,0x6e])](()=>_0x6845cc);}async function _0x632222(){await _0x3737dd,_0x56922b[_0x529110([0x6d,0x6f,0x64,0x65,0x6c])][_0x529110([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x20e977,_0x56922b[_0x529110([0x6d,0x6f,0x64,0x65,0x6c])][_0x529110([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x20e977,_0x56922b[_0x529110([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x529110([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x461390(_0x1749c2){const _0x44eb68=_0x54b502();_0x56922b[_0x44eb68]=_0x529110([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1749c2,_0x1749c2!=_0x529110([0x56,0x61,0x6c,0x69,0x64])&&_0x632222();}function _0x54b502(){const _0x3ad42e=window[_0x529110([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x529110([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x529110([0x6e,0x6f,0x77])]())[_0x529110([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x529110([0x2e]),'');let _0x350e8a=_0x529110([0x68]);for(let _0x4fb9f9=0x0;_0x4fb9f9<_0x3ad42e[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4fb9f9+=0x2){let _0x713446=window[_0x529110([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3ad42e[_0x529110([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4fb9f9,_0x4fb9f9+0x2));_0x713446>=_0x4096d8[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x713446-=_0x4096d8[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x350e8a+=_0x4096d8[_0x713446];}return _0x350e8a;}function _0x202326(){const _0x590ce9=_0x322a59[_0x529110([0x73,0x70,0x6c,0x69,0x74])](_0x529110([0x2e]));if(0x3!=_0x590ce9[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x34b8f4(_0x590ce9[0x1]);function _0x34b8f4(_0x2e1d7d){const _0x504390=_0x113909(_0x2e1d7d);return _0x504390&&_0xe41ef5()?_0x504390:null;function _0xe41ef5(){const _0x4d3b69=_0x504390[_0x529110([0x6a,0x74,0x69])],_0x22b649=window[_0x529110([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4d3b69[_0x529110([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4d3b69[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x383a0c={..._0x504390,[_0x529110([0x6a,0x74,0x69])]:_0x4d3b69[_0x529110([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4d3b69[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x383a0c[_0x529110([0x76,0x63])],_0x5458f2(_0x383a0c)==_0x22b649;}}}async function _0x4d94e3(){let _0x3630d4=!0x0;try{const _0x14c690=_0x322a59[_0x529110([0x73,0x70,0x6c,0x69,0x74])](_0x529110([0x2e])),[_0x494c14,_0x120e58,_0x1b4a2a]=_0x14c690;return _0x51d77a(_0x494c14),await _0xf6aa(_0x494c14,_0x120e58,_0x1b4a2a),_0x3630d4;}catch{return!0x1;}function _0x51d77a(_0x3d47cc){const _0x2d56bc=_0x113909(_0x3d47cc);_0x2d56bc&&_0x2d56bc[_0x529110([0x61,0x6c,0x67])]==_0x529110([0x45,0x53,0x32,0x35,0x36])||(_0x3630d4=!0x1);}async function _0xf6aa(_0x10fcd8,_0x1310ba,_0x44e272){const _0x41a785=window[_0x529110([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x529110([0x66,0x72,0x6f,0x6d])](_0x3d1017(_0x44e272),_0x6a06e9=>_0x6a06e9[_0x529110([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x122361=new window[(_0x529110([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x529110([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x10fcd8+_0x529110([0x2e])+_0x1310ba),_0x209f86=window[_0x529110([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x529110([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x209f86)return;const _0x5cef36=await _0x209f86[_0x529110([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x529110([0x6a,0x77,0x6b]),_0x200a5f,{[_0x529110([0x6e,0x61,0x6d,0x65])]:_0x529110([0x45,0x43,0x44,0x53,0x41]),[_0x529110([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x529110([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x529110([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x209f86[_0x529110([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x529110([0x6e,0x61,0x6d,0x65])]:_0x529110([0x45,0x43,0x44,0x53,0x41]),[_0x529110([0x68,0x61,0x73,0x68])]:{[_0x529110([0x6e,0x61,0x6d,0x65])]:_0x529110([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5cef36,_0x41a785,_0x122361)||(_0x3630d4=!0x1);}}function _0x113909(_0x354e9a){return _0x354e9a[_0x529110([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x529110([0x65,0x79]))?JSON[_0x529110([0x70,0x61,0x72,0x73,0x65])](_0x3d1017(_0x354e9a)):null;}function _0x3d1017(_0x386008){return window[_0x529110([0x61,0x74,0x6f,0x62])](_0x386008[_0x529110([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x529110([0x2b]))[_0x529110([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x529110([0x2f])));}function _0x5458f2(_0x4d1a5d){let _0xc0586=0x1505;function _0x531b29(_0x4397f0){for(let _0x5bbb44=0x0;_0x5bbb44<_0x4397f0[_0x529110([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5bbb44++){const _0x2238f2=_0x4397f0[_0x529110([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5bbb44);_0xc0586=(_0xc0586<<0x5)+_0xc0586+_0x2238f2,_0xc0586&=_0xc0586;}}function _0x425b77(_0x481ce3){Array[_0x529110([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x481ce3)?_0x481ce3[_0x529110([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x425b77):_0x481ce3&&typeof _0x481ce3==_0x529110([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x529110([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x481ce3)[_0x529110([0x73,0x6f,0x72,0x74])]()[_0x529110([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4fcd05,_0x26bea9])=>{_0x531b29(_0x4fcd05),_0x425b77(_0x26bea9);}):_0x531b29(window[_0x529110([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x481ce3));}return _0x425b77(_0x4d1a5d),_0xc0586>>>0x0;}function _0x35f9c3(_0x46d550){return _0x46d550[_0x529110([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x529110([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x529110([0x30]));}function _0x703522(_0x1ec675){return _0x1ec675[_0x529110([0x73,0x70,0x6c,0x69,0x74])]('')[_0x529110([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x529110([0x6a,0x6f,0x69,0x6e])]('');}function _0x20e977(){}function _0x529110(_0x240704){return _0x240704['map'](_0x1f0ae7=>String['fromCharCode'](_0x1f0ae7))['join']('');}_0x461390(await _0x4633db());}(this);}['_initSchema'](){const _0xedd03a=this['editor']['model']['schema'];_0xedd03a['isRegistered']('imageBlock')&&_0xedd03a['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0xedd03a['isRegistered']('imageInline')&&_0xedd03a['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5c4de1=this['editor'];_0x5c4de1['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5c4de1['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x55c366=>_0x55c366['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3bc7ab=_0x5c4de1['commands']['get']('replaceImageSource');_0x3bc7ab&&this['listenTo'](_0x3bc7ab,'cleanupImage',(_0x4cd98a,[_0x56e1cb,_0x5c7b5f])=>{_0x56e1cb['removeAttribute']('uploadcareImageId',_0x5c7b5f);});}['_initConfig'](){const _0x37b7c1=this['editor']['config']['get']('uploadcare.uploader')||{},_0x4cfa3d=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3f310(_0x18328e['document'],'uc-config',{..._0x37b7c1,'pubkey':_0x4cfa3d,'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']=_0xac5d6f=>{if('closeMax'==_0xac5d6f)return'#uc-icon-arrow-down';},_0x18328e['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3f310(_0x18328e['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x18328e['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x45a1f9=this['editor']['commands']['get']('insertImage');_0x45a1f9&&this['listenTo'](_0x45a1f9,'execute',()=>{const _0x1bfe8c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1bfe8c&&_0x1bfe8c['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x1bfe8c);});});const _0x243ec6=this['editor']['commands']['get']('uploadcareImageReplace');_0x243ec6&&this['listenTo'](_0x243ec6,'execute',()=>{const _0x5e0776=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5e0776&&_0x5e0776['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x5e0776);});});}}class H extends _0x563d32{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3dec82){super(_0x3dec82),_0x3dec82['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0x2a34cf['defineComponents'](_0x2a34cf),this['_defineLocale']();}['_defineLocale'](){const _0x125287=this['editor']['config']['get']('uploadcare.locale'),_0x111207=this['editor']['locale']['contentLanguage'];_0x125287&&_0x2a34cf['defineLocale'](_0x111207,_0x125287);}}class J extends _0x12e055{constructor(_0x900804){super(_0x900804);const t=_0x900804['t'],_0x8d9d64=this['bindTemplate'],_0x59120a=new _0x13d23f();_0x59120a['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':[_0x59120a,{'text':_0x8d9d64['to']('imageUploadProgress',_0x1d3560=>t('Loading\x20image...')+'\x20('+(_0x1d3560||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 _0x12e055{constructor(_0x16ce4e){super(_0x16ce4e);const t=_0x16ce4e['t'];this['set']('errorType',null);const _0x4e53d=new _0xc28d4f(_0x16ce4e);_0x4e53d['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4e53d['withText']=!0x0,_0x4e53d['class']='ck-button-action',_0x4e53d['on']('execute',()=>{this['fire']('retry');}),_0x4e53d['bind']('isVisible')['to'](this,'errorType',_0xad4d67=>'NotFound'!==_0xad4d67);const _0x52a0f5=new _0x3f7b31();_0x52a0f5['content']=_0x1cd0c4,_0x52a0f5['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x290c93=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':[_0x52a0f5,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x290c93['to']('errorType',_0x109337=>t('NotFound'!==_0x109337?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4e53d]},{'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 _0x12e055{constructor(_0x2592ad,_0x219206){super(_0x2592ad);const _0xbf03b8=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x219206,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0xbf03b8['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x823bbe,_0x5db6cc,_0x1373df){super(_0x823bbe),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x823bbe),this['_errorView']=new Z(_0x823bbe),this['_editingView']=new Q(_0x823bbe,_0x1373df),this['_focusableView']=new _0x12e055(_0x823bbe),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x5db6cc),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'],_0x460e7e=>{this['_addUploadcareImageEditorListeners'](_0x460e7e);});}),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'](_0xd31e9b,_0x5641cb){const _0x1037d2='uc-cloud-image-editor',_0x28c93b=_0xd31e9b['querySelector'](_0x1037d2);if(_0x28c93b)return _0x5641cb(_0x28c93b);const _0x39ef9d=new MutationObserver(_0x225e33=>{const _0xd7efa6=_0x225e33['filter'](_0x345d60=>_0x345d60['target']===_0xd31e9b&&_0x345d60['addedNodes']['length']>0x0&&_0x345d60['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x1037d2);_0xd7efa6['length']&&(_0x39ef9d['disconnect'](),_0x5641cb(_0xd7efa6[0x0]['addedNodes'][0x0]));});_0x39ef9d['observe'](_0xd31e9b,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x2896a6){_0x2896a6['addEventListener']('apply',_0x1e4bc5=>{this['fire']('apply',{'imageSrc':_0x1e4bc5['detail']['cdnUrl']});}),_0x2896a6['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x9f08b1(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x42e5f8,_0x506ed7,_0x455ba4){super(),this['_editor']=_0x42e5f8,this['_dialog']=_0x506ed7,this['_imageElement']=_0x455ba4,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 _0x34a126=this['_imageElement'],_0x52d76e=_0x34a126['getAttribute']('uploadcareImageId'),_0x2c6f0d=_0x34a126['getAttribute']('src');if(_0x52d76e)await this['_loadImageInfo'](_0x52d76e,_0x2c6f0d);else{if(this['_imageCache']['has'](_0x2c6f0d)){const _0x192c89=this['_imageCache']['get'](_0x2c6f0d);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x192c89['url'],this['imageDimension']=_0x192c89['dimension'],this['imageId']=_0x192c89['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x520de7}=this['_editor'],t=_0x520de7['t'],_0x1dbd1e=new X(_0x520de7,this['imageStatus'],this['_attributes']);_0x1dbd1e['bind']('status')['to'](this,'imageStatus'),_0x1dbd1e['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1dbd1e['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1dbd1e['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1dbd1e,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x14ca36,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1dbd1e,'position':_0x4f83bd['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1dbd1e['focus']();},'onHide':()=>{_0x1dbd1e['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xe5c790=>!V(_0xe5c790,_0x1dbd1e['element'])}});}['_loadImageInfo'](_0x53daca,_0x5ef166){return q['getInfo'](_0x53daca,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x495aab=>{const {width:_0x4d68a9,height:_0xd2cd70}=_0x495aab['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5ef166,this['imageDimension']={'width':_0x4d68a9,'height':_0xd2cd70},this['imageId']=_0x53daca;})['catch'](_0x214bf9=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x214bf9['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x200c3c,_0xe2e39d){return this['_getImageAsFile'](_0x200c3c)['then'](_0xd9ab11=>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':_0xe2e39d['signal'],'file':_0xd9ab11,'onProgress':_0x2e1b08=>{_0x2e1b08&&_0x2e1b08['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2e1b08['value']));}}))['then'](_0x2d47ad=>{const {width:_0x1e736d,height:_0x1762c3}=_0x2d47ad['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2d47ad['cdnUrl'],this['imageDimension']={'width':_0x1e736d,'height':_0x1762c3},this['imageId']=_0x2d47ad['uuid'],this['imageUploadProgress']=null;const _0x5476fb=_0x200c3c['getAttribute']('src');this['_imageCache']['set'](_0x5476fb,{'id':_0x2d47ad['uuid'],'url':_0x2d47ad['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x465d7b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x465d7b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1f8b9f,_0x1ef8cd){_0x1f8b9f['on']('apply',(_0x1a4cf3,_0x5aa79e)=>{this['_replaceImage'](_0x1ef8cd,_0x5aa79e['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1f8b9f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1f8b9f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1aa763,_0x2ba778,_0x3b416e){const _0x54da66=this['_editor'],{width:_0x2587f6,height:_0x375dd7}=F(_0x2ba778,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x16406b,imageSources:_0x2ab8a8}=D(_0x2ba778,_0x2587f6);_0x54da66['model']['change'](_0x3d36d5=>{if('$graveyard'===_0x1aa763['root']['rootName']){_0x54da66['execute']('insertImage',{'imageType':_0x1aa763['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1aa763['getAttributes']()),'uploadcareImageId':_0x3b416e,'src':_0x16406b,'sources':_0x2ab8a8,'width':_0x2587f6,'height':_0x375dd7}});const _0x6547a9=_0x1aa763['getChildren']();_0x1aa763=_0x54da66['model']['document']['selection']['getSelectedElement']();for(const _0x2a7038 of _0x6547a9)_0x3d36d5['append'](_0x3d36d5['cloneElement'](_0x2a7038),_0x1aa763);}else _0x3d36d5['setSelection'](_0x1aa763,'on'),_0x54da66['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1aa763['getAttributes']()),'uploadcareImageId':_0x3b416e,'src':_0x16406b,'sources':_0x2ab8a8,'width':_0x2587f6,'height':_0x375dd7},_0x1aa763);_0x3d36d5['setSelection'](_0x1aa763,'on');});}async['_getImageAsFile'](_0x2e0d66){const _0x258c34=_0x18328e['window'],_0x20e7d1=_0x18328e['document']['location']['href'],_0x2efa47=new _0x258c34['URL'](_0x2e0d66['getAttribute']('src'),_0x20e7d1);if('data:'===_0x2efa47['protocol']){const _0x384445=_0x2efa47['href']['split'](','),_0x4d053a=_0x384445[0x0]['match'](/:(.*?);/)[0x1],_0x3ade5e=_0x4d053a['split']('/')[0x1],_0x180a1c=_0x258c34['atob'](_0x384445[_0x384445['length']-0x1]);let _0x393d9b=_0x180a1c['length'];const _0x142f28=new _0x258c34['Uint8Array'](_0x393d9b);for(;_0x393d9b--;)_0x142f28[_0x393d9b]=_0x180a1c['charCodeAt'](_0x393d9b);return new _0x258c34['File']([_0x142f28],'image.'+_0x3ade5e,{'type':_0x4d053a});}const _0x43b778=_0x2efa47['href']['split']('/'),_0xea24af=_0x43b778[_0x43b778['length']-0x1],_0x548593=_0xea24af['split']('.')[0x1];return _0x258c34['fetch'](_0x2efa47['href'])['then'](_0x47bfc6=>_0x47bfc6['clone']()['blob']())['then'](_0x59f36b=>new _0x258c34['File']([_0x59f36b],_0xea24af,{'type':'image/'+_0x548593}));}}class tt extends _0x340173{['imageEditController'];static get['requires'](){return[_0x58e17d];}['_isEditable'];constructor(_0x53c05d){super(_0x53c05d),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x99d9da){const _0x2d04e1=B(_0x99d9da);return _0x3fcae4=>!(!_0x3fcae4||!_0x3fcae4['is']('element','imageBlock')&&!_0x3fcae4['is']('element','imageInline'))&&(!!_0x3fcae4['hasAttribute']('uploadcareImageId')||!!_0x3fcae4['hasAttribute']('src')&&_0x2d04e1(_0x3fcae4['getAttribute']('src')));}(_0x53c05d['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x4c3e1a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x4c3e1a);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x432188=this['editor']['model']['document']['selection']['getSelectedElement']();_0x432188&&(_0x432188['is']('element','imageBlock')||_0x432188['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x58e17d),_0x432188),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x340173{['refresh'](){const _0x3e2746=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x3e2746&&(_0x3e2746['is']('element','imageBlock')||_0x3e2746['is']('element','imageInline')));}['execute'](_0x16b783){const _0x52da00=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x13400a=>{_0x13400a['setAttributes'](_0x16b783,_0x52da00),_0x13400a['removeAttribute']('srcset',_0x52da00),_0x13400a['removeAttribute']('sizes',_0x52da00);});}}class it extends _0x563d32{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x5df520,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2e44e0}=this;_0x2e44e0['commands']['add']('uploadcareImageEdit',new tt(_0x2e44e0)),_0x2e44e0['commands']['add']('uploadcareImageReplace',new et(_0x2e44e0));}}class st extends _0x563d32{['_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 _0x5b558c=this['editor'];_0x5b558c['ui']['componentFactory']['add']('uploadcareImageEdit',_0x34883e=>{const _0x3793cf=_0x5b558c['commands']['get']('uploadcareImageEdit'),_0x327853=new _0xc28d4f(_0x34883e),t=_0x34883e['t'];return _0x327853['set']({'icon':_0x14ca36,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x327853['bind']('isEnabled')['to'](_0x3793cf),_0x327853['bind']('isOn')['to'](_0x3793cf,'isActive'),this['listenTo'](_0x327853,'execute',()=>{_0x5b558c['execute']('uploadcareImageEdit'),_0x5b558c['editing']['view']['focus']();}),_0x327853;}),this['_initConfig']();}['_initConfig'](){const _0x3b0638=_0x3f310(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x3b0638),this['listenTo'](this['editor'],'destroy',()=>{_0x3b0638['remove']();});}}class nt extends _0x563d32{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,A as UploadcareUI,W as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x43a80a,Command as _0x266ed1}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x522601,IconGooglePhotos as _0x2d1b05,IconGoogleDrive as _0x5566cc,IconFacebook as _0x3c317a,IconDropbox as _0x767df9,IconUploadcareLink as _0x1f0729,IconUploadcareImageUpload as _0x382adf,IconError as _0x201453,IconUploadcareImageEdit as _0x21e4e7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x368b04,MenuBarMenuListItemButtonView as _0x186265,View as _0x49d1b2,FocusCycler as _0x3e1069,Dialog as _0x1166b4,DialogViewPosition as _0x26d088,SpinnerView as _0x553ae1,IconView as _0xc96a27,Notification as _0x529d3d}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x56b82b,DomEmitterMixin as _0x10168a,global as _0x4d2ea8,getAncestors as _0x5d1ff3,ObservableMixin as _0x111ee7,uid as _0x39e3cb,createElement as _0x1177a3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x89b2c7}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x1addbc,info as _0x40a904}from'@uploadcare/upload-client';import*as _0xdc4c4e from'@uploadcare/file-uploader';var S=function(_0x46b600){return _0x46b600['Local']='local',_0x46b600['URL']='url',_0x46b600['Dropbox']='dropbox',_0x46b600['GDrive']='gdrive',_0x46b600['Facebook']='facebook',_0x46b600['GPhotos']='gphotos',_0x46b600['OneDrive']='onedrive',_0x46b600;}({});function T(_0x2bdb53,_0x4cc6ea,_0x3b23bd){const t=_0x2bdb53['t'],_0x4d8cf8=_0x2bdb53['t'];switch(_0x4cc6ea){case S['Local']:return{'text':_0x4d8cf8('Insert'===_0x3b23bd?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4d8cf8('From\x20computer')};case S['URL']:return{'text':'Insert'===_0x3b23bd?_0x4d8cf8('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4d8cf8('Via\x20URL')};case S['Dropbox']:return{'text':t('Insert'===_0x3b23bd?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case S['Facebook']:return{'text':t('Insert'===_0x3b23bd?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case S['GDrive']:return{'text':t('Insert'===_0x3b23bd?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case S['GPhotos']:return{'text':t('Insert'===_0x3b23bd?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case S['OneDrive']:return{'text':t('Insert'===_0x3b23bd?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x4cc6ea;}}class A extends _0x43a80a{['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 _0x2a6273=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x8d488e;for(const _0x176cbb in _0x2a6273){const _0xe8d0f7=_0x176cbb,_0x378bcd=_0x2a6273[_0xe8d0f7];if('uploadcareLicenseKeyValid'==_0x378bcd||'uploadcareLicenseKeyInvalid'==_0x378bcd||'uploadcareLicenseKeyExpired'==_0x378bcd||'uploadcareLicenseKeyDomainLimit'==_0x378bcd||'uploadcareLicenseKeyNotAllowed'==_0x378bcd||'uploadcareLicenseKeyEvaluationLimit'==_0x378bcd||'uploadcareLicenseKeyUsageLimit'==_0x378bcd){delete _0x2a6273[_0xe8d0f7],_0x8d488e=_0x378bcd,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x8d488e&&_0x2a6273['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x8d488e&&_0x2a6273['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x8d488e&&_0x2a6273['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x8d488e&&_0x2a6273['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x8d488e&&_0x2a6273['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyUsageLimit'==_0x8d488e&&_0x2a6273['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x4ac027}=this,_0xaed97b=_0x4ac027['commands']['get']('uploadcare');if(!_0xaed97b)return;const _0x58895f=this['_normalizeConfigSourceList'](_0x4ac027['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x860605,_0x315cbf)=>{const _0x297ae3=this['_getIntegrationKey'](_0x315cbf['type']);return _0x860605[_0x297ae3]||(_0x860605[_0x297ae3]=[]),_0x860605[_0x297ae3]['push'](_0x315cbf),_0x860605;},{});_0x4ac027['plugins']['has']('ImageInsertUI')&&_0x4ac027['commands']['get']('uploadcare')&&Object['entries'](_0x58895f)['forEach'](([_0x2da114,_0x2ac08e])=>{_0x4ac027['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x2da114,'observable':()=>_0xaed97b,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2ac08e),'formViewCreator':()=>this['_createDropdownButtons'](_0x2ac08e),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2ac08e),'override':'assetManager'!==_0x2da114});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x434670){const {locale:_0x2481f4}=this['editor'];return _0x434670['map'](_0x317dfc=>{const _0x4cd033=T(_0x2481f4,_0x317dfc,'Insert');switch(_0x317dfc){case S['Local']:return{'icon':_0x382adf,'type':S['Local'],..._0x4cd033};case S['URL']:return{'icon':_0x1f0729,'type':S['URL'],..._0x4cd033};case S['Dropbox']:return{'icon':_0x767df9,'type':S['Dropbox'],..._0x4cd033};case S['Facebook']:return{'icon':_0x3c317a,'type':S['Facebook'],..._0x4cd033};case S['GDrive']:return{'icon':_0x5566cc,'type':S['GDrive'],..._0x4cd033};case S['GPhotos']:return{'icon':_0x2d1b05,'type':S['GPhotos'],..._0x4cd033};case S['OneDrive']:return{'icon':_0x522601,'type':S['OneDrive'],..._0x4cd033};}});}['_getIntegrationKey'](_0x3bf34b){switch(_0x3bf34b){case S['Local']:return'upload';case S['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x5e18f9,_0x4bdcb0){const _0x6e315a=this['editor'],_0x681ea5=new _0x5e18f9(_0x6e315a['locale']),_0xd3191b=_0x6e315a['commands']['get']('uploadcare');return _0x681ea5['bind']('isEnabled')['to'](_0xd3191b),_0x681ea5['on']('execute',()=>{_0xd3191b['execute'](_0x4bdcb0);}),_0x681ea5;}['_createToolbarButton'](_0x453077){const {locale:_0x5f4479}=this['editor'],_0x36ece6=this['editor']['plugins']['get']('ImageInsertUI'),_0x1d4af2=_0x453077[0x0],_0x1d03d7=this['_createButton'](_0x368b04,_0x1d4af2['type']);return _0x1d03d7['icon']=_0x1d4af2['icon'],_0x1d03d7['bind']('label')['to'](_0x36ece6,'isImageSelected',_0x3f9d25=>T(_0x5f4479,_0x1d4af2['type'],_0x3f9d25?'Replace':'Insert')['text']),_0x1d03d7['tooltip']=!0x0,_0x1d03d7;}['_createDropdownButtons'](_0x3882de){const {locale:_0x49231f}=this['editor'],_0x47a5e8=this['editor']['plugins']['get']('ImageInsertUI');return _0x3882de['map'](_0x46f803=>{const _0x10bc02=this['_createButton'](_0x368b04,_0x46f803['type']);return _0x10bc02['withText']=!0x0,_0x10bc02['icon']=_0x46f803['icon'],_0x10bc02['bind']('label')['to'](_0x47a5e8,'isImageSelected',_0x5dc62d=>T(_0x49231f,_0x46f803['type'],_0x5dc62d?'Replace':'Insert')['text']),_0x10bc02;});}['_createMenuBarButtons'](_0xa215ca){return _0xa215ca['map'](_0x487b6d=>{const _0x126e3b=this['_createButton'](_0x186265,_0x487b6d['type']);return _0x126e3b['icon']=_0x487b6d['icon'],_0x126e3b['label']=_0x487b6d['shortText'],_0x126e3b;});}}class K extends _0x49d1b2{['focusTracker'];['focusCycler'];constructor(_0x2ed684){super(_0x2ed684),this['focusTracker']=new _0x56b82b(),this['focusCycler']=new _0x3e1069({'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 K{constructor(_0x1485da,_0x4ed195){super(_0x1485da),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-'+_0x4ed195}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function D(_0x25c487,_0x289157){const _0x1fc26e=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x1ba9ca=>_0x1ba9ca<=_0x289157)['map'](_0x5426ee=>_0x25c487['replace'](/\/$/,'')+'/-/resize/'+_0x5426ee+'x/\x20'+_0x5426ee+'w');return{'imageFallbackUrl':_0x25c487,'imageSources':[{'srcset':_0x1fc26e['join'](',\x20'),'sizes':'(max-width:\x20'+_0x289157+'px)\x20100vw,\x20'+_0x289157+'px','type':'image/webp'}]};}function F(_0x403e70,_0x4a1e84,_0x3d05de){const _0xf33e8=_0x403e70['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0xf33e8?parseInt(_0xf33e8[0x1],0xa):_0x4a1e84,'height':_0xf33e8?parseInt(_0xf33e8[0x2],0xa):_0x3d05de};}function $(_0x4ebabb,_0x37b3ad){const _0x1eeb37=new(_0x10168a())(),_0x3bacec=_0x4ebabb['plugins']['get']('ImageUtils'),_0x4b5e66=_0x4ebabb['editing']['mapper']['toViewElement'](_0x37b3ad),_0xdd603a=_0x3bacec['findViewImgElement'](_0x4b5e66),_0x1e3277=_0x4ebabb['editing']['view']['domConverter']['viewToDom'](_0xdd603a),_0x2dfd1c=_0x37b3ad['getAttribute']('width'),_0x19763c=_0x37b3ad['getAttribute']('height'),_0x251194='image-processing';_0x4ebabb['editing']['view']['change'](_0x1580f4=>{_0x1580f4['addClass'](_0x251194,_0x4b5e66),_0x1580f4['setStyle']('aspect-ratio',_0x2dfd1c+'/'+_0x19763c,_0xdd603a);}),_0x1eeb37['listenTo'](_0x1e3277,'load',()=>{_0x1eeb37['stopListening'](_0x1e3277,'load'),_0x4ebabb['editing']['view']['change'](_0x113b90=>{_0x113b90['removeClass'](_0x251194,_0x4b5e66),_0x113b90['removeStyle']('aspect-ratio',_0xdd603a);});});}function B(_0x2d7841){if(Array['isArray'](_0x2d7841)){const _0x4d8257=_0x2d7841['map'](B);return _0x2c20e7=>_0x4d8257['some'](_0x3ebef0=>_0x3ebef0(_0x2c20e7));}if('origin'==_0x2d7841){const _0x4ce9be=_0x4d2ea8['window']['location']['origin'];return _0x375b49=>new URL(_0x375b49,_0x4d2ea8['document']['baseURI'])['origin']==_0x4ce9be;}return'function'==typeof _0x2d7841?_0x2d7841:_0x2d7841 instanceof RegExp?_0x39c3f5=>!(!_0x39c3f5['match'](_0x2d7841)&&!_0x39c3f5['replace'](/^https?:\/\//,'')['match'](_0x2d7841)):()=>!0x1;}function V(_0x3e34f4,_0x31d5da){return _0x5d1ff3(_0x3e34f4['target'])['includes'](_0x31d5da);}class j extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x111ee7(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x3c6ca9,_0x5d9eb2,_0x533693){super(),this['_editor']=_0x3c6ca9,this['_editing']=_0x5d9eb2,this['_dialog']=_0x3c6ca9['plugins']['get'](_0x1166b4),this['_api']=_0x5d9eb2['ctxElement']['getAPI'](),this['_type']=_0x533693,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:_0x413ab2,model:_0x203f2d}=this['_editor'],_0x1f205c=_0x203f2d['document']['selection']['getSelectedElement'](),_0x26472f=_0x1f205c&&(_0x1f205c['is']('element','imageBlock')||_0x1f205c['is']('element','imageInline'));this['_formView']=new O(_0x413ab2,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x382adf,'title':T(_0x413ab2,this['_type'],_0x26472f?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x26d088['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x2b8ba9=>!V(_0x2b8ba9,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x4a71f5}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x49cb70=>{const _0x57e773=_0x4a71f5['length'];for(const _0x3232a4 of _0x4a71f5){const _0x326d07=_0x3232a4===_0x4a71f5[_0x57e773-0x1],{cdnUrl:_0x35a8b4,fileInfo:_0x29b619}=_0x3232a4;if(!_0x35a8b4||!_0x29b619)continue;const {width:_0x1b0b95,height:_0x18eb7e}=_0x29b619['imageInfo'],_0x4783d1=F(_0x35a8b4,_0x1b0b95,_0x18eb7e),_0x5e2b5f=D(_0x35a8b4,_0x4783d1['width']),_0x4f8b3f={'id':_0x29b619['uuid'],'type':'image','attributes':{'imageDimension':_0x4783d1,..._0x5e2b5f}};this['_insertAsset'](_0x4f8b3f,_0x326d07,_0x49cb70);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x262408=>{'idle'===_0x262408['detail']['status']&&!_0x262408['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===S['Local']?this['_api']['setCurrentActivity'](S['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4d7d1a,_0x5bdeec,_0xc457f5){const _0x1588ca=this['_editor']['model']['document']['selection'],_0x4a0aab=_0x1588ca['getSelectedElement'](),_0x2a8868=!(!_0x4a0aab||!_0x4a0aab['is']('element','imageInline'));_0xc457f5['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4d7d1a,_0x2a8868),_0x5bdeec||_0xc457f5['setSelection'](_0x1588ca['getLastPosition']());}['_insertImage'](_0x59d7d4,_0x3d0e02){const _0x1ebf22=this['_editor'],{imageDimension:_0x59d172,imageFallbackUrl:_0x189a26,imageSources:_0x5bf2b9}=_0x59d7d4['attributes'];_0x1ebf22['execute']('insertImage',{'imageType':_0x3d0e02?'imageInline':null,'source':{'uploadcareImageId':_0x59d7d4['id'],'src':_0x189a26,'sources':_0x5bf2b9,..._0x59d172}});}}class M extends _0x266ed1{['_editing'];['_controller']=null;static get['requires'](){return[_0x1166b4,z];}constructor(_0x5066f8){super(_0x5066f8),this['_editing']=_0x5066f8['plugins']['get'](z);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x12c404){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new j(this['editor'],this['_editing'],_0x12c404);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class q{static['upload']({file:_0x496ea3,..._0x3865a6}){return _0x1addbc(_0x496ea3,_0x3865a6);}static['getInfo'](_0x7a12ba,_0x857359){return _0x40a904(_0x7a12ba,_0x857359);}}class W extends _0x43a80a{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x89b2c7,z];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x22a1f0=this['editor'];if(!!!_0x22a1f0['config']['get']('uploadcare'))return;_0x22a1f0['plugins']['get'](_0x89b2c7)['createUploadAdapter']=_0x36b56f=>new G(_0x36b56f,_0x22a1f0),_0x22a1f0['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x347a3f,{imageElement:_0x1d476a,data:_0x2e1245})=>{_0x22a1f0['model']['change'](_0x4f4601=>{_0x4f4601['setAttribute']('uploadcareImageId',_0x2e1245['uploadcareImageId'],_0x1d476a);});});}}class G{['loader'];['editor'];['controller'];constructor(_0x34e89c,_0x6f96bc){this['loader']=_0x34e89c,this['editor']=_0x6f96bc,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x59fd66=await this['loader']['file'];return q['upload']({'file':_0x59fd66,'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':_0x3bcd49=>{_0x3bcd49&&_0x3bcd49['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x3bcd49['value']);}})['then'](async _0x309299=>{const {imageFallbackUrl:_0x1f4718,imageSources:_0x1c1951}=D(_0x309299['cdnUrl'],_0x309299['imageInfo']['width']);return{'uploadcareImageId':_0x309299['uuid'],'default':_0x1f4718,'sources':_0x1c1951};})['catch'](()=>{const _0x4cd04b=t('Cannot\x20upload\x20file:')+('\x20'+_0x59fd66['name']+'.');return Promise['reject'](_0x4cd04b);});}['abort'](){this['controller']['abort']();}}class z extends _0x43a80a{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',W,_0x1166b4];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0xf8782f){super(_0xf8782f),this['ucContextId']=_0x39e3cb();}['init'](){const _0x2a47f0=this['editor'];_0x2a47f0['commands']['add']('uploadcare',new M(_0x2a47f0));}['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 _0x5e3b02=_0x4d2ea8['document']['querySelector']('input[uploadcare-file-input]');_0x5e3b02&&_0x5e3b02['remove']();}),async function(_0x5b0403){const _0x4527b4=_0x18049f([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]),_0x350e94=0x535f8c3a,_0x2f393d=0x5358f26a^_0x350e94,_0x3dc3ce=window[_0x18049f([0x44,0x61,0x74,0x65])][_0x18049f([0x6e,0x6f,0x77])](),_0xe6cc83=_0x5b0403[_0x18049f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x191ff7=new window[(_0x18049f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1bed36=>{_0xe6cc83[_0x18049f([0x6f,0x6e,0x63,0x65])](_0x18049f([0x72,0x65,0x61,0x64,0x79]),_0x1bed36);}),_0x2089b6={[_0x18049f([0x6b,0x74,0x79])]:_0x18049f([0x45,0x43]),[_0x18049f([0x75,0x73,0x65])]:_0x18049f([0x73,0x69,0x67]),[_0x18049f([0x63,0x72,0x76])]:_0x18049f([0x50,0x2d,0x32,0x35,0x36]),[_0x18049f([0x78])]:_0x18049f([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]),[_0x18049f([0x79])]:_0x18049f([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]),[_0x18049f([0x61,0x6c,0x67])]:_0x18049f([0x45,0x53,0x32,0x35,0x36])},_0xa3b7cb=_0xe6cc83[_0x18049f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x18049f([0x67,0x65,0x74])](_0x18049f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xa24df5(){let _0x45db9f,_0x4c3f53=null,_0x115842=null;try{if(_0xa3b7cb==_0x18049f([0x47,0x50,0x4c]))return _0x18049f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x45db9f=_0x1e533d(),!_0x45db9f)return _0x18049f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x45db9f[_0x18049f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x115842=_0x2b3674(_0x45db9f[_0x18049f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x45db9f[_0x18049f([0x6a,0x74,0x69])])),await _0x4bda2c()?_0x2686fe()?_0x37197a()?_0x18049f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2b5056()?(_0x45db9f[_0x18049f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18049f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4c3f53=_0x42859e(_0x18049f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x479745()):_0x18049f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x18049f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x18049f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x18049f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x37197a(){const _0x739de8=[_0x18049f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x18049f([0x74,0x72,0x69,0x61,0x6c])][_0x18049f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45db9f[_0x18049f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3dc3ce/0x3e8:0xe10*_0x2f393d;return _0x45db9f[_0x18049f([0x65,0x78,0x70])]<_0x739de8;}function _0x2686fe(){const _0x3254df=_0x45db9f[_0x18049f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3254df&&(!!_0x3254df[_0x18049f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18049f([0x2a]))||!!_0x3254df[_0x18049f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18049f([0x55,0x50,0x4c,0x43])));}function _0x2b5056(){const _0x13f09a=_0x45db9f[_0x18049f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x13f09a||0x0==_0x13f09a[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1b9f2d}=new URL(window[_0x18049f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x13f09a[_0x18049f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1b9f2d))return!0x0;const _0x2bb5a6=_0x1b9f2d[_0x18049f([0x73,0x70,0x6c,0x69,0x74])](_0x18049f([0x2e]));return _0x13f09a[_0x18049f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x14ae63=>_0x14ae63[_0x18049f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18049f([0x2a])))[_0x18049f([0x6d,0x61,0x70])](_0x349a2c=>_0x349a2c[_0x18049f([0x73,0x70,0x6c,0x69,0x74])](_0x18049f([0x2e])))[_0x18049f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x433457=>_0x433457[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2bb5a6[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18049f([0x6d,0x61,0x70])](_0x1b8818=>Array(_0x2bb5a6[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1b8818[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18049f([0x66,0x69,0x6c,0x6c])](_0x1b8818[0x0]===_0x18049f([0x2a])?_0x18049f([0x2a]):'')[_0x18049f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1b8818))[_0x18049f([0x73,0x6f,0x6d,0x65])](_0x5ba467=>_0x2bb5a6[_0x18049f([0x65,0x76,0x65,0x72,0x79])]((_0x2658e7,_0x1ad073)=>_0x5ba467[_0x1ad073]===_0x2658e7||_0x5ba467[_0x1ad073]===_0x18049f([0x2a])));}function _0x479745(){return _0x4c3f53&&_0x115842?new window[(_0x18049f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3b0eeb,_0x5c3f39)=>{_0x4c3f53[_0x18049f([0x74,0x68,0x65,0x6e])](_0x3b0eeb,_0x5c3f39),_0x115842[_0x18049f([0x74,0x68,0x65,0x6e])](_0x124ac8=>{_0x124ac8!=_0x18049f([0x56,0x61,0x6c,0x69,0x64])&&_0x3b0eeb(_0x124ac8);},_0x5c3f39);}):_0x4c3f53||_0x115842||_0x18049f([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2b3674(_0x2abecb,_0xf48b54){return new window[(_0x18049f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c8ed9=>{if(_0x3f0bc2())return _0x4c8ed9(_0x18049f([0x56,0x61,0x6c,0x69,0x64]));_0x422ae0(),_0xe6cc83[_0x18049f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x18049f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3fb5a7=!0x1;const _0x236abb=_0x39e3cb();function _0x3067d0(_0x504969){return!!_0x504969&&(typeof _0x504969===_0x18049f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x504969===_0x18049f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x504969[_0x18049f([0x74,0x68,0x65,0x6e])]===_0x18049f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x504969[_0x18049f([0x63,0x61,0x74,0x63,0x68])]===_0x18049f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x38e182(_0xe7369a){_0x2e976c(_0xe7369a)[_0x18049f([0x74,0x68,0x65,0x6e])](_0x3795c7=>{if(!_0x3795c7||_0x3795c7[_0x18049f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x18049f([0x6f,0x6b]))return _0x18049f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x51c18c(_0x164520(_0x236abb+_0xf48b54))!=_0x3795c7[_0x18049f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x18049f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x18049f([0x56,0x61,0x6c,0x69,0x64]);})[_0x18049f([0x74,0x68,0x65,0x6e])](_0x3b84c4=>(_0x428112(),_0x3b84c4),()=>{const _0x251190=_0x203d1b();return null==_0x251190?(_0x428112(),_0x18049f([0x56,0x61,0x6c,0x69,0x64])):_0x18049f(_0x3dc3ce-_0x251190>(0x7753083a^_0x350e94)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x18049f([0x74,0x68,0x65,0x6e])](_0x4c8ed9)[_0x18049f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4c8ed9(_0x18049f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x37cfd4=0x536962ba^_0x350e94;function _0x428112(){const _0x1cbf95=_0x18049f([0x6c,0x6c,0x63,0x74,0x2d])+_0x51c18c(_0x164520(_0x2abecb)),_0x211b55=_0xe0a273(_0x51c18c(window[_0x18049f([0x4d,0x61,0x74,0x68])][_0x18049f([0x63,0x65,0x69,0x6c])](_0x3dc3ce/_0x37cfd4)));window[_0x18049f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18049f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1cbf95,_0x211b55);}function _0x203d1b(){const _0x29124e=_0x18049f([0x6c,0x6c,0x63,0x74,0x2d])+_0x51c18c(_0x164520(_0x2abecb)),_0x31bfdc=window[_0x18049f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18049f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x29124e);return _0x31bfdc?window[_0x18049f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xe0a273(_0x31bfdc),0x10)*_0x37cfd4:null;}function _0x2e976c(_0x45a303){return new window[(_0x18049f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x200e07,_0x5ab507)=>{_0x45a303[_0x18049f([0x74,0x68,0x65,0x6e])](_0x200e07,_0x5ab507),window[_0x18049f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5ab507,0x535e58fa^_0x350e94);});}}_0xe6cc83[_0x18049f([0x6f,0x6e])](_0x18049f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5044e6,_0x3d367b)=>{if(_0x3d367b[0x0]!=_0x2abecb)return _0x4c8ed9(_0x18049f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3d367b[0x1]={..._0x3d367b[0x1],[_0x18049f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x236abb};},{[_0x18049f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18049f([0x68,0x69,0x67,0x68])}),_0xe6cc83[_0x18049f([0x6f,0x6e])](_0x18049f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x227c00=>{_0x3067d0(_0x227c00[_0x18049f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3fb5a7=!0x0,_0x38e182(_0x227c00[_0x18049f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x18049f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18049f([0x6c,0x6f,0x77])}),_0x191ff7[_0x18049f([0x74,0x68,0x65,0x6e])](()=>{_0x3fb5a7||_0x4c8ed9(_0x18049f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3f0bc2(){return _0xe6cc83[_0x18049f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18049f([0x76,0x69,0x65,0x77])][_0x18049f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x18049f([0x61,0x75,0x74,0x6f]);}function _0x422ae0(){_0xe6cc83[_0x18049f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18049f([0x76,0x69,0x65,0x77])][_0x18049f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x18049f([0x61,0x75,0x74,0x6f]);}}function _0x42859e(_0xc39ebc){const _0x376779=[new window[(_0x18049f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47fd03=>setTimeout(_0x47fd03,0x5356b2f6^_0x350e94)),_0x191ff7[_0x18049f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x18049f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ae68c=>{let _0x54f2a2=0x0;_0xe6cc83[_0x18049f([0x6d,0x6f,0x64,0x65,0x6c])][_0x18049f([0x6f,0x6e])](_0x18049f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4a226b,_0x2d700a)=>{_0x2d700a[0x0][_0x18049f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x54f2a2++,_0x54f2a2==(0x535f89d2^_0x350e94)&&(_0x3ae68c(),_0x4a226b[_0x18049f([0x6f,0x66,0x66])]());});}))];return window[_0x18049f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x18049f([0x72,0x61,0x63,0x65])](_0x376779)[_0x18049f([0x74,0x68,0x65,0x6e])](()=>_0xc39ebc);}async function _0x295822(){await _0x191ff7,_0xe6cc83[_0x18049f([0x6d,0x6f,0x64,0x65,0x6c])][_0x18049f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x141357,_0xe6cc83[_0x18049f([0x6d,0x6f,0x64,0x65,0x6c])][_0x18049f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x141357,_0xe6cc83[_0x18049f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x18049f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xf08c80(_0x46f5d4){const _0x50303b=_0x3c0090();_0xe6cc83[_0x50303b]=_0x18049f([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x46f5d4,_0x46f5d4!=_0x18049f([0x56,0x61,0x6c,0x69,0x64])&&_0x295822();}function _0x3c0090(){const _0x139d5b=window[_0x18049f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x18049f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x18049f([0x6e,0x6f,0x77])]())[_0x18049f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x18049f([0x2e]),'');let _0x56e401=_0x18049f([0x68]);for(let _0x4391bf=0x0;_0x4391bf<_0x139d5b[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4391bf+=0x2){let _0x1f97af=window[_0x18049f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x139d5b[_0x18049f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4391bf,_0x4391bf+0x2));_0x1f97af>=_0x4527b4[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1f97af-=_0x4527b4[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x56e401+=_0x4527b4[_0x1f97af];}return _0x56e401;}function _0x1e533d(){const _0x5d0f62=_0xa3b7cb[_0x18049f([0x73,0x70,0x6c,0x69,0x74])](_0x18049f([0x2e]));if(0x3!=_0x5d0f62[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4373db(_0x5d0f62[0x1]);function _0x4373db(_0x157d5a){const _0x1007e4=_0x3e6e92(_0x157d5a);return _0x1007e4&&_0x84a096()?_0x1007e4:null;function _0x84a096(){const _0x15b7e4=_0x1007e4[_0x18049f([0x6a,0x74,0x69])],_0x247f6b=window[_0x18049f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15b7e4[_0x18049f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x15b7e4[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3dbd91={..._0x1007e4,[_0x18049f([0x6a,0x74,0x69])]:_0x15b7e4[_0x18049f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x15b7e4[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3dbd91[_0x18049f([0x76,0x63])],_0x164520(_0x3dbd91)==_0x247f6b;}}}async function _0x4bda2c(){let _0x13d0b9=!0x0;try{const _0x51acd2=_0xa3b7cb[_0x18049f([0x73,0x70,0x6c,0x69,0x74])](_0x18049f([0x2e])),[_0x5f0301,_0x1f566a,_0x28c3f1]=_0x51acd2;return _0x3bb105(_0x5f0301),await _0x48f6c0(_0x5f0301,_0x1f566a,_0x28c3f1),_0x13d0b9;}catch{return!0x1;}function _0x3bb105(_0x521162){const _0x442c1e=_0x3e6e92(_0x521162);_0x442c1e&&_0x442c1e[_0x18049f([0x61,0x6c,0x67])]==_0x18049f([0x45,0x53,0x32,0x35,0x36])||(_0x13d0b9=!0x1);}async function _0x48f6c0(_0x392199,_0x2a9d33,_0x2ceb2f){const _0x377190=window[_0x18049f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x18049f([0x66,0x72,0x6f,0x6d])](_0x1d54ff(_0x2ceb2f),_0x25967c=>_0x25967c[_0x18049f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x572dfb=new window[(_0x18049f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x18049f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x392199+_0x18049f([0x2e])+_0x2a9d33),_0x2219c6=window[_0x18049f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x18049f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2219c6)return;const _0xbecfac=await _0x2219c6[_0x18049f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x18049f([0x6a,0x77,0x6b]),_0x2089b6,{[_0x18049f([0x6e,0x61,0x6d,0x65])]:_0x18049f([0x45,0x43,0x44,0x53,0x41]),[_0x18049f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x18049f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x18049f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2219c6[_0x18049f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x18049f([0x6e,0x61,0x6d,0x65])]:_0x18049f([0x45,0x43,0x44,0x53,0x41]),[_0x18049f([0x68,0x61,0x73,0x68])]:{[_0x18049f([0x6e,0x61,0x6d,0x65])]:_0x18049f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xbecfac,_0x377190,_0x572dfb)||(_0x13d0b9=!0x1);}}function _0x3e6e92(_0x119783){return _0x119783[_0x18049f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x18049f([0x65,0x79]))?JSON[_0x18049f([0x70,0x61,0x72,0x73,0x65])](_0x1d54ff(_0x119783)):null;}function _0x1d54ff(_0x305cac){return window[_0x18049f([0x61,0x74,0x6f,0x62])](_0x305cac[_0x18049f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x18049f([0x2b]))[_0x18049f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x18049f([0x2f])));}function _0x164520(_0xffdad7){let _0x3d989c=0x1505;function _0x30c668(_0x6301da){for(let _0x335e29=0x0;_0x335e29<_0x6301da[_0x18049f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x335e29++){const _0x1acf15=_0x6301da[_0x18049f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x335e29);_0x3d989c=(_0x3d989c<<0x5)+_0x3d989c+_0x1acf15,_0x3d989c&=_0x3d989c;}}function _0x4965b2(_0x556e53){Array[_0x18049f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x556e53)?_0x556e53[_0x18049f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4965b2):_0x556e53&&typeof _0x556e53==_0x18049f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x18049f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x556e53)[_0x18049f([0x73,0x6f,0x72,0x74])]()[_0x18049f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4019f8,_0x4b78b2])=>{_0x30c668(_0x4019f8),_0x4965b2(_0x4b78b2);}):_0x30c668(window[_0x18049f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x556e53));}return _0x4965b2(_0xffdad7),_0x3d989c>>>0x0;}function _0x51c18c(_0x31bfa2){return _0x31bfa2[_0x18049f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x18049f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x18049f([0x30]));}function _0xe0a273(_0x401135){return _0x401135[_0x18049f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x18049f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x18049f([0x6a,0x6f,0x69,0x6e])]('');}function _0x141357(){}function _0x18049f(_0xdbc491){return _0xdbc491['map'](_0x2ebb2b=>String['fromCharCode'](_0x2ebb2b))['join']('');}_0xf08c80(await _0xa24df5());}(this);}['_initSchema'](){const _0x13c8e1=this['editor']['model']['schema'];_0x13c8e1['isRegistered']('imageBlock')&&_0x13c8e1['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x13c8e1['isRegistered']('imageInline')&&_0x13c8e1['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x11c8d1=this['editor'];_0x11c8d1['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x11c8d1['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x2788f8=>_0x2788f8['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x57ccc9=_0x11c8d1['commands']['get']('replaceImageSource');_0x57ccc9&&this['listenTo'](_0x57ccc9,'cleanupImage',(_0x457541,[_0x973314,_0x18e38d])=>{_0x973314['removeAttribute']('uploadcareImageId',_0x18e38d);});}['_initConfig'](){const _0x1c5e6d=this['editor']['config']['get']('uploadcare.uploader')||{},_0x3a0041=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x1177a3(_0x4d2ea8['document'],'uc-config',{..._0x1c5e6d,'pubkey':_0x3a0041,'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']=_0x598abc=>{if('closeMax'==_0x598abc)return'#uc-icon-arrow-down';},_0x4d2ea8['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x1177a3(_0x4d2ea8['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x4d2ea8['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0xcc2d86=this['editor']['commands']['get']('insertImage');_0xcc2d86&&this['listenTo'](_0xcc2d86,'execute',()=>{const _0x354533=this['editor']['model']['document']['selection']['getSelectedElement']();_0x354533&&_0x354533['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x354533);});});const _0x123d43=this['editor']['commands']['get']('uploadcareImageReplace');_0x123d43&&this['listenTo'](_0x123d43,'execute',()=>{const _0x5a49bf=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5a49bf&&_0x5a49bf['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{$(this['editor'],_0x5a49bf);});});}}class H extends _0x43a80a{static get['requires'](){return[z,A];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x45b108){super(_0x45b108),_0x45b108['config']['define']('uploadcare.uploader.sourceList',[S['Local'],S['URL']]),_0xdc4c4e['defineComponents'](_0xdc4c4e),this['_defineLocale']();}['_defineLocale'](){const _0x584112=this['editor']['config']['get']('uploadcare.locale'),_0xc69b1a=this['editor']['locale']['contentLanguage'];_0x584112&&_0xdc4c4e['defineLocale'](_0xc69b1a,_0x584112);}}class J extends _0x49d1b2{constructor(_0x496bf6){super(_0x496bf6);const t=_0x496bf6['t'],_0x52ff72=this['bindTemplate'],_0x3b5467=new _0x553ae1();_0x3b5467['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':[_0x3b5467,{'text':_0x52ff72['to']('imageUploadProgress',_0x4c9fa9=>t('Loading\x20image...')+'\x20('+(_0x4c9fa9||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 _0x49d1b2{constructor(_0x318bfb){super(_0x318bfb);const t=_0x318bfb['t'];this['set']('errorType',null);const _0xb7b605=new _0x368b04(_0x318bfb);_0xb7b605['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0xb7b605['withText']=!0x0,_0xb7b605['class']='ck-button-action',_0xb7b605['on']('execute',()=>{this['fire']('retry');}),_0xb7b605['bind']('isVisible')['to'](this,'errorType',_0x46993a=>'NotFound'!==_0x46993a);const _0x3f092d=new _0xc96a27();_0x3f092d['content']=_0x201453,_0x3f092d['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x37508b=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':[_0x3f092d,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x37508b['to']('errorType',_0x2e6412=>t('NotFound'!==_0x2e6412?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0xb7b605]},{'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 _0x49d1b2{constructor(_0xc6ae53,_0x1d1608){super(_0xc6ae53);const _0x2ace21=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1d1608,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2ace21['to']('imageSrc')}});}}class X extends K{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x2c7a58,_0x3ec87a,_0x2659d0){super(_0x2c7a58),this['_items']=this['createCollection'](),this['_loadingView']=new J(_0x2c7a58),this['_errorView']=new Z(_0x2c7a58),this['_editingView']=new Q(_0x2c7a58,_0x2659d0),this['_focusableView']=new _0x49d1b2(_0x2c7a58),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x3ec87a),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'],_0x18a915=>{this['_addUploadcareImageEditorListeners'](_0x18a915);});}),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'](_0x2a78b5,_0x5c1e41){const _0x372c2f='uc-cloud-image-editor',_0xe9d4ec=_0x2a78b5['querySelector'](_0x372c2f);if(_0xe9d4ec)return _0x5c1e41(_0xe9d4ec);const _0x1b0cae=new MutationObserver(_0x1e8d63=>{const _0x27c45f=_0x1e8d63['filter'](_0x4e1236=>_0x4e1236['target']===_0x2a78b5&&_0x4e1236['addedNodes']['length']>0x0&&_0x4e1236['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x372c2f);_0x27c45f['length']&&(_0x1b0cae['disconnect'](),_0x5c1e41(_0x27c45f[0x0]['addedNodes'][0x0]));});_0x1b0cae['observe'](_0x2a78b5,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x52b4aa){_0x52b4aa['addEventListener']('apply',_0xb2cedf=>{this['fire']('apply',{'imageSrc':_0xb2cedf['detail']['cdnUrl']});}),_0x52b4aa['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class Y extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x111ee7(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x513489,_0x54fe0e,_0x423cfa){super(),this['_editor']=_0x513489,this['_dialog']=_0x54fe0e,this['_imageElement']=_0x423cfa,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 _0x32f60e=this['_imageElement'],_0x26ff13=_0x32f60e['getAttribute']('uploadcareImageId'),_0x4ec3e3=_0x32f60e['getAttribute']('src');if(_0x26ff13)await this['_loadImageInfo'](_0x26ff13,_0x4ec3e3);else{if(this['_imageCache']['has'](_0x4ec3e3)){const _0x461fa0=this['_imageCache']['get'](_0x4ec3e3);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x461fa0['url'],this['imageDimension']=_0x461fa0['dimension'],this['imageId']=_0x461fa0['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3d596b}=this['_editor'],t=_0x3d596b['t'],_0x2c0133=new X(_0x3d596b,this['imageStatus'],this['_attributes']);_0x2c0133['bind']('status')['to'](this,'imageStatus'),_0x2c0133['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x2c0133['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x2c0133['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x2c0133,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x21e4e7,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x2c0133,'position':_0x26d088['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x2c0133['focus']();},'onHide':()=>{_0x2c0133['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x38d59c=>!V(_0x38d59c,_0x2c0133['element'])}});}['_loadImageInfo'](_0x2c58dd,_0x3c6329){return q['getInfo'](_0x2c58dd,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x5629ab=>{const {width:_0xd30a4a,height:_0x375b0}=_0x5629ab['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3c6329,this['imageDimension']={'width':_0xd30a4a,'height':_0x375b0},this['imageId']=_0x2c58dd;})['catch'](_0x1a0098=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x1a0098['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x3de534,_0x264cb4){return this['_getImageAsFile'](_0x3de534)['then'](_0x3e01cc=>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':_0x264cb4['signal'],'file':_0x3e01cc,'onProgress':_0x4a36ab=>{_0x4a36ab&&_0x4a36ab['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x4a36ab['value']));}}))['then'](_0x2e5390=>{const {width:_0x533457,height:_0x259cf8}=_0x2e5390['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x2e5390['cdnUrl'],this['imageDimension']={'width':_0x533457,'height':_0x259cf8},this['imageId']=_0x2e5390['uuid'],this['imageUploadProgress']=null;const _0x44a8bd=_0x3de534['getAttribute']('src');this['_imageCache']['set'](_0x44a8bd,{'id':_0x2e5390['uuid'],'url':_0x2e5390['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x418d97=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x418d97['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x1fe5d5,_0x24aee0){_0x1fe5d5['on']('apply',(_0x498189,_0x3cbc70)=>{this['_replaceImage'](_0x24aee0,_0x3cbc70['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x1fe5d5['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x1fe5d5['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x18f4cf,_0x379d44,_0x1b4f85){const _0x20ad6c=this['_editor'],{width:_0xa53060,height:_0x408dd0}=F(_0x379d44,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x418fee,imageSources:_0xa1bb5f}=D(_0x379d44,_0xa53060);_0x20ad6c['model']['change'](_0x5e9719=>{if('$graveyard'===_0x18f4cf['root']['rootName']){_0x20ad6c['execute']('insertImage',{'imageType':_0x18f4cf['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x18f4cf['getAttributes']()),'uploadcareImageId':_0x1b4f85,'src':_0x418fee,'sources':_0xa1bb5f,'width':_0xa53060,'height':_0x408dd0}});const _0x4b0a3c=_0x18f4cf['getChildren']();_0x18f4cf=_0x20ad6c['model']['document']['selection']['getSelectedElement']();for(const _0x1389ff of _0x4b0a3c)_0x5e9719['append'](_0x5e9719['cloneElement'](_0x1389ff),_0x18f4cf);}else _0x5e9719['setSelection'](_0x18f4cf,'on'),_0x20ad6c['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x18f4cf['getAttributes']()),'uploadcareImageId':_0x1b4f85,'src':_0x418fee,'sources':_0xa1bb5f,'width':_0xa53060,'height':_0x408dd0},_0x18f4cf);_0x5e9719['setSelection'](_0x18f4cf,'on');});}async['_getImageAsFile'](_0x1f8112){const _0x1a58dd=_0x4d2ea8['window'],_0x28e4fa=_0x4d2ea8['document']['location']['href'],_0x3043db=new _0x1a58dd['URL'](_0x1f8112['getAttribute']('src'),_0x28e4fa);if('data:'===_0x3043db['protocol']){const _0x161600=_0x3043db['href']['split'](','),_0x1252fb=_0x161600[0x0]['match'](/:(.*?);/)[0x1],_0x913b6c=_0x1252fb['split']('/')[0x1],_0x47722a=_0x1a58dd['atob'](_0x161600[_0x161600['length']-0x1]);let _0x418086=_0x47722a['length'];const _0x405ae8=new _0x1a58dd['Uint8Array'](_0x418086);for(;_0x418086--;)_0x405ae8[_0x418086]=_0x47722a['charCodeAt'](_0x418086);return new _0x1a58dd['File']([_0x405ae8],'image.'+_0x913b6c,{'type':_0x1252fb});}const _0x38c8e3=_0x3043db['href']['split']('/'),_0x37a5a0=_0x38c8e3[_0x38c8e3['length']-0x1],_0x4bd075=_0x37a5a0['split']('.')[0x1];return _0x1a58dd['fetch'](_0x3043db['href'])['then'](_0x4f2462=>_0x4f2462['clone']()['blob']())['then'](_0x2c946a=>new _0x1a58dd['File']([_0x2c946a],_0x37a5a0,{'type':'image/'+_0x4bd075}));}}class tt extends _0x266ed1{['imageEditController'];static get['requires'](){return[_0x1166b4];}['_isEditable'];constructor(_0x5848e6){super(_0x5848e6),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x16d593){const _0x5d3005=B(_0x16d593);return _0x47ff5a=>!(!_0x47ff5a||!_0x47ff5a['is']('element','imageBlock')&&!_0x47ff5a['is']('element','imageInline'))&&(!!_0x47ff5a['hasAttribute']('uploadcareImageId')||!!_0x47ff5a['hasAttribute']('src')&&_0x5d3005(_0x47ff5a['getAttribute']('src')));}(_0x5848e6['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0xc36677=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0xc36677);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5104fd=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5104fd&&(_0x5104fd['is']('element','imageBlock')||_0x5104fd['is']('element','imageInline'))&&(this['imageEditController']=new Y(this['editor'],this['editor']['plugins']['get'](_0x1166b4),_0x5104fd),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class et extends _0x266ed1{['refresh'](){const _0x189a18=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x189a18&&(_0x189a18['is']('element','imageBlock')||_0x189a18['is']('element','imageInline')));}['execute'](_0x468716){const _0x4933ae=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x4c07cc=>{_0x4c07cc['setAttributes'](_0x468716,_0x4933ae),_0x4c07cc['removeAttribute']('srcset',_0x4933ae),_0x4c07cc['removeAttribute']('sizes',_0x4933ae);});}}class it extends _0x43a80a{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[z,_0x529d3d,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x46e21f}=this;_0x46e21f['commands']['add']('uploadcareImageEdit',new tt(_0x46e21f)),_0x46e21f['commands']['add']('uploadcareImageReplace',new et(_0x46e21f));}}class st extends _0x43a80a{['_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 _0x111259=this['editor'];_0x111259['ui']['componentFactory']['add']('uploadcareImageEdit',_0x2e6890=>{const _0x4d7e95=_0x111259['commands']['get']('uploadcareImageEdit'),_0x58bee5=new _0x368b04(_0x2e6890),t=_0x2e6890['t'];return _0x58bee5['set']({'icon':_0x21e4e7,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x58bee5['bind']('isEnabled')['to'](_0x4d7e95),_0x58bee5['bind']('isOn')['to'](_0x4d7e95,'isActive'),this['listenTo'](_0x58bee5,'execute',()=>{_0x111259['execute']('uploadcareImageEdit'),_0x111259['editing']['view']['focus']();}),_0x58bee5;}),this['_initConfig']();}['_initConfig'](){const _0x1873cb=_0x1177a3(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1873cb),this['listenTo'](this['editor'],'destroy',()=>{_0x1873cb['remove']();});}}class nt extends _0x43a80a{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,A 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-20260109.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-20260109.0",
|
|
36
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20260109.0",
|
|
37
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20260109.0",
|
|
38
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-next-20260109.0",
|
|
39
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-next-20260109.0",
|
|
40
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20260109.0",
|
|
41
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-next-20260109.0",
|
|
42
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20260109.0",
|
|
43
43
|
"@uploadcare/file-uploader": "1.24.5",
|
|
44
44
|
"@uploadcare/upload-client": "6.14.3"
|
|
45
45
|
},
|