UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 27.1 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 _0x4ac7db=_0x25ad;(function(_0x12c7dd,_0x1297fe){const _0x4fe1c4=_0x25ad,_0x33b598=_0x12c7dd();while(!![]){try{const _0x11b729=parseInt(_0x4fe1c4(0x157))/0x1*(parseInt(_0x4fe1c4(0x1a2))/0x2)+parseInt(_0x4fe1c4(0x1b4))/0x3+parseInt(_0x4fe1c4(0x163))/0x4+parseInt(_0x4fe1c4(0x14d))/0x5*(-parseInt(_0x4fe1c4(0x17a))/0x6)+parseInt(_0x4fe1c4(0x145))/0x7*(-parseInt(_0x4fe1c4(0x1aa))/0x8)+parseInt(_0x4fe1c4(0x180))/0x9*(-parseInt(_0x4fe1c4(0x198))/0xa)+parseInt(_0x4fe1c4(0x1cb))/0xb*(parseInt(_0x4fe1c4(0x159))/0xc);if(_0x11b729===_0x1297fe)break;else _0x33b598['push'](_0x33b598['shift']());}catch(_0x37626a){_0x33b598['push'](_0x33b598['shift']());}}}(_0xf328,0x74a85));import{IconAIAdjustLength as _0x1443fb,IconAIChangeTone as _0x1cae9c,IconAIChatCommands as _0x436057,IconAIContinueWriting as _0x1bc866,IconAIGrammarCheck as _0x342f01,IconAIImproveWriting as _0x2200e0,IconAIOther as _0x5a582e,IconAIQuickActions as _0x1cc797,IconAITranslate as _0x554e87}from'@ckeditor/ckeditor5-icons';import{Plugin as _0x2fd18e}from'ckeditor5/src/core.js';import{CKEditorError as _0x3ded9a,logError as _0xa6f9b9}from'ckeditor5/src/utils.js';import{getTranslation as _0x2765b4}from'../aicore/utils/common-translations.js';import{aiQuickActionsDropdownCreator as _0x12f573}from'./ui/aiquickactionsdropdowncreator.js';import{aiQuickActionsButtonCreator as _0x29af85}from'./ui/aiquickactionsbuttoncreator.js';import{BodyCollection as _0x3cee9b,BalloonToolbar as _0x1037b1,MenuBarMenuView as _0x20a762,MenuBarMenuListView as _0x810034,MenuBarMenuListItemView as _0x4e8a46,MenuBarMenuListItemButtonView as _0x24d86b}from'ckeditor5/src/ui.js';import'../../theme/aiquickactions/aiquickactions.css';function _0x25ad(_0x549f51,_0x3b4053){const _0xf3289b=_0xf328();return _0x25ad=function(_0x25ad0e,_0x496bcb){_0x25ad0e=_0x25ad0e-0x131;let _0x3cbee4=_0xf3289b[_0x25ad0e];return _0x3cbee4;},_0x25ad(_0x549f51,_0x3b4053);}import{AIModels as _0x14352c}from'../aicore/model/aimodels.js';const ae=_0x4ac7db(0x1d1),se=_0x4ac7db(0x158),re=_0x4ac7db(0x195);export var AIQuickActionType;!function(_0x2d4990){const _0x4b6853=_0x4ac7db;_0x2d4990[_0x4b6853(0x131)]=_0x4b6853(0x131),_0x2d4990[_0x4b6853(0x1b9)]=_0x4b6853(0x1b9),_0x2d4990[_0x4b6853(0x133)]=_0x4b6853(0x133);}(AIQuickActionType||(AIQuickActionType={}));export var AIQuickActionTypeToPluginName;function _0xf328(){const _0x4c4dff=['highlight-key-points','replace','AI_QUICK_ACTIONS_TRANSLATE_JAPANESE','AI_QUICK_ACTIONS_ADJUST_LENGTH','AI_QUICK_ACTIONS_TRANSLATE_KOREAN','<task>For\x20the\x20given\x20selected\x20part\x20of\x20an\x20HTML\x20document\x20you\x20must\x20extract\x20and\x20present\x20the\x20key\x20points\x20from\x20its\x20content.</task><rules>1.\x20Present\x20the\x20output\x20as\x20a\x20clear,\x20structured\x20list\x20(bullets\x20or\x20numbered).-\x20Each\x20point\x20should\x20be\x20concise\x20(one\x20sentence\x20or\x20less).-\x20Do\x20not\x20merge\x20distinct\x20ideas\x20into\x20one\x20bullet.2.\x20Identify\x20what\x20type\x20of\x20text\x20it\x20is\x20and\x20adapt\x20the\x20extraction\x20style:-\x20If\x20it\x20is\x20descriptive\x20capture\x20the\x20main\x20attributes\x20or\x20features.-\x20If\x20it\x20is\x20argumentative\x20extract\x20the\x20main\x20claim\x20and\x20supporting\x20reasons\x20separately.-\x20If\x20it\x20is\x20narrative/story-like\x20extract\x20the\x20main\x20events\x20in\x20chronological\x20order.-\x20If\x20it\x20is\x20data-driven\x20(stats,\x20figures,\x20facts)\x20highlight\x20the\x20most\x20important\x20facts\x20or\x20numbers.-\x20If\x20it\x20is\x20instructional\x20list\x20the\x20steps\x20or\x20main\x20actions\x20in\x20simplified\x20form.-\x20If\x20it\x20provides\x20comparisons\x20extract\x20the\x20contrasted\x20items\x20and\x20their\x20differences/similarities.-\x20If\x20it\x20does\x20not\x20fit\x20any\x20category\x20above\x20extract\x20the\x20main\x20ideas\x20in\x20plain,\x20short\x20statements.3.\x20Keep\x20the\x20list\x20between\x203–7\x20items\x20where\x20possible.-\x20If\x20the\x20text\x20is\x20very\x20short,\x20fewer\x20items\x20are\x20fine.-\x20If\x20it\x20is\x20very\x20long,\x20focus\x20on\x20the\x20most\x20important\x20ideas\x20only.4.\x20Do\x20not\x20copy\x20long\x20text\x20fragments\x20—\x20restate\x20in\x20simple\x20words.5.\x20Do\x20not\x20add\x20interpretation,\x20evaluation,\x20or\x20commentary\x20beyond\x20the\x20text.6.\x20Ensure\x20the\x20list\x20can\x20stand\x20alone\x20without\x20requiring\x20the\x20reader\x20to\x20see\x20the\x20original\x20document.7.\x20Use\x20the\x20context\x20of\x20the\x20whole\x20document,\x20but\x20focus\x20on\x20the\x20selected\x20part\x20when\x20creating\x20your\x20key\x20points.8.\x20Your\x20key\x20points\x20should\x20be\x20written\x20in\x20%0\x20language.</rules><constraints>1.\x20You\x20MUST\x20NOT\x20perform\x20any\x20edits\x20or\x20modifications\x20on\x20the\x20provided\x20document.2.\x20You\x20MUST\x20NOT\x20include\x20document\x20modifications\x20in\x20your\x20response.3.\x20Your\x20message\x20should\x20only\x20include\x20the\x20extracted\x20key\x20points.\x20Do\x20not\x20add\x20any\x20additional\x20text,\x20flattery,\x20questions\x20or\x20followup\x20suggestions.</constraints>','AI_QUICK_ACTIONS_TRANSLATE_ITALIAN','AI_QUICK_ACTIONS_MORE_CONFIDENT','990VosFCq','translate-to-french','editing','chinese','view','icon','make-tone-confident','translate-to-korean','translate-to-japanese','make-tone-friendly','12658HrDLeh','german','make-tone-direct','translate-to-chinese','translate-to-italian','_initializeQuickActionsComponentsAndCommands','AI_QUICK_ACTIONS_CHAT_COMMANDS','AI_QUICK_ACTIONS_TRANSLATE','88vvmZSd','init','continue','values','find','buttonView','improve-writing','fix-grammar','delegate','AIQuickActionsUI','1014807NVFPKU','make-shorter','adjust-length','AIChat','_initializeQuickActionsMenuBar','ACTION','ai-quick-actions-unavailable-model','commands','portuguese','AI_QUICK_ACTIONS_TRANSLATE_FRENCH','AI_QUICK_ACTIONS_EXPLAIN','getDefaultQuickActions','length','items','forEach','make-tone-professional','change-tone','includes','AIConnector','getAvailableModels','some','AI_QUICK_ACTIONS_MORE_CASUAL','English','8691782ATTXqH','_getDefaultAndCustomActions','AI_QUICK_ACTIONS_CHANGE_TONE','displayedPrompt','actions','AI_QUICK_ACTIONS_HEADING','<task>For\x20given\x20selected\x20part\x20of\x20HTML\x20document\x20you\x20must\x20explain\x20the\x20meaning\x20of\x20it\x27s\x20content\x20clearly\x20and\x20in\x20plain\x20language.</task><rules>1.\x20Identify\x20what\x20type\x20of\x20text\x20it\x20is:-\x20If\x20it\x20looks\x20like\x20a\x20definition\x20explain\x20the\x20concept\x20in\x20simple\x20terms.-\x20If\x20it\x20looks\x20like\x20a\x20description\x20clarify\x20what\x20it\x20is\x20describing\x20and\x20why\x20it\x20matters.-\x20If\x20it\x20contains\x20technical\x20terms\x20or\x20jargon\x20break\x20them\x20down\x20into\x20everyday\x20language.-\x20If\x20it\x20looks\x20instructional\x20restate\x20as\x20clear\x20steps\x20someone\x20can\x20follow.-\x20If\x20it\x20provides\x20examples\x20explain\x20what\x20the\x20example\x20shows\x20and\x20why\x20it\x27s\x20relevant.-\x20If\x20it\x20presents\x20an\x20argument\x20or\x20claim\x20restate\x20the\x20claim\x20neutrally\x20and\x20explain\x20its\x20purpose.-\x20If\x20it\x20is\x20narrative/story-like\x20explain\x20what\x20event\x20or\x20situation\x20is\x20being\x20described.-\x20If\x20it\x20is\x20data-driven\x20(stats,\x20figures,\x20facts)\x20explain\x20what\x20the\x20data\x20indicates.-\x20If\x20it\x20is\x20a\x20quotation\x20explain\x20the\x20meaning\x20of\x20the\x20quote\x20in\x20context.-\x20If\x20it\x20compares/contrasts\x20things\x20explain\x20the\x20key\x20differences\x20or\x20similarities\x20simply.-\x20If\x20it\x20does\x20not\x20fit\x20any\x20of\x20the\x20categories\x20above\x20give\x20a\x20clear,\x20plain-language\x20explanation\x20of\x20its\x20meaning,\x20focusing\x20on\x20usefulness.2.\x20Provide\x20context\x20if\x20the\x20meaning\x20could\x20be\x20unclear\x20without\x20it.\x20(e.g.,\x20explain\x20where\x20such\x20a\x20term\x20might\x20be\x20used,\x20or\x20why\x20it\x20is\x20important).3.\x20Keep\x20the\x20explanation\x20short\x20but\x20complete\x20(2–5\x20sentences).Avoid\x20overly\x20technical\x20detail\x20unless\x20it\x20is\x20necessary\x20for\x20understanding.4.\x20Do\x20not\x20simply\x20repeat\x20the\x20original\x20text\x20—\x20restate\x20and\x20expand\x20it\x20in\x20plain\x20words.5.\x20If\x20possible,\x20add\x20a\x20short\x20example\x20or\x20analogy\x20to\x20make\x20it\x20easier\x20to\x20understand.6.\x20Use\x20the\x20context\x20of\x20the\x20whole\x20document,\x20but\x20focus\x20on\x20the\x20selected\x20part\x20when\x20creating\x20your\x20explanation.7.\x20Your\x20explanation\x20should\x20be\x20written\x20in\x20%0\x20language.</rules><constraints>1.\x20You\x20MUST\x20NOT\x20perform\x20any\x20edits\x20or\x20modifications\x20on\x20provided\x20document.2.\x20You\x20MUST\x20NOT\x20include\x20document\x20modifications\x20in\x20your\x20response.3.\x20Your\x20message\x20should\x20only\x20include\x20explanation.\x20Do\x20not\x20add\x20any\x20additional\x20text,\x20flattery,\x20questions\x20or\x20followup\x20suggestions.</constraints>','message','ai.quickActions.isSearchEnabled','CHAT','AIReviewMode','REVIEW','_initializeQuickActionsDropdown','other','AI_QUICK_ACTIONS_TRANSLATE_PORTUGUESE','AI_QUICK_ACTIONS_MAKE_LONGER','AI_QUICK_ACTIONS_HIGHLIGHT_KEY_POINTS','translate','menuBar:aiQuickActions','plugins','_shouldIncludeAction','AI_QUICK_ACTIONS_MORE_DIRECT','chat-commands','map','config','focus','AI_QUICK_ACTIONS_ASK_AI','spanish','requires','347011ZfTvZt','russian','AI_QUICK_ACTIONS_MORE_PROFESSIONAL','japanese','aiQuickAction','uiLanguage','pluginName','summarize','10eIXOZC','explain','translate-to-german','language','menuitem','ai.quickActions.extraCommands','locale','korean','_initializeQuickActionsComponents','add','118spubsT','<task>For\x20the\x20given\x20selected\x20part\x20of\x20an\x20HTML\x20document\x20you\x20must\x20summarize\x20its\x20content\x20in\x20a\x20few\x20sentences,\x20keeping\x20only\x20the\x20essential\x20meaning.</task><rules>1.\x20Your\x20summary\x20should\x20be\x20short\x20and\x20clear:-\x20Aim\x20for\x202–4\x20sentences\x20unless\x20the\x20text\x20is\x20extremely\x20short.-\x20Focus\x20on\x20capturing\x20the\x20main\x20idea(s)\x20without\x20unnecessary\x20detail.2.\x20Identify\x20what\x20type\x20of\x20text\x20it\x20is\x20and\x20adapt\x20the\x20summary\x20style:-\x20If\x20it\x20is\x20descriptive\x20condense\x20the\x20description\x20into\x20its\x20core\x20idea.-\x20If\x20it\x20is\x20argumentative\x20or\x20opinion-based\x20summarize\x20the\x20main\x20claim\x20and\x20reasoning\x20neutrally.-\x20If\x20it\x20is\x20narrative/story-like\x20capture\x20the\x20main\x20event\x20or\x20outcome\x20without\x20side\x20details.-\x20If\x20it\x20is\x20data-driven\x20(stats,\x20figures,\x20facts)\x20summarize\x20what\x20the\x20data\x20shows\x20in\x20plain\x20language.-\x20If\x20it\x20is\x20instructional\x20restate\x20the\x20overall\x20purpose\x20of\x20the\x20steps\x20without\x20listing\x20every\x20step.-\x20If\x20it\x20does\x20not\x20fit\x20any\x20of\x20the\x20categories\x20above\x20provide\x20a\x20general\x20concise\x20summary.3.\x20Provide\x20context\x20if\x20necessary\x20for\x20clarity:-\x20Mention\x20the\x20subject\x20or\x20topic\x20explicitly\x20so\x20the\x20summary\x20can\x20stand\x20alone.4.\x20Do\x20not\x20simply\x20copy\x20sentences\x20from\x20the\x20original\x20text\x20—\x20rephrase\x20in\x20plain\x20language.5.\x20Avoid\x20adding\x20new\x20information\x20or\x20interpretation\x20not\x20present\x20in\x20the\x20text.6.\x20Summarize\x20in\x20a\x20way\x20that\x20would\x20make\x20sense\x20to\x20someone\x20who\x20has\x20not\x20read\x20the\x20original\x20text.7.\x20Use\x20the\x20context\x20of\x20the\x20whole\x20document,\x20but\x20focus\x20on\x20the\x20selected\x20part\x20when\x20creating\x20your\x20summary.8.\x20Your\x20summary\x20should\x20be\x20written\x20in\x20%0\x20language.</rules><constraints>1.\x20You\x20MUST\x20NOT\x20perform\x20any\x20edits\x20or\x20modifications\x20on\x20the\x20provided\x20document.2.\x20You\x20MUST\x20NOT\x20include\x20document\x20modifications\x20in\x20your\x20response.3.\x20Your\x20message\x20should\x20only\x20include\x20the\x20summary.\x20Do\x20not\x20add\x20any\x20additional\x20text,\x20flattery,\x20questions\x20or\x20followup\x20suggestions.</constraints>','12JcDwTH','_executeQuickAction','aiQuickActions','AI_QUICK_ACTIONS_OTHER','set','ask-ai','AI_QUICK_ACTIONS_SUMMARIZE','get','AI_QUICK_ACTIONS_IMPROVE_WRITING','model','856296nDGbTh','isPremiumPlugin','AI_QUICK_ACTIONS_FIX_GRAMMAR_SPELLING','french','filter','menu','AI_QUICK_ACTIONS_TRANSLATE_ENGLISH','ai-quick-actions-models-unable-to-retrieve','attachToDom','translate-to-russian','AI_QUICK_ACTIONS_CONTINUE_WRITING','AI_QUICK_ACTIONS_MORE_FRIENDLY','translate-to-spanish','_quickActionsDefinition','has','translate-to-english','ai.chat.models.displayedModels','isEnabled','panelView','AI_QUICK_ACTIONS_MAKE_SHORTER','editor','componentFactory','english','2703486drnQYJ','make-tone-casual','execute','close','AI_QUICK_ACTIONS_TRANSLATE_CHINESE','make-longer','15003zvPTOQ','DisplayNames','menuBarView','ai.quickActions.removeCommands','_prepareQuickActionsDefinition','label','AIActions','type','children','push','AI_QUICK_ACTIONS_TRANSLATE_RUSSIAN','AI_QUICK_ACTIONS_TRANSLATE_SPANISH','italian','isOfficialPlugin','translate-to-portuguese','AI_QUICK_ACTIONS_TRANSLATE_GERMAN'];_0xf328=function(){return _0x4c4dff;};return _0xf328();}!function(_0x19703a){const _0x275dda=_0x4ac7db;_0x19703a[_0x275dda(0x131)]=_0x275dda(0x1b7),_0x19703a[_0x275dda(0x1b9)]=_0x275dda(0x186),_0x19703a[_0x275dda(0x133)]=_0x275dda(0x132);}(AIQuickActionTypeToPluginName||(AIQuickActionTypeToPluginName={}));export class AIQuickActionsUI extends _0x2fd18e{static get[_0x4ac7db(0x144)](){return[_0x1037b1];}static get[_0x4ac7db(0x14b)](){const _0x54d824=_0x4ac7db;return _0x54d824(0x1b3);}static get[_0x4ac7db(0x18d)](){return!0x0;}static get[_0x4ac7db(0x164)](){return!0x0;}async[_0x4ac7db(0x1ab)](){const _0x19a0d2=_0x4ac7db,_0x443e9e=await this[_0x19a0d2(0x1cc)]();this[_0x19a0d2(0x184)](_0x443e9e),this[_0x19a0d2(0x1a7)]();}static[_0x4ac7db(0x1bf)](_0x293acf){return function(_0x9746fa){const _0x3e6673=_0x25ad,_0x5aeeb0=new Intl[(_0x3e6673(0x181))](['en'],{'type':_0x3e6673(0x150)})['of'](_0x9746fa[_0x3e6673(0x14a)]),_0x539ed2=_0x5aeeb0||_0x3e6673(0x1ca),_0x4f68eb=[{'id':_0x3e6673(0x15e),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x142)),'type':AIQuickActionType[_0x3e6673(0x131)],'icon':_0x436057},{'id':_0x3e6673(0x13e),'label':_0x2765b4(_0x9746fa,_0x3e6673(0x1a8)),'icon':_0x436057,'actions':[{'id':_0x3e6673(0x14e),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x1be)),'prompt':ae[_0x3e6673(0x191)]('%0',_0x539ed2),'type':AIQuickActionType[_0x3e6673(0x131)]},{'id':_0x3e6673(0x14c),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x15f)),'prompt':se[_0x3e6673(0x191)]('%0',_0x539ed2),'type':AIQuickActionType[_0x3e6673(0x131)]},{'id':_0x3e6673(0x190),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x138)),'prompt':re[_0x3e6673(0x191)]('%0',_0x539ed2),'type':AIQuickActionType[_0x3e6673(0x131)]}]},{'id':_0x3e6673(0x1b0),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x161)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'icon':_0x2200e0},{'id':_0x3e6673(0x1ac),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x16d)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'icon':_0x1bc866},{'id':_0x3e6673(0x1b1),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x165)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'icon':_0x342f01},{'id':_0x3e6673(0x1b6),'label':_0x2765b4(_0x9746fa,_0x3e6673(0x193)),'icon':_0x1443fb,'actions':[{'id':_0x3e6673(0x1b5),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x176)),'type':AIQuickActionType[_0x3e6673(0x1b9)]},{'id':_0x3e6673(0x17f),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x137)),'type':AIQuickActionType[_0x3e6673(0x1b9)]}]},{'id':_0x3e6673(0x1c4),'label':_0x2765b4(_0x9746fa,_0x3e6673(0x1cd)),'icon':_0x1cae9c,'actions':[{'id':_0x3e6673(0x17b),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x1c9)),'type':AIQuickActionType[_0x3e6673(0x1b9)]},{'id':_0x3e6673(0x1a4),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x13d)),'type':AIQuickActionType[_0x3e6673(0x1b9)]},{'id':_0x3e6673(0x1a1),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x16e)),'type':AIQuickActionType[_0x3e6673(0x1b9)]},{'id':_0x3e6673(0x19e),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x197)),'type':AIQuickActionType[_0x3e6673(0x1b9)]},{'id':_0x3e6673(0x1c3),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x147)),'type':AIQuickActionType[_0x3e6673(0x1b9)]}]},{'id':_0x3e6673(0x139),'label':_0x2765b4(_0x9746fa,_0x3e6673(0x1a9)),'icon':_0x554e87,'actions':[{'id':_0x3e6673(0x172),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x169)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x179)}},{'id':_0x3e6673(0x1a5),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x17e)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x19b)}},{'id':_0x3e6673(0x16f),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x18b)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x143)}},{'id':_0x3e6673(0x14f),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x18f)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x1a3)}},{'id':_0x3e6673(0x199),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x1bd)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x166)}},{'id':_0x3e6673(0x1a0),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x192)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x148)}},{'id':_0x3e6673(0x18e),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x136)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x1bc)}},{'id':_0x3e6673(0x19f),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x194)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x154)}},{'id':_0x3e6673(0x1a6),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x196)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x18c)}},{'id':_0x3e6673(0x16c),'displayedPrompt':_0x2765b4(_0x9746fa,_0x3e6673(0x18a)),'type':AIQuickActionType[_0x3e6673(0x1b9)],'actionName':_0x3e6673(0x139),'args':{'language':_0x3e6673(0x146)}}]},{'id':_0x3e6673(0x135),'label':_0x2765b4(_0x9746fa,_0x3e6673(0x15c)),'icon':_0x5a582e,'actions':[]}];return _0x4f68eb;}(_0x293acf);}async[_0x4ac7db(0x1cc)](){const _0x31feb7=_0x4ac7db,_0x41e4a8=AIQuickActionsUI[_0x31feb7(0x1bf)](this[_0x31feb7(0x177)][_0x31feb7(0x153)]),_0x2fe9c6=this[_0x31feb7(0x177)][_0x31feb7(0x140)][_0x31feb7(0x160)](_0x31feb7(0x152))||[];let _0x3288f1=[];try{_0x3288f1=await new _0x14352c({'connector':this[_0x31feb7(0x177)][_0x31feb7(0x13b)][_0x31feb7(0x160)](_0x31feb7(0x1c6)),'availableModels':this[_0x31feb7(0x177)][_0x31feb7(0x140)][_0x31feb7(0x160)](_0x31feb7(0x173))})[_0x31feb7(0x1c7)]();}catch(_0x4bb75b){const _0x206e1a=new _0x3ded9a(_0x31feb7(0x16a),this,{'error':_0x4bb75b});_0xa6f9b9(_0x206e1a[_0x31feb7(0x1d2)]);}finally{const _0x20acce=_0x2fe9c6[_0x31feb7(0x13f)](_0x44131b=>({..._0x44131b,'icon':void 0x0}));_0x41e4a8[_0x31feb7(0x1ae)](_0x332b54=>_0x31feb7(0x135)===_0x332b54['id'])[_0x31feb7(0x1cf)][_0x31feb7(0x189)](..._0x20acce),_0x41e4a8[_0x31feb7(0x1c2)](_0x4f3a30=>{const _0x292be5=_0x31feb7;if(_0x292be5(0x1cf)in _0x4f3a30)_0x4f3a30[_0x292be5(0x1cf)][_0x292be5(0x1c2)](_0x5a2aa8=>{const _0x278113=_0x292be5;if(_0x5a2aa8[_0x278113(0x174)]=!!_0x3288f1[_0x278113(0x1ae)](_0x834891=>_0x834891['id']===_0x5a2aa8[_0x278113(0x162)])||void 0x0===_0x5a2aa8[_0x278113(0x162)],!_0x5a2aa8[_0x278113(0x174)]){const _0xc6a310=new _0x3ded9a(_0x278113(0x1ba),this,{'actionId':_0x5a2aa8['id'],'modelId':_0x5a2aa8[_0x278113(0x162)]});_0xa6f9b9(_0xc6a310[_0x278113(0x1d2)]);}});else{if(_0x4f3a30[_0x292be5(0x174)]=!!_0x3288f1[_0x292be5(0x1ae)](_0x29d92c=>_0x29d92c['id']===_0x4f3a30[_0x292be5(0x162)])||void 0x0===_0x4f3a30[_0x292be5(0x162)],!_0x4f3a30[_0x292be5(0x174)]){const _0x4b70a3=new _0x3ded9a(_0x292be5(0x1ba),this,{'actionId':_0x4f3a30['id'],'modelId':_0x4f3a30[_0x292be5(0x162)]});_0xa6f9b9(_0x4b70a3[_0x292be5(0x1d2)]);}}});}return _0x41e4a8;}[_0x4ac7db(0x1a7)](){const _0x1ebcb8=_0x4ac7db,_0x22eec3=new _0x3cee9b(this[_0x1ebcb8(0x177)][_0x1ebcb8(0x153)]);_0x22eec3[_0x1ebcb8(0x16b)](),this[_0x1ebcb8(0x134)](_0x22eec3),this[_0x1ebcb8(0x1b8)](),this[_0x1ebcb8(0x155)](_0x22eec3);}[_0x4ac7db(0x134)](_0xfa7a27){const _0x532df0=_0x4ac7db,_0x300288=this[_0x532df0(0x177)][_0x532df0(0x140)][_0x532df0(0x160)](_0x532df0(0x1d3))??!0x0;this[_0x532df0(0x177)]['ui'][_0x532df0(0x178)][_0x532df0(0x156)](_0x532df0(0x15b),_0x12f573({'editor':this[_0x532df0(0x177)],'content':this[_0x532df0(0x170)],'buttonDefinition':{'icon':_0x1cc797,'label':_0x2765b4(this[_0x532df0(0x177)][_0x532df0(0x153)],_0x532df0(0x1d0))},'bodyCollection':_0xfa7a27,'hasSearch':_0x300288}));}[_0x4ac7db(0x184)](_0x8854d4){const _0x5c1300=_0x4ac7db;this[_0x5c1300(0x170)]=_0x8854d4[_0x5c1300(0x13f)](_0x3fc990=>{const _0x3f4138=_0x5c1300;if(_0x3f4138(0x1cf)in _0x3fc990){const _0x3bd288=_0x3fc990;return{..._0x3bd288,'actions':_0x3bd288[_0x3f4138(0x1cf)][_0x3f4138(0x13f)](_0x1a8f8e=>{const {actions:_0x1b1f68,..._0x30ee96}=_0x3bd288;return{..._0x1a8f8e,'parent':_0x30ee96};})[_0x3f4138(0x167)](_0x30bf19=>this[_0x3f4138(0x13c)](_0x30bf19))};}return _0x3fc990;})[_0x5c1300(0x167)](_0x1d5067=>_0x5c1300(0x1cf)in _0x1d5067?_0x1d5067[_0x5c1300(0x1cf)][_0x5c1300(0x1c0)]>0x0:this[_0x5c1300(0x13c)](_0x1d5067));}[_0x4ac7db(0x13c)](_0x18593b){const _0x27f061=_0x4ac7db,_0xb194ac=this[_0x27f061(0x177)][_0x27f061(0x140)][_0x27f061(0x160)](_0x27f061(0x183))||[];return this[_0x27f061(0x177)][_0x27f061(0x13b)][_0x27f061(0x171)](AIQuickActionTypeToPluginName[_0x18593b[_0x27f061(0x187)]])&&!_0xb194ac[_0x27f061(0x1c5)](_0x18593b['id']);}[_0x4ac7db(0x155)](_0x8f6796){const _0x47a8c2=_0x4ac7db;this[_0x47a8c2(0x170)][_0x47a8c2(0x1c2)](_0x58510d=>{const _0x115456=_0x47a8c2;if(_0x115456(0x1cf)in _0x58510d){const _0x358bf0=_0x12f573({'editor':this[_0x115456(0x177)],'content':_0x58510d[_0x115456(0x1cf)],'buttonDefinition':_0x58510d,'bodyCollection':_0x8f6796});this[_0x115456(0x177)]['ui'][_0x115456(0x178)][_0x115456(0x156)](_0x58510d['id'],_0x358bf0),_0x58510d[_0x115456(0x1cf)][_0x115456(0x1c2)](_0x5c1a65=>{const _0x1fd8a5=_0x115456,_0x1f5906=_0x29af85({'editor':this[_0x1fd8a5(0x177)],'action':_0x5c1a65});this[_0x1fd8a5(0x177)]['ui'][_0x1fd8a5(0x178)][_0x1fd8a5(0x156)](_0x5c1a65['id'],_0x1f5906);});}else{const _0x877fea=_0x29af85({'editor':this[_0x115456(0x177)],'action':_0x58510d,'withText':!0x1,'withIcon':!0x0,'isInDropdown':!0x1});this[_0x115456(0x177)]['ui'][_0x115456(0x178)][_0x115456(0x156)](_0x58510d['id'],_0x877fea);}});}[_0x4ac7db(0x1b8)](){const _0x1972c4=_0x4ac7db;this[_0x1972c4(0x177)]['ui'][_0x1972c4(0x178)][_0x1972c4(0x156)](_0x1972c4(0x13a),_0x3fdb80=>{const _0x2e577d=_0x1972c4,_0x20e7f1=new _0x20a762(_0x3fdb80),_0x104a60=_0x2765b4(_0x3fdb80,_0x2e577d(0x1d0));_0x20e7f1[_0x2e577d(0x1af)][_0x2e577d(0x15d)]({'label':_0x104a60,'icon':_0x1cc797});const _0x127cef=new _0x810034(_0x3fdb80);_0x127cef[_0x2e577d(0x15d)]({'ariaLabel':_0x104a60,'role':_0x2e577d(0x168)}),this[_0x2e577d(0x170)][_0x2e577d(0x1c2)](_0x48770d=>{const _0x266eba=_0x2e577d;if(_0x266eba(0x1cf)in _0x48770d){const _0x3d4135=_0x48770d,_0x2084e3=new _0x4e8a46(_0x3fdb80,_0x20e7f1),_0x35c0cb=new _0x20a762(_0x3fdb80),_0x4ffd15=new _0x810034(_0x3fdb80);_0x35c0cb[_0x266eba(0x1af)][_0x266eba(0x15d)]({'label':_0x3d4135[_0x266eba(0x185)],'icon':_0x3d4135[_0x266eba(0x19d)]}),_0x3d4135[_0x266eba(0x1cf)][_0x266eba(0x1c2)](_0x252387=>{const _0x44a6da=_0x266eba,_0x12d0f5=new _0x4e8a46(_0x3fdb80,_0x35c0cb),_0x43d370=new _0x24d86b(_0x3fdb80);_0x43d370[_0x44a6da(0x15d)]({'label':_0x252387[_0x44a6da(0x1ce)],'icon':_0x252387[_0x44a6da(0x19d)],'role':_0x44a6da(0x151),'isEnabled':_0x252387[_0x44a6da(0x174)]}),_0x43d370['on'](_0x44a6da(0x17c),()=>{const _0x530444=_0x44a6da;this[_0x530444(0x15a)](_0x252387);}),_0x43d370[_0x44a6da(0x1b2)](_0x44a6da(0x17c))['to'](_0x35c0cb),_0x12d0f5[_0x44a6da(0x188)][_0x44a6da(0x156)](_0x43d370),_0x4ffd15[_0x44a6da(0x1c1)][_0x44a6da(0x156)](_0x12d0f5);}),_0x35c0cb[_0x266eba(0x175)][_0x266eba(0x188)][_0x266eba(0x156)](_0x4ffd15),_0x2084e3[_0x266eba(0x188)][_0x266eba(0x156)](_0x35c0cb),_0x127cef[_0x266eba(0x1c1)][_0x266eba(0x156)](_0x2084e3);}else{const _0x4c1638=_0x48770d,_0x41ae00=new _0x4e8a46(_0x3fdb80,_0x20e7f1),_0x4d03ce=new _0x24d86b(_0x3fdb80);_0x4d03ce[_0x266eba(0x15d)]({'label':_0x4c1638[_0x266eba(0x1ce)],'icon':_0x4c1638[_0x266eba(0x19d)],'role':_0x266eba(0x151),'isEnabled':_0x4c1638[_0x266eba(0x174)]}),_0x4d03ce['on'](_0x266eba(0x17c),()=>{const _0x2d5e7c=_0x266eba;this[_0x2d5e7c(0x15a)](_0x4c1638);}),_0x4d03ce[_0x266eba(0x1b2)](_0x266eba(0x17c))['to'](_0x20e7f1),_0x41ae00[_0x266eba(0x188)][_0x266eba(0x156)](_0x4d03ce),_0x127cef[_0x266eba(0x1c1)][_0x266eba(0x156)](_0x41ae00);}});const _0x5a8950=Object[_0x2e577d(0x1ad)](AIQuickActionTypeToPluginName)[_0x2e577d(0x1c8)](_0x201229=>this[_0x2e577d(0x177)][_0x2e577d(0x13b)][_0x2e577d(0x171)](_0x201229));return _0x20e7f1[_0x2e577d(0x15d)]({'isEnabled':_0x5a8950}),_0x20e7f1[_0x2e577d(0x175)][_0x2e577d(0x188)][_0x2e577d(0x156)](_0x127cef),_0x20e7f1;});}[_0x4ac7db(0x15a)](_0x3c95a1){const _0x5a351b=_0x4ac7db,_0x3316b8=this[_0x5a351b(0x177)];_0x3316b8[_0x5a351b(0x19a)][_0x5a351b(0x19c)][_0x5a351b(0x141)](),_0x3316b8[_0x5a351b(0x1bb)][_0x5a351b(0x17c)](_0x5a351b(0x149),_0x3c95a1);const _0x406742=_0x3316b8['ui'][_0x5a351b(0x19c)][_0x5a351b(0x182)];_0x406742&&_0x406742[_0x5a351b(0x17d)]&&_0x406742[_0x5a351b(0x17d)]();}}