/*! 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,i,o=t[0],a=t[1],s=0,c=[];s"index_name"===t.logIndices.type?p(e,t,n,r):h(t,n),p=async(e,t,n,r)=>{var i;if("index_name"!==t.logIndices.type)throw new Error("This function can only resolve legacy references");const o=t.logIndices.indexName,a=await n.create({id:`log-view-${e}`,name:t.name,title:o,timeFieldName:l,allowNoIndex:!0},!1,!1).catch((e=>{throw new c.d(`Failed to create Data View reference: ${e}`,e)}));return{indices:o,timestampField:l,tiebreakerField:f,messageField:null!==(i=r.messageFields)&&void 0!==i?i:s.messageFields,fields:a.fields,runtimeMappings:{},columns:t.logColumns,name:t.name,description:t.description,dataViewReference:a}},h=async(e,t)=>{var n;if("data_view"!==e.logIndices.type)throw new Error("This function can only resolve Kibana data view references");const{dataViewId:r}=e.logIndices,i=await t.get(r).catch((e=>{throw new c.d(`Failed to fetch data view "${r}": ${e}`,e)}));return{indices:i.title,timestampField:null!==(n=i.timeFieldName)&&void 0!==n?n:l,tiebreakerField:f,messageField:["message"],fields:i.fields,runtimeMappings:g(i),columns:e.logColumns,name:e.name,description:e.description,dataViewReference:i}},g=e=>e.getRuntimeMappings();var v=n(0);const y=v.keyof({stored:null,internal:null,inline:null,"infra-source-stored":null,"infra-source-internal":null,"infra-source-fallback":null}),m=v.type({type:v.literal("data_view"),dataViewId:v.string}),b=v.type({type:v.literal("index_name"),indexName:v.string}),w=v.union([m,b]),_=v.strict({id:v.string}),S=v.strict({timestampColumn:_}),O=v.strict({messageColumn:_}),x=v.strict({fieldColumn:v.intersection([_,v.strict({field:v.string})])}),j=v.union([S,O,x]),E=v.strict({name:v.string,description:v.string,logIndices:w,logColumns:v.array(j)}),I=v.exact(v.intersection([v.type({id:v.string,origin:y,attributes:E}),v.partial({updatedAt:v.number,version:v.string})])),A=v.keyof({available:null,empty:null,missing:null,unknown:null}),R=(v.strict({index:A}),v.type({logViewId:v.string,type:v.literal("log-view-reference")})),T=v.type({type:v.literal("log-view-inline"),id:v.string,attributes:E}),C=v.union([R,T])},function(e,t){e.exports=__kbnSharedDeps__.ElasticEui},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.apS=t.apSW=t.bind=t.bindW=t.bindTo=t.exists=t.elem=t.toError=t.either=t.getValidationMonoid=t.MonadThrow=t.ChainRec=t.Extend=t.Alt=t.Bifunctor=t.Traversable=t.Foldable=t.Monad=t.Applicative=t.Functor=t.getValidationSemigroup=t.getValidation=t.getAltValidation=t.getApplicativeValidation=t.getWitherable=t.getFilterable=t.getApplyMonoid=t.getApplySemigroup=t.getSemigroup=t.getEq=t.getShow=t.URI=t.throwError=t.sequence=t.traverse=t.reduceRight=t.foldMap=t.reduce=t.duplicate=t.extend=t.alt=t.flatten=t.chainFirst=t.chainFirstW=t.chain=t.chainW=t.of=t.apSecond=t.apFirst=t.ap=t.apW=t.mapLeft=t.bimap=t.map=t.filterOrElse=t.orElse=t.swap=t.getOrElse=t.getOrElseW=t.fold=t.fromPredicate=t.fromOption=t.stringifyJSON=t.parseJSON=t.tryCatch=t.fromNullable=t.right=t.left=t.isRight=t.isLeft=void 0;var r=n(79),i=n(21);function o(e,n){try{return t.right(e())}catch(e){return t.left(n(e))}}t.isLeft=function(e){return"Left"===e._tag},t.isRight=function(e){return"Right"===e._tag},t.left=function(e){return{_tag:"Left",left:e}},t.right=function(e){return{_tag:"Right",right:e}},t.fromNullable=function(e){return function(n){return null==n?t.left(e):t.right(n)}},t.tryCatch=o,t.parseJSON=function(e,t){return o((function(){return JSON.parse(e)}),t)},t.stringifyJSON=function(e,t){return o((function(){return JSON.stringify(e)}),t)},t.fromOption=function(e){return function(n){return"None"===n._tag?t.left(e()):t.right(n.value)}},t.fromPredicate=function(e,n){return function(r){return e(r)?t.right(r):t.left(n(r))}},t.fold=function(e,n){return function(r){return t.isLeft(r)?e(r.left):n(r.right)}},t.getOrElseW=function(e){return function(n){return t.isLeft(n)?e(n.left):n.right}},t.getOrElse=t.getOrElseW,t.swap=function(e){return t.isLeft(e)?t.right(e.left):t.left(e.right)},t.orElse=function(e){return function(n){return t.isLeft(n)?e(n.left):n}},t.filterOrElse=function(e,n){return t.chain((function(r){return e(r)?t.right(r):t.left(n(r))}))};var a=function(e,n){return i.pipe(e,t.map(n))},s=function(e,n){return i.pipe(e,t.ap(n))},u=function(e,n){return i.pipe(e,t.chain(n))},c=function(e,n,r){return i.pipe(e,t.reduce(n,r))},l=function(e){return function(n,r){var o=t.foldMap(e);return i.pipe(n,o(r))}},f=function(e,n,r){return i.pipe(e,t.reduceRight(n,r))},d=function(e){var n=t.traverse(e);return function(e,t){return i.pipe(e,n(t))}},p=function(e,n,r){return i.pipe(e,t.bimap(n,r))},h=function(e,n){return i.pipe(e,t.mapLeft(n))},g=function(e,n){return i.pipe(e,t.alt(n))},v=function(e,n){return i.pipe(e,t.extend(n))},y=function(e,n){return r.tailRec(n(e),(function(e){return t.isLeft(e)?t.right(t.left(e.left)):t.isLeft(e.right)?t.left(n(e.right.left)):t.right(t.right(e.right.right))}))};function m(e){return{concat:function(n,r){return t.isLeft(n)?n:t.isLeft(r)?r:t.right(e.concat(n.right,r.right))}}}function b(e){var n=t.left(e.empty);return{URI:t.URI,_E:void 0,map:a,compact:function(e){return t.isLeft(e)?e:"None"===e.right._tag?n:t.right(e.right.value)},separate:function(e){return t.isLeft(e)?{left:e,right:e}:t.isLeft(e.right)?{left:t.right(e.right.left),right:n}:{left:n,right:t.right(e.right.right)}},filter:function(e,r){return t.isLeft(e)||r(e.right)?e:n},filterMap:function(e,r){if(t.isLeft(e))return e;var i=r(e.right);return"None"===i._tag?n:t.right(i.value)},partition:function(e,r){return t.isLeft(e)?{left:e,right:e}:r(e.right)?{left:n,right:t.right(e.right)}:{left:t.right(e.right),right:n}},partitionMap:function(e,r){if(t.isLeft(e))return{left:e,right:e};var i=r(e.right);return t.isLeft(i)?{left:t.right(i.left),right:n}:{left:n,right:t.right(i.right)}}}}function w(e){return{URI:t.URI,_E:void 0,map:a,ap:function(n,r){return t.isLeft(n)?t.isLeft(r)?t.left(e.concat(n.left,r.left)):n:t.isLeft(r)?r:t.right(n.right(r.right))},of:t.of}}function _(e){return{URI:t.URI,_E:void 0,map:a,alt:function(n,r){if(t.isRight(n))return n;var i=r();return t.isLeft(i)?t.left(e.concat(n.left,i.left)):i}}}function S(e,n){return{concat:function(r,i){return t.isLeft(r)?t.isLeft(i)?t.left(e.concat(r.left,i.left)):r:t.isLeft(i)?i:t.right(n.concat(r.right,i.right))}}}t.map=function(e){return function(n){return t.isLeft(n)?n:t.right(e(n.right))}},t.bimap=function(e,n){return function(r){return t.isLeft(r)?t.left(e(r.left)):t.right(n(r.right))}},t.mapLeft=function(e){return function(n){return t.isLeft(n)?t.left(e(n.left)):n}},t.apW=function(e){return function(n){return t.isLeft(n)?n:t.isLeft(e)?e:t.right(n.right(e.right))}},t.ap=t.apW,t.apFirst=function(e){return i.flow(t.map((function(e){return function(){return e}})),t.ap(e))},t.apSecond=function(e){return i.flow(t.map((function(){return function(e){return e}})),t.ap(e))},t.of=t.right,t.chainW=function(e){return function(n){return t.isLeft(n)?n:e(n.right)}},t.chain=t.chainW,t.chainFirstW=function(e){return function(n){return i.pipe(n,t.chainW((function(n){return i.pipe(e(n),t.map((function(){return n})))})))}},t.chainFirst=t.chainFirstW,t.flatten=t.chain(i.identity),t.alt=function(e){return function(n){return t.isLeft(n)?e():n}},t.extend=function(e){return function(n){return t.isLeft(n)?n:t.right(e(n))}},t.duplicate=t.extend(i.identity),t.reduce=function(e,n){return function(r){return t.isLeft(r)?e:n(e,r.right)}},t.foldMap=function(e){return function(n){return function(r){return t.isLeft(r)?e.empty:n(r.right)}}},t.reduceRight=function(e,n){return function(r){return t.isLeft(r)?e:n(r.right,e)}},t.traverse=function(e){return function(n){return function(r){return t.isLeft(r)?e.of(t.left(r.left)):e.map(n(r.right),t.right)}}},t.sequence=function(e){return function(n){return t.isLeft(n)?e.of(t.left(n.left)):e.map(n.right,t.right)}},t.throwError=t.left,t.URI="Either",t.getShow=function(e,n){return{show:function(r){return t.isLeft(r)?"left("+e.show(r.left)+")":"right("+n.show(r.right)+")"}}},t.getEq=function(e,n){return{equals:function(r,i){return r===i||(t.isLeft(r)?t.isLeft(i)&&e.equals(r.left,i.left):t.isRight(i)&&n.equals(r.right,i.right))}}},t.getSemigroup=function(e){return{concat:function(n,r){return t.isLeft(r)?n:t.isLeft(n)?r:t.right(e.concat(n.right,r.right))}}},t.getApplySemigroup=m,t.getApplyMonoid=function(e){return{concat:m(e).concat,empty:t.right(e.empty)}},t.getFilterable=b,t.getWitherable=function(e){var n=b(e);return{URI:t.URI,_E:void 0,map:a,compact:n.compact,separate:n.separate,filter:n.filter,filterMap:n.filterMap,partition:n.partition,partitionMap:n.partitionMap,traverse:d,sequence:t.sequence,reduce:c,foldMap:l,reduceRight:f,wither:function(e){var t=d(e);return function(r,i){return e.map(t(r,i),n.compact)}},wilt:function(e){var t=d(e);return function(r,i){return e.map(t(r,i),n.separate)}}}},t.getApplicativeValidation=w,t.getAltValidation=_,t.getValidation=function(e){var n=w(e),r=_(e);return{URI:t.URI,_E:void 0,map:a,of:t.of,chain:u,bimap:p,mapLeft:h,reduce:c,foldMap:l,reduceRight:f,extend:v,traverse:d,sequence:t.sequence,chainRec:y,throwError:t.throwError,ap:n.ap,alt:r.alt}},t.getValidationSemigroup=S,t.Functor={URI:t.URI,map:a},t.Applicative={URI:t.URI,map:a,ap:s,of:t.of},t.Monad={URI:t.URI,map:a,ap:s,of:t.of,chain:u},t.Foldable={URI:t.URI,reduce:c,foldMap:l,reduceRight:f},t.Traversable={URI:t.URI,map:a,reduce:c,foldMap:l,reduceRight:f,traverse:d,sequence:t.sequence},t.Bifunctor={URI:t.URI,bimap:p,mapLeft:h},t.Alt={URI:t.URI,map:a,alt:g},t.Extend={URI:t.URI,map:a,extend:v},t.ChainRec={URI:t.URI,map:a,ap:s,chain:u,chainRec:y},t.MonadThrow={URI:t.URI,map:a,ap:s,of:t.of,chain:u,throwError:t.throwError},t.getValidationMonoid=function(e,n){return{concat:S(e,n).concat,empty:t.right(n.empty)}},t.either={URI:t.URI,map:a,of:t.of,ap:s,chain:u,reduce:c,foldMap:l,reduceRight:f,traverse:d,sequence:t.sequence,bimap:p,mapLeft:h,alt:g,extend:v,chainRec:y,throwError:t.throwError},t.toError=function(e){return e instanceof Error?e:new Error(String(e))},t.elem=function(e){return function(n,r){return!t.isLeft(r)&&e.equals(n,r.right)}},t.exists=function(e){return function(n){return!t.isLeft(n)&&e(n.right)}},t.bindTo=function(e){return t.map(i.bindTo_(e))},t.bindW=function(e,n){return t.chainW((function(r){return i.pipe(n(r),t.map((function(t){return i.bind_(r,e,t)})))}))},t.bind=t.bindW,t.apSW=function(e,n){return i.flow(t.map((function(t){return function(n){return i.bind_(t,e,n)}})),t.apW(n))},t.apS=t.apSW},function(e,t){e.exports=__kbnSharedDeps__.RxjsOperators},function(e,t){e.exports=__kbnSharedDeps__.Lodash},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"i",(function(){return h})),n.d(t,"j",(function(){return v})),n.d(t,"b",(function(){return y})),n.d(t,"g",(function(){return m})),n.d(t,"h",(function(){return w})),n.d(t,"d",(function(){return _})),n.d(t,"k",(function(){return S}));var r=n(0),i=n(12),o=n(4);const a="/api/log_entries/highlights",s=r.intersection([r.type({logView:o.o,startTimestamp:r.number,endTimestamp:r.number,highlightTerms:r.array(r.string)}),r.partial({query:r.union([r.string,r.null]),size:r.number,columns:r.array(o.m)})]),u=r.intersection([s,r.type({before:r.union([i.g,r.literal("last")])})]),c=r.intersection([s,r.type({after:r.union([i.g,r.literal("first")])})]),l=r.intersection([s,r.type({center:i.g})]),f=r.union([s,u,c,l]),d=r.type({data:r.array(r.union([r.type({topCursor:r.null,bottomCursor:r.null,entries:r.array(i.i)}),r.type({topCursor:i.g,bottomCursor:i.g,entries:r.array(i.i)})]))}),p="/api/log_entries/summary",h=r.type({logView:o.o,startTimestamp:r.number,endTimestamp:r.number,bucketSize:r.number,query:r.union([r.string,r[void 0],r.null])}),g=r.type({start:r.number,end:r.number,entriesCount:r.number}),v=r.type({data:r.type({start:r.number,end:r.number,buckets:r.array(g)})}),y="/api/log_entries/summary_highlights",m=r.intersection([h,r.type({highlightTerms:r.array(r.string)})]),b=r.intersection([g,r.type({representativeKey:i.g})]),w=r.type({data:r.array(r.type({start:r.number,end:r.number,buckets:r.array(b)}))}),_=(r.type({logViewId:r.string}),r.type({data:o.n})),S=(r.type({logViewId:r.string}),r.type({attributes:r.partial(o.l.type.props)}));r.type({data:o.n})},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return p}));var r=n(0),i=(n(8),n(6));const o=e=>""===e;r.brand(r.string,(e=>{return!o(t=e)&&!t.includes(" ")&&!t.split(",").some(o);var t}),"IndexPattern"),new r.Type("JSON",r.any.is,((e,t)=>i.either.chain(r.string.validate(e,t),(n=>{try{return r.success(JSON.parse(n))}catch(n){return r.failure(e,t)}}))),(e=>JSON.stringify(e))),new r.Type("isoToEpochRt",r.number.is,((e,t)=>i.either.chain(r.string.validate(e,t),(n=>{const i=new Date(n).getTime();return isNaN(i)?r.failure(e,t):r.success(i)}))),(e=>new Date(e).toISOString())),new r.Type("ToNumber",r.number.is,((e,t)=>{const n=Number(e);return isNaN(n)?r.failure(e,t):r.success(n)}),r.identity),new r.Type("ToBoolean",r.boolean.is,(e=>{let t;return t="string"==typeof e?"true"===e:!!e,r.success(t)}),r.identity),r.brand(r.string,(e=>e.length>0),"NonEmptyString");var a=n(28),s=n(42),u=n.n(s);r.brand(r.string,(e=>u()(e,!0).isValid()),"Date");var c=n(65),l=n.n(c);new r.Type("datemath",r.string.is,((e,t)=>Object(a.pipe)(r.string.validate(e,t),Object(i.chain)((e=>(e=>{const t=l.a.parse(e);return!(!t||!t.isValid())})(e)?r.success(e):r.failure(e,t))))),String);var f=n(21);const d=([e,...t])=>{if(void 0===e)return[];if(e.type instanceof r.IntersectionType){const[,...e]=t;return d(e)}if(e.type instanceof r.UnionType){const[,...n]=t;return[e.key,...d(n)]}return[e.key,...d(t)]},p=e=>`Failed to validate: \n${e.map((e=>` ${(e=>{var t;return null!==(t=e.message)&&void 0!==t?t:`in ${d(e.context).join("/")}: ${JSON.stringify(e.value)} does not match expected type ${(({context:e})=>{var t,n,r;return null!==(t=null===(n=e[e.length-1])||void 0===n||null===(r=n.type)||void 0===r?void 0:r.name)&&void 0!==t?t:"unknown"})(e)}`})(e)}`)).join("\n")}`,h=e=>new Error(e),g=(e,t=h)=>n=>Object(a.pipe)(e.decode(n),Object(i.fold)((e=>t=>{throw e(p(t))})(t),f.identity))},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return p}));var r=n(1),i=n(3),o=n(7);const a=e=>{const t=Object(r.useRef)(e);return t.current=e,t},s=(e,t)=>{const[n,i]=u(e,(()=>t));return Object(r.useEffect)((()=>{i(t)}),t),n},u=(e,t)=>{const[[n,o],a]=Object(r.useState)((()=>{const e=new i.BehaviorSubject(t()),n=e.next.bind(e);return[e,n]})),[s]=Object(r.useState)((()=>e(n)));return[s,o]},c=e=>{const[[t,n],o]=Object(r.useState)((()=>{const e=new i.ReplaySubject,t=e.next.bind(e);return[e,t]})),[a]=Object(r.useState)((()=>e(t)));return[a,n]},l=(e,t)=>{const[n,i]=Object(r.useState)(t),[o,a]=Object(r.useState)();return f(e,{next:i,error:a}),{latestValue:n,latestError:o}},f=(e,{next:t,error:n,complete:i,unsubscribe:o})=>{const s=Object(r.useRef)(),u=a(t),c=a(n),l=a(i),f=a(o);return Object(r.useEffect)((()=>{const t=f.current,n=e.subscribe({next:e=>{var t;return null===(t=u.current)||void 0===t?void 0:t.call(u,e)},error:e=>{var t;return null===(t=c.current)||void 0===t?void 0:t.call(c,e)},complete:()=>{var e;return null===(e=l.current)||void 0===e?void 0:e.call(l)}});return s.current=n,()=>{n.unsubscribe(),null==t||t()}}),[e,u,c,l,f]),s.current},d=(e,t)=>{const n=a(t);return s((e=>e.pipe(Object(o.switchMap)((([e])=>n.current(e))))),[e])},p=e=>t=>new i.Observable((n=>{const r=t.subscribe({next:e=>n.next(e),error:e=>n.error(e),complete:()=>n.complete()});return()=>{e(),r.unsubscribe()}}))},function(e,t,n){"use strict";n.d(t,"l",(function(){return f})),n.d(t,"m",(function(){return d})),n.d(t,"n",(function(){return p})),n.d(t,"o",(function(){return h})),n.d(t,"j",(function(){return g})),n.d(t,"k",(function(){return v})),n.d(t,"b",(function(){return y})),n.d(t,"f",(function(){return m})),n.d(t,"h",(function(){return b})),n.d(t,"i",(function(){return w})),n.d(t,"g",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(0),i=n(31),o=n(10);const a=r.type({time:r.number,tiebreaker:r.number}),s=r.type({before:r.union([a,r.literal("last")])}),u=r.type({after:r.union([a,r.literal("first")])}),c=r.type({center:a}),l=e=>Object(o.b)(a)({time:e.sort[0],tiebreaker:e.sort[1]}),f=r.type({constant:r.string}),d=r.type({field:r.string,value:i.a,highlights:r.array(r.string)}),p=r.union([f,d]),h=r.type({columnId:r.string,timestamp:r.number}),g=r.type({columnId:r.string,field:r.string,value:i.a,highlights:r.array(r.string)}),v=r.type({columnId:r.string,message:r.array(p)}),y=r.union([h,g,v]),m=r.union([r.type({}),r.type({"container.id":r.string}),r.type({"host.name":r.string,"log.file.path":r.string})]),b=r.type({field:r.string,value:i.a}),w=r.type({id:r.string,index:r.string,cursor:a,columns:r.array(y),context:m})},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/kibanaReact/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return p}));var r=n(7);const i=({abortController:e,options:t,request:n,response$:i})=>i.pipe(Object(r.map)((r=>({abortController:e,options:t,request:n,response:r}))));var o=n(3),a=n(49);const s=(e,t)=>n=>n.pipe(Object(r.map)((e=>{var n,r;const{data:i,errors:o=[]}=t(e.rawResponse);return{data:i,errors:o,isPartial:null!==(n=e.isPartial)&&void 0!==n&&n,isRunning:null!==(r=e.isRunning)&&void 0!==r&&r,loaded:e.loaded,total:e.total}})),Object(r.startWith)({data:e,errors:[],isPartial:!0,isRunning:!0,loaded:0,total:void 0}),Object(r.catchError)((t=>{var n;return Object(o.of)({data:e,errors:[t instanceof a.AbortError?{type:"aborted"}:{type:"generic",message:`${null!==(n=t.message)&&void 0!==n?n:t}`}],isPartial:!0,isRunning:!1,loaded:0,total:void 0})})));var u=n(1),c=n(26),l=n(11);const f=({getRequest:e,parseResponses:t})=>{const{services:n}=Object(c.a)(),i=Object(l.b)((()=>new o.ReplaySubject(1)),[]),a=Object(u.useCallback)(((...o)=>{const a=e(...o);if(null==a)return;const s=new AbortController;let u=!0;const c={...a,abortController:s,response$:n.data.search.search(a.request,{abortSignal:s.signal,...a.options}).pipe(Object(r.tap)({error:()=>{u=!1},complete:()=>{u=!1}}),Object(l.a)((()=>{u&&s.abort()})),t,Object(r.share)())};return i.next(c),c}),[e,n.data.search,t,i]);return{requests$:i,search:a}},d=e=>{var t,n;const{latestValue:r}=Object(l.c)(e,void 0);return{cancelRequest:Object(u.useCallback)((()=>{null==r||r.abortController.abort()}),[r]),isRequestRunning:null!==(t=null==r?void 0:r.response.isRunning)&&void 0!==t&&t,isResponsePartial:null!==(n=null==r?void 0:r.response.isPartial)&&void 0!==n&&n,latestResponseData:null==r?void 0:r.response.data,latestResponseErrors:null==r?void 0:r.response.errors,loaded:null==r?void 0:r.response.loaded,total:null==r?void 0:r.response.total}},p=e=>{const t=Object(l.d)(e,h),{cancelRequest:n,isRequestRunning:r,isResponsePartial:i,latestResponseData:o,latestResponseErrors:a,loaded:s,total:u}=d(t);return{cancelRequest:n,isRequestRunning:r,isResponsePartial:i,latestResponseData:o,latestResponseErrors:a,loaded:s,total:u}},h=Object(r.switchMap)(i)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(40),i=n(46),o=n(80),a=n(85),s=n(87),u=n(88),c=n(89),l=n(47),f=n(69),d=n(68),p=n(34),h=n(20),g=r.assign,v=r.cancel,y=r.send,m=r.sendTo,b=r.sendParent,w=r.sendUpdate,_=r.forwardTo,S=r.doneInvoke,O=r.raise,x=r.log,j=r.pure,E=r.choose,I=r.stop;t.actions=r,t.toActorRef=i.toActorRef,t.Interpreter=o.Interpreter,Object.defineProperty(t,"InterpreterStatus",{enumerable:!0,get:function(){return o.InterpreterStatus}}),t.interpret=o.interpret,t.spawn=o.spawn,t.Machine=a.Machine,t.createMachine=a.createMachine,t.mapState=s.mapState,t.matchState=u.matchState,t.createSchema=c.createSchema,t.t=c.t,t.State=l.State,t.StateNode=f.StateNode,t.spawnBehavior=d.spawnBehavior,Object.defineProperty(t,"ActionTypes",{enumerable:!0,get:function(){return p.ActionTypes}}),Object.defineProperty(t,"SpecialTargets",{enumerable:!0,get:function(){return p.SpecialTargets}}),t.matchesState=h.matchesState,t.toEventObject=h.toEventObject,t.toObserver=h.toObserver,t.toSCXMLEvent=h.toSCXMLEvent,t.assign=g,t.cancel=v,t.choose=E,t.doneInvoke=S,t.forwardTo=_,t.log=x,t.pure=j,t.raise=O,t.send=y,t.sendParent=b,t.sendTo=m,t.sendUpdate=w,t.stop=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createActorContext=t.shallowEqual=t.useSpawn=t.useSelector=t.useInterpret=t.useActor=t.useMachine=void 0;var r=n(90);Object.defineProperty(t,"useMachine",{enumerable:!0,get:function(){return r.useMachine}});var i=n(57);Object.defineProperty(t,"useActor",{enumerable:!0,get:function(){return i.useActor}});var o=n(55);Object.defineProperty(t,"useInterpret",{enumerable:!0,get:function(){return o.useInterpret}});var a=n(71);Object.defineProperty(t,"useSelector",{enumerable:!0,get:function(){return a.useSelector}});var s=n(91);Object.defineProperty(t,"useSpawn",{enumerable:!0,get:function(){return s.useSpawn}});var u=n(48);Object.defineProperty(t,"shallowEqual",{enumerable:!0,get:function(){return u.shallowEqual}});var c=n(92);Object.defineProperty(t,"createActorContext",{enumerable:!0,get:function(){return c.createActorContext}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ t.__assign=function(){return t.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},t.__rest=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}},function(e,t){e.exports=__kbnSharedDeps__.KbnI18n},function(e,t){e.exports=__kbnSharedDeps__.KbnI18nReact},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(17),o=n(34),a=n(41),s=n(53),u=n(24);function c(e,t){try{return m(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function l(e){return"object"==typeof e&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function f(e,t){return l(e)?e.value:m(e)?d(e):"string"!=typeof e?e:d(c(e,t))}function d(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r(()=>{const e=new r.ReplaySubject(1);return{createService:()=>e.asObservable(),notify:t=>(n,r)=>{const i=t(n,r);null!=i&&e.next(i)}}})(),o=e=>"logViewReference"in e?{type:"LOADING_LOG_VIEW_STARTED",logViewReference:e.logViewReference}:void 0,a=e=>"resolvedLogView"in e&&"status"in e?{type:"LOADING_LOG_VIEW_SUCCEEDED",resolvedLogView:e.resolvedLogView,status:e.status}:void 0,s=e=>"error"in e?{type:"LOADING_LOG_VIEW_FAILED",error:e.error}:void 0;var u=n(15);const c=({initialContext:e,logViews:t,notificationChannel:n,initializeFromUrl:i,updateContextInUrl:c,listenForUrlChanges:l})=>(e=>Object(u.createMachine)({context:e,preserveActionOrder:!0,predictableActionArguments:!0,id:"LogView",initial:"uninitialized",states:{uninitialized:{always:{target:"initializingFromUrl"}},initializingFromUrl:{on:{INITIALIZED_FROM_URL:{target:"loading",actions:["storeLogViewReference"]}},invoke:{src:"initializeFromUrl"}},loading:{entry:["notifyLoadingStarted","updateContextInUrl"],invoke:{src:"loadLogView"},on:{LOADING_SUCCEEDED:{target:"resolving",actions:"storeLogView"},LOADING_FAILED:{target:"loadingFailed",actions:"storeError"}}},resolving:{invoke:{src:"resolveLogView"},on:{RESOLUTION_FAILED:{target:"resolutionFailed",actions:"storeError"},RESOLUTION_SUCCEEDED:{target:"checkingStatus",actions:"storeResolvedLogView"}}},checkingStatus:{invoke:{src:"loadLogViewStatus"},on:{CHECKING_STATUS_FAILED:{target:"checkingStatusFailed",actions:"storeError"},CHECKING_STATUS_SUCCEEDED:[{target:"resolvedPersistedLogView",actions:"storeStatus",cond:"isPersistedLogView"},{target:"resolvedInlineLogView",actions:"storeStatus"}]}},resolvedPersistedLogView:{invoke:{src:"listenForUrlChanges"},entry:["notifyLoadingSucceeded","updateContextInUrl"],on:{PERSIST_INLINE_LOG_VIEW:void 0,RELOAD_LOG_VIEW:{target:"loading"},LOG_VIEW_URL_KEY_REMOVED:{actions:"updateContextInUrl"}}},resolvedInlineLogView:{invoke:{src:"listenForUrlChanges"},entry:["notifyLoadingSucceeded","updateContextInUrl"],on:{PERSIST_INLINE_LOG_VIEW:{target:"persistingInlineLogView"},LOG_VIEW_URL_KEY_REMOVED:{actions:"updateContextInUrl"}}},persistingInlineLogView:{invoke:{src:"persistInlineLogView"},on:{PERSISTING_INLINE_LOG_VIEW_FAILED:{target:"persistingInlineLogViewFailed",actions:"storeError"},PERSISTING_INLINE_LOG_VIEW_SUCCEEDED:{target:"resolving",actions:["convertInlineLogViewReferenceToPersistedLogViewReference","storeLogView"]}}},persistingInlineLogViewFailed:{entry:"notifyPersistingInlineLogViewFailed",on:{RETRY_PERSISTING_INLINE_LOG_VIEW:{target:"persistingInlineLogView"}}},loadingFailed:{entry:"notifyLoadingFailed",on:{RETRY:{target:"loading"}}},resolutionFailed:{entry:"notifyLoadingFailed",on:{RETRY:{target:"resolving"}}},checkingStatusFailed:{entry:"notifyLoadingFailed",on:{RETRY:{target:"checkingStatus"}}},updating:{entry:"notifyLoadingStarted",invoke:{src:"updateLogView"},on:{UPDATING_FAILED:{target:"updatingFailed",actions:"storeError"},UPDATING_SUCCEEDED:{target:"resolving",actions:["updateLogViewReference","storeLogView"]}}},updatingFailed:{entry:"notifyLoadingFailed",on:{RELOAD_LOG_VIEW:{target:"loading"}}}},on:{LOG_VIEW_REFERENCE_CHANGED:{target:".loading",actions:"storeLogViewReference"},UPDATE:{target:".updating"}}},{actions:{notifyLoadingStarted:u.actions.pure((()=>{})),notifyLoadingSucceeded:u.actions.pure((()=>{})),notifyLoadingFailed:u.actions.pure((()=>{})),updateContextInUrl:u.actions.pure((()=>{})),storeLogViewReference:Object(u.assign)(((e,t)=>"logViewReference"in t&&null!==t.logViewReference?{logViewReference:t.logViewReference}:{})),storeLogView:Object(u.assign)(((e,t)=>"logView"in t?{logView:t.logView}:{})),storeResolvedLogView:Object(u.assign)(((e,t)=>"resolvedLogView"in t?{resolvedLogView:t.resolvedLogView}:{})),storeStatus:Object(u.assign)(((e,t)=>"status"in t?{status:t.status}:{})),storeError:Object(u.assign)(((e,t)=>"error"in t?{error:t.error}:{})),convertInlineLogViewReferenceToPersistedLogViewReference:Object(u.assign)(((e,t)=>"logView"in t&&"log-view-inline"===e.logViewReference.type?{logViewReference:{type:"log-view-reference",logViewId:e.logViewReference.id}}:{})),updateLogViewReference:Object(u.assign)(((e,t)=>"attributes"in t&&"log-view-inline"===e.logViewReference.type?{logViewReference:{...e.logViewReference,attributes:{...e.logViewReference.attributes,...t.attributes}}}:{}))},services:{initializeFromUrl:(e,t)=>e=>e({type:"INITIALIZED_FROM_URL",logViewReference:null}),listenForUrlChanges:(e,t)=>e=>{}},guards:{isPersistedLogView:(e,t)=>"log-view-reference"===e.logViewReference.type}}))(e).withConfig({actions:{...null!=n?{notifyLoadingStarted:n.notify(o),notifyLoadingSucceeded:n.notify(a),notifyLoadingFailed:n.notify(s)}:{},...c?{updateContextInUrl:c}:{}},services:{...i?{initializeFromUrl:i}:{},...l?{listenForUrlChanges:l}:{},loadLogView:e=>Object(r.from)("logViewReference"in e?t.getLogView(e.logViewReference):Object(r.throwError)((()=>new Error("Failed to load log view")))).pipe(Object(r.map)((e=>({type:"LOADING_SUCCEEDED",logView:e}))),Object(r.catchError)((e=>Object(r.of)({type:"LOADING_FAILED",error:e})))),updateLogView:(e,n)=>Object(r.from)("logViewReference"in e&&"UPDATE"===n.type?t.putLogView(e.logViewReference,n.attributes):Object(r.throwError)((()=>new Error("Failed to update log view: Not invoked by update event with matching id.")))).pipe(Object(r.map)((e=>({type:"UPDATING_SUCCEEDED",logView:e}))),Object(r.catchError)((e=>Object(r.of)({type:"UPDATING_FAILED",error:e})))),persistInlineLogView:(e,n)=>Object(r.from)("logViewReference"in e&&"PERSIST_INLINE_LOG_VIEW"===n.type&&"log-view-inline"===e.logViewReference.type?t.putLogView({type:"log-view-reference",logViewId:e.logViewReference.id},e.logViewReference.attributes):Object(r.throwError)((()=>new Error("Failed to persist inline Log View.")))).pipe(Object(r.map)((e=>({type:"PERSISTING_INLINE_LOG_VIEW_SUCCEEDED",logView:e}))),Object(r.catchError)((e=>Object(r.of)({type:"PERSISTING_INLINE_LOG_VIEW_FAILED",error:e})))),resolveLogView:e=>Object(r.from)("logView"in e?t.resolveLogView(e.logView.id,e.logView.attributes):Object(r.throwError)((()=>new Error("Failed to resolve log view: No log view found in context.")))).pipe(Object(r.map)((e=>({type:"RESOLUTION_SUCCEEDED",resolvedLogView:e}))),Object(r.catchError)((e=>Object(r.of)({type:"RESOLUTION_FAILED",error:e})))),loadLogViewStatus:e=>Object(r.from)("resolvedLogView"in e?t.getResolvedLogViewStatus(e.resolvedLogView):Object(r.throwError)((()=>new Error("Failed to resolve log view: No log view found in context.")))).pipe(Object(r.map)((e=>({type:"CHECKING_STATUS_SUCCEEDED",status:e}))),Object(r.catchError)((e=>Object(r.of)({type:"CHECKING_STATUS_FAILED",error:e}))))}});var l=n(0),f=n(49),d=n(6),p=n(21),h=n(10),g=n(4);const v="logView",y=({urlStateStorage:e,logViewKey:t=v})=>(n,r)=>{if(!("logViewReference"in n))throw new Error("Missing keys from context needed to sync to the URL");e.set(t,_.encode(n.logViewReference),{replace:!0})},m=({logViewKey:e=v,sourceIdKey:t="sourceId",toastsService:n,urlStateStorage:r})=>(i,o)=>i=>{i({type:"INITIALIZED_FROM_URL",logViewReference:b({logViewKey:e,sourceIdKey:t,toastsService:n,urlStateStorage:r})})},b=({logViewKey:e,sourceIdKey:t,toastsService:n,urlStateStorage:r})=>{const i=r.get(e),o=O(i),a=r.get(t),s=x(a);return d.isLeft(o)||d.isLeft(s)?(Object(f.withNotifyOnErrors)(n).onGetError(Object(h.a)(Object(h.c)([...d.isLeft(o)?o.left:[],...d.isLeft(s)?s.left:[]]))),null):Object(p.pipe)(Object(p.pipe)(s.right,d.fromNullable(null),d.map(j)),d.alt((()=>Object(p.pipe)(o.right,d.fromNullable(null)))),d.fold(p.identity,p.identity))},w=({urlStateStorage:e,logViewKey:t=v})=>(n,i)=>e.change$(t).pipe(Object(r.map)((e=>null==e?{type:"LOG_VIEW_URL_KEY_REMOVED"}:{type:"LOG_VIEW_URL_KEY_CHANGED"}))),_=l.union([g.o,l.null]),S=l.union([l.string,l.null]),O=e=>_.decode(e),x=e=>S.decode(e),j=e=>({type:"log-view-reference",logViewId:e})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n(1);var r=n(27);n(2);const i=r.useKibana},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeable=t.pipe=void 0;var r=n(21);t.pipe=r.pipe;t.pipeable=function(e){var t={};return function(e){return"function"==typeof e.map}(e)&&(t.map=function(t){return function(n){return e.map(n,t)}}),function(e){return"function"==typeof e.contramap}(e)&&(t.contramap=function(t){return function(n){return e.contramap(n,t)}}),function(e){return"function"==typeof e.mapWithIndex}(e)&&(t.mapWithIndex=function(t){return function(n){return e.mapWithIndex(n,t)}}),function(e){return"function"==typeof e.ap}(e)&&(t.ap=function(t){return function(n){return e.ap(n,t)}},t.apFirst=function(t){return function(n){return e.ap(e.map(n,(function(e){return function(){return e}})),t)}},t.apSecond=function(t){return function(n){return e.ap(e.map(n,(function(){return function(e){return e}})),t)}}),function(e){return"function"==typeof e.chain}(e)&&(t.chain=function(t){return function(n){return e.chain(n,t)}},t.chainFirst=function(t){return function(n){return e.chain(n,(function(n){return e.map(t(n),(function(){return n}))}))}},t.flatten=function(t){return e.chain(t,r.identity)}),function(e){return"function"==typeof e.bimap}(e)&&(t.bimap=function(t,n){return function(r){return e.bimap(r,t,n)}},t.mapLeft=function(t){return function(n){return e.mapLeft(n,t)}}),function(e){return"function"==typeof e.extend}(e)&&(t.extend=function(t){return function(n){return e.extend(n,t)}},t.duplicate=function(t){return e.extend(t,r.identity)}),function(e){return"function"==typeof e.reduce}(e)&&(t.reduce=function(t,n){return function(r){return e.reduce(r,t,n)}},t.foldMap=function(t){var n=e.foldMap(t);return function(e){return function(t){return n(t,e)}}},t.reduceRight=function(t,n){return function(r){return e.reduceRight(r,t,n)}}),function(e){return"function"==typeof e.reduceWithIndex}(e)&&(t.reduceWithIndex=function(t,n){return function(r){return e.reduceWithIndex(r,t,n)}},t.foldMapWithIndex=function(t){var n=e.foldMapWithIndex(t);return function(e){return function(t){return n(t,e)}}},t.reduceRightWithIndex=function(t,n){return function(r){return e.reduceRightWithIndex(r,t,n)}}),function(e){return"function"==typeof e.alt}(e)&&(t.alt=function(t){return function(n){return e.alt(n,t)}}),function(e){return"function"==typeof e.compact}(e)&&(t.compact=e.compact,t.separate=e.separate),function(e){return"function"==typeof e.filter}(e)&&(t.filter=function(t){return function(n){return e.filter(n,t)}},t.filterMap=function(t){return function(n){return e.filterMap(n,t)}},t.partition=function(t){return function(n){return e.partition(n,t)}},t.partitionMap=function(t){return function(n){return e.partitionMap(n,t)}}),function(e){return"function"==typeof e.filterWithIndex}(e)&&(t.filterWithIndex=function(t){return function(n){return e.filterWithIndex(n,t)}},t.filterMapWithIndex=function(t){return function(n){return e.filterMapWithIndex(n,t)}},t.partitionWithIndex=function(t){return function(n){return e.partitionWithIndex(n,t)}},t.partitionMapWithIndex=function(t){return function(n){return e.partitionMapWithIndex(n,t)}}),function(e){return"function"==typeof e.promap}(e)&&(t.promap=function(t,n){return function(r){return e.promap(r,t,n)}}),function(e){return"function"==typeof e.compose}(e)&&(t.compose=function(t){return function(n){return e.compose(n,t)}}),function(e){return"function"==typeof e.throwError}(e)&&(t.fromOption=function(t){return function(n){return"None"===n._tag?e.throwError(t()):e.of(n.value)}},t.fromEither=function(t){return"Left"===t._tag?e.throwError(t.left):e.of(t.right)},t.fromPredicate=function(t,n){return function(r){return t(r)?e.of(r):e.throwError(n(r))}},t.filterOrElse=function(t,n){return function(r){return e.chain(r,(function(r){return t(r)?e.of(r):e.throwError(n(r))}))}}),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=!1,o={};t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a=0||(i[n]=e[n]);return i}(t,["children"]),a=e(o),u=i,c=0;c=0)?NaN:t>170?1/0:0===t?1:t*e(t-1)},notation:"postfix",precedence:6,rightToLeft:0,argCount:1},symbol:"!",regSymbol:"!"},"^":{infix:{symbol:"^",f:function(e,t){return Math.pow(e,t)},notation:"infix",precedence:5,rightToLeft:1,argCount:2},symbol:"^",regSymbol:"\\^"},"*":{infix:{symbol:"*",f:function(e,t){return e*t},notation:"infix",precedence:4,rightToLeft:0,argCount:2},symbol:"*",regSymbol:"\\*"},"/":{infix:{symbol:"/",f:function(e,t){return e/t},notation:"infix",precedence:4,rightToLeft:0,argCount:2},symbol:"/",regSymbol:"/"},"+":{infix:{symbol:"+",f:function(e,t){return e+t},notation:"infix",precedence:2,rightToLeft:0,argCount:2},prefix:{symbol:"+",f:h,notation:"prefix",precedence:3,rightToLeft:0,argCount:1},symbol:"+",regSymbol:"\\+"},"-":{infix:{symbol:"-",f:function(e,t){return e-t},notation:"infix",precedence:2,rightToLeft:0,argCount:2},prefix:{symbol:"-",f:function(e){return-e},notation:"prefix",precedence:3,rightToLeft:0,argCount:1},symbol:"-",regSymbol:"-"},",":{infix:{symbol:",",f:function(){return Array.of.apply(Array,arguments)},notation:"infix",precedence:1,rightToLeft:0,argCount:2},symbol:",",regSymbol:","},"(":{prefix:{symbol:"(",f:h,notation:"prefix",precedence:0,rightToLeft:0,argCount:1},symbol:"(",regSymbol:"\\("},")":{postfix:{symbol:")",f:void 0,notation:"postfix",precedence:0,rightToLeft:0,argCount:1},symbol:")",regSymbol:"\\)"},min:{func:{symbol:"min",f:function(){return Math.min.apply(Math,arguments)},notation:"func",precedence:0,rightToLeft:0,argCount:1},symbol:"min",regSymbol:"min\\b"},max:{func:{symbol:"max",f:function(){return Math.max.apply(Math,arguments)},notation:"func",precedence:0,rightToLeft:0,argCount:1},symbol:"max",regSymbol:"max\\b"},sqrt:{func:{symbol:"sqrt",f:function(e){return Math.sqrt(e)},notation:"func",precedence:0,rightToLeft:0,argCount:1},symbol:"sqrt",regSymbol:"sqrt\\b"}}},v=function(e){function t(t){var n;return n=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this,l.default(n)}return f.default(t,e),t}(d.default(Error)),y=/((?!\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\D|$)|ged|darg?|nrut)/g;function m(e,t){var n,r=e.pop();return t.push(r.f.apply(r,(n=[]).concat.apply(n,t.splice(-r.argCount)))),r.precedence}function b(e){return e.split("").reverse().join("")}var w=/--[\S]*/g;function _(e){return e.charAt(0).toUpperCase()+e.slice(1)}var S=["Top","Right","Bottom","Left"];function O(e,t){if(!e)return t.toLowerCase();var n=e.split("-");if(n.length>1)return n.splice(1,0,t),n.reduce((function(e,t){return""+e+_(t)}));var r=e.replace(/([a-z])([A-Z])/g,"$1"+t+"$2");return e===r?""+e+t:r}function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),i=1;i1?(t=t.slice(0,-1),t+=", "+r[o]):1===a.length&&(t+=""+r[o])}else r[o]&&(t+=r[o]+" ");return t.trim()}var $={easeInBack:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",easeInCirc:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",easeInCubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",easeInExpo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",easeInQuad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",easeInQuart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",easeInQuint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)",easeInSine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",easeOutCubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",easeOutCirc:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",easeOutExpo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",easeOutQuad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",easeOutQuart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",easeOutQuint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeInOutBack:"cubic-bezier(0.680, -0.550, 0.265, 1.550)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.150, 0.860)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",easeInOutExpo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",easeInOutQuad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",easeInOutQuart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",easeInOutQuint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"},B=function(e,t,n){var r=""+n[0]+(n[1]||""),i=""+n[0]/2+(n[1]||""),o=""+t[0]+(t[1]||""),a=""+t[0]/2+(t[1]||"");switch(e){case"top":return"0 "+i+" "+o+" "+i;case"topLeft":return r+" "+o+" 0 0";case"left":return a+" "+r+" "+a+" 0";case"bottomLeft":return r+" 0 0 "+o;case"bottom":return o+" "+i+" 0 "+i;case"bottomRight":return"0 0 "+r+" "+o;case"right":return a+" 0 "+a+" "+r;default:return"0 "+r+" "+o+" 0"}};function H(e){return Math.round(255*e)}function G(e,t,n){return H(e)+","+H(t)+","+H(n)}function J(e,t,n,r){if(void 0===r&&(r=G),0===t)return r(n,n,n);var i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*t,a=o*(1-Math.abs(i%2-1)),s=0,u=0,c=0;i>=0&&i<1?(s=o,u=a):i>=1&&i<2?(s=a,u=o):i>=2&&i<3?(u=o,c=a):i>=3&&i<4?(u=a,c=o):i>=4&&i<5?(s=a,c=o):i>=5&&i<6&&(s=o,c=a);var l=n-o/2;return r(s+l,u+l,c+l)}var K={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},X=/^#[a-fA-F0-9]{6}$/,Y=/^#[a-fA-F0-9]{8}$/,Q=/^#[a-fA-F0-9]{3}$/,Z=/^#[a-fA-F0-9]{4}$/,ee=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,te=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,ne=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,re=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function ie(e){if("string"!=typeof e)throw new v(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return K[t]?"#"+K[t]:e}(e);if(t.match(X))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(Y)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(Q))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(Z)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=ee.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=te.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])};var a=ne.exec(t);if(a){var s="rgb("+J(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",u=ee.exec(s);if(!u)throw new v(4,t,s);return{red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10)}}var c=re.exec(t.substring(0,50));if(c){var l="rgb("+J(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",f=ee.exec(l);if(!f)throw new v(4,t,l);return{red:parseInt(""+f[1],10),green:parseInt(""+f[2],10),blue:parseInt(""+f[3],10),alpha:parseFloat(""+c[4])}}throw new v(5)}function oe(e){return function(e){var t,n=e.red/255,r=e.green/255,i=e.blue/255,o=Math.max(n,r,i),a=Math.min(n,r,i),s=(o+a)/2;if(o===a)return void 0!==e.alpha?{hue:0,saturation:0,lightness:s,alpha:e.alpha}:{hue:0,saturation:0,lightness:s};var u=o-a,c=s>.5?u/(2-o-a):u/(o+a);switch(o){case n:t=(r-i)/u+(r=1?le(e,t,n):"rgba("+J(e,t,n)+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?le(e.hue,e.saturation,e.lightness):"rgba("+J(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new v(2)}function pe(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return ae("#"+se(e)+se(t)+se(n));if("object"==typeof e&&void 0===t&&void 0===n)return ae("#"+se(e.red)+se(e.green)+se(e.blue));throw new v(6)}function he(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var i=ie(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?pe(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?pe(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new v(7)}var ge=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)},ve=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},ye=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)},me=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha};function be(e){if("object"!=typeof e)throw new v(8);if(ve(e))return he(e);if(ge(e))return pe(e);if(me(e))return de(e);if(ye(e))return fe(e);throw new v(8)}function we(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):we(e,t,r)}}function _e(e){return we(e,e.length,[])}function Se(e,t){if("transparent"===t)return t;var n=oe(t);return be(c.default({},n,{hue:n.hue+parseFloat(e)}))}var Oe=_e(Se);function xe(e,t,n){return Math.max(e,Math.min(t,n))}function je(e,t){if("transparent"===t)return t;var n=oe(t);return be(c.default({},n,{lightness:xe(0,1,n.lightness-parseFloat(e))}))}var Ee=_e(je);function Ie(e,t){if("transparent"===t)return t;var n=oe(t);return be(c.default({},n,{saturation:xe(0,1,n.saturation-parseFloat(e))}))}var Ae=_e(Ie);function Re(e){if("transparent"===e)return 0;var t=ie(e),n=Object.keys(t).map((function(e){var n=t[e]/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)})),r=n[0],i=n[1],o=n[2];return parseFloat((.2126*r+.7152*i+.0722*o).toFixed(3))}function Te(e,t){var n=Re(e),r=Re(t);return parseFloat((n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)).toFixed(2))}function Ce(e,t){if("transparent"===t)return t;var n=oe(t);return be(c.default({},n,{lightness:xe(0,1,n.lightness+parseFloat(e))}))}var Le=_e(Ce);function ke(e,t,n){if("transparent"===t)return n;if("transparent"===n)return t;if(0===e)return n;var r=ie(t),i=c.default({},r,{alpha:"number"==typeof r.alpha?r.alpha:1}),o=ie(n),a=c.default({},o,{alpha:"number"==typeof o.alpha?o.alpha:1}),s=i.alpha-a.alpha,u=2*parseFloat(e)-1,l=((u*s==-1?u:u+s)/(1+u*s)+1)/2,f=1-l;return he({red:Math.floor(i.red*l+a.red*f),green:Math.floor(i.green*l+a.green*f),blue:Math.floor(i.blue*l+a.blue*f),alpha:i.alpha*(parseFloat(e)/1)+a.alpha*(1-parseFloat(e)/1)})}var Me=_e(ke);function Pe(e,t){if("transparent"===t)return t;var n=ie(t),r="number"==typeof n.alpha?n.alpha:1;return he(c.default({},n,{alpha:xe(0,1,(100*r+100*parseFloat(e))/100)}))}var Ve=_e(Pe),Fe="#000",Ne="#fff";function De(e,t){if("transparent"===t)return t;var n=oe(t);return be(c.default({},n,{saturation:xe(0,1,n.saturation+parseFloat(e))}))}var Ue=_e(De);function qe(e,t){return"transparent"===t?t:be(c.default({},oe(t),{hue:parseFloat(e)}))}var ze=_e(qe);function We(e,t){return"transparent"===t?t:be(c.default({},oe(t),{lightness:parseFloat(e)}))}var $e=_e(We);function Be(e,t){return"transparent"===t?t:be(c.default({},oe(t),{saturation:parseFloat(e)}))}var He=_e(Be);function Ge(e,t){return"transparent"===t?t:Me(parseFloat(e),"rgb(0, 0, 0)",t)}var Je=_e(Ge);function Ke(e,t){return"transparent"===t?t:Me(parseFloat(e),"rgb(255, 255, 255)",t)}var Xe=_e(Ke);function Ye(e,t){if("transparent"===t)return t;var n=ie(t),r="number"==typeof n.alpha?n.alpha:1;return he(c.default({},n,{alpha:xe(0,1,+(100*r-100*parseFloat(e)).toFixed(2)/100)}))}var Qe=_e(Ye),Ze=["top","right","bottom","left"];function et(e,t){return e(t?":"+t:"")}function tt(e,t,n){if(!t)throw new v(67);if(0===e.length)return et(t,null);for(var r=[],i=0;i8)throw new v(64);return{animation:t.map((function(e){if(r&&!Array.isArray(e)||!r&&Array.isArray(e))throw new v(65);if(Array.isArray(e)&&e.length>8)throw new v(66);return Array.isArray(e)?e.join(" "):e})).join(", ")}},t.backgroundImages=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r=0?((i={})["border"+_(e)+"Width"]=n[0],i["border"+_(e)+"Style"]=n[1],i["border"+_(e)+"Color"]=n[2],i):(n.unshift(e),{borderWidth:n[0],borderStyle:n[1],borderColor:n[2]})},t.borderColor=function(){for(var e=arguments.length,t=new Array(e),n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);!(r=a()).done;){var s,u,l=r.value;if(!l.prop||!l.fromSize||!l.toSize)throw new v(50);o[l.prop]=l.fromSize,i["@media (min-width: "+t+")"]=c.default({},i["@media (min-width: "+t+")"],((s={})[l.prop]=M(l.fromSize,l.toSize,t,n),s)),i["@media (min-width: "+n+")"]=c.default({},i["@media (min-width: "+n+")"],((u={})[l.prop]=l.toSize,u))}return c.default({},o,i)}var f,d,p;if(!e.prop||!e.fromSize||!e.toSize)throw new v(51);return(p={})[e.prop]=e.fromSize,p["@media (min-width: "+t+")"]=((f={})[e.prop]=M(e.fromSize,e.toSize,t,n),f),p["@media (min-width: "+n+")"]=((d={})[e.prop]=e.toSize,d),p},t.fontFace=function(e){var t=e.fontFamily,n=e.fontFilePath,r=e.fontStretch,i=e.fontStyle,o=e.fontVariant,a=e.fontWeight,s=e.fileFormats,u=void 0===s?["eot","woff2","woff","ttf","svg"]:s,c=e.formatHint,l=void 0!==c&&c,f=e.localFonts,d=e.unicodeRange,p=e.fontDisplay,h=e.fontVariationSettings,g=e.fontFeatureSettings;if(!t)throw new v(55);if(!n&&!f)throw new v(52);if(f&&!Array.isArray(f))throw new v(53);if(!Array.isArray(u))throw new v(54);var y={"@font-face":{fontFamily:t,src:q(n,f,u,l),unicodeRange:d,fontStretch:r,fontStyle:i,fontVariant:o,fontWeight:a,fontDisplay:p,fontVariationSettings:h,fontFeatureSettings:g}};return JSON.parse(JSON.stringify(y))},t.getContrast=Te,t.getLuminance=Re,t.getValueAndUnit=C,t.grayscale=function(e){return"transparent"===e?e:be(c.default({},oe(e),{saturation:0}))},t.hiDPI=z,t.hideText=function(){return{textIndent:"101%",overflow:"hidden",whiteSpace:"nowrap"}},t.hideVisually=function(){return{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},t.hsl=fe,t.hslToColorString=function(e){if("object"==typeof e&&"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness)return e.alpha&&"number"==typeof e.alpha?de({hue:e.hue,saturation:e.saturation,lightness:e.lightness,alpha:e.alpha}):fe({hue:e.hue,saturation:e.saturation,lightness:e.lightness});throw new v(45)},t.hsla=de,t.invert=function(e){if("transparent"===e)return e;var t=ie(e);return be(c.default({},t,{red:255-t.red,green:255-t.green,blue:255-t.blue}))},t.lighten=Le,t.linearGradient=function(e){var t=e.colorStops,n=e.fallback,r=e.toDirection,i=void 0===r?"":r;if(!t||t.length<2)throw new v(56);return{backgroundColor:n||t[0].replace(/,\s+/g,",").split(" ")[0].replace(/,(?=\S)/g,", "),backgroundImage:W(V||(V=p.default(["linear-gradient(","",")"])),i,t.join(", ").replace(/,(?=\S)/g,", "))}},t.margin=function(){for(var e=arguments.length,t=new Array(e),n=0;n0)break}while(m(i,o));s="postfix"===y.notation,")"!==y.symbol&&(i.push(y),s&&m(i,o))}else if(d){if(i.push(d.prefix||d.func),d.func&&(!(n=a.exec(e))||"("!==n[0]))throw new v(38,n?n.index:e.length,e)}else o.push(+l),s=!0}while(n&&i.length);if(i.length)throw new v(39,n?n.index:e.length,e);if(n)throw new v(40,n?n.index:e.length,e);return o.pop()}(b(n.replace(y,"")),t)+(r?b(r[0]):"")},t.meetsContrastGuidelines=function(e,t){var n=Te(e,t);return{AA:n>=4.5,AALarge:n>=3,AAA:n>=7,AAALarge:n>=4.5}},t.mix=Me,t.modularScale=function(e,t,n){if(void 0===t&&(t="1em"),void 0===n&&(n=1.333),"number"!=typeof e)throw new v(42);if("string"==typeof n&&!L[n])throw new v(43);var r="string"==typeof t?C(t):[t,""],i=r[0],o=r[1],a="string"==typeof n?L[n]:n;if("string"==typeof i)throw new v(44,t);return""+i*Math.pow(a,e)+(o||"")},t.normalize=function(){var e;return[(e={html:{lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:"0"},main:{display:"block"},h1:{fontSize:"2em",margin:"0.67em 0"},hr:{boxSizing:"content-box",height:"0",overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{backgroundColor:"transparent"},"abbr[title]":{borderBottom:"none",textDecoration:"underline"}},e["b,\n strong"]={fontWeight:"bolder"},e["code,\n kbd,\n samp"]={fontFamily:"monospace, monospace",fontSize:"1em"},e.small={fontSize:"80%"},e["sub,\n sup"]={fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},e.sub={bottom:"-0.25em"},e.sup={top:"-0.5em"},e.img={borderStyle:"none"},e["button,\n input,\n optgroup,\n select,\n textarea"]={fontFamily:"inherit",fontSize:"100%",lineHeight:"1.15",margin:"0"},e["button,\n input"]={overflow:"visible"},e["button,\n select"]={textTransform:"none"},e['button,\n html [type="button"],\n [type="reset"],\n [type="submit"]']={WebkitAppearance:"button"},e['button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner']={borderStyle:"none",padding:"0"},e['button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring']={outline:"1px dotted ButtonText"},e.fieldset={padding:"0.35em 0.625em 0.75em"},e.legend={boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:"0",whiteSpace:"normal"},e.progress={verticalAlign:"baseline"},e.textarea={overflow:"auto"},e['[type="checkbox"],\n [type="radio"]']={boxSizing:"border-box",padding:"0"},e['[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button']={height:"auto"},e['[type="search"]']={WebkitAppearance:"textfield",outlineOffset:"-2px"},e['[type="search"]::-webkit-search-decoration']={WebkitAppearance:"none"},e["::-webkit-file-upload-button"]={WebkitAppearance:"button",font:"inherit"},e.details={display:"block"},e.summary={display:"list-item"},e.template={display:"none"},e["[hidden]"]={display:"none"},e),{"abbr[title]":{textDecoration:"underline dotted"}}]},t.opacify=Ve,t.padding=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r=0&&e?c.default({},x.apply(void 0,[""].concat(n)),{position:e}):x.apply(void 0,["",e].concat(n))},t.radialGradient=function(e){var t=e.colorStops,n=e.extent,r=void 0===n?"":n,i=e.fallback,o=e.position,a=void 0===o?"":o,s=e.shape,u=void 0===s?"":s;if(!t||t.length<2)throw new v(57);return{backgroundColor:i||t[0].split(" ")[0],backgroundImage:W(F||(F=p.default(["radial-gradient(","","","",")"])),a,u,r,t.join(", "))}},t.readableColor=function(e,t,n,r){void 0===t&&(t=Fe),void 0===n&&(n=Ne),void 0===r&&(r=!0);var i=Re(e)>.179,o=i?t:n;return!r||Te(e,o)>=4.5?o:i?Fe:Ne},t.rem=k,t.retinaImage=function(e,t,n,r,i){var o;if(void 0===n&&(n="png"),void 0===i&&(i="_2x"),!e)throw new v(58);var a=n.replace(/^\./,""),s=r?r+"."+a:""+e+i+"."+a;return(o={backgroundImage:"url("+e+"."+a+")"})[z()]=c.default({backgroundImage:"url("+s+")"},t?{backgroundSize:t}:{}),o},t.rgb=pe,t.rgbToColorString=function(e){if("object"==typeof e&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue)return"number"==typeof e.alpha?he({red:e.red,green:e.green,blue:e.blue,alpha:e.alpha}):pe({red:e.red,green:e.green,blue:e.blue});throw new v(46)},t.rgba=he,t.saturate=Ue,t.setHue=ze,t.setLightness=$e,t.setSaturation=He,t.shade=Je,t.size=function(e,t){return void 0===t&&(t=e),{height:e,width:t}},t.stripUnit=I,t.textInputs=function(){for(var e=arguments.length,t=new Array(e),n=0;nr.union([i,a,s]))),a=r.recursion("JsonArray",(()=>r.array(o))),s=r.recursion("JsonObject",(()=>r.record(r.string,o)))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/observabilityAIAssistant/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){e.exports=n(23)(1465)},function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=void 0,(r=t.ActionTypes||(t.ActionTypes={})).Start="xstate.start",r.Stop="xstate.stop",r.Raise="xstate.raise",r.Send="xstate.send",r.Cancel="xstate.cancel",r.NullEvent="",r.Assign="xstate.assign",r.After="xstate.after",r.DoneState="done.state",r.DoneInvoke="done.invoke",r.Log="xstate.log",r.Init="xstate.init",r.Invoke="xstate.invoke",r.ErrorExecution="error.execution",r.ErrorCommunication="error.communication",r.ErrorPlatform="error.platform",r.ErrorCustom="xstate.error",r.Update="xstate.update",r.Pure="xstate.pure",r.Choose="xstate.choose",t.SpecialTargets=void 0,(i=t.SpecialTargets||(t.SpecialTargets={})).Parent="#_parent",i.Internal="#_internal"},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"k",(function(){return l})),n.d(t,"j",(function(){return f})),n.d(t,"e",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"f",(function(){return h})),n.d(t,"i",(function(){return g})),n.d(t,"g",(function(){return v})),n.d(t,"h",(function(){return y}));var r=n(38),i=n(59);const o=e=>e.cursor,a=e=>({...e.cursor,gid:e.id}),s=Object(r.bisector)(Object(i.a)(o)),u=s.left,c=(s.right,Object(i.b)(o)),l=e=>null!=e&&"timestamp"in e,f=e=>null!=e&&"message"in e,d=e=>null!=e&&"field"in e,p=e=>"constant"in e,h=e=>"field"in e&&"value"in e,g=e=>null!=e&&"message"in e,v=e=>null!=e&&"field"in e,y=e=>e&&"field"in e&&"highlights"in e},function(e,t,n){"use strict";function r(e){return"timestampColumn"in e}function i(e){return"messageColumn"in e}function o(e){return"fieldColumn"in e}function a(e){return"number"==typeof e?`${e}px`:e}n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(63),i=n(1),o=r.__importDefault(n(93));t.default=function(e,t){void 0===t&&(t=200);var n=i.useState(e),r=n[0],a=n[1],s=i.useRef(),u=i.useRef(null),c=i.useRef(0);return i.useEffect((function(){if(s.current)u.current=e,c.current=!0;else{a(e);var n=function(){c.current?(c.current=!1,a(u.current),s.current=setTimeout(n,t)):s.current=void 0};s.current=setTimeout(n,t)}}),[e]),o.default((function(){s.current&&clearTimeout(s.current)})),r}},function(e,t,n){!function(e){"use strict";function t(e,t){return et?1:e>=t?0:NaN}function n(e){let n=e,r=e;function i(e,t,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;r(e[o],t)<0?n=o+1:i=o}return n}return 1===e.length&&(n=(t,n)=>e(t)-n,r=function(e){return(n,r)=>t(e(n),r)}(e)),{left:i,center:function(e,t,r,o){null==r&&(r=0),null==o&&(o=e.length);const a=i(e,t,r,o-1);return a>r&&n(e[a-1],t)>-n(e[a],t)?a-1:a},right:function(e,t,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;r(e[o],t)>0?i=o:n=o+1}return n}}}function r(e){return null===e?NaN:+e}const i=n(t),o=i.right,a=i.left,s=n(r).center;function u(e,t){let n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&++n;else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i=+i)>=i&&++n}return n}function c(e){return 0|e.length}function l(e){return!(e>0)}function f(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function d(e,t){let n,r=0,i=0,o=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(n=t-i,i+=n/++r,o+=n*(t-i));else{let a=-1;for(let s of e)null!=(s=t(s,++a,e))&&(s=+s)>=s&&(n=s-i,i+=n/++r,o+=n*(s-i))}if(r>1)return o/(r-1)}function p(e,t){const n=d(e,t);return n?Math.sqrt(n):n}function h(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}class InternMap extends Map{constructor(e,t=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(g(this,e))}has(e){return super.has(g(this,e))}set(e,t){return super.set(v(this,e),t)}delete(e){return super.delete(y(this,e))}}class InternSet extends Set{constructor(e,t=m){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const t of e)this.add(t)}has(e){return super.has(g(this,e))}add(e){return super.add(v(this,e))}delete(e){return super.delete(y(this,e))}}function g({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function v({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function y({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function m(e){return null!==e&&"object"==typeof e?e.valueOf():e}function b(e){return e}function w(e,...t){return O(e,b,b,t)}function _(e,t,...n){return O(e,b,t,n)}function S(e){if(1!==e.length)throw new Error("duplicate key");return e[0]}function O(e,t,n,r){return function e(i,o){if(o>=r.length)return n(i);const a=new InternMap,s=r[o++];let u=-1;for(const e of i){const t=s(e,++u,i),n=a.get(t);n?n.push(e):a.set(t,[e])}for(const[t,n]of a)a.set(t,e(n,o));return t(a)}(e,0)}function x(e,t){return Array.from(t,(t=>e[t]))}function j(e,...n){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[r=t]=n;if(1===r.length||n.length>1){const i=Uint32Array.from(e,((e,t)=>t));return n.length>1?(n=n.map((t=>e.map(t))),i.sort(((e,r)=>{for(const i of n){const n=t(i[e],i[r]);if(n)return n}}))):(r=e.map(r),i.sort(((e,n)=>t(r[e],r[n])))),x(e,i)}return e.sort(r)}var E=Array.prototype.slice;function I(e){return function(){return e}}var A=Math.sqrt(50),R=Math.sqrt(10),T=Math.sqrt(2);function C(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t0){let n=Math.round(e/a),r=Math.round(t/a);for(n*at&&--r,o=new Array(i=r-n+1);++st&&--r,o=new Array(i=r-n+1);++s=0?(o>=A?10:o>=R?5:o>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=A?10:o>=R?5:o>=T?2:1)}function k(e,t,n){let r;for(;;){const i=L(e,t,n);if(i===r||0===i||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function M(e){return Math.ceil(Math.log(u(e))/Math.LN2)+1}function P(){var e=b,t=h,n=M;function r(r){Array.isArray(r)||(r=Array.from(r));var i,a,s=r.length,u=new Array(s);for(i=0;i=f)if(e>=f&&t===h){const e=L(l,f,n);isFinite(e)&&(e>0?f=(Math.floor(f/e)+1)*e:e<0&&(f=(Math.ceil(f*-e)+1)/-e))}else d.pop()}for(var p=d.length;d[0]<=l;)d.shift(),--p;for(;d[p-1]>f;)d.pop(),--p;var g,v=new Array(p+1);for(i=0;i<=p;++i)(g=v[i]=[]).x0=i>0?d[i-1]:l,g.x1=i=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}function F(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function N(e,n,r=0,i=e.length-1,o=t){for(;i>r;){if(i-r>600){const t=i-r+1,a=n-r+1,s=Math.log(t),u=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*u*(t-u)/t)*(a-t/2<0?-1:1);N(e,n,Math.max(r,Math.floor(n-a*u/t+c)),Math.min(i,Math.floor(n+(t-a)*u/t+c)),o)}const t=e[n];let a=r,s=i;for(D(e,r,n),o(e[i],t)>0&&D(e,r,i);a0;)--s}0===o(e[r],t)?D(e,r,s):(++s,D(e,s,i)),s<=n&&(r=s+1),n<=s&&(i=s-1)}return e}function D(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function U(e,t,n){if(r=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n))).length){if((t=+t)<=0||r<2)return F(e);if(t>=1)return V(e);var r,i=(r-1)*t,o=Math.floor(i),a=V(N(e,o).subarray(0,o+1));return a+(F(e.subarray(o+1))-a)*(i-o)}}function q(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n=o)&&(n=o,r=i);return r}function z(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n>t||void 0===n&&t>=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function W(e,t){return[e,t]}function $(e,n=t){if(1===n.length)return z(e,n);let r,i=-1,o=-1;for(const t of e)++o,(i<0?0===n(t,t):n(t,r)<0)&&(r=t,i=o);return i}var B=H(Math.random);function H(e){return function(t,n=0,r=t.length){let i=r-(n=+n);for(;i;){const r=e()*i--|0,o=t[i+n];t[i+n]=t[r+n],t[r+n]=o}return t}}function G(e){if(!(i=e.length))return[];for(var t=-1,n=F(e,J),r=new Array(n);++te(...t)}(e.pop()),n=(e=e.map(f)).map(c),r=e.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(l))return o;for(;;){o.push(i.map(((t,n)=>e[n][t])));let a=r;for(;++i[a]===n[a];){if(0===a)return t?o.map(t):o;i[a--]=0}}},e.cumsum=function(e,t){var n=0,r=0;return Float64Array.from(e,void 0===t?e=>n+=+e||0:i=>n+=+t(i,r++,e)||0)},e.descending=function(e,t){return te?1:t>=e?0:NaN},e.deviation=p,e.difference=function(e,...t){e=new Set(e);for(const n of t)for(const t of n)e.delete(t);return e},e.disjoint=function(e,t){const n=t[Symbol.iterator](),r=new Set;for(const t of e){if(r.has(t))return!1;let e,i;for(;({value:e,done:i}=n.next())&&!i;){if(Object.is(t,e))return!1;r.add(e)}}return!0},e.every=function(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");let n=-1;for(const r of e)if(!t(r,++n,e))return!1;return!0},e.extent=h,e.fcumsum=function(e,t){const n=new Adder;let r=-1;return Float64Array.from(e,void 0===t?e=>n.add(+e||0):i=>n.add(+t(i,++r,e)||0))},e.filter=function(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of e)t(i,++r,e)&&n.push(i);return n},e.fsum=function(e,t){const n=new Adder;if(void 0===t)for(let t of e)(t=+t)&&n.add(t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n},e.greatest=function(e,n=t){let r,i=!1;if(1===n.length){let o;for(const a of e){const e=n(a);(i?t(e,o)>0:0===t(e,e))&&(r=a,o=e,i=!0)}}else for(const t of e)(i?n(t,r)>0:0===n(t,t))&&(r=t,i=!0);return r},e.greatestIndex=function(e,n=t){if(1===n.length)return q(e,n);let r,i=-1,o=-1;for(const t of e)++o,(i<0?0===n(t,t):n(t,r)>0)&&(r=t,i=o);return i},e.group=w,e.groupSort=function(e,n,r){return(1===n.length?j(_(e,n,r),(([e,n],[r,i])=>t(n,i)||t(e,r))):j(w(e,r),(([e,r],[i,o])=>n(r,o)||t(e,i)))).map((([e])=>e))},e.groups=function(e,...t){return O(e,Array.from,b,t)},e.histogram=P,e.index=function(e,...t){return O(e,b,S,t)},e.indexes=function(e,...t){return O(e,Array.from,S,t)},e.intersection=function(e,...t){e=new Set(e),t=t.map(K);e:for(const n of e)for(const r of t)if(!r.has(n)){e.delete(n);continue e}return e},e.least=function(e,n=t){let r,i=!1;if(1===n.length){let o;for(const a of e){const e=n(a);(i?t(e,o)<0:0===t(e,e))&&(r=a,o=e,i=!0)}}else for(const t of e)(i?n(t,r)<0:0===n(t,t))&&(r=t,i=!0);return r},e.leastIndex=$,e.map=function(e,t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof t)throw new TypeError("mapper is not a function");return Array.from(e,((n,r)=>t(n,r,e)))},e.max=V,e.maxIndex=q,e.mean=function(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n},e.median=function(e,t){return U(e,.5,t)},e.merge=function(e){return Array.from(function*(e){for(const t of e)yield*t}(e))},e.min=F,e.minIndex=z,e.nice=k,e.pairs=function(e,t=W){const n=[];let r,i=!1;for(const o of e)i&&n.push(t(r,o)),r=o,i=!0;return n},e.permute=x,e.quantile=U,e.quantileSorted=function(e,t,n=r){if(i=e.length){if((t=+t)<=0||i<2)return+n(e[0],0,e);if(t>=1)return+n(e[i-1],i-1,e);var i,o=(i-1)*t,a=Math.floor(o),s=+n(e[a],a,e);return s+(+n(e[a+1],a+1,e)-s)*(o-a)}},e.quickselect=N,e.range=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r=A?i*=10:o>=R?i*=5:o>=T&&(i*=2),t{var n;const r=Object(o.useMemo)((()=>u(e)),[e]),{refreshInterval:i,targetPosition:a,visiblePositions:s,latestPosition:c}=e.context,l=Object(o.useMemo)((()=>{const{updateTimeRange:e,jumpToTargetPosition:n,jumpToTargetPositionTime:r,reportVisiblePositions:i,startLiveStreaming:o,stopLiveStreaming:a}=t;return{jumpToTargetPosition:n,jumpToTargetPositionTime:r,reportVisiblePositions:i,startLiveStreaming:o,stopLiveStreaming:a,updateDateRange:t=>{e({from:t.startDateExpression,to:t.endDateExpression})}}}),[t]),f=Object(o.useMemo)((()=>s.startKey&&s.endKey?{start:s.startKey.time,end:s.endKey.time}:null),[s.startKey,s.endKey]);return{targetPosition:a,isStreaming:!i.pause,...r,firstVisiblePosition:s.startKey,pagesBeforeStart:s.pagesBeforeStart,pagesAfterEnd:s.pagesAfterEnd,visibleMidpoint:c,visibleMidpointTime:null!==(n=null==c?void 0:c.time)&&void 0!==n?n:null,visibleTimeInterval:f,...l}})),u=e=>({startDateExpression:e.context.timeRange.from,endDateExpression:e.context.timeRange.to,startTimestamp:e.context.timestamps.startTimestamp,endTimestamp:e.context.timestamps.endTimestamp,lastCompleteDateRangeExpressionUpdate:e.context.timeRange.lastChangedCompletely,timestampsLastUpdate:e.context.timestamps.lastChangedTimestamp})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(34),o=n(41),a=n(20),s=n(24),u=a.toSCXMLEvent({type:o.init});function c(e,t){return t&&t[e]||void 0}function l(e,t){var n;if(a.isString(e)||"number"==typeof e){var i=c(e,t);n=a.isFunction(i)?{type:e,exec:i}:i||{type:e,exec:void 0}}else if(a.isFunction(e))n={type:e.name||e.toString(),exec:e};else if(i=c(e.type,t),a.isFunction(i))n=r.__assign(r.__assign({},e),{exec:i});else if(i){var o=i.type||e.type;n=r.__assign(r.__assign(r.__assign({},i),e),{type:o})}else n=e;return n}var f=function(e,t){return e?(a.isArray(e)?e:[e]).map((function(e){return l(e,t)})):[]};function d(e){var t=l(e);return r.__assign(r.__assign({id:a.isString(e)?e:t.id},t),{type:t.type})}function p(e,t,n,i){var s,u={_event:n},c=a.toSCXMLEvent(a.isFunction(e.event)?e.event(t,n.data,u):e.event);if(a.isString(e.delay)){var l=i&&i[e.delay];s=a.isFunction(l)?l(t,n.data,u):l}else s=a.isFunction(e.delay)?e.delay(t,n.data,u):e.delay;return r.__assign(r.__assign({},e),{type:o.raise,_event:c,delay:s})}function h(e,t){return{to:t?t.to:void 0,type:o.send,event:a.isFunction(e)?e:a.toEventObject(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:a.isFunction(e)?e.name:a.getEventType(e)}}function g(e,t,n,i){var o,s={_event:n},u=a.toSCXMLEvent(a.isFunction(e.event)?e.event(t,n.data,s):e.event);if(a.isString(e.delay)){var c=i&&i[e.delay];o=a.isFunction(c)?c(t,n.data,s):c}else o=a.isFunction(e.delay)?e.delay(t,n.data,s):e.delay;var l=a.isFunction(e.to)?e.to(t,n.data,s):e.to;return r.__assign(r.__assign({},e),{to:l,_event:u,event:u.data,delay:o})}function v(e,t){return h(e,r.__assign(r.__assign({},t),{to:i.SpecialTargets.Parent}))}var y=function(e,t){return{context:e,event:t}},m=function(e,t,n){return r.__assign(r.__assign({},e),{value:a.isString(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})};function b(e,t,n){var r=a.isFunction(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:i.ActionTypes.Stop,activity:o}}t.actionTypes=o,t.after=function(e,t){var n=t?"#".concat(t):"";return"".concat(i.ActionTypes.After,"(").concat(e,")").concat(n)},t.assign=function(e){return{type:o.assign,assignment:e}},t.cancel=function(e){return{type:o.cancel,sendId:e}},t.choose=function(e){return{type:i.ActionTypes.Choose,conds:e}},t.done=function(e,t){var n="".concat(i.ActionTypes.DoneState,".").concat(e);return{type:n,data:t,toString:function(){return n}}},t.doneInvoke=function(e,t){var n="".concat(i.ActionTypes.DoneInvoke,".").concat(e);return{type:n,data:t,toString:function(){return n}}},t.error=function(e,t){var n="".concat(i.ActionTypes.ErrorPlatform,".").concat(e);return{type:n,data:t,toString:function(){return n}}},t.escalate=function(e,t){return v((function(t,n,r){return{type:o.error,data:a.isFunction(e)?e(t,n,r):e}}),r.__assign(r.__assign({},t),{to:i.SpecialTargets.Parent}))},t.forwardTo=function(e,t){if(!(s.IS_PRODUCTION||e&&"function"!=typeof e)){var n=e;e=function(){for(var e=[],t=0;t{const i=e.some((e=>"aborted"!==e.type))?"danger":"warning";return Object(S.jsx)(r.EuiCallOut,{color:i,iconType:"warning",title:n},null==e?void 0:e.map(((e,t)=>Object(S.jsx)(x,{key:t,error:e}))),t?Object(S.jsx)(r.EuiButton,{"data-test-subj":"infraDataSearchErrorCalloutRetryButton",color:i,size:"s",onClick:t},Object(S.jsx)(o.FormattedMessage,{id:"xpack.logsShared.dataSearch.loadingErrorRetryButtonLabel",defaultMessage:"Retry"})):null)},x=({error:e})=>"aborted"===e.type?Object(S.jsx)(j,{error:e}):"shardFailure"===e.type?Object(S.jsx)(I,{error:e}):Object(S.jsx)(E,{error:e}),j=({})=>Object(S.jsx)(o.FormattedMessage,{tagName:"p",id:"xpack.logsShared.dataSearch.abortedRequestErrorMessage",defaultMessage:"The request was aborted."}),E=({error:e})=>{var t;return Object(S.jsx)("p",null,null!==(t=e.message)&&void 0!==t?t:`${e}`)},I=({error:e})=>Object(S.jsx)(o.FormattedMessage,{tagName:"p",id:"xpack.logsShared.dataSearch.shardFailureErrorMessage",defaultMessage:"Index {indexName}: {errorMessage}",values:{indexName:e.shardInfo.index,errorMessage:e.message}}),A=({label:e,maxValue:t,onCancel:n,value:i})=>{const o=Object(u.useMemo)((()=>Number.isFinite(t)&&Number.isFinite(i)?`${i} / ${t}`:void 0),[i,t]);return Object(S.jsx)(r.EuiFlexGroup,{alignItems:"center"},Object(S.jsx)(r.EuiFlexItem,null,Object(S.jsx)(r.EuiProgress,{label:e,size:"s",max:t,value:i,valueText:o})),n?Object(S.jsx)(r.EuiFlexItem,{grow:!1},Object(S.jsx)(r.EuiButtonIcon,{color:"danger",iconType:"cross",onClick:n,title:R,"aria-label":R})):null)},R=i.i18n.translate("xpack.logsShared.dataSearch.cancelButtonLabel",{defaultMessage:"Cancel request"});var T=n(43),C=n.n(T),L=n(58);const k=["container.id","host.ip","kubernetes.pod.uid"],M=({logEntry:e})=>{const{hide:t,isVisible:n,toggle:i}=(e=>{const[t,n]=Object(u.useState)(!1),r=Object(u.useCallback)((()=>n(!1)),[]),i=Object(u.useCallback)((()=>n(!0)),[]),o=Object(u.useCallback)((()=>n((e=>!e))),[]);return Object(u.useMemo)((()=>({hide:r,isVisible:t,show:i,toggle:o})),[r,t,i,o])})(),a=Object(u.useMemo)((()=>V(e)),[e]),s=Object(u.useMemo)((()=>P(e)),[e]),c=Object(L.useLinkProps)({app:"uptime",...s||{}}),l=Object(L.useLinkProps)({app:"apm",...a||{}}),f=Object(u.useMemo)((()=>[Object(S.jsx)(r.EuiContextMenuItem,C()({"data-test-subj":"logEntryActionsMenuItem uptimeLogEntryActionsMenuItem",disabled:!s,icon:"uptimeApp",key:"uptimeLink"},c),Object(S.jsx)(o.FormattedMessage,{id:"xpack.logsShared.logEntryActionsMenu.uptimeActionLabel",defaultMessage:"View status in Uptime"})),Object(S.jsx)(r.EuiContextMenuItem,C()({"data-test-subj":"logEntryActionsMenuItem apmLogEntryActionsMenuItem",disabled:!a,icon:"apmApp",key:"apmLink"},l),Object(S.jsx)(o.FormattedMessage,{id:"xpack.logsShared.logEntryActionsMenu.apmActionLabel",defaultMessage:"View in APM"}))]),[s,a,l,c]),d=Object(u.useMemo)((()=>f.length>0),[f]);return Object(S.jsx)(r.EuiPopover,{anchorPosition:"downRight",button:Object(S.jsx)(r.EuiButton,{"data-test-subj":"logEntryActionsMenuButton",disabled:!d,iconSide:"right",iconType:"arrowDown",onClick:i},Object(S.jsx)(o.FormattedMessage,{id:"xpack.logsShared.logEntryActionsMenu.buttonLabel",defaultMessage:"Investigate"})),closePopover:t,id:"logEntryActionsMenu",isOpen:n,panelPaddingSize:"none"},Object(S.jsx)(r.EuiContextMenuPanel,{items:f}))},P=e=>{const t=e.fields.filter((({field:e,value:t})=>null!=t&&k.includes(e))).reduce(((e,t)=>{const{field:n,value:r}=t;return e.concat(r.map((e=>`${n}:${e}`)))}),[]);if(0!==t.length)return{app:"uptime",hash:"/",search:{search:`${t.join(" or ")}`}}},V=e=>{var t,n;const r=null===(t=e.fields.find((({field:e,value:t})=>"string"==typeof t[0]&&"trace.id"===e)))||void 0===t||null===(n=t.value)||void 0===n?void 0:n[0];if("string"!=typeof r)return;const i=e.fields.find((({field:e})=>"@timestamp"===e)),o=i?i.value[0]:null,{rangeFrom:a,rangeTo:s}="number"==typeof o?(()=>{const e=new Date(o),t=new Date(o);return e.setMinutes(e.getMinutes()-10),t.setMinutes(t.getMinutes()+10),{rangeFrom:e.toISOString(),rangeTo:t.toISOString()}})():{rangeFrom:"now-1y",rangeTo:"now"};return{app:"apm",pathname:F({traceId:r,rangeFrom:a,rangeTo:s})}};function F({traceId:e,rangeFrom:t,rangeTo:n}){return`/link-to/trace/${e}?`+new URLSearchParams({rangeFrom:t,rangeTo:n}).toString()}var N=n(31),D=n(62);const U=({logEntry:e,onSetFieldFilter:t})=>{const n=Object(u.useMemo)((()=>t?n=>()=>{f.array(N.c).is(n.value)&&(null==t||t({language:"kuery",query:`${H(n.field)}:${n.value.map(H).join(" OR ")}`},e.id,e.cursor))}:void 0),[e,t]),o=Object(u.useMemo)((()=>[{field:"field",name:i.i18n.translate("xpack.logsShared.logFlyout.fieldColumnLabel",{defaultMessage:"Field"}),sortable:!0},{actions:[{type:"icon",icon:"filter",name:$,description:B,available:()=>!!n,onClick:e=>null==n?void 0:n(e)()}]},{field:"value",name:i.i18n.translate("xpack.logsShared.logFlyout.valueColumnLabel",{defaultMessage:"Value"}),render:(e,t)=>Object(S.jsx)(D.a,{highlightTerms:q,isActiveHighlight:!1,value:t.value})}]),[n]);return Object(S.jsx)(r.EuiInMemoryTable,{columns:o,items:e.fields,search:W,sorting:z})},q=[],z={sort:{field:"field",direction:"asc"}},W={box:{incremental:!0,schema:!0}},$=i.i18n.translate("xpack.logsShared.logFlyout.filterAriaLabel",{defaultMessage:"Filter"}),B=i.i18n.translate("xpack.logsShared.logFlyout.setFilterTooltip",{defaultMessage:"View event with filter"}),H=e=>"string"==typeof e?`"${e.replace(/"/g,'\\"')}"`:e,G={content:"You are logs-gpt, a helpful assistant for logs-based observability. Answer as\n concisely as possible.",role:s.MessageRole.System},J=e=>{const t=Object(u.useRef)(),{services:{http:n,data:r,uiSettings:i,application:o,observabilityAIAssistant:c},overlays:{openFlyout:l}}=Object(a.useKibana)(),f=Object(u.useCallback)((()=>{var e;null===(e=t.current)||void 0===e||e.close()}),[]),d=Object(u.useCallback)((u=>{const{Provider:d}=Object(a.createKibanaReactContext)({http:n,data:r,uiSettings:i,application:o});t.current=l(Object(S.jsx)(d,null,Object(S.jsx)(s.ObservabilityAIAssistantProvider,{value:c},Object(S.jsx)(K,{logEntryId:u,onCloseFlyout:f,logViewReference:e}))))}),[n,r,i,o,l,e,f,c]);return Object(u.useEffect)((()=>()=>{f()}),[f]),{openLogEntryFlyout:d,closeLogEntryFlyout:f}},K=({logEntryId:e,onCloseFlyout:t,onSetFieldFilter:n,logViewReference:i})=>{var a;const{cancelRequest:l,errors:f,fetchLogEntry:d,isRequestRunning:p,loaded:h,logEntry:v,total:y}=(({logViewReference:e,logEntryId:t})=>{const{search:n,requests$:r}=Object(m.c)({getRequest:Object(u.useCallback)((()=>t&&e?{request:{params:g.encode({logView:e,logEntryId:t})},options:{strategy:"infra-log-entry"}}:null),[e,t]),parseResponses:b}),{cancelRequest:i,isRequestRunning:o,isResponsePartial:a,latestResponseData:s,latestResponseErrors:c,loaded:l,total:f}=Object(m.e)(r);return{cancelRequest:i,errors:c,fetchLogEntry:n,isRequestRunning:o,isResponsePartial:a,loaded:l,logEntry:null!=s?s:null,total:f}})({logViewReference:i,logEntryId:e});Object(u.useEffect)((()=>{i&&e&&d()}),[d,i,e]);const w=Object(u.useMemo)((()=>{if(!v)return;const e=(new Date).toISOString();return[{"@timestamp":e,message:G},{"@timestamp":e,message:{role:s.MessageRole.User,content:`I'm looking at a log entry. Can you explain me what the log message means? Where it could be coming from, whether it is expected and whether it is an issue. Here's the context, serialized: ${JSON.stringify({logEntry:{fields:v.fields}})} `}}]}),[v]),x=Object(u.useMemo)((()=>{var e;if(!v)return;const t=(new Date).toISOString(),n=null===(e=v.fields.find((e=>"message"===e.field)))||void 0===e?void 0:e.value[0];return[{"@timestamp":t,message:G},{"@timestamp":t,message:{role:s.MessageRole.User,content:`I'm looking at a log entry. Can you construct a Kibana KQL query that I can enter in the search bar that gives me similar log entries, based on the \`message\` field: ${n}`}}]}),[v]),j=Object(s.useObservabilityAIAssistant)();return Object(S.jsx)(r.EuiFlyout,{onClose:t,size:"m"},Object(S.jsx)(r.EuiFlyoutHeader,{hasBorder:!0},Object(S.jsx)(r.EuiFlexGroup,{alignItems:"center"},Object(S.jsx)(r.EuiFlexItem,null,Object(S.jsx)(r.EuiTitle,{size:"s"},Object(S.jsx)("h3",{id:"flyoutTitle"},Object(S.jsx)(o.FormattedMessage,{defaultMessage:"Details for log entry {logEntryId}",id:"xpack.logsShared.logFlyout.flyoutTitle",values:{logEntryId:e?Object(S.jsx)("code",null,e):""}}))),v?Object(S.jsx)(c.a.Fragment,null,Object(S.jsx)(r.EuiSpacer,{size:"s"}),Object(S.jsx)(r.EuiTextColor,{color:"subdued"},Object(S.jsx)(o.FormattedMessage,{id:"xpack.logsShared.logFlyout.flyoutSubTitle",defaultMessage:"From index {indexName}",values:{indexName:Object(S.jsx)("code",null,v.index)}}))):null),Object(S.jsx)(r.EuiFlexItem,{style:{padding:8},grow:!1},v?Object(S.jsx)(M,{logEntry:v}):null))),p?Object(S.jsx)(_,null,Object(S.jsx)("div",{style:{width:"75%"}},Object(S.jsx)(A,{label:Q,maxValue:y,onCancel:l,value:h}))):v?Object(S.jsx)(r.EuiFlyoutBody,{banner:(null!==(a=null==f?void 0:f.length)&&void 0!==a?a:0)>0?Object(S.jsx)(O,{title:Z,errors:null!=f?f:[],onRetry:d}):void 0},Object(S.jsx)(r.EuiFlexGroup,{direction:"column",gutterSize:"m"},j.isEnabled()&&w?Object(S.jsx)(r.EuiFlexItem,{grow:!1},Object(S.jsx)(s.ContextualInsight,{title:X,messages:w})):null,j.isEnabled()&&x?Object(S.jsx)(r.EuiFlexItem,{grow:!1},Object(S.jsx)(s.ContextualInsight,{title:Y,messages:x})):null,Object(S.jsx)(r.EuiFlexItem,{grow:!1},Object(S.jsx)(U,{logEntry:v,onSetFieldFilter:n})))):Object(S.jsx)(_,null,Object(S.jsx)("div",{style:{width:"75%"}},Object(S.jsx)(O,{title:Z,errors:null!=f?f:[],onRetry:d}))))},X=i.i18n.translate("xpack.logsShared.logFlyout.explainLogMessageTitle",{defaultMessage:"What's this message?"}),Y=i.i18n.translate("xpack.logsShared.logFlyout.similarLogMessagesTitle",{defaultMessage:"How do I find similar log messages?"}),Q=i.i18n.translate("xpack.logsShared.logFlyout.loadingMessage",{defaultMessage:"Searching log entry in shards"}),Z=i.i18n.translate("xpack.logsShared.logFlyout.loadingErrorCalloutTitle",{defaultMessage:"Error while searching the log entry"})},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return d}));var r=n(16),i=n(29),o=n.n(i),a=n(1),s=n(74),u=n(4),c=n(25);const l=({initialLogViewReference:e,logViews:t,useDevTools:n=!1,initializeFromUrl:i,updateContextInUrl:o,listenForUrlChanges:l})=>{const[f]=Object(a.useState)((()=>Object(c.a)())),d=Object(r.useInterpret)((()=>Object(c.b)({initialContext:{logViewReference:null!=e?e:u.a},logViews:t,notificationChannel:f,initializeFromUrl:i,updateContextInUrl:o,listenForUrlChanges:l})),{devTools:n}),p=Object(a.useCallback)((e=>{d.send({type:"LOG_VIEW_REFERENCE_CHANGED",logViewReference:e})}),[d]),h=Object(r.useSelector)(d,(e=>e.context.logViewReference)),g=Object(r.useSelector)(d,(e=>e.matches("resolving")||e.matches("checkingStatus")||e.matches("resolvedPersistedLogView")||e.matches("resolvedInlineLogView")?e.context.logView:void 0)),v=Object(r.useSelector)(d,(e=>e.matches("checkingStatus")||e.matches("resolvedPersistedLogView")||e.matches("resolvedInlineLogView")?e.context.resolvedLogView:void 0)),y=Object(r.useSelector)(d,(e=>e.matches("resolvedPersistedLogView")||e.matches("resolvedInlineLogView")?e.context.status:void 0)),m=Object(r.useSelector)(d,(e=>e.matches("loading"))),b=Object(r.useSelector)(d,(e=>e.matches("resolving"))),w=Object(r.useSelector)(d,(e=>e.matches("checkingStatus"))),_=Object(r.useSelector)(d,(e=>e.matches("updating"))),S=m||b||w||_,O=Object(r.useSelector)(d,(e=>e.matches("uninitialized"))),x=Object(r.useSelector)(d,(e=>e.matches("loadingFailed"))),j=Object(r.useSelector)(d,(e=>e.matches("resolutionFailed"))),E=Object(r.useSelector)(d,(e=>e.matches("checkingStatusFailed"))),I=Object(r.useSelector)(d,(e=>"log-view-reference"===e.context.logViewReference.type)),A=!I,R=Object(r.useSelector)(d,(e=>e.matches("loadingFailed")||e.matches("resolutionFailed")||e.matches("checkingStatusFailed")?[e.context.error]:[])),T=R.length>0,C=Object(a.useCallback)((()=>d.send({type:"RETRY"})),[d]),L=Object(a.useCallback)((async e=>{d.send({type:"UPDATE",attributes:e});const t=await Object(s.waitFor)(d,(e=>e.matches("updatingFailed")||e.matches("resolvedPersistedLogView")||e.matches("resolvedInlineLogView")));if(t.matches("updatingFailed"))throw t.context.error}),[d]),k=Object(a.useCallback)((()=>{p(u.a)}),[p]);return{logViewStateService:d,logViewStateNotifications:f,hasFailedLoading:T,hasFailedLoadingLogView:x,hasFailedLoadingLogViewStatus:E,hasFailedResolvingLogView:j,latestLoadLogViewFailures:R,isUninitialized:O,isLoading:S,isLoadingLogView:m,isLoadingLogViewStatus:w,isResolvingLogView:b,logViewReference:h,logView:g,resolvedLogView:v,logViewStatus:y,derivedDataView:null==v?void 0:v.dataViewReference,isInlineLogView:A,isPersistedLogView:I,load:C,retry:C,update:L,changeLogViewReference:p,revertToDefaultLogView:k}},[f,d]=o()(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(20),o=n(66);function a(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[i.symbolObservable]=function(){return this},t}function s(e,t,n){var r=a(t);if(r.deferred=!0,i.isMachine(e)){var s=r.state=o.provide(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return s}}return r}function u(e){try{return"function"==typeof e.send}catch(e){return!1}}t.createDeferredActor=s,t.createInvocableActor=function(e,t,n,r){var o,u=i.toInvokeSource(e.src),c=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[u.type],l=e.data?i.mapContext(e.data,n,r):void 0,f=c?s(c,e.id,l):a(e.id);return f.meta=e,f},t.createNullActor=a,t.isActor=u,t.isSpawnedActor=function(e){return u(e)&&"id"in e},t.toActorRef=function(e){var t;return r.__assign(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[i.symbolObservable]=function(){return this},t),e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(53),o=n(20),a=n(67),s=n(40),u=n(24);function c(e){return"object"==typeof e&&null!==e&&"value"in e&&"_event"in e}var l=c,f=function(){function e(e){var t,n=this;this.actions=[],this.activities=i.EMPTY_ACTIVITY_MAP,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||i.EMPTY_ACTIVITY_MAP,this.meta=a.getMeta(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return a.nextEvents(n.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:s.initEvent,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=s.initEvent;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),o.isString(e))return[e];var i=Object.keys(e);return i.concat.apply(i,r.__spreadArray([],r.__read(i.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=r.__rest(e,["configuration","transitions","tags","machine"]);return r.__assign(r.__assign({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return o.matchesState(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;u.IS_PRODUCTION&&o.warn(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}();t.State=f,t.bindActionToState=function(e,t){var n=e.exec;return r.__assign(r.__assign({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})},t.isState=l,t.isStateConfig=c,t.stateValuesEqual=function e(t,n){if(t===n)return!0;if(void 0===t||void 0===n)return!1;if(o.isString(t)||o.isString(n))return t===n;var r=Object.keys(t),i=Object.keys(n);return r.length===i.length&&r.every((function(r){return e(t[r],n[r])}))}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.isInterpreterStateEqual=t.isService=t.shallowEqual=t.getServiceSnapshot=t.partition=void 0;var o=n(15);function a(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}t.partition=function(e,t){var n,o,a=r([[],[]],2),s=a[0],u=a[1];try{for(var c=i(e),l=c.next();!l.done;l=c.next()){var f=l.value;t(f)?s.push(f):u.push(f)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}return[s,u]},t.getServiceSnapshot=function(e){return 0!==e.status?e.getSnapshot():e.machine.initialState},t.shallowEqual=function(e,t){if(a(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i0||"boolean"==typeof t.changed);return!(n.changed||r)}},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/kibanaUtils/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0);const i=r.type({type:r.literal("aborted")}),o=r.type({type:r.literal("generic"),message:r.string}),a=r.type({type:r.literal("shardFailure"),shardInfo:r.type({shard:r.union([r.number,r.null]),index:r.union([r.string,r.null]),node:r.union([r.string,r.null])}),message:r.union([r.string,r.null])}),s=r.union([i,o,a])},function(e,t,n){"use strict";n.r(t),n.d(t,"LogEntryColumn",(function(){return u})),n.d(t,"LogEntryColumnContent",(function(){return c})),n.d(t,"iconColumnId",(function(){return l})),n.d(t,"getColumnWidths",(function(){return f})),n.d(t,"useColumnWidths",(function(){return d}));var r=n(1),i=n(13),o=n(36),a=n(64),s=n(61);const u=i.euiStyled.div.attrs((()=>({role:"cell"})))` align-items: stretch; display: flex; flex-basis: ${e=>e.baseWidth||"0%"}; flex-direction: row; flex-grow: ${e=>e.growWeight||0}; flex-shrink: ${e=>e.shrinkWeight||0}; overflow: hidden; `,c=i.euiStyled.div.attrs({"data-test-subj":"LogEntryColumnContent"})` flex: 1 0 0%; padding: 2px ${8}px; `,l=Symbol("iconColumnId"),f=(e,t,n)=>e.reduce(((e,r)=>{if(Object(o.d)(r)){const i=r.timestampColumn.width?Object(o.a)(r.timestampColumn.width):void 0;return{...e,[r.timestampColumn.id]:{growWeight:0,shrinkWeight:0,baseWidth:null!=i?i:`${Math.ceil(t*n*1.1)+16}px`}}}if(Object(o.c)(r)){const t=r.messageColumn.width?Object(o.a)(r.messageColumn.width):void 0;return{...e,[r.messageColumn.id]:{growWeight:5,shrinkWeight:0,baseWidth:null!=t?t:"0%"}}}{const n=r.fieldColumn.width?Object(o.a)(r.fieldColumn.width):void 0;return{...e,[r.fieldColumn.id]:{growWeight:n?0:1,shrinkWeight:0,baseWidth:null!=n?n:`${Math.ceil(10*t)+16}px`}}}}),{[l]:{growWeight:0,shrinkWeight:0,baseWidth:"48px"}}),d=({columnConfigurations:e,scale:t,timeFormat:n="time"})=>{const{CharacterDimensionsProbe:i,dimensions:o}=Object(s.g)(t),u=Object(r.useMemo)((()=>Date.now()),[]),c=Object(a.a)(u,{format:n}),l=Object(r.useMemo)((()=>f(e,o.width,c.length)),[e,o.width,c]);return Object(r.useMemo)((()=>({columnWidths:l,CharacterDimensionsProbe:i})),[l,i])};t.default=u},function(e,t,n){"use strict";n.d(t,"b",(function(){return D})),n.d(t,"a",(function(){return U})),n.d(t,"c",(function(){return q}));var r=n(29),i=n.n(r),o=n(8),a=n(1),s=n(60),u=n.n(s),c=n(75),l=n.n(c),f=n(11),d=n(7),p=n(10),h=n(0),g=n(12),v=n(4),y=n(31),m=n(50);const b="infra-log-entries",w=h.intersection([h.type({logView:v.o,startTimestamp:h.number,endTimestamp:h.number,size:h.number}),h.partial({query:y.b,columns:h.array(v.m),highlightPhrase:h.string})]),_=h.intersection([w,g.e]),S=h.intersection([w,g.c]),O=h.union([w,_,S]),x=h.intersection([h.type({data:h.intersection([h.type({entries:h.array(g.i),topCursor:h.union([g.g,h.null]),bottomCursor:h.union([g.g,h.null])}),h.partial({hasMoreBefore:h.boolean,hasMoreAfter:h.boolean})])}),h.partial({errors:h.array(m.a)})]);var j=n(14);const E=({columnOverrides:e,endTimestamp:t,highlightPhrase:n,query:r,logViewReference:i,startTimestamp:o})=>{const{search:s,requests$:u}=Object(j.c)({getRequest:Object(a.useCallback)(((a,s)=>{var u;return i?{request:{params:O.encode({after:a,columns:e,endTimestamp:null!==(u=null==s?void 0:s.extendTo)&&void 0!==u?u:t,highlightPhrase:n,query:r,size:s.size,logView:i,startTimestamp:o})},options:{strategy:b}}:null}),[e,t,n,r,i,o]),parseResponses:A});return{fetchLogEntriesAfter:s,logEntriesAfterSearchRequests$:u}},I=({columnOverrides:e,endTimestamp:t,highlightPhrase:n,query:r,logViewReference:i,startTimestamp:o})=>{const{fetchLogEntriesAfter:a,logEntriesAfterSearchRequests$:s}=E({columnOverrides:e,endTimestamp:t,highlightPhrase:n,query:r,logViewReference:i,startTimestamp:o}),{cancelRequest:u,isRequestRunning:c,isResponsePartial:l,loaded:d,logEntriesAfterSearchResponse$:p,total:h}=(e=>{const t=Object(f.d)(e,R),{cancelRequest:n,isRequestRunning:r,isResponsePartial:i,loaded:o,total:a}=Object(j.d)(t);return{cancelRequest:n,isRequestRunning:r,isResponsePartial:i,loaded:o,logEntriesAfterSearchRequests$:e,logEntriesAfterSearchResponse$:t,total:a}})(s);return{cancelRequest:u,fetchLogEntriesAfter:a,isRequestRunning:c,isResponsePartial:l,loaded:d,logEntriesAfterSearchResponse$:p,total:h}},A=Object(j.b)(null,Object(p.b)(x)),R=Object(d.exhaustMap)(j.a);var T=n(3);const C=({columnOverrides:e,endTimestamp:t,highlightPhrase:n,query:r,logViewReference:i,startTimestamp:o})=>{const{search:s,requests$:u}=Object(j.c)({getRequest:Object(a.useCallback)(((a,s)=>{var u;return i?{request:{params:O.encode({before:a,columns:e,endTimestamp:t,highlightPhrase:n,query:r,size:s.size,logView:i,startTimestamp:null!==(u=s.extendTo)&&void 0!==u?u:o})},options:{strategy:b}}:null}),[e,t,n,r,i,o]),parseResponses:k});return{fetchLogEntriesBefore:s,logEntriesBeforeSearchRequests$:u}},L=({columnOverrides:e,endTimestamp:t,highlightPhrase:n,query:r,logViewReference:i,startTimestamp:o})=>{const{fetchLogEntriesBefore:a,logEntriesBeforeSearchRequests$:s}=C({columnOverrides:e,endTimestamp:t,highlightPhrase:n,query:r,logViewReference:i,startTimestamp:o}),{cancelRequest:u,isRequestRunning:c,isResponsePartial:l,loaded:d,logEntriesBeforeSearchResponse$:p,total:h}=(e=>{const t=Object(f.d)(e,M),{cancelRequest:n,isRequestRunning:r,isResponsePartial:i,loaded:o,total:a}=Object(j.d)(t);return{cancelRequest:n,isRequestRunning:r,isResponsePartial:i,loaded:o,logEntriesBeforeSearchRequests$:e,logEntriesBeforeSearchResponse$:t,total:a}})(s);return{cancelRequest:u,fetchLogEntriesBefore:a,isRequestRunning:c,isResponsePartial:l,loaded:d,logEntriesBeforeSearchResponse$:p,total:h}},k=Object(j.b)(null,Object(p.b)(x)),M=Object(d.exhaustMap)(j.a),P=({columnOverrides:e,endTimestamp:t,highlightPhrase:n,query:r,logViewReference:i,startTimestamp:o})=>{var s,u;const{fetchLogEntriesBefore:c}=C({columnOverrides:e,endTimestamp:t,highlightPhrase:n,query:r,logViewReference:i,startTimestamp:o}),{fetchLogEntriesAfter:l}=E({columnOverrides:e,endTimestamp:t,highlightPhrase:n,query:r,logViewReference:i,startTimestamp:o}),p=Object(f.b)((()=>new T.ReplaySubject),[]),h=Object(a.useCallback)(((e,t)=>{const n=c(e,{size:Math.floor(t/2)});if(null==n)return;const r=Object(j.a)(n).pipe(Object(d.last)(),Object(d.map)((n=>{var r,i;const o=null!==(r=null===(i=n.response.data)||void 0===i?void 0:i.bottomCursor)&&void 0!==r?r:{time:e.time-1,tiebreaker:0},a=l(o,{size:Math.ceil(t/2)});if(null==a)throw new Error("Failed to create request: no request args given");return a})));p.next([n,r])}),[l,c,p]),g=Object(f.b)((e=>e.pipe(Object(d.switchMap)((([e])=>e.pipe(Object(d.switchMap)((([e,t])=>{const n=Object(j.a)(e),r=t.pipe(Object(d.switchMap)(j.a),Object(d.startWith)(void 0));return Object(T.combineLatest)([n,r])})),Object(d.map)((([e,t])=>{var n,r,i,o,a,s,u,c,l,f,d,p;const h=e.response.loaded,g=null==t?void 0:t.response.loaded,v=e.response.total,y=null==t?void 0:t.response.total;return{before:e,after:t,combined:{isRunning:null!==(n=e.response.isRunning||(null==t?void 0:t.response.isRunning))&&void 0!==n&&n,isPartial:null!==(r=e.response.isPartial||(null==t?void 0:t.response.isPartial))&&void 0!==r&&r,loaded:null!=h||null!=g?(null!=h?h:0)+(null!=g?g:0):void 0,total:null!=v||null!=y?(null!=v?v:0)+(null!=y?y:0):void 0,entries:[...null!==(i=null===(o=e.response.data)||void 0===o?void 0:o.entries)&&void 0!==i?i:[],...null!==(a=null==t||null===(s=t.response.data)||void 0===s?void 0:s.entries)&&void 0!==a?a:[]],errors:[...null!==(u=e.response.errors)&&void 0!==u?u:[],...null!==(c=null==t?void 0:t.response.errors)&&void 0!==c?c:[]],hasMoreBefore:null===(l=e.response.data)||void 0===l?void 0:l.hasMoreBefore,hasMoreAfter:null==t||null===(f=t.response.data)||void 0===f?void 0:f.hasMoreAfter,topCursor:null===(d=e.response.data)||void 0===d?void 0:d.topCursor,bottomCursor:null==t||null===(p=t.response.data)||void 0===p?void 0:p.bottomCursor}}}))))))),[p]),{latestValue:{before:v,after:y,combined:m}}=Object(f.c)(g,V);return{cancelRequest:Object(a.useCallback)((()=>{null==v||v.abortController.abort(),null==y||y.abortController.abort()}),[v,y]),fetchLogEntriesAround:h,isRequestRunning:null!==(s=null==m?void 0:m.isRunning)&&void 0!==s&&s,isResponsePartial:null!==(u=null==m?void 0:m.isPartial)&&void 0!==u&&u,loaded:null==m?void 0:m.loaded,logEntriesAroundSearchResponses$:g,total:null==m?void 0:m.total}},V={before:void 0,after:void 0,combined:void 0},F={entries:[],topCursor:null,bottomCursor:null,hasMoreBefore:!0,hasMoreAfter:!0},N=200;function D({logViewReference:e,startTimestamp:t,endTimestamp:n,query:r,center:i,columns:s}){const[c,d]=l()(F),[p,h]=Object(a.useState)(!1),g=u()(t),v=u()(n),[y,m]=Object(a.useState)(r);Object(o.isEqual)(r,y)||m(r),Object(a.useEffect)((()=>{g&&g>t&&d({hasMoreBefore:!0})}),[g,t,d]),Object(a.useEffect)((()=>{v&&v({logViewReference:e,startTimestamp:t,endTimestamp:n,query:y,columnOverrides:s})),[s,n,y,e,t]),{fetchLogEntriesAround:w,isRequestRunning:_,logEntriesAroundSearchResponses$:S}=P(b);Object(f.f)(S,{next:({before:e,after:t,combined:n})=>{null==e.response.data&&null==(null==t?void 0:t.response.data)||n.isPartial||(d((e=>{var t,r;const i=p?F:e;return{...p?F:i,entries:n.entries,hasMoreAfter:null!==(t=n.hasMoreAfter)&&void 0!==t?t:i.hasMoreAfter,hasMoreBefore:null!==(r=n.hasMoreBefore)&&void 0!==r?r:i.hasMoreBefore,bottomCursor:n.bottomCursor,topCursor:n.topCursor,lastLoadedTime:new Date}})),p&&h(!1))}});const{fetchLogEntriesBefore:O,isRequestRunning:x,logEntriesBeforeSearchResponse$:j}=L(b);Object(f.f)(j,{next:({response:{data:e,isPartial:t}})=>{null==e||t||(d((t=>{var n,r,i;const o=p?F:t;return{...p?F:o,entries:[...e.entries,...o.entries],hasMoreBefore:null!==(n=e.hasMoreBefore)&&void 0!==n?n:o.hasMoreBefore,topCursor:null!==(r=e.topCursor)&&void 0!==r?r:o.topCursor,bottomCursor:null!==(i=o.bottomCursor)&&void 0!==i?i:e.bottomCursor,lastLoadedTime:new Date}})),p&&h(!1))}});const E=Object(a.useCallback)((e=>{if(null===c.topCursor&&c.hasMoreBefore)throw new Error("useLogStream: Cannot fetch previous entries.\nIt seems there are more entries available, but no cursor is set.\nEnsure you have called `fetchEntries` at least once.");(c.hasMoreBefore||null!=e&&e.force)&&null!==c.topCursor&&O(c.topCursor,{size:N,extendTo:null==e?void 0:e.extendTo})}),[O,c.topCursor,c.hasMoreBefore]),{fetchLogEntriesAfter:A,isRequestRunning:R,logEntriesAfterSearchResponse$:T}=I(b);Object(f.f)(T,{next:({response:{data:e,isPartial:t}})=>{null==e||t||(d((t=>{var n,r,i;const o=p?F:t;return{...p?F:o,entries:[...o.entries,...e.entries],hasMoreAfter:null!==(n=e.hasMoreAfter)&&void 0!==n?n:o.hasMoreAfter,topCursor:null!==(r=o.topCursor)&&void 0!==r?r:e.topCursor,bottomCursor:null!==(i=e.bottomCursor)&&void 0!==i?i:o.bottomCursor,lastLoadedTime:new Date}})),p&&h(!1))}});const C=Object(a.useCallback)((e=>{if(null===c.bottomCursor&&c.hasMoreAfter)throw new Error("useLogStream: Cannot fetch next entries. No cursor is set.\nEnsure you have called `fetchEntries` at least once.");(c.hasMoreAfter||null!=e&&e.force)&&null!==c.bottomCursor&&A(c.bottomCursor,{size:N,extendTo:null==e?void 0:e.extendTo})}),[A,c.bottomCursor,c.hasMoreAfter]),k=Object(a.useCallback)((()=>{d(F),i?w(i,N):O("last",{size:N})}),[i,w,O,d]),M=Object(a.useCallback)((()=>{h(!0),O("last",{size:N})}),[O]),V=Object(a.useMemo)((()=>_||null==c.bottomCursor&&null==c.topCursor&&x),[_,x,c.bottomCursor,c.topCursor]),D=Object(a.useMemo)((()=>x||R),[R,x]);return{...c,fetchEntries:k,fetchNextEntries:C,fetchPreviousEntries:E,fetchNewestEntries:M,isLoadingMore:D,isReloading:V}}const[U,q]=i()(D)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_GUARD_TYPE="xstate.guard",t.EMPTY_ACTIVITY_MAP={},t.STATE_DELIMITER=".",t.TARGETLESS_KEY=""},function(e,t,n){e.exports=n(23)(1294)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.useInterpret=t.useIdleInterpreter=void 0;var a=n(1),s=n(70),u=n(15),c=n(56);function l(e,t){var n=(0,c.default)((function(){return"function"==typeof e?e():e})),o=t.context,a=t.guards,l=t.actions,f=t.activities,d=t.services,p=t.delays,h=(t.state,i(t,["context","guards","actions","activities","services","delays","state"])),g=(0,c.default)((function(){var e={context:o,guards:a,actions:l,activities:f,services:d,delays:p},t=n.withConfig(e,(function(){return r(r({},n.context),o)}));return(0,u.interpret)(t,h)}));return(0,s.default)((function(){Object.assign(g.machine.options.actions,l),Object.assign(g.machine.options.guards,a),Object.assign(g.machine.options.activities,f),Object.assign(g.machine.options.services,d),Object.assign(g.machine.options.delays,p)}),[l,a,f,d,p]),g}t.useIdleInterpreter=l,t.useInterpret=function(e){for(var t=[],n=1;n0;){var t=c.current.shift();e.send(t)}}),[e]),[h,g]}},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/observabilityShared/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(38),i=n(0);const o=i.type({time:i.number,tiebreaker:i.number});i.intersection([o,i.partial({gid:i.string,fromAutoReload:i.boolean})]);const a=(e,t)=>(n,i)=>function(e,t,n=r.ascending){const i=n(e.time,t.time);if(0===i){const r=n(e.tiebreaker,t.tiebreaker);return 0===r&&void 0!==e.gid&&void 0!==t.gid?n(e.gid,t.gid):r}return i}(e(n),i,t),s=(e,t)=>{const n=a(e,t),i=Object(r.bisector)(n);return(e,t)=>{const r=i.left(e,t);return r>=e.length||0!==n(e[r],t)?null:r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e){var t=r.useRef();return r.useEffect((function(){t.current=e})),t.current}},function(e,t,n){"use strict";n.d(t,"d",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return d}));var r=n(1),i=n(13),o=n(2);const a=e=>i.css` font-family: ${e=>e.theme.eui.euiCodeFontFamily}; font-size: ${t=>{switch(e){case"large":return t.theme.eui.euiFontSizeM;case"medium":return t.theme.eui.euiFontSizeS;case"small":return t.theme.eui.euiFontSizeXS;default:return t.theme.eui.euiFontSize}}}; line-height: ${e=>e.theme.eui.euiLineHeight}; `,s=i.css` background-color: ${e=>e.theme.eui.euiFocusBackgroundColor}; `,u=i.css` background-color: ${e=>e.theme.eui.euiColorHighlight}; `,c=i.css` overflow: visible; white-space: pre-wrap; word-break: break-all; `,l=i.css` overflow: hidden; white-space: pre; `,f=i.css` overflow: hidden; white-space: nowrap; `,d=e=>{const[t,n]=Object(r.useState)({height:0,width:0}),i=Object(r.useCallback)((e=>{if(!e)return;const t=e.getBoundingClientRect();n({height:t.height,width:t.width})}),[]);return{CharacterDimensionsProbe:Object(r.useMemo)((()=>()=>Object(o.jsx)(p,{scale:e,ref:i},"X")),[i,e]),dimensions:t}},p=i.euiStyled.div.attrs((()=>({"aria-hidden":!0})))` visibility: hidden; position: absolute; height: auto; width: auto; padding: 0; margin: 0; ${e=>a(e.scale)}; `},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(76),i=n.n(r),o=n(1),a=n.n(o),s=n(13),u=n(8),c=n(30);const l=Object.assign(((e,t)=>n=>{const r=("function"==typeof(i=e)?i:(e,t)=>Object(u.get)(e,i,t))(n,l.default);var i;if(void 0!==r)return t instanceof Map?t.get(r):Object(u.get)(t,r)}),{default:Symbol("default")}),f=(e,t,n,r)=>Object(c.parseToHsl)(e).lightness>.5?Object(c.shade)(1-r,t):Object(c.tint)(1-n,t),d=(e,t)=>{const n=Object(c.getLuminance)(e),r=Object(c.getLuminance)(t);return parseFloat((n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)).toFixed(2))},p=(e,t,n)=>d(e,t)>d(e,n)?t:n;var h=n(2);const g=s.euiStyled.mark` color: ${e=>p(e.theme.eui.euiColorAccent,e.theme.eui.euiColorEmptyShade,e.theme.eui.euiColorDarkestShade)}; background-color: ${e=>e.theme.eui.euiColorAccent}; outline: 1px solid ${e=>e.theme.eui.euiColorAccent}; }; `,v=s.euiStyled.mark` color: ${e=>p(f(e.theme.eui.euiTextColor,e.theme.eui.euiColorAccent,.7,.5),e.theme.eui.euiColorEmptyShade,e.theme.eui.euiColorDarkestShade)}; background-color: ${e=>f(e.theme.eui.euiTextColor,e.theme.eui.euiColorAccent,.7,.5)}; outline: 1px solid ${e=>f(e.theme.eui.euiTextColor,e.theme.eui.euiColorAccent,.7,.5)}; }; `,y=(e,t,n)=>t.reduce(((e,t,r)=>{const i=e[e.length-1];if("string"!=typeof i)return e;const o=i.indexOf(t);return o>-1?[...e.slice(0,e.length-1),i.slice(0,o),Object(h.jsx)(n,{key:`highlight-${t}-${r}`},t),i.slice(o+t.length)]:e}),[e]),m=a.a.memo((({highlightTerms:e,isActiveHighlight:t,value:n,render:r})=>r?Object(h.jsx)(a.a.Fragment,null,r(1===n.length?n[0]:n)):1===n.length?Object(h.jsx)(a.a.Fragment,null,y(b(n[0]),e,t?g:v)):n.length>1?Object(h.jsx)("ul",{"data-test-subj":"LogEntryFieldValues"},n.map(((n,r)=>Object(h.jsx)(w,{key:`LogEntryFieldValue-${r}`,"data-test-subj":`LogEntryFieldValue-${r}`},y(b(n),e,t?g:v))))):null)),b=e=>"string"==typeof e?e:i()(e),w=s.euiStyled.li` display: inline; &:not(:last-child) { margin-right: 1ex; &::after { content: ','; } } `},function(e,t){e.exports=__kbnSharedDeps__.TsLib},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(42),i=n.n(r),o=n(1),a=n(27);function s(e,t){const[n,r]=Object(a.useUiSetting$)(e);return[Object(o.useMemo)((()=>n||t),[n,t]),r]}const u=(e,{format:t="dateTime",fallbackFormat:n}={})=>{const r=s("dateFormat:scaled")[0]||[["",void 0]],a={dateTime:s("dateFormat")[0],time:r.find((([e])=>""===e))[1]}[t];return Object(o.useMemo)((()=>((e,t,n="Y-MM-DD HH:mm:ss.SSS")=>t?i()(e).format(t):i()(e).format(n))(e,a,n)),[e,a,n])}},function(e,t){e.exports=__kbnSharedDeps__.KbnDatemath},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=[];t.consume=function(e){return e(r[r.length-1])},t.provide=function(e,t){r.push(e);var n=t(e);return r.pop(),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(20),o=function(e){return"atomic"===e.type||"final"===e.type};function a(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function s(e){return a(e).filter((function(e){return"history"!==e.type}))}function u(e,t){var n,i,o,a,u,c,f,d,p=l(new Set(e)),h=new Set(t);try{for(var g=r.__values(h),v=g.next();!v.done;v=g.next())for(var y=(E=v.value).parent;y&&!h.has(y);)h.add(y),y=y.parent}catch(e){n={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(n)throw n.error}}var m=l(h);try{for(var b=r.__values(h),w=b.next();!w.done;w=b.next())if("compound"!==(E=w.value).type||m.get(E)&&m.get(E).length){if("parallel"===E.type)try{for(var _=(u=void 0,r.__values(s(E))),S=_.next();!S.done;S=_.next()){var O=S.value;h.has(O)||(h.add(O),p.get(O)?p.get(O).forEach((function(e){return h.add(e)})):O.initialStateNodes.forEach((function(e){return h.add(e)})))}}catch(e){u={error:e}}finally{try{S&&!S.done&&(c=_.return)&&c.call(_)}finally{if(u)throw u.error}}}else p.get(E)?p.get(E).forEach((function(e){return h.add(e)})):E.initialStateNodes.forEach((function(e){return h.add(e)}))}catch(e){o={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(o)throw o.error}}try{for(var x=r.__values(h),j=x.next();!j.done;j=x.next()){var E;for(y=(E=j.value).parent;y&&!h.has(y);)h.add(y),y=y.parent}}catch(e){f={error:e}}finally{try{j&&!j.done&&(d=x.return)&&d.call(x)}finally{if(f)throw f.error}}return h}function c(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(o(r))return r.key}var i={};return n.forEach((function(e){i[e.key]=c(e,t)})),i}function l(e){var t,n,i=new Map;try{for(var o=r.__values(e),a=o.next();!a.done;a=o.next()){var s=a.value;i.has(s)||i.set(s,[]),s.parent&&(i.has(s.parent)||i.set(s.parent,[]),i.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function f(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}t.getAdjList=l,t.getAllChildren=a,t.getAllStateNodes=function e(t){var n=[t];return o(t)?n:n.concat(i.flatten(s(t).map(e)))},t.getChildren=s,t.getConfiguration=u,t.getMeta=function(e){return void 0===e&&(e=[]),e.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})},t.getTagsFromConfiguration=function(e){return new Set(i.flatten(e.map((function(e){return e.tags}))))},t.getValue=function(e,t){return c(e,l(u([e],t)))},t.has=f,t.isInFinalState=function e(t,n){return"compound"===n.type?s(n).some((function(e){return"final"===e.type&&f(t,e)})):"parallel"===n.type&&s(n).every((function(n){return e(t,n)}))},t.isLeafNode=o,t.nextEvents=function(e){return r.__spreadArray([],r.__read(new Set(i.flatten(r.__spreadArray([],r.__read(e.map((function(e){return e.ownEvents}))),!1)))),!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(40),i=n(46),o=n(20);t.fromPromise=function(e){var t={error:void 0,data:void 0,status:"pending"};return{transition:function(e,t,n){var i=n.parent,o=n.id,a=n.observers;switch(t.type){case"fulfill":return null==i||i.send(r.doneInvoke(o,t.data)),{error:void 0,data:t.data,status:"fulfilled"};case"reject":return null==i||i.send(r.error(o,t.error)),a.forEach((function(e){e.error(t.error)})),{error:t.error,data:void 0,status:"rejected"};default:return e}},initialState:t,start:function(n){var r=n.self;return e().then((function(e){r.send({type:"fulfill",data:e})}),(function(e){r.send({type:"reject",error:e})})),t}}},t.fromReducer=function(e,t){return{transition:e,initialState:t}},t.spawnBehavior=function(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,a=[],s=!1,u=i.toActorRef({id:t.id,send:function(t){a.push(t),function(){if(!s){for(s=!0;a.length>0;){var t=a.shift();n=e.transition(n,t,c),r.forEach((function(e){return e.next(n)}))}s=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,i){var a=o.toObserver(e,t,i);return r.add(a),a.next(n),{unsubscribe:function(){r.delete(a)}}}}),c={parent:t.parent,self:u,id:t.id||"anonymous",observers:r};return n=e.start?e.start(c):n,u}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(20),o=n(47),a=n(41),s=n(40),u=n(24),c=n(53),l=n(67),f=n(46),d=n(86),p="",h="*",g={},v=function(e){return"#"===e[0]},y=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},m=function(){function e(t,n,o,a){void 0===o&&(o="context"in t?t.context:void 0);var f,h=this;this.config=t,this._context=o,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(y(),n),this.parent=null==a?void 0:a.parent,this.key=this.config.key||(null==a?void 0:a.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:c.STATE_DELIMITER),this.id=this.config.id||r.__spreadArray([this.machine.key],r.__read(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(f=this.config.schema)&&void 0!==f?f:{},this.description=this.config.description,u.IS_PRODUCTION||i.warn(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?i.mapValues(this.config.states,(function(t,n){var i,o=new e(t,{},void 0,{parent:h,key:n});return Object.assign(h.idMap,r.__assign(((i={})[o.id]=o,i),o.idMap)),o})):g;var v=0;!function e(t){var n,i;t.order=v++;try{for(var o=r.__values(l.getAllChildren(t)),a=o.next();!a.done;a=o.next())e(a.value)}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===p})):p in this.config.on),this.strict=!!this.config.strict,this.onEntry=i.toArray(this.config.entry||this.config.onEntry).map((function(e){return s.toActionObject(e)})),this.onExit=i.toArray(this.config.exit||this.config.onExit).map((function(e){return s.toActionObject(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=i.toArray(this.config.invoke).map((function(e,t){var n,o;if(i.isMachine(e)){var a=i.createInvokeId(h.id,t);return h.machine.options.services=r.__assign(((n={})[a]=e,n),h.machine.options.services),d.toInvokeDefinition({src:a,id:a})}if(i.isString(e.src))return a=e.id||i.createInvokeId(h.id,t),d.toInvokeDefinition(r.__assign(r.__assign({},e),{id:a,src:e.src}));if(i.isMachine(e.src)||i.isFunction(e.src))return a=e.id||i.createInvokeId(h.id,t),h.machine.options.services=r.__assign(((o={})[a]=e.src,o),h.machine.options.services),d.toInvokeDefinition(r.__assign(r.__assign({id:a},e),{src:a}));var s=e.src;return d.toInvokeDefinition(r.__assign(r.__assign({id:i.createInvokeId(h.id,t)},e),{src:s}))})),this.activities=i.toArray(this.config.activities).concat(this.invoke).map((function(e){return s.toActivityDefinition(e)})),this.transition=this.transition.bind(this),this.tags=i.toArray(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||l.getAllStateNodes(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var i=this.options,o=i.actions,a=i.activities,s=i.guards,u=i.services,c=i.delays;return new e(this.config,{actions:r.__assign(r.__assign({},o),t.actions),activities:r.__assign(r.__assign({},a),t.activities),guards:r.__assign(r.__assign({},s),t.guards),services:r.__assign(r.__assign({},u),t.services),delays:r.__assign(r.__assign({},c),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return i.isFunction(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:i.mapValues(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===p,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===h}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=i.isFunction(t)?"".concat(e.id,":delay[").concat(n,"]"):t,o=s.after(r,e.id);return e.onEntry.push(s.send(o,{delay:t})),e.onExit.push(s.cancel(o)),o};return(i.isArray(t)?t.map((function(e,t){var i=n(e.delay,t);return r.__assign(r.__assign({},e),{event:i})})):i.flatten(Object.keys(t).map((function(e,o){var a=t[e],s=i.isString(a)?{target:a}:a,u=isNaN(+e)?e:+e,c=n(u,o);return i.toArray(s).map((function(e){return r.__assign(r.__assign({},e),{event:c,delay:u})}))})))).map((function(t){var n=t.delay;return r.__assign(r.__assign({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var a=e instanceof o.State?e.value:i.toStateValue(e,this.delimiter);if(i.isString(a)){var s=this.getStateNode(a).initial;return void 0!==s?this.getStateNodes(((t={})[a]=s,t)):[this,this.states[a]]}var u=Object.keys(a),c=[this];return c.push.apply(c,r.__spreadArray([],r.__read(i.flatten(u.map((function(e){return n.getStateNode(e).getStateNodes(a[e])})))),!1)),c},e.prototype.handles=function(e){var t=i.getEventType(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof o.State?e:o.State.create(e),n=Array.from(l.getConfiguration([],this.getStateNodes(t.value)));return new o.State(r.__assign(r.__assign({},t),{value:this.resolve(t.value),configuration:n,done:l.isInFinalState(n,this),tags:l.getTagsFromConfiguration(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),i=this.getStateNode(r[0])._transition(e[r[0]],t,n);return i&&i.transitions.length?i:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var o,a,s={};try{for(var u=r.__values(Object.keys(e)),c=u.next();!c.done;c=u.next()){var l=c.value,f=e[l];if(f){var d=this.getStateNode(l)._transition(f,t,n);d&&(s[l]=d)}}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}var p=Object.keys(s).map((function(e){return s[e]})),h=i.flatten(p.map((function(e){return e.transitions})));if(!p.some((function(e){return e.transitions.length>0})))return this.next(t,n);var g=i.flatten(Object.keys(s).map((function(e){return s[e].configuration})));return{transitions:h,exitSet:i.flatten(p.map((function(e){return e.exitSet}))),configuration:g,source:t,actions:i.flatten(Object.keys(s).map((function(e){return s[e].actions})))}},e.prototype._transition=function(e,t,n){return i.isString(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,i.toSCXMLEvent(t))},e.prototype.next=function(e,t){var n,o,a,s=this,u=t.name,c=[],l=[];try{for(var f=r.__values(this.getCandidates(u)),d=f.next();!d.done;d=f.next()){var p=d.value,h=p.cond,g=p.in,y=e.context,m=!g||(i.isString(g)&&v(g)?e.matches(i.toStateValue(this.getStateNodeById(g).path,this.delimiter)):i.matchesState(i.toStateValue(g,this.delimiter),i.path(this.path.slice(0,-2))(e.value))),b=!1;try{b=!h||i.evaluateGuard(this.machine,h,y,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(u,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(b&&m){void 0!==p.target&&(l=p.target),c.push.apply(c,r.__spreadArray([],r.__read(p.actions),!1)),a=p;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(a){if(!l.length)return{transitions:[a],exitSet:[],configuration:e.value?[this]:[],source:e,actions:c};var w=i.flatten(l.map((function(t){return s.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[a],exitSet:a.internal?[]:i.flatten(l.map((function(e){return s.getPotentiallyReenteringNodes(e)}))),configuration:w,source:e,actions:c}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order0,w=b?e.configuration:t?t.configuration:[],_=l.isInFinalState(w,this),S=b?l.getValue(this.machine,m):void 0,O=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,x=this.getActions(new Set(w),_,e,n,c,t,u),j=t?r.__assign({},t.activities):{};try{for(var E=r.__values(x),I=E.next();!I.done;I=E.next()){var A=I.value;try{for(var R=(g=void 0,r.__values(A.actions)),T=R.next();!T.done;T=R.next()){var C=T.value;C.type===a.start?j[C.activity.id||C.activity.type]=C:C.type===a.stop&&(j[C.activity.id||C.activity.type]=!1)}}catch(e){g={error:e}}finally{try{T&&!T.done&&(v=R.return)&&v.call(R)}finally{if(g)throw g.error}}}}catch(e){d={error:e}}finally{try{I&&!I.done&&(h=E.return)&&h.call(E)}finally{if(d)throw d.error}}var L=r.__read(s.resolveActions(this,t,n,c,x,u,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),k=L[0],M=L[1],P=r.__read(i.partition(k,i.isRaisableAction),2),V=P[0],F=P[1],N=k.filter((function(e){var t;return e.type===a.start&&(null===(t=e.activity)||void 0===t?void 0:t.type)===a.invoke})),D=N.reduce((function(e,t){return e[t.activity.id]=f.createInvocableActor(t.activity,y.machine,M,c),e}),t?r.__assign({},t.children):{}),U=new o.State({value:S||t.value,context:M,_event:c,_sessionid:t?t._sessionid:null,historyValue:S?O?i.updateHistoryValue(O,S):void 0:t?t.historyValue:void 0,history:!S||e.source?t:void 0,actions:S?F:[],activities:S?j:t?t.activities:{},events:[],configuration:w,transitions:e.transitions,children:D,done:_,tags:l.getTagsFromConfiguration(w),machine:this}),q=n!==M;U.changed=c.name===a.update||q;var z=U.history;z&&delete z.history;var W=!_&&(this._transient||m.some((function(e){return e._transient})));if(!(b||W&&c.name!==p))return U;var $=U;if(!_)for(W&&($=this.resolveRaisedTransition($,{type:a.nullEvent},c,u));V.length;){var B=V.shift();$=this.resolveRaisedTransition($,B._event,c,u)}var H=$.changed||(z?!!$.actions.length||q||typeof z.value!=typeof $.value||!o.stateValuesEqual($.value,z.value):void 0);return $.changed=H,$.history=z,$},e.prototype.getStateNode=function(e){if(v(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=v(e)?e.slice("#".length):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&v(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=i.toStatePath(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||g;switch(this.type){case"parallel":return i.mapValues(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):g}));case"compound":if(i.isString(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?i.mapValues(e,(function(e,t){return e?n.getStateNode(t).resolve(e):g})):this.initialStateValue||{};default:return e||g}},e.prototype.getResolvedPath=function(e){if(v(e)){var t=this.machine.idMap[e.slice("#".length)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return i.toStatePath(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=i.mapFilterValues(this.states,(function(e){return e.initialStateValue||g}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=l.isLeafNode(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=i.isString(t.target)&&v(t.target)?i.pathToStateValue(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;if(l.isLeafNode(this))return[this];if("compound"===this.type&&!this.initial)return u.IS_PRODUCTION||i.warn(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var t=i.toStatePaths(this.initialStateValue);return i.flatten(t.map((function(t){return e.getFromRelativePath(t)})))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=r.__read(e),n=t[0],i=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(i)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:i.mapFilterValues(this.states,(function(t,n){if(!e)return t.historyValue();var r=i.isString(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?i.flatten(i.toStatePaths(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o=i.nestedPath(n.path,"states")(e).current;return i.isString(o)?[n.getStateNode(o)]:i.flatten(i.toStatePaths(o).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=i.flatten(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,i;if(this.__cache.events)return this.__cache.events;var o=this.states,a=new Set(this.ownEvents);if(o)try{for(var s=r.__values(Object.keys(o)),u=s.next();!u.done;u=s.next()){var c=o[u.value];if(c.states)try{for(var l=(n=void 0,r.__values(c.events)),f=l.next();!f.done;f=l.next()){var d=f.value;a.add("".concat(d))}}catch(e){n={error:e}}finally{try{f&&!f.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!i.isString(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=i.normalizeTarget(e.target),o="internal"in e?e.internal:!n||n.some((function(e){return i.isString(e)&&e[0]===t.delimiter})),a=this.machine.options.guards,u=this.resolveTarget(n),c=r.__assign(r.__assign({},e),{actions:s.toActionObjects(i.toArray(e.actions)),cond:i.toGuard(e.cond,a),target:u,source:this,internal:o,eventType:e.event,toJSON:function(){return r.__assign(r.__assign({},c),{target:c.target?c.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return c},e.prototype.formatTransitions=function(){var e,t,n,o=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var a=this.config.on,c=a[h],l=void 0===c?[]:c,f=r.__rest(a,["*"]);n=i.flatten(Object.keys(f).map((function(e){u.IS_PRODUCTION||e!==p||i.warn(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(o.id,'".'));var t=i.toTransitionConfigArray(e,f[e]);return u.IS_PRODUCTION||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(i.isString(e.target)||i.isMachine(e.target))})),o=t===p?"the transient event":"event '".concat(t,"'");i.warn(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(o,e,t),t})).concat(i.toTransitionConfigArray(h,l)))}else n=[];var d=this.config.always?i.toTransitionConfigArray("",this.config.always):[],g=this.config.onDone?i.toTransitionConfigArray(String(s.done(this.id)),this.config.onDone):[];u.IS_PRODUCTION||i.warn(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var v=i.flatten(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,r.__spreadArray([],r.__read(i.toTransitionConfigArray(String(s.doneInvoke(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,r.__spreadArray([],r.__read(i.toTransitionConfigArray(String(s.error(e.id)),e.onError)),!1)),t}))),y=this.after,m=i.flatten(r.__spreadArray(r.__spreadArray(r.__spreadArray(r.__spreadArray([],r.__read(g),!1),r.__read(v),!1),r.__read(n),!1),r.__read(d),!1).map((function(e){return i.toArray(e).map((function(e){return o.formatTransition(e)}))})));try{for(var b=r.__values(y),w=b.next();!w.done;w=b.next()){var _=w.value;m.push(_)}}catch(t){e={error:t}}finally{try{w&&!w.done&&(t=b.return)&&t.call(b)}finally{if(e)throw e.error}}return m},e}();t.StateNode=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1).useLayoutEffect;t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSelector=void 0;var r=n(1),i=n(54),o=n(57),a=n(48),s=function(e,t){return e===t};t.useSelector=function(e,t,n,u){void 0===n&&(n=s);var c=(0,r.useRef)(null),l=(0,r.useCallback)((function(t){return e.subscribe(t).unsubscribe}),[e]),f=(0,r.useCallback)((function(){return u?u(e):function(e,t){if((0,a.isService)(e)){if(0===e.status&&t.current)return t.current;var n=(0,a.getServiceSnapshot)(e);return t.current=0===e.status?n:null,n}return(0,o.isActorWithState)(e)?e.state:void 0}(e,c)}),[e,u]);return(0,i.useSyncExternalStoreWithSelector)(l,f,f,t,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(){var e=r.useRef(!1),t=r.useCallback((function(){return e.current}),[]);return r.useEffect((function(){return e.current=!0,function(){e.current=!1}})),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return log_views_client_LogViewsClient})),n.d(t,"b",(function(){return log_views_service_LogViewsService}));var r=n(0),i=n(3),o=n(9);const a=e=>`/api/infra/log_views/${e}`;var s=n(4),u=n(10);class log_views_client_LogViewsClient{constructor(e,t,n,r){this.dataViews=e,this.http=t,this.search=n,this.config=r}async getLogView(e){if("log-view-inline"===e.type)return{...e,origin:"inline"};const{logViewId:t}=e,n=await this.http.get(a(t),{version:"1"}).catch((e=>{throw new s.c(`Failed to fetch log view "${t}": ${e}`)})),{data:r}=Object(u.b)(o.d,(e=>new s.c(`Failed to decode log view "${t}": ${e}"`)))(n);return r}async getResolvedLogView(e){const t=await this.getLogView(e);return await this.resolveLogView(t.id,t.attributes)}async getResolvedLogViewStatus(e){return{index:await Object(i.lastValueFrom)(this.search({params:{ignore_unavailable:!0,allow_no_indices:!0,index:e.indices,size:0,terminate_after:1,track_total_hits:1}})).then((({rawResponse:e})=>{if(e._shards.total<=0)return"missing";const t=c(e.hits.total);return("number"==typeof t?t>0:t.value>0)?"available":"empty"}),(t=>{if(404===t.status)return"missing";throw new s.d(`Failed to check status of log indices of "${e.indices}": ${t}`)}))}}async putLogView(e,t){if("log-view-inline"===e.type){const{id:n}=e,i=Object(u.b)(r.partial(s.l.type.props),(e=>new s.e(`Failed to decode inline log view "${n}": ${e}"`)))(t);return{id:n,attributes:{...e.attributes,...i},origin:"inline"}}{const{logViewId:n}=e,r=await this.http.put(a(n),{body:JSON.stringify(o.k.encode({attributes:t})),version:"1"}).catch((e=>{throw new s.e(`Failed to write log view "${n}": ${e}`)})),{data:i}=Object(u.b)(o.d,(e=>new s.e(`Failed to decode written log view "${n}": ${e}"`)))(r);return i}}async resolveLogView(e,t){return await Object(s.q)(e,t,this.dataViews,this.config)}}const c=Object(u.b)(r.union([r.number,r.type({value:r.number})]));var l=n(33),f=n.n(l);class log_views_service_LogViewsService{constructor(){f()(this,"logViewsStaticConfig",s.h)}setup(){return{setLogViewsStaticConfig:e=>{this.logViewsStaticConfig=e}}}start({dataViews:e,http:t,search:n}){return{client:new log_views_client_LogViewsClient(e,t,n.search,this.logViewsStaticConfig)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i={timeout:1e4};t.waitFor=function(e,t,n){var o=r.__assign(r.__assign({},i),n);return new Promise((function(n,r){var i=!1,a=o.timeout===1/0?void 0:setTimeout((function(){u.unsubscribe(),r(new Error("Timeout of ".concat(o.timeout," ms exceeded")))}),o.timeout),s=function(){clearTimeout(a),i=!0,null==u||u.unsubscribe()},u=e.subscribe({next:function(e){t(e)&&(s(),n(e))},error:function(e){s(),r(e)},complete:function(){s(),r(new Error("Actor terminated without satisfying predicate"))}});i&&u.unsubscribe()}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e){void 0===e&&(e={});var t=r.useState(e),n=t[0],i=t[1];return[n,r.useCallback((function(e){i((function(t){return Object.assign({},t,e instanceof Function?e(t):e)}))}),[i])]}},function(e,t,n){var r="undefined"!=typeof JSON?JSON:n(95);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n=t.space||"";"number"==typeof n&&(n=Array(n+1).join(" "));var a,s="boolean"==typeof t.cycles&&t.cycles,u=t.replacer||function(e,t){return t},c=t.cmp&&(a=t.cmp,function(e){return function(t,n){var r={key:t,value:e[t]},i={key:n,value:e[n]};return a(r,i)}}),l=[];return function e(t,a,f,d){var p=n?"\n"+new Array(d+1).join(n):"",h=n?": ":":";if(f&&f.toJSON&&"function"==typeof f.toJSON&&(f=f.toJSON()),void 0!==(f=u.call(t,a,f))){if("object"!=typeof f||null===f)return r.stringify(f);if(i(f)){for(var g=[],v=0;va.length)&&(a=c)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return e[a]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(47);t.matchState=function(e,t,n){var o,a,s=i.State.from(e,e instanceof i.State?e.context:void 0);try{for(var u=r.__values(t),c=u.next();!c.done;c=u.next()){var l=r.__read(c.value,2),f=l[0],d=l[1];if(s.matches(f))return d(s)}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}return n(s)}},function(e,t,n){"use strict";function r(e){return e}Object.defineProperty(t,"__esModule",{value:!0});var i=r;t.createSchema=r,t.t=i},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.useMachine=void 0;var i=n(1),o=n(54),a=n(15),s=n(55),u=n(48);function c(e){return e}t.useMachine=function(e){for(var t=[],n=1;n component."));return e}return l.displayName="ActorProvider(".concat(e.id,")"),{Provider:l,useActorRef:f,useActor:function(){var e=f();return(0,a.useActor)(e)},useSelector:function(e,t){var n=f();return(0,s.useSelector)(n,e,t)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(63),i=n(1),o=r.__importDefault(n(94));t.default=function(e){var t=i.useRef(e);t.current=e,o.default((function(){return function(){return t.current()}}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e){r.useEffect(e,[])}},function(e,t,n){t.parse=n(96),t.stringify=n(97)},function(e,t){var n,r,i,o,a={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},s=function(e){throw{name:"SyntaxError",message:e,at:n,text:i}},u=function(e){return e&&e!==r&&s("Expected '"+e+"' instead of '"+r+"'"),r=i.charAt(n),n+=1,r},c=function(){var e,t="";for("-"===r&&(t="-",u("-"));r>="0"&&r<="9";)t+=r,u();if("."===r)for(t+=".";u()&&r>="0"&&r<="9";)t+=r;if("e"===r||"E"===r)for(t+=r,u(),"-"!==r&&"+"!==r||(t+=r,u());r>="0"&&r<="9";)t+=r,u();if(e=+t,isFinite(e))return e;s("Bad number")},l=function(){var e,t,n,i="";if('"'===r)for(;u();){if('"'===r)return u(),i;if("\\"===r)if(u(),"u"===r){for(n=0,t=0;t<4&&(e=parseInt(u(),16),isFinite(e));t+=1)n=16*n+e;i+=String.fromCharCode(n)}else{if("string"!=typeof a[r])break;i+=a[r]}else i+=r}s("Bad string")},f=function(){for(;r&&r<=" ";)u()};o=function(){switch(f(),r){case"{":return function(){var e,t={};if("{"===r){if(u("{"),f(),"}"===r)return u("}"),t;for(;r;){if(e=l(),f(),u(":"),Object.hasOwnProperty.call(t,e)&&s('Duplicate key "'+e+'"'),t[e]=o(),f(),"}"===r)return u("}"),t;u(","),f()}}s("Bad object")}();case"[":return function(){var e=[];if("["===r){if(u("["),f(),"]"===r)return u("]"),e;for(;r;){if(e.push(o()),f(),"]"===r)return u("]"),e;u(","),f()}}s("Bad array")}();case'"':return l();case"-":return c();default:return r>="0"&&r<="9"?c():function(){switch(r){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}s("Unexpected '"+r+"'")}()}},e.exports=function(e,t){var a;return i=e,n=0,r=" ",a=o(),f(),r&&s("Syntax error"),"function"==typeof t?function e(n,r){var i,o,a=n[r];if(a&&"object"==typeof a)for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(void 0!==(o=e(a,i))?a[i]=o:delete a[i]);return t.call(n,r,a)}({"":a},""):a}},function(e,t){var n,r,i,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(e){return o.lastIndex=0,o.test(e)?'"'+e.replace(o,(function(e){var t=a[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function u(e,t){var o,a,c,l,f,d=n,p=t[e];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(e)),"function"==typeof i&&(p=i.call(t,e,p)),typeof p){case"string":return s(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(n+=r,f=[],"[object Array]"===Object.prototype.toString.apply(p)){for(l=p.length,o=0;o{var o;return Object(i.jsx)(r.Suspense,{fallback:null!==(o=t.fallback)&&void 0!==o?o:null},Object(i.jsx)(n,e))}}var a=n(33),s=n.n(a),u=n(73);class plugin_LogsSharedPlugin{constructor(){s()(this,"logViews",void 0),this.logViews=new u.b}setup(){return{logViews:this.logViews.setup()}}start(e,t){return{logViews:this.logViews.start({http:e.http,dataViews:t.dataViews,search:t.data.search})}}stop(){}}var c=n(45),l=n(52),f=n(39),d=n(29),p=n.n(d),h=n(37),g=n.n(h),v=n(26),y=n(72),m=n.n(y);const b=({createPromise:e,onResolve:t=w,onReject:n=w,cancelPreviousOn:i="never",triggerOrThrow:o="whenMounted"},a)=>{const s=m()(),u=Object(r.useCallback)((()=>{switch(o){case"always":return!0;case"whenMounted":return s()}}),[s,o]),c=Object(r.useRef)([]),[l,f]=Object(r.useState)({state:"uninitialized"}),d=Object(r.useCallback)((()=>{f({state:"uninitialized"})}),[]),p=Object(r.useMemo)((()=>(...r)=>{let o;const a=new Promise(((e,t)=>{o=t})),s=c.current,l=()=>{s.forEach((e=>e.cancel()))},d=e(...r),p=Promise.race([d,a]);f({state:"pending",promise:p}),"creation"===i&&l();const h={cancel:()=>{o(new use_tracked_promise_CanceledPromiseError)},cancelSilently:()=>{o(new SilentCanceledPromiseError)},promise:p.then((e=>(["settlement","resolution"].includes(i)&&l(),c.current=c.current.filter((e=>e.promise!==h.promise)),t&&u()&&t(e),f((t=>"pending"===t.state&&t.promise===p?{state:"resolved",promise:h.promise,value:e}:t)),e)),(e=>{if(!(e instanceof SilentCanceledPromiseError)){if(["settlement","rejection"].includes(i)&&l(),c.current=c.current.filter((e=>e.promise!==h.promise)),u()){if(!n)throw e;n(e)}f((t=>"pending"===t.state&&t.promise===p?{state:"rejected",promise:p,value:e}:t))}}))};return c.current=[...c.current,h],h.promise.catch(w),h.promise}),a);return Object(r.useEffect)((()=>()=>{c.current.forEach((e=>e.cancelSilently()))}),[]),[l,p,d]};class use_tracked_promise_CanceledPromiseError extends Error{constructor(e){super(e),s()(this,"isCanceled",!0),Object.setPrototypeOf(this,new.target.prototype)}}class SilentCanceledPromiseError extends use_tracked_promise_CanceledPromiseError{}const w=()=>{};var _=n(10),S=n(9);var O=n(8);const x=100;function j(e,t){return Object(r.useMemo)((()=>e&&t?(t-e)/x:null),[e,t])}var E=n(35);const[I,A]=p()((({logViewReference:e,sourceVersion:t,centerCursor:n,size:i,filterQuery:o})=>{const[a,s]=Object(r.useState)([]),{visibleMidpoint:u,jumpToTargetPosition:c,startTimestamp:l,endTimestamp:d}=Object(f.b)(),p=g()(l,3e3),h=g()(d,3e3),{logEntryHighlights:y,logEntryHighlightsById:m,loadLogEntryHighlightsRequest:w}=((e,t,n,i,o,a,s,u)=>{const{services:c}=Object(v.a)(),[l,f]=Object(r.useState)([]),[d,p]=b({cancelPreviousOn:"resolution",createPromise:async()=>{if(!(n&&i&&o&&u.length))throw new Error("Skipping request: Insufficient parameters");return await(async(e,t)=>{const n=await t(S.a,{method:"POST",body:JSON.stringify(S.e.encode(e)),version:"1"});return Object(_.b)(S.f)(n)})({logView:e,startTimestamp:n,endTimestamp:i,center:o,size:a,query:s||void 0,highlightTerms:u},c.http.fetch)},onResolve:e=>{f(e.data)}},[e,n,i,o,a,s,u]);Object(r.useEffect)((()=>{f([])}),[u]),Object(r.useEffect)((()=>{u.filter((e=>e.length>0)).length&&n&&i?p():f([])}),[i,s,u,p,t,n]);const h=Object(r.useMemo)((()=>l.reduce(((e,t)=>t.entries.reduce(((e,t)=>{const n=e[t.id]||[];return{...e,[t.id]:[...n,t]}}),e)),{})),[l]);return{logEntryHighlights:l,logEntryHighlightsById:h,loadLogEntryHighlightsRequest:d}})(e,t,p,h,n,i,o,a),{logSummaryHighlights:x,loadLogSummaryHighlightsRequest:I}=((e,t,n,i,o,a)=>{const{services:s}=Object(v.a)(),[u,c]=Object(r.useState)([]),l=j(n,i),[f,d]=b({cancelPreviousOn:"resolution",createPromise:async()=>{if(!(n&&i&&l&&a.length))throw new Error("Skipping request: Insufficient parameters");return await(async(e,t)=>{const n=await t(S.b,{method:"POST",body:JSON.stringify(S.g.encode(e)),version:"1"});return Object(_.b)(S.h)(n)})({logView:e,startTimestamp:n,endTimestamp:i,bucketSize:l,query:o,highlightTerms:a},s.http.fetch)},onResolve:e=>{c(e.data)}},[e,n,i,l,o,a]),p=Object(r.useMemo)((()=>Object(O.debounce)(d,275)),[d]);return Object(r.useEffect)((()=>{c([])}),[a]),Object(r.useEffect)((()=>{a.filter((e=>e.length>0)).length&&n&&i?p():c([])}),[l,p,o,a,t,n,i]),{logSummaryHighlights:u,loadLogSummaryHighlightsRequest:f}})(e,t,p,h,o,a),{currentHighlightKey:A,hasPreviousHighlight:R,hasNextHighlight:T,goToPreviousHighlight:C,goToNextHighlight:L}=(({highlightTerms:e,jumpToTargetPosition:t,logEntryHighlights:n,visibleMidpoint:i})=>{const[o,a]=Object(r.useState)(null),s=Object(r.useMemo)((()=>n&&n.length>0?n[0].entries:[]),[n]);Object(r.useEffect)((()=>{a(null)}),[e]),Object(r.useEffect)((()=>{o&&t(o)}),[o,t]),Object(r.useEffect)((()=>{if(null===o&&s.length>0){const r=i?(e=Object(E.b)(s,i),t=0,n=s.length-1,Math.min(Math.max(e,t),n)):0,o=Object(E.c)(s[r]);a(o)}var e,t,n}),[o,s,a,i]);const u=Object(r.useMemo)((()=>o&&s.length>0?Object(E.a)(s,o):null),[o,s]),c=Object(r.useMemo)((()=>Object(O.isNumber)(u)&&u>0),[u]),l=Object(r.useMemo)((()=>s.length>0&&Object(O.isNumber)(u)&&u{if(s.length&&Object(O.isNumber)(u)){const e=u-1,t=Object(E.c)(s[e]);a(t)}}),[u,s]),d=Object(r.useCallback)((()=>{if(s.length>0&&Object(O.isNumber)(u)){const e=u+1,t=Object(E.c)(s[e]);a(t)}}),[u,s]);return{currentHighlightKey:o,hasPreviousHighlight:c,hasNextHighlight:l,goToPreviousHighlight:f,goToNextHighlight:d}})({visibleMidpoint:u,logEntryHighlights:y,highlightTerms:a,jumpToTargetPosition:c});return{highlightTerms:a,setHighlightTerms:s,logEntryHighlights:y,logEntryHighlightsById:m,logSummaryHighlights:x,loadLogEntryHighlightsRequest:w,loadLogSummaryHighlightsRequest:I,currentHighlightKey:A,hasPreviousHighlight:R,hasNextHighlight:T,goToPreviousHighlight:C,goToNextHighlight:L}}));var R=n(3),T=n(11);const C=(e,t,n,i)=>{const{services:o}=Object(v.a)(),a=j(t,n),[s,u]=Object(T.e)(k),{latestValue:c}=Object(T.c)(s,L);return Object(r.useEffect)((()=>{null!==t&&null!==n&&null!==a&&u([{logView:e,startTimestamp:t,endTimestamp:n,bucketSize:a,query:i},o.http.fetch])}),[a,n,i,u,o.http.fetch,e,t]),{buckets:c,start:t,end:n}},L=[],k=e=>e.pipe(Object(R.exhaustMap)((([e,t])=>(async(e,t)=>{const n=await t(S.c,{method:"POST",body:JSON.stringify(S.i.encode(e)),version:"1"});return Object(_.b)(S.j)(n)})(e,t))),Object(R.map)((({data:{buckets:e}})=>e))),M=({serializedParsedQuery:e,children:t})=>{const{logViewReference:n}=Object(c.c)(),{startTimestamp:r,endTimestamp:i}=Object(f.b)(),o=g()(r,3e3),a=g()(i,3e3),{buckets:s,start:u,end:l}=C(n,o,a,e);return t({buckets:s,start:u,end:l})};var P=n(44),V=n(51),F=n(25);function N(){return new plugin_LogsSharedPlugin}const D=o((()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,120)))),U=o((()=>n.e(2).then(n.bind(null,109)))),q=o((()=>n.e(4).then(n.bind(null,107)))),z=o((()=>Promise.resolve().then(n.bind(null,51)))),W=o((()=>n.e(5).then(n.bind(null,111)))),$=o((()=>n.e(6).then(n.bind(null,112)))),B=o((()=>n.e(7).then(n.bind(null,113)))),H=o((()=>n.e(8).then(n.bind(null,114)))),G=o((()=>n.e(9).then(n.bind(null,115)))),J=o((()=>n.e(0).then(n.bind(null,116))))},function(e,t){e.exports=__kbnSharedDeps__.KbnEsQuery},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/data/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/observabilityShared/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))}]);