/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */!function(e){function t(t){for(var n,o,i=t[0],u=t[1],a=0,c=[];a{};function u(e){i=e.reportUiCounter.bind(e,o.c)}function a(e,t){return e.then((e=>(i(r.METRIC_TYPE.LOADED,t),e)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>Array.isArray(e)?e:[e]},function(e,t){e.exports=__kbnSharedDeps__.KbnI18n},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));var r=n(0);const o=e=>{if(!r.e[e])throw new Error(`Unknown setting ${e}`);return r.e[e]},i=e=>Object.keys(r.e).every((t=>((e,t)=>o(e)===t)(t,e[t])))},function(e,t){e.exports=__kbnSharedDeps__.KbnAnalytics},function(e,t,n){"use strict";n.d(t,"p",(function(){return c})),n.d(t,"f",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"k",(function(){return _})),n.d(t,"a",(function(){return p})),n.d(t,"r",(function(){return m})),n.d(t,"c",(function(){return b})),n.d(t,"l",(function(){return g})),n.d(t,"n",(function(){return x})),n.d(t,"h",(function(){return w})),n.d(t,"e",(function(){return O})),n.d(t,"b",(function(){return R})),n.d(t,"m",(function(){return h})),n.d(t,"o",(function(){return y})),n.d(t,"q",(function(){return j})),n.d(t,"s",(function(){return C})),n.d(t,"g",(function(){return S})),n.d(t,"i",(function(){return k})),n.d(t,"j",(function(){return D}));var r=n(0),o=n(3),i=n(1),u=n(2),a=n(5);let s;function c(e){s=e}const l=e=>e.map((e=>encodeURIComponent(e))).join(","),d=e=>s.get(`${r.a}/auto_follow_patterns`,{asSystemRequest:e}),f=e=>s.get(`${r.a}/auto_follow_patterns/${encodeURIComponent(e)}`),_=()=>s.get(r.c),p=e=>{const t=s.post(`${r.a}/auto_follow_patterns`,{body:JSON.stringify(e)});return Object(u.d)(t,i.d)},m=(e,t)=>{const n=s.put(`${r.a}/auto_follow_patterns/${encodeURIComponent(e)}`,{body:JSON.stringify(t)});return Object(u.d)(n,i.m)},b=e=>{const t=Object(o.a)(e),n=t.map((e=>encodeURIComponent(e))).join(","),a=s.delete(`${r.a}/auto_follow_patterns/${n}`),c=t.length>1?i.f:i.e;return Object(u.d)(a,c)},g=e=>{const t=Object(o.a)(e),n=t.map(encodeURIComponent).join(","),a=s.post(`${r.a}/auto_follow_patterns/${n}/pause`),c=t.length>1?i.i:i.h;return Object(u.d)(a,c)},x=e=>{const t=Object(o.a)(e),n=t.map(encodeURIComponent).join(","),a=s.post(`${r.a}/auto_follow_patterns/${n}/resume`),c=t.length>1?i.k:i.j;return Object(u.d)(a,c)},w=e=>s.get(`${r.a}/follower_indices`,{asSystemRequest:e}),O=e=>s.get(`${r.a}/follower_indices/${encodeURIComponent(e)}`),R=e=>{const t=[i.n];!Object(a.a)(e)&&t.push(i.x);const n=s.post(`${r.a}/follower_indices`,{body:JSON.stringify(e)});return Object(u.d)(n,t)},h=e=>{const t=Object(o.a)(e),n=l(t),a=s.put(`${r.a}/follower_indices/${n}/pause`),c=t.length>1?i.q:i.p;return Object(u.d)(a,c)},y=e=>{const t=Object(o.a)(e),n=l(t),a=s.put(`${r.a}/follower_indices/${n}/resume`),c=t.length>1?i.s:i.r;return Object(u.d)(a,c)},j=e=>{const t=Object(o.a)(e),n=l(t),a=s.put(`${r.a}/follower_indices/${n}/unfollow`),c=t.length>1?i.v:i.u;return Object(u.d)(a,c)},C=(e,t)=>{const n=[i.w];!Object(a.a)(t)&&n.push(i.x);const{maxReadRequestOperationCount:o,maxOutstandingReadRequests:c,maxReadRequestSize:l,maxWriteRequestOperationCount:d,maxWriteRequestSize:f,maxOutstandingWriteRequests:_,maxWriteBufferCount:p,maxWriteBufferSize:m,maxRetryDelay:b,readPollTimeout:g}=t,x=s.put(`${r.a}/follower_indices/${encodeURIComponent(e)}`,{body:JSON.stringify({maxReadRequestOperationCount:o,maxOutstandingReadRequests:c,maxReadRequestSize:l,maxWriteRequestOperationCount:d,maxWriteRequestSize:f,maxOutstandingWriteRequests:_,maxWriteBufferCount:p,maxWriteBufferSize:m,maxRetryDelay:b,readPollTimeout:g})});return Object(u.d)(x,n)},S=()=>s.get(`${r.a}/stats/auto_follow`);let v=null;const k=()=>{v&&(v.abort(),v=null),v=new AbortController;const{signal:e}=v;return s.get(`${r.b}/indices`,{signal:e}).then((e=>(v=null,e)))},D=()=>s.get(`${r.a}/permissions`)},function(e,t,n){"use strict";let r,o;n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return a}));const i=(e,t)=>{r=e,o=t},u=()=>r,a=()=>o},function(e,t){e.exports=__kbnSharedDeps__.Lodash},function(e,t){e.exports=__kbnSharedDeps__.Rxjs},function(e,t,n){n(12),__kbnBundles__.define("plugin/crossClusterReplication/public",n,13)},function(e,t,n){n.p=window.__kbnPublicPath__.crossClusterReplication},function(e,t,n){"use strict";n.r(t),n.d(t,"plugin",(function(){return l}));var r=n(4),o=n(9),i=n(10),u=n(0),a=n(2),s=n(8),c=n(7);class plugin_CrossClusterReplicationPlugin{constructor(e){this.initializerContext=e}setup(e,t){const{licensing:l,remoteClusters:d,usageCollection:f,management:_,indexManagement:p}=t,m=_.sections.section.data,{http:b,notifications:{toasts:g},fatalErrors:x,getStartServices:w}=e;Object(c.p)(b),Object(a.b)(f),Object(s.c)(g,x);const O=m.registerApp({id:u.f,title:u.g.TITLE,order:6,mount:async({element:e,setBreadcrumbs:t,history:r,theme$:o})=>{const{mountApp:i}=await n.e(1).then(n.bind(null,77)),[a]=await w(),{chrome:{docTitle:s},i18n:{Context:c},docLinks:l,application:{getUrlForApp:d},executionContext:f}=a;s.change(u.g.TITLE);const _=await i({element:e,setBreadcrumbs:t,I18nContext:c,docLinks:l,history:r,getUrlForApp:d,theme$:o,executionContext:f});return()=>{s.reset(),_()}}});Promise.all([Object(i.firstValueFrom)(l.license$),w()]).then((([e,t])=>{var n;const i="valid"===e.check(u.g.ID,u.g.minimumLicenseType).state,a=this.initializerContext.config.get(),s=(null===(n=t[0].application.capabilities.management.data)||void 0===n?void 0:n[u.f])&&a.ui.enabled&&d.isUiEnabled;if(i&&s){if(p){const e="isFollowerIndex",t={matchIndex:t=>Object(o.get)(t,e),label:r.i18n.translate("xpack.crossClusterReplication.indexMgmtBadge.followerLabel",{defaultMessage:"Follower"}),color:"default",filterExpression:"isFollowerIndex:true"};p.extensionsService.addBadge(t)}}else O.disable()}))}start(){}stop(){}}const l=e=>new plugin_CrossClusterReplicationPlugin(e)},function(e,t){e.exports=__kbnSharedDeps__.React},function(e,t){e.exports=__kbnSharedDeps__.EmotionReact},function(e,t){e.exports=__kbnSharedDeps__.ElasticEui},function(e,t){e.exports=__kbnSharedDeps__.KbnI18nReact},function(e,t){e.exports=__kbnSharedDeps_npm__},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/esUiShared/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.ReactRouterDom},function(e,t){e.exports=__kbnSharedDeps__.ReactDom},function(e,t,n){n.r(t);var r=__kbnBundles__.get("entry/core/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.TsLib},function(e,t){e.exports=__kbnSharedDeps__.ReactRouterDomV5Compat},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/data/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.Moment},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/indexManagement/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))}]);