!function(e){function t(t){for(var n,i,a=t[0],r=t[1],o=0,p=[];o{const i="string"==typeof t?((e,t)=>{var n,s;const i=e.find((e=>e.id===t));if(i)return{accessor:i,format:{id:null===(n=i.meta.params)||void 0===n?void 0:n.id,params:{...null===(s=i.meta.params)||void 0===s?void 0:s.params}},type:"vis_dimension"}})(e,t):t;i&&n.push([[i],s])},p=()=>({name:a,type:"render",inputTypes:["datatable"],help:s.i18n.translate("expressionHeatmap.function.help",{defaultMessage:"Heatmap visualization"}),args:{percentageMode:{types:["boolean"],default:!1,help:s.i18n.translate("expressionHeatmap.function.percentageMode.help",{defaultMessage:"When is on, tooltip and legends appear as percentages."})},palette:{types:["palette"],help:s.i18n.translate("expressionHeatmap.function.palette.help",{defaultMessage:"Provides colors for the values, based on the bounds."})},legend:{types:[r],help:s.i18n.translate("expressionHeatmap.function.legendConfig.help",{defaultMessage:"Configure the chart legend."}),default:`{${r}}`},gridConfig:{types:[o],help:s.i18n.translate("expressionHeatmap.function.gridConfig.help",{defaultMessage:"Configure the heatmap layout."}),default:`{${o}}`},showTooltip:{types:["boolean"],help:s.i18n.translate("expressionHeatmap.function.args.addTooltipHelpText",{defaultMessage:"Show tooltip on hover"}),default:!0},highlightInHover:{types:["boolean"],help:s.i18n.translate("expressionHeatmap.function.args.highlightInHoverHelpText",{defaultMessage:"When this is enabled, it highlights the ranges of the same color on legend hover"})},lastRangeIsRightOpen:{types:["boolean"],help:s.i18n.translate("expressionHeatmap.function.args.lastRangeIsRightOpen",{defaultMessage:"If is set to true, the last range value will be right open"}),default:!0},xAccessor:{types:["string","vis_dimension"],help:s.i18n.translate("expressionHeatmap.function.args.xAccessorHelpText",{defaultMessage:"The id of the x axis column or the corresponding dimension"})},yAccessor:{types:["string","vis_dimension"],help:s.i18n.translate("expressionHeatmap.function.args.yAccessorHelpText",{defaultMessage:"The id of the y axis column or the corresponding dimension"})},valueAccessor:{types:["string","vis_dimension"],help:s.i18n.translate("expressionHeatmap.function.args.valueAccessorHelpText",{defaultMessage:"The id of the value column or the corresponding dimension"}),required:!0},splitRowAccessor:{types:["string","vis_dimension"],help:s.i18n.translate("expressionHeatmap.function.args.splitRowAccessorHelpText",{defaultMessage:"The id of the split row or the corresponding dimension"})},splitColumnAccessor:{types:["string","vis_dimension"],help:s.i18n.translate("expressionHeatmap.function.args.splitColumnAccessorHelpText",{defaultMessage:"The id of the split column or the corresponding dimension"})},ariaLabel:{types:["string"],help:s.i18n.translate("expressionHeatmap.functions.args.ariaLabelHelpText",{defaultMessage:"Specifies the aria label of the heat map"}),required:!1}},fn(e,t,n){var r,o,p,c,u,d,f,g,h,m,b,v;if(Object(i.validateAccessor)(t.xAccessor,e.columns),Object(i.validateAccessor)(t.yAccessor,e.columns),Object(i.validateAccessor)(t.valueAccessor,e.columns),Object(i.validateAccessor)(t.splitRowAccessor,e.columns),Object(i.validateAccessor)(t.splitColumnAccessor,e.columns),null!=n&&null!==(r=n.inspectorAdapters)&&void 0!==r&&r.tables){n.inspectorAdapters.tables.reset(),n.inspectorAdapters.tables.allowCsvExport=!0;const a=[];t.valueAccessor&&l(e.columns,t.valueAccessor,a,s.i18n.translate("expressionHeatmap.function.dimension.metric",{defaultMessage:"Metric"})),t.yAccessor&&l(e.columns,t.yAccessor,a,s.i18n.translate("expressionHeatmap.function.dimension.yaxis",{defaultMessage:"Y axis"})),t.xAccessor&&l(e.columns,t.xAccessor,a,s.i18n.translate("expressionHeatmap.function.dimension.xaxis",{defaultMessage:"X axis"})),t.splitRowAccessor&&l(e.columns,t.splitRowAccessor,a,s.i18n.translate("expressionHeatmap.function.dimension.splitRow",{defaultMessage:"Split by row"})),t.splitColumnAccessor&&l(e.columns,t.splitColumnAccessor,a,s.i18n.translate("expressionHeatmap.function.dimension.splitColumn",{defaultMessage:"Split by column"}));const r=Object(i.prepareLogTable)(e,a,!0);n.inspectorAdapters.tables.logDatatable("default",r)}return{type:"render",as:a,value:{data:e,args:{...t,ariaLabel:null!==(o=null!==(p=t.ariaLabel)&&void 0!==p?p:null===(c=n.variables)||void 0===c?void 0:c.embeddableTitle)&&void 0!==o?o:null===(u=n.getExecutionContext)||void 0===u||null===(d=u.call(n))||void 0===d?void 0:d.description},syncTooltips:null!==(f=null===(g=n.isSyncTooltipsEnabled)||void 0===g?void 0:g.call(n))&&void 0!==f&&f,syncCursor:null===(h=null===(m=n.isSyncCursorEnabled)||void 0===m?void 0:m.call(n))||void 0===h||h,canNavigateToLens:Boolean(null===(b=n.variables)||void 0===b?void 0:b.canNavigateToLens),overrides:null===(v=n.variables)||void 0===v?void 0:v.overrides}}}});var c=n(5),u=n(4);const d={name:r,aliases:[],type:r,help:"Configure the heatmap chart's legend",inputTypes:["null"],args:{isVisible:{types:["boolean"],help:s.i18n.translate("expressionHeatmap.function.args.legend.isVisible.help",{defaultMessage:"Specifies whether or not the legend is visible."})},position:{types:["string"],default:c.Position.Right,options:[c.Position.Top,c.Position.Right,c.Position.Bottom,c.Position.Left],help:s.i18n.translate("expressionHeatmap.function.args.legend.position.help",{defaultMessage:"Specifies the legend position."}),strict:!0},maxLines:{types:["number"],help:s.i18n.translate("expressionHeatmap.function.args.legend.maxLines.help",{defaultMessage:"Specifies the number of lines per legend item."})},shouldTruncate:{types:["boolean"],default:!0,help:s.i18n.translate("expressionHeatmap.function.args.legend.shouldTruncate.help",{defaultMessage:"Specifies whether or not the legend items should be truncated."})},legendSize:{types:["string"],default:u.DEFAULT_LEGEND_SIZE,help:s.i18n.translate("expressionHeatmap.function.args.legendSize.help",{defaultMessage:"Specifies the legend size."}),options:[u.LegendSize.AUTO,u.LegendSize.SMALL,u.LegendSize.MEDIUM,u.LegendSize.LARGE,u.LegendSize.EXTRA_LARGE],strict:!0}},fn:(e,t)=>({type:r,...t})},f={name:o,aliases:[],type:o,help:"Configure the heatmap layout",inputTypes:["null"],args:{strokeWidth:{types:["number"],help:s.i18n.translate("expressionHeatmap.function.args.grid.strokeWidth.help",{defaultMessage:"Specifies the grid stroke width"}),required:!1},strokeColor:{types:["string"],help:s.i18n.translate("expressionHeatmap.function.args.grid.strokeColor.help",{defaultMessage:"Specifies the grid stroke color"}),required:!1},isCellLabelVisible:{types:["boolean"],help:s.i18n.translate("expressionHeatmap.function.args.grid.isCellLabelVisible.help",{defaultMessage:"Specifies whether or not the cell label is visible."})},isYAxisLabelVisible:{types:["boolean"],help:s.i18n.translate("expressionHeatmap.function.args.grid.isYAxisLabelVisible.help",{defaultMessage:"Specifies whether or not the Y-axis labels are visible."})},isYAxisTitleVisible:{types:["boolean"],help:s.i18n.translate("expressionHeatmap.function.args.grid.isYAxisTitleVisible.help",{defaultMessage:"Specifies whether or not the Y-axis title is visible."})},yTitle:{types:["string"],help:s.i18n.translate("expressionHeatmap.function.args.grid.yTitle.help",{defaultMessage:"Specifies the title of the y axis"}),required:!1},isXAxisLabelVisible:{types:["boolean"],help:s.i18n.translate("expressionHeatmap.function.args.grid.isXAxisLabelVisible.help",{defaultMessage:"Specifies whether or not the X-axis labels are visible."})},isXAxisTitleVisible:{types:["boolean"],help:s.i18n.translate("expressionHeatmap.function.args.grid.isXAxisTitleVisible.help",{defaultMessage:"Specifies whether or not the X-axis title is visible."})},xTitle:{types:["string"],help:s.i18n.translate("expressionHeatmap.function.args.grid.xTitle.help",{defaultMessage:"Specifies the title of the x axis"}),required:!1}},fn:(e,t)=>({type:o,...t})},g="expressionHeatmap",h="expressionHeatmap"},function(e,t,n){n.r(t);var s=__kbnBundles__.get("plugin/visualizations/common/utils");Object.defineProperties(t,Object.getOwnPropertyDescriptors(s))},function(e,t,n){n.r(t);var s=__kbnBundles__.get("plugin/visualizations/common/constants");Object.defineProperties(t,Object.getOwnPropertyDescriptors(s))},function(e,t){e.exports=__kbnSharedDeps__.ElasticCharts},function(e,t){e.exports=__kbnSharedDeps__.EmotionReact},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a}));const s=e=>{if(e){var t;const n=e=>e.type?e:e.child?n(e.child):void 0;return null===(t=n(e))||void 0===t?void 0:t.type}},i=e=>{if(e){var t;const n=e=>e.child?n(e.child):e;return null===(t=n(e))||void 0===t?void 0:t.type}};function a(e,t){return e&&e[t]?Object.fromEntries(Object.entries(e[t]).map((([e,t])=>"ignore"===t?[e,void 0]:[e,t]))):{}}},function(e,t){e.exports=__kbnSharedDeps__.ReactDom},function(e,t){e.exports=__kbnSharedDeps__.Moment},function(e,t,n){e.exports=n(17)(1466)},function(e,t,n){n.r(t);var s=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(s))},function(e,t){e.exports=__kbnSharedDeps__.KbnAnalytics},function(e,t){e.exports=__kbnSharedDeps__.KbnI18nReact},function(e,t){e.exports=__kbnSharedDeps__.React},function(e,t,n){n(16),__kbnBundles__.define("plugin/expressionHeatmap/public",n,18),__kbnBundles__.define("plugin/expressionHeatmap/common",n,2)},function(e,t,n){n.p=window.__kbnPublicPath__.expressionHeatmap},function(e,t){e.exports=__kbnSharedDeps_npm__},function(e,t,n){"use strict";n.r(t),n.d(t,"plugin",(function(){return H}));var s=n(1),i=n(2);const[a,r]=Object(s.createGetterSetter)("data.datatableUtilities"),[o,l]=Object(s.createGetterSetter)("fieldFormats"),[p,c]=Object(s.createGetterSetter)("palette"),[u,d]=Object(s.createGetterSetter)("core.uiSettings");var f=n(10),g=n.n(f),h=n(0),m=(n(14),n(8)),b=n(11),v=n(12),_=n(7),x=n(13),y=n(9),S=n.n(y),A=n(6);class plugin_ExpressionHeatmapPlugin{setup(e,{expressions:t,charts:r}){r.palettes.getPalettes().then((e=>{c(e)})),d(e.uiSettings);const l=Object(s.createStartServicesGetter)(e.getStartServices);t.registerFunction(i.heatmapFunction),t.registerFunction(i.heatmapLegendConfig),t.registerFunction(i.heatmapGridConfig),t.registerRenderer((({getStartDeps:e})=>({name:i.EXPRESSION_HEATMAP_NAME,displayName:h.i18n.translate("expressionHeatmap.visualizationName",{defaultMessage:"Heatmap"}),reuseDomNode:!0,render:async(t,s,r)=>{const{core:l,plugins:c}=e();r.onDestroy((()=>{Object(m.unmountComponentAtNode)(t)}));const d=(y=u()).isDefault("dateFormat:tz")?S.a.tz.guess()||S()().format("Z"):y.get("dateFormat:tz","Browser"),{HeatmapComponent:f}=await n.e(1).then(n.bind(null,46)),{isInteractive:h}=r;var y;Object(m.render)(Object(A.jsx)(b.KibanaThemeProvider,{theme$:l.theme.theme$},Object(A.jsx)(x.I18nProvider,null,Object(A.jsx)("div",{className:"heatmap-container","data-test-subj":"heatmapChart"},Object(A.jsx)(f,g()({},s,{onClickValue:e=>{r.event({name:"filter",data:e})},onSelectRange:e=>{r.event({name:"brush",data:e})},timeZone:d,datatableUtilities:a(),formatFactory:o().deserialize,chartsThemeService:c.charts.theme,paletteService:p(),renderComplete:()=>{const e=r.getExecutionContext(),t=Object(_.a)(e),n=Object(_.b)(e);if(t&&n){var a;const e=[`render_${n}_${i.EXPRESSION_HEATMAP_NAME}`,s.canNavigateToLens?`render_${n}_${i.EXPRESSION_HEATMAP_NAME}_convertable`:void 0].filter((e=>Boolean(e)));null===(a=c.usageCollection)||void 0===a||a.reportUiCounter(t,v.METRIC_TYPE.COUNT,e)}r.done()},uiState:r.uiState,interactive:h(),chartsActiveCursorService:c.charts.activeCursor,syncTooltips:s.syncTooltips,syncCursor:s.syncCursor,onClickMultiValue:e=>{r.event({name:"multiFilter",data:e})}}))))),t)}}))({getStartDeps:l}))}start(e,{data:t,fieldFormats:n}){l(n),r(t.datatableUtilities)}}function H(){return new plugin_ExpressionHeatmapPlugin}},function(e,t,n){n.r(t);var s=__kbnBundles__.get("plugin/charts/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(s))},function(e,t){e.exports=__kbnSharedDeps__.EmotionCache},function(e,t,n){n.r(t);var s=__kbnBundles__.get("plugin/data/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(s))},function(e,t){e.exports=__kbnSharedDeps__.ElasticEui},function(e,t){e.exports=__kbnSharedDeps__.KbnUiTheme}]);