!function(e){function t(t){for(var r,n,o=t[0],a=t[1],s=0,l=[];s{if(this.features.has(e.id))throw new Error(`Feature with id [${e.id}] has already been registered. Use a unique id.`);this.features.set(e.id,e)},registerSolution:e=>{if(this.solutions.has(e.id))throw new Error(`Solution with id [${e.id}] has already been registered. Use a unique id.`);this.solutions.set(e.id,e)}}}start({capabilities:e}){this.capabilities=e}get(){if(null===this.capabilities)throw new Error("Catalogue entries are only available after start phase");const e=this.capabilities;return[...this.features.values()].filter((t=>!1!==e.catalogue[t.id]&&(!t.visible||t.visible()))).sort(c("title"))}getSolutions(){if(null===this.capabilities)throw new Error("Catalogue entries are only available after start phase");const e=this.capabilities;return[...this.solutions.values()].filter((t=>!1!==e.catalogue[t.id])).sort(c("title"))}removeFeature(e){this.features.delete(e)}}const c=e=>(t,r)=>t[e]r[e]?1:0;class environment_EnvironmentService{constructor(){o()(this,"environment",{cloud:!1,apmUi:!1,ml:!1})}setup(){return{update:e=>{this.environment=Object.assign({},this.environment,e)}}}getEnvironment(){return this.environment}}class tutorial_service_TutorialService{constructor(){o()(this,"tutorialVariables",{}),o()(this,"tutorialDirectoryHeaderLinks",{}),o()(this,"tutorialModuleNotices",{}),o()(this,"customStatusCheck",{}),o()(this,"customComponent",{})}setup(){return{setVariable:(e,t)=>{if(this.tutorialVariables[e])throw new Error("variable already set");this.tutorialVariables[e]=t},registerDirectoryHeaderLink:(e,t)=>{if(this.tutorialDirectoryHeaderLinks[e])throw new Error(`directory header link ${e} already set`);this.tutorialDirectoryHeaderLinks[e]=t},registerModuleNotice:(e,t)=>{if(this.tutorialModuleNotices[e])throw new Error(`module notice ${e} already set`);this.tutorialModuleNotices[e]=t},registerCustomStatusCheck:(e,t)=>{this.customStatusCheck[e]=t},registerCustomComponent:(e,t)=>{this.customComponent[e]=t}}}getVariables(){return this.tutorialVariables}getDirectoryHeaderLinks(){return Object.values(this.tutorialDirectoryHeaderLinks)}getModuleNotices(){return Object.values(this.tutorialModuleNotices)}getCustomStatusCheck(e){return this.customStatusCheck[e]}getCustomComponent(e){return this.customComponent[e]}}class add_data_service_AddDataService{constructor(){o()(this,"addDataTabs",{})}setup(){return{registerAddDataTab:e=>{if(this.addDataTabs[e.id])throw new Error(`Tab ${e.id} already exists`);this.addDataTabs[e.id]=e}}}getAddDataTabs(){return Object.values(this.addDataTabs)}}class welcome_service_WelcomeService{constructor(){o()(this,"onRenderedHandlers",[]),o()(this,"renderTelemetryNoticeHandler",void 0),o()(this,"setup",(()=>({registerOnRendered:e=>{this.onRenderedHandlers.push(e)},registerTelemetryNoticeRenderer:e=>{if(this.renderTelemetryNoticeHandler)throw new Error("Only one renderTelemetryNotice handler can be registered");this.renderTelemetryNoticeHandler=e}}))),o()(this,"onRendered",(()=>{this.onRenderedHandlers.forEach((e=>{try{e()}catch(e){console.error(e)}}))})),o()(this,"renderTelemetryNotice",(()=>{if(this.renderTelemetryNoticeHandler)try{return this.renderTelemetryNoticeHandler()}catch(e){console.error(e)}return null}))}}class plugin_HomePublicPlugin{constructor(e){o()(this,"featuresCatalogueRegistry",new feature_catalogue_registry_FeatureCatalogueRegistry),o()(this,"environmentService",new environment_EnvironmentService),o()(this,"tutorialService",new tutorial_service_TutorialService),o()(this,"addDataService",new add_data_service_AddDataService),o()(this,"welcomeService",new welcome_service_WelcomeService),this.initializerContext=e}setup(e,{cloud:t,share:i,urlForwarding:n,usageCollection:o}){e.application.register({id:u.b,title:"Home",navLinkStatus:s.AppNavLinkStatus.hidden,mount:async n=>{const s=o?o.reportUiCounter.bind(o,"Kibana_home"):()=>{},[u,{dataViews:c,urlForwarding:d,guidedOnboarding:h,cloudChatProvider:p}]=await e.getStartServices();Object(l.b)({share:i,trackUiMetric:s,kibanaVersion:this.initializerContext.env.packageInfo.version,http:u.http,toastNotifications:u.notifications.toasts,banners:u.overlays.banners,docLinks:u.docLinks,savedObjectsClient:u.savedObjects.client,chrome:u.chrome,application:u.application,uiSettings:e.uiSettings,addBasePath:e.http.basePath.prepend,getBasePath:e.http.basePath.get,dataViewsService:c,environmentService:this.environmentService,urlForwarding:d,homeConfig:this.initializerContext.config.get(),tutorialService:this.tutorialService,addDataService:this.addDataService,featureCatalogue:this.featuresCatalogueRegistry,welcomeService:this.welcomeService,guidedOnboardingService:h.guidedOnboardingApi,cloud:t,cloudChat:p}),u.chrome.docTitle.change(a.i18n.translate("home.pageTitle",{defaultMessage:"Home"}));const{renderApp:f}=await r.e(1).then(r.bind(null,151));return await f(n.element,n.theme$,u,n.history)}}),n.forwardApp("home","home");const c={...this.featuresCatalogueRegistry.setup()};c.register({id:"home_tutorial_directory",title:a.i18n.translate("home.tutorialDirectory.featureCatalogueTitle",{defaultMessage:"Add data"}),description:a.i18n.translate("home.tutorialDirectory.featureCatalogueDescription",{defaultMessage:"Ingest data from popular apps and services."}),icon:"indexOpen",showOnHomePage:!0,path:`${u.a}#/tutorial_directory`,category:"data",order:500});const d={...this.environmentService.setup()},h={...this.tutorialService.setup()};var p,f,_,b;return t&&(d.update({cloud:t.isCloudEnabled}),t.isCloudEnabled&&h.setVariable("cloud",{id:t.cloudId,baseUrl:t.baseUrl,profileUrl:null===(p=t.profileUrl)||void 0===p?void 0:p.replace(null!==(f=t.baseUrl)&&void 0!==f?f:"",""),deploymentUrl:null===(_=t.deploymentUrl)||void 0===_?void 0:_.replace(null!==(b=t.baseUrl)&&void 0!==b?b:"","")})),{featureCatalogue:c,environment:d,tutorials:h,addData:{...this.addDataService.setup()},welcomeScreen:{...this.welcomeService.setup()}}}start({application:{capabilities:e}}){return this.featuresCatalogueRegistry.start({capabilities:e}),{featureCatalogue:this.featuresCatalogueRegistry}}}const d=e=>new plugin_HomePublicPlugin(e)},function(e,t){e.exports=__kbnSharedDeps__.React},function(e,t){e.exports=__kbnSharedDeps__.EmotionReact},function(e,t){e.exports=__kbnSharedDeps__.ElasticEui},function(e,t){e.exports=__kbnSharedDeps__.KbnI18nReact},function(e,t,r){r.r(t);var i=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(i))},function(e,t){e.exports=__kbnSharedDeps__.Lodash},function(e,t){e.exports=__kbnSharedDeps__.Classnames},function(e,t){e.exports=__kbnSharedDeps__.KbnAnalytics},function(e,t){e.exports=__kbnSharedDeps__.ReactRouterDom},function(e,t){e.exports=__kbnSharedDeps__.TsLib},function(e,t){e.exports=__kbnSharedDeps__.EmotionCache},function(e,t){e.exports=__kbnSharedDeps__.ReactRouterDomV5Compat},function(e,t){e.exports=__kbnSharedDeps__.ReactDom},function(e,t){e.exports=__kbnSharedDeps__.KbnUiTheme}]);