(window.dataViews_bundle_jsonpfunction=window.dataViews_bundle_jsonpfunction||[]).push([[1],{23:function(e,a,t){"use strict";t.r(a),t.d(a,"getIndicesViaResolve",(function(){return c})),t.d(a,"getIndices",(function(){return m})),t.d(a,"responseToItemArray",(function(){return p}));var n=t(1),s=t(7),r=t(16);const i=s.i18n.translate("dataViews.aliasLabel",{defaultMessage:"Alias"}),l=s.i18n.translate("dataViews.dataStreamLabel",{defaultMessage:"Data stream"}),o=s.i18n.translate("dataViews.indexLabel",{defaultMessage:"Index"}),d=s.i18n.translate("dataViews.frozenLabel",{defaultMessage:"Frozen"}),u=s.i18n.translate("dataViews.rollupLabel",{defaultMessage:"Rollup"}),c=async({http:e,pattern:a,showAllIndices:t,isRollupIndex:n})=>{const s=encodeURIComponent(a);return e.get(`/internal/index-pattern-management/resolve_index/${s}`,{query:t?{expand_wildcards:"all"}:void 0}).then((e=>e?p(e,(e=>a=>e(a)?[{key:r.a.ROLLUP,name:u,color:"primary"}]:[])(n)):[]))};async function m({http:e,pattern:a="",showAllIndices:t=!1,isRollupIndex:n}){const s=a.trim();return"*:"===s||""===s||s.startsWith(",")?[]:c({http:e,pattern:s,showAllIndices:t,isRollupIndex:n}).catch((()=>[]))}const p=(e,a)=>{const t=[];return(e.indices||[]).forEach((e=>{const n=[{key:"index",name:o,color:"default"}],s=(e.attributes||[]).includes(r.b.FROZEN);n.push(...a(e.name)),s&&n.push({name:d,key:"frozen",color:"danger"}),t.push({name:e.name,tags:n,item:e})})),(e.aliases||[]).forEach((e=>{t.push({name:e.name,tags:[{key:"alias",name:i,color:"default"}],item:e})})),(e.data_streams||[]).forEach((e=>{t.push({name:e.name,tags:[{key:"data_stream",name:l,color:"primary"}],item:e})})),Object(n.sortBy)(t,"name")}}}]);