UNPKG

@ckeditor/ckeditor5-ai

Version:

AI Assistant feature for CKEditor 5.

23 lines • 21.3 kB
/* * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. * * * * * +---------------------------------------------------------------------------------+ * | | * | Hello stranger! | * | | * | | * | What you're currently looking at is the source code of a legally protected, | * | proprietary software. Any attempts to deobfuscate / disassemble this code | * | are forbidden and will result in legal consequences. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x59bb7e=_0xd6a0;(function(_0x36a48d,_0x4bb242){const _0xa778eb=_0xd6a0,_0xdf095d=_0x36a48d();while(!![]){try{const _0x49a049=-parseInt(_0xa778eb(0x280))/0x1+parseInt(_0xa778eb(0x216))/0x2*(-parseInt(_0xa778eb(0x257))/0x3)+parseInt(_0xa778eb(0x1fd))/0x4+-parseInt(_0xa778eb(0x250))/0x5*(parseInt(_0xa778eb(0x23e))/0x6)+-parseInt(_0xa778eb(0x1e3))/0x7+-parseInt(_0xa778eb(0x25f))/0x8+parseInt(_0xa778eb(0x252))/0x9;if(_0x49a049===_0x4bb242)break;else _0xdf095d['push'](_0xdf095d['shift']());}catch(_0x22c140){_0xdf095d['push'](_0xdf095d['shift']());}}}(_0x1916,0x3d885));import{Plugin as _0x4f6102}from'ckeditor5/src/core.js';import{IconMagicWand as _0x13b9db,IconRobotPencil as _0x5196e1}from'ckeditor5/src/icons.js';import{first as _0x3b1d31,CKEditorError as _0x338621}from'ckeditor5/src/utils.js';import{createDropdown as _0x5f3d58,addMenuToDropdown as _0x477376,ButtonView as _0x37bac4,MenuBarMenuListItemButtonView as _0x3ecfa8,Dialog as _0x283f7a,DialogViewPosition as _0x115db1,MenuBarMenuView as _0xf5e03,MenuBarMenuListView as _0x465bea,MenuBarMenuListItemView as _0x39cebf}from'ckeditor5/src/ui.js';import{normalizeCommandsConfig as _0x32bbff,UNGROUPED_COMMANDS_GROUP_ID as _0x421b30}from'./utils/normalizecommandsconfig.js';import{AIAssistantEditing as _0x48e185}from'./aiassistantediting.js';import{AIAdapter as _0x5eb955}from'./adapters/aiadapter.js';import{getTranslation as _0x4abfa4}from'./utils/common-translations.js';import{ShowAIAssistantCommand as _0x2b1108}from'./ui/showaiassistantcommand.js';import{AIAssistantController as _0x3f6b9f}from'./ui/aiassistantcontroller.js';import{AIFormView as _0x506ce3}from'./ui/form/aiformview.js';import{AIFormToolbarViewMainActionLabel as _0x2a79ef}from'./ui/form/aiformtoolbarview.js';import'../theme/ai.css';import'../theme/ai-dropdown.css';function _0xd6a0(_0xfb9320,_0xf8db94){const _0x19163a=_0x1916();return _0xd6a0=function(_0xd6a055,_0xa888fd){_0xd6a055=_0xd6a055-0x1dd;let _0x5f05f9=_0x19163a[_0xd6a055];return _0x5f05f9;},_0xd6a0(_0xfb9320,_0xf8db94);}import'../theme/ai-form.css';const l=globalThis[_0x59bb7e(0x23d)];import{ClipboardMarkersUtils as _0x5d17b0}from'ckeditor5/src/clipboard.js';import{ViewDocumentDomEventData as _0x1c3f6a,ViewDataTransfer as _0x4c7e42}from'ckeditor5/src/engine.js';function _0x1916(){const _0x115555=['invalid','licenseKey','push','hideFakeVisualSelection','fire','AI\x20Commands','menuBar:aiCommands','AIAssistantUI','getLimitElement','init','rawHtml','command:','aiAssistant','text','826959LIasZw','_getResolvedCommandsDefinitions','_forceMarkersCopy','ck-ai-commands-dropdown\x20','_initAriaAiStatusChangeAnnouncements','AI\x20is\x20writing','requires','focus','_aiAssistantController','body','getData','reset','destroy','_getMenuBarGroupButtons','execute','selection','get','define','menuPanelClass','replace','usageLimit','</p>','show','prompt','change:value','enabledCommandsIds','1437860JQiaDk','ai.aiAssistant.disabledElements','document','aiLicenseKeyInvalid','replaceContent','schema','polite','aiLicenseKeyValid','wasMoved','trialLimit','ai-commands-config-order-collision','change:isProcessing','textAdapter','groupLabel','delegate','_createAIAssistantUIButton','menuView','<p>','AI\x20Assistant','isEnabled','isFlat','listenTo','comment','ck-ai-assistant-button\x20','getRanges','52922hHQxJA','INSERT','update','getSelectedElement','featureNotAllowed','Error\x20during\x20AI\x20content\x20generation:\x20%0','queryView','ai.useTheme','source','menuitemcheckbox','hideUI','aiLicenseKeyTrialLimit','plugins','_aiAdapter','\x20ck-ai-assistant-ui_theme','fieldView','_initView','buttonView','showAIAssistant','promptView','isPremiumPlugin','set','buttons','copy','from','_dialog','insertContent','model','currentContext','expired','domainLimit','aiCommands','change:enabledCommandsIds','evaluationLimit','bind','requiresContent','order','map','hide','DataTransfer','2241678MPGSVz','trim','_licenseKeyCheckInterval','render','aiLicenseKeyEvaluationLimit','tableOfContents','editing','aiLicenseKeyNotAllowed','AIAssistant','EDITOR_TOP_SIDE','ai.aiAssistant.commands','panelView','items','ck-ai-assistant-ui','length','custom','_commandDefinitions','includes','5miipGm','aiLicenseKeyUsageLimit','9827937SpgXEM','insertContentBelow','Generated\x20content:\x20%0','showUI','label','15FpCPzb','isOfficialPlugin','componentFactory','change:isError','setSelection','announce','_showLicenseError','groupId','3632296zCtrJQ','change','children','REPLACE','errorView','_uiCssClasses','_populateMenuBarMenu','splice','text/html','showFakeVisualSelection','add','commands','isCollapsed','once','_onExecute','getSelectedBlocks','aiLicenseKeyExpired','locale','values','updateView','contentArea','editor','ai.aiAssistant.contentAreaCssClass','aiLicenseKeyDomainLimit','config','updatePosition','pluginName','addMany','view','sort','_formView','media','forEach','121329tlwAkh','menuBar:aiAssistant','filter','isOn'];_0x1916=function(){return _0x115555;};return _0x1916();}export class AIAssistantUI extends _0x4f6102{[_0x59bb7e(0x285)];[_0x59bb7e(0x240)];[_0x59bb7e(0x22f)];[_0x59bb7e(0x27d)];[_0x59bb7e(0x223)];[_0x59bb7e(0x1eb)];[_0x59bb7e(0x264)]='';static get[_0x59bb7e(0x279)](){const _0x187511=_0x59bb7e;return _0x187511(0x28b);}static get[_0x59bb7e(0x258)](){return!0x0;}static get[_0x59bb7e(0x22a)](){return!0x0;}static get[_0x59bb7e(0x1e9)](){return[_0x5d17b0,_0x48e185,_0x5eb955,_0x283f7a];}constructor(_0x42ef78){const _0x41fe62=_0x59bb7e;super(_0x42ef78),_0x42ef78[_0x41fe62(0x277)][_0x41fe62(0x1f4)](_0x41fe62(0x1fe),[_0x41fe62(0x27e),_0x41fe62(0x1df),_0x41fe62(0x243)]),_0x42ef78[_0x41fe62(0x277)][_0x41fe62(0x1f4)](_0x41fe62(0x275),''),_0x42ef78[_0x41fe62(0x277)][_0x41fe62(0x1f4)](_0x41fe62(0x21d),!0x0),this[_0x41fe62(0x264)]=_0x41fe62(0x24b)+(_0x42ef78[_0x41fe62(0x277)][_0x41fe62(0x1f3)](_0x41fe62(0x21d))?_0x41fe62(0x224):'');}[_0x59bb7e(0x1de)](){const _0x12787e=_0x59bb7e,{editor:_0x38cd4a}=this;this[_0x12787e(0x223)]=_0x38cd4a[_0x12787e(0x222)][_0x12787e(0x1f3)](_0x5eb955),this[_0x12787e(0x22f)]=_0x38cd4a[_0x12787e(0x222)][_0x12787e(0x1f3)](_0x283f7a),this[_0x12787e(0x27d)]=null,this[_0x12787e(0x24e)]=this[_0x12787e(0x1e4)]();const _0x3b1b6d=new _0x2b1108(_0x38cd4a,Array[_0x12787e(0x22e)](this[_0x12787e(0x24e)][_0x12787e(0x271)]()));_0x38cd4a[_0x12787e(0x26a)][_0x12787e(0x269)](_0x12787e(0x228),_0x3b1b6d),_0x38cd4a['ui'][_0x12787e(0x259)][_0x12787e(0x269)](_0x12787e(0x235),_0x29e6ca=>{const _0x229acc=_0x12787e,_0x15f5bf=_0x5f3d58(_0x29e6ca);return _0x15f5bf[_0x229acc(0x22b)]({'class':_0x229acc(0x1e6)+this[_0x229acc(0x264)]}),_0x15f5bf[_0x229acc(0x227)][_0x229acc(0x22b)]({'label':_0x4abfa4(_0x29e6ca,_0x229acc(0x289)),'icon':_0x13b9db,'tooltip':!0x0}),_0x15f5bf['on'](_0x229acc(0x1f1),_0x1afd17=>this[_0x229acc(0x26d)](_0x1afd17[_0x229acc(0x21e)]['id'])),_0x477376(_0x15f5bf,_0x38cd4a['ui'][_0x229acc(0x27b)][_0x229acc(0x1ec)],function(_0x43c286){const _0x5cd132=_0x229acc,_0xc8c6a9=_0x32bbff(_0x43c286[_0x5cd132(0x277)][_0x5cd132(0x1f3)](_0x5cd132(0x248)),_0x43c286[_0x5cd132(0x270)]),_0x3edb32=U(_0x43c286,_0xc8c6a9)[_0x5cd132(0x282)](_0x55c54c=>_0x55c54c[_0x5cd132(0x26a)][_0x5cd132(0x24c)]);if(0x1===_0x3edb32[_0x5cd132(0x24c)])return U(_0x43c286,_0x3edb32[0x0][_0x5cd132(0x26a)])[_0x5cd132(0x23b)](_0x376da9=>({'id':_0x376da9['id'],'label':_0x376da9[_0x5cd132(0x256)]}));return _0x3edb32[_0x5cd132(0x23b)](_0x5d8d1f=>{const _0x967af2=_0x5cd132,{groupId:_0x2d9336,groupLabel:_0xa12c16,commands:_0x5ac773}=_0x5d8d1f,_0x2ced7d=U(_0x43c286,_0x5ac773)[_0x967af2(0x23b)](_0x4fb870=>({'id':_0x4fb870['id'],'label':_0x4fb870[_0x967af2(0x256)]}));return{'id':_0x2d9336,'menu':_0xa12c16||_0x2d9336,'children':_0x2ced7d};});}(_0x38cd4a),{'ariaLabel':_0x4abfa4(_0x29e6ca,_0x229acc(0x289))}),_0x15f5bf[_0x229acc(0x20d)][_0x229acc(0x1f5)]=_0x229acc(0x1e6)+this[_0x229acc(0x264)],_0x3b1b6d['on'](_0x229acc(0x236),_0x3597d7),_0x15f5bf[_0x229acc(0x20d)][_0x229acc(0x26c)](_0x229acc(0x241),_0x3597d7),_0x15f5bf;function _0x3597d7(){const _0x272943=_0x229acc;_0x15f5bf[_0x272943(0x210)]=_0x3b1b6d[_0x272943(0x1fc)][_0x272943(0x24c)]>0x0;for(const _0x11bb00 of _0x15f5bf[_0x272943(0x20d)][_0x272943(0x22c)])_0x11bb00[_0x272943(0x210)]=_0x3b1b6d[_0x272943(0x1fc)][_0x272943(0x24f)](_0x11bb00['id']);}}),_0x38cd4a['ui'][_0x12787e(0x259)][_0x12787e(0x269)](_0x12787e(0x28a),_0x94e0f8=>{const _0x14b645=_0x12787e,_0x377a2d=new _0xf5e03(_0x94e0f8);_0x377a2d[_0x14b645(0x227)][_0x14b645(0x22b)]({'label':_0x4abfa4(_0x94e0f8,_0x14b645(0x289)),'icon':_0x13b9db}),_0x377a2d[_0x14b645(0x238)](_0x14b645(0x210))['to'](_0x3b1b6d,_0x14b645(0x1fc),_0x1eced8=>_0x1eced8[_0x14b645(0x24c)]>0x0);const _0x8a13be=_0x32bbff(_0x38cd4a[_0x14b645(0x277)][_0x14b645(0x1f3)](_0x14b645(0x248)),_0x94e0f8);return this[_0x14b645(0x265)](_0x3b1b6d,_0x377a2d,_0x8a13be,_0x4b91d7=>this[_0x14b645(0x26d)](_0x4b91d7)),_0x377a2d;}),_0x38cd4a['ui'][_0x12787e(0x259)][_0x12787e(0x269)](_0x12787e(0x1e1),()=>{const _0x2186a6=_0x12787e,_0x4a11f1=this[_0x2186a6(0x20c)](_0x37bac4);return _0x4a11f1[_0x2186a6(0x22b)]({'tooltip':!0x0,'class':_0x2186a6(0x214)+this[_0x2186a6(0x264)]}),_0x4a11f1;}),_0x38cd4a['ui'][_0x12787e(0x259)][_0x12787e(0x269)](_0x12787e(0x281),()=>{const _0x17c607=_0x12787e,_0x1ad2ea=this[_0x17c607(0x20c)](_0x3ecfa8);return _0x1ad2ea[_0x17c607(0x22b)]({'role':_0x17c607(0x21f)}),_0x1ad2ea;}),this[_0x12787e(0x285)]=this[_0x12787e(0x274)][_0x12787e(0x277)][_0x12787e(0x1f3)](_0x12787e(0x285));const _0x5af9b2=this[_0x12787e(0x274)];this[_0x12787e(0x240)]=setInterval(()=>{const _0x4ac75f=_0x12787e;let _0x5b88c5;for(const _0xb0ba77 in _0x5af9b2){const _0x54dd7d=_0xb0ba77,_0x1a21a6=_0x5af9b2[_0x54dd7d];if(_0x4ac75f(0x204)==_0x1a21a6||_0x4ac75f(0x200)==_0x1a21a6||_0x4ac75f(0x26f)==_0x1a21a6||_0x4ac75f(0x276)==_0x1a21a6||_0x4ac75f(0x245)==_0x1a21a6||_0x4ac75f(0x242)==_0x1a21a6||_0x4ac75f(0x221)==_0x1a21a6||_0x4ac75f(0x251)==_0x1a21a6){delete _0x5af9b2[_0x54dd7d],_0x5b88c5=_0x1a21a6,clearInterval(this[_0x4ac75f(0x240)]),this[_0x4ac75f(0x240)]=void 0x0;break;}}_0x4ac75f(0x200)==_0x5b88c5&&_0x5af9b2[_0x4ac75f(0x25d)](_0x4ac75f(0x284)),_0x4ac75f(0x26f)==_0x5b88c5&&_0x5af9b2[_0x4ac75f(0x25d)](_0x4ac75f(0x233)),_0x4ac75f(0x276)==_0x5b88c5&&_0x5af9b2[_0x4ac75f(0x25d)](_0x4ac75f(0x234)),_0x4ac75f(0x245)==_0x5b88c5&&_0x5af9b2[_0x4ac75f(0x25d)](_0x4ac75f(0x21a),_0x4ac75f(0x246)),_0x4ac75f(0x242)==_0x5b88c5&&_0x5af9b2[_0x4ac75f(0x25d)](_0x4ac75f(0x237)),_0x4ac75f(0x221)==_0x5b88c5&&_0x5af9b2[_0x4ac75f(0x25d)](_0x4ac75f(0x206)),_0x4ac75f(0x251)==_0x5b88c5&&_0x5af9b2[_0x4ac75f(0x25d)](_0x4ac75f(0x1f7));},0x3e8);}[_0x59bb7e(0x1ef)](){const _0x3ace1f=_0x59bb7e;super[_0x3ace1f(0x1ef)](),this[_0x3ace1f(0x240)]&&clearInterval(this[_0x3ace1f(0x240)]);}[_0x59bb7e(0x255)](_0x384313='',_0x3cef45='',_0x287a8f=_0x59bb7e(0x24d)){const _0x1fb89c=_0x59bb7e,_0x5d38fe=this[_0x1fb89c(0x274)],_0x4fb489=_0x5d38fe[_0x1fb89c(0x244)][_0x1fb89c(0x27b)],_0x3e4a7d=_0x5d38fe[_0x1fb89c(0x222)][_0x1fb89c(0x1f3)](_0x48e185),_0x315362=_0x5d38fe[_0x1fb89c(0x222)][_0x1fb89c(0x1f3)](_0x5d17b0);_0x3e4a7d[_0x1fb89c(0x268)]();const _0x442e05=new l(),_0x21803f=new ClipboardEvent(_0x1fb89c(0x22d),{'clipboardData':_0x442e05}),_0x115cd6=new _0x4c7e42(_0x442e05),_0x378e42=new _0x1c3f6a(_0x4fb489,_0x21803f,{'dataTransfer':_0x115cd6});_0x315362[_0x1fb89c(0x1e5)](_0x1fb89c(0x213),()=>{const _0x33fdb9=_0x1fb89c;_0x4fb489[_0x33fdb9(0x1ff)][_0x33fdb9(0x288)](_0x33fdb9(0x22d),_0x378e42);}),this[_0x1fb89c(0x27d)]||(this[_0x1fb89c(0x226)](),this[_0x1fb89c(0x1eb)]=new _0x3f6b9f(_0x5d38fe,this[_0x1fb89c(0x223)][_0x1fb89c(0x209)],this[_0x1fb89c(0x27d)]));let _0x1b4986=_0x115cd6[_0x1fb89c(0x1ed)](_0x1fb89c(0x267));const _0x18d21a=_0x5d38fe[_0x1fb89c(0x231)][_0x1fb89c(0x1ff)][_0x1fb89c(0x1f2)],_0x566a66=Array[_0x1fb89c(0x22e)](_0x18d21a[_0x1fb89c(0x215)]());0x1===_0x566a66[_0x1fb89c(0x24c)]&&_0x566a66[0x0][_0x1fb89c(0x211)]&&!_0x18d21a[_0x1fb89c(0x219)]()&&''!==_0x1b4986[_0x1fb89c(0x1f6)](/&nbsp;/g,'')[_0x1fb89c(0x23f)]()&&(_0x1b4986=_0x1fb89c(0x20e)+_0x1b4986+_0x1fb89c(0x1f8)),this[_0x1fb89c(0x1eb)][_0x1fb89c(0x272)]({'actionId':_0x287a8f,'query':_0x384313,'htmlContent':_0x1b4986,'label':_0x3cef45,'mainActionLabel':_0x2a79ef[_0x5d38fe[_0x1fb89c(0x231)][_0x1fb89c(0x1ff)][_0x1fb89c(0x1f2)][_0x1fb89c(0x26b)]?_0x1fb89c(0x217):_0x1fb89c(0x262)]}),_0x1fb89c(0x1e1)!==this[_0x1fb89c(0x22f)]['id']?this[_0x1fb89c(0x22f)][_0x1fb89c(0x1f9)]({'id':_0x1fb89c(0x1e1),'icon':_0x5196e1,'title':_0x4abfa4(this[_0x1fb89c(0x274)][_0x1fb89c(0x270)],_0x1fb89c(0x20f)),'content':this[_0x1fb89c(0x27d)],'position':_0x115db1[_0x1fb89c(0x247)],'onShow':()=>{const _0x38160c=_0x1fb89c;this[_0x38160c(0x27d)][_0x38160c(0x1ea)]();},'onHide':()=>{const _0x417996=_0x1fb89c;this[_0x417996(0x1eb)][_0x417996(0x1ee)](),_0x3e4a7d[_0x417996(0x287)]();}}):this[_0x1fb89c(0x22f)][_0x1fb89c(0x27b)][_0x1fb89c(0x205)]||this[_0x1fb89c(0x22f)][_0x1fb89c(0x27b)][_0x1fb89c(0x278)]();}[_0x59bb7e(0x220)](){const _0x5b78c=_0x59bb7e;this[_0x5b78c(0x22f)][_0x5b78c(0x23c)]();}[_0x59bb7e(0x1e4)](){const _0x3a904b=_0x59bb7e,_0x260658=new Map(),_0x23196b=_0x32bbff(this[_0x3a904b(0x274)][_0x3a904b(0x277)][_0x3a904b(0x1f3)](_0x3a904b(0x248)),this[_0x3a904b(0x274)][_0x3a904b(0x270)]);for(const _0x147f77 of _0x23196b)for(const _0x147cdd of _0x147f77[_0x3a904b(0x26a)])_0x260658[_0x3a904b(0x22b)](_0x147cdd['id'],{..._0x147cdd,'groupId':_0x147f77[_0x3a904b(0x25e)],'groupLabel':_0x147f77[_0x3a904b(0x20a)]||_0x147f77[_0x3a904b(0x25e)]});return _0x260658;}[_0x59bb7e(0x20c)](_0x58fe37){const _0x4f769e=_0x59bb7e,_0x181cec=this[_0x4f769e(0x274)],_0x924033=_0x181cec[_0x4f769e(0x26a)][_0x4f769e(0x1f3)](_0x4f769e(0x228)),_0x352a42=new _0x58fe37(_0x181cec[_0x4f769e(0x270)]);return _0x352a42[_0x4f769e(0x22b)]({'label':_0x4abfa4(_0x181cec[_0x4f769e(0x270)],_0x4f769e(0x20f)),'icon':_0x5196e1,'isToggleable':!0x0}),_0x352a42[_0x4f769e(0x238)](_0x4f769e(0x210))['to'](_0x924033),_0x352a42[_0x4f769e(0x238)](_0x4f769e(0x283))['to'](this[_0x4f769e(0x22f)],'id',_0xe83d7f=>_0x4f769e(0x1e1)===_0xe83d7f),this[_0x4f769e(0x212)](_0x352a42,_0x4f769e(0x1f1),()=>{const _0x27fc00=_0x4f769e;_0x352a42[_0x27fc00(0x283)]?this[_0x27fc00(0x220)]():_0x924033[_0x27fc00(0x1f1)]();}),_0x352a42;}[_0x59bb7e(0x226)](){const _0x7978a2=_0x59bb7e,_0x91b90c=this[_0x7978a2(0x274)][_0x7978a2(0x222)][_0x7978a2(0x1f3)](_0x48e185);this[_0x7978a2(0x27d)]=new _0x506ce3(this[_0x7978a2(0x274)][_0x7978a2(0x270)],this[_0x7978a2(0x264)],this[_0x7978a2(0x274)][_0x7978a2(0x277)][_0x7978a2(0x1f3)](_0x7978a2(0x275))),this[_0x7978a2(0x27d)]['on'](_0x7978a2(0x1fb),()=>{const _0x4d1e69=_0x7978a2;this[_0x4d1e69(0x22f)][_0x4d1e69(0x27b)][_0x4d1e69(0x205)]||this[_0x4d1e69(0x22f)][_0x4d1e69(0x27b)][_0x4d1e69(0x278)]();}),this[_0x7978a2(0x27d)][_0x7978a2(0x229)][_0x7978a2(0x21c)][_0x7978a2(0x225)]['on'](_0x7978a2(0x218),()=>{const _0x30d12a=_0x7978a2;this[_0x30d12a(0x22f)][_0x30d12a(0x27b)][_0x30d12a(0x205)]||this[_0x30d12a(0x22f)][_0x30d12a(0x27b)][_0x30d12a(0x278)]();}),this[_0x7978a2(0x212)](this[_0x7978a2(0x27d)],_0x7978a2(0x201),()=>{const _0x4d0e06=_0x7978a2;_0x91b90c[_0x4d0e06(0x230)](this[_0x4d0e06(0x1eb)][_0x4d0e06(0x232)]),this[_0x4d0e06(0x220)]();}),this[_0x7978a2(0x212)](this[_0x7978a2(0x27d)],_0x7978a2(0x253),()=>{const _0x22b391=_0x7978a2;_0x91b90c[_0x22b391(0x253)](this[_0x22b391(0x1eb)][_0x22b391(0x232)]),this[_0x22b391(0x220)]();}),this[_0x7978a2(0x1e7)]();}[_0x59bb7e(0x1e7)](){const _0x44ce0c=_0x59bb7e,{locale:_0x7c192d,ui:{ariaLiveAnnouncer:_0x46b440}}=this[_0x44ce0c(0x274)];this[_0x44ce0c(0x27d)][_0x44ce0c(0x273)]['on'](_0x44ce0c(0x208),(_0x516e14,_0x405ad1,_0x233a97)=>{const _0x1c011c=_0x44ce0c,_0x243316=this[_0x1c011c(0x1eb)][_0x1c011c(0x232)];_0x233a97?_0x46b440[_0x1c011c(0x25c)](_0x4abfa4(_0x7c192d,_0x1c011c(0x1e8))):_0x243316&&_0x46b440[_0x1c011c(0x25c)](_0x4abfa4(_0x7c192d,_0x1c011c(0x254),_0x243316),{'politeness':_0x1c011c(0x203),'isUnsafeHTML':!0x0});}),this[_0x44ce0c(0x27d)]['on'](_0x44ce0c(0x25a),(_0x4dc011,_0x1d19d8,_0xf380f5)=>{const _0x4a84af=_0x44ce0c;if(_0xf380f5){const _0x24c3d9=this[_0x4a84af(0x27d)][_0x4a84af(0x263)][_0x4a84af(0x1e2)];_0x46b440[_0x4a84af(0x25c)](_0x4abfa4(_0x7c192d,_0x4a84af(0x21b),_0x24c3d9));}});}[_0x59bb7e(0x26d)](_0x23f211){const _0x66dd64=_0x59bb7e,_0x5efa89=this[_0x66dd64(0x24e)][_0x66dd64(0x1f3)](_0x23f211),_0x5d170b=this[_0x66dd64(0x274)],_0x2d5128=_0x5d170b[_0x66dd64(0x231)][_0x66dd64(0x1ff)][_0x66dd64(0x1f2)],_0x1e07a7=_0x5d170b[_0x66dd64(0x26a)][_0x66dd64(0x1f3)](_0x66dd64(0x228)),_0xfc9700=_0x5d170b[_0x66dd64(0x222)][_0x66dd64(0x1f3)](_0x48e185),_0x22e690=''+(_0x5efa89[_0x66dd64(0x25e)]!==_0x421b30?_0x5efa89[_0x66dd64(0x20a)]+':\x20':'')+_0x5efa89[_0x66dd64(0x256)];if(!0x1!==_0x5efa89[_0x66dd64(0x239)]&&_0x2d5128[_0x66dd64(0x26b)]){const _0x4dd0ee=_0x3b1d31(_0x2d5128[_0x66dd64(0x26e)]())||_0x5d170b[_0x66dd64(0x231)][_0x66dd64(0x202)][_0x66dd64(0x1dd)](_0x2d5128);_0x5d170b[_0x66dd64(0x231)][_0x66dd64(0x260)](_0x481547=>{const _0x185e26=_0x66dd64;_0x481547[_0x185e26(0x25b)](_0x4dd0ee,'in');});}_0xfc9700[_0x66dd64(0x268)](),_0x1e07a7[_0x66dd64(0x1f1)](_0x5efa89[_0x66dd64(0x1fa)],_0x22e690,_0x66dd64(0x1e0)+_0x23f211);}[_0x59bb7e(0x265)](_0x1a4262,_0x2285ef,_0x161302,_0x4697f5){const _0x57c85f=_0x59bb7e,_0x3b1c37=this[_0x57c85f(0x274)],_0x22ea5e=_0x3b1c37[_0x57c85f(0x270)],_0x249eab=new _0x465bea(_0x22ea5e),_0x309b17=U(_0x3b1c37,_0x161302)[_0x57c85f(0x282)](_0x363d39=>_0x363d39[_0x57c85f(0x26a)][_0x57c85f(0x24c)]);0x1===_0x309b17[_0x57c85f(0x24c)]?this[_0x57c85f(0x1f0)]({'command':_0x1a4262,'commands':_0x309b17[0x0][_0x57c85f(0x26a)],'parentMenuView':_0x2285ef,'onExecute':_0x4697f5})[_0x57c85f(0x27f)](_0x4be6a6=>_0x249eab[_0x57c85f(0x24a)][_0x57c85f(0x269)](_0x4be6a6)):_0x309b17[_0x57c85f(0x27f)](({groupId:_0x61f03c,groupLabel:_0x408970,commands:_0x3c7b32})=>{const _0x38aeff=_0x57c85f,_0x45b845=new _0x39cebf(_0x22ea5e,_0x2285ef),_0x136920=new _0xf5e03(_0x22ea5e),_0x585f10=new _0x465bea(_0x22ea5e),_0x33e74a=this[_0x38aeff(0x1f0)]({'command':_0x1a4262,'commands':_0x3c7b32,'parentMenuView':_0x136920,'onExecute':_0x4697f5});_0x136920[_0x38aeff(0x227)][_0x38aeff(0x22b)]({'label':_0x408970||_0x61f03c}),_0x136920[_0x38aeff(0x20b)](_0x38aeff(0x1f1))['to'](_0x2285ef),_0x585f10[_0x38aeff(0x24a)][_0x38aeff(0x27a)](_0x33e74a),_0x136920[_0x38aeff(0x249)][_0x38aeff(0x261)][_0x38aeff(0x269)](_0x585f10),_0x45b845[_0x38aeff(0x261)][_0x38aeff(0x269)](_0x136920),_0x249eab[_0x38aeff(0x24a)][_0x38aeff(0x269)](_0x45b845);}),_0x2285ef[_0x57c85f(0x249)][_0x57c85f(0x261)][_0x57c85f(0x269)](_0x249eab);}[_0x59bb7e(0x1f0)]({command:_0x53fe95,commands:_0x25ab4f,parentMenuView:_0xdbf095,onExecute:_0x155d43}){const _0xe7ff66=_0x59bb7e,_0x5a2d01=this[_0xe7ff66(0x274)],_0x4ce9cd=_0x5a2d01[_0xe7ff66(0x270)];return U(_0x5a2d01,_0x25ab4f)[_0xe7ff66(0x23b)](_0xb94544=>{const _0xe1a9c4=_0xe7ff66,_0x228856=new _0x39cebf(_0x4ce9cd,_0xdbf095),_0x9264b8=new _0x3ecfa8(_0x4ce9cd);return _0x9264b8[_0xe1a9c4(0x22b)]({'label':_0xb94544[_0xe1a9c4(0x256)]}),_0x9264b8[_0xe1a9c4(0x20b)](_0xe1a9c4(0x1f1))['to'](_0xdbf095),_0x9264b8['on'](_0xe1a9c4(0x1f1),()=>_0x155d43(_0xb94544['id'])),_0x9264b8[_0xe1a9c4(0x238)](_0xe1a9c4(0x210))['to'](_0x53fe95,_0xe1a9c4(0x1fc),_0x7d0c73=>_0x7d0c73[_0xe1a9c4(0x24f)](_0xb94544['id'])),_0x228856[_0xe1a9c4(0x261)][_0xe1a9c4(0x269)](_0x9264b8),_0x228856;});}}function T(_0x3c0848,_0x27675d){const _0x18f215=_0x59bb7e;return void 0x0!==_0x3c0848[_0x18f215(0x23a)]&&void 0x0===_0x27675d[_0x18f215(0x23a)]?0x1:void 0x0===_0x3c0848[_0x18f215(0x23a)]&&void 0x0!==_0x27675d[_0x18f215(0x23a)]?-0x1:void 0x0!==_0x3c0848[_0x18f215(0x23a)]&&void 0x0!==_0x27675d[_0x18f215(0x23a)]?_0x3c0848[_0x18f215(0x23a)]-_0x27675d[_0x18f215(0x23a)]:0x0;}function U(_0x4ee63b,_0x2df6f7){const _0x4a4075=_0x59bb7e;_0x2df6f7[_0x4a4075(0x27c)](T);const _0xd4b7ee={},_0x578c70=[];for(const _0x34ee54 of _0x2df6f7)if(void 0x0!==_0x34ee54[_0x4a4075(0x23a)]){if(_0x34ee54[_0x4a4075(0x23a)]in _0xd4b7ee)throw new _0x338621(_0x4a4075(0x207),_0x4ee63b,{'conflictingDefinitions':[_0x34ee54,_0xd4b7ee[_0x34ee54[_0x4a4075(0x23a)]]]});_0xd4b7ee[_0x34ee54[_0x4a4075(0x23a)]]=_0x34ee54,_0x578c70[_0x4a4075(0x266)](_0x34ee54[_0x4a4075(0x23a)],0x0,_0x34ee54);}else _0x578c70[_0x4a4075(0x286)](_0x34ee54);return _0x578c70;}