@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20251127.0 → 0.0.0-nightly-20251128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/uploadcare.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
- package/src/uploadcareediting.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +2 -2
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +1 -1
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +1 -1
- package/src/uploadcareimageedit/uploadcareimageeditui.js +1 -1
- package/src/utils/dialogfocusmanagerview.js +1 -1
- package/src/utils/editingutils.js +1 -1
- package/src/utils/isancestor.js +1 -1
- package/src/utils/uploadutils.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x3bd795,Command as _0x2b6c67}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x3dae0a,IconGooglePhotos as _0x24ad2a,IconGoogleDrive as _0xfa8fa1,IconFacebook as _0x29c12c,IconDropbox as _0x4bf518,IconUploadcareLink as _0x3bf0a3,IconUploadcareImageUpload as _0x560df5,IconError as _0x5c74cf,IconUploadcareImageEdit as _0x1028ed}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x172be1,MenuBarMenuListItemButtonView as _0x34ec69,View as _0x385054,FocusCycler as _0x4a9a0f,Dialog as _0xbe1041,DialogViewPosition as _0x18301e,SpinnerView as _0x596a6a,IconView as _0x4b9e44,Notification as _0x358e78}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x192bc1,DomEmitterMixin as _0x559077,global as _0x544b6e,getAncestors as _0x347472,ObservableMixin as _0x6d5f1b,uid as _0x4dfcd6,createElement as _0x39ed0a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x522ef2}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x46c247,info as _0x2d800f}from'@uploadcare/upload-client';import*as _0x4ae532 from'@uploadcare/file-uploader';var i=function(_0x30d7ff){return _0x30d7ff['Local']='local',_0x30d7ff['URL']='url',_0x30d7ff['Dropbox']='dropbox',_0x30d7ff['GDrive']='gdrive',_0x30d7ff['Facebook']='facebook',_0x30d7ff['GPhotos']='gphotos',_0x30d7ff['OneDrive']='onedrive',_0x30d7ff;}({});function _(_0x5d7d15,_0x4333fe,_0x2826a7){const t=_0x5d7d15['t'],_0x4292f6=_0x5d7d15['t'];switch(_0x4333fe){case i['Local']:return{'text':_0x4292f6('Insert'===_0x2826a7?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x4292f6('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x2826a7?_0x4292f6('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x4292f6('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x2826a7?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x4333fe;}}class e extends _0x3bd795{['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 _0x33b739=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xf820ac;for(const _0x4555ef in _0x33b739){const _0x49e04c=_0x4555ef,_0x171325=_0x33b739[_0x49e04c];if('uploadcareLicenseKeyValid'==_0x171325||'uploadcareLicenseKeyInvalid'==_0x171325||'uploadcareLicenseKeyExpired'==_0x171325||'uploadcareLicenseKeyDomainLimit'==_0x171325||'uploadcareLicenseKeyNotAllowed'==_0x171325||'uploadcareLicenseKeyEvaluationLimit'==_0x171325||'uploadcareLicenseKeyTrialLimit'==_0x171325||'uploadcareLicenseKeyUsageLimit'==_0x171325){delete _0x33b739[_0x49e04c],_0xf820ac=_0x171325,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0xf820ac&&_0x33b739['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0xf820ac&&_0x33b739['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0xf820ac&&_0x33b739['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0xf820ac&&_0x33b739['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x35068f}=this,_0x516d47=_0x35068f['commands']['get']('uploadcare');if(!_0x516d47)return;const _0x50786a=this['_normalizeConfigSourceList'](_0x35068f['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x19adb6,_0x481c65)=>{const _0x4b2f7d=this['_getIntegrationKey'](_0x481c65['type']);return _0x19adb6[_0x4b2f7d]||(_0x19adb6[_0x4b2f7d]=[]),_0x19adb6[_0x4b2f7d]['push'](_0x481c65),_0x19adb6;},{});_0x35068f['plugins']['has']('ImageInsertUI')&&_0x35068f['commands']['get']('uploadcare')&&Object['entries'](_0x50786a)['forEach'](([_0x3e2969,_0x413c6e])=>{_0x35068f['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x3e2969,'observable':()=>_0x516d47,'buttonViewCreator':()=>this['_createToolbarButton'](_0x413c6e),'formViewCreator':()=>this['_createDropdownButtons'](_0x413c6e),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x413c6e),'override':'assetManager'!==_0x3e2969});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x50015c){const {locale:_0x530388}=this['editor'];return _0x50015c['map'](_0x30bcfa=>{const _0x248377=_(_0x530388,_0x30bcfa,'Insert');switch(_0x30bcfa){case i['Local']:return{'icon':_0x560df5,'type':i['Local'],..._0x248377};case i['URL']:return{'icon':_0x3bf0a3,'type':i['URL'],..._0x248377};case i['Dropbox']:return{'icon':_0x4bf518,'type':i['Dropbox'],..._0x248377};case i['Facebook']:return{'icon':_0x29c12c,'type':i['Facebook'],..._0x248377};case i['GDrive']:return{'icon':_0xfa8fa1,'type':i['GDrive'],..._0x248377};case i['GPhotos']:return{'icon':_0x24ad2a,'type':i['GPhotos'],..._0x248377};case i['OneDrive']:return{'icon':_0x3dae0a,'type':i['OneDrive'],..._0x248377};}});}['_getIntegrationKey'](_0x2fc021){switch(_0x2fc021){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0xff8cb8,_0x590adc){const _0x383734=this['editor'],_0x3cc846=new _0xff8cb8(_0x383734['locale']),_0x36d859=_0x383734['commands']['get']('uploadcare');return _0x3cc846['bind']('isEnabled')['to'](_0x36d859),_0x3cc846['on']('execute',()=>{_0x36d859['execute'](_0x590adc);}),_0x3cc846;}['_createToolbarButton'](_0x589d35){const {locale:_0x8b7ce7}=this['editor'],_0x5a25c6=this['editor']['plugins']['get']('ImageInsertUI'),_0x172860=_0x589d35[0x0],_0x5b6273=this['_createButton'](_0x172be1,_0x172860['type']);return _0x5b6273['icon']=_0x172860['icon'],_0x5b6273['bind']('label')['to'](_0x5a25c6,'isImageSelected',_0x17e2e5=>_(_0x8b7ce7,_0x172860['type'],_0x17e2e5?'Replace':'Insert')['text']),_0x5b6273['tooltip']=!0x0,_0x5b6273;}['_createDropdownButtons'](_0x102b60){const {locale:_0x13e30b}=this['editor'],_0x252573=this['editor']['plugins']['get']('ImageInsertUI');return _0x102b60['map'](_0x2cb1de=>{const _0x455264=this['_createButton'](_0x172be1,_0x2cb1de['type']);return _0x455264['withText']=!0x0,_0x455264['icon']=_0x2cb1de['icon'],_0x455264['bind']('label')['to'](_0x252573,'isImageSelected',_0x4a265b=>_(_0x13e30b,_0x2cb1de['type'],_0x4a265b?'Replace':'Insert')['text']),_0x455264;});}['_createMenuBarButtons'](_0x107e1d){return _0x107e1d['map'](_0x5375f4=>{const _0x3816fc=this['_createButton'](_0x34ec69,_0x5375f4['type']);return _0x3816fc['icon']=_0x5375f4['icon'],_0x3816fc['label']=_0x5375f4['shortText'],_0x3816fc;});}}class F extends _0x385054{['focusTracker'];['focusCycler'];constructor(_0x256c0f){super(_0x256c0f),this['focusTracker']=new _0x192bc1(),this['focusCycler']=new _0x4a9a0f({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0x568102,_0x2a9651){super(_0x568102),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-'+_0x2a9651}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0x47ce31,_0xb2ca9f){const _0x43ff11=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x366edc=>_0x366edc<=_0xb2ca9f)['map'](_0x236c40=>_0x47ce31['replace'](/\/$/,'')+'/-/resize/'+_0x236c40+'x/\x20'+_0x236c40+'w');return{'imageFallbackUrl':_0x47ce31,'imageSources':[{'srcset':_0x43ff11['join'](',\x20'),'sizes':'(max-width:\x20'+_0xb2ca9f+'px)\x20100vw,\x20'+_0xb2ca9f+'px','type':'image/webp'}]};}function S(_0x1c219d,_0x1d70ec,_0x1c4d0b){const _0x3f9c49=_0x1c219d['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3f9c49?parseInt(_0x3f9c49[0x1],0xa):_0x1d70ec,'height':_0x3f9c49?parseInt(_0x3f9c49[0x2],0xa):_0x1c4d0b};}function p(_0x3159ef,_0xbfc5b5){const _0x39050f=new(_0x559077())(),_0x45ee84=_0x3159ef['plugins']['get']('ImageUtils'),_0x2ca80c=_0x3159ef['editing']['mapper']['toViewElement'](_0xbfc5b5),_0x45ab31=_0x45ee84['findViewImgElement'](_0x2ca80c),_0x50d631=_0x3159ef['editing']['view']['domConverter']['viewToDom'](_0x45ab31),_0xa111f0=_0xbfc5b5['getAttribute']('width'),_0x45d168=_0xbfc5b5['getAttribute']('height'),_0x196efd='image-processing';_0x3159ef['editing']['view']['change'](_0x175a45=>{_0x175a45['addClass'](_0x196efd,_0x2ca80c),_0x175a45['setStyle']('aspect-ratio',_0xa111f0+'/'+_0x45d168,_0x45ab31);}),_0x39050f['listenTo'](_0x50d631,'load',()=>{_0x39050f['stopListening'](_0x50d631,'load'),_0x3159ef['editing']['view']['change'](_0x3f2c91=>{_0x3f2c91['removeClass'](_0x196efd,_0x2ca80c),_0x3f2c91['removeStyle']('aspect-ratio',_0x45ab31);});});}function z(_0x61fc64){if(Array['isArray'](_0x61fc64)){const _0x34575e=_0x61fc64['map'](z);return _0x5ddb4e=>_0x34575e['some'](_0x55ee74=>_0x55ee74(_0x5ddb4e));}if('origin'==_0x61fc64){const _0xc1ee5c=_0x544b6e['window']['location']['origin'];return _0x35f88f=>new URL(_0x35f88f,_0x544b6e['document']['baseURI'])['origin']==_0xc1ee5c;}return'function'==typeof _0x61fc64?_0x61fc64:_0x61fc64 instanceof RegExp?_0xca63a4=>!(!_0xca63a4['match'](_0x61fc64)&&!_0xca63a4['replace'](/^https?:\/\//,'')['match'](_0x61fc64)):()=>!0x1;}function A(_0x4ad895,_0x4205c5){return _0x347472(_0x4ad895['target'])['includes'](_0x4205c5);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x6d5f1b(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x6aab2c,_0x5c2b96,_0x564cd0){super(),this['_editor']=_0x6aab2c,this['_editing']=_0x5c2b96,this['_dialog']=_0x6aab2c['plugins']['get'](_0xbe1041),this['_api']=_0x5c2b96['ctxElement']['getAPI'](),this['_type']=_0x564cd0,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:_0x162c14,model:_0x23bf20}=this['_editor'],_0x2be23d=_0x23bf20['document']['selection']['getSelectedElement'](),_0x105cf7=_0x2be23d&&(_0x2be23d['is']('element','imageBlock')||_0x2be23d['is']('element','imageInline'));this['_formView']=new x(_0x162c14,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x560df5,'title':_(_0x162c14,this['_type'],_0x105cf7?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x18301e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xfe1d26=>!A(_0xfe1d26,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x3a4a6f}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x25e103=>{const _0x34f4e9=_0x3a4a6f['length'];for(const _0x105d7a of _0x3a4a6f){const _0x55104d=_0x105d7a===_0x3a4a6f[_0x34f4e9-0x1],{cdnUrl:_0x3d9e09,fileInfo:_0x2ad9db}=_0x105d7a;if(!_0x3d9e09||!_0x2ad9db)continue;const {width:_0x58ecab,height:_0x2c9ac0}=_0x2ad9db['imageInfo'],_0x34f8ed=S(_0x3d9e09,_0x58ecab,_0x2c9ac0),_0x2ad30d=C(_0x3d9e09,_0x34f8ed['width']),_0x5e981e={'id':_0x2ad9db['uuid'],'type':'image','attributes':{'imageDimension':_0x34f8ed,..._0x2ad30d}};this['_insertAsset'](_0x5e981e,_0x55104d,_0x25e103);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x2c21aa=>{'idle'===_0x2c21aa['detail']['status']&&!_0x2c21aa['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0xb04f17,_0x18345a,_0x421c8){const _0x392d01=this['_editor']['model']['document']['selection'],_0x2dec84=_0x392d01['getSelectedElement'](),_0x5d0116=!(!_0x2dec84||!_0x2dec84['is']('element','imageInline'));_0x421c8['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0xb04f17,_0x5d0116),_0x18345a||_0x421c8['setSelection'](_0x392d01['getLastPosition']());}['_insertImage'](_0x2bcd11,_0x4d3831){const _0x2691d6=this['_editor'],{imageDimension:_0x1edf15,imageFallbackUrl:_0x2e5ffc,imageSources:_0x95bfc7}=_0x2bcd11['attributes'];_0x2691d6['execute']('insertImage',{'imageType':_0x4d3831?'imageInline':null,'source':{'uploadcareImageId':_0x2bcd11['id'],'src':_0x2e5ffc,'sources':_0x95bfc7,..._0x1edf15}});}}class w extends _0x2b6c67{['_editing'];['_controller']=null;static get['requires'](){return[_0xbe1041,o];}constructor(_0x1577cc){super(_0x1577cc),this['_editing']=_0x1577cc['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3195d8){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x3195d8);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x1282f9,..._0x3145de}){return _0x46c247(_0x1282f9,_0x3145de);}static['getInfo'](_0x5e5fd4,_0x4c2a34){return _0x2d800f(_0x5e5fd4,_0x4c2a34);}}class f extends _0x3bd795{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x522ef2,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1256c9=this['editor'];if(!!!_0x1256c9['config']['get']('uploadcare'))return;_0x1256c9['plugins']['get'](_0x522ef2)['createUploadAdapter']=_0x580ee8=>new k(_0x580ee8,_0x1256c9),_0x1256c9['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x14def7,{imageElement:_0x1e2bf1,data:_0xadc252})=>{_0x1256c9['model']['change'](_0x7a980e=>{_0x7a980e['setAttribute']('uploadcareImageId',_0xadc252['uploadcareImageId'],_0x1e2bf1);});});}}class k{['loader'];['editor'];['controller'];constructor(_0x5480e3,_0x1780ee){this['loader']=_0x5480e3,this['editor']=_0x1780ee,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1d6fa7=await this['loader']['file'];return j['upload']({'file':_0x1d6fa7,'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':_0x31e7a7=>{_0x31e7a7&&_0x31e7a7['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x31e7a7['value']);}})['then'](async _0x2cdfcc=>{const {imageFallbackUrl:_0x144571,imageSources:_0x2e14f8}=C(_0x2cdfcc['cdnUrl'],_0x2cdfcc['imageInfo']['width']);return{'uploadcareImageId':_0x2cdfcc['uuid'],'default':_0x144571,'sources':_0x2e14f8};})['catch'](()=>{const _0x50d666=t('Cannot\x20upload\x20file:')+('\x20'+_0x1d6fa7['name']+'.');return Promise['reject'](_0x50d666);});}['abort'](){this['controller']['abort']();}}class o extends _0x3bd795{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0xbe1041];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0xedb602){super(_0xedb602),this['ucContextId']=_0x4dfcd6();}['init'](){const _0x287b8a=this['editor'];_0x287b8a['commands']['add']('uploadcare',new w(_0x287b8a));}['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 _0x1ed41f=_0x544b6e['document']['querySelector']('input[uploadcare-file-input]');_0x1ed41f&&_0x1ed41f['remove']();}),async function(_0x2ffe83){const _0x333a03=_0x41f30d([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]),_0x441afa=0x535f8c3a,_0x1b70b0=0x5358f672^_0x441afa,_0xc737a0=window[_0x41f30d([0x44,0x61,0x74,0x65])][_0x41f30d([0x6e,0x6f,0x77])](),_0x3b2e46=_0x2ffe83[_0x41f30d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xce099b=new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1b4350=>{_0x3b2e46[_0x41f30d([0x6f,0x6e,0x63,0x65])](_0x41f30d([0x72,0x65,0x61,0x64,0x79]),_0x1b4350);}),_0x3b3267={[_0x41f30d([0x6b,0x74,0x79])]:_0x41f30d([0x45,0x43]),[_0x41f30d([0x75,0x73,0x65])]:_0x41f30d([0x73,0x69,0x67]),[_0x41f30d([0x63,0x72,0x76])]:_0x41f30d([0x50,0x2d,0x32,0x35,0x36]),[_0x41f30d([0x78])]:_0x41f30d([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]),[_0x41f30d([0x79])]:_0x41f30d([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]),[_0x41f30d([0x61,0x6c,0x67])]:_0x41f30d([0x45,0x53,0x32,0x35,0x36])},_0x120f0f=_0x3b2e46[_0x41f30d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x41f30d([0x67,0x65,0x74])](_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x34ef0a(){let _0x1ef546,_0x3ca47c=null,_0x3bcf1c=null;try{if(_0x120f0f==_0x41f30d([0x47,0x50,0x4c]))return _0x41f30d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1ef546=_0x196b84(),!_0x1ef546)return _0x41f30d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1ef546[_0x41f30d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3bcf1c=_0x335f82(_0x1ef546[_0x41f30d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1ef546[_0x41f30d([0x6a,0x74,0x69])])),await _0x6bda32()?_0x577857()?_0x4c4788()?_0x41f30d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x12f510()?(_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41f30d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3ca47c=_0x565d69(_0x41f30d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41f30d([0x74,0x72,0x69,0x61,0x6c])&&(_0x3ca47c=_0x565d69(_0x41f30d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5261ae()):_0x41f30d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x41f30d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x41f30d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x41f30d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4c4788(){const _0x1ff132=[_0x41f30d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x41f30d([0x74,0x72,0x69,0x61,0x6c])][_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xc737a0/0x3e8:0xe10*_0x1b70b0;return _0x1ef546[_0x41f30d([0x65,0x78,0x70])]<_0x1ff132;}function _0x577857(){const _0x158a9d=_0x1ef546[_0x41f30d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x158a9d&&(!!_0x158a9d[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f30d([0x2a]))||!!_0x158a9d[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f30d([0x55,0x50,0x4c,0x43])));}function _0x12f510(){const _0x285325=_0x1ef546[_0x41f30d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x285325||0x0==_0x285325[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x39dde1}=new URL(window[_0x41f30d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x285325[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39dde1))return!0x0;const _0x4b02e2=_0x39dde1[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e]));return _0x285325[_0x41f30d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2ad00a=>_0x2ad00a[_0x41f30d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41f30d([0x2a])))[_0x41f30d([0x6d,0x61,0x70])](_0x5c94ca=>_0x5c94ca[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e])))[_0x41f30d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5c7de0=>_0x5c7de0[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4b02e2[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41f30d([0x6d,0x61,0x70])](_0x43b2bc=>Array(_0x4b02e2[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x43b2bc[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41f30d([0x66,0x69,0x6c,0x6c])](_0x43b2bc[0x0]===_0x41f30d([0x2a])?_0x41f30d([0x2a]):'')[_0x41f30d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x43b2bc))[_0x41f30d([0x73,0x6f,0x6d,0x65])](_0x163c19=>_0x4b02e2[_0x41f30d([0x65,0x76,0x65,0x72,0x79])]((_0x16de0b,_0x330894)=>_0x163c19[_0x330894]===_0x16de0b||_0x163c19[_0x330894]===_0x41f30d([0x2a])));}function _0x5261ae(){return _0x3ca47c&&_0x3bcf1c?new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x592825,_0x7a9da4)=>{_0x3ca47c[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x592825,_0x7a9da4),_0x3bcf1c[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x3b660d=>{_0x3b660d!=_0x41f30d([0x56,0x61,0x6c,0x69,0x64])&&_0x592825(_0x3b660d);},_0x7a9da4);}):_0x3ca47c||_0x3bcf1c||_0x41f30d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x335f82(_0x1541f5,_0x3bba52){return new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x102f10=>{if(_0x3d291b())return _0x102f10(_0x41f30d([0x56,0x61,0x6c,0x69,0x64]));_0x43731b(),_0x3b2e46[_0x41f30d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x41f30d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x203e27=!0x1;const _0x4f95aa=_0x4dfcd6();function _0x3fc86d(_0x735d93){return!!_0x735d93&&(typeof _0x735d93===_0x41f30d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x735d93===_0x41f30d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x735d93[_0x41f30d([0x74,0x68,0x65,0x6e])]===_0x41f30d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x735d93[_0x41f30d([0x63,0x61,0x74,0x63,0x68])]===_0x41f30d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x236101(_0x1ebfa5){_0x13a463(_0x1ebfa5)[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x44d8a2=>{if(!_0x44d8a2||_0x44d8a2[_0x41f30d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x41f30d([0x6f,0x6b]))return _0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4e3383(_0x3402a5(_0x4f95aa+_0x3bba52))!=_0x44d8a2[_0x41f30d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x41f30d([0x56,0x61,0x6c,0x69,0x64]);})[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x50eaf6=>(_0x44d77e(),_0x50eaf6),()=>{const _0x45b644=_0x223c5d();return null==_0x45b644?(_0x44d77e(),_0x41f30d([0x56,0x61,0x6c,0x69,0x64])):_0x41f30d(_0xc737a0-_0x45b644>(0x7753083a^_0x441afa)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x102f10)[_0x41f30d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x102f10(_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x99f2c1=0x536962ba^_0x441afa;function _0x44d77e(){const _0x2f8472=_0x41f30d([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e3383(_0x3402a5(_0x1541f5)),_0x596e94=_0x495fb9(_0x4e3383(window[_0x41f30d([0x4d,0x61,0x74,0x68])][_0x41f30d([0x63,0x65,0x69,0x6c])](_0xc737a0/_0x99f2c1)));window[_0x41f30d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41f30d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f8472,_0x596e94);}function _0x223c5d(){const _0x3be93c=_0x41f30d([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e3383(_0x3402a5(_0x1541f5)),_0x1aea26=window[_0x41f30d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41f30d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3be93c);return _0x1aea26?window[_0x41f30d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x495fb9(_0x1aea26),0x10)*_0x99f2c1:null;}function _0x13a463(_0x1547aa){return new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x8ee6f6,_0x561a16)=>{_0x1547aa[_0x41f30d([0x74,0x68,0x65,0x6e])](_0x8ee6f6,_0x561a16),window[_0x41f30d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x561a16,0x535e58fa^_0x441afa);});}}_0x3b2e46[_0x41f30d([0x6f,0x6e])](_0x41f30d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x26ad40,_0x42f9cd)=>{if(_0x42f9cd[0x0]!=_0x1541f5)return _0x102f10(_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x42f9cd[0x1]={..._0x42f9cd[0x1],[_0x41f30d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4f95aa};},{[_0x41f30d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41f30d([0x68,0x69,0x67,0x68])}),_0x3b2e46[_0x41f30d([0x6f,0x6e])](_0x41f30d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1dcd73=>{_0x3fc86d(_0x1dcd73[_0x41f30d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x203e27=!0x0,_0x236101(_0x1dcd73[_0x41f30d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x41f30d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41f30d([0x6c,0x6f,0x77])}),_0xce099b[_0x41f30d([0x74,0x68,0x65,0x6e])](()=>{_0x203e27||_0x102f10(_0x41f30d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3d291b(){return _0x3b2e46[_0x41f30d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41f30d([0x76,0x69,0x65,0x77])][_0x41f30d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x41f30d([0x61,0x75,0x74,0x6f]);}function _0x43731b(){_0x3b2e46[_0x41f30d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41f30d([0x76,0x69,0x65,0x77])][_0x41f30d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x41f30d([0x61,0x75,0x74,0x6f]);}}function _0x565d69(_0x4f4186){const _0x5b48c2=[new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2fa265=>setTimeout(_0x2fa265,0x5356b2f6^_0x441afa)),_0xce099b[_0x41f30d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d5986=>{let _0x634819=0x0;_0x3b2e46[_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41f30d([0x6f,0x6e])](_0x41f30d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x44b72f,_0x58dd48)=>{_0x58dd48[0x0][_0x41f30d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x634819++,_0x634819==(0x535f8dc2^_0x441afa)&&(_0x4d5986(),_0x44b72f[_0x41f30d([0x6f,0x66,0x66])]());});}))];return window[_0x41f30d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x41f30d([0x72,0x61,0x63,0x65])](_0x5b48c2)[_0x41f30d([0x74,0x68,0x65,0x6e])](()=>_0x4f4186);}async function _0x568fc7(){await _0xce099b,_0x3b2e46[_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41f30d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x13beca,_0x3b2e46[_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c])][_0x41f30d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x13beca,_0x3b2e46[_0x41f30d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x41f30d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x24e709(_0x38d8fd){const _0x4b178f=_0x1af17b();_0x3b2e46[_0x4b178f]=_0x41f30d([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x38d8fd,_0x38d8fd!=_0x41f30d([0x56,0x61,0x6c,0x69,0x64])&&_0x568fc7();}function _0x1af17b(){const _0x2456d1=window[_0x41f30d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x41f30d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x41f30d([0x6e,0x6f,0x77])]())[_0x41f30d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x41f30d([0x2e]),'');let _0x36bec6=_0x41f30d([0x68]);for(let _0xf69eb7=0x0;_0xf69eb7<_0x2456d1[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xf69eb7+=0x2){let _0x5e71f1=window[_0x41f30d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2456d1[_0x41f30d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xf69eb7,_0xf69eb7+0x2));_0x5e71f1>=_0x333a03[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5e71f1-=_0x333a03[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x36bec6+=_0x333a03[_0x5e71f1];}return _0x36bec6;}function _0x196b84(){const _0x4cdc2e=_0x120f0f[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e]));if(0x3!=_0x4cdc2e[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x12420b(_0x4cdc2e[0x1]);function _0x12420b(_0x3e7642){const _0x3e89ab=_0x233aa1(_0x3e7642);return _0x3e89ab&&_0x56111d()?_0x3e89ab:null;function _0x56111d(){const _0x69eedf=_0x3e89ab[_0x41f30d([0x6a,0x74,0x69])],_0x591dfd=window[_0x41f30d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x69eedf[_0x41f30d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x69eedf[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2cb47b={..._0x3e89ab,[_0x41f30d([0x6a,0x74,0x69])]:_0x69eedf[_0x41f30d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x69eedf[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2cb47b[_0x41f30d([0x76,0x63])],_0x3402a5(_0x2cb47b)==_0x591dfd;}}}async function _0x6bda32(){let _0x24c231=!0x0;try{const _0x111855=_0x120f0f[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])](_0x41f30d([0x2e])),[_0x35a360,_0x246dff,_0x4ee607]=_0x111855;return _0x2a5821(_0x35a360),await _0x2a5f6f(_0x35a360,_0x246dff,_0x4ee607),_0x24c231;}catch{return!0x1;}function _0x2a5821(_0x196a83){const _0x196c16=_0x233aa1(_0x196a83);_0x196c16&&_0x196c16[_0x41f30d([0x61,0x6c,0x67])]==_0x41f30d([0x45,0x53,0x32,0x35,0x36])||(_0x24c231=!0x1);}async function _0x2a5f6f(_0x34cecc,_0x1301a3,_0x8a5f5b){const _0x4e1287=window[_0x41f30d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x41f30d([0x66,0x72,0x6f,0x6d])](_0x6a73c7(_0x8a5f5b),_0x3bd588=>_0x3bd588[_0x41f30d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x362dfc=new window[(_0x41f30d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x41f30d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x34cecc+_0x41f30d([0x2e])+_0x1301a3),_0x2195f3=window[_0x41f30d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x41f30d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2195f3)return;const _0x1345de=await _0x2195f3[_0x41f30d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x41f30d([0x6a,0x77,0x6b]),_0x3b3267,{[_0x41f30d([0x6e,0x61,0x6d,0x65])]:_0x41f30d([0x45,0x43,0x44,0x53,0x41]),[_0x41f30d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x41f30d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x41f30d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2195f3[_0x41f30d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x41f30d([0x6e,0x61,0x6d,0x65])]:_0x41f30d([0x45,0x43,0x44,0x53,0x41]),[_0x41f30d([0x68,0x61,0x73,0x68])]:{[_0x41f30d([0x6e,0x61,0x6d,0x65])]:_0x41f30d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1345de,_0x4e1287,_0x362dfc)||(_0x24c231=!0x1);}}function _0x233aa1(_0x20ee04){return _0x20ee04[_0x41f30d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x41f30d([0x65,0x79]))?JSON[_0x41f30d([0x70,0x61,0x72,0x73,0x65])](_0x6a73c7(_0x20ee04)):null;}function _0x6a73c7(_0x44e923){return window[_0x41f30d([0x61,0x74,0x6f,0x62])](_0x44e923[_0x41f30d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x41f30d([0x2b]))[_0x41f30d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x41f30d([0x2f])));}function _0x3402a5(_0x432512){let _0x4300a2=0x1505;function _0x316a1b(_0x2636f8){for(let _0x2e69fb=0x0;_0x2e69fb<_0x2636f8[_0x41f30d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2e69fb++){const _0x480a2b=_0x2636f8[_0x41f30d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2e69fb);_0x4300a2=(_0x4300a2<<0x5)+_0x4300a2+_0x480a2b,_0x4300a2&=_0x4300a2;}}function _0x392087(_0x4f7c6b){Array[_0x41f30d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f7c6b)?_0x4f7c6b[_0x41f30d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x392087):_0x4f7c6b&&typeof _0x4f7c6b==_0x41f30d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x41f30d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f7c6b)[_0x41f30d([0x73,0x6f,0x72,0x74])]()[_0x41f30d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x25122f,_0x234244])=>{_0x316a1b(_0x25122f),_0x392087(_0x234244);}):_0x316a1b(window[_0x41f30d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f7c6b));}return _0x392087(_0x432512),_0x4300a2>>>0x0;}function _0x4e3383(_0x3167d8){return _0x3167d8[_0x41f30d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x41f30d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x41f30d([0x30]));}function _0x495fb9(_0x42ea1f){return _0x42ea1f[_0x41f30d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x41f30d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x41f30d([0x6a,0x6f,0x69,0x6e])]('');}function _0x13beca(){}function _0x41f30d(_0x2a1474){return _0x2a1474['map'](_0x147a1f=>String['fromCharCode'](_0x147a1f))['join']('');}_0x24e709(await _0x34ef0a());}(this);}['_initSchema'](){const _0x213c2b=this['editor']['model']['schema'];_0x213c2b['isRegistered']('imageBlock')&&_0x213c2b['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x213c2b['isRegistered']('imageInline')&&_0x213c2b['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x5bd22a=this['editor'];_0x5bd22a['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x5bd22a['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x4bd8dd=>_0x4bd8dd['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x21ddf9=_0x5bd22a['commands']['get']('replaceImageSource');_0x21ddf9&&this['listenTo'](_0x21ddf9,'cleanupImage',(_0x5ca11b,[_0x4bfb17,_0x28b239])=>{_0x4bfb17['removeAttribute']('uploadcareImageId',_0x28b239);});}['_initConfig'](){const _0x7bf39d=this['editor']['config']['get']('uploadcare.uploader')||{},_0x5b9776=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x39ed0a(_0x544b6e['document'],'uc-config',{..._0x7bf39d,'pubkey':_0x5b9776,'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']=_0x383376=>{if('closeMax'==_0x383376)return'#uc-icon-arrow-down';},_0x544b6e['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x39ed0a(_0x544b6e['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x544b6e['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x54c9cb=this['editor']['commands']['get']('insertImage');_0x54c9cb&&this['listenTo'](_0x54c9cb,'execute',()=>{const _0x557c14=this['editor']['model']['document']['selection']['getSelectedElement']();_0x557c14&&_0x557c14['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x557c14);});});const _0x225e0b=this['editor']['commands']['get']('uploadcareImageReplace');_0x225e0b&&this['listenTo'](_0x225e0b,'execute',()=>{const _0x509f6c=this['editor']['model']['document']['selection']['getSelectedElement']();_0x509f6c&&_0x509f6c['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x509f6c);});});}}class tt extends _0x3bd795{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe0f7bd){super(_0xe0f7bd),_0xe0f7bd['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x4ae532['defineComponents'](_0x4ae532),this['_defineLocale']();}['_defineLocale'](){const _0x279839=this['editor']['config']['get']('uploadcare.locale'),_0x484951=this['editor']['locale']['contentLanguage'];_0x279839&&_0x4ae532['defineLocale'](_0x484951,_0x279839);}}class ii extends _0x385054{constructor(_0x37558d){super(_0x37558d);const t=_0x37558d['t'],_0x4fa1b5=this['bindTemplate'],_0x108a0e=new _0x596a6a();_0x108a0e['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':[_0x108a0e,{'text':_0x4fa1b5['to']('imageUploadProgress',_0x19d08c=>t('Loading\x20image...')+'\x20('+(_0x19d08c||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x385054{constructor(_0x2b5520){super(_0x2b5520);const t=_0x2b5520['t'];this['set']('errorType',null);const _0x4bab26=new _0x172be1(_0x2b5520);_0x4bab26['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x4bab26['withText']=!0x0,_0x4bab26['class']='ck-button-action',_0x4bab26['on']('execute',()=>{this['fire']('retry');}),_0x4bab26['bind']('isVisible')['to'](this,'errorType',_0x5337a0=>'NotFound'!==_0x5337a0);const _0x34de5e=new _0x4b9e44();_0x34de5e['content']=_0x5c74cf,_0x34de5e['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x73ad67=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':[_0x34de5e,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x73ad67['to']('errorType',_0x3083e7=>t('NotFound'!==_0x3083e7?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x4bab26]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x385054{constructor(_0x4540e6,_0x1c8c0f){super(_0x4540e6);const _0x2d11c1=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x1c8c0f,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x2d11c1['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x30431b,_0xcd9896,_0x5cfec4){super(_0x30431b),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x30431b),this['_errorView']=new ti(_0x30431b),this['_editingView']=new ei(_0x30431b,_0x5cfec4),this['_focusableView']=new _0x385054(_0x30431b),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0xcd9896),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'],_0x1f1eb1=>{this['_addUploadcareImageEditorListeners'](_0x1f1eb1);});}),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'](_0x54c163,_0x328acb){const _0x475d94='uc-cloud-image-editor',_0x445a0e=_0x54c163['querySelector'](_0x475d94);if(_0x445a0e)return _0x328acb(_0x445a0e);const _0x442508=new MutationObserver(_0x26e307=>{const _0x5ddffd=_0x26e307['filter'](_0x37ab30=>_0x37ab30['target']===_0x54c163&&_0x37ab30['addedNodes']['length']>0x0&&_0x37ab30['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x475d94);_0x5ddffd['length']&&(_0x442508['disconnect'](),_0x328acb(_0x5ddffd[0x0]['addedNodes'][0x0]));});_0x442508['observe'](_0x54c163,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0xb24aae){_0xb24aae['addEventListener']('apply',_0x30e50b=>{this['fire']('apply',{'imageSrc':_0x30e50b['detail']['cdnUrl']});}),_0xb24aae['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x6d5f1b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x37ad70,_0x32b919,_0x4da984){super(),this['_editor']=_0x37ad70,this['_dialog']=_0x32b919,this['_imageElement']=_0x4da984,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 _0x39fd0e=this['_imageElement'],_0x5d4e54=_0x39fd0e['getAttribute']('uploadcareImageId'),_0x2112b9=_0x39fd0e['getAttribute']('src');if(_0x5d4e54)await this['_loadImageInfo'](_0x5d4e54,_0x2112b9);else{if(this['_imageCache']['has'](_0x2112b9)){const _0x6e9576=this['_imageCache']['get'](_0x2112b9);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x6e9576['url'],this['imageDimension']=_0x6e9576['dimension'],this['imageId']=_0x6e9576['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x561ebf}=this['_editor'],t=_0x561ebf['t'],_0x1c1a9d=new X(_0x561ebf,this['imageStatus'],this['_attributes']);_0x1c1a9d['bind']('status')['to'](this,'imageStatus'),_0x1c1a9d['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x1c1a9d['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x1c1a9d['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x1c1a9d,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1028ed,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x1c1a9d,'position':_0x18301e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x1c1a9d['focus']();},'onHide':()=>{_0x1c1a9d['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0xf1909=>!A(_0xf1909,_0x1c1a9d['element'])}});}['_loadImageInfo'](_0x2cacd0,_0xc4a8a3){return j['getInfo'](_0x2cacd0,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x13bbb4=>{const {width:_0x479b53,height:_0x8e0da6}=_0x13bbb4['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xc4a8a3,this['imageDimension']={'width':_0x479b53,'height':_0x8e0da6},this['imageId']=_0x2cacd0;})['catch'](_0x4b710a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4b710a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x26635d,_0x191805){return this['_getImageAsFile'](_0x26635d)['then'](_0xd203a2=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x191805['signal'],'file':_0xd203a2,'onProgress':_0x2430dc=>{_0x2430dc&&_0x2430dc['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x2430dc['value']));}}))['then'](_0x337a8b=>{const {width:_0x100e40,height:_0x5e1dc9}=_0x337a8b['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x337a8b['cdnUrl'],this['imageDimension']={'width':_0x100e40,'height':_0x5e1dc9},this['imageId']=_0x337a8b['uuid'],this['imageUploadProgress']=null;const _0x3743ad=_0x26635d['getAttribute']('src');this['_imageCache']['set'](_0x3743ad,{'id':_0x337a8b['uuid'],'url':_0x337a8b['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x490b03=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x490b03['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x194190,_0x26f3aa){_0x194190['on']('apply',(_0x3c7441,_0x4aa2af)=>{this['_replaceImage'](_0x26f3aa,_0x4aa2af['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x194190['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x194190['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2e0481,_0x4929e1,_0x58d05f){const _0x2f7900=this['_editor'],{width:_0x23ea04,height:_0x54022c}=S(_0x4929e1,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3bbb66,imageSources:_0x1d7852}=C(_0x4929e1,_0x23ea04);_0x2f7900['model']['change'](_0x34dc05=>{if('$graveyard'===_0x2e0481['root']['rootName']){_0x2f7900['execute']('insertImage',{'imageType':_0x2e0481['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2e0481['getAttributes']()),'uploadcareImageId':_0x58d05f,'src':_0x3bbb66,'sources':_0x1d7852,'width':_0x23ea04,'height':_0x54022c}});const _0x51498b=_0x2e0481['getChildren']();_0x2e0481=_0x2f7900['model']['document']['selection']['getSelectedElement']();for(const _0x155205 of _0x51498b)_0x34dc05['append'](_0x34dc05['cloneElement'](_0x155205),_0x2e0481);}else _0x34dc05['setSelection'](_0x2e0481,'on'),_0x2f7900['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2e0481['getAttributes']()),'uploadcareImageId':_0x58d05f,'src':_0x3bbb66,'sources':_0x1d7852,'width':_0x23ea04,'height':_0x54022c},_0x2e0481);_0x34dc05['setSelection'](_0x2e0481,'on');});}async['_getImageAsFile'](_0x4f4de7){const _0x3522ba=_0x544b6e['window'],_0x12e2d6=_0x544b6e['document']['location']['href'],_0x36da8a=new _0x3522ba['URL'](_0x4f4de7['getAttribute']('src'),_0x12e2d6);if('data:'===_0x36da8a['protocol']){const _0x25e496=_0x36da8a['href']['split'](','),_0x1f554c=_0x25e496[0x0]['match'](/:(.*?);/)[0x1],_0x1eecae=_0x1f554c['split']('/')[0x1],_0x23a437=_0x3522ba['atob'](_0x25e496[_0x25e496['length']-0x1]);let _0x5bfd7b=_0x23a437['length'];const _0x1457cf=new _0x3522ba['Uint8Array'](_0x5bfd7b);for(;_0x5bfd7b--;)_0x1457cf[_0x5bfd7b]=_0x23a437['charCodeAt'](_0x5bfd7b);return new _0x3522ba['File']([_0x1457cf],'image.'+_0x1eecae,{'type':_0x1f554c});}const _0x43201c=_0x36da8a['href']['split']('/'),_0x3475b0=_0x43201c[_0x43201c['length']-0x1],_0x545338=_0x3475b0['split']('.')[0x1];return _0x3522ba['fetch'](_0x36da8a['href'])['then'](_0x4f685e=>_0x4f685e['clone']()['blob']())['then'](_0x3cf134=>new _0x3522ba['File']([_0x3cf134],_0x3475b0,{'type':'image/'+_0x545338}));}}class Q extends _0x2b6c67{['imageEditController'];static get['requires'](){return[_0xbe1041];}['_isEditable'];constructor(_0x232cd2){super(_0x232cd2),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x2ef950){const _0x5b118a=z(_0x2ef950);return _0x53e78f=>!(!_0x53e78f||!_0x53e78f['is']('element','imageBlock')&&!_0x53e78f['is']('element','imageInline'))&&(!!_0x53e78f['hasAttribute']('uploadcareImageId')||!!_0x53e78f['hasAttribute']('src')&&_0x5b118a(_0x53e78f['getAttribute']('src')));}(_0x232cd2['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x17b984=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x17b984);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x5a5383=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5a5383&&(_0x5a5383['is']('element','imageBlock')||_0x5a5383['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0xbe1041),_0x5a5383),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x2b6c67{['refresh'](){const _0x32dbef=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x32dbef&&(_0x32dbef['is']('element','imageBlock')||_0x32dbef['is']('element','imageInline')));}['execute'](_0x15d4eb){const _0x2a6bbf=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5e8d91=>{_0x5e8d91['setAttributes'](_0x15d4eb,_0x2a6bbf),_0x5e8d91['removeAttribute']('srcset',_0x2a6bbf),_0x5e8d91['removeAttribute']('sizes',_0x2a6bbf);});}}class m extends _0x3bd795{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x358e78,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4f3937}=this;_0x4f3937['commands']['add']('uploadcareImageEdit',new Q(_0x4f3937)),_0x4f3937['commands']['add']('uploadcareImageReplace',new V(_0x4f3937));}}class g extends _0x3bd795{['_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 _0x2fb395=this['editor'];_0x2fb395['ui']['componentFactory']['add']('uploadcareImageEdit',_0x403102=>{const _0x31b923=_0x2fb395['commands']['get']('uploadcareImageEdit'),_0x421082=new _0x172be1(_0x403102),t=_0x403102['t'];return _0x421082['set']({'icon':_0x1028ed,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x421082['bind']('isEnabled')['to'](_0x31b923),_0x421082['bind']('isOn')['to'](_0x31b923,'isActive'),this['listenTo'](_0x421082,'execute',()=>{_0x2fb395['execute']('uploadcareImageEdit'),_0x2fb395['editing']['view']['focus']();}),_0x421082;}),this['_initConfig']();}['_initConfig'](){const _0x438f5a=_0x39ed0a(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x438f5a),this['listenTo'](this['editor'],'destroy',()=>{_0x438f5a['remove']();});}}class et extends _0x3bd795{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,Q as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
|
23
|
+
import{Plugin as _0x35bcdb,Command as _0x45201e}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4caf60,IconGooglePhotos as _0x10fdba,IconGoogleDrive as _0x5329b5,IconFacebook as _0x502ce8,IconDropbox as _0x4a783b,IconUploadcareLink as _0x53f76f,IconUploadcareImageUpload as _0x181c64,IconError as _0x4be8ac,IconUploadcareImageEdit as _0x24a86c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0xca984,MenuBarMenuListItemButtonView as _0x345aac,View as _0x25a3d4,FocusCycler as _0x496d6c,Dialog as _0x18f095,DialogViewPosition as _0x5ea1b7,SpinnerView as _0x36630e,IconView as _0xedde6c,Notification as _0x2c0336}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x11e928,DomEmitterMixin as _0x156864,global as _0x3155b2,getAncestors as _0x283c5e,ObservableMixin as _0x768f9c,uid as _0x19f593,createElement as _0x3fc350}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x26f3c6}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x55429f,info as _0xc3156f}from'@uploadcare/upload-client';import*as _0xc1a756 from'@uploadcare/file-uploader';var i=function(_0x190a3d){return _0x190a3d['Local']='local',_0x190a3d['URL']='url',_0x190a3d['Dropbox']='dropbox',_0x190a3d['GDrive']='gdrive',_0x190a3d['Facebook']='facebook',_0x190a3d['GPhotos']='gphotos',_0x190a3d['OneDrive']='onedrive',_0x190a3d;}({});function _(_0x463521,_0x32569a,_0x37f614){const t=_0x463521['t'],_0x8c92ef=_0x463521['t'];switch(_0x32569a){case i['Local']:return{'text':_0x8c92ef('Insert'===_0x37f614?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x8c92ef('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x37f614?_0x8c92ef('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x8c92ef('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x37f614?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x32569a;}}class e extends _0x35bcdb{['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 _0x1f0bfd=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x13247c;for(const _0x4c98b1 in _0x1f0bfd){const _0x529145=_0x4c98b1,_0x156532=_0x1f0bfd[_0x529145];if('uploadcareLicenseKeyValid'==_0x156532||'uploadcareLicenseKeyInvalid'==_0x156532||'uploadcareLicenseKeyExpired'==_0x156532||'uploadcareLicenseKeyDomainLimit'==_0x156532||'uploadcareLicenseKeyNotAllowed'==_0x156532||'uploadcareLicenseKeyEvaluationLimit'==_0x156532||'uploadcareLicenseKeyTrialLimit'==_0x156532||'uploadcareLicenseKeyUsageLimit'==_0x156532){delete _0x1f0bfd[_0x529145],_0x13247c=_0x156532,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x13247c&&_0x1f0bfd['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x13247c&&_0x1f0bfd['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x13247c&&_0x1f0bfd['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x13247c&&_0x1f0bfd['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x13247c&&_0x1f0bfd['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x13247c&&_0x1f0bfd['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x13247c&&_0x1f0bfd['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x355c90}=this,_0x4ddefd=_0x355c90['commands']['get']('uploadcare');if(!_0x4ddefd)return;const _0x404252=this['_normalizeConfigSourceList'](_0x355c90['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x32310c,_0x294a64)=>{const _0x473928=this['_getIntegrationKey'](_0x294a64['type']);return _0x32310c[_0x473928]||(_0x32310c[_0x473928]=[]),_0x32310c[_0x473928]['push'](_0x294a64),_0x32310c;},{});_0x355c90['plugins']['has']('ImageInsertUI')&&_0x355c90['commands']['get']('uploadcare')&&Object['entries'](_0x404252)['forEach'](([_0x4984ed,_0x2e4116])=>{_0x355c90['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x4984ed,'observable':()=>_0x4ddefd,'buttonViewCreator':()=>this['_createToolbarButton'](_0x2e4116),'formViewCreator':()=>this['_createDropdownButtons'](_0x2e4116),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x2e4116),'override':'assetManager'!==_0x4984ed});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x5dc259){const {locale:_0x5ab8c4}=this['editor'];return _0x5dc259['map'](_0x357950=>{const _0x1b25f7=_(_0x5ab8c4,_0x357950,'Insert');switch(_0x357950){case i['Local']:return{'icon':_0x181c64,'type':i['Local'],..._0x1b25f7};case i['URL']:return{'icon':_0x53f76f,'type':i['URL'],..._0x1b25f7};case i['Dropbox']:return{'icon':_0x4a783b,'type':i['Dropbox'],..._0x1b25f7};case i['Facebook']:return{'icon':_0x502ce8,'type':i['Facebook'],..._0x1b25f7};case i['GDrive']:return{'icon':_0x5329b5,'type':i['GDrive'],..._0x1b25f7};case i['GPhotos']:return{'icon':_0x10fdba,'type':i['GPhotos'],..._0x1b25f7};case i['OneDrive']:return{'icon':_0x4caf60,'type':i['OneDrive'],..._0x1b25f7};}});}['_getIntegrationKey'](_0x1d5ddc){switch(_0x1d5ddc){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x51105b,_0x52d826){const _0x3eac16=this['editor'],_0x3d441b=new _0x51105b(_0x3eac16['locale']),_0x2de297=_0x3eac16['commands']['get']('uploadcare');return _0x3d441b['bind']('isEnabled')['to'](_0x2de297),_0x3d441b['on']('execute',()=>{_0x2de297['execute'](_0x52d826);}),_0x3d441b;}['_createToolbarButton'](_0x2c1437){const {locale:_0x2ff5ae}=this['editor'],_0x2179e0=this['editor']['plugins']['get']('ImageInsertUI'),_0x186a92=_0x2c1437[0x0],_0x46f572=this['_createButton'](_0xca984,_0x186a92['type']);return _0x46f572['icon']=_0x186a92['icon'],_0x46f572['bind']('label')['to'](_0x2179e0,'isImageSelected',_0x5c2106=>_(_0x2ff5ae,_0x186a92['type'],_0x5c2106?'Replace':'Insert')['text']),_0x46f572['tooltip']=!0x0,_0x46f572;}['_createDropdownButtons'](_0x335959){const {locale:_0x3f43e8}=this['editor'],_0x1290b1=this['editor']['plugins']['get']('ImageInsertUI');return _0x335959['map'](_0x44e867=>{const _0x4cfcb8=this['_createButton'](_0xca984,_0x44e867['type']);return _0x4cfcb8['withText']=!0x0,_0x4cfcb8['icon']=_0x44e867['icon'],_0x4cfcb8['bind']('label')['to'](_0x1290b1,'isImageSelected',_0x850b6=>_(_0x3f43e8,_0x44e867['type'],_0x850b6?'Replace':'Insert')['text']),_0x4cfcb8;});}['_createMenuBarButtons'](_0x3eca99){return _0x3eca99['map'](_0x14f714=>{const _0x56c096=this['_createButton'](_0x345aac,_0x14f714['type']);return _0x56c096['icon']=_0x14f714['icon'],_0x56c096['label']=_0x14f714['shortText'],_0x56c096;});}}class F extends _0x25a3d4{['focusTracker'];['focusCycler'];constructor(_0x3ba2dc){super(_0x3ba2dc),this['focusTracker']=new _0x11e928(),this['focusCycler']=new _0x496d6c({'focusables':this['createCollection'](),'focusTracker':this['focusTracker']});}['getFocusableElement'](){return{'tag':'div','attributes':{'aria-hidden':'true','tabindex':'0'},'on':{'focus':this['bindTemplate']['to'](()=>{this['focusCycler']['fire']('forwardCycle');})}};}}class x extends F{constructor(_0x4539ac,_0x56b66c){super(_0x4539ac),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-'+_0x56b66c}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function C(_0xcc5fdb,_0x521001){const _0x4a36b6=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x4e4762=>_0x4e4762<=_0x521001)['map'](_0x3b236e=>_0xcc5fdb['replace'](/\/$/,'')+'/-/resize/'+_0x3b236e+'x/\x20'+_0x3b236e+'w');return{'imageFallbackUrl':_0xcc5fdb,'imageSources':[{'srcset':_0x4a36b6['join'](',\x20'),'sizes':'(max-width:\x20'+_0x521001+'px)\x20100vw,\x20'+_0x521001+'px','type':'image/webp'}]};}function S(_0x41be23,_0x204a88,_0x4654b3){const _0x1bc902=_0x41be23['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x1bc902?parseInt(_0x1bc902[0x1],0xa):_0x204a88,'height':_0x1bc902?parseInt(_0x1bc902[0x2],0xa):_0x4654b3};}function p(_0x4c836d,_0x45a089){const _0x2bbaf3=new(_0x156864())(),_0x432e31=_0x4c836d['plugins']['get']('ImageUtils'),_0xebd8ec=_0x4c836d['editing']['mapper']['toViewElement'](_0x45a089),_0x60eca2=_0x432e31['findViewImgElement'](_0xebd8ec),_0x11955e=_0x4c836d['editing']['view']['domConverter']['viewToDom'](_0x60eca2),_0x403214=_0x45a089['getAttribute']('width'),_0x2d9b4f=_0x45a089['getAttribute']('height'),_0x4068c4='image-processing';_0x4c836d['editing']['view']['change'](_0x41dfe1=>{_0x41dfe1['addClass'](_0x4068c4,_0xebd8ec),_0x41dfe1['setStyle']('aspect-ratio',_0x403214+'/'+_0x2d9b4f,_0x60eca2);}),_0x2bbaf3['listenTo'](_0x11955e,'load',()=>{_0x2bbaf3['stopListening'](_0x11955e,'load'),_0x4c836d['editing']['view']['change'](_0x417527=>{_0x417527['removeClass'](_0x4068c4,_0xebd8ec),_0x417527['removeStyle']('aspect-ratio',_0x60eca2);});});}function G(_0x51ee84){if(Array['isArray'](_0x51ee84)){const _0x2031c0=_0x51ee84['map'](G);return _0x4e2658=>_0x2031c0['some'](_0x2bb1cd=>_0x2bb1cd(_0x4e2658));}if('origin'==_0x51ee84){const _0x489e77=_0x3155b2['window']['location']['origin'];return _0x74733a=>new URL(_0x74733a,_0x3155b2['document']['baseURI'])['origin']==_0x489e77;}return'function'==typeof _0x51ee84?_0x51ee84:_0x51ee84 instanceof RegExp?_0xe40af3=>!(!_0xe40af3['match'](_0x51ee84)&&!_0xe40af3['replace'](/^https?:\/\//,'')['match'](_0x51ee84)):()=>!0x1;}function A(_0x40de4e,_0x2f5999){return _0x283c5e(_0x40de4e['target'])['includes'](_0x2f5999);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x768f9c(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x42be52,_0x4f20e7,_0x5ba3b6){super(),this['_editor']=_0x42be52,this['_editing']=_0x4f20e7,this['_dialog']=_0x42be52['plugins']['get'](_0x18f095),this['_api']=_0x4f20e7['ctxElement']['getAPI'](),this['_type']=_0x5ba3b6,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:_0x5eee2c,model:_0x59404b}=this['_editor'],_0x180412=_0x59404b['document']['selection']['getSelectedElement'](),_0x498e64=_0x180412&&(_0x180412['is']('element','imageBlock')||_0x180412['is']('element','imageInline'));this['_formView']=new x(_0x5eee2c,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x181c64,'title':_(_0x5eee2c,this['_type'],_0x498e64?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x5ea1b7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x3ad440=>!A(_0x3ad440,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x22b714}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x7a23c0=>{const _0x5a5370=_0x22b714['length'];for(const _0x421a3c of _0x22b714){const _0x2a4b7f=_0x421a3c===_0x22b714[_0x5a5370-0x1],{cdnUrl:_0x102bdf,fileInfo:_0x3f2658}=_0x421a3c;if(!_0x102bdf||!_0x3f2658)continue;const {width:_0x2f17b0,height:_0x56fbf9}=_0x3f2658['imageInfo'],_0x4f4832=S(_0x102bdf,_0x2f17b0,_0x56fbf9),_0x27cb22=C(_0x102bdf,_0x4f4832['width']),_0x4a5b89={'id':_0x3f2658['uuid'],'type':'image','attributes':{'imageDimension':_0x4f4832,..._0x27cb22}};this['_insertAsset'](_0x4a5b89,_0x2a4b7f,_0x7a23c0);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x413dd2=>{'idle'===_0x413dd2['detail']['status']&&!_0x413dd2['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x4d17bc,_0x890300,_0x3a8080){const _0x25535f=this['_editor']['model']['document']['selection'],_0x30e46c=_0x25535f['getSelectedElement'](),_0x3c4955=!(!_0x30e46c||!_0x30e46c['is']('element','imageInline'));_0x3a8080['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x4d17bc,_0x3c4955),_0x890300||_0x3a8080['setSelection'](_0x25535f['getLastPosition']());}['_insertImage'](_0x3f1df5,_0x422e91){const _0x36f3b6=this['_editor'],{imageDimension:_0x5c7f5f,imageFallbackUrl:_0x892555,imageSources:_0x4af9df}=_0x3f1df5['attributes'];_0x36f3b6['execute']('insertImage',{'imageType':_0x422e91?'imageInline':null,'source':{'uploadcareImageId':_0x3f1df5['id'],'src':_0x892555,'sources':_0x4af9df,..._0x5c7f5f}});}}class w extends _0x45201e{['_editing'];['_controller']=null;static get['requires'](){return[_0x18f095,o];}constructor(_0x47556b){super(_0x47556b),this['_editing']=_0x47556b['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x3f5c60){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x3f5c60);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x3fecac,..._0x5ab1be}){return _0x55429f(_0x3fecac,_0x5ab1be);}static['getInfo'](_0x560a45,_0x5b260b){return _0xc3156f(_0x560a45,_0x5b260b);}}class f extends _0x35bcdb{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x26f3c6,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x1367f2=this['editor'];if(!!!_0x1367f2['config']['get']('uploadcare'))return;_0x1367f2['plugins']['get'](_0x26f3c6)['createUploadAdapter']=_0xcec47b=>new k(_0xcec47b,_0x1367f2),_0x1367f2['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x5a38bb,{imageElement:_0x59f02c,data:_0x33d2eb})=>{_0x1367f2['model']['change'](_0x286295=>{_0x286295['setAttribute']('uploadcareImageId',_0x33d2eb['uploadcareImageId'],_0x59f02c);});});}}class k{['loader'];['editor'];['controller'];constructor(_0xc89da6,_0xad450e){this['loader']=_0xc89da6,this['editor']=_0xad450e,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x1e31e5=await this['loader']['file'];return j['upload']({'file':_0x1e31e5,'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':_0x105bce=>{_0x105bce&&_0x105bce['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x105bce['value']);}})['then'](async _0x102875=>{const {imageFallbackUrl:_0x54db1e,imageSources:_0x727209}=C(_0x102875['cdnUrl'],_0x102875['imageInfo']['width']);return{'uploadcareImageId':_0x102875['uuid'],'default':_0x54db1e,'sources':_0x727209};})['catch'](()=>{const _0x2345c3=t('Cannot\x20upload\x20file:')+('\x20'+_0x1e31e5['name']+'.');return Promise['reject'](_0x2345c3);});}['abort'](){this['controller']['abort']();}}class o extends _0x35bcdb{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x18f095];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x5d9d43){super(_0x5d9d43),this['ucContextId']=_0x19f593();}['init'](){const _0xf8b819=this['editor'];_0xf8b819['commands']['add']('uploadcare',new w(_0xf8b819));}['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 _0x3ae6bb=_0x3155b2['document']['querySelector']('input[uploadcare-file-input]');_0x3ae6bb&&_0x3ae6bb['remove']();}),async function(_0x112313){const _0xe773ca=_0x2838fa([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]),_0x360a9a=0x535f8c3a,_0xf98384=0x5358f65a^_0x360a9a,_0x18066f=window[_0x2838fa([0x44,0x61,0x74,0x65])][_0x2838fa([0x6e,0x6f,0x77])](),_0x24dd61=_0x112313[_0x2838fa([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5aa255=new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58b35f=>{_0x24dd61[_0x2838fa([0x6f,0x6e,0x63,0x65])](_0x2838fa([0x72,0x65,0x61,0x64,0x79]),_0x58b35f);}),_0x51c29d={[_0x2838fa([0x6b,0x74,0x79])]:_0x2838fa([0x45,0x43]),[_0x2838fa([0x75,0x73,0x65])]:_0x2838fa([0x73,0x69,0x67]),[_0x2838fa([0x63,0x72,0x76])]:_0x2838fa([0x50,0x2d,0x32,0x35,0x36]),[_0x2838fa([0x78])]:_0x2838fa([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]),[_0x2838fa([0x79])]:_0x2838fa([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]),[_0x2838fa([0x61,0x6c,0x67])]:_0x2838fa([0x45,0x53,0x32,0x35,0x36])},_0x55402f=_0x24dd61[_0x2838fa([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2838fa([0x67,0x65,0x74])](_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x87829e(){let _0x4eee3c,_0x5485bf=null,_0x14752e=null;try{if(_0x55402f==_0x2838fa([0x47,0x50,0x4c]))return _0x2838fa([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4eee3c=_0x3b0f57(),!_0x4eee3c)return _0x2838fa([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4eee3c[_0x2838fa([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x14752e=_0x2cd89d(_0x4eee3c[_0x2838fa([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4eee3c[_0x2838fa([0x6a,0x74,0x69])])),await _0x3f5a92()?_0x29402f()?_0x14c578()?_0x2838fa([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x193aca()?(_0x4eee3c[_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2838fa([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5485bf=_0x3b8e1d(_0x2838fa([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4eee3c[_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2838fa([0x74,0x72,0x69,0x61,0x6c])&&(_0x5485bf=_0x3b8e1d(_0x2838fa([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4ef42e()):_0x2838fa([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2838fa([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2838fa([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2838fa([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x14c578(){const _0x14a397=[_0x2838fa([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2838fa([0x74,0x72,0x69,0x61,0x6c])][_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4eee3c[_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x18066f/0x3e8:0xe10*_0xf98384;return _0x4eee3c[_0x2838fa([0x65,0x78,0x70])]<_0x14a397;}function _0x29402f(){const _0x538117=_0x4eee3c[_0x2838fa([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x538117&&(!!_0x538117[_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2838fa([0x2a]))||!!_0x538117[_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2838fa([0x55,0x50,0x4c,0x43])));}function _0x193aca(){const _0x2d78ec=_0x4eee3c[_0x2838fa([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2d78ec||0x0==_0x2d78ec[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x19a2f7}=new URL(window[_0x2838fa([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2d78ec[_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x19a2f7))return!0x0;const _0x28e090=_0x19a2f7[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])](_0x2838fa([0x2e]));return _0x2d78ec[_0x2838fa([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a3d2e=>_0x1a3d2e[_0x2838fa([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2838fa([0x2a])))[_0x2838fa([0x6d,0x61,0x70])](_0x25d3a7=>_0x25d3a7[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])](_0x2838fa([0x2e])))[_0x2838fa([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x34dacd=>_0x34dacd[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x28e090[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2838fa([0x6d,0x61,0x70])](_0x4529a1=>Array(_0x28e090[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4529a1[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2838fa([0x66,0x69,0x6c,0x6c])](_0x4529a1[0x0]===_0x2838fa([0x2a])?_0x2838fa([0x2a]):'')[_0x2838fa([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4529a1))[_0x2838fa([0x73,0x6f,0x6d,0x65])](_0x2a5679=>_0x28e090[_0x2838fa([0x65,0x76,0x65,0x72,0x79])]((_0x13a1cc,_0xe498a7)=>_0x2a5679[_0xe498a7]===_0x13a1cc||_0x2a5679[_0xe498a7]===_0x2838fa([0x2a])));}function _0x4ef42e(){return _0x5485bf&&_0x14752e?new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4be6b1,_0x1c02ea)=>{_0x5485bf[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x4be6b1,_0x1c02ea),_0x14752e[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x5d33f0=>{_0x5d33f0!=_0x2838fa([0x56,0x61,0x6c,0x69,0x64])&&_0x4be6b1(_0x5d33f0);},_0x1c02ea);}):_0x5485bf||_0x14752e||_0x2838fa([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2cd89d(_0x4bb19c,_0x2e2c6d){return new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44c742=>{if(_0x252a03())return _0x44c742(_0x2838fa([0x56,0x61,0x6c,0x69,0x64]));_0x38b391(),_0x24dd61[_0x2838fa([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2838fa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xbaa147=!0x1;const _0x2441f3=_0x19f593();function _0x41243d(_0x539836){return!!_0x539836&&(typeof _0x539836===_0x2838fa([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x539836===_0x2838fa([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x539836[_0x2838fa([0x74,0x68,0x65,0x6e])]===_0x2838fa([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x539836[_0x2838fa([0x63,0x61,0x74,0x63,0x68])]===_0x2838fa([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1d8691(_0x22f889){_0x555161(_0x22f889)[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x3d790f=>{if(!_0x3d790f||_0x3d790f[_0x2838fa([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2838fa([0x6f,0x6b]))return _0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x30fb55(_0x22e259(_0x2441f3+_0x2e2c6d))!=_0x3d790f[_0x2838fa([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2838fa([0x56,0x61,0x6c,0x69,0x64]);})[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x307f8d=>(_0x1bafc1(),_0x307f8d),()=>{const _0x5f5bd5=_0x2b4039();return null==_0x5f5bd5?(_0x1bafc1(),_0x2838fa([0x56,0x61,0x6c,0x69,0x64])):_0x2838fa(_0x18066f-_0x5f5bd5>(0x7753083a^_0x360a9a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x44c742)[_0x2838fa([0x63,0x61,0x74,0x63,0x68])](()=>{_0x44c742(_0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1a4ef2=0x536962ba^_0x360a9a;function _0x1bafc1(){const _0x33f8a8=_0x2838fa([0x6c,0x6c,0x63,0x74,0x2d])+_0x30fb55(_0x22e259(_0x4bb19c)),_0x53bf4f=_0x1679a0(_0x30fb55(window[_0x2838fa([0x4d,0x61,0x74,0x68])][_0x2838fa([0x63,0x65,0x69,0x6c])](_0x18066f/_0x1a4ef2)));window[_0x2838fa([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2838fa([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x33f8a8,_0x53bf4f);}function _0x2b4039(){const _0xffd089=_0x2838fa([0x6c,0x6c,0x63,0x74,0x2d])+_0x30fb55(_0x22e259(_0x4bb19c)),_0x24dfc1=window[_0x2838fa([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2838fa([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xffd089);return _0x24dfc1?window[_0x2838fa([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1679a0(_0x24dfc1),0x10)*_0x1a4ef2:null;}function _0x555161(_0x3cefb9){return new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4ca7ca,_0xc1e840)=>{_0x3cefb9[_0x2838fa([0x74,0x68,0x65,0x6e])](_0x4ca7ca,_0xc1e840),window[_0x2838fa([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xc1e840,0x535e58fa^_0x360a9a);});}}_0x24dd61[_0x2838fa([0x6f,0x6e])](_0x2838fa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x51803d,_0x5a2987)=>{if(_0x5a2987[0x0]!=_0x4bb19c)return _0x44c742(_0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5a2987[0x1]={..._0x5a2987[0x1],[_0x2838fa([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2441f3};},{[_0x2838fa([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2838fa([0x68,0x69,0x67,0x68])}),_0x24dd61[_0x2838fa([0x6f,0x6e])](_0x2838fa([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5534d5=>{_0x41243d(_0x5534d5[_0x2838fa([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xbaa147=!0x0,_0x1d8691(_0x5534d5[_0x2838fa([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2838fa([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2838fa([0x6c,0x6f,0x77])}),_0x5aa255[_0x2838fa([0x74,0x68,0x65,0x6e])](()=>{_0xbaa147||_0x44c742(_0x2838fa([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x252a03(){return _0x24dd61[_0x2838fa([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2838fa([0x76,0x69,0x65,0x77])][_0x2838fa([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2838fa([0x61,0x75,0x74,0x6f]);}function _0x38b391(){_0x24dd61[_0x2838fa([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2838fa([0x76,0x69,0x65,0x77])][_0x2838fa([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2838fa([0x61,0x75,0x74,0x6f]);}}function _0x3b8e1d(_0x540e53){const _0x1859d6=[new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b5191=>setTimeout(_0x3b5191,0x5356b2f6^_0x360a9a)),_0x5aa255[_0x2838fa([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x598019=>{let _0x279366=0x0;_0x24dd61[_0x2838fa([0x6d,0x6f,0x64,0x65,0x6c])][_0x2838fa([0x6f,0x6e])](_0x2838fa([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x366f41,_0x576b1e)=>{_0x576b1e[0x0][_0x2838fa([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x279366++,_0x279366==(0x535f8dc2^_0x360a9a)&&(_0x598019(),_0x366f41[_0x2838fa([0x6f,0x66,0x66])]());});}))];return window[_0x2838fa([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2838fa([0x72,0x61,0x63,0x65])](_0x1859d6)[_0x2838fa([0x74,0x68,0x65,0x6e])](()=>_0x540e53);}async function _0x4e7b01(){await _0x5aa255,_0x24dd61[_0x2838fa([0x6d,0x6f,0x64,0x65,0x6c])][_0x2838fa([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5dcdb7,_0x24dd61[_0x2838fa([0x6d,0x6f,0x64,0x65,0x6c])][_0x2838fa([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5dcdb7,_0x24dd61[_0x2838fa([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2838fa([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x12469e(_0x52f3a1){const _0x340aa6=_0x26ed26();_0x24dd61[_0x340aa6]=_0x2838fa([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x52f3a1,_0x52f3a1!=_0x2838fa([0x56,0x61,0x6c,0x69,0x64])&&_0x4e7b01();}function _0x26ed26(){const _0x3fa54e=window[_0x2838fa([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2838fa([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2838fa([0x6e,0x6f,0x77])]())[_0x2838fa([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2838fa([0x2e]),'');let _0x30f563=_0x2838fa([0x68]);for(let _0x3ec965=0x0;_0x3ec965<_0x3fa54e[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3ec965+=0x2){let _0x17c79f=window[_0x2838fa([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3fa54e[_0x2838fa([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ec965,_0x3ec965+0x2));_0x17c79f>=_0xe773ca[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x17c79f-=_0xe773ca[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x30f563+=_0xe773ca[_0x17c79f];}return _0x30f563;}function _0x3b0f57(){const _0x637513=_0x55402f[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])](_0x2838fa([0x2e]));if(0x3!=_0x637513[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x576779(_0x637513[0x1]);function _0x576779(_0x5529fe){const _0x15a335=_0x3d90ba(_0x5529fe);return _0x15a335&&_0x15e74b()?_0x15a335:null;function _0x15e74b(){const _0x27f104=_0x15a335[_0x2838fa([0x6a,0x74,0x69])],_0xdc0763=window[_0x2838fa([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x27f104[_0x2838fa([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x27f104[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4c2b9a={..._0x15a335,[_0x2838fa([0x6a,0x74,0x69])]:_0x27f104[_0x2838fa([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x27f104[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4c2b9a[_0x2838fa([0x76,0x63])],_0x22e259(_0x4c2b9a)==_0xdc0763;}}}async function _0x3f5a92(){let _0x5ab93e=!0x0;try{const _0x199a82=_0x55402f[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])](_0x2838fa([0x2e])),[_0x24ac3e,_0x5a7ded,_0x28c291]=_0x199a82;return _0x42ef02(_0x24ac3e),await _0x3dfd3b(_0x24ac3e,_0x5a7ded,_0x28c291),_0x5ab93e;}catch{return!0x1;}function _0x42ef02(_0x524925){const _0x20342a=_0x3d90ba(_0x524925);_0x20342a&&_0x20342a[_0x2838fa([0x61,0x6c,0x67])]==_0x2838fa([0x45,0x53,0x32,0x35,0x36])||(_0x5ab93e=!0x1);}async function _0x3dfd3b(_0xc95f94,_0x5f0811,_0x48148c){const _0x5f1851=window[_0x2838fa([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2838fa([0x66,0x72,0x6f,0x6d])](_0x25e4e0(_0x48148c),_0x4a518b=>_0x4a518b[_0x2838fa([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1b70f1=new window[(_0x2838fa([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2838fa([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xc95f94+_0x2838fa([0x2e])+_0x5f0811),_0x287ece=window[_0x2838fa([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2838fa([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x287ece)return;const _0x3fda88=await _0x287ece[_0x2838fa([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2838fa([0x6a,0x77,0x6b]),_0x51c29d,{[_0x2838fa([0x6e,0x61,0x6d,0x65])]:_0x2838fa([0x45,0x43,0x44,0x53,0x41]),[_0x2838fa([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2838fa([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2838fa([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x287ece[_0x2838fa([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2838fa([0x6e,0x61,0x6d,0x65])]:_0x2838fa([0x45,0x43,0x44,0x53,0x41]),[_0x2838fa([0x68,0x61,0x73,0x68])]:{[_0x2838fa([0x6e,0x61,0x6d,0x65])]:_0x2838fa([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3fda88,_0x5f1851,_0x1b70f1)||(_0x5ab93e=!0x1);}}function _0x3d90ba(_0x2bd1c6){return _0x2bd1c6[_0x2838fa([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2838fa([0x65,0x79]))?JSON[_0x2838fa([0x70,0x61,0x72,0x73,0x65])](_0x25e4e0(_0x2bd1c6)):null;}function _0x25e4e0(_0x66e777){return window[_0x2838fa([0x61,0x74,0x6f,0x62])](_0x66e777[_0x2838fa([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2838fa([0x2b]))[_0x2838fa([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2838fa([0x2f])));}function _0x22e259(_0xb6df72){let _0x58c32f=0x1505;function _0x2b820d(_0x4d0dd0){for(let _0x308229=0x0;_0x308229<_0x4d0dd0[_0x2838fa([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x308229++){const _0x1b922e=_0x4d0dd0[_0x2838fa([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x308229);_0x58c32f=(_0x58c32f<<0x5)+_0x58c32f+_0x1b922e,_0x58c32f&=_0x58c32f;}}function _0x55b7d1(_0x4366b1){Array[_0x2838fa([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4366b1)?_0x4366b1[_0x2838fa([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x55b7d1):_0x4366b1&&typeof _0x4366b1==_0x2838fa([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2838fa([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4366b1)[_0x2838fa([0x73,0x6f,0x72,0x74])]()[_0x2838fa([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x49b96e,_0x22628f])=>{_0x2b820d(_0x49b96e),_0x55b7d1(_0x22628f);}):_0x2b820d(window[_0x2838fa([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4366b1));}return _0x55b7d1(_0xb6df72),_0x58c32f>>>0x0;}function _0x30fb55(_0x2f6b18){return _0x2f6b18[_0x2838fa([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2838fa([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2838fa([0x30]));}function _0x1679a0(_0x1a3808){return _0x1a3808[_0x2838fa([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2838fa([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2838fa([0x6a,0x6f,0x69,0x6e])]('');}function _0x5dcdb7(){}function _0x2838fa(_0x32bf9f){return _0x32bf9f['map'](_0x45985f=>String['fromCharCode'](_0x45985f))['join']('');}_0x12469e(await _0x87829e());}(this);}['_initSchema'](){const _0x5dcac0=this['editor']['model']['schema'];_0x5dcac0['isRegistered']('imageBlock')&&_0x5dcac0['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x5dcac0['isRegistered']('imageInline')&&_0x5dcac0['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x4ec98f=this['editor'];_0x4ec98f['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x4ec98f['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x578558=>_0x578558['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x1dfd35=_0x4ec98f['commands']['get']('replaceImageSource');_0x1dfd35&&this['listenTo'](_0x1dfd35,'cleanupImage',(_0x21f227,[_0x1e6dab,_0x2641cf])=>{_0x1e6dab['removeAttribute']('uploadcareImageId',_0x2641cf);});}['_initConfig'](){const _0x315bc6=this['editor']['config']['get']('uploadcare.uploader')||{},_0x1bfab6=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x3fc350(_0x3155b2['document'],'uc-config',{..._0x315bc6,'pubkey':_0x1bfab6,'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']=_0x1b72b5=>{if('closeMax'==_0x1b72b5)return'#uc-icon-arrow-down';},_0x3155b2['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x3fc350(_0x3155b2['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x3155b2['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x2fa2e1=this['editor']['commands']['get']('insertImage');_0x2fa2e1&&this['listenTo'](_0x2fa2e1,'execute',()=>{const _0x424ddd=this['editor']['model']['document']['selection']['getSelectedElement']();_0x424ddd&&_0x424ddd['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x424ddd);});});const _0x568504=this['editor']['commands']['get']('uploadcareImageReplace');_0x568504&&this['listenTo'](_0x568504,'execute',()=>{const _0x3166f7=this['editor']['model']['document']['selection']['getSelectedElement']();_0x3166f7&&_0x3166f7['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x3166f7);});});}}class tt extends _0x35bcdb{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x92767b){super(_0x92767b),_0x92767b['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0xc1a756['defineComponents'](_0xc1a756),this['_defineLocale']();}['_defineLocale'](){const _0x774bed=this['editor']['config']['get']('uploadcare.locale'),_0xabea9a=this['editor']['locale']['contentLanguage'];_0x774bed&&_0xc1a756['defineLocale'](_0xabea9a,_0x774bed);}}class ii extends _0x25a3d4{constructor(_0x30cdeb){super(_0x30cdeb);const t=_0x30cdeb['t'],_0x40ba77=this['bindTemplate'],_0x169254=new _0x36630e();_0x169254['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':[_0x169254,{'text':_0x40ba77['to']('imageUploadProgress',_0x1c4a7b=>t('Loading\x20image...')+'\x20('+(_0x1c4a7b||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ti extends _0x25a3d4{constructor(_0x264c29){super(_0x264c29);const t=_0x264c29['t'];this['set']('errorType',null);const _0x53eea9=new _0xca984(_0x264c29);_0x53eea9['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x53eea9['withText']=!0x0,_0x53eea9['class']='ck-button-action',_0x53eea9['on']('execute',()=>{this['fire']('retry');}),_0x53eea9['bind']('isVisible')['to'](this,'errorType',_0x34bba8=>'NotFound'!==_0x34bba8);const _0x249ef9=new _0xedde6c();_0x249ef9['content']=_0x4be8ac,_0x249ef9['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x317e4b=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':[_0x249ef9,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x317e4b['to']('errorType',_0x4531d8=>t('NotFound'!==_0x4531d8?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x53eea9]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}class ei extends _0x25a3d4{constructor(_0x25a387,_0x571cdb){super(_0x25a387);const _0x43ab9c=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x571cdb,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x43ab9c['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x1df4a7,_0x428439,_0x44599c){super(_0x1df4a7),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x1df4a7),this['_errorView']=new ti(_0x1df4a7),this['_editingView']=new ei(_0x1df4a7,_0x44599c),this['_focusableView']=new _0x25a3d4(_0x1df4a7),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x428439),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'],_0x140a18=>{this['_addUploadcareImageEditorListeners'](_0x140a18);});}),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'](_0x43013a,_0x1218e2){const _0x23c808='uc-cloud-image-editor',_0x8eef09=_0x43013a['querySelector'](_0x23c808);if(_0x8eef09)return _0x1218e2(_0x8eef09);const _0x9543a5=new MutationObserver(_0x2c681f=>{const _0x522c0b=_0x2c681f['filter'](_0x553cf8=>_0x553cf8['target']===_0x43013a&&_0x553cf8['addedNodes']['length']>0x0&&_0x553cf8['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x23c808);_0x522c0b['length']&&(_0x9543a5['disconnect'](),_0x1218e2(_0x522c0b[0x0]['addedNodes'][0x0]));});_0x9543a5['observe'](_0x43013a,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x246628){_0x246628['addEventListener']('apply',_0x3b661c=>{this['fire']('apply',{'imageSrc':_0x3b661c['detail']['cdnUrl']});}),_0x246628['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x768f9c(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x593499,_0x409ede,_0x165c35){super(),this['_editor']=_0x593499,this['_dialog']=_0x409ede,this['_imageElement']=_0x165c35,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 _0x1088b5=this['_imageElement'],_0xeceddb=_0x1088b5['getAttribute']('uploadcareImageId'),_0x2b494b=_0x1088b5['getAttribute']('src');if(_0xeceddb)await this['_loadImageInfo'](_0xeceddb,_0x2b494b);else{if(this['_imageCache']['has'](_0x2b494b)){const _0x23b7b0=this['_imageCache']['get'](_0x2b494b);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x23b7b0['url'],this['imageDimension']=_0x23b7b0['dimension'],this['imageId']=_0x23b7b0['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x15dd92}=this['_editor'],t=_0x15dd92['t'],_0xa64668=new X(_0x15dd92,this['imageStatus'],this['_attributes']);_0xa64668['bind']('status')['to'](this,'imageStatus'),_0xa64668['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0xa64668['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0xa64668['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0xa64668,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x24a86c,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0xa64668,'position':_0x5ea1b7['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0xa64668['focus']();},'onHide':()=>{_0xa64668['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x13325f=>!A(_0x13325f,_0xa64668['element'])}});}['_loadImageInfo'](_0xb499dd,_0x16226b){return j['getInfo'](_0xb499dd,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x26a1a6=>{const {width:_0x5f9fcc,height:_0x36c20a}=_0x26a1a6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x16226b,this['imageDimension']={'width':_0x5f9fcc,'height':_0x36c20a},this['imageId']=_0xb499dd;})['catch'](_0x10c13a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x10c13a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x4710a6,_0x3b0c15){return this['_getImageAsFile'](_0x4710a6)['then'](_0x370283=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl'),'baseCDN':this['_editor']['config']['get']('uploadcare.uploader.cdnCname'),'signal':_0x3b0c15['signal'],'file':_0x370283,'onProgress':_0x1f767f=>{_0x1f767f&&_0x1f767f['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x1f767f['value']));}}))['then'](_0x1766e3=>{const {width:_0x4ff74d,height:_0xec6bd}=_0x1766e3['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1766e3['cdnUrl'],this['imageDimension']={'width':_0x4ff74d,'height':_0xec6bd},this['imageId']=_0x1766e3['uuid'],this['imageUploadProgress']=null;const _0x373844=_0x4710a6['getAttribute']('src');this['_imageCache']['set'](_0x373844,{'id':_0x1766e3['uuid'],'url':_0x1766e3['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x3b714a=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x3b714a['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x43282a,_0x509892){_0x43282a['on']('apply',(_0x416b3e,_0x1bedfb)=>{this['_replaceImage'](_0x509892,_0x1bedfb['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x43282a['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x43282a['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x2fedc5,_0x120f4c,_0x32787d){const _0x52fe9f=this['_editor'],{width:_0x589bd3,height:_0x43ef46}=S(_0x120f4c,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3f17b4,imageSources:_0x1d0ce8}=C(_0x120f4c,_0x589bd3);_0x52fe9f['model']['change'](_0x2b6f73=>{if('$graveyard'===_0x2fedc5['root']['rootName']){_0x52fe9f['execute']('insertImage',{'imageType':_0x2fedc5['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x2fedc5['getAttributes']()),'uploadcareImageId':_0x32787d,'src':_0x3f17b4,'sources':_0x1d0ce8,'width':_0x589bd3,'height':_0x43ef46}});const _0x3a51b6=_0x2fedc5['getChildren']();_0x2fedc5=_0x52fe9f['model']['document']['selection']['getSelectedElement']();for(const _0x537359 of _0x3a51b6)_0x2b6f73['append'](_0x2b6f73['cloneElement'](_0x537359),_0x2fedc5);}else _0x2b6f73['setSelection'](_0x2fedc5,'on'),_0x52fe9f['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x2fedc5['getAttributes']()),'uploadcareImageId':_0x32787d,'src':_0x3f17b4,'sources':_0x1d0ce8,'width':_0x589bd3,'height':_0x43ef46},_0x2fedc5);_0x2b6f73['setSelection'](_0x2fedc5,'on');});}async['_getImageAsFile'](_0x3027b4){const _0x3cd1e0=_0x3155b2['window'],_0x21dcea=_0x3155b2['document']['location']['href'],_0x28d719=new _0x3cd1e0['URL'](_0x3027b4['getAttribute']('src'),_0x21dcea);if('data:'===_0x28d719['protocol']){const _0x403c92=_0x28d719['href']['split'](','),_0x3a2809=_0x403c92[0x0]['match'](/:(.*?);/)[0x1],_0x30cee9=_0x3a2809['split']('/')[0x1],_0x5e3167=_0x3cd1e0['atob'](_0x403c92[_0x403c92['length']-0x1]);let _0xd00e4c=_0x5e3167['length'];const _0x360328=new _0x3cd1e0['Uint8Array'](_0xd00e4c);for(;_0xd00e4c--;)_0x360328[_0xd00e4c]=_0x5e3167['charCodeAt'](_0xd00e4c);return new _0x3cd1e0['File']([_0x360328],'image.'+_0x30cee9,{'type':_0x3a2809});}const _0x178b1c=_0x28d719['href']['split']('/'),_0x3b55a9=_0x178b1c[_0x178b1c['length']-0x1],_0x218a1c=_0x3b55a9['split']('.')[0x1];return _0x3cd1e0['fetch'](_0x28d719['href'])['then'](_0x435d89=>_0x435d89['clone']()['blob']())['then'](_0x49cc2d=>new _0x3cd1e0['File']([_0x49cc2d],_0x3b55a9,{'type':'image/'+_0x218a1c}));}}class O extends _0x45201e{['imageEditController'];static get['requires'](){return[_0x18f095];}['_isEditable'];constructor(_0x4bf575){super(_0x4bf575),this['imageEditController']=void 0x0,this['_isEditable']=function(_0x34a797){const _0x485d2f=G(_0x34a797);return _0x5c18e9=>!(!_0x5c18e9||!_0x5c18e9['is']('element','imageBlock')&&!_0x5c18e9['is']('element','imageInline'))&&(!!_0x5c18e9['hasAttribute']('uploadcareImageId')||!!_0x5c18e9['hasAttribute']('src')&&_0x485d2f(_0x5c18e9['getAttribute']('src')));}(_0x4bf575['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x349faa=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x349faa);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x48674e=this['editor']['model']['document']['selection']['getSelectedElement']();_0x48674e&&(_0x48674e['is']('element','imageBlock')||_0x48674e['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x18f095),_0x48674e),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x45201e{['refresh'](){const _0x51d75d=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x51d75d&&(_0x51d75d['is']('element','imageBlock')||_0x51d75d['is']('element','imageInline')));}['execute'](_0x5dd305){const _0x17c05a=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x33eb96=>{_0x33eb96['setAttributes'](_0x5dd305,_0x17c05a),_0x33eb96['removeAttribute']('srcset',_0x17c05a),_0x33eb96['removeAttribute']('sizes',_0x17c05a);});}}class m extends _0x35bcdb{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x2c0336,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xa1651}=this;_0xa1651['commands']['add']('uploadcareImageEdit',new O(_0xa1651)),_0xa1651['commands']['add']('uploadcareImageReplace',new R(_0xa1651));}}class g extends _0x35bcdb{['_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 _0x27d4d1=this['editor'];_0x27d4d1['ui']['componentFactory']['add']('uploadcareImageEdit',_0x335f8a=>{const _0x234bef=_0x27d4d1['commands']['get']('uploadcareImageEdit'),_0x1bc4f7=new _0xca984(_0x335f8a),t=_0x335f8a['t'];return _0x1bc4f7['set']({'icon':_0x24a86c,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x1bc4f7['bind']('isEnabled')['to'](_0x234bef),_0x1bc4f7['bind']('isOn')['to'](_0x234bef,'isActive'),this['listenTo'](_0x1bc4f7,'execute',()=>{_0x27d4d1['execute']('uploadcareImageEdit'),_0x27d4d1['editing']['view']['focus']();}),_0x1bc4f7;}),this['_initConfig']();}['_initConfig'](){const _0x5866a5=_0x3fc350(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5866a5),this['listenTo'](this['editor'],'destroy',()=>{_0x5866a5['remove']();});}}class et extends _0x35bcdb{static get['pluginName'](){return'UploadcareImageEdit';}static get['requires'](){return[m,g];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{tt as Uploadcare,w as UploadcareCommand,o as UploadcareEditing,et as UploadcareImageEdit,O as UploadcareImageEditCommand,m as UploadcareImageEditEditing,g as UploadcareImageEditUI,e as UploadcareUI,f as UploadcareUploadAdapter};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251128.0",
|
|
4
4
|
"description": "Uploadcare feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-image": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20251128.0",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251128.0",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "0.0.0-nightly-20251128.0",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "0.0.0-nightly-20251128.0",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251128.0",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "0.0.0-nightly-20251128.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251128.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251128.0",
|
|
34
34
|
"@uploadcare/file-uploader": "1.19.4",
|
|
35
35
|
"@uploadcare/upload-client": "6.14.3"
|
|
36
36
|
},
|
package/src/uploadcareediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x520a94=_0x1a00;(function(_0x37865c,_0x5e8ed6){const _0x264217=_0x1a00,_0x26bbd1=_0x37865c();while(!![]){try{const _0x2f2bd8=parseInt(_0x264217(0x1b0))/0x1*(-parseInt(_0x264217(0x1db))/0x2)+-parseInt(_0x264217(0x1ae))/0x3*(-parseInt(_0x264217(0x1a1))/0x4)+parseInt(_0x264217(0x18f))/0x5*(-parseInt(_0x264217(0x1a6))/0x6)+parseInt(_0x264217(0x1af))/0x7+parseInt(_0x264217(0x1d1))/0x8*(-parseInt(_0x264217(0x1dd))/0x9)+-parseInt(_0x264217(0x1d5))/0xa+parseInt(_0x264217(0x1c6))/0xb;if(_0x2f2bd8===_0x5e8ed6)break;else _0x26bbd1['push'](_0x26bbd1['shift']());}catch(_0x42d250){_0x26bbd1['push'](_0x26bbd1['shift']());}}}(_0x1176,0x3dae9));import{Plugin as _0x45cb89}from'ckeditor5/src/core.js';function _0x1a00(_0x5e2458,_0x488537){const _0x11766e=_0x1176();return _0x1a00=function(_0x1a00d3,_0x5d8750){_0x1a00d3=_0x1a00d3-0x18a;let _0xc615e2=_0x11766e[_0x1a00d3];return _0xc615e2;},_0x1a00(_0x5e2458,_0x488537);}import{Dialog as _0x41d095}from'ckeditor5/src/ui.js';import{createElement as _0x47eabd,global as _0x88e0eb,uid as _0x3eb39c}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x557870}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x1da486}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x2e047b}from'./utils/editingutils.js';function _0x1176(){const _0x1698b7=['config','schema','uploadcareImageReplace','selection','add','uc-config','_initCtx','isPremiumPlugin','href','closeMax','execute','replaceImageSource','body','for','true','input[uploadcare-file-input]','init','12mUhzLF','locale','data-uc-image-id','model','insertImage','6qDwPxq','ctxElement','appendChild','upcast','join','uploadcare','extend','remove','167595VrkxmL','3154774HwBODY','25VIwSac','downcast','requires','view','isRegistered','uploader-','conversion','once','_configElement','imageBlock','removeAttribute','configElement','attributeToAttribute','iconHrefResolver','_ctxElement','get','uploadcareImageId','document','elementToAttribute','_initConfig','imageInline','fromCharCode','5890984fcWDcI','_initSchema','afterInit','ucContextId','contentLanguage','getAttribute','commands','uploadcare.pubkey','PictureEditing','\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','uploadcare.uploader','819400lCbGmP','cleanupImage','uc-upload-ctx-provider','listenTo','516090nKPdcJ','#uc-icon-arrow-down','getSelectedElement','pluginName','isOfficialPlugin','querySelector','21228tIUGon','editor','27OcqpaF','destroy','map','editing','_initConversion','UploadcareEditing','render','_initImageProcessingIndicator','1384690ArcqMF'];_0x1176=function(){return _0x1698b7;};return _0x1176();}export class UploadcareEditing extends _0x45cb89{[_0x520a94(0x1b8)]=null;[_0x520a94(0x1be)]=null;static get[_0x520a94(0x1d8)](){const _0x4e061c=_0x520a94;return _0x4e061c(0x18c);}static get[_0x520a94(0x1b2)](){const _0x5488d3=_0x520a94;return[_0x5488d3(0x1ce),_0x1da486,_0x41d095];}static get[_0x520a94(0x1d9)](){return!0x0;}static get[_0x520a94(0x197)](){return!0x0;}[_0x520a94(0x1c9)];get[_0x520a94(0x1bb)](){const _0x17d726=_0x520a94;return this[_0x17d726(0x1b8)];}get[_0x520a94(0x1a7)](){const _0x13aa68=_0x520a94;return this[_0x13aa68(0x1be)];}constructor(_0x27ec99){const _0x2fb943=_0x520a94;super(_0x27ec99),this[_0x2fb943(0x1c9)]=_0x3eb39c();}[_0x520a94(0x1a0)](){const _0x1bc71e=_0x520a94,_0x1fe5a0=this[_0x1bc71e(0x1dc)];_0x1fe5a0[_0x1bc71e(0x1cc)][_0x1bc71e(0x194)](_0x1bc71e(0x1ab),new _0x557870(_0x1fe5a0));}[_0x520a94(0x1c8)](){const _0x25e8ad=_0x520a94;this[_0x25e8ad(0x1c7)](),this[_0x25e8ad(0x18b)](),this[_0x25e8ad(0x1c3)](),this[_0x25e8ad(0x196)](),this[_0x25e8ad(0x18e)](),this[_0x25e8ad(0x1d4)](this[_0x25e8ad(0x1dc)],_0x25e8ad(0x1de),()=>{const _0x4a94f0=_0x25e8ad;this[_0x4a94f0(0x1b8)]&&(this[_0x4a94f0(0x1b8)][_0x4a94f0(0x1ad)](),this[_0x4a94f0(0x1b8)]=null),this[_0x4a94f0(0x1be)]&&(this[_0x4a94f0(0x1be)][_0x4a94f0(0x1ad)](),this[_0x4a94f0(0x1be)]=null);const _0x220be0=_0x88e0eb[_0x4a94f0(0x1c1)][_0x4a94f0(0x1da)](_0x4a94f0(0x19f));_0x220be0&&_0x220be0[_0x4a94f0(0x1ad)]();}),async function(_0x374d79){const _0x39f578=_0x1952c5([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]),_0x200c7f=0x535f8c3a,_0x362931=0x5358f672^_0x200c7f,_0xaddfc5=window[_0x1952c5([0x44,0x61,0x74,0x65])][_0x1952c5([0x6e,0x6f,0x77])](),_0x59069d=_0x374d79[_0x1952c5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3a3c3e=new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42a2b0=>{_0x59069d[_0x1952c5([0x6f,0x6e,0x63,0x65])](_0x1952c5([0x72,0x65,0x61,0x64,0x79]),_0x42a2b0);}),_0x4b1ff2={[_0x1952c5([0x6b,0x74,0x79])]:_0x1952c5([0x45,0x43]),[_0x1952c5([0x75,0x73,0x65])]:_0x1952c5([0x73,0x69,0x67]),[_0x1952c5([0x63,0x72,0x76])]:_0x1952c5([0x50,0x2d,0x32,0x35,0x36]),[_0x1952c5([0x78])]:_0x1952c5([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]),[_0x1952c5([0x79])]:_0x1952c5([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]),[_0x1952c5([0x61,0x6c,0x67])]:_0x1952c5([0x45,0x53,0x32,0x35,0x36])},_0x371104=_0x59069d[_0x1952c5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1952c5([0x67,0x65,0x74])](_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x187897(){let _0x2885af,_0xd6de93=null,_0x45681e=null;try{if(_0x371104==_0x1952c5([0x47,0x50,0x4c]))return _0x1952c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2885af=_0x3dd0c1(),!_0x2885af)return _0x1952c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2885af[_0x1952c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x45681e=_0x112fc3(_0x2885af[_0x1952c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2885af[_0x1952c5([0x6a,0x74,0x69])])),await _0x37423c()?_0x2c647b()?_0x2a30d6()?_0x1952c5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2f5ff6()?(_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1952c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xd6de93=_0x32078b(_0x1952c5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1952c5([0x74,0x72,0x69,0x61,0x6c])&&(_0xd6de93=_0x32078b(_0x1952c5([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x591827()):_0x1952c5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1952c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1952c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1952c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2a30d6(){const _0x33bda2=[_0x1952c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1952c5([0x74,0x72,0x69,0x61,0x6c])][_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xaddfc5/0x3e8:0xe10*_0x362931;return _0x2885af[_0x1952c5([0x65,0x78,0x70])]<_0x33bda2;}function _0x2c647b(){const _0x46e98c=_0x2885af[_0x1952c5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x46e98c&&(!!_0x46e98c[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1952c5([0x2a]))||!!_0x46e98c[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1952c5([0x55,0x50,0x4c,0x43])));}function _0x2f5ff6(){const _0x4cf232=_0x1a00,_0x263418=_0x2885af[_0x1952c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x263418||0x0==_0x263418[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x355603}=new URL(window[_0x1952c5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x4cf232(0x198)]);if(_0x263418[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x355603))return!0x0;const _0x411daf=_0x355603[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e]));return _0x263418[_0x1952c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x94813c=>_0x94813c[_0x1952c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1952c5([0x2a])))[_0x1952c5([0x6d,0x61,0x70])](_0x515e94=>_0x515e94[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e])))[_0x1952c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x57f057=>_0x57f057[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x411daf[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1952c5([0x6d,0x61,0x70])](_0x167a49=>Array(_0x411daf[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x167a49[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1952c5([0x66,0x69,0x6c,0x6c])](_0x167a49[0x0]===_0x1952c5([0x2a])?_0x1952c5([0x2a]):'')[_0x1952c5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x167a49))[_0x1952c5([0x73,0x6f,0x6d,0x65])](_0x546594=>_0x411daf[_0x1952c5([0x65,0x76,0x65,0x72,0x79])]((_0x1c210b,_0x5313cc)=>_0x546594[_0x5313cc]===_0x1c210b||_0x546594[_0x5313cc]===_0x1952c5([0x2a])));}function _0x591827(){return _0xd6de93&&_0x45681e?new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x17d318,_0x4b4a81)=>{_0xd6de93[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x17d318,_0x4b4a81),_0x45681e[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x21ad20=>{_0x21ad20!=_0x1952c5([0x56,0x61,0x6c,0x69,0x64])&&_0x17d318(_0x21ad20);},_0x4b4a81);}):_0xd6de93||_0x45681e||_0x1952c5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x112fc3(_0x2ad021,_0x423771){return new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x431f46=>{if(_0x5c2ba3())return _0x431f46(_0x1952c5([0x56,0x61,0x6c,0x69,0x64]));_0x2297f7(),_0x59069d[_0x1952c5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1952c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2dbe8d=!0x1;const _0xc14df7=_0x3eb39c();function _0x196225(_0x209da0){return!!_0x209da0&&(typeof _0x209da0===_0x1952c5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x209da0===_0x1952c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x209da0[_0x1952c5([0x74,0x68,0x65,0x6e])]===_0x1952c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x209da0[_0x1952c5([0x63,0x61,0x74,0x63,0x68])]===_0x1952c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x367f06(_0x4ed224){_0x172d3d(_0x4ed224)[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x18c2e5=>{if(!_0x18c2e5||_0x18c2e5[_0x1952c5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1952c5([0x6f,0x6b]))return _0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1506a7(_0x2b6996(_0xc14df7+_0x423771))!=_0x18c2e5[_0x1952c5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1952c5([0x56,0x61,0x6c,0x69,0x64]);})[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x59053a=>(_0x356de6(),_0x59053a),()=>{const _0x1ad148=_0xbbdb8b();return null==_0x1ad148?(_0x356de6(),_0x1952c5([0x56,0x61,0x6c,0x69,0x64])):_0x1952c5(_0xaddfc5-_0x1ad148>(0x7753083a^_0x200c7f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x431f46)[_0x1952c5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x431f46(_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d7018=0x536962ba^_0x200c7f;function _0x356de6(){const _0x582bb7=_0x1952c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1506a7(_0x2b6996(_0x2ad021)),_0x3c8702=_0x206082(_0x1506a7(window[_0x1952c5([0x4d,0x61,0x74,0x68])][_0x1952c5([0x63,0x65,0x69,0x6c])](_0xaddfc5/_0x3d7018)));window[_0x1952c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1952c5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x582bb7,_0x3c8702);}function _0xbbdb8b(){const _0x2434aa=_0x1952c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1506a7(_0x2b6996(_0x2ad021)),_0x95ea5d=window[_0x1952c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1952c5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2434aa);return _0x95ea5d?window[_0x1952c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x206082(_0x95ea5d),0x10)*_0x3d7018:null;}function _0x172d3d(_0x432ba5){return new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x14f177,_0x1b302c)=>{_0x432ba5[_0x1952c5([0x74,0x68,0x65,0x6e])](_0x14f177,_0x1b302c),window[_0x1952c5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1b302c,0x535e58fa^_0x200c7f);});}}_0x59069d[_0x1952c5([0x6f,0x6e])](_0x1952c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x31c3cc,_0x6644a)=>{if(_0x6644a[0x0]!=_0x2ad021)return _0x431f46(_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x6644a[0x1]={..._0x6644a[0x1],[_0x1952c5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xc14df7};},{[_0x1952c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1952c5([0x68,0x69,0x67,0x68])}),_0x59069d[_0x1952c5([0x6f,0x6e])](_0x1952c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x35a5d5=>{_0x196225(_0x35a5d5[_0x1952c5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2dbe8d=!0x0,_0x367f06(_0x35a5d5[_0x1952c5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1952c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1952c5([0x6c,0x6f,0x77])}),_0x3a3c3e[_0x1952c5([0x74,0x68,0x65,0x6e])](()=>{_0x2dbe8d||_0x431f46(_0x1952c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5c2ba3(){return _0x59069d[_0x1952c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1952c5([0x76,0x69,0x65,0x77])][_0x1952c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1952c5([0x61,0x75,0x74,0x6f]);}function _0x2297f7(){_0x59069d[_0x1952c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1952c5([0x76,0x69,0x65,0x77])][_0x1952c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1952c5([0x61,0x75,0x74,0x6f]);}}function _0x32078b(_0x538105){const _0x332459=[new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59668b=>setTimeout(_0x59668b,0x5356b2f6^_0x200c7f)),_0x3a3c3e[_0x1952c5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x299207=>{let _0x569c34=0x0;_0x59069d[_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x1952c5([0x6f,0x6e])](_0x1952c5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x11d1f2,_0x98a135)=>{_0x98a135[0x0][_0x1952c5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x569c34++,_0x569c34==(0x535f8dc2^_0x200c7f)&&(_0x299207(),_0x11d1f2[_0x1952c5([0x6f,0x66,0x66])]());});}))];return window[_0x1952c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1952c5([0x72,0x61,0x63,0x65])](_0x332459)[_0x1952c5([0x74,0x68,0x65,0x6e])](()=>_0x538105);}async function _0x5168e0(){await _0x3a3c3e,_0x59069d[_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x1952c5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4b7ab5,_0x59069d[_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x1952c5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4b7ab5,_0x59069d[_0x1952c5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1952c5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x336d73(_0x318667){const _0x313850=_0x569f47();_0x59069d[_0x313850]=_0x1952c5([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x318667,_0x318667!=_0x1952c5([0x56,0x61,0x6c,0x69,0x64])&&_0x5168e0();}function _0x569f47(){const _0x3b5d7e=window[_0x1952c5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1952c5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1952c5([0x6e,0x6f,0x77])]())[_0x1952c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1952c5([0x2e]),'');let _0x3b2803=_0x1952c5([0x68]);for(let _0x337110=0x0;_0x337110<_0x3b5d7e[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x337110+=0x2){let _0x5b7a51=window[_0x1952c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b5d7e[_0x1952c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x337110,_0x337110+0x2));_0x5b7a51>=_0x39f578[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5b7a51-=_0x39f578[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b2803+=_0x39f578[_0x5b7a51];}return _0x3b2803;}function _0x3dd0c1(){const _0x23c5c0=_0x371104[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e]));if(0x3!=_0x23c5c0[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x489455(_0x23c5c0[0x1]);function _0x489455(_0x56b054){const _0x32819e=_0x4e2f5f(_0x56b054);return _0x32819e&&_0x9934fd()?_0x32819e:null;function _0x9934fd(){const _0x274bb1=_0x32819e[_0x1952c5([0x6a,0x74,0x69])],_0x95d1e=window[_0x1952c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x274bb1[_0x1952c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x274bb1[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1293aa={..._0x32819e,[_0x1952c5([0x6a,0x74,0x69])]:_0x274bb1[_0x1952c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x274bb1[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1293aa[_0x1952c5([0x76,0x63])],_0x2b6996(_0x1293aa)==_0x95d1e;}}}async function _0x37423c(){let _0x1ef097=!0x0;try{const _0x4e3eb8=_0x371104[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])](_0x1952c5([0x2e])),[_0x3f97b6,_0x419374,_0x1614df]=_0x4e3eb8;return _0x168ed0(_0x3f97b6),await _0xc7ef9d(_0x3f97b6,_0x419374,_0x1614df),_0x1ef097;}catch{return!0x1;}function _0x168ed0(_0x8df5ce){const _0x399368=_0x4e2f5f(_0x8df5ce);_0x399368&&_0x399368[_0x1952c5([0x61,0x6c,0x67])]==_0x1952c5([0x45,0x53,0x32,0x35,0x36])||(_0x1ef097=!0x1);}async function _0xc7ef9d(_0x31d5e6,_0x2e7ec4,_0x7a77af){const _0x599a9e=window[_0x1952c5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1952c5([0x66,0x72,0x6f,0x6d])](_0x1dd856(_0x7a77af),_0xc7b679=>_0xc7b679[_0x1952c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5b7bd7=new window[(_0x1952c5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1952c5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x31d5e6+_0x1952c5([0x2e])+_0x2e7ec4),_0x2fcf27=window[_0x1952c5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1952c5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2fcf27)return;const _0x2b584b=await _0x2fcf27[_0x1952c5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1952c5([0x6a,0x77,0x6b]),_0x4b1ff2,{[_0x1952c5([0x6e,0x61,0x6d,0x65])]:_0x1952c5([0x45,0x43,0x44,0x53,0x41]),[_0x1952c5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1952c5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1952c5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2fcf27[_0x1952c5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1952c5([0x6e,0x61,0x6d,0x65])]:_0x1952c5([0x45,0x43,0x44,0x53,0x41]),[_0x1952c5([0x68,0x61,0x73,0x68])]:{[_0x1952c5([0x6e,0x61,0x6d,0x65])]:_0x1952c5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2b584b,_0x599a9e,_0x5b7bd7)||(_0x1ef097=!0x1);}}function _0x4e2f5f(_0x2a7422){return _0x2a7422[_0x1952c5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1952c5([0x65,0x79]))?JSON[_0x1952c5([0x70,0x61,0x72,0x73,0x65])](_0x1dd856(_0x2a7422)):null;}function _0x1dd856(_0x601b03){return window[_0x1952c5([0x61,0x74,0x6f,0x62])](_0x601b03[_0x1952c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1952c5([0x2b]))[_0x1952c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1952c5([0x2f])));}function _0x2b6996(_0x31e955){let _0x460056=0x1505;function _0x159805(_0x4dcc06){for(let _0x261348=0x0;_0x261348<_0x4dcc06[_0x1952c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x261348++){const _0x4567fa=_0x4dcc06[_0x1952c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x261348);_0x460056=(_0x460056<<0x5)+_0x460056+_0x4567fa,_0x460056&=_0x460056;}}function _0xd4a2b9(_0x17e9dd){Array[_0x1952c5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x17e9dd)?_0x17e9dd[_0x1952c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xd4a2b9):_0x17e9dd&&typeof _0x17e9dd==_0x1952c5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1952c5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x17e9dd)[_0x1952c5([0x73,0x6f,0x72,0x74])]()[_0x1952c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x12f855,_0x192e64])=>{_0x159805(_0x12f855),_0xd4a2b9(_0x192e64);}):_0x159805(window[_0x1952c5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x17e9dd));}return _0xd4a2b9(_0x31e955),_0x460056>>>0x0;}function _0x1506a7(_0x30de05){return _0x30de05[_0x1952c5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1952c5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1952c5([0x30]));}function _0x206082(_0x407b97){return _0x407b97[_0x1952c5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1952c5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1952c5([0x6a,0x6f,0x69,0x6e])]('');}function _0x4b7ab5(){}function _0x1952c5(_0xcb7229){const _0xb4ef92=_0x1a00;return _0xcb7229[_0xb4ef92(0x1df)](_0x5d897a=>String[_0xb4ef92(0x1c5)](_0x5d897a))[_0xb4ef92(0x1aa)]('');}_0x336d73(await _0x187897());}(this);}[_0x520a94(0x1c7)](){const _0x31406e=_0x520a94,_0x59884e=this[_0x31406e(0x1dc)][_0x31406e(0x1a4)][_0x31406e(0x191)];_0x59884e[_0x31406e(0x1b4)](_0x31406e(0x1b9))&&_0x59884e[_0x31406e(0x1ac)](_0x31406e(0x1b9),{'allowAttributes':[_0x31406e(0x1c0)]}),_0x59884e[_0x31406e(0x1b4)](_0x31406e(0x1c4))&&_0x59884e[_0x31406e(0x1ac)](_0x31406e(0x1c4),{'allowAttributes':[_0x31406e(0x1c0)]});}[_0x520a94(0x18b)](){const _0x4a6018=_0x520a94,_0x50cdea=this[_0x4a6018(0x1dc)];_0x50cdea[_0x4a6018(0x1b6)][_0x4a6018(0x19d)](_0x4a6018(0x1b1))[_0x4a6018(0x1bc)]({'model':_0x4a6018(0x1c0),'view':_0x4a6018(0x1a3)}),_0x50cdea[_0x4a6018(0x1b6)][_0x4a6018(0x19d)](_0x4a6018(0x1a9))[_0x4a6018(0x1c2)]({'model':{'key':_0x4a6018(0x1c0),'value':_0x254424=>_0x254424[_0x4a6018(0x1cb)](_0x4a6018(0x1a3))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x17b336=_0x50cdea[_0x4a6018(0x1cc)][_0x4a6018(0x1bf)](_0x4a6018(0x19b));_0x17b336&&this[_0x4a6018(0x1d4)](_0x17b336,_0x4a6018(0x1d2),(_0x22528e,[_0x503cd9,_0x3b6579])=>{const _0x1bef1d=_0x4a6018;_0x503cd9[_0x1bef1d(0x1ba)](_0x1bef1d(0x1c0),_0x3b6579);});}[_0x520a94(0x1c3)](){const _0x3de71c=_0x520a94,_0x1d9f74=this[_0x3de71c(0x1dc)][_0x3de71c(0x190)][_0x3de71c(0x1bf)](_0x3de71c(0x1d0))||{},_0x2f51ac=this[_0x3de71c(0x1dc)][_0x3de71c(0x190)][_0x3de71c(0x1bf)](_0x3de71c(0x1cd))||'';this[_0x3de71c(0x1b8)]=_0x47eabd(_0x88e0eb[_0x3de71c(0x1c1)],_0x3de71c(0x195),{..._0x1d9f74,'pubkey':_0x2f51ac,'ctx-name':_0x3de71c(0x1b5)+this[_0x3de71c(0x1c9)],'sourceList':'','imgOnly':_0x3de71c(0x19e),'removeCopyright':_0x3de71c(0x19e),'localeName':this[_0x3de71c(0x1dc)][_0x3de71c(0x1a2)][_0x3de71c(0x1ca)],'externalSourcesEmbedCss':_0x3de71c(0x1cf)}),this[_0x3de71c(0x1b8)][_0x3de71c(0x1bd)]=_0x184410=>{const _0x320aa0=_0x3de71c;if(_0x320aa0(0x199)==_0x184410)return _0x320aa0(0x1d6);},_0x88e0eb[_0x3de71c(0x1c1)][_0x3de71c(0x19c)][_0x3de71c(0x1a8)](this[_0x3de71c(0x1b8)]);}[_0x520a94(0x196)](){const _0x222ce0=_0x520a94;this[_0x222ce0(0x1be)]=_0x47eabd(_0x88e0eb[_0x222ce0(0x1c1)],_0x222ce0(0x1d3),{'ctx-name':_0x222ce0(0x1b5)+this[_0x222ce0(0x1c9)]}),_0x88e0eb[_0x222ce0(0x1c1)][_0x222ce0(0x19c)][_0x222ce0(0x1a8)](this[_0x222ce0(0x1be)]);}[_0x520a94(0x18e)](){const _0x2d1f84=_0x520a94,_0x570fda=this[_0x2d1f84(0x1dc)][_0x2d1f84(0x1cc)][_0x2d1f84(0x1bf)](_0x2d1f84(0x1a5));_0x570fda&&this[_0x2d1f84(0x1d4)](_0x570fda,_0x2d1f84(0x19a),()=>{const _0x9cfd36=_0x2d1f84,_0x33296c=this[_0x9cfd36(0x1dc)][_0x9cfd36(0x1a4)][_0x9cfd36(0x1c1)][_0x9cfd36(0x193)][_0x9cfd36(0x1d7)]();_0x33296c&&_0x33296c[_0x9cfd36(0x1cb)](_0x9cfd36(0x1c0))&&this[_0x9cfd36(0x1dc)][_0x9cfd36(0x18a)][_0x9cfd36(0x1b3)][_0x9cfd36(0x1b7)](_0x9cfd36(0x18d),()=>{const _0x5328ee=_0x9cfd36;_0x2e047b(this[_0x5328ee(0x1dc)],_0x33296c);});});const _0x41d2ca=this[_0x2d1f84(0x1dc)][_0x2d1f84(0x1cc)][_0x2d1f84(0x1bf)](_0x2d1f84(0x192));_0x41d2ca&&this[_0x2d1f84(0x1d4)](_0x41d2ca,_0x2d1f84(0x19a),()=>{const _0x2cf746=_0x2d1f84,_0x4d8d39=this[_0x2cf746(0x1dc)][_0x2cf746(0x1a4)][_0x2cf746(0x1c1)][_0x2cf746(0x193)][_0x2cf746(0x1d7)]();_0x4d8d39&&_0x4d8d39[_0x2cf746(0x1cb)](_0x2cf746(0x1c0))&&this[_0x2cf746(0x1dc)][_0x2cf746(0x18a)][_0x2cf746(0x1b3)][_0x2cf746(0x1b7)](_0x2cf746(0x18d),()=>{const _0x29b99b=_0x2cf746;_0x2e047b(this[_0x29b99b(0x1dc)],_0x4d8d39);});});}}
|
|
23
|
+
const _0x4a1cc1=_0x5826;(function(_0xca48cc,_0x2b1d0f){const _0x1db391=_0x5826,_0x40f9f7=_0xca48cc();while(!![]){try{const _0x5e051e=parseInt(_0x1db391(0x109))/0x1*(parseInt(_0x1db391(0x150))/0x2)+parseInt(_0x1db391(0x138))/0x3+parseInt(_0x1db391(0xfd))/0x4*(-parseInt(_0x1db391(0x14b))/0x5)+parseInt(_0x1db391(0x11e))/0x6*(parseInt(_0x1db391(0x122))/0x7)+-parseInt(_0x1db391(0x119))/0x8*(parseInt(_0x1db391(0x14a))/0x9)+parseInt(_0x1db391(0x13a))/0xa*(-parseInt(_0x1db391(0x12e))/0xb)+-parseInt(_0x1db391(0x10d))/0xc*(-parseInt(_0x1db391(0x140))/0xd);if(_0x5e051e===_0x2b1d0f)break;else _0x40f9f7['push'](_0x40f9f7['shift']());}catch(_0xbca40a){_0x40f9f7['push'](_0x40f9f7['shift']());}}}(_0x9817,0x9441f));import{Plugin as _0x2f4312}from'ckeditor5/src/core.js';function _0x5826(_0x1a8bc6,_0x15f203){const _0x9817f6=_0x9817();return _0x5826=function(_0x582657,_0x4d0fb5){_0x582657=_0x582657-0xfb;let _0x3e4eca=_0x9817f6[_0x582657];return _0x3e4eca;},_0x5826(_0x1a8bc6,_0x15f203);}import{Dialog as _0x5de10e}from'ckeditor5/src/ui.js';import{createElement as _0xd6594a,global as _0x24807b,uid as _0x2cf95e}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x129629}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x576ce4}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x188869}from'./utils/editingutils.js';function _0x9817(){const _0x2abb71=['943551cutGxj','body','configElement','once','join','removeAttribute','ctxElement','_initConfig','conversion','selection','iconHrefResolver','appendChild','53042WwmIwl','uploadcare','_configElement','getAttribute','schema','imageInline','for','_initImageProcessingIndicator','uploadcare.pubkey','fromCharCode','1750635qydVtq','uploader-','2270WWnGTM','map','PictureEditing','#uc-icon-arrow-down','isOfficialPlugin','elementToAttribute','94211igWmki','init','input[uploadcare-file-input]','querySelector','href','editor','downcast','contentLanguage','_ctxElement','isRegistered','13563tAYbSi','1205LDnmto','add','insertImage','getSelectedElement','uploadcare.uploader','1154BzExml','attributeToAttribute','pluginName','remove','true','18580NSmLNv','locale','commands','closeMax','upcast','_initSchema','render','uc-upload-ctx-provider','editing','\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup\x20{\x20padding:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-menu\x20{\x20gap:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__popup-footer\x20{\x20padding-top:\x200;\x20}\x0a\x09\x09\x09\x09.uc-dropdown-menu__separator\x20{\x20margin:\x200;\x20}\x0a\x09\x09\x09','execute','isPremiumPlugin','758kBcdIR','config','model','replaceImageSource','2364xOByci','view','_initConversion','afterInit','uploadcareImageId','ucContextId','document','imageBlock','UploadcareEditing','cleanupImage','data-uc-image-id','get','168ckUqDO','uc-config','uploadcareImageReplace','requires','_initCtx','18nyQwVg','listenTo','destroy','extend'];_0x9817=function(){return _0x2abb71;};return _0x9817();}export class UploadcareEditing extends _0x2f4312{[_0x4a1cc1(0x130)]=null;[_0x4a1cc1(0x148)]=null;static get[_0x4a1cc1(0x152)](){const _0x4dcfcf=_0x4a1cc1;return _0x4dcfcf(0x115);}static get[_0x4a1cc1(0x11c)](){const _0x30f2ab=_0x4a1cc1;return[_0x30f2ab(0x13c),_0x576ce4,_0x5de10e];}static get[_0x4a1cc1(0x13e)](){return!0x0;}static get[_0x4a1cc1(0x108)](){return!0x0;}[_0x4a1cc1(0x112)];get[_0x4a1cc1(0x124)](){const _0x54ea06=_0x4a1cc1;return this[_0x54ea06(0x130)];}get[_0x4a1cc1(0x128)](){const _0x28e856=_0x4a1cc1;return this[_0x28e856(0x148)];}constructor(_0x41f01a){const _0x1cd469=_0x4a1cc1;super(_0x41f01a),this[_0x1cd469(0x112)]=_0x2cf95e();}[_0x4a1cc1(0x141)](){const _0x1f60a7=_0x4a1cc1,_0xff4b3b=this[_0x1f60a7(0x145)];_0xff4b3b[_0x1f60a7(0xff)][_0x1f60a7(0x14c)](_0x1f60a7(0x12f),new _0x129629(_0xff4b3b));}[_0x4a1cc1(0x110)](){const _0x6ceedb=_0x4a1cc1;this[_0x6ceedb(0x102)](),this[_0x6ceedb(0x10f)](),this[_0x6ceedb(0x129)](),this[_0x6ceedb(0x11d)](),this[_0x6ceedb(0x135)](),this[_0x6ceedb(0x11f)](this[_0x6ceedb(0x145)],_0x6ceedb(0x120),()=>{const _0x14d7c3=_0x6ceedb;this[_0x14d7c3(0x130)]&&(this[_0x14d7c3(0x130)][_0x14d7c3(0xfb)](),this[_0x14d7c3(0x130)]=null),this[_0x14d7c3(0x148)]&&(this[_0x14d7c3(0x148)][_0x14d7c3(0xfb)](),this[_0x14d7c3(0x148)]=null);const _0x51fe03=_0x24807b[_0x14d7c3(0x113)][_0x14d7c3(0x143)](_0x14d7c3(0x142));_0x51fe03&&_0x51fe03[_0x14d7c3(0xfb)]();}),async function(_0x4d1049){const _0x435325=_0x22f3ea([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]),_0x67f665=0x535f8c3a,_0x2d5ee6=0x5358f65a^_0x67f665,_0xe7d4a7=window[_0x22f3ea([0x44,0x61,0x74,0x65])][_0x22f3ea([0x6e,0x6f,0x77])](),_0x522703=_0x4d1049[_0x22f3ea([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5a1fec=new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x51b2cb=>{_0x522703[_0x22f3ea([0x6f,0x6e,0x63,0x65])](_0x22f3ea([0x72,0x65,0x61,0x64,0x79]),_0x51b2cb);}),_0x356ca9={[_0x22f3ea([0x6b,0x74,0x79])]:_0x22f3ea([0x45,0x43]),[_0x22f3ea([0x75,0x73,0x65])]:_0x22f3ea([0x73,0x69,0x67]),[_0x22f3ea([0x63,0x72,0x76])]:_0x22f3ea([0x50,0x2d,0x32,0x35,0x36]),[_0x22f3ea([0x78])]:_0x22f3ea([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]),[_0x22f3ea([0x79])]:_0x22f3ea([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]),[_0x22f3ea([0x61,0x6c,0x67])]:_0x22f3ea([0x45,0x53,0x32,0x35,0x36])},_0x344b73=_0x522703[_0x22f3ea([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x22f3ea([0x67,0x65,0x74])](_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2b4875(){let _0x2962d8,_0x30e817=null,_0x4afea5=null;try{if(_0x344b73==_0x22f3ea([0x47,0x50,0x4c]))return _0x22f3ea([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2962d8=_0x2f6edf(),!_0x2962d8)return _0x22f3ea([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2962d8[_0x22f3ea([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4afea5=_0x5b4d6b(_0x2962d8[_0x22f3ea([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2962d8[_0x22f3ea([0x6a,0x74,0x69])])),await _0x25a46a()?_0x5011fa()?_0xd98959()?_0x22f3ea([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1ebdfd()?(_0x2962d8[_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x22f3ea([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x30e817=_0x426174(_0x22f3ea([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2962d8[_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x22f3ea([0x74,0x72,0x69,0x61,0x6c])&&(_0x30e817=_0x426174(_0x22f3ea([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5ec652()):_0x22f3ea([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x22f3ea([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x22f3ea([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x22f3ea([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xd98959(){const _0x1082c3=[_0x22f3ea([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x22f3ea([0x74,0x72,0x69,0x61,0x6c])][_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2962d8[_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xe7d4a7/0x3e8:0xe10*_0x2d5ee6;return _0x2962d8[_0x22f3ea([0x65,0x78,0x70])]<_0x1082c3;}function _0x5011fa(){const _0xf84a28=_0x2962d8[_0x22f3ea([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xf84a28&&(!!_0xf84a28[_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22f3ea([0x2a]))||!!_0xf84a28[_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22f3ea([0x55,0x50,0x4c,0x43])));}function _0x1ebdfd(){const _0xc39492=_0x5826,_0x3875d3=_0x2962d8[_0x22f3ea([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3875d3||0x0==_0x3875d3[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x483520}=new URL(window[_0x22f3ea([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0xc39492(0x144)]);if(_0x3875d3[_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x483520))return!0x0;const _0x67a10e=_0x483520[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])](_0x22f3ea([0x2e]));return _0x3875d3[_0x22f3ea([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b4b06=>_0x2b4b06[_0x22f3ea([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22f3ea([0x2a])))[_0x22f3ea([0x6d,0x61,0x70])](_0x5d6d79=>_0x5d6d79[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])](_0x22f3ea([0x2e])))[_0x22f3ea([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x23cc25=>_0x23cc25[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x67a10e[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x22f3ea([0x6d,0x61,0x70])](_0x3919a3=>Array(_0x67a10e[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3919a3[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x22f3ea([0x66,0x69,0x6c,0x6c])](_0x3919a3[0x0]===_0x22f3ea([0x2a])?_0x22f3ea([0x2a]):'')[_0x22f3ea([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3919a3))[_0x22f3ea([0x73,0x6f,0x6d,0x65])](_0x15248e=>_0x67a10e[_0x22f3ea([0x65,0x76,0x65,0x72,0x79])]((_0x11b38c,_0x327ccb)=>_0x15248e[_0x327ccb]===_0x11b38c||_0x15248e[_0x327ccb]===_0x22f3ea([0x2a])));}function _0x5ec652(){return _0x30e817&&_0x4afea5?new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x12b3ae,_0xab2933)=>{_0x30e817[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x12b3ae,_0xab2933),_0x4afea5[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x22880e=>{_0x22880e!=_0x22f3ea([0x56,0x61,0x6c,0x69,0x64])&&_0x12b3ae(_0x22880e);},_0xab2933);}):_0x30e817||_0x4afea5||_0x22f3ea([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5b4d6b(_0x49d80d,_0x22e6e6){return new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x428066=>{if(_0x319eb0())return _0x428066(_0x22f3ea([0x56,0x61,0x6c,0x69,0x64]));_0x1a40e5(),_0x522703[_0x22f3ea([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x22f3ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1a9bb5=!0x1;const _0x5a1b2a=_0x2cf95e();function _0x1c3595(_0x4a9fdd){return!!_0x4a9fdd&&(typeof _0x4a9fdd===_0x22f3ea([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4a9fdd===_0x22f3ea([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4a9fdd[_0x22f3ea([0x74,0x68,0x65,0x6e])]===_0x22f3ea([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4a9fdd[_0x22f3ea([0x63,0x61,0x74,0x63,0x68])]===_0x22f3ea([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5bf200(_0x11b3f2){_0x3da6ed(_0x11b3f2)[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x3ee034=>{if(!_0x3ee034||_0x3ee034[_0x22f3ea([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x22f3ea([0x6f,0x6b]))return _0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4fe6d1(_0x2631ba(_0x5a1b2a+_0x22e6e6))!=_0x3ee034[_0x22f3ea([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x22f3ea([0x56,0x61,0x6c,0x69,0x64]);})[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x20d73e=>(_0x4f9ba4(),_0x20d73e),()=>{const _0x947091=_0x5f7aa8();return null==_0x947091?(_0x4f9ba4(),_0x22f3ea([0x56,0x61,0x6c,0x69,0x64])):_0x22f3ea(_0xe7d4a7-_0x947091>(0x7753083a^_0x67f665)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x428066)[_0x22f3ea([0x63,0x61,0x74,0x63,0x68])](()=>{_0x428066(_0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xedbd2d=0x536962ba^_0x67f665;function _0x4f9ba4(){const _0x160146=_0x22f3ea([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fe6d1(_0x2631ba(_0x49d80d)),_0xfb2b00=_0x32c8b0(_0x4fe6d1(window[_0x22f3ea([0x4d,0x61,0x74,0x68])][_0x22f3ea([0x63,0x65,0x69,0x6c])](_0xe7d4a7/_0xedbd2d)));window[_0x22f3ea([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x22f3ea([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x160146,_0xfb2b00);}function _0x5f7aa8(){const _0x11c6be=_0x22f3ea([0x6c,0x6c,0x63,0x74,0x2d])+_0x4fe6d1(_0x2631ba(_0x49d80d)),_0x2def5b=window[_0x22f3ea([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x22f3ea([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x11c6be);return _0x2def5b?window[_0x22f3ea([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x32c8b0(_0x2def5b),0x10)*_0xedbd2d:null;}function _0x3da6ed(_0x2c3128){return new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5a9788,_0x12ee0f)=>{_0x2c3128[_0x22f3ea([0x74,0x68,0x65,0x6e])](_0x5a9788,_0x12ee0f),window[_0x22f3ea([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x12ee0f,0x535e58fa^_0x67f665);});}}_0x522703[_0x22f3ea([0x6f,0x6e])](_0x22f3ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2f941d,_0x375bee)=>{if(_0x375bee[0x0]!=_0x49d80d)return _0x428066(_0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x375bee[0x1]={..._0x375bee[0x1],[_0x22f3ea([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5a1b2a};},{[_0x22f3ea([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x22f3ea([0x68,0x69,0x67,0x68])}),_0x522703[_0x22f3ea([0x6f,0x6e])](_0x22f3ea([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1b7576=>{_0x1c3595(_0x1b7576[_0x22f3ea([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1a9bb5=!0x0,_0x5bf200(_0x1b7576[_0x22f3ea([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x22f3ea([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x22f3ea([0x6c,0x6f,0x77])}),_0x5a1fec[_0x22f3ea([0x74,0x68,0x65,0x6e])](()=>{_0x1a9bb5||_0x428066(_0x22f3ea([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x319eb0(){return _0x522703[_0x22f3ea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22f3ea([0x76,0x69,0x65,0x77])][_0x22f3ea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x22f3ea([0x61,0x75,0x74,0x6f]);}function _0x1a40e5(){_0x522703[_0x22f3ea([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22f3ea([0x76,0x69,0x65,0x77])][_0x22f3ea([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x22f3ea([0x61,0x75,0x74,0x6f]);}}function _0x426174(_0x124e97){const _0x249f75=[new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x53e095=>setTimeout(_0x53e095,0x5356b2f6^_0x67f665)),_0x5a1fec[_0x22f3ea([0x74,0x68,0x65,0x6e])](()=>new window[(_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10128e=>{let _0x4bbb35=0x0;_0x522703[_0x22f3ea([0x6d,0x6f,0x64,0x65,0x6c])][_0x22f3ea([0x6f,0x6e])](_0x22f3ea([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x8ffd2d,_0x4d6fe4)=>{_0x4d6fe4[0x0][_0x22f3ea([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4bbb35++,_0x4bbb35==(0x535f8dc2^_0x67f665)&&(_0x10128e(),_0x8ffd2d[_0x22f3ea([0x6f,0x66,0x66])]());});}))];return window[_0x22f3ea([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x22f3ea([0x72,0x61,0x63,0x65])](_0x249f75)[_0x22f3ea([0x74,0x68,0x65,0x6e])](()=>_0x124e97);}async function _0x40f14f(){await _0x5a1fec,_0x522703[_0x22f3ea([0x6d,0x6f,0x64,0x65,0x6c])][_0x22f3ea([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x103e31,_0x522703[_0x22f3ea([0x6d,0x6f,0x64,0x65,0x6c])][_0x22f3ea([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x103e31,_0x522703[_0x22f3ea([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x22f3ea([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x414ca8(_0x41987e){const _0x3d2884=_0xdecef0();_0x522703[_0x3d2884]=_0x22f3ea([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x41987e,_0x41987e!=_0x22f3ea([0x56,0x61,0x6c,0x69,0x64])&&_0x40f14f();}function _0xdecef0(){const _0x5c1225=window[_0x22f3ea([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x22f3ea([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x22f3ea([0x6e,0x6f,0x77])]())[_0x22f3ea([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x22f3ea([0x2e]),'');let _0xce7cf5=_0x22f3ea([0x68]);for(let _0x1ddebd=0x0;_0x1ddebd<_0x5c1225[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ddebd+=0x2){let _0x1288a9=window[_0x22f3ea([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c1225[_0x22f3ea([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ddebd,_0x1ddebd+0x2));_0x1288a9>=_0x435325[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1288a9-=_0x435325[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xce7cf5+=_0x435325[_0x1288a9];}return _0xce7cf5;}function _0x2f6edf(){const _0x2e625b=_0x344b73[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])](_0x22f3ea([0x2e]));if(0x3!=_0x2e625b[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x57531f(_0x2e625b[0x1]);function _0x57531f(_0x47eff6){const _0x15dbb1=_0x2826d9(_0x47eff6);return _0x15dbb1&&_0x2aece5()?_0x15dbb1:null;function _0x2aece5(){const _0x184e6b=_0x15dbb1[_0x22f3ea([0x6a,0x74,0x69])],_0x2f35bb=window[_0x22f3ea([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x184e6b[_0x22f3ea([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x184e6b[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x432222={..._0x15dbb1,[_0x22f3ea([0x6a,0x74,0x69])]:_0x184e6b[_0x22f3ea([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x184e6b[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x432222[_0x22f3ea([0x76,0x63])],_0x2631ba(_0x432222)==_0x2f35bb;}}}async function _0x25a46a(){let _0x234cb6=!0x0;try{const _0x4647cf=_0x344b73[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])](_0x22f3ea([0x2e])),[_0x55dff4,_0x2e5ff9,_0x231859]=_0x4647cf;return _0x1c9dc9(_0x55dff4),await _0x2d032b(_0x55dff4,_0x2e5ff9,_0x231859),_0x234cb6;}catch{return!0x1;}function _0x1c9dc9(_0x5b0ae6){const _0xcf00c7=_0x2826d9(_0x5b0ae6);_0xcf00c7&&_0xcf00c7[_0x22f3ea([0x61,0x6c,0x67])]==_0x22f3ea([0x45,0x53,0x32,0x35,0x36])||(_0x234cb6=!0x1);}async function _0x2d032b(_0x1dc24c,_0x562d2e,_0x5f4d2d){const _0x846bd8=window[_0x22f3ea([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x22f3ea([0x66,0x72,0x6f,0x6d])](_0x2f98f7(_0x5f4d2d),_0x118f02=>_0x118f02[_0x22f3ea([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xcd7899=new window[(_0x22f3ea([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x22f3ea([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1dc24c+_0x22f3ea([0x2e])+_0x562d2e),_0x16c863=window[_0x22f3ea([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x22f3ea([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x16c863)return;const _0x3b577f=await _0x16c863[_0x22f3ea([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x22f3ea([0x6a,0x77,0x6b]),_0x356ca9,{[_0x22f3ea([0x6e,0x61,0x6d,0x65])]:_0x22f3ea([0x45,0x43,0x44,0x53,0x41]),[_0x22f3ea([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x22f3ea([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x22f3ea([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x16c863[_0x22f3ea([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x22f3ea([0x6e,0x61,0x6d,0x65])]:_0x22f3ea([0x45,0x43,0x44,0x53,0x41]),[_0x22f3ea([0x68,0x61,0x73,0x68])]:{[_0x22f3ea([0x6e,0x61,0x6d,0x65])]:_0x22f3ea([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3b577f,_0x846bd8,_0xcd7899)||(_0x234cb6=!0x1);}}function _0x2826d9(_0x4f4200){return _0x4f4200[_0x22f3ea([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x22f3ea([0x65,0x79]))?JSON[_0x22f3ea([0x70,0x61,0x72,0x73,0x65])](_0x2f98f7(_0x4f4200)):null;}function _0x2f98f7(_0x4e24d5){return window[_0x22f3ea([0x61,0x74,0x6f,0x62])](_0x4e24d5[_0x22f3ea([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x22f3ea([0x2b]))[_0x22f3ea([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x22f3ea([0x2f])));}function _0x2631ba(_0x28248b){let _0xad72af=0x1505;function _0x38cf4f(_0x563f23){for(let _0x194ca2=0x0;_0x194ca2<_0x563f23[_0x22f3ea([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x194ca2++){const _0xde2207=_0x563f23[_0x22f3ea([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x194ca2);_0xad72af=(_0xad72af<<0x5)+_0xad72af+_0xde2207,_0xad72af&=_0xad72af;}}function _0x335d6d(_0x5af6ef){Array[_0x22f3ea([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5af6ef)?_0x5af6ef[_0x22f3ea([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x335d6d):_0x5af6ef&&typeof _0x5af6ef==_0x22f3ea([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x22f3ea([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5af6ef)[_0x22f3ea([0x73,0x6f,0x72,0x74])]()[_0x22f3ea([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xc3bbf,_0x5f9f92])=>{_0x38cf4f(_0xc3bbf),_0x335d6d(_0x5f9f92);}):_0x38cf4f(window[_0x22f3ea([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5af6ef));}return _0x335d6d(_0x28248b),_0xad72af>>>0x0;}function _0x4fe6d1(_0x16aaf3){return _0x16aaf3[_0x22f3ea([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x22f3ea([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x22f3ea([0x30]));}function _0x32c8b0(_0x442b57){return _0x442b57[_0x22f3ea([0x73,0x70,0x6c,0x69,0x74])]('')[_0x22f3ea([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x22f3ea([0x6a,0x6f,0x69,0x6e])]('');}function _0x103e31(){}function _0x22f3ea(_0x1ab051){const _0x364bec=_0x5826;return _0x1ab051[_0x364bec(0x13b)](_0x16d47a=>String[_0x364bec(0x137)](_0x16d47a))[_0x364bec(0x126)]('');}_0x414ca8(await _0x2b4875());}(this);}[_0x4a1cc1(0x102)](){const _0x53fec0=_0x4a1cc1,_0x57b813=this[_0x53fec0(0x145)][_0x53fec0(0x10b)][_0x53fec0(0x132)];_0x57b813[_0x53fec0(0x149)](_0x53fec0(0x114))&&_0x57b813[_0x53fec0(0x121)](_0x53fec0(0x114),{'allowAttributes':[_0x53fec0(0x111)]}),_0x57b813[_0x53fec0(0x149)](_0x53fec0(0x133))&&_0x57b813[_0x53fec0(0x121)](_0x53fec0(0x133),{'allowAttributes':[_0x53fec0(0x111)]});}[_0x4a1cc1(0x10f)](){const _0x16f095=_0x4a1cc1,_0x13e105=this[_0x16f095(0x145)];_0x13e105[_0x16f095(0x12a)][_0x16f095(0x134)](_0x16f095(0x146))[_0x16f095(0x151)]({'model':_0x16f095(0x111),'view':_0x16f095(0x117)}),_0x13e105[_0x16f095(0x12a)][_0x16f095(0x134)](_0x16f095(0x101))[_0x16f095(0x13f)]({'model':{'key':_0x16f095(0x111),'value':_0x41c3b0=>_0x41c3b0[_0x16f095(0x131)](_0x16f095(0x117))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x90508c=_0x13e105[_0x16f095(0xff)][_0x16f095(0x118)](_0x16f095(0x10c));_0x90508c&&this[_0x16f095(0x11f)](_0x90508c,_0x16f095(0x116),(_0x1164fc,[_0x205e0b,_0x32f56e])=>{const _0x417819=_0x16f095;_0x205e0b[_0x417819(0x127)](_0x417819(0x111),_0x32f56e);});}[_0x4a1cc1(0x129)](){const _0x5721a2=_0x4a1cc1,_0x40f86a=this[_0x5721a2(0x145)][_0x5721a2(0x10a)][_0x5721a2(0x118)](_0x5721a2(0x14f))||{},_0x5c11ba=this[_0x5721a2(0x145)][_0x5721a2(0x10a)][_0x5721a2(0x118)](_0x5721a2(0x136))||'';this[_0x5721a2(0x130)]=_0xd6594a(_0x24807b[_0x5721a2(0x113)],_0x5721a2(0x11a),{..._0x40f86a,'pubkey':_0x5c11ba,'ctx-name':_0x5721a2(0x139)+this[_0x5721a2(0x112)],'sourceList':'','imgOnly':_0x5721a2(0xfc),'removeCopyright':_0x5721a2(0xfc),'localeName':this[_0x5721a2(0x145)][_0x5721a2(0xfe)][_0x5721a2(0x147)],'externalSourcesEmbedCss':_0x5721a2(0x106)}),this[_0x5721a2(0x130)][_0x5721a2(0x12c)]=_0x512452=>{const _0x3e7c18=_0x5721a2;if(_0x3e7c18(0x100)==_0x512452)return _0x3e7c18(0x13d);},_0x24807b[_0x5721a2(0x113)][_0x5721a2(0x123)][_0x5721a2(0x12d)](this[_0x5721a2(0x130)]);}[_0x4a1cc1(0x11d)](){const _0x590b34=_0x4a1cc1;this[_0x590b34(0x148)]=_0xd6594a(_0x24807b[_0x590b34(0x113)],_0x590b34(0x104),{'ctx-name':_0x590b34(0x139)+this[_0x590b34(0x112)]}),_0x24807b[_0x590b34(0x113)][_0x590b34(0x123)][_0x590b34(0x12d)](this[_0x590b34(0x148)]);}[_0x4a1cc1(0x135)](){const _0xc27ca0=_0x4a1cc1,_0x54c255=this[_0xc27ca0(0x145)][_0xc27ca0(0xff)][_0xc27ca0(0x118)](_0xc27ca0(0x14d));_0x54c255&&this[_0xc27ca0(0x11f)](_0x54c255,_0xc27ca0(0x107),()=>{const _0x1f2f4a=_0xc27ca0,_0x3af93d=this[_0x1f2f4a(0x145)][_0x1f2f4a(0x10b)][_0x1f2f4a(0x113)][_0x1f2f4a(0x12b)][_0x1f2f4a(0x14e)]();_0x3af93d&&_0x3af93d[_0x1f2f4a(0x131)](_0x1f2f4a(0x111))&&this[_0x1f2f4a(0x145)][_0x1f2f4a(0x105)][_0x1f2f4a(0x10e)][_0x1f2f4a(0x125)](_0x1f2f4a(0x103),()=>{const _0x53605b=_0x1f2f4a;_0x188869(this[_0x53605b(0x145)],_0x3af93d);});});const _0x3d328e=this[_0xc27ca0(0x145)][_0xc27ca0(0xff)][_0xc27ca0(0x118)](_0xc27ca0(0x11b));_0x3d328e&&this[_0xc27ca0(0x11f)](_0x3d328e,_0xc27ca0(0x107),()=>{const _0x16dc91=_0xc27ca0,_0x36ea7f=this[_0x16dc91(0x145)][_0x16dc91(0x10b)][_0x16dc91(0x113)][_0x16dc91(0x12b)][_0x16dc91(0x14e)]();_0x36ea7f&&_0x36ea7f[_0x16dc91(0x131)](_0x16dc91(0x111))&&this[_0x16dc91(0x145)][_0x16dc91(0x105)][_0x16dc91(0x10e)][_0x16dc91(0x125)](_0x16dc91(0x103),()=>{const _0x37a796=_0x16dc91;_0x188869(this[_0x37a796(0x145)],_0x36ea7f);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x32342e,ObservableMixin as _0x29be2c}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0x11da6a}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x1e7c15}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x3d037a}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x350ce1}from'../../utils/uploadutils.js';import{getImageUrls as _0x12c91f,getImageDimension as _0x4da9fc}from'../../utils/editingutils.js';import{isAncestor as _0x569f98}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x29be2c(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2e8b28,_0x5964c0,_0x1dec3b){super(),this['_editor']=_0x2e8b28,this['_dialog']=_0x5964c0,this['_imageElement']=_0x1dec3b,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 _0x5a8280=this['_imageElement'],_0x1168cb=_0x5a8280['getAttribute']('uploadcareImageId'),_0xf2c186=_0x5a8280['getAttribute']('src');if(_0x1168cb)await this['_loadImageInfo'](_0x1168cb,_0xf2c186);else{if(this['_imageCache']['has'](_0xf2c186)){const _0x16b71d=this['_imageCache']['get'](_0xf2c186);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x16b71d['url'],this['imageDimension']=_0x16b71d['dimension'],this['imageId']=_0x16b71d['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x2f2848}=this['_editor'],t=_0x2f2848['t'],_0x251774=new _0x3d037a(_0x2f2848,this['imageStatus'],this['_attributes']);_0x251774['bind']('status')['to'](this,'imageStatus'),_0x251774['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x251774['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x251774['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x251774,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1e7c15,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x251774,'position':_0x11da6a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x251774['focus']();},'onHide':()=>{_0x251774['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x30759c=>!_0x569f98(_0x30759c,_0x251774['element'])}});}['_loadImageInfo'](_0x2438fd,_0x4fa207){return _0x350ce1['getInfo'](_0x2438fd,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'baseURL':this['_editor']['config']['get']('uploadcare.uploader.baseUrl')})['then'](_0x184fbd=>{const {width:_0x2a9293,height:_0x54138e}=_0x184fbd['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4fa207,this['imageDimension']={'width':_0x2a9293,'height':_0x54138e},this['imageId']=_0x2438fd;})['catch'](_0x11c4f8=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x11c4f8['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x303abf,_0x479cf5){return this['_getImageAsFile'](_0x303abf)['then'](_0x47e9d2=>_0x350ce1['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':_0x479cf5['signal'],'file':_0x47e9d2,'onProgress':_0x5e48e4=>{_0x5e48e4&&_0x5e48e4['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x5e48e4['value']));}}))['then'](_0x4ff820=>{const {width:_0x30e71d,height:_0x1f90a9}=_0x4ff820['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x4ff820['cdnUrl'],this['imageDimension']={'width':_0x30e71d,'height':_0x1f90a9},this['imageId']=_0x4ff820['uuid'],this['imageUploadProgress']=null;const _0x159a43=_0x303abf['getAttribute']('src');this['_imageCache']['set'](_0x159a43,{'id':_0x4ff820['uuid'],'url':_0x4ff820['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x191c42=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x191c42['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x405f01,_0x276819){_0x405f01['on']('apply',(_0x1adbf3,_0x2c3347)=>{this['_replaceImage'](_0x276819,_0x2c3347['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x405f01['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x405f01['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x579f09,_0x1b7d8f,_0x19795f){const _0x1898c9=this['_editor'],{width:_0x15a6f4,height:_0x5ac38c}=_0x4da9fc(_0x1b7d8f,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x94412c,imageSources:_0x272bc8}=_0x12c91f(_0x1b7d8f,_0x15a6f4);_0x1898c9['model']['change'](_0x1e4427=>{if('$graveyard'===_0x579f09['root']['rootName']){_0x1898c9['execute']('insertImage',{'imageType':_0x579f09['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x579f09['getAttributes']()),'uploadcareImageId':_0x19795f,'src':_0x94412c,'sources':_0x272bc8,'width':_0x15a6f4,'height':_0x5ac38c}});const _0x3839b6=_0x579f09['getChildren']();_0x579f09=_0x1898c9['model']['document']['selection']['getSelectedElement']();for(const _0x4d071e of _0x3839b6)_0x1e4427['append'](_0x1e4427['cloneElement'](_0x4d071e),_0x579f09);}else _0x1e4427['setSelection'](_0x579f09,'on'),_0x1898c9['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x579f09['getAttributes']()),'uploadcareImageId':_0x19795f,'src':_0x94412c,'sources':_0x272bc8,'width':_0x15a6f4,'height':_0x5ac38c},_0x579f09);_0x1e4427['setSelection'](_0x579f09,'on');});}async['_getImageAsFile'](_0x17db75){const _0x4e77f8=_0x32342e['window'],_0x125784=_0x32342e['document']['location']['href'],_0x1d1050=new _0x4e77f8['URL'](_0x17db75['getAttribute']('src'),_0x125784);if('data:'===_0x1d1050['protocol']){const _0x127b78=_0x1d1050['href']['split'](','),_0x4fcdb9=_0x127b78[0x0]['match'](/:(.*?);/)[0x1],_0x532e81=_0x4fcdb9['split']('/')[0x1],_0x3964c2=_0x4e77f8['atob'](_0x127b78[_0x127b78['length']-0x1]);let _0x7d8af8=_0x3964c2['length'];const _0x4ddcf4=new _0x4e77f8['Uint8Array'](_0x7d8af8);for(;_0x7d8af8--;)_0x4ddcf4[_0x7d8af8]=_0x3964c2['charCodeAt'](_0x7d8af8);return new _0x4e77f8['File']([_0x4ddcf4],'image.'+_0x532e81,{'type':_0x4fcdb9});}const _0x4a18b8=_0x1d1050['href']['split']('/'),_0x2a5cce=_0x4a18b8[_0x4a18b8['length']-0x1],_0x491b3e=_0x2a5cce['split']('.')[0x1];return _0x4e77f8['fetch'](_0x1d1050['href'])['then'](_0x4bb483=>_0x4bb483['clone']()['blob']())['then'](_0x3281eb=>new _0x4e77f8['File']([_0x3281eb],_0x2a5cce,{'type':'image/'+_0x491b3e}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
function _0x4c8d(_0x2de57a,_0x57c28f){const _0x563090=_0x5630();return _0x4c8d=function(_0x4c8d4e,_0x546d37){_0x4c8d4e=_0x4c8d4e-0xa4;let _0x2f031d=_0x563090[_0x4c8d4e];return _0x2f031d;},_0x4c8d(_0x2de57a,_0x57c28f);}(function(_0x136795,_0x30cce8){const _0x49ba03=_0x4c8d,_0x2330ad=_0x136795();while(!![]){try{const _0x6459c4=parseInt(_0x49ba03(0xb0))/0x1*(parseInt(_0x49ba03(0xb4))/0x2)+parseInt(_0x49ba03(0xa6))/0x3*(-parseInt(_0x49ba03(0xaa))/0x4)+parseInt(_0x49ba03(0xaf))/0x5+parseInt(_0x49ba03(0xac))/0x6+parseInt(_0x49ba03(0xb5))/0x7+parseInt(_0x49ba03(0xa5))/0x8*(-parseInt(_0x49ba03(0xb3))/0x9)+-parseInt(_0x49ba03(0xb2))/0xa;if(_0x6459c4===_0x30cce8)break;else _0x2330ad['push'](_0x2330ad['shift']());}catch(_0xfc5f4){_0x2330ad['push'](_0x2330ad['shift']());}}}(_0x5630,0xbc024));import{View as _0x45418f}from'ckeditor5/src/ui.js';function _0x5630(){const _0x338422=['6201PbSDzF','bindTemplate','ck-uploadcare-theme','uc-light','344qoawDI','uc-cloud-image-editor','8897862lqhvSe','setTemplate','image-edit','6137000nlzDTS','37gszNnB','set','15437190rgAoLb','4122aaAnFl','11238kmEgXt','3569265jacyvY','imageSrc','16360SUHsSh'];_0x5630=function(){return _0x338422;};return _0x5630();}export class UploadcareImageEditFormEditingView extends _0x45418f{constructor(_0x513626,_0x174f46){const _0x3b3883=_0x4c8d;super(_0x513626);const _0x2db864=this[_0x3b3883(0xa7)];this[_0x3b3883(0xb1)](_0x3b3883(0xa4),''),this[_0x3b3883(0xad)]({'tag':_0x3b3883(0xab),'attributes':{..._0x174f46,'class':[_0x3b3883(0xa9),_0x3b3883(0xa8)],'ctx-name':_0x3b3883(0xae),'cdn-url':_0x2db864['to'](_0x3b3883(0xa4))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x2c43cb}from'ckeditor5/src/icons.js';import{ButtonView as _0x167ece,IconView as _0x2dd70b,View as _0x13a0ee}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x13a0ee{constructor(_0x1ea025){super(_0x1ea025);const t=_0x1ea025['t'];this['set']('errorType',null);const _0x304cc3=new _0x167ece(_0x1ea025);_0x304cc3['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x304cc3['withText']=!0x0,_0x304cc3['class']='ck-button-action',_0x304cc3['on']('execute',()=>{this['fire']('retry');}),_0x304cc3['bind']('isVisible')['to'](this,'errorType',_0x422872=>'NotFound'!==_0x422872);const _0x4a7121=new _0x2dd70b();_0x4a7121['content']=_0x2c43cb,_0x4a7121['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x99b1ae=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':[_0x4a7121,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x99b1ae['to']('errorType',_0x50e9d2=>t('NotFound'!==_0x50e9d2?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x304cc3]},{'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'}]}]}]});}}
|