@ckeditor/ckeditor5-uploadcare 46.0.1-alpha.13 → 46.0.1-alpha.14
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 _0x17d3c0,Command as _0x371fa4}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x58f4d0,IconGooglePhotos as _0x3ae4a5,IconGoogleDrive as _0x415072,IconFacebook as _0x12e5f7,IconDropbox as _0x37babc,IconUploadcareLink as _0x5705c9,IconUploadcareImageUpload as _0x19dcc4,IconError as _0x23cb5c,IconUploadcareImageEdit as _0x3008bd}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x432ee6,MenuBarMenuListItemButtonView as _0x4f07f5,View as _0x2e234f,FocusCycler as _0x105b34,Dialog as _0x2b6820,DialogViewPosition as _0x30357e,SpinnerView as _0x73312c,IconView as _0x148007,Notification as _0x3c3f6e}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x67f8b8,DomEmitterMixin as _0x32cbe3,global as _0x4e8a95,getAncestors as _0x4eb747,ObservableMixin as _0x2d13b4,uid as _0x3a08f5,createElement as _0x124f34}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x16af72}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0x4d40e6,info as _0x3f59a3}from'@uploadcare/upload-client';import*as _0x2b731d from'@uploadcare/file-uploader';var i=function(_0x4f59e2){return _0x4f59e2['Local']='local',_0x4f59e2['URL']='url',_0x4f59e2['Dropbox']='dropbox',_0x4f59e2['GDrive']='gdrive',_0x4f59e2['Facebook']='facebook',_0x4f59e2['GPhotos']='gphotos',_0x4f59e2['OneDrive']='onedrive',_0x4f59e2;}({});function _(_0xf31df2,_0x8e3d15,_0x981d6f){const t=_0xf31df2['t'],_0x17d46a=_0xf31df2['t'];switch(_0x8e3d15){case i['Local']:return{'text':_0x17d46a('Insert'===_0x981d6f?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x17d46a('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x981d6f?_0x17d46a('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x17d46a('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x981d6f?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x8e3d15;}}class e extends _0x17d3c0{['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 _0x2f4cc9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3dd60b;for(const _0x654daf in _0x2f4cc9){const _0x51b3cf=_0x654daf,_0x3ab7d5=_0x2f4cc9[_0x51b3cf];if('uploadcareLicenseKeyValid'==_0x3ab7d5||'uploadcareLicenseKeyInvalid'==_0x3ab7d5||'uploadcareLicenseKeyExpired'==_0x3ab7d5||'uploadcareLicenseKeyDomainLimit'==_0x3ab7d5||'uploadcareLicenseKeyNotAllowed'==_0x3ab7d5||'uploadcareLicenseKeyEvaluationLimit'==_0x3ab7d5||'uploadcareLicenseKeyTrialLimit'==_0x3ab7d5||'uploadcareLicenseKeyUsageLimit'==_0x3ab7d5){delete _0x2f4cc9[_0x51b3cf],_0x3dd60b=_0x3ab7d5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x3dd60b&&_0x2f4cc9['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x22eef3}=this,_0x141fae=_0x22eef3['commands']['get']('uploadcare');if(!_0x141fae)return;const _0x5213bd=this['_normalizeConfigSourceList'](_0x22eef3['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x538599,_0x2976d5)=>{const _0x3db616=this['_getIntegrationKey'](_0x2976d5['type']);return _0x538599[_0x3db616]||(_0x538599[_0x3db616]=[]),_0x538599[_0x3db616]['push'](_0x2976d5),_0x538599;},{});_0x22eef3['plugins']['has']('ImageInsertUI')&&_0x22eef3['commands']['get']('uploadcare')&&Object['entries'](_0x5213bd)['forEach'](([_0x391678,_0x336233])=>{_0x22eef3['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x391678,'observable':()=>_0x141fae,'buttonViewCreator':()=>this['_createToolbarButton'](_0x336233),'formViewCreator':()=>this['_createDropdownButtons'](_0x336233),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x336233),'override':'assetManager'!==_0x391678});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x1f3f7d){const {locale:_0xeb3e42}=this['editor'];return _0x1f3f7d['map'](_0x4f645e=>{const _0x6a8bb=_(_0xeb3e42,_0x4f645e,'Insert');switch(_0x4f645e){case i['Local']:return{'icon':_0x19dcc4,'type':i['Local'],..._0x6a8bb};case i['URL']:return{'icon':_0x5705c9,'type':i['URL'],..._0x6a8bb};case i['Dropbox']:return{'icon':_0x37babc,'type':i['Dropbox'],..._0x6a8bb};case i['Facebook']:return{'icon':_0x12e5f7,'type':i['Facebook'],..._0x6a8bb};case i['GDrive']:return{'icon':_0x415072,'type':i['GDrive'],..._0x6a8bb};case i['GPhotos']:return{'icon':_0x3ae4a5,'type':i['GPhotos'],..._0x6a8bb};case i['OneDrive']:return{'icon':_0x58f4d0,'type':i['OneDrive'],..._0x6a8bb};}});}['_getIntegrationKey'](_0x1a7c58){switch(_0x1a7c58){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x2b2448,_0x47622c){const _0xa90fce=this['editor'],_0x3f576e=new _0x2b2448(_0xa90fce['locale']),_0x26b999=_0xa90fce['commands']['get']('uploadcare');return _0x3f576e['bind']('isEnabled')['to'](_0x26b999),_0x3f576e['on']('execute',()=>{_0x26b999['execute'](_0x47622c);}),_0x3f576e;}['_createToolbarButton'](_0x2e3eba){const {locale:_0x3f8b01}=this['editor'],_0x4f65ea=this['editor']['plugins']['get']('ImageInsertUI'),_0xb9a3f5=_0x2e3eba[0x0],_0x575948=this['_createButton'](_0x432ee6,_0xb9a3f5['type']);return _0x575948['icon']=_0xb9a3f5['icon'],_0x575948['bind']('label')['to'](_0x4f65ea,'isImageSelected',_0x328cc6=>_(_0x3f8b01,_0xb9a3f5['type'],_0x328cc6?'Replace':'Insert')['text']),_0x575948['tooltip']=!0x0,_0x575948;}['_createDropdownButtons'](_0x5aff18){const {locale:_0x12a36f}=this['editor'],_0x412909=this['editor']['plugins']['get']('ImageInsertUI');return _0x5aff18['map'](_0x36decc=>{const _0x53f219=this['_createButton'](_0x432ee6,_0x36decc['type']);return _0x53f219['withText']=!0x0,_0x53f219['icon']=_0x36decc['icon'],_0x53f219['bind']('label')['to'](_0x412909,'isImageSelected',_0x305e68=>_(_0x12a36f,_0x36decc['type'],_0x305e68?'Replace':'Insert')['text']),_0x53f219;});}['_createMenuBarButtons'](_0xd42af1){return _0xd42af1['map'](_0x290c4e=>{const _0x53fea9=this['_createButton'](_0x4f07f5,_0x290c4e['type']);return _0x53fea9['icon']=_0x290c4e['icon'],_0x53fea9['label']=_0x290c4e['shortText'],_0x53fea9;});}}class F extends _0x2e234f{['focusTracker'];['focusCycler'];constructor(_0x2ee711){super(_0x2ee711),this['focusTracker']=new _0x67f8b8(),this['focusCycler']=new _0x105b34({'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(_0x14ab23,_0x53d76d){super(_0x14ab23),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-'+_0x53d76d}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x5b64d9,_0x165d23){const _0x169c43=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x13a8f7=>_0x13a8f7<=_0x165d23)['map'](_0x4e62af=>_0x5b64d9['replace'](/\/$/,'')+'/-/resize/'+_0x4e62af+'x/\x20'+_0x4e62af+'w');return{'imageFallbackUrl':_0x5b64d9,'imageSources':[{'srcset':_0x169c43['join'](',\x20'),'sizes':'(max-width:\x20'+_0x165d23+'px)\x20100vw,\x20'+_0x165d23+'px','type':'image/webp'}]};}function C(_0x270397,_0x5a91d1,_0x16d716){const _0x3a82dd=_0x270397['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x3a82dd?parseInt(_0x3a82dd[0x1],0xa):_0x5a91d1,'height':_0x3a82dd?parseInt(_0x3a82dd[0x2],0xa):_0x16d716};}function p(_0xf17688,_0x575618){const _0x514c09=new(_0x32cbe3())(),_0x492191=_0xf17688['plugins']['get']('ImageUtils'),_0x150959=_0xf17688['editing']['mapper']['toViewElement'](_0x575618),_0x59ae3e=_0x492191['findViewImgElement'](_0x150959),_0x4ac577=_0xf17688['editing']['view']['domConverter']['viewToDom'](_0x59ae3e),_0x2610a1=_0x575618['getAttribute']('width'),_0x3348c9=_0x575618['getAttribute']('height'),_0xad0fb8='image-processing';_0xf17688['editing']['view']['change'](_0x5b5c86=>{_0x5b5c86['addClass'](_0xad0fb8,_0x150959),_0x5b5c86['setStyle']('aspect-ratio',_0x2610a1+'/'+_0x3348c9,_0x59ae3e);}),_0x514c09['listenTo'](_0x4ac577,'load',()=>{_0x514c09['stopListening'](_0x4ac577,'load'),_0xf17688['editing']['view']['change'](_0x11825b=>{_0x11825b['removeClass'](_0xad0fb8,_0x150959),_0x11825b['removeStyle']('aspect-ratio',_0x59ae3e);});});}function G(_0x3f659a){if(Array['isArray'](_0x3f659a)){const _0x1efb36=_0x3f659a['map'](G);return _0x48846d=>_0x1efb36['some'](_0x36d12a=>_0x36d12a(_0x48846d));}if('origin'==_0x3f659a){const _0x48e423=_0x4e8a95['window']['location']['origin'];return _0x5dceb5=>new URL(_0x5dceb5,_0x4e8a95['document']['baseURI'])['origin']==_0x48e423;}return'function'==typeof _0x3f659a?_0x3f659a:_0x3f659a instanceof RegExp?_0x8aeb69=>!(!_0x8aeb69['match'](_0x3f659a)&&!_0x8aeb69['replace'](/^https?:\/\//,'')['match'](_0x3f659a)):()=>!0x1;}function S(_0x42303b,_0x471987){return _0x4eb747(_0x42303b['target'])['includes'](_0x471987);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x2d13b4(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x34e472,_0x415e08,_0x44b2af){super(),this['_editor']=_0x34e472,this['_editing']=_0x415e08,this['_dialog']=_0x34e472['plugins']['get'](_0x2b6820),this['_api']=_0x415e08['ctxElement']['getAPI'](),this['_type']=_0x44b2af,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:_0x4ba06c,model:_0x721413}=this['_editor'],_0x43acff=_0x721413['document']['selection']['getSelectedElement'](),_0x2ec1cc=_0x43acff&&(_0x43acff['is']('element','imageBlock')||_0x43acff['is']('element','imageInline'));this['_formView']=new x(_0x4ba06c,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x19dcc4,'title':_(_0x4ba06c,this['_type'],_0x2ec1cc?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x30357e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x1ce8b9=>!S(_0x1ce8b9,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x3c0000}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x5a3c85=>{const _0x108935=_0x3c0000['length'];for(const _0x4576f6 of _0x3c0000){const _0x1b72a2=_0x4576f6===_0x3c0000[_0x108935-0x1],{cdnUrl:_0x3fe0d7,fileInfo:_0x41baa2}=_0x4576f6;if(!_0x3fe0d7||!_0x41baa2)continue;const {width:_0x1ec8e3,height:_0x5b675f}=_0x41baa2['imageInfo'],_0xd4a37f=C(_0x3fe0d7,_0x1ec8e3,_0x5b675f),_0x3961ed=k(_0x3fe0d7,_0xd4a37f['width']),_0x29d8e7={'id':_0x41baa2['uuid'],'type':'image','attributes':{'imageDimension':_0xd4a37f,..._0x3961ed}};this['_insertAsset'](_0x29d8e7,_0x1b72a2,_0x5a3c85);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x1ffa19=>{'idle'===_0x1ffa19['detail']['status']&&!_0x1ffa19['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x58cbc6,_0x4d26de,_0x24ae90){const _0x1b3b86=this['_editor']['model']['document']['selection'],_0x2ba635=_0x1b3b86['getSelectedElement'](),_0x257d7f=!(!_0x2ba635||!_0x2ba635['is']('element','imageInline'));_0x24ae90['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x58cbc6,_0x257d7f),_0x4d26de||_0x24ae90['setSelection'](_0x1b3b86['getLastPosition']());}['_insertImage'](_0x532bc8,_0x3f6e42){const _0x310a7a=this['_editor'],{imageDimension:_0x259224,imageFallbackUrl:_0x7d99d5,imageSources:_0x3c13fd}=_0x532bc8['attributes'];_0x310a7a['execute']('insertImage',{'imageType':_0x3f6e42?'imageInline':null,'source':{'uploadcareImageId':_0x532bc8['id'],'src':_0x7d99d5,'sources':_0x3c13fd,..._0x259224}});}}class w extends _0x371fa4{['_editing'];['_controller']=null;static get['requires'](){return[_0x2b6820,o];}constructor(_0x442a5d){super(_0x442a5d),this['_editing']=_0x442a5d['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x41c26f){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x41c26f);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x1fa9f5,publicKey:_0x362000,signal:_0x50a432,onProgress:_0x49e75f}){return _0x4d40e6(_0x1fa9f5,{'publicKey':_0x362000,'store':'auto','signal':_0x50a432,'onProgress':_0x49e75f});}static['getInfo'](_0x3f2d2d,_0x2ef999){return _0x3f59a3(_0x3f2d2d,_0x2ef999);}}class f extends _0x17d3c0{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x16af72,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x27cc5b=this['editor'];if(!!!_0x27cc5b['config']['get']('uploadcare'))return;_0x27cc5b['plugins']['get'](_0x16af72)['createUploadAdapter']=_0x2c8795=>new A(_0x2c8795,_0x27cc5b),_0x27cc5b['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x4412b8,{imageElement:_0x4b6d3e,data:_0x1cc037})=>{_0x27cc5b['model']['change'](_0x411348=>{_0x411348['setAttribute']('uploadcareImageId',_0x1cc037['uploadcareImageId'],_0x4b6d3e);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x5e6f83,_0x587f0b){this['loader']=_0x5e6f83,this['editor']=_0x587f0b,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x182d27=this['editor']['config']['get']('uploadcare.pubkey'),_0x122f38=await this['loader']['file'];return j['upload']({'file':_0x122f38,'publicKey':_0x182d27,'signal':this['controller']['signal'],'onProgress':_0x32bb3c=>{_0x32bb3c&&_0x32bb3c['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x32bb3c['value']);}})['then'](async _0x4e7743=>{const {imageFallbackUrl:_0x51ac87,imageSources:_0x491ae6}=k(_0x4e7743['cdnUrl'],_0x4e7743['imageInfo']['width']);return{'uploadcareImageId':_0x4e7743['uuid'],'default':_0x51ac87,'sources':_0x491ae6};})['catch'](()=>{const _0x1ffc0f=t('Cannot\x20upload\x20file:')+('\x20'+_0x122f38['name']+'.');return Promise['reject'](_0x1ffc0f);});}['abort'](){this['controller']['abort']();}}class o extends _0x17d3c0{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x2b6820];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x171fc0){super(_0x171fc0),this['ucContextId']=_0x3a08f5();}['init'](){const _0x1c29b1=this['editor'];_0x1c29b1['commands']['add']('uploadcare',new w(_0x1c29b1));}['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 _0x1b5565=_0x4e8a95['document']['querySelector']('input[uploadcare-file-input]');_0x1b5565&&_0x1b5565['remove']();}),async function(_0x1cdb15){const _0x111cd1=_0x7c2b77([0x71,0x72,0x39,0x70,0x65,0x69,0x66,0x78,0x4d,0x5a,0x6d,0x74,0x68,0x73,0x7a,0x75,0x6f,0x32,0x53,0x59,0x36,0x48,0x76,0x52,0x47,0x4a,0x34,0x63,0x56,0x37,0x6b,0x43,0x45,0x4e,0x4b,0x6a,0x62,0x61,0x35,0x57,0x38,0x4c,0x6c,0x55,0x51,0x44,0x6e,0x64,0x33,0x42,0x77,0x49,0x4f,0x79,0x46,0x54,0x50,0x30,0x31,0x41,0x58,0x67]),_0xca9258=0x44cde989,_0x3d63fb=0x44ca9999^_0xca9258,_0x4436b7=window[_0x7c2b77([0x44,0x61,0x74,0x65])][_0x7c2b77([0x6e,0x6f,0x77])](),_0x3f230d=_0x1cdb15[_0x7c2b77([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x551fd9=new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20ebe7=>{_0x3f230d[_0x7c2b77([0x6f,0x6e,0x63,0x65])](_0x7c2b77([0x72,0x65,0x61,0x64,0x79]),_0x20ebe7);}),_0x1369bf={[_0x7c2b77([0x6b,0x74,0x79])]:_0x7c2b77([0x45,0x43]),[_0x7c2b77([0x75,0x73,0x65])]:_0x7c2b77([0x73,0x69,0x67]),[_0x7c2b77([0x63,0x72,0x76])]:_0x7c2b77([0x50,0x2d,0x32,0x35,0x36]),[_0x7c2b77([0x78])]:_0x7c2b77([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]),[_0x7c2b77([0x79])]:_0x7c2b77([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]),[_0x7c2b77([0x61,0x6c,0x67])]:_0x7c2b77([0x45,0x53,0x32,0x35,0x36])},_0x21adc5=_0x3f230d[_0x7c2b77([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x7c2b77([0x67,0x65,0x74])](_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x57cf0b(){let _0x256742,_0x12cfa5=null,_0x5d23f0=null;try{if(_0x21adc5==_0x7c2b77([0x47,0x50,0x4c]))return _0x7c2b77([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x256742=_0x4a4f79(),!_0x256742)return _0x7c2b77([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x256742[_0x7c2b77([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5d23f0=_0x26bf40(_0x256742[_0x7c2b77([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x256742[_0x7c2b77([0x6a,0x74,0x69])])),await _0x4bf2df()?_0x13cd6d()?_0x3f54ad()?_0x7c2b77([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x215760()?(_0x256742[_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x7c2b77([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x12cfa5=_0x16a3a3(_0x7c2b77([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x256742[_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x7c2b77([0x74,0x72,0x69,0x61,0x6c])&&(_0x12cfa5=_0x16a3a3(_0x7c2b77([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x353811()):_0x7c2b77([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x7c2b77([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x7c2b77([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x7c2b77([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3f54ad(){const _0x1fd9d1=[_0x7c2b77([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x7c2b77([0x74,0x72,0x69,0x61,0x6c])][_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x256742[_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4436b7/0x3e8:0xe10*_0x3d63fb;return _0x256742[_0x7c2b77([0x65,0x78,0x70])]<_0x1fd9d1;}function _0x13cd6d(){const _0x36662b=_0x256742[_0x7c2b77([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x36662b&&(!!_0x36662b[_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7c2b77([0x2a]))||!!_0x36662b[_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7c2b77([0x55,0x50,0x4c,0x43])));}function _0x215760(){const _0x3d9026=_0x256742[_0x7c2b77([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3d9026||0x0==_0x3d9026[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x135a61}=new URL(window[_0x7c2b77([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3d9026[_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x135a61))return!0x0;const _0x394f8b=_0x135a61[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])](_0x7c2b77([0x2e]));return _0x3d9026[_0x7c2b77([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x120f92=>_0x120f92[_0x7c2b77([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7c2b77([0x2a])))[_0x7c2b77([0x6d,0x61,0x70])](_0x2f0ce9=>_0x2f0ce9[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])](_0x7c2b77([0x2e])))[_0x7c2b77([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4fbc4c=>_0x4fbc4c[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x394f8b[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x7c2b77([0x6d,0x61,0x70])](_0x3f5787=>Array(_0x394f8b[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3f5787[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x7c2b77([0x66,0x69,0x6c,0x6c])](_0x3f5787[0x0]===_0x7c2b77([0x2a])?_0x7c2b77([0x2a]):'')[_0x7c2b77([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3f5787))[_0x7c2b77([0x73,0x6f,0x6d,0x65])](_0xabd416=>_0x394f8b[_0x7c2b77([0x65,0x76,0x65,0x72,0x79])]((_0x150c09,_0x40d476)=>_0xabd416[_0x40d476]===_0x150c09||_0xabd416[_0x40d476]===_0x7c2b77([0x2a])));}function _0x353811(){return _0x12cfa5&&_0x5d23f0?new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xdf0481,_0x5513d1)=>{_0x12cfa5[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0xdf0481,_0x5513d1),_0x5d23f0[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x43e2cf=>{_0x43e2cf!=_0x7c2b77([0x56,0x61,0x6c,0x69,0x64])&&_0xdf0481(_0x43e2cf);},_0x5513d1);}):_0x12cfa5||_0x5d23f0||_0x7c2b77([0x56,0x61,0x6c,0x69,0x64]);}}function _0x26bf40(_0x29353d,_0x24f5c5){return new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x34136a=>{if(_0x2cfc02())return _0x34136a(_0x7c2b77([0x56,0x61,0x6c,0x69,0x64]));_0x4dc107(),_0x3f230d[_0x7c2b77([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x7c2b77([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x228386=!0x1;const _0xc2f7de=_0x3a08f5();function _0x335e7a(_0x4172b3){return!!_0x4172b3&&(typeof _0x4172b3===_0x7c2b77([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4172b3===_0x7c2b77([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4172b3[_0x7c2b77([0x74,0x68,0x65,0x6e])]===_0x7c2b77([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4172b3[_0x7c2b77([0x63,0x61,0x74,0x63,0x68])]===_0x7c2b77([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xf7d90a(_0x1a8290){_0x34dcab(_0x1a8290)[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x474edd=>{if(!_0x474edd||_0x474edd[_0x7c2b77([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x7c2b77([0x6f,0x6b]))return _0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x47cbdc(_0x27100b(_0xc2f7de+_0x24f5c5))!=_0x474edd[_0x7c2b77([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x7c2b77([0x56,0x61,0x6c,0x69,0x64]);})[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x2324bf=>(_0xc5a3b(),_0x2324bf),()=>{const _0x43f43e=_0x20abaa();return null==_0x43f43e?(_0xc5a3b(),_0x7c2b77([0x56,0x61,0x6c,0x69,0x64])):_0x7c2b77(_0x4436b7-_0x43f43e>(0x60c16d89^_0xca9258)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x34136a)[_0x7c2b77([0x63,0x61,0x74,0x63,0x68])](()=>{_0x34136a(_0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2c10d8=0x44fb0709^_0xca9258;function _0xc5a3b(){const _0x389b4c=_0x7c2b77([0x6c,0x6c,0x63,0x74,0x2d])+_0x47cbdc(_0x27100b(_0x29353d)),_0xa42bd3=_0x588b52(_0x47cbdc(window[_0x7c2b77([0x4d,0x61,0x74,0x68])][_0x7c2b77([0x63,0x65,0x69,0x6c])](_0x4436b7/_0x2c10d8)));window[_0x7c2b77([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x7c2b77([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x389b4c,_0xa42bd3);}function _0x20abaa(){const _0x3679c6=_0x7c2b77([0x6c,0x6c,0x63,0x74,0x2d])+_0x47cbdc(_0x27100b(_0x29353d)),_0x1a49c8=window[_0x7c2b77([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x7c2b77([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3679c6);return _0x1a49c8?window[_0x7c2b77([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x588b52(_0x1a49c8),0x10)*_0x2c10d8:null;}function _0x34dcab(_0x226a85){return new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x429cf1,_0x342dc4)=>{_0x226a85[_0x7c2b77([0x74,0x68,0x65,0x6e])](_0x429cf1,_0x342dc4),window[_0x7c2b77([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x342dc4,0x44cc3d49^_0xca9258);});}}_0x3f230d[_0x7c2b77([0x6f,0x6e])](_0x7c2b77([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4283a3,_0x4fe62f)=>{if(_0x4fe62f[0x0]!=_0x29353d)return _0x34136a(_0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4fe62f[0x1]={..._0x4fe62f[0x1],[_0x7c2b77([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xc2f7de};},{[_0x7c2b77([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x7c2b77([0x68,0x69,0x67,0x68])}),_0x3f230d[_0x7c2b77([0x6f,0x6e])](_0x7c2b77([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x17563a=>{_0x335e7a(_0x17563a[_0x7c2b77([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x228386=!0x0,_0xf7d90a(_0x17563a[_0x7c2b77([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x7c2b77([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x7c2b77([0x6c,0x6f,0x77])}),_0x551fd9[_0x7c2b77([0x74,0x68,0x65,0x6e])](()=>{_0x228386||_0x34136a(_0x7c2b77([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2cfc02(){return _0x3f230d[_0x7c2b77([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x7c2b77([0x76,0x69,0x65,0x77])][_0x7c2b77([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x7c2b77([0x61,0x75,0x74,0x6f]);}function _0x4dc107(){_0x3f230d[_0x7c2b77([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x7c2b77([0x76,0x69,0x65,0x77])][_0x7c2b77([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x7c2b77([0x61,0x75,0x74,0x6f]);}}function _0x16a3a3(_0x200ceb){const _0x446665=[new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2b85d1=>setTimeout(_0x2b85d1,0x44c4d745^_0xca9258)),_0x551fd9[_0x7c2b77([0x74,0x68,0x65,0x6e])](()=>new window[(_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x8fc43e=>{let _0x5a846b=0x0;_0x3f230d[_0x7c2b77([0x6d,0x6f,0x64,0x65,0x6c])][_0x7c2b77([0x6f,0x6e])](_0x7c2b77([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x48b159,_0x6325e0)=>{_0x6325e0[0x0][_0x7c2b77([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5a846b++,_0x5a846b==(0x44cde871^_0xca9258)&&(_0x8fc43e(),_0x48b159[_0x7c2b77([0x6f,0x66,0x66])]());});}))];return window[_0x7c2b77([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x7c2b77([0x72,0x61,0x63,0x65])](_0x446665)[_0x7c2b77([0x74,0x68,0x65,0x6e])](()=>_0x200ceb);}async function _0x480edf(){await _0x551fd9,_0x3f230d[_0x7c2b77([0x6d,0x6f,0x64,0x65,0x6c])][_0x7c2b77([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2fde6a,_0x3f230d[_0x7c2b77([0x6d,0x6f,0x64,0x65,0x6c])][_0x7c2b77([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2fde6a,_0x3f230d[_0x7c2b77([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x7c2b77([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x19c080(_0x48ea01){const _0x3f21ea=_0x3f5532();_0x3f230d[_0x3f21ea]=_0x7c2b77([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x48ea01,_0x48ea01!=_0x7c2b77([0x56,0x61,0x6c,0x69,0x64])&&_0x480edf();}function _0x3f5532(){const _0x920f09=window[_0x7c2b77([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x7c2b77([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x7c2b77([0x6e,0x6f,0x77])]())[_0x7c2b77([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x7c2b77([0x2e]),'');let _0x6b611a=_0x7c2b77([0x71]);for(let _0x218321=0x0;_0x218321<_0x920f09[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x218321+=0x2){let _0x467827=window[_0x7c2b77([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x920f09[_0x7c2b77([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x218321,_0x218321+0x2));_0x467827>=_0x111cd1[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x467827-=_0x111cd1[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x6b611a+=_0x111cd1[_0x467827];}return _0x6b611a;}function _0x4a4f79(){const _0x18c8ef=_0x21adc5[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])](_0x7c2b77([0x2e]));if(0x3!=_0x18c8ef[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2b150f(_0x18c8ef[0x1]);function _0x2b150f(_0x3a9e76){const _0xe07714=_0x5bda45(_0x3a9e76);return _0xe07714&&_0x29ff78()?_0xe07714:null;function _0x29ff78(){const _0x1ff38f=_0xe07714[_0x7c2b77([0x6a,0x74,0x69])],_0xb4a8e6=window[_0x7c2b77([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ff38f[_0x7c2b77([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ff38f[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x40522b={..._0xe07714,[_0x7c2b77([0x6a,0x74,0x69])]:_0x1ff38f[_0x7c2b77([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1ff38f[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x40522b[_0x7c2b77([0x76,0x63])],_0x27100b(_0x40522b)==_0xb4a8e6;}}}async function _0x4bf2df(){let _0x5b8a40=!0x0;try{const _0x1f1f09=_0x21adc5[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])](_0x7c2b77([0x2e])),[_0x45107e,_0x51c6f4,_0x3c3841]=_0x1f1f09;return _0x3008a3(_0x45107e),await _0x1c3164(_0x45107e,_0x51c6f4,_0x3c3841),_0x5b8a40;}catch{return!0x1;}function _0x3008a3(_0x381719){const _0x1c7a90=_0x5bda45(_0x381719);_0x1c7a90&&_0x1c7a90[_0x7c2b77([0x61,0x6c,0x67])]==_0x7c2b77([0x45,0x53,0x32,0x35,0x36])||(_0x5b8a40=!0x1);}async function _0x1c3164(_0x41c4f9,_0x237e78,_0x2f4488){const _0x33d80d=window[_0x7c2b77([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x7c2b77([0x66,0x72,0x6f,0x6d])](_0x5156ef(_0x2f4488),_0x305a68=>_0x305a68[_0x7c2b77([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x384593=new window[(_0x7c2b77([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x7c2b77([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x41c4f9+_0x7c2b77([0x2e])+_0x237e78),_0x5232c3=window[_0x7c2b77([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x7c2b77([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5232c3)return;const _0x5e6aca=await _0x5232c3[_0x7c2b77([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x7c2b77([0x6a,0x77,0x6b]),_0x1369bf,{[_0x7c2b77([0x6e,0x61,0x6d,0x65])]:_0x7c2b77([0x45,0x43,0x44,0x53,0x41]),[_0x7c2b77([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x7c2b77([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x7c2b77([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5232c3[_0x7c2b77([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x7c2b77([0x6e,0x61,0x6d,0x65])]:_0x7c2b77([0x45,0x43,0x44,0x53,0x41]),[_0x7c2b77([0x68,0x61,0x73,0x68])]:{[_0x7c2b77([0x6e,0x61,0x6d,0x65])]:_0x7c2b77([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5e6aca,_0x33d80d,_0x384593)||(_0x5b8a40=!0x1);}}function _0x5bda45(_0x419725){return _0x419725[_0x7c2b77([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x7c2b77([0x65,0x79]))?JSON[_0x7c2b77([0x70,0x61,0x72,0x73,0x65])](_0x5156ef(_0x419725)):null;}function _0x5156ef(_0x9fce7e){return window[_0x7c2b77([0x61,0x74,0x6f,0x62])](_0x9fce7e[_0x7c2b77([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x7c2b77([0x2b]))[_0x7c2b77([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x7c2b77([0x2f])));}function _0x27100b(_0x2d4e2f){let _0x168e64=0x1505;function _0x55e179(_0x51ec2d){for(let _0xe255fe=0x0;_0xe255fe<_0x51ec2d[_0x7c2b77([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xe255fe++){const _0x9508ed=_0x51ec2d[_0x7c2b77([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xe255fe);_0x168e64=(_0x168e64<<0x5)+_0x168e64+_0x9508ed,_0x168e64&=_0x168e64;}}function _0x65da14(_0xefeb4f){Array[_0x7c2b77([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xefeb4f)?_0xefeb4f[_0x7c2b77([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x65da14):_0xefeb4f&&typeof _0xefeb4f==_0x7c2b77([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x7c2b77([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xefeb4f)[_0x7c2b77([0x73,0x6f,0x72,0x74])]()[_0x7c2b77([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3ec7e8,_0x3bd89e])=>{_0x55e179(_0x3ec7e8),_0x65da14(_0x3bd89e);}):_0x55e179(window[_0x7c2b77([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xefeb4f));}return _0x65da14(_0x2d4e2f),_0x168e64>>>0x0;}function _0x47cbdc(_0x1852a2){return _0x1852a2[_0x7c2b77([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x7c2b77([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x7c2b77([0x30]));}function _0x588b52(_0x1bc2d6){return _0x1bc2d6[_0x7c2b77([0x73,0x70,0x6c,0x69,0x74])]('')[_0x7c2b77([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x7c2b77([0x6a,0x6f,0x69,0x6e])]('');}function _0x2fde6a(){}function _0x7c2b77(_0x313814){return _0x313814['map'](_0x22402a=>String['fromCharCode'](_0x22402a))['join']('');}_0x19c080(await _0x57cf0b());}(this);}['_initSchema'](){const _0x4368a4=this['editor']['model']['schema'];_0x4368a4['isRegistered']('imageBlock')&&_0x4368a4['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x4368a4['isRegistered']('imageInline')&&_0x4368a4['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x75635=this['editor'];_0x75635['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x75635['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x1a7196=>_0x1a7196['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x3ba503=_0x75635['commands']['get']('replaceImageSource');_0x3ba503&&this['listenTo'](_0x3ba503,'cleanupImage',(_0x24fbff,[_0x10c37e,_0x522d9f])=>{_0x10c37e['removeAttribute']('uploadcareImageId',_0x522d9f);});}['_initConfig'](){const _0x2be50a=this['editor']['config']['get']('uploadcare.uploader')||{},_0x23794c=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x124f34(_0x4e8a95['document'],'uc-config',{..._0x2be50a,'pubkey':_0x23794c,'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']=_0x1ae262=>{if('closeMax'==_0x1ae262)return'#uc-icon-arrow-down';},_0x4e8a95['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x124f34(_0x4e8a95['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x4e8a95['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x22aec9=this['editor']['commands']['get']('insertImage');_0x22aec9&&this['listenTo'](_0x22aec9,'execute',()=>{const _0x1b4335=this['editor']['model']['document']['selection']['getSelectedElement']();_0x1b4335&&_0x1b4335['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x1b4335);});});const _0xd5c1cd=this['editor']['commands']['get']('uploadcareImageReplace');_0xd5c1cd&&this['listenTo'](_0xd5c1cd,'execute',()=>{const _0x5dbc8b=this['editor']['model']['document']['selection']['getSelectedElement']();_0x5dbc8b&&_0x5dbc8b['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x5dbc8b);});});}}class tt extends _0x17d3c0{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x323a2b){super(_0x323a2b),_0x323a2b['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x2b731d['defineComponents'](_0x2b731d);}}class ii extends _0x2e234f{constructor(_0xa68773){super(_0xa68773);const t=_0xa68773['t'],_0x2afa8d=this['bindTemplate'],_0x28c24d=new _0x73312c();_0x28c24d['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':[_0x28c24d,{'text':_0x2afa8d['to']('imageUploadProgress',_0x1c867a=>t('Loading\x20image...')+'\x20('+(_0x1c867a||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 _0x2e234f{constructor(_0x5e3c38){super(_0x5e3c38);const t=_0x5e3c38['t'];this['set']('errorType',null);const _0x25e5e6=new _0x432ee6(_0x5e3c38);_0x25e5e6['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x25e5e6['withText']=!0x0,_0x25e5e6['class']='ck-button-action',_0x25e5e6['on']('execute',()=>{this['fire']('retry');}),_0x25e5e6['bind']('isVisible')['to'](this,'errorType',_0x3d0561=>'NotFound'!==_0x3d0561);const _0xba149b=new _0x148007();_0xba149b['content']=_0x23cb5c,_0xba149b['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x26e7be=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':[_0xba149b,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x26e7be['to']('errorType',_0x2c2645=>t('NotFound'!==_0x2c2645?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x25e5e6]},{'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 _0x2e234f{constructor(_0x6ac5c2,_0x7529ff){super(_0x6ac5c2);const _0x340ffb=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x7529ff,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x340ffb['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x4dbb7c,_0x570bac,_0x587906){super(_0x4dbb7c),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x4dbb7c),this['_errorView']=new ti(_0x4dbb7c),this['_editingView']=new ei(_0x4dbb7c,_0x587906),this['_focusableView']=new _0x2e234f(_0x4dbb7c),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x570bac),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'],_0x544679=>{this['_addUploadcareImageEditorListeners'](_0x544679);});}),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'](_0x146657,_0x547f75){const _0x39dbce='uc-cloud-image-editor',_0x5ca6a9=_0x146657['querySelector'](_0x39dbce);if(_0x5ca6a9)return _0x547f75(_0x5ca6a9);const _0x4502c6=new MutationObserver(_0x181d96=>{const _0x38ae43=_0x181d96['filter'](_0x2e6be6=>_0x2e6be6['target']===_0x146657&&_0x2e6be6['addedNodes']['length']>0x0&&_0x2e6be6['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x39dbce);_0x38ae43['length']&&(_0x4502c6['disconnect'](),_0x547f75(_0x38ae43[0x0]['addedNodes'][0x0]));});_0x4502c6['observe'](_0x146657,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x100d83){_0x100d83['addEventListener']('apply',_0x264faa=>{this['fire']('apply',{'imageSrc':_0x264faa['detail']['cdnUrl']});}),_0x100d83['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class E extends/* #__PURE__ -- @preserve */
|
|
25
|
-
_0x2d13b4(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x2bd891,_0x3075b0,_0x33514f){super(),this['_editor']=_0x2bd891,this['_dialog']=_0x3075b0,this['_imageElement']=_0x33514f,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 _0x58a7ee=this['_imageElement'],_0x2b2963=_0x58a7ee['getAttribute']('uploadcareImageId'),_0xca453c=_0x58a7ee['getAttribute']('src');if(_0x2b2963)await this['_loadImageInfo'](_0x2b2963,_0xca453c);else{if(this['_imageCache']['has'](_0xca453c)){const _0xc54e7c=this['_imageCache']['get'](_0xca453c);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xc54e7c['url'],this['imageDimension']=_0xc54e7c['dimension'],this['imageId']=_0xc54e7c['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x5cbe13}=this['_editor'],t=_0x5cbe13['t'],_0x5d9d5a=new X(_0x5cbe13,this['imageStatus'],this['_attributes']);_0x5d9d5a['bind']('status')['to'](this,'imageStatus'),_0x5d9d5a['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x5d9d5a['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x5d9d5a['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x5d9d5a,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3008bd,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x5d9d5a,'position':_0x30357e['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x5d9d5a['focus']();},'onHide':()=>{_0x5d9d5a['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x30679d=>!S(_0x30679d,_0x5d9d5a['element'])}});}['_loadImageInfo'](_0x3bf5ed,_0x101a0d){return j['getInfo'](_0x3bf5ed,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x2f0555=>{const {width:_0x2bda34,height:_0x4d342b}=_0x2f0555['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x101a0d,this['imageDimension']={'width':_0x2bda34,'height':_0x4d342b},this['imageId']=_0x3bf5ed;})['catch'](_0x38881c=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x38881c['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x360160,_0x360ae0){return this['_getImageAsFile'](_0x360160)['then'](_0x2a416b=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x360ae0['signal'],'file':_0x2a416b,'onProgress':_0x3ea1e8=>{_0x3ea1e8&&_0x3ea1e8['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x3ea1e8['value']));}}))['then'](_0x3909ef=>{const {width:_0x4ae923,height:_0x47375d}=_0x3909ef['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3909ef['cdnUrl'],this['imageDimension']={'width':_0x4ae923,'height':_0x47375d},this['imageId']=_0x3909ef['uuid'],this['imageUploadProgress']=null;const _0x1abd61=_0x360160['getAttribute']('src');this['_imageCache']['set'](_0x1abd61,{'id':_0x3909ef['uuid'],'url':_0x3909ef['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x5538d6=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x5538d6['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x3d6da1,_0x4f7c48){_0x3d6da1['on']('apply',(_0x40a00d,_0x612c72)=>{this['_replaceImage'](_0x4f7c48,_0x612c72['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x3d6da1['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x3d6da1['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x5997a0,_0x4e4e72,_0x2d8fb1){const _0x566212=this['_editor'],{width:_0x2614ae,height:_0x17f6cb}=C(_0x4e4e72,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1b87c9,imageSources:_0x3d17c6}=k(_0x4e4e72,_0x2614ae);_0x566212['model']['change'](_0x7ec699=>{if('$graveyard'===_0x5997a0['root']['rootName']){_0x566212['execute']('insertImage',{'imageType':_0x5997a0['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x5997a0['getAttributes']()),'uploadcareImageId':_0x2d8fb1,'src':_0x1b87c9,'sources':_0x3d17c6,'width':_0x2614ae,'height':_0x17f6cb}});const _0x5ec671=_0x5997a0['getChildren']();_0x5997a0=_0x566212['model']['document']['selection']['getSelectedElement']();for(const _0x1d5a2b of _0x5ec671)_0x7ec699['append'](_0x7ec699['cloneElement'](_0x1d5a2b),_0x5997a0);}else _0x7ec699['setSelection'](_0x5997a0,'on'),_0x566212['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x5997a0['getAttributes']()),'uploadcareImageId':_0x2d8fb1,'src':_0x1b87c9,'sources':_0x3d17c6,'width':_0x2614ae,'height':_0x17f6cb},_0x5997a0);_0x7ec699['setSelection'](_0x5997a0,'on');});}async['_getImageAsFile'](_0x3ff7cd){const _0x44e55e=_0x4e8a95['window'],_0x28caef=_0x4e8a95['document']['location']['href'],_0x1218e8=new _0x44e55e['URL'](_0x3ff7cd['getAttribute']('src'),_0x28caef);if('data:'===_0x1218e8['protocol']){const _0x2bb932=_0x1218e8['href']['split'](','),_0xa0fd4d=_0x2bb932[0x0]['match'](/:(.*?);/)[0x1],_0x231f32=_0xa0fd4d['split']('/')[0x1],_0x48ed43=_0x44e55e['atob'](_0x2bb932[_0x2bb932['length']-0x1]);let _0x26a689=_0x48ed43['length'];const _0x8d1e3f=new _0x44e55e['Uint8Array'](_0x26a689);for(;_0x26a689--;)_0x8d1e3f[_0x26a689]=_0x48ed43['charCodeAt'](_0x26a689);return new _0x44e55e['File']([_0x8d1e3f],'image.'+_0x231f32,{'type':_0xa0fd4d});}const _0x6d8c37=_0x1218e8['href']['split']('/'),_0x27cc14=_0x6d8c37[_0x6d8c37['length']-0x1],_0x557b1d=_0x27cc14['split']('.')[0x1];return _0x44e55e['fetch'](_0x1218e8['href'])['then'](_0x3fd0b8=>_0x3fd0b8['clone']()['blob']())['then'](_0x7796a=>new _0x44e55e['File']([_0x7796a],_0x27cc14,{'type':'image/'+_0x557b1d}));}}class O extends _0x371fa4{['imageEditController'];static get['requires'](){return[_0x2b6820];}['_isEditable'];constructor(_0x4e11d1){super(_0x4e11d1),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xdacc1a){const _0x809b67=G(_0xdacc1a);return _0x42323f=>!(!_0x42323f||!_0x42323f['is']('element','imageBlock')&&!_0x42323f['is']('element','imageInline'))&&(!!_0x42323f['hasAttribute']('uploadcareImageId')||!!_0x42323f['hasAttribute']('src')&&_0x809b67(_0x42323f['getAttribute']('src')));}(_0x4e11d1['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x2f0dea=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x2f0dea);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x2c067f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x2c067f&&(_0x2c067f['is']('element','imageBlock')||_0x2c067f['is']('element','imageInline'))&&(this['imageEditController']=new E(this['editor'],this['editor']['plugins']['get'](_0x2b6820),_0x2c067f),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class R extends _0x371fa4{['refresh'](){const _0x12d48a=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x12d48a&&(_0x12d48a['is']('element','imageBlock')||_0x12d48a['is']('element','imageInline')));}['execute'](_0x27a175){const _0x1fa581=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x1f3ec6=>{_0x1f3ec6['setAttributes'](_0x27a175,_0x1fa581),_0x1f3ec6['removeAttribute']('srcset',_0x1fa581),_0x1f3ec6['removeAttribute']('sizes',_0x1fa581);});}}class m extends _0x17d3c0{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x3c3f6e,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x271167}=this;_0x271167['commands']['add']('uploadcareImageEdit',new O(_0x271167)),_0x271167['commands']['add']('uploadcareImageReplace',new R(_0x271167));}}class g extends _0x17d3c0{['_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 _0xf3488b=this['editor'];_0xf3488b['ui']['componentFactory']['add']('uploadcareImageEdit',_0x12b641=>{const _0x5bc828=_0xf3488b['commands']['get']('uploadcareImageEdit'),_0x11136c=new _0x432ee6(_0x12b641),t=_0x12b641['t'];return _0x11136c['set']({'icon':_0x3008bd,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x11136c['bind']('isEnabled')['to'](_0x5bc828),_0x11136c['bind']('isOn')['to'](_0x5bc828,'isActive'),this['listenTo'](_0x11136c,'execute',()=>{_0xf3488b['execute']('uploadcareImageEdit'),_0xf3488b['editing']['view']['focus']();}),_0x11136c;}),this['_initConfig']();}['_initConfig'](){const _0x1db862=_0x124f34(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x1db862),this['listenTo'](this['editor'],'destroy',()=>{_0x1db862['remove']();});}}class et extends _0x17d3c0{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};
|
|
23
|
+
import{Plugin as _0xeec603,Command as _0x14af4e}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconOneDrive as _0x4c6040,IconGooglePhotos as _0x243ea5,IconGoogleDrive as _0x346beb,IconFacebook as _0x4ad9f1,IconDropbox as _0x352f36,IconUploadcareLink as _0xe9746,IconUploadcareImageUpload as _0x5ebabe,IconError as _0x186bb9,IconUploadcareImageEdit as _0x1a5d96}from'@ckeditor/ckeditor5-icons/dist/index.js';import{ButtonView as _0x2b9f7f,MenuBarMenuListItemButtonView as _0x30de05,View as _0xa42b74,FocusCycler as _0x40234a,Dialog as _0x1eeebd,DialogViewPosition as _0x139913,SpinnerView as _0x4a5519,IconView as _0x402c3b,Notification as _0x1a9304}from'@ckeditor/ckeditor5-ui/dist/index.js';import{FocusTracker as _0x53567d,DomEmitterMixin as _0x187cfa,global as _0x479ee1,getAncestors as _0x4fb545,ObservableMixin as _0x1eb40b,uid as _0x4bdcb1,createElement as _0x321c11}from'@ckeditor/ckeditor5-utils/dist/index.js';import{FileRepository as _0x3caf2c}from'@ckeditor/ckeditor5-upload/dist/index.js';import{uploadFile as _0xb3073a,info as _0x47cfeb}from'@uploadcare/upload-client';import*as _0x2c5615 from'@uploadcare/file-uploader';var i=function(_0x4d1740){return _0x4d1740['Local']='local',_0x4d1740['URL']='url',_0x4d1740['Dropbox']='dropbox',_0x4d1740['GDrive']='gdrive',_0x4d1740['Facebook']='facebook',_0x4d1740['GPhotos']='gphotos',_0x4d1740['OneDrive']='onedrive',_0x4d1740;}({});function _(_0xee08c2,_0x497dbe,_0x4499f1){const t=_0xee08c2['t'],_0x33972c=_0xee08c2['t'];switch(_0x497dbe){case i['Local']:return{'text':_0x33972c('Insert'===_0x4499f1?'Upload\x20from\x20computer':'Replace\x20from\x20computer'),'shortText':_0x33972c('From\x20computer')};case i['URL']:return{'text':'Insert'===_0x4499f1?_0x33972c('Insert\x20via\x20URL'):t('Replace\x20via\x20URL'),'shortText':_0x33972c('Via\x20URL')};case i['Dropbox']:return{'text':t('Insert'===_0x4499f1?'Insert\x20with\x20Dropbox':'Replace\x20with\x20Dropbox'),'shortText':t('With\x20Dropbox')};case i['Facebook']:return{'text':t('Insert'===_0x4499f1?'Insert\x20with\x20Facebook':'Replace\x20with\x20Facebook'),'shortText':t('With\x20Facebook')};case i['GDrive']:return{'text':t('Insert'===_0x4499f1?'Insert\x20with\x20Google\x20Drive':'Replace\x20with\x20Google\x20Drive'),'shortText':t('With\x20Google\x20Drive')};case i['GPhotos']:return{'text':t('Insert'===_0x4499f1?'Insert\x20with\x20Google\x20Photos':'Replace\x20with\x20Google\x20Photos'),'shortText':t('With\x20Google\x20Photos')};case i['OneDrive']:return{'text':t('Insert'===_0x4499f1?'Insert\x20with\x20OneDrive':'Replace\x20with\x20OneDrive'),'shortText':t('With\x20OneDrive')};default:return _0x497dbe;}}class e extends _0xeec603{['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 _0x1ab81e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x14b9c9;for(const _0x403a4b in _0x1ab81e){const _0x27dacd=_0x403a4b,_0x13fbde=_0x1ab81e[_0x27dacd];if('uploadcareLicenseKeyValid'==_0x13fbde||'uploadcareLicenseKeyInvalid'==_0x13fbde||'uploadcareLicenseKeyExpired'==_0x13fbde||'uploadcareLicenseKeyDomainLimit'==_0x13fbde||'uploadcareLicenseKeyNotAllowed'==_0x13fbde||'uploadcareLicenseKeyEvaluationLimit'==_0x13fbde||'uploadcareLicenseKeyTrialLimit'==_0x13fbde||'uploadcareLicenseKeyUsageLimit'==_0x13fbde){delete _0x1ab81e[_0x27dacd],_0x14b9c9=_0x13fbde,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'uploadcareLicenseKeyInvalid'==_0x14b9c9&&_0x1ab81e['_showLicenseError']('invalid'),'uploadcareLicenseKeyExpired'==_0x14b9c9&&_0x1ab81e['_showLicenseError']('expired'),'uploadcareLicenseKeyDomainLimit'==_0x14b9c9&&_0x1ab81e['_showLicenseError']('domainLimit'),'uploadcareLicenseKeyNotAllowed'==_0x14b9c9&&_0x1ab81e['_showLicenseError']('featureNotAllowed','Uploadcare'),'uploadcareLicenseKeyEvaluationLimit'==_0x14b9c9&&_0x1ab81e['_showLicenseError']('evaluationLimit'),'uploadcareLicenseKeyTrialLimit'==_0x14b9c9&&_0x1ab81e['_showLicenseError']('trialLimit'),'uploadcareLicenseKeyUsageLimit'==_0x14b9c9&&_0x1ab81e['_showLicenseError']('usageLimit');},0x3e8);}['afterInit'](){const {editor:_0x5819fb}=this,_0x588866=_0x5819fb['commands']['get']('uploadcare');if(!_0x588866)return;const _0x3d3bb2=this['_normalizeConfigSourceList'](_0x5819fb['config']['get']('uploadcare.uploader.sourceList'))['reduce']((_0x7cdc0,_0x989687)=>{const _0x33c4fa=this['_getIntegrationKey'](_0x989687['type']);return _0x7cdc0[_0x33c4fa]||(_0x7cdc0[_0x33c4fa]=[]),_0x7cdc0[_0x33c4fa]['push'](_0x989687),_0x7cdc0;},{});_0x5819fb['plugins']['has']('ImageInsertUI')&&_0x5819fb['commands']['get']('uploadcare')&&Object['entries'](_0x3d3bb2)['forEach'](([_0x527304,_0x4fe74a])=>{_0x5819fb['plugins']['get']('ImageInsertUI')['registerIntegration']({'name':_0x527304,'observable':()=>_0x588866,'buttonViewCreator':()=>this['_createToolbarButton'](_0x4fe74a),'formViewCreator':()=>this['_createDropdownButtons'](_0x4fe74a),'menuBarButtonViewCreator':()=>this['_createMenuBarButtons'](_0x4fe74a),'override':'assetManager'!==_0x527304});});}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_normalizeConfigSourceList'](_0x5c5d16){const {locale:_0xa82f89}=this['editor'];return _0x5c5d16['map'](_0x47cd49=>{const _0x30bee9=_(_0xa82f89,_0x47cd49,'Insert');switch(_0x47cd49){case i['Local']:return{'icon':_0x5ebabe,'type':i['Local'],..._0x30bee9};case i['URL']:return{'icon':_0xe9746,'type':i['URL'],..._0x30bee9};case i['Dropbox']:return{'icon':_0x352f36,'type':i['Dropbox'],..._0x30bee9};case i['Facebook']:return{'icon':_0x4ad9f1,'type':i['Facebook'],..._0x30bee9};case i['GDrive']:return{'icon':_0x346beb,'type':i['GDrive'],..._0x30bee9};case i['GPhotos']:return{'icon':_0x243ea5,'type':i['GPhotos'],..._0x30bee9};case i['OneDrive']:return{'icon':_0x4c6040,'type':i['OneDrive'],..._0x30bee9};}});}['_getIntegrationKey'](_0x4a8cd1){switch(_0x4a8cd1){case i['Local']:return'upload';case i['URL']:return'url';default:return'assetManager';}}['_createButton'](_0x1f5f90,_0x2207df){const _0x4e7e06=this['editor'],_0x505d73=new _0x1f5f90(_0x4e7e06['locale']),_0x3c9d44=_0x4e7e06['commands']['get']('uploadcare');return _0x505d73['bind']('isEnabled')['to'](_0x3c9d44),_0x505d73['on']('execute',()=>{_0x3c9d44['execute'](_0x2207df);}),_0x505d73;}['_createToolbarButton'](_0x1e21f5){const {locale:_0x596186}=this['editor'],_0x4822ed=this['editor']['plugins']['get']('ImageInsertUI'),_0x47989c=_0x1e21f5[0x0],_0x3993c6=this['_createButton'](_0x2b9f7f,_0x47989c['type']);return _0x3993c6['icon']=_0x47989c['icon'],_0x3993c6['bind']('label')['to'](_0x4822ed,'isImageSelected',_0xf7b286=>_(_0x596186,_0x47989c['type'],_0xf7b286?'Replace':'Insert')['text']),_0x3993c6['tooltip']=!0x0,_0x3993c6;}['_createDropdownButtons'](_0x504703){const {locale:_0x479f24}=this['editor'],_0x54337f=this['editor']['plugins']['get']('ImageInsertUI');return _0x504703['map'](_0x5b8b79=>{const _0x1d6b9b=this['_createButton'](_0x2b9f7f,_0x5b8b79['type']);return _0x1d6b9b['withText']=!0x0,_0x1d6b9b['icon']=_0x5b8b79['icon'],_0x1d6b9b['bind']('label')['to'](_0x54337f,'isImageSelected',_0x1e6489=>_(_0x479f24,_0x5b8b79['type'],_0x1e6489?'Replace':'Insert')['text']),_0x1d6b9b;});}['_createMenuBarButtons'](_0x1decb5){return _0x1decb5['map'](_0x361a00=>{const _0x495c44=this['_createButton'](_0x30de05,_0x361a00['type']);return _0x495c44['icon']=_0x361a00['icon'],_0x495c44['label']=_0x361a00['shortText'],_0x495c44;});}}class F extends _0xa42b74{['focusTracker'];['focusCycler'];constructor(_0x4238f9){super(_0x4238f9),this['focusTracker']=new _0x53567d(),this['focusCycler']=new _0x40234a({'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(_0xa1763a,_0xf8546d){super(_0xa1763a),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-'+_0xf8546d}},this['getFocusableElement']()]});}['focus'](){this['element']['focus']();}}function k(_0x32f4da,_0x433667){const _0x39ba68=[0x140,0x1e0,0x300,0x400,0x4b0,0x640,0x780,0x960]['filter'](_0x20333d=>_0x20333d<=_0x433667)['map'](_0x161942=>_0x32f4da['replace'](/\/$/,'')+'/-/resize/'+_0x161942+'x/\x20'+_0x161942+'w');return{'imageFallbackUrl':_0x32f4da,'imageSources':[{'srcset':_0x39ba68['join'](',\x20'),'sizes':'(max-width:\x20'+_0x433667+'px)\x20100vw,\x20'+_0x433667+'px','type':'image/webp'}]};}function C(_0x6bccee,_0x195375,_0x2a33b1){const _0x2b8c65=_0x6bccee['match'](/\/crop\/(\d+)x(\d+)\//);return{'width':_0x2b8c65?parseInt(_0x2b8c65[0x1],0xa):_0x195375,'height':_0x2b8c65?parseInt(_0x2b8c65[0x2],0xa):_0x2a33b1};}function p(_0x40ab2d,_0x4aa17a){const _0x2fd4f2=new(_0x187cfa())(),_0x16901a=_0x40ab2d['plugins']['get']('ImageUtils'),_0xf89fa5=_0x40ab2d['editing']['mapper']['toViewElement'](_0x4aa17a),_0x193967=_0x16901a['findViewImgElement'](_0xf89fa5),_0x299c79=_0x40ab2d['editing']['view']['domConverter']['viewToDom'](_0x193967),_0x3511e1=_0x4aa17a['getAttribute']('width'),_0x321db2=_0x4aa17a['getAttribute']('height'),_0x1e729b='image-processing';_0x40ab2d['editing']['view']['change'](_0x153cfb=>{_0x153cfb['addClass'](_0x1e729b,_0xf89fa5),_0x153cfb['setStyle']('aspect-ratio',_0x3511e1+'/'+_0x321db2,_0x193967);}),_0x2fd4f2['listenTo'](_0x299c79,'load',()=>{_0x2fd4f2['stopListening'](_0x299c79,'load'),_0x40ab2d['editing']['view']['change'](_0x37e944=>{_0x37e944['removeClass'](_0x1e729b,_0xf89fa5),_0x37e944['removeStyle']('aspect-ratio',_0x193967);});});}function z(_0x4b2374){if(Array['isArray'](_0x4b2374)){const _0x467ebc=_0x4b2374['map'](z);return _0x14d23e=>_0x467ebc['some'](_0x525b0b=>_0x525b0b(_0x14d23e));}if('origin'==_0x4b2374){const _0xb1f59b=_0x479ee1['window']['location']['origin'];return _0x5d9b81=>new URL(_0x5d9b81,_0x479ee1['document']['baseURI'])['origin']==_0xb1f59b;}return'function'==typeof _0x4b2374?_0x4b2374:_0x4b2374 instanceof RegExp?_0x1bf987=>!(!_0x1bf987['match'](_0x4b2374)&&!_0x1bf987['replace'](/^https?:\/\//,'')['match'](_0x4b2374)):()=>!0x1;}function S(_0x2d2960,_0xb64473){return _0x4fb545(_0x2d2960['target'])['includes'](_0xb64473);}class n extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1eb40b(){['_editor'];['_dialog'];['_editing'];['_api'];['_type']=null;['_formView']=null;constructor(_0x351e8f,_0x1f940c,_0x968371){super(),this['_editor']=_0x351e8f,this['_editing']=_0x1f940c,this['_dialog']=_0x351e8f['plugins']['get'](_0x1eeebd),this['_api']=_0x1f940c['ctxElement']['getAPI'](),this['_type']=_0x968371,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:_0xa43b8c,model:_0x4d8b27}=this['_editor'],_0x150bd2=_0x4d8b27['document']['selection']['getSelectedElement'](),_0x2a1257=_0x150bd2&&(_0x150bd2['is']('element','imageBlock')||_0x150bd2['is']('element','imageInline'));this['_formView']=new x(_0xa43b8c,this['_editing']['ucContextId']),this['_dialog']['show']({'id':'uploadCare','icon':_0x5ebabe,'title':_(_0xa43b8c,this['_type'],_0x2a1257?'Replace':'Insert')['text'],'content':this['_formView'],'position':_0x139913['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_api']['removeAllFiles'](),this['_editor']['editing']['view']['focus'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x394554=>!S(_0x394554,this['_formView']['element'])}});}['_initListeners'](){this['_editing']['ctxElement']['addEventListener']('done-click',()=>{const {allEntries:_0x1d7357}=this['_api']['getOutputCollectionState']();this['_editor']['model']['change'](_0x3276f0=>{const _0x19a15b=_0x1d7357['length'];for(const _0x5ef88c of _0x1d7357){const _0x2aa810=_0x5ef88c===_0x1d7357[_0x19a15b-0x1],{cdnUrl:_0x2c915b,fileInfo:_0x39ebeb}=_0x5ef88c;if(!_0x2c915b||!_0x39ebeb)continue;const {width:_0x2a8c28,height:_0x1b1899}=_0x39ebeb['imageInfo'],_0x274b93=C(_0x2c915b,_0x2a8c28,_0x1b1899),_0x3a0553=k(_0x2c915b,_0x274b93['width']),_0x1ee03a={'id':_0x39ebeb['uuid'],'type':'image','attributes':{'imageDimension':_0x274b93,..._0x3a0553}};this['_insertAsset'](_0x1ee03a,_0x2aa810,_0x3276f0);}}),this['_dialog']['hide']();}),this['_editing']['ctxElement']['addEventListener']('change',_0x3ae807=>{'idle'===_0x3ae807['detail']['status']&&!_0x3ae807['detail']['allEntries']['length']&&this['_dialog']['isOpen']&&(this['_type']===i['Local']?this['_api']['setCurrentActivity'](i['Local']):this['_api']['initFlow']());});}['_insertAsset'](_0x71cb7,_0x11e377,_0x1226cf){const _0x34ca83=this['_editor']['model']['document']['selection'],_0x4fce8e=_0x34ca83['getSelectedElement'](),_0x19a4fc=!(!_0x4fce8e||!_0x4fce8e['is']('element','imageInline'));_0x1226cf['removeSelectionAttribute']('linkHref'),this['_insertImage'](_0x71cb7,_0x19a4fc),_0x11e377||_0x1226cf['setSelection'](_0x34ca83['getLastPosition']());}['_insertImage'](_0x1b05f6,_0x15a0b6){const _0x4f655d=this['_editor'],{imageDimension:_0x1d347e,imageFallbackUrl:_0x30266a,imageSources:_0x5a143f}=_0x1b05f6['attributes'];_0x4f655d['execute']('insertImage',{'imageType':_0x15a0b6?'imageInline':null,'source':{'uploadcareImageId':_0x1b05f6['id'],'src':_0x30266a,'sources':_0x5a143f,..._0x1d347e}});}}class w extends _0x14af4e{['_editing'];['_controller']=null;static get['requires'](){return[_0x1eeebd,o];}constructor(_0x283871){super(_0x283871),this['_editing']=_0x283871['plugins']['get'](o);}['refresh'](){this['isEnabled']=this['_checkEnabled']();}['execute'](_0x1cdef2){this['_controller']&&(this['_controller']['destroy'](),this['_controller']=null),this['_controller']=new n(this['editor'],this['_editing'],_0x1cdef2);}['_checkEnabled'](){return this['editor']['commands']['get']('insertImage')['isEnabled'];}}class j{static['upload']({file:_0x46364e,publicKey:_0x246031,signal:_0x46be11,onProgress:_0x5364c4}){return _0xb3073a(_0x46364e,{'publicKey':_0x246031,'store':'auto','signal':_0x46be11,'onProgress':_0x5364c4});}static['getInfo'](_0x204578,_0x299825){return _0x47cfeb(_0x204578,_0x299825);}}class f extends _0xeec603{static get['requires'](){return['ImageUploadEditing','ImageUploadProgress',_0x3caf2c,o];}static get['pluginName'](){return'UploadcareUploadAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}async['afterInit'](){const _0x3f9cf8=this['editor'];if(!!!_0x3f9cf8['config']['get']('uploadcare'))return;_0x3f9cf8['plugins']['get'](_0x3caf2c)['createUploadAdapter']=_0x5d53b8=>new A(_0x5d53b8,_0x3f9cf8),_0x3f9cf8['plugins']['get']('ImageUploadEditing')['on']('uploadComplete',(_0x3c6cf5,{imageElement:_0x13b444,data:_0x274873})=>{_0x3f9cf8['model']['change'](_0x54fbeb=>{_0x54fbeb['setAttribute']('uploadcareImageId',_0x274873['uploadcareImageId'],_0x13b444);});});}}class A{['loader'];['editor'];['controller'];constructor(_0x373a53,_0x48009f){this['loader']=_0x373a53,this['editor']=_0x48009f,this['controller']=new AbortController();}async['upload'](){const t=this['editor']['t'],_0x4c6f4d=this['editor']['config']['get']('uploadcare.pubkey'),_0x26ad41=await this['loader']['file'];return j['upload']({'file':_0x26ad41,'publicKey':_0x4c6f4d,'signal':this['controller']['signal'],'onProgress':_0x173727=>{_0x173727&&_0x173727['isComputable']&&(this['loader']['uploadTotal']=0x1,this['loader']['uploaded']=_0x173727['value']);}})['then'](async _0x3afc32=>{const {imageFallbackUrl:_0x86709f,imageSources:_0x572f75}=k(_0x3afc32['cdnUrl'],_0x3afc32['imageInfo']['width']);return{'uploadcareImageId':_0x3afc32['uuid'],'default':_0x86709f,'sources':_0x572f75};})['catch'](()=>{const _0x443ded=t('Cannot\x20upload\x20file:')+('\x20'+_0x26ad41['name']+'.');return Promise['reject'](_0x443ded);});}['abort'](){this['controller']['abort']();}}class o extends _0xeec603{['_configElement']=null;['_ctxElement']=null;static get['pluginName'](){return'UploadcareEditing';}static get['requires'](){return['PictureEditing',f,_0x1eeebd];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['ucContextId'];get['configElement'](){return this['_configElement'];}get['ctxElement'](){return this['_ctxElement'];}constructor(_0x58ffce){super(_0x58ffce),this['ucContextId']=_0x4bdcb1();}['init'](){const _0xa14fd4=this['editor'];_0xa14fd4['commands']['add']('uploadcare',new w(_0xa14fd4));}['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 _0x349dc7=_0x479ee1['document']['querySelector']('input[uploadcare-file-input]');_0x349dc7&&_0x349dc7['remove']();}),async function(_0x3c3b4b){const _0x3e88d3=_0x5e0dda([0x4d,0x39,0x52,0x47,0x6f,0x4f,0x32,0x68,0x54,0x74,0x35,0x6e,0x34,0x66,0x49,0x42,0x6b,0x44,0x4c,0x57,0x5a,0x58,0x41,0x38,0x31,0x53,0x4e,0x72,0x76,0x61,0x7a,0x6c,0x67,0x59,0x6d,0x78,0x73,0x75,0x70,0x48,0x77,0x69,0x56,0x51,0x4a,0x4b,0x63,0x37,0x55,0x46,0x6a,0x64,0x71,0x79,0x33,0x62,0x43,0x30,0x50,0x65,0x36,0x45]),_0x3916b0=0x51f0daf,_0x2dbaf1=0x5187d87^_0x3916b0,_0x3fa954=window[_0x5e0dda([0x44,0x61,0x74,0x65])][_0x5e0dda([0x6e,0x6f,0x77])](),_0x27cf23=_0x3c3b4b[_0x5e0dda([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x50aa85=new window[(_0x5e0dda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54d91f=>{_0x27cf23[_0x5e0dda([0x6f,0x6e,0x63,0x65])](_0x5e0dda([0x72,0x65,0x61,0x64,0x79]),_0x54d91f);}),_0xc2fd8e={[_0x5e0dda([0x6b,0x74,0x79])]:_0x5e0dda([0x45,0x43]),[_0x5e0dda([0x75,0x73,0x65])]:_0x5e0dda([0x73,0x69,0x67]),[_0x5e0dda([0x63,0x72,0x76])]:_0x5e0dda([0x50,0x2d,0x32,0x35,0x36]),[_0x5e0dda([0x78])]:_0x5e0dda([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]),[_0x5e0dda([0x79])]:_0x5e0dda([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]),[_0x5e0dda([0x61,0x6c,0x67])]:_0x5e0dda([0x45,0x53,0x32,0x35,0x36])},_0x1e3016=_0x27cf23[_0x5e0dda([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5e0dda([0x67,0x65,0x74])](_0x5e0dda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4e241a(){let _0x48435b,_0x574b97=null,_0x151e33=null;try{if(_0x1e3016==_0x5e0dda([0x47,0x50,0x4c]))return _0x5e0dda([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x48435b=_0x39211c(),!_0x48435b)return _0x5e0dda([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x48435b[_0x5e0dda([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x151e33=_0x30f3f7(_0x48435b[_0x5e0dda([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x48435b[_0x5e0dda([0x6a,0x74,0x69])])),await _0x58ffdc()?_0x3152e8()?_0xb78315()?_0x5e0dda([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2088c1()?(_0x48435b[_0x5e0dda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5e0dda([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x574b97=_0x20dbc0(_0x5e0dda([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x48435b[_0x5e0dda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5e0dda([0x74,0x72,0x69,0x61,0x6c])&&(_0x574b97=_0x20dbc0(_0x5e0dda([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x448d24()):_0x5e0dda([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5e0dda([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5e0dda([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5e0dda([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xb78315(){const _0x160086=[_0x5e0dda([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5e0dda([0x74,0x72,0x69,0x61,0x6c])][_0x5e0dda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x48435b[_0x5e0dda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3fa954/0x3e8:0xe10*_0x2dbaf1;return _0x48435b[_0x5e0dda([0x65,0x78,0x70])]<_0x160086;}function _0x3152e8(){const _0x2225a7=_0x48435b[_0x5e0dda([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2225a7&&(!!_0x2225a7[_0x5e0dda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e0dda([0x2a]))||!!_0x2225a7[_0x5e0dda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e0dda([0x55,0x50,0x4c,0x43])));}function _0x2088c1(){const _0x52a018=_0x48435b[_0x5e0dda([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x52a018||0x0==_0x52a018[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4dda1b}=new URL(window[_0x5e0dda([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x52a018[_0x5e0dda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4dda1b))return!0x0;const _0x5ed1ec=_0x4dda1b[_0x5e0dda([0x73,0x70,0x6c,0x69,0x74])](_0x5e0dda([0x2e]));return _0x52a018[_0x5e0dda([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3e3503=>_0x3e3503[_0x5e0dda([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e0dda([0x2a])))[_0x5e0dda([0x6d,0x61,0x70])](_0x2a2583=>_0x2a2583[_0x5e0dda([0x73,0x70,0x6c,0x69,0x74])](_0x5e0dda([0x2e])))[_0x5e0dda([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x42d550=>_0x42d550[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5ed1ec[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5e0dda([0x6d,0x61,0x70])](_0x1464f7=>Array(_0x5ed1ec[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1464f7[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5e0dda([0x66,0x69,0x6c,0x6c])](_0x1464f7[0x0]===_0x5e0dda([0x2a])?_0x5e0dda([0x2a]):'')[_0x5e0dda([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1464f7))[_0x5e0dda([0x73,0x6f,0x6d,0x65])](_0x30e654=>_0x5ed1ec[_0x5e0dda([0x65,0x76,0x65,0x72,0x79])]((_0x14283b,_0x1d2596)=>_0x30e654[_0x1d2596]===_0x14283b||_0x30e654[_0x1d2596]===_0x5e0dda([0x2a])));}function _0x448d24(){return _0x574b97&&_0x151e33?new window[(_0x5e0dda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x49b2e8,_0x1b26b7)=>{_0x574b97[_0x5e0dda([0x74,0x68,0x65,0x6e])](_0x49b2e8,_0x1b26b7),_0x151e33[_0x5e0dda([0x74,0x68,0x65,0x6e])](_0x1203bb=>{_0x1203bb!=_0x5e0dda([0x56,0x61,0x6c,0x69,0x64])&&_0x49b2e8(_0x1203bb);},_0x1b26b7);}):_0x574b97||_0x151e33||_0x5e0dda([0x56,0x61,0x6c,0x69,0x64]);}}function _0x30f3f7(_0x1dfa6d,_0x2d086b){return new window[(_0x5e0dda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ef206=>{if(_0x22b40b())return _0x4ef206(_0x5e0dda([0x56,0x61,0x6c,0x69,0x64]));_0x459e8f(),_0x27cf23[_0x5e0dda([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5e0dda([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x122ee3=!0x1;const _0x4800e5=_0x4bdcb1();function _0xff4650(_0x28e21c){return!!_0x28e21c&&(typeof _0x28e21c===_0x5e0dda([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x28e21c===_0x5e0dda([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x28e21c[_0x5e0dda([0x74,0x68,0x65,0x6e])]===_0x5e0dda([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x28e21c[_0x5e0dda([0x63,0x61,0x74,0x63,0x68])]===_0x5e0dda([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x31c25d(_0x15629d){_0x15dc57(_0x15629d)[_0x5e0dda([0x74,0x68,0x65,0x6e])](_0x3ace23=>{if(!_0x3ace23||_0x3ace23[_0x5e0dda([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5e0dda([0x6f,0x6b]))return _0x5e0dda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1997d1(_0x151ae1(_0x4800e5+_0x2d086b))!=_0x3ace23[_0x5e0dda([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5e0dda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5e0dda([0x56,0x61,0x6c,0x69,0x64]);})[_0x5e0dda([0x74,0x68,0x65,0x6e])](_0x56b4af=>(_0x2941f1(),_0x56b4af),()=>{const _0x4217e2=_0x2ad79e();return null==_0x4217e2?(_0x2941f1(),_0x5e0dda([0x56,0x61,0x6c,0x69,0x64])):_0x5e0dda(_0x3fa954-_0x4217e2>(0x211389af^_0x3916b0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5e0dda([0x74,0x68,0x65,0x6e])](_0x4ef206)[_0x5e0dda([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4ef206(_0x5e0dda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x39405d=0x529e32f^_0x3916b0;function _0x2941f1(){const _0x2d7f88=_0x5e0dda([0x6c,0x6c,0x63,0x74,0x2d])+_0x1997d1(_0x151ae1(_0x1dfa6d)),_0x2709b0=_0x53443c(_0x1997d1(window[_0x5e0dda([0x4d,0x61,0x74,0x68])][_0x5e0dda([0x63,0x65,0x69,0x6c])](_0x3fa954/_0x39405d)));window[_0x5e0dda([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5e0dda([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2d7f88,_0x2709b0);}function _0x2ad79e(){const _0x171403=_0x5e0dda([0x6c,0x6c,0x63,0x74,0x2d])+_0x1997d1(_0x151ae1(_0x1dfa6d)),_0x8ea602=window[_0x5e0dda([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5e0dda([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x171403);return _0x8ea602?window[_0x5e0dda([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53443c(_0x8ea602),0x10)*_0x39405d:null;}function _0x15dc57(_0x274835){return new window[(_0x5e0dda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x11c308,_0x497aac)=>{_0x274835[_0x5e0dda([0x74,0x68,0x65,0x6e])](_0x11c308,_0x497aac),window[_0x5e0dda([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x497aac,0x51ed96f^_0x3916b0);});}}_0x27cf23[_0x5e0dda([0x6f,0x6e])](_0x5e0dda([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3500c1,_0x2a03a4)=>{if(_0x2a03a4[0x0]!=_0x1dfa6d)return _0x4ef206(_0x5e0dda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2a03a4[0x1]={..._0x2a03a4[0x1],[_0x5e0dda([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4800e5};},{[_0x5e0dda([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5e0dda([0x68,0x69,0x67,0x68])}),_0x27cf23[_0x5e0dda([0x6f,0x6e])](_0x5e0dda([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4a338e=>{_0xff4650(_0x4a338e[_0x5e0dda([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x122ee3=!0x0,_0x31c25d(_0x4a338e[_0x5e0dda([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5e0dda([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5e0dda([0x6c,0x6f,0x77])}),_0x50aa85[_0x5e0dda([0x74,0x68,0x65,0x6e])](()=>{_0x122ee3||_0x4ef206(_0x5e0dda([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x22b40b(){return _0x27cf23[_0x5e0dda([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e0dda([0x76,0x69,0x65,0x77])][_0x5e0dda([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5e0dda([0x61,0x75,0x74,0x6f]);}function _0x459e8f(){_0x27cf23[_0x5e0dda([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5e0dda([0x76,0x69,0x65,0x77])][_0x5e0dda([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5e0dda([0x61,0x75,0x74,0x6f]);}}function _0x20dbc0(_0x18ef63){const _0x54880=[new window[(_0x5e0dda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2705da=>setTimeout(_0x2705da,0x5163363^_0x3916b0)),_0x50aa85[_0x5e0dda([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5e0dda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x291873=>{let _0x485d9d=0x0;_0x27cf23[_0x5e0dda([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e0dda([0x6f,0x6e])](_0x5e0dda([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3caa75,_0x2a0c81)=>{_0x2a0c81[0x0][_0x5e0dda([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x485d9d++,_0x485d9d==(0x51f0c57^_0x3916b0)&&(_0x291873(),_0x3caa75[_0x5e0dda([0x6f,0x66,0x66])]());});}))];return window[_0x5e0dda([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5e0dda([0x72,0x61,0x63,0x65])](_0x54880)[_0x5e0dda([0x74,0x68,0x65,0x6e])](()=>_0x18ef63);}async function _0xd48fdb(){await _0x50aa85,_0x27cf23[_0x5e0dda([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e0dda([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4ae7ec,_0x27cf23[_0x5e0dda([0x6d,0x6f,0x64,0x65,0x6c])][_0x5e0dda([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4ae7ec,_0x27cf23[_0x5e0dda([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5e0dda([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3823c8(_0x4a7491){const _0x166fe1=_0x969774();_0x27cf23[_0x166fe1]=_0x5e0dda([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4a7491,_0x4a7491!=_0x5e0dda([0x56,0x61,0x6c,0x69,0x64])&&_0xd48fdb();}function _0x969774(){const _0x44dcbb=window[_0x5e0dda([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5e0dda([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5e0dda([0x6e,0x6f,0x77])]())[_0x5e0dda([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5e0dda([0x2e]),'');let _0x3721c1=_0x5e0dda([0x4d]);for(let _0xd7a114=0x0;_0xd7a114<_0x44dcbb[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd7a114+=0x2){let _0x31c645=window[_0x5e0dda([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x44dcbb[_0x5e0dda([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd7a114,_0xd7a114+0x2));_0x31c645>=_0x3e88d3[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x31c645-=_0x3e88d3[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3721c1+=_0x3e88d3[_0x31c645];}return _0x3721c1;}function _0x39211c(){const _0x4e2e06=_0x1e3016[_0x5e0dda([0x73,0x70,0x6c,0x69,0x74])](_0x5e0dda([0x2e]));if(0x3!=_0x4e2e06[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x12cf05(_0x4e2e06[0x1]);function _0x12cf05(_0x25b29c){const _0x166350=_0xaf2584(_0x25b29c);return _0x166350&&_0x3cbef5()?_0x166350:null;function _0x3cbef5(){const _0x4b96b0=_0x166350[_0x5e0dda([0x6a,0x74,0x69])],_0x333128=window[_0x5e0dda([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4b96b0[_0x5e0dda([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b96b0[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xa93d65={..._0x166350,[_0x5e0dda([0x6a,0x74,0x69])]:_0x4b96b0[_0x5e0dda([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4b96b0[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xa93d65[_0x5e0dda([0x76,0x63])],_0x151ae1(_0xa93d65)==_0x333128;}}}async function _0x58ffdc(){let _0x1971c9=!0x0;try{const _0x2a7ecf=_0x1e3016[_0x5e0dda([0x73,0x70,0x6c,0x69,0x74])](_0x5e0dda([0x2e])),[_0x446074,_0x4aa9b0,_0x52b183]=_0x2a7ecf;return _0x588117(_0x446074),await _0x15fc0c(_0x446074,_0x4aa9b0,_0x52b183),_0x1971c9;}catch{return!0x1;}function _0x588117(_0x544723){const _0x5bbb01=_0xaf2584(_0x544723);_0x5bbb01&&_0x5bbb01[_0x5e0dda([0x61,0x6c,0x67])]==_0x5e0dda([0x45,0x53,0x32,0x35,0x36])||(_0x1971c9=!0x1);}async function _0x15fc0c(_0x2333b9,_0x4cf1b1,_0x51c7f2){const _0x10e557=window[_0x5e0dda([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5e0dda([0x66,0x72,0x6f,0x6d])](_0x58b74f(_0x51c7f2),_0x4459b1=>_0x4459b1[_0x5e0dda([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2f1a06=new window[(_0x5e0dda([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5e0dda([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2333b9+_0x5e0dda([0x2e])+_0x4cf1b1),_0x1ac0c2=window[_0x5e0dda([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5e0dda([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1ac0c2)return;const _0x5c9c09=await _0x1ac0c2[_0x5e0dda([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5e0dda([0x6a,0x77,0x6b]),_0xc2fd8e,{[_0x5e0dda([0x6e,0x61,0x6d,0x65])]:_0x5e0dda([0x45,0x43,0x44,0x53,0x41]),[_0x5e0dda([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5e0dda([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5e0dda([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1ac0c2[_0x5e0dda([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5e0dda([0x6e,0x61,0x6d,0x65])]:_0x5e0dda([0x45,0x43,0x44,0x53,0x41]),[_0x5e0dda([0x68,0x61,0x73,0x68])]:{[_0x5e0dda([0x6e,0x61,0x6d,0x65])]:_0x5e0dda([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5c9c09,_0x10e557,_0x2f1a06)||(_0x1971c9=!0x1);}}function _0xaf2584(_0x1f5d3b){return _0x1f5d3b[_0x5e0dda([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5e0dda([0x65,0x79]))?JSON[_0x5e0dda([0x70,0x61,0x72,0x73,0x65])](_0x58b74f(_0x1f5d3b)):null;}function _0x58b74f(_0x425a07){return window[_0x5e0dda([0x61,0x74,0x6f,0x62])](_0x425a07[_0x5e0dda([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5e0dda([0x2b]))[_0x5e0dda([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5e0dda([0x2f])));}function _0x151ae1(_0x2f35e3){let _0x10a680=0x1505;function _0x2e15e8(_0x5f3452){for(let _0x20208b=0x0;_0x20208b<_0x5f3452[_0x5e0dda([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20208b++){const _0x28d39b=_0x5f3452[_0x5e0dda([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x20208b);_0x10a680=(_0x10a680<<0x5)+_0x10a680+_0x28d39b,_0x10a680&=_0x10a680;}}function _0x354783(_0x32236b){Array[_0x5e0dda([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x32236b)?_0x32236b[_0x5e0dda([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x354783):_0x32236b&&typeof _0x32236b==_0x5e0dda([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5e0dda([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x32236b)[_0x5e0dda([0x73,0x6f,0x72,0x74])]()[_0x5e0dda([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x13b8e5,_0x16c875])=>{_0x2e15e8(_0x13b8e5),_0x354783(_0x16c875);}):_0x2e15e8(window[_0x5e0dda([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x32236b));}return _0x354783(_0x2f35e3),_0x10a680>>>0x0;}function _0x1997d1(_0x1c5f6c){return _0x1c5f6c[_0x5e0dda([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5e0dda([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5e0dda([0x30]));}function _0x53443c(_0x1bbf3e){return _0x1bbf3e[_0x5e0dda([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5e0dda([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5e0dda([0x6a,0x6f,0x69,0x6e])]('');}function _0x4ae7ec(){}function _0x5e0dda(_0x290960){return _0x290960['map'](_0x551073=>String['fromCharCode'](_0x551073))['join']('');}_0x3823c8(await _0x4e241a());}(this);}['_initSchema'](){const _0x3375ed=this['editor']['model']['schema'];_0x3375ed['isRegistered']('imageBlock')&&_0x3375ed['extend']('imageBlock',{'allowAttributes':['uploadcareImageId']}),_0x3375ed['isRegistered']('imageInline')&&_0x3375ed['extend']('imageInline',{'allowAttributes':['uploadcareImageId']});}['_initConversion'](){const _0x2ebe50=this['editor'];_0x2ebe50['conversion']['for']('downcast')['attributeToAttribute']({'model':'uploadcareImageId','view':'data-uc-image-id'}),_0x2ebe50['conversion']['for']('upcast')['elementToAttribute']({'model':{'key':'uploadcareImageId','value':_0x429455=>_0x429455['getAttribute']('data-uc-image-id')},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x8c3ebc=_0x2ebe50['commands']['get']('replaceImageSource');_0x8c3ebc&&this['listenTo'](_0x8c3ebc,'cleanupImage',(_0x1f5ce5,[_0x555c35,_0x351d40])=>{_0x555c35['removeAttribute']('uploadcareImageId',_0x351d40);});}['_initConfig'](){const _0x3c4cd5=this['editor']['config']['get']('uploadcare.uploader')||{},_0x1fc998=this['editor']['config']['get']('uploadcare.pubkey')||'';this['_configElement']=_0x321c11(_0x479ee1['document'],'uc-config',{..._0x3c4cd5,'pubkey':_0x1fc998,'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']=_0x3304cc=>{if('closeMax'==_0x3304cc)return'#uc-icon-arrow-down';},_0x479ee1['document']['body']['appendChild'](this['_configElement']);}['_initCtx'](){this['_ctxElement']=_0x321c11(_0x479ee1['document'],'uc-upload-ctx-provider',{'ctx-name':'uploader-'+this['ucContextId']}),_0x479ee1['document']['body']['appendChild'](this['_ctxElement']);}['_initImageProcessingIndicator'](){const _0x305d87=this['editor']['commands']['get']('insertImage');_0x305d87&&this['listenTo'](_0x305d87,'execute',()=>{const _0x29bebc=this['editor']['model']['document']['selection']['getSelectedElement']();_0x29bebc&&_0x29bebc['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x29bebc);});});const _0x3cd73f=this['editor']['commands']['get']('uploadcareImageReplace');_0x3cd73f&&this['listenTo'](_0x3cd73f,'execute',()=>{const _0x16752f=this['editor']['model']['document']['selection']['getSelectedElement']();_0x16752f&&_0x16752f['getAttribute']('uploadcareImageId')&&this['editor']['editing']['view']['once']('render',()=>{p(this['editor'],_0x16752f);});});}}class tt extends _0xeec603{static get['requires'](){return[o,e];}static get['pluginName'](){return'Uploadcare';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8e601d){super(_0x8e601d),_0x8e601d['config']['define']('uploadcare.uploader.sourceList',[i['Local'],i['URL']]),_0x2c5615['defineComponents'](_0x2c5615);}}class ii extends _0xa42b74{constructor(_0x3b1be3){super(_0x3b1be3);const t=_0x3b1be3['t'],_0x282c35=this['bindTemplate'],_0x528802=new _0x4a5519();_0x528802['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':[_0x528802,{'text':_0x282c35['to']('imageUploadProgress',_0x1aaf6e=>t('Loading\x20image...')+'\x20('+(_0x1aaf6e||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 _0xa42b74{constructor(_0x539524){super(_0x539524);const t=_0x539524['t'];this['set']('errorType',null);const _0x3c0d84=new _0x2b9f7f(_0x539524);_0x3c0d84['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x3c0d84['withText']=!0x0,_0x3c0d84['class']='ck-button-action',_0x3c0d84['on']('execute',()=>{this['fire']('retry');}),_0x3c0d84['bind']('isVisible')['to'](this,'errorType',_0x5d315d=>'NotFound'!==_0x5d315d);const _0x16ffc7=new _0x402c3b();_0x16ffc7['content']=_0x186bb9,_0x16ffc7['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x318b90=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':[_0x16ffc7,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x318b90['to']('errorType',_0x3d2c13=>t('NotFound'!==_0x3d2c13?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x3c0d84]},{'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 _0xa42b74{constructor(_0x470c47,_0x15aac2){super(_0x470c47);const _0x171cf4=this['bindTemplate'];this['set']('imageSrc',''),this['setTemplate']({'tag':'uc-cloud-image-editor','attributes':{..._0x15aac2,'class':['uc-light','ck-uploadcare-theme'],'ctx-name':'image-edit','cdn-url':_0x171cf4['to']('imageSrc')}});}}class X extends F{['_items'];['_loadingView'];['_errorView'];['_editingView'];['_focusableView'];constructor(_0x3dcff5,_0x308e2e,_0x7d3a9c){super(_0x3dcff5),this['_items']=this['createCollection'](),this['_loadingView']=new ii(_0x3dcff5),this['_errorView']=new ti(_0x3dcff5),this['_editingView']=new ei(_0x3dcff5,_0x7d3a9c),this['_focusableView']=new _0xa42b74(_0x3dcff5),this['_focusableView']['setTemplate'](this['getFocusableElement']()),this['set']('status',_0x308e2e),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'],_0x4115af=>{this['_addUploadcareImageEditorListeners'](_0x4115af);});}),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'](_0x107694,_0x185ddf){const _0x1ee517='uc-cloud-image-editor',_0x39840b=_0x107694['querySelector'](_0x1ee517);if(_0x39840b)return _0x185ddf(_0x39840b);const _0x56ac60=new MutationObserver(_0x2173cc=>{const _0xb26457=_0x2173cc['filter'](_0x40e4bc=>_0x40e4bc['target']===_0x107694&&_0x40e4bc['addedNodes']['length']>0x0&&_0x40e4bc['addedNodes'][0x0]['nodeName']['toLowerCase']()===_0x1ee517);_0xb26457['length']&&(_0x56ac60['disconnect'](),_0x185ddf(_0xb26457[0x0]['addedNodes'][0x0]));});_0x56ac60['observe'](_0x107694,{'childList':!0x0,'subtree':!0x0});}['_addUploadcareImageEditorListeners'](_0x351f70){_0x351f70['addEventListener']('apply',_0x464ed3=>{this['fire']('apply',{'imageSrc':_0x464ed3['detail']['cdnUrl']});}),_0x351f70['addEventListener']('cancel',()=>{this['fire']('cancel');});}['_addErrorViewListeners'](){this['_errorView']['on']('retry',()=>{this['fire']('retry');});}}class N extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1eb40b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x4af46a,_0x149f20,_0x41a086){super(),this['_editor']=_0x4af46a,this['_dialog']=_0x149f20,this['_imageElement']=_0x41a086,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 _0x2b2c06=this['_imageElement'],_0x5c3031=_0x2b2c06['getAttribute']('uploadcareImageId'),_0x173240=_0x2b2c06['getAttribute']('src');if(_0x5c3031)await this['_loadImageInfo'](_0x5c3031,_0x173240);else{if(this['_imageCache']['has'](_0x173240)){const _0x3fbe99=this['_imageCache']['get'](_0x173240);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x3fbe99['url'],this['imageDimension']=_0x3fbe99['dimension'],this['imageId']=_0x3fbe99['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0x3a5d22}=this['_editor'],t=_0x3a5d22['t'],_0x246788=new X(_0x3a5d22,this['imageStatus'],this['_attributes']);_0x246788['bind']('status')['to'](this,'imageStatus'),_0x246788['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x246788['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x246788['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x246788,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x1a5d96,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x246788,'position':_0x139913['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x246788['focus']();},'onHide':()=>{_0x246788['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x309989=>!S(_0x309989,_0x246788['element'])}});}['_loadImageInfo'](_0x97b175,_0x25e444){return j['getInfo'](_0x97b175,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x1835da=>{const {width:_0x531736,height:_0x42443f}=_0x1835da['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x25e444,this['imageDimension']={'width':_0x531736,'height':_0x42443f},this['imageId']=_0x97b175;})['catch'](_0x555b29=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x555b29['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x1317d9,_0x22c16c){return this['_getImageAsFile'](_0x1317d9)['then'](_0x2891ff=>j['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x22c16c['signal'],'file':_0x2891ff,'onProgress':_0xd86f08=>{_0xd86f08&&_0xd86f08['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0xd86f08['value']));}}))['then'](_0x1500c6=>{const {width:_0x1951c6,height:_0x57a612}=_0x1500c6['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1500c6['cdnUrl'],this['imageDimension']={'width':_0x1951c6,'height':_0x57a612},this['imageId']=_0x1500c6['uuid'],this['imageUploadProgress']=null;const _0x2cd0c6=_0x1317d9['getAttribute']('src');this['_imageCache']['set'](_0x2cd0c6,{'id':_0x1500c6['uuid'],'url':_0x1500c6['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x4a4d9b=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x4a4d9b['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x57a665,_0x233faa){_0x57a665['on']('apply',(_0x4ce369,_0x2c4575)=>{this['_replaceImage'](_0x233faa,_0x2c4575['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x57a665['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x57a665['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x1e2b96,_0xae747d,_0x2639e4){const _0x4eb04d=this['_editor'],{width:_0x39600a,height:_0x4f9146}=C(_0xae747d,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x3127d0,imageSources:_0x5dc28e}=k(_0xae747d,_0x39600a);_0x4eb04d['model']['change'](_0x3432db=>{if('$graveyard'===_0x1e2b96['root']['rootName']){_0x4eb04d['execute']('insertImage',{'imageType':_0x1e2b96['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x1e2b96['getAttributes']()),'uploadcareImageId':_0x2639e4,'src':_0x3127d0,'sources':_0x5dc28e,'width':_0x39600a,'height':_0x4f9146}});const _0x506c5c=_0x1e2b96['getChildren']();_0x1e2b96=_0x4eb04d['model']['document']['selection']['getSelectedElement']();for(const _0x597a2c of _0x506c5c)_0x3432db['append'](_0x3432db['cloneElement'](_0x597a2c),_0x1e2b96);}else _0x3432db['setSelection'](_0x1e2b96,'on'),_0x4eb04d['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x1e2b96['getAttributes']()),'uploadcareImageId':_0x2639e4,'src':_0x3127d0,'sources':_0x5dc28e,'width':_0x39600a,'height':_0x4f9146},_0x1e2b96);_0x3432db['setSelection'](_0x1e2b96,'on');});}async['_getImageAsFile'](_0xe01d15){const _0x1702eb=_0x479ee1['window'],_0x248d89=_0x479ee1['document']['location']['href'],_0x670a99=new _0x1702eb['URL'](_0xe01d15['getAttribute']('src'),_0x248d89);if('data:'===_0x670a99['protocol']){const _0x1965c8=_0x670a99['href']['split'](','),_0x3c10ed=_0x1965c8[0x0]['match'](/:(.*?);/)[0x1],_0x564ce4=_0x3c10ed['split']('/')[0x1],_0x2159bf=_0x1702eb['atob'](_0x1965c8[_0x1965c8['length']-0x1]);let _0x59b1a1=_0x2159bf['length'];const _0x51edd6=new _0x1702eb['Uint8Array'](_0x59b1a1);for(;_0x59b1a1--;)_0x51edd6[_0x59b1a1]=_0x2159bf['charCodeAt'](_0x59b1a1);return new _0x1702eb['File']([_0x51edd6],'image.'+_0x564ce4,{'type':_0x3c10ed});}const _0x4cc342=_0x670a99['href']['split']('/'),_0x71473b=_0x4cc342[_0x4cc342['length']-0x1],_0x16ca47=_0x71473b['split']('.')[0x1];return _0x1702eb['fetch'](_0x670a99['href'])['then'](_0x106b89=>_0x106b89['clone']()['blob']())['then'](_0x1dce84=>new _0x1702eb['File']([_0x1dce84],_0x71473b,{'type':'image/'+_0x16ca47}));}}class Q extends _0x14af4e{['imageEditController'];static get['requires'](){return[_0x1eeebd];}['_isEditable'];constructor(_0x2de983){super(_0x2de983),this['imageEditController']=void 0x0,this['_isEditable']=function(_0xee0cc7){const _0x561133=z(_0xee0cc7);return _0x3b118f=>!(!_0x3b118f||!_0x3b118f['is']('element','imageBlock')&&!_0x3b118f['is']('element','imageInline'))&&(!!_0x3b118f['hasAttribute']('uploadcareImageId')||!!_0x3b118f['hasAttribute']('src')&&_0x561133(_0x3b118f['getAttribute']('src')));}(_0x2de983['config']['get']('uploadcare.allowExternalImagesEditing')||[]),this['set']({'isActive':!0x1});}['refresh'](){const _0x218dae=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=this['_isEditable'](_0x218dae);}['execute'](){this['imageEditController']&&(this['unbind']('isActive'),this['imageEditController']=void 0x0);const _0x23ba62=this['editor']['model']['document']['selection']['getSelectedElement']();_0x23ba62&&(_0x23ba62['is']('element','imageBlock')||_0x23ba62['is']('element','imageInline'))&&(this['imageEditController']=new N(this['editor'],this['editor']['plugins']['get'](_0x1eeebd),_0x23ba62),this['bind']('isActive')['to'](this['imageEditController'],'isActive'));}}class V extends _0x14af4e{['refresh'](){const _0x295d64=this['editor']['model']['document']['selection']['getSelectedElement']();this['isEnabled']=Boolean(_0x295d64&&(_0x295d64['is']('element','imageBlock')||_0x295d64['is']('element','imageInline')));}['execute'](_0xbf0c7c){const _0x7e8536=this['editor']['model']['document']['selection']['getSelectedElement']();this['editor']['model']['change'](_0x5eb1be=>{_0x5eb1be['setAttributes'](_0xbf0c7c,_0x7e8536),_0x5eb1be['removeAttribute']('srcset',_0x7e8536),_0x5eb1be['removeAttribute']('sizes',_0x7e8536);});}}class m extends _0xeec603{static get['pluginName'](){return'UploadcareImageEditEditing';}static get['requires'](){return[o,_0x1a9304,'ImageUtils','ImageEditing'];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x176078}=this;_0x176078['commands']['add']('uploadcareImageEdit',new Q(_0x176078)),_0x176078['commands']['add']('uploadcareImageReplace',new V(_0x176078));}}class g extends _0xeec603{['_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 _0x2a96c9=this['editor'];_0x2a96c9['ui']['componentFactory']['add']('uploadcareImageEdit',_0x2e12f7=>{const _0x40f425=_0x2a96c9['commands']['get']('uploadcareImageEdit'),_0x9e65fd=new _0x2b9f7f(_0x2e12f7),t=_0x2e12f7['t'];return _0x9e65fd['set']({'icon':_0x1a5d96,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x9e65fd['bind']('isEnabled')['to'](_0x40f425),_0x9e65fd['bind']('isOn')['to'](_0x40f425,'isActive'),this['listenTo'](_0x9e65fd,'execute',()=>{_0x2a96c9['execute']('uploadcareImageEdit'),_0x2a96c9['editing']['view']['focus']();}),_0x9e65fd;}),this['_initConfig']();}['_initConfig'](){const _0x526aac=_0x321c11(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x526aac),this['listenTo'](this['editor'],'destroy',()=>{_0x526aac['remove']();});}}class et extends _0xeec603{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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-uploadcare",
|
|
3
|
-
"version": "46.0.1-alpha.
|
|
3
|
+
"version": "46.0.1-alpha.14",
|
|
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": "46.0.1-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "46.0.1-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-image": "46.0.1-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-theme-lark": "46.0.1-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-ui": "46.0.1-alpha.
|
|
31
|
-
"@ckeditor/ckeditor5-upload": "46.0.1-alpha.
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "46.0.1-alpha.
|
|
33
|
-
"ckeditor5": "46.0.1-alpha.
|
|
26
|
+
"@ckeditor/ckeditor5-core": "46.0.1-alpha.14",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "46.0.1-alpha.14",
|
|
28
|
+
"@ckeditor/ckeditor5-image": "46.0.1-alpha.14",
|
|
29
|
+
"@ckeditor/ckeditor5-theme-lark": "46.0.1-alpha.14",
|
|
30
|
+
"@ckeditor/ckeditor5-ui": "46.0.1-alpha.14",
|
|
31
|
+
"@ckeditor/ckeditor5-upload": "46.0.1-alpha.14",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "46.0.1-alpha.14",
|
|
33
|
+
"ckeditor5": "46.0.1-alpha.14",
|
|
34
34
|
"@uploadcare/file-uploader": "1.17.1",
|
|
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
|
-
function _0x267f(){const _0x420cc7=['for','schema','isRegistered','init','_initImageProcessingIndicator','appendChild','contentLanguage','model','commands','uploadcare.uploader','cleanupImage','data-uc-image-id','#uc-icon-arrow-down','afterInit','downcast','input[uploadcare-file-input]','2254401lWiqUn','closeMax','elementToAttribute','isOfficialPlugin','editor','fromCharCode','get','30WZBGpA','insertImage','true','add','once','_initCtx','\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','820096nDwOsB','isPremiumPlugin','body','36498yQTCYb','_initConversion','href','view','conversion','imageBlock','uploadcareImageId','join','listenTo','extend','remove','render','1471QuDQDC','map','document','uploadcare','uc-upload-ctx-provider','464zoWlrC','replaceImageSource','pluginName','attributeToAttribute','_initConfig','removeAttribute','execute','selection','ucContextId','_ctxElement','UploadcareEditing','_configElement','querySelector','10GIrIlg','destroy','imageInline','iconHrefResolver','3440185CVOQhn','getAttribute','requires','locale','PictureEditing','getSelectedElement','configElement','uploadcareImageReplace','_initSchema','1257135dGcSqU','editing','uploader-','uploadcare.pubkey','config','upcast','uc-config','3458952VKcdnj','ctxElement'];_0x267f=function(){return _0x420cc7;};return _0x267f();}const _0x56de91=_0x1a72;(function(_0x4ec8b1,_0x184ab5){const _0x30bbc1=_0x1a72,_0x3dc51d=_0x4ec8b1();while(!![]){try{const _0x4edeb1=-parseInt(_0x30bbc1(0x1f6))/0x1*(-parseInt(_0x30bbc1(0x1fb))/0x2)+parseInt(_0x30bbc1(0x1c0))/0x3+parseInt(_0x30bbc1(0x1e7))/0x4+-parseInt(_0x30bbc1(0x208))/0x5*(-parseInt(_0x30bbc1(0x1ea))/0x6)+parseInt(_0x30bbc1(0x1b7))/0x7+-parseInt(_0x30bbc1(0x1c7))/0x8+-parseInt(_0x30bbc1(0x1d9))/0x9*(parseInt(_0x30bbc1(0x1e0))/0xa);if(_0x4edeb1===_0x184ab5)break;else _0x3dc51d['push'](_0x3dc51d['shift']());}catch(_0x3d082a){_0x3dc51d['push'](_0x3dc51d['shift']());}}}(_0x267f,0x459c6));import{Plugin as _0x584e40}from'ckeditor5/src/core.js';import{Dialog as _0x3aa71b}from'ckeditor5/src/ui.js';function _0x1a72(_0x5eb52b,_0x48bda8){const _0x267f24=_0x267f();return _0x1a72=function(_0x1a7209,_0x17c304){_0x1a7209=_0x1a7209-0x1b6;let _0x43bc77=_0x267f24[_0x1a7209];return _0x43bc77;},_0x1a72(_0x5eb52b,_0x48bda8);}import{createElement as _0x599feb,global as _0x180f5a,uid as _0x4469da}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0x125769}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0xc3c4a3}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x4d3e18}from'./utils/editingutils.js';export class UploadcareEditing extends _0x584e40{[_0x56de91(0x206)]=null;[_0x56de91(0x204)]=null;static get[_0x56de91(0x1fd)](){const _0x5d65f4=_0x56de91;return _0x5d65f4(0x205);}static get[_0x56de91(0x1b9)](){const _0x92fedd=_0x56de91;return[_0x92fedd(0x1bb),_0xc3c4a3,_0x3aa71b];}static get[_0x56de91(0x1dc)](){return!0x0;}static get[_0x56de91(0x1e8)](){return!0x0;}[_0x56de91(0x203)];get[_0x56de91(0x1bd)](){const _0x30234e=_0x56de91;return this[_0x30234e(0x206)];}get[_0x56de91(0x1c8)](){const _0x5d6bde=_0x56de91;return this[_0x5d6bde(0x204)];}constructor(_0x15be87){const _0xed7b0c=_0x56de91;super(_0x15be87),this[_0xed7b0c(0x203)]=_0x4469da();}[_0x56de91(0x1cc)](){const _0x41230f=_0x56de91,_0x1ea771=this[_0x41230f(0x1dd)];_0x1ea771[_0x41230f(0x1d1)][_0x41230f(0x1e3)](_0x41230f(0x1f9),new _0x125769(_0x1ea771));}[_0x56de91(0x1d6)](){const _0x14fe6a=_0x56de91;this[_0x14fe6a(0x1bf)](),this[_0x14fe6a(0x1eb)](),this[_0x14fe6a(0x1ff)](),this[_0x14fe6a(0x1e5)](),this[_0x14fe6a(0x1cd)](),this[_0x14fe6a(0x1f2)](this[_0x14fe6a(0x1dd)],_0x14fe6a(0x209),()=>{const _0x513379=_0x14fe6a;this[_0x513379(0x206)]&&(this[_0x513379(0x206)][_0x513379(0x1f4)](),this[_0x513379(0x206)]=null),this[_0x513379(0x204)]&&(this[_0x513379(0x204)][_0x513379(0x1f4)](),this[_0x513379(0x204)]=null);const _0x532944=_0x180f5a[_0x513379(0x1f8)][_0x513379(0x207)](_0x513379(0x1d8));_0x532944&&_0x532944[_0x513379(0x1f4)]();}),async function(_0x44aead){const _0x6f5ce3=_0x1acdc6([0x71,0x72,0x39,0x70,0x65,0x69,0x66,0x78,0x4d,0x5a,0x6d,0x74,0x68,0x73,0x7a,0x75,0x6f,0x32,0x53,0x59,0x36,0x48,0x76,0x52,0x47,0x4a,0x34,0x63,0x56,0x37,0x6b,0x43,0x45,0x4e,0x4b,0x6a,0x62,0x61,0x35,0x57,0x38,0x4c,0x6c,0x55,0x51,0x44,0x6e,0x64,0x33,0x42,0x77,0x49,0x4f,0x79,0x46,0x54,0x50,0x30,0x31,0x41,0x58,0x67]),_0x7a7cfd=0x44cde989,_0x171fad=0x44ca9999^_0x7a7cfd,_0x38f3b6=window[_0x1acdc6([0x44,0x61,0x74,0x65])][_0x1acdc6([0x6e,0x6f,0x77])](),_0x5bcb09=_0x44aead[_0x1acdc6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x53e28b=new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x232acc=>{_0x5bcb09[_0x1acdc6([0x6f,0x6e,0x63,0x65])](_0x1acdc6([0x72,0x65,0x61,0x64,0x79]),_0x232acc);}),_0x880327={[_0x1acdc6([0x6b,0x74,0x79])]:_0x1acdc6([0x45,0x43]),[_0x1acdc6([0x75,0x73,0x65])]:_0x1acdc6([0x73,0x69,0x67]),[_0x1acdc6([0x63,0x72,0x76])]:_0x1acdc6([0x50,0x2d,0x32,0x35,0x36]),[_0x1acdc6([0x78])]:_0x1acdc6([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]),[_0x1acdc6([0x79])]:_0x1acdc6([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]),[_0x1acdc6([0x61,0x6c,0x67])]:_0x1acdc6([0x45,0x53,0x32,0x35,0x36])},_0x3e154d=_0x5bcb09[_0x1acdc6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1acdc6([0x67,0x65,0x74])](_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5d60db(){let _0x1515f7,_0x483eb8=null,_0xd731e3=null;try{if(_0x3e154d==_0x1acdc6([0x47,0x50,0x4c]))return _0x1acdc6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1515f7=_0x1806d2(),!_0x1515f7)return _0x1acdc6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1515f7[_0x1acdc6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xd731e3=_0x2d2c1e(_0x1515f7[_0x1acdc6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1515f7[_0x1acdc6([0x6a,0x74,0x69])])),await _0x3e743e()?_0x140745()?_0x11467e()?_0x1acdc6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x292057()?(_0x1515f7[_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1acdc6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x483eb8=_0x2c81a7(_0x1acdc6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1515f7[_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1acdc6([0x74,0x72,0x69,0x61,0x6c])&&(_0x483eb8=_0x2c81a7(_0x1acdc6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x15db48()):_0x1acdc6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1acdc6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1acdc6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1acdc6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x11467e(){const _0x65db8=[_0x1acdc6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1acdc6([0x74,0x72,0x69,0x61,0x6c])][_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1515f7[_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x38f3b6/0x3e8:0xe10*_0x171fad;return _0x1515f7[_0x1acdc6([0x65,0x78,0x70])]<_0x65db8;}function _0x140745(){const _0x1e14ab=_0x1515f7[_0x1acdc6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x1e14ab&&(!!_0x1e14ab[_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1acdc6([0x2a]))||!!_0x1e14ab[_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1acdc6([0x55,0x50,0x4c,0x43])));}function _0x292057(){const _0x597d6d=_0x1a72,_0x3a582f=_0x1515f7[_0x1acdc6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a582f||0x0==_0x3a582f[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xd62280}=new URL(window[_0x1acdc6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x597d6d(0x1ec)]);if(_0x3a582f[_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd62280))return!0x0;const _0x5b5a22=_0xd62280[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])](_0x1acdc6([0x2e]));return _0x3a582f[_0x1acdc6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a96b0=>_0x1a96b0[_0x1acdc6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1acdc6([0x2a])))[_0x1acdc6([0x6d,0x61,0x70])](_0x5d725a=>_0x5d725a[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])](_0x1acdc6([0x2e])))[_0x1acdc6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x31054a=>_0x31054a[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5b5a22[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1acdc6([0x6d,0x61,0x70])](_0xe8a456=>Array(_0x5b5a22[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xe8a456[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1acdc6([0x66,0x69,0x6c,0x6c])](_0xe8a456[0x0]===_0x1acdc6([0x2a])?_0x1acdc6([0x2a]):'')[_0x1acdc6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xe8a456))[_0x1acdc6([0x73,0x6f,0x6d,0x65])](_0x1683af=>_0x5b5a22[_0x1acdc6([0x65,0x76,0x65,0x72,0x79])]((_0x295df6,_0x4a1748)=>_0x1683af[_0x4a1748]===_0x295df6||_0x1683af[_0x4a1748]===_0x1acdc6([0x2a])));}function _0x15db48(){return _0x483eb8&&_0xd731e3?new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3a8b79,_0x5f4081)=>{_0x483eb8[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x3a8b79,_0x5f4081),_0xd731e3[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x2943b8=>{_0x2943b8!=_0x1acdc6([0x56,0x61,0x6c,0x69,0x64])&&_0x3a8b79(_0x2943b8);},_0x5f4081);}):_0x483eb8||_0xd731e3||_0x1acdc6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2d2c1e(_0x493332,_0x281925){return new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x567672=>{if(_0x20ac05())return _0x567672(_0x1acdc6([0x56,0x61,0x6c,0x69,0x64]));_0x186b9e(),_0x5bcb09[_0x1acdc6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1acdc6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5b83b3=!0x1;const _0x36557d=_0x4469da();function _0x25dc29(_0x5d2f95){return!!_0x5d2f95&&(typeof _0x5d2f95===_0x1acdc6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5d2f95===_0x1acdc6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5d2f95[_0x1acdc6([0x74,0x68,0x65,0x6e])]===_0x1acdc6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5d2f95[_0x1acdc6([0x63,0x61,0x74,0x63,0x68])]===_0x1acdc6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x293453(_0x43a8f9){_0x1b4955(_0x43a8f9)[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x470b8d=>{if(!_0x470b8d||_0x470b8d[_0x1acdc6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1acdc6([0x6f,0x6b]))return _0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3753d2(_0x18c824(_0x36557d+_0x281925))!=_0x470b8d[_0x1acdc6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1acdc6([0x56,0x61,0x6c,0x69,0x64]);})[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x3c4fa7=>(_0x376312(),_0x3c4fa7),()=>{const _0x19249d=_0x48d25b();return null==_0x19249d?(_0x376312(),_0x1acdc6([0x56,0x61,0x6c,0x69,0x64])):_0x1acdc6(_0x38f3b6-_0x19249d>(0x60c16d89^_0x7a7cfd)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x567672)[_0x1acdc6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x567672(_0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1464fe=0x44fb0709^_0x7a7cfd;function _0x376312(){const _0x2c2a05=_0x1acdc6([0x6c,0x6c,0x63,0x74,0x2d])+_0x3753d2(_0x18c824(_0x493332)),_0x1ecb81=_0x255579(_0x3753d2(window[_0x1acdc6([0x4d,0x61,0x74,0x68])][_0x1acdc6([0x63,0x65,0x69,0x6c])](_0x38f3b6/_0x1464fe)));window[_0x1acdc6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1acdc6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c2a05,_0x1ecb81);}function _0x48d25b(){const _0x8a7a16=_0x1acdc6([0x6c,0x6c,0x63,0x74,0x2d])+_0x3753d2(_0x18c824(_0x493332)),_0xa2dbb9=window[_0x1acdc6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1acdc6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x8a7a16);return _0xa2dbb9?window[_0x1acdc6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x255579(_0xa2dbb9),0x10)*_0x1464fe:null;}function _0x1b4955(_0x34cfce){return new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x47176d,_0x4d96f7)=>{_0x34cfce[_0x1acdc6([0x74,0x68,0x65,0x6e])](_0x47176d,_0x4d96f7),window[_0x1acdc6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4d96f7,0x44cc3d49^_0x7a7cfd);});}}_0x5bcb09[_0x1acdc6([0x6f,0x6e])](_0x1acdc6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x13dfde,_0x2c68e7)=>{if(_0x2c68e7[0x0]!=_0x493332)return _0x567672(_0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2c68e7[0x1]={..._0x2c68e7[0x1],[_0x1acdc6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x36557d};},{[_0x1acdc6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1acdc6([0x68,0x69,0x67,0x68])}),_0x5bcb09[_0x1acdc6([0x6f,0x6e])](_0x1acdc6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x53faa5=>{_0x25dc29(_0x53faa5[_0x1acdc6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5b83b3=!0x0,_0x293453(_0x53faa5[_0x1acdc6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1acdc6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1acdc6([0x6c,0x6f,0x77])}),_0x53e28b[_0x1acdc6([0x74,0x68,0x65,0x6e])](()=>{_0x5b83b3||_0x567672(_0x1acdc6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x20ac05(){return _0x5bcb09[_0x1acdc6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1acdc6([0x76,0x69,0x65,0x77])][_0x1acdc6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1acdc6([0x61,0x75,0x74,0x6f]);}function _0x186b9e(){_0x5bcb09[_0x1acdc6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1acdc6([0x76,0x69,0x65,0x77])][_0x1acdc6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1acdc6([0x61,0x75,0x74,0x6f]);}}function _0x2c81a7(_0x46af3a){const _0x120bf8=[new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58596c=>setTimeout(_0x58596c,0x44c4d745^_0x7a7cfd)),_0x53e28b[_0x1acdc6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4eb2a8=>{let _0x3a0bf3=0x0;_0x5bcb09[_0x1acdc6([0x6d,0x6f,0x64,0x65,0x6c])][_0x1acdc6([0x6f,0x6e])](_0x1acdc6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x78d9e1,_0x3cd0eb)=>{_0x3cd0eb[0x0][_0x1acdc6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3a0bf3++,_0x3a0bf3==(0x44cde871^_0x7a7cfd)&&(_0x4eb2a8(),_0x78d9e1[_0x1acdc6([0x6f,0x66,0x66])]());});}))];return window[_0x1acdc6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1acdc6([0x72,0x61,0x63,0x65])](_0x120bf8)[_0x1acdc6([0x74,0x68,0x65,0x6e])](()=>_0x46af3a);}async function _0x2cee04(){await _0x53e28b,_0x5bcb09[_0x1acdc6([0x6d,0x6f,0x64,0x65,0x6c])][_0x1acdc6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x141129,_0x5bcb09[_0x1acdc6([0x6d,0x6f,0x64,0x65,0x6c])][_0x1acdc6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x141129,_0x5bcb09[_0x1acdc6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1acdc6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xa667cb(_0x1bf919){const _0x465274=_0x428143();_0x5bcb09[_0x465274]=_0x1acdc6([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1bf919,_0x1bf919!=_0x1acdc6([0x56,0x61,0x6c,0x69,0x64])&&_0x2cee04();}function _0x428143(){const _0x234ddc=window[_0x1acdc6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1acdc6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1acdc6([0x6e,0x6f,0x77])]())[_0x1acdc6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1acdc6([0x2e]),'');let _0x27cfe1=_0x1acdc6([0x71]);for(let _0x2b0dd2=0x0;_0x2b0dd2<_0x234ddc[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2b0dd2+=0x2){let _0x545cbb=window[_0x1acdc6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x234ddc[_0x1acdc6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2b0dd2,_0x2b0dd2+0x2));_0x545cbb>=_0x6f5ce3[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x545cbb-=_0x6f5ce3[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x27cfe1+=_0x6f5ce3[_0x545cbb];}return _0x27cfe1;}function _0x1806d2(){const _0xc22ee4=_0x3e154d[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])](_0x1acdc6([0x2e]));if(0x3!=_0xc22ee4[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4212fd(_0xc22ee4[0x1]);function _0x4212fd(_0xeb20d8){const _0x14b70d=_0x4b98d4(_0xeb20d8);return _0x14b70d&&_0xd0024a()?_0x14b70d:null;function _0xd0024a(){const _0x169231=_0x14b70d[_0x1acdc6([0x6a,0x74,0x69])],_0xd7b9f7=window[_0x1acdc6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x169231[_0x1acdc6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x169231[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x192916={..._0x14b70d,[_0x1acdc6([0x6a,0x74,0x69])]:_0x169231[_0x1acdc6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x169231[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x192916[_0x1acdc6([0x76,0x63])],_0x18c824(_0x192916)==_0xd7b9f7;}}}async function _0x3e743e(){let _0x32ff71=!0x0;try{const _0x5a8e41=_0x3e154d[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])](_0x1acdc6([0x2e])),[_0x2b9a11,_0x4154ea,_0xddc0ab]=_0x5a8e41;return _0x1b02ba(_0x2b9a11),await _0x1a0b4c(_0x2b9a11,_0x4154ea,_0xddc0ab),_0x32ff71;}catch{return!0x1;}function _0x1b02ba(_0x3e62fd){const _0x3cb078=_0x4b98d4(_0x3e62fd);_0x3cb078&&_0x3cb078[_0x1acdc6([0x61,0x6c,0x67])]==_0x1acdc6([0x45,0x53,0x32,0x35,0x36])||(_0x32ff71=!0x1);}async function _0x1a0b4c(_0x32f6f5,_0x3a38bc,_0x188ead){const _0x43c78d=window[_0x1acdc6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1acdc6([0x66,0x72,0x6f,0x6d])](_0x51c3ce(_0x188ead),_0x5d1a4d=>_0x5d1a4d[_0x1acdc6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x538f51=new window[(_0x1acdc6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1acdc6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x32f6f5+_0x1acdc6([0x2e])+_0x3a38bc),_0xdac2da=window[_0x1acdc6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1acdc6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xdac2da)return;const _0x2c7249=await _0xdac2da[_0x1acdc6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1acdc6([0x6a,0x77,0x6b]),_0x880327,{[_0x1acdc6([0x6e,0x61,0x6d,0x65])]:_0x1acdc6([0x45,0x43,0x44,0x53,0x41]),[_0x1acdc6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1acdc6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1acdc6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xdac2da[_0x1acdc6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1acdc6([0x6e,0x61,0x6d,0x65])]:_0x1acdc6([0x45,0x43,0x44,0x53,0x41]),[_0x1acdc6([0x68,0x61,0x73,0x68])]:{[_0x1acdc6([0x6e,0x61,0x6d,0x65])]:_0x1acdc6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2c7249,_0x43c78d,_0x538f51)||(_0x32ff71=!0x1);}}function _0x4b98d4(_0x1fc72e){return _0x1fc72e[_0x1acdc6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1acdc6([0x65,0x79]))?JSON[_0x1acdc6([0x70,0x61,0x72,0x73,0x65])](_0x51c3ce(_0x1fc72e)):null;}function _0x51c3ce(_0x4a8fce){return window[_0x1acdc6([0x61,0x74,0x6f,0x62])](_0x4a8fce[_0x1acdc6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1acdc6([0x2b]))[_0x1acdc6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1acdc6([0x2f])));}function _0x18c824(_0x33ee10){let _0x3e7b36=0x1505;function _0x559e4c(_0x42b653){for(let _0x32c170=0x0;_0x32c170<_0x42b653[_0x1acdc6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x32c170++){const _0x229bf9=_0x42b653[_0x1acdc6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x32c170);_0x3e7b36=(_0x3e7b36<<0x5)+_0x3e7b36+_0x229bf9,_0x3e7b36&=_0x3e7b36;}}function _0xed4d01(_0x1eac66){Array[_0x1acdc6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1eac66)?_0x1eac66[_0x1acdc6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xed4d01):_0x1eac66&&typeof _0x1eac66==_0x1acdc6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1acdc6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1eac66)[_0x1acdc6([0x73,0x6f,0x72,0x74])]()[_0x1acdc6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x18cab1,_0xc60a45])=>{_0x559e4c(_0x18cab1),_0xed4d01(_0xc60a45);}):_0x559e4c(window[_0x1acdc6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1eac66));}return _0xed4d01(_0x33ee10),_0x3e7b36>>>0x0;}function _0x3753d2(_0x45bbc6){return _0x45bbc6[_0x1acdc6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1acdc6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1acdc6([0x30]));}function _0x255579(_0x245e28){return _0x245e28[_0x1acdc6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1acdc6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1acdc6([0x6a,0x6f,0x69,0x6e])]('');}function _0x141129(){}function _0x1acdc6(_0x27097e){const _0x361c47=_0x1a72;return _0x27097e[_0x361c47(0x1f7)](_0x135bbc=>String[_0x361c47(0x1de)](_0x135bbc))[_0x361c47(0x1f1)]('');}_0xa667cb(await _0x5d60db());}(this);}[_0x56de91(0x1bf)](){const _0x56d44c=_0x56de91,_0x3837e0=this[_0x56d44c(0x1dd)][_0x56d44c(0x1d0)][_0x56d44c(0x1ca)];_0x3837e0[_0x56d44c(0x1cb)](_0x56d44c(0x1ef))&&_0x3837e0[_0x56d44c(0x1f3)](_0x56d44c(0x1ef),{'allowAttributes':[_0x56d44c(0x1f0)]}),_0x3837e0[_0x56d44c(0x1cb)](_0x56d44c(0x20a))&&_0x3837e0[_0x56d44c(0x1f3)](_0x56d44c(0x20a),{'allowAttributes':[_0x56d44c(0x1f0)]});}[_0x56de91(0x1eb)](){const _0x782f5c=_0x56de91,_0x45fb17=this[_0x782f5c(0x1dd)];_0x45fb17[_0x782f5c(0x1ee)][_0x782f5c(0x1c9)](_0x782f5c(0x1d7))[_0x782f5c(0x1fe)]({'model':_0x782f5c(0x1f0),'view':_0x782f5c(0x1d4)}),_0x45fb17[_0x782f5c(0x1ee)][_0x782f5c(0x1c9)](_0x782f5c(0x1c5))[_0x782f5c(0x1db)]({'model':{'key':_0x782f5c(0x1f0),'value':_0x6bfd09=>_0x6bfd09[_0x782f5c(0x1b8)](_0x782f5c(0x1d4))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x178531=_0x45fb17[_0x782f5c(0x1d1)][_0x782f5c(0x1df)](_0x782f5c(0x1fc));_0x178531&&this[_0x782f5c(0x1f2)](_0x178531,_0x782f5c(0x1d3),(_0xd6e047,[_0x3f8031,_0x174bb7])=>{const _0x49329c=_0x782f5c;_0x3f8031[_0x49329c(0x200)](_0x49329c(0x1f0),_0x174bb7);});}[_0x56de91(0x1ff)](){const _0x3ad321=_0x56de91,_0x43a94b=this[_0x3ad321(0x1dd)][_0x3ad321(0x1c4)][_0x3ad321(0x1df)](_0x3ad321(0x1d2))||{},_0x11c1da=this[_0x3ad321(0x1dd)][_0x3ad321(0x1c4)][_0x3ad321(0x1df)](_0x3ad321(0x1c3))||'';this[_0x3ad321(0x206)]=_0x599feb(_0x180f5a[_0x3ad321(0x1f8)],_0x3ad321(0x1c6),{..._0x43a94b,'pubkey':_0x11c1da,'ctx-name':_0x3ad321(0x1c2)+this[_0x3ad321(0x203)],'sourceList':'','imgOnly':_0x3ad321(0x1e2),'removeCopyright':_0x3ad321(0x1e2),'localeName':this[_0x3ad321(0x1dd)][_0x3ad321(0x1ba)][_0x3ad321(0x1cf)],'externalSourcesEmbedCss':_0x3ad321(0x1e6)}),this[_0x3ad321(0x206)][_0x3ad321(0x1b6)]=_0x443a64=>{const _0x27d09b=_0x3ad321;if(_0x27d09b(0x1da)==_0x443a64)return _0x27d09b(0x1d5);},_0x180f5a[_0x3ad321(0x1f8)][_0x3ad321(0x1e9)][_0x3ad321(0x1ce)](this[_0x3ad321(0x206)]);}[_0x56de91(0x1e5)](){const _0x2018f3=_0x56de91;this[_0x2018f3(0x204)]=_0x599feb(_0x180f5a[_0x2018f3(0x1f8)],_0x2018f3(0x1fa),{'ctx-name':_0x2018f3(0x1c2)+this[_0x2018f3(0x203)]}),_0x180f5a[_0x2018f3(0x1f8)][_0x2018f3(0x1e9)][_0x2018f3(0x1ce)](this[_0x2018f3(0x204)]);}[_0x56de91(0x1cd)](){const _0x22aa74=_0x56de91,_0x473d54=this[_0x22aa74(0x1dd)][_0x22aa74(0x1d1)][_0x22aa74(0x1df)](_0x22aa74(0x1e1));_0x473d54&&this[_0x22aa74(0x1f2)](_0x473d54,_0x22aa74(0x201),()=>{const _0x1fee3e=_0x22aa74,_0x547033=this[_0x1fee3e(0x1dd)][_0x1fee3e(0x1d0)][_0x1fee3e(0x1f8)][_0x1fee3e(0x202)][_0x1fee3e(0x1bc)]();_0x547033&&_0x547033[_0x1fee3e(0x1b8)](_0x1fee3e(0x1f0))&&this[_0x1fee3e(0x1dd)][_0x1fee3e(0x1c1)][_0x1fee3e(0x1ed)][_0x1fee3e(0x1e4)](_0x1fee3e(0x1f5),()=>{const _0x3495c5=_0x1fee3e;_0x4d3e18(this[_0x3495c5(0x1dd)],_0x547033);});});const _0x4f2f85=this[_0x22aa74(0x1dd)][_0x22aa74(0x1d1)][_0x22aa74(0x1df)](_0x22aa74(0x1be));_0x4f2f85&&this[_0x22aa74(0x1f2)](_0x4f2f85,_0x22aa74(0x201),()=>{const _0x3f5c2b=_0x22aa74,_0x5859ad=this[_0x3f5c2b(0x1dd)][_0x3f5c2b(0x1d0)][_0x3f5c2b(0x1f8)][_0x3f5c2b(0x202)][_0x3f5c2b(0x1bc)]();_0x5859ad&&_0x5859ad[_0x3f5c2b(0x1b8)](_0x3f5c2b(0x1f0))&&this[_0x3f5c2b(0x1dd)][_0x3f5c2b(0x1c1)][_0x3f5c2b(0x1ed)][_0x3f5c2b(0x1e4)](_0x3f5c2b(0x1f5),()=>{const _0xefd396=_0x3f5c2b;_0x4d3e18(this[_0xefd396(0x1dd)],_0x5859ad);});});}}
|
|
23
|
+
const _0x334766=_0x57d8;function _0x18cc(){const _0x51222e=['for','uploadcareImageId','_initCtx','uploadcare','execute','pluginName','373148xSTatO','25hroctP','isOfficialPlugin','UploadcareEditing','editor','requires','listenTo','init','conversion','_initSchema','_configElement','_initConfig','uploadcareImageReplace','extend','document','add','closeMax','uc-upload-ctx-provider','true','_initConversion','contentLanguage','attributeToAttribute','getSelectedElement','commands','_initImageProcessingIndicator','getAttribute','body','selection','href','imageBlock','downcast','config','model','upcast','fromCharCode','imageInline','editing','10LBMpNz','remove','PictureEditing','render','\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','input[uploadcare-file-input]','uploadcare.uploader','configElement','uploader-','get','110eLrFsH','4452906fXyamw','removeAttribute','uc-config','ucContextId','schema','isRegistered','cleanupImage','map','view','elementToAttribute','destroy','uploadcare.pubkey','_ctxElement','querySelector','insertImage','data-uc-image-id','replaceImageSource','join','iconHrefResolver','ctxElement','locale','once','60918CBWyQV','4046wZLUDE','363931rOPPqz','#uc-icon-arrow-down','appendChild','13026310LVjgPo','afterInit','isPremiumPlugin','13336VLRpyS','13709187CgVcvV'];_0x18cc=function(){return _0x51222e;};return _0x18cc();}function _0x57d8(_0x176e36,_0x19c988){const _0x18cc77=_0x18cc();return _0x57d8=function(_0x57d8b1,_0x790a4e){_0x57d8b1=_0x57d8b1-0x1d0;let _0x38edb7=_0x18cc77[_0x57d8b1];return _0x38edb7;},_0x57d8(_0x176e36,_0x19c988);}(function(_0x1f4c20,_0x34eede){const _0x15a174=_0x57d8,_0xd4430b=_0x1f4c20();while(!![]){try{const _0x8f5260=parseInt(_0x15a174(0x1e0))/0x1+-parseInt(_0x15a174(0x21d))/0x2*(parseInt(_0x15a174(0x1de))/0x3)+-parseInt(_0x15a174(0x1ee))/0x4*(parseInt(_0x15a174(0x1ef))/0x5)+parseInt(_0x15a174(0x21e))/0x6+parseInt(_0x15a174(0x1df))/0x7*(parseInt(_0x15a174(0x1e6))/0x8)+-parseInt(_0x15a174(0x1e7))/0x9*(-parseInt(_0x15a174(0x213))/0xa)+-parseInt(_0x15a174(0x1e3))/0xb;if(_0x8f5260===_0x34eede)break;else _0xd4430b['push'](_0xd4430b['shift']());}catch(_0x169e0e){_0xd4430b['push'](_0xd4430b['shift']());}}}(_0x18cc,0xc9820));import{Plugin as _0x1fbf55}from'ckeditor5/src/core.js';import{Dialog as _0x189a46}from'ckeditor5/src/ui.js';import{createElement as _0x8821de,global as _0x153c19,uid as _0x50257b}from'ckeditor5/src/utils.js';import{UploadcareCommand as _0xdaf646}from'./uploadcarecommand.js';import{UploadcareUploadAdapter as _0x2904ce}from'./uploadcareuploadadapter.js';import{showImageProcessingIndicator as _0x36f26f}from'./utils/editingutils.js';export class UploadcareEditing extends _0x1fbf55{[_0x334766(0x1f8)]=null;[_0x334766(0x1d4)]=null;static get[_0x334766(0x1ed)](){const _0xebe3d8=_0x334766;return _0xebe3d8(0x1f1);}static get[_0x334766(0x1f3)](){const _0x38615d=_0x334766;return[_0x38615d(0x215),_0x2904ce,_0x189a46];}static get[_0x334766(0x1f0)](){return!0x0;}static get[_0x334766(0x1e5)](){return!0x0;}[_0x334766(0x221)];get[_0x334766(0x21a)](){const _0x2195cb=_0x334766;return this[_0x2195cb(0x1f8)];}get[_0x334766(0x1db)](){const _0x5ce8bf=_0x334766;return this[_0x5ce8bf(0x1d4)];}constructor(_0x53d8bb){const _0x5e8740=_0x334766;super(_0x53d8bb),this[_0x5e8740(0x221)]=_0x50257b();}[_0x334766(0x1f5)](){const _0x1a9ac1=_0x334766,_0x38dbe7=this[_0x1a9ac1(0x1f2)];_0x38dbe7[_0x1a9ac1(0x205)][_0x1a9ac1(0x1fd)](_0x1a9ac1(0x1eb),new _0xdaf646(_0x38dbe7));}[_0x334766(0x1e4)](){const _0x21f615=_0x334766;this[_0x21f615(0x1f7)](),this[_0x21f615(0x201)](),this[_0x21f615(0x1f9)](),this[_0x21f615(0x1ea)](),this[_0x21f615(0x206)](),this[_0x21f615(0x1f4)](this[_0x21f615(0x1f2)],_0x21f615(0x1d2),()=>{const _0x5d698a=_0x21f615;this[_0x5d698a(0x1f8)]&&(this[_0x5d698a(0x1f8)][_0x5d698a(0x214)](),this[_0x5d698a(0x1f8)]=null),this[_0x5d698a(0x1d4)]&&(this[_0x5d698a(0x1d4)][_0x5d698a(0x214)](),this[_0x5d698a(0x1d4)]=null);const _0x21d3d2=_0x153c19[_0x5d698a(0x1fc)][_0x5d698a(0x1d5)](_0x5d698a(0x218));_0x21d3d2&&_0x21d3d2[_0x5d698a(0x214)]();}),async function(_0x897d2e){const _0x50cd78=_0x5395f1([0x4d,0x39,0x52,0x47,0x6f,0x4f,0x32,0x68,0x54,0x74,0x35,0x6e,0x34,0x66,0x49,0x42,0x6b,0x44,0x4c,0x57,0x5a,0x58,0x41,0x38,0x31,0x53,0x4e,0x72,0x76,0x61,0x7a,0x6c,0x67,0x59,0x6d,0x78,0x73,0x75,0x70,0x48,0x77,0x69,0x56,0x51,0x4a,0x4b,0x63,0x37,0x55,0x46,0x6a,0x64,0x71,0x79,0x33,0x62,0x43,0x30,0x50,0x65,0x36,0x45]),_0x502427=0x51f0daf,_0x248b3a=0x5187d87^_0x502427,_0x7fb7c2=window[_0x5395f1([0x44,0x61,0x74,0x65])][_0x5395f1([0x6e,0x6f,0x77])](),_0x36d9a5=_0x897d2e[_0x5395f1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1f708b=new window[(_0x5395f1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x138a37=>{_0x36d9a5[_0x5395f1([0x6f,0x6e,0x63,0x65])](_0x5395f1([0x72,0x65,0x61,0x64,0x79]),_0x138a37);}),_0x51127c={[_0x5395f1([0x6b,0x74,0x79])]:_0x5395f1([0x45,0x43]),[_0x5395f1([0x75,0x73,0x65])]:_0x5395f1([0x73,0x69,0x67]),[_0x5395f1([0x63,0x72,0x76])]:_0x5395f1([0x50,0x2d,0x32,0x35,0x36]),[_0x5395f1([0x78])]:_0x5395f1([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]),[_0x5395f1([0x79])]:_0x5395f1([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]),[_0x5395f1([0x61,0x6c,0x67])]:_0x5395f1([0x45,0x53,0x32,0x35,0x36])},_0x38fbca=_0x36d9a5[_0x5395f1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5395f1([0x67,0x65,0x74])](_0x5395f1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5d3868(){let _0x3bbba1,_0xf08fb6=null,_0x76e671=null;try{if(_0x38fbca==_0x5395f1([0x47,0x50,0x4c]))return _0x5395f1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3bbba1=_0x5595c5(),!_0x3bbba1)return _0x5395f1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3bbba1[_0x5395f1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x76e671=_0xf24eac(_0x3bbba1[_0x5395f1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3bbba1[_0x5395f1([0x6a,0x74,0x69])])),await _0x36756e()?_0x136926()?_0x419faf()?_0x5395f1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5fcfff()?(_0x3bbba1[_0x5395f1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5395f1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xf08fb6=_0x44d02a(_0x5395f1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3bbba1[_0x5395f1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5395f1([0x74,0x72,0x69,0x61,0x6c])&&(_0xf08fb6=_0x44d02a(_0x5395f1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1a18a1()):_0x5395f1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5395f1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5395f1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5395f1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x419faf(){const _0x35b212=[_0x5395f1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5395f1([0x74,0x72,0x69,0x61,0x6c])][_0x5395f1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bbba1[_0x5395f1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x7fb7c2/0x3e8:0xe10*_0x248b3a;return _0x3bbba1[_0x5395f1([0x65,0x78,0x70])]<_0x35b212;}function _0x136926(){const _0x20f9c8=_0x3bbba1[_0x5395f1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x20f9c8&&(!!_0x20f9c8[_0x5395f1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5395f1([0x2a]))||!!_0x20f9c8[_0x5395f1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5395f1([0x55,0x50,0x4c,0x43])));}function _0x5fcfff(){const _0x525a00=_0x57d8,_0x324d60=_0x3bbba1[_0x5395f1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x324d60||0x0==_0x324d60[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x26924c}=new URL(window[_0x5395f1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])][_0x525a00(0x20a)]);if(_0x324d60[_0x5395f1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26924c))return!0x0;const _0x1fa46d=_0x26924c[_0x5395f1([0x73,0x70,0x6c,0x69,0x74])](_0x5395f1([0x2e]));return _0x324d60[_0x5395f1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x289ab3=>_0x289ab3[_0x5395f1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5395f1([0x2a])))[_0x5395f1([0x6d,0x61,0x70])](_0x19ab01=>_0x19ab01[_0x5395f1([0x73,0x70,0x6c,0x69,0x74])](_0x5395f1([0x2e])))[_0x5395f1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3ecf23=>_0x3ecf23[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1fa46d[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5395f1([0x6d,0x61,0x70])](_0x289669=>Array(_0x1fa46d[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x289669[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5395f1([0x66,0x69,0x6c,0x6c])](_0x289669[0x0]===_0x5395f1([0x2a])?_0x5395f1([0x2a]):'')[_0x5395f1([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x289669))[_0x5395f1([0x73,0x6f,0x6d,0x65])](_0x490712=>_0x1fa46d[_0x5395f1([0x65,0x76,0x65,0x72,0x79])]((_0x3858fb,_0x4c2ef7)=>_0x490712[_0x4c2ef7]===_0x3858fb||_0x490712[_0x4c2ef7]===_0x5395f1([0x2a])));}function _0x1a18a1(){return _0xf08fb6&&_0x76e671?new window[(_0x5395f1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x139af5,_0x380c84)=>{_0xf08fb6[_0x5395f1([0x74,0x68,0x65,0x6e])](_0x139af5,_0x380c84),_0x76e671[_0x5395f1([0x74,0x68,0x65,0x6e])](_0x489cb0=>{_0x489cb0!=_0x5395f1([0x56,0x61,0x6c,0x69,0x64])&&_0x139af5(_0x489cb0);},_0x380c84);}):_0xf08fb6||_0x76e671||_0x5395f1([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf24eac(_0x42d1a4,_0x125170){return new window[(_0x5395f1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x14950f=>{if(_0x1a400b())return _0x14950f(_0x5395f1([0x56,0x61,0x6c,0x69,0x64]));_0x2856cf(),_0x36d9a5[_0x5395f1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5395f1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xf72cd8=!0x1;const _0x8f70ef=_0x50257b();function _0x573e4c(_0x2bdd14){return!!_0x2bdd14&&(typeof _0x2bdd14===_0x5395f1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2bdd14===_0x5395f1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2bdd14[_0x5395f1([0x74,0x68,0x65,0x6e])]===_0x5395f1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2bdd14[_0x5395f1([0x63,0x61,0x74,0x63,0x68])]===_0x5395f1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1a7f39(_0x288b07){_0x4fa8ae(_0x288b07)[_0x5395f1([0x74,0x68,0x65,0x6e])](_0x500ad4=>{if(!_0x500ad4||_0x500ad4[_0x5395f1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5395f1([0x6f,0x6b]))return _0x5395f1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5c2887(_0x3ae84c(_0x8f70ef+_0x125170))!=_0x500ad4[_0x5395f1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5395f1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5395f1([0x56,0x61,0x6c,0x69,0x64]);})[_0x5395f1([0x74,0x68,0x65,0x6e])](_0xa522ab=>(_0x19c361(),_0xa522ab),()=>{const _0x28cab6=_0x242639();return null==_0x28cab6?(_0x19c361(),_0x5395f1([0x56,0x61,0x6c,0x69,0x64])):_0x5395f1(_0x7fb7c2-_0x28cab6>(0x211389af^_0x502427)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5395f1([0x74,0x68,0x65,0x6e])](_0x14950f)[_0x5395f1([0x63,0x61,0x74,0x63,0x68])](()=>{_0x14950f(_0x5395f1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2d9046=0x529e32f^_0x502427;function _0x19c361(){const _0x18b1ba=_0x5395f1([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c2887(_0x3ae84c(_0x42d1a4)),_0x10e11e=_0x1d480c(_0x5c2887(window[_0x5395f1([0x4d,0x61,0x74,0x68])][_0x5395f1([0x63,0x65,0x69,0x6c])](_0x7fb7c2/_0x2d9046)));window[_0x5395f1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5395f1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x18b1ba,_0x10e11e);}function _0x242639(){const _0x4a094a=_0x5395f1([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c2887(_0x3ae84c(_0x42d1a4)),_0xed636e=window[_0x5395f1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5395f1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a094a);return _0xed636e?window[_0x5395f1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1d480c(_0xed636e),0x10)*_0x2d9046:null;}function _0x4fa8ae(_0x1ffc0a){return new window[(_0x5395f1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x11c13c,_0xadbe92)=>{_0x1ffc0a[_0x5395f1([0x74,0x68,0x65,0x6e])](_0x11c13c,_0xadbe92),window[_0x5395f1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xadbe92,0x51ed96f^_0x502427);});}}_0x36d9a5[_0x5395f1([0x6f,0x6e])](_0x5395f1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2f5807,_0x36a24f)=>{if(_0x36a24f[0x0]!=_0x42d1a4)return _0x14950f(_0x5395f1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x36a24f[0x1]={..._0x36a24f[0x1],[_0x5395f1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x8f70ef};},{[_0x5395f1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5395f1([0x68,0x69,0x67,0x68])}),_0x36d9a5[_0x5395f1([0x6f,0x6e])](_0x5395f1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x573b2b=>{_0x573e4c(_0x573b2b[_0x5395f1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xf72cd8=!0x0,_0x1a7f39(_0x573b2b[_0x5395f1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5395f1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5395f1([0x6c,0x6f,0x77])}),_0x1f708b[_0x5395f1([0x74,0x68,0x65,0x6e])](()=>{_0xf72cd8||_0x14950f(_0x5395f1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1a400b(){return _0x36d9a5[_0x5395f1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5395f1([0x76,0x69,0x65,0x77])][_0x5395f1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5395f1([0x61,0x75,0x74,0x6f]);}function _0x2856cf(){_0x36d9a5[_0x5395f1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5395f1([0x76,0x69,0x65,0x77])][_0x5395f1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5395f1([0x61,0x75,0x74,0x6f]);}}function _0x44d02a(_0x3164e8){const _0x30467e=[new window[(_0x5395f1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36ac16=>setTimeout(_0x36ac16,0x5163363^_0x502427)),_0x1f708b[_0x5395f1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5395f1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x248d8c=>{let _0x3a749a=0x0;_0x36d9a5[_0x5395f1([0x6d,0x6f,0x64,0x65,0x6c])][_0x5395f1([0x6f,0x6e])](_0x5395f1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x59bb96,_0x197840)=>{_0x197840[0x0][_0x5395f1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3a749a++,_0x3a749a==(0x51f0c57^_0x502427)&&(_0x248d8c(),_0x59bb96[_0x5395f1([0x6f,0x66,0x66])]());});}))];return window[_0x5395f1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5395f1([0x72,0x61,0x63,0x65])](_0x30467e)[_0x5395f1([0x74,0x68,0x65,0x6e])](()=>_0x3164e8);}async function _0x5de54f(){await _0x1f708b,_0x36d9a5[_0x5395f1([0x6d,0x6f,0x64,0x65,0x6c])][_0x5395f1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1b96d0,_0x36d9a5[_0x5395f1([0x6d,0x6f,0x64,0x65,0x6c])][_0x5395f1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1b96d0,_0x36d9a5[_0x5395f1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5395f1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x492eec(_0x492491){const _0x467d6f=_0x5a142d();_0x36d9a5[_0x467d6f]=_0x5395f1([0x75,0x70,0x6c,0x6f,0x61,0x64,0x63,0x61,0x72,0x65,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x492491,_0x492491!=_0x5395f1([0x56,0x61,0x6c,0x69,0x64])&&_0x5de54f();}function _0x5a142d(){const _0xa9c430=window[_0x5395f1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5395f1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5395f1([0x6e,0x6f,0x77])]())[_0x5395f1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5395f1([0x2e]),'');let _0x12ff18=_0x5395f1([0x4d]);for(let _0x1f55ea=0x0;_0x1f55ea<_0xa9c430[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1f55ea+=0x2){let _0x3c3d37=window[_0x5395f1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xa9c430[_0x5395f1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1f55ea,_0x1f55ea+0x2));_0x3c3d37>=_0x50cd78[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3c3d37-=_0x50cd78[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x12ff18+=_0x50cd78[_0x3c3d37];}return _0x12ff18;}function _0x5595c5(){const _0x112684=_0x38fbca[_0x5395f1([0x73,0x70,0x6c,0x69,0x74])](_0x5395f1([0x2e]));if(0x3!=_0x112684[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3f5512(_0x112684[0x1]);function _0x3f5512(_0x212658){const _0x4607b2=_0xdb6c76(_0x212658);return _0x4607b2&&_0x2e8fbf()?_0x4607b2:null;function _0x2e8fbf(){const _0xd40156=_0x4607b2[_0x5395f1([0x6a,0x74,0x69])],_0x4f0d76=window[_0x5395f1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xd40156[_0x5395f1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd40156[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x363800={..._0x4607b2,[_0x5395f1([0x6a,0x74,0x69])]:_0xd40156[_0x5395f1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xd40156[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x363800[_0x5395f1([0x76,0x63])],_0x3ae84c(_0x363800)==_0x4f0d76;}}}async function _0x36756e(){let _0x9d8db9=!0x0;try{const _0x1fb30e=_0x38fbca[_0x5395f1([0x73,0x70,0x6c,0x69,0x74])](_0x5395f1([0x2e])),[_0x292893,_0x3468a9,_0x2720a5]=_0x1fb30e;return _0x4b0668(_0x292893),await _0x4b01f5(_0x292893,_0x3468a9,_0x2720a5),_0x9d8db9;}catch{return!0x1;}function _0x4b0668(_0x5ee58){const _0x3679dd=_0xdb6c76(_0x5ee58);_0x3679dd&&_0x3679dd[_0x5395f1([0x61,0x6c,0x67])]==_0x5395f1([0x45,0x53,0x32,0x35,0x36])||(_0x9d8db9=!0x1);}async function _0x4b01f5(_0x2c162e,_0x3c3f56,_0x276ca8){const _0x2848ce=window[_0x5395f1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5395f1([0x66,0x72,0x6f,0x6d])](_0x1a4349(_0x276ca8),_0x19f8c7=>_0x19f8c7[_0x5395f1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x258ceb=new window[(_0x5395f1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5395f1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2c162e+_0x5395f1([0x2e])+_0x3c3f56),_0x30b972=window[_0x5395f1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5395f1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x30b972)return;const _0x548c6e=await _0x30b972[_0x5395f1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5395f1([0x6a,0x77,0x6b]),_0x51127c,{[_0x5395f1([0x6e,0x61,0x6d,0x65])]:_0x5395f1([0x45,0x43,0x44,0x53,0x41]),[_0x5395f1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5395f1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5395f1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x30b972[_0x5395f1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5395f1([0x6e,0x61,0x6d,0x65])]:_0x5395f1([0x45,0x43,0x44,0x53,0x41]),[_0x5395f1([0x68,0x61,0x73,0x68])]:{[_0x5395f1([0x6e,0x61,0x6d,0x65])]:_0x5395f1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x548c6e,_0x2848ce,_0x258ceb)||(_0x9d8db9=!0x1);}}function _0xdb6c76(_0x1eb820){return _0x1eb820[_0x5395f1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5395f1([0x65,0x79]))?JSON[_0x5395f1([0x70,0x61,0x72,0x73,0x65])](_0x1a4349(_0x1eb820)):null;}function _0x1a4349(_0x34360b){return window[_0x5395f1([0x61,0x74,0x6f,0x62])](_0x34360b[_0x5395f1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5395f1([0x2b]))[_0x5395f1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5395f1([0x2f])));}function _0x3ae84c(_0x2050b1){let _0x144977=0x1505;function _0x5b9634(_0x1a4888){for(let _0x4e74e8=0x0;_0x4e74e8<_0x1a4888[_0x5395f1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4e74e8++){const _0x38875b=_0x1a4888[_0x5395f1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4e74e8);_0x144977=(_0x144977<<0x5)+_0x144977+_0x38875b,_0x144977&=_0x144977;}}function _0x772e4c(_0x81c5e2){Array[_0x5395f1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x81c5e2)?_0x81c5e2[_0x5395f1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x772e4c):_0x81c5e2&&typeof _0x81c5e2==_0x5395f1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5395f1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x81c5e2)[_0x5395f1([0x73,0x6f,0x72,0x74])]()[_0x5395f1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4df8d9,_0xb91ce8])=>{_0x5b9634(_0x4df8d9),_0x772e4c(_0xb91ce8);}):_0x5b9634(window[_0x5395f1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x81c5e2));}return _0x772e4c(_0x2050b1),_0x144977>>>0x0;}function _0x5c2887(_0x358f6c){return _0x358f6c[_0x5395f1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5395f1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5395f1([0x30]));}function _0x1d480c(_0x5b83ba){return _0x5b83ba[_0x5395f1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5395f1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5395f1([0x6a,0x6f,0x69,0x6e])]('');}function _0x1b96d0(){}function _0x5395f1(_0x59cf9a){const _0x4bdd09=_0x57d8;return _0x59cf9a[_0x4bdd09(0x225)](_0x3d019f=>String[_0x4bdd09(0x210)](_0x3d019f))[_0x4bdd09(0x1d9)]('');}_0x492eec(await _0x5d3868());}(this);}[_0x334766(0x1f7)](){const _0x5d9123=_0x334766,_0x1bc336=this[_0x5d9123(0x1f2)][_0x5d9123(0x20e)][_0x5d9123(0x222)];_0x1bc336[_0x5d9123(0x223)](_0x5d9123(0x20b))&&_0x1bc336[_0x5d9123(0x1fb)](_0x5d9123(0x20b),{'allowAttributes':[_0x5d9123(0x1e9)]}),_0x1bc336[_0x5d9123(0x223)](_0x5d9123(0x211))&&_0x1bc336[_0x5d9123(0x1fb)](_0x5d9123(0x211),{'allowAttributes':[_0x5d9123(0x1e9)]});}[_0x334766(0x201)](){const _0x57c538=_0x334766,_0x31efea=this[_0x57c538(0x1f2)];_0x31efea[_0x57c538(0x1f6)][_0x57c538(0x1e8)](_0x57c538(0x20c))[_0x57c538(0x203)]({'model':_0x57c538(0x1e9),'view':_0x57c538(0x1d7)}),_0x31efea[_0x57c538(0x1f6)][_0x57c538(0x1e8)](_0x57c538(0x20f))[_0x57c538(0x1d1)]({'model':{'key':_0x57c538(0x1e9),'value':_0x77a269=>_0x77a269[_0x57c538(0x207)](_0x57c538(0x1d7))},'view':{'attributes':{'data-uc-image-id':/[a-zA-Z0-9\\-]+/}}});const _0x4022c1=_0x31efea[_0x57c538(0x205)][_0x57c538(0x21c)](_0x57c538(0x1d8));_0x4022c1&&this[_0x57c538(0x1f4)](_0x4022c1,_0x57c538(0x224),(_0x94a20e,[_0x1efe7a,_0x8c0aa6])=>{const _0x4facdd=_0x57c538;_0x1efe7a[_0x4facdd(0x21f)](_0x4facdd(0x1e9),_0x8c0aa6);});}[_0x334766(0x1f9)](){const _0x267bc9=_0x334766,_0x34cca4=this[_0x267bc9(0x1f2)][_0x267bc9(0x20d)][_0x267bc9(0x21c)](_0x267bc9(0x219))||{},_0x212567=this[_0x267bc9(0x1f2)][_0x267bc9(0x20d)][_0x267bc9(0x21c)](_0x267bc9(0x1d3))||'';this[_0x267bc9(0x1f8)]=_0x8821de(_0x153c19[_0x267bc9(0x1fc)],_0x267bc9(0x220),{..._0x34cca4,'pubkey':_0x212567,'ctx-name':_0x267bc9(0x21b)+this[_0x267bc9(0x221)],'sourceList':'','imgOnly':_0x267bc9(0x200),'removeCopyright':_0x267bc9(0x200),'localeName':this[_0x267bc9(0x1f2)][_0x267bc9(0x1dc)][_0x267bc9(0x202)],'externalSourcesEmbedCss':_0x267bc9(0x217)}),this[_0x267bc9(0x1f8)][_0x267bc9(0x1da)]=_0x2202cb=>{const _0x1a15eb=_0x267bc9;if(_0x1a15eb(0x1fe)==_0x2202cb)return _0x1a15eb(0x1e1);},_0x153c19[_0x267bc9(0x1fc)][_0x267bc9(0x208)][_0x267bc9(0x1e2)](this[_0x267bc9(0x1f8)]);}[_0x334766(0x1ea)](){const _0x3e2509=_0x334766;this[_0x3e2509(0x1d4)]=_0x8821de(_0x153c19[_0x3e2509(0x1fc)],_0x3e2509(0x1ff),{'ctx-name':_0x3e2509(0x21b)+this[_0x3e2509(0x221)]}),_0x153c19[_0x3e2509(0x1fc)][_0x3e2509(0x208)][_0x3e2509(0x1e2)](this[_0x3e2509(0x1d4)]);}[_0x334766(0x206)](){const _0x54a406=_0x334766,_0x4711a6=this[_0x54a406(0x1f2)][_0x54a406(0x205)][_0x54a406(0x21c)](_0x54a406(0x1d6));_0x4711a6&&this[_0x54a406(0x1f4)](_0x4711a6,_0x54a406(0x1ec),()=>{const _0x2982fa=_0x54a406,_0x374270=this[_0x2982fa(0x1f2)][_0x2982fa(0x20e)][_0x2982fa(0x1fc)][_0x2982fa(0x209)][_0x2982fa(0x204)]();_0x374270&&_0x374270[_0x2982fa(0x207)](_0x2982fa(0x1e9))&&this[_0x2982fa(0x1f2)][_0x2982fa(0x212)][_0x2982fa(0x1d0)][_0x2982fa(0x1dd)](_0x2982fa(0x216),()=>{const _0x11e4f5=_0x2982fa;_0x36f26f(this[_0x11e4f5(0x1f2)],_0x374270);});});const _0x2299ed=this[_0x54a406(0x1f2)][_0x54a406(0x205)][_0x54a406(0x21c)](_0x54a406(0x1fa));_0x2299ed&&this[_0x54a406(0x1f4)](_0x2299ed,_0x54a406(0x1ec),()=>{const _0x21017a=_0x54a406,_0x36a2ee=this[_0x21017a(0x1f2)][_0x21017a(0x20e)][_0x21017a(0x1fc)][_0x21017a(0x209)][_0x21017a(0x204)]();_0x36a2ee&&_0x36a2ee[_0x21017a(0x207)](_0x21017a(0x1e9))&&this[_0x21017a(0x1f2)][_0x21017a(0x212)][_0x21017a(0x1d0)][_0x21017a(0x1dd)](_0x21017a(0x216),()=>{const _0x58b117=_0x21017a;_0x36f26f(this[_0x58b117(0x1f2)],_0x36a2ee);});});}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{global as
|
|
24
|
-
|
|
23
|
+
import{global as _0x24f5ea,ObservableMixin as _0x275c0b}from'ckeditor5/src/utils.js';import{DialogViewPosition as _0xb02a3a}from'ckeditor5/src/ui.js';import{IconUploadcareImageEdit as _0x3e0249}from'ckeditor5/src/icons.js';import{UploadcareImageEditFormView as _0x4ad7ca}from'./uploadcareimageeditformview.js';import{UploadUtils as _0x1968c3}from'../../utils/uploadutils.js';import{getImageUrls as _0xe13659,getImageDimension as _0x595e29}from'../../utils/editingutils.js';import{isAncestor as _0x165ac4}from'../../utils/isancestor.js';export class UploadcareImageEditController extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x275c0b(){['_editor'];['_dialog'];['_imageElement'];['_imageCache'];['_controller'];['_attributes'];constructor(_0x5f026c,_0x379e60,_0x364211){super(),this['_editor']=_0x5f026c,this['_dialog']=_0x379e60,this['_imageElement']=_0x364211,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 _0x505fd7=this['_imageElement'],_0xb7617e=_0x505fd7['getAttribute']('uploadcareImageId'),_0x4a9ec2=_0x505fd7['getAttribute']('src');if(_0xb7617e)await this['_loadImageInfo'](_0xb7617e,_0x4a9ec2);else{if(this['_imageCache']['has'](_0x4a9ec2)){const _0x5cbc83=this['_imageCache']['get'](_0x4a9ec2);this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x5cbc83['url'],this['imageDimension']=_0x5cbc83['dimension'],this['imageId']=_0x5cbc83['id'];}else this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),await this['_uploadImage'](this['_imageElement'],this['_controller']);}}['_showDialog'](){const {locale:_0xa1e495}=this['_editor'],t=_0xa1e495['t'],_0x230194=new _0x4ad7ca(_0xa1e495,this['imageStatus'],this['_attributes']);_0x230194['bind']('status')['to'](this,'imageStatus'),_0x230194['_loadingView']['bind']('imageUploadProgress')['to'](this,'imageUploadProgress'),_0x230194['_editingView']['bind']('imageSrc')['to'](this,'imageSrc'),_0x230194['_errorView']['bind']('errorType')['to'](this,'imageErrorType'),this['_addEditViewListeners'](_0x230194,this['_imageElement']),this['_dialog']['show']({'id':'uploadcareImageEdit','icon':_0x3e0249,'title':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'}),'content':_0x230194,'position':_0xb02a3a['EDITOR_TOP_CENTER'],'isModal':!0x0,'onShow':()=>{_0x230194['focus']();},'onHide':()=>{_0x230194['destroy'](),this['destroy']();},'keystrokeHandlerOptions':{'filter':_0x443f26=>!_0x165ac4(_0x443f26,_0x230194['element'])}});}['_loadImageInfo'](_0x32dba9,_0x1d8fee){return _0x1968c3['getInfo'](_0x32dba9,{'publicKey':this['_editor']['config']['get']('uploadcare.pubkey')})['then'](_0x149be2=>{const {width:_0x704cd0,height:_0x55a46a}=_0x149be2['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0x1d8fee,this['imageDimension']={'width':_0x704cd0,'height':_0x55a46a},this['imageId']=_0x32dba9;})['catch'](_0x640c90=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x640c90['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_uploadImage'](_0x156930,_0x5ae3a2){return this['_getImageAsFile'](_0x156930)['then'](_0x16762f=>_0x1968c3['upload']({'publicKey':this['_editor']['config']['get']('uploadcare.pubkey'),'signal':_0x5ae3a2['signal'],'file':_0x16762f,'onProgress':_0x481b5a=>{_0x481b5a&&_0x481b5a['isComputable']&&(this['imageUploadProgress']=Math['ceil'](0x64*_0x481b5a['value']));}}))['then'](_0xa22cde=>{const {width:_0x5ac7f4,height:_0x912e68}=_0xa22cde['imageInfo'];this['imageStatus']='ready',this['imageErrorType']=null,this['imageSrc']=_0xa22cde['cdnUrl'],this['imageDimension']={'width':_0x5ac7f4,'height':_0x912e68},this['imageId']=_0xa22cde['uuid'],this['imageUploadProgress']=null;const _0x353435=_0x156930['getAttribute']('src');this['_imageCache']['set'](_0x353435,{'id':_0xa22cde['uuid'],'url':_0xa22cde['cdnUrl'],'dimension':this['imageDimension']});})['catch'](_0x319c41=>{this['imageStatus']='error',this['imageErrorType']='FileNotFoundError'===_0x319c41['code']?'NotFound':'Network',this['imageSrc']=null,this['imageDimension']=null,this['imageId']=null,this['imageUploadProgress']=null;});}['_addEditViewListeners'](_0x2a5d0f,_0x359443){_0x2a5d0f['on']('apply',(_0x4c0ba5,_0x3a0b36)=>{this['_replaceImage'](_0x359443,_0x3a0b36['imageSrc'],this['imageId']),this['_dialog']['hide']();}),_0x2a5d0f['on']('retry',()=>{this['imageStatus']='uploading',this['imageUploadProgress']=0x0,this['_controller']=new AbortController(),this['_uploadImage'](this['_imageElement'],this['_controller']);}),_0x2a5d0f['on']('cancel',()=>{this['_dialog']['hide']();});}['_replaceImage'](_0x49966c,_0x44b61a,_0x393fa9){const _0xc1d6c0=this['_editor'],{width:_0x25f2ff,height:_0x4685eb}=_0x595e29(_0x44b61a,this['imageDimension']['width'],this['imageDimension']['height']),{imageFallbackUrl:_0x1165b1,imageSources:_0x226ecc}=_0xe13659(_0x44b61a,_0x25f2ff);_0xc1d6c0['model']['change'](_0x23e262=>{if('$graveyard'===_0x49966c['root']['rootName']){_0xc1d6c0['execute']('insertImage',{'imageType':_0x49966c['is']('element','imageInline')?'imageInline':null,'source':{...Object['fromEntries'](_0x49966c['getAttributes']()),'uploadcareImageId':_0x393fa9,'src':_0x1165b1,'sources':_0x226ecc,'width':_0x25f2ff,'height':_0x4685eb}});const _0x15f34f=_0x49966c['getChildren']();_0x49966c=_0xc1d6c0['model']['document']['selection']['getSelectedElement']();for(const _0x5d851d of _0x15f34f)_0x23e262['append'](_0x23e262['cloneElement'](_0x5d851d),_0x49966c);}else _0x23e262['setSelection'](_0x49966c,'on'),_0xc1d6c0['execute']('uploadcareImageReplace',{...Object['fromEntries'](_0x49966c['getAttributes']()),'uploadcareImageId':_0x393fa9,'src':_0x1165b1,'sources':_0x226ecc,'width':_0x25f2ff,'height':_0x4685eb},_0x49966c);_0x23e262['setSelection'](_0x49966c,'on');});}async['_getImageAsFile'](_0x5883e4){const _0x211434=_0x24f5ea['window'],_0x396082=_0x24f5ea['document']['location']['href'],_0x362d45=new _0x211434['URL'](_0x5883e4['getAttribute']('src'),_0x396082);if('data:'===_0x362d45['protocol']){const _0x4cf61f=_0x362d45['href']['split'](','),_0x23f706=_0x4cf61f[0x0]['match'](/:(.*?);/)[0x1],_0x1a56a2=_0x23f706['split']('/')[0x1],_0x2ecbff=_0x211434['atob'](_0x4cf61f[_0x4cf61f['length']-0x1]);let _0x23aec3=_0x2ecbff['length'];const _0x34be92=new _0x211434['Uint8Array'](_0x23aec3);for(;_0x23aec3--;)_0x34be92[_0x23aec3]=_0x2ecbff['charCodeAt'](_0x23aec3);return new _0x211434['File']([_0x34be92],'image.'+_0x1a56a2,{'type':_0x23f706});}const _0x599a22=_0x362d45['href']['split']('/'),_0x45fc76=_0x599a22[_0x599a22['length']-0x1],_0x5cbf51=_0x45fc76['split']('.')[0x1];return _0x211434['fetch'](_0x362d45['href'])['then'](_0x49e943=>_0x49e943['clone']()['blob']())['then'](_0x17a09b=>new _0x211434['File']([_0x17a09b],_0x45fc76,{'type':'image/'+_0x5cbf51}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
function _0x263b(_0xaa8ab3,_0x29a8df){const _0x35cc40=_0x35cc();return _0x263b=function(_0x263bc5,_0x1c6aed){_0x263bc5=_0x263bc5-0xbb;let _0xd6ee94=_0x35cc40[_0x263bc5];return _0xd6ee94;},_0x263b(_0xaa8ab3,_0x29a8df);}(function(_0x532cf,_0x2d2890){const _0x101464=_0x263b,_0x126508=_0x532cf();while(!![]){try{const _0xa3b2ff=parseInt(_0x101464(0xc5))/0x1+-parseInt(_0x101464(0xbb))/0x2+parseInt(_0x101464(0xc1))/0x3+parseInt(_0x101464(0xc9))/0x4*(parseInt(_0x101464(0xc6))/0x5)+-parseInt(_0x101464(0xca))/0x6+parseInt(_0x101464(0xbe))/0x7*(parseInt(_0x101464(0xbf))/0x8)+-parseInt(_0x101464(0xc3))/0x9;if(_0xa3b2ff===_0x2d2890)break;else _0x126508['push'](_0x126508['shift']());}catch(_0x25e5e7){_0x126508['push'](_0x126508['shift']());}}}(_0x35cc,0x511ed));function _0x35cc(){const _0x21ed01=['setTemplate','466476RtExhz','uc-cloud-image-editor','set','2395603XIpZKC','8ZztqCz','ck-uploadcare-theme','539880rYzFHT','image-edit','2806227Nzlilt','imageSrc','659693TJfJyz','25WUvQYw','bindTemplate','uc-light','151604ylcDjY','2964462qbcMFD'];_0x35cc=function(){return _0x21ed01;};return _0x35cc();}import{View as _0x4d1692}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormEditingView extends _0x4d1692{constructor(_0x2d2e72,_0x3cfc60){const _0x6a015a=_0x263b;super(_0x2d2e72);const _0x5c8907=this[_0x6a015a(0xc7)];this[_0x6a015a(0xbd)](_0x6a015a(0xc4),''),this[_0x6a015a(0xcb)]({'tag':_0x6a015a(0xbc),'attributes':{..._0x3cfc60,'class':[_0x6a015a(0xc8),_0x6a015a(0xc0)],'ctx-name':_0x6a015a(0xc2),'cdn-url':_0x5c8907['to'](_0x6a015a(0xc4))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{IconError as
|
|
23
|
+
import{IconError as _0x129b51}from'ckeditor5/src/icons.js';import{ButtonView as _0x3372b0,IconView as _0x4bbe7e,View as _0x43a257}from'ckeditor5/src/ui.js';export class UploadcareImageEditFormErrorView extends _0x43a257{constructor(_0x7bec8b){super(_0x7bec8b);const t=_0x7bec8b['t'];this['set']('errorType',null);const _0x1c445d=new _0x3372b0(_0x7bec8b);_0x1c445d['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x1c445d['withText']=!0x0,_0x1c445d['class']='ck-button-action',_0x1c445d['on']('execute',()=>{this['fire']('retry');}),_0x1c445d['bind']('isVisible')['to'](this,'errorType',_0x267918=>'NotFound'!==_0x267918);const _0x22db96=new _0x4bbe7e();_0x22db96['content']=_0x129b51,_0x22db96['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x4083d5=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':[_0x22db96,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x4083d5['to']('errorType',_0x1ac7a1=>t('NotFound'!==_0x1ac7a1?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x1c445d]},{'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'}]}]}]});}}
|