/*! 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.discoverLogExplorer_bundle_jsonpfunction=window.discoverLogExplorer_bundle_jsonpfunction||[]).push([[1],{27:function(t,n,e){"use strict";e.d(n,"c",(function(){return r.a})),e.d(n,"a",(function(){return dataset_Dataset})),e.d(n,"b",(function(){return integration_Integration}));var r=e(43),i=e(5),u=e.n(i);class dataset_Dataset{constructor(t,n){var e;u()(this,"id",void 0),u()(this,"iconType",void 0),u()(this,"name",void 0),u()(this,"title",void 0),u()(this,"parentIntegration",void 0),this.id=`dataset-${t.name}`,this.iconType=t.iconType,this.name=t.name,this.title=null!==(e=t.title)&&void 0!==e?e:t.name,this.parentIntegration=n&&{name:n.name,title:n.title,icons:n.icons,version:n.version}}getFullTitle(){var t;return null!==(t=this.parentIntegration)&&void 0!==t&&t.title?`[${this.parentIntegration.title}] ${this.title}`:this.title}getDatasetWildcard(){const[t,n,e]=this.name.split("-");return`${t}-${n}-*`}toDataviewSpec(){return{id:this.id,name:this.getFullTitle(),title:this.name}}toPlain(){return{name:this.name,title:this.title}}static create(t,n){return new dataset_Dataset(t,n)}static createAllLogsDataset(){return new dataset_Dataset({name:"logs-*-*",title:"All log datasets",iconType:"editorChecklist"})}static createWildcardDatasetsFrom(t){const n=t.reduce(((t,n)=>t.add(n.getDatasetWildcard())),new Set);return Array.from(n).map((t=>dataset_Dataset.create({name:t})))}}class integration_Integration{constructor(t){var n;u()(this,"id",void 0),u()(this,"name",void 0),u()(this,"title",void 0),u()(this,"description",void 0),u()(this,"icons",void 0),u()(this,"status",void 0),u()(this,"version",void 0),u()(this,"datasets",void 0),this.id=t.id,this.name=t.name,this.title=null!==(n=t.title)&&void 0!==n?n:t.name,this.description=t.description,this.icons=t.icons,this.status=t.status,this.version=t.version,this.datasets=t.datasets}static create(t){var n;const e={...t,id:`integration-${t.name}-${t.version}`,title:null!==(n=t.title)&&void 0!==n?n:t.name};return new integration_Integration({...e,datasets:t.dataStreams.map((t=>dataset_Dataset.create(t,e)))})}}},30:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.apS=n.apSW=n.bind=n.bindW=n.bindTo=n.exists=n.elem=n.toError=n.either=n.getValidationMonoid=n.MonadThrow=n.ChainRec=n.Extend=n.Alt=n.Bifunctor=n.Traversable=n.Foldable=n.Monad=n.Applicative=n.Functor=n.getValidationSemigroup=n.getValidation=n.getAltValidation=n.getApplicativeValidation=n.getWitherable=n.getFilterable=n.getApplyMonoid=n.getApplySemigroup=n.getSemigroup=n.getEq=n.getShow=n.URI=n.throwError=n.sequence=n.traverse=n.reduceRight=n.foldMap=n.reduce=n.duplicate=n.extend=n.alt=n.flatten=n.chainFirst=n.chainFirstW=n.chain=n.chainW=n.of=n.apSecond=n.apFirst=n.ap=n.apW=n.mapLeft=n.bimap=n.map=n.filterOrElse=n.orElse=n.swap=n.getOrElse=n.getOrElseW=n.fold=n.fromPredicate=n.fromOption=n.stringifyJSON=n.parseJSON=n.tryCatch=n.fromNullable=n.right=n.left=n.isRight=n.isLeft=void 0;var r=e(64),i=e(44);function u(t,e){try{return n.right(t())}catch(t){return n.left(e(t))}}n.isLeft=function(t){return"Left"===t._tag},n.isRight=function(t){return"Right"===t._tag},n.left=function(t){return{_tag:"Left",left:t}},n.right=function(t){return{_tag:"Right",right:t}},n.fromNullable=function(t){return function(e){return null==e?n.left(t):n.right(e)}},n.tryCatch=u,n.parseJSON=function(t,n){return u((function(){return JSON.parse(t)}),n)},n.stringifyJSON=function(t,n){return u((function(){return JSON.stringify(t)}),n)},n.fromOption=function(t){return function(e){return"None"===e._tag?n.left(t()):n.right(e.value)}},n.fromPredicate=function(t,e){return function(r){return t(r)?n.right(r):n.left(e(r))}},n.fold=function(t,e){return function(r){return n.isLeft(r)?t(r.left):e(r.right)}},n.getOrElseW=function(t){return function(e){return n.isLeft(e)?t(e.left):e.right}},n.getOrElse=n.getOrElseW,n.swap=function(t){return n.isLeft(t)?n.right(t.left):n.left(t.right)},n.orElse=function(t){return function(e){return n.isLeft(e)?t(e.left):e}},n.filterOrElse=function(t,e){return n.chain((function(r){return t(r)?n.right(r):n.left(e(r))}))};var o=function(t,e){return i.pipe(t,n.map(e))},c=function(t,e){return i.pipe(t,n.ap(e))},a=function(t,e){return i.pipe(t,n.chain(e))},f=function(t,e,r){return i.pipe(t,n.reduce(e,r))},s=function(t){return function(e,r){var u=n.foldMap(t);return i.pipe(e,u(r))}},p=function(t,e,r){return i.pipe(t,n.reduceRight(e,r))},l=function(t){var e=n.traverse(t);return function(t,n){return i.pipe(t,e(n))}},h=function(t,e,r){return i.pipe(t,n.bimap(e,r))},d=function(t,e){return i.pipe(t,n.mapLeft(e))},g=function(t,e){return i.pipe(t,n.alt(e))},m=function(t,e){return i.pipe(t,n.extend(e))},v=function(t,e){return r.tailRec(e(t),(function(t){return n.isLeft(t)?n.right(n.left(t.left)):n.isLeft(t.right)?n.left(e(t.right.left)):n.right(n.right(t.right.right))}))};function y(t){return{concat:function(e,r){return n.isLeft(e)?e:n.isLeft(r)?r:n.right(t.concat(e.right,r.right))}}}function I(t){var e=n.left(t.empty);return{URI:n.URI,_E:void 0,map:o,compact:function(t){return n.isLeft(t)?t:"None"===t.right._tag?e:n.right(t.right.value)},separate:function(t){return n.isLeft(t)?{left:t,right:t}:n.isLeft(t.right)?{left:n.right(t.right.left),right:e}:{left:e,right:n.right(t.right.right)}},filter:function(t,r){return n.isLeft(t)||r(t.right)?t:e},filterMap:function(t,r){if(n.isLeft(t))return t;var i=r(t.right);return"None"===i._tag?e:n.right(i.value)},partition:function(t,r){return n.isLeft(t)?{left:t,right:t}:r(t.right)?{left:e,right:n.right(t.right)}:{left:n.right(t.right),right:e}},partitionMap:function(t,r){if(n.isLeft(t))return{left:t,right:t};var i=r(t.right);return n.isLeft(i)?{left:n.right(i.left),right:e}:{left:e,right:n.right(i.right)}}}}function b(t){return{URI:n.URI,_E:void 0,map:o,ap:function(e,r){return n.isLeft(e)?n.isLeft(r)?n.left(t.concat(e.left,r.left)):e:n.isLeft(r)?r:n.right(e.right(r.right))},of:n.of}}function R(t){return{URI:n.URI,_E:void 0,map:o,alt:function(e,r){if(n.isRight(e))return e;var i=r();return n.isLeft(i)?n.left(t.concat(e.left,i.left)):i}}}function L(t,e){return{concat:function(r,i){return n.isLeft(r)?n.isLeft(i)?n.left(t.concat(r.left,i.left)):r:n.isLeft(i)?i:n.right(e.concat(r.right,i.right))}}}n.map=function(t){return function(e){return n.isLeft(e)?e:n.right(t(e.right))}},n.bimap=function(t,e){return function(r){return n.isLeft(r)?n.left(t(r.left)):n.right(e(r.right))}},n.mapLeft=function(t){return function(e){return n.isLeft(e)?n.left(t(e.left)):e}},n.apW=function(t){return function(e){return n.isLeft(e)?e:n.isLeft(t)?t:n.right(e.right(t.right))}},n.ap=n.apW,n.apFirst=function(t){return i.flow(n.map((function(t){return function(){return t}})),n.ap(t))},n.apSecond=function(t){return i.flow(n.map((function(){return function(t){return t}})),n.ap(t))},n.of=n.right,n.chainW=function(t){return function(e){return n.isLeft(e)?e:t(e.right)}},n.chain=n.chainW,n.chainFirstW=function(t){return function(e){return i.pipe(e,n.chainW((function(e){return i.pipe(t(e),n.map((function(){return e})))})))}},n.chainFirst=n.chainFirstW,n.flatten=n.chain(i.identity),n.alt=function(t){return function(e){return n.isLeft(e)?t():e}},n.extend=function(t){return function(e){return n.isLeft(e)?e:n.right(t(e))}},n.duplicate=n.extend(i.identity),n.reduce=function(t,e){return function(r){return n.isLeft(r)?t:e(t,r.right)}},n.foldMap=function(t){return function(e){return function(r){return n.isLeft(r)?t.empty:e(r.right)}}},n.reduceRight=function(t,e){return function(r){return n.isLeft(r)?t:e(r.right,t)}},n.traverse=function(t){return function(e){return function(r){return n.isLeft(r)?t.of(n.left(r.left)):t.map(e(r.right),n.right)}}},n.sequence=function(t){return function(e){return n.isLeft(e)?t.of(n.left(e.left)):t.map(e.right,n.right)}},n.throwError=n.left,n.URI="Either",n.getShow=function(t,e){return{show:function(r){return n.isLeft(r)?"left("+t.show(r.left)+")":"right("+e.show(r.right)+")"}}},n.getEq=function(t,e){return{equals:function(r,i){return r===i||(n.isLeft(r)?n.isLeft(i)&&t.equals(r.left,i.left):n.isRight(i)&&e.equals(r.right,i.right))}}},n.getSemigroup=function(t){return{concat:function(e,r){return n.isLeft(r)?e:n.isLeft(e)?r:n.right(t.concat(e.right,r.right))}}},n.getApplySemigroup=y,n.getApplyMonoid=function(t){return{concat:y(t).concat,empty:n.right(t.empty)}},n.getFilterable=I,n.getWitherable=function(t){var e=I(t);return{URI:n.URI,_E:void 0,map:o,compact:e.compact,separate:e.separate,filter:e.filter,filterMap:e.filterMap,partition:e.partition,partitionMap:e.partitionMap,traverse:l,sequence:n.sequence,reduce:f,foldMap:s,reduceRight:p,wither:function(t){var n=l(t);return function(r,i){return t.map(n(r,i),e.compact)}},wilt:function(t){var n=l(t);return function(r,i){return t.map(n(r,i),e.separate)}}}},n.getApplicativeValidation=b,n.getAltValidation=R,n.getValidation=function(t){var e=b(t),r=R(t);return{URI:n.URI,_E:void 0,map:o,of:n.of,chain:a,bimap:h,mapLeft:d,reduce:f,foldMap:s,reduceRight:p,extend:m,traverse:l,sequence:n.sequence,chainRec:v,throwError:n.throwError,ap:e.ap,alt:r.alt}},n.getValidationSemigroup=L,n.Functor={URI:n.URI,map:o},n.Applicative={URI:n.URI,map:o,ap:c,of:n.of},n.Monad={URI:n.URI,map:o,ap:c,of:n.of,chain:a},n.Foldable={URI:n.URI,reduce:f,foldMap:s,reduceRight:p},n.Traversable={URI:n.URI,map:o,reduce:f,foldMap:s,reduceRight:p,traverse:l,sequence:n.sequence},n.Bifunctor={URI:n.URI,bimap:h,mapLeft:d},n.Alt={URI:n.URI,map:o,alt:g},n.Extend={URI:n.URI,map:o,extend:m},n.ChainRec={URI:n.URI,map:o,ap:c,chain:a,chainRec:v},n.MonadThrow={URI:n.URI,map:o,ap:c,of:n.of,chain:a,throwError:n.throwError},n.getValidationMonoid=function(t,e){return{concat:L(t,e).concat,empty:n.right(e.empty)}},n.either={URI:n.URI,map:o,of:n.of,ap:c,chain:a,reduce:f,foldMap:s,reduceRight:p,traverse:l,sequence:n.sequence,bimap:h,mapLeft:d,alt:g,extend:m,chainRec:v,throwError:n.throwError},n.toError=function(t){return t instanceof Error?t:new Error(String(t))},n.elem=function(t){return function(e,r){return!n.isLeft(r)&&t.equals(e,r.right)}},n.exists=function(t){return function(e){return!n.isLeft(e)&&t(e.right)}},n.bindTo=function(t){return n.map(i.bindTo_(t))},n.bindW=function(t,e){return n.chainW((function(r){return i.pipe(e(r),n.map((function(n){return i.bind_(r,t,n)})))}))},n.bind=n.bindW,n.apSW=function(t,e){return i.flow(n.map((function(n){return function(e){return i.bind_(n,t,e)}})),n.apW(e))},n.apS=n.apSW},43:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return a}));var r=e(62),i=e(11);const u=i.exact(i.intersection([i.type({name:r.a}),i.partial({title:i.string})])),o=i.keyof({installed:null,installing:null,install_failed:null}),c=i.intersection([i.type({src:i.string}),i.partial({title:i.string,size:i.string,type:i.string})]),a=i.intersection([i.type({name:i.string,status:o,version:i.string,dataStreams:i.array(u)}),i.partial({title:i.union([i.string,i[void 0]]),icons:i.union([i.array(c),i[void 0]]),description:i.union([i.string,i[void 0]])})])},44:function(t,n,e){"use strict";function r(t){return t}function i(t){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(n,"__esModule",{value:!0}),n.bindTo_=n.bind_=n.hole=n.pipe=n.untupled=n.tupled=n.absurd=n.decrement=n.increment=n.tuple=n.flow=n.flip=n.constVoid=n.constUndefined=n.constNull=n.constFalse=n.constTrue=n.constant=n.not=n.unsafeCoerce=n.identity=void 0,n.identity=r,n.unsafeCoerce=r,n.not=function(t){return function(n){return!t(n)}},n.constant=function(t){return function(){return t}},n.constTrue=function(){return!0},n.constFalse=function(){return!1},n.constNull=function(){return null},n.constUndefined=function(){},n.constVoid=function(){},n.flip=function(t){return function(n,e){return t(e,n)}},n.flow=function(t,n,e,r,i,u,o,c,a){switch(arguments.length){case 1:return t;case 2:return function(){return n(t.apply(this,arguments))};case 3:return function(){return e(n(t.apply(this,arguments)))};case 4:return function(){return r(e(n(t.apply(this,arguments))))};case 5:return function(){return i(r(e(n(t.apply(this,arguments)))))};case 6:return function(){return u(i(r(e(n(t.apply(this,arguments))))))};case 7:return function(){return o(u(i(r(e(n(t.apply(this,arguments)))))))};case 8:return function(){return c(o(u(i(r(e(n(t.apply(this,arguments))))))))};case 9:return function(){return a(c(o(u(i(r(e(n(t.apply(this,arguments)))))))))}}},n.tuple=function(){for(var t=[],n=0;n{if(void 0===t)return[];if(t.type instanceof o.IntersectionType){const[,...t]=n;return c(t)}if(t.type instanceof o.UnionType){const[,...e]=n;return[t.key,...c(e)]}return[t.key,...c(n)]},a=t=>new Error(t),f=(t,n=a)=>e=>Object(u.pipe)(t.decode(e),Object(r.fold)((t=>n=>{throw t((t=>`Failed to validate: \n${t.map((t=>` ${(t=>{var n;return null!==(n=t.message)&&void 0!==n?n:`in ${c(t.context).join("/")}: ${JSON.stringify(t.value)} does not match expected type ${(({context:t})=>{var n,e,r;return null!==(n=null===(e=t[t.length-1])||void 0===e||null===(r=e.type)||void 0===r?void 0:r.name)&&void 0!==n?n:"unknown"})(t)}`})(t)}`)).join("\n")}`)(n))})(n),i.identity))},62:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return c}));var r=e(11),i=(e(13),e(30));const u=t=>""===t,o=r.brand(r.string,(t=>{return!u(n=t)&&!n.includes(" ")&&!n.split(",").some(u);var n}),"IndexPattern"),c=new r.Type("JSON",r.any.is,((t,n)=>i.either.chain(r.string.validate(t,n),(e=>{try{return r.success(JSON.parse(e))}catch(e){return r.failure(t,n)}}))),(t=>JSON.stringify(t)));new r.Type("isoToEpochRt",r.number.is,((t,n)=>i.either.chain(r.string.validate(t,n),(e=>{const i=new Date(e).getTime();return isNaN(i)?r.failure(t,n):r.success(i)}))),(t=>new Date(t).toISOString())),new r.Type("ToNumber",r.number.is,((t,n)=>{const e=Number(t);return isNaN(e)?r.failure(t,n):r.success(e)}),r.identity),new r.Type("ToBoolean",r.boolean.is,(t=>{let n;return n="string"==typeof t?"true"===t:!!t,r.success(n)}),r.identity),r.brand(r.string,(t=>t.length>0),"NonEmptyString");var a=e(45),f=e(17),s=e.n(f);r.brand(r.string,(t=>s()(t,!0).isValid()),"Date");var p=e(18),l=e.n(p);new r.Type("datemath",r.string.is,((t,n)=>Object(a.pipe)(r.string.validate(t,n),Object(i.chain)((t=>(t=>{const n=l.a.parse(t);return!(!n||!n.isValid())})(t)?r.success(t):r.failure(t,n))))),String),e(44)},64:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tailRec=void 0,n.tailRec=function(t,n){for(var e=n(t);"Left"===e._tag;)e=n(e.left);return e.right}}}]);