/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.ingestPipelines_bundle_jsonpfunction=window.ingestPipelines_bundle_jsonpfunction||[]).push([[1],Array(31).concat([function(e,t,i){"use strict";var n,s=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),r=[];function a(e){for(var t=-1,i=0;ithis._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,i=e.offset,n=this._cellSizeAndPositionManager.getTotalSize(),s=this.getTotalSize(),r=this._getOffsetPercentage({containerSize:t,offset:i,totalSize:s});return Math.round(r*(s-n))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,i=void 0===t?"auto":t,n=e.containerSize,s=e.currentOffset,r=e.targetIndex;s=this._safeOffsetToOffset({containerSize:n,offset:s});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:n,currentOffset:s,targetIndex:r});return this._offsetToSafeOffset({containerSize:n,offset:a})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,i=e.offset;return i=this._safeOffsetToOffset({containerSize:t,offset:i}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:i})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,i=e.offset,n=e.totalSize;return n<=t?0:i/(n-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,i=e.offset,n=this._cellSizeAndPositionManager.getTotalSize(),s=this.getTotalSize();if(n===s)return i;var r=this._getOffsetPercentage({containerSize:t,offset:i,totalSize:n});return Math.round(r*(s-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,i=e.offset,n=this._cellSizeAndPositionManager.getTotalSize(),s=this.getTotalSize();if(n===s)return i;var r=this._getOffsetPercentage({containerSize:t,offset:i,totalSize:s});return Math.round(r*(n-t))}}]),e}());t.default=p},function(e,t,i){"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 n=i(62),s=i(38);function r(e,i){try{return t.right(e())}catch(e){return t.left(i(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(i){return null==i?t.left(e):t.right(i)}},t.tryCatch=r,t.parseJSON=function(e,t){return r((function(){return JSON.parse(e)}),t)},t.stringifyJSON=function(e,t){return r((function(){return JSON.stringify(e)}),t)},t.fromOption=function(e){return function(i){return"None"===i._tag?t.left(e()):t.right(i.value)}},t.fromPredicate=function(e,i){return function(n){return e(n)?t.right(n):t.left(i(n))}},t.fold=function(e,i){return function(n){return t.isLeft(n)?e(n.left):i(n.right)}},t.getOrElseW=function(e){return function(i){return t.isLeft(i)?e(i.left):i.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(i){return t.isLeft(i)?e(i.left):i}},t.filterOrElse=function(e,i){return t.chain((function(n){return e(n)?t.right(n):t.left(i(n))}))};var a=function(e,i){return s.pipe(e,t.map(i))},o=function(e,i){return s.pipe(e,t.ap(i))},l=function(e,i){return s.pipe(e,t.chain(i))},c=function(e,i,n){return s.pipe(e,t.reduce(i,n))},p=function(e){return function(i,n){var r=t.foldMap(e);return s.pipe(i,r(n))}},d=function(e,i,n){return s.pipe(e,t.reduceRight(i,n))},u=function(e){var i=t.traverse(e);return function(e,t){return s.pipe(e,i(t))}},f=function(e,i,n){return s.pipe(e,t.bimap(i,n))},g=function(e,i){return s.pipe(e,t.mapLeft(i))},m=function(e,i){return s.pipe(e,t.alt(i))},x=function(e,i){return s.pipe(e,t.extend(i))},b=function(e,i){return n.tailRec(i(e),(function(e){return t.isLeft(e)?t.right(t.left(e.left)):t.isLeft(e.right)?t.left(i(e.right.left)):t.right(t.right(e.right.right))}))};function h(e){return{concat:function(i,n){return t.isLeft(i)?i:t.isLeft(n)?n:t.right(e.concat(i.right,n.right))}}}function j(e){var i=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?i: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:i}:{left:i,right:t.right(e.right.right)}},filter:function(e,n){return t.isLeft(e)||n(e.right)?e:i},filterMap:function(e,n){if(t.isLeft(e))return e;var s=n(e.right);return"None"===s._tag?i:t.right(s.value)},partition:function(e,n){return t.isLeft(e)?{left:e,right:e}:n(e.right)?{left:i,right:t.right(e.right)}:{left:t.right(e.right),right:i}},partitionMap:function(e,n){if(t.isLeft(e))return{left:e,right:e};var s=n(e.right);return t.isLeft(s)?{left:t.right(s.left),right:i}:{left:i,right:t.right(s.right)}}}}function v(e){return{URI:t.URI,_E:void 0,map:a,ap:function(i,n){return t.isLeft(i)?t.isLeft(n)?t.left(e.concat(i.left,n.left)):i:t.isLeft(n)?n:t.right(i.right(n.right))},of:t.of}}function O(e){return{URI:t.URI,_E:void 0,map:a,alt:function(i,n){if(t.isRight(i))return i;var s=n();return t.isLeft(s)?t.left(e.concat(i.left,s.left)):s}}}function _(e,i){return{concat:function(n,s){return t.isLeft(n)?t.isLeft(s)?t.left(e.concat(n.left,s.left)):n:t.isLeft(s)?s:t.right(i.concat(n.right,s.right))}}}t.map=function(e){return function(i){return t.isLeft(i)?i:t.right(e(i.right))}},t.bimap=function(e,i){return function(n){return t.isLeft(n)?t.left(e(n.left)):t.right(i(n.right))}},t.mapLeft=function(e){return function(i){return t.isLeft(i)?t.left(e(i.left)):i}},t.apW=function(e){return function(i){return t.isLeft(i)?i:t.isLeft(e)?e:t.right(i.right(e.right))}},t.ap=t.apW,t.apFirst=function(e){return s.flow(t.map((function(e){return function(){return e}})),t.ap(e))},t.apSecond=function(e){return s.flow(t.map((function(){return function(e){return e}})),t.ap(e))},t.of=t.right,t.chainW=function(e){return function(i){return t.isLeft(i)?i:e(i.right)}},t.chain=t.chainW,t.chainFirstW=function(e){return function(i){return s.pipe(i,t.chainW((function(i){return s.pipe(e(i),t.map((function(){return i})))})))}},t.chainFirst=t.chainFirstW,t.flatten=t.chain(s.identity),t.alt=function(e){return function(i){return t.isLeft(i)?e():i}},t.extend=function(e){return function(i){return t.isLeft(i)?i:t.right(e(i))}},t.duplicate=t.extend(s.identity),t.reduce=function(e,i){return function(n){return t.isLeft(n)?e:i(e,n.right)}},t.foldMap=function(e){return function(i){return function(n){return t.isLeft(n)?e.empty:i(n.right)}}},t.reduceRight=function(e,i){return function(n){return t.isLeft(n)?e:i(n.right,e)}},t.traverse=function(e){return function(i){return function(n){return t.isLeft(n)?e.of(t.left(n.left)):e.map(i(n.right),t.right)}}},t.sequence=function(e){return function(i){return t.isLeft(i)?e.of(t.left(i.left)):e.map(i.right,t.right)}},t.throwError=t.left,t.URI="Either",t.getShow=function(e,i){return{show:function(n){return t.isLeft(n)?"left("+e.show(n.left)+")":"right("+i.show(n.right)+")"}}},t.getEq=function(e,i){return{equals:function(n,s){return n===s||(t.isLeft(n)?t.isLeft(s)&&e.equals(n.left,s.left):t.isRight(s)&&i.equals(n.right,s.right))}}},t.getSemigroup=function(e){return{concat:function(i,n){return t.isLeft(n)?i:t.isLeft(i)?n:t.right(e.concat(i.right,n.right))}}},t.getApplySemigroup=h,t.getApplyMonoid=function(e){return{concat:h(e).concat,empty:t.right(e.empty)}},t.getFilterable=j,t.getWitherable=function(e){var i=j(e);return{URI:t.URI,_E:void 0,map:a,compact:i.compact,separate:i.separate,filter:i.filter,filterMap:i.filterMap,partition:i.partition,partitionMap:i.partitionMap,traverse:u,sequence:t.sequence,reduce:c,foldMap:p,reduceRight:d,wither:function(e){var t=u(e);return function(n,s){return e.map(t(n,s),i.compact)}},wilt:function(e){var t=u(e);return function(n,s){return e.map(t(n,s),i.separate)}}}},t.getApplicativeValidation=v,t.getAltValidation=O,t.getValidation=function(e){var i=v(e),n=O(e);return{URI:t.URI,_E:void 0,map:a,of:t.of,chain:l,bimap:f,mapLeft:g,reduce:c,foldMap:p,reduceRight:d,extend:x,traverse:u,sequence:t.sequence,chainRec:b,throwError:t.throwError,ap:i.ap,alt:n.alt}},t.getValidationSemigroup=_,t.Functor={URI:t.URI,map:a},t.Applicative={URI:t.URI,map:a,ap:o,of:t.of},t.Monad={URI:t.URI,map:a,ap:o,of:t.of,chain:l},t.Foldable={URI:t.URI,reduce:c,foldMap:p,reduceRight:d},t.Traversable={URI:t.URI,map:a,reduce:c,foldMap:p,reduceRight:d,traverse:u,sequence:t.sequence},t.Bifunctor={URI:t.URI,bimap:f,mapLeft:g},t.Alt={URI:t.URI,map:a,alt:m},t.Extend={URI:t.URI,map:a,extend:x},t.ChainRec={URI:t.URI,map:a,ap:o,chain:l,chainRec:b},t.MonadThrow={URI:t.URI,map:a,ap:o,of:t.of,chain:l,throwError:t.throwError},t.getValidationMonoid=function(e,i){return{concat:_(e,i).concat,empty:t.right(i.empty)}},t.either={URI:t.URI,map:a,of:t.of,ap:o,chain:l,reduce:c,foldMap:p,reduceRight:d,traverse:u,sequence:t.sequence,bimap:f,mapLeft:g,alt:m,extend:x,chainRec:b,throwError:t.throwError},t.toError=function(e){return e instanceof Error?e:new Error(String(e))},t.elem=function(e){return function(i,n){return!t.isLeft(n)&&e.equals(i,n.right)}},t.exists=function(e){return function(i){return!t.isLeft(i)&&e(i.right)}},t.bindTo=function(e){return t.map(s.bindTo_(e))},t.bindW=function(e,i){return t.chainW((function(n){return s.pipe(i(n),t.map((function(t){return s.bind_(n,e,t)})))}))},t.bind=t.bindW,t.apSW=function(e,i){return s.flow(t.map((function(t){return function(i){return s.bind_(t,e,i)}})),t.apW(i))},t.apS=t.apSW},function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t,i){var n,s,r,a=void 0!==(n=void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:e).document&&n.document.attachEvent;if(!a){var o=(r=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(e){return n.setTimeout(e,20)},function(e){return r(e)}),l=(s=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.clearTimeout,function(e){return s(e)}),c=function(e){var t=e.__resizeTriggers__,i=t.firstElementChild,n=t.lastElementChild,s=i.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,s.style.width=i.offsetWidth+1+"px",s.style.height=i.offsetHeight+1+"px",i.scrollLeft=i.scrollWidth,i.scrollTop=i.scrollHeight},p=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;c(this),this.__resizeRAF__&&l(this.__resizeRAF__),this.__resizeRAF__=o((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(i){i.call(t,e)})))}))}},d=!1,u="",f="animationstart",g="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),x=n.document.createElement("fakeelement");if(void 0!==x.style.animationName&&(d=!0),!1===d)for(var b=0;b div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',n=e.head||e.getElementsByTagName("head")[0],s=e.createElement("style");s.id="detectElementResize",s.type="text/css",null!=t&&s.setAttribute("nonce",t),s.styleSheet?s.styleSheet.cssText=i:s.appendChild(e.createTextNode(i)),n.appendChild(s)}}(s),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=s.createElement("div")).className="resize-triggers";var o='
';if(window.trustedTypes){var l=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return o}});e.__resizeTriggers__.innerHTML=l.createHTML("")}else e.__resizeTriggers__.innerHTML=o;e.appendChild(e.__resizeTriggers__),c(e),e.addEventListener("scroll",p,!0),f&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==h&&c(e)},e.__resizeTriggers__.addEventListener(f,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(i)}},removeResizeListener:function(e,t){if(a)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",p,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(f,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}}).call(this,i(90))},function(e,t){function i(e){var t,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t=x.start&&y<=x.stop&&O>=b.start&&O<=b.stop,F="".concat(O,"-").concat(y),M=void 0;v&&g[F]?M=g[F]:a&&!a.has(O,y)?M={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(M={height:_.size,left:E.offset+o,position:"absolute",top:_.offset+m,width:E.size},g[F]=M);var k={columnIndex:y,isScrolling:l,isVisible:P,key:F,parent:p,rowIndex:O,style:M},T=void 0;!c&&!l||o||m?T=i(k):(t[F]||(t[F]=i(k)),T=t[F]),null!=T&&!1!==T&&h.push(T)}return h},i(35)},function(e,t,i){"use strict";var n=i(33);Object.defineProperty(t,"__esModule",{value:!0}),t.bpfrpt_proptype_AnimationTimeoutId=t.requestAnimationTimeout=t.cancelAnimationTimeout=void 0;var s=i(104);n(i(37)),t.bpfrpt_proptype_AnimationTimeoutId=null,t.cancelAnimationTimeout=function(e){return(0,s.caf)(e.id)},t.requestAnimationTimeout=function(e,t){var i;Promise.resolve().then((function(){i=Date.now()}));var n={id:(0,s.raf)((function r(){Date.now()-i>=t?e.call():n.id=(0,s.raf)(r)}))};return n}},function(e,t,i){"use strict";var n=i(33),s=i(36);Object.defineProperty(t,"__esModule",{value:!0}),t.bpfrpt_proptype_Scroll=t.bpfrpt_proptype_RenderedRows=t.bpfrpt_proptype_RowRenderer=t.bpfrpt_proptype_RowRendererParams=void 0,s(i(18)),n(i(37)),t.bpfrpt_proptype_RowRendererParams=null,t.bpfrpt_proptype_RowRenderer=null,t.bpfrpt_proptype_RenderedRows=null,t.bpfrpt_proptype_Scroll=null},function(e,t,i){"use strict";var n=i(33),s=i(36);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.IS_SCROLLING_TIMEOUT=void 0;var r,a,o=n(i(39)),l=n(i(40)),c=n(i(41)),p=n(i(42)),d=n(i(43)),u=n(i(44)),f=n(i(0)),g=s(i(18)),m=s(i(27)),x=i(107),b=i(108),h=n(i(47));function j(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}n(i(37)),t.IS_SCROLLING_TIMEOUT=150;var v=function(){return"undefined"!=typeof window?window:void 0},O=(a=r=function(e){function t(){var e,i;(0,o.default)(this,t);for(var n=arguments.length,s=new Array(n),r=0;r0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,i=this.state,n=i.height,s=i.width,r=this._child||m.findDOMNode(this);if(r instanceof Element&&e){var a=(0,b.getPositionOffset)(r,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var o=(0,b.getDimensions)(e,this.props);n===o.height&&s===o.width||(this.setState({height:o.height,width:o.width}),t({height:o.height,width:o.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=(0,h.default)(),this.updatePosition(e),e&&((0,x.registerScrollListener)(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var i=this.props.scrollElement,n=e.scrollElement;n!==i&&null!=n&&null!=i&&(this.updatePosition(i),(0,x.unregisterScrollListener)(this,n),(0,x.registerScrollListener)(this,i),this._unregisterResizeListener(n),this._registerResizeListener(i))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&((0,x.unregisterScrollListener)(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,i=t.isScrolling,n=t.scrollTop,s=t.scrollLeft,r=t.height,a=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:r,isScrolling:i,scrollLeft:s,scrollTop:n,width:a})}}]),t}(g.PureComponent),(0,f.default)(r,"propTypes",null),a);t.default=O,(0,f.default)(O,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:v(),serverHeight:0,serverWidth:0})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(28),s=i(55),r=n.__importDefault(i(57));t.default=function(e,t){r.default(e,t,s.isDeepEqual)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDeepEqual=t.off=t.on=t.isClient=void 0;var n=i(28).__importDefault(i(56));t.isClient="object"==typeof window,t.on=function(e){for(var t=[],i=1;iNumber(e)-Number(t))).map((t=>e[t])):e}function p(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function d(e){const t=(e=p(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function u(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){a((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const i=function(e){let t;switch(e.arrayFormat){case"index":return(e,i,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=i):n[e]=i};case"bracket":return(e,i,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],i):n[e]=[i]:n[e]=i};case"comma":case"separator":return(t,i,n)=>{const s="string"==typeof i&&i.split("").indexOf(e.arrayFormatSeparator)>-1?i.split(e.arrayFormatSeparator).map((t=>l(t,e))):null===i?i:l(i,e);n[t]=s};default:return(e,t,i)=>{void 0!==i[e]?i[e]=[].concat(i[e],t):i[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const s of e.split("&")){let[e,a]=r(t.decode?s.replace(/\+/g," "):s,"=");a=void 0===a?null:["comma","separator"].includes(t.arrayFormat)?a:l(a,t),i(l(e,t),a,n)}for(const e of Object.keys(n)){const i=n[e];if("object"==typeof i&&null!==i)for(const e of Object.keys(i))i[e]=u(i[e],t);else n[e]=u(i,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const i=n[t];return Boolean(i)&&"object"==typeof i&&!Array.isArray(i)?e[t]=c(i):e[t]=i,e}),Object.create(null))}t.extract=d,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";a((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const i=i=>t.skipNull&&null==e[i]||t.skipEmptyString&&""===e[i],n=function(e){switch(e.arrayFormat){case"index":return t=>(i,n)=>{const s=i.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:null===n?[...i,[o(t,e),"[",s,"]"].join("")]:[...i,[o(t,e),"[",o(s,e),"]=",o(n,e)].join("")]};case"bracket":return t=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:null===n?[...i,[o(t,e),"[]"].join("")]:[...i,[o(t,e),"[]=",o(n,e)].join("")];case"comma":case"separator":return t=>(i,n)=>null==n||0===n.length?i:0===i.length?[[o(t,e),"=",o(n,e)].join("")]:[[i,o(n,e)].join(e.arrayFormatSeparator)];default:return t=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:null===n?[...i,o(t,e)]:[...i,[o(t,e),"=",o(n,e)].join("")]}}(t),s={};for(const t of Object.keys(e))i(t)||(s[t]=e[t]);const r=Object.keys(s);return!1!==t.sort&&r.sort(t.sort),r.map((i=>{const s=e[i];return void 0===s?"":null===s?o(i,t):Array.isArray(s)?s.reduce(n(i),[]).join("&"):o(i,t)+"="+o(s,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[i,n]=r(e,"#");return Object.assign({url:i.split("?")[0]||"",query:f(d(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:l(n,t)}:{})},t.stringifyUrl=(e,i)=>{i=Object.assign({encode:!0,strict:!0},i);const n=p(e.url).split("?")[0]||"",s=t.extract(e.url),r=t.parse(s,{sort:!1}),a=Object.assign(r,e.query);let l=t.stringify(a,i);l&&(l=`?${l}`);let c=function(e){let t="";const i=e.indexOf("#");return-1!==i&&(t=e.slice(i)),t}(e.url);return e.fragmentIdentifier&&(c=`#${o(e.fragmentIdentifier,i)}`),`${n}${l}${c}`}},function(e,t,i){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},function(e,t,i){"use strict";var n="%[a-f0-9]{2}",s=new RegExp("("+n+")|([^%]+?)","gi"),r=new RegExp("("+n+")+","gi");function a(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var i=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],a(i),a(n))}function o(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(s)||[],i=1;i{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const i=e.indexOf(t);return-1===i?[e]:[e.slice(0,i),e.slice(i+t.length)]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tailRec=void 0,t.tailRec=function(e,t){for(var i=t(e);"Left"===i._tag;)i=t(i.left);return i.right}},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(64);case"v8light":return i(66)}},function(e,t,i){var n=i(31),s=i(65);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__form__dragAndDropList__panel{background-color:#25262e;padding:12px}.pipelineProcessorsEditor__form__dragAndDropList__removeButton{margin-left:8px}.pipelineProcessorsEditor__form__dragAndDropList__item{background-color:#25262e;padding-bottom:8px;padding-top:8px}.pipelineProcessorsEditor__form__dragAndDropList__labelContainer{margin-bottom:4px}.pipelineProcessorsEditor__form__dragAndDropList__grabIcon{align-items:center;display:flex;height:32px;justify-content:center;width:32px}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(67);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__form__dragAndDropList__panel{background-color:#f5f7fa;padding:12px}.pipelineProcessorsEditor__form__dragAndDropList__removeButton{margin-left:8px}.pipelineProcessorsEditor__form__dragAndDropList__item{background-color:#f5f7fa;padding-bottom:8px;padding-top:8px}.pipelineProcessorsEditor__form__dragAndDropList__labelContainer{margin-bottom:4px}.pipelineProcessorsEditor__form__dragAndDropList__grabIcon{align-items:center;display:flex;height:32px;justify-content:center;width:32px}",""]),e.exports=t},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(69);case"v8light":return i(71)}},function(e,t,i){var n=i(31),s=i(70);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__form__textEditor__panel{box-shadow:none}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(72);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__form__textEditor__panel{box-shadow:none}",""]),e.exports=t},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(74);case"v8light":return i(76)}},function(e,t,i){var n=i(31),s=i(75);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__form__inputList__panel{background-color:#25262e;padding:12px}.pipelineProcessorsEditor__form__inputList__removeButton{margin-left:8px}.pipelineProcessorsEditor__form__inputList__item{background-color:#25262e;padding-bottom:8px;padding-top:8px}.pipelineProcessorsEditor__form__inputList__labelContainer{margin-bottom:4px}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(77);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__form__inputList__panel{background-color:#f5f7fa;padding:12px}.pipelineProcessorsEditor__form__inputList__removeButton{margin-left:8px}.pipelineProcessorsEditor__form__inputList__item{background-color:#f5f7fa;padding-bottom:8px;padding-top:8px}.pipelineProcessorsEditor__form__inputList__labelContainer{margin-bottom:4px}",""]),e.exports=t},function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.apS=t.bind=t.bindTo=t.empty=t.unsafeDeleteAt=t.unsafeUpdateAt=t.unsafeInsertAt=t.array=t.Witherable=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.FilterableWithIndex=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.Alt=t.Unfoldable=t.Monad=t.Applicative=t.FunctorWithIndex=t.Functor=t.URI=t.zero=t.unfold=t.wilt=t.wither=t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.reduce=t.foldMapWithIndex=t.foldMap=t.duplicate=t.extend=t.filterWithIndex=t.filterMapWithIndex=t.alt=t.partitionMapWithIndex=t.partitionMap=t.partitionWithIndex=t.partition=t.filterMap=t.filter=t.separate=t.compact=t.mapWithIndex=t.chainFirst=t.chainWithIndex=t.chain=t.apSecond=t.apFirst=t.ap=t.map=t.of=t.difference=t.intersection=t.union=t.comprehension=t.chunksOf=t.splitAt=t.chop=t.sortBy=t.uniq=t.elem=t.rotate=t.unzip=t.zip=t.zipWith=t.sort=t.lefts=t.rights=t.reverse=t.modifyAt=t.deleteAt=t.updateAt=t.insertAt=t.copy=t.findLastIndex=t.findLastMap=t.findLast=t.findFirstMap=t.findFirst=t.findIndex=t.dropLeftWhile=t.dropRight=t.dropLeft=t.spanLeft=t.takeLeftWhile=t.takeRight=t.takeLeft=t.init=t.tail=t.last=t.head=t.snoc=t.cons=t.lookup=t.isOutOfBound=t.isNonEmpty=t.isEmpty=t.scanRight=t.scanLeft=t.foldRight=t.foldLeft=t.flatten=t.replicate=t.range=t.makeBy=t.getOrd=t.getEq=t.getMonoid=t.getShow=void 0;var a=r(i(79));t.getShow=a.getShow,t.getMonoid=a.getMonoid,t.getEq=a.getEq,t.getOrd=a.getOrd,t.makeBy=a.makeBy,t.range=a.range,t.replicate=a.replicate,t.flatten=a.flatten,t.foldLeft=a.foldLeft,t.foldRight=a.foldRight,t.scanLeft=a.scanLeft,t.scanRight=a.scanRight,t.isEmpty=a.isEmpty,t.isNonEmpty=a.isNonEmpty,t.isOutOfBound=a.isOutOfBound,t.lookup=a.lookup,t.cons=a.cons,t.snoc=a.snoc,t.head=a.head,t.last=a.last,t.tail=a.tail,t.init=a.init,t.takeLeft=a.takeLeft,t.takeRight=a.takeRight,t.takeLeftWhile=function(e){return a.takeLeftWhile(e)},t.spanLeft=function(e){return a.spanLeft(e)},t.dropLeft=a.dropLeft,t.dropRight=a.dropRight,t.dropLeftWhile=a.dropLeftWhile,t.findIndex=a.findIndex,t.findFirst=function(e){return a.findFirst(e)},t.findFirstMap=a.findFirstMap,t.findLast=function(e){return a.findLast(e)},t.findLastMap=a.findLastMap,t.findLastIndex=a.findLastIndex,t.copy=a.toArray,t.insertAt=a.insertAt,t.updateAt=a.updateAt,t.deleteAt=a.deleteAt,t.modifyAt=a.modifyAt,t.reverse=a.reverse,t.rights=a.rights,t.lefts=a.lefts,t.sort=a.sort,t.zipWith=a.zipWith,t.zip=a.zip,t.unzip=a.unzip,t.rotate=a.rotate,t.elem=a.elem,t.uniq=a.uniq,t.sortBy=a.sortBy,t.chop=a.chop,t.splitAt=a.splitAt,t.chunksOf=a.chunksOf,t.comprehension=function(e,t,i){return void 0===i&&(i=function(){return!0}),a.comprehension(e,t,i)},t.union=a.union,t.intersection=a.intersection,t.difference=a.difference,t.of=a.of;var o=a.Monad.map,l=a.Monad.ap,c=a.Monad.chain,p=a.FunctorWithIndex.mapWithIndex,d=a.Filterable.filter,u=a.Filterable.filterMap,f=a.Filterable.partition,g=a.Filterable.partitionMap,m=a.FilterableWithIndex.filterWithIndex,x=a.FilterableWithIndex.filterMapWithIndex,b=a.FilterableWithIndex.partitionWithIndex,h=a.FilterableWithIndex.partitionMapWithIndex,j=a.Foldable.reduce,v=a.Foldable.foldMap,O=a.Foldable.reduceRight,_=a.Traversable.traverse,y=a.Alternative.alt,E=a.FoldableWithIndex.reduceWithIndex,P=a.FoldableWithIndex.foldMapWithIndex,F=a.FoldableWithIndex.reduceRightWithIndex,M=a.TraversableWithIndex.traverseWithIndex,k=a.Extend.extend,T=a.Witherable.wither,S=a.Witherable.wilt;t.map=a.map,t.ap=a.ap,t.apFirst=a.apFirst,t.apSecond=a.apSecond,t.chain=a.chain,t.chainWithIndex=a.chainWithIndex,t.chainFirst=a.chainFirst,t.mapWithIndex=a.mapWithIndex,t.compact=a.compact,t.separate=a.separate,t.filter=a.filter,t.filterMap=a.filterMap,t.partition=a.partition,t.partitionWithIndex=a.partitionWithIndex,t.partitionMap=a.partitionMap,t.partitionMapWithIndex=a.partitionMapWithIndex,t.alt=a.alt,t.filterMapWithIndex=a.filterMapWithIndex,t.filterWithIndex=a.filterWithIndex,t.extend=a.extend,t.duplicate=a.duplicate,t.foldMap=a.foldMap,t.foldMapWithIndex=a.foldMapWithIndex,t.reduce=a.reduce,t.reduceWithIndex=a.reduceWithIndex,t.reduceRight=a.reduceRight,t.reduceRightWithIndex=a.reduceRightWithIndex,t.traverse=a.traverse,t.sequence=a.sequence,t.traverseWithIndex=a.traverseWithIndex,t.wither=a.wither,t.wilt=a.wilt,t.unfold=a.unfold,t.zero=a.Alternative.zero,t.URI="Array",t.Functor={URI:t.URI,map:o},t.FunctorWithIndex={URI:t.URI,map:o,mapWithIndex:p},t.Applicative={URI:t.URI,map:o,ap:l,of:t.of},t.Monad={URI:t.URI,map:o,ap:l,of:t.of,chain:c},t.Unfoldable={URI:t.URI,unfold:t.unfold},t.Alt={URI:t.URI,map:o,alt:y},t.Alternative={URI:t.URI,map:o,ap:l,of:t.of,alt:y,zero:t.zero},t.Extend={URI:t.URI,map:o,extend:k},t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate},t.Filterable={URI:t.URI,map:o,compact:t.compact,separate:t.separate,filter:d,filterMap:u,partition:f,partitionMap:g},t.FilterableWithIndex={URI:t.URI,map:o,mapWithIndex:p,compact:t.compact,separate:t.separate,filter:d,filterMap:u,partition:f,partitionMap:g,partitionMapWithIndex:h,partitionWithIndex:b,filterMapWithIndex:x,filterWithIndex:m},t.Foldable={URI:t.URI,reduce:j,foldMap:v,reduceRight:O},t.FoldableWithIndex={URI:t.URI,reduce:j,foldMap:v,reduceRight:O,reduceWithIndex:E,foldMapWithIndex:P,reduceRightWithIndex:F},t.Traversable={URI:t.URI,map:o,reduce:j,foldMap:v,reduceRight:O,traverse:_,sequence:t.sequence},t.TraversableWithIndex={URI:t.URI,map:o,mapWithIndex:p,reduce:j,foldMap:v,reduceRight:O,reduceWithIndex:E,foldMapWithIndex:P,reduceRightWithIndex:F,traverse:_,sequence:t.sequence,traverseWithIndex:M},t.Witherable={URI:t.URI,map:o,compact:t.compact,separate:t.separate,filter:d,filterMap:u,partition:f,partitionMap:g,reduce:j,foldMap:v,reduceRight:O,traverse:_,sequence:t.sequence,wither:T,wilt:S},t.array={URI:t.URI,compact:t.compact,separate:t.separate,map:o,ap:l,of:t.of,chain:c,filter:d,filterMap:u,partition:f,partitionMap:g,mapWithIndex:p,partitionMapWithIndex:h,partitionWithIndex:b,filterMapWithIndex:x,filterWithIndex:m,alt:y,zero:t.zero,unfold:t.unfold,reduce:j,foldMap:v,reduceRight:O,traverse:_,sequence:t.sequence,reduceWithIndex:E,foldMapWithIndex:P,reduceRightWithIndex:F,traverseWithIndex:M,extend:k,wither:T,wilt:S},t.unsafeInsertAt=a.unsafeInsertAt,t.unsafeUpdateAt=a.unsafeUpdateAt,t.unsafeDeleteAt=a.unsafeDeleteAt,t.empty=[],t.bindTo=a.bindTo,t.bind=a.bind,t.apS=a.apS},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.apS=t.bind=t.bindTo=t.empty=t.unsafeDeleteAt=t.unsafeUpdateAt=t.unsafeInsertAt=t.readonlyArray=t.Witherable=t.TraversableWithIndex=t.Traversable=t.FoldableWithIndex=t.Foldable=t.FilterableWithIndex=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.Alt=t.Unfoldable=t.Monad=t.Applicative=t.FunctorWithIndex=t.Functor=t.URI=t.unfold=t.wilt=t.wither=t.traverseWithIndex=t.sequence=t.traverse=t.reduceRightWithIndex=t.reduceRight=t.reduceWithIndex=t.foldMap=t.reduce=t.foldMapWithIndex=t.duplicate=t.extend=t.filterWithIndex=t.partitionMapWithIndex=t.partitionMap=t.partitionWithIndex=t.partition=t.compact=t.filterMap=t.filterMapWithIndex=t.filter=t.separate=t.mapWithIndex=t.map=t.chainFirst=t.chainWithIndex=t.chain=t.apSecond=t.apFirst=t.ap=t.alt=t.zero=t.of=t.difference=t.intersection=t.union=t.comprehension=t.chunksOf=t.splitAt=t.chop=t.sortBy=t.uniq=t.elem=t.rotate=t.unzip=t.zip=t.zipWith=t.sort=t.lefts=t.rights=t.reverse=t.modifyAt=t.deleteAt=t.updateAt=t.insertAt=t.findLastIndex=t.findLastMap=t.findLast=t.findFirstMap=t.findFirst=t.findIndex=t.dropLeftWhile=t.dropRight=t.dropLeft=t.spanLeft=t.takeLeftWhile=t.takeRight=t.takeLeft=t.init=t.tail=t.last=t.head=t.snoc=t.cons=t.lookup=t.isOutOfBound=t.isNonEmpty=t.isEmpty=t.scanRight=t.scanLeft=t.foldRight=t.foldLeft=t.flatten=t.replicate=t.range=t.makeBy=t.getOrd=t.getEq=t.getMonoid=t.getShow=t.toArray=t.fromArray=void 0;var n=i(38),s=i(80),r=i(81);t.fromArray=function(e){var i=e.length;if(0===i)return t.empty;for(var n=Array(i),s=0;s0}function p(e,t){return e<0||e>=t.length}function d(e,t){return void 0===t?function(t){return d(e,t)}:p(e,t)?s.none:s.some(t[e])}function u(e,t){for(var i=e.length,n=Array(i+1),s=0;s=0;r--)s[r]=t(i[r],s[r+1]);return s}},t.isEmpty=l,t.isNonEmpty=c,t.isOutOfBound=p,t.lookup=d,t.cons=function e(t,i){if(void 0===i)return function(i){return e(t,i)};for(var n=i.length,s=Array(n+1),r=0;r=0;i--)if(e(t[i]))return s.some(t[i]);return s.none}},t.findLastMap=function(e){return function(t){for(var i=t.length-1;i>=0;i--){var n=e(t[i]);if(s.isSome(n))return n}return s.none}},t.findLastIndex=function(e){return function(t){for(var i=t.length-1;i>=0;i--)if(e(t[i]))return s.some(i);return s.none}},t.insertAt=function(e,t){return function(i){return e<0||e>i.length?s.none:s.some(U(e,t,i))}},t.updateAt=function(e,t){return function(i){return p(e,i)?s.none:s.some(H(e,t,i))}},t.deleteAt=function(e){return function(t){return p(e,t)?s.none:s.some(W(e,t))}},t.modifyAt=function(e,t){return function(i){return p(e,i)?s.none:s.some(H(e,t(i[e]),i))}},t.reverse=function(e){return l(e)?e:e.slice().reverse()},t.rights=function(e){for(var t=[],i=e.length,n=0;nt?1:0}function a(e,t){return e===t}function o(e){return function(t,i){return-1===e.compare(t,i)}}function l(e){return function(t,i){return 1===e.compare(t,i)}}function c(e){return function(t,i){return 1===e.compare(t,i)?i:t}}function p(e){return function(t,i){return-1===e.compare(t,i)?i:t}}function d(e){var t=function(t,i){return t===i?0:e(t,i)};return{equals:function(e,i){return 0===t(e,i)},compare:t}}function u(){return{concat:function(e,t){return d((function(i,s){return n.monoidOrdering.concat(e.compare(i,s),t.compare(i,s))}))}}}t.ordString={equals:a,compare:r},t.ordNumber={equals:a,compare:r},t.ordBoolean={equals:a,compare:r},t.lt=o,t.gt=l,t.leq=function(e){return function(t,i){return 1!==e.compare(t,i)}},t.geq=function(e){return function(t,i){return-1!==e.compare(t,i)}},t.min=c,t.max=p,t.clamp=function(e){var t=c(e),i=p(e);return function(e,n){return function(s){return i(t(s,n),e)}}},t.between=function(e){var t=o(e),i=l(e);return function(e,n){return function(s){return!t(s,e)&&!i(s,n)}}},t.fromCompare=d,t.getSemigroup=u,t.getMonoid=function(){return{concat:u().concat,empty:d((function(){return 0}))}},t.getTupleOrd=function(){for(var e=[],t=0;t=1?1:0},t.eqOrdering={equals:function(e,t){return e===t}},t.semigroupOrdering={concat:function(e,t){return 0!==e?e:t}},t.monoidOrdering={concat:t.semigroupOrdering.concat,empty:0},t.invert=function(e){switch(e){case-1:return 1;case 1:return-1;default:return 0}}},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(84);case"v8light":return i(86)}},function(e,t,i){var n=i(31),s=i(85);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".processorOutput__callOut--customIcon .euiCallOutHeader{align-items:center}.processorOutput__callOut__codeBlock>pre{background:#0000}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(87);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".processorOutput__callOut--customIcon .euiCallOutHeader{align-items:center}.processorOutput__callOut__codeBlock>pre{background:#0000}",""]),e.exports=t},function(e,t,i){"use strict";var n=i(33);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"AutoSizer",{enumerable:!0,get:function(){return s.default}});var s=n(i(89))},function(e,t,i){"use strict";var n=i(33),s=i(36);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a,o=n(i(39)),l=n(i(40)),c=n(i(41)),p=n(i(42)),d=n(i(43)),u=n(i(44)),f=n(i(0)),g=s(i(18)),m=n(i(47));function x(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function b(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,i=void 0===t?0:t,n=e.rowIndex,s=void 0===n?0:n;this.Grid&&this.Grid.recomputeGridSize({rowIndex:s,columnIndex:i})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,i=e.noRowsRenderer,n=e.scrollToIndex,s=e.width,r=(0,b.default)("ReactVirtualized__List",t);return x.createElement(m.default,(0,o.default)({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:r,columnWidth:s,columnCount:1,noContentRenderer:i,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:n}))}}]),t}(x.PureComponent),(0,g.default)(r,"propTypes",null),a);t.default=h,(0,g.default)(h,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:m.accessibilityOverscanIndicesGetter,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}})},function(e,t,i){"use strict";var n=i(33);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"Grid",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"accessibilityOverscanIndicesGetter",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"defaultCellRangeRenderer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"defaultOverscanIndicesGetter",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"bpfrpt_proptype_NoContentRenderer",{enumerable:!0,get:function(){return l.bpfrpt_proptype_NoContentRenderer}}),Object.defineProperty(t,"bpfrpt_proptype_Alignment",{enumerable:!0,get:function(){return l.bpfrpt_proptype_Alignment}}),Object.defineProperty(t,"bpfrpt_proptype_CellPosition",{enumerable:!0,get:function(){return l.bpfrpt_proptype_CellPosition}}),Object.defineProperty(t,"bpfrpt_proptype_CellSize",{enumerable:!0,get:function(){return l.bpfrpt_proptype_CellSize}}),Object.defineProperty(t,"bpfrpt_proptype_OverscanIndicesGetter",{enumerable:!0,get:function(){return l.bpfrpt_proptype_OverscanIndicesGetter}}),Object.defineProperty(t,"bpfrpt_proptype_RenderedSection",{enumerable:!0,get:function(){return l.bpfrpt_proptype_RenderedSection}}),Object.defineProperty(t,"bpfrpt_proptype_CellRendererParams",{enumerable:!0,get:function(){return l.bpfrpt_proptype_CellRendererParams}}),Object.defineProperty(t,"bpfrpt_proptype_Scroll",{enumerable:!0,get:function(){return l.bpfrpt_proptype_Scroll}});var s=n(i(94)),r=n(i(105)),a=n(i(50)),o=n(i(49)),l=i(35)},function(e,t,i){"use strict";var n=i(33),s=i(36);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DEFAULT_SCROLLING_RESET_TIME_INTERVAL=void 0;var r,a,o=n(i(34)),l=n(i(39)),c=n(i(40)),p=n(i(41)),d=n(i(42)),u=n(i(43)),f=n(i(44)),g=n(i(0)),m=s(i(18)),x=n(i(48)),b=n(i(95)),h=n(i(45)),j=n(i(99)),v=s(i(49)),O=n(i(100)),_=n(i(50)),y=n(i(101)),E=i(103),P=i(51);function F(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function M(e){for(var t=1;t0&&(i._initialScrollTop=i._getCalculatedScrollTop(e,i.state)),e.scrollToColumn>0&&(i._initialScrollLeft=i._getCalculatedScrollLeft(e,i.state)),i}return(0,f.default)(t,e),(0,c.default)(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,i=void 0===t?this.props.scrollToAlignment:t,n=e.columnIndex,s=void 0===n?this.props.scrollToColumn:n,r=e.rowIndex,a=void 0===r?this.props.scrollToRow:r,o=M({},this.props,{scrollToAlignment:i,scrollToColumn:s,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(o),scrollTop:this._getCalculatedScrollTop(o)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,i=void 0===t?0:t,n=e.scrollTop,s=void 0===n?0:n;if(!(s<0)){this._debounceScrollEnded();var r=this.props,a=r.autoHeight,o=r.autoWidth,l=r.height,c=r.width,p=this.state.instanceProps,d=p.scrollbarSize,u=p.rowSizeAndPositionManager.getTotalSize(),f=p.columnSizeAndPositionManager.getTotalSize(),g=Math.min(Math.max(0,f-c+d),i),m=Math.min(Math.max(0,u-l+d),s);if(this.state.scrollLeft!==g||this.state.scrollTop!==m){var x={isScrolling:!0,scrollDirectionHorizontal:g!==this.state.scrollLeft?g>this.state.scrollLeft?v.SCROLL_DIRECTION_FORWARD:v.SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionHorizontal,scrollDirectionVertical:m!==this.state.scrollTop?m>this.state.scrollTop?v.SCROLL_DIRECTION_FORWARD:v.SCROLL_DIRECTION_BACKWARD:this.state.scrollDirectionVertical,scrollPositionChangeReason:"observed"};a||(x.scrollTop=m),o||(x.scrollLeft=g),x.needToResetStyleCache=!1,this.setState(x)}this._invokeOnScrollMemoizer({scrollLeft:g,scrollTop:m,totalColumnsWidth:f,totalRowsHeight:u})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,i=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,i):i}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,i=e.rowCount,n=this.state.instanceProps;n.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),n.rowSizeAndPositionManager.getSizeAndPositionOfCell(i-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,i=void 0===t?0:t,n=e.rowIndex,s=void 0===n?0:n,r=this.props,a=r.scrollToColumn,o=r.scrollToRow,l=this.state.instanceProps;l.columnSizeAndPositionManager.resetCell(i),l.rowSizeAndPositionManager.resetCell(s),this._recomputeScrollLeftFlag=a>=0&&(this.state.scrollDirectionHorizontal===v.SCROLL_DIRECTION_FORWARD?i<=a:i>=a),this._recomputeScrollTopFlag=o>=0&&(this.state.scrollDirectionVertical===v.SCROLL_DIRECTION_FORWARD?s<=o:s>=o),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,i=e.rowIndex,n=this.props.columnCount,s=this.props;n>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(M({},s,{scrollToColumn:t})),void 0!==i&&this._updateScrollTopForScrollToRow(M({},s,{scrollToRow:i}))}},{key:"componentDidMount",value:function(){var e=this.props,i=e.getScrollbarSize,n=e.height,s=e.scrollLeft,r=e.scrollToColumn,a=e.scrollTop,o=e.scrollToRow,l=e.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState((function(e){var t=M({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=i(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"==typeof s&&s>=0||"number"==typeof a&&a>=0){var p=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:s,scrollTop:a});p&&(p.needToResetStyleCache=!1,this.setState(p))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var d=n>0&&l>0;r>=0&&d&&this._updateScrollLeftForScrollToColumn(),o>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:s||0,scrollTop:a||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var i=this,n=this.props,s=n.autoHeight,r=n.autoWidth,a=n.columnCount,o=n.height,l=n.rowCount,c=n.scrollToAlignment,p=n.scrollToColumn,d=n.scrollToRow,u=n.width,f=this.state,g=f.scrollLeft,m=f.scrollPositionChangeReason,x=f.scrollTop,b=f.instanceProps;this._handleInvalidatedGridSize();var h=a>0&&0===e.columnCount||l>0&&0===e.rowCount;m===k&&(!r&&g>=0&&(g!==this._scrollingContainer.scrollLeft||h)&&(this._scrollingContainer.scrollLeft=g),!s&&x>=0&&(x!==this._scrollingContainer.scrollTop||h)&&(this._scrollingContainer.scrollTop=x));var j=(0===e.width||0===e.height)&&o>0&&u>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):(0,O.default)({cellSizeAndPositionManager:b.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:g,scrollToAlignment:c,scrollToIndex:p,size:u,sizeJustIncreasedFromZero:j,updateScrollIndexCallback:function(){return i._updateScrollLeftForScrollToColumn(i.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):(0,O.default)({cellSizeAndPositionManager:b.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:x,scrollToAlignment:c,scrollToIndex:d,size:o,sizeJustIncreasedFromZero:j,updateScrollIndexCallback:function(){return i._updateScrollTopForScrollToRow(i.props)}}),this._invokeOnGridRenderedHelper(),g!==t.scrollLeft||x!==t.scrollTop){var v=b.rowSizeAndPositionManager.getTotalSize(),_=b.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:g,scrollTop:x,totalColumnsWidth:_,totalRowsHeight:v})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&(0,P.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,i=e.autoHeight,n=e.autoWidth,s=e.className,r=e.containerProps,a=e.containerRole,l=e.containerStyle,c=e.height,p=e.id,d=e.noContentRenderer,u=e.role,f=e.style,g=e.tabIndex,b=e.width,h=this.state,j=h.instanceProps,v=h.needToResetStyleCache,O=this._isScrolling(),_={boxSizing:"border-box",direction:"ltr",height:i?"auto":c,position:"relative",width:n?"auto":b,WebkitOverflowScrolling:"touch",willChange:"transform"};v&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var y=j.columnSizeAndPositionManager.getTotalSize(),E=j.rowSizeAndPositionManager.getTotalSize(),P=E>c?j.scrollbarSize:0,F=y>b?j.scrollbarSize:0;F===this._horizontalScrollBarSize&&P===this._verticalScrollBarSize||(this._horizontalScrollBarSize=F,this._verticalScrollBarSize=P,this._scrollbarPresenceChanged=!0),_.overflowX=y+P<=b?"hidden":"auto",_.overflowY=E+F<=c?"hidden":"auto";var k=this._childrenToDisplay,T=0===k.length&&c>0&&b>0;return m.createElement("div",(0,o.default)({ref:this._setScrollingContainerRef},r,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:(0,x.default)("ReactVirtualized__Grid",s),id:p,onScroll:this._onScroll,role:u,style:M({},_,{},f),tabIndex:g}),k.length>0&&m.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:a,style:M({width:t?"auto":y,height:E,maxWidth:y,maxHeight:E,overflow:"hidden",pointerEvents:O?"none":"",position:"relative"},l)},k),T&&d())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,i=e.cellRenderer,n=e.cellRangeRenderer,s=e.columnCount,r=e.deferredMeasurementCache,a=e.height,o=e.overscanColumnCount,l=e.overscanIndicesGetter,c=e.overscanRowCount,p=e.rowCount,d=e.width,u=e.isScrollingOptOut,f=t.scrollDirectionHorizontal,g=t.scrollDirectionVertical,m=t.instanceProps,x=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,b=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,h=this._isScrolling(e,t);if(this._childrenToDisplay=[],a>0&&d>0){var j=m.columnSizeAndPositionManager.getVisibleCellRange({containerSize:d,offset:b}),v=m.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:x}),O=m.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:d,offset:b}),_=m.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:x});this._renderedColumnStartIndex=j.start,this._renderedColumnStopIndex=j.stop,this._renderedRowStartIndex=v.start,this._renderedRowStopIndex=v.stop;var y=l({direction:"horizontal",cellCount:s,overscanCellsCount:o,scrollDirection:f,startIndex:"number"==typeof j.start?j.start:0,stopIndex:"number"==typeof j.stop?j.stop:-1}),E=l({direction:"vertical",cellCount:p,overscanCellsCount:c,scrollDirection:g,startIndex:"number"==typeof v.start?v.start:0,stopIndex:"number"==typeof v.stop?v.stop:-1}),P=y.overscanStartIndex,F=y.overscanStopIndex,M=E.overscanStartIndex,k=E.overscanStopIndex;if(r){if(!r.hasFixedHeight())for(var T=M;T<=k;T++)if(!r.has(T,0)){P=0,F=s-1;break}if(!r.hasFixedWidth())for(var S=P;S<=F;S++)if(!r.has(0,S)){M=0,k=p-1;break}}this._childrenToDisplay=n({cellCache:this._cellCache,cellRenderer:i,columnSizeAndPositionManager:m.columnSizeAndPositionManager,columnStartIndex:P,columnStopIndex:F,deferredMeasurementCache:r,horizontalOffsetAdjustment:O,isScrolling:h,isScrollingOptOut:u,parent:this,rowSizeAndPositionManager:m.rowSizeAndPositionManager,rowStartIndex:M,rowStopIndex:k,scrollLeft:b,scrollTop:x,styleCache:this._styleCache,verticalOffsetAdjustment:_,visibleColumnIndices:j,visibleRowIndices:v}),this._columnStartIndex=P,this._columnStopIndex=F,this._rowStartIndex=M,this._rowStopIndex=k}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&(0,P.cancelAnimationTimeout)(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=(0,P.requestAnimationTimeout)(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,i=e.scrollLeft,n=e.scrollTop,s=e.totalColumnsWidth,r=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var i=e.scrollLeft,n=e.scrollTop,a=t.props,o=a.height;(0,a.onScroll)({clientHeight:o,clientWidth:a.width,scrollHeight:r,scrollLeft:i,scrollTop:n,scrollWidth:s})},indices:{scrollLeft:i,scrollTop:n}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var i=e.scrollLeft,n=e.scrollTop,s=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:n});s&&(s.needToResetStyleCache=!1,this.setState(s))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,i)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=t._getScrollLeftForScrollToColumnStateUpdate(e,i);n&&(n.needToResetStyleCache=!1,this.setState(n))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,i)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,i=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var n=this._rowStartIndex;n<=this._rowStopIndex;n++)for(var s=this._columnStartIndex;s<=this._columnStopIndex;s++){var r="".concat(n,"-").concat(s);this._styleCache[r]=e[r],i&&(this._cellCache[r]=t[r])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=t._getScrollTopForScrollToRowStateUpdate(e,i);n&&(n.needToResetStyleCache=!1,this.setState(n))}}],[{key:"getDerivedStateFromProps",value:function(e,i){var n={};0===e.columnCount&&0!==i.scrollLeft||0===e.rowCount&&0!==i.scrollTop?(n.scrollLeft=0,n.scrollTop=0):(e.scrollLeft!==i.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==i.scrollTop&&e.scrollToRow<0)&&Object.assign(n,t._getScrollToPositionStateUpdate({prevState:i,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var s,r,a=i.instanceProps;return n.needToResetStyleCache=!1,e.columnWidth===a.prevColumnWidth&&e.rowHeight===a.prevRowHeight||(n.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===a.prevIsScrolling&&Object.assign(n,{isScrolling:!1}),(0,b.default)({cellCount:a.prevColumnCount,cellSize:"number"==typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){s=t._getScrollLeftForScrollToColumnStateUpdate(e,i)}}),(0,b.default)({cellCount:a.prevRowCount,cellSize:"number"==typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){r=t._getScrollTopForScrollToRowStateUpdate(e,i)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=!0===e.isScrolling,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,n.instanceProps=a,M({},n,{},s,{},r)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,i=e.scrollLeft,n=e.scrollTop,s={scrollPositionChangeReason:k};return"number"==typeof i&&i>=0&&(s.scrollDirectionHorizontal=i>t.scrollLeft?v.SCROLL_DIRECTION_FORWARD:v.SCROLL_DIRECTION_BACKWARD,s.scrollLeft=i),"number"==typeof n&&n>=0&&(s.scrollDirectionVertical=n>t.scrollTop?v.SCROLL_DIRECTION_FORWARD:v.SCROLL_DIRECTION_BACKWARD,s.scrollTop=n),"number"==typeof i&&i>=0&&i!==t.scrollLeft||"number"==typeof n&&n>=0&&n!==t.scrollTop?s:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var i=e.columnCount,n=e.height,s=e.scrollToAlignment,r=e.scrollToColumn,a=e.width,o=t.scrollLeft,l=t.instanceProps;if(i>0){var c=i-1,p=r<0?c:Math.min(c,r),d=l.rowSizeAndPositionManager.getTotalSize(),u=l.scrollbarSizeMeasured&&d>n?l.scrollbarSize:0;return l.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:s,containerSize:a-u,currentOffset:o,targetIndex:p})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,i){var n=i.scrollLeft,s=t._getCalculatedScrollLeft(e,i);return"number"==typeof s&&s>=0&&n!==s?t._getScrollToPositionStateUpdate({prevState:i,scrollLeft:s,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var i=e.height,n=e.rowCount,s=e.scrollToAlignment,r=e.scrollToRow,a=e.width,o=t.scrollTop,l=t.instanceProps;if(n>0){var c=n-1,p=r<0?c:Math.min(c,r),d=l.columnSizeAndPositionManager.getTotalSize(),u=l.scrollbarSizeMeasured&&d>a?l.scrollbarSize:0;return l.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:s,containerSize:i-u,currentOffset:o,targetIndex:p})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,i){var n=i.scrollTop,s=t._getCalculatedScrollTop(e,i);return"number"==typeof s&&s>=0&&n!==s?t._getScrollToPositionStateUpdate({prevState:i,scrollLeft:-1,scrollTop:s}):{}}}]),t}(m.PureComponent),(0,g.default)(r,"propTypes",null),a);(0,g.default)(T,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:_.default,containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:y.default,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:v.default,overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),(0,E.polyfill)(T);var S=T;t.default=S},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.cellCount,i=e.cellSize,n=e.computeMetadataCallback,s=e.computeMetadataCallbackProps,r=e.nextCellsCount,a=e.nextCellSize,o=e.nextScrollToIndex,l=e.scrollToIndex,c=e.updateScrollOffsetForScrollToIndex;t===r&&("number"!=typeof i&&"number"!=typeof a||i===a)||(n(s),l>=0&&l===o&&c())}},function(e,t,i){e.exports=i(14)(2967)},function(e,t,i){"use strict";var n=i(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=n(i(39)),r=n(i(40)),a=n(i(0)),o=(i(35),function(){function e(t){var i=t.cellCount,n=t.cellSizeGetter,r=t.estimatedCellSize;(0,s.default)(this,e),(0,a.default)(this,"_cellSizeAndPositionData",{}),(0,a.default)(this,"_lastMeasuredIndex",-1),(0,a.default)(this,"_lastBatchedIndex",-1),(0,a.default)(this,"_cellCount",void 0),(0,a.default)(this,"_cellSizeGetter",void 0),(0,a.default)(this,"_estimatedCellSize",void 0),this._cellSizeGetter=n,this._cellCount=i,this._estimatedCellSize=r}return(0,r.default)(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,i=e.estimatedCellSize,n=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=i,this._cellSizeGetter=n}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),i=t.offset+t.size,n=this._lastMeasuredIndex+1;n<=e;n++){var s=this._cellSizeGetter({index:n});if(void 0===s||isNaN(s))throw Error("Invalid size returned for cell ".concat(n," of value ").concat(s));null===s?(this._cellSizeAndPositionData[n]={offset:i,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[n]={offset:i,size:s},i+=s,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,i=void 0===t?"auto":t,n=e.containerSize,s=e.currentOffset,r=e.targetIndex;if(n<=0)return 0;var a,o=this.getSizeAndPositionOfCell(r),l=o.offset,c=l-n+o.size;switch(i){case"start":a=l;break;case"end":a=c;break;case"center":a=l-(n-o.size)/2;break;default:a=Math.max(c,Math.min(l,s))}var p=this.getTotalSize();return Math.max(0,Math.min(p-n,a))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,i=e.offset;if(0===this.getTotalSize())return{};var n=i+t,s=this._findNearestCell(i),r=this.getSizeAndPositionOfCell(s);i=r.offset+r.size;for(var a=s;ii&&(e=n-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var i=1;e=e?this._binarySearch(i,0,e):this._exponentialSearch(i,e)}}]),e}());t.default=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMaxElementSize=void 0,t.getMaxElementSize=function(){return"undefined"!=typeof window&&window.chrome?16777100:15e5}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(i){var n=i.callback,s=i.indices,r=Object.keys(s),a=!e||r.every((function(e){var t=s[e];return Array.isArray(t)?t.length>0:t>=0})),o=r.length!==Object.keys(t).length||r.some((function(e){var i=t[e],n=s[e];return Array.isArray(n)?i.join(",")!==n.join(","):i!==n}));t=s,a&&o&&n(s)}}},function(e,t,i){"use strict";var n=i(33);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.cellSize,i=e.cellSizeAndPositionManager,n=e.previousCellsCount,s=e.previousCellSize,r=e.previousScrollToAlignment,a=e.previousScrollToIndex,o=e.previousSize,l=e.scrollOffset,c=e.scrollToAlignment,p=e.scrollToIndex,d=e.size,u=e.sizeJustIncreasedFromZero,f=e.updateScrollIndexCallback,g=i.getCellCount(),m=p>=0&&p0&&(di.getTotalSize()-d&&f(g-1)},n(i(45)),i(35)},function(e,t,i){"use strict";var n=i(33);t.__esModule=!0,t.default=function(e){if((!s&&0!==s||e)&&r.default){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),s=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return s};var s,r=n(i(102));e.exports=t.default},function(e,t,i){"use strict";t.__esModule=!0,t.default=void 0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.default=n,e.exports=t.default},function(e,t,i){"use strict";function n(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function s(e){this.setState(function(t){var i=this.constructor.getDerivedStateFromProps(e,t);return null!=i?i:null}.bind(this))}function r(e,t){try{var i=this.props,n=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(i,n)}finally{this.props=i,this.state=n}}Object.defineProperty(t,"__esModule",{value:!0}),n.__suppressDeprecationWarning=!0,s.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,t.polyfill=function(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var i=null,a=null,o=null;if("function"==typeof t.componentWillMount?i="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(i="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?o="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==i||null!==a||null!==o){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==i?"\n "+i:"")+(null!==a?"\n "+a:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=n,t.componentWillReceiveProps=s),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=r;var p=t.componentDidUpdate;t.componentDidUpdate=function(e,t,i){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:i;p.call(this,e,t,n)}}return e}},function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.caf=t.raf=void 0;var s=(n="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(e){return n.setTimeout(e,1e3/60)},r=n.cancelAnimationFrame||n.webkitCancelAnimationFrame||n.mozCancelAnimationFrame||n.oCancelAnimationFrame||n.msCancelAnimationFrame||function(e){n.clearTimeout(e)},a=s;t.raf=a;var o=r;t.caf=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.cellCount,i=e.overscanCellsCount,s=e.scrollDirection,r=e.startIndex,a=e.stopIndex;return i=Math.max(1,i),s===n?{overscanStartIndex:Math.max(0,r-1),overscanStopIndex:Math.min(t-1,a+i)}:{overscanStartIndex:Math.max(0,r-i),overscanStopIndex:Math.min(t-1,a+1)}},t.SCROLL_DIRECTION_VERTICAL=t.SCROLL_DIRECTION_HORIZONTAL=t.SCROLL_DIRECTION_FORWARD=t.SCROLL_DIRECTION_BACKWARD=void 0,i(35),t.SCROLL_DIRECTION_BACKWARD=-1;var n=1;t.SCROLL_DIRECTION_FORWARD=n,t.SCROLL_DIRECTION_HORIZONTAL="horizontal",t.SCROLL_DIRECTION_VERTICAL="vertical"},function(e,t,i){"use strict";var n=i(36);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"WindowScroller",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"IS_SCROLLING_TIMEOUT",{enumerable:!0,get:function(){return s.IS_SCROLLING_TIMEOUT}}),t.default=void 0;var s=n(i(53)),r=s.default;t.default=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerScrollListener=function(e,t){s.some((function(e){return e.props.scrollElement===t}))||t.addEventListener("scroll",c),s.push(e)},t.unregisterScrollListener=function(e,t){(s=s.filter((function(t){return t!==e}))).length||(t.removeEventListener("scroll",c),a&&((0,n.cancelAnimationTimeout)(a),o()))};var n=i(51),s=(i(53),[]),r=null,a=null;function o(){a&&(a=null,document.body&&null!=r&&(document.body.style.pointerEvents=r),r=null)}function l(){o(),s.forEach((function(e){return e.__resetIsScrolling()}))}function c(e){e.currentTarget===window&&null==r&&document.body&&(r=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){a&&(0,n.cancelAnimationTimeout)(a);var e=0;s.forEach((function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)})),a=(0,n.requestAnimationTimeout)(l,e)}(),s.forEach((function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()}))}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDimensions=function(e,t){if(e){if(n(e)){var i=window,r=i.innerHeight,a=i.innerWidth;return{height:"number"==typeof r?r:0,width:"number"==typeof a?a:0}}return s(e)}return{height:t.serverHeight,width:t.serverWidth}},t.getPositionOffset=function(e,t){if(n(t)&&document.documentElement){var i=document.documentElement,a=s(e),o=s(i);return{top:a.top-o.top,left:a.left-o.left}}var l=r(t),c=s(e),p=s(t);return{top:c.top+l.top-p.top,left:c.left+l.left-p.left}},t.getScrollOffset=r;var n=function(e){return e===window},s=function(e){return e.getBoundingClientRect()};function r(e){return n(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(110);case"v8light":return i(112)}},function(e,t,i){var n=i(31),s=i(111);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__item{min-height:50px;transition:border-color .5s cubic-bezier(.694,.0482,.335,1)}.pipelineProcessorsEditor__item--selected{border:1px solid #36a2ef}.pipelineProcessorsEditor__item--displayNone{display:none}.pipelineProcessorsEditor__item--dimmed{box-shadow:none}.pipelineProcessorsEditor__item__processorTypeLabel{line-height:32px}.pipelineProcessorsEditor__item__textContainer{border-bottom:1px dashed #0000;cursor:text}.pipelineProcessorsEditor__item__textContainer--notEditing{border-bottom:dotted #343741;border-width:1px}.pipelineProcessorsEditor__item__textContainer--notEditing:hover{border-color:#535966}.pipelineProcessorsEditor__item__description{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.pipelineProcessorsEditor__item__textInput{height:24px;min-width:200px}.pipelineProcessorsEditor__item__moveButton:hover{transform:none!important}.pipelineProcessorsEditor__item__moveButton--cancel{z-index:2000}.pipelineProcessorsEditor__item__statusContainer{min-width:15px}.pipelineProcessorsEditor__item__controlsContainer{overflow:hidden;width:100%}.pipelineProcessorsEditor__item__controlsFlexItem,.pipelineProcessorsEditor__item__descriptionContainer{min-width:0}.pipelineProcessorsEditor__item__descriptionContainer--displayNone{display:none}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(113);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__item{min-height:50px;transition:border-color .5s cubic-bezier(.694,.0482,.335,1)}.pipelineProcessorsEditor__item--selected{border:1px solid #07c}.pipelineProcessorsEditor__item--displayNone{display:none}.pipelineProcessorsEditor__item--dimmed{box-shadow:none}.pipelineProcessorsEditor__item__processorTypeLabel{line-height:32px}.pipelineProcessorsEditor__item__textContainer{border-bottom:1px dashed #0000;cursor:text}.pipelineProcessorsEditor__item__textContainer--notEditing{border-bottom:dotted #d3dae6;border-width:1px}.pipelineProcessorsEditor__item__textContainer--notEditing:hover{border-color:#98a2b3}.pipelineProcessorsEditor__item__description{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.pipelineProcessorsEditor__item__textInput{height:24px;min-width:200px}.pipelineProcessorsEditor__item__moveButton:hover{transform:none!important}.pipelineProcessorsEditor__item__moveButton--cancel{z-index:2000}.pipelineProcessorsEditor__item__statusContainer{min-width:15px}.pipelineProcessorsEditor__item__controlsContainer{overflow:hidden;width:100%}.pipelineProcessorsEditor__item__controlsFlexItem,.pipelineProcessorsEditor__item__descriptionContainer{min-width:0}.pipelineProcessorsEditor__item__descriptionContainer--displayNone{display:none}",""]),e.exports=t},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(115);case"v8light":return i(117)}},function(e,t,i){var n=i(31),s=i(116);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__tree__container{padding:8px}.pipelineProcessorsEditor__tree__dropZoneContainer{background-color:initial;height:2px;margin:2px;position:relative;visibility:hidden}.pipelineProcessorsEditor__tree__dropZoneContainer--visible{visibility:visible}.pipelineProcessorsEditor__tree__dropZoneContainer--visible:hover{background-color:#36a2ef}.pipelineProcessorsEditor__tree__dropZoneContainer--unavailable:hover{background-color:#535966}.pipelineProcessorsEditor__tree__dropZoneContainer__toolTip{pointer-events:none}.pipelineProcessorsEditor__tree__dropZoneButton{height:60px;margin-top:-30px;padding:0;position:absolute;text-decoration:none!important;width:100%;z-index:1000}.pipelineProcessorsEditor__tree__dropZoneButton--visible{pointer-events:visible!important}.pipelineProcessorsEditor__tree__dropZoneButton--visible:hover{transform:none!important}.pipelineProcessorsEditor__tree__dropZoneButton--compressed{height:30px}.pipelineProcessorsEditor__tree__addProcessorButton{width:-moz-fit-content;width:fit-content}.pipelineProcessorsEditor__tree__onFailureHandlerContainer{margin-bottom:8px;margin-top:8px}.pipelineProcessorsEditor__tree__onFailureHandlerContainer>*{overflow:visible}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(118);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__tree__container{padding:8px}.pipelineProcessorsEditor__tree__dropZoneContainer{background-color:initial;height:2px;margin:2px;position:relative;visibility:hidden}.pipelineProcessorsEditor__tree__dropZoneContainer--visible{visibility:visible}.pipelineProcessorsEditor__tree__dropZoneContainer--visible:hover{background-color:#07c}.pipelineProcessorsEditor__tree__dropZoneContainer--unavailable:hover{background-color:#98a2b3}.pipelineProcessorsEditor__tree__dropZoneContainer__toolTip{pointer-events:none}.pipelineProcessorsEditor__tree__dropZoneButton{height:60px;margin-top:-30px;padding:0;position:absolute;text-decoration:none!important;width:100%;z-index:1000}.pipelineProcessorsEditor__tree__dropZoneButton--visible{pointer-events:visible!important}.pipelineProcessorsEditor__tree__dropZoneButton--visible:hover{transform:none!important}.pipelineProcessorsEditor__tree__dropZoneButton--compressed{height:30px}.pipelineProcessorsEditor__tree__addProcessorButton{width:-moz-fit-content;width:fit-content}.pipelineProcessorsEditor__tree__onFailureHandlerContainer{margin-bottom:8px;margin-top:8px}.pipelineProcessorsEditor__tree__onFailureHandlerContainer>*{overflow:visible}",""]),e.exports=t},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(120);case"v8light":return i(122)}},function(e,t,i){var n=i(31),s=i(121);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".documentsDropdownPanel{min-width:200px}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(123);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".documentsDropdownPanel{min-width:200px}",""]),e.exports=t},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(125);case"v8light":return i(127)}},function(e,t,i){var n=i(31),s=i(126);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".addDocumentsAccordion{background-color:#25262e;padding:12px}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(128);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".addDocumentsAccordion{background-color:#f5f7fa;padding:12px}",""]),e.exports=t},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(130);case"v8light":return i(132)}},function(e,t,i){var n=i(31),s=i(131);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".documentsTab__documentField{position:relative}.documentsTab__documentField__button{position:absolute;right:0;top:0}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(133);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".documentsTab__documentField{position:relative}.documentsTab__documentField__button{position:absolute;right:0;top:0}",""]),e.exports=t},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(135);case"v8light":return i(137)}},function(e,t,i){var n=i(31),s=i(136);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__itemTooltip{pointer-events:none;position:fixed;z-index:3000}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(138);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineProcessorsEditor__itemTooltip{pointer-events:none;position:fixed;z-index:3000}",""]),e.exports=t},function(e,t,i){switch(window.__kbnThemeTag__){case"v8dark":return i(140);case"v8light":return i(142)}},function(e,t,i){var n=i(31),s=i(141);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineEditor{margin-bottom:32px}.pipelineEditor__container{background-color:#25262e}.pipelineEditor__onFailureTitle{padding-left:8px}",""]),e.exports=t},function(e,t,i){var n=i(31),s=i(143);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);n(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},function(e,t,i){(t=i(32)(!1)).push([e.i,".pipelineEditor{margin-bottom:32px}.pipelineEditor__container{background-color:#f5f7fa}.pipelineEditor__onFailureTitle{padding-left:8px}",""]),e.exports=t},function(e,t,i){var n,s=s||function(e){"use strict";if(!(void 0===e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,i=function(){return e.URL||e.webkitURL||e},n=t.createElementNS("http://www.w3.org/1999/xhtml","a"),s="download"in n,r=/constructor/i.test(e.HTMLElement)||e.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent),o=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},l=function(e){setTimeout((function(){"string"==typeof e?i().revokeObjectURL(e):e.remove()}),4e4)},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},p=function(t,p,d){d||(t=c(t));var u,f=this,g="application/octet-stream"===t.type,m=function(){!function(e,t,i){for(var n=(t=[].concat(t)).length;n--;){var s=e["on"+t[n]];if("function"==typeof s)try{s.call(e,e)}catch(e){o(e)}}}(f,"writestart progress write writeend".split(" "))};if(f.readyState=f.INIT,s)return u=i().createObjectURL(t),void setTimeout((function(){var e,t;n.href=u,n.download=p,e=n,t=new MouseEvent("click"),e.dispatchEvent(t),m(),l(u),f.readyState=f.DONE}));!function(){if((a||g&&r)&&e.FileReader){var n=new FileReader;return n.onloadend=function(){var t=a?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");e.open(t,"_blank")||(e.location.href=t),t=void 0,f.readyState=f.DONE,m()},n.readAsDataURL(t),void(f.readyState=f.INIT)}u||(u=i().createObjectURL(t)),g?e.location.href=u:e.open(u,"_blank")||(e.location.href=u),f.readyState=f.DONE,m(),l(u)}()},d=p.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,i){return t=t||e.name||"download",i||(e=c(e)),navigator.msSaveOrOpenBlob(e,t)}:(d.abort=function(){},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,function(e,t,i){return new p(e,t||e.name||"download",i)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content); /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */e.exports?e.exports.saveAs=s:null!==i(145)&&null!==i(146)&&(void 0===(n=function(){return s}.call(t,i,t,e))||(e.exports=n))},function(e,t,i){e.exports=i(14)(1802)},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,i){"use strict";i.r(t),i.d(t,"mountManagementSection",(function(){return Xs}));var n=i(9),s=i(18),r=i.n(s),a=i(27),o=i(10),l=i(2),c=i(21),p=i(20),d=i(34),u=i.n(d),f=i(23);const g={services:{}},m=Object(s.createContext)(g);var x=i(54),b=i.n(x),h=i(19);const j=({children:e,component:t,render:i,...n})=>{const a=Object(s.useMemo)((()=>{if(t)return e=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(v,null),Object(h.jsx)(t,e))}),[t]);if(a)return Object(h.jsx)(f.Route,u()({},n,{component:a}));if(i||"function"==typeof e){const t="function"==typeof e?e:i;return Object(h.jsx)(f.Route,u()({},n,{render:e=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(v,null),t(e))}))}return Object(h.jsx)(f.Route,n,Object(h.jsx)(v,null),e)},v=()=>{const{executionContext:e}=Object(s.useContext)(m).services,t=Object(f.useRouteMatch)();return function(e,t){b()((()=>(null==e||e.set(t),()=>{null==e||e.clear()})),[t])}(e,{type:"application",page:t.path,id:Object.keys(t.params).length>0?JSON.stringify(t.params):void 0}),null};var O=i(29);const _=({children:e,...t})=>Object(h.jsx)(f.Router,t,Object(h.jsx)(O.CompatRouter,null,e));var y=i(22);const E=({legacySwitch:e=!0,children:t})=>{const i=Object(f.useRouteMatch)();return e?Object(h.jsx)(f.Switch,null,t):Object(h.jsx)(O.Routes,null,s.Children.map(t,(e=>{if(r.a.isValidElement(e)&&e.type===j){var n;const s=Object(y.replace)(null==e?void 0:e.props.path,i.url+"/",""),a="function"==typeof(null==e?void 0:e.props.children)?null==e?void 0:e.props.children:null==e?void 0:e.props.render;return Object(h.jsx)(O.Route,{path:s,element:Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(v,null),(null==e||null===(n=e.props)||void 0===n?void 0:n.component)&&Object(h.jsx)(e.props.component,null)||a&&a()||t)})}return e})))};var P=i(58),F=i(5),M=i(8),k=i(7),T=i(6);const S=()=>{const{services:e}=Object(o.H)(),t=Object(f.useHistory)(),[i,n]=Object(s.useState)(!1),r=[{name:k.i18n.translate("xpack.ingestPipelines.list.table.emptyPrompt.createButtonLabel",{defaultMessage:"New pipeline"}),...Object(T.reactRouterNavigate)(t,Object(M.d)()),"data-test-subj":"emptyStateCreatePipelineButton"},{name:k.i18n.translate("xpack.ingestPipelines.list.table.emptyPrompt.createButtonLabel.createPipelineFromCsvButtonLabel",{defaultMessage:"New pipeline from CSV"}),...Object(T.reactRouterNavigate)(t,Object(M.c)()),"data-test-subj":"emptyStatecreatePipelineFromCsvButton"}];return Object(h.jsx)(p.EuiPageTemplate.EmptyPrompt,{iconType:"managementApp","data-test-subj":"emptyList",title:Object(h.jsx)("h2",{"data-test-subj":"title"},k.i18n.translate("xpack.ingestPipelines.list.table.emptyPromptTitle",{defaultMessage:"Start by creating a pipeline"})),body:Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.table.emptyPromptDescription",defaultMessage:"Use pipelines to remove or transform fields, extract values from text, and enrich your data before indexing."})," ",Object(h.jsx)(p.EuiLink,{href:e.documentation.getIngestNodeUrl(),target:"_blank",external:!0},k.i18n.translate("xpack.ingestPipelines.list.table.emptyPromptDocumentionLink",{defaultMessage:"Learn more"}))),actions:Object(h.jsx)(p.EuiPopover,{isOpen:i,closePopover:()=>n(!1),button:Object(h.jsx)(p.EuiButton,{fill:!0,iconSide:"right",iconType:"arrowDown","data-test-subj":"emptyStateCreatePipelineDropdown",key:"emptyStateCreatePipelineDropdown",onClick:()=>n((e=>!e))},k.i18n.translate("xpack.ingestPipelines.list.table.emptyCreatePipelineDropdownLabel",{defaultMessage:"Create pipeline"})),panelPaddingSize:"none",repositionOnScroll:!0},Object(h.jsx)(p.EuiContextMenu,{initialPanelId:0,"data-test-subj":"autoFollowPatternActionContextMenu",panels:[{id:0,items:r}]}))})},C=({pipelines:e,onReloadClick:t,onEditPipelineClick:i,onClonePipelineClick:n,onDeletePipelineClick:a})=>{const{history:l}=Object(o.H)().services,[d,f]=Object(s.useState)([]),[g,m]=Object(s.useState)(!1),x=[{name:k.i18n.translate("xpack.ingestPipelines.list.table.createPipelineButtonLabel",{defaultMessage:"New pipeline"}),...Object(T.reactRouterNavigate)(l,"/create"),"data-test-subj":"createNewPipeline"},{name:k.i18n.translate("xpack.ingestPipelines.list.table.createPipelineFromCsvButtonLabel",{defaultMessage:"New pipeline from CSV"}),...Object(T.reactRouterNavigate)(l,"/csv_create"),"data-test-subj":"createPipelineFromCsv"}],b={itemId:"name",isSelectable:!0,"data-test-subj":"pipelinesTable",sorting:{sort:{field:"name",direction:"asc"}},selection:{onSelectionChange:f},rowProps:()=>({"data-test-subj":"pipelineTableRow"}),cellProps:(e,t)=>{const{field:i}=t;return{"data-test-subj":`pipelineTableRow-${i}`}},search:{toolsLeft:d.length>0?Object(h.jsx)(p.EuiButton,{"data-test-subj":"deletePipelinesButton",onClick:()=>a(d.map((e=>e.name))),color:"danger"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.table.deletePipelinesButtonLabel",defaultMessage:"Delete {count, plural, one {pipeline} other {pipelines} }",values:{count:d.length}})):void 0,toolsRight:[Object(h.jsx)(p.EuiButton,{key:"reloadButton",iconType:"refresh",color:"success","data-test-subj":"reloadButton",onClick:t},k.i18n.translate("xpack.ingestPipelines.list.table.reloadButtonLabel",{defaultMessage:"Reload"})),Object(h.jsx)(p.EuiPopover,{isOpen:g,closePopover:()=>m(!1),button:Object(h.jsx)(p.EuiButton,{fill:!0,iconSide:"right",iconType:"arrowDown","data-test-subj":"createPipelineDropdown",key:"createPipelineDropdown",onClick:()=>m((e=>!e))},k.i18n.translate("xpack.ingestPipelines.list.table.createPipelineDropdownLabel",{defaultMessage:"Create pipeline"})),panelPaddingSize:"none",repositionOnScroll:!0},Object(h.jsx)(p.EuiContextMenu,{initialPanelId:0,"data-test-subj":"autoFollowPatternActionContextMenu",panels:[{id:0,items:x}]}))],box:{incremental:!0},filters:[{type:"is",field:"isManaged",name:k.i18n.translate("xpack.ingestPipelines.list.table.isManagedFilterLabel",{defaultMessage:"Managed"})}]},pagination:{initialPageSize:10,pageSizeOptions:[10,20,50]},columns:[{field:"name",name:k.i18n.translate("xpack.ingestPipelines.list.table.nameColumnTitle",{defaultMessage:"Name"}),sortable:!0,render:(e,t)=>Object(h.jsx)(p.EuiLink,u()({"data-test-subj":"pipelineDetailsLink"},Object(T.reactRouterNavigate)(l,{pathname:"/",search:`pipeline=${encodeURIComponent(e)}`})),e,t.isManaged&&Object(h.jsx)(r.a.Fragment,null," ",Object(h.jsx)(p.EuiBadge,{color:"hollow","data-test-subj":"isManagedBadge"},k.i18n.translate("xpack.ingestPipelines.list.table.managedBadgeLabel",{defaultMessage:"Managed"}))))},{name:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.table.actionColumnTitle",defaultMessage:"Actions"}),actions:[{isPrimary:!0,name:k.i18n.translate("xpack.ingestPipelines.list.table.editActionLabel",{defaultMessage:"Edit"}),description:k.i18n.translate("xpack.ingestPipelines.list.table.editActionDescription",{defaultMessage:"Edit this pipeline"}),type:"icon",icon:"pencil",onClick:({name:e})=>i(e)},{name:k.i18n.translate("xpack.ingestPipelines.list.table.cloneActionLabel",{defaultMessage:"Clone"}),description:k.i18n.translate("xpack.ingestPipelines.list.table.cloneActionDescription",{defaultMessage:"Clone this pipeline"}),type:"icon",icon:"copy",onClick:({name:e})=>n(e)},{isPrimary:!0,name:k.i18n.translate("xpack.ingestPipelines.list.table.deleteActionLabel",{defaultMessage:"Delete"}),description:k.i18n.translate("xpack.ingestPipelines.list.table.deleteActionDescription",{defaultMessage:"Delete this pipeline"}),type:"icon",icon:"trash",color:"danger",onClick:({name:e})=>a([e])}]}],items:null!=e?e:[]};return Object(h.jsx)(p.EuiInMemoryTable,b)},I=({json:e})=>{const t=Object(s.useRef)(0);return t.current++,Object(h.jsx)(p.EuiCodeBlock,{paddingSize:"s",language:"json",overflowHeight:e.length>0?300:void 0,isCopyable:!0,key:t.current},JSON.stringify(e,null,2))},w=(e,t=!0)=>t&&Array.isArray(e)||!t&&e&&"object"==typeof e&&!Array.isArray(e)?JSON.stringify(e,null,2):t?"[\n\n]":"{\n\n}",L=(e,t=!0)=>{let i;try{i=JSON.parse(e),t&&!Array.isArray(i)&&(i=[i])}catch{i=t?[]:{}}return i},R=({pipeline:e,onClose:t,onEditClick:i,onCloneClick:n,onDeleteClick:a})=>{var o;const[l,d]=Object(s.useState)(!1),u=[{name:k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.editActionLabel",{defaultMessage:"Edit"}),icon:Object(h.jsx)(p.EuiIcon,{type:"pencil"}),onClick:()=>i(e.name)},{name:k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.cloneActionLabel",{defaultMessage:"Clone"}),icon:Object(h.jsx)(p.EuiIcon,{type:"copy"}),onClick:()=>n(e.name)},{name:k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.deleteActionLabel",{defaultMessage:"Delete"}),icon:Object(h.jsx)(p.EuiIcon,{type:"trash"}),onClick:()=>{d(!1),a([e.name])}}],f=Object(h.jsx)(p.EuiButton,{"data-test-subj":"managePipelineButton","aria-label":k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.managePipelineActionsAriaLabel",{defaultMessage:"Manage pipeline"}),onClick:()=>d((e=>!e)),iconType:"arrowUp",iconSide:"right",fill:!0},k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.managePipelineButtonLabel",{defaultMessage:"Manage"}));return Object(h.jsx)(p.EuiFlyout,{onClose:t,"aria-labelledby":"pipelineDetailsFlyoutTitle","data-test-subj":"pipelineDetails",size:"m",maxWidth:550},Object(h.jsx)(p.EuiFlyoutHeader,null,Object(h.jsx)(p.EuiFlexGroup,{alignItems:"center",gutterSize:"s"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiTitle,{id:"pipelineDetailsFlyoutTitle","data-test-subj":"title"},Object(h.jsx)("h2",null,e.name))),e.isManaged?Object(h.jsx)(p.EuiFlexItem,{grow:!1}," ",Object(h.jsx)(p.EuiBadge,{color:"hollow"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.pipelineDetails.managedBadgeLabel",defaultMessage:"Managed"}))):null)),Object(h.jsx)(p.EuiFlyoutBody,null,Object(h.jsx)(p.EuiDescriptionList,null,e.description&&Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiDescriptionListTitle,null,k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.descriptionTitle",{defaultMessage:"Description"})),Object(h.jsx)(p.EuiDescriptionListDescription,null,e.description)),e.version&&Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiDescriptionListTitle,null,k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.versionTitle",{defaultMessage:"Version"})),Object(h.jsx)(p.EuiDescriptionListDescription,null,String(e.version))),Object(h.jsx)(p.EuiDescriptionListTitle,null,k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.processorsTitle",{defaultMessage:"Processors"})),Object(h.jsx)(p.EuiDescriptionListDescription,null,Object(h.jsx)(I,{json:e.processors})),(null===(o=e.on_failure)||void 0===o?void 0:o.length)&&Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiDescriptionListTitle,null,k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.failureProcessorsTitle",{defaultMessage:"Failure processors"})),Object(h.jsx)(p.EuiDescriptionListDescription,null,Object(h.jsx)(I,{json:e.on_failure}))),e._meta&&Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiDescriptionListTitle,{"data-test-subj":"metaTitle"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.pipelineDetails.metaDescriptionListTitle",defaultMessage:"Metadata"})),Object(h.jsx)(p.EuiDescriptionListDescription,null,Object(h.jsx)(p.EuiCodeBlock,{language:"json"},w(e._meta,!1)))))),Object(h.jsx)(p.EuiFlyoutFooter,null,Object(h.jsx)(p.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButtonEmpty,{iconType:"cross",onClick:t,flush:"left"},k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.closeButtonLabel",{defaultMessage:"Close"}))),Object(h.jsx)(p.EuiFlexGroup,{gutterSize:"none",alignItems:"center",justifyContent:"flexEnd"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiPopover,{isOpen:l,closePopover:()=>d(!1),button:f,panelPaddingSize:"none",repositionOnScroll:!0},Object(h.jsx)(p.EuiContextMenu,{initialPanelId:0,"data-test-subj":"autoFollowPatternActionContextMenu",panels:[{id:0,title:k.i18n.translate("xpack.ingestPipelines.list.pipelineDetails.managePipelinePanelTitle",{defaultMessage:"Pipeline options"}),items:u}]})))))))},D=({onClose:e,pipelineName:t})=>Object(h.jsx)(p.EuiFlyout,{onClose:e,size:"m",maxWidth:550},Object(h.jsx)(p.EuiFlyoutHeader,null,t&&Object(h.jsx)(p.EuiTitle,{id:"notFoundFlyoutTitle"},Object(h.jsx)("h2",null,t))),Object(h.jsx)(p.EuiFlyoutBody,null,Object(h.jsx)(p.EuiCallOut,{title:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.notFoundFlyoutMessage",defaultMessage:"Pipeline not found"}),color:"danger",iconType:"warning"}))),z=({pipelinesToDelete:e,callback:t})=>{const{services:i}=Object(o.H)(),n=e.length;return Object(h.jsx)(p.EuiConfirmModal,{buttonColor:"danger","data-test-subj":"deletePipelinesConfirmation",title:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.deleteModal.modalTitleText",defaultMessage:"Delete {numPipelinesToDelete, plural, one {pipeline} other {# pipelines}}",values:{numPipelinesToDelete:n}}),onCancel:()=>{t()},onConfirm:()=>{i.api.deletePipelines(e).then((({data:{itemsDeleted:n,errors:s},error:r})=>{const a=n&&n.length;if(a){const s=1===n.length?k.i18n.translate("xpack.ingestPipelines.deleteModal.successDeleteSingleNotificationMessageText",{defaultMessage:"Deleted pipeline '{pipelineName}'",values:{pipelineName:e[0]}}):k.i18n.translate("xpack.ingestPipelines.deleteModal.successDeleteMultipleNotificationMessageText",{defaultMessage:"Deleted {numSuccesses, plural, one {# pipeline} other {# pipelines}}",values:{numSuccesses:n.length}});t({hasDeletedPipelines:a}),i.notifications.toasts.addSuccess(s)}if(r||null!=s&&s.length){const t=(null==s?void 0:s.length)>1||r&&e.length>1?k.i18n.translate("xpack.ingestPipelines.deleteModal.multipleErrorsNotificationMessageText",{defaultMessage:"Error deleting {count} pipelines",values:{count:(null==s?void 0:s.length)||e.length}}):k.i18n.translate("xpack.ingestPipelines.deleteModal.errorNotificationMessageText",{defaultMessage:"Error deleting pipeline '{name}'",values:{name:s&&s[0].name||e[0]}});i.notifications.toasts.addDanger(t)}}))},cancelButtonText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.deleteModal.cancelButtonLabel",defaultMessage:"Cancel"}),confirmButtonText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.deleteModal.confirmButtonLabel",defaultMessage:"Delete {numPipelinesToDelete, plural, one {pipeline} other {pipelines} }",values:{numPipelinesToDelete:n}})},Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.deleteModal.deleteDescription",defaultMessage:"You are about to delete {numPipelinesToDelete, plural, one {this pipeline} other {these pipelines} }:",values:{numPipelinesToDelete:n}})),Object(h.jsx)("ul",null,e.map((e=>Object(h.jsx)("li",{key:e},e))))))};function A(e){const{services:t}=Object(o.H)(),i=Object(s.useMemo)((()=>new URLSearchParams(e.location.search).get("redirect_path")),[e.location.search]);return Object(s.useCallback)((n=>{i?t.application.navigateToUrl(i):e.push(n)}),[i,t.application,e])}const N=({history:e,location:t})=>{const{services:i}=Object(o.H)(),n=(e=>{const{pipeline:t}=Object(P.parse)(e.search.substring(1));return t})(t),[a,l]=Object(s.useState)(void 0),[d,u]=Object(s.useState)(!1),[f,g]=Object(s.useState)([]),{data:m,isLoading:x,error:b,resendRequest:j}=i.api.useLoadPipelines(),v=A(e);Object(s.useEffect)((()=>{i.metric.trackUiMetric(F.b),i.breadcrumbs.setBreadcrumbs("home")}),[i.metric,i.breadcrumbs]),Object(s.useEffect)((()=>{if(n&&null!=m&&m.length){const e=m.find((e=>e.name===n));l(e),u(!0)}}),[n,m]);const O=t=>{e.push(Object(M.e)({pipelineName:t}))},_=t=>{e.push(Object(M.b)({clonedPipelineName:t}))},y=()=>{u(!1),v(Object(M.f)())};return b?Object(h.jsx)(p.EuiPageTemplate.EmptyPrompt,{color:"danger",iconType:"warning",title:Object(h.jsx)("h2",{"data-test-subj":"pipelineLoadError"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.loadErrorTitle",defaultMessage:"Unable to load pipelines"})),body:Object(h.jsx)("p",null,b.message),actions:Object(h.jsx)(p.EuiButton,{onClick:j,iconType:"refresh",color:"danger"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.loadPipelineReloadButton",defaultMessage:"Try again"}))}):x?Object(h.jsx)(o.n,{"data-test-subj":"sectionLoading"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.loadingMessage",defaultMessage:"Loading pipelines..."})):m&&0===m.length?Object(h.jsx)(S,null):Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiPageHeader,{bottomBorder:!0,pageTitle:Object(h.jsx)("span",{"data-test-subj":"appTitle"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.listTitle",defaultMessage:"Ingest Pipelines"})),description:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.pipelinesDescription",defaultMessage:"Use pipelines to remove or transform fields, extract values from text, and enrich your data before indexing."}),rightSideItems:[Object(h.jsx)(p.EuiButtonEmpty,{href:i.documentation.getIngestNodeUrl(),target:"_blank",iconType:"help","data-test-subj":"documentationLink"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.list.pipelinesDocsLinkText",defaultMessage:"Ingest Pipelines docs"}))]}),Object(h.jsx)(p.EuiSpacer,{size:"l"}),Object(h.jsx)(C,{onReloadClick:j,onEditPipelineClick:O,onDeletePipelineClick:g,onClonePipelineClick:_,pipelines:m}),(()=>{if(d)return a?Object(h.jsx)(R,{pipeline:a,onClose:()=>{l(void 0),y()},onEditClick:O,onCloneClick:_,onDeleteClick:g}):Object(h.jsx)(D,{onClose:y,pipelineName:n})})(),(null==f?void 0:f.length)>0?Object(h.jsx)(z,{callback:e=>{null!=e&&e.hasDeletedPipelines&&(j(),l(void 0),y()),g([])},pipelinesToDelete:f}):null)},B=({closeFlyout:e,readProcessors:t})=>{const{services:i}=Object(o.H)(),n=Object(o.F)(),[r,a]=Object(s.useState)({}),l={...r,...t()};Object(s.useEffect)((()=>n.subscribe((async({isValid:e,validate:t,data:i})=>{(null!=e?e:await t())&&a(i.format())})).unsubscribe),[n]);const{name:c,...p}=l,d=`PUT _ingest/pipeline/${c||""}\n${JSON.stringify(p,null,2)}`,u=c?k.i18n.translate("xpack.ingestPipelines.requestFlyout.namedTitle",{defaultMessage:"Request for '{name}'",values:{name:c}}):k.i18n.translate("xpack.ingestPipelines.requestFlyout.unnamedTitle",{defaultMessage:"Request"});return Object(h.jsx)(o.t,{title:u,description:k.i18n.translate("xpack.ingestPipelines.requestFlyout.descriptionText",{defaultMessage:"This Elasticsearch request will create or update the pipeline."}),request:d,closeFlyout:e,flyoutProps:{maxWidth:550},application:i.application,urlService:i.share.url})};var U=i(24);const H=e=>e.join(">"),W=(e,t)=>{let i=t;for(const t of e)i=i[t];return i},V=Object.prototype.toString.call([]),q=Object.prototype.toString.call({}),G=e=>{const t=Object.prototype.toString.call(e);if(t===V)return[...e];if(t===q)return{...e};throw new Error(`Expected (${V}|${q}) but received ${t}`)},J=/^([0-9]+|onFailure|processors)$/,X=(e,t,i)=>{if(!e.length)return G(t);let n,s;for(let r=0;r/{{{.+}}}/.test(e);let Z;!function(e){e.top="TOP",e.bottom="BOTTOM"}(Z||(Z={}));const K=e=>{const t=e.onFailure?e.onFailure.map((e=>K(e))):void 0;return{...e,onFailure:t,id:Object(U.v4)(),options:{...e.options}}},Y=(e,t)=>e.every(((e,i)=>e===t[i])),Q=(e,t)=>{if("moveProcessor"===t.type){const{destination:i,source:n}=t.payload;try{return((e,t,i)=>{const n=t.slice(0,-1),s=i.slice(0,-1);if(Y(t,i))throw new Error("PARENT_CHILD_NEST_ERROR");const r=(o=s,!((a=n).length===o.length&&a.join(".")===o.join(".")));var a,o;const l=W(n,e),c=W(s,e),p=parseInt(t[t.length-1],10),d=W(n.slice(0,-1),e),u=l[p],f=i[i.length-1];let g;if(f===Z.top)g=0;else if(f===Z.bottom)g=1/0;else{if(!/^-?[0-9]+$/.test(f))throw new Error(`Expected number but received "${f}"`);g=parseInt(f,10)}if(r)c?c.splice(g,0,u):W(s.slice(0,-1),e).onFailure=[u],l.splice(p,1),l.length||d.isRoot||delete d.onFailure;else{c.splice(g,0,u);const e=p>g?p+1:p;l.splice(e,1)}return{...e,processors:[...e.processors],onFailure:[...e.onFailure]}})(e,n,i)}catch(t){return console.error(t),{...e}}}if("removeProcessor"===t.type){const{selector:i}=t.payload,n=i.slice(0,-1),s=n.slice(0,-1),r=parseInt(i[i.length-1],10),a=W(n,e);a.splice(r,1);const o=W(s,e);return a.length||!i.length||o.isRoot?X(n,e,[...a]):X(n,e,void 0)}if("addProcessor"===t.type){const{processor:i,targetSelector:n}=t.payload;if(!n.length)throw new Error("Expected target selector to contain a path, but received an empty array.");const s=W(n,e);if(!s)throw new Error(`Could not find processor or processors array at ${n.join(".")}`);if(Array.isArray(s))return X(n,e,s.concat({...i,id:Object(U.v4)()}));{const t={...i,id:Object(U.v4)()};return s.onFailure=s.onFailure?s.onFailure.concat(t):[t],X(n,e,s)}}if("updateProcessor"===t.type){const{processor:i,selector:n}=t.payload,s=n.slice(0,-1),r=parseInt(n[n.length-1],10);if(isNaN(r))throw new Error(`Expected numeric value, received ${r}`);const a=W(s,e);return a[r]=i,X(s,e,[...a])}if("duplicateProcessor"===t.type){const i=t.payload.source,n=W(i,e),s=parseInt(i[i.length-1],10),r=i.slice(0,-1),a=[...W(r,e)],o=K(n);return a.splice(s+1,0,o),X(r,e,a)}var i;return"loadProcessors"===t.type?{...t.payload.newState,onFailure:null!==(i=t.payload.newState.onFailure)&&void 0!==i?i:[],isRoot:!0}:e},ee=e=>{var t;const i=(e=>{const t=Object.keys(e)[0];if("string"!=typeof t)throw new Error(`Invalid processor type. Received "${t}"`);return t})(e),{on_failure:n,...s}=null!==(t=e[i])&&void 0!==t?t:{},r=null!=n&&n.length?te(n):n;return{id:Object(U.v4)(),type:i,onFailure:r,options:s}},te=e=>{const t=[];for(const i of e)t.push(ee(i));return t},ie=({processors:e,onFailure:t})=>({processors:te(e),onFailure:t?te(t):void 0}),ne=(e,t,i=1)=>{const n=e-i;if(n>=0){const s=t.processor_results[n];return s.doc?s.doc:ne(e,t,i+1)}},se=e=>{const{docs:t}=e;return t.map((e=>e.processor_results.reduce(((t,i,n)=>{const s={...i},r=s.tag;return 0!==n&&(s.processorInput=ne(n,e)),delete s.tag,t[r]=s,t}),{})))},re=(e,t)=>{const{options:i,onFailure:n,type:s,id:r}=e,a={[s]:{...i}};return null!=n&&n.length&&(a[s].on_failure=ae(n,t)),t&&(a[s].tag=r),a},ae=(e,t)=>{const i=[];for(const n of e)i.push(re(n,t));return i},oe=({pipeline:{processors:e,onFailure:t},copyIdToTag:i=!1})=>({processors:ae(e,i),on_failure:null!=t&&t.length?ae(t,i):void 0});var le=i(30),ce=i(46);const{emptyField:pe}=o.y,de=le.array(le.string),ue={booleanOrUndef:e=>"boolean"==typeof e?e:void 0,arrayOfStrings:e=>function(e){const t=de.decode(e);return Object(ce.isRight)(t)}(e)?e:"string"==typeof e&&e.length?[e]:[],jsonString:e=>e?JSON.stringify(e,null,2):"{}",escapeBackslashes:e=>{if("string"==typeof e){const t=JSON.stringify(e);return t.slice(1,t.length-1)}return e}},fe={optionalJson:e=>{if(e)try{const t=JSON.parse(e);if(Object.keys(t).length)return t}catch(e){}},optionalArrayOfStrings:e=>e.length?e:void 0,undefinedIfValue:e=>t=>t===e?void 0:t,emptyStringToUndefined:e=>""===e?void 0:e,unescapeBackslashes:e=>{if("string"==typeof e)try{return JSON.parse(`"${e}"`)}catch(t){return e}}},ge=({value:e})=>{if("string"!=typeof e||!(e=>{try{return JSON.parse(`"${e}"`),!0}catch(e){return!1}})(e))return{message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.jsonStringField.invalidStringMessage",{defaultMessage:"Invalid JSON string."})}},me=e=>t=>{const{value:i}=t;if("string"==typeof i&&Boolean(i.length)&&Boolean(i.trim().length))return pe(e)(t)},xe=200,{emptyField:be}=o.y,he={field:{type:o.d.TEXT,deserializer:String,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.fieldFieldLabel",{defaultMessage:"Field"}),validations:[{validator:be(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.fieldRequiredError",{defaultMessage:"A field value is required."}))}]}},je=({helpText:e,additionalValidations:t})=>Object(h.jsx)(o.s,{config:{...he.field,helpText:e,validations:he.field.validations.concat(null!=t?t:[])},component:o.e,path:"fields.field","data-test-subj":"fieldNameField"}),{emptyField:ve}=o.y,Oe={value:{defaultValue:[],type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.appendForm.valueFieldLabel",{defaultMessage:"Value"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.appendForm.valueFieldHelpText",{defaultMessage:"Values to append."}),validations:[{validator:ve(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.appendForm.valueRequiredError",{defaultMessage:"A value is required."}))}]},allow_duplicates:{type:o.d.TOGGLE,defaultValue:!0,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!0),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.appendForm.allowDuplicatesFieldLabel",{defaultMessage:"Allow duplicates"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.appendForm.allowDuplicatesFieldHelpText",{defaultMessage:"Allow appending values already present in the field."})},media_type:{type:o.d.SELECT,defaultValue:"application/json",serializer:fe.undefinedIfValue("application/json"),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.appendForm.mediaTypeFieldLabel",{defaultMessage:"Media type"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.appendForm.mediaTypeFieldHelpText",defaultMessage:"Media type for encoding value."})}},_e={type:o.d.TEXT,deserializer:String,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.targetFieldLabel",{defaultMessage:"Target field (optional)"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.targetFieldHelpText",{defaultMessage:"Output field. If empty, the input field is updated in place."})},ye="fields.target_field",Ee=e=>Object(h.jsx)(o.s,{config:{..._e,...e},component:o.e,path:ye,"data-test-subj":"targetField"}),Pe={type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.ignoreMissingFieldLabel",{defaultMessage:"Ignore missing"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.commonFields.ignoreMissingFieldHelpText",defaultMessage:"Ignore documents with a missing {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"field")}})},Fe=e=>Object(h.jsx)(o.s,{config:{...Pe,...e},component:o.q,path:"fields.ignore_missing","data-test-subj":"ignoreMissingSwitch"}),Me=["content","title","author","keywords","date","content_type","content_length","language"],ke={indexed_chars:{type:o.d.NUMBER,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.attachment.indexedCharsFieldLabel",{defaultMessage:"Indexed chars (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.attachment.indexedCharsFieldHelperText",defaultMessage:"The number of chars being used for extraction to prevent huge fields. Use -1 for no limit. Defaults to {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"100000")}})},indexed_chars_field:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.attachment.indexedCharsFieldFieldLabel",{defaultMessage:"Indexed chars field (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.attachment.indexedCharsFieldFieldHelperText",defaultMessage:"Field name from which you can overwrite the number of chars being used for extraction. Defaults to {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"null")}})},properties:{type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,serializer:fe.optionalArrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.attachment.propertiesFieldLabel",{defaultMessage:"Properties (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.attachment.propertiesFieldHelperText",defaultMessage:" Array of properties to select to be stored. Defaults to {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"all")}})},remove_binary:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.attachment.removeBinaryFieldLabel",{defaultMessage:"Remove binary"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.attachment.removeBinaryFieldHelpText",{defaultMessage:"If enabled, the binary field will be removed from the document."})},resource_name:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.attachment.resourceNameFieldLabel",{defaultMessage:"Resource name (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.attachment.resourceNameFieldHelperText",defaultMessage:"Field containing the name of the resource to decode. If specified, the processor passes this resource name to the underlying Tika library to enable Resource Name Based Detection."})}},{emptyField:Te}=o.y,{toInt:Se}=o.x,Ce={error_distance:{type:o.d.NUMBER,formatters:[Se],label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.circleForm.errorDistanceFieldLabel",{defaultMessage:"Error distance"}),helpText:()=>Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.circleForm.errorDistanceHelpText",defaultMessage:"Difference between the side of the inscribed shape to the encompassing circle. Determines the accuracy of the output polygon. Measured in meters for {geo_shape}, but uses no units for {shape}.",values:{geo_shape:Object(h.jsx)(p.EuiCode,null,"geo_shape"),shape:Object(h.jsx)(p.EuiCode,null,"shape")}}),validations:[{validator:Te(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.circleForm.errorDistanceError",{defaultMessage:"An error distance value is required."}))}]},shape_type:{type:o.d.SELECT,serializer:String,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.circleForm.shapeTypeFieldLabel",{defaultMessage:"Shape type"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.circleForm.shapeTypeFieldHelpText",{defaultMessage:"Field mapping type to use when processing the output polygon."}),validations:[{validator:Te(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.circleForm.shapeTypeRequiredError",{defaultMessage:"A shape type value is required."}))}]}},Ie=65535,we={max:o.y.numberSmallerThanField({than:Ie,allowEquality:!0,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.seedMaxNumberError",{defaultMessage:"This number must be equal or less than {maxValue}.",values:{maxValue:Ie}})}),min:o.y.numberGreaterThanField({than:0,allowEquality:!0,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.seedMinNumberError",{defaultMessage:"This number must be equal or greater than {minValue}.",values:{minValue:0}})})},Le={source_ip:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.sourceIpLabel",{defaultMessage:"Source IP (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.sourceIpHelpText",defaultMessage:"Field containing the source IP address. Defaults to {defaultValue}.",values:{defaultValue:Object(h.jsx)(p.EuiCode,null,"source.ip")}})},source_port:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.sourcePortLabel",{defaultMessage:"Source port (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.sourcePortHelpText",defaultMessage:"Field containing the source port. Defaults to {defaultValue}.",values:{defaultValue:Object(h.jsx)(p.EuiCode,null,"source.port")}})},destination_ip:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.destinationIpLabel",{defaultMessage:"Destination IP (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.destinationIpHelpText",defaultMessage:"Field containing the destination IP address. Defaults to {defaultValue}.",values:{defaultValue:Object(h.jsx)(p.EuiCode,null,"destination.ip")}})},destination_port:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.destinationPortLabel",{defaultMessage:"Destination port (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.destinationPortHelpText",defaultMessage:"Field containing the destination port. Defaults to {defaultValue}.",values:{defaultValue:Object(h.jsx)(p.EuiCode,null,"destination.port")}})},icmp_type:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.icmpTypeLabel",{defaultMessage:"ICMP type (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.icmpTypeHelpText",defaultMessage:"Field containing the destination ICMP type. Defaults to {defaultValue}.",values:{defaultValue:Object(h.jsx)(p.EuiCode,null,"icmp.type")}})},icmp_code:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.icmpCodeLabel",{defaultMessage:"ICMP code (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.icmpCodeHelpText",defaultMessage:"Field containing the ICMP code. Defaults to {defaultValue}.",values:{defaultValue:Object(h.jsx)(p.EuiCode,null,"icmp.code")}})},iana_number:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.ianaLabel",{defaultMessage:"IANA number (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.ianaNumberHelpText",defaultMessage:"Field containing the IANA number. Used only when {field} is not specified. Defaults to {defaultValue}.",values:{field:Object(h.jsx)(p.EuiCode,null,"Transport"),defaultValue:Object(h.jsx)(p.EuiCode,null,"network.iana_number")}})},transport:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.transportLabel",{defaultMessage:"Transport (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.transportHelpText",defaultMessage:"Field containing the transport protocol. Used only when {field} is not specified. Defaults to {defaultValue}.",values:{field:Object(h.jsx)(p.EuiCode,null,"IANA number"),defaultValue:Object(h.jsx)(p.EuiCode,null,"network.transport")}})},seed:{type:o.d.NUMBER,formatters:[o.x.toInt],serializer:fe.undefinedIfValue(""),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.communityId.seedLabel",{defaultMessage:"Seed (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.seedHelpText",defaultMessage:"Seed for the community ID hash. Defaults to {defaultValue}.",values:{defaultValue:Object(h.jsx)(p.EuiCode,null,"0")}}),validations:[{validator:e=>{var t;if(e.value)return null!==(t=we.max(e))&&void 0!==t?t:we.min(e)}}]}},{emptyField:Re}=o.y,De={type:{type:o.d.TEXT,defaultValue:"",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.typeFieldLabel",{defaultMessage:"Type"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.typeFieldHelpText",{defaultMessage:"Field data type for the output."}),validations:[{validator:Re(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.typeRequiredError",{defaultMessage:"A type value is required."}))}]}},{minLengthField:ze}=o.y,Ae=({value:e})=>"string"==typeof e&&""!==e&&1!==e.length?{message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.separatorLengthError",{defaultMessage:"Must be a single character."})}:void 0,Ne={target_fields:{type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.csvForm.targetFieldsFieldLabel",{defaultMessage:"Target fields"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.csvForm.targetFieldsHelpText",{defaultMessage:"Output fields. Extracted values are mapped to these fields."}),validations:[{validator:ze({length:1,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.csvForm.targetFieldRequiredError",{defaultMessage:"A target fields value is required."})})}]},separator:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.separatorFieldLabel",{defaultMessage:"Separator (optional)"}),validations:[{validator:Ae}],helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.convertForm.separatorHelpText",defaultMessage:"Delimiter used in the CSV data. Defaults to {value}.",values:{value:Object(h.jsx)(p.EuiCode,null,",")}})},quote:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.quoteFieldLabel",{defaultMessage:"Quote (optional)"}),validations:[{validator:Ae}],helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.convertForm.quoteHelpText",defaultMessage:"Escape character used in the CSV data. Defaults to {value}.",values:{value:Object(h.jsx)(p.EuiCode,null,'"')}})},trim:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.csvForm.trimFieldLabel",{defaultMessage:"Trim"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.csvForm.trimFieldHelpText",{defaultMessage:"Remove whitespaces in unquoted CSV data."})},empty_value:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.emptyValueFieldLabel",{defaultMessage:"Empty value (optional)"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.emptyValueFieldHelpText",{defaultMessage:"Used to fill empty fields. If no value is provided, empty fields are skipped."})}},{minLengthField:Be}=o.y,Ue={formats:{type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateForm.formatsFieldLabel",{defaultMessage:"Formats"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dateForm.formatsFieldHelpText",defaultMessage:"Expected date formats. Provided formats are applied sequentially. Accepts a Java time pattern or one of the following formats: {allowedFormats}.",values:{allowedFormats:Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiCode,null,"ISO8601"),",",Object(h.jsx)(p.EuiCode,null,"UNIX"),",",Object(h.jsx)(p.EuiCode,null,"UNIX_MS"),",",Object(h.jsx)(p.EuiCode,null,"TAI64N"))}}),validations:[{validator:Be({length:1,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateForm.formatsRequiredError",{defaultMessage:"A value for formats is required."})})}]},timezone:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateForm.timezoneFieldLabel",{defaultMessage:"Timezone (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dateForm.timezoneHelpText",defaultMessage:"Timezone for the date. Defaults to {timezone}.",values:{timezone:Object(h.jsx)(p.EuiCode,null,"UTC")}})},locale:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateForm.localeFieldLabel",{defaultMessage:"Locale (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dateForm.localeHelpText",defaultMessage:"Locale for the date. Useful when parsing month or day names. Defaults to {timezone}.",values:{timezone:Object(h.jsx)(p.EuiCode,null,"ENGLISH")}})},output_format:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateForm.outputFormatFieldLabel",{defaultMessage:"Output format (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dateForm.outputFormatHelpText",defaultMessage:"Format to use when writing the date to {targetField}. Must be a valid Java time pattern. Defaults to {defaultFormat}.",values:{targetField:Object(h.jsx)(p.EuiCode,null,"target_field"),defaultFormat:Object(h.jsx)(p.EuiCode,null,"yyyy-MM-dd'T'HH:mm:ss.SSSXXX")}})}},{emptyField:He}=o.y,We={date_rounding:{type:o.d.SELECT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRoundingFieldLabel",{defaultMessage:"Date rounding"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRoundingFieldHelpText",{defaultMessage:"Time period used to round the date when formatting the date into the index name."}),validations:[{validator:He(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRoundingRequiredError",{defaultMessage:"A date rounding value is required."}))}]},index_name_prefix:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.indexNamePrefixFieldLabel",{defaultMessage:"Index name prefix (optional)"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.indexNamePrefixFieldHelpText",{defaultMessage:"Prefix to add before the printed date in the index name."})},index_name_format:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.indexNameFormatFieldLabel",{defaultMessage:"Index name format (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.indexNameFormatFieldHelpText",defaultMessage:"Date format used to print the parsed date into the index name. Defaults to {value}.",values:{value:Object(h.jsx)(p.EuiCode,null,"yyyy-MM-dd")}})},date_formats:{type:o.d.COMBO_BOX,serializer:e=>e.length?e:void 0,deserializer:ue.arrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateFormatsFieldLabel",{defaultMessage:"Date formats (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateFormatsHelpText",defaultMessage:"Expected date formats. Provided formats are applied sequentially. Accepts a Java time pattern, ISO8601, UNIX, UNIX_MS, or TAI64N formats. Defaults to {value}.",values:{value:Object(h.jsx)(p.EuiCode,null,"yyyy-MM-dd'T'HH:mm:ss.SSSXX")}})},timezone:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.timezoneFieldLabel",{defaultMessage:"Timezone (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.timezoneHelpText",defaultMessage:"Timezone used when parsing the date and constructing the index name expression. Defaults to {timezone}.",values:{timezone:Object(h.jsx)(p.EuiCode,null,"UTC")}})},locale:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.localeFieldLabel",{defaultMessage:"Locale (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dateIndexForm.localeHelpText",defaultMessage:"Locale to use when parsing the date. Useful when parsing month or day names. Defaults to {locale}.",values:{locale:Object(h.jsx)(p.EuiCode,null,"ENGLISH")}})}};i(63);const Ve={removeItemButtonAriaLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dragAndDropList.removeItemLabel",{defaultMessage:"Remove item"})};function qe({label:e,helpText:t,error:i,value:n,onMove:a,onAdd:l,onRemove:c,addLabel:d,textValidations:f,textDeserializer:g,textSerializer:m}){const[x]=Object(s.useState)((()=>Object(U.v4)())),[b]=Object(s.useState)((()=>Object(U.v4)())),j=Object(s.useCallback)((({source:e,destination:t})=>{e&&t&&a(e.index,t.index)}),[a]);return Object(h.jsx)(p.EuiFormRow,{isInvalid:"string"==typeof i,error:i,fullWidth:!0,"data-test-subj":"droppableList"},Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiFlexGroup,{className:"pipelineProcessorsEditor__form__dragAndDropList__labelContainer",justifyContent:"flexStart",direction:"column",gutterSize:"none"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiText,{size:"xs"},Object(h.jsx)("label",{htmlFor:b},Object(h.jsx)("strong",null,e)))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiText,{size:"xs",color:"subdued"},Object(h.jsx)("p",null,t)))),Object(h.jsx)("div",{className:"pipelineProcessorsEditor__form__dragAndDropList__panel"},Object(h.jsx)(p.EuiDragDropContext,{onDragEnd:j},Object(h.jsx)(p.EuiDroppable,{droppableId:x},n.map(((e,t)=>Object(h.jsx)(p.EuiDraggable,{customDragHandle:!0,spacing:"none",draggableId:String(e.id),index:t,key:e.id},(i=>Object(h.jsx)(p.EuiFlexGroup,{className:"pipelineProcessorsEditor__form__dragAndDropList__item",justifyContent:"center",gutterSize:"none"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)("div",u()({},i.dragHandleProps,{className:"pipelineProcessorsEditor__form__dragAndDropList__grabIcon"}),Object(h.jsx)(p.EuiIcon,{type:"grab"}))),Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{path:e.path,config:{validations:f?f.map((e=>({validator:e}))):void 0,deserializer:g,serializer:m},readDefaultValueOnForm:!e.isNew},(e=>{const{isInvalid:i,errorMessage:n}=Object(o.z)(e);return Object(h.jsx)(p.EuiFormRow,{isInvalid:i,error:n,fullWidth:!0},Object(h.jsx)(p.EuiFieldText,{"data-test-subj":`input-${t}`,id:0===t?b:void 0,isInvalid:i,value:e.value,onChange:e.onChange,compressed:!0,fullWidth:!0}))}))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},n.length>1?Object(h.jsx)(p.EuiButtonIcon,{"aria-label":Ve.removeItemButtonAriaLabel,className:"pipelineProcessorsEditor__form__dragAndDropList__removeButton",iconType:"minusInCircle",color:"danger",onClick:()=>c(e.id),size:"s"}):Object(h.jsx)(p.EuiIcon,{className:"pipelineProcessorsEditor__form__dragAndDropList__removeButton",type:"empty"}))))))))),Object(h.jsx)(p.EuiButtonEmpty,{iconType:"plusInCircle",onClick:l,"data-test-subj":"addButton"},d))))}const Ge=Object(s.memo)(qe);var Je=i(25);i(68);const Xe=({field:e,editorProps:t})=>{const{value:i,helpText:n,setValue:s,label:r}=e,{errorMessage:a}=Object(o.z)(e);return Object(h.jsx)(p.EuiFormRow,{label:r,helpText:n,isInvalid:"string"==typeof a,error:a,fullWidth:!0},Object(h.jsx)(p.EuiPanel,{className:"pipelineProcessorsEditor__form__textEditor__panel",paddingSize:"s",hasShadow:!1},Object(h.jsx)(o.b,u()({value:i,onChange:s},t))))},{useXJsonMode:$e}=o.v,Ze={minimap:{enabled:!1},lineNumbers:"off"},Ke=({field:e,editorProps:t})=>{const{value:i,setValue:n}=e,{xJson:r,setXJson:a,convertToJson:o}=$e(i),l=Object(s.useCallback)((e=>{a(e),n(o(e))}),[n,a,o]);return Object(h.jsx)(Xe,{field:e,editorProps:{value:r,languageId:Je.XJsonLang.ID,options:Ze,onChange:l,...t}})};i(73);const Ye={removeItemButtonAriaLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.inputList.removeItemLabel",{defaultMessage:"Remove item"})};function Qe({label:e,helpText:t,error:i,value:n,onAdd:a,onRemove:l,addLabel:c,textValidations:d,textDeserializer:u,textSerializer:f}){const[g]=Object(s.useState)((()=>Object(U.v4)()));return Object(h.jsx)(p.EuiFormRow,{isInvalid:"string"==typeof i,error:i,fullWidth:!0,"data-test-subj":"droppableList"},Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiFlexGroup,{className:"pipelineProcessorsEditor__form__inputList__labelContainer",justifyContent:"flexStart",direction:"column",gutterSize:"none"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiText,{size:"xs"},Object(h.jsx)("label",{htmlFor:g},Object(h.jsx)("strong",null,e)))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiText,{size:"xs",color:"subdued"},Object(h.jsx)("p",null,t)))),Object(h.jsx)("div",{className:"pipelineProcessorsEditor__form__inputList__panel"},n.map(((e,t)=>Object(h.jsx)(p.EuiFlexGroup,{key:t,className:"pipelineProcessorsEditor__form__inputList__item",justifyContent:"center",gutterSize:"none"},Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{path:e.path,config:{validations:d?d.map((e=>({validator:e}))):void 0,deserializer:u,serializer:f},readDefaultValueOnForm:!e.isNew},(e=>{const{isInvalid:i,errorMessage:n}=Object(o.z)(e);return Object(h.jsx)(p.EuiFormRow,{isInvalid:i,error:n,fullWidth:!0},Object(h.jsx)(p.EuiFieldText,{"data-test-subj":`input-${t}`,id:0===t?g:void 0,isInvalid:i,value:e.value,onChange:e.onChange,compressed:!0,fullWidth:!0}))}))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},n.length>1?Object(h.jsx)(p.EuiButtonIcon,{"aria-label":Ye.removeItemButtonAriaLabel,className:"pipelineProcessorsEditor__form__inputList__removeButton",iconType:"minusInCircle",color:"danger",onClick:()=>l(e.id),size:"s"}):Object(h.jsx)(p.EuiIcon,{className:"pipelineProcessorsEditor__form__inputList__removeButton",type:"empty"}))))),Object(h.jsx)(p.EuiButtonEmpty,{iconType:"plusInCircle",onClick:a,"data-test-subj":"addButton"},c))))}const{emptyField:et}=o.y,tt={path:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dotExpanderForm.pathFieldLabel",{defaultMessage:"Path"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dotExpanderForm.pathHelpText",{defaultMessage:"Output field. Only required if the field to expand is part another object field."})},override:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dotExpanderForm.overrideFieldLabel",{defaultMessage:"Override"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dotExpanderForm.overrideFieldHelpText",{defaultMessage:"Controls the behavior when there is already an existing nested object that conflicts with the expanded field. When disabled, the processor will merge conflicts by combining the old and the new values into an array. If enabled, the value from the expanded field will overwrite the existing value."})}},{emptyField:it,numberSmallerThanField:nt,numberGreaterThanField:st}=o.y,rt={max:nt({than:128,allowEquality:!0,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.maxMatchesMaxNumberError",{defaultMessage:"This number must be less than 128."})}),min:st({than:0,allowEquality:!1,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.maxMatchesMinNumberError",{defaultMessage:"This number must be greater than 0."})})},at={validator:it(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.targetFieldRequiredError",{defaultMessage:"A target field value is required."}))},ot={policy_name:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.policyNameFieldLabel",{defaultMessage:"Policy name"}),validations:[{validator:it(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.policyNameRequiredError",{defaultMessage:"A value is required."}))}]},override:{type:o.d.TOGGLE,defaultValue:!0,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!0),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.overrideFieldLabel",{defaultMessage:"Override"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.overrideFieldHelpText",{defaultMessage:"If enabled, the processor can overwrite pre-existing field values."})},max_matches:{type:o.d.NUMBER,defaultValue:1,deserializer:e=>"number"!=typeof e||isNaN(e)?1:e,serializer:e=>{const t=parseInt(e,10);return 1===t?void 0:t},label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.maxMatchesFieldLabel",{defaultMessage:"Maximum matches (optional)"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.maxMatchesFieldHelpText",{defaultMessage:"Number of matching enrich documents to include in the target field. Accepts 1–128."}),validations:[{validator:e=>{var t;if(e.value)return null!==(t=rt.max(e))&&void 0!==t?t:rt.min(e)}}]},shape_relation:{type:o.d.SELECT,defaultValue:"INTERSECTS",deserializer:String,serializer:e=>"INTERSECTS"===e?void 0:e,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.shapeRelationFieldLabel",{defaultMessage:"Shape relation (optional)"})}},{emptyField:lt}=o.y,ct={message:{type:o.d.TEXT,deserializer:String,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.failForm.messageFieldLabel",{defaultMessage:"Message"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.failForm.messageHelpText",{defaultMessage:"Error message returned by the processor."}),validations:[{validator:lt(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.failForm.valueRequiredError",{defaultMessage:"A message is required."}))}]}},pt={fields:{type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.fingerprint.fieldNameField",{defaultMessage:"Fields"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.fingerprint.fieldNameHelpText",{defaultMessage:"Fields to include in the fingerprint."}),validations:[{validator:o.y.emptyField(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.fingerprint.fieldNameRequiredError",{defaultMessage:"A field value is required."}))}]},salt:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.fingerprint.saltFieldLabel",{defaultMessage:"Salt (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.fingerprint.saltHelpText",defaultMessage:"Salt value for the hash function."})},method:{type:o.d.SELECT,defaultValue:"SHA-1",serializer:e=>"SHA-1"===e||""===e?void 0:e,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.fingerprint.methodFieldLabel",{defaultMessage:"Method"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.fingerprint.methodHelpText",defaultMessage:"Hash method used to compute the fingerprint."})}},{emptyField:dt,isJsonField:ut}=o.y,ft={processor:{type:o.d.TEXT,deserializer:ue.jsonString,serializer:JSON.parse,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.foreachForm.processorFieldLabel",{defaultMessage:"Processor"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.foreachForm.processorHelpText",{defaultMessage:"Ingest processor to run on each array value."}),validations:[{validator:dt(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.foreachForm.processorRequiredError",{defaultMessage:"A processor is required."}))},{validator:ut(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.foreachForm.processorInvalidJsonError",{defaultMessage:"Invalid JSON"}))}]}},gt={tile_type:{type:o.d.TEXT,defaultValue:"",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.tileTypeFieldLabel",{defaultMessage:"Tile type"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.tileTypeFieldHelpText",{defaultMessage:"The type of tile from field."}),validations:[{validator:o.y.emptyField(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.tileTypeRequiredError",{defaultMessage:"A tile type value is required."}))}]},parent_field:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.parentFieldLabel",{defaultMessage:"Parent field (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.geoGrid.parentFieldHelperText",defaultMessage:"If specified and a parent tile exists, save that tile address to this field."})},children_field:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.childrenFieldLabel",{defaultMessage:"Children field (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.geoGrid.childrenFieldHelperText",defaultMessage:"If specified and a children tile exists, save those tile addresses to this field as an array of strings."})},non_children_field:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.nonchildrenFieldLabel",{defaultMessage:"Non children field (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.geoGrid.nonchildrenFieldHelperText",defaultMessage:"If specified and intersecting non-child tiles exist, save their addresses to this field as an array of strings."})},precision_field:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.precisionFieldLabel",{defaultMessage:"Precision field (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.geoGrid.precisionFieldHelperText",defaultMessage:"If specified, save the tile precision (zoom) as an integer to this field."})},target_format:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,defaultValue:"",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.targetFormatFieldLabel",{defaultMessage:"Target format (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.geoGrid.targetFormatFieldHelperText",defaultMessage:"Which format to save the generated polygon in. Defaults to: {value}.",values:{value:Object(h.jsx)(p.EuiCode,null,"Geo-JSON")}})}},mt={type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,serializer:e=>e.length?e:void 0,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.propertiesFieldLabel",{defaultMessage:"Properties (optional)"})},xt=({helpText:e,euiFieldProps:t})=>Object(h.jsx)(o.s,{config:{...mt,helpText:e},component:o.c,path:"fields.properties",componentProps:{euiFieldProps:t}}),bt={database_file:{type:o.d.TEXT,serializer:e=>"GeoLite2-City.mmdb"===e||""===e?void 0:e,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoIPForm.databaseFileLabel",{defaultMessage:"Database file (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.geoIPForm.databaseFileHelpText",defaultMessage:"GeoIP2 database file in the {ingestGeoIP} configuration directory. Defaults to {databaseFile}.",values:{databaseFile:Object(h.jsx)(p.EuiCode,null,"GeoLite2-City.mmdb"),ingestGeoIP:Object(h.jsx)(p.EuiCode,null,"ingest-geoip")}})},first_only:{type:o.d.TOGGLE,defaultValue:!0,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!0),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoIPForm.firstOnlyFieldLabel",{defaultMessage:"First only"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoIPForm.firstOnlyFieldHelpText",{defaultMessage:"Use the first matching geo data, even if the field contains an array."})}},{isJsonField:ht,emptyField:jt}=o.y,vt={addPatternLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.patternsAddPatternLabel",{defaultMessage:"Add pattern"})},Ot=k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.patternsValueRequiredError",{defaultMessage:"A value is required."}),_t=[jt(Ot)],yt={patterns:{label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.patternsFieldLabel",{defaultMessage:"Patterns"}),deserializer:String,helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.patternsHelpText",{defaultMessage:"Grok expressions used to match and extract named capture groups. Uses the first matching expression."}),validations:[{validator:({value:e,formData:t})=>{if(0===e.length)return{message:Ot}}}]},pattern_definitions:{type:o.d.TEXT,deserializer:ue.jsonString,serializer:fe.optionalJson,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.patternDefinitionsLabel",{defaultMessage:"Pattern definitions (optional)"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.patternDefinitionsHelpText",{defaultMessage:"A map of pattern-name and pattern tuples defining custom patterns. Patterns matching existing names will override the pre-existing definition."}),validations:[{validator:ht(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.patternsDefinitionsInvalidJSONError",{defaultMessage:"Invalid JSON"}),{allowEmptyString:!0})}]},trace_match:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.traceMatchFieldLabel",{defaultMessage:"Trace match"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.traceMatchFieldHelpText",{defaultMessage:"Add metadata about the matching expression to the document."})}},{emptyField:Et}=o.y,Pt={pattern:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.gsubForm.patternFieldLabel",{defaultMessage:"Pattern"}),deserializer:Object(y.flow)(String,ue.escapeBackslashes),serializer:fe.unescapeBackslashes,helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.gsubForm.patternFieldHelpText",{defaultMessage:"Regular expression used to match substrings in the field."}),validations:[{validator:Et(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.gsubForm.patternRequiredError",{defaultMessage:"A value is required."}))},{validator:ge}]},replacement:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.gsubForm.replacementFieldLabel",{defaultMessage:"Replacement"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.gsubForm.replacementFieldHelpText",{defaultMessage:"Replacement text for matches. A blank value will remove the matched text from the resulting text."})}},{emptyField:Ft,isJsonField:Mt}=o.y,kt={documentation:{linkLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.inferenceForm.inferenceConfigField.documentationLinkLabel",{defaultMessage:"documentation"})}};function Tt(e){return Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.inferenceForm.inferenceConfigurationHelpText",defaultMessage:"Contains the inference type and its options. Refer to the {documentation} for the available configuration options.",values:{documentation:Object(h.jsx)(p.EuiLink,{external:!0,target:"_blank",href:e},kt.documentation.linkLabel)}})}const St={model_id:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.inferenceForm.modelIDFieldLabel",{defaultMessage:"Model ID"}),deserializer:String,helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.inferenceForm.modelIDFieldHelpText",{defaultMessage:"ID of the model to infer against."}),validations:[{validator:Ft(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.inferenceForm.patternRequiredError",{defaultMessage:"A model ID value is required."}))}]},field_map:{type:o.d.TEXT,deserializer:ue.jsonString,serializer:fe.optionalJson,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.inferenceForm.fieldMapLabel",{defaultMessage:"Field map (optional)"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.inferenceForm.fieldMapHelpText",{defaultMessage:"Maps document field names to the known field names of the model. Takes precedence over any mappings in the model."}),validations:[{validator:Mt(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.inferenceForm.fieldMapInvalidJSONError",{defaultMessage:"Invalid JSON"}),{allowEmptyString:!0})}]},inference_config:{type:o.d.TEXT,deserializer:ue.jsonString,serializer:fe.optionalJson,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.inferenceForm.inferenceConfigLabel",{defaultMessage:"Inference configuration (optional)"}),validations:[{validator:Mt(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.patternsDefinitionsInvalidJSONError",{defaultMessage:"Invalid JSON"}),{allowEmptyString:!0})}]}},{emptyField:Ct}=o.y,It={separator:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.joinForm.separatorFieldLabel",{defaultMessage:"Separator"}),deserializer:String,helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.joinForm.separatorFieldHelpText",{defaultMessage:"Separator character."}),validations:[{validator:Ct(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.joinForm.separatorRequiredError",{defaultMessage:"A value is required."}))}]}},wt="fields.add_to_root",Lt={add_to_root:{type:o.d.TOGGLE,defaultValue:!1,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.jsonForm.addToRootFieldLabel",{defaultMessage:"Add to root"}),deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.jsonForm.addToRootFieldHelpText",{defaultMessage:"Add the JSON object to the top level of the document. Cannot be combined with a target field."})}},Rt={field_split:{type:o.d.TEXT,deserializer:String,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.fieldSplitFieldLabel",{defaultMessage:"Field split"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.kvForm.fieldSplitHelpText",defaultMessage:"Regex pattern used to delimit the key-value pairs. Typically a space character ({space}).",values:{space:Object(h.jsx)(p.EuiCode,null,'" "')}}),validations:[{validator:me(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.fieldSplitRequiredError",{defaultMessage:"A value is required."}))}]},value_split:{type:o.d.TEXT,deserializer:String,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.valueSplitFieldLabel",{defaultMessage:"Value split"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.kvForm.valueSplitHelpText",defaultMessage:"Regex pattern used to split keys and values. Typically an assignment operator ({equal}).",values:{equal:Object(h.jsx)(p.EuiCode,null,'"="')}}),validations:[{validator:me(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.valueSplitRequiredError",{defaultMessage:"A value is required."}))}]},include_keys:{type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,serializer:fe.optionalArrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.includeKeysFieldLabel",{defaultMessage:"Include keys"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.includeKeysHelpText",{defaultMessage:"List of extracted keys to include in the output. Defaults to all keys."})},exclude_keys:{type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,serializer:fe.optionalArrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.excludeKeysFieldLabel",{defaultMessage:"Exclude keys"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.excludeKeysHelpText",{defaultMessage:"List of extracted keys to exclude from the output."})},prefix:{type:o.d.TEXT,deserializer:String,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.prefixFieldLabel",{defaultMessage:"Prefix"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.prefixHelpText",{defaultMessage:"Prefix to add to extracted keys."})},trim_key:{type:o.d.TEXT,deserializer:String,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.trimKeyFieldLabel",{defaultMessage:"Trim key"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.trimKeyHelpText",{defaultMessage:"Characters to trim from extracted keys."})},trim_value:{type:o.d.TEXT,deserializer:String,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.trimValueFieldLabel",{defaultMessage:"Trim value"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.trimValueHelpText",{defaultMessage:"Characters to trim from extracted values."})},strip_brackets:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.stripBracketsFieldLabel",{defaultMessage:"Strip brackets"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.kvForm.stripBracketsHelpText",defaultMessage:"Remove brackets ( {paren}, {angle}, {square}) and quotes ({singleQuote}, {doubleQuote}) from extracted values.",values:{paren:Object(h.jsx)(p.EuiCode,null,"()"),angle:Object(h.jsx)(p.EuiCode,null,"<>"),square:Object(h.jsx)(p.EuiCode,null,"[]"),singleQuote:Object(h.jsx)(p.EuiCode,null,"'"),doubleQuote:Object(h.jsx)(p.EuiCode,null,'"')}})}},Dt=["loopback","unicast","global_unicast","multicast","interface_local_multicast","link_local_unicast","link_local_multicast","link_local_multicast","private","public","unspecified"],zt={source_ip:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.networkDirection.sourceIpLabel",{defaultMessage:"Source IP (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.networkDirection.sourceIpHelpText",defaultMessage:"Field containing the source IP address. Defaults to {defaultField}.",values:{defaultField:Object(h.jsx)(p.EuiCode,null,"source.ip")}})},destination_ip:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.networkDirection.destinationIpLabel",{defaultMessage:"Destination IP (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.networkDirection.destionationIpHelpText",defaultMessage:"Field containing the destination IP address. Defaults to {defaultField}.",values:{defaultField:Object(h.jsx)(p.EuiCode,null,"destination.ip")}})}},At=e=>({internal_networks:{path:"fields.internal_networks",euiFieldProps:{noSuggestions:!1,options:Dt.map((e=>({label:e})))},config:{type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,serializer:fe.optionalArrayOfStrings,fieldsToValidateOnChange:["fields.internal_networks","fields.internal_networks_field"],validations:[{validator:({value:e,path:t,formData:i})=>{if(Object(y.isEmpty)(e)&&Object(y.isEmpty)(i["fields.internal_networks_field"]))return{path:t,message:"A field value is required."}}}],label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.networkDirection.internalNetworksLabel",{defaultMessage:"Internal networks"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.networkDirection.internalNetworksHelpText",defaultMessage:"List of internal networks."})},labelAppend:Object(h.jsx)(p.EuiText,{size:"xs"},Object(h.jsx)(p.EuiLink,{onClick:e,"data-test-subj":"toggleCustomField"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.internalNetworkCustomLabel",defaultMessage:"Use custom field"}))),key:"preset"},internal_networks_field:{path:"fields.internal_networks_field",config:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,fieldsToValidateOnChange:["fields.internal_networks","fields.internal_networks_field"],validations:[{validator:({value:e,path:t,formData:i})=>{if(Object(y.isEmpty)(e)&&Object(y.isEmpty)(i["fields.internal_networks"]))return{path:t,message:"A field value is required."}}}],label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.networkDirection.internalNetworksFieldLabel",{defaultMessage:"Internal networks field"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.networkDirection.internalNetworksFieldHelpText",defaultMessage:"Field stating where to read the {field} configuration from.",values:{field:Object(h.jsx)(p.EuiCode,null,"internal_networks")}})},labelAppend:Object(h.jsx)(p.EuiText,{size:"xs"},Object(h.jsx)(p.EuiLink,{onClick:e,"data-test-subj":"toggleCustomField"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.internalNetworkPredefinedLabel",defaultMessage:"Use preset field"}))),key:"custom"}}),{emptyField:Nt}=o.y,Bt={name:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.pipelineForm.pipelineNameFieldLabel",{defaultMessage:"Pipeline name"}),deserializer:String,helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.pipelineForm.pipelineNameFieldHelpText",{defaultMessage:"Name of the ingest pipeline to run."}),validations:[{validator:Nt(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.pipelineForm.pipelineNameRequiredError",{defaultMessage:"A value is required."}))}]},ignore_missing_pipeline:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.pipelineForm.ignoreMissingPipelineFieldLabel",{defaultMessage:"Ignore missing pipeline"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.pipelineForm.ignoreMissingPipelineFieldHelpText",{defaultMessage:"Ignore missing pipelines instead of failing."})}},{isJsonField:Ut,emptyField:Ht}=o.y,Wt={addPatternLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.patternsAddPatternLabel",{defaultMessage:"Add pattern"})},Vt=k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.patternsValueRequiredError",{defaultMessage:"A value is required."}),qt=[Ht(Vt)],Gt={patterns:{label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.patternsFieldLabel",{defaultMessage:"Patterns"}),deserializer:String,helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.patternsHelpText",{defaultMessage:"A list of grok expressions to match and redact named captures with."}),validations:[{validator:({value:e})=>{if("string"==typeof e&&0===e.length)return{message:Vt}}}]},pattern_definitions:{type:o.d.TEXT,deserializer:ue.jsonString,serializer:fe.optionalJson,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.patternDefinitionsLabel",{defaultMessage:"Pattern definitions (optional)"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.patternDefinitionsHelpText",{defaultMessage:"A map of pattern-name and pattern tuples defining custom patterns to be used by the processor. Patterns matching existing names will override the pre-existing definition."}),validations:[{validator:Ut(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.patternsDefinitionsInvalidJSONError",{defaultMessage:"Invalid JSON"}),{allowEmptyString:!0})}]},prefix:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.prefixLabel",{defaultMessage:"Prefix (optional)"}),deserializer:String,serializer:fe.undefinedIfValue(""),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.redactForm.prefixFieldHelpText",defaultMessage:"Start a redacted section with this token. If not specified, defaults to {defaultValue}.",values:{defaultValue:Object(h.jsx)(p.EuiCode,null,"<")}})},suffix:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.suffixLabel",{defaultMessage:"Suffix (optional)"}),deserializer:String,serializer:fe.undefinedIfValue(""),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.redactForm.suffixFieldHelpText",defaultMessage:"End a redacted section with this token. If not specified, defaults to {defaultValue}.",values:{defaultValue:Object(h.jsx)(p.EuiCode,null,">")}})}},{emptyField:Jt}=o.y,Xt={field:{type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,serializer:e=>1===e.length?e[0]:e,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.removeForm.fieldNameField",{defaultMessage:"Fields"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.removeForm.fieldNameHelpText",{defaultMessage:"Fields to remove."}),validations:[{validator:Jt(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.removeForm.fieldNameRequiredError",{defaultMessage:"A value is required."}))}]}},{emptyField:$t}=o.y,{maxLengthField:Zt}=o.y,{isJsonField:Kt,emptyField:Yt}=o.y,Qt={id:{type:o.d.TEXT,deserializer:String,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.storedScriptIDFieldLabel",{defaultMessage:"Stored script ID"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.storedScriptIDFieldHelpText",{defaultMessage:"ID of the stored script to run."}),validations:[{validator:Yt(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.idRequiredError",{defaultMessage:"A value is required."}))}]},source:{type:o.d.TEXT,deserializer:String,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.sourceFieldLabel",{defaultMessage:"Source"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.sourceFieldHelpText",{defaultMessage:"Inline script to run."}),validations:[{validator:Yt(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.sourceRequiredError",{defaultMessage:"A value is required."}))}]},lang:{type:o.d.TEXT,deserializer:String,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.langFieldLabel",{defaultMessage:"Language (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.scriptForm.langFieldHelpText",defaultMessage:"Script language. Defaults to {lang}.",values:{lang:Object(h.jsx)(p.EuiCode,null,"painless")}})},params:{type:o.d.TEXT,deserializer:ue.jsonString,serializer:fe.optionalJson,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.paramsFieldLabel",{defaultMessage:"Parameters"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.paramsFieldHelpText",{defaultMessage:"Named parameters passed to the script as variables."}),validations:[{validator:e=>{if(e.value)return Kt(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.processorInvalidJsonError",{defaultMessage:"Invalid JSON"}))(e)}}]}},ei={mediaType:{type:o.d.SELECT,defaultValue:"application/json",serializer:fe.undefinedIfValue("application/json"),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.setForm.mediaTypeFieldLabel",{defaultMessage:"Media Type"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.setForm.mediaTypeHelpText",defaultMessage:"Media type for encoding value."})},override:{type:o.d.TOGGLE,defaultValue:!0,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!0),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.setForm.overrideFieldLabel",{defaultMessage:"Override"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.setForm.overrideFieldHelpText",defaultMessage:"If enabled, overwrite existing field values. If disabled, only update {nullValue} fields.",values:{nullValue:Object(h.jsx)(p.EuiCode,null,"null")}})},ignore_empty_value:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.setForm.ignoreEmptyValueFieldLabel",{defaultMessage:"Ignore empty value"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.setForm.ignoreEmptyValueFieldHelpText",defaultMessage:"If {valueField} is {nullValue} or an empty string, do not update the field.",values:{valueField:Object(h.jsx)(p.EuiCode,null,"value"),nullValue:Object(h.jsx)(p.EuiCode,null,"null")}})}},ti=e=>({value:{path:"fields.value",euiFieldProps:{"data-test-subj":"valueFieldInput"},config:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.setForm.valueFieldLabel",{defaultMessage:"Value"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.setForm.valueFieldHelpText",defaultMessage:"Value for the field."}),fieldsToValidateOnChange:["fields.value","fields.copy_from"],validations:[{validator:({value:e,path:t,formData:i})=>{if(Object(y.isEmpty)(e)&&Object(y.isEmpty)(i["fields.copy_from"]))return{path:t,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.requiredValue",{defaultMessage:"A value is required."})}}}]},labelAppend:Object(h.jsx)(p.EuiText,{size:"xs"},Object(h.jsx)(p.EuiLink,{onClick:e,"data-test-subj":"toggleCustomField"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.useCopyFromLabel",defaultMessage:"Use copy from field"}))),key:"value"},copy_from:{path:"fields.copy_from",euiFieldProps:{"data-test-subj":"copyFromInput"},config:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,fieldsToValidateOnChange:["fields.value","fields.copy_from"],validations:[{validator:({value:e,path:t,formData:i})=>{if(Object(y.isEmpty)(e)&&Object(y.isEmpty)(i["fields.value"]))return{path:t,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.requiredCopyFrom",{defaultMessage:"A copy from value is required."})}}}],label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.setForm.copyFromFieldLabel",{defaultMessage:"Copy from"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.setForm.copyFromFieldHelpText",defaultMessage:"Field to copy into {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"Field")}})},labelAppend:Object(h.jsx)(p.EuiText,{size:"xs"},Object(h.jsx)(p.EuiLink,{onClick:e,"data-test-subj":"toggleCustomField"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.useValueLabel",defaultMessage:"Use value field"}))),key:"copy_from"}}),ii=["username","roles","email","full_name","metadata","api_key","realm","authentication_type"],ni=ii.map((e=>({label:e}))),si=ii.join(", "),ri={properties:{type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,serializer:fe.optionalArrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.setSecurityUserForm.propertiesFieldLabel",{defaultMessage:"Properties (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.setForm.propertiesFieldHelpText",defaultMessage:"User details to add. Defaults to: {value}",values:{value:Object(h.jsx)(p.EuiCode,null,"[",si,"]")}})}},ai={order:{type:o.d.SELECT,defaultValue:"asc",deserializer:e=>"asc"===e||"desc"===e?e:"asc",serializer:e=>"asc"===e||""===e?void 0:e,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.sortForm.orderFieldLabel",{defaultMessage:"Order"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.sortForm.orderFieldHelpText",{defaultMessage:"Sort order. Arrays containing a mix of strings and numbers are sorted lexicographically."})}},{emptyField:oi}=o.y,li={separator:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.splitForm.separatorFieldLabel",{defaultMessage:"Separator"}),deserializer:String,helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.splitForm.separatorFieldHelpText",{defaultMessage:"Regex pattern used to delimit the field value."}),validations:[{validator:oi(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.splitForm.separatorRequiredError",{defaultMessage:"A value is required."}))}]},preserve_trailing:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.splitForm.preserveTrailingFieldLabel",{defaultMessage:"Preserve trailing"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.splitForm.preserveTrailingFieldHelpText",{defaultMessage:"Preserve any trailing whitespace in the split field values."})}},ci={keep_original:{type:o.d.TOGGLE,defaultValue:!0,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!0),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.keepOriginalFieldLabel",{defaultMessage:"Keep original"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.commonFields.keepOriginalFieldHelpText",defaultMessage:"Copy the unparsed URI to {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,".original")}})},remove_if_successful:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.removeIfSuccessfulFieldLabel",{defaultMessage:"Remove if successful"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.commonFields.removeIfSuccessfulFieldHelpText",defaultMessage:"Remove the field after parsing the URI string."})}},pi=[{label:"name"},{label:"os"},{label:"device"},{label:"original"},{label:"version"}],di={regex_file:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,deserializer:String,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.userAgentForm.regexFileFieldLabel",{defaultMessage:"Regex file (optional)"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.userAgentForm.regexFileFieldHelpText",{defaultMessage:"File containing the regular expressions used to parse the user agent string."})},extract_device_type:{type:o.d.TOGGLE,defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.userAgentForm.extractDeviceTypeFieldHelpText",{defaultMessage:"Extracts device type from the user agent string."})}},ui={append:{FieldsComponent:()=>{const[{fields:e}]=Object(o.G)({watch:["fields.value"]});return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.appendForm.fieldHelpText",{defaultMessage:"Field to append values to."})}),Object(h.jsx)(o.s,{"data-test-subj":"appendValueField",config:Oe.value,component:o.c,path:"fields.value"}),Object(h.jsx)(o.s,{"data-test-subj":"allowDuplicatesSwitch",config:Oe.allow_duplicates,component:o.q,path:"fields.allow_duplicates"}),$(null==e?void 0:e.value)&&Object(h.jsx)(o.s,{componentProps:{euiFieldProps:{"data-test-subj":"mediaTypeSelectorField",options:[{value:"application/json",text:"application/json"},{value:"text/plain",text:"text/plain"},{value:"application/x-www-form-urlencoded",text:"application/x-www-form-urlencoded"}]}},config:Oe.media_type,component:o.o,path:"fields.media_type"}))},docLinkPath:"/append-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.append",{defaultMessage:"Append"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.append",{defaultMessage:"Appends values to a field's array. If the field contains a single value, the processor first converts it to an array. If the field doesn't exist, the processor creates an array containing the appended values."}),getDefaultDescription:({field:e,value:t})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.append",{defaultMessage:'Appends "{value}" to the "{field}" field',values:{field:e,value:t}})},attachment:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(je,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.attachment.fieldHelpText",defaultMessage:"The field to get the base64 encoded field from."})})),Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(Ee,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.attachment.targetHelpText",defaultMessage:"The field that will hold the attachment information. Defaults to {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"attachment")}})}))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{"data-test-subj":"indexedCharsField",config:ke.indexed_chars,component:o.e,path:"fields.indexed_chars"})),Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{"data-test-subj":"indexedCharsFieldField",config:ke.indexed_chars_field,component:o.e,path:"fields.indexed_chars_field"}))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(o.s,{component:o.c,config:ke.properties,euiFieldProps:{"data-test-subj":"propertiesField",noSuggestions:!1,options:Me.map((e=>({label:e})))},path:"fields.properties"}),Object(h.jsx)(o.s,{"data-test-subj":"removeBinaryField",component:o.q,config:ke.remove_binary,path:"fields.remove_binary"}),Object(h.jsx)(o.s,{"data-test-subj":"resourceNameField",config:ke.resource_name,component:o.e,path:"fields.resource_name"}),Object(h.jsx)(Fe,null)),docLinkPath:"/attachment.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.attachment",{defaultMessage:"Attachment"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.attachment",{defaultMessage:"Extract file attachments in common formats (such as PPT, XLS, and PDF)."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.attachment",{defaultMessage:'Extracts attachment from "{field}"',values:{field:e}})},bytes:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.bytesForm.fieldNameHelpText",{defaultMessage:"Field to convert. If the field contains an array, each array value is converted."})}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,null)),docLinkPath:"/bytes-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.bytes",{defaultMessage:"Bytes"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.bytes",{defaultMessage:"Converts digital storage units to bytes. For example, 1KB becomes 1024 bytes."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.bytes",{defaultMessage:'Converts "{field}" to its value in bytes',values:{field:e}})},circle:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.circleForm.fieldNameHelpText",{defaultMessage:"Field to convert."})}),Object(h.jsx)(o.s,{"data-test-subj":"errorDistanceField",config:Ce.error_distance,component:o.l,path:"fields.error_distance"}),Object(h.jsx)(o.s,{componentProps:{euiFieldProps:{"data-test-subj":"shapeSelectorField",options:[{value:"shape",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.circleForm.shapeTypeShape",{defaultMessage:"Shape"})},{value:"geo_shape",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.circleForm.shapeTypeGeoShape",{defaultMessage:"Geo-shape"})}]}},config:Ce.shape_type,component:o.o,path:"fields.shape_type"}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,null)),docLinkPath:"/ingest-circle-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.circle",{defaultMessage:"Circle"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.circle",{defaultMessage:"Converts a circle definition into an approximate polygon."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.circle",{defaultMessage:'Converts a circle definition of "{field}" into an approximate polygon',values:{field:e}})},community_id:{FieldsComponent:()=>{const[{fields:e}]=Object(o.G)({watch:["fields.iana_number","fields.transport"]});return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{config:Le.source_ip,component:o.e,path:"fields.source_ip","data-test-subj":"sourceIpField"})),Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{config:Le.source_port,component:o.e,path:"fields.source_port","data-test-subj":"sourcePortField"}))),Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{config:Le.destination_ip,component:o.e,path:"fields.destination_ip","data-test-subj":"destinationIpField"})),Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{config:Le.destination_port,component:o.e,path:"fields.destination_port","data-test-subj":"destinationPortField"}))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(o.s,{config:Le.iana_number,component:o.e,path:"fields.iana_number","data-test-subj":"ianaField",componentProps:{euiFieldProps:{disabled:!(null==e||!e.transport)}}}),Object(h.jsx)(o.s,{config:Le.transport,component:o.e,path:"fields.transport","data-test-subj":"transportField",componentProps:{euiFieldProps:{disabled:!(null==e||!e.iana_number)}}}),Object(h.jsx)(o.s,{config:Le.icmp_type,component:o.e,path:"fields.icmp_type","data-test-subj":"icmpTypeField"}),Object(h.jsx)(o.s,{config:Le.icmp_code,component:o.e,path:"fields.icmp_code","data-test-subj":"icmpCodeField"}),Object(h.jsx)(o.s,{config:Le.seed,component:o.l,path:"fields.seed","data-test-subj":"seedField",componentProps:{euiFieldProps:{min:0,max:Ie}}}),Object(h.jsx)(Ee,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.communityId.targetFieldHelpText",defaultMessage:"Output field. Defaults to {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"network.community_id")}})}),Object(h.jsx)(Fe,{defaultValue:!0,serializer:fe.undefinedIfValue(!0)}))},docLinkPath:"/community-id-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.communityId",{defaultMessage:"Community ID"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.communityId",{defaultMessage:"Computes the Community ID for network flow data."}),getDefaultDescription:()=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.communityId",{defaultMessage:"Computes the Community ID for network flow data."})},convert:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.fieldNameHelpText",{defaultMessage:"Field to convert."})}),Object(h.jsx)(o.s,{componentProps:{euiFieldProps:{"data-test-subj":"typeSelectorField",options:[{value:"integer",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.integerOption",{defaultMessage:"Integer"})},{value:"long",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.longOption",{defaultMessage:"Long"})},{value:"float",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.floatOption",{defaultMessage:"Float"})},{value:"double",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.doubleOption",{defaultMessage:"Double"})},{value:"string",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.stringOption",{defaultMessage:"String"})},{value:"boolean",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.booleanOption",{defaultMessage:"Boolean"})},{value:"ip",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.ipOption",{defaultMessage:"IP"})},{value:"auto",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.convertForm.autoOption",{defaultMessage:"Auto"})}]}},config:De.type,component:o.o,path:"fields.type"}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,null)),docLinkPath:"/convert-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.convert",{defaultMessage:"Convert"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.convert",{defaultMessage:"Converts a field to a different data type. For example, you can convert a string to an long."}),getDefaultDescription:({field:e,type:t})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.convert",{defaultMessage:'Converts "{field}" to type "{type}"',values:{field:e,type:t}})},csv:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.csvForm.fieldNameHelpText",{defaultMessage:"Field containing CSV data."})}),Object(h.jsx)(o.s,{config:Ne.target_fields,component:o.c,path:"fields.target_fields","data-test-subj":"targetFieldsField"}),Object(h.jsx)(o.s,{config:Ne.separator,component:o.e,path:"fields.separator","data-test-subj":"separatorValueField"}),Object(h.jsx)(o.s,{config:Ne.quote,component:o.e,path:"fields.quote","data-test-subj":"quoteValueField"}),Object(h.jsx)(o.s,{config:Ne.trim,component:o.q,path:"fields.trim","data-test-subj":"trimSwitch"}),Object(h.jsx)(o.s,{config:Ne.empty_value,component:o.e,path:"fields.empty_value","data-test-subj":"emptyValueField"}),Object(h.jsx)(Fe,{defaultValue:!0,serializer:fe.undefinedIfValue(!0)})),docLinkPath:"/csv-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.csv",{defaultMessage:"CSV"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.csv",{defaultMessage:"Extracts field values from CSV data."}),getDefaultDescription:({field:e,target_fields:t})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.csv",{defaultMessage:'Extracts CSV values from "{field}" to {target_fields}',values:{field:e,target_fields:t.map((e=>`"${e}"`)).join(", ")}})},date:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateForm.fieldNameHelpText",{defaultMessage:"Field to convert."})}),Object(h.jsx)(o.s,{"data-test-subj":"formatsValueField",config:Ue.formats,component:o.c,path:"fields.formats"}),Object(h.jsx)(Ee,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dateForm.targetFieldHelpText",defaultMessage:"Output field. If empty, the input field is updated in place. Defaults to {defaultField}.",values:{defaultField:Object(h.jsx)(p.EuiCode,null,"@timestamp")}})}),Object(h.jsx)(o.s,{"data-test-subj":"timezoneField",config:Ue.timezone,component:o.e,path:"fields.timezone"}),Object(h.jsx)(o.s,{"data-test-subj":"localeField",config:Ue.locale,component:o.e,path:"fields.locale"}),Object(h.jsx)(o.s,{"data-test-subj":"outputFormatField",config:Ue.output_format,component:o.e,path:"fields.output_format"})),docLinkPath:"/date-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.date",{defaultMessage:"Date"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.date",{defaultMessage:"Converts a date to a document timestamp."}),getDefaultDescription:({field:e,target_field:t="@timestamp"})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.date",{defaultMessage:'Parses a date from "{field}" to a date type on field "{target_field}"',values:{field:e,target_field:t}})},date_index_name:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.fieldNameHelpText",{defaultMessage:"Field containing the date or timestamp."})}),Object(h.jsx)(o.s,{config:We.date_rounding,component:o.o,componentProps:{euiFieldProps:{"data-test-subj":"dateRoundingField",options:[{value:"y",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRounding.year",{defaultMessage:"Year"})},{value:"M",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRounding.month",{defaultMessage:"Month"})},{value:"w",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRounding.week",{defaultMessage:"Week"})},{value:"d",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRounding.day",{defaultMessage:"Day"})},{value:"h",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRounding.hour",{defaultMessage:"Hour"})},{value:"m",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRounding.minute",{defaultMessage:"Minute"})},{value:"s",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dateIndexNameForm.dateRounding.second",{defaultMessage:"Second"})}]}},path:"fields.date_rounding"}),Object(h.jsx)(o.s,{"data-test-subj":"indexNamePrefixField",config:We.index_name_prefix,component:o.e,path:"fields.index_name_prefix"}),Object(h.jsx)(o.s,{"data-test-subj":"indexNameFormatField",config:We.index_name_format,component:o.e,path:"fields.index_name_format"}),Object(h.jsx)(o.s,{"data-test-subj":"dateFormatsField",config:We.date_formats,component:o.c,path:"fields.date_formats"}),Object(h.jsx)(o.s,{"data-test-subj":"timezoneField",config:We.timezone,component:o.e,path:"fields.timezone"}),Object(h.jsx)(o.s,{"data-test-subj":"localeField",config:We.locale,component:o.e,path:"fields.locale"})),docLinkPath:"/date-index-name-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.dateIndexName",{defaultMessage:"Date index name"}),typeDescription:()=>Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.processors.description.dateIndexName",defaultMessage:"Uses a date or timestamp to add documents to the correct time-based index. Index names must use a date math pattern, such as {value}.",values:{value:Object(h.jsx)(p.EuiCode,null,"my-index-yyyy-MM-dd")}}),getDefaultDescription:({field:e,index_name_prefix:t})=>{const i=t?k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.dateIndexName.indexNamePrefixDefault.prefixValueLabel",{defaultMessage:'with the prefix "{prefix}"',values:{prefix:t}}):k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.dateIndexName.indexNamePrefixDefault.noPrefixValueLabel",{defaultMessage:"with no prefix"});return k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.date_index_name",{defaultMessage:'Adds documents to a time-based index based on the timestamp value in "{field}", {prefix}',values:{field:e,prefix:i}})}},dissect:{FieldsComponent:()=>{const{services:e}=Object(o.H)(),t=(i=e.documentation.getDissectKeyModifiersUrl(),{pattern:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dissectForm.patternFieldLabel",{defaultMessage:"Pattern"}),deserializer:ue.escapeBackslashes,serializer:fe.unescapeBackslashes,helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dissectForm.patternFieldHelpText",defaultMessage:"Pattern used to dissect the specified field. The pattern is defined by the parts of the string to discard. Use a {keyModifier} to alter the dissection behavior.",values:{keyModifier:Object(h.jsx)(p.EuiLink,{target:"_blank",external:!0,href:i},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dissectForm.patternFieldHelpText.dissectProcessorLink",{defaultMessage:"key modifier"}))}}),validations:[{validator:et(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dissectForm.patternRequiredError",{defaultMessage:"A pattern value is required."}))},{validator:ge}]},append_separator:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dissectForm.appendSeparatorparaotrFieldLabel",{defaultMessage:"Append separator (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.dissectForm.appendSeparatorHelpText",defaultMessage:"If you specify a key modifier, this character separates the fields when appending results. Defaults to {value}.",values:{value:Object(h.jsx)(p.EuiCode,null,'""')}})}});var i;return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dissectForm.fieldNameHelpText",{defaultMessage:"Field to dissect."})}),Object(h.jsx)(o.s,{config:t.pattern,component:Xe,componentProps:{editorProps:{height:75,options:{minimap:{enabled:!1}}}},path:"fields.pattern"}),Object(h.jsx)(o.s,{config:t.append_separator,component:o.e,path:"fields.append_separator"}),Object(h.jsx)(Fe,null))},docLinkPath:"/dissect-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.dissect",{defaultMessage:"Dissect"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.dissect",{defaultMessage:"Uses dissect patterns to extract matches from a field."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.dissect",{defaultMessage:'Extracts values from "{field}" that match a dissect pattern',values:{field:e}})},dot_expander:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dotExpanderForm.fieldNameHelpText",{defaultMessage:"Field containing dot notation."}),additionalValidations:[{validator:({value:e})=>{if("string"==typeof e&&e.length)return e.includes(".")||"*"===e?void 0:{message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dotExpanderForm.fieldNameRequiresDotError",{defaultMessage:"The field name must be an asterisk or contain a dot character."})}}}]}),Object(h.jsx)(o.s,{"data-test-subj":"pathField",config:tt.path,component:o.e,path:"fields.path"}),Object(h.jsx)(o.s,{"data-test-subj":"overrideField",config:tt.override,component:o.q,path:"fields.override"})),docLinkPath:"/dot-expand-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.dotExpander",{defaultMessage:"Dot expander"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.dotExpander",{defaultMessage:"Expands a field containing dot notation into an object field. The object field is then accessible by other processors in the pipeline."}),getDefaultDescription:({field:e})=>"*"===e?k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.dot_expander.wildcard",{defaultMessage:"All top-level fields will be expanded"}):k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.dot_expander.dot_notation",{defaultMessage:'Expands "{field}" into an object field',values:{field:e}})},drop:{FieldsComponent:void 0,docLinkPath:"/drop-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.drop",{defaultMessage:"Drop"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.drop",{defaultMessage:"Drops documents without returning an error."}),getDefaultDescription:()=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.drop",{defaultMessage:"Drops documents without returning an error"})},enrich:{FieldsComponent:()=>{const{services:e}=Object(o.H)();return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.fieldNameHelpText",{defaultMessage:"Field used to match incoming documents to enrich documents. Field values are compared to the match field set in the enrich policy."})}),Object(h.jsx)(o.s,{config:{...ot.policy_name,helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.enrichForm.policyNameHelpText",defaultMessage:"Name of the {enrichPolicyLink}.",values:{enrichPolicyLink:Object(h.jsx)(p.EuiLink,{external:!0,target:"_blank",href:e.documentation.getEnrichDataUrl()},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.policyNameHelpText.enrichPolicyLink",{defaultMessage:"enrich policy"}))}})},component:o.e,path:"fields.policy_name","data-test-subj":"policyNameField"}),Object(h.jsx)(Ee,{label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.targetFieldLabel",{defaultMessage:"Target field"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.targetFieldHelpText",{defaultMessage:"Field used to contain enrich data."}),validations:[at],"data-test-subj":"targetField"}),Object(h.jsx)(o.s,{config:ot.override,component:o.q,path:"fields.override","data-test-subj":"overrideField"}),Object(h.jsx)(o.s,{config:ot.max_matches,component:o.l,path:"fields.max_matches"}),Object(h.jsx)(o.s,{config:{...ot.shape_relation,helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.enrichForm.shapeRelationFieldHelpText",defaultMessage:"Operator used to match the geo-shape of incoming documents to enrich documents. Only used for {geoMatchPolicyLink}.",values:{geoMatchPolicyLink:Object(h.jsx)(p.EuiLink,{external:!0,target:"_blank",href:e.documentation.getGeoMatchUrl()},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.shapeRelationFieldHelpText.geoMatchPoliciesLink",{defaultMessage:"geo-match enrich policies"}))}})},component:o.o,componentProps:{euiFieldProps:{options:[{value:"INTERSECTS",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.intersectsOption",{defaultMessage:"Intersects"})},{value:"DISJOINT",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichFrom.disjointOption",{defaultMessage:"Disjoint"})},{value:"WITHIN",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.withinOption",{defaultMessage:"Within"})},{value:"CONTAINS",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.enrichForm.containsOption",{defaultMessage:"Contains"})}]}},path:"fields.shape_relation"}),Object(h.jsx)(Fe,null))},docLinkPath:"/ingest-enriching-data.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.enrich",{defaultMessage:"Enrich"}),typeDescription:e=>Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.processors.description.enrich",defaultMessage:"Adds enrich data to incoming documents based on an {enrichPolicyLink}.",values:{enrichPolicyLink:Object(h.jsx)(p.EuiLink,{external:!0,target:"_blank",href:e+"/ingest-enriching-data.html"},"enrich policy")}}),getDefaultDescription:({field:e,policy_name:t,target_field:i})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.enrich",{defaultMessage:'Enriches data to "{target_field}" if the "{policy_name}" policy matches "{field}"',values:{field:e,policy_name:t,target_field:i}})},fail:{FieldsComponent:()=>Object(h.jsx)(o.s,{"data-test-subj":"messageField",component:o.e,config:ct.message,path:"fields.message"}),docLinkPath:"/fail-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.fail",{defaultMessage:"Fail"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.fail",{defaultMessage:"Returns a custom error message on failure. Often used to notify requesters of required conditions."}),getDefaultDescription:()=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.fail",{defaultMessage:"Raises an exception that halts execution"})},fingerprint:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(o.s,{config:pt.fields,component:o.c,path:"fields.fields","data-test-subj":"fieldsValueField"}),Object(h.jsx)(Ee,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.fingerprint.targetFieldHelpText",defaultMessage:"Output field. Defaults to {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"fingerprint")}})}),Object(h.jsx)(o.s,{componentProps:{euiFieldProps:{"data-test-subj":"methodsValueField",options:[{value:"MD5",text:"MD5"},{value:"SHA-1",text:"SHA-1"},{value:"SHA-256",text:"SHA-256"},{value:"SHA-512",text:"SHA-512"},{value:"MurmurHash3",text:"MurmurHash3"}]}},config:pt.method,component:o.o,path:"fields.method"}),Object(h.jsx)(o.s,{config:pt.salt,component:o.e,path:"fields.salt","data-test-subj":"saltValueField"}),Object(h.jsx)(Fe,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.fingerprint.ignoreMissingFieldHelpText",defaultMessage:"Ignore any missing {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"fields")}})})),docLinkPath:"/fingerprint-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.fingerprint",{defaultMessage:"Fingerprint"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.fingerprint",{defaultMessage:"Computes a hash of the document’s content."}),getDefaultDescription:()=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.fingerprint",{defaultMessage:"Computes a hash of the document’s content."})},foreach:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.failForm.fieldNameHelpText",{defaultMessage:"Field containing array values."})}),Object(h.jsx)(o.s,{component:Ke,componentProps:{editorProps:{height:xe,"aria-label":k.i18n.translate("xpack.ingestPipelines.pipelineEditor.foreachForm.optionsFieldAriaLabel",{defaultMessage:"Configuration JSON editor"})}},config:ft.processor,path:"fields.processor"})),docLinkPath:"/foreach-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.foreach",{defaultMessage:"Foreach"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.foreach",{defaultMessage:"Applies an ingest processor to each value in an array."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.foreach",{defaultMessage:'Runs a processor for each object in "{field}"',values:{field:e}})},geo_grid:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(je,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.geoGrid.fieldHelpText",defaultMessage:"The field to interpret as a geo-tile. The field format is determined by {tile_type}.",values:{tile_type:Object(h.jsx)(p.EuiCode,null,"tile_type")}})})),Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(Ee,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.geoGrid.targetHelpText",defaultMessage:"The field to assign the polygon shape to. By default {field} is updated in-place.",values:{field:Object(h.jsx)(p.EuiCode,null,"field")}})}))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{componentProps:{euiFieldProps:{"data-test-subj":"tileTypeField",options:[{value:"geohash",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.geohashOption",{defaultMessage:"Geo-Hash"})},{value:"geotile",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.geotileOption",{defaultMessage:"Geo-Tile"})},{value:"geohex",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.geohexOption",{defaultMessage:"Geo-Hex"})}]}},config:gt.tile_type,component:o.o,path:"fields.tile_type"})),Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{componentProps:{euiFieldProps:{"data-test-subj":"targetFormatField",options:[{value:"GeoJSON",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.geojsonOption",{defaultMessage:"GeoJSON"})},{value:"WKT",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoGrid.wktOption",{defaultMessage:"WKT"})}]}},config:gt.target_format,component:o.o,path:"fields.target_format"}))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(o.s,{"data-test-subj":"parentField",config:gt.parent_field,component:o.e,path:"fields.parent_field"}),Object(h.jsx)(o.s,{"data-test-subj":"childrenField",config:gt.children_field,component:o.e,path:"fields.children_field"}),Object(h.jsx)(o.s,{"data-test-subj":"nonChildrenField",config:gt.non_children_field,component:o.e,path:"fields.non_children_field"}),Object(h.jsx)(o.s,{"data-test-subj":"precisionField",config:gt.precision_field,component:o.e,path:"fields.precision_field"}),Object(h.jsx)(Fe,null)),docLinkPath:"/ingest-geo-grid-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.geogrid",{defaultMessage:"GeoGrid"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.geogrid",{defaultMessage:"Converts geo-grid definitions of grid tiles or cells to regular bounding boxes or polygons which describe their shape."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.geogrid",{defaultMessage:'Adds geo-grid data to documents based on the value of "{field}"',values:{field:e}})},geoip:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoIPForm.fieldNameHelpText",{defaultMessage:"Field containing an IP address for the geographical lookup."})}),Object(h.jsx)(Ee,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoIPForm.targetFieldHelpText",{defaultMessage:"Field used to contain geo data properties."})}),Object(h.jsx)(o.s,{component:o.e,config:bt.database_file,path:"fields.database_file"}),Object(h.jsx)(xt,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.geoIPForm.propertiesFieldHelpText",{defaultMessage:"Properties added to the target field. Valid properties depend on the database file used."})}),Object(h.jsx)(o.s,{component:o.q,config:bt.first_only,path:"fields.first_only"}),Object(h.jsx)(Fe,null)),docLinkPath:"/geoip-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.geoip",{defaultMessage:"GeoIP"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.geoip",{defaultMessage:"Adds geo data based on an IP address. Uses geo data from a Maxmind database file."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.geoip",{defaultMessage:'Adds geo data to documents based on the value of "{field}"',values:{field:e}})},grok:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.fieldNameHelpText",{defaultMessage:"Field to search for matches."})}),Object(h.jsx)(o.r,{path:"fields.patterns",validations:yt.patterns.validations},(({items:e,addItem:t,removeItem:i,moveItem:n,error:s})=>{var r,a;return Object(h.jsx)(Ge,{label:yt.patterns.label,helpText:yt.patterns.helpText,error:s,value:e,onMove:n,onAdd:t,onRemove:i,addLabel:vt.addPatternLabel,textValidations:_t,textDeserializer:null===(r=yt.patterns)||void 0===r?void 0:r.deserializer,textSerializer:null===(a=yt.patterns)||void 0===a?void 0:a.serializer})})),Object(h.jsx)(o.s,{component:Ke,config:yt.pattern_definitions,componentProps:{editorProps:{height:xe,"aria-label":k.i18n.translate("xpack.ingestPipelines.pipelineEditor.grokForm.patternDefinitionsAriaLabel",{defaultMessage:"Pattern definitions editor"})}},path:"fields.pattern_definitions"}),Object(h.jsx)(o.s,{component:o.q,config:yt.trace_match,path:"fields.trace_match"}),Object(h.jsx)(Fe,null)),docLinkPath:"/grok-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.grok",{defaultMessage:"Grok"}),typeDescription:e=>Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.processors.description.grok",defaultMessage:"Uses {grokLink} expressions to extract matches from a field.",values:{grokLink:Object(h.jsx)(p.EuiLink,{external:!0,target:"_blank",href:e+"/grok-processor.html"},"grok")}}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.grok",{defaultMessage:'Extracts values from "{field}" that match a grok pattern',values:{field:e}})},gsub:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.gsubForm.fieldNameHelpText",{defaultMessage:"Field to search for matches."})}),Object(h.jsx)(o.s,{config:Pt.pattern,component:Xe,componentProps:{editorProps:{height:75,options:{minimap:{enabled:!1}}}},path:"fields.pattern"}),Object(h.jsx)(o.s,{config:Pt.replacement,component:o.e,path:"fields.replacement"}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,null)),docLinkPath:"/gsub-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.gsub",{defaultMessage:"Gsub"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.gsub",{defaultMessage:"Uses a regular expression to replace field substrings."}),getDefaultDescription:({pattern:e,field:t,replacement:i})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.gsub",{defaultMessage:'Replaces values matching "{pattern}" in "{field}" with "{replacement}"',values:{pattern:e,field:t,replacement:i}})},html_strip:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.htmlStripForm.fieldNameHelpText",{defaultMessage:"Field to remove HTML tags from."})}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,null)),docLinkPath:"/htmlstrip-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.htmlStrip",{defaultMessage:"HTML strip"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.htmlStrip",{defaultMessage:"Removes HTML tags from a field."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.html_strip",{defaultMessage:'Removes HTML tags from "{field}"',values:{field:e}})},inference:{FieldsComponent:()=>{const{services:e}=Object(o.H)(),t=e.documentation.getDocumentationUrl();return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(o.s,{config:St.model_id,component:o.e,path:"fields.model_id"}),Object(h.jsx)(Ee,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.inferenceForm.targetFieldHelpText",defaultMessage:"Field used to contain inference processor results. Defaults to {targetField}.",values:{targetField:Object(h.jsx)(p.EuiCode,null,"ml.inference.")}})}),Object(h.jsx)(o.s,{config:St.field_map,component:Ke,componentProps:{editorProps:{height:xe,options:{minimap:{enabled:!1}}}},path:"fields.field_map"}),Object(h.jsx)(o.s,{config:{...St.inference_config,helpText:Tt(t)},component:Ke,componentProps:{editorProps:{height:xe,options:{minimap:{enabled:!1}}}},path:"fields.inference_config"}))},docLinkPath:"/inference-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.inference",{defaultMessage:"Inference"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.inference",{defaultMessage:"Uses a trained model to infer against incoming data."}),getDefaultDescription:({model_id:e,target_field:t="ml.inference."})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.inference",{defaultMessage:'Runs the model "{modelId}" and stores the result in "{target_field}"',values:{modelId:e,target_field:t}})},join:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.joinForm.fieldNameHelpText",{defaultMessage:"Field containing array values to join."})}),Object(h.jsx)(o.s,{config:It.separator,component:o.e,path:"fields.separator"}),Object(h.jsx)(Ee,null)),docLinkPath:"/join-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.join",{defaultMessage:"Join"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.join",{defaultMessage:"Joins array elements into a string. Inserts a separator between each element."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.join",{defaultMessage:'Joins each element of the array stored in "{field}"',values:{field:e}})},json:{FieldsComponent:()=>{const e=Object(o.F)(),[t,i]=Object(s.useState)(!1);return Object(s.useEffect)((()=>e.subscribe((({data:{internal:n}})=>{const s=!!Object(y.get)(n,ye);s&&!t?(i(!0),e.getFields()[wt].setValue(!1)):!s&&t&&i(!1)})).unsubscribe),[e,t]),Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.jsonForm.fieldNameHelpText",{defaultMessage:"Field to parse."})}),Object(h.jsx)(Ee,null),Object(h.jsx)(o.s,{config:Lt.add_to_root,component:o.q,componentProps:{euiFieldProps:{disabled:t}},path:wt}))},docLinkPath:"/json-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.json",{defaultMessage:"JSON"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.json",{defaultMessage:"Creates a JSON object from a compatible string."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.json",{defaultMessage:'Parses "{field}" to create a JSON object from a string',values:{field:e}})},kv:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.fieldNameHelpText",{defaultMessage:"Field containing a string of key-value pairs."})}),Object(h.jsx)(o.s,{component:o.e,config:Rt.field_split,path:"fields.field_split"}),Object(h.jsx)(o.s,{component:o.e,config:Rt.value_split,path:"fields.value_split"}),Object(h.jsx)(Ee,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.kvForm.targetFieldHelpText",{defaultMessage:"Output field for the extracted fields. Defaults to the document root."})}),Object(h.jsx)(o.s,{component:o.c,config:Rt.include_keys,path:"fields.include_keys"}),Object(h.jsx)(o.s,{component:o.c,config:Rt.exclude_keys,path:"fields.exclude_keys"}),Object(h.jsx)(Fe,null),Object(h.jsx)(o.s,{component:o.e,config:Rt.prefix,path:"fields.prefix"}),Object(h.jsx)(o.s,{component:o.e,config:Rt.trim_key,path:"fields.trim_key"}),Object(h.jsx)(o.s,{component:o.e,config:Rt.trim_value,path:"fields.trim_value"}),Object(h.jsx)(o.s,{component:o.q,config:Rt.strip_brackets,path:"fields.strip_brackets"})),docLinkPath:"/kv-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.kv",{defaultMessage:"Key-value (KV)"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.kv",{defaultMessage:"Extracts fields from a string containing key-value pairs."}),getDefaultDescription:({field:e,field_split:t,value_split:i})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.kv",{defaultMessage:'Extracts key-value pairs from "{field}" and splits on "{field_split}" and "{value_split}"',values:{field:e,field_split:t,value_split:i}})},lowercase:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.lowerCaseForm.fieldNameHelpText",{defaultMessage:"Field to lowercase."})}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,null)),docLinkPath:"/lowercase-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.lowercase",{defaultMessage:"Lowercase"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.lowercase",{defaultMessage:"Converts a string to lowercase."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.lowercase",{defaultMessage:'Converts values in "{field}" to lowercase',values:{field:e}})},network_direction:{FieldsComponent:()=>{const{getFieldDefaultValue:e}=Object(o.F)(),t=void 0!==e("fields.internal_networks_field"),[i,n]=Object(s.useState)(t),a=Object(s.useCallback)((()=>{n((e=>!e))}),[]),l=Object(s.useMemo)((()=>i?At(a).internal_networks_field:At(a).internal_networks),[i,a]);return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(o.s,{config:zt.source_ip,component:o.e,path:"fields.source_ip","data-test-subj":"sourceIpField"}),Object(h.jsx)(o.s,{config:zt.destination_ip,component:o.e,path:"fields.destination_ip","data-test-subj":"destinationIpField"}),Object(h.jsx)(Ee,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.networkDirection.targetFieldHelpText",defaultMessage:"Output field. Defaults to {field}.",values:{field:Object(h.jsx)(p.EuiCode,null,"network.direction")}})}),Object(h.jsx)(o.s,u()({},l,{component:o.e,"data-test-subj":"networkDirectionField"})),Object(h.jsx)(Fe,{defaultValue:!0,serializer:fe.undefinedIfValue(!0)}))},docLinkPath:"/network-direction-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.networkDirection",{defaultMessage:"Network Direction"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.networkDirection",{defaultMessage:"Calculates the network direction given a source IP address."}),getDefaultDescription:()=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.networkDirection",{defaultMessage:"Calculates the network direction given a source IP address."})},pipeline:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(o.s,{"data-test-subj":"pipelineNameField",config:Bt.name,component:o.e,path:"fields.name"}),Object(h.jsx)(o.s,{"data-test-subj":"ignoreMissingPipelineSwitch",config:Bt.ignore_missing_pipeline,component:o.q,path:"fields.ignore_missing_pipeline"})),docLinkPath:"/pipeline-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.pipeline",{defaultMessage:"Pipeline"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.pipeline",{defaultMessage:"Runs another ingest pipeline."}),getDefaultDescription:({name:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.pipeline",{defaultMessage:'Runs the "{name}" ingest pipeline',values:{name:e}})},redact:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.fieldNameHelpText",{defaultMessage:"Field to be redacted."})}),Object(h.jsx)(o.r,{path:"fields.patterns",validations:Gt.patterns.validations},(({items:e,addItem:t,removeItem:i,error:n})=>{var s,r;return Object(h.jsx)(Qe,{label:Gt.patterns.label,helpText:Gt.patterns.helpText,error:n,value:e,onAdd:t,onRemove:i,addLabel:Wt.addPatternLabel,textValidations:qt,textDeserializer:null===(s=Gt.patterns)||void 0===s?void 0:s.deserializer,textSerializer:null===(r=Gt.patterns)||void 0===r?void 0:r.serializer})})),Object(h.jsx)(o.s,{component:Ke,config:Gt.pattern_definitions,componentProps:{editorProps:{"data-test-subj":"patternDefinitionsField",height:xe,"aria-label":k.i18n.translate("xpack.ingestPipelines.pipelineEditor.redactForm.patternDefinitionsAriaLabel",{defaultMessage:"Pattern definitions editor"})}},path:"fields.pattern_definitions"}),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{config:Gt.prefix,component:o.e,path:"fields.prefix","data-test-subj":"prefixField"})),Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(o.s,{config:Gt.suffix,component:o.e,path:"fields.suffix","data-test-subj":"suffixField"}))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(Fe,null)),forLicenseAtLeast:"platinum",docLinkPath:"/redact-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.redact",{defaultMessage:"Redact"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.redact",{defaultMessage:"The Redact processor uses the Grok rules engine to obscure text in the input document matching the given Grok patterns."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.redact",{defaultMessage:'Redact values from "{field}" that match a grok pattern',values:{field:e}})},registered_domain:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.registeredDomain.fieldNameHelpText",{defaultMessage:"Field containing the fully qualified domain name."})}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,{defaultValue:!0,serializer:fe.undefinedIfValue(!0)})),docLinkPath:"/registered-domain-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.registeredDomain",{defaultMessage:"Registered domain"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.registeredDomain",{defaultMessage:"Extracts the registered domain (effective top-level domain), sub-domain, and top-level domain from a fully qualified domain name."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.registeredDomain",{defaultMessage:'Extracts the registered domain, sub-domain, and top-level domain from "{field}"',values:{field:e}})},remove:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(o.s,{config:Xt.field,component:o.c,path:"fields.field"}),Object(h.jsx)(Fe,null)),docLinkPath:"/remove-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.remove",{defaultMessage:"Remove"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.remove",{defaultMessage:"Removes one or more fields."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.remove",{defaultMessage:'Removes "{field}"',values:{field:Array.isArray(e)?e.map((e=>`"${e}"`)).join(", "):e}})},rename:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.renameForm.fieldNameHelpText",{defaultMessage:"Field to rename."})}),Object(h.jsx)(Ee,{label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.renameForm.targetFieldLabel",{defaultMessage:"Target field"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.renameForm.targetFieldHelpText",{defaultMessage:"New field name. This field cannot already exist."}),validations:[{validator:$t(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.renameForm.targetFieldRequiredError",{defaultMessage:"A value is required."}))}]}),Object(h.jsx)(Fe,null)),docLinkPath:"/rename-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.rename",{defaultMessage:"Rename"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.rename",{defaultMessage:"Renames an existing field."}),getDefaultDescription:({field:e,target_field:t})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.rename",{defaultMessage:'Renames "{field}" to "{target_field}"',values:{field:e,target_field:t}})},reroute:{FieldsComponent:()=>{const e=Object(o.F)(),[{fields:t}]=Object(o.G)({watch:["fields.dataset","fields.namespace"]}),{services:i}=Object(o.H)(),n=(a=i.documentation,{destination:{type:o.d.TEXT,serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.reroute.destinationFieldLabel",{defaultMessage:"Destination (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.reroute.destinationFieldHelperText",defaultMessage:"A value for the target index. Not available when {dataset} or {namespace} is set.",values:{dataset:Object(h.jsx)(p.EuiCode,null,"dataset"),namespace:Object(h.jsx)(p.EuiCode,null,"namespace")}})},dataset:{defaultValue:null,type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,serializer:fe.optionalArrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.reroute.datasetFieldLabel",{defaultMessage:"Dataset (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.reroute.datasetFieldHelperText",defaultMessage:"Field references or a static value for the dataset part of the data stream name. Must meet the criteria for {indexNamesLink}. Cannot contain {dash}. 100 characters max.",values:{indexNamesLink:Object(h.jsx)(p.EuiLink,{href:`${a.getEsDocsBasePath()}/indices-create-index.html#indices-create-api-path-params`,target:"_blank",external:!0},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.reroute.indexNameLink",{defaultMessage:"index names"})),dash:Object(h.jsx)(p.EuiCode,null,"-")}}),validations:[{validator:Zt({length:100,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.rerouteForm.datasetLengthError",{defaultMessage:"The value must not contain more than 100 characters."})})}]},namespace:{defaultValue:null,type:o.d.COMBO_BOX,deserializer:ue.arrayOfStrings,serializer:fe.optionalArrayOfStrings,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.reroute.namespaceFieldLabel",{defaultMessage:"Namespace (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.reroute.namespaceFieldHelperText",defaultMessage:"Field references or a static value for the namespace part of the data stream name. Must meet the criteria for {indexNamesLink}. 100 characters max.",values:{indexNamesLink:Object(h.jsx)(p.EuiLink,{href:`${a.getEsDocsBasePath()}/indices-create-index.html#indices-create-api-path-params`,target:"_blank",external:!0},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.reroute.indexNameLink",{defaultMessage:"index names"}))}}),validations:[{validator:Zt({length:100,message:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.rerouteForm.namespaceLengthError",{defaultMessage:"The value must not contain more than 100 characters."})})}]}});var a;return Object(s.useEffect)((()=>{(null!=t&&t.dataset&&t.dataset.length>0||null!=t&&t.namespace&&t.namespace.length>0)&&e.setFieldValue("fields.destination","")}),[e,t]),Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(o.s,{"data-test-subj":"destinationField",config:n.destination,component:o.e,componentProps:{euiFieldProps:{disabled:(null==t?void 0:t.dataset)&&t.dataset.length>0||(null==t?void 0:t.namespace)&&t.namespace.length>0}},path:"fields.destination"}),Object(h.jsx)(o.s,{"data-test-subj":"datasetField",config:n.dataset,component:o.c,componentProps:{euiFieldProps:{placeholder:"{{data_stream.dataset}}"}},path:"fields.dataset"}),Object(h.jsx)(o.s,{"data-test-subj":"namespaceField",config:n.namespace,component:o.c,componentProps:{euiFieldProps:{placeholder:"{{data_stream.namespace}}"}},path:"fields.namespace"}))},docLinkPath:"/reroute-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.reroute",{defaultMessage:"Reroute"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.reroute",{defaultMessage:"Routes a document to another target index or data stream."}),getDefaultDescription:({field:e,target_field:t})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.reroute",{defaultMessage:"Routes a document to another target index or data stream"})},script:{FieldsComponent:({initialFieldValues:e})=>{const[t,i]=Object(s.useState)((()=>!(null==e||!e.id))),[n,a]=Object(s.useState)(Je.PainlessLang.ID),[{fields:l}]=Object(o.G)({watch:"fields.lang"}),c=Je.PainlessLang.getSuggestionProvider("processor_conditional");return Object(s.useEffect)((()=>{const e="painless"===(null==l?void 0:l.lang)||""===(null==l?void 0:l.lang);a(e?Je.PainlessLang.ID:"plaintext")}),[l]),Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiFormRow,null,Object(h.jsx)(p.EuiSwitch,{label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.useScriptIdToggleLabel",{defaultMessage:"Run a stored script"}),checked:t,onChange:()=>i((e=>!e))})),t?Object(h.jsx)(o.s,{key:"fields.id",path:"fields.id",component:o.e,config:Qt.id}):Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(o.s,{component:o.e,config:Qt.lang,path:"fields.lang"}),Object(h.jsx)(o.s,{key:"fields.source",path:"fields.source",component:Xe,componentProps:{editorProps:{languageId:n,suggestionProvider:n===Je.PainlessLang.ID?c:void 0,height:xe,"aria-label":k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.sourceFieldAriaLabel",{defaultMessage:"Source script JSON editor"}),options:{minimap:{enabled:!1},lineNumbers:"off"}}},config:Qt.source})),Object(h.jsx)(o.s,{component:Ke,componentProps:{editorProps:{height:xe,"aria-label":k.i18n.translate("xpack.ingestPipelines.pipelineEditor.scriptForm.paramsFieldAriaLabel",{defaultMessage:"Parameters JSON editor"})}},config:Qt.params,path:"fields.params"}))},docLinkPath:"/script-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.script",{defaultMessage:"Script"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.script",{defaultMessage:"Runs a script on incoming documents."}),getDefaultDescription:()=>"Runs a script on incoming documents"},set:{FieldsComponent:()=>{const{getFieldDefaultValue:e}=Object(o.F)(),[{fields:t}]=Object(o.G)({watch:["fields.value","fields.copy_from"]}),i=void 0!==e("fields.copy_from"),[n,a]=Object(s.useState)(i),l=Object(s.useCallback)((()=>{a((e=>!e))}),[]),c=Object(s.useMemo)((()=>n?ti(l).copy_from:ti(l).value),[n,l]);return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.setForm.fieldNameField",{defaultMessage:"Field to insert or update."})}),Object(h.jsx)(o.s,u()({},c,{component:o.e})),$(null==t?void 0:t.value)&&Object(h.jsx)(o.s,{componentProps:{euiFieldProps:{"data-test-subj":"mediaTypeSelectorField",options:[{value:"application/json",text:"application/json"},{value:"text/plain",text:"text/plain"},{value:"application/x-www-form-urlencoded",text:"application/x-www-form-urlencoded"}]}},config:ei.mediaType,component:o.o,path:"fields.media_type"}),Object(h.jsx)(o.s,{config:ei.override,component:o.q,path:"fields.override","data-test-subj":"overrideField"}),Object(h.jsx)(o.s,{config:ei.ignore_empty_value,component:o.q,path:"fields.ignore_empty_value","data-test-subj":"ignoreEmptyField"}))},docLinkPath:"/set-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.set",{defaultMessage:"Set"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.set",{defaultMessage:"Sets the value of a field."}),getDefaultDescription:({field:e,value:t,copy_from:i})=>i?k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.setCopyFrom",{defaultMessage:'Sets value of "{field}" to the value of "{copyFrom}"',values:{field:e,copyFrom:i}}):k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.set",{defaultMessage:'Sets value of "{field}" to "{value}"',values:{field:e,value:t}})},set_security_user:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.setSecurityUserForm.fieldNameField",{defaultMessage:"Output field."})}),Object(h.jsx)(o.s,{config:ri.properties,component:o.c,componentProps:{euiFieldProps:{options:ni,noSuggestions:!1}},path:"fields.properties"})),docLinkPath:"/ingest-node-set-security-user-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.setSecurityUser",{defaultMessage:"Set security user"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.setSecurityUser",{defaultMessage:"Adds details about the current user, such user name and email address, to incoming documents. Requires an authenticated user for the indexing request."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.setSecurityUser",{defaultMessage:'Adds details about the current user to "{field}"',values:{field:e}})},sort:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.sortForm.fieldNameHelpText",{defaultMessage:"Field containing array values to sort."})}),Object(h.jsx)(o.s,{config:ai.order,component:o.o,componentProps:{euiFieldProps:{options:[{value:"asc",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.sortForm.orderField.ascendingOption",{defaultMessage:"Ascending"})},{value:"desc",text:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.sortForm.orderField.descendingOption",{defaultMessage:"Descending"})}]}},path:"fields.order"}),Object(h.jsx)(Ee,null)),docLinkPath:"/sort-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.sort",{defaultMessage:"Sort"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.sort",{defaultMessage:"Sorts a field's array elements."}),getDefaultDescription:({field:e,order:t="asc"})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.sort",{defaultMessage:'Sorts elements in the array "{field}" in {order} order',values:{field:e,order:"asc"===t?k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.sort.orderAscendingLabel",{defaultMessage:"ascending"}):k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.sort.orderDescendingLabel",{defaultMessage:"descending"})}})},split:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.splitForm.fieldNameHelpText",{defaultMessage:"Field to split."})}),Object(h.jsx)(o.s,{config:li.separator,component:o.e,path:"fields.separator"}),Object(h.jsx)(Ee,null),Object(h.jsx)(o.s,{config:li.preserve_trailing,component:o.q,path:"fields.preserve_trailing"}),Object(h.jsx)(Fe,null)),docLinkPath:"/split-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.split",{defaultMessage:"Split"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.split",{defaultMessage:"Splits a field value into an array."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.split",{defaultMessage:'Splits the string stored in "{field}" to an array',values:{field:e}})},trim:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.trimForm.fieldNameHelpText",{defaultMessage:"Field to trim. For an array of strings, each element is trimmed."})}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,null)),docLinkPath:"/trim-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.trim",{defaultMessage:"Trim"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.trim",{defaultMessage:"Removes leading and trailing whitespace from a string."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.trim",{defaultMessage:'Trims whitespaces from "{field}"',values:{field:e}})},uppercase:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.uppercaseForm.fieldNameHelpText",{defaultMessage:"Field to uppercase. For an array of strings, each element is uppercased."})}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,null)),docLinkPath:"/uppercase-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.uppercase",{defaultMessage:"Uppercase"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.uppercase",{defaultMessage:"Converts a string to uppercase."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.uppercase",{defaultMessage:'Converts values in "{field}" to uppercase',values:{field:e}})},urldecode:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.urlDecodeForm.fieldNameHelpText",{defaultMessage:"Field to decode. For an array of strings, each element is decoded."})}),Object(h.jsx)(Ee,null),Object(h.jsx)(Fe,null)),docLinkPath:"/urldecode-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.urldecode",{defaultMessage:"URL decode"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.urldecode",{defaultMessage:"Decodes a URL-encoded string."}),getDefaultDescription:({field:e})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.url_decode",{defaultMessage:'Decodes the URL in "{field}"',values:{field:e}})},uri_parts:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.uriPartsForm.fieldNameHelpText",{defaultMessage:"Field containing URI string."})}),Object(h.jsx)(Ee,null),Object(h.jsx)(o.s,{config:ci.keep_original,component:o.q,path:"fields.keep_original","data-test-subj":"keepOriginalField"}),Object(h.jsx)(o.s,{config:ci.remove_if_successful,component:o.q,path:"fields.remove_if_successful","data-test-subj":"removeIfSuccessfulField"})),docLinkPath:"/uri-parts-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.uriPartsLabel",{defaultMessage:"URI parts"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.uriPartsDescription",{defaultMessage:"Parses a Uniform Resource Identifier (URI) string and extracts its components as an object."}),getDefaultDescription:({field:e,target_field:t="url"})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.uri_parts",{defaultMessage:'Parses the URI string in "{field}" and stores the result in "{target_field}"',values:{field:e,target_field:t}})},user_agent:{FieldsComponent:()=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(je,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.userAgentForm.fieldNameHelpText",{defaultMessage:"Field containing the user agent string."})}),Object(h.jsx)(o.s,{config:di.regex_file,component:o.e,path:"fields.regex_file","data-test-subj":"regexFileField"}),Object(h.jsx)(Ee,{helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.userAgentForm.targetFieldHelpText",defaultMessage:"Output field. Defaults to {defaultField}.",values:{defaultField:Object(h.jsx)(p.EuiCode,null,"user_agent")}})}),Object(h.jsx)(xt,{helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.userAgentForm.propertiesFieldHelpText",{defaultMessage:"Properties added to the target field."}),euiFieldProps:{options:pi,noSuggestions:!1,"data-test-subj":"propertiesValueField"}}),Object(h.jsx)(o.s,{config:di.extract_device_type,component:o.q,path:"fields.extract_device_type","data-test-subj":"extractDeviceTypeSwitch",euiFieldProps:{label:Object(h.jsx)(p.EuiFlexGroup,{gutterSize:"xs"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.userAgentForm.extractDeviceNameFieldText",defaultMessage:"Extract device type"})),Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(p.EuiBetaBadge,{size:"s",label:"Beta",tooltipContent:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.userAgentForm.extractDeviceNameTooltipText",{defaultMessage:"This functionality is in beta and is subject to change."})})))}}),Object(h.jsx)(Fe,null)),docLinkPath:"/user-agent-processor.html",label:k.i18n.translate("xpack.ingestPipelines.processors.label.userAgent",{defaultMessage:"User agent"}),typeDescription:k.i18n.translate("xpack.ingestPipelines.processors.description.userAgent",{defaultMessage:"Extracts values from a browser's user agent string."}),getDefaultDescription:({field:e,target_field:t="user_agent"})=>k.i18n.translate("xpack.ingestPipelines.processors.defaultDescription.user_agent",{defaultMessage:'Extracts the user agent from "{field}" and stores the results in "{target_field}"',values:{field:e,target_field:t}})}},fi=e=>ui[e],gi=()=>Object(h.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.1221 12.5211C0.758621 13.1875 1.24093 14 1.99999 14H14C14.7591 14 15.2414 13.1875 14.8779 12.5211L8.87789 1.52115C8.49887 0.826284 7.50112 0.826284 7.1221 1.52115L1.1221 12.5211ZM7.34999 5.18143L7.5896 10.0586H8.40019L8.64999 5.18143H7.34999ZM7.53642 11.7736C7.66071 11.8979 7.80999 11.96 7.98428 11.96C8.14999 11.96 8.2957 11.8986 8.42142 11.7757C8.54713 11.6529 8.60999 11.5043 8.60999 11.33C8.60999 11.1529 8.54785 11.0036 8.42356 10.8822C8.29928 10.7607 8.15285 10.7 7.98428 10.7C7.80999 10.7 7.66071 10.7614 7.53642 10.8843C7.41213 11.0072 7.34999 11.1557 7.34999 11.33C7.34999 11.5014 7.41213 11.6493 7.53642 11.7736Z",fill:"#BD271E"})),mi=()=>Object(h.jsx)("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.69297 4.58336L6.89831 8.76292H7.59296L7.80703 4.58336H6.69297ZM6.85273 10.2326C6.95924 10.3391 7.08717 10.3924 7.23653 10.3924C7.37855 10.3924 7.50342 10.3397 7.61115 10.2345C7.71889 10.1292 7.77275 10.0019 7.77275 9.8525C7.77275 9.70069 7.7195 9.57276 7.61299 9.4687C7.50648 9.36464 7.38099 9.31261 7.23653 9.31261C7.08717 9.31261 6.95924 9.36525 6.85273 9.47053C6.74622 9.57582 6.69297 9.70314 6.69297 9.8525C6.69297 9.99941 6.74622 10.1261 6.85273 10.2326ZM1.35585 10.8733C1.04436 11.4443 1.45769 12.1406 2.10818 12.1406H8.38069C8.31594 11.8631 8.2743 11.5767 8.25791 11.2836H2.10818L7.25 1.85697L10.1132 7.10614C10.3362 6.92628 10.5749 6.76519 10.827 6.62525L8.00233 1.44661C7.67752 0.851131 6.82248 0.851131 6.49767 1.44661L1.35585 10.8733Z",fill:"#BD271E"}),Object(h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.25 6C10.0409 6 8.25 7.79086 8.25 10C8.25 12.2091 10.0409 14 12.25 14C14.4591 14 16.25 12.2091 16.25 10C16.25 7.79086 14.4591 6 12.25 6ZM12.632 11.0522L14.5087 9.28831L15.0441 9.8565L12.25 12.4813L9.45584 9.8565L9.99126 9.28831L11.8515 11.0367V7.51871H12.632V11.0522Z",fill:"#BD271E"})),xi=()=>Object(h.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.00586 2C2.94746 2 2.08199 2.81827 2.0055 3.85616L2 4.00586V9.99414C2 11.0525 2.81827 11.918 3.85616 11.9945L4 11.9998L4.00417 11.9999L4.00586 12L12.5167 11.9999L10.6067 13.8199C10.553 13.8687 10.5101 13.9281 10.4807 13.9944C10.4514 14.0607 10.4362 14.1324 10.4362 14.2049C10.4362 14.2774 10.4514 14.3492 10.4807 14.4155C10.5101 14.4818 10.553 14.5412 10.6067 14.5899C10.8337 14.8029 11.2067 14.8029 11.4347 14.5899L13.4847 12.6399C13.6468 12.4944 13.7765 12.3163 13.8653 12.1173C13.9541 11.9183 14 11.7028 14 11.4849C14 11.267 13.9541 11.0516 13.8653 10.8526C13.7765 10.6536 13.6468 10.4755 13.4847 10.3299L11.4347 8.37994C11.3212 8.27699 11.1734 8.21997 11.0202 8.21997C10.8669 8.21997 10.7192 8.27699 10.6057 8.37994C10.552 8.42868 10.5091 8.48811 10.4797 8.55441C10.4504 8.62072 10.4352 8.69243 10.4352 8.76494C10.4352 8.83745 10.4504 8.90916 10.4797 8.97546C10.5091 9.04177 10.552 9.1012 10.6057 9.14994L12.5487 10.9999H4C3.48642 10.997 3.0646 10.6103 3.00676 10.1116L3 9.99414V4.00586C3 3.48963 3.38781 3.06482 3.88845 3.00676L4.00586 3H13.5C13.7761 3 14 2.77614 14 2.5C14 2.25454 13.8231 2.05039 13.5899 2.00806L13.5 2H4.00586Z",fill:"#69707D"}));var bi=i(38),hi=i(78),ji=i(3);const vi=Object(bi.flow)(Object.entries,Object(hi.map)((([e,{label:t,forLicenseAtLeast:i}])=>({label:t,value:e,...i?{forLicenseAtLeast:i}:{}}))),(e=>e.sort(((e,t)=>e.label.localeCompare(t.label))))),{emptyField:Oi}=o.y,_i={type:o.d.COMBO_BOX,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.typeField.typeFieldLabel",{defaultMessage:"Processor"}),deserializer:String,validations:[{validator:Oi(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.typeField.fieldRequiredError",{defaultMessage:"A type is required."}))}]},yi=({initialType:e})=>{const{services:{documentation:t,license:i}}=Object(o.H)(),n=t.getEsDocsBasePath(),r=Object(s.useMemo)((()=>(e=>vi(ui).filter((t=>!t.forLicenseAtLeast||(null==e?void 0:e.hasAtLeast(t.forLicenseAtLeast)))).map((({value:e,label:t})=>({label:t,value:e}))))(i)),[i]);return Object(h.jsx)(o.s,{config:_i,defaultValue:e,path:"type"},(e=>{var t;let i,s="";if(null!==(t=e.value)&&void 0!==t&&t.length){const t=e.value,n=fi(t);n?(s=n.typeDescription||"",i=[{label:n.label,value:t}]):i=[{label:t,value:t}]}else i=[];const a=e.getErrorsMessages(),o=!!a&&Boolean(a.length);return Object(h.jsx)(p.EuiFormRow,{label:e.label,labelAppend:e.labelAppend,helpText:"function"==typeof s?s(n):s,error:a,isInvalid:o,fullWidth:!0,"data-test-subj":"processorTypeSelector"},Object(h.jsx)(p.EuiComboBox,{fullWidth:!0,placeholder:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.typeField.typeFieldComboboxPlaceholder",{defaultMessage:"Start typing or select a processor"}),options:r,selectedOptions:i,onCreateOption:t=>{const{isValid:i}=e.validate({value:t,validationType:ji.VALIDATION_TYPES.ARRAY_ITEM});if(!i)return!1;e.setValue(t)},onChange:t=>{var i;const[n]=t;e.setValue(null!==(i=null==n?void 0:n.value)&&void 0!==i?i:"")},noSuggestions:!1,singleSelection:{asPlainText:!0},"data-test-subj":"input"}))}))},Ei={defaultValue:!1,deserializer:ue.booleanOrUndef,serializer:fe.undefinedIfValue(!1),label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.ignoreFailureFieldLabel",{defaultMessage:"Ignore failures for this processor"}),type:o.d.TOGGLE},Pi={serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.ifFieldLabel",{defaultMessage:"Condition (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.commonFields.ifFieldHelpText",defaultMessage:"An {if} condition written as a Painless script: {exampleCondition}",values:{if:Object(h.jsx)(p.EuiCode,null,"if"),exampleCondition:Object(h.jsx)(p.EuiCode,null,"ctx?.network?.name == 'Guest'")}}),type:o.d.TEXT},Fi={serializer:fe.emptyStringToUndefined,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.tagFieldLabel",{defaultMessage:"Tag (optional)"}),helpText:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.commonFields.tagFieldHelpText",{defaultMessage:"An identifier for the processor. Useful for debugging and metrics."}),type:o.d.TEXT},Mi=()=>{const e=Je.PainlessLang.getSuggestionProvider("processor_conditional");return Object(h.jsx)("section",null,Object(h.jsx)(o.s,{"data-test-subj":"ifField",config:Pi,component:Xe,componentProps:{editorProps:{languageId:Je.PainlessLang.ID,suggestionProvider:e,height:75,options:{lineNumbers:"off",minimap:{enabled:!1}}}},path:"fields.if"}),Object(h.jsx)(o.s,{"data-test-subj":"tagField",config:Fi,component:o.e,path:"fields.tag"}),Object(h.jsx)(o.s,{"data-test-subj":"ignoreFailureSwitch",config:Ei,component:o.q,path:"fields.ignore_failure"}))},{emptyField:ki,isJsonField:Ti}=o.y,Si={type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.customForm.optionsFieldLabel",{defaultMessage:"Configuration"}),serializer:e=>{try{return JSON.parse(e)}catch(t){return e}},deserializer:e=>""===e?"{\n\n}":JSON.stringify(e,null,2),validations:[{validator:ki(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.customForm.configurationRequiredError",{defaultMessage:"Configuration is required."}))},{validator:Ti(k.i18n.translate("xpack.ingestPipelines.pipelineEditor.customForm.invalidJsonError",{defaultMessage:"The input is not valid."}))}]},Ci=({defaultOptions:e})=>Object(h.jsx)(o.s,{path:"customOptions",component:Ke,config:Si,defaultValue:e,componentProps:{editorProps:{"data-test-subj":"processorOptionsEditor",height:300,"aria-label":k.i18n.translate("xpack.ingestPipelines.pipelineEditor.customForm.optionsFieldAriaLabel",{defaultMessage:"Configuration JSON editor"})}}}),Ii=({processor:e})=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(yi,{initialType:null==e?void 0:e.type}),Object(h.jsx)(p.EuiHorizontalRule,null),Object(h.jsx)(o.g,{pathsToWatch:"type"},(t=>{const{type:i}=t;if(null!=i&&i.length){const t=fi(i);if(t){const n=t.FieldsComponent?Object(h.jsx)(t.FieldsComponent,{key:i,initialFieldValues:null==e?void 0:e.options}):null;return Object(h.jsx)(r.a.Fragment,null,n?Object(h.jsx)(r.a.Fragment,null,n,Object(h.jsx)(p.EuiHorizontalRule,null)):n,Object(h.jsx)(Mi,null))}return Object(h.jsx)(Ci,{defaultOptions:null==e?void 0:e.options})}return null}))),wi=({processorLabel:e,docLink:t})=>Object(h.jsx)(p.EuiButtonEmpty,{size:"s",flush:"right",href:t,target:"_blank",iconType:"help"},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.settingsForm.learnMoreLabelLink.processor",{defaultMessage:"{processorLabel} documentation",values:{processorLabel:e}}));i(83);const Li={tabDescription:k.i18n.translate("xpack.ingestPipelines.processorOutput.descriptionText",{defaultMessage:"Preview changes to the test document."}),skippedCalloutTitle:k.i18n.translate("xpack.ingestPipelines.processorOutput.skippedCalloutTitle",{defaultMessage:"The processor was not run."}),droppedCalloutTitle:k.i18n.translate("xpack.ingestPipelines.processorOutput.droppedCalloutTitle",{defaultMessage:"The document was dropped."}),noOutputCalloutTitle:k.i18n.translate("xpack.ingestPipelines.processorOutput.noOutputCalloutTitle",{defaultMessage:"Output is not available for this processor."}),processorOutputLabel:k.i18n.translate("xpack.ingestPipelines.processorOutput.processorOutputCodeBlockLabel",{defaultMessage:"Data out"}),processorErrorTitle:k.i18n.translate("xpack.ingestPipelines.processorOutput.processorErrorCodeBlockLabel",{defaultMessage:"There was an error"}),prevProcessorLabel:k.i18n.translate("xpack.ingestPipelines.processorOutput.processorInputCodeBlockLabel",{defaultMessage:"Data in"}),processorIgnoredErrorTitle:k.i18n.translate("xpack.ingestPipelines.processorOutput.ignoredErrorCodeBlockLabel",{defaultMessage:"There was an ignored error"}),documentsDropdownLabel:k.i18n.translate("xpack.ingestPipelines.processorOutput.documentsDropdownLabel",{defaultMessage:"Test data:"}),loadingMessage:k.i18n.translate("xpack.ingestPipelines.processorOutput.loadingMessage",{defaultMessage:"Loading processor output…"})},Ri=({processorOutput:e,documents:t,selectedDocumentIndex:i,updateSelectedDocument:n,isExecuting:s})=>{if(s)return Object(h.jsx)(o.n,{inline:!0},Li.loadingMessage);if(!e)return Object(h.jsx)(p.EuiCallOut,{title:Li.noOutputCalloutTitle,color:"danger",iconType:"warning"});const{processorInput:a,doc:l,ignored_error:c,error:d,status:u}=e,f=()=>Object(h.jsx)(p.EuiCallOut,{title:Li.noOutputCalloutTitle,iconType:"pin"});return Object(h.jsx)("div",{"data-test-subj":"processorOutputTabContent",className:"processorOutput"},Object(h.jsx)(p.EuiText,null,Object(h.jsx)("p",null,Li.tabDescription)),Object(h.jsx)(p.EuiSpacer,null),Object(h.jsx)(p.EuiSelect,{compressed:!0,options:t.map(((e,t)=>({value:t,text:k.i18n.translate("xpack.ingestPipelines.processorOutput.documentLabel",{defaultMessage:"Document {number}",values:{number:t+1}})}))),value:i,onChange:e=>{n(Number(e.target.value))},"aria-label":Li.documentsDropdownLabel,prepend:Li.documentsDropdownLabel}),Object(h.jsx)(p.EuiSpacer,null),Object(h.jsx)(p.EuiAccordion,{id:"processor_input_accordion",buttonContent:Object(h.jsx)(p.EuiText,null,Object(h.jsx)("p",null,Li.prevProcessorLabel))},Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiSpacer,null),Object(h.jsx)(p.EuiCodeBlock,{paddingSize:"s",language:"json",isCopyable:!0},JSON.stringify(a||t[i],null,2)))),Object(h.jsx)(p.EuiSpacer,null),Object(h.jsx)(p.EuiText,null,Object(h.jsx)("span",null,Li.processorOutputLabel)),Object(h.jsx)(p.EuiSpacer,{size:"xs"}),(()=>{switch(u){case"skipped":return Object(h.jsx)(p.EuiCallOut,{title:Li.skippedCalloutTitle,iconType:xi,className:"processorOutput__callOut processorOutput__callOut--customIcon"});case"dropped":return Object(h.jsx)(p.EuiCallOut,{title:Li.droppedCalloutTitle,iconType:"indexClose"});case"success":return l?Object(h.jsx)(p.EuiCodeBlock,{paddingSize:"s",language:"json",isCopyable:!0},JSON.stringify(l,null,2)):Object(h.jsx)(f,null);case"error":return Object(h.jsx)(p.EuiCallOut,{iconType:gi,title:Li.processorErrorTitle,color:"danger",className:"processorOutput__callOut processorOutput__callOut--customIcon"},Object(h.jsx)(p.EuiCodeBlock,{language:"json",paddingSize:"none",className:"processorOutput__callOut__codeBlock",transparentBackground:!0},JSON.stringify(d,null,2)));case"error_ignored":return Object(h.jsx)(p.EuiCallOut,{iconType:mi,title:Li.processorIgnoredErrorTitle,color:"warning",className:"processorOutput__callOut processorOutput__callOut--customIcon"},Object(h.jsx)(p.EuiCodeBlock,{className:"processorOutput__callOut__codeBlock",language:"json",paddingSize:"none",transparentBackground:!0},JSON.stringify(c,null,2)));default:return Object(h.jsx)(f,null)}})())},Di=k.i18n.translate("xpack.ingestPipelines.processorFormFlyout.updateButtonLabel",{defaultMessage:"Update"}),zi=k.i18n.translate("xpack.ingestPipelines.processorFormFlyout.cancelButtonLabel",{defaultMessage:"Cancel"}),Ai=[{id:"configuration",name:k.i18n.translate("xpack.ingestPipelines.settingsFormOnFailureFlyout.configurationTabTitle",{defaultMessage:"Configuration"})},{id:"output",name:k.i18n.translate("xpack.ingestPipelines.settingsFormOnFailureFlyout.outputTabTitle",{defaultMessage:"Output"})}],Ni=({getProcessor:e,form:t,isOnFailure:i,onOpen:n,esDocsBasePath:r,closeFlyout:a,handleSubmit:l,resetProcessors:d})=>{const{testPipelineData:u,testPipelineDataDispatch:f}=ls(),{testOutputPerProcessor:g,config:{selectedDocumentIndex:m,documents:x},isExecutingPipeline:b}=u,j=e(),v=j&&g&&g[m][j.id];Object(s.useEffect)((()=>{n()}),[]);const[O,_]=Object(s.useState)("configuration");let y;return y="output"===O?Object(h.jsx)(Ri,{processorOutput:v,documents:x,selectedDocumentIndex:m,updateSelectedDocument:e=>{f({type:"updateActiveDocument",payload:{config:{selectedDocumentIndex:e}}})},isExecuting:b}):Object(h.jsx)(Ii,{processor:j}),Object(h.jsx)(o.f,{"data-test-subj":"editProcessorForm",form:t,onSubmit:l},Object(h.jsx)(p.EuiFlyout,{size:"m",maxWidth:720,onClose:()=>{d(),a()}},Object(h.jsx)(p.EuiFlyoutHeader,null,Object(h.jsx)(p.EuiFlexGroup,{gutterSize:"xs"},Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)("div",null,Object(h.jsx)(p.EuiTitle,{size:"m"},Object(h.jsx)("h2",null,(e=>e?Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.settingsFormOnFailureFlyout.manageOnFailureTitle",defaultMessage:"Manage on-failure processor"}):Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.settingsFormOnFailureFlyout.manageTitle",defaultMessage:"Manage processor"}))(i))))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(o.g,{pathsToWatch:"type"},(({type:e})=>{const t=fi(e);return t?Object(h.jsx)(wi,{processorLabel:t.label,docLink:r+t.docLinkPath}):null}))))),Object(h.jsx)(p.EuiFlyoutBody,null,Object(h.jsx)(p.EuiTabs,null,Ai.map((e=>Object(h.jsx)(p.EuiTab,{onClick:async()=>{e.id!==O&&("output"===e.id?await l(!1):t.reset({defaultValue:{fields:j.options}}),_(e.id))},isSelected:e.id===O,key:e.id,"data-test-subj":`${e.id}Tab`,disabled:"output"===e.id&&(!1===Boolean(g)||!1===Boolean(v))},e.name)))),Object(h.jsx)(p.EuiSpacer,null),y),Object(h.jsx)(p.EuiFlyoutFooter,null,Object(h.jsx)(p.EuiFlexGroup,{justifyContent:"flexEnd"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButtonEmpty,{onClick:()=>{d(),a()}},zi)),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButton,{fill:!0,disabled:!t.isValid&&t.isSubmitted||t.isSubmitting,"data-test-subj":"submitButton",onClick:async()=>{if("output"===O)return a();await l()}},Di))))))},Bi=k.i18n.translate("xpack.ingestPipelines.addProcessorFormOnFailureFlyout.addButtonLabel",{defaultMessage:"Add processor"}),Ui=k.i18n.translate("xpack.ingestPipelines.addProcesorFormOnFailureFlyout.cancelButtonLabel",{defaultMessage:"Cancel"}),Hi=({isOnFailure:e,onOpen:t,form:i,esDocsBasePath:n,closeFlyout:r,handleSubmit:a})=>(Object(s.useEffect)((()=>{t()}),[]),Object(h.jsx)(o.f,{"data-test-subj":"addProcessorForm",form:i,onSubmit:a},Object(h.jsx)(p.EuiFlyout,{size:"m",maxWidth:720,onClose:r},Object(h.jsx)(p.EuiFlyoutHeader,null,Object(h.jsx)(p.EuiFlexGroup,{gutterSize:"xs"},Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)("div",null,Object(h.jsx)(p.EuiTitle,{size:"m","data-test-subj":"configurePipelineHeader"},Object(h.jsx)("h2",null,(e=>e?Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.settingsFormOnFailureFlyout.configureOnFailureTitle",defaultMessage:"Add on-failure processor"}):Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.settingsFormOnFailureFlyout.configureTitle",defaultMessage:"Add processor"}))(e))))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(o.g,{pathsToWatch:"type"},(({type:e})=>{const t=fi(e);return t?Object(h.jsx)(wi,{processorLabel:t.label,docLink:n+t.docLinkPath}):null}))))),Object(h.jsx)(p.EuiFlyoutBody,null,Object(h.jsx)(Ii,null)),Object(h.jsx)(p.EuiFlyoutFooter,null,Object(h.jsx)(p.EuiFlexGroup,{justifyContent:"flexEnd"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButtonEmpty,{onClick:r},Ui)),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButton,{fill:!0,disabled:!i.isValid&&i.isSubmitted||i.isSubmitting,"data-test-subj":"submitButton",onClick:async()=>{await a()}},Bi))))))),Wi={stripEmptyFields:!1},Vi=({processor:e,onFormUpdate:t,onSubmit:i,onClose:n,...r})=>{const{services:a}=Object(o.H)(),l=Object(s.useRef)(),c=Object(s.useCallback)((()=>{let t;var i;return t=null!=l&&l.current?l.current:null!==(i=null==e?void 0:e.options)&&void 0!==i?i:{},{...e,options:t}}),[e,l]),p=Object(s.useCallback)((t=>({type:t.type,fields:t.customOptions?{...t.customOptions}:{...t.fields,description:e?e.options.description:void 0}})),[e]),{form:d}=Object(o.E)({defaultValue:{fields:c().options},serializer:p,options:Wi}),{subscribe:f}=d,g=Object(s.useCallback)((async(e=!0)=>{const{isValid:t,data:s}=await d.submit();if(t){const{type:t,fields:r}=s;l.current=r,i({type:t,options:r}),e&&n()}}),[d,n,i]),m=Object(s.useCallback)((()=>{i({type:e.type,options:(null==e?void 0:e.options)||{}})}),[i,e]);return Object(s.useEffect)((()=>f(t).unsubscribe),[t,f]),e?Object(h.jsx)(Ni,u()({},r,{form:d,getProcessor:c,esDocsBasePath:a.documentation.getEsDocsBasePath(),closeFlyout:n,resetProcessors:m,handleSubmit:g})):Object(h.jsx)(Hi,u()({},r,{form:d,esDocsBasePath:a.documentation.getEsDocsBasePath(),closeFlyout:n,handleSubmit:g}))},qi=k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addProcessorButtonLabel",{defaultMessage:"Add a processor"}),Gi=e=>{const{onClick:t,renderButtonAsLink:i}=e,{state:{editor:n}}=fs();return i?Object(h.jsx)(p.EuiButtonEmpty,{"data-test-subj":"addProcessorButton",disabled:"idle"!==n.mode.id,iconSide:"left",iconType:"plusInCircle",onClick:t},qi):Object(h.jsx)(p.EuiButton,{"data-test-subj":"addProcessorButton",className:"pipelineProcessorsEditor__tree__addProcessorButton",disabled:"idle"!==n.mode.id,onClick:t},qi)};var Ji=i(26),Xi=i.n(Ji);const $i=k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dropZoneButton.moveHereToolTip",{defaultMessage:"Move here"}),Zi=k.i18n.translate("xpack.ingestPipelines.pipelineEditor.dropZoneButton.unavailableToolTip",{defaultMessage:"Cannot move here"}),Ki=e=>{const{onClick:t,isDisabled:i,isVisible:n,compressed:s}=e,r=n&&i,a=Xi()({"pipelineProcessorsEditor__tree__dropZoneContainer--visible":n,"pipelineProcessorsEditor__tree__dropZoneContainer--unavailable":r}),o=Xi()({"pipelineProcessorsEditor__tree__dropZoneButton--visible":n,"pipelineProcessorsEditor__tree__dropZoneButton--compressed":s});return Object(h.jsx)("div",{className:`pipelineProcessorsEditor__tree__dropZoneContainer ${a}`},Object(h.jsx)(p.EuiButtonIcon,{"data-test-subj":e["data-test-subj"],className:`pipelineProcessorsEditor__tree__dropZoneButton ${o}`,"aria-label":r?Zi:$i,onClick:i?()=>{}:t,iconType:"empty"}))};var Yi=i(88),Qi=i.n(Yi),en=i(91),tn=i.n(en),nn=i(106),sn=i.n(nn);const rn=({processor:e,isFirstInArray:t})=>{var i;const n=t?6:0;return null!==(i=e.onFailure)&&void 0!==i&&i.length?n+137+e.onFailure.reduce(((e,t,i)=>e+rn({processor:t,isFirstInArray:0===i})),0):n+57},an=(e,t)=>Boolean(!t.aboveId&&t.id===e.id||Y(t.selector,e.selector)),on=(e,t)=>e.id===t.id||e.belowId===t.id||Y(t.selector,e.selector),ln=({processors:e,selector:t,movingProcessor:i,onAction:n,level:a,windowScrollerRef:o,listRef:l})=>{const c=Object(s.useMemo)((()=>e.map(((e,i)=>t.concat(String(i))))),[e,t]),d=({idx:s,info:o,processor:l})=>{const c=H(o.selector);return Object(h.jsx)(r.a.Fragment,null,0===s?Object(h.jsx)(Ki,{"data-test-subj":`dropButtonAbove-${c}`,onClick:e=>{e.preventDefault(),n({type:"move",payload:{destination:t.concat(Z.top),source:i.selector}})},isVisible:Boolean(i),isDisabled:!i||an(o,i)}):void 0,Object(h.jsx)(xn,{level:a,processor:l,processorInfo:o,onAction:n,movingProcessor:i}),Object(h.jsx)(Ki,{compressed:1===a&&s+1===e.length,"data-test-subj":`dropButtonBelow-${c}`,isVisible:Boolean(i),isDisabled:!i||on(o,i),onClick:e=>{e.preventDefault(),n({type:"move",payload:{destination:t.concat(String(s+1)),source:i.selector}})}}))};return Object(s.useEffect)((()=>{o&&o.current&&o.current.updatePosition(),l&&l.current&&l.current.recomputeRowHeights()}),[e,l,o,i]),1===a?Object(h.jsx)(sn.a,{ref:o,scrollElement:window},(({height:t,registerChild:i,isScrolling:n,onChildScroll:s,scrollTop:r})=>Object(h.jsx)(Qi.a,{disableHeight:!0},(({width:a})=>Object(h.jsx)("div",{style:{width:"100%"},ref:i},Object(h.jsx)(tn.a,{ref:l,autoHeight:!0,height:t,width:a,overScanRowCount:5,isScrolling:n,onChildScroll:s,scrollTop:r,rowCount:e.length,rowHeight:({index:t})=>{const i=e[t];return rn({processor:i,isFirstInArray:0===t})},rowRenderer:({index:t,style:i})=>{const n=e[t],s=e[t-1],r=e[t+1],a={id:n.id,selector:c[t],aboveId:null==s?void 0:s.id,belowId:null==r?void 0:r.id};return Object(h.jsx)("div",{style:i,key:n.id},d({processor:n,info:a,idx:t}))},processors:e})))))):Object(h.jsx)(p.EuiFlexGroup,{direction:"column",responsive:!1,gutterSize:"none"},e.map(((i,n)=>{const s=e[n-1],r=e[n+1],a={id:i.id,selector:t.concat(String(n)),aboveId:null==s?void 0:s.id,belowId:null==r?void 0:r.id};return Object(h.jsx)("div",{key:i.id},d({processor:i,idx:n,info:a}))})))},cn={success:{icon:"checkInCircleFilled",iconColor:"success",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditorItem.successStatusAriaLabel",{defaultMessage:"Success"})},error:{icon:gi,iconColor:"danger",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditorItem.errorStatusAriaLabel",{defaultMessage:"Error"})},error_ignored:{icon:mi,iconColor:"danger",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditorItem.errorIgnoredStatusAriaLabel",{defaultMessage:"Error ignored"})},dropped:{icon:"indexClose",iconColor:"subdued",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditorItem.droppedStatusAriaLabel",{defaultMessage:"Dropped"})},skipped:{icon:xi,iconColor:"subdued",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditorItem.skippedStatusAriaLabel",{defaultMessage:"Skipped"})},inactive:{icon:"dot",iconColor:"#D3DAE6",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditorItem.inactiveStatusAriaLabel",{defaultMessage:"Not run"})}},pn={icon:"dot",iconColor:"#D3DAE6",label:k.i18n.translate("xpack.ingestPipelines.pipelineEditorItem.unknownStatusAriaLabel",{defaultMessage:"Unknown"})},dn=({processorStatus:e})=>{const{icon:t,iconColor:i,label:n}=cn[e]||pn;return Object(h.jsx)(p.EuiToolTip,{position:"top",content:Object(h.jsx)("p",null,n)},Object(h.jsx)(p.EuiIcon,{color:i,type:t,"aria-label":n,size:"s","data-test-subj":"processorStatusIcon"}))};i(109);const un={moveButtonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.item.moveButtonLabel",{defaultMessage:"Move this processor"}),editButtonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.item.editButtonAriaLabel",{defaultMessage:"Edit this processor"}),duplicateButtonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.item.moreMenu.duplicateButtonLabel",{defaultMessage:"Duplicate this processor"}),addOnFailureButtonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.item.moreMenu.addOnFailureHandlerButtonLabel",{defaultMessage:"Add on failure handler"}),cancelMoveButtonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.item.cancelMoveButtonAriaLabel",{defaultMessage:"Cancel move"}),deleteButtonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.item.moreMenu.deleteButtonLabel",{defaultMessage:"Delete"}),moreButtonAriaLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.item.moreButtonAriaLabel",{defaultMessage:"Show more actions for this processor"}),processorTypeLabel:({type:e})=>k.i18n.translate("xpack.ingestPipelines.pipelineEditor.item.textInputAriaLabel",{defaultMessage:"Provide a description for this {type} processor",values:{type:e}}),descriptionPlaceholder:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.item.descriptionPlaceholder",{defaultMessage:"No description"})},fn=e=>{const{showAddOnFailure:t,onDuplicate:i,onAddOnFailure:n,onDelete:r,disabled:a,hidden:o}=e,[l,c]=Object(s.useState)(!1),d=Xi()({"pipelineProcessorsEditor__item--displayNone":o}),u=[Object(h.jsx)(p.EuiContextMenuItem,{"data-test-subj":"duplicateButton",key:"duplicate",icon:"copy",onClick:()=>{c(!1),i()}},un.duplicateButtonLabel),t?Object(h.jsx)(p.EuiContextMenuItem,{"data-test-subj":"addOnFailureButton",key:"addOnFailure",icon:"indexClose",onClick:()=>{c(!1),n()}},un.addOnFailureButtonLabel):void 0,Object(h.jsx)(p.EuiContextMenuItem,{"data-test-subj":"deleteButton",key:"delete",icon:"trash",color:"danger",onClick:()=>{c(!1),r()}},un.deleteButtonLabel)].filter(Boolean);return Object(h.jsx)("div",{className:d},Object(h.jsx)(p.EuiPopover,{"data-test-subj":e["data-test-subj"],anchorPosition:"leftCenter",panelPaddingSize:"none",isOpen:l,closePopover:()=>c(!1),button:Object(h.jsx)(p.EuiButtonIcon,{"data-test-subj":"button",disabled:a,onClick:()=>c((e=>!e)),iconType:"boxesHorizontal","aria-label":un.moreButtonAriaLabel})},Object(h.jsx)(p.EuiContextMenuPanel,{items:u})))},gn=Object(s.memo)((function({processor:e,description:t,handlers:{onCancelMove:i,onMove:n},selector:r,movingProcessor:a,renderOnFailureHandlers:o,editor:l,processorsDispatch:c}){var d,u,f;const g="idle"!==l.mode.id,m=Boolean(a),x=e.id===(null==a?void 0:a.id),b="managingProcessor"===l.mode.id&&e.id===l.mode.arg.processor.id,j="managingProcessor"===l.mode.id&&!b,v="movingProcessor"===l.mode.id&&!x,O=j||v,_=fi(e.type),{testPipelineData:y}=ls(),{config:{selectedDocumentIndex:E},testOutputPerProcessor:P,isExecutingPipeline:F}=y,M=P&&P[E][e.id],k=null!==(d=null==M?void 0:M.status)&&void 0!==d?d:"inactive",T=Xi()("pipelineProcessorsEditor__item",{"pipelineProcessorsEditor__item--selected":x||b,"pipelineProcessorsEditor__item--dimmed":O}),S=null==_?void 0:_.getDefaultDescription(e.options),C=!S&&!e.options.description,I=Xi()("pipelineProcessorsEditor__item__descriptionContainer",{"pipelineProcessorsEditor__item__descriptionContainer--displayNone":m&&C}),w=Object(s.useCallback)((t=>{let i;if(t)i={...e.options,description:t};else{const{description:t,...n}=e.options;i=n}c({type:"updateProcessor",payload:{processor:{...e,options:i},selector:r}})}),[e,c,r]);return Object(h.jsx)(p.EuiPanel,{hasBorder:!0,hasShadow:!1,paddingSize:"s",className:T},Object(h.jsx)(p.EuiFlexGroup,{gutterSize:"none",responsive:!1,alignItems:"center",justifyContent:"spaceBetween","data-test-subj":H(r),"data-processor-id":e.id},Object(h.jsx)(p.EuiFlexItem,{className:"pipelineProcessorsEditor__item__controlsFlexItem"},Object(h.jsx)(p.EuiFlexGroup,{className:"pipelineProcessorsEditor__item__controlsContainer",gutterSize:"m",alignItems:"center",responsive:!1},Object(h.jsx)(p.EuiFlexItem,{grow:!1},(()=>{const e=x?un.cancelMoveButtonLabel:un.moveButtonLabel,t=x?"cancelMoveItemButton":"moveItemButton",s=Xi()("pipelineProcessorsEditor__item__moveButton",{"pipelineProcessorsEditor__item__moveButton--cancel":x}),r=x?"cross":"sortable",a=g&&!x,o=Object(h.jsx)(p.EuiButtonIcon,{color:x?"primary":"text",iconType:r,"data-test-subj":t,size:"s",isDisabled:a,"aria-label":e,onClick:()=>{x?i():n()}});return Object(h.jsx)("div",{className:s},m?o:Object(h.jsx)(p.EuiToolTip,{content:un.moveButtonLabel},o))})()),Object(h.jsx)(p.EuiFlexItem,{grow:!1,className:"pipelineProcessorsEditor__item__statusContainer"},F?Object(h.jsx)(p.EuiLoadingSpinner,{size:"s"}):Object(h.jsx)(dn,{processorStatus:k})),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiText,{className:"pipelineProcessorsEditor__item__processorTypeLabel",color:O?"subdued":void 0},Object(h.jsx)(p.EuiLink,{tabIndex:g?-1:0,disabled:g,onClick:()=>{l.setMode({id:"managingProcessor",arg:{processor:e,selector:r}})},"data-test-subj":"manageItemButton"},Object(h.jsx)("b",null,null!==(u=null==_?void 0:_.label)&&void 0!==u?u:e.type)))),Object(h.jsx)(p.EuiFlexItem,{"data-test-subj":"pipelineProcessorItemDescriptionContainer",className:I,grow:!1},Object(h.jsx)(p.EuiInlineEditText,{size:"s",defaultValue:t||"",readModeProps:{"data-test-subj":"inlineTextInputNonEditableText"},placeholder:null!=S?S:un.descriptionPlaceholder,inputAriaLabel:un.processorTypeLabel({type:e.type}),isReadOnly:g,onSave:e=>{w(e)}})))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(fn,{"data-test-subj":"moreMenu",disabled:g,hidden:m,showAddOnFailure:!(null!==(f=e.onFailure)&&void 0!==f&&f.length),onAddOnFailure:()=>{l.setMode({id:"creatingProcessor",arg:{selector:r}})},onDelete:()=>{l.setMode({id:"removingProcessor",arg:{selector:r}})},onDuplicate:()=>{c({type:"duplicateProcessor",payload:{source:r}})}}))),o&&o())})),mn=e=>{const{state:t}=fs();return Object(h.jsx)(gn,u()({},e,{editor:t.editor,processorsDispatch:t.processors.dispatch}))},xn=({processor:e,processorInfo:t,onAction:i,movingProcessor:n,level:r})=>{const a=t.selector.join("."),o=Object(s.useMemo)((()=>({onMove:()=>{i({type:"selectToMove",payload:{info:t}})},onCancelMove:()=>{i({type:"cancelMove"})}})),[i,a,e]),l=Object(s.useCallback)((()=>{var s;if(null!==(s=e.onFailure)&&void 0!==s&&s.length)return Object(h.jsx)("div",{className:"pipelineProcessorsEditor__tree__onFailureHandlerContainer",style:{marginLeft:34*r+"px"}},Object(h.jsx)(p.EuiText,{size:"m",color:"subdued"},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.onFailureProcessorsLabel",{defaultMessage:"Failure handlers"})),Object(h.jsx)(ln,{level:r+1,movingProcessor:n,onAction:i,selector:t.selector.concat("onFailure"),processors:e.onFailure}),Object(h.jsx)(Gi,{"data-test-subj":a,renderButtonAsLink:!0,onClick:()=>i({type:"addProcessor",payload:{target:t.selector.concat("onFailure")}})}))}),[e.onFailure,a,i,n,r]);return Object(h.jsx)(mn,{movingProcessor:n,selector:t.selector,processor:e,handlers:o,description:e.options.description,renderOnFailureHandlers:l})};i(114);const bn=Object(s.memo)((e=>{const{processors:t,baseSelector:i,onAction:n,movingProcessor:r}=e,a=Object(s.useRef)(null),o=Object(s.useRef)(null);return Object(s.useEffect)((()=>{const e=e=>{e.key!==p.keys.ESCAPE&&"Escape"!==e.code||n({type:"cancelMove"})},t=e=>{n({type:"cancelMove"})};return setTimeout((()=>{r?(window.addEventListener("keyup",e),window.addEventListener("click",t)):(window.removeEventListener("keyup",e),window.removeEventListener("click",t))})),()=>{window.removeEventListener("keyup",e),window.removeEventListener("click",t)}}),[r,n]),Object(h.jsx)(p.EuiFlexGroup,{"data-test-subj":e["data-test-subj"],direction:"column",gutterSize:"none",responsive:!1,className:"pipelineProcessorsEditor__tree__container"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(ln,{windowScrollerRef:a,listRef:o,level:1,onAction:n,movingProcessor:r,processors:t,selector:i})),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiFlexGroup,{"data-test-subj":H(i),responsive:!1,alignItems:"flexStart",gutterSize:"none",direction:"column"},!t.length&&Object(h.jsx)(p.EuiFlexItem,{style:{width:"100%"}},Object(h.jsx)(Ki,{"data-test-subj":"dropButtonEmptyTree",isVisible:Boolean(r),isDisabled:!1,onClick:e=>{e.preventDefault(),n({type:"move",payload:{destination:i.concat(Z.top),source:r.selector}})}})),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(Gi,{onClick:()=>{n({type:"addProcessor",payload:{target:i}})},renderButtonAsLink:!0})))))})),hn=Object(s.memo)((function({stateSlice:e}){const{onTreeAction:t,state:{editor:i,processors:n}}=fs(),r=Object(s.useMemo)((()=>[e]),[e]);return Object(h.jsx)(bn,{baseSelector:r,processors:n.state[e],onAction:t,movingProcessor:"movingProcessor"===i.mode.id?i.mode.arg:void 0})})),jn=({processor:e,onResult:t,selector:i})=>Object(h.jsx)(p.EuiConfirmModal,{buttonColor:"danger","data-test-subj":"removeProcessorConfirmationModal",title:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.removeProcessorModal.titleText",defaultMessage:"Delete {type} processor",values:{type:e.type}}),onCancel:()=>t({confirmed:!1,selector:i}),onConfirm:()=>t({confirmed:!0,selector:i}),cancelButtonText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.removeProcessorModal.cancelButtonLabel",defaultMessage:"Cancel"}),confirmButtonText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.removeProcessorModal.confirmationButtonLabel",defaultMessage:"Delete processor"})},Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.deleteModal.deleteDescription",defaultMessage:"Delete this processor and its on-failure handlers."}))),vn={modalTitle:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.loadFromJson.modalTitle",{defaultMessage:"Load JSON"}),buttons:{cancel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.loadFromJson.buttons.cancel",{defaultMessage:"Cancel"}),confirm:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.loadFromJson.buttons.confirm",{defaultMessage:"Load and overwrite"})},editor:{label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.loadFromJson.editor",{defaultMessage:"Pipeline object"})},error:{title:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.loadFromJson.error.title",{defaultMessage:"Invalid pipeline"}),body:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.loadFromJson.error.body",{defaultMessage:"Please ensure the JSON is a valid pipeline object."})}},On={},_n=JSON.stringify(On,null,2),yn=({onDone:e,children:t})=>{const[i,n]=Object(s.useState)(!1),[a,l]=Object(s.useState)(!0),[d,u]=Object(s.useState)(),f=Object(s.useRef)({isValid:!0,validate:()=>!0,data:{format:()=>On,raw:_n}}),g=Object(s.useCallback)((e=>{l(e.validate()),f.current=e}),[]);return Object(h.jsx)(r.a.Fragment,null,t((()=>n(!0))),i?Object(h.jsx)(p.EuiConfirmModal,{"data-test-subj":"loadJsonConfirmationModal",title:vn.modalTitle,onCancel:()=>{n(!1)},onConfirm:async()=>{try{const t=f.current.data.format(),{processors:i,on_failure:s}=t;ie({processors:i,onFailure:s}),e(t),n(!1)}catch(e){u(e)}},cancelButtonText:vn.buttons.cancel,confirmButtonDisabled:!a,confirmButtonText:vn.buttons.confirm,maxWidth:600},Object(h.jsx)("div",{className:"application"},Object(h.jsx)(p.EuiText,{color:"subdued"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.loadJsonModal.jsonEditorHelpText",defaultMessage:"Provide a pipeline object. This will override the existing pipeline processors and on-failure processors."})),Object(h.jsx)(p.EuiSpacer,{size:"m"}),d&&Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiCallOut,{"data-test-subj":"errorCallOut",title:vn.error.title,color:"danger",iconType:"warning"},vn.error.body),Object(h.jsx)(p.EuiSpacer,{size:"m"})),Object(h.jsx)(o.h,{label:vn.editor.label,onUpdate:g,codeEditorProps:{height:"300px"}}))):void 0)},En={buttonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.loadFromJson.buttonLabel",{defaultMessage:"Import processors"})},Pn=({onDone:e})=>Object(h.jsx)(yn,{onDone:e},(e=>Object(h.jsx)(p.EuiButtonEmpty,{size:"s",onClick:e,iconType:"importAction"},En.buttonLabel)));i(119);const Fn={dropdownLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.documentsdropdown.dropdownLabel",{defaultMessage:"Documents:"}),editDocumentsButtonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.documentsDropdown.editDocumentsButtonLabel",{defaultMessage:"Edit documents"}),popoverTitle:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.documentsDropdown.popoverTitle",{defaultMessage:"Test documents"})},Mn=({documents:e,selectedDocumentIndex:t,updateSelectedDocument:i,openFlyout:n})=>{const[a,o]=Object(s.useState)(!1),l=Object(h.jsx)(p.EuiButtonEmpty,{"data-test-subj":"documentsButton",onClick:()=>o((e=>!e)),iconType:"arrowDown",iconSide:"right"},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.selectedDocumentLabel",{defaultMessage:"Document {selectedDocument}",values:{selectedDocument:t+1}}));return Object(h.jsx)(p.EuiPopover,{isOpen:a,closePopover:()=>o(!1),button:l,panelPaddingSize:"none",repositionOnScroll:!0,"data-test-subj":"documentsDropdown",panelClassName:"documentsDropdownPanel"},Object(h.jsx)(p.EuiSelectable,{singleSelection:!0,"data-test-subj":"documentList",options:e.map(((e,i)=>({key:i.toString(),"data-test-subj":"documentListItem",checked:t===i?"on":void 0,label:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.documentLabel",{defaultMessage:"Document {documentNumber}",values:{documentNumber:i+1}})}))),onChange:e=>{const t=e.find((e=>"on"===e.checked));t&&i(Number(t.key)),o(!1)}},(e=>Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiPopoverTitle,{paddingSize:"s"},Fn.popoverTitle),e))),Object(h.jsx)(p.EuiPopoverFooter,{paddingSize:"s"},Object(h.jsx)(p.EuiButton,{size:"s",fullWidth:!0,onClick:()=>{n("documents"),o(!1)},"data-test-subj":"editDocumentsButton"},Fn.editDocumentsButtonLabel)))},kn={buttonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.buttonLabel",{defaultMessage:"Add documents"})},Tn=({openFlyout:e})=>Object(h.jsx)(p.EuiButtonEmpty,{size:"s",onClick:()=>e("documents"),"data-test-subj":"addDocumentsButton"},kn.buttonLabel),Sn={buttonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.outputButtonLabel",{defaultMessage:"View output"})},Cn=({openFlyout:e})=>Object(h.jsx)(p.EuiButton,{size:"s",onClick:()=>e("output"),"data-test-subj":"viewOutputButton"},Sn.buttonLabel),In=()=>{const e=Object(s.useRef)(!1);return Object(s.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e},wn=({onTabChange:e,selectedTab:t})=>{const i=[{id:"documents",name:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.tabs.documentsTabTitle",defaultMessage:"Documents"})},{id:"output",name:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.tabs.outputTabTitle",defaultMessage:"Output"})}];return Object(h.jsx)(p.EuiTabs,null,i.map((i=>Object(h.jsx)(p.EuiTab,{onClick:()=>e(i.id),isSelected:i.id===t,key:i.id,"data-test-subj":i.id.toLowerCase()+"Tab"},i.name))))},Ln=Object(o.B)({component:o.e}),{emptyField:Rn}=o.y,Dn={addDocumentButton:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addDocuments.addDocumentButtonLabel",{defaultMessage:"Add document"}),addDocumentErrorMessage:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addDocuments.addDocumentErrorMessage",{defaultMessage:"Error adding document"}),addDocumentSuccessMessage:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addDocuments.addDocumentSuccessMessage",{defaultMessage:"Document added"}),indexField:{fieldLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addDocuments.indexFieldLabel",{defaultMessage:"Index"}),validationMessage:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addDocuments.indexRequiredErrorMessage",{defaultMessage:"An index name is required."})},idField:{fieldLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addDocuments.idFieldLabel",{defaultMessage:"Document ID"}),validationMessage:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addDocuments.idRequiredErrorMessage",{defaultMessage:"A document ID is required."})}},zn={index:{label:Dn.indexField.fieldLabel,validations:[{validator:Rn(Dn.indexField.validationMessage)}]},id:{label:Dn.idField.fieldLabel,validations:[{validator:Rn(Dn.idField.validationMessage)}]}},An=({onAddDocuments:e})=>{const{services:t}=Object(o.H)(),i=In(),[n,a]=Object(s.useState)(!1),[l,c]=Object(s.useState)(void 0),[d,u]=Object(s.useState)(!1),{form:f}=Object(o.E)({defaultValue:{index:"",id:""}}),g=async n=>{const{isValid:s,data:r}=await f.submit(),{id:o,index:l}=r;if(s){a(!0),c(void 0),u(!1);const{error:n,data:s}=await t.api.loadDocument(l,o);if(!i.current)return;if(a(!1),n)return void c(n);u(!0),e(s)}};return Object(h.jsx)(o.f,{form:f,onSubmit:g},l&&Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiCallOut,{title:Dn.addDocumentErrorMessage,color:"danger",iconType:"warning","data-test-subj":"addDocumentError",size:"s"},Object(h.jsx)("p",null,l.message)),Object(h.jsx)(p.EuiSpacer,{size:"m"})),Object(h.jsx)(Ln,{path:"index",component:o.p,config:zn.index,componentProps:{"data-test-subj":"indexField"}}),Object(h.jsx)(Ln,{path:"id",component:o.p,config:zn.id,componentProps:{"data-test-subj":"idField"}}),Object(h.jsx)(p.EuiSpacer,null),Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButton,{onClick:g,"data-test-subj":"addDocumentButton",isLoading:n},Dn.addDocumentButton)),d&&Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(p.EuiFlexGroup,{gutterSize:"s",alignItems:"center"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiIcon,{type:"check",color:"success"})),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiText,{color:"success","data-test-subj":"addDocumentSuccess"},Dn.addDocumentSuccessMessage))))))};i(124);const Nn={addDocumentsButton:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addDocumentsAccordion.addDocumentsButtonLabel",{defaultMessage:"Add a test document from an index"}),addDocumentsDescription:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.addDocumentsAccordion.contentDescriptionText",{defaultMessage:"Provide the document's index and document ID."})},Bn=({onAddDocuments:e})=>{const{services:t}=Object(o.H)(),i=In(),[n,a]=Object(s.useState)(void 0);return Object(s.useEffect)((()=>{(async()=>{var e;const n=null===(e=t.share)||void 0===e?void 0:e.url.locators.get("DISCOVER_APP_LOCATOR");if(!n)return void a(void 0);const s=await n.getUrl({indexPatternId:void 0});i.current&&a(s)})()}),[i,t.share]),Object(h.jsx)(p.EuiAccordion,{id:"addDocumentsAccordion",buttonContent:Nn.addDocumentsButton,paddingSize:"s","data-test-subj":"addDocumentsAccordion"},Object(h.jsx)("div",{className:"addDocumentsAccordion"},Object(h.jsx)(p.EuiText,{size:"s",color:"subdued"},Object(h.jsx)("p",null,Nn.addDocumentsDescription,n&&Object(h.jsx)(r.a.Fragment,null," ",Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.addDocumentsAccordion.discoverLinkDescriptionText",defaultMessage:"To explore your existing data, use {discoverLink}.",values:{discoverLink:Object(h.jsx)(p.EuiLink,{href:n,target:"_blank",external:!0},"Discover")}})))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(An,{onAddDocuments:e})))},Un={modalTitle:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.resetDocumentsModal.title",{defaultMessage:"Clear documents"}),modalDescription:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.resetDocumentsModal.description",{defaultMessage:"This will reset the output."}),cancelButtonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.resetDocumentsModal.cancelButtonLabel",{defaultMessage:"Cancel"}),resetButtonLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.resetDocumentsModal.resetButtonLabel",{defaultMessage:"Clear documents"})},Hn=({confirmResetTestOutput:e,closeModal:t})=>Object(h.jsx)(p.EuiConfirmModal,{buttonColor:"danger","data-test-subj":"resetDocumentsConfirmationModal",title:Un.modalTitle,onCancel:t,onConfirm:e,cancelButtonText:Un.cancelButtonLabel,confirmButtonText:Un.resetButtonLabel},Object(h.jsx)("p",null,Un.modalDescription));i(129);const Wn=Object(o.B)({component:o.e}),{emptyField:Vn,isJsonField:qn}=o.y,Gn={learnMoreLink:k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.documentsTab.simulateDocumentionLink",{defaultMessage:"Learn more."}),documentsEditorAriaLabel:k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.documentsTab.editorFieldAriaLabel",{defaultMessage:"Documents JSON editor"}),documentsEditorClearAllButton:k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.documentsTab.editorFieldClearAllButtonLabel",{defaultMessage:"Clear all"}),runButton:k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.documentsTab.runButtonLabel",{defaultMessage:"Run the pipeline"}),runningButton:k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.documentsTab.runningButtonLabel",{defaultMessage:"Running"})},Jn={label:k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.documentsForm.documentsFieldLabel",{defaultMessage:"Documents"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.onFailureFieldHelpText",defaultMessage:"Use JSON format: {code}",values:{code:Object(h.jsx)(p.EuiCode,null,JSON.stringify([{_index:"index",_id:"id",_source:{foo:"bar"}}]))}}),serializer:L,deserializer:w,validations:[{validator:Vn(k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.documentsForm.noDocumentsError",{defaultMessage:"Documents are required."}))},{validator:qn(k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.documentsForm.documentsJsonError",{defaultMessage:"The documents JSON is not valid."}))},{validator:({value:e})=>{if(!JSON.parse(e).length)return{message:k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.documentsForm.oneDocumentRequiredError",{defaultMessage:"At least one document is required."})}}}]},Xn=({validateAndTestPipeline:e,isRunningTest:t,form:i,resetTestOutput:n})=>{const{services:r}=Object(o.H)(),{getFormData:a,reset:l}=i,d=Object(s.useCallback)((e=>{const{documents:t=[]}=a();l({defaultValue:{documents:[...t,e]}})}),[l,a]),[u,f]=Object(s.useState)(!1);return Object(h.jsx)(o.f,{form:i,"data-test-subj":"testPipelineForm",isInvalid:i.isSubmitted&&!i.isValid,onSubmit:e,error:i.getErrors()},Object(h.jsx)("div",{"data-test-subj":"documentsTabContent",className:"documentsTab"},Object(h.jsx)(p.EuiText,null,Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.testPipelineFlyout.documentsTab.tabDescriptionText",defaultMessage:"Provide documents for the pipeline to ingest. {learnMoreLink}",values:{learnMoreLink:Object(h.jsx)(p.EuiLink,{href:r.documentation.getSimulatePipelineApiUrl(),target:"_blank",external:!0},Gn.learnMoreLink)}}))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(Bn,{onAddDocuments:d}),Object(h.jsx)(p.EuiSpacer,{size:"l"}),Object(h.jsx)(Wn,{config:Jn,path:"documents"},(e=>Object(h.jsx)("div",{className:"documentsTab__documentField"},Object(h.jsx)(p.EuiButtonEmpty,{size:"xs",onClick:()=>f(!0),"data-test-subj":"clearAllDocumentsButton",className:"documentsTab__documentField__button"},Gn.documentsEditorClearAllButton),Object(h.jsx)(o.i,{field:e,codeEditorProps:{"data-test-subj":"documentsEditor",height:"300px","aria-label":Gn.documentsEditorAriaLabel}})))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(p.EuiButton,{onClick:e,"data-test-subj":"runPipelineButton",size:"s",isLoading:t,disabled:i.isSubmitted&&!i.isValid,iconType:"play"},t?Gn.runningButton:Gn.runButton),u&&Object(h.jsx)(Hn,{confirmResetTestOutput:()=>{n(),i.reset({defaultValue:{documents:[]}}),f(!1)},closeModal:()=>f(!1)})))},$n=({handleTestPipeline:e,isRunningTest:t,cachedVerbose:i,cachedDocuments:n,testOutput:r})=>{const[a,o]=Object(s.useState)(Boolean(i));let l;return t?l=Object(h.jsx)(p.EuiLoadingSpinner,{size:"m"}):r&&(l=Object(h.jsx)(p.EuiCodeBlock,{language:"json",isCopyable:!0},JSON.stringify(r,null,2))),Object(h.jsx)("div",{"data-test-subj":"outputTabContent"},Object(h.jsx)(p.EuiText,null,Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.testPipelineFlyout.outputTab.descriptionText",defaultMessage:"View the output data, or see how each processor affects the document as it passes through the pipeline."}))),Object(h.jsx)(p.EuiSpacer,{size:"l"}),Object(h.jsx)(p.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiSwitch,{label:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.testPipelineFlyout.outputTab.verboseSwitchLabel",defaultMessage:"View verbose output"}),checked:a,"data-test-subj":"verboseOutputToggle",onChange:async t=>{const i=t.target.checked;o(i),await e({documents:n,verbose:i})}})),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButton,{size:"s",onClick:async()=>await e({documents:n,verbose:a},!0),iconType:"refresh","data-test-subj":"refreshOutputButton"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.testPipelineFlyout.outputTab.descriptionLinkLabel",defaultMessage:"Refresh output"})))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),l)},Zn=({handleTestPipeline:e,resetTestOutput:t,isRunningTest:i,cachedVerbose:n,cachedDocuments:s,testOutput:a,form:o,validateAndTestPipeline:l,selectedTab:d,setSelectedTab:u,testingError:f,onClose:g})=>{let m;return m="output"===d?Object(h.jsx)($n,{handleTestPipeline:e,isRunningTest:i,cachedVerbose:n,cachedDocuments:s,testOutput:a}):Object(h.jsx)(Xn,{form:o,validateAndTestPipeline:l,isRunningTest:i,resetTestOutput:t}),Object(h.jsx)(p.EuiFlyout,{maxWidth:550,onClose:g,"data-test-subj":"testPipelineFlyout"},Object(h.jsx)(p.EuiFlyoutHeader,null,Object(h.jsx)(p.EuiTitle,null,Object(h.jsx)("h2",{"data-test-subj":"title"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.testPipelineFlyout.title",defaultMessage:"Test pipeline"})))),Object(h.jsx)(p.EuiFlyoutBody,null,Object(h.jsx)(wn,{onTabChange:async e=>{"output"===e?l():(o.reset({defaultValue:{documents:s}}),u(e))},selectedTab:d}),Object(h.jsx)(p.EuiSpacer,null),f?Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiCallOut,{title:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.testPipelineFlyout.executePipelineError",defaultMessage:"Unable to execute pipeline"}),color:"danger",iconType:"warning","data-test-subj":"pipelineExecutionError"},Object(h.jsx)("p",null,f.message)),Object(h.jsx)(p.EuiSpacer,{size:"m"})):null,m))},Kn=({onClose:e,activeTab:t,setActiveTab:i,processors:n})=>{const{services:r}=Object(o.H)(),a=In(),{testPipelineData:l,testPipelineDataDispatch:c,updateTestOutputPerProcessor:p}=ls(),{config:{documents:d,verbose:u}}=l,{form:f}=Object(o.E)({defaultValue:{documents:d||""}}),[g,m]=Object(s.useState)(!1),[x,b]=Object(s.useState)(null),[j,v]=Object(s.useState)(void 0),O=Object(s.useCallback)((async({documents:e,verbose:t},i)=>{const s=oe({pipeline:n});m(!0),b(null);const{error:o,data:l}=await r.api.simulatePipeline({documents:e,verbose:t,pipeline:{...s}});return a.current?(m(!1),o?(b(o),c({type:"updateOutputPerProcessor",payload:{isExecutingPipeline:!1,testOutputPerProcessor:void 0}}),{isSuccessful:!1}):(c({type:"updateConfig",payload:{config:{documents:e,verbose:t}}}),i&&p(e,n),v(l),r.notifications.toasts.addSuccess(k.i18n.translate("xpack.ingestPipelines.testPipelineFlyout.successNotificationText",{defaultMessage:"Pipeline executed"}),{toastLifeTimeMs:1e3}),{isSuccessful:!0})):{isSuccessful:!1}}),[a,n,r.api,r.notifications.toasts,c,p]);return Object(s.useEffect)((()=>{d&&"output"===t&&O({documents:d,verbose:u},!0)}),[]),Object(h.jsx)(Zn,{handleTestPipeline:O,resetTestOutput:()=>{c({type:"reset"})},isRunningTest:g,cachedVerbose:u,cachedDocuments:d,testOutput:j,form:f,validateAndTestPipeline:async()=>{const{isValid:e,data:t}=await f.submit();if(!e)return;const{documents:n}=t,{isSuccessful:s}=await O({documents:n,verbose:u});s&&i("output")},selectedTab:t,setSelectedTab:i,testingError:x,onClose:e})},Yn={testPipelineActionsLabel:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.testPipeline.testPipelineActionsLabel",{defaultMessage:"Test pipeline:"})},Qn=()=>{const{testPipelineData:e,testPipelineDataDispatch:t}=ls(),{state:{processors:i}}=fs(),{testOutputPerProcessor:n,config:{documents:a,selectedDocumentIndex:o}}=e,[l,c]=Object(s.useState)(!1),[d,u]=Object(s.useState)("documents"),f=e=>{c(!0),u(e)};return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiFlexGroup,{gutterSize:"s",alignItems:"baseline"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiText,null,Object(h.jsx)("span",null,Object(h.jsx)("strong",null,Yn.testPipelineActionsLabel)))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},a?Object(h.jsx)(Mn,{documents:a,selectedDocumentIndex:o,updateSelectedDocument:e=>{t({type:"updateActiveDocument",payload:{config:{selectedDocumentIndex:e}}})},openFlyout:f}):Object(h.jsx)(Tn,{openFlyout:f})),n&&Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(Cn,{openFlyout:f}))),l&&Object(h.jsx)(Kn,{activeTab:d,setActiveTab:u,processors:{processors:i.state.processors,onFailure:i.state.onFailure},onClose:()=>c(!1)}))};i(134);const es=Object(s.memo)((({processor:e})=>{var t,i;const n=fi(e.type),s=null!==(t=null==n?void 0:n.label)&&void 0!==t?t:e.type,r=null!==(i=e.options.description)&&void 0!==i?i:null==n?void 0:n.getDefaultDescription(e.options);return Object(h.jsx)(p.EuiPanel,null,Object(h.jsx)(p.EuiFlexGroup,{justifyContent:"center",alignItems:"center",responsive:!1,gutterSize:"s"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiText,null,Object(h.jsx)("strong",null,s))),r?Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiText,{color:"subdued",size:"s"},r)):void 0))})),ts=({processor:e})=>{const[t,i]=Object(s.useState)();return Object(s.useEffect)((()=>{const e=e=>{i({x:e.pageX,y:e.pageY-window.scrollY})};return document.addEventListener("mousemove",e),()=>{document.removeEventListener("mousemove",e)}}),[]),t?Object(h.jsx)(p.EuiPortal,null,Object(h.jsx)("div",{className:"pipelineProcessorsEditor__itemTooltip",style:{left:t.x+20,top:t.y+20}},Object(h.jsx)(es,{processor:e}))):null},is={emptyPromptTitle:k.i18n.translate("xpack.ingestPipelines.pipelineEditor.emptyPrompt.title",{defaultMessage:"Add your first processor"})},ns=({onLoadJson:e})=>{const{onTreeAction:t}=fs(),{services:i}=Object(o.H)();return Object(h.jsx)(p.EuiEmptyPrompt,{title:Object(h.jsx)("h2",null,is.emptyPromptTitle),"data-test-subj":"processorsEmptyPrompt",body:Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.emptyPrompt.description",defaultMessage:"Use processors to transform data before indexing. {learnMoreLink}",values:{learnMoreLink:Object(h.jsx)(p.EuiLink,{href:i.documentation.getProcessorsUrl(),target:"_blank",external:!0},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.processorsDocumentationLink",{defaultMessage:"Learn more."}))}})),actions:Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(Gi,{onClick:()=>{t({type:"addProcessor",payload:{target:["processors"]}})}}),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(Pn,{onDone:e}))})},ss=({onLoadJson:e,hasProcessors:t})=>{const{services:i}=Object(o.H)(),n=()=>Object(h.jsx)(p.EuiTitle,{size:"s"},Object(h.jsx)("h3",null,k.i18n.translate("xpack.ingestPipelines.pipelineEditor.processorsTreeTitle",{defaultMessage:"Processors"})));return t?Object(h.jsx)(p.EuiFlexGroup,{alignItems:"center",gutterSize:"s",justifyContent:"spaceBetween",responsive:!1},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiFlexGroup,{gutterSize:"xs"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(n,null)),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(Pn,{onDone:e}))),Object(h.jsx)(p.EuiText,{size:"s",color:"subdued"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.processorsTreeDescription",defaultMessage:"Use processors to transform data before indexing. {learnMoreLink}",values:{learnMoreLink:Object(h.jsx)(p.EuiLink,{href:i.documentation.getProcessorsUrl(),target:"_blank",external:!0},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.processorsDocumentationLink",{defaultMessage:"Learn more."}))}}))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(Qn,null))):Object(h.jsx)(n,null)},rs=()=>{const{services:e}=Object(o.H)();return Object(h.jsx)("div",{className:"pipelineEditor__onFailureTitle"},Object(h.jsx)(p.EuiTitle,{size:"xs"},Object(h.jsx)("h4",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.onFailureTreeTitle",defaultMessage:"Failure processors"}))),Object(h.jsx)(p.EuiText,{size:"s",color:"subdued"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.pipelineEditor.onFailureTreeDescription",defaultMessage:"The processors used to handle exceptions in this pipeline. {learnMoreLink}",values:{learnMoreLink:Object(h.jsx)(p.EuiLink,{href:e.documentation.getHandlingFailureUrl(),target:"_blank",external:!0},k.i18n.translate("xpack.ingestPipelines.pipelineEditor.onFailureProcessorsDocumentationLink",{defaultMessage:"Learn more."}))}})))},as={testPipelineData:{config:{selectedDocumentIndex:0},isExecutingPipeline:!1},testPipelineDataDispatch:()=>{},updateTestOutputPerProcessor:()=>{}},os=r.a.createContext(as),ls=()=>{const e=Object(s.useContext)(os);if(!e)throw new Error('"useTestPipelineContext" can only be called inside of TestPipelineContextProvider.Provider!');return e},cs=(e,t)=>"updateOutputPerProcessor"===t.type?{...e,testOutputPerProcessor:t.payload.testOutputPerProcessor,isExecutingPipeline:!1}:"updateConfig"===t.type?{...t.payload,config:{...t.payload.config,selectedDocumentIndex:e.config.selectedDocumentIndex},testOutputPerProcessor:e.testOutputPerProcessor}:"updateActiveDocument"===t.type?{...e,config:{...e.config,selectedDocumentIndex:t.payload.config.selectedDocumentIndex}}:"updateIsExecutingPipeline"===t.type?{...e,isExecutingPipeline:t.payload.isExecutingPipeline}:"reset"===t.type?as.testPipelineData:e,ps=({children:e})=>{const[t,i]=Object(s.useReducer)(cs,as.testPipelineData),{services:n}=Object(o.H)(),r=In(),a=Object(s.useCallback)((async(e,t)=>{if(!e)return;i({type:"updateIsExecutingPipeline",payload:{isExecutingPipeline:!0}});const s=oe({pipeline:{processors:t.processors,onFailure:t.onFailure},copyIdToTag:!0}),{data:a,error:o}=await n.api.simulatePipeline({documents:e,verbose:!0,pipeline:{...s}});return r.current?o?(i({type:"updateOutputPerProcessor",payload:{isExecutingPipeline:!1,testOutputPerProcessor:void 0}}),void n.notifications.toasts.addError(o,{title:k.i18n.translate("xpack.ingestPipelines.testPipeline.errorNotificationText",{defaultMessage:"Error executing pipeline"})})):void i({type:"updateOutputPerProcessor",payload:{testOutputPerProcessor:se(a),isExecutingPipeline:!1}}):void 0}),[r,n.api,n.notifications.toasts]);return Object(h.jsx)(os.Provider,{value:{testPipelineData:t,testPipelineDataDispatch:i,updateTestOutputPerProcessor:a}},e)},ds=Object(s.createContext)({}),us=({value:{processors:e,onFailure:t},onUpdate:i,onFlyoutOpen:n,children:r})=>{const a=Object(s.useRef)(!1),[o,l]=Object(s.useState)((()=>({id:"idle"}))),c=Object(s.useMemo)((()=>ie({processors:e,onFailure:t})),[e,t]),[p,d]=(e=>{var t;const i={...e,onFailure:null!==(t=e.onFailure)&&void 0!==t?t:[]};return Object(s.useReducer)(Q,{...i,isRoot:!0})})(c),{updateTestOutputPerProcessor:u,testPipelineData:f}=ls(),{config:{documents:g}}=f;Object(s.useEffect)((()=>{a.current?d({type:"loadProcessors",payload:{newState:c}}):a.current=!0}),[c,d]);const{onFailure:m,processors:x}=p,[b,j]=Object(s.useState)({validate:()=>Promise.resolve(!0)}),v=Object(s.useCallback)((({isValid:e,validate:t})=>{j({validate:async()=>void 0===e?t():e})}),[j]);Object(s.useEffect)((()=>{i({validate:async()=>await b.validate()&&"idle"===o.id,getData:()=>oe({pipeline:{onFailure:m,processors:x}})})}),[x,m,i,b,o]);const O=Object(s.useCallback)((e=>{switch(o.id){case"creatingProcessor":d({type:"addProcessor",payload:{processor:{...e},targetSelector:o.arg.selector}});break;case"managingProcessor":const t=[...Object.keys(e.options),"internal_networks","internal_networks_field","value","copy_from"],i=o.arg.processor.type!==e.type?{}:Object(y.omit)(o.arg.processor.options,t),n={...e.options,...i};d({type:"updateProcessor",payload:{processor:{...o.arg.processor,type:e.type,options:n},selector:o.arg.selector}})}}),[d,o]),_=Object(s.useCallback)((()=>{l({id:"idle"}),j({validate:()=>Promise.resolve(!0)})}),[j,l]),E=Object(s.useCallback)((e=>{switch(e.type){case"addProcessor":l({id:"creatingProcessor",arg:{selector:e.payload.target}});break;case"move":l({id:"idle"}),d({type:"moveProcessor",payload:e.payload});break;case"selectToMove":l({id:"movingProcessor",arg:e.payload.info});break;case"cancelMove":l({id:"idle"})}}),[d]),P=Object(s.useMemo)((()=>({editor:{mode:o,setMode:l},processors:{state:p,dispatch:d}})),[o,l,p,d]);return Object(s.useEffect)((()=>{u(g,p)}),[g,p,u]),Object(h.jsx)(ds.Provider,{value:{onTreeAction:E,state:P}},r,"movingProcessor"===o.id&&Object(h.jsx)(ts,{processor:W(o.arg.selector,{processors:x,onFailure:m})}),"managingProcessor"===o.id||"creatingProcessor"===o.id?Object(h.jsx)(Vi,{isOnFailure:(F=o.arg.selector,"onFailure"===F[0]||F.length>2),processor:"managingProcessor"===o.id?o.arg.processor:void 0,onOpen:n,onFormUpdate:v,onSubmit:O,onClose:_}):void 0,"removingProcessor"===o.id&&Object(h.jsx)(jn,{selector:o.arg.selector,processor:W(o.arg.selector,{processors:x,onFailure:m}),onResult:({confirmed:e,selector:t})=>{e&&d({type:"removeProcessor",payload:{selector:t}}),l({id:"idle"})}}));var F},fs=()=>{const e=Object(s.useContext)(ds);if(!e)throw new Error("usePipelineProcessorsContext can only be used inside of PipelineProcessorsContextProvider");return e},gs=({children:e,onUpdate:t,value:i,onFlyoutOpen:n})=>Object(h.jsx)(ps,null,Object(h.jsx)(us,{onFlyoutOpen:n,onUpdate:t,value:i},e)),ms=()=>Object(h.jsx)(hn,{stateSlice:"onFailure"}),xs=()=>Object(h.jsx)(hn,{stateSlice:"processors"});i(139);const bs=({onLoadJson:e})=>{const{state:{processors:t}}=fs(),{state:{processors:i,onFailure:n}}=t;let s;return s=0===i.length&&0===n.length?Object(h.jsx)(ns,{onLoadJson:e}):Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(xs,null),Object(h.jsx)(p.EuiSpacer,{size:"s"}),Object(h.jsx)(rs,null),Object(h.jsx)(ms,null)),Object(h.jsx)("div",{className:"pipelineEditor"},Object(h.jsx)(p.EuiFlexGroup,{gutterSize:"m",responsive:!1,direction:"column"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(ss,{onLoadJson:e,hasProcessors:i.length>0})),Object(h.jsx)(p.EuiFlexItem,{grow:!1,className:"pipelineEditor__container"},s)))},hs=Object(o.B)({component:o.e}),js=Object(o.A)({titleTag:"h3"}),vs=({processors:e,onFailure:t,onLoadJson:i,onProcessorsUpdate:n,isEditing:a,hasVersion:l,hasMeta:d,onEditorFlyoutOpen:u,canEditName:f})=>{const[g,m]=Object(s.useState)(l),[x,b]=Object(s.useState)(d);return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(js,{title:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.nameTitle",defaultMessage:"Name"}),description:Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.nameDescription",defaultMessage:"A unique identifier for this pipeline."}),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(p.EuiSwitch,{label:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.versionToggleDescription",defaultMessage:"Add version number"}),checked:g,onChange:e=>m(e.target.checked),"data-test-subj":"versionToggle"}))},Object(h.jsx)(hs,{path:"name",componentProps:{"data-test-subj":"nameField",euiFieldProps:{disabled:!1===f||Boolean(a)}}}),g&&Object(h.jsx)(hs,{path:"version",componentProps:{"data-test-subj":"versionField"}})),Object(h.jsx)(js,{title:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.descriptionFieldTitle",defaultMessage:"Description"}),description:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.descriptionFieldDescription",defaultMessage:"A description of what this pipeline does."})},Object(h.jsx)(hs,{path:"description",componentProps:{"data-test-subj":"descriptionField",euiFieldProps:{compressed:!0}}})),Object(h.jsx)(gs,{onFlyoutOpen:u,onUpdate:n,value:{processors:e,onFailure:t}},Object(h.jsx)(bs,{onLoadJson:i})),Object(h.jsx)(js,{title:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.metaTitle",defaultMessage:"Metadata"}),description:Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.metaDescription",defaultMessage:"Any additional information about the ingest pipeline. This information is stored in the cluster state, so best to keep it short."}),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(p.EuiSwitch,{label:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.metaSwitchCaption",defaultMessage:"Add metadata"}),checked:x,onChange:e=>b(e.target.checked),"data-test-subj":"metaToggle"}))},x&&Object(h.jsx)(hs,{path:"_meta",component:o.i,componentProps:{codeEditorProps:{"data-test-subj":"metaEditor",height:"200px","aria-label":k.i18n.translate("xpack.ingestPipelines.form.metaAriaLabel",{defaultMessage:"_meta field data editor"})}}})))},Os={title:k.i18n.translate("xpack.ingestPipelines.form.savePipelineError",{defaultMessage:"Unable to create pipeline"}),errors:{processor:e=>k.i18n.translate("xpack.ingestPipelines.form.savePipelineError.processorLabel",{defaultMessage:"{type} processor",values:{type:e}}),showErrors:e=>k.i18n.translate("xpack.ingestPipelines.form.savePipelineError.showAllButton",{defaultMessage:"Show {hiddenErrorsCount, plural, one {# more error} other {# more errors}}",values:{hiddenErrorsCount:e}}),hideErrors:e=>k.i18n.translate("xpack.ingestPipelines.form.savePip10mbelineError.showFewerButton",{defaultMessage:"Hide {hiddenErrorsCount, plural, one {# error} other {# errors}}",values:{hiddenErrorsCount:e}}),unknownError:k.i18n.translate("xpack.ingestPipelines.form.unknownError",{defaultMessage:"An unknown error occurred."})}},_s=le.recursion("ErrorNode",(e=>le.intersection([le.interface({reason:le.string}),le.partial({processor_type:le.string,suppressed:le.array(e)})]))),ys=le.interface({attributes:le.interface({error:le.interface({root_cause:le.array(_s)})})}),Es=Object(bi.flow)(ys.decode,ce.isRight),Ps=e=>{const t=[],i=e=>{t.push({reason:e.reason,processorType:e.processor_type}),e.suppressed&&Array.isArray(e.suppressed)&&e.suppressed.forEach(i)};return i(e),t},Fs=({error:e})=>{const{services:t}=Object(o.H)(),[i,n]=Object(s.useState)(!1),a=(e=>{if("object"==typeof e&&null!=e&&Es(e)){const t=e.attributes.error.root_cause[0];return{errors:Ps(t)}}return"string"==typeof e?{errors:[{reason:e}]}:e instanceof Error||"object"==typeof e&&null!=e&&e.message?{errors:[{reason:e.message}]}:{errors:[{reason:Os.errors.unknownError}]}})(e),l=a.errors.length>5,c=a.errors.length-5,d=i?a.errors:a.errors.slice(0,5),u=({processorType:e,reason:t})=>Object(h.jsx)(r.a.Fragment,null,e?Object(h.jsx)(r.a.Fragment,null,Os.errors.processor(e)+":"," "):void 0,t);return Object(s.useEffect)((()=>{t.notifications.toasts.addDanger({title:Os.title})}),[t,e]),Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiCallOut,{title:Os.title,color:"danger",iconType:"warning","data-test-subj":"savePipelineError"},d.length>1?Object(h.jsx)("ul",null,d.map(((e,t)=>Object(h.jsx)("li",{key:t},u(e))))):u(d[0]),l?Object(h.jsx)(p.EuiFlexGroup,{direction:"column",responsive:!1,gutterSize:"xs",justifyContent:"center",alignItems:"flexStart"},Object(h.jsx)(p.EuiFlexItem,{grow:!1},i?Object(h.jsx)(p.EuiButtonEmpty,{size:"s",onClick:()=>n(!1),color:"danger",iconSide:"right",iconType:"arrowUp","data-test-subj":"hideErrorsButton"},Os.errors.hideErrors(c)):Object(h.jsx)(p.EuiButtonEmpty,{size:"s",onClick:()=>n(!0),color:"danger",iconSide:"right",iconType:"arrowDown","data-test-subj":"showErrorsButton"},Os.errors.showErrors(c)))):void 0),Object(h.jsx)(p.EuiSpacer,{size:"m"}))},{emptyField:Ms,isJsonField:ks}=o.y,{toInt:Ts}=o.x,Ss={name:{type:o.d.TEXT,label:k.i18n.translate("xpack.ingestPipelines.form.nameFieldLabel",{defaultMessage:"Name"}),validations:[{validator:Ms(k.i18n.translate("xpack.ingestPipelines.form.pipelineNameRequiredError",{defaultMessage:"Name is required."}))}]},description:{type:o.d.TEXTAREA,label:k.i18n.translate("xpack.ingestPipelines.form.descriptionFieldLabel",{defaultMessage:"Description (optional)"})},version:{type:o.d.NUMBER,label:k.i18n.translate("xpack.ingestPipelines.form.versionFieldLabel",{defaultMessage:"Version (optional)"}),formatters:[Ts]},_meta:{label:k.i18n.translate("xpack.ingestPipelines.form.metaFieldLabel",{defaultMessage:"_meta field data (optional)"}),helpText:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.metaHelpText",defaultMessage:"Use JSON format: {code}",values:{code:Object(h.jsx)(p.EuiCode,null,JSON.stringify({arbitrary_data:"anything_goes"}))}}),serializer:e=>{const t=L(e,!1);if(Object.keys(t).length)return t},deserializer:e=>w(e,!1),validations:[{validator:ks(k.i18n.translate("xpack.ingestPipelines.form.validation.metaJsonError",{defaultMessage:"The input is not valid."}),{allowEmptyString:!0})}]}},Cs=Object.freeze({name:"",description:"",processors:[],on_failure:[],_meta:{}}),Is=({defaultValue:e=Cs,onSave:t,isSaving:i,saveError:n,isEditing:a,onCancel:l,canEditName:d})=>{const[u,f]=Object(s.useState)(!1),{processors:g,on_failure:m,...x}=e,[b,j]=Object(s.useState)({processors:g,onFailure:m}),v=Object(s.useRef)(),{form:O}=Object(o.E)({schema:Ss,defaultValue:x,onSubmit:async(e,i)=>{if(i&&v.current){const i=v.current;await i.validate()&&t({...e,...i.getData()})}}}),_=Object(s.useCallback)((()=>{f(!1)}),[f]),y=i?Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.savingButtonLabel",defaultMessage:"Saving..."}):a?Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.saveButtonLabel",defaultMessage:"Save pipeline"}):Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.createButtonLabel",defaultMessage:"Create pipeline"}),E=Object(s.useCallback)((e=>v.current=e),[]);return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(o.f,{form:O,"data-test-subj":"pipelineForm",isInvalid:O.isSubmitted&&!O.isValid,error:O.getErrors()},n&&Object(h.jsx)(Fs,{error:n}),Object(h.jsx)(vs,{onLoadJson:({processors:e,on_failure:t})=>{j({processors:e,onFailure:t})},onEditorFlyoutOpen:_,processors:b.processors,onFailure:b.onFailure,onProcessorsUpdate:E,hasVersion:Boolean(e.version),hasMeta:Boolean(e._meta&&Object.keys(e._meta).length),isEditing:a,canEditName:d}),Object(h.jsx)(p.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButton,{fill:!0,color:"success",iconType:"check",onClick:O.submit,"data-test-subj":"submitButton",disabled:O.isSubmitted&&!1===O.isValid,isLoading:i},y)),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButtonEmpty,{color:"primary",onClick:l},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.cancelButtonLabel",defaultMessage:"Cancel"}))))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButtonEmpty,{"data-test-subj":"showRequestLink",onClick:()=>f((e=>!e))},u?Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.hideRequestButtonLabel",defaultMessage:"Hide request"}):Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.form.showRequestButtonLabel",defaultMessage:"Show request"})))),u?Object(h.jsx)(B,{readProcessors:()=>{var e;return(null===(e=v.current)||void 0===e?void 0:e.getData())||{processors:[],on_failure:[]}},closeFlyout:()=>f((e=>!e))}):null),Object(h.jsx)(p.EuiSpacer,{size:"m"}))},ws=({sourcePipeline:e})=>{const t=Object(f.useHistory)(),{services:i}=Object(o.H)(),[n,a]=Object(s.useState)(!1),[l,d]=Object(s.useState)(null),{formDefaultValue:u,canEditName:g}=function(e){const t=Object(f.useHistory)(),i=Object(s.useMemo)((()=>new URLSearchParams(t.location.search)),[t.location.search]);return{formDefaultValue:Object(s.useMemo)((()=>{var n;return e||(null!==(n=t.location.state)&&void 0!==n&&n.sourcePipeline?t.location.state.sourcePipeline:i.has("name")?{name:i.get("name"),description:"",processors:[],on_failure:[]}:void 0)}),[e,t,i]),canEditName:!i.has("name")}}(e),m=A(t);return Object(s.useEffect)((()=>{i.breadcrumbs.setBreadcrumbs("create")}),[i]),Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiPageHeader,{bottomBorder:!0,pageTitle:Object(h.jsx)("span",{"data-test-subj":"pageTitle"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.create.pageTitle",defaultMessage:"Create pipeline"})),rightSideItems:[Object(h.jsx)(p.EuiButtonEmpty,{size:"s",flush:"right",href:i.documentation.getCreatePipelineUrl(),target:"_blank",iconType:"help","data-test-subj":"documentationLink"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.create.docsButtonLabel",defaultMessage:"Create pipeline docs"}))]}),Object(h.jsx)(p.EuiSpacer,{size:"l"}),Object(h.jsx)(Is,{defaultValue:u,canEditName:g,onSave:async e=>{a(!0),d(null);const{error:t}=await i.api.createPipeline(e);a(!1),t?d(t):m(Object(M.f)({inspectedPipelineName:e.name}))},onCancel:()=>m(Object(M.f)()),isSaving:n,saveError:l}))};var Ls=i(144),Rs=i.n(Ls);let Ds;!function(e){e.Copy="copy",e.Rename="rename"}(Ds||(Ds={}));const zs=({actionOptions:e,onFilePickerChange:t,onFileUpload:i,isLoading:n,isUploaded:a,hasError:l,hasFile:d})=>{const[u,f]=Object(s.useState)(Ds.Copy),{services:g}=Object(o.H)(),m=g.fileUpload.getMaxBytesFormatted(),x=e.map((e=>({id:e,label:e===Ds.Copy?"Copy field name":"Rename field"})));return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiFormRow,{fullWidth:!0,label:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.fileUpload.filePickerTitle",defaultMessage:"Upload file (up to {maxFileSize})",values:{maxFileSize:m}})},Object(h.jsx)(p.EuiFilePicker,{id:"filePicker","data-test-subj":"csvFilePicker",initialPromptText:k.i18n.translate("xpack.ingestPipelines.createFromCsv.fileUpload.selectOrDragAndDropFileDescription",{defaultMessage:"Select or drag and drop a CSV file"}),onChange:t,accept:".csv"})),Object(h.jsx)(p.EuiSpacer,{size:"l"}),Object(h.jsx)(p.EuiFormRow,{fullWidth:!0,label:Object(h.jsx)("p",null,"Default action",Object(h.jsx)(p.EuiIconTip,{type:"iInCircle",content:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.fileUpload.settingDescription",defaultMessage:"Whether to copy or rename the field if no action is specified in the CSV."})}))},Object(h.jsx)(p.EuiRadioGroup,{options:x,idSelected:u,onChange:e=>f(e)})),Object(h.jsx)(p.EuiSpacer,{size:"l"}),Object(h.jsx)("div",null,Object(h.jsx)(p.EuiButton,{onClick:()=>i(u),isLoading:n,isDisabled:!d||a||l,"data-test-subj":"processFileButton",fill:!0},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.fileUpload.processButton",defaultMessage:"Process CSV"}))))},As=({processors:e,onDownload:t,onClickToCreatePipeline:i,onUpdateProcessors:n,hasError:r})=>{const[a,o]=Object(s.useState)(!0),[l,d]=Object(s.useState)("");return Object(s.useEffect)((()=>{const t=JSON.stringify(e,null,2);d(t)}),[e]),Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,null,!r&&Object(h.jsx)(p.EuiCallOut,{title:"Processor definitions generated",color:"success",iconType:"check"},Object(h.jsx)(p.EuiText,null,Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.preview.jsonMapSuccessful",defaultMessage:"You can save or edit the JSON before generating the pipeline."})))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(p.EuiFormRow,{isInvalid:!a,error:a?null:k.i18n.translate("xpack.ingestPipelines.createFromCsv.preview.invalidJson",{defaultMessage:"Invalid JSON."}),fullWidth:!0,"data-test-subj":"pipelineMappingsJSONEditor"},Object(h.jsx)(s.Fragment,null,Object(h.jsx)(T.CodeEditorField,{"aria-label":"",languageId:Je.XJsonLang.ID,value:l,onChange:e=>{d(e);try{o(!0);const t=JSON.parse(e);n(t)}catch(e){o(!1)}},fullWidth:!0,height:"400px",options:{accessibilitySupport:"off",lineNumbers:"on",fontSize:12,tabSize:2,automaticLayout:!0,minimap:{enabled:!1},overviewRulerBorder:!1,scrollbar:{alwaysConsumeMouseWheel:!1},scrollBeyondLastLine:!1,wordWrap:"on",wrappingIndent:"indent"}}))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(p.EuiFlexGroup,null,Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButton,{fill:!0,onClick:i,"data-test-subj":"continueToCreate"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.preview.createPipeline",defaultMessage:"Continue to create pipeline"}))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiCopy,{textToCopy:l},(e=>Object(h.jsx)(p.EuiButtonEmpty,{iconType:"copy",size:"s",onClick:e,"data-test-subj":"copyToClipboard"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.preview.copy",defaultMessage:"Copy JSON"}))))),Object(h.jsx)(p.EuiFlexItem,{grow:!1},Object(h.jsx)(p.EuiButtonEmpty,{iconType:"download",size:"s",onClick:t,"data-test-subj":"downloadJson"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.preview.download",defaultMessage:"Download JSON"}))))))},Ns=({error:e})=>Object(h.jsx)(p.EuiCallOut,{title:e.title,color:"danger",iconType:"warning","data-test-subj":"errorCallout"},Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.errorMessage",defaultMessage:"{message}",values:{message:e.message}}))),Bs=()=>Object(h.jsx)("div",null,Object(h.jsx)(p.EuiFlexGroup,{"data-test-subj":"createFromCsvInstructions"},Object(h.jsx)(p.EuiFlexItem,null,Object(h.jsx)(p.EuiText,null,Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.instructions",defaultMessage:"Use a CSV file to define how to map your custom data source to the Elastic Common Schema (ECS). For each {source} , you can specify a {destination} and format adjustments. Refer to the  {templateLink} for the supported headers.",values:{templateLink:Object(h.jsx)(p.EuiLink,{href:"https://ela.st/sample-pipeline-mapping",target:"_blank"},"sample mappings"),source:Object(h.jsx)(p.EuiCode,null,"source_field"),destination:Object(h.jsx)(p.EuiCode,null,"destination_field")}}))),Object(h.jsx)(p.EuiSpacer,{size:"m"}),Object(h.jsx)(p.EuiText,null,Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.instructions.continued",defaultMessage:"Add processors to the resulting starter pipeline to perform additional data transformations."}))),Object(h.jsx)(p.EuiSpacer,{size:"m"})))),Us=({history:e})=>{const[t,i]=Object(s.useState)(!1),[n,a]=Object(s.useState)(!1),[l,d]=Object(s.useState)([]),[u,f]=Object(s.useState)(null),[g,m]=Object(s.useState)(null),x=null!==u,{services:b}=Object(o.H)();Object(s.useEffect)((()=>{b.breadcrumbs.setBreadcrumbs("create")}),[b]);const j=async(e,t)=>{const{error:i,data:n}=await b.api.parseCsv({file:e,copyAction:t});if(d(n),i)try{const e=i.message.split(":");f({title:e[0],message:e[1]})}catch(e){f({title:k.i18n.translate("xpack.ingestPipelines.createFromCsv.fetchPipeline.unexpectedErrorTitle",{defaultMessage:"Something went wrong"}),message:k.i18n.translate("xpack.ingestPipelines.createFromCsv.fetchPipeline.unexpectedErrorDetails",{defaultMessage:"Unexpected error"})})}return null===i};return Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiPageHeader,{bottomBorder:!0,pageTitle:Object(h.jsx)("span",{"data-test-subj":"pageTitle"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCsv.pageTitle",defaultMessage:"Create pipeline from CSV"})),rightSideItems:[Object(h.jsx)(p.EuiButtonEmpty,{size:"s",flush:"right",href:b.documentation.getCreatePipelineCSVUrl(),target:"_blank",iconType:"help","data-test-subj":"documentationLink"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.createFromCSV.docsButtonLabel",defaultMessage:"CSV to pipeline docs"}))]}),Object(h.jsx)(p.EuiSpacer,{size:"xl"}),Object(h.jsx)(Bs,null),x&&Object(h.jsx)(Ns,{error:u}),Object(h.jsx)(p.EuiSpacer,{size:"xl"}),(!n||x)&&Object(h.jsx)(zs,{onFilePickerChange:e=>{f(null),m(e)},onFileUpload:async e=>{null!=g&&g.length>0&&await(async(e,t)=>{const n=b.fileUpload.getMaxBytes();if(0===e.size)f({title:k.i18n.translate("xpack.ingestPipelines.createFromCsv.processFile.emptyFileErrorTitle",{defaultMessage:"File is empty"}),message:k.i18n.translate("xpack.ingestPipelines.createFromCsv.processFile.emptyFileError",{defaultMessage:"The file provided is empty."})});else if(e.size>n)f({title:k.i18n.translate("xpack.ingestPipelines.createFromCsv.processFile.fileTooLargeErrorTitle",{defaultMessage:"File too large"}),message:k.i18n.translate("xpack.ingestPipelines.createFromCsv.processFile.fileTooLargeError",{defaultMessage:"File is greater than allowed size of {maxBytes} bytes.",values:{maxBytes:n}})});else try{i(!0),a(!1);const s=await b.fileReader.readFile(e,n),r=await j(s,t);i(!1),r&&a(!0)}catch(e){i(!1),f({title:k.i18n.translate("xpack.ingestPipelines.createFromCsv.processFile.unexpectedErrorTitle",{defaultMessage:"Error reading file"}),message:k.i18n.translate("xpack.ingestPipelines.createFromCsv.processFile.unexpectedError",{defaultMessage:"The file provided could not be read."})})}})(g[0],e)},actionOptions:Object.values(Ds),isLoading:t,isUploaded:n,hasError:x,hasFile:!!g&&g.length>0}),n&&Object(h.jsx)(As,{processors:l,onDownload:()=>{const e=new Blob([JSON.stringify(l)],{type:"application/json"});Rs.a.saveAs(e,"my-mappings.json")},onUpdateProcessors:e=>{d(e)},onClickToCreatePipeline:()=>{e.push({pathname:"/create",state:{sourcePipeline:l}})},hasError:x}))},Hs=()=>Object(h.jsx)(p.EuiCallOut,{color:"danger",iconType:"warning","data-test-subj":"managedPipelineCallout",title:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.edit.managedCalloutTitle",defaultMessage:"Editing a managed pipeline can break Kibana."})},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.edit.managedCalloutDescription",defaultMessage:"Managed pipelines are critical for internal operations."})),Ws=({match:{params:{name:e}},history:t})=>{const{services:i}=Object(o.H)(),[n,a]=Object(s.useState)(!1),[l,d]=Object(s.useState)(null),u=A(t),f=Object(o.w)(e),{error:g,data:m,isLoading:x,resendRequest:b}=i.api.useLoadPipeline(f);return Object(s.useEffect)((()=>{i.breadcrumbs.setBreadcrumbs("edit")}),[i.breadcrumbs]),x?Object(h.jsx)(o.n,null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.edit.loadingPipelinesDescription",defaultMessage:"Loading pipeline…"})):g?Object(h.jsx)(p.EuiPageTemplate.EmptyPrompt,{color:"danger",iconType:"warning",title:Object(h.jsx)("h2",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.edit.fetchPipelineError",defaultMessage:"Unable to load '{name}'",values:{name:f}})),body:Object(h.jsx)("p",null,g.message),actions:Object(h.jsx)(p.EuiButton,{onClick:b,iconType:"refresh",color:"danger"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.edit.fetchPipelineReloadButton",defaultMessage:"Try again"}))}):Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(p.EuiPageHeader,{bottomBorder:!0,pageTitle:Object(h.jsx)("span",{"data-test-subj":"pageTitle"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.edit.pageTitle",defaultMessage:"Edit pipeline '{name}'",values:{name:f}})),rightSideItems:[Object(h.jsx)(p.EuiButtonEmpty,{size:"s",flush:"right",href:i.documentation.getCreatePipelineUrl(),target:"_blank",iconType:"help","data-test-subj":"documentationLink"},Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.edit.docsButtonLabel",defaultMessage:"Edit pipeline docs"}))]}),Object(h.jsx)(p.EuiSpacer,{size:"l"}),(null==m?void 0:m.isManaged)&&Object(h.jsx)(r.a.Fragment,null,Object(h.jsx)(Hs,null),Object(h.jsx)(p.EuiSpacer,{size:"l"})),Object(h.jsx)(Is,{onSave:async e=>{a(!0),d(null);const{error:t}=await i.api.updatePipeline(e);a(!1),t?d(t):u(Object(M.f)({inspectedPipelineName:e.name}))},onCancel:()=>{u(Object(M.f)())},isSaving:n,saveError:l,defaultValue:m,isEditing:!0}))},Vs=e=>{const{sourceName:t}=e.match.params,{services:i}=Object(o.H)(),n=Object(o.w)(t),{error:r,data:a,isLoading:l,isInitialRequest:p}=i.api.useLoadPipeline(n);if(Object(s.useEffect)((()=>{r&&!l&&i.notifications.toasts.addError(r,{title:k.i18n.translate("xpack.ingestPipelines.clone.loadSourcePipelineErrorTitle",{defaultMessage:"Cannot load {name}.",values:{name:t}})})}),[r,l]),l&&p)return Object(h.jsx)(o.n,null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.clone.loadingPipelinesDescription",defaultMessage:"Loading pipeline…"}));{const t=a?{...a,name:`${a.name}-copy`}:void 0;return Object(h.jsx)(ws,u()({},e,{sourcePipeline:t}))}},qs=()=>Object(h.jsx)(E,null,Object(h.jsx)(j,{exact:!0,path:M.a.list,component:N}),Object(h.jsx)(j,{exact:!0,path:M.a.clone,component:Vs}),Object(h.jsx)(j,{exact:!0,path:M.a.create,component:ws}),Object(h.jsx)(j,{exact:!0,path:M.a.edit,component:Ws}),Object(h.jsx)(j,{exact:!0,path:M.a.createFromCsv,component:Us}),Object(h.jsx)(j,{component:N})),Gs=()=>{const{apiError:e}=Object(o.D)(),{history:t}=Object(o.H)().services;return e?Object(h.jsx)(o.m,{title:Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.app.checkingPrivilegesErrorMessage",defaultMessage:"Error fetching user privileges from the server."}),error:e}):Object(h.jsx)(o.u,{privileges:l.b.map((e=>`cluster.${e}`))},(({isLoading:e,hasPrivileges:i,privilegesMissing:n})=>e?Object(h.jsx)(o.n,null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.app.checkingPrivilegesDescription",defaultMessage:"Checking privileges…"})):i?Object(h.jsx)(_,{history:t},Object(h.jsx)(qs,null)):Object(h.jsx)(p.EuiPageTemplate.EmptyPrompt,{iconType:"securityApp",title:Object(h.jsx)("h2",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.app.deniedPrivilegeTitle",defaultMessage:"Cluster privileges required"})),body:Object(h.jsx)("p",null,Object(h.jsx)(c.FormattedMessage,{id:"xpack.ingestPipelines.app.deniedPrivilegeDescription",defaultMessage:"To use Ingest Pipelines, you must have {privilegesCount, plural, one {this cluster privilege} other {these cluster privileges}}: {missingPrivileges}.",values:{missingPrivileges:n.cluster.join(", "),privilegesCount:n.cluster.length}}))})))},Js=(e,t,i,n,{theme$:s})=>(Object(a.render)(Object(h.jsx)(o.a,{privilegesEndpoint:`${l.a}/privileges`,httpClient:n.http},Object(h.jsx)(t,null,Object(h.jsx)(o.k,{theme$:s},Object(h.jsx)(o.j,{services:{...i,theme:{theme$:s}}},Object(h.jsx)(Gs,null))))),e),()=>{Object(a.unmountComponentAtNode)(e)});async function Xs({http:e,getStartServices:t,notifications:i},s){const{element:r,setBreadcrumbs:a,history:o,theme$:l,license:c}=s,[p,d]=await t(),{docLinks:u,application:f,i18n:{Context:g},executionContext:m}=p;n.c.setup(u),n.b.setup(a);const x={breadcrumbs:n.b,metric:n.e,documentation:n.c,api:n.a,fileReader:n.d,notifications:i,history:o,uiSettings:p.uiSettings,settings:p.settings,share:d.share,fileUpload:d.fileUpload,application:f,executionContext:m,license:c};return Js(r,g,x,{http:e},{theme$:l})}}])]);