@ckeditor/ckeditor5-ai 47.0.0-alpha.7 → 47.0.0-alpha.8
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 +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/be.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.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-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/gu.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/hy.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/jv.js +1 -1
- package/build/translations/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.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/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.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/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.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/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.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-editor.css +93 -5
- package/dist/index.css +118 -5
- package/dist/index.js +4 -4
- 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/af.po +224 -0
- package/lang/translations/ar.po +232 -0
- package/lang/translations/ast.po +224 -0
- package/lang/translations/az.po +224 -0
- package/lang/translations/be.po +226 -0
- package/lang/translations/bg.po +224 -0
- package/lang/translations/bn.po +224 -0
- package/lang/translations/bs.po +226 -0
- package/lang/translations/ca.po +224 -0
- package/lang/translations/cs.po +226 -0
- package/lang/translations/da.po +224 -0
- package/lang/translations/de-ch.po +224 -0
- package/lang/translations/de.po +224 -0
- package/lang/translations/el.po +224 -0
- package/lang/translations/en-au.po +224 -0
- package/lang/translations/en-gb.po +224 -0
- package/lang/translations/en.po +224 -0
- package/lang/translations/eo.po +224 -0
- package/lang/translations/es-co.po +224 -0
- package/lang/translations/es.po +224 -0
- package/lang/translations/et.po +224 -0
- package/lang/translations/eu.po +224 -0
- package/lang/translations/fa.po +222 -0
- package/lang/translations/fi.po +224 -0
- package/lang/translations/fr.po +224 -0
- package/lang/translations/gl.po +224 -0
- package/lang/translations/gu.po +224 -0
- package/lang/translations/he.po +224 -0
- package/lang/translations/hi.po +224 -0
- package/lang/translations/hr.po +226 -0
- package/lang/translations/hu.po +224 -0
- package/lang/translations/hy.po +224 -0
- package/lang/translations/id.po +222 -0
- package/lang/translations/it.po +224 -0
- package/lang/translations/ja.po +222 -0
- package/lang/translations/jv.po +224 -0
- package/lang/translations/kk.po +224 -0
- package/lang/translations/km.po +222 -0
- package/lang/translations/kn.po +224 -0
- package/lang/translations/ko.po +222 -0
- package/lang/translations/ku.po +224 -0
- package/lang/translations/lt.po +226 -0
- package/lang/translations/lv.po +226 -0
- package/lang/translations/ms.po +222 -0
- package/lang/translations/nb.po +224 -0
- package/lang/translations/ne.po +224 -0
- package/lang/translations/nl.po +224 -0
- package/lang/translations/no.po +224 -0
- package/lang/translations/oc.po +224 -0
- package/lang/translations/pl.po +226 -0
- package/lang/translations/pt-br.po +224 -0
- package/lang/translations/pt.po +224 -0
- package/lang/translations/ro.po +226 -0
- package/lang/translations/ru.po +226 -0
- package/lang/translations/si.po +224 -0
- package/lang/translations/sk.po +226 -0
- package/lang/translations/sl.po +228 -0
- package/lang/translations/sq.po +224 -0
- package/lang/translations/sr-latn.po +226 -0
- package/lang/translations/sr.po +226 -0
- package/lang/translations/sv.po +224 -0
- package/lang/translations/th.po +222 -0
- package/lang/translations/ti.po +224 -0
- package/lang/translations/tk.po +224 -0
- package/lang/translations/tr.po +224 -0
- package/lang/translations/tt.po +222 -0
- package/lang/translations/ug.po +222 -0
- package/lang/translations/uk.po +226 -0
- package/lang/translations/ur.po +224 -0
- package/lang/translations/uz.po +224 -0
- package/lang/translations/vi.po +222 -0
- package/lang/translations/zh-cn.po +222 -0
- package/lang/translations/zh.po +222 -0
- 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.d.ts +12 -4
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatcontroller.d.ts +0 -1
- package/src/aichat/aichatcontroller.js +1 -1
- package/src/aichat/aichatui.d.ts +0 -1
- package/src/aichat/aichatui.js +1 -1
- package/src/aichat/model/aichatcontext.d.ts +1 -227
- package/src/aichat/model/aichatcontext.js +1 -1
- package/src/aichat/model/aichatconversation.js +1 -1
- package/src/aichat/model/aichatinteraction.d.ts +3 -0
- package/src/aichat/model/aichatinteraction.js +1 -1
- package/src/aichat/model/aichatmodels.d.ts +0 -30
- 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/aichatresourcelistitemview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourceslistview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesview.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.d.ts +0 -1
- package/src/aichathistory/aichathistorycontroller.js +1 -1
- package/src/aichathistory/aichathistoryui.d.ts +0 -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 +1 -1
- 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/aiconfig.d.ts +47 -9
- package/src/aicore/aiconnector.d.ts +2 -3
- package/src/aicore/aiconnector.js +1 -1
- package/src/aicore/aiediting.d.ts +0 -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/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.d.ts +0 -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.d.ts +1 -0
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
- package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
- package/src/aiquickactions/aiquickactions.d.ts +164 -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.d.ts +0 -49
- 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.d.ts +0 -1
- package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
- package/src/aireviewmode/aireviewmode.d.ts +29 -0
- package/src/aireviewmode/aireviewmode.js +1 -1
- package/src/aireviewmode/aireviewmodecontroller.d.ts +0 -1
- package/src/aireviewmode/aireviewmodecontroller.js +1 -1
- package/src/aireviewmode/aireviewmodeediting.d.ts +1 -2
- package/src/aireviewmode/aireviewmodeediting.js +1 -1
- package/src/aireviewmode/aireviewmodeui.d.ts +0 -1
- package/src/aireviewmode/aireviewmodeui.js +1 -1
- package/src/aireviewmode/model/aireviewcheck.d.ts +0 -1
- package/src/aireviewmode/model/aireviewcheck.js +1 -1
- package/src/aireviewmode/model/aireviewcheckcustom.d.ts +0 -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.d.ts +0 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewmodels.js +1 -1
- package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +0 -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/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/aireviewmodeformamanager.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.d.ts +6 -16
- 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/index.js +1 -1
- package/theme/aichat/aichat.css +1 -0
- package/theme/aichat/aichatfeed.css +39 -0
- package/theme/aieditorintegration/aitogglebutton.css +23 -0
- package/theme/aiquickactions/aiquickactions.css +23 -4
- package/theme/aireviewmode/aireviewmode.css +23 -0
- package/theme/common/aibutton.css +1 -1
- package/theme/common/aitrackchanges.css +13 -0
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x465c9f=_0x1403;(function(_0x5365bc,_0x3dc8d2){const _0xb8fc2c=_0x1403,_0x2ef639=_0x5365bc();while(!![]){try{const _0x510358=-parseInt(_0xb8fc2c(0x1a5))/0x1*(parseInt(_0xb8fc2c(0x148))/0x2)+parseInt(_0xb8fc2c(0x239))/0x3+-parseInt(_0xb8fc2c(0x21c))/0x4*(parseInt(_0xb8fc2c(0x15f))/0x5)+-parseInt(_0xb8fc2c(0x103))/0x6*(parseInt(_0xb8fc2c(0x23c))/0x7)+parseInt(_0xb8fc2c(0x167))/0x8*(parseInt(_0xb8fc2c(0xf6))/0x9)+parseInt(_0xb8fc2c(0x210))/0xa*(parseInt(_0xb8fc2c(0x165))/0xb)+parseInt(_0xb8fc2c(0x192))/0xc;if(_0x510358===_0x3dc8d2)break;else _0x2ef639['push'](_0x2ef639['shift']());}catch(_0x38732a){_0x2ef639['push'](_0x2ef639['shift']());}}}(_0x5dd1,0xc1ecd));import{ContextPlugin as _0x431eb1,Editor as _0x413ee5}from'ckeditor5/src/core.js';import{CKEditorError as _0x4f8449,logError as _0x5e1962,scrollViewportToShowTarget as _0x425377,uid as _0x18f48e}from'ckeditor5/src/utils.js';import{AIConnector as _0x3835d3}from'../aicore/aiconnector.js';import{AITabs as _0x351d7e}from'../aitabs/aitabs.js';import{AIChatConversation as _0x3dbaf9}from'./model/aichatconversation.js';import{getTranslation as _0x206cf5}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x3d0f78}from'../aicore/aiediting.js';import{AIChatModels as _0x265514}from'./model/aichatmodels.js';import{getEditorFromContext as _0xcf3e41}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x2e3a0e,DATA_ID_MODEL_ATTRIBUTE as _0x37efa2}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x576c10}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x4b847d,getMinimalSelection as _0x32f874,getSuggestionPartsFromReply as _0x3f67f2}from'../aicore/utils/getsuggestionpartsfromreply.js';function _0x1403(_0x6585cb,_0xd6d152){const _0x5dd1bc=_0x5dd1();return _0x1403=function(_0x14038e,_0x3af8db){_0x14038e=_0x14038e-0xe9;let _0x509db1=_0x5dd1bc[_0x14038e];return _0x509db1;},_0x1403(_0x6585cb,_0xd6d152);}import{ModelRange as _0x5d6e1f,_DetachOperation as _0x3fb93a}from'ckeditor5/src/engine.js';import{findOne as _0x50919c,getAttribute as _0xba5a54,serialize as _0x272331,Document as _0x310a2a,findByAttribute as _0x4920f8}from'../aicore/utils/htmlparser.js';import{IconAI as _0x2c9745}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x2aa5ee}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x575363}from'../aiballoon/aiballoon.js';function _0x5dd1(){const _0x5d461b=['setLoadingMessage','_batchToChanges','getRoot','split','modification-delta','source','change','abortPromptStream','toViewRange','addDocumentToContext','dislike','_toggleWebSearch','673002JANsEz','version','commands','4543GzZXGc','applySuggestion','nextSibling','resources','contextItems','rejectSuggestion','_removeAISelectionMarkers','changes','mouseLeaveSuggestion','init','main','resize','isOpen','interactionFinished','ai-conversation-','stop','current-document','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','markers','replies','getPath','rejected','6034536lTMMwq','pending','addFilesToContext','Failed\x20to\x20load\x20conversation','addSelectionToChatContext','_updateRatings','full','open','view','mapper','_applySuggestion','TrackChangesEditing','config','13866boxGFT','ai-request-aborted','stopListening','removeFromContext','_previewedChangeGroup','AI_CHAT_UNTITLED_CONVERSATION','ai-chat-source-resources-load-failed','_integrateEditor','addFeedItemError','_handleStartConversation','resizeTabs','toLocaleLowerCase','redo','set','setSelectedModel','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','getGroupId','startInteraction','collaboration.channelId','provider','setContextItemLoading','indexes','addContextOptionsChanged','viewRangeToDom','children','isInContext','ai-chat-resource-load-failed','getDiff','from','availableModels','uid','_scrollToSuggestionRange','remove','end','history','_startConversationSafely','_aiConnector','length','new','getRanges','removed','sourcePosition','removeFeedInteraction','setIsMaximized','showFakeVisualSelection','contextItemRemoved','message','ai-chat-context-invalid-data','disableControls','data-id','showNext','interactionCreated','_aiChatModels','removeMarker','resetConversationTitle','AI_CHAT_GENERIC_ERROR','sourceId','get','clearPendingContextUI','updateResourceState','createPositionFromPath','AITabs','type','isLoading','toggleLoadingSkeleton','_aiEditing','_getDocumentRangeForReplyChanges','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','setChangeGroupState','482SUERqJ','load','ai-chat-conversation-init-failed','context','uploadProgressChanged','ai-chat-url-upload-failed','forEach','partIndex','messageId','parse','upsertAIChatRating','populateSourceResourceBalloon','log','sourceResourcesLoaded','isCurrentDocumentInConversation','error','isDocumentOperation','_insertSuggestion','ai-chat-controller-no-active-conversation','ready','updateFeedItemAIReplySuggestionContent','capabilitiesUpdated','resourceId','4928835wBOose','showDiff','ai.chat.context','selection','getAttribute','Undo','341ZrMxkD','baseVersion','16HagWjg','loadConversation','getTransformedByOperation','lastInteraction','data','setConversationTitle','AI_CHAT_RESOURCE_LOAD_FAILED','getSelectionText','getMarkersGroup','activateTab','cloneNode','dialogClosed','sendUserMessage','getReply','addResourceToContext','editing','closeSourceResourceBalloon','sendMessage','streaming','like','AI_CHAT_UNABLE_TO_START_CONVERSATION','AIEditing','indexOf','addContextItem','pluginName','toggleWebSearch','contextItem','name','Liked\x20response','find','AIChatController','isDisabled','isCurrentDocumentInContext','contextItemAdded','accepted','addFileToContext','map','addFeedInteractionHeader','contextItemLoadingEnded','rootName','addOperation','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','addFeedItemAIReply','28262100apzXcM','startConversation','scrollFeedToSuggestion','filter','text-delta','Disliked\x20response','removeContextItem','setModel','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','replyId','clearConversationContextUI','updateContent','getFirstRange','sources','documentContextContent','ai.chat.models.displayedModels','createConversation','_showConversationHistory','createPositionAt','5273uzFnKF','root','toggleSuggestionDisplayMode','isOfficialPlugin','_flushLastInteractionUI','locale','handleUserInteraction','conversationInitialized','_balloonShowDiff','insertSuggestion','getChildAtOffset','chat','isUploadInProgress','updateCurrentDocumentInContext','static','ai-chat-conversation-start-failed','has','add','setConversationContext','model','alignToTop','Showing\x20conversation\x20history...','resourceStateChanged','push','getOperations','resetMessageInput','addFeedItemStaticMessage','listenTo','replyCreated','stopInteraction','replyChangeGroupStateUpdated','query','state','range','string','addCurrentDocumentToContext','webSearchFinished','webSearchStarted','replyContentUpdated','options','_setIsMaximized','howMany','editors','addFeedItemAISuggestion','updateCapabilities','loadSourceResources','showChangeInText','showPrevious','_handleUIUserMessage','DocumentCompare','AIChatUI','reasoningFinished','_removeFromContext','resource','toString','interactionDestroyed','toggleReasoning','getChildren','updateConversationTitle','addUrlToContext','updateFeedItemAIReplyContent','uiId','reasoningStarted','applyOperation','removeSelectionFromContext','_updateReplyContent','_stopLastInteraction','maxOffset','focusPromptInput','addFeedItemUserMessage','plugins','handleRemovedConversation','document','createRange','mouseOverSuggestion','_createFromRanges','AI_BALLOON_HEADER_TITLE','updateFeedItemAIReplySources','selectModel','interactionStarted','_filterModels','ai-chat-file-upload-failed','requires','AI_CHAT_CONTEXT_INVALID_DATA','getInteractionAndReplyById','setIsUploadInProgress','AI_CHAT_ABORTED_MESSAGE','updateFeedItemAIReplySuggestionPartState','setFeedItemRenderingStrategy','unshift','ai-chat-missing-channel-id','getDocumentData','setAddContextOptions','domConverter','removeSelectionFromChatContext','activeConversation','path','interactionId','_aiChatUi','_toggleReasoning','ai-chat-controller-mouse-over','getInteraction','_logError','enableControls','hideFakeVisualSelection','_applyOperationsAsSuggestions','revert','203290yUmNYl','modelSelected','getChild','content','undo','isStarted','isPremiumPlugin','_openBalloonFor','$graveyard','afterInit','start','selectedModel','4aywoLf','contextSent','ai-chat-context-unsupported-type','finishInteraction','anchorId','slice','addSelectionToContext','resizedTabs','AIConnector','node','batch','getDocumentContext','ai.chat.models.defaultModelId','changeGroups','delete','startsWith','close'];_0x5dd1=function(){return _0x5d461b;};return _0x5dd1();}export class AIChatController extends _0x431eb1{[_0x465c9f(0x144)];[_0x465c9f(0x127)];[_0x465c9f(0x207)];[_0x465c9f(0x137)];[_0x465c9f(0x22e)]=new Map();[_0x465c9f(0x107)]=null;[_0x465c9f(0x1ad)]=!0x1;static get[_0x465c9f(0x1f7)](){return[_0x3835d3,_0x575363,_0x2e3a0e];}static get[_0x465c9f(0x17f)](){const _0x295c74=_0x465c9f;return _0x295c74(0x185);}static get[_0x465c9f(0x1a8)](){return!0x0;}static get[_0x465c9f(0x216)](){return!0x0;}[_0x465c9f(0xe9)](){const _0x27a1a5=_0x465c9f;this[_0x27a1a5(0x127)]=this[_0x27a1a5(0x14b)][_0x27a1a5(0x1eb)][_0x27a1a5(0x13c)](_0x27a1a5(0x224)),this[_0x27a1a5(0x207)]=this[_0x27a1a5(0x14b)][_0x27a1a5(0x1eb)][_0x27a1a5(0x13c)](_0x27a1a5(0x1d7)),this[_0x27a1a5(0x144)]=this[_0x27a1a5(0x14b)][_0x27a1a5(0x1eb)][_0x27a1a5(0x13c)](_0x27a1a5(0x17c)),this[_0x27a1a5(0x137)]=new _0x265514({'connector':this[_0x27a1a5(0x127)]});const _0x5e4fba=this[_0x27a1a5(0x14b)][_0x27a1a5(0x1eb)][_0x27a1a5(0x13c)](_0x27a1a5(0x140));this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x193),()=>{const _0x3d9d1d=_0x27a1a5;this[_0x3d9d1d(0x126)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x173),(_0x47c3fc,_0x55992c)=>{const _0x3fe1ab=_0x27a1a5;this[_0x3fe1ab(0x1d5)]({'userMessage':_0x55992c});}),this[_0x27a1a5(0x1c0)](_0x5e4fba,_0x27a1a5(0x223),(_0x35fe82,_0x474085)=>{const _0x4d21a2=_0x27a1a5;this[_0x4d21a2(0x1cd)](_0x474085);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x10d),()=>{const _0x2894a1=_0x27a1a5;_0x5e4fba[_0x2894a1(0xeb)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x234),async()=>{const _0x39faf0=_0x27a1a5;await this[_0x39faf0(0x1e7)](),await this[_0x39faf0(0x1a9)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x236),()=>{const _0x39e128=_0x27a1a5;this[_0x39e128(0x204)]?.[_0x39e128(0x1c8)](_0x206cf5(this[_0x39e128(0x14b)][_0x39e128(0x1aa)],_0x39e128(0xf1)));}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x18a),(_0x2ea068,_0x494596)=>{const _0x3814f4=_0x27a1a5;this[_0x3814f4(0x204)]?.[_0x3814f4(0xf8)](Array[_0x3814f4(0x11f)](_0x494596));}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1e0),(_0x314d0a,_0x158d24)=>{const _0x151f3b=_0x27a1a5;this[_0x151f3b(0x204)]?.[_0x151f3b(0x1e0)](_0x158d24);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x175),(_0x5ed8f6,_0x4cbfa0)=>{const _0xd753cc=_0x27a1a5;this[_0xd753cc(0x204)]?.[_0xd753cc(0x175)](_0x4cbfa0[_0xd753cc(0x232)],_0x4cbfa0[_0xd753cc(0x1da)]);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x198),(_0x4612d9,_0x387923)=>{const _0x19bb86=_0x27a1a5;this[_0x19bb86(0x1d9)](_0x387923);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1d2),(_0x36c478,_0x2bafe2)=>{const _0x58e514=_0x27a1a5;this[_0x58e514(0x204)]?.[_0x58e514(0x1d2)](_0x2bafe2[_0x58e514(0x13b)],_0x2bafe2[_0x58e514(0x1c4)],_0x2bafe2[_0x58e514(0x121)]);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x180),()=>{const _0x5dbc49=_0x27a1a5;this[_0x5dbc49(0x238)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1dd),()=>{const _0x475ab8=_0x27a1a5;this[_0x475ab8(0x208)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1f3),(_0x47e5c8,_0x537e06)=>{const _0x52212d=_0x27a1a5;this[_0x52212d(0x204)]?.[_0x52212d(0x199)](_0x537e06);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x17a),(_0x4f73f1,{replyId:_0x2d6a36})=>{const _0x2f5ac6=_0x27a1a5;console[_0x2f5ac6(0x154)](_0x2f5ac6(0x183),_0x2d6a36);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x237),(_0x56dc44,{replyId:_0x59cd87})=>{const _0x1035cc=_0x27a1a5;console[_0x1035cc(0x154)](_0x1035cc(0x197),_0x59cd87);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1ae),(_0x498075,_0x2a172a)=>{const _0x3eb5e8=_0x27a1a5;this[_0x3eb5e8(0x14b)][_0x3eb5e8(0x1eb)][_0x3eb5e8(0x13c)](_0x575363)[_0x3eb5e8(0x22c)](),this[_0x3eb5e8(0x159)](_0x2a172a);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1d3),(_0x30e816,{replyId:_0x4a4b16,partIndex:_0x4f2d5d})=>{const _0x29f5a4=_0x27a1a5;this[_0x29f5a4(0x1ad)]=this[_0x29f5a4(0x207)][_0x29f5a4(0x160)],this[_0x29f5a4(0x217)](_0x4a4b16,_0x4f2d5d);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1ef),(_0x531fde,{replyId:_0x360897,partIndex:_0x305303})=>{const _0x37e22c=_0x27a1a5,_0x2ee159=this[_0x37e22c(0x145)](_0x360897,_0x305303);_0x2ee159&&_0x37e22c(0x218)!=_0x2ee159[_0x37e22c(0x1c6)][_0x37e22c(0x1a6)][_0x37e22c(0x18e)]&&this[_0x37e22c(0x144)][_0x37e22c(0x12f)]([_0x2ee159[_0x37e22c(0x1c6)]],_0x37e22c(0x209));}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x244),()=>{const _0x340796=_0x27a1a5;this[_0x340796(0x144)][_0x340796(0x20d)](_0x340796(0x209));}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x23d),(_0xfb8144,_0x23bb6a)=>{const _0x12e4ba=_0x27a1a5;this[_0x12e4ba(0x14b)][_0x12e4ba(0x1eb)][_0x12e4ba(0x13c)](_0x575363)[_0x12e4ba(0x22c)](),this[_0x12e4ba(0x100)](_0x23bb6a);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1a7),async(_0x5c6841,_0x1633c7)=>{const _0x15a9a6=_0x27a1a5,{reply:_0x33353a}=this[_0x15a9a6(0x1f9)](_0x1633c7[_0x15a9a6(0x19b)]),_0x6fcde1=_0xcf3e41(this[_0x15a9a6(0x14b)]),_0x2d5cae=_0x3f67f2({'editor':_0x6fcde1,'changeGroups':_0x33353a[_0x15a9a6(0x229)],'documentContextContent':_0x33353a[_0x15a9a6(0x1a0)],'showDiff':_0x1633c7[_0x15a9a6(0x160)]});await this[_0x15a9a6(0x207)][_0x15a9a6(0x15c)]({'id':_0x33353a['id'],'parts':_0x2d5cae,'renderingStrategy':_0x15a9a6(0x1b3)});}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x241),(_0x23d083,{replyId:_0x1d04a5,partIndex:_0x392fc8})=>{const _0x34e6f3=_0x27a1a5;this[_0x34e6f3(0x107)]?.[_0x34e6f3(0x19b)]==_0x1d04a5&&this[_0x34e6f3(0x107)]?.[_0x34e6f3(0x14f)]==_0x392fc8&&this[_0x34e6f3(0x14b)][_0x34e6f3(0x1eb)][_0x34e6f3(0x13c)](_0x575363)[_0x34e6f3(0x22c)]();const {reply:_0xac16fa}=this[_0x34e6f3(0x1f9)](_0x1d04a5);_0xac16fa[_0x34e6f3(0x147)](_0x392fc8,_0x34e6f3(0xf5)),this[_0x34e6f3(0x144)][_0x34e6f3(0x20d)](_0x34e6f3(0x209));});}async[_0x465c9f(0x219)](){const _0xfa084e=_0x465c9f;this[_0xfa084e(0x14b)]instanceof _0x413ee5?this[_0xfa084e(0x10a)](this[_0xfa084e(0x14b)]):this[_0xfa084e(0x1c0)](this[_0xfa084e(0x14b)][_0xfa084e(0x1cf)],_0xfa084e(0x1b6),(_0x510a92,_0x203970)=>{const _0x3c0b56=_0xfa084e;_0x203970['on'](_0x3c0b56(0x15b),()=>{const _0x533c8c=_0x3c0b56;this[_0x533c8c(0x10a)](_0x203970);});}),await this[_0xfa084e(0x126)]();}[_0x465c9f(0x159)](_0x560a27){const _0x4195f9=_0x465c9f,_0x11d4e2=_0xcf3e41(this[_0x4195f9(0x14b)]);if(!_0x11d4e2[_0x4195f9(0x1eb)][_0x4195f9(0x1b5)](_0x4195f9(0x101)))return;const _0x20ff5f=this[_0x4195f9(0x14b)][_0x4195f9(0x1eb)][_0x4195f9(0x13c)](_0x4195f9(0x1d6)),{reply:_0x28c107,interaction:_0x456836}=this[_0x4195f9(0x1f9)](_0x560a27[_0x4195f9(0x19b)]),_0xf2b3d5=this[_0x4195f9(0x145)](_0x560a27[_0x4195f9(0x19b)],_0x560a27[_0x4195f9(0x14f)]),_0x579b6c=void 0x0!==_0x560a27[_0x4195f9(0x14f)]?[_0x28c107[_0x4195f9(0x229)][_0x560a27[_0x4195f9(0x14f)]]]:_0x28c107[_0x4195f9(0x229)][_0x4195f9(0x195)](_0x2850f7=>_0x4195f9(0xf7)==_0x2850f7[_0x4195f9(0x1c5)]),_0x34dbd1=_0x579b6c[_0x4195f9(0x18b)](_0xc8390f=>_0x28c107[_0x4195f9(0x229)][_0x4195f9(0x17d)](_0xc8390f));_0x34dbd1[_0x4195f9(0x14e)](_0x283315=>_0x28c107[_0x4195f9(0x147)](_0x283315,_0x4195f9(0x189)));const _0x3e7780=_0x576c10({'editor':_0x11d4e2,'reply':_0x28c107,'interaction':_0x456836,'groups':_0x579b6c,'transform':!0x0,'documentCompare':_0x20ff5f,'documentCompareOptions':{'anchor':_0x4195f9(0xea),'markDeletions':!0x0}});let _0x3e73fe;_0xf2b3d5&&this[_0x4195f9(0x122)](_0xf2b3d5[_0x4195f9(0x1c6)]),_0x11d4e2[_0x4195f9(0x1b8)][_0x4195f9(0x233)](_0x3f06b2=>{const _0x3e18c7=_0x4195f9;_0x3e73fe=_0x3f06b2[_0x3e18c7(0x226)],_0x11d4e2[_0x3e18c7(0x1eb)][_0x3e18c7(0x13c)](_0x3e18c7(0x101))[_0x3e18c7(0x20e)](_0x3e7780),this[_0x3e18c7(0x144)][_0x3e18c7(0x20d)](_0x3e18c7(0x209));}),this[_0x4195f9(0x22e)][_0x4195f9(0x110)](_0x3e73fe,{'interactionId':_0x456836['id'],'replyId':_0x28c107['id'],'indexes':_0x34dbd1[_0x4195f9(0x221)]()}),this[_0x4195f9(0xfb)](_0x28c107);}[_0x465c9f(0x100)](_0x128797){const _0x227c27=_0x465c9f,_0x337e9e=_0xcf3e41(this[_0x227c27(0x14b)]),_0x45d07a=this[_0x227c27(0x14b)][_0x227c27(0x1eb)][_0x227c27(0x13c)](_0x2e3a0e),{reply:_0x1dadfb,interaction:_0x56b385}=this[_0x227c27(0x1f9)](_0x128797[_0x227c27(0x19b)]),_0x5172a7=this[_0x227c27(0x145)](_0x128797[_0x227c27(0x19b)],_0x128797[_0x227c27(0x14f)]),_0x1f636f=void 0x0!==_0x128797[_0x227c27(0x14f)]?[_0x1dadfb[_0x227c27(0x229)][_0x128797[_0x227c27(0x14f)]]]:_0x1dadfb[_0x227c27(0x229)][_0x227c27(0x195)](_0x5cbfc7=>_0x227c27(0xf7)==_0x5cbfc7[_0x227c27(0x1c5)]),_0x55abc9=_0x1f636f[_0x227c27(0x18b)](_0x1dc135=>_0x1dadfb[_0x227c27(0x229)][_0x227c27(0x17d)](_0x1dc135));_0x55abc9[_0x227c27(0x14e)](_0xe3bd86=>_0x1dadfb[_0x227c27(0x147)](_0xe3bd86,_0x227c27(0x189)));const _0xa7a57f=_0x576c10({'editor':_0x337e9e,'reply':_0x1dadfb,'interaction':_0x56b385,'groups':_0x1f636f,'transform':!0x0,'documentCompare':_0x45d07a,'documentCompareOptions':{'anchor':_0x227c27(0xea),'markDeletions':!0x1}});let _0x21bb04;_0x5172a7&&this[_0x227c27(0x122)](_0x5172a7[_0x227c27(0x1c6)]),_0x337e9e[_0x227c27(0x1b8)][_0x227c27(0x233)](_0xe4a82b=>{const _0x3a7340=_0x227c27;_0x21bb04=_0xe4a82b[_0x3a7340(0x226)];for(const _0x1ed0e6 of _0xa7a57f)_0x1ed0e6[_0x3a7340(0x166)]=_0x337e9e[_0x3a7340(0x1b8)][_0x3a7340(0x1ed)][_0x3a7340(0x23a)],_0xe4a82b[_0x3a7340(0x226)][_0x3a7340(0x18f)](_0x1ed0e6),_0x337e9e[_0x3a7340(0x1b8)][_0x3a7340(0x1e4)](_0x1ed0e6);}),this[_0x227c27(0x22e)][_0x227c27(0x110)](_0x21bb04,{'interactionId':_0x56b385['id'],'replyId':_0x1dadfb['id'],'indexes':_0x55abc9[_0x227c27(0x221)]()}),this[_0x227c27(0xfb)](_0x1dadfb);}[_0x465c9f(0x217)](_0x1917c9,_0xdc8bbc){const _0x15714=_0x465c9f,_0x3435f9=_0xcf3e41(this[_0x15714(0x14b)]),_0x4f949b=this[_0x15714(0x145)](_0x1917c9,_0xdc8bbc),_0x2fc1aa=this[_0x15714(0x14b)][_0x15714(0x1eb)][_0x15714(0x13c)](_0x575363);if(!_0x4f949b)return void _0x2fc1aa[_0x15714(0x22c)]();const {range:_0x13407b,currentIndex:_0x3adf60,previousIndex:_0x9a958c,nextIndex:_0x1c2f32}=_0x4f949b;if(this[_0x15714(0x107)]?.[_0x15714(0x19b)]==_0x1917c9&&this[_0x15714(0x107)]?.[_0x15714(0x14f)]==_0x3adf60)return;this[_0x15714(0x107)]={'replyId':_0x1917c9,'partIndex':_0x3adf60};const _0x3e7b98=new _0x2aa5ee(_0x3435f9[_0x15714(0x1aa)],{'showDiff':this[_0x15714(0x1ad)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x15714(0xfc)},'hideHeader':!0x0}),{reply:_0x4858ed}=this[_0x15714(0x1f9)](_0x1917c9),_0x1af057=_0x3f67f2({'editor':_0x3435f9,'changeGroups':[_0x4858ed[_0x15714(0x229)][_0x3adf60]],'documentContextContent':_0x4858ed[_0x15714(0x1a0)],'showDiff':this[_0x15714(0x1ad)]});_0x3e7b98[_0x15714(0x19d)]({'parts':_0x1af057,'renderingStrategy':_0x15714(0x1b3)});const _0x2b258e=_0x3adf60!==_0x9a958c;this[_0x15714(0x122)](_0x13407b,!0x0),_0x2fc1aa[_0x15714(0xfd)]({'index':_0x3adf60,'title':_0x206cf5(this[_0x15714(0x14b)][_0x15714(0x1aa)],_0x15714(0x1f1),(_0x3adf60+0x1)[_0x15714(0x1db)]()),'icon':_0x2c9745,'mainView':_0x3e7b98,'showRotator':_0x2b258e,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x13407b]}),this[_0x15714(0x207)][_0x15714(0x194)](_0x1917c9,_0x3adf60),this[_0x15714(0x1c0)](_0x3e7b98,_0x15714(0x1a7),(_0x3abf56,{showDiff:_0x37f26e})=>{const _0x369176=_0x15714;this[_0x369176(0x1ad)]=_0x37f26e;const {reply:_0x3ae806}=this[_0x369176(0x1f9)](_0x1917c9),_0x52a48c=_0x3f67f2({'editor':_0x3435f9,'changeGroups':[_0x3ae806[_0x369176(0x229)][_0x3adf60]],'documentContextContent':_0x3ae806[_0x369176(0x1a0)],'showDiff':_0x37f26e});_0x3e7b98[_0x369176(0x19d)]({'parts':_0x52a48c,'renderingStrategy':_0x369176(0x1b3)});}),this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x23d),()=>{const _0x359b26=_0x15714;this[_0x359b26(0x100)]({'replyId':_0x1917c9,'partIndex':_0x3adf60}),_0x2b258e?this[_0x359b26(0x217)](_0x1917c9,_0x1c2f32):_0x2fc1aa[_0x359b26(0x22c)]();}),this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x1ae),()=>{const _0x5b1c8c=_0x15714;this[_0x5b1c8c(0x159)]({'replyId':_0x1917c9,'partIndex':_0x3adf60}),_0x2b258e?this[_0x5b1c8c(0x217)](_0x1917c9,_0x1c2f32):_0x2fc1aa[_0x5b1c8c(0x22c)]();}),_0x2b258e&&(this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x135),()=>{const _0x3dd5e1=_0x15714;this[_0x3dd5e1(0x217)](_0x1917c9,_0x1c2f32);}),this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x1d4),()=>{const _0xea853b=_0x15714;this[_0xea853b(0x217)](_0x1917c9,_0x9a958c);})),this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x172),()=>{const _0x3915e4=_0x15714;this[_0x3915e4(0x105)](_0x2fc1aa),this[_0x3915e4(0x105)](_0x3e7b98),this[_0x3915e4(0x107)]=null;});}[_0x465c9f(0x145)](_0x323968,_0x748c52){const _0xa6ae4=_0x465c9f,_0x567af1=_0xcf3e41(this[_0xa6ae4(0x14b)]),{reply:_0xbf929e,interaction:_0x3e0458}=this[_0xa6ae4(0x1f9)](_0x323968),_0x503984=_0xbf929e[_0xa6ae4(0x229)][_0xa6ae4(0x195)](_0x470f13=>_0xa6ae4(0xf7)==_0x470f13[_0xa6ae4(0x1c5)]),_0x336c44=_0x503984[_0xa6ae4(0x18b)](_0x2fda44=>_0xbf929e[_0xa6ae4(0x229)][_0xa6ae4(0x17d)](_0x2fda44));void 0x0===_0x748c52&&(_0x748c52=_0x336c44[0x0]);const _0x3d890e=_0x336c44[_0xa6ae4(0x17d)](_0x748c52);if(-0x1==_0x3d890e)return null;const _0x3b051d=0x0==_0x3d890e?_0x336c44[_0x336c44[_0xa6ae4(0x128)]-0x1]:_0x336c44[_0x3d890e-0x1],_0x48614f=_0x3d890e==_0x336c44[_0xa6ae4(0x128)]-0x1?_0x336c44[0x0]:_0x336c44[_0x3d890e+0x1],_0x2ccfe4=_0x503984[_0x3d890e],_0xb0bb56=new _0x310a2a([]),_0x2e3999=new _0x310a2a([]);for(const _0x466283 of _0x2ccfe4[_0xa6ae4(0x243)])if(_0xa6ae4(0x12b)!=_0x466283[_0xa6ae4(0x141)]&&_0x2e3999[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x466283[_0xa6ae4(0x225)][_0xa6ae4(0x171)](!0x0)),_0xa6ae4(0x129)!=_0x466283[_0xa6ae4(0x141)]){const _0x3a1186=_0x50919c(_0x573db5=>_0xba5a54(_0x573db5,_0xa6ae4(0x134))==_0x466283['id'],_0xbf929e[_0xa6ae4(0x1a0)],!0x0);_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x3a1186[_0xa6ae4(0x171)](!0x0));}if(0x0==_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x128)]){if(_0x2ccfe4[_0xa6ae4(0x243)][0x0][_0xa6ae4(0x220)]){const _0x4e6242=_0x4920f8(_0xa6ae4(0x134),_0x2ccfe4[_0xa6ae4(0x243)][0x0][_0xa6ae4(0x220)],_0xbf929e[_0xa6ae4(0x1a0)]);_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x1fe)](_0x4e6242[_0xa6ae4(0x171)](!0x0)),_0x2e3999[_0xa6ae4(0x11b)][_0xa6ae4(0x1fe)](_0x4e6242[_0xa6ae4(0x171)](!0x0)),_0x4e6242[_0xa6ae4(0x23e)]&&(_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x4e6242[_0xa6ae4(0x23e)][_0xa6ae4(0x171)](!0x0)),_0x2e3999[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x4e6242[_0xa6ae4(0x23e)][_0xa6ae4(0x171)](!0x0)));}else{const _0x38e8f1=_0xbf929e[_0xa6ae4(0x1a0)][_0xa6ae4(0x11b)][0x0];if(!_0x38e8f1)return null;_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x38e8f1[_0xa6ae4(0x171)](!0x0)),_0x2e3999[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x38e8f1[_0xa6ae4(0x171)](!0x0));}}const _0x239c9d=_0x3e0458[_0xa6ae4(0x227)](),_0x55346d=_0x567af1[_0xa6ae4(0x16b)][_0xa6ae4(0x151)](_0x239c9d[_0xa6ae4(0x213)]),_0xe3a51c=_0x272331(_0xb0bb56),_0x13e8a8=_0x567af1[_0xa6ae4(0x16b)][_0xa6ae4(0x151)](_0xe3a51c),_0x4acd12=_0x567af1[_0xa6ae4(0x16b)][_0xa6ae4(0x151)](_0xe3a51c),_0x167a03=_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1a4)](_0x13e8a8,0x0),_0x22f8df=_0x272331(_0x2e3999),_0x4e0700={'anchor':_0x167a03,'markDeletions':!0x1},_0x435115=_0x567af1[_0xa6ae4(0x1eb)][_0xa6ae4(0x13c)](_0x2e3a0e)[_0xa6ae4(0x11e)](_0xe3a51c,_0x22f8df,_0x4e0700)[_0xa6ae4(0x1bd)]();if(!_0x435115[_0xa6ae4(0x128)])return null;_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x233)](_0x337b93=>{const _0x1f92f6=_0xa6ae4;for(const _0x1a1e5b of _0x435115)if(_0x1f92f6(0x123)==_0x1a1e5b[_0x1f92f6(0x141)]){const _0x3f087a=_0x1a1e5b[_0x1f92f6(0x12c)],_0x387181=_0x1a1e5b[_0x1f92f6(0x1ce)],_0xc1cde9=new _0x3fb93a(_0x3f087a,_0x387181);_0x337b93[_0x1f92f6(0x226)][_0x1f92f6(0x18f)](_0xc1cde9),_0x567af1[_0x1f92f6(0x1b8)][_0x1f92f6(0x1e4)](_0xc1cde9);}else _0x1a1e5b[_0x1f92f6(0x166)]=null,_0x1a1e5b[_0x1f92f6(0x158)]=!0x1,_0x337b93[_0x1f92f6(0x226)][_0x1f92f6(0x18f)](_0x1a1e5b),_0x567af1[_0x1f92f6(0x1b8)][_0x1f92f6(0x1e4)](_0x1a1e5b);});const _0x3bd796=_0x32f874(_0x567af1,_0x435115,_0x13e8a8);_0x4b847d(_0x567af1[_0xa6ae4(0x1b8)],_0x3bd796);const _0x5544f9=_0x3bd796[_0xa6ae4(0x19e)]()[_0xa6ae4(0x21a)][_0xa6ae4(0x205)][_0xa6ae4(0x221)](),_0x3ff280=_0x3bd796[_0xa6ae4(0x19e)]()[_0xa6ae4(0x124)][_0xa6ae4(0x205)][_0xa6ae4(0x221)](),_0x38af7f=[];let _0xf33bd5=_0x13e8a8,_0x412f6e=_0x4acd12;for(let _0xdeed85=0x0;_0xdeed85<_0x3ff280[_0xa6ae4(0x128)];_0xdeed85++){const _0x59b11b=_0xf33bd5[_0xa6ae4(0x1e8)]-_0x3ff280[_0xdeed85];_0x38af7f[_0xdeed85]=_0x412f6e[_0xa6ae4(0x1e8)]-_0x59b11b,_0xf33bd5=_0xf33bd5[_0xa6ae4(0x1af)](_0x3ff280[_0xdeed85]),_0x412f6e=_0x412f6e[_0xa6ae4(0x1af)](_0x38af7f[_0xdeed85]);}const _0x105a99=_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ee)](_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x13f)](_0x4acd12,_0x5544f9),_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x13f)](_0x4acd12,_0x38af7f)),_0x1e145d=_0x4acd12[_0xa6ae4(0x212)](0x0)[_0xa6ae4(0x163)](_0x37efa2),_0x144228=Array[_0xa6ae4(0x11f)](_0x55346d[_0xa6ae4(0x1de)]())[_0xa6ae4(0x184)](_0x4497bb=>_0x4497bb[_0xa6ae4(0x163)](_0x37efa2)==_0x1e145d)[_0xa6ae4(0xf4)](),_0x23e9f4=_0x105a99[_0xa6ae4(0x21a)][_0xa6ae4(0x205)][_0xa6ae4(0x221)](),_0x3048e0=_0x105a99[_0xa6ae4(0x124)][_0xa6ae4(0x205)][_0xa6ae4(0x221)]();_0x23e9f4[0x0]=_0x144228[0x0]+_0x23e9f4[0x0],_0x3048e0[0x0]=_0x144228[0x0]+_0x3048e0[0x0];let _0x53ef60=_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ee)](_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x13f)](_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ed)][_0xa6ae4(0x22f)](),_0x23e9f4),_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x13f)](_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ed)][_0xa6ae4(0x22f)](),_0x3048e0));const _0x8f9b27=_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ed)][_0xa6ae4(0x125)][_0xa6ae4(0x1bd)](_0x239c9d[_0xa6ae4(0x23a)]);for(const _0xc9ffff of _0x8f9b27)_0x53ef60=_0x5d6e1f[_0xa6ae4(0x1f0)](_0x53ef60[_0xa6ae4(0x169)](_0xc9ffff));return{'range':_0x53ef60,'previousIndex':_0x3b051d,'nextIndex':_0x48614f,'currentIndex':_0x748c52};}[_0x465c9f(0x10a)](_0x456599){const _0x10f7d7=_0x465c9f;if(!_0x456599[_0x10f7d7(0x1eb)][_0x10f7d7(0x1b5)](_0x10f7d7(0x164)))return;const _0x33f3bf=_0x456599[_0x10f7d7(0x23b)][_0x10f7d7(0x13c)](_0x10f7d7(0x214)),_0x239ff4=_0x456599[_0x10f7d7(0x23b)][_0x10f7d7(0x13c)](_0x10f7d7(0x10f));this[_0x10f7d7(0x1c0)](_0x33f3bf,_0x10f7d7(0x20f),(_0x5899c3,_0x46f187,_0x6c3524)=>{const _0x43db52=_0x10f7d7,_0x232a9e=this[_0x43db52(0x22e)][_0x43db52(0x13c)](_0x46f187);if(!_0x232a9e)return;const _0x4eb5fe=this[_0x43db52(0x204)][_0x43db52(0x20a)](_0x232a9e[_0x43db52(0x206)])[_0x43db52(0x174)](_0x232a9e[_0x43db52(0x19b)]);_0x232a9e[_0x43db52(0x118)][_0x43db52(0x14e)](_0x494175=>_0x4eb5fe[_0x43db52(0x147)](_0x494175,_0x43db52(0xf7))),this[_0x43db52(0x22e)][_0x43db52(0x22a)](_0x46f187),this[_0x43db52(0x22e)][_0x43db52(0x110)](_0x6c3524,_0x232a9e);}),this[_0x10f7d7(0x1c0)](_0x239ff4,_0x10f7d7(0x20f),(_0x224e8a,_0x8e457e,_0x1a8816)=>{const _0x4b4e07=_0x10f7d7,_0x113c7d=this[_0x4b4e07(0x22e)][_0x4b4e07(0x13c)](_0x8e457e);if(!_0x113c7d)return;const _0x35dea5=this[_0x4b4e07(0x204)][_0x4b4e07(0x20a)](_0x113c7d[_0x4b4e07(0x206)])[_0x4b4e07(0x174)](_0x113c7d[_0x4b4e07(0x19b)]);_0x113c7d[_0x4b4e07(0x118)][_0x4b4e07(0x14e)](_0x4fbe28=>_0x35dea5[_0x4b4e07(0x147)](_0x4fbe28,_0x4b4e07(0x189))),this[_0x4b4e07(0x22e)][_0x4b4e07(0x22a)](_0x8e457e),this[_0x4b4e07(0x22e)][_0x4b4e07(0x110)](_0x1a8816,_0x113c7d);});}async[_0x465c9f(0x168)](_0x55123c){const _0x46f7e5=_0x465c9f;this[_0x46f7e5(0x14b)][_0x46f7e5(0x1eb)][_0x46f7e5(0x13c)](_0x575363)[_0x46f7e5(0x22c)](),this[_0x46f7e5(0x207)][_0x46f7e5(0x1fd)](_0x46f7e5(0x1b3)),this[_0x46f7e5(0x207)][_0x46f7e5(0x143)](!0x0),await this[_0x46f7e5(0x1e7)]();try{const _0x17f0a4=this[_0x46f7e5(0x14b)][_0x46f7e5(0x1eb)][_0x46f7e5(0x13c)](_0x351d7e);this[_0x46f7e5(0x1df)]('\x20'),_0x17f0a4[_0x46f7e5(0xfe)][_0x46f7e5(0x170)](_0x46f7e5(0x1b0)),await this[_0x46f7e5(0x126)](_0x55123c);const {sessionId:_0x57eb57}=this[_0x46f7e5(0x144)][_0x46f7e5(0x200)]();await this[_0x46f7e5(0x204)][_0x46f7e5(0x149)](_0x55123c,_0x57eb57),this[_0x46f7e5(0x204)][_0x46f7e5(0x156)]()&&this[_0x46f7e5(0x204)][_0x46f7e5(0x1c8)](_0x206cf5(this[_0x46f7e5(0x14b)][_0x46f7e5(0x1aa)],_0x46f7e5(0xf1)));}catch(_0x39601e){console[_0x46f7e5(0x157)](_0x46f7e5(0xf9),_0x39601e);}finally{this[_0x46f7e5(0x207)][_0x46f7e5(0x1fd)](_0x46f7e5(0x179)),this[_0x46f7e5(0x207)][_0x46f7e5(0x143)](!0x1);}}[_0x465c9f(0x1ec)](_0x23cb22){const _0x221447=_0x465c9f;this[_0x221447(0x204)]['id']===_0x23cb22&&this[_0x221447(0x126)]();}async[_0x465c9f(0xfa)](){const _0x1dd0a3=_0x465c9f,_0x1c312f=this[_0x1dd0a3(0x144)][_0x1dd0a3(0x16e)]();this[_0x1dd0a3(0x204)]?.[_0x1dd0a3(0x222)](_0x1c312f),this[_0x1dd0a3(0x204)]?.[_0x1dd0a3(0x1c8)](_0x206cf5(this[_0x1dd0a3(0x14b)][_0x1dd0a3(0x1aa)],_0x1dd0a3(0xf1)));}[_0x465c9f(0x203)](){const _0x4dbaae=_0x465c9f;this[_0x4dbaae(0x204)]?.[_0x4dbaae(0x1e5)]();}[_0x465c9f(0x1e9)](){const _0x46ac30=_0x465c9f;this[_0x46ac30(0x207)][_0x46ac30(0x1e9)]();}async[_0x465c9f(0x193)](){const _0x271b77=_0x465c9f;await this[_0x271b77(0x126)]();}async[_0x465c9f(0x178)]({message:_0x15ef31,quickActionData:_0x105892}){const _0x5a8f99=_0x465c9f;await this[_0x5a8f99(0x1d5)]({'userMessage':_0x15ef31,'quickActionData':_0x105892});}[_0x465c9f(0x113)](){const _0x2cdca5=_0x465c9f,_0x2d4f60=this[_0x2cdca5(0x14b)][_0x2cdca5(0x102)][_0x2cdca5(0x13c)](_0x2cdca5(0x115));if(!_0x2d4f60)throw new _0x4f8449(_0x2cdca5(0x1ff),this);return _0x2d4f60;}async[_0x465c9f(0x126)](_0x23314b){const _0xc662fc=_0x465c9f;try{this[_0xc662fc(0x207)][_0xc662fc(0x20c)](),await this[_0xc662fc(0x10c)](_0x23314b);}catch(_0x3b19f3){_0x5e1962(_0xc662fc(0x1b4),_0x3b19f3),this[_0xc662fc(0x204)]=void 0x0,this[_0xc662fc(0x207)][_0xc662fc(0x133)]();}}async[_0x465c9f(0x10c)](_0x438a19){const _0x3fbc43=_0x465c9f,_0x2949d=this[_0x3fbc43(0x14b)][_0x3fbc43(0x1eb)][_0x3fbc43(0x13c)](_0x575363);let _0x51c015;_0x2949d[_0x3fbc43(0xec)]&&_0x2949d[_0x3fbc43(0x22c)](),_0x51c015=_0x438a19||!this[_0x3fbc43(0x204)]?this[_0x3fbc43(0x14b)][_0x3fbc43(0x102)][_0x3fbc43(0x13c)](_0x3fbc43(0x228)):this[_0x3fbc43(0x204)][_0x3fbc43(0x21b)]['id'],await this[_0x3fbc43(0x1e7)]();const _0x5d3e57=this[_0x3fbc43(0x113)](),_0x7c15f6=_0x438a19||_0x18f48e();this[_0x3fbc43(0x204)]=new _0x3dbaf9({'connector':this[_0x3fbc43(0x127)],'chatModels':this[_0x3fbc43(0x137)],'defaultModelId':_0x51c015,'conversationId':_0x7c15f6,'group':_0x5d3e57,'getEditor':()=>_0xcf3e41(this[_0x3fbc43(0x14b)])}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1ac),(_0x16a1cb,_0x20c33b)=>{const _0x1c6c4c=_0x3fbc43;_0x20c33b[_0x1c6c4c(0x120)]=this[_0x1c6c4c(0x1f5)](_0x20c33b[_0x1c6c4c(0x120)],this[_0x1c6c4c(0x14b)][_0x1c6c4c(0x102)][_0x1c6c4c(0x13c)](_0x1c6c4c(0x1a1))),this[_0x1c6c4c(0x207)][_0x1c6c4c(0x1a2)](_0x20c33b),this[_0x1c6c4c(0x207)][_0x1c6c4c(0x1be)](),this[_0x1c6c4c(0x207)][_0x1c6c4c(0x13d)](),this[_0x1c6c4c(0x207)][_0x1c6c4c(0x19c)](),_0x438a19||(this[_0x1c6c4c(0x207)][_0x1c6c4c(0x139)](),this[_0x1c6c4c(0x204)]?.[_0x1c6c4c(0x1c8)](_0x206cf5(this[_0x1c6c4c(0x14b)][_0x1c6c4c(0x1aa)],_0x1c6c4c(0xf1))));}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x14c),(_0x43d571,_0x389adc)=>{const _0x36ab86=_0x3fbc43;this[_0x36ab86(0x207)][_0x36ab86(0x1fa)](_0x389adc[_0x36ab86(0x1b1)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x136),(_0x27a026,_0x19e4f9)=>{const _0x31c6f1=_0x3fbc43;this[_0x31c6f1(0x207)][_0x31c6f1(0x1ea)](_0x19e4f9);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1ca),()=>{const _0xe790cb=_0x3fbc43;this[_0xe790cb(0x207)][_0xe790cb(0x22d)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1e3),()=>{const _0x387301=_0x3fbc43;this[_0x387301(0x207)][_0x387301(0x22d)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1c9),(_0x2f52a2,_0x2dbdee)=>{const _0x3daaba=_0x3fbc43;this[_0x3daaba(0x207)][_0x3daaba(0x18c)](_0x2dbdee,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1d8),(_0x58cb9d,_0x88326f)=>{const _0x4dbe5a=_0x3fbc43;this[_0x4dbe5a(0x207)][_0x4dbe5a(0x18c)](_0x88326f,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1f4),()=>{const _0x2bd026=_0x3fbc43;this[_0x2bd026(0x207)][_0x2bd026(0x114)]();}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0xed),async()=>{const _0x497d0e=_0x3fbc43;await this[_0x497d0e(0x207)][_0x497d0e(0x21f)]();}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1dc),(_0x405e74,_0x30964b)=>{const _0x19b9f5=_0x3fbc43;this[_0x19b9f5(0x207)][_0x19b9f5(0x12d)](_0x30964b['id']);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x16c),(_0x3d1dd0,_0xce712f,_0x237a59)=>{const _0x6b89c=_0x3fbc43;this[_0x6b89c(0x1df)](_0xce712f,_0x237a59);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1c1),(_0x3037ef,_0x42684a)=>{const _0x5ba034=_0x3fbc43;_0x5ba034(0x196)===_0x42684a[_0x5ba034(0x141)]?this[_0x5ba034(0x207)][_0x5ba034(0x191)](_0x42684a):this[_0x5ba034(0x207)][_0x5ba034(0x1d0)](_0x42684a);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1cb),async(_0x49638d,_0xb8caa5,_0x482eda)=>{const _0x5c9b4d=_0x3fbc43;await this[_0x5c9b4d(0x1e6)]({'reply':_0xb8caa5,'changeGroups':_0x482eda});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1c3),(_0xead35d,{reply:_0x225575,index:_0xd59e17,state:_0x5adb20})=>{const _0x26f458=_0x3fbc43;this[_0x26f458(0x207)][_0x26f458(0x1fc)]({'id':_0x225575['id'],'index':_0xd59e17,'state':_0x5adb20});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x188),(_0x457366,_0x25b214)=>{const _0x4b27c1=_0x3fbc43;if(this[_0x4b27c1(0x207)][_0x4b27c1(0x17e)](_0x25b214[_0x4b27c1(0x181)],_0x25b214[_0x4b27c1(0x142)]),_0x4b27c1(0x162)===_0x25b214[_0x4b27c1(0x181)][_0x4b27c1(0x141)]){const _0xf9ca73=[..._0xcf3e41(this[_0x4b27c1(0x14b)])[_0x4b27c1(0x1b8)][_0x4b27c1(0x1ed)][_0x4b27c1(0x162)][_0x4b27c1(0x12a)]()];this[_0x4b27c1(0x144)][_0x4b27c1(0x12f)](_0xf9ca73,_0x4b27c1(0xee)+this[_0x4b27c1(0x204)]?.['id']);}}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x130),(_0x32ccb5,_0x51b538)=>{const _0x591013=_0x3fbc43;this[_0x591013(0x207)][_0x591013(0x198)](_0x51b538[_0x591013(0x1e2)]),_0x591013(0xf0)==_0x51b538[_0x591013(0x1e2)]&&this[_0x591013(0x203)](),_0x591013(0x162)===_0x51b538[_0x591013(0x141)]&&this[_0x591013(0x144)][_0x591013(0x20d)](_0x591013(0xee)+this[_0x591013(0x204)]?.['id']);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x18d),(_0x1cddac,_0x4dbd4d)=>{const _0x326317=_0x3fbc43;this[_0x326317(0x207)][_0x326317(0x117)](_0x4dbd4d[_0x326317(0x181)][_0x326317(0x1e2)],_0x4dbd4d[_0x326317(0x142)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x21d),(_0x5ffd4d,_0x46ef19)=>{const _0x4bf04c=_0x3fbc43;this[_0x4bf04c(0x207)][_0x4bf04c(0x1b7)](_0x46ef19[_0x4bf04c(0x240)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x119),(_0x145ef1,_0xa58808)=>{const _0x44c42=_0x3fbc43;this[_0x44c42(0x207)][_0x44c42(0x201)](_0xa58808[_0x44c42(0x1cc)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x155),(_0x35c1b5,_0xef0cc6)=>{const _0x51484c=_0x3fbc43;this[_0x51484c(0x207)][_0x51484c(0x153)](_0xef0cc6[_0x51484c(0x13b)],_0xef0cc6[_0x51484c(0x232)],_0xef0cc6[_0x51484c(0x23f)],_0xef0cc6[_0x51484c(0x121)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1bb),(_0x2c6358,_0x6ebd69)=>{const _0x14279e=_0x3fbc43;this[_0x14279e(0x207)][_0x14279e(0x13e)](_0x6ebd69[_0x14279e(0x13b)],_0x6ebd69[_0x14279e(0x15e)],_0x6ebd69[_0x14279e(0x11c)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x15d),(_0x1314c8,_0x502ed4)=>{const _0x53bd4f=_0x3fbc43;this[_0x53bd4f(0x207)][_0x53bd4f(0x1d1)](_0x502ed4);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x211),(_0x2a6699,_0x3950a4)=>{const _0x1c04f4=_0x3fbc43;this[_0x1c04f4(0x207)][_0x1c04f4(0x111)](_0x3950a4[_0x1c04f4(0x21b)],_0x3950a4[_0x1c04f4(0x186)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x157),(_0x4d3057,{error:_0x29e43c,interactionId:_0x387bd8,fileName:_0x4bfd05,url:_0x3caec7,sourceId:_0x694a94,sourceLabel:_0x4e4c29})=>{const _0x5995e5=_0x3fbc43,_0x32750b=_0x387bd8?_0x387bd8+':'+_0x18f48e():_0x18f48e();_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x104))?this[_0x5995e5(0x207)][_0x5995e5(0x1bf)]({'staticMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x1fb)),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x14a))||_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x1b4))?(this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x17b)),'id':_0x32750b}),this[_0x5995e5(0x20b)](_0x29e43c)):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x1f6))?this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x19a),_0x4bfd05),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x14d))?this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x112),_0x3caec7),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x132))?this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x1f8)),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x21e))?this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x146)),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x109))?(_0x694a94&&this[_0x5995e5(0x207)][_0x5995e5(0x177)](_0x694a94),this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x190),_0x4e4c29||_0x5995e5(0x232)),'id':_0x32750b}),this[_0x5995e5(0x20b)](_0x29e43c)):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x11d))?(this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x16d)),'id':_0x32750b}),this[_0x5995e5(0x20b)](_0x29e43c)):(this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x13a)),'id':_0x32750b}),this[_0x5995e5(0x20b)](_0x29e43c));}),await this[_0x3fbc43(0x204)][_0x3fbc43(0xe9)](this[_0x3fbc43(0x14b)][_0x3fbc43(0x102)][_0x3fbc43(0x13c)](_0x3fbc43(0x161))),_0x438a19||await this[_0x3fbc43(0x204)][_0x3fbc43(0x21a)]();}async[_0x465c9f(0x1d5)]({userMessage:_0x2415df,quickActionData:_0x6ce839}){const _0x324f8d=_0x465c9f;if(!this[_0x324f8d(0x204)])throw new _0x4f8449(_0x324f8d(0x15a));this[_0x324f8d(0x204)][_0x324f8d(0x187)]()&&await this[_0x324f8d(0x204)][_0x324f8d(0x1b2)](this[_0x324f8d(0x144)][_0x324f8d(0x200)]()),this[_0x324f8d(0x204)]['id']&&this[_0x324f8d(0x204)][_0x324f8d(0x215)]&&await this[_0x324f8d(0x204)][_0x324f8d(0x1ab)]({'userMessage':_0x2415df,'quickActionData':_0x6ce839}),this[_0x324f8d(0x242)]();}[_0x465c9f(0x242)](){const _0x22cc4c=_0x465c9f,_0x65a5aa=_0xcf3e41(this[_0x22cc4c(0x14b)])[_0x22cc4c(0x1b8)],_0x5d47e6=Array[_0x22cc4c(0x11f)](_0x65a5aa[_0x22cc4c(0xf2)][_0x22cc4c(0x16f)](_0x3d0f78));_0x65a5aa[_0x22cc4c(0x233)](_0x43c517=>{const _0x25794e=_0x22cc4c;_0x5d47e6[_0x25794e(0x14e)](_0x184d0a=>_0x43c517[_0x25794e(0x138)](_0x184d0a));});}[_0x465c9f(0x1a3)](){const _0x23daa4=_0x465c9f;console[_0x23daa4(0x154)](_0x23daa4(0x1ba));}[_0x465c9f(0x1cd)](_0x5ceef4){const _0xdbebf2=_0x465c9f;this[_0xdbebf2(0x207)][_0xdbebf2(0x12e)](_0x5ceef4);}[_0x465c9f(0x20b)](_0x470ba4){const _0x55618a=_0x465c9f;_0x5e1962(_0x470ba4[_0x55618a(0x131)]);}[_0x465c9f(0x1d9)](_0x50b9d6){const _0x3e91c3=_0x465c9f;this[_0x3e91c3(0x204)]?.[_0x3e91c3(0x106)](_0x50b9d6);}[_0x465c9f(0x238)](){const _0x8e01e3=_0x465c9f;this[_0x8e01e3(0x204)]?.[_0x8e01e3(0x180)]();}[_0x465c9f(0x208)](){const _0xffd255=_0x465c9f;this[_0xffd255(0x204)]?.[_0xffd255(0x1dd)]();}[_0x465c9f(0x1f9)](_0x4d63d9){const _0x4cd5aa=_0x465c9f,[_0x52b991,_0x11bb31]=_0x4d63d9[_0x4cd5aa(0x230)](':'),_0x55740c=this[_0x4cd5aa(0x204)][_0x4cd5aa(0x20a)](_0x52b991),_0x556979=_0x55740c[_0x4cd5aa(0x174)](_0x11bb31);return{'interaction':_0x55740c,'reply':_0x556979};}[_0x465c9f(0x122)](_0x5166c1,_0x1601a5=!0x1){const _0x21fc39=_0x465c9f,_0x8676e7=_0xcf3e41(this[_0x21fc39(0x14b)]),_0x33861d={'target':_0x8676e7[_0x21fc39(0x176)][_0x21fc39(0xfe)][_0x21fc39(0x202)][_0x21fc39(0x11a)](_0x8676e7[_0x21fc39(0x176)][_0x21fc39(0xff)][_0x21fc39(0x235)](_0x5166c1)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x1601a5};_0x1601a5&&(_0x33861d[_0x21fc39(0x1b9)]=!0x0),_0x425377(_0x33861d);}[_0x465c9f(0x1df)](_0x29c80a,_0x30b570=!0x1){const _0x419a14=_0x465c9f;this[_0x419a14(0x207)][_0x419a14(0x16c)](_0x29c80a||_0x206cf5(this[_0x419a14(0x14b)][_0x419a14(0x1aa)],_0x419a14(0x108)),_0x30b570);}[_0x465c9f(0x1f5)](_0x33ceee,_0xd47d88){const _0x5d1b79=_0x465c9f;let _0x16a701;if(_0xd47d88){_0x16a701=[];const _0x3503a7=_0x5d1b79(0x1c7)==typeof _0xd47d88?[_0xd47d88[_0x5d1b79(0x10e)]()]:_0xd47d88[_0x5d1b79(0x18b)](_0x38c6cb=>_0x38c6cb[_0x5d1b79(0x10e)]());for(const _0x37ffd7 of _0x3503a7)for(const _0x2c9acb of _0x33ceee)(_0x2c9acb['id'][_0x5d1b79(0x10e)]()===_0x37ffd7||_0x2c9acb[_0x5d1b79(0x182)][_0x5d1b79(0x10e)]()===_0x37ffd7||_0x2c9acb[_0x5d1b79(0x116)][_0x5d1b79(0x10e)]()===_0x37ffd7||_0x2c9acb['id'][_0x5d1b79(0x10e)]()[_0x5d1b79(0x22b)](_0x37ffd7))&&_0x16a701[_0x5d1b79(0x1bc)](_0x2c9acb);}else _0x16a701=_0x33ceee;return _0x16a701;}async[_0x465c9f(0x1e6)]({reply:_0xb1bf7d,changeGroups:_0xe04f01,renderingStrategy:_0x4babc6}){const _0xcc359c=_0x465c9f,{id:_0x31b969,isDone:_0x19f713,type:_0x51ebce,parsedContent:_0x141547}=_0xb1bf7d;if(_0xcc359c(0x231)===_0x51ebce){const _0x54f48a=_0xcf3e41(this[_0xcc359c(0x14b)]),_0x10669a=_0x3f67f2({'editor':_0x54f48a,'showDiff':this[_0xcc359c(0x207)][_0xcc359c(0x160)],'changeGroups':_0xe04f01,'documentContextContent':_0xb1bf7d[_0xcc359c(0x1a0)]});await this[_0xcc359c(0x207)][_0xcc359c(0x15c)]({'id':_0x31b969,'parts':_0x10669a,'renderingStrategy':_0x4babc6,'isDone':_0x19f713});}else _0xcc359c(0x196)===_0x51ebce&&await this[_0xcc359c(0x207)][_0xcc359c(0x1e1)]({'id':_0x31b969,'parsedContent':_0x141547,'renderingStrategy':_0x4babc6,'isDone':_0x19f713});_0x19f713&&_0xb1bf7d[_0xcc359c(0x19f)][_0xcc359c(0x128)]>0x0&&this[_0xcc359c(0x207)][_0xcc359c(0x1f2)](_0x31b969,_0xb1bf7d[_0xcc359c(0x19f)]);}async[_0x465c9f(0x1e7)](){const _0x5a8671=_0x465c9f,_0x1ba344=this[_0x5a8671(0x204)]?.[_0x5a8671(0x16a)];_0x1ba344&&(_0x1ba344[_0x5a8671(0xef)](),this[_0x5a8671(0x207)][_0x5a8671(0x1c2)](_0x1ba344));}async[_0x465c9f(0x1a9)](){const _0x1dae48=_0x465c9f,_0x38822b=this[_0x1dae48(0x204)]?.[_0x1dae48(0x16a)];if(_0x38822b){for await(const _0x3f678a of _0x38822b[_0x1dae48(0xf3)])await this[_0x1dae48(0x1e6)]({'reply':_0x3f678a,'changeGroups':_0x3f678a[_0x1dae48(0x229)],'renderingStrategy':_0x1dae48(0x1b3)});}}[_0x465c9f(0xfb)](_0x3ba572){const _0x3130b1=_0x465c9f,_0x20c2fc={'positiveCount':_0x3ba572[_0x3130b1(0x229)][_0x3130b1(0x195)](_0x212cb7=>_0x3130b1(0x189)===_0x212cb7[_0x3130b1(0x1c5)])[_0x3130b1(0x128)],'totalCount':_0x3ba572[_0x3130b1(0x229)][_0x3130b1(0x128)]},_0x494cde=this[_0x3130b1(0x204)][_0x3130b1(0x20a)](_0x3ba572[_0x3130b1(0x206)])[_0x3130b1(0x150)];this[_0x3130b1(0x127)][_0x3130b1(0x152)](this[_0x3130b1(0x204)]['id'],_0x494cde,_0x20c2fc);}}
|
|
23
|
+
const _0x45e5cc=_0x2cf0;(function(_0x29a380,_0x4cd4b2){const _0x4e1b81=_0x2cf0,_0x3bdccf=_0x29a380();while(!![]){try{const _0x20a984=parseInt(_0x4e1b81(0x1bf))/0x1+-parseInt(_0x4e1b81(0x220))/0x2*(-parseInt(_0x4e1b81(0x17e))/0x3)+-parseInt(_0x4e1b81(0x254))/0x4+-parseInt(_0x4e1b81(0x1c5))/0x5+parseInt(_0x4e1b81(0x19f))/0x6*(parseInt(_0x4e1b81(0x1d1))/0x7)+parseInt(_0x4e1b81(0x1dc))/0x8+parseInt(_0x4e1b81(0x216))/0x9;if(_0x20a984===_0x4cd4b2)break;else _0x3bdccf['push'](_0x3bdccf['shift']());}catch(_0x3fc9f6){_0x3bdccf['push'](_0x3bdccf['shift']());}}}(_0x344d,0xac185));import{ContextPlugin as _0x3158cb,Editor as _0x3918b3}from'ckeditor5/src/core.js';import{CKEditorError as _0x16faf9,logError as _0x50a61f,scrollViewportToShowTarget as _0x2339dd,uid as _0x2d2414}from'ckeditor5/src/utils.js';import{AIConnector as _0x234755}from'../aicore/aiconnector.js';import{AITabs as _0x2cb794}from'../aitabs/aitabs.js';import{AIChatConversation as _0x28056c}from'./model/aichatconversation.js';import{getTranslation as _0x3dfaa9}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x38ead6}from'../aicore/aiediting.js';import{AIChatModels as _0x47dfa3}from'./model/aichatmodels.js';function _0x2cf0(_0x37b36a,_0x4ac155){const _0x344d49=_0x344d();return _0x2cf0=function(_0x2cf0ab,_0x17a7ec){_0x2cf0ab=_0x2cf0ab-0x177;let _0xb26161=_0x344d49[_0x2cf0ab];return _0xb26161;},_0x2cf0(_0x37b36a,_0x4ac155);}import{getEditorFromContext as _0x3cc6c6}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x151f22,DATA_ID_MODEL_ATTRIBUTE as _0x39eb9b}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x27c536}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x16a2b5,getMinimalSelection as _0x1d20c2,getSuggestionPartsFromReply as _0x1a511c}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x503dc3,_DetachOperation as _0x10e379}from'ckeditor5/src/engine.js';import{findOne as _0x2327f3,getAttribute as _0x2777d2,serialize as _0x30a863,Document as _0x284939,findByAttribute as _0x5885d0}from'../aicore/utils/htmlparser.js';import{IconAI as _0xf4914d}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x2c138a}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x385be5}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x3158cb{[_0x45e5cc(0x204)];[_0x45e5cc(0x2b3)];[_0x45e5cc(0x24f)];[_0x45e5cc(0x1ef)];[_0x45e5cc(0x235)]=new Map();[_0x45e5cc(0x27c)]=null;[_0x45e5cc(0x2ab)]=!0x1;static get[_0x45e5cc(0x1a3)](){return[_0x234755,_0x385be5,_0x151f22];}static get[_0x45e5cc(0x269)](){const _0x4e3a0c=_0x45e5cc;return _0x4e3a0c(0x237);}static get[_0x45e5cc(0x28c)](){return!0x0;}static get[_0x45e5cc(0x1a8)](){return!0x0;}[_0x45e5cc(0x282)](){const _0x153806=_0x45e5cc;this[_0x153806(0x2b3)]=this[_0x153806(0x251)][_0x153806(0x26b)][_0x153806(0x191)](_0x153806(0x2ca)),this[_0x153806(0x24f)]=this[_0x153806(0x251)][_0x153806(0x26b)][_0x153806(0x191)](_0x153806(0x2c9)),this[_0x153806(0x204)]=this[_0x153806(0x251)][_0x153806(0x26b)][_0x153806(0x191)](_0x153806(0x206)),this[_0x153806(0x1ef)]=new _0x47dfa3({'connector':this[_0x153806(0x2b3)]});const _0x23e263=this[_0x153806(0x251)][_0x153806(0x26b)][_0x153806(0x191)](_0x153806(0x1b9));this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x24e),()=>{const _0xe988ec=_0x153806;this[_0xe988ec(0x272)]();}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x22d),(_0x577c6f,_0x200b39)=>{const _0x2eace0=_0x153806;this[_0x2eace0(0x279)]({'userMessage':_0x200b39});}),this[_0x153806(0x262)](_0x23e263,_0x153806(0x2ad),(_0x328681,_0x570167)=>{const _0x50c604=_0x153806;this[_0x50c604(0x209)](_0x570167);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x1da),()=>{const _0x3aecd8=_0x153806;_0x23e263[_0x3aecd8(0x222)]();}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x1f6),async()=>{const _0x4fc2e0=_0x153806;await this[_0x4fc2e0(0x218)](),await this[_0x4fc2e0(0x21f)]();}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x2bc),()=>{const _0x5aabf5=_0x153806;this[_0x5aabf5(0x1fe)]?.[_0x5aabf5(0x2a5)](_0x3dfaa9(this[_0x5aabf5(0x251)][_0x5aabf5(0x23c)],_0x5aabf5(0x29f)));}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x23e),(_0xd9d066,_0x48c912)=>{const _0x149efa=_0x153806;this[_0x149efa(0x1fe)]?.[_0x149efa(0x1f5)](Array[_0x149efa(0x1e3)](_0x48c912));}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x2a8),(_0x5174d5,_0xc8913)=>{const _0x4d2bc2=_0x153806;this[_0x4d2bc2(0x1fe)]?.[_0x4d2bc2(0x2a8)](_0xc8913);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x1df),(_0x332678,_0x129e2d)=>{const _0x355777=_0x153806;this[_0x355777(0x1fe)]?.[_0x355777(0x1df)](_0x129e2d[_0x355777(0x184)],_0x129e2d[_0x355777(0x2c7)]);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x1a7),(_0x1a1301,_0x5503ee)=>{const _0x39ba09=_0x153806;this[_0x39ba09(0x1d9)](_0x5503ee);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x2be),(_0x247303,_0x772b06)=>{const _0x219a18=_0x153806;this[_0x219a18(0x1fe)]?.[_0x219a18(0x2be)](_0x772b06[_0x219a18(0x2a1)],_0x772b06[_0x219a18(0x270)],_0x772b06[_0x219a18(0x19e)]);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x247),()=>{const _0x54a8ab=_0x153806;this[_0x54a8ab(0x1ac)]();}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x295),()=>{const _0x29eca4=_0x153806;this[_0x29eca4(0x1e7)]();}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x248),(_0x866eeb,_0x4b448f)=>{const _0x263ddb=_0x153806;this[_0x263ddb(0x1fe)]?.[_0x263ddb(0x2cc)](_0x4b448f);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x18e),(_0x4a176a,{replyId:_0x5ed2fc})=>{const _0x479f94=_0x153806;console[_0x479f94(0x2b6)](_0x479f94(0x255),_0x5ed2fc);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x1a6),(_0x1aa0e7,{replyId:_0x226a29})=>{const _0x29905a=_0x153806;console[_0x29905a(0x2b6)](_0x29905a(0x27b),_0x226a29);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x2a2),(_0x1838a8,_0x398c21)=>{const _0x52b085=_0x153806;this[_0x52b085(0x251)][_0x52b085(0x26b)][_0x52b085(0x191)](_0x385be5)[_0x52b085(0x2b5)](),this[_0x52b085(0x21c)](_0x398c21);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x224),(_0x3b5f46,{replyId:_0x83ac5b,partIndex:_0x5daf05})=>{const _0x255fa8=_0x153806;this[_0x255fa8(0x2ab)]=this[_0x255fa8(0x24f)][_0x255fa8(0x1b1)],this[_0x255fa8(0x17b)](_0x83ac5b,_0x5daf05);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x186),(_0x380b7a,{replyId:_0x2df470,partIndex:_0x3f2c0a})=>{const _0x58cd64=_0x153806,_0x4835d9=this[_0x58cd64(0x1cf)](_0x2df470,_0x3f2c0a);_0x4835d9&&_0x58cd64(0x298)!=_0x4835d9[_0x58cd64(0x2b4)][_0x58cd64(0x2b9)][_0x58cd64(0x2ba)]&&this[_0x58cd64(0x204)][_0x58cd64(0x26e)]([_0x4835d9[_0x58cd64(0x2b4)]],_0x58cd64(0x213));}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x252),()=>{const _0x53c388=_0x153806;this[_0x53c388(0x204)][_0x53c388(0x260)](_0x53c388(0x213));}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x27d),(_0x4a4c3c,_0x3b2bdd)=>{const _0x5b0687=_0x153806;this[_0x5b0687(0x251)][_0x5b0687(0x26b)][_0x5b0687(0x191)](_0x385be5)[_0x5b0687(0x2b5)](),this[_0x5b0687(0x296)](_0x3b2bdd);}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x1b7),async(_0x27b229,_0x248dcd)=>{const _0x13f71a=_0x153806,{reply:_0x5366e9}=this[_0x13f71a(0x229)](_0x248dcd[_0x13f71a(0x1ee)]),_0x2f2d3b=_0x3cc6c6(this[_0x13f71a(0x251)]),_0x3b575e=_0x1a511c({'editor':_0x2f2d3b,'changeGroups':_0x5366e9[_0x13f71a(0x1f0)],'documentContextContent':_0x5366e9[_0x13f71a(0x18a)],'showDiff':_0x248dcd[_0x13f71a(0x1b1)]});await this[_0x13f71a(0x24f)][_0x13f71a(0x1b0)]({'id':_0x5366e9['id'],'parts':_0x3b575e,'renderingStrategy':_0x13f71a(0x20f)});}),this[_0x153806(0x262)](this[_0x153806(0x24f)],_0x153806(0x245),(_0x5d7bec,{replyId:_0x2c8095,partIndex:_0x14b468})=>{const _0x55bebd=_0x153806;this[_0x55bebd(0x27c)]?.[_0x55bebd(0x1ee)]==_0x2c8095&&this[_0x55bebd(0x27c)]?.[_0x55bebd(0x2bd)]==_0x14b468&&this[_0x55bebd(0x251)][_0x55bebd(0x26b)][_0x55bebd(0x191)](_0x385be5)[_0x55bebd(0x2b5)]();const {reply:_0x3c2009}=this[_0x55bebd(0x229)](_0x2c8095);_0x3c2009[_0x55bebd(0x1d2)](_0x14b468,_0x55bebd(0x1ae)),this[_0x55bebd(0x204)][_0x55bebd(0x260)](_0x55bebd(0x213));});}async[_0x45e5cc(0x1ab)](){const _0x3b2a44=_0x45e5cc;this[_0x3b2a44(0x251)]instanceof _0x3918b3?this[_0x3b2a44(0x29b)](this[_0x3b2a44(0x251)]):this[_0x3b2a44(0x262)](this[_0x3b2a44(0x251)][_0x3b2a44(0x280)],_0x3b2a44(0x240),(_0x285955,_0x3daca7)=>{const _0x15307f=_0x3b2a44;_0x3daca7['on'](_0x15307f(0x265),()=>{const _0x260eda=_0x15307f;this[_0x260eda(0x29b)](_0x3daca7);});}),await this[_0x3b2a44(0x272)]();}[_0x45e5cc(0x21c)](_0x2aba21){const _0x36cae8=_0x45e5cc,_0x357c6e=_0x3cc6c6(this[_0x36cae8(0x251)]);if(!_0x357c6e[_0x36cae8(0x26b)][_0x36cae8(0x1e0)](_0x36cae8(0x1ba)))return;const _0x5eb2ae=this[_0x36cae8(0x251)][_0x36cae8(0x26b)][_0x36cae8(0x191)](_0x36cae8(0x2b1)),{reply:_0x1fbd23,interaction:_0x2718c}=this[_0x36cae8(0x229)](_0x2aba21[_0x36cae8(0x1ee)]),_0x3a4b4b=this[_0x36cae8(0x1cf)](_0x2aba21[_0x36cae8(0x1ee)],_0x2aba21[_0x36cae8(0x2bd)]),_0x3d4a2f=void 0x0!==_0x2aba21[_0x36cae8(0x2bd)]?[_0x1fbd23[_0x36cae8(0x1f0)][_0x2aba21[_0x36cae8(0x2bd)]]]:_0x1fbd23[_0x36cae8(0x1f0)][_0x36cae8(0x180)](_0x24f729=>_0x36cae8(0x22e)==_0x24f729[_0x36cae8(0x21d)]),_0x6a360f=_0x3d4a2f[_0x36cae8(0x1cc)](_0x26e58c=>_0x1fbd23[_0x36cae8(0x1f0)][_0x36cae8(0x266)](_0x26e58c));_0x6a360f[_0x36cae8(0x211)](_0x45cfad=>_0x1fbd23[_0x36cae8(0x1d2)](_0x45cfad,_0x36cae8(0x1cd)));const _0x10396b=_0x27c536({'editor':_0x357c6e,'reply':_0x1fbd23,'interaction':_0x2718c,'groups':_0x3d4a2f,'transform':!0x0,'documentCompare':_0x5eb2ae,'documentCompareOptions':{'anchor':_0x36cae8(0x196),'markDeletions':!0x0}});let _0x3b2c6b;_0x3a4b4b&&this[_0x36cae8(0x29c)](_0x3a4b4b[_0x36cae8(0x2b4)]),_0x357c6e[_0x36cae8(0x24b)][_0x36cae8(0x287)](_0x33f133=>{const _0x1eca77=_0x36cae8;_0x3b2c6b=_0x33f133[_0x1eca77(0x28f)],_0x357c6e[_0x1eca77(0x26b)][_0x1eca77(0x191)](_0x1eca77(0x1ba))[_0x1eca77(0x217)](_0x10396b),this[_0x1eca77(0x204)][_0x1eca77(0x260)](_0x1eca77(0x213));}),this[_0x36cae8(0x235)][_0x36cae8(0x242)](_0x3b2c6b,{'interactionId':_0x2718c['id'],'replyId':_0x1fbd23['id'],'indexes':_0x6a360f[_0x36cae8(0x257)]()}),this[_0x36cae8(0x2a0)](_0x1fbd23);}[_0x45e5cc(0x296)](_0x404728){const _0x269166=_0x45e5cc,_0x16d349=_0x3cc6c6(this[_0x269166(0x251)]),_0x2019cd=this[_0x269166(0x251)][_0x269166(0x26b)][_0x269166(0x191)](_0x151f22),{reply:_0x4b4c69,interaction:_0x406bf8}=this[_0x269166(0x229)](_0x404728[_0x269166(0x1ee)]),_0x279062=this[_0x269166(0x1cf)](_0x404728[_0x269166(0x1ee)],_0x404728[_0x269166(0x2bd)]),_0x431470=void 0x0!==_0x404728[_0x269166(0x2bd)]?[_0x4b4c69[_0x269166(0x1f0)][_0x404728[_0x269166(0x2bd)]]]:_0x4b4c69[_0x269166(0x1f0)][_0x269166(0x180)](_0x66654e=>_0x269166(0x22e)==_0x66654e[_0x269166(0x21d)]),_0x4abca1=_0x431470[_0x269166(0x1cc)](_0x2a4cf2=>_0x4b4c69[_0x269166(0x1f0)][_0x269166(0x266)](_0x2a4cf2));_0x4abca1[_0x269166(0x211)](_0x3cf057=>_0x4b4c69[_0x269166(0x1d2)](_0x3cf057,_0x269166(0x1cd)));const _0x2e05cd=_0x27c536({'editor':_0x16d349,'reply':_0x4b4c69,'interaction':_0x406bf8,'groups':_0x431470,'transform':!0x0,'documentCompare':_0x2019cd,'documentCompareOptions':{'anchor':_0x269166(0x196),'markDeletions':!0x1}});let _0x589abf;_0x279062&&this[_0x269166(0x29c)](_0x279062[_0x269166(0x2b4)]),_0x16d349[_0x269166(0x24b)][_0x269166(0x287)](_0x4f5118=>{const _0x119970=_0x269166;_0x589abf=_0x4f5118[_0x119970(0x28f)];for(const _0x52fb93 of _0x2e05cd)_0x52fb93[_0x119970(0x2ce)]=_0x16d349[_0x119970(0x24b)][_0x119970(0x29d)][_0x119970(0x24c)],_0x4f5118[_0x119970(0x28f)][_0x119970(0x1ea)](_0x52fb93),_0x16d349[_0x119970(0x24b)][_0x119970(0x1d3)](_0x52fb93);}),this[_0x269166(0x235)][_0x269166(0x242)](_0x589abf,{'interactionId':_0x406bf8['id'],'replyId':_0x4b4c69['id'],'indexes':_0x4abca1[_0x269166(0x257)]()}),this[_0x269166(0x2a0)](_0x4b4c69);}[_0x45e5cc(0x17b)](_0x4b02a2,_0x3437b3){const _0x11ca39=_0x45e5cc,_0x13dc98=_0x3cc6c6(this[_0x11ca39(0x251)]),_0x4eba88=this[_0x11ca39(0x1cf)](_0x4b02a2,_0x3437b3),_0x107b1b=this[_0x11ca39(0x251)][_0x11ca39(0x26b)][_0x11ca39(0x191)](_0x385be5);if(!_0x4eba88)return void _0x107b1b[_0x11ca39(0x2b5)]();const {range:_0x25ba22,currentIndex:_0x48b61a,previousIndex:_0x4fcbc2,nextIndex:_0x110cda}=_0x4eba88;if(this[_0x11ca39(0x27c)]?.[_0x11ca39(0x1ee)]==_0x4b02a2&&this[_0x11ca39(0x27c)]?.[_0x11ca39(0x2bd)]==_0x48b61a)return;this[_0x11ca39(0x27c)]={'replyId':_0x4b02a2,'partIndex':_0x48b61a};const _0x3d72b2=new _0x2c138a(_0x13dc98[_0x11ca39(0x23c)],{'showDiff':this[_0x11ca39(0x2ab)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x11ca39(0x17d)},'hideHeader':!0x0}),{reply:_0x4a793c}=this[_0x11ca39(0x229)](_0x4b02a2),_0xedc03=_0x1a511c({'editor':_0x13dc98,'changeGroups':[_0x4a793c[_0x11ca39(0x1f0)][_0x48b61a]],'documentContextContent':_0x4a793c[_0x11ca39(0x18a)],'showDiff':this[_0x11ca39(0x2ab)]});_0x3d72b2[_0x11ca39(0x183)]({'parts':_0xedc03,'renderingStrategy':_0x11ca39(0x20f)});const _0x3c2a0e=_0x48b61a!==_0x4fcbc2;this[_0x11ca39(0x29c)](_0x25ba22,!0x0),_0x107b1b[_0x11ca39(0x2c2)]({'index':_0x48b61a,'title':_0x3dfaa9(this[_0x11ca39(0x251)][_0x11ca39(0x23c)],_0x11ca39(0x1aa),(_0x48b61a+0x1)[_0x11ca39(0x1d4)]()),'icon':_0xf4914d,'mainView':_0x3d72b2,'showRotator':_0x3c2a0e,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x25ba22]}),this[_0x11ca39(0x24f)][_0x11ca39(0x250)](_0x4b02a2,_0x48b61a),this[_0x11ca39(0x262)](_0x3d72b2,_0x11ca39(0x1b7),(_0x1c038e,{showDiff:_0x473d83})=>{const _0x27110c=_0x11ca39;this[_0x27110c(0x2ab)]=_0x473d83;const {reply:_0x511e4a}=this[_0x27110c(0x229)](_0x4b02a2),_0x20a3e6=_0x1a511c({'editor':_0x13dc98,'changeGroups':[_0x511e4a[_0x27110c(0x1f0)][_0x48b61a]],'documentContextContent':_0x511e4a[_0x27110c(0x18a)],'showDiff':_0x473d83});_0x3d72b2[_0x27110c(0x183)]({'parts':_0x20a3e6,'renderingStrategy':_0x27110c(0x20f)});}),this[_0x11ca39(0x262)](_0x107b1b,_0x11ca39(0x27d),()=>{const _0x57e3ba=_0x11ca39;this[_0x57e3ba(0x296)]({'replyId':_0x4b02a2,'partIndex':_0x48b61a}),_0x3c2a0e?this[_0x57e3ba(0x17b)](_0x4b02a2,_0x110cda):_0x107b1b[_0x57e3ba(0x2b5)]();}),this[_0x11ca39(0x262)](_0x107b1b,_0x11ca39(0x2a2),()=>{const _0x146db3=_0x11ca39;this[_0x146db3(0x21c)]({'replyId':_0x4b02a2,'partIndex':_0x48b61a}),_0x3c2a0e?this[_0x146db3(0x17b)](_0x4b02a2,_0x110cda):_0x107b1b[_0x146db3(0x2b5)]();}),_0x3c2a0e&&(this[_0x11ca39(0x262)](_0x107b1b,_0x11ca39(0x1bd),()=>{const _0x231b9e=_0x11ca39;this[_0x231b9e(0x17b)](_0x4b02a2,_0x110cda);}),this[_0x11ca39(0x262)](_0x107b1b,_0x11ca39(0x239),()=>{const _0x19fe2c=_0x11ca39;this[_0x19fe2c(0x17b)](_0x4b02a2,_0x4fcbc2);})),this[_0x11ca39(0x262)](_0x107b1b,_0x11ca39(0x231),()=>{const _0x4d785e=_0x11ca39;this[_0x4d785e(0x25a)](_0x107b1b),this[_0x4d785e(0x25a)](_0x3d72b2),this[_0x4d785e(0x27c)]=null;});}[_0x45e5cc(0x1cf)](_0x484b98,_0x4e5228){const _0x5f49ab=_0x45e5cc,_0x1cab8e=_0x3cc6c6(this[_0x5f49ab(0x251)]),{reply:_0x5dd20b,interaction:_0x475959}=this[_0x5f49ab(0x229)](_0x484b98),_0x25bb0e=_0x5dd20b[_0x5f49ab(0x1f0)][_0x5f49ab(0x180)](_0x142cad=>_0x5f49ab(0x22e)==_0x142cad[_0x5f49ab(0x21d)]),_0x14389b=_0x25bb0e[_0x5f49ab(0x1cc)](_0x5c1fe8=>_0x5dd20b[_0x5f49ab(0x1f0)][_0x5f49ab(0x266)](_0x5c1fe8));void 0x0===_0x4e5228&&(_0x4e5228=_0x14389b[0x0]);const _0x1e63ac=_0x14389b[_0x5f49ab(0x266)](_0x4e5228);if(-0x1==_0x1e63ac)return null;const _0x3a83c8=0x0==_0x1e63ac?_0x14389b[_0x14389b[_0x5f49ab(0x190)]-0x1]:_0x14389b[_0x1e63ac-0x1],_0x562b87=_0x1e63ac==_0x14389b[_0x5f49ab(0x190)]-0x1?_0x14389b[0x0]:_0x14389b[_0x1e63ac+0x1],_0x3ec794=_0x25bb0e[_0x1e63ac],_0x311da8=new _0x284939([]),_0x478a9d=new _0x284939([]);for(const _0x2b0826 of _0x3ec794[_0x5f49ab(0x26a)])if(_0x5f49ab(0x297)!=_0x2b0826[_0x5f49ab(0x1c9)]&&_0x478a9d[_0x5f49ab(0x26d)][_0x5f49ab(0x21a)](_0x2b0826[_0x5f49ab(0x18c)][_0x5f49ab(0x17c)](!0x0)),_0x5f49ab(0x286)!=_0x2b0826[_0x5f49ab(0x1c9)]){const _0xccb8fb=_0x2327f3(_0x392936=>_0x2777d2(_0x392936,_0x5f49ab(0x2bb))==_0x2b0826['id'],_0x5dd20b[_0x5f49ab(0x18a)],!0x0);_0x311da8[_0x5f49ab(0x26d)][_0x5f49ab(0x21a)](_0xccb8fb[_0x5f49ab(0x17c)](!0x0));}if(0x0==_0x311da8[_0x5f49ab(0x26d)][_0x5f49ab(0x190)]){if(_0x3ec794[_0x5f49ab(0x26a)][0x0][_0x5f49ab(0x1b4)]){const _0x3e3650=_0x5885d0(_0x5f49ab(0x2bb),_0x3ec794[_0x5f49ab(0x26a)][0x0][_0x5f49ab(0x1b4)],_0x5dd20b[_0x5f49ab(0x18a)]);_0x311da8[_0x5f49ab(0x26d)][_0x5f49ab(0x1af)](_0x3e3650[_0x5f49ab(0x17c)](!0x0)),_0x478a9d[_0x5f49ab(0x26d)][_0x5f49ab(0x1af)](_0x3e3650[_0x5f49ab(0x17c)](!0x0)),_0x3e3650[_0x5f49ab(0x228)]&&(_0x311da8[_0x5f49ab(0x26d)][_0x5f49ab(0x21a)](_0x3e3650[_0x5f49ab(0x228)][_0x5f49ab(0x17c)](!0x0)),_0x478a9d[_0x5f49ab(0x26d)][_0x5f49ab(0x21a)](_0x3e3650[_0x5f49ab(0x228)][_0x5f49ab(0x17c)](!0x0)));}else{const _0x4742d1=_0x5dd20b[_0x5f49ab(0x18a)][_0x5f49ab(0x26d)][0x0];if(!_0x4742d1)return null;_0x311da8[_0x5f49ab(0x26d)][_0x5f49ab(0x21a)](_0x4742d1[_0x5f49ab(0x17c)](!0x0)),_0x478a9d[_0x5f49ab(0x26d)][_0x5f49ab(0x21a)](_0x4742d1[_0x5f49ab(0x17c)](!0x0));}}const _0x132388=_0x475959[_0x5f49ab(0x1f9)](),_0x26cca2=_0x1cab8e[_0x5f49ab(0x1f2)][_0x5f49ab(0x1f3)](_0x132388[_0x5f49ab(0x28a)]),_0x1d188c=_0x30a863(_0x311da8),_0x402783=_0x1cab8e[_0x5f49ab(0x1f2)][_0x5f49ab(0x1f3)](_0x1d188c),_0x10c314=_0x1cab8e[_0x5f49ab(0x1f2)][_0x5f49ab(0x1f3)](_0x1d188c),_0x20863a=_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x2af)](_0x402783,0x0),_0x12b5ce=_0x30a863(_0x478a9d),_0x4da7b4={'anchor':_0x20863a,'markDeletions':!0x1},_0x35f590=_0x1cab8e[_0x5f49ab(0x26b)][_0x5f49ab(0x191)](_0x151f22)[_0x5f49ab(0x193)](_0x1d188c,_0x12b5ce,_0x4da7b4)[_0x5f49ab(0x22f)]();if(!_0x35f590[_0x5f49ab(0x190)])return null;_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x287)](_0x42ff38=>{const _0x454de4=_0x5f49ab;for(const _0x393465 of _0x35f590)if(_0x454de4(0x194)==_0x393465[_0x454de4(0x1c9)]){const _0x2e2f54=_0x393465[_0x454de4(0x25b)],_0x4ab9a6=_0x393465[_0x454de4(0x1d0)],_0x2bb8d6=new _0x10e379(_0x2e2f54,_0x4ab9a6);_0x42ff38[_0x454de4(0x28f)][_0x454de4(0x1ea)](_0x2bb8d6),_0x1cab8e[_0x454de4(0x24b)][_0x454de4(0x1d3)](_0x2bb8d6);}else _0x454de4(0x284)!==_0x393465[_0x454de4(0x1c9)]&&(_0x393465[_0x454de4(0x2ce)]=null,_0x393465[_0x454de4(0x215)]=!0x1,_0x42ff38[_0x454de4(0x28f)][_0x454de4(0x1ea)](_0x393465),_0x1cab8e[_0x454de4(0x24b)][_0x454de4(0x1d3)](_0x393465));});const _0x2ace6e=_0x1d20c2(_0x1cab8e,_0x35f590,_0x402783);_0x16a2b5(_0x1cab8e[_0x5f49ab(0x24b)],_0x2ace6e);const _0x2cdd73=_0x2ace6e[_0x5f49ab(0x273)]()[_0x5f49ab(0x275)][_0x5f49ab(0x20a)][_0x5f49ab(0x257)](),_0x44c0ab=_0x2ace6e[_0x5f49ab(0x273)]()[_0x5f49ab(0x263)][_0x5f49ab(0x20a)][_0x5f49ab(0x257)](),_0x3147e9=[];let _0x135aa8=_0x402783,_0x223870=_0x10c314;for(let _0x586169=0x0;_0x586169<_0x44c0ab[_0x5f49ab(0x190)];_0x586169++){const _0x279d86=_0x135aa8[_0x5f49ab(0x1fa)]-_0x44c0ab[_0x586169];_0x3147e9[_0x586169]=_0x223870[_0x5f49ab(0x1fa)]-_0x279d86,_0x135aa8=_0x135aa8[_0x5f49ab(0x26f)](_0x44c0ab[_0x586169]),_0x223870=_0x223870[_0x5f49ab(0x26f)](_0x3147e9[_0x586169]);}const _0x293432=_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x24a)](_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x28b)](_0x10c314,_0x2cdd73),_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x28b)](_0x10c314,_0x3147e9)),_0x1cca13=_0x10c314[_0x5f49ab(0x1c0)](0x0)[_0x5f49ab(0x20c)](_0x39eb9b),_0x1d7c76=Array[_0x5f49ab(0x1e3)](_0x26cca2[_0x5f49ab(0x227)]())[_0x5f49ab(0x21e)](_0x158f1a=>_0x158f1a[_0x5f49ab(0x20c)](_0x39eb9b)==_0x1cca13)[_0x5f49ab(0x179)](),_0x3582cd=_0x293432[_0x5f49ab(0x275)][_0x5f49ab(0x20a)][_0x5f49ab(0x257)](),_0x4ef354=_0x293432[_0x5f49ab(0x263)][_0x5f49ab(0x20a)][_0x5f49ab(0x257)]();_0x3582cd[0x0]=_0x1d7c76[0x0]+_0x3582cd[0x0],_0x4ef354[0x0]=_0x1d7c76[0x0]+_0x4ef354[0x0];let _0x1aff40=_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x24a)](_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x28b)](_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x29d)][_0x5f49ab(0x285)](),_0x3582cd),_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x28b)](_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x29d)][_0x5f49ab(0x285)](),_0x4ef354));const _0xd4a72f=_0x1cab8e[_0x5f49ab(0x24b)][_0x5f49ab(0x29d)][_0x5f49ab(0x271)][_0x5f49ab(0x22f)](_0x132388[_0x5f49ab(0x24c)]);for(const _0x1c325c of _0xd4a72f)_0x1aff40=_0x503dc3[_0x5f49ab(0x19d)](_0x1aff40[_0x5f49ab(0x19b)](_0x1c325c));return{'range':_0x1aff40,'previousIndex':_0x3a83c8,'nextIndex':_0x562b87,'currentIndex':_0x4e5228};}[_0x45e5cc(0x29b)](_0x27b487){const _0xee507b=_0x45e5cc;if(!_0x27b487[_0xee507b(0x26b)][_0xee507b(0x1e0)](_0xee507b(0x29e)))return;const _0x2645a2=_0x27b487[_0xee507b(0x2ac)][_0xee507b(0x191)](_0xee507b(0x22b)),_0x5ad454=_0x27b487[_0xee507b(0x2ac)][_0xee507b(0x191)](_0xee507b(0x283));this[_0xee507b(0x262)](_0x2645a2,_0xee507b(0x1ad),(_0x536b78,_0x3eadbe,_0x1fb493)=>{const _0x35049b=_0xee507b,_0x3c3867=this[_0x35049b(0x235)][_0x35049b(0x191)](_0x3eadbe);if(!_0x3c3867)return;const _0x42505f=this[_0x35049b(0x1fe)][_0x35049b(0x1e2)](_0x3c3867[_0x35049b(0x2a3)])[_0x35049b(0x18d)](_0x3c3867[_0x35049b(0x1ee)]);_0x3c3867[_0x35049b(0x299)][_0x35049b(0x211)](_0xb7422a=>_0x42505f[_0x35049b(0x1d2)](_0xb7422a,_0x35049b(0x22e))),this[_0x35049b(0x235)][_0x35049b(0x181)](_0x3eadbe),this[_0x35049b(0x235)][_0x35049b(0x242)](_0x1fb493,_0x3c3867);}),this[_0xee507b(0x262)](_0x5ad454,_0xee507b(0x1ad),(_0x4662fc,_0x3d56c3,_0x2595f2)=>{const _0x3f6c1f=_0xee507b,_0x48abdf=this[_0x3f6c1f(0x235)][_0x3f6c1f(0x191)](_0x3d56c3);if(!_0x48abdf)return;const _0x755339=this[_0x3f6c1f(0x1fe)][_0x3f6c1f(0x1e2)](_0x48abdf[_0x3f6c1f(0x2a3)])[_0x3f6c1f(0x18d)](_0x48abdf[_0x3f6c1f(0x1ee)]);_0x48abdf[_0x3f6c1f(0x299)][_0x3f6c1f(0x211)](_0x710b59=>_0x755339[_0x3f6c1f(0x1d2)](_0x710b59,_0x3f6c1f(0x1cd))),this[_0x3f6c1f(0x235)][_0x3f6c1f(0x181)](_0x3d56c3),this[_0x3f6c1f(0x235)][_0x3f6c1f(0x242)](_0x2595f2,_0x48abdf);});}async[_0x45e5cc(0x1ed)](_0x477c2e){const _0x429978=_0x45e5cc;this[_0x429978(0x251)][_0x429978(0x26b)][_0x429978(0x191)](_0x385be5)[_0x429978(0x2b5)](),this[_0x429978(0x24f)][_0x429978(0x187)](_0x429978(0x20f)),this[_0x429978(0x24f)][_0x429978(0x2b7)](!0x0),await this[_0x429978(0x218)]();try{const _0x2ea007=this[_0x429978(0x251)][_0x429978(0x26b)][_0x429978(0x191)](_0x2cb794);this[_0x429978(0x25f)]('\x20'),_0x2ea007[_0x429978(0x2b8)][_0x429978(0x195)](_0x429978(0x2cd)),await this[_0x429978(0x272)](_0x477c2e);const {sessionId:_0x442979}=this[_0x429978(0x204)][_0x429978(0x277)]();await this[_0x429978(0x1fe)][_0x429978(0x1c2)](_0x477c2e,_0x442979),this[_0x429978(0x1fe)][_0x429978(0x2a7)]()&&this[_0x429978(0x1fe)][_0x429978(0x2a5)](_0x3dfaa9(this[_0x429978(0x251)][_0x429978(0x23c)],_0x429978(0x29f)));}catch(_0xd1e228){console[_0x429978(0x1ce)](_0x429978(0x29a),_0xd1e228);}finally{this[_0x429978(0x24f)][_0x429978(0x187)](_0x429978(0x192)),this[_0x429978(0x24f)][_0x429978(0x2b7)](!0x1);}}[_0x45e5cc(0x28e)](_0x3624d0){const _0x3c50b1=_0x45e5cc;this[_0x3c50b1(0x1fe)]['id']===_0x3624d0&&this[_0x3c50b1(0x272)]();}async[_0x45e5cc(0x1b2)](){const _0x2ee722=_0x45e5cc,_0x1fa18b=this[_0x2ee722(0x204)][_0x2ee722(0x268)]();this[_0x2ee722(0x1fe)]?.[_0x2ee722(0x1f1)](_0x1fa18b),this[_0x2ee722(0x1fe)]?.[_0x2ee722(0x2a5)](_0x3dfaa9(this[_0x2ee722(0x251)][_0x2ee722(0x23c)],_0x2ee722(0x29f)));}[_0x45e5cc(0x208)](){const _0x1fb5f2=_0x45e5cc;this[_0x1fb5f2(0x1fe)]?.[_0x1fb5f2(0x2ae)]();}[_0x45e5cc(0x261)](){const _0x1c0438=_0x45e5cc;this[_0x1c0438(0x24f)][_0x1c0438(0x261)]();}async[_0x45e5cc(0x24e)](){const _0x5b8c6d=_0x45e5cc;await this[_0x5b8c6d(0x272)]();}async[_0x45e5cc(0x20b)]({message:_0x43ec18,quickActionData:_0x180f86}){const _0x4dbd48=_0x45e5cc;await this[_0x4dbd48(0x279)]({'userMessage':_0x43ec18,'quickActionData':_0x180f86});}[_0x45e5cc(0x214)](){const _0x53254b=_0x45e5cc,_0x5acb75=this[_0x53254b(0x251)][_0x53254b(0x293)][_0x53254b(0x191)](_0x53254b(0x198));if(!_0x5acb75)throw new _0x16faf9(_0x53254b(0x17a),this);return _0x5acb75;}async[_0x45e5cc(0x272)](_0x928679){const _0x58a981=_0x45e5cc;try{this[_0x58a981(0x24f)][_0x58a981(0x2a9)](),await this[_0x58a981(0x1dd)](_0x928679);}catch(_0x20a9c0){_0x50a61f(_0x58a981(0x1a5),_0x20a9c0),this[_0x58a981(0x1fe)]=void 0x0,this[_0x58a981(0x24f)][_0x58a981(0x1e1)]();}}async[_0x45e5cc(0x1dd)](_0x1d9c04){const _0x139c2a=_0x45e5cc,_0x2ad8bd=this[_0x139c2a(0x251)][_0x139c2a(0x26b)][_0x139c2a(0x191)](_0x385be5);let _0x5c75b4;_0x2ad8bd[_0x139c2a(0x292)]&&_0x2ad8bd[_0x139c2a(0x2b5)](),_0x5c75b4=_0x1d9c04||!this[_0x139c2a(0x1fe)]?this[_0x139c2a(0x251)][_0x139c2a(0x293)][_0x139c2a(0x191)](_0x139c2a(0x2a6)):this[_0x139c2a(0x1fe)][_0x139c2a(0x207)]['id'],await this[_0x139c2a(0x218)]();const _0x31c609=this[_0x139c2a(0x214)](),_0x271752=_0x1d9c04||_0x2d2414();this[_0x139c2a(0x1fe)]=new _0x28056c({'connector':this[_0x139c2a(0x2b3)],'chatModels':this[_0x139c2a(0x1ef)],'defaultModelId':_0x5c75b4,'conversationId':_0x271752,'group':_0x31c609,'getEditor':()=>_0x3cc6c6(this[_0x139c2a(0x251)])}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x210),(_0x495a9e,_0x3eb520)=>{const _0x1fad67=_0x139c2a;_0x3eb520[_0x1fad67(0x1a2)]=this[_0x1fad67(0x234)](_0x3eb520[_0x1fad67(0x1a2)],this[_0x1fad67(0x251)][_0x1fad67(0x293)][_0x1fad67(0x191)](_0x1fad67(0x1cb))),this[_0x1fad67(0x24f)][_0x1fad67(0x21b)](_0x3eb520),this[_0x1fad67(0x24f)][_0x1fad67(0x1a4)](),this[_0x1fad67(0x24f)][_0x1fad67(0x219)](),this[_0x1fad67(0x24f)][_0x1fad67(0x22c)](),_0x1d9c04||(this[_0x1fad67(0x24f)][_0x1fad67(0x256)](),this[_0x1fad67(0x1fe)]?.[_0x1fad67(0x2a5)](_0x3dfaa9(this[_0x1fad67(0x251)][_0x1fad67(0x23c)],_0x1fad67(0x29f))));}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x205),(_0x14514f,_0x2ac49e)=>{const _0x144b06=_0x139c2a;this[_0x144b06(0x24f)][_0x144b06(0x1f4)](_0x2ac49e[_0x144b06(0x289)]);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x2cb),(_0x231c50,_0x16eb05)=>{const _0x2b68a4=_0x139c2a;this[_0x2b68a4(0x24f)][_0x2b68a4(0x202)](_0x16eb05);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x28d),()=>{const _0x2842b1=_0x139c2a;this[_0x2842b1(0x24f)][_0x2842b1(0x1b3)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x2c0),()=>{const _0xa89a6b=_0x139c2a;this[_0xa89a6b(0x24f)][_0xa89a6b(0x1b3)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x25c),(_0x5af0cd,_0x43bc3f)=>{const _0x2c8321=_0x139c2a;this[_0x2c8321(0x24f)][_0x2c8321(0x1d6)](_0x43bc3f,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x291),(_0xee4183,_0x402002)=>{const _0x5d4419=_0x139c2a;this[_0x5d4419(0x24f)][_0x5d4419(0x1d6)](_0x402002,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x2cf),()=>{const _0x46e120=_0x139c2a;this[_0x46e120(0x24f)][_0x46e120(0x27e)]();}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x1a0),async()=>{const _0x4cd462=_0x139c2a;await this[_0x4cd462(0x24f)][_0x4cd462(0x221)]();}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x225),(_0x2c0657,_0x2a1a52)=>{const _0x5b727c=_0x139c2a;this[_0x5b727c(0x24f)][_0x5b727c(0x243)](_0x2a1a52['id']);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x1bc),(_0x4ed305,_0x25d785,_0x27fa35)=>{const _0x33b0da=_0x139c2a;this[_0x33b0da(0x25f)](_0x25d785,_0x27fa35);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x223),(_0x27e5fd,_0xb298ed)=>{const _0x5aa101=_0x139c2a;_0x5aa101(0x259)===_0xb298ed[_0x5aa101(0x1c9)]?this[_0x5aa101(0x24f)][_0x5aa101(0x23a)](_0xb298ed):this[_0x5aa101(0x24f)][_0x5aa101(0x200)](_0xb298ed);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x182),async(_0x2aea7d,_0x3f6a41,_0x351cbd)=>{const _0x32c6ac=_0x139c2a;await this[_0x32c6ac(0x1e8)]({'reply':_0x3f6a41,'changeGroups':_0x351cbd});}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x2b2),(_0x4424fb,{reply:_0x5efe25,index:_0x176c32,state:_0x2c767c})=>{const _0x5d92a1=_0x139c2a;this[_0x5d92a1(0x24f)][_0x5d92a1(0x294)]({'id':_0x5efe25['id'],'index':_0x176c32,'state':_0x2c767c});}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x2c5),(_0x52d171,_0x4a9368)=>{const _0x56c1fd=_0x139c2a;if(this[_0x56c1fd(0x24f)][_0x56c1fd(0x1ff)](_0x4a9368[_0x56c1fd(0x203)],_0x4a9368[_0x56c1fd(0x23f)]),_0x56c1fd(0x1b5)===_0x4a9368[_0x56c1fd(0x203)][_0x56c1fd(0x1c9)]){const _0xa6185c=[..._0x3cc6c6(this[_0x56c1fd(0x251)])[_0x56c1fd(0x24b)][_0x56c1fd(0x29d)][_0x56c1fd(0x1b5)][_0x56c1fd(0x27f)]()];this[_0x56c1fd(0x204)][_0x56c1fd(0x26e)](_0xa6185c,_0x56c1fd(0x233)+this[_0x56c1fd(0x1fe)]?.['id']);}}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x177),(_0x31acd7,_0x2e3152)=>{const _0x3fefa0=_0x139c2a;this[_0x3fefa0(0x24f)][_0x3fefa0(0x1a7)](_0x2e3152[_0x3fefa0(0x1fc)]),_0x3fefa0(0x1e4)==_0x2e3152[_0x3fefa0(0x1fc)]&&this[_0x3fefa0(0x208)](),_0x3fefa0(0x1b5)===_0x2e3152[_0x3fefa0(0x1c9)]&&this[_0x3fefa0(0x204)][_0x3fefa0(0x260)](_0x3fefa0(0x233)+this[_0x3fefa0(0x1fe)]?.['id']);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x17f),(_0x66f75a,_0x30621c)=>{const _0xbcce4=_0x139c2a;this[_0xbcce4(0x24f)][_0xbcce4(0x264)](_0x30621c[_0xbcce4(0x203)][_0xbcce4(0x1fc)],_0x30621c[_0xbcce4(0x23f)]);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x1b6),(_0x31b958,_0x7ddbab)=>{const _0x40f854=_0x139c2a;this[_0x40f854(0x24f)][_0x40f854(0x2c6)](_0x7ddbab[_0x40f854(0x249)]);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x20e),(_0xc85c7,_0xe573c9)=>{const _0x4ee86c=_0x139c2a;this[_0x4ee86c(0x24f)][_0x4ee86c(0x1b8)](_0xe573c9[_0x4ee86c(0x267)]);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x230),(_0x5824d3,_0x3abcb0)=>{const _0x5b015a=_0x139c2a;this[_0x5b015a(0x24f)][_0x5b015a(0x1fb)](_0x3abcb0[_0x5b015a(0x2a1)],_0x3abcb0[_0x5b015a(0x184)],_0x3abcb0[_0x5b015a(0x1c1)],_0x3abcb0[_0x5b015a(0x19e)]);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x274),(_0x34e8b0,_0x5af76b)=>{const _0xc15e45=_0x139c2a;this[_0xc15e45(0x24f)][_0xc15e45(0x1eb)](_0x5af76b[_0xc15e45(0x2a1)],_0x5af76b[_0xc15e45(0x253)],_0x5af76b[_0xc15e45(0x290)]);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x1d8),(_0x33d22f,_0x5f4847)=>{const _0x3fa006=_0x139c2a;this[_0x3fa006(0x24f)][_0x3fa006(0x288)](_0x5f4847);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x1bb),(_0x46f589,_0x635b3b)=>{const _0x1d4921=_0x139c2a;this[_0x1d4921(0x24f)][_0x1d4921(0x281)](_0x635b3b[_0x1d4921(0x207)],_0x635b3b[_0x1d4921(0x27a)]);}),this[_0x139c2a(0x1fe)]['on'](_0x139c2a(0x1ce),(_0x302208,{error:_0x58fd8d,interactionId:_0x588da6,fileName:_0x2715fa,url:_0x139a24,sourceId:_0x8254b8,sourceLabel:_0xdfc5ca})=>{const _0x111b0a=_0x139c2a,_0x56a629=_0x588da6?_0x588da6+':'+_0x2d2414():_0x2d2414();_0x58fd8d[_0x111b0a(0x189)][_0x111b0a(0x2bf)](_0x111b0a(0x25e))?this[_0x111b0a(0x24f)][_0x111b0a(0x26c)]({'staticMessage':_0x3dfaa9(this[_0x111b0a(0x251)][_0x111b0a(0x23c)],_0x111b0a(0x236)),'id':_0x56a629}):_0x58fd8d[_0x111b0a(0x189)][_0x111b0a(0x2bf)](_0x111b0a(0x1ec))||_0x58fd8d[_0x111b0a(0x189)][_0x111b0a(0x2bf)](_0x111b0a(0x1a5))?(this[_0x111b0a(0x24f)][_0x111b0a(0x25d)]({'errorMessage':_0x3dfaa9(this[_0x111b0a(0x251)][_0x111b0a(0x23c)],_0x111b0a(0x178)),'id':_0x56a629}),this[_0x111b0a(0x1d5)](_0x58fd8d)):_0x58fd8d[_0x111b0a(0x189)][_0x111b0a(0x2bf)](_0x111b0a(0x1f7))?this[_0x111b0a(0x24f)][_0x111b0a(0x25d)]({'errorMessage':_0x3dfaa9(this[_0x111b0a(0x251)][_0x111b0a(0x23c)],_0x111b0a(0x2b0),_0x2715fa),'id':_0x56a629}):_0x58fd8d[_0x111b0a(0x189)][_0x111b0a(0x2bf)](_0x111b0a(0x1d7))?this[_0x111b0a(0x24f)][_0x111b0a(0x25d)]({'errorMessage':_0x3dfaa9(this[_0x111b0a(0x251)][_0x111b0a(0x23c)],_0x111b0a(0x19c),_0x139a24),'id':_0x56a629}):_0x58fd8d[_0x111b0a(0x189)][_0x111b0a(0x2bf)](_0x111b0a(0x2c8))?this[_0x111b0a(0x24f)][_0x111b0a(0x25d)]({'errorMessage':_0x3dfaa9(this[_0x111b0a(0x251)][_0x111b0a(0x23c)],_0x111b0a(0x1fd)),'id':_0x56a629}):_0x58fd8d[_0x111b0a(0x189)][_0x111b0a(0x2bf)](_0x111b0a(0x20d))?this[_0x111b0a(0x24f)][_0x111b0a(0x25d)]({'errorMessage':_0x3dfaa9(this[_0x111b0a(0x251)][_0x111b0a(0x23c)],_0x111b0a(0x1c3)),'id':_0x56a629}):_0x58fd8d[_0x111b0a(0x189)][_0x111b0a(0x2bf)](_0x111b0a(0x23d))?(_0x8254b8&&this[_0x111b0a(0x24f)][_0x111b0a(0x1c8)](_0x8254b8),this[_0x111b0a(0x24f)][_0x111b0a(0x25d)]({'errorMessage':_0x3dfaa9(this[_0x111b0a(0x251)][_0x111b0a(0x23c)],_0x111b0a(0x188),_0xdfc5ca||_0x111b0a(0x184)),'id':_0x56a629}),this[_0x111b0a(0x1d5)](_0x58fd8d)):_0x58fd8d[_0x111b0a(0x189)][_0x111b0a(0x2bf)](_0x111b0a(0x232))?(this[_0x111b0a(0x24f)][_0x111b0a(0x25d)]({'errorMessage':_0x3dfaa9(this[_0x111b0a(0x251)][_0x111b0a(0x23c)],_0x111b0a(0x2c1)),'id':_0x56a629}),this[_0x111b0a(0x1d5)](_0x58fd8d)):(this[_0x111b0a(0x24f)][_0x111b0a(0x25d)]({'errorMessage':_0x3dfaa9(this[_0x111b0a(0x251)][_0x111b0a(0x23c)],_0x111b0a(0x201)),'id':_0x56a629}),this[_0x111b0a(0x1d5)](_0x58fd8d));}),await this[_0x139c2a(0x1fe)][_0x139c2a(0x282)](this[_0x139c2a(0x251)][_0x139c2a(0x293)][_0x139c2a(0x191)](_0x139c2a(0x1be))),_0x1d9c04||await this[_0x139c2a(0x1fe)][_0x139c2a(0x275)]();}async[_0x45e5cc(0x279)]({userMessage:_0x4dd081,quickActionData:_0x3d425d}){const _0x493238=_0x45e5cc;if(!this[_0x493238(0x1fe)])throw new _0x16faf9(_0x493238(0x238));this[_0x493238(0x1fe)][_0x493238(0x185)]()&&await this[_0x493238(0x1fe)][_0x493238(0x1c4)](this[_0x493238(0x204)][_0x493238(0x277)]()),this[_0x493238(0x1fe)]['id']&&this[_0x493238(0x1fe)][_0x493238(0x197)]&&await this[_0x493238(0x1fe)][_0x493238(0x2d0)]({'userMessage':_0x4dd081,'quickActionData':_0x3d425d}),this[_0x493238(0x1e5)]();}[_0x45e5cc(0x1e5)](){const _0x385360=_0x45e5cc,_0x24d1ca=_0x3cc6c6(this[_0x385360(0x251)])[_0x385360(0x24b)],_0x831f7e=Array[_0x385360(0x1e3)](_0x24d1ca[_0x385360(0x1a1)][_0x385360(0x1ca)](_0x38ead6));_0x24d1ca[_0x385360(0x287)](_0x5de4a6=>{const _0x2a1899=_0x385360;_0x831f7e[_0x2a1899(0x211)](_0x154c81=>_0x5de4a6[_0x2a1899(0x24d)](_0x154c81));});}[_0x45e5cc(0x18b)](){const _0x28942e=_0x45e5cc;console[_0x28942e(0x2b6)](_0x28942e(0x18f));}[_0x45e5cc(0x209)](_0x5e9321){const _0x16d385=_0x45e5cc;this[_0x16d385(0x24f)][_0x16d385(0x1e9)](_0x5e9321);}[_0x45e5cc(0x1d5)](_0x109714){const _0x3444c9=_0x45e5cc;_0x50a61f(_0x109714[_0x3444c9(0x189)]);}[_0x45e5cc(0x1d9)](_0x30c5d8){const _0x270c0b=_0x45e5cc;this[_0x270c0b(0x1fe)]?.[_0x270c0b(0x2c4)](_0x30c5d8);}[_0x45e5cc(0x1ac)](){const _0x33ab6f=_0x45e5cc;this[_0x33ab6f(0x1fe)]?.[_0x33ab6f(0x247)]();}[_0x45e5cc(0x1e7)](){const _0xd4d44f=_0x45e5cc;this[_0xd4d44f(0x1fe)]?.[_0xd4d44f(0x295)]();}[_0x45e5cc(0x229)](_0x47023e){const _0x451e4c=_0x45e5cc,[_0x392c7a,_0x486bfd]=_0x47023e[_0x451e4c(0x1f8)](':'),_0x38cb6a=this[_0x451e4c(0x1fe)][_0x451e4c(0x1e2)](_0x392c7a),_0x30d756=_0x38cb6a[_0x451e4c(0x18d)](_0x486bfd);return{'interaction':_0x38cb6a,'reply':_0x30d756};}[_0x45e5cc(0x29c)](_0x26b2e1,_0x1bc453=!0x1){const _0x31a0b6=_0x45e5cc,_0x31fa02=_0x3cc6c6(this[_0x31a0b6(0x251)]),_0x357f44={'target':_0x31fa02[_0x31a0b6(0x258)][_0x31a0b6(0x2b8)][_0x31a0b6(0x2aa)][_0x31a0b6(0x1c6)](_0x31fa02[_0x31a0b6(0x258)][_0x31a0b6(0x246)][_0x31a0b6(0x1c7)](_0x26b2e1)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x1bc453};_0x1bc453&&(_0x357f44[_0x31a0b6(0x226)]=!0x0),_0x2339dd(_0x357f44);}[_0x45e5cc(0x25f)](_0x789f93,_0x3696b8=!0x1){const _0x28816e=_0x45e5cc;this[_0x28816e(0x24f)][_0x28816e(0x1bc)](_0x789f93||_0x3dfaa9(this[_0x28816e(0x251)][_0x28816e(0x23c)],_0x28816e(0x23b)),_0x3696b8);}[_0x45e5cc(0x234)](_0x46ea30,_0x81f92f){const _0x210630=_0x45e5cc;let _0xd9ab61;if(_0x81f92f){_0xd9ab61=[];const _0x3456b0=_0x210630(0x199)==typeof _0x81f92f?[_0x81f92f[_0x210630(0x1de)]()]:_0x81f92f[_0x210630(0x1cc)](_0x1002ad=>_0x1002ad[_0x210630(0x1de)]());for(const _0x18fa78 of _0x3456b0)for(const _0x49cc4b of _0x46ea30)(_0x49cc4b['id'][_0x210630(0x1de)]()===_0x18fa78||_0x49cc4b[_0x210630(0x1db)][_0x210630(0x1de)]()===_0x18fa78||_0x49cc4b[_0x210630(0x1e6)][_0x210630(0x1de)]()===_0x18fa78||_0x49cc4b['id'][_0x210630(0x1de)]()[_0x210630(0x2bf)](_0x18fa78))&&_0xd9ab61[_0x210630(0x21a)](_0x49cc4b);}else _0xd9ab61=_0x46ea30;return _0xd9ab61;}async[_0x45e5cc(0x1e8)]({reply:_0x5601ef,changeGroups:_0x570ec4,renderingStrategy:_0x311f77}){const _0x27d549=_0x45e5cc,{id:_0x43b641,isDone:_0x4d67d6,type:_0x1662ad,parsedContent:_0x5cca3b}=_0x5601ef;if(_0x27d549(0x278)===_0x1662ad){const _0x4329db=_0x3cc6c6(this[_0x27d549(0x251)]),_0x51229a=_0x1a511c({'editor':_0x4329db,'showDiff':this[_0x27d549(0x24f)][_0x27d549(0x1b1)],'changeGroups':_0x570ec4,'documentContextContent':_0x5601ef[_0x27d549(0x18a)]});await this[_0x27d549(0x24f)][_0x27d549(0x1b0)]({'id':_0x43b641,'parts':_0x51229a,'renderingStrategy':_0x311f77,'isDone':_0x4d67d6});}else _0x27d549(0x259)===_0x1662ad&&await this[_0x27d549(0x24f)][_0x27d549(0x276)]({'id':_0x43b641,'parsedContent':_0x5cca3b,'renderingStrategy':_0x311f77,'isDone':_0x4d67d6});_0x4d67d6&&_0x5601ef[_0x27d549(0x1a9)][_0x27d549(0x190)]>0x0&&this[_0x27d549(0x24f)][_0x27d549(0x244)](_0x43b641,_0x5601ef[_0x27d549(0x1a9)]);}async[_0x45e5cc(0x218)](){const _0x4a14fd=_0x45e5cc,_0x15ff42=this[_0x4a14fd(0x1fe)]?.[_0x4a14fd(0x241)];_0x15ff42&&(_0x15ff42[_0x4a14fd(0x2a4)](),this[_0x4a14fd(0x24f)][_0x4a14fd(0x212)](_0x15ff42));}async[_0x45e5cc(0x21f)](){const _0x49967d=_0x45e5cc,_0x425ad8=this[_0x49967d(0x1fe)]?.[_0x49967d(0x241)];if(_0x425ad8){for await(const _0x1162ac of _0x425ad8[_0x49967d(0x22a)])await this[_0x49967d(0x1e8)]({'reply':_0x1162ac,'changeGroups':_0x1162ac[_0x49967d(0x1f0)],'renderingStrategy':_0x49967d(0x20f)});}}[_0x45e5cc(0x2a0)](_0x3702f3){const _0x284f5b=_0x45e5cc,_0x15acd9={'positiveCount':_0x3702f3[_0x284f5b(0x1f0)][_0x284f5b(0x180)](_0x265013=>_0x284f5b(0x1cd)===_0x265013[_0x284f5b(0x21d)])[_0x284f5b(0x190)],'totalCount':_0x3702f3[_0x284f5b(0x1f0)][_0x284f5b(0x190)]},_0x3e8cf5=this[_0x284f5b(0x1fe)][_0x284f5b(0x1e2)](_0x3702f3[_0x284f5b(0x2a3)])[_0x284f5b(0x19a)];this[_0x284f5b(0x2b3)][_0x284f5b(0x2c3)](this[_0x284f5b(0x1fe)]['id'],_0x3e8cf5,_0x15acd9);}}function _0x344d(){const _0x56b3d7=['revert','rejected','unshift','updateFeedItemAIReplySuggestionContent','showDiff','addSelectionToChatContext','setLoadingMessage','anchorId','selection','contextSent','toggleSuggestionDisplayMode','setAddContextOptions','AITabs','TrackChangesEditing','modelSelected','setConversationTitle','showNext','ai.chat.context','705185qINtpG','getChild','resources','load','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','updateCurrentDocumentInContext','6086830ScpyLU','viewRangeToDom','toViewRange','closeSourceResourceBalloon','type','getMarkersGroup','ai.chat.models.displayedModels','map','accepted','error','_getDocumentRangeForReplyChanges','howMany','14zfkUrr','setChangeGroupState','applyOperation','toString','_logError','addFeedInteractionHeader','ai-chat-url-upload-failed','capabilitiesUpdated','_removeFromContext','resizeTabs','name','4515080cMYofq','_handleStartConversation','toLocaleLowerCase','addResourceToContext','has','disableControls','getInteraction','from','current-document','_removeAISelectionMarkers','provider','_toggleReasoning','_updateReplyContent','setIsMaximized','addOperation','updateResourceState','ai-chat-conversation-init-failed','loadConversation','replyId','_aiChatModels','changeGroups','addSelectionToContext','data','parse','setIsUploadInProgress','addFilesToContext','abortPromptStream','ai-chat-file-upload-failed','split','getDocumentContext','maxOffset','populateSourceResourceBalloon','uiId','AI_CHAT_CONTEXT_INVALID_DATA','activeConversation','addContextItem','addFeedItemAISuggestion','AI_CHAT_GENERIC_ERROR','addFeedItemUserMessage','contextItem','_aiEditing','uploadProgressChanged','AIEditing','selectedModel','removeSelectionFromChatContext','_setIsMaximized','path','sendMessage','getAttribute','ai-chat-context-unsupported-type','addContextOptionsChanged','static','conversationInitialized','forEach','stopInteraction','ai-chat-controller-mouse-over','getGroupId','isDocumentOperation','7268319SwPxBW','_applyOperationsAsSuggestions','_stopLastInteraction','clearPendingContextUI','push','createConversation','_insertSuggestion','state','find','_flushLastInteractionUI','2GTMDLg','finishInteraction','resize','replyCreated','showChangeInText','interactionDestroyed','alignToTop','getChildren','nextSibling','getInteractionAndReplyById','replies','undo','clearConversationContextUI','sendUserMessage','pending','getOperations','sourceResourcesLoaded','dialogClosed','ai-chat-resource-load-failed','ai-conversation-','_filterModels','_batchToChanges','AI_CHAT_ABORTED_MESSAGE','AIChatController','ai-chat-controller-no-active-conversation','showPrevious','addFeedItemAIReply','AI_CHAT_UNTITLED_CONVERSATION','locale','ai-chat-source-resources-load-failed','addFileToContext','isLoading','add','lastInteraction','set','removeFeedInteraction','updateFeedItemAIReplySources','rejectSuggestion','mapper','toggleWebSearch','selectModel','contextItems','createRange','model','version','removeMarker','startConversation','_aiChatUi','scrollFeedToSuggestion','context','mouseLeaveSuggestion','resourceId','4922260tfQjNR','Liked\x20response','resetConversationTitle','slice','editing','text-delta','stopListening','sourcePosition','webSearchFinished','addFeedItemError','ai-request-aborted','updateConversationTitle','hideFakeVisualSelection','focusPromptInput','listenTo','end','setContextItemLoading','ready','indexOf','options','getSelectionText','pluginName','changes','plugins','addFeedItemStaticMessage','children','showFakeVisualSelection','getChildAtOffset','query','history','_startConversationSafely','getFirstRange','resourceStateChanged','start','updateFeedItemAIReplyContent','getDocumentData','modification-delta','_handleUIUserMessage','isDisabled','Disliked\x20response','_previewedChangeGroup','applySuggestion','startInteraction','getRanges','editors','setSelectedModel','init','redo','marker','getRoot','new','change','updateCapabilities','isUploadInProgress','content','createPositionFromPath','isOfficialPlugin','webSearchStarted','handleRemovedConversation','batch','isInContext','reasoningFinished','isOpen','config','updateFeedItemAIReplySuggestionPartState','toggleReasoning','_applySuggestion','removed','$graveyard','indexes','Failed\x20to\x20load\x20conversation','_integrateEditor','_scrollToSuggestionRange','document','Undo','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','_updateRatings','sourceId','insertSuggestion','interactionId','stop','addCurrentDocumentToContext','ai.chat.models.defaultModelId','isCurrentDocumentInConversation','addUrlToContext','enableControls','domConverter','_balloonShowDiff','commands','resizedTabs','removeSelectionFromContext','createPositionAt','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','DocumentCompare','replyChangeGroupStateUpdated','_aiConnector','range','close','log','toggleLoadingSkeleton','view','root','rootName','data-id','addDocumentToContext','partIndex','loadSourceResources','startsWith','reasoningStarted','AI_CHAT_RESOURCE_LOAD_FAILED','open','upsertAIChatRating','removeFromContext','contextItemAdded','setConversationContext','resource','ai-chat-context-invalid-data','AIChatUI','AIConnector','interactionCreated','setModel','chat','baseVersion','interactionStarted','handleUserInteraction','contextItemRemoved','AI_CHAT_UNABLE_TO_START_CONVERSATION','getPath','ai-chat-missing-channel-id','_openBalloonFor','cloneNode','full','2264523XUAYDv','contextItemLoadingEnded','filter','delete','replyContentUpdated','updateContent','source','isCurrentDocumentInContext','mouseOverSuggestion','setFeedItemRenderingStrategy','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','message','documentContextContent','_showConversationHistory','node','getReply','like','Showing\x20conversation\x20history...','length','get','streaming','getDiff','remove','activateTab','main','isStarted','collaboration.channelId','string','messageId','getTransformedByOperation','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','_createFromRanges','uid','962490eJMCgU','interactionFinished','markers','availableModels','requires','resetMessageInput','ai-chat-conversation-start-failed','dislike','removeContextItem','isPremiumPlugin','sources','AI_BALLOON_HEADER_TITLE','afterInit','_toggleWebSearch'];_0x344d=function(){return _0x56b3d7;};return _0x344d();}
|
package/src/aichat/aichatui.d.ts
CHANGED
package/src/aichat/aichatui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x44fd07=_0x163a;(function(_0x4afb0e,_0x875e72){const _0x161b8d=_0x163a,_0x369bcf=_0x4afb0e();while(!![]){try{const _0x437686=-parseInt(_0x161b8d(0x243))/0x1*(parseInt(_0x161b8d(0x223))/0x2)+parseInt(_0x161b8d(0x1ed))/0x3*(parseInt(_0x161b8d(0x225))/0x4)+parseInt(_0x161b8d(0x1ee))/0x5*(-parseInt(_0x161b8d(0x1ff))/0x6)+parseInt(_0x161b8d(0x1e7))/0x7+parseInt(_0x161b8d(0x24b))/0x8+parseInt(_0x161b8d(0x1de))/0x9*(parseInt(_0x161b8d(0x202))/0xa)+-parseInt(_0x161b8d(0x1e4))/0xb;if(_0x437686===_0x875e72)break;else _0x369bcf['push'](_0x369bcf['shift']());}catch(_0x3787de){_0x369bcf['push'](_0x369bcf['shift']());}}}(_0x4362,0x96035));import{ContextPlugin as _0x25645c}from'ckeditor5/src/core.js';function _0x163a(_0x483e16,_0x44e509){const _0x4362df=_0x4362();return _0x163a=function(_0x163abb,_0x4d1ddd){_0x163abb=_0x163abb-0x1dc;let _0x1d28f0=_0x4362df[_0x163abb];return _0x1d28f0;},_0x163a(_0x483e16,_0x44e509);}import{_isMotionReduced as _0xd67efe}from'ckeditor5/src/utils.js';import{AIChatView as _0x1b73db}from'./ui/aichatview.js';function _0x4362(){const _0x3098b0=['streaming','interactionId','_isTrackChangesCommandValueBound','stopInteraction','12EGDmHr','conversation-start','last','12128560uuXlLF','setAddContextOptions','getItemIds','startAutoScroll','stopAutoScroll','ai-suggestion-reply','filter','isDisabled','resetConversationTitle','setWebSearch','isTrackChangesOn','isVisible','children','availableModels','markFeedItemAsDone','chatControls','capabilities','AI_CHAT_HEADING','remove','scrollToSuggestion','isReasoningEnabled','_promiseQueue','isPending','startsWith','queueEmptyPromise','addFeedItemUserMessage','removeContextItem','setConversationContext','setIsUploadInProgress','ai.availableReplyActions','updateReplyItem','updateSuggestionItem','resetMessageInput','17222PofNpt','isLoading','1187512myOQml','isPremiumPlugin','updateResourceState','removeFeedInteraction','forEach','bind','clearConversationContextUI','isOfficialPlugin','addContextItem','trackChanges','closeSourceResourceBalloon','setSelectedModel','disableModelSelector','value','_titleAnimationInterval','interaction-header','showResizeButton','setModelList','AITabs','areActionsDisabled','get','</p>','isBusy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','label','_animateConversationTitle','user-message','contextItems','AIChatUI','commands','33knvtrM','updateFeedItemAIReplySuggestionContent','disableControls','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','feedItemRenderingStrategy','enableControls','AI_CHAT_WELCOME_MESSAGE','updateFeedItemAIReplyContent','3599640udpcpN','config','_getInputPlaceholder','displayedPrompt','find','updateFeedInteractionHeader','finishInteraction','enableModelSelector','updateCapabilities','setReasoning','addFeedItemError','requires','locale','from','_view','isDone','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','markItemAsDone','then','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','removeItem','context','updateFeedItemAIReplySources','renderingStrategy','_interactionPromiseResolver','quickActionData','setInputPlaceholder','options','showDiff','chat','isMaximized','scrollFeedToSuggestion','addFeedItemAISuggestion','updateFeedItemAIReplySuggestionPartState','<p>','view','addFeedItemStaticMessage','clearPendingContextUI','populateSourceResourceBalloon','length','error-message','values','chatFeed','setLoadingMessage','enqueue','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','ai.chat.models.modelSelectorAlwaysVisible','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','setFeedItemRenderingStrategy','addItem','delegate','focusPromptInput','isWebSearchEnabled','setModel','9RoCvFz','setContextItemLoading','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','addTab','addFeedItemAIReply','8172802RoEBwW','toggleSuggestionDisplayMode','addFeedInteractionHeader','4157993OMDJJx','plugins','destroy','_getLoadingMessage','updateWebSources','setIsMaximized','3wDMBfu','2280225XZTYIY','pluginName','createConversation','chatHeader','setConversationTitle','set','clear','ai-reply','updateSuggestionPartState','userMessage','startInteraction','toggleLoadingSkeleton','abort'];_0x4362=function(){return _0x3098b0;};return _0x4362();}import{AITabs as _0x47faf9}from'../aitabs/aitabs.js';import{getTranslation as _0x310bd9}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x56a914}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x5c5fde}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0xd7296c}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x38881c}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x391d2e}from'../aicore/utils/geteditorfromcontext.js';export class AIChatUI extends _0x25645c{static get[_0x44fd07(0x256)](){return[_0x47faf9];}[_0x44fd07(0x259)];static get[_0x44fd07(0x1ef)](){const _0x1d9411=_0x44fd07;return _0x1d9411(0x241);}static get[_0x44fd07(0x22c)](){return!0x0;}static get[_0x44fd07(0x226)](){return!0x0;}[_0x44fd07(0x247)]=_0x44fd07(0x1fb);[_0x44fd07(0x267)]=!0x0;[_0x44fd07(0x217)];[_0x44fd07(0x263)];[_0x44fd07(0x233)]=void 0x0;[_0x44fd07(0x1fd)]=!0x1;constructor(_0x510d1f){const _0x163bc3=_0x44fd07;super(_0x510d1f);const _0x3ea34d=this[_0x163bc3(0x260)][_0x163bc3(0x1e8)][_0x163bc3(0x239)](_0x163bc3(0x237));this[_0x163bc3(0x1f3)](_0x163bc3(0x23b),!0x1),this[_0x163bc3(0x217)]=new _0xd7296c(),this[_0x163bc3(0x259)]=new _0x1b73db(this[_0x163bc3(0x260)][_0x163bc3(0x257)],_0x3ea34d[_0x163bc3(0x235)]),this[_0x163bc3(0x259)][_0x163bc3(0x27d)](..._0x38881c)['to'](this),this[_0x163bc3(0x259)]['on'](_0x163bc3(0x1e5),(_0x4bcd2f,{showDiff:_0x3f189a})=>{const _0x4d1c70=_0x163bc3;this[_0x4d1c70(0x267)]=_0x3f189a;}),_0x3ea34d[_0x163bc3(0x26e)][_0x163bc3(0x1e2)]({'id':_0x163bc3(0x268),'buttonLabel':_0x310bd9(this[_0x163bc3(0x260)][_0x163bc3(0x257)],_0x163bc3(0x213)),'buttonIcon':_0x56a914,'order':0x0,'content':this[_0x163bc3(0x259)]}),this[_0x163bc3(0x259)][_0x163bc3(0x211)][_0x163bc3(0x22a)](_0x163bc3(0x224))['to'](this,_0x163bc3(0x23b),_0x471b26=>_0x471b26),this[_0x163bc3(0x259)][_0x163bc3(0x275)][_0x163bc3(0x22a)](_0x163bc3(0x218))['to'](this,_0x163bc3(0x23b),_0x10db2f=>_0x10db2f),this[_0x163bc3(0x259)][_0x163bc3(0x211)][_0x163bc3(0x265)](this[_0x163bc3(0x24d)]());}[_0x44fd07(0x1e9)](){const _0x48f628=_0x44fd07;super[_0x48f628(0x1e9)](),this[_0x48f628(0x233)]&&clearInterval(this[_0x48f628(0x233)]);}[_0x44fd07(0x1f0)](_0x1d2895){const _0x3572be=_0x44fd07;this[_0x3572be(0x259)][_0x3572be(0x275)][_0x3572be(0x1f4)](),this[_0x3572be(0x259)][_0x3572be(0x211)][_0x3572be(0x252)](),this[_0x3572be(0x259)][_0x3572be(0x211)][_0x3572be(0x236)](_0x1d2895[_0x3572be(0x20f)],!this[_0x3572be(0x260)][_0x3572be(0x24c)][_0x3572be(0x239)](_0x3572be(0x279))),this[_0x3572be(0x26f)]({'id':_0x3572be(0x200),'staticMessage':_0x310bd9(this[_0x3572be(0x260)][_0x3572be(0x257)],_0x3572be(0x249))});}[_0x44fd07(0x26f)]({id:_0x1e781f,staticMessage:_0x4e4599}){const _0x1011cb=_0x44fd07;this[_0x1011cb(0x259)][_0x1011cb(0x275)][_0x1011cb(0x27c)](_0x1011cb(0x1f5),{'id':_0x1e781f,'initialContent':_0x1011cb(0x26d)+_0x4e4599+_0x1011cb(0x23a)});}[_0x44fd07(0x21b)](_0x252bb2){const _0x5bb212=_0x44fd07,_0x302eb5=_0x252bb2[_0x5bb212(0x264)]?.[_0x5bb212(0x24e)]||_0x252bb2[_0x5bb212(0x1f7)];this[_0x5bb212(0x259)][_0x5bb212(0x275)][_0x5bb212(0x27c)](_0x5bb212(0x23f),{'contextItems':Array[_0x5bb212(0x258)](_0x252bb2[_0x5bb212(0x240)][_0x5bb212(0x274)]()),'initialContent':_0x5bb212(0x26d)+_0x302eb5+_0x5bb212(0x23a),'id':_0x252bb2['id']});}[_0x44fd07(0x255)]({errorMessage:_0x572661,id:_0x615fed}){const _0x13b200=_0x44fd07;this[_0x13b200(0x259)][_0x13b200(0x275)][_0x13b200(0x27c)](_0x13b200(0x273),{'initialContent':_0x13b200(0x26d)+_0x572661+_0x13b200(0x23a),'id':_0x615fed});}[_0x44fd07(0x1e3)](_0x36b3b1){const _0xd0e8a0=_0x44fd07;return this[_0xd0e8a0(0x217)][_0xd0e8a0(0x277)](async()=>{const _0x14705a=_0xd0e8a0;this[_0x14705a(0x259)][_0x14705a(0x275)][_0x14705a(0x27c)](_0x14705a(0x1f5),{'id':_0x36b3b1[_0x14705a(0x1fc)]+':'+_0x36b3b1['id']}),this[_0x14705a(0x276)](null);});}async[_0x44fd07(0x26b)](_0x25a34d){const _0x250913=_0x44fd07,_0x3c2f38=_0x391d2e(this[_0x250913(0x260)]);if(_0x3c2f38){const _0x28bcbf=_0x3c2f38[_0x250913(0x242)][_0x250913(0x239)](_0x250913(0x22e));_0x28bcbf&&!this[_0x250913(0x1fd)]&&(this[_0x250913(0x1fd)]=!0x0,this[_0x250913(0x259)][_0x250913(0x275)][_0x250913(0x22a)](_0x250913(0x20c))['to'](_0x28bcbf,_0x250913(0x232)));}return this[_0x250913(0x217)][_0x250913(0x277)](async()=>{const _0x406a93=_0x250913;this[_0x406a93(0x259)][_0x406a93(0x275)][_0x406a93(0x27c)](_0x406a93(0x207),{'id':_0x25a34d[_0x406a93(0x1fc)]+':'+_0x25a34d['id'],'areActionsDisabled':_0x25a34d[_0x406a93(0x238)],'showDiff':this[_0x406a93(0x267)],'dropdownConfig':this[_0x406a93(0x260)][_0x406a93(0x24c)][_0x406a93(0x239)](_0x406a93(0x21f))}),this[_0x406a93(0x276)](null);});}[_0x44fd07(0x1e6)](_0x3c51e8,_0x4e5ce7){const _0x5e3df4=_0x44fd07,_0x3035e9=this[_0x5e3df4(0x259)][_0x5e3df4(0x275)][_0x5e3df4(0x20e)][_0x5e3df4(0x201)];if(_0x3035e9 instanceof _0x5c5fde)return this[_0x5e3df4(0x259)][_0x5e3df4(0x275)][_0x5e3df4(0x20e)][_0x5e3df4(0x214)](_0x3035e9),void this[_0x5e3df4(0x259)][_0x5e3df4(0x275)][_0x5e3df4(0x27c)](_0x5e3df4(0x234),{'id':_0x3c51e8['id'],'capabilities':{'isWebSearchEnabled':_0x3035e9[_0x5e3df4(0x212)][_0x5e3df4(0x1dc)]||_0x4e5ce7[_0x5e3df4(0x1dc)],'isReasoningEnabled':_0x3035e9[_0x5e3df4(0x212)][_0x5e3df4(0x216)]||_0x4e5ce7[_0x5e3df4(0x216)]}});this[_0x5e3df4(0x259)][_0x5e3df4(0x275)][_0x5e3df4(0x27c)](_0x5e3df4(0x234),{'id':_0x3c51e8['id'],'capabilities':_0x4e5ce7});}[_0x44fd07(0x250)](_0x382888){const _0x44e910=_0x44fd07,_0x3c5b8a=this[_0x44e910(0x259)][_0x44e910(0x275)][_0x44e910(0x20e)][_0x44e910(0x24f)](_0x4ea96d=>_0x4ea96d[_0x44e910(0x266)]['id']==_0x382888['id']&&_0x4ea96d instanceof _0x5c5fde);_0x3c5b8a&&_0x3c5b8a[_0x44e910(0x1f3)](_0x44e910(0x20d),_0x382888[_0x44e910(0x20d)]);}async[_0x44fd07(0x24a)](_0x1e5feb){const _0x36123c=_0x44fd07,_0x970804=_0x1e5feb[_0x36123c(0x262)]||this[_0x36123c(0x247)];return this[_0x36123c(0x217)][_0x36123c(0x277)](async _0x25523a=>{const _0x17ce3a=_0x36123c;await this[_0x17ce3a(0x259)][_0x17ce3a(0x275)][_0x17ce3a(0x220)]({..._0x1e5feb,'abortSignal':_0x25523a,'renderingStrategy':_0x970804}),_0x1e5feb[_0x17ce3a(0x25a)]&&this[_0x17ce3a(0x210)](_0x1e5feb['id']);});}[_0x44fd07(0x261)](_0x15218d,_0x473d61){const _0x3bfce0=_0x44fd07;this[_0x3bfce0(0x259)][_0x3bfce0(0x275)][_0x3bfce0(0x1eb)](_0x15218d,_0x473d61);}async[_0x44fd07(0x244)](_0x309b56){const _0xce6c39=_0x44fd07,_0x3e0248=_0x309b56[_0xce6c39(0x262)]||this[_0xce6c39(0x247)];return this[_0xce6c39(0x217)][_0xce6c39(0x277)](async _0x4bf473=>{const _0x289140=_0xce6c39;await this[_0x289140(0x259)][_0x289140(0x275)][_0x289140(0x221)]({..._0x309b56,'abortSignal':_0x4bf473,'renderingStrategy':_0x3e0248}),_0x309b56[_0x289140(0x25a)]&&this[_0x289140(0x210)](_0x309b56['id']);});}[_0x44fd07(0x26c)](_0x50743f){const _0x9ee75d=_0x44fd07;this[_0x9ee75d(0x259)][_0x9ee75d(0x275)][_0x9ee75d(0x1f6)](_0x50743f);}[_0x44fd07(0x210)](_0x4550cd){const _0x301e70=_0x44fd07;this[_0x301e70(0x259)][_0x301e70(0x275)][_0x301e70(0x25c)](_0x4550cd);}[_0x44fd07(0x228)](_0x59a575){const _0x4f34c=_0x44fd07;this[_0x4f34c(0x259)][_0x4f34c(0x275)][_0x4f34c(0x204)]()[_0x4f34c(0x208)](_0x47a244=>_0x47a244[_0x4f34c(0x219)](_0x59a575))[_0x4f34c(0x229)](_0x5c28b8=>this[_0x4f34c(0x259)][_0x4f34c(0x275)][_0x4f34c(0x25f)](_0x5c28b8));}[_0x44fd07(0x1f8)](){const _0x182f85=_0x44fd07;this[_0x182f85(0x276)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x182f85(0x259)][_0x182f85(0x211)][_0x182f85(0x231)](!this[_0x182f85(0x260)][_0x182f85(0x24c)][_0x182f85(0x239)](_0x182f85(0x279))),this[_0x182f85(0x23b)]=!0x0,this[_0x182f85(0x259)][_0x182f85(0x275)][_0x182f85(0x205)]();}[_0x44fd07(0x1fe)](_0x596d56){const _0x135e6d=_0x44fd07;this[_0x135e6d(0x217)][_0x135e6d(0x1fa)](),this[_0x135e6d(0x259)][_0x135e6d(0x275)][_0x135e6d(0x204)]()[_0x135e6d(0x208)](_0x8721d3=>_0x8721d3[_0x135e6d(0x219)](_0x596d56['id']))[_0x135e6d(0x229)](_0x5f42e7=>this[_0x135e6d(0x210)](_0x5f42e7)),this[_0x135e6d(0x23b)]=!0x1,this[_0x135e6d(0x259)][_0x135e6d(0x275)][_0x135e6d(0x206)]();}async[_0x44fd07(0x251)](){const _0x5aa25c=_0x44fd07;return this[_0x5aa25c(0x217)][_0x5aa25c(0x21a)][_0x5aa25c(0x25d)](()=>{const _0x11e025=_0x5aa25c;this[_0x11e025(0x23b)]=!0x1,this[_0x11e025(0x259)][_0x11e025(0x275)][_0x11e025(0x206)]();});}[_0x44fd07(0x22d)](_0x3edd69,_0x2e0857){const _0x4a907a=_0x44fd07;this[_0x4a907a(0x259)][_0x4a907a(0x211)][_0x4a907a(0x22d)](_0x3edd69,_0x2e0857);}[_0x44fd07(0x21c)](_0x2495f9){const _0x5f055c=_0x44fd07;this[_0x5f055c(0x259)][_0x5f055c(0x211)][_0x5f055c(0x21c)](_0x2495f9);}[_0x44fd07(0x1df)](_0x17cf0a,_0x2ccd85){const _0x23da61=_0x44fd07;this[_0x23da61(0x259)][_0x23da61(0x211)][_0x23da61(0x1df)](_0x17cf0a,_0x2ccd85);}[_0x44fd07(0x21e)](_0x5071ea){const _0x44bdf6=_0x44fd07;this[_0x44bdf6(0x259)][_0x44bdf6(0x211)][_0x44bdf6(0x21e)](_0x5071ea);}[_0x44fd07(0x21d)](_0x5211cd){const _0x57152d=_0x44fd07;this[_0x57152d(0x259)][_0x57152d(0x211)][_0x57152d(0x21d)](_0x5211cd);}[_0x44fd07(0x270)](){const _0x5ad496=_0x44fd07;this[_0x5ad496(0x259)][_0x5ad496(0x211)][_0x5ad496(0x270)]();}[_0x44fd07(0x22b)](){const _0x4c208e=_0x44fd07;this[_0x4c208e(0x259)][_0x4c208e(0x211)][_0x4c208e(0x22b)]();}[_0x44fd07(0x227)](_0x528801,_0xfc6211,_0x514397){const _0x41a052=_0x44fd07;this[_0x41a052(0x259)][_0x41a052(0x211)][_0x41a052(0x227)](_0x528801,_0xfc6211,_0x514397);}[_0x44fd07(0x222)](){const _0x2f8b14=_0x44fd07;this[_0x2f8b14(0x259)][_0x2f8b14(0x211)][_0x2f8b14(0x222)](),this[_0x2f8b14(0x259)][_0x2f8b14(0x211)][_0x2f8b14(0x265)](this[_0x2f8b14(0x24d)]());}[_0x44fd07(0x203)](_0x534561){const _0x59e2f2=_0x44fd07;this[_0x59e2f2(0x259)][_0x59e2f2(0x211)][_0x59e2f2(0x203)](_0x534561);}[_0x44fd07(0x253)](_0xd67eee){const _0x30569e=_0x44fd07;this[_0x30569e(0x259)][_0x30569e(0x211)][_0x30569e(0x20b)](_0xd67eee[_0x30569e(0x1dc)]),this[_0x30569e(0x259)][_0x30569e(0x211)][_0x30569e(0x254)](_0xd67eee[_0x30569e(0x216)]),this[_0x30569e(0x259)][_0x30569e(0x211)][_0x30569e(0x265)](this[_0x30569e(0x24d)](_0xd67eee));}[_0x44fd07(0x230)](_0x478614,_0x1381eb){const _0x50ebac=_0x44fd07;this[_0x50ebac(0x259)][_0x50ebac(0x211)][_0x50ebac(0x1dd)](_0x478614),_0x1381eb&&this[_0x50ebac(0x259)][_0x50ebac(0x211)][_0x50ebac(0x231)](!0x1);}[_0x44fd07(0x27b)](_0x153f1e){const _0x514f7b=_0x44fd07;this[_0x514f7b(0x247)]=_0x153f1e;}[_0x44fd07(0x1f9)](_0x3cb66d){const _0x244b5f=_0x44fd07;this[_0x244b5f(0x259)][_0x244b5f(0x275)][_0x244b5f(0x1f9)](_0x3cb66d);}[_0x44fd07(0x20a)](){const _0x505992=_0x44fd07;this[_0x505992(0x1f2)](_0x310bd9(this[_0x505992(0x260)][_0x505992(0x257)],_0x505992(0x213)));}[_0x44fd07(0x1f2)](_0x29683f,_0x4f56a4=!0x1){const _0x3ec5e0=_0x44fd07;if(_0x4f56a4&&!_0xd67efe()&&_0x29683f[_0x3ec5e0(0x272)])return this[_0x3ec5e0(0x259)][_0x3ec5e0(0x1f1)][_0x3ec5e0(0x23d)]='',void this[_0x3ec5e0(0x23e)](_0x29683f);this[_0x3ec5e0(0x259)][_0x3ec5e0(0x1f1)][_0x3ec5e0(0x23d)]=_0x29683f;}[_0x44fd07(0x276)](_0xb1e6e8){const _0x2d94cb=_0x44fd07,_0x25cbe0=this[_0x2d94cb(0x1ea)](_0xb1e6e8);this[_0x2d94cb(0x259)][_0x2d94cb(0x275)][_0x2d94cb(0x276)](_0x25cbe0);}[_0x44fd07(0x23e)](_0x4e39ff){const _0x2ba216=_0x44fd07;let _0x9da128=0x0;clearInterval(this[_0x2ba216(0x233)]),this[_0x2ba216(0x233)]=setInterval(()=>{const _0xfcefef=_0x2ba216;this[_0xfcefef(0x259)][_0xfcefef(0x1f1)][_0xfcefef(0x23d)]=this[_0xfcefef(0x259)][_0xfcefef(0x1f1)][_0xfcefef(0x23d)]+_0x4e39ff[_0x9da128],_0x9da128++,_0x9da128===_0x4e39ff[_0xfcefef(0x272)]&&clearInterval(this[_0xfcefef(0x233)]);},0x1e);}[_0x44fd07(0x1ec)](_0x490797){const _0x492486=_0x44fd07;this[_0x492486(0x259)][_0x492486(0x1f1)][_0x492486(0x269)]=_0x490797;}[_0x44fd07(0x1ea)](_0x49d78e){const _0x1aebee=_0x44fd07;return _0x49d78e?_0x49d78e[_0x1aebee(0x1dc)]&&_0x49d78e[_0x1aebee(0x216)]?_0x310bd9(this[_0x1aebee(0x260)][_0x1aebee(0x257)],_0x1aebee(0x1e1)):_0x49d78e[_0x1aebee(0x1dc)]?_0x310bd9(this[_0x1aebee(0x260)][_0x1aebee(0x257)],_0x1aebee(0x278)):_0x49d78e[_0x1aebee(0x216)]?_0x310bd9(this[_0x1aebee(0x260)][_0x1aebee(0x257)],_0x1aebee(0x246)):_0x310bd9(this[_0x1aebee(0x260)][_0x1aebee(0x257)],_0x1aebee(0x1e0)):'';}[_0x44fd07(0x24d)](_0x45bb29){const _0x1d9206=_0x44fd07;return _0x45bb29?_0x45bb29[_0x1d9206(0x1dc)]&&_0x45bb29[_0x1d9206(0x216)]?_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x27a)):_0x45bb29[_0x1d9206(0x1dc)]?_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x25b)):_0x45bb29[_0x1d9206(0x216)]?_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x25e)):_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x23c)):_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x23c));}[_0x44fd07(0x271)](_0x46f0b2,_0x259d69,_0x128a87,_0x52aa33){const _0x1c6579=_0x44fd07;this[_0x1c6579(0x259)][_0x1c6579(0x271)](_0x46f0b2,_0x259d69,_0x128a87,_0x52aa33);}[_0x44fd07(0x22f)](_0x36b00b){const _0x36989d=_0x44fd07;this[_0x36989d(0x259)][_0x36989d(0x22f)](_0x36b00b);}[_0x44fd07(0x27e)](){const _0x424835=_0x44fd07;this[_0x424835(0x259)][_0x424835(0x211)][_0x424835(0x27e)]();}[_0x44fd07(0x26a)](_0x53efc0,_0x4c1623){const _0x2049a4=_0x44fd07;this[_0x2049a4(0x259)][_0x2049a4(0x275)][_0x2049a4(0x215)](_0x53efc0,_0x4c1623);}[_0x44fd07(0x245)](){const _0x33d11b=_0x44fd07;this[_0x33d11b(0x259)][_0x33d11b(0x211)][_0x33d11b(0x209)]=!0x0;}[_0x44fd07(0x248)](){const _0x3f3dfe=_0x44fd07;this[_0x3f3dfe(0x259)][_0x3f3dfe(0x211)][_0x3f3dfe(0x209)]=!0x1;}}
|
|
23
|
+
const _0x2f9983=_0x572b;function _0x572b(_0x5739a9,_0x348283){const _0x2ee647=_0x2ee6();return _0x572b=function(_0x572bc2,_0x105609){_0x572bc2=_0x572bc2-0x88;let _0xa3c0f=_0x2ee647[_0x572bc2];return _0xa3c0f;},_0x572b(_0x5739a9,_0x348283);}(function(_0x1b6c09,_0x4355d8){const _0x4dd359=_0x572b,_0x2ced72=_0x1b6c09();while(!![]){try{const _0x46dd20=-parseInt(_0x4dd359(0x96))/0x1*(-parseInt(_0x4dd359(0xfd))/0x2)+-parseInt(_0x4dd359(0x124))/0x3*(-parseInt(_0x4dd359(0xe7))/0x4)+-parseInt(_0x4dd359(0xb2))/0x5*(parseInt(_0x4dd359(0xb8))/0x6)+-parseInt(_0x4dd359(0xe5))/0x7+parseInt(_0x4dd359(0xf6))/0x8+-parseInt(_0x4dd359(0xe4))/0x9+parseInt(_0x4dd359(0x10b))/0xa*(parseInt(_0x4dd359(0xde))/0xb);if(_0x46dd20===_0x4355d8)break;else _0x2ced72['push'](_0x2ced72['shift']());}catch(_0x43a9ae){_0x2ced72['push'](_0x2ced72['shift']());}}}(_0x2ee6,0x750ec));import{ContextPlugin as _0x19876f}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x54cab1}from'ckeditor5/src/utils.js';import{AIChatView as _0x43041c}from'./ui/aichatview.js';import{AITabs as _0x33aa86}from'../aitabs/aitabs.js';import{getTranslation as _0x2343bc}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x5db672}from'ckeditor5/src/icons.js';function _0x2ee6(){const _0xe60033=['startAutoScroll','updateCapabilities','addFeedItemError','children','setSelectedModel','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','AIChatUI','setModelList','isLoading','config','showResizeButton','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','delegate','user-message','disableControls','addFeedItemStaticMessage','_isTrackChangesCommandValueBound','chatControls','5RNithZ','set','chatFeed','updateFeedItemAIReplySources','then','addContextItem','4609482SFmzrD','ai.availableReplyActions','isVisible','find','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','label','setConversationContext','isDone','addTab','updateWebSources','setFeedItemRenderingStrategy','updateFeedItemAIReplyContent','ai.chat.models.modelSelectorAlwaysVisible','interactionId','queueEmptyPromise','forEach','abort','filter','addItem','setIsUploadInProgress','removeItem','value','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','renderingStrategy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','removeFeedInteraction','focusPromptInput','setReasoning','pluginName','availableModels','toggleLoadingSkeleton','clear','clearConversationContextUI','view','isReasoningEnabled','isBusy','chatHeader','removeContextItem','1584nQcQrp','displayedPrompt','setConversationTitle','addFeedInteractionHeader','_promiseQueue','resetMessageInput','5652333YWCyTw','5224576IlxfJU','enableModelSelector','19892yFkVKZ','setWebSearch','stopAutoScroll','updateSuggestionItem','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','requires','addFeedItemAISuggestion','ai-reply','get','streaming','updateSuggestionPartState','isDisabled','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','scrollFeedToSuggestion','ai-suggestion-reply','1114656sBOcpR','AI_CHAT_HEADING','trackChanges','locale','setModel','areActionsDisabled','closeSourceResourceBalloon','46yIIxSL','_animateConversationTitle','isPremiumPlugin','interaction-header','_view','conversation-start','bind','AITabs','startsWith','finishInteraction','updateFeedInteractionHeader','destroy','context','remove','166760pwYpjH','toggleSuggestionDisplayMode','options','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','setIsMaximized','populateSourceResourceBalloon','values','scrollToSuggestion','_titleAnimationInterval','<p>','resetConversationTitle','enqueue','chat','_getLoadingMessage','quickActionData','isOfficialPlugin','setInputPlaceholder','isMaximized','getItemIds','commands','updateResourceState','stopInteraction','capabilities','isPending','showDiff','42TJexUv','updateFeedItemAIReplySuggestionPartState','markFeedItemAsDone','createConversation','_getInputPlaceholder','addFeedItemAIReply','updateReplyItem','isWebSearchEnabled','clearPendingContextUI','startInteraction','enableControls','setContextItemLoading','addFeedItemUserMessage','setAddContextOptions','AI_CHAT_WELCOME_MESSAGE','contextItems','userMessage','isTrackChangesOn','markItemAsDone','setLoadingMessage','length','514JDAQmZ','plugins','updateFeedItemAIReplySuggestionContent','feedItemRenderingStrategy','last','_interactionPromiseResolver','from','disableModelSelector','</p>','error-message'];_0x2ee6=function(){return _0xe60033;};return _0x2ee6();}import{AIChatFeedInteractionHeaderView as _0x1ec2e3}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x5b6e0a}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x261911}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x4b209a}from'../aicore/utils/geteditorfromcontext.js';export class AIChatUI extends _0x19876f{static get[_0x2f9983(0xec)](){return[_0x33aa86];}[_0x2f9983(0x101)];static get[_0x2f9983(0xd4)](){const _0x85df86=_0x2f9983;return _0x85df86(0xa6);}static get[_0x2f9983(0x11a)](){return!0x0;}static get[_0x2f9983(0xff)](){return!0x0;}[_0x2f9983(0x99)]=_0x2f9983(0xf0);[_0x2f9983(0x123)]=!0x0;[_0x2f9983(0xe2)];[_0x2f9983(0x9b)];[_0x2f9983(0x113)]=void 0x0;[_0x2f9983(0xb0)]=!0x1;constructor(_0x5f5a08){const _0x1a5617=_0x2f9983;super(_0x5f5a08);const _0x22c989=this[_0x1a5617(0x109)][_0x1a5617(0x97)][_0x1a5617(0xef)](_0x1a5617(0x104));this[_0x1a5617(0xb3)](_0x1a5617(0xdb),!0x1),this[_0x1a5617(0xe2)]=new _0x5b6e0a(),this[_0x1a5617(0x101)]=new _0x43041c(this[_0x1a5617(0x109)][_0x1a5617(0xf9)],_0x22c989[_0x1a5617(0xaa)]),this[_0x1a5617(0x101)][_0x1a5617(0xac)](..._0x261911)['to'](this),this[_0x1a5617(0x101)]['on'](_0x1a5617(0x10c),(_0x58d8b3,{showDiff:_0x36b91e})=>{const _0x12eafe=_0x1a5617;this[_0x12eafe(0x123)]=_0x36b91e;}),_0x22c989[_0x1a5617(0xd9)][_0x1a5617(0xc0)]({'id':_0x1a5617(0x117),'buttonLabel':_0x2343bc(this[_0x1a5617(0x109)][_0x1a5617(0xf9)],_0x1a5617(0xf7)),'buttonIcon':_0x5db672,'order':0x0,'content':this[_0x1a5617(0x101)]}),this[_0x1a5617(0x101)][_0x1a5617(0xb1)][_0x1a5617(0x103)](_0x1a5617(0xa8))['to'](this,_0x1a5617(0xdb),_0x41c93a=>_0x41c93a),this[_0x1a5617(0x101)][_0x1a5617(0xb4)][_0x1a5617(0x103)](_0x1a5617(0x122))['to'](this,_0x1a5617(0xdb),_0x3713d2=>_0x3713d2),this[_0x1a5617(0x101)][_0x1a5617(0xb1)][_0x1a5617(0x11b)](this[_0x1a5617(0x128)]());}[_0x2f9983(0x108)](){const _0x2812e7=_0x2f9983;super[_0x2812e7(0x108)](),this[_0x2812e7(0x113)]&&clearInterval(this[_0x2812e7(0x113)]);}[_0x2f9983(0x127)](_0x8a8c9e){const _0x97dd34=_0x2f9983;this[_0x97dd34(0x101)][_0x97dd34(0xb4)][_0x97dd34(0xd7)](),this[_0x97dd34(0x101)][_0x97dd34(0xb1)][_0x97dd34(0xe6)](),this[_0x97dd34(0x101)][_0x97dd34(0xb1)][_0x97dd34(0xa7)](_0x8a8c9e[_0x97dd34(0xd5)],!this[_0x97dd34(0x109)][_0x97dd34(0xa9)][_0x97dd34(0xef)](_0x97dd34(0xc4))),this[_0x97dd34(0xaf)]({'id':_0x97dd34(0x102),'staticMessage':_0x2343bc(this[_0x97dd34(0x109)][_0x97dd34(0xf9)],_0x97dd34(0x8f))});}[_0x2f9983(0xaf)]({id:_0x32b6e4,staticMessage:_0x2fed9c}){const _0x2e8312=_0x2f9983;this[_0x2e8312(0x101)][_0x2e8312(0xb4)][_0x2e8312(0xca)](_0x2e8312(0xee),{'id':_0x32b6e4,'initialContent':_0x2e8312(0x114)+_0x2fed9c+_0x2e8312(0x9e)});}[_0x2f9983(0x8d)](_0xac7984){const _0x5b974f=_0x2f9983,_0x491f26=_0xac7984[_0x5b974f(0x119)]?.[_0x5b974f(0xdf)]||_0xac7984[_0x5b974f(0x91)];this[_0x5b974f(0x101)][_0x5b974f(0xb4)][_0x5b974f(0xca)](_0x5b974f(0xad),{'contextItems':Array[_0x5b974f(0x9c)](_0xac7984[_0x5b974f(0x90)][_0x5b974f(0x111)]()),'initialContent':_0x5b974f(0x114)+_0x491f26+_0x5b974f(0x9e),'id':_0xac7984['id']});}[_0x2f9983(0xa2)]({errorMessage:_0x463cf9,id:_0x17893d}){const _0x16804b=_0x2f9983;this[_0x16804b(0x101)][_0x16804b(0xb4)][_0x16804b(0xca)](_0x16804b(0x9f),{'initialContent':_0x16804b(0x114)+_0x463cf9+_0x16804b(0x9e),'id':_0x17893d});}[_0x2f9983(0x129)](_0x39504e){const _0x4ef87e=_0x2f9983;return this[_0x4ef87e(0xe2)][_0x4ef87e(0x116)](async()=>{const _0x49313b=_0x4ef87e;this[_0x49313b(0x101)][_0x49313b(0xb4)][_0x49313b(0xca)](_0x49313b(0xee),{'id':_0x39504e[_0x49313b(0xc5)]+':'+_0x39504e['id']}),this[_0x49313b(0x94)](null);});}async[_0x2f9983(0xed)](_0x504e84){const _0x1b44f2=_0x2f9983,_0x2d35dc=_0x4b209a(this[_0x1b44f2(0x109)]);if(_0x2d35dc){const _0x18b9c6=_0x2d35dc[_0x1b44f2(0x11e)][_0x1b44f2(0xef)](_0x1b44f2(0xf8));_0x18b9c6&&!this[_0x1b44f2(0xb0)]&&(this[_0x1b44f2(0xb0)]=!0x0,this[_0x1b44f2(0x101)][_0x1b44f2(0xb4)][_0x1b44f2(0x103)](_0x1b44f2(0x92))['to'](_0x18b9c6,_0x1b44f2(0xcd)));}return this[_0x1b44f2(0xe2)][_0x1b44f2(0x116)](async()=>{const _0xaca768=_0x1b44f2;this[_0xaca768(0x101)][_0xaca768(0xb4)][_0xaca768(0xca)](_0xaca768(0xf5),{'id':_0x504e84[_0xaca768(0xc5)]+':'+_0x504e84['id'],'areActionsDisabled':_0x504e84[_0xaca768(0xfb)],'showDiff':this[_0xaca768(0x123)],'dropdownConfig':this[_0xaca768(0x109)][_0xaca768(0xa9)][_0xaca768(0xef)](_0xaca768(0xb9))}),this[_0xaca768(0x94)](null);});}[_0x2f9983(0xe1)](_0x53e27c,_0x48b47d){const _0x2d53b5=_0x2f9983,_0xe55cbc=this[_0x2d53b5(0x101)][_0x2d53b5(0xb4)][_0x2d53b5(0xa3)][_0x2d53b5(0x9a)];if(_0xe55cbc instanceof _0x1ec2e3)return this[_0x2d53b5(0x101)][_0x2d53b5(0xb4)][_0x2d53b5(0xa3)][_0x2d53b5(0x10a)](_0xe55cbc),void this[_0x2d53b5(0x101)][_0x2d53b5(0xb4)][_0x2d53b5(0xca)](_0x2d53b5(0x100),{'id':_0x53e27c['id'],'capabilities':{'isWebSearchEnabled':_0xe55cbc[_0x2d53b5(0x121)][_0x2d53b5(0x88)]||_0x48b47d[_0x2d53b5(0x88)],'isReasoningEnabled':_0xe55cbc[_0x2d53b5(0x121)][_0x2d53b5(0xda)]||_0x48b47d[_0x2d53b5(0xda)]}});this[_0x2d53b5(0x101)][_0x2d53b5(0xb4)][_0x2d53b5(0xca)](_0x2d53b5(0x100),{'id':_0x53e27c['id'],'capabilities':_0x48b47d});}[_0x2f9983(0x107)](_0x470db6){const _0x3c0515=_0x2f9983,_0xa938fc=this[_0x3c0515(0x101)][_0x3c0515(0xb4)][_0x3c0515(0xa3)][_0x3c0515(0xbb)](_0x197b1a=>_0x197b1a[_0x3c0515(0x10d)]['id']==_0x470db6['id']&&_0x197b1a instanceof _0x1ec2e3);_0xa938fc&&_0xa938fc[_0x3c0515(0xb3)](_0x3c0515(0xba),_0x470db6[_0x3c0515(0xba)]);}async[_0x2f9983(0xc3)](_0x4c652f){const _0x51f921=_0x2f9983,_0x1c2628=_0x4c652f[_0x51f921(0xcf)]||this[_0x51f921(0x99)];return this[_0x51f921(0xe2)][_0x51f921(0x116)](async _0x20f27a=>{const _0x16fe01=_0x51f921;await this[_0x16fe01(0x101)][_0x16fe01(0xb4)][_0x16fe01(0x12a)]({..._0x4c652f,'abortSignal':_0x20f27a,'renderingStrategy':_0x1c2628}),_0x4c652f[_0x16fe01(0xbf)]&&this[_0x16fe01(0x126)](_0x4c652f['id']);});}[_0x2f9983(0xb5)](_0x58b3f0,_0x1a3dcf){const _0x4463a7=_0x2f9983;this[_0x4463a7(0x101)][_0x4463a7(0xb4)][_0x4463a7(0xc1)](_0x58b3f0,_0x1a3dcf);}async[_0x2f9983(0x98)](_0x18730c){const _0x3538f2=_0x2f9983,_0x29cdd2=_0x18730c[_0x3538f2(0xcf)]||this[_0x3538f2(0x99)];return this[_0x3538f2(0xe2)][_0x3538f2(0x116)](async _0x111d4b=>{const _0x5120bf=_0x3538f2;await this[_0x5120bf(0x101)][_0x5120bf(0xb4)][_0x5120bf(0xea)]({..._0x18730c,'abortSignal':_0x111d4b,'renderingStrategy':_0x29cdd2}),_0x18730c[_0x5120bf(0xbf)]&&this[_0x5120bf(0x126)](_0x18730c['id']);});}[_0x2f9983(0x125)](_0x24f064){const _0x10123b=_0x2f9983;this[_0x10123b(0x101)][_0x10123b(0xb4)][_0x10123b(0xf1)](_0x24f064);}[_0x2f9983(0x126)](_0x2d4285){const _0x4d1f90=_0x2f9983;this[_0x4d1f90(0x101)][_0x4d1f90(0xb4)][_0x4d1f90(0x93)](_0x2d4285);}[_0x2f9983(0xd1)](_0x5477b2){const _0x474ec6=_0x2f9983;this[_0x474ec6(0x101)][_0x474ec6(0xb4)][_0x474ec6(0x11d)]()[_0x474ec6(0xc9)](_0x679dd8=>_0x679dd8[_0x474ec6(0x105)](_0x5477b2))[_0x474ec6(0xc7)](_0x372285=>this[_0x474ec6(0x101)][_0x474ec6(0xb4)][_0x474ec6(0xcc)](_0x372285));}[_0x2f9983(0x8a)](){const _0x1a670a=_0x2f9983;this[_0x1a670a(0x94)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x1a670a(0x101)][_0x1a670a(0xb1)][_0x1a670a(0x9d)](!this[_0x1a670a(0x109)][_0x1a670a(0xa9)][_0x1a670a(0xef)](_0x1a670a(0xc4))),this[_0x1a670a(0xdb)]=!0x0,this[_0x1a670a(0x101)][_0x1a670a(0xb4)][_0x1a670a(0xa0)]();}[_0x2f9983(0x120)](_0x45fd56){const _0x5eef4d=_0x2f9983;this[_0x5eef4d(0xe2)][_0x5eef4d(0xc8)](),this[_0x5eef4d(0x101)][_0x5eef4d(0xb4)][_0x5eef4d(0x11d)]()[_0x5eef4d(0xc9)](_0x5b0da4=>_0x5b0da4[_0x5eef4d(0x105)](_0x45fd56['id']))[_0x5eef4d(0xc7)](_0x21461a=>this[_0x5eef4d(0x126)](_0x21461a)),this[_0x5eef4d(0xdb)]=!0x1,this[_0x5eef4d(0x101)][_0x5eef4d(0xb4)][_0x5eef4d(0xe9)]();}async[_0x2f9983(0x106)](){const _0x57d55d=_0x2f9983;return this[_0x57d55d(0xe2)][_0x57d55d(0xc6)][_0x57d55d(0xb6)](()=>{const _0x50866d=_0x57d55d;this[_0x50866d(0xdb)]=!0x1,this[_0x50866d(0x101)][_0x50866d(0xb4)][_0x50866d(0xe9)]();});}[_0x2f9983(0xb7)](_0x2997bd,_0x37b3a1){const _0x51ef41=_0x2f9983;this[_0x51ef41(0x101)][_0x51ef41(0xb1)][_0x51ef41(0xb7)](_0x2997bd,_0x37b3a1);}[_0x2f9983(0xdd)](_0x1e37e2){const _0x3ece3a=_0x2f9983;this[_0x3ece3a(0x101)][_0x3ece3a(0xb1)][_0x3ece3a(0xdd)](_0x1e37e2);}[_0x2f9983(0x8c)](_0xabfb8b,_0x1a3e88){const _0x287def=_0x2f9983;this[_0x287def(0x101)][_0x287def(0xb1)][_0x287def(0x8c)](_0xabfb8b,_0x1a3e88);}[_0x2f9983(0xcb)](_0x19026){const _0x10b68b=_0x2f9983;this[_0x10b68b(0x101)][_0x10b68b(0xb1)][_0x10b68b(0xcb)](_0x19026);}[_0x2f9983(0xbe)](_0x51621f){const _0x4b6818=_0x2f9983;this[_0x4b6818(0x101)][_0x4b6818(0xb1)][_0x4b6818(0xbe)](_0x51621f);}[_0x2f9983(0x89)](){const _0x2607e7=_0x2f9983;this[_0x2607e7(0x101)][_0x2607e7(0xb1)][_0x2607e7(0x89)]();}[_0x2f9983(0xd8)](){const _0x12eb72=_0x2f9983;this[_0x12eb72(0x101)][_0x12eb72(0xb1)][_0x12eb72(0xd8)]();}[_0x2f9983(0x11f)](_0x500c9e,_0x6ff35,_0x4e6afd){const _0x2a55d5=_0x2f9983;this[_0x2a55d5(0x101)][_0x2a55d5(0xb1)][_0x2a55d5(0x11f)](_0x500c9e,_0x6ff35,_0x4e6afd);}[_0x2f9983(0xe3)](){const _0x1ac5f1=_0x2f9983;this[_0x1ac5f1(0x101)][_0x1ac5f1(0xb1)][_0x1ac5f1(0xe3)](),this[_0x1ac5f1(0x101)][_0x1ac5f1(0xb1)][_0x1ac5f1(0x11b)](this[_0x1ac5f1(0x128)]());}[_0x2f9983(0x8e)](_0x1dacf4){const _0x499adf=_0x2f9983;this[_0x499adf(0x101)][_0x499adf(0xb1)][_0x499adf(0x8e)](_0x1dacf4);}[_0x2f9983(0xa1)](_0x27e28e){const _0x44a20d=_0x2f9983;this[_0x44a20d(0x101)][_0x44a20d(0xb1)][_0x44a20d(0xe8)](_0x27e28e[_0x44a20d(0x88)]),this[_0x44a20d(0x101)][_0x44a20d(0xb1)][_0x44a20d(0xd3)](_0x27e28e[_0x44a20d(0xda)]),this[_0x44a20d(0x101)][_0x44a20d(0xb1)][_0x44a20d(0x11b)](this[_0x44a20d(0x128)](_0x27e28e));}[_0x2f9983(0xa4)](_0x2f3718,_0x2f5bf8){const _0x825956=_0x2f9983;this[_0x825956(0x101)][_0x825956(0xb1)][_0x825956(0xfa)](_0x2f3718),_0x2f5bf8&&this[_0x825956(0x101)][_0x825956(0xb1)][_0x825956(0x9d)](!0x1);}[_0x2f9983(0xc2)](_0x366e34){const _0x7da7e=_0x2f9983;this[_0x7da7e(0x99)]=_0x366e34;}[_0x2f9983(0xd6)](_0x1b8b9a){const _0x502fcd=_0x2f9983;this[_0x502fcd(0x101)][_0x502fcd(0xb4)][_0x502fcd(0xd6)](_0x1b8b9a);}[_0x2f9983(0x115)](){const _0x34d448=_0x2f9983;this[_0x34d448(0xe0)](_0x2343bc(this[_0x34d448(0x109)][_0x34d448(0xf9)],_0x34d448(0xf7)));}[_0x2f9983(0xe0)](_0x54e0db,_0x6c41f=!0x1){const _0x5c6ed7=_0x2f9983;if(_0x6c41f&&!_0x54cab1()&&_0x54e0db[_0x5c6ed7(0x95)])return this[_0x5c6ed7(0x101)][_0x5c6ed7(0xdc)][_0x5c6ed7(0xbd)]='',void this[_0x5c6ed7(0xfe)](_0x54e0db);this[_0x5c6ed7(0x101)][_0x5c6ed7(0xdc)][_0x5c6ed7(0xbd)]=_0x54e0db;}[_0x2f9983(0x94)](_0x4db87d){const _0x2ab656=_0x2f9983,_0x3cf7cd=this[_0x2ab656(0x118)](_0x4db87d);this[_0x2ab656(0x101)][_0x2ab656(0xb4)][_0x2ab656(0x94)](_0x3cf7cd);}[_0x2f9983(0xfe)](_0x5008d7){const _0x485ba0=_0x2f9983;let _0x38dd6b=0x0;clearInterval(this[_0x485ba0(0x113)]),this[_0x485ba0(0x113)]=setInterval(()=>{const _0x19383c=_0x485ba0;this[_0x19383c(0x101)][_0x19383c(0xdc)][_0x19383c(0xbd)]=this[_0x19383c(0x101)][_0x19383c(0xdc)][_0x19383c(0xbd)]+_0x5008d7[_0x38dd6b],_0x38dd6b++,_0x38dd6b===_0x5008d7[_0x19383c(0x95)]&&clearInterval(this[_0x19383c(0x113)]);},0x1e);}[_0x2f9983(0x10f)](_0x5e945c){const _0xadd68f=_0x2f9983;this[_0xadd68f(0x101)][_0xadd68f(0xdc)][_0xadd68f(0x11c)]=_0x5e945c;}[_0x2f9983(0x118)](_0x39a36d){const _0x3070ca=_0x2f9983;return _0x39a36d?_0x39a36d[_0x3070ca(0x88)]&&_0x39a36d[_0x3070ca(0xda)]?_0x2343bc(this[_0x3070ca(0x109)][_0x3070ca(0xf9)],_0x3070ca(0xa5)):_0x39a36d[_0x3070ca(0x88)]?_0x2343bc(this[_0x3070ca(0x109)][_0x3070ca(0xf9)],_0x3070ca(0xab)):_0x39a36d[_0x3070ca(0xda)]?_0x2343bc(this[_0x3070ca(0x109)][_0x3070ca(0xf9)],_0x3070ca(0x10e)):_0x2343bc(this[_0x3070ca(0x109)][_0x3070ca(0xf9)],_0x3070ca(0xbc)):'';}[_0x2f9983(0x128)](_0x40aa09){const _0x393a2b=_0x2f9983;return _0x40aa09?_0x40aa09[_0x393a2b(0x88)]&&_0x40aa09[_0x393a2b(0xda)]?_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xf3)):_0x40aa09[_0x393a2b(0x88)]?_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xd0)):_0x40aa09[_0x393a2b(0xda)]?_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xeb)):_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xce)):_0x2343bc(this[_0x393a2b(0x109)][_0x393a2b(0xf9)],_0x393a2b(0xce));}[_0x2f9983(0x110)](_0x437b22,_0x28c818,_0x2f1159,_0x157346){const _0x5707a9=_0x2f9983;this[_0x5707a9(0x101)][_0x5707a9(0x110)](_0x437b22,_0x28c818,_0x2f1159,_0x157346);}[_0x2f9983(0xfc)](_0x21c0dd){const _0x205a02=_0x2f9983;this[_0x205a02(0x101)][_0x205a02(0xfc)](_0x21c0dd);}[_0x2f9983(0xd2)](){const _0x3a2afe=_0x2f9983;this[_0x3a2afe(0x101)][_0x3a2afe(0xb1)][_0x3a2afe(0xd2)]();}[_0x2f9983(0xf4)](_0x4db056,_0x1685ab){const _0x3b2f2e=_0x2f9983;this[_0x3b2f2e(0x101)][_0x3b2f2e(0xb4)][_0x3b2f2e(0x112)](_0x4db056,_0x1685ab);}[_0x2f9983(0xae)](){const _0x4ff6b8=_0x2f9983;this[_0x4ff6b8(0x101)][_0x4ff6b8(0xb1)][_0x4ff6b8(0xf2)]=!0x0;}[_0x2f9983(0x8b)](){const _0x1ed7b4=_0x2f9983;this[_0x1ed7b4(0x101)][_0x1ed7b4(0xb1)][_0x1ed7b4(0xf2)]=!0x1;}}
|
|
@@ -2,233 +2,8 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import { AIContextItemType, AIContextTextResourceType, type AIContextItem, type AIContextItemRequestData } from '../../aicore/model/aicontext.js';
|
|
5
|
+
import { AIContextItemType, AIContextTextResourceType } from '../../aicore/model/aicontext.js';
|
|
7
6
|
export declare const AI_CONTEXT_MODEL_EVENT_NAMES: readonly ["contextItemAdded", "contextItemRemoved", "contextItemLoadingEnded", "contextSent", "error", "addContextOptionsChanged", "sourceResourcesLoaded", "resourceStateChanged", "uploadProgressChanged"];
|
|
8
|
-
declare const AIChatContext_base: {
|
|
9
|
-
new (): import("ckeditor5/src/utils.js").Observable;
|
|
10
|
-
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Manages the context of the current conversation.
|
|
14
|
-
*/
|
|
15
|
-
export declare class AIChatContext extends /* #__PURE__ */ AIChatContext_base {
|
|
16
|
-
constructor({ connector, config, ownerId }: {
|
|
17
|
-
connector: AIConnector;
|
|
18
|
-
config?: AIChatContextConfig;
|
|
19
|
-
ownerId: string;
|
|
20
|
-
});
|
|
21
|
-
/**
|
|
22
|
-
* Initializes the context.
|
|
23
|
-
*/
|
|
24
|
-
init(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Returns the pending context items that will be sent to the AI endpoint in the next interaction.
|
|
27
|
-
*
|
|
28
|
-
* @returns Map of pending context items keyed by their uiId
|
|
29
|
-
*/
|
|
30
|
-
getPendingContextItems(): Map<string, AIContextItem>;
|
|
31
|
-
/**
|
|
32
|
-
* Populates context items from message data.
|
|
33
|
-
* This method converts user message content to context items and adds them to the conversation context.
|
|
34
|
-
*/
|
|
35
|
-
populateFromMessage(content: AIUserMessage['content'][0]): Promise<AIContextItem>;
|
|
36
|
-
/**
|
|
37
|
-
* Creates a context item from conversation content.
|
|
38
|
-
*/
|
|
39
|
-
private _createContextItemFromContent;
|
|
40
|
-
/**
|
|
41
|
-
* Returns all context items that have been sent to the AI endpoint in the current conversation.
|
|
42
|
-
*
|
|
43
|
-
* @returns Map of sent context items keyed by their uiId
|
|
44
|
-
*/
|
|
45
|
-
getSentContextItems(): Map<string, AIContextItem>;
|
|
46
|
-
/**
|
|
47
|
-
* Removes a context item from the pending context.
|
|
48
|
-
* Read-only items cannot be removed and the method returns early.
|
|
49
|
-
*
|
|
50
|
-
* @param uiId The unique identifier of the context item to remove
|
|
51
|
-
*/
|
|
52
|
-
removeFromContext(uiId: string): void;
|
|
53
|
-
/**
|
|
54
|
-
* Clears all pending context items and adds the current document to the conversation context if it exists.
|
|
55
|
-
*/
|
|
56
|
-
clearPendingContextItems(): void;
|
|
57
|
-
/**
|
|
58
|
-
* Adds context items to the conversation context and clears the pending context items.
|
|
59
|
-
*/
|
|
60
|
-
addToConversationContext(contextItems: Map<string, AIContextItem>): void;
|
|
61
|
-
/**
|
|
62
|
-
* Checks if the current document is in the pending context.
|
|
63
|
-
*
|
|
64
|
-
* @returns True if the current document is in pending context, false otherwise
|
|
65
|
-
*/
|
|
66
|
-
isCurrentDocumentInContext(): boolean;
|
|
67
|
-
isSelectionInContext(): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Checks if the current document is in the conversation context.
|
|
70
|
-
*
|
|
71
|
-
* @returns True if the current document is in conversation context, false otherwise
|
|
72
|
-
*/
|
|
73
|
-
isCurrentDocumentInConversation(): boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Converts context items to request data format for API endpoint.
|
|
76
|
-
* This static method transforms the internal context item format to the format expected by the AI connector.
|
|
77
|
-
*
|
|
78
|
-
* @param contextItems Map of context items to convert
|
|
79
|
-
* @returns Array of context items in API request format
|
|
80
|
-
*/
|
|
81
|
-
static mapContextItemsToRequestData(contextItems: Map<string, AIContextItem>): Array<AIContextItemRequestData>;
|
|
82
|
-
/**
|
|
83
|
-
* Adds files to the context by uploading them and creating context items.
|
|
84
|
-
* This method handles multiple files concurrently and tracks upload progress.
|
|
85
|
-
*
|
|
86
|
-
* @param files Array of File objects to upload and add to context
|
|
87
|
-
* @param [attributes] Optional attributes object containing resourceId and label for tracking purposes and context chips
|
|
88
|
-
* @param [type] Context item type, defaults to AIContextItemType.FILE to indicate that the file is being added as a file or text
|
|
89
|
-
* @returns Promise that resolves when all files are processed
|
|
90
|
-
*/
|
|
91
|
-
addFilesToContext(files: Array<File>, attributes?: {
|
|
92
|
-
resourceId: string;
|
|
93
|
-
label: string;
|
|
94
|
-
}, type?: AIContextItemType.FILE | AIContextItemType.TEXT): Promise<void>;
|
|
95
|
-
/**
|
|
96
|
-
* Adds the current document to the pending context.
|
|
97
|
-
* If the document is already in context, this method returns early without changes.
|
|
98
|
-
*
|
|
99
|
-
* @param label Display label for the current document
|
|
100
|
-
*/
|
|
101
|
-
addCurrentDocumentToContext(label: string): void;
|
|
102
|
-
/**
|
|
103
|
-
* Updates the current document in the pending context with new content and version.
|
|
104
|
-
* This method uploads the document content and updates the context item accordingly.
|
|
105
|
-
*
|
|
106
|
-
* @param content The document content to upload, or undefined to skip
|
|
107
|
-
* @param version Version number of the document for change tracking
|
|
108
|
-
* @returns Promise that resolves when the document is updated
|
|
109
|
-
*/
|
|
110
|
-
updateCurrentDocument(content: string | undefined, version: number, sessionId: string | null, selections: Array<{
|
|
111
|
-
start: number;
|
|
112
|
-
end: number;
|
|
113
|
-
htmlFragment: string;
|
|
114
|
-
}>): Promise<void>;
|
|
115
|
-
addSelectionToContext(selection: string): void;
|
|
116
|
-
removeSelectionFromContext(): void;
|
|
117
|
-
/**
|
|
118
|
-
* Adds a URL to the context by uploading it and creating a context item.
|
|
119
|
-
* This method handles URL upload with proper error handling and progress tracking.
|
|
120
|
-
*
|
|
121
|
-
* @param url The URL to upload and add to context
|
|
122
|
-
* @param [attributes] Optional attributes object containing resourceId and label for tracking purposes and context chips
|
|
123
|
-
* @returns Promise that resolves when the URL is processed
|
|
124
|
-
*/
|
|
125
|
-
addUrlToContext(url: string, attributes?: {
|
|
126
|
-
resourceId: string;
|
|
127
|
-
label: string;
|
|
128
|
-
}): Promise<void>;
|
|
129
|
-
/**
|
|
130
|
-
* Loads resources for a given source provider with the specified query.
|
|
131
|
-
* This method calls the source's getResources callback and updates resource states.
|
|
132
|
-
*
|
|
133
|
-
* @param sourceId The unique identifier of the source provider
|
|
134
|
-
* @param query Search query to filter resources
|
|
135
|
-
* @param uid Unique identifier for the request to prevent race conditions
|
|
136
|
-
* @returns Promise resolving to array of resources with context state
|
|
137
|
-
*/
|
|
138
|
-
loadSourceResources(sourceId: string, query: string, uid: string): Promise<Array<AIContextResourceState>>;
|
|
139
|
-
addResourceToContext(source: AIContextProvider, resource: AIContextResource): Promise<void>;
|
|
140
|
-
}
|
|
141
|
-
export type AIChatContextItemAddedEvent = {
|
|
142
|
-
name: 'contextItemAdded';
|
|
143
|
-
args: [
|
|
144
|
-
{
|
|
145
|
-
contextItem: AIContextItem;
|
|
146
|
-
isLoading: boolean;
|
|
147
|
-
}
|
|
148
|
-
];
|
|
149
|
-
};
|
|
150
|
-
export type AIChatContextItemRemovedEvent = {
|
|
151
|
-
name: 'contextItemRemoved';
|
|
152
|
-
args: [
|
|
153
|
-
{
|
|
154
|
-
uiId: string;
|
|
155
|
-
type?: AIContextItemType;
|
|
156
|
-
}
|
|
157
|
-
];
|
|
158
|
-
};
|
|
159
|
-
export type AIChatContextItemLoadingEndedEvent = {
|
|
160
|
-
name: 'contextItemLoadingEnded';
|
|
161
|
-
args: [
|
|
162
|
-
{
|
|
163
|
-
contextItem: AIContextItem;
|
|
164
|
-
isLoading: boolean;
|
|
165
|
-
}
|
|
166
|
-
];
|
|
167
|
-
};
|
|
168
|
-
export type AIChatContextSentEvent = {
|
|
169
|
-
name: 'contextSent';
|
|
170
|
-
args: [
|
|
171
|
-
{
|
|
172
|
-
contextItems: Array<AIContextItem>;
|
|
173
|
-
}
|
|
174
|
-
];
|
|
175
|
-
};
|
|
176
|
-
export type AIChatContextAddContextOptionsChangedEvent = {
|
|
177
|
-
name: 'addContextOptionsChanged';
|
|
178
|
-
args: [
|
|
179
|
-
{
|
|
180
|
-
options: AIAddContextOptionsState;
|
|
181
|
-
}
|
|
182
|
-
];
|
|
183
|
-
};
|
|
184
|
-
export type AIChatContextSourceResourcesLoadedEvent = {
|
|
185
|
-
name: 'sourceResourcesLoaded';
|
|
186
|
-
args: [
|
|
187
|
-
{
|
|
188
|
-
sourceId: string;
|
|
189
|
-
source: AIContextProvider;
|
|
190
|
-
resources: Array<AIContextResourceState>;
|
|
191
|
-
uid: string;
|
|
192
|
-
}
|
|
193
|
-
];
|
|
194
|
-
};
|
|
195
|
-
export type AIChatContextResourceStateChangedEvent = {
|
|
196
|
-
name: 'resourceStateChanged';
|
|
197
|
-
args: [
|
|
198
|
-
{
|
|
199
|
-
sourceId: string;
|
|
200
|
-
resourceId: string;
|
|
201
|
-
isInContext: boolean;
|
|
202
|
-
}
|
|
203
|
-
];
|
|
204
|
-
};
|
|
205
|
-
export type AIChatContextUploadProgressChangedEvent = {
|
|
206
|
-
name: 'uploadProgressChanged';
|
|
207
|
-
args: [
|
|
208
|
-
{
|
|
209
|
-
isUploadInProgress: boolean;
|
|
210
|
-
}
|
|
211
|
-
];
|
|
212
|
-
};
|
|
213
|
-
export type AIAddContextOptionsState = {
|
|
214
|
-
document: {
|
|
215
|
-
enabled: boolean;
|
|
216
|
-
isHidden: boolean;
|
|
217
|
-
};
|
|
218
|
-
urls: {
|
|
219
|
-
enabled: boolean;
|
|
220
|
-
};
|
|
221
|
-
files: {
|
|
222
|
-
enabled: boolean;
|
|
223
|
-
};
|
|
224
|
-
sources: Array<AIContextProviderState>;
|
|
225
|
-
};
|
|
226
|
-
export type AIContextProviderState = AIContextProvider & {
|
|
227
|
-
resources: Array<AIContextResourceState>;
|
|
228
|
-
};
|
|
229
|
-
export type AIContextResourceState = AIContextResource & {
|
|
230
|
-
isInContext?: boolean;
|
|
231
|
-
};
|
|
232
7
|
/**
|
|
233
8
|
* The configuration of the AI Chat menu for adding resources to the prompt context.
|
|
234
9
|
*
|
|
@@ -357,4 +132,3 @@ export type AIContextTextResource = {
|
|
|
357
132
|
content: string;
|
|
358
133
|
type: AIContextTextResourceType;
|
|
359
134
|
};
|
|
360
|
-
export {};
|