\n * or an id to an existing graph
\n * @param {object} opts (see above)\n * @return {promise}\n */\nfunction toImage(gd, opts) {\n opts = opts || {};\n\n var data;\n var layout;\n var config;\n var fullLayout;\n\n if(Lib.isPlainObject(gd)) {\n data = gd.data || [];\n layout = gd.layout || {};\n config = gd.config || {};\n fullLayout = {};\n } else {\n gd = Lib.getGraphDiv(gd);\n data = Lib.extendDeep([], gd.data);\n layout = Lib.extendDeep({}, gd.layout);\n config = gd._context;\n fullLayout = gd._fullLayout || {};\n }\n\n function isImpliedOrValid(attr) {\n return !(attr in opts) || Lib.validate(opts[attr], attrs[attr]);\n }\n\n if((!isImpliedOrValid('width') && opts.width !== null) ||\n (!isImpliedOrValid('height') && opts.height !== null)) {\n throw new Error('Height and width should be pixel values.');\n }\n\n if(!isImpliedOrValid('format')) {\n throw new Error('Export format is not ' + Lib.join2(attrs.format.values, ', ', ' or ') + '.');\n }\n\n var fullOpts = {};\n\n function coerce(attr, dflt) {\n return Lib.coerce(opts, fullOpts, attrs, attr, dflt);\n }\n\n var format = coerce('format');\n var width = coerce('width');\n var height = coerce('height');\n var scale = coerce('scale');\n var setBackground = coerce('setBackground');\n var imageDataOnly = coerce('imageDataOnly');\n\n // put the cloned div somewhere off screen before attaching to DOM\n var clonedGd = document.createElement('div');\n clonedGd.style.position = 'absolute';\n clonedGd.style.left = '-5000px';\n document.body.appendChild(clonedGd);\n\n // extend layout with image options\n var layoutImage = Lib.extendFlat({}, layout);\n if(width) {\n layoutImage.width = width;\n } else if(opts.width === null && isNumeric(fullLayout.width)) {\n layoutImage.width = fullLayout.width;\n }\n if(height) {\n layoutImage.height = height;\n } else if(opts.height === null && isNumeric(fullLayout.height)) {\n layoutImage.height = fullLayout.height;\n }\n\n // extend config for static plot\n var configImage = Lib.extendFlat({}, config, {\n _exportedPlot: true,\n staticPlot: true,\n setBackground: setBackground\n });\n\n var redrawFunc = helpers.getRedrawFunc(clonedGd);\n\n function wait() {\n return new Promise(function(resolve) {\n setTimeout(resolve, helpers.getDelay(clonedGd._fullLayout));\n });\n }\n\n function convert() {\n return new Promise(function(resolve, reject) {\n var svg = toSVG(clonedGd, format, scale);\n var width = clonedGd._fullLayout.width;\n var height = clonedGd._fullLayout.height;\n\n function cleanup() {\n plotApi.purge(clonedGd);\n document.body.removeChild(clonedGd);\n }\n\n if(format === 'full-json') {\n var json = plots.graphJson(clonedGd, false, 'keepdata', 'object', true, true);\n json.version = version;\n json = JSON.stringify(json);\n cleanup();\n if(imageDataOnly) {\n return resolve(json);\n } else {\n return resolve(helpers.encodeJSON(json));\n }\n }\n\n cleanup();\n\n if(format === 'svg') {\n if(imageDataOnly) {\n return resolve(svg);\n } else {\n return resolve(helpers.encodeSVG(svg));\n }\n }\n\n var canvas = document.createElement('canvas');\n canvas.id = Lib.randstr();\n\n svgToImg({\n format: format,\n width: width,\n height: height,\n scale: scale,\n canvas: canvas,\n svg: svg,\n // ask svgToImg to return a Promise\n // rather than EventEmitter\n // leave EventEmitter for backward\n // compatibility\n promise: true\n })\n .then(resolve)\n .catch(reject);\n });\n }\n\n function urlToImageData(url) {\n if(imageDataOnly) {\n return url.replace(helpers.IMAGE_URL_PREFIX, '');\n } else {\n return url;\n }\n }\n\n return new Promise(function(resolve, reject) {\n plotApi.newPlot(clonedGd, data, layoutImage, configImage)\n .then(redrawFunc)\n .then(wait)\n .then(convert)\n .then(function(url) { resolve(urlToImageData(url)); })\n .catch(function(err) { reject(err); });\n });\n}\n\nmodule.exports = toImage;\n","'use strict';\n\nvar Lib = require('../lib');\nvar Plots = require('../plots/plots');\nvar PlotSchema = require('./plot_schema');\nvar dfltConfig = require('./plot_config').dfltConfig;\n\nvar isPlainObject = Lib.isPlainObject;\nvar isArray = Array.isArray;\nvar isArrayOrTypedArray = Lib.isArrayOrTypedArray;\n\n/**\n * Validate a data array and layout object.\n *\n * @param {array} data\n * @param {object} layout\n *\n * @return {array} array of error objects each containing:\n * - {string} code\n * error code ('object', 'array', 'schema', 'unused', 'invisible' or 'value')\n * - {string} container\n * container where the error occurs ('data' or 'layout')\n * - {number} trace\n * trace index of the 'data' container where the error occurs\n * - {array} path\n * nested path to the key that causes the error\n * - {string} astr\n * attribute string variant of 'path' compatible with Plotly.restyle and\n * Plotly.relayout.\n * - {string} msg\n * error message (shown in console in logger config argument is enable)\n */\nmodule.exports = function validate(data, layout) {\n if(data === undefined) data = [];\n if(layout === undefined) layout = {};\n\n var schema = PlotSchema.get();\n var errorList = [];\n var gd = {_context: Lib.extendFlat({}, dfltConfig)};\n\n var dataIn, layoutIn;\n\n if(isArray(data)) {\n gd.data = Lib.extendDeep([], data);\n dataIn = data;\n } else {\n gd.data = [];\n dataIn = [];\n errorList.push(format('array', 'data'));\n }\n\n if(isPlainObject(layout)) {\n gd.layout = Lib.extendDeep({}, layout);\n layoutIn = layout;\n } else {\n gd.layout = {};\n layoutIn = {};\n if(arguments.length > 1) {\n errorList.push(format('object', 'layout'));\n }\n }\n\n // N.B. dataIn and layoutIn are in general not the same as\n // gd.data and gd.layout after supplyDefaults as some attributes\n // in gd.data and gd.layout (still) get mutated during this step.\n\n Plots.supplyDefaults(gd);\n\n var dataOut = gd._fullData;\n var len = dataIn.length;\n\n for(var i = 0; i < len; i++) {\n var traceIn = dataIn[i];\n var base = ['data', i];\n\n if(!isPlainObject(traceIn)) {\n errorList.push(format('object', base));\n continue;\n }\n\n var traceOut = dataOut[i];\n var traceType = traceOut.type;\n var traceSchema = schema.traces[traceType].attributes;\n\n // PlotSchema does something fancy with trace 'type', reset it here\n // to make the trace schema compatible with Lib.validate.\n traceSchema.type = {\n valType: 'enumerated',\n values: [traceType]\n };\n\n if(traceOut.visible === false && traceIn.visible !== false) {\n errorList.push(format('invisible', base));\n }\n\n crawl(traceIn, traceOut, traceSchema, errorList, base);\n\n var transformsIn = traceIn.transforms;\n var transformsOut = traceOut.transforms;\n\n if(transformsIn) {\n if(!isArray(transformsIn)) {\n errorList.push(format('array', base, ['transforms']));\n }\n\n base.push('transforms');\n\n for(var j = 0; j < transformsIn.length; j++) {\n var path = ['transforms', j];\n var transformType = transformsIn[j].type;\n\n if(!isPlainObject(transformsIn[j])) {\n errorList.push(format('object', base, path));\n continue;\n }\n\n var transformSchema = schema.transforms[transformType] ?\n schema.transforms[transformType].attributes :\n {};\n\n // add 'type' to transform schema to validate the transform type\n transformSchema.type = {\n valType: 'enumerated',\n values: Object.keys(schema.transforms)\n };\n\n crawl(transformsIn[j], transformsOut[j], transformSchema, errorList, base, path);\n }\n }\n }\n\n var layoutOut = gd._fullLayout;\n var layoutSchema = fillLayoutSchema(schema, dataOut);\n\n crawl(layoutIn, layoutOut, layoutSchema, errorList, 'layout');\n\n // return undefined if no validation errors were found\n return (errorList.length === 0) ? void(0) : errorList;\n};\n\nfunction crawl(objIn, objOut, schema, list, base, path) {\n path = path || [];\n\n var keys = Object.keys(objIn);\n\n for(var i = 0; i < keys.length; i++) {\n var k = keys[i];\n\n // transforms are handled separately\n if(k === 'transforms') continue;\n\n var p = path.slice();\n p.push(k);\n\n var valIn = objIn[k];\n var valOut = objOut[k];\n\n var nestedSchema = getNestedSchema(schema, k);\n var nestedValType = (nestedSchema || {}).valType;\n var isInfoArray = nestedValType === 'info_array';\n var isColorscale = nestedValType === 'colorscale';\n var items = (nestedSchema || {}).items;\n\n if(!isInSchema(schema, k)) {\n list.push(format('schema', base, p));\n } else if(isPlainObject(valIn) && isPlainObject(valOut) && nestedValType !== 'any') {\n crawl(valIn, valOut, nestedSchema, list, base, p);\n } else if(isInfoArray && isArray(valIn)) {\n if(valIn.length > valOut.length) {\n list.push(format('unused', base, p.concat(valOut.length)));\n }\n var len = valOut.length;\n var arrayItems = Array.isArray(items);\n if(arrayItems) len = Math.min(len, items.length);\n var m, n, item, valInPart, valOutPart;\n if(nestedSchema.dimensions === 2) {\n for(n = 0; n < len; n++) {\n if(isArray(valIn[n])) {\n if(valIn[n].length > valOut[n].length) {\n list.push(format('unused', base, p.concat(n, valOut[n].length)));\n }\n var len2 = valOut[n].length;\n for(m = 0; m < (arrayItems ? Math.min(len2, items[n].length) : len2); m++) {\n item = arrayItems ? items[n][m] : items;\n valInPart = valIn[n][m];\n valOutPart = valOut[n][m];\n if(!Lib.validate(valInPart, item)) {\n list.push(format('value', base, p.concat(n, m), valInPart));\n } else if(valOutPart !== valInPart && valOutPart !== +valInPart) {\n list.push(format('dynamic', base, p.concat(n, m), valInPart, valOutPart));\n }\n }\n } else {\n list.push(format('array', base, p.concat(n), valIn[n]));\n }\n }\n } else {\n for(n = 0; n < len; n++) {\n item = arrayItems ? items[n] : items;\n valInPart = valIn[n];\n valOutPart = valOut[n];\n if(!Lib.validate(valInPart, item)) {\n list.push(format('value', base, p.concat(n), valInPart));\n } else if(valOutPart !== valInPart && valOutPart !== +valInPart) {\n list.push(format('dynamic', base, p.concat(n), valInPart, valOutPart));\n }\n }\n }\n } else if(nestedSchema.items && !isInfoArray && isArray(valIn)) {\n var _nestedSchema = items[Object.keys(items)[0]];\n var indexList = [];\n\n var j, _p;\n\n // loop over valOut items while keeping track of their\n // corresponding input container index (given by _index)\n for(j = 0; j < valOut.length; j++) {\n var _index = valOut[j]._index || j;\n\n _p = p.slice();\n _p.push(_index);\n\n if(isPlainObject(valIn[_index]) && isPlainObject(valOut[j])) {\n indexList.push(_index);\n var valInj = valIn[_index];\n var valOutj = valOut[j];\n if(isPlainObject(valInj) && valInj.visible !== false && valOutj.visible === false) {\n list.push(format('invisible', base, _p));\n } else crawl(valInj, valOutj, _nestedSchema, list, base, _p);\n }\n }\n\n // loop over valIn to determine where it went wrong for some items\n for(j = 0; j < valIn.length; j++) {\n _p = p.slice();\n _p.push(j);\n\n if(!isPlainObject(valIn[j])) {\n list.push(format('object', base, _p, valIn[j]));\n } else if(indexList.indexOf(j) === -1) {\n list.push(format('unused', base, _p));\n }\n }\n } else if(!isPlainObject(valIn) && isPlainObject(valOut)) {\n list.push(format('object', base, p, valIn));\n } else if(!isArrayOrTypedArray(valIn) && isArrayOrTypedArray(valOut) && !isInfoArray && !isColorscale) {\n list.push(format('array', base, p, valIn));\n } else if(!(k in objOut)) {\n list.push(format('unused', base, p, valIn));\n } else if(!Lib.validate(valIn, nestedSchema)) {\n list.push(format('value', base, p, valIn));\n } else if(nestedSchema.valType === 'enumerated' &&\n ((nestedSchema.coerceNumber && valIn !== +valOut) || valIn !== valOut)\n ) {\n list.push(format('dynamic', base, p, valIn, valOut));\n }\n }\n\n return list;\n}\n\n// the 'full' layout schema depends on the traces types presents\nfunction fillLayoutSchema(schema, dataOut) {\n var layoutSchema = schema.layout.layoutAttributes;\n\n for(var i = 0; i < dataOut.length; i++) {\n var traceOut = dataOut[i];\n var traceSchema = schema.traces[traceOut.type];\n var traceLayoutAttr = traceSchema.layoutAttributes;\n\n if(traceLayoutAttr) {\n if(traceOut.subplot) {\n Lib.extendFlat(layoutSchema[traceSchema.attributes.subplot.dflt], traceLayoutAttr);\n } else {\n Lib.extendFlat(layoutSchema, traceLayoutAttr);\n }\n }\n }\n\n return layoutSchema;\n}\n\n// validation error codes\nvar code2msgFunc = {\n object: function(base, astr) {\n var prefix;\n\n if(base === 'layout' && astr === '') prefix = 'The layout argument';\n else if(base[0] === 'data' && astr === '') {\n prefix = 'Trace ' + base[1] + ' in the data argument';\n } else prefix = inBase(base) + 'key ' + astr;\n\n return prefix + ' must be linked to an object container';\n },\n array: function(base, astr) {\n var prefix;\n\n if(base === 'data') prefix = 'The data argument';\n else prefix = inBase(base) + 'key ' + astr;\n\n return prefix + ' must be linked to an array container';\n },\n schema: function(base, astr) {\n return inBase(base) + 'key ' + astr + ' is not part of the schema';\n },\n unused: function(base, astr, valIn) {\n var target = isPlainObject(valIn) ? 'container' : 'key';\n\n return inBase(base) + target + ' ' + astr + ' did not get coerced';\n },\n dynamic: function(base, astr, valIn, valOut) {\n return [\n inBase(base) + 'key',\n astr,\n '(set to \\'' + valIn + '\\')',\n 'got reset to',\n '\\'' + valOut + '\\'',\n 'during defaults.'\n ].join(' ');\n },\n invisible: function(base, astr) {\n return (\n astr ? (inBase(base) + 'item ' + astr) : ('Trace ' + base[1])\n ) + ' got defaulted to be not visible';\n },\n value: function(base, astr, valIn) {\n return [\n inBase(base) + 'key ' + astr,\n 'is set to an invalid value (' + valIn + ')'\n ].join(' ');\n }\n};\n\nfunction inBase(base) {\n if(isArray(base)) return 'In data trace ' + base[1] + ', ';\n\n return 'In ' + base + ', ';\n}\n\nfunction format(code, base, path, valIn, valOut) {\n path = path || '';\n\n var container, trace;\n\n // container is either 'data' or 'layout\n // trace is the trace index if 'data', null otherwise\n\n if(isArray(base)) {\n container = base[0];\n trace = base[1];\n } else {\n container = base;\n trace = null;\n }\n\n var astr = convertPathToAttributeString(path);\n var msg = code2msgFunc[code](base, astr, valIn, valOut);\n\n // log to console if logger config option is enabled\n Lib.log(msg);\n\n return {\n code: code,\n container: container,\n trace: trace,\n path: path,\n astr: astr,\n msg: msg\n };\n}\n\nfunction isInSchema(schema, key) {\n var parts = splitKey(key);\n var keyMinusId = parts.keyMinusId;\n var id = parts.id;\n\n if((keyMinusId in schema) && schema[keyMinusId]._isSubplotObj && id) {\n return true;\n }\n\n return (key in schema);\n}\n\nfunction getNestedSchema(schema, key) {\n if(key in schema) return schema[key];\n\n var parts = splitKey(key);\n\n return schema[parts.keyMinusId];\n}\n\nvar idRegex = Lib.counterRegex('([a-z]+)');\n\nfunction splitKey(key) {\n var idMatch = key.match(idRegex);\n\n return {\n keyMinusId: idMatch && idMatch[1],\n id: idMatch && idMatch[2]\n };\n}\n\nfunction convertPathToAttributeString(path) {\n if(!isArray(path)) return String(path);\n\n var astr = '';\n\n for(var i = 0; i < path.length; i++) {\n var p = path[i];\n\n if(typeof p === 'number') {\n astr = astr.substr(0, astr.length - 1) + '[' + p + ']';\n } else {\n astr += p;\n }\n\n if(i < path.length - 1) astr += '.';\n }\n\n return astr;\n}\n"],"names":["Registry","require","module","exports","astr","arrayStr","match","rootContainers","layoutArrayContainers","regexpContainers","layoutArrayRegexes","rootPart","split","i","length","index","indexOf","tail","substr","array","Number","property","extendFlat","isPlainObject","traceOpts","valType","extras","flags","description","join","layoutOpts","traceEditTypeFlags","slice","concat","layoutEditTypeFlags","falseObj","keys","out","overrideAll","attrs","editTypeOverride","overrideContainers","key","attr","overrideOne","editType","Array","isArray","items","charAt","traces","layout","traceFlags","layoutFlags","update","editTypeParts","isNumeric","m4FromQuat","Lib","Plots","AxisIds","Color","cleanId","getFromTrace","traceIs","cleanAxRef","container","valIn","axLetter","cleanTitle","titleContainer","rewireAttr","oldAttrName","newAttrName","oldAttrSet","newAttrSet","title","text","cleanFinanceDir","dirContainer","dirName","name","showlegend","String","commonPrefix","name1","name2","show1","show2","trim","minLen","Math","min","cleanTextPosition","textposition","posY","posX","emptyContainer","outer","innerStr","Object","clearPromiseQueue","gd","_promises","log","cleanLayout","j","xaxis1","xaxis","yaxis1","yaxis","scene1","scene","axisAttrRegex","subplotsRegistry","cartesian","attrRegex","polarAttrRegex","polar","ternaryAttrRegex","ternary","sceneAttrRegex","gl3d","test","ax","anchor","overlaying","type","isdate","islog","autorange","rangemode","insiderange","range","categories","domain","undefined","autotick","tickmode","radialaxis","aaxis","baxis","caxis","cameraposition","rotation","center","radius","mat","eye","camera","x","y","z","up","zaxis","annotationsLen","annotations","ann","ref","xref","yref","shapesLen","shapes","shape","imagesLen","images","image","legend","xanchor","yanchor","dragmode","clean","template","cleanData","data","tracei","trace","ybins","xbins","error_y","dc","defaults","yeColor","color","defaultLine","addOpacity","rgb","opacity","bardir","orientation","swapXYData","colorscale","scl","reversescale","reversescl","_module","getModule","colorbar","containerName","contours","dims","opts","highlightColor","highlightcolor","highlightWidth","highlightwidth","increasingShowlegend","increasing","decreasingShowlegend","decreasing","increasingName","decreasingName","newName","transforms","transform","filtersrc","target","calendar","valuecalendar","styles","style","prevStyles","styleKeys","push","value","line","marker","autobinx","autobiny","swapAttrs","transpose","error_x","errorY","copyYstyle","copy_ystyle","thickness","width","hoverinfo","hoverInfoParts","coerceTraceIndices","traceIndices","map","_","traceIndicesOut","isIndex","warn","manageArrayContainers","np","newVal","undoit","obj","parts","pLength","pLast","pLastIsNumber","contPath","nestedProperty","get","splice","set","ATTR_TAIL_RE","getParent","search","hasParent","aobj","attrParent","axLetters","clearAxisTypes","layoutUpdate","_fullData","axAttr","_name","sceneName","_id","typeAttr","main","_doPlot","newPlot","restyle","relayout","redraw","_guiRestyle","_guiRelayout","_guiUpdate","_storeDirectGUIEdit","react","extendTraces","prependTraces","addTraces","deleteTraces","moveTraces","purge","addFrames","deleteFrames","animate","setPlotConfig","getGraphDiv","eraseActiveShape","deleteActiveShape","toImage","validate","downloadImage","templateApi","makeTemplate","validateTemplate","noop","Loggers","sorterAsc","containerArrayMatch","isAddVal","val","isRemoveVal","applyContainerArrayChanges","edits","_nestedProperty","componentType","supplyComponentDefaults","getComponentMethod","draw","drawOne","replotLater","replot","recalc","fullLayout","_fullLayout","fullVal","componentNum","objEdits","objKeys","objVal","adding","prefix","componentNums","sort","componentArrayIn","componentArray","componentArrayFull","deletes","firstIndexChange","maxIndex","indicesToDraw","max","d3","hasHover","Events","Queue","PlotSchema","Axes","handleRangeDefaults","cartesianLayoutAttributes","Drawing","initInteractions","xmlnsNamespaces","clearOutline","dfltConfig","manageArrays","helpers","subroutines","editTypes","AX_NAME_PATTERN","numericNameWarningCount","emitAfterPlot","_redrawFromAutoMarginCount","emit","setBackground","bgColor","_paper","e","error","opaqueSetBackground","combine","setPlotContext","config","_context","extendDeep","base","select","_baseUrl","size","window","location","href","context","plot3dPixelRatio","plotGlPixelRatio","editable","_exportedPlot","staticPlot","autosizable","scrollZoom","doubleClick","showTips","showLink","displayModeBar","_hasZeroHeight","clientHeight","_hasZeroWidth","clientWidth","szIn","szOut","_scrollZoom","geo","mapbox","positivifyIndices","indices","parentLength","positiveIndices","assertIndexArray","arrayName","parseInt","Error","checkMoveTracesArgs","currentIndices","newIndices","spliceTraces","maxPoints","updateArray","maxPointsIsObject","assertExtendTracesArgs","updateProps","prop","insert","maxp","isArrayOrTypedArray","constructor","floor","getExtendProperties","undoUpdate","undoPoints","concatTypedArray","arr0","arr1","arr2","_traces","Promise","reject","changed","specs","_restyle","calc","calcdata","seq","fullReplot","previousPromises","supplyDefaults","markerSize","doCalcdata","addAxRangeSequence","doTraceStyle","colorbars","doColorBars","rehover","redrag","reselect","add","redoit","plotDone","syncOrAsync","then","resolve","eventData","undefinedToNull","makeNP","preGUI","guiEditFlag","npSet","storeCurrent","arrayVal","arrayNew","maxLen","objNew","objBoth","fullData","_guiEditing","layoutNP","_preGUI","extendDeepAll","cleanDeprecatedAttributeKeys","axlist","a0","addToAxlist","axid","axName","id2name","autorangeAttr","rangeAttr","getFullTrace","traceIndex","_input","doextra","forEach","a","extraparam","replace","_tracePreGUI","_fullInput","uid","allBins","binAttr","arrayBins","vij","ai","cont","contFull","param","oldVal","valObject","vi","finalPart","prefixDot","innerContFull","getTraceValObject","impliedEdits","impliedKey","relativeAttr","labelsTo","valuesTo","_pielayer","selectAll","remove","gs","_size","orient","topOrBottom","thicknorm","h","w","lennorm","len","defaultOrientation","v","dataArrayContainers","arrayOk","swap","hovermode","plot","extendDeepNoArrays","oldAxisTitleRegex","counterRegex","colorbarRegex","oldAttrStr","newAttrStr","_relayout","layoutReplot","axRangeSupplyDefaultsByPass","doLegend","layoutstyle","layoutStyles","axrange","rangesAltered","ticks","doTicksRelayout","modebar","doModeBar","doCamera","axIn","axOut","k","coerce","dflt","options","axId","_matchGroup","axId2","ax2","drawAxes","axIds","id","getFromId","ticklabelposition","_anchorAxis","id2","skipTitle","doAutoRangeAndConstraints","drawData","finalDraw","AX_RANGE_RE","AX_AUTORANGE_RE","AX_DOMAIN_RE","axes","list","arrayEdits","axisAttr","newkey","p","recordAlteredAxis","pleafPlus","name2id","pend","pleaf","ptrunk","parentIn","parentFull","vOld","getLayoutValObject","oppositeAttr","_initialAutoSize","height","axFull","_inputDomain","toLog","fromLog","r0","r1","LN10","pow","_subplots","_subplot","viewInitial","fullProp","newType","propStr","updateValObject","reverse","_has","group","_constraintGroup","groupAxId","_constraintShrinkable","updateAutosize","oldWidth","oldHeight","autosize","plotAutoSize","traceUpdate","restyleSpecs","restyleFlags","relayoutSpecs","relayoutFlags","guiEdit","func","apply","arguments","layoutUIControlPatterns","pattern","traceUIControlPatterns","findUIPattern","patternSpecs","spec","head","getNewRev","revAttr","newRev","pop","uirevision","getFullTraceIndexFromUid","getTraceIndexFromUid","valsMatch","v1","v2","v1IsObj","v1IsArray","JSON","stringify","getDiffFlags","oldContainer","newContainer","outerparts","getValObject","immutable","inArray","arrayIndex","pushUnique","arrays","nChanges","transition","anim","nChangesAnim","newDataRevision","valObjectCanBeDataArray","tickMode","_compareAsJSON","canBeDataArray","wasArray","nowArray","inputKey","oldValIn","newValIn","_isLinkedToArray","arrayEditIndices","extraIndices","diffConfig","oldConfig","newConfig","calcInverseTransform","newBBox","getBoundingClientRect","equalDomRects","_lastBBox","m","_invTransform","inverseTransformMatrix","getFullTransformMatrix","_invScaleX","sqrt","_invScaleY","frameOrGroupNameOrFrameList","animationOpts","isPlotDiv","trans","_transitionData","_frameQueue","transitionOpts","supplyAnimationDefaults","frameOpts","frame","getTransitionOpts","getFrameOpts","callbackOnNthTime","cb","n","cnt","_frameWaitingCnt","nextFrame","_currentFrame","onComplete","newFrame","shift","stringName","toString","_lastFrameAt","Date","now","_timeToNext","duration","animation","cancelAnimationFrame","_animationRaf","beginAnimationLoop","Infinity","_runningTransitions","doFrame","requestAnimationFrame","configCounter","setTransitionConfig","frameList","allFrames","isFrameArray","_frames","frameOrName","_frameHash","mode","next","onInterrupt","discardExistingFrames","direction","currentFrame","fromcurrent","idx","filteredFrameList","computedFrame","computeFrame","queueFrames","bigIndex","insertions","_frameHashLocal","lookupName","collisionPresent","supplyFrameDefaults","b","ops","revops","frameCount","_counter","unshift","undoFunc","modifyFrames","redoFunc","undoArgs","redoArgs","promise","checkAddTracesArgs","startSequence","stopSequence","deletedTrace","sorterDes","undo","newArray","remainder","isTypedArray","none","both","numberOfItemsFromInsert","subarray","numberOfItemsFromTarget","targetBegin","newData","movingTraceMap","newIndex","cleanPlot","frames","init","triggerHandler","classed","makeTester","graphWasEmpty","empty","hasCartesian","_replotting","_shouldCreateBgLayer","gd3","_calcInverseTransform","_container","enter","_paperdiv","append","_glcontainer","_toppaper","_modebardiv","_modeBar","_hoverpaper","_uid","otherUids","each","this","randstr","svgAttrs","_defs","_clips","_topdefs","_topclips","_bgLayer","_draggers","layerBelow","_imageLowerLayer","_shapeLowerLayer","_cartesianlayer","_polarlayer","_smithlayer","_ternarylayer","_geolayer","_funnelarealayer","_iciclelayer","_treemaplayer","_sunburstlayer","_indicatorlayer","_glimages","layerAbove","_imageUpperLayer","_shapeUpperLayer","_selectionLayer","_infolayer","_menulayer","_zoomlayer","_hoverlayer","makePlotFramework","initGradients","initPatterns","saveShowSpikeInitial","responsive","_responsiveChartHandler","isHidden","resize","addEventListener","clearResponsive","oldMargins","drawFrameworkCalls","marginPushers","clearAutoMarginIds","drawMarginPushers","allowAutoMargin","automargin","doAutoMargin","_transitioning","saveRangeInitial","drawFramework","basePlotModules","_basePlotModules","_glcanvas","pick","d","position","top","left","overflow","regl","_gl","drawingBufferWidth","drawingBufferHeight","msg","didMarginChange","insideTickLabelsUpdaterange","_insideTickLabelsUpdaterange","addLinks","oldFullData","oldFullLayout","configChanged","oldRev","preGUIVal","newNP","layoutPreGUI","bothInheritAutorange","newAutorangeIn","newRangeAccepted","pre0","pre1","preAuto","newAx","allTracePreGUI","fullInput","tracePreGUI","newTrace","fulli","newTracei","applyUIRevisions","skipUpdateCalc","newFullData","newFullLayout","datarevision","diffOpts","diffLayout","sameTraceLength","animatable","seenUIDs","hasMakesDataTransform","diffData","allNames","getOwnPropertyNames","q","start","substring","emptyCategories","_emptyCategories","supplyDefaultsUpdateCalc","createTransitionData","transitionFromReact","_skipDefaults","configAttributes","typesetMath","plotlyServerURL","annotationPosition","annotationTail","annotationText","axisTitleText","colorbarPosition","colorbarTitleText","legendPosition","legendText","shapePosition","titleText","editSelection","fillFrame","frameMargins","values","doubleClickDelay","showAxisDragHandles","showAxisRangeEntryBoxes","linkText","noBlank","sendData","showSources","showSendToCloud","showEditInChartStudio","modeBarButtonsToRemove","modeBarButtonsToAdd","modeBarButtons","toImageButtonOptions","displaylogo","watermark","topojsonURL","mapboxAccessToken","logging","notifyOnLogging","queueLength","globalTransforms","locale","locales","crawl","src","baseAttributes","baseLayoutAttributes","frameAttributes","animationAttributes","valObjectMeta","IS_SUBPLOT_OBJ","IS_LINKED_TO_ARRAY","DEPRECATED","UNDERSCORE_ATTRS","recurseIntoValObject","newValObject","dimensions","index2","round","getLayoutAttributes","layoutAttributes","handleBasePlotModule","componentsRegistry","schema","subplots","xkey","autoshift","insertAttrs","formatAttributes","getFramesAttributes","makeSrcAttr","attrName","callback","isValObject","role","mergeValTypeAndRole","itemName","formatArrayContainers","walk","RegExp","baseAttrs","newAttrs","allTypes","basePlotModule","modules","attributes","copyBaseAttributes","copyModuleAttributes","level","fullAttrString","legendgroup","hoverlabel","selectPoints","selectedpoints","meta","Boolean","getTraceAttributes","transformsRegistry","getTransformAttributes","defs","valObjects","metaKeys","specifiedLevel","attrString","findArrayAttributes","baseContainer","baseAttrName","arrayAttributes","stack","isArrayStack","crawlIntoTrace","astrPartial","item","newAstrPartial","moduleAttrs","tNum","subplotModule","layoutAttrOverrides","baseOverrides","baseLayoutAttrOverrides","_modules","layoutHeadAttr","plotAttributes","TEMPLATEITEMNAME","templateAttrs","validItemName","arrayDefaultKey","lastChar","templatedArray","traceTemplater","dataTemplate","traceType","typeTemplates","traceCounts","traceIn","traceOut","_template","typei","baseName","part","arrayTemplater","inclusionAttr","defaultsTemplate","templateItems","usedNames","newItem","itemIn","templateItemName","templateItem","defaultItems","outi","_templateitemname","arrayEditor","containerStr","itemOut","lengthIn","_index","itemStr","resetUpdate","modifyItem","getUpdateObj","updateOut","modifyBase","applyUpdate","updateToApply","svgTextUtils","clearGlCanvases","Titles","ModeBar","alignmentConstants","axisConstraints","enforceAxisConstraints","enforce","cleanAxisConstraints","doAutoRange","SVG_TEXT_ANCHOR_START","SVG_TEXT_ANCHOR_MIDDLE","SVG_TEXT_ANCHOR_END","overlappingDomain","xDomain","yDomain","domains","existingX","existingY","lsInner","subplot","plotinfo","xa","ya","pad","axList","call","setSize","paper_bgcolor","drawMainTitle","manage","getLinePosition","counterAx","side","lwHalf","_lw","_offset","_length","t","l","_linepositions","crispRound","linewidth","_mainLinePosition","_mainMirrorPosition","mirror","OPPOSITE_SIDE","lowerBackgroundIDs","backgroundIds","lowerDomains","noNeedForBg","plot_bgcolor","_plots","mainplot","bg","plotgroup","pgNode","node","plotgroupBg","ensureSingle","insertBefore","childNodes","xLinesXLeft","xLinesXRight","xLinesYBottom","xLinesYTop","leftYLineWidth","rightYLineWidth","yLinesYBottom","yLinesYTop","yLinesXLeft","yLinesXRight","connectYBottom","connectYTop","extraSubplot","lowerBackgrounds","exit","setRect","fill","_hasOnlyLargeSploms","plotClipId","layerClipId","clipId","plotClip","ensureSingleById","s","clipRect","setTranslate","_hasClipOnAxisFalse","setClipUrl","xLinePath","xLinePathFree","yLinePath","yLinePathFree","_shift","mainPath","pathFn","pathFnFree","showline","_mainSubplot","xPath","shouldShowLinesOrTicks","findCounterAxisLineWidth","xlines","stroke","linecolor","yPath","ylines","makeClipPaths","shouldShowLineThisSide","anchorAx","sideIndex","FROM_BL","axi","_mainAxis","getMainTitleDyAdj","CAP_SHIFT","MID_SHIFT","textAnchor","isRightAnchor","isLeftAnchor","getMainTitleTextAnchor","dy","isTopAnchor","isMiddleAnchor","getMainTitleDy","vPadShift","getMainTitleY","hPadShift","r","getMainTitleX","propContainer","propName","placeholder","_dfltTitle","titleObj","titleHeight","bBox","pushMargin","titleY","titleYanchor","curMargin","margin","titleDepth","containerPushVal","needsMarginPush","titleID","reservedPush","plotHeight","yPosTop","yPosRel","isBottomAnchor","isOutsideContainer","_reservedMargin","autoMargin","applyTitleAutoMargin","positionText","extraLines","BR_TAG_ALL","delta","LINE_SPACING","newDy","getAttribute","setAttribute","editStyleCalls","cd","cd0","arraysToCalcdata","editStyle","fn","edit","redrawReglTraces","splom","updateGrid","updateFx","sceneIds","sceneLayout","_scene","setViewport","sp","cartesianIds","polarIds","_splomGrid","visible","_splomScenes","autoRangeDone","matchGroup","Template","mergeTemplates","oldTemplate","newTemplate","oldKeys","mergeOne","templater","oldItem","templateitemname","getBaseKey","key2","baseKey2","walkStyleKeys","parent","templateOut","getAttributeInfo","path","basePath","pathAttr","child","nextPath","getNextPath","nextBasePath","baseKey","_noTemplating","dfltDone","namedIndex","dfltPath","pathInArray","itemPropInArray","getLayoutInfo","getTraceInfo","hasPlainObject","arr","format","code","dataCount","templateCount","figure","traceTemplate","bind","oldTypeTemplates","oldTypeLen","typeLen","oldLayoutTemplate","oldDataTemplate","figureIn","layoutTemplate","errorList","layoutPaths","crawlLayoutForContainers","paths","nextPaths","crawlLayoutTemplateForContainers","typeCount","fullTrace","crawlForMissingTemplates","plotApi","plots","toSVG","svgToImg","version","scale","imageDataOnly","isImpliedOrValid","join2","fullOpts","clonedGd","document","createElement","body","appendChild","layoutImage","configImage","redrawFunc","getRedrawFunc","wait","setTimeout","getDelay","convert","svg","cleanup","removeChild","json","graphJson","encodeJSON","encodeSVG","canvas","catch","url","IMAGE_URL_PREFIX","urlToImageData","err","objIn","objOut","valOut","nestedSchema","getNestedSchema","nestedValType","isInfoArray","isColorscale","isInSchema","valInPart","valOutPart","arrayItems","len2","_p","_nestedSchema","indexList","valInj","valOutj","coerceNumber","dataIn","layoutIn","dataOut","traceSchema","transformsIn","transformsOut","transformType","transformSchema","layoutOut","layoutSchema","traceLayoutAttr","fillLayoutSchema","code2msgFunc","object","inBase","unused","dynamic","invisible","convertPathToAttributeString","splitKey","keyMinusId","_isSubplotObj","idRegex","idMatch"],"sourceRoot":""}