/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */!function(t){function e(e){for(var n,i,s=e[0],o=e[1],a=0,c=[];a`?");return t}},function(t,e,n){t.exports=n(13)(1465)},function(t,e,n){"use strict";n.d(e,"c",(function(){return p})),n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return b}));var r=n(0),i=n.n(r),s=n(3),o=n(1),a={name:"1azakc",styles:"text-align:center"};const u=()=>{const t=a;return Object(o.jsx)("div",{css:t},Object(o.jsx)(s.EuiLoadingSpinner,null))};var c=n(4),l=n.n(c);const p=(t,e=Object(o.jsx)(u,null))=>i.a.forwardRef(((n,i)=>Object(o.jsx)(s.EuiErrorBoundary,null,Object(o.jsx)(r.Suspense,{fallback:e},Object(o.jsx)(t,l()({},n,{ref:i})))))),b=t=>t.metaKey||t.altKey||t.ctrlKey||t.shiftKey,d=(t,e)=>{let n=t;do{var r,i;if("a"===(null===(r=n)||void 0===r?void 0:r.tagName.toLowerCase()))return n;const t=null===(i=n)||void 0===i?void 0:i.parentElement;if(!t||t===document.body||t===e)break;n=t}while(parent||parent!==document.body||parent!==e)}},function(t,e,n){n.r(e);var r=__kbnBundles__.get("entry/core/public");Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))},function(t,e){t.exports=__kbnSharedDeps__.ReactDom},function(t,e,n){"use strict";let r;n.d(e,"a",(function(){return r})),function(t){t.System="system",t.Assistant="assistant",t.User="user",t.Function="function",t.Elastic="elastic"}(r||(r={}))},function(t,e,n){"use strict";var r=n(11);n.d(e,"a",(function(){return r.a}))},function(t,e){t.exports=__kbnSharedDeps_npm__},function(t,e,n){n(15),__kbnBundles__.define("plugin/observabilityAIAssistant/public",n,16)},function(t,e,n){n.p=window.__kbnPublicPath__.observabilityAIAssistant},function(t,e,n){"use strict";n.r(e),n.d(e,"ContextualInsight",(function(){return y})),n.d(e,"ObservabilityAIAssistantActionMenuItem",(function(){return g})),n.d(e,"ObservabilityAIAssistantProvider",(function(){return _.b})),n.d(e,"useObservabilityAIAssistant",(function(){return v.a})),n.d(e,"useObservabilityAIAssistantOptional",(function(){return v.b})),n.d(e,"MessageRole",(function(){return h.a})),n.d(e,"plugin",(function(){return m}));var r=n(0),i=n(8),s=n(4),o=n.n(s),a=n(7),u=n.n(a),c=n(9),l=n(5),p=n(10),b=n.n(p);function d({coreStart:t,enabled:e,licenseStart:r,securityStart:i,shareStart:s}){const o=(a=t,(t,e)=>{const{params:n}=e,{method:r,pathname:i,version:s}=function(t,e={}){const{method:n,pathname:r,version:i}=function(t){var e;const n=t.split(" "),r=n[0].trim().toLowerCase(),i=n[1].trim(),s=null===(e=n[2])||void 0===e?void 0:e.trim();if(!["get","post","put","delete"].includes(r))throw new Error(`Endpoint ${t} was not prefixed with a valid HTTP method`);if(!s&&i.startsWith("/api"))throw new Error(`Missing version for public endpoint ${t}`);return{method:r,pathname:i,version:s}}(t);return{method:n,pathname:Object.keys(e).reduce(((t,n)=>t.replace(`{${n}}`,e[n])),r),version:i}}(t,null==n?void 0:n.path);return a.http[r](i,{...e,body:n&&n.body?JSON.stringify(n.body):void 0,query:null==n?void 0:n.query,version:s})});var a;const u=[];return{isEnabled:()=>e,register:t=>{u.push(t)},start:async({signal:t})=>{const e=await n.e(6).then(n.bind(null,106));return await e.createChatService({client:o,signal:t,registrations:u})},callApi:o,getCurrentUser:()=>i.authc.getCurrentUser(),getLicense:()=>r.license$,getLicenseManagementLocator:()=>s}}var f=n(1);class plugin_ObservabilityAIAssistantPlugin{constructor(t){u()(this,"logger",void 0),u()(this,"service",void 0),this.logger=t.logger.get()}setup(t,e){return t.application.register({id:"observabilityAIAssistant",title:l.i18n.translate("xpack.observabilityAiAssistant.appTitle",{defaultMessage:"Observability AI Assistant"}),euiIconType:"logoObservability",appRoute:"/app/observabilityAIAssistant",category:c.DEFAULT_APP_CATEGORIES.observability,navLinkStatus:c.AppNavLinkStatus.hidden,deepLinks:[{id:"conversations",title:l.i18n.translate("xpack.observabilityAiAssistant.conversationsDeepLinkTitle",{defaultMessage:"Conversations"}),path:"/conversations/new"}],mount:async e=>{const[{Application:r},[i,s]]=await Promise.all([Promise.all([n.e(0),n.e(3)]).then(n.bind(null,105)),t.getStartServices()]);return b.a.render(Object(f.jsx)(r,o()({},e,{service:this.service,coreStart:i,pluginsStart:s})),e.element),()=>{b.a.unmountComponentAtNode(e.element)}}}),{}}start(t,e){const r=this.service=d({coreStart:t,securityStart:e.security,licenseStart:e.licensing,shareStart:e.share,enabled:!0===t.application.capabilities.observabilityAIAssistant.show});return r.register((async({signal:i,registerContext:s,registerFunction:o})=>(await n.e(2).then(n.bind(null,104))).registerFunctions({service:r,signal:i,pluginsStart:e,coreStart:t,registerContext:s,registerFunction:o}))),r}}var _=n(2),v=n(6),h=n(12);const y=Object(i.c)(Object(r.lazy)((()=>Promise.all([n.e(0),n.e(5)]).then(n.bind(null,107)).then((t=>({default:t.Insight})))))),g=Object(i.c)(Object(r.lazy)((()=>Promise.all([n.e(0),n.e(4)]).then(n.bind(null,103)).then((t=>({default:t.ObservabilityAIAssistantActionMenuItem})))))),m=t=>new plugin_ObservabilityAIAssistantPlugin(t)},function(t,e){t.exports=__kbnSharedDeps__.IoTs},function(t,e){t.exports=__kbnSharedDeps__.Lodash},function(t,e){t.exports=__kbnSharedDeps__.ReactRouterDom},function(t,e){t.exports=__kbnSharedDeps__.TsLib},function(t,e){t.exports=__kbnSharedDeps__.KbnUiTheme},function(t,e,n){n.r(e);var r=__kbnBundles__.get("plugin/kibanaUtils/common");Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))},function(t,e,n){n.r(e);var r=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))},function(t,e){t.exports=__kbnSharedDeps__.KbnI18nReact},function(t,e){t.exports=__kbnSharedDeps__.EmotionCache},function(t,e){t.exports=__kbnSharedDeps__.Rxjs},function(t,e){t.exports=__kbnSharedDeps__.ReactRouterDomV5Compat},function(t,e){t.exports=__kbnSharedDeps__.KbnStd},function(t,e){t.exports=__kbnSharedDeps__.Uuid},function(t,e){t.exports=__kbnSharedDeps__.Moment},function(t,e){t.exports=__kbnSharedDeps__.KbnDatemath},function(t,e){t.exports=__kbnSharedDeps__.ReactRouter},function(t,e){t.exports=__kbnSharedDeps__.KbnMonaco},function(t,e){t.exports=__kbnSharedDeps__.Classnames},function(t,e,n){n.r(e);var r=__kbnBundles__.get("plugin/fieldFormats/common");Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}]);