/*! 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. */ (window.enterpriseSearch_bundle_jsonpfunction=window.enterpriseSearch_bundle_jsonpfunction||[]).push([[11],{100:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return o})),n(10);var a=n(12),i=n(2),s=n(5),r=n(11);let l;!function(e){e.NATIVE_CONNECTOR="nativeConnector",e.CRAWLER="crawler",e.INFERENCE="inference",e.PIPELINES="pipelines",e.SEARCH_APPLICATIONS="searchApplications",e.ANALYTICS="analytics"}(l||(l={}));const o=({feature:e})=>{const t={[l.NATIVE_CONNECTOR]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.nativeConnector.contentOne",{defaultMessage:"Built-in connectors require a Platinum license or higher and are not available to Standard license self-managed deployments. You need to upgrade to use this feature."}),[l.CRAWLER]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.crawler.contentOne",{defaultMessage:"The web crawler requires a Platinum license or higher and is not available to Standard license self-managed deployments. You need to upgrade to use this feature."}),[l.INFERENCE]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.inference.contentOne",{defaultMessage:"Inference processors require a Platinum license or higher and are not available to Standard license self-managed deployments. You need to upgrade to use this feature."}),[l.PIPELINES]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.pipelines.contentOne",{defaultMessage:"Custom pipelines require a Platinum license or higher and are not available to Standard license self-managed deployments. You need to upgrade to use this feature."}),[l.SEARCH_APPLICATIONS]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.searchApplications.contentOne",{defaultMessage:"Search Applications require a Platinum license or higher and are not available to Standard license self-managed deployments. You need to upgrade to use this feature."}),[l.ANALYTICS]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.analytics.contentOne",{defaultMessage:"Behavioral Analytics require a Platinum license or higher and are not available to Standard license self-managed deployments. You need to upgrade to use this feature."})},n={[l.NATIVE_CONNECTOR]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.contentTwo",{defaultMessage:"Did you know that built-in connectors are available with a Standard Elastic Cloud license? Elastic Cloud gives you the flexibility to run where you want. Deploy our managed service on Google Cloud, Microsoft Azure, or Amazon Web Services, and we'll handle the maintenance and upkeep for you."}),[l.CRAWLER]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.crawler.contentTwo",{defaultMessage:"Did you know that web crawlers are available with a Standard Elastic Cloud license? Elastic Cloud gives you the flexibility to run where you want. Deploy our managed service on Google Cloud, Microsoft Azure, or Amazon Web Services, and we'll handle the maintenance and upkeep for you."}),[l.INFERENCE]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.inference.contentTwo",{defaultMessage:"Did you know that inference processors are available with a Standard Elastic Cloud license? Elastic Cloud gives you the flexibility to run where you want. Deploy our managed service on Google Cloud, Microsoft Azure, or Amazon Web Services, and we'll handle the maintenance and upkeep for you."}),[l.PIPELINES]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.pipelines.contentTwo",{defaultMessage:"Did you know that custom pipelines are available with a Standard Elastic Cloud license? Elastic Cloud gives you the flexibility to run where you want. Deploy our managed service on Google Cloud, Microsoft Azure, or Amazon Web Services, and we'll handle the maintenance and upkeep for you."}),[l.SEARCH_APPLICATIONS]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.searchApplications.contentTwo",{defaultMessage:"Did you know that Search Applications are available with a Standard Elastic Cloud license? Elastic Cloud gives you the flexibility to run where you want. Deploy our managed service on Google Cloud, Microsoft Azure, or Amazon Web Services and we'll handle the maintenance and upkeep for you."}),[l.ANALYTICS]:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.analytics.contentTwo",{defaultMessage:"Did you know that Behavioral Analytics are available with a Standard Elastic Cloud license? Elastic Cloud gives you the flexibility to run where you want. Deploy our managed service on Google Cloud, Microsoft Azure, or Amazon Web Services and we'll handle the maintenance and upkeep for you."})};return Object(r.jsx)(a.EuiCallOut,{title:i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.title",{defaultMessage:"Platinum features"})},Object(r.jsx)("p",null,t[e]),Object(r.jsx)("p",null,n[e]),Object(r.jsx)(a.EuiFlexGroup,null,Object(r.jsx)(a.EuiFlexItem,null,Object(r.jsx)(a.EuiLink,{external:!0,href:s.a.licenseManagement},i.i18n.translate("xpack.enterpriseSearch.workplaceSearch.explorePlatinumFeatures.link",{defaultMessage:"Explore Platinum features"}))),Object(r.jsx)(a.EuiFlexItem,null,Object(r.jsx)(a.EuiLink,{href:"https://www.elastic.co/subscriptions/cloud",external:!0},i.i18n.translate("xpack.enterpriseSearch.content.licensingCallout.contentCloudTrial",{defaultMessage:"Explore Enterprise Search on Elastic Cloud "})))))}},1002:function(e,t,n){"use strict";n.r(t),n.d(t,"EnterpriseSearchContent",(function(){return wd})),n.d(t,"EnterpriseSearchContentConfigured",(function(){return vd}));var a=n(10),i=n.n(a),s=n(14),r=n(32),l=n(48),o=n(64),c=n(236),u=n(119),d=n(33),p=n(36),g=n(66),j=n(1),x=n(120),M=n(49),h=n(41),m=n.n(h),f=n(54),b=n(53),y=n(11);const O=({children:e,pageChrome:t,pageViewTelemetry:n,...a})=>Object(y.jsx)(b.a,m()({},a,{solutionNav:{items:Object(b.d)(),name:j.k.NAME},restrictWidth:!0,setPageChrome:t&&Object(y.jsx)(f.e,{trail:t})}),n&&Object(y.jsx)(M.b,{action:"viewed",metric:n}),e),I=({pageChrome:e=[]})=>Object(y.jsx)(O,{pageChrome:[...e,"404"],customPageSections:!0},Object(y.jsx)(M.b,{action:"error",metric:"not_found"}),Object(y.jsx)(x.a,{productSupportUrl:j.k.SUPPORT_URL}));var S=n(12),N=n(2),E=n(13),D=n(431),T=n.n(D),w=n(177),v=n.n(w),C=n(46),k=n(4),A=n(39);n(432);const L=({title:e,buttonLabel:t})=>{const{colorMode:n}=Object(S.useEuiTheme)();return Object(y.jsx)(S.EuiPanel,{color:"transparent",paddingSize:"none"},Object(y.jsx)(S.EuiFlexGroup,{className:"addContentEmptyPrompt",justifyContent:"spaceBetween",direction:"row"},Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiFlexGroup,{direction:"column",responsive:!1},Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiTitle,null,Object(y.jsx)("h2",null,e||N.i18n.translate("xpack.enterpriseSearch.overview.emptyState.heading",{defaultMessage:"Add content to Search"}))),Object(y.jsx)(S.EuiSpacer,{size:"l"}),Object(y.jsx)(S.EuiText,{grow:!1},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.emptyState.description",{defaultMessage:"Your content is stored in an Elasticsearch index. Get started by creating an Elasticsearch index and selecting an ingestion method. Options include the Elastic web crawler, third party data integrations, or using Elasticsearch API endpoints."})),Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.emptyState.description.line2",{defaultMessage:"Whether you're building a search experience with App Search or Elasticsearch, you can now get started here."})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(A.d,{to:Object(s.generatePath)(j.k.URL+C.g),shouldNotCreateHref:!0},Object(y.jsx)(S.EuiButton,{color:"primary",fill:!0},t||N.i18n.translate("xpack.enterpriseSearch.overview.emptyState.buttonTitle",{defaultMessage:"Add content to Search"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{href:k.a.start,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.overview.emptyState.footerLinkTitle",{defaultMessage:"Learn more"}))))))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiImage,{size:"xl",float:"right",src:"LIGHT"===n?v.a:T.a,alt:N.i18n.translate("xpack.enterpriseSearch.overview.searchIndices.image.altText",{defaultMessage:"Search indices illustration"})}))))};var z=n(239),_=n(260);n(456);const R=[{icon:"logoElasticsearch",title:"Elasticsearch",tooltip:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.elasticsearch.tooltip",{defaultMessage:"Use App and Workplace Search Search Engines with existing Elasticsearch indices"})},{icon:"desktop",title:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.api.title",{defaultMessage:"API"}),tooltip:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.api.tooltip",{defaultMessage:"POST documents to an API endpoint from your own applications"})},{icon:"globe",title:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.crawler.title",{defaultMessage:"Elastic Web Crawler"}),tooltip:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.crawler.tooltip",{defaultMessage:"Automatically index content from your websites"})},{icon:_.a.confluence,title:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.confluence.title",{defaultMessage:"Confluence"}),tooltip:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.confluence.tooltip",{defaultMessage:"Index content from Atlassian Confluence"})},{icon:_.a.googleDrive,title:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.googleDrive.title",{defaultMessage:"Google Drive"}),tooltip:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.googleDrive.tooltip",{defaultMessage:"Index documents from Google Drive"})},{icon:_.a.sharePoint,title:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.sharePoint.title",{defaultMessage:"Microsoft SharePoint"}),tooltip:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.sharePoint.tooltip",{defaultMessage:"Index content from Microsoft SharePoint"})},{icon:_.a.github,title:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.github.title",{defaultMessage:"GitHub"}),tooltip:N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.github.tooltip",{defaultMessage:"Index issues, pull requests, and more from GitHub"})}],F=()=>Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",alignItems:"center",className:"gettingStartedSteps"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",alignItems:"center",responsive:!1},R.map(((e,t)=>Object(y.jsx)(S.EuiFlexItem,{grow:!1,key:t},Object(y.jsx)(S.EuiToolTip,{content:Object(y.jsx)(S.EuiText,null,Object(y.jsx)("h4",{className:"iconTooltip"},e.title),e.tooltip)},Object(y.jsx)(S.EuiIcon,{className:"grayscaleSvg",type:e.icon,size:"m",color:"text"}))))))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiBadge,{color:"hollow"},N.i18n.translate("xpack.enterpriseSearch.overview.iconRow.manyMoreBadge",{defaultMessage:"And many more"})))),U=({step:e="first"})=>Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiSteps,{steps:[{title:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStartedSteps.addData.title",{defaultMessage:"Add your documents to Search"}),children:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiText,{color:"subdued"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.overview.gettingStartedSteps.addData.message",{defaultMessage:"Add your data to Search. You can crawl website content with the Elastic web crawler, connect your existing application with Elasticsearch API endpoints, or use connectors to directly add third party content from providers like Google Drive, Microsoft Sharepoint and more."}))),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(F,null)),status:"first"===e?"current":"complete"},{title:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStartedSteps.buildSearchExperience.title",{defaultMessage:"Build a search experience"}),children:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiText,{color:"subdued"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.overview.gettingStartedSteps.buildSearchExperience.message",{defaultMessage:"Create a search engine with App Search for a prebuild set of search management tools, or deeply customize your own tools by searching directly against Elasticsearch. Then build beautiful client-side search experiences with Search UI - available for Elasticsearch, App Search, and Workplace Search."}))),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(A.d,{shouldNotCreateHref:!0,to:j.h.URL},Object(y.jsx)(S.EuiIcon,{type:"iInCircle"})," ",N.i18n.translate("xpack.enterpriseSearch.overview.gettingStartedSteps.searchWithElasticsearchLink",{defaultMessage:"Search with the Elasticsearch API"}))))),status:"second"===e?"current":"incomplete"},{title:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStartedSteps.tuneSearchExperience.title",{defaultMessage:"Tune your search relevance"}),children:Object(y.jsx)(S.EuiText,{color:"subdued"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.overview.gettingStartedSteps.tuneSearchExperience.message",{defaultMessage:"Refine your search results by adjusting your search settings, including weighting certain fields or creating curations and synonyms. Then implement, measure, and dive into analytics to continue helping your users find exactly what they're looking for."}))),status:"incomplete"}]})));var P=n(121),Q=n(55),Y=n(166);const B=()=>Object(y.jsx)(S.EuiCallOut,{iconType:"warning",color:"warning",title:N.i18n.translate("xpack.enterpriseSearch.content.cannotConnect.title",{defaultMessage:"Cannot connect to Enterprise Search"})},Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.searchIndex.cannotConnect.body",defaultMessage:"The Elastic web crawler requires Enterprise Search. {link}",values:{link:Object(y.jsx)(A.d,{to:C.b},N.i18n.translate("xpack.enterpriseSearch.content.cannotConnect.body",{defaultMessage:"More information."}))}})));var G=n(51),$=n(44),V=n(42);const q=Object(V.a)(["cancel_syncs_api_logic"],(async({connectorId:e})=>{const t=`/internal/enterprise_search/connectors/${e}/cancel_syncs`;return await d.a.values.http.post(t)}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.cancelSyncs.successMessage",{defaultMessage:"Successfully canceled syncs"})}),W=Object(V.a)(["delete_index_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}`;return await d.a.values.http.delete(t),{indexName:e}}),{showSuccessFlashFn:({indexName:e})=>N.i18n.translate("xpack.enterpriseSearch.content.indices.deleteIndex.successToast.title",{defaultMessage:"Your index {indexName} and any associated ingestion configurations were successfully deleted",values:{indexName:e}})}),Z=Object(V.a)(["fetch_index_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}`;return await d.a.values.http.get(t)}),{clearFlashMessagesOnMakeRequest:!1,showErrorFlash:!1}),H=Object(V.a)(["content","indices_api_logic"],(async({from:e,onlyShowSearchOptimizedIndices:t,returnHiddenIndices:n,searchQuery:a,size:i})=>{const{http:s}=d.a.values,r={from:e,only_show_search_optimized_indices:t,return_hidden_indices:n,search_query:a||null,size:null!=i?i:20};return{...await s.get("/internal/enterprise_search/indices",{query:r}),isInitialRequest:0===e&&!a&&!t,onlyShowSearchOptimizedIndices:t,returnHiddenIndices:n,searchQuery:a}}));var J=n(107);const X=Object(r.kea)({actions:{closeDeleteModal:!0,fetchIndices:({from:e,onlyShowSearchOptimizedIndices:t,returnHiddenIndices:n,searchQuery:a,size:i})=>({from:e,onlyShowSearchOptimizedIndices:t,returnHiddenIndices:n,searchQuery:a,size:i}),onPaginate:e=>({newPageIndex:e}),openDeleteModal:e=>({indexName:e}),setIsFirstRequest:!0},connect:{actions:[q,["apiSuccess as cancelSuccess"],Z,["makeRequest as fetchIndexDetails"],H,["makeRequest","apiSuccess","apiError"],W,["apiError as deleteError","apiSuccess as deleteSuccess","makeRequest as deleteIndex"]],values:[Z,["data as indexDetails","status as indexDetailsStatus"],H,["data","status"],W,["status as deleteStatus"]]},listeners:({actions:e,values:t})=>({cancelSuccess:async()=>{e.fetchIndexDetails({indexName:t.deleteModalIndexName})},deleteSuccess:()=>{e.closeDeleteModal(),e.fetchIndices(t.searchParams)},fetchIndices:async(t,n)=>{await n(150),e.makeRequest(t)},openDeleteModal:({indexName:t})=>{e.fetchIndexDetails({indexName:t})}}),path:["enterprise_search","content","indices_logic"],reducers:()=>({deleteModalIndexName:["",{closeDeleteModal:()=>"",openDeleteModal:(e,{indexName:t})=>t}],isDeleteModalVisible:[!1,{closeDeleteModal:()=>!1,openDeleteModal:()=>!0}],isFirstRequest:[!0,{apiError:()=>!1,apiSuccess:()=>!1,setIsFirstRequest:()=>!0}],searchParams:[{from:0,onlyShowSearchOptimizedIndices:!1,returnHiddenIndices:!1,size:20},{apiSuccess:(e,{meta:t,onlyShowSearchOptimizedIndices:n,returnHiddenIndices:a,searchQuery:i})=>({from:t.page.from,onlyShowSearchOptimizedIndices:n,returnHiddenIndices:a,searchQuery:i,size:t.page.size}),onPaginate:(e,{newPageIndex:t})=>({...e,from:(t-1)*e.size})}]}),selectors:({selectors:e})=>({deleteModalIndex:[()=>[e.deleteModalIndexName,e.indexDetails],(e,t)=>e===(null==t?void 0:t.name)?t:null],deleteModalIndexHasInProgressSyncs:[()=>[e.deleteModalIndex],e=>!!e&&e.has_in_progress_syncs],deleteModalIngestionMethod:[()=>[e.indexDetails],e=>e?Object(G.b)(e):J.a.API],hasNoIndices:[()=>[e.data],e=>{var t;return null!==(t=(null==e?void 0:e.isInitialRequest)&&(null==e?void 0:e.indices)&&0===e.indices.length)&&void 0!==t&&t}],indices:[()=>[e.data],e=>null!=e&&e.indices?e.indices.map(G.e):[]],isDeleteLoading:[()=>[e.deleteStatus],e=>[$.a.LOADING].includes(e)],isFetchIndexDetailsLoading:[()=>[e.indexDetailsStatus],e=>[$.a.IDLE,$.a.LOADING].includes(e)],isLoading:[()=>[e.status,e.isFirstRequest],(e,t)=>[$.a.LOADING,$.a.IDLE].includes(e)&&t],meta:[()=>[e.data],e=>{var t;return null!==(t=null==e?void 0:e.meta)&&void 0!==t?t:{page:{from:0,size:20,total:0}}}]})}),K=()=>{const{closeDeleteModal:e,deleteIndex:t}=Object(r.useActions)(X),{deleteModalIndexName:n,deleteModalIndexHasInProgressSyncs:s,deleteModalIngestionMethod:l,isDeleteModalVisible:o,isDeleteLoading:c,isFetchIndexDetailsLoading:u}=Object(r.useValues)(X),[d,p]=Object(a.useState)("");return o?Object(y.jsx)(S.EuiConfirmModal,{title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deleteModal.title",{defaultMessage:"Are you sure you want to delete {indexName}",values:{indexName:n}}),onCancel:()=>{e()},onConfirm:()=>{t({indexName:n})},cancelButtonText:c?N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deleteModal.closeButton.title",{defaultMessage:"Close"}):N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deleteModal.cancelButton.title",{defaultMessage:"Cancel"}),confirmButtonText:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deleteModal.confirmButton.title",{defaultMessage:"Delete index"}),defaultFocusedButton:"confirm",buttonColor:"danger",confirmButtonDisabled:d.trim()!==n,isLoading:c||u},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deleteModal.delete.description",{defaultMessage:"Deleting this index will also delete all of its data and its {ingestionMethod} configuration. Any associated search applications will no longer be able to access any data stored in this index.",values:{ingestionMethod:Object(G.f)(l)}})),s&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiCallOut,{color:"warning",iconType:"warning",title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deleteModal.syncsWarning.title",{defaultMessage:"Syncs in progress"})},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deleteModal.syncsWarning.description",{defaultMessage:"This index has in-progress syncs. Deleting the index without stopping these syncs may result in dangling sync job records or the index being re-created."}))),Object(y.jsx)(S.EuiSpacer,null)),Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deleteModal.syncsWarning.indexNameDescription",{defaultMessage:"This action cannot be undone. Please type {indexName} to confirm.",values:{indexName:n}})),Object(y.jsx)(S.EuiForm,null,Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deleteModal.indexNameInput.label",{defaultMessage:"Index name"})},Object(y.jsx)(S.EuiFieldText,{onChange:e=>p(e.target.value),value:d})))):Object(y.jsx)(i.a.Fragment,null)},ee=Object(V.a)(["enterprise_search_content","fetch_sync_jobs_stats_api_logic"],(async()=>await d.a.values.http.get("/internal/enterprise_search/stats/sync_jobs"))),te=()=>{var e,t,n,i,s,l;const{makeRequest:o}=Object(r.useActions)(ee),{data:c,status:u}=Object(r.useValues)(ee),d=u===$.a.LOADING;Object(a.useEffect)((()=>{o({})}),[]);const p=N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.jobStats.unknown",{defaultMessage:"Unknown"});return Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:null!=c&&c.connected?"success":"subdued",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,{titleSize:"m",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.jobStats.connectedMethods",{defaultMessage:"Connected ingest methods"}),isLoading:d,title:null!==(e=null==c?void 0:c.connected)&&void 0!==e?e:p}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:null!=c&&c.incomplete?"warning":"subdued",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,{titleSize:"m",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.jobStats.incompleteMethods",{defaultMessage:"Incomplete ingest methods"}),isLoading:d,title:null!==(t=null==c?void 0:c.incomplete)&&void 0!==t?t:p}))))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:"subdued",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,{titleSize:"m",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.jobStats.runningSyncs",{defaultMessage:"Running syncs"}),isLoading:d,title:null!==(n=null==c?void 0:c.in_progress)&&void 0!==n?n:p}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:null!=c&&c.idle?"warning":"subdued",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,{titleSize:"m",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.jobStats.longRunningSyncs",{defaultMessage:"Idle syncs"}),isLoading:d,title:null!==(i=null==c?void 0:c.idle)&&void 0!==i?i:p}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:null!=c&&c.orphaned_jobs?"warning":"subdued",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,{titleSize:"m",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.jobStats.orphanedSyncs",{defaultMessage:"Orphaned syncs"}),isLoading:d,title:null!==(s=null==c?void 0:c.orphaned_jobs)&&void 0!==s?s:p}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:null!=c&&c.errors?"danger":"subdued",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,{titleSize:"m",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.jobStats.errorSyncs",{defaultMessage:"Syncs errors"}),isLoading:d,title:null!==(l=null==c?void 0:c.errors)&&void 0!==l?l:p}))))))};var ne=n(56);const ae=N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.usernameLabel",{defaultMessage:"Username"}),ie=N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.passwordLabel",{defaultMessage:"Password"}),se=N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.enableSSL.label",{defaultMessage:"Enable SSL"}),re=N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sslCertificate.label",{defaultMessage:"SSL certificate"}),le=N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.retriesPerRequest.label",{defaultMessage:"Retries per request"}),oe=N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.advancedRulesIgnored.label",{defaultMessage:"This configurable field is ignored when Advanced Sync Rules are used."}),ce=N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.nativeConnectors.maximumConcurrentLabel",{defaultMessage:"Maximum concurrent downloads"}),ue=N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.databaseLabel",{defaultMessage:"Database"}),de=N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.portLabel",{defaultMessage:"Port"}),pe={azure_blob_storage:{configuration:{account_name:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.azureBlobStorage.accountNameLabel",{defaultMessage:"Account name"}),options:[],order:1,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},account_key:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.azureBlobStorage.accountKeyLabel",{defaultMessage:"Account key"}),options:[],order:2,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},blob_endpoint:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.azureBlobStorage.blobEndpointLabel",{defaultMessage:"Blob endpoint"}),options:[],order:3,placeholder:"http://127.0.0.1:10000/devstoreaccount",required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},retry_count:{default_value:3,depends_on:[],display:ne.b.NUMERIC,label:le,options:[],order:4,required:!1,sensitive:!1,tooltip:null,type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:3},concurrent_downloads:{default_value:100,depends_on:[],display:ne.b.NUMERIC,label:ce,options:[],order:5,required:!1,sensitive:!1,tooltip:null,type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[{type:"less_than",constraint:101}],value:100}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!1},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.azureBlobStorage.name",{defaultMessage:"Azure Blob Storage"}),serviceType:"azure_blob_storage"},confluence:{configuration:{data_source:{default_value:null,depends_on:[],display:ne.b.DROPDOWN,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluenceSource.label",{defaultMessage:"Confluence data source"}),options:[{label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluenceCloud.name",{defaultMessage:"Confluence Cloud"}),value:"confluence_cloud"},{label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluenceServer.name",{defaultMessage:"Confluence Server"}),value:"confluence_server"}],order:1,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:"confluence_server"},username:{default_value:null,depends_on:[{field:"data_source",value:"confluence_server"}],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluenceServer.usernameLabel",{defaultMessage:"Confluence Server username"}),options:[],order:2,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:"admin"},password:{default_value:null,depends_on:[{field:"data_source",value:"confluence_server"}],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluenceServer.passwordLabel",{defaultMessage:"Confluence Server password"}),options:[],order:3,required:!0,sensitive:!0,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},account_email:{default_value:null,depends_on:[{field:"data_source",value:"confluence_cloud"}],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluenceCloud.accountEmailLabel",{defaultMessage:"Confluence Cloud account email"}),options:[],order:4,placeholder:"me@example.com",required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},api_token:{default_value:null,depends_on:[{field:"data_source",value:"confluence_cloud"}],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluenceServer.apiTokenLabel",{defaultMessage:"Confluence Cloud API token"}),options:[],order:5,required:!0,sensitive:!0,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},confluence_url:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluence.urlLabel",{defaultMessage:"Confluence URL label"}),options:[],order:6,placeholder:"http://127.0.0.1:5000",required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},spaces:{default_value:null,depends_on:[],display:ne.b.TEXTAREA,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluence.spaceKeysLabel",{defaultMessage:"Confluence space keys"}),options:[],order:7,required:!0,sensitive:!1,tooltip:oe,type:ne.d.LIST,ui_restrictions:[],validations:[],value:"*"},ssl_enabled:{default_value:null,depends_on:[],display:ne.b.TOGGLE,label:se,options:[],order:8,required:!0,sensitive:!1,tooltip:null,type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!1},ssl_ca:{default_value:null,depends_on:[{field:"ssl_enabled",value:!0}],display:ne.b.TEXTBOX,label:re,options:[],order:9,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},retry_count:{default_value:3,depends_on:[],display:ne.b.NUMERIC,label:le,options:[],order:10,required:!1,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:["advanced"],validations:[],value:3},concurrent_downloads:{default_value:50,depends_on:[],display:ne.b.NUMERIC,label:ce,options:[],order:11,required:!1,sensitive:!1,tooltip:null,type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[{constraint:51,type:"less_than"}],value:50}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!0},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.confluence.name",{defaultMessage:"Confluence"}),serviceType:"confluence"},dropbox:{configuration:{path:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:"Path to fetch files/folders",options:[],order:1,required:!1,sensitive:!1,tooltip:"This configurable field is ignored when Advanced Sync Rules are used.",type:ne.d.STRING,ui_restrictions:[],validations:[],value:"/"},app_key:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:"App key",options:[],order:2,placeholder:"",required:!0,sensitive:!0,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},app_secret:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:"App secret",options:[],order:3,required:!0,sensitive:!0,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},refresh_token:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:"Refresh token",options:[],order:4,required:!0,sensitive:!0,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},retry_count:{default_value:3,depends_on:[],display:ne.b.NUMERIC,label:"Retries per request",options:[],order:5,required:!1,sensitive:!1,tooltip:null,type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:3},concurrent_downloads:{default_value:100,depends_on:[],display:ne.b.NUMERIC,label:"Maximum concurrent downloads",options:[],order:6,required:!1,sensitive:!1,tooltip:null,type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:100}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!0},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.dropbox.name",{defaultMessage:"Dropbox"}),serviceType:"dropbox"},jira:{configuration:{data_source:{default_value:null,depends_on:[],display:ne.b.DROPDOWN,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.dataSourceLabel",{defaultMessage:"Jira data source"}),options:[{label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.jiraCloudLabel",{defaultMessage:"Jira Cloud"}),value:"jira_cloud"},{label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.jiraServerLabel",{defaultMessage:"Jira Server"}),value:"jira_server"}],order:1,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:"jira_cloud"},username:{default_value:null,depends_on:[{field:"data_source",value:"jira_server"}],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.serverUsername",{defaultMessage:"Jira Server username"}),options:[],order:2,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:"admin"},password:{default_value:null,depends_on:[{field:"data_source",value:"jira_server"}],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.serverPasswordLabel",{defaultMessage:"Jira Server password"}),options:[],order:3,required:!0,sensitive:!0,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:"changeme"},account_email:{default_value:null,depends_on:[{field:"data_source",value:"jira_cloud"}],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.cloudServiceAccountLabel",{defaultMessage:"Jira Cloud service account id"}),options:[],order:4,placeholder:"me@example.com",required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},api_token:{default_value:null,depends_on:[{field:"data_source",value:"jira_cloud"}],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.cloudApiTokenLabel",{defaultMessage:"Jira Cloud API token"}),options:[],order:5,required:!0,sensitive:!0,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:"abc#123"},jira_url:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.hostUrlLabel",{defaultMessage:"Jira host url"}),options:[],order:6,placeholder:"http://127.0.0.1:8080",required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},projects:{default_value:null,depends_on:[],display:ne.b.TEXTAREA,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.projectKeysLabel",{defaultMessage:"Jira project keys"}),options:[],order:7,required:!0,sensitive:!1,tooltip:oe,type:ne.d.LIST,ui_restrictions:[],validations:[],value:"*"},ssl_enabled:{default_value:null,depends_on:[],display:ne.b.TOGGLE,label:se,options:[],order:8,required:!0,sensitive:!1,tooltip:null,type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!1},ssl_ca:{default_value:null,depends_on:[{field:"ssl_enabled",value:!0}],display:ne.b.TEXTBOX,label:re,options:[],order:9,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},retry_count:{default_value:3,depends_on:[],display:ne.b.NUMERIC,label:le,options:[],order:10,required:!1,sensitive:!1,tooltip:null,type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:3},concurrent_downloads:{default_value:100,depends_on:[],display:ne.b.NUMERIC,label:ce,options:[],order:11,required:!1,sensitive:!1,tooltip:null,type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[{type:"less_than",constraint:101}],value:100}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!0},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.jira.name",{defaultMessage:"Jira"}),serviceType:"jira"},mongodb:{configuration:{host:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mongodb.configuration.hostLabel",{defaultMessage:"Server hostname"}),options:[],order:1,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},user:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:ae,options:[],order:2,required:!1,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},password:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:ie,options:[],order:3,required:!1,sensitive:!0,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},database:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:ue,options:[],order:4,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},collection:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mongodb.configuration.collectionLabel",{defaultMessage:"Collection"}),options:[],order:5,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},direct_connection:{default_value:!1,depends_on:[],display:ne.b.TOGGLE,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mongodb.configuration.directConnectionLabel",{defaultMessage:"Direct connection"}),options:[],order:6,required:!0,sensitive:!1,tooltip:"",type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!1}},features:{[ne.c.FILTERING_ADVANCED_CONFIG]:!0,[ne.c.FILTERING_RULES]:!0,[ne.c.SYNC_RULES]:{advanced:{enabled:!0},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mongodb.name",{defaultMessage:"MongoDB"}),serviceType:"mongodb"},mssql:{configuration:{host:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mssql.configuration.hostLabel",{defaultMessage:"Host"}),options:[],order:1,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},port:{default_value:null,depends_on:[],display:ne.b.NUMERIC,label:de,options:[],order:2,required:!0,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:[],validations:[],value:9090},username:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mssql.configuration.usernameLabel",{defaultMessage:"Username"}),options:[],order:3,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},password:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mssql.configuration.passwordLabel",{defaultMessage:"Password"}),options:[],order:4,required:!0,sensitive:!0,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},database:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:ue,options:[],order:5,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},tables:{default_value:"",depends_on:[],display:ne.b.TEXTAREA,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mssql.configuration.tablesLabel",{defaultMessage:"Comma-separated list of tables"}),options:[],order:6,required:!0,sensitive:!1,tooltip:"",type:ne.d.LIST,ui_restrictions:[],validations:[],value:"*"},ssl_enabled:{default_value:!1,depends_on:[],display:ne.b.TOGGLE,label:se,options:[],order:10,required:!0,sensitive:!1,tooltip:"",type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!1},ssl_ca:{default_value:"",depends_on:[{field:"ssl_enabled",value:!0}],display:ne.b.TEXTBOX,label:re,options:[],order:11,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},schema:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mssql.configuration.schemaLabel",{defaultMessage:"Schema"}),options:[],order:9,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:"dbo"},fetch_size:{default_value:50,depends_on:[],display:ne.b.NUMERIC,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mssql.configuration.rowsFetchedLabel",{defaultMessage:"Rows fetched per request"}),options:[],order:7,required:!1,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:50},retry_count:{default_value:3,depends_on:[],display:ne.b.NUMERIC,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mssql.configuration.retriesLabel",{defaultMessage:"Retries per request"}),options:[],order:8,required:!1,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:3},validate_host:{default_value:!1,depends_on:[],display:ne.b.TOGGLE,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mssql.configuration.validateHostLabel",{defaultMessage:"Validate host"}),options:[],order:12,required:!0,sensitive:!1,tooltip:"",type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!1}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!1},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mssql.name",{defaultMessage:"Microsoft SQL"}),serviceType:"mssql"},mysql:{configuration:{host:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mysql.configuration.hostLabel",{defaultMessage:"Host"}),options:[],order:1,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},port:{default_value:null,depends_on:[],display:ne.b.NUMERIC,label:de,options:[],order:2,required:!0,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:[],validations:[],value:""},user:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mysql.configuration.usernameLabel",{defaultMessage:"Username"}),options:[],order:3,required:!1,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},password:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mysql.configuration.passwordLabel",{defaultMessage:"Password"}),options:[],order:4,required:!1,sensitive:!0,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},database:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:ue,options:[],order:5,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},tables:{default_value:"",depends_on:[],display:ne.b.TEXTAREA,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mysql.configuration.tablesLabel",{defaultMessage:"Comma-separated list of tables"}),options:[],order:6,required:!0,sensitive:!1,tooltip:"",type:ne.d.LIST,ui_restrictions:[],validations:[],value:""},ssl_enabled:{default_value:!1,depends_on:[],display:ne.b.TOGGLE,label:se,options:[],order:7,required:!0,sensitive:!1,tooltip:"",type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!1},ssl_ca:{default_value:"",depends_on:[{field:"ssl_enabled",value:!0}],display:ne.b.TEXTBOX,label:re,options:[],order:8,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},fetch_size:{default_value:50,depends_on:[],display:ne.b.NUMERIC,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mysql.configuration.rowsFetchedLabel",{defaultMessage:"Rows fetched per request"}),options:[],order:9,required:!1,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:50},retry_count:{default_value:3,depends_on:[],display:ne.b.NUMERIC,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mysql.configuration.retriesLabel",{defaultMessage:"Retries per request"}),options:[],order:10,required:!1,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:3}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!0},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.mysql.name",{defaultMessage:"MySQL"}),serviceType:"mysql"},network_drive:{configuration:{username:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:ae,options:[],order:1,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},password:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:ie,options:[],order:2,required:!0,sensitive:!0,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},server_ip:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.networkDrive.ipAddressLabel",{defaultMessage:"IP address"}),options:[],order:3,placeholder:"127.0.0.1",required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},server_port:{default_value:null,depends_on:[],display:ne.b.NUMERIC,label:de,options:[],order:4,required:!0,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:[],validations:[],value:445},drive_path:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.networkDrive.pathLabel",{defaultMessage:"Path"}),options:[],order:5,placeholder:"Folder1",required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!1},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.networkDrive.name",{defaultMessage:"Network drive"}),serviceType:"network_drive"},postgresql:{configuration:{host:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.postgresql.configuration.hostLabel",{defaultMessage:"Host"}),options:[],order:1,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},port:{default_value:null,depends_on:[],display:ne.b.NUMERIC,label:de,options:[],order:2,required:!0,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:[],validations:[],value:9090},username:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:ae,options:[],order:3,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},password:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:ie,options:[],order:4,required:!0,sensitive:!0,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},database:{default_value:"",depends_on:[],display:ne.b.TEXTBOX,label:ue,options:[],order:5,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},tables:{default_value:"",depends_on:[],display:ne.b.TEXTAREA,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.postgresql.configuration.tablesLabel",{defaultMessage:"Comma-separated list of tables"}),options:[],order:6,required:!0,sensitive:!1,tooltip:"",type:ne.d.LIST,ui_restrictions:[],validations:[],value:"*"},ssl_enabled:{default_value:!1,depends_on:[],display:ne.b.TOGGLE,label:se,options:[],order:9,required:!0,sensitive:!1,tooltip:"",type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!1},ssl_ca:{default_value:"",depends_on:[{field:"ssl_enabled",value:!0}],display:ne.b.TEXTBOX,label:re,options:[],order:10,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},fetch_size:{default_value:50,depends_on:[],display:ne.b.NUMERIC,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.postgresql.configuration.rowsFetchedLabel",{defaultMessage:"Rows fetched per request"}),options:[],order:7,required:!1,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:50},retry_count:{default_value:3,depends_on:[],display:ne.b.NUMERIC,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.postgresql.configuration.retriesLabel",{defaultMessage:"Retries per request"}),options:[],order:8,required:!1,sensitive:!1,tooltip:"",type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:3}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!1},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.postgresql.name",{defaultMessage:"PostgreSQL"}),serviceType:"postgresql"},servicenow:{configuration:{url:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:"Service URL",options:[],order:1,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:"http://127.0.0.1:9318"},username:{default_value:null,depends_on:[],display:ne.b.TEXTAREA,label:"Username",options:[],order:2,required:!0,sensitive:!1,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},password:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:"Password",options:[],order:3,required:!0,sensitive:!0,tooltip:null,type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},services:{default_value:null,depends_on:[],display:ne.b.TEXTAREA,label:"Comma-separated list of services",options:[],order:4,required:!0,sensitive:!1,tooltip:"List of services is ignored when Advanced Sync Rules are used.",type:ne.d.LIST,ui_restrictions:[],validations:[],value:"*"},retry_count:{default_value:3,depends_on:[],display:ne.b.NUMERIC,label:"Retries per request",options:[],order:5,required:!1,sensitive:!1,tooltip:null,type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:3},concurrent_downloads:{default_value:10,depends_on:[],display:ne.b.NUMERIC,label:"Maximum concurrent downloads",options:[],order:6,required:!1,sensitive:!1,tooltip:null,type:ne.d.INTEGER,ui_restrictions:["advanced"],validations:[],value:10}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!0},basic:{enabled:!0}}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.servicenow.name",{defaultMessage:"ServiceNow"}),serviceType:"servicenow"},sharepoint_online:{configuration:{tenant_id:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.tenantIdLabel",{defaultMessage:"Tenant ID"}),options:[],order:1,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},tenant_name:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.tenantNameLabel",{defaultMessage:"Tenant name"}),options:[],order:2,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},client_id:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.clientIdLabel",{defaultMessage:"Client ID"}),options:[],order:3,required:!0,sensitive:!1,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},secret_value:{default_value:null,depends_on:[],display:ne.b.TEXTBOX,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.secretValueLabel",{defaultMessage:"Secret value"}),options:[],order:4,required:!0,sensitive:!0,tooltip:"",type:ne.d.STRING,ui_restrictions:[],validations:[],value:""},site_collections:{default_value:null,depends_on:[],display:ne.b.TEXTAREA,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.siteCollectionsLabel",{defaultMessage:"Comma-separated list of sites"}),options:[],order:5,required:!0,sensitive:!1,tooltip:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.siteCollectionsTooltip",{defaultMessage:"A comma-separated list of sites to ingest data from. Use * to include all available sites."}),type:ne.d.LIST,ui_restrictions:[],validations:[],value:""},use_text_extraction_service:{default_value:!1,depends_on:[],display:ne.b.TOGGLE,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.textExtractionServiceLabel",{defaultMessage:"Use text extraction service"}),options:[],order:6,required:!0,sensitive:!1,tooltip:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.textExtractionServiceTooltip",{defaultMessage:"Requires a separate deployment of the Elastic Data Extraction Service. Also requires that pipeline settings disable text extraction."}),type:ne.d.BOOLEAN,ui_restrictions:["advanced"],validations:[],value:!1},use_document_level_security:{default_value:!1,depends_on:[],display:ne.b.TOGGLE,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.useDocumentLevelSecurityLabel",{defaultMessage:"Enable document level security"}),options:[],order:7,required:!0,sensitive:!1,tooltip:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.useDocumentLevelSecurityTooltip",{defaultMessage:"Document level security ensures identities and permissions set in Sharepoint Online are maintained in Elasticsearch. This metadata is added to your Elasticsearch documents, so you can control user and group read-access. Access control syncs ensure this metadata is kept up to date."}),type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!1},fetch_drive_item_permissions:{default_value:!0,depends_on:[{field:"use_document_level_security",value:!0}],display:ne.b.TOGGLE,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.fetchDriveItemPermissionsLabel",{defaultMessage:"Fetch drive item permissions"}),options:[],order:8,required:!0,sensitive:!1,tooltip:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.fetchDriveItemPermissionsTooltip",{defaultMessage:"Enable this option to fetch drive item specific permissions. This setting can increase sync time."}),type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!0},fetch_unique_page_permissions:{default_value:!0,depends_on:[{field:"use_document_level_security",value:!0}],display:ne.b.TOGGLE,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.fetchUniquePagePermissionsLabel",{defaultMessage:"Fetch unique page permissions"}),options:[],order:9,required:!0,sensitive:!1,tooltip:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.fetchUniquePagePermissionsTooltip",{defaultMessage:"Enable this option to fetch unique page permissions. This setting can increase sync time. If this setting is disabled a page will inherit permissions from its parent site."}),type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!0},fetch_unique_list_permissions:{default_value:!0,depends_on:[{field:"use_document_level_security",value:!0}],display:ne.b.TOGGLE,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.fetchUniqueListPermissionsLabel",{defaultMessage:"Fetch unique list permissions"}),options:[],order:10,required:!0,sensitive:!1,tooltip:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.fetchUniqueListPermissionsTooltip",{defaultMessage:"Enable this option to fetch unique list permissions. This setting can increase sync time. If this setting is disabled a list will inherit permissions from its parent site."}),type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!0},fetch_unique_list_item_permissions:{default_value:!0,depends_on:[{field:"use_document_level_security",value:!0}],display:ne.b.TOGGLE,label:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.fetchUniqueListItemPermissionsLabel",{defaultMessage:"Fetch unique list item permissions"}),options:[],order:11,required:!0,sensitive:!1,tooltip:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.configuration.fetchUniqueListItemPermissionsTooltip",{defaultMessage:"Enable this option to fetch unique list item permissions. This setting can increase sync time. If this setting is disabled a list item will inherit permissions from its parent site."}),type:ne.d.BOOLEAN,ui_restrictions:[],validations:[],value:!0}},features:{[ne.c.SYNC_RULES]:{advanced:{enabled:!0},basic:{enabled:!0}},[ne.c.DOCUMENT_LEVEL_SECURITY]:{enabled:!0},[ne.c.INCREMENTAL_SYNC]:{enabled:!0}},name:N.i18n.translate("xpack.enterpriseSearch.nativeConnectors.sharepoint_online.name",{defaultMessage:"Sharepoint Online"}),serviceType:"sharepoint_online"}};var ge=n(96),je=n(45),xe=n(75);function Me(e){return e===J.b.CONNECTED?N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionStatus.connected.label",{defaultMessage:"Connected"}):e===J.b.ERROR?N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionStatus.connectorError.label",{defaultMessage:"Connector failure"}):e===J.b.SYNC_ERROR?N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionStatus.syncError.label",{defaultMessage:"Sync failure"}):e===J.b.CONFIGURED?N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionStatus.configured.label",{defaultMessage:"Configured"}):N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionStatus.incomplete.label",{defaultMessage:"Incomplete"})}function he(e){return e===J.b.CONNECTED?"success":e===J.b.ERROR||e===J.b.SYNC_ERROR?"danger":"warning"}const me=({indices:e,isLoading:t,meta:n,onChange:a,onDelete:i})=>{const{navigateToUrl:s}=Object(r.useValues)(p.a),l=[{field:"name",name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.name.columnTitle",{defaultMessage:"Index name"}),render:e=>Object(y.jsx)(A.d,{"data-test-subj":"search-index-link",to:Object(je.a)(C.l,{indexName:e})},e),sortable:!0,width:"33%"},{field:"health",name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.health.columnTitle",{defaultMessage:"Index health"}),render:e=>{var t;return Object(y.jsx)("span",null,Object(y.jsx)(S.EuiIcon,{type:"dot",color:null!==(t=ge.a[e])&&void 0!==t?t:""})," ",null!=e?e:"-")},sortable:!0,truncateText:!0},{field:"count",name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.docsCount.columnTitle",{defaultMessage:"Docs count"}),sortable:!0,truncateText:!0},{name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionName.columnTitle",{defaultMessage:"Ingestion name"}),render:e=>{var t,n;return Object(y.jsx)(S.EuiText,{size:"s"},null!==(t=Object(G.h)(e)&&e.connector.service_type&&(null===(n=pe[e.connector.service_type])||void 0===n?void 0:n.name))&&void 0!==t?t:"--")},truncateText:!0},{name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionMethod.columnTitle",{defaultMessage:"Ingestion method"}),render:e=>Object(y.jsx)(S.EuiText,{size:"s"},Object(G.h)(e)&&e.connector.is_native?N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionmethod.nativeConnector",{defaultMessage:"Native connector"}):Object(G.f)(e.ingestionMethod))},{name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionStatus.columnTitle",{defaultMessage:"Ingestion status"}),render:e=>{const t=Object(je.a)(C.l,{indexName:e.name}),n=Me(e.ingestionStatus);return Object(y.jsx)(xe.a,{to:t,label:n,color:he(e.ingestionStatus)})},truncateText:!0},{actions:[{description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.actions.viewIndex.title",{defaultMessage:"View this index"}),icon:"eye",isPrimary:!1,name:e=>N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.actions.viewIndex.caption",{defaultMessage:"View index {indexName}",values:{indexName:e.name}}),onClick:e=>s(Object(je.a)(C.l,{indexName:e.name})),type:"icon"},{color:"danger",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.actions.deleteIndex.title",{defaultMessage:"Delete this index"}),icon:"trash",isPrimary:!1,name:e=>N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.actions.deleteIndex.caption",{defaultMessage:"Delete index {indexName}",values:{indexName:e.name}}),onClick:e=>i(e.name),type:"icon"}],name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.actions.columnTitle",{defaultMessage:"Actions"})}];return Object(y.jsx)(S.EuiBasicTable,{items:e,columns:l,onChange:a,pagination:{pageIndex:n.page.from/(n.page.size||1),pageSize:n.page.size,showPerPageOptions:!1,totalItemCount:n.page.total},tableLayout:"fixed",loading:t})};n(461);const fe=[N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.searchIndices.breadcrumb",{defaultMessage:"Elasticsearch indices"})],be=()=>{const{fetchIndices:e,onPaginate:t,openDeleteModal:n,setIsFirstRequest:s}=Object(r.useActions)(X),{meta:l,indices:o,hasNoIndices:c,isLoading:u,searchParams:d}=Object(r.useValues)(X),[g,j]=Object(a.useState)(!1),[x,M]=Object(a.useState)(!1),[h,m]=Object(a.useState)(""),{config:f}=Object(r.useValues)(p.a),{errorConnectingMessage:b}=Object(r.useValues)(P.a),[I,D]=Object(Y.a)("enterprise-search-indices-callout-dismissed",!1);Object(a.useEffect)((()=>{s()}),[]),Object(a.useEffect)((()=>{e({from:d.from,onlyShowSearchOptimizedIndices:x,returnHiddenIndices:g,searchQuery:h,size:d.size})}),[h,d.from,d.size,x,g]);const T=u?"":c?N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.searchIndices.emptyPageTitle",{defaultMessage:"Welcome to Search"}):N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.searchIndices.pageTitle",{defaultMessage:"Elasticsearch indices"});return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(K,null),Object(y.jsx)(O,{pageChrome:fe,pageViewTelemetry:"Search indices",isLoading:u,pageHeader:{pageTitle:T,rightSideItems:u?[]:[Object(y.jsx)(A.d,{"data-test-subj":"create-new-index-button",to:C.g},Object(y.jsx)(S.EuiButton,{iconType:"plusInCircle",color:"primary",fill:!0,"data-test-subj":"entSearchContent-searchIndices-createButton"},N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.create.buttonTitle",{defaultMessage:"Create a new index"})))]}},f.host&&f.canDeployEntSearch&&b&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(B,null),Object(y.jsx)(S.EuiSpacer,null)),!f.host&&f.canDeployEntSearch&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiCallOut,{title:N.i18n.translate("xpack.enterpriseSearch.noEntSearchConfigured.title",{defaultMessage:"Enterprise Search has not been configured"}),iconType:"warning",color:"warning"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.noEntSearch.noCrawler",defaultMessage:"The Elastic web crawler is not available without Enterprise Search."})),Object(y.jsx)(A.b,{iconType:"help",fill:!0,to:"/setup_guide",color:"warning"},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.noEntSearch.setupGuideCta",defaultMessage:"Review setup guide"}))),Object(y.jsx)(S.EuiSpacer,null)),c?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(L,null),Object(y.jsx)(S.EuiSpacer,{size:"xxl"}),Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiTitle,{"data-test-subj":"search-indices-empty-title"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.searchIndices.stepsTitle",{defaultMessage:"Build beautiful search experiences with Search"}))),Object(y.jsx)(S.EuiSpacer,{size:"l"}),Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(U,{step:0===o.length?"first":"second"})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(z.a,null))))):Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},!I&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiSpacer,{size:"l"}),Object(y.jsx)(S.EuiCallOut,{size:"m",title:N.i18n.translate("xpack.enterpriseSearch.content.callout.title",{defaultMessage:"Introducing Elasticsearch indices in Search"}),iconType:"iInCircle"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.callout.text",defaultMessage:"Your Elasticsearch indices are now front and center in Search. You can create new indices and build search experiences with them directly. To learn more about how to use Elasticsearch indices in Search {docLink}",values:{docLink:Object(y.jsx)(S.EuiLink,{"data-test-subj":"search-index-link",href:k.a.appSearchElasticsearchIndexedEngines,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.callout.docLink",{defaultMessage:"read the documentation"}))}})),Object(y.jsx)(S.EuiButton,{fill:!0,onClick:()=>D(!0)},N.i18n.translate("xpack.enterpriseSearch.content.callout.dismissButton",{defaultMessage:"Dismiss"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(te,null)),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiTitle,null,Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.searchIndices.tableTitle",{defaultMessage:"Available indices"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"flexEnd",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiSwitch,{checked:g,label:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.searchIndices.includeHidden.label",{defaultMessage:"Show hidden indices"}),onChange:e=>j(e.target.checked)})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiToolTip,{content:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.tooltipContent",defaultMessage:"Search-optimized indices are prefixed with {code}. They are managed by ingestion mechanisms such as crawlers, connectors or ingestion APIs.",values:{code:Object(y.jsx)(S.EuiCode,null,"search-")}})},Object(y.jsx)(S.EuiSwitch,{checked:x,label:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.searchIndices.onlySearchOptimized.label",{defaultMessage:"Only show search-optimized indices"}),onChange:e=>M(e.target.checked)}))),Object(y.jsx)(S.EuiFlexItem,{className:"entSearchIndicesSearchBar"},Object(y.jsx)(S.EuiSearchBar,{query:h,box:{incremental:!0,placeholder:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.placeHolder",{defaultMessage:"Filter Elasticsearch indices"})},"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.searchIndices.searchBar.ariaLabel",{defaultMessage:"Filter Elasticsearch indices"}),onChange:e=>m(e.queryText)})))))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(me,{indices:o,meta:l,onChange:Object(Q.b)(t),onDelete:n})))),")")};var ye=n(70),Oe=n(466),Ie=n.n(Oe),Se=n(467),Ne=n.n(Se);const Ee={"":N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.universalLabel",{defaultMessage:"Universal"}),da:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.danishLabel",{defaultMessage:"Danish"}),de:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.germanLabel",{defaultMessage:"German"}),en:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.englishLabel",{defaultMessage:"English"}),es:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.spanishLabel",{defaultMessage:"Spanish"}),fr:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.frenchLabel",{defaultMessage:"French"}),it:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.italianLabel",{defaultMessage:"Italian"}),ja:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.japaneseLabel",{defaultMessage:"Japanese"}),ko:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.koreanLabel",{defaultMessage:"Korean"}),nl:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.dutchLabel",{defaultMessage:"Dutch"}),pt:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.portugueseLabel",{defaultMessage:"Portuguese"}),"pt-br":N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.portugueseBrazilLabel",{defaultMessage:"Portuguese (Brazil)"}),ru:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.russianLabel",{defaultMessage:"Russian"}),th:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.thaiLabel",{defaultMessage:"Thai"}),zh:N.i18n.translate("xpack.enterpriseSearch.content.supportedLanguages.chineseLabel",{defaultMessage:"Chinese"})};function De(e){var t;return null!==(t=Ee[e])&&void 0!==t?t:e}N.i18n.translate("xpack.enterpriseSearch.content.newIndex.types.api",{defaultMessage:"API endpoint"}),N.i18n.translate("xpack.enterpriseSearch.content.newIndex.types.connector",{defaultMessage:"Connector"}),N.i18n.translate("xpack.enterpriseSearch.content.newIndex.types.crawler",{defaultMessage:"Web crawler"}),N.i18n.translate("xpack.enterpriseSearch.content.newIndex.types.elasticsearch",{defaultMessage:"Elasticsearch index"}),N.i18n.translate("xpack.enterpriseSearch.content.newIndex.types.json",{defaultMessage:"JSON"});const Te=[{text:De(""),value:""},{disabled:!0,text:"—"},{text:De("zh"),value:"zh"},{text:De("da"),value:"da"},{text:De("nl"),value:"nl"},{text:De("en"),value:"en"},{text:De("fr"),value:"fr"},{text:De("de"),value:"de"},{text:De("it"),value:"it"},{text:De("ja"),value:"ja"},{text:De("ko"),value:"ko"},{text:De("pt"),value:"pt"},{text:De("pt-br"),value:"pt-br"},{text:De("ru"),value:"ru"},{text:De("es"),value:"es"},{text:De("th"),value:"th"}];function we(e){switch(e){case j.r.CRAWLER:return Ne.a;case j.r.CONNECTOR:return Ie.a;default:return"consoleApp"}}const ve={[j.r.CRAWLER]:{description:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.crawler.description",{defaultMessage:"Discover, extract, and index searchable content from websites and knowledge bases"}),footer:{buttonLabel:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.crawler.label",{defaultMessage:"Use a web crawler"}),label:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.crawler.nocodeLabel",{defaultMessage:"No code"})},icon:we(j.r.CRAWLER),title:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.crawler.title",{defaultMessage:"Web crawler"})},[j.r.CONNECTOR]:{description:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.connector.description",{defaultMessage:"Extract, transform, index and sync data from a data source via native or customized connectors"}),footer:{buttonLabel:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.connector.label",{defaultMessage:"Use a connector"})},icon:we(j.r.CONNECTOR),title:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.connector.title",{defaultMessage:"Connector"})},[j.r.API]:{description:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.api.description",{defaultMessage:"Add documents programmatically by connecting with the API"}),footer:{buttonLabel:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.api.label",{defaultMessage:"Use the API"})},icon:we(j.r.API),title:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.methodCard.api.title",{defaultMessage:"API"})}},Ce=({disabled:e,onSelect:t,isSelected:n,type:a})=>{if(!ve[a])return null;const{icon:s,title:r,description:l,footer:o}=ve[a];return Object(y.jsx)(S.EuiCard,{isDisabled:e,"data-test-subj":"entSearch-content-newIndexCard-cardBody",hasBorder:!0,icon:Object(y.jsx)(S.EuiIcon,{type:s,size:"xxl"}),title:r,description:Object(y.jsx)(S.EuiTextColor,{color:"subdued"},l),footer:Object(y.jsx)(i.a.Fragment,null,o.label&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiBadge,{color:"hollow"},o.label),Object(y.jsx)(S.EuiSpacer,{size:"m"})),Object(y.jsx)(S.EuiButton,{isDisabled:e,"data-test-subj":`entSearchContent-newIndexCard-button-${a}`,fullWidth:!0,onClick:t,color:n?"success":"primary",iconType:n?"checkInCircleFilled":void 0},o.buttonLabel))})},ke=()=>{const{capabilities:e,config:t,productFeatures:n}=Object(r.useValues)(ye.a),s=(e=>[...e.hasWebCrawler?[j.r.CRAWLER]:[],...e.hasConnectors?[j.r.CONNECTOR]:[],j.r.API])(n),{errorConnectingMessage:l}=Object(r.useValues)(d.a),[o,c]=Object(a.useState)("");return Object(y.jsx)(O,{pageChrome:[...fe,N.i18n.translate("xpack.enterpriseSearch.content.newIndex.breadcrumb",{defaultMessage:"New ingestion method"})],pageViewTelemetry:"New Index",isLoading:!1,pageHeader:{description:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.pageDescription",{defaultMessage:"Create a search optimized Elasticsearch index to store your content. Start by selecting an ingestion method."}),pageTitle:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.pageTitle",{defaultMessage:"Select an ingestion method"})}},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},l&&n.hasWebCrawler&&Object(y.jsx)(B,null),Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,s.map((e=>Object(y.jsx)(S.EuiFlexItem,{key:e},Object(y.jsx)(Ce,{disabled:Boolean(e===j.r.CRAWLER&&(l||!t.host)),type:e,onSelect:()=>{c(e),e===j.r.CONNECTOR?ye.a.values.navigateToUrl(C.h):ye.a.values.navigateToUrl(Object(je.a)(C.f,{type:e}))},isSelected:o===e})))))),e.navLinks.integrations&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(A.d,{to:"/app/integrations",shouldNotCreateHref:!0},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.viewIntegrationsLink",{defaultMessage:"View additional integrations"}))))))};var Ae=n(78),Le=n(67),ze=n.n(Le);const _e=[{iconPath:"azure_blob_storage.svg",isBeta:!0,isNative:!0,keywords:["cloud","azure","blob","s3","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.azureBlob.name",{defaultMessage:"Azure Blob Storage"}),serviceType:"azure_blob_storage"},{iconPath:"confluence_cloud.svg",isBeta:!1,isNative:!0,keywords:["confluence","cloud","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.confluence.name",{defaultMessage:"Confluence Cloud & Server"}),serviceType:"confluence"},{iconPath:"dropbox.svg",isBeta:!0,isNative:!0,isTechPreview:!1,keywords:["dropbox","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.dropbox.name",{defaultMessage:"Dropbox"}),serviceType:"dropbox"},{iconPath:"jira_cloud.svg",isBeta:!1,isNative:!0,keywords:["jira","cloud","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.jira.name",{defaultMessage:"Jira Cloud & Server"}),serviceType:"jira"},{iconPath:"github.svg",isBeta:!0,isNative:!1,keywords:["github","cloud","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.github.name",{defaultMessage:"GitHub & GitHub Enterprise Server"}),serviceType:"github"},{iconPath:"google_cloud_storage.svg",isBeta:!0,isNative:!1,keywords:["google","cloud","blob","s3","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.googleCloud.name",{defaultMessage:"Google Cloud Storage"}),serviceType:"google_cloud_storage"},{iconPath:"google_drive.svg",isBeta:!0,isNative:!1,keywords:["google","drive","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.googleDrive.name",{defaultMessage:"Google Drive"}),serviceType:"google_drive"},{iconPath:"mongodb.svg",isBeta:!1,isNative:!0,keywords:["mongo","mongodb","database","nosql","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.mongodb.name",{defaultMessage:"MongoDB"}),serviceType:"mongodb"},{iconPath:"mysql.svg",isBeta:!1,isNative:!0,keywords:["mysql","sql","database","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.mysql.name",{defaultMessage:"MySQL"}),serviceType:"mysql"},{iconPath:"mssql.svg",isBeta:!0,isNative:!0,keywords:["mssql","microsoft","sql","database","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.microsoftSQL.name",{defaultMessage:"Microsoft SQL"}),serviceType:"mssql"},{iconPath:"network_drive.svg",isBeta:!1,isNative:!0,keywords:["network","drive","file","directory","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.networkDrive.name",{defaultMessage:"Network drive"}),serviceType:"network_drive"},{iconPath:"postgresql.svg",isBeta:!0,isNative:!0,keywords:["postgresql","sql","database","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.postgresql.name",{defaultMessage:"PostgreSQL"}),serviceType:"postgresql"},{iconPath:"salesforce.svg",isBeta:!0,isNative:!1,isTechPreview:!1,keywords:["salesforce","cloud","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.salesforce.name",{defaultMessage:"Salesforce"}),serviceType:"salesforce"},{iconPath:"servicenow.svg",isBeta:!0,isNative:!0,isTechPreview:!1,keywords:["servicenow","cloud","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.serviceNow.name",{defaultMessage:"ServiceNow"}),serviceType:"servicenow"},{iconPath:"sharepoint_online.svg",isBeta:!1,isNative:!0,isTechPreview:!1,keywords:["sharepoint","office365","cloud","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.sharepoint_online.name",{defaultMessage:"Sharepoint Online"}),serviceType:"sharepoint_online"},{iconPath:"gmail.svg",isBeta:!1,isNative:!1,isTechPreview:!0,keywords:["google","gmail","connector","mail"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.gmail.name",{defaultMessage:"Gmail"}),serviceType:"gmail"},{iconPath:"oracle.svg",isBeta:!0,isNative:!1,keywords:["oracle","sql","database","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.oracle.name",{defaultMessage:"Oracle"}),serviceType:"oracle"},{iconPath:"onedrive.svg",isBeta:!0,isNative:!1,keywords:["network","drive","file","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.oneDrive.name",{defaultMessage:"OneDrive"}),serviceType:"onedrive"},{iconPath:"s3.svg",isBeta:!0,isNative:!1,keywords:["s3","cloud","amazon","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.s3.name",{defaultMessage:"S3"}),serviceType:"s3"},{iconPath:"slack.svg",isBeta:!1,isNative:!1,isTechPreview:!0,keywords:["slack","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.slack.name",{defaultMessage:"Slack"}),serviceType:"slack"},{iconPath:"sharepoint_server.svg",isBeta:!0,isNative:!1,isTechPreview:!1,keywords:["sharepoint","cloud","connector"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.sharepointServer.name",{defaultMessage:"Sharepoint Server"}),serviceType:"sharepoint_server"},{iconPath:"custom.svg",isBeta:!0,isNative:!1,keywords:["custom","connector","code"],name:N.i18n.translate("xpack.enterpriseSearch.content.nativeConnectors.customConnector.name",{defaultMessage:"Customized connector"}),serviceType:""}];var Re=n(468),Fe=n.n(Re),Ue=n(469),Pe=n.n(Ue),Qe=n(470),Ye=n.n(Qe),Be=n(471),Ge=n.n(Be),$e=n(472),Ve=n.n($e),qe=n(473),We=n.n(qe),Ze=n(474),He=n.n(Ze),Je=n(475),Xe=n.n(Je),Ke=n(476),et=n.n(Ke),tt=n(477),nt=n.n(tt),at=n(478),it=n.n(at),st=n(479),rt=n.n(st),lt=n(480),ot=n.n(lt),ct=n(481),ut=n.n(ct),dt=n(482),pt=n.n(dt),gt=n(483),jt=n.n(gt),xt=n(484),Mt=n.n(xt),ht=n(485),mt=n.n(ht),ft=n(486),bt=n.n(ft),yt=n(487),Ot=n.n(yt),It=n(488),St=n.n(It),Nt=n(489),Et=n.n(Nt);const Dt={amazon_s3:Mt.a,azure_blob_storage:Fe.a,confluence_cloud:Pe.a,custom:Ye.a,dropbox:Ge.a,github:Ve.a,gmail:We.a,google_cloud_storage:He.a,google_drive:Xe.a,jira_cloud:et.a,microsoft_sql:it.a,mongodb:nt.a,mysql:rt.a,network_drive:ot.a,onedrive:ut.a,oracle:pt.a,postgresql:jt.a,salesforce:mt.a,servicenow:bt.a,sharepoint:Ot.a,sharepoint_online:St.a,slack:Et.a},Tt={azure_blob_storage:{docsUrl:k.a.connectorsAzureBlobStorage,externalAuthDocsUrl:"https://learn.microsoft.com/azure/storage/common/authorize-data-access",externalDocsUrl:"https://learn.microsoft.com/azure/storage/blobs/",icon:Dt.azure_blob_storage},confluence:{docsUrl:k.a.connectorsConfluence,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.confluence_cloud,platinumOnly:!0},custom:{docsUrl:k.a.connectors,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.custom},dropbox:{docsUrl:k.a.connectorsDropbox,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.dropbox},github:{docsUrl:k.a.connectorsGithub,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.github,platinumOnly:!0},gmail:{docsUrl:k.a.connectorsGmail,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.gmail,platinumOnly:!0},google_cloud_storage:{docsUrl:k.a.connectorsGoogleCloudStorage,externalAuthDocsUrl:"https://cloud.google.com/storage/docs/authentication",externalDocsUrl:"https://cloud.google.com/storage/docs",icon:Dt.google_cloud_storage},google_drive:{docsUrl:k.a.connectorsGoogleDrive,externalAuthDocsUrl:"https://cloud.google.com/iam/docs/service-account-overview",externalDocsUrl:"https://developers.google.com/drive",icon:Dt.google_drive,platinumOnly:!0},jira:{docsUrl:k.a.connectorsJira,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.jira_cloud,platinumOnly:!0},mongodb:{docsUrl:k.a.connectorsMongoDB,externalAuthDocsUrl:"https://www.mongodb.com/docs/atlas/app-services/authentication/",externalDocsUrl:"https://www.mongodb.com/docs/",icon:Dt.mongodb},mssql:{docsUrl:k.a.connectorsMicrosoftSQL,externalAuthDocsUrl:"https://learn.microsoft.com/sql/relational-databases/security/authentication-access/getting-started-with-database-engine-permissions",externalDocsUrl:"https://learn.microsoft.com/sql/",icon:Dt.microsoft_sql},mysql:{docsUrl:k.a.connectorsMySQL,externalDocsUrl:"https://dev.mysql.com/doc/",icon:Dt.mysql},network_drive:{docsUrl:k.a.connectorsNetworkDrive,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.network_drive,platinumOnly:!0},onedrive:{docsUrl:k.a.connectorsOneDrive,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.onedrive,platinumOnly:!0},oracle:{docsUrl:k.a.connectorsOracle,externalAuthDocsUrl:"https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/index.html",externalDocsUrl:"https://docs.oracle.com/database/oracle/oracle-database/",icon:Dt.oracle},postgresql:{docsUrl:k.a.connectorsPostgreSQL,externalAuthDocsUrl:"https://www.postgresql.org/docs/15/auth-methods.html",externalDocsUrl:"https://www.postgresql.org/docs/",icon:Dt.postgresql},s3:{docsUrl:k.a.connectorsS3,externalAuthDocsUrl:"https://docs.aws.amazon.com/s3/index.html",externalDocsUrl:"",icon:Dt.amazon_s3},salesforce:{docsUrl:k.a.connectorsSalesforce,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.salesforce,platinumOnly:!0},servicenow:{docsUrl:k.a.connectorsServiceNow,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.servicenow},sharepoint_server:{docsUrl:k.a.connectorsSharepoint,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.sharepoint,platinumOnly:!1},sharepoint_online:{docsUrl:k.a.connectorsSharepointOnline,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.sharepoint_online,platinumOnly:!0},slack:{docsUrl:k.a.connectorsSlack,externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.slack,platinumOnly:!0}},wt=_e.map((e=>({...e,...e.serviceType&&Tt[e.serviceType]?Tt[e.serviceType]:Tt.custom}))),vt=(wt.filter((({isNative:e})=>!e)),wt.filter((({isNative:e})=>e))),Ct=wt.filter((({isBeta:e})=>e)),kt=({apiKeyData:e,connectorData:t,host:n})=>ze.a`connectors: - connector_id: "${t.id}" service_type: "${t.service_type||"changeme"}"${null!=e&&e.encoded?`\n api_key: "${null==e?void 0:e.encoded}"`:""} elasticsearch: host: "${n||"http://localhost:9200"}" api_key: "${(null==e?void 0:e.encoded)||""}" `,At=({title:e,description:t})=>Object(y.jsx)(S.EuiCallOut,{color:"warning",iconType:"beaker",title:e||N.i18n.translate("xpack.enterpriseSearch.betaCalloutTitle",{defaultMessage:"Beta feature"})},t),Lt=()=>Object(y.jsx)(At,{title:N.i18n.translate("xpack.enterpriseSearch.betaConnectorCalloutTitle",{defaultMessage:"Beta connector"}),description:N.i18n.translate("xpack.enterpriseSearch.betaConnectorCalloutDescription",{defaultMessage:"This connector is in beta. Beta features are subject to change and are not covered by the support SLA of general release (GA) features. Elastic plans to promote this feature to GA in a future release."})});var zt=n(37);const _t=Object(V.a)(["add_connector_api_logic"],(async({deleteExistingConnector:e,indexName:t,isNative:n,language:a,serviceType:i})=>{const s={...e?{delete_existing_connector:e}:{},index_name:t,is_native:n,language:a,service_type:i},r=await d.a.values.http.post("/internal/enterprise_search/connectors",{body:JSON.stringify(s)});return{id:r.id,indexName:r.index_name}})),Rt=Object(V.a)(["create_crawler_index_api_logic"],(async({indexName:e,language:t})=>{const n={index_name:e,language:t};return await d.a.values.http.post("/internal/enterprise_search/crawler",{body:JSON.stringify(n)})})),Ft=Object(V.a)(["create_api_index_api_logic"],(async({indexName:e,language:t})=>{const n={index_name:e,language:t};return{indexName:(await d.a.values.http.post("/internal/enterprise_search/indices",{body:JSON.stringify(n)})).index}})),Ut=Object(V.a)(["index_exists_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/exists`,{exists:n}=await d.a.values.http.get(t);return{exists:n,indexName:e}}));var Pt=n(38);function Qt(){Object(Pt.g)(N.i18n.translate("xpack.enterpriseSearch.content.new_index.successToast.title",{defaultMessage:"Index created successfully"}),{iconType:"cheer"})}const Yt=Object(r.kea)({actions:{setLanguageSelectValue:e=>({language:e}),setRawName:e=>({rawName:e})},connect:{actions:[_t,["apiSuccess as connectorIndexCreated"],Ft,["apiSuccess as apiIndexCreated"],Rt,["apiSuccess as crawlerIndexCreated"],Ut,["makeRequest"]],values:[Ut,["data"]]},listeners:({actions:e,values:t})=>({apiIndexCreated:()=>{ye.a.values.productAccess.hasAppSearchAccess&&Qt()},connectorIndexCreated:()=>{ye.a.values.productAccess.hasAppSearchAccess&&Qt()},crawlerIndexCreated:()=>{ye.a.values.productAccess.hasAppSearchAccess&&Qt()},setRawName:async(n,a)=>{await a(150),e.makeRequest({indexName:t.fullIndexName})}}),path:["enterprise_search","content","new_search_index"],reducers:{languageSelectValue:["",{setLanguageSelectValue:(e,{language:t})=>null!=t?t:null}],rawName:["",{setRawName:(e,{rawName:t})=>t}]},selectors:({selectors:e})=>({fullIndexName:[()=>[e.rawName],e=>`search-${e}`],fullIndexNameExists:[()=>[e.data,e.fullIndexName],(e,t)=>!0===(null==e?void 0:e.exists)&&e.indexName===t],fullIndexNameIsValid:[()=>[e.fullIndexName],e=>function(e){const t=encodeURI(e).split(/%(?:u[0-9A-F]{2})?[0-9A-F]{2}|./).length-1,n=new RegExp('[\\\\/:*?"<>|\\s,#]+');return!(t>255||e!==e.toLowerCase()||"."===e||".."===e||null!==e.match(/^[-_+]/)||null!==e.match(n))}(e)],language:[()=>[e.languageSelectValue],e=>{return""===(t=e)?null:t;var t}]})}),Bt=({buttonLoading:e,disabled:t,error:n,onNameChange:a,onSubmit:s,type:l,isBeta:o})=>{const{fullIndexName:c,fullIndexNameExists:u,fullIndexNameIsValid:d,language:p,rawName:g,languageSelectValue:x}=Object(r.useValues)(Yt),{setRawName:M,setLanguageSelectValue:h}=Object(r.useActions)(Yt),m=!!n||u||!d;return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiForm,{component:"form",id:"enterprise-search-create-index",onSubmit:e=>{e.preventDefault(),s(c,p)}},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},o?Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Lt,null)):null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h3",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.formTitle",defaultMessage:"Create an Elasticsearch index"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"m"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.formDescription",defaultMessage:"This index will hold your data source content, and is optimized with default field mappings for relevant search experiences. Give your index a unique name and optionally set a default {language_analyzer} for the index.",values:{language_analyzer:Object(y.jsx)(S.EuiLink,{target:"_blank",href:k.a.languageAnalyzers},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.formDescription.linkText",{defaultMessage:"language analyzer"}))}})))),Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiFormRow,{isDisabled:t||e,label:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.nameInputLabel",{defaultMessage:"Index name"}),isInvalid:m,error:u?N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.alreadyExists.error",{defaultMessage:"An index with the name {indexName} already exists",values:{indexName:c}}):d?n:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.isInvalid.error",{defaultMessage:"{indexName} is an invalid index name",values:{indexName:c}}),helpText:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.nameInputHelpText.lineOne",{defaultMessage:"Your index will be named: {indexName}",values:{indexName:c}}),fullWidth:!0},Object(y.jsx)(S.EuiFieldText,{"data-test-subj":`entSearchContent-${l}-newIndex-editName`,"data-telemetry-id":`entSearchContent-${l}-newIndex-editName`,placeholder:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.nameInputPlaceholder",{defaultMessage:"Set a name for your index"}),fullWidth:!0,disabled:t,isInvalid:!1,value:g,onChange:e=>{M(e.target.value),a&&a(c)},autoFocus:!0,prepend:"search-"})),Object(y.jsx)(S.EuiText,{size:"xs",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.nameInputHelpText.lineTwo",{defaultMessage:"Names should be lowercase and cannot contain spaces or special characters."}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiFormRow,{isDisabled:t,label:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.languageInputLabel",{defaultMessage:"Language analyzer"}),helpText:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.languageInputHelpText",{defaultMessage:"Language can be changed later, but may require a reindex"})},Object(y.jsx)(S.EuiSelect,{"data-telemetry-id":`entSearchContent-${l}-newIndex-languageAnalyzer`,disabled:t,options:Te,onChange:e=>{h(e.target.value)},value:x})))))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{target:"_blank",href:k.a.elasticsearchGettingStarted},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.learnMoreIndices.linkText",{defaultMessage:"Learn more about indices"}))),l===j.r.CONNECTOR&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{target:"_blank",href:k.a.connectors},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.learnMoreConnectors.linkText",{defaultMessage:"Learn more about connectors"}))),l===j.r.CRAWLER&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{target:"_blank",href:k.a.crawlerOverview},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.learnMoreCrawler.linkText",{defaultMessage:"Learn more about the Elastic web crawler"}))),l===j.r.API&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{target:"_blank",href:k.a.ingestionApis},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.learnMoreApis.linkText",{defaultMessage:"Learn more about ingestion APIs"})))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"row",alignItems:"center",justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":`entSearchContent-${l}-newIndex-goBack`,isDisabled:e,onClick:()=>history.back()},zt.c)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-test-subj":`entSearchContent-${l}-newIndex-createIndex`,"data-telemetry-id":`entSearchContent-${l}-newIndex-createIndex`,fill:!0,isDisabled:!g||e||m||t,isLoading:e,type:"submit"},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.createIndex.buttonText",{defaultMessage:"Create index"}))))))};var Gt=n(256),$t=n.n(Gt);let Vt,qt,Wt,Zt,Ht,Jt;!function(e){e.Pending="pending",e.Suspended="suspended",e.Starting="starting",e.Running="running",e.Suspending="suspending",e.Canceling="canceling",e.Success="success",e.Failed="failed",e.Canceled="canceled",e.Skipped="skipped"}(Vt||(Vt={})),Vt.Canceling,ne.i.CANCELING,Vt.Canceled,ne.i.CANCELED,Vt.Failed,ne.i.ERROR,Vt.Pending,ne.i.PENDING,Vt.Running,ne.i.IN_PROGRESS,Vt.Skipped,ne.i.CANCELED,Vt.Starting,ne.i.PENDING,Vt.Success,ne.i.COMPLETED,Vt.Suspended,ne.i.SUSPENDED,Vt.Suspending,ne.i.IN_PROGRESS,Vt.Canceling,ne.a.CONNECTED,Vt.Canceled,ne.a.CONNECTED,Vt.Failed,ne.a.ERROR,Vt.Pending,ne.a.CONNECTED,Vt.Running,ne.a.CONNECTED,Vt.Skipped,ne.a.CONNECTED,Vt.Starting,ne.a.CONNECTED,Vt.Success,ne.a.CONNECTED,Vt.Suspended,ne.a.CONNECTED,Vt.Suspending,ne.a.CONNECTED,function(e){e.allow="allow",e.deny="deny"}(qt||(qt={})),function(e){e.beginsWith="begins",e.endsWith="ends",e.contains="contains",e.regex="regex"}(Wt||(Wt={})),function(e){e.hours="hour",e.days="day",e.weeks="week",e.months="month"}(Zt||(Zt={})),function(e){e.Full="full",e.Partial="partial"}(Ht||(Ht={})),function(e){e.ONE_TIME="one-time",e.MULTIPLE="multiple"}(Jt||(Jt={}));const Xt=Object(V.a)(["start_sync_api_logic"],(async({connectorId:e,nextSyncConfig:t})=>{const n=`/internal/enterprise_search/connectors/${e}/start_sync`;return await d.a.values.http.post(n,{body:JSON.stringify({nextSyncConfig:JSON.stringify(t)})})}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.index.syncSuccess.message",{defaultMessage:"Successfully scheduled a sync, waiting for a connector to pick it up"})});function Kt(e){const{auth:t,available_deduplication_fields:n,crawl_rules:a,created_on:i,deduplication_enabled:s,deduplication_fields:r,default_crawl_rule:l,document_count:o,entry_points:c,extraction_rules:u,id:d,last_visited_at:p,name:g,sitemaps:j}=e,x={auth:t,availableDeduplicationFields:n,crawlRules:a,createdOn:i,deduplicationEnabled:s,deduplicationFields:r,documentCount:o,entryPoints:c,extractionRules:u,id:d,sitemaps:j,url:g};return p&&(x.lastCrawl=p),l&&(x.defaultCrawlRule=l),x}function en(e){const{status:{avg_response_time_msec:t,crawl_duration_msec:n,pages_visited:a,urls_allowed:i,status_codes:s}}=e;return{status:{avgResponseTimeMSec:t,crawlDurationMSec:n,pagesVisited:a,statusCodes:s,urlsAllowed:i}}}function tn(e){const{id:t,status:n,created_at:a,began_at:i,completed_at:s}=e;return{beganAt:i,completedAt:s,createdAt:a,id:t,status:n}}function nn(e){const{domain_allowlist:t,seed_urls:n,sitemap_urls:a,max_crawl_depth:i}=e;return{domainAllowlist:t,maxCrawlDepth:i,seedUrls:n,sitemapUrls:a}}const an=e=>({id:e.id,name:e.name,seedUrls:e.seed_urls,sitemapUrls:e.sitemap_urls}),sn=({frequency:e,unit:t,use_connector_schedule:n})=>({frequency:e,unit:t,useConnectorSchedule:n});function rn(e){return null!==e&&"basic"===e.type}const ln=Object(V.a)(["get_crawler_domain"],(async({indexName:e})=>function(e){const{domains:t,events:n,most_recent_crawl_request:a,user_agent:i}=e;return{domains:t.map((e=>Kt(e))),events:n.map((e=>function(e){const{id:t,stage:n,status:a,created_at:i,began_at:s,completed_at:r,type:l,crawl_config:o}=e;return{beganAt:s,completedAt:r,crawlConfig:nn(o),createdAt:i,id:t,stage:n,status:a,type:l}}(e))),mostRecentCrawlRequest:a&&tn(a),userAgent:i}}(await d.a.values.http.get(`/internal/enterprise_search/indices/${e}/crawler`))));var on=n(15);const cn=Object(r.kea)({actions:{clearPollTimeout:!0,createPollTimeout:e=>({duration:e}),setTimeoutId:e=>({id:e}),startPolling:e=>({indexName:e}),stopPolling:!0},connect:{actions:[Z,["apiSuccess","apiError","apiReset","makeRequest"]],values:[Z,["data as fetchIndexApiData","status"]]},events:({values:e})=>({beforeUnmount:()=>{e.pollTimeoutId&&clearTimeout(e.pollTimeoutId)}}),listeners:({actions:e,values:t})=>({apiError:()=>{t.pollTimeoutId&&e.createPollTimeout(3e4)},apiSuccess:()=>{t.pollTimeoutId&&e.createPollTimeout(5e3)},createPollTimeout:({duration:n})=>{t.pollTimeoutId&&clearTimeout(t.pollTimeoutId);const a=setTimeout((()=>{e.makeRequest({indexName:t.indexName})}),n);e.setTimeoutId(a)},startPolling:({indexName:n})=>{if(t.pollTimeoutId){if(n===t.indexName)return;clearTimeout(t.pollTimeoutId)}e.makeRequest({indexName:n}),e.createPollTimeout(5e3)},stopPolling:()=>{t.pollTimeoutId&&clearTimeout(t.pollTimeoutId),e.clearPollTimeout()}}),path:["enterprise_search","content","api","fetch_index_api_wrapper"],reducers:{indexData:[null,{apiReset:()=>null,apiSuccess:(e,t)=>Object(on.isEqual)(e,t)?e:t}],indexName:["",{apiReset:()=>"",startPolling:(e,{indexName:t})=>t}],pollTimeoutId:[null,{clearPollTimeout:()=>null,setTimeoutId:(e,{id:t})=>t}]},selectors:({selectors:e})=>({isInitialLoading:[()=>[e.status,e.indexData],(e,t)=>e===$.a.IDLE||null===t&&e===$.a.LOADING]})}),un=Object(r.kea)({actions:{setIndexName:e=>({indexName:e})},path:["enterprise_search","content","index_name"],reducers:()=>({indexName:["",{setIndexName:(e,{indexName:t})=>t}]})}),dn=Object(r.kea)({actions:{fetchCrawlerData:!0,reApplyCrawlRules:e=>({domain:e}),startCrawl:e=>({overrides:e}),stopCrawl:()=>null},connect:{actions:[ln,["apiError","apiSuccess"],Xt,["makeRequest as makeStartSyncRequest"],cn,["makeRequest as makeFetchIndexRequest"]],values:[ln,["status","data"],cn,["indexData"]]},listeners:({actions:e,values:t})=>({fetchCrawlerData:()=>{const{indexName:e}=un.values;ln.actions.makeRequest({indexName:e})},reApplyCrawlRules:async({domain:e})=>{const{indexName:t}=un.values,{http:n}=d.a.values,a={};e&&(a.domains=[e.url]);try{await n.post(`/internal/enterprise_search/indices/${t}/crawler/process_crawls`,{body:JSON.stringify(a)}),Object(Pt.g)(N.i18n.translate("xpack.enterpriseSearch.crawler.manageCrawlsPopover.reApplyCrawlRules.successMessage",{defaultMessage:"Crawl rules are being re-applied in the background"})),dn.actions.fetchCrawlerData()}catch(e){Object(Pt.e)(e)}},startCrawl:async({overrides:n={}})=>{try{Object(G.j)(t.indexData)&&t.indexData.connector&&(e.makeStartSyncRequest({connectorId:t.indexData.connector.id,nextSyncConfig:n}),e.fetchCrawlerData())}catch(e){Object(Pt.e)(e)}},stopCrawl:async()=>{const{indexName:t}=un.values,{http:n}=d.a.values;try{await n.post(`/internal/enterprise_search/indices/${t}/crawler/crawl_requests/cancel`),e.fetchCrawlerData()}catch(e){Object(Pt.e)(e)}}}),path:["enterprise_search","crawler_logic"],reducers:{dataLoading:[!0,{apiError:()=>!1,apiSuccess:()=>!1}]},selectors:({selectors:e})=>({domains:[()=>[e.data],e=>{var t;return null!==(t=null==e?void 0:e.domains)&&void 0!==t?t:[]}],events:[()=>[e.data],e=>{var t;return null!==(t=null==e?void 0:e.events)&&void 0!==t?t:[]}],mostRecentCrawlRequest:[()=>[e.data],e=>{var t;return null!==(t=null==e?void 0:e.mostRecentCrawlRequest)&&void 0!==t?t:null}],mostRecentCrawlRequestStatus:[()=>[e.mostRecentCrawlRequest],e=>{var t;return null!==(t=null==e?void 0:e.status)&&void 0!==t?t:null}]})}),pn=e=>{let t=e,n="/";const a=e.search(/[^\:\/]\//);return-1!==a&&(t=e.substring(0,a+1),n=e.substring(a+1)),{domain:t,entryPoint:n}},gn=e=>{switch(e){case"valid":return"success";case"warning":return"warning";case"invalid":return"danger";default:return"subdued"}},jn={networkConnectivity:{state:"invalid",message:N.i18n.translate("xpack.enterpriseSearch.appSearch.crawler.addDomainForm.networkConnectivityFailureMessage",{defaultMessage:'Unable to establish a network connection because the "Initial validation" check failed.'})},indexingRestrictions:{state:"invalid",message:N.i18n.translate("xpack.enterpriseSearch.appSearch.crawler.addDomainForm.indexingRestrictionsFailureMessage",{defaultMessage:'Unable to determine indexing restrictions because the "Network connectivity" check failed.'})},contentVerification:{state:"invalid",message:N.i18n.translate("xpack.enterpriseSearch.appSearch.crawler.addDomainForm.contentVerificationFailureMessage",{defaultMessage:'Unable to verify content because the "Indexing restrictions" check failed.'})}},xn=e=>e.reduce(((e,t)=>({...e,[t.name]:t})),{}),Mn=Object(r.kea)({path:["enterprise_search","crawler","crawl_custom_settings_flyout_domain_logic"],actions:()=>({fetchDomainConfigData:!0,onRecieveDomainConfigData:e=>({domainConfigs:e})}),reducers:()=>({domainConfigs:[[],{onRecieveDomainConfigData:(e,{domainConfigs:t})=>t}]}),selectors:()=>({domainUrls:[e=>[e.domainConfigs],e=>(e=>e.map((e=>e.name)))(e)],domainConfigMap:[e=>[e.domainConfigs],e=>xn(e)]}),listeners:({actions:e})=>({fetchDomainConfigData:async()=>{const{http:t}=d.a.values,{indexName:n}=un.values;let a=[],i=1,s=1,r=100;try{for(;s<=i;){const{results:e,meta:{page:l}}=await t.get(`/internal/enterprise_search/indices/${n}/crawler/domain_configs`,{query:{"page[current]":s,"page[size]":r}});a=[...a,...e.map(an)],s=l.current+1,i=l.total_pages,r=l.size}e.onRecieveDomainConfigData(a)}catch(e){Object(Pt.e)(e)}}})}),hn=Object(V.a)(["start_access_control_sync_api_logic"],(async({connectorId:e})=>{const t=`/internal/enterprise_search/connectors/${e}/start_access_control_sync`;return await d.a.values.http.post(t)}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.index.accessControlSyncSuccess.message",{defaultMessage:"Successfully scheduled an access control sync, waiting for a connector to pick it up"})}),mn=Object(V.a)(["start_incremental_sync_api_logic"],(async({connectorId:e})=>{const t=`/internal/enterprise_search/connectors/${e}/start_incremental_sync`;return await d.a.values.http.post(t)}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.index.incSyncSuccess.message",{defaultMessage:"Successfully scheduled an incremental sync, waiting for a connector to pick it up"})}),fn=Object(r.kea)({actions:{fetchIndex:!0,recheckIndex:!0,resetRecheckIndexLoading:!0,startAccessControlSync:!0,startIncrementalSync:!0,startSync:!0},connect:{actions:[un,["setIndexName"],cn,["apiError as fetchIndexApiError","apiReset as resetFetchIndexApi","apiSuccess as fetchIndexApiSuccess","makeRequest as makeFetchIndexRequest","startPolling as startFetchIndexPoll","stopPolling as stopFetchIndexPoll"],Xt,["apiSuccess as startSyncApiSuccess","makeRequest as makeStartSyncRequest"],mn,["apiSuccess as startIncrementalSyncApiSuccess","makeRequest as makeStartIncrementalSyncRequest"],hn,["apiSuccess as startAccessControlSyncApiSuccess","makeRequest as makeStartAccessControlSyncRequest"],dn,["fetchCrawlerData"]],values:[un,["indexName"],cn,["fetchIndexApiData","status as fetchIndexApiStatus","indexData","isInitialLoading"]]},events:({actions:e})=>({beforeUnmount:()=>{e.stopFetchIndexPoll(),e.resetFetchIndexApi()}}),listeners:({actions:e,values:t})=>({fetchIndex:()=>{const{indexName:t}=un.values;e.makeFetchIndexRequest({indexName:t})},fetchIndexApiSuccess:n=>{Object(G.j)(n)&&n.name===t.indexName&&e.fetchCrawlerData(),t.recheckIndexLoading&&(e.resetRecheckIndexLoading(),Object(Pt.g)(N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.index.recheckSuccess.message",{defaultMessage:"Your connector has been rechecked."})))},recheckIndex:()=>e.fetchIndex(),setIndexName:({indexName:t})=>{e.startFetchIndexPoll(t)},startAccessControlSync:()=>{Object(G.h)(t.fetchIndexApiData)&&t.hasDocumentLevelSecurityFeature&&p.a.values.productFeatures.hasDocumentLevelSecurityEnabled&&e.makeStartAccessControlSyncRequest({connectorId:t.fetchIndexApiData.connector.id})},startIncrementalSync:()=>{Object(G.h)(t.fetchIndexApiData)&&t.hasIncrementalSyncFeature&&p.a.values.productFeatures.hasIncrementalSyncEnabled&&e.makeStartIncrementalSyncRequest({connectorId:t.fetchIndexApiData.connector.id})},startSync:()=>{Object(G.h)(t.fetchIndexApiData)&&e.makeStartSyncRequest({connectorId:t.fetchIndexApiData.connector.id})}}),path:["enterprise_search","content","index_view_logic"],reducers:{recheckIndexLoading:[!1,{recheckIndex:()=>!0,resetRecheckIndexLoading:()=>!1}],syncTriggeredLocally:[!1,{fetchIndexApiSuccess:()=>!1,startSyncApiSuccess:()=>!0}]},selectors:({selectors:e})=>({connector:[()=>[e.indexData],e=>e&&(Object(G.i)(e)||Object(G.j)(e))?e.connector:void 0],connectorError:[()=>[e.connector],e=>null==e?void 0:e.error],connectorId:[()=>[e.indexData],e=>Object(G.i)(e)?e.connector.id:null],error:[()=>[e.connector],e=>(null==e?void 0:e.error)||(null==e?void 0:e.last_sync_error)||null],hasAdvancedFilteringFeature:[()=>[e.connector],e=>{var t,n,a;return!(null==e||!e.features)&&(null!==(t=null===(n=e.features[ne.c.SYNC_RULES])||void 0===n||null===(a=n.advanced)||void 0===a?void 0:a.enabled)&&void 0!==t?t:e.features[ne.c.FILTERING_ADVANCED_CONFIG])}],hasBasicFilteringFeature:[()=>[e.connector],e=>{var t,n,a;return!(null==e||!e.features)&&(null!==(t=null===(n=e.features[ne.c.SYNC_RULES])||void 0===n||null===(a=n.basic)||void 0===a?void 0:a.enabled)&&void 0!==t?t:e.features[ne.c.FILTERING_RULES])}],hasDocumentLevelSecurityFeature:[()=>[e.connector],e=>{var t,n;return(null==e||null===(t=e.features)||void 0===t||null===(n=t[ne.c.DOCUMENT_LEVEL_SECURITY])||void 0===n?void 0:n.enabled)||!1}],hasFilteringFeature:[()=>[e.hasAdvancedFilteringFeature,e.hasBasicFilteringFeature],(e,t)=>e||t],hasIncrementalSyncFeature:[()=>[e.connector],e=>{var t,n;return(null==e||null===(t=e.features)||void 0===t||null===(n=t[ne.c.INCREMENTAL_SYNC])||void 0===n?void 0:n.enabled)||!1}],htmlExtraction:[()=>[e.connector],e=>{var t,n;return null!==(t=null==e||null===(n=e.configuration.extract_full_html)||void 0===n?void 0:n.value)&&void 0!==t?t:void 0}],index:[()=>[e.indexData],e=>e?Object(G.e)(e):void 0],ingestionMethod:[()=>[e.indexData],e=>Object(G.b)(e)],ingestionStatus:[()=>[e.indexData],e=>Object(G.c)(e)],isCanceling:[()=>[e.syncStatus],e=>e===ne.i.CANCELING],isConnectorIndex:[()=>[e.indexData],e=>Object(G.h)(e)],isHiddenIndex:[()=>[e.indexData],e=>{var t;return(null==e?void 0:e.hidden)||(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"").startsWith(".")}],isSyncing:[()=>[e.indexData,e.syncStatus],(e,t)=>(null==e?void 0:e.has_in_progress_syncs)||t===ne.i.IN_PROGRESS],isWaitingForSync:[()=>[e.indexData,e.syncTriggeredLocally],(e,t)=>(null==e?void 0:e.has_pending_syncs)||t||!1],lastUpdated:[()=>[e.fetchIndexApiData],e=>Object(G.d)(e)],pipelineData:[()=>[e.connector],e=>{var t;return null!==(t=null==e?void 0:e.pipeline)&&void 0!==t?t:void 0}],syncStatus:[()=>[e.fetchIndexApiData],e=>{var t,n;return null!==(t=null==e||null===(n=e.connector)||void 0===n?void 0:n.last_sync_status)&&void 0!==t?t:null}]})}),bn=Object(V.a)(["post_crawler_custom_scheduling_api_logic"],(async({indexName:e,customScheduling:t})=>{const n=`/internal/enterprise_search/indices/${e}/crawler/custom_scheduling`;await d.a.values.http.post(n,{body:JSON.stringify(Object.fromEntries(t))})}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.postCrawlerCustomSchedulingSuccess.message",{defaultMessage:"Successfully saved crawler custom scheduling."})}),yn={scheduleKey:"crawler_0",name:"Crawler 0",maxCrawlDepth:2,customEntryPointUrls:[],customSitemapUrls:[],includeSitemapsInRobotsTxt:!0,selectedDomainUrls:[],selectedEntryPointUrls:[],selectedSitemapUrls:[],interval:"0 0 0 * * ?",enabled:!1,sitemapUrls:[],entryPointUrls:[]},On=Object(r.kea)({path:["enterprise_search","crawler","crawl_custom_settings_flyout_multi_crawl_logic"],connect:{actions:[bn,["makeRequest as makePostCustomSchedulingRequest"],Mn,["onRecieveDomainConfigData"]],values:[fn,["index"],Mn,["domainConfigs","domainConfigMap"]]},actions:()=>({fetchCustomScheduling:!0,postCustomScheduling:!0,onAddCustomCrawler:e=>({index:e}),onDeleteCustomCrawler:e=>({index:e}),onReceiveCrawlerCustomScheduling:e=>({crawlerConfigurations:e}),onSelectCrawlerConfigActiveTab:e=>({crawlerConfigActiveTab:e}),onSelectCustomEntryPointUrls:(e,t)=>({index:e,entryPointUrls:t}),onSelectCustomSitemapUrls:(e,t)=>({index:e,sitemapUrls:t}),onSelectDomainUrls:(e,t)=>({index:e,domainUrls:t}),onSelectEntryPointUrls:(e,t)=>({index:e,entryPointUrls:t}),onSelectMaxCrawlDepth:(e,t)=>({index:e,maxCrawlDepth:t}),onSelectSitemapUrls:(e,t)=>({index:e,sitemapUrls:t}),onSetConnectorSchedulingEnabled:(e,t)=>({index:e,enabled:t}),setConnectorSchedulingInterval:(e,t)=>({index:e,newSchedule:t}),toggleIncludeSitemapsInRobotsTxt:e=>({index:e})}),reducers:()=>({crawlerConfigActiveTab:[0,{onSelectCrawlerConfigActiveTab:(e,{crawlerConfigActiveTab:t})=>t,onDeleteCustomCrawler:()=>0}],crawlerConfigurations:[[yn],{onReceiveCrawlerCustomScheduling:(e,{crawlerConfigurations:t})=>t.length>0?t.map((e=>({...yn,...e}))):[yn],onAddCustomCrawler:(e,{index:t})=>{let n=`crawler_${t}`,a=t;const i=e.map((e=>e.scheduleKey));if(i.includes(n)){for(;i.includes(`${n}_${a}`);)a++;n=`${n}_${a}`}return[...e,{...yn,name:`Crawler ${a}`,scheduleKey:n}]},onDeleteCustomCrawler:(e,{index:t})=>e.filter(((e,n)=>n!==t)),onSelectMaxCrawlDepth:(e,{index:t,maxCrawlDepth:n})=>e.map(((e,a)=>a===t?{...e,maxCrawlDepth:n}:e)),onSelectCustomEntryPointUrls:(e,{index:t,entryPointUrls:n})=>e.map(((e,a)=>a===t?{...e,customEntryPointUrls:n}:e)),onSelectCustomSitemapUrls:(e,{index:t,sitemapUrls:n})=>e.map(((e,a)=>a===t?{...e,customSitemapUrls:n}:e)),toggleIncludeSitemapsInRobotsTxt:(e,{index:t})=>e.map(((e,n)=>n===t?{...e,includeSitemapsInRobotsTxt:!e.includeSitemapsInRobotsTxt}:e)),onSelectDomainUrls:(e,{index:t,domainUrls:n})=>e.map(((e,a)=>a===t?{...e,selectedDomainUrls:n,selectedEntryPointUrls:In(e.selectedEntryPointUrls,n),selectedSitemapUrls:In(e.selectedSitemapUrls,n)}:e)),onSelectEntryPointUrls:(e,{index:t,entryPointUrls:n})=>e.map(((e,a)=>a===t?{...e,selectedEntryPointUrls:n}:e)),onSelectSitemapUrls:(e,{index:t,sitemapUrls:n})=>e.map(((e,a)=>a===t?{...e,selectedSitemapUrls:n}:e)),onSetConnectorSchedulingEnabled:(e,{index:t,enabled:n})=>e.map(((e,a)=>a===t?{...e,enabled:n}:e)),setConnectorSchedulingInterval:(e,{index:t,newSchedule:n})=>{const{interval:a}=n;return e.map(((e,n)=>n===t?{...e,interval:a}:e))},onRecieveDomainConfigData:(e,{domainConfigs:t})=>{const n=xn(t);return e.map((e=>{const t=e.selectedDomainUrls.flatMap((e=>n[e].seedUrls)),a=e.customEntryPointUrls.filter((e=>t.includes(e))),i=e.customEntryPointUrls.filter((e=>!t.includes(e))),s=e.selectedDomainUrls.flatMap((e=>n[e].sitemapUrls)),r=e.customSitemapUrls.filter((e=>s.includes(e))),l=e.customSitemapUrls.filter((e=>!s.includes(e)));return{...e,entryPointUrls:t,selectedEntryPointUrls:a,customEntryPointUrls:i,sitemapUrls:s,selectedSitemapUrls:r,customSitemapUrls:l}}))}}]}),selectors:()=>({crawlerConfigurationsWithDomainData:[e=>[e.domainConfigMap,e.crawlerConfigurations],(e,t)=>t.map((t=>{const n=t.selectedDomainUrls.flatMap((t=>e[t].seedUrls)),a=t.selectedDomainUrls.flatMap((t=>e[t].sitemapUrls));return{...t,entryPointUrls:n,sitemapUrls:a}}))],crawlerCustomSchedulingIsValid:[e=>[e.crawlerConfigurations],e=>e.every((e=>e.selectedDomainUrls.length>0))]}),listeners:({actions:e,values:t})=>({fetchCustomScheduling:async()=>{const{http:t}=d.a.values,{indexName:n}=un.values;try{const i=(a=await t.get(`/internal/enterprise_search/indices/${n}/crawler/custom_scheduling`),Object.entries(a.custom_scheduling).map((([e,t])=>{const{name:n,interval:a,configuration_overrides:i,enabled:s}=t,{max_crawl_depth:r=2,sitemap_discovery_disabled:l=!1,domain_allowlist:o=[],sitemap_urls:c=[],seed_urls:u=[]}=i;return{scheduleKey:e,name:n,interval:a,enabled:s,maxCrawlDepth:r,includeSitemapsInRobotsTxt:!l,selectedDomainUrls:o,selectedEntryPointUrls:[],selectedSitemapUrls:[],customEntryPointUrls:u,customSitemapUrls:c,entryPointUrls:[],sitemapUrls:[]}})));e.onReceiveCrawlerCustomScheduling(i)}catch(e){Object(Pt.e)(e)}var a},postCustomScheduling:async()=>{const{indexName:n}=un.values,{crawlerConfigurations:a}=t,i=a.reduce(((e,t)=>(e.set(t.scheduleKey,(e=>{const t={maxCrawlDepth:e.maxCrawlDepth,sitemapDiscoveryDisabled:!e.includeSitemapsInRobotsTxt,domainAllowlist:e.selectedDomainUrls,sitemapUrls:[...e.selectedSitemapUrls,...e.customSitemapUrls],seedUrls:[...e.selectedEntryPointUrls,...e.customEntryPointUrls]};return{name:e.name,interval:e.interval,configurationOverrides:t,enabled:e.enabled}})(t)),e)),new Map);try{e.makePostCustomSchedulingRequest({indexName:n,customScheduling:i})}catch(e){Object(Pt.e)(e)}}})}),In=(e,t)=>{const n=t.reduce(((e,t)=>({...e,[t]:!0})),{});return e.filter((e=>{const{domain:t}=pn(e);return!!n[t]}))},Sn=Object(r.kea)({path:["enterprise_search","crawler","crawl_custom_settings_flyout_logic"],connect:{actions:[dn,["startCrawl"],Mn,["fetchDomainConfigData","onRecieveDomainConfigData"],On,["fetchCustomScheduling","postCustomScheduling"]],values:[Mn,["domainConfigs","domainConfigMap"]]},actions:()=>({saveCustomSchedulingConfiguration:!0,hideFlyout:!0,onSelectCrawlType:e=>({crawlType:e}),onSelectCustomEntryPointUrls:e=>({entryPointUrls:e}),onSelectCustomSitemapUrls:e=>({sitemapUrls:e}),onSelectDomainUrls:e=>({domainUrls:e}),onSelectEntryPointUrls:e=>({entryPointUrls:e}),onSelectMaxCrawlDepth:e=>({maxCrawlDepth:e}),onSelectSitemapUrls:e=>({sitemapUrls:e}),startCustomCrawl:!0,toggleIncludeSitemapsInRobotsTxt:!0,showFlyout:!0}),reducers:()=>({crawlType:[Jt.ONE_TIME,{onSelectCrawlType:(e,{crawlType:t})=>t}],customEntryPointUrls:[[],{showFlyout:()=>[],onSelectCustomEntryPointUrls:(e,{entryPointUrls:t})=>t}],customSitemapUrls:[[],{showFlyout:()=>[],onSelectCustomSitemapUrls:(e,{sitemapUrls:t})=>t}],includeSitemapsInRobotsTxt:[!0,{showFlyout:()=>!0,toggleIncludeSitemapsInRobotsTxt:e=>!e}],isDataLoading:[!0,{showFlyout:()=>!0,onRecieveDomainConfigData:()=>!1}],isFormSubmitting:[!1,{startCustomCrawl:()=>!0,startCrawl:()=>!1}],isFlyoutVisible:[!1,{showFlyout:()=>!0,hideFlyout:()=>!1,startCrawl:()=>!1,saveCustomSchedulingConfiguration:()=>!1}],maxCrawlDepth:[2,{showFlyout:()=>2,onSelectMaxCrawlDepth:(e,{maxCrawlDepth:t})=>t}],selectedDomainUrls:[[],{showFlyout:()=>[],onSelectDomainUrls:(e,{domainUrls:t})=>t}],selectedEntryPointUrls:[[],{showFlyout:()=>[],onSelectEntryPointUrls:(e,{entryPointUrls:t})=>t,onSelectDomainUrls:(e,{domainUrls:t})=>In(e,t)}],selectedSitemapUrls:[[],{showFlyout:()=>[],onSelectSitemapUrls:(e,{sitemapUrls:t})=>t,onSelectDomainUrls:(e,{domainUrls:t})=>In(e,t)}]}),selectors:()=>({entryPointUrls:[e=>[Mn.selectors.domainConfigMap,e.selectedDomainUrls],(e,t)=>t.flatMap((t=>e[t].seedUrls))],isSingleCrawlType:[e=>[e.crawlType],e=>e===Jt.ONE_TIME],sitemapUrls:[e=>[Mn.selectors.domainConfigMap,e.selectedDomainUrls],(e,t)=>t.flatMap((t=>e[t].sitemapUrls))]}),listeners:({actions:e,values:t})=>({showFlyout:async()=>{e.fetchDomainConfigData(),e.fetchCustomScheduling()},saveCustomSchedulingConfiguration:()=>{e.postCustomScheduling()},startCustomCrawl:()=>{const n={sitemap_discovery_disabled:!t.includeSitemapsInRobotsTxt,max_crawl_depth:t.maxCrawlDepth,domain_allowlist:t.selectedDomainUrls},a=[...t.selectedEntryPointUrls,...t.customEntryPointUrls];a.length>0&&(n.seed_urls=a);const i=[...t.selectedSitemapUrls,...t.customSitemapUrls];i.length>0&&(n.sitemap_urls=i),e.startCrawl(n)}})}),Nn=()=>{const{reApplyCrawlRules:e,startCrawl:t}=Object(r.useActions)(dn),{showFlyout:n}=Object(r.useActions)(Sn),[i,s]=Object(a.useState)(!1),l=()=>s(!1);return Object(y.jsx)(S.EuiPopover,{button:Object(y.jsx)(S.EuiButton,{iconType:"arrowDown",iconSide:"right",onClick:()=>s(!i),fill:!0,"data-test-subj":"entSearchContent-crawler-startCrawlMenu-menuButton"},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusIndicator.retryCrawlButtonLabel",{defaultMessage:"Crawl"})),isOpen:i,closePopover:l,panelPaddingSize:"none",anchorPosition:"downLeft"},Object(y.jsx)(S.EuiContextMenuPanel,{items:[Object(y.jsx)(S.EuiContextMenuItem,{key:"crawl all domains",onClick:()=>{l(),t()},icon:"play","data-test-subj":"entSearchContent-crawler-startCrawlMenu-crawlAllDomains"},N.i18n.translate("xpack.enterpriseSearch.crawler.startCrawlContextMenu.crawlAllDomainsMenuLabel",{defaultMessage:"Crawl all domains on this index"})),Object(y.jsx)(S.EuiContextMenuItem,{key:"crawl with custom settings",onClick:()=>{l(),n()},icon:"gear"},N.i18n.translate("xpack.enterpriseSearch.crawler.startCrawlContextMenu.crawlCustomSettingsMenuLabel",{defaultMessage:"Crawl with custom settings"})),Object(y.jsx)(S.EuiContextMenuItem,{key:"reaply crawl rules",onClick:()=>{l(),e()},icon:"refresh"},N.i18n.translate("xpack.enterpriseSearch.crawler.startCrawlContextMenu.reapplyCrawlRulesMenuLabel",{defaultMessage:"Reapply crawl rules"}))]}))},En=()=>{const[e,t]=Object(a.useState)(!1),n=()=>t(!1),{stopCrawl:i}=Object(r.useActions)(dn);return Object(y.jsx)(S.EuiPopover,{button:Object(y.jsx)(S.EuiButton,{iconType:"arrowDown",iconSide:"right",onClick:()=>t(!e),className:"crawlInProgressButton"},Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",responsive:!1,gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLoadingSpinner,{size:"m"})),Object(y.jsx)(S.EuiFlexItem,null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusIndicator.crawlingButtonLabel",{defaultMessage:"Crawling..."})))),isOpen:e,closePopover:n,panelPaddingSize:"none",anchorPosition:"downLeft"},Object(y.jsx)(S.EuiContextMenuPanel,{items:[Object(y.jsx)(S.EuiContextMenuItem,{key:"cancel crawl",icon:"cross",onClick:()=>{n(),i()}},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusIndicator.cancelCrawlMenuItemLabel",{defaultMessage:"Cancel Crawls"}))]}))},Dn=()=>{const{dataLoading:e,domains:t,mostRecentCrawlRequestStatus:n}=Object(r.useValues)(dn);if(e||0===t.length)return Object(y.jsx)(S.EuiButton,{disabled:!0,iconType:"arrowDown",iconSide:"right"},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusIndicator.startACrawlButtonLabel",{defaultMessage:"Crawl"}));switch(n){case Vt.Pending:case Vt.Suspended:return Object(y.jsx)(S.EuiButton,{isLoading:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusIndicator.pendingButtonLabel",{defaultMessage:"Pending..."}));case Vt.Starting:return Object(y.jsx)(S.EuiButton,{isLoading:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusIndicator.startingButtonLabel",{defaultMessage:"Starting..."}));case Vt.Running:return Object(y.jsx)(En,null);case Vt.Canceling:case Vt.Suspending:return Object(y.jsx)(S.EuiButton,{isLoading:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusIndicator.stoppingButtonLabel",{defaultMessage:"Stopping..."}));case Vt.Success:case Vt.Failed:case Vt.Canceled:default:return Object(y.jsx)(Nn,null)}};var Tn=n(60);const wn=({indexName:e,ingestionMethod:t,isHiddenIndex:n})=>{const a=e?Object(je.a)(`${j.b.URL}${Tn.e}?:indexKey=:indexName`,{indexKey:zt.o,indexName:e}):`${j.b.URL}${Tn.e}`;return Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiContextMenuItem,{"data-telemetry-id":`entSearchContent-${t}-header-createEngine-createEngine`,size:"s",icon:"plusInCircle",onClick:()=>{p.a.values.navigateToUrl(a,{shouldNotCreateHref:!0})},disabled:n},Object(y.jsx)(S.EuiText,null,Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.index.searchApplication.createSearchApplication",{defaultMessage:"Create a Search Application"}))))))},vn=Object(r.kea)({actions:{toggleSearchEnginesPopover:!0},path:["enterprise_search","search_index","header"],reducers:()=>({isSearchEnginesPopoverOpen:[!1,{toggleSearchEnginesPopover:e=>!e}]})}),Cn=({indexName:e,ingestionMethod:t,isHiddenIndex:n})=>{const{isSearchEnginesPopoverOpen:a}=Object(r.useValues)(vn),{toggleSearchEnginesPopover:i}=Object(r.useActions)(vn);return Object(y.jsx)(S.EuiPopover,{isOpen:a,closePopover:i,button:Object(y.jsx)(S.EuiButton,{"data-telemetry-id":`entSearchContent-${t}-header-searchEngines`,iconSide:"right",iconType:"arrowDown",onClick:i},N.i18n.translate("xpack.enterpriseSearch.content.index.searchEngines.label",{defaultMessage:"Search Applications"}))},Object(y.jsx)(S.EuiContextMenuPanel,{size:"s",items:[Object(y.jsx)(S.EuiContextMenuItem,{"data-telemetry-id":`entSearchContent-${t}-header-searchEngines-viewEngines`,icon:"eye",onClick:()=>{p.a.values.navigateToUrl(j.b.URL+Tn.b,{shouldNotCreateHref:!0})}},Object(y.jsx)(S.EuiText,null,Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.index.searchEngines.viewEngines",{defaultMessage:"View Search Applications"})))),n?Object(y.jsx)(S.EuiToolTip,{content:N.i18n.translate("xpack.enterpriseSearch.content.index.searchEngines.createEngineDisabledTooltip",{defaultMessage:"You cannot create search applications from hidden indices."})},Object(y.jsx)(wn,{indexName:e,ingestionMethod:t,isHiddenIndex:n})):Object(y.jsx)(wn,{indexName:e,ingestionMethod:t,isHiddenIndex:n})]}))},kn=Object(r.kea)({actions:{cancelSyncs:!0},connect:{actions:[q,["apiError as cancelSyncsApiError","apiSuccess as cancelSyncsApiSuccess","makeRequest as makeCancelSyncsRequest"]],values:[fn,["connectorId","isConnectorIndex"]]},listeners:({actions:e,values:t})=>({cancelSyncs:()=>{t.isConnectorIndex&&t.connectorId&&e.makeCancelSyncsRequest({connectorId:t.connectorId})}})}),An=()=>{const{productFeatures:e}=Object(r.useValues)(p.a),{hasDocumentLevelSecurityFeature:t,hasIncrementalSyncFeature:n,ingestionMethod:i,ingestionStatus:s,isCanceling:l,isSyncing:o,isWaitingForSync:c}=Object(r.useValues)(fn),{cancelSyncs:u}=Object(r.useActions)(kn),{status:d}=Object(r.useValues)(q),{startSync:g,startIncrementalSync:j,startAccessControlSync:x}=Object(r.useActions)(fn),[M,h]=Object(a.useState)(!1),m=()=>h(!1),f=(o||c)&&s!==J.b.ERROR,b=e.hasDocumentLevelSecurityEnabled&&t,O=e.hasIncrementalSyncEnabled&&n,I=[{id:0,items:[...f?[]:[{"data-telemetry-id":`entSearchContent-${i}-header-sync-startSync`,"data-test-subj":`entSearchContent-${i}-header-sync-startSync`,disabled:s===J.b.INCOMPLETE,icon:"play",name:N.i18n.translate("xpack.enterpriseSearch.index.header.more.fullSync",{defaultMessage:"Full Content"}),onClick:()=>{m(),g()}}],...O?[{"data-telemetry-id":"entSearchContent-${ingestionMethod}-header-sync-more-incrementalSync","data-test-subj":"entSearchContent-${ingestionMethod}-header-sync-more-incrementalSync",disabled:s===J.b.INCOMPLETE,icon:"play",name:N.i18n.translate("xpack.enterpriseSearch.index.header.more.incrementalSync",{defaultMessage:"Incremental Content"}),onClick:()=>{m(),j()}}]:[],...b?[{"data-telemetry-id":"entSearchContent-${ingestionMethod}-header-sync-more-accessControlSync","data-test-subj":"entSearchContent-${ingestionMethod}-header-sync-more-accessControlSync",disabled:s===J.b.INCOMPLETE,icon:"play",name:N.i18n.translate("xpack.enterpriseSearch.index.header.more.accessControlSync",{defaultMessage:"Access Control"}),onClick:()=>{m(),x()}}]:[],{"data-telemetry-id":`entSearchContent-${i}-header-sync-cancelSync`,disabled:l&&s!==J.b.ERROR||d===$.a.LOADING,icon:Object(y.jsx)(S.EuiIcon,{type:"cross",size:"m",color:"danger"}),name:Object(y.jsx)(S.EuiText,{color:"danger",size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.index.header.cancelSyncsTitle",{defaultMessage:"Cancel Syncs"}))),onClick:()=>{m(),u()}}],title:"Sync"}];return Object(y.jsx)(S.EuiPopover,{button:Object(y.jsx)(S.EuiButton,{"data-telemetry-id":`entSearchContent-${i}-header-sync-openSyncMenu`,iconType:"arrowDown",iconSide:"right",onClick:()=>h(!M),fill:!0},Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",responsive:!1,gutterSize:"s"},f&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLoadingSpinner,{size:"m"})),Object(y.jsx)(S.EuiFlexItem,{"data-test-subj":`entSearchContent-${i}-header-sync-menu`},c?N.i18n.translate("xpack.enterpriseSearch.content.index.syncButton.waitingForSync.label",{defaultMessage:"Waiting for sync"}):o&&s!==J.b.ERROR?N.i18n.translate("xpack.enterpriseSearch.content.index.syncButton.syncing.label",{defaultMessage:"Syncing"}):N.i18n.translate("xpack.enterpriseSearch.content.index.syncButton.label",{defaultMessage:"Sync"})))),isOpen:M,closePopover:m,panelPaddingSize:"none",anchorPosition:"downCenter"},Object(y.jsx)(S.EuiContextMenu,{initialPanelId:0,panels:I}))},Ln=(e,t)=>{const n=Object(G.b)(e);return[...Object(G.j)(e)&&e.connector?[Object(y.jsx)(Dn,null)]:[],...Object(G.h)(e)?[Object(y.jsx)(An,null)]:[],...t?[Object(y.jsx)(Cn,{indexName:null==e?void 0:e.name,ingestionMethod:n,isHiddenIndex:null==e?void 0:e.hidden})]:[]]};var zn=n(76);const _n=Object(V.a)(["generate_connector_api_key_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/api_key`;return await d.a.values.http.post(t)})),Rn=({apiKey:e,label:t})=>Object(y.jsx)(i.a.Fragment,null,t&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFormLabel,null,t),Object(y.jsx)(S.EuiSpacer,{size:"xs"})),Object(y.jsx)(S.EuiCodeBlock,{fontSize:"m",paddingSize:"m",color:"dark",isCopyable:!0},e)),Fn=({onCancel:e,onConfirm:t})=>Object(y.jsx)(S.EuiConfirmModal,{title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.title",{defaultMessage:"Generate an Elasticsearch API key"}),onCancel:e,onConfirm:t,cancelButtonText:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.cancelButton.label",{defaultMessage:"Cancel"}),confirmButtonText:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.confirmButton.label",{defaultMessage:"Generate API key"}),defaultFocusedButton:"confirm"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.confirmModal.description",{defaultMessage:"Generating a new API key will invalidate the previous key. Are you sure you want to generate a new API key? This can not be undone."})),Un=({hasApiKey:e,indexName:t})=>{const{makeRequest:n,apiReset:s}=Object(r.useActions)(_n),{data:l,status:o}=Object(r.useValues)(_n);Object(a.useEffect)((()=>(s(),s)),[t]);const[c,u]=Object(a.useState)(!1);return Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},c&&Object(y.jsx)(Fn,{onCancel:()=>{u(!1)},onConfirm:()=>{n({indexName:t}),u(!1)}}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.description",{defaultMessage:"First, generate an Elasticsearch API key. This {apiKeyName} key will enable read and write permissions for the connector to index documents to the created {indexName} index. Save the key in a safe place, as you will need it to configure your connector.",values:{apiKeyName:`${t}-connector`,indexName:t}}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{onClick:()=>{e||l?u(!0):n({indexName:t})},isLoading:o===$.a.LOADING},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.apiKey.button.label",{defaultMessage:"Generate API key"}))))),l&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Rn,{apiKey:null==l?void 0:l.encoded,label:"API Key"}))))},Pn=Object(V.a)(["content","configuration_connector_api_logic"],(async({configuration:e,connectorId:t,indexName:n})=>{const a=`/internal/enterprise_search/connectors/${t}/configuration`;return{configuration:await d.a.values.http.post(a,{body:JSON.stringify(e)}),indexName:n}}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.configuration.successToast.title",{defaultMessage:"Configuration updated"})});var Qn=n(50);const Yn=({button:e,isPopoverOpen:t,closePopover:n})=>{const{euiTheme:a}=Object(S.useEuiTheme)();return Object(y.jsx)(S.EuiPopover,{button:e,isOpen:t,closePopover:n},Object(y.jsx)(S.EuiPopoverTitle,null,N.i18n.translate("xpack.enterpriseSearch.content.newIndex.selectConnector.upgradeTitle",{defaultMessage:"Upgrade to Elastic Platinum"})),Object(y.jsx)(S.EuiText,{grow:!1,size:"s",css:Object(y.css)("max-width:calc(",a.size.xl," * 10);","")},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.newIndex.selectConnector.upgradeContent",{defaultMessage:"To use this connector, you must update your license to Platinum or start a 30-day free trial."}))),Object(y.jsx)(S.EuiPopoverFooter,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{iconType:"popout",target:"_blank",href:k.a.licenseManagement},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.selectConnector.subscriptionButtonLabel",{defaultMessage:"Subscription plans"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{iconType:"wrench",iconSide:"right",onClick:()=>p.a.values.navigateToUrl("/app/management/stack/license_management",{shouldNotCreateHref:!0})},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.selectConnector.manageLicenseButtonLabel",{defaultMessage:"Manage license"}))))))};function Bn(e){return"category"===(null==e?void 0:e.type)}var Gn=n(178);function $n(e){const t=Object.entries(e).filter((([e])=>"extract_full_html"!==e)),n=t.map((([e,n])=>{if(!n||!Bn(n))return null;const a=t.map((([t,n])=>!n||Bn(n)||n.category!==e?null:{key:t,...n})).filter(Gn.a);return{...n,configEntries:a,key:e}})).filter(Gn.a),a=Vn(t.map((([e,t])=>!t||Bn(t)||t.category?null:{key:e,...t})).filter(Gn.a),e);return{categories:n.map((t=>{const n=Vn(t.configEntries,e);return n.length>0?{...t,configEntries:n}:null})).filter(Gn.a),unCategorizedItems:a}}function Vn(e,t){return e.filter((e=>{var n;return(null!==(n=e.ui_restrictions)&&void 0!==n?n:[]).length<=0&&function(e,t){if(!e)return!0;for(const a of e){var n;if(a.value!==(null===(n=t[a.field])||void 0===n?void 0:n.value))return!1}return!0}(e.depends_on,t)})).sort(((e,t)=>Object(Gn.a)(e.order)?Object(Gn.a)(t.order)?e.order-t.order:-1:Object(Gn.a)(t.order)?1:e.key.localeCompare(t.key))).map((e=>{const t=e.label,n=[];return e.type!==ne.d.INTEGER||qn(e.value)||n.push(N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.config.invalidInteger",{defaultMessage:"{label} must be an integer.",values:{label:t}})),{...e,is_valid:n.length<=0,validation_errors:n}}))}function qn(e){return null===e&&""===e||!(isNaN(Number(e))||!Number.isSafeInteger(Number(e))||Zn(e).indexOf(".")>=0)}function Wn(e,t){switch(e){case ne.d.INTEGER:return qn(t)?function(e){return null===e||""===e?null:parseInt(String(e),10)}(t):t;case ne.d.BOOLEAN:return Hn(t);default:return Zn(t)}}function Zn(e){return null!==e?String(e):""}function Hn(e){return Boolean(e)}const Jn=Object(r.kea)({actions:{saveConfig:!0,setConfigState:e=>({configState:e}),setIsEditing:e=>({isEditing:e}),setLocalConfigEntry:e=>({...e}),setLocalConfigState:e=>({configState:e}),setShouldStartInEditMode:e=>({shouldStartInEditMode:e})},connect:{actions:[Pn,["apiSuccess","makeRequest"],cn,["apiSuccess as fetchIndexApiSuccess"]],values:[cn,["indexData as index"]]},events:({actions:e,values:t})=>({afterMount:()=>{e.setConfigState(Object(G.h)(t.index)?t.index.connector.configuration:{}),!Object(G.h)(t.index)||t.index.connector.status!==ne.a.CREATED&&t.index.connector.status!==ne.a.NEEDS_CONFIGURATION||e.setShouldStartInEditMode(!0)}}),listeners:({actions:e,values:t})=>({apiSuccess:({indexName:e})=>{cn.actions.makeRequest({indexName:e})},fetchIndexApiSuccess:n=>{!t.isEditing&&Object(G.h)(n)&&e.setConfigState(n.connector.configuration),!t.isEditing&&t.shouldStartInEditMode&&Object(G.h)(n)&&n.connector.status===ne.a.NEEDS_CONFIGURATION&&n.connector.configuration&&Object.entries(n.connector.configuration).length>0&&e.setIsEditing(!0)},saveConfig:()=>{Object(G.h)(t.index)&&e.makeRequest({configuration:Object.keys(t.localConfigState).map((e=>{var n;const a=t.localConfigState[e];return Bn(a)||!a?null:{key:e,value:null!==(n=a.value)&&void 0!==n?n:""}})).filter(Gn.a).reduce(((e,{key:t,value:n})=>(e[t]=n,e)),{}),connectorId:t.index.connector.id,indexName:t.index.connector.index_name})},setIsEditing:n=>{n&&e.setLocalConfigState(t.configState)}}),path:["enterprise_search","content","connector_configuration"],reducers:()=>({configState:[{},{apiSuccess:(e,{configuration:t})=>t,setConfigState:(e,{configState:t})=>t}],isEditing:[!1,{apiSuccess:()=>!1,setIsEditing:(e,{isEditing:t})=>t}],localConfigState:[{},{setLocalConfigEntry:(e,{key:t,display:n,type:a,validations:i,value:s,...r})=>({...e,[t]:{...r,display:n,type:a,validations:null!=i?i:[],value:n?Wn(a,s):s}}),setLocalConfigState:(e,{configState:t})=>t}],shouldStartInEditMode:[!1,{apiSuccess:()=>!1,setShouldStartInEditMode:(e,{shouldStartInEditMode:t})=>t}]}),selectors:({selectors:e})=>({configView:[()=>[e.configState],e=>$n(e)],localConfigView:[()=>[e.localConfigState],e=>$n(e)]})}),Xn=({toggleSwitch:e})=>Object(y.jsx)(S.EuiSplitPanel.Outer,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(S.EuiSplitPanel.Inner,null,Object(y.jsx)(S.EuiTitle,null,Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.connector.documentLevelSecurity.enablePanel.heading",{defaultMessage:"Document Level Security"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.connector.documentLevelSecurity.enablePanel.description",{defaultMessage:"Enables you to control which documents users can access, based on their permissions. This ensures search results only return relevant, authorized information for users, based on their roles."})))),Object(y.jsx)(S.EuiSplitPanel.Inner,{color:"subdued"},e)),Kn=({configEntry:e})=>{const{status:t}=Object(r.useValues)(Pn),{setLocalConfigEntry:n}=Object(r.useActions)(Jn),{hasPlatinumLicense:i}=Object(r.useValues)(Qn.a),[s,l]=Object(a.useState)(!1),{key:o,display:c,is_valid:u,label:d,options:p,required:g,placeholder:j,sensitive:x,tooltip:M,value:h}=e;switch(c){case ne.b.DROPDOWN:return p.length>3?Object(y.jsx)(S.EuiSelect,{disabled:t===$.a.LOADING,options:p.map((e=>({text:e.label,value:e.value}))),required:g,value:Zn(h),onChange:t=>{n({...e,value:t.target.value})}}):Object(y.jsx)(S.EuiRadioGroup,{disabled:t===$.a.LOADING,idSelected:Zn(h),name:"radio group",options:p.map((e=>({id:e.value,label:e.label}))),onChange:t=>{n({...e,value:t})}});case ne.b.NUMERIC:return Object(y.jsx)(S.EuiFieldText,{disabled:t===$.a.LOADING,required:g,value:Zn(h),isInvalid:!u,onChange:t=>{n({...e,value:t.target.value})},placeholder:j});case ne.b.TEXTAREA:const a=Object(y.jsx)(S.EuiTextArea,{disabled:t===$.a.LOADING,placeholder:j,required:g,value:Zn(h)||void 0,onChange:t=>{n({...e,value:t.target.value})}});return x?Object(y.jsx)(S.EuiAccordion,{id:o+"-accordion",buttonContent:M?Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("p",null,d)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"questionInCircle"}))):Object(y.jsx)("p",null,d)},a):a;case ne.b.TOGGLE:return"use_document_level_security"===o?Object(y.jsx)(Xn,{toggleSwitch:Object(y.jsx)(S.EuiFlexGroup,{responsive:!1,gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiSwitch,{checked:Hn(h),disabled:t===$.a.LOADING||!i,label:Object(y.jsx)("p",null,d),onChange:t=>{n({...e,value:t.target.checked})}})),!i&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Yn,{button:Object(y.jsx)(S.EuiButtonIcon,{"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.newIndex.selectConnector.openPopoverLabel",{defaultMessage:"Open licensing popover"}),iconType:"questionInCircle",onClick:()=>l(!s)}),closePopover:()=>l(!1),isPopoverOpen:s})))}):Object(y.jsx)(S.EuiSwitch,{checked:Hn(h),disabled:t===$.a.LOADING,label:M?Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("p",null,d)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"questionInCircle"}))):Object(y.jsx)("p",null,d),onChange:t=>{n({...e,value:t.target.checked})}});default:return x?Object(y.jsx)(S.EuiFieldPassword,{disabled:t===$.a.LOADING,required:g,type:"dual",value:Zn(h),onChange:t=>{n({...e,value:t.target.value})}}):Object(y.jsx)(S.EuiFieldText,{disabled:t===$.a.LOADING,placeholder:j,required:g,value:Zn(h),onChange:t=>{n({...e,value:t.target.value})}})}},ea=({items:e,hasDocumentLevelSecurityEnabled:t})=>Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},e.map((e=>{const{default_value:n,depends_on:a,key:s,display:r,is_valid:l,label:o,sensitive:c,tooltip:u,validation_errors:d}=e;if("use_document_level_security"===s&&!t)return null;const p=n?N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.config.defaultValue",{defaultMessage:"If left empty, the default value {defaultValue} will be used.",values:{defaultValue:n}}):"",g=r===ne.b.TOGGLE||r===ne.b.TEXTAREA&&c?Object(y.jsx)(i.a.Fragment,null):u?Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("p",null,o)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"questionInCircle"}))):Object(y.jsx)("p",null,o);return(null==a?void 0:a.length)>0?Object(y.jsx)(S.EuiFlexItem,{key:s},Object(y.jsx)(S.EuiPanel,{color:"subdued",borderRadius:"none"},Object(y.jsx)(S.EuiToolTip,{content:u},Object(y.jsx)(S.EuiFormRow,{label:g,helpText:p,error:d,isInvalid:!l,"data-test-subj":`entSearchContent-connector-configuration-formrow-${s}`},Object(y.jsx)(Kn,{configEntry:e}))))):Object(y.jsx)(S.EuiFlexItem,{key:s},Object(y.jsx)(S.EuiToolTip,{content:u},Object(y.jsx)(S.EuiFormRow,{label:g,helpText:p,error:d,isInvalid:!l,"data-test-subj":`entSearchContent-connector-configuration-formrow-${s}`},Object(y.jsx)(Kn,{configEntry:e}))))}))),ta=()=>{const{productFeatures:e}=Object(r.useValues)(p.a),{status:t}=Object(r.useValues)(Pn),{localConfigView:n}=Object(r.useValues)(Jn),{saveConfig:a,setIsEditing:s}=Object(r.useActions)(Jn);return Object(y.jsx)(S.EuiForm,{onSubmit:e=>{e.preventDefault(),a()},component:"form"},Object(y.jsx)(ea,{items:n.unCategorizedItems,hasDocumentLevelSecurityEnabled:e.hasDocumentLevelSecurityEnabled}),n.categories.map(((t,n)=>Object(y.jsx)(i.a.Fragment,{key:n},Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h3",null,t.label)),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(ea,{items:t.configEntries,hasDocumentLevelSecurityEnabled:e.hasDocumentLevelSecurityEnabled})))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFormRow,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-test-subj":"entSearchContent-connector-configuration-saveConfiguration","data-telemetry-id":"entSearchContent-connector-configuration-saveConfiguration",type:"submit",isLoading:t===$.a.LOADING},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.config.submitButton.title",{defaultMessage:"Save configuration"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-connector-configuration-cancelEdit",isDisabled:t===$.a.LOADING,onClick:()=>{s(!1)}},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.config.cancelEditingButton.title",{defaultMessage:"Cancel"}))))))};function na(e){return{description:e.sensitive&&e.value?"********":String(e.value)||"--",title:e.label}}const aa=({children:e})=>{const{connectorError:t}=Object(r.useValues)(fn),{configView:n,isEditing:a}=Object(r.useValues)(Jn),{setIsEditing:i}=Object(r.useActions)(Jn),s=n.unCategorizedItems.map(na);return Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},e&&Object(y.jsx)(S.EuiFlexItem,null,e),Object(y.jsx)(S.EuiFlexItem,null,a?Object(y.jsx)(ta,null):s.length>0&&Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiDescriptionList,{listItems:s,className:"eui-textBreakWord"})),n.categories.length>0&&n.categories.map((e=>Object(y.jsx)(S.EuiFlexGroup,{direction:"column",key:e.key},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h3",null,e.label))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiDescriptionList,{listItems:e.configEntries.map(na),className:"eui-textBreakWord"}))))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-test-subj":"entSearchContent-connector-configuration-editConfiguration","data-telemetry-id":"entSearchContent-connector-overview-configuration-editConfiguration",onClick:()=>i(!a)},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.config.editButton.title",{defaultMessage:"Edit configuration"}))))))),!!t&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCallOut,{color:"danger",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.config.error.title",{defaultMessage:"Connector error"})},Object(y.jsx)(S.EuiText,{size:"s"},t))))},ia=Object(V.a)(["content","connector_name_and_description_api_logic"],(async({connectorId:e,description:t=null,indexName:n,name:a=""})=>{const i=`/internal/enterprise_search/connectors/${e}/name_and_description`;return await d.a.values.http.put(i,{body:JSON.stringify({description:t,name:a})}),{description:t,indexName:n,name:a}}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nameAndDescription.successToast.title",{defaultMessage:"Connector name and description updated"})}),sa=Object(r.kea)({actions:{saveNameAndDescription:!0,setIsEditing:e=>({isEditing:e}),setLocalNameAndDescription:e=>e,setNameAndDescription:e=>e,updateLocalNameAndDescription:e=>e},connect:{actions:[ia,["apiError","apiSuccess","makeRequest"],cn,["apiSuccess as fetchIndexApiSuccess"]],values:[cn,["indexData as index"]]},events:({actions:e,values:t})=>({afterMount:()=>e.setNameAndDescription(Object(G.h)(t.index)||Object(G.j)(t.index)?t.index.connector:{})}),listeners:({actions:e,values:t})=>({fetchIndexApiSuccess:n=>{!t.isEditing&&Object(G.h)(n)&&e.setNameAndDescription(n.connector)},saveNameAndDescription:()=>{(Object(G.h)(t.index)||Object(G.j)(t.index))&&e.makeRequest({connectorId:t.index.connector.id,indexName:t.index.connector.index_name,...t.localNameAndDescription})},setIsEditing:n=>{n&&e.setLocalNameAndDescription(t.nameAndDescription)}}),path:["enterprise_search","content","connector_name_and_description"],reducers:()=>({isEditing:[!1,{apiSuccess:()=>!1,setIsEditing:(e,{isEditing:t})=>t}],localNameAndDescription:[{},{setLocalNameAndDescription:(e,t)=>t,updateLocalNameAndDescription:(e,t)=>({...e,...t})}],nameAndDescription:[{},{apiSuccess:(e,{description:t,name:n})=>({description:t,name:n}),setNameAndDescription:(e,t)=>t}]})}),ra=()=>{const{localNameAndDescription:{name:e,description:t}}=Object(r.useValues)(sa),{updateLocalNameAndDescription:n}=Object(r.useActions)(sa);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:zt.u},Object(y.jsx)(S.EuiFieldText,{required:!0,value:null!=e?e:"",onChange:e=>{n({name:e.target.value})}})),Object(y.jsx)(S.EuiFormRow,{label:zt.l},Object(y.jsx)(S.EuiTextArea,{placeholder:zt.w,value:t||"",onChange:e=>{n({description:e.target.value})}})))},la=()=>{const{status:e}=Object(r.useValues)(ia),{saveNameAndDescription:t,setIsEditing:n}=Object(r.useActions)(sa);return Object(y.jsx)(S.EuiForm,{onSubmit:e=>{e.preventDefault(),t()},component:"form"},Object(y.jsx)(ra,null),Object(y.jsx)(S.EuiFormRow,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-configuration-nameAndDescription-save",type:"submit",isLoading:e===$.a.LOADING},zt.z)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-connector-configuration-nameAndDescription-cancel",isDisabled:e===$.a.LOADING,onClick:()=>{n(!1)}},zt.e)))))},oa=()=>{const{index:e}=Object(r.useValues)(fn),{isEditing:t,nameAndDescription:{name:n,description:a}}=Object(r.useValues)(sa),{setIsEditing:s}=Object(r.useActions)(sa);return Object(G.h)(e)?Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nameAndDescriptionForm.description",{defaultMessage:"By naming and describing this connector your colleagues and wider team will know what this connector is meant for."}))),Object(y.jsx)(S.EuiFlexItem,null,t?Object(y.jsx)(la,null):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiDescriptionList,{listItems:[{description:null!=n?n:"--",title:zt.u},{description:a||"--",title:zt.l}]}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{onClick:()=>s(!t)},zt.m)))))):Object(y.jsx)(i.a.Fragment,null)},ca=Object(V.a)(["convert_connector_api_logic"],(async({connectorId:e})=>{const t=`/internal/enterprise_search/connectors/${e}/native`;return await d.a.values.http.put(t,{body:JSON.stringify({is_native:!1})})})),ua=Object(r.kea)({actions:{convertConnector:()=>!0,deleteDomain:()=>!0,hideModal:()=>!0,showModal:()=>!0},connect:{actions:[ca,["apiError","apiSuccess","makeRequest"],fn,["fetchIndex"]],values:[ca,["status"],fn,["connectorId"]]},listeners:({actions:e,values:t})=>({convertConnector:()=>{t.connectorId&&e.makeRequest({connectorId:t.connectorId})}}),path:["enterprise_search","convert_connector_modal"],reducers:{isModalVisible:[!1,{apiError:()=>!1,apiSuccess:()=>!1,hideModal:()=>!1,showModal:()=>!0}]},selectors:({selectors:e})=>({isLoading:[()=>[e.status],e=>e===$.a.LOADING]})}),da=()=>{const{convertConnector:e,hideModal:t}=Object(r.useActions)(ua),{isLoading:n}=Object(r.useValues)(ua);return Object(y.jsx)(S.EuiConfirmModal,{onCancel:()=>t(),onConfirm:()=>e(),title:N.i18n.translate("xpack.enterpriseSearch.searchApplications.searchApplication.indices.convertInfexConfirm.title",{defaultMessage:"Sure you want to convert your connector?"}),buttonColor:"danger",cancelButtonText:zt.e,confirmButtonText:N.i18n.translate("xpack.enterpriseSearch.searchApplications.searchApplication.indices.convertIndexConfirm.text",{defaultMessage:"Yes"}),isLoading:n,defaultFocusedButton:"confirm",maxWidth:!0},Object(y.jsx)(S.EuiText,null,Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.searchApplications.searchApplication.indices.convertIndexConfirm.description",{defaultMessage:"Once you convert a native connector to a self-managed connector client this can't be undone."}))))},pa=()=>{const{showModal:e}=Object(r.useActions)(ua),{isModalVisible:t}=Object(r.useValues)(ua);return Object(y.jsx)(i.a.Fragment,null,t&&Object(y.jsx)(da,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"row",alignItems:"center",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"wrench"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xxs"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.title",{defaultMessage:"Self-manage this connector"}))))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.description",defaultMessage:"Want to self-host this native connector? Convert it to a {link}, to be self-managed on your own infrastructure. You'll need to convert this connector if you want to customize the code using our Python framework.",values:{link:Object(y.jsx)(S.EuiLink,{href:k.a.buildConnector,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.linkTitle",{defaultMessage:"connector client"}))}}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiButton,{onClick:()=>e()},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.buttonTitle",{defaultMessage:"Convert connector"}))))},ga=()=>{const{indexName:e}=Object(r.useValues)(un);return Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.description",defaultMessage:"Finalize your connector by triggering a one time sync, or setting a recurring sync schedule."}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(A.b,{"data-test-subj":"entSearchContent-connector-configuration-setScheduleAndSync","data-telemetry-id":"entSearchContent-connector-configuration-setScheduleAndSync",to:`${Object(je.a)(C.n,{indexName:e,tabId:id.SCHEDULING})}`},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.schedulingButtonLabel",{defaultMessage:"Set schedule and sync"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(An,null)))))},ja=({nativeConnector:e,status:t})=>Object(y.jsx)(aa,null,Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.config.encryptionWarningMessage",{defaultMessage:"Encryption for data source credentials is unavailable in this version. Your data source credentials will be stored, unencrypted, in Elasticsearch."})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"row"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{href:k.a.elasticsearchSecureCluster,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.config.securityDocumentationLinkLabel",{defaultMessage:"Learn more about Elasticsearch security"}))),e.externalAuthDocsUrl&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{href:e.externalAuthDocsUrl,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.config.sourceSecurityDocumentationLinkLabel",{defaultMessage:"{name} authentication",values:{name:e.name}})))),t===ne.a.CONNECTED&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiCallOut,{iconType:"check",color:"success",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.connectorConnected",{defaultMessage:"Your connector {name} has connected to Search successfully.",values:{name:e.name}})}))),xa=({nativeConnector:e})=>{const{docsUrl:t,externalDocsUrl:n,name:a}=e;return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.researchConfiguration.description",{defaultMessage:"This connector supports several authentication methods. Ask your administrator for the correct connection credentials."})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"row",alignItems:"flexStart"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{target:"_blank",href:t},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.researchConfiguration.connectorDocumentationLinkLabel",{defaultMessage:"Documentation"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{target:"_blank",href:n},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.researchConfiguration.serviceDocumentationLinkLabel",{defaultMessage:"{name} documentation",values:{name:a}})))))},Ma=()=>{var e,t;const{index:n}=Object(r.useValues)(fn);if(!Object(G.h)(n))return Object(y.jsx)(i.a.Fragment,null);const a=vt.find((e=>e.serviceType===n.connector.service_type))||{docsUrl:"",externalAuthDocsUrl:"",externalDocsUrl:"",icon:Dt.custom,iconPath:"custom.svg",isBeta:!0,isNative:!0,keywords:[],name:n.connector.name,serviceType:null!==(e=n.connector.service_type)&&void 0!==e?e:""},s=!!n.connector.description,l=(o=n.connector.configuration,!Object.entries(o).find((([,e])=>"category"!==e.type&&e.required&&(void 0===e.value||null===e.value))));var o;const c=n.connector.last_synced||n.connector.scheduling.full.enabled||n.connector.scheduling.incremental.enabled,u=s||l||c,d=a.icon,p=!n.connector.service_type||Boolean(Ct.find((({serviceType:e})=>e===n.connector.service_type)));return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:2},Object(y.jsx)(S.EuiPanel,{hasShadow:!1,hasBorder:!0},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"m",direction:"row",alignItems:"center"},d&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{size:"xl",type:d})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h3",null,null!==(t=null==a?void 0:a.name)&&void 0!==t?t:n.connector.name)))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiSteps,{steps:[{children:Object(y.jsx)(xa,{nativeConnector:a}),status:u?"complete":"incomplete",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.researchConfigurationTitle",{defaultMessage:"Research configuration requirements"}),titleSize:"xs"},{children:Object(y.jsx)(oa,null),status:s?"complete":"incomplete",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.nameAndDescriptionTitle",{defaultMessage:"Name and description"}),titleSize:"xs"},{children:Object(y.jsx)(ja,{nativeConnector:a,status:n.connector.status}),status:l?"complete":"incomplete",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.configurationTitle",{defaultMessage:"Configuration"}),titleSize:"xs"},{children:Object(y.jsx)(ga,null),status:c?"complete":"incomplete",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.steps.advancedConfigurationTitle",{defaultMessage:"Advanced configuration"}),titleSize:"xs"}]}))),Object(y.jsx)(S.EuiFlexItem,{grow:1},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiPanel,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(S.EuiFlexGroup,{direction:"row",alignItems:"center",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"clock"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xxs"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.schedulingReminder.title",{defaultMessage:"Configurable sync schedule"}))))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.schedulingReminder.description",{defaultMessage:"Remember to set a sync schedule in the Scheduling tab to continually refresh your searchable data."})))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiPanel,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(S.EuiFlexGroup,{direction:"row",alignItems:"center",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"globe"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xxs"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.securityReminder.title",{defaultMessage:"Document level security"}))))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.securityReminder.description",{defaultMessage:"Restrict and personalize the read access users have to the index documents at query time."}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiLink,{href:k.a.documentLevelSecurity,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.securityReminder.securityLinkLabel",{defaultMessage:"Document level security"}))))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiPanel,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(pa,null))),p?Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiPanel,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(Lt,null))):null))))},ha=()=>{var e,t;const{data:n}=Object(r.useValues)(_n),{index:a,recheckIndexLoading:s}=Object(r.useValues)(fn),{indexName:l}=Object(r.useValues)(un),{recheckIndex:o}=Object(r.useActions)(fn),c=Object(zn.a)();if(!Object(G.h)(a))return Object(y.jsx)(i.a.Fragment,null);if(a.connector.is_native&&a.connector.service_type)return Object(y.jsx)(Ma,null);const u=!!(null!==(e=a.connector.api_key_id)&&void 0!==e?e:n),d=null===(t=wt.find((({serviceType:e})=>e===a.connector.service_type)))||void 0===t?void 0:t.docsUrl,p=!a.connector.service_type||Boolean(Ct.find((({serviceType:e})=>e===a.connector.service_type)));return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:2},Object(y.jsx)(S.EuiPanel,{hasShadow:!1,hasBorder:!0},Object(y.jsx)(S.EuiSteps,{steps:[{children:Object(y.jsx)(Un,{indexName:l,hasApiKey:!!a.connector.api_key_id}),status:u?"complete":"incomplete",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.steps.generateApiKey.title",{defaultMessage:"Generate an API key"}),titleSize:"xs"},{children:Object(y.jsx)(oa,null),status:a.connector.description?"complete":"incomplete",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.steps.nameAndDescriptionTitle",{defaultMessage:"Name and description"}),titleSize:"xs"},{children:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.description.secondParagraph",defaultMessage:"The connectors repository contains several {link}. Use our framework to accelerate developing connectors for custom data sources.",values:{link:Object(y.jsx)(S.EuiLink,{href:"https://github.com/elastic/connectors-python/tree/main/connectors",target:"_blank",external:!0},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.clientExamplesLink",{defaultMessage:"connector client examples"}))}})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.description.thirdParagraph",defaultMessage:"In this step, you will need to clone or fork the repository, and copy the generated API key and connector ID to the associated {link}. The connector ID will identify this connector to Search. The service type will determine which type of data source the connector is configured for.",values:{link:Object(y.jsx)(S.EuiLink,{href:"https://github.com/elastic/connectors-python/blob/main/config.yml",target:"_blank",external:!0},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.configurationFileLink",{defaultMessage:"configuration file"}))}})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiCodeBlock,{fontSize:"m",paddingSize:"m",color:"dark",isCopyable:!0},kt({apiKeyData:n,connectorData:{id:a.connector.id,service_type:a.connector.service_type},host:c.elasticsearchUrl})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.connectorDeployedText",{defaultMessage:"Once configured, deploy the connector on your infrastructure."}))),status:a.connector.status&&a.connector.status!==ne.a.CREATED?"complete":"incomplete",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.steps.deployConnector.title",{defaultMessage:"Deploy connector"}),titleSize:"xs"},{children:Object(y.jsx)(aa,null,a.connector.status&&a.connector.status!==ne.a.CREATED?Object(y.jsx)(S.EuiCallOut,{iconType:"check",color:"success",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.connectorConnected",{defaultMessage:"Your connector {name} has connected to Search successfully.",values:{name:a.connector.name}})}):Object(y.jsx)(S.EuiCallOut,{title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.waitingForConnectorTitle",{defaultMessage:"Waiting for your connector"}),iconType:"iInCircle"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.waitingForConnectorText",{defaultMessage:"Your connector has not connected to Search. Troubleshoot your configuration and refresh the page."}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-configuration-recheckNow",iconType:"refresh",onClick:()=>o(),isLoading:s},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.connectorPackage.waitingForConnector.button.label",{defaultMessage:"Recheck now"})))),status:a.connector.status===ne.a.CONNECTED?"complete":"incomplete",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.steps.enhance.title",{defaultMessage:"Enhance your connector client"}),titleSize:"xs"},{children:Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.scheduleSync.description",{defaultMessage:"Finalize your connector by triggering a one-time sync, or setting a recurring sync to keep your data source in sync over time"}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(A.b,{"data-test-subj":"entSearchContent-connector-configuration-setScheduleAndSync","data-telemetry-id":"entSearchContent-connector-configuration-setScheduleAndSync",to:`${Object(je.a)(C.n,{indexName:l,tabId:id.SCHEDULING})}`},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.steps.schedule.button.label",{defaultMessage:"Set schedule and sync"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(An,null))))),status:a.connector.scheduling.full.enabled?"complete":"incomplete",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.steps.schedule.title",{defaultMessage:"Advanced configuration"}),titleSize:"xs"}]}))),Object(y.jsx)(S.EuiFlexItem,{grow:1},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiPanel,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,null,Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.support.title",{defaultMessage:"Support and documentation"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.support.description",{defaultMessage:"You need to deploy this connector on your own infrastructure."}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{href:k.a.connectors,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.support.viewDocumentation.label",{defaultMessage:"View documentation"}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(A.d,{to:"/app/management/security/api_keys",shouldNotCreateHref:!0},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.support.manageKeys.label",{defaultMessage:"Manage API keys"}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{href:"https://github.com/elastic/connectors-python/blob/main/README.md",target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.support.readme.label",{defaultMessage:"Connector readme"}))),d&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{href:d,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.support.dockerDeploy.label",{defaultMessage:"Deploy with Docker"}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{href:"https://github.com/elastic/connectors-python/blob/main/docs/CONFIG.md#run-the-connector-service-for-a-custom-connector",target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.support.deploy.label",{defaultMessage:"Deploy without Docker"})))))),p?Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Lt,null)):null))))};var ma=n(93);const fa=Object(V.a)(["content","update_connector_scheduling_api_logic"],(async({connectorId:e,scheduling:t})=>{const n=`/internal/enterprise_search/connectors/${e}/scheduling`;return await d.a.values.http.post(n,{body:JSON.stringify(t)}),t}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.scheduling.successToast.title",{defaultMessage:"Scheduling successfully updated"})}),ba=Object(r.kea)({actions:{clearHasChanges:e=>({type:e}),setHasChanges:e=>({type:e}),updateScheduling:(e,t)=>({payload:t,type:e})},connect:{actions:[fa,["apiSuccess","makeRequest"]]},listeners:({actions:e,values:t})=>({apiSuccess:()=>{t.makeRequestType&&e.clearHasChanges(t.makeRequestType)},updateScheduling:({payload:t})=>{e.makeRequest(t)}}),reducers:{hasAccessSyncChanges:[!1,{clearHasChanges:(e,{type:t})=>t!==ne.h.ACCESS_CONTROL&&e,setHasChanges:(e,{type:t})=>t===ne.h.ACCESS_CONTROL||e}],hasFullSyncChanges:[!1,{clearHasChanges:(e,{type:t})=>t!==ne.h.FULL&&e,setHasChanges:(e,{type:t})=>t===ne.h.FULL||e}],hasIncrementalSyncChanges:[!1,{clearHasChanges:(e,{type:t})=>t!==ne.h.INCREMENTAL&&e,setHasChanges:(e,{type:t})=>t===ne.h.INCREMENTAL||e}],makeRequestType:[null,{updateScheduling:(e,{type:t})=>t}]},selectors:({selectors:e})=>({hasChanges:[()=>[e.hasFullSyncChanges,e.hasAccessSyncChanges,e.hasIncrementalSyncChanges],(e,t,n)=>e||t||n]})});var ya=n(0),Oa=n.n(ya);function Ia(e){const t={second:void 0,minute:void 0,hour:void 0,day:void 0,date:void 0,month:void 0},n=e.split(" ");return n.length>=1&&(t.second=n[0]),n.length>=2&&(t.minute=n[1]),n.length>=3&&(t.hour=n[2]),n.length>=4&&(t.date=n[3]),n.length>=5&&(t.month=n[4]),n.length>=6&&(t.day=n[5]),t}function Sa({second:e,minute:t,hour:n,day:a,date:i,month:s}){return`${e} ${t} ${n} ${i} ${s} ${a}`}const Na={0:N.i18n.translate("xpack.enterpriseSearch.cronEditor.day.sunday",{defaultMessage:"Sunday"}),1:N.i18n.translate("xpack.enterpriseSearch.cronEditor.day.monday",{defaultMessage:"Monday"}),2:N.i18n.translate("xpack.enterpriseSearch.cronEditor.day.tuesday",{defaultMessage:"Tuesday"}),3:N.i18n.translate("xpack.enterpriseSearch.cronEditor.day.wednesday",{defaultMessage:"Wednesday"}),4:N.i18n.translate("xpack.enterpriseSearch.cronEditor.day.thursday",{defaultMessage:"Thursday"}),5:N.i18n.translate("xpack.enterpriseSearch.cronEditor.day.friday",{defaultMessage:"Friday"}),6:N.i18n.translate("xpack.enterpriseSearch.cronEditor.day.saturday",{defaultMessage:"Saturday"})},Ea={0:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.january",{defaultMessage:"January"}),1:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.february",{defaultMessage:"February"}),2:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.march",{defaultMessage:"March"}),3:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.april",{defaultMessage:"April"}),4:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.may",{defaultMessage:"May"}),5:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.june",{defaultMessage:"June"}),6:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.july",{defaultMessage:"July"}),7:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.august",{defaultMessage:"August"}),8:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.september",{defaultMessage:"September"}),9:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.october",{defaultMessage:"October"}),10:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.november",{defaultMessage:"November"}),11:N.i18n.translate("xpack.enterpriseSearch.cronEditor.month.december",{defaultMessage:"December"})};function Da(e){const t=e&&e.toString(),n=t&&t.substr(-1);let a;if(!n)return e.toString();switch(parseFloat(n)){case 1:a="st";break;case 2:a="nd";break;case 3:a="rd";break;default:a="th"}return`${t}${a}`}function Ta(e,t){const n=[];for(let a=e;a<=t;a++)n.push(a);return n}const wa=[{text:"5",value:"0,5,10,15,20,25,30,35,40,45,50,55"},{text:"10",value:"0,10,20,30,40,50"},{text:"15",value:"0,15,30,45"},{text:"30",value:"0,30"}],va=Ta(0,59).map((e=>({value:e.toString(),text:Object(on.padStart)(e.toString(),2,"0")}))),Ca=Ta(0,23).map((e=>({value:e.toString(),text:Object(on.padStart)(e.toString(),2,"0")}))),ka=Ta(1,7).map((e=>{return{value:e.toString(),text:(t=e-1,Na[t])};var t})),Aa=Ta(1,31).map((e=>({value:e.toString(),text:Da(e)}))),La=Ta(1,12).map((e=>{return{value:e.toString(),text:(t=e-1,Ea[t])};var t})),za=[{value:"MINUTE",text:"minute"},{value:"HOUR",text:"hour"},{value:"DAY",text:"day"},{value:"WEEK",text:"week"},{value:"MONTH",text:"month"},{value:"YEAR",text:"year"}],_a={MINUTE:{minute:!0},HOUR:{minute:!0},DAY:{hour:!0,minute:!0},WEEK:{day:!0,hour:!0,minute:!0},MONTH:{date:!0,hour:!0,minute:!0},YEAR:{month:!0,date:!0,hour:!0,minute:!0}},Ra={MINUTE:{second:"0",minute:"0,5,10,15,20,25,30,35,40,45,50,55",hour:"*",date:"*",month:"*",day:"?"},HOUR:{second:"0",minute:"0",hour:"*",date:"*",month:"*",day:"?"},DAY:{second:"0",minute:"0",hour:"0",date:"*",month:"*",day:"?"},WEEK:{second:"0",minute:"0",hour:"0",date:"?",month:"*",day:"7"},MONTH:{second:"0",minute:"0",hour:"0",date:"1",month:"*",day:"?"},YEAR:{second:"0",minute:"0",hour:"0",date:"1",month:"1",day:"?"}},Fa=({disabled:e,minute:t,minuteOptions:n,hour:i,hourOptions:s,onChange:r})=>Object(y.jsx)(a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronDaily.fieldTimeLabel",defaultMessage:"Time"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiSelect,{disabled:e,options:s,value:i,"aria-label":N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronDaily.hourSelectLabel",{defaultMessage:"Hour"}),onChange:e=>r({hour:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronDaily.fieldHour.textAtLabel",{defaultMessage:"At"}),"data-test-subj":"cronFrequencyDailyHourSelect"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiSelect,{disabled:e,options:n,value:t,"aria-label":N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronDaily.minuteSelectLabel",{defaultMessage:"Minute"}),onChange:e=>r({minute:e.target.value}),fullWidth:!0,prepend:":","data-test-subj":"cronFrequencyDailyMinuteSelect"}))))),Ua=({disabled:e,minute:t,minuteOptions:n,onChange:i})=>Object(y.jsx)(a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronHourly.fieldTimeLabel",defaultMessage:"Minute"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiSelect,{disabled:e,options:n,value:t,onChange:e=>i({minute:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronHourly.fieldMinute.textAtLabel",{defaultMessage:"At"}),"data-test-subj":"cronFrequencyHourlyMinuteSelect"}))),Pa=({disabled:e,minute:t,minuteOptions:n,onChange:i})=>Object(y.jsx)(a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronMinutely.fieldTimeLabel",defaultMessage:"Minute"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiSelect,{disabled:e,options:n,value:t,onChange:e=>i({minute:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronMinutely.fieldMinute.textAtLabel",{defaultMessage:"Every"}),append:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronMinutely.fieldMinute.textAppendLabel",{defaultMessage:"minutes"}),"data-test-subj":"cronFrequencyMinutelyMinuteSelect"}))),Qa=({disabled:e,minute:t,minuteOptions:n,hour:i,hourOptions:s,date:r,dateOptions:l,onChange:o})=>Object(y.jsx)(a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronMonthly.fieldDateLabel",defaultMessage:"Date"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiSelect,{disabled:e,options:l,value:r,onChange:e=>o({date:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronMonthly.textOnTheLabel",{defaultMessage:"On the"}),"data-test-subj":"cronFrequencyMonthlyDateSelect"})),Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronMonthly.fieldTimeLabel",defaultMessage:"Time"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiSelect,{disabled:e,options:s,value:i,"aria-label":N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronMonthly.hourSelectLabel",{defaultMessage:"Hour"}),onChange:e=>o({hour:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronMonthly.fieldHour.textAtLabel",{defaultMessage:"At"}),"data-test-subj":"cronFrequencyMonthlyHourSelect"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiSelect,{disabled:e,options:n,value:t,"aria-label":N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronMonthly.minuteSelectLabel",{defaultMessage:"Minute"}),onChange:e=>o({minute:e.target.value}),fullWidth:!0,prepend:":","data-test-subj":"cronFrequencyMonthlyMinuteSelect"}))))),Ya=({disabled:e,minute:t,minuteOptions:n,hour:i,hourOptions:s,day:r,dayOptions:l,onChange:o})=>Object(y.jsx)(a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronWeekly.fieldDateLabel",defaultMessage:"Day"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiSelect,{disabled:e,options:l,value:r,onChange:e=>o({day:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronWeekly.textOnLabel",{defaultMessage:"On"}),"data-test-subj":"cronFrequencyWeeklyDaySelect"})),Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronWeekly.fieldTimeLabel",defaultMessage:"Time"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiSelect,{disabled:e,options:s,value:i,"aria-label":N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronWeekly.hourSelectLabel",{defaultMessage:"Hour"}),onChange:e=>o({hour:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronWeekly.fieldHour.textAtLabel",{defaultMessage:"At"}),"data-test-subj":"cronFrequencyWeeklyHourSelect"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiSelect,{disabled:e,options:n,value:t,onChange:e=>o({minute:e.target.value}),"aria-label":N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronWeekly.minuteSelectLabel",{defaultMessage:"Minute"}),fullWidth:!0,prepend:":","data-test-subj":"cronFrequencyWeeklyMinuteSelect"}))))),Ba=({disabled:e,minute:t,minuteOptions:n,hour:i,hourOptions:s,date:r,dateOptions:l,month:o,monthOptions:c,onChange:u})=>Object(y.jsx)(a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronYearly.fieldMonthLabel",defaultMessage:"Month"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiSelect,{disabled:e,options:c,value:o,onChange:e=>u({month:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronYearly.fieldMonth.textInLabel",{defaultMessage:"In"}),"data-test-subj":"cronFrequencyYearlyMonthSelect"})),Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronYearly.fieldDateLabel",defaultMessage:"Date"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiSelect,{disabled:e,options:l,value:r,onChange:e=>u({date:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronYearly.fieldDate.textOnTheLabel",{defaultMessage:"On the"}),"data-test-subj":"cronFrequencyYearlyDateSelect"})),Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.cronYearly.fieldTimeLabel",defaultMessage:"Time"}),fullWidth:!0,"data-test-subj":"cronFrequencyConfiguration"},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiSelect,{disabled:e,options:s,value:i,"aria-label":N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronYearly.hourSelectLabel",{defaultMessage:"Hour"}),onChange:e=>u({hour:e.target.value}),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronYearly.fieldHour.textAtLabel",{defaultMessage:"At"}),"data-test-subj":"cronFrequencyYearlyHourSelect"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiSelect,{disabled:e,options:n,value:t,"aria-label":N.i18n.translate("xpack.enterpriseSearch.cronEditor.cronYearly.minuteSelectLabel",{defaultMessage:"Minute"}),onChange:e=>u({minute:e.target.value}),fullWidth:!0,prepend:":","data-test-subj":"cronFrequencyYearlyMinuteSelect"}))))),Ga=(e,t=[])=>0===t.length?e:e.filter((({value:e})=>!t.includes(e)));class cron_editor_CronEditor extends a.Component{static getDerivedStateFromProps(e){const{cronExpression:t}=e;return Ia(t)}constructor(e){super(e),Oa()(this,"onChangeFrequency",(e=>{const{onChange:t,fieldToPreferredValueMap:n}=this.props;t({frequency:e,cronExpression:Sa(Object.keys(_a[e]).reduce(((e,t)=>(null!=n[t]&&(e[t]=n[t]),e)),{...Ra[e]})),fieldToPreferredValueMap:n})})),Oa()(this,"onChangeFields",(e=>{const{onChange:t,frequency:n,fieldToPreferredValueMap:a}=this.props,i=Object.keys(_a[n]),s={};t({frequency:n,cronExpression:Sa(i.reduce(((t,n)=>(void 0!==e[n]?(t[n]=e[n],s[n]=e[n]):t[n]=this.state[n],t)),{...Ra[n]})),fieldToPreferredValueMap:{...a,...s}})}));const{cronExpression:t}=e,n=Ia(t);this.state={...n}}renderForm(){const{frequency:e,disabled:t}=this.props,{minute:n,hour:a,day:i,date:s,month:r}=this.state;switch(e){case"MINUTE":return Object(y.jsx)(Pa,{disabled:t,minute:n,minuteOptions:wa,onChange:this.onChangeFields});case"HOUR":return Object(y.jsx)(Ua,{disabled:t,minute:n,minuteOptions:va,onChange:this.onChangeFields});case"DAY":return Object(y.jsx)(Fa,{disabled:t,minute:n,minuteOptions:va,hour:a,hourOptions:Ca,onChange:this.onChangeFields});case"WEEK":return Object(y.jsx)(Ya,{disabled:t,minute:n,minuteOptions:va,hour:a,hourOptions:Ca,day:i,dayOptions:ka,onChange:this.onChangeFields});case"MONTH":return Object(y.jsx)(Qa,{disabled:t,minute:n,minuteOptions:va,hour:a,hourOptions:Ca,date:s,dateOptions:Aa,onChange:this.onChangeFields});case"YEAR":return Object(y.jsx)(Ba,{disabled:t,minute:n,minuteOptions:va,hour:a,hourOptions:Ca,date:s,dateOptions:Aa,month:r,monthOptions:La,onChange:this.onChangeFields});default:return}}render(){const{disabled:e,frequency:t,frequencyBlockList:n}=this.props;return Object(y.jsx)(a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.cronEditor.fieldFrequencyLabel",defaultMessage:"Frequency"}),fullWidth:!0},Object(y.jsx)(S.EuiSelect,{disabled:e,autoFocus:this.props.autoFocus,options:Ga(za,n),value:t,onChange:e=>this.onChangeFrequency(e.target.value),fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.cronEditor.textEveryLabel",{defaultMessage:"Every"}),"data-test-subj":"cronFrequencySelect"})),this.renderForm())}}const $a=({disabled:e=!1,frequencyBlockList:t=["MINUTE"],scheduling:n,onSave:i,onReset:s,type:l})=>{var o;const{status:c}=Object(r.useValues)(fa),{hasFullSyncChanges:u,hasAccessSyncChanges:d,hasIncrementalSyncChanges:p}=Object(r.useValues)(ba),{clearHasChanges:g,setHasChanges:j}=Object(r.useActions)(ba),[x,M]=Object(a.useState)(n.interval),[h,m]=Object(a.useState)({}),[f,b]=Object(a.useState)({expression:null!==(o=n.interval)&&void 0!==o?o:"",frequency:n.interval?Va(n.interval):"HOUR"}),O=l===ne.h.FULL?u:l===ne.h.INCREMENTAL?p:d;return Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(cron_editor_CronEditor,{"data-telemetry-id":"entSearchContent-connector-scheduling-editSchedule",disabled:!n.enabled||e,fieldToPreferredValueMap:h,cronExpression:f.expression,frequency:f.frequency,onChange:({cronExpression:e,frequency:t,fieldToPreferredValueMap:n})=>{b({expression:e,frequency:t}),m(n),M(e),j(l)},frequencyBlockList:t})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-connector-scheduling-resetSchedule",disabled:!O||c===$.a.LOADING||e,onClick:()=>{var e;M(n.interval),b({expression:null!==(e=n.interval)&&void 0!==e?e:"",frequency:n.interval?Va(n.interval):"HOUR"}),g(l),s&&s()}},N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.resetButton.label",{defaultMessage:"Reset"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-scheduling-saveSchedule",disabled:!O||c===$.a.LOADING||e,onClick:()=>i&&i(x)},N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.saveButton.label",{defaultMessage:"Save"}))))))};function Va(e){const t=e.split(" ");return t.length<4?"YEAR":"*"===t[1]||t[1].includes(",")?"MINUTE":"*"===t[2]?"HOUR":"*"===t[3]?"DAY":"?"===t[3]?"WEEK":"*"===t[4]?"MONTH":"YEAR"}const qa=e=>{switch(e){case ne.h.FULL:return N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.accordion.fullSync.title",{defaultMessage:"Full content sync"});case ne.h.INCREMENTAL:return N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.accordion.incrementalSync.title",{defaultMessage:"Incremental content sync"});case ne.h.ACCESS_CONTROL:return N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.accordion.accessControlSync.title",{defaultMessage:"Access Control Sync"})}},Wa=e=>{switch(e){case ne.h.FULL:return N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.accordion.fullSync.description",{defaultMessage:"Synchronize all data from your data source."});case ne.h.INCREMENTAL:return N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.accordion.incrementalSync.description",{defaultMessage:"A lightweight sync job that only fetches updated content from your data source."});case ne.h.ACCESS_CONTROL:return N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.accordion.accessControlSync.description",{defaultMessage:"Schedule access control syncs to keep permissions mappings up to date."})}},Za=({disabled:e,checked:t,onChange:n})=>Object(y.jsx)(S.EuiSwitch,{disabled:e,checked:t,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.switch.label",{defaultMessage:"Enabled"}),onChange:n}),Ha=({type:e,index:t,hasPlatinumLicense:n=!1})=>{var s;const{setHasChanges:l,updateScheduling:o}=Object(r.useActions)(ba),c=t.connector.scheduling,[u,d]=Object(a.useState)(c),[p,g]=Object(a.useState)(u[e].enabled?"open":"closed"),[j,x]=Object(a.useState)(!1),M=!n&&e===ne.h.ACCESS_CONTROL,h=!(null!==(s=t.connector.configuration.use_document_level_security)&&void 0!==s&&s.value),m=e===ne.h.ACCESS_CONTROL&&(!n||h);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiPanel,{hasShadow:!1,hasBorder:!0},Object(y.jsx)(S.EuiAccordion,{paddingSize:"m",id:`${e}-content-sync-schedule`,buttonContent:Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,qa(e)))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,Wa(e))))),forceState:p,onToggle:e=>{g(e?"open":"closed")},extraAction:M?Object(y.jsx)(S.EuiFlexGroup,{responsive:!1,gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Yn,{isPopoverOpen:j,closePopover:()=>x(!j),button:Object(y.jsx)(S.EuiButtonIcon,{"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.newIndex.selectConnector.openPopoverLabel",{defaultMessage:"Open licensing popover"}),iconType:"questionInCircle",onClick:()=>x(!j)})})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Za,{disabled:m,checked:u[e].enabled,onChange:t=>{t.target.checked&&g("open"),d({...u,[e]:{enabled:t.target.checked,interval:u[e].interval}}),l(e)}}))):Object(y.jsx)(Za,{disabled:m,checked:u[e].enabled,onChange:t=>{t.target.checked&&g("open"),d({...u,[e]:{enabled:t.target.checked,interval:u[e].interval}}),l(e)}})},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)($a,{disabled:M,frequencyBlockList:e===ne.h.ACCESS_CONTROL?[]:void 0,scheduling:u[e],type:e,onReset:()=>{d({...c})},onSave:n=>{o(e,{connectorId:t.connector.id,scheduling:{...t.connector.scheduling,[e]:{...u[e],interval:n}}})}}))))))},Ja=({title:e,description:t,children:n})=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSplitPanel.Outer,null,Object(y.jsx)(S.EuiSplitPanel.Inner,{color:"subdued"},Object(y.jsx)(S.EuiTitle,null,Object(y.jsx)("h2",null,e))),Object(y.jsx)(S.EuiSplitPanel.Inner,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s"},t)),Object(y.jsx)(S.EuiSpacer,{size:"m"}),n))),Xa=()=>{var e;const{productFeatures:t}=Object(r.useValues)(p.a),{ingestionStatus:n,hasDocumentLevelSecurityFeature:a,hasIncrementalSyncFeature:s}=Object(r.useValues)(fn),{index:l}=Object(r.useValues)(fn),{hasChanges:o}=Object(r.useValues)(ba),{hasPlatinumLicense:c}=Object(r.useValues)(Qn.a),u=s&&t.hasIncrementalSyncEnabled,d=a&&t.hasDocumentLevelSecurityEnabled;if(!G.h(l))return Object(y.jsx)(i.a.Fragment,null);const g=!(null!==(e=l.connector.configuration.use_document_level_security)&&void 0!==e&&e.value);return l.connector.status===ne.a.CREATED||l.connector.status===ne.a.NEEDS_CONFIGURATION?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiCallOut,{iconType:"iInCircle",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.notConnected.title",{defaultMessage:"Configure your connector to schedule a sync"})},Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.notConnected.description",{defaultMessage:"Configure and deploy your connector, then return here to set your sync schedule. This schedule will dictate the interval that the connector will sync with your data source for updated documents."})),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(A.b,{"data-telemetry-id":"entSearchContent-connector-scheduling-configure",to:Object(je.a)(C.n,{indexName:l.name,tabId:id.CONFIGURATION}),fill:!0,size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.notConnected.button.label",{defaultMessage:"Configure"})))):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(ma.a,{hasUnsavedChanges:o,messageText:N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.unsaved.title",{defaultMessage:"You have not saved your changes, are you sure you want to leave?"})}),Object(y.jsx)(S.EuiSpacer,{size:"l"}),n===J.b.ERROR?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiCallOut,{color:"warning",iconType:"warning",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.error.title",{defaultMessage:"Review your connector configuration for reported errors."})}),Object(y.jsx)(S.EuiSpacer,{size:"l"})):Object(y.jsx)(i.a.Fragment,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.connectorScheduling.page.description",defaultMessage:"Your connector is now deployed. Schedule recurring content and access control syncs here. If you want to run a quick test, launch a one-time sync using the {sync} button.",values:{sync:Object(y.jsx)("b",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.page.sync.label",{defaultMessage:"Sync"}))}}))),Object(y.jsx)(S.EuiSpacer,{size:"l"}),Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ja,{title:N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.schedulePanel.contentSync.title",{defaultMessage:"Content sync"}),description:N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.schedulePanel.contentSync.description",{defaultMessage:"Fetch content to create or update your Elasticsearch documents."})},Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"m"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ha,{type:ne.h.FULL,index:l})),u&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ha,{type:ne.h.INCREMENTAL,index:l}))))),d&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ja,{title:N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.schedulePanel.documentLevelSecurity.title",{defaultMessage:"Document Level Security"}),description:N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.schedulePanel.documentLevelSecurity.description",{defaultMessage:"Control the documents users can access, based on their permissions and roles. Schedule syncs to keep these access controls up to date."})},Object(y.jsx)(Ha,{type:ne.h.ACCESS_CONTROL,index:l,hasPlatinumLicense:c}))),g&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCallOut,{title:N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.schedulePanel.documentLevelSecurity.dlsDisabledCallout.title",{defaultMessage:"Access control syncs not allowed"}),color:"warning",iconType:"iInCircle"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.connectorScheduling.schedulePanel.documentLevelSecurity.dlsDisabledCallout.text",defaultMessage:"{link} for this connector to activate these options.",values:{link:Object(y.jsx)(A.d,{to:Object(je.a)(C.n,{indexName:l.name,tabId:id.CONFIGURATION})},N.i18n.translate("xpack.enterpriseSearch.content.indices.connectorScheduling.schedulePanel.documentLevelSecurity.dlsDisabledCallout.link",{defaultMessage:"Enable document level security"}))}}))))))))},Ka=()=>Object(y.jsx)(S.EuiBadge,{iconType:"beaker"},zt.d),ei={[ne.f.CONTAINS]:N.i18n.translate("xpack.enterpriseSearch.content.filteringRules.rules.contains",{defaultMessage:"Contains"}),[ne.f.ENDS_WITH]:N.i18n.translate("xpack.enterpriseSearch.content.filteringRules.rules.endsWith",{defaultMessage:"Ends with"}),[ne.f.EQUALS]:N.i18n.translate("xpack.enterpriseSearch.content.filteringRules.rules.equals",{defaultMessage:"Equals"}),[ne.f.GT]:N.i18n.translate("xpack.enterpriseSearch.content.filteringRules.rules.greaterThan",{defaultMessage:"Greater than"}),[ne.f.LT]:N.i18n.translate("xpack.enterpriseSearch.content.filteringRules.rules.lessThan",{defaultMessage:"Less than"}),[ne.f.REGEX]:N.i18n.translate("xpack.enterpriseSearch.content.filteringRules.rules.regEx",{defaultMessage:"Regular expression"}),[ne.f.STARTS_WITH]:N.i18n.translate("xpack.enterpriseSearch.content.filteringRules.rules.startsWith",{defaultMessage:"Starts with"})};function ti(e){return ei[e]}const ni={[ne.e.EXCLUDE]:N.i18n.translate("xpack.enterpriseSearch.content.filteringRules.policy.exclude",{defaultMessage:"Exclude"}),[ne.e.INCLUDE]:N.i18n.translate("xpack.enterpriseSearch.content.filteringRules.policy.include",{defaultMessage:"Include"})};function ai(e){return ni[e]}const ii=({showOrder:e,filteringRules:t})=>{const n=[...e?[{field:"order",name:N.i18n.translate("xpack.enterpriseSearch.content.index.filtering.priority",{defaultMessage:"Rule priority"})}]:[],{field:"policy",name:N.i18n.translate("xpack.enterpriseSearch.content.index.filtering.policy",{defaultMessage:"Policy"}),render:e=>ai(e)},{field:"field",name:N.i18n.translate("xpack.enterpriseSearch.content.index.filtering.field",{defaultMessage:"field"}),render:e=>Object(y.jsx)(S.EuiCode,null,e)},{field:"rule",name:N.i18n.translate("xpack.enterpriseSearch.content.index.filtering.rule",{defaultMessage:"Rule"}),render:e=>ti(e)},{field:"value",name:N.i18n.translate("xpack.enterpriseSearch.content.index.filtering.value",{defaultMessage:"Value"}),render:e=>Object(y.jsx)(S.EuiCode,null,e)}];return Object(y.jsx)(S.EuiBasicTable,{columns:n,items:t.sort((({order:e},{order:t})=>e-t))})},si=Object(V.a)(["content","connector_filtering_api_logic"],(async({advancedSnippet:e,connectorId:t,filteringRules:n})=>{const a=`/internal/enterprise_search/connectors/${t}/filtering`;return await d.a.values.http.put(a,{body:JSON.stringify({advanced_snippet:e,filtering_rules:n})})}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.index.connector.filtering.successToastRules.title",{defaultMessage:"Sync rules updated"})}),ri=Object(V.a)(["content","connector_filtering_draft_api_logic"],(async({advancedSnippet:e,connectorId:t,filteringRules:n})=>{const a=`/internal/enterprise_search/connectors/${t}/filtering/draft`;return await d.a.values.http.put(a,{body:JSON.stringify({advanced_snippet:e,filtering_rules:n})})}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.successToastDraft.title",{defaultMessage:"Draft rules saved"})});function li(e){const t=(new Date).toISOString();return{created_at:t,field:"_",id:"DEFAULT",order:e,policy:ne.e.INCLUDE,rule:ne.f.REGEX,updated_at:t,value:".*"}}const oi=Object(r.kea)({actions:{addFilteringRule:e=>e,applyDraft:!0,deleteFilteringRule:e=>e,reorderFilteringRules:e=>e,revertLocalAdvancedFiltering:!0,revertLocalFilteringRules:!0,saveDraftFilteringRules:!0,setFilteringConfig:e=>e,setIsEditing:e=>({isEditing:e}),setLocalAdvancedSnippet:e=>({advancedSnippet:e}),setLocalFilteringRules:e=>e,updateFilteringRule:e=>e},connect:{actions:[si,["apiSuccess","makeRequest"],ri,["apiError as draftApiError","apiSuccess as draftApiSuccess","makeRequest as draftMakeRequest"],Z,["apiSuccess as fetchIndexApiSuccess"]],values:[si,["status"],Z,["data as index"]]},events:({actions:e,values:t})=>({afterMount:()=>e.setFilteringConfig(Object(G.h)(t.index)?t.index.connector.filtering[0]:null)}),listeners:({actions:e,values:t})=>({applyDraft:()=>{var n,a;Object(G.h)(t.index)&&e.makeRequest({advancedSnippet:null!==(n=t.localAdvancedSnippet)&&void 0!==n?n:"",connectorId:t.index.connector.id,filteringRules:null!==(a=t.localFilteringRules)&&void 0!==a?a:[]})},fetchIndexApiSuccess:n=>{t.isEditing||!Object(G.h)(n)||Object(on.isEqual)(t.filteringConfig,n.connector.filtering[0])||e.setFilteringConfig(n.connector.filtering[0])},makeRequest:()=>Object(Pt.d)(),saveDraftFilteringRules:()=>{var n,a;Object(G.h)(t.index)&&e.draftMakeRequest({advancedSnippet:null!==(n=t.localAdvancedSnippet)&&void 0!==n?n:"",connectorId:t.index.connector.id,filteringRules:null!==(a=t.localFilteringRules)&&void 0!==a?a:[]})},setIsEditing:n=>{var a,i;n&&t.filteringConfig&&(e.setLocalFilteringRules(t.hasDraft?t.filteringConfig.draft.rules:t.filteringConfig.active.rules),e.setLocalAdvancedSnippet(t.hasDraft?JSON.stringify(null!==(a=t.filteringConfig.draft.advanced_snippet.value)&&void 0!==a?a:{},void 0,2):JSON.stringify(null!==(i=t.filteringConfig.active.advanced_snippet.value)&&void 0!==i?i:{},void 0,2)))}}),path:["enterprise_search","content","connector_filtering"],reducers:()=>({filteringConfig:[null,{apiSuccess:(e,t)=>e?{...e,active:t}:null,draftApiSuccess:(e,t)=>e?{...e,draft:t}:null,setFilteringConfig:(e,t)=>t}],isEditing:[!1,{draftApiError:()=>!1,draftApiSuccess:()=>!1,setIsEditing:(e,{isEditing:t})=>t}],localAdvancedSnippet:["",{setLocalAdvancedSnippet:(e,{advancedSnippet:t})=>t}],localFilteringRules:[[],{addFilteringRule:(e,t)=>(e.length?[...e.slice(0,e.length-1),t,e[e.length-1]]:[t,li(1)]).map(((e,t)=>({...e,order:t}))),deleteFilteringRule:(e,t)=>e.filter((e=>e.id!==t.id)),reorderFilteringRules:(e,t)=>[...t,e.length?e[e.length-1]:li(0)].map(((e,t)=>({...e,order:t}))),setLocalFilteringRules:(e,t)=>t,updateFilteringRule:(e,t)=>e.map((e=>e.id===t.id?t:e))}]}),selectors:({selectors:e})=>({advancedSnippet:[()=>[e.filteringConfig],e=>null!=e&&e.active.advanced_snippet.value?JSON.stringify(null==e?void 0:e.active.advanced_snippet.value,void 0,2):""],draftErrors:[()=>[e.filteringConfig],e=>{var t;return null!==(t=null==e?void 0:e.draft.validation.errors)&&void 0!==t?t:[]}],draftState:[()=>[e.filteringConfig],e=>{var t;return null!==(t=null==e?void 0:e.draft.validation.state)&&void 0!==t?t:ne.g.VALID}],editableFilteringRules:[()=>[e.localFilteringRules],e=>null!=e&&e.length?e.slice(0,e.length-1):[]],filteringRules:[()=>[e.filteringConfig],e=>{var t;return null!==(t=null==e?void 0:e.active.rules)&&void 0!==t?t:[]}],hasDraft:[()=>[e.filteringConfig],e=>!Object(on.isEqual)(null==e?void 0:e.active.advanced_snippet.value,null==e?void 0:e.draft.advanced_snippet.value)||!Object(on.isEqual)(null==e?void 0:e.draft.rules,null==e?void 0:e.active.rules)],hasJsonValidationError:[()=>[e.localAdvancedSnippet],e=>{if(!e)return!1;try{return JSON.parse(e),!1}catch{return!0}}],isLoading:[()=>[e.status],e=>e===$.a.LOADING]})});var ci=n(18);const ui=()=>{const{hasJsonValidationError:e,localAdvancedSnippet:t}=Object(r.useValues)(oi),{setLocalAdvancedSnippet:n}=Object(r.useActions)(oi);return Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.content.indices.connector.syncRules.advancedRules.title",{defaultMessage:"Advanced rules"}),isInvalid:e,error:e?N.i18n.translate("xpack.enterpriseSearch.content.indices.connector.syncRules.advancedRules.error",{defaultMessage:"JSON format is invalid"}):void 0,fullWidth:!0},Object(y.jsx)(ci.CodeEditor,{isCopyable:!0,languageId:"json",options:{detectIndentation:!0,lineNumbers:"on",tabSize:2},value:t,onChange:e=>{n(e)},height:"250px",width:"100%"}))},di=({children:e})=>{const{saveDraftFilteringRules:t,setIsEditing:n}=Object(r.useActions)(oi),{hasJsonValidationError:a,isEditing:i,isLoading:s}=Object(r.useValues)(oi);return Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(ma.a,{hasUnsavedChanges:i,messageText:N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.unsavedChanges",{defaultMessage:"Your changes have not been saved. Are you sure you want to leave?"})}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiForm,null,e)),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},i&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-connector-syncRules-editRules-cancelEditing",onClick:()=>{n(!i)}},N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.cancelEditingFilteringDraft",{defaultMessage:"Cancel"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-syncRules-editRules-saveAndValidate",disabled:a,isLoading:s,onClick:t},N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.validateDraftTitle",{defaultMessage:"Save and validate draft"}))))))},pi=({children:e,revertAction:t})=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"flexEnd"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-syncRules-editRules-revert",onClick:t},N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.flyout.revertButtonTitle",{defaultMessage:"Revert to active rules"}))))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(di,null,e))));var gi=n(27),ji=n(117),xi=n(97);const Mi="FilteringRulesTable";function hi(e){if(e.rule===ne.f.REGEX)try{return new RegExp(e.value),{}}catch{return{value:N.i18n.translate("xpack.enterpriseSearch.content.index.connector.filteringRules.regExError",{defaultMessage:"Value should be a regular expression"})}}return{}}const mi=()=>{const{editableFilteringRules:e}=Object(r.useValues)(oi),{indexName:t}=Object(r.useValues)(fn),{addFilteringRule:n,deleteFilteringRule:a,reorderFilteringRules:i,updateFilteringRule:s}=Object(r.useActions)(oi),l=Object(y.jsx)(S.EuiText,{size:"s",color:"default"},N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.description",{defaultMessage:"Add a sync rule to customize what data is synchronized from {indexName}. Everything is included by default, and documents are validated against the configured set of sync rules in the listed order.",values:{indexName:t}}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiLink,{href:k.a.syncRules,external:!0},N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.link",{defaultMessage:"Learn more about customizing your sync rules."}))),o=[{editingRender:(e,t)=>Object(y.jsx)(S.EuiSelect,{fullWidth:!0,value:e.policy,onChange:e=>t(e.target.value),options:[{text:ai(ne.e.INCLUDE),value:ne.e.INCLUDE},{text:ai(ne.e.EXCLUDE),value:ne.e.EXCLUDE}]}),field:"policy",name:N.i18n.translate("xpack.enterpriseSearch.index.connector.rule.basicTable.policyTitle",{defaultMessage:"Policy"}),render:e=>Object(y.jsx)(S.EuiText,{size:"s"},ai(e.policy))},{editingRender:(e,t)=>Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"s",responsive:!1},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFieldText,{fullWidth:!0,value:e.field,onChange:e=>t(e.target.value)}))),field:"field",name:N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.basicTable.fieldTitle",{defaultMessage:"Field"}),render:e=>Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)(S.EuiCode,null,e.field))},{editingRender:(e,t)=>Object(y.jsx)(S.EuiSelect,{fullWidth:!0,value:e.rule,onChange:e=>t(e.target.value),options:Object.values(ne.f).map((e=>({text:ti(e),value:e})))}),field:"rule",name:N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.basicTable.ruleTitle",{defaultMessage:"Rule"}),render:e=>Object(y.jsx)(S.EuiText,{size:"s"},ti(e.rule))},{editingRender:(e,t)=>Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"s",responsive:!1},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFieldText,{fullWidth:!0,value:e.value,onChange:e=>t(e.target.value)}))),field:"value",name:N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.basicTable.valueTitle",{defaultMessage:"Value"}),render:e=>Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)(S.EuiCode,null,e.value))}];return Object(y.jsx)(ji.a,{addButtonText:N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.table.addRuleLabel",{defaultMessage:"Add sync rule"}),columns:o,defaultItem:{policy:ne.e.INCLUDE,rule:ne.f.EQUALS,value:""},description:l,instanceId:Mi,items:e,onAdd:e=>{const t=(new Date).toISOString(),a={...e,created_at:t,id:Object(gi.v4)(),updated_at:t};n(a),Object(xi.a)({instanceId:Mi}).actions.doneEditing()},onDelete:a,onUpdate:e=>{s(e),Object(xi.a)({instanceId:Mi}).actions.doneEditing()},onReorder:i,title:"",validateItem:hi,bottomRows:[Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.sources.basicRulesTable.includeEverythingMessage",{defaultMessage:"Include everything else from this source"}))],canRemoveLastItem:!0,emptyPropertyAllowed:!0,showRowIndex:!0})};var fi;!function(e){e.BASIC="basic",e.ADVANCED="advanced"}(fi||(fi={}));const bi=({errors:e,hasAdvancedFilteringFeature:t,hasBasicFilteringFeature:n,revertLocalFilteringRules:a,revertLocalAdvancedFiltering:s,setIsEditing:r})=>{const l=[...n?[{content:Object(y.jsx)(pi,{revertAction:a},Object(y.jsx)(mi,null)),id:fi.BASIC,name:N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.basicTabTitle",{defaultMessage:"Basic rules"})}]:[],...t?[{content:Object(y.jsx)(pi,{revertAction:s},Object(y.jsx)(ui,null)),id:fi.ADVANCED,name:N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.advancedTabTitle",{defaultMessage:"Advanced rules"})}]:[]];return Object(y.jsx)(S.EuiFlyout,{ownFocus:!0,onClose:()=>r(!1),"aria-labelledby":"rulesFlyout",size:"l"},Object(y.jsx)(S.EuiFlyoutHeader,null,Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h2",{id:"rulesFlyout"},N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.flyout.title",{defaultMessage:"Draft rules"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(At,{description:N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.flyout.betaDescription",{defaultMessage:"Sync rules is a beta feature. Beta features are subject to change and are not covered by the support SLA of general release (GA) features. Elastic plans to promote this feature to GA in a future release."})}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.flyout.description",{defaultMessage:"Plan and edit rules here before applying them to the next sync."})),Object(y.jsx)(S.EuiSpacer,null),!(null==e||!e.length)&&Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},e.map(((e,t)=>Object(y.jsx)(S.EuiFlexItem,{id:`${t}`,grow:!1},Object(y.jsx)(S.EuiCallOut,{color:"danger",title:N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.flyout.errorTitle",{defaultMessage:"Sync {idsLength, plural, one {rule} other {rules}} {ids} {idsLength, plural, one {is} other {are}} invalid.",values:{ids:e.ids.join(", "),idsLength:e.ids.length}})},Object(y.jsx)(i.a.Fragment,null,e.messages.map((e=>Object(y.jsx)("p",{id:e},e)))))))))),Object(y.jsx)(S.EuiFlyoutBody,null,Object(y.jsx)(S.EuiTabbedContent,{tabs:l})))},yi=({applyDraft:e,editDraft:t,state:n})=>{switch(n){case ne.g.EDITED:return Object(y.jsx)(S.EuiCallOut,{color:"warning",title:Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLoadingSpinner,null)),Object(y.jsx)(S.EuiFlexItem,null,N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.validatingTitle",{defaultMessage:"Draft sync rules are validating"})))},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.validatingDescription",{defaultMessage:"Draft rules need to be validated before they can be activated. This may take a few minutes."})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("span",null,Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-syncRules-validatingCallout-editRules",onClick:t,color:"warning",fill:!0},N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.validatingCallout.editDraftRulesTitle",{defaultMessage:"Edit draft rules"}))))));case ne.g.INVALID:return Object(y.jsx)(S.EuiCallOut,{color:"danger",iconType:"cross",title:N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.invalidTitle",{defaultMessage:"Draft sync rules are invalid"})},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.invalidDescription",{defaultMessage:"Draft rules did not validate. Edit the draft rules before they can be activated."})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("span",null,Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-syncRules-errorCallout-editRules",onClick:t,color:"danger",fill:!0},N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.errorCallout.editDraftRulesTitle",{defaultMessage:"Edit draft rules"}))))));case ne.g.VALID:return Object(y.jsx)(S.EuiCallOut,{color:"success",iconType:"check",title:N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.validatedTitle",{defaultMessage:"Draft sync rules validated"})},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.validatedDescription",{defaultMessage:"Activate draft rules to take effect on the next sync."})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"flexStart"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)("span",null,Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-syncRules-successCallout-applyRules",onClick:e,color:"success",fill:!0},N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.successCallout.applyDraftRulesTitle",{defaultMessage:"Activate draft rules"})))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)("span",null,Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-syncRules-successCallout-editRules",onClick:t,color:"success"},N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.errorCallout.successEditDraftRulesTitle",{defaultMessage:"Edit draft rules"}))))))));default:return Object(y.jsx)(i.a.Fragment,null)}},Oi=()=>{const{indexName:e,hasAdvancedFilteringFeature:t,hasBasicFilteringFeature:n}=Object(r.useValues)(fn),{applyDraft:a,setLocalFilteringRules:s,setLocalAdvancedSnippet:l,setIsEditing:o}=Object(r.useActions)(oi),{advancedSnippet:c,draftErrors:u,draftState:d,filteringRules:p,hasDraft:g,isEditing:j}=Object(r.useValues)(oi);return Object(y.jsx)(i.a.Fragment,null,j&&Object(y.jsx)(bi,{errors:u,hasAdvancedFilteringFeature:t,hasBasicFilteringFeature:n,revertLocalFilteringRules:()=>s(p),revertLocalAdvancedFiltering:()=>l(c),setIsEditing:o}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},g&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(yi,{applyDraft:a,editDraft:()=>o(!0),state:d})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",justifyContent:"flexStart",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.title",{defaultMessage:"Sync rules "})))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Ka,null))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.description",{defaultMessage:"Include or exclude high level items, file types and (file or folder) paths to\n synchronize from {indexName}. Everything is included by default. Each document is\n tested against the rules below and the first rule that matches will be applied.",values:{indexName:e}})),Object(y.jsx)("p",null,Object(y.jsx)(S.EuiLink,{href:k.a.syncRules,external:!0},N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.syncRulesLabel",{defaultMessage:"Learn more about sync rules"}))))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-syncRules-editRules-editDraftRules",color:"primary",onClick:()=>o(!j)},g?N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.editFilterRulesTitle",{defaultMessage:"Edit sync rules"}):N.i18n.translate("xpack.enterpriseSearch.index.connector.syncRules.draftNewFilterRulesTitle",{defaultMessage:"Draft new sync rules"}))))),n&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:"plain",hasShadow:!1,hasBorder:!0},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.basicRulesTitle",{defaultMessage:"Basic rules"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.basicRulesDescription",{defaultMessage:"These rules apply to documents during the integration filtering phase."})))),Object(y.jsx)(ii,{filteringRules:p,showOrder:!0})))),t&&!!c&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:"plain",hasShadow:!1,hasBorder:!0},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.advancedRulesTitle",{defaultMessage:"Advanced rules"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.advancedFiltersDescription",{defaultMessage:"These rules apply before the data is obtained from the data source."})),Object(y.jsx)("p",null,Object(y.jsx)(S.EuiLink,{external:!0,href:k.a.syncRules},N.i18n.translate("xpack.enterpriseSearch.content.index.connector.syncRules.advancedFiltersLinkTitle",{defaultMessage:"Learn more about advanced sync rules."}))))),Object(y.jsx)(S.EuiCodeBlock,{isCopyable:!0,language:"json"},c))))))},Ii=({disabled:e,onChange:t,scheduling:n})=>{var i;const[s,r]=Object(a.useState)({}),[l,o]=Object(a.useState)({expression:null!==(i=null==n?void 0:n.interval)&&void 0!==i?i:"",frequency:null!=n&&n.interval?Si(n.interval):"HOUR"});return Object(y.jsx)(cron_editor_CronEditor,{fieldToPreferredValueMap:s,cronExpression:l.expression,frequency:l.frequency,disabled:e,onChange:({cronExpression:e,frequency:a,fieldToPreferredValueMap:i})=>{o({expression:e,frequency:a}),r(i),t({...n,interval:e})},frequencyBlockList:["MINUTE"]})};function Si(e){const t=e.split(" ");return t.length<4?"YEAR":"*"===t[1]?"MINUTE":"*"===t[2]?"HOUR":"*"===t[3]?"DAY":"*"===t[4]?"WEEK":"?"===t[4]?"MONTH":"YEAR"}var Ni=n(5);const Ei={crawlFrequency:24,crawlUnit:Zt.hours},Di=Object(r.kea)({path:["enterprise_search","crawler","automatic_crawl_scheduler_logic"],connect:{actions:[fa,["makeRequest as makeUpdateConnectorSchedulingRequest","apiError as updateConnectorSchedulingApiError"]],values:[fn,["index"]]},actions:()=>({clearCrawlSchedule:!0,deleteCrawlSchedule:!0,disableCrawlAutomatically:!0,onDoneSubmitting:!0,enableCrawlAutomatically:!0,fetchCrawlSchedule:!0,saveChanges:!0,setCrawlSchedule:e=>({crawlSchedule:e}),submitConnectorSchedule:e=>({scheduling:e}),submitCrawlSchedule:!0,setCrawlAutomatically:e=>({crawlAutomatically:e}),setCrawlFrequency:e=>({crawlFrequency:e}),setCrawlUnit:e=>({crawlUnit:e}),setUseConnectorSchedule:e=>({useConnectorSchedule:e})}),reducers:()=>({crawlAutomatically:[!1,{clearCrawlSchedule:()=>!1,setCrawlAutomatically:(e,{crawlAutomatically:t})=>t,setCrawlSchedule:()=>!0}],crawlFrequency:[Ei.crawlFrequency,{clearCrawlSchedule:()=>Ei.crawlFrequency,setCrawlSchedule:(e,{crawlSchedule:{frequency:t}})=>t,setCrawlFrequency:(e,{crawlFrequency:t})=>t,setUseConnectorSchedule:e=>e||Ei.crawlFrequency}],crawlUnit:[Ei.crawlUnit,{clearCrawlSchedule:()=>Ei.crawlUnit,setCrawlSchedule:(e,{crawlSchedule:{unit:t}})=>t,setCrawlUnit:(e,{crawlUnit:t})=>t,setUseConnectorSchedule:e=>e||Ei.crawlUnit}],isSubmitting:[!1,{deleteCrawlSchedule:()=>!0,onDoneSubmitting:()=>!1,submitCrawlSchedule:()=>!0}],useConnectorSchedule:[!1,{setCrawlAutomatically:(e,{crawlAutomatically:t})=>t||e,setCrawlSchedule:(e,{crawlSchedule:{useConnectorSchedule:t=!1}})=>t,setUseConnectorSchedule:(e,{useConnectorSchedule:t})=>t}]}),listeners:({actions:e,values:t})=>({deleteCrawlSchedule:async()=>{const{http:t}=d.a.values,{indexName:n}=un.values;try{await t.delete(`/internal/enterprise_search/indices/${n}/crawler/crawl_schedule`)}catch(e){var a;404!==(null===(a=e.response)||void 0===a?void 0:a.status)&&Object(Pt.e)(e)}finally{e.onDoneSubmitting()}},fetchCrawlSchedule:async()=>{const{http:t}=d.a.values,{indexName:n}=un.values;try{const a=await t.get(`/internal/enterprise_search/indices/${n}/crawler/crawl_schedule`);e.setCrawlSchedule(sn(a))}catch(e){var a;404!==(null===(a=e.response)||void 0===a?void 0:a.status)&&Object(Pt.e)(e)}},saveChanges:()=>{t.crawlAutomatically?e.submitCrawlSchedule():e.deleteCrawlSchedule(),e.submitConnectorSchedule({...t.index.connector.scheduling.full,enabled:t.crawlAutomatically&&t.useConnectorSchedule})},setCrawlAutomatically:e.saveChanges,setCrawlFrequency:e.saveChanges,setCrawlUnit:e.saveChanges,setUseConnectorSchedule:e.saveChanges,submitConnectorSchedule:({scheduling:n})=>{e.makeUpdateConnectorSchedulingRequest({connectorId:t.index.connector.id,scheduling:{...t.index.connector.scheduling,full:n}})},submitCrawlSchedule:async()=>{const{http:n}=d.a.values,{indexName:a}=un.values;if(t.crawlUnit&&t.crawlFrequency)try{const i=await n.put(`/internal/enterprise_search/indices/${a}/crawler/crawl_schedule`,{body:JSON.stringify({frequency:t.crawlFrequency,unit:t.crawlUnit,use_connector_schedule:t.useConnectorSchedule})});e.setCrawlSchedule(sn(i))}catch(e){Object(Pt.e)(e)}finally{e.onDoneSubmitting()}},updateConnectorSchedulingApiError:e=>Object(Pt.e)(e)}),events:({actions:e})=>({afterMount:()=>{e.fetchCrawlSchedule()}})}),Ti=()=>{const{setCrawlAutomatically:e,setCrawlFrequency:t,setCrawlUnit:n,setUseConnectorSchedule:a,submitConnectorSchedule:s}=Object(r.useActions)(Di),{index:l,crawlAutomatically:o,crawlFrequency:c,crawlUnit:u,useConnectorSchedule:d}=Object(r.useValues)(Di);return Object(G.j)(l)?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.automaticCrawlSchedule.title",{defaultMessage:"Crawl frequency"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiSplitPanel.Outer,{grow:!0},Object(y.jsx)(S.EuiSplitPanel.Inner,{grow:!1,color:"subdued"},Object(y.jsx)(S.EuiFormRow,{display:"rowCompressed"},Object(y.jsx)(S.EuiSwitch,{"data-telemetry-id":"entSearchContent-crawler-scheduleCrawl-crawlAutomatically",autoFocus:!0,checked:o,label:N.i18n.translate("xpack.enterpriseSearch.crawler.automaticCrawlSchedule.crawlAutomaticallySwitchLabel",{defaultMessage:"Enable recurring crawls with the following schedule"}),onChange:t=>e(t.target.checked),compressed:!0}))),Object(y.jsx)(S.EuiSplitPanel.Inner,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCheckableCard,{id:"specificTimeSchedulingCard",label:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiTitle,{size:"xxs"},Object(y.jsx)("h5",null,N.i18n.translate("xpack.enterpriseSearch.crawler.automaticCrawlSchedule.cronSchedulingTitle",{defaultMessage:"Specific time scheduling"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"xs",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.crawler.automaticCrawlSchedule.cronSchedulingDescription",{defaultMessage:"Define the frequency and time for scheduled crawls. The crawler uses UTC as its timezone."})),Object(y.jsx)(S.EuiHorizontalRule,{margin:"s"})),checked:o&&d,disabled:!o,onChange:()=>a(!0)},Object(y.jsx)(Ii,{disabled:!o||!d,scheduling:l.connector.scheduling.full,onChange:e=>s({...e,enabled:!0})}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCheckableCard,{id:"intervalSchedulingCard",label:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiTitle,{size:"xxs"},Object(y.jsx)("h5",null,N.i18n.translate("xpack.enterpriseSearch.crawler.automaticCrawlSchedule.intervalSchedulingTitle",{defaultMessage:"Interval scheduling"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"xs",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.crawler.automaticCrawlSchedule.intervalSchedulingDescription",{defaultMessage:"Define the frequency for scheduled crawls"})),Object(y.jsx)(S.EuiHorizontalRule,{margin:"s"})),checked:o&&!d,disabled:!o,onChange:()=>a(!1)},Object(y.jsx)(S.EuiFormRow,{display:"rowCompressed",label:"Frequency",fullWidth:!0},Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiFieldNumber,{"data-telemetry-id":"entSearchContent-crawler-scheduleCrawl-crawlAutomatically-scheduleFrequency","aria-label":N.i18n.translate("xpack.enterpriseSearch.crawler.automaticCrawlSchedule.scheduleFrequencyLabel",{defaultMessage:"Schedule frequency"}),disabled:!o||d,min:0,max:99,compressed:!0,value:c,onChange:e=>t(parseInt(e.target.value,10)),prepend:"Every"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiSelect,{"data-telemetry-id":"entSearchContent-crawler-scheduleCrawl-crawlAutomatically-scheduleUnits","aria-label":N.i18n.translate("xpack.enterpriseSearch.crawler.automaticCrawlSchedule.scheduleUnitsLabel",{defaultMessage:"Schedule units of time"}),disabled:!o||d,fullWidth:!0,compressed:!0,options:[{text:zt.p,value:Zt.hours},{text:zt.i,value:Zt.days},{text:zt.E,value:Zt.weeks},{text:zt.t,value:Zt.months}],value:u,onChange:e=>n(e.target.value)}))))))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"xs",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.crawler.automaticCrawlSchedule.scheduleDescription",{defaultMessage:"The crawl schedule will perform a full crawl on every domain on this index."}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiLink,{href:Ni.a.crawlerManaging,target:"_blank",external:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.automaticCrawlSchedule.readMoreLink",{defaultMessage:"Learn more about scheduling"})))))):Object(y.jsx)(i.a.Fragment,null)};var wi=n(59);const vi=()=>{const{maxCrawlDepth:e}=Object(r.useValues)(Sn),{onSelectMaxCrawlDepth:t}=Object(r.useActions)(Sn);return Object(y.jsx)(Ci,{maxCrawlDepth:e,onSelectMaxCrawlDepth:t})},Ci=({maxCrawlDepth:e,onSelectMaxCrawlDepth:t})=>Object(y.jsx)(S.EuiPanel,{hasBorder:!0},Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.maxCrawlDepthFieldLabel",{defaultMessage:"Max crawl depth"})},Object(y.jsx)(S.EuiFieldNumber,{"data-telemetry-id":"entSearchContent-crawler-customCrawlSettings-maxCrawlDepth",min:1,value:e,onChange:e=>t(parseInt(e.target.value,10))}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"xs",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.maxCrawlDepthFieldDescription",{defaultMessage:"Set a max crawl depth to specify how many pages deep the crawler should traverse. Set the value to one (1) to limit the crawl to only the entry points."}))))),ki=()=>{const{crawlType:e}=Object(r.useValues)(Sn),{onSelectCrawlType:t}=Object(r.useActions)(Sn);return Object(y.jsx)(S.EuiFormFieldset,{legend:{children:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.crawlTypeGroupLabel",{defaultMessage:"Crawl type"})}},Object(y.jsx)(S.EuiFlexGroup,{direction:"row"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiRadio,{id:Jt.ONE_TIME,label:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.oneTimeCrawlRadioLabel",{defaultMessage:"One-time crawl"}),checked:e===Jt.ONE_TIME,onChange:()=>t(Jt.ONE_TIME)})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiRadio,{id:Jt.MULTIPLE,label:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.multipleCrawlsRadioLabel",{defaultMessage:"Multiple crawls"}),checked:e===Jt.MULTIPLE,onChange:()=>t(Jt.MULTIPLE)}))))};var Ai=n(126);const Li=()=>{const{selectedDomainUrls:e}=Object(r.useValues)(Sn),{domainUrls:t}=Object(r.useValues)(Mn),{onSelectDomainUrls:n}=Object(r.useActions)(Sn);return Object(y.jsx)(zi,{domainUrls:t,selectedDomainUrls:e,onSelectDomainUrls:n})},zi=({domainUrls:e,selectedDomainUrls:t,onSelectDomainUrls:n})=>Object(y.jsx)(S.EuiPanel,{hasBorder:!0},Object(y.jsx)(S.EuiAccordion,{id:Object(S.useGeneratedHtmlId)({prefix:"domainAccordion"}),initialIsOpen:!0,buttonContent:Object(y.jsx)(S.EuiFlexGroup,{direction:"row",responsive:!1,gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"globe"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.domainsAccordionButtonLabel",{defaultMessage:"Add domains to your crawl"}))))),extraAction:Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"m"},Object(y.jsx)(S.EuiNotificationBadge,{size:"m",color:t.length>0?"accent":"subdued"},t.length),Object(y.jsx)(S.EuiFlexItem,{grow:!1},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.selectedDescriptor",{defaultMessage:"selected"})))},Object(y.jsx)(Ai.a,{"data-telemetry-id":"entSearchContent-crawler-customCrawlSettings-selectDomainUrls",options:e,selectedOptions:t,onChange:n}))),_i=()=>{const{crawlerConfigActiveTab:e,crawlerConfigurations:t}=Object(r.useValues)(On),{onDeleteCustomCrawler:n}=Object(r.useActions)(On);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiButton,{iconType:"trash",color:"danger",disabled:t.length<2,onClick:()=>n(e)},`Delete Crawl ${e+1}`))},Ri=N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.multipleCrawlTabPrefix",{defaultMessage:"Crawl"}),Fi=()=>{const{crawlerConfigActiveTab:e,crawlerConfigurations:t}=Object(r.useValues)(On),{onAddCustomCrawler:n,onSelectCrawlerConfigActiveTab:a}=Object(r.useActions)(On),s=t.map(((e,t)=>({key:`crawler_${t}`,index:t,label:`${Ri} ${t+1}`})));return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiTabs,null,s.map((t=>Object(y.jsx)(S.EuiTab,{key:t.key,isSelected:e===t.index,onClick:()=>a(t.index)},t.label))),Object(y.jsx)(S.EuiTab,{onClick:()=>n(t.length)},Object(y.jsx)(S.EuiIcon,{type:"plus"}))),Object(y.jsx)(S.EuiSpacer,null))},Ui=({index:e,interval:t,schedulingEnabled:n,setConnectorSchedulingInterval:a,onSetConnectorSchedulingEnabled:s})=>Object(G.j)(e)?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSplitPanel.Outer,{hasBorder:!0,hasShadow:!1,grow:!0},Object(y.jsx)(S.EuiSplitPanel.Inner,{grow:!1},Object(y.jsx)(S.EuiFormRow,{display:"rowCompressed"},Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.multiCrawlSchedulingFrequency",{defaultMessage:"Crawl frequency"}))))),Object(y.jsx)(S.EuiSplitPanel.Inner,{grow:!1,color:"subdued"},Object(y.jsx)(S.EuiFormRow,{display:"rowCompressed"},Object(y.jsx)(S.EuiSwitch,{checked:n,label:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.multiCrawlSchedulingEnabled",{defaultMessage:"Enable recurring crawls with the following schedule"}),onChange:e=>s(e.target.checked),compressed:!0}))),Object(y.jsx)(S.EuiSplitPanel.Inner,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xxs"},Object(y.jsx)("h5",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.cronSchedulingTitle",{defaultMessage:"Specific time scheduling"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"xs",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.cronSchedulingDescription",{defaultMessage:"Define the frequency and time for scheduled crawls. The crawler uses UTC as its timezone."})),Object(y.jsx)(S.EuiHorizontalRule,{margin:"s"}),Object(y.jsx)(Ii,{disabled:!n,scheduling:{interval:t,enabled:n},onChange:a}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"xs",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.scheduleDescription",{defaultMessage:"The crawl schedule will perform a full crawl on every domain on this index."}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiLink,{href:Ni.a.crawlerManaging,target:"_blank",external:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.readMoreLink",{defaultMessage:"Learn more about scheduling"})))))):Object(y.jsx)(i.a.Fragment,null);var Pi=n(240);const Qi=()=>{const{customEntryPointUrls:e,customSitemapUrls:t,entryPointUrls:n,includeSitemapsInRobotsTxt:a,selectedDomainUrls:i,selectedEntryPointUrls:s,selectedSitemapUrls:l,sitemapUrls:o}=Object(r.useValues)(Sn),{onSelectCustomEntryPointUrls:c,onSelectCustomSitemapUrls:u,onSelectEntryPointUrls:d,onSelectSitemapUrls:p,toggleIncludeSitemapsInRobotsTxt:g}=Object(r.useActions)(Sn),j={customEntryPointUrls:e,customSitemapUrls:t,includeSitemapsInRobotsTxt:a,selectedDomainUrls:i,selectedEntryPointUrls:s,selectedSitemapUrls:l,entryPointUrls:n,sitemapUrls:o};return Object(y.jsx)(Yi,{scheduleConfig:j,onSelectCustomEntryPointUrls:c,onSelectCustomSitemapUrls:u,onSelectEntryPointUrls:d,onSelectSitemapUrls:p,toggleIncludeSitemapsInRobotsTxt:g})},Yi=({scheduleConfig:e,onSelectCustomEntryPointUrls:t,onSelectCustomSitemapUrls:n,onSelectEntryPointUrls:a,onSelectSitemapUrls:s,toggleIncludeSitemapsInRobotsTxt:r})=>{const l=e.customEntryPointUrls.length+e.customSitemapUrls.length+e.selectedEntryPointUrls.length+e.selectedSitemapUrls.length;return Object(y.jsx)(S.EuiPanel,{hasBorder:!0},Object(y.jsx)(S.EuiAccordion,{id:Object(S.useGeneratedHtmlId)({prefix:"seedUrlAccordion"}),initialIsOpen:!0,buttonContent:Object(y.jsx)(S.EuiFlexGroup,{direction:"row",responsive:!1,gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"globe"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.seedUrlsAccordionButtonLabel",{defaultMessage:"Seed URLs"}))))),extraAction:Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"m"},Object(y.jsx)(S.EuiNotificationBadge,{size:"m",color:l>0?"accent":"subdued"},l),Object(y.jsx)(S.EuiFlexItem,{grow:!1},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.selectedDescriptor",{defaultMessage:"selected"})))},Object(y.jsx)(S.EuiTabbedContent,{expand:!0,tabs:[{id:Object(S.useGeneratedHtmlId)({prefix:"sitemapsTab"}),name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.sitemapsTabLabel",{defaultMessage:"Sitemaps"}),content:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiPanel,{color:"subdued",borderRadius:"none",hasShadow:!1,paddingSize:"s"},Object(y.jsx)(S.EuiCheckbox,{"data-telemetry-id":"entSearchContent-crawler-customCrawlSettings-includeRobotsSitemaps",id:Object(S.useGeneratedHtmlId)({prefix:"includeRobotsCheckbox"}),label:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.includeSitemapsCheckboxLabel",defaultMessage:"Include sitemaps discovered in {robotsDotTxt}",values:{robotsDotTxt:Object(y.jsx)("strong",null,"robots.txt")}}),checked:e.includeSitemapsInRobotsTxt,onChange:r})),Object(y.jsx)(Ai.a,{"data-telemetry-id":"entSearchContent-crawler-customCrawlSettings-selectDomain",options:e.sitemapUrls,selectedOptions:e.selectedSitemapUrls,onChange:s,emptyMessage:0===e.selectedDomainUrls.length?N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.emptyDomainsMessage",{defaultMessage:"Please select a domain."}):void 0}),Object(y.jsx)(S.EuiHorizontalRule,null),Object(y.jsx)(Pi.a,{"data-telemetry-id":"entSearchContent-crawler-customCrawlSettings-customSitemapUrls",label:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.customSitemapUrlsTextboxLabel",{defaultMessage:"Custom sitemap URLs"}),onChange:n,selectedUrls:e.customSitemapUrls}))},{id:Object(S.useGeneratedHtmlId)({prefix:"entryPointsTab"}),name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.entryPointsTabLabel",{defaultMessage:"Entry points"}),content:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(Ai.a,{"data-telemetry-id":"entSearchContent-crawler-customCrawlSettings-selectDomain",options:e.entryPointUrls,selectedOptions:e.selectedEntryPointUrls,onChange:a,emptyMessage:0===e.selectedDomainUrls.length?N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.emptyDomainsMessage",{defaultMessage:"Please select a domain."}):void 0}),Object(y.jsx)(S.EuiHorizontalRule,null),Object(y.jsx)(Pi.a,{"data-telemetry-id":"entSearchContent-crawler-customCrawlSettings-customEntryPointUrls",label:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.customEntryPointUrlsTextboxLabel",{defaultMessage:"Custom entry point URLs"}),onChange:t,selectedUrls:e.customEntryPointUrls}))}],autoFocus:"selected"})))},Bi=()=>{const{domainUrls:e}=Object(r.useValues)(Mn),{crawlerConfigurationsWithDomainData:t,crawlerConfigActiveTab:n,index:a}=Object(r.useValues)(On),{onSelectMaxCrawlDepth:s,onSelectDomainUrls:l,onSelectCustomEntryPointUrls:o,onSelectCustomSitemapUrls:c,onSelectEntryPointUrls:u,onSelectSitemapUrls:d,toggleIncludeSitemapsInRobotsTxt:p,setConnectorSchedulingInterval:g,onSetConnectorSchedulingEnabled:j}=Object(r.useActions)(On);return Object(y.jsx)(i.a.Fragment,null,t.map(((t,r)=>{if(r===n)return Object(y.jsx)(i.a.Fragment,{key:r},Object(y.jsx)(Ci,{maxCrawlDepth:t.maxCrawlDepth,onSelectMaxCrawlDepth:e=>s(r,e)}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(zi,{selectedDomainUrls:t.selectedDomainUrls,domainUrls:e,onSelectDomainUrls:e=>l(r,e)}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Yi,{scheduleConfig:t,onSelectCustomEntryPointUrls:e=>o(r,e),onSelectCustomSitemapUrls:e=>c(r,e),onSelectEntryPointUrls:e=>u(r,e),onSelectSitemapUrls:e=>d(r,e),toggleIncludeSitemapsInRobotsTxt:()=>p(r)}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Ui,{index:a,interval:t.interval,schedulingEnabled:t.enabled,setConnectorSchedulingInterval:e=>g(r,e),onSetConnectorSchedulingEnabled:e=>j(r,e)}))})))},Gi=()=>{const{isDataLoading:e,isFormSubmitting:t,isFlyoutVisible:n,isSingleCrawlType:a,selectedDomainUrls:s}=Object(r.useValues)(Sn),{crawlerCustomSchedulingIsValid:l}=Object(r.useValues)(On),{hideFlyout:o,startCustomCrawl:c,saveCustomSchedulingConfiguration:u}=Object(r.useActions)(Sn);if(!n)return null;const d=a?c:u;return Object(y.jsx)(S.EuiFlyout,{ownFocus:!0,onClose:o,size:"m"},Object(y.jsx)(S.EuiFlyoutHeader,{hasBorder:!0},Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.flyoutHeadTitle",{defaultMessage:"Custom crawl configuration"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.flyoutHeaderDescription",{defaultMessage:"Set up a one-time crawl or multiple crawling custom settings."})))),Object(y.jsx)(S.EuiFlyoutBody,null,e?Object(y.jsx)(wi.a,null):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(ki,null),Object(y.jsx)(S.EuiSpacer,null),a?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(vi,null),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Li,null),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Qi,null)):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(Fi,null),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Bi,null),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(_i,null)))),Object(y.jsx)(S.EuiFlyoutFooter,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"flexEnd"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-crawler-customCrawlSettings-cancelStartCrawl",onClick:o},zt.e)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-customCrawlSettings-startCrawl",fill:!0,onClick:d,disabled:a?e||0===s.length:!l,isLoading:t},a?N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.startCrawlButtonLabel",{defaultMessage:"Apply and crawl now"}):N.i18n.translate("xpack.enterpriseSearch.crawler.crawlCustomSettingsFlyout.saveMultipleCrawlersConfiguration",{defaultMessage:"Save configuration"}))))))},$i=Object(V.a)(["update_html_extraction_api_logic"],(async({htmlExtraction:e,indexName:t})=>{const n=`/internal/enterprise_search/indices/${t}/crawler/html_extraction`,a={extract_full_html:e};return await d.a.values.http.put(n,{body:JSON.stringify(a)}),{htmlExtraction:e}})),Vi=Object(r.kea)({actions:{updateHtmlExtraction:e=>({htmlExtraction:e})},connect:{actions:[fn,["fetchIndex","fetchIndexApiSuccess"],$i,["apiSuccess","makeRequest"]],values:[fn,["connector","indexName"],$i,["status"]]},listeners:({actions:e,values:t})=>({apiSuccess:()=>{e.fetchIndex()},updateHtmlExtraction:({htmlExtraction:n})=>{e.makeRequest({htmlExtraction:n,indexName:t.indexName})}}),path:["enterprise_search","search_index","crawler","configuration"],reducers:{localHtmlExtraction:[null,{apiSuccess:(e,{htmlExtraction:t})=>t,fetchIndexApiSuccess:(e,t)=>{var n,a;return Object(G.j)(t)&&null!==(n=null===(a=t.connector.configuration.extract_full_html)||void 0===a?void 0:a.value)&&void 0!==n?n:null}}]},selectors:({selectors:e})=>({htmlExtraction:[()=>[e.connector,e.localHtmlExtraction],(e,t)=>{var n,a;return null!==t?t:null!==(n=null==e||null===(a=e.configuration.extract_full_html)||void 0===a?void 0:a.value)&&void 0!==n&&n}]})}),qi=()=>{const{htmlExtraction:e}=Object(r.useValues)(fn),{status:t}=Object(r.useValues)(Vi),{updateHtmlExtraction:n}=Object(r.useActions)(Vi);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiSplitPanel.Outer,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(S.EuiSplitPanel.Inner,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.crawler.crawlerConfiguration.extractHTML.title",{defaultMessage:"Store full HTML"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.crawler.crawlerConfiguration.extractHTML.addExtraFieldDescription",{defaultMessage:"Add an extra field in all documents with the value of the full HTML of the page being crawled."}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.crawler.crawlerConfiguration.extractHTML.increasedSizeWarning",{defaultMessage:"This may dramatically increase the index size if the site being crawled is large."})))),Object(y.jsx)(S.EuiSplitPanel.Inner,{color:"subdued"},Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiSwitch,{"data-telemetry-id":"entSearchContent-crawler-configuration-extractHtml",label:N.i18n.translate("xpack.enterpriseSearch.content.crawler.crawlerConfiguration.extractHTML.extractionSwitchLabel",{defaultMessage:"Store full HTML"}),disabled:t===$.a.LOADING,checked:null!=e&&e,onChange:e=>n(e.target.checked)})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{href:`${k.a.crawlerManaging}#crawler-managing-html-storage`,"data-telemetry-id":"entSearchContent-crawler-configuration-learnMoreExtraction"},N.i18n.translate("xpack.enterpriseSearch.content.crawler.crawlerConfiguration.extractHTML.learnMoreLink",{defaultMessage:"Learn more about storing full HTML."})))))))},Wi=Object(V.a)(["delete_crawler_domain"],(async({domain:e,indexName:t})=>(await d.a.values.http.delete(`/internal/enterprise_search/indices/${t}/crawler/domains/${e.id}`),{domain:e})),{showSuccessFlashFn:({domain:e})=>N.i18n.translate("xpack.enterpriseSearch.crawler.domainsTable.action.delete.successMessage",{defaultMessage:"Successfully deleted domain '{domainUrl}'",values:{domainUrl:e.url}})}),Zi=Object(r.kea)({path:["enterprise_search","delete_domain_modal"],connect:{actions:[Wi,["apiError","apiSuccess"]],values:[Wi,["status"]]},actions:{deleteDomain:()=>!0,hideModal:()=>!0,showModal:e=>({domain:e})},reducers:{domain:[null,{showModal:(e,{domain:t})=>t}],isHidden:[!0,{apiError:()=>!0,apiSuccess:()=>!0,hideModal:()=>!0,showModal:()=>!1}]},listeners:({values:e})=>({apiSuccess:()=>{dn.actions.fetchCrawlerData()},deleteDomain:()=>{const{domain:t}=e,{indexName:n}=un.values;t&&Wi.actions.makeRequest({domain:t,indexName:n})}}),selectors:({selectors:e})=>({isLoading:[()=>[e.status],e=>e===$.a.LOADING]})}),Hi=()=>{Wi.mount();const{deleteDomain:e,hideModal:t}=Object(r.useActions)(Zi),{domain:n,isLoading:a,isHidden:i}=Object(r.useValues)(Zi);return i?null:Object(y.jsx)(S.EuiModal,{onClose:t,"aria-label":N.i18n.translate("xpack.enterpriseSearch.crawler.deleteDomainModal.title",{defaultMessage:"Delete domain"})},Object(y.jsx)(S.EuiModalHeader,null,Object(y.jsx)(S.EuiModalHeaderTitle,null,N.i18n.translate("xpack.enterpriseSearch.crawler.deleteDomainModal.title",{defaultMessage:"Delete domain"}))),Object(y.jsx)(S.EuiModalBody,null,Object(y.jsx)(S.EuiText,null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.crawler.deleteDomainModal.description",defaultMessage:"Remove the domain {domainUrl} from your crawler. This will also delete all entry points and crawl rules you have set up. Any documents related to this domain will be removed on the next crawl. {thisCannotBeUndoneMessage}",values:{domainUrl:Object(y.jsx)("strong",null,null==n?void 0:n.url),thisCannotBeUndoneMessage:Object(y.jsx)("strong",null,N.i18n.translate("xpack.enterpriseSearch.crawler.deleteDomainModal.thisCannotBeUndoneMessage",{defaultMessage:"This cannot be undone."}))}}))),Object(y.jsx)(S.EuiModalFooter,null,Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-crawler-domainManagement-deleteDomain-cancel",onClick:t},zt.e),Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainManagement-deleteDomain-delete",onClick:e,isLoading:a,color:"danger",fill:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.deleteDomainModal.deleteDomainButtonLabel",{defaultMessage:"Delete domain"}))))},Ji=Object(r.kea)({actions:{deleteDomain:()=>!0,deleteDomainComplete:()=>!0,fetchDomainData:e=>({domainId:e}),receiveDomainData:e=>({domain:e}),submitAuthUpdate:e=>({auth:e}),submitDeduplicationUpdate:({fields:e,enabled:t})=>({enabled:t,fields:e}),updateCrawlRules:e=>({crawlRules:e}),updateEntryPoints:e=>({entryPoints:e}),updateExtractionRules:e=>({extractionRules:e}),updateSitemaps:e=>({sitemaps:e})},connect:{actions:[Wi,["apiSuccess as deleteApiSuccess","makeRequest as deleteMakeRequest"]],values:[Wi,["status as deleteStatus"]]},listeners:({actions:e,values:t})=>({deleteApiSuccess:()=>{const{indexName:e}=un.values;p.a.values.navigateToUrl(Object(je.a)(C.n,{indexName:e,tabId:id.DOMAIN_MANAGEMENT}))},deleteDomain:async()=>{const{domain:n}=t,{indexName:a}=un.values;n&&e.deleteMakeRequest({domain:n,indexName:a})},fetchDomainData:async({domainId:t})=>{const{http:n}=d.a.values,{indexName:a}=un.values;try{const i=Kt(await n.get(`/internal/enterprise_search/indices/${a}/crawler/domains/${t}`));e.receiveDomainData(i)}catch(e){Object(Pt.e)(e)}},submitAuthUpdate:async({auth:n})=>{const{http:a}=d.a.values,{indexName:i}=un.values,{domainId:s}=t,r={auth:n};try{const t=Kt(await a.put(`/internal/enterprise_search/indices/${i}/crawler/domains/${s}`,{body:JSON.stringify(r)}));e.receiveDomainData(t)}catch(e){Object(Pt.e)(e)}},submitDeduplicationUpdate:async({fields:n,enabled:a})=>{const{http:i}=d.a.values,{indexName:s}=un.values,{domainId:r}=t,l={deduplication_enabled:a,deduplication_fields:n};try{const t=Kt(await i.put(`/internal/enterprise_search/indices/${s}/crawler/domains/${r}`,{body:JSON.stringify(l)}));e.receiveDomainData(t)}catch(e){Object(Pt.e)(e)}}}),path:["enterprise_search","crawler","crawler_domain_detail_logic"],reducers:({props:e})=>({domain:[null,{receiveDomainData:(e,{domain:t})=>t,updateCrawlRules:(e,{crawlRules:t})=>e?{...e,crawlRules:t}:e,updateEntryPoints:(e,{entryPoints:t})=>e?{...e,entryPoints:t}:e,updateSitemaps:(e,{sitemaps:t})=>e?{...e,sitemaps:t}:e}],domainId:[e.domainId,{fetchDomainData:(e,{domainId:t})=>t}],getLoading:[!0,{receiveDomainData:()=>!1}]}),selectors:({selectors:e})=>({deleteLoading:[()=>[e.deleteStatus],e=>e===$.a.LOADING],extractionRules:[()=>[e.domain],e=>{var t;return null!==(t=null==e?void 0:e.extractionRules)&&void 0!==t?t:[]}]})});var Xi=n(142);const Ki=Object(r.kea)({path:["enterprise_search","app_search","crawler","authentication_panel"],connect:{actions:[Ji,["submitAuthUpdate","receiveDomainData"]]},actions:()=>({deleteCredentials:!0,disableEditing:!0,enableEditing:e=>({currentCrawlerAuth:e}),saveCredentials:!0,selectAuthOption:e=>({authType:e}),setHeaderContent:e=>({headerContent:e}),setIsModalVisible:e=>({isModalVisible:e}),setPassword:e=>({password:e}),setUsername:e=>({username:e})}),reducers:()=>({headerContent:["",{enableEditing:(e,{currentCrawlerAuth:t})=>{return void 0!==t&&null!==(n=t)&&"raw"===n.type?t.header:"";var n},receiveDomainData:()=>"",setHeaderContent:(e,{headerContent:t})=>t}],isEditing:[!1,{disableEditing:()=>!1,enableEditing:()=>!0,receiveDomainData:()=>!1}],isModalVisible:[!1,{receiveDomainData:()=>!1,setIsModalVisible:(e,{isModalVisible:t})=>t}],password:["",{enableEditing:(e,{currentCrawlerAuth:t})=>void 0!==t&&rn(t)?t.password:"",receiveDomainData:()=>"",setPassword:(e,{password:t})=>t}],selectedAuthOption:[null,{enableEditing:(e,{currentCrawlerAuth:t})=>{var n;return null!==(n=null==t?void 0:t.type)&&void 0!==n?n:"basic"},receiveDomainData:()=>null,selectAuthOption:(e,{authType:t})=>t}],username:["",{enableEditing:(e,{currentCrawlerAuth:t})=>void 0!==t&&rn(t)?t.username:"",receiveDomainData:()=>"",setUsername:(e,{username:t})=>t}]}),listeners:({values:e})=>({saveCredentials:()=>{const{headerContent:t,password:n,selectedAuthOption:a,username:i}=e;"basic"===a?Ji.actions.submitAuthUpdate({password:n,type:"basic",username:i}):"raw"===a&&Ji.actions.submitAuthUpdate({header:t,type:"raw"})},deleteCredentials:()=>{Ji.actions.submitAuthUpdate(null)}})}),es=()=>{const{deleteCredentials:e,setIsModalVisible:t}=Object(r.useActions)(Ki);return Object(y.jsx)(S.EuiConfirmModal,{title:N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.deleteConfirmationModal.title",{defaultMessage:"Are you sure you want to delete these settings?"}),onCancel:e=>{null==e||e.preventDefault(),t(!1)},onConfirm:t=>{t.preventDefault(),e()},cancelButtonText:zt.e,confirmButtonText:N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.deleteConfirmationModal.deleteButtonLabel",{defaultMessage:"Delete"}),defaultFocusedButton:"confirm",buttonColor:"danger"},N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.deleteConfirmationModal.description",{defaultMessage:"Deleting these settings might prevent the crawler from indexing protected areas of the domain. This can not be undone."}))},ts=()=>{var e;const{domain:t}=Object(r.useValues)(Ji),n=null!==(e=null==t?void 0:t.auth)&&void 0!==e?e:null,{disableEditing:a,enableEditing:i,saveCredentials:s,setIsModalVisible:l}=Object(r.useActions)(Ki),{isEditing:o}=Object(r.useValues)(Ki);return o?Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-authentication-save",iconType:"checkInCircleFilled",size:"s",color:"primary",onClick:()=>s()},zt.z)),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-authentication-cancel",iconType:"cross",size:"s",color:"danger",onClick:()=>a()},zt.e))):null===n?Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-authentication-addCredentials",color:"success",iconType:"plusInCircle",size:"s",onClick:()=>i(n)},N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.resetToDefaultsButtonLabel",{defaultMessage:"Add credentials"})):Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-authentication-deleteCredentials",color:"primary",size:"s",onClick:()=>{l(!0)}},zt.k)},ns={basic:N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.basicAuthenticationLabel",{defaultMessage:"Basic authentication"}),raw:N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.rawAuthenticationLabel",{defaultMessage:"Authentication header"})},as=()=>{const{selectAuthOption:e,setHeaderContent:t,setPassword:n,setUsername:a}=Object(r.useActions)(Ki),{headerContent:i,username:s,password:l,selectedAuthOption:o}=Object(r.useValues)(Ki);return Object(y.jsx)(S.EuiFormFieldset,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCheckableCard,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-authentication-basicAuthentication",id:"basicAuthenticationCheckableCard",className:"authenticationCheckable",label:Object(y.jsx)(S.EuiTitle,{size:"xxs"},Object(y.jsx)("h5",null,ns.basic)),value:"basic",checked:"basic"===o,onChange:()=>e("basic")},Object(y.jsx)(S.EuiForm,null,Object(y.jsx)(S.EuiFormRow,{label:zt.C},Object(y.jsx)(S.EuiFieldText,{value:s,onChange:e=>a(e.target.value),disabled:"basic"!==o})),Object(y.jsx)(S.EuiFormRow,{label:zt.x},Object(y.jsx)(S.EuiFieldPassword,{type:"dual",value:l,onChange:e=>n(e.target.value),disabled:"basic"!==o}))))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCheckableCard,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-authentication-authenticationHeader",id:"authenticationHeaderCheckableCard",className:"authenticationCheckable",label:Object(y.jsx)(S.EuiTitle,{size:"xxs"},Object(y.jsx)("h5",null,ns.raw)),value:"raw",checked:"raw"===o,onChange:()=>e("raw")},Object(y.jsx)(S.EuiForm,null,Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.editForm.headerValueLabel",{defaultMessage:"Header value"})},Object(y.jsx)(S.EuiFieldPassword,{type:"dual",value:i,onChange:e=>t(e.target.value),disabled:"raw"!==o})))))))};n(261);const is=()=>{const{domain:e}=Object(r.useValues)(Ji);return null!=e&&e.auth?Object(y.jsx)(S.EuiPanel,{color:"subdued",borderRadius:"none",hasShadow:!1},Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.configurationSavePanel.title",{defaultMessage:"Configuration settings saved"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.configurationSavePanel.description",{defaultMessage:"Authentication settings for crawling protected content have been saved. To update an authentication mechanism, delete settings and restart."}))):Object(y.jsx)(S.EuiEmptyPrompt,{title:Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.emptyPrompt.title",{defaultMessage:"No authentication configured"})),body:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.crawler.authenticationPanel.emptyPrompt.description",defaultMessage:"Click {addAuthenticationButtonLabel} to provide the credentials needed to crawl protected content",values:{addAuthenticationButtonLabel:Object(y.jsx)("strong",null,N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.emptyPrompt.addAuthenticationButtonLabel",{defaultMessage:"Add authentication"}))}}),titleSize:"s"})},ss=()=>{const{isEditing:e,isModalVisible:t}=Object(r.useValues)(Ki);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)("div",{className:"authenticationPanel"},Object(y.jsx)(Xi.a,{actions:[Object(y.jsx)(ts,null)],description:Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.crawler.authenticationPanel.description",defaultMessage:"Setup authentication to enable crawling protected content for this domain."})),title:Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.authenticationPanel.title",{defaultMessage:"Authentication"})))}),Object(y.jsx)(S.EuiSpacer,{size:"l"}),e?Object(y.jsx)(as,null):Object(y.jsx)(is,null)),t&&Object(y.jsx)(es,null))};var rs=n(103);const ls=e=>{switch(e){case Wt.beginsWith:return N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesCrawlerRules.beginsWithLabel",{defaultMessage:"Begins with"});case Wt.endsWith:return N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesCrawlerRules.endsWithLabel",{defaultMessage:"Ends with"});case Wt.contains:return N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesCrawlerRules.containsLabel",{defaultMessage:"Contains"});case Wt.regex:return N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesCrawlerRules.regexLabel",{defaultMessage:"Regex"})}},os=e=>{switch(e){case qt.allow:return N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesPolicies.allowLabel",{defaultMessage:"Allow"});case qt.deny:return N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesPolicies.disallowLabel",{defaultMessage:"Disallow"})}},cs=e=>e.rule===Wt.regex?N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesTable.regexPathPatternTooltip",{defaultMessage:"The path pattern is a regular expression compatible with the Ruby language regular expression engine."}):N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesTable.pathPatternTooltip",{defaultMessage:"The path pattern is a literal string except for the asterisk (*) character, which is a meta character that will match anything."}),us=Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.crawler.crawlRulesTable.description",defaultMessage:"Create a crawl rule to include or exclude pages whose URL matches the rule. Rules run in sequential order, and each URL is evaluated according to the first match."}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiLink,{href:k.a.crawlerManaging,target:"_blank",external:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesTable.descriptionLinkText",{defaultMessage:"Learn more about crawl rules"}))),ds=({description:e=us,domainId:t,indexName:n,crawlRules:a,defaultCrawlRule:i,title:s})=>{const{updateCrawlRules:l}=Object(r.useActions)(Ji),o=[{editingRender:(e,t,{isInvalid:n,isLoading:a})=>Object(y.jsx)(S.EuiSelect,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-crawlRules-policy",fullWidth:!0,hasNoInitialSelection:!0,value:e.policy,onChange:e=>t(e.target.value),disabled:a,isInvalid:n,options:[qt.allow,qt.deny].map((e=>({text:os(e),value:e})))}),field:"policy",name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesTable.policyTableHead",{defaultMessage:"Policy"}),render:e=>Object(y.jsx)(S.EuiText,{size:"s"},os(e.policy))},{editingRender:(e,t,{isInvalid:n,isLoading:a})=>Object(y.jsx)(S.EuiSelect,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-crawlRules-rule",fullWidth:!0,hasNoInitialSelection:!0,value:e.rule,onChange:e=>t(e.target.value),disabled:a,isInvalid:n,options:[Wt.beginsWith,Wt.endsWith,Wt.contains,Wt.regex].map((e=>({text:ls(e),value:e})))}),field:"rule",name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesTable.ruleTableHead",{defaultMessage:"Rule"}),render:e=>Object(y.jsx)(S.EuiText,{size:"s"},ls(e.rule))},{editingRender:(e,t,{isInvalid:n,isLoading:a})=>Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"s",responsive:!1},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFieldText,{fullWidth:!0,value:e.pattern,onChange:e=>t(e.target.value),disabled:a,isInvalid:n})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIconTip,{content:cs(e),type:"iInCircle",position:"top"}))),field:"pattern",name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesTable.pathPatternTableHead",{defaultMessage:"Path pattern"}),render:e=>Object(y.jsx)(S.EuiCode,null,e.pattern)}],c=`/internal/enterprise_search/indices/${n}/crawler/domains/${t}/crawl_rules`,u=`/internal/enterprise_search/indices/${n}/crawler/domains/${t}`,d=e=>`/internal/enterprise_search/indices/${n}/crawler/domains/${t}/crawl_rules/${e.id}`;return Object(y.jsx)(rs.a,{addButtonText:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesTable.addButtonLabel",{defaultMessage:"Add crawl rule"}),columns:o,description:e,instanceId:"CrawlRulesTable",items:a,addRoute:c,dataProperty:"crawl_rules",deleteRoute:d,updateRoute:d,reorderRoute:u,onAdd:(e,t)=>{l(t),Object(Pt.d)()},onDelete:(e,t)=>{l(t),Object(Pt.d)(),Object(Pt.g)(N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesTable.deleteSuccessToastMessage",{defaultMessage:"The crawl rule has been deleted."}))},onUpdate:(e,t)=>{l(t),Object(Pt.d)()},onReorder:e=>{l(e),Object(Pt.d)()},title:s||"",uneditableItems:i?[i]:void 0,canRemoveLastItem:!0})},ps=e=>e.filter((e=>e.checked)).map((e=>e.label));n(504);const gs=()=>{const{domain:e}=Object(r.useValues)(Ji),{submitDeduplicationUpdate:t}=Object(r.useActions)(Ji),[n,s]=Object(a.useState)(!0),[l,o]=Object(a.useState)(!1);if(!e)return null;const{deduplicationEnabled:c,deduplicationFields:u}=e,d=((e,t)=>{const{availableDeduplicationFields:n,deduplicationFields:a,deduplicationEnabled:i}=e;let s;return s=t?n.map((e=>({label:e,checked:a.includes(e)?"on":void 0}))):n.filter((e=>a.includes(e))).map((e=>({label:e,checked:"on"}))),i||(s=s.map((e=>({...e,disabled:!0})))),s})(e,n);return Object(y.jsx)("div",{className:"deduplicationPanel"},Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Xi.a,{title:Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.deduplicationPanel.title",{defaultMessage:"Duplicate document handling"}))),actions:Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-deduplication-reset",color:"warning",iconType:"refresh",size:"s",onClick:()=>t({fields:[]}),disabled:0===u.length},N.i18n.translate("xpack.enterpriseSearch.crawler.deduplicationPanel.resetToDefaultsButtonLabel",{defaultMessage:"Reset to defaults"})),description:Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.crawler.deduplicationPanel.description",defaultMessage:"The web crawler only indexes unique pages. Choose which fields the crawler should use when considering which pages are duplicates. Deselect all schema fields to allow duplicate documents on this domain."})),links:Object(y.jsx)(S.EuiLink,{href:k.a.crawlerManaging,external:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.deduplicationPanel.learnMoreMessage",{defaultMessage:"Learn more about content hashing"}))}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiSwitch,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-deduplication-preventDuplicates",label:N.i18n.translate("xpack.enterpriseSearch.crawler.deduplicationPanel.preventDuplicateLabel",{defaultMessage:"Prevent duplicate documents"}),checked:c,onChange:()=>t(c?{enabled:!1,fields:[]}:{enabled:!0})}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("div",{className:"selectableWrapper"},Object(y.jsx)(S.EuiSelectable,{options:d,onChange:e=>t({fields:ps(e)}),searchable:!0,searchProps:{disabled:!c,append:Object(y.jsx)(S.EuiPopover,{button:Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-deduplication-selectFields",size:"xs",iconType:"arrowDown",iconSide:"right",onClick:()=>o(!l),className:"showAllFieldsPopoverToggle",disabled:!c},n?N.i18n.translate("xpack.enterpriseSearch.crawler.deduplicationPanel.allFieldsLabel",{defaultMessage:"All fields"}):N.i18n.translate("xpack.enterpriseSearch.crawler.deduplicationPanel.selectedFieldsLabel",{defaultMessage:"Selected fields"})),isOpen:l,closePopover:()=>o(!1),panelPaddingSize:"none",anchorPosition:"downLeft"},Object(y.jsx)(S.EuiContextMenuPanel,{items:[Object(y.jsx)(S.EuiContextMenuItem,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-deduplication-showAllFields",key:"all fields",icon:n?"check":"empty",onClick:()=>{s(!0),o(!1)}},N.i18n.translate("xpack.enterpriseSearch.crawler.deduplicationPanel.showAllFieldsButtonLabel",{defaultMessage:"Show all fields"})),Object(y.jsx)(S.EuiContextMenuItem,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-deduplication-showSelectedFields",key:"selected fields",icon:n?"empty":"check",onClick:()=>{s(!1),o(!1)}},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusIndicator.showSelectedFieldsButtonLabel",{defaultMessage:"Show only selected fields"}))]}))}},((e,t)=>Object(y.jsx)(i.a.Fragment,null,t,e)))))))},js=Object(r.kea)({path:["enterprise_search","app_search","crawler","entry_points_table"],actions:()=>({onAdd:(e,t)=>({entryPoint:e,entryPoints:t}),onDelete:(e,t)=>({entryPoint:e,entryPoints:t}),onUpdate:(e,t)=>({entryPoint:e,entryPoints:t})}),listeners:()=>({onAdd:({entryPoints:e})=>{Ji.actions.updateEntryPoints(e),Object(Pt.d)()},onDelete:({entryPoint:e,entryPoints:t})=>{Ji.actions.updateEntryPoints(t),Object(Pt.d)(),Object(Pt.g)(`Entry point "${e.value}" was removed.`)},onUpdate:({entryPoints:e})=>{Ji.actions.updateEntryPoints(e),Object(Pt.d)()}})}),xs=({domain:e,indexName:t,items:n,title:a})=>{const{onAdd:s,onDelete:l,onUpdate:o}=Object(r.useActions)(js),c="value",u=[{editingRender:(t,n,{isInvalid:a,isLoading:i})=>Object(y.jsx)(S.EuiFieldText,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-entryPoints-editEntryPoint",fullWidth:!0,value:t[c],onChange:e=>n(e.target.value),disabled:i,isInvalid:a,prepend:e.url}),render:t=>Object(y.jsx)(S.EuiText,{size:"s"},e.url,t[c]),name:N.i18n.translate("xpack.enterpriseSearch.crawler.entryPointsTable.urlTableHead",{defaultMessage:"URL"}),field:c}],d=`/internal/enterprise_search/indices/${t}/crawler/domains/${e.id}/entry_points`,p=n=>`/internal/enterprise_search/indices/${t}/crawler/domains/${e.id}/entry_points/${n.id}`;return Object(y.jsx)(rs.a,{addButtonText:N.i18n.translate("xpack.enterpriseSearch.crawler.entryPointsTable.addButtonLabel",{defaultMessage:"Add entry point"}),columns:u,description:Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.crawler.entryPointsTable.description",{defaultMessage:"Include the most important URLs for your website here. Entry point URLs will be the first pages to be indexed and processed for links to other pages."}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiLink,{href:k.a.crawlerManaging,target:"_blank",external:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.entryPointsTable.learnMoreLinkText",{defaultMessage:"Learn more about entry points."}))),instanceId:"EntryPointsTable",items:n,lastItemWarning:N.i18n.translate("xpack.enterpriseSearch.crawler.entryPointsTable.lastItemMessage",{defaultMessage:"The crawler requires at least one entry point."}),noItemsMessage:e=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.crawler.entryPointsTable.emptyMessageTitle",{defaultMessage:"There are no existing entry points."}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.crawler.entryPointsTable.emptyMessageDescription",defaultMessage:"{link} to specify an entry point for the crawler",values:{link:Object(y.jsx)(S.EuiLink,{onClick:e},N.i18n.translate("xpack.enterpriseSearch.crawler.entryPointsTable.emptyMessageLinkText",{defaultMessage:"Add an entry point"}))}})),Object(y.jsx)(S.EuiSpacer,null)),addRoute:d,canRemoveLastItem:!1,deleteRoute:p,updateRoute:p,dataProperty:"entry_points",onAdd:s,onDelete:l,onUpdate:o,title:a,disableReordering:!0})};var Ms=n(262);let hs,ms,fs,bs;!function(e){e.HTML="html",e.URL="url"}(hs||(hs={})),function(e){e.BEGINS="begins",e.ENDS="ends",e.CONTAINS="contains",e.REGEX="regex"}(ms||(ms={})),function(e){e.FIXED="fixed",e.EXTRACTED="extracted"}(fs||(fs={})),function(e){e.ARRAY="array",e.STRING="string"}(bs||(bs={}));const ys=({editRule:e,fieldRules:t,removeRule:n})=>{const a=[{field:"field_name",name:N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRules.fieldRulesTable.fieldNameLabel",{defaultMessage:"Field name"}),textOnly:!0},{name:N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesTable.sourceLabel",{defaultMessage:"Source"}),render:e=>Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiText,{size:"s"},e.source_type===hs.HTML?N.i18n.translate("xpack.enterpriseSearch.crawler.fieldRulesTable.HTMLLabel",{defaultMessage:"HTML: "}):N.i18n.translate("xpack.enterpriseSearch.crawler.fieldRulesTable.UrlLabel",{defaultMessage:"URL: "}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCode,null,e.selector)))},{name:N.i18n.translate("xpack.enterpriseSearch.crawler.fieldRulesTable.contentLabel",{defaultMessage:"Content"}),render:({content_from:e,multiple_objects_handling:t})=>Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiText,{size:"s"},e.value_type===fs.EXTRACTED?N.i18n.translate("xpack.enterpriseSearch.crawler.fieldRulesTable.extractedLabel",{defaultMessage:"Extracted as: "}):N.i18n.translate("xpack.enterpriseSearch.crawler.fieldRulesTable.fixedLabel",{defaultMessage:"Fixed value: "}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCode,null,e.value_type===fs.FIXED?e.value:t===bs.ARRAY?N.i18n.translate("xpack.enterpriseSearch.crawler.fieldRulesTable.arrayLabel",{defaultMessage:"array"}):N.i18n.translate("xpack.enterpriseSearch.crawler.fieldRulesTable.stringLabel",{defaultMessage:"string"}))))},{actions:[{description:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.fieldRulesTable.editRule.title",{defaultMessage:"Edit this content field rule"}),icon:"pencil",isPrimary:!1,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.fieldRulesTable.editRule.caption",{defaultMessage:"Edit this content field rule"}),onClick:({id:t})=>e(t),type:"icon"},{color:"danger",description:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.deleteRule.title",{defaultMessage:"Delete this extraction rule"}),icon:"trash",isPrimary:!1,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.deleteRule.caption",{defaultMessage:"Delete extraction rule"}),onClick:({id:e})=>n(e),type:"icon"}],name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.label",{defaultMessage:"Actions"})}];return Object(y.jsx)(S.EuiBasicTable,{columns:a,items:t,title:N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesTable.title",{defaultMessage:"Crawl rules"})})},Os=({contentFields:e,editNewField:t,editExistingField:n,removeField:a})=>0===e.length?Object(y.jsx)(S.EuiEmptyPrompt,{title:Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.fieldRules.emptyMessageTitle",{defaultMessage:"This extraction rule has no content fields"})),titleSize:"s",body:Object(y.jsx)(S.EuiText,null,N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.fieldRules.emptyMessageDescription",{defaultMessage:"Create a content field to pinpoint which parts of a webpage to pull data from."})),actions:Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-addContentFirstContentField",iconType:"plusInCircle",onClick:t},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.fieldRules.emptyMessageAddRuleLabel",{defaultMessage:"Add content fields"}))}):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.fieldRules.contentFieldDescription",{defaultMessage:"Create a content field to pinpoint which parts of a webpage to pull data from."})))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-addContentFieldRule",iconType:"plusInCircle",onClick:t},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.fieldRules.addContentFieldRuleLabel",{defaultMessage:"Add content field rule"})))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(ys,{editRule:n,fieldRules:e,removeRule:a})),Is={content_from:{value:"",value_type:void 0},field_name:"",multiple_objects_handling:bs.STRING,selector:"",source_type:void 0},Ss=({onClose:e,fieldRule:t,isNewRule:n,saveRule:s})=>{const{control:r,reset:l,getValues:o,formState:c}=Object(Ms.useForm)({defaultValues:null!=t?t:Is,mode:"all"});return Object(a.useEffect)((()=>{l(null!=t?t:Is)}),[t]),Object(y.jsx)(S.EuiFlyout,{onClose:e},Object(y.jsx)(S.EuiFlyoutHeader,{hasBorder:!0},Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h2",null,n?N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.addContentField.title",{defaultMessage:"Add content field rule"}):N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.title",{defaultMessage:"Edit content field rule"})))),Object(y.jsx)(S.EuiFlyoutBody,null,Object(y.jsx)(S.EuiForm,{component:"form"},Object(y.jsx)(S.EuiPanel,{paddingSize:"l",color:"subdued",hasShadow:!1},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.documentField.title",{defaultMessage:"Document field"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.documentField.description",{defaultMessage:"Select a document field to build a rule around."})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Ms.Controller,{control:r,name:"field_name",rules:{validate:e=>!(null==e||!e.trim())||N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.edilidtContentField.documentField.requiredError",{defaultMessage:"A field name is required."})},render:({field:e,fieldState:{error:t,isTouched:n}})=>{var a;return Object(y.jsx)(S.EuiFormRow,{error:null==t?void 0:t.message,isInvalid:!!t&&n,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.documentField.label",{defaultMessage:"Field name"})},Object(y.jsx)(S.EuiFieldText,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-editContentRuleFieldName",isInvalid:!!t&&n,fullWidth:!0,value:null!==(a=e.value)&&void 0!==a?a:"",onBlur:e.onBlur,onChange:e.onChange,inputRef:e.ref}))}})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiPanel,{paddingSize:"l",color:"subdued",hasShadow:!1},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.source.title",{defaultMessage:"Source"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.source.description",{defaultMessage:"Where to extract the content for this field from."})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Ms.Controller,{control:r,name:"source_type",rules:{validate:e=>!(null==e||!e.trim())||N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.source.requiredError",{defaultMessage:"A source for the content is required."})},render:({field:e})=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.source.label",{defaultMessage:"Extract content from"})},Object(y.jsx)(S.EuiRadioGroup,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-editContentRuleSource",options:[{id:hs.HTML,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.source.htmlLabel",{defaultMessage:"HTML element"})},{id:hs.URL,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.source.urlLabel",{defaultMessage:"URL"})}],idSelected:e.value,onChange:e.onChange,onBlur:e.onBlur})),!!e.value&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFormRow,{fullWidth:!0,label:e.value===hs.HTML?N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.htmlLabel",{defaultMessage:"CSS selector or XPath expression"}):N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.urlLabel",{defaultMessage:"URL pattern"})},Object(y.jsx)(Ms.Controller,{control:r,name:"selector",render:({field:t,fieldState:{error:n,isTouched:a}})=>{var i;return Object(y.jsx)(S.EuiFieldText,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-editContentRuleSelector",isInvalid:!!n&&a,fullWidth:!0,placeholder:e.value===hs.HTML?N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.selector.cssPlaceholder",{defaultMessage:'e.g. ".main_content"'}):N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.selector.urlLabel",{defaultMessage:"e.g. /my-url/(.*/"}),inputRef:t.ref,onBlur:t.onBlur,onChange:t.onChange,value:null!==(i=t.value)&&void 0!==i?i:""})}})),Object(y.jsx)(S.EuiSpacer,null),e.value===hs.HTML?Object(y.jsx)(S.EuiLink,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-learnMoreCSSSelectors",href:`${k.a.crawlerExtractionRules}#crawler-extraction-rules-css-selectors`,external:!0},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.contentField.cssSelectorsLink",{defaultMessage:"Learn more about CSS selectors and XPath expressions"})):Object(y.jsx)(S.EuiLink,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-learnMoreUrlPatterns",href:`${k.a.crawlerExtractionRules}#crawler-extraction-rules-url-patterns`,external:!0},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.contentField.urlPatternsLinks",{defaultMessage:"Learn more about URL patterns"}))))})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiPanel,{paddingSize:"l",color:"subdued",hasShadow:!1},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.title",{defaultMessage:"Content"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.description",{defaultMessage:"Populate the field with content."})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Ms.Controller,{control:r,name:"content_from.value_type",rules:{validate:e=>!(null==e||!e.trim())||N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.requiredError",{defaultMessage:"A value for this content field is required"})},render:({field:e,fieldState:{error:t,isTouched:n}})=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.label",{defaultMessage:"Use content from"}),isInvalid:!!t&&n,error:t},Object(y.jsx)(S.EuiRadioGroup,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-editContentRuleExtraction",options:[{id:fs.EXTRACTED,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.extractedLabel",{defaultMessage:"Extracted value"})},{id:fs.FIXED,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.fixedLabel",{defaultMessage:"A fixed value"})}],idSelected:e.value,onChange:e.onChange,onBlur:e.onBlur})),e.value===fs.EXTRACTED?Object(y.jsx)(Ms.Controller,{control:r,name:"multiple_objects_handling",rules:{required:!0},render:({field:e,fieldState:{error:t,isTouched:n}})=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFormRow,{isInvalid:!!t&&n,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.extractAs.label",{defaultMessage:"Store extracted content as"})},Object(y.jsx)(S.EuiRadioGroup,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-editContentRuleMultipleObjects",options:[{id:bs.STRING,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.extractAs.stringLabel",{defaultMessage:"A string"})},{id:bs.ARRAY,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.content.extractAs.arrayLabel",{defaultMessage:"An array"})}],idSelected:e.value,onChange:e.onChange,onBlur:e.onBlur})))}):e.value===fs.FIXED&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Ms.Controller,{control:r,name:"content_from.value",render:({field:e})=>{var t;return Object(y.jsx)(S.EuiFormRow,{helpText:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.fixedValue.helpText",{defaultMessage:"Use a fixed value for this document field."}),label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.fixedValue.label",{defaultMessage:"Fixed value"})},Object(y.jsx)(S.EuiFieldText,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-editContentRuleFixedValue",fullWidth:!0,placeholder:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.fixedValue.placeHolder",{defaultMessage:'e.g., "Some Value'}),value:null!==(t=e.value)&&void 0!==t?t:"",onChange:e.onChange,inputRef:e.ref,onBlur:e.onBlur}))}})))}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiLink,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-learnMoreDifferentContent",href:`${k.a.crawlerExtractionRules}#crawler-extraction-rules-field-content`,external:!0},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.contentField.differentContentLink",{defaultMessage:"Learn more about storing different kinds of content"}))))),Object(y.jsx)(S.EuiFlyoutFooter,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{onClick:e},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.cancelButton.label",{defaultMessage:"Cancel"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-saveContentField",disabled:!c.isValid,onClick:()=>{s({...o()})},fill:!0},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editContentField.saveButton.label",{defaultMessage:"Save"}))))))},Ns=Object(V.a)(["add_extraction_rule_api_logic"],(async({domainId:e,indexName:t,rule:{description:n,rules:a,url_filters:i}})=>{const s=`/internal/enterprise_search/indices/${t}/crawler/domains/${e}/extraction_rules`,r={extraction_rule:{description:n,rules:a,url_filters:i}};return await d.a.values.http.post(s,{body:JSON.stringify(r)})})),Es=Object(V.a)(["delete_extraction_rule_api_logic"],(async({domainId:e,extractionRuleId:t,indexName:n})=>{const a=`/internal/enterprise_search/indices/${n}/crawler/domains/${e}/extraction_rules/${t}`;return await d.a.values.http.delete(a)})),Ds=Object(V.a)(["fetch_extraction_rule_api_logic"],(async({domainId:e,indexName:t})=>{const n=`/internal/enterprise_search/indices/${t}/crawler/domains/${e}/extraction_rules`;return await d.a.values.http.get(n)})),Ts=Object(V.a)(["update_extraction_rule_api_logic"],(async({domainId:e,indexName:t,rule:n})=>{const a=`/internal/enterprise_search/indices/${t}/crawler/domains/${e}/extraction_rules/${n.id}`,i={extraction_rule:{description:n.description,rules:n.rules,url_filters:n.url_filters}};return await d.a.values.http.put(a,{body:JSON.stringify(i)})})),ws=Object(r.kea)({actions:{cancelEditExtractionRule:!0,closeEditRuleFlyout:!0,deleteExtractionRule:!0,deleteFieldRule:!0,editExtractionRule:e=>({extractionRule:e}),editNewExtractionRule:!0,hideDeleteFieldModal:!0,hideDeleteModal:!0,openEditRuleFlyout:({fieldRule:e,isNewRule:t})=>({fieldRule:e,isNewRule:t}),saveExtractionRule:e=>({extractionRule:e}),showDeleteFieldModal:({fieldRuleIndex:e,extractionRuleId:t})=>({extractionRuleId:t,fieldRuleIndex:e}),showDeleteModal:e=>({extractionRule:e})},connect:{actions:[Ns,["makeRequest as addExtractionRule","apiSuccess as addExtractionRuleSuccess"],Ji,["receiveDomainData"],Es,["makeRequest as deleteExtractionRuleRequest","apiSuccess as deleteExtractionRuleSuccess"],Ds,["makeRequest as fetchExtractionRules","apiSuccess as fetchExtractionRulesSuccess"],Ts,["makeRequest as updateExtractionRule","apiSuccess as updateExtractionRuleSuccess"]],values:[Ns,["status as addStatus"],Ji,["domain","domainId","extractionRules as domainExtractionRules","getLoading as isLoading"],Es,["status as deleteStatus"],un,["indexName"],Ts,["status as updateStatus"]]},events:({actions:e,values:t})=>({beforeUnmount:()=>{e.fetchDomainData(t.domainId)}}),listeners:({actions:e,values:t})=>({deleteExtractionRule:()=>{var n;t.extractionRuleToDelete&&e.deleteExtractionRuleRequest({domainId:t.domainId,extractionRuleId:null===(n=t.extractionRuleToDelete)||void 0===n?void 0:n.id,indexName:t.indexName})},deleteExtractionRuleSuccess:()=>{e.hideDeleteModal()},deleteFieldRule:()=>{const{extractionRuleId:n,fieldRuleIndex:a}=t.fieldRuleToDelete,i=t.extractionRules.find((({id:e})=>e===n));if(i){const n=i.rules.filter(((e,t)=>t!==a));e.updateExtractionRule({domainId:t.domainId,indexName:t.indexName,rule:{...i,rules:n}})}},saveExtractionRule:({extractionRule:n})=>{t.extractionRuleToEditIsNew?e.addExtractionRule({domainId:t.domainId,indexName:t.indexName,rule:n}):t.extractionRuleToEdit&&e.updateExtractionRule({domainId:t.domainId,indexName:t.indexName,rule:{...t.extractionRuleToEdit,...n}})}}),path:["enterprise_search","content","crawler","extraction_rules"],reducers:()=>({deleteFieldModalVisible:[!1,{hideDeleteFieldModal:()=>!1,showDeleteFieldModal:()=>!0,updateExtractionRuleSuccess:()=>!1}],deleteModalVisible:[!1,{deleteExtractionRuleSuccess:()=>!1,hideDeleteModal:()=>!1,showDeleteModal:()=>!0}],editingExtractionRule:[!1,{addExtractionRuleSuccess:()=>!1,cancelEditExtractionRule:()=>!1,editExtractionRule:()=>!0,editNewExtractionRule:()=>!0,updateExtractionRuleSuccess:()=>!1}],extractionRuleToDelete:[null,{deleteExtractionRuleSuccess:()=>null,hideDeleteModal:()=>null,showDeleteModal:(e,{extractionRule:t})=>t}],extractionRuleToEdit:[null,{addSuccess:()=>null,cancelEditExtractionRule:()=>null,editExtractionRule:(e,{extractionRule:t})=>t,updateSuccess:()=>null,updateExtractionRuleSuccess:()=>null}],extractionRuleToEditIsNew:[!1,{addSuccess:()=>!1,editNewExtractionRule:()=>!0,editExtractionRule:()=>!1,updateExtractionRuleSuccess:()=>!1}],fieldRuleFlyoutVisible:[!1,{addExtractionRuleSuccess:()=>!1,closeEditRuleFlyout:()=>!1,openEditRuleFlyout:()=>!0,updateExtractionRuleSuccess:()=>!1}],fieldRuleToDelete:[{},{hideDeleteFieldModal:()=>({}),showDeleteFieldModal:(e,{extractionRuleId:t,fieldRuleIndex:n})=>({extractionRuleId:t,fieldRuleIndex:n}),updateExtractionRuleSuccess:()=>({})}],fieldRuleToEdit:[null,{closeEditRuleFlyout:()=>null,openEditRuleFlyout:(e,{fieldRule:t})=>null!=t?t:null}],fieldRuleToEditIsNew:[!0,{closeEditRuleFlyout:()=>!0,openEditRuleFlyout:(e,{isNewRule:t})=>t}],updatedExtractionRules:[null,{addExtractionRuleSuccess:(e,{extraction_rules:t})=>t,deleteExtractionRuleSuccess:(e,{extraction_rules:t})=>t,receiveDomainData:()=>null,updateExtractionRuleSuccess:(e,{extraction_rules:t})=>t}]}),selectors:({selectors:e})=>({extractionRules:[()=>[e.domainExtractionRules,e.updatedExtractionRules],(e,t)=>{var n;return null!==(n=null!=t?t:e)&&void 0!==n?n:[]}],isLoadingUpdate:[()=>[e.updateStatus,e.deleteStatus,e.addStatus],(e,t,n)=>[e,t,n].includes($.a.LOADING)]})});var vs;!function(e){e.ALL="all",e.SPECIFIC="specific"}(vs||(vs={}));const Cs=e=>{switch(e){case ms.BEGINS:return N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesExtractionFilter.beginsWithLabel",{defaultMessage:"Begins with"});case ms.ENDS:return N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesExtractionFilter.endsWithLabel",{defaultMessage:"Ends with"});case ms.CONTAINS:return N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesExtractionFilter.containsLabel",{defaultMessage:"Contains"});case ms.REGEX:return N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesExtractionFilter.regexLabel",{defaultMessage:"Regex"})}},ks=[ms.BEGINS,ms.ENDS,ms.CONTAINS,ms.REGEX].map((e=>({text:Cs(e),value:e}))),As=({cancelEditing:e,extractionRule:t,isNewRule:n,saveRule:s})=>{const{closeEditRuleFlyout:l,openEditRuleFlyout:o}=Object(r.useActions)(ws),{fieldRuleFlyoutVisible:c,fieldRuleToEdit:u,fieldRuleToEditIsNew:d}=Object(r.useValues)(ws),[p,g]=Object(a.useState)(vs.ALL),{control:j,formState:x,getValues:M,handleSubmit:h,reset:m,setValue:f}=Object(Ms.useForm)({defaultValues:null!=t?t:{description:"",rules:[],url_filters:[]},mode:"all"}),{append:b,fields:O,remove:I}=Object(Ms.useFieldArray)({control:j,name:"url_filters"}),{append:E,fields:D,remove:T,update:w}=Object(Ms.useFieldArray)({control:j,name:"rules"});return Object(a.useEffect)((()=>{m(null!=t?t:{description:"",rules:[],url_filters:[]}),g(t?0===t.url_filters.length?vs.ALL:vs.SPECIFIC:vs.ALL)}),[t]),Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h3",null,n?N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.addRule.title",{defaultMessage:"Create a content extraction rule"}):N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.title",{defaultMessage:"Edit content extraction rule"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiForm,{onSubmit:h(s)},Object(y.jsx)(Ms.Controller,{control:j,name:"description",rules:{validate:e=>{if(null==e||!e.trim())return N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.descriptionError",{defaultMessage:"A description is required for a content extraction rule"})}},render:({field:e,fieldState:t})=>{var n,a;return Object(y.jsx)(S.EuiFormRow,{error:null===(n=t.error)||void 0===n?void 0:n.message,isInvalid:!(!t.error||!t.isTouched),helpText:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.helpText",{defaultMessage:"Help others understand what data this rule will extract"}),label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.descriptionLabel",{defaultMessage:"Rule description"})},Object(y.jsx)(S.EuiFieldText,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-editRuleDescription",isInvalid:!(!t.error||!t.isTouched),value:null!==(a=e.value)&&void 0!==a?a:"",onBlur:e.onBlur,onChange:e.onChange,inputRef:e.ref,placeholder:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.placeholderLabel",{defaultMessage:'e.g. "Documentation Titles"'})}))}}),Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.urlLabel",{defaultMessage:"URL"})},Object(y.jsx)(S.EuiRadioGroup,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-editRuleUrlFilters",options:[{id:vs.ALL,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.url.applyAllLabel",{defaultMessage:"Apply to all URLs"})},{id:vs.SPECIFIC,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.url.specificLabel",{defaultMessage:"Apply to specific URLs"})}],idSelected:p,onChange:e=>{g(e),e===vs.SPECIFIC&&O.length<1?f("url_filters",[{filter:ms.BEGINS,pattern:""}]):f("url_filters",[])}})),Object(y.jsx)(S.EuiSpacer,null),p===vs.SPECIFIC&&Object(y.jsx)(i.a.Fragment,null,O.map(((e,t)=>Object(y.jsx)(S.EuiFlexGroup,{alignItems:"flexStart",key:e.id},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ms.Controller,{control:j,name:`url_filters.${t}.filter`,render:({field:e})=>Object(y.jsx)(S.EuiFormRow,{helpText:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.url.urlFilters.filterHelpText",{defaultMessage:"What URLs should this apply to?"}),label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.url.urlFilters.filterLabel",{defaultMessage:"URL filter"})},Object(y.jsx)(S.EuiSelect,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-urlFilter",fullWidth:!0,inputRef:e.ref,value:e.value,onBlur:e.onBlur,onChange:e.onChange,options:ks}))})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ms.Controller,{control:j,name:`url_filters.${t}.pattern`,render:({field:e})=>{var t;return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.url.urlFilter.",{defaultMessage:"URL pattern"})},Object(y.jsx)(S.EuiFieldText,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-urlPattern",fullWidth:!0,placeholder:N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.url.urlFilters.patternPlaceholder",{defaultMessage:'e.g. "/blog/*"'}),value:null!==(t=e.value)&&void 0!==t?t:"",onChange:e.onChange,onBlur:e.onBlur,inputRef:e.ref})),Object(y.jsx)(S.EuiSpacer,null))}})),Object(y.jsx)(S.EuiFlexItem,{style:{alignSelf:"center"}},O.length>1&&Object(y.jsx)(S.EuiButtonIcon,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-removeUrlFilter","aria-label":N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.url.urlFilters.removeFilter",{defaultMessage:"Remove this filter"}),iconType:"trash",color:"danger",onClick:()=>I(t)}))))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-addUrlFilter",iconType:"plusInCircle",onClick:()=>b({filter:ms.BEGINS,pattern:""})},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.url.urlFilters.addFilter",{defaultMessage:"Add URL filter"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiLink,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-learnMoreUrlFilters",href:`${k.a.crawlerExtractionRules}#crawler-extraction-rules-html-filters`,external:!0},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.url.urlFiltersLink",{defaultMessage:"Learn more about URL filters"})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiPanel,{color:"subdued"},Object(y.jsx)(Os,{contentFields:D,editExistingField:e=>o({fieldRule:D.find((({id:t})=>t===e)),isNewRule:!1}),editNewField:()=>o({isNewRule:!0}),removeField:e=>{const t=D.findIndex((({id:t})=>t===e));t>=0&&T(t)}})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFormRow,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-cancelEditExtractionRule",onClick:e},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.cancelButtonLabel",{defaultMessage:"Cancel"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-saveExtractionRule",type:"submit",onClick:()=>s({...M()}),disabled:!x.isValid},N.i18n.translate("xpack.enterpriseSearch.content.indices.extractionRules.editRule.saveButtonLabel",{defaultMessage:"Save rule"})))))),c&&Object(y.jsx)(Ss,{fieldRule:u,isNewRule:d,onClose:l,saveRule:({id:e,index:t,...n})=>{if(d)E(n);else{const t=D.findIndex((({id:t})=>t===e));w(null!=t?t:0,n)}l()}}))},Ls=()=>{const{deleteFieldRule:e,editExtractionRule:t,hideDeleteFieldModal:n,openEditRuleFlyout:s,showDeleteFieldModal:l,showDeleteModal:o}=Object(r.useActions)(ws),{deleteFieldModalVisible:c,extractionRules:u}=Object(r.useValues)(ws),[d,p]=Object(a.useState)({});Object(a.useEffect)((()=>{p({})}),[u]);const g=e=>{if(d[e.id]){const{[e.id]:t,...n}=d;p(n)}else{const n=e.rules.map(((e,t)=>({...e,id:`${t}`,index:t}))),a=Object(y.jsx)(S.EuiPanel,{color:"subdued"},Object(y.jsx)(Os,{contentFields:n,editExistingField:a=>{t(e);const i=n.find((({id:e})=>a===e));i&&s({fieldRule:i,isNewRule:!1})},editNewField:()=>{t(e),s({isNewRule:!0})},removeField:t=>{const a=n.find((({id:e})=>t===e));a&&l({extractionRuleId:e.id,fieldRuleIndex:a.index})}}));p({...d,[e.id]:a})}},j=[{field:"description",name:N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesTable.descriptionTableLabel",{defaultMessage:"Description"}),textOnly:!0},{field:"url_filters",name:N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesTable.urlsLabel",{defaultMessage:"URLs"}),render:e=>Object(y.jsx)(S.EuiFlexGroup,{alignItems:"flexStart",direction:"column",gutterSize:"xs"},e.length>0?e.map((({pattern:e},t)=>Object(y.jsx)(S.EuiFlexItem,{key:`${t}`},Object(y.jsx)(S.EuiCode,null,e)))):Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCode,null,"/*")))},{name:N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesTable.rulesLabel",{defaultMessage:"Field rules"}),render:e=>Object(y.jsx)(S.EuiButtonEmpty,{onClick:()=>g(e)},e.rules.length),textOnly:!0},{field:"updated_at",name:N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesTable.lastUpdatedLabel",{defaultMessage:"Last updated"}),render:e=>Object(y.jsx)(E.FormattedRelative,{value:e}),textOnly:!0},{field:"edited_by",name:N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesTable.editedByLabel",{defaultMessage:"Edited by"}),render:e=>e,textOnly:!0},{actions:[{description:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.editRule.title",{defaultMessage:"Edit this extraction rule"}),icon:"pencil",isPrimary:!1,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.editRule.caption",{defaultMessage:"Edit this extraction rule"}),onClick:e=>t(e),type:"icon"},{color:"danger",description:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.deleteRule.title",{defaultMessage:"Delete this extraction rule"}),icon:"trash",isPrimary:!1,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.deleteRule.caption",{defaultMessage:"Delete extraction rule"}),onClick:e=>o(e),type:"icon"},{color:"primary",description:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.expandRule.title",{defaultMessage:"Expand this extraction rule"}),icon:e=>d[e.id]?"arrowUp":"arrowDown",isPrimary:!0,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.expandRule.caption",{defaultMessage:"Expand rule"}),onClick:e=>g(e),type:"icon"}],name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.actions.label",{defaultMessage:"Actions"})}];return Object(y.jsx)(i.a.Fragment,null,c&&Object(y.jsx)(S.EuiConfirmModal,{maxWidth:!0,buttonColor:"danger",onCancel:n,onConfirm:e,confirmButtonText:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.deleteFieldModal.confirmLabel",{defaultMessage:"Delete rule"}),title:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.deleteFieldModal.title",{defaultMessage:"Are you sure you want to delete this field rule?"}),cancelButtonText:zt.e},N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.deleteFieldModal.description",{defaultMessage:"This action cannot be undone."})),Object(y.jsx)(S.EuiBasicTable,{columns:j,isExpandable:!0,itemId:"id",itemIdToExpandedRowMap:d,items:u,title:N.i18n.translate("xpack.enterpriseSearch.crawler.extractionRulesTable.title",{defaultMessage:"Crawl rules"})}))},zs=()=>{var e;const{cancelEditExtractionRule:t,deleteExtractionRule:n,editNewExtractionRule:a,hideDeleteModal:s,saveExtractionRule:l}=Object(r.useActions)(ws),{deleteModalVisible:o,editingExtractionRule:c,extractionRules:u,extractionRuleToDelete:d,extractionRuleToEdit:p,extractionRuleToEditIsNew:g}=Object(r.useValues)(ws);return Object(y.jsx)(i.a.Fragment,null,o&&Object(y.jsx)(S.EuiConfirmModal,{maxWidth:!0,buttonColor:"danger",onCancel:s,onConfirm:n,confirmButtonText:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.deleteModal.confirmLabel",{defaultMessage:"Delete rule"}),title:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.deleteModal.title",{defaultMessage:"Are you sure you want to delete this extraction rule?"}),cancelButtonText:zt.e},N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.deleteModal.description",{defaultMessage:"Removing this rule will also delete {fields, plural, one {one field rule} other {# field rules}}. This action cannot be undone.",values:{fields:null!==(e=null==d?void 0:d.rules.length)&&void 0!==e?e:0}})),Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",justifyContent:"spaceBetween"},Object(y.jsx)(Xi.a,{title:Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.title",{defaultMessage:"Extraction rules"}))),description:Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.crawler.extractionRules.description",defaultMessage:"Create a content extraction rule to change where the documents get their data during a sync."})),links:Object(y.jsx)(S.EuiLink,{href:k.a.crawlerExtractionRules,external:!0},N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules.learnMoreLink",{defaultMessage:"Learn more about content extraction rules."})),actions:0===u.length?[]:[Object(y.jsx)(S.EuiButton,{size:"s","data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-addContentExtractionRule",iconType:"plusInCircle",onClick:a},N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRulesTable.addRuleLabel",{defaultMessage:"Add extraction rule"}))]})),Object(y.jsx)(S.EuiSpacer,{size:"l"}),c?Object(y.jsx)(As,{cancelEditing:t,extractionRule:p,isNewRule:g,saveRule:l}):0===u.length?Object(y.jsx)(S.EuiEmptyPrompt,{title:Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRulesTable.emptyMessageTitle",{defaultMessage:"There are no content extraction rules"})),titleSize:"s",body:Object(y.jsx)(S.EuiText,null,N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRulesTable.emptyMessageDescription",{defaultMessage:"Create a content extraction rule to change where document fields get their data during a sync."})),actions:Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-extractionRules-addContentExtractionRule",iconType:"plusInCircle",onClick:a},N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRulesTable.emptyMessageAddRuleLabel",{defaultMessage:"Add content extraction rule"}))}):Object(y.jsx)(Ls,null))},_s=N.i18n.translate("xpack.enterpriseSearch.crawler.sitemapsTable.addButtonLabel",{defaultMessage:"Add sitemap"}),Rs=({domain:e,indexName:t,items:n,title:a})=>{const{updateSitemaps:s}=Object(r.useActions)(Ji),l="url",o=[{editingRender:(e,t,{isInvalid:n,isLoading:a})=>Object(y.jsx)(S.EuiFieldText,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-siteMaps-editSitemap",fullWidth:!0,value:e[l],onChange:e=>t(e.target.value),disabled:a,isInvalid:n}),render:e=>Object(y.jsx)(S.EuiText,{size:"s"},e[l]),name:N.i18n.translate("xpack.enterpriseSearch.crawler.sitemapsTable.urlTableHead",{defaultMessage:"URL"}),field:l}],c=`/internal/enterprise_search/indices/${t}/crawler/domains/${e.id}/sitemaps`,u=n=>`/internal/enterprise_search/indices/${t}/crawler/domains/${e.id}/sitemaps/${n.id}`;return Object(y.jsx)(rs.a,{addButtonText:_s,columns:o,description:Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.crawler.sitemapsTable.description",{defaultMessage:"Add custom sitemap URLs for this domain. The crawler automatically detects existing sitemaps."})),instanceId:"SitemapsTable",items:n,canRemoveLastItem:!0,noItemsMessage:e=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiEmptyPrompt,{title:Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.crawler.sitemapsTable.emptyMessageTitle",{defaultMessage:"There are no existing sitemaps."})),titleSize:"s",body:Object(y.jsx)(S.EuiText,null,"Add a sitemap to specify an entry point for the crawler."),actions:Object(y.jsx)(S.EuiButton,{onClick:e},_s)})),addRoute:c,deleteRoute:u,updateRoute:u,dataProperty:"sitemaps",onAdd:(e,t)=>{s(t),Object(Pt.d)()},onDelete:(e,t)=>{s(t),Object(Pt.d)(),Object(Pt.g)(N.i18n.translate("xpack.enterpriseSearch.crawler.sitemapsTable.deleteSuccessToastMessage",{defaultMessage:"The sitemap has been deleted."}))},onUpdate:(e,t)=>{s(t),Object(Pt.d)()},title:a||"",disableReordering:!0})};let Fs;!function(e){e.ENTRY_POINTS="entry_points",e.AUTHENTICATION="authentication",e.SITE_MAPS="site_maps",e.CRAWL_RULES="crawl_rules",e.EXTRACTION_RULES="extraction_rules",e.DEDUPLICATION="deduplication"}(Fs||(Fs={}));const Us=({domain:e,indexName:t})=>{const[n,s]=Object(a.useState)(0),r=[{content:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(xs,{domain:e,indexName:t,items:e.entryPoints,title:Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.entryPointsTable.title",{defaultMessage:"Entry points"})))})),id:Fs.ENTRY_POINTS,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.entryPoints",{defaultMessage:"Entry points"})},{content:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(ss,null)),id:Fs.AUTHENTICATION,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.authentication",{defaultMessage:"Authentication"})},{content:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Rs,{domain:e,indexName:t,items:e.sitemaps,title:Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.sitemapsTable.title",{defaultMessage:"Sitemaps"})))})),id:Fs.SITE_MAPS,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.siteMaps",{defaultMessage:"Site maps"})},{content:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(ds,{domainId:e.id,indexName:t,crawlRules:e.crawlRules,defaultCrawlRule:e.defaultCrawlRule,title:Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRulesTable.title",{defaultMessage:"Crawl rules"})))})),id:Fs.CRAWL_RULES,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.crawlRules",{defaultMessage:"Crawl rules"})},{content:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(zs,null)),id:Fs.EXTRACTION_RULES,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.extractionRules",{defaultMessage:"Extraction rules"})},{content:Object(y.jsx)(gs,null),id:Fs.DEDUPLICATION,name:N.i18n.translate("xpack.enterpriseSearch.content.crawler.deduplication",{defaultMessage:"Duplicate document handling"})}];return Object(y.jsx)(S.EuiTabbedContent,{tabs:r,selectedTab:r[n],onTabClick:e=>{s(r.findIndex((({id:t})=>t===e.id))||0)}})},Ps=({domainId:e})=>{var t;const{indexName:n}=Object(r.useValues)(un),s=Ji({domainId:e}),{domain:l,getLoading:o}=Object(r.useValues)(s),{fetchDomainData:c}=Object(r.useActions)(s),{showModal:u}=Object(r.useActions)(Zi);Object(a.useEffect)((()=>{c(e)}),[e]);const d=null!==(t=null==l?void 0:l.url)&&void 0!==t?t:"...";return o?Object(y.jsx)(wi.a,null):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(A.b,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-header-allDomains",color:"text",iconType:"arrowLeft",size:"s",to:Object(je.a)(C.n,{indexName:n,tabId:id.DOMAIN_MANAGEMENT})},N.i18n.translate("xpack.enterpriseSearch.crawler.domainDetail.allDomainsButtonLabel",{defaultMessage:"All domains"})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiSplitPanel.Outer,{hasBorder:!0},Object(y.jsx)(S.EuiSplitPanel.Inner,{color:"subdued"},Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.crawler.domainDetail.title",{defaultMessage:"Manage {domain}",values:{domain:d}})))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainDetail-header-deleteDomain",isLoading:o,color:"danger",onClick:()=>{l&&u(l)}},N.i18n.translate("xpack.enterpriseSearch.crawler.domainDetail.deleteDomainButtonLabel",{defaultMessage:"Delete domain"}))))),Object(y.jsx)(S.EuiSplitPanel.Inner,null,l&&Object(y.jsx)(Us,{domain:l,indexName:n}),Object(y.jsx)(Hi,null),Object(y.jsx)(Gi,null))))};var Qs=n(69);const Ys=Object(V.a)(["get_crawler_domains"],(async({indexName:e,meta:t})=>{const n={"page[current]":t.page.current,"page[size]":t.page.size};return(({results:e,meta:t})=>({domains:e.map(Kt),meta:t}))(await d.a.values.http.get(`/internal/enterprise_search/indices/${e}/crawler/domains`,{query:n}))})),Bs=Object(r.kea)({connect:{actions:[Ys,["apiSuccess as getApiSuccess"],Wi,["apiSuccess as deleteApiSuccess"]],values:[Ys,["status as getStatus","data as getData"],Wi,["status as deleteStatus"],un,["indexName"]]},path:["enterprise_search","domain_management"],actions:{deleteDomain:e=>({domain:e}),getDomains:e=>({meta:e}),onPaginate:e=>({newPageIndex:e})},listeners:({values:e,actions:t})=>({deleteApiSuccess:()=>{t.getDomains(e.meta)},deleteDomain:({domain:t})=>{const{indexName:n}=e;Wi.actions.makeRequest({domain:t,indexName:n})},getDomains:({meta:t})=>{const{indexName:n}=e;Ys.actions.makeRequest({indexName:n,meta:t})},onPaginate:({newPageIndex:n})=>{t.getDomains(Object(Q.c)(e.meta,n))}}),selectors:({selectors:e})=>({domains:[()=>[e.getData],e=>{var t;return null!==(t=null==e?void 0:e.domains)&&void 0!==t?t:[]}],meta:[()=>[e.getData],e=>{var t;return null!==(t=null==e?void 0:e.meta)&&void 0!==t?t:zt.j}],isLoading:[()=>[e.getStatus,e.deleteStatus],(e,t)=>e===$.a.IDLE||e===$.a.LOADING||t===$.a.LOADING]})}),Gs={addDomainFormInputValue:"https://",allowSubmit:!1,domainValidationResult:{steps:{contentVerification:{state:""},indexingRestrictions:{state:""},initialValidation:{state:""},networkConnectivity:{state:""}}},entryPointValue:"/",ignoreValidationFailure:!1,isValidationLoading:!1},$s=Object(r.kea)({path:["enterprise_search","crawler","add_domain_logic"],actions:()=>({clearDomainFormInputValue:!0,closeFlyout:!0,initialValidation:!0,onSubmitNewDomainError:e=>({errors:e}),onSubmitNewDomainSuccess:e=>({domain:e}),openFlyout:!0,performDomainValidationStep:(e,t)=>({checks:t,stepName:e}),setAddDomainFormInputValue:e=>e,setDomainValidationResult:e=>({change:e}),setIgnoreValidationFailure:e=>e,startDomainValidation:!0,submitNewDomain:!0,validateDomainContentVerification:!0,validateDomainIndexingRestrictions:!0,validateDomainInitialVerification:(e,t)=>({newEntryPointValue:t,newValue:e}),validateDomainNetworkConnectivity:!0}),reducers:()=>({addDomainFormInputValue:[Gs.addDomainFormInputValue,{clearDomainFormInputValue:()=>Gs.addDomainFormInputValue,setAddDomainFormInputValue:(e,t)=>t,validateDomainInitialVerification:(e,{newValue:t})=>t}],domainValidationResult:[Gs.domainValidationResult,{clearDomainFormInputValue:()=>Gs.domainValidationResult,setAddDomainFormInputValue:()=>Gs.domainValidationResult,setDomainValidationResult:({steps:e},{change:t})=>({steps:{...e,...t}}),startDomainValidation:()=>({steps:{contentVerification:{state:"loading"},indexingRestrictions:{state:"loading"},initialValidation:{state:"loading"},networkConnectivity:{state:"loading"}}})}],entryPointValue:[Gs.entryPointValue,{clearDomainFormInputValue:()=>Gs.entryPointValue,setAddDomainFormInputValue:()=>Gs.entryPointValue,validateDomainInitialVerification:(e,{newEntryPointValue:t})=>t}],errors:[[],{clearDomainFormInputValue:()=>[],onSubmitNewDomainError:(e,{errors:t})=>t,setAddDomainFormInputValue:()=>[],submitNewDomain:()=>[],validateDomainInitialVerification:()=>[]}],ignoreValidationFailure:[Gs.ignoreValidationFailure,{clearDomainFormInputValue:()=>Gs.ignoreValidationFailure,setAddDomainFormInputValue:()=>Gs.ignoreValidationFailure,setIgnoreValidationFailure:(e,t)=>t}],isFlyoutVisible:[!1,{closeFlyout:()=>!1,onSubmitNewDomainSuccess:()=>!1,openFlyout:()=>!0}]}),selectors:({selectors:e})=>({allowSubmit:[()=>[e.ignoreValidationFailure,e.hasValidationCompleted,e.hasBlockingFailure],(e,t,n)=>!!e||t&&!n],canIgnoreValidationFailure:[()=>[e.hasValidationCompleted,e.domainValidationResult],(e,t)=>!!e&&(t.steps.indexingRestrictions.blockingFailure||t.steps.contentVerification.blockingFailure)],displayValidation:[()=>[e.isValidationLoading,e.hasValidationCompleted],(e,t)=>e||t],hasBlockingFailure:[()=>[e.domainValidationResult],e=>!!Object.values(e.steps).find((e=>e.blockingFailure))],hasValidationCompleted:[()=>[e.domainValidationResult],e=>!Object.values(e.steps).find((e=>"loading"===e.state||""===e.state))],isValidationLoading:[()=>[e.domainValidationResult],e=>!!Object.values(e.steps).find((e=>"loading"===e.state))]}),listeners:({actions:e,values:t})=>({onSubmitNewDomainSuccess:({domain:t})=>{const{indexName:n}=un.values;Object(Pt.g)(N.i18n.translate("xpack.enterpriseSearch.crawler.domainsTable.action.add.successMessage",{defaultMessage:"Successfully added domain '{domainUrl}'",values:{domainUrl:t.url}})),p.a.values.navigateToUrl(Object(je.a)(C.k,{domainId:t.id,indexName:n})),dn.actions.fetchCrawlerData(),Bs.actions.getDomains(zt.j),e.clearDomainFormInputValue()},performDomainValidationStep:async({stepName:n,checks:a})=>{const{http:i}=d.a.values,s=(e=>{switch(e){case"initialValidation":return jn;case"networkConnectivity":return{indexingRestrictions:jn.indexingRestrictions,contentVerification:jn.contentVerification};case"indexingRestrictions":return{contentVerification:jn.contentVerification};default:return{}}})(n);try{const r=function(e){var t;if(!e.valid)return{blockingFailure:!0,message:null===(t=e.results.find((e=>"failure"===e.result)))||void 0===t?void 0:t.comment,state:"invalid"};const n=e.results.find((e=>"warning"===e.result));return n?{blockingFailure:!e.valid,message:n.comment,state:"warning"}:{state:"valid"}}(await i.post("/internal/enterprise_search/crawler/validate_url",{body:JSON.stringify({checks:a,url:t.addDomainFormInputValue.trim()})}));if(r.blockingFailure)e.setDomainValidationResult({[n]:r,...s});else switch(e.setDomainValidationResult({[n]:r}),n){case"initialValidation":e.validateDomainNetworkConnectivity();break;case"networkConnectivity":e.validateDomainIndexingRestrictions();break;case"indexingRestrictions":e.validateDomainContentVerification()}}catch(t){e.setDomainValidationResult({[n]:{blockingFailure:!0,message:N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.unexpectedValidationErrorMessage",{defaultMessage:"Unexpected error"}),state:"invalid"},...s})}},startDomainValidation:async()=>{const{domain:n,entryPoint:a}=pn(t.addDomainFormInputValue.trim()),i=await(async e=>{const{http:t}=d.a.values;if(!e.startsWith("https://")&&!e.startsWith("http://"))try{const n="/internal/enterprise_search/crawler/validate_url",a=["tcp","url_request"];if((await t.post(n,{body:JSON.stringify({url:`https://${e}`,checks:a})})).valid)return`https://${e}`;if((await t.post(n,{body:JSON.stringify({url:`http://${e}`,checks:a})})).valid)return`http://${e}`}catch(e){}return e})(n);e.validateDomainInitialVerification(i,a)},submitNewDomain:async()=>{const{http:n}=d.a.values,{indexName:a}=un.values,i=JSON.stringify({entry_points:[{value:t.entryPointValue}],name:t.addDomainFormInputValue.trim()});try{const t=Kt(await n.post(`/internal/enterprise_search/indices/${a}/crawler/domains`,{body:i}));e.onSubmitNewDomainSuccess(t)}catch(t){const n=Object(Qs.c)(t);e.onSubmitNewDomainError(n)}},validateDomainContentVerification:()=>{e.performDomainValidationStep("contentVerification",["url_request","url_content"])},validateDomainIndexingRestrictions:()=>{e.performDomainValidationStep("indexingRestrictions",["robots_txt"])},validateDomainInitialVerification:()=>{e.performDomainValidationStep("initialValidation",["url"])},validateDomainNetworkConnectivity:()=>{e.performDomainValidationStep("networkConnectivity",["dns","tcp"])}})}),Vs=({state:e})=>{switch(e){case"valid":return Object(y.jsx)(S.EuiIcon,{color:"success",type:"check"});case"warning":return Object(y.jsx)(S.EuiIcon,{color:"warning",type:"warning"});case"invalid":return Object(y.jsx)(S.EuiIcon,{color:"danger",type:"cross"});default:return Object(y.jsx)(S.EuiLoadingSpinner,null)}},qs=Object(S.getDefaultEuiMarkdownProcessingPlugins)();qs[1][1].components.a=e=>Object(y.jsx)(S.EuiLink,m()({},e,{target:"_blank"}));const Ws=({step:e,label:t,action:n})=>{const a="invalid"===e.state||"warning"===e.state;return Object(y.jsx)(S.EuiPanel,{hasShadow:!1,color:gn(e.state)},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Vs,{state:e.state})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h3",null,t)))),a&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,{size:"xs"}),Object(y.jsx)(S.EuiMarkdownFormat,{textSize:"s","data-test-subj":"errorMessage",processingPluginList:qs},e.message||""),n&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,{size:"s"}),n)))},Zs=()=>{const{addDomainFormInputValue:e,canIgnoreValidationFailure:t,domainValidationResult:n,ignoreValidationFailure:a}=Object(r.useValues)($s),{setIgnoreValidationFailure:s}=Object(r.useActions)($s);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ws,{step:n.steps.initialValidation,label:N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.initialVaidationLabel",{defaultMessage:"Initial validation"})})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ws,{step:n.steps.networkConnectivity,label:N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.networkConnectivityLabel",{defaultMessage:"Network connectivity"}),action:Object(y.jsx)(S.EuiButton,{size:"s",href:e,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.testUrlButtonLabel",{defaultMessage:"Test URL in the browser"}))})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ws,{step:n.steps.indexingRestrictions,label:N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.indexingRestrictionsLabel",{defaultMessage:"Indexing restrictions"})})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Ws,{step:n.steps.contentVerification,label:N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.contentVerificationLabel",{defaultMessage:"Content verification"})})),t&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{hasShadow:!1},Object(y.jsx)(S.EuiCheckbox,{id:`crawler_domain_${e}`,label:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.ignoreValidationTitle",{defaultMessage:"Ignore validation failures and continue"})),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{color:"subdued",size:"xs"},N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.ignoreValidationDescription",{defaultMessage:"The web crawler will be unable to index any content on this domain until the errors above are addressed."}))),checked:a,onChange:e=>s(e.target.checked)})))))},Hs=()=>{const{setAddDomainFormInputValue:e,startDomainValidation:t}=Object(r.useActions)($s),{addDomainFormInputValue:n,displayValidation:a,entryPointValue:s}=Object(r.useValues)($s);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiForm,{onSubmit:e=>{e.preventDefault(),t()},component:"form"},Object(y.jsx)(S.EuiFormRow,{fullWidth:!0,label:N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.urlLabel",{defaultMessage:"Domain URL"}),helpText:Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.urlHelpText",{defaultMessage:"Domain URLs require a protocol and cannot contain any paths."}))},Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiFormControlLayout,{clear:{onClick:()=>e("")},fullWidth:!0},Object(y.jsx)(S.EuiFieldText,{autoFocus:!0,value:n,onChange:t=>e(t.target.value),fullWidth:!0,"data-test-subj":"entSearchContent-crawler-addDomainForm-validate-input"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{type:"submit",fill:!0,disabled:0===n.length,"data-test-subj":"entSearchContent-crawler-addDomainForm-validate-button"},N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.validateButtonLabel",{defaultMessage:"Validate Domain"}))))),"/"!==s&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,Object(y.jsx)("strong",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.crawler.addDomainForm.entryPointLabel",defaultMessage:"Web Crawler entry point has been set as {entryPointValue}",values:{entryPointValue:Object(y.jsx)(S.EuiCode,null,s)}}))))),a&&Object(y.jsx)(Zs,null)))},Js=()=>{const{errors:e}=Object(r.useValues)($s);return e.length>0?Object(y.jsx)(S.EuiCallOut,{color:"danger",iconType:"warning",title:N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.errorsTitle",{defaultMessage:"Something went wrong. Please address the errors and try again."})},e.map(((e,t)=>Object(y.jsx)("p",{key:t},e)))):null},Xs=()=>{const{submitNewDomain:e}=Object(r.useActions)($s),{allowSubmit:t}=Object(r.useValues)($s);return Object(y.jsx)(S.EuiButton,{fill:!0,type:"button",disabled:!t,onClick:e,"data-test-subj":"entSearchContent-crawler-addDomain-submitButton"},N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainForm.submitButtonLabel",{defaultMessage:"Add domain"}))},Ks=()=>{const{isFlyoutVisible:e}=Object(r.useValues)($s),{closeFlyout:t}=Object(r.useActions)($s);return e?Object(y.jsx)(S.EuiPortal,null,Object(y.jsx)(S.EuiFlyout,{onClose:t},Object(y.jsx)(S.EuiFlyoutHeader,null,Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainFlyout.title",{defaultMessage:"Add a new domain"})))),Object(y.jsx)(S.EuiFlyoutBody,{banner:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,{size:"l"}),Object(y.jsx)(Js,null))},Object(y.jsx)(S.EuiText,null,N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainFlyout.description",{defaultMessage:'You can add multiple domains to this index\'s web crawler. Add another domain here and modify the entry points and crawl rules from the "Manage" page.'}),Object(y.jsx)("p",null)),Object(y.jsx)(S.EuiSpacer,{size:"l"}),Object(y.jsx)(Hs,null)),Object(y.jsx)(S.EuiFlyoutFooter,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{onClick:t},zt.e)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Xs,null)))))):null},er=()=>{const{mostRecentCrawlRequestStatus:e}=Object(r.useValues)(dn);return e===Vt.Running||e===Vt.Starting||e===Vt.Canceling?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiCallOut,{iconType:"iInCircle",title:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusBanner.changesCalloutTitle",{defaultMessage:"Changes you make now won't take effect until the start of your next crawl."})}),Object(y.jsx)(S.EuiSpacer,{size:"l"})):null};var tr=n(127);const nr=()=>{const{indexName:e}=Object(r.useValues)(un),{domains:t,meta:n,isLoading:a}=Object(r.useValues)(Bs),{onPaginate:s}=Object(r.useActions)(Bs),{showModal:l}=Object(r.useActions)(Zi),o=[{field:"url",name:N.i18n.translate("xpack.enterpriseSearch.crawler.domainsTable.column.domainURL",{defaultMessage:"Domain"}),render:(t,n)=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiCopy,{textToCopy:n.url},(e=>Object(y.jsx)(S.EuiButtonIcon,{onClick:e,iconSize:"s",iconType:"copy"}))),Object(y.jsx)(A.d,{"data-test-subj":"CrawlerDomainURL",to:Object(je.a)(C.k,{domainId:n.id,indexName:e})},n.url))},{field:"lastCrawl",name:N.i18n.translate("xpack.enterpriseSearch.crawler.domainsTable.column.lastActivity",{defaultMessage:"Last activity"}),render:e=>e?Object(y.jsx)(tr.a,{timestamp:e}):""},{field:"documentCount",name:N.i18n.translate("xpack.enterpriseSearch.crawler.domainsTable.column.documents",{defaultMessage:"Documents"}),render:e=>Object(y.jsx)(E.FormattedNumber,{value:e})},{name:N.i18n.translate("xpack.enterpriseSearch.crawler.domainsTable.column.actions",{defaultMessage:"Actions"}),actions:[{name:zt.r,description:N.i18n.translate("xpack.enterpriseSearch.crawler.domainsTable.action.manage.buttonLabel",{defaultMessage:"Manage this domain"}),type:"icon",icon:"eye",onClick:t=>{p.a.values.navigateToUrl(Object(je.a)(C.k,{domainId:t.id,indexName:e}))}},{name:zt.k,description:N.i18n.translate("xpack.enterpriseSearch.crawler.domainsTable.action.delete.buttonLabel",{defaultMessage:"Delete this domain"}),type:"icon",icon:"trash",color:"danger",onClick:e=>{l(e)}}]}];return Object(y.jsx)(S.EuiBasicTable,{loading:a,items:t,columns:o,pagination:{...Object(Q.a)(n),showPerPageOptions:!1},onChange:Object(Q.b)(s)})},ar=()=>{const{openFlyout:e}=Object(r.useActions)($s);return Object(y.jsx)(S.EuiPanel,{hasBorder:!0},Object(y.jsx)(S.EuiFlexGroup,{direction:"row",alignItems:"center",gutterSize:"xs",justifyContent:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{size:"m",type:"globe"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.domainsTitle",{defaultMessage:"Domains"})))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainManagement-addDomain-addDomain",onClick:e,size:"s",color:"success",iconType:"plusInCircle"},N.i18n.translate("xpack.enterpriseSearch.crawler.addDomainFlyout.openButtonLabel",{defaultMessage:"Add domain"})))),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(nr,null))},ir=()=>{const{openFlyout:e}=Object(r.useActions)($s),{events:t}=Object(r.useValues)(dn);return Object(y.jsx)(S.EuiPanel,{hasBorder:!0},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.domainManagement.emptyState.title",{defaultMessage:"Add a domain to your index"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.crawler.domainManagement.emptyState.description",{defaultMessage:"Configure the domains you’d like to crawl, and when ready trigger your first crawl."}))),Object(y.jsx)(S.EuiSpacer,{size:"l"}),t.length>0?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.crawler.domainManagement.emptyState",{defaultMessage:"You don’t have any domains on this index. Add your first domain to start crawling and indexing documents."}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-crawler-domainManagement-noDomains-addFirstDomain",onClick:e,fill:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.domainManagement.emptyState.addDomainButtonLabel",{defaultMessage:"Add your first domain"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{target:"_blank"},"Learn more")))):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(Js,null),Object(y.jsx)(Hs,null),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Xs,null)))},sr=()=>{Wi.mount();const{getDomains:e}=Object(r.useActions)(Bs),{domains:t,indexName:n,isLoading:l}=Object(r.useValues)(Bs);Object(a.useEffect)((()=>{e(zt.j)}),[n]);const{detailId:o}=Object(s.useParams)();return l?Object(y.jsx)(wi.a,null):o?Object(y.jsx)(Ps,{domainId:o}):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(er,null),t.length>0?Object(y.jsx)(ar,null):Object(y.jsx)(ir,null),Object(y.jsx)(Hi,null),Object(y.jsx)(Ks,null))},rr=Object(V.a)(["recreate_crawler_connector_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/crawler/connector`;return await d.a.values.http.post(t)})),lr=Object(r.kea)({connect:{actions:[rr,["apiSuccess"],fn,["fetchIndex"],W,["apiSuccess as deleteSuccess"]]},listeners:({actions:e})=>({apiSuccess:()=>{e.fetchIndex()},deleteSuccess:()=>{p.a.values.navigateToUrl(C.o)}}),path:["enterprise_search","content","no_connector_record"]}),or=()=>{const{indexName:e}=Object(r.useValues)(fn),{isDeleteLoading:t}=Object(r.useValues)(X),{openDeleteModal:n}=Object(r.useActions)(X),{makeRequest:a}=Object(r.useActions)(rr),{status:s}=Object(r.useValues)(rr);lr.mount();const l=s===$.a.LOADING||t;return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(K,null),Object(y.jsx)(S.EuiPageTemplate.EmptyPrompt,{iconType:"warning",color:"danger",title:Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.noCrawlerConnectorFound.title",{defaultMessage:"This index's connector configuration has been removed"})),body:Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.noCrawlerConnectorFound.description",{defaultMessage:"We could not find a connector configuration for this crawler index. The record should be recreated, or the index should be deleted."})),actions:[Object(y.jsx)(S.EuiButton,{color:"danger",disabled:l,isLoading:s===$.a.LOADING,onClick:()=>a({indexName:e})},N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.noCrawlerConnectorFound.recreateConnectorRecord",{defaultMessage:"Recreate connector record"})),Object(y.jsx)(S.EuiButton,{color:"danger",disabled:l,isLoading:t,fill:!0,onClick:()=>n(e)},N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.noCrawlerConnectorFound.deleteIndex",{defaultMessage:"Delete index"}))]}))},cr=async({indexName:e})=>{const t=`/internal/enterprise_search/mappings/${e}`;return await d.a.values.http.get(t)},ur=e=>Object(V.a)(["mappings_api_logic",e],cr),dr=Object(V.a)(["mappings_api_logic"],cr),pr=async({docsPerPage:e,indexName:t,pagination:n,query:a})=>{const i=`/internal/enterprise_search/indices/${encodeURIComponent(t)}/search`,s={page:n.pageIndex,size:e||n.pageSize};return await d.a.values.http.post(i,{body:JSON.stringify({searchQuery:a}),query:s})},gr=[{description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.description",{defaultMessage:"Browse content fields"}),title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.selector.contentIndex.title",{defaultMessage:"Content index"}),value:"content-index"},{description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.description",{defaultMessage:"Browse document level security fields"}),title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.selector.accessControl.title",{defaultMessage:"Access control index"}),value:"access-control-index"}],jr=({valueOfSelected:e,onChange:t})=>Object(y.jsx)(S.EuiSuperSelect,{valueOfSelected:e,onChange:t,options:gr.map((e=>({dropdownDisplay:Object(y.jsx)(S.EuiFlexGrid,{gutterSize:"none"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h4",null,e.title))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"xs"},Object(y.jsx)("p",null,e.description)))),inputDisplay:e.title,value:e.value})))});var xr=n(20);n(184);const Mr={boolean:"tokenBoolean",date:"tokenDate",date_range:"tokenDate",double:"tokenNumber",double_range:"tokenDate",flattened:"tokenObject",float:"tokenNumber",float_range:"tokenNumber",geo_point:"tokenGeo",geo_shape:"tokenGeo",half_float:"tokenNumber",histogram:"tokenHistogram",integer:"tokenNumber",integer_range:"tokenNumber",ip:"tokenIp",ip_range:"tokenIp",join:"tokenJoin",keyword:"tokenKeyword",long:"tokenNumber",long_range:"tokenNumber",nested:"tokenObject",object:"tokenObject",percolator:"tokenPercolator",rank_feature:"tokenRankFeature",rank_features:"tokenRankFeatures",scaled_float:"tokenNumber",search_as_you_type:"tokenSearchType",shape:"tokenShape",short:"tokenNumber",text:"tokenString",token_count:"tokenTokenCount",unsigned_long:"tokenNumber"},hr=({iconType:e,fieldName:t,fieldValue:n,fieldType:a,isExpanded:i})=>Object(y.jsx)(S.EuiTableRow,{className:"resultField"},Object(y.jsx)(S.EuiTableRowCell,{className:"resultFieldRowCell",width:xr.euiThemeVars.euiSizeL,valign:"middle"},Object(y.jsx)("span",null,Object(y.jsx)(S.EuiToken,{className:"resultField__token",iconType:e||(a?Mr[a]:"questionInCircle")}))),Object(y.jsx)(S.EuiTableRowCell,{className:"resultFieldRowCell",width:"25%",truncateText:!i,valign:"middle"},Object(y.jsx)(S.EuiText,{size:"xs"},t)),Object(y.jsx)(S.EuiTableRowCell,{className:"resultFieldRowCell",width:xr.euiThemeVars.euiSizeXXL,valign:"middle"},Object(y.jsx)(S.EuiIcon,{type:"sortRight",color:"subdued"})),Object(y.jsx)(S.EuiTableRowCell,{className:"resultFieldRowCell",truncateText:!i,valign:"middle"},("object"===a||"array"===a||"nested"===a||Array.isArray(n))&&i?Object(y.jsx)(S.EuiCodeBlock,{language:"json",overflowHeight:"250",transparentBackground:!0},n):Object(y.jsx)(S.EuiText,{size:"xs"},n))),mr=({fields:e,isExpanded:t})=>Object(y.jsx)(S.EuiTable,null,Object(y.jsx)(S.EuiTableBody,null,e.map((e=>Object(y.jsx)(hr,{isExpanded:t,iconType:e.iconType,fieldName:e.fieldName,fieldValue:e.fieldValue,fieldType:e.fieldType,key:e.fieldName}))))),fr=({label:e})=>Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)("strong",null,Object(y.jsx)(S.EuiTextColor,{color:"subdued"},e,":"))),br=({label:e})=>Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTextColor,{color:"subdued"},e)),yr=({id:e,onDocumentDelete:t})=>{const[n,i]=Object(a.useState)(!1),s=()=>i(!1),r=Object(y.jsx)(S.EuiButtonIcon,{display:"empty",size:"xs",iconType:"iInCircle",color:"primary",onClick:()=>i(!n),"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.shared.result.header.metadata.icon.ariaLabel",{defaultMessage:"Metadata for document: {id}",values:{id:e}})});return Object(y.jsx)(S.EuiPopover,{button:r,isOpen:n,closePopover:s},Object(y.jsx)(S.EuiPopoverTitle,null,N.i18n.translate("xpack.enterpriseSearch.content.shared.result.header.metadata.title",{defaultMessage:"Document metadata"})),Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",direction:"column",style:{width:"20rem"}},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween",gutterSize:"s"},Object(y.jsx)(fr,{label:"ID"}),Object(y.jsx)(br,{label:e})))),t&&Object(y.jsx)(S.EuiPopoverFooter,null,Object(y.jsx)(S.EuiButton,{iconType:"trash",color:"danger",size:"s",onClick:s,fullWidth:!0},N.i18n.translate("xpack.enterpriseSearch.content.shared.result.header.metadata.deleteDocument",{defaultMessage:"Delete document"}))))},Or=({title:e,metaData:t})=>Object(y.jsx)("div",{className:"resultHeader"},Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("strong",null,e)),!!t&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(yr,t))))),Ir=({metaData:e,fields:t})=>{var n;const[s,r]=Object(a.useState)(!1),l=t.length<=3?N.i18n.translate("xpack.enterpriseSearch.shared.result.expandTooltip.allVisible",{defaultMessage:"All fields are visible"}):s?N.i18n.translate("xpack.enterpriseSearch.shared.result.expandTooltip.showFewer",{defaultMessage:"Show {amount} fewer fields",values:{amount:t.length-3}}):N.i18n.translate("xpack.enterpriseSearch.shared.result.expandTooltip.showMore",{defaultMessage:"Show {amount} more fields",values:{amount:t.length-3}}),o=Object(y.jsx)(i.a.Fragment,null,l);return Object(y.jsx)(S.EuiPanel,{hasBorder:!0,paddingSize:"s"},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"none"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"none",responsive:!1},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Or,{title:null!==(n=e.title)&&void 0!==n?n:N.i18n.translate("xpack.enterpriseSearch.shared.result.title.id",{defaultMessage:"Document id: {id}",values:{id:e.id}}),metaData:e})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(mr,{isExpanded:s,fields:s?t:t.slice(0,3)})))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)("div",{className:"resultExpandColumn"},Object(y.jsx)(S.EuiToolTip,{position:"left",content:o},Object(y.jsx)(S.EuiButtonIcon,{iconType:s?"fold":"unfold",color:"text",onClick:()=>r(!s),"aria-label":l}))))))},Sr=["title","name"];function Nr(e,t){return"string"==typeof e[t]}const Er=e=>{if("object"==typeof(t=e._source)&&null!==t)for(const t of Sr)if(Nr(e._source,t))return e._source[t];var t},Dr=e=>({id:e._id,title:Er(e)}),Tr=({docs:e,docsPerPage:t,isLoading:n,mappings:s,meta:l,onPaginate:o,setDocsPerPage:c})=>{const{ingestionMethod:u}=Object(r.useValues)(fn),[d,p]=Object(a.useState)(!1),g=e=>e===t?"check":"empty";return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiPagination,{"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.documentList.paginationAriaLabel",{defaultMessage:"Pagination for document list"}),pageCount:l.page.total_pages,activePage:l.page.current,onPageClick:o}),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(S.EuiText,{size:"xs"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.searchIndex.documents.documentList.description",defaultMessage:"Showing {results} of {total}. Search results maxed at {maximum} documents.",values:{maximum:Object(y.jsx)(E.FormattedNumber,{value:1e4}),results:Object(y.jsx)("strong",null,Object(y.jsx)(E.FormattedNumber,{value:e.length})),total:Object(y.jsx)("strong",null,Object(y.jsx)(E.FormattedNumber,{value:l.page.total_results}))}}))),n&&Object(y.jsx)(S.EuiProgress,{size:"xs",color:"primary"}),Object(y.jsx)(S.EuiSpacer,{size:"m"}),e.map((e=>{return Object(y.jsx)(i.a.Fragment,{key:e._id},Object(y.jsx)(Ir,{fields:(t=e,s&&t._source&&!Array.isArray(t._source)&&"object"==typeof t._source?Object.entries(t._source).map((([e,t])=>{var n,a;return{fieldName:e,fieldType:null!==(n=null===(a=s[e])||void 0===a?void 0:a.type)&&void 0!==n?n:"object",fieldValue:JSON.stringify(t,null,2)}})):[]),metaData:Dr(e)}),Object(y.jsx)(S.EuiSpacer,{size:"s"}));var t})),Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiPagination,{"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.documentList.paginationAriaLabel",{defaultMessage:"Pagination for document list"}),pageCount:l.page.total_pages,activePage:l.page.current,onPageClick:o})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiPopover,{"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.documentList.docsPerPage",{defaultMessage:"Document count per page dropdown"}),button:Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":`entSearchContent-${u}-documents-docsPerPage`,size:"s",iconType:"arrowDown",iconSide:"right",onClick:()=>{p(!0)}},N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.documentList.pagination.itemsPerPage",{defaultMessage:"Documents per page: {docPerPage}",values:{docPerPage:t}})),isOpen:d,closePopover:()=>{p(!1)},panelPaddingSize:"none",anchorPosition:"downLeft"},Object(y.jsx)(S.EuiContextMenuPanel,{size:"s",items:[Object(y.jsx)(S.EuiContextMenuItem,{key:"10 rows",icon:g(10),onClick:()=>{p(!1),c(10)}},N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.documentList.paginationOptions.option",{defaultMessage:"{docCount} documents",values:{docCount:10}})),Object(y.jsx)(S.EuiContextMenuItem,{key:"25 rows",icon:g(25),onClick:()=>{p(!1),c(25)}},N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.documentList.paginationOptions.option",{defaultMessage:"{docCount} documents",values:{docCount:25}})),Object(y.jsx)(S.EuiContextMenuItem,{key:"50 rows",icon:g(50),onClick:()=>{p(!1),c(50)}},N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.documentList.paginationOptions.option",{defaultMessage:"{docCount} documents",values:{docCount:50}}))]})))),Object(y.jsx)(S.EuiSpacer,null),l.page.total_results>9999&&Object(y.jsx)(S.EuiCallOut,{size:"s",title:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.searchIndex.documents.documentList.resultLimitTitle",defaultMessage:"Results are limited to {number} documents",values:{number:Object(y.jsx)(E.FormattedNumber,{value:1e4})}}),iconType:"search"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.searchIndex.documents.documentList.resultLimit",defaultMessage:"Only the first {number} results are available for paging. Please use the search bar to filter down your results.",values:{number:Object(y.jsx)(E.FormattedNumber,{value:1e4})}}))))};n(513);const wr={page:{current:0,size:j.l,total_pages:0,total_results:0}},vr={pageIndex:wr.page.current,pageSize:wr.page.size,totalItemCount:wr.page.total_results},Cr=()=>{var e,t,n,i,s,l;const{indexName:o}=Object(r.useValues)(un),{ingestionMethod:c,hasDocumentLevelSecurityFeature:u}=Object(r.useValues)(fn),{productFeatures:d}=Object(r.useValues)(p.a),[g,x]=Object(a.useState)("content-index"),M="content-index"===g?o:o.replace("search-",j.d),h=ur(M),m=(e=>Object(V.a)(["search_documents_api_logic",e],pr))(M),{makeRequest:f}=Object(r.useActions)(m),{makeRequest:b}=Object(r.useActions)(h),{data:O,status:I,error:E}=Object(r.useValues)(m),{data:D,status:T}=Object(r.useValues)(h),w=null!==(e=null==O||null===(t=O.results)||void 0===t?void 0:t.hits.hits)&&void 0!==e?e:[],[v,C]=Object(a.useState)(vr),[k,A]=Object(a.useState)(""),L=u&&d.hasDocumentLevelSecurityEnabled,z=L&&404===(null==E||null===(n=E.body)||void 0===n?void 0:n.statusCode);return Object(a.useEffect)((()=>{f({indexName:M,pagination:v,query:k})}),[M,v,k]),Object(a.useEffect)((()=>{A(""),C(vr),b({indexName:M})}),[M]),Object(y.jsx)(S.EuiPanel,{hasBorder:!1,hasShadow:!1,paddingSize:"none"},Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{className:"enterpriseSearchDocumentsHeader",grow:!1},Object(y.jsx)(S.EuiTitle,null,Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.title",{defaultMessage:"Browse documents"})))),L&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(jr,{onChange:x,valueOfSelected:g})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFieldSearch,{"data-telemetry-id":`entSearchContent-${c}-documents-searchDocuments`,placeholder:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.searchField.placeholder",{defaultMessage:"Search documents in this index"}),isClearable:!0,onChange:e=>A(e.target.value),fullWidth:!0})))),Object(y.jsx)(S.EuiFlexItem,null,z&&Object(y.jsx)(S.EuiCallOut,{size:"m",title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.noIndex.title",{defaultMessage:"Access Control Index not found"}),iconType:"iInCircle"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.noIndex",{defaultMessage:"An Access Control Index won't be created until you enable document-level security and run your first access control sync."}))),!z&&0===w.length&&N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documents.noMappings",{defaultMessage:"No documents found for index"}),!z&&w.length>0&&Object(y.jsx)(Tr,{docs:w,docsPerPage:v.pageSize,isLoading:I!==$.a.SUCCESS&&T!==$.a.SUCCESS,mappings:null!==(i=null==D||null===(s=D.mappings)||void 0===s?void 0:s.properties)&&void 0!==i?i:{},meta:null!==(l=null==O?void 0:O.meta)&&void 0!==l?l:zt.j,onPaginate:e=>C({...v,pageIndex:e}),setDocsPerPage:e=>C({...v,pageSize:e})}))))};n(518);const kr=()=>{var e;const{indexName:t}=Object(r.useValues)(un),{hasDocumentLevelSecurityFeature:n}=Object(r.useValues)(fn),{productFeatures:s}=Object(r.useValues)(p.a),[l,o]=Object(a.useState)("content-index"),c="content-index"===l?t:t.replace("search-",j.d),{makeRequest:u}=Object(r.useActions)(ur(c)),{data:d,error:g}=Object(r.useValues)(ur(c)),x=n&&s.hasDocumentLevelSecurityEnabled,M=x&&404===(null==g||null===(e=g.body)||void 0===e?void 0:e.statusCode);return Object(a.useEffect)((()=>{u({indexName:c})}),[c,t]),Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:2},Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},x&&Object(y.jsx)(S.EuiFlexItem,{grow:!1,className:"enterpriseSearchMappingsSelector"},Object(y.jsx)(jr,{onChange:o,valueOfSelected:l})),Object(y.jsx)(S.EuiFlexItem,{grow:!0},M?Object(y.jsx)(S.EuiCallOut,{size:"m",title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.mappings.noIndex.title",{defaultMessage:"Access Control Index not found"}),iconType:"iInCircle"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.mappings.noIndex",{defaultMessage:"An Access Control Index won't be created until you enable document-level security and run your first access control sync."}))):Object(y.jsx)(S.EuiCodeBlock,{language:"json",isCopyable:!0},JSON.stringify(d,null,2))))),Object(y.jsx)(S.EuiFlexItem,{grow:1},Object(y.jsx)(S.EuiPanel,{grow:!1,hasShadow:!1,hasBorder:!0},Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"center",gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"iInCircle"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.mappings.title",{defaultMessage:"About index mappings"}))))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.searchIndex.mappings.description",defaultMessage:"Your documents are made up of a set of fields. Index mappings give each field a type (such as {keyword}, {number}, or {date}) and additional subfields. These index mappings determine the functions available in your relevance tuning and search experience.",values:{keyword:Object(y.jsx)(S.EuiCode,null,"keyword"),number:Object(y.jsx)(S.EuiCode,null,"number"),date:Object(y.jsx)(S.EuiCode,null,"date")}}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiLink,{href:k.a.elasticsearchMapping,target:"_blank",external:!0},N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.mappings.docLink",{defaultMessage:"Learn more"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiPanel,{grow:!1,hasShadow:!1,hasBorder:!0},Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"center",gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"iInCircle"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.transform.title",{defaultMessage:"Transform your searchable content"}))))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.searchIndex.transform.description",defaultMessage:"Want to add custom fields, or use trained ML models to analyze and enrich your indexed documents? Use index-specific ingest pipelines to customize documents to your needs."}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiLink,{href:k.a.ingestPipelines,target:"_blank",external:!0},N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.transform.docLink",{defaultMessage:"Learn more"}))))))},Ar=Object(V.a)(["generate_api_key_logic"],(async({indexName:e,keyName:t})=>{const n=`/internal/enterprise_search/${e}/api_keys`;return await d.a.values.http.post(n,{body:JSON.stringify({keyName:t})})})),Lr=Object(V.a)(["fetch_index_pipeline_params_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/pipeline_parameters`;return await d.a.values.http.get(t)}),{showErrorFlash:!1}),zr=Object(r.kea)({actions:{closeGenerateModal:!0,openGenerateModal:!0,toggleClientsPopover:!0,toggleManageApiKeyPopover:!0},connect:{actions:[cn,["apiError"],Ar,["apiReset"],Lr,["makeRequest as fetchIndexPipelineParameters"]],values:[cn,["indexData","status"],Ar,["data as apiKeyData","status as apiKeyStatus"],Lr,["data as indexPipelineData"]]},listeners:({actions:e})=>({apiError:async(e,t)=>{await t(1e3),p.a.values.navigateToUrl(C.o)},openGenerateModal:()=>{e.apiReset()}}),path:["enterprise_search","search_index","overview"],reducers:()=>({isClientsPopoverOpen:[!1,{toggleClientsPopover:e=>!e}],isGenerateModalOpen:[!1,{closeGenerateModal:()=>!1,openGenerateModal:()=>!0}],isManageKeysPopoverOpen:[!1,{openGenerateModal:()=>!1,toggleManageApiKeyPopover:e=>!e}]}),selectors:({selectors:e})=>({apiKey:[()=>[e.apiKeyStatus,e.apiKeyData],(e,t)=>e===$.a.SUCCESS?t.apiKey.encoded:""],indexPipelineParameters:[()=>[e.indexPipelineData],e=>null!=e?e:j.f],isError:[()=>[e.status],e=>e===$.a.ERROR],isLoading:[()=>[e.status,e.indexData],(e,t)=>e===$.a.IDLE||void 0===t&&e===$.a.LOADING]})}),_r=()=>{var e;const{indexData:t,isError:n,isLoading:a}=Object(r.useValues)(zr),i=null!==(e=null==t?void 0:t.count)&&void 0!==e?e:0,s=a||n,l=[{description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.ingestionTypeCardLabel",{defaultMessage:"Ingestion type"}),isLoading:s,title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.apiIngestionMethodLabel",{defaultMessage:"API"})},{description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.documentCountCardLabel",{defaultMessage:"Document count"}),isLoading:s,title:i}];return Object(y.jsx)(S.EuiFlexGroup,{direction:"row"},l.map(((e,t)=>Object(y.jsx)(S.EuiFlexItem,{key:t},Object(y.jsx)(S.EuiPanel,{color:0===t?"primary":"subdued",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,m()({titleSize:"m"},e)))))))},Rr=({ingestionStatus:e})=>Object(y.jsx)(S.EuiPanel,{color:he(e),hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,{titleSize:"m",description:N.i18n.translate("xpack.enterpriseSearch.connector.ingestionStatus.title",{defaultMessage:"Ingestion status"}),title:Me(e)})),Fr=()=>{const{ingestionStatus:e,index:t}=Object(r.useValues)(fn);return Object(G.h)(t)?Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:1},Object(y.jsx)(S.EuiPanel,{color:"primary",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,{"data-test-subj":"entSearchContent-indexOverview-totalStats-documentCount",titleSize:"m",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.documentCountCardLabel",{defaultMessage:"Document count"}),title:t.count}))),Object(y.jsx)(S.EuiFlexItem,{grow:1,"data-test-subj":"entSearchContent-indexOverview-connectorStats-ingestionStatus"},e===J.b.INCOMPLETE?Object(y.jsx)(A.d,{to:Object(je.a)(C.n,{indexName:t.name,tabId:id.CONFIGURATION})},Object(y.jsx)(Rr,{ingestionStatus:e})):Object(y.jsx)(Rr,{ingestionStatus:e}))):Object(y.jsx)(i.a.Fragment,null)},Ur=()=>{const{status:e}=Object(r.useValues)(ia),{isEditing:t}=Object(r.useValues)(sa),{saveNameAndDescription:n,setIsEditing:a}=Object(r.useActions)(sa);return t?Object(y.jsx)(S.EuiFlyout,{onClose:()=>a(!1),size:"s"},Object(y.jsx)(S.EuiFlyoutHeader,null,Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nameAndDescriptionFlyout.title",{defaultMessage:"Describe this crawler"})))),Object(y.jsx)(S.EuiFlyoutBody,null,Object(y.jsx)(S.EuiFormRow,null,Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nameAndDescriptionFlyout.description",{defaultMessage:"By naming and describing this connector your colleagues and wider team will know what this connector is meant for."}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(ra,null)),Object(y.jsx)(S.EuiFlyoutFooter,null,Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{onClick:()=>a(!1),isLoading:e===$.a.LOADING},zt.e)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{isLoading:e===$.a.LOADING,fill:!0,onClick:n},N.i18n.translate("xpack.enterpriseSearch.content.indices.configurationConnector.nameAndDescriptionFlyout.saveButtonLabel",{defaultMessage:"Save name and description"})))))):null},Pr=({label:e,onClick:t})=>Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},e),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{onClick:t},"Edit"))),Qr=()=>{const{indexData:e,isError:t,isLoading:n}=Object(r.useValues)(zr),a=n||t,{setIsEditing:s}=Object(r.useActions)(sa);if(!Object(G.h)(e)&&!Object(G.j)(e))return Object(y.jsx)(i.a.Fragment,null);const l=[{description:Object(y.jsx)(Pr,{label:zt.u,onClick:()=>s(!0)}),isLoading:a,title:e.connector.name,descriptionElement:"div",titleElement:"div"},{description:Object(y.jsx)(Pr,{label:zt.l,onClick:()=>s(!0)}),descriptionElement:"div",isLoading:a,title:Object(y.jsx)(S.EuiText,{size:"s"},e.connector.description||""),titleElement:"div"}];return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row"},l.map(((e,t)=>Object(y.jsx)(S.EuiFlexItem,{key:t},Object(y.jsx)(S.EuiPanel,{color:"subdued",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,m()({titleSize:"m"},e))))))),Object(y.jsx)(Ur,null))},Yr=()=>{var e,t,n,a;const{indexData:s,isError:l,isLoading:o}=Object(r.useValues)(zr),c=o||l;if(!Object(G.h)(s))return Object(y.jsx)(i.a.Fragment,null);const u=[{"data-test-subj":"entSearchContent-indexOverview-totalStats-ingestionType",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.ingestionTypeCardLabel",{defaultMessage:"Ingestion type"}),isLoading:c,title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.connectorIngestionMethodLabel",{defaultMessage:"Connector"})},{"data-test-subj":"entSearchContent-indexOverview-totalStats-connectorType",description:N.i18n.translate("xpack.enterpriseSearch.connector.connectorTypePanel.title",{defaultMessage:"Connector type"}),title:null!==(e=null!==(t=null===(n=vt.find((e=>e.serviceType===s.connector.service_type)))||void 0===n?void 0:n.name)&&void 0!==t?t:s.connector.service_type)&&void 0!==e?e:N.i18n.translate("xpack.enterpriseSearch.connector.connectorTypePanel.unknown.label",{defaultMessage:"Unknown"})},{description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.languageLabel",{defaultMessage:"Language analyzer"}),isLoading:c,title:De(null!==(a=s.connector.language)&&void 0!==a?a:"")}];return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(Qr,null),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"row"},u.map(((e,t)=>Object(y.jsx)(S.EuiFlexItem,{key:t},Object(y.jsx)(S.EuiPanel,{color:"primary",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,m()({titleSize:"m"},e))))))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Fr,null))},Br=Object(r.kea)({path:["enterprise_search","crawler","crawl_detail_logic"],actions:{closeFlyout:!0,fetchCrawlRequest:e=>({requestId:e}),onRecieveCrawlRequest:e=>({crawlRequestFromServer:e}),setSelectedTab:e=>({selectedTab:e})},reducers:{crawlRequest:[null,{onRecieveCrawlRequest:(e,{crawlRequestFromServer:t})=>function(e){const{began_at:t,completed_at:n,crawl_config:a,created_at:i,id:s,stats:r,status:l,type:o}=e;return{beganAt:t,completedAt:n,crawlConfig:nn(a),createdAt:i,id:s,stats:r&&en(r),status:l,type:o}}(t)}],crawlRequestFromServer:[null,{onRecieveCrawlRequest:(e,{crawlRequestFromServer:t})=>t}],dataLoading:[!0,{fetchCrawlRequest:()=>!0,onRecieveCrawlRequest:()=>!1}],flyoutClosed:[!0,{fetchCrawlRequest:()=>!1,closeFlyout:()=>!0}],selectedTab:["preview",{fetchCrawlRequest:()=>"preview",setSelectedTab:(e,{selectedTab:t})=>t}]},listeners:({actions:e})=>({fetchCrawlRequest:async({requestId:t})=>{const{http:n}=d.a.values,{indexName:a}=un.values;try{const i=await n.get(`/internal/enterprise_search/indices/${a}/crawler/crawl_requests/${t}`);e.onRecieveCrawlRequest(i)}catch(e){Object(Pt.e)(e)}}})});var Gr=n(185),$r=n(17),Vr=n.n($r);const qr=({crawlDepth:e,crawlType:t,domainCount:n,stats:a})=>{var i,s,r,l,o,c;const u=(e,t)=>Object.entries(t).reduce(((t,[n,a])=>n[0]!==e?t:a+t),0),d={clientErrorCount:null!=a&&null!==(i=a.status)&&void 0!==i&&i.statusCodes?u("4",a.status.statusCodes):0,serverErrorCount:null!=a&&null!==(s=a.status)&&void 0!==s&&s.statusCodes?u("5",a.status.statusCodes):0},p=!a;return Object(y.jsx)(S.EuiPanel,{paddingSize:"l",color:"primary"},Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:2},Object(y.jsx)(S.EuiStat,{"data-test-subjet":"crawlType",titleSize:"s",title:N.i18n.translate("xpack.enterpriseSearch.crawler.components.crawlDetailsSummary.crawlCountOnDomains",{defaultMessage:"{crawlType} crawl on {domainCount, plural, one {# domain} other {# domains}}",values:{crawlType:t[0].toUpperCase()+t.substring(1),domainCount:n}}),description:N.i18n.translate("xpack.enterpriseSearch.crawler.components.crawlDetailsSummary.crawlTypeLabel",{defaultMessage:"Crawl type"})})),Object(y.jsx)(S.EuiFlexItem,{grow:1},Object(y.jsx)(S.EuiStat,{"data-test-subj":"crawlDepth",titleSize:"s",title:e,description:N.i18n.translate("xpack.enterpriseSearch.crawler.components.crawlDetailsSummary.crawlDepthLabel",{defaultMessage:"Max crawl depth"})})),!p&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiStat,{"data-test-subj":"crawlDuration",titleSize:"s",title:(()=>{var e;if(null!=a&&null!==(e=a.status)&&void 0!==e&&e.crawlDurationMSec){const e=Vr.a.duration(a.status.crawlDurationMSec,"milliseconds"),t=e.days();return`${t?t+"d ":""}${e.hours()}h ${e.minutes()}m ${e.seconds()}s`}return"--"})(),description:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.durationTooltipTitle",{defaultMessage:"Duration"})}))),Object(y.jsx)(S.EuiHorizontalRule,{margin:"s"}),p?Object(y.jsx)(S.EuiText,{size:"xs",textAlign:"center","data-test-subj":"logsDisabledMessage"},Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.crawler.crawlDetailsSummary.logsDisabledMessage",defaultMessage:"{configLink} in your enterprise-search.yml or user settings for more detailed crawl statistics.",values:{configLink:Object(y.jsx)(S.EuiLink,{href:k.a.enterpriseSearchConfig,external:!0},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.configLink",{defaultMessage:"Enable web crawler logs"}))}}))):Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiStat,{"data-test-subj":"urlsAllowed",titleSize:"s",title:null!==(r=null==a||null===(l=a.status)||void 0===l?void 0:l.urlsAllowed)&&void 0!==r?r:"--",description:Object(y.jsx)(S.EuiText,{size:"s"},"URLs"," ",Object(y.jsx)(S.EuiIconTip,{type:"iInCircle",color:"primary",size:"m",title:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.urlsTooltipTitle",{defaultMessage:"URLs Seen"}),content:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.urlsTooltip",{defaultMessage:"URLs found by the crawler during the crawl, including those not followed due to the crawl configuration."})}))})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiStat,{"data-test-subj":"pagesVisited",titleSize:"s",title:null!=a&&null!==(o=a.status)&&void 0!==o&&o.pagesVisited?a.status.pagesVisited:"--",description:Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.pagesVisitedTooltipTitle",{defaultMessage:"Pages"})," ",Object(y.jsx)(S.EuiIconTip,{type:"iInCircle",color:"primary",size:"m",title:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.pagesTooltipTitle",{defaultMessage:"Pages visited"}),content:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.pagesTooltip",{defaultMessage:"URLs visited and extracted during the crawl."})}))})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiStat,{"data-test-subj":"avgResponseTime",titleSize:"s",title:null!=a&&null!==(c=a.status)&&void 0!==c&&c.avgResponseTimeMSec?`${Math.round(a.status.avgResponseTimeMSec)}ms`:"--",description:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.avgResponseTimeLabel",{defaultMessage:"Avg. response"})})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiStat,{"data-test-subj":"clientErrors",titleSize:"s",title:d.clientErrorCount,description:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.clientErrorsLabel",{defaultMessage:"4xx Errors"})})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiStat,{"data-test-subj":"serverErrors",titleSize:"s",title:d.serverErrorCount,description:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsSummary.serverErrorsLabel",{defaultMessage:"5xx Errors"})}))))},Wr=()=>{const{crawlRequest:e}=Object(r.useValues)(Br);return null===e?null:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(qr,{crawlType:e.type,domainCount:e.crawlConfig.domainAllowlist.length,crawlDepth:e.crawlConfig.maxCrawlDepth,stats:e.stats||null}),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Gr.a,{hasBorder:!0,initialIsOpen:e.crawlConfig.domainAllowlist.length>0,title:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsPreview.domainsTitle",{defaultMessage:"Domains"}),iconType:"globe",items:e.crawlConfig.domainAllowlist}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(Gr.a,{hasBorder:!0,initialIsOpen:e.crawlConfig.seedUrls.length>0,title:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsPreview.seedUrlsTitle",{defaultMessage:"Seed URLs"}),iconType:"crosshairs",items:e.crawlConfig.seedUrls}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(Gr.a,{hasBorder:!0,initialIsOpen:e.crawlConfig.sitemapUrls.length>0,title:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsPreview.sitemapUrlsTitle",{defaultMessage:"Sitemap URLs"}),iconType:"visMapRegion",items:e.crawlConfig.sitemapUrls}))},Zr=()=>{const{closeFlyout:e,setSelectedTab:t}=Object(r.useActions)(Br),{crawlRequestFromServer:n,dataLoading:a,flyoutClosed:s,selectedTab:l}=Object(r.useValues)(Br);return s?null:Object(y.jsx)(S.EuiFlyout,{maxWidth:"45rem",ownFocus:!0,onClose:e,"aria-labelledby":"CrawlDetailsFlyoutTitle"},Object(y.jsx)(S.EuiFlyoutHeader,{hasBorder:!0},Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h2",{id:"CrawlDetailsFlyoutTitle"},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsFlyout.title",{defaultMessage:"Crawl request details"}))),Object(y.jsx)(S.EuiTabs,{style:{marginBottom:"-25px"}},Object(y.jsx)(S.EuiTab,{isSelected:"preview"===l,onClick:()=>t("preview")},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsFlyout.previewTabLabel",{defaultMessage:"Preview"})),Object(y.jsx)(S.EuiTab,{isSelected:"json"===l,onClick:()=>t("json")},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlDetailsFlyout.rawJSONTabLabel",{defaultMessage:"Raw JSON"})))),Object(y.jsx)(S.EuiFlyoutBody,null,a?Object(y.jsx)(wi.a,null):Object(y.jsx)(i.a.Fragment,null,"preview"===l&&Object(y.jsx)(Wr,null),"json"===l&&Object(y.jsx)(S.EuiCodeBlock,{language:"json",isCopyable:!0},JSON.stringify(n,null,2)))))};var Hr=n(86);const Jr={[Ht.Full]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlTypeOptions.full",{defaultMessage:"Full"}),[Ht.Partial]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlTypeOptions.partial",{defaultMessage:"Partial"})},Xr={[Vt.Pending]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.pending",{defaultMessage:"Pending"}),[Vt.Suspended]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.suspended",{defaultMessage:"Suspended"}),[Vt.Starting]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.starting",{defaultMessage:"Starting"}),[Vt.Running]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.running",{defaultMessage:"Running"}),[Vt.Suspending]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.suspending",{defaultMessage:"Suspending"}),[Vt.Canceling]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.canceling",{defaultMessage:"Canceling"}),[Vt.Success]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.success",{defaultMessage:"Success"}),[Vt.Failed]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.failed",{defaultMessage:"Failed"}),[Vt.Canceled]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.canceled",{defaultMessage:"Canceled"}),[Vt.Skipped]:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlerStatusOptions.skipped",{defaultMessage:"Skipped"})},Kr={[Vt.Pending]:"default",[Vt.Suspended]:"default",[Vt.Starting]:"default",[Vt.Running]:"default",[Vt.Suspending]:"default",[Vt.Canceling]:"default",[Vt.Success]:"success",[Vt.Failed]:"danger",[Vt.Canceled]:"default",[Vt.Skipped]:"default"},el=({event:e})=>"process"===e.stage?Object(y.jsx)(S.EuiBadge,{color:"hollow"},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlTypeOptions.reAppliedCrawlRules",{defaultMessage:"Re-applied crawl rules"})):e.type===Ht.Full?Object(y.jsx)(S.EuiBadge,null,Jr[Ht.Full]):e.type===Ht.Partial?Object(y.jsx)(S.EuiBadge,{color:"hollow"},Jr[Ht.Partial]):null,tl=()=>{const{events:e}=Object(r.useValues)(dn),{fetchCrawlRequest:t}=Object(r.useActions)(Br),n=[{field:"id",name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsTable.column.domainURL",{defaultMessage:"Request ID"}),render:(e,n)=>"crawl"===n.stage?Object(y.jsx)(S.EuiLink,{onClick:()=>{t(e)}},e):Object(y.jsx)("span",null,e)},{field:"createdAt",name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsTable.column.created",{defaultMessage:"Created"}),render:e=>Object(y.jsx)(tr.a,{timestamp:e})},{field:"type",name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsTable.column.crawlType",{defaultMessage:"Crawl type"}),render:(e,t)=>Object(y.jsx)(el,{event:t})},{name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsTable.column.domains",{defaultMessage:"Domains"}),render:e=>Object(y.jsx)(S.EuiBadge,null,e.crawlConfig.domainAllowlist.length)},{field:"status",name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsTable.column.status",{defaultMessage:"Status"}),render:e=>Object(y.jsx)(S.EuiBadge,{color:Kr[e]},Xr[e])}];return Object(y.jsx)(S.EuiBasicTable,{columns:n,items:e,noItemsMessage:Object(y.jsx)(S.EuiEmptyPrompt,{iconType:"tableDensityExpanded",title:Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsTable.emptyPrompt.title",{defaultMessage:"No recent crawl requests"})),body:Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsTable.emptyPrompt.body",{defaultMessage:"You haven't started any crawls yet."}))})})},nl={columns:["@timestamp","crawler.crawl.id","url.domain","url.path","event.action","http.response.status_code"],dataViewSpec:{name:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsPanel.discoverCrawlerLogsTitle",{defaultMessage:"All Crawler Logs"}),timeFieldName:"@timestamp",title:"logs-elastic_crawler-default"},sort:[["@timestamp","desc"]]},al=()=>{const{data:e}=Object(r.useValues)(dn),{services:{discover:t}}=Object(ci.useKibana)();return Object(y.jsx)(Hr.a,{hasBorder:!0,title:Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsPanel.title",{defaultMessage:"Crawl requests"})),titleSize:"s",iconType:"documents",action:Object(y.jsx)(S.EuiButton,{onClick:()=>{var e;return null===(e=t.locator)||void 0===e?void 0:e.navigate(nl)}},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsPanel.linkToDiscover",{defaultMessage:"View in Discover"})),subtitle:N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsPanel.description",{defaultMessage:"Recent crawl requests are logged here. You can track progress and examine crawl events in Kibana's Discover or Logs user intefaces"})},Object(y.jsx)(S.EuiPanel,{color:"subdued"},Object(y.jsx)(S.EuiText,{size:"s"},N.i18n.translate("xpack.enterpriseSearch.crawler.crawlRequestsPanel.userAgentDescription",{defaultMessage:"Requests originating from the crawler can be identified by the following User Agent. This is configured in your enterprise-search.yml file."})," "),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiCode,null,e?e.userAgent:"")),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(tl,null))},il=()=>{var e;const{domains:t,dataLoading:n}=Object(r.useValues)(dn),{indexData:a,isError:s,isLoading:l}=Object(r.useValues)(zr),o=null!==(e=null==a?void 0:a.count)&&void 0!==e?e:0,c=l||s,u=[{"data-test-subj":"entSearchContent-indexOverview-totalStats-ingestionType",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.ingestionTypeCardLabel",{defaultMessage:"Ingestion type"}),isLoading:c,title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.crawlerIngestionMethodLabel",{defaultMessage:"Crawler"})},{description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.domainCountCardLabel",{defaultMessage:"Domain count"}),isLoading:n||c,title:t.length},{"data-test-subj":"entSearchContent-indexOverview-totalStats-documentCount",description:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.totalStats.documentCountCardLabel",{defaultMessage:"Document count"}),isLoading:c,title:o}];return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(Qr,null),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"row"},u.map(((e,t)=>Object(y.jsx)(S.EuiFlexItem,{key:t},Object(y.jsx)(S.EuiPanel,{color:0===t?"primary":"subdued",hasShadow:!1,paddingSize:"l"},Object(y.jsx)(S.EuiStat,m()({titleSize:"m"},e))))))))},sl=Object(r.kea)({actions:{setKeyName:e=>({keyName:e})},connect:{values:[Ar,["data","status"]]},path:["enterprise_search","search_index","generate_api_key_modal"],reducers:()=>({keyName:["",{setKeyName:(e,{keyName:t})=>t}]}),selectors:({selectors:e})=>({apiKey:[()=>[e.data],e=>{var t;return(null==e||null===(t=e.apiKey)||void 0===t?void 0:t.encoded)||""}],isLoading:[()=>[e.status],e=>e===$.a.LOADING],isSuccess:[()=>[e.status],e=>e===$.a.SUCCESS]})}),rl=({indexName:e,onClose:t})=>{const{keyName:n,apiKey:a,isLoading:s,isSuccess:l}=Object(r.useValues)(sl),{ingestionMethod:o}=Object(r.useValues)(fn),{setKeyName:c}=Object(r.useActions)(sl),{makeRequest:u}=Object(r.useActions)(Ar);return Object(y.jsx)(S.EuiModal,{onClose:t},Object(y.jsx)(S.EuiModalHeader,null,Object(y.jsx)(S.EuiModalHeaderTitle,null,N.i18n.translate("xpack.enterpriseSearch.content.overview.generateApiKeyModal.title",{defaultMessage:"Generate API Key"}))),Object(y.jsx)(S.EuiModalBody,null,Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiText,{size:"m"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.overview.generateApiKeyModal.info",{defaultMessage:"Before you can start posting documents to your Elasticsearch index you'll need to create at least one API key."})," ",Object(y.jsx)(S.EuiLink,{href:k.a.apiKeys,external:!0},N.i18n.translate("xpack.enterpriseSearch.content.overview.generateApiKeyModal.learnMore",{defaultMessage:"Learn more about API keys"})))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiPanel,{hasShadow:!1,color:"primary"},Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row",alignItems:"flexEnd"},l?Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFormLabel,null,n),Object(y.jsx)(S.EuiSpacer,{size:"xs"}),Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCodeBlock,{"aria-label":n,fontSize:"m",paddingSize:"m",color:"dark",isCopyable:!0},a)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonIcon,{"data-telemetry-id":`entSearchContent-${o}-overview-generateApiKey-download`,"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.overview.generateApiKeyModal.csvDownloadButton",{defaultMessage:"Download API key"}),iconType:"download",href:encodeURI(`data:text/csv;charset=utf-8,${a}`),download:`${n}.csv`})))):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFormRow,{label:"Name your API key",fullWidth:!0},Object(y.jsx)(S.EuiFieldText,{"data-telemetry-id":`entSearchContent-${o}-overview-generateApiKey-editName`,fullWidth:!0,placeholder:"Type a name for your API key",onChange:e=>c(e.currentTarget.value),isLoading:s}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{"data-telemetry-id":`entSearchContent-${o}-overview-generateApiKey-generate `,"data-test-subj":"generateApiKeyButton",iconSide:"left",iconType:"plusInCircle",fill:!0,onClick:()=>{u({indexName:e,keyName:n.trim()})},disabled:n.trim().length<=0},N.i18n.translate("xpack.enterpriseSearch.content.overview.generateApiKeyModal.generateButton",{defaultMessage:"Generate API key"})))))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s",color:"#006bb8"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.overview.generateApiKeyModal.apiKeyWarning",{defaultMessage:"Elastic does not store API keys. Once generated, you'll only be able to view the key one time. Make sure you save it somewhere secure. If you lose access to it you'll need to generate a new API key from this screen."})))))))))),Object(y.jsx)(S.EuiModalFooter,null,Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":`entSearchContent-${o}-overview-generateApiKey-cancel`,onClick:t},N.i18n.translate("xpack.enterpriseSearch.content.overview.generateApiKeyModal.cancel",{defaultMessage:"Cancel"}))))};var ll=n(83),ol=n(523),cl=n.n(ol),ul=n(524),dl=n.n(ul),pl=n(525),gl=n.n(pl),jl=n(526),xl=n.n(jl),Ml=n(527),hl=n.n(Ml),ml=n(528),fl=n.n(ml),bl=n(529),yl=n.n(bl),Ol=n(530),Il=n.n(Ol),Sl=n(531),Nl=n.n(Sl),El=n(532),Dl=n.n(El);const Tl={curl:cl.a,dotnet:dl.a,go:gl.a,java:xl.a,javascript:hl.a,perl:fl.a,php:yl.a,python:Il.a,ruby:Nl.a,rust:Dl.a},wl=e=>e?Object.entries(e).reduce(((e,t)=>e+`, "${t[0]}": ${t[1]}`),""):"",vl={buildSearchQuery:({indexName:e})=>`POST /${null!=e?e:"books"}/_search?pretty\n {\n "query": {\n "query_string": {\n "query": "snow"\n }\n }\n }`,ingestData:({indexName:e,ingestPipeline:t,extraIngestDocumentValues:n})=>{const a=t?wl(n):"";return`POST _bulk?pretty${t?`&pipeline=${t}`:""}\n { "index" : { "_index" : "${e}" } }\n {"name": "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470${a}}\n { "index" : { "_index" : "${e}" } }\n {"name": "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585${a}}\n { "index" : { "_index" : "${e}" } }\n {"name": "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328${a}}\n { "index" : { "_index" : "${e}" } }\n {"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227${a}}\n { "index" : { "_index" : "${e}" } }\n {"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268${a}}\n { "index" : { "_index" : "${e}" } }\n {"name": "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311${a}}`}},Cl={buildSearchQuery:({indexName:e})=>`curl -X POST "\${ES_URL}/${e}/_search?pretty" \\\n -H "Authorization: ApiKey "\${API_KEY}"" \\\n -H "Content-Type: application/json" \\\n -d'\n{\n "query": {\n "query_string": {\n "query": "snow"\n }\n }\n}'`,configureClient:({apiKey:e,url:t})=>`export ES_URL="${t}"\nexport API_KEY="${e}"`,docLink:k.a.restApis,github:{label:N.i18n.translate("xpack.enterpriseSearch.languages.cURL.githubLink",{defaultMessage:"curl"}),link:"https://github.com/curl/curl"},iconType:"curl.svg",id:ll.d.CURL,ingestData:({indexName:e,ingestPipeline:t,extraIngestDocumentValues:n})=>{const a=t?wl(n):"";return`curl -X POST "\${ES_URL}/_bulk?pretty${t?`&pipeline=${t}`:""}" \\\n -H "Authorization: ApiKey "\${API_KEY}"" \\\n -H "Content-Type: application/json" \\\n -d'\n{ "index" : { "_index" : "${e}" } }\n{"name": "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470${a}}\n{ "index" : { "_index" : "${e}" } }\n{"name": "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585${a}}\n{ "index" : { "_index" : "${e}" } }\n{"name": "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328${a}}\n{ "index" : { "_index" : "${e}" } }\n{"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227${a}}\n{ "index" : { "_index" : "${e}" } }\n{"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268${a}}\n{ "index" : { "_index" : "${e}" } }\n{"name": "The Handmaid'"'"'s Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311${a}}\n'`},ingestDataIndex:"",installClient:"# if cURL is not already installed on your system\n# then install it with the package manager of your choice\n\n# example\nbrew install curl",name:N.i18n.translate("xpack.enterpriseSearch.languages.cURL",{defaultMessage:"cURL"}),languageStyling:"shell",testConnection:({indexName:e})=>`curl "\${ES_URL}/${e}" \\\n -H "Authorization: ApiKey "\${API_KEY}"" \\\n -H "Content-Type: application/json"`},kl={buildSearchQuery:({indexName:e})=>`searchResp, err := es.Search(\n es.Search.WithContext(context.Background()),\n es.Search.WithIndex("${e}"),\n es.Search.WithQuery("snow"),\n es.Search.WithTrackTotalHits(true),\n es.Search.WithPretty(),\n)\n\nfmt.Println(searchResp, err)`,configureClient:({url:e,apiKey:t,cloudId:n})=>`import (\n "bytes"\n "context"\n "fmt"\n "log"\n\n "github.com/elastic/go-elasticsearch/v8"\n)\n\n// ...\n\ncfg := elasticsearch.Config{\n ${n?`CloudID:"${n}",`:`Addresses: []string{\n "${e}",\n },`}\n APIKey: "${t}",\n}\n\nes, err := elasticsearch.NewClient(cfg)\nif err != nil {\n log.Fatalf("Error creating the client: %s", err)\n}\n`,docLink:k.a.clientsGoIndex,github:{label:N.i18n.translate("xpack.enterpriseSearch.languages.go.githubLink",{defaultMessage:"go-elasticsearch"}),link:"https://github.com/elastic/go-elasticsearch"},iconType:"go.svg",id:ll.d.GO,ingestData:({indexName:e,ingestPipeline:t,extraIngestDocumentValues:n})=>{const a=t?wl(n):"";return`buf := bytes.NewBufferString(\`\n{"index":{"_id":"9780553351927"}}\n{"name":"Snow Crash","author":"Neal Stephenson","release_date":"1992-06-01","page_count": 470${a}}\n{ "index": { "_id": "9780441017225"}}\n{"name": "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585${a}}\n{ "index": { "_id": "9780451524935"}}\n{"name": "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328${a}}\n{ "index": { "_id": "9781451673319"}}\n{"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227${a}}\n{ "index": { "_id": "9780060850524"}}\n{"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268${a}}\n{ "index": { "_id": "9780385490818"}}\n{"name": "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311${a}}\n\`)\n\ningestResult, err := es.Bulk(\n bytes.NewReader(buf.Bytes()),\n es.Bulk.WithIndex("${e}"),${t?`\n es.Bulk.WithPipeline("${t}"),`:""}\n)\n\nfmt.Println(ingestResult, err)`},ingestDataIndex:"",installClient:"go get github.com/elastic/go-elasticsearch/v8@latest",name:N.i18n.translate("xpack.enterpriseSearch.languages.go",{defaultMessage:"Go"}),testConnection:'// API Key should have cluster monitoring rights\ninfores, err := es.Info()\nif err != nil {\n log.Fatalf("Error getting response: %s", err)\n}\n\nfmt.Println(infores)'},Al={buildSearchQuery:({indexName:e})=>`// Let's search!\nconst searchResult = await client.search({\n index: '${e}',\n q: 'snow'\n});\n\nconsole.log(searchResult.hits.hits)\n`,configureClient:({url:e,apiKey:t})=>`const { Client } = require('@elastic/elasticsearch');\nconst client = new Client({\n node: '${e}',\n auth: {\n apiKey: '${t}'\n }\n});`,docLink:k.a.clientsJsIntro,github:{label:N.i18n.translate("xpack.enterpriseSearch.languages.javascript.githubLink",{defaultMessage:"elasticsearch"}),link:"https://github.com/elastic/elasticsearch-js"},iconType:"javascript.svg",id:ll.d.JAVASCRIPT,ingestData:({indexName:e,ingestPipeline:t,extraIngestDocumentValues:n})=>{const a=t?wl(n):"";return`// Sample data books\nconst dataset = [\n {"name": "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470${a}},\n {"name": "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585${a}},\n {"name": "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328${a}},\n {"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227${a}},\n {"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268${a}},\n {"name": "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311${a}},\n];\n\n// Index with the bulk helper\nconst result = await client.helpers.bulk({\n datasource: dataset,${t?`\n pipeline: "${t}",`:""}\n onDocument: (doc) => ({ index: { _index: '${e}' }}),\n});\n\nconsole.log(result);\n/**\n{\n total: 6,\n failed: 0,\n retry: 0,\n successful: 6,\n noop: 0,\n time: 82,\n bytes: 1273,\n aborted: false\n}\n*/`},ingestDataIndex:"",installClient:"npm install @elastic/elasticsearch@8",name:N.i18n.translate("xpack.enterpriseSearch.languages.javascript",{defaultMessage:"JavaScript"}),testConnection:"// API Key should have cluster monitor rights.\nconst resp = await client.info();\n\nconsole.log(resp);\n/**\n{\n name: 'instance-0000000000',\n cluster_name: 'd9dcd35d12fe46dfaa28ec813f65d57b',\n cluster_uuid: 'iln8jaivThSezhTkzp0Knw',\n version: {\n build_flavor: 'default',\n build_type: 'docker',\n build_hash: 'ca3dc3a882d76f14d2765906ce3b1cf421948d19',\n build_date: '2023-08-28T11:24:16.383660553Z',\n build_snapshot: true,\n lucene_version: '9.7.0',\n minimum_wire_compatibility_version: '7.17.0',\n minimum_index_compatibility_version: '7.0.0'\n },\n tagline: 'You Know, for Search'\n}\n*/"},Ll={buildSearchQuery:({indexName:e})=>`$params = [\n 'index' => '${e}',\n 'body' => [\n 'q' => 'snow'\n ]\n];\n\n$response = $client->search($params);\nprint_r($response->asArray());`,configureClient:({url:e,apiKey:t})=>`$client = ClientBuilder::create()\n ->setHosts(['${e}'])\n ->setApiKey('${t}')\n ->build();`,docLink:k.a.clientsPhpOverview,github:{label:N.i18n.translate("xpack.enterpriseSearch.languages.php.githubLink",{defaultMessage:"elasticsearch-php"}),link:"https://github.com/elastic/elasticsearch-php"},iconType:"php.svg",id:ll.d.PHP,ingestData:({indexName:e,ingestPipeline:t,extraIngestDocumentValues:n})=>{const a=t?(e=>e?Object.entries(e).reduce(((e,t)=>e+`\n '${t[0]}' => ${t[1]},`),""):"")(n):"";return`$params = [${t?`\n 'pipeline' => '${t}',`:""}\n 'body' => [\n [\n 'index' => [\n '_index' => '${e}',\n '_id' => '9780553351927',\n ],\n ],\n [\n 'name' => 'Snow Crash',\n 'author' => 'Neal Stephenson',\n 'release_date' => '1992-06-01',\n 'page_count' => 470,${a}\n ],\n [\n 'index' => [\n '_index' => '${e}',\n '_id' => '9780441017225',\n ],\n ],\n [\n 'name' => 'Revelation Space',\n 'author' => 'Alastair Reynolds',\n 'release_date' => '2000-03-15',\n 'page_count' => 585,${a}\n ],\n [\n 'index' => [\n '_index' => '${e}',\n '_id' => '9780451524935',\n ],\n ],\n [\n 'name' => '1984',\n 'author' => 'George Orwell',\n 'release_date' => '1985-06-01',\n 'page_count' => 328,${a}\n ],\n [\n 'index' => [\n '_index' => '${e}',\n '_id' => '9781451673319',\n ],\n ],\n [\n 'name' => 'Fahrenheit 451',\n 'author' => 'Ray Bradbury',\n 'release_date' => '1953-10-15',\n 'page_count' => 227,${a}\n ],\n [\n 'index' => [\n '_index' => '${e}',\n '_id' => '9780060850524',\n ],\n ],\n [\n 'name' => 'Brave New World',\n 'author' => 'Aldous Huxley',\n 'release_date' => '1932-06-01',\n 'page_count' => 268,${a}\n ],\n [\n 'index' => [\n '_index' => '${e}',\n '_id' => '9780385490818',\n ],\n ],\n [\n 'name' => 'The Handmaid\\'s Tale',\n 'author' => 'Margaret Atwood',\n 'release_date' => '1985-06-01',\n 'page_count' => 311,${a}\n ],\n ],\n ];\n\n $response = $client->bulk($params);\n echo $response->getStatusCode();\n echo (string) $response->getBody();`},ingestDataIndex:"",installClient:"composer require elasticsearch/elasticsearch",name:N.i18n.translate("xpack.enterpriseSearch.languages.php",{defaultMessage:"PHP"}),testConnection:"// API Key should have cluster monitor rights.\n$response = $client->info();\necho $response->getStatusCode();\necho (string) $response->getBody();"},zl={buildSearchQuery:({indexName:e})=>`client.search(index="${e}", q="snow")`,configureClient:({url:e,apiKey:t})=>`from elasticsearch import Elasticsearch\n\nclient = Elasticsearch(\n "${e}",\n api_key="${t}"\n)`,docLink:k.a.clientsPythonOverview,github:{label:N.i18n.translate("xpack.enterpriseSearch.languages.python.githubLink",{defaultMessage:"elasticsearch-py"}),link:"https://github.com/elastic/elasticsearch-py"},iconType:"python.svg",id:ll.d.PYTHON,ingestData:({indexName:e,ingestPipeline:t,extraIngestDocumentValues:n})=>{const a=t?wl(n):"";return`documents = [\n { "index": { "_index": "${e}", "_id": "9780553351927"}},\n {"name": "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470${a}},\n { "index": { "_index": "${e}", "_id": "9780441017225"}},\n {"name": "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585${a}},\n { "index": { "_index": "${e}", "_id": "9780451524935"}},\n {"name": "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328${a}},\n { "index": { "_index": "${e}", "_id": "9781451673319"}},\n {"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227${a}},\n { "index": { "_index": "${e}", "_id": "9780060850524"}},\n {"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268${a}},\n { "index": { "_index": "${e}", "_id": "9780385490818"}},\n {"name": "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311${a}},\n]\n\nclient.bulk(operations=documents${t?`, pipeline="${t}"`:""})`},ingestDataIndex:"",installClient:"python -m pip install elasticsearch\n\n# If your application uses async/await in Python you can install with the async extra\n# python -m pip install elasticsearch[async]\n ",name:N.i18n.translate("xpack.enterpriseSearch.languages.python",{defaultMessage:"Python"}),testConnection:"# API key should have cluster monitor rights\nclient.info()"},_l={buildSearchQuery:({indexName:e})=>`client.search(index: '${e}', q: 'snow')`,configureClient:({url:e,apiKey:t,cloudId:n})=>`client = Elasticsearch::Client.new(\n api_key: '${t}',\n ${n?`cloud_id: ${n},`:`url: '${e}',`}\n)\n`,docLink:k.a.clientsRubyOverview,github:{label:N.i18n.translate("xpack.enterpriseSearch.languages.ruby.githubLink",{defaultMessage:"elasticsearch-ruby"}),link:"https://github.com/elastic/elasticsearch-ruby"},iconType:"ruby.svg",id:ll.d.RUBY,ingestData:({indexName:e,ingestPipeline:t,extraIngestDocumentValues:n})=>{const a=t?(e=>e?Object.entries(e).reduce(((e,t)=>e+`, ${t[0]}: ${t[1]}`),""):"")(n):"";return`documents = [\n { index: { _index: '${e}', data: {name: "Snow Crash", author: "Neal Stephenson", release_date: "1992-06-01", page_count: 470${a}} } },\n { index: { _index: '${e}', data: {name: "Revelation Space", author: "Alastair Reynolds", release_date: "2000-03-15", page_count: 585${a}} } },\n { index: { _index: '${e}', data: {name: "1984", author: "George Orwell", release_date: "1985-06-01", page_count: 328${a}} } },\n { index: { _index: '${e}', data: {name: "Fahrenheit 451", author: "Ray Bradbury", release_date: "1953-10-15", page_count: 227${a}} } },\n { index: { _index: '${e}', data: {name: "Brave New World", author: "Aldous Huxley", release_date: "1932-06-01", page_count: 268${a}} } },\n { index: { _index: '${e}', data: {name: "The Handmaid's Tale", author: "Margaret Atwood", release_date: "1985-06-01", page_count: 311${a}} } }\n]\nclient.bulk(body: documents${t?`, pipeline: "${t}"`:""})`},ingestDataIndex:"",installClient:"$ gem install elasticsearch",name:N.i18n.translate("xpack.enterpriseSearch.languages.ruby",{defaultMessage:"Ruby"}),testConnection:"# API Key should have cluster monitoring rights.\nclient.info"},Rl={[ll.d.CURL]:Cl,[ll.d.PYTHON]:zl,[ll.d.JAVASCRIPT]:Al,[ll.d.PHP]:Ll,[ll.d.GO]:kl,[ll.d.RUBY]:_l},Fl=Object.values(Rl);var Ul={name:"26bywx",styles:"overflow-wrap:anywhere"};const Pl=()=>{const{http:e}=Object(r.useValues)(d.a),{apiKey:t,isGenerateModalOpen:n,indexPipelineParameters:s}=Object(r.useValues)(zr),{fetchIndexPipelineParameters:l,openGenerateModal:o,closeGenerateModal:c}=Object(r.useActions)(zr),{indexName:u}=Object(r.useValues)(fn),{services:g}=Object(ci.useKibana)(),x=Object(zn.a)();Object(a.useEffect)((()=>{l({indexName:u})}),[u]);const M={apiKey:t,cloudId:x.cloudId,extraIngestDocumentValues:{_extract_binary_content:s.extract_binary_content,_reduce_whitespace:s.reduce_whitespace,_run_ml_inference:s.run_ml_inference},indexName:u,ingestPipeline:s.name,url:x.elasticsearchUrl||"https://localhost:9200"},h=e.basePath.prepend(`/plugins/${j.u}/assets/client_libraries/`),[m,f]=Object(a.useState)(Cl);return Object(y.jsx)(i.a.Fragment,null,n&&Object(y.jsx)(rl,{indexName:u,onClose:c}),Object(y.jsx)(S.EuiTitle,{size:"l"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.overview.gettingStarted.pageTitle",{defaultMessage:"Getting Started with Elastic API"}))),Object(y.jsx)(ll.f,{docLinks:{elasticsearchClients:k.a.clientsGuide,kibanaRunApiInConsole:k.a.consoleGuide},http:e,isPanelLeft:!1,overviewPanelProps:{color:"plain",hasShadow:!1}},Fl.map(((e,t)=>Object(y.jsx)(S.EuiFlexItem,{key:`panelItem.${t}`},Object(y.jsx)(ll.c,{language:e,setSelectedLanguage:f,isSelectedLanguage:m===e,src:Tl[e.id]}))))),Object(y.jsx)(ll.b,{codeSnippet:Object(ll.i)(m,"installClient",M),consoleRequest:Object(ll.h)("installClient"),languages:Fl,language:m,setSelectedLanguage:f,assetBasePath:h,application:g.application,sharePlugin:g.share,isPanelLeft:!1,overviewPanelProps:{color:"plain",hasShadow:!1}}),Object(y.jsx)(ll.e,{description:N.i18n.translate("xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.description",{defaultMessage:"You'll need your private API key to securely connect to your project. Copy it somewhere safe."}),rightPanelContent:Object(y.jsx)(S.EuiPanel,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h5",null,N.i18n.translate("xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeytitle",{defaultMessage:"Generate an API key"}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,null,N.i18n.translate("xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.apiKeydesc",{defaultMessage:"Your private, unique identifier for authentication and authorization."}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{key:"viewApiKeys",iconType:"plusInCircle",onClick:o,fill:!0},Object(y.jsx)(S.EuiText,null,Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.overview.documementExample.generateApiKeyButton.createNew",{defaultMessage:"New"}))))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{key:"viewApiKeys",iconType:"popout",iconSide:"right",onClick:()=>p.a.values.navigateToUrl("/app/management/security/api_keys",{shouldNotCreateHref:!0})},Object(y.jsx)(S.EuiText,null,Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.overview.documementExample.generateApiKeyButton.viewAll",{defaultMessage:"Manage"}))))))))),links:[],title:N.i18n.translate("xpack.enterpriseSearch.content.overview.gettingStarted.generateApiKeyPanel.panelTitle",{defaultMessage:"Generate an API key"}),overviewPanelProps:{color:"plain",hasShadow:!1}}),Object(y.jsx)(ll.e,{description:N.i18n.translate("xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.description",{defaultMessage:"You'll need this to identify your deployment."}),rightPanelContent:Object(y.jsx)(S.EuiSplitPanel.Outer,null,Object(y.jsx)(S.EuiSplitPanel.Inner,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h5",null,N.i18n.translate("xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.elasticTitle",{defaultMessage:"Store your Elasticsearch URL"}))),Object(y.jsx)(S.EuiText,null,N.i18n.translate("xpack.enterpriseSearch.content.overview.gettingStarted.cloudId.desc",{defaultMessage:"Unique identifier for your deployment. "}))),Object(y.jsx)(S.EuiThemeProvider,{colorMode:"dark"},Object(y.jsx)(S.EuiSplitPanel.Inner,{paddingSize:"none"},Object(y.jsx)(S.EuiCodeBlock,{isCopyable:!0,fontSize:"m",css:Ul},M.cloudId?ze.a`{ CloudID: "${M.cloudId}", Url: "${M.url}", }`:M.url)))),links:[],title:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStarted.cloudId.panelTitleElastic",{defaultMessage:"Copy your Elasticsearch URL"}),overviewPanelProps:{color:"plain",hasShadow:!1}}),Object(y.jsx)(ll.e,{description:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStarted.configureClient.description",{defaultMessage:"Initialize your client with your unique API key"}),rightPanelContent:Object(y.jsx)(ll.a,{languages:Fl,codeSnippet:Object(ll.i)(m,"configureClient",M),consoleRequest:Object(ll.h)("configureClient"),selectedLanguage:m,setSelectedLanguage:f,assetBasePath:h,application:g.application,sharePlugin:g.share}),links:[],title:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStarted.configureClient.title",{defaultMessage:"Configure your client"}),overviewPanelProps:{color:"plain",hasShadow:!1}}),Object(y.jsx)(ll.e,{description:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStarted.testConnection.description",{defaultMessage:"Send a test request to confirm your language client and Elasticsearch instance are up and running."}),rightPanelContent:Object(y.jsx)(ll.a,{languages:Fl,codeSnippet:Object(ll.i)(m,"testConnection",M),consoleRequest:Object(ll.h)("testConnection"),selectedLanguage:m,setSelectedLanguage:f,assetBasePath:h,application:g.application,sharePlugin:g.share}),links:[],title:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStarted.testConnection.title",{defaultMessage:"Test your connection"}),overviewPanelProps:{color:"plain",hasShadow:!1}}),Object(y.jsx)(ll.e,{description:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStarted.ingestData.description",{defaultMessage:"Add data to your data stream or index to make it searchable"}),rightPanelContent:Object(y.jsx)(ll.a,{languages:Fl,codeSnippet:Object(ll.i)(m,"ingestData",M),consoleRequest:Object(ll.i)(vl,"ingestData",M),selectedLanguage:m,setSelectedLanguage:f,assetBasePath:h,application:g.application,sharePlugin:g.share}),links:[],title:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStarted.ingestData.title",{defaultMessage:"Ingest Data"}),overviewPanelProps:{color:"plain",hasShadow:!1}}),Object(y.jsx)(ll.e,{description:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStarted.searchQuery.description",{defaultMessage:"Now you're ready to start experimenting with searching and performing aggregations on your Elasticsearch data."}),rightPanelContent:Object(y.jsx)(ll.a,{languages:Fl,codeSnippet:Object(ll.i)(m,"buildSearchQuery",M),consoleRequest:Object(ll.i)(vl,"buildSearchQuery",M),selectedLanguage:m,setSelectedLanguage:f,assetBasePath:h,application:g.application,sharePlugin:g.share}),links:[],title:N.i18n.translate("xpack.enterpriseSearch.overview.gettingStarted.searchQuery.title",{defaultMessage:"Build your first search query"}),overviewPanelProps:{color:"plain",hasShadow:!1}}))},Ql=()=>{const{isGenerateModalOpen:e}=Object(r.useValues)(zr),{indexName:t,isHiddenIndex:n}=Object(r.useValues)(fn),{closeGenerateModal:a}=Object(r.useActions)(zr);return Object(y.jsx)(i.a.Fragment,null,e&&Object(y.jsx)(rl,{indexName:t,onClose:a}),Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{hasBorder:!0,paddingSize:"xl"},n?Object(y.jsx)(S.EuiEmptyPrompt,{body:Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.overview.emptyPrompt.body",{defaultMessage:"We do not recommend adding documents to an externally managed index."})),title:Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.overview.emptyPrompt.title",{defaultMessage:"Index managed externally"}))}):Object(y.jsx)(Pl,null)))))};var Yl=n(80),Bl=n(196);function Gl(e){return e?`${e.hours()}h ${e.minutes()}m ${e.seconds()}s`:"--"}function $l(e){switch(e){case ne.i.COMPLETED:return"success";case ne.i.ERROR:case ne.i.CANCELED:return"danger";case ne.i.IN_PROGRESS:case ne.i.PENDING:case ne.i.SUSPENDED:case ne.i.CANCELING:return"warning"}}var Vl=n(533),ql=n.n(Vl),Wl=n(534);const Zl={b:Math.pow(1024,0),gb:Math.pow(1024,3),kb:Math.pow(1024,1),mb:Math.pow(1024,2)};function Hl(e,t){return`${Number(e.toFixed(2))}${t}`}class ByteSizeValue{static parse(e){const t=/([1-9][0-9]*)(b|kb|mb|gb)/i.exec(e);if(!t){const t=Number(e);if("number"!=typeof t||isNaN(t))throw new Error("Failed to parse value as byte value. Value must be either number of bytes, or follow the format [b|kb|mb|gb] (e.g., '1024kb', '200mb', '1gb'), where the number is a safe positive integer.");return new ByteSizeValue(t)}const n=parseInt(t[1],10),a=t[2].toLowerCase();return new ByteSizeValue(n*Zl[a])}constructor(e){if(this.valueInBytes=e,!Number.isSafeInteger(e)||e<0)throw new Error("Value in bytes is expected to be a safe positive integer.")}isGreaterThan(e){return this.valueInBytes>e.valueInBytes}isLessThan(e){return this.valueInBytes[ms|s|m|h|d|w|M|Y] (e.g. '70ms', '5s', '3d', '1Y'), where the duration is a safe positive integer.");return Kl(t)}const n=parseInt(t[1],10),a=t[2];return Object($r.duration)(n,a)}(e):"number"==typeof e?Kl(e):e}ql.a.extend({type:"boolean",base:ql.a.boolean(),coerce(e,{error:t}){if(void 0===e)return{value:e};if("string"==typeof e){const t=e.toLowerCase();e="true"===t||"false"!==t&&e}return"boolean"!=typeof e?{errors:[t("boolean.base")]}:{value:e}}},{type:"stream",prepare:(e,{error:t})=>e instanceof Wl.Stream?{value:e}:{errors:[t("stream.base")]}},{type:"bytes",coerce(e,{error:t}){try{if("string"==typeof e)return{value:ByteSizeValue.parse(e)};if("number"==typeof e)return{value:new ByteSizeValue(e)}}catch(e){return{errors:[t("bytes.parse",{message:e.message})]}}return{value:e}},validate:(e,{error:t})=>e instanceof ByteSizeValue?{value:e}:{errors:[t("bytes.base")]},rules:{min:{args:[{name:"limit",assert:ql.a.alternatives([ql.a.number(),ql.a.string()]).required()}],method(e){return this.$_addRule({name:"min",args:{limit:e}})},validate(e,{error:t},n){const a=Jl(n.limit);return e.isLessThan(a)?t("bytes.min",{value:e,limit:a}):e}},max:{args:[{name:"limit",assert:ql.a.alternatives([ql.a.number(),ql.a.string()]).required()}],method(e){return this.$_addRule({name:"max",args:{limit:e}})},validate(e,{error:t},n){const a=Jl(n.limit);return e.isGreaterThan(a)?t("bytes.max",{value:e,limit:a}):e}}}},{type:"duration",coerce(e,{error:t}){try{if("string"==typeof e||"number"==typeof e)return{value:eo(e)}}catch(e){return{errors:[t("duration.parse",{message:e.message})]}}return{value:e}},validate:(e,{error:t})=>Object($r.isDuration)(e)?{value:e}:{errors:[t("duration.base")]}},{type:"number",base:ql.a.number(),coerce(e,{error:t}){if(void 0===e)return{value:e};const n="string"==typeof e?Number(e):e;return"number"!=typeof n||isNaN(n)?{errors:[t("number.base")]}:{value:e}}},{type:"object",base:ql.a.object(),coerce(e,{error:t,prefs:n}){if(void 0===e||Object(on.isPlainObject)(e))return{value:e};if(n.convert&&"string"==typeof e)try{return{value:JSON.parse(e)}}catch(e){return{errors:[t("object.parse")]}}return{errors:[t("object.base")]}}},{type:"array",base:ql.a.array(),coerce(e,{error:t,prefs:n}){if(void 0===e||Array.isArray(e))return{value:e};if(n.convert&&"string"==typeof e)try{return{value:JSON.parse(e)}}catch(e){return{errors:[t("array.parse")]}}return{errors:[t("array.base")]}}},{type:"map",coerce(e,{error:t,prefs:n}){if(void 0===e)return{value:e};if(Object(on.isPlainObject)(e))return{value:new Map(Object.entries(e))};if(n.convert&&"string"==typeof e)try{const t=JSON.parse(e);return Object(on.isPlainObject)(t)?{value:new Map(Object.entries(t))}:{value:t}}catch(e){return{errors:[t("map.parse")]}}return{value:e}},validate:(e,{error:t})=>e instanceof Map?{value:e}:{errors:[t("map.base")]},rules:{entries:{args:[{name:"key",assert:ql.a.object().schema()},{name:"value",assert:ql.a.object().schema()}],method(e,t){return this.$_addRule({name:"entries",args:{key:e,value:t}})},validate(e,{error:t},n,a){const i=new Map;for(const[a,s]of e){let e,r;try{e=ql.a.attempt(a,n.key,{presence:"required"})}catch(e){return t("map.key",{entryKey:a,reason:e})}try{r=ql.a.attempt(s,n.value,{presence:"required"})}catch(e){return t("map.value",{entryKey:a,reason:e})}i.set(e,r)}return i}}}},{type:"record",coerce(e,{error:t,prefs:n}){if(void 0===e||Object(on.isPlainObject)(e))return{value:e};if(n.convert&&"string"==typeof e)try{return{value:JSON.parse(e)}}catch(e){return{errors:[t("record.parse")]}}return{errors:[t("record.base")]}},validate:(e,{error:t})=>Object(on.isPlainObject)(e)?{value:e}:{errors:[t("record.base")]},rules:{entries:{args:[{name:"key",assert:ql.a.object().schema()},{name:"value",assert:ql.a.object().schema()}],method(e,t){return this.$_addRule({name:"entries",args:{key:e,value:t}})},validate(e,{error:t},n){const a={};for(const[i,s]of Object.entries(e)){let e,r;try{e=ql.a.attempt(i,n.key,{presence:"required"})}catch(e){return t("record.key",{entryKey:i,reason:e})}try{r=ql.a.attempt(s,n.value,{presence:"required"})}catch(e){return t("record.value",{entryKey:i,reason:e})}a[e]=r}return a}}}});class schema_error_SchemaError extends Error{constructor(e,t){super(e),Oa()(this,"cause",void 0),this.cause=t,Object.setPrototypeOf(this,schema_error_SchemaError.prototype)}}n(61);const to=({children:e,title:t})=>Object(y.jsx)(S.EuiPanel,{paddingSize:"l",color:"subdued",hasShadow:!1},Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h4",null,t)),Object(y.jsx)(S.EuiSpacer,null),e),no=e=>{const t=[{field:"added",name:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.documents.added",{defaultMessage:"Added"})},{field:"removed",name:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.documents.removed",{defaultMessage:"Removed"})},{field:"total",name:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.documents.total",{defaultMessage:"Total"})},{field:"volume",name:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.documents.volume",{defaultMessage:"Volume"}),render:e=>e<1?N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.documents.volume.lessThanOneMBLabel",{defaultMessage:"Less than 1mb"}):N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.documents.volume.aboutLabel",{defaultMessage:"About {volume}",values:{volume:new ByteSizeValue(1024*e*1024).toString()}})}];return Object(y.jsx)(to,{title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.documents.title",{defaultMessage:"Documents"})},Object(y.jsx)(S.EuiBasicTable,{columns:t,items:[e]}))},ao=({cancelationRequestedAt:e,canceledAt:t,completed:n,lastUpdated:a,syncRequestedAt:i,syncStarted:s,triggerMethod:r})=>{const l=[{date:i,title:r===ne.j.ON_DEMAND?N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.syncRequestedManually",{defaultMessage:"Sync requested manually"}):N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.syncRequestedScheduled",{defaultMessage:"Sync requested by schedule"})},{date:s,title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.syncStarted",{defaultMessage:"Sync started"})},{date:a,title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.lastUpdated",{defaultMessage:"Last updated"})},{date:n,title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.completed",{defaultMessage:"Completed"})},{date:e,title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.cancelationRequested",{defaultMessage:"Cancelation requested"})},{date:t,title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.canceled",{defaultMessage:"Canceled"})}].filter((({date:e})=>!!e)).sort((({date:e},{date:t})=>Vr()(e).isAfter(Vr()(t))?1:-1)),o=[{field:"title",name:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.state",{defaultMessage:"State"}),width:"50%"},{field:"date",name:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.time",{defaultMessage:"Time"}),render:e=>Object(y.jsx)(Yl.a,{date:new Date(e)}),width:"50%"}];return Object(y.jsx)(to,{title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.events.title",{defaultMessage:"Events"})},Object(y.jsx)(S.EuiBasicTable,{columns:o,items:l}))},io=({advancedSnippet:e,filteringRules:t})=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(to,{title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.syncRulesTitle",{defaultMessage:"Sync rules"})},Object(y.jsx)(ii,{filteringRules:t,showOrder:!1})),null!=e&&e.value?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(to,{title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.syncRulesAdvancedTitle",{defaultMessage:"Advanced sync rules"})},Object(y.jsx)(S.EuiPanel,{hasShadow:!1},Object(y.jsx)(S.EuiCodeBlock,{transparentBackground:!0,language:"json"},JSON.stringify(e.value,void 0,2))))):Object(y.jsx)(i.a.Fragment,null)),so=({pipeline:e})=>{const t=[{setting:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.pipeline.name",{defaultMessage:"Pipeline name"}),value:e.name},{setting:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.pipeline.extractBinaryContent",{defaultMessage:"Extract binary content"}),value:e.extract_binary_content},{setting:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.pipeline.reduceWhitespace",{defaultMessage:"Reduce whitespace"}),value:e.reduce_whitespace},{setting:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.pipeline.runMlInference",{defaultMessage:"Machine learning inference"}),value:e.run_ml_inference}],n=[{field:"setting",name:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.pipeline.setting",{defaultMessage:"Pipeline setting"})},{field:"value",name:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.documents.value",{defaultMessage:"Value"})}];return Object(y.jsx)(to,{title:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.pipeline.title",{defaultMessage:"Pipeline"})},Object(y.jsx)(S.EuiBasicTable,{columns:n,items:t}))},ro=({syncJob:e})=>Object(y.jsx)(i.a.Fragment,null,!!e.completed_at&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCallOut,{color:"success",iconType:"check",title:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.completedTitle",{defaultMessage:"Sync complete"})},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.syncJobs.flyout.completedDescription",defaultMessage:"Completed at {date}",values:{date:Object(y.jsx)(Yl.a,{date:new Date(e.completed_at)})}}))),e.status===ne.i.ERROR&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCallOut,{color:"danger",iconType:"cross",title:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.failureTitle",{defaultMessage:"Sync failure"})},N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.failureDescription",{defaultMessage:"Sync failure: {error}.",values:{error:e.error}}))),e.status===ne.i.CANCELED&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCallOut,{color:"danger",iconType:"cross",title:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.canceledTitle",{defaultMessage:"Sync canceled"})},!!e.canceled_at&&Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.syncJobs.flyout.canceledDescription",defaultMessage:"Sync canceled at {date}",values:{date:Object(y.jsx)(Yl.a,{date:new Date(e.canceled_at)})}}))),e.status===ne.i.IN_PROGRESS&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCallOut,{color:"warning",iconType:"clock",title:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.inProgressTitle",{defaultMessage:"In progress"})},N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.inProgressDescription",{defaultMessage:"Sync has been running for {duration}.",values:{duration:Gl(e.duration)}}))),!!e.started_at&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCallOut,{color:"primary",iconType:"iInCircle",title:e.trigger_method===ne.j.ON_DEMAND?N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.syncStartedManually",{defaultMessage:"Sync started manually"}):N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.syncStartedScheduled",{defaultMessage:"Sync started by schedule"})},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.syncJobs.flyout.startedAtDescription",defaultMessage:"Started at {date}",values:{date:Object(y.jsx)(Yl.a,{date:new Date(e.started_at)})}})))),lo=({onClose:e,syncJob:t})=>{var n,a,s,r,l,o,c,u,d,p;const g=null!=t&&t.connector.filtering?Array.isArray(null==t?void 0:t.connector.filtering)?null==t||null===(n=t.connector.filtering)||void 0===n?void 0:n[0]:null==t?void 0:t.connector.filtering:null;return t?Object(y.jsx)(S.EuiFlyout,{onClose:e},Object(y.jsx)(S.EuiFlyoutHeader,{hasBorder:!0},Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.title",{defaultMessage:"Event log"})))),Object(y.jsx)(S.EuiFlyoutBody,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(ro,{syncJob:t}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(to,{title:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.sync",{defaultMessage:"Sync"})},Object(y.jsx)(S.EuiBasicTable,{columns:[{field:"id",name:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.flyout.sync.id",{defaultMessage:"ID"})}],items:[{id:t.id}]}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(no,{added:t.indexed_document_count,total:null!==(a=t.total_document_count)&&void 0!==a?a:0,removed:t.deleted_document_count,volume:null!==(s=t.indexed_document_volume)&&void 0!==s?s:0})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(ao,{canceledAt:null!==(r=t.canceled_at)&&void 0!==r?r:"",cancelationRequestedAt:null!==(l=t.cancelation_requested_at)&&void 0!==l?l:"",syncRequestedAt:t.created_at,syncStarted:null!==(o=t.started_at)&&void 0!==o?o:"",completed:null!==(c=t.completed_at)&&void 0!==c?c:"",lastUpdated:null!==(u=t.last_seen)&&void 0!==u?u:"",triggerMethod:t.trigger_method})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(io,{advancedSnippet:null==g?void 0:g.advanced_snippet,filteringRules:null!==(d=null==g?void 0:g.rules)&&void 0!==d?d:[]})),(null===(p=t.connector)||void 0===p?void 0:p.pipeline)&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(so,{pipeline:t.connector.pipeline}))))):Object(y.jsx)(i.a.Fragment,null)},oo=Object(V.a)(["enterprise_search_content","fetch_sync_api_logic"],(async({connectorId:e,from:t=0,size:n=10,type:a})=>{const i=`/internal/enterprise_search/connectors/${e}/sync_jobs`,s={from:t,size:n,type:a};return await d.a.values.http.get(i,{query:s})})),co=Object(r.kea)({actions:{},connect:{actions:[oo,["apiError as fetchSyncJobsError","apiReset as resetFetchSyncJobsIndexApi","apiSuccess as fetchSyncJobsApiSuccess","makeRequest as fetchSyncJobs"]],values:[fn,["connectorId"],oo,["data as syncJobsData","status as syncJobsStatus"]]},path:["enterprise_search","content","sync_jobs_view_logic"],selectors:({selectors:e})=>({syncJobs:[()=>[e.syncJobsData],e=>{var t;return null!==(t=null==e?void 0:e.data.map((e=>{var t;return{...e,duration:e.completed_at?Vr.a.duration(Vr()(e.completed_at).diff(Vr()(e.created_at))):e.started_at?Vr.a.duration(Vr()(new Date).diff(Vr()(e.started_at))):void 0,lastSync:null!==(t=e.completed_at)&&void 0!==t?t:e.created_at}})))&&void 0!==t?t:[]}],syncJobsLoading:[()=>[e.syncJobsStatus],e=>e===$.a.IDLE||e===$.a.LOADING],syncJobsPagination:[()=>[e.syncJobsData],e=>e?e._meta.page:{from:0,has_more_hits_than_total:!1,size:10,total:0}]})}),uo=({type:e})=>{const{connectorId:t}=Object(r.useValues)(fn),{fetchSyncJobs:n}=Object(r.useActions)(co),{syncJobs:s,syncJobsLoading:l,syncJobsPagination:o}=Object(r.useValues)(co),[c,u]=Object(a.useState)(void 0),d=[{field:"lastSync",name:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.lastSync.columnTitle",{defaultMessage:"Last sync"}),render:e=>Object(y.jsx)(Yl.a,{date:new Date(e)}),sortable:!0,truncateText:!0},{field:"duration",name:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.syncDuration.columnTitle",{defaultMessage:"Sync duration"}),render:e=>Gl(e),sortable:!0,truncateText:!0},..."content"===e?[{field:"indexed_document_count",name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.addedDocs.columnTitle",{defaultMessage:"Docs added"}),sortable:!0,truncateText:!0},{field:"deleted_document_count",name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.deletedDocs.columnTitle",{defaultMessage:"Docs deleted"}),sortable:!0,truncateText:!0},{field:"job_type",name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.syncJobType.columnTitle",{defaultMessage:"Content sync type"}),render:e=>{const t=(e=>{switch(e){case ne.h.FULL:return N.i18n.translate("xpack.enterpriseSearch.content.syncJobType.full",{defaultMessage:"Full content"});case ne.h.INCREMENTAL:return N.i18n.translate("xpack.enterpriseSearch.content.syncJobType.incremental",{defaultMessage:"Incremental content"});default:return""}})(e);return 0===t.length?null:Object(y.jsx)(S.EuiBadge,{color:"hollow"},t)},sortable:!0,truncateText:!0}]:[],..."access_control"===e?[{field:"indexed_document_count",name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.identitySync.columnTitle",{defaultMessage:"Identities synced"}),sortable:!0,truncateText:!0}]:[],{field:"status",name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndices.syncStatus.columnTitle",{defaultMessage:"Status"}),render:e=>Object(y.jsx)(S.EuiBadge,{color:$l(e)},function(e){switch(e){case ne.i.COMPLETED:return N.i18n.translate("xpack.enterpriseSearch.content.syncStatus.completed",{defaultMessage:"Sync complete"});case ne.i.ERROR:return N.i18n.translate("xpack.enterpriseSearch.content.syncStatus.error",{defaultMessage:"Sync failure"});case ne.i.IN_PROGRESS:return N.i18n.translate("xpack.enterpriseSearch.content.syncStatus.inProgress",{defaultMessage:"Sync in progress"});case ne.i.CANCELED:return N.i18n.translate("xpack.enterpriseSearch.content.syncStatus.canceling",{defaultMessage:"Sync canceled"});case ne.i.CANCELING:return N.i18n.translate("xpack.enterpriseSearch.content.syncStatus.canceled",{defaultMessage:"Canceling sync"});case ne.i.PENDING:return N.i18n.translate("xpack.enterpriseSearch.content.syncStatus.pending",{defaultMessage:"Sync pending"});case ne.i.SUSPENDED:return N.i18n.translate("xpack.enterpriseSearch.content.syncStatus.suspended",{defaultMessage:"Sync suspended"})}}(e)),truncateText:!0},{actions:[{description:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.actions.viewJob.title",{defaultMessage:"View this sync job"}),icon:"eye",isPrimary:!1,name:N.i18n.translate("xpack.enterpriseSearch.content.index.syncJobs.actions.viewJob.caption",{defaultMessage:"View this sync job"}),onClick:e=>u(e),type:"icon"}]}];return Object(a.useEffect)((()=>{var a,i;t&&n({connectorId:t,from:null!==(a=o.from)&&void 0!==a?a:0,size:null!==(i=o.size)&&void 0!==i?i:10,type:e})}),[t,e]),Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(lo,{onClose:()=>u(void 0),syncJob:c}),Object(y.jsx)(S.EuiBasicTable,{"data-test-subj":`entSearchContent-index-${e}-syncJobs-table`,items:s,columns:d,hasActions:!0,onChange:({page:{index:a,size:i}})=>{t&&n({connectorId:t,from:a*i,size:i,type:e})},pagination:Object(Bl.a)(o),tableLayout:"fixed",loading:l}))},po=()=>{const{hasDocumentLevelSecurityFeature:e}=Object(r.useValues)(fn),{productFeatures:t}=Object(r.useValues)(p.a),[n,s]=Object(a.useState)("content"),l=t.hasDocumentLevelSecurityEnabled&&e;return Object(y.jsx)(i.a.Fragment,null,l&&Object(y.jsx)(S.EuiButtonGroup,{legend:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.legend",{defaultMessage:"Select sync job type to display."}),name:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.name",{defaultMessage:"Sync job type"}),idSelected:n,onChange:e=>{s(e)},options:[{id:"content",label:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.content.label",{defaultMessage:"Content syncs"})},{id:"access_control",label:N.i18n.translate("xpack.enterpriseSearch.content.syncJobs.lastSync.tableSelector.accessControl.label",{defaultMessage:"Access control syncs"})}]}),"content"===n?Object(y.jsx)(uo,{type:"content"}):Object(y.jsx)(uo,{type:"access_control"}))},go=()=>{const{indexData:e}=Object(r.useValues)(zr),{error:t}=Object(r.useValues)(fn),{isCloud:n}=Object(r.useValues)(p.a),{showModal:a}=Object(r.useActions)(ua),{isModalVisible:s}=Object(r.useValues)(ua);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(G.h)(e)&&t&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiCallOut,{iconType:"warning",color:"danger",title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.connectorErrorCallOut.title",{defaultMessage:"Your connector has reported an error"})},Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},t)),Object(y.jsx)(S.EuiSpacer,null)),Object(G.h)(e)&&e.connector.is_native&&!n&&Object(y.jsx)(i.a.Fragment,null,s&&Object(y.jsx)(da,null),Object(y.jsx)(S.EuiCallOut,{iconType:"warning",color:"warning",title:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.nativeCloudCallout.title",{defaultMessage:"Native connectors are no longer supported outside Elastic Cloud"})},Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.searchIndex.nativeCloudCallout.content",defaultMessage:"Convert it to a {link}, to be self-managed on your own infrastructure. Native connectors are available only in your Elastic Cloud deployment.",values:{link:Object(y.jsx)(S.EuiLink,{href:k.a.buildConnector,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.nativeCloudCallout.connectorClient",{defaultMessage:"connector client"}))}}))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiButton,{color:"warning",fill:!0,onClick:()=>a()},N.i18n.translate("xpack.enterpriseSearch.content.indices.searchIndex.convertConnector.buttonLabel",{defaultMessage:"Convert connector"}))),Object(y.jsx)(S.EuiSpacer,null)),Object(G.j)(e)?Object(y.jsx)(il,null):Object(G.h)(e)?Object(y.jsx)(Yr,null):Object(y.jsx)(_r,null),Object(G.g)(e)&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Ql,null)),Object(G.j)(e)&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(al,null),Object(y.jsx)(Zr,null)),Object(G.h)(e)&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(po,null)))},jo=Object(V.a)(["revert_connector_pipeline_api"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/pipelines`;return await d.a.values.http.delete(t)})),xo=Object(V.a)(["fetch_ml_inference_errors_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/ml_inference/errors`;return await d.a.values.http.get(t)})),Mo=Object(r.kea)({connect:{values:[un,["indexName"],xo,["data as inferenceErrorsData","status as fetchIndexInferenceHistoryStatus"]]},path:["enterprise_search","content","pipelines_inference_errors"],selectors:({selectors:e})=>({inferenceErrors:[()=>[e.inferenceErrorsData],e=>{var t;return null!==(t=null==e?void 0:e.errors)&&void 0!==t?t:[]}],isLoading:[()=>[e.fetchIndexInferenceHistoryStatus],e=>e!==$.a.SUCCESS&&e!==$.a.ERROR]})}),ho=()=>{const{indexName:e,isLoading:t,inferenceErrors:n}=Object(r.useValues)(Mo),{makeRequest:s}=Object(r.useActions)(xo);Object(a.useEffect)((()=>{s({indexName:e})}),[e]);const l=[{dataType:"date",field:"timestamp",name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.tableColumn.timestamp",{defaultMessage:"Timestamp"})},{dataType:"string",field:"message",name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.tableColumn.message",{defaultMessage:"Error message"}),textOnly:!0},{dataType:"number",field:"doc_count",name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.tableColumn.docCount",{defaultMessage:"Approx. document count"})}];return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Hr.a,{hasBorder:!0,iconType:"documents",title:Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.title",{defaultMessage:"Inference errors"}))},t?Object(y.jsx)(S.EuiLoadingSpinner,null):Object(y.jsx)(S.EuiBasicTable,{tableLayout:"auto",columns:l,items:n,rowHeader:"message",noItemsMessage:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.pipelineInferenceLogs.emptyMessage",{defaultMessage:"This index has no inference errors"})})))},mo=Object(V.a)(["fetch_ml_inference_pipeline_history_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/ml_inference/history`;return await d.a.values.http.get(t)})),fo=Object(r.kea)({connect:{actions:[mo,["makeRequest as fetchIndexInferenceHistory","apiError as fetchIndexInferenceHistoryError"]],values:[un,["indexName"],mo,["data as inferenceHistoryData","status as fetchIndexInferenceHistoryStatus"]]},path:["enterprise_search","content","pipelines_inference_history"],selectors:({selectors:e})=>({inferenceHistory:[()=>[e.inferenceHistoryData],e=>null==e?void 0:e.history],isLoading:[()=>[e.fetchIndexInferenceHistoryStatus],e=>e!==$.a.SUCCESS&&e!==$.a.ERROR]})}),bo=()=>{const{indexName:e,isLoading:t,inferenceHistory:n}=Object(r.useValues)(fo),{fetchIndexInferenceHistory:s}=Object(r.useActions)(fo);Object(a.useEffect)((()=>{s({indexName:e})}),[e]);const l=[{dataType:"string",field:"pipeline",name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.inferenceHistory.tableColumn.pipeline",{defaultMessage:"Inference pipeline"})},{dataType:"number",field:"doc_count",name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.inferenceHistory.tableColumn.docCount",{defaultMessage:"Approx. document count"})}];return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Hr.a,{hasBorder:!0,iconType:"compute",title:Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.inferenceHistory.title",{defaultMessage:"Historical inference processors"})),subtitle:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.inferenceHistory.subtitle",{defaultMessage:"The following inference processors were found in the _ingest.processors field of documents on this index."})},t?Object(y.jsx)(S.EuiLoadingSpinner,null):Object(y.jsx)(S.EuiBasicTable,{columns:l,items:null!=n?n:[],rowHeader:"pipeline",noItemsMessage:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.inferenceHistory.emptyMessage",{defaultMessage:"This index has no inference history"})})))};var yo=n(100);const Oo=Object(V.a)(["content","create_custom_pipeline_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/pipelines`;return await d.a.values.http.post(t)}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.successToastCustom.title",{defaultMessage:"Custom pipeline created"})}),Io=Object(V.a)(["content","get_default_pipeline_api_logic"],(async()=>await d.a.values.http.get("/internal/enterprise_search/connectors/default_pipeline"))),So=Object(V.a)(["content","update_pipeline_api_logic"],(async({connectorId:e,pipeline:t})=>{const n=`/internal/enterprise_search/connectors/${e}/pipeline`;return await d.a.values.http.put(n,{body:JSON.stringify(t)}),{connectorId:e,pipeline:t}}),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.successToast.title",{defaultMessage:"Pipelines updated"})}),No=Object(V.a)(["content","fetch_custom_pipeline_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/pipelines`;return await d.a.values.http.get(t)})),Eo=Object(V.a)(["attach_ml_inference_pipeline_api_logic"],(async e=>{const t=`/internal/enterprise_search/indices/${e.indexName}/ml_inference/pipeline_processors/attach`,n={pipeline_name:e.pipelineName};return await d.a.values.http.post(t,{body:JSON.stringify(n)})})),Do=Object(V.a)(["create_ml_inference_pipeline_api_logic"],(async e=>{const t=`/internal/enterprise_search/indices/${e.indexName}/ml_inference/pipeline_processors`,n={field_mappings:e.fieldMappings,model_id:e.modelId,pipeline_definition:e.pipelineDefinition,pipeline_name:e.pipelineName};return await d.a.values.http.post(t,{body:JSON.stringify(n)})})),To=Object(V.a)(["delete_ml_inference_pipeline_api_logic"],(async e=>{const t=`/internal/enterprise_search/indices/${e.indexName}/ml_inference/pipeline_processors/${e.pipelineName}`;return await d.a.values.http.delete(t)})),wo=Object(V.a)(["detach_ml_inference_pipeline_api_logic"],(async e=>{const t=`/internal/enterprise_search/indices/${e.indexName}/ml_inference/pipeline_processors/${e.pipelineName}/detach`;return await d.a.values.http.delete(t)})),vo=Object(V.a)(["fetch_ml_inference_pipeline_processors_api_logic"],(async({indexName:e})=>{const t=`/internal/enterprise_search/indices/${e}/ml_inference/pipeline_processors`;return await d.a.values.http.get(t)})),Co=Object(r.kea)({actions:{closeAddMlInferencePipelineModal:!0,closeDeleteModal:!0,closePipelineSettings:!0,openAddMlInferencePipelineModal:!0,openDeleteModal:!0,openPipelineSettings:!0,savePipeline:!0,setPipelineState:e=>({pipeline:e})},connect:{actions:[Oo,["apiError as createCustomPipelineError","apiSuccess as createCustomPipelineSuccess","makeRequest as createCustomPipeline"],So,["apiSuccess","apiError","makeRequest"],cn,["apiSuccess as fetchIndexApiSuccess"],Io,["apiSuccess as fetchDefaultPipelineSuccess","makeRequest as fetchDefaultPipeline"],No,["apiSuccess as fetchCustomPipelineSuccess","makeRequest as fetchCustomPipeline"],vo,["makeRequest as fetchMlInferenceProcessors","apiError as fetchMlInferenceProcessorsApiError"],Eo,["apiSuccess as attachMlInferencePipelineSuccess"],Do,["apiSuccess as createMlInferencePipelineSuccess"],To,["apiError as deleteMlPipelineError","apiSuccess as deleteMlPipelineSuccess","makeRequest as deleteMlPipeline"],wo,["apiError as detachMlPipelineError","apiSuccess as detachMlPipelineSuccess","makeRequest as detachMlPipeline"],jo,["apiSuccess as revertPipelineSuccess"]],values:[No,["data as customPipelineData"],Io,["data as defaultPipelineValuesData"],cn,["fetchIndexApiData as index"],vo,["data as mlInferencePipelineProcessors"]]},events:({actions:e,values:t})=>({afterMount:()=>{var n,a;e.fetchDefaultPipeline(void 0),e.setPipelineState((Object(G.h)(t.index)||Object(G.j)(t.index))&&null!==(n=null===(a=t.index.connector)||void 0===a?void 0:a.pipeline)&&void 0!==n?n:t.defaultPipelineValues)}}),listeners:({actions:e,values:t})=>({apiSuccess:({pipeline:n})=>{(Object(G.h)(t.index)||Object(G.j)(t.index))&&t.index.connector&&e.fetchIndexApiSuccess({...t.index,connector:{...t.index.connector,pipeline:n}})},attachMlInferencePipelineSuccess:()=>{e.fetchMlInferenceProcessors({indexName:t.index.name}),e.fetchCustomPipeline({indexName:t.index.name})},closePipelineSettings:()=>{var n,a;return e.setPipelineState((Object(G.h)(t.index)||Object(G.j)(t.index))&&null!==(n=null===(a=t.index.connector)||void 0===a?void 0:a.pipeline)&&void 0!==n?n:t.defaultPipelineValues)},createCustomPipelineSuccess:n=>{e.fetchCustomPipelineSuccess(n),e.setPipelineState({...t.pipelineState,name:t.indexName}),e.savePipeline(),e.fetchCustomPipeline({indexName:t.index.name})},createMlInferencePipelineSuccess:()=>{e.fetchMlInferenceProcessors({indexName:t.index.name}),e.fetchCustomPipeline({indexName:t.index.name})},deleteMlPipelineSuccess:n=>{n.deleted&&Object(Pt.g)(N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.successToastDeleteMlPipeline.title",{defaultMessage:'Deleted machine learning inference pipeline "{pipelineName}"',values:{pipelineName:n.deleted}})),e.fetchMlInferenceProcessors({indexName:t.index.name}),e.fetchCustomPipeline({indexName:t.index.name})},detachMlPipelineSuccess:n=>{n.updated&&Object(Pt.g)(N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.successToastDetachMlPipeline.title",{defaultMessage:'Detached machine learning inference pipeline from "{pipelineName}"',values:{pipelineName:n.updated}})),e.fetchMlInferenceProcessors({indexName:t.index.name}),e.fetchCustomPipeline({indexName:t.index.name})},fetchIndexApiSuccess:n=>{if(!t.showPipelineSettings){var a;const i=Object(G.h)(n)||Object(G.j)(n)?null===(a=n.connector)||void 0===a?void 0:a.pipeline:t.defaultPipelineValues;e.setPipelineState(null!=i?i:t.defaultPipelineValues)}},openPipelineSettings:()=>{var n;const a=Object(G.j)(t.index)||Object(G.h)(t.index)?null===(n=t.index.connector)||void 0===n?void 0:n.pipeline:t.defaultPipelineValues;e.setPipelineState(null!=a?a:t.defaultPipelineValues)},revertPipelineSuccess:()=>{(Object(G.h)(t.index)||Object(G.j)(t.index))&&t.index.connector&&(e.fetchIndexApiSuccess({...t.index,connector:{...t.index.connector,pipeline:t.defaultPipelineValues}}),e.fetchCustomPipelineSuccess({})),e.fetchCustomPipeline({indexName:t.indexName})},savePipeline:()=>{var n;(Object(G.h)(t.index)||Object(G.j)(t.index))&&t.index.connector&&e.makeRequest({connectorId:null===(n=t.index.connector)||void 0===n?void 0:n.id,pipeline:t.pipelineState})}}),path:["enterprise_search","content","pipelines"],reducers:()=>({isDeleteModalOpen:[!1,{closeDeleteModal:()=>!1,openDeleteModal:()=>!0,revertPipelineSuccess:()=>!1}],pipelineState:[j.f,{setPipelineState:(e,{pipeline:t})=>t}],showAddMlInferencePipelineModal:[!1,{attachMlInferencePipelineSuccess:()=>!1,closeAddMlInferencePipelineModal:()=>!1,createMlInferencePipelineSuccess:()=>!1,openAddMlInferencePipelineModal:()=>!0}],showPipelineSettings:[!1,{apiSuccess:()=>!1,closePipelineSettings:()=>!1,openPipelineSettings:()=>!0}]}),selectors:({selectors:e})=>({canSetPipeline:[()=>[e.index],e=>!Object(G.g)(e)],canUseMlInferencePipeline:[()=>[e.hasIndexIngestionPipeline,e.pipelineState,e.index],(e,t,n)=>e&&(t.run_ml_inference||Object(G.g)(n))],defaultPipelineValues:[()=>[e.defaultPipelineValuesData],e=>null!=e?e:j.f],hasIndexIngestionPipeline:[()=>[e.pipelineName,e.defaultPipelineValues],(e,t)=>e!==t.name],indexName:[()=>[e.index],e=>{var t;return null!==(t=null==e?void 0:e.name)&&void 0!==t?t:""}],pipelineName:[()=>[e.pipelineState,e.customPipelineData,e.indexName],(e,t,n)=>t&&t[n]?n:e.name],showMissingPipelineCallout:[()=>[e.hasIndexIngestionPipeline,e.pipelineName,e.customPipelineData,e.index],(e,t,n,a)=>Boolean(e&&n&&!n[t]&&Object(G.h)(a))]})}),ko=()=>{const{indexName:e,ingestionMethod:t}=Object(r.useValues)(fn),{isCloud:n}=Object(r.useValues)(p.a),{hasPlatinumLicense:a}=Object(r.useValues)(Qn.a),{status:s}=Object(r.useValues)(Oo),{hasIndexIngestionPipeline:l,pipelineName:o}=Object(r.useValues)(Co),{makeRequest:c}=Object(r.useActions)(Oo);return l?null:n||a?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiCallOut,{title:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.copyCustomizeCallout.title",{defaultMessage:"Unlock your custom pipelines"}),iconType:"lock"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.index.pipelines.copyCustomizeCallout.description",defaultMessage:"Your index is using our default ingestion pipeline, {defaultPipeline}. Copy that pipeline into an index-specific configuration to unlock the ability to create custom ingestion and inference pipelines.",values:{defaultPipeline:Object(y.jsx)("strong",null,o)}})),Object(y.jsx)(S.EuiButton,{"data-telemetry-id":`entSearchContent-${t}-pipelines-ingestPipelines-copyAndCustomize`,isLoading:s===$.a.LOADING,iconType:"lockOpen",onClick:()=>c({indexName:e})},N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.copyButtonLabel",{defaultMessage:"Copy and customize"}))),Object(y.jsx)(S.EuiSpacer,null)):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(yo.b,{feature:yo.a.PIPELINES}),Object(y.jsx)(S.EuiSpacer,null))},Ao=({indexName:e,ingestionMethod:t,pipelineSuffix:n,processorsCount:a})=>Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h4",null,`${e}@${n}`))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(A.a,{"data-telemetry-id":`entSearchContent-${t}-pipelines-customPipeline-editPipeline`,to:`/app/management/ingest/ingest_pipelines/?pipeline=${e}@${n}`,shouldNotCreateHref:!0},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestPipelinesCard.customButtonLabel",{defaultMessage:"Edit pipeline"}))))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s",color:"subdued",grow:!1},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestPipelinesCard.customDescription",{defaultMessage:"Custom ingest pipeline for {indexName}",values:{indexName:e}}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)("span",null,Object(y.jsx)(S.EuiBadge,{color:"hollow"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestPipelinesCard.processorsDescription",{defaultMessage:"{processorsCount} Processors",values:{processorsCount:a}})))))));var Lo=n(547),zo=n(269);const _o=({checked:e,description:t,disabled:n,id:a,label:i,onChange:s})=>Object(y.jsx)(S.EuiCheckableCard,{label:Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h4",null,i)),disabled:n,checkableType:"checkbox",onChange:s,checked:e,id:a},Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},Object(y.jsx)("p",null,t))),Ro=({extractionDisabled:e,ingestionMethod:t,setPipeline:n,pipeline:a})=>{const{extract_binary_content:i,reduce_whitespace:s,run_ml_inference:r}=a;return Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(_o,{disabled:e,"data-telemetry-id":`entSearchContent-${t}-pipelines-ingestPipelines-extractBinaryContent`,description:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.settings.extractBinaryDescription",{defaultMessage:"Extract content from images and PDF files"}),label:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.settings.extractBinaryLabel",{defaultMessage:"Content extraction"}),onChange:()=>n({...a,extract_binary_content:!a.extract_binary_content}),checked:i,id:"ingestPipelineExtractBinaryContent"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(_o,{"data-telemetry-id":`entSearchContent-${t}-pipelines-ingestPipelines-reduceWhitespace`,id:"ingestPipelineReduceWhitespace",checked:s,description:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.settings.reduceWhitespaceDescription",{defaultMessage:"Trim extra whitespace from your documents automatically"}),label:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.settings.reduceWhitespaceLabel",{defaultMessage:"Reduce whitespace"}),onChange:()=>n({...a,reduce_whitespace:!a.reduce_whitespace})})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(_o,{"data-telemetry-id":`entSearchContent-${t}-pipelines-ingestPipelines-runMlInference`,id:"ingestPipelineRunMlInference",checked:r,description:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.settings.runMlInferenceDescrition",{defaultMessage:"Enhance your data using compatible trained ML models"}),label:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.settings.mlInferenceLabel",{defaultMessage:"ML Inference Pipelines"}),onChange:()=>n({...a,run_ml_inference:!a.run_ml_inference})})))},Fo=({closeFlyout:e,displayOnly:t,extractionDisabled:n,indexName:a,ingestionMethod:s,isLoading:r,pipeline:l,savePipeline:o,setPipeline:c})=>{const{name:u}=l;return Object(y.jsx)(S.EuiFlyout,{onClose:e,maxWidth:"40rem"},Object(y.jsx)(S.EuiFlyoutHeader,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"none"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,null,Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.modalHeaderTitle",{defaultMessage:"Pipeline settings"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{color:"subdued"},Object(y.jsx)("strong",null,u))))),Object(y.jsx)(S.EuiFlyoutBody,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"none"},Object(y.jsx)(S.EuiFlexItem,null,n?Object(y.jsx)(S.EuiCallOut,{title:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.settings.extractBinaryDisabledWarningTitle",{defaultMessage:"Content extraction cannot be configured"}),color:"warning",iconType:"warning"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.settings.extractBinaryDisabledWarningContent",{defaultMessage:"Because local content extraction is enabled for this connector, pipeline content extraction settings cannot be used."})),Object(y.jsx)(S.EuiLink,{href:`${k.a.connectorsContentExtraction}#connectors-content-extraction-local`,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.modalIngestLinkLocalExtractionLabel",{defaultMessage:"Learn more about local content extraction."}))):Object(y.jsx)(i.a.Fragment,null)),Object(y.jsx)(S.EuiSpacer,{size:"xl"}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"none"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},t?Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.modalBodyAPIText",defaultMessage:"{apiIndex} Changes made to the settings below are for reference only. These settings will not be persisted to your index or pipeline.",values:{apiIndex:Object(y.jsx)("strong",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.apiIndex",{defaultMessage:"This is an API-based index."}))}})),Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.modalBodyAPITextCont",{defaultMessage:"In order to use this pipeline on your API-based indices you'll need to explicitly reference it in your API requests."}))):N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.modalBodyConnectorText",{defaultMessage:"This pipeline runs automatically on all Crawler and Connector indices created through Search."}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{href:k.a.ingestPipelines,external:!0},N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.modalIngestLinkLabel",{defaultMessage:"Learn more about Search ingest pipelines"}))))),Object(y.jsx)(S.EuiSpacer,{size:"xl"}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiForm,{"aria-labelledby":"ingestPipelineHeader"},Object(y.jsx)(S.EuiFormRow,{fullWidth:!0},Object(y.jsx)(S.EuiText,{size:"m",id:"ingestPipelineHeader"},Object(y.jsx)("strong",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.settings.formHeader",{defaultMessage:"Optimize your content for search"})))),Object(y.jsx)(S.EuiFormRow,{fullWidth:!0},Object(y.jsx)(Ro,{extractionDisabled:n,ingestionMethod:s,pipeline:l,setPipeline:c}))),Object(y.jsx)(S.EuiSpacer,null)),t&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,{size:"xl"}),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiText,{size:"m",id:"ingestPipelineHeader",grow:!1},Object(y.jsx)("strong",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.curlHeader",{defaultMessage:"Sample cURL request to ingest a document"}))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(zo.a,{document:{body:"body",title:"Title"},indexName:a,pipeline:l}))))),Object(y.jsx)(S.EuiFlyoutFooter,null,t?Object(y.jsx)(S.EuiButton,{fill:!0,onClick:e},N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.closeButtonLabel",{defaultMessage:"Close"})):Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{onClick:e},N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.cancelButtonLabel",{defaultMessage:"Cancel"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{fill:!0,onClick:o,isLoading:r},N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.ingestFlyout.saveButtonLabel",{defaultMessage:"Save"}))))))},Uo=({extractionDisabled:e})=>{var t,n;const{indexName:i,ingestionMethod:s}=Object(r.useValues)(fn),{canSetPipeline:l,index:o,pipelineName:c,pipelineState:u,showPipelineSettings:d}=Object(r.useValues)(Co),{closePipelineSettings:p,openPipelineSettings:g,setPipelineState:j,savePipeline:x}=Object(r.useActions)(Co),{makeRequest:M}=Object(r.useActions)(No),{data:h}=Object(r.useValues)(No),m=h?h[`${i}@custom`]:void 0;return Object(a.useEffect)((()=>{M({indexName:i})}),[i]),Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},d&&Object(y.jsx)(Fo,{closeFlyout:p,displayOnly:!l,extractionDisabled:e,indexName:i,ingestionMethod:s,isLoading:!1,pipeline:{...u,name:c},savePipeline:x,setPipeline:j}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:"subdued"},Object(y.jsx)(Lo.a,{index:o,openPipelineSettings:g,pipelineName:c,ingestionMethod:s,indexName:i,pipelineState:u}))),m&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiPanel,{color:"primary"},Object(y.jsx)(Ao,{indexName:i,ingestionMethod:s,pipelineSuffix:"custom",processorsCount:null!==(t=null===(n=m.processors)||void 0===n?void 0:n.length)&&void 0!==t?t:0}))))},Po=Object(y.css)("color:",xr.euiThemeVars.euiColorDanger,";",""),Qo=()=>{const[e,t]=Object(a.useState)(!1),{openDeleteModal:n}=Object(r.useActions)(Co);return Object(y.jsx)(S.EuiPopover,{button:Object(y.jsx)(S.EuiButtonEmpty,{size:"s",iconType:"arrowDown",iconSide:"right",onClick:()=>t(!e)},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.manageButton",{defaultMessage:"Manage"})),isOpen:e,closePopover:()=>t(!1),panelPaddingSize:"none",anchorPosition:"downRight"},Object(y.jsx)(S.EuiContextMenuPanel,{size:"s",items:[Object(y.jsx)(S.EuiContextMenuItem,{onClick:()=>{n(),t(!1)},icon:"trash",css:Po},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.revertPipelineAction",{defaultMessage:"Revert to default configuration"}))]}))},Yo="lang_ident",Bo={NER:"ner",QUESTION_ANSWERING:"question_answering",ZERO_SHOT_CLASSIFICATION:"zero_shot_classification",TEXT_CLASSIFICATION:"text_classification",TEXT_EMBEDDING:"text_embedding",FILL_MASK:"fill_mask",TEXT_EXPANSION:"text_expansion"},Go=(N.i18n.translate("xpack.ml.trainedModels.modelsList.builtInModelLabel",{defaultMessage:"built-in"}),"prepackaged");let $o;N.i18n.translate("xpack.ml.trainedModels.modelsList.elserDescription",{defaultMessage:"Elastic Learned Sparse EncodeR v1 (Tech Preview)"}),function(e){e.NotDeployed="",e.Starting="starting",e.Stopping="stopping",e.Started="started",e.Failed="failed"}($o||($o={}));const Vo=Bo.TEXT_EXPANSION,qo="ml.inference.",Wo=".elser_model_1",Zo=(e,t,n,a,i)=>{var s,r;return{field_map:{[e]:(null===(s=a.input)||void 0===s||null===(r=s.field_names)||void 0===r?void 0:r.length)>0?a.input.field_names[0]:"MODEL_INPUT_FIELD"},inference_config:n,model_id:a.model_id,on_failure:[{append:{field:"_source._ingest.inference_errors",allow_duplicates:!1,value:[{message:`Processor 'inference' in pipeline '${i}' failed for field '${e}' with message '{{ _ingest.on_failure_message }}'`,pipeline:i,timestamp:"{{{ _ingest.timestamp }}}"}]}}],target_field:t}},Ho=e=>{var t;if(!e)return[];const n=null===(t=e.tags)||void 0===t?void 0:t.includes(Go);return[e.model_type,...Object.keys(e.inference_config||{}),...n?[Go]:[]].filter((e=>void 0!==e))},Jo=(e,t)=>{var n;const a=null==t||null===(n=t.processors)||void 0===n?void 0:n.filter((e=>e.inference)).map((e=>e.inference));if(!a||0===a.length)return null;const i=a.map((e=>{var t;const n=Object.keys(null!==(t=e.field_map)&&void 0!==t?t:{});return{sourceField:n.length>=1?n[0]:null,targetField:e.target_field}})).filter((e=>e.sourceField));return 0===i.length?null:{model_id:a[0].model_id,pipeline_name:e,pipeline_definition:{},field_mappings:i}},Xo=(e,t)=>{var n;if((null==e?void 0:e.model_type)===Yo||null!=t&&t.includes(Yo))return $o.Started;switch(null==e||null===(n=e.deployment_stats)||void 0===n?void 0:n.state){case"started":return $o.Started;case"starting":return $o.Starting;case"stopping":return $o.Stopping;case"failed":return $o.Failed;default:return $o.NotDeployed}},Ko=Object.values(Bo),ec=["body","body_content","title"],tc={fill_mask:N.i18n.translate("xpack.enterpriseSearch.content.ml_inference.fill_mask",{defaultMessage:"Fill Mask"}),lang_ident:N.i18n.translate("xpack.enterpriseSearch.content.ml_inference.lang_ident",{defaultMessage:"Language Identification"}),ner:N.i18n.translate("xpack.enterpriseSearch.content.ml_inference.ner",{defaultMessage:"Named Entity Recognition"}),question_answering:N.i18n.translate("xpack.enterpriseSearch.content.ml_inference.question_answering",{defaultMessage:"Named Entity Recognition"}),text_classification:N.i18n.translate("xpack.enterpriseSearch.content.ml_inference.text_classification",{defaultMessage:"Text Classification"}),text_embedding:N.i18n.translate("xpack.enterpriseSearch.content.ml_inference.text_embedding",{defaultMessage:"Dense Vector Text Embedding"}),text_expansion:N.i18n.translate("xpack.enterpriseSearch.content.ml_inference.text_expansion",{defaultMessage:"ELSER Text Expansion"}),zero_shot_classification:N.i18n.translate("xpack.enterpriseSearch.content.ml_inference.zero_shot_classification",{defaultMessage:"Zero-Shot Text Classification"})},nc=e=>Object.keys(e.inference_config||{}).some((e=>Ko.includes(e)))||e.model_type===Yo,ac=(e,t)=>{const n=ec.includes(e),a=ec.includes(t);return n&&a?ec.indexOf(e)>ec.indexOf(t)?1:-1:n?-1:a?1:e.localeCompare(t)},ic=e=>{var t;for(const t of e)if(Ko.includes(t))return t;return null!=e&&e.includes(Yo)?Yo:null!==(t=null==e?void 0:e[0])&&void 0!==t?t:""},sc=e=>tc[e],rc=e=>{var t;return Boolean(null===(t=e.inference_config)||void 0===t?void 0:t.text_expansion)},lc=(e,t)=>rc(e)?-1:rc(t)?1:e.model_id.localeCompare(t.model_id),oc=Object(V.a)(["ml_models_stats_api_logic"],(async()=>await d.a.values.http.get("/internal/ml/trained_models/_stats",{version:"1"})),{clearFlashMessagesOnMakeRequest:!1,showErrorFlash:!1}),cc=Object(V.a)(["ml_models_api_logic"],(async(e=1e3)=>await d.a.values.http.get("/internal/ml/trained_models",{query:{size:e,with_pipelines:!0},version:"1"})),{clearFlashMessagesOnMakeRequest:!1,showErrorFlash:!1}),uc=Object(r.kea)({actions:{apiError:e=>e,apiReset:!0,apiSuccess:e=>e,makeRequest:()=>{}},connect:{actions:[cc,["apiError as getModelsApiError","apiReset as getModelsApiReset","apiSuccess as getModelsApiSuccess","makeRequest as makeGetModelsRequest"],oc,["apiError as getModelsStatsApiError","apiReset as getModelsStatsApiReset","apiSuccess as getModelsStatsApiSuccess","makeRequest as makeGetModelsStatsRequest"]],values:[cc,["apiStatus as modelsApiStatus","error as modelsApiError","status as modelsStatus","data as modelsData"],oc,["apiStatus as modelStatsApiStatus","error as modelsStatsApiError","status as modelStatsStatus","data as modelStatsData"]]},listeners:({actions:e,values:t})=>({getModelsApiError:t=>{e.apiError(t)},getModelsApiSuccess:()=>{t.data&&e.apiSuccess(t.data)},getModelsStatsApiError:n=>{t.modelsApiError||e.apiError(n)},getModelsStatsApiSuccess:()=>{t.data&&e.apiSuccess(t.data)},apiReset:()=>{e.getModelsApiReset(),e.getModelsStatsApiReset()},makeRequest:()=>{e.makeGetModelsRequest(void 0),e.makeGetModelsStatsRequest(void 0)}}),path:["enterprise_search","api","ml_trained_models_api_logic"],selectors:({selectors:e})=>({data:[()=>[e.modelsData,e.modelStatsData],(e,t)=>{if(!e)return null;if(!t)return e;const n=t.trained_model_stats.reduce(((e,t)=>(t.model_id&&(e[t.model_id]=t),e)),{});return e.map((e=>{const t=n[e.model_id];return{...e,...null!=t?t:{}}}))}],error:[()=>[e.modelsApiStatus,e.modelStatsApiStatus],(e,t)=>e.error?e.error:t.error?t.error:null],status:[()=>[e.modelsApiStatus,e.modelStatsApiStatus],(e,t)=>e.status===t.status?e.status:e.status===$.a.ERROR||t.status===$.a.ERROR?$.a.ERROR:e.status{const e=`/internal/enterprise_search/ml/models/${Wo}/deploy`;return await d.a.values.http.post(e,{body:void 0})}),{showErrorFlash:!1}),pc=Object(V.a)(["fetch_ml_inference_pipelines_api_logic"],(async()=>await d.a.values.http.get("/internal/enterprise_search/pipelines/ml_inference"))),gc=Object(V.a)(["fetch_pipeline_api_logic"],(async({pipelineName:e})=>{const t=`/internal/enterprise_search/pipelines/${e}`;return await d.a.values.http.get(t)}),{showErrorFlash:!1});let jc;!function(e){e[e.Configuration=0]="Configuration",e[e.Fields=1]="Fields",e[e.Mappings=2]="Mappings",e[e.Test=3]="Test",e[e.Review=4]="Review"}(jc||(jc={}));const xc=/^[\w\-]+$/,Mc="/app/ml/trained_models",hc=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.invalidPipelineName",{defaultMessage:"Name must only contain letters, numbers, underscores, and hyphens."}),mc=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.emptyValueError",{defaultMessage:"Field is required."}),fc=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.pipelineNameExistsError",{defaultMessage:"Name already used by another pipeline."}),bc=e=>{const t={};return!0===e.existingPipeline?(0===e.pipelineName.length&&(t.pipelineName=mc),t):(0===e.pipelineName.trim().length?t.pipelineName=mc:(n=e.pipelineName).length>0&&xc.test(n)||(t.pipelineName=hc),0===e.modelID.trim().length&&(t.modelID=mc),t);var n},yc=e=>{const t={};return void 0!==e&&(t.pipelineName=fc),t},Oc=e=>{var t;const n={};return 0===(null!==(t=e.fieldMappings)&&void 0!==t?t:[]).length&&(n.fieldMappings=mc),n},Ic=e=>N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.existingPipeline.missingSourceFieldsDescription",{defaultMessage:"Fields missing in this index: {commaSeparatedMissingSourceFields}",values:{commaSeparatedMissingSourceFields:e}}),Sc=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.model.placeholder",{defaultMessage:"Select a model"}),Nc=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.model.redactedValue",{defaultMessage:"This model isn't available in the Kibana space"}),Ec={modelID:"",pipelineName:"",targetField:""},Dc=[$.a.SUCCESS,$.a.ERROR],Tc=["body","title","id","type","url"],wc=(e,t,n)=>{return(a=`${t||e}${n?"_expanded":""}`).startsWith(qo)?a:`${qo}${a}`;var a},vc=Object(r.kea)({actions:{addSelectedFieldsToMapping:e=>({isTextExpansionModelSelected:e}),attachPipeline:!0,clearFormErrors:!0,createPipeline:!0,onAddInferencePipelineStepChange:e=>({step:e}),removeFieldFromMapping:e=>({fieldName:e}),selectExistingPipeline:e=>({pipelineName:e}),selectFields:e=>({fieldNames:e}),setAddInferencePipelineStep:e=>({step:e}),setFormErrors:e=>({inputErrors:e}),setIndexName:e=>({indexName:e}),setInferencePipelineConfiguration:e=>({configuration:e}),setTargetField:e=>({targetFieldName:e})},connect:{actions:[pc,["makeRequest as makeMlInferencePipelinesRequest","apiSuccess as mlInferencePipelinesSuccess"],dr,["makeRequest as makeMappingRequest","apiError as mappingsApiError"],uc,["makeRequest as makeMLModelsRequest","apiError as mlModelsApiError"],Do,["apiError as createApiError","apiSuccess as createApiSuccess","makeRequest as makeCreatePipelineRequest"],Eo,["apiError as attachApiError","apiSuccess as attachApiSuccess","makeRequest as makeAttachPipelineRequest"],Co,["closeAddMlInferencePipelineModal as closeAddMlInferencePipelineModal"],dc,["apiSuccess as startTextExpansionModelSuccess"],gc,["apiReset as clearFetchedPipeline","makeRequest as fetchPipelineByName","apiSuccess as fetchPipelineSuccess"]],values:[cn,["indexData as index"],pc,["data as mlInferencePipelinesData"],dr,["data as mappingData","status as mappingStatus"],uc,["data as mlModelsData","status as mlModelsStatus"],vo,["data as mlInferencePipelineProcessors"],gc,["data as existingPipeline"]]},events:{},listeners:({values:e,actions:t})=>({attachPipeline:()=>{const{addInferencePipelineModal:{configuration:{pipelineName:n},indexName:a}}=e;t.makeAttachPipelineRequest({indexName:a,pipelineName:n})},createPipeline:()=>{var n;const{addInferencePipelineModal:{configuration:a,indexName:i},mlInferencePipeline:s}=e;t.makeCreatePipelineRequest({indexName:i,fieldMappings:null!==(n=a.fieldMappings)&&void 0!==n?n:[],modelId:a.modelID,pipelineDefinition:s,pipelineName:a.pipelineName})},selectExistingPipeline:({pipelineName:n})=>{var a;const i=null===(a=e.mlInferencePipelinesData)||void 0===a?void 0:a[n];if(!i)return;const s=Jo(n,i);null!==s&&t.setInferencePipelineConfiguration({existingPipeline:!0,modelID:s.model_id,pipelineName:n,fieldMappings:s.field_mappings,targetField:""})},setIndexName:({indexName:e})=>{t.makeMlInferencePipelinesRequest(void 0),t.makeMLModelsRequest(void 0),t.makeMappingRequest({indexName:e})},mlInferencePipelinesSuccess:n=>{var a;0===(null!==(a=null==n?void 0:n.length)&&void 0!==a?a:0)&&void 0===e.addInferencePipelineModal.configuration.existingPipeline&&t.setInferencePipelineConfiguration({...e.addInferencePipelineModal.configuration,existingPipeline:!1})},startTextExpansionModelSuccess:()=>{t.makeMLModelsRequest(void 0)},onAddInferencePipelineStepChange:({step:n})=>{const{addInferencePipelineModal:{configuration:{pipelineName:a,existingPipeline:i},step:s}}=e;var r;s!==jc.Configuration||i||t.fetchPipelineByName({pipelineName:`ml-inference-${r=a,r.trim().replace(/\s+/g,"_").toLowerCase()}`}),t.setAddInferencePipelineStep(n)},fetchPipelineSuccess:()=>{t.setAddInferencePipelineStep(jc.Configuration)}}),path:["enterprise_search","content","pipelines_add_ml_inference_pipeline"],reducers:{addInferencePipelineModal:[{configuration:{...Ec},indexName:"",step:jc.Configuration},{addSelectedFieldsToMapping:(e,{isTextExpansionModelSelected:t})=>{const{configuration:{fieldMappings:n,targetField:a},selectedSourceFields:i}=e,s=[...n||[],...(i||[]).map((e=>({sourceField:e,targetField:wc(e,a,t)})))];return{...e,configuration:{...e.configuration,fieldMappings:s,targetField:""},selectedSourceFields:[]}},closeAddMlInferencePipelineModal:()=>({configuration:{...Ec},indexName:"",step:jc.Configuration}),createApiSuccess:()=>({configuration:{...Ec},indexName:"",step:jc.Configuration}),removeFieldFromMapping:(e,{fieldName:t})=>{const{configuration:{fieldMappings:n}}=e;return n?{...e,configuration:{...e.configuration,fieldMappings:null==n?void 0:n.filter((({sourceField:e})=>e!==t))}}:e},selectFields:(e,{fieldNames:t})=>({...e,configuration:{...e.configuration},selectedSourceFields:t}),setAddInferencePipelineStep:(e,{step:t})=>({...e,step:t}),setIndexName:(e,{indexName:t})=>({...e,indexName:t}),setInferencePipelineConfiguration:(e,{configuration:t})=>({...e,configuration:t}),setTargetField:(e,{targetFieldName:t})=>({...e,configuration:{...e.configuration,targetField:t}})}],createErrors:[[],{attachApiError:(e,t)=>Object(Qs.c)(t),createApiError:(e,t)=>Object(Qs.c)(t),makeAttachPipelineRequest:()=>[],makeCreatePipelineRequest:()=>[]}]},selectors:({selectors:e})=>({formErrors:[()=>[e.addInferencePipelineModal,e.existingPipeline],(e,t)=>({...bc(e.configuration),...Oc(e.configuration),...yc(t)})],isConfigureStepValid:[()=>[e.addInferencePipelineModal],e=>{const t=bc(e.configuration);return 0===Object.keys(t).length}],isLoading:[()=>[e.mlModelsStatus,e.mappingStatus],(e,t)=>!Dc.includes(e)||!Dc.includes(t)],isPipelineDataValid:[()=>[e.formErrors],e=>0===Object.keys(e).length],isTextExpansionModelSelected:[()=>[e.selectedMLModel],e=>{var t;return!(null==e||null===(t=e.inference_config)||void 0===t||!t.text_expansion)}],mlInferencePipeline:[()=>[e.isPipelineDataValid,e.addInferencePipelineModal,e.mlModelsData,e.mlInferencePipelinesData],(e,{configuration:t},n,a)=>{var i;if(t.existingPipeline){if(0===t.pipelineName.length)return;const e=null==a?void 0:a[t.pipelineName];if(!e)return;return e}if(!e)return;const s=null==n?void 0:n.find((e=>e.model_id===t.modelID));return s?(({description:e,fieldMappings:t,inferenceConfig:n,model:a,pipelineName:i})=>{const s={description:null!=e?e:"",processors:[],version:1};return s.processors=[...t.flatMap((({sourceField:e,targetField:t})=>[{remove:{field:t,ignore_missing:!0}},{inference:Zo(e,t,n,a,i)}])),{append:{field:"_source._ingest.processors",value:[{model_version:a.version,pipeline:i,processed_timestamp:"{{{ _ingest.timestamp }}}",types:Ho(a)}]}}],s})({model:s,pipelineName:t.pipelineName,fieldMappings:null!==(i=t.fieldMappings)&&void 0!==i?i:[],inferenceConfig:t.inferenceConfig}):void 0}],sourceFields:[()=>[e.mappingStatus,e.mappingData,e.index],(e,t,n)=>{var a;if(e===$.a.SUCCESS)return void 0===(null==t||null===(a=t.mappings)||void 0===a?void 0:a.properties)?Object(G.h)(n)?Tc:[]:Object.entries(t.mappings.properties).reduce(((e,[t,n])=>("text"!==n.type&&"keyword"!==n.type||e.push(t),e)),[]).sort(ac)}],supportedMLModels:[()=>[e.mlModelsData],e=>{var t;return(null!==(t=null==e?void 0:e.filter(nc))&&void 0!==t?t:[]).sort(lc)}],existingInferencePipelines:[()=>[e.mlInferencePipelinesData,e.sourceFields,e.supportedMLModels,e.mlInferencePipelineProcessors],(e,t,n,a)=>{var i;if(!e)return[];const s=null!==(i=null==a?void 0:a.map((e=>e.pipelineName)))&&void 0!==i?i:[];return Object.entries(e).map((([e,a])=>{var i,r;if(!a||s.includes(e))return;const l=Jo(e,a);if(!l)return;const{model_id:o,field_mappings:c}=l,u=null!==(i=null==c?void 0:c.map((e=>e.sourceField)))&&void 0!==i?i:[],d=null!==(r=u.filter((e=>!(null!=t&&t.includes(e)))))&&void 0!==r?r:[],p=n.find((e=>e.model_id===o)),g=p?ic(Ho(p)):"",j=d.length>0?Ic(d.join(", ")):void 0;return{disabled:void 0!==j,disabledReason:j,modelId:o,modelType:g,pipelineName:e,sourceFields:u,indexFields:null!=t?t:[]}})).filter((e=>void 0!==e))}],selectedMLModel:[()=>[e.supportedMLModels,e.addInferencePipelineModal],(e,t)=>{var n;return null!==(n=e.find((e=>e.model_id===t.configuration.modelID)))&&void 0!==n?n:null}]})}),Cc=()=>{var e,t,n;const{ingestionMethod:a}=Object(r.useValues)(fn),{addInferencePipelineModal:{configuration:s}}=Object(r.useValues)(vc),{setInferencePipelineConfiguration:l}=Object(r.useActions)(vc),o=null!==(e=null==s||null===(t=s.inferenceConfig)||void 0===t||null===(n=t.zero_shot_classification)||void 0===n?void 0:n.labels)&&void 0!==e?e:[],c=o.map((e=>({label:e})));return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.inference.zeroShot.labels.label",{defaultMessage:"Class labels"}),fullWidth:!0},Object(y.jsx)(S.EuiComboBox,{fullWidth:!0,"data-telemetry-id":`entSearchContent-${a}-pipelines-configureInferencePipeline-zeroShot-labels`,placeholder:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.inference.zeroShot.labels.placeholder",{defaultMessage:"Create labels"}),options:c,selectedOptions:c,onChange:e=>{var t,n;const a=0===e.length?void 0:{zero_shot_classification:{...null!==(t=null==s||null===(n=s.inferenceConfig)||void 0===n?void 0:n.zero_shot_classification)&&void 0!==t?t:{},labels:e.map((({label:e})=>e))}};l({...s,inferenceConfig:a})},onCreateOption:(e,t=[])=>{var n,a;const i=e.trim();i&&(t.find((e=>e.label===i))||l({...s,inferenceConfig:{zero_shot_classification:{...null!==(n=null==s||null===(a=s.inferenceConfig)||void 0===a?void 0:a.zero_shot_classification)&&void 0!==n?n:{},labels:[...o,i]}}}))},noSuggestions:!0})))},kc=()=>{const{addInferencePipelineModal:{configuration:e},selectedMLModel:t}=Object(r.useValues)(vc);return!t||e.existingPipeline?null:ic(Ho(t))===Bo.ZERO_SHOT_CLASSIFICATION?Object(y.jsx)(Ac,null,Object(y.jsx)(Cc,null)):null},Ac=({children:e})=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,null,Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.inference.title",{defaultMessage:"Inference Configuration"}))),e),Lc=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.targetField.placeholder.noFields",{defaultMessage:"Select a source field"}),zc=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.targetField.placeholder.multipleFields",{defaultMessage:"Automatically created for multi-select"}),_c=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.targetField.placeholder.textExpansionModel",{defaultMessage:"Automatically created"}),Rc=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.targetField.helpText",{defaultMessage:"Optional. Field name where inference results should be saved."}),Fc=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.targetField.helpTextTextExpansionModel",{defaultMessage:"ELSER target fields are created automatically."}),Uc=e=>e?_c:Lc,Pc=e=>e?Fc:Rc,Qc=()=>{var e,t;const{addInferencePipelineModal:{configuration:n,selectedSourceFields:s=[]},isTextExpansionModelSelected:l,sourceFields:o}=Object(r.useValues)(vc),{ingestionMethod:c}=Object(r.useValues)(fn),{addSelectedFieldsToMapping:u,selectFields:d,setTargetField:p}=Object(r.useActions)(vc),[g,j]=Object(a.useState)(Uc(l)),x=null!==(e=null===(t=n.fieldMappings)||void 0===t?void 0:t.map((({sourceField:e})=>e)))&&void 0!==e?e:[],M=(o||[]).filter((e=>![...s,...x].includes(e))).map((e=>({label:e}))),h=s.map((e=>({label:e}))),m=n.targetField,f=1===s.length;return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:4},Object(y.jsx)(S.EuiFormRow,{fullWidth:!0,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.sourceFieldLabel",{defaultMessage:"Source text field"}),helpText:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.sourceField.helpText",{defaultMessage:"Select an existing field or type in a field name."})},Object(y.jsx)(S.EuiComboBox,{fullWidth:!0,"data-telemetry-id":`entSearchContent-${c}-pipelines-configureFields-selectSchemaField`,placeholder:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.selectedFields",{defaultMessage:"Selected fields"}),options:M,selectedOptions:h,onChange:e=>{d(e.map((({label:e})=>e))),p(l||1!==e.length?"":e[0].label),j(l?_c:0===e.length?Lc:1===e.length?e[0].label:zc)},onCreateOption:e=>{const t=e.trim();t&&(h.push({label:t}),d([...s,e]))}}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1,style:{paddingTop:"32px"}},Object(y.jsx)(S.EuiIcon,{type:"sortRight"})),Object(y.jsx)(S.EuiFlexItem,{grow:4},Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.targetFieldLabel",{defaultMessage:"Target field"}),helpText:Pc(l),fullWidth:!0},Object(y.jsx)(S.EuiFieldText,{prepend:"ml.inference.",onChange:e=>p(e.target.value),"data-telemetry-id":`entSearchContent-${c}-pipelines-configureFields-targetField`,disabled:l||!f,value:m,placeholder:g,fullWidth:!0}))),Object(y.jsx)(S.EuiFlexItem,{style:{paddingTop:"20px"}},Object(y.jsx)(S.EuiButton,{color:"primary","data-telemetry-id":`entSearchContent-${c}-pipelines-configureFields-addSelectedFieldsToMapping`,disabled:0===h.length,iconType:"plusInCircle",onClick:()=>{u(l),p(""),j(Uc(l))},style:{width:"60px"}},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.addMapping",{defaultMessage:"Add"})))))},Yc=({isReadOnly:e})=>{var t;const{removeFieldFromMapping:n}=Object(r.useActions)(vc),{addInferencePipelineModal:{configuration:a}}=Object(r.useValues)(vc),s=[{"data-test-subj":"sourceFieldCell",field:"sourceField",name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.fieldMappings.sourceFieldHeader",{defaultMessage:"Source text field"})},{align:"left",name:"",render:()=>Object(y.jsx)(S.EuiIcon,{type:"sortRight"}),width:"60px"},{align:"right",field:"targetField",name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.fieldMappings.targetFieldHeader",{defaultMessage:"Target field"})},...e?[]:[{actions:[{color:"danger",description:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.actions.deleteMapping",{defaultMessage:"Delete this mapping"}),icon:"trash",isPrimary:!0,name:e=>N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.actions.deleteMapping.caption",{defaultMessage:"Delete mapping '{sourceField}' - '{targetField}'",values:{sourceField:e.sourceField,targetField:e.targetField}}),onClick:e=>n(e.sourceField),type:"icon"}],name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.actions",{defaultMessage:"Actions"}),width:"10%"}]];return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiBasicTable,{columns:s,items:null!==(t=a.fieldMappings)&&void 0!==t?t:[],rowHeader:"sourceField",tableCaption:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.fieldMappings.tableCaption",{defaultMessage:"Field mappings"}),noItemsMessage:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.fieldMappings.noFieldMappings",{defaultMessage:"No field mappings selected"})}))},Bc=()=>{const{addInferencePipelineModal:{configuration:e}}=Object(r.useValues)(vc),t=!1!==e.existingPipeline;return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:3},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,t?Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.titleReview",defaultMessage:"Review field mappings"}):Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.title",defaultMessage:"Select field mappings"})))),Object(y.jsx)(S.EuiFlexItem,{grow:7},Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},Object(y.jsx)("p",null,t?Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.descriptionReview",defaultMessage:"Examine the field mappings of your chosen pipeline to ensure that the source and target fields align with your specific use case. {notEditable}",values:{notEditable:Object(y.jsx)("strong",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.descriptionReviewNotEditable",defaultMessage:"The fields from existing pipelines are not editable."}))}}):Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.fields.description",defaultMessage:"Choose fields to be enhanced from your existing documents or manually enter in fields you anticipate using."}))))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiForm,{component:"form"},t||Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(Qc,null),Object(y.jsx)(S.EuiSpacer,{size:"s"})),Object(y.jsx)(Yc,{isReadOnly:t}),Object(y.jsx)(kc,null)))},Gc=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.started",{defaultMessage:"Started"}),$c=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.started.tooltip",{defaultMessage:"This trained model is running and fully available"}),Vc=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.starting",{defaultMessage:"Starting"}),qc=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.starting.tooltip",{defaultMessage:"This trained model is in the process of starting up and will be available shortly"}),Wc=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.stopping",{defaultMessage:"Stopping"}),Zc=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.stopping.tooltip",{defaultMessage:"This trained model is in the process of shutting down and is currently unavailable"}),Hc=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.deploymentFailed",{defaultMessage:"Deployment failed"}),Jc=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.notDeployed",{defaultMessage:"Not started"}),Xc=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.notDeployed.tooltip",{defaultMessage:"This trained model is not currently started. Visit the trained models page to make changes"}),Kc=({modelState:e,modelStateReason:t})=>{let n;switch(e){case $o.Started:n={healthColor:"success",healthText:Gc,tooltipText:$c};break;case $o.Stopping:n={healthColor:"warning",healthText:Wc,tooltipText:Zc};break;case $o.Starting:n={healthColor:"warning",healthText:Vc,tooltipText:qc};break;case $o.Failed:n={healthColor:"danger",healthText:Hc,tooltipText:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.inferencePipelineCard.modelState.deploymentFailed.tooltip",defaultMessage:"The trained model failed to deploy. {reason}",values:{reason:t?N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.deploymentFailed.tooltip.reason",{defaultMessage:"Reason: {modelStateReason}",values:{modelStateReason:t}}):""}})};break;case $o.NotDeployed:n={healthColor:"danger",healthText:Jc,tooltipText:Xc}}return Object(y.jsx)(S.EuiToolTip,{content:n.tooltipText},Object(y.jsx)(S.EuiHealth,{color:n.healthColor},n.healthText))},eu=({type:e})=>e===Vo?Object(y.jsx)(S.EuiBadge,{color:"success"},"ELSER"):Object(y.jsx)(S.EuiBadge,{color:"hollow"},e),tu=({model:e})=>{const t=ic(Ho(e)),n=sc(t);return Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h4",null,null!=n?n:e.model_id))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",alignItems:"center",justifyContent:"flexEnd"},n&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTextColor,{color:"subdued"},e.model_id)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Kc,{modelState:Xo(e),modelStateReason:(a=e,null==a||null===(i=a.deployment_stats)||void 0===i?void 0:i.reason)})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(eu,{type:t})))))));var a,i},nu=({disabledReason:e})=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,{size:"xs"}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"warning",color:"warning"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTextColor,{color:"warning"},null!=e?e:Ic)))),Object(y.jsx)(S.EuiSpacer,{size:"xs"})),au=({pipeline:e})=>{const t=e.modelId.length>0?e.modelId:Nc;return Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"none"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",alignItems:"center",justifyContent:"flexEnd"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h4",null,e.pipelineName))),e.modelType.length>0&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(eu,{type:e.modelType})))),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",alignItems:"center",justifyContent:"flexEnd"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.existingPipeline.model",{defaultMessage:"Model"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiText,{size:"s",color:e.disabled?"subdued":"normal"},t)))),Object(y.jsx)(S.EuiSpacer,{size:"xs"}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{style:{minWidth:100}},Object(y.jsx)(S.EuiText,{size:"s",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.existingPipeline.sourceFields",{defaultMessage:"Source fields"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiText,{size:"s",color:e.disabled?"subdued":"normal",textAlign:"right"},e.sourceFields.join(", "))))),Object(y.jsx)(S.EuiSpacer,{size:"s"}),e.disabled&&Object(y.jsx)(nu,{disabledReason:e.disabledReason}))};let iu;!function(e){e.NotDeployed="",e.Downloading="downloading",e.Downloaded="fully_downloaded",e.Starting="starting",e.Started="started",e.FullyAllocated="fully_allocated"}(iu||(iu={}));const su=Object(V.a)(["create_text_expansion_model_api_logic"],(async()=>{const e=`/internal/enterprise_search/ml/models/${Wo}`;return await d.a.values.http.post(e,{body:void 0})}),{showErrorFlash:!1}),ru=Object(V.a)(["fetch_text_expansion_model_api_logic"],(async()=>await d.a.values.http.get(`/internal/enterprise_search/ml/models/${Wo}`)),{showErrorFlash:!1}),lu=Object(r.kea)({actions:{clearTextExpansionModelPollingId:!0,createTextExpansionModelPollingTimeout:e=>({duration:e}),setTextExpansionModelPollingId:e=>({pollTimeoutId:e}),startPollingTextExpansionModel:!0,stopPollingTextExpansionModel:!0},connect:{actions:[su,["makeRequest as createTextExpansionModel","apiSuccess as createTextExpansionModelSuccess","apiError as createTextExpansionModelError"],ru,["makeRequest as fetchTextExpansionModel","apiSuccess as fetchTextExpansionModelSuccess","apiError as fetchTextExpansionModelError"],dc,["makeRequest as startTextExpansionModel","apiSuccess as startTextExpansionModelSuccess","apiError as startTextExpansionModelError"]],values:[su,["data as createdTextExpansionModel","status as createTextExpansionModelStatus","error as createTextExpansionModelError"],ru,["data as textExpansionModel","error as fetchTextExpansionModelError"],dc,["status as startTextExpansionModelStatus","error as startTextExpansionModelError"]]},events:({actions:e,values:t})=>({afterMount:()=>{e.fetchTextExpansionModel(void 0)},beforeUnmount:()=>{null!==t.textExpansionModelPollTimeoutId&&e.stopPollingTextExpansionModel()}}),listeners:({actions:e,values:t})=>({createTextExpansionModelPollingTimeout:({duration:n})=>{null!==t.textExpansionModelPollTimeoutId&&clearTimeout(t.textExpansionModelPollTimeoutId);const a=setTimeout((()=>{e.fetchTextExpansionModel(void 0)}),n);e.setTextExpansionModelPollingId(a)},createTextExpansionModelSuccess:()=>{e.fetchTextExpansionModel(void 0),e.startPollingTextExpansionModel()},fetchTextExpansionModelError:()=>{t.isPollingTextExpansionModelActive&&e.createTextExpansionModelPollingTimeout(3e4)},fetchTextExpansionModelSuccess:n=>{(null==n?void 0:n.deploymentState)===iu.Downloading?t.isPollingTextExpansionModelActive?e.createTextExpansionModelPollingTimeout(5e3):e.startPollingTextExpansionModel():(null==n?void 0:n.deploymentState)===iu.Downloaded&&t.isPollingTextExpansionModelActive&&e.stopPollingTextExpansionModel()},startPollingTextExpansionModel:()=>{null!==t.textExpansionModelPollTimeoutId&&clearTimeout(t.textExpansionModelPollTimeoutId),e.createTextExpansionModelPollingTimeout(5e3)},startTextExpansionModelSuccess:()=>{e.fetchTextExpansionModel(void 0)},stopPollingTextExpansionModel:()=>{null!==t.textExpansionModelPollTimeoutId&&(clearTimeout(t.textExpansionModelPollTimeoutId),e.clearTextExpansionModelPollingId())}}),path:["enterprise_search","content","text_expansion_callout_logic"],reducers:{textExpansionModelPollTimeoutId:[null,{clearTextExpansionModelPollingId:()=>null,setTextExpansionModelPollingId:(e,{pollTimeoutId:t})=>t}]},selectors:({selectors:e})=>({isCreateButtonDisabled:[()=>[e.createTextExpansionModelStatus],e=>e!==$.a.IDLE&&e!==$.a.ERROR],isModelDownloadInProgress:[()=>[e.textExpansionModel],e=>(null==e?void 0:e.deploymentState)===iu.Downloading],isModelDownloaded:[()=>[e.textExpansionModel],e=>(null==e?void 0:e.deploymentState)===iu.Downloaded],isModelStarted:[()=>[e.textExpansionModel],e=>(null==e?void 0:e.deploymentState)===iu.Starting||(null==e?void 0:e.deploymentState)===iu.Started||(null==e?void 0:e.deploymentState)===iu.FullyAllocated],isPollingTextExpansionModelActive:[()=>[e.textExpansionModelPollTimeoutId],e=>null!==e],isStartButtonDisabled:[()=>[e.startTextExpansionModelStatus],e=>e!==$.a.IDLE&&e!==$.a.ERROR],isModelRunningSingleThreaded:[()=>[e.textExpansionModel],e=>(null==e?void 0:e.targetAllocationCount)*(null==e?void 0:e.threadsPerAllocation)<=1]})}),ou=({dismiss:e,ingestionMethod:t,isCreateButtonDisabled:n,isDismissable:a})=>{const{createTextExpansionModel:i}=Object(r.useActions)(lu);return Object(y.jsx)(S.EuiCallOut,{color:"success"},Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiBadge,{color:"success"},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.titleBadge",defaultMessage:"New"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiText,{color:"success",size:"xs"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.title",{defaultMessage:"Improve your results with ELSER"})))),a&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(xu,{dismiss:e})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)(E.FormattedHTMLMessage,{id:"xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.body",defaultMessage:"ELSER (Elastic Learned Sparse EncodeR) is our new trained machine learning model designed to efficiently use context in natural language queries. This model delivers better results than BM25 without further training on your data.",tagName:"p"}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"m",alignItems:"center",justifyContent:"flexStart"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{color:"success","data-telemetry-id":`entSearchContent-${t}-pipelines-textExpansionCallOut-deployModel`,disabled:n,iconType:"launch",onClick:()=>i(void 0)},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.textExpansionCallOut.deployButton.label",{defaultMessage:"Deploy"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{target:"_blank",href:k.a.elser},Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.learnMoreLink",defaultMessage:"Learn more"})))))))))},cu=({dismiss:e,ingestionMethod:t,isDismissable:n,isStartButtonDisabled:a})=>{const{startTextExpansionModel:i}=Object(r.useActions)(lu);return Object(y.jsx)(S.EuiCallOut,{color:"success"},Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{color:"success",type:"checkInCircleFilled"})),Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiText,{color:"success",size:"xs"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.deployedTitle",{defaultMessage:"Your ELSER model has deployed but not started."})))),n&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(xu,{dismiss:e})))),Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.deployedBody",{defaultMessage:"You may start the model in a single-threaded configuration for testing, or tune the performance for a production environment."})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiSpacer,{size:"s"})),Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"s",alignItems:"center",justifyContent:"flexStart"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButton,{color:"success","data-telemetry-id":`entSearchContent-${t}-pipelines-textExpansionCallOut-startModel`,disabled:a,iconType:"playFilled",onClick:()=>i(void 0)},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.textExpansionCallOut.startModelButton.label",{defaultMessage:"Start single-threaded"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Mu,null))))))},uu=({dismiss:e,isDismissable:t})=>Object(y.jsx)(S.EuiCallOut,{color:"success"},Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{color:"success",type:"clock"})),Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiText,{color:"success",size:"xs"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.deployingTitle",{defaultMessage:"Your ELSER model is deploying."})))),t&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(xu,{dismiss:e})))),Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.deployingBody",{defaultMessage:"You can continue creating your pipeline with other uploaded models in the meantime."})))))),du=({dismiss:e,isCompact:t,isDismissable:n,isSingleThreaded:a})=>Object(y.jsx)(S.EuiCallOut,{color:"success"},Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"s",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:"checkInCircleFilled",color:"success"})),Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiText,{color:"success",size:"xs"},Object(y.jsx)("h3",null,a?t?N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.startedSingleThreadedTitleCompact",{defaultMessage:"Your ELSER model is running single-threaded."}):N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.startedSingleThreadedTitle",{defaultMessage:"Your ELSER model has started single-threaded."}):t?N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.startedTitleCompact",{defaultMessage:"Your ELSER model is running."}):N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.startedTitle",{defaultMessage:"Your ELSER model has started."})))),n&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(xu,{dismiss:e})))),!t&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,a?N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.startedSingleThreadedBody",{defaultMessage:"This single-threaded configuration is great for testing your custom inference pipelines, however performance should be fine-tuned for production."}):N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.startedBody",{defaultMessage:"Enjoy the power of ELSER in your custom Inference pipeline."})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"m",alignItems:"center",justifyContent:"flexStart"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},a?Object(y.jsx)(Mu,null):Object(y.jsx)(S.EuiButtonEmpty,{iconSide:"left",iconType:"wrench",onClick:()=>p.a.values.navigateToUrl(Mc,{shouldNotCreateHref:!0})},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.textExpansionCallOut.viewModelsButton",{defaultMessage:"View details"})))))))),pu="enterprise-search-text-expansion-callout-dismissed",gu=()=>"true"===localStorage.getItem(pu),ju=({error:e})=>{const{http:t}=Object(r.useValues)(d.a);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(M.b,{action:"error",metric:"textExpansionModel-error"}),Object(y.jsx)(S.EuiCallOut,{color:"danger",iconType:"error",title:e.title},Object(y.jsx)("p",null,e.message),Object(y.jsx)(S.EuiLink,{href:t.basePath.prepend(C.d),target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.textExpansionCreateError.mlNotificationsLink",{defaultMessage:"Machine Learning notifications"}))))},xu=({dismiss:e})=>Object(y.jsx)(S.EuiButtonIcon,{"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.textExpansionCallOut.dismissButton",{defaultMessage:"Dismiss ELSER call out"}),iconType:"cross",onClick:e}),Mu=()=>Object(y.jsx)(S.EuiButtonEmpty,{iconSide:"left",iconType:"wrench",onClick:()=>p.a.values.navigateToUrl(Mc,{shouldNotCreateHref:!0})},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.textExpansionCallOut.fineTuneModelButton",{defaultMessage:"Fine-tune performance"})),hu=e=>{const{dismiss:t,isCompact:n,isDismissable:i,show:s}=(({isCompact:e=!1,isDismissable:t=!1})=>{const{ingestionMethod:n}=Object(r.useValues)(fn),{isCreateButtonDisabled:i,isModelRunningSingleThreaded:s,isStartButtonDisabled:l}=Object(r.useValues)(lu),[o,c]=Object(a.useState)((()=>{if(!t)return!0;try{return!gu()}catch{return!0}}));return Object(a.useEffect)((()=>{try{gu()||localStorage.setItem(pu,JSON.stringify(!o))}catch{return}}),[o]),{dismiss:Object(a.useCallback)((()=>{c(!1)}),[]),ingestionMethod:n,isCompact:e,isCreateButtonDisabled:i,isDismissable:t,isSingleThreaded:s,isStartButtonDisabled:l,show:o}})(e),{ingestionMethod:l}=Object(r.useValues)(fn),{createTextExpansionModelError:o,fetchTextExpansionModelError:c,isCreateButtonDisabled:u,isModelDownloadInProgress:d,isModelDownloaded:p,isModelRunningSingleThreaded:g,isModelStarted:j,isStartButtonDisabled:x,startTextExpansionModelError:M}=Object(r.useValues)(lu),h=(f=c,b=M,void 0!==(m=o)?{title:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.textExpansionCreateError.title",{defaultMessage:"Error with ELSER deployment"}),message:Object(Qs.c)(m)[0]}:void 0!==b?{title:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.textExpansionStartError.title",{defaultMessage:"Error starting ELSER deployment"}),message:Object(Qs.c)(b)[0]}:void 0!==f?{title:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.textExpansionFetchError.title",{defaultMessage:"Error fetching ELSER model"}),message:Object(Qs.c)(f)[0]}:null);var m,f,b;return h?Object(y.jsx)(ju,{error:h}):s?d?Object(y.jsx)(uu,{dismiss:t,isDismissable:i}):p?Object(y.jsx)(cu,{dismiss:t,ingestionMethod:l,isDismissable:i,isStartButtonDisabled:x}):j?Object(y.jsx)(du,{dismiss:t,isCompact:n,isDismissable:i,isSingleThreaded:g}):Object(y.jsx)(ou,{dismiss:t,ingestionMethod:l,isDismissable:i,isCreateButtonDisabled:u}):null},mu="model_placeholder$$",fu="pipeline_placeholder$$",bu=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.existingPipeline.chooseLabel",{defaultMessage:"Choose"}),yu=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.existingPipeline.newLabel",{defaultMessage:"New pipeline"}),Ou=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.existingPipeline.existingLabel",{defaultMessage:"Existing pipeline"}),Iu=()=>{var e,t,n;const{addInferencePipelineModal:{configuration:s},formErrors:l,existingInferencePipelines:o,supportedMLModels:c}=Object(r.useValues)(vc),{selectExistingPipeline:u,setInferencePipelineConfiguration:d}=Object(r.useActions)(vc),{ingestionMethod:p}=Object(r.useValues)(fn),{indexName:g}=Object(r.useValues)(un),{existingPipeline:j,modelID:x,pipelineName:M}=s;Object(a.useEffect)((()=>{d({...s,pipelineName:M||g})}),[]);const h=void 0!==l.pipelineName&&M.length>0,m=[{disabled:!0,inputDisplay:j&&M.length>0?Nc:Sc,value:mu},...c.map((e=>({dropdownDisplay:Object(y.jsx)(tu,{model:e}),inputDisplay:e.model_id,value:e.model_id})))],f=[{disabled:!0,inputDisplay:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.existingPipeline.placeholder",{defaultMessage:"Select one"}),value:fu},...null!==(e=null==o?void 0:o.map((e=>({disabled:e.disabled,dropdownDisplay:Object(y.jsx)(au,{pipeline:e}),inputDisplay:e.pipelineName,value:e.pipelineName}))))&&void 0!==e?e:[]],b=!1!==s.existingPipeline;return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:3},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.title",{defaultMessage:"Create or select a pipeline"}))),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.description",{defaultMessage:"Build or reuse a child pipeline that will be used as a processor in your main pipeline."})),Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.descriptionUsePipelines",{defaultMessage:"Pipelines you create will be saved to be used elsewhere in your Elastic deployment."})))),Object(y.jsx)(S.EuiFlexItem,{grow:7},Object(y.jsx)(S.EuiPanel,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(S.EuiForm,{component:"form"},Object(y.jsx)(S.EuiFormRow,{fullWidth:!0,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.chooseExistingLabel",{defaultMessage:"New or existing"})},Object(y.jsx)(S.EuiSelect,{fullWidth:!0,options:[{disabled:!0,text:bu,value:""},{text:yu,value:"false"},{disabled:!o||0===o.length,text:Ou,value:"true"}],onChange:e=>d({...Ec,existingPipeline:"true"===e.target.value}),value:null!==(t=null===(n=s.existingPipeline)||void 0===n?void 0:n.toString())&&void 0!==t?t:""})),!0===s.existingPipeline?Object(y.jsx)(S.EuiFormRow,{fullWidth:!0,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.existingPipelineLabel",{defaultMessage:"Select an existing inference pipeline"})},Object(y.jsx)(S.EuiSuperSelect,{fullWidth:!0,hasDividers:!0,"data-telemetry-id":`entSearchContent-${p}-pipelines-configureInferencePipeline-selectExistingPipeline`,valueOfSelected:M.length>0?M:fu,options:f,onChange:e=>u(e)})):Object(y.jsx)(S.EuiFormRow,{fullWidth:!0,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.nameLabel",{defaultMessage:"Name"}),helpText:!h&&!1===s.existingPipeline&&Object(y.jsx)(S.EuiText,{size:"xs"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.name.helpText",{defaultMessage:"Pipeline names are unique within a deployment and can only contain letters, numbers, underscores, and hyphens. This will create a pipeline named {pipelineName}.",values:{pipelineName:`ml-inference-${M}`}})),error:h&&l.pipelineName,isInvalid:h},Object(y.jsx)(S.EuiFieldText,{"data-telemetry-id":`entSearchContent-${p}-pipelines-configureInferencePipeline-uniqueName`,disabled:b,fullWidth:!0,prepend:"ml-inference-",placeholder:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.namePlaceholder",{defaultMessage:"Enter a unique name for this pipeline"}),value:M,onChange:e=>d({...s,pipelineName:e.target.value})})))))),Object(y.jsx)(S.EuiHorizontalRule,null),Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:3},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.titleSelectTrainedModel",{defaultMessage:"Select a trained ML Model"}))),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.descriptionDeployTrainedModel",{defaultMessage:"To perform natural language processing tasks in your cluster, you must deploy an appropriate trained model."})),Object(y.jsx)(S.EuiLink,{href:k.a.deployTrainedModels,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.docsLink",{defaultMessage:"Learn more about importing and using ML models in Search"})))),Object(y.jsx)(S.EuiFlexItem,{grow:7},Object(y.jsx)(S.EuiPanel,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(S.EuiForm,{component:"form"},Object(y.jsx)(S.EuiFormRow,{label:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.configure.modelLabel",{defaultMessage:"Select a trained ML Model"}),fullWidth:!0},Object(y.jsx)(S.EuiSuperSelect,{"data-telemetry-id":`entSearchContent-${p}-pipelines-configureInferencePipeline-selectTrainedModel`,fullWidth:!0,hasDividers:!0,disabled:b,itemLayoutAlign:"top",onChange:e=>d({...s,inferenceConfig:void 0,modelID:e,fieldMappings:void 0}),options:m,valueOfSelected:""===x?mu:x})),Object(y.jsx)(kc,null)),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(hu,{isCompact:!0})))))};var Su=n(144),Nu=n.n(Su),Eu=n(548),Du=n.n(Eu);const Tu=()=>{const{colorMode:e}=Object(S.useEuiTheme)();return Object(y.jsx)(S.EuiEmptyPrompt,{body:Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiImage,{size:"xl",src:"LIGHT"===e?Du.a:Nu.a,alt:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.noModels.imageAlt",{defaultMessage:"No machine learning models illustration"})}),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.noModels.description",defaultMessage:"You have no trained machine learning models that can be used by an inference pipeline. {documentationLink}",values:{documentationLink:Object(y.jsx)(S.EuiLink,{href:k.a.machineLearningStart,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.noModels.esDocs.link",{defaultMessage:"Learn how to add a trained model"}))}}))))})},wu=()=>{const{mlInferencePipeline:e}=Object(r.useValues)(vc);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:3},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.review.title",{defaultMessage:"Review your pipeline configuration"})))),Object(y.jsx)(S.EuiFlexItem,{grow:7},Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.review.description",{defaultMessage:"This pipeline will be created and injected as a processor into your default pipeline for this index. You'll be able to use this new pipeline independently as well."}))))),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,{grow:!0},Object(y.jsx)(S.EuiCodeBlock,{language:"json",isCopyable:!0,overflowHeight:"400px"},JSON.stringify(null!=e?e:{},null,2)))))},vu=Object(V.a)(["get_documents_logic"],(async({indexName:e,documentId:t})=>{const n=`/internal/enterprise_search/indices/${e}/document/${t}`;return await d.a.values.http.get(n)})),Cu=Object(V.a)(["simulate_existing_ml_inference_pipeline_api_logic"],(async({docs:e,indexName:t,pipelineName:n})=>{const a=`/internal/enterprise_search/indices/${t}/ml_inference/pipeline_processors/simulate/${n}`;return await d.a.values.http.post(a,{body:JSON.stringify({docs:e})})})),ku=Object(V.a)(["simulate_ml_inference_pipeline_api_logic"],(async({docs:e,indexName:t,pipeline:n})=>{const a=`/internal/enterprise_search/indices/${t}/ml_inference/pipeline_processors/simulate`;return await d.a.values.http.post(a,{body:JSON.stringify({docs:e,pipeline:{description:n.description,processors:n.processors}})})})),Au=Object(r.kea)({actions:{setPipelineSimulateBody:e=>({simulateBody:e}),setSimulatePipelineErrors:e=>({errors:e}),simulatePipeline:!0},connect:{actions:[vu,["apiError as getDocumentApiError","apiSuccess as getDocumentApiSuccess","makeRequest as makeGetDocumentRequest"],Cu,["makeRequest as makeSimulateExistingPipelineRequest","apiSuccess as simulateExistingPipelineApiSuccess","apiError as simulateExistingPipelineApiError","apiReset as simulateExistingPipelineApiReset"],ku,["makeRequest as makeSimulatePipelineRequest","apiSuccess as simulatePipelineApiSuccess","apiError as simulatePipelineApiError","apiReset as simulatePipelineApiReset"]],values:[vu,["data as getDocumentData","status as getDocumentApiStatus","error as getDocumentApiErrorMessage"],Cu,["data as simulateExistingPipelineData","status as simulateExistingPipelineStatus"],ku,["data as simulatePipelineData","status as simulatePipelineStatus"],vc,["addInferencePipelineModal","mlInferencePipeline"]]},listeners:({values:e,actions:t})=>({getDocumentApiSuccess:e=>{t.setPipelineSimulateBody(JSON.stringify([e],void 0,2))},simulatePipeline:()=>{if(e.mlInferencePipeline){t.setSimulatePipelineErrors([]),t.simulateExistingPipelineApiReset(),t.simulatePipelineApiReset();const{configuration:n}=e.addInferencePipelineModal;n.existingPipeline?t.makeSimulateExistingPipelineRequest({docs:e.simulateBody,indexName:e.addInferencePipelineModal.indexName,pipelineName:n.pipelineName}):t.makeSimulatePipelineRequest({docs:e.simulateBody,indexName:e.addInferencePipelineModal.indexName,pipeline:e.mlInferencePipeline})}}}),path:["enterprise_search","content","pipelines_test_inference_pipeline"],reducers:{simulateBody:["[\n\n]",{setPipelineSimulateBody:(e,{simulateBody:t})=>t}],simulatePipelineErrors:[[],{setSimulatePipelineErrors:(e,{errors:t})=>t,simulateExistingPipelineApiError:(e,t)=>Object(Qs.c)(t),simulatePipelineApiError:(e,t)=>Object(Qs.c)(t)}]},selectors:({selectors:e})=>({getDocumentsErr:[()=>[e.getDocumentApiErrorMessage],e=>e?Object(Qs.c)(e)[0]:""],isGetDocumentsLoading:[()=>[e.getDocumentApiStatus],e=>e===$.a.LOADING],showGetDocumentErrors:[()=>[e.getDocumentApiStatus],e=>e===$.a.ERROR],simulatePipelineResult:[()=>[e.simulatePipelineStatus,e.simulatePipelineData,e.simulateExistingPipelineStatus,e.simulateExistingPipelineData],(e,t,n,a)=>n===$.a.SUCCESS?a:e===$.a.SUCCESS?t:void 0]})});n(270);const Lu=()=>{const{addInferencePipelineModal:{configuration:{fieldMappings:e},indexName:t},getDocumentsErr:n,isGetDocumentsLoading:s,showGetDocumentErrors:l,simulateBody:o,simulatePipelineResult:c,simulatePipelineErrors:u}=Object(r.useValues)(Au),{simulatePipeline:d,setPipelineSimulateBody:p,makeGetDocumentRequest:g}=Object(r.useActions)(Au),j=Object(S.useIsWithinMaxBreakpoint)("s"),x=Object(a.useRef)(),M=N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.sampleValue",{defaultMessage:"REPLACE ME"});return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:3},Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.title",{defaultMessage:"Test your pipeline results"})))),Object(y.jsx)(S.EuiFlexItem,{grow:7},Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},Object(y.jsx)("p",null,Object(y.jsx)("strong",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.optionalCallout",{defaultMessage:"This is an optional step."}))," ",N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.description",{defaultMessage:"Use this tool to run a simulation of your pipeline in order to confirm that it produces your anticipated results."}))))),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(S.EuiPanel,{hasBorder:!0,hasShadow:!1},Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFormRow,{fullWidth:!0,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.addDocument",{defaultMessage:"Search for a document"}),helpText:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.addDocument.helptext",{defaultMessage:"Use a document to test your new pipeline. Search using document IDs"}),isInvalid:l,error:n},Object(y.jsx)(S.EuiFieldText,{fullWidth:!0,prepend:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.addDocument.documentId",{defaultMessage:"Document ID"}),inputRef:e=>{x.current=e},isInvalid:l,isLoading:s,onKeyDown:e=>{var n,a,i;"Enter"===e.key&&0!==(null===(n=x.current)||void 0===n?void 0:n.value.trim().length)&&g({documentId:null!==(a=null===(i=x.current)||void 0===i?void 0:i.value.trim())&&void 0!==a?a:"",indexName:t})}}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiText,null,Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.or",{defaultMessage:"Or"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{size:"xs"},Object(y.jsx)("p",null,Object(y.jsx)("strong",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.useJsonFormat",{defaultMessage:"Use this JSON format to add your own array of documents"})))),Object(y.jsx)(S.EuiCodeBlock,{fontSize:"m",isCopyable:!0,language:"json",paddingSize:"m"},JSON.stringify(JSON.parse(`[{"_index":"index", "_id":"id", "_source":{${e?e.map((e=>`"${e.sourceField}": "${M}"`)).join(", "):`"my_field": "${M}"`}}}]`),null,2)))),Object(y.jsx)(S.EuiSpacer,{size:"m"})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,null,Object(y.jsx)("h5",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.subtitle.documents",{defaultMessage:"Raw document"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,null,Object(y.jsx)("h5",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.subtitle.result",{defaultMessage:"Result"})))))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiResizableContainer,{direction:j?"vertical":"horizontal",className:"resizableContainer"},((e,t)=>Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(e,{grow:!0,hasBorder:!0,initialSize:50,paddingSize:"xs"},Object(y.jsx)(ci.CodeEditor,{languageId:"json",options:{automaticLayout:!0,lineNumbers:"off",tabSize:2},value:o,onChange:e=>{p(e)}})),Object(y.jsx)(t,null),Object(y.jsx)(e,{grow:!0,hasBorder:!0,initialSize:50,paddingSize:"xs"},Object(y.jsx)(S.EuiCodeBlock,{language:"json",isCopyable:!0,className:"reviewCodeBlock"},u.length>0?JSON.stringify(u,null,2):c?JSON.stringify(c,null,2):"{}")))))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)("div",null,Object(y.jsx)(S.EuiButton,{onClick:d},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.test.runButton",{defaultMessage:"Simulate Pipeline"})))))))},zu=()=>Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.title",{defaultMessage:"Update your index mappings"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCallOut,{color:"warning",iconType:"warning",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.required",{defaultMessage:"Required"})},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.description",{defaultMessage:"You must manually update your index mappings before you can start indexing documents through the pipeline."})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiText,{color:"subdued",size:"s"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.presentInMapping",{defaultMessage:"Make sure the selected inference output fields are present in the mapping."})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{href:k.a.mlDocumentEnrichmentUpdateMappings,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.docsLink",{defaultMessage:"Learn more"})))),_u=()=>Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"s"},Object(y.jsx)("h4",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.titleNoAction",{defaultMessage:"Review index mapping updates"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiCallOut,null,Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.descriptionNoAction",{defaultMessage:"Your index mappings will automatically be updated to include the selected inference output fields."})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiLink,{href:k.a.mlDocumentEnrichmentUpdateMappings,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.docsLink",{defaultMessage:"Learn more"})))),Ru=()=>{var e;const{addInferencePipelineModal:{configuration:t},isTextExpansionModelSelected:n}=Object(r.useValues)(vc),a=n&&!t.existingPipeline,s=[{field:"targetField",name:a?N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.fieldMappings",{defaultMessage:"Field mappings"}):N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.steps.updateMappings.fieldMappingsRequired",{defaultMessage:"Required field mappings"})}];return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexGroup,{alignItems:"flexStart"},Object(y.jsx)(S.EuiFlexItem,{grow:3},a?Object(y.jsx)(_u,null):Object(y.jsx)(zu,null)),Object(y.jsx)(S.EuiFlexItem,{grow:7},Object(y.jsx)(S.EuiPanel,{hasBorder:!0},Object(y.jsx)(S.EuiBasicTable,{columns:s,items:null!==(e=t.fieldMappings)&&void 0!==e?e:[],rowHeader:"targetField"})))))},Fu=e=>{const{indexName:t}=Object(r.useValues)(un),{setIndexName:n}=Object(r.useActions)(vc);return Object(a.useEffect)((()=>{n(t)}),[t]),Object(y.jsx)(S.EuiFlyout,{onClose:e.onClose,className:"enterpriseSearchInferencePipelineFlyout",size:"l"},Object(y.jsx)(S.EuiFlyoutHeader,null,Object(y.jsx)(S.EuiTitle,{size:"m"},Object(y.jsx)("h3",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.title",{defaultMessage:"Add an inference pipeline"})))),Object(y.jsx)(Uu,e))},Uu=({onClose:e})=>{const{ingestionMethod:t}=Object(r.useValues)(fn),{createErrors:n,supportedMLModels:s,isLoading:l,addInferencePipelineModal:{step:o}}=Object(r.useValues)(vc),c=n.join("|");return Object(a.useEffect)((()=>{if(0===n.length)return;const e=document.getElementsByClassName("euiFlyoutBody__overflow");0!==e.length&&(e[0].scrollTop=0)}),[c]),l?Object(y.jsx)(S.EuiFlyoutBody,null,Object(y.jsx)(S.EuiLoadingSpinner,{size:"xl"})):0===s.length?Object(y.jsx)(Tu,null):Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlyoutBody,null,n.length>0&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiCallOut,{title:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.addInferencePipelineModal.createErrors",{defaultMessage:"Error creating pipeline"}),color:"danger",iconType:"error"},n.map(((e,t)=>Object(y.jsx)("p",{key:`createError.${t}`},e)))),Object(y.jsx)(S.EuiSpacer,null)),Object(y.jsx)(Pu,null),Object(y.jsx)(S.EuiSpacer,{size:"m"}),o===jc.Configuration&&Object(y.jsx)(Iu,null),o===jc.Fields&&Object(y.jsx)(Bc,null),o===jc.Mappings&&Object(y.jsx)(Ru,null),o===jc.Test&&Object(y.jsx)(Lu,null),o===jc.Review&&Object(y.jsx)(wu,null)),Object(y.jsx)(S.EuiFlyoutFooter,{className:"enterpriseSearchInferencePipelineFlyoutFooter"},Object(y.jsx)(Qu,{onClose:e,ingestionMethod:t})))},Pu=()=>{const{addInferencePipelineModal:{step:e},isConfigureStepValid:t,isPipelineDataValid:n}=Object(r.useValues)(vc),{onAddInferencePipelineStepChange:a}=Object(r.useActions)(vc),i=(e,t)=>e>t?"complete":e===t?"current":"incomplete",s=[{onClick:()=>a(jc.Configuration),status:e>jc.Configuration?"complete":"current",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.transforms.addInferencePipelineModal.steps.configure.title",{defaultMessage:"Configure"})},{onClick:()=>{t&&a(jc.Fields)},status:t?i(e,jc.Fields):"disabled",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.transforms.addInferencePipelineModal.steps.fields.title",{defaultMessage:"Fields"})},{onClick:()=>{n&&a(jc.Mappings)},status:n?i(e,jc.Mappings):"disabled",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.transforms.addInferencePipelineModal.steps.updateMappings.title",{defaultMessage:"Mappings"})},{onClick:()=>{n&&a(jc.Test)},status:n?i(e,jc.Test):"disabled",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.transforms.addInferencePipelineModal.steps.test.title",{defaultMessage:"Test (Optional)"})},{onClick:()=>{n&&a(jc.Review)},status:n?i(e,jc.Review):"disabled",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.transforms.addInferencePipelineModal.steps.review.title",{defaultMessage:"Review"})}];return Object(y.jsx)(S.EuiStepsHorizontal,{steps:s})},Qu=({ingestionMethod:e,onClose:t})=>{const{addInferencePipelineModal:n,isPipelineDataValid:a,isConfigureStepValid:i}=Object(r.useValues)(vc),{attachPipeline:s,createPipeline:l,onAddInferencePipelineStepChange:o}=Object(r.useActions)(vc),c=Boolean(n.configuration.existingPipeline);let u,d,p=!1;switch(n.step){case jc.Configuration:u=jc.Fields,p=i;break;case jc.Fields:u=jc.Mappings,d=jc.Configuration,p=a;break;case jc.Mappings:u=jc.Test,d=jc.Fields,p=!0;break;case jc.Test:u=jc.Review,d=jc.Mappings,p=!0;break;case jc.Review:d=jc.Test,p=!0}return Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":`entSearchContent-${e}-pipelines-addMlInference-cancel`,onClick:t},zt.e)),Object(y.jsx)(S.EuiFlexItem,null),Object(y.jsx)(S.EuiFlexItem,{grow:!1},void 0!==d?Object(y.jsx)(S.EuiButtonEmpty,{flush:"both",iconType:"arrowLeft",onClick:()=>o(d)},zt.c):null),Object(y.jsx)(S.EuiFlexItem,{grow:!1},void 0!==u?Object(y.jsx)(S.EuiButton,{"data-telemetry-id":`entSearchContent-${e}-pipelines-addMlInference-continue`,iconType:"arrowRight",iconSide:"right",onClick:()=>o(u),disabled:!p,fill:!0},zt.g):c?Object(y.jsx)(S.EuiButton,{color:"primary","data-telemetry-id":`entSearchContent-${e}-pipelines-addMlInference-attach`,disabled:!p,fill:!0,onClick:s},N.i18n.translate("xpack.enterpriseSearch.content.indices.transforms.addInferencePipelineModal.footer.attach",{defaultMessage:"Attach"})):Object(y.jsx)(S.EuiButton,{color:"success","data-telemetry-id":`entSearchContent-${e}-pipelines-addMlInference-create`,disabled:!p,fill:!0,onClick:l},N.i18n.translate("xpack.enterpriseSearch.content.indices.transforms.addInferencePipelineModal.footer.create",{defaultMessage:"Create pipeline"}))))},Yu=N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.action.delete",{defaultMessage:"Delete pipeline"}),Bu=e=>{if(e.pipeline.pipelineReferences.length>1){const t=e.pipeline.pipelineReferences.map((e=>e.replace("@ml-inference",""))).join(", ");return Object(y.jsx)(S.EuiToolTip,{position:"top",content:N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.action.delete.disabledDescription",{defaultMessage:"This inference pipeline cannot be deleted because it is used in multiple pipelines [{indexReferences}]. You must detach this pipeline from all but one ingest pipeline before it can be deleted.",values:{indexReferences:t}})},Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":e["data-telemetry-id"],size:"s",flush:"both",iconType:"trash",color:"text",disabled:!0},Yu))}return Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":e["data-telemetry-id"],size:"s",flush:"both",iconType:"trash",color:"text",onClick:e.onClick},Yu)},Gu=e=>{const{http:t}=Object(r.useValues)(d.a),{indexName:n}=Object(r.useValues)(un),{ingestionMethod:i}=Object(r.useValues)(fn),[s,l]=Object(a.useState)(!1),[o,c]=Object(a.useState)(!1),{deleteMlPipeline:u,detachMlPipeline:p}=Object(r.useActions)(Co),{pipelineName:g,types:j}=e,x=ic(j),M=sc(x),h=Object(y.jsx)(S.EuiButtonEmpty,{iconSide:"right",flush:"both",iconType:"boxesVertical",onClick:()=>l(!s)},N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.actionButton",{defaultMessage:"Actions"}));return Object(y.jsx)(S.EuiPanel,{color:"subdued"},Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h4",null,null!=M?M:g))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiPopover,{button:h,isOpen:s,closePopover:()=>l(!1)},Object(y.jsx)(S.EuiPopoverTitle,{paddingSize:"m"},N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.action.title",{defaultMessage:"Actions"})),Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"none"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("div",null,Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":`entSearchContent-${i}-pipelines-inferencePipeline-stackManagement`,size:"s",flush:"both",iconType:"eye",color:"text",href:t.basePath.prepend(`/app/management/ingest/ingest_pipelines/?pipeline=${g}`)},N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.action.view",{defaultMessage:"View in Stack Management"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("div",null,Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":`entSearchContent-${i}-pipelines-inferencePipeline-detachPipeline`,size:"s",flush:"both",iconType:"unlink",color:"text",onClick:()=>{p({indexName:n,pipelineName:g}),l(!1)}},N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.action.detach",{defaultMessage:"Detach pipeline"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("div",null,Object(y.jsx)(Bu,{"data-telemetry-id":`entSearchContent-${i}-pipelines-inferencePipeline-deletePipeline`,onClick:()=>{c(!0),l(!1)},pipeline:e})))))))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"s",alignItems:"center",justifyContent:"flexEnd"},M&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiTextColor,{color:"subdued"},g)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Kc,{modelState:e.modelState,modelStateReason:e.modelStateReason})),e.modelState===$o.NotDeployed&&Object(y.jsx)(S.EuiFlexItem,{grow:!1,style:{paddingRight:"1rem"}},Object(y.jsx)(S.EuiToolTip,{position:"top",content:N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.notDeployed.fixLink",{defaultMessage:"Fix issue in Trained Models"})},Object(y.jsx)(S.EuiButtonIcon,{"aria-label":N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.modelState.notDeployed.fixLink",{defaultMessage:"Fix issue in Trained Models"}),"data-telemetry-id":`entSearchContent-${i}-pipelines-inferencePipeline-fixIssueInTrainedModels`,href:t.basePath.prepend(C.c),display:"base",size:"xs",iconType:"wrench"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiFlexGroup,{gutterSize:"xs"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("span",null,Object(y.jsx)(eu,{type:x})))))))))),o&&Object(y.jsx)(S.EuiConfirmModal,{onCancel:()=>c(!1),onConfirm:()=>{c(!1),u({indexName:n,pipelineName:g})},title:N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.deleteConfirm.title",{defaultMessage:"Delete Pipeline"}),buttonColor:"danger",cancelButtonText:zt.e,confirmButtonText:zt.k,defaultFocusedButton:"confirm",maxWidth:!0},Object(y.jsx)(S.EuiText,null,Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.inferencePipelineCard.deleteConfirm.description",{defaultMessage:'You are removing the pipeline "{pipelineName}" from the Machine Learning Inference Pipeline and deleting it.',values:{pipelineName:g}})))))},$u=({onClick:e})=>{var t,n;const{capabilities:a}=Object(r.useValues)(ye.a),{ingestionMethod:i}=Object(r.useValues)(fn),{canUseMlInferencePipeline:s,hasIndexIngestionPipeline:l}=Object(r.useValues)(Co);return null!==(t=null==a||null===(n=a.ml)||void 0===n?void 0:n.canGetTrainedModels)&&void 0!==t&&t?l?s?Object(y.jsx)(Vu,{ingestionMethod:i,onClick:e}):Object(y.jsx)(S.EuiToolTip,{content:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.mlInference.addButton.mlInferenceDisabled.disabledTooltip",{defaultMessage:"You must enable ML Inference Pipelines on the Ingest Pipeline to add ML Inference Pipeline Processors."})},Object(y.jsx)(Vu,{ingestionMethod:i,disabled:!0})):Object(y.jsx)(S.EuiToolTip,{content:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.mlInference.addButton.defaultIngestPipeline.disabledTooltip",{defaultMessage:"You cannot add machine learning inference pipeline processors to the default ingest pipeline. You must first copy and customize the default ingest pipeline to add machine learning inference pipeline processors."})},Object(y.jsx)(Vu,{ingestionMethod:i,disabled:!0})):Object(y.jsx)(S.EuiToolTip,{content:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.mlInference.addButton.mlPermissions.disabledTooltip",{defaultMessage:"You do not have permission to use Machine Learning on this cluster."})},Object(y.jsx)(Vu,{ingestionMethod:i,disabled:!0}))},Vu=({disabled:e,ingestionMethod:t,onClick:n})=>Object(y.jsx)(S.EuiButton,{fullWidth:!0,"data-telemetry-id":`entSearchContent-${t}-pipelines-addInferencePipeline`,color:e?void 0:"success",disabled:e,iconType:e?"lock":"plusInCircle",onClick:n},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.mlInference.addButtonLabel",{defaultMessage:"Add Inference Pipeline"})),qu=()=>{var e,t,n;const{capabilities:i,isCloud:s}=Object(r.useValues)(ye.a),{hasPlatinumLicense:l}=Object(r.useValues)(Qn.a),{indexName:o}=Object(r.useValues)(un),{mlInferencePipelineProcessors:c}=Object(r.useValues)(Co),{fetchMlInferenceProcessors:u,openAddMlInferencePipelineModal:d}=Object(r.useActions)(Co);Object(a.useEffect)((()=>{u({indexName:o})}),[o]);const p=null!==(e=null==i||null===(t=i.ml)||void 0===t?void 0:t.canGetTrainedModels)&&void 0!==e&&e,g=!s&&!l;return Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"s"},p&&!g&&Object(y.jsx)(hu,{isDismissable:!0}),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)($u,{onClick:()=>d()})),null!==(n=null==c?void 0:c.map(((e,t)=>Object(y.jsx)(S.EuiFlexItem,{key:`${t}-${e.pipelineName}`},Object(y.jsx)(Gu,e)))))&&void 0!==n?n:null)},Wu=e=>!!(e=>e.hasOwnProperty("_meta"))(e)&&Boolean(e._meta.managed),Zu=Object(r.kea)({actions:{selectPipeline:e=>({pipeline:e})},connect:{actions:[No,["apiSuccess as fetchIndexPipelinesDataSuccess"]],values:[un,["indexName"],No,["data as indexPipelinesData"]]},events:({actions:e,values:t})=>({afterMount:()=>{if(!t.indexPipelinesData||0===t.indexPipelinesData.length)return;const n=Object.keys(t.indexPipelinesData).sort(),a=n.includes(t.indexName)?t.indexName:n[0];e.selectPipeline(a)}}),listeners:({actions:e,values:t})=>({fetchIndexPipelinesDataSuccess:n=>{const a=Object.keys(null!=n?n:{}).sort();if(a.length>0&&0===t.selectedPipelineId.length){const n=a.includes(t.indexName)?t.indexName:a[0];e.selectPipeline(n)}}}),path:["enterprise_search","content","pipelines_json_configurations"],reducers:()=>({selectedPipelineId:["",{selectPipeline:(e,{pipeline:t})=>t}]}),selectors:({selectors:e})=>({pipelines:[()=>[e.indexPipelinesData],e=>null!=e?e:{}],pipelineNames:[()=>[e.pipelines],e=>Object.keys(e).sort()],selectedPipeline:[()=>[e.selectedPipelineId,e.pipelines],(e,t)=>{if(t.hasOwnProperty(e))return t[e]}],selectedPipelineJSON:[()=>[e.selectedPipeline],e=>e?JSON.stringify(e,null,2):""]})}),Hu=()=>Object(y.jsx)(S.EuiToolTip,{position:"top",content:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.managed.description",{defaultMessage:"This pipeline is managed and cannot be edited"})},Object(y.jsx)(S.EuiBadge,{iconType:"lock",color:"warning"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.managed",{defaultMessage:"Managed"}))),Ju=()=>Object(y.jsx)(S.EuiToolTip,{position:"top",content:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.unmanaged.description",defaultMessage:"Edit this pipeline from {ingestPipelines} in Stack Management",values:{ingestPipelines:Object(y.jsx)("strong",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.ingestPipelines",{defaultMessage:"Ingest Pipelines"}))}})},Object(y.jsx)(S.EuiBadge,{iconType:"lockOpen"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.unmanaged",{defaultMessage:"Unmanaged"}))),Xu=()=>Object(y.jsx)(S.EuiToolTip,{position:"top",content:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.shared.description",{defaultMessage:"This pipeline is shared across all Search ingestion methods"})},Object(y.jsx)(S.EuiBadge,{iconType:"logstashIf",color:"hollow"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.shared",{defaultMessage:"Shared"}))),Ku=()=>Object(y.jsx)(S.EuiToolTip,{position:"top",content:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.indexSpecific.description",{defaultMessage:"This pipeline contains configurations specific to this index only"})},Object(y.jsx)(S.EuiBadge,{iconType:"document",color:"hollow"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.indexSpecific",{defaultMessage:"Index specific"}))),ed=()=>Object(y.jsx)(S.EuiToolTip,{position:"top",content:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.mlInference.description",{defaultMessage:"This pipeline references one or more ML Inference Pipelines for this index"})},Object(y.jsx)(S.EuiBadge,{iconType:"compute",color:"hollow"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.mlInference",{defaultMessage:"ML Inference"}))),td=()=>{const{indexName:e,selectedPipeline:t,selectedPipelineId:n}=Object(r.useValues)(Zu);if(!t)return Object(y.jsx)(i.a.Fragment,null);const a=[];return Wu(t)?a.push(Object(y.jsx)(Hu,{key:"managed-pipeline"})):a.push(Object(y.jsx)(Ju,{key:"unmanaged-pipeline"})),n===j.e&&a.push(Object(y.jsx)(Xu,{key:"shared-pipeline"})),null!=n&&n.endsWith("@ml-inference")?a.push(Object(y.jsx)(ed,{key:"inference-pipeline"})):null!=n&&n.includes(e)&&a.push(Object(y.jsx)(Ku,{key:"index-pipeline"})),Object(y.jsx)(S.EuiBadgeGroup,{gutterSize:"s"},a)},nd=()=>{const{http:e}=Object(r.useValues)(d.a),{ingestionMethod:t}=Object(r.useValues)(fn),{pipelineNames:n,selectedPipeline:a,selectedPipelineId:s,selectedPipelineJSON:l}=Object(r.useValues)(Zu),{selectPipeline:o}=Object(r.useActions)(Zu);return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Hr.a,{hasBorder:!0,title:Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.title",{defaultMessage:"Pipeline configurations"})),subtitle:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.subtitle",{defaultMessage:"View the JSON for your pipeline configurations on this index."}),footerDocLink:Object(y.jsx)(S.EuiLink,{href:k.a.ingestPipelines,target:"_blank",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.ingestionPipelines.docLink",{defaultMessage:"Learn more about how Search uses ingest pipelines"})),action:n.length>0&&Object(y.jsx)(S.EuiNotificationBadge,{size:"m"},n.length),iconType:"visVega"},Object(y.jsx)(S.EuiFormRow,{fullWidth:!0,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.selectLabel",{defaultMessage:"Select an ingest pipeline to view"})},Object(y.jsx)(S.EuiSelect,{"data-telemetry-id":`entSearchContent-${t}-pipelines-ingestPipelines-selectPipeline`,fullWidth:!0,options:n.map((e=>({text:e,value:e}))),value:s,onChange:e=>o(e.target.value)})),Object(y.jsx)(S.EuiSpacer,{size:"m"}),a&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(td,null)),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Wu(a)?Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":`entSearchContent-${t}-pipelines-ingestPipelines-viewInStackManagement`,size:"s",flush:"both",iconType:"eye",color:"primary",href:e.basePath.prepend(`/app/management/ingest/ingest_pipelines/?pipeline=${s}`)},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.action.view",{defaultMessage:"View in Stack Management"})):Object(y.jsx)(S.EuiButtonEmpty,{"data-telemetry-id":`entSearchContent-${t}-pipelines-ingestPipelines-editInStackManagement`,size:"s",flush:"both",iconType:"pencil",color:"primary",href:e.basePath.prepend(`/app/management/ingest/ingest_pipelines/edit/${s}`)},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations.action.edit",{defaultMessage:"Edit in Stack Management"})))),Object(y.jsx)(S.EuiSpacer,{size:"m"}),Object(y.jsx)(S.EuiCodeBlock,{language:"json",overflowHeight:300,isCopyable:!0},l))))},ad=()=>{const{showMissingPipelineCallout:e,showAddMlInferencePipelineModal:t,hasIndexIngestionPipeline:n,index:a,isDeleteModalOpen:s,pipelineName:l}=Object(r.useValues)(Co),{closeAddMlInferencePipelineModal:o,closeDeleteModal:c}=Object(r.useActions)(Co),{indexName:u}=Object(r.useValues)(un),{status:d}=Object(r.useValues)(jo),{makeRequest:p}=Object(r.useActions)(jo),g=Object(G.g)(a),j=Object(G.a)(a),x=[{content:Object(y.jsx)(bo,null),id:"inference-history",name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.inferenceHistory",{defaultMessage:"Inference history"})},{content:Object(y.jsx)(nd,null),id:"json-configurations",name:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.tabs.jsonConfigurations",{defaultMessage:"JSON configurations"})}];return Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiSpacer,null),e&&Object(y.jsx)(i.a.Fragment,null,Object(y.jsx)(S.EuiCallOut,{color:"danger",iconType:"error",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.missingPipeline.title",{defaultMessage:"Custom pipeline missing"})},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.missingPipeline.description",{defaultMessage:"The custom pipeline for this index has been deleted. This may affect connector data ingestion. Its configuration will need to be reverted to the default pipeline settings."})),Object(y.jsx)(S.EuiButton,{color:"danger",fill:!0,onClick:()=>p({indexName:u})},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.missingPipeline.buttonLabel",{defaultMessage:"Revert pipeline to default"}))),Object(y.jsx)(S.EuiSpacer,null)),Object(y.jsx)(ko,null),Object(y.jsx)(S.EuiFlexGroup,{direction:"row",wrap:!0},Object(y.jsx)(S.EuiFlexItem,{grow:5},Object(y.jsx)(Hr.a,{hasBorder:!0,footerDocLink:Object(y.jsx)(S.EuiLink,{href:k.a.ingestPipelines,target:"_blank",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.docLink",{defaultMessage:"Learn more about using pipelines in Search"})),title:Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.title",{defaultMessage:"Ingest Pipelines"})),subtitle:g?N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.apiIndexSubtitle",{defaultMessage:"Ingest pipelines optimize your index for search applications. If you'd like to use these pipelines in your API-based index, you'll need to reference them explicitly in your API requests."}):N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.subtitle",{defaultMessage:"Ingest pipelines optimize your index for search applications"}),iconType:"logstashInput",action:n?Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"xs",justifyContent:"center"},Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiBadge,{color:"success"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.customBadge",{defaultMessage:"Custom"}))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Qo,null))):Object(y.jsx)(S.EuiBadge,null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestionPipeline.defaultBadge",{defaultMessage:"Default"}))},Object(y.jsx)(Uo,{extractionDisabled:j})),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(Hr.a,{hasBorder:!0,footerDocLink:Object(y.jsx)(S.EuiLink,{href:k.a.deployTrainedModels,target:"_blank",color:"subdued"},N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.mlInferencePipelines.docLink",{defaultMessage:"Learn more about deploying Machine Learning models in Elastic"})),title:Object(y.jsx)("h2",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.mlInferencePipelines.title",{defaultMessage:"Machine Learning Inference Pipelines"})),subtitle:g&&n?N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.mlInferencePipelines.subtitleAPIindex",{defaultMessage:"Inference pipelines will be run as processors from the Search Ingest Pipeline. In order to use these pipelines on API-based indices you'll need to reference the {pipelineName} pipeline in your API requests.",values:{pipelineName:l}}):N.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.mlInferencePipelines.subtitle",{defaultMessage:"Inference pipelines will be run as processors from the Search Ingest Pipeline"}),iconType:"compute"},Object(y.jsx)(qu,null))),Object(y.jsx)(S.EuiFlexItem,{grow:5},Object(y.jsx)(S.EuiPanel,{color:"subdued"},Object(y.jsx)(S.EuiTabbedContent,{tabs:x,initialSelectedTab:x[0],autoFocus:"selected"})))),Object(y.jsx)(ho,null),t&&Object(y.jsx)(Fu,{onClose:o}),s&&Object(y.jsx)(S.EuiConfirmModal,{title:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.deleteModal.title",{defaultMessage:"Delete custom pipeline"}),isLoading:d===$.a.LOADING,onCancel:c,onConfirm:()=>p({indexName:u}),cancelButtonText:zt.e,confirmButtonText:N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.deleteModal.confirmButton",{defaultMessage:"Delete pipeline"}),buttonColor:"danger"},Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.index.pipelines.deleteModal.description",{defaultMessage:"This will delete any custom pipelines associated with this index, including machine learning inference pipelines. The index will revert to using the default ingest pipeline."}))))};let id;!function(e){e.OVERVIEW="overview",e.DOCUMENTS="documents",e.INDEX_MAPPINGS="index_mappings",e.PIPELINES="pipelines",e.CONFIGURATION="configuration",e.SYNC_RULES="sync_rules",e.SCHEDULING="scheduling",e.DOMAIN_MANAGEMENT="domain_management",e.CRAWLER_CONFIGURATION="crawler_configuration"}(id||(id={}));const sd=()=>{const{hasFilteringFeature:e,index:t,isInitialLoading:n}=Object(r.useValues)(fn),{tabId:l=id.OVERVIEW}=Object(s.useParams)(),{indexName:o}=Object(r.useValues)(un),{errorConnectingMessage:c}=Object(r.useValues)(d.a),{config:g,guidedOnboarding:j,productAccess:{hasAppSearchAccess:x},productFeatures:{hasDefaultIngestPipeline:M}}=Object(r.useValues)(p.a),h=$t()(j.guidedOnboardingApi.isGuideStepActive$("appSearch","add_data")),m=$t()(j.guidedOnboardingApi.isGuideStepActive$("websiteSearch","add_data")),f=$t()(j.guidedOnboardingApi.isGuideStepActive$("databaseSearch","add_data"));Object(a.useEffect)((()=>{var e;if(h&&null!=t&&t.count)null===(e=j.guidedOnboardingApi)||void 0===e||e.completeGuideStep("appSearch","add_data");else if(m&&null!=t&&t.count){var n;null===(n=j.guidedOnboardingApi)||void 0===n||n.completeGuideStep("websiteSearch","add_data")}else if(f&&null!=t&&t.count){var a;null===(a=j.guidedOnboardingApi)||void 0===a||a.completeGuideStep("databaseSearch","add_data")}}),[h,m,f,null==t?void 0:t.count]);const b=[{content:Object(y.jsx)(go,null),"data-test-subj":"entSearchContent-index-overview-tab",id:id.OVERVIEW,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.overviewTabLabel",{defaultMessage:"Overview"})},{content:Object(y.jsx)(Cr,null),id:id.DOCUMENTS,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.documentsTabLabel",{defaultMessage:"Documents"})},{content:Object(y.jsx)(kr,null),id:id.INDEX_MAPPINGS,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.indexMappingsTabLabel",{defaultMessage:"Index mappings"})}],I=[{content:Object(y.jsx)(ha,null),id:id.CONFIGURATION,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.configurationTabLabel",{defaultMessage:"Configuration"})},...e?[{content:Object(y.jsx)(Oi,null),id:id.SYNC_RULES,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.syncRulesTabLabel",{defaultMessage:"Sync rules"})}]:[],{content:Object(y.jsx)(Xa,null),id:id.SCHEDULING,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.schedulingTabLabel",{defaultMessage:"Scheduling"})}],E=[{content:Object(y.jsx)(sr,null),id:id.DOMAIN_MANAGEMENT,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.domainManagementTabLabel",{defaultMessage:"Manage Domains"})},{content:Object(y.jsx)(qi,null),id:id.CRAWLER_CONFIGURATION,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.crawlerConfigurationTabLabel",{defaultMessage:"Configuration"})},{content:Object(y.jsx)(Ti,null),"data-test-subj":"entSearchContent-index-crawler-scheduler-tab",id:id.SCHEDULING,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.schedulingTabLabel",{defaultMessage:"Scheduling"})}],D={content:Object(y.jsx)(ad,null),id:id.PIPELINES,name:N.i18n.translate("xpack.enterpriseSearch.content.searchIndex.pipelinesTabLabel",{defaultMessage:"Pipelines"})},T=[...b,...Object(G.h)(t)?I:[],...Object(G.j)(t)?E:[],...M?[D]:[]],w=T.find((e=>e.id===l));return Object(y.jsx)(O,{pageChrome:[...fe,o],pageViewTelemetry:l,isLoading:n,pageHeader:{pageTitle:o,rightSideItems:Ln(t,x)}},Object(G.j)(t)&&!t.connector?Object(y.jsx)(or,null):!Object(G.j)(t)||!Boolean(c)&&g.host?Object(y.jsx)(i.a.Fragment,null,o===(null==t?void 0:t.name)&&Object(y.jsx)(S.EuiTabbedContent,{tabs:T,selectedTab:w,onTabClick:e=>{p.a.values.navigateToUrl(Object(je.a)(e.id===id.OVERVIEW?C.l:C.n,{indexName:o,tabId:e.id}))}}),Object(G.j)(t)&&Object(y.jsx)(Gi,null)):Object(y.jsx)(u.b,null))},rd=Object(r.kea)({connect:{actions:[Ft,["apiSuccess","makeRequest"]],values:[Ft,["status"]]},listeners:{apiSuccess:({indexName:e})=>{p.a.values.navigateToUrl(Object(je.a)(C.n,{indexName:e,tabId:id.OVERVIEW}))}},path:["enterprise_search","method_api"]}),ld=()=>{const{makeRequest:e}=Object(r.useActions)(rd),{status:t}=Object(r.useValues)(rd);return Object(y.jsx)(Bt,{type:"api",buttonLoading:t===$.a.LOADING,onSubmit:(t,n)=>e({indexName:t,language:n})})},od=Object(V.a)(["enterprise_search_content","fetch_cloud_health_api_logic"],(async()=>await d.a.values.http.get("/internal/enterprise_search/stats/cloud_health")));let cd;!function(e){e.ANALYTICS_COLLECTION_ALREADY_EXISTS="analytics_collection_already_exists",e.ANALYTICS_COLLECTION_NOT_FOUND="analytics_collection_not_found",e.CONNECTOR_DOCUMENT_ALREADY_EXISTS="connector_document_already_exists",e.CRAWLER_ALREADY_EXISTS="crawler_already_exists",e.DOCUMENT_NOT_FOUND="document_not_found",e.INDEX_ALREADY_EXISTS="index_already_exists",e.INDEX_NOT_FOUND="index_not_found",e.MAPPING_UPDATE_FAILED="mapping_update_failed",e.PARAMETER_CONFLICT="parameter_conflict",e.PIPELINE_ALREADY_EXISTS="pipeline_already_exists",e.PIPELINE_IS_IN_USE="pipeline_is_in_use",e.PIPELINE_NOT_FOUND="pipeline_not_found",e.RESOURCE_NOT_FOUND="resource_not_found",e.SEARCH_APPLICATION_ALREADY_EXISTS="search_application_already_exists",e.SEARCH_APPLICATION_NAME_INVALID="search_application_name_invalid",e.SEARCH_APPLICATION_NOT_FOUND="search_application_not_found",e.SEARCH_APPLICATION_ALIAS_NOT_FOUND="search_application_alias_not_found",e.UNAUTHORIZED="unauthorized",e.UNCAUGHT_EXCEPTION="uncaught_exception"}(cd||(cd={}));const ud=e=>{var t,n,a,i,s,r,l;if(e)return(null===(t=e.body)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.error_code)===cd.INDEX_ALREADY_EXISTS?N.i18n.translate("xpack.enterpriseSearch.content.newIndex.steps.buildConnector.error.indexAlreadyExists",{defaultMessage:"This index already exists"}):(null===(a=e.body)||void 0===a||null===(i=a.attributes)||void 0===i?void 0:i.error_code)===cd.CONNECTOR_DOCUMENT_ALREADY_EXISTS||(null===(s=e.body)||void 0===s||null===(r=s.attributes)||void 0===r?void 0:r.error_code)===cd.CRAWLER_ALREADY_EXISTS?N.i18n.translate("xpack.enterpriseSearch.content.newIndex.steps.buildConnector.error.connectorAlreadyExists",{defaultMessage:"A connector for this index already exists"}):403===(null==e||null===(l=e.body)||void 0===l?void 0:l.statusCode)?N.i18n.translate("xpack.enterpriseSearch.content.newIndex.steps.buildConnector.error.unauthorizedError",{defaultMessage:"You are not authorized to create this connector"}):N.i18n.translate("xpack.enterpriseSearch.content.newIndex.steps.buildConnector.error.genericError",{defaultMessage:"We were not able to create your index"})};var dd=n(77);const pd=Object(r.kea)({actions:{setIsModalVisible:e=>({isModalVisible:e})},connect:{actions:[_t,["apiError","apiSuccess"]]},listeners:{apiSuccess:async({indexName:e},t)=>{await t(1e3),p.a.values.navigateToUrl(Object(dd.a)(C.n,{indexName:e,tabId:id.CONFIGURATION}))}},path:["enterprise_search","content","add_connector"],reducers:{isModalVisible:[!1,{apiError:(e,t)=>{var n,a;return(null===(n=t.body)||void 0===n||null===(a=n.attributes)||void 0===a?void 0:a.error_code)===cd.CONNECTOR_DOCUMENT_ALREADY_EXISTS},apiSuccess:()=>!1,setIsModalVisible:(e,{isModalVisible:t})=>t}]}}),gd=({serviceType:e})=>{const{apiReset:t,makeRequest:n}=Object(r.useActions)(_t),{error:i,status:s}=Object(r.useValues)(_t),{isModalVisible:l}=Object(r.useValues)(pd),{setIsModalVisible:o}=Object(r.useActions)(pd),{fullIndexName:c,language:u}=Object(r.useValues)(Yt),{isCloud:d}=Object(r.useValues)(p.a),{hasPlatinumLicense:g}=Object(r.useValues)(Qn.a),j=Boolean(vt.find((t=>t.serviceType===e)))&&d,x=Boolean(Ct.find((t=>t.serviceType===e))),M=j&&!d&&!g,{makeRequest:h}=Object(r.useActions)(od);return Object(a.useEffect)((()=>{d&&h({})}),[d]),Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},M&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(yo.b,{feature:yo.a.NATIVE_CONNECTOR})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Bt,{docsUrl:k.a.connectors,disabled:M,error:ud(i),type:"connector",onNameChange:()=>{t()},onSubmit:(t,a)=>n({indexName:t,isNative:j,language:a,serviceType:e}),buttonLoading:s===$.a.LOADING,isBeta:x}),l&&Object(y.jsx)(S.EuiConfirmModal,{title:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.steps.buildConnector.confirmModal.title",{defaultMessage:"Replace existing connector"}),onCancel:()=>{o(!1)},onConfirm:()=>{n({deleteExistingConnector:!0,indexName:c,isNative:j,language:u,serviceType:e})},cancelButtonText:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.steps.buildConnector.confirmModal.cancelButton.label",{defaultMessage:"Cancel"}),confirmButtonText:N.i18n.translate("xpack.enterpriseSearch.content.newIndex.steps.buildConnector.confirmModal.confirmButton.label",{defaultMessage:"Replace configuration"}),defaultFocusedButton:"confirm"},N.i18n.translate("xpack.enterpriseSearch.content.newIndex.steps.buildConnector.confirmModal.description",{defaultMessage:"A deleted index named {indexName} was originally tied to an existing connector configuration. Would you like to replace the existing connector configuration with a new one?",values:{indexName:c}}))))},jd=Object(r.kea)({connect:{actions:[Rt,["apiError","apiSuccess"]]},listeners:{apiSuccess:({created:e})=>{p.a.values.navigateToUrl(Object(je.a)(C.n,{indexName:e,tabId:id.DOMAIN_MANAGEMENT}))}},path:["enterprise_search","content","method_crawler"]}),xd=()=>{const{status:e}=Object(r.useValues)(Rt),{makeRequest:t}=Object(r.useActions)(Rt),{isCloud:n}=Object(r.useValues)(p.a),{hasPlatinumLicense:a}=Object(r.useValues)(Qn.a),i=!n&&!a;return jd.mount(),Object(y.jsx)(S.EuiFlexGroup,{direction:"column"},i&&Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(yo.b,{feature:yo.a.CRAWLER})),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(Bt,{type:"crawler",onSubmit:(e,n)=>t({indexName:e,language:n}),disabled:i,buttonLoading:e===$.a.LOADING,docsUrl:k.a.crawlerOverview})))};function Md(e,t){switch(e){case j.r.API:return N.i18n.translate("xpack.enterpriseSearch.content.new_index.apiTitle",{defaultMessage:"New search index"});case j.r.CONNECTOR:{const e=Boolean(t)&&wt.find((e=>e.serviceType===t));return e?N.i18n.translate("xpack.enterpriseSearch.content.new_index.connectorTitleWithServiceType",{defaultMessage:"New {name} search index",values:{name:e.name}}):N.i18n.translate("xpack.enterpriseSearch.content.new_index.connectorTitle",{defaultMessage:"New connector search index"})}case j.r.CRAWLER:return N.i18n.translate("xpack.enterpriseSearch.content.new_index.crawlerTitle",{defaultMessage:"Web crawler search index"});default:return N.i18n.translate("xpack.enterpriseSearch.content.new_index.genericTitle",{defaultMessage:"New search index"})}}function hd(e){switch(e){case j.r.API:return N.i18n.translate("xpack.enterpriseSearch.content.new_index.apiDescription",{defaultMessage:"Use the API to programatically add documents to an Elasticsearch index. Start by creating your index."});case j.r.CONNECTOR:return N.i18n.translate("xpack.enterpriseSearch.content.new_index.connectorDescriptionWithServiceType",{defaultMessage:"Use a connector to sync, extract, transform and index data from your data source. Connectors are Elastic integrations that write directly to Elasticsearch indices."});case j.r.CRAWLER:return N.i18n.translate("xpack.enterpriseSearch.content.new_index.crawlerDescription",{defaultMessage:"Use the web crawler to programmatically discover, extract, and index searchable content from websites and knowledge bases."});default:return N.i18n.translate("xpack.enterpriseSearch.content.new_index.defaultDescription",{defaultMessage:"A search index stores your data."})}}const md=()=>{const e=decodeURIComponent(Object(s.useParams)().type),{search:t}=Object(s.useLocation)(),{service_type:n}=Object(Ae.a)(t),a=Array.isArray(n)?n[0]:n||"";return Object(y.jsx)(O,{pageChrome:[...fe,"New search index"],pageViewTelemetry:"New Index",isLoading:!1,pageHeader:{description:hd(e),pageTitle:Object(y.jsx)(S.EuiFlexGroup,null,Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:we(e),size:"xxl"})),Object(y.jsx)(S.EuiFlexItem,null,Md(e,a)))}},Object(y.jsx)(i.a.Fragment,null,e===j.r.CRAWLER&&Object(y.jsx)(xd,null),e===j.r.API&&Object(y.jsx)(ld,null),e===j.r.CONNECTOR&&Object(y.jsx)(gd,{serviceType:a})))};n(553);const fd=({disabled:e,documentationUrl:t,icon:n,isBeta:i,isTechPreview:s,showNativeBadge:r,name:l,serviceType:o,...c})=>{const[u,d]=Object(a.useState)(!1);return Object(y.jsx)(S.EuiCheckableCard,m()({},c,{disabled:e,id:`checkableCard-${o}`,className:"connectorCheckable","data-telemetry-id":`entSearchContent-connector-selectConnector-${o}-select`,label:Object(y.jsx)(S.EuiFlexGroup,{alignItems:"center",gutterSize:"s",responsive:!1},n&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiIcon,{type:n})),Object(y.jsx)(S.EuiFlexItem,{grow:!1},e?Object(y.jsx)(S.EuiText,{color:"disabledText",size:"xs"},Object(y.jsx)("h3",null,l)):Object(y.jsx)(S.EuiTitle,{size:"xs"},Object(y.jsx)("h2",null,l))),e&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(Yn,{button:Object(y.jsx)(S.EuiButtonIcon,{"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.newIndex.selectConnector.openPopoverLabel",{defaultMessage:"Open licensing popover"}),iconType:"questionInCircle",onClick:()=>d(!u)}),closePopover:()=>d(!1),isPopoverOpen:u}))),name:l,value:o}),Object(y.jsx)(S.EuiFlexGroup,{direction:"column",gutterSize:"xs"},t&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiLink,{target:"_blank",href:t},N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.connectorCheckable.documentationLinkLabel",{defaultMessage:"Documentation"}))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFlexGroup,{direction:"row",gutterSize:"s",justifyContent:"flexStart",responsive:!1},r&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiBadge,{isDisabled:e},Object(y.jsx)(S.EuiText,{size:"xs"},zt.v))),i&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiBadge,{color:"hollow",isDisabled:e},Object(y.jsx)(S.EuiText,{size:"xs"},zt.d))),s&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiBadge,{color:"hollow",iconType:"beaker",isDisabled:e},Object(y.jsx)(S.EuiText,{size:"xs"},N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.connectorCheckable.techPreviewLabel",{defaultMessage:"Tech preview"}))))))))},bd=()=>{const{search:e}=Object(s.useLocation)(),{isCloud:t}=Object(r.useValues)(p.a),{hasPlatinumLicense:n}=Object(r.useValues)(Qn.a),i=t,{service_type:l}=Object(Ae.a)(e),[o,c]=Object(a.useState)(!1),[u,d]=Object(a.useState)(!0),[g,x]=Object(a.useState)(""),M=Object(a.useMemo)((()=>[...i?wt.filter((e=>e.isNative)).sort(((e,t)=>e.name.localeCompare(t.name))):[],...i?wt.filter((e=>!e.isNative)).sort(((e,t)=>e.name.localeCompare(t.name))):wt.sort(((e,t)=>e.name.localeCompare(t.name)))].filter((e=>!!u||!e.isBeta&&!e.isTechPreview)).filter((e=>!o||e.isNative)).filter((e=>!g||e.name.toLowerCase().includes(g.toLowerCase())))),[u,o,g]),[h,m]=Object(a.useState)(Array.isArray(l)?l[0]:null!=l?l:null);return Object(y.jsx)(O,{pageChrome:[...fe,"Select connector"],pageViewTelemetry:"select_connector",isLoading:!1,pageHeader:{description:N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.description",{defaultMessage:"Choose which third-party data source you'd like to sync to Elastic."}),pageTitle:N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.title",{defaultMessage:"Select a connector"})}},Object(y.jsx)(S.EuiForm,{component:"form",onSubmit:e=>{e.preventDefault(),p.a.values.navigateToUrl(`${Object(je.a)(C.f,{type:j.r.CONNECTOR})}?service_type=${h}`)}},Object(y.jsx)(S.EuiFormFieldset,{legend:{children:Object(y.jsx)(S.EuiCallOut,{size:"m",title:N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.callout.title",{defaultMessage:"Elastic connectors"}),iconType:"iInCircle"},Object(y.jsx)("p",null,Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.selectConnector.description.textcloud",defaultMessage:"{native} are available directly within Elastic Cloud deployments. No additional infrastructure is required. {learnMore}",values:{learnMore:Object(y.jsx)(S.EuiLink,{target:"_blank",href:k.a.connectorsNative},zt.q),native:Object(y.jsx)("b",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.callout.description.native",{defaultMessage:"Native connectors"}))}}),Object(y.jsx)("br",null),Object(y.jsx)("br",null),Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.indices.selectConnector.description.selfManaged.text",defaultMessage:"Deploy connectors on your own infrastructure as {connectorsClient}. You can also customize existing connector clients, or build your own using our connector framework. {learnMore}",values:{connectorsClient:Object(y.jsx)("b",null,N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.callout.description.connectorsClient",{defaultMessage:"connector clients"})),learnMore:Object(y.jsx)(S.EuiLink,{target:"_blank",href:k.a.connectorsClients},zt.q)}})))}},Object(y.jsx)(S.EuiFlexGroup,null,i&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)(S.EuiFacetGroup,null,Object(y.jsx)(S.EuiFacetButton,{quantity:wt.length,isSelected:!o,onClick:()=>c(!o)},N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.allConnectorsLabel",{defaultMessage:"All connectors"})),Object(y.jsx)(S.EuiFacetButton,{quantity:wt.filter((e=>e.isNative)).length,isSelected:o,onClick:()=>c(!o)},N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.nativeLabel",{defaultMessage:"Native connectors"})))),Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiFieldSearch,{"aria-label":N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.search.ariaLabel",{defaultMessage:"Search through connectors"}),isClearable:!0,onChange:e=>x(e.target.value),placeholder:N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.searchPlaceholder",{defaultMessage:"Search"}),value:g}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiSwitch,{checked:u,label:N.i18n.translate("xpack.enterpriseSearch.content.indices.selectConnector.showNonGALabel",{defaultMessage:"Display Beta and Tech Preview connectors"}),onChange:e=>d(e.target.checked)}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(S.EuiFlexGrid,{columns:3},M.map((e=>Object(y.jsx)(S.EuiFlexItem,{key:e.serviceType,grow:!0},Object(y.jsx)(fd,{disabled:e.platinumOnly&&!(n||t),icon:e.icon,isBeta:e.isBeta,isTechPreview:Boolean(e.isTechPreview),showNativeBadge:e.isNative&&i,name:e.name,serviceType:e.serviceType,onChange:()=>{m(e.serviceType)},documentationUrl:e.docsUrl,checked:h===e.serviceType}))))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)("span",null,Object(y.jsx)(S.EuiButton,{"data-telemetry-id":"entSearchContent-connector-selectConnector-backButton",color:"primary",onClick:()=>p.a.values.navigateToUrl(C.g)},zt.c))),Object(y.jsx)(S.EuiFlexItem,{grow:!1},Object(y.jsx)("span",null,Object(y.jsx)(S.EuiButton,{"data-test-subj":"entSearchContent-connector-selectConnector-selectAndConfigure","data-telemetry-id":"entSearchContent-connector-selectConnector-selectAndConfigure",disabled:null===h,fill:!0,color:"primary",type:"submit"},zt.g)))))))))},yd=()=>Object(y.jsx)(l.c,null,Object(y.jsx)(l.a,{path:C.g,exact:!0},Object(y.jsx)(ke,null)),Object(y.jsx)(l.a,{path:C.h,exact:!0},Object(y.jsx)(bd,null)),Object(y.jsx)(l.a,{path:C.f,exact:!0},Object(y.jsx)(md,null))),Od=()=>{const e=decodeURIComponent(Object(s.useParams)().indexName),{setIndexName:t}=Object(r.useActions)(un),{stopFetchIndexPoll:n}=Object(r.useActions)(fn);return Object(a.useEffect)((()=>{const e=un.mount(),t=fn.mount();return()=>{n(),e(),t()}}),[]),Object(a.useEffect)((()=>{t(e)}),[e]),Object(y.jsx)(l.c,null,Object(y.jsx)(l.a,{path:C.l,exact:!0},Object(y.jsx)(sd,null)),Object(y.jsx)(l.a,{path:C.m},Object(y.jsx)(sd,null)),Object(y.jsx)(l.a,{path:C.n},Object(y.jsx)(sd,null)),Object(y.jsx)(s.Redirect,{from:C.i,to:`${C.l}/domain_management/:domainId}`}))},Id=()=>Object(y.jsx)(l.c,null,Object(y.jsx)(l.a,{path:C.g},Object(y.jsx)(yd,null)),Object(y.jsx)(l.a,{exact:!0,path:C.o},Object(y.jsx)(be,null)),Object(y.jsx)(l.a,{path:C.l},Object(y.jsx)(Od,null)));var Sd=n(170);const Nd=Object(V.a)(["content","update_default_pipeline_api_logic"],(async e=>(await d.a.values.http.put("/internal/enterprise_search/connectors/default_pipeline",{body:JSON.stringify(e)}),e)),{showSuccessFlashFn:()=>N.i18n.translate("xpack.enterpriseSearch.content.indices.defaultPipelines.successToast.title",{defaultMessage:"Default pipeline successfully updated"})}),Ed=Object(r.kea)({actions:{setPipeline:e=>({pipeline:e})},connect:{actions:[Nd,["apiSuccess","apiError","makeRequest"],Io,["apiError as fetchDefaultPipelineError","apiSuccess as fetchDefaultPipelineSuccess","makeRequest as fetchDefaultPipeline"]],values:[Io,["data as defaultPipeline","status as fetchStatus"],Nd,["status"]]},events:({actions:e})=>({afterMount:()=>{!1!==p.a.values.productFeatures.hasDefaultIngestPipeline&&e.fetchDefaultPipeline(void 0)}}),listeners:({actions:e})=>({apiSuccess:t=>{e.fetchDefaultPipelineSuccess(t)},fetchDefaultPipelineSuccess:t=>{e.setPipeline(t)}}),path:["enterprise_search","content","settings"],reducers:()=>({pipelineState:[j.f,{setPipeline:(e,{pipeline:t})=>t}],showModal:[!1,{apiSuccess:()=>!1,closeModal:()=>!1,openModal:()=>!0}]}),selectors:({selectors:e})=>({hasNoChanges:[()=>[e.pipelineState,e.defaultPipeline],(e,t)=>Object(Sd.isDeepEqual)(e,t)],isLoading:[()=>[e.status,e.fetchStatus],(e,t)=>[$.a.LOADING,$.a.IDLE].includes(t)||e===$.a.LOADING]})}),Dd=({description:e,label:t,link:n,onChange:a,title:i,value:s})=>Object(y.jsx)(S.EuiSplitPanel.Outer,{hasBorder:!0,grow:!0},Object(y.jsx)(S.EuiSplitPanel.Inner,null,Object(y.jsx)(S.EuiText,{size:"m"},Object(y.jsx)("h4",null,Object(y.jsx)("strong",null,i))),Object(y.jsx)(S.EuiSpacer,null),Object(y.jsx)(S.EuiText,{size:"s"},Object(y.jsx)("p",null,e),Object(y.jsx)("p",null,N.i18n.translate("xpack.enterpriseSearch.content.settings.contentExtraction.descriptionTwo",{defaultMessage:"You can also enable or disable this feature for a specific index on the index’s configuration page."})))),Object(y.jsx)(S.EuiSplitPanel.Inner,{grow:!1,color:"subdued"},Object(y.jsx)(S.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(y.jsx)(S.EuiFlexItem,null,Object(y.jsx)(S.EuiSwitch,{checked:s,label:t,onChange:a})),n&&Object(y.jsx)(S.EuiFlexItem,{grow:!1},n)))),Td=()=>{const{makeRequest:e,setPipeline:t}=Object(r.useActions)(Ed),{defaultPipeline:n,hasNoChanges:a,isLoading:i,pipelineState:s}=Object(r.useValues)(Ed),{extract_binary_content:l,reduce_whitespace:o,run_ml_inference:c}=s;return Object(y.jsx)(O,{pageChrome:[N.i18n.translate("xpack.enterpriseSearch.content.settings.breadcrumb",{defaultMessage:"Settings"})],pageHeader:{description:Object(y.jsx)(E.FormattedMessage,{id:"xpack.enterpriseSearch.content.settings.description",defaultMessage:"These settings apply to all new Elasticsearch indices created by Search ingestion mechanisms. For API ingest-based indices, remember to include the pipeline when you ingest documents. These features are powered by {link}.",values:{link:Object(y.jsx)(S.EuiLink,{href:k.a.ingestPipelines,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.settings.ingestLink",{defaultMessage:"ingest pipelines"}))}}),pageTitle:N.i18n.translate("xpack.enterpriseSearch.content.settings.headerTitle",{defaultMessage:"Content Settings"}),rightSideItems:[Object(y.jsx)(S.EuiButton,{fill:!0,disabled:a,isLoading:i,onClick:()=>e(s)},N.i18n.translate("xpack.enterpriseSearch.content.settings.saveButtonLabel",{defaultMessage:"Save"})),Object(y.jsx)(S.EuiButton,{disabled:a,isLoading:i,onClick:()=>t(n)},N.i18n.translate("xpack.enterpriseSearch.content.settings.resetButtonLabel",{defaultMessage:"Reset"}))]},pageViewTelemetry:"Settings",isLoading:!1},Object(y.jsx)(Dd,{description:N.i18n.translate("xpack.enterpriseSearch.content.settings.contentExtraction.description",{defaultMessage:"Extract searchable content from binary files, like PDFs and Word documents."}),label:N.i18n.translate("xpack.enterpriseSearch.content.settings.contactExtraction.label",{defaultMessage:"Content extraction"}),onChange:()=>t({...s,extract_binary_content:!s.extract_binary_content}),title:N.i18n.translate("xpack.enterpriseSearch.content.settings.contentExtraction.title",{defaultMessage:"Deployment wide content extraction"}),value:l}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(Dd,{description:N.i18n.translate("xpack.enterpriseSearch.content.settings.whiteSpaceReduction.description",{defaultMessage:"Whitespace reduction will strip your full-text content of whitespace by default."}),label:N.i18n.translate("xpack.enterpriseSearch.content.settings.whitespaceReduction.label",{defaultMessage:"Whitespace reduction"}),onChange:()=>t({...s,reduce_whitespace:!s.reduce_whitespace}),title:N.i18n.translate("xpack.enterpriseSearch.content.settings.whitespaceReduction.deploymentHeaderTitle",{defaultMessage:"Deployment wide whitespace reduction"}),value:o}),Object(y.jsx)(S.EuiSpacer,{size:"s"}),Object(y.jsx)(Dd,{description:N.i18n.translate("xpack.enterpriseSearch.content.settings.mlInference.description",{defaultMessage:"ML Inference Pipelines will run as part of your pipelines. You will have to configure processors for each index individually on its pipelines page."}),label:N.i18n.translate("xpack.enterpriseSearch.content.settings.mlInference.label",{defaultMessage:"ML Inference"}),link:Object(y.jsx)(S.EuiLink,{href:k.a.mlDocumentEnrichment,target:"_blank"},N.i18n.translate("xpack.enterpriseSearch.content.settings.mlInference.link",{defaultMessage:"Learn more about document enrichment with ML"})),onChange:()=>t({...s,run_ml_inference:!s.run_ml_inference}),title:N.i18n.translate("xpack.enterpriseSearch.content.settings.mlInference.deploymentHeaderTitle",{defaultMessage:"Deployment wide ML Inference Pipelines extraction"}),value:c}))},wd=e=>{const{config:t}=Object(r.useValues)(p.a),{errorConnectingMessage:n}=Object(r.useValues)(d.a),{enterpriseSearchVersion:a,kibanaVersion:i}=e,j=Object(o.a)(a,i);return Object(y.jsx)(l.c,null,Object(y.jsx)(l.a,{exact:!0,path:C.q},Object(y.jsx)(c.a,null)),Object(y.jsx)(l.a,{exact:!0,path:C.b},t.host&&t.canDeployEntSearch&&n?Object(y.jsx)(u.b,null):Object(y.jsx)(s.Redirect,{to:C.o})),Object(y.jsx)(l.a,null,t.host&&t.canDeployEntSearch&&j?Object(y.jsx)(g.a,{enterpriseSearchVersion:a,kibanaVersion:i}):Object(y.jsx)(vd,e)))},vd=()=>Object(y.jsx)(l.c,null,Object(y.jsx)(s.Redirect,{exact:!0,from:C.j,to:C.o}),Object(y.jsx)(l.a,{path:C.o},Object(y.jsx)(Id,null)),Object(y.jsx)(l.a,{path:C.p},Object(y.jsx)(Td,null)),Object(y.jsx)(l.a,null,Object(y.jsx)(I,null)))},103:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var a=n(41),i=n.n(a),s=(n(10),n(32)),r=n(117),l=n(38),o=n(69),c=n(33),u=n(97);const d=Object(s.kea)({path:e=>["enterprise_search","generic_endpoint_inline_editable_table_logic",e],key:e=>e.instanceId,actions:()=>({addItem:(e,t)=>({item:e,onSuccess:t}),setLoading:!0,clearLoading:!0,deleteItem:(e,t)=>({item:e,onSuccess:t}),reorderItems:(e,t,n)=>({items:e,oldItems:t,onSuccess:n}),updateItem:(e,t)=>({item:e,onSuccess:t})}),reducers:()=>({isLoading:[!1,{addItem:()=>!0,setLoading:()=>!0,clearLoading:()=>!1,deleteItem:()=>!0,updateItem:()=>!0}]}),listeners:({actions:e,props:t})=>({addItem:async({item:n,onSuccess:a})=>{const{http:i}=c.a.values,{addRoute:s,onAdd:r,dataProperty:l}=t;try{r(n,(await i.post(s,{body:JSON.stringify(n)}))[l]),a()}catch(e){const n=Object(o.c)(e);Object(u.a)({instanceId:t.instanceId}).actions.setRowErrors(n)}finally{e.clearLoading()}},deleteItem:async({item:n,onSuccess:a})=>{const{http:i}=c.a.values,{deleteRoute:s,onDelete:r,dataProperty:l}=t;try{r(n,(await i.delete(s(n)))[l]),a()}catch(e){const n=Object(o.c)(e);Object(u.a)({instanceId:t.instanceId}).actions.setRowErrors(n)}finally{e.clearLoading()}},updateItem:async({item:n,onSuccess:a})=>{const{http:i}=c.a.values,{updateRoute:s,onUpdate:r,dataProperty:l}=t,d=(e=>{const t={...e};return delete t.id,delete t.created_at,t})(n);try{r(n,(await i.put(s(n),{body:JSON.stringify(d)}))[l]),a()}catch(e){const n=Object(o.c)(e);Object(u.a)({instanceId:t.instanceId}).actions.setRowErrors(n)}finally{e.clearLoading()}},reorderItems:async({items:n,oldItems:a,onSuccess:i})=>{const{reorderRoute:s,onReorder:r,dataProperty:o}=t;if(!s||!r)return;const{http:u}=c.a.values,d=n.map((({id:e},t)=>({id:e,order:t})));r(n);try{e.setLoading();r((await u.put(s,{body:JSON.stringify({[o]:d})}))[o]),i()}catch(e){r(a),Object(l.l)(e)}e.clearLoading()}})});var p=n(11);const g=({addRoute:e,dataProperty:t,deleteRoute:n,reorderRoute:a,updateRoute:l,onAdd:o,onDelete:c,onReorder:u,onUpdate:g,...j})=>{const{instanceId:x}=j,M=d({dataProperty:t,instanceId:x,addRoute:e,deleteRoute:n,reorderRoute:a,updateRoute:l,onAdd:o,onDelete:c,onReorder:u,onUpdate:g}),{isLoading:h}=Object(s.useValues)(M),{addItem:m,deleteItem:f,reorderItems:b,updateItem:y}=Object(s.useActions)(M);return Object(p.jsx)(r.a,i()({},j,{isLoading:h,onAdd:m,onDelete:f,onReorder:b,onUpdate:y}))}},107:function(e,t,n){"use strict";let a,i;n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i})),function(e){e.CONNECTOR="connector",e.CRAWLER="crawler",e.API="api"}(a||(a={})),function(e){e[e.CONFIGURED=0]="CONFIGURED",e[e.CONNECTED=1]="CONNECTED",e[e.ERROR=2]="ERROR",e[e.SYNC_ERROR=3]="SYNC_ERROR",e[e.INCOMPLETE=4]="INCOMPLETE"}(i||(i={}))},110:function(e,t,n){e.exports=n(6)(3711)},111:function(e,t,n){e.exports=n(6)(190)},126:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(10),i=n.n(a),s=n(12),r=n(2),l=n(11);const o=({emptyMessage:e,options:t,selectedOptions:n,onChange:a})=>{const o=n.reduce(((e,t)=>({...e,[t]:!0})),{}),c=t.map((e=>({label:e,checked:o[e]?"on":void 0})));return Object(l.jsx)(i.a.Fragment,null,Object(l.jsx)(s.EuiFlexGroup,{justifyContent:"flexEnd",gutterSize:"s"},Object(l.jsx)(s.EuiFlexItem,{grow:!1},Object(l.jsx)(s.EuiButtonEmpty,{"data-test-subj":"SelectAllButton",iconType:"check",onClick:()=>a(t),disabled:n.length===t.length},r.i18n.translate("xpack.enterpriseSearch.appSearch.crawler.simplifiedSelectable.selectAllButtonLabel",{defaultMessage:"Select all"}))),Object(l.jsx)(s.EuiFlexItem,{grow:!1},Object(l.jsx)(s.EuiButtonEmpty,{"data-test-subj":"DeselectAllButton",iconType:"cross",onClick:()=>a([]),disabled:0===n.length},r.i18n.translate("xpack.enterpriseSearch.appSearch.crawler.simplifiedSelectable.deselectAllButtonLabel",{defaultMessage:"Deselect all"})))),Object(l.jsx)(s.EuiSelectable,{searchable:!0,options:c,listProps:{bordered:!0},onChange:e=>{a(e.filter((e=>e.checked)).map((e=>e.label)))},emptyMessage:e},((e,t)=>Object(l.jsx)(i.a.Fragment,null,t,e))))}},127:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n(10);var a=n(13),i=n(80),s=n(11);const r=({timestamp:e})=>{const t=new Date(e);return t>=new Date(new Date(Date.now()).toDateString())?Object(s.jsx)(a.FormattedRelative,{value:t}):Object(s.jsx)(i.a,{date:t,hideTime:!0})}},128:function(e,t,n){e.exports=n(6)(2943)},129:function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(128).Buffer)},143:function(e,t,n){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,a,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,r,l=arguments.length;switch(l){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,a)}));case 4:return t.nextTick((function(){e.call(null,n,a,i)}));default:for(s=new Array(l-1),r=0;r{const n=t=>window.localStorage.setItem(e,JSON.stringify(t)),i=(()=>{const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(t){window.localStorage.removeItem(e)}})();i||n(t);const s=i||t,[r,l]=Object(a.useState)(s);return[r,e=>{n(e),l(e)}]}},177:function(e,t,n){e.exports=n.p+"b3b7cd460cb2d96149d1a80b249d186b.svg"},178:function(e,t,n){"use strict";function a(e){return null!=e}n.d(t,"a",(function(){return a}))},179:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(180);case"v8light":return n(182)}},180:function(e,t,n){var a=n(34),i=n(181);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},181:function(e,t,n){(t=n(35)(!1)).push([e.i,".urlComboBox .euiComboBox__inputWrap{min-height:60px}",""]),e.exports=t},182:function(e,t,n){var a=n(34),i=n(183);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},183:function(e,t,n){(t=n(35)(!1)).push([e.i,".urlComboBox .euiComboBox__inputWrap{min-height:60px}",""]),e.exports=t},184:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(509);case"v8light":return n(511)}},185:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n(10);var a=n(12),i=(n(186),n(11));const s=({hasBorder:e,iconType:t,initialIsOpen:n,items:s,rowCount:r=10,title:l})=>{const o=Object(a.useGeneratedHtmlId)({prefix:"accordionList"}),c=s.length>r;return Object(i.jsx)(a.EuiAccordion,{initialIsOpen:n,arrowProps:{isDisabled:0===s.length},className:e?"appSearchAccordion--bordered":"appSearchAccordion",buttonContent:Object(i.jsx)(a.EuiFlexGroup,{direction:"row",responsive:!1,gutterSize:"s",alignItems:"center"},Object(i.jsx)(a.EuiFlexItem,{grow:!1},Object(i.jsx)(a.EuiIcon,{type:t})),Object(i.jsx)(a.EuiFlexItem,null,Object(i.jsx)(a.EuiTitle,{size:"s"},Object(i.jsx)("h3",null,l)))),id:o,extraAction:Object(i.jsx)(a.EuiNotificationBadge,{color:s.length>0?"accent":"subdued",size:"m"},s.length)},Object(i.jsx)(a.EuiInMemoryTable,{items:s.map((e=>({item:e}))),columns:[{render:({item:e})=>e}],pagination:!!c&&{showPerPageOptions:!1}}),!c&&Object(i.jsx)(a.EuiSpacer,{size:"s"}))}},186:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(187);case"v8light":return n(189)}},187:function(e,t,n){var a=n(34),i=n(188);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},188:function(e,t,n){(t=n(35)(!1)).push([e.i,".appSearchAccordion--bordered{border:1px solid #343741;border-radius:6px;padding:12px}.appSearchAccordion .euiBasicTable .euiTableRow>.euiTableRowCell,.appSearchAccordion--bordered .euiBasicTable .euiTableRow>.euiTableRowCell{border-bottom:none}",""]),e.exports=t},189:function(e,t,n){var a=n(34),i=n(190);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},190:function(e,t,n){(t=n(35)(!1)).push([e.i,".appSearchAccordion--bordered{border:1px solid #d3dae6;border-radius:6px;padding:12px}.appSearchAccordion .euiBasicTable .euiTableRow>.euiTableRowCell,.appSearchAccordion--bordered .euiBasicTable .euiTableRow>.euiTableRowCell{border-bottom:none}",""]),e.exports=t},191:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(192);case"v8light":return n(194)}},192:function(e,t,n){var a=n(34),i=n(193);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},193:function(e,t,n){(t=n(35)(!1)).push([e.i,".dataPanel{overflow:hidden;position:relative}.dataPanel--filled .euiTable{background-color:initial}",""]),e.exports=t},194:function(e,t,n){var a=n(34),i=n(195);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},195:function(e,t,n){(t=n(35)(!1)).push([e.i,".dataPanel{overflow:hidden;position:relative}.dataPanel--filled .euiTable{background-color:initial}",""]),e.exports=t},196:function(e,t,n){"use strict";function a(e){return{pageIndex:e.size?Math.trunc(e.from/e.size):0,pageSize:e.size,totalItemCount:e.total}}n.d(t,"a",(function(){return a}))},197:function(e,t,n){"use strict";var a,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};a=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}e.exports=l,e.exports.once=function(e,t){return new Promise((function(n,a){function i(n){e.removeListener(t,s),a(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}h(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,i)}))},l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var o=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function d(e,t,n,a){var i,s,r,l;if(c(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),r=s[t]),void 0===r)r=s[t]=n,++e._eventsCount;else if("function"==typeof r?r=s[t]=a?[n,r]:[r,n]:a?r.unshift(n):r.push(n),(i=u(e))>0&&r.length>i&&!r.warned){r.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=t,o.count=r.length,l=o,console&&console.warn&&console.warn(l)}return e}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(e,t,n){var a={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=p.bind(a);return i.listener=n,a.wrapFn=i,i}function j(e,t,n){var a=e._events;if(void 0===a)return[];var i=a[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(r=t[0]),r instanceof Error)throw r;var l=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw l.context=r,l}var o=i[e];if(void 0===o)return!1;if("function"==typeof o)s(o,this,t);else{var c=o.length,u=M(o,c);for(n=0;n=0;s--)if(n[s]===t||n[s].listener===t){r=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;a--)this.removeListener(e,t[a]);return this},l.prototype.listeners=function(e){return j(this,e,!0)},l.prototype.rawListeners=function(e){return j(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):x.call(e,t)},l.prototype.listenerCount=x,l.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]}},198:function(e,t,n){(t=e.exports=n(263)).Stream=t,t.Readable=t,t.Writable=n(200),t.Duplex=n(99),t.Transform=n(268),t.PassThrough=n(542)},199:function(e,t,n){var a=n(128),i=a.Buffer;function s(e,t){for(var n in e)t[n]=e[n]}function r(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=a:(s(a,t),t.Buffer=r),s(i,r),r.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},r.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var a=i(e);return void 0!==t?"string"==typeof n?a.fill(t,n):a.fill(t):a.fill(0),a},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.SlowBuffer(e)}},200:function(e,t,n){"use strict";(function(t,a,i){var s=n(143);function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var a=e.entry;for(e.entry=null;a;){var i=a.callback;t.pendingcb--,i(undefined),a=a.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=m;var l,o=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?a:s.nextTick;m.WritableState=h;var c=Object.create(n(129));c.inherits=n(110);var u,d={deprecate:n(540)},p=n(264),g=n(199).Buffer,j=i.Uint8Array||function(){},x=n(265);function M(){}function h(e,t){l=l||n(99),e=e||{};var a=t instanceof l;this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,c=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:a&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,a=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,a,i){--t.pendingcb,n?(s.nextTick(i,a),s.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",a)):(i(a),e._writableState.errorEmitted=!0,e.emit("error",a),S(e,t))}(e,n,a,t,i);else{var r=O(n);r||n.corked||n.bufferProcessing||!n.bufferedRequest||y(e,n),a?o(b,e,n,r,i):b(e,n,r,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function m(e){if(l=l||n(99),!(u.call(m,this)||this instanceof l))return new m(e);this._writableState=new h(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),p.call(this)}function f(e,t,n,a,i,s,r){t.writelen=a,t.writecb=r,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function b(e,t,n,a){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,a(),S(e,t)}function y(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var a=t.bufferedRequestCount,i=new Array(a),s=t.corkedRequestsFree;s.entry=n;for(var l=0,o=!0;n;)i[l]=n,n.isBuf||(o=!1),n=n.next,l+=1;i.allBuffers=o,f(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,d=n.callback;if(f(e,t,!1,t.objectMode?1:c.length,c,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),S(e,t)}))}function S(e,t){var n=O(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,s.nextTick(I,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}c.inherits(m,p),h.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(h.prototype,"buffer",{get:d.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===m&&e&&e._writableState instanceof h}})):u=function(e){return e instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(e,t,n){var a,i=this._writableState,r=!1,l=!i.objectMode&&(a=e,g.isBuffer(a)||a instanceof j);return l&&!g.isBuffer(e)&&(e=function(e){return g.from(e)}(e)),"function"==typeof t&&(n=t,t=null),l?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=M),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),s.nextTick(t,n)}(this,n):(l||function(e,t,n,a){var i=!0,r=!1;return null===n?r=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r&&(e.emit("error",r),s.nextTick(a,r),i=!1),i}(this,i,e,n))&&(i.pendingcb++,r=function(e,t,n,a,i,s){if(!n){var r=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=g.from(t,n)),t}(t,a,i);a!==r&&(n=!0,i="buffer",a=r)}var l=t.objectMode?1:a.length;t.length+=l;var o=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(e,t,n){var a=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||a.finished||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?s.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,a,n)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),m.prototype.destroy=x.destroy,m.prototype._undestroy=x.undestroy,m.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(98),n(266).setImmediate,n(111))},239:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(10),i=n.n(a),s=n(12),r=n(2),l=n(4),o=n(11);const c=()=>Object(o.jsx)(i.a.Fragment,null,Object(o.jsx)(s.EuiTitle,{size:"xs"},Object(o.jsx)("h4",null,r.i18n.translate("xpack.enterpriseSearch.overview.elasticsearchResources.title",{defaultMessage:"Resources"}))),Object(o.jsx)(s.EuiSpacer,{size:"s"}),Object(o.jsx)(s.EuiSpacer,{size:"xs"}),Object(o.jsx)(s.EuiLink,{href:l.a.elasticsearchGettingStarted,target:"_blank"},r.i18n.translate("xpack.enterpriseSearch.overview.elasticsearchResources.gettingStarted",{defaultMessage:"Getting started with Elasticsearch"})),Object(o.jsx)(s.EuiSpacer,{size:"s"}),Object(o.jsx)(s.EuiSpacer,{size:"xs"}),Object(o.jsx)(s.EuiLink,{href:l.a.elasticsearchCreateIndex,target:"_blank"},r.i18n.translate("xpack.enterpriseSearch.overview.elasticsearchResources.createIndex",{defaultMessage:"Create a new index"})),Object(o.jsx)(s.EuiSpacer,{size:"s"}),Object(o.jsx)(s.EuiSpacer,{size:"xs"}),Object(o.jsx)(s.EuiLink,{href:l.a.clientsGuide,target:"_blank"},r.i18n.translate("xpack.enterpriseSearch.overview.elasticsearchResources.elasticsearchClients",{defaultMessage:"Setup a language client"})),Object(o.jsx)(s.EuiSpacer,{size:"s"}),Object(o.jsx)(s.EuiSpacer,{size:"xs"}),Object(o.jsx)(s.EuiLink,{href:"https://github.com/elastic/search-ui/tree/master/packages/search-ui-elasticsearch-connector",target:"_blank"},r.i18n.translate("xpack.enterpriseSearch.overview.elasticsearchResources.searchUi",{defaultMessage:"Search UI for Elasticsearch"})))},240:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n(10);var a=n(32),i=n(12),s=n(2);const r=Object(a.kea)({key:e=>e.id,path:e=>["enterprise_search","url_combo_box",e],actions:()=>({setIsInvalid:e=>({isInvalid:e})}),reducers:()=>({isInvalid:[!1,{setIsInvalid:(e,{isInvalid:t})=>t}]})});n(179);var l=n(11);const o=({label:e,selectedUrls:t,onChange:n})=>{const o=Object(i.useGeneratedHtmlId)(),c=r({id:o}),{isInvalid:u}=Object(a.useValues)(c),{setIsInvalid:d}=Object(a.useActions)(c);return Object(l.jsx)(i.EuiFormRow,{className:"urlComboBox",fullWidth:!0,label:e,isInvalid:u,error:u?s.i18n.translate("xpack.enterpriseSearch.crawler.urlComboBox.invalidUrlErrorMessage",{defaultMessage:"Please enter a valid URL"}):void 0},Object(l.jsx)(i.EuiComboBox,{fullWidth:!0,noSuggestions:!0,selectedOptions:t.map((e=>({label:e}))),onCreateOption:e=>{if(!(e=>{let t;try{t=new URL(e)}catch(e){return!1}return"http:"===t.protocol||"https:"===t.protocol})(e))return d(!0),!1;d(!1),n([...t,e])},onSearchChange:()=>{d(!1)},onChange:e=>{n(e.map((e=>e.label)))},isInvalid:u}))}},261:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(500);case"v8light":return n(502)}},262:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,i=(a=n(10))&&"object"==typeof a&&"default"in a?a:{default:a},s=e=>"checkbox"===e.type,r=e=>e instanceof Date,l=e=>null==e;const o=e=>"object"==typeof e;var c=e=>!l(e)&&!Array.isArray(e)&&o(e)&&!r(e),u=e=>c(e)&&e.target?s(e.target)?e.target.checked:e.target.value:e,d=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),p="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function g(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(p&&(e instanceof Blob||e instanceof FileList)||!n&&!c(e))return e;if(t=n?[]:{},n||(e=>{const t=e.constructor&&e.constructor.prototype;return c(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=g(e[n]));else t=e}return t}var j=e=>Array.isArray(e)?e.filter(Boolean):[],x=e=>void 0===e,M=(e,t,n)=>{if(!t||!c(e))return n;const a=j(t.split(/[,[\].]+?/)).reduce(((e,t)=>l(e)?e:e[t]),e);return x(a)||a===e?x(e[t])?n:e[t]:a};const h="blur",m="focusout",f="change",b="onChange",y="onSubmit",O="all",I="pattern",S="required",N=i.default.createContext(null),E=()=>i.default.useContext(N);var D=(e,t,n,a=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const i=s;return t._proxyFormState[i]!==O&&(t._proxyFormState[i]=!a||O),n&&(n[i]=!0),e[i]}});return i},T=e=>c(e)&&!Object.keys(e).length,w=(e,t,n,a)=>{n(e);const{name:i,...s}=e;return T(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find((e=>t[e]===(!a||O)))},v=e=>Array.isArray(e)?e:[e],C=(e,t,n)=>n&&t?e===t:!e||!t||e===t||v(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function k(e){const t=i.default.useRef(e);t.current=e,i.default.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}function A(e){const t=E(),{control:n=t.control,disabled:a,name:s,exact:r}=e||{},[l,o]=i.default.useState(n._formState),c=i.default.useRef(!0),u=i.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=i.default.useRef(s);return d.current=s,k({disabled:a,next:e=>c.current&&C(d.current,e.name,r)&&w(e,u.current,n._updateFormState)&&o({...n._formState,...e}),subject:n._subjects.state}),i.default.useEffect((()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1})),[n]),D(l,n,u.current,!1)}var L=e=>"string"==typeof e,z=(e,t,n,a,i)=>L(e)?(a&&t.watch.add(e),M(n,e,i)):Array.isArray(e)?e.map((e=>(a&&t.watch.add(e),M(n,e)))):(a&&(t.watchAll=!0),n);function _(e){const t=E(),{control:n=t.control,name:a,defaultValue:s,disabled:r,exact:l}=e||{},o=i.default.useRef(a);o.current=a,k({disabled:r,subject:n._subjects.values,next:e=>{C(o.current,e.name,l)&&u(g(z(o.current,n._names,e.values||n._formValues,!1,s)))}});const[c,u]=i.default.useState(n._getWatch(a,s));return i.default.useEffect((()=>n._removeUnmounted())),c}var R=e=>/^\w*$/.test(e),F=e=>j(e.replace(/["|']|\]/g,"").split(/\.|\[/));function U(e,t,n){let a=-1;const i=R(t)?[t]:F(t),s=i.length,r=s-1;for(;++a{const e=a._options.shouldUnregister||s,t=(e,t)=>{const n=M(a._fields,e);n&&(n._f.mount=t)};if(t(n,!0),e){const e=g(M(a._options.defaultValues,n));U(a._defaultValues,n,e),x(M(a._formValues,n))&&U(a._formValues,n,e)}return()=>{(r?e&&!a._state.action:e)?a.unregister(n):t(n,!1)}}),[n,a,r,s]),{field:{name:n,value:l,onChange:i.default.useCallback((e=>c.current.onChange({target:{value:u(e),name:n},type:f})),[n]),onBlur:i.default.useCallback((()=>c.current.onBlur({target:{value:M(a._formValues,n),name:n},type:h})),[n,a]),ref:e=>{const t=M(a._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:o,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!M(o.errors,n)},isDirty:{enumerable:!0,get:()=>!!M(o.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!M(o.touchedFields,n)},error:{enumerable:!0,get:()=>M(o.errors,n)}})}}const Q="post";var Y=(e,t,n,a,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[a]:i||!0}}:{};const B=(e,t,n)=>{for(const a of n||Object.keys(e)){const n=M(e,a);if(n){const{_f:e,...a}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else c(a)&&B(a,t)}}};var G=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)}))},$=(e,t,n={})=>n.shouldFocus||x(n.shouldFocus)?n.focusName||`${e}.${x(n.focusIndex)?t:n.focusIndex}.`:"",V=e=>({isOnSubmit:!e||e===y,isOnBlur:"onBlur"===e,isOnChange:e===b,isOnAll:e===O,isOnTouch:"onTouched"===e}),q=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),W=(e,t,n)=>{const a=j(M(e,n));return U(a,"root",t[n]),U(e,n,a),e},Z=e=>"boolean"==typeof e,H=e=>"file"===e.type,J=e=>"function"==typeof e,X=e=>{if(!p)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},K=e=>L(e),ee=e=>"radio"===e.type,te=e=>e instanceof RegExp;const ne={value:!1,isValid:!1},ae={value:!0,isValid:!0};var ie=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!x(e[0].attributes.value)?x(e[0].value)||""===e[0].value?ae:{value:e[0].value,isValid:!0}:ae:ne}return ne};const se={isValid:!1,value:null};var re=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),se):se;function le(e,t,n="validate"){if(K(e)||Array.isArray(e)&&e.every(K)||Z(e)&&!e)return{type:n,message:K(e)?e:"",ref:t}}var oe=e=>c(e)&&!te(e)?e:{value:e,message:""},ce=async(e,t,n,a,i)=>{const{ref:r,refs:o,required:u,maxLength:d,minLength:p,min:g,max:j,pattern:h,validate:m,name:f,valueAsNumber:b,mount:y,disabled:O}=e._f,N=M(t,f);if(!y||O)return{};const E=o?o[0]:r,D=e=>{a&&E.reportValidity&&(E.setCustomValidity(Z(e)?"":e||""),E.reportValidity())},w={},v=ee(r),C=s(r),k=v||C,A=(b||H(r))&&x(r.value)&&x(N)||X(r)&&""===r.value||""===N||Array.isArray(N)&&!N.length,z=Y.bind(null,f,n,w),_=(e,t,n,a="maxLength",i="minLength")=>{const s=e?t:n;w[f]={type:e?a:i,message:s,ref:r,...z(e?a:i,s)}};if(i?!Array.isArray(N)||!N.length:u&&(!k&&(A||l(N))||Z(N)&&!N||C&&!ie(o).isValid||v&&!re(o).isValid)){const{value:e,message:t}=K(u)?{value:!!u,message:u}:oe(u);if(e&&(w[f]={type:S,message:t,ref:E,...z(S,t)},!n))return D(t),w}if(!(A||l(g)&&l(j))){let e,t;const a=oe(j),i=oe(g);if(l(N)||isNaN(N)){const n=r.valueAsDate||new Date(N),s=e=>new Date((new Date).toDateString()+" "+e),l="time"==r.type,o="week"==r.type;L(a.value)&&N&&(e=l?s(N)>s(a.value):o?N>a.value:n>new Date(a.value)),L(i.value)&&N&&(t=l?s(N)a.value),l(i.value)||(t=n+e.value,i=!l(t.value)&&N.length<+t.value;if((a||i)&&(_(a,e.message,t.message),!n))return D(w[f].message),w}if(h&&!A&&L(N)){const{value:e,message:t}=oe(h);if(te(e)&&!N.match(e)&&(w[f]={type:I,message:t,ref:r,...z(I,t)},!n))return D(t),w}if(m)if(J(m)){const e=le(await m(N,t),E);if(e&&(w[f]={...e,...z("validate",e.message)},!n))return D(e.message),w}else if(c(m)){let e={};for(const a in m){if(!T(e)&&!n)break;const i=le(await m[a](N,t),E,a);i&&(e={...i,...z(a,i.message)},D(i.message),n&&(w[f]=e))}if(!T(e)&&(w[f]={ref:E,...e},!n))return w}return D(!0),w};function ue(e,t){return[...e,...v(t)]}var de=e=>Array.isArray(e)?e.map((()=>{})):void 0;function pe(e,t,n){return[...e.slice(0,t),...v(n),...e.slice(t)]}var ge=(e,t,n)=>Array.isArray(e)?(x(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[];function je(e,t){return[...v(t),...v(e)]}var xe=(e,t)=>x(t)?[]:function(e,t){let n=0;const a=[...e];for(const e of t)a.splice(e-n,1),n++;return j(a).length?a:[]}(e,v(t).sort(((e,t)=>e-t))),Me=(e,t,n)=>{e[t]=[e[n],e[n]=e[t]][0]};function he(e,t){const n=Array.isArray(t)?t:R(t)?[t]:F(t),a=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let a=0;for(;a(e[t]=n,e);function fe(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var be=e=>l(e)||!o(e);function ye(e,t){if(be(e)||be(t))return e===t;if(r(e)&&r(t))return e.getTime()===t.getTime();const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(const i of n){const n=e[i];if(!a.includes(i))return!1;if("ref"!==i){const e=t[i];if(r(n)&&r(e)||c(n)&&c(e)||Array.isArray(n)&&Array.isArray(e)?!ye(n,e):n!==e)return!1}}return!0}var Oe=e=>"select-multiple"===e.type,Ie=e=>X(e)&&e.isConnected,Se=e=>{for(const t in e)if(J(e[t]))return!0;return!1};function Ne(e,t={}){const n=Array.isArray(e);if(c(e)||n)for(const n in e)Array.isArray(e[n])||c(e[n])&&!Se(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Ne(e[n],t[n])):l(e[n])||(t[n]=!0);return t}function Ee(e,t,n){const a=Array.isArray(e);if(c(e)||a)for(const a in e)Array.isArray(e[a])||c(e[a])&&!Se(e[a])?x(t)||be(n[a])?n[a]=Array.isArray(e[a])?Ne(e[a],[]):{...Ne(e[a])}:Ee(e[a],l(t)?{}:t[a],n[a]):n[a]=!ye(e[a],t[a]);return n}var De=(e,t)=>Ee(e,t,Ne(t)),Te=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:a})=>x(e)?e:t?""===e?NaN:e?+e:e:n&&L(e)?new Date(e):a?a(e):e;function we(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return H(t)?t.files:ee(t)?re(e.refs).value:Oe(t)?[...t.selectedOptions].map((({value:e})=>e)):s(t)?ie(e.refs).value:Te(x(t.value)?e.ref.value:t.value,e)}var ve=e=>x(e)?e:te(e)?e.source:c(e)?te(e.value)?e.value.source:e.value:e;function Ce(e,t,n){const a=M(e,n);if(a||R(n))return{error:a,name:n};const i=n.split(".");for(;i.length;){const a=i.join("."),s=M(t,a),r=M(e,a);if(s&&!Array.isArray(s)&&n!==a)return{name:n};if(r&&r.type)return{name:a,error:r};i.pop()}return{name:n}}const ke={mode:y,reValidateMode:b,shouldFocusError:!0};function Ae(e={},t){let n,a={...ke,...e},i={submitCount:0,isDirty:!1,isLoading:J(a.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},o={},f=(c(a.defaultValues)||c(a.values))&&g(a.defaultValues||a.values)||{},b=a.shouldUnregister?{}:g(f),y={action:!1,mount:!1,watch:!1},I={mount:new Set,unMount:new Set,array:new Set,watch:new Set},S=0;const N={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},E={values:fe(),array:fe(),state:fe()},D=e.resetOptions&&e.resetOptions.keepDirtyValues,w=V(a.mode),C=V(a.reValidateMode),k=a.criteriaMode===O,A=async e=>{if(N.isValid||e){const e=a.resolver?T((await Q()).errors):await Y(o,!0);e!==i.isValid&&E.state.next({isValid:e})}},_=e=>N.isValidating&&E.state.next({isValidating:e}),R=(e,t,n,a)=>{const i=M(o,e);if(i){const s=M(b,e,x(n)?M(f,e):n);x(s)||a&&a.defaultChecked||t?U(b,e,t?s:we(i._f)):K(e,s),y.mount&&A()}},F=(e,t,n,a,s)=>{let r=!1,l=!1;const o={name:e};if(!n||a){N.isDirty&&(l=i.isDirty,i.isDirty=o.isDirty=G(),r=l!==o.isDirty);const n=ye(M(f,e),t);l=M(i.dirtyFields,e),n?he(i.dirtyFields,e):U(i.dirtyFields,e,!0),o.dirtyFields=i.dirtyFields,r=r||N.dirtyFields&&l!==!n}if(n){const t=M(i.touchedFields,e);t||(U(i.touchedFields,e,n),o.touchedFields=i.touchedFields,r=r||N.touchedFields&&t!==n)}return r&&s&&E.state.next(o),r?o:{}},P=(t,a,s,r)=>{const l=M(i.errors,t),o=N.isValid&&Z(a)&&i.isValid!==a;var c;if(e.delayError&&s?(c=()=>((e,t)=>{U(i.errors,e,t),E.state.next({errors:i.errors})})(t,s),n=e=>{clearTimeout(S),S=setTimeout(c,e)},n(e.delayError)):(clearTimeout(S),n=null,s?U(i.errors,t,s):he(i.errors,t)),(s?!ye(l,s):l)||!T(r)||o){const e={...r,...o&&Z(a)?{isValid:a}:{},errors:i.errors,name:t};i={...i,...e},E.state.next(e)}_(!1)},Q=async e=>a.resolver(b,a.context,((e,t,n,a)=>{const i={};for(const n of e){const e=M(t,n);e&&U(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:a}})(e||I.mount,o,a.criteriaMode,a.shouldUseNativeValidation)),Y=async(e,t,n={valid:!0})=>{for(const s in e){const r=e[s];if(r){const{_f:e,...s}=r;if(e){const s=I.array.has(e.name),l=await ce(r,b,k,a.shouldUseNativeValidation&&!t,s);if(l[e.name]&&(n.valid=!1,t))break;!t&&(M(l,e.name)?s?W(i.errors,l,e.name):U(i.errors,e.name,l[e.name]):he(i.errors,e.name))}s&&await Y(s,t,n)}}return n.valid},G=(e,t)=>(e&&t&&U(b,e,t),!ye(se(),f)),$=(e,t,n)=>z(e,I,{...y.mount?b:x(t)?f:L(e)?{[e]:t}:t},n,t),K=(e,t,n={})=>{const a=M(o,e);let i=t;if(a){const n=a._f;n&&(!n.disabled&&U(b,e,Te(t,n)),i=X(n.ref)&&l(t)?"":t,Oe(n.ref)?[...n.ref.options].forEach((e=>e.selected=i.includes(e.value))):n.refs?s(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value))):n.refs[0]&&(n.refs[0].checked=!!i):n.refs.forEach((e=>e.checked=e.value===i)):H(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||E.values.next({name:e,values:{...b}})))}(n.shouldDirty||n.shouldTouch)&&F(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&ie(e)},te=(e,t,n)=>{for(const a in t){const i=t[a],s=`${e}.${a}`,l=M(o,s);!I.array.has(e)&&be(i)&&(!l||l._f)||r(i)?K(s,i,n):te(s,i,n)}},ne=(e,n,a={})=>{const s=M(o,e),r=I.array.has(e),c=g(n);U(b,e,c),r?(E.array.next({name:e,values:{...b}}),(N.isDirty||N.dirtyFields)&&a.shouldDirty&&E.state.next({name:e,dirtyFields:De(f,b),isDirty:G(e,c)})):!s||s._f||l(c)?K(e,c,a):te(e,c,a),q(e,I)&&E.state.next({...i}),E.values.next({name:e,values:{...b}}),!y.mount&&t()},ae=async e=>{const t=e.target;let s=t.name,r=!0;const l=M(o,s);if(l){let d,p;const g=t.type?we(l._f):u(e),j=e.type===h||e.type===m,x=!((c=l._f).mount&&(c.required||c.min||c.max||c.maxLength||c.minLength||c.pattern||c.validate)||a.resolver||M(i.errors,s)||l._f.deps)||((e,t,n,a,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?a.isOnBlur:i.isOnBlur)?!e:!(n?a.isOnChange:i.isOnChange)||e))(j,M(i.touchedFields,s),i.isSubmitted,C,w),f=q(s,I,j);U(b,s,g),j?(l._f.onBlur&&l._f.onBlur(e),n&&n(0)):l._f.onChange&&l._f.onChange(e);const y=F(s,g,j,!1),O=!T(y)||f;if(!j&&E.values.next({name:s,type:e.type,values:{...b}}),x)return N.isValid&&A(),O&&E.state.next({name:s,...f?{}:y});if(!j&&f&&E.state.next({...i}),_(!0),a.resolver){const{errors:e}=await Q([s]),t=Ce(i.errors,o,s),n=Ce(e,o,t.name||s);d=n.error,s=n.name,p=T(e)}else d=(await ce(l,b,k,a.shouldUseNativeValidation))[s],r=isNaN(g)||g===M(b,s,g),r&&(d?p=!1:N.isValid&&(p=await Y(o,!0)));r&&(l._f.deps&&ie(l._f.deps),P(s,p,d,y))}var c},ie=async(e,t={})=>{let n,s;const r=v(e);if(_(!0),a.resolver){const t=await(async e=>{const{errors:t}=await Q();if(e)for(const n of e){const e=M(t,n);e?U(i.errors,n,e):he(i.errors,n)}else i.errors=t;return t})(x(e)?e:r);n=T(t),s=e?!r.some((e=>M(t,e))):n}else e?(s=(await Promise.all(r.map((async e=>{const t=M(o,e);return await Y(t&&t._f?{[e]:t}:t)})))).every(Boolean),(s||i.isValid)&&A()):s=n=await Y(o);return E.state.next({...!L(e)||N.isValid&&n!==i.isValid?{}:{name:e},...a.resolver||!e?{isValid:n}:{},errors:i.errors,isValidating:!1}),t.shouldFocus&&!s&&B(o,(e=>e&&M(i.errors,e)),e?r:I.mount),s},se=e=>{const t={...f,...y.mount?b:{}};return x(e)?t:L(e)?M(t,e):e.map((e=>M(t,e)))},re=(e,t)=>({invalid:!!M((t||i).errors,e),isDirty:!!M((t||i).dirtyFields,e),isTouched:!!M((t||i).touchedFields,e),error:M((t||i).errors,e)}),le=(e,t,n)=>{const a=(M(o,e,{_f:{}})._f||{}).ref;U(i.errors,e,{...t,ref:a}),E.state.next({name:e,errors:i.errors,isValid:!1}),n&&n.shouldFocus&&a&&a.focus&&a.focus()},oe=(e,t={})=>{for(const n of e?v(e):I.mount)I.mount.delete(n),I.array.delete(n),t.keepValue||(he(o,n),he(b,n)),!t.keepError&&he(i.errors,n),!t.keepDirty&&he(i.dirtyFields,n),!t.keepTouched&&he(i.touchedFields,n),!a.shouldUnregister&&!t.keepDefaultValue&&he(f,n);E.values.next({values:{...b}}),E.state.next({...i,...t.keepDirty?{isDirty:G()}:{}}),!t.keepIsValid&&A()},ue=(e,t={})=>{let n=M(o,e);const i=Z(t.disabled);return U(o,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),I.mount.add(e),n?i&&U(b,e,t.disabled?void 0:M(b,e,we(n._f))):R(e,!0,t.value),{...i?{disabled:t.disabled}:{},...a.progressive?{required:!!t.required,min:ve(t.min),max:ve(t.max),minLength:ve(t.minLength),maxLength:ve(t.maxLength),pattern:ve(t.pattern)}:{},name:e,onChange:ae,onBlur:ae,ref:i=>{if(i){ue(e,t),n=M(o,e);const a=x(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,r=(e=>ee(e)||s(e))(a),l=n._f.refs||[];if(r?l.find((e=>e===a)):a===n._f.ref)return;U(o,e,{_f:{...n._f,...r?{refs:[...l.filter(Ie),a,...Array.isArray(M(f,e))?[{}]:[]],ref:{type:a.type,name:e}}:{ref:a}}}),R(e,!1,void 0,a)}else n=M(o,e,{}),n._f&&(n._f.mount=!1),(a.shouldUnregister||t.shouldUnregister)&&(!d(I.array,e)||!y.action)&&I.unMount.add(e)}}},de=()=>a.shouldFocusError&&B(o,(e=>e&&M(i.errors,e)),I.mount),pe=(e,t)=>async n=>{n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let s=g(b);if(E.state.next({isSubmitting:!0}),a.resolver){const{errors:e,values:t}=await Q();i.errors=e,s=t}else await Y(o);he(i.errors,"root"),T(i.errors)?(E.state.next({errors:{}}),await e(s,n)):(t&&await t({...i.errors},n),de(),setTimeout(de)),E.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:T(i.errors),submitCount:i.submitCount+1,errors:i.errors})},ge=(n,a={})=>{const s=n||f,r=g(s),l=n&&!T(n)?r:f;if(a.keepDefaultValues||(f=s),!a.keepValues){if(a.keepDirtyValues||D)for(const e of I.mount)M(i.dirtyFields,e)?U(l,e,M(b,e)):ne(e,M(l,e));else{if(p&&x(n))for(const e of I.mount){const t=M(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(X(e)){const t=e.closest("form");if(t){t.reset();break}}}}o={}}b=e.shouldUnregister?a.keepDefaultValues?g(f):{}:g(l),E.array.next({values:{...l}}),E.values.next({values:{...l}})}I={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!y.mount&&t(),y.mount=!N.isValid||!!a.keepIsValid,y.watch=!!e.shouldUnregister,E.state.next({submitCount:a.keepSubmitCount?i.submitCount:0,isDirty:a.keepDirty?i.isDirty:!(!a.keepDefaultValues||ye(n,f)),isSubmitted:!!a.keepIsSubmitted&&i.isSubmitted,dirtyFields:a.keepDirtyValues?i.dirtyFields:a.keepDefaultValues&&n?De(f,n):{},touchedFields:a.keepTouched?i.touchedFields:{},errors:a.keepErrors?i.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},je=(e,t)=>ge(J(e)?e(b):e,t);return{control:{register:ue,unregister:oe,getFieldState:re,handleSubmit:pe,setError:le,_executeSchema:Q,_getWatch:$,_getDirty:G,_updateValid:A,_removeUnmounted:()=>{for(const e of I.unMount){const t=M(o,e);t&&(t._f.refs?t._f.refs.every((e=>!Ie(e))):!Ie(t._f.ref))&&oe(e)}I.unMount=new Set},_updateFieldArray:(e,t=[],n,a,s=!0,r=!0)=>{if(a&&n){if(y.action=!0,r&&Array.isArray(M(o,e))){const t=n(M(o,e),a.argA,a.argB);s&&U(o,e,t)}if(r&&Array.isArray(M(i.errors,e))){const t=n(M(i.errors,e),a.argA,a.argB);s&&U(i.errors,e,t),((e,t)=>{!j(M(e,t)).length&&he(e,t)})(i.errors,e)}if(N.touchedFields&&r&&Array.isArray(M(i.touchedFields,e))){const t=n(M(i.touchedFields,e),a.argA,a.argB);s&&U(i.touchedFields,e,t)}N.dirtyFields&&(i.dirtyFields=De(f,b)),E.state.next({name:e,isDirty:G(e,t),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else U(b,e,t)},_getFieldArray:t=>j(M(y.mount?b:f,t,e.shouldUnregister?M(f,t,[]):[])),_reset:ge,_resetDefaultValues:()=>J(a.defaultValues)&&a.defaultValues().then((e=>{je(e,a.resetOptions),E.state.next({isLoading:!1})})),_updateFormState:e=>{i={...i,...e}},_subjects:E,_proxyFormState:N,get _fields(){return o},get _formValues(){return b},get _state(){return y},set _state(e){y=e},get _defaultValues(){return f},get _names(){return I},set _names(e){I=e},get _formState(){return i},set _formState(e){i=e},get _options(){return a},set _options(e){a={...a,...e}}},trigger:ie,register:ue,handleSubmit:pe,watch:(e,t)=>J(e)?E.values.subscribe({next:n=>e($(void 0,t),n)}):$(e,t,!0),setValue:ne,getValues:se,reset:je,resetField:(e,t={})=>{M(o,e)&&(x(t.defaultValue)?ne(e,M(f,e)):(ne(e,t.defaultValue),U(f,e,t.defaultValue)),t.keepTouched||he(i.touchedFields,e),t.keepDirty||(he(i.dirtyFields,e),i.isDirty=t.defaultValue?G(e,M(f,e)):G()),t.keepError||(he(i.errors,e),N.isValid&&A()),E.state.next({...i}))},clearErrors:e=>{e&&v(e).forEach((e=>he(i.errors,e))),E.state.next({errors:e?i.errors:{}})},unregister:oe,setError:le,setFocus:(e,t={})=>{const n=M(o,e),a=n&&n._f;if(a){const e=a.refs?a.refs[0]:a.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:re}}t.Controller=e=>e.render(P(e)),t.Form=function(e){const t=E(),[n,a]=i.default.useState(!1),{control:s=t.control,onSubmit:r,children:l,action:o,method:c=Q,headers:u,encType:d,onError:p,render:g,onSuccess:j,validateStatus:x,...h}=e,m=async t=>{let n=!1,a="";await s.handleSubmit((async e=>{const i=new FormData;let l="";try{l=JSON.stringify(e)}catch(e){}for(const t of s._names.mount)i.append(t,M(e,t));if(r&&r({data:e,event:t,method:c,formData:i,formDataJson:l}),o)try{const e=[u&&u["Content-Type"],d].some((e=>e&&e.includes("json"))),t=await fetch(o,{method:c,headers:{...u,...d?{"Content-Type":d}:{}},body:e?l:i});t&&(x?!x(t.status):t.status<200||t.status>=300)?(n=!0,p&&p({response:t}),a=String(t.status)):j&&j({response:t})}catch(e){n=!0,p&&p({error:e})}}))(t),n&&e.control&&(e.control._subjects.state.next({isSubmitSuccessful:!1}),e.control.setError("root.server",{type:a}))};return i.default.useEffect((()=>{a(!0)}),[]),g?i.default.createElement(i.default.Fragment,null,g({submit:m})):i.default.createElement("form",{noValidate:n,action:o,method:c,encType:d,onSubmit:m,...h},l)},t.FormProvider=e=>{const{children:t,...n}=e;return i.default.createElement(N.Provider,{value:n},t)},t.appendErrors=Y,t.get=M,t.set=U,t.useController=P,t.useFieldArray=function(e){const t=E(),{control:n=t.control,name:a,keyName:s="id",shouldUnregister:r}=e,[l,o]=i.default.useState(n._getFieldArray(a)),c=i.default.useRef(n._getFieldArray(a).map(G)),u=i.default.useRef(l),d=i.default.useRef(a),p=i.default.useRef(!1);d.current=a,u.current=l,n._names.array.add(a),e.rules&&n.register(a,e.rules),k({next:({values:e,name:t})=>{if(t===d.current||!t){const t=M(e,d.current);Array.isArray(t)&&(o(t),c.current=t.map(G))}},subject:n._subjects.array});const j=i.default.useCallback((e=>{p.current=!0,n._updateFieldArray(a,e)}),[n,a]);return i.default.useEffect((()=>{if(n._state.action=!1,q(a,n._names)&&n._subjects.state.next({...n._formState}),p.current&&(!V(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([a]).then((e=>{const t=M(e.errors,a),i=M(n._formState.errors,a);(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type)&&(t?U(n._formState.errors,a,t):he(n._formState.errors,a),n._subjects.state.next({errors:n._formState.errors}))}));else{const e=M(n._fields,a);e&&e._f&&ce(e,n._formValues,n._options.criteriaMode===O,n._options.shouldUseNativeValidation,!0).then((e=>!T(e)&&n._subjects.state.next({errors:W(n._formState.errors,e,a)})))}n._subjects.values.next({name:a,values:{...n._formValues}}),n._names.focus&&B(n._fields,(e=>!!e&&e.startsWith(n._names.focus||""))),n._names.focus="",n._updateValid()}),[l,a,n]),i.default.useEffect((()=>(!M(n._formValues,a)&&n._updateFieldArray(a),()=>{(n._options.shouldUnregister||r)&&n.unregister(a)})),[a,n,s,r]),{swap:i.default.useCallback(((e,t)=>{const i=n._getFieldArray(a);Me(i,e,t),Me(c.current,e,t),j(i),o(i),n._updateFieldArray(a,i,Me,{argA:e,argB:t},!1)}),[j,a,n]),move:i.default.useCallback(((e,t)=>{const i=n._getFieldArray(a);ge(i,e,t),ge(c.current,e,t),j(i),o(i),n._updateFieldArray(a,i,ge,{argA:e,argB:t},!1)}),[j,a,n]),prepend:i.default.useCallback(((e,t)=>{const i=v(g(e)),s=je(n._getFieldArray(a),i);n._names.focus=$(a,0,t),c.current=je(c.current,i.map(G)),j(s),o(s),n._updateFieldArray(a,s,je,{argA:de(e)})}),[j,a,n]),append:i.default.useCallback(((e,t)=>{const i=v(g(e)),s=ue(n._getFieldArray(a),i);n._names.focus=$(a,s.length-1,t),c.current=ue(c.current,i.map(G)),j(s),o(s),n._updateFieldArray(a,s,ue,{argA:de(e)})}),[j,a,n]),remove:i.default.useCallback((e=>{const t=xe(n._getFieldArray(a),e);c.current=xe(c.current,e),j(t),o(t),n._updateFieldArray(a,t,xe,{argA:e})}),[j,a,n]),insert:i.default.useCallback(((e,t,i)=>{const s=v(g(t)),r=pe(n._getFieldArray(a),e,s);n._names.focus=$(a,e,i),c.current=pe(c.current,e,s.map(G)),j(r),o(r),n._updateFieldArray(a,r,pe,{argA:e,argB:de(t)})}),[j,a,n]),update:i.default.useCallback(((e,t)=>{const i=g(t),s=me(n._getFieldArray(a),e,i);c.current=[...s].map(((t,n)=>t&&n!==e?c.current[n]:G())),j(s),o([...s]),n._updateFieldArray(a,s,me,{argA:e,argB:i},!0,!1)}),[j,a,n]),replace:i.default.useCallback((e=>{const t=v(g(e));c.current=t.map(G),j([...t]),o([...t]),n._updateFieldArray(a,[...t],(e=>e),{},!0,!1)}),[j,a,n]),fields:i.default.useMemo((()=>l.map(((e,t)=>({...e,[s]:c.current[t]||G()})))),[l,s])}},t.useForm=function(e={}){const t=i.default.useRef(),[n,a]=i.default.useState({isDirty:!1,isValidating:!1,isLoading:J(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:J(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Ae(e,(()=>a((e=>({...e}))))),formState:n});const s=t.current.control;return s._options=e,k({subject:s._subjects.state,next:e=>{w(e,s._proxyFormState,s._updateFormState,!0)&&a({...s._formState})}}),i.default.useEffect((()=>{e.values&&!ye(e.values,s._defaultValues)?s._reset(e.values,s._options.resetOptions):s._resetDefaultValues()}),[e.values,s]),i.default.useEffect((()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()})),t.current.formState=D(n,s),t.current},t.useFormContext=E,t.useFormState=A,t.useWatch=_},263:function(e,t,n){"use strict";(function(t,a){var i=n(143);e.exports=f;var s,r=n(535);f.ReadableState=m,n(197).EventEmitter;var l=function(e,t){return e.listeners(t).length},o=n(264),c=n(199).Buffer,u=t.Uint8Array||function(){},d=Object.create(n(129));d.inherits=n(110);var p=n(536),g=void 0;g=p&&p.debuglog?p.debuglog("stream"):function(){};var j,x=n(537),M=n(265);d.inherits(f,o);var h=["error","close","destroy","pause","resume"];function m(e,t){e=e||{};var a=t instanceof(s=s||n(99));this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,r=e.readableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:a&&(r||0===r)?r:l,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new x,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(j||(j=n(267).StringDecoder),this.decoder=new j(e.encoding),this.encoding=e.encoding)}function f(e){if(s=s||n(99),!(this instanceof f))return new f(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function b(e,t,n,a,i){var s,r=e._readableState;return null===t?(r.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,S(e)}}(e,r)):(i||(s=function(e,t){var n,a;return a=t,c.isBuffer(a)||a instanceof u||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(r,t)),s?e.emit("error",s):r.objectMode||t&&t.length>0?("string"==typeof t||r.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),a?r.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):y(e,r,t,!0):r.ended?e.emit("error",new Error("stream.push() after EOF")):(r.reading=!1,r.decoder&&!n?(t=r.decoder.write(t),r.objectMode||0!==t.length?y(e,r,t,!1):E(e,r)):y(e,r,t,!1))):a||(r.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(N,e):N(e))}function N(e){g("emit readable"),e.emit("readable"),v(e)}function E(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(D,e,t))}function D(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var a;return es.length?s.length:e;if(r===s.length?i+=s:i+=s.slice(0,e),0==(e-=r)){r===s.length?(++a,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(r));break}++a}return t.length-=a,i}(e,t):function(e,t){var n=c.allocUnsafe(e),a=t.head,i=1;for(a.data.copy(n),e-=a.data.length;a=a.next;){var s=a.data,r=e>s.length?s.length:e;if(s.copy(n,n.length-e,0,r),0==(e-=r)){r===s.length?(++i,a.next?t.head=a.next:t.head=t.tail=null):(t.head=a,a.data=s.slice(r));break}++i}return t.length-=i,n}(e,t),a}(e,t.buffer,t.decoder),n);var n}function k(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,a=e.length;n=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?k(this):S(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&k(this),null;var a,i=t.needReadable;return g("need readable",i),(0===t.length||t.length-e0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&k(this)),null!==a&&this.emit("data",a),a},f.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},f.prototype.pipe=function(e,t){var n=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,g("pipe count=%d opts=%j",s.pipesCount,t);var o=t&&!1===t.end||e===a.stdout||e===a.stderr?m:c;function c(){g("onend"),e.end()}s.endEmitted?i.nextTick(o):n.once("end",o),e.on("unpipe",(function t(a,i){g("onunpipe"),a===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,g("cleanup"),e.removeListener("close",M),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",x),e.removeListener("unpipe",t),n.removeListener("end",c),n.removeListener("end",m),n.removeListener("data",j),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}));var u=function(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&l(e,"data")&&(t.flowing=!0,v(e))}}(n);e.on("drain",u);var d=!1,p=!1;function j(t){g("ondata"),p=!1,!1!==e.write(t)||p||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==L(s.pipes,e))&&!d&&(g("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function x(t){g("onerror",t),m(),e.removeListener("error",x),0===l(e,"error")&&e.emit("error",t)}function M(){e.removeListener("finish",h),m()}function h(){g("onfinish"),e.removeListener("close",M),m()}function m(){g("unpipe"),n.unpipe(e)}return n.on("data",j),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",x),e.once("close",M),e.once("finish",h),e.emit("pipe",n),s.flowing||(g("pipe resume"),n.resume()),e},f.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var a=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(539),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(111))},267:function(e,t,n){"use strict";var a=n(541).Buffer,i=a.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(a.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=o,this.end=c,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=u,this.end=d,t=3;break;default:return this.write=p,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(t)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var a=n.charCodeAt(n.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function u(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function g(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(i>0&&(e.lastNeed=i-1),i):--a=0?(i>0&&(e.lastNeed=i-2),i):--a=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var a=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,a),e.toString("utf8",t,a)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},268:function(e,t,n){"use strict";e.exports=r;var a=n(99),i=Object.create(n(129));function s(e,t){var n=this._transformState;n.transforming=!1;var a=n.writecb;if(!a)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),a(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{const l=Object(i.a)().elasticsearchUrl||"https://localhost:9200",o=t||"",{name:c,...u}=null!=r?r:{},d=Object.entries(u).reduce(((e,t)=>({...e,[`_${t[0]}`]:t[1]})),{}),p=r?{...n,...d}:n;return Object(s.jsx)(a.EuiCodeBlock,{language:"bash",fontSize:"m",isCopyable:!0},`curl -X POST '${l}/${e}/_doc${r?`?pipeline=${c}`:""}' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: ApiKey ${o}' \\\n -d '${JSON.stringify(p,null,2)}'\n`)}},270:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(549);case"v8light":return n(551)}},431:function(e,t,n){e.exports=n.p+"c7b708f34eb0305182f9c88ac82377d8.svg"},432:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(433);case"v8light":return n(435)}},433:function(e,t,n){var a=n(34),i=n(434);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},434:function(e,t,n){(t=n(35)(!1)).push([e.i,"@media only screen and (max-width:574px){.addContentEmptyPrompt{flex-direction:column-reverse}}@media only screen and (min-width:575px) and (max-width:767px){.addContentEmptyPrompt{flex-direction:column-reverse}}",""]),e.exports=t},435:function(e,t,n){var a=n(34),i=n(436);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},436:function(e,t,n){(t=n(35)(!1)).push([e.i,"@media only screen and (max-width:574px){.addContentEmptyPrompt{flex-direction:column-reverse}}@media only screen and (min-width:575px) and (max-width:767px){.addContentEmptyPrompt{flex-direction:column-reverse}}",""]),e.exports=t},45:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var a=n(14);const i=(e,t)=>Object(a.generatePath)(e,(e=>{const t={};return Object.entries(e).map((([e,n])=>{t[e]=encodeURIComponent(n)})),t})(t)),s=()=>{const e={},t=Object(a.useParams)();return Object.entries(t).map((([t,n])=>{e[t]=decodeURIComponent(n)})),e}},456:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(457);case"v8light":return n(459)}},457:function(e,t,n){var a=n(34),i=n(458);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},458:function(e,t,n){(t=n(35)(!1)).push([e.i,".gettingStartedSteps .grayscaleSvg{filter:grayscale(1)}.gettingStartedSteps .addManyMoreButton{border:1px solid #343741}.gettingStartedSteps .iconTooltip{border-bottom:1px solid #343741}",""]),e.exports=t},459:function(e,t,n){var a=n(34),i=n(460);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},460:function(e,t,n){(t=n(35)(!1)).push([e.i,".gettingStartedSteps .grayscaleSvg{filter:grayscale(1)}.gettingStartedSteps .addManyMoreButton{border:1px solid #d3dae6}.gettingStartedSteps .iconTooltip{border-bottom:1px solid #d3dae6}",""]),e.exports=t},461:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(462);case"v8light":return n(464)}},462:function(e,t,n){var a=n(34),i=n(463);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},463:function(e,t,n){(t=n(35)(!1)).push([e.i,".entSearchIndicesSearchBar{max-width:400px}",""]),e.exports=t},464:function(e,t,n){var a=n(34),i=n(465);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},465:function(e,t,n){(t=n(35)(!1)).push([e.i,".entSearchIndicesSearchBar{max-width:400px}",""]),e.exports=t},466:function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzExNzNfMykiPgo8cGF0aCBkPSJNMTMuNDExOCAyNS42NTkyTDYuMzQwOCAxOC41ODc5TDguNTcxNDcgMTcuOTkwNEwxNC4wMDk1IDIzLjQyODVMMjEuNDM4MSAyMS40MzhMMjMuNDI4NiAxNC4wMDk0TDE3Ljk5MDYgOC41NzE0NUwxOC41ODgzIDYuMzQwNzRMMjUuNjU5MyAxMy40MTE3TDIzLjM3IDIxLjk1NTVMMjguMzE5OSAyNi45MDUzTDI4LjAyMSAyOC4wMjA2TDI2LjkwNTYgMjguMzE5NUwyMS45NTU5IDIzLjM2OThMMTMuNDExOCAyNS42NTkyWiIgZmlsbD0iIzUzNTc2NiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE5LjUzNTMgMTkuNTM1N0wxNC43MDU3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esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},501:function(e,t,n){(t=n(35)(!1)).push([e.i,".authenticationPanel .authenticationCheckable{height:100%}",""]),e.exports=t},502:function(e,t,n){var a=n(34),i=n(503);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},503:function(e,t,n){(t=n(35)(!1)).push([e.i,".authenticationPanel .authenticationCheckable{height:100%}",""]),e.exports=t},504:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(505);case"v8light":return n(507)}},505:function(e,t,n){var a=n(34),i=n(506);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},506:function(e,t,n){(t=n(35)(!1)).push([e.i,".deduplicationPanel .selectableWrapper{border:1px solid #25262e;border-radius:10.8px;padding:16px}.deduplicationPanel .showAllFieldsPopoverToggle .euiButtonEmpty{padding-inline:12px}",""]),e.exports=t},507:function(e,t,n){var a=n(34),i=n(508);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},508:function(e,t,n){(t=n(35)(!1)).push([e.i,".deduplicationPanel .selectableWrapper{border:1px solid #f5f7fa;border-radius:10.8px;padding:16px}.deduplicationPanel .showAllFieldsPopoverToggle .euiButtonEmpty{padding-inline:12px}",""]),e.exports=t},509:function(e,t,n){var a=n(34),i=n(510);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},51:function(e,t,n){"use strict";n.d(t,"h",(function(){return c})),n.d(t,"j",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"i",(function(){return p})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return j})),n.d(t,"d",(function(){return x})),n.d(t,"a",(function(){return M})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return m}));var a=n(17),i=n.n(a),s=n(2),r=n(1),l=n(56),o=n(107);function c(e){const t=e;return!(null==t||!t.connector)&&t.connector.service_type!==r.j}function u(e){return!(null==e||!e.crawler)}function d(e){return!!e&&!c(e)&&!u(e)}function p(e){const t=e;return!(null==t||!t.connector)&&t.connector.service_type!==r.j}function g(e){return e?c(e)?o.a.CONNECTOR:u(e)?o.a.CRAWLER:o.a.API:o.a.API}function j(e){if(!e||d(e))return o.b.CONNECTED;if(c(e)||u(e)&&e.connector){if(e.connector.last_seen&&i()(e.connector.last_seen).isBefore(i()().subtract(30,"minutes")))return o.b.ERROR;if(e.connector.last_sync_status===l.i.ERROR)return o.b.SYNC_ERROR;if(e.connector.status===l.a.CONNECTED)return o.b.CONNECTED;if(e.connector.status===l.a.ERROR)return o.b.ERROR;if(e.connector.status===l.a.CONFIGURED)return o.b.CONFIGURED}return o.b.INCOMPLETE}function x(e){var t;return c(e)?null!==(t=e.connector.last_synced)&&void 0!==t?t:"never":null}function M(e){return!!e&&(!!c(e)&&!!(null===(t=e.connector.configuration)||void 0===t||null===(n=t.use_text_extraction_service)||void 0===n?void 0:n.value));var t,n}function h(e){const t={ingestionMethod:g(e),ingestionStatus:j(e),lastUpdated:x(e)};return c(e)||u(e),{...e,...t}}function m(e){switch(e){case o.a.CONNECTOR:return s.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionMethod.connector",{defaultMessage:"Connector"});case o.a.CRAWLER:return s.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionMethod.crawler",{defaultMessage:"Crawler"});case o.a.API:return s.i18n.translate("xpack.enterpriseSearch.content.searchIndices.ingestionMethod.api",{defaultMessage:"API"});default:return e}}},510:function(e,t,n){(t=n(35)(!1)).push([e.i,".resultField:nth-child(odd){background-color:#25262e}.resultField{padding:4px 8px}.resultField>.euiTableRowCell{border-bottom:none;border-top:none}.resultField>.euiTableRowCell>.euiTableCellContent{padding:4px}.resultExpandColumn{align-items:flex-start;border-left:1px solid #343741;height:100%;justify-content:center;padding:0 0 0 8px}.resultHeader{padding:0 8px 4px 0}.euiToken.resultField__token{align-items:center;display:flex;justify-content:flex-start}",""]),e.exports=t},511:function(e,t,n){var a=n(34),i=n(512);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},512:function(e,t,n){(t=n(35)(!1)).push([e.i,".resultField:nth-child(odd){background-color:#f5f7fa}.resultField{padding:4px 8px}.resultField>.euiTableRowCell{border-bottom:none;border-top:none}.resultField>.euiTableRowCell>.euiTableCellContent{padding:4px}.resultExpandColumn{align-items:flex-start;border-left:1px solid #d3dae6;height:100%;justify-content:center;padding:0 0 0 8px}.resultHeader{padding:0 8px 4px 0}.euiToken.resultField__token{align-items:center;display:flex;justify-content:flex-start}",""]),e.exports=t},513:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(514);case"v8light":return n(516)}},514:function(e,t,n){var a=n(34),i=n(515);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},515:function(e,t,n){(t=n(35)(!1)).push([e.i,".enterpriseSearchDocumentsHeader{padding-right:80px}@media only screen and (max-width:574px){.enterpriseSearchDocumentsHeader{padding-right:24px}}@media only screen and (min-width:575px) and (max-width:767px){.enterpriseSearchDocumentsHeader{padding-right:24px}}@media only screen and (min-width:768px) and (max-width:991px){.enterpriseSearchDocumentsHeader{padding-right:24px}}",""]),e.exports=t},516:function(e,t,n){var a=n(34),i=n(517);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},517:function(e,t,n){(t=n(35)(!1)).push([e.i,".enterpriseSearchDocumentsHeader{padding-right:80px}@media only screen and (max-width:574px){.enterpriseSearchDocumentsHeader{padding-right:24px}}@media only screen and (min-width:575px) and (max-width:767px){.enterpriseSearchDocumentsHeader{padding-right:24px}}@media only screen and (min-width:768px) and (max-width:991px){.enterpriseSearchDocumentsHeader{padding-right:24px}}",""]),e.exports=t},518:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(519);case"v8light":return n(521)}},519:function(e,t,n){var a=n(34),i=n(520);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},520:function(e,t,n){(t=n(35)(!1)).push([e.i,".enterpriseSearchMappingsSelector{max-width:240px}",""]),e.exports=t},521:function(e,t,n){var a=n(34),i=n(522);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},522:function(e,t,n){(t=n(35)(!1)).push([e.i,".enterpriseSearchMappingsSelector{max-width:240px}",""]),e.exports=t},523:function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMTguNTYzIDI1LjA2NzFDMTE1LjcxMyAyNS4wNjcxIDExMy40MDggMjIuNzU3NSAxMTMuNDA4IDE5LjkxMjJDMTEzLjQwOCAxNy4wNjI4IDExNS43MTMgMTQuNzU3MyAxMTguNTYzIDE0Ljc1NzNDMTIxLjQwOCAxNC43NTczIDEyMy43MTggMTcuMDYyOCAxMjMuNzE4IDE5LjkxMjJDMTIzLjcxOCAyMi43NTc1IDEyMS40MDggMjUuMDY3MSAxMTguNTYzIDI1LjA2NzFaTTY3LjM2NjggMTEzLjE0M0M2NC41MTc0IDExMy4xNDMgNjIuMjExOSAxMTAuODMzIDYyLjIxMTkgMTA3Ljk4OEM2Mi4yMTE5IDEwNS4xMzkgNjQuNTE3NCAxMDIuODMzIDY3L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i44NTU2QzQuNTUzNzYgMTIuNjIzOSA0LjMyNzU5IDEyLjM3NDIgNC4wNjE1MiAxMi4wOTc0QzMuNzAxODggMTMuODczMSAzLjM1MTA4IDE1LjYwNDkgMyAxNy4zMzY1TDMuMDM5MzIgMTcuMzU0OUMzLjA2NjE1IDE3LjMxMTkgMy4wOTg5NCAxNy4yNzExIDMuMTE4ODIgMTcuMjI0OFpNMTQuNTQyMSA0LjE0NTc5QzE1LjUxOTUgMy44OTM2NSAxNi41MTExIDMuNjk2NDkgMTcuNDk2OSAzLjQ3NjU1QzE3LjU2MDcgMy40NjIxOSAxNy42MjMxIDMuNDQxMTUgMTcuNjg1OSAzLjQyMzE3TDE3LjY3NjIgMy4zNzVMMTMuNDQwOCAzLjk0NDg2QzEzLjgzODUgNC4xMTg1MSAxNC4xNDQ5IDQuMjQ4MjEgMTQuNTQyMSA0LjE0NTc5WiIgZmlsbD0iI0Q5MTQwNCIvPgo8L3N2Zz4K"},532:function(e,t,n){e.exports=n.p+"24b6b946634ffc8f4c2471ffac6349d1.svg"},533:function(e,t,n){var a;self,a=()=>{return e={7629:(e,t,n)=>{"use strict";const a=n(375),i=n(8571),s=n(9474),r=n(1687),l=n(8652),o=n(8160),c=n(3292),u=n(6354),d=n(8901),p=n(9708),g=n(6914),j=n(2294),x=n(6133),M=n(1152),h=n(8863),m=n(2036),f={Base:class{constructor(e){this.type=e,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new j.Ids,this._preferences=null,this._refs=new x.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return a("function"==typeof p.describe,"Manifest functionality disabled"),p.describe(this)}allow(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return a(void 0!==e,"Missing example"),o.assertOptions(t,["override"]),this._inner("examples",e,{single:!0,override:t.override})}external(e,t){return"object"==typeof e&&(a(!t,"Cannot combine options with description"),t=e.description,e=e.method),a("function"==typeof e,"Method must be a function"),a(void 0===t||t&&"string"==typeof t,"Description must be a non-empty string"),this._inner("externals",{method:e,description:t},{single:!0})}failover(e,t){return this._default("failover",e,t)}forbidden(){return this.presence("forbidden")}id(e){return e?(a("string"==typeof e,"id must be a non-empty string"),a(/^[^\.]+$/.test(e),"id cannot contain period character"),this.$_setFlag("id",e)):this.$_setFlag("id",void 0)}invalid(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"Invalid mode:",e),this.$_setFlag("only",e)}optional(){return this.presence("optional")}prefs(e){a(e,"Missing preferences"),a(void 0===e.context,"Cannot override context"),a(void 0===e.externals,"Cannot override externals"),a(void 0===e.warnings,"Cannot override warnings"),a(void 0===e.debug,"Cannot override debug"),o.checkPreferences(e);const t=this.clone();return t._preferences=o.preferences(t._preferences,e),t}presence(e){return a(["optional","required","forbidden"].includes(e),"Unknown presence mode",e),this.$_setFlag("presence",e)}raw(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("result",e?"raw":void 0)}result(e){return a(["raw","strip"].includes(e),"Unknown result mode",e),this.$_setFlag("result",e)}required(){return this.presence("required")}strict(e){const t=this.clone(),n=void 0!==e&&!e;return t._preferences=o.preferences(t._preferences,{convert:n}),t}strip(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("result",e?"strip":void 0)}tag(){for(var e=arguments.length,t=new Array(e),n=0;ne.keep||e.name!==n)),t._singleRules.delete(n));for(const n of e._rules)e._definition.rules[n.method].multi||t._singleRules.set(n.name,n),t._rules.push(n);if(t._flags.empty&&e._flags.empty){t._flags.empty=t._flags.empty.concat(e._flags.empty);const n=Object.assign({},e._flags);delete n.empty,r(t._flags,n)}else if(e._flags.empty){t._flags.empty=e._flags.empty;const n=Object.assign({},e._flags);delete n.empty,r(t._flags,n)}else r(t._flags,e._flags);for(const n in e.$_terms){const a=e.$_terms[n];a?t.$_terms[n]?t.$_terms[n]=t.$_terms[n].concat(a):t.$_terms[n]=a.slice():t.$_terms[n]||(t.$_terms[n]=a)}return this.$_root._tracer&&this.$_root._tracer._combine(t,[this,e]),t.$_mutateRebuild()}extend(e){return a(!e.base,"Cannot extend type with another base"),d.type(this,e)}extract(e){return e=Array.isArray(e)?e:e.split("."),this._ids.reach(e)}fork(e,t){a(!this._inRuleset(),"Cannot fork inside a ruleset");let n=this;for(let a of[].concat(e))a=Array.isArray(a)?a:a.split("."),n=n._ids.fork(a,t,n);return n.$_temp.ruleset=!1,n}rule(e){const t=this._definition;o.assertOptions(e,Object.keys(t.modifiers)),a(!1!==this.$_temp.ruleset,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const n=null===this.$_temp.ruleset?this._rules.length-1:this.$_temp.ruleset;a(n>=0&&nt.tailor(e),ref:!1}),t.$_temp.ruleset=!1,t.$_mutateRebuild()}tracer(){return M.location?M.location(this):this}validate(e,t){return h.entry(e,this,t)}validateAsync(e,t){return h.entryAsync(e,this,t)}$_addRule(e){"string"==typeof e&&(e={name:e}),a(e&&"object"==typeof e,"Invalid options"),a(e.name&&"string"==typeof e.name,"Invalid rule name");for(const t in e)a("_"!==t[0],"Cannot set private rule properties");const t=Object.assign({},e);t._resolve=[],t.method=t.method||t.name;const n=this._definition.rules[t.method],i=t.args;a(n,"Unknown rule",t.method);const s=this.clone();if(i){a(1===Object.keys(i).length||Object.keys(i).length===this._definition.rules[t.name].args.length,"Invalid rule definition for",this.type,t.name);for(const e in i){let r=i[e];if(n.argsByName){const l=n.argsByName.get(e);if(l.ref&&o.isResolvable(r))t._resolve.push(e),s.$_mutateRegister(r);else if(l.normalize&&(r=l.normalize(r),i[e]=r),l.assert){const t=o.validateArg(r,e,l);a(!t,t,"or reference")}}void 0!==r?i[e]=r:delete i[e]}}return n.multi||(s._ruleRemove(t.name,{clone:!1}),s._singleRules.set(t.name,t)),!1===s.$_temp.ruleset&&(s.$_temp.ruleset=null),n.priority?s._rules.unshift(t):s._rules.push(t),s}$_compile(e,t){return c.schema(this.$_root,e,t)}$_createError(e,t,n,a,i){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const r=!1!==s.flags?this._flags:{},l=s.messages?g.merge(this._definition.messages,s.messages):this._definition.messages;return new u.Report(e,t,n,r,l,a,i)}$_getFlag(e){return this._flags[e]}$_getRule(e){return this._singleRules.get(e)}$_mapLabels(e){return e=Array.isArray(e)?e:e.split("."),this._ids.labels(e)}$_match(e,t,n,a){(n=Object.assign({},n)).abortEarly=!0,n._externals=!1,t.snapshot();const i=!h.validate(e,this,t,n,a).errors;return t.restore(),i}$_modify(e){return o.assertOptions(e,["each","once","ref","schema"]),j.schema(this,e)||this}$_mutateRebuild(){return a(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(e,t)=>{let{source:n,name:a,path:i,key:s}=t;const r=this._definition[n][a]&&this._definition[n][a].register;!1!==r&&this.$_mutateRegister(e,{family:r,key:s})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(e){let{family:t,key:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._refs.register(e,t),this._ids.register(e,{key:n})}$_property(e){return this._definition.properties[e]}$_reach(e){return this._ids.reach(e)}$_rootReferences(){return this._refs.roots()}$_setFlag(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a("_"===e[0]||!this._inRuleset(),"Cannot set flag inside a ruleset");const i=this._definition.flags[e]||{};if(s(t,i.default)&&(t=void 0),s(t,this._flags[e]))return this;const r=!1!==n.clone?this.clone():this;return void 0!==t?(r._flags[e]=t,r.$_mutateRegister(t)):delete r._flags[e],"_"!==e[0]&&(r.$_temp.ruleset=!1),r}$_parent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{};return o.assertOptions(n,"literal"),a(void 0!==t,"Missing",e,"value"),a("function"==typeof t||!n.literal,"Only function value supports literal option"),"function"==typeof t&&n.literal&&(t={[o.symbols.literal]:!0,literal:t}),this.$_setFlag(e,t)}_generate(e,t,n){if(!this.$_terms.whens)return{schema:this};const a=[],i=[];for(let s=0;sc)break}const s=i.join(", ");if(t.mainstay.tracer.debug(t,"rule","when",s),!s)return{schema:this};if(!t.mainstay.tracer.active&&this.$_temp.whens[s])return{schema:this.$_temp.whens[s],id:s};let r=this;this._definition.generate&&(r=this._definition.generate(this,e,t,n));for(const e of a)r=r.concat(e);return this.$_root._tracer&&this.$_root._tracer._combine(r,[this,...a]),this.$_temp.whens[s]=r,{schema:r,id:s}}_inner(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a(!this._inRuleset(),`Cannot set ${e} inside a ruleset`);const i=this.clone();return i.$_terms[e]&&!n.override||(i.$_terms[e]=[]),n.single?i.$_terms[e].push(t):i.$_terms[e].push(...t),i.$_temp.ruleset=!1,i}_inRuleset(){return null!==this.$_temp.ruleset&&!1!==this.$_temp.ruleset}_ruleRemove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this._singleRules.has(e))return this;const n=!1!==t.clone?this.clone():this;n._singleRules.delete(e);const a=[];for(let t=0;t{"use strict";const a=n(375),i=n(8571),s=n(8160),r={max:1e3,supported:new Set(["undefined","boolean","number","string"])};t.provider={provision:e=>new r.Cache(e)},r.Cache=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s.assertOptions(e,["max"]),a(void 0===e.max||e.max&&e.max>0&&isFinite(e.max),"Invalid max cache size"),this._max=e.max||r.max,this._map=new Map,this._list=new r.List}get length(){return this._map.size}set(e,t){if(null!==e&&!r.supported.has(typeof e))return;let n=this._map.get(e);if(n)return n.value=t,void this._list.first(n);n=this._list.unshift({key:e,value:t}),this._map.set(e,n),this._compact()}get(e){const t=this._map.get(e);if(t)return this._list.first(t),i(t.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},r.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:t,prev:n}=e;return t.prev=n,n&&(n.next=t),e===this.tail&&(this.tail=t),e.prev=null,e.next=null,e}}},8160:(e,t,n)=>{"use strict";const a=n(375),i=n(7916),s=n(5934);let r,l;const o={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};t.version=s.version,t.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},t.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},t.assertOptions=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Options";a(e&&"object"==typeof e&&!Array.isArray(e),"Options must be of type object");const i=Object.keys(e).filter((e=>!t.includes(e)));a(0===i.length,`${n} contain unknown keys: ${i}`)},t.checkPreferences=function(e){l=l||n(3378);const t=l.preferences.validate(e);if(t.error)throw new i([t.error.details[0].message])},t.compare=function(e,t,n){switch(n){case"=":return e===t;case">":return e>t;case"<":return e=":return e>=t;case"<=":return e<=t}},t.default=function(e,t){return void 0===e?t:e},t.isIsoDate=function(e){return o.isoDate.test(e)},t.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},t.isResolvable=function(e){return!!e&&(e[t.symbols.ref]||e[t.symbols.template])},t.isSchema=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=e&&e[t.symbols.any];return!!i&&(a(n.legacy||i.version===t.version,"Cannot mix different versions of joi schemas"),!0)},t.isValues=function(e){return e[t.symbols.values]},t.limit=function(e){return Number.isSafeInteger(e)&&e>=0},t.preferences=function(e,a){r=r||n(6914),e=e||{},a=a||{};const i=Object.assign({},e,a);return a.errors&&e.errors&&(i.errors=Object.assign({},e.errors,a.errors),i.errors.wrap=Object.assign({},e.errors.wrap,a.errors.wrap)),a.messages&&(i.messages=r.compile(a.messages,e.messages)),delete i[t.symbols.prefs],i},t.tryWithPath=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{return e()}catch(e){throw void 0!==e.path?e.path=t+"."+e.path:e.path=t,n.append&&(e.message=`${e.message} (${e.path})`),e}},t.validateArg=function(e,n,a){let{assert:i,message:s}=a;if(t.isSchema(i)){const t=i.validate(e);if(!t.error)return;return t.error.message}if(!i(e))return n?`${n} ${s}`:s},t.verifyFlat=function(e,t){for(const n of e)a(!Array.isArray(n),"Method no longer accepts array arguments:",t)}},3292:(e,t,n)=>{"use strict";const a=n(375),i=n(8160),s=n(6133),r={};t.schema=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.assertOptions(n,["appendPath","override"]);try{return r.schema(e,t,n)}catch(e){throw n.appendPath&&void 0!==e.path&&(e.message=`${e.message} (${e.path})`),e}},r.schema=function(e,t,n){a(void 0!==t,"Invalid undefined schema"),Array.isArray(t)&&(a(t.length,"Invalid empty array schema"),1===t.length&&(t=t[0]));const s=function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:{};i.assertOptions(s,["legacy"]);const l=n&&n[i.symbols.any];if(l)return a(s.legacy||l.version===i.version,"Cannot mix different versions of joi schemas:",l.version,i.version),n;if("object"!=typeof n||!s.legacy)return t.schema(e,n,{appendPath:!0});const o=r.walk(n);return o?o.compile(o.root,n):t.schema(e,n,{appendPath:!0})},r.walk=function(e){if("object"!=typeof e)return null;if(Array.isArray(e)){for(const t of e){const e=r.walk(t);if(e)return e}return null}const t=e[i.symbols.any];if(t)return{root:e[t.root],compile:t.compile};a(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const t in e){const n=r.walk(e[t]);if(n)return n}return null},r.simple=function(e){return null===e||["boolean","string","number"].includes(typeof e)},t.when=function(e,n,l){if(void 0===l&&(a(n&&"object"==typeof n,"Missing options"),l=n,n=s.create(".")),Array.isArray(l)&&(l={switch:l}),i.assertOptions(l,["is","not","then","otherwise","switch","break"]),i.isSchema(n))return a(void 0===l.is,'"is" can not be used with a schema condition'),a(void 0===l.not,'"not" can not be used with a schema condition'),a(void 0===l.switch,'"switch" can not be used with a schema condition'),r.condition(e,{is:n,then:l.then,otherwise:l.otherwise,break:l.break});if(a(s.isRef(n)||"string"==typeof n,"Invalid condition:",n),a(void 0===l.not||void 0===l.is,'Cannot combine "is" with "not"'),void 0===l.switch){let o=l;void 0!==l.not&&(o={is:l.not,then:l.otherwise,otherwise:l.then,break:l.break});let c=void 0!==o.is?e.$_compile(o.is):e.$_root.invalid(null,!1,0,"").required();return a(void 0!==o.then||void 0!==o.otherwise,'options must have at least one of "then", "otherwise", or "switch"'),a(void 0===o.break||void 0===o.then||void 0===o.otherwise,"Cannot specify then, otherwise, and break all together"),void 0===l.is||s.isRef(l.is)||i.isSchema(l.is)||(c=c.required()),r.condition(e,{ref:t.ref(n),is:c,then:o.then,otherwise:o.otherwise,break:o.break})}a(Array.isArray(l.switch),'"switch" must be an array'),a(void 0===l.is,'Cannot combine "switch" with "is"'),a(void 0===l.not,'Cannot combine "switch" with "not"'),a(void 0===l.then,'Cannot combine "switch" with "then"');const o={ref:t.ref(n),switch:[],break:l.break};for(let t=0;t{"use strict";const a=n(5688),i=n(8160),s=n(3328);t.Report=class{constructor(e,n,a,i,s,r,l){if(this.code=e,this.flags=i,this.messages=s,this.path=r.path,this.prefs=l,this.state=r,this.value=n,this.message=null,this.template=null,this.local=a||{},this.local.label=t.label(this.flags,this.state,this.prefs,this.messages),void 0===this.value||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const e=this.path[this.path.length-1];"object"!=typeof e&&(this.local.key=e)}}_setTemplate(e){if(this.template=e,!this.flags.label&&0===this.path.length){const e=this._template(this.template,"root");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const e=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return void 0===t?`Error code "${e}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(e,n){return t.template(this.value,e,n||this.code,this.state,this.prefs)}},t.path=function(e){let t="";for(const n of e)"object"!=typeof n&&("string"==typeof n?(t&&(t+="."),t+=n):t+=`[${n}]`);return t},t.template=function(e,t,n,a,r){if(!t)return;if(s.isTemplate(t))return"root"!==n?t:null;let l=r.errors.language;if(i.isResolvable(l)&&(l=l.resolve(e,a,r)),l&&t[l]){if(void 0!==t[l][n])return t[l][n];if(void 0!==t[l]["*"])return t[l]["*"]}return t[n]?t[n]:t["*"]},t.label=function(e,n,a,i){if(e.label)return e.label;if(!a.errors.label)return"";let s=n.path;return"key"===a.errors.label&&n.path.length>1&&(s=n.path.slice(-1)),t.path(s)||t.template(null,a.messages,"root",n,a)||i&&t.template(null,i,"root",n,a)||"value"},t.process=function(e,n,a){if(!e)return null;const{override:i,message:s,details:r}=t.details(e);if(i)return i;if(a.errors.stack)return new t.ValidationError(s,r,n);const l=Error.stackTraceLimit;Error.stackTraceLimit=0;const o=new t.ValidationError(s,r,n);return Error.stackTraceLimit=l,o},t.details=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];const a=[];for(const i of e){if(i instanceof Error){if(!1!==t.override)return{override:i};const e=i.toString();n.push(e),a.push({message:e,type:"override",context:{error:i}});continue}const e=i.toString();n.push(e),a.push({message:e,path:i.path.filter((e=>"object"!=typeof e)),type:i.code,context:i.local})}return n.length>1&&(n=[...new Set(n)]),{message:n.join(". "),details:a}},t.ValidationError=class extends Error{constructor(e,t,n){super(e),this._original=n,this.details=t}static isError(e){return e instanceof t.ValidationError}},t.ValidationError.prototype.isJoi=!0,t.ValidationError.prototype.name="ValidationError",t.ValidationError.prototype.annotate=a.error},8901:(e,t,n)=>{"use strict";const a=n(375),i=n(8571),s=n(8160),r=n(6914),l={};t.type=function(e,t){const n=Object.getPrototypeOf(e),o=i(n),c=e._assign(Object.create(o)),u=Object.assign({},t);delete u.base,o._definition=u;const d=n._definition||{};u.messages=r.merge(d.messages,u.messages),u.properties=Object.assign({},d.properties,u.properties),c.type=u.type,u.flags=Object.assign({},d.flags,u.flags);const p=Object.assign({},d.terms);if(u.terms)for(const e in u.terms){const t=u.terms[e];a(void 0===c.$_terms[e],"Invalid term override for",u.type,e),c.$_terms[e]=t.init,p[e]=t}u.terms=p,u.args||(u.args=d.args),u.prepare=l.prepare(u.prepare,d.prepare),u.coerce&&("function"==typeof u.coerce&&(u.coerce={method:u.coerce}),u.coerce.from&&!Array.isArray(u.coerce.from)&&(u.coerce={method:u.coerce.method,from:[].concat(u.coerce.from)})),u.coerce=l.coerce(u.coerce,d.coerce),u.validate=l.validate(u.validate,d.validate);const g=Object.assign({},d.rules);if(u.rules)for(const e in u.rules){const t=u.rules[e];a("object"==typeof t,"Invalid rule definition for",u.type,e);let n=t.method;if(void 0===n&&(n=function(){return this.$_addRule(e)}),n&&(a(!o[e],"Rule conflict in",u.type,e),o[e]=n),a(!g[e],"Rule conflict in",u.type,e),g[e]=t,t.alias){const e=[].concat(t.alias);for(const n of e)o[n]=t.method}t.args&&(t.argsByName=new Map,t.args=t.args.map((e=>("string"==typeof e&&(e={name:e}),a(!t.argsByName.has(e.name),"Duplicated argument name",e.name),s.isSchema(e.assert)&&(e.assert=e.assert.strict().label(e.name)),t.argsByName.set(e.name,e),e))))}u.rules=g;const j=Object.assign({},d.modifiers);if(u.modifiers)for(const e in u.modifiers){a(!o[e],"Rule conflict in",u.type,e);const t=u.modifiers[e];a("function"==typeof t,"Invalid modifier definition for",u.type,e);const n=function(t){return this.rule({[e]:t})};o[e]=n,j[e]=t}if(u.modifiers=j,u.overrides){o._super=n,c.$_super={};for(const e in u.overrides)a(n[e],"Cannot override missing",e),u.overrides[e][s.symbols.parent]=n[e],c.$_super[e]=n[e].bind(c);Object.assign(o,u.overrides)}u.cast=Object.assign({},d.cast,u.cast);const x=Object.assign({},d.manifest,u.manifest);return x.build=l.build(u.manifest&&u.manifest.build,d.manifest&&d.manifest.build),u.manifest=x,u.rebuild=l.rebuild(u.rebuild,d.rebuild),c},l.build=function(e,t){return e&&t?function(n,a){return t(e(n,a),a)}:e||t},l.coerce=function(e,t){return e&&t?{from:e.from&&t.from?[...new Set([...e.from,...t.from])]:null,method(n,a){let i;if((!t.from||t.from.includes(typeof n))&&(i=t.method(n,a),i)){if(i.errors||void 0===i.value)return i;n=i.value}if(!e.from||e.from.includes(typeof n)){const t=e.method(n,a);if(t)return t}return i}}:e||t},l.prepare=function(e,t){return e&&t?function(n,a){const i=e(n,a);if(i){if(i.errors||void 0===i.value)return i;n=i.value}return t(n,a)||i}:e||t},l.rebuild=function(e,t){return e&&t?function(n){t(n),e(n)}:e||t},l.validate=function(e,t){return e&&t?function(n,a){const i=t(n,a);if(i){if(i.errors&&(!Array.isArray(i.errors)||i.errors.length))return i;n=i.value}return e(n,a)||i}:e||t}},5107:(e,t,n)=>{"use strict";const a=n(375),i=n(8571),s=n(8652),r=n(8160),l=n(3292),o=n(6354),c=n(8901),u=n(9708),d=n(6133),p=n(3328),g=n(1152);let j;const x={types:{alternatives:n(4946),any:n(8068),array:n(546),boolean:n(4937),date:n(7500),function:n(390),link:n(8785),number:n(3832),object:n(8966),string:n(7417),symbol:n(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const e={_types:new Set(Object.keys(x.types))};for(const t of e._types)e[t]=function(){for(var e=arguments.length,n=new Array(e),i=0;i2?n-2:0),i=2;i2?n-2:0),i=2;i{"use strict";const a=n(375),i=n(8571),s=n(3328);t.compile=function(e,t){if("string"==typeof e)return a(!t,"Cannot set single message string"),new s(e);if(s.isTemplate(e))return a(!t,"Cannot set single message template"),e;a("object"==typeof e&&!Array.isArray(e),"Invalid message options"),t=t?i(t):{};for(let n in e){const i=e[n];if("root"===n||s.isTemplate(i)){t[n]=i;continue}if("string"==typeof i){t[n]=new s(i);continue}a("object"==typeof i&&!Array.isArray(i),"Invalid message for",n);const r=n;for(n in t[r]=t[r]||{},i){const e=i[n];"root"===n||s.isTemplate(e)?t[r][n]=e:(a("string"==typeof e,"Invalid message for",n,"in",r),t[r][n]=new s(e))}}return t},t.decompile=function(e){const t={};for(let n in e){const a=e[n];if("root"===n){t.root=a;continue}if(s.isTemplate(a)){t[n]=a.describe({compact:!0});continue}const i=n;for(n in t[i]={},a){const e=a[n];"root"!==n?t[i][n]=e.describe({compact:!0}):t[i].root=e}}return t},t.merge=function(e,n){if(!e)return t.compile(n);if(!n)return e;if("string"==typeof n)return new s(n);if(s.isTemplate(n))return n;const r=i(e);for(let e in n){const t=n[e];if("root"===e||s.isTemplate(t)){r[e]=t;continue}if("string"==typeof t){r[e]=new s(t);continue}a("object"==typeof t&&!Array.isArray(t),"Invalid message for",e);const i=e;for(e in r[i]=r[i]||{},t){const n=t[e];"root"===e||s.isTemplate(n)?r[i][e]=n:(a("string"==typeof n,"Invalid message for",e,"in",i),r[i][e]=new s(n))}}return r}},2294:(e,t,n)=>{"use strict";const a=n(375),i=n(8160),s=n(6133),r={};t.Ids=r.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new r.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(const[t,n]of e._byId.entries())a(!this._byKey.has(t),"Schema id conflicts with existing key:",t),this._byId.set(t,n);for(const[t,n]of e._byKey.entries())a(!this._byId.has(t),"Schema key conflicts with existing id:",t),this._byKey.set(t,n)}fork(e,t,n){const s=this._collect(e);s.push({schema:n});const l=s.shift();let o={id:l.id,schema:t(l.schema)};a(i.isSchema(o.schema),"adjuster function failed to return a joi schema type");for(const e of s)o={id:e.id,schema:r.fork(e.schema,o.id,o.schema)};return o.schema}labels(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=e[0],a=this._get(n);if(!a)return[...t,...e].join(".");const i=e.slice(1);return t=[...t,a.schema._flags.label||n],i.length?a.schema._ids.labels(i,t):t.join(".")}reach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=e[0],i=this._get(n);a(i,"Schema does not contain path",[...t,...e].join("."));const s=e.slice(1);return s.length?i.schema._ids.reach(s,[...t,n]):i.schema}register(e){let{key:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||!i.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const n=e._flags.id;if(n){const t=this._byId.get(n);a(!t||t.schema===e,"Cannot add different schemas with the same id:",n),a(!this._byKey.has(n),"Schema id conflicts with existing key:",n),this._byId.set(n,{schema:e,id:n})}t&&(a(!this._byKey.has(t),"Schema already contains key:",t),a(!this._byId.has(t),"Schema key conflicts with existing id:",t),this._byKey.set(t,{schema:e,id:t}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=e[0],s=this._get(i);a(s,"Schema does not contain path",[...t,...e].join(".")),n=[s,...n];const r=e.slice(1);return r.length?s.schema._ids._collect(r,[...t,i],n):n}_get(e){return this._byId.get(e)||this._byKey.get(e)}},r.fork=function(e,n,a){const i=t.schema(e,{each:(e,t)=>{let{key:i}=t;if(n===(e._flags.id||i))return a},ref:!1});return i?i.$_mutateRebuild():e},t.schema=function(e,t){let n;for(const a in e._flags){if("_"===a[0])continue;const i=r.scan(e._flags[a],{source:"flags",name:a},t);void 0!==i&&(n=n||e.clone(),n._flags[a]=i)}for(let a=0;a{"use strict";const a=n(375),i=n(8571),s=n(9621),r=n(8160);let l;const o={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};t.create=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a("string"==typeof e,"Invalid reference key:",e),r.assertOptions(t,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),a(!t.prefix||"object"==typeof t.prefix,"options.prefix must be of type object");const n=Object.assign({},o.defaults,t);delete n.prefix;const i=n.separator,s=o.context(e,i,t.prefix);if(n.type=s.type,e=s.key,"value"===n.type)if(s.root&&(a(!i||e[0]!==i,"Cannot specify relative path with root prefix"),n.ancestor="root",e||(e=null)),i&&i===e)e=null,n.ancestor=0;else if(void 0!==n.ancestor)a(!i||!e||e[0]!==i,"Cannot combine prefix with ancestor option");else{const[t,a]=o.ancestor(e,i);a&&""===(e=e.slice(a))&&(e=null),n.ancestor=t}return n.path=i?null===e?[]:e.split(i):[e],new o.Ref(n)},t.in=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.create(e,{...n,in:!0})},t.isRef=function(e){return!!e&&!!e[r.symbols.ref]},o.Ref=class{constructor(e){a("object"==typeof e,"Invalid reference construction"),r.assertOptions(e,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),a([!1,void 0].includes(e.separator)||"string"==typeof e.separator&&1===e.separator.length,"Invalid separator"),a(!e.adjust||"function"==typeof e.adjust,"options.adjust must be a function"),a(!e.map||Array.isArray(e.map),"options.map must be an array"),a(!e.map||!e.adjust,"Cannot set both map and adjust options"),Object.assign(this,o.defaults,e),a("value"===this.type||void 0===this.ancestor,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(e,t,n,i){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return a(!this.in||s.in,"Invalid in() reference usage"),"global"===this.type?this._resolve(n.context,t,s):"local"===this.type?this._resolve(i,t,s):this.ancestor?"root"===this.ancestor?this._resolve(t.ancestors[t.ancestors.length-1],t,s):(a(this.ancestor<=t.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(t.ancestors[this.ancestor-1],t,s)):this._resolve(e,t,s)}_resolve(e,t,n){let a;if("value"===this.type&&t.mainstay.shadow&&!1!==n.shadow&&(a=t.mainstay.shadow.get(this.absolute(t))),void 0===a&&(a=s(e,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(a=this.adjust(a)),this.map){const e=this.map.get(a);void 0!==e&&(a=e)}return t.mainstay&&t.mainstay.tracer.resolve(t,this,a),a}toString(){return this.display}absolute(e){return[...e.path.slice(0,-this.ancestor),...this.path]}clone(){return new o.Ref(this)}describe(){const e={path:this.path};"value"!==this.type&&(e.type=this.type),"."!==this.separator&&(e.separator=this.separator),"value"===this.type&&1!==this.ancestor&&(e.ancestor=this.ancestor),this.map&&(e.map=[...this.map]);for(const t of["adjust","iterables","render"])null!==this[t]&&void 0!==this[t]&&(e[t]=this[t]);return!1!==this.in&&(e.in=!0),{ref:e}}updateDisplay(){const e=null!==this.key?this.key:"";if("value"!==this.type)return void(this.display=`ref:${this.type}:${e}`);if(!this.separator)return void(this.display=`ref:${e}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${e}`);if("root"===this.ancestor)return void(this.display=`ref:root:${e}`);if(1===this.ancestor)return void(this.display=`ref:${e||".."}`);const t=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${t}${e||""}`}},o.Ref.prototype[r.symbols.ref]=!0,t.build=function(e){return"value"===(e=Object.assign({},o.defaults,e)).type&&void 0===e.ancestor&&(e.ancestor=1),new o.Ref(e)},o.context=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e=e.trim(),n){const a=void 0===n.global?"$":n.global;if(a!==t&&e.startsWith(a))return{key:e.slice(a.length),type:"global"};const i=void 0===n.local?"#":n.local;if(i!==t&&e.startsWith(i))return{key:e.slice(i.length),type:"local"};const s=void 0===n.root?"/":n.root;if(s!==t&&e.startsWith(s))return{key:e.slice(s.length),type:"value",root:!0}}return{key:e,type:"value"}},o.ancestor=function(e,t){if(!t)return[1,0];if(e[0]!==t)return[1,0];if(e[1]!==t)return[0,1];let n=2;for(;e[n]===t;)++n;return[n-1,n]},t.toSibling=0,t.toParent=1,t.Manager=class{constructor(){this.refs=[]}register(e,a){if(e)if(a=void 0===a?t.toParent:a,Array.isArray(e))for(const t of e)this.register(t,a);else if(r.isSchema(e))for(const t of e._refs.refs)t.ancestor-a>=0&&this.refs.push({ancestor:t.ancestor-a,root:t.root});else t.isRef(e)&&"value"===e.type&&e.ancestor-a>=0&&this.refs.push({ancestor:e.ancestor-a,root:e.root}),l=l||n(3328),l.isTemplate(e)&&this.register(e.refs(),a)}get length(){return this.refs.length}clone(){const e=new t.Manager;return e.refs=i(this.refs),e}reset(){this.refs=[]}roots(){return this.refs.filter((e=>!e.ancestor)).map((e=>e.root))}}},3378:(e,t,n)=>{"use strict";const a=n(5107),i={};i.wrap=a.string().min(1).max(2).allow(!1),t.preferences=a.object({allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),context:a.object(),convert:a.boolean(),dateFormat:a.valid("date","iso","string","time","utc"),debug:a.boolean(),errors:{escapeHtml:a.boolean(),label:a.valid("path","key",!1),language:[a.string(),a.object().ref()],render:a.boolean(),stack:a.boolean(),wrap:{label:i.wrap,array:i.wrap,string:i.wrap}},externals:a.boolean(),messages:a.object(),noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:a.valid("required","optional","forbidden"),skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()}).strict(),i.nameRx=/^[a-zA-Z0-9]\w*$/,i.rule=a.object({alias:a.array().items(a.string().pattern(i.nameRx)).single(),args:a.array().items(a.string(),a.object({name:a.string().pattern(i.nameRx).required(),ref:a.boolean(),assert:a.alternatives([a.function(),a.object().schema()]).conditional("ref",{is:!0,then:a.required()}),normalize:a.function(),message:a.string().when("assert",{is:a.function(),then:a.required()})})),convert:a.boolean(),manifest:a.boolean(),method:a.function().allow(!1),multi:a.boolean(),validate:a.function()}),t.extension=a.object({type:a.alternatives([a.string(),a.object().regex()]).required(),args:a.function(),cast:a.object().pattern(i.nameRx,a.object({from:a.function().maxArity(1).required(),to:a.function().minArity(1).maxArity(2).required()})),base:a.object().schema().when("type",{is:a.object().regex(),then:a.forbidden()}),coerce:[a.function().maxArity(3),a.object({method:a.function().maxArity(3).required(),from:a.array().items(a.string()).single()})],flags:a.object().pattern(i.nameRx,a.object({setter:a.string(),default:a.any()})),manifest:{build:a.function().arity(2)},messages:[a.object(),a.string()],modifiers:a.object().pattern(i.nameRx,a.function().minArity(1).maxArity(2)),overrides:a.object().pattern(i.nameRx,a.function()),prepare:a.function().maxArity(3),rebuild:a.function().arity(1),rules:a.object().pattern(i.nameRx,i.rule),terms:a.object().pattern(i.nameRx,a.object({init:a.array().allow(null).required(),manifest:a.object().pattern(/.+/,[a.valid("schema","single"),a.object({mapped:a.object({from:a.string().required(),to:a.string().required()}).required()})])})),validate:a.function().maxArity(3)}).strict(),t.extensions=a.array().items(a.object(),a.function().arity(1)).strict(),i.desc={buffer:a.object({buffer:a.string()}),func:a.object({function:a.function().required(),options:{literal:!0}}),override:a.object({override:!0}),ref:a.object({ref:a.object({type:a.valid("value","global","local"),path:a.array().required(),separator:a.string().length(1).allow(!1),ancestor:a.number().min(0).integer().allow("root"),map:a.array().items(a.array().length(2)).min(1),adjust:a.function(),iterables:a.boolean(),in:a.boolean(),render:a.boolean()}).required()}),regex:a.object({regex:a.string().min(3)}),special:a.object({special:a.valid("deep").required()}),template:a.object({template:a.string().required(),options:a.object()}),value:a.object({value:a.alternatives([a.object(),a.array()]).required()})},i.desc.entity=a.alternatives([a.array().items(a.link("...")),a.boolean(),a.function(),a.number(),a.string(),i.desc.buffer,i.desc.func,i.desc.ref,i.desc.regex,i.desc.special,i.desc.template,i.desc.value,a.link("/")]),i.desc.values=a.array().items(null,a.boolean(),a.function(),a.number().allow(1/0,-1/0),a.string().allow(""),a.symbol(),i.desc.buffer,i.desc.func,i.desc.override,i.desc.ref,i.desc.regex,i.desc.template,i.desc.value),i.desc.messages=a.object().pattern(/.+/,[a.string(),i.desc.template,a.object().pattern(/.+/,[a.string(),i.desc.template])]),t.description=a.object({type:a.string().required(),flags:a.object({cast:a.string(),default:a.any(),description:a.string(),empty:a.link("/"),failover:i.desc.entity,id:a.string(),label:a.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:a.boolean(),unit:a.string()}).unknown(),preferences:{allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),convert:a.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:a.boolean(),label:["path","key"],language:[a.string(),i.desc.ref],wrap:{label:i.wrap,array:i.wrap}},externals:a.boolean(),messages:i.desc.messages,noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:["required","optional","forbidden"],skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()},allow:i.desc.values,invalid:i.desc.values,rules:a.array().min(1).items({name:a.string().required(),args:a.object().min(1),keep:a.boolean(),message:[a.string(),i.desc.messages],warn:a.boolean()}),keys:a.object().pattern(/.*/,a.link("/")),link:i.desc.ref}).pattern(/^[a-z]\w*$/,a.any())},493:(e,t,n)=>{"use strict";const a=n(8571),i=n(9621),s=n(8160),r={value:Symbol("value")};e.exports=r.State=class{constructor(e,t,n){this.path=e,this.ancestors=t,this.mainstay=n.mainstay,this.schemas=n.schemas,this.debug=null}localize(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const a=new r.State(e,t,this);return n&&a.schemas&&(a.schemas=[r.schemas(n),...a.schemas]),a}nest(e,t){const n=new r.State(this.path,this.ancestors,this);return n.schemas=n.schemas&&[r.schemas(e),...n.schemas],n.debug=t,n}shadow(e,t){this.mainstay.shadow=this.mainstay.shadow||new r.Shadow,this.mainstay.shadow.set(this.path,e,t)}snapshot(){this.mainstay.shadow&&(this._snapshot=a(this.mainstay.shadow.node(this.path)))}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0)}},r.schemas=function(e){return s.isSchema(e)?{schema:e}:e},r.Shadow=class{constructor(){this._values=null}set(e,t,n){if(!e.length)return;if("strip"===n&&"number"==typeof e[e.length-1])return;this._values=this._values||new Map;let a=this._values;for(let t=0;t{"use strict";const a=n(375),i=n(8571),s=n(5277),r=n(1447),l=n(8160),o=n(6354),c=n(6133),u={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};e.exports=u.Template=class{constructor(e,t){a("string"==typeof e,"Template source must be a string"),a(!e.includes("\0")&&!e.includes(""),"Template source cannot contain reserved control characters"),this.source=e,this.rendered=e,this._template=null,this._settings=i(t),this._parse()}_parse(){if(!this.source.includes("{"))return;const e=u.encode(this.source),t=u.split(e);let n=!1;const a=[],i=t.shift();i&&a.push(i);for(const e of t){const t="{"!==e[0],i=t?"}":"}}",s=e.indexOf(i);if(-1===s||"{"===e[1]){a.push(`{${u.decode(e)}`);continue}let r=e.slice(t?0:1,s);const l=":"===r[0];l&&(r=r.slice(1));const o=this._ref(u.decode(r),{raw:t,wrapped:l});a.push(o),"string"!=typeof o&&(n=!0);const c=e.slice(s+i.length);c&&a.push(u.decode(c))}n?this._template=a:this.rendered=a.join("")}static date(e,t){return u.dateFormat[t.dateFormat].call(e)}describe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this._settings&&e.compact)return this.source;const t={template:this.source};return this._settings&&(t.options=this._settings),t}static build(e){return new u.Template(e.template,e.options)}isDynamic(){return!!this._template}static isTemplate(e){return!!e&&!!e[l.symbols.template]}refs(){if(!this._template)return;const e=[];for(const t of this._template)"string"!=typeof t&&e.push(...t.refs);return e}resolve(e,t,n,a){return this._template&&1===this._template.length?this._part(this._template[0],e,t,n,a,{}):this.render(e,t,n,a)}_part(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a4&&void 0!==arguments[4]?arguments[4]:{};if(!this.isDynamic())return this.rendered;const r=[];for(const l of this._template)if("string"==typeof l)r.push(l);else{const o=this._part(l,e,t,n,a,i),c=u.stringify(o,e,t,n,a,i);if(void 0!==c){const e=l.raw||!1===(i.errors&&i.errors.escapeHtml)?c:s(c);r.push(u.wrap(e,l.wrapped&&n.errors.wrap.label))}}return r.join("")}_ref(e,t){let{raw:n,wrapped:a}=t;const i=[],s=e=>{const t=c.create(e,this._settings);return i.push(t),e=>t.resolve(...e)};try{var l=new r.Parser(e,{reference:s,functions:u.functions,constants:u.constants})}catch(t){throw t.message=`Invalid template variable "${e}" fails due to: ${t.message}`,t}if(l.single){if("reference"===l.single.type){const e=i[0];return{ref:e,raw:n,refs:i,wrapped:a||"local"===e.type&&"label"===e.key}}return u.stringify(l.single.value)}return{formula:l,raw:n,refs:i}}toString(){return this.source}},u.Template.prototype[l.symbols.template]=!0,u.Template.prototype.isImmutable=!0,u.encode=function(e){return e.replace(/\\(\{+)/g,((e,t)=>u.opens.slice(0,t.length))).replace(/\\(\}+)/g,((e,t)=>u.closes.slice(0,t.length)))},u.decode=function(e){return e.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},u.split=function(e){const t=[];let n="";for(let a=0;a5&&void 0!==arguments[5]?arguments[5]:{};const r=typeof e,l=a&&a.errors&&a.errors.wrap||{};let o=!1;if(c.isRef(e)&&e.render&&(o=e.in,e=e.resolve(t,n,a,i,{in:e.in,...s})),null===e)return"null";if("string"===r)return u.wrap(e,s.arrayItems&&l.string);if("number"===r||"function"===r||"symbol"===r)return e.toString();if("object"!==r)return JSON.stringify(e);if(e instanceof Date)return u.Template.date(e,a);if(e instanceof Map){const t=[];for(const[n,a]of e.entries())t.push(`${n.toString()} -> ${a.toString()}`);e=t}if(!Array.isArray(e))return e.toString();const d=[];for(const r of e)d.push(u.stringify(r,t,n,a,i,{arrayItems:!0,...s}));return u.wrap(d.join(", "),!o&&l.array)},u.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},u.functions={if:(e,t,n)=>e?t:n,length:e=>"string"==typeof e?e.length:e&&"object"==typeof e?Array.isArray(e)?e.length:Object.keys(e).length:null,msg(e){const[t,n,a,i,s]=this,r=s.messages;if(!r)return"";const l=o.template(t,r[0],e,n,a)||o.template(t,r[1],e,n,a);return l?l.render(t,n,a,i,s):""},number:e=>"number"==typeof e?e:"string"==typeof e?parseFloat(e):"boolean"==typeof e?e?1:0:e instanceof Date?e.getTime():null}},4946:(e,t,n)=>{"use strict";const a=n(375),i=n(1687),s=n(8068),r=n(8160),l=n(3292),o=n(6354),c=n(6133),u={};e.exports=s.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:c.toSibling}},args(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;ao.details(e,{override:!1})))})};if("one"===n._flags.match)return 1===t.length?{value:t[0]}:{errors:a("alternatives.one")};if(t.length!==n.$_terms.matches.length)return{errors:a("alternatives.all",{details:l.map((e=>o.details(e,{override:!1})))})};const c=e=>e.$_terms.matches.some((e=>"object"===e.schema.type||"alternatives"===e.schema.type&&c(e.schema)));return c(n)?{value:t.reduce(((e,t)=>i(e,t,{mergeArrays:!1})))}:{value:t[t.length-1]}}const l=[];for(let t=0;t"is"!==n.path[0]?t.label(e):void 0,ref:!1})}},rebuild(e){e.$_modify({each:t=>{r.isSchema(t)&&"array"===t.type&&e.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(e,t){if(t.matches)for(const n of t.matches){const{schema:t,ref:a,is:i,not:s,then:r,otherwise:l}=n;e=t?e.try(t):a?e.conditional(a,{is:i,then:r,not:s,otherwise:l,switch:n.switch}):e.conditional(i,{then:r,otherwise:l})}return e}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),u.errors=function(e,t){let{error:n,state:a}=t;if(!e.length)return{errors:n("alternatives.any")};if(1===e.length)return{errors:e[0].reports};const i=new Set,s=[];for(const{reports:t,schema:r}of e){if(t.length>1)return u.unmatched(e,n);const l=t[0];if(l instanceof o.Report==0)return u.unmatched(e,n);if(l.state.path.length!==a.path.length){s.push({type:r.type,report:l});continue}if("any.only"===l.code){for(const e of l.local.valids)i.add(e);continue}const[c,d]=l.code.split(".");"base"===d?i.add(c):s.push({type:r.type,report:l})}return s.length?1===s.length?{errors:s[0].report}:u.unmatched(e,n):{errors:n("alternatives.types",{types:[...i]})}},u.unmatched=function(e,t){const n=[];for(const t of e)n.push(...t.reports);return{errors:t("alternatives.match",o.details(n,{override:!1}))}}},8068:(e,t,n)=>{"use strict";const a=n(375),i=n(7629),s=n(8160),r=n(6914);e.exports=i.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,t){return a("function"==typeof e,"Method must be a function"),a(void 0===t||t&&"string"==typeof t,"Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:t}})},validate(e,t,n){let{method:a}=n;try{return a(e,t)}catch(e){return t.error("any.custom",{error:e})}},args:["method","description"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){a(s.isSchema(e)&&e._flags.id,"Schema must be a schema with an id");const t=this.clone();return t.$_terms.shared=t.$_terms.shared||[],t.$_terms.shared.push(e),t.$_mutateRegister(e),t}},warning:{method(e,t){return a(e&&"string"==typeof e,"Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:t},warn:!0})},validate(e,t,n){let{code:a,local:i}=n;return t.error(a,i)},args:["code","local"],multi:!0}},modifiers:{keep(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.keep=t},message(e,t){e.message=r.compile(t)},warn(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.warn=t}},manifest:{build(e,t){for(const n in t){const a=t[n];if(["examples","externals","metas","notes","tags"].includes(n))for(const t of a)e=e[n.slice(0,-1)](t);else if("alterations"!==n)if("whens"!==n){if("shared"===n)for(const t of a)e=e.shared(t)}else for(const t of a){const{ref:n,is:a,not:i,then:s,otherwise:r,concat:l}=t;e=l?e.concat(l):n?e.when(n,{is:a,not:i,then:s,otherwise:r,switch:t.switch,break:t.break}):e.when(a,{then:s,otherwise:r,break:t.break})}else{const t={};for(const{target:e,adjuster:n}of a)t[e]=n;e=e.alter(t)}}return e}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(e,t,n)=>{"use strict";const a=n(375),i=n(9474),s=n(9621),r=n(8068),l=n(8160),o=n(3292),c={};e.exports=r.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(e,t){let{schema:n,state:a,prefs:i}=t;if(!Array.isArray(e))return;const s=n.$_getRule("sort");return s?c.sort(n,e,s.args.options,a,i):void 0}},validate(e,t){let{schema:n,error:a}=t;if(!Array.isArray(e)){if(n._flags.single){const t=[e];return t[l.symbols.arraySingle]=!0,{value:t}}return{errors:a("array.base")}}if(n.$_getRule("items")||n.$_terms.externals)return{value:e.slice()}},rules:{has:{method(e){e=this.$_compile(e,{appendPath:!0});const t=this.$_addRule({name:"has",args:{schema:e}});return t.$_mutateRegister(e),t},validate(e,t,n){let{state:a,prefs:i,error:s}=t,{schema:r}=n;const l=[e,...a.ancestors];for(let t=0;tthis.$_compile(t[e])),e,{append:!0});a.$_terms.items.push(n)}return a.$_mutateRebuild()},validate(e,t){let{schema:n,error:a,state:i,prefs:s,errorsArray:r}=t;const o=n.$_terms._requireds.slice(),u=n.$_terms.ordered.slice(),d=[...n.$_terms._inclusions,...o],p=!e[l.symbols.arraySingle];delete e[l.symbols.arraySingle];const g=r();let j=e.length;for(let t=0;t="})}},ordered:{method(){for(var e=arguments.length,t=new Array(e),n=0;nthis.$_compile(t[e])),e,{append:!0});c.validateSingle(n,a),a.$_mutateRegister(n),a.$_terms.ordered.push(n)}return a.$_mutateRebuild()}},single:{method(e){const t=void 0===e||!!e;return a(!t||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",t)}},sort:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.assertOptions(e,["by","order"]);const t={order:e.order||"ascending"};return e.by&&(t.by=o.ref(e.by,{ancestor:0}),a(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(e,t,n){let{error:a,state:i,prefs:s,schema:r}=t,{options:l}=n;const{value:o,errors:u}=c.sort(r,e,l,i,s);if(u)return u;for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{};a(!e||"function"==typeof e||"string"==typeof e,"comparator must be a function or a string"),l.assertOptions(t,["ignoreUndefined","separator"]);const n={name:"unique",args:{options:t,comparator:e}};if(e)if("string"==typeof e){const a=l.default(t.separator,".");n.path=a?e.split(a):[e]}else n.comparator=e;return this.$_addRule(n)},validate(e,t,n,r){let{state:l,error:o,schema:c}=t,{comparator:u,options:d}=n,{comparator:p,path:g}=r;const j={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},x=p||i,M=d.ignoreUndefined;for(let t=0;tnew Set(e)}},rebuild(e){e.$_terms._inclusions=[],e.$_terms._exclusions=[],e.$_terms._requireds=[];for(const t of e.$_terms.items)c.validateSingle(t,e),"required"===t._flags.presence?e.$_terms._requireds.push(t):"forbidden"===t._flags.presence?e.$_terms._exclusions.push(t):e.$_terms._inclusions.push(t);for(const t of e.$_terms.ordered)c.validateSingle(t,e)},manifest:{build:(e,t)=>(t.items&&(e=e.items(...t.items)),t.ordered&&(e=e.ordered(...t.ordered)),e)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),c.fillMissedErrors=function(e,t,n,a,i,s){const r=[];let l=0;for(const e of n){const t=e._flags.label;t?r.push(t):++l}r.length?l?t.push(e.$_createError("array.includesRequiredBoth",a,{knownMisses:r,unknownMisses:l},i,s)):t.push(e.$_createError("array.includesRequiredKnowns",a,{knownMisses:r},i,s)):t.push(e.$_createError("array.includesRequiredUnknowns",a,{unknownMisses:l},i,s))},c.fillOrderedErrors=function(e,t,n,a,i,s){const r=[];for(const e of n)"required"===e._flags.presence&&r.push(e);r.length&&c.fillMissedErrors(e,t,r,a,i,s)},c.fillDefault=function(e,t,n,a){const i=[];let s=!0;for(let r=e.length-1;r>=0;--r){const l=e[r],o=[t,...n.ancestors],c=l.$_validate(void 0,n.localize(n.path,o,l),a).value;if(s){if(void 0===c)continue;s=!1}i.unshift(c)}i.length&&t.push(...i)},c.fastSplice=function(e,t){let n=t;for(;n{let d=c.compare(o,u,r,l);if(null!==d)return d;if(n.by&&(o=n.by.resolve(o,a,i),u=n.by.resolve(u,a,i)),d=c.compare(o,u,r,l),null!==d)return d;const p=typeof o;if(p!==typeof u)throw e.$_createError("array.sort.mismatching",t,null,a,i);if("number"!==p&&"string"!==p)throw e.$_createError("array.sort.unsupported",t,{type:p},a,i);return"number"===p?(o-u)*s:o{"use strict";const a=n(375),i=n(8068),s=n(8160),r=n(2036),l={isBool:function(e){return"boolean"==typeof e}};e.exports=i.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(e,t){let{schema:n}=t;if("boolean"!=typeof e){if("string"==typeof e){const t=n._flags.sensitive?e:e.toLowerCase();e="true"===t||"false"!==t&&e}return"boolean"!=typeof e&&(e=n.$_terms.truthy&&n.$_terms.truthy.has(e,null,null,!n._flags.sensitive)||(!n.$_terms.falsy||!n.$_terms.falsy.has(e,null,null,!n._flags.sensitive))&&e),{value:e}}},validate(e,t){let{error:n}=t;if("boolean"!=typeof e)return{value:e,errors:n("boolean.base")}},rules:{truthy:{method(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("sensitive",e)}}},cast:{number:{from:l.isBool,to:(e,t)=>e?1:0},string:{from:l.isBool,to:(e,t)=>e?"true":"false"}},manifest:{build:(e,t)=>(t.truthy&&(e=e.truthy(...t.truthy)),t.falsy&&(e=e.falsy(...t.falsy)),e)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(e,t,n)=>{"use strict";const a=n(375),i=n(8068),s=n(8160),r=n(3328),l={isDate:function(e){return e instanceof Date}};e.exports=i.extend({type:"date",coerce:{from:["number","string"],method(e,t){let{schema:n}=t;return{value:l.parse(e,n._flags.format)||e}}},validate(e,t){let{schema:n,error:a,prefs:i}=t;if(e instanceof Date&&!isNaN(e.getTime()))return;const s=n._flags.format;return i.convert&&s&&"string"==typeof e?{value:e,errors:a("date.format",{format:s})}:{value:e,errors:a("date.base")}},rules:{compare:{method:!1,validate(e,t,n,a){let{date:i}=n,{name:r,operator:l,args:o}=a;const c="now"===i?Date.now():i.getTime();return s.compare(e.getTime(),c,l)?e:t.error("date."+r,{limit:o.date,value:e})},args:[{name:"date",ref:!0,normalize:e=>"now"===e?e:l.parse(e),assert:e=>null!==e,message:"must have a valid date format"}]},format:{method(e){return a(["iso","javascript","unix"].includes(e),"Unknown date format",e),this.$_setFlag("format",e)}},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{date:e},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{date:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{date:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{date:e},operator:">="})}},timestamp:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"javascript";return a(["javascript","unix"].includes(e),'"type" must be one of "javascript, unix"'),this.format(e)}}},cast:{number:{from:l.isDate,to:(e,t)=>e.getTime()},string:{from:l.isDate,to(e,t){let{prefs:n}=t;return r.date(e,n)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),l.parse=function(e,t){if(e instanceof Date)return e;if("string"!=typeof e&&(isNaN(e)||!isFinite(e)))return null;if(/^\s*$/.test(e))return null;if("iso"===t)return s.isIsoDate(e)?l.date(e.toString()):null;const n=e;if("string"==typeof e&&/^[+-]?\d+(\.\d+)?$/.test(e)&&(e=parseFloat(e)),t){if("javascript"===t)return l.date(1*e);if("unix"===t)return l.date(1e3*e);if("string"==typeof n)return null}return l.date(e)},l.date=function(e){const t=new Date(e);return isNaN(t.getTime())?null:t}},390:(e,t,n)=>{"use strict";const a=n(375),i=n(7824);e.exports=i.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(e){return a(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:e}})},validate(e,t,n){let{n:a}=n;return e.length===a?e:t.error("function.arity",{n:a})}},class:{method(){return this.$_addRule("class")},validate:(e,t)=>/^\s*class\s/.test(e.toString())?e:t.error("function.class",{value:e})},minArity:{method(e){return a(Number.isSafeInteger(e)&&e>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:e}})},validate(e,t,n){let{n:a}=n;return e.length>=a?e:t.error("function.minArity",{n:a})}},maxArity:{method(e){return a(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:e}})},validate(e,t,n){let{n:a}=n;return e.length<=a?e:t.error("function.maxArity",{n:a})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(e,t,n)=>{"use strict";const a=n(978),i=n(375),s=n(8571),r=n(3652),l=n(8068),o=n(8160),c=n(3292),u=n(6354),d=n(6133),p=n(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};e.exports=l.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(e,t)=>e.keys(t),validate(e,t){let{schema:n,error:a,state:i,prefs:s}=t;if(!e||typeof e!==n.$_property("typeof")||Array.isArray(e))return{value:e,errors:a("object.base",{type:n.$_property("typeof")})};if(!(n.$_terms.renames||n.$_terms.dependencies||n.$_terms.keys||n.$_terms.patterns||n.$_terms.externals))return;e=g.clone(e,s);const r=[];if(n.$_terms.renames&&!g.rename(n,e,i,s,r))return{value:e,errors:r};if(!n.$_terms.keys&&!n.$_terms.patterns&&!n.$_terms.dependencies)return{value:e,errors:r};const l=new Set(Object.keys(e));if(n.$_terms.keys){const t=[e,...i.ancestors];for(const a of n.$_terms.keys){const n=a.key,o=e[n];l.delete(n);const c=i.localize([...i.path,n],t,a),u=a.schema.$_validate(o,c,s);if(u.errors){if(s.abortEarly)return{value:e,errors:u.errors};void 0!==u.value&&(e[n]=u.value),r.push(...u.errors)}else"strip"===a.schema._flags.result||void 0===u.value&&void 0!==o?delete e[n]:void 0!==u.value&&(e[n]=u.value)}}if(l.size||n._flags._hasPatternMatch){const t=g.unknown(n,e,l,r,i,s);if(t)return t}if(n.$_terms.dependencies)for(const t of n.$_terms.dependencies){if(null!==t.key&&!1===g.isPresent(t.options)(t.key.resolve(e,i,s,null,{shadow:!1})))continue;const a=g.dependencies[t.rel](n,t,e,i,s);if(a){const t=n.$_createError(a.code,e,a.context,i,s);if(s.abortEarly)return{value:e,errors:t};r.push(t)}}return{value:e,errors:r}},rules:{and:{method(){for(var e=arguments.length,t=new Array(e),n=0;n!e.hasOwnProperty(t.key))):new g.Keys;for(const n in e)o.tryWithPath((()=>t.$_terms.keys.push({key:n,schema:this.$_compile(e[n])})),n)}else t.$_terms.keys=new g.Keys;else t.$_terms.keys=null;return t.$_mutateRebuild()}},length:{method(e){return this.$_addRule({name:"length",args:{limit:e},operator:"="})},validate(e,t,n,a){let{limit:i}=n,{name:s,operator:r,args:l}=a;return o.compare(Object.keys(e).length,i,r)?e:t.error("object."+s,{limit:l.limit,value:e})},args:[{name:"limit",ref:!0,assert:o.limit,message:"must be a positive integer"}]},max:{method(e){return this.$_addRule({name:"max",method:"length",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"length",args:{limit:e},operator:">="})}},nand:{method(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};const a=e instanceof RegExp;a||(e=this.$_compile(e,{appendPath:!0})),i(void 0!==t,"Invalid rule"),o.assertOptions(n,["fallthrough","matches"]),a&&i(!e.flags.includes("g")&&!e.flags.includes("y"),"pattern should not use global or sticky mode"),t=this.$_compile(t,{appendPath:!0});const s=this.clone();s.$_terms.patterns=s.$_terms.patterns||[];const r={[a?"regex":"schema"]:e,rule:t};return n.matches&&(r.matches=this.$_compile(n.matches),"array"!==r.matches.type&&(r.matches=r.matches.$_root.array().items(r.matches)),s.$_mutateRegister(r.matches),s.$_setFlag("_hasPatternMatch",!0,{clone:!1})),n.fallthrough&&(r.fallthrough=!0),s.$_terms.patterns.push(r),s.$_mutateRegister(t),s}},ref:{method(){return this.$_addRule("ref")},validate:(e,t)=>d.isRef(e)?e:t.error("object.refType",{value:e})},regex:{method(){return this.$_addRule("regex")},validate:(e,t)=>e instanceof RegExp?e:t.error("object.regex",{value:e})},rename:{method(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i("string"==typeof e||e instanceof RegExp,"Rename missing the from argument"),i("string"==typeof t||t instanceof p,"Invalid rename to argument"),i(t!==e,"Cannot rename key to same name:",e),o.assertOptions(n,["alias","ignoreUndefined","override","multiple"]);const s=this.clone();s.$_terms.renames=s.$_terms.renames||[];for(const t of s.$_terms.renames)i(t.from!==e,"Cannot rename the same key multiple times");return t instanceof p&&s.$_mutateRegister(t),s.$_terms.renames.push({from:e,to:t,options:a(g.renameDefaults,n)}),s}},schema:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:e}})},validate(e,t,n){let{type:a}=n;return!o.isSchema(e)||"any"!==a&&e.type!==a?t.error("object.schema",{type:a}):e}},unknown:{method(e){return this.$_setFlag("unknown",!1!==e)}},with:{method(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return g.dependency(this,"with",e,t,n)}},without:{method(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return g.dependency(this,"without",e,t,n)}},xor:{method(){for(var e=arguments.length,t=new Array(e),n=0;nt.add(n,{after:n.schema.$_rootReferences(),group:n.key})),n.key);e.$_terms.keys=new g.Keys(...t.nodes)}},manifest:{build(e,t){if(t.keys&&(e=e.keys(t.keys)),t.dependencies)for(const{rel:n,key:a=null,peers:i,options:s}of t.dependencies)e=g.dependency(e,n,a,i,s);if(t.patterns)for(const{regex:n,schema:a,rule:i,fallthrough:s,matches:r}of t.patterns)e=e.pattern(n||a,i,{fallthrough:s,matches:r});if(t.renames)for(const{from:n,to:a,options:i}of t.renames)e=e.rename(n,a,i);return e}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(e,t){if("object"==typeof e){if(t.nonEnumerables)return s(e,{shallow:!0});const n=Object.create(Object.getPrototypeOf(e));return Object.assign(n,e),n}const n=function(){for(var t=arguments.length,n=new Array(t),a=0;a1&&"object"==typeof a[a.length-1]?a.pop():{}),o.assertOptions(s,["separator","isPresent"]),a=[].concat(a);const r=o.default(s.separator,"."),l=[];for(const e of a)i("string"==typeof e,t,"peers must be strings"),l.push(c.ref(e,{separator:r,ancestor:0,prefix:!1}));null!==n&&(n=c.ref(n,{separator:r,ancestor:0,prefix:!1}));const u=e.clone();return u.$_terms.dependencies=u.$_terms.dependencies||[],u.$_terms.dependencies.push(new g.Dependency(t,n,l,a,s)),u},g.dependencies={and(e,t,n,a,i){const s=[],r=[],l=t.peers.length,o=g.isPresent(t.options);for(const e of t.peers)!1===o(e.resolve(n,a,i,null,{shadow:!1}))?s.push(e.key):r.push(e.key);if(s.length!==l&&r.length!==l)return{code:"object.and",context:{present:r,presentWithLabels:g.keysToLabels(e,r),missing:s,missingWithLabels:g.keysToLabels(e,s)}}},nand(e,t,n,a,i){const s=[],r=g.isPresent(t.options);for(const e of t.peers)r(e.resolve(n,a,i,null,{shadow:!1}))&&s.push(e.key);if(s.length!==t.peers.length)return;const l=t.paths[0],o=t.paths.slice(1);return{code:"object.nand",context:{main:l,mainWithLabel:g.keysToLabels(e,l),peers:o,peersWithLabels:g.keysToLabels(e,o)}}},or(e,t,n,a,i){const s=g.isPresent(t.options);for(const e of t.peers)if(s(e.resolve(n,a,i,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:t.paths,peersWithLabels:g.keysToLabels(e,t.paths)}}},oxor(e,t,n,a,i){const s=[],r=g.isPresent(t.options);for(const e of t.peers)r(e.resolve(n,a,i,null,{shadow:!1}))&&s.push(e.key);if(!s.length||1===s.length)return;const l={peers:t.paths,peersWithLabels:g.keysToLabels(e,t.paths)};return l.present=s,l.presentWithLabels=g.keysToLabels(e,s),{code:"object.oxor",context:l}},with(e,t,n,a,i){const s=g.isPresent(t.options);for(const r of t.peers)if(!1===s(r.resolve(n,a,i,null,{shadow:!1})))return{code:"object.with",context:{main:t.key.key,mainWithLabel:g.keysToLabels(e,t.key.key),peer:r.key,peerWithLabel:g.keysToLabels(e,r.key)}}},without(e,t,n,a,i){const s=g.isPresent(t.options);for(const r of t.peers)if(s(r.resolve(n,a,i,null,{shadow:!1})))return{code:"object.without",context:{main:t.key.key,mainWithLabel:g.keysToLabels(e,t.key.key),peer:r.key,peerWithLabel:g.keysToLabels(e,r.key)}}},xor(e,t,n,a,i){const s=[],r=g.isPresent(t.options);for(const e of t.peers)r(e.resolve(n,a,i,null,{shadow:!1}))&&s.push(e.key);if(1===s.length)return;const l={peers:t.paths,peersWithLabels:g.keysToLabels(e,t.paths)};return 0===s.length?{code:"object.missing",context:l}:(l.present=s,l.presentWithLabels=g.keysToLabels(e,s),{code:"object.xor",context:l})}},g.keysToLabels=function(e,t){return Array.isArray(t)?t.map((t=>e.$_mapLabels(t))):e.$_mapLabels(t)},g.isPresent=function(e){return"function"==typeof e.isPresent?e.isPresent:e=>void 0!==e},g.rename=function(e,t,n,a,i){const s={};for(const r of e.$_terms.renames){const l=[],o="string"!=typeof r.from;if(o)for(const e in t){if(void 0===t[e]&&r.options.ignoreUndefined)continue;if(e===r.to)continue;const n=r.from.exec(e);n&&l.push({from:e,to:r.to,match:n})}else!Object.prototype.hasOwnProperty.call(t,r.from)||void 0===t[r.from]&&r.options.ignoreUndefined||l.push(r);for(const c of l){const l=c.from;let u=c.to;if(u instanceof p&&(u=u.render(t,n,a,c.match)),l!==u){if(!r.options.multiple&&s[u]&&(i.push(e.$_createError("object.rename.multiple",t,{from:l,to:u,pattern:o},n,a)),a.abortEarly))return!1;if(Object.prototype.hasOwnProperty.call(t,u)&&!r.options.override&&!s[u]&&(i.push(e.$_createError("object.rename.override",t,{from:l,to:u,pattern:o},n,a)),a.abortEarly))return!1;void 0===t[l]?delete t[u]:t[u]=t[l],s[u]=!0,r.options.alias||delete t[l]}}}return!0},g.unknown=function(e,t,n,a,i,s){if(e.$_terms.patterns){let r=!1;const l=e.$_terms.patterns.map((e=>{if(e.matches)return r=!0,[]})),o=[t,...i.ancestors];for(const r of n){const c=t[r],u=[...i.path,r];for(let d=0;d{"use strict";const a=n(375),i=n(8068),s=n(8160),r=n(3292),l=n(6354),o={};e.exports=i.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(e,t)=>e.ref(t),validate(e,t){let{schema:n,state:i,prefs:s}=t;a(n.$_terms.link,"Uninitialized link schema");const r=o.generate(n,e,i,s),l=n.$_terms.link[0].ref;return r.$_validate(e,i.nest(r,`link:${l.display}:${r.type}`),s)},generate:(e,t,n,a)=>o.generate(e,t,n,a),rules:{ref:{method(e){a(!this.$_terms.link,"Cannot reinitialize schema"),e=r.ref(e),a("value"===e.type||"local"===e.type,"Invalid reference type:",e.type),a("local"===e.type||"root"===e.ancestor||e.ancestor>0,"Link cannot reference itself");const t=this.clone();return t.$_terms.link=[{ref:e}],t}},relative:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("relative",e)}}},overrides:{concat(e){a(this.$_terms.link,"Uninitialized link schema"),a(s.isSchema(e),"Invalid schema object"),a("link"!==e.type,"Cannot merge type link with another link");const t=this.clone();return t.$_terms.whens||(t.$_terms.whens=[]),t.$_terms.whens.push({concat:e}),t.$_mutateRebuild()}},manifest:{build:(e,t)=>(a(t.link,"Invalid link description missing link"),e.ref(t.link))}}),o.generate=function(e,t,n,a){let i=n.mainstay.links.get(e);if(i)return i._generate(t,n,a).schema;const s=e.$_terms.link[0].ref,{perspective:r,path:l}=o.perspective(s,n);o.assert(r,"which is outside of schema boundaries",s,e,n,a);try{i=l.length?r.$_reach(l):r}catch(t){o.assert(!1,"to non-existing schema",s,e,n,a)}return o.assert("link"!==i.type,"which is another link",s,e,n,a),e._flags.relative||n.mainstay.links.set(e,i),i._generate(t,n,a).schema},o.perspective=function(e,t){if("local"===e.type){for(const{schema:n,key:a}of t.schemas){if((n._flags.id||a)===e.path[0])return{perspective:n,path:e.path.slice(1)};if(n.$_terms.shared)for(const t of n.$_terms.shared)if(t._flags.id===e.path[0])return{perspective:t,path:e.path.slice(1)}}return{perspective:null,path:null}}return"root"===e.ancestor?{perspective:t.schemas[t.schemas.length-1].schema,path:e.path}:{perspective:t.schemas[e.ancestor]&&t.schemas[e.ancestor].schema,path:e.path}},o.assert=function(e,t,n,i,s,r){e||a(!1,`"${l.label(i._flags,s,r)}" contains link reference "${n.display}" ${t}`)}},3832:(e,t,n)=>{"use strict";const a=n(375),i=n(8068),s=n(8160),r={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};e.exports=i.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,t){let{schema:n,error:a}=t;if(!e.match(r.numberRx))return;e=e.trim();const i={value:parseFloat(e)};if(0===i.value&&(i.value=0),!n._flags.unsafe)if(e.match(/e/i)){if(r.extractSignificantDigits(e)!==r.extractSignificantDigits(String(i.value)))return i.errors=a("number.unsafe"),i}else{const t=i.value.toString();if(t.match(/e/i))return i;if(t!==r.normalizeDecimal(e))return i.errors=a("number.unsafe"),i}return i}},validate(e,t){let{schema:n,error:a,prefs:i}=t;if(e===1/0||e===-1/0)return{value:e,errors:a("number.infinity")};if(!s.isNumber(e))return{value:e,errors:a("number.base")};const r={value:e};if(i.convert){const e=n.$_getRule("precision");if(e){const t=Math.pow(10,e.args.limit);r.value=Math.round(r.value*t)/t}}return 0===r.value&&(r.value=0),!n._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e"})}},integer:{method(){return this.$_addRule("integer")},validate:(e,t)=>Math.trunc(e)-e==0?e:t.error("number.integer")},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{limit:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{limit:e},operator:">="})}},multiple:{method(e){return this.$_addRule({name:"multiple",args:{base:e}})},validate(e,t,n,a){let{base:i}=n;return e*(1/i)%1==0?e:t.error("number.multiple",{multiple:a.args.base,value:e})},args:[{name:"base",ref:!0,assert:e=>"number"==typeof e&&isFinite(e)&&e>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(e,t)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:t.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(e){return a(Number.isSafeInteger(e),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:e}})},validate(e,t,n){let{limit:a}=n;const i=e.toString().match(r.precisionRx);return Math.max((i[1]?i[1].length:0)-(i[2]?parseInt(i[2],10):0),0)<=a?e:t.error("number.precision",{limit:a,value:e})},convert:!0},sign:{method(e){return a(["negative","positive"].includes(e),"Invalid sign",e),this.$_addRule({name:"sign",args:{sign:e}})},validate(e,t,n){let{sign:a}=n;return"negative"===a&&e<0||"positive"===a&&e>0?e:t.error(`number.${a}`)}},unsafe:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"enabled must be a boolean"),this.$_setFlag("unsafe",e)}}},cast:{string:{from:e=>"number"==typeof e,to:(e,t)=>e.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),r.extractSignificantDigits=function(e){return e.replace(r.exponentialPartRegex,"").replace(r.dotRegex,"").replace(r.trailingZerosRegex,"").replace(r.leadingSignAndZerosRegex,"")},r.normalizeDecimal=function(e){return(e=e.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&e.endsWith("0")&&(e=e.replace(/0+$/,"")),"-0"===e?"0":e}},8966:(e,t,n)=>{"use strict";const a=n(7824);e.exports=a.extend({type:"object",cast:{map:{from:e=>e&&"object"==typeof e,to:(e,t)=>new Map(Object.entries(e))}}})},7417:(e,t,n)=>{"use strict";const a=n(375),i=n(5380),s=n(1745),r=n(9959),l=n(6064),o=n(9926),c=n(5752),u=n(8068),d=n(8160),p={tlds:o instanceof Set&&{tlds:{allow:o,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:r.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};e.exports=u.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(e,t){let{schema:n,state:a,prefs:i}=t;const s=n.$_getRule("normalize");s&&(e=e.normalize(s.args.form));const r=n.$_getRule("case");r&&(e="upper"===r.args.direction?e.toLocaleUpperCase():e.toLocaleLowerCase());const l=n.$_getRule("trim");if(l&&l.args.enabled&&(e=e.trim()),n.$_terms.replacements)for(const t of n.$_terms.replacements)e=e.replace(t.pattern,t.replacement);const o=n.$_getRule("hex");if(o&&o.args.options.byteAligned&&e.length%2!=0&&(e=`0${e}`),n.$_getRule("isoDate")){const t=p.isoDate(e);t&&(e=t)}if(n._flags.truncate){const t=n.$_getRule("max");if(t){let s=t.args.limit;if(d.isResolvable(s)&&(s=s.resolve(e,a,i),!d.limit(s)))return{value:e,errors:n.$_createError("any.ref",s,{ref:t.args.limit,arg:"limit",reason:"must be a positive integer"},a,i)};e=e.slice(0,s)}}return{value:e}}},validate(e,t){let{schema:n,error:a}=t;if("string"!=typeof e)return{value:e,errors:a("string.base")};if(""===e){const t=n.$_getRule("min");if(t&&0===t.args.limit)return;return{value:e,errors:a("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(e,t)=>/^[a-zA-Z0-9]+$/.test(e)?e:t.error("string.alphanum")},base64:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.assertOptions(e,["paddingRequired","urlSafe"]),e={urlSafe:!1,paddingRequired:!0,...e},a("boolean"==typeof e.paddingRequired,"paddingRequired must be boolean"),a("boolean"==typeof e.urlSafe,"urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:e}})},validate(e,t,n){let{options:a}=n;return p.base64Regex[a.paddingRequired][a.urlSafe].test(e)?e:t.error("string.base64")}},case:{method(e){return a(["lower","upper"].includes(e),"Invalid case:",e),this.$_addRule({name:"case",args:{direction:e}})},validate(e,t,n){let{direction:a}=n;return"lower"===a&&e===e.toLocaleLowerCase()||"upper"===a&&e===e.toLocaleUpperCase()?e:t.error(`string.${a}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(e,t){let n=e.length,a=0,i=1;for(;n--;){const t=e.charAt(n)*i;a+=t-9*(t>9),i^=3}return a>0&&a%10==0?e:t.error("string.creditCard")}},dataUri:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.assertOptions(e,["paddingRequired"]),e={paddingRequired:!0,...e},a("boolean"==typeof e.paddingRequired,"paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:e}})},validate(e,t,n){let{options:a}=n;const i=e.match(p.dataUriRegex);if(i){if(!i[2])return e;if("base64"!==i[2])return e;if(p.base64Regex[a.paddingRequired].false.test(i[3]))return e}return t.error("string.dataUri")}},domain:{method(e){e&&d.assertOptions(e,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const t=p.addressOptions(e);return this.$_addRule({name:"domain",args:{options:e},address:t})},validate(e,t,n,a){let{address:s}=a;return i.isValid(e,s)?e:t.error("string.domain")}},email:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),a(void 0===e.multiple||"boolean"==typeof e.multiple,"multiple option must be an boolean");const t=p.addressOptions(e),n=new RegExp(`\\s*[${e.separator?l(e.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:e},regex:n,address:t})},validate(e,t,n,a){let{options:i}=n,{regex:r,address:l}=a;const o=i.multiple?e.split(r):[e],c=[];for(const e of o)s.isValid(e,l)||c.push(e);return c.length?t.error("string.email",{value:e,invalids:c}):e}},guid:{alias:"uuid",method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["version","separator"]);let t="";if(e.version){const n=[].concat(e.version);a(n.length>=1,"version must have at least 1 valid version specified");const i=new Set;for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return d.assertOptions(e,["byteAligned"]),e={byteAligned:!1,...e},a("boolean"==typeof e.byteAligned,"byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:e}})},validate(e,t,n){let{options:a}=n;return p.hexRegex.test(e)?a.byteAligned&&e.length%2!=0?t.error("string.hexAlign"):e:t.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(e,t)=>i.isValid(e,{minDomainSegments:1})||p.ipRegex.test(e)?e:t.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["cidr","version"]);const{cidr:t,versions:n,regex:a}=r.regex(e),i=e.version?n:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:t,version:i}},regex:a})},validate(e,t,n,a){let{options:i}=n,{regex:s}=a;return s.test(e)?e:i.version?t.error("string.ipVersion",{value:e,cidr:i.cidr,version:i.version}):t.error("string.ip",{value:e,cidr:i.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(e,t){let{error:n}=t;return p.isoDate(e)?e:n("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(e,t)=>p.isoDurationRegex.test(e)?e:t.error("string.isoDuration")},length:{method(e,t){return p.length(this,"length",e,"=",t)},validate(e,t,n,a){let{limit:i,encoding:s}=n,{name:r,operator:l,args:o}=a;const c=!s&&e.length;return d.compare(c,i,l)?e:t.error("string."+r,{limit:o.limit,value:e,encoding:s})},args:[{name:"limit",ref:!0,assert:d.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(e,t){return p.length(this,"max",e,"<=",t)},args:["limit","encoding"]},min:{method(e,t){return p.length(this,"min",e,">=",t)},args:["limit","encoding"]},normalize:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"NFC";return a(p.normalizationForms.includes(e),"normalization form must be one of "+p.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:e}})},validate(e,t,n){let{error:a}=t,{form:i}=n;return e===e.normalize(i)?e:a("string.normalize",{value:e,form:i})},convert:!0},pattern:{alias:"regex",method(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(e instanceof RegExp,"regex must be a RegExp"),a(!e.flags.includes("g")&&!e.flags.includes("y"),"regex should not use global or sticky mode"),"string"==typeof t&&(t={name:t}),d.assertOptions(t,["invert","name"]);const n=["string.pattern",t.invert?".invert":"",t.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:e,options:t},errorCode:n})},validate(e,t,n,a){let{regex:i,options:s}=n,{errorCode:r}=a;return i.test(e)^s.invert?e:t.error(r,{name:s.name,regex:i,value:e})},args:["regex","options"],multi:!0},replace:{method(e,t){"string"==typeof e&&(e=new RegExp(l(e),"g")),a(e instanceof RegExp,"pattern must be a RegExp"),a("string"==typeof t,"replacement must be a String");const n=this.clone();return n.$_terms.replacements||(n.$_terms.replacements=[]),n.$_terms.replacements.push({pattern:e,replacement:t}),n}},token:{method(){return this.$_addRule("token")},validate:(e,t)=>/^\w+$/.test(e)?e:t.error("string.token")},trim:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:e}})},validate(e,t,n){let{enabled:a}=n;return a&&e!==e.trim()?t.error("string.trim"):e},convert:!0},truncate:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"enabled must be a boolean"),this.$_setFlag("truncate",e)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),e.domain&&d.assertOptions(e.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:t,scheme:n}=c.regex(e),a=e.domain?p.addressOptions(e.domain):null;return this.$_addRule({name:"uri",args:{options:e},regex:t,domain:a,scheme:n})},validate(e,t,n,a){let{options:s}=n,{regex:r,domain:l,scheme:o}=a;if(["http:/","https:/"].includes(e))return t.error("string.uri");const c=r.exec(e);if(c){const n=c[1]||c[2];return!l||s.allowRelative&&!n||i.isValid(n,l)?e:t.error("string.domain",{value:n})}return s.relativeOnly?t.error("string.uriRelativeOnly"):s.scheme?t.error("string.uriCustomScheme",{scheme:o,value:e}):t.error("string.uri")}}},manifest:{build(e,t){if(t.replacements)for(const{pattern:n,replacement:a}of t.replacements)e=e.replace(n,a);return e}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),p.addressOptions=function(e){if(!e)return e;if(a(void 0===e.minDomainSegments||Number.isSafeInteger(e.minDomainSegments)&&e.minDomainSegments>0,"minDomainSegments must be a positive integer"),a(void 0===e.maxDomainSegments||Number.isSafeInteger(e.maxDomainSegments)&&e.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),!1===e.tlds)return e;if(!0===e.tlds||void 0===e.tlds)return a(p.tlds,"Built-in TLD list disabled"),Object.assign({},e,p.tlds);a("object"==typeof e.tlds,"tlds must be true, false, or an object");const t=e.tlds.deny;if(t)return Array.isArray(t)&&(e=Object.assign({},e,{tlds:{deny:new Set(t)}})),a(e.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),a(!e.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),p.validateTlds(e.tlds.deny,"tlds.deny"),e;const n=e.tlds.allow;return n?!0===n?(a(p.tlds,"Built-in TLD list disabled"),Object.assign({},e,p.tlds)):(Array.isArray(n)&&(e=Object.assign({},e,{tlds:{allow:new Set(n)}})),a(e.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),p.validateTlds(e.tlds.allow,"tlds.allow"),e):e},p.validateTlds=function(e,t){for(const n of e)a(i.isValid(n,{minDomainSegments:1,maxDomainSegments:1}),`${t} must contain valid top level domain names`)},p.isoDate=function(e){if(!d.isIsoDate(e))return null;/.*T.*[+-]\d\d$/.test(e)&&(e+="00");const t=new Date(e);return isNaN(t.getTime())?null:t.toISOString()},p.length=function(e,t,n,i,s){return a(!s||!1,"Invalid encoding:",s),e.$_addRule({name:t,method:"length",args:{limit:n,encoding:s},operator:i})}},8826:(e,t,n)=>{"use strict";const a=n(375),i=n(8068),s={};s.Map=class extends Map{slice(){return new s.Map(this)}},e.exports=i.extend({type:"symbol",terms:{map:{init:new s.Map}},coerce:{method(e,t){let{schema:n,error:a}=t;const i=n.$_terms.map.get(e);return i&&(e=i),n._flags.only&&"symbol"!=typeof e?{value:e,errors:a("symbol.map",{map:n.$_terms.map})}:{value:e}}},validate(e,t){let{error:n}=t;if("symbol"!=typeof e)return{value:e,errors:n("symbol.base")}},rules:{map:{method(e){e&&!e[Symbol.iterator]&&"object"==typeof e&&(e=Object.entries(e)),a(e&&e[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),n=[];for(const i of e){a(i&&i[Symbol.iterator],"Entry must be an iterable");const[e,s]=i;a("object"!=typeof e&&"function"!=typeof e&&"symbol"!=typeof e,"Key must not be of type object, function, or Symbol"),a("symbol"==typeof s,"Value must be a Symbol"),t.$_terms.map.set(e,s),n.push(s)}return t.valid(...n)}}},manifest:{build:(e,t)=>(t.map&&(e=e.map(t.map)),e)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(e,t,n)=>{"use strict";const a=n(375),i=n(8571),s=n(738),r=n(9621),l=n(8160),o=n(6354),c=n(493),u={result:Symbol("result")};t.entry=function(e,t,n){let i=l.defaults;n&&(a(void 0===n.warnings,"Cannot override warnings preference in synchronous validation"),a(void 0===n.artifacts,"Cannot override artifacts preference in synchronous validation"),i=l.preferences(l.defaults,n));const s=u.entry(e,t,i);a(!s.mainstay.externals.length,"Schema with external rules must use validateAsync()");const r={value:s.value};return s.error&&(r.error=s.error),s.mainstay.warnings.length&&(r.warning=o.details(s.mainstay.warnings)),s.mainstay.debug&&(r.debug=s.mainstay.debug),s.mainstay.artifacts&&(r.artifacts=s.mainstay.artifacts),r},t.entryAsync=async function(e,t,n){let a=l.defaults;n&&(a=l.preferences(l.defaults,n));const i=u.entry(e,t,a),s=i.mainstay;if(i.error)throw s.debug&&(i.error.debug=s.debug),i.error;if(s.externals.length){let t=i.value;for(const{method:i,path:l,label:o}of s.externals){let s,c,u=t;l.length&&(s=l[l.length-1],c=r(t,l.slice(0,-1)),u=c[s]);try{const e=await i(u,{prefs:n});if(void 0===e||e===u)continue;c?c[s]=e:t=e}catch(e){throw a.errors.label&&(e.message+=` (${o})`),e}}i.value=t}if(!a.warnings&&!a.debug&&!a.artifacts)return i.value;const c={value:i.value};return s.warnings.length&&(c.warning=o.details(s.warnings)),s.debug&&(c.debug=s.debug),s.artifacts&&(c.artifacts=s.artifacts),c},u.entry=function(e,n,a){const{tracer:i,cleanup:s}=u.tracer(n,a),r={externals:[],warnings:[],tracer:i,debug:a.debug?[]:null,links:n._ids._schemaChain?new Map:null},l=n._ids._schemaChain?[{schema:n}]:null,d=new c([],[],{mainstay:r,schemas:l}),p=t.validate(e,n,d,a);s&&n.$_root.untrace();const g=o.process(p.errors,e,a);return{value:p.value,error:g,mainstay:r}},u.tracer=function(e,t){return e.$_root._tracer?{tracer:e.$_root._tracer._register(e)}:t.debug?(a(e.$_root.trace,"Debug mode not supported"),{tracer:e.$_root.trace()._register(e),cleanup:!0}):{tracer:u.ignore}},t.validate=function(e,t,n,a){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(t.$_terms.whens&&(t=t._generate(e,n,a).schema),t._preferences&&(a=u.prefs(t,a)),t._cache&&a.cache){const a=t._cache.get(e);if(n.mainstay.tracer.debug(n,"validate","cached",!!a),a)return a}const s=(i,s,r)=>t.$_createError(i,e,s,r||n,a),r={original:e,prefs:a,schema:t,state:n,error:s,errorsArray:u.errorsArray,warn:(e,t,a)=>n.mainstay.warnings.push(s(e,t,a)),message:(i,s)=>t.$_createError("custom",e,s,n,a,{messages:i})};n.mainstay.tracer.entry(t,n);const o=t._definition;if(o.prepare&&void 0!==e&&a.convert){const t=o.prepare(e,r);if(t){if(n.mainstay.tracer.value(n,"prepare",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),r);e=t.value}}if(o.coerce&&void 0!==e&&a.convert&&(!o.coerce.from||o.coerce.from.includes(typeof e))){const t=o.coerce.method(e,r);if(t){if(n.mainstay.tracer.value(n,"coerced",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),r);e=t.value}}const c=t._flags.empty;c&&c.$_match(u.trim(e,t),n.nest(c),l.defaults)&&(n.mainstay.tracer.value(n,"empty",e,void 0),e=void 0);const d=i.presence||t._flags.presence||(t._flags._endedSwitch?null:a.presence);if(void 0===e){if("forbidden"===d)return u.finalize(e,null,r);if("required"===d)return u.finalize(e,[t.$_createError("any.required",e,null,n,a)],r);if("optional"===d){if(t._flags.default!==l.symbols.deepDefault)return u.finalize(e,null,r);n.mainstay.tracer.value(n,"default",e,{}),e={}}}else if("forbidden"===d)return u.finalize(e,[t.$_createError("any.unknown",e,null,n,a)],r);const p=[];if(t._valids){const i=t._valids.get(e,n,a,t._flags.insensitive);if(i)return a.convert&&(n.mainstay.tracer.value(n,"valids",e,i.value),e=i.value),n.mainstay.tracer.filter(t,n,"valid",i),u.finalize(e,null,r);if(t._flags.only){const i=t.$_createError("any.only",e,{valids:t._valids.values({display:!0})},n,a);if(a.abortEarly)return u.finalize(e,[i],r);p.push(i)}}if(t._invalids){const i=t._invalids.get(e,n,a,t._flags.insensitive);if(i){n.mainstay.tracer.filter(t,n,"invalid",i);const s=t.$_createError("any.invalid",e,{invalids:t._invalids.values({display:!0})},n,a);if(a.abortEarly)return u.finalize(e,[s],r);p.push(s)}}if(o.validate){const t=o.validate(e,r);if(t&&(n.mainstay.tracer.value(n,"base",e,t.value),e=t.value,t.errors)){if(!Array.isArray(t.errors))return p.push(t.errors),u.finalize(e,p,r);if(t.errors.length)return p.push(...t.errors),u.finalize(e,p,r)}}return t._rules.length?u.rules(e,p,r):u.finalize(e,p,r)},u.rules=function(e,t,n){const{schema:a,state:i,prefs:s}=n;for(const r of a._rules){const o=a._definition.rules[r.method];if(o.convert&&s.convert){i.mainstay.tracer.log(a,i,"rule",r.name,"full");continue}let c,d=r.args;if(r._resolve.length){d=Object.assign({},d);for(const t of r._resolve){const n=o.argsByName.get(t),r=d[t].resolve(e,i,s),u=n.normalize?n.normalize(r):r,p=l.validateArg(u,null,n);if(p){c=a.$_createError("any.ref",r,{arg:t,ref:d[t],reason:p},i,s);break}d[t]=u}}c=c||o.validate(e,n,d,r);const p=u.rule(c,r);if(p.errors){if(i.mainstay.tracer.log(a,i,"rule",r.name,"error"),r.warn){i.mainstay.warnings.push(...p.errors);continue}if(s.abortEarly)return u.finalize(e,p.errors,n);t.push(...p.errors)}else i.mainstay.tracer.log(a,i,"rule",r.name,"pass"),i.mainstay.tracer.value(i,"rule",e,p.value,r.name),e=p.value}return u.finalize(e,t,n)},u.rule=function(e,t){return e instanceof o.Report?(u.error(e,t),{errors:[e],value:null}):Array.isArray(e)&&e[l.symbols.errors]?(e.forEach((e=>u.error(e,t))),{errors:e,value:null}):{errors:null,value:e}},u.error=function(e,t){return t.message&&e._setTemplate(t.message),e},u.finalize=function(e,t,n){t=t||[];const{schema:i,state:s,prefs:r}=n;if(t.length){const a=u.default("failover",void 0,t,n);void 0!==a&&(s.mainstay.tracer.value(s,"failover",e,a),e=a,t=[])}if(t.length&&i._flags.error)if("function"==typeof i._flags.error){t=i._flags.error(t),Array.isArray(t)||(t=[t]);for(const e of t)a(e instanceof Error||e instanceof o.Report,"error() must return an Error object")}else t=[i._flags.error];if(void 0===e){const a=u.default("default",e,t,n);s.mainstay.tracer.value(s,"default",e,a),e=a}if(i._flags.cast&&void 0!==e){const t=i._definition.cast[i._flags.cast];if(t.from(e)){const a=t.to(e,n);s.mainstay.tracer.value(s,"cast",e,a,i._flags.cast),e=a}}if(i.$_terms.externals&&r.externals&&!1!==r._externals)for(const{method:e}of i.$_terms.externals)s.mainstay.externals.push({method:e,path:s.path,label:o.label(i._flags,s,r)});const l={value:e,errors:t.length?t:null};return i._flags.result&&(l.value="strip"===i._flags.result?void 0:n.original,s.mainstay.tracer.value(s,i._flags.result,e,l.value),s.shadow(e,i._flags.result)),i._cache&&!1!==r.cache&&!i._refs.length&&i._cache.set(n.original,l),void 0===e||l.errors||void 0===i._flags.artifact||(s.mainstay.artifacts=s.mainstay.artifacts||new Map,s.mainstay.artifacts.has(i._flags.artifact)||s.mainstay.artifacts.set(i._flags.artifact,[]),s.mainstay.artifacts.get(i._flags.artifact).push(s.path)),l},u.prefs=function(e,t){const n=t===l.defaults;return n&&e._preferences[l.symbols.prefs]?e._preferences[l.symbols.prefs]:(t=l.preferences(t,e._preferences),n&&(e._preferences[l.symbols.prefs]=t),t)},u.default=function(e,t,n,a){const{schema:s,state:r,prefs:o}=a,c=s._flags[e];if(o.noDefaults||void 0===c)return t;if(r.mainstay.tracer.log(s,r,"rule",e,"full"),!c)return c;if("function"==typeof c){const l=c.length?[i(r.ancestors[0]),a]:[];try{return c(...l)}catch(t){return void n.push(s.$_createError(`any.${e}`,null,{error:t},r,o))}}return"object"!=typeof c?c:c[l.symbols.literal]?c.literal:l.isResolvable(c)?c.resolve(t,r,o):i(c)},u.trim=function(e,t){if("string"!=typeof e)return e;const n=t.$_getRule("trim");return n&&n.args.enabled?e.trim():e},u.ignore={active:!1,debug:s,entry:s,filter:s,log:s,resolve:s,value:s},u.errorsArray=function(){const e=[];return e[l.symbols.errors]=!0,e}},2036:(e,t,n)=>{"use strict";const a=n(375),i=n(9474),s=n(8160),r={};e.exports=r.Values=class{constructor(e,t){this._values=new Set(e),this._refs=new Set(t),this._lowercase=r.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,t){s.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),t&&t.register(e)):this.has(e,null,null,!1)||(this._values.add(e),"string"==typeof e&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,t,n){if(e=e||new r.Values,t){if(t._override)return t.clone();for(const n of[...t._values,...t._refs])e.add(n)}if(n)for(const t of[...n._values,...n._refs])e.remove(t);return e.length?e:null}remove(e){s.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),"string"==typeof e&&this._lowercase.delete(e.toLowerCase()))}has(e,t,n,a){return!!this.get(e,t,n,a)}get(e,t,n,a){if(!this.length)return!1;if(this._values.has(e))return{value:e};if("string"==typeof e&&e&&a){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&"object"!=typeof e)return!1;if("object"==typeof e)for(const t of this._values)if(i(t,e))return{value:t};if(t)for(const s of this._refs){const r=s.resolve(e,t,n,null,{in:!0});if(void 0===r)continue;const l=s.in&&"object"==typeof r?Array.isArray(r)?r:Object.keys(r):[r];for(const t of l)if(typeof t==typeof e)if(a&&e&&"string"==typeof e){if(t.toLowerCase()===e.toLowerCase())return{value:t,ref:s}}else if(i(t,e))return{value:t,ref:s}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const e=[];for(const t of[...this._values,...this._refs])void 0!==t&&e.push(t);return e}return Array.from([...this._values,...this._refs])}clone(){const e=new r.Values(this._values,this._refs);return e._override=this._override,e}concat(e){a(!e._override,"Cannot concat override set of values");const t=new r.Values([...this._values,...e._values],[...this._refs,...e._refs]);return t._override=this._override,t}describe(){const e=[];this._override&&e.push({override:!0});for(const t of this._values.values())e.push(t&&"object"==typeof t?{value:t}:t);for(const t of this._refs.values())e.push(t.describe());return e}},r.Values.prototype[s.symbols.values]=!0,r.Values.prototype.slice=r.Values.prototype.clone,r.lowercases=function(e){const t=new Map;if(e)for(const n of e)"string"==typeof n&&t.set(n.toLowerCase(),n);return t}},978:(e,t,n)=>{"use strict";const a=n(375),i=n(8571),s=n(1687),r=n(9621),l={};e.exports=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(a(e&&"object"==typeof e,"Invalid defaults value: must be an object"),a(!t||!0===t||"object"==typeof t,"Invalid source value: must be true, falsy or an object"),a("object"==typeof n,"Invalid options: must be an object"),!t)return null;if(n.shallow)return l.applyToDefaultsWithShallow(e,t,n);const r=i(e);if(!0===t)return r;const o=void 0!==n.nullOverride&&n.nullOverride;return s(r,t,{nullOverride:o,mergeArrays:!1})},l.applyToDefaultsWithShallow=function(e,t,n){const o=n.shallow;a(Array.isArray(o),"Invalid keys");const c=new Map,u=!0===t?null:new Set;for(let n of o){n=Array.isArray(n)?n:n.split(".");const a=r(e,n);a&&"object"==typeof a?c.set(a,u&&r(t,n)||a):u&&u.add(n)}const d=i(e,{},c);if(!u)return d;for(const e of u)l.reachCopy(d,t,e);const p=void 0!==n.nullOverride&&n.nullOverride;return s(d,t,{nullOverride:p,mergeArrays:!1})},l.reachCopy=function(e,t,n){for(const e of n){if(!(e in t))return;const n=t[e];if("object"!=typeof n||null===n)return;t=n}const a=t;let i=e;for(let e=0;e{"use strict";const a=n(7916);e.exports=function(e){if(!e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i{"use strict";const a=n(9621),i=n(4277),s=n(7043),r={needsProtoHack:new Set([i.set,i.map,i.weakSet,i.weakMap])};e.exports=r.clone=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("object"!=typeof e||null===e)return e;let a=r.clone,l=n;if(t.shallow){if(!0!==t.shallow)return r.cloneWithShallow(e,t);a=e=>e}else if(l){const t=l.get(e);if(t)return t}else l=new Map;const o=i.getInternalProto(e);if(o===i.buffer)return!1;if(o===i.date)return new Date(e.getTime());if(o===i.regex)return new RegExp(e);const c=r.base(e,o,t);if(c===e)return e;if(l&&l.set(e,c),o===i.set)for(const n of e)c.add(a(n,t,l));else if(o===i.map)for(const[n,i]of e)c.set(n,a(i,t,l));const u=s.keys(e,t);for(const n of u){if("__proto__"===n)continue;if(o===i.array&&"length"===n){c.length=e.length;continue}const s=Object.getOwnPropertyDescriptor(e,n);s?s.get||s.set?Object.defineProperty(c,n,s):s.enumerable?c[n]=a(e[n],t,l):Object.defineProperty(c,n,{enumerable:!1,writable:!0,configurable:!0,value:a(e[n],t,l)}):Object.defineProperty(c,n,{enumerable:!0,writable:!0,configurable:!0,value:a(e[n],t,l)})}return c},r.cloneWithShallow=function(e,t){const n=t.shallow;(t=Object.assign({},t)).shallow=!1;const i=new Map;for(const t of n){const n=a(e,t);"object"!=typeof n&&"function"!=typeof n||i.set(n,n)}return r.clone(e,t,i)},r.base=function(e,t,n){if(!1===n.prototype)return r.needsProtoHack.has(t)?new t.constructor:t===i.array?[]:{};const a=Object.getPrototypeOf(e);if(a&&a.isImmutable)return e;if(t===i.array){const e=[];return a!==t&&Object.setPrototypeOf(e,a),e}if(r.needsProtoHack.has(t)){const e=new a.constructor;return a!==t&&Object.setPrototypeOf(e,a),e}return Object.create(a)}},9474:(e,t,n)=>{"use strict";const a=n(4277),i={mismatched:null};e.exports=function(e,t,n){return n=Object.assign({prototype:!0},n),!!i.isDeepEqual(e,t,n,[])},i.isDeepEqual=function(e,t,n,s){if(e===t)return 0!==e||1/e==1/t;const r=typeof e;if(r!==typeof t)return!1;if(null===e||null===t)return!1;if("function"===r){if(!n.deepFunction||e.toString()!==t.toString())return!1}else if("object"!==r)return e!=e&&t!=t;const l=i.getSharedType(e,t,!!n.prototype);switch(l){case a.buffer:return!1;case a.promise:return e===t;case a.regex:return e.toString()===t.toString();case i.mismatched:return!1}for(let n=s.length-1;n>=0;--n)if(s[n].isSame(e,t))return!0;s.push(new i.SeenEntry(e,t));try{return!!i.isDeepEqualObj(l,e,t,n,s)}finally{s.pop()}},i.getSharedType=function(e,t,n){if(n)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?i.mismatched:a.getInternalProto(e);const s=a.getInternalProto(e);return s!==a.getInternalProto(t)?i.mismatched:s},i.valueOf=function(e){const t=e.valueOf;if(void 0===t)return e;try{return t.call(e)}catch(e){return e}},i.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)},i.isSetSimpleEqual=function(e,t){for(const n of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,n))return!1;return!0},i.isDeepEqualObj=function(e,t,n,s,r){const{isDeepEqual:l,valueOf:o,hasOwnEnumerableProperty:c}=i,{keys:u,getOwnPropertySymbols:d}=Object;if(e===a.array){if(!s.part){if(t.length!==n.length)return!1;for(let e=0;e{"use strict";const a=n(8761);e.exports=class extends Error{constructor(e){super(e.filter((e=>""!==e)).map((e=>"string"==typeof e?e:e instanceof Error?e.message:a(e))).join(" ")||"Unknown error"),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t.assert)}}},5277:e=>{"use strict";const t={};e.exports=function(e){if(!e)return"";let n="";for(let a=0;a=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)},t.isSafe=function(e){return t.safeCharCodes.has(e)},t.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),t.safeCharCodes=function(){const e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||32===t||46===t||44===t||45===t||58===t||95===t)&&e.add(t);return e}()},6064:e=>{"use strict";e.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:e=>{"use strict";e.exports=function(){}},1687:(e,t,n)=>{"use strict";const a=n(375),i=n(8571),s=n(7043),r={};e.exports=r.merge=function(e,t,n){if(a(e&&"object"==typeof e,"Invalid target value: must be an object"),a(null==t||"object"==typeof t,"Invalid source value: must be null, undefined, or an object"),!t)return e;if(n=Object.assign({nullOverride:!0,mergeArrays:!0},n),Array.isArray(t)){a(Array.isArray(e),"Cannot merge array onto an object"),n.mergeArrays||(e.length=0);for(let a=0;a{"use strict";const a=n(375),i={};e.exports=function(e,t,n){if(!1===t||null==t)return e;"string"==typeof(n=n||{})&&(n={separator:n});const s=Array.isArray(t);a(!s||!n.separator,"Separator option is not valid for array-based chain");const r=s?t:t.split(n.separator||".");let l=e;for(let e=0;e{"use strict";e.exports=function(){try{return JSON.stringify(...arguments)}catch(e){return"[Cannot display object: "+e.message+"]"}}},4277:(e,t)=>{"use strict";const n={};t=e.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},n.typeMap=new Map([["[object Error]",t.error],["[object Map]",t.map],["[object Promise]",t.promise],["[object Set]",t.set],["[object WeakMap]",t.weakMap],["[object WeakSet]",t.weakSet]]),t.getInternalProto=function(e){if(Array.isArray(e))return t.array;if(e instanceof Date)return t.date;if(e instanceof RegExp)return t.regex;if(e instanceof Error)return t.error;const a=Object.prototype.toString.call(e);return n.typeMap.get(a)||t.generic}},7043:(e,t)=>{"use strict";t.keys=function(e){return!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).symbols?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}},3652:(e,t,n)=>{"use strict";const a=n(375),i={};t.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(e,t){const n=[].concat((t=t||{}).before||[]),i=[].concat(t.after||[]),s=t.group||"?",r=t.sort||0;a(!n.includes(s),`Item cannot come before itself: ${s}`),a(!n.includes("?"),"Item cannot come before unassociated items"),a(!i.includes(s),`Item cannot come after itself: ${s}`),a(!i.includes("?"),"Item cannot come after unassociated items"),Array.isArray(e)||(e=[e]);for(const t of e){const e={seq:this._items.length,sort:r,before:n,after:i,group:s,node:t};this._items.push(e)}if(!t.manual){const e=this._sort();a(e,"item","?"!==s?`added into group ${s}`:"","created a dependencies error")}return this.nodes}merge(e){Array.isArray(e)||(e=[e]);for(const t of e)if(t)for(const e of t._items)this._items.push(Object.assign({},e));this._items.sort(i.mergeSort);for(let e=0;ee.sort===t.sort?0:e.sort{"use strict";const a=n(443),i=n(2178),s={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:a.URL||URL};t.analyze=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return i.code("DOMAIN_NON_EMPTY_STRING");if("string"!=typeof e)throw new Error("Invalid input: domain must be a string");if(e.length>256)return i.code("DOMAIN_TOO_LONG");if(s.nonAsciiRx.test(e)){if(!1===t.allowUnicode)return i.code("DOMAIN_INVALID_UNICODE_CHARS");e=e.normalize("NFC")}if(s.domainControlRx.test(e))return i.code("DOMAIN_INVALID_CHARS");e=s.punycode(e),t.allowFullyQualified&&"."===e[e.length-1]&&(e=e.slice(0,-1));const n=t.minDomainSegments||s.minDomainSegments,a=e.split(".");if(a.lengtht.maxDomainSegments)return i.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=t.tlds;if(r){const e=a[a.length-1].toLowerCase();if(r.deny&&r.deny.has(e)||r.allow&&!r.allow.has(e))return i.code("DOMAIN_FORBIDDEN_TLDS")}for(let e=0;e63)return i.code("DOMAIN_LONG_SEGMENT");if(e{"use strict";const a=n(9848),i=n(5380),s=n(2178),r={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(a.TextEncoder||TextEncoder)};t.analyze=function(e,t){return r.email(e,t)},t.isValid=function(e,t){return!r.email(e,t)},r.email=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw new Error("Invalid input: email must be a string");if(!e)return s.code("EMPTY_STRING");const n=!r.nonAsciiRx.test(e);if(!n){if(!1===t.allowUnicode)return s.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const a=e.split("@");if(2!==a.length)return a.length>2?s.code("MULTIPLE_AT_CHAR"):s.code("MISSING_AT_CHAR");const[l,o]=a;if(!l)return s.code("EMPTY_LOCAL");if(!t.ignoreLength){if(e.length>254)return s.code("ADDRESS_TOO_LONG");if(r.encoder.encode(l).length>64)return s.code("LOCAL_TOO_LONG")}return r.local(l,n)||i.analyze(o,t)},r.local=function(e,t){const n=e.split(".");for(const e of n){if(!e.length)return s.code("EMPTY_LOCAL_SEGMENT");if(t){if(!r.atextRx.test(e))return s.code("INVALID_LOCAL_CHARS")}else for(const t of e){if(r.atextRx.test(t))continue;const e=r.binary(t);if(!r.atomRx.test(e))return s.code("INVALID_LOCAL_CHARS")}}},r.binary=function(e){return Array.from(r.encoder.encode(e)).map((e=>String.fromCharCode(e))).join("")},r.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,r.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(e,t)=>{"use strict";t.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},t.code=function(e){return{code:e,error:t.codes[e]}}},9959:(e,t,n)=>{"use strict";const a=n(375),i=n(5752);t.regex=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(void 0===e.cidr||"string"==typeof e.cidr,"options.cidr must be a string");const t=e.cidr?e.cidr.toLowerCase():"optional";a(["required","optional","forbidden"].includes(t),"options.cidr must be one of required, optional, forbidden"),a(void 0===e.version||"string"==typeof e.version||Array.isArray(e.version),"options.version must be a string or an array of string");let n=e.version||["ipv4","ipv6","ipvfuture"];Array.isArray(n)||(n=[n]),a(n.length>=1,"options.version must have at least 1 version specified");for(let e=0;e{if("forbidden"===t)return i.ip[e];const n=`\\/${"ipv4"===e?i.ip.v4Cidr:i.ip.v6Cidr}`;return"required"===t?`${i.ip[e]}${n}`:`${i.ip[e]}(?:${n})?`})).join("|")})`,r=new RegExp(`^${s}$`);return{cidr:t,versions:n,regex:r,raw:s}}},5752:(e,t,n)=>{"use strict";const a=n(375),i=n(6064),s={generate:function(){const e={},t="\\dA-Fa-f",n="["+t+"]",a="\\w-\\.~",i="!\\$&'\\(\\)\\*\\+,;=",s="%"+t,r=a+s+i+":@",l="["+r+"]",o="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";e.ipv4address="(?:"+o+"\\.){3}"+o;const c=n+"{1,4}",u="(?:"+c+":"+c+"|"+e.ipv4address+")",d="(?:"+c+":){6}"+u,p="::(?:"+c+":){5}"+u,g="(?:"+c+")?::(?:"+c+":){4}"+u,j="(?:(?:"+c+":){0,1}"+c+")?::(?:"+c+":){3}"+u,x="(?:(?:"+c+":){0,2}"+c+")?::(?:"+c+":){2}"+u,M="(?:(?:"+c+":){0,3}"+c+")?::"+c+":"+u,h="(?:(?:"+c+":){0,4}"+c+")?::"+u,m="(?:(?:"+c+":){0,5}"+c+")?::"+c,f="(?:(?:"+c+":){0,6}"+c+")?::";e.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",e.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",e.ipv6address="(?:"+d+"|"+p+"|"+g+"|"+j+"|"+x+"|"+M+"|"+h+"|"+m+"|"+f+")",e.ipvFuture="v"+n+"+\\.["+a+i+":]+",e.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",e.schemeRegex=new RegExp(e.scheme);const b="["+a+s+i+":]*",y="["+a+s+i+"]{1,255}",O="(?:\\[(?:"+e.ipv6address+"|"+e.ipvFuture+")\\]|"+e.ipv4address+"|"+y+")",I="(?:"+b+"@)?"+O+"(?::\\d*)?",S="(?:"+b+"@)?("+O+")(?::\\d*)?",N=l+"*",E=l+"+",D="(?:\\/"+N+")*",T="\\/(?:"+E+D+")?",w=E+D,v="["+a+s+i+"@]+"+D,C="(?:\\/\\/\\/"+N+D+")";return e.hierPart="(?:(?:\\/\\/"+I+D+")|"+T+"|"+w+"|"+C+")",e.hierPartCapture="(?:(?:\\/\\/"+S+D+")|"+T+"|"+w+")",e.relativeRef="(?:(?:\\/\\/"+I+D+")|"+T+"|"+v+"|)",e.relativeRefCapture="(?:(?:\\/\\/"+S+D+")|"+T+"|"+v+"|)",e.query="["+r+"\\/\\?]*(?=#|$)",e.queryWithSquareBrackets="["+r+"\\[\\]\\/\\?]*(?=#|$)",e.fragment="["+r+"\\/\\?]*",e}};s.rfc3986=s.generate(),t.ip={v4Cidr:s.rfc3986.ipv4Cidr,v6Cidr:s.rfc3986.ipv6Cidr,ipv4:s.rfc3986.ipv4address,ipv6:s.rfc3986.ipv6address,ipvfuture:s.rfc3986.ipvFuture},s.createRegex=function(e){const t=s.rfc3986,n="(?:\\?"+(e.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",r=e.domain?t.relativeRefCapture:t.relativeRef;if(e.relativeOnly)return s.wrap(r+n);let l="";if(e.scheme){a(e.scheme instanceof RegExp||"string"==typeof e.scheme||Array.isArray(e.scheme),"scheme must be a RegExp, String, or Array");const n=[].concat(e.scheme);a(n.length>=1,"scheme must have at least 1 scheme specified");const s=[];for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return e.scheme||e.allowRelative||e.relativeOnly||e.allowQuerySquareBrackets||e.domain?s.createRegex(e):s.uriRegex}},1447:(e,t)=>{"use strict";const n={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};t.Parser=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t[n.settings]&&t.constants)for(const e in t.constants){const n=t.constants[e];if(null!==n&&!["boolean","number","string"].includes(typeof n))throw new Error(`Formula constant ${e} contains invalid ${typeof n} value type`)}this.settings=t[n.settings]?t:Object.assign({[n.settings]:!0,constants:{},functions:{}},t),this.single=null,this._parts=null,this._parse(e)}_parse(e){let a=[],i="",s=0,r=!1;const l=e=>{if(s)throw new Error("Formula missing closing parenthesis");const l=a.length?a[a.length-1]:null;if(r||i||e){if(l&&"reference"===l.type&&")"===e)return l.type="function",l.value=this._subFormula(i,l.value),void(i="");if(")"===e){const e=new t.Parser(i,this.settings);a.push({type:"segment",value:e})}else if(r){if("]"===r)return a.push({type:"reference",value:i}),void(i="");a.push({type:"literal",value:i})}else if(n.operatorCharacters.includes(i))l&&"operator"===l.type&&n.operators.includes(l.value+i)?l.value+=i:a.push({type:"operator",value:i});else if(i.match(n.numberRx))a.push({type:"constant",value:parseFloat(i)});else if(void 0!==this.settings.constants[i])a.push({type:"constant",value:this.settings.constants[i]});else{if(!i.match(n.tokenRx))throw new Error(`Formula contains invalid token: ${i}`);a.push({type:"reference",value:i})}i=""}};for(const t of e)r?t===r?(l(),r=!1):i+=t:s?"("===t?(i+=t,++s):")"===t?(--s,s?i+=t:l(t)):i+=t:t in n.literals?r=n.literals[t]:"("===t?(l(),++s):n.operatorCharacters.includes(t)?(l(),i=t,l()):" "!==t?i+=t:l();l(),a=a.map(((e,t)=>"operator"!==e.type||"-"!==e.value||t&&"operator"!==a[t-1].type?e:{type:"operator",value:"n"}));let o=!1;for(const e of a){if("operator"===e.type){if(n.operatorsPrefix.includes(e.value))continue;if(!o)throw new Error("Formula contains an operator in invalid position");if(!n.operators.includes(e.value))throw new Error(`Formula contains an unknown operator ${e.value}`)}else if(o)throw new Error("Formula missing expected operator");o=!o}if(!o)throw new Error("Formula contains invalid trailing operator");1===a.length&&["reference","literal","constant"].includes(a[0].type)&&(this.single={type:"reference"===a[0].type?"reference":"value",value:a[0].value}),this._parts=a.map((e=>{if("operator"===e.type)return n.operatorsPrefix.includes(e.value)?e:e.value;if("reference"!==e.type)return e.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(e.value))throw new Error(`Formula contains invalid reference ${e.value}`);return this.settings.reference?this.settings.reference(e.value):n.reference(e.value)}))}_subFormula(e,a){const i=this.settings.functions[a];if("function"!=typeof i)throw new Error(`Formula contains unknown function ${a}`);let s=[];if(e){let t="",i=0,r=!1;const l=()=>{if(!t)throw new Error(`Formula contains function ${a} with invalid arguments ${e}`);s.push(t),t=""};for(let a=0;anew t.Parser(e,this.settings))),function(e){const t=[];for(const n of s)t.push(n.evaluate(e));return i.call(e,...t)}}evaluate(e){const t=this._parts.slice();for(let a=t.length-2;a>=0;--a){const i=t[a];if(i&&"operator"===i.type){const s=t[a+1];t.splice(a+1,1);const r=n.evaluate(s,e);t[a]=n.single(i.value,r)}}return n.operatorsOrder.forEach((a=>{for(let i=1;i":return t>a;case">=":return t>=a;case"==":return t===a;case"!=":return t!==a;case"&&":return t&&a;case"||":return t||a}return null},n.exists=function(e){return null!=e}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:e=>{"use strict";e.exports={version:"17.7.1"}}},t={},function n(a){var i=t[a];if(void 0!==i)return i.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,n),s.exports}(5107);var e,t},e.exports=a()},534:function(e,t,n){e.exports=i;var a=n(197).EventEmitter;function i(){a.call(this)}n(110)(i,a),i.Readable=n(198),i.Writable=n(543),i.Duplex=n(544),i.Transform=n(545),i.PassThrough=n(546),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function s(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",s),e._isStdio||t&&!1===t.end||(n.on("end",l),n.on("close",o));var r=!1;function l(){r||(r=!0,e.end())}function o(){r||(r=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===a.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",s),n.removeListener("end",l),n.removeListener("close",o),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",c),e.on("error",c),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}},535:function(e,t,n){e.exports=n(6)(2946)},536:function(e,t){},537:function(e,t,n){"use strict";var a=n(199).Buffer,i=n(538);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return a.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i=a.allocUnsafe(e>>>0),s=this.head,r=0;s;)t=i,n=r,s.data.copy(t,n),r+=s.data.length,s=s.next;return i},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},538:function(e,t){},539:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var a,i,s,r,l,o=1,c={},u=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?a=function(e){t.nextTick((function(){j(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(r="setImmediate$"+Math.random()+"$",l=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&j(+t.data.slice(r.length))},e.addEventListener?e.addEventListener("message",l,!1):e.attachEvent("onmessage",l),a=function(t){e.postMessage(r+t,"*")}):e.MessageChannel?((s=new MessageChannel).port1.onmessage=function(e){j(e.data)},a=function(e){s.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,a=function(e){var t=d.createElement("script");t.onreadystatechange=function(){j(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):a=function(e){setTimeout(j,0,e)},p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n{const[g,j]=Object(a.useState)(!0);return Object(a.useEffect)((()=>{e((()=>j(!1)))}),[]),Object(o.jsx)(i.EuiFlexGroup,{direction:"column",gutterSize:"xs"},Object(o.jsx)(i.EuiFlexItem,null,Object(o.jsx)(i.EuiFlexGroup,{alignItems:"center"},Object(o.jsx)(i.EuiFlexItem,null,Object(o.jsx)(i.EuiTitle,{size:"xs"},Object(o.jsx)("h4",null,d))),Object(o.jsx)(i.EuiFlexItem,{grow:!1},Object(o.jsx)(i.EuiButtonEmpty,{"data-telemetry-id":`entSearchContent-${c}-pipelines-ingestPipelines-settings`,onClick:u},s.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestPipelinesCard.settings.label",{defaultMessage:"Settings"}))))),Object(o.jsx)(i.EuiFlexItem,null,Object(o.jsx)(i.EuiFlexGroup,{justifyContent:"flexEnd"},Object(r.g)(t)&&Object(o.jsx)(i.EuiFlexItem,null,Object(o.jsx)(i.EuiAccordion,{"data-telemetry-id":`entSearchContent-${c}-pipelines-ingestPipelines-viewCurlRequest`,buttonContent:s.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestPipelinesCard.accordion.label",{defaultMessage:"Ingest a document using cURL"}),id:"ingestPipelinesCurlAccordion",forceState:g?"open":"closed",onClick:()=>j(!g)},Object(o.jsx)(l.a,{document:{body:"body",title:"Title"},indexName:n,pipeline:{...p,name:d}}))),Object(o.jsx)(i.EuiFlexItem,{grow:!1},Object(o.jsx)("span",null,Object(o.jsx)(i.EuiBadge,{color:"hollow",iconType:"lock"},s.i18n.translate("xpack.enterpriseSearch.content.indices.pipelines.ingestPipelinesCard.managedBadge.label",{defaultMessage:"Managed"})))))))}}).call(this,n(266).setImmediate)},548:function(e,t,n){e.exports=n.p+"26cafacde58ea6b27818c65c95dd10b9.svg"},549:function(e,t,n){var a=n(34),i=n(550);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},550:function(e,t,n){(t=n(35)(!1)).push([e.i,".enterpriseSearchInferencePipelineFlyout .resizableContainer{min-height:320px}.enterpriseSearchInferencePipelineFlyout .resizableContainer .reviewCodeBlock{height:100%}.enterpriseSearchInferencePipelineFlyout .enterpriseSearchInferencePipelineFlyoutFooter .euiButtonEmpty{padding-inline:12px}",""]),e.exports=t},551:function(e,t,n){var a=n(34),i=n(552);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},552:function(e,t,n){(t=n(35)(!1)).push([e.i,".enterpriseSearchInferencePipelineFlyout .resizableContainer{min-height:320px}.enterpriseSearchInferencePipelineFlyout .resizableContainer .reviewCodeBlock{height:100%}.enterpriseSearchInferencePipelineFlyout .enterpriseSearchInferencePipelineFlyoutFooter .euiButtonEmpty{padding-inline:12px}",""]),e.exports=t},553:function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(554);case"v8light":return n(556)}},554:function(e,t,n){var a=n(34),i=n(555);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},555:function(e,t,n){(t=n(35)(!1)).push([e.i,".connectorCheckable{flex-grow:1}",""]),e.exports=t},556:function(e,t,n){var a=n(34),i=n(557);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);a(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},557:function(e,t,n){(t=n(35)(!1)).push([e.i,".connectorCheckable{flex-grow:1}",""]),e.exports=t},56:function(e,t,n){"use strict";let a,i,s,r,l,o,c,u,d,p;n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return s})),n.d(t,"i",(function(){return r})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return o})),n.d(t,"g",(function(){return c})),n.d(t,"j",(function(){return u})),n.d(t,"h",(function(){return d})),n.d(t,"c",(function(){return p})),function(e){e.TEXTBOX="textbox",e.TEXTAREA="textarea",e.NUMERIC="numeric",e.TOGGLE="toggle",e.DROPDOWN="dropdown"}(a||(a={})),function(e){e.STRING="str",e.INTEGER="int",e.LIST="list",e.BOOLEAN="bool"}(i||(i={})),function(e){e.CREATED="created",e.NEEDS_CONFIGURATION="needs_configuration",e.CONFIGURED="configured",e.CONNECTED="connected",e.ERROR="error"}(s||(s={})),function(e){e.CANCELING="canceling",e.CANCELED="canceled",e.COMPLETED="completed",e.ERROR="error",e.IN_PROGRESS="in_progress",e.PENDING="pending",e.SUSPENDED="suspended"}(r||(r={})),function(e){e.EXCLUDE="exclude",e.INCLUDE="include"}(l||(l={})),function(e){e.CONTAINS="contains",e.ENDS_WITH="ends_with",e.EQUALS="equals",e.GT=">",e.LT="<",e.REGEX="regex",e.STARTS_WITH="starts_with"}(o||(o={})),function(e){e.EDITED="edited",e.INVALID="invalid",e.VALID="valid"}(c||(c={})),function(e){e.ON_DEMAND="on_demand",e.SCHEDULED="scheduled"}(u||(u={})),function(e){e.FULL="full",e.INCREMENTAL="incremental",e.ACCESS_CONTROL="access_control"}(d||(d={})),function(e){e.FILTERING_ADVANCED_CONFIG="filtering_advanced_config",e.FILTERING_RULES="filtering_rules",e.DOCUMENT_LEVEL_SECURITY="document_level_security",e.INCREMENTAL_SYNC="incremental_sync",e.SYNC_RULES="sync_rules"}(p||(p={}))},61:function(e,t,n){(function(t){var n;n=function(){"use strict";var e="function"==typeof Promise,n="object"==typeof self?self:t,a="undefined"!=typeof Symbol,i="undefined"!=typeof Map,s="undefined"!=typeof Set,r="undefined"!=typeof WeakMap,l="undefined"!=typeof WeakSet,o="undefined"!=typeof DataView,c=a&&void 0!==Symbol.iterator,u=a&&void 0!==Symbol.toStringTag,d=s&&"function"==typeof Set.prototype.entries,p=i&&"function"==typeof Map.prototype.entries,g=d&&Object.getPrototypeOf((new Set).entries()),j=p&&Object.getPrototypeOf((new Map).entries()),x=c&&"function"==typeof Array.prototype[Symbol.iterator],M=x&&Object.getPrototypeOf([][Symbol.iterator]()),h=c&&"function"==typeof String.prototype[Symbol.iterator],m=h&&Object.getPrototypeOf(""[Symbol.iterator]());return function(t){var a=typeof t;if("object"!==a)return a;if(null===t)return"null";if(t===n)return"global";if(Array.isArray(t)&&(!1===u||!(Symbol.toStringTag in t)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&t===window.location)return"Location";if("object"==typeof window.document&&t===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&t===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&t===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&t instanceof window.HTMLElement){if("BLOCKQUOTE"===t.tagName)return"HTMLQuoteElement";if("TD"===t.tagName)return"HTMLTableDataCellElement";if("TH"===t.tagName)return"HTMLTableHeaderCellElement"}}var c=u&&t[Symbol.toStringTag];if("string"==typeof c)return c;var d=Object.getPrototypeOf(t);return d===RegExp.prototype?"RegExp":d===Date.prototype?"Date":e&&d===Promise.prototype?"Promise":s&&d===Set.prototype?"Set":i&&d===Map.prototype?"Map":l&&d===WeakSet.prototype?"WeakSet":r&&d===WeakMap.prototype?"WeakMap":o&&d===DataView.prototype?"DataView":i&&d===j?"Map Iterator":s&&d===g?"Set Iterator":x&&d===M?"Array Iterator":h&&d===m?"String Iterator":null===d?"Object":Object.prototype.toString.call(t).slice(8,-1)}},e.exports=n()}).call(this,n(111))},67:function(e,t,n){"use strict";e.exports=function(e){var t=void 0;t="string"==typeof e?[e]:e.raw;for(var n="",a=0;a{const{cloud:e}=Object(a.useValues)(i.a);return{cloudId:null==e?void 0:e.cloudId,deploymentUrl:null==e?void 0:e.deploymentUrl,elasticsearchUrl:null==e?void 0:e.elasticsearchUrl,kibanaUrl:null==e?void 0:e.kibanaUrl}}},77:function(e,t,n){"use strict";var a=n(45);n.d(t,"a",(function(){return a.a})),n.d(t,"b",(function(){return a.b}))},80:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(10),i=n.n(a),s=n(13),r=n(11);const l=({date:e,hideTime:t=!1})=>Object(r.jsx)(i.a.Fragment,null,Object(r.jsx)(s.FormattedDate,{value:e,year:"numeric",month:"short",day:"numeric"}),!t&&Object(r.jsx)(i.a.Fragment,null," ",Object(r.jsx)(s.FormattedTime,{value:e})))},86:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n(41),i=n.n(a),s=n(10),r=n.n(s),l=n(16),o=n.n(l),c=n(12),u=(n(191),n(59)),d=n(11);const p=({title:e,titleSize:t="xs",subtitle:n,iconType:a,action:s,filled:l,isLoading:p,footerDocLink:g,className:j,children:x,...M})=>{const h=o()("dataPanel",j,{"dataPanel--filled":l});return Object(d.jsx)(c.EuiSplitPanel.Outer,i()({color:l?"subdued":"plain",className:h,hasShadow:!1,hasBorder:!l,"aria-busy":p},M),Object(d.jsx)(c.EuiSplitPanel.Inner,null,Object(d.jsx)(c.EuiFlexGroup,{gutterSize:"s",alignItems:"center",responsive:!1},Object(d.jsx)(c.EuiFlexItem,{grow:!0},Object(d.jsx)(c.EuiFlexGroup,{className:"eui-textNoWrap",gutterSize:"s",alignItems:"center",responsive:!1},a&&Object(d.jsx)(c.EuiFlexItem,{grow:!1},Object(d.jsx)(c.EuiIcon,{type:a})),Object(d.jsx)(c.EuiFlexItem,null,Object(d.jsx)(c.EuiTitle,{size:t},e)))),s&&Object(d.jsx)(c.EuiFlexItem,{grow:!1},s)),n&&Object(d.jsx)(r.a.Fragment,null,Object(d.jsx)(c.EuiSpacer,{size:"xs"}),Object(d.jsx)(c.EuiText,{size:"s",color:"subdued"},Object(d.jsx)("p",null,n))),x&&Object(d.jsx)(r.a.Fragment,null,Object(d.jsx)(c.EuiSpacer,{size:l||n?"l":"s"}),x),p&&Object(d.jsx)(u.b,null)),!!g&&Object(d.jsx)(c.EuiSplitPanel.Inner,{color:"subdued"},g))}},96:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s}));const a={red:"danger",green:"success",yellow:"warning",unavailable:""},i={red:"danger",RED:"danger",green:"success",GREEN:"success",yellow:"warning",YELLOW:"warning"},s=e=>{var t;return e&&null!==(t=a[e.toLowerCase()])&&void 0!==t?t:""}},98:function(e,t,n){e.exports=n(6)(448)},99:function(e,t,n){"use strict";var a=n(143),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var s=Object.create(n(129));s.inherits=n(110);var r=n(263),l=n(200);s.inherits(d,r);for(var o=i(l.prototype),c=0;c