@decidables/prospectable-elements 0.5.1 → 0.6.0
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/CHANGELOG.md +23 -0
- package/lib/prospectableElements.esm.js +948 -972
- package/lib/prospectableElements.esm.js.map +1 -1
- package/lib/prospectableElements.esm.min.js +199 -223
- package/lib/prospectableElements.esm.min.js.map +1 -1
- package/lib/prospectableElements.umd.js +948 -972
- package/lib/prospectableElements.umd.js.map +1 -1
- package/lib/prospectableElements.umd.min.js +199 -223
- package/lib/prospectableElements.umd.min.js.map +1 -1
- package/package.json +8 -7
- package/src/components/cpt-parameters.js +1 -0
- package/src/components/cpt-probability.js +7 -7
- package/src/components/cpt-space.js +99 -25
- package/src/components/cpt-value.js +8 -8
- package/src/components/decision-space.js +99 -25
- package/src/components/prospectable-response.js +2 -0
- package/src/components/risky-option.js +18 -21
- package/src/equations/cpt-equation.js +2 -0
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
hasChanged: f$3
|
|
114
114
|
};
|
|
115
115
|
Symbol.metadata ??= Symbol("metadata"), a$3.litPropertyMetadata ??= new WeakMap();
|
|
116
|
-
let y$
|
|
116
|
+
let y$2 = class y extends HTMLElement {
|
|
117
117
|
static addInitializer(t) {
|
|
118
118
|
this._$Ei(), (this.l ??= []).push(t);
|
|
119
119
|
}
|
|
@@ -317,10 +317,10 @@
|
|
|
317
317
|
updated(t) {}
|
|
318
318
|
firstUpdated(t) {}
|
|
319
319
|
};
|
|
320
|
-
y$
|
|
320
|
+
y$2.elementStyles = [], y$2.shadowRootOptions = {
|
|
321
321
|
mode: "open"
|
|
322
|
-
}, y$
|
|
323
|
-
ReactiveElement: y$
|
|
322
|
+
}, y$2[d$2("elementProperties")] = new Map(), y$2[d$2("finalized")] = new Map(), p$1?.({
|
|
323
|
+
ReactiveElement: y$2
|
|
324
324
|
}), (a$3.reactiveElementVersions ??= []).push("2.1.1");
|
|
325
325
|
|
|
326
326
|
/**
|
|
@@ -350,13 +350,13 @@
|
|
|
350
350
|
p = /'/g,
|
|
351
351
|
g$1 = /"/g,
|
|
352
352
|
$ = /^(?:script|style|textarea|title)$/i,
|
|
353
|
-
y$
|
|
353
|
+
y$1 = t => (i, ...s) => ({
|
|
354
354
|
_$litType$: t,
|
|
355
355
|
strings: i,
|
|
356
356
|
values: s
|
|
357
357
|
}),
|
|
358
|
-
x$
|
|
359
|
-
b$1 = y$
|
|
358
|
+
x$2 = y$1(1),
|
|
359
|
+
b$1 = y$1(2),
|
|
360
360
|
T = Symbol.for("lit-noChange"),
|
|
361
361
|
E$1 = Symbol.for("lit-nothing"),
|
|
362
362
|
A$2 = new WeakMap(),
|
|
@@ -478,7 +478,7 @@
|
|
|
478
478
|
for (; void 0 !== l;) {
|
|
479
479
|
if (o === l.index) {
|
|
480
480
|
let i;
|
|
481
|
-
2 === l.type ? i = new R(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new z
|
|
481
|
+
2 === l.type ? i = new R(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new z(h, this, t)), this._$AV.push(i), l = s[++n];
|
|
482
482
|
}
|
|
483
483
|
o !== l?.index && (h = C$1.nextNode(), o++);
|
|
484
484
|
}
|
|
@@ -608,7 +608,7 @@
|
|
|
608
608
|
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
|
-
|
|
611
|
+
class z {
|
|
612
612
|
constructor(t, i, s) {
|
|
613
613
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
614
614
|
}
|
|
@@ -618,7 +618,7 @@
|
|
|
618
618
|
_$AI(t) {
|
|
619
619
|
S(this, t);
|
|
620
620
|
}
|
|
621
|
-
}
|
|
621
|
+
}
|
|
622
622
|
const j$1 = t$1.litHtmlPolyfillSupport;
|
|
623
623
|
j$1?.(N$1, R), (t$1.litHtmlVersions ??= []).push("3.3.1");
|
|
624
624
|
const B$1 = (t, i, s) => {
|
|
@@ -637,7 +637,7 @@
|
|
|
637
637
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
638
638
|
*/
|
|
639
639
|
const s$2 = globalThis;
|
|
640
|
-
let i$2 = class i extends y$
|
|
640
|
+
let i$2 = class i extends y$2 {
|
|
641
641
|
constructor() {
|
|
642
642
|
super(...arguments), this.renderOptions = {
|
|
643
643
|
host: this
|
|
@@ -1022,7 +1022,7 @@
|
|
|
1022
1022
|
return Array.from(keys, key => source[key]);
|
|
1023
1023
|
}
|
|
1024
1024
|
|
|
1025
|
-
function sort$
|
|
1025
|
+
function sort$1(values, ...F) {
|
|
1026
1026
|
if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable");
|
|
1027
1027
|
values = Array.from(values);
|
|
1028
1028
|
let [f] = F;
|
|
@@ -1058,7 +1058,7 @@
|
|
|
1058
1058
|
}
|
|
1059
1059
|
|
|
1060
1060
|
function groupSort(values, reduce, key) {
|
|
1061
|
-
return (reduce.length !== 2 ? sort$
|
|
1061
|
+
return (reduce.length !== 2 ? sort$1(rollup(values, reduce, key), ([ak, av], [bk, bv]) => ascending$1(av, bv) || ascending$1(ak, bk)) : sort$1(group(values, key), ([ak, av], [bk, bv]) => reduce(av, bv) || ascending$1(ak, bk))).map(([key]) => key);
|
|
1062
1062
|
}
|
|
1063
1063
|
|
|
1064
1064
|
const e10 = Math.sqrt(50),
|
|
@@ -7246,7 +7246,7 @@
|
|
|
7246
7246
|
};
|
|
7247
7247
|
return scale;
|
|
7248
7248
|
}
|
|
7249
|
-
function point$
|
|
7249
|
+
function point$4() {
|
|
7250
7250
|
return pointish(band.apply(null, arguments).paddingInner(1));
|
|
7251
7251
|
}
|
|
7252
7252
|
|
|
@@ -9252,21 +9252,21 @@
|
|
|
9252
9252
|
return new Linear(context);
|
|
9253
9253
|
}
|
|
9254
9254
|
|
|
9255
|
-
function x$
|
|
9255
|
+
function x$1(p) {
|
|
9256
9256
|
return p[0];
|
|
9257
9257
|
}
|
|
9258
|
-
function y
|
|
9258
|
+
function y(p) {
|
|
9259
9259
|
return p[1];
|
|
9260
9260
|
}
|
|
9261
9261
|
|
|
9262
|
-
function shapeLine (x, y) {
|
|
9262
|
+
function shapeLine (x, y$1) {
|
|
9263
9263
|
var defined = constant$1(true),
|
|
9264
9264
|
context = null,
|
|
9265
9265
|
curve = curveLinear,
|
|
9266
9266
|
output = null,
|
|
9267
9267
|
path = withPath(line);
|
|
9268
|
-
x = typeof x === "function" ? x : x === undefined ? x$
|
|
9269
|
-
y = typeof y === "function" ? y : y === undefined ? y
|
|
9268
|
+
x = typeof x === "function" ? x : x === undefined ? x$1 : constant$1(x);
|
|
9269
|
+
y$1 = typeof y$1 === "function" ? y$1 : y$1 === undefined ? y : constant$1(y$1);
|
|
9270
9270
|
function line(data) {
|
|
9271
9271
|
var i,
|
|
9272
9272
|
n = (data = array(data)).length,
|
|
@@ -9278,7 +9278,7 @@
|
|
|
9278
9278
|
if (!(i < n && defined(d = data[i], i, data)) === defined0) {
|
|
9279
9279
|
if (defined0 = !defined0) output.lineStart();else output.lineEnd();
|
|
9280
9280
|
}
|
|
9281
|
-
if (defined0) output.point(+x(d, i, data), +y(d, i, data));
|
|
9281
|
+
if (defined0) output.point(+x(d, i, data), +y$1(d, i, data));
|
|
9282
9282
|
}
|
|
9283
9283
|
if (buffer) return output = null, buffer + "" || null;
|
|
9284
9284
|
}
|
|
@@ -9286,7 +9286,7 @@
|
|
|
9286
9286
|
return arguments.length ? (x = typeof _ === "function" ? _ : constant$1(+_), line) : x;
|
|
9287
9287
|
};
|
|
9288
9288
|
line.y = function (_) {
|
|
9289
|
-
return arguments.length ? (y = typeof _ === "function" ? _ : constant$1(+_), line) : y;
|
|
9289
|
+
return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant$1(+_), line) : y$1;
|
|
9290
9290
|
};
|
|
9291
9291
|
line.defined = function (_) {
|
|
9292
9292
|
return arguments.length ? (defined = typeof _ === "function" ? _ : constant$1(!!_), line) : defined;
|
|
@@ -9608,7 +9608,7 @@
|
|
|
9608
9608
|
|
|
9609
9609
|
function noop () {}
|
|
9610
9610
|
|
|
9611
|
-
function point$
|
|
9611
|
+
function point$3(that, x, y) {
|
|
9612
9612
|
that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6);
|
|
9613
9613
|
}
|
|
9614
9614
|
function Basis(context) {
|
|
@@ -9628,7 +9628,7 @@
|
|
|
9628
9628
|
lineEnd: function () {
|
|
9629
9629
|
switch (this._point) {
|
|
9630
9630
|
case 3:
|
|
9631
|
-
point$
|
|
9631
|
+
point$3(this, this._x1, this._y1);
|
|
9632
9632
|
// falls through
|
|
9633
9633
|
case 2:
|
|
9634
9634
|
this._context.lineTo(this._x1, this._y1);
|
|
@@ -9652,7 +9652,7 @@
|
|
|
9652
9652
|
this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
|
|
9653
9653
|
// falls through
|
|
9654
9654
|
default:
|
|
9655
|
-
point$
|
|
9655
|
+
point$3(this, x, y);
|
|
9656
9656
|
break;
|
|
9657
9657
|
}
|
|
9658
9658
|
this._x0 = this._x1, this._x1 = x;
|
|
@@ -9714,7 +9714,7 @@
|
|
|
9714
9714
|
this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6);
|
|
9715
9715
|
break;
|
|
9716
9716
|
default:
|
|
9717
|
-
point$
|
|
9717
|
+
point$3(this, x, y);
|
|
9718
9718
|
break;
|
|
9719
9719
|
}
|
|
9720
9720
|
this._x0 = this._x1, this._x1 = x;
|
|
@@ -9762,7 +9762,7 @@
|
|
|
9762
9762
|
this._point = 4;
|
|
9763
9763
|
// falls through
|
|
9764
9764
|
default:
|
|
9765
|
-
point$
|
|
9765
|
+
point$3(this, x, y);
|
|
9766
9766
|
break;
|
|
9767
9767
|
}
|
|
9768
9768
|
this._x0 = this._x1, this._x1 = x;
|
|
@@ -9817,7 +9817,7 @@
|
|
|
9817
9817
|
return bundle;
|
|
9818
9818
|
})(0.85);
|
|
9819
9819
|
|
|
9820
|
-
function point$
|
|
9820
|
+
function point$2(that, x, y) {
|
|
9821
9821
|
that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2);
|
|
9822
9822
|
}
|
|
9823
9823
|
function Cardinal(context, tension) {
|
|
@@ -9841,7 +9841,7 @@
|
|
|
9841
9841
|
this._context.lineTo(this._x2, this._y2);
|
|
9842
9842
|
break;
|
|
9843
9843
|
case 3:
|
|
9844
|
-
point$
|
|
9844
|
+
point$2(this, this._x1, this._y1);
|
|
9845
9845
|
break;
|
|
9846
9846
|
}
|
|
9847
9847
|
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
@@ -9862,7 +9862,7 @@
|
|
|
9862
9862
|
this._point = 3;
|
|
9863
9863
|
// falls through
|
|
9864
9864
|
default:
|
|
9865
|
-
point$
|
|
9865
|
+
point$2(this, x, y);
|
|
9866
9866
|
break;
|
|
9867
9867
|
}
|
|
9868
9868
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
@@ -9929,7 +9929,7 @@
|
|
|
9929
9929
|
this._x5 = x, this._y5 = y;
|
|
9930
9930
|
break;
|
|
9931
9931
|
default:
|
|
9932
|
-
point$
|
|
9932
|
+
point$2(this, x, y);
|
|
9933
9933
|
break;
|
|
9934
9934
|
}
|
|
9935
9935
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
@@ -9982,7 +9982,7 @@
|
|
|
9982
9982
|
this._point = 4;
|
|
9983
9983
|
// falls through
|
|
9984
9984
|
default:
|
|
9985
|
-
point$
|
|
9985
|
+
point$2(this, x, y);
|
|
9986
9986
|
break;
|
|
9987
9987
|
}
|
|
9988
9988
|
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
|
|
@@ -9999,7 +9999,7 @@
|
|
|
9999
9999
|
return cardinal;
|
|
10000
10000
|
})(0);
|
|
10001
10001
|
|
|
10002
|
-
function point$
|
|
10002
|
+
function point$1(that, x, y) {
|
|
10003
10003
|
var x1 = that._x1,
|
|
10004
10004
|
y1 = that._y1,
|
|
10005
10005
|
x2 = that._x2,
|
|
@@ -10064,7 +10064,7 @@
|
|
|
10064
10064
|
this._point = 3;
|
|
10065
10065
|
// falls through
|
|
10066
10066
|
default:
|
|
10067
|
-
point$
|
|
10067
|
+
point$1(this, x, y);
|
|
10068
10068
|
break;
|
|
10069
10069
|
}
|
|
10070
10070
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
@@ -10138,7 +10138,7 @@
|
|
|
10138
10138
|
this._x5 = x, this._y5 = y;
|
|
10139
10139
|
break;
|
|
10140
10140
|
default:
|
|
10141
|
-
point$
|
|
10141
|
+
point$1(this, x, y);
|
|
10142
10142
|
break;
|
|
10143
10143
|
}
|
|
10144
10144
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
@@ -10198,7 +10198,7 @@
|
|
|
10198
10198
|
this._point = 4;
|
|
10199
10199
|
// falls through
|
|
10200
10200
|
default:
|
|
10201
|
-
point$
|
|
10201
|
+
point$1(this, x, y);
|
|
10202
10202
|
break;
|
|
10203
10203
|
}
|
|
10204
10204
|
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
@@ -10264,7 +10264,7 @@
|
|
|
10264
10264
|
// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
|
|
10265
10265
|
// "you can express cubic Hermite interpolation in terms of cubic Bézier curves
|
|
10266
10266
|
// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
|
|
10267
|
-
function point
|
|
10267
|
+
function point(that, t0, t1) {
|
|
10268
10268
|
var x0 = that._x0,
|
|
10269
10269
|
y0 = that._y0,
|
|
10270
10270
|
x1 = that._x1,
|
|
@@ -10292,7 +10292,7 @@
|
|
|
10292
10292
|
this._context.lineTo(this._x1, this._y1);
|
|
10293
10293
|
break;
|
|
10294
10294
|
case 3:
|
|
10295
|
-
point
|
|
10295
|
+
point(this, this._t0, slope2(this, this._t0));
|
|
10296
10296
|
break;
|
|
10297
10297
|
}
|
|
10298
10298
|
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
@@ -10312,10 +10312,10 @@
|
|
|
10312
10312
|
break;
|
|
10313
10313
|
case 2:
|
|
10314
10314
|
this._point = 3;
|
|
10315
|
-
point
|
|
10315
|
+
point(this, slope2(this, t1 = slope3(this, x, y)), t1);
|
|
10316
10316
|
break;
|
|
10317
10317
|
default:
|
|
10318
|
-
point
|
|
10318
|
+
point(this, this._t0, t1 = slope3(this, x, y));
|
|
10319
10319
|
break;
|
|
10320
10320
|
}
|
|
10321
10321
|
this._x0 = this._x1, this._x1 = x;
|
|
@@ -10522,18 +10522,6 @@
|
|
|
10522
10522
|
getComputedStyleValue(property) {
|
|
10523
10523
|
return getComputedStyle(this).getPropertyValue(property).trim();
|
|
10524
10524
|
}
|
|
10525
|
-
firstUpdated(changedProperties) {
|
|
10526
|
-
super.firstUpdated(changedProperties);
|
|
10527
|
-
|
|
10528
|
-
// Use focus highlighting if keyboard is used at all
|
|
10529
|
-
select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
|
|
10530
|
-
const element = event.currentTarget;
|
|
10531
|
-
select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
|
|
10532
|
-
}).on('keydown.keyboard', event => {
|
|
10533
|
-
const element = event.currentTarget;
|
|
10534
|
-
select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
|
|
10535
|
-
});
|
|
10536
|
-
}
|
|
10537
10525
|
static get greys() {
|
|
10538
10526
|
const grey = '#999999';
|
|
10539
10527
|
const greys = {};
|
|
@@ -10669,7 +10657,7 @@
|
|
|
10669
10657
|
};
|
|
10670
10658
|
/* eslint-enable key-spacing, object-curly-newline */
|
|
10671
10659
|
}
|
|
10672
|
-
static cssBoxShadow(elevation,
|
|
10660
|
+
static cssBoxShadow(elevation, inverse = false) {
|
|
10673
10661
|
const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
|
|
10674
10662
|
const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
|
|
10675
10663
|
const ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
|
|
@@ -10679,9 +10667,9 @@
|
|
|
10679
10667
|
const umbraM = this.shadows.mapUmbra[elevation];
|
|
10680
10668
|
const penumbraM = this.shadows.mapPenumbra[elevation];
|
|
10681
10669
|
const ambientM = this.shadows.mapAmbient[elevation];
|
|
10682
|
-
const umbraS =
|
|
10683
|
-
const penumbraS =
|
|
10684
|
-
const ambientS =
|
|
10670
|
+
const umbraS = `${umbraM.y / 2}px ${umbraM.y}px ${umbraM.b}px ${umbraM.s}px`;
|
|
10671
|
+
const penumbraS = `${penumbraM.y / 2}px ${penumbraM.y}px ${penumbraM.b}px ${penumbraM.s}px`;
|
|
10672
|
+
const ambientS = `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
|
|
10685
10673
|
return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
|
|
10686
10674
|
}
|
|
10687
10675
|
static get svgFilters() {
|
|
@@ -10817,55 +10805,64 @@
|
|
|
10817
10805
|
button {
|
|
10818
10806
|
width: 100%;
|
|
10819
10807
|
height: 100%;
|
|
10808
|
+
|
|
10820
10809
|
padding: 0.375rem 0.75rem;
|
|
10821
10810
|
|
|
10822
10811
|
font-family: var(---font-family-base);
|
|
10823
10812
|
font-size: 1.125rem;
|
|
10813
|
+
|
|
10824
10814
|
line-height: 1.5;
|
|
10815
|
+
|
|
10825
10816
|
color: var(---color-text-inverse);
|
|
10826
10817
|
|
|
10818
|
+
outline: none;
|
|
10819
|
+
|
|
10827
10820
|
border: 0;
|
|
10828
10821
|
border-radius: var(---border-radius);
|
|
10829
|
-
outline: none;
|
|
10830
10822
|
}
|
|
10831
10823
|
|
|
10832
10824
|
button:disabled {
|
|
10833
|
-
background-color: var(---decidables-button-background-color-disabled);
|
|
10834
10825
|
outline: none;
|
|
10826
|
+
|
|
10827
|
+
background-color: var(---decidables-button-background-color-disabled);
|
|
10835
10828
|
box-shadow: none;
|
|
10836
10829
|
}
|
|
10837
10830
|
|
|
10838
10831
|
button:enabled {
|
|
10839
10832
|
cursor: pointer;
|
|
10833
|
+
outline: none;
|
|
10840
10834
|
|
|
10841
10835
|
background-color: var(---decidables-button-background-color-enabled);
|
|
10842
|
-
outline: none;
|
|
10843
10836
|
box-shadow: var(---shadow-2);
|
|
10844
10837
|
}
|
|
10845
10838
|
|
|
10846
10839
|
button:enabled:hover {
|
|
10847
10840
|
outline: none;
|
|
10841
|
+
|
|
10848
10842
|
box-shadow: var(---shadow-4);
|
|
10849
10843
|
}
|
|
10850
10844
|
|
|
10851
10845
|
button:enabled:active {
|
|
10852
10846
|
outline: none;
|
|
10847
|
+
|
|
10853
10848
|
box-shadow: var(---shadow-8);
|
|
10854
10849
|
}
|
|
10855
10850
|
|
|
10856
|
-
|
|
10851
|
+
button:enabled:focus-visible {
|
|
10857
10852
|
outline: none;
|
|
10853
|
+
|
|
10858
10854
|
box-shadow: var(---shadow-4);
|
|
10859
10855
|
}
|
|
10860
10856
|
|
|
10861
|
-
|
|
10857
|
+
button:enabled:focus-visible:active {
|
|
10862
10858
|
outline: none;
|
|
10859
|
+
|
|
10863
10860
|
box-shadow: var(---shadow-8);
|
|
10864
10861
|
}
|
|
10865
10862
|
`];
|
|
10866
10863
|
}
|
|
10867
10864
|
render() {
|
|
10868
|
-
return x$
|
|
10865
|
+
return x$2`
|
|
10869
10866
|
<button ?disabled=${this.disabled}>
|
|
10870
10867
|
<slot></slot>
|
|
10871
10868
|
</button>
|
|
@@ -10976,10 +10973,6 @@
|
|
|
10976
10973
|
---decidables-slider-color: var(--decidables-slider-color, var(---color-element-enabled));
|
|
10977
10974
|
---decidables-spinner-background-color: var(--decidables-slider-background-color, none);
|
|
10978
10975
|
|
|
10979
|
-
---shadow-2-rotate: var(--shadow-2-rotate, ${r$4(this.cssBoxShadow(2, true, false))});
|
|
10980
|
-
---shadow-4-rotate: var(--shadow-4-rotate, ${r$4(this.cssBoxShadow(4, true, false))});
|
|
10981
|
-
---shadow-8-rotate: var(--shadow-8-rotate, ${r$4(this.cssBoxShadow(8, true, false))});
|
|
10982
|
-
|
|
10983
10976
|
display: flex;
|
|
10984
10977
|
|
|
10985
10978
|
flex-direction: column;
|
|
@@ -10994,12 +10987,14 @@
|
|
|
10994
10987
|
|
|
10995
10988
|
.range {
|
|
10996
10989
|
position: relative;
|
|
10990
|
+
|
|
10997
10991
|
display: flex;
|
|
10998
10992
|
|
|
10999
10993
|
flex-direction: row;
|
|
11000
10994
|
|
|
11001
10995
|
width: 3.5rem;
|
|
11002
10996
|
height: 4.75rem;
|
|
10997
|
+
|
|
11003
10998
|
margin: 0 0.25rem 0.25rem;
|
|
11004
10999
|
}
|
|
11005
11000
|
|
|
@@ -11011,21 +11006,20 @@
|
|
|
11011
11006
|
background: var(---decidables-spinner-background-color);
|
|
11012
11007
|
}
|
|
11013
11008
|
|
|
11014
|
-
/* Adapted from http://danielstern.ca/range.css/#/ */
|
|
11015
11009
|
/* Overall */
|
|
11016
11010
|
input[type=range] {
|
|
11017
|
-
width:
|
|
11018
|
-
height:
|
|
11011
|
+
width: 3.5rem;
|
|
11012
|
+
height: 4.75rem;
|
|
11013
|
+
|
|
11019
11014
|
padding: 0;
|
|
11020
11015
|
margin: 0;
|
|
11016
|
+
|
|
11017
|
+
appearance: none;
|
|
11021
11018
|
|
|
11022
11019
|
background-color: unset;
|
|
11023
11020
|
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
11028
|
-
-webkit-appearance: none;
|
|
11021
|
+
direction: rtl;
|
|
11022
|
+
writing-mode: vertical-lr;
|
|
11029
11023
|
}
|
|
11030
11024
|
|
|
11031
11025
|
input[type=range]:enabled {
|
|
@@ -11036,16 +11030,10 @@
|
|
|
11036
11030
|
outline: none;
|
|
11037
11031
|
}
|
|
11038
11032
|
|
|
11039
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11040
|
-
input[type=range]::-ms-tooltip {
|
|
11041
|
-
display: none;
|
|
11042
|
-
}
|
|
11043
|
-
|
|
11044
11033
|
/* Track */
|
|
11045
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11046
11034
|
input[type=range]::-webkit-slider-runnable-track {
|
|
11047
|
-
width:
|
|
11048
|
-
height:
|
|
11035
|
+
width: 4px;
|
|
11036
|
+
height: 100%;
|
|
11049
11037
|
|
|
11050
11038
|
background: var(---decidables-slider-background-color);
|
|
11051
11039
|
border: 0;
|
|
@@ -11057,10 +11045,9 @@
|
|
|
11057
11045
|
background: var(---decidables-slider-background-color);
|
|
11058
11046
|
}
|
|
11059
11047
|
|
|
11060
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11061
11048
|
input[type=range]::-moz-range-track {
|
|
11062
|
-
width:
|
|
11063
|
-
height:
|
|
11049
|
+
width: 4px;
|
|
11050
|
+
height: 100%;
|
|
11064
11051
|
|
|
11065
11052
|
background: var(---decidables-slider-background-color);
|
|
11066
11053
|
border: 0;
|
|
@@ -11068,57 +11055,17 @@
|
|
|
11068
11055
|
box-shadow: none;
|
|
11069
11056
|
}
|
|
11070
11057
|
|
|
11071
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11072
|
-
input[type=range]::-ms-track {
|
|
11073
|
-
width: 100%;
|
|
11074
|
-
height: 4px;
|
|
11075
|
-
|
|
11076
|
-
color: transparent;
|
|
11077
|
-
|
|
11078
|
-
background: transparent;
|
|
11079
|
-
border-color: transparent;
|
|
11080
|
-
}
|
|
11081
|
-
|
|
11082
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11083
|
-
input[type=range]::-ms-fill-lower {
|
|
11084
|
-
background: #cccccc;
|
|
11085
|
-
/* background: var(---decidables-slider-background-color); */
|
|
11086
|
-
border: 0;
|
|
11087
|
-
border-radius: 2px;
|
|
11088
|
-
box-shadow: none;
|
|
11089
|
-
}
|
|
11090
|
-
|
|
11091
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11092
|
-
input[type=range]::-ms-fill-upper {
|
|
11093
|
-
background: #cccccc;
|
|
11094
|
-
/* background: var(---decidables-slider-background-color); */
|
|
11095
|
-
border: 0;
|
|
11096
|
-
border-radius: 2px;
|
|
11097
|
-
box-shadow: none;
|
|
11098
|
-
}
|
|
11099
|
-
|
|
11100
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11101
|
-
input[type=range]:focus::-ms-fill-lower {
|
|
11102
|
-
background: var(---decidables-slider-background-color);
|
|
11103
|
-
}
|
|
11104
|
-
|
|
11105
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11106
|
-
input[type=range]:focus::-ms-fill-upper {
|
|
11107
|
-
background: var(---decidables-slider-background-color);
|
|
11108
|
-
}
|
|
11109
|
-
|
|
11110
11058
|
/* Thumb */
|
|
11111
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11112
11059
|
input[type=range]::-webkit-slider-thumb {
|
|
11113
|
-
width:
|
|
11114
|
-
height:
|
|
11115
|
-
|
|
11060
|
+
width: 20px;
|
|
11061
|
+
height: 10px;
|
|
11062
|
+
|
|
11063
|
+
margin-left: -8px;
|
|
11064
|
+
|
|
11065
|
+
appearance: none;
|
|
11116
11066
|
|
|
11117
11067
|
border: 0;
|
|
11118
11068
|
border-radius: 4px;
|
|
11119
|
-
|
|
11120
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
11121
|
-
-webkit-appearance: none;
|
|
11122
11069
|
}
|
|
11123
11070
|
|
|
11124
11071
|
input[type=range]:disabled::-webkit-slider-thumb {
|
|
@@ -11128,112 +11075,65 @@
|
|
|
11128
11075
|
|
|
11129
11076
|
input[type=range]:enabled::-webkit-slider-thumb {
|
|
11130
11077
|
background: var(---decidables-slider-color);
|
|
11131
|
-
box-shadow: var(---shadow-2
|
|
11078
|
+
box-shadow: var(---shadow-2);
|
|
11132
11079
|
}
|
|
11133
11080
|
|
|
11134
11081
|
input[type=range]:enabled:hover::-webkit-slider-thumb {
|
|
11135
|
-
box-shadow: var(---shadow-4
|
|
11082
|
+
box-shadow: var(---shadow-4);
|
|
11136
11083
|
}
|
|
11137
11084
|
|
|
11138
11085
|
input[type=range]:enabled:active::-webkit-slider-thumb {
|
|
11139
|
-
box-shadow: var(---shadow-8
|
|
11086
|
+
box-shadow: var(---shadow-8);
|
|
11140
11087
|
}
|
|
11141
11088
|
|
|
11142
|
-
|
|
11143
|
-
box-shadow: var(---shadow-4
|
|
11089
|
+
input[type=range]:enabled:focus-visible::-webkit-slider-thumb {
|
|
11090
|
+
box-shadow: var(---shadow-4);
|
|
11144
11091
|
}
|
|
11145
11092
|
|
|
11146
|
-
|
|
11147
|
-
box-shadow: var(---shadow-8
|
|
11093
|
+
input[type=range]:enabled:focus-visible:active::-webkit-slider-thumb {
|
|
11094
|
+
box-shadow: var(---shadow-8);
|
|
11148
11095
|
}
|
|
11149
11096
|
|
|
11150
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11151
11097
|
input[type=range]::-moz-range-thumb {
|
|
11152
|
-
width:
|
|
11153
|
-
height:
|
|
11098
|
+
width: 20px;
|
|
11099
|
+
height: 10px;
|
|
11154
11100
|
|
|
11155
11101
|
border: 0;
|
|
11156
11102
|
border-radius: 4px;
|
|
11157
11103
|
}
|
|
11158
11104
|
|
|
11159
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11160
11105
|
input[type=range]:disabled::-moz-range-thumb {
|
|
11161
11106
|
background: var(---decidables-slider-background-color);
|
|
11162
11107
|
box-shadow: none;
|
|
11163
11108
|
}
|
|
11164
11109
|
|
|
11165
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11166
11110
|
input[type=range]:enabled::-moz-range-thumb {
|
|
11167
11111
|
background: var(---decidables-slider-color);
|
|
11168
|
-
box-shadow: var(---shadow-2
|
|
11112
|
+
box-shadow: var(---shadow-2);
|
|
11169
11113
|
}
|
|
11170
11114
|
|
|
11171
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11172
11115
|
input[type=range]:enabled:hover::-moz-range-thumb {
|
|
11173
|
-
box-shadow: var(---shadow-4
|
|
11116
|
+
box-shadow: var(---shadow-4);
|
|
11174
11117
|
}
|
|
11175
11118
|
|
|
11176
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11177
11119
|
input[type=range]:enabled:active::-moz-range-thumb {
|
|
11178
|
-
box-shadow: var(---shadow-8
|
|
11179
|
-
}
|
|
11180
|
-
|
|
11181
|
-
:host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {
|
|
11182
|
-
box-shadow: var(---shadow-4-rotate);
|
|
11183
|
-
}
|
|
11184
|
-
|
|
11185
|
-
:host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {
|
|
11186
|
-
box-shadow: var(---shadow-8-rotate);
|
|
11187
|
-
}
|
|
11188
|
-
|
|
11189
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11190
|
-
input[type=range]::-ms-thumb {
|
|
11191
|
-
width: 10px;
|
|
11192
|
-
height: 20px;
|
|
11193
|
-
margin-top: 0;
|
|
11194
|
-
|
|
11195
|
-
background: #999999;
|
|
11196
|
-
/* background: var(---color-element-enabled); */
|
|
11197
|
-
border: 0;
|
|
11198
|
-
border-radius: 4px;
|
|
11199
|
-
box-shadow: var(---shadow-2-rotate);
|
|
11200
|
-
}
|
|
11201
|
-
|
|
11202
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11203
|
-
input[type=range]:disabled::-ms-thumb {
|
|
11204
|
-
background: var(---decidables-slider-background-color);
|
|
11205
|
-
box-shadow: none;
|
|
11206
|
-
}
|
|
11207
|
-
|
|
11208
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11209
|
-
input[type=range]:enabled::-ms-thumb {
|
|
11210
|
-
background: var(---decidables-slider-color);
|
|
11211
|
-
box-shadow: var(---shadow-2-rotate);
|
|
11212
|
-
}
|
|
11213
|
-
|
|
11214
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11215
|
-
input[type=range]:enabled:hover::-ms-thumb {
|
|
11216
|
-
box-shadow: var(---shadow-4-rotate);
|
|
11217
|
-
}
|
|
11218
|
-
|
|
11219
|
-
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
11220
|
-
input[type=range]:enabled:active::-ms-thumb {
|
|
11221
|
-
box-shadow: var(---shadow-8-rotate);
|
|
11120
|
+
box-shadow: var(---shadow-8);
|
|
11222
11121
|
}
|
|
11223
11122
|
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
box-shadow: var(---shadow-4-rotate);
|
|
11123
|
+
input[type=range]:enabled:focus-visible::-moz-range-thumb {
|
|
11124
|
+
box-shadow: var(---shadow-4);
|
|
11227
11125
|
}
|
|
11228
11126
|
|
|
11229
|
-
|
|
11230
|
-
box-shadow: var(---shadow-8
|
|
11127
|
+
input[type=range]:enabled:focus-visible:active::-moz-range-thumb {
|
|
11128
|
+
box-shadow: var(---shadow-8);
|
|
11231
11129
|
}
|
|
11232
11130
|
|
|
11233
|
-
|
|
11131
|
+
/* Tick marks */
|
|
11132
|
+
.datalist {
|
|
11234
11133
|
position: absolute;
|
|
11235
11134
|
left: 2rem;
|
|
11236
11135
|
z-index: -1;
|
|
11136
|
+
|
|
11237
11137
|
display: flex;
|
|
11238
11138
|
|
|
11239
11139
|
flex-direction: column;
|
|
@@ -11246,31 +11146,30 @@
|
|
|
11246
11146
|
font-size: 0.75rem;
|
|
11247
11147
|
}
|
|
11248
11148
|
|
|
11249
|
-
option {
|
|
11250
|
-
padding: 0;
|
|
11251
|
-
|
|
11149
|
+
.option {
|
|
11252
11150
|
line-height: 0.8;
|
|
11253
|
-
|
|
11151
|
+
|
|
11152
|
+
white-space: nowrap;
|
|
11254
11153
|
}
|
|
11255
11154
|
|
|
11256
|
-
option::before {
|
|
11155
|
+
.option::before {
|
|
11257
11156
|
content: "– ";
|
|
11258
11157
|
}
|
|
11259
11158
|
`];
|
|
11260
11159
|
}
|
|
11261
11160
|
render() {
|
|
11262
|
-
return x$
|
|
11161
|
+
return x$2`
|
|
11263
11162
|
<label for="slider">
|
|
11264
11163
|
<slot></slot>
|
|
11265
11164
|
</label>
|
|
11266
11165
|
<div class="range">
|
|
11267
11166
|
<input ?disabled=${this.disabled} type="range" id="slider" min=${o$2(this.rangeMin)} max=${o$2(this.rangeMax)} step=${o$2(this.rangeStep)} .value=${this.rangeValue} @change=${this.rangeChanged.bind(this)} @input=${this.rangeInputted.bind(this)}>
|
|
11268
|
-
${this.scale ? x$
|
|
11269
|
-
<
|
|
11270
|
-
<option
|
|
11271
|
-
<option
|
|
11272
|
-
</
|
|
11273
|
-
` : x$
|
|
11167
|
+
${this.scale ? x$2`
|
|
11168
|
+
<div class="datalist">
|
|
11169
|
+
<div class="option">${o$2(this.max)}</div>
|
|
11170
|
+
<div class="option">${o$2(this.min)}</div>
|
|
11171
|
+
</div>
|
|
11172
|
+
` : x$2``}
|
|
11274
11173
|
</div>
|
|
11275
11174
|
<decidables-spinner ?disabled=${this.disabled} min=${o$2(this.min)} max=${o$2(this.max)} step=${o$2(this.step)} .value=${this.value} @input=${this.spinnerInputted.bind(this)}></decidables-spinner>
|
|
11276
11175
|
`;
|
|
@@ -11329,13 +11228,14 @@
|
|
|
11329
11228
|
---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
|
|
11330
11229
|
|
|
11331
11230
|
---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
|
|
11332
|
-
---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding,
|
|
11231
|
+
---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0rem);
|
|
11333
11232
|
|
|
11334
11233
|
display: block;
|
|
11335
11234
|
}
|
|
11336
11235
|
|
|
11337
11236
|
label {
|
|
11338
11237
|
position: relative;
|
|
11238
|
+
|
|
11339
11239
|
display: flex;
|
|
11340
11240
|
|
|
11341
11241
|
flex-direction: column;
|
|
@@ -11353,6 +11253,7 @@
|
|
|
11353
11253
|
left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);
|
|
11354
11254
|
|
|
11355
11255
|
font-size: var(---decidables-spinner-font-size);
|
|
11256
|
+
|
|
11356
11257
|
line-height: normal;
|
|
11357
11258
|
|
|
11358
11259
|
content: var(---decidables-spinner-prefix);
|
|
@@ -11364,6 +11265,7 @@
|
|
|
11364
11265
|
bottom: 1px;
|
|
11365
11266
|
|
|
11366
11267
|
font-size: var(---decidables-spinner-font-size);
|
|
11268
|
+
|
|
11367
11269
|
line-height: normal;
|
|
11368
11270
|
|
|
11369
11271
|
content: var(---decidables-spinner-postfix);
|
|
@@ -11371,20 +11273,24 @@
|
|
|
11371
11273
|
|
|
11372
11274
|
input[type=number] {
|
|
11373
11275
|
width: var(---decidables-spinner-input-width);
|
|
11374
|
-
|
|
11276
|
+
|
|
11277
|
+
padding: 1px var(---decidables-spinner-postfix-padding) 1px 2px;
|
|
11278
|
+
margin: 0;
|
|
11375
11279
|
|
|
11376
11280
|
font-family: var(---font-family-base);
|
|
11377
11281
|
font-size: var(---decidables-spinner-font-size);
|
|
11282
|
+
|
|
11378
11283
|
color: inherit;
|
|
11284
|
+
|
|
11379
11285
|
text-align: right;
|
|
11380
11286
|
|
|
11287
|
+
appearance: none;
|
|
11288
|
+
outline: none;
|
|
11289
|
+
|
|
11381
11290
|
background: none;
|
|
11382
11291
|
border: 0;
|
|
11383
11292
|
border-radius: 0;
|
|
11384
|
-
outline: none;
|
|
11385
11293
|
box-shadow: var(---shadow-2);
|
|
11386
|
-
|
|
11387
|
-
-webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
|
|
11388
11294
|
}
|
|
11389
11295
|
|
|
11390
11296
|
input[type=number]:hover {
|
|
@@ -11401,25 +11307,59 @@
|
|
|
11401
11307
|
|
|
11402
11308
|
border: 0;
|
|
11403
11309
|
box-shadow: none;
|
|
11310
|
+
}
|
|
11311
|
+
|
|
11312
|
+
/* HACK: Manage spinners in Firefox */
|
|
11313
|
+
@supports (-moz-appearance: textfield) {
|
|
11314
|
+
input[type=number] {
|
|
11315
|
+
padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
|
|
11316
|
+
|
|
11317
|
+
appearance: textfield;
|
|
11318
|
+
}
|
|
11404
11319
|
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11320
|
+
input[type=number]:hover,
|
|
11321
|
+
input[type=number]:focus,
|
|
11322
|
+
input[type=number]:active {
|
|
11323
|
+
padding-right: var(---decidables-spinner-postfix-padding);
|
|
11324
|
+
|
|
11325
|
+
appearance: none;
|
|
11326
|
+
}
|
|
11327
|
+
|
|
11328
|
+
input[type=number]:disabled {
|
|
11329
|
+
padding-right: calc(18px + var(---decidables-spinner-postfix-padding));
|
|
11330
|
+
|
|
11331
|
+
appearance: textfield;
|
|
11332
|
+
}
|
|
11333
|
+
}
|
|
11334
|
+
|
|
11335
|
+
/* HACK: Manage spinners in Chrome/Edge/Safari */
|
|
11336
|
+
input[type=number]::-webkit-inner-spin-button {
|
|
11337
|
+
/* Avoid oversized spinners in Safari */
|
|
11338
|
+
font-size: 1.125rem;
|
|
11339
|
+
|
|
11340
|
+
opacity: 0;
|
|
11341
|
+
}
|
|
11342
|
+
|
|
11343
|
+
input[type=number]:hover::-webkit-inner-spin-button,
|
|
11344
|
+
input[type=number]:focus::-webkit-inner-spin-button,
|
|
11345
|
+
input[type=number]:active::-webkit-inner-spin-button {
|
|
11346
|
+
opacity: 1;
|
|
11411
11347
|
}
|
|
11412
11348
|
|
|
11413
|
-
/* HACK: Hide spinners in disabled input for Firefox and Safari */
|
|
11414
|
-
input[type=number]:disabled::-webkit-outer-spin-button,
|
|
11415
11349
|
input[type=number]:disabled::-webkit-inner-spin-button {
|
|
11416
|
-
|
|
11417
|
-
|
|
11350
|
+
opacity: 0;
|
|
11351
|
+
}
|
|
11352
|
+
|
|
11353
|
+
/* HACK: Adjust padding on mobile w/o spinners */
|
|
11354
|
+
@media only screen and (hover: none) and (pointer: coarse) {
|
|
11355
|
+
input[type=number] {
|
|
11356
|
+
padding-right: calc(1.125rem + var(---decidables-spinner-postfix-padding));
|
|
11357
|
+
}
|
|
11418
11358
|
}
|
|
11419
11359
|
`];
|
|
11420
11360
|
}
|
|
11421
11361
|
render() {
|
|
11422
|
-
return x$
|
|
11362
|
+
return x$2`
|
|
11423
11363
|
<label>
|
|
11424
11364
|
<slot></slot>
|
|
11425
11365
|
<input ?disabled=${this.disabled} type="number" min=${o$2(this.min)} max=${o$2(this.max)} step=${o$2(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
|
|
@@ -11478,13 +11418,16 @@
|
|
|
11478
11418
|
|
|
11479
11419
|
width: 1px;
|
|
11480
11420
|
height: 1px;
|
|
11421
|
+
|
|
11481
11422
|
padding: 0;
|
|
11482
11423
|
margin: -1px;
|
|
11424
|
+
|
|
11483
11425
|
overflow: hidden;
|
|
11484
11426
|
|
|
11485
11427
|
white-space: nowrap;
|
|
11486
11428
|
|
|
11487
11429
|
border: 0;
|
|
11430
|
+
|
|
11488
11431
|
clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
|
|
11489
11432
|
}
|
|
11490
11433
|
|
|
@@ -11500,6 +11443,7 @@
|
|
|
11500
11443
|
position: relative;
|
|
11501
11444
|
|
|
11502
11445
|
min-width: 24px;
|
|
11446
|
+
|
|
11503
11447
|
padding: 0 0 36px;
|
|
11504
11448
|
margin: 0.25rem 0.25rem 0;
|
|
11505
11449
|
|
|
@@ -11511,17 +11455,17 @@
|
|
|
11511
11455
|
input[type=checkbox] + label + label::before,
|
|
11512
11456
|
input[type=checkbox] + label + label::after {
|
|
11513
11457
|
position: absolute;
|
|
11514
|
-
|
|
11515
11458
|
left: 50%;
|
|
11516
11459
|
|
|
11517
11460
|
margin: 0;
|
|
11518
11461
|
|
|
11519
|
-
content: "";
|
|
11520
|
-
|
|
11521
11462
|
outline: 0;
|
|
11522
11463
|
|
|
11523
|
-
|
|
11464
|
+
content: "";
|
|
11465
|
+
|
|
11524
11466
|
transform: translate(-50%, 0);
|
|
11467
|
+
|
|
11468
|
+
transition: all var(---transition-duration) ease;
|
|
11525
11469
|
}
|
|
11526
11470
|
|
|
11527
11471
|
input[type=checkbox] + label + label::before {
|
|
@@ -11569,21 +11513,18 @@
|
|
|
11569
11513
|
box-shadow: var(---shadow-8);
|
|
11570
11514
|
}
|
|
11571
11515
|
|
|
11572
|
-
|
|
11573
|
-
:host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {
|
|
11516
|
+
input[type=checkbox]:enabled:focus-visible + label + label::after {
|
|
11574
11517
|
box-shadow: var(---shadow-4);
|
|
11575
11518
|
}
|
|
11576
11519
|
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
:host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
|
|
11520
|
+
input[type=checkbox]:enabled:focus-visible + label + label:active::after,
|
|
11521
|
+
input[type=checkbox]:enabled:focus-visible:active + label + label::after {
|
|
11580
11522
|
box-shadow: var(---shadow-8);
|
|
11581
11523
|
}
|
|
11582
|
-
/* stylelint-enable selector-max-compound-selectors */
|
|
11583
11524
|
`];
|
|
11584
11525
|
}
|
|
11585
11526
|
render() {
|
|
11586
|
-
return x$
|
|
11527
|
+
return x$2`
|
|
11587
11528
|
<input type="checkbox" id="switch" ?checked=${this.checked} ?disabled=${this.disabled} @change=${this.changed.bind(this)}>
|
|
11588
11529
|
<label for="switch">
|
|
11589
11530
|
<slot name="off-label"></slot>
|
|
@@ -11633,7 +11574,7 @@
|
|
|
11633
11574
|
`];
|
|
11634
11575
|
}
|
|
11635
11576
|
render() {
|
|
11636
|
-
return x$
|
|
11577
|
+
return x$2`
|
|
11637
11578
|
<fieldset ?disabled=${this.disabled}>
|
|
11638
11579
|
<legend><slot name="label"></slot></legend>
|
|
11639
11580
|
<slot></slot>
|
|
@@ -11699,39 +11640,46 @@
|
|
|
11699
11640
|
|
|
11700
11641
|
width: 1px;
|
|
11701
11642
|
height: 1px;
|
|
11643
|
+
|
|
11702
11644
|
padding: 0;
|
|
11703
11645
|
margin: -1px;
|
|
11646
|
+
|
|
11704
11647
|
overflow: hidden;
|
|
11705
11648
|
|
|
11706
11649
|
white-space: nowrap;
|
|
11707
11650
|
|
|
11708
11651
|
border: 0;
|
|
11652
|
+
|
|
11709
11653
|
clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
|
|
11710
11654
|
}
|
|
11711
11655
|
|
|
11712
11656
|
input[type=radio] + label {
|
|
11713
11657
|
width: 100%;
|
|
11658
|
+
|
|
11714
11659
|
padding: 0.375rem 0.75rem;
|
|
11715
11660
|
|
|
11716
11661
|
font-family: var(---font-family-base);
|
|
11717
11662
|
font-size: 1.125rem;
|
|
11663
|
+
|
|
11718
11664
|
line-height: 1.5;
|
|
11665
|
+
|
|
11719
11666
|
color: var(---color-text-inverse);
|
|
11667
|
+
|
|
11720
11668
|
text-align: center;
|
|
11721
11669
|
|
|
11722
11670
|
cursor: pointer;
|
|
11671
|
+
outline: none;
|
|
11723
11672
|
|
|
11724
11673
|
background-color: var(---color-element-enabled);
|
|
11725
11674
|
border: 0;
|
|
11726
11675
|
border-radius: 0;
|
|
11727
|
-
outline: none;
|
|
11728
|
-
|
|
11729
11676
|
box-shadow: var(---shadow-2);
|
|
11730
11677
|
}
|
|
11731
11678
|
|
|
11732
11679
|
input[type=radio]:checked + label {
|
|
11733
|
-
background-color: var(---color-element-selected);
|
|
11734
11680
|
outline: none;
|
|
11681
|
+
|
|
11682
|
+
background-color: var(---color-element-selected);
|
|
11735
11683
|
box-shadow: var(---shadow-2);
|
|
11736
11684
|
}
|
|
11737
11685
|
|
|
@@ -11739,6 +11687,7 @@
|
|
|
11739
11687
|
z-index: 1;
|
|
11740
11688
|
|
|
11741
11689
|
outline: none;
|
|
11690
|
+
|
|
11742
11691
|
box-shadow: var(---shadow-4);
|
|
11743
11692
|
}
|
|
11744
11693
|
|
|
@@ -11746,6 +11695,7 @@
|
|
|
11746
11695
|
z-index: 2;
|
|
11747
11696
|
|
|
11748
11697
|
outline: none;
|
|
11698
|
+
|
|
11749
11699
|
box-shadow: var(---shadow-8);
|
|
11750
11700
|
}
|
|
11751
11701
|
|
|
@@ -11759,31 +11709,34 @@
|
|
|
11759
11709
|
border-bottom-left-radius: 0.25rem;
|
|
11760
11710
|
}
|
|
11761
11711
|
|
|
11762
|
-
|
|
11712
|
+
input[type=radio]:focus-visible + label {
|
|
11763
11713
|
z-index: 1;
|
|
11764
11714
|
|
|
11765
11715
|
outline: none;
|
|
11716
|
+
|
|
11766
11717
|
box-shadow: var(---shadow-4);
|
|
11767
11718
|
}
|
|
11768
11719
|
|
|
11769
|
-
|
|
11720
|
+
input[type=radio]:focus-visible:checked + label {
|
|
11770
11721
|
z-index: 1;
|
|
11771
11722
|
|
|
11772
|
-
background-color: var(---color-element-selected);
|
|
11773
11723
|
outline: none;
|
|
11724
|
+
|
|
11725
|
+
background-color: var(---color-element-selected);
|
|
11774
11726
|
box-shadow: var(---shadow-4);
|
|
11775
11727
|
}
|
|
11776
11728
|
|
|
11777
|
-
|
|
11729
|
+
input[type=radio]:focus-visible + label:active {
|
|
11778
11730
|
z-index: 2;
|
|
11779
11731
|
|
|
11780
11732
|
outline: none;
|
|
11733
|
+
|
|
11781
11734
|
box-shadow: var(---shadow-8);
|
|
11782
11735
|
}
|
|
11783
11736
|
`];
|
|
11784
11737
|
}
|
|
11785
11738
|
render() {
|
|
11786
|
-
return x$
|
|
11739
|
+
return x$2`
|
|
11787
11740
|
<input type="radio" id="toggle-option" name=${this.name} value=${this.value} .checked=${this.checked} @change=${this.changed.bind(this)}>
|
|
11788
11741
|
<label for="toggle-option">
|
|
11789
11742
|
<slot></slot>
|
|
@@ -12120,7 +12073,7 @@
|
|
|
12120
12073
|
},
|
|
12121
12074
|
b = ["left", "top", "width", "height", "opacity", "color", "background"],
|
|
12122
12075
|
j = new WeakMap();
|
|
12123
|
-
|
|
12076
|
+
class x extends f {
|
|
12124
12077
|
constructor(t$1) {
|
|
12125
12078
|
if (super(t$1), this.t = false, this.i = null, this.o = null, this.h = true, this.shouldLog = false, t$1.type === t.CHILD) throw Error("The `animate` directive must be used in attribute position.");
|
|
12126
12079
|
this.createFinished();
|
|
@@ -12144,9 +12097,9 @@
|
|
|
12144
12097
|
}
|
|
12145
12098
|
update(t, [i]) {
|
|
12146
12099
|
const s = void 0 === this.u;
|
|
12147
|
-
return s && (this.u = t.options?.host, this.u.addController(this), this.u.updateComplete.then(t => this.t = true), this.element = t.element, j.set(this.element, this)), this.optionsOrCallback = i, (s || "function" != typeof i) && this.
|
|
12100
|
+
return s && (this.u = t.options?.host, this.u.addController(this), this.u.updateComplete.then(t => this.t = true), this.element = t.element, j.set(this.element, this)), this.optionsOrCallback = i, (s || "function" != typeof i) && this.m(i), this.render(i);
|
|
12148
12101
|
}
|
|
12149
|
-
|
|
12102
|
+
m(t) {
|
|
12150
12103
|
t = t ?? {};
|
|
12151
12104
|
const i = this.getController();
|
|
12152
12105
|
void 0 !== i && ((t = {
|
|
@@ -12157,7 +12110,7 @@
|
|
|
12157
12110
|
...t.keyframeOptions
|
|
12158
12111
|
}), t.properties ??= b, this.options = t;
|
|
12159
12112
|
}
|
|
12160
|
-
|
|
12113
|
+
p() {
|
|
12161
12114
|
const t = {},
|
|
12162
12115
|
i = this.element.getBoundingClientRect(),
|
|
12163
12116
|
s = getComputedStyle(this.element);
|
|
@@ -12178,20 +12131,20 @@
|
|
|
12178
12131
|
})(t, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && i && this.element.isConnected, this.h && (this._ = Array.isArray(t) ? Array.from(t) : t), this.h;
|
|
12179
12132
|
}
|
|
12180
12133
|
hostUpdate() {
|
|
12181
|
-
"function" == typeof this.optionsOrCallback && this.
|
|
12134
|
+
"function" == typeof this.optionsOrCallback && this.m(this.optionsOrCallback()), this.v() && (this.A = this.p(), this.i = this.i ?? this.element.parentNode, this.o = this.element.nextSibling);
|
|
12182
12135
|
}
|
|
12183
12136
|
async hostUpdated() {
|
|
12184
12137
|
if (!this.h || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered) return;
|
|
12185
12138
|
let t;
|
|
12186
12139
|
this.prepare(), await a;
|
|
12187
|
-
const i = this.
|
|
12188
|
-
s = this.
|
|
12189
|
-
e = this.
|
|
12140
|
+
const i = this.P(),
|
|
12141
|
+
s = this.V(this.options.keyframeOptions, i),
|
|
12142
|
+
e = this.p();
|
|
12190
12143
|
if (void 0 !== this.A) {
|
|
12191
12144
|
const {
|
|
12192
12145
|
from: s,
|
|
12193
12146
|
to: h
|
|
12194
|
-
} = this.
|
|
12147
|
+
} = this.O(this.A, e, i);
|
|
12195
12148
|
this.log("measured", [this.A, e, s, h]), t = this.calculateKeyframes(s, h);
|
|
12196
12149
|
} else {
|
|
12197
12150
|
const s = r.get(this.options.inId);
|
|
@@ -12200,7 +12153,7 @@
|
|
|
12200
12153
|
const {
|
|
12201
12154
|
from: h,
|
|
12202
12155
|
to: n
|
|
12203
|
-
} = this.
|
|
12156
|
+
} = this.O(s, e, i);
|
|
12204
12157
|
t = this.calculateKeyframes(h, n), t = this.options.in ? [{
|
|
12205
12158
|
...this.options.in[0],
|
|
12206
12159
|
...t[0]
|
|
@@ -12210,10 +12163,10 @@
|
|
|
12210
12163
|
this.animate(t, s);
|
|
12211
12164
|
}
|
|
12212
12165
|
resetStyles() {
|
|
12213
|
-
void 0 !== this.
|
|
12166
|
+
void 0 !== this.j && (this.element.setAttribute("style", this.j ?? ""), this.j = void 0);
|
|
12214
12167
|
}
|
|
12215
12168
|
commitStyles() {
|
|
12216
|
-
this.
|
|
12169
|
+
this.j = this.element.getAttribute("style"), this.webAnimation?.commitStyles(), this.webAnimation?.cancel();
|
|
12217
12170
|
}
|
|
12218
12171
|
reconnected() {}
|
|
12219
12172
|
async disconnected() {
|
|
@@ -12222,14 +12175,14 @@
|
|
|
12222
12175
|
if (this.prepare(), await a(), this.i?.isConnected) {
|
|
12223
12176
|
const t = this.o && this.o.parentNode === this.i ? this.o : null;
|
|
12224
12177
|
if (this.i.insertBefore(this.element, t), this.options.stabilizeOut) {
|
|
12225
|
-
const t = this.
|
|
12178
|
+
const t = this.p();
|
|
12226
12179
|
this.log("stabilizing out");
|
|
12227
12180
|
const i = this.A.left - t.left,
|
|
12228
12181
|
s = this.A.top - t.top;
|
|
12229
12182
|
!("static" === getComputedStyle(this.element).position) || 0 === i && 0 === s || (this.element.style.position = "relative"), 0 !== i && (this.element.style.left = i + "px"), 0 !== s && (this.element.style.top = s + "px");
|
|
12230
12183
|
}
|
|
12231
12184
|
}
|
|
12232
|
-
const t = this.
|
|
12185
|
+
const t = this.V(this.options.keyframeOptions);
|
|
12233
12186
|
await this.animate(this.options.out, t), this.element.remove();
|
|
12234
12187
|
}
|
|
12235
12188
|
prepare() {
|
|
@@ -12241,7 +12194,7 @@
|
|
|
12241
12194
|
didFinish(t) {
|
|
12242
12195
|
t && this.options.onComplete?.(this), this.A = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
|
|
12243
12196
|
}
|
|
12244
|
-
|
|
12197
|
+
P() {
|
|
12245
12198
|
const t = [];
|
|
12246
12199
|
for (let i = this.element.parentNode; i; i = i?.parentNode) {
|
|
12247
12200
|
const s = j.get(i);
|
|
@@ -12255,13 +12208,13 @@
|
|
|
12255
12208
|
n.add(this.u);
|
|
12256
12209
|
}), t;
|
|
12257
12210
|
}
|
|
12258
|
-
|
|
12211
|
+
V(t, i = this.P()) {
|
|
12259
12212
|
const s = {
|
|
12260
12213
|
...A
|
|
12261
12214
|
};
|
|
12262
12215
|
return i.forEach(t => Object.assign(s, t.options.keyframeOptions)), Object.assign(s, t), s;
|
|
12263
12216
|
}
|
|
12264
|
-
|
|
12217
|
+
O(t, i, s) {
|
|
12265
12218
|
t = {
|
|
12266
12219
|
...t
|
|
12267
12220
|
}, i = {
|
|
@@ -12314,8 +12267,8 @@
|
|
|
12314
12267
|
log(t, i) {
|
|
12315
12268
|
this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, i);
|
|
12316
12269
|
}
|
|
12317
|
-
}
|
|
12318
|
-
const F = e(x
|
|
12270
|
+
}
|
|
12271
|
+
const F = e(x);
|
|
12319
12272
|
|
|
12320
12273
|
/*
|
|
12321
12274
|
CPTMath Static Class - Not intended for instantiation!
|
|
@@ -12485,11 +12438,13 @@
|
|
|
12485
12438
|
|
|
12486
12439
|
.addend {
|
|
12487
12440
|
position: relative;
|
|
12441
|
+
|
|
12488
12442
|
display: inline-block;
|
|
12489
12443
|
}
|
|
12490
12444
|
|
|
12491
12445
|
.comparison {
|
|
12492
12446
|
position: relative;
|
|
12447
|
+
|
|
12493
12448
|
display: inline-block;
|
|
12494
12449
|
|
|
12495
12450
|
font-size: 125%;
|
|
@@ -12771,20 +12726,20 @@
|
|
|
12771
12726
|
let us;
|
|
12772
12727
|
let uDiff;
|
|
12773
12728
|
if (this.numeric) {
|
|
12774
|
-
xw = x$
|
|
12729
|
+
xw = x$2`<decidables-spinner class="x xw"
|
|
12775
12730
|
?disabled=${!this.interactive}
|
|
12776
12731
|
.value=${this.xw}
|
|
12777
12732
|
@input=${this.xwInput.bind(this)}
|
|
12778
12733
|
>
|
|
12779
12734
|
<var class="math-var">x<sub class="subscript win">win</sub></var>
|
|
12780
12735
|
</decidables-spinner>`;
|
|
12781
|
-
xl = x$
|
|
12736
|
+
xl = x$2`<decidables-spinner class="x xl"
|
|
12782
12737
|
disabled
|
|
12783
12738
|
.value=${this.xl}
|
|
12784
12739
|
>
|
|
12785
12740
|
<var class="math-var">x<sub class="subscript loss">loss</sub></var>
|
|
12786
12741
|
</decidables-spinner>`;
|
|
12787
|
-
pw = x$
|
|
12742
|
+
pw = x$2`<decidables-spinner class="p pw"
|
|
12788
12743
|
?disabled=${!this.interactive}
|
|
12789
12744
|
min="0"
|
|
12790
12745
|
max="1"
|
|
@@ -12794,7 +12749,7 @@
|
|
|
12794
12749
|
>
|
|
12795
12750
|
<var class="math-var">p<sub class="subscript win">win</sub></var>
|
|
12796
12751
|
</decidables-spinner>`;
|
|
12797
|
-
xs = x$
|
|
12752
|
+
xs = x$2`<decidables-spinner class="x xs"
|
|
12798
12753
|
?disabled=${!this.interactive}
|
|
12799
12754
|
.value=${this.xs}
|
|
12800
12755
|
@input=${this.xsInput.bind(this)}
|
|
@@ -12831,73 +12786,73 @@
|
|
|
12831
12786
|
// >
|
|
12832
12787
|
// <var class="math-var">γ</var>
|
|
12833
12788
|
// </decidables-spinner>`;
|
|
12834
|
-
vw = x$
|
|
12789
|
+
vw = x$2`<decidables-spinner class="v vw"
|
|
12835
12790
|
disabled
|
|
12836
12791
|
.value=${+this.vw.toFixed(1)}
|
|
12837
12792
|
>
|
|
12838
12793
|
<var class="math-var">v<sub class="subscript win">win</sub></var>
|
|
12839
12794
|
</decidables-spinner>`;
|
|
12840
|
-
vl = x$
|
|
12795
|
+
vl = x$2`<decidables-spinner class="v vl"
|
|
12841
12796
|
disabled
|
|
12842
12797
|
.value=${+this.vl.toFixed(1)}
|
|
12843
12798
|
>
|
|
12844
12799
|
<var class="math-var">v<sub class="subscript loss">loss</sub></var>
|
|
12845
12800
|
</decidables-spinner>`;
|
|
12846
|
-
ww = x$
|
|
12801
|
+
ww = x$2`<decidables-spinner class="w ww"
|
|
12847
12802
|
disabled
|
|
12848
12803
|
.value=${+this.ww.toFixed(2)}
|
|
12849
12804
|
>
|
|
12850
12805
|
<var class="math-var">w<sub class="subscript win">win</sub></var>
|
|
12851
12806
|
</decidables-spinner>`;
|
|
12852
|
-
wl = x$
|
|
12807
|
+
wl = x$2`<decidables-spinner class="w wl"
|
|
12853
12808
|
disabled
|
|
12854
12809
|
.value=${+this.wl.toFixed(2)}
|
|
12855
12810
|
>
|
|
12856
12811
|
<var class="math-var">w<sub class="subscript loss">loss</sub></var>
|
|
12857
12812
|
</decidables-spinner>`;
|
|
12858
|
-
vs = x$
|
|
12813
|
+
vs = x$2`<decidables-spinner class="v vs"
|
|
12859
12814
|
disabled
|
|
12860
12815
|
.value=${+this.vs.toFixed(1)}
|
|
12861
12816
|
>
|
|
12862
12817
|
<var class="math-var">v<sub class="subscript sure">sure</sub></var>
|
|
12863
12818
|
</decidables-spinner>`;
|
|
12864
|
-
ug = x$
|
|
12819
|
+
ug = x$2`<decidables-spinner class="u ug"
|
|
12865
12820
|
disabled
|
|
12866
12821
|
.value=${+this.ug.toFixed(1)}
|
|
12867
12822
|
>
|
|
12868
12823
|
<var class="math-var">U<sub class="subscript gamble">gamble</sub></var>
|
|
12869
12824
|
</decidables-spinner>`;
|
|
12870
|
-
us = x$
|
|
12825
|
+
us = x$2`<decidables-spinner class="u us"
|
|
12871
12826
|
disabled
|
|
12872
12827
|
.value=${+this.us.toFixed(1)}
|
|
12873
12828
|
>
|
|
12874
12829
|
<var class="math-var">U<sub class="subscript sure">sure</sub></var>
|
|
12875
12830
|
</decidables-spinner>`;
|
|
12876
|
-
uDiff = x$
|
|
12831
|
+
uDiff = x$2`${this.uDiff > 0 ? x$2`<span class="comparison" ${F({
|
|
12877
12832
|
in: v
|
|
12878
|
-
})}>></span>` : this.uDiff < 0 ? x$
|
|
12833
|
+
})}>></span>` : this.uDiff < 0 ? x$2`<span class="comparison" ${F({
|
|
12879
12834
|
in: v
|
|
12880
|
-
})}><</span>` : x$
|
|
12835
|
+
})}><</span>` : x$2`<span class="comparison" ${F({
|
|
12881
12836
|
in: v
|
|
12882
12837
|
})}>=</span>`}`;
|
|
12883
12838
|
} else {
|
|
12884
|
-
xw = x$
|
|
12885
|
-
xl = x$
|
|
12886
|
-
pw = x$
|
|
12887
|
-
xs = x$
|
|
12839
|
+
xw = x$2`<var class="math-var x xw">x<sub class="subscript win">win</sub></var>`;
|
|
12840
|
+
xl = x$2`<var class="math-var x xl">x<sub class="subscript loss">loss</sub></var>`;
|
|
12841
|
+
pw = x$2`<var class="math-var p pw">p<sub class="subscript win">win</sub></var>`;
|
|
12842
|
+
xs = x$2`<var class="math-var x xs">x<sub class="subscript sure">sure</sub></var>`;
|
|
12888
12843
|
// a = html`<var class="math-var a">α</var>`;
|
|
12889
12844
|
// l = html`<var class="math-var l">λ</var>`;
|
|
12890
12845
|
// g = html`<var class="math-var g">γ</var>`;
|
|
12891
|
-
vw = x$
|
|
12892
|
-
vl = x$
|
|
12893
|
-
ww = x$
|
|
12894
|
-
wl = x$
|
|
12895
|
-
vs = x$
|
|
12896
|
-
ug = x$
|
|
12897
|
-
us = x$
|
|
12898
|
-
uDiff = x$
|
|
12899
|
-
}
|
|
12900
|
-
const equation = x$
|
|
12846
|
+
vw = x$2`<var class="math-var v vw">v<sub class="subscript win">win</sub></var>`;
|
|
12847
|
+
vl = x$2`<var class="math-var v vl">v<sub class="subscript loss">loss</sub></var>`;
|
|
12848
|
+
ww = x$2`<var class="math-var w ww">w<sub class="subscript win">win</sub></var>`;
|
|
12849
|
+
wl = x$2`<var class="math-var w wl">w<sub class="subscript loss">loss</sub></var>`;
|
|
12850
|
+
vs = x$2`<var class="math-var v vs">v<sub class="subscript sure">sure</sub></var>`;
|
|
12851
|
+
ug = x$2`<var class="math-var u ug">U<sub class="subscript gamble">gamble</sub></var>`;
|
|
12852
|
+
us = x$2`<var class="math-var u us">U<sub class="subscript sure">sure</sub></var>`;
|
|
12853
|
+
uDiff = x$2`<span class="comparison">≟</span>`;
|
|
12854
|
+
}
|
|
12855
|
+
const equation = x$2`
|
|
12901
12856
|
<tr>
|
|
12902
12857
|
<td class="right">
|
|
12903
12858
|
<span class="function v"><var class="math-var v tight">v</var><span class="paren tight">(</span>${xw}<span class="paren tight">)</span></span> <span class="function w"><var class="math-var w tight">w</var><span class="paren tight">(</span>${pw}<span class="paren tight">)</span></span><span class="plus">+</span><span class="function v"><var class="math-var v tight">v</var><span class="paren tight">(</span>${xl}<span class="paren tight">)</span></span> <span class="bracket tight">[</span><span class="tight">1</span><span class="minus">−</span><span class="function w"><var class="math-var w">w</var><span class="paren tight">(</span>${pw}<span class="paren tight">)</span></span><span class="bracket tight">]</span>
|
|
@@ -12931,7 +12886,7 @@
|
|
|
12931
12886
|
${us}
|
|
12932
12887
|
</td>
|
|
12933
12888
|
</tr>`;
|
|
12934
|
-
return x$
|
|
12889
|
+
return x$2`
|
|
12935
12890
|
<div class="holder">
|
|
12936
12891
|
<table class="equation">
|
|
12937
12892
|
<tbody>
|
|
@@ -13912,7 +13867,7 @@
|
|
|
13912
13867
|
facets: facets.map(I => I.slice().reverse())
|
|
13913
13868
|
};
|
|
13914
13869
|
}
|
|
13915
|
-
function sort
|
|
13870
|
+
function sort(order, {
|
|
13916
13871
|
sort,
|
|
13917
13872
|
...options
|
|
13918
13873
|
} = {}) {
|
|
@@ -14156,7 +14111,7 @@
|
|
|
14156
14111
|
const reduceTitle = {
|
|
14157
14112
|
reduceIndex(I, X) {
|
|
14158
14113
|
const n = 5;
|
|
14159
|
-
const groups = sort$
|
|
14114
|
+
const groups = sort$1(rollup(I, V => V.length, i => X[i]), second);
|
|
14160
14115
|
const top = groups.slice(-n).reverse();
|
|
14161
14116
|
if (top.length < groups.length) {
|
|
14162
14117
|
const bottom = groups.slice(0, 1 - n);
|
|
@@ -15020,7 +14975,7 @@
|
|
|
15020
14975
|
padding = 0.5,
|
|
15021
14976
|
...options
|
|
15022
14977
|
}) {
|
|
15023
|
-
return maybeRound(point$
|
|
14978
|
+
return maybeRound(point$4().align(align).padding(padding), channels, options, key);
|
|
15024
14979
|
}
|
|
15025
14980
|
function createScaleBand(key, channels, {
|
|
15026
14981
|
align = 0.5,
|
|
@@ -15057,7 +15012,7 @@
|
|
|
15057
15012
|
if (values.size > 10e3 && registry.get(key) === position) {
|
|
15058
15013
|
throw new Error(`implicit ordinal domain of ${key} scale has more than 10,000 values`);
|
|
15059
15014
|
}
|
|
15060
|
-
return sort$
|
|
15015
|
+
return sort$1(values, ascendingDefined);
|
|
15061
15016
|
}
|
|
15062
15017
|
|
|
15063
15018
|
// If all channels provide a consistent hint, propagate it to the scale.
|
|
@@ -21780,7 +21735,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
21780
21735
|
strokeWidth: 1.5
|
|
21781
21736
|
};
|
|
21782
21737
|
function withDefaultSort(options) {
|
|
21783
|
-
return options.sort === undefined && options.reverse === undefined ? sort
|
|
21738
|
+
return options.sort === undefined && options.reverse === undefined ? sort({
|
|
21784
21739
|
channel: "-r"
|
|
21785
21740
|
}, options) : options;
|
|
21786
21741
|
}
|
|
@@ -22144,7 +22099,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22144
22099
|
`];
|
|
22145
22100
|
}
|
|
22146
22101
|
render() {
|
|
22147
|
-
return x$
|
|
22102
|
+
return x$2`
|
|
22148
22103
|
<div>
|
|
22149
22104
|
<div>After ${this.choices.length} trials:</div>
|
|
22150
22105
|
<div>Current:
|
|
@@ -22305,6 +22260,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22305
22260
|
|
|
22306
22261
|
decidables-slider {
|
|
22307
22262
|
line-height: 1;
|
|
22263
|
+
|
|
22308
22264
|
text-align: center;
|
|
22309
22265
|
}
|
|
22310
22266
|
|
|
@@ -22329,9 +22285,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22329
22285
|
`];
|
|
22330
22286
|
}
|
|
22331
22287
|
render() {
|
|
22332
|
-
return x$
|
|
22288
|
+
return x$2`
|
|
22333
22289
|
<div class="holder">
|
|
22334
|
-
${this.a != null ? x$
|
|
22290
|
+
${this.a != null ? x$2`<decidables-slider class="a"
|
|
22335
22291
|
?disabled=${!this.interactive}
|
|
22336
22292
|
scale
|
|
22337
22293
|
min=${CPTMath.a.MIN}
|
|
@@ -22340,8 +22296,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22340
22296
|
.value=${+this.a.toFixed(2)}
|
|
22341
22297
|
@change=${this.setAlpha.bind(this)}
|
|
22342
22298
|
@input=${this.setAlpha.bind(this)}
|
|
22343
|
-
><div>Alpha<br><span class="math-var">α</span></div></decidables-slider>` : x$
|
|
22344
|
-
${this.l != null ? x$
|
|
22299
|
+
><div>Alpha<br><span class="math-var">α</span></div></decidables-slider>` : x$2``}
|
|
22300
|
+
${this.l != null ? x$2`<decidables-slider class="l"
|
|
22345
22301
|
?disabled=${!this.interactive}
|
|
22346
22302
|
scale
|
|
22347
22303
|
min=${CPTMath.l.MIN}
|
|
@@ -22350,8 +22306,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22350
22306
|
.value=${+this.l.toFixed(2)}
|
|
22351
22307
|
@change=${this.setLambda.bind(this)}
|
|
22352
22308
|
@input=${this.setLambda.bind(this)}
|
|
22353
|
-
><div>Lambda<br><span class="math-var">λ</span></div></decidables-slider>` : x$
|
|
22354
|
-
${this.g != null ? x$
|
|
22309
|
+
><div>Lambda<br><span class="math-var">λ</span></div></decidables-slider>` : x$2``}
|
|
22310
|
+
${this.g != null ? x$2`<decidables-slider class="g"
|
|
22355
22311
|
?disabled=${!this.interactive}
|
|
22356
22312
|
scale
|
|
22357
22313
|
min=${CPTMath.g.MIN}
|
|
@@ -22360,7 +22316,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22360
22316
|
.value=${+this.g.toFixed(2)}
|
|
22361
22317
|
@change=${this.setGamma.bind(this)}
|
|
22362
22318
|
@input=${this.setGamma.bind(this)}
|
|
22363
|
-
><div>Gamma<br><span class="math-var">γ</span></div></decidables-slider>` : x$
|
|
22319
|
+
><div>Gamma<br><span class="math-var">γ</span></div></decidables-slider>` : x$2``}
|
|
22364
22320
|
</div>`;
|
|
22365
22321
|
}
|
|
22366
22322
|
}
|
|
@@ -22598,9 +22554,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22598
22554
|
|
|
22599
22555
|
.curve.interactive {
|
|
22600
22556
|
cursor: nwse-resize;
|
|
22557
|
+
outline: none;
|
|
22601
22558
|
|
|
22602
22559
|
filter: url("#shadow-2");
|
|
22603
|
-
outline: none;
|
|
22604
22560
|
}
|
|
22605
22561
|
|
|
22606
22562
|
.curve.interactive:hover {
|
|
@@ -22618,7 +22574,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22618
22574
|
transform: translateY(0);
|
|
22619
22575
|
}
|
|
22620
22576
|
|
|
22621
|
-
|
|
22577
|
+
.curve.interactive:focus-visible {
|
|
22622
22578
|
filter: url("#shadow-8");
|
|
22623
22579
|
|
|
22624
22580
|
/* HACK: This gets Safari to correctly apply the filter! */
|
|
@@ -22627,9 +22583,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22627
22583
|
|
|
22628
22584
|
.point.interactive {
|
|
22629
22585
|
cursor: nesw-resize;
|
|
22586
|
+
outline: none;
|
|
22630
22587
|
|
|
22631
22588
|
filter: url("#shadow-2");
|
|
22632
|
-
outline: none;
|
|
22633
22589
|
|
|
22634
22590
|
/* HACK: This gets Safari to correctly apply the filter! */
|
|
22635
22591
|
stroke: #000000;
|
|
@@ -22651,7 +22607,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22651
22607
|
stroke: #00ff00;
|
|
22652
22608
|
}
|
|
22653
22609
|
|
|
22654
|
-
|
|
22610
|
+
.point.interactive:focus-visible {
|
|
22655
22611
|
filter: url("#shadow-8");
|
|
22656
22612
|
|
|
22657
22613
|
/* HACK: This gets Safari to correctly apply the filter! */
|
|
@@ -22685,8 +22641,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22685
22641
|
|
|
22686
22642
|
.diagonal {
|
|
22687
22643
|
stroke: var(---color-element-border);
|
|
22688
|
-
stroke-dasharray: 4;
|
|
22689
22644
|
stroke-width: 1;
|
|
22645
|
+
stroke-dasharray: 4;
|
|
22690
22646
|
}
|
|
22691
22647
|
|
|
22692
22648
|
.curve {
|
|
@@ -22719,8 +22675,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22719
22675
|
font-size: 0.75rem;
|
|
22720
22676
|
|
|
22721
22677
|
dominant-baseline: middle;
|
|
22722
|
-
text-anchor: middle;
|
|
22723
22678
|
|
|
22679
|
+
text-anchor: middle;
|
|
22724
22680
|
fill: var(---color-text-inverse);
|
|
22725
22681
|
}
|
|
22726
22682
|
|
|
@@ -22732,15 +22688,15 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
22732
22688
|
|
|
22733
22689
|
@media (pointer: coarse) {
|
|
22734
22690
|
.interactive .touch {
|
|
22735
|
-
stroke-linecap: round;
|
|
22736
22691
|
stroke-width: 12;
|
|
22692
|
+
stroke-linecap: round;
|
|
22737
22693
|
}
|
|
22738
22694
|
}
|
|
22739
22695
|
`];
|
|
22740
22696
|
}
|
|
22741
22697
|
render() {
|
|
22742
22698
|
/* eslint-disable-line class-methods-use-this */
|
|
22743
|
-
return x$
|
|
22699
|
+
return x$2``;
|
|
22744
22700
|
}
|
|
22745
22701
|
willUpdate() {
|
|
22746
22702
|
this.alignState();
|
|
@@ -23258,476 +23214,417 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
23258
23214
|
}
|
|
23259
23215
|
customElements.define('cpt-probability', CPTProbability);
|
|
23260
23216
|
|
|
23261
|
-
|
|
23262
|
-
* Converts a point from 3D space to 2D space using orthographic projection.
|
|
23263
|
-
*
|
|
23264
|
-
* @param {Object} d - The 3D point to be projected.
|
|
23265
|
-
* @param {Object} options - Options for the projection.
|
|
23266
|
-
* @param {Array} options.origin - The origin point for the projection.
|
|
23267
|
-
* @param {number} options.scale - The scale factor for the projection.
|
|
23268
|
-
* @returns {Object} The projected point in 2D space.
|
|
23269
|
-
*/
|
|
23270
|
-
function orthographic(d, options) {
|
|
23271
|
-
/**
|
|
23272
|
-
* @typedef {Object} Point2D
|
|
23273
|
-
* @property {number} x - The x-coordinate in 2D space.
|
|
23274
|
-
* @property {number} y - The y-coordinate in 2D space.
|
|
23275
|
-
*/
|
|
23276
|
-
|
|
23277
|
-
/**
|
|
23278
|
-
* @type {Point2D}
|
|
23279
|
-
*/
|
|
23280
|
-
return {
|
|
23281
|
-
x: options.origin.x + options.scale * d.x,
|
|
23282
|
-
y: options.origin.y + options.scale * d.y
|
|
23283
|
-
};
|
|
23284
|
-
}
|
|
23285
|
-
|
|
23286
|
-
/**
|
|
23287
|
-
* Returns the x-coordinate of a point in 3D space.
|
|
23288
|
-
*
|
|
23289
|
-
* @param {Object} p - The point in 3D space represented as an object e.g {x: 0, y: 1, z: 0}
|
|
23290
|
-
* @returns {number} The x-coordinate of the point.
|
|
23291
|
-
*/
|
|
23292
|
-
function x(p) {
|
|
23293
|
-
return p.x;
|
|
23294
|
-
}
|
|
23217
|
+
var d33d$1 = {exports: {}};
|
|
23295
23218
|
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
|
|
23299
|
-
|
|
23300
|
-
|
|
23301
|
-
*/
|
|
23302
|
-
function y(p) {
|
|
23303
|
-
return p.y;
|
|
23304
|
-
}
|
|
23219
|
+
var d33d = d33d$1.exports;
|
|
23220
|
+
(function (module, exports$1) {
|
|
23221
|
+
(function (i, h) {
|
|
23222
|
+
h(exports$1) ;
|
|
23223
|
+
})(d33d, function (i) {
|
|
23305
23224
|
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23309
|
-
|
|
23310
|
-
|
|
23311
|
-
|
|
23312
|
-
|
|
23313
|
-
|
|
23314
|
-
|
|
23315
|
-
|
|
23316
|
-
|
|
23317
|
-
|
|
23318
|
-
|
|
23319
|
-
|
|
23320
|
-
|
|
23321
|
-
|
|
23322
|
-
|
|
23323
|
-
|
|
23324
|
-
|
|
23325
|
-
|
|
23326
|
-
|
|
23327
|
-
|
|
23328
|
-
|
|
23329
|
-
|
|
23330
|
-
|
|
23331
|
-
|
|
23332
|
-
|
|
23333
|
-
|
|
23334
|
-
|
|
23335
|
-
|
|
23336
|
-
|
|
23337
|
-
|
|
23338
|
-
|
|
23339
|
-
|
|
23340
|
-
|
|
23341
|
-
|
|
23342
|
-
|
|
23343
|
-
|
|
23344
|
-
|
|
23345
|
-
|
|
23346
|
-
|
|
23347
|
-
|
|
23348
|
-
|
|
23349
|
-
|
|
23350
|
-
|
|
23351
|
-
|
|
23352
|
-
|
|
23353
|
-
|
|
23354
|
-
|
|
23355
|
-
|
|
23356
|
-
|
|
23357
|
-
|
|
23358
|
-
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
|
|
23362
|
-
|
|
23363
|
-
|
|
23364
|
-
|
|
23365
|
-
|
|
23366
|
-
|
|
23367
|
-
|
|
23368
|
-
|
|
23369
|
-
|
|
23370
|
-
|
|
23371
|
-
|
|
23372
|
-
|
|
23373
|
-
|
|
23374
|
-
|
|
23375
|
-
|
|
23376
|
-
|
|
23377
|
-
|
|
23378
|
-
|
|
23379
|
-
|
|
23380
|
-
|
|
23381
|
-
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23225
|
+
function h(r) {
|
|
23226
|
+
return `M${r[0].projected.x},${r[0].projected.y}L${r[1].projected.x},${r[1].projected.y}L${r[2].projected.x},${r[2].projected.y}L${r[3].projected.x},${r[3].projected.y}Z`;
|
|
23227
|
+
}
|
|
23228
|
+
function j(r) {
|
|
23229
|
+
return r.x;
|
|
23230
|
+
}
|
|
23231
|
+
function C(r) {
|
|
23232
|
+
return r.y;
|
|
23233
|
+
}
|
|
23234
|
+
function Z(r) {
|
|
23235
|
+
return r.z;
|
|
23236
|
+
}
|
|
23237
|
+
class c {
|
|
23238
|
+
constructor() {
|
|
23239
|
+
this._scale = 1, this._origin = {
|
|
23240
|
+
x: 0,
|
|
23241
|
+
y: 0
|
|
23242
|
+
}, this._rotateX = 0, this._rotateY = 0, this._rotateZ = 0, this._x = j, this._y = C, this._z = Z, this._rotationCenter = {
|
|
23243
|
+
x: 0,
|
|
23244
|
+
y: 0,
|
|
23245
|
+
z: 0
|
|
23246
|
+
};
|
|
23247
|
+
}
|
|
23248
|
+
scale(t) {
|
|
23249
|
+
return t ? (this._scale = t, this) : this._scale;
|
|
23250
|
+
}
|
|
23251
|
+
origin(t) {
|
|
23252
|
+
return t ? (this._origin = t, this) : this._origin;
|
|
23253
|
+
}
|
|
23254
|
+
rotationCenter(t) {
|
|
23255
|
+
return t ? (this._rotationCenter = t, this) : this._rotationCenter;
|
|
23256
|
+
}
|
|
23257
|
+
rotateX(t) {
|
|
23258
|
+
return t ? (this._rotateX = t, this) : this._rotateX;
|
|
23259
|
+
}
|
|
23260
|
+
rotateY(t) {
|
|
23261
|
+
return t ? (this._rotateY = t, this) : this._rotateY;
|
|
23262
|
+
}
|
|
23263
|
+
rotateZ(t) {
|
|
23264
|
+
return t ? (this._rotateZ = t, this) : this._rotateZ;
|
|
23265
|
+
}
|
|
23266
|
+
x(t) {
|
|
23267
|
+
return typeof t == "function" ? (this._x = t, this) : this._x;
|
|
23268
|
+
}
|
|
23269
|
+
y(t) {
|
|
23270
|
+
return typeof t == "function" ? (this._y = t, this) : this._y;
|
|
23271
|
+
}
|
|
23272
|
+
z(t) {
|
|
23273
|
+
return typeof t == "function" ? (this._z = t, this) : this._z;
|
|
23274
|
+
}
|
|
23275
|
+
}
|
|
23276
|
+
function z(r) {
|
|
23277
|
+
const t = [...r, r[0]];
|
|
23278
|
+
let n = 0;
|
|
23279
|
+
for (let e = 0; e < r.length; e += 1) {
|
|
23280
|
+
const o = t[e].rotated,
|
|
23281
|
+
s = t[e + 1].rotated;
|
|
23282
|
+
n += (s.x - o.x) * (s.y + o.y);
|
|
23283
|
+
}
|
|
23284
|
+
return n > 0;
|
|
23285
|
+
}
|
|
23286
|
+
function u(r) {
|
|
23287
|
+
let t = 0,
|
|
23288
|
+
n = 0,
|
|
23289
|
+
e = 0;
|
|
23290
|
+
for (let o = r.length - 1; o >= 0; o -= 1) {
|
|
23291
|
+
const s = r[o].rotated;
|
|
23292
|
+
t += s.x, n += s.y, e += s.z;
|
|
23293
|
+
}
|
|
23294
|
+
return {
|
|
23295
|
+
x: t / r.length,
|
|
23296
|
+
y: n / r.length,
|
|
23297
|
+
z: e / r.length
|
|
23298
|
+
};
|
|
23299
|
+
}
|
|
23300
|
+
function _(r, t) {
|
|
23301
|
+
const n = t.rotateCenter,
|
|
23302
|
+
e = {
|
|
23303
|
+
x: r.x - n.x,
|
|
23304
|
+
y: r.y - n.y,
|
|
23305
|
+
z: r.z - n.z
|
|
23306
|
+
},
|
|
23307
|
+
o = X(e, t.z),
|
|
23308
|
+
s = $(o, t.y),
|
|
23309
|
+
a = D(s, t.x);
|
|
23310
|
+
return {
|
|
23311
|
+
x: a.x + n.x,
|
|
23312
|
+
y: a.y + n.y,
|
|
23313
|
+
z: a.z + n.z
|
|
23314
|
+
};
|
|
23315
|
+
}
|
|
23316
|
+
function D(r, t) {
|
|
23317
|
+
const n = Math.sin(t),
|
|
23318
|
+
e = Math.cos(t);
|
|
23319
|
+
return {
|
|
23320
|
+
x: r.x,
|
|
23321
|
+
y: r.y * e - r.z * n,
|
|
23322
|
+
z: r.y * n + r.z * e
|
|
23323
|
+
};
|
|
23324
|
+
}
|
|
23325
|
+
function $(r, t) {
|
|
23326
|
+
const n = Math.sin(t),
|
|
23327
|
+
e = Math.cos(t);
|
|
23328
|
+
return {
|
|
23329
|
+
x: r.z * n + r.x * e,
|
|
23330
|
+
y: r.y,
|
|
23331
|
+
z: r.z * e - r.x * n
|
|
23332
|
+
};
|
|
23333
|
+
}
|
|
23334
|
+
function X(r, t) {
|
|
23335
|
+
const n = Math.sin(t),
|
|
23336
|
+
e = Math.cos(t);
|
|
23337
|
+
return {
|
|
23338
|
+
x: r.x * e - r.y * n,
|
|
23339
|
+
y: r.x * n + r.y * e,
|
|
23340
|
+
z: r.z
|
|
23341
|
+
};
|
|
23342
|
+
}
|
|
23343
|
+
function w(r, t) {
|
|
23344
|
+
return {
|
|
23345
|
+
x: t.origin.x + t.scale * r.x,
|
|
23346
|
+
y: t.origin.y + t.scale * r.y
|
|
23347
|
+
};
|
|
23348
|
+
}
|
|
23349
|
+
const d = (r, t) => r.map(n => {
|
|
23350
|
+
const e = {
|
|
23351
|
+
x: t.x(n),
|
|
23352
|
+
y: t.y(n),
|
|
23353
|
+
z: t.z(n)
|
|
23354
|
+
},
|
|
23355
|
+
o = _(e, {
|
|
23356
|
+
x: t.rotateX,
|
|
23357
|
+
y: t.rotateY,
|
|
23358
|
+
z: t.rotateZ,
|
|
23359
|
+
rotateCenter: t.rotateCenter
|
|
23360
|
+
}),
|
|
23361
|
+
s = w(o, {
|
|
23362
|
+
scale: t.scale,
|
|
23363
|
+
origin: t.origin
|
|
23364
|
+
});
|
|
23365
|
+
return {
|
|
23366
|
+
...n,
|
|
23367
|
+
rotated: o,
|
|
23368
|
+
projected: s
|
|
23369
|
+
};
|
|
23388
23370
|
});
|
|
23389
|
-
|
|
23390
|
-
|
|
23391
|
-
|
|
23392
|
-
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
|
|
23401
|
-
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
|
|
23420
|
-
|
|
23421
|
-
|
|
23422
|
-
|
|
23423
|
-
|
|
23424
|
-
|
|
23425
|
-
|
|
23426
|
-
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
|
|
23430
|
-
|
|
23431
|
-
|
|
23432
|
-
|
|
23433
|
-
|
|
23434
|
-
|
|
23435
|
-
|
|
23436
|
-
|
|
23437
|
-
|
|
23438
|
-
|
|
23439
|
-
|
|
23440
|
-
|
|
23441
|
-
|
|
23442
|
-
|
|
23443
|
-
|
|
23444
|
-
|
|
23445
|
-
|
|
23446
|
-
|
|
23447
|
-
|
|
23448
|
-
|
|
23449
|
-
|
|
23450
|
-
|
|
23451
|
-
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
|
|
23455
|
-
|
|
23456
|
-
|
|
23457
|
-
|
|
23458
|
-
|
|
23459
|
-
|
|
23460
|
-
|
|
23461
|
-
|
|
23462
|
-
|
|
23463
|
-
|
|
23464
|
-
|
|
23465
|
-
|
|
23466
|
-
|
|
23467
|
-
|
|
23468
|
-
|
|
23469
|
-
|
|
23470
|
-
|
|
23471
|
-
|
|
23472
|
-
|
|
23473
|
-
|
|
23474
|
-
|
|
23475
|
-
|
|
23476
|
-
|
|
23477
|
-
|
|
23478
|
-
|
|
23479
|
-
|
|
23480
|
-
|
|
23481
|
-
|
|
23482
|
-
|
|
23483
|
-
|
|
23484
|
-
|
|
23485
|
-
|
|
23486
|
-
|
|
23487
|
-
|
|
23488
|
-
|
|
23489
|
-
|
|
23490
|
-
|
|
23491
|
-
|
|
23492
|
-
|
|
23493
|
-
|
|
23494
|
-
|
|
23495
|
-
|
|
23496
|
-
|
|
23497
|
-
|
|
23498
|
-
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
|
|
23502
|
-
|
|
23503
|
-
|
|
23504
|
-
|
|
23505
|
-
|
|
23506
|
-
|
|
23507
|
-
|
|
23508
|
-
|
|
23509
|
-
|
|
23510
|
-
|
|
23511
|
-
|
|
23512
|
-
|
|
23513
|
-
|
|
23514
|
-
|
|
23515
|
-
|
|
23516
|
-
|
|
23517
|
-
|
|
23518
|
-
|
|
23519
|
-
|
|
23520
|
-
|
|
23521
|
-
|
|
23522
|
-
|
|
23523
|
-
|
|
23524
|
-
|
|
23525
|
-
|
|
23526
|
-
|
|
23527
|
-
|
|
23528
|
-
|
|
23529
|
-
|
|
23530
|
-
|
|
23531
|
-
|
|
23532
|
-
|
|
23533
|
-
|
|
23534
|
-
|
|
23535
|
-
|
|
23536
|
-
|
|
23537
|
-
|
|
23538
|
-
|
|
23539
|
-
|
|
23540
|
-
|
|
23541
|
-
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
|
|
23546
|
-
|
|
23547
|
-
|
|
23548
|
-
|
|
23549
|
-
|
|
23550
|
-
|
|
23551
|
-
|
|
23552
|
-
|
|
23553
|
-
|
|
23554
|
-
|
|
23555
|
-
|
|
23556
|
-
|
|
23557
|
-
|
|
23558
|
-
|
|
23559
|
-
|
|
23560
|
-
|
|
23561
|
-
|
|
23562
|
-
|
|
23563
|
-
|
|
23564
|
-
|
|
23565
|
-
|
|
23566
|
-
|
|
23567
|
-
|
|
23568
|
-
|
|
23569
|
-
|
|
23570
|
-
|
|
23571
|
-
|
|
23572
|
-
|
|
23573
|
-
|
|
23574
|
-
|
|
23575
|
-
|
|
23576
|
-
|
|
23577
|
-
|
|
23578
|
-
|
|
23579
|
-
|
|
23580
|
-
|
|
23581
|
-
|
|
23582
|
-
|
|
23583
|
-
|
|
23584
|
-
|
|
23585
|
-
|
|
23586
|
-
|
|
23587
|
-
|
|
23588
|
-
|
|
23589
|
-
|
|
23590
|
-
|
|
23591
|
-
|
|
23592
|
-
|
|
23593
|
-
|
|
23594
|
-
|
|
23595
|
-
|
|
23596
|
-
|
|
23597
|
-
|
|
23598
|
-
|
|
23599
|
-
|
|
23600
|
-
|
|
23601
|
-
|
|
23602
|
-
|
|
23603
|
-
|
|
23604
|
-
|
|
23605
|
-
|
|
23606
|
-
|
|
23607
|
-
|
|
23608
|
-
|
|
23609
|
-
|
|
23610
|
-
|
|
23611
|
-
|
|
23612
|
-
|
|
23613
|
-
|
|
23614
|
-
|
|
23615
|
-
|
|
23616
|
-
|
|
23617
|
-
|
|
23618
|
-
|
|
23619
|
-
|
|
23620
|
-
|
|
23621
|
-
|
|
23622
|
-
|
|
23623
|
-
|
|
23624
|
-
|
|
23625
|
-
|
|
23626
|
-
|
|
23627
|
-
|
|
23628
|
-
|
|
23629
|
-
|
|
23630
|
-
|
|
23631
|
-
|
|
23632
|
-
|
|
23633
|
-
|
|
23634
|
-
|
|
23635
|
-
|
|
23636
|
-
|
|
23637
|
-
|
|
23638
|
-
|
|
23639
|
-
|
|
23640
|
-
|
|
23641
|
-
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
z: p.z
|
|
23647
|
-
};
|
|
23648
|
-
}
|
|
23649
|
-
|
|
23650
|
-
function point(points, options, point, angles) {
|
|
23651
|
-
for (let i = points.length - 1; i >= 0; i--) {
|
|
23652
|
-
const p = points[i];
|
|
23653
|
-
p.rotated = rotateRzRyRx({
|
|
23654
|
-
x: point.x(p),
|
|
23655
|
-
y: point.y(p),
|
|
23656
|
-
z: point.z(p)
|
|
23657
|
-
}, angles);
|
|
23658
|
-
p.centroid = p.rotated;
|
|
23659
|
-
p.projected = options.project(p.rotated, options);
|
|
23660
|
-
}
|
|
23661
|
-
return points;
|
|
23662
|
-
}
|
|
23663
|
-
function points3D() {
|
|
23664
|
-
return generator3D(point, undefined);
|
|
23665
|
-
}
|
|
23666
|
-
|
|
23667
|
-
function drawPlane(d) {
|
|
23668
|
-
return `M${d[0].projected.x},${d[0].projected.y}L${d[1].projected.x},${d[1].projected.y}L${d[2].projected.x},${d[2].projected.y}L${d[3].projected.x},${d[3].projected.y}Z`;
|
|
23669
|
-
}
|
|
23670
|
-
|
|
23671
|
-
function gridPlane(grid, options, point$1, angles) {
|
|
23672
|
-
const points = point(grid, options, point$1, angles);
|
|
23673
|
-
const planes = [];
|
|
23674
|
-
const numPts = options.row;
|
|
23675
|
-
const numRow = points.length / numPts;
|
|
23676
|
-
let cnt = 0;
|
|
23677
|
-
for (var i = numRow - 1; i > 0; i--) {
|
|
23678
|
-
for (var j = numPts - 1; j > 0; j--) {
|
|
23679
|
-
var p1 = j + i * numPts,
|
|
23680
|
-
p4 = p1 - 1,
|
|
23681
|
-
p2 = p4 - numPts + 1,
|
|
23682
|
-
p3 = p2 - 1;
|
|
23683
|
-
var pl = [points[p1], points[p2], points[p3], points[p4]];
|
|
23684
|
-
pl.plane = `plane-${cnt++}`;
|
|
23685
|
-
pl.ccw = ccw(pl);
|
|
23686
|
-
pl.centroid = centroid(pl);
|
|
23687
|
-
planes.push(pl);
|
|
23688
|
-
}
|
|
23689
|
-
}
|
|
23690
|
-
return planes;
|
|
23691
|
-
}
|
|
23692
|
-
function gridPlanes3D() {
|
|
23693
|
-
return generator3D(gridPlane, drawPlane);
|
|
23694
|
-
}
|
|
23695
|
-
|
|
23696
|
-
function drawLineStrip(lineStrip) {
|
|
23697
|
-
const lastPoint = lineStrip[lineStrip.length - 1];
|
|
23698
|
-
let path = `M${lastPoint.projected.x},${lastPoint.projected.y}`;
|
|
23699
|
-
for (var i = lineStrip.length - 2; i >= 0; i--) {
|
|
23700
|
-
const p = lineStrip[i].projected;
|
|
23701
|
-
path += `L${p.x},${p.y}`;
|
|
23702
|
-
}
|
|
23703
|
-
return path;
|
|
23704
|
-
}
|
|
23705
|
-
|
|
23706
|
-
function lineStrip(lineStrip, options, point, angles) {
|
|
23707
|
-
for (let i = lineStrip.length - 1; i >= 0; i--) {
|
|
23708
|
-
const l = lineStrip[i];
|
|
23709
|
-
const m = l.length / 2;
|
|
23710
|
-
const t = parseInt(m);
|
|
23711
|
-
for (let j = l.length - 1; j >= 0; j--) {
|
|
23712
|
-
const p = l[j];
|
|
23713
|
-
p.rotated = rotateRzRyRx({
|
|
23714
|
-
x: point.x(p),
|
|
23715
|
-
y: point.y(p),
|
|
23716
|
-
z: point.z(p)
|
|
23717
|
-
}, angles);
|
|
23718
|
-
p.projected = options.project(p.rotated, options);
|
|
23719
|
-
}
|
|
23720
|
-
l.centroid = t === m ? centroid([l[m - 1], l[m]]) : {
|
|
23721
|
-
x: l[t].rotated.x,
|
|
23722
|
-
y: l[t].rotated.y,
|
|
23723
|
-
z: l[t].rotated.z
|
|
23724
|
-
};
|
|
23725
|
-
}
|
|
23726
|
-
return lineStrip;
|
|
23727
|
-
}
|
|
23728
|
-
function lineStrips3D() {
|
|
23729
|
-
return generator3D(lineStrip, drawLineStrip);
|
|
23730
|
-
}
|
|
23371
|
+
function l(r, t) {
|
|
23372
|
+
const n = r;
|
|
23373
|
+
return n.centroid = u(n), n.ccw = z(n), n.face = t, n;
|
|
23374
|
+
}
|
|
23375
|
+
class Y extends c {
|
|
23376
|
+
data(t) {
|
|
23377
|
+
return t.map(n => {
|
|
23378
|
+
const e = d(n, {
|
|
23379
|
+
origin: this.origin(),
|
|
23380
|
+
rotateCenter: this.rotationCenter(),
|
|
23381
|
+
rotateX: this.rotateX(),
|
|
23382
|
+
rotateY: this.rotateY(),
|
|
23383
|
+
rotateZ: this.rotateZ(),
|
|
23384
|
+
scale: this.scale(),
|
|
23385
|
+
x: this.x(),
|
|
23386
|
+
y: this.y(),
|
|
23387
|
+
z: this.z()
|
|
23388
|
+
}),
|
|
23389
|
+
o = l([e[0], e[1], e[2], e[3]], "front"),
|
|
23390
|
+
s = l([e[7], e[6], e[5], e[4]], "back"),
|
|
23391
|
+
a = l([e[4], e[5], e[1], e[0]], "left"),
|
|
23392
|
+
y = l([e[3], e[2], e[6], e[7]], "right"),
|
|
23393
|
+
x = l([e[4], e[0], e[3], e[7]], "top"),
|
|
23394
|
+
g = l([e[1], e[5], e[6], e[2]], "bottom");
|
|
23395
|
+
return e.faces = [o, s, a, y, x, g], e.centroid = {
|
|
23396
|
+
x: (a.centroid.x + y.centroid.x) / 2,
|
|
23397
|
+
y: (x.centroid.y + g.centroid.y) / 2,
|
|
23398
|
+
z: (o.centroid.z + s.centroid.z) / 2
|
|
23399
|
+
}, e;
|
|
23400
|
+
});
|
|
23401
|
+
}
|
|
23402
|
+
draw(t) {
|
|
23403
|
+
return h(t);
|
|
23404
|
+
}
|
|
23405
|
+
}
|
|
23406
|
+
function P() {
|
|
23407
|
+
return new Y();
|
|
23408
|
+
}
|
|
23409
|
+
class M extends c {
|
|
23410
|
+
constructor() {
|
|
23411
|
+
super(...arguments), this._rows = 1;
|
|
23412
|
+
}
|
|
23413
|
+
rows(t) {
|
|
23414
|
+
return t ? (this._rows = t, this) : this._rows;
|
|
23415
|
+
}
|
|
23416
|
+
data(t) {
|
|
23417
|
+
const n = this._rows,
|
|
23418
|
+
e = d(t, {
|
|
23419
|
+
origin: this.origin(),
|
|
23420
|
+
rotateCenter: this.rotationCenter(),
|
|
23421
|
+
rotateX: this.rotateX(),
|
|
23422
|
+
rotateY: this.rotateY(),
|
|
23423
|
+
rotateZ: this.rotateZ(),
|
|
23424
|
+
scale: this.scale(),
|
|
23425
|
+
x: this.x(),
|
|
23426
|
+
y: this.y(),
|
|
23427
|
+
z: this.z()
|
|
23428
|
+
}),
|
|
23429
|
+
o = e.length / n,
|
|
23430
|
+
s = [];
|
|
23431
|
+
let a = 0;
|
|
23432
|
+
for (let y = o - 1; y > 0; y -= 1) for (let x = n - 1; x > 0; x -= 1) {
|
|
23433
|
+
const g = x + y * n,
|
|
23434
|
+
m = g - 1,
|
|
23435
|
+
p = m - n + 1,
|
|
23436
|
+
N = p - 1,
|
|
23437
|
+
f = [e[g], e[p], e[N], e[m]];
|
|
23438
|
+
f.plane = `plane-${a}`, f.ccw = z(f), f.centroid = u(f), s.push(f), a += 1;
|
|
23439
|
+
}
|
|
23440
|
+
return s;
|
|
23441
|
+
}
|
|
23442
|
+
draw(t) {
|
|
23443
|
+
return h(t);
|
|
23444
|
+
}
|
|
23445
|
+
}
|
|
23446
|
+
function R() {
|
|
23447
|
+
return new M();
|
|
23448
|
+
}
|
|
23449
|
+
class b extends c {
|
|
23450
|
+
data(t) {
|
|
23451
|
+
return t.map(n => {
|
|
23452
|
+
const e = d(n, {
|
|
23453
|
+
origin: this.origin(),
|
|
23454
|
+
rotateCenter: this.rotationCenter(),
|
|
23455
|
+
rotateX: this.rotateX(),
|
|
23456
|
+
rotateY: this.rotateY(),
|
|
23457
|
+
rotateZ: this.rotateZ(),
|
|
23458
|
+
scale: this.scale(),
|
|
23459
|
+
x: this.x(),
|
|
23460
|
+
y: this.y(),
|
|
23461
|
+
z: this.z()
|
|
23462
|
+
});
|
|
23463
|
+
return e.centroid = u(e), e;
|
|
23464
|
+
});
|
|
23465
|
+
}
|
|
23466
|
+
}
|
|
23467
|
+
function L() {
|
|
23468
|
+
return new b();
|
|
23469
|
+
}
|
|
23470
|
+
function S(r) {
|
|
23471
|
+
const t = r[r.length - 1];
|
|
23472
|
+
let n = `M${t.projected.x},${t.projected.y}`;
|
|
23473
|
+
for (let e = r.length - 2; e >= 0; e -= 1) {
|
|
23474
|
+
const o = r[e].projected;
|
|
23475
|
+
n += `L${o.x},${o.y}`;
|
|
23476
|
+
}
|
|
23477
|
+
return n;
|
|
23478
|
+
}
|
|
23479
|
+
class A extends c {
|
|
23480
|
+
data(t) {
|
|
23481
|
+
return t.map(n => {
|
|
23482
|
+
const e = n.length / 2,
|
|
23483
|
+
o = Math.trunc(e),
|
|
23484
|
+
s = d(n, {
|
|
23485
|
+
origin: this.origin(),
|
|
23486
|
+
rotateCenter: this.rotationCenter(),
|
|
23487
|
+
rotateX: this.rotateX(),
|
|
23488
|
+
rotateY: this.rotateY(),
|
|
23489
|
+
rotateZ: this.rotateZ(),
|
|
23490
|
+
scale: this.scale(),
|
|
23491
|
+
x: this.x(),
|
|
23492
|
+
y: this.y(),
|
|
23493
|
+
z: this.z()
|
|
23494
|
+
});
|
|
23495
|
+
return s.centroid = o === e ? u([s[e - 1], s[e]]) : s[o].rotated, s;
|
|
23496
|
+
});
|
|
23497
|
+
}
|
|
23498
|
+
draw(t) {
|
|
23499
|
+
return S(t);
|
|
23500
|
+
}
|
|
23501
|
+
}
|
|
23502
|
+
function T() {
|
|
23503
|
+
return new A();
|
|
23504
|
+
}
|
|
23505
|
+
class k extends c {
|
|
23506
|
+
data(t) {
|
|
23507
|
+
return t.map(n => {
|
|
23508
|
+
const e = d(n, {
|
|
23509
|
+
origin: this.origin(),
|
|
23510
|
+
rotateCenter: this.rotationCenter(),
|
|
23511
|
+
rotateX: this.rotateX(),
|
|
23512
|
+
rotateY: this.rotateY(),
|
|
23513
|
+
rotateZ: this.rotateZ(),
|
|
23514
|
+
scale: this.scale(),
|
|
23515
|
+
x: this.x(),
|
|
23516
|
+
y: this.y(),
|
|
23517
|
+
z: this.z()
|
|
23518
|
+
});
|
|
23519
|
+
return e.ccw = z(e), e.centroid = u(e), e;
|
|
23520
|
+
});
|
|
23521
|
+
}
|
|
23522
|
+
draw(t) {
|
|
23523
|
+
return h(t);
|
|
23524
|
+
}
|
|
23525
|
+
}
|
|
23526
|
+
function F() {
|
|
23527
|
+
return new k();
|
|
23528
|
+
}
|
|
23529
|
+
class G extends c {
|
|
23530
|
+
data(t) {
|
|
23531
|
+
return t.map(n => {
|
|
23532
|
+
const e = {
|
|
23533
|
+
x: this.x()(n),
|
|
23534
|
+
y: this.y()(n),
|
|
23535
|
+
z: this.z()(n)
|
|
23536
|
+
},
|
|
23537
|
+
o = _(e, {
|
|
23538
|
+
x: this.rotateX(),
|
|
23539
|
+
y: this.rotateY(),
|
|
23540
|
+
z: this.rotateZ(),
|
|
23541
|
+
rotateCenter: this.rotationCenter()
|
|
23542
|
+
}),
|
|
23543
|
+
s = w(e, {
|
|
23544
|
+
scale: this.scale(),
|
|
23545
|
+
origin: this.origin()
|
|
23546
|
+
});
|
|
23547
|
+
return {
|
|
23548
|
+
...n,
|
|
23549
|
+
rotated: o,
|
|
23550
|
+
centroid: o,
|
|
23551
|
+
projected: s
|
|
23552
|
+
};
|
|
23553
|
+
});
|
|
23554
|
+
}
|
|
23555
|
+
}
|
|
23556
|
+
function O() {
|
|
23557
|
+
return new G();
|
|
23558
|
+
}
|
|
23559
|
+
function q(r) {
|
|
23560
|
+
const t = r[r.length - 1];
|
|
23561
|
+
let n = `M${t.projected.x},${t.projected.y}`;
|
|
23562
|
+
for (let e = r.length - 2; e >= 0; e -= 1) {
|
|
23563
|
+
const o = r[e].projected;
|
|
23564
|
+
n += `L${o.x},${o.y}`;
|
|
23565
|
+
}
|
|
23566
|
+
return `${n}Z`;
|
|
23567
|
+
}
|
|
23568
|
+
class B extends c {
|
|
23569
|
+
data(t) {
|
|
23570
|
+
return t.map(n => {
|
|
23571
|
+
const e = d(n, {
|
|
23572
|
+
origin: this.origin(),
|
|
23573
|
+
rotateCenter: this.rotationCenter(),
|
|
23574
|
+
rotateX: this.rotateX(),
|
|
23575
|
+
rotateY: this.rotateY(),
|
|
23576
|
+
rotateZ: this.rotateZ(),
|
|
23577
|
+
scale: this.scale(),
|
|
23578
|
+
x: this.x(),
|
|
23579
|
+
y: this.y(),
|
|
23580
|
+
z: this.z()
|
|
23581
|
+
});
|
|
23582
|
+
return e.ccw = z(e), e.centroid = u(e), e;
|
|
23583
|
+
});
|
|
23584
|
+
}
|
|
23585
|
+
draw(t) {
|
|
23586
|
+
return q(t);
|
|
23587
|
+
}
|
|
23588
|
+
}
|
|
23589
|
+
function E() {
|
|
23590
|
+
return new B();
|
|
23591
|
+
}
|
|
23592
|
+
const H = r => `M${r[0].projected.x},${r[0].projected.y}L${r[1].projected.x},${r[1].projected.y}L${r[2].projected.x},${r[2].projected.y}Z`;
|
|
23593
|
+
class I extends c {
|
|
23594
|
+
data(t) {
|
|
23595
|
+
return t.map(n => {
|
|
23596
|
+
const e = d(n, {
|
|
23597
|
+
origin: this.origin(),
|
|
23598
|
+
rotateCenter: this.rotationCenter(),
|
|
23599
|
+
rotateX: this.rotateX(),
|
|
23600
|
+
rotateY: this.rotateY(),
|
|
23601
|
+
rotateZ: this.rotateZ(),
|
|
23602
|
+
scale: this.scale(),
|
|
23603
|
+
x: this.x(),
|
|
23604
|
+
y: this.y(),
|
|
23605
|
+
z: this.z()
|
|
23606
|
+
});
|
|
23607
|
+
return e.ccw = z(e), e.centroid = u(e), e;
|
|
23608
|
+
});
|
|
23609
|
+
}
|
|
23610
|
+
draw(t) {
|
|
23611
|
+
return H(t);
|
|
23612
|
+
}
|
|
23613
|
+
}
|
|
23614
|
+
function J() {
|
|
23615
|
+
return new I();
|
|
23616
|
+
}
|
|
23617
|
+
function K(r, t) {
|
|
23618
|
+
const n = r.centroid.z,
|
|
23619
|
+
e = t.centroid.z;
|
|
23620
|
+
return n < e ? -1 : n > e ? 1 : 0;
|
|
23621
|
+
}
|
|
23622
|
+
i.cubes3D = P, i.gridPlanes3D = R, i.lineStrips3D = T, i.lines3D = L, i.planes3D = F, i.points3D = O, i.polygons3D = E, i.sort = K, i.triangles3D = J, Object.defineProperty(i, Symbol.toStringTag, {
|
|
23623
|
+
value: "Module"
|
|
23624
|
+
});
|
|
23625
|
+
});
|
|
23626
|
+
})(d33d$1, d33d$1.exports);
|
|
23627
|
+
var d33dExports = d33d$1.exports;
|
|
23731
23628
|
|
|
23732
23629
|
var cssKeywords = {
|
|
23733
23630
|
aliceblue: [240, 248, 255],
|
|
@@ -25800,6 +25697,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
25800
25697
|
font-weight: 600;
|
|
25801
25698
|
|
|
25802
25699
|
alignment-baseline: middle;
|
|
25700
|
+
|
|
25803
25701
|
text-anchor: middle;
|
|
25804
25702
|
}
|
|
25805
25703
|
|
|
@@ -25823,6 +25721,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
25823
25721
|
font-size: 0.75rem;
|
|
25824
25722
|
|
|
25825
25723
|
alignment-baseline: middle;
|
|
25724
|
+
|
|
25826
25725
|
text-anchor: end;
|
|
25827
25726
|
}
|
|
25828
25727
|
|
|
@@ -25863,6 +25762,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
25863
25762
|
font-weight: 600;
|
|
25864
25763
|
|
|
25865
25764
|
alignment-baseline: middle;
|
|
25765
|
+
|
|
25866
25766
|
text-anchor: middle;
|
|
25867
25767
|
}
|
|
25868
25768
|
|
|
@@ -25876,7 +25776,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
25876
25776
|
}
|
|
25877
25777
|
render() {
|
|
25878
25778
|
/* eslint-disable-line class-methods-use-this */
|
|
25879
|
-
return x$
|
|
25779
|
+
return x$2`
|
|
25880
25780
|
`;
|
|
25881
25781
|
}
|
|
25882
25782
|
willUpdate() {
|
|
@@ -25932,10 +25832,11 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
25932
25832
|
};
|
|
25933
25833
|
const startRotationX = -0.85 * Math.PI / 8;
|
|
25934
25834
|
const startRotationY = 3 * Math.PI / 8;
|
|
25935
|
-
const startRotationZ = 0;
|
|
25936
|
-
|
|
25937
|
-
const
|
|
25938
|
-
const
|
|
25835
|
+
const startRotationZ = 0.0000001; // Avoid d3-3d bug
|
|
25836
|
+
|
|
25837
|
+
const lineStrips3D = d33dExports.lineStrips3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
|
|
25838
|
+
const points3d = d33dExports.points3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
|
|
25839
|
+
const grid3d = d33dExports.gridPlanes3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
|
|
25939
25840
|
|
|
25940
25841
|
// SVG Drag behaviors
|
|
25941
25842
|
const svgDrag = drag().on('start', event => {
|
|
@@ -26000,35 +25901,35 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26000
25901
|
|
|
26001
25902
|
// Axes
|
|
26002
25903
|
// DATA-JOIN
|
|
26003
|
-
const axisXUpdate = svgMerge.selectAll('.axis-x').data(lineStrips3D
|
|
25904
|
+
const axisXUpdate = svgMerge.selectAll('.axis-x').data(lineStrips3D.x(datum => {
|
|
26004
25905
|
return datum.x;
|
|
26005
25906
|
}).y(() => {
|
|
26006
25907
|
return yScale.range()[0];
|
|
26007
25908
|
}).z(() => {
|
|
26008
25909
|
return zScale.range()[0];
|
|
26009
|
-
})(xAxis));
|
|
26010
|
-
const axisYUpdate = svgMerge.selectAll('.axis-y').data(lineStrips3D
|
|
25910
|
+
}).data(xAxis));
|
|
25911
|
+
const axisYUpdate = svgMerge.selectAll('.axis-y').data(lineStrips3D.x(() => {
|
|
26011
25912
|
return xScale.range()[0];
|
|
26012
25913
|
}).y(datum => {
|
|
26013
25914
|
return datum.y;
|
|
26014
25915
|
}).z(() => {
|
|
26015
25916
|
return zScale.range()[1];
|
|
26016
|
-
})(yAxis));
|
|
26017
|
-
const axisZUpdate = svgMerge.selectAll('.axis-z').data(lineStrips3D
|
|
25917
|
+
}).data(yAxis));
|
|
25918
|
+
const axisZUpdate = svgMerge.selectAll('.axis-z').data(lineStrips3D.x(() => {
|
|
26018
25919
|
return xScale.range()[0];
|
|
26019
25920
|
}).y(() => {
|
|
26020
25921
|
return yScale.range()[0];
|
|
26021
25922
|
}).z(datum => {
|
|
26022
25923
|
return datum.z;
|
|
26023
|
-
})(zAxis));
|
|
25924
|
+
}).data(zAxis));
|
|
26024
25925
|
// ENTER
|
|
26025
25926
|
const axisXEnter = axisXUpdate.enter().append('path').attr('class', 'd3-3d axis axis-x');
|
|
26026
25927
|
const axisYEnter = axisYUpdate.enter().append('path').attr('class', 'd3-3d axis axis-y');
|
|
26027
25928
|
const axisZEnter = axisZUpdate.enter().append('path').attr('class', 'd3-3d axis axis-z');
|
|
26028
25929
|
// MERGE
|
|
26029
|
-
const axisXMerge = axisXEnter.merge(axisXUpdate).attr('d', lineStrips3D
|
|
26030
|
-
const axisYMerge = axisYEnter.merge(axisYUpdate).attr('d', lineStrips3D
|
|
26031
|
-
const axisZMerge = axisZEnter.merge(axisZUpdate).attr('d', lineStrips3D
|
|
25930
|
+
const axisXMerge = axisXEnter.merge(axisXUpdate).attr('d', lineStrips3D.draw);
|
|
25931
|
+
const axisYMerge = axisYEnter.merge(axisYUpdate).attr('d', lineStrips3D.draw);
|
|
25932
|
+
const axisZMerge = axisZEnter.merge(axisZUpdate).attr('d', lineStrips3D.draw);
|
|
26032
25933
|
// EXIT
|
|
26033
25934
|
axisXMerge.exit().remove();
|
|
26034
25935
|
axisYMerge.exit().remove();
|
|
@@ -26036,34 +25937,52 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26036
25937
|
|
|
26037
25938
|
// Axis Titles
|
|
26038
25939
|
// DATA-JOIN
|
|
26039
|
-
const titlePathXUpdate = svgMerge.selectAll('.title-path-x').data(lineStrips3D
|
|
25940
|
+
const titlePathXUpdate = svgMerge.selectAll('.title-path-x').data(lineStrips3D.x(datum => {
|
|
26040
25941
|
return datum.id === 'min' ? datum.x - this.rem * 20 : datum.x + this.rem * 20;
|
|
26041
25942
|
}).y(() => {
|
|
26042
25943
|
return yScale.range()[0] + this.rem * 1.75;
|
|
26043
25944
|
}).z(() => {
|
|
26044
25945
|
return zScale.range()[0] + this.rem * 1.75;
|
|
26045
|
-
})(xAxis));
|
|
26046
|
-
const titlePathYUpdate = svgMerge.selectAll('.title-path-y').data(lineStrips3D
|
|
25946
|
+
}).data(xAxis));
|
|
25947
|
+
const titlePathYUpdate = svgMerge.selectAll('.title-path-y').data(lineStrips3D.x(() => {
|
|
26047
25948
|
return xScale.range()[0] - this.rem * 1.75;
|
|
26048
25949
|
}).y(datum => {
|
|
26049
25950
|
return datum.id === 'min' ? datum.y + this.rem * 20 : datum.y - this.rem * 20;
|
|
26050
25951
|
}).z(() => {
|
|
26051
25952
|
return zScale.range()[1] - this.rem * 1.75;
|
|
26052
|
-
})(yAxis));
|
|
26053
|
-
const titlePathZUpdate = svgMerge.selectAll('.title-path-z').data(lineStrips3D
|
|
25953
|
+
}).data(yAxis));
|
|
25954
|
+
const titlePathZUpdate = svgMerge.selectAll('.title-path-z').data(lineStrips3D.x(() => {
|
|
26054
25955
|
return xScale.range()[0] - this.rem * 1.75;
|
|
26055
25956
|
}).y(() => {
|
|
26056
25957
|
return yScale.range()[0] + this.rem * 1.75;
|
|
26057
25958
|
}).z(datum => {
|
|
26058
25959
|
return datum.id === 'min' ? datum.z - this.rem * 20 : datum.z + this.rem * 20;
|
|
26059
|
-
})(zAxis));
|
|
26060
|
-
const titleXUpdate = svgMerge.selectAll('.title-x').data(
|
|
25960
|
+
}).data(zAxis));
|
|
25961
|
+
const titleXUpdate = svgMerge.selectAll('.title-x').data(lineStrips3D.x(datum => {
|
|
25962
|
+
return datum.id === 'min' ? datum.x - this.rem * 20 : datum.x + this.rem * 20;
|
|
25963
|
+
}).y(() => {
|
|
25964
|
+
return yScale.range()[0] + this.rem * 1.75;
|
|
25965
|
+
}).z(() => {
|
|
25966
|
+
return zScale.range()[0] + this.rem * 1.75;
|
|
25967
|
+
}).data(xAxis), datum => {
|
|
26061
25968
|
return datum[0].title;
|
|
26062
25969
|
});
|
|
26063
|
-
const titleYUpdate = svgMerge.selectAll('.title-y').data(
|
|
25970
|
+
const titleYUpdate = svgMerge.selectAll('.title-y').data(lineStrips3D.x(() => {
|
|
25971
|
+
return xScale.range()[0] - this.rem * 1.75;
|
|
25972
|
+
}).y(datum => {
|
|
25973
|
+
return datum.id === 'min' ? datum.y + this.rem * 20 : datum.y - this.rem * 20;
|
|
25974
|
+
}).z(() => {
|
|
25975
|
+
return zScale.range()[1] - this.rem * 1.75;
|
|
25976
|
+
}).data(yAxis), datum => {
|
|
26064
25977
|
return datum[0].title;
|
|
26065
25978
|
});
|
|
26066
|
-
const titleZUpdate = svgMerge.selectAll('.title-z').data(
|
|
25979
|
+
const titleZUpdate = svgMerge.selectAll('.title-z').data(lineStrips3D.x(() => {
|
|
25980
|
+
return xScale.range()[0] - this.rem * 1.75;
|
|
25981
|
+
}).y(() => {
|
|
25982
|
+
return yScale.range()[0] + this.rem * 1.75;
|
|
25983
|
+
}).z(datum => {
|
|
25984
|
+
return datum.id === 'min' ? datum.z - this.rem * 20 : datum.z + this.rem * 20;
|
|
25985
|
+
}).data(zAxis), datum => {
|
|
26067
25986
|
return datum[0].title;
|
|
26068
25987
|
});
|
|
26069
25988
|
// ENTER
|
|
@@ -26077,9 +25996,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26077
25996
|
const titleZEnter = titleZUpdate.enter().append('text').attr('class', 'd3-3d title title-z');
|
|
26078
25997
|
titleZEnter.append('textPath').attr('href', '#title-z').attr('startOffset', '50%');
|
|
26079
25998
|
// MERGE
|
|
26080
|
-
const titlePathXMerge = titlePathXEnter.merge(titlePathXUpdate).attr('d', lineStrips3D
|
|
26081
|
-
const titlePathYMerge = titlePathYEnter.merge(titlePathYUpdate).attr('d', lineStrips3D
|
|
26082
|
-
const titlePathZMerge = titlePathZEnter.merge(titlePathZUpdate).attr('d', lineStrips3D
|
|
25999
|
+
const titlePathXMerge = titlePathXEnter.merge(titlePathXUpdate).attr('d', lineStrips3D.draw);
|
|
26000
|
+
const titlePathYMerge = titlePathYEnter.merge(titlePathYUpdate).attr('d', lineStrips3D.draw);
|
|
26001
|
+
const titlePathZMerge = titlePathZEnter.merge(titlePathZUpdate).attr('d', lineStrips3D.draw);
|
|
26083
26002
|
const titleXMerge = titleXEnter.merge(titleXUpdate).select('textPath').html(datum => {
|
|
26084
26003
|
return datum[0].title;
|
|
26085
26004
|
});
|
|
@@ -26132,35 +26051,35 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26132
26051
|
|
|
26133
26052
|
// Axis Ticks
|
|
26134
26053
|
// DATA-JOIN
|
|
26135
|
-
const ticksXUpdate = svgMerge.selectAll('.tick-x').data(lineStrips3D
|
|
26054
|
+
const ticksXUpdate = svgMerge.selectAll('.tick-x').data(lineStrips3D.x(datum => {
|
|
26136
26055
|
return datum.x;
|
|
26137
26056
|
}).y(datum => {
|
|
26138
26057
|
return datum.id === 'min' ? yScale.range()[0] : yScale.range()[0] + this.rem * 0.35;
|
|
26139
26058
|
}).z(datum => {
|
|
26140
26059
|
return datum.id === 'min' ? zScale.range()[0] : zScale.range()[0] + this.rem * 0.35;
|
|
26141
|
-
})(xTicks));
|
|
26142
|
-
const ticksYUpdate = svgMerge.selectAll('.tick-y').data(lineStrips3D
|
|
26060
|
+
}).data(xTicks));
|
|
26061
|
+
const ticksYUpdate = svgMerge.selectAll('.tick-y').data(lineStrips3D.x(datum => {
|
|
26143
26062
|
return datum.id === 'min' ? xScale.range()[0] : xScale.range()[0] - this.rem * 0.35;
|
|
26144
26063
|
}).y(datum => {
|
|
26145
26064
|
return datum.y;
|
|
26146
26065
|
}).z(datum => {
|
|
26147
26066
|
return datum.id === 'min' ? zScale.range()[1] : zScale.range()[1] - this.rem * 0.35;
|
|
26148
|
-
})(yTicks));
|
|
26149
|
-
const ticksZUpdate = svgMerge.selectAll('.tick-z').data(lineStrips3D
|
|
26067
|
+
}).data(yTicks));
|
|
26068
|
+
const ticksZUpdate = svgMerge.selectAll('.tick-z').data(lineStrips3D.x(datum => {
|
|
26150
26069
|
return datum.id === 'min' ? xScale.range()[0] : xScale.range()[0] - this.rem * 0.35;
|
|
26151
26070
|
}).y(datum => {
|
|
26152
26071
|
return datum.id === 'min' ? yScale.range()[0] : yScale.range()[0] + this.rem * 0.35;
|
|
26153
26072
|
}).z(datum => {
|
|
26154
26073
|
return datum.z;
|
|
26155
|
-
})(zTicks));
|
|
26074
|
+
}).data(zTicks));
|
|
26156
26075
|
// ENTER
|
|
26157
26076
|
const ticksXEnter = ticksXUpdate.enter().append('path').attr('class', 'd3-3d tick tick-x');
|
|
26158
26077
|
const ticksYEnter = ticksYUpdate.enter().append('path').attr('class', 'd3-3d tick tick-y');
|
|
26159
26078
|
const ticksZEnter = ticksZUpdate.enter().append('path').attr('class', 'd3-3d tick tick-z');
|
|
26160
26079
|
// MERGE
|
|
26161
|
-
const ticksXMerge = ticksXEnter.merge(ticksXUpdate).attr('d', lineStrips3D
|
|
26162
|
-
const ticksYMerge = ticksYEnter.merge(ticksYUpdate).attr('d', lineStrips3D
|
|
26163
|
-
const ticksZMerge = ticksZEnter.merge(ticksZUpdate).attr('d', lineStrips3D
|
|
26080
|
+
const ticksXMerge = ticksXEnter.merge(ticksXUpdate).attr('d', lineStrips3D.draw);
|
|
26081
|
+
const ticksYMerge = ticksYEnter.merge(ticksYUpdate).attr('d', lineStrips3D.draw);
|
|
26082
|
+
const ticksZMerge = ticksZEnter.merge(ticksZUpdate).attr('d', lineStrips3D.draw);
|
|
26164
26083
|
// EXIT
|
|
26165
26084
|
ticksXMerge.exit().remove();
|
|
26166
26085
|
ticksYMerge.exit().remove();
|
|
@@ -26168,40 +26087,58 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26168
26087
|
|
|
26169
26088
|
// Axis Tick Labels
|
|
26170
26089
|
// DATA-JOIN
|
|
26171
|
-
const labelPathsXUpdate = svgMerge.selectAll('.label-path-x').data(lineStrips3D
|
|
26090
|
+
const labelPathsXUpdate = svgMerge.selectAll('.label-path-x').data(lineStrips3D.x(datum => {
|
|
26172
26091
|
return datum.x;
|
|
26173
26092
|
}).y(datum => {
|
|
26174
26093
|
return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
|
|
26175
26094
|
}).z(datum => {
|
|
26176
26095
|
return datum.id === 'min' ? zScale.range()[0] + this.rem * 4 : zScale.range()[0] + this.rem * 0.5;
|
|
26177
|
-
})(xTicks), datum => {
|
|
26096
|
+
}).data(xTicks), datum => {
|
|
26178
26097
|
return datum[0].label;
|
|
26179
26098
|
});
|
|
26180
|
-
const labelPathsYUpdate = svgMerge.selectAll('.label-path-y').data(lineStrips3D
|
|
26099
|
+
const labelPathsYUpdate = svgMerge.selectAll('.label-path-y').data(lineStrips3D.x(datum => {
|
|
26181
26100
|
return datum.id === 'min' ? xScale.range()[0] - this.rem * 0.5 : xScale.range()[0] - this.rem * 4;
|
|
26182
26101
|
}).y(datum => {
|
|
26183
26102
|
return datum.y;
|
|
26184
26103
|
}).z(datum => {
|
|
26185
26104
|
return datum.id === 'min' ? zScale.range()[1] - this.rem * 0.5 : zScale.range()[1] - this.rem * 4;
|
|
26186
|
-
})(yTicks), datum => {
|
|
26105
|
+
}).data(yTicks), datum => {
|
|
26187
26106
|
return datum[0].label;
|
|
26188
26107
|
});
|
|
26189
|
-
const labelPathsZUpdate = svgMerge.selectAll('.label-path-z').data(lineStrips3D
|
|
26108
|
+
const labelPathsZUpdate = svgMerge.selectAll('.label-path-z').data(lineStrips3D.x(datum => {
|
|
26190
26109
|
return datum.id === 'min' ? xScale.range()[0] - this.rem * 4 : xScale.range()[0] - this.rem * 0.5;
|
|
26191
26110
|
}).y(datum => {
|
|
26192
26111
|
return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
|
|
26193
26112
|
}).z(datum => {
|
|
26194
26113
|
return datum.z;
|
|
26195
|
-
})(zTicks), datum => {
|
|
26114
|
+
}).data(zTicks), datum => {
|
|
26196
26115
|
return datum[0].label;
|
|
26197
26116
|
});
|
|
26198
|
-
const labelsXUpdate = svgMerge.selectAll('.label-x').data(
|
|
26117
|
+
const labelsXUpdate = svgMerge.selectAll('.label-x').data(lineStrips3D.x(datum => {
|
|
26118
|
+
return datum.x;
|
|
26119
|
+
}).y(datum => {
|
|
26120
|
+
return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
|
|
26121
|
+
}).z(datum => {
|
|
26122
|
+
return datum.id === 'min' ? zScale.range()[0] + this.rem * 4 : zScale.range()[0] + this.rem * 0.5;
|
|
26123
|
+
}).data(xTicks), datum => {
|
|
26199
26124
|
return datum[0].label;
|
|
26200
26125
|
});
|
|
26201
|
-
const labelsYUpdate = svgMerge.selectAll('.label-y').data(
|
|
26126
|
+
const labelsYUpdate = svgMerge.selectAll('.label-y').data(lineStrips3D.x(datum => {
|
|
26127
|
+
return datum.id === 'min' ? xScale.range()[0] - this.rem * 0.5 : xScale.range()[0] - this.rem * 4;
|
|
26128
|
+
}).y(datum => {
|
|
26129
|
+
return datum.y;
|
|
26130
|
+
}).z(datum => {
|
|
26131
|
+
return datum.id === 'min' ? zScale.range()[1] - this.rem * 0.5 : zScale.range()[1] - this.rem * 4;
|
|
26132
|
+
}).data(yTicks), datum => {
|
|
26202
26133
|
return datum[0].label;
|
|
26203
26134
|
});
|
|
26204
|
-
const labelsZUpdate = svgMerge.selectAll('.label-z').data(
|
|
26135
|
+
const labelsZUpdate = svgMerge.selectAll('.label-z').data(lineStrips3D.x(datum => {
|
|
26136
|
+
return datum.id === 'min' ? xScale.range()[0] - this.rem * 4 : xScale.range()[0] - this.rem * 0.5;
|
|
26137
|
+
}).y(datum => {
|
|
26138
|
+
return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
|
|
26139
|
+
}).z(datum => {
|
|
26140
|
+
return datum.z;
|
|
26141
|
+
}).data(zTicks), datum => {
|
|
26205
26142
|
return datum[0].label;
|
|
26206
26143
|
});
|
|
26207
26144
|
// ENTER
|
|
@@ -26227,9 +26164,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26227
26164
|
return `#label-z-${index}`;
|
|
26228
26165
|
}).attr('startOffset', '100%');
|
|
26229
26166
|
// MERGE
|
|
26230
|
-
const labelPathsXMerge = labelPathsXEnter.merge(labelPathsXUpdate).attr('d', lineStrips3D
|
|
26231
|
-
const labelPathsYMerge = labelPathsYEnter.merge(labelPathsYUpdate).attr('d', lineStrips3D
|
|
26232
|
-
const labelPathsZMerge = labelPathsZEnter.merge(labelPathsZUpdate).attr('d', lineStrips3D
|
|
26167
|
+
const labelPathsXMerge = labelPathsXEnter.merge(labelPathsXUpdate).attr('d', lineStrips3D.draw);
|
|
26168
|
+
const labelPathsYMerge = labelPathsYEnter.merge(labelPathsYUpdate).attr('d', lineStrips3D.draw);
|
|
26169
|
+
const labelPathsZMerge = labelPathsZEnter.merge(labelPathsZUpdate).attr('d', lineStrips3D.draw);
|
|
26233
26170
|
const labelsXMerge = labelsXEnter.merge(labelsXUpdate).select('textPath').text(datum => {
|
|
26234
26171
|
return datum[0].label;
|
|
26235
26172
|
});
|
|
@@ -26255,7 +26192,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26255
26192
|
return yScale(datum.g);
|
|
26256
26193
|
}).z(datum => {
|
|
26257
26194
|
return zScale(datum.l);
|
|
26258
|
-
})(this.point ? [{
|
|
26195
|
+
}).data(this.point ? [{
|
|
26259
26196
|
a: this.a,
|
|
26260
26197
|
g: this.g,
|
|
26261
26198
|
l: this.l,
|
|
@@ -26333,7 +26270,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26333
26270
|
return yScale(datum.g);
|
|
26334
26271
|
}).z(datum => {
|
|
26335
26272
|
return zScale(datum.l);
|
|
26336
|
-
})(this.boundary).filter(datum => {
|
|
26273
|
+
}).data(this.boundary).filter(datum => {
|
|
26337
26274
|
return datum[0].a >= this.range.a.start && datum[0].a <= this.range.a.stop && datum[1].a >= this.range.a.start && datum[1].a <= this.range.a.stop && datum[2].a >= this.range.a.start && datum[2].a <= this.range.a.stop && datum[3].a >= this.range.a.start && datum[3].a <= this.range.a.stop;
|
|
26338
26275
|
}) : []);
|
|
26339
26276
|
// ENTER
|
|
@@ -26359,21 +26296,21 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26359
26296
|
return yScale(datum.g);
|
|
26360
26297
|
}).z(datum => {
|
|
26361
26298
|
return zScale(datum.l);
|
|
26362
|
-
})(this.mapXY));
|
|
26299
|
+
}).data(this.mapXY));
|
|
26363
26300
|
const mapXZUpdate = svgMerge.selectAll('.map-xz').data(grid3d.rows(range$1(this.range.l.start, this.range.l.stop + 0.01, this.range.l.step).length).x(datum => {
|
|
26364
26301
|
return xScale(datum.a);
|
|
26365
26302
|
}).y(datum => {
|
|
26366
26303
|
return yScale(datum.g);
|
|
26367
26304
|
}).z(datum => {
|
|
26368
26305
|
return zScale(datum.l);
|
|
26369
|
-
})(this.mapXZ));
|
|
26306
|
+
}).data(this.mapXZ));
|
|
26370
26307
|
const mapYZUpdate = svgMerge.selectAll('.map-yz').data(grid3d.rows(range$1(this.range.l.start, this.range.l.stop + 0.01, this.range.l.step).length).x(datum => {
|
|
26371
26308
|
return xScale(datum.a);
|
|
26372
26309
|
}).y(datum => {
|
|
26373
26310
|
return yScale(datum.g);
|
|
26374
26311
|
}).z(datum => {
|
|
26375
26312
|
return zScale(datum.l);
|
|
26376
|
-
})(this.mapYZ));
|
|
26313
|
+
}).data(this.mapYZ));
|
|
26377
26314
|
// ENTER
|
|
26378
26315
|
const mapXYEnter = mapXYUpdate.enter().append('path').attr('class', 'd3-3d map map-xy');
|
|
26379
26316
|
const mapXZEnter = mapXZUpdate.enter().append('path').attr('class', 'd3-3d map map-xz');
|
|
@@ -26412,7 +26349,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26412
26349
|
mapYZUpdate.exit().remove();
|
|
26413
26350
|
|
|
26414
26351
|
// Depth sorting
|
|
26415
|
-
select(this.renderRoot).selectAll('.d3-3d').sort(
|
|
26352
|
+
select(this.renderRoot).selectAll('.d3-3d').sort(d33dExports.sort);
|
|
26416
26353
|
|
|
26417
26354
|
// Color Legend
|
|
26418
26355
|
// DATA-JOIN
|
|
@@ -26699,9 +26636,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26699
26636
|
.curve-p.interactive,
|
|
26700
26637
|
.curve-n.interactive {
|
|
26701
26638
|
cursor: nwse-resize;
|
|
26639
|
+
outline: none;
|
|
26702
26640
|
|
|
26703
26641
|
filter: url("#shadow-2");
|
|
26704
|
-
outline: none;
|
|
26705
26642
|
}
|
|
26706
26643
|
|
|
26707
26644
|
.curve-p.interactive:hover,
|
|
@@ -26721,8 +26658,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26721
26658
|
transform: translateY(0);
|
|
26722
26659
|
}
|
|
26723
26660
|
|
|
26724
|
-
|
|
26725
|
-
|
|
26661
|
+
.curve-p.interactive:focus-visible,
|
|
26662
|
+
.curve-n.interactive:focus-visible {
|
|
26726
26663
|
filter: url("#shadow-8");
|
|
26727
26664
|
|
|
26728
26665
|
/* HACK: This gets Safari to correctly apply the filter! */
|
|
@@ -26731,9 +26668,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26731
26668
|
|
|
26732
26669
|
.point.interactive {
|
|
26733
26670
|
cursor: nesw-resize;
|
|
26671
|
+
outline: none;
|
|
26734
26672
|
|
|
26735
26673
|
filter: url("#shadow-2");
|
|
26736
|
-
outline: none;
|
|
26737
26674
|
|
|
26738
26675
|
/* HACK: This gets Safari to correctly apply the filter! */
|
|
26739
26676
|
stroke: #000000;
|
|
@@ -26755,7 +26692,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26755
26692
|
stroke: #00ff00;
|
|
26756
26693
|
}
|
|
26757
26694
|
|
|
26758
|
-
|
|
26695
|
+
.point.interactive:focus-visible {
|
|
26759
26696
|
filter: url("#shadow-8");
|
|
26760
26697
|
|
|
26761
26698
|
/* HACK: This gets Safari to correctly apply the filter! */
|
|
@@ -26795,8 +26732,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26795
26732
|
|
|
26796
26733
|
.diagonal {
|
|
26797
26734
|
stroke: var(---color-element-border);
|
|
26798
|
-
stroke-dasharray: 4;
|
|
26799
26735
|
stroke-width: 1;
|
|
26736
|
+
stroke-dasharray: 4;
|
|
26800
26737
|
}
|
|
26801
26738
|
|
|
26802
26739
|
.curve-p,
|
|
@@ -26830,8 +26767,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26830
26767
|
font-size: 0.75rem;
|
|
26831
26768
|
|
|
26832
26769
|
dominant-baseline: middle;
|
|
26833
|
-
text-anchor: middle;
|
|
26834
26770
|
|
|
26771
|
+
text-anchor: middle;
|
|
26835
26772
|
fill: var(---color-text-inverse);
|
|
26836
26773
|
}
|
|
26837
26774
|
|
|
@@ -26843,15 +26780,15 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
26843
26780
|
|
|
26844
26781
|
@media (pointer: coarse) {
|
|
26845
26782
|
.interactive .touch {
|
|
26846
|
-
stroke-linecap: round;
|
|
26847
26783
|
stroke-width: 12;
|
|
26784
|
+
stroke-linecap: round;
|
|
26848
26785
|
}
|
|
26849
26786
|
}
|
|
26850
26787
|
`];
|
|
26851
26788
|
}
|
|
26852
26789
|
render() {
|
|
26853
26790
|
/* eslint-disable-line class-methods-use-this */
|
|
26854
|
-
return x$
|
|
26791
|
+
return x$2``;
|
|
26855
26792
|
}
|
|
26856
26793
|
willUpdate() {
|
|
26857
26794
|
this.alignState();
|
|
@@ -27860,6 +27797,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
27860
27797
|
font-weight: 600;
|
|
27861
27798
|
|
|
27862
27799
|
alignment-baseline: middle;
|
|
27800
|
+
|
|
27863
27801
|
text-anchor: middle;
|
|
27864
27802
|
}
|
|
27865
27803
|
|
|
@@ -27883,6 +27821,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
27883
27821
|
font-size: 0.75rem;
|
|
27884
27822
|
|
|
27885
27823
|
alignment-baseline: middle;
|
|
27824
|
+
|
|
27886
27825
|
text-anchor: end;
|
|
27887
27826
|
}
|
|
27888
27827
|
|
|
@@ -27923,6 +27862,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
27923
27862
|
font-weight: 600;
|
|
27924
27863
|
|
|
27925
27864
|
alignment-baseline: middle;
|
|
27865
|
+
|
|
27926
27866
|
text-anchor: middle;
|
|
27927
27867
|
}
|
|
27928
27868
|
|
|
@@ -27936,7 +27876,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
27936
27876
|
}
|
|
27937
27877
|
render() {
|
|
27938
27878
|
/* eslint-disable-line class-methods-use-this */
|
|
27939
|
-
return x$
|
|
27879
|
+
return x$2`
|
|
27940
27880
|
`;
|
|
27941
27881
|
}
|
|
27942
27882
|
willUpdate() {
|
|
@@ -27992,10 +27932,11 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
27992
27932
|
};
|
|
27993
27933
|
const startRotationX = -0.85 * Math.PI / 8;
|
|
27994
27934
|
const startRotationY = 3 * Math.PI / 8;
|
|
27995
|
-
const startRotationZ = 0;
|
|
27996
|
-
|
|
27997
|
-
const
|
|
27998
|
-
const
|
|
27935
|
+
const startRotationZ = 0.0000001; // Avoid d3-3d bug
|
|
27936
|
+
|
|
27937
|
+
const lineStrips3D = d33dExports.lineStrips3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
|
|
27938
|
+
const points3d = d33dExports.points3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
|
|
27939
|
+
const grid3d = d33dExports.gridPlanes3D().origin(startOrigin).scale(startScale).rotationCenter(startRotationCenter).rotateX(startRotationX + this.rotationX).rotateY(startRotationY + this.rotationY).rotateZ(startRotationZ);
|
|
27999
27940
|
|
|
28000
27941
|
// SVG Drag behaviors
|
|
28001
27942
|
const svgDrag = drag().on('start', event => {
|
|
@@ -28060,35 +28001,35 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28060
28001
|
|
|
28061
28002
|
// Axes
|
|
28062
28003
|
// DATA-JOIN
|
|
28063
|
-
const axisXUpdate = svgMerge.selectAll('.axis-x').data(lineStrips3D
|
|
28004
|
+
const axisXUpdate = svgMerge.selectAll('.axis-x').data(lineStrips3D.x(datum => {
|
|
28064
28005
|
return datum.x;
|
|
28065
28006
|
}).y(() => {
|
|
28066
28007
|
return yScale.range()[0];
|
|
28067
28008
|
}).z(() => {
|
|
28068
28009
|
return zScale.range()[0];
|
|
28069
|
-
})(xAxis));
|
|
28070
|
-
const axisYUpdate = svgMerge.selectAll('.axis-y').data(lineStrips3D
|
|
28010
|
+
}).data(xAxis));
|
|
28011
|
+
const axisYUpdate = svgMerge.selectAll('.axis-y').data(lineStrips3D.x(() => {
|
|
28071
28012
|
return xScale.range()[0];
|
|
28072
28013
|
}).y(datum => {
|
|
28073
28014
|
return datum.y;
|
|
28074
28015
|
}).z(() => {
|
|
28075
28016
|
return zScale.range()[1];
|
|
28076
|
-
})(yAxis));
|
|
28077
|
-
const axisZUpdate = svgMerge.selectAll('.axis-z').data(lineStrips3D
|
|
28017
|
+
}).data(yAxis));
|
|
28018
|
+
const axisZUpdate = svgMerge.selectAll('.axis-z').data(lineStrips3D.x(() => {
|
|
28078
28019
|
return xScale.range()[0];
|
|
28079
28020
|
}).y(() => {
|
|
28080
28021
|
return yScale.range()[0];
|
|
28081
28022
|
}).z(datum => {
|
|
28082
28023
|
return datum.z;
|
|
28083
|
-
})(zAxis));
|
|
28024
|
+
}).data(zAxis));
|
|
28084
28025
|
// ENTER
|
|
28085
28026
|
const axisXEnter = axisXUpdate.enter().append('path').attr('class', 'd3-3d axis axis-x');
|
|
28086
28027
|
const axisYEnter = axisYUpdate.enter().append('path').attr('class', 'd3-3d axis axis-y');
|
|
28087
28028
|
const axisZEnter = axisZUpdate.enter().append('path').attr('class', 'd3-3d axis axis-z');
|
|
28088
28029
|
// MERGE
|
|
28089
|
-
const axisXMerge = axisXEnter.merge(axisXUpdate).attr('d', lineStrips3D
|
|
28090
|
-
const axisYMerge = axisYEnter.merge(axisYUpdate).attr('d', lineStrips3D
|
|
28091
|
-
const axisZMerge = axisZEnter.merge(axisZUpdate).attr('d', lineStrips3D
|
|
28030
|
+
const axisXMerge = axisXEnter.merge(axisXUpdate).attr('d', lineStrips3D.draw);
|
|
28031
|
+
const axisYMerge = axisYEnter.merge(axisYUpdate).attr('d', lineStrips3D.draw);
|
|
28032
|
+
const axisZMerge = axisZEnter.merge(axisZUpdate).attr('d', lineStrips3D.draw);
|
|
28092
28033
|
// EXIT
|
|
28093
28034
|
axisXMerge.exit().remove();
|
|
28094
28035
|
axisYMerge.exit().remove();
|
|
@@ -28096,34 +28037,52 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28096
28037
|
|
|
28097
28038
|
// Axis Titles
|
|
28098
28039
|
// DATA-JOIN
|
|
28099
|
-
const titlePathXUpdate = svgMerge.selectAll('.title-path-x').data(lineStrips3D
|
|
28040
|
+
const titlePathXUpdate = svgMerge.selectAll('.title-path-x').data(lineStrips3D.x(datum => {
|
|
28100
28041
|
return datum.id === 'min' ? datum.x - this.rem * 20 : datum.x + this.rem * 20;
|
|
28101
28042
|
}).y(() => {
|
|
28102
28043
|
return yScale.range()[0] + this.rem * 1.75;
|
|
28103
28044
|
}).z(() => {
|
|
28104
28045
|
return zScale.range()[0] + this.rem * 1.75;
|
|
28105
|
-
})(xAxis));
|
|
28106
|
-
const titlePathYUpdate = svgMerge.selectAll('.title-path-y').data(lineStrips3D
|
|
28046
|
+
}).data(xAxis));
|
|
28047
|
+
const titlePathYUpdate = svgMerge.selectAll('.title-path-y').data(lineStrips3D.x(() => {
|
|
28107
28048
|
return xScale.range()[0] - this.rem * 1.75;
|
|
28108
28049
|
}).y(datum => {
|
|
28109
28050
|
return datum.id === 'min' ? datum.y + this.rem * 20 : datum.y - this.rem * 20;
|
|
28110
28051
|
}).z(() => {
|
|
28111
28052
|
return zScale.range()[1] - this.rem * 1.75;
|
|
28112
|
-
})(yAxis));
|
|
28113
|
-
const titlePathZUpdate = svgMerge.selectAll('.title-path-z').data(lineStrips3D
|
|
28053
|
+
}).data(yAxis));
|
|
28054
|
+
const titlePathZUpdate = svgMerge.selectAll('.title-path-z').data(lineStrips3D.x(() => {
|
|
28114
28055
|
return xScale.range()[0] - this.rem * 1.75;
|
|
28115
28056
|
}).y(() => {
|
|
28116
28057
|
return yScale.range()[0] + this.rem * 1.75;
|
|
28117
28058
|
}).z(datum => {
|
|
28118
28059
|
return datum.id === 'min' ? datum.z - this.rem * 20 : datum.z + this.rem * 20;
|
|
28119
|
-
})(zAxis));
|
|
28120
|
-
const titleXUpdate = svgMerge.selectAll('.title-x').data(
|
|
28060
|
+
}).data(zAxis));
|
|
28061
|
+
const titleXUpdate = svgMerge.selectAll('.title-x').data(lineStrips3D.x(datum => {
|
|
28062
|
+
return datum.id === 'min' ? datum.x - this.rem * 20 : datum.x + this.rem * 20;
|
|
28063
|
+
}).y(() => {
|
|
28064
|
+
return yScale.range()[0] + this.rem * 1.75;
|
|
28065
|
+
}).z(() => {
|
|
28066
|
+
return zScale.range()[0] + this.rem * 1.75;
|
|
28067
|
+
}).data(xAxis), datum => {
|
|
28121
28068
|
return datum[0].title;
|
|
28122
28069
|
});
|
|
28123
|
-
const titleYUpdate = svgMerge.selectAll('.title-y').data(
|
|
28070
|
+
const titleYUpdate = svgMerge.selectAll('.title-y').data(lineStrips3D.x(() => {
|
|
28071
|
+
return xScale.range()[0] - this.rem * 1.75;
|
|
28072
|
+
}).y(datum => {
|
|
28073
|
+
return datum.id === 'min' ? datum.y + this.rem * 20 : datum.y - this.rem * 20;
|
|
28074
|
+
}).z(() => {
|
|
28075
|
+
return zScale.range()[1] - this.rem * 1.75;
|
|
28076
|
+
}).data(yAxis), datum => {
|
|
28124
28077
|
return datum[0].title;
|
|
28125
28078
|
});
|
|
28126
|
-
const titleZUpdate = svgMerge.selectAll('.title-z').data(
|
|
28079
|
+
const titleZUpdate = svgMerge.selectAll('.title-z').data(lineStrips3D.x(() => {
|
|
28080
|
+
return xScale.range()[0] - this.rem * 1.75;
|
|
28081
|
+
}).y(() => {
|
|
28082
|
+
return yScale.range()[0] + this.rem * 1.75;
|
|
28083
|
+
}).z(datum => {
|
|
28084
|
+
return datum.id === 'min' ? datum.z - this.rem * 20 : datum.z + this.rem * 20;
|
|
28085
|
+
}).data(zAxis), datum => {
|
|
28127
28086
|
return datum[0].title;
|
|
28128
28087
|
});
|
|
28129
28088
|
// ENTER
|
|
@@ -28137,9 +28096,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28137
28096
|
const titleZEnter = titleZUpdate.enter().append('text').attr('class', 'd3-3d title title-z');
|
|
28138
28097
|
titleZEnter.append('textPath').attr('href', '#title-z').attr('startOffset', '50%');
|
|
28139
28098
|
// MERGE
|
|
28140
|
-
const titlePathXMerge = titlePathXEnter.merge(titlePathXUpdate).attr('d', lineStrips3D
|
|
28141
|
-
const titlePathYMerge = titlePathYEnter.merge(titlePathYUpdate).attr('d', lineStrips3D
|
|
28142
|
-
const titlePathZMerge = titlePathZEnter.merge(titlePathZUpdate).attr('d', lineStrips3D
|
|
28099
|
+
const titlePathXMerge = titlePathXEnter.merge(titlePathXUpdate).attr('d', lineStrips3D.draw);
|
|
28100
|
+
const titlePathYMerge = titlePathYEnter.merge(titlePathYUpdate).attr('d', lineStrips3D.draw);
|
|
28101
|
+
const titlePathZMerge = titlePathZEnter.merge(titlePathZUpdate).attr('d', lineStrips3D.draw);
|
|
28143
28102
|
const titleXMerge = titleXEnter.merge(titleXUpdate).select('textPath').html(datum => {
|
|
28144
28103
|
return datum[0].title;
|
|
28145
28104
|
});
|
|
@@ -28192,35 +28151,35 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28192
28151
|
|
|
28193
28152
|
// Axis Ticks
|
|
28194
28153
|
// DATA-JOIN
|
|
28195
|
-
const ticksXUpdate = svgMerge.selectAll('.tick-x').data(lineStrips3D
|
|
28154
|
+
const ticksXUpdate = svgMerge.selectAll('.tick-x').data(lineStrips3D.x(datum => {
|
|
28196
28155
|
return datum.x;
|
|
28197
28156
|
}).y(datum => {
|
|
28198
28157
|
return datum.id === 'min' ? yScale.range()[0] : yScale.range()[0] + this.rem * 0.35;
|
|
28199
28158
|
}).z(datum => {
|
|
28200
28159
|
return datum.id === 'min' ? zScale.range()[0] : zScale.range()[0] + this.rem * 0.35;
|
|
28201
|
-
})(xTicks));
|
|
28202
|
-
const ticksYUpdate = svgMerge.selectAll('.tick-y').data(lineStrips3D
|
|
28160
|
+
}).data(xTicks));
|
|
28161
|
+
const ticksYUpdate = svgMerge.selectAll('.tick-y').data(lineStrips3D.x(datum => {
|
|
28203
28162
|
return datum.id === 'min' ? xScale.range()[0] : xScale.range()[0] - this.rem * 0.35;
|
|
28204
28163
|
}).y(datum => {
|
|
28205
28164
|
return datum.y;
|
|
28206
28165
|
}).z(datum => {
|
|
28207
28166
|
return datum.id === 'min' ? zScale.range()[1] : zScale.range()[1] - this.rem * 0.35;
|
|
28208
|
-
})(yTicks));
|
|
28209
|
-
const ticksZUpdate = svgMerge.selectAll('.tick-z').data(lineStrips3D
|
|
28167
|
+
}).data(yTicks));
|
|
28168
|
+
const ticksZUpdate = svgMerge.selectAll('.tick-z').data(lineStrips3D.x(datum => {
|
|
28210
28169
|
return datum.id === 'min' ? xScale.range()[0] : xScale.range()[0] - this.rem * 0.35;
|
|
28211
28170
|
}).y(datum => {
|
|
28212
28171
|
return datum.id === 'min' ? yScale.range()[0] : yScale.range()[0] + this.rem * 0.35;
|
|
28213
28172
|
}).z(datum => {
|
|
28214
28173
|
return datum.z;
|
|
28215
|
-
})(zTicks));
|
|
28174
|
+
}).data(zTicks));
|
|
28216
28175
|
// ENTER
|
|
28217
28176
|
const ticksXEnter = ticksXUpdate.enter().append('path').attr('class', 'd3-3d tick tick-x');
|
|
28218
28177
|
const ticksYEnter = ticksYUpdate.enter().append('path').attr('class', 'd3-3d tick tick-y');
|
|
28219
28178
|
const ticksZEnter = ticksZUpdate.enter().append('path').attr('class', 'd3-3d tick tick-z');
|
|
28220
28179
|
// MERGE
|
|
28221
|
-
const ticksXMerge = ticksXEnter.merge(ticksXUpdate).attr('d', lineStrips3D
|
|
28222
|
-
const ticksYMerge = ticksYEnter.merge(ticksYUpdate).attr('d', lineStrips3D
|
|
28223
|
-
const ticksZMerge = ticksZEnter.merge(ticksZUpdate).attr('d', lineStrips3D
|
|
28180
|
+
const ticksXMerge = ticksXEnter.merge(ticksXUpdate).attr('d', lineStrips3D.draw);
|
|
28181
|
+
const ticksYMerge = ticksYEnter.merge(ticksYUpdate).attr('d', lineStrips3D.draw);
|
|
28182
|
+
const ticksZMerge = ticksZEnter.merge(ticksZUpdate).attr('d', lineStrips3D.draw);
|
|
28224
28183
|
// EXIT
|
|
28225
28184
|
ticksXMerge.exit().remove();
|
|
28226
28185
|
ticksYMerge.exit().remove();
|
|
@@ -28228,40 +28187,58 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28228
28187
|
|
|
28229
28188
|
// Axis Tick Labels
|
|
28230
28189
|
// DATA-JOIN
|
|
28231
|
-
const labelPathsXUpdate = svgMerge.selectAll('.label-path-x').data(lineStrips3D
|
|
28190
|
+
const labelPathsXUpdate = svgMerge.selectAll('.label-path-x').data(lineStrips3D.x(datum => {
|
|
28232
28191
|
return datum.x;
|
|
28233
28192
|
}).y(datum => {
|
|
28234
28193
|
return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
|
|
28235
28194
|
}).z(datum => {
|
|
28236
28195
|
return datum.id === 'min' ? zScale.range()[0] + this.rem * 4 : zScale.range()[0] + this.rem * 0.5;
|
|
28237
|
-
})(xTicks), datum => {
|
|
28196
|
+
}).data(xTicks), datum => {
|
|
28238
28197
|
return datum[0].label;
|
|
28239
28198
|
});
|
|
28240
|
-
const labelPathsYUpdate = svgMerge.selectAll('.label-path-y').data(lineStrips3D
|
|
28199
|
+
const labelPathsYUpdate = svgMerge.selectAll('.label-path-y').data(lineStrips3D.x(datum => {
|
|
28241
28200
|
return datum.id === 'min' ? xScale.range()[0] - this.rem * 0.5 : xScale.range()[0] - this.rem * 4;
|
|
28242
28201
|
}).y(datum => {
|
|
28243
28202
|
return datum.y;
|
|
28244
28203
|
}).z(datum => {
|
|
28245
28204
|
return datum.id === 'min' ? zScale.range()[1] - this.rem * 0.5 : zScale.range()[1] - this.rem * 4;
|
|
28246
|
-
})(yTicks), datum => {
|
|
28205
|
+
}).data(yTicks), datum => {
|
|
28247
28206
|
return datum[0].label;
|
|
28248
28207
|
});
|
|
28249
|
-
const labelPathsZUpdate = svgMerge.selectAll('.label-path-z').data(lineStrips3D
|
|
28208
|
+
const labelPathsZUpdate = svgMerge.selectAll('.label-path-z').data(lineStrips3D.x(datum => {
|
|
28250
28209
|
return datum.id === 'min' ? xScale.range()[0] - this.rem * 4 : xScale.range()[0] - this.rem * 0.5;
|
|
28251
28210
|
}).y(datum => {
|
|
28252
28211
|
return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
|
|
28253
28212
|
}).z(datum => {
|
|
28254
28213
|
return datum.z;
|
|
28255
|
-
})(zTicks), datum => {
|
|
28214
|
+
}).data(zTicks), datum => {
|
|
28256
28215
|
return datum[0].label;
|
|
28257
28216
|
});
|
|
28258
|
-
const labelsXUpdate = svgMerge.selectAll('.label-x').data(
|
|
28217
|
+
const labelsXUpdate = svgMerge.selectAll('.label-x').data(lineStrips3D.x(datum => {
|
|
28218
|
+
return datum.x;
|
|
28219
|
+
}).y(datum => {
|
|
28220
|
+
return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
|
|
28221
|
+
}).z(datum => {
|
|
28222
|
+
return datum.id === 'min' ? zScale.range()[0] + this.rem * 4 : zScale.range()[0] + this.rem * 0.5;
|
|
28223
|
+
}).data(xTicks), datum => {
|
|
28259
28224
|
return datum[0].label;
|
|
28260
28225
|
});
|
|
28261
|
-
const labelsYUpdate = svgMerge.selectAll('.label-y').data(
|
|
28226
|
+
const labelsYUpdate = svgMerge.selectAll('.label-y').data(lineStrips3D.x(datum => {
|
|
28227
|
+
return datum.id === 'min' ? xScale.range()[0] - this.rem * 0.5 : xScale.range()[0] - this.rem * 4;
|
|
28228
|
+
}).y(datum => {
|
|
28229
|
+
return datum.y;
|
|
28230
|
+
}).z(datum => {
|
|
28231
|
+
return datum.id === 'min' ? zScale.range()[1] - this.rem * 0.5 : zScale.range()[1] - this.rem * 4;
|
|
28232
|
+
}).data(yTicks), datum => {
|
|
28262
28233
|
return datum[0].label;
|
|
28263
28234
|
});
|
|
28264
|
-
const labelsZUpdate = svgMerge.selectAll('.label-z').data(
|
|
28235
|
+
const labelsZUpdate = svgMerge.selectAll('.label-z').data(lineStrips3D.x(datum => {
|
|
28236
|
+
return datum.id === 'min' ? xScale.range()[0] - this.rem * 4 : xScale.range()[0] - this.rem * 0.5;
|
|
28237
|
+
}).y(datum => {
|
|
28238
|
+
return datum.id === 'min' ? yScale.range()[0] + this.rem * 4 : yScale.range()[0] + this.rem * 0.5;
|
|
28239
|
+
}).z(datum => {
|
|
28240
|
+
return datum.z;
|
|
28241
|
+
}).data(zTicks), datum => {
|
|
28265
28242
|
return datum[0].label;
|
|
28266
28243
|
});
|
|
28267
28244
|
// ENTER
|
|
@@ -28287,9 +28264,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28287
28264
|
return `#label-z-${index}`;
|
|
28288
28265
|
}).attr('startOffset', '100%');
|
|
28289
28266
|
// MERGE
|
|
28290
|
-
const labelPathsXMerge = labelPathsXEnter.merge(labelPathsXUpdate).attr('d', lineStrips3D
|
|
28291
|
-
const labelPathsYMerge = labelPathsYEnter.merge(labelPathsYUpdate).attr('d', lineStrips3D
|
|
28292
|
-
const labelPathsZMerge = labelPathsZEnter.merge(labelPathsZUpdate).attr('d', lineStrips3D
|
|
28267
|
+
const labelPathsXMerge = labelPathsXEnter.merge(labelPathsXUpdate).attr('d', lineStrips3D.draw);
|
|
28268
|
+
const labelPathsYMerge = labelPathsYEnter.merge(labelPathsYUpdate).attr('d', lineStrips3D.draw);
|
|
28269
|
+
const labelPathsZMerge = labelPathsZEnter.merge(labelPathsZUpdate).attr('d', lineStrips3D.draw);
|
|
28293
28270
|
const labelsXMerge = labelsXEnter.merge(labelsXUpdate).select('textPath').text(datum => {
|
|
28294
28271
|
return datum[0].label;
|
|
28295
28272
|
});
|
|
@@ -28315,7 +28292,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28315
28292
|
return yScale(datum.pw);
|
|
28316
28293
|
}).z(datum => {
|
|
28317
28294
|
return zScale(datum.xw);
|
|
28318
|
-
})(this.choices.slice(this.point === 'rest' ? 1 : 0, this.point === 'first' ? 1 : undefined)), datum => {
|
|
28295
|
+
}).data(this.choices.slice(this.point === 'rest' ? 1 : 0, this.point === 'first' ? 1 : undefined)), datum => {
|
|
28319
28296
|
return datum.name;
|
|
28320
28297
|
});
|
|
28321
28298
|
// ENTER
|
|
@@ -28390,7 +28367,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28390
28367
|
return yScale(datum.pw);
|
|
28391
28368
|
}).z(datum => {
|
|
28392
28369
|
return zScale(datum.xw);
|
|
28393
|
-
})(this.boundary).filter(datum => {
|
|
28370
|
+
}).data(this.boundary).filter(datum => {
|
|
28394
28371
|
return datum[0].pw >= this.range.pw.start && datum[0].pw <= this.range.pw.stop && datum[1].pw >= this.range.pw.start && datum[1].pw <= this.range.pw.stop && datum[2].pw >= this.range.pw.start && datum[2].pw <= this.range.pw.stop && datum[3].pw >= this.range.pw.start && datum[3].pw <= this.range.pw.stop;
|
|
28395
28372
|
}) : []);
|
|
28396
28373
|
// ENTER
|
|
@@ -28416,21 +28393,21 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28416
28393
|
return yScale(datum.pw);
|
|
28417
28394
|
}).z(datum => {
|
|
28418
28395
|
return zScale(datum.xw);
|
|
28419
|
-
})(this.mapXY));
|
|
28396
|
+
}).data(this.mapXY));
|
|
28420
28397
|
const mapXZUpdate = svgMerge.selectAll('.map-xz').data(grid3d.rows(range$1(this.range.xw.start, this.range.xw.stop + 0.01, this.range.xw.step).length).x(datum => {
|
|
28421
28398
|
return xScale(datum.xs);
|
|
28422
28399
|
}).y(datum => {
|
|
28423
28400
|
return yScale(datum.pw);
|
|
28424
28401
|
}).z(datum => {
|
|
28425
28402
|
return zScale(datum.xw);
|
|
28426
|
-
})(this.mapXZ));
|
|
28403
|
+
}).data(this.mapXZ));
|
|
28427
28404
|
const mapYZUpdate = svgMerge.selectAll('.map-yz').data(grid3d.rows(range$1(this.range.xw.start, this.range.xw.stop + 0.01, this.range.xw.step).length).x(datum => {
|
|
28428
28405
|
return xScale(datum.xs);
|
|
28429
28406
|
}).y(datum => {
|
|
28430
28407
|
return yScale(datum.pw);
|
|
28431
28408
|
}).z(datum => {
|
|
28432
28409
|
return zScale(datum.xw);
|
|
28433
|
-
})(this.mapYZ));
|
|
28410
|
+
}).data(this.mapYZ));
|
|
28434
28411
|
// ENTER
|
|
28435
28412
|
const mapXYEnter = mapXYUpdate.enter().append('path').attr('class', 'd3-3d map map-xy');
|
|
28436
28413
|
const mapXZEnter = mapXZUpdate.enter().append('path').attr('class', 'd3-3d map map-xz');
|
|
@@ -28469,7 +28446,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28469
28446
|
mapYZUpdate.exit().remove();
|
|
28470
28447
|
|
|
28471
28448
|
// Depth sorting
|
|
28472
|
-
select(this.renderRoot).selectAll('.d3-3d').sort(
|
|
28449
|
+
select(this.renderRoot).selectAll('.d3-3d').sort(d33dExports.sort);
|
|
28473
28450
|
|
|
28474
28451
|
// Color Legend
|
|
28475
28452
|
// DATA-JOIN
|
|
@@ -28633,17 +28610,17 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28633
28610
|
`];
|
|
28634
28611
|
}
|
|
28635
28612
|
render() {
|
|
28636
|
-
return x$
|
|
28613
|
+
return x$2`
|
|
28637
28614
|
<div class="holder">
|
|
28638
|
-
${this.trials != null ? x$
|
|
28639
|
-
${this.duration != null ? x$
|
|
28640
|
-
${this.run || this.pause || this.reset ? x$
|
|
28615
|
+
${this.trials != null ? x$2`<decidables-slider min="1" max="100" step="1" .value=${this.trials} @change=${this.setTrials.bind(this)} @input=${this.setTrials.bind(this)}>Trials</decidables-slider>` : x$2``}
|
|
28616
|
+
${this.duration != null ? x$2`<decidables-slider min="10" max="4000" step="10" .value=${this.duration} @change=${this.setDuration.bind(this)} @input=${this.setDuration.bind(this)}>Duration</decidables-slider>` : x$2``}
|
|
28617
|
+
${this.run || this.pause || this.reset ? x$2`
|
|
28641
28618
|
<div class="buttons">
|
|
28642
|
-
${this.run ? x$
|
|
28643
|
-
${this.pause ? x$
|
|
28644
|
-
${this.reset ? x$
|
|
28619
|
+
${this.run ? x$2`<decidables-button name="run" ?disabled=${this.state === 'running' || this.state === 'ended'} @click=${this.doRun.bind(this)}>Run</decidables-button>` : x$2``}
|
|
28620
|
+
${this.pause ? x$2`<decidables-button name="pause" ?disabled=${this.state !== 'running'} @click=${this.doPause.bind(this)}>Pause</decidables-button>` : x$2``}
|
|
28621
|
+
${this.reset ? x$2`<decidables-button name="reset" ?disabled=${this.state === 'resetted'} @click=${this.doReset.bind(this)}>Reset</decidables-button>` : x$2``}
|
|
28645
28622
|
</div>
|
|
28646
|
-
` : x$
|
|
28623
|
+
` : x$2``}
|
|
28647
28624
|
</div>`;
|
|
28648
28625
|
}
|
|
28649
28626
|
}
|
|
@@ -28885,6 +28862,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28885
28862
|
|
|
28886
28863
|
width: 5.25rem;
|
|
28887
28864
|
height: 3.5rem;
|
|
28865
|
+
|
|
28888
28866
|
padding: 0.375rem 0.75rem;
|
|
28889
28867
|
margin: 0.25rem;
|
|
28890
28868
|
|
|
@@ -28912,6 +28890,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28912
28890
|
|
|
28913
28891
|
.feedback .outcome {
|
|
28914
28892
|
font-weight: 600;
|
|
28893
|
+
|
|
28915
28894
|
line-height: 1.15;
|
|
28916
28895
|
}
|
|
28917
28896
|
|
|
@@ -28931,31 +28910,31 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28931
28910
|
`];
|
|
28932
28911
|
}
|
|
28933
28912
|
render() {
|
|
28934
|
-
return x$
|
|
28913
|
+
return x$2`
|
|
28935
28914
|
<div class="holder">
|
|
28936
|
-
${this.trial ? x$
|
|
28915
|
+
${this.trial ? x$2`
|
|
28937
28916
|
<div class="trials">
|
|
28938
28917
|
<div class="trial">
|
|
28939
28918
|
<span class="label">Trial: </span><span class="count">${this.trialCount}</span><span class="of"> of </span><span class="total">${this.trialTotal}</span>
|
|
28940
28919
|
</div>
|
|
28941
|
-
</div>` : x$
|
|
28920
|
+
</div>` : x$2``}
|
|
28942
28921
|
<div class="responses">
|
|
28943
28922
|
<decidables-button name="gamble" class="response ${this.state === 'feedback' && this.response === 'gamble' ? 'selected' : this.state === 'waiting' ? 'waiting' : ''}" ?disabled=${this.state !== 'waiting' || this.interactive !== true} @click=${this.gamble.bind(this)}>Gamble</decidables-button>
|
|
28944
28923
|
<decidables-button name="sure" class="response ${this.state === 'feedback' && this.response === 'sure' ? 'selected' : this.state === 'waiting' ? 'waiting' : ''}" ?disabled=${this.state !== 'waiting' || this.interactive !== true} @click=${this.sure.bind(this)}>Sure</decidables-button>
|
|
28945
28924
|
</div>
|
|
28946
|
-
${this.feedback !== 'none' || this.payoff !== 'none' ? x$
|
|
28925
|
+
${this.feedback !== 'none' || this.payoff !== 'none' ? x$2`
|
|
28947
28926
|
<div class="feedbacks">
|
|
28948
28927
|
<div class="feedback gamble
|
|
28949
28928
|
${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'gamble' ? this.outcome : ''}">
|
|
28950
|
-
${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'gamble' ? this.outcome === 'better' ? x$
|
|
28951
|
-
${this.payoff === 'both' || this.payoff === 'selection' && this.response === 'gamble' ? x$
|
|
28929
|
+
${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'gamble' ? this.outcome === 'better' ? x$2`<span class="outcome">Better</span>` : this.outcome === 'worse' ? x$2`<span class="outcome">Worse</span>` : this.outcome === 'even' ? x$2`<span class="outcome">Even</span>` : x$2`<span class="outcome">No<br>Response</span>` : ''}
|
|
28930
|
+
${this.payoff === 'both' || this.payoff === 'selection' && this.response === 'gamble' ? x$2`<span class="payoff">${this.response === 'gamble' ? 'Win:' : 'Miss:'} $${this.gamblePayoff}</span>` : x$2``}
|
|
28952
28931
|
</div>
|
|
28953
28932
|
<div class="feedback sure
|
|
28954
28933
|
${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'sure' ? this.outcome : ''}">
|
|
28955
|
-
${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'sure' ? this.outcome === 'better' ? x$
|
|
28956
|
-
${this.payoff === 'both' || this.payoff === 'selection' && this.response === 'sure' ? x$
|
|
28934
|
+
${this.state === 'feedback' && this.feedback === 'outcome' && this.response === 'sure' ? this.outcome === 'better' ? x$2`<span class="outcome">Better</span>` : this.outcome === 'worse' ? x$2`<span class="outcome">Worse</span>` : this.outcome === 'even' ? x$2`<span class="outcome">Even</span>` : x$2`<span class="outcome">No<br>Response</span>` : ''}
|
|
28935
|
+
${this.payoff === 'both' || this.payoff === 'selection' && this.response === 'sure' ? x$2`<span class="payoff">${this.response === 'sure' ? 'Win:' : 'Miss:'} $${this.surePayoff}</span>` : x$2``}
|
|
28957
28936
|
</div>
|
|
28958
|
-
</div>` : x$
|
|
28937
|
+
</div>` : x$2``}
|
|
28959
28938
|
</div>`;
|
|
28960
28939
|
}
|
|
28961
28940
|
}
|
|
@@ -28976,6 +28955,8 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28976
28955
|
--decidables-spinner-input-width: 4rem;
|
|
28977
28956
|
--decidables-spinner-prefix: "$";
|
|
28978
28957
|
|
|
28958
|
+
position: relative;
|
|
28959
|
+
|
|
28979
28960
|
display: inline-block;
|
|
28980
28961
|
|
|
28981
28962
|
width: 10rem;
|
|
@@ -28985,6 +28966,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
28985
28966
|
.main {
|
|
28986
28967
|
width: 100%;
|
|
28987
28968
|
height: 100%;
|
|
28969
|
+
|
|
28988
28970
|
overflow: visible;
|
|
28989
28971
|
}
|
|
28990
28972
|
|
|
@@ -29001,9 +28983,9 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29001
28983
|
|
|
29002
28984
|
.arc.interactive {
|
|
29003
28985
|
cursor: ns-resize;
|
|
28986
|
+
outline: none;
|
|
29004
28987
|
|
|
29005
28988
|
filter: url("#shadow-2");
|
|
29006
|
-
outline: none;
|
|
29007
28989
|
}
|
|
29008
28990
|
|
|
29009
28991
|
.arc.interactive:hover {
|
|
@@ -29014,7 +28996,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29014
28996
|
filter: url("#shadow-8");
|
|
29015
28997
|
}
|
|
29016
28998
|
|
|
29017
|
-
|
|
28999
|
+
.arc.interactive:focus-visible {
|
|
29018
29000
|
filter: url("#shadow-8");
|
|
29019
29001
|
}
|
|
29020
29002
|
|
|
@@ -29033,23 +29015,20 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29033
29015
|
.label.static {
|
|
29034
29016
|
font-size: 1.75rem;
|
|
29035
29017
|
|
|
29018
|
+
dominant-baseline: middle;
|
|
29019
|
+
|
|
29036
29020
|
user-select: none;
|
|
29037
29021
|
|
|
29038
|
-
dominant-baseline: middle;
|
|
29039
29022
|
text-anchor: middle;
|
|
29040
29023
|
}
|
|
29041
29024
|
|
|
29042
29025
|
.label.interactive {
|
|
29026
|
+
position: absolute;
|
|
29027
|
+
|
|
29043
29028
|
width: var(--decidables-spinner-input-width);
|
|
29044
29029
|
height: calc(var(--decidables-spinner-font-size) * 1.5);
|
|
29045
|
-
overflow: visible;
|
|
29046
|
-
}
|
|
29047
29030
|
|
|
29048
|
-
|
|
29049
|
-
/* https://stackoverflow.com/questions/51313873/svg-foreignobject-not-working-properly-on-safari */
|
|
29050
|
-
/* https://bugs.webkit.org/show_bug.cgi?id=23113 */
|
|
29051
|
-
.label.interactive decidables-spinner {
|
|
29052
|
-
position: fixed;
|
|
29031
|
+
overflow: visible;
|
|
29053
29032
|
}
|
|
29054
29033
|
|
|
29055
29034
|
.label.interactive.win decidables-spinner {
|
|
@@ -29067,7 +29046,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29067
29046
|
}
|
|
29068
29047
|
render() {
|
|
29069
29048
|
/* eslint-disable-line class-methods-use-this */
|
|
29070
|
-
return x$
|
|
29049
|
+
return x$2`
|
|
29071
29050
|
<slot></slot>
|
|
29072
29051
|
`;
|
|
29073
29052
|
}
|
|
@@ -29248,11 +29227,11 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29248
29227
|
// Labels
|
|
29249
29228
|
// DATA-JOIN
|
|
29250
29229
|
const labelStaticUpdate = pieMerge.selectAll('.label.static').data(arcsStatic);
|
|
29251
|
-
const labelInteractiveUpdate =
|
|
29230
|
+
const labelInteractiveUpdate = select(this.renderRoot).selectAll('.label.interactive').data(arcsInteractive);
|
|
29252
29231
|
// ENTER
|
|
29253
29232
|
const labelStaticEnter = labelStaticUpdate.enter().append('text');
|
|
29254
|
-
const labelInteractiveEnter = labelInteractiveUpdate.enter().append('
|
|
29255
|
-
labelInteractiveEnter.append('
|
|
29233
|
+
const labelInteractiveEnter = labelInteractiveUpdate.enter().append('xhtml:div');
|
|
29234
|
+
labelInteractiveEnter.append('decidables-spinner').on('input', (event, datum) => {
|
|
29256
29235
|
datum.data.x = parseFloat(event.target.value);
|
|
29257
29236
|
this.dispatchEvent(new CustomEvent('risky-outcome-change', {
|
|
29258
29237
|
detail: {
|
|
@@ -29278,21 +29257,18 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29278
29257
|
});
|
|
29279
29258
|
const labelInteractiveMerge = labelInteractiveEnter.merge(labelInteractiveUpdate).attr('class', datum => {
|
|
29280
29259
|
return `label interactive ${datum.data.name}`;
|
|
29281
|
-
}).attr('
|
|
29282
|
-
// HACK: Center spinner here instead of CSS for Safari SVG foreignObject
|
|
29283
|
-
// x: calc(var(--decidables-spinner-input-width) / -2);
|
|
29284
|
-
// y: calc(var(--decidables-spinner-font-size) * 1.5 / -2);
|
|
29260
|
+
}).attr('style', datum => {
|
|
29285
29261
|
const inputWidth = parseFloat(this.getComputedStyleValue('--decidables-spinner-input-width'));
|
|
29286
29262
|
const fontSize = parseFloat(this.getComputedStyleValue('--decidables-spinner-font-size'));
|
|
29287
29263
|
const rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
|
|
29288
|
-
const x = inputWidth * rem / -2;
|
|
29289
|
-
const y = fontSize * rem * 1.5 / -2;
|
|
29264
|
+
const x = width / 2 + inputWidth * rem / -2;
|
|
29265
|
+
const y = height / 2 + fontSize * rem * 1.5 / -2;
|
|
29290
29266
|
if (arcs.length === 1) {
|
|
29291
|
-
return `
|
|
29267
|
+
return `left: ${x}px; top: ${y}px;`;
|
|
29292
29268
|
}
|
|
29293
29269
|
const radius = Math.min(width, height) / 2 * 0.6;
|
|
29294
29270
|
const arcLabel = arc().innerRadius(radius).outerRadius(radius);
|
|
29295
|
-
return `
|
|
29271
|
+
return `left: ${arcLabel.centroid(datum)[0] + x}px; top: ${arcLabel.centroid(datum)[1] + y}px;`;
|
|
29296
29272
|
});
|
|
29297
29273
|
labelInteractiveMerge.select('decidables-spinner').attr('value', datum => {
|
|
29298
29274
|
return `${datum.data.x.toFixed(0)}`;
|
|
@@ -29348,7 +29324,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29348
29324
|
}
|
|
29349
29325
|
render() {
|
|
29350
29326
|
/* eslint-disable-line class-methods-use-this */
|
|
29351
|
-
return x$
|
|
29327
|
+
return x$2``;
|
|
29352
29328
|
}
|
|
29353
29329
|
}
|
|
29354
29330
|
customElements.define('risky-outcome', RiskyOutcome);
|
|
@@ -29447,16 +29423,16 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29447
29423
|
this.sendEvent();
|
|
29448
29424
|
}
|
|
29449
29425
|
render() {
|
|
29450
|
-
return x$
|
|
29426
|
+
return x$2`
|
|
29451
29427
|
<div class="holder">
|
|
29452
29428
|
<risky-option class="gamble" ?interactive=${this.interactive} @risky-outcome-change=${this.winChange.bind(this)}>
|
|
29453
|
-
${this.state === 'choice' ? x$
|
|
29429
|
+
${this.state === 'choice' ? x$2`
|
|
29454
29430
|
<risky-outcome probability="${1 - this.pw}" value="${this.xl}" name="loss"></risky-outcome>
|
|
29455
29431
|
<risky-outcome ?interactive=${this.interactive} probability="${this.pw}" value="${this.xw}" name="win"></risky-outcome>` : ''}
|
|
29456
29432
|
</risky-option><span class="query"
|
|
29457
|
-
>${this.state === 'choice' ? '?' : this.state === 'fixation' ? '+' : x$
|
|
29433
|
+
>${this.state === 'choice' ? '?' : this.state === 'fixation' ? '+' : x$2`∙`}</span
|
|
29458
29434
|
><risky-option class="sure" ?interactive=${this.interactive} @risky-outcome-change=${this.sureChange.bind(this)}>
|
|
29459
|
-
${this.state === 'choice' ? x$
|
|
29435
|
+
${this.state === 'choice' ? x$2`
|
|
29460
29436
|
<risky-outcome ?interactive=${this.interactive} probability="1" value="${this.xs}" name="sure"></risky-outcome>` : ''}
|
|
29461
29437
|
</risky-option>
|
|
29462
29438
|
</div>`;
|
|
@@ -29566,7 +29542,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29566
29542
|
`];
|
|
29567
29543
|
}
|
|
29568
29544
|
render() {
|
|
29569
|
-
return x$
|
|
29545
|
+
return x$2`
|
|
29570
29546
|
<div class="holder">
|
|
29571
29547
|
<risky-choice state="${this.state === 'stimulus' ? 'choice' : this.state === 'iti' ? 'fixation' : 'blank'}" probability="${this.pw}" win="${this.xw}" loss="${this.xl}" sure="${this.xs}"></risky-choice>
|
|
29572
29548
|
</div>`;
|
|
@@ -29760,7 +29736,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29760
29736
|
let g;
|
|
29761
29737
|
let w;
|
|
29762
29738
|
if (this.numeric) {
|
|
29763
|
-
p = x$
|
|
29739
|
+
p = x$2`<decidables-spinner class="p bottom"
|
|
29764
29740
|
?disabled=${!this.interactive}
|
|
29765
29741
|
min="0"
|
|
29766
29742
|
max="1"
|
|
@@ -29770,7 +29746,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29770
29746
|
>
|
|
29771
29747
|
<var class="math-var">p</var>
|
|
29772
29748
|
</decidables-spinner>`;
|
|
29773
|
-
g = x$
|
|
29749
|
+
g = x$2`<decidables-spinner class="g bottom"
|
|
29774
29750
|
?disabled=${!this.interactive}
|
|
29775
29751
|
min=${CPTMath.g.MIN}
|
|
29776
29752
|
max=${CPTMath.g.MAX}
|
|
@@ -29780,7 +29756,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29780
29756
|
>
|
|
29781
29757
|
<var class="math-var">γ</var>
|
|
29782
29758
|
</decidables-spinner>`;
|
|
29783
|
-
w = x$
|
|
29759
|
+
w = x$2`<decidables-spinner class="w bottom"
|
|
29784
29760
|
disabled
|
|
29785
29761
|
min="0"
|
|
29786
29762
|
max="1"
|
|
@@ -29790,11 +29766,11 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29790
29766
|
<var class="math-var">w</var>
|
|
29791
29767
|
</decidables-spinner>`;
|
|
29792
29768
|
} else {
|
|
29793
|
-
p = x$
|
|
29794
|
-
g = x$
|
|
29795
|
-
w = x$
|
|
29769
|
+
p = x$2`<var class="math-var p">p</var>`;
|
|
29770
|
+
g = x$2`<var class="math-var g">γ</var>`;
|
|
29771
|
+
w = x$2`<var class="math-var w">w</var>`;
|
|
29796
29772
|
}
|
|
29797
|
-
const equation = x$
|
|
29773
|
+
const equation = x$2`
|
|
29798
29774
|
<tr>
|
|
29799
29775
|
<td rowspan="2">
|
|
29800
29776
|
${w}<span class="equals">=</span>
|
|
@@ -29808,7 +29784,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29808
29784
|
<span class="bracket tight">[</span>${p}<sup class="exp">${g}</sup><span class="plus">+</span><span class="paren tight">(</span>1<span class="minus">−</span>${p}<span class="paren tight">)</span><sup class="exp">${g}</sup><span class="bracket tight">]</span><sup class="exp">1/${g}</sup>
|
|
29809
29785
|
</td>
|
|
29810
29786
|
</tr>`;
|
|
29811
|
-
return x$
|
|
29787
|
+
return x$2`
|
|
29812
29788
|
<div class="holder">
|
|
29813
29789
|
<table class="equation">
|
|
29814
29790
|
<tbody>
|
|
@@ -29908,7 +29884,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29908
29884
|
let v;
|
|
29909
29885
|
if (numeric) {
|
|
29910
29886
|
const index = Number.parseInt(subscript, 10) - 1;
|
|
29911
|
-
v = x$
|
|
29887
|
+
v = x$2`<decidables-spinner class="v"
|
|
29912
29888
|
?disabled=${!this.interactive}
|
|
29913
29889
|
.value=${this.v[index]}
|
|
29914
29890
|
@input=${this.vInput.bind(this, index)}
|
|
@@ -29916,7 +29892,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29916
29892
|
<var class="math-var">v<sub class="subscript ${className}">${subscript}</sub></var>
|
|
29917
29893
|
</decidables-spinner>`;
|
|
29918
29894
|
} else {
|
|
29919
|
-
v = x$
|
|
29895
|
+
v = x$2`<var class="math-var v">v<sub class="subscript ${className}">${subscript}</sub></var>`;
|
|
29920
29896
|
}
|
|
29921
29897
|
return v;
|
|
29922
29898
|
}
|
|
@@ -29924,7 +29900,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29924
29900
|
let w;
|
|
29925
29901
|
if (numeric) {
|
|
29926
29902
|
const index = Number.parseInt(subscript, 10) - 1;
|
|
29927
|
-
w = x$
|
|
29903
|
+
w = x$2`<decidables-spinner class="w"
|
|
29928
29904
|
?disabled=${!this.interactive}
|
|
29929
29905
|
min="0"
|
|
29930
29906
|
max="1"
|
|
@@ -29935,7 +29911,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29935
29911
|
<var class="math-var">w<sub class="subscript ${className}">${subscript}</sub></var>
|
|
29936
29912
|
</decidables-spinner>`;
|
|
29937
29913
|
} else {
|
|
29938
|
-
w = x$
|
|
29914
|
+
w = x$2`<var class="math-var w">w<sub class="subscript ${className}">${subscript}</sub></var>`;
|
|
29939
29915
|
}
|
|
29940
29916
|
return w;
|
|
29941
29917
|
}
|
|
@@ -29946,13 +29922,13 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29946
29922
|
let u;
|
|
29947
29923
|
let n;
|
|
29948
29924
|
if (this.numeric) {
|
|
29949
|
-
u = x$
|
|
29925
|
+
u = x$2`<decidables-spinner class="u"
|
|
29950
29926
|
disabled
|
|
29951
29927
|
.value=${+this.u.toFixed(3)}
|
|
29952
29928
|
>
|
|
29953
29929
|
<var class="math-var">U</var>
|
|
29954
29930
|
</decidables-spinner>`;
|
|
29955
|
-
n = x$
|
|
29931
|
+
n = x$2`<decidables-spinner class="n"
|
|
29956
29932
|
?disabled=${!this.interactive}
|
|
29957
29933
|
min="1"
|
|
29958
29934
|
max="4"
|
|
@@ -29963,10 +29939,10 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29963
29939
|
<var class="math-var">n</var>
|
|
29964
29940
|
</decidables-spinner>`;
|
|
29965
29941
|
} else {
|
|
29966
|
-
u = x$
|
|
29967
|
-
n = x$
|
|
29942
|
+
u = x$2`<var class="math-var u">U</var>`;
|
|
29943
|
+
n = x$2`<var class="math-var subscript">n</var>`;
|
|
29968
29944
|
}
|
|
29969
|
-
const equation = x$
|
|
29945
|
+
const equation = x$2`
|
|
29970
29946
|
<tr>
|
|
29971
29947
|
<td>
|
|
29972
29948
|
${u}<span class="equals">=</span>
|
|
@@ -29983,14 +29959,14 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
29983
29959
|
</td>
|
|
29984
29960
|
<td>
|
|
29985
29961
|
${this.numeric ? Array(this.nMax).fill().map((_, index) => {
|
|
29986
|
-
return index < this.n ? x$
|
|
29962
|
+
return index < this.n ? x$2`<span class="addend tight" ${F({
|
|
29987
29963
|
in: d,
|
|
29988
29964
|
out: d
|
|
29989
|
-
})}>${index !== 0 ? x$
|
|
29990
|
-
}) : x$
|
|
29965
|
+
})}>${index !== 0 ? x$2`<span class="plus">+</span>` : x$2``}${this.vTemplate(index + 1, 'math-num', true)} ${this.wTemplate(index + 1, 'math-num', true)}</span>` : null;
|
|
29966
|
+
}) : x$2`${this.vTemplate('1', 'math-num', false)} ${this.wTemplate('1', 'math-num', false)}<span class="plus">+</span><span class="ellipsis">…</span><span class="plus">+</span>${this.vTemplate('n', 'math-var', false)} ${this.wTemplate('n', 'math-var', false)}`}
|
|
29991
29967
|
</td>
|
|
29992
29968
|
</tr>`;
|
|
29993
|
-
return x$
|
|
29969
|
+
return x$2`
|
|
29994
29970
|
<div class="holder">
|
|
29995
29971
|
<table class="equation">
|
|
29996
29972
|
<tbody>
|
|
@@ -30079,7 +30055,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
30079
30055
|
let l;
|
|
30080
30056
|
let v;
|
|
30081
30057
|
if (this.numeric) {
|
|
30082
|
-
x = x$
|
|
30058
|
+
x = x$2`<decidables-spinner class="x bottom"
|
|
30083
30059
|
?disabled=${!this.interactive}
|
|
30084
30060
|
step="1"
|
|
30085
30061
|
.value=${this.x}
|
|
@@ -30087,7 +30063,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
30087
30063
|
>
|
|
30088
30064
|
<var class="math-var">x</var>
|
|
30089
30065
|
</decidables-spinner>`;
|
|
30090
|
-
a = x$
|
|
30066
|
+
a = x$2`<decidables-spinner class="a bottom"
|
|
30091
30067
|
?disabled=${!this.interactive}
|
|
30092
30068
|
min=${CPTMath.a.MIN}
|
|
30093
30069
|
max=${CPTMath.a.MAX}
|
|
@@ -30097,7 +30073,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
30097
30073
|
>
|
|
30098
30074
|
<var class="math-var">α</var>
|
|
30099
30075
|
</decidables-spinner>`;
|
|
30100
|
-
l = x$
|
|
30076
|
+
l = x$2`<decidables-spinner class="l bottom"
|
|
30101
30077
|
?disabled=${!this.interactive}
|
|
30102
30078
|
min=${CPTMath.l.MIN}
|
|
30103
30079
|
step=${CPTMath.l.STEP}
|
|
@@ -30106,16 +30082,16 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
30106
30082
|
>
|
|
30107
30083
|
<var class="math-var">λ</var>
|
|
30108
30084
|
</decidables-spinner>`;
|
|
30109
|
-
v = x$
|
|
30085
|
+
v = x$2`<decidables-spinner class="v bottom" disabled step=".001" .value="${+this.v.toFixed(3)}">
|
|
30110
30086
|
<var class="math-var">v</var>
|
|
30111
30087
|
</decidables-spinner>`;
|
|
30112
30088
|
} else {
|
|
30113
|
-
x = x$
|
|
30114
|
-
a = x$
|
|
30115
|
-
l = x$
|
|
30116
|
-
v = x$
|
|
30089
|
+
x = x$2`<var class="math-var x">x</var>`;
|
|
30090
|
+
a = x$2`<var class="math-var a">α</var>`;
|
|
30091
|
+
l = x$2`<var class="math-var l">λ</var>`;
|
|
30092
|
+
v = x$2`<var class="math-var v">v</var>`;
|
|
30117
30093
|
}
|
|
30118
|
-
const equation = x$
|
|
30094
|
+
const equation = x$2`
|
|
30119
30095
|
<tr>
|
|
30120
30096
|
<td rowspan="2">
|
|
30121
30097
|
${v}<span class="equals">=</span><span class="brace tight">{</span>
|
|
@@ -30129,7 +30105,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
30129
30105
|
<span class="minus tight">−</span>${l}<span class="paren tight">(</span><span class="minus tight">−</span>${x}<span class="paren tight">)</span><sup class="exp">${a}</sup>, if ${x}<span class="equals"><</span>0
|
|
30130
30106
|
</td>
|
|
30131
30107
|
</tr>`;
|
|
30132
|
-
return x$
|
|
30108
|
+
return x$2`
|
|
30133
30109
|
<div class="holder">
|
|
30134
30110
|
<table class="equation">
|
|
30135
30111
|
<tbody>
|
|
@@ -30196,7 +30172,7 @@ ${extraStyle}`)).style("margin-left", marginLeft ? `${+marginLeft}px` : null).st
|
|
|
30196
30172
|
}
|
|
30197
30173
|
render() {
|
|
30198
30174
|
/* eslint-disable-line class-methods-use-this */
|
|
30199
|
-
return x$
|
|
30175
|
+
return x$2`
|
|
30200
30176
|
<div class="holder">
|
|
30201
30177
|
<div class="body">
|
|
30202
30178
|
<slot>Empty!</slot>
|