@ckeditor/ckeditor5-ai 47.2.0-alpha.1 → 47.2.0-alpha.2
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/ai.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/dist/index.js +5 -5
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/lang/translations/ar.po +34 -34
- package/lang/translations/bg.po +26 -26
- package/lang/translations/bn.po +26 -26
- package/lang/translations/ca.po +26 -26
- package/lang/translations/cs.po +28 -28
- package/lang/translations/da.po +26 -26
- package/lang/translations/de.po +26 -26
- package/lang/translations/el.po +26 -26
- package/lang/translations/es.po +26 -26
- package/lang/translations/et.po +26 -26
- package/lang/translations/fi.po +26 -26
- package/lang/translations/fr.po +26 -26
- package/lang/translations/he.po +26 -26
- package/lang/translations/hi.po +26 -26
- package/lang/translations/hu.po +26 -26
- package/lang/translations/id.po +24 -24
- package/lang/translations/it.po +26 -26
- package/lang/translations/ja.po +24 -24
- package/lang/translations/ko.po +24 -24
- package/lang/translations/lt.po +28 -28
- package/lang/translations/lv.po +28 -28
- package/lang/translations/ms.po +24 -24
- package/lang/translations/nl.po +26 -26
- package/lang/translations/no.po +26 -26
- package/lang/translations/pl.po +28 -28
- package/lang/translations/pt-br.po +26 -26
- package/lang/translations/pt.po +26 -26
- package/lang/translations/ro.po +28 -28
- package/lang/translations/ru.po +28 -28
- package/lang/translations/sk.po +28 -28
- package/lang/translations/sr.po +28 -28
- package/lang/translations/sv.po +26 -26
- package/lang/translations/th.po +24 -24
- package/lang/translations/tr.po +26 -26
- package/lang/translations/uk.po +28 -28
- package/lang/translations/vi.po +24 -24
- package/lang/translations/zh-cn.po +24 -24
- package/lang/translations/zh.po +24 -24
- package/package.json +15 -15
- package/src/aiactions/aiactions.js +1 -1
- package/src/aiactions/model/aiactionsinteraction.js +1 -1
- package/src/aiactions/model/aiactionsreply.js +1 -1
- package/src/aiassistant/adapters/aiadapter.js +1 -1
- package/src/aiassistant/adapters/aitextadapter.js +1 -1
- package/src/aiassistant/adapters/awstextadapter.js +1 -1
- package/src/aiassistant/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant/aiassistant.js +1 -1
- package/src/aiassistant/aiassistantediting.js +1 -1
- package/src/aiassistant/aiassistantui.js +1 -1
- package/src/aiassistant/legacyerrors.js +1 -1
- package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
- package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
- package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
- package/src/aiassistant/ui/form/aiformview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
- package/src/aiassistant/ui/form/prompthistory.js +1 -1
- package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
- package/src/aiassistant/utils/common-translations.js +1 -1
- package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
- package/src/aiballoon/aiballoon.js +1 -1
- package/src/aiballoon/ui/aiballoondisclaimerview.js +1 -1
- package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
- package/src/aiballoon/ui/aiballoonview.js +1 -1
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatcontroller.js +1 -1
- package/src/aichat/aichatui.js +1 -1
- package/src/aichat/model/aichatcontext.js +1 -1
- package/src/aichat/model/aichatconversation.js +1 -1
- package/src/aichat/model/aichatinteraction.js +1 -1
- package/src/aichat/model/aichatmodels.js +1 -1
- package/src/aichat/ui/aichatcontrolsview.js +1 -1
- package/src/aichat/ui/aichatfeedview.js +1 -1
- package/src/aichat/ui/aichatheaderview.js +1 -1
- package/src/aichat/ui/aichatview.js +1 -1
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
- package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
- package/src/aichat/utils/eventnames.js +1 -1
- package/src/aichat/utils/promisequeue.js +1 -1
- package/src/aichat/utils/scrollmanager.js +1 -1
- package/src/aichathistory/aichathistory.js +1 -1
- package/src/aichathistory/aichathistorycontroller.js +1 -1
- package/src/aichathistory/aichathistoryui.js +1 -1
- package/src/aichathistory/model/aichathistoryconversations.js +1 -1
- package/src/aichathistory/model/aichathistoryitem.js +1 -1
- package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
- package/src/aichathistory/ui/aichathistorylistview.js +1 -1
- package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
- package/src/aichathistory/ui/aichathistoryview.js +1 -1
- package/src/aicore/aiconnector.js +1 -1
- package/src/aicore/aiediting.js +1 -1
- package/src/aicore/model/aicapabilities.js +1 -1
- package/src/aicore/model/aicontext.js +1 -1
- package/src/aicore/model/aiinteraction.js +1 -1
- package/src/aicore/model/aimodels.js +1 -1
- package/src/aicore/model/aireply.js +1 -1
- package/src/aicore/pipeline/airesponseapplier.js +2 -2
- package/src/aicore/pipeline/airesponseparser.js +2 -2
- package/src/aicore/ui/aidisclaimerview.js +1 -1
- package/src/aicore/ui/aiskeleton.js +1 -1
- package/src/aicore/ui/aispinner.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
- package/src/aicore/utils/common-translations.js +1 -1
- package/src/aicore/utils/createresizebutton.js +1 -1
- package/src/aicore/utils/documentposition.js +1 -1
- package/src/aicore/utils/documentrange.js +1 -1
- package/src/aicore/utils/eventnames.js +1 -1
- package/src/aicore/utils/geteditorfromcontext.js +1 -1
- package/src/aicore/utils/getoperationsfromreply.js +1 -1
- package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
- package/src/aicore/utils/htmlparser.js +1 -1
- package/src/aicore/utils/htmlstreamer.js +1 -1
- package/src/aieditorintegration/aieditorintegration.js +1 -1
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
- package/src/aiquickactions/aiquickactions.js +1 -1
- package/src/aiquickactions/aiquickactionscommand.js +1 -1
- package/src/aiquickactions/aiquickactionsediting.js +1 -1
- package/src/aiquickactions/aiquickactionsui.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
- package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
- package/src/aireviewmode/aireviewmode.js +1 -1
- package/src/aireviewmode/aireviewmodecontroller.js +1 -1
- package/src/aireviewmode/aireviewmodeediting.js +1 -1
- package/src/aireviewmode/aireviewmodeui.js +1 -1
- package/src/aireviewmode/model/aireviewcheck.js +1 -1
- package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
- package/src/aireviewmode/model/aireviewchecklist.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
- package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
- package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodefinishreviewbuttonview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
- package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
- package/src/aitabs/aitabs.js +1 -1
- package/src/aitabs/aitabsmainview.js +1 -1
- package/src/aitabs/tabs/aitabsview.js +1 -1
- package/src/aitabs/tabs/tabbuttonview.js +1 -1
- package/src/aitabs/tabs/tabpanelview.js +1 -1
- package/src/errors.js +1 -1
- package/src/index.js +1 -1
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x1a2717=_0x1917;(function(_0x3ea692,_0x521067){const _0x62027f=_0x1917,_0x1ac591=_0x3ea692();while(!![]){try{const _0x154e67=-parseInt(_0x62027f(0x243))/0x1+-parseInt(_0x62027f(0x291))/0x2*(parseInt(_0x62027f(0x18a))/0x3)+parseInt(_0x62027f(0x263))/0x4*(-parseInt(_0x62027f(0x1df))/0x5)+parseInt(_0x62027f(0x284))/0x6+parseInt(_0x62027f(0x258))/0x7*(parseInt(_0x62027f(0x209))/0x8)+parseInt(_0x62027f(0x2bb))/0x9+parseInt(_0x62027f(0x1e8))/0xa*(parseInt(_0x62027f(0x1ab))/0xb);if(_0x154e67===_0x521067)break;else _0x1ac591['push'](_0x1ac591['shift']());}catch(_0x36dc9c){_0x1ac591['push'](_0x1ac591['shift']());}}}(_0xf9cb,0x5722c));import{ContextPlugin as _0x5f0104,Editor as _0x38df1b}from'ckeditor5/src/core.js';function _0x1917(_0x65c98a,_0x1b15d9){const _0xf9cb00=_0xf9cb();return _0x1917=function(_0x191766,_0x41d1d3){_0x191766=_0x191766-0x16d;let _0x4805e3=_0xf9cb00[_0x191766];return _0x4805e3;},_0x1917(_0x65c98a,_0x1b15d9);}import{CKEditorError as _0x8ac84b,logError as _0x38d8c6,scrollViewportToShowTarget as _0x1bc34d,uid as _0x5102d0}from'ckeditor5/src/utils.js';import{AIConnector as _0x2c18b8}from'../aicore/aiconnector.js';import{AITabs as _0x14453f}from'../aitabs/aitabs.js';import{AIChatConversation as _0x151ae4}from'./model/aichatconversation.js';import{getTranslation as _0x10e65f}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x280f3a}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x4b3c6b}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x2dcedc}from'./model/aichatmodels.js';import{getEditorFromContext as _0x3c8c69}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x547b50,DATA_ID_MODEL_ATTRIBUTE as _0x5738df}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x3ee9ea,getOperationsFromReply as _0x4b52ab}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x38d747,getMinimalSelection as _0x2c6897}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x54ad58,_DetachOperation as _0x200188}from'ckeditor5/src/engine.js';import{findOne as _0x139136,getAttribute as _0x5a6aa8,serialize as _0x3a9a66,Document as _0x55df7e,findByAttribute as _0xf37b8c}from'../aicore/utils/htmlparser.js';import{IconAI as _0x18af1f}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x45e5e0}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x4ba62e}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x5f0104{[_0x1a2717(0x17a)];[_0x1a2717(0x236)];[_0x1a2717(0x205)];[_0x1a2717(0x21e)];[_0x1a2717(0x226)]=new Map();[_0x1a2717(0x16e)]=null;[_0x1a2717(0x20c)]=!0x1;static get[_0x1a2717(0x1af)](){return[_0x2c18b8,_0x4ba62e,_0x547b50];}static get[_0x1a2717(0x250)](){const _0x40c95e=_0x1a2717;return _0x40c95e(0x1ae);}static get[_0x1a2717(0x29d)](){return!0x0;}static get[_0x1a2717(0x1d8)](){return!0x0;}[_0x1a2717(0x245)](){const _0x2b8f9e=_0x1a2717;this[_0x2b8f9e(0x236)]=this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x221)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x23a)),this[_0x2b8f9e(0x205)]=this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x221)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x1b3)),this[_0x2b8f9e(0x17a)]=this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x221)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x1b4)),this[_0x2b8f9e(0x21e)]=new _0x2dcedc({'connector':this[_0x2b8f9e(0x236)],'availableModels':this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x282)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x230)),'defaultModelId':this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x282)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x2ad))});const _0x1cc82d=this[_0x2b8f9e(0x26f)][_0x2b8f9e(0x221)][_0x2b8f9e(0x1aa)](_0x2b8f9e(0x267));this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x201),()=>{const _0x2008e3=_0x2b8f9e;this[_0x2008e3(0x17d)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x174),(_0x28d45b,_0x4cc20c)=>{const _0x957b4f=_0x2b8f9e;this[_0x957b4f(0x223)]({'userMessage':_0x4cc20c});}),this[_0x2b8f9e(0x1a3)](_0x1cc82d,_0x2b8f9e(0x1ef),(_0x1652a9,_0x4e44eb)=>{const _0x264311=_0x2b8f9e;this[_0x264311(0x1f2)](_0x4e44eb);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x272),()=>{const _0x27ca3b=_0x2b8f9e;_0x1cc82d[_0x27ca3b(0x198)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x25c),async()=>{const _0x176bc1=_0x2b8f9e;await this[_0x176bc1(0x2c3)](),await this[_0x176bc1(0x1ce)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x19f),()=>{const _0x549ff5=_0x2b8f9e;this[_0x549ff5(0x298)]?.[_0x549ff5(0x186)](_0x10e65f(this[_0x549ff5(0x26f)][_0x549ff5(0x1da)],_0x549ff5(0x195)));}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x1e5),(_0x588d1a,_0x5e17ba)=>{const _0xf5d99e=_0x2b8f9e;this[_0xf5d99e(0x298)]?.[_0xf5d99e(0x1a1)](Array[_0xf5d99e(0x1ba)](_0x5e17ba));}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x271),(_0x5873e8,_0x14ff90)=>{const _0x3c6fa9=_0x2b8f9e;this[_0x3c6fa9(0x298)]?.[_0x3c6fa9(0x271)](_0x14ff90);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x187),(_0x556a86,_0x1fa481)=>{const _0x3de392=_0x2b8f9e;this[_0x3de392(0x298)]?.[_0x3de392(0x187)](_0x1fa481[_0x3de392(0x20e)],_0x1fa481[_0x3de392(0x215)]);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x270),(_0x1bb4aa,_0x4102ce)=>{const _0x1b6706=_0x2b8f9e;this[_0x1b6706(0x19b)](_0x4102ce);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x1c6),(_0x24c845,_0x5e187e)=>{const _0x127676=_0x2b8f9e;this[_0x127676(0x298)]?.[_0x127676(0x1c6)](_0x5e187e[_0x127676(0x202)],_0x5e187e[_0x127676(0x27d)],_0x5e187e[_0x127676(0x1b7)]);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x2a1),()=>{const _0x315058=_0x2b8f9e;this[_0x315058(0x180)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x184),()=>{const _0x230c54=_0x2b8f9e;this[_0x230c54(0x1e2)]();}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x2cc),(_0x41f3dc,_0x41986a)=>{const _0x3ee765=_0x2b8f9e;this[_0x3ee765(0x298)]?.[_0x3ee765(0x269)](_0x41986a);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x1f1),(_0x357d29,{replyId:_0x437523})=>{const _0x17880e=_0x2b8f9e;console[_0x17880e(0x1a0)](_0x17880e(0x290),_0x437523);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x27b),(_0x55af3b,{replyId:_0x45f4f1})=>{const _0x228880=_0x2b8f9e;console[_0x228880(0x1a0)](_0x228880(0x27a),_0x45f4f1);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x18f),(_0x518ac5,_0x5bc460)=>{const _0x2adbfd=_0x2b8f9e;this[_0x2adbfd(0x26f)][_0x2adbfd(0x221)][_0x2adbfd(0x1aa)](_0x4ba62e)[_0x2adbfd(0x1eb)](),this[_0x2adbfd(0x2b3)](_0x5bc460);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x1fe),(_0x104b6e,{replyId:_0x56cfa1,partIndex:_0x1c7bac})=>{const _0x70fdda=_0x2b8f9e;this[_0x70fdda(0x20c)]=this[_0x70fdda(0x205)][_0x70fdda(0x1a8)],this[_0x70fdda(0x244)](_0x56cfa1,_0x1c7bac);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x268),(_0x1e4f56,{replyId:_0x27909e,partIndex:_0x274253})=>{const _0x42a748=_0x2b8f9e,_0x53f234=this[_0x42a748(0x208)](_0x27909e,_0x274253);_0x53f234&&_0x42a748(0x26e)!=_0x53f234[_0x42a748(0x1f5)][_0x42a748(0x190)][_0x42a748(0x1f7)]&&this[_0x42a748(0x17a)][_0x42a748(0x28b)]([_0x53f234[_0x42a748(0x1f5)]],_0x42a748(0x1c7));}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x21f),()=>{const _0x4c706a=_0x2b8f9e;this[_0x4c706a(0x17a)][_0x4c706a(0x2a0)](_0x4c706a(0x1c7));}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x237),(_0x289709,_0x10b502)=>{const _0xe5a2ff=_0x2b8f9e;this[_0xe5a2ff(0x26f)][_0xe5a2ff(0x221)][_0xe5a2ff(0x1aa)](_0x4ba62e)[_0xe5a2ff(0x1eb)](),this[_0xe5a2ff(0x229)](_0x10b502);}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x25e),async(_0x34eb71,{replyId:_0x372dbf,showDiff:_0x4b2595})=>{const _0x51a994=_0x2b8f9e,{reply:_0x18bcf3}=this[_0x51a994(0x1c3)](_0x372dbf),_0x608a41=_0x18bcf3[_0x51a994(0x29e)]({'showDiff':_0x4b2595});await this[_0x51a994(0x205)][_0x51a994(0x1c1)]({'id':_0x18bcf3['id'],'parts':_0x608a41,'renderingStrategy':_0x51a994(0x235)});}),this[_0x2b8f9e(0x1a3)](this[_0x2b8f9e(0x205)],_0x2b8f9e(0x27c),(_0x3dafe6,{replyId:_0x1e2edd,partIndex:_0x2fb74a})=>{const _0x5d39ab=_0x2b8f9e;this[_0x5d39ab(0x16e)]?.[_0x5d39ab(0x21c)]==_0x1e2edd&&this[_0x5d39ab(0x16e)]?.[_0x5d39ab(0x2a7)]==_0x2fb74a&&this[_0x5d39ab(0x26f)][_0x5d39ab(0x221)][_0x5d39ab(0x1aa)](_0x4ba62e)[_0x5d39ab(0x1eb)]();const {reply:_0x43ccad}=this[_0x5d39ab(0x1c3)](_0x1e2edd);_0x43ccad[_0x5d39ab(0x24a)](_0x2fb74a,_0x5d39ab(0x2b2)),this[_0x5d39ab(0x17a)][_0x5d39ab(0x2a0)](_0x5d39ab(0x1c7));});}async[_0x1a2717(0x175)](){const _0x301f1a=_0x1a2717;this[_0x301f1a(0x26f)]instanceof _0x38df1b?this[_0x301f1a(0x1fc)](this[_0x301f1a(0x26f)]):this[_0x301f1a(0x1a3)](this[_0x301f1a(0x26f)][_0x301f1a(0x204)],_0x301f1a(0x193),(_0x13962f,_0x3cb848)=>{const _0x4c99f7=_0x301f1a;_0x3cb848['on'](_0x4c99f7(0x19c),()=>{const _0x2271f6=_0x4c99f7;this[_0x2271f6(0x1fc)](_0x3cb848);});}),await this[_0x301f1a(0x17d)]();}[_0x1a2717(0x2b3)](_0x31b943){const _0x33ff2d=_0x1a2717,_0x503e05=_0x3c8c69(this[_0x33ff2d(0x26f)]);if(!_0x503e05[_0x33ff2d(0x221)][_0x33ff2d(0x29f)](_0x33ff2d(0x1fd)))throw new _0x8ac84b(_0x33ff2d(0x1e9),null);const _0x1b2f38=this[_0x33ff2d(0x26f)][_0x33ff2d(0x221)][_0x33ff2d(0x1aa)](_0x33ff2d(0x1fa)),{reply:_0x37b245,interaction:_0x5bf2e6}=this[_0x33ff2d(0x1c3)](_0x31b943[_0x33ff2d(0x21c)]),_0x28ca0f=this[_0x33ff2d(0x208)](_0x31b943[_0x33ff2d(0x21c)],_0x31b943[_0x33ff2d(0x2a7)]),_0xfa7a51=void 0x0!==_0x31b943[_0x33ff2d(0x2a7)]?[_0x37b245[_0x33ff2d(0x2ac)][_0x31b943[_0x33ff2d(0x2a7)]]]:_0x37b245[_0x33ff2d(0x2ac)][_0x33ff2d(0x188)](_0x3eeeef=>_0x33ff2d(0x1d9)==_0x3eeeef[_0x33ff2d(0x1a9)]),_0x11fa9a=_0xfa7a51[_0x33ff2d(0x179)](_0x138db2=>_0x37b245[_0x33ff2d(0x2ac)][_0x33ff2d(0x2a3)](_0x138db2));if(!_0x28ca0f||_0x33ff2d(0x26e)==_0x28ca0f[_0x33ff2d(0x1f5)][_0x33ff2d(0x190)][_0x33ff2d(0x1f7)])return void _0x11fa9a[_0x33ff2d(0x213)](_0x5836bf=>_0x37b245[_0x33ff2d(0x24a)](_0x5836bf,_0x33ff2d(0x279)));_0x11fa9a[_0x33ff2d(0x213)](_0x161b59=>_0x37b245[_0x33ff2d(0x24a)](_0x161b59,_0x33ff2d(0x1cf)));const _0x80516e=_0x4b52ab({'editor':_0x503e05,'reply':_0x37b245,'interaction':_0x5bf2e6,'groups':_0xfa7a51,'transform':!0x0,'documentCompare':_0x1b2f38,'documentCompareOptions':{'anchor':_0x33ff2d(0x254),'markDeletions':!0x0}});let _0x41bc01;_0x28ca0f&&this[_0x33ff2d(0x2b4)](_0x28ca0f[_0x33ff2d(0x1f5)]),_0x503e05[_0x33ff2d(0x29b)][_0x33ff2d(0x27e)](_0x34328c=>{const _0xe2904f=_0x33ff2d;_0x41bc01=_0x34328c[_0xe2904f(0x1d6)],_0x503e05[_0xe2904f(0x221)][_0xe2904f(0x1aa)](_0xe2904f(0x178))[_0xe2904f(0x1f3)](_0x80516e),this[_0xe2904f(0x17a)][_0xe2904f(0x2a0)](_0xe2904f(0x1c7));}),this[_0x33ff2d(0x226)][_0x33ff2d(0x2a5)](_0x41bc01,{'interactionId':_0x5bf2e6['id'],'replyId':_0x37b245['id'],'indexes':_0x11fa9a[_0x33ff2d(0x207)]()}),this[_0x33ff2d(0x18e)](_0x37b245);}[_0x1a2717(0x229)](_0x95570b){const _0x1be94f=_0x1a2717,_0x24d139=_0x3c8c69(this[_0x1be94f(0x26f)]),_0x5226fe=this[_0x1be94f(0x26f)][_0x1be94f(0x221)][_0x1be94f(0x1aa)](_0x547b50),{reply:_0x1120f6,interaction:_0x2700f7}=this[_0x1be94f(0x1c3)](_0x95570b[_0x1be94f(0x21c)]),_0x403d39=this[_0x1be94f(0x208)](_0x95570b[_0x1be94f(0x21c)],_0x95570b[_0x1be94f(0x2a7)]),_0x2c4df8=void 0x0!==_0x95570b[_0x1be94f(0x2a7)]?[_0x1120f6[_0x1be94f(0x2ac)][_0x95570b[_0x1be94f(0x2a7)]]]:_0x1120f6[_0x1be94f(0x2ac)][_0x1be94f(0x188)](_0x172df6=>_0x1be94f(0x1d9)==_0x172df6[_0x1be94f(0x1a9)]),_0x12d8e0=_0x2c4df8[_0x1be94f(0x179)](_0x2a4bdc=>_0x1120f6[_0x1be94f(0x2ac)][_0x1be94f(0x2a3)](_0x2a4bdc));if(!_0x403d39||_0x1be94f(0x26e)==_0x403d39[_0x1be94f(0x1f5)][_0x1be94f(0x190)][_0x1be94f(0x1f7)])return void _0x12d8e0[_0x1be94f(0x213)](_0x3470e1=>_0x1120f6[_0x1be94f(0x24a)](_0x3470e1,_0x1be94f(0x279)));_0x12d8e0[_0x1be94f(0x213)](_0x1a4a57=>_0x1120f6[_0x1be94f(0x24a)](_0x1a4a57,_0x1be94f(0x1cf)));const _0x5bd8b1=_0x4b52ab({'editor':_0x24d139,'reply':_0x1120f6,'interaction':_0x2700f7,'groups':_0x2c4df8,'transform':!0x0,'documentCompare':_0x5226fe,'documentCompareOptions':{'anchor':_0x1be94f(0x254),'markDeletions':!0x1}});let _0x38ce24;_0x403d39&&this[_0x1be94f(0x2b4)](_0x403d39[_0x1be94f(0x1f5)]),_0x24d139[_0x1be94f(0x29b)][_0x1be94f(0x27e)](_0x3e9f2c=>{const _0x3773fa=_0x1be94f;_0x38ce24=_0x3e9f2c[_0x3773fa(0x1d6)];for(const _0x2b0634 of _0x5bd8b1)_0x2b0634[_0x3773fa(0x2bd)]=_0x24d139[_0x3773fa(0x29b)][_0x3773fa(0x1de)][_0x3773fa(0x1a5)],_0x3ee9ea(_0x24d139,_0x2b0634),_0x3e9f2c[_0x3773fa(0x1d6)][_0x3773fa(0x18c)](_0x2b0634),_0x24d139[_0x3773fa(0x29b)][_0x3773fa(0x295)](_0x2b0634);}),this[_0x1be94f(0x226)][_0x1be94f(0x2a5)](_0x38ce24,{'interactionId':_0x2700f7['id'],'replyId':_0x1120f6['id'],'indexes':_0x12d8e0[_0x1be94f(0x207)]()}),this[_0x1be94f(0x18e)](_0x1120f6);}[_0x1a2717(0x244)](_0x2849d9,_0x79eb8){const _0x46103f=_0x1a2717,_0x39ec60=_0x3c8c69(this[_0x46103f(0x26f)]),_0x599071=this[_0x46103f(0x208)](_0x2849d9,_0x79eb8),_0xebe400=this[_0x46103f(0x26f)][_0x46103f(0x221)][_0x46103f(0x1aa)](_0x4ba62e);if(!_0x599071)return void _0xebe400[_0x46103f(0x1eb)]();const {range:_0x16d732,currentIndex:_0x291350}=_0x599071;if(_0x46103f(0x26e)==_0x16d732[_0x46103f(0x190)][_0x46103f(0x1f7)]){const {reply:_0x3fe19a}=this[_0x46103f(0x1c3)](_0x2849d9);return _0x3fe19a[_0x46103f(0x24a)](_0x291350,_0x46103f(0x279)),void _0xebe400[_0x46103f(0x1eb)]();}if(this[_0x46103f(0x16e)]?.[_0x46103f(0x21c)]==_0x2849d9&&this[_0x46103f(0x16e)]?.[_0x46103f(0x2a7)]==_0x291350)return;this[_0x46103f(0x25f)](_0xebe400),this[_0x46103f(0x16e)]={'replyId':_0x2849d9,'partIndex':_0x291350};let _0x3f52ba=_0x39ec60[_0x46103f(0x282)][_0x46103f(0x1aa)](_0x46103f(0x1dc))||[..._0x4b3c6b];_0x39ec60[_0x46103f(0x221)][_0x46103f(0x29f)](_0x46103f(0x1fd))||(_0x3f52ba=_0x3f52ba[_0x46103f(0x188)](_0x27bab4=>_0x46103f(0x18f)!=_0x27bab4));const _0x10e417=new _0x45e5e0(_0x39ec60[_0x46103f(0x1da)],{'showDiff':this[_0x46103f(0x20c)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x46103f(0x22c)},'hideHeader':!0x0,'availableActions':_0x3f52ba});this[_0x46103f(0x25f)](_0x10e417);const {reply:_0x23e1ec}=this[_0x46103f(0x1c3)](_0x2849d9),_0xe177a5=_0x23e1ec[_0x46103f(0x29e)]({'showDiff':this[_0x46103f(0x20c)]})[_0x46103f(0x188)](_0x5c44b0=>_0x5c44b0[_0x46103f(0x25a)]),_0x4d7d68=_0xe177a5[_0x46103f(0x26a)](_0x3dc8a7=>_0x3dc8a7[_0x46103f(0x200)]==_0x291350);if(-0x1==_0x4d7d68)return;const _0x231ad8=_0xe177a5[_0x4d7d68],_0x4aca0c=_0xe177a5['at']((_0x4d7d68-0x1)%_0xe177a5[_0x46103f(0x23b)])?.[_0x46103f(0x200)],_0x457492=_0xe177a5['at']((_0x4d7d68+0x1)%_0xe177a5[_0x46103f(0x23b)])?.[_0x46103f(0x200)];_0x10e417[_0x46103f(0x2a2)]({'parts':[_0x231ad8],'renderingStrategy':_0x46103f(0x235)});const _0x442ba0=_0x291350!==_0x4aca0c;this[_0x46103f(0x2b4)](_0x16d732,!0x0),_0xebe400[_0x46103f(0x170)]({'index':_0x291350,'title':_0x10e65f(this[_0x46103f(0x26f)][_0x46103f(0x1da)],_0x46103f(0x1e4),(_0x4d7d68+0x1)[_0x46103f(0x288)]()),'icon':_0x18af1f,'mainView':_0x10e417,'showRotator':_0x442ba0,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x16d732]}),this[_0x46103f(0x205)][_0x46103f(0x1db)](_0x2849d9,_0x291350),this[_0x46103f(0x1a3)](_0x10e417,_0x46103f(0x25e),(_0x1786ce,{showDiff:_0x135576})=>{const _0x1d7d8f=_0x46103f;this[_0x1d7d8f(0x20c)]=_0x135576;const {reply:_0x32c337}=this[_0x1d7d8f(0x1c3)](_0x2849d9),_0x1c746b=_0x32c337[_0x1d7d8f(0x29e)]({'showDiff':_0x135576,'groupIndex':_0x291350});_0x10e417[_0x1d7d8f(0x2a2)]({'parts':_0x1c746b,'renderingStrategy':_0x1d7d8f(0x235)});}),this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x237),()=>{const _0x553f27=_0x46103f;this[_0x553f27(0x229)]({'replyId':_0x2849d9,'partIndex':_0x291350}),_0x442ba0?this[_0x553f27(0x244)](_0x2849d9,_0x457492):_0xebe400[_0x553f27(0x1eb)]();}),this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x18f),()=>{const _0x281dfd=_0x46103f;this[_0x281dfd(0x2b3)]({'replyId':_0x2849d9,'partIndex':_0x291350}),_0x442ba0?this[_0x281dfd(0x244)](_0x2849d9,_0x457492):_0xebe400[_0x281dfd(0x1eb)]();}),_0x442ba0&&(this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x1a4),()=>{const _0x49f4c1=_0x46103f;this[_0x49f4c1(0x244)](_0x2849d9,_0x457492);}),this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x1e3),()=>{const _0x45519f=_0x46103f;this[_0x45519f(0x244)](_0x2849d9,_0x4aca0c);})),this[_0x46103f(0x1a3)](_0xebe400,_0x46103f(0x211),()=>{const _0x5179db=_0x46103f;this[_0x5179db(0x25f)](_0xebe400),this[_0x5179db(0x25f)](_0x10e417),this[_0x5179db(0x16e)]=null;});}[_0x1a2717(0x208)](_0x243df8,_0x5243b7){const _0x196084=_0x1a2717,_0xa9bb3=_0x3c8c69(this[_0x196084(0x26f)]),{reply:_0x5efd34,interaction:_0x5d3664}=this[_0x196084(0x1c3)](_0x243df8),_0x121d57=_0x5efd34[_0x196084(0x2ac)][_0x196084(0x188)](_0x31e60e=>_0x196084(0x1d9)==_0x31e60e[_0x196084(0x1a9)]),_0x40bee9=_0x121d57[_0x196084(0x179)](_0x1401b4=>_0x5efd34[_0x196084(0x2ac)][_0x196084(0x2a3)](_0x1401b4));void 0x0===_0x5243b7&&(_0x5243b7=_0x40bee9[0x0]);const _0x1e9d15=_0x40bee9[_0x196084(0x2a3)](_0x5243b7);if(-0x1==_0x1e9d15)return null;const _0x4e5f5b=_0x121d57[_0x1e9d15],_0x5625c7=new _0x55df7e([]),_0x400f5b=new _0x55df7e([]);for(const _0x1afb7e of _0x4e5f5b[_0x196084(0x265)])if(_0x196084(0x285)!=_0x1afb7e[_0x196084(0x1f6)]&&_0x400f5b[_0x196084(0x24e)][_0x196084(0x260)](_0x1afb7e[_0x196084(0x1e6)][_0x196084(0x210)](!0x0)),_0x196084(0x238)!=_0x1afb7e[_0x196084(0x1f6)]){const _0x26b585=_0x139136(_0x367083=>_0x5a6aa8(_0x367083,_0x196084(0x280))==_0x1afb7e['id'],_0x5efd34[_0x196084(0x2b9)],!0x0);_0x5625c7[_0x196084(0x24e)][_0x196084(0x260)](_0x26b585[_0x196084(0x210)](!0x0));}if(0x0==_0x5625c7[_0x196084(0x24e)][_0x196084(0x23b)]){if(_0x4e5f5b[_0x196084(0x265)][0x0][_0x196084(0x1d4)]){const _0x5067b5=_0xf37b8c(_0x196084(0x280),_0x4e5f5b[_0x196084(0x265)][0x0][_0x196084(0x1d4)],_0x5efd34[_0x196084(0x2b9)]);_0x5625c7[_0x196084(0x24e)][_0x196084(0x21d)](_0x5067b5[_0x196084(0x210)](!0x0)),_0x400f5b[_0x196084(0x24e)][_0x196084(0x21d)](_0x5067b5[_0x196084(0x210)](!0x0)),_0x5067b5[_0x196084(0x1d0)]&&(_0x5625c7[_0x196084(0x24e)][_0x196084(0x260)](_0x5067b5[_0x196084(0x1d0)][_0x196084(0x210)](!0x0)),_0x400f5b[_0x196084(0x24e)][_0x196084(0x260)](_0x5067b5[_0x196084(0x1d0)][_0x196084(0x210)](!0x0)));}else{const _0x3ac2f9=_0x5efd34[_0x196084(0x2b9)][_0x196084(0x24e)][0x0];if(!_0x3ac2f9)return null;_0x5625c7[_0x196084(0x24e)][_0x196084(0x260)](_0x3ac2f9[_0x196084(0x210)](!0x0)),_0x400f5b[_0x196084(0x24e)][_0x196084(0x260)](_0x3ac2f9[_0x196084(0x210)](!0x0));}}const _0x93f1a2=_0x5d3664[_0x196084(0x2c4)](),_0xa0864b=_0xa9bb3[_0x196084(0x1b6)][_0x196084(0x17c)](_0x93f1a2[_0x196084(0x1ed)]),_0x5a111d=_0x3a9a66(_0x5625c7),_0x2ab0ee=_0xa9bb3[_0x196084(0x1b6)][_0x196084(0x17c)](_0x5a111d),_0x422653=_0xa9bb3[_0x196084(0x1b6)][_0x196084(0x17c)](_0x5a111d),_0x565fb2=_0xa9bb3[_0x196084(0x29b)][_0x196084(0x232)](_0x2ab0ee,0x0),_0x3e1ed6=_0x3a9a66(_0x400f5b),_0x4e2bad={'anchor':_0x565fb2,'markDeletions':!0x1},_0x49127c=_0xa9bb3[_0x196084(0x221)][_0x196084(0x1aa)](_0x547b50)[_0x196084(0x2cb)](_0x5a111d,_0x3e1ed6,_0x4e2bad)[_0x196084(0x212)]();if(!_0x49127c[_0x196084(0x23b)])return null;_0xa9bb3[_0x196084(0x29b)][_0x196084(0x27e)](_0x2f91f9=>{const _0x32d5ce=_0x196084;for(const _0x5213bb of _0x49127c)if(_0x32d5ce(0x294)==_0x5213bb[_0x32d5ce(0x1f6)]){const _0x295577=_0x5213bb[_0x32d5ce(0x262)],_0x82f3fe=_0x5213bb[_0x32d5ce(0x177)],_0x44b915=new _0x200188(_0x295577,_0x82f3fe);_0x2f91f9[_0x32d5ce(0x1d6)][_0x32d5ce(0x18c)](_0x44b915),_0xa9bb3[_0x32d5ce(0x29b)][_0x32d5ce(0x295)](_0x44b915);}else _0x32d5ce(0x278)!==_0x5213bb[_0x32d5ce(0x1f6)]&&(_0x5213bb[_0x32d5ce(0x2bd)]=null,_0x5213bb[_0x32d5ce(0x20a)]=!0x1,_0x2f91f9[_0x32d5ce(0x1d6)][_0x32d5ce(0x18c)](_0x5213bb),_0xa9bb3[_0x32d5ce(0x29b)][_0x32d5ce(0x295)](_0x5213bb));});const _0xd3560f=_0x2c6897(_0xa9bb3,_0x49127c,_0x2ab0ee);_0x38d747(_0xa9bb3[_0x196084(0x29b)],_0xd3560f);const _0x1c994e=_0xd3560f[_0x196084(0x23c)]()[_0x196084(0x2c6)][_0x196084(0x217)][_0x196084(0x207)](),_0x1026c0=_0xd3560f[_0x196084(0x23c)]()[_0x196084(0x2b1)][_0x196084(0x217)][_0x196084(0x207)](),_0x395ee5=[];let _0x274057=_0x2ab0ee,_0x16149a=_0x422653;for(let _0x5a63f4=0x0;_0x5a63f4<_0x1026c0[_0x196084(0x23b)];_0x5a63f4++){const _0x11f2e6=_0x274057[_0x196084(0x192)]-_0x1026c0[_0x5a63f4];_0x395ee5[_0x5a63f4]=_0x16149a[_0x196084(0x192)]-_0x11f2e6,_0x274057=_0x274057[_0x196084(0x1b5)](_0x1026c0[_0x5a63f4]),_0x16149a=_0x16149a[_0x196084(0x1b5)](_0x395ee5[_0x5a63f4]);}const _0x4c776b=_0xa9bb3[_0x196084(0x29b)][_0x196084(0x242)](_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1c8)](_0x422653,_0x1c994e),_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1c8)](_0x422653,_0x395ee5)),_0x3804ee=_0x422653[_0x196084(0x1b0)](0x0)[_0x196084(0x2be)](_0x5738df),_0x1e46df=Array[_0x196084(0x1ba)](_0xa0864b[_0x196084(0x259)]())[_0x196084(0x247)](_0x9103bc=>_0x9103bc[_0x196084(0x2be)](_0x5738df)==_0x3804ee)[_0x196084(0x22f)](),_0x47ab0b=_0x4c776b[_0x196084(0x2c6)][_0x196084(0x217)][_0x196084(0x207)](),_0x537add=_0x4c776b[_0x196084(0x2b1)][_0x196084(0x217)][_0x196084(0x207)]();_0x47ab0b[0x0]=_0x1e46df[0x0]+_0x47ab0b[0x0],_0x537add[0x0]=_0x1e46df[0x0]+_0x537add[0x0];let _0x4573fb=_0xa9bb3[_0x196084(0x29b)][_0x196084(0x242)](_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1c8)](_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1de)][_0x196084(0x1ac)](),_0x47ab0b),_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1c8)](_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1de)][_0x196084(0x1ac)](),_0x537add));const _0x63f680=_0xa9bb3[_0x196084(0x29b)][_0x196084(0x1de)][_0x196084(0x266)][_0x196084(0x212)](_0x93f1a2[_0x196084(0x1a5)]);for(const _0x4a66ca of _0x63f680)_0x4573fb=_0x54ad58[_0x196084(0x17f)](_0x4573fb[_0x196084(0x222)](_0x4a66ca));return{'range':_0x4573fb,'currentIndex':_0x5243b7};}[_0x1a2717(0x1fc)](_0x2f72c0){const _0x37d891=_0x1a2717;if(!_0x2f72c0[_0x37d891(0x221)][_0x37d891(0x29f)](_0x37d891(0x22b)))return;const _0x398fe7=_0x2f72c0[_0x37d891(0x172)][_0x37d891(0x1aa)](_0x37d891(0x296)),_0x37a5a3=_0x2f72c0[_0x37d891(0x172)][_0x37d891(0x1aa)](_0x37d891(0x251));this[_0x37d891(0x1a3)](_0x398fe7,_0x37d891(0x19e),(_0x48cdc0,_0x273115,_0xa77ff7)=>{const _0x1711f3=_0x37d891,_0x235983=this[_0x1711f3(0x226)][_0x1711f3(0x1aa)](_0x273115);if(!_0x235983)return;const _0x266bf2=this[_0x1711f3(0x298)][_0x1711f3(0x183)](_0x235983[_0x1711f3(0x1d2)])[_0x1711f3(0x1b2)](_0x235983[_0x1711f3(0x21c)]);_0x235983[_0x1711f3(0x1f8)][_0x1711f3(0x213)](_0x40d004=>_0x266bf2[_0x1711f3(0x24a)](_0x40d004,_0x1711f3(0x1d9))),this[_0x1711f3(0x226)][_0x1711f3(0x171)](_0x273115),this[_0x1711f3(0x226)][_0x1711f3(0x2a5)](_0xa77ff7,_0x235983);}),this[_0x37d891(0x1a3)](_0x37a5a3,_0x37d891(0x19e),(_0xffa3ff,_0x4e1b1e,_0x21dbc5)=>{const _0x30b678=_0x37d891,_0x1109e9=this[_0x30b678(0x226)][_0x30b678(0x1aa)](_0x4e1b1e);if(!_0x1109e9)return;const _0x5a9722=this[_0x30b678(0x298)][_0x30b678(0x183)](_0x1109e9[_0x30b678(0x1d2)])[_0x30b678(0x1b2)](_0x1109e9[_0x30b678(0x21c)]);_0x1109e9[_0x30b678(0x1f8)][_0x30b678(0x213)](_0x3ecfb6=>_0x5a9722[_0x30b678(0x24a)](_0x3ecfb6,_0x30b678(0x1cf))),this[_0x30b678(0x226)][_0x30b678(0x171)](_0x4e1b1e),this[_0x30b678(0x226)][_0x30b678(0x2a5)](_0x21dbc5,_0x1109e9);});}async[_0x1a2717(0x287)](_0xcc65c8){const _0x126e21=_0x1a2717;this[_0x126e21(0x26f)][_0x126e21(0x221)][_0x126e21(0x1aa)](_0x4ba62e)[_0x126e21(0x1eb)](),this[_0x126e21(0x205)][_0x126e21(0x228)](_0x126e21(0x235)),this[_0x126e21(0x205)][_0x126e21(0x2a6)](!0x0),await this[_0x126e21(0x2c3)]();try{const _0x1c5ad5=this[_0x126e21(0x26f)][_0x126e21(0x221)][_0x126e21(0x1aa)](_0x14453f);this[_0x126e21(0x173)]('\x20'),_0x1c5ad5[_0x126e21(0x1b8)][_0x126e21(0x216)](_0x126e21(0x1cc)),await this[_0x126e21(0x17d)](_0xcc65c8);const {sessionId:_0x262cdc}=this[_0x126e21(0x17a)][_0x126e21(0x1ea)]();await this[_0x126e21(0x298)][_0x126e21(0x2c1)](_0xcc65c8,_0x262cdc),this[_0x126e21(0x298)][_0x126e21(0x16f)]()&&this[_0x126e21(0x298)][_0x126e21(0x186)](_0x10e65f(this[_0x126e21(0x26f)][_0x126e21(0x1da)],_0x126e21(0x195)));}catch(_0x142f91){console[_0x126e21(0x206)](_0x126e21(0x26b),_0x142f91);}finally{this[_0x126e21(0x205)][_0x126e21(0x21b)](),this[_0x126e21(0x205)][_0x126e21(0x228)](_0x126e21(0x276)),this[_0x126e21(0x205)][_0x126e21(0x2a6)](!0x1);}}[_0x1a2717(0x2c9)](_0x15fdf7){const _0xe13d5f=_0x1a2717;this[_0xe13d5f(0x298)]['id']===_0x15fdf7&&this[_0xe13d5f(0x17d)]();}async[_0x1a2717(0x1cb)](){const _0x599544=_0x1a2717,_0x41a861=this[_0x599544(0x17a)][_0x599544(0x2c2)]();this[_0x599544(0x298)]?.[_0x599544(0x273)](_0x41a861),this[_0x599544(0x298)]?.[_0x599544(0x186)](_0x10e65f(this[_0x599544(0x26f)][_0x599544(0x1da)],_0x599544(0x195)));}[_0x1a2717(0x24b)](){const _0x292bb8=_0x1a2717;this[_0x292bb8(0x298)]?.[_0x292bb8(0x1b9)]();}[_0x1a2717(0x1a6)](){const _0x16fc36=_0x1a2717;this[_0x16fc36(0x205)][_0x16fc36(0x1a6)]();}async[_0x1a2717(0x201)](){const _0x5d5f46=_0x1a2717;await this[_0x5d5f46(0x17d)]();}async[_0x1a2717(0x1a7)]({message:_0x2919ba,quickActionData:_0x4d66f1}){const _0x5a50ee=_0x1a2717;await this[_0x5a50ee(0x223)]({'userMessage':_0x2919ba,'quickActionData':_0x4d66f1});}[_0x1a2717(0x28e)](){const _0x20a41f=_0x1a2717,_0x2bec0a=this[_0x20a41f(0x26f)][_0x20a41f(0x282)][_0x20a41f(0x1aa)](_0x20a41f(0x2a4));if(!_0x2bec0a)throw new _0x8ac84b(_0x20a41f(0x23e),this);return _0x2bec0a;}async[_0x1a2717(0x17d)](_0xb8223f){const _0x31b99b=_0x1a2717;try{this[_0x31b99b(0x205)][_0x31b99b(0x22d)](),await this[_0x31b99b(0x191)](_0xb8223f);}catch(_0x4e89c6){_0x38d8c6(_0x31b99b(0x2a8),_0x4e89c6),this[_0x31b99b(0x298)]=void 0x0,this[_0x31b99b(0x205)][_0x31b99b(0x176)]();}}async[_0x1a2717(0x191)](_0x1e5b31){const _0x495fbd=_0x1a2717,_0x21436b=this[_0x495fbd(0x26f)][_0x495fbd(0x221)][_0x495fbd(0x1aa)](_0x4ba62e);let _0x45d2b2;_0x21436b[_0x495fbd(0x1d3)]&&_0x21436b[_0x495fbd(0x1eb)](),_0x1e5b31||!this[_0x495fbd(0x298)]?_0x45d2b2=this[_0x495fbd(0x26f)][_0x495fbd(0x282)][_0x495fbd(0x1aa)](_0x495fbd(0x2ad)):this[_0x495fbd(0x205)][_0x495fbd(0x248)]&&(_0x45d2b2=this[_0x495fbd(0x298)][_0x495fbd(0x181)]['id']),await this[_0x495fbd(0x2c3)]();const _0x44a8ec=this[_0x495fbd(0x28e)](),_0x1e7629=_0x1e5b31||_0x5102d0();this[_0x495fbd(0x298)]=new _0x151ae4({'connector':this[_0x495fbd(0x236)],'chatModels':this[_0x495fbd(0x21e)],'selectedModelId':_0x45d2b2,'conversationId':_0x1e7629,'group':_0x44a8ec,'getEditor':()=>_0x3c8c69(this[_0x495fbd(0x26f)])}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1f9),(_0x41db9e,_0x332982)=>{const _0x4b35bc=_0x495fbd;this[_0x4b35bc(0x205)][_0x4b35bc(0x1c4)](_0x332982),this[_0x4b35bc(0x205)][_0x4b35bc(0x275)](),this[_0x4b35bc(0x205)][_0x4b35bc(0x197)](),this[_0x4b35bc(0x205)][_0x4b35bc(0x253)](),_0x1e5b31||(this[_0x4b35bc(0x205)][_0x4b35bc(0x29a)](),this[_0x4b35bc(0x298)]?.[_0x4b35bc(0x186)](_0x10e65f(this[_0x4b35bc(0x26f)][_0x4b35bc(0x1da)],_0x4b35bc(0x195))));}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x239),(_0xecb250,_0x38e42a)=>{const _0x27f626=_0x495fbd;this[_0x27f626(0x205)][_0x27f626(0x24f)](_0x38e42a[_0x27f626(0x1ff)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x2a9),(_0x4181fa,_0x42a974)=>{const _0x44d024=_0x495fbd;this[_0x44d024(0x205)][_0x44d024(0x26c)](_0x42a974);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x25d),()=>{const _0x3082b6=_0x495fbd;this[_0x3082b6(0x205)][_0x3082b6(0x2b6)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x2c8),()=>{const _0x298e7f=_0x495fbd;this[_0x298e7f(0x205)][_0x298e7f(0x2b6)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x17e),(_0xce38e5,_0x4039a9)=>{const _0x1c67d3=_0x495fbd;this[_0x1c67d3(0x205)][_0x1c67d3(0x1b1)](_0x4039a9,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x224),(_0xf32130,_0x5af1ce)=>{const _0x52e9ad=_0x495fbd;this[_0x52e9ad(0x205)][_0x52e9ad(0x1b1)](_0x5af1ce,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x25b),()=>{const _0x51b84f=_0x495fbd;this[_0x51b84f(0x205)][_0x51b84f(0x28a)]();}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x261),async()=>{const _0x3f37b6=_0x495fbd;await this[_0x3f37b6(0x205)][_0x3f37b6(0x19d)]();}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1e0),(_0x867b60,_0x390535)=>{const _0x3886fd=_0x495fbd;this[_0x3886fd(0x205)][_0x3886fd(0x17b)](_0x390535['id']);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x240),(_0x27ecfe,_0x4b98ee,_0x5256d4)=>{const _0x550c82=_0x495fbd;this[_0x550c82(0x173)](_0x4b98ee,_0x5256d4);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x227),(_0x20092e,_0x3149eb)=>{const _0x4fc42d=_0x495fbd;_0x4fc42d(0x2c5)===_0x3149eb[_0x4fc42d(0x1f6)]?this[_0x4fc42d(0x205)][_0x4fc42d(0x21a)](_0x3149eb):this[_0x4fc42d(0x205)][_0x4fc42d(0x29c)](_0x3149eb);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1bf),async(_0x459968,_0x17a071)=>{const _0x26efab=_0x495fbd;await this[_0x26efab(0x292)]({'reply':_0x17a071});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1d1),(_0x1d1862,{reply:_0x85b3df,index:_0x220975,state:_0x3a2ed6})=>{const _0x3b1f44=_0x495fbd;this[_0x3b1f44(0x205)][_0x3b1f44(0x249)]({'id':_0x85b3df['id'],'index':_0x220975,'state':_0x3a2ed6});}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1bd),(_0x5a7f4b,_0x4cfffa)=>{const _0x1becfc=_0x495fbd;if(this[_0x1becfc(0x205)][_0x1becfc(0x1bb)](_0x4cfffa[_0x1becfc(0x22e)],_0x4cfffa[_0x1becfc(0x277)]),_0x1becfc(0x286)===_0x4cfffa[_0x1becfc(0x22e)][_0x1becfc(0x1f6)]){const _0x279f03=[..._0x3c8c69(this[_0x1becfc(0x26f)])[_0x1becfc(0x29b)][_0x1becfc(0x1de)][_0x1becfc(0x286)][_0x1becfc(0x20b)]()];this[_0x1becfc(0x17a)][_0x1becfc(0x28b)](_0x279f03,_0x1becfc(0x220)+this[_0x1becfc(0x298)]?.['id']);}}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x196),(_0xbb8d73,_0x1b526c)=>{const _0x9e3b1e=_0x495fbd;this[_0x9e3b1e(0x205)][_0x9e3b1e(0x270)](_0x1b526c[_0x9e3b1e(0x182)]),_0x9e3b1e(0x20d)==_0x1b526c[_0x9e3b1e(0x182)]&&this[_0x9e3b1e(0x24b)](),_0x9e3b1e(0x286)===_0x1b526c[_0x9e3b1e(0x1f6)]&&this[_0x9e3b1e(0x17a)][_0x9e3b1e(0x2a0)](_0x9e3b1e(0x220)+this[_0x9e3b1e(0x298)]?.['id']);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1ee),(_0x28755e,_0x217a4e)=>{const _0x19b750=_0x495fbd;this[_0x19b750(0x205)][_0x19b750(0x241)](_0x217a4e[_0x19b750(0x22e)][_0x19b750(0x182)],_0x217a4e[_0x19b750(0x277)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x264),(_0x2b81a1,_0x43288d)=>{const _0x2225bc=_0x495fbd;this[_0x2225bc(0x205)][_0x2225bc(0x2af)](_0x43288d[_0x2225bc(0x233)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x2b8),(_0x1961a6,_0x3de913)=>{const _0x45f7f6=_0x495fbd;this[_0x45f7f6(0x205)][_0x45f7f6(0x199)](_0x3de913[_0x45f7f6(0x1c5)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x293),(_0x2327a4,_0x3022a6)=>{const _0x5b2997=_0x495fbd;this[_0x5b2997(0x205)][_0x5b2997(0x19a)](_0x3022a6[_0x5b2997(0x202)],_0x3022a6[_0x5b2997(0x20e)],_0x3022a6[_0x5b2997(0x28d)],_0x3022a6[_0x5b2997(0x1b7)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1c9),(_0x1e2830,_0x1c9d6c)=>{const _0x44c14d=_0x495fbd;this[_0x44c14d(0x205)][_0x44c14d(0x1fb)](_0x1c9d6c[_0x44c14d(0x202)],_0x1c9d6c[_0x44c14d(0x289)],_0x1c9d6c[_0x44c14d(0x18b)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x1be),(_0x55c08f,_0x30508c)=>{const _0x1a2074=_0x495fbd;this[_0x1a2074(0x205)][_0x1a2074(0x297)](_0x30508c);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x22a),(_0xc306b2,_0x41073b)=>{const _0x2ef3ef=_0x495fbd;this[_0x2ef3ef(0x205)][_0x2ef3ef(0x189)](_0x41073b[_0x2ef3ef(0x181)],_0x41073b[_0x2ef3ef(0x23d)]);}),this[_0x495fbd(0x298)]['on'](_0x495fbd(0x206),(_0x3adfda,{error:_0x5421a0,interactionId:_0x482a0f,fileName:_0x37e282,url:_0xa97b92,sourceId:_0x403efc,sourceLabel:_0x3fb38})=>{const _0x535d71=_0x495fbd,_0x19f458=_0x482a0f?_0x482a0f+':'+_0x5102d0():_0x5102d0();_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x1ad))?this[_0x535d71(0x205)][_0x535d71(0x23f)]({'staticMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x1cd)),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x299))||_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x2a8))?(this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x1f4)),'id':_0x19f458}),this[_0x535d71(0x28c)](_0x5421a0)):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x1ec))?this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x1c2),_0x37e282),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x1d5))?this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x2ba),_0xa97b92),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x24d))?this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x274)),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x2c0))?this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x246)),'id':_0x19f458}):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x283))?(_0x403efc&&this[_0x535d71(0x205)][_0x535d71(0x1e7)](_0x403efc),this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x2ab),_0x3fb38||_0x535d71(0x20e)),'id':_0x19f458}),this[_0x535d71(0x28c)](_0x5421a0)):_0x5421a0[_0x535d71(0x1a2)][_0x535d71(0x252)](_0x535d71(0x27f))?(this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x231)),'id':_0x19f458}),this[_0x535d71(0x28c)](_0x5421a0)):(this[_0x535d71(0x205)][_0x535d71(0x26d)]({'errorMessage':_0x10e65f(this[_0x535d71(0x26f)][_0x535d71(0x1da)],_0x535d71(0x234)),'id':_0x19f458}),this[_0x535d71(0x28c)](_0x5421a0));}),await this[_0x495fbd(0x298)][_0x495fbd(0x245)](this[_0x495fbd(0x26f)][_0x495fbd(0x282)][_0x495fbd(0x1aa)](_0x495fbd(0x2b0))),_0x1e5b31||await this[_0x495fbd(0x298)][_0x495fbd(0x2c6)]();}async[_0x1a2717(0x223)]({userMessage:_0x4857fc,quickActionData:_0x41106d}){const _0x2895aa=_0x1a2717;if(!this[_0x2895aa(0x298)])throw new _0x8ac84b(_0x2895aa(0x18d));this[_0x2895aa(0x298)][_0x2895aa(0x2b7)]()&&await this[_0x2895aa(0x298)][_0x2895aa(0x28f)](this[_0x2895aa(0x17a)][_0x2895aa(0x1ea)]()),this[_0x2895aa(0x298)]['id']&&this[_0x2895aa(0x298)][_0x2895aa(0x2ca)]&&await this[_0x2895aa(0x298)][_0x2895aa(0x281)]({'userMessage':_0x4857fc,'quickActionData':_0x41106d}),this[_0x2895aa(0x257)]();}[_0x1a2717(0x257)](){const _0x4d3617=_0x1a2717,_0x36a38c=_0x3c8c69(this[_0x4d3617(0x26f)])[_0x4d3617(0x29b)],_0x1971e5=Array[_0x4d3617(0x1ba)](_0x36a38c[_0x4d3617(0x1c0)][_0x4d3617(0x194)](_0x280f3a));_0x36a38c[_0x4d3617(0x27e)](_0x363765=>{const _0x4d5458=_0x4d3617;_0x1971e5[_0x4d5458(0x213)](_0x10c6e9=>_0x363765[_0x4d5458(0x2b5)](_0x10c6e9));});}[_0x1a2717(0x219)](){const _0x2fcab8=_0x1a2717;console[_0x2fcab8(0x1a0)](_0x2fcab8(0x2bf));}[_0x1a2717(0x1f2)](_0x316cf6){const _0x53b266=_0x1a2717;this[_0x53b266(0x205)][_0x53b266(0x2bc)](_0x316cf6);}[_0x1a2717(0x28c)](_0x3a5113){const _0x295d1c=_0x1a2717;_0x38d8c6(_0x3a5113[_0x295d1c(0x1a2)]);}[_0x1a2717(0x19b)](_0x47fb80){const _0x563245=_0x1a2717;this[_0x563245(0x298)]?.[_0x563245(0x2c7)](_0x47fb80);}[_0x1a2717(0x180)](){const _0xdcb1fd=_0x1a2717;this[_0xdcb1fd(0x298)]?.[_0xdcb1fd(0x2a1)]();}[_0x1a2717(0x1e2)](){const _0x4d5aa9=_0x1a2717;this[_0x4d5aa9(0x298)]?.[_0x4d5aa9(0x184)]();}[_0x1a2717(0x1c3)](_0x51d7ca){const _0x10f7e3=_0x1a2717,[_0x1b92f4,_0x173b14]=_0x51d7ca[_0x10f7e3(0x1dd)](':'),_0x50f91e=this[_0x10f7e3(0x298)][_0x10f7e3(0x183)](_0x1b92f4),_0xc9b78e=_0x50f91e[_0x10f7e3(0x1b2)](_0x173b14);return{'interaction':_0x50f91e,'reply':_0xc9b78e};}[_0x1a2717(0x2b4)](_0x1c60cf,_0x2a7720=!0x1){const _0x33ca08=_0x1a2717,_0x39b65d=_0x3c8c69(this[_0x33ca08(0x26f)]),_0x59cc13={'target':_0x39b65d[_0x33ca08(0x1bc)][_0x33ca08(0x1b8)][_0x33ca08(0x203)][_0x33ca08(0x225)](_0x39b65d[_0x33ca08(0x1bc)][_0x33ca08(0x16d)][_0x33ca08(0x2aa)](_0x1c60cf)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x2a7720};_0x2a7720&&(_0x59cc13[_0x33ca08(0x1d7)]=!0x0),_0x1bc34d(_0x59cc13);}[_0x1a2717(0x173)](_0x512659,_0x5d5f8b=!0x1){const _0x4137a0=_0x1a2717;this[_0x4137a0(0x205)][_0x4137a0(0x240)](_0x512659||_0x10e65f(this[_0x4137a0(0x26f)][_0x4137a0(0x1da)],_0x4137a0(0x1f0)),_0x5d5f8b);}async[_0x1a2717(0x292)]({reply:_0xe9e6a,renderingStrategy:_0x5e67cb}){const _0x325da7=_0x1a2717,{id:_0x5594bc,isDone:_0xb401e1,type:_0x2ea102,parsedContent:_0x1a666d}=_0xe9e6a;if(_0x325da7(0x1ca)===_0x2ea102){const _0x3250b5=_0xe9e6a[_0x325da7(0x29e)]({'showDiff':this[_0x325da7(0x205)][_0x325da7(0x1a8)]});await this[_0x325da7(0x205)][_0x325da7(0x1c1)]({'id':_0x5594bc,'parts':_0x3250b5,'renderingStrategy':_0x5e67cb,'isDone':_0xb401e1});}else _0x325da7(0x2c5)===_0x2ea102&&await this[_0x325da7(0x205)][_0x325da7(0x1e1)]({'id':_0x5594bc,'parsedContent':_0x1a666d,'renderingStrategy':_0x5e67cb,'isDone':_0xb401e1});_0xb401e1&&_0xe9e6a[_0x325da7(0x2ae)][_0x325da7(0x23b)]>0x0&&this[_0x325da7(0x205)][_0x325da7(0x256)](_0x5594bc,_0xe9e6a[_0x325da7(0x2ae)]);}async[_0x1a2717(0x2c3)](){const _0x26083a=_0x1a2717,_0x2ec2d4=this[_0x26083a(0x298)]?.[_0x26083a(0x24c)];_0x2ec2d4&&(_0x2ec2d4[_0x26083a(0x185)](),this[_0x26083a(0x205)][_0x26083a(0x20f)](_0x2ec2d4));}async[_0x1a2717(0x1ce)](){const _0x5ce1fc=_0x1a2717,_0x535c28=this[_0x5ce1fc(0x298)]?.[_0x5ce1fc(0x24c)];if(_0x535c28){for await(const _0x4eb0d9 of _0x535c28[_0x5ce1fc(0x218)])await this[_0x5ce1fc(0x292)]({'reply':_0x4eb0d9,'renderingStrategy':_0x5ce1fc(0x235)});}}[_0x1a2717(0x18e)](_0x2d317a){const _0x4adaaa=_0x1a2717,_0x17a0d3={'positiveCount':_0x2d317a[_0x4adaaa(0x2ac)][_0x4adaaa(0x188)](_0x442495=>_0x4adaaa(0x1cf)===_0x442495[_0x4adaaa(0x1a9)])[_0x4adaaa(0x23b)],'totalCount':_0x2d317a[_0x4adaaa(0x2ac)][_0x4adaaa(0x23b)],'modificationId':_0x2d317a['id']},_0x52a718=this[_0x4adaaa(0x298)][_0x4adaaa(0x183)](_0x2d317a[_0x4adaaa(0x1d2)])[_0x4adaaa(0x255)];this[_0x4adaaa(0x236)][_0x4adaaa(0x214)](this[_0x4adaaa(0x298)]['id'],_0x52a718,_0x17a0d3);}}function _0xf9cb(){const _0x357112=['293854OEpBZm','_openBalloonFor','init','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','find','isModelAvailable','updateFeedItemAIReplySuggestionPartState','setChangeGroupState','removeSelectionFromChatContext','lastInteraction','ai-chat-context-invalid-data','children','setIsUploadInProgress','pluginName','redo','startsWith','clearConversationContextUI','main','messageId','updateFeedItemAIReplySources','_removeAISelectionMarkers','3311CufESz','getChildren','hasChanges','interactionStarted','abortPromptStream','webSearchStarted','toggleSuggestionDisplayMode','stopListening','push','interactionFinished','sourcePosition','7204JfdWMZ','contextSent','changes','history','AITabs','mouseOverSuggestion','setModel','findIndex','Failed\x20to\x20load\x20conversation','addFeedItemUserMessage','addFeedItemError','$graveyard','context','removeContextItem','addUrlToContext','resizeTabs','addSelectionToContext','AI_CHAT_CONTEXT_INVALID_DATA','resetMessageInput','streaming','isLoading','marker','outdated','Disliked\x20response','dislike','rejectSuggestion','query','change','ai-chat-resource-load-failed','data-id','handleUserInteraction','config','ai-chat-source-resources-load-failed','3969570JkhHQj','removed','selection','loadConversation','toString','resourceId','startInteraction','showFakeVisualSelection','_logError','resources','getGroupId','updateCurrentDocumentInContext','Liked\x20response','100020xPwkVt','_updateReplyContent','sourceResourcesLoaded','remove','applyOperation','undo','updateCapabilities','activeConversation','ai-chat-conversation-init-failed','resetConversationTitle','model','addFeedItemAISuggestion','isOfficialPlugin','getContentParts','has','hideFakeVisualSelection','toggleWebSearch','updateContent','indexOf','collaboration.channelId','set','toggleLoadingSkeleton','partIndex','ai-chat-conversation-start-failed','interactionCreated','toViewRange','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','changeGroups','ai.chat.models.defaultModelId','sources','setConversationContext','ai.chat.context','end','rejected','_insertSuggestion','_scrollToSuggestionRange','removeMarker','setLoadingMessage','isCurrentDocumentInContext','addContextOptionsChanged','documentContextContent','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','1911285YIVTVI','setIsMaximized','baseVersion','getAttribute','Showing\x20conversation\x20history...','ai-chat-context-unsupported-type','load','getSelectionText','_stopLastInteraction','getDocumentContext','text-delta','start','removeFromContext','reasoningStarted','handleRemovedConversation','isStarted','getDiff','selectModel','mapper','_previewedChangeGroup','isCurrentDocumentInConversation','open','delete','commands','updateConversationTitle','sendUserMessage','afterInit','disableControls','howMany','TrackChangesEditing','map','_aiEditing','removeFeedInteraction','parse','_startConversationSafely','webSearchFinished','_createFromRanges','_toggleWebSearch','selectedModel','uiId','getInteraction','toggleReasoning','stop','addCurrentDocumentToContext','addResourceToContext','filter','setSelectedModel','3CuxeAG','isInContext','addOperation','ai-chat-controller-no-active-conversation','_updateRatings','insertSuggestion','root','_handleStartConversation','maxOffset','add','getMarkersGroup','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','contextItemRemoved','clearPendingContextUI','resize','setAddContextOptions','populateSourceResourceBalloon','_removeFromContext','ready','finishInteraction','revert','addDocumentToContext','log','addFilesToContext','message','listenTo','showNext','version','focusPromptInput','sendMessage','showDiff','state','get','66smHcDg','getRoot','ai-request-aborted','AIChatController','requires','getChild','addFeedInteractionHeader','getReply','AIChatUI','AIEditing','getChildAtOffset','data','uid','view','removeSelectionFromContext','from','addContextItem','editing','contextItemAdded','capabilitiesUpdated','replyContentUpdated','markers','updateFeedItemAIReplySuggestionContent','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','getInteractionAndReplyById','createConversation','options','loadSourceResources','ai-chat-controller-mouse-over','createPositionFromPath','resourceStateChanged','modification-delta','addSelectionToChatContext','chat','AI_CHAT_ABORTED_MESSAGE','_flushLastInteractionUI','accepted','nextSibling','replyChangeGroupStateUpdated','interactionId','isOpen','anchorId','ai-chat-url-upload-failed','batch','alignToTop','isPremiumPlugin','pending','locale','scrollFeedToSuggestion','ai.availableReplyActions','split','document','1765jSFYOc','interactionDestroyed','updateFeedItemAIReplyContent','_toggleReasoning','showPrevious','AI_BALLOON_HEADER_TITLE','addFileToContext','node','closeSourceResourceBalloon','393330HBOTWy','ai-no-track-changes','getDocumentData','close','ai-chat-file-upload-failed','content','contextItemLoadingEnded','resizedTabs','AI_CHAT_UNTITLED_CONVERSATION','like','_setIsMaximized','_applyOperationsAsSuggestions','AI_CHAT_UNABLE_TO_START_CONVERSATION','range','type','rootName','indexes','conversationInitialized','DocumentCompare','updateResourceState','_integrateEditor','TrackChanges','showChangeInText','isUploadInProgress','index','startConversation','sourceId','domConverter','editors','_aiChatUi','error','slice','_getDocumentRangeForReplyChanges','3832UhquMN','isDocumentOperation','getRanges','_balloonShowDiff','current-document','source','stopInteraction','cloneNode','dialogClosed','getOperations','forEach','upsertAIChatRating','resource','activateTab','path','replies','_showConversationHistory','addFeedItemAIReply','startAutoScroll','replyId','unshift','_aiChatModels','mouseLeaveSuggestion','ai-conversation-','plugins','getTransformedByOperation','_handleUIUserMessage','reasoningFinished','viewRangeToDom','_batchToChanges','replyCreated','setFeedItemRenderingStrategy','_applySuggestion','modelSelected','Undo','full','enableControls','contextItem','getPath','ai.chat.models.displayedModels','AI_CHAT_RESOURCE_LOAD_FAILED','createPositionAt','contextItems','AI_CHAT_GENERIC_ERROR','static','_aiConnector','applySuggestion','new','uploadProgressChanged','AIConnector','length','getFirstRange','isDisabled','ai-chat-missing-channel-id','addFeedItemStaticMessage','setConversationTitle','setContextItemLoading','createRange'];_0xf9cb=function(){return _0x357112;};return _0xf9cb();}
|
|
23
|
+
function _0xcb3e(){const _0x2232b4=['alignToTop','rootName','setAddContextOptions','unshift','6993186AYHIlq','toggleWebSearch','getAttribute','getFirstRange','addDocumentToContext','isOpen','addContextItem','showPrevious','rejected','AI_CHAT_RESOURCE_LOAD_FAILED','replyId','resizeTabs','plugins','model','addContextOptionsChanged','content','baseVersion','node','upsertAIChatRating','indexOf','requires','Failed\x20to\x20load\x20conversation','_getDocumentRangeForReplyChanges','setLoadingMessage','1109312syKQPx','resourceStateChanged','isDisabled','get','resize','maxOffset','capabilitiesUpdated','dislike','reasoningStarted','isUploadInProgress','startAutoScroll','isPremiumPlugin','filter','AIChatController','interactionFinished','updateConversationTitle','from','new','mouseLeaveSuggestion','rejectSuggestion','_flushLastInteractionUI','loadConversation','push','AI_CHAT_CONTEXT_INVALID_DATA','start','startInteraction','interactionDestroyed','createRange','ai-chat-context-unsupported-type','revert','data','getSelectionText','_showConversationHistory','addFeedItemStaticMessage','removeMarker','showFakeVisualSelection','setIsUploadInProgress','DocumentCompare','change','getChild','_scrollToSuggestionRange','context','load','getInteraction','stopInteraction','disableControls','toViewRange','viewRangeToDom','contextItemLoadingEnded','_aiChatUi','stopListening','getDiff','getDocumentData','collaboration.channelId','_insertSuggestion','loadSourceResources','resetConversationTitle','AIChatUI','_applyOperationsAsSuggestions','query','uiId','isInContext','current-document','cloneNode','ai.availableReplyActions','toggleSuggestionDisplayMode','replyContentUpdated','activeConversation','getTransformedByOperation','clearConversationContextUI','interactionId','applySuggestion','activateTab','chat','hasChanges','ai-chat-url-upload-failed','Liked\x20response','text-delta','Showing\x20conversation\x20history...','Undo','showChangeInText','_toggleReasoning','redo','removeFeedInteraction','addFeedInteractionHeader','markers','contextItems','full','setChangeGroupState','addFeedItemAIReply','updateCapabilities','getPath','sendUserMessage','isDocumentOperation','init','selectModel','lastInteraction','setConversationContext','config','isModelAvailable','removeContextItem','parse','startConversation','remove','changes','updateContent','streaming','enableControls','set','interactionStarted','closeSourceResourceBalloon','createPositionFromPath','getRanges','state','nextSibling','uploadProgressChanged','addResourceToContext','AI_CHAT_GENERIC_ERROR','$graveyard','addFeedItemError','pluginName','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','AI_CHAT_UNTITLED_CONVERSATION','AI_CHAT_ABORTED_MESSAGE','ai-chat-conversation-init-failed','showDiff','_aiChatModels','documentContextContent','find','pending','updateFeedItemAIReplyContent','AIEditing','setConversationTitle','createPositionAt','children','sourcePosition','removeSelectionFromContext','ai-request-aborted','modification-delta','open','getMarkersGroup','close','ai-conversation-','toString','messageId','_openBalloonFor','getGroupId','ai.chat.models.displayedModels','setContextItemLoading','_handleStartConversation','slice','clearPendingContextUI','length','findIndex','setFeedItemRenderingStrategy','ai-chat-file-upload-failed','contextItem','static','isOfficialPlugin','updateFeedItemAIReplySuggestionContent','toggleReasoning','scrollFeedToSuggestion','resizedTabs','type','removeSelectionFromChatContext','getContentParts','applyOperation','replyCreated','toggleLoadingSkeleton','howMany','modelSelected','range','AI_CHAT_UNABLE_TO_START_CONVERSATION','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','handleUserInteraction','updateCurrentDocumentInContext','TrackChanges','sendMessage','error','replyChangeGroupStateUpdated','_updateReplyContent','_startConversationSafely','log','addCurrentDocumentToContext','4315480PTYWLF','getInteractionAndReplyById','addOperation','_logError','options','297ibvzMJ','sourceId','addSelectionToContext','isLoading','_aiConnector','partIndex','_previewedChangeGroup','getChildren','setModel','sources','uid','updateResourceState','ai-chat-controller-no-active-conversation','root','abortPromptStream','ai-chat-context-invalid-data','anchorId','insertSuggestion','getReply','marker','setSelectedModel','path','accepted','Disliked\x20response','listenTo','focusPromptInput','startsWith','outdated','_batchToChanges','has','addFilesToContext','locale','finishInteraction','_stopLastInteraction','reasoningFinished','isStarted','stop','_applySuggestion','AIConnector','TrackChangesEditing','ai-chat-conversation-start-failed','interactionCreated','hideFakeVisualSelection','document','contextItemAdded','selectedModel','selection','history','showNext','isCurrentDocumentInContext','webSearchStarted','contextSent','indexes','end','removed','like','addSelectionToChatContext','4291712kyejVm','dialogClosed','main','setIsMaximized','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','afterInit','getChildAtOffset','data-id','27610ZDzrdz','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','resource','addUrlToContext','view','delete','sourceResourcesLoaded','ai-chat-source-resources-load-failed','_setIsMaximized','removeFromContext','version','mouseOverSuggestion','_removeAISelectionMarkers','replies','domConverter','_createFromRanges','resources','addFileToContext','createConversation','getDocumentContext','map','source','AI_BALLOON_HEADER_TITLE','message','undo','_integrateEditor','changeGroups','_aiEditing','handleRemovedConversation','_toggleWebSearch','ready','add','split','AITabs','addFeedItemUserMessage','ai.chat.context','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','populateSourceResourceBalloon','_updateRatings','updateFeedItemAIReplySources','_handleUIUserMessage','3903284kQEasO','resourceId','editing','isCurrentDocumentInConversation','resetMessageInput','getRoot','addFeedItemAISuggestion','editors','commands','forEach','updateFeedItemAIReplySuggestionPartState','mapper','ai-chat-missing-channel-id','conversationInitialized','batch','contextItemRemoved','webSearchFinished','ai-chat-resource-load-failed','index','ai-chat-controller-mouse-over','ai.chat.models.defaultModelId','ai-no-track-changes','2645940bVNJnE','_removeFromContext','_balloonShowDiff','getOperations'];_0xcb3e=function(){return _0x2232b4;};return _0xcb3e();}const _0x59f38d=_0x507d;function _0x507d(_0x23342e,_0x4abfc0){const _0xcb3ed5=_0xcb3e();return _0x507d=function(_0x507d76,_0x2dd24a){_0x507d76=_0x507d76-0x13c;let _0x7491ce=_0xcb3ed5[_0x507d76];return _0x7491ce;},_0x507d(_0x23342e,_0x4abfc0);}(function(_0x51edea,_0x11a388){const _0xadb99d=_0x507d,_0x570e9b=_0x51edea();while(!![]){try{const _0x5a0e8f=parseInt(_0xadb99d(0x250))/0x1+-parseInt(_0xadb99d(0x1f1))/0x2*(-parseInt(_0xadb99d(0x1b0))/0x3)+-parseInt(_0xadb99d(0x1ab))/0x4+parseInt(_0xadb99d(0x230))/0x5+-parseInt(_0xadb99d(0x238))/0x6+-parseInt(_0xadb99d(0x21a))/0x7+parseInt(_0xadb99d(0x1e9))/0x8;if(_0x5a0e8f===_0x11a388)break;else _0x570e9b['push'](_0x570e9b['shift']());}catch(_0x329024){_0x570e9b['push'](_0x570e9b['shift']());}}}(_0xcb3e,0xb493e));import{ContextPlugin as _0x1d9aed,Editor as _0x5db8e9}from'ckeditor5/src/core.js';import{CKEditorError as _0xc1fc68,logError as _0x294b23,scrollViewportToShowTarget as _0x267891,uid as _0x1db2a9}from'ckeditor5/src/utils.js';import{AIConnector as _0x22cedc}from'../aicore/aiconnector.js';import{AITabs as _0x58e3fa}from'../aitabs/aitabs.js';import{AIChatConversation as _0x41baee}from'./model/aichatconversation.js';import{getTranslation as _0x30ea9b}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x47a8a5}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0xb6b753}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x3a5c5e}from'./model/aichatmodels.js';import{getEditorFromContext as _0xc94297}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x3c6729,DATA_ID_MODEL_ATTRIBUTE as _0x130480}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x3788fd,getOperationsFromReply as _0x386198}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x13e5ea,getMinimalSelection as _0x2b6c27}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x9f483a,_DetachOperation as _0x4acbb9}from'ckeditor5/src/engine.js';import{findOne as _0x749d51,getAttribute as _0x305739,serialize as _0x4a4ce6,Document as _0x3998ff,findByAttribute as _0x570005}from'../aicore/utils/htmlparser.js';import{IconAI as _0x52b70b}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x53eb00}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x42fa45}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x1d9aed{[_0x59f38d(0x20c)];[_0x59f38d(0x1b4)];[_0x59f38d(0x281)];[_0x59f38d(0x171)];[_0x59f38d(0x1cc)]=new Map();[_0x59f38d(0x1b6)]=null;[_0x59f38d(0x232)]=!0x1;static get[_0x59f38d(0x24c)](){return[_0x22cedc,_0x42fa45,_0x3c6729];}static get[_0x59f38d(0x16b)](){const _0x5221ee=_0x59f38d;return _0x5221ee(0x25d);}static get[_0x59f38d(0x191)](){return!0x0;}static get[_0x59f38d(0x25b)](){return!0x0;}[_0x59f38d(0x151)](){const _0x2579a3=_0x59f38d;this[_0x2579a3(0x1b4)]=this[_0x2579a3(0x279)][_0x2579a3(0x244)][_0x2579a3(0x253)](_0x2579a3(0x1d6)),this[_0x2579a3(0x281)]=this[_0x2579a3(0x279)][_0x2579a3(0x244)][_0x2579a3(0x253)](_0x2579a3(0x289)),this[_0x2579a3(0x20c)]=this[_0x2579a3(0x279)][_0x2579a3(0x244)][_0x2579a3(0x253)](_0x2579a3(0x176)),this[_0x2579a3(0x171)]=new _0x3a5c5e({'connector':this[_0x2579a3(0x1b4)],'availableModels':this[_0x2579a3(0x279)][_0x2579a3(0x155)][_0x2579a3(0x253)](_0x2579a3(0x186)),'defaultModelId':this[_0x2579a3(0x279)][_0x2579a3(0x155)][_0x2579a3(0x253)](_0x2579a3(0x22e))});const _0x3d85e5=this[_0x2579a3(0x279)][_0x2579a3(0x244)][_0x2579a3(0x253)](_0x2579a3(0x212));this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x159),()=>{const _0xb64592=_0x2579a3;this[_0xb64592(0x1a8)]();}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x14f),(_0x41838c,_0x394b80)=>{const _0x2ce148=_0x2579a3;this[_0x2ce148(0x219)]({'userMessage':_0x394b80});}),this[_0x2579a3(0x1c8)](_0x3d85e5,_0x2579a3(0x195),(_0x1cc9b8,_0x2f1244)=>{const _0x2119b6=_0x2579a3;this[_0x2119b6(0x1f9)](_0x2f1244);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x243),()=>{const _0x1fb9bf=_0x2579a3;_0x3d85e5[_0x1fb9bf(0x254)]();}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x1be),async()=>{const _0x238523=_0x2579a3;await this[_0x238523(0x1d1)](),await this[_0x238523(0x264)]();}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x23c),()=>{const _0x214a81=_0x2579a3;this[_0x214a81(0x293)]?.[_0x214a81(0x1aa)](_0x30ea9b(this[_0x214a81(0x279)][_0x214a81(0x1cf)],_0x214a81(0x16c)));}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x202),(_0x3d070e,_0x44ec57)=>{const _0x1d6d30=_0x2579a3;this[_0x1d6d30(0x293)]?.[_0x1d6d30(0x1ce)](Array[_0x1d6d30(0x260)](_0x44ec57));}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x1f4),(_0x562172,_0x4920f3)=>{const _0x3b33af=_0x2579a3;this[_0x3b33af(0x293)]?.[_0x3b33af(0x1f4)](_0x4920f3);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x167),(_0xf3d4a6,_0x5b6702)=>{const _0x31cc28=_0x2579a3;this[_0x31cc28(0x293)]?.[_0x31cc28(0x167)](_0x5b6702[_0x31cc28(0x206)],_0x5b6702[_0x31cc28(0x1f3)]);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x157),(_0x1170f3,_0x36eba0)=>{const _0x528637=_0x2579a3;this[_0x528637(0x231)](_0x36eba0);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x287),(_0x4a2b28,_0x483873)=>{const _0x112aa1=_0x2579a3;this[_0x112aa1(0x293)]?.[_0x112aa1(0x287)](_0x483873[_0x112aa1(0x1b1)],_0x483873[_0x112aa1(0x28b)],_0x483873[_0x112aa1(0x1ba)]);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x239),()=>{const _0x30f86d=_0x2579a3;this[_0x30f86d(0x20e)]();}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x193),()=>{const _0x3fc558=_0x2579a3;this[_0x3fc558(0x144)]();}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x152),(_0xc084db,_0x684afa)=>{const _0x10c731=_0x2579a3;this[_0x10c731(0x293)]?.[_0x10c731(0x1b8)](_0x684afa);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x1e7),(_0x54cf01,{replyId:_0x31af5e})=>{const _0x5fc44b=_0x2579a3;console[_0x5fc44b(0x1a9)](_0x5fc44b(0x13f),_0x31af5e);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x257),(_0xff0494,{replyId:_0x200d99})=>{const _0xea26c3=_0x2579a3;console[_0xea26c3(0x1a9)](_0xea26c3(0x1c7),_0x200d99);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x1c1),(_0x2fffa2,_0x9c7527)=>{const _0x29bb55=_0x2579a3;this[_0x29bb55(0x279)][_0x29bb55(0x244)][_0x29bb55(0x253)](_0x42fa45)[_0x29bb55(0x180)](),this[_0x29bb55(0x286)](_0x9c7527);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x143),(_0x56ce33,{replyId:_0x17c73f,partIndex:_0x5d7051})=>{const _0x4e4a9f=_0x2579a3;this[_0x4e4a9f(0x232)]=this[_0x4e4a9f(0x281)][_0x4e4a9f(0x170)],this[_0x4e4a9f(0x184)](_0x17c73f,_0x5d7051);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x1fc),(_0x56b849,{replyId:_0x73a1e5,partIndex:_0x39dff2})=>{const _0x4fbb5b=_0x2579a3,_0xc7544=this[_0x4fbb5b(0x24e)](_0x73a1e5,_0x39dff2);_0xc7544&&_0x4fbb5b(0x169)!=_0xc7544[_0x4fbb5b(0x19e)][_0x4fbb5b(0x1bd)][_0x4fbb5b(0x235)]&&this[_0x4fbb5b(0x20c)][_0x4fbb5b(0x273)]([_0xc7544[_0x4fbb5b(0x19e)]],_0x4fbb5b(0x22d));}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x262),()=>{const _0x22cc0b=_0x2579a3;this[_0x22cc0b(0x20c)][_0x22cc0b(0x1da)](_0x22cc0b(0x22d));}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x297),(_0x10792c,_0xb435da)=>{const _0x4cecd1=_0x2579a3;this[_0x4cecd1(0x279)][_0x4cecd1(0x244)][_0x4cecd1(0x253)](_0x42fa45)[_0x4cecd1(0x180)](),this[_0x4cecd1(0x1d5)](_0xb435da);}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x291),async(_0x4f1c4b,{replyId:_0x36eb23,showDiff:_0xe42c96})=>{const _0x3c0f3a=_0x2579a3,{reply:_0xc7e34a}=this[_0x3c0f3a(0x1ac)](_0x36eb23),_0x4b17ea=_0xc7e34a[_0x3c0f3a(0x198)]({'showDiff':_0xe42c96});await this[_0x3c0f3a(0x281)][_0x3c0f3a(0x192)]({'id':_0xc7e34a['id'],'parts':_0x4b17ea,'renderingStrategy':_0x3c0f3a(0x190)});}),this[_0x2579a3(0x1c8)](this[_0x2579a3(0x281)],_0x2579a3(0x263),(_0x3357b5,{replyId:_0x4eb240,partIndex:_0x3df693})=>{const _0x390211=_0x2579a3;this[_0x390211(0x1b6)]?.[_0x390211(0x242)]==_0x4eb240&&this[_0x390211(0x1b6)]?.[_0x390211(0x1b5)]==_0x3df693&&this[_0x390211(0x279)][_0x390211(0x244)][_0x390211(0x253)](_0x42fa45)[_0x390211(0x180)]();const {reply:_0xeb69fb}=this[_0x390211(0x1ac)](_0x4eb240);_0xeb69fb[_0x390211(0x14b)](_0x3df693,_0x390211(0x240)),this[_0x390211(0x20c)][_0x390211(0x1da)](_0x390211(0x22d));});}async[_0x59f38d(0x1ee)](){const _0x2b1c35=_0x59f38d;this[_0x2b1c35(0x279)]instanceof _0x5db8e9?this[_0x2b1c35(0x20a)](this[_0x2b1c35(0x279)]):this[_0x2b1c35(0x1c8)](this[_0x2b1c35(0x279)][_0x2b1c35(0x221)],_0x2b1c35(0x210),(_0x1d929f,_0x2b9f9b)=>{const _0x37ed33=_0x2b1c35;_0x2b9f9b['on'](_0x37ed33(0x20f),()=>{const _0x1ece57=_0x37ed33;this[_0x1ece57(0x20a)](_0x2b9f9b);});}),await this[_0x2b1c35(0x1a8)]();}[_0x59f38d(0x286)](_0x1de4da){const _0x4f47ca=_0x59f38d,_0x1385f0=_0xc94297(this[_0x4f47ca(0x279)]);if(!_0x1385f0[_0x4f47ca(0x244)][_0x4f47ca(0x1cd)](_0x4f47ca(0x1a3)))throw new _0xc1fc68(_0x4f47ca(0x22f),null);const _0x1bc164=this[_0x4f47ca(0x279)][_0x4f47ca(0x244)][_0x4f47ca(0x253)](_0x4f47ca(0x275)),{reply:_0x11ba47,interaction:_0xbc06cb}=this[_0x4f47ca(0x1ac)](_0x1de4da[_0x4f47ca(0x242)]),_0x42bf1a=this[_0x4f47ca(0x24e)](_0x1de4da[_0x4f47ca(0x242)],_0x1de4da[_0x4f47ca(0x1b5)]),_0x4142e7=void 0x0!==_0x1de4da[_0x4f47ca(0x1b5)]?[_0x11ba47[_0x4f47ca(0x20b)][_0x1de4da[_0x4f47ca(0x1b5)]]]:_0x11ba47[_0x4f47ca(0x20b)][_0x4f47ca(0x25c)](_0x4cc15c=>_0x4f47ca(0x174)==_0x4cc15c[_0x4f47ca(0x164)]),_0x124255=_0x4142e7[_0x4f47ca(0x205)](_0x4df4f2=>_0x11ba47[_0x4f47ca(0x20b)][_0x4f47ca(0x24b)](_0x4df4f2));if(!_0x42bf1a||_0x4f47ca(0x169)==_0x42bf1a[_0x4f47ca(0x19e)][_0x4f47ca(0x1bd)][_0x4f47ca(0x235)])return void _0x124255[_0x4f47ca(0x223)](_0x3ba484=>_0x11ba47[_0x4f47ca(0x14b)](_0x3ba484,_0x4f47ca(0x1cb)));_0x124255[_0x4f47ca(0x223)](_0x440638=>_0x11ba47[_0x4f47ca(0x14b)](_0x440638,_0x4f47ca(0x1c6)));const _0x31a2d8=_0x386198({'editor':_0x1385f0,'reply':_0x11ba47,'interaction':_0xbc06cb,'groups':_0x4142e7,'transform':!0x0,'documentCompare':_0x1bc164,'documentCompareOptions':{'anchor':_0x4f47ca(0x1eb),'markDeletions':!0x0}});let _0x2a7509;_0x42bf1a&&this[_0x4f47ca(0x278)](_0x42bf1a[_0x4f47ca(0x19e)]),_0x1385f0[_0x4f47ca(0x245)][_0x4f47ca(0x276)](_0x37a4fb=>{const _0x36ae0a=_0x4f47ca;_0x2a7509=_0x37a4fb[_0x36ae0a(0x228)],_0x1385f0[_0x36ae0a(0x244)][_0x36ae0a(0x253)](_0x36ae0a(0x1d7))[_0x36ae0a(0x28a)](_0x31a2d8),this[_0x36ae0a(0x20c)][_0x36ae0a(0x1da)](_0x36ae0a(0x22d));}),this[_0x4f47ca(0x1cc)][_0x4f47ca(0x15f)](_0x2a7509,{'interactionId':_0xbc06cb['id'],'replyId':_0x11ba47['id'],'indexes':_0x124255[_0x4f47ca(0x189)]()}),this[_0x4f47ca(0x217)](_0x11ba47);}[_0x59f38d(0x1d5)](_0x2a7e42){const _0x386ac4=_0x59f38d,_0x2c67a6=_0xc94297(this[_0x386ac4(0x279)]),_0x46798b=this[_0x386ac4(0x279)][_0x386ac4(0x244)][_0x386ac4(0x253)](_0x3c6729),{reply:_0x112c20,interaction:_0x2d4fdf}=this[_0x386ac4(0x1ac)](_0x2a7e42[_0x386ac4(0x242)]),_0x352793=this[_0x386ac4(0x24e)](_0x2a7e42[_0x386ac4(0x242)],_0x2a7e42[_0x386ac4(0x1b5)]),_0x4144ab=void 0x0!==_0x2a7e42[_0x386ac4(0x1b5)]?[_0x112c20[_0x386ac4(0x20b)][_0x2a7e42[_0x386ac4(0x1b5)]]]:_0x112c20[_0x386ac4(0x20b)][_0x386ac4(0x25c)](_0x2b4d9f=>_0x386ac4(0x174)==_0x2b4d9f[_0x386ac4(0x164)]),_0x31a301=_0x4144ab[_0x386ac4(0x205)](_0x5057b6=>_0x112c20[_0x386ac4(0x20b)][_0x386ac4(0x24b)](_0x5057b6));if(!_0x352793||_0x386ac4(0x169)==_0x352793[_0x386ac4(0x19e)][_0x386ac4(0x1bd)][_0x386ac4(0x235)])return void _0x31a301[_0x386ac4(0x223)](_0x4c9329=>_0x112c20[_0x386ac4(0x14b)](_0x4c9329,_0x386ac4(0x1cb)));_0x31a301[_0x386ac4(0x223)](_0x1e2b00=>_0x112c20[_0x386ac4(0x14b)](_0x1e2b00,_0x386ac4(0x1c6)));const _0x1c7f7b=_0x386198({'editor':_0x2c67a6,'reply':_0x112c20,'interaction':_0x2d4fdf,'groups':_0x4144ab,'transform':!0x0,'documentCompare':_0x46798b,'documentCompareOptions':{'anchor':_0x386ac4(0x1eb),'markDeletions':!0x1}});let _0x1d6d11;_0x352793&&this[_0x386ac4(0x278)](_0x352793[_0x386ac4(0x19e)]),_0x2c67a6[_0x386ac4(0x245)][_0x386ac4(0x276)](_0x1cd875=>{const _0x62cea7=_0x386ac4;_0x1d6d11=_0x1cd875[_0x62cea7(0x228)];for(const _0xaefbb7 of _0x1c7f7b)_0xaefbb7[_0x62cea7(0x248)]=_0x2c67a6[_0x62cea7(0x245)][_0x62cea7(0x1db)][_0x62cea7(0x1fb)],_0x3788fd(_0x2c67a6,_0xaefbb7),_0x1cd875[_0x62cea7(0x228)][_0x62cea7(0x1ad)](_0xaefbb7),_0x2c67a6[_0x62cea7(0x245)][_0x62cea7(0x199)](_0xaefbb7);}),this[_0x386ac4(0x1cc)][_0x386ac4(0x15f)](_0x1d6d11,{'interactionId':_0x2d4fdf['id'],'replyId':_0x112c20['id'],'indexes':_0x31a301[_0x386ac4(0x189)]()}),this[_0x386ac4(0x217)](_0x112c20);}[_0x59f38d(0x184)](_0x177f70,_0x48f519){const _0x5f5766=_0x59f38d,_0x429411=_0xc94297(this[_0x5f5766(0x279)]),_0x5f42ef=this[_0x5f5766(0x24e)](_0x177f70,_0x48f519),_0x5d2250=this[_0x5f5766(0x279)][_0x5f5766(0x244)][_0x5f5766(0x253)](_0x42fa45);if(!_0x5f42ef)return void _0x5d2250[_0x5f5766(0x180)]();const {range:_0x27f10b,currentIndex:_0x517331}=_0x5f42ef;if(_0x5f5766(0x169)==_0x27f10b[_0x5f5766(0x1bd)][_0x5f5766(0x235)]){const {reply:_0x304daa}=this[_0x5f5766(0x1ac)](_0x177f70);return _0x304daa[_0x5f5766(0x14b)](_0x517331,_0x5f5766(0x1cb)),void _0x5d2250[_0x5f5766(0x180)]();}if(this[_0x5f5766(0x1b6)]?.[_0x5f5766(0x242)]==_0x177f70&&this[_0x5f5766(0x1b6)]?.[_0x5f5766(0x1b5)]==_0x517331)return;this[_0x5f5766(0x282)](_0x5d2250),this[_0x5f5766(0x1b6)]={'replyId':_0x177f70,'partIndex':_0x517331};let _0x1a3032=_0x429411[_0x5f5766(0x155)][_0x5f5766(0x253)](_0x5f5766(0x290))||[..._0xb6b753];_0x429411[_0x5f5766(0x244)][_0x5f5766(0x1cd)](_0x5f5766(0x1a3))||(_0x1a3032=_0x1a3032[_0x5f5766(0x25c)](_0x3f05ad=>_0x5f5766(0x1c1)!=_0x3f05ad));const _0x46e3a3=new _0x53eb00(_0x429411[_0x5f5766(0x1cf)],{'showDiff':this[_0x5f5766(0x232)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x5f5766(0x14a)},'hideHeader':!0x0,'availableActions':_0x1a3032});this[_0x5f5766(0x282)](_0x46e3a3);const {reply:_0x1b804b}=this[_0x5f5766(0x1ac)](_0x177f70),_0xcad48c=_0x1b804b[_0x5f5766(0x198)]({'showDiff':this[_0x5f5766(0x232)]})[_0x5f5766(0x25c)](_0x2911d9=>_0x2911d9[_0x5f5766(0x13d)]),_0x54e261=_0xcad48c[_0x5f5766(0x18c)](_0x2d42a5=>_0x2d42a5[_0x5f5766(0x22c)]==_0x517331);if(-0x1==_0x54e261)return;const _0x451bea=_0xcad48c[_0x54e261],_0x14a92f=_0xcad48c['at']((_0x54e261-0x1)%_0xcad48c[_0x5f5766(0x18b)])?.[_0x5f5766(0x22c)],_0x5777f3=_0xcad48c['at']((_0x54e261+0x1)%_0xcad48c[_0x5f5766(0x18b)])?.[_0x5f5766(0x22c)];_0x46e3a3[_0x5f5766(0x15c)]({'parts':[_0x451bea],'renderingStrategy':_0x5f5766(0x190)});const _0x2dce35=_0x517331!==_0x14a92f;this[_0x5f5766(0x278)](_0x27f10b,!0x0),_0x5d2250[_0x5f5766(0x17e)]({'index':_0x517331,'title':_0x30ea9b(this[_0x5f5766(0x279)][_0x5f5766(0x1cf)],_0x5f5766(0x207),(_0x54e261+0x1)[_0x5f5766(0x182)]()),'icon':_0x52b70b,'mainView':_0x46e3a3,'showRotator':_0x2dce35,'showApplyButton':!0x0,'showSuggestButton':_0x429411[_0x5f5766(0x244)][_0x5f5766(0x1cd)](_0x5f5766(0x1a3)),'ranges':[_0x27f10b]}),this[_0x5f5766(0x281)][_0x5f5766(0x194)](_0x177f70,_0x517331),this[_0x5f5766(0x1c8)](_0x46e3a3,_0x5f5766(0x291),(_0x52e49f,{showDiff:_0x591a63})=>{const _0x1df64d=_0x5f5766;this[_0x1df64d(0x232)]=_0x591a63;const {reply:_0x506fe5}=this[_0x1df64d(0x1ac)](_0x177f70),_0x4ff143=_0x506fe5[_0x1df64d(0x198)]({'showDiff':_0x591a63,'groupIndex':_0x517331});_0x46e3a3[_0x1df64d(0x15c)]({'parts':_0x4ff143,'renderingStrategy':_0x1df64d(0x190)});}),this[_0x5f5766(0x1c8)](_0x5d2250,_0x5f5766(0x297),()=>{const _0x2f8a84=_0x5f5766;this[_0x2f8a84(0x1d5)]({'replyId':_0x177f70,'partIndex':_0x517331}),_0x2dce35?this[_0x2f8a84(0x184)](_0x177f70,_0x5777f3):_0x5d2250[_0x2f8a84(0x180)]();}),this[_0x5f5766(0x1c8)](_0x5d2250,_0x5f5766(0x1c1),()=>{const _0xc1bae=_0x5f5766;this[_0xc1bae(0x286)]({'replyId':_0x177f70,'partIndex':_0x517331}),_0x2dce35?this[_0xc1bae(0x184)](_0x177f70,_0x5777f3):_0x5d2250[_0xc1bae(0x180)]();}),_0x2dce35&&(this[_0x5f5766(0x1c8)](_0x5d2250,_0x5f5766(0x1e0),()=>{const _0x4a115c=_0x5f5766;this[_0x4a115c(0x184)](_0x177f70,_0x5777f3);}),this[_0x5f5766(0x1c8)](_0x5d2250,_0x5f5766(0x23f),()=>{const _0x2ad04a=_0x5f5766;this[_0x2ad04a(0x184)](_0x177f70,_0x14a92f);})),this[_0x5f5766(0x1c8)](_0x5d2250,_0x5f5766(0x1ea),()=>{const _0x12d22f=_0x5f5766;this[_0x12d22f(0x282)](_0x5d2250),this[_0x12d22f(0x282)](_0x46e3a3),this[_0x12d22f(0x1b6)]=null;});}[_0x59f38d(0x24e)](_0x24d368,_0x1e7025){const _0xc2f7c9=_0x59f38d,_0x2b5f4a=_0xc94297(this[_0xc2f7c9(0x279)]),{reply:_0x1d4f1c,interaction:_0x10d691}=this[_0xc2f7c9(0x1ac)](_0x24d368),_0x5ad437=_0x1d4f1c[_0xc2f7c9(0x20b)][_0xc2f7c9(0x25c)](_0x29b153=>_0xc2f7c9(0x174)==_0x29b153[_0xc2f7c9(0x164)]),_0x385a0a=_0x5ad437[_0xc2f7c9(0x205)](_0x429bda=>_0x1d4f1c[_0xc2f7c9(0x20b)][_0xc2f7c9(0x24b)](_0x429bda));void 0x0===_0x1e7025&&(_0x1e7025=_0x385a0a[0x0]);const _0x5397f7=_0x385a0a[_0xc2f7c9(0x24b)](_0x1e7025);if(-0x1==_0x5397f7)return null;const _0x3bfa87=_0x5ad437[_0x5397f7],_0x49ae99=new _0x3998ff([]),_0x144b4e=new _0x3998ff([]);for(const _0x26ed6f of _0x3bfa87[_0xc2f7c9(0x15b)])if(_0xc2f7c9(0x1e6)!=_0x26ed6f[_0xc2f7c9(0x196)]&&_0x144b4e[_0xc2f7c9(0x179)][_0xc2f7c9(0x266)](_0x26ed6f[_0xc2f7c9(0x249)][_0xc2f7c9(0x28f)](!0x0)),_0xc2f7c9(0x261)!=_0x26ed6f[_0xc2f7c9(0x196)]){const _0x134c9d=_0x749d51(_0x2b3ffc=>_0x305739(_0x2b3ffc,_0xc2f7c9(0x1f0))==_0x26ed6f['id'],_0x1d4f1c[_0xc2f7c9(0x172)],!0x0);_0x49ae99[_0xc2f7c9(0x179)][_0xc2f7c9(0x266)](_0x134c9d[_0xc2f7c9(0x28f)](!0x0));}if(0x0==_0x49ae99[_0xc2f7c9(0x179)][_0xc2f7c9(0x18b)]){if(_0x3bfa87[_0xc2f7c9(0x15b)][0x0][_0xc2f7c9(0x1c0)]){const _0x231d5d=_0x570005(_0xc2f7c9(0x1f0),_0x3bfa87[_0xc2f7c9(0x15b)][0x0][_0xc2f7c9(0x1c0)],_0x1d4f1c[_0xc2f7c9(0x172)]);_0x49ae99[_0xc2f7c9(0x179)][_0xc2f7c9(0x237)](_0x231d5d[_0xc2f7c9(0x28f)](!0x0)),_0x144b4e[_0xc2f7c9(0x179)][_0xc2f7c9(0x237)](_0x231d5d[_0xc2f7c9(0x28f)](!0x0)),_0x231d5d[_0xc2f7c9(0x165)]&&(_0x49ae99[_0xc2f7c9(0x179)][_0xc2f7c9(0x266)](_0x231d5d[_0xc2f7c9(0x165)][_0xc2f7c9(0x28f)](!0x0)),_0x144b4e[_0xc2f7c9(0x179)][_0xc2f7c9(0x266)](_0x231d5d[_0xc2f7c9(0x165)][_0xc2f7c9(0x28f)](!0x0)));}else{const _0x2b5de6=_0x1d4f1c[_0xc2f7c9(0x172)][_0xc2f7c9(0x179)][0x0];if(!_0x2b5de6)return null;_0x49ae99[_0xc2f7c9(0x179)][_0xc2f7c9(0x266)](_0x2b5de6[_0xc2f7c9(0x28f)](!0x0)),_0x144b4e[_0xc2f7c9(0x179)][_0xc2f7c9(0x266)](_0x2b5de6[_0xc2f7c9(0x28f)](!0x0));}}const _0x4d4ccf=_0x10d691[_0xc2f7c9(0x204)](),_0x152281=_0x2b5f4a[_0xc2f7c9(0x26e)][_0xc2f7c9(0x158)](_0x4d4ccf[_0xc2f7c9(0x247)]),_0x1da9cd=_0x4a4ce6(_0x49ae99),_0x2b1678=_0x2b5f4a[_0xc2f7c9(0x26e)][_0xc2f7c9(0x158)](_0x1da9cd),_0x5b0644=_0x2b5f4a[_0xc2f7c9(0x26e)][_0xc2f7c9(0x158)](_0x1da9cd),_0x234337=_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x178)](_0x2b1678,0x0),_0x2f017b=_0x4a4ce6(_0x144b4e),_0x2b5ba3={'anchor':_0x234337,'markDeletions':!0x1},_0x27451e=_0x2b5f4a[_0xc2f7c9(0x244)][_0xc2f7c9(0x253)](_0x3c6729)[_0xc2f7c9(0x283)](_0x1da9cd,_0x2f017b,_0x2b5ba3)[_0xc2f7c9(0x233)]();if(!_0x27451e[_0xc2f7c9(0x18b)])return null;_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x276)](_0x1c02b3=>{const _0x556a4c=_0xc2f7c9;for(const _0x38fa34 of _0x27451e)if(_0x556a4c(0x15a)==_0x38fa34[_0x556a4c(0x196)]){const _0x5534db=_0x38fa34[_0x556a4c(0x17a)],_0x4fb461=_0x38fa34[_0x556a4c(0x19c)],_0x54635d=new _0x4acbb9(_0x5534db,_0x4fb461);_0x1c02b3[_0x556a4c(0x228)][_0x556a4c(0x1ad)](_0x54635d),_0x2b5f4a[_0x556a4c(0x245)][_0x556a4c(0x199)](_0x54635d);}else _0x556a4c(0x1c3)!==_0x38fa34[_0x556a4c(0x196)]&&(_0x38fa34[_0x556a4c(0x248)]=null,_0x38fa34[_0x556a4c(0x150)]=!0x1,_0x1c02b3[_0x556a4c(0x228)][_0x556a4c(0x1ad)](_0x38fa34),_0x2b5f4a[_0x556a4c(0x245)][_0x556a4c(0x199)](_0x38fa34));});const _0x5bdc89=_0x2b6c27(_0x2b5f4a,_0x27451e,_0x2b1678);_0x13e5ea(_0x2b5f4a[_0xc2f7c9(0x245)],_0x5bdc89);const _0x282eb1=_0x5bdc89[_0xc2f7c9(0x23b)]()[_0xc2f7c9(0x268)][_0xc2f7c9(0x1c5)][_0xc2f7c9(0x189)](),_0x328f49=_0x5bdc89[_0xc2f7c9(0x23b)]()[_0xc2f7c9(0x1e5)][_0xc2f7c9(0x1c5)][_0xc2f7c9(0x189)](),_0x13b737=[];let _0x1670f8=_0x2b1678,_0x5c75a3=_0x5b0644;for(let _0xa2b204=0x0;_0xa2b204<_0x328f49[_0xc2f7c9(0x18b)];_0xa2b204++){const _0x238e06=_0x1670f8[_0xc2f7c9(0x255)]-_0x328f49[_0xa2b204];_0x13b737[_0xa2b204]=_0x5c75a3[_0xc2f7c9(0x255)]-_0x238e06,_0x1670f8=_0x1670f8[_0xc2f7c9(0x1ef)](_0x328f49[_0xa2b204]),_0x5c75a3=_0x5c75a3[_0xc2f7c9(0x1ef)](_0x13b737[_0xa2b204]);}const _0x2d309f=_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x26b)](_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x162)](_0x5b0644,_0x282eb1),_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x162)](_0x5b0644,_0x13b737)),_0x1e797b=_0x5b0644[_0xc2f7c9(0x277)](0x0)[_0xc2f7c9(0x23a)](_0x130480),_0x263b68=Array[_0xc2f7c9(0x260)](_0x152281[_0xc2f7c9(0x1b7)]())[_0xc2f7c9(0x173)](_0x397999=>_0x397999[_0xc2f7c9(0x23a)](_0x130480)==_0x1e797b)[_0xc2f7c9(0x14e)](),_0x4bea7a=_0x2d309f[_0xc2f7c9(0x268)][_0xc2f7c9(0x1c5)][_0xc2f7c9(0x189)](),_0x192dd3=_0x2d309f[_0xc2f7c9(0x1e5)][_0xc2f7c9(0x1c5)][_0xc2f7c9(0x189)]();_0x4bea7a[0x0]=_0x263b68[0x0]+_0x4bea7a[0x0],_0x192dd3[0x0]=_0x263b68[0x0]+_0x192dd3[0x0];let _0x412005=_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x26b)](_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x162)](_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x1db)][_0xc2f7c9(0x21f)](),_0x4bea7a),_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x162)](_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x1db)][_0xc2f7c9(0x21f)](),_0x192dd3));const _0x33a3f1=_0x2b5f4a[_0xc2f7c9(0x245)][_0xc2f7c9(0x1db)][_0xc2f7c9(0x1df)][_0xc2f7c9(0x233)](_0x4d4ccf[_0xc2f7c9(0x1fb)]);for(const _0x488d5a of _0x33a3f1)_0x412005=_0x9f483a[_0xc2f7c9(0x200)](_0x412005[_0xc2f7c9(0x294)](_0x488d5a));return{'range':_0x412005,'currentIndex':_0x1e7025};}[_0x59f38d(0x20a)](_0x4d4474){const _0x305d42=_0x59f38d;if(!_0x4d4474[_0x305d42(0x244)][_0x305d42(0x1cd)](_0x305d42(0x142)))return;const _0x533b80=_0x4d4474[_0x305d42(0x222)][_0x305d42(0x253)](_0x305d42(0x209)),_0x44f1a4=_0x4d4474[_0x305d42(0x222)][_0x305d42(0x253)](_0x305d42(0x145));this[_0x305d42(0x1c8)](_0x533b80,_0x305d42(0x26d),(_0x395c0d,_0x56674b,_0x22c22c)=>{const _0x1bdce5=_0x305d42,_0x1bdc8f=this[_0x1bdce5(0x1cc)][_0x1bdce5(0x253)](_0x56674b);if(!_0x1bdc8f)return;const _0x2dd1b5=this[_0x1bdce5(0x293)][_0x1bdce5(0x27b)](_0x1bdc8f[_0x1bdce5(0x296)])[_0x1bdce5(0x1c2)](_0x1bdc8f[_0x1bdce5(0x242)]);_0x1bdc8f[_0x1bdce5(0x1e4)][_0x1bdce5(0x223)](_0x1386ea=>_0x2dd1b5[_0x1bdce5(0x14b)](_0x1386ea,_0x1bdce5(0x174))),this[_0x1bdce5(0x1cc)][_0x1bdce5(0x1f6)](_0x56674b),this[_0x1bdce5(0x1cc)][_0x1bdce5(0x15f)](_0x22c22c,_0x1bdc8f);}),this[_0x305d42(0x1c8)](_0x44f1a4,_0x305d42(0x26d),(_0x506cb3,_0xe62a0e,_0x190b8c)=>{const _0x3ee585=_0x305d42,_0x551544=this[_0x3ee585(0x1cc)][_0x3ee585(0x253)](_0xe62a0e);if(!_0x551544)return;const _0x45fef4=this[_0x3ee585(0x293)][_0x3ee585(0x27b)](_0x551544[_0x3ee585(0x296)])[_0x3ee585(0x1c2)](_0x551544[_0x3ee585(0x242)]);_0x551544[_0x3ee585(0x1e4)][_0x3ee585(0x223)](_0x519f43=>_0x45fef4[_0x3ee585(0x14b)](_0x519f43,_0x3ee585(0x1c6))),this[_0x3ee585(0x1cc)][_0x3ee585(0x1f6)](_0xe62a0e),this[_0x3ee585(0x1cc)][_0x3ee585(0x15f)](_0x190b8c,_0x551544);});}async[_0x59f38d(0x265)](_0x10b3a7){const _0x2c2332=_0x59f38d;this[_0x2c2332(0x279)][_0x2c2332(0x244)][_0x2c2332(0x253)](_0x42fa45)[_0x2c2332(0x180)](),this[_0x2c2332(0x281)][_0x2c2332(0x18d)](_0x2c2332(0x190)),this[_0x2c2332(0x281)][_0x2c2332(0x19b)](!0x0),await this[_0x2c2332(0x1d1)]();try{const _0x22be71=this[_0x2c2332(0x279)][_0x2c2332(0x244)][_0x2c2332(0x253)](_0x58e3fa);this[_0x2c2332(0x25f)]('\x20'),_0x22be71[_0x2c2332(0x1f5)][_0x2c2332(0x298)](_0x2c2332(0x13c)),await this[_0x2c2332(0x1a8)](_0x10b3a7);const {sessionId:_0x3d9320}=this[_0x2c2332(0x20c)][_0x2c2332(0x284)]();await this[_0x2c2332(0x293)][_0x2c2332(0x27a)](_0x10b3a7,_0x3d9320),this[_0x2c2332(0x293)][_0x2c2332(0x21d)]()&&this[_0x2c2332(0x293)][_0x2c2332(0x1aa)](_0x30ea9b(this[_0x2c2332(0x279)][_0x2c2332(0x1cf)],_0x2c2332(0x16c)));}catch(_0x269c8f){console[_0x2c2332(0x1a5)](_0x2c2332(0x24d),_0x269c8f);}finally{this[_0x2c2332(0x281)][_0x2c2332(0x25a)](),this[_0x2c2332(0x281)][_0x2c2332(0x18d)](_0x2c2332(0x15d)),this[_0x2c2332(0x281)][_0x2c2332(0x19b)](!0x1);}}[_0x59f38d(0x20d)](_0x165218){const _0x3b19da=_0x59f38d;this[_0x3b19da(0x293)]['id']===_0x165218&&this[_0x3b19da(0x1a8)]();}async[_0x59f38d(0x1e8)](){const _0x4fd7e5=_0x59f38d,_0x5ae12a=this[_0x4fd7e5(0x20c)][_0x4fd7e5(0x26f)]();this[_0x4fd7e5(0x293)]?.[_0x4fd7e5(0x1b2)](_0x5ae12a),this[_0x4fd7e5(0x293)]?.[_0x4fd7e5(0x1aa)](_0x30ea9b(this[_0x4fd7e5(0x279)][_0x4fd7e5(0x1cf)],_0x4fd7e5(0x16c)));}[_0x59f38d(0x197)](){const _0x28fee4=_0x59f38d;this[_0x28fee4(0x293)]?.[_0x28fee4(0x17b)]();}[_0x59f38d(0x1c9)](){const _0x4f8164=_0x59f38d;this[_0x4f8164(0x281)][_0x4f8164(0x1c9)]();}async[_0x59f38d(0x159)](){const _0x5653a7=_0x59f38d;await this[_0x5653a7(0x1a8)]();}async[_0x59f38d(0x1a4)]({message:_0x548360,quickActionData:_0x36739e}){const _0x1fa909=_0x59f38d;await this[_0x1fa909(0x219)]({'userMessage':_0x548360,'quickActionData':_0x36739e});}[_0x59f38d(0x185)](){const _0x2c3b71=_0x59f38d,_0x118f87=this[_0x2c3b71(0x279)][_0x2c3b71(0x155)][_0x2c3b71(0x253)](_0x2c3b71(0x285));if(!_0x118f87)throw new _0xc1fc68(_0x2c3b71(0x226),this);return _0x118f87;}async[_0x59f38d(0x1a8)](_0x2c7ad4){const _0x4b4556=_0x59f38d;try{this[_0x4b4556(0x281)][_0x4b4556(0x15e)](),await this[_0x4b4556(0x188)](_0x2c7ad4);}catch(_0x3b7c1a){_0x294b23(_0x4b4556(0x1d8),_0x3b7c1a),this[_0x4b4556(0x293)]=void 0x0,this[_0x4b4556(0x281)][_0x4b4556(0x27d)]();}}async[_0x59f38d(0x188)](_0x21b63b){const _0x2fe49e=_0x59f38d,_0x4e6162=this[_0x2fe49e(0x279)][_0x2fe49e(0x244)][_0x2fe49e(0x253)](_0x42fa45);let _0x44c910;_0x4e6162[_0x2fe49e(0x23d)]&&_0x4e6162[_0x2fe49e(0x180)](),_0x21b63b||!this[_0x2fe49e(0x293)]?_0x44c910=this[_0x2fe49e(0x279)][_0x2fe49e(0x155)][_0x2fe49e(0x253)](_0x2fe49e(0x22e)):this[_0x2fe49e(0x281)][_0x2fe49e(0x156)]&&(_0x44c910=this[_0x2fe49e(0x293)][_0x2fe49e(0x1dd)]['id']),await this[_0x2fe49e(0x1d1)]();const _0x206c8e=this[_0x2fe49e(0x185)](),_0x3a2010=_0x21b63b||_0x1db2a9();this[_0x2fe49e(0x293)]=new _0x41baee({'connector':this[_0x2fe49e(0x1b4)],'chatModels':this[_0x2fe49e(0x171)],'selectedModelId':_0x44c910,'conversationId':_0x3a2010,'group':_0x206c8e,'getEditor':()=>_0xc94297(this[_0x2fe49e(0x279)])}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x227),(_0x933220,_0x4496cc)=>{const _0x404e32=_0x2fe49e;this[_0x404e32(0x281)][_0x404e32(0x203)](_0x4496cc),this[_0x404e32(0x281)][_0x404e32(0x21e)](),this[_0x404e32(0x281)][_0x404e32(0x18a)](),this[_0x404e32(0x281)][_0x404e32(0x295)](),_0x21b63b||(this[_0x404e32(0x281)][_0x404e32(0x288)](),this[_0x404e32(0x293)]?.[_0x404e32(0x1aa)](_0x30ea9b(this[_0x404e32(0x279)][_0x404e32(0x1cf)],_0x404e32(0x16c))));}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x166),(_0x5604d6,_0x205403)=>{const _0x41daba=_0x2fe49e;this[_0x41daba(0x281)][_0x41daba(0x274)](_0x205403[_0x41daba(0x259)]);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x1d9),(_0x561462,_0x5b41ad)=>{const _0x404c9d=_0x2fe49e;this[_0x404c9d(0x281)][_0x404c9d(0x213)](_0x5b41ad);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x1e2),()=>{const _0x31e163=_0x2fe49e;this[_0x31e163(0x281)][_0x31e163(0x24f)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x258),()=>{const _0x3959d4=_0x2fe49e;this[_0x3959d4(0x281)][_0x3959d4(0x24f)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x22a),(_0x2d8569,_0x3c1591)=>{const _0xe4fe5f=_0x2fe49e;this[_0xe4fe5f(0x281)][_0xe4fe5f(0x147)](_0x3c1591,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x1d2),(_0x325953,_0x4ce716)=>{const _0x2975fc=_0x2fe49e;this[_0x2975fc(0x281)][_0x2975fc(0x147)](_0x4ce716,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x160),()=>{const _0x473c50=_0x2fe49e;this[_0x473c50(0x281)][_0x473c50(0x269)]();}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x25e),async()=>{const _0x55c23e=_0x2fe49e;await this[_0x55c23e(0x281)][_0x55c23e(0x1d0)]();}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x26a),(_0xe3b573,_0x14360e)=>{const _0x6406d8=_0x2fe49e;this[_0x6406d8(0x281)][_0x6406d8(0x146)](_0x14360e['id']);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x177),(_0x8ef34,_0x199015,_0x3445bc)=>{const _0x5422c0=_0x2fe49e;this[_0x5422c0(0x25f)](_0x199015,_0x3445bc);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x19a),(_0x15ed13,_0x312e43)=>{const _0x37f4a7=_0x2fe49e;_0x37f4a7(0x140)===_0x312e43[_0x37f4a7(0x196)]?this[_0x37f4a7(0x281)][_0x37f4a7(0x14c)](_0x312e43):this[_0x37f4a7(0x281)][_0x37f4a7(0x220)](_0x312e43);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x292),async(_0x49dfec,_0x3ca6e6)=>{const _0x274584=_0x2fe49e;await this[_0x274584(0x1a7)]({'reply':_0x3ca6e6});}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x1a6),(_0x283b5d,{reply:_0x1dbd83,index:_0x2adc92,state:_0x1ed6b8})=>{const _0x18ed54=_0x2fe49e;this[_0x18ed54(0x281)][_0x18ed54(0x224)]({'id':_0x1dbd83['id'],'index':_0x2adc92,'state':_0x1ed6b8});}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x1dc),(_0x2c8b7b,_0x4f2a47)=>{const _0x46664a=_0x2fe49e;if(this[_0x46664a(0x281)][_0x46664a(0x23e)](_0x4f2a47[_0x46664a(0x18f)],_0x4f2a47[_0x46664a(0x1b3)]),_0x46664a(0x1de)===_0x4f2a47[_0x46664a(0x18f)][_0x46664a(0x196)]){const _0x1f92ad=[..._0xc94297(this[_0x46664a(0x279)])[_0x46664a(0x245)][_0x46664a(0x1db)][_0x46664a(0x1de)][_0x46664a(0x163)]()];this[_0x46664a(0x20c)][_0x46664a(0x273)](_0x1f92ad,_0x46664a(0x181)+this[_0x46664a(0x293)]?.['id']);}}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x229),(_0x357bf4,_0x54b5c6)=>{const _0x30985d=_0x2fe49e;this[_0x30985d(0x281)][_0x30985d(0x157)](_0x54b5c6[_0x30985d(0x28c)]),_0x30985d(0x28e)==_0x54b5c6[_0x30985d(0x28c)]&&this[_0x30985d(0x197)](),_0x30985d(0x1de)===_0x54b5c6[_0x30985d(0x196)]&&this[_0x30985d(0x20c)][_0x30985d(0x1da)](_0x30985d(0x181)+this[_0x30985d(0x293)]?.['id']);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x280),(_0x3bd7bb,_0x2ccf23)=>{const _0x17b37f=_0x2fe49e;this[_0x17b37f(0x281)][_0x17b37f(0x187)](_0x2ccf23[_0x17b37f(0x18f)][_0x17b37f(0x28c)],_0x2ccf23[_0x17b37f(0x1b3)]);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x1e3),(_0x226193,_0x1409ac)=>{const _0x523fad=_0x2fe49e;this[_0x523fad(0x281)][_0x523fad(0x154)](_0x1409ac[_0x523fad(0x149)]);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x246),(_0x517bf0,_0x12b1f8)=>{const _0x2c22e4=_0x2fe49e;this[_0x2c22e4(0x281)][_0x2c22e4(0x236)](_0x12b1f8[_0x2c22e4(0x1af)]);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x1f7),(_0x49492b,_0x729ebd)=>{const _0x20d7f1=_0x2fe49e;this[_0x20d7f1(0x281)][_0x20d7f1(0x216)](_0x729ebd[_0x20d7f1(0x1b1)],_0x729ebd[_0x20d7f1(0x206)],_0x729ebd[_0x20d7f1(0x201)],_0x729ebd[_0x20d7f1(0x1ba)]);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x251),(_0x21ac97,_0x12b731)=>{const _0x84aa0f=_0x2fe49e;this[_0x84aa0f(0x281)][_0x84aa0f(0x1bb)](_0x12b731[_0x84aa0f(0x1b1)],_0x12b731[_0x84aa0f(0x21b)],_0x12b731[_0x84aa0f(0x28d)]);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x256),(_0x21e5e5,_0x402011)=>{const _0x142d1f=_0x2fe49e;this[_0x142d1f(0x281)][_0x142d1f(0x14d)](_0x402011);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x19d),(_0x481ed0,_0x58fa63)=>{const _0x3729e5=_0x2fe49e;this[_0x3729e5(0x281)][_0x3729e5(0x1c4)](_0x58fa63[_0x3729e5(0x1dd)],_0x58fa63[_0x3729e5(0x252)]);}),this[_0x2fe49e(0x293)]['on'](_0x2fe49e(0x1a5),(_0x2b05c6,{error:_0x2cb47c,interactionId:_0x356d72,fileName:_0xb43dd9,url:_0xfdf342,sourceId:_0xaa0ce9,sourceLabel:_0x39bdeb})=>{const _0x4fb3cf=_0x2fe49e,_0x5d8575=_0x356d72?_0x356d72+':'+_0x1db2a9():_0x1db2a9();_0x2cb47c[_0x4fb3cf(0x208)][_0x4fb3cf(0x1ca)](_0x4fb3cf(0x17c))?this[_0x4fb3cf(0x281)][_0x4fb3cf(0x271)]({'staticMessage':_0x30ea9b(this[_0x4fb3cf(0x279)][_0x4fb3cf(0x1cf)],_0x4fb3cf(0x16e)),'id':_0x5d8575}):_0x2cb47c[_0x4fb3cf(0x208)][_0x4fb3cf(0x1ca)](_0x4fb3cf(0x16f))||_0x2cb47c[_0x4fb3cf(0x208)][_0x4fb3cf(0x1ca)](_0x4fb3cf(0x1d8))?(this[_0x4fb3cf(0x281)][_0x4fb3cf(0x16a)]({'errorMessage':_0x30ea9b(this[_0x4fb3cf(0x279)][_0x4fb3cf(0x1cf)],_0x4fb3cf(0x19f)),'id':_0x5d8575}),this[_0x4fb3cf(0x1ae)](_0x2cb47c)):_0x2cb47c[_0x4fb3cf(0x208)][_0x4fb3cf(0x1ca)](_0x4fb3cf(0x18e))?this[_0x4fb3cf(0x281)][_0x4fb3cf(0x16a)]({'errorMessage':_0x30ea9b(this[_0x4fb3cf(0x279)][_0x4fb3cf(0x1cf)],_0x4fb3cf(0x215),_0xb43dd9),'id':_0x5d8575}):_0x2cb47c[_0x4fb3cf(0x208)][_0x4fb3cf(0x1ca)](_0x4fb3cf(0x13e))?this[_0x4fb3cf(0x281)][_0x4fb3cf(0x16a)]({'errorMessage':_0x30ea9b(this[_0x4fb3cf(0x279)][_0x4fb3cf(0x1cf)],_0x4fb3cf(0x1a0),_0xfdf342),'id':_0x5d8575}):_0x2cb47c[_0x4fb3cf(0x208)][_0x4fb3cf(0x1ca)](_0x4fb3cf(0x1bf))?this[_0x4fb3cf(0x281)][_0x4fb3cf(0x16a)]({'errorMessage':_0x30ea9b(this[_0x4fb3cf(0x279)][_0x4fb3cf(0x1cf)],_0x4fb3cf(0x267)),'id':_0x5d8575}):_0x2cb47c[_0x4fb3cf(0x208)][_0x4fb3cf(0x1ca)](_0x4fb3cf(0x26c))?this[_0x4fb3cf(0x281)][_0x4fb3cf(0x16a)]({'errorMessage':_0x30ea9b(this[_0x4fb3cf(0x279)][_0x4fb3cf(0x1cf)],_0x4fb3cf(0x1f2)),'id':_0x5d8575}):_0x2cb47c[_0x4fb3cf(0x208)][_0x4fb3cf(0x1ca)](_0x4fb3cf(0x1f8))?(_0xaa0ce9&&this[_0x4fb3cf(0x281)][_0x4fb3cf(0x161)](_0xaa0ce9),this[_0x4fb3cf(0x281)][_0x4fb3cf(0x16a)]({'errorMessage':_0x30ea9b(this[_0x4fb3cf(0x279)][_0x4fb3cf(0x1cf)],_0x4fb3cf(0x1ed),_0x39bdeb||_0x4fb3cf(0x206)),'id':_0x5d8575}),this[_0x4fb3cf(0x1ae)](_0x2cb47c)):_0x2cb47c[_0x4fb3cf(0x208)][_0x4fb3cf(0x1ca)](_0x4fb3cf(0x22b))?(this[_0x4fb3cf(0x281)][_0x4fb3cf(0x16a)]({'errorMessage':_0x30ea9b(this[_0x4fb3cf(0x279)][_0x4fb3cf(0x1cf)],_0x4fb3cf(0x241)),'id':_0x5d8575}),this[_0x4fb3cf(0x1ae)](_0x2cb47c)):(this[_0x4fb3cf(0x281)][_0x4fb3cf(0x16a)]({'errorMessage':_0x30ea9b(this[_0x4fb3cf(0x279)][_0x4fb3cf(0x1cf)],_0x4fb3cf(0x168)),'id':_0x5d8575}),this[_0x4fb3cf(0x1ae)](_0x2cb47c));}),await this[_0x2fe49e(0x293)][_0x2fe49e(0x151)](this[_0x2fe49e(0x279)][_0x2fe49e(0x155)][_0x2fe49e(0x253)](_0x2fe49e(0x214))),_0x21b63b||await this[_0x2fe49e(0x293)][_0x2fe49e(0x268)]();}async[_0x59f38d(0x219)]({userMessage:_0x549a08,quickActionData:_0x107b77}){const _0x51101e=_0x59f38d;if(!this[_0x51101e(0x293)])throw new _0xc1fc68(_0x51101e(0x1bc));this[_0x51101e(0x293)][_0x51101e(0x1e1)]()&&await this[_0x51101e(0x293)][_0x51101e(0x1a2)](this[_0x51101e(0x20c)][_0x51101e(0x284)]()),this[_0x51101e(0x293)]['id']&&this[_0x51101e(0x293)][_0x51101e(0x1d3)]&&await this[_0x51101e(0x293)][_0x51101e(0x1a1)]({'userMessage':_0x549a08,'quickActionData':_0x107b77}),this[_0x51101e(0x1fd)]();}[_0x59f38d(0x1fd)](){const _0x508b03=_0x59f38d,_0x23001c=_0xc94297(this[_0x508b03(0x279)])[_0x508b03(0x245)],_0x4cbb1c=Array[_0x508b03(0x260)](_0x23001c[_0x508b03(0x148)][_0x508b03(0x17f)](_0x47a8a5));_0x23001c[_0x508b03(0x276)](_0xf71110=>{const _0x4a05d8=_0x508b03;_0x4cbb1c[_0x4a05d8(0x223)](_0x32e3eb=>_0xf71110[_0x4a05d8(0x272)](_0x32e3eb));});}[_0x59f38d(0x270)](){const _0x460bcb=_0x59f38d;console[_0x460bcb(0x1a9)](_0x460bcb(0x141));}[_0x59f38d(0x1f9)](_0x2816db){const _0x2cd2cb=_0x59f38d;this[_0x2cd2cb(0x281)][_0x2cd2cb(0x1ec)](_0x2816db);}[_0x59f38d(0x1ae)](_0x366bf4){const _0x2a69d1=_0x59f38d;_0x294b23(_0x366bf4[_0x2a69d1(0x208)]);}[_0x59f38d(0x231)](_0x25ad05){const _0x37071c=_0x59f38d;this[_0x37071c(0x293)]?.[_0x37071c(0x1fa)](_0x25ad05);}[_0x59f38d(0x20e)](){const _0x82250a=_0x59f38d;this[_0x82250a(0x293)]?.[_0x82250a(0x239)]();}[_0x59f38d(0x144)](){const _0x6099de=_0x59f38d;this[_0x6099de(0x293)]?.[_0x6099de(0x193)]();}[_0x59f38d(0x1ac)](_0x30f863){const _0x2769a2=_0x59f38d,[_0x23e715,_0x5e1802]=_0x30f863[_0x2769a2(0x211)](':'),_0x504bce=this[_0x2769a2(0x293)][_0x2769a2(0x27b)](_0x23e715),_0x3769a8=_0x504bce[_0x2769a2(0x1c2)](_0x5e1802);return{'interaction':_0x504bce,'reply':_0x3769a8};}[_0x59f38d(0x278)](_0x337320,_0x3798c1=!0x1){const _0x3650ff=_0x59f38d,_0x23ba14=_0xc94297(this[_0x3650ff(0x279)]),_0x11577a={'target':_0x23ba14[_0x3650ff(0x21c)][_0x3650ff(0x1f5)][_0x3650ff(0x1ff)][_0x3650ff(0x27f)](_0x23ba14[_0x3650ff(0x21c)][_0x3650ff(0x225)][_0x3650ff(0x27e)](_0x337320)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x3798c1};_0x3798c1&&(_0x11577a[_0x3650ff(0x234)]=!0x0),_0x267891(_0x11577a);}[_0x59f38d(0x25f)](_0x14a59a,_0x4d6ca8=!0x1){const _0x4b4811=_0x59f38d;this[_0x4b4811(0x281)][_0x4b4811(0x177)](_0x14a59a||_0x30ea9b(this[_0x4b4811(0x279)][_0x4b4811(0x1cf)],_0x4b4811(0x16d)),_0x4d6ca8);}async[_0x59f38d(0x1a7)]({reply:_0x33d58b,renderingStrategy:_0x2bf28f}){const _0x24c7ab=_0x59f38d,{id:_0x34decb,isDone:_0x201f31,type:_0x41da81,parsedContent:_0x4dc14a}=_0x33d58b;if(_0x24c7ab(0x17d)===_0x41da81){const _0x296bd6=_0x33d58b[_0x24c7ab(0x198)]({'showDiff':this[_0x24c7ab(0x281)][_0x24c7ab(0x170)]});await this[_0x24c7ab(0x281)][_0x24c7ab(0x192)]({'id':_0x34decb,'parts':_0x296bd6,'renderingStrategy':_0x2bf28f,'isDone':_0x201f31});}else _0x24c7ab(0x140)===_0x41da81&&await this[_0x24c7ab(0x281)][_0x24c7ab(0x175)]({'id':_0x34decb,'parsedContent':_0x4dc14a,'renderingStrategy':_0x2bf28f,'isDone':_0x201f31});_0x201f31&&_0x33d58b[_0x24c7ab(0x1b9)][_0x24c7ab(0x18b)]>0x0&&this[_0x24c7ab(0x281)][_0x24c7ab(0x218)](_0x34decb,_0x33d58b[_0x24c7ab(0x1b9)]);}async[_0x59f38d(0x1d1)](){const _0x165014=_0x59f38d,_0x4b07ff=this[_0x165014(0x293)]?.[_0x165014(0x153)];_0x4b07ff&&(_0x4b07ff[_0x165014(0x1d4)](),this[_0x165014(0x281)][_0x165014(0x27c)](_0x4b07ff));}async[_0x59f38d(0x264)](){const _0xdf6899=_0x59f38d,_0x1715c9=this[_0xdf6899(0x293)]?.[_0xdf6899(0x153)];if(_0x1715c9){for await(const _0x418399 of _0x1715c9[_0xdf6899(0x1fe)])await this[_0xdf6899(0x1a7)]({'reply':_0x418399,'renderingStrategy':_0xdf6899(0x190)});}}[_0x59f38d(0x217)](_0x1f55fc){const _0x59d61a=_0x59f38d,_0x154046={'positiveCount':_0x1f55fc[_0x59d61a(0x20b)][_0x59d61a(0x25c)](_0x3e8fe0=>_0x59d61a(0x1c6)===_0x3e8fe0[_0x59d61a(0x164)])[_0x59d61a(0x18b)],'totalCount':_0x1f55fc[_0x59d61a(0x20b)][_0x59d61a(0x18b)],'modificationId':_0x1f55fc['id']},_0x261c2e=this[_0x59d61a(0x293)][_0x59d61a(0x27b)](_0x1f55fc[_0x59d61a(0x296)])[_0x59d61a(0x183)];this[_0x59d61a(0x1b4)][_0x59d61a(0x24a)](this[_0x59d61a(0x293)]['id'],_0x261c2e,_0x154046);}}
|
package/src/aichat/aichatui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x49c0(_0x30961d,_0x5237db){const _0x3d3605=_0x3d36();return _0x49c0=function(_0x49c0cd,_0x549cc4){_0x49c0cd=_0x49c0cd-0x196;let _0x22dde2=_0x3d3605[_0x49c0cd];return _0x22dde2;},_0x49c0(_0x30961d,_0x5237db);}const _0x5a3453=_0x49c0;(function(_0x279e65,_0x54b2c1){const _0x2e3af7=_0x49c0,_0x567b90=_0x279e65();while(!![]){try{const _0x2f99ec=parseInt(_0x2e3af7(0x1b4))/0x1*(parseInt(_0x2e3af7(0x200))/0x2)+parseInt(_0x2e3af7(0x214))/0x3+parseInt(_0x2e3af7(0x220))/0x4*(-parseInt(_0x2e3af7(0x1e7))/0x5)+parseInt(_0x2e3af7(0x215))/0x6*(parseInt(_0x2e3af7(0x1db))/0x7)+parseInt(_0x2e3af7(0x1d7))/0x8*(parseInt(_0x2e3af7(0x1c5))/0x9)+-parseInt(_0x2e3af7(0x229))/0xa+parseInt(_0x2e3af7(0x1a1))/0xb*(-parseInt(_0x2e3af7(0x1ba))/0xc);if(_0x2f99ec===_0x54b2c1)break;else _0x567b90['push'](_0x567b90['shift']());}catch(_0x167422){_0x567b90['push'](_0x567b90['shift']());}}}(_0x3d36,0xd3cdd));import{ContextPlugin as _0x4f74fa}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x4cb9b6}from'ckeditor5/src/utils.js';import{AIChatView as _0xaf56bf}from'./ui/aichatview.js';import{AITabs as _0x291215}from'../aitabs/aitabs.js';import{getTranslation as _0x5f2058}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x1b61c3}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x38bc1b}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0xc426c9}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x470759}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x44b991}from'../aicore/utils/geteditorfromcontext.js';function _0x3d36(){const _0x3aad4a=['92WrzcmT','_getInputPlaceholder','ai-suggestion-reply','availableModels','addFeedInteractionHeader','startAutoScroll','addContextItem','removeFeedInteraction','pluginName','closeSourceResourceBalloon','showDiff','view','isMaximized','then','feedItemRenderingStrategy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','values','isWebSearchEnabled','createConversation','_promiseQueue','4362735ZrLSdA','98334cIBdSw','enableModelSelector','updateSuggestionItem','streaming','addFeedItemError','enqueue','options','updateFeedInteractionHeader','queueEmptyPromise','setConversationContext','interaction-header','32jmjLNL','displayedPrompt','setWebSearch','stopInteraction','label','setSelectedModel','insertSuggestion','addFeedItemStaticMessage','disableModelSelector','16651230KgALAp','setContextItemLoading','contextItems','areActionsDisabled','filter','value','destroy','capabilities','setConversationTitle','_view','addFeedItemAISuggestion','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','get','setLoadingMessage','isDone','AIChatUI','ai.chat.context.searchInputVisibleFrom','scrollFeedToSuggestion','isPremiumPlugin','updateFeedItemAIReplySuggestionContent','clear','setFeedItemRenderingStrategy','isBusy','conversation-start','error-message','setAddContextOptions','AI_CHAT_HEADING','finishInteraction','ai-reply','</p>','clearConversationContextUI','_titleAnimationInterval','userMessage','4898366iZCTDY','updateReplyItem','toggleLoadingSkeleton','ai.availableReplyActions','isVisible','getItemIds','isPending','quickActionData','TrackChanges','toggleSuggestionDisplayMode','set','commands','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','length','chatControls','removeItem','user-message','resetConversationTitle','setIsUploadInProgress','30188ahtXrS','find','enableControls','markItemAsDone','AITabs','setIsMaximized','36fRAEpl','setReasoning','resetMessageInput','populateSourceResourceBalloon','updateSuggestionPartState','_animateConversationTitle','isReasoningEnabled','<p>','AI_CHAT_WELCOME_MESSAGE','isLoading','renderingStrategy','72dzVsrT','isOfficialPlugin','setInputPlaceholder','has','children','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','updateFeedItemAIReplySources','scrollToSuggestion','isTrackChangesOn','startInteraction','updateFeedItemAIReplySuggestionPartState','startsWith','bind','last','context','updateWebSources','showResizeButton','remove','256136zHTNLL','chat','addFeedItemUserMessage','plugins','651vhcruO','forEach','_isTrackChangesCommandValueBound','stopAutoScroll','clearPendingContextUI','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','updateCapabilities','interactionId','updateFeedItemAIReplyContent','requires','isDisabled','chatFeed','471635hmcQoN','setModel','focusPromptInput','updateResourceState','trackChanges','ai.chat.models.modelSelectorAlwaysVisible','chatHeader','setModelList','_getLoadingMessage','_interactionPromiseResolver','delegate','markFeedItemAsDone','abort','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','locale','config','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','addTab','removeContextItem','addFeedItemAIReply','isModelAvailable','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','disableControls','addItem','from'];_0x3d36=function(){return _0x3aad4a;};return _0x3d36();}import{AI_REPLY_ACTIONS as _0x26edaf}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x4f74fa{static get[_0x5a3453(0x1e4)](){return[_0x291215];}[_0x5a3453(0x232)];static get[_0x5a3453(0x208)](){const _0x483a51=_0x5a3453;return _0x483a51(0x238);}static get[_0x5a3453(0x1c6)](){return!0x0;}static get[_0x5a3453(0x23b)](){return!0x0;}[_0x5a3453(0x20e)]=_0x5a3453(0x218);[_0x5a3453(0x20a)]=!0x0;[_0x5a3453(0x213)];[_0x5a3453(0x1f0)];[_0x5a3453(0x19f)]=void 0x0;[_0x5a3453(0x1dd)]=!0x1;constructor(_0x378371){const _0x4e2ed0=_0x5a3453;super(_0x378371);const _0x49f77b=this[_0x4e2ed0(0x1d3)][_0x4e2ed0(0x1da)][_0x4e2ed0(0x235)](_0x4e2ed0(0x1b8));this[_0x4e2ed0(0x1ab)](_0x4e2ed0(0x196),!0x1),this[_0x4e2ed0(0x213)]=new _0xc426c9(),this[_0x4e2ed0(0x232)]=new _0xaf56bf(this[_0x4e2ed0(0x1d3)][_0x4e2ed0(0x1f5)],{'showResizeButton':_0x49f77b[_0x4e2ed0(0x1d5)],'contextResourcesSearchInputVisibleFrom':this[_0x4e2ed0(0x1d3)][_0x4e2ed0(0x1f6)][_0x4e2ed0(0x235)](_0x4e2ed0(0x239))}),this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1f1)](..._0x470759)['to'](this),this[_0x4e2ed0(0x232)]['on'](_0x4e2ed0(0x1aa),(_0x2c5a16,{showDiff:_0x102970})=>{const _0x28d5f3=_0x4e2ed0;this[_0x28d5f3(0x20a)]=_0x102970;}),_0x49f77b[_0x4e2ed0(0x20b)][_0x4e2ed0(0x1f8)]({'id':_0x4e2ed0(0x1d8),'buttonLabel':_0x5f2058(this[_0x4e2ed0(0x1d3)][_0x4e2ed0(0x1f5)],_0x4e2ed0(0x19a)),'buttonIcon':_0x1b61c3,'order':0x0,'content':this[_0x4e2ed0(0x232)]}),this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1af)][_0x4e2ed0(0x1d1)](_0x4e2ed0(0x1c3))['to'](this,_0x4e2ed0(0x196),_0x15cfe2=>_0x15cfe2),this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1e6)][_0x4e2ed0(0x1d1)](_0x4e2ed0(0x1a7))['to'](this,_0x4e2ed0(0x196),_0x2a3d3a=>_0x2a3d3a),this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1af)][_0x4e2ed0(0x1c7)](this[_0x4e2ed0(0x201)]()),this[_0x4e2ed0(0x1d1)](_0x4e2ed0(0x1fb))['to'](this[_0x4e2ed0(0x232)][_0x4e2ed0(0x1af)],_0x4e2ed0(0x1fb));}[_0x5a3453(0x22f)](){const _0x27a42f=_0x5a3453;super[_0x27a42f(0x22f)](),this[_0x27a42f(0x19f)]&&clearInterval(this[_0x27a42f(0x19f)]);}[_0x5a3453(0x212)](_0x4e5c6c){const _0x2cda92=_0x5a3453;this[_0x2cda92(0x232)][_0x2cda92(0x1e6)][_0x2cda92(0x23d)](),this[_0x2cda92(0x232)][_0x2cda92(0x1af)][_0x2cda92(0x216)](),this[_0x2cda92(0x232)][_0x2cda92(0x1af)][_0x2cda92(0x1ee)](_0x4e5c6c[_0x2cda92(0x203)],!this[_0x2cda92(0x1d3)][_0x2cda92(0x1f6)][_0x2cda92(0x235)](_0x2cda92(0x1ec))),this[_0x2cda92(0x227)]({'id':_0x2cda92(0x197),'staticMessage':_0x5f2058(this[_0x2cda92(0x1d3)][_0x2cda92(0x1f5)],_0x2cda92(0x1c2))});}[_0x5a3453(0x227)]({id:_0x4feafb,staticMessage:_0x1ffbc7}){const _0x22159e=_0x5a3453;this[_0x22159e(0x232)][_0x22159e(0x1e6)][_0x22159e(0x1fe)](_0x22159e(0x19c),{'id':_0x4feafb,'initialContent':_0x22159e(0x1c1)+_0x1ffbc7+_0x22159e(0x19d)});}[_0x5a3453(0x1d9)](_0x3d9465){const _0x1f2353=_0x5a3453,_0x284067=_0x3d9465[_0x1f2353(0x1a8)]?.[_0x1f2353(0x221)]||_0x3d9465[_0x1f2353(0x1a0)];this[_0x1f2353(0x232)][_0x1f2353(0x1e6)][_0x1f2353(0x1fe)](_0x1f2353(0x1b1),{'contextItems':Array[_0x1f2353(0x1ff)](_0x3d9465[_0x1f2353(0x22b)][_0x1f2353(0x210)]()),'initialContent':_0x1f2353(0x1c1)+_0x284067+_0x1f2353(0x19d),'id':_0x3d9465['id']});}[_0x5a3453(0x219)]({errorMessage:_0x4d45cc,id:_0x84463b}){const _0x6323ce=_0x5a3453;this[_0x6323ce(0x232)][_0x6323ce(0x1e6)][_0x6323ce(0x1fe)](_0x6323ce(0x198),{'initialContent':_0x6323ce(0x1c1)+_0x4d45cc+_0x6323ce(0x19d),'id':_0x84463b});}[_0x5a3453(0x1fa)](_0x506f1d){const _0x223256=_0x5a3453;return this[_0x223256(0x213)][_0x223256(0x21a)](async()=>{const _0x1c9d33=_0x223256;this[_0x1c9d33(0x232)][_0x1c9d33(0x1e6)][_0x1c9d33(0x1fe)](_0x1c9d33(0x19c),{'id':_0x506f1d[_0x1c9d33(0x1e2)]+':'+_0x506f1d['id']}),this[_0x1c9d33(0x236)](null);});}async[_0x5a3453(0x233)](_0x52d3e5){const _0x331503=_0x5a3453,_0x437128=_0x44b991(this[_0x331503(0x1d3)]);let _0x283f0f=_0x437128[_0x331503(0x1f6)][_0x331503(0x235)](_0x331503(0x1a4))||[..._0x26edaf];if(_0x437128[_0x331503(0x1da)][_0x331503(0x1c8)](_0x331503(0x1a9))){if(!this[_0x331503(0x1dd)]){this[_0x331503(0x1dd)]=!0x0;const _0x497c2f=_0x437128[_0x331503(0x1ac)][_0x331503(0x235)](_0x331503(0x1eb));this[_0x331503(0x232)][_0x331503(0x1e6)][_0x331503(0x1d1)](_0x331503(0x1cd))['to'](_0x497c2f,_0x331503(0x22e));}}else _0x283f0f=_0x283f0f[_0x331503(0x22d)](_0x4ca99f=>_0x331503(0x226)!=_0x4ca99f);return this[_0x331503(0x213)][_0x331503(0x21a)](async()=>{const _0x4a12b5=_0x331503;this[_0x4a12b5(0x232)][_0x4a12b5(0x1e6)][_0x4a12b5(0x1fe)](_0x4a12b5(0x202),{'id':_0x52d3e5[_0x4a12b5(0x1e2)]+':'+_0x52d3e5['id'],'areActionsDisabled':_0x52d3e5[_0x4a12b5(0x22c)],'showDiff':this[_0x4a12b5(0x20a)],'availableActions':_0x283f0f}),this[_0x4a12b5(0x236)](null);});}[_0x5a3453(0x204)](_0xf0c9df,_0x36746b){const _0x3087b1=_0x5a3453,_0x34cb33=this[_0x3087b1(0x232)][_0x3087b1(0x1e6)][_0x3087b1(0x1c9)][_0x3087b1(0x1d2)];if(_0x34cb33 instanceof _0x38bc1b)return this[_0x3087b1(0x232)][_0x3087b1(0x1e6)][_0x3087b1(0x1c9)][_0x3087b1(0x1d6)](_0x34cb33),void this[_0x3087b1(0x232)][_0x3087b1(0x1e6)][_0x3087b1(0x1fe)](_0x3087b1(0x21f),{'id':_0xf0c9df['id'],'capabilities':{'isWebSearchEnabled':_0x34cb33[_0x3087b1(0x230)][_0x3087b1(0x211)]||_0x36746b[_0x3087b1(0x211)],'isReasoningEnabled':_0x34cb33[_0x3087b1(0x230)][_0x3087b1(0x1c0)]||_0x36746b[_0x3087b1(0x1c0)]}});this[_0x3087b1(0x232)][_0x3087b1(0x1e6)][_0x3087b1(0x1fe)](_0x3087b1(0x21f),{'id':_0xf0c9df['id'],'capabilities':_0x36746b});}[_0x5a3453(0x21c)](_0x3d97f4){const _0x3ce151=_0x5a3453,_0x30c185=this[_0x3ce151(0x232)][_0x3ce151(0x1e6)][_0x3ce151(0x1c9)][_0x3ce151(0x1b5)](_0x580a04=>_0x580a04[_0x3ce151(0x21b)]['id']==_0x3d97f4['id']&&_0x580a04 instanceof _0x38bc1b);_0x30c185&&_0x30c185[_0x3ce151(0x1ab)](_0x3ce151(0x1a5),_0x3d97f4[_0x3ce151(0x1a5)]);}async[_0x5a3453(0x1e3)](_0x448809){const _0x122e8c=_0x5a3453,_0x416b6f=_0x448809[_0x122e8c(0x1c4)]||this[_0x122e8c(0x20e)];return this[_0x122e8c(0x213)][_0x122e8c(0x21a)](async _0x32372d=>{const _0x56b580=_0x122e8c;await this[_0x56b580(0x232)][_0x56b580(0x1e6)][_0x56b580(0x1a2)]({..._0x448809,'abortSignal':_0x32372d,'renderingStrategy':_0x416b6f}),_0x448809[_0x56b580(0x237)]&&this[_0x56b580(0x1f2)](_0x448809['id']);});}[_0x5a3453(0x1cb)](_0xfee93b,_0x576dae){const _0xd0c0ab=_0x5a3453;this[_0xd0c0ab(0x232)][_0xd0c0ab(0x1e6)][_0xd0c0ab(0x1d4)](_0xfee93b,_0x576dae);}async[_0x5a3453(0x23c)](_0x25a200){const _0x4430a3=_0x5a3453,_0x4eb041=_0x25a200[_0x4430a3(0x1c4)]||this[_0x4430a3(0x20e)];return this[_0x4430a3(0x213)][_0x4430a3(0x21a)](async _0x5cd998=>{const _0x237e1b=_0x4430a3;await this[_0x237e1b(0x232)][_0x237e1b(0x1e6)][_0x237e1b(0x217)]({..._0x25a200,'abortSignal':_0x5cd998,'renderingStrategy':_0x4eb041}),_0x25a200[_0x237e1b(0x237)]&&this[_0x237e1b(0x1f2)](_0x25a200['id']);});}[_0x5a3453(0x1cf)](_0x350150){const _0x31f01b=_0x5a3453;this[_0x31f01b(0x232)][_0x31f01b(0x1e6)][_0x31f01b(0x1be)](_0x350150);}[_0x5a3453(0x1f2)](_0x395c94){const _0x930dfa=_0x5a3453;this[_0x930dfa(0x232)][_0x930dfa(0x1e6)][_0x930dfa(0x1b7)](_0x395c94);}[_0x5a3453(0x207)](_0x20145c){const _0x58e967=_0x5a3453;this[_0x58e967(0x232)][_0x58e967(0x1e6)][_0x58e967(0x1a6)]()[_0x58e967(0x22d)](_0x16d5f6=>_0x16d5f6[_0x58e967(0x1d0)](_0x20145c))[_0x58e967(0x1dc)](_0x3f10c5=>this[_0x58e967(0x232)][_0x58e967(0x1e6)][_0x58e967(0x1b0)](_0x3f10c5));}[_0x5a3453(0x1ce)](){const _0x3b13f1=_0x5a3453;this[_0x3b13f1(0x236)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x3b13f1(0x232)][_0x3b13f1(0x1af)][_0x3b13f1(0x228)](!this[_0x3b13f1(0x1d3)][_0x3b13f1(0x1f6)][_0x3b13f1(0x235)](_0x3b13f1(0x1ec))),this[_0x3b13f1(0x196)]=!0x0,this[_0x3b13f1(0x232)][_0x3b13f1(0x1e6)][_0x3b13f1(0x205)]();}[_0x5a3453(0x223)](_0x59338c){const _0x552ecc=_0x5a3453;this[_0x552ecc(0x213)][_0x552ecc(0x1f3)](),this[_0x552ecc(0x232)][_0x552ecc(0x1e6)][_0x552ecc(0x1a6)]()[_0x552ecc(0x22d)](_0x8f0e01=>_0x8f0e01[_0x552ecc(0x1d0)](_0x59338c['id']))[_0x552ecc(0x1dc)](_0x4f929a=>this[_0x552ecc(0x1f2)](_0x4f929a)),this[_0x552ecc(0x196)]=!0x1,this[_0x552ecc(0x232)][_0x552ecc(0x1e6)][_0x552ecc(0x1de)]();}async[_0x5a3453(0x19b)](){const _0x4942c2=_0x5a3453;return this[_0x4942c2(0x213)][_0x4942c2(0x21d)][_0x4942c2(0x20d)](()=>{const _0x219ecf=_0x4942c2;this[_0x219ecf(0x196)]=!0x1,this[_0x219ecf(0x232)][_0x219ecf(0x1e6)][_0x219ecf(0x1de)]();});}[_0x5a3453(0x206)](_0x416338,_0x594c21){const _0x34eadc=_0x5a3453;this[_0x34eadc(0x232)][_0x34eadc(0x1af)][_0x34eadc(0x206)](_0x416338,_0x594c21);}[_0x5a3453(0x1f9)](_0xe344f4){const _0x51fac8=_0x5a3453;this[_0x51fac8(0x232)][_0x51fac8(0x1af)][_0x51fac8(0x1f9)](_0xe344f4);}[_0x5a3453(0x22a)](_0x3f2246,_0x456aeb){const _0xd4ce91=_0x5a3453;this[_0xd4ce91(0x232)][_0xd4ce91(0x1af)][_0xd4ce91(0x22a)](_0x3f2246,_0x456aeb);}[_0x5a3453(0x1b3)](_0x4d0218){const _0x490552=_0x5a3453;this[_0x490552(0x232)][_0x490552(0x1af)][_0x490552(0x1b3)](_0x4d0218);}[_0x5a3453(0x21e)](_0x1868ea){const _0x1499fb=_0x5a3453;this[_0x1499fb(0x232)][_0x1499fb(0x1af)][_0x1499fb(0x21e)](_0x1868ea);}[_0x5a3453(0x1df)](){const _0x58e3d3=_0x5a3453;this[_0x58e3d3(0x232)][_0x58e3d3(0x1af)][_0x58e3d3(0x1df)]();}[_0x5a3453(0x19e)](){const _0x534c2b=_0x5a3453;this[_0x534c2b(0x232)][_0x534c2b(0x1af)][_0x534c2b(0x19e)]();}[_0x5a3453(0x1ea)](_0x57634a,_0x51cc62,_0x33bfb2){const _0x4a78f0=_0x5a3453;this[_0x4a78f0(0x232)][_0x4a78f0(0x1af)][_0x4a78f0(0x1ea)](_0x57634a,_0x51cc62,_0x33bfb2);}[_0x5a3453(0x1bc)](){const _0x53ef53=_0x5a3453;this[_0x53ef53(0x232)][_0x53ef53(0x1af)][_0x53ef53(0x1bc)](),this[_0x53ef53(0x232)][_0x53ef53(0x1af)][_0x53ef53(0x1c7)](this[_0x53ef53(0x201)]());}[_0x5a3453(0x199)](_0x42a9e0){const _0x232aea=_0x5a3453;this[_0x232aea(0x232)][_0x232aea(0x1af)][_0x232aea(0x199)](_0x42a9e0);}[_0x5a3453(0x1e1)](_0x246e16){const _0x44c723=_0x5a3453;this[_0x44c723(0x232)][_0x44c723(0x1af)][_0x44c723(0x222)](_0x246e16[_0x44c723(0x211)]),this[_0x44c723(0x232)][_0x44c723(0x1af)][_0x44c723(0x1bb)](_0x246e16[_0x44c723(0x1c0)]),this[_0x44c723(0x232)][_0x44c723(0x1af)][_0x44c723(0x1c7)](this[_0x44c723(0x201)](_0x246e16));}[_0x5a3453(0x225)](_0x40946c,_0x578437){const _0x482f82=_0x5a3453;this[_0x482f82(0x232)][_0x482f82(0x1af)][_0x482f82(0x1e8)](_0x40946c),_0x578437&&this[_0x482f82(0x232)][_0x482f82(0x1af)][_0x482f82(0x228)](!0x1);}[_0x5a3453(0x23e)](_0x463f85){const _0x101f44=_0x5a3453;this[_0x101f44(0x20e)]=_0x463f85;}[_0x5a3453(0x1a3)](_0x5a80fa){const _0x11b6bf=_0x5a3453;this[_0x11b6bf(0x232)][_0x11b6bf(0x1e6)][_0x11b6bf(0x1a3)](_0x5a80fa);}[_0x5a3453(0x1b2)](){const _0x5bc9de=_0x5a3453;this[_0x5bc9de(0x231)](_0x5f2058(this[_0x5bc9de(0x1d3)][_0x5bc9de(0x1f5)],_0x5bc9de(0x19a)));}[_0x5a3453(0x231)](_0x1bf985,_0x780937=!0x1){const _0x4e8442=_0x5a3453;if(_0x780937&&!_0x4cb9b6()&&_0x1bf985[_0x4e8442(0x1ae)])return this[_0x4e8442(0x232)][_0x4e8442(0x1ed)][_0x4e8442(0x224)]='',void this[_0x4e8442(0x1bf)](_0x1bf985);this[_0x4e8442(0x232)][_0x4e8442(0x1ed)][_0x4e8442(0x224)]=_0x1bf985;}[_0x5a3453(0x236)](_0x2511c2){const _0x3fbd4c=_0x5a3453,_0x20b5ae=this[_0x3fbd4c(0x1ef)](_0x2511c2);this[_0x3fbd4c(0x232)][_0x3fbd4c(0x1e6)][_0x3fbd4c(0x236)](_0x20b5ae);}[_0x5a3453(0x1bf)](_0x10ac0d){const _0x111389=_0x5a3453;let _0x161e0b=0x0;clearInterval(this[_0x111389(0x19f)]),this[_0x111389(0x19f)]=setInterval(()=>{const _0x521426=_0x111389;this[_0x521426(0x232)][_0x521426(0x1ed)][_0x521426(0x224)]=this[_0x521426(0x232)][_0x521426(0x1ed)][_0x521426(0x224)]+_0x10ac0d[_0x161e0b],_0x161e0b++,_0x161e0b===_0x10ac0d[_0x521426(0x1ae)]&&clearInterval(this[_0x521426(0x19f)]);},0x1e);}[_0x5a3453(0x1b9)](_0x17f56a){const _0x4d2e06=_0x5a3453;this[_0x4d2e06(0x232)][_0x4d2e06(0x1ed)][_0x4d2e06(0x20c)]=_0x17f56a;}[_0x5a3453(0x1ef)](_0x2b805b){const _0x475bea=_0x5a3453;return _0x2b805b?_0x2b805b[_0x475bea(0x211)]&&_0x2b805b[_0x475bea(0x1c0)]?_0x5f2058(this[_0x475bea(0x1d3)][_0x475bea(0x1f5)],_0x475bea(0x1ad)):_0x2b805b[_0x475bea(0x211)]?_0x5f2058(this[_0x475bea(0x1d3)][_0x475bea(0x1f5)],_0x475bea(0x1fc)):_0x2b805b[_0x475bea(0x1c0)]?_0x5f2058(this[_0x475bea(0x1d3)][_0x475bea(0x1f5)],_0x475bea(0x1f7)):_0x5f2058(this[_0x475bea(0x1d3)][_0x475bea(0x1f5)],_0x475bea(0x1f4)):'';}[_0x5a3453(0x201)](_0x22d6d0){const _0x396c60=_0x5a3453;return _0x22d6d0?_0x22d6d0[_0x396c60(0x211)]&&_0x22d6d0[_0x396c60(0x1c0)]?_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x1ca)):_0x22d6d0[_0x396c60(0x211)]?_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x1e0)):_0x22d6d0[_0x396c60(0x1c0)]?_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x234)):_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x20f)):_0x5f2058(this[_0x396c60(0x1d3)][_0x396c60(0x1f5)],_0x396c60(0x20f));}[_0x5a3453(0x1bd)](_0x2a1cda,_0x329f69,_0x55abba,_0x40d47b){const _0x4ec010=_0x5a3453;this[_0x4ec010(0x232)][_0x4ec010(0x1bd)](_0x2a1cda,_0x329f69,_0x55abba,_0x40d47b);}[_0x5a3453(0x209)](_0x5e2e6b){const _0x672891=_0x5a3453;this[_0x672891(0x232)][_0x672891(0x209)](_0x5e2e6b);}[_0x5a3453(0x1e9)](){const _0x40d0b6=_0x5a3453;this[_0x40d0b6(0x232)][_0x40d0b6(0x1af)][_0x40d0b6(0x1e9)]();}[_0x5a3453(0x23a)](_0x1ec7b1,_0x26b563){const _0xc5aa09=_0x5a3453;this[_0xc5aa09(0x232)][_0xc5aa09(0x1e6)][_0xc5aa09(0x1cc)](_0x1ec7b1,_0x26b563);}[_0x5a3453(0x205)](){const _0x15cd10=_0x5a3453;this[_0x15cd10(0x232)][_0x15cd10(0x1e6)][_0x15cd10(0x205)]();}[_0x5a3453(0x1fd)](){const _0x1ca38e=_0x5a3453;this[_0x1ca38e(0x232)][_0x1ca38e(0x1af)][_0x1ca38e(0x1e5)]=!0x0;}[_0x5a3453(0x1b6)](){const _0x2e5daf=_0x5a3453;this[_0x2e5daf(0x232)][_0x2e5daf(0x1af)][_0x2e5daf(0x1e5)]=!0x1;}}
|
|
23
|
+
function _0x513c(_0x4efbf5,_0x3fe656){const _0x3ed52e=_0x3ed5();return _0x513c=function(_0x513c15,_0x200d52){_0x513c15=_0x513c15-0xc1;let _0x166eb8=_0x3ed52e[_0x513c15];return _0x166eb8;},_0x513c(_0x4efbf5,_0x3fe656);}const _0x3d9341=_0x513c;(function(_0x5092d2,_0x14e7c3){const _0x15f646=_0x513c,_0x56b439=_0x5092d2();while(!![]){try{const _0x3af32d=parseInt(_0x15f646(0x15c))/0x1*(parseInt(_0x15f646(0xf1))/0x2)+-parseInt(_0x15f646(0x160))/0x3*(parseInt(_0x15f646(0xd2))/0x4)+parseInt(_0x15f646(0x150))/0x5+-parseInt(_0x15f646(0x148))/0x6*(-parseInt(_0x15f646(0xeb))/0x7)+-parseInt(_0x15f646(0xd8))/0x8+parseInt(_0x15f646(0x13b))/0x9*(parseInt(_0x15f646(0xe5))/0xa)+parseInt(_0x15f646(0xf7))/0xb*(-parseInt(_0x15f646(0xd7))/0xc);if(_0x3af32d===_0x14e7c3)break;else _0x56b439['push'](_0x56b439['shift']());}catch(_0x3ce704){_0x56b439['push'](_0x56b439['shift']());}}}(_0x3ed5,0xb2eb5));import{ContextPlugin as _0x1386cf}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x1350b8}from'ckeditor5/src/utils.js';import{AIChatView as _0x1230d1}from'./ui/aichatview.js';import{AITabs as _0x2189b3}from'../aitabs/aitabs.js';import{getTranslation as _0x5588c3}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x23971f}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0xf53707}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x516cef}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0xdd6ff0}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';function _0x3ed5(){const _0x49b9e4=['context','stopInteraction','2pTSDFu','isDisabled','chat','ai-suggestion-reply','updateCapabilities','locale','308NbHCYE','clearConversationContextUI','enqueue','bind','addContextItem','clear','options','getItemIds','setModelList','config','addFeedInteractionHeader','addFeedItemAISuggestion','renderingStrategy','markItemAsDone','ai-reply','children','startAutoScroll','addFeedItemAIReply','setReasoning','queueEmptyPromise','disableModelSelector','AITabs','filter','length','resetConversationTitle','_promiseQueue','markFeedItemAsDone','scrollFeedToSuggestion','closeSourceResourceBalloon','showDiff','_getLoadingMessage','insertSuggestion','ai.chat.models.modelSelectorAlwaysVisible','enableControls','AI_CHAT_HEADING','set','ai.availableReplyActions','<p>','finishInteraction','populateSourceResourceBalloon','isPremiumPlugin','removeFeedInteraction','AI_CHAT_WELCOME_MESSAGE','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','setLoadingMessage','availableModels','contextItems','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','has','get','delegate','setModel','_interactionPromiseResolver','displayedPrompt','removeContextItem','isReasoningEnabled','setIsUploadInProgress','updateFeedItemAIReplySources','value','isPending','isLoading','addFeedItemStaticMessage','isTrackChangesOn','ai.chat.context.searchInputVisibleFrom','enableModelSelector','user-message','scrollToSuggestion','find','583299otksAx','addFeedItemError','chatControls','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','stopAutoScroll','values','label','updateFeedInteractionHeader','addTab','updateFeedItemAIReplySuggestionPartState','addItem','toggleLoadingSkeleton','setConversationContext','553458YFAnSe','view','remove','_getInputPlaceholder','addFeedItemUserMessage','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','clearPendingContextUI','createConversation','4960120oamEfD','_animateConversationTitle','interactionId','destroy','isVisible','toggleSuggestionDisplayMode','updateReplyItem','chatFeed','quickActionData','requires','from','interaction-header','1404834xslFBo','setSelectedModel','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','focusPromptInput','3dmSTAX','isMaximized','setIsMaximized','resetMessageInput','then','updateSuggestionPartState','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','disableControls','AIChatUI','updateFeedItemAIReplyContent','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','isWebSearchEnabled','streaming','isDone','forEach','userMessage','trackChanges','error-message','TrackChanges','setInputPlaceholder','updateResourceState','conversation-start','isOfficialPlugin','commands','last','isModelAvailable','isBusy','2886068pfFSDr','_isTrackChangesCommandValueBound','areActionsDisabled','removeItem','_view','931080eIOTxl','5017472OSkHNt','startInteraction','capabilities','setWebSearch','abort','</p>','updateSuggestionItem','_titleAnimationInterval','plugins','pluginName','setContextItemLoading','chatHeader','setConversationTitle','130axxQLv','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','updateFeedItemAIReplySuggestionContent','feedItemRenderingStrategy','setFeedItemRenderingStrategy','showResizeButton','77Hrbngf','updateWebSources','startsWith','setAddContextOptions'];_0x3ed5=function(){return _0x49b9e4;};return _0x3ed5();}import{getEditorFromContext as _0x2e972d}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x1f1a08}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x1386cf{static get[_0x3d9341(0x159)](){return[_0x2189b3];}[_0x3d9341(0xd6)];static get[_0x3d9341(0xe1)](){const _0x1f7fed=_0x3d9341;return _0x1f7fed(0x168);}static get[_0x3d9341(0xcd)](){return!0x0;}static get[_0x3d9341(0x11f)](){return!0x0;}[_0x3d9341(0xe8)]=_0x3d9341(0xc3);[_0x3d9341(0x114)]=!0x0;[_0x3d9341(0x110)];[_0x3d9341(0x12b)];[_0x3d9341(0xdf)]=void 0x0;[_0x3d9341(0xd3)]=!0x1;constructor(_0x13f199){const _0x382d30=_0x3d9341;super(_0x13f199);const _0x19cbba=this[_0x382d30(0xef)][_0x382d30(0xe0)][_0x382d30(0x128)](_0x382d30(0x10c));this[_0x382d30(0x11a)](_0x382d30(0xd1),!0x1),this[_0x382d30(0x110)]=new _0x516cef(),this[_0x382d30(0xd6)]=new _0x1230d1(this[_0x382d30(0xef)][_0x382d30(0xf6)],{'showResizeButton':_0x19cbba[_0x382d30(0xea)],'contextResourcesSearchInputVisibleFrom':this[_0x382d30(0xef)][_0x382d30(0x100)][_0x382d30(0x128)](_0x382d30(0x136))}),this[_0x382d30(0xd6)][_0x382d30(0x129)](..._0xdd6ff0)['to'](this),this[_0x382d30(0xd6)]['on'](_0x382d30(0x155),(_0x2257d4,{showDiff:_0x5a9539})=>{const _0x58c99=_0x382d30;this[_0x58c99(0x114)]=_0x5a9539;}),_0x19cbba[_0x382d30(0x149)][_0x382d30(0x143)]({'id':_0x382d30(0xf3),'buttonLabel':_0x5588c3(this[_0x382d30(0xef)][_0x382d30(0xf6)],_0x382d30(0x119)),'buttonIcon':_0x23971f,'order':0x0,'content':this[_0x382d30(0xd6)]}),this[_0x382d30(0xd6)][_0x382d30(0x13d)][_0x382d30(0xfa)](_0x382d30(0x133))['to'](this,_0x382d30(0xd1),_0x3dde4a=>_0x3dde4a),this[_0x382d30(0xd6)][_0x382d30(0x157)][_0x382d30(0xfa)](_0x382d30(0x132))['to'](this,_0x382d30(0xd1),_0x537503=>_0x537503),this[_0x382d30(0xd6)][_0x382d30(0x13d)][_0x382d30(0xca)](this[_0x382d30(0x14b)]()),this[_0x382d30(0xfa)](_0x382d30(0xd0))['to'](this[_0x382d30(0xd6)][_0x382d30(0x13d)],_0x382d30(0xd0));}[_0x3d9341(0x153)](){const _0x5284a6=_0x3d9341;super[_0x5284a6(0x153)](),this[_0x5284a6(0xdf)]&&clearInterval(this[_0x5284a6(0xdf)]);}[_0x3d9341(0x14f)](_0x8d5329){const _0x4d79a1=_0x3d9341;this[_0x4d79a1(0xd6)][_0x4d79a1(0x157)][_0x4d79a1(0xfc)](),this[_0x4d79a1(0xd6)][_0x4d79a1(0x13d)][_0x4d79a1(0x137)](),this[_0x4d79a1(0xd6)][_0x4d79a1(0x13d)][_0x4d79a1(0xff)](_0x8d5329[_0x4d79a1(0x124)],!this[_0x4d79a1(0xef)][_0x4d79a1(0x100)][_0x4d79a1(0x128)](_0x4d79a1(0x117))),this[_0x4d79a1(0x134)]({'id':_0x4d79a1(0xcc),'staticMessage':_0x5588c3(this[_0x4d79a1(0xef)][_0x4d79a1(0xf6)],_0x4d79a1(0x121))});}[_0x3d9341(0x134)]({id:_0x2878c6,staticMessage:_0x31912c}){const _0x5be397=_0x3d9341;this[_0x5be397(0xd6)][_0x5be397(0x157)][_0x5be397(0x145)](_0x5be397(0x105),{'id':_0x2878c6,'initialContent':_0x5be397(0x11c)+_0x31912c+_0x5be397(0xdd)});}[_0x3d9341(0x14c)](_0x2da72a){const _0x49dfdf=_0x3d9341,_0x33888a=_0x2da72a[_0x49dfdf(0x158)]?.[_0x49dfdf(0x12c)]||_0x2da72a[_0x49dfdf(0xc6)];this[_0x49dfdf(0xd6)][_0x49dfdf(0x157)][_0x49dfdf(0x145)](_0x49dfdf(0x138),{'contextItems':Array[_0x49dfdf(0x15a)](_0x2da72a[_0x49dfdf(0x125)][_0x49dfdf(0x140)]()),'initialContent':_0x49dfdf(0x11c)+_0x33888a+_0x49dfdf(0xdd),'id':_0x2da72a['id']});}[_0x3d9341(0x13c)]({errorMessage:_0x434520,id:_0x526f19}){const _0x26f0e9=_0x3d9341;this[_0x26f0e9(0xd6)][_0x26f0e9(0x157)][_0x26f0e9(0x145)](_0x26f0e9(0xc8),{'initialContent':_0x26f0e9(0x11c)+_0x434520+_0x26f0e9(0xdd),'id':_0x526f19});}[_0x3d9341(0x108)](_0x4a0449){const _0x5753ac=_0x3d9341;return this[_0x5753ac(0x110)][_0x5753ac(0xf9)](async()=>{const _0x9e345c=_0x5753ac;this[_0x9e345c(0xd6)][_0x9e345c(0x157)][_0x9e345c(0x145)](_0x9e345c(0x105),{'id':_0x4a0449[_0x9e345c(0x152)]+':'+_0x4a0449['id']}),this[_0x9e345c(0x123)](null);});}async[_0x3d9341(0x102)](_0x223ab3){const _0x8d5f5f=_0x3d9341,_0x56b5ad=_0x2e972d(this[_0x8d5f5f(0xef)]);let _0x28190f=_0x56b5ad[_0x8d5f5f(0x100)][_0x8d5f5f(0x128)](_0x8d5f5f(0x11b))||[..._0x1f1a08];if(_0x56b5ad[_0x8d5f5f(0xe0)][_0x8d5f5f(0x127)](_0x8d5f5f(0xc9))){if(!this[_0x8d5f5f(0xd3)]){this[_0x8d5f5f(0xd3)]=!0x0;const _0x397451=_0x56b5ad[_0x8d5f5f(0xce)][_0x8d5f5f(0x128)](_0x8d5f5f(0xc7));this[_0x8d5f5f(0xd6)][_0x8d5f5f(0x157)][_0x8d5f5f(0xfa)](_0x8d5f5f(0x135))['to'](_0x397451,_0x8d5f5f(0x131));}}else _0x28190f=_0x28190f[_0x8d5f5f(0x10d)](_0x3ce5e1=>_0x8d5f5f(0x116)!=_0x3ce5e1);return this[_0x8d5f5f(0x110)][_0x8d5f5f(0xf9)](async()=>{const _0x3419e1=_0x8d5f5f;this[_0x3419e1(0xd6)][_0x3419e1(0x157)][_0x3419e1(0x145)](_0x3419e1(0xf4),{'id':_0x223ab3[_0x3419e1(0x152)]+':'+_0x223ab3['id'],'areActionsDisabled':_0x223ab3[_0x3419e1(0xd4)],'showDiff':this[_0x3419e1(0x114)],'availableActions':_0x28190f}),this[_0x3419e1(0x123)](null);});}[_0x3d9341(0x101)](_0x26265e,_0x19361a){const _0x48fc9e=_0x3d9341,_0x4a43b3=this[_0x48fc9e(0xd6)][_0x48fc9e(0x157)][_0x48fc9e(0x106)][_0x48fc9e(0xcf)];if(_0x4a43b3 instanceof _0xf53707)return this[_0x48fc9e(0xd6)][_0x48fc9e(0x157)][_0x48fc9e(0x106)][_0x48fc9e(0x14a)](_0x4a43b3),void this[_0x48fc9e(0xd6)][_0x48fc9e(0x157)][_0x48fc9e(0x145)](_0x48fc9e(0x15b),{'id':_0x26265e['id'],'capabilities':{'isWebSearchEnabled':_0x4a43b3[_0x48fc9e(0xda)][_0x48fc9e(0xc2)]||_0x19361a[_0x48fc9e(0xc2)],'isReasoningEnabled':_0x4a43b3[_0x48fc9e(0xda)][_0x48fc9e(0x12e)]||_0x19361a[_0x48fc9e(0x12e)]}});this[_0x48fc9e(0xd6)][_0x48fc9e(0x157)][_0x48fc9e(0x145)](_0x48fc9e(0x15b),{'id':_0x26265e['id'],'capabilities':_0x19361a});}[_0x3d9341(0x142)](_0x27b773){const _0x33b43b=_0x3d9341,_0x5c41bb=this[_0x33b43b(0xd6)][_0x33b43b(0x157)][_0x33b43b(0x106)][_0x33b43b(0x13a)](_0x24c67c=>_0x24c67c[_0x33b43b(0xfd)]['id']==_0x27b773['id']&&_0x24c67c instanceof _0xf53707);_0x5c41bb&&_0x5c41bb[_0x33b43b(0x11a)](_0x33b43b(0x154),_0x27b773[_0x33b43b(0x154)]);}async[_0x3d9341(0x169)](_0x1382f9){const _0x56be8e=_0x3d9341,_0x10059b=_0x1382f9[_0x56be8e(0x103)]||this[_0x56be8e(0xe8)];return this[_0x56be8e(0x110)][_0x56be8e(0xf9)](async _0x3bf467=>{const _0x5ba14b=_0x56be8e;await this[_0x5ba14b(0xd6)][_0x5ba14b(0x157)][_0x5ba14b(0x156)]({..._0x1382f9,'abortSignal':_0x3bf467,'renderingStrategy':_0x10059b}),_0x1382f9[_0x5ba14b(0xc4)]&&this[_0x5ba14b(0x111)](_0x1382f9['id']);});}[_0x3d9341(0x130)](_0x514870,_0x56437c){const _0x3bd4d6=_0x3d9341;this[_0x3bd4d6(0xd6)][_0x3bd4d6(0x157)][_0x3bd4d6(0xec)](_0x514870,_0x56437c);}async[_0x3d9341(0xe7)](_0x5d6455){const _0x433a18=_0x3d9341,_0x12b9ec=_0x5d6455[_0x433a18(0x103)]||this[_0x433a18(0xe8)];return this[_0x433a18(0x110)][_0x433a18(0xf9)](async _0x5b2ad0=>{const _0x1fdd14=_0x433a18;await this[_0x1fdd14(0xd6)][_0x1fdd14(0x157)][_0x1fdd14(0xde)]({..._0x5d6455,'abortSignal':_0x5b2ad0,'renderingStrategy':_0x12b9ec}),_0x5d6455[_0x1fdd14(0xc4)]&&this[_0x1fdd14(0x111)](_0x5d6455['id']);});}[_0x3d9341(0x144)](_0x88c2fc){const _0x2c856a=_0x3d9341;this[_0x2c856a(0xd6)][_0x2c856a(0x157)][_0x2c856a(0x165)](_0x88c2fc);}[_0x3d9341(0x111)](_0x236f67){const _0x2b9efc=_0x3d9341;this[_0x2b9efc(0xd6)][_0x2b9efc(0x157)][_0x2b9efc(0x104)](_0x236f67);}[_0x3d9341(0x120)](_0x2e5833){const _0x4c9a75=_0x3d9341;this[_0x4c9a75(0xd6)][_0x4c9a75(0x157)][_0x4c9a75(0xfe)]()[_0x4c9a75(0x10d)](_0x563adc=>_0x563adc[_0x4c9a75(0xed)](_0x2e5833))[_0x4c9a75(0xc5)](_0x36b732=>this[_0x4c9a75(0xd6)][_0x4c9a75(0x157)][_0x4c9a75(0xd5)](_0x36b732));}[_0x3d9341(0xd9)](){const _0x172874=_0x3d9341;this[_0x172874(0x123)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x172874(0xd6)][_0x172874(0x13d)][_0x172874(0x10b)](!this[_0x172874(0xef)][_0x172874(0x100)][_0x172874(0x128)](_0x172874(0x117))),this[_0x172874(0xd1)]=!0x0,this[_0x172874(0xd6)][_0x172874(0x157)][_0x172874(0x107)]();}[_0x3d9341(0xf0)](_0x505406){const _0x50188f=_0x3d9341;this[_0x50188f(0x110)][_0x50188f(0xdc)](),this[_0x50188f(0xd6)][_0x50188f(0x157)][_0x50188f(0xfe)]()[_0x50188f(0x10d)](_0x24d3e7=>_0x24d3e7[_0x50188f(0xed)](_0x505406['id']))[_0x50188f(0xc5)](_0x25f07c=>this[_0x50188f(0x111)](_0x25f07c)),this[_0x50188f(0xd1)]=!0x1,this[_0x50188f(0xd6)][_0x50188f(0x157)][_0x50188f(0x13f)]();}async[_0x3d9341(0x11d)](){const _0x97fbf5=_0x3d9341;return this[_0x97fbf5(0x110)][_0x97fbf5(0x10a)][_0x97fbf5(0x164)](()=>{const _0x203fef=_0x97fbf5;this[_0x203fef(0xd1)]=!0x1,this[_0x203fef(0xd6)][_0x203fef(0x157)][_0x203fef(0x13f)]();});}[_0x3d9341(0xfb)](_0x152232,_0x5ecaa0){const _0x56fbc9=_0x3d9341;this[_0x56fbc9(0xd6)][_0x56fbc9(0x13d)][_0x56fbc9(0xfb)](_0x152232,_0x5ecaa0);}[_0x3d9341(0x12d)](_0x98a62b){const _0x4d76eb=_0x3d9341;this[_0x4d76eb(0xd6)][_0x4d76eb(0x13d)][_0x4d76eb(0x12d)](_0x98a62b);}[_0x3d9341(0xe2)](_0x3d503f,_0x31d3f7){const _0x16cd06=_0x3d9341;this[_0x16cd06(0xd6)][_0x16cd06(0x13d)][_0x16cd06(0xe2)](_0x3d503f,_0x31d3f7);}[_0x3d9341(0x12f)](_0x9faa1a){const _0x136ca3=_0x3d9341;this[_0x136ca3(0xd6)][_0x136ca3(0x13d)][_0x136ca3(0x12f)](_0x9faa1a);}[_0x3d9341(0x147)](_0x43abb3){const _0x5635ec=_0x3d9341;this[_0x5635ec(0xd6)][_0x5635ec(0x13d)][_0x5635ec(0x147)](_0x43abb3);}[_0x3d9341(0x14e)](){const _0x4af327=_0x3d9341;this[_0x4af327(0xd6)][_0x4af327(0x13d)][_0x4af327(0x14e)]();}[_0x3d9341(0xf8)](){const _0x15c93d=_0x3d9341;this[_0x15c93d(0xd6)][_0x15c93d(0x13d)][_0x15c93d(0xf8)]();}[_0x3d9341(0xcb)](_0x1f67f9,_0x2cfdb6,_0x349654){const _0x2f2400=_0x3d9341;this[_0x2f2400(0xd6)][_0x2f2400(0x13d)][_0x2f2400(0xcb)](_0x1f67f9,_0x2cfdb6,_0x349654);}[_0x3d9341(0x163)](){const _0x1a666f=_0x3d9341;this[_0x1a666f(0xd6)][_0x1a666f(0x13d)][_0x1a666f(0x163)](),this[_0x1a666f(0xd6)][_0x1a666f(0x13d)][_0x1a666f(0xca)](this[_0x1a666f(0x14b)]());}[_0x3d9341(0xee)](_0x5784cf){const _0x268fef=_0x3d9341;this[_0x268fef(0xd6)][_0x268fef(0x13d)][_0x268fef(0xee)](_0x5784cf);}[_0x3d9341(0xf5)](_0x448ddc){const _0x571a01=_0x3d9341;this[_0x571a01(0xd6)][_0x571a01(0x13d)][_0x571a01(0xdb)](_0x448ddc[_0x571a01(0xc2)]),this[_0x571a01(0xd6)][_0x571a01(0x13d)][_0x571a01(0x109)](_0x448ddc[_0x571a01(0x12e)]),this[_0x571a01(0xd6)][_0x571a01(0x13d)][_0x571a01(0xca)](this[_0x571a01(0x14b)](_0x448ddc));}[_0x3d9341(0x15d)](_0x45f56e,_0x1c87dd){const _0x5efc6c=_0x3d9341;this[_0x5efc6c(0xd6)][_0x5efc6c(0x13d)][_0x5efc6c(0x12a)](_0x45f56e),_0x1c87dd&&this[_0x5efc6c(0xd6)][_0x5efc6c(0x13d)][_0x5efc6c(0x10b)](!0x1);}[_0x3d9341(0xe9)](_0x24d345){const _0x38f28e=_0x3d9341;this[_0x38f28e(0xe8)]=_0x24d345;}[_0x3d9341(0x146)](_0x4a21a7){const _0x152aae=_0x3d9341;this[_0x152aae(0xd6)][_0x152aae(0x157)][_0x152aae(0x146)](_0x4a21a7);}[_0x3d9341(0x10f)](){const _0x2e800c=_0x3d9341;this[_0x2e800c(0xe4)](_0x5588c3(this[_0x2e800c(0xef)][_0x2e800c(0xf6)],_0x2e800c(0x119)));}[_0x3d9341(0xe4)](_0x4b1d32,_0x24d5d4=!0x1){const _0x47cac8=_0x3d9341;if(_0x24d5d4&&!_0x1350b8()&&_0x4b1d32[_0x47cac8(0x10e)])return this[_0x47cac8(0xd6)][_0x47cac8(0xe3)][_0x47cac8(0x141)]='',void this[_0x47cac8(0x151)](_0x4b1d32);this[_0x47cac8(0xd6)][_0x47cac8(0xe3)][_0x47cac8(0x141)]=_0x4b1d32;}[_0x3d9341(0x123)](_0x158f60){const _0x483519=_0x3d9341,_0x640fa6=this[_0x483519(0x115)](_0x158f60);this[_0x483519(0xd6)][_0x483519(0x157)][_0x483519(0x123)](_0x640fa6);}[_0x3d9341(0x151)](_0x20f748){const _0x56c6dd=_0x3d9341;let _0x491e6e=0x0;clearInterval(this[_0x56c6dd(0xdf)]),this[_0x56c6dd(0xdf)]=setInterval(()=>{const _0x53b8e2=_0x56c6dd;this[_0x53b8e2(0xd6)][_0x53b8e2(0xe3)][_0x53b8e2(0x141)]=this[_0x53b8e2(0xd6)][_0x53b8e2(0xe3)][_0x53b8e2(0x141)]+_0x20f748[_0x491e6e],_0x491e6e++,_0x491e6e===_0x20f748[_0x53b8e2(0x10e)]&&clearInterval(this[_0x53b8e2(0xdf)]);},0x1e);}[_0x3d9341(0x162)](_0x339fbb){const _0x37611e=_0x3d9341;this[_0x37611e(0xd6)][_0x37611e(0xe3)][_0x37611e(0x161)]=_0x339fbb;}[_0x3d9341(0x115)](_0xec1368){const _0x5ff949=_0x3d9341;return _0xec1368?_0xec1368[_0x5ff949(0xc2)]&&_0xec1368[_0x5ff949(0x12e)]?_0x5588c3(this[_0x5ff949(0xef)][_0x5ff949(0xf6)],_0x5ff949(0x122)):_0xec1368[_0x5ff949(0xc2)]?_0x5588c3(this[_0x5ff949(0xef)][_0x5ff949(0xf6)],_0x5ff949(0x14d)):_0xec1368[_0x5ff949(0x12e)]?_0x5588c3(this[_0x5ff949(0xef)][_0x5ff949(0xf6)],_0x5ff949(0xc1)):_0x5588c3(this[_0x5ff949(0xef)][_0x5ff949(0xf6)],_0x5ff949(0x126)):'';}[_0x3d9341(0x14b)](_0x523107){const _0x4039fd=_0x3d9341;return _0x523107?_0x523107[_0x4039fd(0xc2)]&&_0x523107[_0x4039fd(0x12e)]?_0x5588c3(this[_0x4039fd(0xef)][_0x4039fd(0xf6)],_0x4039fd(0xe6)):_0x523107[_0x4039fd(0xc2)]?_0x5588c3(this[_0x4039fd(0xef)][_0x4039fd(0xf6)],_0x4039fd(0x15e)):_0x523107[_0x4039fd(0x12e)]?_0x5588c3(this[_0x4039fd(0xef)][_0x4039fd(0xf6)],_0x4039fd(0x166)):_0x5588c3(this[_0x4039fd(0xef)][_0x4039fd(0xf6)],_0x4039fd(0x13e)):_0x5588c3(this[_0x4039fd(0xef)][_0x4039fd(0xf6)],_0x4039fd(0x13e));}[_0x3d9341(0x11e)](_0x456439,_0x363bc1,_0x4415ed,_0x49ffb7){const _0x29fc8f=_0x3d9341;this[_0x29fc8f(0xd6)][_0x29fc8f(0x11e)](_0x456439,_0x363bc1,_0x4415ed,_0x49ffb7);}[_0x3d9341(0x113)](_0x3c50a3){const _0x246eb5=_0x3d9341;this[_0x246eb5(0xd6)][_0x246eb5(0x113)](_0x3c50a3);}[_0x3d9341(0x15f)](){const _0x15a115=_0x3d9341;this[_0x15a115(0xd6)][_0x15a115(0x13d)][_0x15a115(0x15f)]();}[_0x3d9341(0x112)](_0x1960ff,_0x5eac6a){const _0xe75d18=_0x3d9341;this[_0xe75d18(0xd6)][_0xe75d18(0x157)][_0xe75d18(0x139)](_0x1960ff,_0x5eac6a);}[_0x3d9341(0x107)](){const _0x2e7fc1=_0x3d9341;this[_0x2e7fc1(0xd6)][_0x2e7fc1(0x157)][_0x2e7fc1(0x107)]();}[_0x3d9341(0x167)](){const _0x472d8d=_0x3d9341;this[_0x472d8d(0xd6)][_0x472d8d(0x13d)][_0x472d8d(0xf2)]=!0x0;}[_0x3d9341(0x118)](){const _0x1e7efa=_0x3d9341;this[_0x1e7efa(0xd6)][_0x1e7efa(0x13d)][_0x1e7efa(0xf2)]=!0x1;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x49eb93=_0x4b60;(function(_0x18226f,_0x567295){const _0x116593=_0x4b60,_0x3e10c6=_0x18226f();while(!![]){try{const _0x5e675b=-parseInt(_0x116593(0x178))/0x1*(parseInt(_0x116593(0x11e))/0x2)+parseInt(_0x116593(0x182))/0x3*(parseInt(_0x116593(0x10e))/0x4)+-parseInt(_0x116593(0x103))/0x5+parseInt(_0x116593(0x123))/0x6+-parseInt(_0x116593(0x167))/0x7*(-parseInt(_0x116593(0x144))/0x8)+parseInt(_0x116593(0x105))/0x9+-parseInt(_0x116593(0x183))/0xa;if(_0x5e675b===_0x567295)break;else _0x3e10c6['push'](_0x3e10c6['shift']());}catch(_0x47c68c){_0x3e10c6['push'](_0x3e10c6['shift']());}}}(_0x4b89,0xbb8bd));import{CKEditorError as _0x7e5f12,ObservableMixin as _0x1ed34b,uid as _0x5d8ef0}from'ckeditor5/src/utils.js';function _0x4b89(){const _0x4e7ba8=['label','files-','11459rBqZXb','FILE','ai-chat-context-invalid-data','_createContextItemFromContent','getId','get','MARKDOWN','ai-chat-context-unsupported-type','_addContextItem','_finishUploadOperation','files','ai-chat-source-not-found','start','removeSelectionFromContext','addToConversationContext','fetchDocument','urls','47kNipFc','removeFromContext','TEXT','_addContextOptionsState','isCurrentDocumentInConversation','resources','isSelectionInContext','isHidden','updateCurrentDocument','addContextOptionsChanged','12126QwAOrq','4827170FbANin','startsWith','ai-request-aborted','version','HTML','_config','text/markdown','filter','contextItemAdded','abortController','contextSent','_connector','end','contextItemLoadingEnded','1173210mzAzfO','isCurrentDocumentInContext','3222108zLSdxv','object','url-','URL','content','addFilesToContext','stack','ai-chat-document-upload-failed','data','740UkDEvM','has','resourceId','enabled','populateFromMessage','_toggleAddCurrentDocumentOptionVisibility','_ownerId','_conversationContextItems','getSentContextItems','attributes','forEach','_convertTextResourceToFile','type','File','_ongoingUploadOperations','sources','47310gbPtku','ai-chat-source-resources-load-failed','string','text/plain','message','7053660sPYpxR','abort','all','length','file-','text/html','addUrlToContext','_addToConversationContextItem','sourceResourcesLoaded','contextItemRemoved','isReadOnly','size','addResourceToContext','getResources','getPendingContextItems','from','mapContextItemsToRequestData','init','document','hidden','_removeContextItem','ai-chat-resource-load-failed','getData','_ongoingUploads','getDocument','_isResourceInContext','current-document','url','resourceStateChanged','DOCUMENT','uploadFile','ai-chat-resource-no-data','_pendingContextItems','1544iqtbVS','uploadDocument','map','ai-chat-file-upload-failed','delete','push','set','Current\x20document','_findSourceIdsByResourceId','uploadUrl','error','addCurrentDocumentToContext','clearPendingContextItems','values','sessionId','addSelectionToContext','uploadProgressChanged','isInContext','ai-chat-url-upload-failed','object\x20with\x20content\x20and\x20type\x20properties','_getCustomSourcesInitialState','fire','name','_finishContextItemLoading','_setAddContextOptionsDefaultState','SELECTION','_updateResourceInContextState','_startUploadOperation','uiId','find','selection','loadSourceResources','_mapContextItemToRequestData'];_0x4b89=function(){return _0x4e7ba8;};return _0x4b89();}import{AIContextItemType as _0x51c85d,AIContextTextResourceType as _0x541474}from'../../aicore/model/aicontext.js';import{escape as _0xc0b8dd}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x49eb93(0xfd),_0x49eb93(0x12c),_0x49eb93(0x102),_0x49eb93(0xff),_0x49eb93(0x14e),_0x49eb93(0x181),_0x49eb93(0x12b),_0x49eb93(0x13f),_0x49eb93(0x154)];function _0x4b60(_0xec07ef,_0xa7f84e){const _0x4b8966=_0x4b89();return _0x4b60=function(_0x4b6065,_0x4e859d){_0x4b6065=_0x4b6065-0xfb;let _0x1d63ec=_0x4b8966[_0x4b6065];return _0x1d63ec;},_0x4b60(_0xec07ef,_0xa7f84e);}export class AIChatContext extends _0x1ed34b(){[_0x49eb93(0x100)];[_0x49eb93(0x188)];[_0x49eb93(0x114)];constructor({connector:_0x32e611,config:_0x474cbe,ownerId:_0x5186dd}){const _0x2cf429=_0x49eb93;super(),this[_0x2cf429(0x100)]=_0x32e611,this[_0x2cf429(0x188)]=_0x474cbe,this[_0x2cf429(0x114)]=_0x5186dd;}[_0x49eb93(0x134)](){const _0x380cf7=_0x49eb93;this[_0x380cf7(0x143)]=new Map(),this[_0x380cf7(0x115)]=new Map(),this[_0x380cf7(0x13a)]=new Map(),this[_0x380cf7(0x11c)]=new Map(),this[_0x380cf7(0x15c)]();}[_0x49eb93(0x131)](){const _0x41a40f=_0x49eb93;return this[_0x41a40f(0x143)];}async[_0x49eb93(0x112)](_0x4cc3d6){const _0x40eac0=_0x49eb93,_0x328814=await this[_0x40eac0(0x16a)](_0x4cc3d6);return this[_0x40eac0(0x12a)](_0x328814),_0x40eac0(0x13d)===_0x328814[_0x40eac0(0x160)]&&this[_0x40eac0(0x113)](),_0x328814;}async[_0x49eb93(0x16a)](_0x148090){const _0x4ea1e2=_0x49eb93;if(_0x148090[_0x4ea1e2(0x11a)]===_0x51c85d[_0x4ea1e2(0x140)]){const _0x3f8167=await this[_0x4ea1e2(0x100)][_0x4ea1e2(0x176)](this[_0x4ea1e2(0x114)],_0x148090['id'])[_0x4ea1e2(0x13b)]();return{'id':_0x4ea1e2(0x13d),'uiId':_0x4ea1e2(0x13d),'label':_0x4ea1e2(0x14b),'type':_0x148090[_0x4ea1e2(0x11a)],'content':_0x3f8167[_0x4ea1e2(0x109)],'hidden':this[_0x4ea1e2(0x115)][_0x4ea1e2(0x10f)](_0x4ea1e2(0x13d)),'version':_0x3f8167[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x186)],'sessionId':_0x3f8167[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x152)]};}return{'id':_0x148090['id'],'uiId':_0x148090['id'],'label':_0x148090[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x165)]||_0x148090[_0x4ea1e2(0x15a)]||_0x148090[_0x4ea1e2(0x13e)]||_0x148090['id'],'type':_0x148090[_0x4ea1e2(0x11a)],..._0x148090?.[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x110)]?{'resourceId':_0x148090[_0x4ea1e2(0x117)]?.[_0x4ea1e2(0x110)]}:{}};}[_0x49eb93(0x116)](){const _0x2f5ec6=_0x49eb93;return new Map(this[_0x2f5ec6(0x115)]);}[_0x49eb93(0x179)](_0xa8b84a){const _0x2c1bb9=_0x49eb93,_0x2d952c=this[_0x2c1bb9(0x143)][_0x2c1bb9(0x16c)](_0xa8b84a);_0x2d952c?.[_0x2c1bb9(0x12d)]||this[_0x2c1bb9(0x137)](_0xa8b84a);}[_0x49eb93(0x150)](){const _0x40b620=_0x49eb93;if(0x0===this[_0x40b620(0x143)][_0x40b620(0x12e)])return;for(const _0x23356c of this[_0x40b620(0x143)][_0x40b620(0x151)]())this[_0x40b620(0x137)](_0x23356c[_0x40b620(0x160)]);const _0xd31ef7=this[_0x40b620(0x115)][_0x40b620(0x16c)](_0x40b620(0x13d))||this[_0x40b620(0x143)][_0x40b620(0x16c)](_0x40b620(0x13d));_0xd31ef7&&this[_0x40b620(0x16f)]({..._0xd31ef7,'isReadOnly':!0x0,'hidden':!0x0});}[_0x49eb93(0x175)](_0xb175ec){const _0x209b89=_0x49eb93;for(const _0x57ecab of _0xb175ec[_0x209b89(0x151)]())this[_0x209b89(0x12a)](_0x57ecab);this[_0x209b89(0x150)](),this[_0x209b89(0x159)](_0x209b89(0xff),{'contextItems':Array[_0x209b89(0x132)](this[_0x209b89(0x116)]()[_0x209b89(0x151)]())});}[_0x49eb93(0x104)](){const _0x508243=_0x49eb93;return this[_0x508243(0x143)][_0x508243(0x10f)](_0x508243(0x13d));}[_0x49eb93(0x17e)](){const _0x396bf4=_0x49eb93;return this[_0x396bf4(0x143)][_0x396bf4(0x10f)](_0x396bf4(0x162));}[_0x49eb93(0x17c)](){const _0x4dc478=_0x49eb93;return this[_0x4dc478(0x115)][_0x4dc478(0x10f)](_0x4dc478(0x13d));}static[_0x49eb93(0x133)](_0x36e8dc){const _0x4f8022=_0x49eb93;return Array[_0x4f8022(0x132)](_0x36e8dc[_0x4f8022(0x151)]())[_0x4f8022(0x146)](_0x5f5be6=>this[_0x4f8022(0x164)](_0x5f5be6))[_0x4f8022(0xfc)](_0x49078b=>null!==_0x49078b);}async[_0x49eb93(0x10a)](_0x7f84b3,_0x5809f9,_0x45f85d=_0x51c85d[_0x49eb93(0x168)]){const _0x2f4f6f=_0x49eb93,_0x158799=_0x2f4f6f(0x166)+_0x5d8ef0();this[_0x2f4f6f(0x15f)](_0x158799);try{await Promise[_0x2f4f6f(0x125)](_0x7f84b3[_0x2f4f6f(0x146)](async _0x3ec497=>{const _0xa0b346=_0x2f4f6f,_0x5a0578=_0xa0b346(0x127)+_0x5d8ef0(),_0x38ee4a=_0xc0b8dd(_0x3ec497[_0xa0b346(0x15a)]);try{this[_0xa0b346(0x16f)]({'type':_0x45f85d,'label':_0x5809f9?.[_0xa0b346(0x165)]||_0x38ee4a,'uiId':_0x5a0578,'resourceId':_0x5809f9?.[_0xa0b346(0x110)]},!0x0);const _0x58a39e=this[_0xa0b346(0x100)][_0xa0b346(0x141)](this[_0xa0b346(0x114)],_0x3ec497,_0x5809f9);this[_0xa0b346(0x13a)][_0xa0b346(0x14a)](_0x5a0578,_0x58a39e[_0xa0b346(0xfe)]);const {id:_0x239ff7}=await _0x58a39e[_0xa0b346(0x16b)]();this[_0xa0b346(0x13a)][_0xa0b346(0x148)](_0x5a0578),this[_0xa0b346(0x15b)]({'type':_0x45f85d,'id':_0x239ff7,'label':_0x5809f9?.[_0xa0b346(0x165)]||_0x38ee4a,'uiId':_0x5a0578,'resourceId':_0x5809f9?.[_0xa0b346(0x110)]},!0x1);}catch(_0x10006f){this[_0xa0b346(0x13a)][_0xa0b346(0x148)](_0x5a0578);if(!_0x10006f[_0xa0b346(0x122)][_0xa0b346(0x184)](_0xa0b346(0x185))){const _0x42b240=new _0x7e5f12(_0xa0b346(0x147),null,{'fileName':_0x38ee4a});_0x42b240[_0xa0b346(0x10b)]=_0x10006f[_0xa0b346(0x10b)],this[_0xa0b346(0x159)](_0xa0b346(0x14e),{'error':_0x42b240,'fileName':_0x38ee4a});}this[_0xa0b346(0x137)](_0x5a0578);}}));}finally{this[_0x2f4f6f(0x170)](_0x158799);}}[_0x49eb93(0x14f)](_0x573a3f){const _0x12e660=_0x49eb93;if(this[_0x12e660(0x104)]())return;const _0x568f6c={'type':_0x51c85d[_0x12e660(0x140)],'uiId':_0x12e660(0x13d),'label':_0x573a3f,'isReadOnly':this[_0x12e660(0x115)][_0x12e660(0x10f)](_0x12e660(0x13d)),'hidden':this[_0x12e660(0x115)][_0x12e660(0x10f)](_0x12e660(0x13d))};this[_0x12e660(0x16f)](_0x568f6c);}async[_0x49eb93(0x180)](_0x1e0988,_0x48521d,_0x5ca5be,_0x45b7e5){const _0x1bc2d9=_0x49eb93,_0x21fae3=this[_0x1bc2d9(0x143)][_0x1bc2d9(0x16c)](_0x1bc2d9(0x13d));if(_0x21fae3&&_0x1e0988){_0x21fae3[_0x1bc2d9(0x162)]=_0x45b7e5?_0x45b7e5[_0x1bc2d9(0x146)](_0x2c9eb9=>({'start':_0x2c9eb9[_0x1bc2d9(0x173)],'end':_0x2c9eb9[_0x1bc2d9(0x101)]})):[];try{if(_0x21fae3[_0x1bc2d9(0x186)]===_0x48521d)return;const {id:_0x1eb75e}=await this[_0x1bc2d9(0x100)][_0x1bc2d9(0x145)](this[_0x1bc2d9(0x114)],_0x1e0988,{'version':_0x48521d,'sessionId':_0x5ca5be})[_0x1bc2d9(0x16b)]();_0x21fae3['id']=_0x1eb75e,_0x21fae3[_0x1bc2d9(0x109)]=_0x1e0988,_0x21fae3[_0x1bc2d9(0x186)]=_0x48521d,_0x21fae3[_0x1bc2d9(0x152)]=_0x5ca5be;}catch(_0x1e33aa){const _0xa061c1=new _0x7e5f12(_0x1bc2d9(0x10c),null);_0xa061c1[_0x1bc2d9(0x10b)]=_0x1e33aa[_0x1bc2d9(0x10b)],this[_0x1bc2d9(0x159)](_0x1bc2d9(0x14e),{'error':_0xa061c1});}}}[_0x49eb93(0x153)](_0x1d1f65){const _0x193175=_0x49eb93;this[_0x193175(0x16f)]({'type':_0x51c85d[_0x193175(0x15d)],'label':_0x1d1f65,'uiId':_0x193175(0x162),'content':_0x1d1f65});}[_0x49eb93(0x174)](){const _0x904bbe=_0x49eb93;this[_0x904bbe(0x137)](_0x904bbe(0x162));}async[_0x49eb93(0x129)](_0x4363c8,_0x5e038f){const _0x155789=_0x49eb93,_0x4f8f94=_0x155789(0x107)+_0x5d8ef0();this[_0x155789(0x15f)](_0x4f8f94);const _0x415b6a=_0x155789(0x107)+_0x5d8ef0();try{this[_0x155789(0x16f)]({'type':_0x51c85d[_0x155789(0x108)],'label':_0x5e038f?.[_0x155789(0x165)]||_0x4363c8,'uiId':_0x415b6a,'resourceId':_0x5e038f?.[_0x155789(0x110)]},!0x0);const _0x345c6e=this[_0x155789(0x100)][_0x155789(0x14d)](this[_0x155789(0x114)],_0x4363c8,_0x5e038f);this[_0x155789(0x13a)][_0x155789(0x14a)](_0x415b6a,_0x345c6e[_0x155789(0xfe)]);const {id:_0x346217}=await _0x345c6e[_0x155789(0x16b)]();this[_0x155789(0x13a)][_0x155789(0x148)](_0x415b6a),this[_0x155789(0x15b)]({'type':_0x51c85d[_0x155789(0x108)],'id':_0x346217,'label':_0x5e038f?.[_0x155789(0x165)]||_0x4363c8,'uiId':_0x415b6a,'resourceId':_0x5e038f?.[_0x155789(0x110)]},!0x1);}catch(_0x3a08af){this[_0x155789(0x13a)][_0x155789(0x148)](_0x415b6a),(_0x3a08af[_0x155789(0x122)][_0x155789(0x184)](_0x155789(0x185))||this[_0x155789(0x159)](_0x155789(0x14e),{'error':new _0x7e5f12(_0x155789(0x156),this,{'url':_0x4363c8,'originalError':_0x3a08af}),'url':_0x4363c8}),this[_0x155789(0x137)](_0x415b6a));}finally{this[_0x155789(0x170)](_0x4f8f94);}}async[_0x49eb93(0x163)](_0x2371dd,_0x42f946,_0x2f99cf){const _0x4d2dda=_0x49eb93,_0x31a669=this[_0x4d2dda(0x17b)][_0x4d2dda(0x11d)][_0x4d2dda(0x161)](_0x4af002=>_0x4af002['id']===_0x2371dd);if(!_0x31a669)return this[_0x4d2dda(0x159)](_0x4d2dda(0x14e),{'error':new _0x7e5f12(_0x4d2dda(0x172),this,{'sourceId':_0x2371dd}),'sourceId':_0x2371dd}),[];try{const _0x330377=(await _0x31a669[_0x4d2dda(0x130)](_0x42f946))[_0x4d2dda(0x146)](_0x2832d6=>{const _0x2649e8=_0x4d2dda,_0x4e236e=this[_0x2649e8(0x13c)](_0x2832d6['id']);return{..._0x2832d6,'isInContext':_0x4e236e};});return _0x31a669[_0x4d2dda(0x17d)]=_0x330377,this[_0x4d2dda(0x159)](_0x4d2dda(0x12b),{'sourceId':_0x2371dd,'source':_0x31a669,'resources':_0x330377,'uid':_0x2f99cf}),_0x330377;}catch(_0x1d98fa){return this[_0x4d2dda(0x159)](_0x4d2dda(0x14e),{'error':new _0x7e5f12(_0x4d2dda(0x11f),this,{'sourceId':_0x2371dd,'originalError':_0x1d98fa}),'sourceId':_0x2371dd,'sourceLabel':_0x31a669[_0x4d2dda(0x165)]}),[];}}async[_0x49eb93(0x12f)](_0x4bbc64,_0x2949c4){const _0x56f327=_0x49eb93;if(this[_0x56f327(0x13c)](_0x2949c4['id']))return;let _0x59165f=_0x2949c4[_0x56f327(0x10d)];if(!_0x59165f&&_0x4bbc64[_0x56f327(0x139)])try{_0x59165f=await _0x4bbc64[_0x56f327(0x139)](_0x2949c4['id']);}catch(_0x477e01){return void this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x138),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'originalError':_0x477e01}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});}if(_0x59165f)switch(_0x2949c4[_0x56f327(0x11a)]){case _0x51c85d[_0x56f327(0x108)]:if(_0x56f327(0x120)!=typeof _0x59165f)return void this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x169),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'expectedType':_0x56f327(0x120),'actualType':typeof _0x59165f}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});await this[_0x56f327(0x129)](_0x59165f,{'label':_0x2949c4[_0x56f327(0x165)],'resourceId':_0x2949c4['id']});break;case _0x51c85d[_0x56f327(0x168)]:if(!(_0x59165f instanceof File))return void this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x169),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'expectedType':_0x56f327(0x11b),'actualType':typeof _0x59165f}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});await this[_0x56f327(0x10a)]([_0x59165f],{'label':_0x2949c4[_0x56f327(0x165)],'resourceId':_0x2949c4['id']});break;case _0x51c85d[_0x56f327(0x17a)]:if(_0x56f327(0x106)!=typeof _0x59165f||!(_0x56f327(0x109)in _0x59165f)||!(_0x56f327(0x11a)in _0x59165f))return void this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x169),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'expectedType':_0x56f327(0x157),'actualType':typeof _0x59165f}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});_0x59165f=AIChatContext[_0x56f327(0x119)](_0x59165f,_0x2949c4[_0x56f327(0x165)]),await this[_0x56f327(0x10a)]([_0x59165f],{'label':_0x2949c4[_0x56f327(0x165)],'resourceId':_0x2949c4['id']},_0x51c85d[_0x56f327(0x17a)]);break;default:this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x16e),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id'],'resourceType':_0x2949c4[_0x56f327(0x11a)]}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});}else this[_0x56f327(0x159)](_0x56f327(0x14e),{'error':new _0x7e5f12(_0x56f327(0x142),this,{'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']}),'resourceId':_0x2949c4['id'],'sourceId':_0x4bbc64['id']});}static[_0x49eb93(0x119)](_0x19bd0b,_0x39a60a){const _0x1f1601=_0x49eb93;switch(_0x19bd0b[_0x1f1601(0x11a)]){case _0x541474[_0x1f1601(0x16d)]:return new File([_0x19bd0b[_0x1f1601(0x109)]],_0x39a60a,{'type':_0x1f1601(0xfb)});case _0x541474[_0x1f1601(0x187)]:return new File([_0x19bd0b[_0x1f1601(0x109)]],_0x39a60a,{'type':_0x1f1601(0x128)});default:return new File([_0x19bd0b[_0x1f1601(0x109)]],_0x39a60a,{'type':_0x1f1601(0x121)});}}static[_0x49eb93(0x164)](_0xf1ac02){const _0x165f5e=_0x49eb93;switch(_0xf1ac02[_0x165f5e(0x11a)]){case _0x51c85d[_0x165f5e(0x168)]:return{'type':_0x51c85d[_0x165f5e(0x168)],'id':_0xf1ac02['id']};case _0x51c85d[_0x165f5e(0x108)]:return{'type':_0x51c85d[_0x165f5e(0x108)],'id':_0xf1ac02['id']};case _0x51c85d[_0x165f5e(0x140)]:return{'type':_0x51c85d[_0x165f5e(0x140)],'id':_0xf1ac02['id'],..._0xf1ac02[_0x165f5e(0x162)]?.[_0x165f5e(0x126)]&&{'selection':_0xf1ac02[_0x165f5e(0x162)]}};case _0x51c85d[_0x165f5e(0x17a)]:return{'type':_0x51c85d[_0x165f5e(0x168)],'id':_0xf1ac02['id']};default:return null;}}[_0x49eb93(0x16f)](_0xe23830,_0x7ffce7=!0x1){const _0x662acf=_0x49eb93;if(this[_0x662acf(0x143)][_0x662acf(0x14a)](_0xe23830[_0x662acf(0x160)],_0xe23830),_0xe23830[_0x662acf(0x136)]||this[_0x662acf(0x159)](_0x662acf(0xfd),{'contextItem':_0xe23830,'isLoading':_0x7ffce7}),_0x662acf(0x13d)===_0xe23830[_0x662acf(0x160)]&&this[_0x662acf(0x113)](),_0xe23830[_0x662acf(0x110)]){const _0x57be4d=this[_0x662acf(0x14c)](_0xe23830[_0x662acf(0x110)]);_0x57be4d&&_0x57be4d[_0x662acf(0x118)](_0x2edf1f=>{const _0x1f60c2=_0x662acf;this[_0x1f60c2(0x15e)](_0x2edf1f,_0xe23830[_0x1f60c2(0x110)],!0x0);});}}[_0x49eb93(0x137)](_0x504ea6){const _0x210609=_0x49eb93,_0x21db22=this[_0x210609(0x143)][_0x210609(0x16c)](_0x504ea6),_0x45a6af=this[_0x210609(0x13a)][_0x210609(0x16c)](_0x504ea6);if(_0x45a6af&&(_0x45a6af[_0x210609(0x124)](),this[_0x210609(0x13a)][_0x210609(0x148)](_0x504ea6)),_0x21db22?.[_0x210609(0x110)]){const _0x15f77d=this[_0x210609(0x14c)](_0x21db22[_0x210609(0x110)]);_0x15f77d&&_0x15f77d[_0x210609(0x118)](_0x34008e=>{const _0x1fa69b=_0x210609;this[_0x1fa69b(0x15e)](_0x34008e,_0x21db22[_0x1fa69b(0x110)],!0x1);});}this[_0x210609(0x143)][_0x210609(0x148)](_0x504ea6),this[_0x210609(0x159)](_0x210609(0x12c),{'uiId':_0x504ea6,'type':_0x21db22?.[_0x210609(0x11a)]}),_0x210609(0x13d)===_0x504ea6&&this[_0x210609(0x113)]();}[_0x49eb93(0x15b)](_0x13c54e,_0x1daf9d){const _0x184ee4=_0x49eb93;if(this[_0x184ee4(0x143)][_0x184ee4(0x10f)](_0x13c54e[_0x184ee4(0x160)])&&(this[_0x184ee4(0x143)][_0x184ee4(0x14a)](_0x13c54e[_0x184ee4(0x160)],_0x13c54e),this[_0x184ee4(0x159)](_0x184ee4(0x102),{'contextItem':_0x13c54e,'isLoading':_0x1daf9d}),_0x13c54e[_0x184ee4(0x110)])){const _0x4be4ce=this[_0x184ee4(0x14c)](_0x13c54e[_0x184ee4(0x110)]);_0x4be4ce&&_0x4be4ce[_0x184ee4(0x118)](_0x1f854a=>{const _0x1b85d9=_0x184ee4;this[_0x1b85d9(0x15e)](_0x1f854a,_0x13c54e[_0x1b85d9(0x110)],!0x0);});}}[_0x49eb93(0x12a)](_0x130baf){const _0x428ab5=_0x49eb93;this[_0x428ab5(0x115)][_0x428ab5(0x14a)](_0x130baf[_0x428ab5(0x160)],_0x130baf);}[_0x49eb93(0x15c)](){const _0x499a99=_0x49eb93;this[_0x499a99(0x17b)]={'document':{'enabled':!0x1!==this[_0x499a99(0x188)]?.[_0x499a99(0x135)]?.[_0x499a99(0x111)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x499a99(0x188)]?.[_0x499a99(0x177)]?.[_0x499a99(0x111)]},'files':{'enabled':!0x1!==this[_0x499a99(0x188)]?.[_0x499a99(0x171)]?.[_0x499a99(0x111)]},'sources':this[_0x499a99(0x158)]()},this[_0x499a99(0x159)](_0x499a99(0x181),{'options':this[_0x499a99(0x17b)]});}[_0x49eb93(0x158)](){const _0x3f82d3=_0x49eb93;return this[_0x3f82d3(0x188)]?.[_0x3f82d3(0x11d)]?.[_0x3f82d3(0x146)](_0x2d833b=>({..._0x2d833b,'resources':[]}))??[];}[_0x49eb93(0x113)](){const _0x565d9=_0x49eb93,_0x250e4e=this[_0x565d9(0x104)]()||this[_0x565d9(0x17c)]();this[_0x565d9(0x17b)][_0x565d9(0x135)][_0x565d9(0x17f)]=_0x250e4e,this[_0x565d9(0x159)](_0x565d9(0x181),{'options':this[_0x565d9(0x17b)]});}[_0x49eb93(0x13c)](_0x189e19){const _0x92b3a0=_0x49eb93;for(const _0x5f5002 of this[_0x92b3a0(0x143)][_0x92b3a0(0x151)]())if(_0x5f5002[_0x92b3a0(0x110)]===_0x189e19)return!0x0;for(const _0x3f28b7 of this[_0x92b3a0(0x115)][_0x92b3a0(0x151)]())if(_0x3f28b7[_0x92b3a0(0x110)]===_0x189e19)return!0x0;return!0x1;}[_0x49eb93(0x14c)](_0x6967e2){const _0x24a98a=_0x49eb93,_0x404ea7=[];for(const _0x17a9aa of this[_0x24a98a(0x17b)][_0x24a98a(0x11d)]){_0x17a9aa[_0x24a98a(0x17d)][_0x24a98a(0x161)](_0x372049=>_0x372049['id']===_0x6967e2)&&_0x404ea7[_0x24a98a(0x149)](_0x17a9aa['id']);}return 0x0===_0x404ea7[_0x24a98a(0x126)]?null:_0x404ea7;}[_0x49eb93(0x15e)](_0x5cdb05,_0x157eea,_0x1bb8a3){const _0x2ae1ae=_0x49eb93,_0x21312d=this[_0x2ae1ae(0x17b)][_0x2ae1ae(0x11d)][_0x2ae1ae(0x161)](_0x12e51b=>_0x12e51b['id']===_0x5cdb05);if(!_0x21312d)return;const _0xc8c83c=_0x21312d[_0x2ae1ae(0x17d)][_0x2ae1ae(0x161)](_0x2e8595=>_0x2e8595['id']===_0x157eea);_0xc8c83c&&(_0xc8c83c[_0x2ae1ae(0x155)]=_0x1bb8a3,this[_0x2ae1ae(0x159)](_0x2ae1ae(0x13f),{'sourceId':_0x5cdb05,'resourceId':_0x157eea,'isInContext':_0x1bb8a3}));}[_0x49eb93(0x15f)](_0xf02177){const _0x4a4823=_0x49eb93;this[_0x4a4823(0x11c)][_0x4a4823(0x14a)](_0xf02177,!0x0),this[_0x4a4823(0x11c)][_0x4a4823(0x12e)]&&this[_0x4a4823(0x159)](_0x4a4823(0x154),{'isUploadInProgress':!0x0});}[_0x49eb93(0x170)](_0x4d72fa){const _0x2f7554=_0x49eb93;this[_0x2f7554(0x11c)][_0x2f7554(0x148)](_0x4d72fa),0x0===this[_0x2f7554(0x11c)][_0x2f7554(0x12e)]&&this[_0x2f7554(0x159)](_0x2f7554(0x154),{'isUploadInProgress':!0x1});}}
|
|
23
|
+
const _0x249f1b=_0x1a9e;function _0x301b(){const _0xb6e314=['_createContextItemFromContent','contextItemRemoved','sources','all','3353567gktfXB','delete','URL','ai-chat-document-upload-failed','getPendingContextItems','_pendingContextItems','HTML','removeFromContext','20bxyBmc','clearPendingContextItems','document','1079kztPzB','addSelectionToContext','label','_getCustomSourcesInitialState','SELECTION','ai-request-aborted','string','1368izPQVJ','addFilesToContext','name','isCurrentDocumentInContext','error','size','text/plain','_finishContextItemLoading','url-','type','isReadOnly','_ongoingUploadOperations','_isResourceInContext','ai-chat-source-not-found','getSentContextItems','files-','ai-chat-resource-no-data','content','uploadDocument','21012eAxdTH','object\x20with\x20content\x20and\x20type\x20properties','ai-chat-context-unsupported-type','contextItemAdded','TEXT','ai-chat-resource-load-failed','_removeContextItem','File','map','has','2417UXbYXO','urls','forEach','1181196XrCCTv','addContextOptionsChanged','populateFromMessage','ai-chat-url-upload-failed','isInContext','MARKDOWN','Current\x20document','isCurrentDocumentInConversation','32200mUbtln','fetchDocument','get','current-document','uploadFile','_conversationContextItems','resourceStateChanged','selection','uploadProgressChanged','abort','file-','addCurrentDocumentToContext','_connector','contextSent','_finishUploadOperation','length','uploadUrl','init','hidden','FILE','_config','addToConversationContext','_convertTextResourceToFile','text/markdown','abortController','_findSourceIdsByResourceId','enabled','addResourceToContext','8obLxVQ','text/html','version','_updateResourceInContextState','values','sessionId','end','_ownerId','getId','start','420IvzQNR','862twniqj','stack','getResources','set','files','push','_addContextOptionsState','isSelectionInContext','resources','_addContextItem','uiId','_toggleAddCurrentDocumentOptionVisibility','DOCUMENT','filter','data','url','updateCurrentDocument','object','ai-chat-file-upload-failed','find','ai-chat-source-resources-load-failed','sourceResourcesLoaded','mapContextItemsToRequestData','contextItemLoadingEnded','addUrlToContext','fire','loadSourceResources','attributes','60270eouCAU','isHidden','_addToConversationContextItem','getDocument','startsWith','_mapContextItemToRequestData','removeSelectionFromContext','12705341GTYHuj','resourceId','from','_startUploadOperation','getData','ai-chat-context-invalid-data','_setAddContextOptionsDefaultState','_ongoingUploads','message'];_0x301b=function(){return _0xb6e314;};return _0x301b();}(function(_0x498d56,_0xa41bfb){const _0x1b14dd=_0x1a9e,_0x23ed5e=_0x498d56();while(!![]){try{const _0x36aafe=parseInt(_0x1b14dd(0x21e))/0x1*(-parseInt(_0x1b14dd(0x250))/0x2)+parseInt(_0x1b14dd(0x24f))/0x3*(parseInt(_0x1b14dd(0x229))/0x4)+parseInt(_0x1b14dd(0x1f7))/0x5*(parseInt(_0x1b14dd(0x221))/0x6)+parseInt(_0x1b14dd(0x1ef))/0x7*(-parseInt(_0x1b14dd(0x245))/0x8)+-parseInt(_0x1b14dd(0x201))/0x9*(parseInt(_0x1b14dd(0x26c))/0xa)+parseInt(_0x1b14dd(0x273))/0xb+-parseInt(_0x1b14dd(0x214))/0xc*(-parseInt(_0x1b14dd(0x1fa))/0xd);if(_0x36aafe===_0xa41bfb)break;else _0x23ed5e['push'](_0x23ed5e['shift']());}catch(_0x3d8387){_0x23ed5e['push'](_0x23ed5e['shift']());}}}(_0x301b,0xbdebc));import{CKEditorError as _0x59e32b,ObservableMixin as _0x132ae2,uid as _0x439105}from'ckeditor5/src/utils.js';function _0x1a9e(_0x568072,_0x779178){const _0x301bb8=_0x301b();return _0x1a9e=function(_0x1a9e01,_0x4dc1d9){_0x1a9e01=_0x1a9e01-0x1e6;let _0x2394b3=_0x301bb8[_0x1a9e01];return _0x2394b3;},_0x1a9e(_0x568072,_0x779178);}import{AIContextItemType as _0x417156,AIContextTextResourceType as _0x24355c}from'../../aicore/model/aicontext.js';import{escape as _0x3ac15e}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x249f1b(0x217),_0x249f1b(0x1ec),_0x249f1b(0x267),_0x249f1b(0x236),_0x249f1b(0x205),_0x249f1b(0x222),_0x249f1b(0x265),_0x249f1b(0x22f),_0x249f1b(0x231)];export class AIChatContext extends _0x132ae2(){[_0x249f1b(0x235)];[_0x249f1b(0x23d)];[_0x249f1b(0x24c)];constructor({connector:_0xc70215,config:_0x3fb860,ownerId:_0x29fad7}){const _0x16e99e=_0x249f1b;super(),this[_0x16e99e(0x235)]=_0xc70215,this[_0x16e99e(0x23d)]=_0x3fb860,this[_0x16e99e(0x24c)]=_0x29fad7;}[_0x249f1b(0x23a)](){const _0x778090=_0x249f1b;this[_0x778090(0x1f4)]=new Map(),this[_0x778090(0x22e)]=new Map(),this[_0x778090(0x1e9)]=new Map(),this[_0x778090(0x20c)]=new Map(),this[_0x778090(0x1e8)]();}[_0x249f1b(0x1f3)](){const _0x1ee019=_0x249f1b;return this[_0x1ee019(0x1f4)];}async[_0x249f1b(0x223)](_0x1bd257){const _0x549108=_0x249f1b,_0x5a3396=await this[_0x549108(0x1eb)](_0x1bd257);return this[_0x549108(0x26e)](_0x5a3396),_0x549108(0x22c)===_0x5a3396[_0x549108(0x25a)]&&this[_0x549108(0x25b)](),_0x5a3396;}async[_0x249f1b(0x1eb)](_0x1acece){const _0x3e3f53=_0x249f1b;if(_0x1acece[_0x3e3f53(0x20a)]===_0x417156[_0x3e3f53(0x25c)]){const _0x41a1a8=await this[_0x3e3f53(0x235)][_0x3e3f53(0x22a)](this[_0x3e3f53(0x24c)],_0x1acece['id'])[_0x3e3f53(0x26f)]();return{'id':_0x3e3f53(0x22c),'uiId':_0x3e3f53(0x22c),'label':_0x3e3f53(0x227),'type':_0x1acece[_0x3e3f53(0x20a)],'content':_0x41a1a8[_0x3e3f53(0x212)],'hidden':this[_0x3e3f53(0x22e)][_0x3e3f53(0x21d)](_0x3e3f53(0x22c)),'version':_0x41a1a8[_0x3e3f53(0x26b)]?.[_0x3e3f53(0x247)],'sessionId':_0x41a1a8[_0x3e3f53(0x26b)]?.[_0x3e3f53(0x24a)]};}return{'id':_0x1acece['id'],'uiId':_0x1acece['id'],'label':_0x1acece[_0x3e3f53(0x26b)]?.[_0x3e3f53(0x1fc)]||_0x1acece[_0x3e3f53(0x203)]||_0x1acece[_0x3e3f53(0x25f)]||_0x1acece['id'],'type':_0x1acece[_0x3e3f53(0x20a)],..._0x1acece?.[_0x3e3f53(0x26b)]?.[_0x3e3f53(0x274)]?{'resourceId':_0x1acece[_0x3e3f53(0x26b)]?.[_0x3e3f53(0x274)]}:{}};}[_0x249f1b(0x20f)](){const _0x169407=_0x249f1b;return new Map(this[_0x169407(0x22e)]);}[_0x249f1b(0x1f6)](_0x56fe7e){const _0x3f8ec6=_0x249f1b,_0x411afe=this[_0x3f8ec6(0x1f4)][_0x3f8ec6(0x22b)](_0x56fe7e);_0x411afe?.[_0x3f8ec6(0x20b)]||this[_0x3f8ec6(0x21a)](_0x56fe7e);}[_0x249f1b(0x1f8)](){const _0x2ca890=_0x249f1b;if(0x0===this[_0x2ca890(0x1f4)][_0x2ca890(0x206)])return;for(const _0x33a096 of this[_0x2ca890(0x1f4)][_0x2ca890(0x249)]())this[_0x2ca890(0x21a)](_0x33a096[_0x2ca890(0x25a)]);const _0x269f37=this[_0x2ca890(0x22e)][_0x2ca890(0x22b)](_0x2ca890(0x22c))||this[_0x2ca890(0x1f4)][_0x2ca890(0x22b)](_0x2ca890(0x22c));_0x269f37&&this[_0x2ca890(0x259)]({..._0x269f37,'isReadOnly':!0x0,'hidden':!0x0});}[_0x249f1b(0x23e)](_0x89f98e){const _0x50b7ac=_0x249f1b;for(const _0x105b93 of _0x89f98e[_0x50b7ac(0x249)]())this[_0x50b7ac(0x26e)](_0x105b93);this[_0x50b7ac(0x1f8)](),this[_0x50b7ac(0x269)](_0x50b7ac(0x236),{'contextItems':Array[_0x50b7ac(0x275)](this[_0x50b7ac(0x20f)]()[_0x50b7ac(0x249)]())});}[_0x249f1b(0x204)](){const _0x4766a8=_0x249f1b;return this[_0x4766a8(0x1f4)][_0x4766a8(0x21d)](_0x4766a8(0x22c));}[_0x249f1b(0x257)](){const _0xc4e7cd=_0x249f1b;return this[_0xc4e7cd(0x1f4)][_0xc4e7cd(0x21d)](_0xc4e7cd(0x230));}[_0x249f1b(0x228)](){const _0x988659=_0x249f1b;return this[_0x988659(0x22e)][_0x988659(0x21d)](_0x988659(0x22c));}static[_0x249f1b(0x266)](_0x1b51cf){const _0x658d90=_0x249f1b;return Array[_0x658d90(0x275)](_0x1b51cf[_0x658d90(0x249)]())[_0x658d90(0x21c)](_0x3f98aa=>this[_0x658d90(0x271)](_0x3f98aa))[_0x658d90(0x25d)](_0xade571=>null!==_0xade571);}async[_0x249f1b(0x202)](_0x43a6f9,_0x171085,_0x4a3b0d=_0x417156[_0x249f1b(0x23c)]){const _0x4a00ea=_0x249f1b,_0x11d728=_0x4a00ea(0x210)+_0x439105();this[_0x4a00ea(0x276)](_0x11d728);try{await Promise[_0x4a00ea(0x1ee)](_0x43a6f9[_0x4a00ea(0x21c)](async _0x27ddf8=>{const _0x141a20=_0x4a00ea,_0x4f6fa2=_0x141a20(0x233)+_0x439105(),_0x500f07=_0x3ac15e(_0x27ddf8[_0x141a20(0x203)]);try{this[_0x141a20(0x259)]({'type':_0x4a3b0d,'label':_0x171085?.[_0x141a20(0x1fc)]||_0x500f07,'uiId':_0x4f6fa2,'resourceId':_0x171085?.[_0x141a20(0x274)]},!0x0);const _0x5a728b=this[_0x141a20(0x235)][_0x141a20(0x22d)](this[_0x141a20(0x24c)],_0x27ddf8,_0x171085);this[_0x141a20(0x1e9)][_0x141a20(0x253)](_0x4f6fa2,_0x5a728b[_0x141a20(0x241)]);const {id:_0x1f1e3c}=await _0x5a728b[_0x141a20(0x24d)]();this[_0x141a20(0x1e9)][_0x141a20(0x1f0)](_0x4f6fa2),this[_0x141a20(0x208)]({'type':_0x4a3b0d,'id':_0x1f1e3c,'label':_0x171085?.[_0x141a20(0x1fc)]||_0x500f07,'uiId':_0x4f6fa2,'resourceId':_0x171085?.[_0x141a20(0x274)]},!0x1);}catch(_0x3c8165){this[_0x141a20(0x1e9)][_0x141a20(0x1f0)](_0x4f6fa2);if(!_0x3c8165[_0x141a20(0x1ea)][_0x141a20(0x270)](_0x141a20(0x1ff))){const _0x1741d9=new _0x59e32b(_0x141a20(0x262),null,{'fileName':_0x500f07});_0x1741d9[_0x141a20(0x251)]=_0x3c8165[_0x141a20(0x251)],this[_0x141a20(0x269)](_0x141a20(0x205),{'error':_0x1741d9,'fileName':_0x500f07});}this[_0x141a20(0x21a)](_0x4f6fa2);}}));}finally{this[_0x4a00ea(0x237)](_0x11d728);}}[_0x249f1b(0x234)](_0x28412b){const _0x1fa38d=_0x249f1b;if(this[_0x1fa38d(0x204)]())return;const _0x2b84f1={'type':_0x417156[_0x1fa38d(0x25c)],'uiId':_0x1fa38d(0x22c),'label':_0x28412b,'isReadOnly':this[_0x1fa38d(0x22e)][_0x1fa38d(0x21d)](_0x1fa38d(0x22c)),'hidden':this[_0x1fa38d(0x22e)][_0x1fa38d(0x21d)](_0x1fa38d(0x22c))};this[_0x1fa38d(0x259)](_0x2b84f1);}async[_0x249f1b(0x260)](_0x3533ac,_0x5ebe4b,_0x21b334,_0x323030){const _0x4ba8e0=_0x249f1b,_0x27efec=this[_0x4ba8e0(0x1f4)][_0x4ba8e0(0x22b)](_0x4ba8e0(0x22c));if(_0x27efec&&_0x3533ac){_0x27efec[_0x4ba8e0(0x230)]=_0x323030?_0x323030[_0x4ba8e0(0x21c)](_0xd2a2ec=>({'start':_0xd2a2ec[_0x4ba8e0(0x24e)],'end':_0xd2a2ec[_0x4ba8e0(0x24b)]})):[];try{if(_0x27efec[_0x4ba8e0(0x247)]===_0x5ebe4b)return;const {id:_0x31889c}=await this[_0x4ba8e0(0x235)][_0x4ba8e0(0x213)](this[_0x4ba8e0(0x24c)],_0x3533ac,{'version':_0x5ebe4b,'sessionId':_0x21b334})[_0x4ba8e0(0x24d)]();_0x27efec['id']=_0x31889c,_0x27efec[_0x4ba8e0(0x212)]=_0x3533ac,_0x27efec[_0x4ba8e0(0x247)]=_0x5ebe4b,_0x27efec[_0x4ba8e0(0x24a)]=_0x21b334;}catch(_0x56f275){const _0x2887d0=new _0x59e32b(_0x4ba8e0(0x1f2),null);_0x2887d0[_0x4ba8e0(0x251)]=_0x56f275[_0x4ba8e0(0x251)],this[_0x4ba8e0(0x269)](_0x4ba8e0(0x205),{'error':_0x2887d0});}}}[_0x249f1b(0x1fb)](_0x50f0c8){const _0x38f676=_0x249f1b;this[_0x38f676(0x259)]({'type':_0x417156[_0x38f676(0x1fe)],'label':_0x50f0c8,'uiId':_0x38f676(0x230),'content':_0x50f0c8});}[_0x249f1b(0x272)](){const _0x49a423=_0x249f1b;this[_0x49a423(0x21a)](_0x49a423(0x230));}async[_0x249f1b(0x268)](_0x2c86d9,_0x2a6cde){const _0x1c3dc9=_0x249f1b,_0x1b85e3=_0x1c3dc9(0x209)+_0x439105();this[_0x1c3dc9(0x276)](_0x1b85e3);const _0x3e1ccd=_0x1c3dc9(0x209)+_0x439105();try{this[_0x1c3dc9(0x259)]({'type':_0x417156[_0x1c3dc9(0x1f1)],'label':_0x2a6cde?.[_0x1c3dc9(0x1fc)]||_0x2c86d9,'uiId':_0x3e1ccd,'resourceId':_0x2a6cde?.[_0x1c3dc9(0x274)]},!0x0);const _0x325586=this[_0x1c3dc9(0x235)][_0x1c3dc9(0x239)](this[_0x1c3dc9(0x24c)],_0x2c86d9,_0x2a6cde);this[_0x1c3dc9(0x1e9)][_0x1c3dc9(0x253)](_0x3e1ccd,_0x325586[_0x1c3dc9(0x241)]);const {id:_0x40c2c4}=await _0x325586[_0x1c3dc9(0x24d)]();this[_0x1c3dc9(0x1e9)][_0x1c3dc9(0x1f0)](_0x3e1ccd),this[_0x1c3dc9(0x208)]({'type':_0x417156[_0x1c3dc9(0x1f1)],'id':_0x40c2c4,'label':_0x2a6cde?.[_0x1c3dc9(0x1fc)]||_0x2c86d9,'uiId':_0x3e1ccd,'resourceId':_0x2a6cde?.[_0x1c3dc9(0x274)]},!0x1);}catch(_0x3cf346){this[_0x1c3dc9(0x1e9)][_0x1c3dc9(0x1f0)](_0x3e1ccd),(_0x3cf346[_0x1c3dc9(0x1ea)][_0x1c3dc9(0x270)](_0x1c3dc9(0x1ff))||this[_0x1c3dc9(0x269)](_0x1c3dc9(0x205),{'error':new _0x59e32b(_0x1c3dc9(0x224),this,{'url':_0x2c86d9,'originalError':_0x3cf346}),'url':_0x2c86d9}),this[_0x1c3dc9(0x21a)](_0x3e1ccd));}finally{this[_0x1c3dc9(0x237)](_0x1b85e3);}}async[_0x249f1b(0x26a)](_0x4ec595,_0x294f81,_0x514400){const _0x4ba85f=_0x249f1b,_0x79385c=this[_0x4ba85f(0x256)][_0x4ba85f(0x1ed)][_0x4ba85f(0x263)](_0x22dd99=>_0x22dd99['id']===_0x4ec595);if(!_0x79385c)return this[_0x4ba85f(0x269)](_0x4ba85f(0x205),{'error':new _0x59e32b(_0x4ba85f(0x20e),this,{'sourceId':_0x4ec595}),'sourceId':_0x4ec595}),[];try{const _0x14063e=(await _0x79385c[_0x4ba85f(0x252)](_0x294f81))[_0x4ba85f(0x21c)](_0xec45ce=>{const _0x783061=_0x4ba85f,_0x394805=this[_0x783061(0x20d)](_0xec45ce['id']);return{..._0xec45ce,'isInContext':_0x394805};});return _0x79385c[_0x4ba85f(0x258)]=_0x14063e,this[_0x4ba85f(0x269)](_0x4ba85f(0x265),{'sourceId':_0x4ec595,'source':_0x79385c,'resources':_0x14063e,'uid':_0x514400}),_0x14063e;}catch(_0x20f7c0){return this[_0x4ba85f(0x269)](_0x4ba85f(0x205),{'error':new _0x59e32b(_0x4ba85f(0x264),this,{'sourceId':_0x4ec595,'originalError':_0x20f7c0}),'sourceId':_0x4ec595,'sourceLabel':_0x79385c[_0x4ba85f(0x1fc)]}),[];}}async[_0x249f1b(0x244)](_0x500f0b,_0x12c470){const _0x427184=_0x249f1b;if(this[_0x427184(0x20d)](_0x12c470['id']))return;let _0x44eb9b=_0x12c470[_0x427184(0x25e)];if(!_0x44eb9b&&_0x500f0b[_0x427184(0x1e6)])try{_0x44eb9b=await _0x500f0b[_0x427184(0x1e6)](_0x12c470['id']);}catch(_0x44fa02){return void this[_0x427184(0x269)](_0x427184(0x205),{'error':new _0x59e32b(_0x427184(0x219),this,{'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id'],'originalError':_0x44fa02}),'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id']});}if(_0x44eb9b)switch(_0x12c470[_0x427184(0x20a)]){case _0x417156[_0x427184(0x1f1)]:if(_0x427184(0x200)!=typeof _0x44eb9b)return void this[_0x427184(0x269)](_0x427184(0x205),{'error':new _0x59e32b(_0x427184(0x1e7),this,{'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id'],'expectedType':_0x427184(0x200),'actualType':typeof _0x44eb9b}),'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id']});await this[_0x427184(0x268)](_0x44eb9b,{'label':_0x12c470[_0x427184(0x1fc)],'resourceId':_0x12c470['id']});break;case _0x417156[_0x427184(0x23c)]:if(!(_0x44eb9b instanceof File))return void this[_0x427184(0x269)](_0x427184(0x205),{'error':new _0x59e32b(_0x427184(0x1e7),this,{'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id'],'expectedType':_0x427184(0x21b),'actualType':typeof _0x44eb9b}),'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id']});await this[_0x427184(0x202)]([_0x44eb9b],{'label':_0x12c470[_0x427184(0x1fc)],'resourceId':_0x12c470['id']});break;case _0x417156[_0x427184(0x218)]:if(_0x427184(0x261)!=typeof _0x44eb9b||!(_0x427184(0x212)in _0x44eb9b)||!(_0x427184(0x20a)in _0x44eb9b))return void this[_0x427184(0x269)](_0x427184(0x205),{'error':new _0x59e32b(_0x427184(0x1e7),this,{'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id'],'expectedType':_0x427184(0x215),'actualType':typeof _0x44eb9b}),'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id']});_0x44eb9b=AIChatContext[_0x427184(0x23f)](_0x44eb9b,_0x12c470[_0x427184(0x1fc)]),await this[_0x427184(0x202)]([_0x44eb9b],{'label':_0x12c470[_0x427184(0x1fc)],'resourceId':_0x12c470['id']},_0x417156[_0x427184(0x218)]);break;default:this[_0x427184(0x269)](_0x427184(0x205),{'error':new _0x59e32b(_0x427184(0x216),this,{'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id'],'resourceType':_0x12c470[_0x427184(0x20a)]}),'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id']});}else this[_0x427184(0x269)](_0x427184(0x205),{'error':new _0x59e32b(_0x427184(0x211),this,{'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id']}),'resourceId':_0x12c470['id'],'sourceId':_0x500f0b['id']});}static[_0x249f1b(0x23f)](_0x4fdf6a,_0x17dab2){const _0x592fe3=_0x249f1b;switch(_0x4fdf6a[_0x592fe3(0x20a)]){case _0x24355c[_0x592fe3(0x226)]:return new File([_0x4fdf6a[_0x592fe3(0x212)]],_0x17dab2,{'type':_0x592fe3(0x240)});case _0x24355c[_0x592fe3(0x1f5)]:return new File([_0x4fdf6a[_0x592fe3(0x212)]],_0x17dab2,{'type':_0x592fe3(0x246)});default:return new File([_0x4fdf6a[_0x592fe3(0x212)]],_0x17dab2,{'type':_0x592fe3(0x207)});}}static[_0x249f1b(0x271)](_0x2b8268){const _0x57c286=_0x249f1b;switch(_0x2b8268[_0x57c286(0x20a)]){case _0x417156[_0x57c286(0x23c)]:return{'type':_0x417156[_0x57c286(0x23c)],'id':_0x2b8268['id']};case _0x417156[_0x57c286(0x1f1)]:return{'type':_0x417156[_0x57c286(0x1f1)],'id':_0x2b8268['id']};case _0x417156[_0x57c286(0x25c)]:return{'type':_0x417156[_0x57c286(0x25c)],'id':_0x2b8268['id'],..._0x2b8268[_0x57c286(0x230)]?.[_0x57c286(0x238)]&&{'selection':_0x2b8268[_0x57c286(0x230)]}};case _0x417156[_0x57c286(0x218)]:return{'type':_0x417156[_0x57c286(0x23c)],'id':_0x2b8268['id']};default:return null;}}[_0x249f1b(0x259)](_0x475599,_0x249645=!0x1){const _0x3df63d=_0x249f1b;if(this[_0x3df63d(0x1f4)][_0x3df63d(0x253)](_0x475599[_0x3df63d(0x25a)],_0x475599),_0x475599[_0x3df63d(0x23b)]||this[_0x3df63d(0x269)](_0x3df63d(0x217),{'contextItem':_0x475599,'isLoading':_0x249645}),_0x3df63d(0x22c)===_0x475599[_0x3df63d(0x25a)]&&this[_0x3df63d(0x25b)](),_0x475599[_0x3df63d(0x274)]){const _0x5cb4f9=this[_0x3df63d(0x242)](_0x475599[_0x3df63d(0x274)]);_0x5cb4f9&&_0x5cb4f9[_0x3df63d(0x220)](_0x56e17b=>{const _0x5509c3=_0x3df63d;this[_0x5509c3(0x248)](_0x56e17b,_0x475599[_0x5509c3(0x274)],!0x0);});}}[_0x249f1b(0x21a)](_0x3df38e){const _0x363b18=_0x249f1b,_0x4bb5fe=this[_0x363b18(0x1f4)][_0x363b18(0x22b)](_0x3df38e),_0x2d52b9=this[_0x363b18(0x1e9)][_0x363b18(0x22b)](_0x3df38e);if(_0x2d52b9&&(_0x2d52b9[_0x363b18(0x232)](),this[_0x363b18(0x1e9)][_0x363b18(0x1f0)](_0x3df38e)),_0x4bb5fe?.[_0x363b18(0x274)]){const _0xce35b3=this[_0x363b18(0x242)](_0x4bb5fe[_0x363b18(0x274)]);_0xce35b3&&_0xce35b3[_0x363b18(0x220)](_0xec422=>{const _0x4a7805=_0x363b18;this[_0x4a7805(0x248)](_0xec422,_0x4bb5fe[_0x4a7805(0x274)],!0x1);});}this[_0x363b18(0x1f4)][_0x363b18(0x1f0)](_0x3df38e),this[_0x363b18(0x269)](_0x363b18(0x1ec),{'uiId':_0x3df38e,'type':_0x4bb5fe?.[_0x363b18(0x20a)]}),_0x363b18(0x22c)===_0x3df38e&&this[_0x363b18(0x25b)]();}[_0x249f1b(0x208)](_0x15c24f,_0x1a6735){const _0x46d373=_0x249f1b;if(this[_0x46d373(0x1f4)][_0x46d373(0x21d)](_0x15c24f[_0x46d373(0x25a)])&&(this[_0x46d373(0x1f4)][_0x46d373(0x253)](_0x15c24f[_0x46d373(0x25a)],_0x15c24f),this[_0x46d373(0x269)](_0x46d373(0x267),{'contextItem':_0x15c24f,'isLoading':_0x1a6735}),_0x15c24f[_0x46d373(0x274)])){const _0x2e6baa=this[_0x46d373(0x242)](_0x15c24f[_0x46d373(0x274)]);_0x2e6baa&&_0x2e6baa[_0x46d373(0x220)](_0x4a7528=>{const _0x1e2f3b=_0x46d373;this[_0x1e2f3b(0x248)](_0x4a7528,_0x15c24f[_0x1e2f3b(0x274)],!0x0);});}}[_0x249f1b(0x26e)](_0x1b027a){const _0x5c5f7b=_0x249f1b;this[_0x5c5f7b(0x22e)][_0x5c5f7b(0x253)](_0x1b027a[_0x5c5f7b(0x25a)],_0x1b027a);}[_0x249f1b(0x1e8)](){const _0x505b2a=_0x249f1b;this[_0x505b2a(0x256)]={'document':{'enabled':!0x1!==this[_0x505b2a(0x23d)]?.[_0x505b2a(0x1f9)]?.[_0x505b2a(0x243)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x505b2a(0x23d)]?.[_0x505b2a(0x21f)]?.[_0x505b2a(0x243)]},'files':{'enabled':!0x1!==this[_0x505b2a(0x23d)]?.[_0x505b2a(0x254)]?.[_0x505b2a(0x243)]},'sources':this[_0x505b2a(0x1fd)]()},this[_0x505b2a(0x269)](_0x505b2a(0x222),{'options':this[_0x505b2a(0x256)]});}[_0x249f1b(0x1fd)](){const _0x35fac5=_0x249f1b;return this[_0x35fac5(0x23d)]?.[_0x35fac5(0x1ed)]?.[_0x35fac5(0x21c)](_0x5ed404=>({..._0x5ed404,'resources':[]}))??[];}[_0x249f1b(0x25b)](){const _0xe6e5=_0x249f1b,_0x4253c4=this[_0xe6e5(0x204)]()||this[_0xe6e5(0x228)]();this[_0xe6e5(0x256)][_0xe6e5(0x1f9)][_0xe6e5(0x26d)]=_0x4253c4,this[_0xe6e5(0x269)](_0xe6e5(0x222),{'options':this[_0xe6e5(0x256)]});}[_0x249f1b(0x20d)](_0x5c5aa9){const _0x1e3571=_0x249f1b;for(const _0x13c8ef of this[_0x1e3571(0x1f4)][_0x1e3571(0x249)]())if(_0x13c8ef[_0x1e3571(0x274)]===_0x5c5aa9)return!0x0;for(const _0x5ba8cb of this[_0x1e3571(0x22e)][_0x1e3571(0x249)]())if(_0x5ba8cb[_0x1e3571(0x274)]===_0x5c5aa9)return!0x0;return!0x1;}[_0x249f1b(0x242)](_0x103255){const _0x146f72=_0x249f1b,_0x5e7a7c=[];for(const _0x41a0f3 of this[_0x146f72(0x256)][_0x146f72(0x1ed)]){_0x41a0f3[_0x146f72(0x258)][_0x146f72(0x263)](_0x44bd7e=>_0x44bd7e['id']===_0x103255)&&_0x5e7a7c[_0x146f72(0x255)](_0x41a0f3['id']);}return 0x0===_0x5e7a7c[_0x146f72(0x238)]?null:_0x5e7a7c;}[_0x249f1b(0x248)](_0x2323ee,_0x332df3,_0x493fa5){const _0x139fa3=_0x249f1b,_0x3d3b88=this[_0x139fa3(0x256)][_0x139fa3(0x1ed)][_0x139fa3(0x263)](_0x402855=>_0x402855['id']===_0x2323ee);if(!_0x3d3b88)return;const _0x86e419=_0x3d3b88[_0x139fa3(0x258)][_0x139fa3(0x263)](_0x4e73c2=>_0x4e73c2['id']===_0x332df3);_0x86e419&&(_0x86e419[_0x139fa3(0x225)]=_0x493fa5,this[_0x139fa3(0x269)](_0x139fa3(0x22f),{'sourceId':_0x2323ee,'resourceId':_0x332df3,'isInContext':_0x493fa5}));}[_0x249f1b(0x276)](_0x1ba656){const _0x43f358=_0x249f1b;this[_0x43f358(0x20c)][_0x43f358(0x253)](_0x1ba656,!0x0),this[_0x43f358(0x20c)][_0x43f358(0x206)]&&this[_0x43f358(0x269)](_0x43f358(0x231),{'isUploadInProgress':!0x0});}[_0x249f1b(0x237)](_0x3633b3){const _0x36787a=_0x249f1b;this[_0x36787a(0x20c)][_0x36787a(0x1f0)](_0x3633b3),0x0===this[_0x36787a(0x20c)][_0x36787a(0x206)]&&this[_0x36787a(0x269)](_0x36787a(0x231),{'isUploadInProgress':!0x1});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x2502e4=_0x541c;(function(_0x251d08,_0x5ca952){const _0x5cffd1=_0x541c,_0x1fb241=_0x251d08();while(!![]){try{const _0x9fa013=-parseInt(_0x5cffd1(0x154))/0x1*(-parseInt(_0x5cffd1(0x1b0))/0x2)+-parseInt(_0x5cffd1(0x19d))/0x3+-parseInt(_0x5cffd1(0x1b1))/0x4+-parseInt(_0x5cffd1(0x195))/0x5*(parseInt(_0x5cffd1(0x1a9))/0x6)+-parseInt(_0x5cffd1(0x17b))/0x7+-parseInt(_0x5cffd1(0x1b4))/0x8*(parseInt(_0x5cffd1(0x1aa))/0x9)+parseInt(_0x5cffd1(0x1af))/0xa;if(_0x9fa013===_0x5ca952)break;else _0x1fb241['push'](_0x1fb241['shift']());}catch(_0x482892){_0x1fb241['push'](_0x1fb241['shift']());}}}(_0x181d,0x21be2));import{CKEditorError as _0xbae659,EmitterMixin as _0x4d7429,logWarning as _0x191c41}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x5d3ffa}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x542f25,AI_CONTEXT_MODEL_EVENT_NAMES as _0x53528d}from'./aichatcontext.js';function _0x541c(_0x8fbff8,_0x35b2c1){const _0x181d3d=_0x181d();return _0x541c=function(_0x541c58,_0x467e1e){_0x541c58=_0x541c58-0x144;let _0x2750bd=_0x181d3d[_0x541c58];return _0x2750bd;},_0x541c(_0x8fbff8,_0x35b2c1);}import{AICapabilities as _0x180c28,CAPABILITIES_MODEL_EVENT_NAMES as _0x481def}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x241e46}from'./aichatinteraction.js';export class AIChatConversation extends _0x4d7429(){['id'];[_0x2502e4(0x161)]=!0x1;[_0x2502e4(0x14e)]=[];[_0x2502e4(0x147)];[_0x2502e4(0x145)];[_0x2502e4(0x170)];[_0x2502e4(0x1ad)];constructor(_0x1d0c8a){const _0x253bc3=_0x2502e4;super(),this[_0x253bc3(0x1ad)]=_0x1d0c8a,this[_0x253bc3(0x170)]=_0x1d0c8a[_0x253bc3(0x170)],this[_0x253bc3(0x1a7)]=_0x1d0c8a[_0x253bc3(0x1a7)],this['id']=_0x1d0c8a[_0x253bc3(0x175)];}async[_0x2502e4(0x183)](_0x4b041b){const _0x52e95c=_0x2502e4;try{this[_0x52e95c(0x16f)]=new _0x542f25({'connector':this[_0x52e95c(0x170)],'config':_0x4b041b,'ownerId':this['id']}),this[_0x52e95c(0x16f)][_0x52e95c(0x18a)](..._0x53528d)['to'](this),this[_0x52e95c(0x16f)][_0x52e95c(0x183)](),this[_0x52e95c(0x156)]=new _0x180c28(),this[_0x52e95c(0x156)][_0x52e95c(0x18a)](..._0x481def)['to'](this),this[_0x52e95c(0x156)][_0x52e95c(0x183)]();const _0x29b30d=await this[_0x52e95c(0x1a7)][_0x52e95c(0x1a2)]();this[_0x52e95c(0x18b)](_0x52e95c(0x1a3),{'availableModels':_0x29b30d});const _0xdcf635=await this[_0x52e95c(0x1a7)][_0x52e95c(0x168)](this[_0x52e95c(0x1ad)][_0x52e95c(0x1a1)]);_0xdcf635&&await this[_0x52e95c(0x144)](_0xdcf635);}catch(_0x5a4a51){const _0x3bb1a8=new _0xbae659(_0x52e95c(0x16d),null,{'message':_0x5a4a51[_0x52e95c(0x181)]});_0x3bb1a8[_0x52e95c(0x17c)]=_0x5a4a51[_0x52e95c(0x17c)],this[_0x52e95c(0x18b)](_0x52e95c(0x177),{'error':_0x3bb1a8});}}async[_0x2502e4(0x17a)](){const _0x193e0e=_0x2502e4;if(this[_0x193e0e(0x161)])throw new _0xbae659(_0x193e0e(0x16c),null,{'conversation':this});if(!this[_0x193e0e(0x145)])throw new _0xbae659(_0x193e0e(0x1a8),null,{'conversation':this});try{const {id:_0x44f102}=await this[_0x193e0e(0x170)][_0x193e0e(0x159)](this['id'],this[_0x193e0e(0x1ad)][_0x193e0e(0x182)])[_0x193e0e(0x169)]();this['id']=_0x44f102,this[_0x193e0e(0x161)]=!0x0,this[_0x193e0e(0x18b)](_0x193e0e(0x174),{'conversationId':this['id'],'selectedModel':this[_0x193e0e(0x145)]});}catch(_0x4aafbe){const _0x9506b7=new _0xbae659(_0x193e0e(0x198),null,{'message':_0x4aafbe[_0x193e0e(0x181)]});_0x9506b7[_0x193e0e(0x17c)]=_0x4aafbe[_0x193e0e(0x17c)],this[_0x193e0e(0x18b)](_0x193e0e(0x177),{'error':_0x9506b7});}}async[_0x2502e4(0x19c)](_0x215a81,_0x3d3101){const _0x1260ba=_0x2502e4;try{const _0x5c0658=await this[_0x1260ba(0x170)][_0x1260ba(0x176)](_0x215a81)[_0x1260ba(0x169)](),_0x5a84b0=await this[_0x1260ba(0x170)][_0x1260ba(0x187)](_0x215a81)[_0x1260ba(0x19b)](),_0x40781d=_0x5a84b0[0x0][_0x1260ba(0x16e)];this[_0x1260ba(0x161)]=!0x0,this['id']=_0x5c0658['id'],_0x1260ba(0x199)in _0x5c0658?this[_0x1260ba(0x18b)](_0x1260ba(0x173),_0x5c0658[_0x1260ba(0x199)],!0x0):this[_0x1260ba(0x18b)](_0x1260ba(0x173),'',!0x0);const _0x5ed935=(await this[_0x1260ba(0x1a7)][_0x1260ba(0x148)]())[_0x1260ba(0x1b6)](_0x6fafab=>_0x6fafab['id'][_0x1260ba(0x1a4)]()===_0x40781d[_0x1260ba(0x1a4)]());return this[_0x1260ba(0x145)]=_0x5ed935,this[_0x1260ba(0x18b)](_0x1260ba(0x17f),{'selectedModel':_0x5ed935,'isDisabled':!0x0}),await this[_0x1260ba(0x1b5)](_0x5a84b0,_0x3d3101,_0x40781d),this[_0x1260ba(0x147)]=void 0x0,this;}catch(_0x405e29){const _0x2dbf3e=new _0xbae659(_0x1260ba(0x1a5),null,{'message':_0x405e29[_0x1260ba(0x181)],'conversationId':_0x215a81});throw _0x2dbf3e[_0x1260ba(0x17c)]=_0x405e29[_0x1260ba(0x17c)],this[_0x1260ba(0x18b)](_0x1260ba(0x177),{'error':_0x2dbf3e}),_0x2dbf3e;}}async[_0x2502e4(0x1b5)](_0x99cc40,_0x4c93e5,_0x2b66a8){const _0x3217e4=_0x2502e4;let _0x3f5116;for(const _0x1de5fc of _0x99cc40)if(_0x3217e4(0x160)===_0x1de5fc[_0x3217e4(0x16a)]){const _0x27bd0c=await this[_0x3217e4(0x180)](_0x1de5fc),_0x42f7f9={'isReasoningEnabled':Object[_0x3217e4(0x192)](_0x1de5fc[_0x3217e4(0x149)],_0x3217e4(0x157)),'isWebSearchEnabled':Object[_0x3217e4(0x192)](_0x1de5fc[_0x3217e4(0x149)],_0x3217e4(0x194))};_0x3f5116=this[_0x3217e4(0x14d)]({'userMessage':_0x1de5fc[_0x3217e4(0x171)],'contextItems':_0x27bd0c,'capabilities':_0x42f7f9,'modelId':_0x2b66a8,'quickActionData':_0x1de5fc[_0x3217e4(0x197)]?.[_0x3217e4(0x190)]}),this[_0x3217e4(0x147)]=_0x3f5116,this[_0x3217e4(0x16f)][_0x3217e4(0x17d)](this[_0x3217e4(0x147)][_0x3217e4(0x193)]);}else{if(_0x3217e4(0x1b2)===_0x1de5fc[_0x3217e4(0x16a)]&&_0x3f5116)for(const _0x1be38d of _0x1de5fc[_0x3217e4(0x15c)]){const _0x305e6b=_0x3217e4(0x1a6)===_0x1be38d[_0x3217e4(0x14f)]?_0x3217e4(0x15a):_0x3217e4(0x19a),_0x3dfa76=_0x3f5116[_0x3217e4(0x1b3)]()?.[_0x3217e4(0x18d)]!==_0x4c93e5;_0x3f5116[_0x3217e4(0x17e)]=_0x3f5116[_0x3217e4(0x172)]({'type':_0x305e6b,'isDone':!0x0,'interactionId':_0x3f5116['id'],'areActionsDisabled':_0x3dfa76}),_0x3f5116[_0x3217e4(0x17e)][_0x3217e4(0x165)](_0x1be38d[_0x3217e4(0x15c)]);}}}async[_0x2502e4(0x180)](_0x160d39){const _0x59acaa=_0x2502e4,_0x1c1c0d=new Map();if(!_0x160d39[_0x59acaa(0x15c)])return _0x1c1c0d;for(const _0x543af2 of _0x160d39[_0x59acaa(0x15c)]){const _0x11e66b=await this[_0x59acaa(0x16f)][_0x59acaa(0x15b)](_0x543af2);_0x11e66b&&_0x1c1c0d[_0x59acaa(0x1ac)](_0x11e66b['id'],_0x11e66b);}return _0x1c1c0d;}async[_0x2502e4(0x1ae)]({userMessage:_0x545420,quickActionData:_0x516ac8}){const _0x26f1cc=_0x2502e4;if(!this[_0x26f1cc(0x161)])throw new _0xbae659(_0x26f1cc(0x14a),null,{'conversation':this});if(this[_0x26f1cc(0x147)])throw new _0xbae659(_0x26f1cc(0x15e),null,{'conversation':this});try{const _0x116614=this[_0x26f1cc(0x16f)][_0x26f1cc(0x158)](),_0x1c8d4b=this[_0x26f1cc(0x156)][_0x26f1cc(0x18f)](),_0x17bdf9=this[_0x26f1cc(0x145)]['id'];this[_0x26f1cc(0x147)]=this[_0x26f1cc(0x14d)]({'userMessage':_0x545420,'contextItems':_0x116614,'capabilities':_0x1c8d4b,'modelId':_0x17bdf9,'quickActionData':_0x516ac8}),await this[_0x26f1cc(0x147)][_0x26f1cc(0x17a)](),this[_0x26f1cc(0x16f)][_0x26f1cc(0x17d)](this[_0x26f1cc(0x147)][_0x26f1cc(0x193)]);}catch(_0x4bc3dc){this[_0x26f1cc(0x18b)](_0x26f1cc(0x177),{'interactionId':this[_0x26f1cc(0x147)]?this[_0x26f1cc(0x147)]['id']:void 0x0,'error':_0x4bc3dc});}finally{this[_0x26f1cc(0x147)]?.[_0x26f1cc(0x15f)](),this[_0x26f1cc(0x147)]=void 0x0;}}[_0x2502e4(0x14d)]({userMessage:_0xcb4b49,contextItems:_0x2dcf8c,capabilities:_0x42f8d2,modelId:_0x337eba,quickActionData:_0x36edaf}){const _0x992846=_0x2502e4,_0x4c5c81=new _0x241e46({'userMessage':_0xcb4b49,'contextItems':_0x2dcf8c,'capabilities':_0x42f8d2,'conversationId':this['id'],'connector':this[_0x992846(0x170)],'editor':this[_0x992846(0x1ad)][_0x992846(0x1a0)]&&this[_0x992846(0x1ad)][_0x992846(0x1a0)](),'model':_0x337eba,'quickActionData':_0x36edaf});return _0x4c5c81[_0x992846(0x18a)](..._0x5d3ffa)['to'](this),this[_0x992846(0x14e)][_0x992846(0x155)](_0x4c5c81),this[_0x992846(0x18b)](_0x992846(0x185),_0x4c5c81),_0x4c5c81;}[_0x2502e4(0x163)](_0x47fede){const _0xba58d7=_0x2502e4;return this[_0xba58d7(0x14e)][_0xba58d7(0x1b6)](_0x3b0f55=>_0x3b0f55['id']===_0x47fede);}[_0x2502e4(0x18e)](_0x58a223){const _0x3f1ae0=_0x2502e4,_0x47e166=this[_0x3f1ae0(0x163)](_0x58a223);_0x47e166&&(_0x47e166[_0x3f1ae0(0x146)](),this[_0x3f1ae0(0x14e)][_0x3f1ae0(0x15d)](this[_0x3f1ae0(0x14e)][_0x3f1ae0(0x153)](_0x47e166),0x1));}get[_0x2502e4(0x186)](){const _0x5b640e=_0x2502e4;return this[_0x5b640e(0x14e)][this[_0x5b640e(0x14e)][_0x5b640e(0x188)]-0x1];}[_0x2502e4(0x179)](_0x416f3a){const _0x549750=_0x2502e4;this[_0x549750(0x16f)][_0x549750(0x179)](_0x416f3a);}async[_0x2502e4(0x1ab)]({content:_0x1ce3b8,version:_0x216317,sessionId:_0x4cf3bb,selections:_0x46785a}){const _0x3f497d=_0x2502e4;await this[_0x3f497d(0x16f)][_0x3f497d(0x162)](_0x1ce3b8,_0x216317,_0x4cf3bb,_0x46785a);}[_0x2502e4(0x152)](){const _0xa4d499=_0x2502e4;return this[_0xa4d499(0x147)]?.[_0xa4d499(0x1b3)]()?.[_0xa4d499(0x15c)]||'';}[_0x2502e4(0x19e)](_0x4d9a2d){const _0xc70521=_0x2502e4;this[_0xc70521(0x16f)][_0xc70521(0x19e)](_0x4d9a2d);}[_0x2502e4(0x18c)](){const _0x208b54=_0x2502e4;this[_0x208b54(0x16f)][_0x208b54(0x18c)]();}[_0x2502e4(0x14b)](_0x50ca40){const _0x1605be=_0x2502e4;this[_0x1605be(0x16f)][_0x1605be(0x14b)](_0x50ca40);}[_0x2502e4(0x150)](_0x47e9ce){const _0x604695=_0x2502e4;this[_0x604695(0x16f)][_0x604695(0x150)](_0x47e9ce);}[_0x2502e4(0x191)](_0x3a31df,_0xb5a720){const _0x61f38f=_0x2502e4;this[_0x61f38f(0x16f)][_0x61f38f(0x191)](_0x3a31df,_0xb5a720);}[_0x2502e4(0x166)](_0x216113,_0x1b0d72,_0x4696a1){const _0x5ce6b3=_0x2502e4;return this[_0x5ce6b3(0x16f)][_0x5ce6b3(0x166)](_0x216113,_0x1b0d72,_0x4696a1);}[_0x2502e4(0x184)](_0x8bff9){const _0x1ebf58=_0x2502e4;this[_0x1ebf58(0x16f)][_0x1ebf58(0x184)](_0x8bff9);}[_0x2502e4(0x164)](){const _0x2d2901=_0x2502e4;this[_0x2d2901(0x156)][_0x2d2901(0x164)]();}[_0x2502e4(0x196)](){const _0x25b8d6=_0x2502e4;this[_0x25b8d6(0x156)][_0x25b8d6(0x196)]();}[_0x2502e4(0x14c)](){const _0x41c650=_0x2502e4;return this[_0x41c650(0x16f)][_0x41c650(0x14c)]();}[_0x2502e4(0x19f)](){const _0x1ae130=_0x2502e4;return this[_0x1ae130(0x16f)][_0x1ae130(0x19f)]();}[_0x2502e4(0x167)](){const _0x4f0290=_0x2502e4;return this[_0x4f0290(0x16f)][_0x4f0290(0x167)]();}async[_0x2502e4(0x144)](_0x19acb7){const _0x54086b=_0x2502e4;_0x19acb7?!0x1===await this[_0x54086b(0x1a7)][_0x54086b(0x189)](_0x19acb7)&&(_0x191c41(_0x54086b(0x151),{'conversation':this,'model':_0x19acb7}),_0x19acb7=(await this[_0x54086b(0x1a7)][_0x54086b(0x1a2)]())[0x0]):(_0x191c41(_0x54086b(0x16b),{'conversation':this}),_0x19acb7=(await this[_0x54086b(0x1a7)][_0x54086b(0x1a2)]())[0x0]),_0x19acb7['id']!==this[_0x54086b(0x145)]?.['id']&&(this[_0x54086b(0x145)]=_0x19acb7,this[_0x54086b(0x156)][_0x54086b(0x178)](),this[_0x54086b(0x18b)](_0x54086b(0x17f),{'selectedModel':_0x19acb7}));}}function _0x181d(){const _0x39ecfb=['1632659rVSbIh','stack','addToConversationContext','currentReply','modelSelected','_extractContextItems','message','group','init','removeFromContext','interactionCreated','lastInteraction','fetchConversationMessages','length','isAvailable','delegate','fire','removeSelectionFromContext','sessionId','removeInteraction','getCapabilitiesConfig','quickActionData','addResourceToContext','hasOwn','contextItems','webSearch','395bSvckf','toggleReasoning','attributes','ai-chat-conversation-start-failed','title','modification-delta','getMessages','load','455949BpXclg','addSelectionToContext','isCurrentDocumentInConversation','getEditor','selectedModelId','getAvailableModels','conversationInitialized','toLowerCase','ai-chat-conversation-init-from-id-failed','text','chatModels','ai-chat-conversation-start-no-model-selected','8010CCSEnF','9pNTxVw','updateCurrentDocumentInContext','set','options','handleUserInteraction','7005750FSywop','42134PXOjiw','492368KobBSr','assistant','getDocumentContext','94312IvURjm','_processMessagesToInteractions','find','setModel','selectedModel','destroy','currentInteraction','getAll','capabilities','ai-chat-handle-user-conversation-not-initialized','addFilesToContext','isCurrentDocumentInContext','createInteraction','interactions','type','addUrlToContext','ai-chat-conversation-set-model-not-available','getCurrentDocumentContext','indexOf','3hUUcAb','push','chatCapabilities','reasoning','getPendingContextItems','startConversation','text-delta','populateFromMessage','content','splice','ai-chat-handle-user-interaction-already-in-progress','stop','user','isStarted','updateCurrentDocument','getInteraction','toggleWebSearch','appendContent','loadSourceResources','isSelectionInContext','getModel','getConversation','role','ai-chat-conversation-set-model-null','ai-chat-conversation-already-started','ai-chat-conversation-init-failed','model','chatContext','connector','prompt','createReply','setConversationTitle','conversationStarted','conversationId','fetchConversation','error','reset','addCurrentDocumentToContext','start'];_0x181d=function(){return _0x39ecfb;};return _0x181d();}
|
|
23
|
+
const _0x12b1f1=_0x235a;(function(_0xcd6798,_0x102177){const _0x42f1ec=_0x235a,_0xb45ea1=_0xcd6798();while(!![]){try{const _0x54e50e=parseInt(_0x42f1ec(0x1d5))/0x1*(-parseInt(_0x42f1ec(0x1de))/0x2)+parseInt(_0x42f1ec(0x1b4))/0x3*(-parseInt(_0x42f1ec(0x1bf))/0x4)+-parseInt(_0x42f1ec(0x183))/0x5+-parseInt(_0x42f1ec(0x1a6))/0x6*(parseInt(_0x42f1ec(0x18c))/0x7)+parseInt(_0x42f1ec(0x181))/0x8*(-parseInt(_0x42f1ec(0x1be))/0x9)+parseInt(_0x42f1ec(0x1ab))/0xa+parseInt(_0x42f1ec(0x185))/0xb*(parseInt(_0x42f1ec(0x1ad))/0xc);if(_0x54e50e===_0x102177)break;else _0xb45ea1['push'](_0xb45ea1['shift']());}catch(_0x5c0e67){_0xb45ea1['push'](_0xb45ea1['shift']());}}}(_0x31eb,0xe1a44));function _0x235a(_0x47536f,_0x4ff6e9){const _0x31ebb7=_0x31eb();return _0x235a=function(_0x235ae0,_0x2cd857){_0x235ae0=_0x235ae0-0x173;let _0x45f854=_0x31ebb7[_0x235ae0];return _0x45f854;},_0x235a(_0x47536f,_0x4ff6e9);}import{CKEditorError as _0x1d7654,EmitterMixin as _0x5c4628,logWarning as _0x1df096}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x37fe85}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x21d9d0,AI_CONTEXT_MODEL_EVENT_NAMES as _0x53d05f}from'./aichatcontext.js';function _0x31eb(){const _0x588339=['1285yHTrJP','removeSelectionFromContext','connector','addCurrentDocumentToContext','start','stop','reset','updateCurrentDocumentInContext','removeInteraction','818CFvuSl','ai-chat-conversation-start-failed','assistant','content','ai-chat-conversation-already-started','model','ai-chat-conversation-set-model-null','getCapabilitiesConfig','addFilesToContext','group','appendContent','ai-chat-conversation-init-failed','user','sessionId','selectedModel','length','hasOwn','interactionCreated','chatCapabilities','startConversation','prompt','isCurrentDocumentInContext','getAll','chatContext','20616LIiksX','interactions','6880050grOyZB','fetchConversationMessages','49993394KCqXtW','find','setModel','handleUserInteraction','getModel','role','reasoning','3703BhPxDf','set','selectedModelId','removeFromContext','fire','_extractContextItems','stack','toLowerCase','ai-chat-handle-user-interaction-already-in-progress','contextItems','options','isStarted','chatModels','getCurrentDocumentContext','updateCurrentDocument','_processMessagesToInteractions','getPendingContextItems','quickActionData','currentReply','modelSelected','isAvailable','capabilities','currentInteraction','load','fetchConversation','message','14106gfwdMY','isSelectionInContext','init','title','delegate','5062140kVQsxa','addSelectionToContext','12OfeoGr','ai-chat-conversation-start-no-model-selected','addUrlToContext','conversationStarted','getAvailableModels','indexOf','getMessages','169476mlqhLN','ai-chat-handle-user-conversation-not-initialized','error','conversationInitialized','push','ai-chat-conversation-init-from-id-failed','attributes','conversationId','type','getConversation','666QuxBcI','56ZoZxiu','setConversationTitle','toggleWebSearch','getEditor','destroy','isCurrentDocumentInConversation','addResourceToContext','loadSourceResources','ai-chat-conversation-set-model-not-available','getDocumentContext','text-delta','createReply','text','createInteraction','toggleReasoning','getInteraction','addToConversationContext','populateFromMessage','modification-delta','webSearch','lastInteraction','splice'];_0x31eb=function(){return _0x588339;};return _0x31eb();}import{AICapabilities as _0xfa8207,CAPABILITIES_MODEL_EVENT_NAMES as _0x51b5af}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x5d92ec}from'./aichatinteraction.js';export class AIChatConversation extends _0x5c4628(){['id'];[_0x12b1f1(0x197)]=!0x1;[_0x12b1f1(0x182)]=[];[_0x12b1f1(0x1a2)];[_0x12b1f1(0x177)];[_0x12b1f1(0x1d7)];[_0x12b1f1(0x196)];constructor(_0x14477e){const _0x17c79b=_0x12b1f1;super(),this[_0x17c79b(0x196)]=_0x14477e,this[_0x17c79b(0x1d7)]=_0x14477e[_0x17c79b(0x1d7)],this[_0x17c79b(0x198)]=_0x14477e[_0x17c79b(0x198)],this['id']=_0x14477e[_0x17c79b(0x1bb)];}async[_0x12b1f1(0x1a8)](_0x23e6df){const _0x1ffc41=_0x12b1f1;try{this[_0x1ffc41(0x180)]=new _0x21d9d0({'connector':this[_0x1ffc41(0x1d7)],'config':_0x23e6df,'ownerId':this['id']}),this[_0x1ffc41(0x180)][_0x1ffc41(0x1aa)](..._0x53d05f)['to'](this),this[_0x1ffc41(0x180)][_0x1ffc41(0x1a8)](),this[_0x1ffc41(0x17b)]=new _0xfa8207(),this[_0x1ffc41(0x17b)][_0x1ffc41(0x1aa)](..._0x51b5af)['to'](this),this[_0x1ffc41(0x17b)][_0x1ffc41(0x1a8)]();const _0x3876ff=await this[_0x1ffc41(0x198)][_0x1ffc41(0x1b1)]();this[_0x1ffc41(0x190)](_0x1ffc41(0x1b7),{'availableModels':_0x3876ff});const _0x418af4=await this[_0x1ffc41(0x198)][_0x1ffc41(0x189)](this[_0x1ffc41(0x196)][_0x1ffc41(0x18e)]);_0x418af4&&await this[_0x1ffc41(0x187)](_0x418af4);}catch(_0x4d3715){const _0x25abc0=new _0x1d7654(_0x1ffc41(0x174),null,{'message':_0x4d3715[_0x1ffc41(0x1a5)]});_0x25abc0[_0x1ffc41(0x192)]=_0x4d3715[_0x1ffc41(0x192)],this[_0x1ffc41(0x190)](_0x1ffc41(0x1b6),{'error':_0x25abc0});}}async[_0x12b1f1(0x1d9)](){const _0x12058b=_0x12b1f1;if(this[_0x12058b(0x197)])throw new _0x1d7654(_0x12058b(0x1e2),null,{'conversation':this});if(!this[_0x12058b(0x177)])throw new _0x1d7654(_0x12058b(0x1ae),null,{'conversation':this});try{const {id:_0x192d39}=await this[_0x12058b(0x1d7)][_0x12058b(0x17c)](this['id'],this[_0x12058b(0x196)][_0x12058b(0x1e7)])[_0x12058b(0x1bd)]();this['id']=_0x192d39,this[_0x12058b(0x197)]=!0x0,this[_0x12058b(0x190)](_0x12058b(0x1b0),{'conversationId':this['id'],'selectedModel':this[_0x12058b(0x177)]});}catch(_0x4c2973){const _0x774d4d=new _0x1d7654(_0x12058b(0x1df),null,{'message':_0x4c2973[_0x12058b(0x1a5)]});_0x774d4d[_0x12058b(0x192)]=_0x4c2973[_0x12058b(0x192)],this[_0x12058b(0x190)](_0x12058b(0x1b6),{'error':_0x774d4d});}}async[_0x12b1f1(0x1a3)](_0x4bc703,_0x378d46){const _0x49c932=_0x12b1f1;try{const _0x50ea92=await this[_0x49c932(0x1d7)][_0x49c932(0x1a4)](_0x4bc703)[_0x49c932(0x1bd)](),_0x1a2247=await this[_0x49c932(0x1d7)][_0x49c932(0x184)](_0x4bc703)[_0x49c932(0x1b3)](),_0x324ccd=_0x1a2247[0x0][_0x49c932(0x1e3)];this[_0x49c932(0x197)]=!0x0,this['id']=_0x50ea92['id'],_0x49c932(0x1a9)in _0x50ea92?this[_0x49c932(0x190)](_0x49c932(0x1c0),_0x50ea92[_0x49c932(0x1a9)],!0x0):this[_0x49c932(0x190)](_0x49c932(0x1c0),'',!0x0);const _0x85127e=(await this[_0x49c932(0x198)][_0x49c932(0x17f)]())[_0x49c932(0x186)](_0x29687c=>_0x29687c['id'][_0x49c932(0x193)]()===_0x324ccd[_0x49c932(0x193)]());return this[_0x49c932(0x177)]=_0x85127e,this[_0x49c932(0x190)](_0x49c932(0x19f),{'selectedModel':_0x85127e,'isDisabled':!0x0}),await this[_0x49c932(0x19b)](_0x1a2247,_0x378d46,_0x324ccd),this[_0x49c932(0x1a2)]=void 0x0,this;}catch(_0x95469d){const _0x3170c5=new _0x1d7654(_0x49c932(0x1b9),null,{'message':_0x95469d[_0x49c932(0x1a5)],'conversationId':_0x4bc703});throw _0x3170c5[_0x49c932(0x192)]=_0x95469d[_0x49c932(0x192)],this[_0x49c932(0x190)](_0x49c932(0x1b6),{'error':_0x3170c5}),_0x3170c5;}}async[_0x12b1f1(0x19b)](_0x5b416a,_0x44d4a3,_0x41245f){const _0x4ef4e0=_0x12b1f1;let _0x41c478;for(const _0x4c20f2 of _0x5b416a)if(_0x4ef4e0(0x175)===_0x4c20f2[_0x4ef4e0(0x18a)]){const _0x35a588=await this[_0x4ef4e0(0x191)](_0x4c20f2),_0x34b2f6={'isReasoningEnabled':Object[_0x4ef4e0(0x179)](_0x4c20f2[_0x4ef4e0(0x1a1)],_0x4ef4e0(0x18b)),'isWebSearchEnabled':Object[_0x4ef4e0(0x179)](_0x4c20f2[_0x4ef4e0(0x1a1)],_0x4ef4e0(0x1d2))};_0x41c478=this[_0x4ef4e0(0x1cc)]({'userMessage':_0x4c20f2[_0x4ef4e0(0x17d)],'contextItems':_0x35a588,'capabilities':_0x34b2f6,'modelId':_0x41245f,'quickActionData':_0x4c20f2[_0x4ef4e0(0x1ba)]?.[_0x4ef4e0(0x19d)]}),this[_0x4ef4e0(0x1a2)]=_0x41c478,this[_0x4ef4e0(0x180)][_0x4ef4e0(0x1cf)](this[_0x4ef4e0(0x1a2)][_0x4ef4e0(0x195)]);}else{if(_0x4ef4e0(0x1e0)===_0x4c20f2[_0x4ef4e0(0x18a)]&&_0x41c478)for(const _0x1998a5 of _0x4c20f2[_0x4ef4e0(0x1e1)]){const _0x204536=_0x4ef4e0(0x1cb)===_0x1998a5[_0x4ef4e0(0x1bc)]?_0x4ef4e0(0x1c9):_0x4ef4e0(0x1d1),_0x181322=_0x41c478[_0x4ef4e0(0x1c8)]()?.[_0x4ef4e0(0x176)]!==_0x44d4a3;_0x41c478[_0x4ef4e0(0x19e)]=_0x41c478[_0x4ef4e0(0x1ca)]({'type':_0x204536,'isDone':!0x0,'interactionId':_0x41c478['id'],'areActionsDisabled':_0x181322}),_0x41c478[_0x4ef4e0(0x19e)][_0x4ef4e0(0x173)](_0x1998a5[_0x4ef4e0(0x1e1)]);}}}async[_0x12b1f1(0x191)](_0x54dab4){const _0x3495ee=_0x12b1f1,_0x3819eb=new Map();if(!_0x54dab4[_0x3495ee(0x1e1)])return _0x3819eb;for(const _0x4b6abf of _0x54dab4[_0x3495ee(0x1e1)]){const _0x311b49=await this[_0x3495ee(0x180)][_0x3495ee(0x1d0)](_0x4b6abf);_0x311b49&&_0x3819eb[_0x3495ee(0x18d)](_0x311b49['id'],_0x311b49);}return _0x3819eb;}async[_0x12b1f1(0x188)]({userMessage:_0x39a686,quickActionData:_0x5d2b4d}){const _0x525757=_0x12b1f1;if(!this[_0x525757(0x197)])throw new _0x1d7654(_0x525757(0x1b5),null,{'conversation':this});if(this[_0x525757(0x1a2)])throw new _0x1d7654(_0x525757(0x194),null,{'conversation':this});try{const _0x282844=this[_0x525757(0x180)][_0x525757(0x19c)](),_0x1ce29d=this[_0x525757(0x17b)][_0x525757(0x1e5)](),_0x4cc7a9=this[_0x525757(0x177)]['id'];this[_0x525757(0x1a2)]=this[_0x525757(0x1cc)]({'userMessage':_0x39a686,'contextItems':_0x282844,'capabilities':_0x1ce29d,'modelId':_0x4cc7a9,'quickActionData':_0x5d2b4d}),await this[_0x525757(0x1a2)][_0x525757(0x1d9)](),this[_0x525757(0x180)][_0x525757(0x1cf)](this[_0x525757(0x1a2)][_0x525757(0x195)]);}catch(_0x247f5d){this[_0x525757(0x190)](_0x525757(0x1b6),{'interactionId':this[_0x525757(0x1a2)]?this[_0x525757(0x1a2)]['id']:void 0x0,'error':_0x247f5d});}finally{this[_0x525757(0x1a2)]?.[_0x525757(0x1da)](),this[_0x525757(0x1a2)]=void 0x0;}}[_0x12b1f1(0x1cc)]({userMessage:_0x12fee4,contextItems:_0x5b4834,capabilities:_0x33ad84,modelId:_0x39c234,quickActionData:_0x479e9a}){const _0x58ab8e=_0x12b1f1,_0xdd33f8=new _0x5d92ec({'userMessage':_0x12fee4,'contextItems':_0x5b4834,'capabilities':_0x33ad84,'conversationId':this['id'],'connector':this[_0x58ab8e(0x1d7)],'editor':this[_0x58ab8e(0x196)][_0x58ab8e(0x1c2)]&&this[_0x58ab8e(0x196)][_0x58ab8e(0x1c2)](),'model':_0x39c234,'quickActionData':_0x479e9a});return _0xdd33f8[_0x58ab8e(0x1aa)](..._0x37fe85)['to'](this),this[_0x58ab8e(0x182)][_0x58ab8e(0x1b8)](_0xdd33f8),this[_0x58ab8e(0x190)](_0x58ab8e(0x17a),_0xdd33f8),_0xdd33f8;}[_0x12b1f1(0x1ce)](_0xb06d0){const _0x4a1791=_0x12b1f1;return this[_0x4a1791(0x182)][_0x4a1791(0x186)](_0x3e888b=>_0x3e888b['id']===_0xb06d0);}[_0x12b1f1(0x1dd)](_0x12bba0){const _0x2459a5=_0x12b1f1,_0x5de35e=this[_0x2459a5(0x1ce)](_0x12bba0);_0x5de35e&&(_0x5de35e[_0x2459a5(0x1c3)](),this[_0x2459a5(0x182)][_0x2459a5(0x1d4)](this[_0x2459a5(0x182)][_0x2459a5(0x1b2)](_0x5de35e),0x1));}get[_0x12b1f1(0x1d3)](){const _0x48e17a=_0x12b1f1;return this[_0x48e17a(0x182)][this[_0x48e17a(0x182)][_0x48e17a(0x178)]-0x1];}[_0x12b1f1(0x1d8)](_0xd191e1){const _0x115e11=_0x12b1f1;this[_0x115e11(0x180)][_0x115e11(0x1d8)](_0xd191e1);}async[_0x12b1f1(0x1dc)]({content:_0xa67006,version:_0xb000dd,sessionId:_0x371353,selections:_0x425a0a}){const _0x4ee9dd=_0x12b1f1;await this[_0x4ee9dd(0x180)][_0x4ee9dd(0x19a)](_0xa67006,_0xb000dd,_0x371353,_0x425a0a);}[_0x12b1f1(0x199)](){const _0x95a2b8=_0x12b1f1;return this[_0x95a2b8(0x1a2)]?.[_0x95a2b8(0x1c8)]()?.[_0x95a2b8(0x1e1)]||'';}[_0x12b1f1(0x1ac)](_0x50869d){const _0x320c5e=_0x12b1f1;this[_0x320c5e(0x180)][_0x320c5e(0x1ac)](_0x50869d);}[_0x12b1f1(0x1d6)](){const _0x59d869=_0x12b1f1;this[_0x59d869(0x180)][_0x59d869(0x1d6)]();}[_0x12b1f1(0x1e6)](_0x5bd63e){const _0x2b0da4=_0x12b1f1;this[_0x2b0da4(0x180)][_0x2b0da4(0x1e6)](_0x5bd63e);}[_0x12b1f1(0x1af)](_0x41646c){const _0x129f22=_0x12b1f1;this[_0x129f22(0x180)][_0x129f22(0x1af)](_0x41646c);}[_0x12b1f1(0x1c5)](_0x5f0115,_0x1e2b5e){const _0x3b04f2=_0x12b1f1;this[_0x3b04f2(0x180)][_0x3b04f2(0x1c5)](_0x5f0115,_0x1e2b5e);}[_0x12b1f1(0x1c6)](_0x39a6f0,_0x5c6a11,_0x541762){const _0x10ce2c=_0x12b1f1;return this[_0x10ce2c(0x180)][_0x10ce2c(0x1c6)](_0x39a6f0,_0x5c6a11,_0x541762);}[_0x12b1f1(0x18f)](_0x2c8472){const _0x19da5b=_0x12b1f1;this[_0x19da5b(0x180)][_0x19da5b(0x18f)](_0x2c8472);}[_0x12b1f1(0x1c1)](){const _0xe5e7a7=_0x12b1f1;this[_0xe5e7a7(0x17b)][_0xe5e7a7(0x1c1)]();}[_0x12b1f1(0x1cd)](){const _0x21cae8=_0x12b1f1;this[_0x21cae8(0x17b)][_0x21cae8(0x1cd)]();}[_0x12b1f1(0x17e)](){const _0x3bb11e=_0x12b1f1;return this[_0x3bb11e(0x180)][_0x3bb11e(0x17e)]();}[_0x12b1f1(0x1c4)](){const _0x5c0668=_0x12b1f1;return this[_0x5c0668(0x180)][_0x5c0668(0x1c4)]();}[_0x12b1f1(0x1a7)](){const _0x3f2238=_0x12b1f1;return this[_0x3f2238(0x180)][_0x3f2238(0x1a7)]();}async[_0x12b1f1(0x187)](_0x51b57d){const _0x513e9a=_0x12b1f1;_0x51b57d?!0x1===await this[_0x513e9a(0x198)][_0x513e9a(0x1a0)](_0x51b57d)&&(_0x1df096(_0x513e9a(0x1c7),{'conversation':this,'model':_0x51b57d}),_0x51b57d=(await this[_0x513e9a(0x198)][_0x513e9a(0x1b1)]())[0x0]):(_0x1df096(_0x513e9a(0x1e4),{'conversation':this}),_0x51b57d=(await this[_0x513e9a(0x198)][_0x513e9a(0x1b1)]())[0x0]),_0x51b57d['id']!==this[_0x513e9a(0x177)]?.['id']&&(this[_0x513e9a(0x177)]=_0x51b57d,this[_0x513e9a(0x17b)][_0x513e9a(0x1db)](),this[_0x513e9a(0x190)](_0x513e9a(0x19f),{'selectedModel':_0x51b57d}));}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x2a1f99=_0x37c0;(function(_0x80cc6f,_0x45b346){var _0x29bd2b=_0x37c0,_0x37a873=_0x80cc6f();while(!![]){try{var _0x1fa11a=-parseInt(_0x29bd2b(0x172))/0x1+-parseInt(_0x29bd2b(0x179))/0x2*(-parseInt(_0x29bd2b(0x185))/0x3)+-parseInt(_0x29bd2b(0x17c))/0x4*(parseInt(_0x29bd2b(0x17b))/0x5)+parseInt(_0x29bd2b(0x175))/0x6+-parseInt(_0x29bd2b(0x17a))/0x7+parseInt(_0x29bd2b(0x173))/0x8+parseInt(_0x29bd2b(0x178))/0x9*(-parseInt(_0x29bd2b(0x181))/0xa);if(_0x1fa11a===_0x45b346)break;else _0x37a873['push'](_0x37a873['shift']());}catch(_0x20b387){_0x37a873['push'](_0x37a873['shift']());}}}(_0x50ff,0xf0bc2));import{AICapabilities as _0x58edab}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x5914ae}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x22dca3}from'./aichatcontext.js';function _0x37c0(_0x14e2dd,_0x59cc49){var _0x50ffdc=_0x50ff();return _0x37c0=function(_0x37c0d3,_0x4f21be){_0x37c0d3=_0x37c0d3-0x170;var _0x373dec=_0x50ffdc[_0x37c0d3];return _0x373dec;},_0x37c0(_0x14e2dd,_0x59cc49);}export class AIChatInteraction extends _0x5914ae{[_0x2a1f99(0x187)];[_0x2a1f99(0x174)];[_0x2a1f99(0x176)]=new Map();[_0x2a1f99(0x171)];[_0x2a1f99(0x17d)];constructor(_0x37e0bc){var _0x2e28be=_0x2a1f99;super(_0x37e0bc),this[_0x2e28be(0x174)]=_0x37e0bc[_0x2e28be(0x174)],this[_0x2e28be(0x176)]=_0x37e0bc[_0x2e28be(0x176)],this[_0x2e28be(0x186)]=_0x37e0bc[_0x2e28be(0x186)],this[_0x2e28be(0x187)]=_0x37e0bc[_0x2e28be(0x187)],this[_0x2e28be(0x171)]=_0x37e0bc[_0x2e28be(0x171)],this[_0x2e28be(0x17d)]=_0x37e0bc[_0x2e28be(0x17d)];}async[_0x2a1f99(0x182)](){var _0x2d7814=_0x2a1f99;return this[_0x2d7814(0x170)][_0x2d7814(0x177)]({'message':this[_0x2d7814(0x187)],'conversationId':this[_0x2d7814(0x174)],'parts':_0x22dca3[_0x2d7814(0x17f)](this[_0x2d7814(0x176)]),'capabilities':_0x58edab[_0x2d7814(0x183)](this[_0x2d7814(0x186)]),'model':this[_0x2d7814(0x171)],'quickActionData':this[_0x2d7814(0x17d)]});}[_0x2a1f99(0x17e)](){var _0x413d1c=_0x2a1f99;return this[_0x413d1c(0x176)][_0x413d1c(0x184)](_0x413d1c(0x180));}}function _0x50ff(){var _0x45637d=['model','91587jqgiPT','10808808wCFiAZ','conversationId','8566782jPGvCI','contextItems','queryAssistant','18wBzNQH','3072398RIDuEz','6137628znueVk','53590zUbjZu','484RsZhcX','quickActionData','getDocumentContext','mapContextItemsToRequestData','current-document','5318890RSiScB','sendRequest','getCapabilitiesRequestData','get','3CAsyFD','capabilities','userMessage','connector'];_0x50ff=function(){return _0x45637d;};return _0x50ff();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5b279b=_0x2ed9;function _0x1547(){const _0x40f4b3=['3gWYXct','filter','getAll','values','84gZciCo','sort','13892090HxlfjJ','1147835TfQoqx','6164816TXsSCh','capabilities','5763231BLeTsi','109256vwMWbq','enabled','8399544iBHGuR','555232PQWrGD','length','12oOLdeT'];_0x1547=function(){return _0x40f4b3;};return _0x1547();}(function(_0x44b7dd,_0x4ec08a){const _0x138620=_0x2ed9,_0x243f3c=_0x44b7dd();while(!![]){try{const _0x413cd0=-parseInt(_0x138620(0x15d))/0x1*(-parseInt(_0x138620(0x15a))/0x2)+-parseInt(_0x138620(0x161))/0x3*(parseInt(_0x138620(0x157))/0x4)+parseInt(_0x138620(0x153))/0x5*(-parseInt(_0x138620(0x15c))/0x6)+-parseInt(_0x138620(0x154))/0x7+parseInt(_0x138620(0x159))/0x8+-parseInt(_0x138620(0x156))/0x9+parseInt(_0x138620(0x163))/0xa;if(_0x413cd0===_0x4ec08a)break;else _0x243f3c['push'](_0x243f3c['shift']());}catch(_0x113629){_0x243f3c['push'](_0x243f3c['shift']());}}}(_0x1547,0x80ab3));import{AIModels as _0x189048}from'../../aicore/model/aimodels.js';function _0x2ed9(_0xdbca87,_0x2f692a){const _0x1547a1=_0x1547();return _0x2ed9=function(_0x2ed984,_0xa4b08c){_0x2ed984=_0x2ed984-0x153;let _0x45ec49=_0x1547a1[_0x2ed984];return _0x45ec49;},_0x2ed9(_0xdbca87,_0x2f692a);}export class AIChatModels extends _0x189048{async[_0x5b279b(0x15f)](){const _0x531f80=_0x5b279b;return(await super[_0x531f80(0x15f)]())[_0x531f80(0x162)]((_0x4b2fb7,_0x5a35a4)=>{const _0x2cbb7a=_0x531f80,_0x428f24=Object[_0x2cbb7a(0x160)](_0x4b2fb7[_0x2cbb7a(0x155)])[_0x2cbb7a(0x15e)](_0x22f76d=>_0x22f76d[_0x2cbb7a(0x158)])[_0x2cbb7a(0x15b)];return Object[_0x2cbb7a(0x160)](_0x5a35a4[_0x2cbb7a(0x155)])[_0x2cbb7a(0x15e)](_0x271d30=>_0x271d30[_0x2cbb7a(0x158)])[_0x2cbb7a(0x15b)]-_0x428f24;});}}
|