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AAE,IAAI,IAAImsC,EAAEruC,EAAE,WAAWsyC,EAAE,OAAOl1C,EAAE4D,GAAGqtC,EAAErtC,EAAEH,GAAGL,KAAK7E,QAAQqF,GAAE,SAAUA,GAAG,OAAOqtC,EAAErtC,EAAEH,OAAOqB,EAAh7D,GAAq7DqwC,EAAG,IAAIb,EAAG/E,GAAG4F,EAAG52C,QAAW42C,EAAGX,mBAAmBlqC,KAAK6qC,GAAOA,EAAGP,cAActqC,KAAK6qC,GAAOA,EAAGT,cAAcpqC,KAAK6qC,GAAOA,EAAGJ,aAAazqC,KAAK6qC,GAAOA,EAAGN,YAAYvqC,KAAK6qC,GAAOA,EAAGL,YAAYxqC,KAAK6qC,GAAI","sources":["webpack://grafana/./public/app/features/dashboard/dashgrid/SeriesVisibilityConfigFactory.ts","webpack://grafana/./public/app/features/explore/ExploreGraph.tsx","webpack://grafana/./public/app/features/explore/exploreGraphStyleUtils.ts","webpack://grafana/./public/app/features/explore/ExploreGraphLabel.tsx","webpack://grafana/./.yarn/__virtual__/re-resizable-virtual-820bbedce8/3/opt/drone/yarncache/re-resizable-npm-6.9.5-33d584b1c1-cd82a1baff.zip/node_modules/re-resizable/lib/resizer.js","webpack://grafana/./.yarn/__virtual__/re-resizable-virtual-820bbedce8/3/opt/drone/yarncache/re-resizable-npm-6.9.5-33d584b1c1-cd82a1baff.zip/node_modules/re-resizable/lib/index.js","webpack://grafana/./public/app/features/explore/ExploreDrawer.tsx","webpack://grafana/./public/app/features/explore/ExploreQueryInspector.tsx","webpack://grafana/./public/app/features/explore/TimeSyncButton.tsx","webpack://grafana/./public/app/features/explore/ExploreTimeControls.tsx","webpack://grafana/./public/app/features/explore/LiveTailButton.tsx","webpack://grafana/./public/app/features/explore/RunButton.tsx","webpack://grafana/./public/app/features/explore/useLiveTailControls.ts","webpack://grafana/./public/app/features/explore/ExploreToolbar.tsx","webpack://grafana/./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/useInterval.js","webpack://grafana/./public/app/features/explore/Time.tsx","webpack://grafana/./public/app/features/explore/ElapsedTime.tsx","webpack://grafana/./public/app/features/explore/LiveLogs.tsx","webpack://grafana/./public/app/features/explore/MetaInfoText.tsx","webpack://grafana/./public/app/features/explore/LogsMetaRow.tsx","webpack://grafana/./public/app/features/explore/LogsNavigationPages.tsx","webpack://grafana/./public/app/features/explore/LogsNavigation.tsx","webpack://grafana/./public/app/features/explore/Logs.tsx","webpack://grafana/./public/app/features/explore/utils/LogsCrossFadeTransition.tsx","webpack://grafana/./public/app/features/explore/LogsContainer.tsx","webpack://grafana/./public/app/features/explore/LogsVolumePanel.tsx","webpack://grafana/./public/app/features/explore/NoDataSourceCallToAction.tsx","webpack://grafana/./public/app/features/explore/NodeGraphContainer.tsx","webpack://grafana/./public/app/features/explore/QueryRows.tsx","webpack://grafana/./public/app/core/components/Animations/FadeIn.tsx","webpack://grafana/./public/app/features/explore/ErrorContainer.tsx","webpack://grafana/./public/app/features/explore/ResponseErrorContainer.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistoryCard.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistoryQueriesTab.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistorySettings.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistoryStarredTab.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistory.tsx","webpack://grafana/./public/app/features/explore/RichHistory/RichHistoryContainer.tsx","webpack://grafana/./public/app/features/explore/SecondaryActions.tsx","webpack://grafana/./public/app/features/explore/TableContainer.tsx","webpack://grafana/./packages/jaeger-ui-components/src/common/UiFindInput.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.markers.tsx","webpack://grafana/./packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.tsx","webpack://grafana/./public/app/features/explore/TraceView/createSpanLink.tsx","webpack://grafana/./public/app/features/explore/TraceView/useDetailState.ts","webpack://grafana/./public/app/features/explore/TraceView/TraceView.tsx","webpack://grafana/./public/app/features/explore/TraceView/useHoverIndentGuide.ts","webpack://grafana/./public/app/features/explore/TraceView/useViewRange.ts","webpack://grafana/./public/app/features/explore/TraceView/useChildrenState.ts","webpack://grafana/./public/app/features/explore/TraceView/utils/transform.ts","webpack://grafana/./public/app/features/explore/TraceView/TraceViewContainer.tsx","webpack://grafana/./public/app/features/explore/TraceView/useSearch.ts","webpack://grafana/./public/app/features/explore/Explore.tsx","webpack://grafana/./public/app/features/explore/ExplorePaneContainer.tsx","webpack://grafana/./public/app/features/explore/Wrapper.tsx","webpack://grafana/./public/app/features/explore/state/selectors.ts","webpack://grafana/./.yarn/__virtual__/react-use-virtual-00326e70ba/3/opt/drone/yarncache/react-use-npm-17.3.2-a032cbeb01-7379460f51.zip/node_modules/react-use/esm/usePrevious.js","webpack://grafana/../../opt/drone/yarncache/fast-memoize-npm-2.5.2-f42a7c6940-79fa759719.zip/node_modules/fast-memoize/src/index.js","webpack://grafana/../../opt/drone/yarncache/immer-npm-9.0.12-e8cd7358fa-bcbec6d76d.zip/node_modules/immer/dist/immer.esm.js"],"sourcesContent":["import {\n  ByNamesMatcherMode,\n  DataFrame,\n  DynamicConfigValue,\n  FieldConfigSource,\n  FieldMatcherID,\n  FieldType,\n  getFieldDisplayName,\n  isSystemOverrideWithRef,\n  SystemConfigOverrideRule,\n} from '@grafana/data';\nimport { SeriesVisibilityChangeMode } from '@grafana/ui';\n\nconst displayOverrideRef = 'hideSeriesFrom';\nconst isHideSeriesOverride = isSystemOverrideWithRef(displayOverrideRef);\n\nexport function seriesVisibilityConfigFactory(\n  label: string,\n  mode: SeriesVisibilityChangeMode,\n  fieldConfig: FieldConfigSource,\n  data: DataFrame[]\n) {\n  const { overrides } = fieldConfig;\n\n  const displayName = label;\n  const currentIndex = overrides.findIndex(isHideSeriesOverride);\n\n  if (currentIndex < 0) {\n    if (mode === SeriesVisibilityChangeMode.ToggleSelection) {\n      const override = createOverride([displayName]);\n\n      return {\n        ...fieldConfig,\n        overrides: [...fieldConfig.overrides, override],\n      };\n    }\n\n    const displayNames = getDisplayNames(data, displayName);\n    const override = createOverride(displayNames);\n\n    return {\n      ...fieldConfig,\n      overrides: [...fieldConfig.overrides, override],\n    };\n  }\n\n  const overridesCopy = Array.from(overrides);\n  const [current] = overridesCopy.splice(currentIndex, 1) as SystemConfigOverrideRule[];\n\n  if (mode === SeriesVisibilityChangeMode.ToggleSelection) {\n    const existing = getExistingDisplayNames(current);\n\n    if (existing[0] === displayName && existing.length === 1) {\n      return {\n        ...fieldConfig,\n        overrides: overridesCopy,\n      };\n    }\n\n    const override = createOverride([displayName]);\n\n    return {\n      ...fieldConfig,\n      overrides: [...overridesCopy, override],\n    };\n  }\n\n  const override = createExtendedOverride(current, displayName);\n\n  if (allFieldsAreExcluded(override, data)) {\n    return {\n      ...fieldConfig,\n      overrides: overridesCopy,\n    };\n  }\n\n  return {\n    ...fieldConfig,\n    overrides: [...overridesCopy, override],\n  };\n}\n\nfunction createOverride(\n  names: string[],\n  mode = ByNamesMatcherMode.exclude,\n  property?: DynamicConfigValue\n): SystemConfigOverrideRule {\n  property = property ?? {\n    id: 'custom.hideFrom',\n    value: {\n      viz: true,\n      legend: false,\n      tooltip: false,\n    },\n  };\n\n  return {\n    __systemRef: displayOverrideRef,\n    matcher: {\n      id: FieldMatcherID.byNames,\n      options: {\n        mode: mode,\n        names: names,\n        prefix: mode === ByNamesMatcherMode.exclude ? 'All except:' : undefined,\n        readOnly: true,\n      },\n    },\n    properties: [\n      {\n        ...property,\n        value: {\n          viz: true,\n          legend: false,\n          tooltip: false,\n        },\n      },\n    ],\n  };\n}\n\nconst createExtendedOverride = (\n  current: SystemConfigOverrideRule,\n  displayName: string,\n  mode = ByNamesMatcherMode.exclude\n): SystemConfigOverrideRule => {\n  const property = current.properties.find((p) => p.id === 'custom.hideFrom');\n  const existing = getExistingDisplayNames(current);\n  const index = existing.findIndex((name) => name === displayName);\n\n  if (index < 0) {\n    existing.push(displayName);\n  } else {\n    existing.splice(index, 1);\n  }\n\n  return createOverride(existing, mode, property);\n};\n\nconst getExistingDisplayNames = (rule: SystemConfigOverrideRule): string[] => {\n  const names = rule.matcher.options?.names;\n  if (!Array.isArray(names)) {\n    return [];\n  }\n  return [...names];\n};\n\nconst allFieldsAreExcluded = (override: SystemConfigOverrideRule, data: DataFrame[]): boolean => {\n  return getExistingDisplayNames(override).length === getDisplayNames(data).length;\n};\n\nconst getDisplayNames = (data: DataFrame[], excludeName?: string): string[] => {\n  const unique = new Set<string>();\n\n  for (const frame of data) {\n    for (const field of frame.fields) {\n      if (field.type !== FieldType.number) {\n        continue;\n      }\n\n      const name = getFieldDisplayName(field, frame, data);\n\n      if (name === excludeName) {\n        continue;\n      }\n\n      unique.add(name);\n    }\n  }\n\n  return Array.from(unique);\n};\n","import { css, cx } from '@emotion/css';\nimport { identity } from 'lodash';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { usePrevious } from 'react-use';\n\nimport {\n  AbsoluteTimeRange,\n  applyFieldOverrides,\n  compareArrayValues,\n  compareDataFrameStructures,\n  createFieldConfigRegistry,\n  DataFrame,\n  dateTime,\n  FieldColorModeId,\n  FieldConfigSource,\n  getFrameDisplayName,\n  GrafanaTheme2,\n  LoadingState,\n  SplitOpen,\n  TimeZone,\n} from '@grafana/data';\nimport { PanelRenderer } from '@grafana/runtime';\nimport { GraphDrawStyle, LegendDisplayMode, TooltipDisplayMode, SortOrder } from '@grafana/schema';\nimport {\n  Icon,\n  PanelContext,\n  PanelContextProvider,\n  SeriesVisibilityChangeMode,\n  useStyles2,\n  useTheme2,\n} from '@grafana/ui';\nimport appEvents from 'app/core/app_events';\nimport { defaultGraphConfig, getGraphFieldConfig } from 'app/plugins/panel/timeseries/config';\nimport { TimeSeriesOptions } from 'app/plugins/panel/timeseries/types';\n\nimport { ExploreGraphStyle } from '../../types';\nimport { seriesVisibilityConfigFactory } from '../dashboard/dashgrid/SeriesVisibilityConfigFactory';\n\nimport { applyGraphStyle } from './exploreGraphStyleUtils';\n\nconst MAX_NUMBER_OF_TIME_SERIES = 20;\n\ninterface Props {\n  data: DataFrame[];\n  height: number;\n  width: number;\n  absoluteRange: AbsoluteTimeRange;\n  timeZone: TimeZone;\n  loadingState: LoadingState;\n  annotations?: DataFrame[];\n  onHiddenSeriesChanged?: (hiddenSeries: string[]) => void;\n  tooltipDisplayMode?: TooltipDisplayMode;\n  splitOpenFn?: SplitOpen;\n  onChangeTime: (timeRange: AbsoluteTimeRange) => void;\n  graphStyle: ExploreGraphStyle;\n}\n\nexport function ExploreGraph({\n  data,\n  height,\n  width,\n  timeZone,\n  absoluteRange,\n  onChangeTime,\n  loadingState,\n  annotations,\n  onHiddenSeriesChanged,\n  splitOpenFn,\n  graphStyle,\n  tooltipDisplayMode = TooltipDisplayMode.Single,\n}: Props) {\n  const theme = useTheme2();\n  const [showAllTimeSeries, setShowAllTimeSeries] = useState(false);\n  const [baseStructureRev, setBaseStructureRev] = useState(1);\n\n  const previousData = usePrevious(data);\n  const structureChangesRef = useRef(0);\n\n  if (data && previousData && !compareArrayValues(previousData, data, compareDataFrameStructures)) {\n    structureChangesRef.current++;\n  }\n\n  const structureRev = baseStructureRev + structureChangesRef.current;\n\n  const [fieldConfig, setFieldConfig] = useState<FieldConfigSource>({\n    defaults: {\n      color: {\n        mode: FieldColorModeId.PaletteClassic,\n      },\n      custom: {\n        drawStyle: GraphDrawStyle.Line,\n        fillOpacity: 0,\n        pointSize: 5,\n      },\n    },\n    overrides: [],\n  });\n\n  const style = useStyles2(getStyles);\n  const timeRange = {\n    from: dateTime(absoluteRange.from),\n    to: dateTime(absoluteRange.to),\n    raw: {\n      from: dateTime(absoluteRange.from),\n      to: dateTime(absoluteRange.to),\n    },\n  };\n\n  const dataWithConfig = useMemo(() => {\n    const registry = createFieldConfigRegistry(getGraphFieldConfig(defaultGraphConfig), 'Explore');\n    const styledFieldConfig = applyGraphStyle(fieldConfig, graphStyle);\n    return applyFieldOverrides({\n      fieldConfig: styledFieldConfig,\n      data,\n      timeZone,\n      replaceVariables: (value) => value, // We don't need proper replace here as it is only used in getLinks and we use getFieldLinks\n      theme,\n      fieldConfigRegistry: registry,\n    });\n  }, [fieldConfig, graphStyle, data, timeZone, theme]);\n\n  useEffect(() => {\n    if (onHiddenSeriesChanged) {\n      const hiddenFrames: string[] = [];\n      dataWithConfig.forEach((frame) => {\n        const allFieldsHidden = frame.fields.map((field) => field.config?.custom?.hideFrom?.viz).every(identity);\n        if (allFieldsHidden) {\n          hiddenFrames.push(getFrameDisplayName(frame));\n        }\n      });\n      onHiddenSeriesChanged(hiddenFrames);\n    }\n  }, [dataWithConfig, onHiddenSeriesChanged]);\n\n  const seriesToShow = showAllTimeSeries ? dataWithConfig : dataWithConfig.slice(0, MAX_NUMBER_OF_TIME_SERIES);\n\n  const panelContext: PanelContext = {\n    eventBus: appEvents,\n    onSplitOpen: splitOpenFn,\n    onToggleSeriesVisibility(label: string, mode: SeriesVisibilityChangeMode) {\n      setBaseStructureRev((r) => r + 1);\n      setFieldConfig(seriesVisibilityConfigFactory(label, mode, fieldConfig, data));\n    },\n  };\n\n  return (\n    <PanelContextProvider value={panelContext}>\n      {dataWithConfig.length > MAX_NUMBER_OF_TIME_SERIES && !showAllTimeSeries && (\n        <div className={cx([style.timeSeriesDisclaimer])}>\n          <Icon className={style.disclaimerIcon} name=\"exclamation-triangle\" />\n          {`Showing only ${MAX_NUMBER_OF_TIME_SERIES} time series. `}\n          <span\n            className={cx([style.showAllTimeSeries])}\n            onClick={() => {\n              structureChangesRef.current++;\n              setShowAllTimeSeries(true);\n            }}\n          >{`Show all ${dataWithConfig.length}`}</span>\n        </div>\n      )}\n      <PanelRenderer\n        data={{ series: seriesToShow, timeRange, structureRev, state: loadingState, annotations }}\n        pluginId=\"timeseries\"\n        title=\"\"\n        width={width}\n        height={height}\n        onChangeTimeRange={onChangeTime}\n        timeZone={timeZone}\n        options={\n          {\n            tooltip: { mode: tooltipDisplayMode, sort: SortOrder.None },\n            legend: { displayMode: LegendDisplayMode.List, placement: 'bottom', calcs: [] },\n          } as TimeSeriesOptions\n        }\n      />\n    </PanelContextProvider>\n  );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n  timeSeriesDisclaimer: css`\n    label: time-series-disclaimer;\n    width: 300px;\n    margin: ${theme.spacing(1)} auto;\n    padding: 10px 0;\n    border-radius: ${theme.spacing(2)};\n    text-align: center;\n    background-color: ${theme.colors.background.primary};\n  `,\n  disclaimerIcon: css`\n    label: disclaimer-icon;\n    color: ${theme.colors.warning.main};\n    margin-right: ${theme.spacing(0.5)};\n  `,\n  showAllTimeSeries: css`\n    label: show-all-time-series;\n    cursor: pointer;\n    color: ${theme.colors.text.link};\n  `,\n});\n","import produce from 'immer';\n\nimport { FieldConfigSource } from '@grafana/data';\nimport { GraphDrawStyle, GraphFieldConfig, StackingMode } from '@grafana/schema';\n\nimport { ExploreGraphStyle } from '../../types';\n\nexport type FieldConfig = FieldConfigSource<GraphFieldConfig>;\n\nexport function applyGraphStyle(config: FieldConfig, style: ExploreGraphStyle): FieldConfig {\n  return produce(config, (draft) => {\n    if (draft.defaults.custom === undefined) {\n      draft.defaults.custom = {};\n    }\n\n    const { custom } = draft.defaults;\n\n    if (custom.stacking === undefined) {\n      custom.stacking = { group: 'A' };\n    }\n\n    switch (style) {\n      case 'lines':\n        custom.drawStyle = GraphDrawStyle.Line;\n        custom.stacking.mode = StackingMode.None;\n        custom.fillOpacity = 0;\n        break;\n      case 'bars':\n        custom.drawStyle = GraphDrawStyle.Bars;\n        custom.stacking.mode = StackingMode.None;\n        custom.fillOpacity = 100;\n        break;\n      case 'points':\n        custom.drawStyle = GraphDrawStyle.Points;\n        custom.stacking.mode = StackingMode.None;\n        custom.fillOpacity = 0;\n        break;\n      case 'stacked_lines':\n        custom.drawStyle = GraphDrawStyle.Line;\n        custom.stacking.mode = StackingMode.Normal;\n        custom.fillOpacity = 100;\n        break;\n      case 'stacked_bars':\n        custom.drawStyle = GraphDrawStyle.Bars;\n        custom.stacking.mode = StackingMode.Normal;\n        custom.fillOpacity = 100;\n        break;\n      default: {\n        // should never happen\n        // NOTE: casting to `never` will cause typescript\n        // to verify that the switch statement checks every possible\n        // enum-value\n        const invalidValue: never = style;\n        throw new Error(`Invalid graph-style: ${invalidValue}`);\n      }\n    }\n  });\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { SelectableValue } from '@grafana/data';\nimport { RadioButtonGroup } from '@grafana/ui';\n\nimport { EXPLORE_GRAPH_STYLES, ExploreGraphStyle } from '../../types';\n\nconst ALL_GRAPH_STYLE_OPTIONS: Array<SelectableValue<ExploreGraphStyle>> = EXPLORE_GRAPH_STYLES.map((style) => ({\n  value: style,\n  // capital-case it and switch `_` to ` `\n  label: style[0].toUpperCase() + style.slice(1).replace(/_/, ' '),\n}));\n\nconst spacing = css({\n  display: 'flex',\n  justifyContent: 'space-between',\n});\n\ntype Props = {\n  graphStyle: ExploreGraphStyle;\n  onChangeGraphStyle: (style: ExploreGraphStyle) => void;\n};\n\nexport function ExploreGraphLabel(props: Props) {\n  const { graphStyle, onChangeGraphStyle } = props;\n  return (\n    <div className={spacing}>\n      Graph\n      <RadioButtonGroup size=\"sm\" options={ALL_GRAPH_STYLE_OPTIONS} value={graphStyle} onChange={onChangeGraphStyle} />\n    </div>\n  );\n}\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nvar styles = {\n    top: {\n        width: '100%',\n        height: '10px',\n        top: '-5px',\n        left: '0px',\n        cursor: 'row-resize',\n    },\n    right: {\n        width: '10px',\n        height: '100%',\n        top: '0px',\n        right: '-5px',\n        cursor: 'col-resize',\n    },\n    bottom: {\n        width: '100%',\n        height: '10px',\n        bottom: '-5px',\n        left: '0px',\n        cursor: 'row-resize',\n    },\n    left: {\n        width: '10px',\n        height: '100%',\n        top: '0px',\n        left: '-5px',\n        cursor: 'col-resize',\n    },\n    topRight: {\n        width: '20px',\n        height: '20px',\n        position: 'absolute',\n        right: '-10px',\n        top: '-10px',\n        cursor: 'ne-resize',\n    },\n    bottomRight: {\n        width: '20px',\n        height: '20px',\n        position: 'absolute',\n        right: '-10px',\n        bottom: '-10px',\n        cursor: 'se-resize',\n    },\n    bottomLeft: {\n        width: '20px',\n        height: '20px',\n        position: 'absolute',\n        left: '-10px',\n        bottom: '-10px',\n        cursor: 'sw-resize',\n    },\n    topLeft: {\n        width: '20px',\n        height: '20px',\n        position: 'absolute',\n        left: '-10px',\n        top: '-10px',\n        cursor: 'nw-resize',\n    },\n};\nvar Resizer = /** @class */ (function (_super) {\n    __extends(Resizer, _super);\n    function Resizer() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this.onMouseDown = function (e) {\n            _this.props.onResizeStart(e, _this.props.direction);\n        };\n        _this.onTouchStart = function (e) {\n            _this.props.onResizeStart(e, _this.props.direction);\n        };\n        return _this;\n    }\n    Resizer.prototype.render = function () {\n        return (React.createElement(\"div\", { className: this.props.className || '', style: __assign(__assign({ position: 'absolute', userSelect: 'none' }, styles[this.props.direction]), (this.props.replaceStyles || {})), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children));\n    };\n    return Resizer;\n}(React.PureComponent));\nexport { Resizer };\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport { Resizer } from './resizer';\nimport memoize from 'fast-memoize';\nvar DEFAULT_SIZE = {\n    width: 'auto',\n    height: 'auto',\n};\nvar clamp = memoize(function (n, min, max) { return Math.max(Math.min(n, max), min); });\nvar snap = memoize(function (n, size) { return Math.round(n / size) * size; });\nvar hasDirection = memoize(function (dir, target) {\n    return new RegExp(dir, 'i').test(target);\n});\n// INFO: In case of window is a Proxy and does not porxy Events correctly, use isTouchEvent & isMouseEvent to distinguish event type instead of `instanceof`.\nvar isTouchEvent = function (event) {\n    return Boolean(event.touches && event.touches.length);\n};\nvar isMouseEvent = function (event) {\n    return Boolean((event.clientX || event.clientX === 0) &&\n        (event.clientY || event.clientY === 0));\n};\nvar findClosestSnap = memoize(function (n, snapArray, snapGap) {\n    if (snapGap === void 0) { snapGap = 0; }\n    var closestGapIndex = snapArray.reduce(function (prev, curr, index) { return (Math.abs(curr - n) < Math.abs(snapArray[prev] - n) ? index : prev); }, 0);\n    var gap = Math.abs(snapArray[closestGapIndex] - n);\n    return snapGap === 0 || gap < snapGap ? snapArray[closestGapIndex] : n;\n});\nvar endsWith = memoize(function (str, searchStr) {\n    return str.substr(str.length - searchStr.length, searchStr.length) === searchStr;\n});\nvar getStringSize = memoize(function (n) {\n    n = n.toString();\n    if (n === 'auto') {\n        return n;\n    }\n    if (endsWith(n, 'px')) {\n        return n;\n    }\n    if (endsWith(n, '%')) {\n        return n;\n    }\n    if (endsWith(n, 'vh')) {\n        return n;\n    }\n    if (endsWith(n, 'vw')) {\n        return n;\n    }\n    if (endsWith(n, 'vmax')) {\n        return n;\n    }\n    if (endsWith(n, 'vmin')) {\n        return n;\n    }\n    return n + \"px\";\n});\nvar getPixelSize = function (size, parentSize, innerWidth, innerHeight) {\n    if (size && typeof size === 'string') {\n        if (endsWith(size, 'px')) {\n            return Number(size.replace('px', ''));\n        }\n        if (endsWith(size, '%')) {\n            var ratio = Number(size.replace('%', '')) / 100;\n            return parentSize * ratio;\n        }\n        if (endsWith(size, 'vw')) {\n            var ratio = Number(size.replace('vw', '')) / 100;\n            return innerWidth * ratio;\n        }\n        if (endsWith(size, 'vh')) {\n            var ratio = Number(size.replace('vh', '')) / 100;\n            return innerHeight * ratio;\n        }\n    }\n    return size;\n};\nvar calculateNewMax = memoize(function (parentSize, innerWidth, innerHeight, maxWidth, maxHeight, minWidth, minHeight) {\n    maxWidth = getPixelSize(maxWidth, parentSize.width, innerWidth, innerHeight);\n    maxHeight = getPixelSize(maxHeight, parentSize.height, innerWidth, innerHeight);\n    minWidth = getPixelSize(minWidth, parentSize.width, innerWidth, innerHeight);\n    minHeight = getPixelSize(minHeight, parentSize.height, innerWidth, innerHeight);\n    return {\n        maxWidth: typeof maxWidth === 'undefined' ? undefined : Number(maxWidth),\n        maxHeight: typeof maxHeight === 'undefined' ? undefined : Number(maxHeight),\n        minWidth: typeof minWidth === 'undefined' ? undefined : Number(minWidth),\n        minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight),\n    };\n});\nvar definedProps = [\n    'as',\n    'style',\n    'className',\n    'grid',\n    'snap',\n    'bounds',\n    'boundsByDirection',\n    'size',\n    'defaultSize',\n    'minWidth',\n    'minHeight',\n    'maxWidth',\n    'maxHeight',\n    'lockAspectRatio',\n    'lockAspectRatioExtraWidth',\n    'lockAspectRatioExtraHeight',\n    'enable',\n    'handleStyles',\n    'handleClasses',\n    'handleWrapperStyle',\n    'handleWrapperClass',\n    'children',\n    'onResizeStart',\n    'onResize',\n    'onResizeStop',\n    'handleComponent',\n    'scale',\n    'resizeRatio',\n    'snapGap',\n];\n// HACK: This class is used to calculate % size.\nvar baseClassName = '__resizable_base__';\nvar Resizable = /** @class */ (function (_super) {\n    __extends(Resizable, _super);\n    function Resizable(props) {\n        var _this = _super.call(this, props) || this;\n        _this.ratio = 1;\n        _this.resizable = null;\n        // For parent boundary\n        _this.parentLeft = 0;\n        _this.parentTop = 0;\n        // For boundary\n        _this.resizableLeft = 0;\n        _this.resizableRight = 0;\n        _this.resizableTop = 0;\n        _this.resizableBottom = 0;\n        // For target boundary\n        _this.targetLeft = 0;\n        _this.targetTop = 0;\n        _this.appendBase = function () {\n            if (!_this.resizable || !_this.window) {\n                return null;\n            }\n            var parent = _this.parentNode;\n            if (!parent) {\n                return null;\n            }\n            var element = _this.window.document.createElement('div');\n            element.style.width = '100%';\n            element.style.height = '100%';\n            element.style.position = 'absolute';\n            element.style.transform = 'scale(0, 0)';\n            element.style.left = '0';\n            element.style.flex = '0 0 100%';\n            if (element.classList) {\n                element.classList.add(baseClassName);\n            }\n            else {\n                element.className += baseClassName;\n            }\n            parent.appendChild(element);\n            return element;\n        };\n        _this.removeBase = function (base) {\n            var parent = _this.parentNode;\n            if (!parent) {\n                return;\n            }\n            parent.removeChild(base);\n        };\n        _this.ref = function (c) {\n            if (c) {\n                _this.resizable = c;\n            }\n        };\n        _this.state = {\n            isResizing: false,\n            width: typeof (_this.propsSize && _this.propsSize.width) === 'undefined'\n                ? 'auto'\n                : _this.propsSize && _this.propsSize.width,\n            height: typeof (_this.propsSize && _this.propsSize.height) === 'undefined'\n                ? 'auto'\n                : _this.propsSize && _this.propsSize.height,\n            direction: 'right',\n            original: {\n                x: 0,\n                y: 0,\n                width: 0,\n                height: 0,\n            },\n            backgroundStyle: {\n                height: '100%',\n                width: '100%',\n                backgroundColor: 'rgba(0,0,0,0)',\n                cursor: 'auto',\n                opacity: 0,\n                position: 'fixed',\n                zIndex: 9999,\n                top: '0',\n                left: '0',\n                bottom: '0',\n                right: '0',\n            },\n            flexBasis: undefined,\n        };\n        _this.onResizeStart = _this.onResizeStart.bind(_this);\n        _this.onMouseMove = _this.onMouseMove.bind(_this);\n        _this.onMouseUp = _this.onMouseUp.bind(_this);\n        return _this;\n    }\n    Object.defineProperty(Resizable.prototype, \"parentNode\", {\n        get: function () {\n            if (!this.resizable) {\n                return null;\n            }\n            return this.resizable.parentNode;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Resizable.prototype, \"window\", {\n        get: function () {\n            if (!this.resizable) {\n                return null;\n            }\n            if (!this.resizable.ownerDocument) {\n                return null;\n            }\n            return this.resizable.ownerDocument.defaultView;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Resizable.prototype, \"propsSize\", {\n        get: function () {\n            return this.props.size || this.props.defaultSize || DEFAULT_SIZE;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Resizable.prototype, \"size\", {\n        get: function () {\n            var width = 0;\n            var height = 0;\n            if (this.resizable && this.window) {\n                var orgWidth = this.resizable.offsetWidth;\n                var orgHeight = this.resizable.offsetHeight;\n                // HACK: Set position `relative` to get parent size.\n                //       This is because when re-resizable set `absolute`, I can not get base width correctly.\n                var orgPosition = this.resizable.style.position;\n                if (orgPosition !== 'relative') {\n                    this.resizable.style.position = 'relative';\n                }\n                // INFO: Use original width or height if set auto.\n                width = this.resizable.style.width !== 'auto' ? this.resizable.offsetWidth : orgWidth;\n                height = this.resizable.style.height !== 'auto' ? this.resizable.offsetHeight : orgHeight;\n                // Restore original position\n                this.resizable.style.position = orgPosition;\n            }\n            return { width: width, height: height };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Resizable.prototype, \"sizeStyle\", {\n        get: function () {\n            var _this = this;\n            var size = this.props.size;\n            var getSize = function (key) {\n                if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') {\n                    return 'auto';\n                }\n                if (_this.propsSize && _this.propsSize[key] && endsWith(_this.propsSize[key].toString(), '%')) {\n                    if (endsWith(_this.state[key].toString(), '%')) {\n                        return _this.state[key].toString();\n                    }\n                    var parentSize = _this.getParentSize();\n                    var value = Number(_this.state[key].toString().replace('px', ''));\n                    var percent = (value / parentSize[key]) * 100;\n                    return percent + \"%\";\n                }\n                return getStringSize(_this.state[key]);\n            };\n            var width = size && typeof size.width !== 'undefined' && !this.state.isResizing\n                ? getStringSize(size.width)\n                : getSize('width');\n            var height = size && typeof size.height !== 'undefined' && !this.state.isResizing\n                ? getStringSize(size.height)\n                : getSize('height');\n            return { width: width, height: height };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Resizable.prototype.getParentSize = function () {\n        if (!this.parentNode) {\n            if (!this.window) {\n                return { width: 0, height: 0 };\n            }\n            return { width: this.window.innerWidth, height: this.window.innerHeight };\n        }\n        var base = this.appendBase();\n        if (!base) {\n            return { width: 0, height: 0 };\n        }\n        // INFO: To calculate parent width with flex layout\n        var wrapChanged = false;\n        var wrap = this.parentNode.style.flexWrap;\n        if (wrap !== 'wrap') {\n            wrapChanged = true;\n            this.parentNode.style.flexWrap = 'wrap';\n            // HACK: Use relative to get parent padding size\n        }\n        base.style.position = 'relative';\n        base.style.minWidth = '100%';\n        base.style.minHeight = '100%';\n        var size = {\n            width: base.offsetWidth,\n            height: base.offsetHeight,\n        };\n        if (wrapChanged) {\n            this.parentNode.style.flexWrap = wrap;\n        }\n        this.removeBase(base);\n        return size;\n    };\n    Resizable.prototype.bindEvents = function () {\n        if (this.window) {\n            this.window.addEventListener('mouseup', this.onMouseUp);\n            this.window.addEventListener('mousemove', this.onMouseMove);\n            this.window.addEventListener('mouseleave', this.onMouseUp);\n            this.window.addEventListener('touchmove', this.onMouseMove, {\n                capture: true,\n                passive: false,\n            });\n            this.window.addEventListener('touchend', this.onMouseUp);\n        }\n    };\n    Resizable.prototype.unbindEvents = function () {\n        if (this.window) {\n            this.window.removeEventListener('mouseup', this.onMouseUp);\n            this.window.removeEventListener('mousemove', this.onMouseMove);\n            this.window.removeEventListener('mouseleave', this.onMouseUp);\n            this.window.removeEventListener('touchmove', this.onMouseMove, true);\n            this.window.removeEventListener('touchend', this.onMouseUp);\n        }\n    };\n    Resizable.prototype.componentDidMount = function () {\n        if (!this.resizable || !this.window) {\n            return;\n        }\n        var computedStyle = this.window.getComputedStyle(this.resizable);\n        this.setState({\n            width: this.state.width || this.size.width,\n            height: this.state.height || this.size.height,\n            flexBasis: computedStyle.flexBasis !== 'auto' ? computedStyle.flexBasis : undefined,\n        });\n    };\n    Resizable.prototype.componentWillUnmount = function () {\n        if (this.window) {\n            this.unbindEvents();\n        }\n    };\n    Resizable.prototype.createSizeForCssProperty = function (newSize, kind) {\n        var propsSize = this.propsSize && this.propsSize[kind];\n        return this.state[kind] === 'auto' &&\n            this.state.original[kind] === newSize &&\n            (typeof propsSize === 'undefined' || propsSize === 'auto')\n            ? 'auto'\n            : newSize;\n    };\n    Resizable.prototype.calculateNewMaxFromBoundary = function (maxWidth, maxHeight) {\n        var boundsByDirection = this.props.boundsByDirection;\n        var direction = this.state.direction;\n        var widthByDirection = boundsByDirection && hasDirection('left', direction);\n        var heightByDirection = boundsByDirection && hasDirection('top', direction);\n        var boundWidth;\n        var boundHeight;\n        if (this.props.bounds === 'parent') {\n            var parent_1 = this.parentNode;\n            if (parent_1) {\n                boundWidth = widthByDirection\n                    ? this.resizableRight - this.parentLeft\n                    : parent_1.offsetWidth + (this.parentLeft - this.resizableLeft);\n                boundHeight = heightByDirection\n                    ? this.resizableBottom - this.parentTop\n                    : parent_1.offsetHeight + (this.parentTop - this.resizableTop);\n            }\n        }\n        else if (this.props.bounds === 'window') {\n            if (this.window) {\n                boundWidth = widthByDirection ? this.resizableRight : this.window.innerWidth - this.resizableLeft;\n                boundHeight = heightByDirection ? this.resizableBottom : this.window.innerHeight - this.resizableTop;\n            }\n        }\n        else if (this.props.bounds) {\n            boundWidth = widthByDirection\n                ? this.resizableRight - this.targetLeft\n                : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft);\n            boundHeight = heightByDirection\n                ? this.resizableBottom - this.targetTop\n                : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop);\n        }\n        if (boundWidth && Number.isFinite(boundWidth)) {\n            maxWidth = maxWidth && maxWidth < boundWidth ? maxWidth : boundWidth;\n        }\n        if (boundHeight && Number.isFinite(boundHeight)) {\n            maxHeight = maxHeight && maxHeight < boundHeight ? maxHeight : boundHeight;\n        }\n        return { maxWidth: maxWidth, maxHeight: maxHeight };\n    };\n    Resizable.prototype.calculateNewSizeFromDirection = function (clientX, clientY) {\n        var scale = this.props.scale || 1;\n        var resizeRatio = this.props.resizeRatio || 1;\n        var _a = this.state, direction = _a.direction, original = _a.original;\n        var _b = this.props, lockAspectRatio = _b.lockAspectRatio, lockAspectRatioExtraHeight = _b.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _b.lockAspectRatioExtraWidth;\n        var newWidth = original.width;\n        var newHeight = original.height;\n        var extraHeight = lockAspectRatioExtraHeight || 0;\n        var extraWidth = lockAspectRatioExtraWidth || 0;\n        if (hasDirection('right', direction)) {\n            newWidth = original.width + ((clientX - original.x) * resizeRatio) / scale;\n            if (lockAspectRatio) {\n                newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;\n            }\n        }\n        if (hasDirection('left', direction)) {\n            newWidth = original.width - ((clientX - original.x) * resizeRatio) / scale;\n            if (lockAspectRatio) {\n                newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;\n            }\n        }\n        if (hasDirection('bottom', direction)) {\n            newHeight = original.height + ((clientY - original.y) * resizeRatio) / scale;\n            if (lockAspectRatio) {\n                newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;\n            }\n        }\n        if (hasDirection('top', direction)) {\n            newHeight = original.height - ((clientY - original.y) * resizeRatio) / scale;\n            if (lockAspectRatio) {\n                newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;\n            }\n        }\n        return { newWidth: newWidth, newHeight: newHeight };\n    };\n    Resizable.prototype.calculateNewSizeFromAspectRatio = function (newWidth, newHeight, max, min) {\n        var _a = this.props, lockAspectRatio = _a.lockAspectRatio, lockAspectRatioExtraHeight = _a.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _a.lockAspectRatioExtraWidth;\n        var computedMinWidth = typeof min.width === 'undefined' ? 10 : min.width;\n        var computedMaxWidth = typeof max.width === 'undefined' || max.width < 0 ? newWidth : max.width;\n        var computedMinHeight = typeof min.height === 'undefined' ? 10 : min.height;\n        var computedMaxHeight = typeof max.height === 'undefined' || max.height < 0 ? newHeight : max.height;\n        var extraHeight = lockAspectRatioExtraHeight || 0;\n        var extraWidth = lockAspectRatioExtraWidth || 0;\n        if (lockAspectRatio) {\n            var extraMinWidth = (computedMinHeight - extraHeight) * this.ratio + extraWidth;\n            var extraMaxWidth = (computedMaxHeight - extraHeight) * this.ratio + extraWidth;\n            var extraMinHeight = (computedMinWidth - extraWidth) / this.ratio + extraHeight;\n            var extraMaxHeight = (computedMaxWidth - extraWidth) / this.ratio + extraHeight;\n            var lockedMinWidth = Math.max(computedMinWidth, extraMinWidth);\n            var lockedMaxWidth = Math.min(computedMaxWidth, extraMaxWidth);\n            var lockedMinHeight = Math.max(computedMinHeight, extraMinHeight);\n            var lockedMaxHeight = Math.min(computedMaxHeight, extraMaxHeight);\n            newWidth = clamp(newWidth, lockedMinWidth, lockedMaxWidth);\n            newHeight = clamp(newHeight, lockedMinHeight, lockedMaxHeight);\n        }\n        else {\n            newWidth = clamp(newWidth, computedMinWidth, computedMaxWidth);\n            newHeight = clamp(newHeight, computedMinHeight, computedMaxHeight);\n        }\n        return { newWidth: newWidth, newHeight: newHeight };\n    };\n    Resizable.prototype.setBoundingClientRect = function () {\n        // For parent boundary\n        if (this.props.bounds === 'parent') {\n            var parent_2 = this.parentNode;\n            if (parent_2) {\n                var parentRect = parent_2.getBoundingClientRect();\n                this.parentLeft = parentRect.left;\n                this.parentTop = parentRect.top;\n            }\n        }\n        // For target(html element) boundary\n        if (this.props.bounds && typeof this.props.bounds !== 'string') {\n            var targetRect = this.props.bounds.getBoundingClientRect();\n            this.targetLeft = targetRect.left;\n            this.targetTop = targetRect.top;\n        }\n        // For boundary\n        if (this.resizable) {\n            var _a = this.resizable.getBoundingClientRect(), left = _a.left, top_1 = _a.top, right = _a.right, bottom = _a.bottom;\n            this.resizableLeft = left;\n            this.resizableRight = right;\n            this.resizableTop = top_1;\n            this.resizableBottom = bottom;\n        }\n    };\n    Resizable.prototype.onResizeStart = function (event, direction) {\n        if (!this.resizable || !this.window) {\n            return;\n        }\n        var clientX = 0;\n        var clientY = 0;\n        if (event.nativeEvent && isMouseEvent(event.nativeEvent)) {\n            clientX = event.nativeEvent.clientX;\n            clientY = event.nativeEvent.clientY;\n        }\n        else if (event.nativeEvent && isTouchEvent(event.nativeEvent)) {\n            clientX = event.nativeEvent.touches[0].clientX;\n            clientY = event.nativeEvent.touches[0].clientY;\n        }\n        if (this.props.onResizeStart) {\n            if (this.resizable) {\n                var startResize = this.props.onResizeStart(event, direction, this.resizable);\n                if (startResize === false) {\n                    return;\n                }\n            }\n        }\n        // Fix #168\n        if (this.props.size) {\n            if (typeof this.props.size.height !== 'undefined' && this.props.size.height !== this.state.height) {\n                this.setState({ height: this.props.size.height });\n            }\n            if (typeof this.props.size.width !== 'undefined' && this.props.size.width !== this.state.width) {\n                this.setState({ width: this.props.size.width });\n            }\n        }\n        // For lockAspectRatio case\n        this.ratio =\n            typeof this.props.lockAspectRatio === 'number' ? this.props.lockAspectRatio : this.size.width / this.size.height;\n        var flexBasis;\n        var computedStyle = this.window.getComputedStyle(this.resizable);\n        if (computedStyle.flexBasis !== 'auto') {\n            var parent_3 = this.parentNode;\n            if (parent_3) {\n                var dir = this.window.getComputedStyle(parent_3).flexDirection;\n                this.flexDir = dir.startsWith('row') ? 'row' : 'column';\n                flexBasis = computedStyle.flexBasis;\n            }\n        }\n        // For boundary\n        this.setBoundingClientRect();\n        this.bindEvents();\n        var state = {\n            original: {\n                x: clientX,\n                y: clientY,\n                width: this.size.width,\n                height: this.size.height,\n            },\n            isResizing: true,\n            backgroundStyle: __assign(__assign({}, this.state.backgroundStyle), { cursor: this.window.getComputedStyle(event.target).cursor || 'auto' }),\n            direction: direction,\n            flexBasis: flexBasis,\n        };\n        this.setState(state);\n    };\n    Resizable.prototype.onMouseMove = function (event) {\n        if (!this.state.isResizing || !this.resizable || !this.window) {\n            return;\n        }\n        if (this.window.TouchEvent && isTouchEvent(event)) {\n            try {\n                event.preventDefault();\n                event.stopPropagation();\n            }\n            catch (e) {\n                // Ignore on fail\n            }\n        }\n        var _a = this.props, maxWidth = _a.maxWidth, maxHeight = _a.maxHeight, minWidth = _a.minWidth, minHeight = _a.minHeight;\n        var clientX = isTouchEvent(event) ? event.touches[0].clientX : event.clientX;\n        var clientY = isTouchEvent(event) ? event.touches[0].clientY : event.clientY;\n        var _b = this.state, direction = _b.direction, original = _b.original, width = _b.width, height = _b.height;\n        var parentSize = this.getParentSize();\n        var max = calculateNewMax(parentSize, this.window.innerWidth, this.window.innerHeight, maxWidth, maxHeight, minWidth, minHeight);\n        maxWidth = max.maxWidth;\n        maxHeight = max.maxHeight;\n        minWidth = max.minWidth;\n        minHeight = max.minHeight;\n        // Calculate new size\n        var _c = this.calculateNewSizeFromDirection(clientX, clientY), newHeight = _c.newHeight, newWidth = _c.newWidth;\n        // Calculate max size from boundary settings\n        var boundaryMax = this.calculateNewMaxFromBoundary(maxWidth, maxHeight);\n        if (this.props.snap && this.props.snap.x) {\n            newWidth = findClosestSnap(newWidth, this.props.snap.x, this.props.snapGap);\n        }\n        if (this.props.snap && this.props.snap.y) {\n            newHeight = findClosestSnap(newHeight, this.props.snap.y, this.props.snapGap);\n        }\n        // Calculate new size from aspect ratio\n        var newSize = this.calculateNewSizeFromAspectRatio(newWidth, newHeight, { width: boundaryMax.maxWidth, height: boundaryMax.maxHeight }, { width: minWidth, height: minHeight });\n        newWidth = newSize.newWidth;\n        newHeight = newSize.newHeight;\n        if (this.props.grid) {\n            var newGridWidth = snap(newWidth, this.props.grid[0]);\n            var newGridHeight = snap(newHeight, this.props.grid[1]);\n            var gap = this.props.snapGap || 0;\n            newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;\n            newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;\n        }\n        var delta = {\n            width: newWidth - original.width,\n            height: newHeight - original.height,\n        };\n        if (width && typeof width === 'string') {\n            if (endsWith(width, '%')) {\n                var percent = (newWidth / parentSize.width) * 100;\n                newWidth = percent + \"%\";\n            }\n            else if (endsWith(width, 'vw')) {\n                var vw = (newWidth / this.window.innerWidth) * 100;\n                newWidth = vw + \"vw\";\n            }\n            else if (endsWith(width, 'vh')) {\n                var vh = (newWidth / this.window.innerHeight) * 100;\n                newWidth = vh + \"vh\";\n            }\n        }\n        if (height && typeof height === 'string') {\n            if (endsWith(height, '%')) {\n                var percent = (newHeight / parentSize.height) * 100;\n                newHeight = percent + \"%\";\n            }\n            else if (endsWith(height, 'vw')) {\n                var vw = (newHeight / this.window.innerWidth) * 100;\n                newHeight = vw + \"vw\";\n            }\n            else if (endsWith(height, 'vh')) {\n                var vh = (newHeight / this.window.innerHeight) * 100;\n                newHeight = vh + \"vh\";\n            }\n        }\n        var newState = {\n            width: this.createSizeForCssProperty(newWidth, 'width'),\n            height: this.createSizeForCssProperty(newHeight, 'height'),\n        };\n        if (this.flexDir === 'row') {\n            newState.flexBasis = newState.width;\n        }\n        else if (this.flexDir === 'column') {\n            newState.flexBasis = newState.height;\n        }\n        this.setState(newState);\n        if (this.props.onResize) {\n            this.props.onResize(event, direction, this.resizable, delta);\n        }\n    };\n    Resizable.prototype.onMouseUp = function (event) {\n        var _a = this.state, isResizing = _a.isResizing, direction = _a.direction, original = _a.original;\n        if (!isResizing || !this.resizable) {\n            return;\n        }\n        var delta = {\n            width: this.size.width - original.width,\n            height: this.size.height - original.height,\n        };\n        if (this.props.onResizeStop) {\n            this.props.onResizeStop(event, direction, this.resizable, delta);\n        }\n        if (this.props.size) {\n            this.setState(this.props.size);\n        }\n        this.unbindEvents();\n        this.setState({\n            isResizing: false,\n            backgroundStyle: __assign(__assign({}, this.state.backgroundStyle), { cursor: 'auto' }),\n        });\n    };\n    Resizable.prototype.updateSize = function (size) {\n        this.setState({ width: size.width, height: size.height });\n    };\n    Resizable.prototype.renderResizer = function () {\n        var _this = this;\n        var _a = this.props, enable = _a.enable, handleStyles = _a.handleStyles, handleClasses = _a.handleClasses, handleWrapperStyle = _a.handleWrapperStyle, handleWrapperClass = _a.handleWrapperClass, handleComponent = _a.handleComponent;\n        if (!enable) {\n            return null;\n        }\n        var resizers = Object.keys(enable).map(function (dir) {\n            if (enable[dir] !== false) {\n                return (React.createElement(Resizer, { key: dir, direction: dir, onResizeStart: _this.onResizeStart, replaceStyles: handleStyles && handleStyles[dir], className: handleClasses && handleClasses[dir] }, handleComponent && handleComponent[dir] ? handleComponent[dir] : null));\n            }\n            return null;\n        });\n        // #93 Wrap the resize box in span (will not break 100% width/height)\n        return (React.createElement(\"div\", { className: handleWrapperClass, style: handleWrapperStyle }, resizers));\n    };\n    Resizable.prototype.render = function () {\n        var _this = this;\n        var extendsProps = Object.keys(this.props).reduce(function (acc, key) {\n            if (definedProps.indexOf(key) !== -1) {\n                return acc;\n            }\n            acc[key] = _this.props[key];\n            return acc;\n        }, {});\n        var style = __assign(__assign(__assign({ position: 'relative', userSelect: this.state.isResizing ? 'none' : 'auto' }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: 'border-box', flexShrink: 0 });\n        if (this.state.flexBasis) {\n            style.flexBasis = this.state.flexBasis;\n        }\n        var Wrapper = this.props.as || 'div';\n        return (React.createElement(Wrapper, __assign({ ref: this.ref, style: style, className: this.props.className }, extendsProps),\n            this.state.isResizing && React.createElement(\"div\", { style: this.state.backgroundStyle }),\n            this.props.children,\n            this.renderResizer()));\n    };\n    Resizable.defaultProps = {\n        as: 'div',\n        onResizeStart: function () { },\n        onResize: function () { },\n        onResizeStop: function () { },\n        enable: {\n            top: true,\n            right: true,\n            bottom: true,\n            left: true,\n            topRight: true,\n            bottomRight: true,\n            bottomLeft: true,\n            topLeft: true,\n        },\n        style: {},\n        grid: [1, 1],\n        lockAspectRatio: false,\n        lockAspectRatioExtraWidth: 0,\n        lockAspectRatioExtraHeight: 0,\n        scale: 1,\n        resizeRatio: 1,\n        snapGap: 0,\n    };\n    return Resizable;\n}(React.PureComponent));\nexport { Resizable };\n","// Libraries\nimport { css, cx, keyframes } from '@emotion/css';\nimport { Resizable, ResizeCallback } from 're-resizable';\nimport React from 'react';\n\n// Services & Utils\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { stylesFactory, useTheme2 } from '@grafana/ui';\n\n// Types\n\nconst drawerSlide = keyframes`\n  0% {\n    transform: translateY(400px);\n  }\n\n  100% {\n    transform: translateY(0px);\n  }\n`;\n\nconst getStyles = stylesFactory((theme: GrafanaTheme2) => {\n  return {\n    container: css`\n      position: fixed !important;\n      bottom: 0;\n      background: ${theme.colors.background.primary};\n      border-top: 1px solid ${theme.colors.border.weak};\n      margin: ${theme.spacing(0, -2, 0, -2)};\n      box-shadow: ${theme.shadows.z3};\n      z-index: ${theme.zIndex.sidemenu};\n    `,\n    drawerActive: css`\n      opacity: 1;\n      animation: 0.5s ease-out ${drawerSlide};\n    `,\n    rzHandle: css`\n      background: ${theme.colors.secondary.main};\n      transition: 0.3s background ease-in-out;\n      position: relative;\n      width: 200px !important;\n      height: 7px !important;\n      left: calc(50% - 100px) !important;\n      top: -4px !important;\n      cursor: grab;\n      border-radius: 4px;\n      &:hover {\n        background: ${theme.colors.secondary.shade};\n      }\n    `,\n  };\n});\n\nexport interface Props {\n  width: number;\n  children: React.ReactNode;\n  onResize?: ResizeCallback;\n}\n\nexport function ExploreDrawer(props: Props) {\n  const { width, children, onResize } = props;\n  const theme = useTheme2();\n  const styles = getStyles(theme);\n  const drawerWidth = `${width + 31.5}px`;\n\n  return (\n    <Resizable\n      className={cx(styles.container, styles.drawerActive)}\n      defaultSize={{ width: drawerWidth, height: '400px' }}\n      handleClasses={{ top: styles.rzHandle }}\n      enable={{\n        top: true,\n        right: false,\n        bottom: false,\n        left: false,\n        topRight: false,\n        bottomRight: false,\n        bottomLeft: false,\n        topLeft: false,\n      }}\n      maxHeight=\"100vh\"\n      maxWidth={drawerWidth}\n      minWidth={drawerWidth}\n      onResize={onResize}\n    >\n      {children}\n    </Resizable>\n  );\n}\n","import React from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { TimeZone } from '@grafana/data';\nimport { TabbedContainer, TabConfig } from '@grafana/ui';\nimport { ExploreDrawer } from 'app/features/explore/ExploreDrawer';\nimport { InspectDataTab } from 'app/features/inspector/InspectDataTab';\nimport { InspectErrorTab } from 'app/features/inspector/InspectErrorTab';\nimport { InspectJSONTab } from 'app/features/inspector/InspectJSONTab';\nimport { InspectStatsTab } from 'app/features/inspector/InspectStatsTab';\nimport { QueryInspector } from 'app/features/inspector/QueryInspector';\nimport { StoreState, ExploreItemState, ExploreId } from 'app/types';\n\nimport { runQueries } from './state/query';\n\ninterface DispatchProps {\n  width: number;\n  exploreId: ExploreId;\n  timeZone: TimeZone;\n  onClose: () => void;\n}\n\ntype Props = DispatchProps & ConnectedProps<typeof connector>;\n\nexport function ExploreQueryInspector(props: Props) {\n  const { loading, width, onClose, queryResponse, timeZone } = props;\n  const dataFrames = queryResponse?.series || [];\n  const error = queryResponse?.error;\n\n  const statsTab: TabConfig = {\n    label: 'Stats',\n    value: 'stats',\n    icon: 'chart-line',\n    content: <InspectStatsTab data={queryResponse!} timeZone={queryResponse?.request?.timezone as TimeZone} />,\n  };\n\n  const jsonTab: TabConfig = {\n    label: 'JSON',\n    value: 'json',\n    icon: 'brackets-curly',\n    content: <InspectJSONTab data={queryResponse} onClose={onClose} />,\n  };\n\n  const dataTab: TabConfig = {\n    label: 'Data',\n    value: 'data',\n    icon: 'database',\n    content: (\n      <InspectDataTab\n        data={dataFrames}\n        isLoading={loading}\n        options={{ withTransforms: false, withFieldConfig: false }}\n        timeZone={timeZone}\n      />\n    ),\n  };\n\n  const queryTab: TabConfig = {\n    label: 'Query',\n    value: 'query',\n    icon: 'info-circle',\n    content: <QueryInspector data={dataFrames} onRefreshQuery={() => props.runQueries(props.exploreId)} />,\n  };\n\n  const tabs = [statsTab, queryTab, jsonTab, dataTab];\n  if (error) {\n    const errorTab: TabConfig = {\n      label: 'Error',\n      value: 'error',\n      icon: 'exclamation-triangle',\n      content: <InspectErrorTab error={error} />,\n    };\n    tabs.push(errorTab);\n  }\n  return (\n    <ExploreDrawer width={width} onResize={() => {}}>\n      <TabbedContainer tabs={tabs} onClose={onClose} closeIconTooltip=\"Close query inspector\" />\n    </ExploreDrawer>\n  );\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: ExploreId }) {\n  const explore = state.explore;\n  const item: ExploreItemState = explore[exploreId]!;\n  const { loading, queryResponse } = item;\n\n  return {\n    loading,\n    queryResponse,\n  };\n}\n\nconst mapDispatchToProps = {\n  runQueries,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default connector(ExploreQueryInspector);\n","import React from 'react';\n\nimport { Tooltip, ToolbarButton } from '@grafana/ui';\n\ninterface TimeSyncButtonProps {\n  isSynced: boolean;\n  onClick: () => void;\n}\n\nexport function TimeSyncButton(props: TimeSyncButtonProps) {\n  const { onClick, isSynced } = props;\n\n  const syncTimesTooltip = () => {\n    const { isSynced } = props;\n    const tooltip = isSynced ? 'Unsync all views' : 'Sync all views to this time range';\n    return <>{tooltip}</>;\n  };\n\n  return (\n    <Tooltip content={syncTimesTooltip} placement=\"bottom\">\n      <ToolbarButton\n        icon=\"link\"\n        variant={isSynced ? 'active' : 'default'}\n        aria-label={isSynced ? 'Synced times' : 'Unsynced times'}\n        onClick={onClick}\n      />\n    </Tooltip>\n  );\n}\n","import React, { Component } from 'react';\n\nimport { TimeRange, TimeZone, RawTimeRange, dateTimeForTimeZone, dateMath } from '@grafana/data';\nimport { TimePickerWithHistory } from 'app/core/components/TimePicker/TimePickerWithHistory';\nimport { getShiftedTimeRange, getZoomedTimeRange } from 'app/core/utils/timePicker';\nimport { ExploreId } from 'app/types';\n\nimport { TimeSyncButton } from './TimeSyncButton';\n\nexport interface Props {\n  exploreId: ExploreId;\n  hideText?: boolean;\n  range: TimeRange;\n  timeZone: TimeZone;\n  fiscalYearStartMonth: number;\n  splitted: boolean;\n  syncedTimes: boolean;\n  onChangeTimeSync: () => void;\n  onChangeTime: (range: RawTimeRange) => void;\n  onChangeTimeZone: (timeZone: TimeZone) => void;\n  onChangeFiscalYearStartMonth: (fiscalYearStartMonth: number) => void;\n}\n\nexport class ExploreTimeControls extends Component<Props> {\n  onMoveTimePicker = (direction: number) => {\n    const { range, onChangeTime, timeZone } = this.props;\n    const { from, to } = getShiftedTimeRange(direction, range);\n    const nextTimeRange = {\n      from: dateTimeForTimeZone(timeZone, from),\n      to: dateTimeForTimeZone(timeZone, to),\n    };\n\n    onChangeTime(nextTimeRange);\n  };\n\n  onMoveForward = () => this.onMoveTimePicker(1);\n  onMoveBack = () => this.onMoveTimePicker(-1);\n\n  onChangeTimePicker = (timeRange: TimeRange) => {\n    const adjustedFrom = dateMath.isMathString(timeRange.raw.from) ? timeRange.raw.from : timeRange.from;\n    const adjustedTo = dateMath.isMathString(timeRange.raw.to) ? timeRange.raw.to : timeRange.to;\n\n    this.props.onChangeTime({\n      from: adjustedFrom,\n      to: adjustedTo,\n    });\n  };\n\n  onZoom = () => {\n    const { range, onChangeTime, timeZone } = this.props;\n    const { from, to } = getZoomedTimeRange(range, 2);\n    const nextTimeRange = {\n      from: dateTimeForTimeZone(timeZone, from),\n      to: dateTimeForTimeZone(timeZone, to),\n    };\n\n    onChangeTime(nextTimeRange);\n  };\n\n  render() {\n    const {\n      range,\n      timeZone,\n      fiscalYearStartMonth,\n      splitted,\n      syncedTimes,\n      onChangeTimeSync,\n      hideText,\n      onChangeTimeZone,\n      onChangeFiscalYearStartMonth,\n    } = this.props;\n    const timeSyncButton = splitted ? <TimeSyncButton onClick={onChangeTimeSync} isSynced={syncedTimes} /> : undefined;\n    const timePickerCommonProps = {\n      value: range,\n      timeZone,\n      fiscalYearStartMonth,\n      onMoveBackward: this.onMoveBack,\n      onMoveForward: this.onMoveForward,\n      onZoom: this.onZoom,\n      hideText,\n    };\n\n    return (\n      <TimePickerWithHistory\n        {...timePickerCommonProps}\n        timeSyncButton={timeSyncButton}\n        isSynced={syncedTimes}\n        onChange={this.onChangeTimePicker}\n        onChangeTimeZone={onChangeTimeZone}\n        onChangeFiscalYearStartMonth={onChangeFiscalYearStartMonth}\n      />\n    );\n  }\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport { Tooltip, ButtonGroup, ToolbarButton } from '@grafana/ui';\n\ntype LiveTailButtonProps = {\n  splitted: boolean;\n  start: () => void;\n  stop: () => void;\n  pause: () => void;\n  resume: () => void;\n  isLive: boolean;\n  isPaused: boolean;\n};\n\nexport function LiveTailButton(props: LiveTailButtonProps) {\n  const { start, pause, resume, isLive, isPaused, stop, splitted } = props;\n  const buttonVariant = isLive && !isPaused ? 'active' : 'default';\n  const onClickMain = isLive ? (isPaused ? resume : pause) : start;\n\n  return (\n    <ButtonGroup>\n      <Tooltip\n        content={isLive && !isPaused ? <>Pause the live stream</> : <>Start live stream your logs</>}\n        placement=\"bottom\"\n      >\n        <ToolbarButton\n          iconOnly={splitted}\n          variant={buttonVariant}\n          icon={!isLive || isPaused ? 'play' : 'pause'}\n          onClick={onClickMain}\n        >\n          {isLive && isPaused ? 'Paused' : 'Live'}\n        </ToolbarButton>\n      </Tooltip>\n\n      <CSSTransition\n        mountOnEnter={true}\n        unmountOnExit={true}\n        timeout={100}\n        in={isLive}\n        classNames={{\n          enter: styles.stopButtonEnter,\n          enterActive: styles.stopButtonEnterActive,\n          exit: styles.stopButtonExit,\n          exitActive: styles.stopButtonExitActive,\n        }}\n      >\n        <Tooltip content={<>Stop and exit the live stream</>} placement=\"bottom\">\n          <ToolbarButton variant={buttonVariant} onClick={stop} icon=\"square-shape\" />\n        </Tooltip>\n      </CSSTransition>\n    </ButtonGroup>\n  );\n}\n\nconst styles = {\n  stopButtonEnter: css`\n    label: stopButtonEnter;\n    width: 0;\n    opacity: 0;\n    overflow: hidden;\n  `,\n  stopButtonEnterActive: css`\n    label: stopButtonEnterActive;\n    opacity: 1;\n    width: 32px;\n  `,\n  stopButtonExit: css`\n    label: stopButtonExit;\n    width: 32px;\n    opacity: 1;\n    overflow: hidden;\n  `,\n  stopButtonExitActive: css`\n    label: stopButtonExitActive;\n    opacity: 0;\n    width: 0;\n  `,\n};\n","import React from 'react';\n\nimport { RefreshPicker, defaultIntervals } from '@grafana/ui';\nimport { getTimeSrv } from 'app/features/dashboard/services/TimeSrv';\n\nexport type Props = {\n  isSmall?: boolean;\n  loading: boolean;\n  isLive: boolean;\n  onRun: (loading: boolean) => void;\n  refreshInterval?: string;\n  onChangeRefreshInterval: (interval: string) => void;\n  showDropdown: boolean;\n};\n\nexport function RunButton(props: Props) {\n  const { isSmall, loading, onRun, onChangeRefreshInterval, refreshInterval, showDropdown, isLive } = props;\n  const intervals = getTimeSrv().getValidIntervals(defaultIntervals);\n  let text: string | undefined = loading ? 'Cancel' : 'Run query';\n  let tooltip = '';\n  let width = '108px';\n\n  if (isLive) {\n    return null;\n  }\n\n  if (isSmall) {\n    tooltip = text;\n    text = undefined;\n    width = '35px';\n  }\n\n  return (\n    <RefreshPicker\n      onIntervalChanged={onChangeRefreshInterval}\n      value={refreshInterval}\n      isLoading={loading}\n      text={text}\n      tooltip={tooltip}\n      intervals={intervals}\n      isLive={isLive}\n      onRefresh={() => onRun(loading)}\n      noIntervalPicker={!showDropdown}\n      primary={true}\n      width={width}\n    />\n  );\n}\n","import React, { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { RefreshPicker } from '@grafana/ui';\n\nimport { ExploreId } from '../../types';\n\nimport { setPausedStateAction, runQueries } from './state/query';\nimport { changeRefreshInterval } from './state/time';\n\n/**\n * Hook that gives you all the functions needed to control the live tailing.\n */\nexport function useLiveTailControls(exploreId: ExploreId) {\n  const dispatch = useDispatch();\n\n  const pause = useCallback(() => {\n    dispatch(setPausedStateAction({ exploreId, isPaused: true }));\n  }, [exploreId, dispatch]);\n\n  const resume = useCallback(() => {\n    dispatch(setPausedStateAction({ exploreId, isPaused: false }));\n  }, [exploreId, dispatch]);\n\n  const stop = useCallback(() => {\n    // We need to pause here first because there is transition where we are not live but live logs are still shown\n    // to cross fade with the normal view. This will prevent reordering of the logs in the live view during the\n    // transition.\n    pause();\n\n    // TODO referencing this from perspective of refresh picker when there is designated button for it now is not\n    //  great. Needs a bit of refactoring.\n    dispatch(changeRefreshInterval(exploreId, RefreshPicker.offOption.value));\n    dispatch(runQueries(exploreId));\n  }, [exploreId, dispatch, pause]);\n\n  const start = useCallback(() => {\n    dispatch(changeRefreshInterval(exploreId, RefreshPicker.liveOption.value));\n  }, [exploreId, dispatch]);\n\n  return {\n    pause,\n    resume,\n    stop,\n    start,\n  };\n}\n\ntype Props = {\n  exploreId: ExploreId;\n  children: (controls: ReturnType<typeof useLiveTailControls>) => React.ReactElement;\n};\n\n/**\n * If you can't use the hook you can use this as a render prop pattern.\n */\nexport function LiveTailControls(props: Props) {\n  const controls = useLiveTailControls(props.exploreId);\n  return props.children(controls);\n}\n","import React, { lazy, PureComponent, RefObject, Suspense } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { DataSourceInstanceSettings, RawTimeRange } from '@grafana/data';\nimport { config, DataSourcePicker } from '@grafana/runtime';\nimport { PageToolbar, SetInterval, ToolbarButton, ToolbarButtonRow } from '@grafana/ui';\nimport { createAndCopyShortLink } from 'app/core/utils/shortLinks';\nimport { ExploreId } from 'app/types/explore';\nimport { StoreState } from 'app/types/store';\n\nimport { DashNavButton } from '../dashboard/components/DashNav/DashNavButton';\nimport { updateFiscalYearStartMonthForSession, updateTimeZoneForSession } from '../profile/state/reducers';\nimport { getFiscalYearStartMonth, getTimeZone } from '../profile/state/selectors';\n\nimport { ExploreTimeControls } from './ExploreTimeControls';\nimport { LiveTailButton } from './LiveTailButton';\nimport { RunButton } from './RunButton';\nimport { changeDatasource } from './state/datasource';\nimport { splitClose, splitOpen } from './state/main';\nimport { cancelQueries, runQueries } from './state/query';\nimport { isSplit } from './state/selectors';\nimport { syncTimes, changeRefreshInterval } from './state/time';\nimport { LiveTailControls } from './useLiveTailControls';\n\nconst AddToDashboard = lazy(() =>\n  import('./AddToDashboard').then(({ AddToDashboard }) => ({ default: AddToDashboard }))\n);\n\ninterface OwnProps {\n  exploreId: ExploreId;\n  onChangeTime: (range: RawTimeRange, changedByScanner?: boolean) => void;\n  topOfExploreViewRef?: RefObject<HTMLDivElement>;\n}\n\ntype Props = OwnProps & ConnectedProps<typeof connector>;\n\nclass UnConnectedExploreToolbar extends PureComponent<Props> {\n  onChangeDatasource = async (dsSettings: DataSourceInstanceSettings) => {\n    this.props.changeDatasource(this.props.exploreId, dsSettings.uid, { importQueries: true });\n  };\n\n  onRunQuery = (loading = false) => {\n    const { runQueries, cancelQueries, exploreId } = this.props;\n    if (loading) {\n      return cancelQueries(exploreId);\n    } else {\n      return runQueries(exploreId);\n    }\n  };\n\n  onChangeRefreshInterval = (item: string) => {\n    const { changeRefreshInterval, exploreId } = this.props;\n    changeRefreshInterval(exploreId, item);\n  };\n\n  onChangeTimeSync = () => {\n    const { syncTimes, exploreId } = this.props;\n    syncTimes(exploreId);\n  };\n\n  render() {\n    const {\n      datasourceMissing,\n      closeSplit,\n      exploreId,\n      loading,\n      range,\n      timeZone,\n      fiscalYearStartMonth,\n      splitted,\n      syncedTimes,\n      refreshInterval,\n      onChangeTime,\n      split,\n      hasLiveOption,\n      isLive,\n      isPaused,\n      containerWidth,\n      onChangeTimeZone,\n      onChangeFiscalYearStartMonth,\n      topOfExploreViewRef,\n    } = this.props;\n\n    const showSmallDataSourcePicker = (splitted ? containerWidth < 700 : containerWidth < 800) || false;\n    const showSmallTimePicker = splitted || containerWidth < 1210;\n\n    return (\n      <div ref={topOfExploreViewRef}>\n        <PageToolbar\n          aria-label=\"Explore toolbar\"\n          title={exploreId === ExploreId.left ? 'Explore' : undefined}\n          pageIcon={exploreId === ExploreId.left ? 'compass' : undefined}\n          leftItems={[\n            exploreId === ExploreId.left && (\n              <DashNavButton\n                key=\"share\"\n                tooltip=\"Copy shortened link\"\n                icon=\"share-alt\"\n                onClick={() => createAndCopyShortLink(window.location.href)}\n                aria-label=\"Copy shortened link\"\n              />\n            ),\n            !datasourceMissing && (\n              <DataSourcePicker\n                key={`${exploreId}-ds-picker`}\n                onChange={this.onChangeDatasource}\n                current={this.props.datasourceName}\n                hideTextValue={showSmallDataSourcePicker}\n                width={showSmallDataSourcePicker ? 8 : undefined}\n              />\n            ),\n          ].filter(Boolean)}\n        >\n          <ToolbarButtonRow>\n            {!splitted ? (\n              <ToolbarButton title=\"Split\" onClick={() => split()} icon=\"columns\" disabled={isLive}>\n                Split\n              </ToolbarButton>\n            ) : (\n              <ToolbarButton title=\"Close split pane\" onClick={() => closeSplit(exploreId)} icon=\"times\">\n                Close\n              </ToolbarButton>\n            )}\n\n            {config.featureToggles.explore2Dashboard && (\n              <Suspense fallback={null}>\n                <AddToDashboard exploreId={exploreId} />\n              </Suspense>\n            )}\n\n            {!isLive && (\n              <ExploreTimeControls\n                exploreId={exploreId}\n                range={range}\n                timeZone={timeZone}\n                fiscalYearStartMonth={fiscalYearStartMonth}\n                onChangeTime={onChangeTime}\n                splitted={splitted}\n                syncedTimes={syncedTimes}\n                onChangeTimeSync={this.onChangeTimeSync}\n                hideText={showSmallTimePicker}\n                onChangeTimeZone={onChangeTimeZone}\n                onChangeFiscalYearStartMonth={onChangeFiscalYearStartMonth}\n              />\n            )}\n\n            <RunButton\n              refreshInterval={refreshInterval}\n              onChangeRefreshInterval={this.onChangeRefreshInterval}\n              isSmall={splitted || showSmallTimePicker}\n              isLive={isLive}\n              loading={loading || (isLive && !isPaused)}\n              onRun={this.onRunQuery}\n              showDropdown={!isLive}\n            />\n\n            {refreshInterval && <SetInterval func={this.onRunQuery} interval={refreshInterval} loading={loading} />}\n\n            {hasLiveOption && (\n              <LiveTailControls exploreId={exploreId}>\n                {(controls) => (\n                  <LiveTailButton\n                    splitted={splitted}\n                    isLive={isLive}\n                    isPaused={isPaused}\n                    start={controls.start}\n                    pause={controls.pause}\n                    resume={controls.resume}\n                    stop={controls.stop}\n                  />\n                )}\n              </LiveTailControls>\n            )}\n          </ToolbarButtonRow>\n        </PageToolbar>\n      </div>\n    );\n  }\n}\n\nconst mapStateToProps = (state: StoreState, { exploreId }: OwnProps) => {\n  const { syncedTimes } = state.explore;\n  const exploreItem = state.explore[exploreId]!;\n  const { datasourceInstance, datasourceMissing, range, refreshInterval, loading, isLive, isPaused, containerWidth } =\n    exploreItem;\n\n  const hasLiveOption = !!datasourceInstance?.meta?.streaming;\n\n  return {\n    datasourceMissing,\n    datasourceName: datasourceInstance?.name,\n    loading,\n    range,\n    timeZone: getTimeZone(state.user),\n    fiscalYearStartMonth: getFiscalYearStartMonth(state.user),\n    splitted: isSplit(state),\n    refreshInterval,\n    hasLiveOption,\n    isLive,\n    isPaused,\n    syncedTimes,\n    containerWidth,\n  };\n};\n\nconst mapDispatchToProps = {\n  changeDatasource,\n  changeRefreshInterval,\n  cancelQueries,\n  runQueries,\n  closeSplit: splitClose,\n  split: splitOpen,\n  syncTimes,\n  onChangeTimeZone: updateTimeZoneForSession,\n  onChangeFiscalYearStartMonth: updateFiscalYearStartMonthForSession,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport const ExploreToolbar = connector(UnConnectedExploreToolbar);\n","import { useEffect, useRef } from 'react';\nvar useInterval = function (callback, delay) {\n    var savedCallback = useRef(function () { });\n    useEffect(function () {\n        savedCallback.current = callback;\n    });\n    useEffect(function () {\n        if (delay !== null) {\n            var interval_1 = setInterval(function () { return savedCallback.current(); }, delay || 0);\n            return function () { return clearInterval(interval_1); };\n        }\n        return undefined;\n    }, [delay]);\n};\nexport default useInterval;\n","import React, { FC } from 'react';\n\nimport { toDuration } from '@grafana/data';\n\nexport interface TimeProps {\n  timeInMs: number;\n  className?: string;\n  humanize?: boolean;\n}\n\nexport const Time: FC<TimeProps> = ({ timeInMs, className, humanize }) => {\n  return <span className={`elapsed-time ${className}`}>{formatTime(timeInMs, humanize)}</span>;\n};\n\nconst formatTime = (timeInMs: number, humanize = false): string => {\n  const inSeconds = timeInMs / 1000;\n\n  if (!humanize) {\n    return `${inSeconds.toFixed(1)}s`;\n  }\n\n  const duration = toDuration(inSeconds, 'seconds');\n  const hours = duration.hours();\n  const minutes = duration.minutes();\n  const seconds = duration.seconds();\n\n  if (hours) {\n    return `${hours}h ${minutes}m ${seconds}s`;\n  }\n\n  if (minutes) {\n    return `${minutes}m ${seconds}s`;\n  }\n\n  return `${seconds}s`;\n};\n","import React, { FC, useState, useEffect } from 'react';\nimport { useInterval } from 'react-use';\n\nimport { Time, TimeProps } from './Time';\n\nconst INTERVAL = 150;\n\nexport interface ElapsedTimeProps extends Omit<TimeProps, 'timeInMs'> {\n  // Use this to reset the timer. Any value is allowed just need to be !== from the previous.\n  // Keep in mind things like [] !== [] or {} !== {}.\n  resetKey?: any;\n}\n\nexport const ElapsedTime: FC<ElapsedTimeProps> = ({ resetKey, humanize, className }) => {\n  const [elapsed, setElapsed] = useState(0); // the current value of elapsed\n\n  // hook that will schedule a interval and then update the elapsed value on every tick.\n  useInterval(() => setElapsed(elapsed + INTERVAL), INTERVAL);\n  // this effect will only be run when resetKey changes. This will reset the elapsed to 0.\n  useEffect(() => setElapsed(0), [resetKey]);\n\n  return <Time timeInMs={elapsed} className={className} humanize={humanize} />;\n};\n","import { css, cx } from '@emotion/css';\nimport React, { PureComponent } from 'react';\nimport tinycolor from 'tinycolor2';\n\nimport { LogRowModel, TimeZone, dateTimeFormat, GrafanaTheme2 } from '@grafana/data';\nimport { LogMessageAnsi, getLogRowStyles, Icon, Button, Themeable2, withTheme2 } from '@grafana/ui';\n\nimport { ElapsedTime } from './ElapsedTime';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n  logsRowsLive: css`\n    label: logs-rows-live;\n    font-family: ${theme.typography.fontFamilyMonospace};\n    font-size: ${theme.typography.bodySmall.fontSize};\n    display: flex;\n    flex-flow: column nowrap;\n    height: 60vh;\n    overflow-y: scroll;\n    :first-child {\n      margin-top: auto !important;\n    }\n  `,\n  logsRowFade: css`\n    label: logs-row-fresh;\n    color: ${theme.colors.text};\n    background-color: ${tinycolor(theme.colors.info.transparent).setAlpha(0.25).toString()};\n    animation: fade 1s ease-out 1s 1 normal forwards;\n    @keyframes fade {\n      from {\n        background-color: ${tinycolor(theme.colors.info.transparent).setAlpha(0.25).toString()};\n      }\n      to {\n        background-color: transparent;\n      }\n    }\n  `,\n  logsRowsIndicator: css`\n    font-size: ${theme.typography.h6.fontSize};\n    padding-top: ${theme.spacing(1)};\n    display: flex;\n    align-items: center;\n  `,\n  button: css`\n    margin-right: ${theme.spacing(1)};\n  `,\n  fullWidth: css`\n    width: 100%;\n  `,\n});\n\nexport interface Props extends Themeable2 {\n  logRows?: LogRowModel[];\n  timeZone: TimeZone;\n  stopLive: () => void;\n  onPause: () => void;\n  onResume: () => void;\n  isPaused: boolean;\n}\n\ninterface State {\n  logRowsToRender?: LogRowModel[];\n}\n\nclass LiveLogs extends PureComponent<Props, State> {\n  private liveEndDiv: HTMLDivElement | null = null;\n  private scrollContainerRef = React.createRef<HTMLTableSectionElement>();\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      logRowsToRender: props.logRows,\n    };\n  }\n\n  static getDerivedStateFromProps(nextProps: Props, state: State) {\n    if (!nextProps.isPaused) {\n      return {\n        // We update what we show only if not paused. We keep any background subscriptions running and keep updating\n        // our state, but we do not show the updates, this allows us start again showing correct result after resuming\n        // without creating a gap in the log results.\n        logRowsToRender: nextProps.logRows,\n      };\n    } else {\n      return null;\n    }\n  }\n\n  /**\n   * Handle pausing when user scrolls up so that we stop resetting his position to the bottom when new row arrives.\n   * We do not need to throttle it here much, adding new rows should be throttled/buffered itself in the query epics\n   * and after you pause we remove the handler and add it after you manually resume, so this should not be fired often.\n   */\n  onScroll = (event: React.SyntheticEvent) => {\n    const { isPaused, onPause } = this.props;\n    const { scrollTop, clientHeight, scrollHeight } = event.currentTarget;\n    const distanceFromBottom = scrollHeight - (scrollTop + clientHeight);\n    if (distanceFromBottom >= 5 && !isPaused) {\n      onPause();\n    }\n  };\n\n  rowsToRender = () => {\n    const { isPaused } = this.props;\n    let { logRowsToRender: rowsToRender = [] } = this.state;\n    if (!isPaused) {\n      // A perf optimisation here. Show just 100 rows when streaming and full length when the streaming is paused.\n      rowsToRender = rowsToRender.slice(-100);\n    }\n    return rowsToRender;\n  };\n\n  render() {\n    const { theme, timeZone, onPause, onResume, isPaused } = this.props;\n    const styles = getStyles(theme);\n    const { logsRow, logsRowLocalTime, logsRowMessage } = getLogRowStyles(theme);\n\n    return (\n      <div>\n        <table className={styles.fullWidth}>\n          <tbody\n            onScroll={isPaused ? undefined : this.onScroll}\n            className={cx(['logs-rows', styles.logsRowsLive])}\n            ref={this.scrollContainerRef}\n          >\n            {this.rowsToRender().map((row: LogRowModel) => {\n              return (\n                <tr className={cx(logsRow, styles.logsRowFade)} key={row.uid}>\n                  <td className={cx(logsRowLocalTime)}>{dateTimeFormat(row.timeEpochMs, { timeZone })}</td>\n                  <td className={cx(logsRowMessage)}>{row.hasAnsi ? <LogMessageAnsi value={row.raw} /> : row.entry}</td>\n                </tr>\n              );\n            })}\n            <tr\n              ref={(element) => {\n                this.liveEndDiv = element;\n                // This is triggered on every update so on every new row. It keeps the view scrolled at the bottom by\n                // default.\n                if (this.liveEndDiv && !isPaused) {\n                  this.scrollContainerRef.current?.scrollTo(0, this.scrollContainerRef.current.scrollHeight);\n                }\n              }}\n            />\n          </tbody>\n        </table>\n        <div className={styles.logsRowsIndicator}>\n          <Button variant=\"secondary\" onClick={isPaused ? onResume : onPause} className={styles.button}>\n            <Icon name={isPaused ? 'play' : 'pause'} />\n            &nbsp;\n            {isPaused ? 'Resume' : 'Pause'}\n          </Button>\n          <Button variant=\"secondary\" onClick={this.props.stopLive} className={styles.button}>\n            <Icon name=\"square-shape\" size=\"lg\" type=\"mono\" />\n            &nbsp; Exit live mode\n          </Button>\n          {isPaused || (\n            <span>\n              Last line received: <ElapsedTime resetKey={this.props.logRows} humanize={true} /> ago\n            </span>\n          )}\n        </div>\n      </div>\n    );\n  }\n}\n\nexport const LiveLogsWithTheme = withTheme2(LiveLogs);\n","import { css } from '@emotion/css';\nimport React, { memo } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { useStyles2 } from '@grafana/ui';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n  metaContainer: css`\n    flex: 1;\n    color: ${theme.colors.text.secondary};\n    margin-bottom: ${theme.spacing(2)};\n    min-width: 30%;\n    display: flex;\n    flex-wrap: wrap;\n  `,\n  metaItem: css`\n    margin-right: ${theme.spacing(2)};\n    margin-top: ${theme.spacing(0.5)};\n    display: flex;\n    align-items: baseline;\n\n    .logs-meta-item__error {\n      color: ${theme.colors.error.text};\n    }\n  `,\n  metaLabel: css`\n    margin-right: calc(${theme.spacing(2)} / 2);\n    font-size: ${theme.typography.bodySmall.fontSize};\n    font-weight: ${theme.typography.fontWeightMedium};\n  `,\n  metaValue: css`\n    font-family: ${theme.typography.fontFamilyMonospace};\n    font-size: ${theme.typography.bodySmall.fontSize};\n  `,\n});\n\nexport interface MetaItemProps {\n  label?: string;\n  value: string | JSX.Element;\n}\n\nconst MetaInfoItem = memo(function MetaInfoItem(props: MetaItemProps) {\n  const style = useStyles2(getStyles);\n  const { label, value } = props;\n\n  return (\n    <div data-testid=\"meta-info-text-item\" className={style.metaItem}>\n      {label && <span className={style.metaLabel}>{label}:</span>}\n      <span className={style.metaValue}>{value}</span>\n    </div>\n  );\n});\n\ninterface MetaInfoTextProps {\n  metaItems: MetaItemProps[];\n}\n\nexport const MetaInfoText = memo(function MetaInfoText(props: MetaInfoTextProps) {\n  const style = useStyles2(getStyles);\n  const { metaItems } = props;\n\n  return (\n    <div className={style.metaContainer} data-testid=\"meta-info-text\">\n      {metaItems.map((item, index) => (\n        <MetaInfoItem key={`${index}-${item.label}`} label={item.label} value={item.value} />\n      ))}\n    </div>\n  );\n});\n","import React from 'react';\n\nimport { LogsDedupStrategy, LogsMetaItem, LogsMetaKind, LogRowModel } from '@grafana/data';\nimport { Button, Tooltip, Icon, LogLabels } from '@grafana/ui';\nimport { MAX_CHARACTERS } from '@grafana/ui/src/components/Logs/LogRowMessage';\n\nimport { MetaInfoText, MetaItemProps } from './MetaInfoText';\n\nexport type Props = {\n  meta: LogsMetaItem[];\n  dedupStrategy: LogsDedupStrategy;\n  dedupCount: number;\n  showDetectedFields: string[];\n  hasUnescapedContent: boolean;\n  forceEscape: boolean;\n  logRows: LogRowModel[];\n  onEscapeNewlines: () => void;\n  clearDetectedFields: () => void;\n};\n\nexport const LogsMetaRow: React.FC<Props> = React.memo(\n  ({\n    meta,\n    dedupStrategy,\n    dedupCount,\n    showDetectedFields,\n    clearDetectedFields,\n    hasUnescapedContent,\n    forceEscape,\n    onEscapeNewlines,\n    logRows,\n  }) => {\n    const logsMetaItem: Array<LogsMetaItem | MetaItemProps> = [...meta];\n\n    // Add deduplication info\n    if (dedupStrategy !== LogsDedupStrategy.none) {\n      logsMetaItem.push({\n        label: 'Dedup count',\n        value: dedupCount,\n        kind: LogsMetaKind.Number,\n      });\n    }\n    // Add info about limit for highlighting\n    if (logRows.some((r) => r.entry.length > MAX_CHARACTERS)) {\n      logsMetaItem.push({\n        label: 'Info',\n        value: 'Logs with more than 100,000 characters could not be parsed and highlighted',\n        kind: LogsMetaKind.String,\n      });\n    }\n\n    // Add detected fields info\n    if (showDetectedFields?.length > 0) {\n      logsMetaItem.push(\n        {\n          label: 'Showing only detected fields',\n          value: renderMetaItem(showDetectedFields, LogsMetaKind.LabelsMap),\n        },\n        {\n          label: '',\n          value: (\n            <Button variant=\"secondary\" size=\"sm\" onClick={clearDetectedFields}>\n              Show all detected fields\n            </Button>\n          ),\n        }\n      );\n    }\n\n    // Add unescaped content info\n    if (hasUnescapedContent) {\n      logsMetaItem.push({\n        label: 'Your logs might have incorrectly escaped content',\n        value: (\n          <Tooltip\n            content=\"Fix incorrectly escaped newline and tab sequences in log lines. Manually review the results to confirm that the replacements are correct.\"\n            placement=\"right\"\n          >\n            <Button variant=\"secondary\" size=\"sm\" onClick={onEscapeNewlines}>\n              <span>{forceEscape ? 'Remove escaping' : 'Escape newlines'}&nbsp;</span>\n              <Icon name=\"exclamation-triangle\" className=\"muted\" size=\"sm\" />\n            </Button>\n          </Tooltip>\n        ),\n      });\n    }\n\n    return (\n      <>\n        {logsMetaItem && (\n          <MetaInfoText\n            metaItems={logsMetaItem.map((item) => {\n              return {\n                label: item.label,\n                value: 'kind' in item ? renderMetaItem(item.value, item.kind) : item.value,\n              };\n            })}\n          />\n        )}\n      </>\n    );\n  }\n);\n\nLogsMetaRow.displayName = 'LogsMetaRow';\n\nfunction renderMetaItem(value: any, kind: LogsMetaKind) {\n  if (kind === LogsMetaKind.LabelsMap) {\n    return (\n      <span className=\"logs-meta-item__labels\">\n        <LogLabels labels={value} />\n      </span>\n    );\n  } else if (kind === LogsMetaKind.Error) {\n    return <span className=\"logs-meta-item__error\">{value}</span>;\n  }\n  return value;\n}\n","import { css, cx } from '@emotion/css';\nimport React from 'react';\n\nimport { dateTimeFormat, systemDateFormats, TimeZone, AbsoluteTimeRange, GrafanaTheme2 } from '@grafana/data';\nimport { CustomScrollbar, Spinner, useTheme2 } from '@grafana/ui';\n\nimport { LogsPage } from './LogsNavigation';\n\ntype Props = {\n  pages: LogsPage[];\n  currentPageIndex: number;\n  oldestLogsFirst: boolean;\n  timeZone: TimeZone;\n  loading: boolean;\n  changeTime: (range: AbsoluteTimeRange) => void;\n};\n\nexport function LogsNavigationPages({\n  pages,\n  currentPageIndex,\n  oldestLogsFirst,\n  timeZone,\n  loading,\n  changeTime,\n}: Props) {\n  const formatTime = (time: number) => {\n    return `${dateTimeFormat(time, {\n      format: systemDateFormats.interval.second,\n      timeZone: timeZone,\n    })}`;\n  };\n\n  const createPageContent = (page: LogsPage, index: number) => {\n    if (currentPageIndex === index && loading) {\n      return <Spinner />;\n    }\n    const topContent = formatTime(oldestLogsFirst ? page.logsRange.from : page.logsRange.to);\n    const bottomContent = formatTime(oldestLogsFirst ? page.logsRange.to : page.logsRange.from);\n    return `${topContent} — ${bottomContent}`;\n  };\n\n  const theme = useTheme2();\n  const styles = getStyles(theme, loading);\n\n  return (\n    <CustomScrollbar autoHide>\n      <div className={styles.pagesWrapper} data-testid=\"logsNavigationPages\">\n        <div className={styles.pagesContainer}>\n          {pages.map((page: LogsPage, index: number) => (\n            <div\n              data-testid={`page${index + 1}`}\n              className={styles.page}\n              key={page.queryRange.to}\n              onClick={() => !loading && changeTime({ from: page.queryRange.from, to: page.queryRange.to })}\n            >\n              <div className={cx(styles.line, { selectedBg: currentPageIndex === index })} />\n              <div className={cx(styles.time, { selectedText: currentPageIndex === index })}>\n                {createPageContent(page, index)}\n              </div>\n            </div>\n          ))}\n        </div>\n      </div>\n    </CustomScrollbar>\n  );\n}\n\nconst getStyles = (theme: GrafanaTheme2, loading: boolean) => {\n  return {\n    pagesWrapper: css`\n      height: 100%;\n      padding-left: ${theme.spacing(0.5)};\n      display: flex;\n      flex-direction: column;\n      overflow-y: scroll;\n      &::after {\n        content: '';\n        display: block;\n        background: repeating-linear-gradient(\n          135deg,\n          ${theme.colors.background.primary},\n          ${theme.colors.background.primary} 5px,\n          ${theme.colors.background.secondary} 5px,\n          ${theme.colors.background.secondary} 15px\n        );\n        width: 3px;\n        height: inherit;\n        margin-bottom: 8px;\n      }\n    `,\n    pagesContainer: css`\n      display: flex;\n      padding: 0;\n      flex-direction: column;\n    `,\n    page: css`\n      display: flex;\n      margin: ${theme.spacing(2)} 0;\n      cursor: ${loading ? 'auto' : 'pointer'};\n      white-space: normal;\n      .selectedBg {\n        background: ${theme.colors.primary.main};\n      }\n      .selectedText {\n        color: ${theme.colors.primary.main};\n      }\n    `,\n    line: css`\n      width: 3px;\n      height: 100%;\n      align-items: center;\n      background: ${theme.colors.text.secondary};\n    `,\n    time: css`\n      width: 60px;\n      min-height: 80px;\n      font-size: ${theme.v1.typography.size.sm};\n      padding-left: ${theme.spacing(0.5)};\n      display: flex;\n      align-items: center;\n    `,\n  };\n};\n","import { css } from '@emotion/css';\nimport { isEqual } from 'lodash';\nimport React, { memo, useState, useEffect, useRef } from 'react';\n\nimport { LogsSortOrder, AbsoluteTimeRange, TimeZone, DataQuery, GrafanaTheme2 } from '@grafana/data';\nimport { Button, Icon, Spinner, useTheme2 } from '@grafana/ui';\n\nimport { LogsNavigationPages } from './LogsNavigationPages';\n\ntype Props = {\n  absoluteRange: AbsoluteTimeRange;\n  timeZone: TimeZone;\n  queries: DataQuery[];\n  loading: boolean;\n  visibleRange: AbsoluteTimeRange;\n  logsSortOrder?: LogsSortOrder | null;\n  onChangeTime: (range: AbsoluteTimeRange) => void;\n  scrollToTopLogs: () => void;\n  addResultsToCache: () => void;\n  clearCache: () => void;\n};\n\nexport type LogsPage = {\n  logsRange: AbsoluteTimeRange;\n  queryRange: AbsoluteTimeRange;\n};\n\nfunction LogsNavigation({\n  absoluteRange,\n  logsSortOrder,\n  timeZone,\n  loading,\n  onChangeTime,\n  scrollToTopLogs,\n  visibleRange,\n  queries,\n  clearCache,\n  addResultsToCache,\n}: Props) {\n  const [pages, setPages] = useState<LogsPage[]>([]);\n  const [currentPageIndex, setCurrentPageIndex] = useState(0);\n\n  // These refs are to determine, if we want to clear up logs navigation when totally new query is run\n  const expectedQueriesRef = useRef<DataQuery[]>();\n  const expectedRangeRef = useRef<AbsoluteTimeRange>();\n  // This ref is to store range span for future queres based on firstly selected time range\n  // e.g. if last 5 min selected, always run 5 min range\n  const rangeSpanRef = useRef(0);\n\n  const oldestLogsFirst = logsSortOrder === LogsSortOrder.Ascending;\n  const onFirstPage = oldestLogsFirst ? currentPageIndex === pages.length - 1 : currentPageIndex === 0;\n  const onLastPage = oldestLogsFirst ? currentPageIndex === 0 : currentPageIndex === pages.length - 1;\n  const theme = useTheme2();\n  const styles = getStyles(theme, oldestLogsFirst, loading);\n\n  // Main effect to set pages and index\n  useEffect(() => {\n    const newPage = { logsRange: visibleRange, queryRange: absoluteRange };\n    let newPages: LogsPage[] = [];\n    // We want to start new pagination if queries change or if absolute range is different than expected\n    if (!isEqual(expectedRangeRef.current, absoluteRange) || !isEqual(expectedQueriesRef.current, queries)) {\n      clearCache();\n      setPages([newPage]);\n      setCurrentPageIndex(0);\n      expectedQueriesRef.current = queries;\n      rangeSpanRef.current = absoluteRange.to - absoluteRange.from;\n    } else {\n      setPages((pages) => {\n        // Remove duplicates with new query\n        newPages = pages.filter((page) => !isEqual(newPage.queryRange, page.queryRange));\n        // Sort pages based on logsOrder so they visually align with displayed logs\n        newPages = [...newPages, newPage].sort((a, b) => sortPages(a, b, logsSortOrder));\n        // Set new pages\n\n        return newPages;\n      });\n\n      // Set current page index\n      const index = newPages.findIndex((page) => page.queryRange.to === absoluteRange.to);\n      setCurrentPageIndex(index);\n    }\n    addResultsToCache();\n  }, [visibleRange, absoluteRange, logsSortOrder, queries, clearCache, addResultsToCache]);\n\n  useEffect(() => {\n    clearCache();\n    // We can't enforce the eslint rule here because we only want to run when component is mounted.\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  const changeTime = ({ from, to }: AbsoluteTimeRange) => {\n    expectedRangeRef.current = { from, to };\n    onChangeTime({ from, to });\n  };\n\n  const sortPages = (a: LogsPage, b: LogsPage, logsSortOrder?: LogsSortOrder | null) => {\n    if (logsSortOrder === LogsSortOrder.Ascending) {\n      return a.queryRange.to > b.queryRange.to ? 1 : -1;\n    }\n    return a.queryRange.to > b.queryRange.to ? -1 : 1;\n  };\n\n  const olderLogsButton = (\n    <Button\n      data-testid=\"olderLogsButton\"\n      className={styles.navButton}\n      variant=\"secondary\"\n      onClick={() => {\n        //If we are not on the last page, use next page's range\n        if (!onLastPage) {\n          const indexChange = oldestLogsFirst ? -1 : 1;\n          changeTime({\n            from: pages[currentPageIndex + indexChange].queryRange.from,\n            to: pages[currentPageIndex + indexChange].queryRange.to,\n          });\n        } else {\n          //If we are on the last page, create new range\n          changeTime({ from: visibleRange.from - rangeSpanRef.current, to: visibleRange.from });\n        }\n      }}\n      disabled={loading}\n    >\n      <div className={styles.navButtonContent}>\n        {loading ? <Spinner /> : <Icon name={oldestLogsFirst ? 'angle-up' : 'angle-down'} size=\"lg\" />}\n        Older logs\n      </div>\n    </Button>\n  );\n\n  const newerLogsButton = (\n    <Button\n      data-testid=\"newerLogsButton\"\n      className={styles.navButton}\n      variant=\"secondary\"\n      onClick={() => {\n        //If we are not on the first page, use previous page's range\n        if (!onFirstPage) {\n          const indexChange = oldestLogsFirst ? 1 : -1;\n          changeTime({\n            from: pages[currentPageIndex + indexChange].queryRange.from,\n            to: pages[currentPageIndex + indexChange].queryRange.to,\n          });\n        }\n        //If we are on the first page, button is disabled and we do nothing\n      }}\n      disabled={loading || onFirstPage}\n    >\n      <div className={styles.navButtonContent}>\n        {loading && <Spinner />}\n        {onFirstPage || loading ? null : <Icon name={oldestLogsFirst ? 'angle-down' : 'angle-up'} size=\"lg\" />}\n        {onFirstPage ? 'Start of range' : 'Newer logs'}\n      </div>\n    </Button>\n  );\n\n  return (\n    <div className={styles.navContainer}>\n      {oldestLogsFirst ? olderLogsButton : newerLogsButton}\n      <LogsNavigationPages\n        pages={pages}\n        currentPageIndex={currentPageIndex}\n        oldestLogsFirst={oldestLogsFirst}\n        timeZone={timeZone}\n        loading={loading}\n        changeTime={changeTime}\n      />\n      {oldestLogsFirst ? newerLogsButton : olderLogsButton}\n      <Button\n        data-testid=\"scrollToTop\"\n        className={styles.scrollToTopButton}\n        variant=\"secondary\"\n        onClick={scrollToTopLogs}\n        title=\"Scroll to top\"\n      >\n        <Icon name=\"arrow-up\" size=\"lg\" />\n      </Button>\n    </div>\n  );\n}\n\nexport default memo(LogsNavigation);\n\nconst getStyles = (theme: GrafanaTheme2, oldestLogsFirst: boolean, loading: boolean) => {\n  return {\n    navContainer: css`\n      max-height: 95vh;\n      display: flex;\n      flex-direction: column;\n      justify-content: ${oldestLogsFirst ? 'flex-start' : 'space-between'};\n      position: sticky;\n      top: ${theme.spacing(2)};\n      right: 0;\n    `,\n    navButton: css`\n      width: 58px;\n      height: 68px;\n      display: flex;\n      flex-direction: column;\n      justify-content: center;\n      align-items: center;\n      line-height: 1;\n    `,\n    navButtonContent: css`\n      display: flex;\n      flex-direction: column;\n      justify-content: center;\n      align-items: center;\n      width: 100%;\n      height: 100%;\n      white-space: normal;\n    `,\n    scrollToTopButton: css`\n      width: 40px;\n      height: 40px;\n      display: flex;\n      flex-direction: column;\n      justify-content: center;\n      align-items: center;\n      margin-top: ${theme.spacing(1)};\n    `,\n  };\n};\n","import { css } from '@emotion/css';\nimport { capitalize } from 'lodash';\nimport memoizeOne from 'memoize-one';\nimport React, { PureComponent, createRef } from 'react';\n\nimport {\n  rangeUtil,\n  RawTimeRange,\n  LogLevel,\n  TimeZone,\n  AbsoluteTimeRange,\n  LogsDedupStrategy,\n  LogRowModel,\n  LogsDedupDescription,\n  LogsMetaItem,\n  LogsSortOrder,\n  LinkModel,\n  Field,\n  DataQuery,\n  DataFrame,\n  GrafanaTheme2,\n  LoadingState,\n} from '@grafana/data';\nimport { TooltipDisplayMode } from '@grafana/schema';\nimport {\n  RadioButtonGroup,\n  LogRows,\n  Button,\n  InlineField,\n  InlineFieldRow,\n  InlineSwitch,\n  withTheme2,\n  Themeable2,\n} from '@grafana/ui';\nimport { RowContextOptions } from '@grafana/ui/src/components/Logs/LogRowContextProvider';\nimport { dedupLogRows, filterLogLevels } from 'app/core/logs_model';\nimport store from 'app/core/store';\nimport { ExploreId } from 'app/types/explore';\n\nimport { ExploreGraph } from './ExploreGraph';\nimport { LogsMetaRow } from './LogsMetaRow';\nimport LogsNavigation from './LogsNavigation';\n\nconst SETTINGS_KEYS = {\n  showLabels: 'grafana.explore.logs.showLabels',\n  showTime: 'grafana.explore.logs.showTime',\n  wrapLogMessage: 'grafana.explore.logs.wrapLogMessage',\n  prettifyLogMessage: 'grafana.explore.logs.prettifyLogMessage',\n  logsSortOrder: 'grafana.explore.logs.sortOrder',\n};\n\ninterface Props extends Themeable2 {\n  width: number;\n  logRows: LogRowModel[];\n  logsMeta?: LogsMetaItem[];\n  logsSeries?: DataFrame[];\n  logsQueries?: DataQuery[];\n  visibleRange?: AbsoluteTimeRange;\n  theme: GrafanaTheme2;\n  loading: boolean;\n  loadingState: LoadingState;\n  absoluteRange: AbsoluteTimeRange;\n  timeZone: TimeZone;\n  scanning?: boolean;\n  scanRange?: RawTimeRange;\n  exploreId: ExploreId;\n  showContextToggle?: (row?: LogRowModel) => boolean;\n  onChangeTime: (range: AbsoluteTimeRange) => void;\n  onClickFilterLabel?: (key: string, value: string) => void;\n  onClickFilterOutLabel?: (key: string, value: string) => void;\n  onStartScanning?: () => void;\n  onStopScanning?: () => void;\n  getRowContext?: (row: LogRowModel, options?: RowContextOptions) => Promise<any>;\n  getFieldLinks: (field: Field, rowIndex: number) => Array<LinkModel<Field>>;\n  addResultsToCache: () => void;\n  clearCache: () => void;\n}\n\ninterface State {\n  showLabels: boolean;\n  showTime: boolean;\n  wrapLogMessage: boolean;\n  prettifyLogMessage: boolean;\n  dedupStrategy: LogsDedupStrategy;\n  hiddenLogLevels: LogLevel[];\n  logsSortOrder: LogsSortOrder | null;\n  isFlipping: boolean;\n  showDetectedFields: string[];\n  forceEscape: boolean;\n}\n\nclass UnthemedLogs extends PureComponent<Props, State> {\n  flipOrderTimer?: number;\n  cancelFlippingTimer?: number;\n  topLogsRef = createRef<HTMLDivElement>();\n\n  state: State = {\n    showLabels: store.getBool(SETTINGS_KEYS.showLabels, false),\n    showTime: store.getBool(SETTINGS_KEYS.showTime, true),\n    wrapLogMessage: store.getBool(SETTINGS_KEYS.wrapLogMessage, true),\n    prettifyLogMessage: store.getBool(SETTINGS_KEYS.prettifyLogMessage, false),\n    dedupStrategy: LogsDedupStrategy.none,\n    hiddenLogLevels: [],\n    logsSortOrder: store.get(SETTINGS_KEYS.logsSortOrder) || LogsSortOrder.Descending,\n    isFlipping: false,\n    showDetectedFields: [],\n    forceEscape: false,\n  };\n\n  componentWillUnmount() {\n    if (this.flipOrderTimer) {\n      window.clearTimeout(this.flipOrderTimer);\n    }\n\n    if (this.cancelFlippingTimer) {\n      window.clearTimeout(this.cancelFlippingTimer);\n    }\n  }\n\n  onChangeLogsSortOrder = () => {\n    this.setState({ isFlipping: true });\n    // we are using setTimeout here to make sure that disabled button is rendered before the rendering of reordered logs\n    this.flipOrderTimer = window.setTimeout(() => {\n      this.setState((prevState) => {\n        const newSortOrder =\n          prevState.logsSortOrder === LogsSortOrder.Descending ? LogsSortOrder.Ascending : LogsSortOrder.Descending;\n        store.set(SETTINGS_KEYS.logsSortOrder, newSortOrder);\n        return { logsSortOrder: newSortOrder };\n      });\n    }, 0);\n    this.cancelFlippingTimer = window.setTimeout(() => this.setState({ isFlipping: false }), 1000);\n  };\n\n  onEscapeNewlines = () => {\n    this.setState((prevState) => ({\n      forceEscape: !prevState.forceEscape,\n    }));\n  };\n\n  onChangeDedup = (dedupStrategy: LogsDedupStrategy) => {\n    this.setState({ dedupStrategy });\n  };\n\n  onChangeLabels = (event: React.ChangeEvent<HTMLInputElement>) => {\n    const { target } = event;\n    if (target) {\n      const showLabels = target.checked;\n      this.setState({\n        showLabels,\n      });\n      store.set(SETTINGS_KEYS.showLabels, showLabels);\n    }\n  };\n\n  onChangeTime = (event: React.ChangeEvent<HTMLInputElement>) => {\n    const { target } = event;\n    if (target) {\n      const showTime = target.checked;\n      this.setState({\n        showTime,\n      });\n      store.set(SETTINGS_KEYS.showTime, showTime);\n    }\n  };\n\n  onChangewrapLogMessage = (event: React.ChangeEvent<HTMLInputElement>) => {\n    const { target } = event;\n    if (target) {\n      const wrapLogMessage = target.checked;\n      this.setState({\n        wrapLogMessage,\n      });\n      store.set(SETTINGS_KEYS.wrapLogMessage, wrapLogMessage);\n    }\n  };\n\n  onChangePrettifyLogMessage = (event: React.ChangeEvent<HTMLInputElement>) => {\n    const { target } = event;\n    if (target) {\n      const prettifyLogMessage = target.checked;\n      this.setState({\n        prettifyLogMessage,\n      });\n      store.set(SETTINGS_KEYS.prettifyLogMessage, prettifyLogMessage);\n    }\n  };\n\n  onToggleLogLevel = (hiddenRawLevels: string[]) => {\n    const hiddenLogLevels = hiddenRawLevels.map((level) => LogLevel[level as LogLevel]);\n    this.setState({ hiddenLogLevels });\n  };\n\n  onClickScan = (event: React.SyntheticEvent) => {\n    event.preventDefault();\n    if (this.props.onStartScanning) {\n      this.props.onStartScanning();\n    }\n  };\n\n  onClickStopScan = (event: React.SyntheticEvent) => {\n    event.preventDefault();\n    if (this.props.onStopScanning) {\n      this.props.onStopScanning();\n    }\n  };\n\n  showDetectedField = (key: string) => {\n    const index = this.state.showDetectedFields.indexOf(key);\n\n    if (index === -1) {\n      this.setState((state) => {\n        return {\n          showDetectedFields: state.showDetectedFields.concat(key),\n        };\n      });\n    }\n  };\n\n  hideDetectedField = (key: string) => {\n    const index = this.state.showDetectedFields.indexOf(key);\n    if (index > -1) {\n      this.setState((state) => {\n        return {\n          showDetectedFields: state.showDetectedFields.filter((k) => key !== k),\n        };\n      });\n    }\n  };\n\n  clearDetectedFields = () => {\n    this.setState((state) => {\n      return {\n        showDetectedFields: [],\n      };\n    });\n  };\n\n  checkUnescapedContent = memoizeOne((logRows: LogRowModel[]) => {\n    return !!logRows.some((r) => r.hasUnescapedContent);\n  });\n\n  dedupRows = memoizeOne((logRows: LogRowModel[], dedupStrategy: LogsDedupStrategy) => {\n    const dedupedRows = dedupLogRows(logRows, dedupStrategy);\n    const dedupCount = dedupedRows.reduce((sum, row) => (row.duplicates ? sum + row.duplicates : sum), 0);\n    return { dedupedRows, dedupCount };\n  });\n\n  filterRows = memoizeOne((logRows: LogRowModel[], hiddenLogLevels: LogLevel[]) => {\n    return filterLogLevels(logRows, new Set(hiddenLogLevels));\n  });\n\n  scrollToTopLogs = () => this.topLogsRef.current?.scrollIntoView();\n\n  render() {\n    const {\n      width,\n      logRows,\n      logsMeta,\n      logsSeries,\n      visibleRange,\n      loading = false,\n      loadingState,\n      onClickFilterLabel,\n      onClickFilterOutLabel,\n      timeZone,\n      scanning,\n      scanRange,\n      showContextToggle,\n      absoluteRange,\n      onChangeTime,\n      getFieldLinks,\n      theme,\n      logsQueries,\n      clearCache,\n      addResultsToCache,\n      exploreId,\n    } = this.props;\n\n    const {\n      showLabels,\n      showTime,\n      wrapLogMessage,\n      prettifyLogMessage,\n      dedupStrategy,\n      hiddenLogLevels,\n      logsSortOrder,\n      isFlipping,\n      showDetectedFields,\n      forceEscape,\n    } = this.state;\n\n    const styles = getStyles(theme, wrapLogMessage);\n    const hasData = logRows && logRows.length > 0;\n    const hasUnescapedContent = this.checkUnescapedContent(logRows);\n\n    const filteredLogs = this.filterRows(logRows, hiddenLogLevels);\n    const { dedupedRows, dedupCount } = this.dedupRows(filteredLogs, dedupStrategy);\n\n    const scanText = scanRange ? `Scanning ${rangeUtil.describeTimeRange(scanRange)}` : 'Scanning...';\n    return (\n      <>\n        {logsSeries && logsSeries.length ? (\n          <>\n            <div className={styles.infoText}>\n              This datasource does not support full-range histograms. The graph is based on the logs seen in the\n              response.\n            </div>\n            <ExploreGraph\n              graphStyle=\"lines\"\n              data={logsSeries}\n              height={150}\n              width={width}\n              tooltipDisplayMode={TooltipDisplayMode.Multi}\n              absoluteRange={visibleRange || absoluteRange}\n              timeZone={timeZone}\n              loadingState={loadingState}\n              onChangeTime={onChangeTime}\n              onHiddenSeriesChanged={this.onToggleLogLevel}\n            />\n          </>\n        ) : undefined}\n        <div className={styles.logOptions} ref={this.topLogsRef}>\n          <InlineFieldRow>\n            <InlineField label=\"Time\" className={styles.horizontalInlineLabel} transparent>\n              <InlineSwitch\n                value={showTime}\n                onChange={this.onChangeTime}\n                className={styles.horizontalInlineSwitch}\n                transparent\n                id={`show-time_${exploreId}`}\n              />\n            </InlineField>\n            <InlineField label=\"Unique labels\" className={styles.horizontalInlineLabel} transparent>\n              <InlineSwitch\n                value={showLabels}\n                onChange={this.onChangeLabels}\n                className={styles.horizontalInlineSwitch}\n                transparent\n                id={`unique-labels_${exploreId}`}\n              />\n            </InlineField>\n            <InlineField label=\"Wrap lines\" className={styles.horizontalInlineLabel} transparent>\n              <InlineSwitch\n                value={wrapLogMessage}\n                onChange={this.onChangewrapLogMessage}\n                className={styles.horizontalInlineSwitch}\n                transparent\n                id={`wrap-lines_${exploreId}`}\n              />\n            </InlineField>\n            <InlineField label=\"Prettify JSON\" className={styles.horizontalInlineLabel} transparent>\n              <InlineSwitch\n                value={prettifyLogMessage}\n                onChange={this.onChangePrettifyLogMessage}\n                className={styles.horizontalInlineSwitch}\n                transparent\n                id={`prettify_${exploreId}`}\n              />\n            </InlineField>\n            <InlineField label=\"Dedup\" className={styles.horizontalInlineLabel} transparent>\n              <RadioButtonGroup\n                options={Object.values(LogsDedupStrategy).map((dedupType) => ({\n                  label: capitalize(dedupType),\n                  value: dedupType,\n                  description: LogsDedupDescription[dedupType],\n                }))}\n                value={dedupStrategy}\n                onChange={this.onChangeDedup}\n                className={styles.radioButtons}\n              />\n            </InlineField>\n          </InlineFieldRow>\n          <div>\n            <InlineField label=\"Display results\" className={styles.horizontalInlineLabel} transparent>\n              <RadioButtonGroup\n                disabled={isFlipping}\n                options={[\n                  {\n                    label: 'Newest first',\n                    value: LogsSortOrder.Descending,\n                    description: 'Show results newest to oldest',\n                  },\n                  {\n                    label: 'Oldest first',\n                    value: LogsSortOrder.Ascending,\n                    description: 'Show results oldest to newest',\n                  },\n                ]}\n                value={logsSortOrder}\n                onChange={this.onChangeLogsSortOrder}\n                className={styles.radioButtons}\n              />\n            </InlineField>\n          </div>\n        </div>\n        <LogsMetaRow\n          logRows={logRows}\n          meta={logsMeta || []}\n          dedupStrategy={dedupStrategy}\n          dedupCount={dedupCount}\n          hasUnescapedContent={hasUnescapedContent}\n          forceEscape={forceEscape}\n          showDetectedFields={showDetectedFields}\n          onEscapeNewlines={this.onEscapeNewlines}\n          clearDetectedFields={this.clearDetectedFields}\n        />\n        <div className={styles.logsSection}>\n          <div className={styles.logRows} data-testid=\"logRows\">\n            <LogRows\n              logRows={logRows}\n              deduplicatedRows={dedupedRows}\n              dedupStrategy={dedupStrategy}\n              getRowContext={this.props.getRowContext}\n              onClickFilterLabel={onClickFilterLabel}\n              onClickFilterOutLabel={onClickFilterOutLabel}\n              showContextToggle={showContextToggle}\n              showLabels={showLabels}\n              showTime={showTime}\n              enableLogDetails={true}\n              forceEscape={forceEscape}\n              wrapLogMessage={wrapLogMessage}\n              prettifyLogMessage={prettifyLogMessage}\n              timeZone={timeZone}\n              getFieldLinks={getFieldLinks}\n              logsSortOrder={logsSortOrder}\n              showDetectedFields={showDetectedFields}\n              onClickShowDetectedField={this.showDetectedField}\n              onClickHideDetectedField={this.hideDetectedField}\n            />\n          </div>\n          <LogsNavigation\n            logsSortOrder={logsSortOrder}\n            visibleRange={visibleRange ?? absoluteRange}\n            absoluteRange={absoluteRange}\n            timeZone={timeZone}\n            onChangeTime={onChangeTime}\n            loading={loading}\n            queries={logsQueries ?? []}\n            scrollToTopLogs={this.scrollToTopLogs}\n            addResultsToCache={addResultsToCache}\n            clearCache={clearCache}\n          />\n        </div>\n        {!loading && !hasData && !scanning && (\n          <div className={styles.noData}>\n            No logs found.\n            <Button size=\"xs\" fill=\"text\" onClick={this.onClickScan}>\n              Scan for older logs\n            </Button>\n          </div>\n        )}\n\n        {scanning && (\n          <div className={styles.noData}>\n            <span>{scanText}</span>\n            <Button size=\"xs\" fill=\"text\" onClick={this.onClickStopScan}>\n              Stop scan\n            </Button>\n          </div>\n        )}\n      </>\n    );\n  }\n}\n\nexport const Logs = withTheme2(UnthemedLogs);\n\nconst getStyles = (theme: GrafanaTheme2, wrapLogMessage: boolean) => {\n  return {\n    noData: css`\n      > * {\n        margin-left: 0.5em;\n      }\n    `,\n    logOptions: css`\n      display: flex;\n      justify-content: space-between;\n      align-items: baseline;\n      flex-wrap: wrap;\n      background-color: ${theme.colors.background.primary};\n      padding: ${theme.spacing(1, 2)};\n      border-radius: ${theme.shape.borderRadius()};\n      margin: ${theme.spacing(2, 0, 1)};\n      border: 1px solid ${theme.colors.border.medium};\n    `,\n    headerButton: css`\n      margin: ${theme.spacing(0.5, 0, 0, 1)};\n    `,\n    horizontalInlineLabel: css`\n      > label {\n        margin-right: 0;\n      }\n    `,\n    horizontalInlineSwitch: css`\n      padding: 0 ${theme.spacing(1)} 0 0;\n    `,\n    radioButtons: css`\n      margin: 0;\n    `,\n    logsSection: css`\n      display: flex;\n      flex-direction: row;\n      justify-content: space-between;\n    `,\n    logRows: css`\n      overflow-x: ${wrapLogMessage ? 'unset' : 'scroll'};\n      overflow-y: visible;\n      width: 100%;\n    `,\n    infoText: css`\n      font-size: ${theme.typography.size.sm};\n      color: ${theme.colors.text.secondary};\n    `,\n  };\n};\n","import { css } from '@emotion/css';\nimport memoizeOne from 'memoize-one';\nimport React from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nconst transitionDuration = 500;\n// We add a bit of delay to the transition as another perf optimisation. As at the start we need to render\n// quite a bit of new rows, if we start transition at the same time there can be frame rate drop. This gives time\n// for react to first render them and then do the animation.\nconst transitionDelay = 100;\n\nconst getStyles = memoizeOne(() => {\n  return {\n    logsEnter: css`\n      label: logsEnter;\n      position: absolute;\n      opacity: 0;\n      height: auto;\n      width: 100%;\n    `,\n    logsEnterActive: css`\n      label: logsEnterActive;\n      opacity: 1;\n      transition: opacity ${transitionDuration}ms ease-out ${transitionDelay}ms;\n    `,\n    logsExit: css`\n      label: logsExit;\n      position: absolute;\n      opacity: 1;\n      height: auto;\n      width: 100%;\n    `,\n    logsExitActive: css`\n      label: logsExitActive;\n      opacity: 0;\n      transition: opacity ${transitionDuration}ms ease-out ${transitionDelay}ms;\n    `,\n  };\n});\n\ntype Props = {\n  children: React.ReactNode;\n  visible: boolean;\n};\n\n/**\n * Cross fade transition component that is tied a bit too much to the logs containers so not very useful elsewhere\n * right now.\n */\nexport function LogsCrossFadeTransition(props: Props) {\n  const { visible, children } = props;\n  const styles = getStyles();\n  return (\n    <CSSTransition\n      in={visible}\n      mountOnEnter={true}\n      unmountOnExit={true}\n      timeout={transitionDuration + transitionDelay}\n      classNames={{\n        enter: styles.logsEnter,\n        enterActive: styles.logsEnterActive,\n        exit: styles.logsExit,\n        exitActive: styles.logsExitActive,\n      }}\n    >\n      {children}\n    </CSSTransition>\n  );\n}\n","import { css } from '@emotion/css';\nimport React, { PureComponent } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport {\n  AbsoluteTimeRange,\n  Field,\n  hasLogsContextSupport,\n  LoadingState,\n  LogRowModel,\n  RawTimeRange,\n} from '@grafana/data';\nimport { Collapse } from '@grafana/ui';\nimport { StoreState } from 'app/types';\nimport { ExploreId, ExploreItemState } from 'app/types/explore';\n\nimport { getTimeZone } from '../profile/state/selectors';\n\nimport { LiveLogsWithTheme } from './LiveLogs';\nimport { Logs } from './Logs';\nimport { splitOpen } from './state/main';\nimport { addResultsToCache, clearCache } from './state/query';\nimport { updateTimeRange } from './state/time';\nimport { LiveTailControls } from './useLiveTailControls';\nimport { LogsCrossFadeTransition } from './utils/LogsCrossFadeTransition';\nimport { getFieldLinksForExplore } from './utils/links';\n\ninterface LogsContainerProps extends PropsFromRedux {\n  width: number;\n  exploreId: ExploreId;\n  scanRange?: RawTimeRange;\n  syncedTimes: boolean;\n  loadingState: LoadingState;\n  onClickFilterLabel?: (key: string, value: string) => void;\n  onClickFilterOutLabel?: (key: string, value: string) => void;\n  onStartScanning: () => void;\n  onStopScanning: () => void;\n}\n\nclass LogsContainer extends PureComponent<LogsContainerProps> {\n  onChangeTime = (absoluteRange: AbsoluteTimeRange) => {\n    const { exploreId, updateTimeRange } = this.props;\n    updateTimeRange({ exploreId, absoluteRange });\n  };\n\n  getLogRowContext = async (row: LogRowModel, options?: any): Promise<any> => {\n    const { datasourceInstance } = this.props;\n\n    if (hasLogsContextSupport(datasourceInstance)) {\n      return datasourceInstance.getLogRowContext(row, options);\n    }\n\n    return [];\n  };\n\n  showContextToggle = (row?: LogRowModel): boolean => {\n    const { datasourceInstance } = this.props;\n\n    if (hasLogsContextSupport(datasourceInstance)) {\n      return datasourceInstance.showContextToggle(row);\n    }\n\n    return false;\n  };\n\n  getFieldLinks = (field: Field, rowIndex: number) => {\n    const { splitOpen: splitOpenFn, range } = this.props;\n    return getFieldLinksForExplore({ field, rowIndex, splitOpenFn, range });\n  };\n\n  render() {\n    const {\n      loading,\n      loadingState,\n      logRows,\n      logsMeta,\n      logsSeries,\n      logsQueries,\n      onClickFilterLabel,\n      onClickFilterOutLabel,\n      onStartScanning,\n      onStopScanning,\n      absoluteRange,\n      timeZone,\n      visibleRange,\n      scanning,\n      range,\n      width,\n      isLive,\n      exploreId,\n      addResultsToCache,\n      clearCache,\n    } = this.props;\n\n    if (!logRows) {\n      return null;\n    }\n\n    // We need to override css overflow of divs in Collapse element to enable sticky Logs navigation\n    const styleOverridesForStickyNavigation = css`\n      & > div {\n        overflow: visible;\n        & > div {\n          overflow: visible;\n        }\n      }\n    `;\n\n    return (\n      <>\n        <LogsCrossFadeTransition visible={isLive}>\n          <Collapse label=\"Logs\" loading={false} isOpen>\n            <LiveTailControls exploreId={exploreId}>\n              {(controls) => (\n                <LiveLogsWithTheme\n                  logRows={logRows}\n                  timeZone={timeZone}\n                  stopLive={controls.stop}\n                  isPaused={this.props.isPaused}\n                  onPause={controls.pause}\n                  onResume={controls.resume}\n                />\n              )}\n            </LiveTailControls>\n          </Collapse>\n        </LogsCrossFadeTransition>\n        <LogsCrossFadeTransition visible={!isLive}>\n          <Collapse label=\"Logs\" loading={loading} isOpen className={styleOverridesForStickyNavigation}>\n            <Logs\n              exploreId={exploreId}\n              logRows={logRows}\n              logsMeta={logsMeta}\n              logsSeries={logsSeries}\n              logsQueries={logsQueries}\n              width={width}\n              loading={loading}\n              loadingState={loadingState}\n              onChangeTime={this.onChangeTime}\n              onClickFilterLabel={onClickFilterLabel}\n              onClickFilterOutLabel={onClickFilterOutLabel}\n              onStartScanning={onStartScanning}\n              onStopScanning={onStopScanning}\n              absoluteRange={absoluteRange}\n              visibleRange={visibleRange}\n              timeZone={timeZone}\n              scanning={scanning}\n              scanRange={range.raw}\n              showContextToggle={this.showContextToggle}\n              getRowContext={this.getLogRowContext}\n              getFieldLinks={this.getFieldLinks}\n              addResultsToCache={() => addResultsToCache(exploreId)}\n              clearCache={() => clearCache(exploreId)}\n            />\n          </Collapse>\n        </LogsCrossFadeTransition>\n      </>\n    );\n  }\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: string }) {\n  const explore = state.explore;\n  // @ts-ignore\n  const item: ExploreItemState = explore[exploreId];\n  const {\n    logsResult,\n    loading,\n    scanning,\n    datasourceInstance,\n    isLive,\n    isPaused,\n    range,\n    absoluteRange,\n    logsVolumeDataProvider,\n    logsVolumeData,\n  } = item;\n  const timeZone = getTimeZone(state.user);\n\n  return {\n    loading,\n    logRows: logsResult?.rows,\n    logsMeta: logsResult?.meta,\n    logsSeries: logsResult?.series,\n    logsQueries: logsResult?.queries,\n    visibleRange: logsResult?.visibleRange,\n    scanning,\n    timeZone,\n    datasourceInstance,\n    isLive,\n    isPaused,\n    range,\n    absoluteRange,\n    logsVolumeDataProvider,\n    logsVolumeData,\n  };\n}\n\nconst mapDispatchToProps = {\n  updateTimeRange,\n  splitOpen,\n  addResultsToCache,\n  clearCache,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\ntype PropsFromRedux = ConnectedProps<typeof connector>;\n\nexport default connector(LogsContainer);\n","import { css } from '@emotion/css';\nimport React, { useState } from 'react';\n\nimport { AbsoluteTimeRange, DataQueryError, DataQueryResponse, LoadingState, SplitOpen, TimeZone } from '@grafana/data';\nimport { Alert, Button, Collapse, InlineField, TooltipDisplayMode, useStyles2, useTheme2 } from '@grafana/ui';\n\nimport { ExploreGraph } from './ExploreGraph';\n\ntype Props = {\n  logsVolumeData?: DataQueryResponse;\n  absoluteRange: AbsoluteTimeRange;\n  timeZone: TimeZone;\n  splitOpen: SplitOpen;\n  width: number;\n  onUpdateTimeRange: (timeRange: AbsoluteTimeRange) => void;\n  onLoadLogsVolume: () => void;\n};\n\nconst SHORT_ERROR_MESSAGE_LIMIT = 100;\n\nfunction ErrorAlert(props: { error: DataQueryError }) {\n  const [isOpen, setIsOpen] = useState(false);\n  // generic get-error-message-logic, taken from\n  // /public/app/features/explore/ErrorContainer.tsx\n  const message = props.error.message || props.error.data?.message || '';\n\n  const showButton = !isOpen && message.length > SHORT_ERROR_MESSAGE_LIMIT;\n\n  return (\n    <Alert title=\"Failed to load log volume for this query\" severity=\"warning\">\n      {showButton ? (\n        <Button\n          variant=\"secondary\"\n          size=\"xs\"\n          onClick={() => {\n            setIsOpen(true);\n          }}\n        >\n          Show details\n        </Button>\n      ) : (\n        message\n      )}\n    </Alert>\n  );\n}\n\nexport function LogsVolumePanel(props: Props) {\n  const { width, logsVolumeData, absoluteRange, timeZone, splitOpen, onUpdateTimeRange, onLoadLogsVolume } = props;\n  const theme = useTheme2();\n  const styles = useStyles2(getStyles);\n  const spacing = parseInt(theme.spacing(2).slice(0, -2), 10);\n  const height = 150;\n\n  let LogsVolumePanelContent;\n\n  if (!logsVolumeData) {\n    return null;\n  } else if (logsVolumeData?.error) {\n    return <ErrorAlert error={logsVolumeData?.error} />;\n  } else if (logsVolumeData?.state === LoadingState.Loading) {\n    LogsVolumePanelContent = <span>Log volume is loading...</span>;\n  } else if (logsVolumeData?.data) {\n    if (logsVolumeData.data.length > 0) {\n      LogsVolumePanelContent = (\n        <ExploreGraph\n          graphStyle=\"lines\"\n          loadingState={LoadingState.Done}\n          data={logsVolumeData.data}\n          height={height}\n          width={width - spacing}\n          absoluteRange={absoluteRange}\n          onChangeTime={onUpdateTimeRange}\n          timeZone={timeZone}\n          splitOpenFn={splitOpen}\n          tooltipDisplayMode={TooltipDisplayMode.Multi}\n        />\n      );\n    } else {\n      LogsVolumePanelContent = <span>No volume data.</span>;\n    }\n  }\n\n  const zoomRatio = logsLevelZoomRatio(logsVolumeData, absoluteRange);\n  let zoomLevelInfo;\n\n  if (zoomRatio !== undefined && zoomRatio < 1) {\n    zoomLevelInfo = (\n      <InlineField label=\"Reload log volume\" transparent>\n        <Button size=\"xs\" icon=\"sync\" variant=\"secondary\" onClick={onLoadLogsVolume} id=\"reload-volume\" />\n      </InlineField>\n    );\n  }\n\n  return (\n    <Collapse label=\"Log volume\" isOpen={true} loading={logsVolumeData?.state === LoadingState.Loading}>\n      <div style={{ height }} className={styles.contentContainer}>\n        {LogsVolumePanelContent}\n      </div>\n      <div className={styles.zoomInfoContainer}>{zoomLevelInfo}</div>\n    </Collapse>\n  );\n}\n\nconst getStyles = () => {\n  return {\n    zoomInfoContainer: css`\n      display: flex;\n      justify-content: end;\n      position: absolute;\n      right: 5px;\n      top: 5px;\n    `,\n    contentContainer: css`\n      display: flex;\n      align-items: center;\n      justify-content: center;\n    `,\n  };\n};\n\nfunction logsLevelZoomRatio(\n  logsVolumeData: DataQueryResponse | undefined,\n  selectedTimeRange: AbsoluteTimeRange\n): number | undefined {\n  const dataRange = logsVolumeData && logsVolumeData.data[0] && logsVolumeData.data[0].meta?.custom?.absoluteRange;\n  return dataRange ? (selectedTimeRange.from - selectedTimeRange.to) / (dataRange.from - dataRange.to) : undefined;\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { LinkButton, CallToActionCard, Icon, useTheme2 } from '@grafana/ui';\nimport { contextSrv } from 'app/core/core';\nimport { AccessControlAction } from 'app/types';\n\nexport const NoDataSourceCallToAction = () => {\n  const theme = useTheme2();\n\n  const canCreateDataSource =\n    contextSrv.hasPermission(AccessControlAction.DataSourcesCreate) &&\n    contextSrv.hasPermission(AccessControlAction.DataSourcesWrite);\n\n  const message =\n    'Explore requires at least one data source. Once you have added a data source, you can query it here.';\n  const footer = (\n    <>\n      <Icon name=\"rocket\" />\n      <> ProTip: You can also define data sources through configuration files. </>\n      <a\n        href=\"http://docs.grafana.org/administration/provisioning/#datasources?utm_source=explore\"\n        target=\"_blank\"\n        rel=\"noreferrer\"\n        className=\"text-link\"\n      >\n        Learn more\n      </a>\n    </>\n  );\n\n  const ctaElement = (\n    <LinkButton size=\"lg\" href=\"datasources/new\" icon=\"database\" disabled={!canCreateDataSource}>\n      Add data source\n    </LinkButton>\n  );\n\n  const cardClassName = css`\n    max-width: ${theme.breakpoints.values.lg}px;\n    margin-top: ${theme.spacing(2)};\n    align-self: center;\n  `;\n\n  return (\n    <CallToActionCard callToActionElement={ctaElement} className={cardClassName} footer={footer} message={message} />\n  );\n};\n","import { css } from '@emotion/css';\nimport React from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\nimport { useToggle } from 'react-use';\n\nimport { applyFieldOverrides, DataFrame, GrafanaTheme2 } from '@grafana/data';\nimport { Badge, Collapse, useStyles2, useTheme2 } from '@grafana/ui';\n\nimport { NodeGraph } from '../../plugins/panel/nodeGraph';\nimport { useCategorizeFrames } from '../../plugins/panel/nodeGraph/useCategorizeFrames';\nimport { ExploreId, StoreState } from '../../types';\n\nimport { splitOpen } from './state/main';\nimport { useLinks } from './utils/links';\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n  warningText: css`\n    label: warningText;\n    font-size: ${theme.typography.bodySmall.fontSize};\n    color: ${theme.colors.text.secondary};\n  `,\n});\n\ninterface OwnProps {\n  // Edges and Nodes are separate frames\n  dataFrames: DataFrame[];\n  exploreId: ExploreId;\n  // When showing the node graph together with trace view we do some changes so it works better.\n  withTraceView?: boolean;\n}\n\ntype Props = OwnProps & ConnectedProps<typeof connector>;\n\nexport function UnconnectedNodeGraphContainer(props: Props) {\n  const { dataFrames, range, splitOpen, withTraceView } = props;\n  const getLinks = useLinks(range, splitOpen);\n  const theme = useTheme2();\n  const styles = useStyles2(getStyles);\n\n  // This is implicit dependency that is needed for links to work. At some point when replacing variables in the link\n  // it requires field to have a display property which is added by the overrides even though we don't add any field\n  // overrides in explore.\n  const frames = applyFieldOverrides({\n    fieldConfig: {\n      defaults: {},\n      overrides: [],\n    },\n    data: dataFrames,\n    // We don't need proper replace here as it is only used in getLinks and we use getFieldLinks\n    replaceVariables: (value) => value,\n    theme,\n  });\n\n  const { nodes } = useCategorizeFrames(frames);\n  const [open, toggleOpen] = useToggle(false);\n\n  const countWarning =\n    withTraceView && nodes[0]?.length > 1000 ? (\n      <span className={styles.warningText}> ({nodes[0].length} nodes, can be slow to load)</span>\n    ) : null;\n\n  return (\n    <Collapse\n      label={\n        <span>\n          Node graph{countWarning}{' '}\n          <Badge text={'Beta'} color={'blue'} icon={'rocket'} tooltip={'This visualization is in beta'} />\n        </span>\n      }\n      collapsible={withTraceView}\n      // We allow collapsing this only when it is shown together with trace view.\n      isOpen={withTraceView ? open : true}\n      onToggle={withTraceView ? () => toggleOpen() : undefined}\n    >\n      <div style={{ height: withTraceView ? 500 : 600 }}>\n        <NodeGraph dataFrames={frames} getLinks={getLinks} />\n      </div>\n    </Collapse>\n  );\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: OwnProps) {\n  return {\n    range: state.explore[exploreId]!.range,\n  };\n}\n\nconst mapDispatchToProps = {\n  splitOpen,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\nexport const NodeGraphContainer = connector(UnconnectedNodeGraphContainer);\n","import { createSelector } from '@reduxjs/toolkit';\nimport React, { useCallback, useMemo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { CoreApp, DataQuery } from '@grafana/data';\nimport { getNextRefIdChar } from 'app/core/utils/query';\nimport { ExploreId } from 'app/types/explore';\n\nimport { getDatasourceSrv } from '../plugins/datasource_srv';\nimport { QueryEditorRows } from '../query/components/QueryEditorRows';\n\nimport { runQueries, changeQueriesAction } from './state/query';\nimport { getExploreItemSelector } from './state/selectors';\n\ninterface Props {\n  exploreId: ExploreId;\n}\n\nconst makeSelectors = (exploreId: ExploreId) => {\n  const exploreItemSelector = getExploreItemSelector(exploreId);\n  return {\n    getQueries: createSelector(exploreItemSelector, (s) => s!.queries),\n    getQueryResponse: createSelector(exploreItemSelector, (s) => s!.queryResponse),\n    getHistory: createSelector(exploreItemSelector, (s) => s!.history),\n    getEventBridge: createSelector(exploreItemSelector, (s) => s!.eventBridge),\n    getDatasourceInstanceSettings: createSelector(\n      exploreItemSelector,\n      (s) => getDatasourceSrv().getInstanceSettings(s!.datasourceInstance?.uid)!\n    ),\n  };\n};\n\nexport const QueryRows = ({ exploreId }: Props) => {\n  const dispatch = useDispatch();\n  const { getQueries, getDatasourceInstanceSettings, getQueryResponse, getHistory, getEventBridge } = useMemo(\n    () => makeSelectors(exploreId),\n    [exploreId]\n  );\n\n  const queries = useSelector(getQueries)!;\n  const dsSettings = useSelector(getDatasourceInstanceSettings)!;\n  const queryResponse = useSelector(getQueryResponse)!;\n  const history = useSelector(getHistory);\n  const eventBridge = useSelector(getEventBridge);\n\n  const onRunQueries = useCallback(() => {\n    dispatch(runQueries(exploreId));\n  }, [dispatch, exploreId]);\n\n  const onChange = useCallback(\n    (newQueries: DataQuery[]) => {\n      dispatch(changeQueriesAction({ queries: newQueries, exploreId }));\n\n      // if we are removing a query we want to run the remaining ones\n      if (newQueries.length < queries.length) {\n        onRunQueries();\n      }\n    },\n    [dispatch, exploreId, onRunQueries, queries]\n  );\n\n  const onAddQuery = useCallback(\n    (query: DataQuery) => {\n      onChange([...queries, { ...query, refId: getNextRefIdChar(queries) }]);\n    },\n    [onChange, queries]\n  );\n\n  return (\n    <QueryEditorRows\n      dsSettings={dsSettings}\n      queries={queries}\n      onQueriesChange={onChange}\n      onAddQuery={onAddQuery}\n      onRunQueries={onRunQueries}\n      data={queryResponse}\n      app={CoreApp.Explore}\n      history={history}\n      eventBus={eventBridge}\n    />\n  );\n};\n","import React, { FC, CSSProperties } from 'react';\nimport Transition, { ExitHandler } from 'react-transition-group/Transition';\n\ninterface Props {\n  duration: number;\n  children: JSX.Element;\n  in: boolean;\n  unmountOnExit?: boolean;\n  onExited?: ExitHandler<HTMLDivElement>;\n}\n\nexport const FadeIn: FC<Props> = (props) => {\n  const defaultStyle: CSSProperties = {\n    transition: `opacity ${props.duration}ms linear`,\n    opacity: 0,\n  };\n\n  const transitionStyles: { [str: string]: CSSProperties } = {\n    exited: { opacity: 0, display: 'none' },\n    entering: { opacity: 0 },\n    entered: { opacity: 1 },\n    exiting: { opacity: 0 },\n  };\n\n  return (\n    <Transition\n      in={props.in}\n      timeout={props.duration}\n      unmountOnExit={props.unmountOnExit || false}\n      onExited={props.onExited}\n    >\n      {(state) => (\n        <div\n          style={{\n            ...defaultStyle,\n            ...transitionStyles[state],\n          }}\n        >\n          {props.children}\n        </div>\n      )}\n    </Transition>\n  );\n};\n","import { css } from '@emotion/css';\nimport React, { FunctionComponent } from 'react';\n\nimport { DataQueryError } from '@grafana/data';\nimport { Alert, useTheme2 } from '@grafana/ui';\nimport { FadeIn } from 'app/core/components/Animations/FadeIn';\n\nexport interface ErrorContainerProps {\n  queryError?: DataQueryError;\n}\n\nexport const ErrorContainer: FunctionComponent<ErrorContainerProps> = (props) => {\n  const { queryError } = props;\n  const theme = useTheme2();\n  const showError = queryError ? true : false;\n  const duration = showError ? 100 : 10;\n  const title = queryError ? 'Query error' : 'Unknown error';\n  const message = queryError?.message || queryError?.data?.message || null;\n  const alertWithTopMargin = css`\n    margin-top: ${theme.spacing(2)};\n  `;\n\n  return (\n    <FadeIn in={showError} duration={duration}>\n      <Alert severity=\"error\" title={title} className={alertWithTopMargin}>\n        {message}\n      </Alert>\n    </FadeIn>\n  );\n};\n","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nimport { LoadingState } from '@grafana/data';\n\nimport { ExploreId, StoreState } from '../../types';\n\nimport { ErrorContainer } from './ErrorContainer';\n\ninterface Props {\n  exploreId: ExploreId;\n}\nexport function ResponseErrorContainer(props: Props) {\n  const queryResponse = useSelector((state: StoreState) => state.explore[props.exploreId]?.queryResponse);\n\n  const queryError = queryResponse?.state === LoadingState.Error ? queryResponse?.error : undefined;\n\n  return <ErrorContainer queryError={queryError} />;\n}\n","import { css, cx } from '@emotion/css';\nimport React, { useState, useEffect } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { GrafanaTheme, DataSourceApi, DataQuery } from '@grafana/data';\nimport { getDataSourceSrv } from '@grafana/runtime';\nimport { stylesFactory, useTheme, TextArea, Button, IconButton } from '@grafana/ui';\nimport { notifyApp } from 'app/core/actions';\nimport appEvents from 'app/core/app_events';\nimport { createSuccessNotification } from 'app/core/copy/appNotification';\nimport { copyStringToClipboard } from 'app/core/utils/explore';\nimport { createUrlFromRichHistory, createQueryText } from 'app/core/utils/richHistory';\nimport { createAndCopyShortLink } from 'app/core/utils/shortLinks';\nimport { dispatch } from 'app/store/store';\nimport { StoreState } from 'app/types';\nimport { RichHistoryQuery, ExploreId } from 'app/types/explore';\n\nimport { ShowConfirmModalEvent } from '../../../types/events';\nimport { changeDatasource } from '../state/datasource';\nimport { starHistoryItem, commentHistoryItem, deleteHistoryItem } from '../state/history';\nimport { setQueries } from '../state/query';\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: ExploreId }) {\n  const explore = state.explore;\n  const { datasourceInstance } = explore[exploreId]!;\n  return {\n    exploreId,\n    datasourceInstance,\n  };\n}\n\nconst mapDispatchToProps = {\n  changeDatasource,\n  deleteHistoryItem,\n  commentHistoryItem,\n  starHistoryItem,\n  setQueries,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ninterface OwnProps<T extends DataQuery = DataQuery> {\n  query: RichHistoryQuery<T>;\n  dsImg: string;\n  isRemoved: boolean;\n}\n\nexport type Props<T extends DataQuery = DataQuery> = ConnectedProps<typeof connector> & OwnProps<T>;\n\nconst getStyles = stylesFactory((theme: GrafanaTheme, isRemoved: boolean) => {\n  /* Hard-coded value so all buttons and icons on right side of card are aligned */\n  const rigtColumnWidth = '240px';\n  const rigtColumnContentWidth = '170px';\n\n  /* If datasource was removed, card will have inactive color */\n  const cardColor = theme.colors.bg2;\n\n  return {\n    queryCard: css`\n      display: flex;\n      flex-direction: column;\n      border: 1px solid ${theme.colors.border1};\n      margin: ${theme.spacing.sm} 0;\n      background-color: ${cardColor};\n      border-radius: ${theme.border.radius.sm};\n      .starred {\n        color: ${theme.palette.orange};\n      }\n    `,\n    cardRow: css`\n      display: flex;\n      align-items: center;\n      justify-content: space-between;\n      padding: ${theme.spacing.sm};\n      border-bottom: none;\n      :first-of-type {\n        border-bottom: 1px solid ${theme.colors.border1};\n        padding: ${theme.spacing.xs} ${theme.spacing.sm};\n      }\n      img {\n        height: ${theme.typography.size.base};\n        max-width: ${theme.typography.size.base};\n        margin-right: ${theme.spacing.sm};\n      }\n    `,\n    datasourceContainer: css`\n      display: flex;\n      align-items: center;\n      font-size: ${theme.typography.size.sm};\n      font-weight: ${theme.typography.weight.semibold};\n    `,\n    queryActionButtons: css`\n      max-width: ${rigtColumnContentWidth};\n      display: flex;\n      justify-content: flex-end;\n      font-size: ${theme.typography.size.base};\n      button {\n        margin-left: ${theme.spacing.sm};\n      }\n    `,\n    queryContainer: css`\n      font-weight: ${theme.typography.weight.semibold};\n      width: calc(100% - ${rigtColumnWidth});\n    `,\n    queryRow: css`\n      border-top: 1px solid ${theme.colors.border1};\n      word-break: break-all;\n      padding: 4px 2px;\n      :first-child {\n        border-top: none;\n        padding: 0 0 4px 0;\n      }\n    `,\n    updateCommentContainer: css`\n      width: calc(100% + ${rigtColumnWidth});\n      margin-top: ${theme.spacing.sm};\n    `,\n    comment: css`\n      overflow-wrap: break-word;\n      font-size: ${theme.typography.size.sm};\n      font-weight: ${theme.typography.weight.regular};\n      margin-top: ${theme.spacing.xs};\n    `,\n    commentButtonRow: css`\n      > * {\n        margin-right: ${theme.spacing.sm};\n      }\n    `,\n    textArea: css`\n      width: 100%;\n    `,\n    runButton: css`\n      max-width: ${rigtColumnContentWidth};\n      display: flex;\n      justify-content: flex-end;\n      button {\n        height: auto;\n        padding: ${theme.spacing.xs} ${theme.spacing.md};\n        line-height: 1.4;\n        span {\n          white-space: normal !important;\n        }\n      }\n    `,\n  };\n});\n\nexport function RichHistoryCard(props: Props) {\n  const {\n    query,\n    dsImg,\n    isRemoved,\n    commentHistoryItem,\n    starHistoryItem,\n    deleteHistoryItem,\n    changeDatasource,\n    exploreId,\n    datasourceInstance,\n    setQueries,\n  } = props;\n  const [activeUpdateComment, setActiveUpdateComment] = useState(false);\n  const [comment, setComment] = useState<string | undefined>(query.comment);\n  const [queryDsInstance, setQueryDsInstance] = useState<DataSourceApi | undefined>(undefined);\n\n  useEffect(() => {\n    const getQueryDsInstance = async () => {\n      const ds = await getDataSourceSrv().get(query.datasourceName);\n      setQueryDsInstance(ds);\n    };\n\n    getQueryDsInstance();\n  }, [query.datasourceName]);\n\n  const theme = useTheme();\n  const styles = getStyles(theme, isRemoved);\n\n  const onRunQuery = async () => {\n    const queriesToRun = query.queries;\n    if (query.datasourceName !== datasourceInstance?.name) {\n      await changeDatasource(exploreId, query.datasourceName, { importQueries: true });\n      setQueries(exploreId, queriesToRun);\n    } else {\n      setQueries(exploreId, queriesToRun);\n    }\n  };\n\n  const onCopyQuery = () => {\n    const queriesToCopy = query.queries.map((q) => createQueryText(q, queryDsInstance)).join('\\n');\n    copyStringToClipboard(queriesToCopy);\n    dispatch(notifyApp(createSuccessNotification('Query copied to clipboard')));\n  };\n\n  const onCreateShortLink = async () => {\n    const link = createUrlFromRichHistory(query);\n    await createAndCopyShortLink(link);\n  };\n\n  const onDeleteQuery = () => {\n    // For starred queries, we want confirmation. For non-starred, we don't.\n    if (query.starred) {\n      appEvents.publish(\n        new ShowConfirmModalEvent({\n          title: 'Delete',\n          text: 'Are you sure you want to permanently delete your starred query?',\n          yesText: 'Delete',\n          icon: 'trash-alt',\n          onConfirm: () => {\n            deleteHistoryItem(query.id);\n            dispatch(notifyApp(createSuccessNotification('Query deleted')));\n          },\n        })\n      );\n    } else {\n      deleteHistoryItem(query.id);\n      dispatch(notifyApp(createSuccessNotification('Query deleted')));\n    }\n  };\n\n  const onStarrQuery = () => {\n    starHistoryItem(query.id, !query.starred);\n  };\n\n  const toggleActiveUpdateComment = () => setActiveUpdateComment(!activeUpdateComment);\n\n  const onUpdateComment = () => {\n    commentHistoryItem(query.id, comment);\n    setActiveUpdateComment(false);\n  };\n\n  const onCancelUpdateComment = () => {\n    setActiveUpdateComment(false);\n    setComment(query.comment);\n  };\n\n  const onKeyDown = (keyEvent: React.KeyboardEvent) => {\n    if (keyEvent.key === 'Enter' && (keyEvent.shiftKey || keyEvent.ctrlKey)) {\n      onUpdateComment();\n    }\n\n    if (keyEvent.key === 'Escape') {\n      onCancelUpdateComment();\n    }\n  };\n\n  const updateComment = (\n    <div className={styles.updateCommentContainer} aria-label={comment ? 'Update comment form' : 'Add comment form'}>\n      <TextArea\n        value={comment}\n        placeholder={comment ? undefined : 'An optional description of what the query does.'}\n        onChange={(e) => setComment(e.currentTarget.value)}\n        className={styles.textArea}\n      />\n      <div className={styles.commentButtonRow}>\n        <Button onClick={onUpdateComment} aria-label=\"Submit button\">\n          Save comment\n        </Button>\n        <Button variant=\"secondary\" onClick={onCancelUpdateComment}>\n          Cancel\n        </Button>\n      </div>\n    </div>\n  );\n\n  const queryActionButtons = (\n    <div className={styles.queryActionButtons}>\n      <IconButton\n        name=\"comment-alt\"\n        onClick={toggleActiveUpdateComment}\n        title={query.comment?.length > 0 ? 'Edit comment' : 'Add comment'}\n      />\n      <IconButton name=\"copy\" onClick={onCopyQuery} title=\"Copy query to clipboard\" />\n      {!isRemoved && (\n        <IconButton name=\"share-alt\" onClick={onCreateShortLink} title=\"Copy shortened link to clipboard\" />\n      )}\n      <IconButton name=\"trash-alt\" title={'Delete query'} onClick={onDeleteQuery} />\n      <IconButton\n        name={query.starred ? 'favorite' : 'star'}\n        iconType={query.starred ? 'mono' : 'default'}\n        onClick={onStarrQuery}\n        title={query.starred ? 'Unstar query' : 'Star query'}\n      />\n    </div>\n  );\n\n  return (\n    <div className={styles.queryCard} onKeyDown={onKeyDown}>\n      <div className={styles.cardRow}>\n        <div className={styles.datasourceContainer}>\n          <img src={dsImg} aria-label=\"Data source icon\" />\n          <div aria-label=\"Data source name\">\n            {isRemoved ? 'Data source does not exist anymore' : query.datasourceName}\n          </div>\n        </div>\n        {queryActionButtons}\n      </div>\n      <div className={cx(styles.cardRow)}>\n        <div className={styles.queryContainer}>\n          {query.queries.map((q, i) => {\n            const queryText = createQueryText(q, queryDsInstance);\n            return (\n              <div aria-label=\"Query text\" key={`${q}-${i}`} className={styles.queryRow}>\n                {queryText}\n              </div>\n            );\n          })}\n          {!activeUpdateComment && query.comment && (\n            <div aria-label=\"Query comment\" className={styles.comment}>\n              {query.comment}\n            </div>\n          )}\n          {activeUpdateComment && updateComment}\n        </div>\n        {!activeUpdateComment && (\n          <div className={styles.runButton}>\n            <Button variant=\"secondary\" onClick={onRunQuery} disabled={isRemoved}>\n              {datasourceInstance?.name === query.datasourceName ? 'Run query' : 'Switch data source and run query'}\n            </Button>\n          </div>\n        )}\n      </div>\n    </div>\n  );\n}\n\nexport default connector(RichHistoryCard);\n","import { css } from '@emotion/css';\nimport { uniqBy } from 'lodash';\nimport React, { useState, useEffect } from 'react';\nimport { useDebounce } from 'react-use';\n\nimport { GrafanaTheme, SelectableValue } from '@grafana/data';\nimport { stylesFactory, useTheme, RangeSlider, MultiSelect, Select, FilterInput } from '@grafana/ui';\nimport {\n  SortOrder,\n  mapNumbertoTimeInSlider,\n  mapQueriesToHeadings,\n  createDatasourcesList,\n  filterAndSortQueries,\n} from 'app/core/utils/richHistory';\nimport { RichHistoryQuery, ExploreId } from 'app/types/explore';\n\nimport { sortOrderOptions } from './RichHistory';\nimport RichHistoryCard from './RichHistoryCard';\n\nexport interface Props {\n  queries: RichHistoryQuery[];\n  sortOrder: SortOrder;\n  activeDatasourceOnly: boolean;\n  datasourceFilters: SelectableValue[];\n  retentionPeriod: number;\n  exploreId: ExploreId;\n  height: number;\n  onChangeSortOrder: (sortOrder: SortOrder) => void;\n  onSelectDatasourceFilters: (value: SelectableValue[]) => void;\n}\n\nconst getStyles = stylesFactory((theme: GrafanaTheme, height: number) => {\n  const bgColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark4;\n\n  /* 134px is based on the width of the Query history tabs bar, so the content is aligned to right side of the tab */\n  const cardWidth = '100% - 134px';\n  const sliderHeight = `${height - 180}px`;\n  return {\n    container: css`\n      display: flex;\n      .label-slider {\n        font-size: ${theme.typography.size.sm};\n        &:last-of-type {\n          margin-top: ${theme.spacing.lg};\n        }\n        &:first-of-type {\n          font-weight: ${theme.typography.weight.semibold};\n          margin-bottom: ${theme.spacing.md};\n        }\n      }\n    `,\n    containerContent: css`\n      width: calc(${cardWidth});\n    `,\n    containerSlider: css`\n      width: 129px;\n      margin-right: ${theme.spacing.sm};\n      .slider {\n        bottom: 10px;\n        height: ${sliderHeight};\n        width: 129px;\n        padding: ${theme.spacing.sm} 0;\n      }\n    `,\n    slider: css`\n      position: fixed;\n    `,\n    selectors: css`\n      display: flex;\n      justify-content: space-between;\n      flex-wrap: wrap;\n    `,\n    filterInput: css`\n      margin-bottom: ${theme.spacing.sm};\n    `,\n    multiselect: css`\n      width: 100%;\n      margin-bottom: ${theme.spacing.sm};\n      .gf-form-select-box__multi-value {\n        background-color: ${bgColor};\n        padding: ${theme.spacing.xxs} ${theme.spacing.xs} ${theme.spacing.xxs} ${theme.spacing.sm};\n        border-radius: ${theme.border.radius.sm};\n      }\n    `,\n    sort: css`\n      width: 170px;\n    `,\n    sessionName: css`\n      display: flex;\n      align-items: flex-start;\n      justify-content: flex-start;\n      margin-top: ${theme.spacing.lg};\n      h4 {\n        margin: 0 10px 0 0;\n      }\n    `,\n    heading: css`\n      font-size: ${theme.typography.heading.h4};\n      margin: ${theme.spacing.md} ${theme.spacing.xxs} ${theme.spacing.sm} ${theme.spacing.xxs};\n    `,\n    footer: css`\n      height: 60px;\n      margin: ${theme.spacing.lg} auto;\n      display: flex;\n      justify-content: center;\n      font-weight: ${theme.typography.weight.light};\n      font-size: ${theme.typography.size.sm};\n      a {\n        font-weight: ${theme.typography.weight.semibold};\n        margin-left: ${theme.spacing.xxs};\n      }\n    `,\n    queries: css`\n      font-size: ${theme.typography.size.sm};\n      font-weight: ${theme.typography.weight.regular};\n      margin-left: ${theme.spacing.xs};\n    `,\n  };\n});\n\nexport function RichHistoryQueriesTab(props: Props) {\n  const {\n    datasourceFilters,\n    onSelectDatasourceFilters,\n    queries,\n    onChangeSortOrder,\n    sortOrder,\n    activeDatasourceOnly,\n    retentionPeriod,\n    exploreId,\n    height,\n  } = props;\n\n  const [timeFilter, setTimeFilter] = useState<[number, number]>([0, retentionPeriod]);\n  const [data, setData] = useState<[RichHistoryQuery[], ReturnType<typeof createDatasourcesList>]>([[], []]);\n  const [searchInput, setSearchInput] = useState('');\n  const [debouncedSearchInput, setDebouncedSearchInput] = useState('');\n\n  const theme = useTheme();\n  const styles = getStyles(theme, height);\n\n  useDebounce(\n    () => {\n      setDebouncedSearchInput(searchInput);\n    },\n    300,\n    [searchInput]\n  );\n\n  useEffect(() => {\n    const datasourcesRetrievedFromQueryHistory = uniqBy(queries, 'datasourceName').map((d) => d.datasourceName);\n    const listOfDatasources = createDatasourcesList(datasourcesRetrievedFromQueryHistory);\n\n    setData([\n      filterAndSortQueries(\n        queries,\n        sortOrder,\n        datasourceFilters.map((d) => d.value),\n        debouncedSearchInput,\n        timeFilter\n      ),\n      listOfDatasources,\n    ]);\n  }, [timeFilter, queries, sortOrder, datasourceFilters, debouncedSearchInput]);\n\n  const [filteredQueries, listOfDatasources] = data;\n\n  /* mappedQueriesToHeadings is an object where query headings (stringified dates/data sources)\n   * are keys and arrays with queries that belong to that headings are values.\n   */\n  const mappedQueriesToHeadings = mapQueriesToHeadings(filteredQueries, sortOrder);\n\n  return (\n    <div className={styles.container}>\n      <div className={styles.containerSlider}>\n        <div className={styles.slider}>\n          <div className=\"label-slider\">Filter history</div>\n          <div className=\"label-slider\">{mapNumbertoTimeInSlider(timeFilter[0])}</div>\n          <div className=\"slider\">\n            <RangeSlider\n              tooltipAlwaysVisible={false}\n              min={0}\n              max={retentionPeriod}\n              value={timeFilter}\n              orientation=\"vertical\"\n              formatTooltipResult={mapNumbertoTimeInSlider}\n              reverse={true}\n              onAfterChange={setTimeFilter as () => number[]}\n            />\n          </div>\n          <div className=\"label-slider\">{mapNumbertoTimeInSlider(timeFilter[1])}</div>\n        </div>\n      </div>\n\n      <div className={styles.containerContent}>\n        <div className={styles.selectors}>\n          {!activeDatasourceOnly && (\n            <div aria-label=\"Filter datasources\" className={styles.multiselect}>\n              <MultiSelect\n                menuShouldPortal\n                options={listOfDatasources}\n                value={datasourceFilters}\n                placeholder=\"Filter queries for data sources(s)\"\n                onChange={onSelectDatasourceFilters}\n              />\n            </div>\n          )}\n          <div className={styles.filterInput}>\n            <FilterInput\n              placeholder=\"Search queries\"\n              value={searchInput}\n              onChange={(value: string) => {\n                setSearchInput(value);\n              }}\n            />\n          </div>\n          <div aria-label=\"Sort queries\" className={styles.sort}>\n            <Select\n              menuShouldPortal\n              value={sortOrderOptions.filter((order) => order.value === sortOrder)}\n              options={sortOrderOptions}\n              placeholder=\"Sort queries by\"\n              onChange={(e) => onChangeSortOrder(e.value as SortOrder)}\n            />\n          </div>\n        </div>\n        {Object.keys(mappedQueriesToHeadings).map((heading) => {\n          return (\n            <div key={heading}>\n              <div className={styles.heading}>\n                {heading} <span className={styles.queries}>{mappedQueriesToHeadings[heading].length} queries</span>\n              </div>\n              {mappedQueriesToHeadings[heading].map((q: RichHistoryQuery) => {\n                const idx = listOfDatasources.findIndex((d) => d.label === q.datasourceName);\n                return (\n                  <RichHistoryCard\n                    query={q}\n                    key={q.id}\n                    exploreId={exploreId}\n                    dsImg={listOfDatasources[idx].imgUrl}\n                    isRemoved={listOfDatasources[idx].isRemoved}\n                  />\n                );\n              })}\n            </div>\n          );\n        })}\n        <div className={styles.footer}>The history is local to your browser and is not shared with others.</div>\n      </div>\n    </div>\n  );\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme, SelectableValue } from '@grafana/data';\nimport { stylesFactory, useTheme, Select, Button, Switch, Field } from '@grafana/ui';\nimport { notifyApp } from 'app/core/actions';\nimport appEvents from 'app/core/app_events';\nimport { createSuccessNotification } from 'app/core/copy/appNotification';\nimport { MAX_HISTORY_ITEMS } from 'app/core/history/RichHistoryLocalStorage';\nimport { dispatch } from 'app/store/store';\n\nimport { ShowConfirmModalEvent } from '../../../types/events';\n\nexport interface RichHistorySettingsProps {\n  retentionPeriod: number;\n  starredTabAsFirstTab: boolean;\n  activeDatasourceOnly: boolean;\n  onChangeRetentionPeriod: (option: SelectableValue<number>) => void;\n  toggleStarredTabAsFirstTab: () => void;\n  toggleactiveDatasourceOnly: () => void;\n  deleteRichHistory: () => void;\n}\n\nconst getStyles = stylesFactory((theme: GrafanaTheme) => {\n  return {\n    container: css`\n      font-size: ${theme.typography.size.sm};\n      .space-between {\n        margin-bottom: ${theme.spacing.lg};\n      }\n    `,\n    input: css`\n      max-width: 200px;\n    `,\n    switch: css`\n      display: flex;\n      align-items: center;\n    `,\n    label: css`\n      margin-left: ${theme.spacing.md};\n    `,\n  };\n});\n\nconst retentionPeriodOptions = [\n  { value: 2, label: '2 days' },\n  { value: 5, label: '5 days' },\n  { value: 7, label: '1 week' },\n  { value: 14, label: '2 weeks' },\n];\n\nexport function RichHistorySettings(props: RichHistorySettingsProps) {\n  const {\n    retentionPeriod,\n    starredTabAsFirstTab,\n    activeDatasourceOnly,\n    onChangeRetentionPeriod,\n    toggleStarredTabAsFirstTab,\n    toggleactiveDatasourceOnly,\n    deleteRichHistory,\n  } = props;\n  const theme = useTheme();\n  const styles = getStyles(theme);\n  const selectedOption = retentionPeriodOptions.find((v) => v.value === retentionPeriod);\n\n  const onDelete = () => {\n    appEvents.publish(\n      new ShowConfirmModalEvent({\n        title: 'Delete',\n        text: 'Are you sure you want to permanently delete your query history?',\n        yesText: 'Delete',\n        icon: 'trash-alt',\n        onConfirm: () => {\n          deleteRichHistory();\n          dispatch(notifyApp(createSuccessNotification('Query history deleted')));\n        },\n      })\n    );\n  };\n\n  return (\n    <div className={styles.container}>\n      <Field\n        label=\"History time span\"\n        description={`Select the period of time for which Grafana will save your query history. Up to ${MAX_HISTORY_ITEMS} entries will be stored.`}\n        className=\"space-between\"\n      >\n        <div className={styles.input}>\n          <Select\n            menuShouldPortal\n            value={selectedOption}\n            options={retentionPeriodOptions}\n            onChange={onChangeRetentionPeriod}\n          ></Select>\n        </div>\n      </Field>\n      <Field label=\"Default active tab\" description=\" \" className=\"space-between\">\n        <div className={styles.switch}>\n          <Switch value={starredTabAsFirstTab} onChange={toggleStarredTabAsFirstTab}></Switch>\n          <div className={styles.label}>Change the default active tab from “Query history” to “Starred”</div>\n        </div>\n      </Field>\n      <Field label=\"Data source behaviour\" description=\" \" className=\"space-between\">\n        <div className={styles.switch}>\n          <Switch value={activeDatasourceOnly} onChange={toggleactiveDatasourceOnly}></Switch>\n          <div className={styles.label}>Only show queries for data source currently active in Explore</div>\n        </div>\n      </Field>\n      <div\n        className={css`\n          font-weight: ${theme.typography.weight.bold};\n        `}\n      >\n        Clear query history\n      </div>\n      <div\n        className={css`\n          margin-bottom: ${theme.spacing.sm};\n        `}\n      >\n        Delete all of your query history, permanently.\n      </div>\n      <Button variant=\"destructive\" onClick={onDelete}>\n        Clear query history\n      </Button>\n    </div>\n  );\n}\n","import { css } from '@emotion/css';\nimport { uniqBy } from 'lodash';\nimport React, { useState, useEffect } from 'react';\nimport { useDebounce } from 'react-use';\n\nimport { GrafanaTheme, SelectableValue } from '@grafana/data';\nimport { stylesFactory, useTheme, Select, MultiSelect, FilterInput } from '@grafana/ui';\nimport { filterAndSortQueries, createDatasourcesList, SortOrder } from 'app/core/utils/richHistory';\nimport { RichHistoryQuery, ExploreId } from 'app/types/explore';\n\nimport { sortOrderOptions } from './RichHistory';\nimport RichHistoryCard from './RichHistoryCard';\n\nexport interface Props {\n  queries: RichHistoryQuery[];\n  sortOrder: SortOrder;\n  activeDatasourceOnly: boolean;\n  datasourceFilters: SelectableValue[];\n  exploreId: ExploreId;\n  onChangeSortOrder: (sortOrder: SortOrder) => void;\n  onSelectDatasourceFilters: (value: SelectableValue[]) => void;\n}\n\nconst getStyles = stylesFactory((theme: GrafanaTheme) => {\n  const bgColor = theme.isLight ? theme.palette.gray5 : theme.palette.dark4;\n  return {\n    container: css`\n      display: flex;\n    `,\n    containerContent: css`\n      width: 100%;\n    `,\n    selectors: css`\n      display: flex;\n      justify-content: space-between;\n      flex-wrap: wrap;\n    `,\n    multiselect: css`\n      width: 100%;\n      margin-bottom: ${theme.spacing.sm};\n      .gf-form-select-box__multi-value {\n        background-color: ${bgColor};\n        padding: ${theme.spacing.xxs} ${theme.spacing.xs} ${theme.spacing.xxs} ${theme.spacing.sm};\n        border-radius: ${theme.border.radius.sm};\n      }\n    `,\n    filterInput: css`\n      margin-bottom: ${theme.spacing.sm};\n    `,\n    sort: css`\n      width: 170px;\n    `,\n    footer: css`\n      height: 60px;\n      margin-top: ${theme.spacing.lg};\n      display: flex;\n      justify-content: center;\n      font-weight: ${theme.typography.weight.light};\n      font-size: ${theme.typography.size.sm};\n      a {\n        font-weight: ${theme.typography.weight.semibold};\n        margin-left: ${theme.spacing.xxs};\n      }\n    `,\n  };\n});\n\nexport function RichHistoryStarredTab(props: Props) {\n  const {\n    datasourceFilters,\n    onSelectDatasourceFilters,\n    queries,\n    onChangeSortOrder,\n    sortOrder,\n    activeDatasourceOnly,\n    exploreId,\n  } = props;\n\n  const [data, setData] = useState<[RichHistoryQuery[], ReturnType<typeof createDatasourcesList>]>([[], []]);\n  const [searchInput, setSearchInput] = useState('');\n  const [debouncedSearchInput, setDebouncedSearchInput] = useState('');\n\n  const theme = useTheme();\n  const styles = getStyles(theme);\n\n  useDebounce(\n    () => {\n      setDebouncedSearchInput(searchInput);\n    },\n    300,\n    [searchInput]\n  );\n\n  useEffect(() => {\n    const datasourcesRetrievedFromQueryHistory = uniqBy(queries, 'datasourceName').map((d) => d.datasourceName);\n    const listOfDatasources = createDatasourcesList(datasourcesRetrievedFromQueryHistory);\n    const starredQueries = queries.filter((q) => q.starred === true);\n    setData([\n      filterAndSortQueries(\n        starredQueries,\n        sortOrder,\n        datasourceFilters.map((d) => d.value),\n        debouncedSearchInput\n      ),\n      listOfDatasources,\n    ]);\n  }, [queries, sortOrder, datasourceFilters, debouncedSearchInput]);\n\n  const [filteredQueries, listOfDatasources] = data;\n\n  return (\n    <div className={styles.container}>\n      <div className={styles.containerContent}>\n        <div className={styles.selectors}>\n          {!activeDatasourceOnly && (\n            <div aria-label=\"Filter datasources\" className={styles.multiselect}>\n              <MultiSelect\n                menuShouldPortal\n                options={listOfDatasources}\n                value={datasourceFilters}\n                placeholder=\"Filter queries for specific data sources(s)\"\n                onChange={onSelectDatasourceFilters}\n              />\n            </div>\n          )}\n          <div className={styles.filterInput}>\n            <FilterInput\n              placeholder=\"Search queries\"\n              value={searchInput}\n              onChange={(value: string) => {\n                setSearchInput(value);\n              }}\n            />\n          </div>\n          <div aria-label=\"Sort queries\" className={styles.sort}>\n            <Select\n              menuShouldPortal\n              options={sortOrderOptions}\n              value={sortOrderOptions.filter((order) => order.value === sortOrder)}\n              placeholder=\"Sort queries by\"\n              onChange={(e) => onChangeSortOrder(e.value as SortOrder)}\n            />\n          </div>\n        </div>\n        {filteredQueries.map((q) => {\n          const idx = listOfDatasources.findIndex((d) => d.label === q.datasourceName);\n          return (\n            <RichHistoryCard\n              query={q}\n              key={q.id}\n              exploreId={exploreId}\n              dsImg={listOfDatasources[idx].imgUrl}\n              isRemoved={listOfDatasources[idx].isRemoved}\n            />\n          );\n        })}\n        <div className={styles.footer}>The history is local to your browser and is not shared with others.</div>\n      </div>\n    </div>\n  );\n}\n","import React, { PureComponent } from 'react';\n\nimport { SelectableValue } from '@grafana/data';\nimport { Themeable, withTheme, TabbedContainer, TabConfig } from '@grafana/ui';\nimport { RICH_HISTORY_SETTING_KEYS } from 'app/core/history/richHistoryLocalStorageUtils';\nimport store from 'app/core/store';\nimport { SortOrder } from 'app/core/utils/richHistory';\nimport { RichHistoryQuery, ExploreId } from 'app/types/explore';\n\nimport { RichHistoryQueriesTab } from './RichHistoryQueriesTab';\nimport { RichHistorySettings } from './RichHistorySettings';\nimport { RichHistoryStarredTab } from './RichHistoryStarredTab';\n\nexport enum Tabs {\n  RichHistory = 'Query history',\n  Starred = 'Starred',\n  Settings = 'Settings',\n}\n\nexport const sortOrderOptions = [\n  { label: 'Newest first', value: SortOrder.Descending },\n  { label: 'Oldest first', value: SortOrder.Ascending },\n  { label: 'Data source A-Z', value: SortOrder.DatasourceAZ },\n  { label: 'Data source Z-A', value: SortOrder.DatasourceZA },\n];\n\nexport interface RichHistoryProps extends Themeable {\n  richHistory: RichHistoryQuery[];\n  activeDatasourceInstance?: string;\n  firstTab: Tabs;\n  exploreId: ExploreId;\n  height: number;\n  deleteRichHistory: () => void;\n  onClose: () => void;\n}\n\ninterface RichHistoryState {\n  sortOrder: SortOrder;\n  retentionPeriod: number;\n  starredTabAsFirstTab: boolean;\n  activeDatasourceOnly: boolean;\n  datasourceFilters: SelectableValue[];\n}\n\nclass UnThemedRichHistory extends PureComponent<RichHistoryProps, RichHistoryState> {\n  constructor(props: RichHistoryProps) {\n    super(props);\n    this.state = {\n      sortOrder: SortOrder.Descending,\n      datasourceFilters: store.getObject(RICH_HISTORY_SETTING_KEYS.datasourceFilters, []),\n      retentionPeriod: store.getObject(RICH_HISTORY_SETTING_KEYS.retentionPeriod, 7),\n      starredTabAsFirstTab: store.getBool(RICH_HISTORY_SETTING_KEYS.starredTabAsFirstTab, false),\n      activeDatasourceOnly: store.getBool(RICH_HISTORY_SETTING_KEYS.activeDatasourceOnly, true),\n    };\n  }\n\n  onChangeRetentionPeriod = (retentionPeriod: SelectableValue<number>) => {\n    if (retentionPeriod.value !== undefined) {\n      this.setState({\n        retentionPeriod: retentionPeriod.value,\n      });\n      store.set(RICH_HISTORY_SETTING_KEYS.retentionPeriod, retentionPeriod.value);\n    }\n  };\n\n  toggleStarredTabAsFirstTab = () => {\n    const starredTabAsFirstTab = !this.state.starredTabAsFirstTab;\n    this.setState({\n      starredTabAsFirstTab,\n    });\n    store.set(RICH_HISTORY_SETTING_KEYS.starredTabAsFirstTab, starredTabAsFirstTab);\n  };\n\n  toggleActiveDatasourceOnly = () => {\n    const activeDatasourceOnly = !this.state.activeDatasourceOnly;\n    this.setState({\n      activeDatasourceOnly,\n    });\n    store.set(RICH_HISTORY_SETTING_KEYS.activeDatasourceOnly, activeDatasourceOnly);\n  };\n\n  onSelectDatasourceFilters = (value: SelectableValue[]) => {\n    try {\n      store.setObject(RICH_HISTORY_SETTING_KEYS.datasourceFilters, value);\n    } catch (error) {\n      console.error(error);\n    }\n    /* Set data source filters to state even though they were not successfully saved in\n     * localStorage to allow interaction and filtering.\n     **/\n    this.setState({ datasourceFilters: value });\n  };\n\n  onChangeSortOrder = (sortOrder: SortOrder) => this.setState({ sortOrder });\n\n  /* If user selects activeDatasourceOnly === true, set datasource filter to currently active datasource.\n   * Filtering based on datasource won't be available. Otherwise set to null, as filtering will be\n   * available for user.\n   */\n  updateFilters() {\n    this.state.activeDatasourceOnly && this.props.activeDatasourceInstance\n      ? this.onSelectDatasourceFilters([\n          { label: this.props.activeDatasourceInstance, value: this.props.activeDatasourceInstance },\n        ])\n      : this.onSelectDatasourceFilters(this.state.datasourceFilters);\n  }\n\n  componentDidMount() {\n    this.updateFilters();\n  }\n\n  componentDidUpdate(prevProps: RichHistoryProps, prevState: RichHistoryState) {\n    if (\n      this.props.activeDatasourceInstance !== prevProps.activeDatasourceInstance ||\n      this.state.activeDatasourceOnly !== prevState.activeDatasourceOnly\n    ) {\n      this.updateFilters();\n    }\n  }\n\n  render() {\n    const { datasourceFilters, sortOrder, activeDatasourceOnly, retentionPeriod } = this.state;\n    const { richHistory, height, exploreId, deleteRichHistory, onClose, firstTab } = this.props;\n\n    const QueriesTab: TabConfig = {\n      label: 'Query history',\n      value: Tabs.RichHistory,\n      content: (\n        <RichHistoryQueriesTab\n          queries={richHistory}\n          sortOrder={sortOrder}\n          datasourceFilters={datasourceFilters}\n          activeDatasourceOnly={activeDatasourceOnly}\n          retentionPeriod={retentionPeriod}\n          onChangeSortOrder={this.onChangeSortOrder}\n          onSelectDatasourceFilters={this.onSelectDatasourceFilters}\n          exploreId={exploreId}\n          height={height}\n        />\n      ),\n      icon: 'history',\n    };\n\n    const StarredTab: TabConfig = {\n      label: 'Starred',\n      value: Tabs.Starred,\n      content: (\n        <RichHistoryStarredTab\n          queries={richHistory}\n          sortOrder={sortOrder}\n          datasourceFilters={datasourceFilters}\n          activeDatasourceOnly={activeDatasourceOnly}\n          onChangeSortOrder={this.onChangeSortOrder}\n          onSelectDatasourceFilters={this.onSelectDatasourceFilters}\n          exploreId={exploreId}\n        />\n      ),\n      icon: 'star',\n    };\n\n    const SettingsTab: TabConfig = {\n      label: 'Settings',\n      value: Tabs.Settings,\n      content: (\n        <RichHistorySettings\n          retentionPeriod={this.state.retentionPeriod}\n          starredTabAsFirstTab={this.state.starredTabAsFirstTab}\n          activeDatasourceOnly={this.state.activeDatasourceOnly}\n          onChangeRetentionPeriod={this.onChangeRetentionPeriod}\n          toggleStarredTabAsFirstTab={this.toggleStarredTabAsFirstTab}\n          toggleactiveDatasourceOnly={this.toggleActiveDatasourceOnly}\n          deleteRichHistory={deleteRichHistory}\n        />\n      ),\n      icon: 'sliders-v-alt',\n    };\n\n    let tabs = [QueriesTab, StarredTab, SettingsTab];\n    return (\n      <TabbedContainer tabs={tabs} onClose={onClose} defaultTab={firstTab} closeIconTooltip=\"Close query history\" />\n    );\n  }\n}\n\nexport const RichHistory = withTheme(UnThemedRichHistory);\n","import React, { useEffect, useState } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { RICH_HISTORY_SETTING_KEYS } from 'app/core/history/richHistoryLocalStorageUtils';\nimport store from 'app/core/store';\nimport { ExploreItemState, StoreState } from 'app/types';\nimport { ExploreId } from 'app/types/explore';\n\nimport { ExploreDrawer } from '../ExploreDrawer';\nimport { deleteRichHistory, loadRichHistory } from '../state/history';\n\nimport { RichHistory, Tabs } from './RichHistory';\n\nfunction mapStateToProps(state: StoreState, { exploreId }: { exploreId: ExploreId }) {\n  const explore = state.explore;\n  // @ts-ignore\n  const item: ExploreItemState = explore[exploreId];\n  const { datasourceInstance } = item;\n  const firstTab = store.getBool(RICH_HISTORY_SETTING_KEYS.starredTabAsFirstTab, false)\n    ? Tabs.Starred\n    : Tabs.RichHistory;\n  const { richHistory } = item;\n  return {\n    richHistory,\n    firstTab,\n    activeDatasourceInstance: datasourceInstance?.name,\n  };\n}\n\nconst mapDispatchToProps = {\n  loadRichHistory,\n  deleteRichHistory,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ninterface OwnProps {\n  width: number;\n  exploreId: ExploreId;\n  onClose: () => void;\n}\nexport type Props = ConnectedProps<typeof connector> & OwnProps;\n\nexport function RichHistoryContainer(props: Props) {\n  const [height, setHeight] = useState(400);\n\n  const {\n    richHistory,\n    width,\n    firstTab,\n    activeDatasourceInstance,\n    exploreId,\n    deleteRichHistory,\n    loadRichHistory,\n    onClose,\n  } = props;\n\n  useEffect(() => {\n    loadRichHistory(exploreId);\n  }, [loadRichHistory, exploreId]);\n\n  return (\n    <ExploreDrawer\n      width={width}\n      onResize={(_e, _dir, ref) => {\n        setHeight(Number(ref.style.height.slice(0, -2)));\n      }}\n    >\n      <RichHistory\n        richHistory={richHistory}\n        firstTab={firstTab}\n        activeDatasourceInstance={activeDatasourceInstance}\n        exploreId={exploreId}\n        deleteRichHistory={deleteRichHistory}\n        onClose={onClose}\n        height={height}\n      />\n    </ExploreDrawer>\n  );\n}\n\nexport default connector(RichHistoryContainer);\n","import { css, cx } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Button, HorizontalGroup, useTheme2 } from '@grafana/ui';\n\ntype Props = {\n  addQueryRowButtonDisabled?: boolean;\n  addQueryRowButtonHidden?: boolean;\n  richHistoryButtonActive?: boolean;\n  queryInspectorButtonActive?: boolean;\n\n  onClickAddQueryRowButton: () => void;\n  onClickRichHistoryButton: () => void;\n  onClickQueryInspectorButton: () => void;\n};\n\nconst getStyles = (theme: GrafanaTheme2) => {\n  return {\n    containerMargin: css`\n      margin-top: ${theme.spacing(2)};\n    `,\n  };\n};\nexport function SecondaryActions(props: Props) {\n  const theme = useTheme2();\n  const styles = getStyles(theme);\n  return (\n    <div className={styles.containerMargin}>\n      <HorizontalGroup>\n        {!props.addQueryRowButtonHidden && (\n          <Button\n            variant=\"secondary\"\n            aria-label=\"Add row button\"\n            onClick={props.onClickAddQueryRowButton}\n            disabled={props.addQueryRowButtonDisabled}\n            icon=\"plus\"\n          >\n            Add query\n          </Button>\n        )}\n        <Button\n          variant=\"secondary\"\n          aria-label=\"Rich history button\"\n          className={cx({ ['explore-active-button']: props.richHistoryButtonActive })}\n          onClick={props.onClickRichHistoryButton}\n          icon=\"history\"\n        >\n          Query history\n        </Button>\n        <Button\n          variant=\"secondary\"\n          aria-label=\"Query inspector button\"\n          className={cx({ ['explore-active-button']: props.queryInspectorButtonActive })}\n          onClick={props.onClickQueryInspectorButton}\n          icon=\"info-circle\"\n        >\n          Inspector\n        </Button>\n      </HorizontalGroup>\n    </div>\n  );\n}\n","import React, { PureComponent } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { ValueLinkConfig, applyFieldOverrides, TimeZone } from '@grafana/data';\nimport { Collapse, Table } from '@grafana/ui';\nimport { FilterItem } from '@grafana/ui/src/components/Table/types';\nimport { config } from 'app/core/config';\nimport { PANEL_BORDER } from 'app/core/constants';\nimport { StoreState } from 'app/types';\nimport { ExploreId, ExploreItemState } from 'app/types/explore';\n\nimport { MetaInfoText } from './MetaInfoText';\nimport { splitOpen } from './state/main';\nimport { getFieldLinksForExplore } from './utils/links';\n\ninterface TableContainerProps {\n  ariaLabel?: string;\n  exploreId: ExploreId;\n  width: number;\n  timeZone: TimeZone;\n  onCellFilterAdded?: (filter: FilterItem) => void;\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: TableContainerProps) {\n  const explore = state.explore;\n  // @ts-ignore\n  const item: ExploreItemState = explore[exploreId];\n  const { loading: loadingInState, tableResult, range } = item;\n  const loading = tableResult && tableResult.length > 0 ? false : loadingInState;\n  return { loading, tableResult, range };\n}\n\nconst mapDispatchToProps = {\n  splitOpen,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype Props = TableContainerProps & ConnectedProps<typeof connector>;\n\nexport class TableContainer extends PureComponent<Props> {\n  getTableHeight() {\n    const { tableResult } = this.props;\n\n    if (!tableResult || tableResult.length === 0) {\n      return 200;\n    }\n\n    // tries to estimate table height\n    return Math.max(Math.min(600, tableResult.length * 35) + 35);\n  }\n\n  render() {\n    const { loading, onCellFilterAdded, tableResult, width, splitOpen, range, ariaLabel, timeZone } = this.props;\n    const height = this.getTableHeight();\n    const tableWidth = width - config.theme.panelPadding * 2 - PANEL_BORDER;\n\n    let dataFrame = tableResult;\n\n    if (dataFrame?.length) {\n      dataFrame = applyFieldOverrides({\n        data: [dataFrame],\n        timeZone,\n        theme: config.theme2,\n        replaceVariables: (v: string) => v,\n        fieldConfig: {\n          defaults: {},\n          overrides: [],\n        },\n      })[0];\n      // Bit of code smell here. We need to add links here to the frame modifying the frame on every render.\n      // Should work fine in essence but still not the ideal way to pass props. In logs container we do this\n      // differently and sidestep this getLinks API on a dataframe\n      for (const field of dataFrame.fields) {\n        field.getLinks = (config: ValueLinkConfig) => {\n          return getFieldLinksForExplore({\n            field,\n            rowIndex: config.valueRowIndex!,\n            splitOpenFn: splitOpen,\n            range,\n            dataFrame: dataFrame!,\n          });\n        };\n      }\n    }\n\n    return (\n      <Collapse label=\"Table\" loading={loading} isOpen>\n        {dataFrame?.length ? (\n          <Table\n            ariaLabel={ariaLabel}\n            data={dataFrame}\n            width={tableWidth}\n            height={height}\n            onCellFilterAdded={onCellFilterAdded}\n          />\n        ) : (\n          <MetaInfoText metaItems={[{ value: '0 series returned' }]} />\n        )}\n      </Collapse>\n    );\n  }\n}\n\nexport default connector(TableContainer);\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport * as React from 'react';\n\nimport { IconButton, Input } from '@grafana/ui';\n\nimport { TNil } from '../types/index';\n\ntype Props = {\n  allowClear?: boolean;\n  inputProps: Record<string, any>;\n  location: Location;\n  match: any;\n  trackFindFunction?: (str: string | TNil) => void;\n  value: string | undefined;\n  onChange: (value: string) => void;\n};\n\nexport default class UiFindInput extends React.PureComponent<Props> {\n  static defaultProps: Partial<Props> = {\n    inputProps: {},\n    trackFindFunction: undefined,\n    value: undefined,\n  };\n\n  clearUiFind = () => {\n    this.props.onChange('');\n  };\n\n  render() {\n    const { allowClear, inputProps, value } = this.props;\n\n    const suffix = (\n      <>\n        {inputProps.suffix}\n        {allowClear && value && value.length && <IconButton name=\"times\" onClick={this.clearUiFind} />}\n      </>\n    );\n\n    return (\n      <Input\n        placeholder=\"Find...\"\n        {...inputProps}\n        onChange={(e) => this.props.onChange(e.currentTarget.value)}\n        suffix={suffix}\n        value={value}\n      />\n    );\n  }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport const IN_TRACE_SEARCH = 'in-trace-search';\n","// Copyright (c) 2018 Uber Technologies, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { css } from '@emotion/css';\nimport cx from 'classnames';\nimport * as React from 'react';\nimport { memo } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Button, useStyles2 } from '@grafana/ui';\n\nimport UiFindInput from '../common/UiFindInput';\nimport { ubFlexAuto, ubJustifyEnd } from '../uberUtilityStyles';\n\nimport * as markers from './TracePageSearchBar.markers';\n// eslint-disable-next-line no-duplicate-imports\n\nexport const getStyles = (theme: GrafanaTheme2) => {\n  return {\n    TracePageSearchBar: css`\n      label: TracePageSearchBar;\n      float: right;\n      position: sticky;\n      top: 8px;\n      right: 0;\n      z-index: ${theme.zIndex.navbarFixed};\n      background: ${theme.colors.background.primary};\n      margin-top: 8px;\n      margin-bottom: -48px;\n      padding: 8px;\n      margin-right: 2px;\n      border-radius: 4px;\n      box-shadow: ${theme.shadows.z2};\n    `,\n    TracePageSearchBarBar: css`\n      label: TracePageSearchBarBar;\n      max-width: 20rem;\n      transition: max-width 0.5s;\n      &:focus-within {\n        max-width: 100%;\n      }\n    `,\n    TracePageSearchBarSuffix: css`\n      label: TracePageSearchBarSuffix;\n      opacity: 0.6;\n    `,\n    TracePageSearchBarBtn: css`\n      label: TracePageSearchBarBtn;\n      transition: 0.2s;\n      margin-left: 8px;\n    `,\n    TracePageSearchBarBtnDisabled: css`\n      label: TracePageSearchBarBtnDisabled;\n      opacity: 0.5;\n    `,\n    TracePageSearchBarLocateBtn: css`\n      label: TracePageSearchBarLocateBtn;\n      padding: 1px 8px 4px;\n    `,\n  };\n};\n\ntype TracePageSearchBarProps = {\n  prevResult: () => void;\n  nextResult: () => void;\n  navigable: boolean;\n  searchValue: string;\n  onSearchValueChange: (value: string) => void;\n  searchBarSuffix: string;\n};\n\nexport default memo(function TracePageSearchBar(props: TracePageSearchBarProps) {\n  const { navigable, nextResult, prevResult, onSearchValueChange, searchValue, searchBarSuffix } = props;\n  const styles = useStyles2(getStyles);\n\n  const suffix = searchValue ? (\n    <span className={styles.TracePageSearchBarSuffix} data-testid=\"trace-page-search-bar-suffix\">\n      {searchBarSuffix}\n    </span>\n  ) : null;\n\n  const btnClass = cx(styles.TracePageSearchBarBtn, { [styles.TracePageSearchBarBtnDisabled]: !searchValue });\n  const uiFindInputInputProps = {\n    'data-test': markers.IN_TRACE_SEARCH,\n    className: cx(styles.TracePageSearchBarBar, ubFlexAuto),\n    name: 'search',\n    suffix,\n  };\n\n  return (\n    <div className={styles.TracePageSearchBar}>\n      <span className={ubJustifyEnd} style={{ display: 'flex' }}>\n        <UiFindInput\n          onChange={onSearchValueChange}\n          value={searchValue}\n          inputProps={uiFindInputInputProps}\n          allowClear={true}\n        />\n        <>\n          {navigable && (\n            <>\n              <Button\n                className={btnClass}\n                variant=\"secondary\"\n                disabled={!searchValue}\n                type=\"button\"\n                icon=\"arrow-down\"\n                data-testid=\"trace-page-search-bar-next-result-button\"\n                onClick={nextResult}\n              />\n              <Button\n                className={btnClass}\n                variant=\"secondary\"\n                disabled={!searchValue}\n                type=\"button\"\n                icon=\"arrow-up\"\n                data-testid=\"trace-page-search-bar-prev-result-button\"\n                onClick={prevResult}\n              />\n            </>\n          )}\n        </>\n      </span>\n    </div>\n  );\n});\n","import React from 'react';\n\nimport {\n  DataFrame,\n  DataLink,\n  DataQuery,\n  DataSourceInstanceSettings,\n  dateTime,\n  Field,\n  KeyValue,\n  LinkModel,\n  mapInternalLinkToExplore,\n  rangeUtil,\n  SplitOpen,\n  TimeRange,\n} from '@grafana/data';\nimport { getTemplateSrv } from '@grafana/runtime';\nimport { Icon } from '@grafana/ui';\nimport { SpanLinkDef, SpanLinkFunc, TraceSpan } from '@jaegertracing/jaeger-ui-components';\nimport { TraceToLogsOptions } from 'app/core/components/TraceToLogs/TraceToLogsSettings';\nimport { getDatasourceSrv } from 'app/features/plugins/datasource_srv';\n\nimport { LokiQuery } from '../../../plugins/datasource/loki/types';\nimport { getFieldLinksForExplore } from '../utils/links';\n\n/**\n * This is a factory for the link creator. It returns the function mainly so it can return undefined in which case\n * the trace view won't create any links and to capture the datasource and split function making it easier to memoize\n * with useMemo.\n */\nexport function createSpanLinkFactory({\n  splitOpenFn,\n  traceToLogsOptions,\n  dataFrame,\n}: {\n  splitOpenFn: SplitOpen;\n  traceToLogsOptions?: TraceToLogsOptions;\n  dataFrame?: DataFrame;\n}): SpanLinkFunc | undefined {\n  if (!dataFrame || dataFrame.fields.length === 1 || !dataFrame.fields.some((f) => Boolean(f.config.links?.length))) {\n    // if the dataframe contains just a single blob of data (legacy format) or does not have any links configured,\n    // let's try to use the old legacy path.\n    return legacyCreateSpanLinkFactory(splitOpenFn, traceToLogsOptions);\n  } else {\n    return function SpanLink(span: TraceSpan): SpanLinkDef | undefined {\n      // We should be here only if there are some links in the dataframe\n      const field = dataFrame.fields.find((f) => Boolean(f.config.links?.length))!;\n      try {\n        const links = getFieldLinksForExplore({\n          field,\n          rowIndex: span.dataFrameRowIndex!,\n          splitOpenFn,\n          range: getTimeRangeFromSpan(span),\n          dataFrame,\n        });\n\n        return {\n          href: links[0].href,\n          onClick: links[0].onClick,\n          content: <Icon name=\"gf-logs\" title=\"Explore the logs for this in split view\" />,\n        };\n      } catch (error) {\n        // It's fairly easy to crash here for example if data source defines wrong interpolation in the data link\n        console.error(error);\n        return undefined;\n      }\n    };\n  }\n}\n\nfunction legacyCreateSpanLinkFactory(splitOpenFn: SplitOpen, traceToLogsOptions?: TraceToLogsOptions) {\n  // We should return if dataSourceUid is undefined otherwise getInstanceSettings would return testDataSource.\n  if (!traceToLogsOptions?.datasourceUid) {\n    return undefined;\n  }\n\n  const dataSourceSettings = getDatasourceSrv().getInstanceSettings(traceToLogsOptions.datasourceUid);\n  const isSplunkDS = dataSourceSettings?.type === 'grafana-splunk-datasource';\n\n  if (!dataSourceSettings) {\n    return undefined;\n  }\n\n  return function SpanLink(span: TraceSpan): SpanLinkDef | undefined {\n    // This is reusing existing code from derived fields which may not be ideal match so some data is a bit faked at\n    // the moment. Issue is that the trace itself isn't clearly mapped to dataFrame (right now it's just a json blob\n    // inside a single field) so the dataLinks as config of that dataFrame abstraction breaks down a bit and we do\n    // it manually here instead of leaving it for the data source to supply the config.\n    let dataLink: DataLink<LokiQuery | DataQuery> | undefined = {} as DataLink<LokiQuery | DataQuery> | undefined;\n    let link: LinkModel<Field>;\n\n    switch (dataSourceSettings?.type) {\n      case 'loki':\n        dataLink = getLinkForLoki(span, traceToLogsOptions, dataSourceSettings);\n        if (!dataLink) {\n          return undefined;\n        }\n        break;\n      case 'grafana-splunk-datasource':\n        dataLink = getLinkForSplunk(span, traceToLogsOptions, dataSourceSettings);\n        break;\n      default:\n        return undefined;\n    }\n\n    link = mapInternalLinkToExplore({\n      link: dataLink,\n      internalLink: dataLink?.internal!,\n      scopedVars: {},\n      range: getTimeRangeFromSpan(\n        span,\n        {\n          startMs: traceToLogsOptions.spanStartTimeShift\n            ? rangeUtil.intervalToMs(traceToLogsOptions.spanStartTimeShift)\n            : 0,\n          endMs: traceToLogsOptions.spanEndTimeShift ? rangeUtil.intervalToMs(traceToLogsOptions.spanEndTimeShift) : 0,\n        },\n        isSplunkDS\n      ),\n      field: {} as Field,\n      onClickFn: splitOpenFn,\n      replaceVariables: getTemplateSrv().replace.bind(getTemplateSrv()),\n    });\n\n    return {\n      href: link.href,\n      onClick: link.onClick,\n      content: <Icon name=\"gf-logs\" title=\"Explore the logs for this in split view\" />,\n    };\n  };\n}\n\n/**\n * Default keys to use when there are no configured tags.\n */\nconst defaultKeys = ['cluster', 'hostname', 'namespace', 'pod'];\nfunction getLinkForLoki(span: TraceSpan, options: TraceToLogsOptions, dataSourceSettings: DataSourceInstanceSettings) {\n  const { tags: keys, filterByTraceID, filterBySpanID, mapTagNamesEnabled, mappedTags } = options;\n\n  // In order, try to use mapped tags -> tags -> default tags\n  const keysToCheck = mapTagNamesEnabled && mappedTags?.length ? mappedTags : keys?.length ? keys : defaultKeys;\n  // Build tag portion of query\n  const tags = [...span.process.tags, ...span.tags].reduce((acc, tag) => {\n    if (mapTagNamesEnabled) {\n      const keyValue = (keysToCheck as KeyValue[]).find((keyValue: KeyValue) => keyValue.key === tag.key);\n      if (keyValue) {\n        acc.push(`${keyValue.value ? keyValue.value : keyValue.key}=\"${tag.value}\"`);\n      }\n    } else {\n      if ((keysToCheck as string[]).includes(tag.key)) {\n        acc.push(`${tag.key}=\"${tag.value}\"`);\n      }\n    }\n    return acc;\n  }, [] as string[]);\n\n  // If no tags found, return undefined to prevent an invalid Loki query\n  if (!tags.length) {\n    return undefined;\n  }\n  let expr = `{${tags.join(', ')}}`;\n  if (filterByTraceID && span.traceID) {\n    expr += ` |=\"${span.traceID}\"`;\n  }\n  if (filterBySpanID && span.spanID) {\n    expr += ` |=\"${span.spanID}\"`;\n  }\n\n  const dataLink: DataLink<LokiQuery> = {\n    title: dataSourceSettings.name,\n    url: '',\n    internal: {\n      datasourceUid: dataSourceSettings.uid,\n      datasourceName: dataSourceSettings.name,\n      query: {\n        expr: expr,\n        refId: '',\n      },\n    },\n  };\n\n  return dataLink;\n}\n\nfunction getLinkForSplunk(\n  span: TraceSpan,\n  options: TraceToLogsOptions,\n  dataSourceSettings: DataSourceInstanceSettings\n) {\n  const { tags: keys, filterByTraceID, filterBySpanID, mapTagNamesEnabled, mappedTags } = options;\n\n  // In order, try to use mapped tags -> tags -> default tags\n  const keysToCheck = mapTagNamesEnabled && mappedTags?.length ? mappedTags : keys?.length ? keys : defaultKeys;\n  // Build tag portion of query\n  const tags = [...span.process.tags, ...span.tags].reduce((acc, tag) => {\n    if (mapTagNamesEnabled) {\n      const keyValue = (keysToCheck as KeyValue[]).find((keyValue: KeyValue) => keyValue.key === tag.key);\n      if (keyValue) {\n        acc.push(`${keyValue.value ? keyValue.value : keyValue.key}=\"${tag.value}\"`);\n      }\n    } else {\n      if ((keysToCheck as string[]).includes(tag.key)) {\n        acc.push(`${tag.key}=\"${tag.value}\"`);\n      }\n    }\n    return acc;\n  }, [] as string[]);\n\n  let query = '';\n  if (tags.length > 0) {\n    query += `${tags.join(' ')}`;\n  }\n  if (filterByTraceID && span.traceID) {\n    query += ` \"${span.traceID}\"`;\n  }\n  if (filterBySpanID && span.spanID) {\n    query += ` \"${span.spanID}\"`;\n  }\n\n  const dataLink: DataLink<DataQuery> = {\n    title: dataSourceSettings.name,\n    url: '',\n    internal: {\n      datasourceUid: dataSourceSettings.uid,\n      datasourceName: dataSourceSettings.name,\n      query: {\n        query: query,\n        refId: '',\n      },\n    },\n  } as DataLink<DataQuery>;\n\n  return dataLink;\n}\n\n/**\n * Gets a time range from the span.\n */\nfunction getTimeRangeFromSpan(\n  span: TraceSpan,\n  timeShift: { startMs: number; endMs: number } = { startMs: 0, endMs: 0 },\n  isSplunkDS = false\n): TimeRange {\n  const adjustedStartTime = Math.floor(span.startTime / 1000 + timeShift.startMs);\n  const from = dateTime(adjustedStartTime);\n  const spanEndMs = (span.startTime + span.duration) / 1000;\n  let adjustedEndTime = Math.floor(spanEndMs + timeShift.endMs);\n\n  // Splunk requires a time interval of >= 1s, rather than >=1ms like Loki timerange in below elseif block\n  if (isSplunkDS && adjustedEndTime - adjustedStartTime < 1000) {\n    adjustedEndTime = adjustedStartTime + 1000;\n  } else if (adjustedStartTime === adjustedEndTime) {\n    // Because we can only pass milliseconds in the url we need to check if they equal.\n    // We need end time to be later than start time\n    adjustedEndTime++;\n  }\n\n  const to = dateTime(adjustedEndTime);\n\n  // Beware that public/app/features/explore/state/main.ts SplitOpen fn uses the range from here. No matter what is in the url.\n  return {\n    from,\n    to,\n    raw: {\n      from,\n      to,\n    },\n  };\n}\n","import { TraceLog, TraceSpanReference } from '@jaegertracing/jaeger-ui-components/src/types/trace';\nimport { useCallback, useState, useEffect } from 'react';\n\nimport { DataFrame } from '@grafana/data';\nimport { DetailState } from '@jaegertracing/jaeger-ui-components';\n\n/**\n * Keeps state of the span detail. This means whether span details are open but also state of each detail subitem\n * like logs or tags.\n */\nexport function useDetailState(frame: DataFrame) {\n  const [detailStates, setDetailStates] = useState(new Map<string, DetailState>());\n\n  // Clear detail state when new trace arrives\n  useEffect(() => {\n    setDetailStates(new Map<string, DetailState>());\n  }, [frame, setDetailStates]);\n\n  const toggleDetail = useCallback(\n    function toggleDetail(spanID: string) {\n      const newDetailStates = new Map(detailStates);\n      if (newDetailStates.has(spanID)) {\n        newDetailStates.delete(spanID);\n      } else {\n        newDetailStates.set(spanID, new DetailState());\n      }\n      setDetailStates(newDetailStates);\n    },\n    [detailStates]\n  );\n\n  const detailLogItemToggle = useCallback(\n    function detailLogItemToggle(spanID: string, log: TraceLog) {\n      const old = detailStates.get(spanID);\n      if (!old) {\n        return;\n      }\n      const detailState = old.toggleLogItem(log);\n      const newDetailStates = new Map(detailStates);\n      newDetailStates.set(spanID, detailState);\n      return setDetailStates(newDetailStates);\n    },\n    [detailStates]\n  );\n\n  const detailReferenceItemToggle = useCallback(\n    function detailReferenceItemToggle(spanID: string, reference: TraceSpanReference) {\n      const old = detailStates.get(spanID);\n      if (!old) {\n        return;\n      }\n      const detailState = old.toggleReferenceItem(reference);\n      const newDetailStates = new Map(detailStates);\n      newDetailStates.set(spanID, detailState);\n      return setDetailStates(newDetailStates);\n    },\n    [detailStates]\n  );\n\n  return {\n    detailStates,\n    toggleDetail,\n    detailLogItemToggle,\n    detailLogsToggle: useCallback(\n      (spanID: string) => makeDetailSubsectionToggle('logs', detailStates, setDetailStates)(spanID),\n      [detailStates]\n    ),\n    detailWarningsToggle: useCallback(\n      (spanID: string) => makeDetailSubsectionToggle('warnings', detailStates, setDetailStates)(spanID),\n      [detailStates]\n    ),\n    detailStackTracesToggle: useCallback(\n      (spanID: string) => makeDetailSubsectionToggle('stackTraces', detailStates, setDetailStates)(spanID),\n      [detailStates]\n    ),\n    detailReferenceItemToggle,\n    detailReferencesToggle: useCallback(\n      (spanID: string) => makeDetailSubsectionToggle('references', detailStates, setDetailStates)(spanID),\n      [detailStates]\n    ),\n    detailProcessToggle: useCallback(\n      (spanID: string) => makeDetailSubsectionToggle('process', detailStates, setDetailStates)(spanID),\n      [detailStates]\n    ),\n    detailTagsToggle: useCallback(\n      (spanID: string) => makeDetailSubsectionToggle('tags', detailStates, setDetailStates)(spanID),\n      [detailStates]\n    ),\n  };\n}\n\nfunction makeDetailSubsectionToggle(\n  subSection: 'tags' | 'process' | 'logs' | 'warnings' | 'references' | 'stackTraces',\n  detailStates: Map<string, DetailState>,\n  setDetailStates: (detailStates: Map<string, DetailState>) => void\n) {\n  return (spanID: string) => {\n    const old = detailStates.get(spanID);\n    if (!old) {\n      return;\n    }\n    let detailState;\n    if (subSection === 'tags') {\n      detailState = old.toggleTags();\n    } else if (subSection === 'process') {\n      detailState = old.toggleProcess();\n    } else if (subSection === 'warnings') {\n      detailState = old.toggleWarnings();\n    } else if (subSection === 'references') {\n      detailState = old.toggleReferences();\n    } else if (subSection === 'stackTraces') {\n      detailState = old.toggleStackTraces();\n    } else {\n      detailState = old.toggleLogs();\n    }\n    const newDetailStates = new Map(detailStates);\n    newDetailStates.set(spanID, detailState);\n    setDetailStates(newDetailStates);\n  };\n}\n","import React, { RefObject, useCallback, useEffect, useMemo, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport {\n  DataFrame,\n  DataLink,\n  DataSourceApi,\n  Field,\n  LinkModel,\n  LoadingState,\n  mapInternalLinkToExplore,\n  PanelData,\n  SplitOpen,\n} from '@grafana/data';\nimport { getTemplateSrv } from '@grafana/runtime';\nimport {\n  Trace,\n  TracePageHeader,\n  TraceSpan,\n  TraceTimelineViewer,\n  TTraceTimeline,\n} from '@jaegertracing/jaeger-ui-components';\nimport { TraceToLogsData } from 'app/core/components/TraceToLogs/TraceToLogsSettings';\nimport { getDatasourceSrv } from 'app/features/plugins/datasource_srv';\nimport { getTimeZone } from 'app/features/profile/state/selectors';\nimport { StoreState } from 'app/types';\nimport { ExploreId } from 'app/types/explore';\n\nimport { changePanelState } from '../state/explorePane';\n\nimport { createSpanLinkFactory } from './createSpanLink';\nimport { useDetailState } from './useDetailState';\nimport { useHoverIndentGuide } from './useHoverIndentGuide';\nimport { useViewRange } from './useViewRange';\n\nfunction noop(): {} {\n  return {};\n}\n\ntype Props = {\n  dataFrames: DataFrame[];\n  splitOpenFn: SplitOpen;\n  exploreId: ExploreId;\n  scrollElement?: Element;\n  topOfExploreViewRef?: RefObject<HTMLDivElement>;\n  traceProp: Trace;\n  spanFindMatches?: Set<string>;\n  search: string;\n  focusedSpanIdForSearch: string;\n  expandOne: (spans: TraceSpan[]) => void;\n  expandAll: () => void;\n  collapseOne: (spans: TraceSpan[]) => void;\n  collapseAll: (spans: TraceSpan[]) => void;\n  childrenToggle: (spanId: string) => void;\n  childrenHiddenIDs: Set<string>;\n  queryResponse: PanelData;\n};\n\nexport function TraceView(props: Props) {\n  const {\n    expandOne,\n    expandAll,\n    collapseOne,\n    collapseAll,\n    childrenToggle,\n    childrenHiddenIDs,\n    spanFindMatches,\n    traceProp,\n  } = props;\n\n  const {\n    detailStates,\n    toggleDetail,\n    detailLogItemToggle,\n    detailLogsToggle,\n    detailProcessToggle,\n    detailReferencesToggle,\n    detailReferenceItemToggle,\n    detailTagsToggle,\n    detailWarningsToggle,\n    detailStackTracesToggle,\n  } = useDetailState(props.dataFrames[0]);\n\n  const { removeHoverIndentGuideId, addHoverIndentGuideId, hoverIndentGuideIds } = useHoverIndentGuide();\n  const { viewRange, updateViewRangeTime, updateNextViewRangeTime } = useViewRange();\n\n  /**\n   * Keeps state of resizable name column width\n   */\n  const [spanNameColumnWidth, setSpanNameColumnWidth] = useState(0.25);\n  /**\n   * State of the top minimap, slim means it is collapsed.\n   */\n  const [slim, setSlim] = useState(false);\n\n  const datasource = useSelector(\n    (state: StoreState) => state.explore[props.exploreId]?.datasourceInstance ?? undefined\n  );\n\n  const [focusedSpanId, createFocusSpanLink] = useFocusSpanLink({\n    refId: props.dataFrames[0]?.refId,\n    exploreId: props.exploreId,\n    datasource,\n  });\n\n  const createLinkToExternalSpan = (traceId: string, spanId: string) => {\n    const link = createFocusSpanLink(traceId, spanId);\n    return link.href;\n  };\n\n  const traceTimeline: TTraceTimeline = useMemo(\n    () => ({\n      childrenHiddenIDs,\n      detailStates,\n      hoverIndentGuideIds,\n      shouldScrollToFirstUiFindMatch: false,\n      spanNameColumnWidth,\n      traceID: props.traceProp?.traceID,\n    }),\n    [childrenHiddenIDs, detailStates, hoverIndentGuideIds, spanNameColumnWidth, props.traceProp?.traceID]\n  );\n\n  useEffect(() => {\n    if (props.queryResponse.state === LoadingState.Done) {\n      props.topOfExploreViewRef?.current?.scrollIntoView();\n    }\n  }, [props.queryResponse, props.topOfExploreViewRef]);\n\n  const traceToLogsOptions = (getDatasourceSrv().getInstanceSettings(datasource?.name)?.jsonData as TraceToLogsData)\n    ?.tracesToLogs;\n  const createSpanLink = useMemo(\n    () => createSpanLinkFactory({ splitOpenFn: props.splitOpenFn, traceToLogsOptions, dataFrame: props.dataFrames[0] }),\n    [props.splitOpenFn, traceToLogsOptions, props.dataFrames]\n  );\n  const onSlimViewClicked = useCallback(() => setSlim(!slim), [slim]);\n  const timeZone = useSelector((state: StoreState) => getTimeZone(state.user));\n\n  if (!props.dataFrames?.length || !traceProp) {\n    return null;\n  }\n\n  return (\n    <>\n      <TracePageHeader\n        canCollapse={false}\n        hideMap={false}\n        hideSummary={false}\n        onSlimViewClicked={onSlimViewClicked}\n        onTraceGraphViewClicked={noop}\n        slimView={slim}\n        trace={traceProp}\n        updateNextViewRangeTime={updateNextViewRangeTime}\n        updateViewRangeTime={updateViewRangeTime}\n        viewRange={viewRange}\n        timeZone={timeZone}\n      />\n      <TraceTimelineViewer\n        registerAccessors={noop}\n        scrollToFirstVisibleSpan={noop}\n        findMatchesIDs={spanFindMatches}\n        trace={traceProp}\n        traceTimeline={traceTimeline}\n        updateNextViewRangeTime={updateNextViewRangeTime}\n        updateViewRangeTime={updateViewRangeTime}\n        viewRange={viewRange}\n        focusSpan={noop}\n        createLinkToExternalSpan={createLinkToExternalSpan}\n        setSpanNameColumnWidth={setSpanNameColumnWidth}\n        collapseAll={collapseAll}\n        collapseOne={collapseOne}\n        expandAll={expandAll}\n        expandOne={expandOne}\n        childrenToggle={childrenToggle}\n        clearShouldScrollToFirstUiFindMatch={noop}\n        detailLogItemToggle={detailLogItemToggle}\n        detailLogsToggle={detailLogsToggle}\n        detailWarningsToggle={detailWarningsToggle}\n        detailStackTracesToggle={detailStackTracesToggle}\n        detailReferencesToggle={detailReferencesToggle}\n        detailReferenceItemToggle={detailReferenceItemToggle}\n        detailProcessToggle={detailProcessToggle}\n        detailTagsToggle={detailTagsToggle}\n        detailToggle={toggleDetail}\n        setTrace={noop}\n        addHoverIndentGuideId={addHoverIndentGuideId}\n        removeHoverIndentGuideId={removeHoverIndentGuideId}\n        linksGetter={noop as any}\n        uiFind={props.search}\n        createSpanLink={createSpanLink}\n        scrollElement={props.scrollElement}\n        focusedSpanId={focusedSpanId}\n        focusedSpanIdForSearch={props.focusedSpanIdForSearch}\n        createFocusSpanLink={createFocusSpanLink}\n        topOfExploreViewRef={props.topOfExploreViewRef}\n      />\n    </>\n  );\n}\n\n/**\n * Handles focusing a span. Returns the span id to focus to based on what is in current explore state and also a\n * function to change the focused span id.\n * @param options\n */\nfunction useFocusSpanLink(options: {\n  exploreId: ExploreId;\n  refId?: string;\n  datasource?: DataSourceApi;\n}): [string | undefined, (traceId: string, spanId: string) => LinkModel<Field>] {\n  const panelState = useSelector((state: StoreState) => state.explore[options.exploreId]?.panelsState.trace);\n  const focusedSpanId = panelState?.spanId;\n\n  const dispatch = useDispatch();\n  const setFocusedSpanId = (spanId?: string) =>\n    dispatch(\n      changePanelState(options.exploreId, 'trace', {\n        ...panelState,\n        spanId,\n      })\n    );\n\n  const query = useSelector((state: StoreState) =>\n    state.explore[options.exploreId]?.queries.find((query) => query.refId === options.refId)\n  );\n\n  const createFocusSpanLink = (traceId: string, spanId: string) => {\n    const link: DataLink = {\n      title: 'Deep link to this span',\n      url: '',\n      internal: {\n        datasourceUid: options.datasource?.uid!,\n        datasourceName: options.datasource?.name!,\n        query: query,\n        panelsState: {\n          trace: {\n            spanId,\n          },\n        },\n      },\n    };\n\n    return mapInternalLinkToExplore({\n      link,\n      internalLink: link.internal!,\n      scopedVars: {},\n      range: {} as any,\n      field: {} as Field,\n      onClickFn: () => setFocusedSpanId(focusedSpanId === spanId ? undefined : spanId),\n      replaceVariables: getTemplateSrv().replace.bind(getTemplateSrv()),\n    });\n  };\n\n  return [focusedSpanId, createFocusSpanLink];\n}\n","import { useCallback, useState } from 'react';\n\n/**\n * This is used internally to handle hover state of indent guide. As indent guides are separate\n * components per each row/span and you need to highlight all in multiple rows to make the effect of single line\n * they need this kind of common imperative state changes.\n *\n * Ideally would be changed to trace view internal state.\n */\nexport function useHoverIndentGuide() {\n  const [hoverIndentGuideIds, setHoverIndentGuideIds] = useState(new Set<string>());\n\n  const addHoverIndentGuideId = useCallback(function addHoverIndentGuideId(spanID: string) {\n    setHoverIndentGuideIds((prevState) => {\n      const newHoverIndentGuideIds = new Set(prevState);\n      newHoverIndentGuideIds.add(spanID);\n      return newHoverIndentGuideIds;\n    });\n  }, []);\n\n  const removeHoverIndentGuideId = useCallback(function removeHoverIndentGuideId(spanID: string) {\n    setHoverIndentGuideIds((prevState) => {\n      const newHoverIndentGuideIds = new Set(prevState);\n      newHoverIndentGuideIds.delete(spanID);\n      return newHoverIndentGuideIds;\n    });\n  }, []);\n\n  return { hoverIndentGuideIds, addHoverIndentGuideId, removeHoverIndentGuideId };\n}\n","import { useCallback, useState } from 'react';\n\nimport { ViewRangeTimeUpdate, ViewRange } from '@jaegertracing/jaeger-ui-components';\n\n/**\n * Controls state of the zoom function that can be used through minimap in header or on the timeline. ViewRange contains\n * state not only for current range that is showing but range that is currently being selected by the user.\n */\nexport function useViewRange() {\n  const [viewRange, setViewRange] = useState<ViewRange>({\n    time: {\n      current: [0, 1],\n    },\n  });\n\n  const updateNextViewRangeTime = useCallback(function updateNextViewRangeTime(update: ViewRangeTimeUpdate) {\n    setViewRange((prevRange): ViewRange => {\n      const time = { ...prevRange.time, ...update };\n      return { ...prevRange, time };\n    });\n  }, []);\n\n  const updateViewRangeTime = useCallback(function updateViewRangeTime(start: number, end: number) {\n    const current: [number, number] = [start, end];\n    const time = { current };\n    setViewRange((prevRange): ViewRange => {\n      return { ...prevRange, time };\n    });\n  }, []);\n\n  return { viewRange, updateViewRangeTime, updateNextViewRangeTime };\n}\n","import { useCallback, useState } from 'react';\n\nimport { TraceSpan } from '@jaegertracing/jaeger-ui-components';\n\n/**\n * Children state means whether spans are collapsed or not. Also provides some functions to manipulate that state.\n */\nexport function useChildrenState() {\n  const [childrenHiddenIDs, setChildrenHiddenIDs] = useState(new Set<string>());\n\n  const expandOne = useCallback(\n    function expandOne(spans: TraceSpan[]) {\n      if (childrenHiddenIDs.size === 0) {\n        return;\n      }\n      let prevExpandedDepth = -1;\n      let expandNextHiddenSpan = true;\n      const newChildrenHiddenIDs = spans.reduce((res, s) => {\n        if (s.depth <= prevExpandedDepth) {\n          expandNextHiddenSpan = true;\n        }\n        if (expandNextHiddenSpan && res.has(s.spanID)) {\n          res.delete(s.spanID);\n          expandNextHiddenSpan = false;\n          prevExpandedDepth = s.depth;\n        }\n        return res;\n      }, new Set(childrenHiddenIDs));\n      setChildrenHiddenIDs(newChildrenHiddenIDs);\n    },\n    [childrenHiddenIDs]\n  );\n\n  const collapseOne = useCallback(\n    function collapseOne(spans: TraceSpan[]) {\n      if (shouldDisableCollapse(spans, childrenHiddenIDs)) {\n        return;\n      }\n      let nearestCollapsedAncestor: TraceSpan | undefined;\n      const newChildrenHiddenIDs = spans.reduce((res, curSpan) => {\n        if (nearestCollapsedAncestor && curSpan.depth <= nearestCollapsedAncestor.depth) {\n          res.add(nearestCollapsedAncestor.spanID);\n          if (curSpan.hasChildren) {\n            nearestCollapsedAncestor = curSpan;\n          }\n        } else if (curSpan.hasChildren && !res.has(curSpan.spanID)) {\n          nearestCollapsedAncestor = curSpan;\n        }\n        return res;\n      }, new Set(childrenHiddenIDs));\n      // The last one\n      if (nearestCollapsedAncestor) {\n        newChildrenHiddenIDs.add(nearestCollapsedAncestor.spanID);\n      }\n      setChildrenHiddenIDs(newChildrenHiddenIDs);\n    },\n    [childrenHiddenIDs]\n  );\n\n  const expandAll = useCallback(function expandAll() {\n    setChildrenHiddenIDs(new Set<string>());\n  }, []);\n\n  const collapseAll = useCallback(\n    function collapseAll(spans: TraceSpan[]) {\n      if (shouldDisableCollapse(spans, childrenHiddenIDs)) {\n        return;\n      }\n      const newChildrenHiddenIDs = spans.reduce((res, s) => {\n        if (s.hasChildren) {\n          res.add(s.spanID);\n        }\n        return res;\n      }, new Set<string>());\n\n      setChildrenHiddenIDs(newChildrenHiddenIDs);\n    },\n    [childrenHiddenIDs]\n  );\n\n  const childrenToggle = useCallback(\n    function childrenToggle(spanID: string) {\n      const newChildrenHiddenIDs = new Set(childrenHiddenIDs);\n      if (childrenHiddenIDs.has(spanID)) {\n        newChildrenHiddenIDs.delete(spanID);\n      } else {\n        newChildrenHiddenIDs.add(spanID);\n      }\n      setChildrenHiddenIDs(newChildrenHiddenIDs);\n    },\n    [childrenHiddenIDs]\n  );\n\n  return {\n    childrenHiddenIDs,\n    expandOne,\n    collapseOne,\n    expandAll,\n    collapseAll,\n    childrenToggle,\n  };\n}\n\nfunction shouldDisableCollapse(allSpans: TraceSpan[], hiddenSpansIds: Set<string>) {\n  const allParentSpans = allSpans.filter((s) => s.hasChildren);\n  return allParentSpans.length === hiddenSpansIds.size;\n}\n","import { DataFrame, DataFrameView, TraceSpanRow } from '@grafana/data';\nimport { Trace, TraceProcess, TraceResponse, transformTraceData } from '@jaegertracing/jaeger-ui-components';\n\nexport function transformDataFrames(frame?: DataFrame): Trace | null {\n  if (!frame) {\n    return null;\n  }\n  let data: TraceResponse =\n    frame.fields.length === 1\n      ? // For backward compatibility when we sent whole json response in a single field/value\n        frame.fields[0].values.get(0)\n      : transformTraceDataFrame(frame);\n  return transformTraceData(data);\n}\n\nfunction transformTraceDataFrame(frame: DataFrame): TraceResponse {\n  const view = new DataFrameView<TraceSpanRow>(frame);\n  const processes: Record<string, TraceProcess> = {};\n  for (let i = 0; i < view.length; i++) {\n    const span = view.get(i);\n    if (!processes[span.spanID]) {\n      processes[span.spanID] = {\n        serviceName: span.serviceName,\n        tags: span.serviceTags,\n      };\n    }\n  }\n\n  return {\n    traceID: view.get(0).traceID,\n    processes,\n    spans: view.toArray().map((s, index) => {\n      const references = [];\n      if (s.parentSpanID) {\n        references.push({ refType: 'CHILD_OF' as const, spanID: s.parentSpanID, traceID: s.traceID });\n      }\n      if (s.references) {\n        references.push(...s.references.map((reference) => ({ refType: 'FOLLOWS_FROM' as const, ...reference })));\n      }\n      return {\n        ...s,\n        duration: s.duration * 1000,\n        startTime: s.startTime * 1000,\n        processID: s.spanID,\n        flags: 0,\n        references,\n        logs: s.logs?.map((l) => ({ ...l, timestamp: l.timestamp * 1000 })) || [],\n        dataFrameRowIndex: index,\n      };\n    }),\n  };\n}\n","import TracePageSearchBar from '@jaegertracing/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar';\nimport React, { RefObject, useMemo, useState } from 'react';\n\nimport { DataFrame, SplitOpen, PanelData } from '@grafana/data';\nimport { Collapse } from '@grafana/ui';\nimport { ExploreId } from 'app/types/explore';\n\nimport { TraceView } from './TraceView';\nimport { useChildrenState } from './useChildrenState';\nimport { useSearch } from './useSearch';\nimport { transformDataFrames } from './utils/transform';\ninterface Props {\n  dataFrames: DataFrame[];\n  splitOpenFn: SplitOpen;\n  exploreId: ExploreId;\n  scrollElement?: Element;\n  topOfExploreViewRef?: RefObject<HTMLDivElement>;\n  queryResponse: PanelData;\n}\nexport function TraceViewContainer(props: Props) {\n  // At this point we only show single trace\n  const frame = props.dataFrames[0];\n\n  const { dataFrames, splitOpenFn, exploreId, scrollElement, topOfExploreViewRef, queryResponse } = props;\n  const traceProp = useMemo(() => transformDataFrames(frame), [frame]);\n  const { search, setSearch, spanFindMatches } = useSearch(traceProp?.spans);\n  const { expandOne, collapseOne, childrenToggle, collapseAll, childrenHiddenIDs, expandAll } = useChildrenState();\n\n  const [focusedSpanIdForSearch, setFocusedSpanIdForSearch] = useState('');\n  const [searchBarSuffix, setSearchBarSuffix] = useState('');\n\n  const setTraceSearch = (value: string) => {\n    setFocusedSpanIdForSearch('');\n    setSearchBarSuffix('');\n    setSearch(value);\n  };\n\n  const nextResult = () => {\n    expandAll();\n    const spanMatches = Array.from(spanFindMatches!);\n    const prevMatchedIndex = spanMatches.indexOf(focusedSpanIdForSearch)\n      ? spanMatches.indexOf(focusedSpanIdForSearch)\n      : 0;\n\n    // new query || at end, go to start\n    if (prevMatchedIndex === -1 || prevMatchedIndex === spanMatches.length - 1) {\n      setFocusedSpanIdForSearch(spanMatches[0]);\n      setSearchBarSuffix(getSearchBarSuffix(1));\n      return;\n    }\n\n    // get next\n    setFocusedSpanIdForSearch(spanMatches[prevMatchedIndex + 1]);\n    setSearchBarSuffix(getSearchBarSuffix(prevMatchedIndex + 2));\n  };\n\n  const prevResult = () => {\n    expandAll();\n    const spanMatches = Array.from(spanFindMatches!);\n    const prevMatchedIndex = spanMatches.indexOf(focusedSpanIdForSearch)\n      ? spanMatches.indexOf(focusedSpanIdForSearch)\n      : 0;\n\n    // new query || at start, go to end\n    if (prevMatchedIndex === -1 || prevMatchedIndex === 0) {\n      setFocusedSpanIdForSearch(spanMatches[spanMatches.length - 1]);\n      setSearchBarSuffix(getSearchBarSuffix(spanMatches.length));\n      return;\n    }\n\n    // get prev\n    setFocusedSpanIdForSearch(spanMatches[prevMatchedIndex - 1]);\n    setSearchBarSuffix(getSearchBarSuffix(prevMatchedIndex));\n  };\n\n  const getSearchBarSuffix = (index: number): string => {\n    if (spanFindMatches?.size && spanFindMatches?.size > 0) {\n      return index + ' of ' + spanFindMatches?.size;\n    }\n    return '';\n  };\n\n  if (!traceProp) {\n    return null;\n  }\n\n  return (\n    <>\n      <TracePageSearchBar\n        nextResult={nextResult}\n        prevResult={prevResult}\n        navigable={true}\n        searchValue={search}\n        onSearchValueChange={setTraceSearch}\n        searchBarSuffix={searchBarSuffix}\n      />\n\n      <Collapse label=\"Trace View\" isOpen>\n        <TraceView\n          exploreId={exploreId}\n          dataFrames={dataFrames}\n          splitOpenFn={splitOpenFn}\n          scrollElement={scrollElement}\n          topOfExploreViewRef={topOfExploreViewRef}\n          traceProp={traceProp}\n          spanFindMatches={spanFindMatches}\n          search={search}\n          focusedSpanIdForSearch={focusedSpanIdForSearch}\n          expandOne={expandOne}\n          collapseOne={collapseOne}\n          collapseAll={collapseAll}\n          expandAll={expandAll}\n          childrenToggle={childrenToggle}\n          childrenHiddenIDs={childrenHiddenIDs}\n          queryResponse={queryResponse}\n        />\n      </Collapse>\n    </>\n  );\n}\n","import { useMemo, useState } from 'react';\n\nimport { filterSpans, TraceSpan } from '@jaegertracing/jaeger-ui-components';\n\n/**\n * Controls the state of search input that highlights spans if they match the search string.\n * @param spans\n */\nexport function useSearch(spans?: TraceSpan[]) {\n  const [search, setSearch] = useState('');\n  const spanFindMatches: Set<string> | undefined = useMemo(() => {\n    return search && spans ? filterSpans(search, spans) : undefined;\n  }, [search, spans]);\n\n  return { search, setSearch, spanFindMatches };\n}\n","import { css, cx } from '@emotion/css';\nimport memoizeOne from 'memoize-one';\nimport React, { createRef } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\nimport AutoSizer from 'react-virtualized-auto-sizer';\nimport { compose } from 'redux';\nimport { Unsubscribable } from 'rxjs';\n\nimport { AbsoluteTimeRange, DataQuery, GrafanaTheme2, LoadingState, RawTimeRange } from '@grafana/data';\nimport { selectors } from '@grafana/e2e-selectors';\nimport { Collapse, CustomScrollbar, ErrorBoundaryAlert, Themeable2, withTheme2 } from '@grafana/ui';\nimport { FILTER_FOR_OPERATOR, FILTER_OUT_OPERATOR, FilterItem } from '@grafana/ui/src/components/Table/types';\nimport appEvents from 'app/core/app_events';\nimport { getNodeGraphDataFrames } from 'app/plugins/panel/nodeGraph/utils';\nimport { StoreState } from 'app/types';\nimport { AbsoluteTimeEvent } from 'app/types/events';\nimport { ExploreGraphStyle, ExploreId, ExploreItemState } from 'app/types/explore';\n\nimport { getTimeZone } from '../profile/state/selectors';\n\nimport { ExploreGraph } from './ExploreGraph';\nimport { ExploreGraphLabel } from './ExploreGraphLabel';\nimport ExploreQueryInspector from './ExploreQueryInspector';\nimport { ExploreToolbar } from './ExploreToolbar';\nimport LogsContainer from './LogsContainer';\nimport { LogsVolumePanel } from './LogsVolumePanel';\nimport { NoDataSourceCallToAction } from './NoDataSourceCallToAction';\nimport { NodeGraphContainer } from './NodeGraphContainer';\nimport { QueryRows } from './QueryRows';\nimport { ResponseErrorContainer } from './ResponseErrorContainer';\nimport RichHistoryContainer from './RichHistory/RichHistoryContainer';\nimport { SecondaryActions } from './SecondaryActions';\nimport TableContainer from './TableContainer';\nimport { TraceViewContainer } from './TraceView/TraceViewContainer';\nimport { changeSize, changeGraphStyle } from './state/explorePane';\nimport { splitOpen } from './state/main';\nimport { addQueryRow, loadLogsVolumeData, modifyQueries, scanStart, scanStopAction, setQueries } from './state/query';\nimport { makeAbsoluteTime, updateTimeRange } from './state/time';\n\nconst getStyles = (theme: GrafanaTheme2) => {\n  return {\n    exploreMain: css`\n      label: exploreMain;\n      // Is needed for some transition animations to work.\n      position: relative;\n      margin-top: 21px;\n    `,\n    button: css`\n      label: button;\n      margin: 1em 4px 0 0;\n    `,\n    queryContainer: css`\n      label: queryContainer;\n      // Need to override normal css class and don't want to count on ordering of the classes in html.\n      height: auto !important;\n      flex: unset !important;\n      display: unset !important;\n      padding: ${theme.spacing(1)};\n    `,\n  };\n};\n\nexport interface ExploreProps extends Themeable2 {\n  exploreId: ExploreId;\n  theme: GrafanaTheme2;\n}\n\nenum ExploreDrawer {\n  RichHistory,\n  QueryInspector,\n}\n\ninterface ExploreState {\n  openDrawer?: ExploreDrawer;\n}\n\nexport type Props = ExploreProps & ConnectedProps<typeof connector>;\n\n/**\n * Explore provides an area for quick query iteration for a given datasource.\n * Once a datasource is selected it populates the query section at the top.\n * When queries are run, their results are being displayed in the main section.\n * The datasource determines what kind of query editor it brings, and what kind\n * of results viewers it supports. The state is managed entirely in Redux.\n *\n * SPLIT VIEW\n *\n * Explore can have two Explore areas side-by-side. This is handled in `Wrapper.tsx`.\n * Since there can be multiple Explores (e.g., left and right) each action needs\n * the `exploreId` as first parameter so that the reducer knows which Explore state\n * is affected.\n *\n * DATASOURCE REQUESTS\n *\n * A click on Run Query creates transactions for all DataQueries for all expanded\n * result viewers. New runs are discarding previous runs. Upon completion a transaction\n * saves the result. The result viewers construct their data from the currently existing\n * transactions.\n *\n * The result viewers determine some of the query options sent to the datasource, e.g.,\n * `format`, to indicate eventual transformations by the datasources' result transformers.\n */\nexport class Explore extends React.PureComponent<Props, ExploreState> {\n  scrollElement: HTMLDivElement | undefined;\n  absoluteTimeUnsubsciber: Unsubscribable | undefined;\n  topOfExploreViewRef = createRef<HTMLDivElement>();\n\n  constructor(props: Props) {\n    super(props);\n    this.state = {\n      openDrawer: undefined,\n    };\n  }\n\n  componentDidMount() {\n    this.absoluteTimeUnsubsciber = appEvents.subscribe(AbsoluteTimeEvent, this.onMakeAbsoluteTime);\n  }\n\n  componentWillUnmount() {\n    this.absoluteTimeUnsubsciber?.unsubscribe();\n  }\n\n  onChangeTime = (rawRange: RawTimeRange) => {\n    const { updateTimeRange, exploreId } = this.props;\n    updateTimeRange({ exploreId, rawRange });\n  };\n\n  // Use this in help pages to set page to a single query\n  onClickExample = (query: DataQuery) => {\n    this.props.setQueries(this.props.exploreId, [query]);\n  };\n\n  onCellFilterAdded = (filter: FilterItem) => {\n    const { value, key, operator } = filter;\n    if (operator === FILTER_FOR_OPERATOR) {\n      this.onClickFilterLabel(key, value);\n    }\n\n    if (operator === FILTER_OUT_OPERATOR) {\n      this.onClickFilterOutLabel(key, value);\n    }\n  };\n\n  onClickFilterLabel = (key: string, value: string) => {\n    this.onModifyQueries({ type: 'ADD_FILTER', key, value });\n  };\n\n  onClickFilterOutLabel = (key: string, value: string) => {\n    this.onModifyQueries({ type: 'ADD_FILTER_OUT', key, value });\n  };\n\n  onClickAddQueryRowButton = () => {\n    const { exploreId, queryKeys } = this.props;\n    this.props.addQueryRow(exploreId, queryKeys.length);\n  };\n\n  onMakeAbsoluteTime = () => {\n    const { makeAbsoluteTime } = this.props;\n    makeAbsoluteTime();\n  };\n\n  onModifyQueries = (action: any, index?: number) => {\n    const { datasourceInstance } = this.props;\n    if (datasourceInstance?.modifyQuery) {\n      const modifier = (queries: DataQuery, modification: any) =>\n        datasourceInstance.modifyQuery!(queries, modification);\n      this.props.modifyQueries(this.props.exploreId, action, modifier, index);\n    }\n  };\n\n  onResize = (size: { height: number; width: number }) => {\n    this.props.changeSize(this.props.exploreId, size);\n  };\n\n  onStartScanning = () => {\n    // Scanner will trigger a query\n    this.props.scanStart(this.props.exploreId);\n  };\n\n  onStopScanning = () => {\n    this.props.scanStopAction({ exploreId: this.props.exploreId });\n  };\n\n  onUpdateTimeRange = (absoluteRange: AbsoluteTimeRange) => {\n    const { exploreId, updateTimeRange } = this.props;\n    updateTimeRange({ exploreId, absoluteRange });\n  };\n\n  onChangeGraphStyle = (graphStyle: ExploreGraphStyle) => {\n    const { exploreId, changeGraphStyle } = this.props;\n    changeGraphStyle(exploreId, graphStyle);\n  };\n\n  toggleShowRichHistory = () => {\n    this.setState((state) => {\n      return {\n        openDrawer: state.openDrawer === ExploreDrawer.RichHistory ? undefined : ExploreDrawer.RichHistory,\n      };\n    });\n  };\n\n  toggleShowQueryInspector = () => {\n    this.setState((state) => {\n      return {\n        openDrawer: state.openDrawer === ExploreDrawer.QueryInspector ? undefined : ExploreDrawer.QueryInspector,\n      };\n    });\n  };\n\n  renderEmptyState() {\n    return (\n      <div className=\"explore-container\">\n        <NoDataSourceCallToAction />\n      </div>\n    );\n  }\n\n  renderGraphPanel(width: number) {\n    const { graphResult, absoluteRange, timeZone, splitOpen, queryResponse, loading, theme, graphStyle } = this.props;\n    const spacing = parseInt(theme.spacing(2).slice(0, -2), 10);\n    const label = <ExploreGraphLabel graphStyle={graphStyle} onChangeGraphStyle={this.onChangeGraphStyle} />;\n    return (\n      <Collapse label={label} loading={loading} isOpen>\n        <ExploreGraph\n          graphStyle={graphStyle}\n          data={graphResult!}\n          height={400}\n          width={width - spacing}\n          absoluteRange={absoluteRange}\n          onChangeTime={this.onUpdateTimeRange}\n          timeZone={timeZone}\n          annotations={queryResponse.annotations}\n          splitOpenFn={splitOpen}\n          loadingState={queryResponse.state}\n        />\n      </Collapse>\n    );\n  }\n\n  renderLogsVolume(width: number) {\n    const { logsVolumeData, exploreId, loadLogsVolumeData, absoluteRange, timeZone, splitOpen } = this.props;\n\n    return (\n      <LogsVolumePanel\n        absoluteRange={absoluteRange}\n        width={width}\n        logsVolumeData={logsVolumeData}\n        onUpdateTimeRange={this.onUpdateTimeRange}\n        timeZone={timeZone}\n        splitOpen={splitOpen}\n        onLoadLogsVolume={() => loadLogsVolumeData(exploreId)}\n      />\n    );\n  }\n\n  renderTablePanel(width: number) {\n    const { exploreId, datasourceInstance, timeZone } = this.props;\n    return (\n      <TableContainer\n        ariaLabel={selectors.pages.Explore.General.table}\n        width={width}\n        exploreId={exploreId}\n        onCellFilterAdded={datasourceInstance?.modifyQuery ? this.onCellFilterAdded : undefined}\n        timeZone={timeZone}\n      />\n    );\n  }\n\n  renderLogsPanel(width: number) {\n    const { exploreId, syncedTimes, theme, queryResponse } = this.props;\n    const spacing = parseInt(theme.spacing(2).slice(0, -2), 10);\n    return (\n      <LogsContainer\n        exploreId={exploreId}\n        loadingState={queryResponse.state}\n        syncedTimes={syncedTimes}\n        width={width - spacing}\n        onClickFilterLabel={this.onClickFilterLabel}\n        onClickFilterOutLabel={this.onClickFilterOutLabel}\n        onStartScanning={this.onStartScanning}\n        onStopScanning={this.onStopScanning}\n      />\n    );\n  }\n\n  renderNodeGraphPanel() {\n    const { exploreId, showTrace, queryResponse } = this.props;\n    return (\n      <NodeGraphContainer\n        dataFrames={this.memoizedGetNodeGraphDataFrames(queryResponse.series)}\n        exploreId={exploreId}\n        withTraceView={showTrace}\n      />\n    );\n  }\n\n  memoizedGetNodeGraphDataFrames = memoizeOne(getNodeGraphDataFrames);\n\n  renderTraceViewPanel() {\n    const { queryResponse, splitOpen, exploreId } = this.props;\n    const dataFrames = queryResponse.series.filter((series) => series.meta?.preferredVisualisationType === 'trace');\n\n    return (\n      // If there is no data (like 404) we show a separate error so no need to show anything here\n      dataFrames.length && (\n        <TraceViewContainer\n          exploreId={exploreId}\n          dataFrames={dataFrames}\n          splitOpenFn={splitOpen}\n          scrollElement={this.scrollElement}\n          topOfExploreViewRef={this.topOfExploreViewRef}\n          queryResponse={queryResponse}\n        />\n      )\n    );\n  }\n\n  render() {\n    const {\n      datasourceInstance,\n      datasourceMissing,\n      exploreId,\n      graphResult,\n      queryResponse,\n      isLive,\n      theme,\n      showMetrics,\n      showTable,\n      showLogs,\n      showTrace,\n      showNodeGraph,\n      timeZone,\n    } = this.props;\n    const { openDrawer } = this.state;\n    const styles = getStyles(theme);\n    const showPanels = queryResponse && queryResponse.state !== LoadingState.NotStarted;\n    const showRichHistory = openDrawer === ExploreDrawer.RichHistory;\n    const showQueryInspector = openDrawer === ExploreDrawer.QueryInspector;\n\n    return (\n      <CustomScrollbar\n        autoHeightMin={'100%'}\n        scrollRefCallback={(scrollElement) => (this.scrollElement = scrollElement || undefined)}\n      >\n        <ExploreToolbar\n          exploreId={exploreId}\n          onChangeTime={this.onChangeTime}\n          topOfExploreViewRef={this.topOfExploreViewRef}\n        />\n        {datasourceMissing ? this.renderEmptyState() : null}\n        {datasourceInstance && (\n          <div className=\"explore-container\">\n            <div className={cx('panel-container', styles.queryContainer)}>\n              <QueryRows exploreId={exploreId} />\n              <SecondaryActions\n                addQueryRowButtonDisabled={isLive}\n                // We cannot show multiple traces at the same time right now so we do not show add query button.\n                //TODO:unification\n                addQueryRowButtonHidden={false}\n                richHistoryButtonActive={showRichHistory}\n                queryInspectorButtonActive={showQueryInspector}\n                onClickAddQueryRowButton={this.onClickAddQueryRowButton}\n                onClickRichHistoryButton={this.toggleShowRichHistory}\n                onClickQueryInspectorButton={this.toggleShowQueryInspector}\n              />\n              <ResponseErrorContainer exploreId={exploreId} />\n            </div>\n            <AutoSizer onResize={this.onResize} disableHeight>\n              {({ width }) => {\n                if (width === 0) {\n                  return null;\n                }\n\n                return (\n                  <main className={cx(styles.exploreMain)} style={{ width }}>\n                    <ErrorBoundaryAlert>\n                      {showPanels && (\n                        <>\n                          {showMetrics && graphResult && (\n                            <ErrorBoundaryAlert>{this.renderGraphPanel(width)}</ErrorBoundaryAlert>\n                          )}\n                          {<ErrorBoundaryAlert>{this.renderLogsVolume(width)}</ErrorBoundaryAlert>}\n                          {showTable && <ErrorBoundaryAlert>{this.renderTablePanel(width)}</ErrorBoundaryAlert>}\n                          {showLogs && <ErrorBoundaryAlert>{this.renderLogsPanel(width)}</ErrorBoundaryAlert>}\n                          {showNodeGraph && <ErrorBoundaryAlert>{this.renderNodeGraphPanel()}</ErrorBoundaryAlert>}\n                          {showTrace && <ErrorBoundaryAlert>{this.renderTraceViewPanel()}</ErrorBoundaryAlert>}\n                        </>\n                      )}\n                      {showRichHistory && (\n                        <RichHistoryContainer\n                          width={width}\n                          exploreId={exploreId}\n                          onClose={this.toggleShowRichHistory}\n                        />\n                      )}\n                      {showQueryInspector && (\n                        <ExploreQueryInspector\n                          exploreId={exploreId}\n                          width={width}\n                          onClose={this.toggleShowQueryInspector}\n                          timeZone={timeZone}\n                        />\n                      )}\n                    </ErrorBoundaryAlert>\n                  </main>\n                );\n              }}\n            </AutoSizer>\n          </div>\n        )}\n      </CustomScrollbar>\n    );\n  }\n}\n\nfunction mapStateToProps(state: StoreState, { exploreId }: ExploreProps) {\n  const explore = state.explore;\n  const { syncedTimes } = explore;\n  const item: ExploreItemState = explore[exploreId]!;\n  const timeZone = getTimeZone(state.user);\n  const {\n    datasourceInstance,\n    datasourceMissing,\n    queryKeys,\n    isLive,\n    graphResult,\n    logsVolumeData,\n    logsResult,\n    showLogs,\n    showMetrics,\n    showTable,\n    showTrace,\n    absoluteRange,\n    queryResponse,\n    showNodeGraph,\n    loading,\n    graphStyle,\n  } = item;\n\n  return {\n    datasourceInstance,\n    datasourceMissing,\n    queryKeys,\n    isLive,\n    graphResult,\n    logsVolumeData,\n    logsResult: logsResult ?? undefined,\n    absoluteRange,\n    queryResponse,\n    syncedTimes,\n    timeZone,\n    showLogs,\n    showMetrics,\n    showTable,\n    showTrace,\n    showNodeGraph,\n    loading,\n    graphStyle,\n  };\n}\n\nconst mapDispatchToProps = {\n  changeSize,\n  changeGraphStyle,\n  modifyQueries,\n  scanStart,\n  scanStopAction,\n  setQueries,\n  updateTimeRange,\n  makeAbsoluteTime,\n  loadLogsVolumeData,\n  addQueryRow,\n  splitOpen,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport default compose(connector, withTheme2)(Explore) as React.ComponentType<{ exploreId: ExploreId }>;\n","import memoizeOne from 'memoize-one';\nimport React from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { DataQuery, ExploreUrlState, EventBusExtended, EventBusSrv } from '@grafana/data';\nimport { selectors } from '@grafana/e2e-selectors';\nimport store from 'app/core/store';\nimport {\n  DEFAULT_RANGE,\n  ensureQueries,\n  getTimeRange,\n  getTimeRangeFromUrl,\n  lastUsedDatasourceKeyForOrgId,\n  parseUrlState,\n} from 'app/core/utils/explore';\nimport { StoreState } from 'app/types';\nimport { ExploreId } from 'app/types/explore';\n\nimport { getFiscalYearStartMonth, getTimeZone } from '../profile/state/selectors';\n\nimport Explore from './Explore';\nimport { initializeExplore, refreshExplore } from './state/explorePane';\nimport { lastSavedUrl, cleanupPaneAction } from './state/main';\n\ninterface OwnProps {\n  exploreId: ExploreId;\n  urlQuery: string;\n  split: boolean;\n}\n\ninterface Props extends OwnProps, ConnectedProps<typeof connector> {}\n\n/**\n * This component is responsible for handling initialization of an Explore pane and triggering synchronization\n * of state based on URL changes and preventing any infinite loops.\n */\nclass ExplorePaneContainerUnconnected extends React.PureComponent<Props> {\n  el: any;\n  exploreEvents: EventBusExtended;\n\n  constructor(props: Props) {\n    super(props);\n    this.exploreEvents = new EventBusSrv();\n    this.state = {\n      openDrawer: undefined,\n    };\n  }\n\n  componentDidMount() {\n    const { initialized, exploreId, initialDatasource, initialQueries, initialRange, panelsState } = this.props;\n    const width = this.el?.offsetWidth ?? 0;\n\n    // initialize the whole explore first time we mount and if browser history contains a change in datasource\n    if (!initialized) {\n      this.props.initializeExplore(\n        exploreId,\n        initialDatasource,\n        initialQueries,\n        initialRange,\n        width,\n        this.exploreEvents,\n        panelsState\n      );\n    }\n  }\n\n  componentWillUnmount() {\n    this.exploreEvents.removeAllListeners();\n    this.props.cleanupPaneAction({ exploreId: this.props.exploreId });\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    this.refreshExplore(prevProps.urlQuery);\n  }\n\n  refreshExplore = (prevUrlQuery: string) => {\n    const { exploreId, urlQuery } = this.props;\n\n    // Update state from url only if it changed and only if the change wasn't initialised by redux to prevent any loops\n    if (urlQuery !== prevUrlQuery && urlQuery !== lastSavedUrl[exploreId]) {\n      this.props.refreshExplore(exploreId, urlQuery);\n    }\n  };\n\n  getRef = (el: any) => {\n    this.el = el;\n  };\n\n  render() {\n    const exploreClass = this.props.split ? 'explore explore-split' : 'explore';\n    return (\n      <div className={exploreClass} ref={this.getRef} data-testid={selectors.pages.Explore.General.container}>\n        {this.props.initialized && <Explore exploreId={this.props.exploreId} />}\n      </div>\n    );\n  }\n}\n\nconst ensureQueriesMemoized = memoizeOne(ensureQueries);\nconst getTimeRangeFromUrlMemoized = memoizeOne(getTimeRangeFromUrl);\n\nfunction mapStateToProps(state: StoreState, props: OwnProps) {\n  const urlState = parseUrlState(props.urlQuery);\n  const timeZone = getTimeZone(state.user);\n  const fiscalYearStartMonth = getFiscalYearStartMonth(state.user);\n\n  const { datasource, queries, range: urlRange, panelsState } = (urlState || {}) as ExploreUrlState;\n  const initialDatasource = datasource || store.get(lastUsedDatasourceKeyForOrgId(state.user.orgId));\n  const initialQueries: DataQuery[] = ensureQueriesMemoized(queries);\n  const initialRange = urlRange\n    ? getTimeRangeFromUrlMemoized(urlRange, timeZone, fiscalYearStartMonth)\n    : getTimeRange(timeZone, DEFAULT_RANGE, fiscalYearStartMonth);\n\n  return {\n    initialized: state.explore[props.exploreId]?.initialized,\n    initialDatasource,\n    initialQueries,\n    initialRange,\n    panelsState,\n  };\n}\n\nconst mapDispatchToProps = {\n  initializeExplore,\n  refreshExplore,\n  cleanupPaneAction,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport const ExplorePaneContainer = connector(ExplorePaneContainerUnconnected);\n","import React, { PureComponent } from 'react';\nimport { connect, ConnectedProps } from 'react-redux';\n\nimport { locationService } from '@grafana/runtime';\nimport { ErrorBoundaryAlert } from '@grafana/ui';\nimport { GrafanaRouteComponentProps } from 'app/core/navigation/types';\nimport { StoreState } from 'app/types';\nimport { ExploreId, ExploreQueryParams } from 'app/types/explore';\n\nimport { Branding } from '../../core/components/Branding/Branding';\nimport { getNavModel } from '../../core/selectors/navModel';\n\nimport { ExplorePaneContainer } from './ExplorePaneContainer';\nimport { lastSavedUrl, resetExploreAction, richHistoryUpdatedAction } from './state/main';\n\ninterface RouteProps extends GrafanaRouteComponentProps<{}, ExploreQueryParams> {}\ninterface OwnProps {}\n\nconst mapStateToProps = (state: StoreState) => {\n  return {\n    navModel: getNavModel(state.navIndex, 'explore'),\n    exploreState: state.explore,\n  };\n};\n\nconst mapDispatchToProps = {\n  resetExploreAction,\n  richHistoryUpdatedAction,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\ntype Props = OwnProps & RouteProps & ConnectedProps<typeof connector>;\nclass WrapperUnconnected extends PureComponent<Props> {\n  componentWillUnmount() {\n    this.props.resetExploreAction({});\n  }\n\n  componentDidMount() {\n    lastSavedUrl.left = undefined;\n    lastSavedUrl.right = undefined;\n\n    // timeSrv (which is used internally) on init reads `from` and `to` param from the URL and updates itself\n    // using those value regardless of what is passed to the init method.\n    // The updated value is then used by Explore to get the range for each pane.\n    // This means that if `from` and `to` parameters are present in the URL,\n    // it would be impossible to change the time range in Explore.\n    // We are only doing this on mount for 2 reasons:\n    // 1: Doing it on update means we'll enter a render loop.\n    // 2: when parsing time in Explore (before feeding it to timeSrv) we make sure `from` is before `to` inside\n    //    each pane state in order to not trigger un URL update from timeSrv.\n    const searchParams = locationService.getSearchObject();\n    if (searchParams.from || searchParams.to) {\n      locationService.partial({ from: undefined, to: undefined }, true);\n    }\n  }\n\n  componentDidUpdate(prevProps: Props) {\n    const { left, right } = this.props.queryParams;\n    const hasSplit = Boolean(left) && Boolean(right);\n    const datasourceTitle = hasSplit\n      ? `${this.props.exploreState.left.datasourceInstance?.name} | ${this.props.exploreState.right?.datasourceInstance?.name}`\n      : `${this.props.exploreState.left.datasourceInstance?.name}`;\n    const documentTitle = `${this.props.navModel.main.text} - ${datasourceTitle} - ${Branding.AppTitle}`;\n    document.title = documentTitle;\n  }\n\n  render() {\n    const { left, right } = this.props.queryParams;\n    const hasSplit = Boolean(left) && Boolean(right);\n\n    return (\n      <div className=\"page-scrollbar-wrapper\">\n        <div className=\"explore-wrapper\">\n          <ErrorBoundaryAlert style=\"page\">\n            <ExplorePaneContainer split={hasSplit} exploreId={ExploreId.left} urlQuery={left} />\n          </ErrorBoundaryAlert>\n          {hasSplit && (\n            <ErrorBoundaryAlert style=\"page\">\n              <ExplorePaneContainer split={hasSplit} exploreId={ExploreId.right} urlQuery={right} />\n            </ErrorBoundaryAlert>\n          )}\n        </div>\n      </div>\n    );\n  }\n}\n\nconst Wrapper = connector(WrapperUnconnected);\n\nexport default Wrapper;\n","import { ExploreId, StoreState } from 'app/types';\n\nexport const isSplit = (state: StoreState) => Boolean(state.explore[ExploreId.left] && state.explore[ExploreId.right]);\n\nexport const getExploreItemSelector = (exploreId: ExploreId) => (state: StoreState) => state.explore[exploreId];\n","import { useEffect, useRef } from 'react';\nexport default function usePrevious(state) {\n    var ref = useRef();\n    useEffect(function () {\n        ref.current = state;\n    });\n    return ref.current;\n}\n","//\n// Main\n//\n\nfunction memoize (fn, options) {\n  var cache = options && options.cache\n    ? options.cache\n    : cacheDefault\n\n  var serializer = options && options.serializer\n    ? options.serializer\n    : serializerDefault\n\n  var strategy = options && options.strategy\n    ? options.strategy\n    : strategyDefault\n\n  return strategy(fn, {\n    cache: cache,\n    serializer: serializer\n  })\n}\n\n//\n// Strategy\n//\n\nfunction isPrimitive (value) {\n  return value == null || typeof value === 'number' || typeof value === 'boolean' // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\n\nfunction monadic (fn, cache, serializer, arg) {\n  var cacheKey = isPrimitive(arg) ? arg : serializer(arg)\n\n  var computedValue = cache.get(cacheKey)\n  if (typeof computedValue === 'undefined') {\n    computedValue = fn.call(this, arg)\n    cache.set(cacheKey, computedValue)\n  }\n\n  return computedValue\n}\n\nfunction variadic (fn, cache, serializer) {\n  var args = Array.prototype.slice.call(arguments, 3)\n  var cacheKey = serializer(args)\n\n  var computedValue = cache.get(cacheKey)\n  if (typeof computedValue === 'undefined') {\n    computedValue = fn.apply(this, args)\n    cache.set(cacheKey, computedValue)\n  }\n\n  return computedValue\n}\n\nfunction assemble (fn, context, strategy, cache, serialize) {\n  return strategy.bind(\n    context,\n    fn,\n    cache,\n    serialize\n  )\n}\n\nfunction strategyDefault (fn, options) {\n  var strategy = fn.length === 1 ? monadic : variadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\nfunction strategyVariadic (fn, options) {\n  var strategy = variadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\nfunction strategyMonadic (fn, options) {\n  var strategy = monadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\n//\n// Serializer\n//\n\nfunction serializerDefault () {\n  return JSON.stringify(arguments)\n}\n\n//\n// Cache\n//\n\nfunction ObjectWithoutPrototypeCache () {\n  this.cache = Object.create(null)\n}\n\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n  return (key in this.cache)\n}\n\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n  return this.cache[key]\n}\n\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n  this.cache[key] = value\n}\n\nvar cacheDefault = {\n  create: function create () {\n    return new ObjectWithoutPrototypeCache()\n  }\n}\n\n//\n// API\n//\n\nmodule.exports = memoize\nmodule.exports.strategies = {\n  variadic: strategyVariadic,\n  monadic: strategyMonadic\n}\n","function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];if(\"production\"!==process.env.NODE_ENV){var i=Y[n],o=i?\"function\"==typeof i?i.apply(null,t):i:\"unknown error nr: \"+n;throw Error(\"[Immer] \"+o)}throw Error(\"[Immer] minified error nr: \"+n+(t.length?\" \"+t.map((function(n){return\"'\"+n+\"'\"})).join(\",\"):\"\")+\". Find the full error at: https://bit.ly/3cXEKWf\")}function r(n){return!!n&&!!n[Q]}function t(n){return!!n&&(function(n){if(!n||\"object\"!=typeof n)return!1;var r=Object.getPrototypeOf(n);if(null===r)return!0;var t=Object.hasOwnProperty.call(r,\"constructor\")&&r.constructor;return t===Object||\"function\"==typeof t&&Function.toString.call(t)===Z}(n)||Array.isArray(n)||!!n[L]||!!n.constructor[L]||s(n)||v(n))}function e(t){return r(t)||n(23,t),t[Q].t}function i(n,r,t){void 0===t&&(t=!1),0===o(n)?(t?Object.keys:nn)(n).forEach((function(e){t&&\"symbol\"==typeof e||r(e,n[e],n)})):n.forEach((function(t,e){return r(e,t,n)}))}function o(n){var r=n[Q];return r?r.i>3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?(n.delete(r),n.add(t)):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)?n:(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0),n)}function h(){n(2)}function y(n){return null==n||\"object\"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return\"production\"===process.env.NODE_ENV||U||n(0),U}function j(n,r){r&&(b(\"Patches\"),n.u=[],n.s=[],n.v=r)}function O(n){g(n),n.p.forEach(S),n.p=null}function g(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.O=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.g||b(\"ES5\").S(e,r,o),o?(i[Q].P&&(O(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b(\"Patches\").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),O(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o;i(3===e.i?new Set(o):o,(function(r,i){return A(n,e,o,r,i,t)})),x(n,o,!1),t&&n.u&&b(\"Patches\").R(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if(\"production\"!==process.env.NODE_ENV&&c===o&&n(5),r(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!r(v))return;e.m=!1}if(t(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),n.h.F&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function R(n,r,t){var e=s(r)?b(\"MapSet\").N(r,t):v(r)?b(\"MapSet\").T(r,t):n.g?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,D:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b(\"ES5\").J(r,t);return(t?t.A:_()).p.push(e),e}function D(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b(\"ES5\").K(u)))return u.t;u.I=!0,e=F(r,c),u.I=!1}else e=F(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function F(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return\"production\"!==process.env.NODE_ENV&&f(r),en.get(r,n)},set:function(r){var t=this[Q];\"production\"!==process.env.NODE_ENV&&f(t),en.set(t,n,r)}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t)}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return!0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return!0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return!0;for(var e=0;e<r.length;e++)if(!r.hasOwnProperty(e))return!0;return!1}function f(r){r.O&&n(3,JSON.stringify(p(r)))}var s={};m(\"ES5\",{J:function(n,r){var e=Array.isArray(n),i=function(n,r){if(n){for(var e=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(e,\"\"+i,t(i,!0));return e}var o=rn(r);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=t(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(r),o)}(e,n),o={i:e?5:4,A:r?r.A:_(),P:!1,I:!1,D:{},l:r,t:n,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,t,o){o?r(t)&&t[Q].A===n&&e(n.p):(n.u&&function n(r){if(r&&\"object\"==typeof r){var t=r[Q];if(t){var e=t.t,o=t.k,f=t.D,c=t.i;if(4===c)i(o,(function(r){r!==Q&&(void 0!==e[r]||u(e,r)?f[r]||n(o[r]):(f[r]=!0,k(t)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(t))}));else if(5===c){if(a(t)&&(k(t),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)o.hasOwnProperty(l)||(f[l]=!0),void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!t(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var r=Object.create(Object.getPrototypeOf(n));for(var i in n)r[i]=e(n[i]);return u(n,L)&&(r[L]=n[L]),r}function f(n){return r(n)?e(n):n}var c=\"add\";m(\"Patches\",{$:function(r,t){return t.forEach((function(t){for(var i=t.path,u=t.op,f=r,s=0;s<i.length-1;s++){var v=o(f),p=\"\"+i[s];0!==v&&1!==v||\"__proto__\"!==p&&\"constructor\"!==p||n(24),\"function\"==typeof f&&\"prototype\"===p&&n(24),\"object\"!=typeof(f=a(f,p))&&n(15,i.join(\"/\"))}var l=o(f),d=e(t.value),h=i[i.length-1];switch(u){case\"replace\":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return\"-\"===h?f.push(d):f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case\"remove\":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(t.value);default:return delete f[h]}default:n(17,u)}})),r},R:function(n,r,t,e){switch(n.i){case 0:case 4:case 2:return function(n,r,t,e){var o=n.t,s=n.o;i(n.D,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?\"replace\":c:\"remove\";if(v!==p||\"replace\"!==l){var d=r.concat(n);t.push(\"remove\"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:\"remove\",path:d}:\"remove\"===l?{op:c,path:d,value:f(v)}:{op:\"replace\",path:d,value:f(v)})}}))}(n,r,t,e);case 5:case 1:return function(n,r,t,e){var i=n.t,o=n.D,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,t];t=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=r.concat([v]);t.push({op:\"replace\",path:p,value:f(u[v])}),e.push({op:\"replace\",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=r.concat([l]);t.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:\"replace\",path:r.concat([\"length\"]),value:i.length})}(n,r,t,e);case 3:return function(n,r,t,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=r.concat([u]);t.push({op:\"remove\",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=r.concat([u]);t.push({op:c,path:o,value:n}),e.unshift({op:\"remove\",path:o,value:n})}u++}))}(n,r,t,e)}},M:function(n,r,t,e){t.push({op:\"replace\",path:[],value:r===H?void 0:r}),e.push({op:\"replace\",path:[],value:n})}})}function C(){function r(n,r){function t(){this.constructor=n}a(n,r),n.prototype=(t.prototype=r.prototype,new t)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(r){if(t(r)){var e=R(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.O&&n(3,JSON.stringify(p(r)))}var a=function(n,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var t in r)r.hasOwnProperty(t)&&(n[t]=r[t])})(n,r)},f=function(){function n(n,r){return this[Q]={i:2,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}r(n,Map);var o=n.prototype;return Object.defineProperty(o,\"size\",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,r){var t=this[Q];return u(t),p(t).has(n)&&p(t).get(n)===r||(e(t),k(t),t.D.set(n,!0),t.o.set(n,r),t.D.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),e(r),k(r),r.t.has(n)?r.D.set(n,!1):r.D.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.D=new Map,i(n.t,(function(r){n.D.set(r,!1)})),n.o.clear())},o.forEach=function(n,r){var t=this;p(this[Q]).forEach((function(e,i){n.call(r,t.get(i),i,t)}))},o.get=function(n){var r=this[Q];u(r);var i=p(r).get(n);if(r.I||!t(i))return i;if(i!==r.t.get(n))return i;var o=R(r.A.h,i,r);return e(r),r.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.values()},n.next=function(){var n=t.next();return n.done?n:{done:!1,value:r.get(n.value)}},n},o.entries=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.entries()},n.next=function(){var n=t.next();if(n.done)return n;var e=r.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,r){return this[Q]={i:3,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}r(n,Set);var t=n.prototype;return Object.defineProperty(t,\"size\",{get:function(){return p(this[Q]).size}}),t.has=function(n){var r=this[Q];return u(r),r.o?!!r.o.has(n)||!(!r.p.has(n)||!r.o.has(r.p.get(n))):r.t.has(n)},t.add=function(n){var r=this[Q];return u(r),this.has(n)||(o(r),k(r),r.o.add(n)),this},t.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),o(r),k(r),r.o.delete(n)||!!r.p.has(n)&&r.o.delete(r.p.get(n))},t.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},t.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},t.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},t.keys=function(){return this.values()},t[V]=function(){return this.values()},t.forEach=function(n,r){for(var t=this.values(),e=t.next();!e.done;)n.call(r,e.value,e.value,this),e=t.next()},n}();m(\"MapSet\",{N:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){N(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W=\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol(\"x\"),X=\"undefined\"!=typeof Map,q=\"undefined\"!=typeof Set,B=\"undefined\"!=typeof Proxy&&void 0!==Proxy.revocable&&\"undefined\"!=typeof Reflect,H=W?Symbol.for(\"immer-nothing\"):((G={})[\"immer-nothing\"]=!0,G),L=W?Symbol.for(\"immer-draftable\"):\"__$immer_draftable\",Q=W?Symbol.for(\"immer-state\"):\"__$immer_state\",V=\"undefined\"!=typeof Symbol&&Symbol.iterator||\"@@iterator\",Y={0:\"Illegal state\",1:\"Immer drafts cannot have computed properties\",2:\"This object has been frozen and should not be mutated\",3:function(n){return\"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \"+n},4:\"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\",5:\"Immer forbids circular references\",6:\"The first or second argument to `produce` must be a function\",7:\"The third argument to `produce` must be a function or undefined\",8:\"First argument to `createDraft` must be a plain object, an array, or an immerable object\",9:\"First argument to `finishDraft` must be a draft returned by `createDraft`\",10:\"The given draft is already finalized\",11:\"Object.defineProperty() cannot be used on an Immer draft\",12:\"Object.setPrototypeOf() cannot be used on an Immer draft\",13:\"Immer only supports deleting array indices\",14:\"Immer only supports setting array indices and the 'length' property\",15:function(n){return\"Cannot apply patch, path doesn't resolve: \"+n},16:'Sets cannot have \"replace\" patches.',17:function(n){return\"Unsupported patch operation: \"+n},18:function(n){return\"The plugin for '\"+n+\"' has not been loaded into Immer. To enable the plugin, import and call `enable\"+n+\"()` when initializing your application.\"},20:\"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available\",21:function(n){return\"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '\"+n+\"'\"},22:function(n){return\"'current' expects a draft, got: \"+n},23:function(n){return\"'original' expects a draft, got: \"+n},24:\"Patching reserved attributes like __proto__, prototype and constructor is not allowed\"},Z=\"\"+Object.prototype.constructor,nn=\"undefined\"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t)})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p(n);if(!u(e,r))return function(n,r,t){var e,i=I(r,t);return i?\"value\"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t(i)?i:i===z(n.t,r)?(E(n),n.o[r]=R(n.A.h,i,n)):i},has:function(n,r){return r in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,r,t){var e=I(p(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z(p(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.D[r]=!1,!0;if(c(t,i)&&(void 0!==t||u(n.t,r)))return!0;E(n),k(n)}return n.o[r]===t&&\"number\"!=typeof t&&(void 0!==t||r in n.o)||(n.o[r]=t,n.D[r]=!0,!0)},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.D[r]=!1,E(n),k(n)):delete n.D[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||\"length\"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}})),on.deleteProperty=function(r,t){return\"production\"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&n(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return\"production\"!==process.env.NODE_ENV&&\"length\"!==t&&isNaN(parseInt(t))&&n(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.g=B,this.F=!0,this.produce=function(r,i,o){if(\"function\"==typeof r&&\"function\"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return(t=i).call.apply(t,[r,n].concat(e))}))}}var f;if(\"function\"!=typeof i&&n(6),void 0!==o&&\"function\"!=typeof o&&n(7),t(r)){var c=w(e),s=R(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?O(c):g(c)}return\"undefined\"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(c),n})):(j(c,o),P(f,c))}if(!r||\"object\"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.F&&d(f,!0),o){var p=[],l=[];b(\"Patches\").M(r,f,p,l),o(p,l)}return f}n(21,r)},this.produceWithPatches=function(n,r){if(\"function\"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r}));return\"undefined\"!=typeof Promise&&o instanceof Promise?o.then((function(n){return[n,t,i]})):[o,t,i]},\"boolean\"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),\"boolean\"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){t(e)||n(8),r(e)&&(e=D(e));var i=w(this),o=R(this,e,void 0);return o[Q].C=!0,g(i),o},i.finishDraft=function(r,t){var e=r&&r[Q];\"production\"!==process.env.NODE_ENV&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.F=n},i.setUseProxies=function(r){r&&!B&&n(20),this.g=r},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&\"replace\"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b(\"Patches\").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);export default fn;export{un as Immer,pn as applyPatches,K as castDraft,$ as castImmutable,ln as createDraft,D as current,J as enableAllPlugins,N as enableES5,C as enableMapSet,T as enablePatches,dn as finishDraft,d as freeze,L as immerable,r as isDraft,t as isDraftable,H as nothing,e as original,fn as produce,cn as produceWithPatches,sn as setAutoFreeze,vn as setUseProxies};\n//# sourceMappingURL=immer.esm.js.map\n"],"names":["displayOverrideRef","isHideSeriesOverride","isSystemOverrideWithRef","seriesVisibilityConfigFactory","label","mode","fieldConfig","data","overrides","displayName","currentIndex","findIndex","SeriesVisibilityChangeMode","override","createOverride","getDisplayNames","overridesCopy","Array","from","current","splice","existing","getExistingDisplayNames","length","createExtendedOverride","allFieldsAreExcluded","names","ByNamesMatcherMode","property","id","value","viz","legend","tooltip","__systemRef","matcher","FieldMatcherID","options","prefix","undefined","readOnly","properties","find","p","index","name","push","rule","isArray","excludeName","unique","Set","frame","field","fields","type","FieldType","getFieldDisplayName","add","ExploreGraph","height","width","timeZone","absoluteRange","onChangeTime","loadingState","annotations","onHiddenSeriesChanged","splitOpenFn","graphStyle","tooltipDisplayMode","TooltipDisplayMode","theme","useTheme2","showAllTimeSeries","setShowAllTimeSeries","useState","baseStructureRev","setBaseStructureRev","previousData","usePrevious","structureChangesRef","useRef","compareArrayValues","compareDataFrameStructures","structureRev","setFieldConfig","defaults","color","FieldColorModeId","custom","drawStyle","GraphDrawStyle","fillOpacity","pointSize","style","useStyles2","getStyles","timeRange","dateTime","to","raw","dataWithConfig","useMemo","registry","createFieldConfigRegistry","getGraphFieldConfig","defaultGraphConfig","styledFieldConfig","config","produce","draft","stacking","group","StackingMode","Error","applyGraphStyle","applyFieldOverrides","replaceVariables","fieldConfigRegistry","useEffect","hiddenFrames","forEach","map","hideFrom","every","identity","getFrameDisplayName","seriesToShow","slice","panelContext","eventBus","appEvents","onSplitOpen","onToggleSeriesVisibility","r","PanelContextProvider","className","cx","timeSeriesDisclaimer","Icon","disclaimerIcon","onClick","PanelRenderer","series","state","pluginId","title","onChangeTimeRange","sort","SortOrder","displayMode","LegendDisplayMode","placement","calcs","css","spacing","colors","background","primary","warning","main","text","link","ALL_GRAPH_STYLE_OPTIONS","EXPLORE_GRAPH_STYLES","toUpperCase","replace","display","justifyContent","ExploreGraphLabel","props","onChangeGraphStyle","RadioButtonGroup","size","onChange","extendStatics","__extends","d","b","Object","setPrototypeOf","__proto__","prototype","hasOwnProperty","call","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","apply","styles","top","left","cursor","right","bottom","topRight","position","bottomRight","bottomLeft","topLeft","Resizer","_super","_this","onMouseDown","e","onResizeStart","direction","onTouchStart","render","userSelect","replaceStyles","children","DEFAULT_SIZE","clamp","min","max","Math","snap","round","hasDirection","dir","target","RegExp","test","isTouchEvent","event","Boolean","touches","findClosestSnap","snapArray","snapGap","closestGapIndex","reduce","prev","curr","abs","gap","endsWith","str","searchStr","substr","getStringSize","toString","getPixelSize","parentSize","innerWidth","innerHeight","Number","calculateNewMax","maxWidth","maxHeight","minWidth","minHeight","definedProps","baseClassName","Resizable","ratio","resizable","parentLeft","parentTop","resizableLeft","resizableRight","resizableTop","resizableBottom","targetLeft","targetTop","appendBase","window","parent","parentNode","element","document","createElement","transform","flex","classList","appendChild","removeBase","base","removeChild","ref","c","isResizing","propsSize","original","x","y","backgroundStyle","backgroundColor","opacity","zIndex","flexBasis","bind","onMouseMove","onMouseUp","defineProperty","get","enumerable","configurable","ownerDocument","defaultView","defaultSize","orgWidth","offsetWidth","orgHeight","offsetHeight","orgPosition","getSize","key","getParentSize","wrapChanged","wrap","flexWrap","bindEvents","addEventListener","capture","passive","unbindEvents","removeEventListener","componentDidMount","computedStyle","getComputedStyle","setState","componentWillUnmount","createSizeForCssProperty","newSize","kind","calculateNewMaxFromBoundary","boundWidth","boundHeight","boundsByDirection","widthByDirection","heightByDirection","bounds","parent_1","isFinite","calculateNewSizeFromDirection","clientX","clientY","scale","resizeRatio","_a","_b","lockAspectRatio","lockAspectRatioExtraHeight","lockAspectRatioExtraWidth","newWidth","newHeight","extraHeight","extraWidth","calculateNewSizeFromAspectRatio","computedMinWidth","computedMaxWidth","computedMinHeight","computedMaxHeight","extraMinWidth","extraMaxWidth","extraMinHeight","extraMaxHeight","lockedMinWidth","lockedMaxWidth","lockedMinHeight","lockedMaxHeight","setBoundingClientRect","parent_2","parentRect","getBoundingClientRect","targetRect","top_1","nativeEvent","isMouseEvent","parent_3","flexDirection","flexDir","startsWith","TouchEvent","preventDefault","stopPropagation","_c","boundaryMax","grid","newGridWidth","newGridHeight","delta","newState","onResize","onResizeStop","updateSize","renderResizer","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","handleComponent","resizers","keys","extendsProps","acc","indexOf","sizeStyle","boxSizing","flexShrink","Wrapper","as","defaultProps","drawerSlide","keyframes","stylesFactory","container","border","weak","shadows","z3","sidemenu","drawerActive","rzHandle","secondary","shade","ExploreDrawer","drawerWidth","mapDispatchToProps","runQueries","connect","exploreId","item","explore","loading","queryResponse","onClose","dataFrames","error","statsTab","icon","content","InspectStatsTab","request","timezone","jsonTab","InspectJSONTab","dataTab","InspectDataTab","isLoading","withTransforms","withFieldConfig","tabs","QueryInspector","onRefreshQuery","errorTab","InspectErrorTab","TabbedContainer","closeIconTooltip","TimeSyncButton","isSynced","Tooltip","ToolbarButton","variant","ExploreTimeControls","Component","range","getShiftedTimeRange","dateTimeForTimeZone","onMoveTimePicker","adjustedFrom","dateMath","adjustedTo","getZoomedTimeRange","fiscalYearStartMonth","splitted","syncedTimes","onChangeTimeSync","hideText","onChangeTimeZone","onChangeFiscalYearStartMonth","timeSyncButton","timePickerCommonProps","onMoveBackward","onMoveBack","onMoveForward","onZoom","TimePickerWithHistory","onChangeTimePicker","LiveTailButton","start","pause","resume","isLive","isPaused","stop","buttonVariant","onClickMain","ButtonGroup","iconOnly","CSSTransition","mountOnEnter","unmountOnExit","timeout","in","classNames","enter","stopButtonEnter","enterActive","stopButtonEnterActive","exit","stopButtonExit","exitActive","stopButtonExitActive","RunButton","isSmall","onRun","onChangeRefreshInterval","refreshInterval","showDropdown","intervals","getTimeSrv","getValidIntervals","defaultIntervals","RefreshPicker","onIntervalChanged","onRefresh","noIntervalPicker","LiveTailControls","controls","dispatch","useDispatch","useCallback","setPausedStateAction","changeRefreshInterval","useLiveTailControls","AddToDashboard","lazy","then","default","UnConnectedExploreToolbar","PureComponent","async","changeDatasource","dsSettings","uid","importQueries","cancelQueries","syncTimes","datasourceMissing","closeSplit","split","hasLiveOption","containerWidth","topOfExploreViewRef","showSmallDataSourcePicker","showSmallTimePicker","PageToolbar","ExploreId","pageIcon","leftItems","DashNavButton","createAndCopyShortLink","location","href","DataSourcePicker","onChangeDatasource","datasourceName","hideTextValue","filter","ToolbarButtonRow","disabled","Suspense","fallback","onRunQuery","SetInterval","func","interval","splitClose","splitOpen","updateTimeZoneForSession","updateFiscalYearStartMonthForSession","ExploreToolbar","exploreItem","datasourceInstance","meta","streaming","getTimeZone","user","getFiscalYearStartMonth","isSplit","connector","callback","delay","savedCallback","interval_1","setInterval","clearInterval","Time","timeInMs","humanize","formatTime","inSeconds","toFixed","duration","toDuration","hours","minutes","seconds","ElapsedTime","resetKey","elapsed","setElapsed","useInterval","LiveLogs","super","React","onPause","scrollTop","clientHeight","scrollHeight","currentTarget","logRowsToRender","rowsToRender","logRows","nextProps","onResume","logsRowsLive","typography","fontFamilyMonospace","bodySmall","fontSize","logsRowFade","tinycolor","info","transparent","setAlpha","logsRowsIndicator","h6","button","fullWidth","logsRow","logsRowLocalTime","logsRowMessage","getLogRowStyles","onScroll","scrollContainerRef","row","dateTimeFormat","timeEpochMs","hasAnsi","LogMessageAnsi","entry","liveEndDiv","scrollTo","Button","stopLive","LiveLogsWithTheme","withTheme2","metaContainer","metaItem","metaLabel","fontWeightMedium","metaValue","MetaInfoItem","memo","MetaInfoText","metaItems","LogsMetaRow","dedupStrategy","dedupCount","showDetectedFields","clearDetectedFields","hasUnescapedContent","forceEscape","onEscapeNewlines","logsMetaItem","LogsDedupStrategy","LogsMetaKind","some","MAX_CHARACTERS","renderMetaItem","LogLabels","labels","LogsNavigationPages","pages","currentPageIndex","oldestLogsFirst","changeTime","time","format","systemDateFormats","createPageContent","page","Spinner","logsRange","CustomScrollbar","autoHide","pagesWrapper","pagesContainer","queryRange","line","selectedBg","selectedText","v1","sm","LogsNavigation","logsSortOrder","scrollToTopLogs","visibleRange","queries","clearCache","addResultsToCache","setPages","setCurrentPageIndex","expectedQueriesRef","expectedRangeRef","rangeSpanRef","LogsSortOrder","onFirstPage","onLastPage","newPage","newPages","isEqual","a","sortPages","olderLogsButton","navButton","indexChange","navButtonContent","newerLogsButton","navContainer","scrollToTopButton","SETTINGS_KEYS","UnthemedLogs","createRef","showLabels","store","showTime","wrapLogMessage","prettifyLogMessage","hiddenLogLevels","isFlipping","flipOrderTimer","setTimeout","prevState","newSortOrder","cancelFlippingTimer","checked","hiddenRawLevels","level","LogLevel","onStartScanning","onStopScanning","concat","k","memoizeOne","dedupedRows","dedupLogRows","sum","duplicates","filterLogLevels","topLogsRef","scrollIntoView","clearTimeout","logsMeta","logsSeries","onClickFilterLabel","onClickFilterOutLabel","scanning","scanRange","showContextToggle","getFieldLinks","logsQueries","hasData","checkUnescapedContent","filteredLogs","filterRows","dedupRows","scanText","rangeUtil","infoText","onToggleLogLevel","logOptions","InlineFieldRow","InlineField","horizontalInlineLabel","InlineSwitch","horizontalInlineSwitch","onChangeLabels","onChangewrapLogMessage","onChangePrettifyLogMessage","values","dedupType","capitalize","description","LogsDedupDescription","onChangeDedup","radioButtons","onChangeLogsSortOrder","logsSection","LogRows","deduplicatedRows","getRowContext","enableLogDetails","onClickShowDetectedField","showDetectedField","onClickHideDetectedField","hideDetectedField","noData","fill","onClickScan","onClickStopScan","Logs","shape","borderRadius","medium","headerButton","logsEnter","logsEnterActive","logsExit","logsExitActive","LogsCrossFadeTransition","visible","transitionDuration","LogsContainer","updateTimeRange","hasLogsContextSupport","getLogRowContext","rowIndex","getFieldLinksForExplore","styleOverridesForStickyNavigation","Collapse","isOpen","logsResult","logsVolumeDataProvider","logsVolumeData","rows","ErrorAlert","setIsOpen","message","showButton","Alert","severity","LogsVolumePanel","onUpdateTimeRange","onLoadLogsVolume","parseInt","LogsVolumePanelContent","LoadingState","zoomRatio","selectedTimeRange","dataRange","logsLevelZoomRatio","zoomLevelInfo","contentContainer","zoomInfoContainer","NoDataSourceCallToAction","canCreateDataSource","contextSrv","AccessControlAction","footer","rel","ctaElement","LinkButton","cardClassName","breakpoints","lg","CallToActionCard","callToActionElement","warningText","NodeGraphContainer","withTraceView","getLinks","useLinks","frames","nodes","useCategorizeFrames","open","toggleOpen","useToggle","countWarning","Badge","collapsible","onToggle","NodeGraph","QueryRows","getQueries","getDatasourceInstanceSettings","getQueryResponse","getHistory","getEventBridge","exploreItemSelector","getExploreItemSelector","createSelector","history","eventBridge","getDatasourceSrv","getInstanceSettings","makeSelectors","useSelector","onRunQueries","newQueries","changeQueriesAction","onAddQuery","query","refId","getNextRefIdChar","QueryEditorRows","onQueriesChange","app","CoreApp","FadeIn","defaultStyle","transition","transitionStyles","exited","entering","entered","exiting","Transition","onExited","ErrorContainer","queryError","showError","alertWithTopMargin","ResponseErrorContainer","deleteHistoryItem","commentHistoryItem","starHistoryItem","setQueries","isRemoved","rigtColumnWidth","rigtColumnContentWidth","cardColor","bg2","queryCard","border1","radius","palette","orange","cardRow","xs","datasourceContainer","weight","semibold","queryActionButtons","queryContainer","queryRow","updateCommentContainer","comment","regular","commentButtonRow","textArea","runButton","md","dsImg","activeUpdateComment","setActiveUpdateComment","setComment","queryDsInstance","setQueryDsInstance","ds","getDataSourceSrv","getQueryDsInstance","useTheme","onUpdateComment","onCancelUpdateComment","updateComment","TextArea","placeholder","IconButton","queriesToCopy","q","createQueryText","join","copyStringToClipboard","notifyApp","createSuccessNotification","createUrlFromRichHistory","starred","ShowConfirmModalEvent","yesText","onConfirm","iconType","onKeyDown","keyEvent","shiftKey","ctrlKey","src","queryText","queriesToRun","bgColor","isLight","gray5","dark4","sliderHeight","containerContent","containerSlider","slider","selectors","filterInput","multiselect","xxs","sessionName","heading","h4","light","RichHistoryQueriesTab","datasourceFilters","onSelectDatasourceFilters","onChangeSortOrder","sortOrder","activeDatasourceOnly","retentionPeriod","timeFilter","setTimeFilter","setData","searchInput","setSearchInput","debouncedSearchInput","setDebouncedSearchInput","useDebounce","datasourcesRetrievedFromQueryHistory","uniqBy","listOfDatasources","createDatasourcesList","filterAndSortQueries","filteredQueries","mappedQueriesToHeadings","mapQueriesToHeadings","mapNumbertoTimeInSlider","RangeSlider","tooltipAlwaysVisible","orientation","formatTooltipResult","reverse","onAfterChange","MultiSelect","menuShouldPortal","FilterInput","Select","sortOrderOptions","order","idx","imgUrl","input","switch","retentionPeriodOptions","RichHistorySettings","starredTabAsFirstTab","onChangeRetentionPeriod","toggleStarredTabAsFirstTab","toggleactiveDatasourceOnly","deleteRichHistory","selectedOption","v","Field","MAX_HISTORY_ITEMS","Switch","bold","RichHistoryStarredTab","starredQueries","Tabs","UnThemedRichHistory","RICH_HISTORY_SETTING_KEYS","console","updateFilters","activeDatasourceInstance","componentDidUpdate","prevProps","richHistory","firstTab","RichHistory","Starred","Settings","toggleActiveDatasourceOnly","defaultTab","withTheme","loadRichHistory","setHeight","_e","_dir","SecondaryActions","containerMargin","HorizontalGroup","addQueryRowButtonHidden","onClickAddQueryRowButton","addQueryRowButtonDisabled","richHistoryButtonActive","onClickRichHistoryButton","queryInspectorButtonActive","onClickQueryInspectorButton","loadingInState","tableResult","TableContainer","getTableHeight","onCellFilterAdded","ariaLabel","tableWidth","PANEL_BORDER","dataFrame","valueRowIndex","Table","UiFindInput","allowClear","inputProps","suffix","clearUiFind","Input","trackFindFunction","TracePageSearchBar","navbarFixed","z2","TracePageSearchBarBar","TracePageSearchBarSuffix","TracePageSearchBarBtn","TracePageSearchBarBtnDisabled","TracePageSearchBarLocateBtn","navigable","nextResult","prevResult","onSearchValueChange","searchValue","searchBarSuffix","btnClass","uiFindInputInputProps","ubFlexAuto","ubJustifyEnd","createSpanLinkFactory","traceToLogsOptions","f","links","span","dataFrameRowIndex","getTimeRangeFromSpan","datasourceUid","dataSourceSettings","isSplunkDS","dataLink","tags","filterByTraceID","filterBySpanID","mapTagNamesEnabled","mappedTags","keysToCheck","defaultKeys","process","tag","keyValue","includes","expr","traceID","spanID","url","internal","getLinkForLoki","getLinkForSplunk","mapInternalLinkToExplore","internalLink","scopedVars","startMs","spanStartTimeShift","endMs","spanEndTimeShift","onClickFn","getTemplateSrv","legacyCreateSpanLinkFactory","timeShift","adjustedStartTime","floor","startTime","spanEndMs","adjustedEndTime","makeDetailSubsectionToggle","subSection","detailStates","setDetailStates","old","detailState","toggleTags","toggleProcess","toggleWarnings","toggleReferences","toggleStackTraces","toggleLogs","newDetailStates","Map","set","noop","TraceView","expandOne","expandAll","collapseOne","collapseAll","childrenToggle","childrenHiddenIDs","spanFindMatches","traceProp","toggleDetail","detailLogItemToggle","detailLogsToggle","detailProcessToggle","detailReferencesToggle","detailReferenceItemToggle","detailTagsToggle","detailWarningsToggle","detailStackTracesToggle","has","delete","DetailState","log","toggleLogItem","reference","toggleReferenceItem","useDetailState","removeHoverIndentGuideId","addHoverIndentGuideId","hoverIndentGuideIds","setHoverIndentGuideIds","newHoverIndentGuideIds","useHoverIndentGuide","viewRange","updateViewRangeTime","updateNextViewRangeTime","setViewRange","update","prevRange","end","useViewRange","spanNameColumnWidth","setSpanNameColumnWidth","slim","setSlim","datasource","focusedSpanId","createFocusSpanLink","panelState","panelsState","trace","spanId","setFocusedSpanId","changePanelState","traceId","useFocusSpanLink","traceTimeline","shouldScrollToFirstUiFindMatch","jsonData","tracesToLogs","createSpanLink","onSlimViewClicked","canCollapse","hideMap","hideSummary","onTraceGraphViewClicked","slimView","registerAccessors","scrollToFirstVisibleSpan","findMatchesIDs","focusSpan","createLinkToExternalSpan","clearShouldScrollToFirstUiFindMatch","detailToggle","setTrace","linksGetter","uiFind","search","scrollElement","focusedSpanIdForSearch","shouldDisableCollapse","allSpans","hiddenSpansIds","hasChildren","transformDataFrames","view","DataFrameView","processes","serviceName","serviceTags","spans","toArray","references","parentSpanID","refType","processID","flags","logs","l","timestamp","transformTraceDataFrame","transformTraceData","TraceViewContainer","setSearch","filterSpans","useSearch","setChildrenHiddenIDs","prevExpandedDepth","expandNextHiddenSpan","newChildrenHiddenIDs","res","depth","nearestCollapsedAncestor","curSpan","useChildrenState","setFocusedSpanIdForSearch","setSearchBarSuffix","getSearchBarSuffix","spanMatches","prevMatchedIndex","Explore","rawRange","operator","FILTER_FOR_OPERATOR","FILTER_OUT_OPERATOR","onModifyQueries","queryKeys","addQueryRow","makeAbsoluteTime","action","modifyQuery","modifier","modification","modifyQueries","changeSize","scanStart","scanStopAction","changeGraphStyle","openDrawer","getNodeGraphDataFrames","absoluteTimeUnsubsciber","AbsoluteTimeEvent","onMakeAbsoluteTime","unsubscribe","renderEmptyState","renderGraphPanel","graphResult","renderLogsVolume","loadLogsVolumeData","renderTablePanel","renderLogsPanel","renderNodeGraphPanel","showTrace","memoizedGetNodeGraphDataFrames","renderTraceViewPanel","preferredVisualisationType","showMetrics","showTable","showLogs","showNodeGraph","exploreMain","showPanels","showRichHistory","showQueryInspector","autoHeightMin","scrollRefCallback","toggleShowRichHistory","toggleShowQueryInspector","disableHeight","ErrorBoundaryAlert","compose","ExplorePaneContainerUnconnected","prevUrlQuery","urlQuery","lastSavedUrl","refreshExplore","el","exploreEvents","EventBusSrv","initialized","initialDatasource","initialQueries","initialRange","initializeExplore","removeAllListeners","cleanupPaneAction","exploreClass","getRef","ensureQueriesMemoized","ensureQueries","getTimeRangeFromUrlMemoized","getTimeRangeFromUrl","urlState","parseUrlState","urlRange","lastUsedDatasourceKeyForOrgId","orgId","getTimeRange","DEFAULT_RANGE","ExplorePaneContainer","resetExploreAction","richHistoryUpdatedAction","navModel","getNavModel","navIndex","exploreState","WrapperUnconnected","searchParams","locationService","queryParams","datasourceTitle","documentTitle","Branding","hasSplit","monadic","fn","cache","serializer","arg","cacheKey","computedValue","variadic","args","assemble","context","strategy","serialize","strategyDefault","serializerDefault","JSON","stringify","ObjectWithoutPrototypeCache","cacheDefault","module","exports","strategies","Q","getPrototypeOf","Function","Z","L","o","nn","u","X","rn","writable","clear","h","freeze","isFrozen","tn","_","U","j","O","g","S","w","m","P","M","H","A","I","R","D","F","z","getOwnPropertyDescriptor","E","N","T","C","en","on","Proxy","revocable","revoke","proxy","J","K","G","W","Symbol","B","Reflect","for","iterator","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","getOwnPropertyDescriptors","deleteProperty","un","Promise","produceWithPatches","useProxies","setUseProxies","autoFreeze","setAutoFreeze","createDraft","finishDraft","applyPatches","path","op","$","an"],"sourceRoot":""}