gwchq-textjam 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +202 -202
- package/README.md +266 -266
- package/dist/assets/{PyodideWorker5d8b7bf9f06568fe4573.js → PyodideWorkerb1409749c37aedc47dc8.js} +959 -959
- package/dist/assets/{pygalef3b78a56cb1d66beb61.js → pygalc0b4f32d2d2cc5a0c638.js} +495 -495
- package/dist/assets/pyodide-stdin-sw.js +231 -231
- package/dist/index.js +2275 -2271
- package/package.json +301 -301
package/dist/index.js
CHANGED
|
@@ -68294,7 +68294,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
68294
68294
|
});
|
|
68295
68295
|
|
|
68296
68296
|
;// ./src/assets/editor/pyodide/shims/pygal.js?url
|
|
68297
|
-
const pygalurl_namespaceObject = __webpack_require__.p + "assets/
|
|
68297
|
+
const pygalurl_namespaceObject = __webpack_require__.p + "assets/pygalc0b4f32d2d2cc5a0c638.js";
|
|
68298
68298
|
;// ./src/assets/editor/pyodide/packages/turtle-0.0.1-py3-none-any.whl?url
|
|
68299
68299
|
const turtle_0_0_1_py3_none_anyurl_namespaceObject = __webpack_require__.p + "assets/turtle-0.0.1-py3-none-any0c3147a3e0c3188b2544.whl";
|
|
68300
68300
|
;// ./src/assets/editor/pyodide/packages/p5-0.0.1-py3-none-any.whl?url
|
|
@@ -68435,8 +68435,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68435
68435
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
68436
68436
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
68437
68437
|
/* harmony export */ });
|
|
68438
|
-
/* harmony import */ var
|
|
68439
|
-
/* harmony import */ var
|
|
68438
|
+
/* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
|
|
68439
|
+
/* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53986);
|
|
68440
68440
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
68441
68441
|
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98850);
|
|
68442
68442
|
/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
|
|
@@ -68460,7 +68460,7 @@ var DraggableTab = _ref => {
|
|
|
68460
68460
|
panelIndex,
|
|
68461
68461
|
fileIndex
|
|
68462
68462
|
} = _ref,
|
|
68463
|
-
otherProps = (0,
|
|
68463
|
+
otherProps = (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(_ref, _excluded);
|
|
68464
68464
|
var openFiles = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(state => state.editor.openedFiles);
|
|
68465
68465
|
var openFilesCount = openFiles[panelIndex].length;
|
|
68466
68466
|
var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useDispatch)();
|
|
@@ -68477,7 +68477,7 @@ var DraggableTab = _ref => {
|
|
|
68477
68477
|
switchToFileTab(panelIndex, (fileIndex + openFilesCount - 1) % openFilesCount);
|
|
68478
68478
|
}
|
|
68479
68479
|
};
|
|
68480
|
-
var InnerTab = () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_2__.Tab, (0,
|
|
68480
|
+
var InnerTab = () => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_2__.Tab, (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
|
|
68481
68481
|
onClick: e => {
|
|
68482
68482
|
e.stopPropagation();
|
|
68483
68483
|
switchToFileTab(panelIndex, fileIndex);
|
|
@@ -68495,7 +68495,7 @@ var DraggableTab = _ref => {
|
|
|
68495
68495
|
draggableProps,
|
|
68496
68496
|
dragHandleProps
|
|
68497
68497
|
} = _ref2;
|
|
68498
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", (0,
|
|
68498
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
|
|
68499
68499
|
className: "draggable-tab",
|
|
68500
68500
|
ref: innerRef
|
|
68501
68501
|
}, draggableProps), dragHandleProps), {}, {
|
|
@@ -68517,8 +68517,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68517
68517
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
68518
68518
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
68519
68519
|
/* harmony export */ });
|
|
68520
|
-
/* harmony import */ var
|
|
68521
|
-
/* harmony import */ var
|
|
68520
|
+
/* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89379);
|
|
68521
|
+
/* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53986);
|
|
68522
68522
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
68523
68523
|
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98850);
|
|
68524
68524
|
/* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39243);
|
|
@@ -68537,8 +68537,8 @@ var DroppableTabList = _ref => {
|
|
|
68537
68537
|
children: _children,
|
|
68538
68538
|
index
|
|
68539
68539
|
} = _ref,
|
|
68540
|
-
otherProps = (0,
|
|
68541
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,
|
|
68540
|
+
otherProps = (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(_ref, _excluded);
|
|
68541
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_tabs__WEBPACK_IMPORTED_MODULE_1__.TabList, (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({}, otherProps), {}, {
|
|
68542
68542
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__.Droppable, {
|
|
68543
68543
|
direction: "horizontal",
|
|
68544
68544
|
droppableId: index.toString(),
|
|
@@ -68548,7 +68548,7 @@ var DroppableTabList = _ref => {
|
|
|
68548
68548
|
droppableProps,
|
|
68549
68549
|
placeholder
|
|
68550
68550
|
} = _ref2;
|
|
68551
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,
|
|
68551
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
|
|
68552
68552
|
className: "droppable-tab-list"
|
|
68553
68553
|
}, droppableProps), {}, {
|
|
68554
68554
|
ref: innerRef,
|
|
@@ -102343,8 +102343,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102343
102343
|
|
|
102344
102344
|
|
|
102345
102345
|
// TODO: refactor existing modals
|
|
102346
|
-
/** !deprecated!
|
|
102347
|
-
* use BaseModal from `index.tsx` instead
|
|
102346
|
+
/** !deprecated!
|
|
102347
|
+
* use BaseModal from `index.tsx` instead
|
|
102348
102348
|
*/
|
|
102349
102349
|
|
|
102350
102350
|
var BaseModal = _ref => {
|
|
@@ -103136,7 +103136,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
103136
103136
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
103137
103137
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
103138
103138
|
/* harmony export */ });
|
|
103139
|
-
/* harmony import */ var
|
|
103139
|
+
/* harmony import */ var _Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89379);
|
|
103140
103140
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
103141
103141
|
/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14062);
|
|
103142
103142
|
/* harmony import */ var _redux_EditorSlice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68512);
|
|
@@ -103250,7 +103250,7 @@ var ProjectName = _ref => {
|
|
|
103250
103250
|
id: "project_name_label",
|
|
103251
103251
|
className: _styles_module_scss__WEBPACK_IMPORTED_MODULE_3__["default"].projectLabel,
|
|
103252
103252
|
children: "Project Name"
|
|
103253
|
-
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", (0,
|
|
103253
|
+
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", (0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_Users_valeriya_projects_gwc_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)({
|
|
103254
103254
|
className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(_styles_module_scss__WEBPACK_IMPORTED_MODULE_3__["default"].projectName, className)
|
|
103255
103255
|
}, hoverProps), {}, {
|
|
103256
103256
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)((components_Tooltip_Tooltip__WEBPACK_IMPORTED_MODULE_8___default()), {
|
|
@@ -116868,6 +116868,115 @@ function escapeName(str, charsToEscape) {
|
|
|
116868
116868
|
|
|
116869
116869
|
|
|
116870
116870
|
|
|
116871
|
+
/***/ }),
|
|
116872
|
+
|
|
116873
|
+
/***/ 16450:
|
|
116874
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
116875
|
+
|
|
116876
|
+
|
|
116877
|
+
|
|
116878
|
+
var isValue = __webpack_require__(48175)
|
|
116879
|
+
, ensureValue = __webpack_require__(34809)
|
|
116880
|
+
, ensurePlainFunction = __webpack_require__(90251)
|
|
116881
|
+
, copy = __webpack_require__(30203)
|
|
116882
|
+
, normalizeOptions = __webpack_require__(90148)
|
|
116883
|
+
, map = __webpack_require__(30498);
|
|
116884
|
+
|
|
116885
|
+
var bind = Function.prototype.bind
|
|
116886
|
+
, defineProperty = Object.defineProperty
|
|
116887
|
+
, hasOwnProperty = Object.prototype.hasOwnProperty
|
|
116888
|
+
, define;
|
|
116889
|
+
|
|
116890
|
+
define = function (name, desc, options) {
|
|
116891
|
+
var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;
|
|
116892
|
+
dgs = copy(desc);
|
|
116893
|
+
delete dgs.writable;
|
|
116894
|
+
delete dgs.value;
|
|
116895
|
+
dgs.get = function () {
|
|
116896
|
+
if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
|
|
116897
|
+
desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);
|
|
116898
|
+
defineProperty(this, name, desc);
|
|
116899
|
+
return this[name];
|
|
116900
|
+
};
|
|
116901
|
+
return dgs;
|
|
116902
|
+
};
|
|
116903
|
+
|
|
116904
|
+
module.exports = function (props/*, options*/) {
|
|
116905
|
+
var options = normalizeOptions(arguments[1]);
|
|
116906
|
+
if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);
|
|
116907
|
+
return map(props, function (desc, name) { return define(name, desc, options); });
|
|
116908
|
+
};
|
|
116909
|
+
|
|
116910
|
+
|
|
116911
|
+
/***/ }),
|
|
116912
|
+
|
|
116913
|
+
/***/ 58263:
|
|
116914
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
116915
|
+
|
|
116916
|
+
|
|
116917
|
+
|
|
116918
|
+
var isValue = __webpack_require__(48175)
|
|
116919
|
+
, isPlainFunction = __webpack_require__(6873)
|
|
116920
|
+
, assign = __webpack_require__(16596)
|
|
116921
|
+
, normalizeOpts = __webpack_require__(90148)
|
|
116922
|
+
, contains = __webpack_require__(70214);
|
|
116923
|
+
|
|
116924
|
+
var d = (module.exports = function (dscr, value/*, options*/) {
|
|
116925
|
+
var c, e, w, options, desc;
|
|
116926
|
+
if (arguments.length < 2 || typeof dscr !== "string") {
|
|
116927
|
+
options = value;
|
|
116928
|
+
value = dscr;
|
|
116929
|
+
dscr = null;
|
|
116930
|
+
} else {
|
|
116931
|
+
options = arguments[2];
|
|
116932
|
+
}
|
|
116933
|
+
if (isValue(dscr)) {
|
|
116934
|
+
c = contains.call(dscr, "c");
|
|
116935
|
+
e = contains.call(dscr, "e");
|
|
116936
|
+
w = contains.call(dscr, "w");
|
|
116937
|
+
} else {
|
|
116938
|
+
c = w = true;
|
|
116939
|
+
e = false;
|
|
116940
|
+
}
|
|
116941
|
+
|
|
116942
|
+
desc = { value: value, configurable: c, enumerable: e, writable: w };
|
|
116943
|
+
return !options ? desc : assign(normalizeOpts(options), desc);
|
|
116944
|
+
});
|
|
116945
|
+
|
|
116946
|
+
d.gs = function (dscr, get, set/*, options*/) {
|
|
116947
|
+
var c, e, options, desc;
|
|
116948
|
+
if (typeof dscr !== "string") {
|
|
116949
|
+
options = set;
|
|
116950
|
+
set = get;
|
|
116951
|
+
get = dscr;
|
|
116952
|
+
dscr = null;
|
|
116953
|
+
} else {
|
|
116954
|
+
options = arguments[3];
|
|
116955
|
+
}
|
|
116956
|
+
if (!isValue(get)) {
|
|
116957
|
+
get = undefined;
|
|
116958
|
+
} else if (!isPlainFunction(get)) {
|
|
116959
|
+
options = get;
|
|
116960
|
+
get = set = undefined;
|
|
116961
|
+
} else if (!isValue(set)) {
|
|
116962
|
+
set = undefined;
|
|
116963
|
+
} else if (!isPlainFunction(set)) {
|
|
116964
|
+
options = set;
|
|
116965
|
+
set = undefined;
|
|
116966
|
+
}
|
|
116967
|
+
if (isValue(dscr)) {
|
|
116968
|
+
c = contains.call(dscr, "c");
|
|
116969
|
+
e = contains.call(dscr, "e");
|
|
116970
|
+
} else {
|
|
116971
|
+
c = true;
|
|
116972
|
+
e = false;
|
|
116973
|
+
}
|
|
116974
|
+
|
|
116975
|
+
desc = { get: get, set: set, configurable: c, enumerable: e };
|
|
116976
|
+
return !options ? desc : assign(normalizeOpts(options), desc);
|
|
116977
|
+
};
|
|
116978
|
+
|
|
116979
|
+
|
|
116871
116980
|
/***/ }),
|
|
116872
116981
|
|
|
116873
116982
|
/***/ 83999:
|
|
@@ -131696,115 +131805,6 @@ year.every = function(k) {
|
|
|
131696
131805
|
var years = year.range;
|
|
131697
131806
|
|
|
131698
131807
|
|
|
131699
|
-
/***/ }),
|
|
131700
|
-
|
|
131701
|
-
/***/ 16450:
|
|
131702
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
131703
|
-
|
|
131704
|
-
|
|
131705
|
-
|
|
131706
|
-
var isValue = __webpack_require__(48175)
|
|
131707
|
-
, ensureValue = __webpack_require__(34809)
|
|
131708
|
-
, ensurePlainFunction = __webpack_require__(90251)
|
|
131709
|
-
, copy = __webpack_require__(30203)
|
|
131710
|
-
, normalizeOptions = __webpack_require__(90148)
|
|
131711
|
-
, map = __webpack_require__(30498);
|
|
131712
|
-
|
|
131713
|
-
var bind = Function.prototype.bind
|
|
131714
|
-
, defineProperty = Object.defineProperty
|
|
131715
|
-
, hasOwnProperty = Object.prototype.hasOwnProperty
|
|
131716
|
-
, define;
|
|
131717
|
-
|
|
131718
|
-
define = function (name, desc, options) {
|
|
131719
|
-
var value = ensureValue(desc) && ensurePlainFunction(desc.value), dgs;
|
|
131720
|
-
dgs = copy(desc);
|
|
131721
|
-
delete dgs.writable;
|
|
131722
|
-
delete dgs.value;
|
|
131723
|
-
dgs.get = function () {
|
|
131724
|
-
if (!options.overwriteDefinition && hasOwnProperty.call(this, name)) return value;
|
|
131725
|
-
desc.value = bind.call(value, options.resolveContext ? options.resolveContext(this) : this);
|
|
131726
|
-
defineProperty(this, name, desc);
|
|
131727
|
-
return this[name];
|
|
131728
|
-
};
|
|
131729
|
-
return dgs;
|
|
131730
|
-
};
|
|
131731
|
-
|
|
131732
|
-
module.exports = function (props/*, options*/) {
|
|
131733
|
-
var options = normalizeOptions(arguments[1]);
|
|
131734
|
-
if (isValue(options.resolveContext)) ensurePlainFunction(options.resolveContext);
|
|
131735
|
-
return map(props, function (desc, name) { return define(name, desc, options); });
|
|
131736
|
-
};
|
|
131737
|
-
|
|
131738
|
-
|
|
131739
|
-
/***/ }),
|
|
131740
|
-
|
|
131741
|
-
/***/ 58263:
|
|
131742
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
131743
|
-
|
|
131744
|
-
|
|
131745
|
-
|
|
131746
|
-
var isValue = __webpack_require__(48175)
|
|
131747
|
-
, isPlainFunction = __webpack_require__(6873)
|
|
131748
|
-
, assign = __webpack_require__(16596)
|
|
131749
|
-
, normalizeOpts = __webpack_require__(90148)
|
|
131750
|
-
, contains = __webpack_require__(70214);
|
|
131751
|
-
|
|
131752
|
-
var d = (module.exports = function (dscr, value/*, options*/) {
|
|
131753
|
-
var c, e, w, options, desc;
|
|
131754
|
-
if (arguments.length < 2 || typeof dscr !== "string") {
|
|
131755
|
-
options = value;
|
|
131756
|
-
value = dscr;
|
|
131757
|
-
dscr = null;
|
|
131758
|
-
} else {
|
|
131759
|
-
options = arguments[2];
|
|
131760
|
-
}
|
|
131761
|
-
if (isValue(dscr)) {
|
|
131762
|
-
c = contains.call(dscr, "c");
|
|
131763
|
-
e = contains.call(dscr, "e");
|
|
131764
|
-
w = contains.call(dscr, "w");
|
|
131765
|
-
} else {
|
|
131766
|
-
c = w = true;
|
|
131767
|
-
e = false;
|
|
131768
|
-
}
|
|
131769
|
-
|
|
131770
|
-
desc = { value: value, configurable: c, enumerable: e, writable: w };
|
|
131771
|
-
return !options ? desc : assign(normalizeOpts(options), desc);
|
|
131772
|
-
});
|
|
131773
|
-
|
|
131774
|
-
d.gs = function (dscr, get, set/*, options*/) {
|
|
131775
|
-
var c, e, options, desc;
|
|
131776
|
-
if (typeof dscr !== "string") {
|
|
131777
|
-
options = set;
|
|
131778
|
-
set = get;
|
|
131779
|
-
get = dscr;
|
|
131780
|
-
dscr = null;
|
|
131781
|
-
} else {
|
|
131782
|
-
options = arguments[3];
|
|
131783
|
-
}
|
|
131784
|
-
if (!isValue(get)) {
|
|
131785
|
-
get = undefined;
|
|
131786
|
-
} else if (!isPlainFunction(get)) {
|
|
131787
|
-
options = get;
|
|
131788
|
-
get = set = undefined;
|
|
131789
|
-
} else if (!isValue(set)) {
|
|
131790
|
-
set = undefined;
|
|
131791
|
-
} else if (!isPlainFunction(set)) {
|
|
131792
|
-
options = set;
|
|
131793
|
-
set = undefined;
|
|
131794
|
-
}
|
|
131795
|
-
if (isValue(dscr)) {
|
|
131796
|
-
c = contains.call(dscr, "c");
|
|
131797
|
-
e = contains.call(dscr, "e");
|
|
131798
|
-
} else {
|
|
131799
|
-
c = true;
|
|
131800
|
-
e = false;
|
|
131801
|
-
}
|
|
131802
|
-
|
|
131803
|
-
desc = { get: get, set: set, configurable: c, enumerable: e };
|
|
131804
|
-
return !options ? desc : assign(normalizeOpts(options), desc);
|
|
131805
|
-
};
|
|
131806
|
-
|
|
131807
|
-
|
|
131808
131808
|
/***/ }),
|
|
131809
131809
|
|
|
131810
131810
|
/***/ 30041:
|
|
@@ -148444,324 +148444,6 @@ function hsl2rgb(hsl) {
|
|
|
148444
148444
|
}
|
|
148445
148445
|
|
|
148446
148446
|
|
|
148447
|
-
/***/ }),
|
|
148448
|
-
|
|
148449
|
-
/***/ 9793:
|
|
148450
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
148451
|
-
|
|
148452
|
-
|
|
148453
|
-
|
|
148454
|
-
var annAttrs = __webpack_require__(84676);
|
|
148455
|
-
var overrideAll = (__webpack_require__(70756).overrideAll);
|
|
148456
|
-
var templatedArray = (__webpack_require__(79338).templatedArray);
|
|
148457
|
-
|
|
148458
|
-
module.exports = overrideAll(templatedArray('annotation', {
|
|
148459
|
-
visible: annAttrs.visible,
|
|
148460
|
-
x: {
|
|
148461
|
-
valType: 'any',
|
|
148462
|
-
description: [
|
|
148463
|
-
'Sets the annotation\'s x position.'
|
|
148464
|
-
].join(' ')
|
|
148465
|
-
},
|
|
148466
|
-
y: {
|
|
148467
|
-
valType: 'any',
|
|
148468
|
-
description: [
|
|
148469
|
-
'Sets the annotation\'s y position.'
|
|
148470
|
-
].join(' ')
|
|
148471
|
-
},
|
|
148472
|
-
z: {
|
|
148473
|
-
valType: 'any',
|
|
148474
|
-
description: [
|
|
148475
|
-
'Sets the annotation\'s z position.'
|
|
148476
|
-
].join(' ')
|
|
148477
|
-
},
|
|
148478
|
-
ax: {
|
|
148479
|
-
valType: 'number',
|
|
148480
|
-
description: [
|
|
148481
|
-
'Sets the x component of the arrow tail about the arrow head (in pixels).'
|
|
148482
|
-
].join(' ')
|
|
148483
|
-
},
|
|
148484
|
-
ay: {
|
|
148485
|
-
valType: 'number',
|
|
148486
|
-
description: [
|
|
148487
|
-
'Sets the y component of the arrow tail about the arrow head (in pixels).'
|
|
148488
|
-
].join(' ')
|
|
148489
|
-
},
|
|
148490
|
-
|
|
148491
|
-
xanchor: annAttrs.xanchor,
|
|
148492
|
-
xshift: annAttrs.xshift,
|
|
148493
|
-
yanchor: annAttrs.yanchor,
|
|
148494
|
-
yshift: annAttrs.yshift,
|
|
148495
|
-
|
|
148496
|
-
text: annAttrs.text,
|
|
148497
|
-
textangle: annAttrs.textangle,
|
|
148498
|
-
font: annAttrs.font,
|
|
148499
|
-
width: annAttrs.width,
|
|
148500
|
-
height: annAttrs.height,
|
|
148501
|
-
opacity: annAttrs.opacity,
|
|
148502
|
-
align: annAttrs.align,
|
|
148503
|
-
valign: annAttrs.valign,
|
|
148504
|
-
bgcolor: annAttrs.bgcolor,
|
|
148505
|
-
bordercolor: annAttrs.bordercolor,
|
|
148506
|
-
borderpad: annAttrs.borderpad,
|
|
148507
|
-
borderwidth: annAttrs.borderwidth,
|
|
148508
|
-
showarrow: annAttrs.showarrow,
|
|
148509
|
-
arrowcolor: annAttrs.arrowcolor,
|
|
148510
|
-
arrowhead: annAttrs.arrowhead,
|
|
148511
|
-
startarrowhead: annAttrs.startarrowhead,
|
|
148512
|
-
arrowside: annAttrs.arrowside,
|
|
148513
|
-
arrowsize: annAttrs.arrowsize,
|
|
148514
|
-
startarrowsize: annAttrs.startarrowsize,
|
|
148515
|
-
arrowwidth: annAttrs.arrowwidth,
|
|
148516
|
-
standoff: annAttrs.standoff,
|
|
148517
|
-
startstandoff: annAttrs.startstandoff,
|
|
148518
|
-
hovertext: annAttrs.hovertext,
|
|
148519
|
-
hoverlabel: annAttrs.hoverlabel,
|
|
148520
|
-
captureevents: annAttrs.captureevents,
|
|
148521
|
-
|
|
148522
|
-
// maybes later?
|
|
148523
|
-
// clicktoshow: annAttrs.clicktoshow,
|
|
148524
|
-
// xclick: annAttrs.xclick,
|
|
148525
|
-
// yclick: annAttrs.yclick,
|
|
148526
|
-
|
|
148527
|
-
// not needed!
|
|
148528
|
-
// axref: 'pixel'
|
|
148529
|
-
// ayref: 'pixel'
|
|
148530
|
-
// xref: 'x'
|
|
148531
|
-
// yref: 'y
|
|
148532
|
-
// zref: 'z'
|
|
148533
|
-
}), 'calc', 'from-root');
|
|
148534
|
-
|
|
148535
|
-
|
|
148536
|
-
/***/ }),
|
|
148537
|
-
|
|
148538
|
-
/***/ 58121:
|
|
148539
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
148540
|
-
|
|
148541
|
-
|
|
148542
|
-
|
|
148543
|
-
var Lib = __webpack_require__(30991);
|
|
148544
|
-
var Axes = __webpack_require__(15076);
|
|
148545
|
-
|
|
148546
|
-
module.exports = function convert(scene) {
|
|
148547
|
-
var fullSceneLayout = scene.fullSceneLayout;
|
|
148548
|
-
var anns = fullSceneLayout.annotations;
|
|
148549
|
-
|
|
148550
|
-
for(var i = 0; i < anns.length; i++) {
|
|
148551
|
-
mockAnnAxes(anns[i], scene);
|
|
148552
|
-
}
|
|
148553
|
-
|
|
148554
|
-
scene.fullLayout._infolayer
|
|
148555
|
-
.selectAll('.annotation-' + scene.id)
|
|
148556
|
-
.remove();
|
|
148557
|
-
};
|
|
148558
|
-
|
|
148559
|
-
function mockAnnAxes(ann, scene) {
|
|
148560
|
-
var fullSceneLayout = scene.fullSceneLayout;
|
|
148561
|
-
var domain = fullSceneLayout.domain;
|
|
148562
|
-
var size = scene.fullLayout._size;
|
|
148563
|
-
|
|
148564
|
-
var base = {
|
|
148565
|
-
// this gets fill in on render
|
|
148566
|
-
pdata: null,
|
|
148567
|
-
|
|
148568
|
-
// to get setConvert to not execute cleanly
|
|
148569
|
-
type: 'linear',
|
|
148570
|
-
|
|
148571
|
-
// don't try to update them on `editable: true`
|
|
148572
|
-
autorange: false,
|
|
148573
|
-
|
|
148574
|
-
// set infinite range so that annotation draw routine
|
|
148575
|
-
// does not try to remove 'outside-range' annotations,
|
|
148576
|
-
// this case is handled in the render loop
|
|
148577
|
-
range: [-Infinity, Infinity]
|
|
148578
|
-
};
|
|
148579
|
-
|
|
148580
|
-
ann._xa = {};
|
|
148581
|
-
Lib.extendFlat(ann._xa, base);
|
|
148582
|
-
Axes.setConvert(ann._xa);
|
|
148583
|
-
ann._xa._offset = size.l + domain.x[0] * size.w;
|
|
148584
|
-
ann._xa.l2p = function() {
|
|
148585
|
-
return 0.5 * (1 + ann._pdata[0] / ann._pdata[3]) * size.w * (domain.x[1] - domain.x[0]);
|
|
148586
|
-
};
|
|
148587
|
-
|
|
148588
|
-
ann._ya = {};
|
|
148589
|
-
Lib.extendFlat(ann._ya, base);
|
|
148590
|
-
Axes.setConvert(ann._ya);
|
|
148591
|
-
ann._ya._offset = size.t + (1 - domain.y[1]) * size.h;
|
|
148592
|
-
ann._ya.l2p = function() {
|
|
148593
|
-
return 0.5 * (1 - ann._pdata[1] / ann._pdata[3]) * size.h * (domain.y[1] - domain.y[0]);
|
|
148594
|
-
};
|
|
148595
|
-
}
|
|
148596
|
-
|
|
148597
|
-
|
|
148598
|
-
/***/ }),
|
|
148599
|
-
|
|
148600
|
-
/***/ 41926:
|
|
148601
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
148602
|
-
|
|
148603
|
-
|
|
148604
|
-
|
|
148605
|
-
var Lib = __webpack_require__(30991);
|
|
148606
|
-
var Axes = __webpack_require__(15076);
|
|
148607
|
-
var handleArrayContainerDefaults = __webpack_require__(21238);
|
|
148608
|
-
var handleAnnotationCommonDefaults = __webpack_require__(84081);
|
|
148609
|
-
var attributes = __webpack_require__(9793);
|
|
148610
|
-
|
|
148611
|
-
module.exports = function handleDefaults(sceneLayoutIn, sceneLayoutOut, opts) {
|
|
148612
|
-
handleArrayContainerDefaults(sceneLayoutIn, sceneLayoutOut, {
|
|
148613
|
-
name: 'annotations',
|
|
148614
|
-
handleItemDefaults: handleAnnotationDefaults,
|
|
148615
|
-
fullLayout: opts.fullLayout
|
|
148616
|
-
});
|
|
148617
|
-
};
|
|
148618
|
-
|
|
148619
|
-
function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {
|
|
148620
|
-
function coerce(attr, dflt) {
|
|
148621
|
-
return Lib.coerce(annIn, annOut, attributes, attr, dflt);
|
|
148622
|
-
}
|
|
148623
|
-
|
|
148624
|
-
function coercePosition(axLetter) {
|
|
148625
|
-
var axName = axLetter + 'axis';
|
|
148626
|
-
|
|
148627
|
-
// mock in such way that getFromId grabs correct 3D axis
|
|
148628
|
-
var gdMock = { _fullLayout: {} };
|
|
148629
|
-
gdMock._fullLayout[axName] = sceneLayout[axName];
|
|
148630
|
-
|
|
148631
|
-
return Axes.coercePosition(annOut, gdMock, coerce, axLetter, axLetter, 0.5);
|
|
148632
|
-
}
|
|
148633
|
-
|
|
148634
|
-
|
|
148635
|
-
var visible = coerce('visible');
|
|
148636
|
-
if(!visible) return;
|
|
148637
|
-
|
|
148638
|
-
handleAnnotationCommonDefaults(annIn, annOut, opts.fullLayout, coerce);
|
|
148639
|
-
|
|
148640
|
-
coercePosition('x');
|
|
148641
|
-
coercePosition('y');
|
|
148642
|
-
coercePosition('z');
|
|
148643
|
-
|
|
148644
|
-
// if you have one coordinate you should all three
|
|
148645
|
-
Lib.noneOrAll(annIn, annOut, ['x', 'y', 'z']);
|
|
148646
|
-
|
|
148647
|
-
// hard-set here for completeness
|
|
148648
|
-
annOut.xref = 'x';
|
|
148649
|
-
annOut.yref = 'y';
|
|
148650
|
-
annOut.zref = 'z';
|
|
148651
|
-
|
|
148652
|
-
coerce('xanchor');
|
|
148653
|
-
coerce('yanchor');
|
|
148654
|
-
coerce('xshift');
|
|
148655
|
-
coerce('yshift');
|
|
148656
|
-
|
|
148657
|
-
if(annOut.showarrow) {
|
|
148658
|
-
annOut.axref = 'pixel';
|
|
148659
|
-
annOut.ayref = 'pixel';
|
|
148660
|
-
|
|
148661
|
-
// TODO maybe default values should be bigger than the 2D case?
|
|
148662
|
-
coerce('ax', -10);
|
|
148663
|
-
coerce('ay', -30);
|
|
148664
|
-
|
|
148665
|
-
// if you have one part of arrow length you should have both
|
|
148666
|
-
Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);
|
|
148667
|
-
}
|
|
148668
|
-
}
|
|
148669
|
-
|
|
148670
|
-
|
|
148671
|
-
/***/ }),
|
|
148672
|
-
|
|
148673
|
-
/***/ 13802:
|
|
148674
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
148675
|
-
|
|
148676
|
-
|
|
148677
|
-
|
|
148678
|
-
var drawRaw = (__webpack_require__(47995).drawRaw);
|
|
148679
|
-
var project = __webpack_require__(51344);
|
|
148680
|
-
var axLetters = ['x', 'y', 'z'];
|
|
148681
|
-
|
|
148682
|
-
module.exports = function draw(scene) {
|
|
148683
|
-
var fullSceneLayout = scene.fullSceneLayout;
|
|
148684
|
-
var dataScale = scene.dataScale;
|
|
148685
|
-
var anns = fullSceneLayout.annotations;
|
|
148686
|
-
|
|
148687
|
-
for(var i = 0; i < anns.length; i++) {
|
|
148688
|
-
var ann = anns[i];
|
|
148689
|
-
var annotationIsOffscreen = false;
|
|
148690
|
-
|
|
148691
|
-
for(var j = 0; j < 3; j++) {
|
|
148692
|
-
var axLetter = axLetters[j];
|
|
148693
|
-
var pos = ann[axLetter];
|
|
148694
|
-
var ax = fullSceneLayout[axLetter + 'axis'];
|
|
148695
|
-
var posFraction = ax.r2fraction(pos);
|
|
148696
|
-
|
|
148697
|
-
if(posFraction < 0 || posFraction > 1) {
|
|
148698
|
-
annotationIsOffscreen = true;
|
|
148699
|
-
break;
|
|
148700
|
-
}
|
|
148701
|
-
}
|
|
148702
|
-
|
|
148703
|
-
if(annotationIsOffscreen) {
|
|
148704
|
-
scene.fullLayout._infolayer
|
|
148705
|
-
.select('.annotation-' + scene.id + '[data-index="' + i + '"]')
|
|
148706
|
-
.remove();
|
|
148707
|
-
} else {
|
|
148708
|
-
ann._pdata = project(scene.glplot.cameraParams, [
|
|
148709
|
-
fullSceneLayout.xaxis.r2l(ann.x) * dataScale[0],
|
|
148710
|
-
fullSceneLayout.yaxis.r2l(ann.y) * dataScale[1],
|
|
148711
|
-
fullSceneLayout.zaxis.r2l(ann.z) * dataScale[2]
|
|
148712
|
-
]);
|
|
148713
|
-
|
|
148714
|
-
drawRaw(scene.graphDiv, ann, i, scene.id, ann._xa, ann._ya);
|
|
148715
|
-
}
|
|
148716
|
-
}
|
|
148717
|
-
};
|
|
148718
|
-
|
|
148719
|
-
|
|
148720
|
-
/***/ }),
|
|
148721
|
-
|
|
148722
|
-
/***/ 86578:
|
|
148723
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
148724
|
-
|
|
148725
|
-
|
|
148726
|
-
|
|
148727
|
-
var Registry = __webpack_require__(13936);
|
|
148728
|
-
var Lib = __webpack_require__(30991);
|
|
148729
|
-
|
|
148730
|
-
module.exports = {
|
|
148731
|
-
moduleType: 'component',
|
|
148732
|
-
name: 'annotations3d',
|
|
148733
|
-
|
|
148734
|
-
schema: {
|
|
148735
|
-
subplots: {
|
|
148736
|
-
scene: {annotations: __webpack_require__(9793)}
|
|
148737
|
-
}
|
|
148738
|
-
},
|
|
148739
|
-
|
|
148740
|
-
layoutAttributes: __webpack_require__(9793),
|
|
148741
|
-
handleDefaults: __webpack_require__(41926),
|
|
148742
|
-
includeBasePlot: includeGL3D,
|
|
148743
|
-
|
|
148744
|
-
convert: __webpack_require__(58121),
|
|
148745
|
-
draw: __webpack_require__(13802)
|
|
148746
|
-
};
|
|
148747
|
-
|
|
148748
|
-
function includeGL3D(layoutIn, layoutOut) {
|
|
148749
|
-
var GL3D = Registry.subplotsRegistry.gl3d;
|
|
148750
|
-
if(!GL3D) return;
|
|
148751
|
-
|
|
148752
|
-
var attrRegex = GL3D.attrRegex;
|
|
148753
|
-
|
|
148754
|
-
var keys = Object.keys(layoutIn);
|
|
148755
|
-
for(var i = 0; i < keys.length; i++) {
|
|
148756
|
-
var k = keys[i];
|
|
148757
|
-
if(attrRegex.test(k) && (layoutIn[k].annotations || []).length) {
|
|
148758
|
-
Lib.pushUnique(layoutOut._basePlotModules, GL3D);
|
|
148759
|
-
Lib.pushUnique(layoutOut._subplots.gl3d, k);
|
|
148760
|
-
}
|
|
148761
|
-
}
|
|
148762
|
-
}
|
|
148763
|
-
|
|
148764
|
-
|
|
148765
148447
|
/***/ }),
|
|
148766
148448
|
|
|
148767
148449
|
/***/ 2595:
|
|
@@ -150735,6 +150417,324 @@ module.exports = {
|
|
|
150735
150417
|
};
|
|
150736
150418
|
|
|
150737
150419
|
|
|
150420
|
+
/***/ }),
|
|
150421
|
+
|
|
150422
|
+
/***/ 9793:
|
|
150423
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150424
|
+
|
|
150425
|
+
|
|
150426
|
+
|
|
150427
|
+
var annAttrs = __webpack_require__(84676);
|
|
150428
|
+
var overrideAll = (__webpack_require__(70756).overrideAll);
|
|
150429
|
+
var templatedArray = (__webpack_require__(79338).templatedArray);
|
|
150430
|
+
|
|
150431
|
+
module.exports = overrideAll(templatedArray('annotation', {
|
|
150432
|
+
visible: annAttrs.visible,
|
|
150433
|
+
x: {
|
|
150434
|
+
valType: 'any',
|
|
150435
|
+
description: [
|
|
150436
|
+
'Sets the annotation\'s x position.'
|
|
150437
|
+
].join(' ')
|
|
150438
|
+
},
|
|
150439
|
+
y: {
|
|
150440
|
+
valType: 'any',
|
|
150441
|
+
description: [
|
|
150442
|
+
'Sets the annotation\'s y position.'
|
|
150443
|
+
].join(' ')
|
|
150444
|
+
},
|
|
150445
|
+
z: {
|
|
150446
|
+
valType: 'any',
|
|
150447
|
+
description: [
|
|
150448
|
+
'Sets the annotation\'s z position.'
|
|
150449
|
+
].join(' ')
|
|
150450
|
+
},
|
|
150451
|
+
ax: {
|
|
150452
|
+
valType: 'number',
|
|
150453
|
+
description: [
|
|
150454
|
+
'Sets the x component of the arrow tail about the arrow head (in pixels).'
|
|
150455
|
+
].join(' ')
|
|
150456
|
+
},
|
|
150457
|
+
ay: {
|
|
150458
|
+
valType: 'number',
|
|
150459
|
+
description: [
|
|
150460
|
+
'Sets the y component of the arrow tail about the arrow head (in pixels).'
|
|
150461
|
+
].join(' ')
|
|
150462
|
+
},
|
|
150463
|
+
|
|
150464
|
+
xanchor: annAttrs.xanchor,
|
|
150465
|
+
xshift: annAttrs.xshift,
|
|
150466
|
+
yanchor: annAttrs.yanchor,
|
|
150467
|
+
yshift: annAttrs.yshift,
|
|
150468
|
+
|
|
150469
|
+
text: annAttrs.text,
|
|
150470
|
+
textangle: annAttrs.textangle,
|
|
150471
|
+
font: annAttrs.font,
|
|
150472
|
+
width: annAttrs.width,
|
|
150473
|
+
height: annAttrs.height,
|
|
150474
|
+
opacity: annAttrs.opacity,
|
|
150475
|
+
align: annAttrs.align,
|
|
150476
|
+
valign: annAttrs.valign,
|
|
150477
|
+
bgcolor: annAttrs.bgcolor,
|
|
150478
|
+
bordercolor: annAttrs.bordercolor,
|
|
150479
|
+
borderpad: annAttrs.borderpad,
|
|
150480
|
+
borderwidth: annAttrs.borderwidth,
|
|
150481
|
+
showarrow: annAttrs.showarrow,
|
|
150482
|
+
arrowcolor: annAttrs.arrowcolor,
|
|
150483
|
+
arrowhead: annAttrs.arrowhead,
|
|
150484
|
+
startarrowhead: annAttrs.startarrowhead,
|
|
150485
|
+
arrowside: annAttrs.arrowside,
|
|
150486
|
+
arrowsize: annAttrs.arrowsize,
|
|
150487
|
+
startarrowsize: annAttrs.startarrowsize,
|
|
150488
|
+
arrowwidth: annAttrs.arrowwidth,
|
|
150489
|
+
standoff: annAttrs.standoff,
|
|
150490
|
+
startstandoff: annAttrs.startstandoff,
|
|
150491
|
+
hovertext: annAttrs.hovertext,
|
|
150492
|
+
hoverlabel: annAttrs.hoverlabel,
|
|
150493
|
+
captureevents: annAttrs.captureevents,
|
|
150494
|
+
|
|
150495
|
+
// maybes later?
|
|
150496
|
+
// clicktoshow: annAttrs.clicktoshow,
|
|
150497
|
+
// xclick: annAttrs.xclick,
|
|
150498
|
+
// yclick: annAttrs.yclick,
|
|
150499
|
+
|
|
150500
|
+
// not needed!
|
|
150501
|
+
// axref: 'pixel'
|
|
150502
|
+
// ayref: 'pixel'
|
|
150503
|
+
// xref: 'x'
|
|
150504
|
+
// yref: 'y
|
|
150505
|
+
// zref: 'z'
|
|
150506
|
+
}), 'calc', 'from-root');
|
|
150507
|
+
|
|
150508
|
+
|
|
150509
|
+
/***/ }),
|
|
150510
|
+
|
|
150511
|
+
/***/ 58121:
|
|
150512
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150513
|
+
|
|
150514
|
+
|
|
150515
|
+
|
|
150516
|
+
var Lib = __webpack_require__(30991);
|
|
150517
|
+
var Axes = __webpack_require__(15076);
|
|
150518
|
+
|
|
150519
|
+
module.exports = function convert(scene) {
|
|
150520
|
+
var fullSceneLayout = scene.fullSceneLayout;
|
|
150521
|
+
var anns = fullSceneLayout.annotations;
|
|
150522
|
+
|
|
150523
|
+
for(var i = 0; i < anns.length; i++) {
|
|
150524
|
+
mockAnnAxes(anns[i], scene);
|
|
150525
|
+
}
|
|
150526
|
+
|
|
150527
|
+
scene.fullLayout._infolayer
|
|
150528
|
+
.selectAll('.annotation-' + scene.id)
|
|
150529
|
+
.remove();
|
|
150530
|
+
};
|
|
150531
|
+
|
|
150532
|
+
function mockAnnAxes(ann, scene) {
|
|
150533
|
+
var fullSceneLayout = scene.fullSceneLayout;
|
|
150534
|
+
var domain = fullSceneLayout.domain;
|
|
150535
|
+
var size = scene.fullLayout._size;
|
|
150536
|
+
|
|
150537
|
+
var base = {
|
|
150538
|
+
// this gets fill in on render
|
|
150539
|
+
pdata: null,
|
|
150540
|
+
|
|
150541
|
+
// to get setConvert to not execute cleanly
|
|
150542
|
+
type: 'linear',
|
|
150543
|
+
|
|
150544
|
+
// don't try to update them on `editable: true`
|
|
150545
|
+
autorange: false,
|
|
150546
|
+
|
|
150547
|
+
// set infinite range so that annotation draw routine
|
|
150548
|
+
// does not try to remove 'outside-range' annotations,
|
|
150549
|
+
// this case is handled in the render loop
|
|
150550
|
+
range: [-Infinity, Infinity]
|
|
150551
|
+
};
|
|
150552
|
+
|
|
150553
|
+
ann._xa = {};
|
|
150554
|
+
Lib.extendFlat(ann._xa, base);
|
|
150555
|
+
Axes.setConvert(ann._xa);
|
|
150556
|
+
ann._xa._offset = size.l + domain.x[0] * size.w;
|
|
150557
|
+
ann._xa.l2p = function() {
|
|
150558
|
+
return 0.5 * (1 + ann._pdata[0] / ann._pdata[3]) * size.w * (domain.x[1] - domain.x[0]);
|
|
150559
|
+
};
|
|
150560
|
+
|
|
150561
|
+
ann._ya = {};
|
|
150562
|
+
Lib.extendFlat(ann._ya, base);
|
|
150563
|
+
Axes.setConvert(ann._ya);
|
|
150564
|
+
ann._ya._offset = size.t + (1 - domain.y[1]) * size.h;
|
|
150565
|
+
ann._ya.l2p = function() {
|
|
150566
|
+
return 0.5 * (1 - ann._pdata[1] / ann._pdata[3]) * size.h * (domain.y[1] - domain.y[0]);
|
|
150567
|
+
};
|
|
150568
|
+
}
|
|
150569
|
+
|
|
150570
|
+
|
|
150571
|
+
/***/ }),
|
|
150572
|
+
|
|
150573
|
+
/***/ 41926:
|
|
150574
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150575
|
+
|
|
150576
|
+
|
|
150577
|
+
|
|
150578
|
+
var Lib = __webpack_require__(30991);
|
|
150579
|
+
var Axes = __webpack_require__(15076);
|
|
150580
|
+
var handleArrayContainerDefaults = __webpack_require__(21238);
|
|
150581
|
+
var handleAnnotationCommonDefaults = __webpack_require__(84081);
|
|
150582
|
+
var attributes = __webpack_require__(9793);
|
|
150583
|
+
|
|
150584
|
+
module.exports = function handleDefaults(sceneLayoutIn, sceneLayoutOut, opts) {
|
|
150585
|
+
handleArrayContainerDefaults(sceneLayoutIn, sceneLayoutOut, {
|
|
150586
|
+
name: 'annotations',
|
|
150587
|
+
handleItemDefaults: handleAnnotationDefaults,
|
|
150588
|
+
fullLayout: opts.fullLayout
|
|
150589
|
+
});
|
|
150590
|
+
};
|
|
150591
|
+
|
|
150592
|
+
function handleAnnotationDefaults(annIn, annOut, sceneLayout, opts) {
|
|
150593
|
+
function coerce(attr, dflt) {
|
|
150594
|
+
return Lib.coerce(annIn, annOut, attributes, attr, dflt);
|
|
150595
|
+
}
|
|
150596
|
+
|
|
150597
|
+
function coercePosition(axLetter) {
|
|
150598
|
+
var axName = axLetter + 'axis';
|
|
150599
|
+
|
|
150600
|
+
// mock in such way that getFromId grabs correct 3D axis
|
|
150601
|
+
var gdMock = { _fullLayout: {} };
|
|
150602
|
+
gdMock._fullLayout[axName] = sceneLayout[axName];
|
|
150603
|
+
|
|
150604
|
+
return Axes.coercePosition(annOut, gdMock, coerce, axLetter, axLetter, 0.5);
|
|
150605
|
+
}
|
|
150606
|
+
|
|
150607
|
+
|
|
150608
|
+
var visible = coerce('visible');
|
|
150609
|
+
if(!visible) return;
|
|
150610
|
+
|
|
150611
|
+
handleAnnotationCommonDefaults(annIn, annOut, opts.fullLayout, coerce);
|
|
150612
|
+
|
|
150613
|
+
coercePosition('x');
|
|
150614
|
+
coercePosition('y');
|
|
150615
|
+
coercePosition('z');
|
|
150616
|
+
|
|
150617
|
+
// if you have one coordinate you should all three
|
|
150618
|
+
Lib.noneOrAll(annIn, annOut, ['x', 'y', 'z']);
|
|
150619
|
+
|
|
150620
|
+
// hard-set here for completeness
|
|
150621
|
+
annOut.xref = 'x';
|
|
150622
|
+
annOut.yref = 'y';
|
|
150623
|
+
annOut.zref = 'z';
|
|
150624
|
+
|
|
150625
|
+
coerce('xanchor');
|
|
150626
|
+
coerce('yanchor');
|
|
150627
|
+
coerce('xshift');
|
|
150628
|
+
coerce('yshift');
|
|
150629
|
+
|
|
150630
|
+
if(annOut.showarrow) {
|
|
150631
|
+
annOut.axref = 'pixel';
|
|
150632
|
+
annOut.ayref = 'pixel';
|
|
150633
|
+
|
|
150634
|
+
// TODO maybe default values should be bigger than the 2D case?
|
|
150635
|
+
coerce('ax', -10);
|
|
150636
|
+
coerce('ay', -30);
|
|
150637
|
+
|
|
150638
|
+
// if you have one part of arrow length you should have both
|
|
150639
|
+
Lib.noneOrAll(annIn, annOut, ['ax', 'ay']);
|
|
150640
|
+
}
|
|
150641
|
+
}
|
|
150642
|
+
|
|
150643
|
+
|
|
150644
|
+
/***/ }),
|
|
150645
|
+
|
|
150646
|
+
/***/ 13802:
|
|
150647
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150648
|
+
|
|
150649
|
+
|
|
150650
|
+
|
|
150651
|
+
var drawRaw = (__webpack_require__(47995).drawRaw);
|
|
150652
|
+
var project = __webpack_require__(51344);
|
|
150653
|
+
var axLetters = ['x', 'y', 'z'];
|
|
150654
|
+
|
|
150655
|
+
module.exports = function draw(scene) {
|
|
150656
|
+
var fullSceneLayout = scene.fullSceneLayout;
|
|
150657
|
+
var dataScale = scene.dataScale;
|
|
150658
|
+
var anns = fullSceneLayout.annotations;
|
|
150659
|
+
|
|
150660
|
+
for(var i = 0; i < anns.length; i++) {
|
|
150661
|
+
var ann = anns[i];
|
|
150662
|
+
var annotationIsOffscreen = false;
|
|
150663
|
+
|
|
150664
|
+
for(var j = 0; j < 3; j++) {
|
|
150665
|
+
var axLetter = axLetters[j];
|
|
150666
|
+
var pos = ann[axLetter];
|
|
150667
|
+
var ax = fullSceneLayout[axLetter + 'axis'];
|
|
150668
|
+
var posFraction = ax.r2fraction(pos);
|
|
150669
|
+
|
|
150670
|
+
if(posFraction < 0 || posFraction > 1) {
|
|
150671
|
+
annotationIsOffscreen = true;
|
|
150672
|
+
break;
|
|
150673
|
+
}
|
|
150674
|
+
}
|
|
150675
|
+
|
|
150676
|
+
if(annotationIsOffscreen) {
|
|
150677
|
+
scene.fullLayout._infolayer
|
|
150678
|
+
.select('.annotation-' + scene.id + '[data-index="' + i + '"]')
|
|
150679
|
+
.remove();
|
|
150680
|
+
} else {
|
|
150681
|
+
ann._pdata = project(scene.glplot.cameraParams, [
|
|
150682
|
+
fullSceneLayout.xaxis.r2l(ann.x) * dataScale[0],
|
|
150683
|
+
fullSceneLayout.yaxis.r2l(ann.y) * dataScale[1],
|
|
150684
|
+
fullSceneLayout.zaxis.r2l(ann.z) * dataScale[2]
|
|
150685
|
+
]);
|
|
150686
|
+
|
|
150687
|
+
drawRaw(scene.graphDiv, ann, i, scene.id, ann._xa, ann._ya);
|
|
150688
|
+
}
|
|
150689
|
+
}
|
|
150690
|
+
};
|
|
150691
|
+
|
|
150692
|
+
|
|
150693
|
+
/***/ }),
|
|
150694
|
+
|
|
150695
|
+
/***/ 86578:
|
|
150696
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
150697
|
+
|
|
150698
|
+
|
|
150699
|
+
|
|
150700
|
+
var Registry = __webpack_require__(13936);
|
|
150701
|
+
var Lib = __webpack_require__(30991);
|
|
150702
|
+
|
|
150703
|
+
module.exports = {
|
|
150704
|
+
moduleType: 'component',
|
|
150705
|
+
name: 'annotations3d',
|
|
150706
|
+
|
|
150707
|
+
schema: {
|
|
150708
|
+
subplots: {
|
|
150709
|
+
scene: {annotations: __webpack_require__(9793)}
|
|
150710
|
+
}
|
|
150711
|
+
},
|
|
150712
|
+
|
|
150713
|
+
layoutAttributes: __webpack_require__(9793),
|
|
150714
|
+
handleDefaults: __webpack_require__(41926),
|
|
150715
|
+
includeBasePlot: includeGL3D,
|
|
150716
|
+
|
|
150717
|
+
convert: __webpack_require__(58121),
|
|
150718
|
+
draw: __webpack_require__(13802)
|
|
150719
|
+
};
|
|
150720
|
+
|
|
150721
|
+
function includeGL3D(layoutIn, layoutOut) {
|
|
150722
|
+
var GL3D = Registry.subplotsRegistry.gl3d;
|
|
150723
|
+
if(!GL3D) return;
|
|
150724
|
+
|
|
150725
|
+
var attrRegex = GL3D.attrRegex;
|
|
150726
|
+
|
|
150727
|
+
var keys = Object.keys(layoutIn);
|
|
150728
|
+
for(var i = 0; i < keys.length; i++) {
|
|
150729
|
+
var k = keys[i];
|
|
150730
|
+
if(attrRegex.test(k) && (layoutIn[k].annotations || []).length) {
|
|
150731
|
+
Lib.pushUnique(layoutOut._basePlotModules, GL3D);
|
|
150732
|
+
Lib.pushUnique(layoutOut._subplots.gl3d, k);
|
|
150733
|
+
}
|
|
150734
|
+
}
|
|
150735
|
+
}
|
|
150736
|
+
|
|
150737
|
+
|
|
150738
150738
|
/***/ }),
|
|
150739
150739
|
|
|
150740
150740
|
/***/ 27639:
|
|
@@ -248967,595 +248967,6 @@ function isValidZ(z) {
|
|
|
248967
248967
|
}
|
|
248968
248968
|
|
|
248969
248969
|
|
|
248970
|
-
/***/ }),
|
|
248971
|
-
|
|
248972
|
-
/***/ 42124:
|
|
248973
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
248974
|
-
|
|
248975
|
-
|
|
248976
|
-
|
|
248977
|
-
var histogramAttrs = __webpack_require__(71250);
|
|
248978
|
-
var makeBinAttrs = __webpack_require__(9284);
|
|
248979
|
-
var heatmapAttrs = __webpack_require__(68300);
|
|
248980
|
-
var baseAttrs = __webpack_require__(35667);
|
|
248981
|
-
var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
|
|
248982
|
-
var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
|
|
248983
|
-
var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
|
|
248984
|
-
var colorScaleAttrs = __webpack_require__(17957);
|
|
248985
|
-
|
|
248986
|
-
var extendFlat = (__webpack_require__(91307).extendFlat);
|
|
248987
|
-
|
|
248988
|
-
module.exports = extendFlat(
|
|
248989
|
-
{
|
|
248990
|
-
x: histogramAttrs.x,
|
|
248991
|
-
y: histogramAttrs.y,
|
|
248992
|
-
|
|
248993
|
-
z: {
|
|
248994
|
-
valType: 'data_array',
|
|
248995
|
-
editType: 'calc',
|
|
248996
|
-
description: 'Sets the aggregation data.'
|
|
248997
|
-
},
|
|
248998
|
-
marker: {
|
|
248999
|
-
color: {
|
|
249000
|
-
valType: 'data_array',
|
|
249001
|
-
editType: 'calc',
|
|
249002
|
-
description: 'Sets the aggregation data.'
|
|
249003
|
-
},
|
|
249004
|
-
editType: 'calc'
|
|
249005
|
-
},
|
|
249006
|
-
|
|
249007
|
-
histnorm: histogramAttrs.histnorm,
|
|
249008
|
-
histfunc: histogramAttrs.histfunc,
|
|
249009
|
-
nbinsx: histogramAttrs.nbinsx,
|
|
249010
|
-
xbins: makeBinAttrs('x'),
|
|
249011
|
-
nbinsy: histogramAttrs.nbinsy,
|
|
249012
|
-
ybins: makeBinAttrs('y'),
|
|
249013
|
-
autobinx: histogramAttrs.autobinx,
|
|
249014
|
-
autobiny: histogramAttrs.autobiny,
|
|
249015
|
-
|
|
249016
|
-
bingroup: extendFlat({}, histogramAttrs.bingroup, {
|
|
249017
|
-
description: [
|
|
249018
|
-
'Set the `xbingroup` and `ybingroup` default prefix',
|
|
249019
|
-
'For example, setting a `bingroup` of *1* on two histogram2d traces',
|
|
249020
|
-
'will make them their x-bins and y-bins match separately.'
|
|
249021
|
-
].join(' ')
|
|
249022
|
-
}),
|
|
249023
|
-
xbingroup: extendFlat({}, histogramAttrs.bingroup, {
|
|
249024
|
-
description: [
|
|
249025
|
-
'Set a group of histogram traces which will have compatible x-bin settings.',
|
|
249026
|
-
'Using `xbingroup`, histogram2d and histogram2dcontour traces ',
|
|
249027
|
-
'(on axes of the same axis type) can have compatible x-bin settings.',
|
|
249028
|
-
'Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`'
|
|
249029
|
-
].join(' ')
|
|
249030
|
-
}),
|
|
249031
|
-
ybingroup: extendFlat({}, histogramAttrs.bingroup, {
|
|
249032
|
-
description: [
|
|
249033
|
-
'Set a group of histogram traces which will have compatible y-bin settings.',
|
|
249034
|
-
'Using `ybingroup`, histogram2d and histogram2dcontour traces ',
|
|
249035
|
-
'(on axes of the same axis type) can have compatible y-bin settings.',
|
|
249036
|
-
'Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`'
|
|
249037
|
-
].join(' ')
|
|
249038
|
-
}),
|
|
249039
|
-
|
|
249040
|
-
xgap: heatmapAttrs.xgap,
|
|
249041
|
-
ygap: heatmapAttrs.ygap,
|
|
249042
|
-
zsmooth: heatmapAttrs.zsmooth,
|
|
249043
|
-
xhoverformat: axisHoverFormat('x'),
|
|
249044
|
-
yhoverformat: axisHoverFormat('y'),
|
|
249045
|
-
zhoverformat: axisHoverFormat('z', 1),
|
|
249046
|
-
hovertemplate: hovertemplateAttrs({}, {keys: 'z'}),
|
|
249047
|
-
texttemplate: texttemplateAttrs({
|
|
249048
|
-
arrayOk: false,
|
|
249049
|
-
editType: 'plot'
|
|
249050
|
-
}, {
|
|
249051
|
-
keys: 'z'
|
|
249052
|
-
}),
|
|
249053
|
-
textfont: heatmapAttrs.textfont,
|
|
249054
|
-
showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
|
|
249055
|
-
},
|
|
249056
|
-
colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
|
|
249057
|
-
);
|
|
249058
|
-
|
|
249059
|
-
|
|
249060
|
-
/***/ }),
|
|
249061
|
-
|
|
249062
|
-
/***/ 32492:
|
|
249063
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
249064
|
-
|
|
249065
|
-
|
|
249066
|
-
|
|
249067
|
-
var Lib = __webpack_require__(30991);
|
|
249068
|
-
var Axes = __webpack_require__(15076);
|
|
249069
|
-
|
|
249070
|
-
var binFunctions = __webpack_require__(47260);
|
|
249071
|
-
var normFunctions = __webpack_require__(855);
|
|
249072
|
-
var doAvg = __webpack_require__(26756);
|
|
249073
|
-
var getBinSpanLabelRound = __webpack_require__(41574);
|
|
249074
|
-
var calcAllAutoBins = (__webpack_require__(50414).calcAllAutoBins);
|
|
249075
|
-
|
|
249076
|
-
module.exports = function calc(gd, trace) {
|
|
249077
|
-
var xa = Axes.getFromId(gd, trace.xaxis);
|
|
249078
|
-
var ya = Axes.getFromId(gd, trace.yaxis);
|
|
249079
|
-
|
|
249080
|
-
var xcalendar = trace.xcalendar;
|
|
249081
|
-
var ycalendar = trace.ycalendar;
|
|
249082
|
-
var xr2c = function(v) { return xa.r2c(v, 0, xcalendar); };
|
|
249083
|
-
var yr2c = function(v) { return ya.r2c(v, 0, ycalendar); };
|
|
249084
|
-
var xc2r = function(v) { return xa.c2r(v, 0, xcalendar); };
|
|
249085
|
-
var yc2r = function(v) { return ya.c2r(v, 0, ycalendar); };
|
|
249086
|
-
|
|
249087
|
-
var i, j, n, m;
|
|
249088
|
-
|
|
249089
|
-
// calculate the bins
|
|
249090
|
-
var xBinsAndPos = calcAllAutoBins(gd, trace, xa, 'x');
|
|
249091
|
-
var xBinSpec = xBinsAndPos[0];
|
|
249092
|
-
var xPos0 = xBinsAndPos[1];
|
|
249093
|
-
var yBinsAndPos = calcAllAutoBins(gd, trace, ya, 'y');
|
|
249094
|
-
var yBinSpec = yBinsAndPos[0];
|
|
249095
|
-
var yPos0 = yBinsAndPos[1];
|
|
249096
|
-
|
|
249097
|
-
var serieslen = trace._length;
|
|
249098
|
-
if(xPos0.length > serieslen) xPos0.splice(serieslen, xPos0.length - serieslen);
|
|
249099
|
-
if(yPos0.length > serieslen) yPos0.splice(serieslen, yPos0.length - serieslen);
|
|
249100
|
-
|
|
249101
|
-
// make the empty bin array & scale the map
|
|
249102
|
-
var z = [];
|
|
249103
|
-
var onecol = [];
|
|
249104
|
-
var zerocol = [];
|
|
249105
|
-
var nonuniformBinsX = typeof xBinSpec.size === 'string';
|
|
249106
|
-
var nonuniformBinsY = typeof yBinSpec.size === 'string';
|
|
249107
|
-
var xEdges = [];
|
|
249108
|
-
var yEdges = [];
|
|
249109
|
-
var xbins = nonuniformBinsX ? xEdges : xBinSpec;
|
|
249110
|
-
var ybins = nonuniformBinsY ? yEdges : yBinSpec;
|
|
249111
|
-
var total = 0;
|
|
249112
|
-
var counts = [];
|
|
249113
|
-
var inputPoints = [];
|
|
249114
|
-
var norm = trace.histnorm;
|
|
249115
|
-
var func = trace.histfunc;
|
|
249116
|
-
var densitynorm = norm.indexOf('density') !== -1;
|
|
249117
|
-
var extremefunc = func === 'max' || func === 'min';
|
|
249118
|
-
var sizeinit = extremefunc ? null : 0;
|
|
249119
|
-
var binfunc = binFunctions.count;
|
|
249120
|
-
var normfunc = normFunctions[norm];
|
|
249121
|
-
var doavg = false;
|
|
249122
|
-
var xinc = [];
|
|
249123
|
-
var yinc = [];
|
|
249124
|
-
|
|
249125
|
-
// set a binning function other than count?
|
|
249126
|
-
// for binning functions: check first for 'z',
|
|
249127
|
-
// then 'mc' in case we had a colored scatter plot
|
|
249128
|
-
// and want to transfer these colors to the 2D histo
|
|
249129
|
-
// TODO: axe this, make it the responsibility of the app changing type? or an impliedEdit?
|
|
249130
|
-
var rawCounterData = ('z' in trace) ?
|
|
249131
|
-
trace.z :
|
|
249132
|
-
(('marker' in trace && Array.isArray(trace.marker.color)) ?
|
|
249133
|
-
trace.marker.color : '');
|
|
249134
|
-
if(rawCounterData && func !== 'count') {
|
|
249135
|
-
doavg = func === 'avg';
|
|
249136
|
-
binfunc = binFunctions[func];
|
|
249137
|
-
}
|
|
249138
|
-
|
|
249139
|
-
// decrease end a little in case of rounding errors
|
|
249140
|
-
var xBinSize = xBinSpec.size;
|
|
249141
|
-
var xBinStart = xr2c(xBinSpec.start);
|
|
249142
|
-
var xBinEnd = xr2c(xBinSpec.end) +
|
|
249143
|
-
(xBinStart - Axes.tickIncrement(xBinStart, xBinSize, false, xcalendar)) / 1e6;
|
|
249144
|
-
|
|
249145
|
-
for(i = xBinStart; i < xBinEnd; i = Axes.tickIncrement(i, xBinSize, false, xcalendar)) {
|
|
249146
|
-
onecol.push(sizeinit);
|
|
249147
|
-
xEdges.push(i);
|
|
249148
|
-
if(doavg) zerocol.push(0);
|
|
249149
|
-
}
|
|
249150
|
-
xEdges.push(i);
|
|
249151
|
-
|
|
249152
|
-
var nx = onecol.length;
|
|
249153
|
-
var dx = (i - xBinStart) / nx;
|
|
249154
|
-
var x0 = xc2r(xBinStart + dx / 2);
|
|
249155
|
-
|
|
249156
|
-
var yBinSize = yBinSpec.size;
|
|
249157
|
-
var yBinStart = yr2c(yBinSpec.start);
|
|
249158
|
-
var yBinEnd = yr2c(yBinSpec.end) +
|
|
249159
|
-
(yBinStart - Axes.tickIncrement(yBinStart, yBinSize, false, ycalendar)) / 1e6;
|
|
249160
|
-
|
|
249161
|
-
for(i = yBinStart; i < yBinEnd; i = Axes.tickIncrement(i, yBinSize, false, ycalendar)) {
|
|
249162
|
-
z.push(onecol.slice());
|
|
249163
|
-
yEdges.push(i);
|
|
249164
|
-
var ipCol = new Array(nx);
|
|
249165
|
-
for(j = 0; j < nx; j++) ipCol[j] = [];
|
|
249166
|
-
inputPoints.push(ipCol);
|
|
249167
|
-
if(doavg) counts.push(zerocol.slice());
|
|
249168
|
-
}
|
|
249169
|
-
yEdges.push(i);
|
|
249170
|
-
|
|
249171
|
-
var ny = z.length;
|
|
249172
|
-
var dy = (i - yBinStart) / ny;
|
|
249173
|
-
var y0 = yc2r(yBinStart + dy / 2);
|
|
249174
|
-
|
|
249175
|
-
if(densitynorm) {
|
|
249176
|
-
xinc = makeIncrements(onecol.length, xbins, dx, nonuniformBinsX);
|
|
249177
|
-
yinc = makeIncrements(z.length, ybins, dy, nonuniformBinsY);
|
|
249178
|
-
}
|
|
249179
|
-
|
|
249180
|
-
// for date axes we need bin bounds to be calcdata. For nonuniform bins
|
|
249181
|
-
// we already have this, but uniform with start/end/size they're still strings.
|
|
249182
|
-
if(!nonuniformBinsX && xa.type === 'date') xbins = binsToCalc(xr2c, xbins);
|
|
249183
|
-
if(!nonuniformBinsY && ya.type === 'date') ybins = binsToCalc(yr2c, ybins);
|
|
249184
|
-
|
|
249185
|
-
// put data into bins
|
|
249186
|
-
var uniqueValsPerX = true;
|
|
249187
|
-
var uniqueValsPerY = true;
|
|
249188
|
-
var xVals = new Array(nx);
|
|
249189
|
-
var yVals = new Array(ny);
|
|
249190
|
-
var xGapLow = Infinity;
|
|
249191
|
-
var xGapHigh = Infinity;
|
|
249192
|
-
var yGapLow = Infinity;
|
|
249193
|
-
var yGapHigh = Infinity;
|
|
249194
|
-
for(i = 0; i < serieslen; i++) {
|
|
249195
|
-
var xi = xPos0[i];
|
|
249196
|
-
var yi = yPos0[i];
|
|
249197
|
-
n = Lib.findBin(xi, xbins);
|
|
249198
|
-
m = Lib.findBin(yi, ybins);
|
|
249199
|
-
if(n >= 0 && n < nx && m >= 0 && m < ny) {
|
|
249200
|
-
total += binfunc(n, i, z[m], rawCounterData, counts[m]);
|
|
249201
|
-
inputPoints[m][n].push(i);
|
|
249202
|
-
|
|
249203
|
-
if(uniqueValsPerX) {
|
|
249204
|
-
if(xVals[n] === undefined) xVals[n] = xi;
|
|
249205
|
-
else if(xVals[n] !== xi) uniqueValsPerX = false;
|
|
249206
|
-
}
|
|
249207
|
-
if(uniqueValsPerY) {
|
|
249208
|
-
if(yVals[m] === undefined) yVals[m] = yi;
|
|
249209
|
-
else if(yVals[m] !== yi) uniqueValsPerY = false;
|
|
249210
|
-
}
|
|
249211
|
-
|
|
249212
|
-
xGapLow = Math.min(xGapLow, xi - xEdges[n]);
|
|
249213
|
-
xGapHigh = Math.min(xGapHigh, xEdges[n + 1] - xi);
|
|
249214
|
-
yGapLow = Math.min(yGapLow, yi - yEdges[m]);
|
|
249215
|
-
yGapHigh = Math.min(yGapHigh, yEdges[m + 1] - yi);
|
|
249216
|
-
}
|
|
249217
|
-
}
|
|
249218
|
-
// normalize, if needed
|
|
249219
|
-
if(doavg) {
|
|
249220
|
-
for(m = 0; m < ny; m++) total += doAvg(z[m], counts[m]);
|
|
249221
|
-
}
|
|
249222
|
-
if(normfunc) {
|
|
249223
|
-
for(m = 0; m < ny; m++) normfunc(z[m], total, xinc, yinc[m]);
|
|
249224
|
-
}
|
|
249225
|
-
|
|
249226
|
-
return {
|
|
249227
|
-
x: xPos0,
|
|
249228
|
-
xRanges: getRanges(xEdges, uniqueValsPerX && xVals, xGapLow, xGapHigh, xa, xcalendar),
|
|
249229
|
-
x0: x0,
|
|
249230
|
-
dx: dx,
|
|
249231
|
-
y: yPos0,
|
|
249232
|
-
yRanges: getRanges(yEdges, uniqueValsPerY && yVals, yGapLow, yGapHigh, ya, ycalendar),
|
|
249233
|
-
y0: y0,
|
|
249234
|
-
dy: dy,
|
|
249235
|
-
z: z,
|
|
249236
|
-
pts: inputPoints
|
|
249237
|
-
};
|
|
249238
|
-
};
|
|
249239
|
-
|
|
249240
|
-
function makeIncrements(len, bins, dv, nonuniform) {
|
|
249241
|
-
var out = new Array(len);
|
|
249242
|
-
var i;
|
|
249243
|
-
if(nonuniform) {
|
|
249244
|
-
for(i = 0; i < len; i++) out[i] = 1 / (bins[i + 1] - bins[i]);
|
|
249245
|
-
} else {
|
|
249246
|
-
var inc = 1 / dv;
|
|
249247
|
-
for(i = 0; i < len; i++) out[i] = inc;
|
|
249248
|
-
}
|
|
249249
|
-
return out;
|
|
249250
|
-
}
|
|
249251
|
-
|
|
249252
|
-
function binsToCalc(r2c, bins) {
|
|
249253
|
-
return {
|
|
249254
|
-
start: r2c(bins.start),
|
|
249255
|
-
end: r2c(bins.end),
|
|
249256
|
-
size: bins.size
|
|
249257
|
-
};
|
|
249258
|
-
}
|
|
249259
|
-
|
|
249260
|
-
function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
|
|
249261
|
-
var i;
|
|
249262
|
-
var len = edges.length - 1;
|
|
249263
|
-
var out = new Array(len);
|
|
249264
|
-
var roundFn = getBinSpanLabelRound(gapLow, gapHigh, edges, ax, calendar);
|
|
249265
|
-
|
|
249266
|
-
for(i = 0; i < len; i++) {
|
|
249267
|
-
var v = (uniqueVals || [])[i];
|
|
249268
|
-
out[i] = v === undefined ?
|
|
249269
|
-
[roundFn(edges[i]), roundFn(edges[i + 1], true)] :
|
|
249270
|
-
[v, v];
|
|
249271
|
-
}
|
|
249272
|
-
return out;
|
|
249273
|
-
}
|
|
249274
|
-
|
|
249275
|
-
|
|
249276
|
-
/***/ }),
|
|
249277
|
-
|
|
249278
|
-
/***/ 15611:
|
|
249279
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
249280
|
-
|
|
249281
|
-
|
|
249282
|
-
|
|
249283
|
-
var Lib = __webpack_require__(30991);
|
|
249284
|
-
|
|
249285
|
-
var handleSampleDefaults = __webpack_require__(6236);
|
|
249286
|
-
var handleStyleDefaults = __webpack_require__(25157);
|
|
249287
|
-
var colorscaleDefaults = __webpack_require__(13682);
|
|
249288
|
-
var handleHeatmapLabelDefaults = __webpack_require__(52340);
|
|
249289
|
-
var attributes = __webpack_require__(42124);
|
|
249290
|
-
|
|
249291
|
-
|
|
249292
|
-
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
249293
|
-
function coerce(attr, dflt) {
|
|
249294
|
-
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
|
|
249295
|
-
}
|
|
249296
|
-
|
|
249297
|
-
handleSampleDefaults(traceIn, traceOut, coerce, layout);
|
|
249298
|
-
if(traceOut.visible === false) return;
|
|
249299
|
-
|
|
249300
|
-
handleStyleDefaults(traceIn, traceOut, coerce, layout);
|
|
249301
|
-
colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
|
|
249302
|
-
coerce('hovertemplate');
|
|
249303
|
-
|
|
249304
|
-
handleHeatmapLabelDefaults(coerce, layout);
|
|
249305
|
-
|
|
249306
|
-
coerce('xhoverformat');
|
|
249307
|
-
coerce('yhoverformat');
|
|
249308
|
-
};
|
|
249309
|
-
|
|
249310
|
-
|
|
249311
|
-
/***/ }),
|
|
249312
|
-
|
|
249313
|
-
/***/ 94587:
|
|
249314
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
249315
|
-
|
|
249316
|
-
|
|
249317
|
-
|
|
249318
|
-
var heatmapHover = __webpack_require__(85243);
|
|
249319
|
-
var hoverLabelText = (__webpack_require__(15076).hoverLabelText);
|
|
249320
|
-
|
|
249321
|
-
module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
|
|
249322
|
-
var pts = heatmapHover(pointData, xval, yval, hovermode, opts);
|
|
249323
|
-
|
|
249324
|
-
if(!pts) return;
|
|
249325
|
-
|
|
249326
|
-
pointData = pts[0];
|
|
249327
|
-
var indices = pointData.index;
|
|
249328
|
-
var ny = indices[0];
|
|
249329
|
-
var nx = indices[1];
|
|
249330
|
-
var cd0 = pointData.cd[0];
|
|
249331
|
-
var trace = cd0.trace;
|
|
249332
|
-
var xRange = cd0.xRanges[nx];
|
|
249333
|
-
var yRange = cd0.yRanges[ny];
|
|
249334
|
-
|
|
249335
|
-
pointData.xLabel = hoverLabelText(pointData.xa, [xRange[0], xRange[1]], trace.xhoverformat);
|
|
249336
|
-
pointData.yLabel = hoverLabelText(pointData.ya, [yRange[0], yRange[1]], trace.yhoverformat);
|
|
249337
|
-
|
|
249338
|
-
return pts;
|
|
249339
|
-
};
|
|
249340
|
-
|
|
249341
|
-
|
|
249342
|
-
/***/ }),
|
|
249343
|
-
|
|
249344
|
-
/***/ 3617:
|
|
249345
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
249346
|
-
|
|
249347
|
-
|
|
249348
|
-
|
|
249349
|
-
module.exports = {
|
|
249350
|
-
attributes: __webpack_require__(42124),
|
|
249351
|
-
supplyDefaults: __webpack_require__(15611),
|
|
249352
|
-
crossTraceDefaults: __webpack_require__(34294),
|
|
249353
|
-
calc: __webpack_require__(91980),
|
|
249354
|
-
plot: __webpack_require__(29406),
|
|
249355
|
-
layerName: 'heatmaplayer',
|
|
249356
|
-
colorbar: __webpack_require__(90165),
|
|
249357
|
-
style: __webpack_require__(58756),
|
|
249358
|
-
hoverPoints: __webpack_require__(94587),
|
|
249359
|
-
eventData: __webpack_require__(63870),
|
|
249360
|
-
|
|
249361
|
-
moduleType: 'trace',
|
|
249362
|
-
name: 'histogram2d',
|
|
249363
|
-
basePlotModule: __webpack_require__(47885),
|
|
249364
|
-
categories: ['cartesian', 'svg', '2dMap', 'histogram', 'showLegend'],
|
|
249365
|
-
meta: {
|
|
249366
|
-
hrName: 'histogram_2d',
|
|
249367
|
-
description: [
|
|
249368
|
-
'The sample data from which statistics are computed is set in `x`',
|
|
249369
|
-
'and `y` (where `x` and `y` represent marginal distributions,',
|
|
249370
|
-
'binning is set in `xbins` and `ybins` in this case)',
|
|
249371
|
-
'or `z` (where `z` represent the 2D distribution and binning set,',
|
|
249372
|
-
'binning is set by `x` and `y` in this case).',
|
|
249373
|
-
'The resulting distribution is visualized as a heatmap.'
|
|
249374
|
-
].join(' ')
|
|
249375
|
-
}
|
|
249376
|
-
};
|
|
249377
|
-
|
|
249378
|
-
|
|
249379
|
-
/***/ }),
|
|
249380
|
-
|
|
249381
|
-
/***/ 6236:
|
|
249382
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
249383
|
-
|
|
249384
|
-
|
|
249385
|
-
|
|
249386
|
-
var Registry = __webpack_require__(13936);
|
|
249387
|
-
var Lib = __webpack_require__(30991);
|
|
249388
|
-
|
|
249389
|
-
module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout) {
|
|
249390
|
-
var x = coerce('x');
|
|
249391
|
-
var y = coerce('y');
|
|
249392
|
-
var xlen = Lib.minRowLength(x);
|
|
249393
|
-
var ylen = Lib.minRowLength(y);
|
|
249394
|
-
|
|
249395
|
-
// we could try to accept x0 and dx, etc...
|
|
249396
|
-
// but that's a pretty weird use case.
|
|
249397
|
-
// for now require both x and y explicitly specified.
|
|
249398
|
-
if(!xlen || !ylen) {
|
|
249399
|
-
traceOut.visible = false;
|
|
249400
|
-
return;
|
|
249401
|
-
}
|
|
249402
|
-
|
|
249403
|
-
traceOut._length = Math.min(xlen, ylen);
|
|
249404
|
-
|
|
249405
|
-
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
|
|
249406
|
-
handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
|
|
249407
|
-
|
|
249408
|
-
// if marker.color is an array, we can use it in aggregation instead of z
|
|
249409
|
-
var hasAggregationData = coerce('z') || coerce('marker.color');
|
|
249410
|
-
|
|
249411
|
-
if(hasAggregationData) coerce('histfunc');
|
|
249412
|
-
coerce('histnorm');
|
|
249413
|
-
|
|
249414
|
-
// Note: bin defaults are now handled in Histogram2D.crossTraceDefaults
|
|
249415
|
-
// autobin(x|y) are only included here to appease Plotly.validate
|
|
249416
|
-
coerce('autobinx');
|
|
249417
|
-
coerce('autobiny');
|
|
249418
|
-
};
|
|
249419
|
-
|
|
249420
|
-
|
|
249421
|
-
/***/ }),
|
|
249422
|
-
|
|
249423
|
-
/***/ 34872:
|
|
249424
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
249425
|
-
|
|
249426
|
-
|
|
249427
|
-
|
|
249428
|
-
var histogram2dAttrs = __webpack_require__(42124);
|
|
249429
|
-
var contourAttrs = __webpack_require__(70318);
|
|
249430
|
-
var colorScaleAttrs = __webpack_require__(17957);
|
|
249431
|
-
var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
|
|
249432
|
-
|
|
249433
|
-
var extendFlat = (__webpack_require__(91307).extendFlat);
|
|
249434
|
-
|
|
249435
|
-
module.exports = extendFlat({
|
|
249436
|
-
x: histogram2dAttrs.x,
|
|
249437
|
-
y: histogram2dAttrs.y,
|
|
249438
|
-
z: histogram2dAttrs.z,
|
|
249439
|
-
marker: histogram2dAttrs.marker,
|
|
249440
|
-
|
|
249441
|
-
histnorm: histogram2dAttrs.histnorm,
|
|
249442
|
-
histfunc: histogram2dAttrs.histfunc,
|
|
249443
|
-
nbinsx: histogram2dAttrs.nbinsx,
|
|
249444
|
-
xbins: histogram2dAttrs.xbins,
|
|
249445
|
-
nbinsy: histogram2dAttrs.nbinsy,
|
|
249446
|
-
ybins: histogram2dAttrs.ybins,
|
|
249447
|
-
autobinx: histogram2dAttrs.autobinx,
|
|
249448
|
-
autobiny: histogram2dAttrs.autobiny,
|
|
249449
|
-
|
|
249450
|
-
bingroup: histogram2dAttrs.bingroup,
|
|
249451
|
-
xbingroup: histogram2dAttrs.xbingroup,
|
|
249452
|
-
ybingroup: histogram2dAttrs.ybingroup,
|
|
249453
|
-
|
|
249454
|
-
autocontour: contourAttrs.autocontour,
|
|
249455
|
-
ncontours: contourAttrs.ncontours,
|
|
249456
|
-
contours: contourAttrs.contours,
|
|
249457
|
-
line: {
|
|
249458
|
-
color: contourAttrs.line.color,
|
|
249459
|
-
width: extendFlat({}, contourAttrs.line.width, {
|
|
249460
|
-
dflt: 0.5,
|
|
249461
|
-
description: 'Sets the contour line width in (in px)'
|
|
249462
|
-
}),
|
|
249463
|
-
dash: contourAttrs.line.dash,
|
|
249464
|
-
smoothing: contourAttrs.line.smoothing,
|
|
249465
|
-
editType: 'plot'
|
|
249466
|
-
},
|
|
249467
|
-
xhoverformat: axisHoverFormat('x'),
|
|
249468
|
-
yhoverformat: axisHoverFormat('y'),
|
|
249469
|
-
zhoverformat: axisHoverFormat('z', 1),
|
|
249470
|
-
hovertemplate: histogram2dAttrs.hovertemplate,
|
|
249471
|
-
texttemplate: contourAttrs.texttemplate,
|
|
249472
|
-
textfont: contourAttrs.textfont
|
|
249473
|
-
},
|
|
249474
|
-
colorScaleAttrs('', {
|
|
249475
|
-
cLetter: 'z',
|
|
249476
|
-
editTypeOverride: 'calc'
|
|
249477
|
-
})
|
|
249478
|
-
);
|
|
249479
|
-
|
|
249480
|
-
|
|
249481
|
-
/***/ }),
|
|
249482
|
-
|
|
249483
|
-
/***/ 14319:
|
|
249484
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
249485
|
-
|
|
249486
|
-
|
|
249487
|
-
|
|
249488
|
-
var Lib = __webpack_require__(30991);
|
|
249489
|
-
|
|
249490
|
-
var handleSampleDefaults = __webpack_require__(6236);
|
|
249491
|
-
var handleContoursDefaults = __webpack_require__(657);
|
|
249492
|
-
var handleStyleDefaults = __webpack_require__(74619);
|
|
249493
|
-
var handleHeatmapLabelDefaults = __webpack_require__(52340);
|
|
249494
|
-
var attributes = __webpack_require__(34872);
|
|
249495
|
-
|
|
249496
|
-
|
|
249497
|
-
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
249498
|
-
function coerce(attr, dflt) {
|
|
249499
|
-
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
|
|
249500
|
-
}
|
|
249501
|
-
|
|
249502
|
-
function coerce2(attr) {
|
|
249503
|
-
return Lib.coerce2(traceIn, traceOut, attributes, attr);
|
|
249504
|
-
}
|
|
249505
|
-
|
|
249506
|
-
handleSampleDefaults(traceIn, traceOut, coerce, layout);
|
|
249507
|
-
if(traceOut.visible === false) return;
|
|
249508
|
-
|
|
249509
|
-
handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
|
|
249510
|
-
handleStyleDefaults(traceIn, traceOut, coerce, layout);
|
|
249511
|
-
coerce('xhoverformat');
|
|
249512
|
-
coerce('yhoverformat');
|
|
249513
|
-
coerce('hovertemplate');
|
|
249514
|
-
if(
|
|
249515
|
-
traceOut.contours &&
|
|
249516
|
-
traceOut.contours.coloring === 'heatmap'
|
|
249517
|
-
) {
|
|
249518
|
-
handleHeatmapLabelDefaults(coerce, layout);
|
|
249519
|
-
}
|
|
249520
|
-
};
|
|
249521
|
-
|
|
249522
|
-
|
|
249523
|
-
/***/ }),
|
|
249524
|
-
|
|
249525
|
-
/***/ 60613:
|
|
249526
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
249527
|
-
|
|
249528
|
-
|
|
249529
|
-
|
|
249530
|
-
module.exports = {
|
|
249531
|
-
attributes: __webpack_require__(34872),
|
|
249532
|
-
supplyDefaults: __webpack_require__(14319),
|
|
249533
|
-
crossTraceDefaults: __webpack_require__(34294),
|
|
249534
|
-
calc: __webpack_require__(3274),
|
|
249535
|
-
plot: (__webpack_require__(32664).plot),
|
|
249536
|
-
layerName: 'contourlayer',
|
|
249537
|
-
style: __webpack_require__(72690),
|
|
249538
|
-
colorbar: __webpack_require__(70307),
|
|
249539
|
-
hoverPoints: __webpack_require__(52353),
|
|
249540
|
-
|
|
249541
|
-
moduleType: 'trace',
|
|
249542
|
-
name: 'histogram2dcontour',
|
|
249543
|
-
basePlotModule: __webpack_require__(47885),
|
|
249544
|
-
categories: ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'],
|
|
249545
|
-
meta: {
|
|
249546
|
-
hrName: 'histogram_2d_contour',
|
|
249547
|
-
description: [
|
|
249548
|
-
'The sample data from which statistics are computed is set in `x`',
|
|
249549
|
-
'and `y` (where `x` and `y` represent marginal distributions,',
|
|
249550
|
-
'binning is set in `xbins` and `ybins` in this case)',
|
|
249551
|
-
'or `z` (where `z` represent the 2D distribution and binning set,',
|
|
249552
|
-
'binning is set by `x` and `y` in this case).',
|
|
249553
|
-
'The resulting distribution is visualized as a contour plot.'
|
|
249554
|
-
].join(' ')
|
|
249555
|
-
}
|
|
249556
|
-
};
|
|
249557
|
-
|
|
249558
|
-
|
|
249559
248970
|
/***/ }),
|
|
249560
248971
|
|
|
249561
248972
|
/***/ 71250:
|
|
@@ -251264,6 +250675,595 @@ module.exports = {
|
|
|
251264
250675
|
};
|
|
251265
250676
|
|
|
251266
250677
|
|
|
250678
|
+
/***/ }),
|
|
250679
|
+
|
|
250680
|
+
/***/ 42124:
|
|
250681
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
250682
|
+
|
|
250683
|
+
|
|
250684
|
+
|
|
250685
|
+
var histogramAttrs = __webpack_require__(71250);
|
|
250686
|
+
var makeBinAttrs = __webpack_require__(9284);
|
|
250687
|
+
var heatmapAttrs = __webpack_require__(68300);
|
|
250688
|
+
var baseAttrs = __webpack_require__(35667);
|
|
250689
|
+
var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
|
|
250690
|
+
var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
|
|
250691
|
+
var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
|
|
250692
|
+
var colorScaleAttrs = __webpack_require__(17957);
|
|
250693
|
+
|
|
250694
|
+
var extendFlat = (__webpack_require__(91307).extendFlat);
|
|
250695
|
+
|
|
250696
|
+
module.exports = extendFlat(
|
|
250697
|
+
{
|
|
250698
|
+
x: histogramAttrs.x,
|
|
250699
|
+
y: histogramAttrs.y,
|
|
250700
|
+
|
|
250701
|
+
z: {
|
|
250702
|
+
valType: 'data_array',
|
|
250703
|
+
editType: 'calc',
|
|
250704
|
+
description: 'Sets the aggregation data.'
|
|
250705
|
+
},
|
|
250706
|
+
marker: {
|
|
250707
|
+
color: {
|
|
250708
|
+
valType: 'data_array',
|
|
250709
|
+
editType: 'calc',
|
|
250710
|
+
description: 'Sets the aggregation data.'
|
|
250711
|
+
},
|
|
250712
|
+
editType: 'calc'
|
|
250713
|
+
},
|
|
250714
|
+
|
|
250715
|
+
histnorm: histogramAttrs.histnorm,
|
|
250716
|
+
histfunc: histogramAttrs.histfunc,
|
|
250717
|
+
nbinsx: histogramAttrs.nbinsx,
|
|
250718
|
+
xbins: makeBinAttrs('x'),
|
|
250719
|
+
nbinsy: histogramAttrs.nbinsy,
|
|
250720
|
+
ybins: makeBinAttrs('y'),
|
|
250721
|
+
autobinx: histogramAttrs.autobinx,
|
|
250722
|
+
autobiny: histogramAttrs.autobiny,
|
|
250723
|
+
|
|
250724
|
+
bingroup: extendFlat({}, histogramAttrs.bingroup, {
|
|
250725
|
+
description: [
|
|
250726
|
+
'Set the `xbingroup` and `ybingroup` default prefix',
|
|
250727
|
+
'For example, setting a `bingroup` of *1* on two histogram2d traces',
|
|
250728
|
+
'will make them their x-bins and y-bins match separately.'
|
|
250729
|
+
].join(' ')
|
|
250730
|
+
}),
|
|
250731
|
+
xbingroup: extendFlat({}, histogramAttrs.bingroup, {
|
|
250732
|
+
description: [
|
|
250733
|
+
'Set a group of histogram traces which will have compatible x-bin settings.',
|
|
250734
|
+
'Using `xbingroup`, histogram2d and histogram2dcontour traces ',
|
|
250735
|
+
'(on axes of the same axis type) can have compatible x-bin settings.',
|
|
250736
|
+
'Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`'
|
|
250737
|
+
].join(' ')
|
|
250738
|
+
}),
|
|
250739
|
+
ybingroup: extendFlat({}, histogramAttrs.bingroup, {
|
|
250740
|
+
description: [
|
|
250741
|
+
'Set a group of histogram traces which will have compatible y-bin settings.',
|
|
250742
|
+
'Using `ybingroup`, histogram2d and histogram2dcontour traces ',
|
|
250743
|
+
'(on axes of the same axis type) can have compatible y-bin settings.',
|
|
250744
|
+
'Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`'
|
|
250745
|
+
].join(' ')
|
|
250746
|
+
}),
|
|
250747
|
+
|
|
250748
|
+
xgap: heatmapAttrs.xgap,
|
|
250749
|
+
ygap: heatmapAttrs.ygap,
|
|
250750
|
+
zsmooth: heatmapAttrs.zsmooth,
|
|
250751
|
+
xhoverformat: axisHoverFormat('x'),
|
|
250752
|
+
yhoverformat: axisHoverFormat('y'),
|
|
250753
|
+
zhoverformat: axisHoverFormat('z', 1),
|
|
250754
|
+
hovertemplate: hovertemplateAttrs({}, {keys: 'z'}),
|
|
250755
|
+
texttemplate: texttemplateAttrs({
|
|
250756
|
+
arrayOk: false,
|
|
250757
|
+
editType: 'plot'
|
|
250758
|
+
}, {
|
|
250759
|
+
keys: 'z'
|
|
250760
|
+
}),
|
|
250761
|
+
textfont: heatmapAttrs.textfont,
|
|
250762
|
+
showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false})
|
|
250763
|
+
},
|
|
250764
|
+
colorScaleAttrs('', {cLetter: 'z', autoColorDflt: false})
|
|
250765
|
+
);
|
|
250766
|
+
|
|
250767
|
+
|
|
250768
|
+
/***/ }),
|
|
250769
|
+
|
|
250770
|
+
/***/ 32492:
|
|
250771
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
250772
|
+
|
|
250773
|
+
|
|
250774
|
+
|
|
250775
|
+
var Lib = __webpack_require__(30991);
|
|
250776
|
+
var Axes = __webpack_require__(15076);
|
|
250777
|
+
|
|
250778
|
+
var binFunctions = __webpack_require__(47260);
|
|
250779
|
+
var normFunctions = __webpack_require__(855);
|
|
250780
|
+
var doAvg = __webpack_require__(26756);
|
|
250781
|
+
var getBinSpanLabelRound = __webpack_require__(41574);
|
|
250782
|
+
var calcAllAutoBins = (__webpack_require__(50414).calcAllAutoBins);
|
|
250783
|
+
|
|
250784
|
+
module.exports = function calc(gd, trace) {
|
|
250785
|
+
var xa = Axes.getFromId(gd, trace.xaxis);
|
|
250786
|
+
var ya = Axes.getFromId(gd, trace.yaxis);
|
|
250787
|
+
|
|
250788
|
+
var xcalendar = trace.xcalendar;
|
|
250789
|
+
var ycalendar = trace.ycalendar;
|
|
250790
|
+
var xr2c = function(v) { return xa.r2c(v, 0, xcalendar); };
|
|
250791
|
+
var yr2c = function(v) { return ya.r2c(v, 0, ycalendar); };
|
|
250792
|
+
var xc2r = function(v) { return xa.c2r(v, 0, xcalendar); };
|
|
250793
|
+
var yc2r = function(v) { return ya.c2r(v, 0, ycalendar); };
|
|
250794
|
+
|
|
250795
|
+
var i, j, n, m;
|
|
250796
|
+
|
|
250797
|
+
// calculate the bins
|
|
250798
|
+
var xBinsAndPos = calcAllAutoBins(gd, trace, xa, 'x');
|
|
250799
|
+
var xBinSpec = xBinsAndPos[0];
|
|
250800
|
+
var xPos0 = xBinsAndPos[1];
|
|
250801
|
+
var yBinsAndPos = calcAllAutoBins(gd, trace, ya, 'y');
|
|
250802
|
+
var yBinSpec = yBinsAndPos[0];
|
|
250803
|
+
var yPos0 = yBinsAndPos[1];
|
|
250804
|
+
|
|
250805
|
+
var serieslen = trace._length;
|
|
250806
|
+
if(xPos0.length > serieslen) xPos0.splice(serieslen, xPos0.length - serieslen);
|
|
250807
|
+
if(yPos0.length > serieslen) yPos0.splice(serieslen, yPos0.length - serieslen);
|
|
250808
|
+
|
|
250809
|
+
// make the empty bin array & scale the map
|
|
250810
|
+
var z = [];
|
|
250811
|
+
var onecol = [];
|
|
250812
|
+
var zerocol = [];
|
|
250813
|
+
var nonuniformBinsX = typeof xBinSpec.size === 'string';
|
|
250814
|
+
var nonuniformBinsY = typeof yBinSpec.size === 'string';
|
|
250815
|
+
var xEdges = [];
|
|
250816
|
+
var yEdges = [];
|
|
250817
|
+
var xbins = nonuniformBinsX ? xEdges : xBinSpec;
|
|
250818
|
+
var ybins = nonuniformBinsY ? yEdges : yBinSpec;
|
|
250819
|
+
var total = 0;
|
|
250820
|
+
var counts = [];
|
|
250821
|
+
var inputPoints = [];
|
|
250822
|
+
var norm = trace.histnorm;
|
|
250823
|
+
var func = trace.histfunc;
|
|
250824
|
+
var densitynorm = norm.indexOf('density') !== -1;
|
|
250825
|
+
var extremefunc = func === 'max' || func === 'min';
|
|
250826
|
+
var sizeinit = extremefunc ? null : 0;
|
|
250827
|
+
var binfunc = binFunctions.count;
|
|
250828
|
+
var normfunc = normFunctions[norm];
|
|
250829
|
+
var doavg = false;
|
|
250830
|
+
var xinc = [];
|
|
250831
|
+
var yinc = [];
|
|
250832
|
+
|
|
250833
|
+
// set a binning function other than count?
|
|
250834
|
+
// for binning functions: check first for 'z',
|
|
250835
|
+
// then 'mc' in case we had a colored scatter plot
|
|
250836
|
+
// and want to transfer these colors to the 2D histo
|
|
250837
|
+
// TODO: axe this, make it the responsibility of the app changing type? or an impliedEdit?
|
|
250838
|
+
var rawCounterData = ('z' in trace) ?
|
|
250839
|
+
trace.z :
|
|
250840
|
+
(('marker' in trace && Array.isArray(trace.marker.color)) ?
|
|
250841
|
+
trace.marker.color : '');
|
|
250842
|
+
if(rawCounterData && func !== 'count') {
|
|
250843
|
+
doavg = func === 'avg';
|
|
250844
|
+
binfunc = binFunctions[func];
|
|
250845
|
+
}
|
|
250846
|
+
|
|
250847
|
+
// decrease end a little in case of rounding errors
|
|
250848
|
+
var xBinSize = xBinSpec.size;
|
|
250849
|
+
var xBinStart = xr2c(xBinSpec.start);
|
|
250850
|
+
var xBinEnd = xr2c(xBinSpec.end) +
|
|
250851
|
+
(xBinStart - Axes.tickIncrement(xBinStart, xBinSize, false, xcalendar)) / 1e6;
|
|
250852
|
+
|
|
250853
|
+
for(i = xBinStart; i < xBinEnd; i = Axes.tickIncrement(i, xBinSize, false, xcalendar)) {
|
|
250854
|
+
onecol.push(sizeinit);
|
|
250855
|
+
xEdges.push(i);
|
|
250856
|
+
if(doavg) zerocol.push(0);
|
|
250857
|
+
}
|
|
250858
|
+
xEdges.push(i);
|
|
250859
|
+
|
|
250860
|
+
var nx = onecol.length;
|
|
250861
|
+
var dx = (i - xBinStart) / nx;
|
|
250862
|
+
var x0 = xc2r(xBinStart + dx / 2);
|
|
250863
|
+
|
|
250864
|
+
var yBinSize = yBinSpec.size;
|
|
250865
|
+
var yBinStart = yr2c(yBinSpec.start);
|
|
250866
|
+
var yBinEnd = yr2c(yBinSpec.end) +
|
|
250867
|
+
(yBinStart - Axes.tickIncrement(yBinStart, yBinSize, false, ycalendar)) / 1e6;
|
|
250868
|
+
|
|
250869
|
+
for(i = yBinStart; i < yBinEnd; i = Axes.tickIncrement(i, yBinSize, false, ycalendar)) {
|
|
250870
|
+
z.push(onecol.slice());
|
|
250871
|
+
yEdges.push(i);
|
|
250872
|
+
var ipCol = new Array(nx);
|
|
250873
|
+
for(j = 0; j < nx; j++) ipCol[j] = [];
|
|
250874
|
+
inputPoints.push(ipCol);
|
|
250875
|
+
if(doavg) counts.push(zerocol.slice());
|
|
250876
|
+
}
|
|
250877
|
+
yEdges.push(i);
|
|
250878
|
+
|
|
250879
|
+
var ny = z.length;
|
|
250880
|
+
var dy = (i - yBinStart) / ny;
|
|
250881
|
+
var y0 = yc2r(yBinStart + dy / 2);
|
|
250882
|
+
|
|
250883
|
+
if(densitynorm) {
|
|
250884
|
+
xinc = makeIncrements(onecol.length, xbins, dx, nonuniformBinsX);
|
|
250885
|
+
yinc = makeIncrements(z.length, ybins, dy, nonuniformBinsY);
|
|
250886
|
+
}
|
|
250887
|
+
|
|
250888
|
+
// for date axes we need bin bounds to be calcdata. For nonuniform bins
|
|
250889
|
+
// we already have this, but uniform with start/end/size they're still strings.
|
|
250890
|
+
if(!nonuniformBinsX && xa.type === 'date') xbins = binsToCalc(xr2c, xbins);
|
|
250891
|
+
if(!nonuniformBinsY && ya.type === 'date') ybins = binsToCalc(yr2c, ybins);
|
|
250892
|
+
|
|
250893
|
+
// put data into bins
|
|
250894
|
+
var uniqueValsPerX = true;
|
|
250895
|
+
var uniqueValsPerY = true;
|
|
250896
|
+
var xVals = new Array(nx);
|
|
250897
|
+
var yVals = new Array(ny);
|
|
250898
|
+
var xGapLow = Infinity;
|
|
250899
|
+
var xGapHigh = Infinity;
|
|
250900
|
+
var yGapLow = Infinity;
|
|
250901
|
+
var yGapHigh = Infinity;
|
|
250902
|
+
for(i = 0; i < serieslen; i++) {
|
|
250903
|
+
var xi = xPos0[i];
|
|
250904
|
+
var yi = yPos0[i];
|
|
250905
|
+
n = Lib.findBin(xi, xbins);
|
|
250906
|
+
m = Lib.findBin(yi, ybins);
|
|
250907
|
+
if(n >= 0 && n < nx && m >= 0 && m < ny) {
|
|
250908
|
+
total += binfunc(n, i, z[m], rawCounterData, counts[m]);
|
|
250909
|
+
inputPoints[m][n].push(i);
|
|
250910
|
+
|
|
250911
|
+
if(uniqueValsPerX) {
|
|
250912
|
+
if(xVals[n] === undefined) xVals[n] = xi;
|
|
250913
|
+
else if(xVals[n] !== xi) uniqueValsPerX = false;
|
|
250914
|
+
}
|
|
250915
|
+
if(uniqueValsPerY) {
|
|
250916
|
+
if(yVals[m] === undefined) yVals[m] = yi;
|
|
250917
|
+
else if(yVals[m] !== yi) uniqueValsPerY = false;
|
|
250918
|
+
}
|
|
250919
|
+
|
|
250920
|
+
xGapLow = Math.min(xGapLow, xi - xEdges[n]);
|
|
250921
|
+
xGapHigh = Math.min(xGapHigh, xEdges[n + 1] - xi);
|
|
250922
|
+
yGapLow = Math.min(yGapLow, yi - yEdges[m]);
|
|
250923
|
+
yGapHigh = Math.min(yGapHigh, yEdges[m + 1] - yi);
|
|
250924
|
+
}
|
|
250925
|
+
}
|
|
250926
|
+
// normalize, if needed
|
|
250927
|
+
if(doavg) {
|
|
250928
|
+
for(m = 0; m < ny; m++) total += doAvg(z[m], counts[m]);
|
|
250929
|
+
}
|
|
250930
|
+
if(normfunc) {
|
|
250931
|
+
for(m = 0; m < ny; m++) normfunc(z[m], total, xinc, yinc[m]);
|
|
250932
|
+
}
|
|
250933
|
+
|
|
250934
|
+
return {
|
|
250935
|
+
x: xPos0,
|
|
250936
|
+
xRanges: getRanges(xEdges, uniqueValsPerX && xVals, xGapLow, xGapHigh, xa, xcalendar),
|
|
250937
|
+
x0: x0,
|
|
250938
|
+
dx: dx,
|
|
250939
|
+
y: yPos0,
|
|
250940
|
+
yRanges: getRanges(yEdges, uniqueValsPerY && yVals, yGapLow, yGapHigh, ya, ycalendar),
|
|
250941
|
+
y0: y0,
|
|
250942
|
+
dy: dy,
|
|
250943
|
+
z: z,
|
|
250944
|
+
pts: inputPoints
|
|
250945
|
+
};
|
|
250946
|
+
};
|
|
250947
|
+
|
|
250948
|
+
function makeIncrements(len, bins, dv, nonuniform) {
|
|
250949
|
+
var out = new Array(len);
|
|
250950
|
+
var i;
|
|
250951
|
+
if(nonuniform) {
|
|
250952
|
+
for(i = 0; i < len; i++) out[i] = 1 / (bins[i + 1] - bins[i]);
|
|
250953
|
+
} else {
|
|
250954
|
+
var inc = 1 / dv;
|
|
250955
|
+
for(i = 0; i < len; i++) out[i] = inc;
|
|
250956
|
+
}
|
|
250957
|
+
return out;
|
|
250958
|
+
}
|
|
250959
|
+
|
|
250960
|
+
function binsToCalc(r2c, bins) {
|
|
250961
|
+
return {
|
|
250962
|
+
start: r2c(bins.start),
|
|
250963
|
+
end: r2c(bins.end),
|
|
250964
|
+
size: bins.size
|
|
250965
|
+
};
|
|
250966
|
+
}
|
|
250967
|
+
|
|
250968
|
+
function getRanges(edges, uniqueVals, gapLow, gapHigh, ax, calendar) {
|
|
250969
|
+
var i;
|
|
250970
|
+
var len = edges.length - 1;
|
|
250971
|
+
var out = new Array(len);
|
|
250972
|
+
var roundFn = getBinSpanLabelRound(gapLow, gapHigh, edges, ax, calendar);
|
|
250973
|
+
|
|
250974
|
+
for(i = 0; i < len; i++) {
|
|
250975
|
+
var v = (uniqueVals || [])[i];
|
|
250976
|
+
out[i] = v === undefined ?
|
|
250977
|
+
[roundFn(edges[i]), roundFn(edges[i + 1], true)] :
|
|
250978
|
+
[v, v];
|
|
250979
|
+
}
|
|
250980
|
+
return out;
|
|
250981
|
+
}
|
|
250982
|
+
|
|
250983
|
+
|
|
250984
|
+
/***/ }),
|
|
250985
|
+
|
|
250986
|
+
/***/ 15611:
|
|
250987
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
250988
|
+
|
|
250989
|
+
|
|
250990
|
+
|
|
250991
|
+
var Lib = __webpack_require__(30991);
|
|
250992
|
+
|
|
250993
|
+
var handleSampleDefaults = __webpack_require__(6236);
|
|
250994
|
+
var handleStyleDefaults = __webpack_require__(25157);
|
|
250995
|
+
var colorscaleDefaults = __webpack_require__(13682);
|
|
250996
|
+
var handleHeatmapLabelDefaults = __webpack_require__(52340);
|
|
250997
|
+
var attributes = __webpack_require__(42124);
|
|
250998
|
+
|
|
250999
|
+
|
|
251000
|
+
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
251001
|
+
function coerce(attr, dflt) {
|
|
251002
|
+
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
|
|
251003
|
+
}
|
|
251004
|
+
|
|
251005
|
+
handleSampleDefaults(traceIn, traceOut, coerce, layout);
|
|
251006
|
+
if(traceOut.visible === false) return;
|
|
251007
|
+
|
|
251008
|
+
handleStyleDefaults(traceIn, traceOut, coerce, layout);
|
|
251009
|
+
colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'z'});
|
|
251010
|
+
coerce('hovertemplate');
|
|
251011
|
+
|
|
251012
|
+
handleHeatmapLabelDefaults(coerce, layout);
|
|
251013
|
+
|
|
251014
|
+
coerce('xhoverformat');
|
|
251015
|
+
coerce('yhoverformat');
|
|
251016
|
+
};
|
|
251017
|
+
|
|
251018
|
+
|
|
251019
|
+
/***/ }),
|
|
251020
|
+
|
|
251021
|
+
/***/ 94587:
|
|
251022
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251023
|
+
|
|
251024
|
+
|
|
251025
|
+
|
|
251026
|
+
var heatmapHover = __webpack_require__(85243);
|
|
251027
|
+
var hoverLabelText = (__webpack_require__(15076).hoverLabelText);
|
|
251028
|
+
|
|
251029
|
+
module.exports = function hoverPoints(pointData, xval, yval, hovermode, opts) {
|
|
251030
|
+
var pts = heatmapHover(pointData, xval, yval, hovermode, opts);
|
|
251031
|
+
|
|
251032
|
+
if(!pts) return;
|
|
251033
|
+
|
|
251034
|
+
pointData = pts[0];
|
|
251035
|
+
var indices = pointData.index;
|
|
251036
|
+
var ny = indices[0];
|
|
251037
|
+
var nx = indices[1];
|
|
251038
|
+
var cd0 = pointData.cd[0];
|
|
251039
|
+
var trace = cd0.trace;
|
|
251040
|
+
var xRange = cd0.xRanges[nx];
|
|
251041
|
+
var yRange = cd0.yRanges[ny];
|
|
251042
|
+
|
|
251043
|
+
pointData.xLabel = hoverLabelText(pointData.xa, [xRange[0], xRange[1]], trace.xhoverformat);
|
|
251044
|
+
pointData.yLabel = hoverLabelText(pointData.ya, [yRange[0], yRange[1]], trace.yhoverformat);
|
|
251045
|
+
|
|
251046
|
+
return pts;
|
|
251047
|
+
};
|
|
251048
|
+
|
|
251049
|
+
|
|
251050
|
+
/***/ }),
|
|
251051
|
+
|
|
251052
|
+
/***/ 3617:
|
|
251053
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251054
|
+
|
|
251055
|
+
|
|
251056
|
+
|
|
251057
|
+
module.exports = {
|
|
251058
|
+
attributes: __webpack_require__(42124),
|
|
251059
|
+
supplyDefaults: __webpack_require__(15611),
|
|
251060
|
+
crossTraceDefaults: __webpack_require__(34294),
|
|
251061
|
+
calc: __webpack_require__(91980),
|
|
251062
|
+
plot: __webpack_require__(29406),
|
|
251063
|
+
layerName: 'heatmaplayer',
|
|
251064
|
+
colorbar: __webpack_require__(90165),
|
|
251065
|
+
style: __webpack_require__(58756),
|
|
251066
|
+
hoverPoints: __webpack_require__(94587),
|
|
251067
|
+
eventData: __webpack_require__(63870),
|
|
251068
|
+
|
|
251069
|
+
moduleType: 'trace',
|
|
251070
|
+
name: 'histogram2d',
|
|
251071
|
+
basePlotModule: __webpack_require__(47885),
|
|
251072
|
+
categories: ['cartesian', 'svg', '2dMap', 'histogram', 'showLegend'],
|
|
251073
|
+
meta: {
|
|
251074
|
+
hrName: 'histogram_2d',
|
|
251075
|
+
description: [
|
|
251076
|
+
'The sample data from which statistics are computed is set in `x`',
|
|
251077
|
+
'and `y` (where `x` and `y` represent marginal distributions,',
|
|
251078
|
+
'binning is set in `xbins` and `ybins` in this case)',
|
|
251079
|
+
'or `z` (where `z` represent the 2D distribution and binning set,',
|
|
251080
|
+
'binning is set by `x` and `y` in this case).',
|
|
251081
|
+
'The resulting distribution is visualized as a heatmap.'
|
|
251082
|
+
].join(' ')
|
|
251083
|
+
}
|
|
251084
|
+
};
|
|
251085
|
+
|
|
251086
|
+
|
|
251087
|
+
/***/ }),
|
|
251088
|
+
|
|
251089
|
+
/***/ 6236:
|
|
251090
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251091
|
+
|
|
251092
|
+
|
|
251093
|
+
|
|
251094
|
+
var Registry = __webpack_require__(13936);
|
|
251095
|
+
var Lib = __webpack_require__(30991);
|
|
251096
|
+
|
|
251097
|
+
module.exports = function handleSampleDefaults(traceIn, traceOut, coerce, layout) {
|
|
251098
|
+
var x = coerce('x');
|
|
251099
|
+
var y = coerce('y');
|
|
251100
|
+
var xlen = Lib.minRowLength(x);
|
|
251101
|
+
var ylen = Lib.minRowLength(y);
|
|
251102
|
+
|
|
251103
|
+
// we could try to accept x0 and dx, etc...
|
|
251104
|
+
// but that's a pretty weird use case.
|
|
251105
|
+
// for now require both x and y explicitly specified.
|
|
251106
|
+
if(!xlen || !ylen) {
|
|
251107
|
+
traceOut.visible = false;
|
|
251108
|
+
return;
|
|
251109
|
+
}
|
|
251110
|
+
|
|
251111
|
+
traceOut._length = Math.min(xlen, ylen);
|
|
251112
|
+
|
|
251113
|
+
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
|
|
251114
|
+
handleCalendarDefaults(traceIn, traceOut, ['x', 'y'], layout);
|
|
251115
|
+
|
|
251116
|
+
// if marker.color is an array, we can use it in aggregation instead of z
|
|
251117
|
+
var hasAggregationData = coerce('z') || coerce('marker.color');
|
|
251118
|
+
|
|
251119
|
+
if(hasAggregationData) coerce('histfunc');
|
|
251120
|
+
coerce('histnorm');
|
|
251121
|
+
|
|
251122
|
+
// Note: bin defaults are now handled in Histogram2D.crossTraceDefaults
|
|
251123
|
+
// autobin(x|y) are only included here to appease Plotly.validate
|
|
251124
|
+
coerce('autobinx');
|
|
251125
|
+
coerce('autobiny');
|
|
251126
|
+
};
|
|
251127
|
+
|
|
251128
|
+
|
|
251129
|
+
/***/ }),
|
|
251130
|
+
|
|
251131
|
+
/***/ 34872:
|
|
251132
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251133
|
+
|
|
251134
|
+
|
|
251135
|
+
|
|
251136
|
+
var histogram2dAttrs = __webpack_require__(42124);
|
|
251137
|
+
var contourAttrs = __webpack_require__(70318);
|
|
251138
|
+
var colorScaleAttrs = __webpack_require__(17957);
|
|
251139
|
+
var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
|
|
251140
|
+
|
|
251141
|
+
var extendFlat = (__webpack_require__(91307).extendFlat);
|
|
251142
|
+
|
|
251143
|
+
module.exports = extendFlat({
|
|
251144
|
+
x: histogram2dAttrs.x,
|
|
251145
|
+
y: histogram2dAttrs.y,
|
|
251146
|
+
z: histogram2dAttrs.z,
|
|
251147
|
+
marker: histogram2dAttrs.marker,
|
|
251148
|
+
|
|
251149
|
+
histnorm: histogram2dAttrs.histnorm,
|
|
251150
|
+
histfunc: histogram2dAttrs.histfunc,
|
|
251151
|
+
nbinsx: histogram2dAttrs.nbinsx,
|
|
251152
|
+
xbins: histogram2dAttrs.xbins,
|
|
251153
|
+
nbinsy: histogram2dAttrs.nbinsy,
|
|
251154
|
+
ybins: histogram2dAttrs.ybins,
|
|
251155
|
+
autobinx: histogram2dAttrs.autobinx,
|
|
251156
|
+
autobiny: histogram2dAttrs.autobiny,
|
|
251157
|
+
|
|
251158
|
+
bingroup: histogram2dAttrs.bingroup,
|
|
251159
|
+
xbingroup: histogram2dAttrs.xbingroup,
|
|
251160
|
+
ybingroup: histogram2dAttrs.ybingroup,
|
|
251161
|
+
|
|
251162
|
+
autocontour: contourAttrs.autocontour,
|
|
251163
|
+
ncontours: contourAttrs.ncontours,
|
|
251164
|
+
contours: contourAttrs.contours,
|
|
251165
|
+
line: {
|
|
251166
|
+
color: contourAttrs.line.color,
|
|
251167
|
+
width: extendFlat({}, contourAttrs.line.width, {
|
|
251168
|
+
dflt: 0.5,
|
|
251169
|
+
description: 'Sets the contour line width in (in px)'
|
|
251170
|
+
}),
|
|
251171
|
+
dash: contourAttrs.line.dash,
|
|
251172
|
+
smoothing: contourAttrs.line.smoothing,
|
|
251173
|
+
editType: 'plot'
|
|
251174
|
+
},
|
|
251175
|
+
xhoverformat: axisHoverFormat('x'),
|
|
251176
|
+
yhoverformat: axisHoverFormat('y'),
|
|
251177
|
+
zhoverformat: axisHoverFormat('z', 1),
|
|
251178
|
+
hovertemplate: histogram2dAttrs.hovertemplate,
|
|
251179
|
+
texttemplate: contourAttrs.texttemplate,
|
|
251180
|
+
textfont: contourAttrs.textfont
|
|
251181
|
+
},
|
|
251182
|
+
colorScaleAttrs('', {
|
|
251183
|
+
cLetter: 'z',
|
|
251184
|
+
editTypeOverride: 'calc'
|
|
251185
|
+
})
|
|
251186
|
+
);
|
|
251187
|
+
|
|
251188
|
+
|
|
251189
|
+
/***/ }),
|
|
251190
|
+
|
|
251191
|
+
/***/ 14319:
|
|
251192
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251193
|
+
|
|
251194
|
+
|
|
251195
|
+
|
|
251196
|
+
var Lib = __webpack_require__(30991);
|
|
251197
|
+
|
|
251198
|
+
var handleSampleDefaults = __webpack_require__(6236);
|
|
251199
|
+
var handleContoursDefaults = __webpack_require__(657);
|
|
251200
|
+
var handleStyleDefaults = __webpack_require__(74619);
|
|
251201
|
+
var handleHeatmapLabelDefaults = __webpack_require__(52340);
|
|
251202
|
+
var attributes = __webpack_require__(34872);
|
|
251203
|
+
|
|
251204
|
+
|
|
251205
|
+
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
251206
|
+
function coerce(attr, dflt) {
|
|
251207
|
+
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
|
|
251208
|
+
}
|
|
251209
|
+
|
|
251210
|
+
function coerce2(attr) {
|
|
251211
|
+
return Lib.coerce2(traceIn, traceOut, attributes, attr);
|
|
251212
|
+
}
|
|
251213
|
+
|
|
251214
|
+
handleSampleDefaults(traceIn, traceOut, coerce, layout);
|
|
251215
|
+
if(traceOut.visible === false) return;
|
|
251216
|
+
|
|
251217
|
+
handleContoursDefaults(traceIn, traceOut, coerce, coerce2);
|
|
251218
|
+
handleStyleDefaults(traceIn, traceOut, coerce, layout);
|
|
251219
|
+
coerce('xhoverformat');
|
|
251220
|
+
coerce('yhoverformat');
|
|
251221
|
+
coerce('hovertemplate');
|
|
251222
|
+
if(
|
|
251223
|
+
traceOut.contours &&
|
|
251224
|
+
traceOut.contours.coloring === 'heatmap'
|
|
251225
|
+
) {
|
|
251226
|
+
handleHeatmapLabelDefaults(coerce, layout);
|
|
251227
|
+
}
|
|
251228
|
+
};
|
|
251229
|
+
|
|
251230
|
+
|
|
251231
|
+
/***/ }),
|
|
251232
|
+
|
|
251233
|
+
/***/ 60613:
|
|
251234
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
251235
|
+
|
|
251236
|
+
|
|
251237
|
+
|
|
251238
|
+
module.exports = {
|
|
251239
|
+
attributes: __webpack_require__(34872),
|
|
251240
|
+
supplyDefaults: __webpack_require__(14319),
|
|
251241
|
+
crossTraceDefaults: __webpack_require__(34294),
|
|
251242
|
+
calc: __webpack_require__(3274),
|
|
251243
|
+
plot: (__webpack_require__(32664).plot),
|
|
251244
|
+
layerName: 'contourlayer',
|
|
251245
|
+
style: __webpack_require__(72690),
|
|
251246
|
+
colorbar: __webpack_require__(70307),
|
|
251247
|
+
hoverPoints: __webpack_require__(52353),
|
|
251248
|
+
|
|
251249
|
+
moduleType: 'trace',
|
|
251250
|
+
name: 'histogram2dcontour',
|
|
251251
|
+
basePlotModule: __webpack_require__(47885),
|
|
251252
|
+
categories: ['cartesian', 'svg', '2dMap', 'contour', 'histogram', 'showLegend'],
|
|
251253
|
+
meta: {
|
|
251254
|
+
hrName: 'histogram_2d_contour',
|
|
251255
|
+
description: [
|
|
251256
|
+
'The sample data from which statistics are computed is set in `x`',
|
|
251257
|
+
'and `y` (where `x` and `y` represent marginal distributions,',
|
|
251258
|
+
'binning is set in `xbins` and `ybins` in this case)',
|
|
251259
|
+
'or `z` (where `z` represent the 2D distribution and binning set,',
|
|
251260
|
+
'binning is set by `x` and `y` in this case).',
|
|
251261
|
+
'The resulting distribution is visualized as a contour plot.'
|
|
251262
|
+
].join(' ')
|
|
251263
|
+
}
|
|
251264
|
+
};
|
|
251265
|
+
|
|
251266
|
+
|
|
251267
251267
|
/***/ }),
|
|
251268
251268
|
|
|
251269
251269
|
/***/ 48223:
|
|
@@ -267453,993 +267453,6 @@ module.exports = function selectPoints(searchInfo, selectionTester) {
|
|
|
267453
267453
|
};
|
|
267454
267454
|
|
|
267455
267455
|
|
|
267456
|
-
/***/ }),
|
|
267457
|
-
|
|
267458
|
-
/***/ 1015:
|
|
267459
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
267460
|
-
|
|
267461
|
-
|
|
267462
|
-
|
|
267463
|
-
var scatterAttrs = __webpack_require__(86854);
|
|
267464
|
-
var fontAttrs = __webpack_require__(70827);
|
|
267465
|
-
var colorAttributes = __webpack_require__(17957);
|
|
267466
|
-
var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
|
|
267467
|
-
var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
|
|
267468
|
-
var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
|
|
267469
|
-
var baseAttrs = __webpack_require__(35667);
|
|
267470
|
-
var DASHES = __webpack_require__(68828);
|
|
267471
|
-
|
|
267472
|
-
var MARKER_SYMBOLS = __webpack_require__(98993);
|
|
267473
|
-
var extendFlat = (__webpack_require__(91307).extendFlat);
|
|
267474
|
-
var overrideAll = (__webpack_require__(70756).overrideAll);
|
|
267475
|
-
var sortObjectKeys = __webpack_require__(99124);
|
|
267476
|
-
|
|
267477
|
-
var scatterLineAttrs = scatterAttrs.line;
|
|
267478
|
-
var scatterMarkerAttrs = scatterAttrs.marker;
|
|
267479
|
-
var scatterMarkerLineAttrs = scatterMarkerAttrs.line;
|
|
267480
|
-
|
|
267481
|
-
var lineAttrs = extendFlat({
|
|
267482
|
-
width: scatterLineAttrs.width,
|
|
267483
|
-
dash: {
|
|
267484
|
-
valType: 'enumerated',
|
|
267485
|
-
values: sortObjectKeys(DASHES),
|
|
267486
|
-
dflt: 'solid',
|
|
267487
|
-
description: 'Sets the dash style of the lines.'
|
|
267488
|
-
}
|
|
267489
|
-
}, colorAttributes('line'));
|
|
267490
|
-
|
|
267491
|
-
function makeProjectionAttr(axLetter) {
|
|
267492
|
-
return {
|
|
267493
|
-
show: {
|
|
267494
|
-
valType: 'boolean',
|
|
267495
|
-
dflt: false,
|
|
267496
|
-
description: [
|
|
267497
|
-
'Sets whether or not projections are shown along the',
|
|
267498
|
-
axLetter, 'axis.'
|
|
267499
|
-
].join(' ')
|
|
267500
|
-
},
|
|
267501
|
-
opacity: {
|
|
267502
|
-
valType: 'number',
|
|
267503
|
-
min: 0,
|
|
267504
|
-
max: 1,
|
|
267505
|
-
dflt: 1,
|
|
267506
|
-
description: 'Sets the projection color.'
|
|
267507
|
-
},
|
|
267508
|
-
scale: {
|
|
267509
|
-
valType: 'number',
|
|
267510
|
-
min: 0,
|
|
267511
|
-
max: 10,
|
|
267512
|
-
dflt: 2 / 3,
|
|
267513
|
-
description: [
|
|
267514
|
-
'Sets the scale factor determining the size of the',
|
|
267515
|
-
'projection marker points.'
|
|
267516
|
-
].join(' ')
|
|
267517
|
-
}
|
|
267518
|
-
};
|
|
267519
|
-
}
|
|
267520
|
-
|
|
267521
|
-
var attrs = module.exports = overrideAll({
|
|
267522
|
-
x: scatterAttrs.x,
|
|
267523
|
-
y: scatterAttrs.y,
|
|
267524
|
-
z: {
|
|
267525
|
-
valType: 'data_array',
|
|
267526
|
-
description: 'Sets the z coordinates.'
|
|
267527
|
-
},
|
|
267528
|
-
|
|
267529
|
-
text: extendFlat({}, scatterAttrs.text, {
|
|
267530
|
-
description: [
|
|
267531
|
-
'Sets text elements associated with each (x,y,z) triplet.',
|
|
267532
|
-
'If a single string, the same string appears over',
|
|
267533
|
-
'all the data points.',
|
|
267534
|
-
'If an array of string, the items are mapped in order to the',
|
|
267535
|
-
'this trace\'s (x,y,z) coordinates.',
|
|
267536
|
-
'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,',
|
|
267537
|
-
'these elements will be seen in the hover labels.'
|
|
267538
|
-
].join(' ')
|
|
267539
|
-
}),
|
|
267540
|
-
texttemplate: texttemplateAttrs({}, {
|
|
267541
|
-
|
|
267542
|
-
}),
|
|
267543
|
-
hovertext: extendFlat({}, scatterAttrs.hovertext, {
|
|
267544
|
-
description: [
|
|
267545
|
-
'Sets text elements associated with each (x,y,z) triplet.',
|
|
267546
|
-
'If a single string, the same string appears over',
|
|
267547
|
-
'all the data points.',
|
|
267548
|
-
'If an array of string, the items are mapped in order to the',
|
|
267549
|
-
'this trace\'s (x,y,z) coordinates.',
|
|
267550
|
-
'To be seen, trace `hoverinfo` must contain a *text* flag.'
|
|
267551
|
-
].join(' ')
|
|
267552
|
-
}),
|
|
267553
|
-
hovertemplate: hovertemplateAttrs(),
|
|
267554
|
-
|
|
267555
|
-
xhoverformat: axisHoverFormat('x'),
|
|
267556
|
-
yhoverformat: axisHoverFormat('y'),
|
|
267557
|
-
zhoverformat: axisHoverFormat('z'),
|
|
267558
|
-
|
|
267559
|
-
mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D?
|
|
267560
|
-
{dflt: 'lines+markers'}),
|
|
267561
|
-
surfaceaxis: {
|
|
267562
|
-
valType: 'enumerated',
|
|
267563
|
-
values: [-1, 0, 1, 2],
|
|
267564
|
-
dflt: -1,
|
|
267565
|
-
description: [
|
|
267566
|
-
'If *-1*, the scatter points are not fill with a surface',
|
|
267567
|
-
'If *0*, *1*, *2*, the scatter points are filled with',
|
|
267568
|
-
'a Delaunay surface about the x, y, z respectively.'
|
|
267569
|
-
].join(' ')
|
|
267570
|
-
},
|
|
267571
|
-
surfacecolor: {
|
|
267572
|
-
valType: 'color',
|
|
267573
|
-
description: 'Sets the surface fill color.'
|
|
267574
|
-
},
|
|
267575
|
-
projection: {
|
|
267576
|
-
x: makeProjectionAttr('x'),
|
|
267577
|
-
y: makeProjectionAttr('y'),
|
|
267578
|
-
z: makeProjectionAttr('z')
|
|
267579
|
-
},
|
|
267580
|
-
|
|
267581
|
-
connectgaps: scatterAttrs.connectgaps,
|
|
267582
|
-
line: lineAttrs,
|
|
267583
|
-
|
|
267584
|
-
marker: extendFlat({ // Parity with scatter.js?
|
|
267585
|
-
symbol: {
|
|
267586
|
-
valType: 'enumerated',
|
|
267587
|
-
values: sortObjectKeys(MARKER_SYMBOLS),
|
|
267588
|
-
dflt: 'circle',
|
|
267589
|
-
arrayOk: true,
|
|
267590
|
-
description: 'Sets the marker symbol type.'
|
|
267591
|
-
},
|
|
267592
|
-
size: extendFlat({}, scatterMarkerAttrs.size, {dflt: 8}),
|
|
267593
|
-
sizeref: scatterMarkerAttrs.sizeref,
|
|
267594
|
-
sizemin: scatterMarkerAttrs.sizemin,
|
|
267595
|
-
sizemode: scatterMarkerAttrs.sizemode,
|
|
267596
|
-
opacity: extendFlat({}, scatterMarkerAttrs.opacity, {
|
|
267597
|
-
arrayOk: false,
|
|
267598
|
-
description: [
|
|
267599
|
-
'Sets the marker opacity.',
|
|
267600
|
-
'Note that the marker opacity for scatter3d traces',
|
|
267601
|
-
'must be a scalar value for performance reasons.',
|
|
267602
|
-
'To set a blending opacity value',
|
|
267603
|
-
'(i.e. which is not transparent), set *marker.color*',
|
|
267604
|
-
'to an rgba color and use its alpha channel.'
|
|
267605
|
-
].join(' ')
|
|
267606
|
-
}),
|
|
267607
|
-
colorbar: scatterMarkerAttrs.colorbar,
|
|
267608
|
-
|
|
267609
|
-
line: extendFlat({
|
|
267610
|
-
width: extendFlat({}, scatterMarkerLineAttrs.width, {arrayOk: false})
|
|
267611
|
-
},
|
|
267612
|
-
colorAttributes('marker.line')
|
|
267613
|
-
)
|
|
267614
|
-
},
|
|
267615
|
-
colorAttributes('marker')
|
|
267616
|
-
),
|
|
267617
|
-
|
|
267618
|
-
textposition: extendFlat({}, scatterAttrs.textposition, {dflt: 'top center'}),
|
|
267619
|
-
textfont: fontAttrs({
|
|
267620
|
-
noFontShadow: true,
|
|
267621
|
-
noFontLineposition: true,
|
|
267622
|
-
noFontTextcase: true,
|
|
267623
|
-
editType: 'calc',
|
|
267624
|
-
colorEditType: 'style',
|
|
267625
|
-
arrayOk: true,
|
|
267626
|
-
variantValues: ['normal', 'small-caps'],
|
|
267627
|
-
description: 'Sets the text font.'
|
|
267628
|
-
}),
|
|
267629
|
-
|
|
267630
|
-
opacity: baseAttrs.opacity,
|
|
267631
|
-
|
|
267632
|
-
hoverinfo: extendFlat({}, baseAttrs.hoverinfo)
|
|
267633
|
-
}, 'calc', 'nested');
|
|
267634
|
-
|
|
267635
|
-
attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';
|
|
267636
|
-
|
|
267637
|
-
|
|
267638
|
-
/***/ }),
|
|
267639
|
-
|
|
267640
|
-
/***/ 30935:
|
|
267641
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
267642
|
-
|
|
267643
|
-
|
|
267644
|
-
|
|
267645
|
-
var arraysToCalcdata = __webpack_require__(47213);
|
|
267646
|
-
var calcColorscale = __webpack_require__(59498);
|
|
267647
|
-
|
|
267648
|
-
/**
|
|
267649
|
-
* This is a kludge to put the array attributes into
|
|
267650
|
-
* calcdata the way Scatter.plot does, so that legends and
|
|
267651
|
-
* popovers know what to do with them.
|
|
267652
|
-
*/
|
|
267653
|
-
module.exports = function calc(gd, trace) {
|
|
267654
|
-
var cd = [{x: false, y: false, trace: trace, t: {}}];
|
|
267655
|
-
|
|
267656
|
-
arraysToCalcdata(cd, trace);
|
|
267657
|
-
calcColorscale(gd, trace);
|
|
267658
|
-
|
|
267659
|
-
return cd;
|
|
267660
|
-
};
|
|
267661
|
-
|
|
267662
|
-
|
|
267663
|
-
/***/ }),
|
|
267664
|
-
|
|
267665
|
-
/***/ 77681:
|
|
267666
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
267667
|
-
|
|
267668
|
-
|
|
267669
|
-
|
|
267670
|
-
var Registry = __webpack_require__(13936);
|
|
267671
|
-
|
|
267672
|
-
function calculateAxisErrors(data, params, scaleFactor, axis) {
|
|
267673
|
-
if(!params || !params.visible) return null;
|
|
267674
|
-
|
|
267675
|
-
var computeError = Registry.getComponentMethod('errorbars', 'makeComputeError')(params);
|
|
267676
|
-
var result = new Array(data.length);
|
|
267677
|
-
|
|
267678
|
-
for(var i = 0; i < data.length; i++) {
|
|
267679
|
-
var errors = computeError(+data[i], i);
|
|
267680
|
-
|
|
267681
|
-
if(axis.type === 'log') {
|
|
267682
|
-
var point = axis.c2l(data[i]);
|
|
267683
|
-
var min = data[i] - errors[0];
|
|
267684
|
-
var max = data[i] + errors[1];
|
|
267685
|
-
|
|
267686
|
-
result[i] = [
|
|
267687
|
-
(axis.c2l(min, true) - point) * scaleFactor,
|
|
267688
|
-
(axis.c2l(max, true) - point) * scaleFactor
|
|
267689
|
-
];
|
|
267690
|
-
|
|
267691
|
-
// Keep track of the lower error bound which isn't negative!
|
|
267692
|
-
if(min > 0) {
|
|
267693
|
-
var lower = axis.c2l(min);
|
|
267694
|
-
if(!axis._lowerLogErrorBound) axis._lowerLogErrorBound = lower;
|
|
267695
|
-
axis._lowerErrorBound = Math.min(axis._lowerLogErrorBound, lower);
|
|
267696
|
-
}
|
|
267697
|
-
} else {
|
|
267698
|
-
result[i] = [
|
|
267699
|
-
-errors[0] * scaleFactor,
|
|
267700
|
-
errors[1] * scaleFactor
|
|
267701
|
-
];
|
|
267702
|
-
}
|
|
267703
|
-
}
|
|
267704
|
-
|
|
267705
|
-
return result;
|
|
267706
|
-
}
|
|
267707
|
-
|
|
267708
|
-
function dataLength(array) {
|
|
267709
|
-
for(var i = 0; i < array.length; i++) {
|
|
267710
|
-
if(array[i]) return array[i].length;
|
|
267711
|
-
}
|
|
267712
|
-
return 0;
|
|
267713
|
-
}
|
|
267714
|
-
|
|
267715
|
-
function calculateErrors(data, scaleFactor, sceneLayout) {
|
|
267716
|
-
var errors = [
|
|
267717
|
-
calculateAxisErrors(data.x, data.error_x, scaleFactor[0], sceneLayout.xaxis),
|
|
267718
|
-
calculateAxisErrors(data.y, data.error_y, scaleFactor[1], sceneLayout.yaxis),
|
|
267719
|
-
calculateAxisErrors(data.z, data.error_z, scaleFactor[2], sceneLayout.zaxis)
|
|
267720
|
-
];
|
|
267721
|
-
|
|
267722
|
-
var n = dataLength(errors);
|
|
267723
|
-
if(n === 0) return null;
|
|
267724
|
-
|
|
267725
|
-
var errorBounds = new Array(n);
|
|
267726
|
-
|
|
267727
|
-
for(var i = 0; i < n; i++) {
|
|
267728
|
-
var bound = [[0, 0, 0], [0, 0, 0]];
|
|
267729
|
-
|
|
267730
|
-
for(var j = 0; j < 3; j++) {
|
|
267731
|
-
if(errors[j]) {
|
|
267732
|
-
for(var k = 0; k < 2; k++) {
|
|
267733
|
-
bound[k][j] = errors[j][i][k];
|
|
267734
|
-
}
|
|
267735
|
-
}
|
|
267736
|
-
}
|
|
267737
|
-
|
|
267738
|
-
errorBounds[i] = bound;
|
|
267739
|
-
}
|
|
267740
|
-
|
|
267741
|
-
return errorBounds;
|
|
267742
|
-
}
|
|
267743
|
-
|
|
267744
|
-
module.exports = calculateErrors;
|
|
267745
|
-
|
|
267746
|
-
|
|
267747
|
-
/***/ }),
|
|
267748
|
-
|
|
267749
|
-
/***/ 93219:
|
|
267750
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
267751
|
-
|
|
267752
|
-
|
|
267753
|
-
|
|
267754
|
-
var createLinePlot = (__webpack_require__(46000).gl_line3d);
|
|
267755
|
-
var createScatterPlot = (__webpack_require__(46000).gl_scatter3d);
|
|
267756
|
-
var createErrorBars = (__webpack_require__(46000).gl_error3d);
|
|
267757
|
-
var createMesh = (__webpack_require__(46000).gl_mesh3d);
|
|
267758
|
-
var triangulate = (__webpack_require__(46000).delaunay_triangulate);
|
|
267759
|
-
|
|
267760
|
-
var Lib = __webpack_require__(30991);
|
|
267761
|
-
var str2RgbaArray = __webpack_require__(44960);
|
|
267762
|
-
var formatColor = (__webpack_require__(592).formatColor);
|
|
267763
|
-
var makeBubbleSizeFn = __webpack_require__(42581);
|
|
267764
|
-
var DASH_PATTERNS = __webpack_require__(68828);
|
|
267765
|
-
var MARKER_SYMBOLS = __webpack_require__(98993);
|
|
267766
|
-
|
|
267767
|
-
var Axes = __webpack_require__(15076);
|
|
267768
|
-
var appendArrayPointValue = (__webpack_require__(2918).appendArrayPointValue);
|
|
267769
|
-
|
|
267770
|
-
var calculateError = __webpack_require__(77681);
|
|
267771
|
-
|
|
267772
|
-
function LineWithMarkers(scene, uid) {
|
|
267773
|
-
this.scene = scene;
|
|
267774
|
-
this.uid = uid;
|
|
267775
|
-
this.linePlot = null;
|
|
267776
|
-
this.scatterPlot = null;
|
|
267777
|
-
this.errorBars = null;
|
|
267778
|
-
this.textMarkers = null;
|
|
267779
|
-
this.delaunayMesh = null;
|
|
267780
|
-
this.color = null;
|
|
267781
|
-
this.mode = '';
|
|
267782
|
-
this.dataPoints = [];
|
|
267783
|
-
this.axesBounds = [
|
|
267784
|
-
[-Infinity, -Infinity, -Infinity],
|
|
267785
|
-
[Infinity, Infinity, Infinity]
|
|
267786
|
-
];
|
|
267787
|
-
this.textLabels = null;
|
|
267788
|
-
this.data = null;
|
|
267789
|
-
}
|
|
267790
|
-
|
|
267791
|
-
var proto = LineWithMarkers.prototype;
|
|
267792
|
-
|
|
267793
|
-
proto.handlePick = function(selection) {
|
|
267794
|
-
if(selection.object &&
|
|
267795
|
-
(selection.object === this.linePlot ||
|
|
267796
|
-
selection.object === this.delaunayMesh ||
|
|
267797
|
-
selection.object === this.textMarkers ||
|
|
267798
|
-
selection.object === this.scatterPlot)
|
|
267799
|
-
) {
|
|
267800
|
-
var ind = selection.index = selection.data.index;
|
|
267801
|
-
|
|
267802
|
-
if(selection.object.highlight) {
|
|
267803
|
-
selection.object.highlight(null);
|
|
267804
|
-
}
|
|
267805
|
-
if(this.scatterPlot) {
|
|
267806
|
-
selection.object = this.scatterPlot;
|
|
267807
|
-
this.scatterPlot.highlight(selection.data);
|
|
267808
|
-
}
|
|
267809
|
-
|
|
267810
|
-
selection.textLabel = '';
|
|
267811
|
-
if(this.textLabels) {
|
|
267812
|
-
if(Lib.isArrayOrTypedArray(this.textLabels)) {
|
|
267813
|
-
if(this.textLabels[ind] || this.textLabels[ind] === 0) {
|
|
267814
|
-
selection.textLabel = this.textLabels[ind];
|
|
267815
|
-
}
|
|
267816
|
-
} else {
|
|
267817
|
-
selection.textLabel = this.textLabels;
|
|
267818
|
-
}
|
|
267819
|
-
}
|
|
267820
|
-
|
|
267821
|
-
selection.traceCoordinate = [
|
|
267822
|
-
this.data.x[ind],
|
|
267823
|
-
this.data.y[ind],
|
|
267824
|
-
this.data.z[ind]
|
|
267825
|
-
];
|
|
267826
|
-
|
|
267827
|
-
return true;
|
|
267828
|
-
}
|
|
267829
|
-
};
|
|
267830
|
-
|
|
267831
|
-
function constructDelaunay(points, color, axis) {
|
|
267832
|
-
var u = (axis + 1) % 3;
|
|
267833
|
-
var v = (axis + 2) % 3;
|
|
267834
|
-
var filteredPoints = [];
|
|
267835
|
-
var filteredIds = [];
|
|
267836
|
-
var i;
|
|
267837
|
-
|
|
267838
|
-
for(i = 0; i < points.length; ++i) {
|
|
267839
|
-
var p = points[i];
|
|
267840
|
-
if(isNaN(p[u]) || !isFinite(p[u]) ||
|
|
267841
|
-
isNaN(p[v]) || !isFinite(p[v])) {
|
|
267842
|
-
continue;
|
|
267843
|
-
}
|
|
267844
|
-
filteredPoints.push([p[u], p[v]]);
|
|
267845
|
-
filteredIds.push(i);
|
|
267846
|
-
}
|
|
267847
|
-
var cells = triangulate(filteredPoints);
|
|
267848
|
-
for(i = 0; i < cells.length; ++i) {
|
|
267849
|
-
var c = cells[i];
|
|
267850
|
-
for(var j = 0; j < c.length; ++j) {
|
|
267851
|
-
c[j] = filteredIds[c[j]];
|
|
267852
|
-
}
|
|
267853
|
-
}
|
|
267854
|
-
return {
|
|
267855
|
-
positions: points,
|
|
267856
|
-
cells: cells,
|
|
267857
|
-
meshColor: color
|
|
267858
|
-
};
|
|
267859
|
-
}
|
|
267860
|
-
|
|
267861
|
-
function calculateErrorParams(errors) {
|
|
267862
|
-
var capSize = [0.0, 0.0, 0.0];
|
|
267863
|
-
var color = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
|
|
267864
|
-
var lineWidth = [1.0, 1.0, 1.0];
|
|
267865
|
-
|
|
267866
|
-
for(var i = 0; i < 3; i++) {
|
|
267867
|
-
var e = errors[i];
|
|
267868
|
-
|
|
267869
|
-
if(e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2];
|
|
267870
|
-
if(!e || !e.visible) continue;
|
|
267871
|
-
|
|
267872
|
-
capSize[i] = e.width / 2; // ballpark rescaling
|
|
267873
|
-
color[i] = str2RgbaArray(e.color);
|
|
267874
|
-
lineWidth[i] = e.thickness;
|
|
267875
|
-
}
|
|
267876
|
-
|
|
267877
|
-
return {capSize: capSize, color: color, lineWidth: lineWidth};
|
|
267878
|
-
}
|
|
267879
|
-
|
|
267880
|
-
function parseAlignmentX(a) {
|
|
267881
|
-
if(a === null || a === undefined) return 0;
|
|
267882
|
-
|
|
267883
|
-
return (a.indexOf('left') > -1) ? -1 :
|
|
267884
|
-
(a.indexOf('right') > -1) ? 1 : 0;
|
|
267885
|
-
}
|
|
267886
|
-
|
|
267887
|
-
function parseAlignmentY(a) {
|
|
267888
|
-
if(a === null || a === undefined) return 0;
|
|
267889
|
-
|
|
267890
|
-
return (a.indexOf('top') > -1) ? -1 :
|
|
267891
|
-
(a.indexOf('bottom') > -1) ? 1 : 0;
|
|
267892
|
-
}
|
|
267893
|
-
|
|
267894
|
-
function calculateTextOffset(tp) {
|
|
267895
|
-
// Read out text properties
|
|
267896
|
-
|
|
267897
|
-
var defaultAlignmentX = 0;
|
|
267898
|
-
var defaultAlignmentY = 0;
|
|
267899
|
-
|
|
267900
|
-
var textOffset = [
|
|
267901
|
-
defaultAlignmentX,
|
|
267902
|
-
defaultAlignmentY
|
|
267903
|
-
];
|
|
267904
|
-
|
|
267905
|
-
if(Array.isArray(tp)) {
|
|
267906
|
-
for(var i = 0; i < tp.length; i++) {
|
|
267907
|
-
textOffset[i] = [
|
|
267908
|
-
defaultAlignmentX,
|
|
267909
|
-
defaultAlignmentY
|
|
267910
|
-
];
|
|
267911
|
-
if(tp[i]) {
|
|
267912
|
-
textOffset[i][0] = parseAlignmentX(tp[i]);
|
|
267913
|
-
textOffset[i][1] = parseAlignmentY(tp[i]);
|
|
267914
|
-
}
|
|
267915
|
-
}
|
|
267916
|
-
} else {
|
|
267917
|
-
textOffset[0] = parseAlignmentX(tp);
|
|
267918
|
-
textOffset[1] = parseAlignmentY(tp);
|
|
267919
|
-
}
|
|
267920
|
-
|
|
267921
|
-
return textOffset;
|
|
267922
|
-
}
|
|
267923
|
-
|
|
267924
|
-
|
|
267925
|
-
function calculateSize(sizeIn, sizeFn) {
|
|
267926
|
-
// rough parity with Plotly 2D markers
|
|
267927
|
-
return sizeFn(sizeIn * 4);
|
|
267928
|
-
}
|
|
267929
|
-
|
|
267930
|
-
function calculateSymbol(symbolIn) {
|
|
267931
|
-
return MARKER_SYMBOLS[symbolIn];
|
|
267932
|
-
}
|
|
267933
|
-
|
|
267934
|
-
function formatParam(paramIn, len, calculate, dflt, extraFn) {
|
|
267935
|
-
var paramOut = null;
|
|
267936
|
-
|
|
267937
|
-
if(Lib.isArrayOrTypedArray(paramIn)) {
|
|
267938
|
-
paramOut = [];
|
|
267939
|
-
|
|
267940
|
-
for(var i = 0; i < len; i++) {
|
|
267941
|
-
if(paramIn[i] === undefined) paramOut[i] = dflt;
|
|
267942
|
-
else paramOut[i] = calculate(paramIn[i], extraFn);
|
|
267943
|
-
}
|
|
267944
|
-
} else paramOut = calculate(paramIn, Lib.identity);
|
|
267945
|
-
|
|
267946
|
-
return paramOut;
|
|
267947
|
-
}
|
|
267948
|
-
|
|
267949
|
-
|
|
267950
|
-
function convertPlotlyOptions(scene, data) {
|
|
267951
|
-
var points = [];
|
|
267952
|
-
var sceneLayout = scene.fullSceneLayout;
|
|
267953
|
-
var scaleFactor = scene.dataScale;
|
|
267954
|
-
var xaxis = sceneLayout.xaxis;
|
|
267955
|
-
var yaxis = sceneLayout.yaxis;
|
|
267956
|
-
var zaxis = sceneLayout.zaxis;
|
|
267957
|
-
var marker = data.marker;
|
|
267958
|
-
var line = data.line;
|
|
267959
|
-
var x = data.x || [];
|
|
267960
|
-
var y = data.y || [];
|
|
267961
|
-
var z = data.z || [];
|
|
267962
|
-
var len = x.length;
|
|
267963
|
-
var xcalendar = data.xcalendar;
|
|
267964
|
-
var ycalendar = data.ycalendar;
|
|
267965
|
-
var zcalendar = data.zcalendar;
|
|
267966
|
-
var xc, yc, zc;
|
|
267967
|
-
var params, i;
|
|
267968
|
-
var text;
|
|
267969
|
-
|
|
267970
|
-
// Convert points
|
|
267971
|
-
for(i = 0; i < len; i++) {
|
|
267972
|
-
// sanitize numbers and apply transforms based on axes.type
|
|
267973
|
-
xc = xaxis.d2l(x[i], 0, xcalendar) * scaleFactor[0];
|
|
267974
|
-
yc = yaxis.d2l(y[i], 0, ycalendar) * scaleFactor[1];
|
|
267975
|
-
zc = zaxis.d2l(z[i], 0, zcalendar) * scaleFactor[2];
|
|
267976
|
-
|
|
267977
|
-
points[i] = [xc, yc, zc];
|
|
267978
|
-
}
|
|
267979
|
-
|
|
267980
|
-
// convert text
|
|
267981
|
-
if(Array.isArray(data.text)) {
|
|
267982
|
-
text = data.text;
|
|
267983
|
-
} else if(Lib.isTypedArray(data.text)) {
|
|
267984
|
-
text = Array.from(data.text);
|
|
267985
|
-
} else if(data.text !== undefined) {
|
|
267986
|
-
text = new Array(len);
|
|
267987
|
-
for(i = 0; i < len; i++) text[i] = data.text;
|
|
267988
|
-
}
|
|
267989
|
-
|
|
267990
|
-
function formatter(axName, val) {
|
|
267991
|
-
var ax = sceneLayout[axName];
|
|
267992
|
-
return Axes.tickText(ax, ax.d2l(val), true).text;
|
|
267993
|
-
}
|
|
267994
|
-
|
|
267995
|
-
// check texttemplate
|
|
267996
|
-
var texttemplate = data.texttemplate;
|
|
267997
|
-
if(texttemplate) {
|
|
267998
|
-
var fullLayout = scene.fullLayout;
|
|
267999
|
-
var d3locale = fullLayout._d3locale;
|
|
268000
|
-
var isArray = Array.isArray(texttemplate);
|
|
268001
|
-
var N = isArray ? Math.min(texttemplate.length, len) : len;
|
|
268002
|
-
var txt = isArray ?
|
|
268003
|
-
function(i) { return texttemplate[i]; } :
|
|
268004
|
-
function() { return texttemplate; };
|
|
268005
|
-
|
|
268006
|
-
text = new Array(N);
|
|
268007
|
-
|
|
268008
|
-
for(i = 0; i < N; i++) {
|
|
268009
|
-
var d = {x: x[i], y: y[i], z: z[i]};
|
|
268010
|
-
var labels = {
|
|
268011
|
-
xLabel: formatter('xaxis', x[i]),
|
|
268012
|
-
yLabel: formatter('yaxis', y[i]),
|
|
268013
|
-
zLabel: formatter('zaxis', z[i])
|
|
268014
|
-
};
|
|
268015
|
-
var pointValues = {};
|
|
268016
|
-
appendArrayPointValue(pointValues, data, i);
|
|
268017
|
-
var meta = data._meta || {};
|
|
268018
|
-
text[i] = Lib.texttemplateString(txt(i), labels, d3locale, pointValues, d, meta);
|
|
268019
|
-
}
|
|
268020
|
-
}
|
|
268021
|
-
|
|
268022
|
-
// Build object parameters
|
|
268023
|
-
params = {
|
|
268024
|
-
position: points,
|
|
268025
|
-
mode: data.mode,
|
|
268026
|
-
text: text
|
|
268027
|
-
};
|
|
268028
|
-
|
|
268029
|
-
if('line' in data) {
|
|
268030
|
-
params.lineColor = formatColor(line, 1, len);
|
|
268031
|
-
params.lineWidth = line.width;
|
|
268032
|
-
params.lineDashes = line.dash;
|
|
268033
|
-
}
|
|
268034
|
-
|
|
268035
|
-
if('marker' in data) {
|
|
268036
|
-
var sizeFn = makeBubbleSizeFn(data);
|
|
268037
|
-
|
|
268038
|
-
params.scatterColor = formatColor(marker, 1, len);
|
|
268039
|
-
params.scatterSize = formatParam(marker.size, len, calculateSize, 20, sizeFn);
|
|
268040
|
-
params.scatterMarker = formatParam(marker.symbol, len, calculateSymbol, '●');
|
|
268041
|
-
params.scatterLineWidth = marker.line.width; // arrayOk === false
|
|
268042
|
-
params.scatterLineColor = formatColor(marker.line, 1, len);
|
|
268043
|
-
params.scatterAngle = 0;
|
|
268044
|
-
}
|
|
268045
|
-
|
|
268046
|
-
if('textposition' in data) {
|
|
268047
|
-
params.textOffset = calculateTextOffset(data.textposition);
|
|
268048
|
-
params.textColor = formatColor(data.textfont, 1, len);
|
|
268049
|
-
params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12);
|
|
268050
|
-
params.textFontFamily = data.textfont.family;
|
|
268051
|
-
params.textFontWeight = data.textfont.weight;
|
|
268052
|
-
params.textFontStyle = data.textfont.style;
|
|
268053
|
-
params.textFontVariant = data.textfont.variant;
|
|
268054
|
-
params.textAngle = 0;
|
|
268055
|
-
}
|
|
268056
|
-
|
|
268057
|
-
var dims = ['x', 'y', 'z'];
|
|
268058
|
-
params.project = [false, false, false];
|
|
268059
|
-
params.projectScale = [1, 1, 1];
|
|
268060
|
-
params.projectOpacity = [1, 1, 1];
|
|
268061
|
-
for(i = 0; i < 3; ++i) {
|
|
268062
|
-
var projection = data.projection[dims[i]];
|
|
268063
|
-
if((params.project[i] = projection.show)) {
|
|
268064
|
-
params.projectOpacity[i] = projection.opacity;
|
|
268065
|
-
params.projectScale[i] = projection.scale;
|
|
268066
|
-
}
|
|
268067
|
-
}
|
|
268068
|
-
|
|
268069
|
-
params.errorBounds = calculateError(data, scaleFactor, sceneLayout);
|
|
268070
|
-
|
|
268071
|
-
var errorParams = calculateErrorParams([data.error_x, data.error_y, data.error_z]);
|
|
268072
|
-
params.errorColor = errorParams.color;
|
|
268073
|
-
params.errorLineWidth = errorParams.lineWidth;
|
|
268074
|
-
params.errorCapSize = errorParams.capSize;
|
|
268075
|
-
|
|
268076
|
-
params.delaunayAxis = data.surfaceaxis;
|
|
268077
|
-
params.delaunayColor = str2RgbaArray(data.surfacecolor);
|
|
268078
|
-
|
|
268079
|
-
return params;
|
|
268080
|
-
}
|
|
268081
|
-
|
|
268082
|
-
function _arrayToColor(color) {
|
|
268083
|
-
if(Lib.isArrayOrTypedArray(color)) {
|
|
268084
|
-
var c = color[0];
|
|
268085
|
-
|
|
268086
|
-
if(Lib.isArrayOrTypedArray(c)) color = c;
|
|
268087
|
-
|
|
268088
|
-
return 'rgb(' + color.slice(0, 3).map(function(x) {
|
|
268089
|
-
return Math.round(x * 255);
|
|
268090
|
-
}) + ')';
|
|
268091
|
-
}
|
|
268092
|
-
|
|
268093
|
-
return null;
|
|
268094
|
-
}
|
|
268095
|
-
|
|
268096
|
-
function arrayToColor(colors) {
|
|
268097
|
-
if(!Lib.isArrayOrTypedArray(colors)) {
|
|
268098
|
-
return null;
|
|
268099
|
-
}
|
|
268100
|
-
|
|
268101
|
-
if((colors.length === 4) && (typeof colors[0] === 'number')) {
|
|
268102
|
-
return _arrayToColor(colors);
|
|
268103
|
-
}
|
|
268104
|
-
|
|
268105
|
-
return colors.map(_arrayToColor);
|
|
268106
|
-
}
|
|
268107
|
-
|
|
268108
|
-
proto.update = function(data) {
|
|
268109
|
-
var gl = this.scene.glplot.gl;
|
|
268110
|
-
var lineOptions;
|
|
268111
|
-
var scatterOptions;
|
|
268112
|
-
var errorOptions;
|
|
268113
|
-
var textOptions;
|
|
268114
|
-
var dashPattern = DASH_PATTERNS.solid;
|
|
268115
|
-
|
|
268116
|
-
// Save data
|
|
268117
|
-
this.data = data;
|
|
268118
|
-
|
|
268119
|
-
// Run data conversion
|
|
268120
|
-
var options = convertPlotlyOptions(this.scene, data);
|
|
268121
|
-
|
|
268122
|
-
if('mode' in options) {
|
|
268123
|
-
this.mode = options.mode;
|
|
268124
|
-
}
|
|
268125
|
-
if('lineDashes' in options) {
|
|
268126
|
-
if(options.lineDashes in DASH_PATTERNS) {
|
|
268127
|
-
dashPattern = DASH_PATTERNS[options.lineDashes];
|
|
268128
|
-
}
|
|
268129
|
-
}
|
|
268130
|
-
|
|
268131
|
-
this.color = arrayToColor(options.scatterColor) ||
|
|
268132
|
-
arrayToColor(options.lineColor);
|
|
268133
|
-
|
|
268134
|
-
// Save data points
|
|
268135
|
-
this.dataPoints = options.position;
|
|
268136
|
-
|
|
268137
|
-
lineOptions = {
|
|
268138
|
-
gl: this.scene.glplot.gl,
|
|
268139
|
-
position: options.position,
|
|
268140
|
-
color: options.lineColor,
|
|
268141
|
-
lineWidth: options.lineWidth || 1,
|
|
268142
|
-
dashes: dashPattern[0],
|
|
268143
|
-
dashScale: dashPattern[1],
|
|
268144
|
-
opacity: data.opacity,
|
|
268145
|
-
connectGaps: data.connectgaps
|
|
268146
|
-
};
|
|
268147
|
-
|
|
268148
|
-
if(this.mode.indexOf('lines') !== -1) {
|
|
268149
|
-
if(this.linePlot) this.linePlot.update(lineOptions);
|
|
268150
|
-
else {
|
|
268151
|
-
this.linePlot = createLinePlot(lineOptions);
|
|
268152
|
-
this.linePlot._trace = this;
|
|
268153
|
-
this.scene.glplot.add(this.linePlot);
|
|
268154
|
-
}
|
|
268155
|
-
} else if(this.linePlot) {
|
|
268156
|
-
this.scene.glplot.remove(this.linePlot);
|
|
268157
|
-
this.linePlot.dispose();
|
|
268158
|
-
this.linePlot = null;
|
|
268159
|
-
}
|
|
268160
|
-
|
|
268161
|
-
// N.B. marker.opacity must be a scalar for performance
|
|
268162
|
-
var scatterOpacity = data.opacity;
|
|
268163
|
-
if(data.marker && data.marker.opacity !== undefined) scatterOpacity *= data.marker.opacity;
|
|
268164
|
-
|
|
268165
|
-
scatterOptions = {
|
|
268166
|
-
gl: this.scene.glplot.gl,
|
|
268167
|
-
position: options.position,
|
|
268168
|
-
color: options.scatterColor,
|
|
268169
|
-
size: options.scatterSize,
|
|
268170
|
-
glyph: options.scatterMarker,
|
|
268171
|
-
opacity: scatterOpacity,
|
|
268172
|
-
orthographic: true,
|
|
268173
|
-
lineWidth: options.scatterLineWidth,
|
|
268174
|
-
lineColor: options.scatterLineColor,
|
|
268175
|
-
project: options.project,
|
|
268176
|
-
projectScale: options.projectScale,
|
|
268177
|
-
projectOpacity: options.projectOpacity
|
|
268178
|
-
};
|
|
268179
|
-
|
|
268180
|
-
if(this.mode.indexOf('markers') !== -1) {
|
|
268181
|
-
if(this.scatterPlot) this.scatterPlot.update(scatterOptions);
|
|
268182
|
-
else {
|
|
268183
|
-
this.scatterPlot = createScatterPlot(scatterOptions);
|
|
268184
|
-
this.scatterPlot._trace = this;
|
|
268185
|
-
this.scatterPlot.highlightScale = 1;
|
|
268186
|
-
this.scene.glplot.add(this.scatterPlot);
|
|
268187
|
-
}
|
|
268188
|
-
} else if(this.scatterPlot) {
|
|
268189
|
-
this.scene.glplot.remove(this.scatterPlot);
|
|
268190
|
-
this.scatterPlot.dispose();
|
|
268191
|
-
this.scatterPlot = null;
|
|
268192
|
-
}
|
|
268193
|
-
|
|
268194
|
-
textOptions = {
|
|
268195
|
-
gl: this.scene.glplot.gl,
|
|
268196
|
-
position: options.position,
|
|
268197
|
-
glyph: options.text,
|
|
268198
|
-
color: options.textColor,
|
|
268199
|
-
size: options.textSize,
|
|
268200
|
-
angle: options.textAngle,
|
|
268201
|
-
alignment: options.textOffset,
|
|
268202
|
-
font: options.textFontFamily,
|
|
268203
|
-
fontWeight: options.textFontWeight,
|
|
268204
|
-
fontStyle: options.textFontStyle,
|
|
268205
|
-
fontVariant: options.textFontVariant,
|
|
268206
|
-
orthographic: true,
|
|
268207
|
-
lineWidth: 0,
|
|
268208
|
-
project: false,
|
|
268209
|
-
opacity: data.opacity
|
|
268210
|
-
};
|
|
268211
|
-
|
|
268212
|
-
this.textLabels = data.hovertext || data.text;
|
|
268213
|
-
|
|
268214
|
-
if(this.mode.indexOf('text') !== -1) {
|
|
268215
|
-
if(this.textMarkers) this.textMarkers.update(textOptions);
|
|
268216
|
-
else {
|
|
268217
|
-
this.textMarkers = createScatterPlot(textOptions);
|
|
268218
|
-
this.textMarkers._trace = this;
|
|
268219
|
-
this.textMarkers.highlightScale = 1;
|
|
268220
|
-
this.scene.glplot.add(this.textMarkers);
|
|
268221
|
-
}
|
|
268222
|
-
} else if(this.textMarkers) {
|
|
268223
|
-
this.scene.glplot.remove(this.textMarkers);
|
|
268224
|
-
this.textMarkers.dispose();
|
|
268225
|
-
this.textMarkers = null;
|
|
268226
|
-
}
|
|
268227
|
-
|
|
268228
|
-
errorOptions = {
|
|
268229
|
-
gl: this.scene.glplot.gl,
|
|
268230
|
-
position: options.position,
|
|
268231
|
-
color: options.errorColor,
|
|
268232
|
-
error: options.errorBounds,
|
|
268233
|
-
lineWidth: options.errorLineWidth,
|
|
268234
|
-
capSize: options.errorCapSize,
|
|
268235
|
-
opacity: data.opacity
|
|
268236
|
-
};
|
|
268237
|
-
if(this.errorBars) {
|
|
268238
|
-
if(options.errorBounds) {
|
|
268239
|
-
this.errorBars.update(errorOptions);
|
|
268240
|
-
} else {
|
|
268241
|
-
this.scene.glplot.remove(this.errorBars);
|
|
268242
|
-
this.errorBars.dispose();
|
|
268243
|
-
this.errorBars = null;
|
|
268244
|
-
}
|
|
268245
|
-
} else if(options.errorBounds) {
|
|
268246
|
-
this.errorBars = createErrorBars(errorOptions);
|
|
268247
|
-
this.errorBars._trace = this;
|
|
268248
|
-
this.scene.glplot.add(this.errorBars);
|
|
268249
|
-
}
|
|
268250
|
-
|
|
268251
|
-
if(options.delaunayAxis >= 0) {
|
|
268252
|
-
var delaunayOptions = constructDelaunay(
|
|
268253
|
-
options.position,
|
|
268254
|
-
options.delaunayColor,
|
|
268255
|
-
options.delaunayAxis
|
|
268256
|
-
);
|
|
268257
|
-
delaunayOptions.opacity = data.opacity;
|
|
268258
|
-
|
|
268259
|
-
if(this.delaunayMesh) {
|
|
268260
|
-
this.delaunayMesh.update(delaunayOptions);
|
|
268261
|
-
} else {
|
|
268262
|
-
delaunayOptions.gl = gl;
|
|
268263
|
-
this.delaunayMesh = createMesh(delaunayOptions);
|
|
268264
|
-
this.delaunayMesh._trace = this;
|
|
268265
|
-
this.scene.glplot.add(this.delaunayMesh);
|
|
268266
|
-
}
|
|
268267
|
-
} else if(this.delaunayMesh) {
|
|
268268
|
-
this.scene.glplot.remove(this.delaunayMesh);
|
|
268269
|
-
this.delaunayMesh.dispose();
|
|
268270
|
-
this.delaunayMesh = null;
|
|
268271
|
-
}
|
|
268272
|
-
};
|
|
268273
|
-
|
|
268274
|
-
proto.dispose = function() {
|
|
268275
|
-
if(this.linePlot) {
|
|
268276
|
-
this.scene.glplot.remove(this.linePlot);
|
|
268277
|
-
this.linePlot.dispose();
|
|
268278
|
-
}
|
|
268279
|
-
if(this.scatterPlot) {
|
|
268280
|
-
this.scene.glplot.remove(this.scatterPlot);
|
|
268281
|
-
this.scatterPlot.dispose();
|
|
268282
|
-
}
|
|
268283
|
-
if(this.errorBars) {
|
|
268284
|
-
this.scene.glplot.remove(this.errorBars);
|
|
268285
|
-
this.errorBars.dispose();
|
|
268286
|
-
}
|
|
268287
|
-
if(this.textMarkers) {
|
|
268288
|
-
this.scene.glplot.remove(this.textMarkers);
|
|
268289
|
-
this.textMarkers.dispose();
|
|
268290
|
-
}
|
|
268291
|
-
if(this.delaunayMesh) {
|
|
268292
|
-
this.scene.glplot.remove(this.delaunayMesh);
|
|
268293
|
-
this.delaunayMesh.dispose();
|
|
268294
|
-
}
|
|
268295
|
-
};
|
|
268296
|
-
|
|
268297
|
-
function createLineWithMarkers(scene, data) {
|
|
268298
|
-
var plot = new LineWithMarkers(scene, data.uid);
|
|
268299
|
-
plot.update(data);
|
|
268300
|
-
return plot;
|
|
268301
|
-
}
|
|
268302
|
-
|
|
268303
|
-
module.exports = createLineWithMarkers;
|
|
268304
|
-
|
|
268305
|
-
|
|
268306
|
-
/***/ }),
|
|
268307
|
-
|
|
268308
|
-
/***/ 13744:
|
|
268309
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
268310
|
-
|
|
268311
|
-
|
|
268312
|
-
|
|
268313
|
-
var Registry = __webpack_require__(13936);
|
|
268314
|
-
var Lib = __webpack_require__(30991);
|
|
268315
|
-
|
|
268316
|
-
var subTypes = __webpack_require__(33068);
|
|
268317
|
-
var handleMarkerDefaults = __webpack_require__(15294);
|
|
268318
|
-
var handleLineDefaults = __webpack_require__(82094);
|
|
268319
|
-
var handleTextDefaults = __webpack_require__(94729);
|
|
268320
|
-
|
|
268321
|
-
var attributes = __webpack_require__(1015);
|
|
268322
|
-
|
|
268323
|
-
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
268324
|
-
function coerce(attr, dflt) {
|
|
268325
|
-
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
|
|
268326
|
-
}
|
|
268327
|
-
|
|
268328
|
-
var len = handleXYZDefaults(traceIn, traceOut, coerce, layout);
|
|
268329
|
-
if(!len) {
|
|
268330
|
-
traceOut.visible = false;
|
|
268331
|
-
return;
|
|
268332
|
-
}
|
|
268333
|
-
|
|
268334
|
-
coerce('text');
|
|
268335
|
-
coerce('hovertext');
|
|
268336
|
-
coerce('hovertemplate');
|
|
268337
|
-
coerce('xhoverformat');
|
|
268338
|
-
coerce('yhoverformat');
|
|
268339
|
-
coerce('zhoverformat');
|
|
268340
|
-
|
|
268341
|
-
coerce('mode');
|
|
268342
|
-
|
|
268343
|
-
if(subTypes.hasMarkers(traceOut)) {
|
|
268344
|
-
handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noSelect: true, noAngle: true});
|
|
268345
|
-
}
|
|
268346
|
-
|
|
268347
|
-
if(subTypes.hasLines(traceOut)) {
|
|
268348
|
-
coerce('connectgaps');
|
|
268349
|
-
handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
|
|
268350
|
-
}
|
|
268351
|
-
|
|
268352
|
-
if(subTypes.hasText(traceOut)) {
|
|
268353
|
-
coerce('texttemplate');
|
|
268354
|
-
handleTextDefaults(traceIn, traceOut, layout, coerce, {
|
|
268355
|
-
noSelect: true,
|
|
268356
|
-
noFontShadow: true,
|
|
268357
|
-
noFontLineposition: true,
|
|
268358
|
-
noFontTextcase: true,
|
|
268359
|
-
});
|
|
268360
|
-
}
|
|
268361
|
-
|
|
268362
|
-
var lineColor = (traceOut.line || {}).color;
|
|
268363
|
-
var markerColor = (traceOut.marker || {}).color;
|
|
268364
|
-
if(coerce('surfaceaxis') >= 0) coerce('surfacecolor', lineColor || markerColor);
|
|
268365
|
-
|
|
268366
|
-
var dims = ['x', 'y', 'z'];
|
|
268367
|
-
for(var i = 0; i < 3; ++i) {
|
|
268368
|
-
var projection = 'projection.' + dims[i];
|
|
268369
|
-
if(coerce(projection + '.show')) {
|
|
268370
|
-
coerce(projection + '.opacity');
|
|
268371
|
-
coerce(projection + '.scale');
|
|
268372
|
-
}
|
|
268373
|
-
}
|
|
268374
|
-
|
|
268375
|
-
var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');
|
|
268376
|
-
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'z'});
|
|
268377
|
-
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y', inherit: 'z'});
|
|
268378
|
-
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'z'});
|
|
268379
|
-
};
|
|
268380
|
-
|
|
268381
|
-
function handleXYZDefaults(traceIn, traceOut, coerce, layout) {
|
|
268382
|
-
var len = 0;
|
|
268383
|
-
var x = coerce('x');
|
|
268384
|
-
var y = coerce('y');
|
|
268385
|
-
var z = coerce('z');
|
|
268386
|
-
|
|
268387
|
-
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
|
|
268388
|
-
handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
|
|
268389
|
-
|
|
268390
|
-
if(x && y && z) {
|
|
268391
|
-
// TODO: what happens if one is missing?
|
|
268392
|
-
len = Math.min(x.length, y.length, z.length);
|
|
268393
|
-
traceOut._length = traceOut._xlength = traceOut._ylength = traceOut._zlength = len;
|
|
268394
|
-
}
|
|
268395
|
-
|
|
268396
|
-
return len;
|
|
268397
|
-
}
|
|
268398
|
-
|
|
268399
|
-
|
|
268400
|
-
/***/ }),
|
|
268401
|
-
|
|
268402
|
-
/***/ 68860:
|
|
268403
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
268404
|
-
|
|
268405
|
-
|
|
268406
|
-
|
|
268407
|
-
module.exports = {
|
|
268408
|
-
plot: __webpack_require__(93219),
|
|
268409
|
-
attributes: __webpack_require__(1015),
|
|
268410
|
-
markerSymbols: __webpack_require__(98993),
|
|
268411
|
-
supplyDefaults: __webpack_require__(13744),
|
|
268412
|
-
colorbar: [
|
|
268413
|
-
{
|
|
268414
|
-
container: 'marker',
|
|
268415
|
-
min: 'cmin',
|
|
268416
|
-
max: 'cmax'
|
|
268417
|
-
}, {
|
|
268418
|
-
container: 'line',
|
|
268419
|
-
min: 'cmin',
|
|
268420
|
-
max: 'cmax'
|
|
268421
|
-
}
|
|
268422
|
-
],
|
|
268423
|
-
calc: __webpack_require__(30935),
|
|
268424
|
-
|
|
268425
|
-
moduleType: 'trace',
|
|
268426
|
-
name: 'scatter3d',
|
|
268427
|
-
basePlotModule: __webpack_require__(68137),
|
|
268428
|
-
categories: ['gl3d', 'symbols', 'showLegend', 'scatter-like'],
|
|
268429
|
-
meta: {
|
|
268430
|
-
hrName: 'scatter_3d',
|
|
268431
|
-
description: [
|
|
268432
|
-
'The data visualized as scatter point or lines in 3D dimension',
|
|
268433
|
-
'is set in `x`, `y`, `z`.',
|
|
268434
|
-
'Text (appearing either on the chart or on hover only) is via `text`.',
|
|
268435
|
-
'Bubble charts are achieved by setting `marker.size` and/or `marker.color`',
|
|
268436
|
-
'Projections are achieved via `projection`.',
|
|
268437
|
-
'Surface fills are achieved via `surfaceaxis`.'
|
|
268438
|
-
].join(' ')
|
|
268439
|
-
}
|
|
268440
|
-
};
|
|
268441
|
-
|
|
268442
|
-
|
|
268443
267456
|
/***/ }),
|
|
268444
267457
|
|
|
268445
267458
|
/***/ 47213:
|
|
@@ -272370,6 +271383,993 @@ module.exports = function handleXYDefaults(traceIn, traceOut, layout, coerce) {
|
|
|
272370
271383
|
};
|
|
272371
271384
|
|
|
272372
271385
|
|
|
271386
|
+
/***/ }),
|
|
271387
|
+
|
|
271388
|
+
/***/ 1015:
|
|
271389
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
271390
|
+
|
|
271391
|
+
|
|
271392
|
+
|
|
271393
|
+
var scatterAttrs = __webpack_require__(86854);
|
|
271394
|
+
var fontAttrs = __webpack_require__(70827);
|
|
271395
|
+
var colorAttributes = __webpack_require__(17957);
|
|
271396
|
+
var axisHoverFormat = (__webpack_require__(71018).axisHoverFormat);
|
|
271397
|
+
var hovertemplateAttrs = (__webpack_require__(92710)/* .hovertemplateAttrs */ .rb);
|
|
271398
|
+
var texttemplateAttrs = (__webpack_require__(92710)/* .texttemplateAttrs */ .ay);
|
|
271399
|
+
var baseAttrs = __webpack_require__(35667);
|
|
271400
|
+
var DASHES = __webpack_require__(68828);
|
|
271401
|
+
|
|
271402
|
+
var MARKER_SYMBOLS = __webpack_require__(98993);
|
|
271403
|
+
var extendFlat = (__webpack_require__(91307).extendFlat);
|
|
271404
|
+
var overrideAll = (__webpack_require__(70756).overrideAll);
|
|
271405
|
+
var sortObjectKeys = __webpack_require__(99124);
|
|
271406
|
+
|
|
271407
|
+
var scatterLineAttrs = scatterAttrs.line;
|
|
271408
|
+
var scatterMarkerAttrs = scatterAttrs.marker;
|
|
271409
|
+
var scatterMarkerLineAttrs = scatterMarkerAttrs.line;
|
|
271410
|
+
|
|
271411
|
+
var lineAttrs = extendFlat({
|
|
271412
|
+
width: scatterLineAttrs.width,
|
|
271413
|
+
dash: {
|
|
271414
|
+
valType: 'enumerated',
|
|
271415
|
+
values: sortObjectKeys(DASHES),
|
|
271416
|
+
dflt: 'solid',
|
|
271417
|
+
description: 'Sets the dash style of the lines.'
|
|
271418
|
+
}
|
|
271419
|
+
}, colorAttributes('line'));
|
|
271420
|
+
|
|
271421
|
+
function makeProjectionAttr(axLetter) {
|
|
271422
|
+
return {
|
|
271423
|
+
show: {
|
|
271424
|
+
valType: 'boolean',
|
|
271425
|
+
dflt: false,
|
|
271426
|
+
description: [
|
|
271427
|
+
'Sets whether or not projections are shown along the',
|
|
271428
|
+
axLetter, 'axis.'
|
|
271429
|
+
].join(' ')
|
|
271430
|
+
},
|
|
271431
|
+
opacity: {
|
|
271432
|
+
valType: 'number',
|
|
271433
|
+
min: 0,
|
|
271434
|
+
max: 1,
|
|
271435
|
+
dflt: 1,
|
|
271436
|
+
description: 'Sets the projection color.'
|
|
271437
|
+
},
|
|
271438
|
+
scale: {
|
|
271439
|
+
valType: 'number',
|
|
271440
|
+
min: 0,
|
|
271441
|
+
max: 10,
|
|
271442
|
+
dflt: 2 / 3,
|
|
271443
|
+
description: [
|
|
271444
|
+
'Sets the scale factor determining the size of the',
|
|
271445
|
+
'projection marker points.'
|
|
271446
|
+
].join(' ')
|
|
271447
|
+
}
|
|
271448
|
+
};
|
|
271449
|
+
}
|
|
271450
|
+
|
|
271451
|
+
var attrs = module.exports = overrideAll({
|
|
271452
|
+
x: scatterAttrs.x,
|
|
271453
|
+
y: scatterAttrs.y,
|
|
271454
|
+
z: {
|
|
271455
|
+
valType: 'data_array',
|
|
271456
|
+
description: 'Sets the z coordinates.'
|
|
271457
|
+
},
|
|
271458
|
+
|
|
271459
|
+
text: extendFlat({}, scatterAttrs.text, {
|
|
271460
|
+
description: [
|
|
271461
|
+
'Sets text elements associated with each (x,y,z) triplet.',
|
|
271462
|
+
'If a single string, the same string appears over',
|
|
271463
|
+
'all the data points.',
|
|
271464
|
+
'If an array of string, the items are mapped in order to the',
|
|
271465
|
+
'this trace\'s (x,y,z) coordinates.',
|
|
271466
|
+
'If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,',
|
|
271467
|
+
'these elements will be seen in the hover labels.'
|
|
271468
|
+
].join(' ')
|
|
271469
|
+
}),
|
|
271470
|
+
texttemplate: texttemplateAttrs({}, {
|
|
271471
|
+
|
|
271472
|
+
}),
|
|
271473
|
+
hovertext: extendFlat({}, scatterAttrs.hovertext, {
|
|
271474
|
+
description: [
|
|
271475
|
+
'Sets text elements associated with each (x,y,z) triplet.',
|
|
271476
|
+
'If a single string, the same string appears over',
|
|
271477
|
+
'all the data points.',
|
|
271478
|
+
'If an array of string, the items are mapped in order to the',
|
|
271479
|
+
'this trace\'s (x,y,z) coordinates.',
|
|
271480
|
+
'To be seen, trace `hoverinfo` must contain a *text* flag.'
|
|
271481
|
+
].join(' ')
|
|
271482
|
+
}),
|
|
271483
|
+
hovertemplate: hovertemplateAttrs(),
|
|
271484
|
+
|
|
271485
|
+
xhoverformat: axisHoverFormat('x'),
|
|
271486
|
+
yhoverformat: axisHoverFormat('y'),
|
|
271487
|
+
zhoverformat: axisHoverFormat('z'),
|
|
271488
|
+
|
|
271489
|
+
mode: extendFlat({}, scatterAttrs.mode, // shouldn't this be on-par with 2D?
|
|
271490
|
+
{dflt: 'lines+markers'}),
|
|
271491
|
+
surfaceaxis: {
|
|
271492
|
+
valType: 'enumerated',
|
|
271493
|
+
values: [-1, 0, 1, 2],
|
|
271494
|
+
dflt: -1,
|
|
271495
|
+
description: [
|
|
271496
|
+
'If *-1*, the scatter points are not fill with a surface',
|
|
271497
|
+
'If *0*, *1*, *2*, the scatter points are filled with',
|
|
271498
|
+
'a Delaunay surface about the x, y, z respectively.'
|
|
271499
|
+
].join(' ')
|
|
271500
|
+
},
|
|
271501
|
+
surfacecolor: {
|
|
271502
|
+
valType: 'color',
|
|
271503
|
+
description: 'Sets the surface fill color.'
|
|
271504
|
+
},
|
|
271505
|
+
projection: {
|
|
271506
|
+
x: makeProjectionAttr('x'),
|
|
271507
|
+
y: makeProjectionAttr('y'),
|
|
271508
|
+
z: makeProjectionAttr('z')
|
|
271509
|
+
},
|
|
271510
|
+
|
|
271511
|
+
connectgaps: scatterAttrs.connectgaps,
|
|
271512
|
+
line: lineAttrs,
|
|
271513
|
+
|
|
271514
|
+
marker: extendFlat({ // Parity with scatter.js?
|
|
271515
|
+
symbol: {
|
|
271516
|
+
valType: 'enumerated',
|
|
271517
|
+
values: sortObjectKeys(MARKER_SYMBOLS),
|
|
271518
|
+
dflt: 'circle',
|
|
271519
|
+
arrayOk: true,
|
|
271520
|
+
description: 'Sets the marker symbol type.'
|
|
271521
|
+
},
|
|
271522
|
+
size: extendFlat({}, scatterMarkerAttrs.size, {dflt: 8}),
|
|
271523
|
+
sizeref: scatterMarkerAttrs.sizeref,
|
|
271524
|
+
sizemin: scatterMarkerAttrs.sizemin,
|
|
271525
|
+
sizemode: scatterMarkerAttrs.sizemode,
|
|
271526
|
+
opacity: extendFlat({}, scatterMarkerAttrs.opacity, {
|
|
271527
|
+
arrayOk: false,
|
|
271528
|
+
description: [
|
|
271529
|
+
'Sets the marker opacity.',
|
|
271530
|
+
'Note that the marker opacity for scatter3d traces',
|
|
271531
|
+
'must be a scalar value for performance reasons.',
|
|
271532
|
+
'To set a blending opacity value',
|
|
271533
|
+
'(i.e. which is not transparent), set *marker.color*',
|
|
271534
|
+
'to an rgba color and use its alpha channel.'
|
|
271535
|
+
].join(' ')
|
|
271536
|
+
}),
|
|
271537
|
+
colorbar: scatterMarkerAttrs.colorbar,
|
|
271538
|
+
|
|
271539
|
+
line: extendFlat({
|
|
271540
|
+
width: extendFlat({}, scatterMarkerLineAttrs.width, {arrayOk: false})
|
|
271541
|
+
},
|
|
271542
|
+
colorAttributes('marker.line')
|
|
271543
|
+
)
|
|
271544
|
+
},
|
|
271545
|
+
colorAttributes('marker')
|
|
271546
|
+
),
|
|
271547
|
+
|
|
271548
|
+
textposition: extendFlat({}, scatterAttrs.textposition, {dflt: 'top center'}),
|
|
271549
|
+
textfont: fontAttrs({
|
|
271550
|
+
noFontShadow: true,
|
|
271551
|
+
noFontLineposition: true,
|
|
271552
|
+
noFontTextcase: true,
|
|
271553
|
+
editType: 'calc',
|
|
271554
|
+
colorEditType: 'style',
|
|
271555
|
+
arrayOk: true,
|
|
271556
|
+
variantValues: ['normal', 'small-caps'],
|
|
271557
|
+
description: 'Sets the text font.'
|
|
271558
|
+
}),
|
|
271559
|
+
|
|
271560
|
+
opacity: baseAttrs.opacity,
|
|
271561
|
+
|
|
271562
|
+
hoverinfo: extendFlat({}, baseAttrs.hoverinfo)
|
|
271563
|
+
}, 'calc', 'nested');
|
|
271564
|
+
|
|
271565
|
+
attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';
|
|
271566
|
+
|
|
271567
|
+
|
|
271568
|
+
/***/ }),
|
|
271569
|
+
|
|
271570
|
+
/***/ 30935:
|
|
271571
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
271572
|
+
|
|
271573
|
+
|
|
271574
|
+
|
|
271575
|
+
var arraysToCalcdata = __webpack_require__(47213);
|
|
271576
|
+
var calcColorscale = __webpack_require__(59498);
|
|
271577
|
+
|
|
271578
|
+
/**
|
|
271579
|
+
* This is a kludge to put the array attributes into
|
|
271580
|
+
* calcdata the way Scatter.plot does, so that legends and
|
|
271581
|
+
* popovers know what to do with them.
|
|
271582
|
+
*/
|
|
271583
|
+
module.exports = function calc(gd, trace) {
|
|
271584
|
+
var cd = [{x: false, y: false, trace: trace, t: {}}];
|
|
271585
|
+
|
|
271586
|
+
arraysToCalcdata(cd, trace);
|
|
271587
|
+
calcColorscale(gd, trace);
|
|
271588
|
+
|
|
271589
|
+
return cd;
|
|
271590
|
+
};
|
|
271591
|
+
|
|
271592
|
+
|
|
271593
|
+
/***/ }),
|
|
271594
|
+
|
|
271595
|
+
/***/ 77681:
|
|
271596
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
271597
|
+
|
|
271598
|
+
|
|
271599
|
+
|
|
271600
|
+
var Registry = __webpack_require__(13936);
|
|
271601
|
+
|
|
271602
|
+
function calculateAxisErrors(data, params, scaleFactor, axis) {
|
|
271603
|
+
if(!params || !params.visible) return null;
|
|
271604
|
+
|
|
271605
|
+
var computeError = Registry.getComponentMethod('errorbars', 'makeComputeError')(params);
|
|
271606
|
+
var result = new Array(data.length);
|
|
271607
|
+
|
|
271608
|
+
for(var i = 0; i < data.length; i++) {
|
|
271609
|
+
var errors = computeError(+data[i], i);
|
|
271610
|
+
|
|
271611
|
+
if(axis.type === 'log') {
|
|
271612
|
+
var point = axis.c2l(data[i]);
|
|
271613
|
+
var min = data[i] - errors[0];
|
|
271614
|
+
var max = data[i] + errors[1];
|
|
271615
|
+
|
|
271616
|
+
result[i] = [
|
|
271617
|
+
(axis.c2l(min, true) - point) * scaleFactor,
|
|
271618
|
+
(axis.c2l(max, true) - point) * scaleFactor
|
|
271619
|
+
];
|
|
271620
|
+
|
|
271621
|
+
// Keep track of the lower error bound which isn't negative!
|
|
271622
|
+
if(min > 0) {
|
|
271623
|
+
var lower = axis.c2l(min);
|
|
271624
|
+
if(!axis._lowerLogErrorBound) axis._lowerLogErrorBound = lower;
|
|
271625
|
+
axis._lowerErrorBound = Math.min(axis._lowerLogErrorBound, lower);
|
|
271626
|
+
}
|
|
271627
|
+
} else {
|
|
271628
|
+
result[i] = [
|
|
271629
|
+
-errors[0] * scaleFactor,
|
|
271630
|
+
errors[1] * scaleFactor
|
|
271631
|
+
];
|
|
271632
|
+
}
|
|
271633
|
+
}
|
|
271634
|
+
|
|
271635
|
+
return result;
|
|
271636
|
+
}
|
|
271637
|
+
|
|
271638
|
+
function dataLength(array) {
|
|
271639
|
+
for(var i = 0; i < array.length; i++) {
|
|
271640
|
+
if(array[i]) return array[i].length;
|
|
271641
|
+
}
|
|
271642
|
+
return 0;
|
|
271643
|
+
}
|
|
271644
|
+
|
|
271645
|
+
function calculateErrors(data, scaleFactor, sceneLayout) {
|
|
271646
|
+
var errors = [
|
|
271647
|
+
calculateAxisErrors(data.x, data.error_x, scaleFactor[0], sceneLayout.xaxis),
|
|
271648
|
+
calculateAxisErrors(data.y, data.error_y, scaleFactor[1], sceneLayout.yaxis),
|
|
271649
|
+
calculateAxisErrors(data.z, data.error_z, scaleFactor[2], sceneLayout.zaxis)
|
|
271650
|
+
];
|
|
271651
|
+
|
|
271652
|
+
var n = dataLength(errors);
|
|
271653
|
+
if(n === 0) return null;
|
|
271654
|
+
|
|
271655
|
+
var errorBounds = new Array(n);
|
|
271656
|
+
|
|
271657
|
+
for(var i = 0; i < n; i++) {
|
|
271658
|
+
var bound = [[0, 0, 0], [0, 0, 0]];
|
|
271659
|
+
|
|
271660
|
+
for(var j = 0; j < 3; j++) {
|
|
271661
|
+
if(errors[j]) {
|
|
271662
|
+
for(var k = 0; k < 2; k++) {
|
|
271663
|
+
bound[k][j] = errors[j][i][k];
|
|
271664
|
+
}
|
|
271665
|
+
}
|
|
271666
|
+
}
|
|
271667
|
+
|
|
271668
|
+
errorBounds[i] = bound;
|
|
271669
|
+
}
|
|
271670
|
+
|
|
271671
|
+
return errorBounds;
|
|
271672
|
+
}
|
|
271673
|
+
|
|
271674
|
+
module.exports = calculateErrors;
|
|
271675
|
+
|
|
271676
|
+
|
|
271677
|
+
/***/ }),
|
|
271678
|
+
|
|
271679
|
+
/***/ 93219:
|
|
271680
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
271681
|
+
|
|
271682
|
+
|
|
271683
|
+
|
|
271684
|
+
var createLinePlot = (__webpack_require__(46000).gl_line3d);
|
|
271685
|
+
var createScatterPlot = (__webpack_require__(46000).gl_scatter3d);
|
|
271686
|
+
var createErrorBars = (__webpack_require__(46000).gl_error3d);
|
|
271687
|
+
var createMesh = (__webpack_require__(46000).gl_mesh3d);
|
|
271688
|
+
var triangulate = (__webpack_require__(46000).delaunay_triangulate);
|
|
271689
|
+
|
|
271690
|
+
var Lib = __webpack_require__(30991);
|
|
271691
|
+
var str2RgbaArray = __webpack_require__(44960);
|
|
271692
|
+
var formatColor = (__webpack_require__(592).formatColor);
|
|
271693
|
+
var makeBubbleSizeFn = __webpack_require__(42581);
|
|
271694
|
+
var DASH_PATTERNS = __webpack_require__(68828);
|
|
271695
|
+
var MARKER_SYMBOLS = __webpack_require__(98993);
|
|
271696
|
+
|
|
271697
|
+
var Axes = __webpack_require__(15076);
|
|
271698
|
+
var appendArrayPointValue = (__webpack_require__(2918).appendArrayPointValue);
|
|
271699
|
+
|
|
271700
|
+
var calculateError = __webpack_require__(77681);
|
|
271701
|
+
|
|
271702
|
+
function LineWithMarkers(scene, uid) {
|
|
271703
|
+
this.scene = scene;
|
|
271704
|
+
this.uid = uid;
|
|
271705
|
+
this.linePlot = null;
|
|
271706
|
+
this.scatterPlot = null;
|
|
271707
|
+
this.errorBars = null;
|
|
271708
|
+
this.textMarkers = null;
|
|
271709
|
+
this.delaunayMesh = null;
|
|
271710
|
+
this.color = null;
|
|
271711
|
+
this.mode = '';
|
|
271712
|
+
this.dataPoints = [];
|
|
271713
|
+
this.axesBounds = [
|
|
271714
|
+
[-Infinity, -Infinity, -Infinity],
|
|
271715
|
+
[Infinity, Infinity, Infinity]
|
|
271716
|
+
];
|
|
271717
|
+
this.textLabels = null;
|
|
271718
|
+
this.data = null;
|
|
271719
|
+
}
|
|
271720
|
+
|
|
271721
|
+
var proto = LineWithMarkers.prototype;
|
|
271722
|
+
|
|
271723
|
+
proto.handlePick = function(selection) {
|
|
271724
|
+
if(selection.object &&
|
|
271725
|
+
(selection.object === this.linePlot ||
|
|
271726
|
+
selection.object === this.delaunayMesh ||
|
|
271727
|
+
selection.object === this.textMarkers ||
|
|
271728
|
+
selection.object === this.scatterPlot)
|
|
271729
|
+
) {
|
|
271730
|
+
var ind = selection.index = selection.data.index;
|
|
271731
|
+
|
|
271732
|
+
if(selection.object.highlight) {
|
|
271733
|
+
selection.object.highlight(null);
|
|
271734
|
+
}
|
|
271735
|
+
if(this.scatterPlot) {
|
|
271736
|
+
selection.object = this.scatterPlot;
|
|
271737
|
+
this.scatterPlot.highlight(selection.data);
|
|
271738
|
+
}
|
|
271739
|
+
|
|
271740
|
+
selection.textLabel = '';
|
|
271741
|
+
if(this.textLabels) {
|
|
271742
|
+
if(Lib.isArrayOrTypedArray(this.textLabels)) {
|
|
271743
|
+
if(this.textLabels[ind] || this.textLabels[ind] === 0) {
|
|
271744
|
+
selection.textLabel = this.textLabels[ind];
|
|
271745
|
+
}
|
|
271746
|
+
} else {
|
|
271747
|
+
selection.textLabel = this.textLabels;
|
|
271748
|
+
}
|
|
271749
|
+
}
|
|
271750
|
+
|
|
271751
|
+
selection.traceCoordinate = [
|
|
271752
|
+
this.data.x[ind],
|
|
271753
|
+
this.data.y[ind],
|
|
271754
|
+
this.data.z[ind]
|
|
271755
|
+
];
|
|
271756
|
+
|
|
271757
|
+
return true;
|
|
271758
|
+
}
|
|
271759
|
+
};
|
|
271760
|
+
|
|
271761
|
+
function constructDelaunay(points, color, axis) {
|
|
271762
|
+
var u = (axis + 1) % 3;
|
|
271763
|
+
var v = (axis + 2) % 3;
|
|
271764
|
+
var filteredPoints = [];
|
|
271765
|
+
var filteredIds = [];
|
|
271766
|
+
var i;
|
|
271767
|
+
|
|
271768
|
+
for(i = 0; i < points.length; ++i) {
|
|
271769
|
+
var p = points[i];
|
|
271770
|
+
if(isNaN(p[u]) || !isFinite(p[u]) ||
|
|
271771
|
+
isNaN(p[v]) || !isFinite(p[v])) {
|
|
271772
|
+
continue;
|
|
271773
|
+
}
|
|
271774
|
+
filteredPoints.push([p[u], p[v]]);
|
|
271775
|
+
filteredIds.push(i);
|
|
271776
|
+
}
|
|
271777
|
+
var cells = triangulate(filteredPoints);
|
|
271778
|
+
for(i = 0; i < cells.length; ++i) {
|
|
271779
|
+
var c = cells[i];
|
|
271780
|
+
for(var j = 0; j < c.length; ++j) {
|
|
271781
|
+
c[j] = filteredIds[c[j]];
|
|
271782
|
+
}
|
|
271783
|
+
}
|
|
271784
|
+
return {
|
|
271785
|
+
positions: points,
|
|
271786
|
+
cells: cells,
|
|
271787
|
+
meshColor: color
|
|
271788
|
+
};
|
|
271789
|
+
}
|
|
271790
|
+
|
|
271791
|
+
function calculateErrorParams(errors) {
|
|
271792
|
+
var capSize = [0.0, 0.0, 0.0];
|
|
271793
|
+
var color = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
|
|
271794
|
+
var lineWidth = [1.0, 1.0, 1.0];
|
|
271795
|
+
|
|
271796
|
+
for(var i = 0; i < 3; i++) {
|
|
271797
|
+
var e = errors[i];
|
|
271798
|
+
|
|
271799
|
+
if(e && e.copy_zstyle !== false && errors[2].visible !== false) e = errors[2];
|
|
271800
|
+
if(!e || !e.visible) continue;
|
|
271801
|
+
|
|
271802
|
+
capSize[i] = e.width / 2; // ballpark rescaling
|
|
271803
|
+
color[i] = str2RgbaArray(e.color);
|
|
271804
|
+
lineWidth[i] = e.thickness;
|
|
271805
|
+
}
|
|
271806
|
+
|
|
271807
|
+
return {capSize: capSize, color: color, lineWidth: lineWidth};
|
|
271808
|
+
}
|
|
271809
|
+
|
|
271810
|
+
function parseAlignmentX(a) {
|
|
271811
|
+
if(a === null || a === undefined) return 0;
|
|
271812
|
+
|
|
271813
|
+
return (a.indexOf('left') > -1) ? -1 :
|
|
271814
|
+
(a.indexOf('right') > -1) ? 1 : 0;
|
|
271815
|
+
}
|
|
271816
|
+
|
|
271817
|
+
function parseAlignmentY(a) {
|
|
271818
|
+
if(a === null || a === undefined) return 0;
|
|
271819
|
+
|
|
271820
|
+
return (a.indexOf('top') > -1) ? -1 :
|
|
271821
|
+
(a.indexOf('bottom') > -1) ? 1 : 0;
|
|
271822
|
+
}
|
|
271823
|
+
|
|
271824
|
+
function calculateTextOffset(tp) {
|
|
271825
|
+
// Read out text properties
|
|
271826
|
+
|
|
271827
|
+
var defaultAlignmentX = 0;
|
|
271828
|
+
var defaultAlignmentY = 0;
|
|
271829
|
+
|
|
271830
|
+
var textOffset = [
|
|
271831
|
+
defaultAlignmentX,
|
|
271832
|
+
defaultAlignmentY
|
|
271833
|
+
];
|
|
271834
|
+
|
|
271835
|
+
if(Array.isArray(tp)) {
|
|
271836
|
+
for(var i = 0; i < tp.length; i++) {
|
|
271837
|
+
textOffset[i] = [
|
|
271838
|
+
defaultAlignmentX,
|
|
271839
|
+
defaultAlignmentY
|
|
271840
|
+
];
|
|
271841
|
+
if(tp[i]) {
|
|
271842
|
+
textOffset[i][0] = parseAlignmentX(tp[i]);
|
|
271843
|
+
textOffset[i][1] = parseAlignmentY(tp[i]);
|
|
271844
|
+
}
|
|
271845
|
+
}
|
|
271846
|
+
} else {
|
|
271847
|
+
textOffset[0] = parseAlignmentX(tp);
|
|
271848
|
+
textOffset[1] = parseAlignmentY(tp);
|
|
271849
|
+
}
|
|
271850
|
+
|
|
271851
|
+
return textOffset;
|
|
271852
|
+
}
|
|
271853
|
+
|
|
271854
|
+
|
|
271855
|
+
function calculateSize(sizeIn, sizeFn) {
|
|
271856
|
+
// rough parity with Plotly 2D markers
|
|
271857
|
+
return sizeFn(sizeIn * 4);
|
|
271858
|
+
}
|
|
271859
|
+
|
|
271860
|
+
function calculateSymbol(symbolIn) {
|
|
271861
|
+
return MARKER_SYMBOLS[symbolIn];
|
|
271862
|
+
}
|
|
271863
|
+
|
|
271864
|
+
function formatParam(paramIn, len, calculate, dflt, extraFn) {
|
|
271865
|
+
var paramOut = null;
|
|
271866
|
+
|
|
271867
|
+
if(Lib.isArrayOrTypedArray(paramIn)) {
|
|
271868
|
+
paramOut = [];
|
|
271869
|
+
|
|
271870
|
+
for(var i = 0; i < len; i++) {
|
|
271871
|
+
if(paramIn[i] === undefined) paramOut[i] = dflt;
|
|
271872
|
+
else paramOut[i] = calculate(paramIn[i], extraFn);
|
|
271873
|
+
}
|
|
271874
|
+
} else paramOut = calculate(paramIn, Lib.identity);
|
|
271875
|
+
|
|
271876
|
+
return paramOut;
|
|
271877
|
+
}
|
|
271878
|
+
|
|
271879
|
+
|
|
271880
|
+
function convertPlotlyOptions(scene, data) {
|
|
271881
|
+
var points = [];
|
|
271882
|
+
var sceneLayout = scene.fullSceneLayout;
|
|
271883
|
+
var scaleFactor = scene.dataScale;
|
|
271884
|
+
var xaxis = sceneLayout.xaxis;
|
|
271885
|
+
var yaxis = sceneLayout.yaxis;
|
|
271886
|
+
var zaxis = sceneLayout.zaxis;
|
|
271887
|
+
var marker = data.marker;
|
|
271888
|
+
var line = data.line;
|
|
271889
|
+
var x = data.x || [];
|
|
271890
|
+
var y = data.y || [];
|
|
271891
|
+
var z = data.z || [];
|
|
271892
|
+
var len = x.length;
|
|
271893
|
+
var xcalendar = data.xcalendar;
|
|
271894
|
+
var ycalendar = data.ycalendar;
|
|
271895
|
+
var zcalendar = data.zcalendar;
|
|
271896
|
+
var xc, yc, zc;
|
|
271897
|
+
var params, i;
|
|
271898
|
+
var text;
|
|
271899
|
+
|
|
271900
|
+
// Convert points
|
|
271901
|
+
for(i = 0; i < len; i++) {
|
|
271902
|
+
// sanitize numbers and apply transforms based on axes.type
|
|
271903
|
+
xc = xaxis.d2l(x[i], 0, xcalendar) * scaleFactor[0];
|
|
271904
|
+
yc = yaxis.d2l(y[i], 0, ycalendar) * scaleFactor[1];
|
|
271905
|
+
zc = zaxis.d2l(z[i], 0, zcalendar) * scaleFactor[2];
|
|
271906
|
+
|
|
271907
|
+
points[i] = [xc, yc, zc];
|
|
271908
|
+
}
|
|
271909
|
+
|
|
271910
|
+
// convert text
|
|
271911
|
+
if(Array.isArray(data.text)) {
|
|
271912
|
+
text = data.text;
|
|
271913
|
+
} else if(Lib.isTypedArray(data.text)) {
|
|
271914
|
+
text = Array.from(data.text);
|
|
271915
|
+
} else if(data.text !== undefined) {
|
|
271916
|
+
text = new Array(len);
|
|
271917
|
+
for(i = 0; i < len; i++) text[i] = data.text;
|
|
271918
|
+
}
|
|
271919
|
+
|
|
271920
|
+
function formatter(axName, val) {
|
|
271921
|
+
var ax = sceneLayout[axName];
|
|
271922
|
+
return Axes.tickText(ax, ax.d2l(val), true).text;
|
|
271923
|
+
}
|
|
271924
|
+
|
|
271925
|
+
// check texttemplate
|
|
271926
|
+
var texttemplate = data.texttemplate;
|
|
271927
|
+
if(texttemplate) {
|
|
271928
|
+
var fullLayout = scene.fullLayout;
|
|
271929
|
+
var d3locale = fullLayout._d3locale;
|
|
271930
|
+
var isArray = Array.isArray(texttemplate);
|
|
271931
|
+
var N = isArray ? Math.min(texttemplate.length, len) : len;
|
|
271932
|
+
var txt = isArray ?
|
|
271933
|
+
function(i) { return texttemplate[i]; } :
|
|
271934
|
+
function() { return texttemplate; };
|
|
271935
|
+
|
|
271936
|
+
text = new Array(N);
|
|
271937
|
+
|
|
271938
|
+
for(i = 0; i < N; i++) {
|
|
271939
|
+
var d = {x: x[i], y: y[i], z: z[i]};
|
|
271940
|
+
var labels = {
|
|
271941
|
+
xLabel: formatter('xaxis', x[i]),
|
|
271942
|
+
yLabel: formatter('yaxis', y[i]),
|
|
271943
|
+
zLabel: formatter('zaxis', z[i])
|
|
271944
|
+
};
|
|
271945
|
+
var pointValues = {};
|
|
271946
|
+
appendArrayPointValue(pointValues, data, i);
|
|
271947
|
+
var meta = data._meta || {};
|
|
271948
|
+
text[i] = Lib.texttemplateString(txt(i), labels, d3locale, pointValues, d, meta);
|
|
271949
|
+
}
|
|
271950
|
+
}
|
|
271951
|
+
|
|
271952
|
+
// Build object parameters
|
|
271953
|
+
params = {
|
|
271954
|
+
position: points,
|
|
271955
|
+
mode: data.mode,
|
|
271956
|
+
text: text
|
|
271957
|
+
};
|
|
271958
|
+
|
|
271959
|
+
if('line' in data) {
|
|
271960
|
+
params.lineColor = formatColor(line, 1, len);
|
|
271961
|
+
params.lineWidth = line.width;
|
|
271962
|
+
params.lineDashes = line.dash;
|
|
271963
|
+
}
|
|
271964
|
+
|
|
271965
|
+
if('marker' in data) {
|
|
271966
|
+
var sizeFn = makeBubbleSizeFn(data);
|
|
271967
|
+
|
|
271968
|
+
params.scatterColor = formatColor(marker, 1, len);
|
|
271969
|
+
params.scatterSize = formatParam(marker.size, len, calculateSize, 20, sizeFn);
|
|
271970
|
+
params.scatterMarker = formatParam(marker.symbol, len, calculateSymbol, '●');
|
|
271971
|
+
params.scatterLineWidth = marker.line.width; // arrayOk === false
|
|
271972
|
+
params.scatterLineColor = formatColor(marker.line, 1, len);
|
|
271973
|
+
params.scatterAngle = 0;
|
|
271974
|
+
}
|
|
271975
|
+
|
|
271976
|
+
if('textposition' in data) {
|
|
271977
|
+
params.textOffset = calculateTextOffset(data.textposition);
|
|
271978
|
+
params.textColor = formatColor(data.textfont, 1, len);
|
|
271979
|
+
params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12);
|
|
271980
|
+
params.textFontFamily = data.textfont.family;
|
|
271981
|
+
params.textFontWeight = data.textfont.weight;
|
|
271982
|
+
params.textFontStyle = data.textfont.style;
|
|
271983
|
+
params.textFontVariant = data.textfont.variant;
|
|
271984
|
+
params.textAngle = 0;
|
|
271985
|
+
}
|
|
271986
|
+
|
|
271987
|
+
var dims = ['x', 'y', 'z'];
|
|
271988
|
+
params.project = [false, false, false];
|
|
271989
|
+
params.projectScale = [1, 1, 1];
|
|
271990
|
+
params.projectOpacity = [1, 1, 1];
|
|
271991
|
+
for(i = 0; i < 3; ++i) {
|
|
271992
|
+
var projection = data.projection[dims[i]];
|
|
271993
|
+
if((params.project[i] = projection.show)) {
|
|
271994
|
+
params.projectOpacity[i] = projection.opacity;
|
|
271995
|
+
params.projectScale[i] = projection.scale;
|
|
271996
|
+
}
|
|
271997
|
+
}
|
|
271998
|
+
|
|
271999
|
+
params.errorBounds = calculateError(data, scaleFactor, sceneLayout);
|
|
272000
|
+
|
|
272001
|
+
var errorParams = calculateErrorParams([data.error_x, data.error_y, data.error_z]);
|
|
272002
|
+
params.errorColor = errorParams.color;
|
|
272003
|
+
params.errorLineWidth = errorParams.lineWidth;
|
|
272004
|
+
params.errorCapSize = errorParams.capSize;
|
|
272005
|
+
|
|
272006
|
+
params.delaunayAxis = data.surfaceaxis;
|
|
272007
|
+
params.delaunayColor = str2RgbaArray(data.surfacecolor);
|
|
272008
|
+
|
|
272009
|
+
return params;
|
|
272010
|
+
}
|
|
272011
|
+
|
|
272012
|
+
function _arrayToColor(color) {
|
|
272013
|
+
if(Lib.isArrayOrTypedArray(color)) {
|
|
272014
|
+
var c = color[0];
|
|
272015
|
+
|
|
272016
|
+
if(Lib.isArrayOrTypedArray(c)) color = c;
|
|
272017
|
+
|
|
272018
|
+
return 'rgb(' + color.slice(0, 3).map(function(x) {
|
|
272019
|
+
return Math.round(x * 255);
|
|
272020
|
+
}) + ')';
|
|
272021
|
+
}
|
|
272022
|
+
|
|
272023
|
+
return null;
|
|
272024
|
+
}
|
|
272025
|
+
|
|
272026
|
+
function arrayToColor(colors) {
|
|
272027
|
+
if(!Lib.isArrayOrTypedArray(colors)) {
|
|
272028
|
+
return null;
|
|
272029
|
+
}
|
|
272030
|
+
|
|
272031
|
+
if((colors.length === 4) && (typeof colors[0] === 'number')) {
|
|
272032
|
+
return _arrayToColor(colors);
|
|
272033
|
+
}
|
|
272034
|
+
|
|
272035
|
+
return colors.map(_arrayToColor);
|
|
272036
|
+
}
|
|
272037
|
+
|
|
272038
|
+
proto.update = function(data) {
|
|
272039
|
+
var gl = this.scene.glplot.gl;
|
|
272040
|
+
var lineOptions;
|
|
272041
|
+
var scatterOptions;
|
|
272042
|
+
var errorOptions;
|
|
272043
|
+
var textOptions;
|
|
272044
|
+
var dashPattern = DASH_PATTERNS.solid;
|
|
272045
|
+
|
|
272046
|
+
// Save data
|
|
272047
|
+
this.data = data;
|
|
272048
|
+
|
|
272049
|
+
// Run data conversion
|
|
272050
|
+
var options = convertPlotlyOptions(this.scene, data);
|
|
272051
|
+
|
|
272052
|
+
if('mode' in options) {
|
|
272053
|
+
this.mode = options.mode;
|
|
272054
|
+
}
|
|
272055
|
+
if('lineDashes' in options) {
|
|
272056
|
+
if(options.lineDashes in DASH_PATTERNS) {
|
|
272057
|
+
dashPattern = DASH_PATTERNS[options.lineDashes];
|
|
272058
|
+
}
|
|
272059
|
+
}
|
|
272060
|
+
|
|
272061
|
+
this.color = arrayToColor(options.scatterColor) ||
|
|
272062
|
+
arrayToColor(options.lineColor);
|
|
272063
|
+
|
|
272064
|
+
// Save data points
|
|
272065
|
+
this.dataPoints = options.position;
|
|
272066
|
+
|
|
272067
|
+
lineOptions = {
|
|
272068
|
+
gl: this.scene.glplot.gl,
|
|
272069
|
+
position: options.position,
|
|
272070
|
+
color: options.lineColor,
|
|
272071
|
+
lineWidth: options.lineWidth || 1,
|
|
272072
|
+
dashes: dashPattern[0],
|
|
272073
|
+
dashScale: dashPattern[1],
|
|
272074
|
+
opacity: data.opacity,
|
|
272075
|
+
connectGaps: data.connectgaps
|
|
272076
|
+
};
|
|
272077
|
+
|
|
272078
|
+
if(this.mode.indexOf('lines') !== -1) {
|
|
272079
|
+
if(this.linePlot) this.linePlot.update(lineOptions);
|
|
272080
|
+
else {
|
|
272081
|
+
this.linePlot = createLinePlot(lineOptions);
|
|
272082
|
+
this.linePlot._trace = this;
|
|
272083
|
+
this.scene.glplot.add(this.linePlot);
|
|
272084
|
+
}
|
|
272085
|
+
} else if(this.linePlot) {
|
|
272086
|
+
this.scene.glplot.remove(this.linePlot);
|
|
272087
|
+
this.linePlot.dispose();
|
|
272088
|
+
this.linePlot = null;
|
|
272089
|
+
}
|
|
272090
|
+
|
|
272091
|
+
// N.B. marker.opacity must be a scalar for performance
|
|
272092
|
+
var scatterOpacity = data.opacity;
|
|
272093
|
+
if(data.marker && data.marker.opacity !== undefined) scatterOpacity *= data.marker.opacity;
|
|
272094
|
+
|
|
272095
|
+
scatterOptions = {
|
|
272096
|
+
gl: this.scene.glplot.gl,
|
|
272097
|
+
position: options.position,
|
|
272098
|
+
color: options.scatterColor,
|
|
272099
|
+
size: options.scatterSize,
|
|
272100
|
+
glyph: options.scatterMarker,
|
|
272101
|
+
opacity: scatterOpacity,
|
|
272102
|
+
orthographic: true,
|
|
272103
|
+
lineWidth: options.scatterLineWidth,
|
|
272104
|
+
lineColor: options.scatterLineColor,
|
|
272105
|
+
project: options.project,
|
|
272106
|
+
projectScale: options.projectScale,
|
|
272107
|
+
projectOpacity: options.projectOpacity
|
|
272108
|
+
};
|
|
272109
|
+
|
|
272110
|
+
if(this.mode.indexOf('markers') !== -1) {
|
|
272111
|
+
if(this.scatterPlot) this.scatterPlot.update(scatterOptions);
|
|
272112
|
+
else {
|
|
272113
|
+
this.scatterPlot = createScatterPlot(scatterOptions);
|
|
272114
|
+
this.scatterPlot._trace = this;
|
|
272115
|
+
this.scatterPlot.highlightScale = 1;
|
|
272116
|
+
this.scene.glplot.add(this.scatterPlot);
|
|
272117
|
+
}
|
|
272118
|
+
} else if(this.scatterPlot) {
|
|
272119
|
+
this.scene.glplot.remove(this.scatterPlot);
|
|
272120
|
+
this.scatterPlot.dispose();
|
|
272121
|
+
this.scatterPlot = null;
|
|
272122
|
+
}
|
|
272123
|
+
|
|
272124
|
+
textOptions = {
|
|
272125
|
+
gl: this.scene.glplot.gl,
|
|
272126
|
+
position: options.position,
|
|
272127
|
+
glyph: options.text,
|
|
272128
|
+
color: options.textColor,
|
|
272129
|
+
size: options.textSize,
|
|
272130
|
+
angle: options.textAngle,
|
|
272131
|
+
alignment: options.textOffset,
|
|
272132
|
+
font: options.textFontFamily,
|
|
272133
|
+
fontWeight: options.textFontWeight,
|
|
272134
|
+
fontStyle: options.textFontStyle,
|
|
272135
|
+
fontVariant: options.textFontVariant,
|
|
272136
|
+
orthographic: true,
|
|
272137
|
+
lineWidth: 0,
|
|
272138
|
+
project: false,
|
|
272139
|
+
opacity: data.opacity
|
|
272140
|
+
};
|
|
272141
|
+
|
|
272142
|
+
this.textLabels = data.hovertext || data.text;
|
|
272143
|
+
|
|
272144
|
+
if(this.mode.indexOf('text') !== -1) {
|
|
272145
|
+
if(this.textMarkers) this.textMarkers.update(textOptions);
|
|
272146
|
+
else {
|
|
272147
|
+
this.textMarkers = createScatterPlot(textOptions);
|
|
272148
|
+
this.textMarkers._trace = this;
|
|
272149
|
+
this.textMarkers.highlightScale = 1;
|
|
272150
|
+
this.scene.glplot.add(this.textMarkers);
|
|
272151
|
+
}
|
|
272152
|
+
} else if(this.textMarkers) {
|
|
272153
|
+
this.scene.glplot.remove(this.textMarkers);
|
|
272154
|
+
this.textMarkers.dispose();
|
|
272155
|
+
this.textMarkers = null;
|
|
272156
|
+
}
|
|
272157
|
+
|
|
272158
|
+
errorOptions = {
|
|
272159
|
+
gl: this.scene.glplot.gl,
|
|
272160
|
+
position: options.position,
|
|
272161
|
+
color: options.errorColor,
|
|
272162
|
+
error: options.errorBounds,
|
|
272163
|
+
lineWidth: options.errorLineWidth,
|
|
272164
|
+
capSize: options.errorCapSize,
|
|
272165
|
+
opacity: data.opacity
|
|
272166
|
+
};
|
|
272167
|
+
if(this.errorBars) {
|
|
272168
|
+
if(options.errorBounds) {
|
|
272169
|
+
this.errorBars.update(errorOptions);
|
|
272170
|
+
} else {
|
|
272171
|
+
this.scene.glplot.remove(this.errorBars);
|
|
272172
|
+
this.errorBars.dispose();
|
|
272173
|
+
this.errorBars = null;
|
|
272174
|
+
}
|
|
272175
|
+
} else if(options.errorBounds) {
|
|
272176
|
+
this.errorBars = createErrorBars(errorOptions);
|
|
272177
|
+
this.errorBars._trace = this;
|
|
272178
|
+
this.scene.glplot.add(this.errorBars);
|
|
272179
|
+
}
|
|
272180
|
+
|
|
272181
|
+
if(options.delaunayAxis >= 0) {
|
|
272182
|
+
var delaunayOptions = constructDelaunay(
|
|
272183
|
+
options.position,
|
|
272184
|
+
options.delaunayColor,
|
|
272185
|
+
options.delaunayAxis
|
|
272186
|
+
);
|
|
272187
|
+
delaunayOptions.opacity = data.opacity;
|
|
272188
|
+
|
|
272189
|
+
if(this.delaunayMesh) {
|
|
272190
|
+
this.delaunayMesh.update(delaunayOptions);
|
|
272191
|
+
} else {
|
|
272192
|
+
delaunayOptions.gl = gl;
|
|
272193
|
+
this.delaunayMesh = createMesh(delaunayOptions);
|
|
272194
|
+
this.delaunayMesh._trace = this;
|
|
272195
|
+
this.scene.glplot.add(this.delaunayMesh);
|
|
272196
|
+
}
|
|
272197
|
+
} else if(this.delaunayMesh) {
|
|
272198
|
+
this.scene.glplot.remove(this.delaunayMesh);
|
|
272199
|
+
this.delaunayMesh.dispose();
|
|
272200
|
+
this.delaunayMesh = null;
|
|
272201
|
+
}
|
|
272202
|
+
};
|
|
272203
|
+
|
|
272204
|
+
proto.dispose = function() {
|
|
272205
|
+
if(this.linePlot) {
|
|
272206
|
+
this.scene.glplot.remove(this.linePlot);
|
|
272207
|
+
this.linePlot.dispose();
|
|
272208
|
+
}
|
|
272209
|
+
if(this.scatterPlot) {
|
|
272210
|
+
this.scene.glplot.remove(this.scatterPlot);
|
|
272211
|
+
this.scatterPlot.dispose();
|
|
272212
|
+
}
|
|
272213
|
+
if(this.errorBars) {
|
|
272214
|
+
this.scene.glplot.remove(this.errorBars);
|
|
272215
|
+
this.errorBars.dispose();
|
|
272216
|
+
}
|
|
272217
|
+
if(this.textMarkers) {
|
|
272218
|
+
this.scene.glplot.remove(this.textMarkers);
|
|
272219
|
+
this.textMarkers.dispose();
|
|
272220
|
+
}
|
|
272221
|
+
if(this.delaunayMesh) {
|
|
272222
|
+
this.scene.glplot.remove(this.delaunayMesh);
|
|
272223
|
+
this.delaunayMesh.dispose();
|
|
272224
|
+
}
|
|
272225
|
+
};
|
|
272226
|
+
|
|
272227
|
+
function createLineWithMarkers(scene, data) {
|
|
272228
|
+
var plot = new LineWithMarkers(scene, data.uid);
|
|
272229
|
+
plot.update(data);
|
|
272230
|
+
return plot;
|
|
272231
|
+
}
|
|
272232
|
+
|
|
272233
|
+
module.exports = createLineWithMarkers;
|
|
272234
|
+
|
|
272235
|
+
|
|
272236
|
+
/***/ }),
|
|
272237
|
+
|
|
272238
|
+
/***/ 13744:
|
|
272239
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
272240
|
+
|
|
272241
|
+
|
|
272242
|
+
|
|
272243
|
+
var Registry = __webpack_require__(13936);
|
|
272244
|
+
var Lib = __webpack_require__(30991);
|
|
272245
|
+
|
|
272246
|
+
var subTypes = __webpack_require__(33068);
|
|
272247
|
+
var handleMarkerDefaults = __webpack_require__(15294);
|
|
272248
|
+
var handleLineDefaults = __webpack_require__(82094);
|
|
272249
|
+
var handleTextDefaults = __webpack_require__(94729);
|
|
272250
|
+
|
|
272251
|
+
var attributes = __webpack_require__(1015);
|
|
272252
|
+
|
|
272253
|
+
module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
|
|
272254
|
+
function coerce(attr, dflt) {
|
|
272255
|
+
return Lib.coerce(traceIn, traceOut, attributes, attr, dflt);
|
|
272256
|
+
}
|
|
272257
|
+
|
|
272258
|
+
var len = handleXYZDefaults(traceIn, traceOut, coerce, layout);
|
|
272259
|
+
if(!len) {
|
|
272260
|
+
traceOut.visible = false;
|
|
272261
|
+
return;
|
|
272262
|
+
}
|
|
272263
|
+
|
|
272264
|
+
coerce('text');
|
|
272265
|
+
coerce('hovertext');
|
|
272266
|
+
coerce('hovertemplate');
|
|
272267
|
+
coerce('xhoverformat');
|
|
272268
|
+
coerce('yhoverformat');
|
|
272269
|
+
coerce('zhoverformat');
|
|
272270
|
+
|
|
272271
|
+
coerce('mode');
|
|
272272
|
+
|
|
272273
|
+
if(subTypes.hasMarkers(traceOut)) {
|
|
272274
|
+
handleMarkerDefaults(traceIn, traceOut, defaultColor, layout, coerce, {noSelect: true, noAngle: true});
|
|
272275
|
+
}
|
|
272276
|
+
|
|
272277
|
+
if(subTypes.hasLines(traceOut)) {
|
|
272278
|
+
coerce('connectgaps');
|
|
272279
|
+
handleLineDefaults(traceIn, traceOut, defaultColor, layout, coerce);
|
|
272280
|
+
}
|
|
272281
|
+
|
|
272282
|
+
if(subTypes.hasText(traceOut)) {
|
|
272283
|
+
coerce('texttemplate');
|
|
272284
|
+
handleTextDefaults(traceIn, traceOut, layout, coerce, {
|
|
272285
|
+
noSelect: true,
|
|
272286
|
+
noFontShadow: true,
|
|
272287
|
+
noFontLineposition: true,
|
|
272288
|
+
noFontTextcase: true,
|
|
272289
|
+
});
|
|
272290
|
+
}
|
|
272291
|
+
|
|
272292
|
+
var lineColor = (traceOut.line || {}).color;
|
|
272293
|
+
var markerColor = (traceOut.marker || {}).color;
|
|
272294
|
+
if(coerce('surfaceaxis') >= 0) coerce('surfacecolor', lineColor || markerColor);
|
|
272295
|
+
|
|
272296
|
+
var dims = ['x', 'y', 'z'];
|
|
272297
|
+
for(var i = 0; i < 3; ++i) {
|
|
272298
|
+
var projection = 'projection.' + dims[i];
|
|
272299
|
+
if(coerce(projection + '.show')) {
|
|
272300
|
+
coerce(projection + '.opacity');
|
|
272301
|
+
coerce(projection + '.scale');
|
|
272302
|
+
}
|
|
272303
|
+
}
|
|
272304
|
+
|
|
272305
|
+
var errorBarsSupplyDefaults = Registry.getComponentMethod('errorbars', 'supplyDefaults');
|
|
272306
|
+
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'z'});
|
|
272307
|
+
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'y', inherit: 'z'});
|
|
272308
|
+
errorBarsSupplyDefaults(traceIn, traceOut, lineColor || markerColor || defaultColor, {axis: 'x', inherit: 'z'});
|
|
272309
|
+
};
|
|
272310
|
+
|
|
272311
|
+
function handleXYZDefaults(traceIn, traceOut, coerce, layout) {
|
|
272312
|
+
var len = 0;
|
|
272313
|
+
var x = coerce('x');
|
|
272314
|
+
var y = coerce('y');
|
|
272315
|
+
var z = coerce('z');
|
|
272316
|
+
|
|
272317
|
+
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
|
|
272318
|
+
handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);
|
|
272319
|
+
|
|
272320
|
+
if(x && y && z) {
|
|
272321
|
+
// TODO: what happens if one is missing?
|
|
272322
|
+
len = Math.min(x.length, y.length, z.length);
|
|
272323
|
+
traceOut._length = traceOut._xlength = traceOut._ylength = traceOut._zlength = len;
|
|
272324
|
+
}
|
|
272325
|
+
|
|
272326
|
+
return len;
|
|
272327
|
+
}
|
|
272328
|
+
|
|
272329
|
+
|
|
272330
|
+
/***/ }),
|
|
272331
|
+
|
|
272332
|
+
/***/ 68860:
|
|
272333
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
272334
|
+
|
|
272335
|
+
|
|
272336
|
+
|
|
272337
|
+
module.exports = {
|
|
272338
|
+
plot: __webpack_require__(93219),
|
|
272339
|
+
attributes: __webpack_require__(1015),
|
|
272340
|
+
markerSymbols: __webpack_require__(98993),
|
|
272341
|
+
supplyDefaults: __webpack_require__(13744),
|
|
272342
|
+
colorbar: [
|
|
272343
|
+
{
|
|
272344
|
+
container: 'marker',
|
|
272345
|
+
min: 'cmin',
|
|
272346
|
+
max: 'cmax'
|
|
272347
|
+
}, {
|
|
272348
|
+
container: 'line',
|
|
272349
|
+
min: 'cmin',
|
|
272350
|
+
max: 'cmax'
|
|
272351
|
+
}
|
|
272352
|
+
],
|
|
272353
|
+
calc: __webpack_require__(30935),
|
|
272354
|
+
|
|
272355
|
+
moduleType: 'trace',
|
|
272356
|
+
name: 'scatter3d',
|
|
272357
|
+
basePlotModule: __webpack_require__(68137),
|
|
272358
|
+
categories: ['gl3d', 'symbols', 'showLegend', 'scatter-like'],
|
|
272359
|
+
meta: {
|
|
272360
|
+
hrName: 'scatter_3d',
|
|
272361
|
+
description: [
|
|
272362
|
+
'The data visualized as scatter point or lines in 3D dimension',
|
|
272363
|
+
'is set in `x`, `y`, `z`.',
|
|
272364
|
+
'Text (appearing either on the chart or on hover only) is via `text`.',
|
|
272365
|
+
'Bubble charts are achieved by setting `marker.size` and/or `marker.color`',
|
|
272366
|
+
'Projections are achieved via `projection`.',
|
|
272367
|
+
'Surface fills are achieved via `surfaceaxis`.'
|
|
272368
|
+
].join(' ')
|
|
272369
|
+
}
|
|
272370
|
+
};
|
|
272371
|
+
|
|
272372
|
+
|
|
272373
272373
|
/***/ }),
|
|
272374
272374
|
|
|
272375
272375
|
/***/ 44771:
|
|
@@ -368888,26 +368888,6 @@ const TextJamEditor = ({ onLogoutClick = () => { }, onViewProfileClick = () => {
|
|
|
368888
368888
|
exports.TextJamEditor = TextJamEditor;
|
|
368889
368889
|
|
|
368890
368890
|
|
|
368891
|
-
/***/ }),
|
|
368892
|
-
|
|
368893
|
-
/***/ 66360:
|
|
368894
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
368895
|
-
|
|
368896
|
-
|
|
368897
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
368898
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
368899
|
-
};
|
|
368900
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
368901
|
-
exports.AssetPreviewPanel = void 0;
|
|
368902
|
-
const jsx_runtime_1 = __webpack_require__(74848);
|
|
368903
|
-
const styles_module_scss_1 = __importDefault(__webpack_require__(22401));
|
|
368904
|
-
const AssetPreview_1 = __webpack_require__(91078);
|
|
368905
|
-
const AssetPreviewPanel = ({ file, }) => {
|
|
368906
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.previewContainer, children: (0, jsx_runtime_1.jsx)(AssetPreview_1.AssetPreview, { file: file }) }));
|
|
368907
|
-
};
|
|
368908
|
-
exports.AssetPreviewPanel = AssetPreviewPanel;
|
|
368909
|
-
|
|
368910
|
-
|
|
368911
368891
|
/***/ }),
|
|
368912
368892
|
|
|
368913
368893
|
/***/ 91078:
|
|
@@ -368958,6 +368938,26 @@ const AssetPreview = ({ file }) => {
|
|
|
368958
368938
|
exports.AssetPreview = AssetPreview;
|
|
368959
368939
|
|
|
368960
368940
|
|
|
368941
|
+
/***/ }),
|
|
368942
|
+
|
|
368943
|
+
/***/ 66360:
|
|
368944
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
368945
|
+
|
|
368946
|
+
|
|
368947
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
368948
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
368949
|
+
};
|
|
368950
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
368951
|
+
exports.AssetPreviewPanel = void 0;
|
|
368952
|
+
const jsx_runtime_1 = __webpack_require__(74848);
|
|
368953
|
+
const styles_module_scss_1 = __importDefault(__webpack_require__(22401));
|
|
368954
|
+
const AssetPreview_1 = __webpack_require__(91078);
|
|
368955
|
+
const AssetPreviewPanel = ({ file, }) => {
|
|
368956
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.previewContainer, children: (0, jsx_runtime_1.jsx)(AssetPreview_1.AssetPreview, { file: file }) }));
|
|
368957
|
+
};
|
|
368958
|
+
exports.AssetPreviewPanel = AssetPreviewPanel;
|
|
368959
|
+
|
|
368960
|
+
|
|
368961
368961
|
/***/ }),
|
|
368962
368962
|
|
|
368963
368963
|
/***/ 46175:
|
|
@@ -369724,7 +369724,7 @@ function HtmlRunner() {
|
|
|
369724
369724
|
const iframeClasses = (0, classnames_1.default)(styles_module_scss_1.default.iframe, {
|
|
369725
369725
|
[styles_module_scss_1.default.codeHasBeenRun]: codeHasBeenRun,
|
|
369726
369726
|
});
|
|
369727
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.htmlrunnerContainer, children: [(0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Preview", icon: preview_svg_1.default, readOnly: readOnly, extraTabContent: codeHasBeenRun && openInNewTabLink, tabPanelClassName: styles_module_scss_1.default.previewHtml, children: error ? ((0, jsx_runtime_1.jsx)("div", { className: iframeClasses, children: (0, jsx_runtime_1.jsx)(NotFoundPage_1.NotFoundPage, {}) })) : ((0, jsx_runtime_1.jsx)("iframe", { className: iframeClasses, sandbox: "allow-scripts allow-same-origin allow-modals allow-popups allow-popups-to-escape-sandbox", referrerPolicy: "strict-origin-when-cross-origin", allow: "\
|
|
369727
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.htmlrunnerContainer, children: [(0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Preview", icon: preview_svg_1.default, readOnly: readOnly, extraTabContent: codeHasBeenRun && openInNewTabLink, tabPanelClassName: styles_module_scss_1.default.previewHtml, children: error ? ((0, jsx_runtime_1.jsx)("div", { className: iframeClasses, children: (0, jsx_runtime_1.jsx)(NotFoundPage_1.NotFoundPage, {}) })) : ((0, jsx_runtime_1.jsx)("iframe", { className: iframeClasses, sandbox: "allow-scripts allow-same-origin allow-modals allow-popups allow-popups-to-escape-sandbox", referrerPolicy: "strict-origin-when-cross-origin", allow: "\n accelerometer 'none';\n camera 'none';\n encrypted-media;\n fullscreen;\n picture-in-picture;\n geolocation 'none';\n gyroscope 'none';\n magnetometer 'none';\n microphone 'none';\n midi 'none';\n payment 'none';\n usb 'none';\n ", id: "output-frame", title: "HTML Output Preview", ref: output, onLoad: iframeReload, src: "about:blank" }, iframeKey)) }), !isPreviewMode && ((0, jsx_runtime_1.jsx)(ResizableWithHandle_1.default, { "data-testid": "proj-console-container", handleDirection: "top", defaultHeight: "50%", className: styles_module_scss_1.default.resizeContainer, handleClassName: styles_module_scss_1.default.resizeHandleContainer, children: (0, jsx_runtime_1.jsx)(OutputTabPanel_1.OutputTabPanel, { title: "Console", icon: console_svg_1.default, readOnly: readOnly, children: (0, jsx_runtime_1.jsx)(HtmlConsole_1.default, { consoleLogs: consoleLogs }) }) }))] }));
|
|
369728
369728
|
}
|
|
369729
369729
|
exports["default"] = HtmlRunner;
|
|
369730
369730
|
|
|
@@ -370119,234 +370119,234 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
370119
370119
|
exports.consoleOverrideScript = exports.disableLocalStorageScript = void 0;
|
|
370120
370120
|
// insert script to disable access to specific localStorage keys
|
|
370121
370121
|
// localstorage.getItem() is a potential security risk when executing untrusted code
|
|
370122
|
-
exports.disableLocalStorageScript = `
|
|
370123
|
-
<script>
|
|
370124
|
-
(function() {
|
|
370125
|
-
const originalGetItem = window.localStorage.getItem.bind(window.localStorage);
|
|
370126
|
-
const originalSetItem = window.localStorage.setItem.bind(window.localStorage);
|
|
370127
|
-
const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);
|
|
370128
|
-
const originalClear = window.localStorage.clear.bind(window.localStorage);
|
|
370129
|
-
|
|
370130
|
-
const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');
|
|
370131
|
-
|
|
370132
|
-
Object.defineProperty(window, 'localStorage', {
|
|
370133
|
-
value: {
|
|
370134
|
-
getItem: function(key) {
|
|
370135
|
-
if (isDisallowedKey(key)) {
|
|
370136
|
-
console.log(\`localStorage.getItem for "\${key}" is disabled\`);
|
|
370137
|
-
return null;
|
|
370138
|
-
}
|
|
370139
|
-
return originalGetItem(key);
|
|
370140
|
-
},
|
|
370141
|
-
setItem: function(key, value) {
|
|
370142
|
-
if (isDisallowedKey(key)) {
|
|
370143
|
-
console.log(\`localStorage.setItem for "\${key}" is disabled\`);
|
|
370144
|
-
return;
|
|
370145
|
-
}
|
|
370146
|
-
return originalSetItem(key, value);
|
|
370147
|
-
},
|
|
370148
|
-
removeItem: function(key) {
|
|
370149
|
-
if (isDisallowedKey(key)) {
|
|
370150
|
-
console.log(\`localStorage.removeItem for "\${key}" is disabled\`);
|
|
370151
|
-
return;
|
|
370152
|
-
}
|
|
370153
|
-
return originalRemoveItem(key);
|
|
370154
|
-
},
|
|
370155
|
-
clear: function() {
|
|
370156
|
-
console.log('localStorage.clear is disabled');
|
|
370157
|
-
return;
|
|
370158
|
-
}
|
|
370159
|
-
},
|
|
370160
|
-
writable: false,
|
|
370161
|
-
configurable: false
|
|
370162
|
-
});
|
|
370163
|
-
})();
|
|
370164
|
-
</script>
|
|
370122
|
+
exports.disableLocalStorageScript = `
|
|
370123
|
+
<script>
|
|
370124
|
+
(function() {
|
|
370125
|
+
const originalGetItem = window.localStorage.getItem.bind(window.localStorage);
|
|
370126
|
+
const originalSetItem = window.localStorage.setItem.bind(window.localStorage);
|
|
370127
|
+
const originalRemoveItem = window.localStorage.removeItem.bind(window.localStorage);
|
|
370128
|
+
const originalClear = window.localStorage.clear.bind(window.localStorage);
|
|
370129
|
+
|
|
370130
|
+
const isDisallowedKey = (key) => key === 'authKey' || key.startsWith('oidc.');
|
|
370131
|
+
|
|
370132
|
+
Object.defineProperty(window, 'localStorage', {
|
|
370133
|
+
value: {
|
|
370134
|
+
getItem: function(key) {
|
|
370135
|
+
if (isDisallowedKey(key)) {
|
|
370136
|
+
console.log(\`localStorage.getItem for "\${key}" is disabled\`);
|
|
370137
|
+
return null;
|
|
370138
|
+
}
|
|
370139
|
+
return originalGetItem(key);
|
|
370140
|
+
},
|
|
370141
|
+
setItem: function(key, value) {
|
|
370142
|
+
if (isDisallowedKey(key)) {
|
|
370143
|
+
console.log(\`localStorage.setItem for "\${key}" is disabled\`);
|
|
370144
|
+
return;
|
|
370145
|
+
}
|
|
370146
|
+
return originalSetItem(key, value);
|
|
370147
|
+
},
|
|
370148
|
+
removeItem: function(key) {
|
|
370149
|
+
if (isDisallowedKey(key)) {
|
|
370150
|
+
console.log(\`localStorage.removeItem for "\${key}" is disabled\`);
|
|
370151
|
+
return;
|
|
370152
|
+
}
|
|
370153
|
+
return originalRemoveItem(key);
|
|
370154
|
+
},
|
|
370155
|
+
clear: function() {
|
|
370156
|
+
console.log('localStorage.clear is disabled');
|
|
370157
|
+
return;
|
|
370158
|
+
}
|
|
370159
|
+
},
|
|
370160
|
+
writable: false,
|
|
370161
|
+
configurable: false
|
|
370162
|
+
});
|
|
370163
|
+
})();
|
|
370164
|
+
</script>
|
|
370165
370165
|
`;
|
|
370166
370166
|
const MAX_DEPTH = 5; // Maximum depth for object serialization to prevent infinite recursion
|
|
370167
370167
|
// Override console methods to send logs to parent window and serialize complex objects
|
|
370168
|
-
exports.consoleOverrideScript = `
|
|
370169
|
-
<script>
|
|
370170
|
-
(function() {
|
|
370171
|
-
const SerializedType = {
|
|
370172
|
-
Null: "null",
|
|
370173
|
-
Undefined: "undefined",
|
|
370174
|
-
Boolean: "boolean",
|
|
370175
|
-
Number: "number",
|
|
370176
|
-
String: "string",
|
|
370177
|
-
Array: "array",
|
|
370178
|
-
Object: "object",
|
|
370179
|
-
};
|
|
370180
|
-
|
|
370181
|
-
const original = {};
|
|
370182
|
-
const methods = ["log", "error", "warn", "info", "debug", "assert"];
|
|
370183
|
-
|
|
370184
|
-
function getTimestamp() {
|
|
370185
|
-
const now = new Date();
|
|
370186
|
-
const pad = (n) => String(n).padStart(2, '0');
|
|
370187
|
-
|
|
370188
|
-
return (
|
|
370189
|
-
now.getFullYear() + '-' +
|
|
370190
|
-
pad(now.getMonth() + 1) + '-' +
|
|
370191
|
-
pad(now.getDate()) + ' ' +
|
|
370192
|
-
pad(now.getHours()) + ':' +
|
|
370193
|
-
pad(now.getMinutes()) + ':' +
|
|
370194
|
-
pad(now.getSeconds()) + '.' +
|
|
370195
|
-
pad(Math.floor(now.getMilliseconds() / 10))
|
|
370196
|
-
);
|
|
370197
|
-
}
|
|
370198
|
-
|
|
370199
|
-
function serialize(arg, depth = 0, maxDepth = ${MAX_DEPTH}, visited = new WeakSet()) {
|
|
370200
|
-
if (depth > maxDepth) return { "type": SerializedType.String, "value": "[Max depth reached]" };
|
|
370201
|
-
|
|
370202
|
-
if (arg && typeof arg === "object") {
|
|
370203
|
-
if (visited.has(arg)) {
|
|
370204
|
-
return { "type": SerializedType.String, "value": "[Circular reference]" };
|
|
370205
|
-
}
|
|
370206
|
-
visited.add(arg);
|
|
370207
|
-
}
|
|
370208
|
-
|
|
370209
|
-
const type = typeof arg;
|
|
370210
|
-
if (arg === null) return { "type": SerializedType.Null, "value": "null" };
|
|
370211
|
-
if (arg === undefined) return { "type": SerializedType.Undefined, "value": "undefined" };
|
|
370212
|
-
if (type === "boolean") return { "type": SerializedType.Boolean, "value": String(arg) };
|
|
370213
|
-
if (type === "number") return { "type": SerializedType.Number, "value": String(arg) };
|
|
370214
|
-
if (type === "string") return { "type": SerializedType.String, "value": arg };
|
|
370215
|
-
|
|
370216
|
-
if (Array.isArray(arg)) {
|
|
370217
|
-
return {
|
|
370218
|
-
"type": SerializedType.Array,
|
|
370219
|
-
"value": arg.map(item => serialize(item, depth + 1, maxDepth))
|
|
370220
|
-
};
|
|
370221
|
-
}
|
|
370222
|
-
|
|
370223
|
-
if (type === "object" && arg !== null) {
|
|
370224
|
-
const props = {};
|
|
370225
|
-
try {
|
|
370226
|
-
for (let key in arg) {
|
|
370227
|
-
if (arg.hasOwnProperty(key)) {
|
|
370228
|
-
props[key] = serialize(arg[key], depth + 1, maxDepth, visited);
|
|
370229
|
-
}
|
|
370230
|
-
}
|
|
370231
|
-
} catch (error) {
|
|
370232
|
-
console.error("Error serializing object property:", error);
|
|
370233
|
-
}
|
|
370234
|
-
return { "type": SerializedType.Object, "value": props };
|
|
370235
|
-
}
|
|
370236
|
-
|
|
370237
|
-
return { "type": SerializedType.String, "value": String(arg) };
|
|
370238
|
-
}
|
|
370239
|
-
|
|
370240
|
-
methods.forEach(m => {
|
|
370241
|
-
original[m] = console[m] || function(){};
|
|
370242
|
-
|
|
370243
|
-
console[m] = function(...args) {
|
|
370244
|
-
const timestamp = getTimestamp();
|
|
370245
|
-
|
|
370246
|
-
let level = m;
|
|
370247
|
-
let serializedArgs = args.map(arg => serialize(arg));
|
|
370248
|
-
|
|
370249
|
-
if (m === "assert") {
|
|
370250
|
-
const condition = Boolean(args[0]);
|
|
370251
|
-
const messageArgs = args.slice(1);
|
|
370252
|
-
|
|
370253
|
-
serializedArgs =
|
|
370254
|
-
messageArgs.length > 0
|
|
370255
|
-
? messageArgs.map(arg => serialize(arg))
|
|
370256
|
-
: [
|
|
370257
|
-
{
|
|
370258
|
-
"type": "string",
|
|
370259
|
-
"value": condition ? "Assertion passed" : "Assertion failed",
|
|
370260
|
-
},
|
|
370261
|
-
];
|
|
370262
|
-
|
|
370263
|
-
level = condition ? "log" : "error";
|
|
370264
|
-
}
|
|
370265
|
-
|
|
370266
|
-
window.parent.postMessage({
|
|
370267
|
-
"type": "console",
|
|
370268
|
-
"method": level,
|
|
370269
|
-
"data": serializedArgs,
|
|
370270
|
-
"timestamp": timestamp
|
|
370271
|
-
}, "*");
|
|
370272
|
-
|
|
370273
|
-
original[m](...args);
|
|
370274
|
-
};
|
|
370275
|
-
});
|
|
370276
|
-
|
|
370277
|
-
window.addEventListener("error", function(event) {
|
|
370278
|
-
const timestamp = getTimestamp();
|
|
370279
|
-
const error = event.error;
|
|
370280
|
-
|
|
370281
|
-
let message;
|
|
370282
|
-
if (error && error.name && error.message) {
|
|
370283
|
-
message = error.name + ": " + error.message;
|
|
370284
|
-
} else if (event.message) {
|
|
370285
|
-
message = event.message;
|
|
370286
|
-
} else {
|
|
370287
|
-
message = "Unknown JavaScript error";
|
|
370288
|
-
}
|
|
370289
|
-
|
|
370290
|
-
let displayFilename = event.filename;
|
|
370291
|
-
|
|
370292
|
-
if (
|
|
370293
|
-
typeof displayFilename === "string" &&
|
|
370294
|
-
displayFilename.startsWith("blob:")
|
|
370295
|
-
) {
|
|
370296
|
-
const sourceMap = window.__blobSourceMap__ || {};
|
|
370297
|
-
const mappedFilename = sourceMap[displayFilename];
|
|
370298
|
-
|
|
370299
|
-
if (mappedFilename) {
|
|
370300
|
-
displayFilename = mappedFilename;
|
|
370301
|
-
} else {
|
|
370302
|
-
const meta = document.querySelector("meta[filename]");
|
|
370303
|
-
displayFilename =
|
|
370304
|
-
(meta && meta.getAttribute("filename")) || "preview";
|
|
370305
|
-
}
|
|
370306
|
-
}
|
|
370307
|
-
|
|
370308
|
-
const location =
|
|
370309
|
-
displayFilename || event.lineno || event.colno
|
|
370310
|
-
? " at " +
|
|
370311
|
-
[displayFilename, event.lineno, event.colno]
|
|
370312
|
-
.filter(Boolean)
|
|
370313
|
-
.join(":")
|
|
370314
|
-
: "";
|
|
370315
|
-
|
|
370316
|
-
window.parent.postMessage({
|
|
370317
|
-
"type": "console",
|
|
370318
|
-
"method": "error",
|
|
370319
|
-
"data": [
|
|
370320
|
-
{ "type": "string", "value": message + location }
|
|
370321
|
-
],
|
|
370322
|
-
"timestamp": timestamp
|
|
370323
|
-
}, "*");
|
|
370324
|
-
});
|
|
370325
|
-
|
|
370326
|
-
window.addEventListener("unhandledrejection", function(event) {
|
|
370327
|
-
const timestamp = getTimestamp();
|
|
370328
|
-
const reason = event.reason;
|
|
370329
|
-
|
|
370330
|
-
let message;
|
|
370331
|
-
if (reason && reason.name && reason.message) {
|
|
370332
|
-
message = reason.name + ": " + reason.message;
|
|
370333
|
-
} else if (typeof reason === "string") {
|
|
370334
|
-
message = "UnhandledPromiseRejection: " + reason;
|
|
370335
|
-
} else {
|
|
370336
|
-
message = "UnhandledPromiseRejection: " + String(reason);
|
|
370337
|
-
}
|
|
370338
|
-
|
|
370339
|
-
window.parent.postMessage({
|
|
370340
|
-
"type": "console",
|
|
370341
|
-
"method": "error",
|
|
370342
|
-
"data": [
|
|
370343
|
-
{ "type": "string", "value": message }
|
|
370344
|
-
],
|
|
370345
|
-
"timestamp": timestamp
|
|
370346
|
-
}, "*");
|
|
370347
|
-
});
|
|
370348
|
-
})();
|
|
370349
|
-
</script>
|
|
370168
|
+
exports.consoleOverrideScript = `
|
|
370169
|
+
<script>
|
|
370170
|
+
(function() {
|
|
370171
|
+
const SerializedType = {
|
|
370172
|
+
Null: "null",
|
|
370173
|
+
Undefined: "undefined",
|
|
370174
|
+
Boolean: "boolean",
|
|
370175
|
+
Number: "number",
|
|
370176
|
+
String: "string",
|
|
370177
|
+
Array: "array",
|
|
370178
|
+
Object: "object",
|
|
370179
|
+
};
|
|
370180
|
+
|
|
370181
|
+
const original = {};
|
|
370182
|
+
const methods = ["log", "error", "warn", "info", "debug", "assert"];
|
|
370183
|
+
|
|
370184
|
+
function getTimestamp() {
|
|
370185
|
+
const now = new Date();
|
|
370186
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
370187
|
+
|
|
370188
|
+
return (
|
|
370189
|
+
now.getFullYear() + '-' +
|
|
370190
|
+
pad(now.getMonth() + 1) + '-' +
|
|
370191
|
+
pad(now.getDate()) + ' ' +
|
|
370192
|
+
pad(now.getHours()) + ':' +
|
|
370193
|
+
pad(now.getMinutes()) + ':' +
|
|
370194
|
+
pad(now.getSeconds()) + '.' +
|
|
370195
|
+
pad(Math.floor(now.getMilliseconds() / 10))
|
|
370196
|
+
);
|
|
370197
|
+
}
|
|
370198
|
+
|
|
370199
|
+
function serialize(arg, depth = 0, maxDepth = ${MAX_DEPTH}, visited = new WeakSet()) {
|
|
370200
|
+
if (depth > maxDepth) return { "type": SerializedType.String, "value": "[Max depth reached]" };
|
|
370201
|
+
|
|
370202
|
+
if (arg && typeof arg === "object") {
|
|
370203
|
+
if (visited.has(arg)) {
|
|
370204
|
+
return { "type": SerializedType.String, "value": "[Circular reference]" };
|
|
370205
|
+
}
|
|
370206
|
+
visited.add(arg);
|
|
370207
|
+
}
|
|
370208
|
+
|
|
370209
|
+
const type = typeof arg;
|
|
370210
|
+
if (arg === null) return { "type": SerializedType.Null, "value": "null" };
|
|
370211
|
+
if (arg === undefined) return { "type": SerializedType.Undefined, "value": "undefined" };
|
|
370212
|
+
if (type === "boolean") return { "type": SerializedType.Boolean, "value": String(arg) };
|
|
370213
|
+
if (type === "number") return { "type": SerializedType.Number, "value": String(arg) };
|
|
370214
|
+
if (type === "string") return { "type": SerializedType.String, "value": arg };
|
|
370215
|
+
|
|
370216
|
+
if (Array.isArray(arg)) {
|
|
370217
|
+
return {
|
|
370218
|
+
"type": SerializedType.Array,
|
|
370219
|
+
"value": arg.map(item => serialize(item, depth + 1, maxDepth))
|
|
370220
|
+
};
|
|
370221
|
+
}
|
|
370222
|
+
|
|
370223
|
+
if (type === "object" && arg !== null) {
|
|
370224
|
+
const props = {};
|
|
370225
|
+
try {
|
|
370226
|
+
for (let key in arg) {
|
|
370227
|
+
if (arg.hasOwnProperty(key)) {
|
|
370228
|
+
props[key] = serialize(arg[key], depth + 1, maxDepth, visited);
|
|
370229
|
+
}
|
|
370230
|
+
}
|
|
370231
|
+
} catch (error) {
|
|
370232
|
+
console.error("Error serializing object property:", error);
|
|
370233
|
+
}
|
|
370234
|
+
return { "type": SerializedType.Object, "value": props };
|
|
370235
|
+
}
|
|
370236
|
+
|
|
370237
|
+
return { "type": SerializedType.String, "value": String(arg) };
|
|
370238
|
+
}
|
|
370239
|
+
|
|
370240
|
+
methods.forEach(m => {
|
|
370241
|
+
original[m] = console[m] || function(){};
|
|
370242
|
+
|
|
370243
|
+
console[m] = function(...args) {
|
|
370244
|
+
const timestamp = getTimestamp();
|
|
370245
|
+
|
|
370246
|
+
let level = m;
|
|
370247
|
+
let serializedArgs = args.map(arg => serialize(arg));
|
|
370248
|
+
|
|
370249
|
+
if (m === "assert") {
|
|
370250
|
+
const condition = Boolean(args[0]);
|
|
370251
|
+
const messageArgs = args.slice(1);
|
|
370252
|
+
|
|
370253
|
+
serializedArgs =
|
|
370254
|
+
messageArgs.length > 0
|
|
370255
|
+
? messageArgs.map(arg => serialize(arg))
|
|
370256
|
+
: [
|
|
370257
|
+
{
|
|
370258
|
+
"type": "string",
|
|
370259
|
+
"value": condition ? "Assertion passed" : "Assertion failed",
|
|
370260
|
+
},
|
|
370261
|
+
];
|
|
370262
|
+
|
|
370263
|
+
level = condition ? "log" : "error";
|
|
370264
|
+
}
|
|
370265
|
+
|
|
370266
|
+
window.parent.postMessage({
|
|
370267
|
+
"type": "console",
|
|
370268
|
+
"method": level,
|
|
370269
|
+
"data": serializedArgs,
|
|
370270
|
+
"timestamp": timestamp
|
|
370271
|
+
}, "*");
|
|
370272
|
+
|
|
370273
|
+
original[m](...args);
|
|
370274
|
+
};
|
|
370275
|
+
});
|
|
370276
|
+
|
|
370277
|
+
window.addEventListener("error", function(event) {
|
|
370278
|
+
const timestamp = getTimestamp();
|
|
370279
|
+
const error = event.error;
|
|
370280
|
+
|
|
370281
|
+
let message;
|
|
370282
|
+
if (error && error.name && error.message) {
|
|
370283
|
+
message = error.name + ": " + error.message;
|
|
370284
|
+
} else if (event.message) {
|
|
370285
|
+
message = event.message;
|
|
370286
|
+
} else {
|
|
370287
|
+
message = "Unknown JavaScript error";
|
|
370288
|
+
}
|
|
370289
|
+
|
|
370290
|
+
let displayFilename = event.filename;
|
|
370291
|
+
|
|
370292
|
+
if (
|
|
370293
|
+
typeof displayFilename === "string" &&
|
|
370294
|
+
displayFilename.startsWith("blob:")
|
|
370295
|
+
) {
|
|
370296
|
+
const sourceMap = window.__blobSourceMap__ || {};
|
|
370297
|
+
const mappedFilename = sourceMap[displayFilename];
|
|
370298
|
+
|
|
370299
|
+
if (mappedFilename) {
|
|
370300
|
+
displayFilename = mappedFilename;
|
|
370301
|
+
} else {
|
|
370302
|
+
const meta = document.querySelector("meta[filename]");
|
|
370303
|
+
displayFilename =
|
|
370304
|
+
(meta && meta.getAttribute("filename")) || "preview";
|
|
370305
|
+
}
|
|
370306
|
+
}
|
|
370307
|
+
|
|
370308
|
+
const location =
|
|
370309
|
+
displayFilename || event.lineno || event.colno
|
|
370310
|
+
? " at " +
|
|
370311
|
+
[displayFilename, event.lineno, event.colno]
|
|
370312
|
+
.filter(Boolean)
|
|
370313
|
+
.join(":")
|
|
370314
|
+
: "";
|
|
370315
|
+
|
|
370316
|
+
window.parent.postMessage({
|
|
370317
|
+
"type": "console",
|
|
370318
|
+
"method": "error",
|
|
370319
|
+
"data": [
|
|
370320
|
+
{ "type": "string", "value": message + location }
|
|
370321
|
+
],
|
|
370322
|
+
"timestamp": timestamp
|
|
370323
|
+
}, "*");
|
|
370324
|
+
});
|
|
370325
|
+
|
|
370326
|
+
window.addEventListener("unhandledrejection", function(event) {
|
|
370327
|
+
const timestamp = getTimestamp();
|
|
370328
|
+
const reason = event.reason;
|
|
370329
|
+
|
|
370330
|
+
let message;
|
|
370331
|
+
if (reason && reason.name && reason.message) {
|
|
370332
|
+
message = reason.name + ": " + reason.message;
|
|
370333
|
+
} else if (typeof reason === "string") {
|
|
370334
|
+
message = "UnhandledPromiseRejection: " + reason;
|
|
370335
|
+
} else {
|
|
370336
|
+
message = "UnhandledPromiseRejection: " + String(reason);
|
|
370337
|
+
}
|
|
370338
|
+
|
|
370339
|
+
window.parent.postMessage({
|
|
370340
|
+
"type": "console",
|
|
370341
|
+
"method": "error",
|
|
370342
|
+
"data": [
|
|
370343
|
+
{ "type": "string", "value": message }
|
|
370344
|
+
],
|
|
370345
|
+
"timestamp": timestamp
|
|
370346
|
+
}, "*");
|
|
370347
|
+
});
|
|
370348
|
+
})();
|
|
370349
|
+
</script>
|
|
370350
370350
|
`;
|
|
370351
370351
|
|
|
370352
370352
|
|
|
@@ -373005,8 +373005,12 @@ const Sidebar = ({ options = [], curriculumComponent = null, }) => {
|
|
|
373005
373005
|
}
|
|
373006
373006
|
};
|
|
373007
373007
|
const activeOption = menuOptions.find((opt) => opt.name === option);
|
|
373008
|
+
// Use CustomSidebarPanel only for non-curriculum panels. The curriculum panel
|
|
373009
|
+
// must be rendered as <CurriculumPanel> directly (a stable component type)
|
|
373010
|
+
// rather than through an anonymous arrow function stored in getSidebarOptions.
|
|
373011
|
+
// An anonymous function creates a NEW component type on every Sidebar render.
|
|
373008
373012
|
const CustomSidebarPanel = activeOption?.panel || (() => null);
|
|
373009
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.sidebar), children: [(0, jsx_runtime_1.jsx)(SidebarBar_1.default, { menuOptions: menuOptions, option: option, toggleOption: toggleOption }), option && (0, jsx_runtime_1.jsx)(CustomSidebarPanel, {})] }));
|
|
373013
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.sidebar), children: [(0, jsx_runtime_1.jsx)(SidebarBar_1.default, { menuOptions: menuOptions, option: option, toggleOption: toggleOption }), option === PanelNames.CURRICULUM ? ((0, jsx_runtime_1.jsx)(CurriculumPanel_1.default, { curriculumContent: curriculumComponent })) : (option && (0, jsx_runtime_1.jsx)(CustomSidebarPanel, {}))] }));
|
|
373010
373014
|
};
|
|
373011
373015
|
exports["default"] = Sidebar;
|
|
373012
373016
|
|
|
@@ -373721,7 +373725,7 @@ const WebComponentProject = ({ nameEditable = false, sidebarOptions = [], packag
|
|
|
373721
373725
|
return () => clearTimeout(timeout);
|
|
373722
373726
|
}, [project]);
|
|
373723
373727
|
renderer.link = function (data) {
|
|
373724
|
-
return `<a href="${data.href}" target="_blank" rel="noreferrer"
|
|
373728
|
+
return `<a href="${data.href}" target="_blank" rel="noreferrer"
|
|
373725
373729
|
}">${data.text}</a>`;
|
|
373726
373730
|
};
|
|
373727
373731
|
marked_1.marked.setOptions({
|
|
@@ -373962,10 +373966,10 @@ const WebComponentLoader = (props) => {
|
|
|
373962
373966
|
(0, react_1.useEffect)(() => {
|
|
373963
373967
|
// Create a script element to save the existing Prism object if there is one
|
|
373964
373968
|
const script = document.createElement("script");
|
|
373965
|
-
script.textContent = `
|
|
373966
|
-
if (window.Prism) {
|
|
373967
|
-
window.syntaxHighlight = window.Prism;
|
|
373968
|
-
}
|
|
373969
|
+
script.textContent = `
|
|
373970
|
+
if (window.Prism) {
|
|
373971
|
+
window.syntaxHighlight = window.Prism;
|
|
373972
|
+
}
|
|
373969
373973
|
`;
|
|
373970
373974
|
// Append the script to the document body
|
|
373971
373975
|
document.body.appendChild(script);
|
|
@@ -385172,7 +385176,7 @@ module.exports = webpackAsyncContext;
|
|
|
385172
385176
|
/***/ 24427:
|
|
385173
385177
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
385174
385178
|
|
|
385175
|
-
module.exports = __webpack_require__.p + "assets/
|
|
385179
|
+
module.exports = __webpack_require__.p + "assets/PyodideWorkerb1409749c37aedc47dc8.js";
|
|
385176
385180
|
|
|
385177
385181
|
/***/ }),
|
|
385178
385182
|
|