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CACX,CA+uB4DI,CAAOP,EAAY,CAAC,cAC5D,OAAO7S,EAAMqT,aAAaX,EAAeI,EAC7C,CAEA,OAAO9S,EAAMqT,aAAaX,EAAeG,GAC7C,IAAK,aAED,OADAH,EAAgBX,GACK5S,KAAI,SAAUmU,GAAM,QAASA,GAAMtT,EAAMqT,aAAaC,EAAIT,EAAa,IAChG,QACI,OAAOtJ,EAAiBgK,cAAcX,EAAY,MAE9D,EACOtL,CACX,CA1JqC,CA0JnCtH,EAAMwT,eAuBiB3D,IAAU7P,EAAMyT,UAAYzT,EAAM0T,gBA4C1DC,EAAA,GAAmBrM,C","sources":["webpack:///./src/fragments/Graph.react.js","webpack:///./node_modules/react-resize-detector/build/withPolyfill.js"],"sourcesContent":["import lazyLoadMathJax from '../utils/LazyLoader/mathjax';\nimport React, {Component} from 'react';\n// /build/withPolyfill for IE11 support - https://github.com/maslianok/react-resize-detector/issues/144\nimport ResizeDetector from 'react-resize-detector/build/withPolyfill';\nimport {\n equals,\n filter,\n has,\n includes,\n isNil,\n mergeDeepRight,\n omit,\n type,\n} from 'ramda';\nimport PropTypes from 'prop-types';\nimport {graphPropTypes, graphDefaultProps} from '../components/Graph.react';\n/* global Plotly:true */\n\n/**\n * `autosize: true` causes Plotly.js to conform to the parent element size.\n * This is necessary for `dcc.Graph` call to `Plotly.Plots.resize(target)` to do something.\n *\n * Users can override this value for specific use-cases by explicitly passing `autoresize: true`\n * if `responsive` is not set to True.\n */\nconst RESPONSIVE_LAYOUT = {\n autosize: true,\n height: undefined,\n width: undefined,\n};\n\nconst AUTO_LAYOUT = {};\n\nconst UNRESPONSIVE_LAYOUT = {\n autosize: false,\n};\n\n/**\n * `responsive: true` causes Plotly.js to resize the graph on `window.resize`.\n * This is necessary for `dcc.Graph` call to `Plotly.Plots.resize(target)` to do something.\n *\n * Users can override this value for specific use-cases by explicitly passing `responsive: false`\n * if `responsive` is not set to True.\n */\nconst RESPONSIVE_CONFIG = {\n responsive: true,\n};\n\nconst AUTO_CONFIG = {};\n\nconst UNRESPONSIVE_CONFIG = {\n responsive: false,\n};\n\nconst filterEventData = (gd, eventData, event) => {\n let filteredEventData;\n if (includes(event, ['click', 'hover', 'selected'])) {\n const points = [];\n\n if (isNil(eventData)) {\n return null;\n }\n\n /*\n * remove `data`, `layout`, `xaxis`, etc\n * objects from the event data since they're so big\n * and cause JSON stringify ciricular structure errors.\n *\n * also, pull down the `customdata` point from the data array\n * into the event object\n */\n const data = gd.data;\n\n for (let i = 0; i < eventData.points.length; i++) {\n const fullPoint = eventData.points[i];\n const pointData = filter(function (o) {\n return !includes(type(o), ['Object', 'Array']);\n }, fullPoint);\n\n // permit a bounding box to pass through, if present\n if (has('bbox', fullPoint)) {\n pointData.bbox = fullPoint.bbox;\n }\n\n if (\n has('curveNumber', fullPoint) &&\n has('customdata', data[pointData.curveNumber])\n ) {\n if (has('pointNumber', fullPoint)) {\n if (typeof fullPoint.pointNumber === 'number') {\n pointData.customdata =\n data[pointData.curveNumber].customdata[\n fullPoint.pointNumber\n ];\n } else if (\n !fullPoint.pointNumber &&\n fullPoint.data.mode.includes('lines')\n ) {\n pointData.customdata =\n data[pointData.curveNumber].customdata;\n }\n } else if (has('pointNumbers', fullPoint)) {\n pointData.customdata = fullPoint.pointNumbers.map(function (\n point\n ) {\n return data[pointData.curveNumber].customdata[point];\n });\n }\n }\n\n // specific to histogram. see https://github.com/plotly/plotly.js/pull/2113/\n if (has('pointNumbers', fullPoint)) {\n pointData.pointNumbers = fullPoint.pointNumbers;\n }\n\n points[i] = pointData;\n }\n filteredEventData = {points};\n } else if (event === 'relayout' || event === 'restyle') {\n /*\n * relayout shouldn't include any big objects\n * it will usually just contain the ranges of the axes like\n * \"xaxis.range[0]\": 0.7715822247381828,\n * \"xaxis.range[1]\": 3.0095292008680063`\n */\n filteredEventData = eventData;\n }\n if (has('range', eventData)) {\n filteredEventData.range = eventData.range;\n }\n if (has('lassoPoints', eventData)) {\n filteredEventData.lassoPoints = eventData.lassoPoints;\n }\n return filteredEventData;\n};\n\n/**\n * Graph can be used to render any plotly.js-powered data visualization.\n *\n * You can define callbacks based on user interaction with Graphs such as\n * hovering, clicking or selecting\n */\nclass PlotlyGraph extends Component {\n constructor(props) {\n super(props);\n this.gd = React.createRef();\n this._hasPlotted = false;\n this._prevGd = null;\n this._queue = Promise.resolve();\n\n this.bindEvents = this.bindEvents.bind(this);\n this.getConfig = this.getConfig.bind(this);\n this.getConfigOverride = this.getConfigOverride.bind(this);\n this.getLayout = this.getLayout.bind(this);\n this.getLayoutOverride = this.getLayoutOverride.bind(this);\n this.graphResize = this.graphResize.bind(this);\n this.isResponsive = this.isResponsive.bind(this);\n this.amendTraces = this.amendTraces.bind(this);\n\n this.state = {override: {}, originals: {}};\n }\n\n plot(props) {\n let {figure, config} = props;\n const {animate, animation_options, responsive, mathjax} = props;\n\n const gd = this.gd.current;\n figure = props._dashprivate_transformFigure(figure, gd);\n config = props._dashprivate_transformConfig(config, gd);\n\n const configClone = this.getConfig(config, responsive);\n // add typesetMath | not exposed to the dash API\n configClone.typesetMath = mathjax;\n\n const figureClone = {\n data: figure.data,\n layout: this.getLayout(figure.layout, responsive),\n frames: figure.frames,\n config: configClone,\n };\n\n if (\n animate &&\n this._hasPlotted &&\n figure.data.length === gd.data.length\n ) {\n // in case we've have figure frames,\n // we need to recreate frames before animation\n if (figure.frames) {\n return Plotly.deleteFrames(gd)\n .then(() => Plotly.addFrames(gd, figure.frames))\n .then(() =>\n Plotly.animate(gd, figureClone, animation_options)\n );\n }\n return Plotly.animate(gd, figureClone, animation_options);\n }\n\n gd.classList.add('dash-graph--pending');\n\n return lazyLoadMathJax(mathjax)\n .then(() => {\n const gd = this.gd.current;\n return gd && Plotly.react(gd, figureClone);\n })\n .then(() => {\n const gd = this.gd.current;\n\n // double-check gd hasn't been unmounted\n if (!gd) {\n return;\n }\n\n gd.classList.remove('dash-graph--pending');\n\n // in case we've made a new DOM element, transfer events\n if (this._hasPlotted && gd !== this._prevGd) {\n if (this._prevGd && this._prevGd.removeAllListeners) {\n this._prevGd.removeAllListeners();\n Plotly.purge(this._prevGd);\n }\n this._hasPlotted = false;\n }\n\n if (!this._hasPlotted) {\n this.bindEvents();\n this.graphResize(true);\n this._hasPlotted = true;\n this._prevGd = gd;\n }\n });\n }\n\n amendTraces(p, oldProps, newProps) {\n const {prependData: oldPrepend, extendData: oldExtend} = oldProps;\n const {prependData: newPrepend, extendData: newExtend} = newProps;\n const _this = this;\n\n function mergeTraces(props, dataKey, plotlyFnKey) {\n const clearState = props.clearState;\n const dataArray = props[dataKey];\n\n let _p = Promise.resolve();\n\n dataArray.forEach(data => {\n let updateData, traceIndices, maxPoints;\n if (Array.isArray(data) && typeof data[0] === 'object') {\n [updateData, traceIndices, maxPoints] = data;\n } else {\n updateData = data;\n }\n\n if (!traceIndices) {\n function getFirstProp(data) {\n return data[Object.keys(data)[0]];\n }\n\n function generateIndices(data) {\n return Array.from(\n Array(getFirstProp(data).length).keys()\n );\n }\n traceIndices = generateIndices(updateData);\n }\n\n _p = _p.then(() => {\n const gd = _this.gd.current;\n return (\n gd &&\n Plotly[plotlyFnKey](\n gd,\n updateData,\n traceIndices,\n maxPoints\n )\n );\n });\n });\n\n return _p.then(() => clearState(dataKey));\n }\n\n let modified = false;\n\n if (newPrepend?.length && oldPrepend !== newPrepend) {\n modified = true;\n p = p.then(() =>\n mergeTraces(newProps, 'prependData', 'prependTraces')\n );\n }\n\n if (newExtend?.length && oldExtend !== newExtend) {\n modified = true;\n p = p.then(() =>\n mergeTraces(newProps, 'extendData', 'extendTraces')\n );\n }\n\n if (modified) {\n p = p.then(() =>\n newProps._dashprivate_onFigureModified(newProps.figure)\n );\n }\n\n return p;\n }\n\n getConfig(config, responsive) {\n return mergeDeepRight(config, this.getConfigOverride(responsive));\n }\n\n getLayout(layout, responsive) {\n if (!layout) {\n return layout;\n }\n const override = this.getLayoutOverride(responsive);\n const {override: prev_override, originals: prev_originals} = this.state;\n // Store the original data that we're about to override\n const originals = {};\n for (const key in override) {\n if (layout[key] !== prev_override[key]) {\n originals[key] = layout[key];\n } else if (prev_originals.hasOwnProperty(key)) {\n originals[key] = prev_originals[key];\n }\n }\n this.setState({override, originals});\n // Undo the previous override, but only for keys that the user did not change\n for (const key in prev_originals) {\n if (layout[key] === prev_override[key]) {\n layout[key] = prev_originals[key];\n }\n }\n // Apply the current override\n for (const key in override) {\n layout[key] = override[key];\n }\n return layout; // not really a clone\n }\n\n getConfigOverride(responsive) {\n switch (responsive) {\n case false:\n return UNRESPONSIVE_CONFIG;\n case true:\n return RESPONSIVE_CONFIG;\n default:\n return AUTO_CONFIG;\n }\n }\n\n getLayoutOverride(responsive) {\n switch (responsive) {\n case false:\n return UNRESPONSIVE_LAYOUT;\n case true:\n return RESPONSIVE_LAYOUT;\n default:\n return AUTO_LAYOUT;\n }\n }\n\n isResponsive(props) {\n const {config, figure, responsive} = props;\n\n if (type(responsive) === 'Boolean') {\n return responsive;\n }\n\n return Boolean(\n config.responsive &&\n (!figure.layout ||\n ((figure.layout.autosize ||\n isNil(figure.layout.autosize)) &&\n (isNil(figure.layout.height) ||\n isNil(figure.layout.width))))\n );\n }\n\n graphResize(force = false) {\n if (!force && !this.isResponsive(this.props)) {\n return;\n }\n\n const gd = this.gd.current;\n if (!gd) {\n return;\n }\n\n gd.classList.add('dash-graph--pending');\n\n Plotly.Plots.resize(gd)\n .catch(() => {})\n .finally(() => gd.classList.remove('dash-graph--pending'));\n }\n\n bindEvents() {\n const {\n setProps,\n clear_on_unhover,\n relayoutData,\n restyleData,\n hoverData,\n selectedData,\n } = this.props;\n\n const gd = this.gd.current;\n\n gd.on('plotly_click', eventData => {\n const clickData = filterEventData(gd, eventData, 'click');\n if (!isNil(clickData)) {\n setProps({clickData});\n }\n });\n gd.on('plotly_clickannotation', eventData => {\n const clickAnnotationData = omit(\n ['event', 'fullAnnotation'],\n eventData\n );\n setProps({clickAnnotationData});\n });\n gd.on('plotly_hover', eventData => {\n const hover = filterEventData(gd, eventData, 'hover');\n if (!isNil(hover) && !equals(hover, hoverData)) {\n setProps({hoverData: hover});\n }\n });\n gd.on('plotly_selected', eventData => {\n const selected = filterEventData(gd, eventData, 'selected');\n if (!isNil(selected) && !equals(selected, selectedData)) {\n setProps({selectedData: selected});\n }\n });\n gd.on('plotly_deselect', () => {\n setProps({selectedData: null});\n });\n gd.on('plotly_relayout', eventData => {\n const relayout = filterEventData(gd, eventData, 'relayout');\n if (!isNil(relayout) && !equals(relayout, relayoutData)) {\n setProps({relayoutData: relayout});\n }\n });\n gd.on('plotly_restyle', eventData => {\n const restyle = filterEventData(gd, eventData, 'restyle');\n if (!isNil(restyle) && !equals(restyle, restyleData)) {\n setProps({restyleData: restyle});\n }\n });\n gd.on('plotly_unhover', () => {\n if (clear_on_unhover) {\n setProps({hoverData: null});\n }\n });\n }\n\n componentDidMount() {\n const p = this.plot(this.props);\n this._queue = this.amendTraces(p, {}, this.props);\n }\n\n componentWillUnmount() {\n const gd = this.gd.current;\n if (gd && gd.removeAllListeners) {\n gd.removeAllListeners();\n if (this._hasPlotted) {\n Plotly.purge(gd);\n }\n }\n }\n\n shouldComponentUpdate(nextProps) {\n return (\n this.props.id !== nextProps.id ||\n JSON.stringify(this.props.style) !==\n JSON.stringify(nextProps.style) ||\n JSON.stringify(this.props.loading_state) !==\n JSON.stringify(nextProps.loading_state)\n );\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const idChanged = this.props.id !== nextProps.id;\n if (idChanged) {\n /*\n * then the dom needs to get re-rendered with a new ID.\n * the graph will get updated in componentDidUpdate\n */\n return;\n }\n\n let p = this._queue;\n\n if (\n this.props.mathjax !== nextProps.mathjax ||\n this.props.figure !== nextProps.figure ||\n this.props._dashprivate_transformConfig !==\n nextProps._dashprivate_transformConfig ||\n this.props._dashprivate_transformFigure !==\n nextProps._dashprivate_transformFigure\n ) {\n p = p.then(() => this.plot(nextProps));\n }\n\n this._queue = this.amendTraces(p, this.props, nextProps);\n }\n\n componentDidUpdate(prevProps) {\n if (\n prevProps.id !== this.props.id ||\n prevProps.mathjax !== this.props.mathjax\n ) {\n this._queue = this._queue.then(() => this.plot(this.props));\n }\n }\n\n render() {\n const {className, id, style, loading_state} = this.props;\n\n return (\n