@carbon/charts 1.14.4 → 1.14.6
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 +18 -0
- package/dist/{_baseEach-HjwFcKjQ.mjs → _baseEach-OI3ptUEq.mjs} +2 -2
- package/dist/{_baseEach-HjwFcKjQ.mjs.map → _baseEach-OI3ptUEq.mjs.map} +1 -1
- package/dist/{angle-utils-rnwiyNO5.mjs → angle-utils-0zbAbkd9.mjs} +2 -2
- package/dist/{angle-utils-rnwiyNO5.mjs.map → angle-utils-0zbAbkd9.mjs.map} +1 -1
- package/dist/{choropleth-8ZwwWcHd.mjs → choropleth-WzFMZXLV.mjs} +476 -452
- package/dist/choropleth-WzFMZXLV.mjs.map +1 -0
- package/dist/{color-scale-utils-TUTedgAJ.mjs → color-scale-utils-XZIkoI99.mjs} +2 -3
- package/dist/color-scale-utils-XZIkoI99.mjs.map +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/demo/index.mjs +4 -4
- package/dist/index.mjs +8 -8
- package/dist/model/index.mjs +1 -1
- package/dist/services/index.mjs +3 -3
- package/dist/umd/bundle.umd.js +17 -17
- package/dist/umd/bundle.umd.js.map +1 -1
- package/dist/{wordcloud-83FL_PLL.mjs → wordcloud-zimgwsA4.mjs} +3 -3
- package/dist/{wordcloud-83FL_PLL.mjs.map → wordcloud-zimgwsA4.mjs.map} +1 -1
- package/dist/{zoom-yHLHYPra.mjs → zoom-I8iYRlbb.mjs} +3 -3
- package/dist/{zoom-yHLHYPra.mjs.map → zoom-I8iYRlbb.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/choropleth-8ZwwWcHd.mjs.map +0 -1
- package/dist/color-scale-utils-TUTedgAJ.mjs.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { L as Ys, h as Ba, o as qs, a4 as Ha, p as Ks, B as $a, a5 as Ua, a6 as za, a7 as Fa, m as v, n as
|
|
1
|
+
import { L as Ys, h as Ba, o as qs, a4 as Ha, p as Ks, B as $a, a5 as Ua, a6 as za, a7 as Fa, m as v, n as we, x as dt, a0 as us, A as ne, s as de, a8 as Ot, K as Me, a2 as Wa, z as Js, t as ja, a9 as He, c as gn, b as mn, P as ke, aa as bt, ab as Ve, Q as Be, X as Ge, ac as Xa, J as ot, i as Za, Z as te, S as Ae, ad as ye, ae as Ya, a as qa, Y as pe, U as ft, C as Mt, af as Qt, v as Ka, ag as ps, _ as Fe } from "./color-scale-utils-XZIkoI99.mjs";
|
|
2
2
|
import { select as x, pointer as Ft, brushX as Qs, scaleTime as Ja, extent as Wt, area as Nn, line as Pn, axisBottom as Vn, axisLeft as ea, axisTop as Qa, axisRight as ei, scaleLinear as Ze, arc as xt, easeLinear as ti, path as Gn, interpolateNumber as ta, quantize as ni, scaleBand as Bn, hierarchy as Hn, pack as si, pie as ai, interpolate as ii, interpolateRound as ri, min as fn, max as gs, lineRadial as oi, curveLinearClosed as li, cluster as ci, tree as di, linkHorizontal as hi, treemap as ui, hsl as na, color as sa, geoPath as pi, geoNaturalEarth1 as gi, geoMercator as mi, geoEquirectangular as fi, geoConicEquidistant as vi, geoConicEqualArea as yi, geoAlbers as Ei, geoEqualEarth as bi } from "d3";
|
|
3
|
-
import { t as en, D as S, c as vn, G as ms, a as Si, p as oe, r as fs, b as Oi } from "./angle-utils-
|
|
4
|
-
import { y as W, _ as f, K as ie, r as $e, q as tt, L as xi, A as Ce, m as F, s as We, V as lt, S as ue, e as G, Z as nt, i as xe, f as vs, J as tn, d as Ti, F as
|
|
5
|
-
import { sankey as Ai, sankeyLinkHorizontal as
|
|
3
|
+
import { t as en, D as S, c as vn, G as ms, a as Si, p as oe, r as fs, b as Oi } from "./angle-utils-0zbAbkd9.mjs";
|
|
4
|
+
import { y as W, _ as f, K as ie, r as $e, q as tt, L as xi, A as Ce, m as F, s as We, V as lt, S as ue, e as G, Z as nt, i as xe, f as vs, J as tn, d as Ti, F as wt, n as nn, H as sn, C as an, p as Ct, b as ys, D as rn, Q as Li, x as je, $ as _t, N as on } from "./enums-lWSDG4ik.mjs";
|
|
5
|
+
import { sankey as Ai, sankeyLinkHorizontal as Mi, sankeyJustify as wi, sankeyLeft as Ci, sankeyRight as _i } from "d3-sankey";
|
|
6
6
|
import { R as X } from "./a11y-SOU26cr5.mjs";
|
|
7
|
-
import { b as aa } from "./_baseEach-
|
|
7
|
+
import { b as aa } from "./_baseEach-OI3ptUEq.mjs";
|
|
8
8
|
import Ii from "d3-cloud";
|
|
9
|
-
function
|
|
9
|
+
function ki(o, e, t, n) {
|
|
10
10
|
var s = -1, a = o == null ? 0 : o.length;
|
|
11
11
|
for (n && a && (t = o[++s]); ++s < a; )
|
|
12
12
|
t = e(t, o[s], s, o);
|
|
13
13
|
return t;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Ri(o) {
|
|
16
16
|
return function(e) {
|
|
17
17
|
return o == null ? void 0 : o[e];
|
|
18
18
|
};
|
|
@@ -210,7 +210,7 @@ var Di = {
|
|
|
210
210
|
œ: "oe",
|
|
211
211
|
ʼn: "'n",
|
|
212
212
|
ſ: "s"
|
|
213
|
-
}, Ni =
|
|
213
|
+
}, Ni = Ri(Di);
|
|
214
214
|
const Pi = Ni;
|
|
215
215
|
var Vi = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Gi = "\\u0300-\\u036f", Bi = "\\ufe20-\\ufe2f", Hi = "\\u20d0-\\u20ff", $i = Gi + Bi + Hi, Ui = "[" + $i + "]", zi = RegExp(Ui, "g");
|
|
216
216
|
function Fi(o) {
|
|
@@ -243,7 +243,7 @@ function yr(o, e, t) {
|
|
|
243
243
|
var Er = "['’]", br = RegExp(Er, "g");
|
|
244
244
|
function Sr(o) {
|
|
245
245
|
return function(e) {
|
|
246
|
-
return
|
|
246
|
+
return ki(yr(Fi(e).replace(br, "")), o, "");
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
249
|
function Or(o, e, t) {
|
|
@@ -269,18 +269,18 @@ function Ar(o, e) {
|
|
|
269
269
|
function Ea(o, e) {
|
|
270
270
|
return Ua(o, e);
|
|
271
271
|
}
|
|
272
|
-
var
|
|
272
|
+
var Mr = Sr(function(o, e, t) {
|
|
273
273
|
return o + (t ? "-" : "") + e.toLowerCase();
|
|
274
274
|
});
|
|
275
|
-
const st =
|
|
276
|
-
function
|
|
275
|
+
const st = Mr;
|
|
276
|
+
function wr(o, e) {
|
|
277
277
|
var t;
|
|
278
278
|
return aa(o, function(n, s, a) {
|
|
279
279
|
return t = e(n, s, a), !t;
|
|
280
280
|
}), !!t;
|
|
281
281
|
}
|
|
282
282
|
function Cr(o, e, t) {
|
|
283
|
-
var n = qs(o) ? za :
|
|
283
|
+
var n = qs(o) ? za : wr;
|
|
284
284
|
return t && Fa(o, e, t) && (e = void 0), n(o, Ks(e));
|
|
285
285
|
}
|
|
286
286
|
class q {
|
|
@@ -318,7 +318,7 @@ class q {
|
|
|
318
318
|
const t = this.parent;
|
|
319
319
|
if (this.parent = e, !(t && t.node() === e.node()) && this.type) {
|
|
320
320
|
const s = v(this.model.getOptions(), "style", "prefix");
|
|
321
|
-
(n = this.parent) == null || n.classed(`${
|
|
321
|
+
(n = this.parent) == null || n.classed(`${we}--${s}--${this.type}`, !0), t && t.classed(`${we}--${s}--${this.type}`, !1);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
getParent() {
|
|
@@ -328,7 +328,7 @@ class q {
|
|
|
328
328
|
if (this.type) {
|
|
329
329
|
const t = v(this.model.getOptions(), "style", "prefix"), n = this.id ? `#${this.id}` : "", s = S.appendOrSelect(
|
|
330
330
|
this.parent,
|
|
331
|
-
`${this.renderType === W.SVG ? "svg" : "div"}${n}.${
|
|
331
|
+
`${this.renderType === W.SVG ? "svg" : "div"}${n}.${we}--${t}--${this.type}`
|
|
332
332
|
);
|
|
333
333
|
if (e.withinChartClip) {
|
|
334
334
|
const a = this.model.get("chartClipId");
|
|
@@ -360,7 +360,7 @@ const {
|
|
|
360
360
|
} = Object;
|
|
361
361
|
let {
|
|
362
362
|
freeze: Ee,
|
|
363
|
-
seal:
|
|
363
|
+
seal: Re,
|
|
364
364
|
create: Sa
|
|
365
365
|
} = Object, {
|
|
366
366
|
apply: yn,
|
|
@@ -369,7 +369,7 @@ let {
|
|
|
369
369
|
Ee || (Ee = function(e) {
|
|
370
370
|
return e;
|
|
371
371
|
});
|
|
372
|
-
|
|
372
|
+
Re || (Re = function(e) {
|
|
373
373
|
return e;
|
|
374
374
|
});
|
|
375
375
|
yn || (yn = function(e, t, n) {
|
|
@@ -378,7 +378,7 @@ yn || (yn = function(e, t, n) {
|
|
|
378
378
|
En || (En = function(e, t) {
|
|
379
379
|
return new e(...t);
|
|
380
380
|
});
|
|
381
|
-
const It = _e(Array.prototype.forEach), Ts = _e(Array.prototype.pop), vt = _e(Array.prototype.push), Nt = _e(String.prototype.toLowerCase), ln = _e(String.prototype.toString),
|
|
381
|
+
const It = _e(Array.prototype.forEach), Ts = _e(Array.prototype.pop), vt = _e(Array.prototype.push), Nt = _e(String.prototype.toLowerCase), ln = _e(String.prototype.toString), kr = _e(String.prototype.match), yt = _e(String.prototype.replace), Rr = _e(String.prototype.indexOf), Dr = _e(String.prototype.trim), Oe = _e(RegExp.prototype.test), Et = Nr(TypeError);
|
|
382
382
|
function _e(o) {
|
|
383
383
|
return function(e) {
|
|
384
384
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
|
|
@@ -418,7 +418,7 @@ function Xe(o) {
|
|
|
418
418
|
$n(o, t) !== void 0 && (Array.isArray(n) ? e[t] = Pr(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = Xe(n) : e[t] = n);
|
|
419
419
|
return e;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function kt(o, e) {
|
|
422
422
|
for (; o !== null; ) {
|
|
423
423
|
const n = $n(o, e);
|
|
424
424
|
if (n) {
|
|
@@ -434,13 +434,13 @@ function Rt(o, e) {
|
|
|
434
434
|
}
|
|
435
435
|
return t;
|
|
436
436
|
}
|
|
437
|
-
const Ls = Ee(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), cn = Ee(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), dn = Ee(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Vr = Ee(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), hn = Ee(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Gr = Ee(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), As = Ee(["#text"]),
|
|
437
|
+
const Ls = Ee(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), cn = Ee(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), dn = Ee(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Vr = Ee(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), hn = Ee(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Gr = Ee(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), As = Ee(["#text"]), Ms = Ee(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), un = Ee(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ws = Ee(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Rt = Ee(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Br = Re(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Hr = Re(/<%[\w\W]*|[\w\W]*%>/gm), $r = Re(/\${[\w\W]*}/gm), Ur = Re(/^data-[\-\w.\u00B7-\uFFFF]/), zr = Re(/^aria-[\-\w]+$/), Oa = Re(
|
|
438
438
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
439
439
|
// eslint-disable-line no-useless-escape
|
|
440
|
-
), Fr =
|
|
440
|
+
), Fr = Re(/^(?:\w+script|data):/i), Wr = Re(
|
|
441
441
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
442
442
|
// eslint-disable-line no-control-regex
|
|
443
|
-
), xa =
|
|
443
|
+
), xa = Re(/^html$/i);
|
|
444
444
|
var Cs = /* @__PURE__ */ Object.freeze({
|
|
445
445
|
__proto__: null,
|
|
446
446
|
MUSTACHE_EXPR: Br,
|
|
@@ -493,27 +493,27 @@ function Ta() {
|
|
|
493
493
|
HTMLFormElement: p,
|
|
494
494
|
DOMParser: h,
|
|
495
495
|
trustedTypes: u
|
|
496
|
-
} = o, g = l.prototype, m =
|
|
496
|
+
} = o, g = l.prototype, m = kt(g, "cloneNode"), E = kt(g, "nextSibling"), O = kt(g, "childNodes"), T = kt(g, "parentNode");
|
|
497
497
|
if (typeof i == "function") {
|
|
498
498
|
const $ = t.createElement("template");
|
|
499
499
|
$.content && $.content.ownerDocument && (t = $.content.ownerDocument);
|
|
500
500
|
}
|
|
501
501
|
let y, A = "";
|
|
502
502
|
const {
|
|
503
|
-
implementation:
|
|
503
|
+
implementation: M,
|
|
504
504
|
createNodeIterator: L,
|
|
505
505
|
createDocumentFragment: I,
|
|
506
|
-
getElementsByTagName:
|
|
506
|
+
getElementsByTagName: N
|
|
507
507
|
} = t, {
|
|
508
508
|
importNode: j
|
|
509
509
|
} = n;
|
|
510
|
-
let
|
|
511
|
-
e.isSupported = typeof ba == "function" && typeof T == "function" &&
|
|
510
|
+
let D = {};
|
|
511
|
+
e.isSupported = typeof ba == "function" && typeof T == "function" && M && M.createHTMLDocument !== void 0;
|
|
512
512
|
const {
|
|
513
513
|
MUSTACHE_EXPR: C,
|
|
514
514
|
ERB_EXPR: V,
|
|
515
515
|
TMPLIT_EXPR: z,
|
|
516
|
-
DATA_ATTR:
|
|
516
|
+
DATA_ATTR: w,
|
|
517
517
|
ARIA_ATTR: Q,
|
|
518
518
|
IS_SCRIPT_OR_DATA: me,
|
|
519
519
|
ATTR_WHITESPACE: K
|
|
@@ -523,7 +523,7 @@ function Ta() {
|
|
|
523
523
|
} = Cs, Z = null;
|
|
524
524
|
const ut = Y({}, [...Ls, ...cn, ...dn, ...hn, ...As]);
|
|
525
525
|
let le = null;
|
|
526
|
-
const Ye = Y({}, [...
|
|
526
|
+
const Ye = Y({}, [...Ms, ...un, ...ws, ...Rt]);
|
|
527
527
|
let se = Object.seal(Sa(null, {
|
|
528
528
|
tagNameCheck: {
|
|
529
529
|
writable: !0,
|
|
@@ -543,7 +543,7 @@ function Ta() {
|
|
|
543
543
|
enumerable: !0,
|
|
544
544
|
value: !1
|
|
545
545
|
}
|
|
546
|
-
})), Ie = null, qe = null, U = !0, J = !0, ae = !1, re = !0, ce = !1, Te = !1, _ = !1,
|
|
546
|
+
})), Ie = null, qe = null, U = !0, J = !0, ae = !1, re = !0, ce = !1, Te = !1, _ = !1, R = !1, P = !1, Le = !1, Tt = !1, jn = !0, Xn = !1;
|
|
547
547
|
const _a = "user-content-";
|
|
548
548
|
let Xt = !0, pt = !1, Ke = {}, Je = null;
|
|
549
549
|
const Zn = Y({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
@@ -554,7 +554,7 @@ function Ta() {
|
|
|
554
554
|
let Qe = Ne, Yt = !1, qt = null;
|
|
555
555
|
const Ia = Y({}, [Lt, At, Ne], ln);
|
|
556
556
|
let gt = null;
|
|
557
|
-
const
|
|
557
|
+
const ka = ["application/xhtml+xml", "text/html"], Ra = "text/html";
|
|
558
558
|
let he = null, et = null;
|
|
559
559
|
const Da = t.createElement("form"), Jn = function(b) {
|
|
560
560
|
return b instanceof RegExp || b instanceof Function;
|
|
@@ -562,7 +562,7 @@ function Ta() {
|
|
|
562
562
|
let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
563
563
|
if (!(et && et === b)) {
|
|
564
564
|
if ((!b || typeof b != "object") && (b = {}), b = Xe(b), gt = // eslint-disable-next-line unicorn/prefer-includes
|
|
565
|
-
|
|
565
|
+
ka.indexOf(b.PARSER_MEDIA_TYPE) === -1 ? Ra : b.PARSER_MEDIA_TYPE, he = gt === "application/xhtml+xml" ? ln : Nt, Z = "ALLOWED_TAGS" in b ? Y({}, b.ALLOWED_TAGS, he) : ut, le = "ALLOWED_ATTR" in b ? Y({}, b.ALLOWED_ATTR, he) : Ye, qt = "ALLOWED_NAMESPACES" in b ? Y({}, b.ALLOWED_NAMESPACES, ln) : Ia, Zt = "ADD_URI_SAFE_ATTR" in b ? Y(
|
|
566
566
|
Xe(Kn),
|
|
567
567
|
// eslint-disable-line indent
|
|
568
568
|
b.ADD_URI_SAFE_ATTR,
|
|
@@ -576,7 +576,7 @@ function Ta() {
|
|
|
576
576
|
// eslint-disable-line indent
|
|
577
577
|
he
|
|
578
578
|
// eslint-disable-line indent
|
|
579
|
-
) : qn, Je = "FORBID_CONTENTS" in b ? Y({}, b.FORBID_CONTENTS, he) : Zn, Ie = "FORBID_TAGS" in b ? Y({}, b.FORBID_TAGS, he) : {}, qe = "FORBID_ATTR" in b ? Y({}, b.FORBID_ATTR, he) : {}, Ke = "USE_PROFILES" in b ? b.USE_PROFILES : !1, U = b.ALLOW_ARIA_ATTR !== !1, J = b.ALLOW_DATA_ATTR !== !1, ae = b.ALLOW_UNKNOWN_PROTOCOLS || !1, re = b.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ce = b.SAFE_FOR_TEMPLATES || !1, Te = b.WHOLE_DOCUMENT || !1, P = b.RETURN_DOM || !1, Le = b.RETURN_DOM_FRAGMENT || !1, Tt = b.RETURN_TRUSTED_TYPE || !1,
|
|
579
|
+
) : qn, Je = "FORBID_CONTENTS" in b ? Y({}, b.FORBID_CONTENTS, he) : Zn, Ie = "FORBID_TAGS" in b ? Y({}, b.FORBID_TAGS, he) : {}, qe = "FORBID_ATTR" in b ? Y({}, b.FORBID_ATTR, he) : {}, Ke = "USE_PROFILES" in b ? b.USE_PROFILES : !1, U = b.ALLOW_ARIA_ATTR !== !1, J = b.ALLOW_DATA_ATTR !== !1, ae = b.ALLOW_UNKNOWN_PROTOCOLS || !1, re = b.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ce = b.SAFE_FOR_TEMPLATES || !1, Te = b.WHOLE_DOCUMENT || !1, P = b.RETURN_DOM || !1, Le = b.RETURN_DOM_FRAGMENT || !1, Tt = b.RETURN_TRUSTED_TYPE || !1, R = b.FORCE_BODY || !1, jn = b.SANITIZE_DOM !== !1, Xn = b.SANITIZE_NAMED_PROPS || !1, Xt = b.KEEP_CONTENT !== !1, pt = b.IN_PLACE || !1, H = b.ALLOWED_URI_REGEXP || Oa, Qe = b.NAMESPACE || Ne, se = b.CUSTOM_ELEMENT_HANDLING || {}, b.CUSTOM_ELEMENT_HANDLING && Jn(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (se.tagNameCheck = b.CUSTOM_ELEMENT_HANDLING.tagNameCheck), b.CUSTOM_ELEMENT_HANDLING && Jn(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (se.attributeNameCheck = b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), b.CUSTOM_ELEMENT_HANDLING && typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (se.allowCustomizedBuiltInElements = b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ce && (J = !1), Le && (P = !0), Ke && (Z = Y({}, As), le = [], Ke.html === !0 && (Y(Z, Ls), Y(le, Ms)), Ke.svg === !0 && (Y(Z, cn), Y(le, un), Y(le, Rt)), Ke.svgFilters === !0 && (Y(Z, dn), Y(le, un), Y(le, Rt)), Ke.mathMl === !0 && (Y(Z, hn), Y(le, ws), Y(le, Rt))), b.ADD_TAGS && (Z === ut && (Z = Xe(Z)), Y(Z, b.ADD_TAGS, he)), b.ADD_ATTR && (le === Ye && (le = Xe(le)), Y(le, b.ADD_ATTR, he)), b.ADD_URI_SAFE_ATTR && Y(Zt, b.ADD_URI_SAFE_ATTR, he), b.FORBID_CONTENTS && (Je === Zn && (Je = Xe(Je)), Y(Je, b.FORBID_CONTENTS, he)), Xt && (Z["#text"] = !0), Te && Y(Z, ["html", "head", "body"]), Z.table && (Y(Z, ["tbody"]), delete Ie.tbody), b.TRUSTED_TYPES_POLICY) {
|
|
580
580
|
if (typeof b.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
581
581
|
throw Et('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
582
582
|
if (typeof b.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -587,13 +587,13 @@ function Ta() {
|
|
|
587
587
|
Ee && Ee(b), et = b;
|
|
588
588
|
}
|
|
589
589
|
}, Qn = Y({}, ["mi", "mo", "mn", "ms", "mtext"]), es = Y({}, ["foreignobject", "desc", "title", "annotation-xml"]), Na = Y({}, ["title", "style", "font", "a", "script"]), ts = Y({}, [...cn, ...dn, ...Vr]), ns = Y({}, [...hn, ...Gr]), Pa = function(b) {
|
|
590
|
-
let
|
|
591
|
-
(!
|
|
590
|
+
let k = T(b);
|
|
591
|
+
(!k || !k.tagName) && (k = {
|
|
592
592
|
namespaceURI: Qe,
|
|
593
593
|
tagName: "template"
|
|
594
594
|
});
|
|
595
|
-
const B = Nt(b.tagName), ee = Nt(
|
|
596
|
-
return qt[b.namespaceURI] ? b.namespaceURI === At ?
|
|
595
|
+
const B = Nt(b.tagName), ee = Nt(k.tagName);
|
|
596
|
+
return qt[b.namespaceURI] ? b.namespaceURI === At ? k.namespaceURI === Ne ? B === "svg" : k.namespaceURI === Lt ? B === "svg" && (ee === "annotation-xml" || Qn[ee]) : !!ts[B] : b.namespaceURI === Lt ? k.namespaceURI === Ne ? B === "math" : k.namespaceURI === At ? B === "math" && es[ee] : !!ns[B] : b.namespaceURI === Ne ? k.namespaceURI === At && !es[ee] || k.namespaceURI === Lt && !Qn[ee] ? !1 : !ns[B] && (Na[B] || !ts[B]) : !!(gt === "application/xhtml+xml" && qt[b.namespaceURI]) : !1;
|
|
597
597
|
}, Ue = function(b) {
|
|
598
598
|
vt(e.removed, {
|
|
599
599
|
element: b
|
|
@@ -603,53 +603,53 @@ function Ta() {
|
|
|
603
603
|
} catch {
|
|
604
604
|
b.remove();
|
|
605
605
|
}
|
|
606
|
-
}, Jt = function(b,
|
|
606
|
+
}, Jt = function(b, k) {
|
|
607
607
|
try {
|
|
608
608
|
vt(e.removed, {
|
|
609
|
-
attribute:
|
|
610
|
-
from:
|
|
609
|
+
attribute: k.getAttributeNode(b),
|
|
610
|
+
from: k
|
|
611
611
|
});
|
|
612
612
|
} catch {
|
|
613
613
|
vt(e.removed, {
|
|
614
614
|
attribute: null,
|
|
615
|
-
from:
|
|
615
|
+
from: k
|
|
616
616
|
});
|
|
617
617
|
}
|
|
618
|
-
if (
|
|
618
|
+
if (k.removeAttribute(b), b === "is" && !le[b])
|
|
619
619
|
if (P || Le)
|
|
620
620
|
try {
|
|
621
|
-
Ue(
|
|
621
|
+
Ue(k);
|
|
622
622
|
} catch {
|
|
623
623
|
}
|
|
624
624
|
else
|
|
625
625
|
try {
|
|
626
|
-
|
|
626
|
+
k.setAttribute(b, "");
|
|
627
627
|
} catch {
|
|
628
628
|
}
|
|
629
629
|
}, ss = function(b) {
|
|
630
|
-
let
|
|
631
|
-
if (
|
|
630
|
+
let k = null, B = null;
|
|
631
|
+
if (R)
|
|
632
632
|
b = "<remove></remove>" + b;
|
|
633
633
|
else {
|
|
634
|
-
const ve =
|
|
634
|
+
const ve = kr(b, /^[\r\n\t ]+/);
|
|
635
635
|
B = ve && ve[0];
|
|
636
636
|
}
|
|
637
637
|
gt === "application/xhtml+xml" && Qe === Ne && (b = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + b + "</body></html>");
|
|
638
638
|
const ee = y ? y.createHTML(b) : b;
|
|
639
639
|
if (Qe === Ne)
|
|
640
640
|
try {
|
|
641
|
-
|
|
641
|
+
k = new h().parseFromString(ee, gt);
|
|
642
642
|
} catch {
|
|
643
643
|
}
|
|
644
|
-
if (!
|
|
645
|
-
|
|
644
|
+
if (!k || !k.documentElement) {
|
|
645
|
+
k = M.createDocument(Qe, "template", null);
|
|
646
646
|
try {
|
|
647
|
-
|
|
647
|
+
k.documentElement.innerHTML = Yt ? A : ee;
|
|
648
648
|
} catch {
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
const fe =
|
|
652
|
-
return b && B && fe.insertBefore(t.createTextNode(B), fe.childNodes[0] || null), Qe === Ne ?
|
|
651
|
+
const fe = k.body || k.documentElement;
|
|
652
|
+
return b && B && fe.insertBefore(t.createTextNode(B), fe.childNodes[0] || null), Qe === Ne ? N.call(k, Te ? "html" : "body")[0] : Te ? k.documentElement : fe;
|
|
653
653
|
}, as = function(b) {
|
|
654
654
|
return L.call(
|
|
655
655
|
b.ownerDocument || b,
|
|
@@ -662,12 +662,12 @@ function Ta() {
|
|
|
662
662
|
return b instanceof p && (typeof b.nodeName != "string" || typeof b.textContent != "string" || typeof b.removeChild != "function" || !(b.attributes instanceof d) || typeof b.removeAttribute != "function" || typeof b.setAttribute != "function" || typeof b.namespaceURI != "string" || typeof b.insertBefore != "function" || typeof b.hasChildNodes != "function");
|
|
663
663
|
}, is = function(b) {
|
|
664
664
|
return typeof r == "function" && b instanceof r;
|
|
665
|
-
}, Pe = function(b,
|
|
666
|
-
|
|
667
|
-
ee.call(e,
|
|
665
|
+
}, Pe = function(b, k, B) {
|
|
666
|
+
D[b] && It(D[b], (ee) => {
|
|
667
|
+
ee.call(e, k, B, et);
|
|
668
668
|
});
|
|
669
669
|
}, rs = function(b) {
|
|
670
|
-
let
|
|
670
|
+
let k = null;
|
|
671
671
|
if (Pe("beforeSanitizeElements", b, null), Va(b))
|
|
672
672
|
return Ue(b), !0;
|
|
673
673
|
const B = he(b.nodeName);
|
|
@@ -689,29 +689,29 @@ function Ta() {
|
|
|
689
689
|
}
|
|
690
690
|
return Ue(b), !0;
|
|
691
691
|
}
|
|
692
|
-
return b instanceof l && !Pa(b) || (B === "noscript" || B === "noembed" || B === "noframes") && Oe(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Ue(b), !0) : (ce && b.nodeType === 3 && (
|
|
693
|
-
|
|
694
|
-
}), b.textContent !==
|
|
692
|
+
return b instanceof l && !Pa(b) || (B === "noscript" || B === "noembed" || B === "noframes") && Oe(/<\/no(script|embed|frames)/i, b.innerHTML) ? (Ue(b), !0) : (ce && b.nodeType === 3 && (k = b.textContent, It([C, V, z], (ee) => {
|
|
693
|
+
k = yt(k, ee, " ");
|
|
694
|
+
}), b.textContent !== k && (vt(e.removed, {
|
|
695
695
|
element: b.cloneNode()
|
|
696
|
-
}), b.textContent =
|
|
697
|
-
}, os = function(b,
|
|
698
|
-
if (jn && (
|
|
696
|
+
}), b.textContent = k)), Pe("afterSanitizeElements", b, null), !1);
|
|
697
|
+
}, os = function(b, k, B) {
|
|
698
|
+
if (jn && (k === "id" || k === "name") && (B in t || B in Da))
|
|
699
699
|
return !1;
|
|
700
|
-
if (!(J && !qe[
|
|
701
|
-
if (!(U && Oe(Q,
|
|
702
|
-
if (!le[
|
|
700
|
+
if (!(J && !qe[k] && Oe(w, k))) {
|
|
701
|
+
if (!(U && Oe(Q, k))) {
|
|
702
|
+
if (!le[k] || qe[k]) {
|
|
703
703
|
if (
|
|
704
704
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
705
705
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
706
706
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
707
|
-
!(ls(b) && (se.tagNameCheck instanceof RegExp && Oe(se.tagNameCheck, b) || se.tagNameCheck instanceof Function && se.tagNameCheck(b)) && (se.attributeNameCheck instanceof RegExp && Oe(se.attributeNameCheck,
|
|
707
|
+
!(ls(b) && (se.tagNameCheck instanceof RegExp && Oe(se.tagNameCheck, b) || se.tagNameCheck instanceof Function && se.tagNameCheck(b)) && (se.attributeNameCheck instanceof RegExp && Oe(se.attributeNameCheck, k) || se.attributeNameCheck instanceof Function && se.attributeNameCheck(k)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
708
708
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
709
|
-
|
|
709
|
+
k === "is" && se.allowCustomizedBuiltInElements && (se.tagNameCheck instanceof RegExp && Oe(se.tagNameCheck, B) || se.tagNameCheck instanceof Function && se.tagNameCheck(B)))
|
|
710
710
|
)
|
|
711
711
|
return !1;
|
|
712
|
-
} else if (!Zt[
|
|
712
|
+
} else if (!Zt[k]) {
|
|
713
713
|
if (!Oe(H, yt(B, K, ""))) {
|
|
714
|
-
if (!((
|
|
714
|
+
if (!((k === "src" || k === "xlink:href" || k === "href") && b !== "script" && Rr(B, "data:") === 0 && Yn[b])) {
|
|
715
715
|
if (!(ae && !Oe(me, yt(B, K, "")))) {
|
|
716
716
|
if (B)
|
|
717
717
|
return !1;
|
|
@@ -727,9 +727,9 @@ function Ta() {
|
|
|
727
727
|
}, cs = function(b) {
|
|
728
728
|
Pe("beforeSanitizeAttributes", b, null);
|
|
729
729
|
const {
|
|
730
|
-
attributes:
|
|
730
|
+
attributes: k
|
|
731
731
|
} = b;
|
|
732
|
-
if (!
|
|
732
|
+
if (!k)
|
|
733
733
|
return;
|
|
734
734
|
const B = {
|
|
735
735
|
attrName: "",
|
|
@@ -737,9 +737,9 @@ function Ta() {
|
|
|
737
737
|
keepAttr: !0,
|
|
738
738
|
allowedAttributes: le
|
|
739
739
|
};
|
|
740
|
-
let ee =
|
|
740
|
+
let ee = k.length;
|
|
741
741
|
for (; ee--; ) {
|
|
742
|
-
const fe =
|
|
742
|
+
const fe = k[ee], {
|
|
743
743
|
name: ve,
|
|
744
744
|
namespaceURI: be,
|
|
745
745
|
value: ze
|
|
@@ -775,14 +775,14 @@ function Ta() {
|
|
|
775
775
|
}
|
|
776
776
|
Pe("afterSanitizeAttributes", b, null);
|
|
777
777
|
}, Ga = function $(b) {
|
|
778
|
-
let
|
|
778
|
+
let k = null;
|
|
779
779
|
const B = as(b);
|
|
780
|
-
for (Pe("beforeSanitizeShadowDOM", b, null);
|
|
781
|
-
Pe("uponSanitizeShadowNode",
|
|
780
|
+
for (Pe("beforeSanitizeShadowDOM", b, null); k = B.nextNode(); )
|
|
781
|
+
Pe("uponSanitizeShadowNode", k, null), !rs(k) && (k.content instanceof a && $(k.content), cs(k));
|
|
782
782
|
Pe("afterSanitizeShadowDOM", b, null);
|
|
783
783
|
};
|
|
784
784
|
return e.sanitize = function($) {
|
|
785
|
-
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
785
|
+
let b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, k = null, B = null, ee = null, fe = null;
|
|
786
786
|
if (Yt = !$, Yt && ($ = "<!-->"), typeof $ != "string" && !is($))
|
|
787
787
|
if (typeof $.toString == "function") {
|
|
788
788
|
if ($ = $.toString(), typeof $ != "string")
|
|
@@ -798,30 +798,30 @@ function Ta() {
|
|
|
798
798
|
throw Et("root node is forbidden and cannot be sanitized in-place");
|
|
799
799
|
}
|
|
800
800
|
} else if ($ instanceof r)
|
|
801
|
-
|
|
801
|
+
k = ss("<!---->"), B = k.ownerDocument.importNode($, !0), B.nodeType === 1 && B.nodeName === "BODY" || B.nodeName === "HTML" ? k = B : k.appendChild(B);
|
|
802
802
|
else {
|
|
803
803
|
if (!P && !ce && !Te && // eslint-disable-next-line unicorn/prefer-includes
|
|
804
804
|
$.indexOf("<") === -1)
|
|
805
805
|
return y && Tt ? y.createHTML($) : $;
|
|
806
|
-
if (
|
|
806
|
+
if (k = ss($), !k)
|
|
807
807
|
return P ? null : Tt ? A : "";
|
|
808
808
|
}
|
|
809
|
-
|
|
810
|
-
const ve = as(pt ? $ :
|
|
809
|
+
k && R && Ue(k.firstChild);
|
|
810
|
+
const ve = as(pt ? $ : k);
|
|
811
811
|
for (; ee = ve.nextNode(); )
|
|
812
812
|
rs(ee) || (ee.content instanceof a && Ga(ee.content), cs(ee));
|
|
813
813
|
if (pt)
|
|
814
814
|
return $;
|
|
815
815
|
if (P) {
|
|
816
816
|
if (Le)
|
|
817
|
-
for (fe = I.call(
|
|
818
|
-
fe.appendChild(
|
|
817
|
+
for (fe = I.call(k.ownerDocument); k.firstChild; )
|
|
818
|
+
fe.appendChild(k.firstChild);
|
|
819
819
|
else
|
|
820
|
-
fe =
|
|
820
|
+
fe = k;
|
|
821
821
|
return (le.shadowroot || le.shadowrootmode) && (fe = j.call(n, fe, !0)), fe;
|
|
822
822
|
}
|
|
823
|
-
let be = Te ?
|
|
824
|
-
return Te && Z["!doctype"] &&
|
|
823
|
+
let be = Te ? k.outerHTML : k.innerHTML;
|
|
824
|
+
return Te && Z["!doctype"] && k.ownerDocument && k.ownerDocument.doctype && k.ownerDocument.doctype.name && Oe(xa, k.ownerDocument.doctype.name) && (be = "<!DOCTYPE " + k.ownerDocument.doctype.name + `>
|
|
825
825
|
` + be), ce && It([C, V, z], (ze) => {
|
|
826
826
|
be = yt(be, ze, " ");
|
|
827
827
|
}), y && Tt ? y.createHTML(be) : be;
|
|
@@ -830,19 +830,19 @@ function Ta() {
|
|
|
830
830
|
Kt($), _ = !0;
|
|
831
831
|
}, e.clearConfig = function() {
|
|
832
832
|
et = null, _ = !1;
|
|
833
|
-
}, e.isValidAttribute = function($, b,
|
|
833
|
+
}, e.isValidAttribute = function($, b, k) {
|
|
834
834
|
et || Kt({});
|
|
835
835
|
const B = he($), ee = he(b);
|
|
836
|
-
return os(B, ee,
|
|
836
|
+
return os(B, ee, k);
|
|
837
837
|
}, e.addHook = function($, b) {
|
|
838
|
-
typeof b == "function" && (
|
|
838
|
+
typeof b == "function" && (D[$] = D[$] || [], vt(D[$], b));
|
|
839
839
|
}, e.removeHook = function($) {
|
|
840
|
-
if (
|
|
841
|
-
return Ts(
|
|
840
|
+
if (D[$])
|
|
841
|
+
return Ts(D[$]);
|
|
842
842
|
}, e.removeHooks = function($) {
|
|
843
|
-
|
|
843
|
+
D[$] && (D[$] = []);
|
|
844
844
|
}, e.removeAllHooks = function() {
|
|
845
|
-
|
|
845
|
+
D = {};
|
|
846
846
|
}, e;
|
|
847
847
|
}
|
|
848
848
|
var Un = Ta();
|
|
@@ -1235,19 +1235,19 @@ const zt = class zt extends q {
|
|
|
1235
1235
|
}
|
|
1236
1236
|
render(e = !0) {
|
|
1237
1237
|
const t = this.parent, { width: n, height: s } = S.getHTMLElementSize(t.node()), a = this.configs.direction === tt.ROW || this.configs.direction === tt.ROW_REVERSE, i = v(this.model.getOptions(), "style", "prefix"), r = t.classed(
|
|
1238
|
-
`${
|
|
1238
|
+
`${we}--${i}--layout-row`,
|
|
1239
1239
|
this.configs.direction === tt.ROW
|
|
1240
1240
|
).classed(
|
|
1241
|
-
`${
|
|
1241
|
+
`${we}--${i}--layout-row-reverse`,
|
|
1242
1242
|
this.configs.direction === tt.ROW_REVERSE
|
|
1243
1243
|
).classed(
|
|
1244
|
-
`${
|
|
1244
|
+
`${we}--${i}--layout-column`,
|
|
1245
1245
|
this.configs.direction === tt.COLUMN
|
|
1246
1246
|
).classed(
|
|
1247
|
-
`${
|
|
1247
|
+
`${we}--${i}--layout-column-reverse`,
|
|
1248
1248
|
this.configs.direction === tt.COLUMN_REVERSE
|
|
1249
1249
|
).classed(
|
|
1250
|
-
`${
|
|
1250
|
+
`${we}--${i}--layout-alignitems-center`,
|
|
1251
1251
|
this.configs.alignItems === xi.CENTER
|
|
1252
1252
|
).selectAll(`div.layout-child-${this._instanceID}`).data(this.children, (d) => d.id);
|
|
1253
1253
|
r.enter().append("div").merge(t.selectAll(`div.layout-child-${this._instanceID}`)).attr("class", (d) => `layout-child layout-child-${this._instanceID} ${d.id}`).each(function(d) {
|
|
@@ -1323,14 +1323,14 @@ var Yr = {
|
|
|
1323
1323
|
iframe, object, embed, *[tabindex], *[contenteditable=true]
|
|
1324
1324
|
`
|
|
1325
1325
|
}, pn = Yr;
|
|
1326
|
-
function
|
|
1326
|
+
function ks(o, e) {
|
|
1327
1327
|
for (var t = 0; t < e.length; t++) {
|
|
1328
1328
|
var n = e[t];
|
|
1329
1329
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, n.key, n);
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
function qr(o, e, t) {
|
|
1333
|
-
return e &&
|
|
1333
|
+
return e && ks(o.prototype, e), t && ks(o, t), Object.defineProperty(o, "prototype", {
|
|
1334
1334
|
writable: !1
|
|
1335
1335
|
}), o;
|
|
1336
1336
|
}
|
|
@@ -1399,14 +1399,14 @@ function ao(o, e) {
|
|
|
1399
1399
|
if (!(o instanceof e))
|
|
1400
1400
|
throw new TypeError("Cannot call a class as a function");
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function Rs(o, e) {
|
|
1403
1403
|
for (var t = 0; t < e.length; t++) {
|
|
1404
1404
|
var n = e[t];
|
|
1405
1405
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, n.key, n);
|
|
1406
1406
|
}
|
|
1407
1407
|
}
|
|
1408
1408
|
function io(o, e, t) {
|
|
1409
|
-
return e &&
|
|
1409
|
+
return e && Rs(o.prototype, e), t && Rs(o, t), Object.defineProperty(o, "prototype", {
|
|
1410
1410
|
writable: !1
|
|
1411
1411
|
}), o;
|
|
1412
1412
|
}
|
|
@@ -1700,12 +1700,12 @@ function Ns(o, e) {
|
|
|
1700
1700
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, n.key, n);
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1703
|
+
function Mo(o, e, t) {
|
|
1704
1704
|
return e && Ns(o.prototype, e), t && Ns(o, t), Object.defineProperty(o, "prototype", {
|
|
1705
1705
|
writable: !1
|
|
1706
1706
|
}), o;
|
|
1707
1707
|
}
|
|
1708
|
-
function
|
|
1708
|
+
function wo(o, e) {
|
|
1709
1709
|
if (typeof e != "function" && e !== null)
|
|
1710
1710
|
throw new TypeError("Super expression must either be null or a function");
|
|
1711
1711
|
o.prototype = Object.create(e && e.prototype, {
|
|
@@ -1716,15 +1716,15 @@ function Mo(o, e) {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
}), Object.defineProperty(o, "prototype", {
|
|
1718
1718
|
writable: !1
|
|
1719
|
-
}), e &&
|
|
1719
|
+
}), e && Mn(o, e);
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1721
|
+
function Mn(o, e) {
|
|
1722
|
+
return Mn = Object.setPrototypeOf || function(n, s) {
|
|
1723
1723
|
return n.__proto__ = s, n;
|
|
1724
|
-
},
|
|
1724
|
+
}, Mn(o, e);
|
|
1725
1725
|
}
|
|
1726
1726
|
function Co(o) {
|
|
1727
|
-
var e =
|
|
1727
|
+
var e = ko();
|
|
1728
1728
|
return function() {
|
|
1729
1729
|
var n = Gt(o), s;
|
|
1730
1730
|
if (e) {
|
|
@@ -1747,7 +1747,7 @@ function Io(o) {
|
|
|
1747
1747
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1748
1748
|
return o;
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function ko() {
|
|
1751
1751
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
1752
1752
|
return !1;
|
|
1753
1753
|
if (typeof Proxy == "function")
|
|
@@ -1764,14 +1764,14 @@ function Gt(o) {
|
|
|
1764
1764
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1765
1765
|
}, Gt(o);
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function Ro(o) {
|
|
1768
1768
|
var e = /* @__PURE__ */ function(t) {
|
|
1769
|
-
|
|
1769
|
+
wo(s, t);
|
|
1770
1770
|
var n = Co(s);
|
|
1771
1771
|
function s() {
|
|
1772
1772
|
return Ao(this, s), n.apply(this, arguments);
|
|
1773
1773
|
}
|
|
1774
|
-
return
|
|
1774
|
+
return Mo(s, [{
|
|
1775
1775
|
key: "_changeState",
|
|
1776
1776
|
value: (
|
|
1777
1777
|
/* eslint-disable jsdoc/check-param-names */
|
|
@@ -1848,7 +1848,7 @@ function ko(o) {
|
|
|
1848
1848
|
}(o);
|
|
1849
1849
|
return e;
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1851
|
+
function wn(o, e) {
|
|
1852
1852
|
var t = o.target, n = o.currentTarget;
|
|
1853
1853
|
if (typeof t.matches == "function") {
|
|
1854
1854
|
if (t.matches(e))
|
|
@@ -1993,14 +1993,14 @@ function $o(o) {
|
|
|
1993
1993
|
}(o);
|
|
1994
1994
|
return e;
|
|
1995
1995
|
}
|
|
1996
|
-
var Uo = [
|
|
1996
|
+
var Uo = [Ro, $o];
|
|
1997
1997
|
const zo = Uo;
|
|
1998
1998
|
function Fo(o) {
|
|
1999
1999
|
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
2000
2000
|
}
|
|
2001
|
-
var
|
|
2001
|
+
var Ma = function() {
|
|
2002
2002
|
};
|
|
2003
|
-
process.env.NODE_ENV !== "production" && (
|
|
2003
|
+
process.env.NODE_ENV !== "production" && (Ma = function(o, e, t) {
|
|
2004
2004
|
var n = arguments.length;
|
|
2005
2005
|
t = new Array(n > 2 ? n - 2 : 0);
|
|
2006
2006
|
for (var s = 2; s < n; s++)
|
|
@@ -2024,7 +2024,7 @@ process.env.NODE_ENV !== "production" && (wa = function(o, e, t) {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
2026
2026
|
});
|
|
2027
|
-
var Wo =
|
|
2027
|
+
var Wo = Ma;
|
|
2028
2028
|
const jo = /* @__PURE__ */ Fo(Wo);
|
|
2029
2029
|
function In(o) {
|
|
2030
2030
|
"@babel/helpers - typeof";
|
|
@@ -2060,12 +2060,12 @@ function Yo(o, e) {
|
|
|
2060
2060
|
}
|
|
2061
2061
|
}), Object.defineProperty(o, "prototype", {
|
|
2062
2062
|
writable: !1
|
|
2063
|
-
}), e &&
|
|
2063
|
+
}), e && kn(o, e);
|
|
2064
2064
|
}
|
|
2065
|
-
function
|
|
2066
|
-
return
|
|
2065
|
+
function kn(o, e) {
|
|
2066
|
+
return kn = Object.setPrototypeOf || function(n, s) {
|
|
2067
2067
|
return n.__proto__ = s, n;
|
|
2068
|
-
},
|
|
2068
|
+
}, kn(o, e);
|
|
2069
2069
|
}
|
|
2070
2070
|
function qo(o) {
|
|
2071
2071
|
var e = Qo();
|
|
@@ -2142,7 +2142,7 @@ function el(o) {
|
|
|
2142
2142
|
else {
|
|
2143
2143
|
var d = c.initEventNames.map(function(p) {
|
|
2144
2144
|
return St(r, p, function(h) {
|
|
2145
|
-
var u =
|
|
2145
|
+
var u = wn(h, "[".concat(c.attribInitTarget, "]"));
|
|
2146
2146
|
if (u) {
|
|
2147
2147
|
h.delegateTarget = u;
|
|
2148
2148
|
var g = u.ownerDocument.querySelectorAll(u.getAttribute(c.attribInitTarget));
|
|
@@ -2170,13 +2170,13 @@ function el(o) {
|
|
|
2170
2170
|
}(o);
|
|
2171
2171
|
return e;
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2173
|
+
function Rn(o) {
|
|
2174
2174
|
"@babel/helpers - typeof";
|
|
2175
|
-
return
|
|
2175
|
+
return Rn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2176
2176
|
return typeof e;
|
|
2177
2177
|
} : function(e) {
|
|
2178
2178
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2179
|
-
},
|
|
2179
|
+
}, Rn(o);
|
|
2180
2180
|
}
|
|
2181
2181
|
function tl(o, e) {
|
|
2182
2182
|
if (!(o instanceof e))
|
|
@@ -2224,7 +2224,7 @@ function al(o) {
|
|
|
2224
2224
|
};
|
|
2225
2225
|
}
|
|
2226
2226
|
function il(o, e) {
|
|
2227
|
-
if (e && (
|
|
2227
|
+
if (e && (Rn(e) === "object" || typeof e == "function"))
|
|
2228
2228
|
return e;
|
|
2229
2229
|
if (e !== void 0)
|
|
2230
2230
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
@@ -2260,7 +2260,7 @@ var ll = /* @__PURE__ */ function(o) {
|
|
|
2260
2260
|
return tl(this, t), a = e.call(this, n, s), a._handleFocusinListener = void 0, a._handleKeydownListener = void 0, a._handleFocusin = function(i) {
|
|
2261
2261
|
var r = a.element.querySelector(a.options.selectorModalContainer) || a.element;
|
|
2262
2262
|
a.element.classList.contains(a.options.classVisible) && !r.contains(i.target) && a.options.selectorsFloatingMenus.every(function(l) {
|
|
2263
|
-
return !
|
|
2263
|
+
return !wn(i, l);
|
|
2264
2264
|
}) && a.element.querySelector(pn.selectorTabbable).focus();
|
|
2265
2265
|
}, a._hookCloseActions(), a;
|
|
2266
2266
|
}
|
|
@@ -2314,7 +2314,7 @@ var ll = /* @__PURE__ */ function(o) {
|
|
|
2314
2314
|
value: function() {
|
|
2315
2315
|
var s = this;
|
|
2316
2316
|
this.manage(St(this.element, "click", function(a) {
|
|
2317
|
-
var i =
|
|
2317
|
+
var i = wn(a, s.options.selectorModalClose);
|
|
2318
2318
|
i && (a.delegateTarget = i), (i || a.target === s.element) && s.hide(a);
|
|
2319
2319
|
})), this._handleKeydownListener && (this._handleKeydownListener = this.unmanage(this._handleKeydownListener).release()), this._handleKeydownListener = this.manage(St(this.element.ownerDocument.body, "keydown", function(a) {
|
|
2320
2320
|
a.which === 27 && s.shouldStateBeChanged("hidden") && (a.stopPropagation(), s.hide(a));
|
|
@@ -2400,29 +2400,29 @@ class hh extends q {
|
|
|
2400
2400
|
getModalHTML() {
|
|
2401
2401
|
const e = this.services.domUtils.getChartID(), t = this.model.getOptions(), { title: n, downloadAsCSV: s } = v(t, "locale", "translations", "tabularRep"), a = v(t, "style", "prefix"), i = this.model.getTabularDataArray();
|
|
2402
2402
|
return `
|
|
2403
|
-
<div class="cds--modal-container
|
|
2404
|
-
<div class="cds--modal-header
|
|
2403
|
+
<div class="cds--modal-container">
|
|
2404
|
+
<div class="cds--modal-header">
|
|
2405
2405
|
|
|
2406
|
-
<p class="cds--modal-header__label cds--type-delta
|
|
2406
|
+
<p class="cds--modal-header__label cds--type-delta" id="modal-title">${n}</p>
|
|
2407
2407
|
|
|
2408
|
-
<p class="cds--modal-header__heading cds--type-beta
|
|
2408
|
+
<p class="cds--modal-header__heading cds--type-beta" id="${e}__modal-description">${De(
|
|
2409
2409
|
t.title
|
|
2410
2410
|
)}</p>
|
|
2411
2411
|
|
|
2412
|
-
<button class="cds--modal-close
|
|
2413
|
-
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon
|
|
2412
|
+
<button class="cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>
|
|
2413
|
+
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon">
|
|
2414
2414
|
<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>
|
|
2415
2415
|
</svg>
|
|
2416
2416
|
</button>
|
|
2417
2417
|
</div>
|
|
2418
2418
|
|
|
2419
|
-
<div class="cds--modal-content
|
|
2420
|
-
<table class="cds--data-table cds--data-table--no-border
|
|
2419
|
+
<div class="cds--modal-content">
|
|
2420
|
+
<table class="cds--data-table cds--data-table--no-border">
|
|
2421
2421
|
<thead>
|
|
2422
2422
|
<tr>
|
|
2423
2423
|
${ne(i, 0).map(
|
|
2424
2424
|
(r) => `<th scope="col">
|
|
2425
|
-
<div class="cds--table-header-label
|
|
2425
|
+
<div class="cds--table-header-label">${De(r)}</div>
|
|
2426
2426
|
</th>`
|
|
2427
2427
|
).join("")}
|
|
2428
2428
|
</tr>
|
|
@@ -2438,9 +2438,9 @@ class hh extends q {
|
|
|
2438
2438
|
</table>
|
|
2439
2439
|
</div>
|
|
2440
2440
|
|
|
2441
|
-
<div class="cds--modal-footer
|
|
2442
|
-
<div class="${
|
|
2443
|
-
<button class="cds--btn cds--btn--primary
|
|
2441
|
+
<div class="cds--modal-footer">
|
|
2442
|
+
<div class="${we}--${a}-modal-footer-spacer"></div>
|
|
2443
|
+
<button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${s}</button>
|
|
2444
2444
|
</div>
|
|
2445
2445
|
</div>`;
|
|
2446
2446
|
}
|
|
@@ -2451,7 +2451,7 @@ class hh extends q {
|
|
|
2451
2451
|
const t = this.model.getOptions();
|
|
2452
2452
|
if (!this.isEventListenerAdded) {
|
|
2453
2453
|
const n = x(this.services.domUtils.getHolder()), s = v(t, "style", "prefix");
|
|
2454
|
-
this.modal = S.appendOrSelect(n, `div.${
|
|
2454
|
+
this.modal = S.appendOrSelect(n, `div.${we}--${s}--modal`), this.addEventListeners(), this.isEventListenerAdded = !0;
|
|
2455
2455
|
}
|
|
2456
2456
|
}
|
|
2457
2457
|
destroy() {
|
|
@@ -2576,15 +2576,15 @@ class hl extends q {
|
|
|
2576
2576
|
y.exit().remove();
|
|
2577
2577
|
const A = y.enter().append("div").merge(y).classed("legend-item", !0).classed("additional", !0).attr(
|
|
2578
2578
|
"aria-labelledby",
|
|
2579
|
-
(I,
|
|
2580
|
-
`legend-datagroup-${E.size() +
|
|
2579
|
+
(I, N) => this.services.domUtils.generateElementIDString(
|
|
2580
|
+
`legend-datagroup-${E.size() + N}-title`
|
|
2581
2581
|
)
|
|
2582
2582
|
);
|
|
2583
2583
|
A.selectAll("*").remove();
|
|
2584
|
-
let
|
|
2584
|
+
let M, L = 1;
|
|
2585
2585
|
A.append("svg").classed("icon", !0).each(function(I) {
|
|
2586
|
-
const
|
|
2587
|
-
!
|
|
2586
|
+
const N = x(this);
|
|
2587
|
+
!M || M != I.type ? (M = I.type, L = 1) : L++, T.addAdditionalItem(N, I, L);
|
|
2588
2588
|
}), A.append("p").merge(A.select("p")), this.truncateLegendText();
|
|
2589
2589
|
}
|
|
2590
2590
|
p.exit().on("mouseover", null).on("click", null).on("mouseout", null).remove(), u && h.size() > 1 && this.addEventListeners();
|
|
@@ -2938,7 +2938,7 @@ class pl extends q {
|
|
|
2938
2938
|
const t = this.getOptions(), n = v(t, "tooltip", "enabled");
|
|
2939
2939
|
if (n) {
|
|
2940
2940
|
const s = x(this.services.domUtils.getHolder()), a = v(t, "style", "prefix");
|
|
2941
|
-
this.tooltip = S.appendOrSelect(s, `div.${
|
|
2941
|
+
this.tooltip = S.appendOrSelect(s, `div.${we}--${a}--tooltip`), this.tooltip.style("max-width", null).attr("role", "tooltip"), this.isEventListenerAdded || (this.addTooltipEventListener(), this.isEventListenerAdded = !0), this.tooltip.classed("hidden", !0);
|
|
2942
2942
|
} else
|
|
2943
2943
|
!n && this.isEventListenerAdded && (this.removeTooltipEventListener(), this.isEventListenerAdded = !1);
|
|
2944
2944
|
}
|
|
@@ -2948,8 +2948,8 @@ class pl extends q {
|
|
|
2948
2948
|
if (!i)
|
|
2949
2949
|
i = Ft(v(e, "detail", "event"), t);
|
|
2950
2950
|
else {
|
|
2951
|
-
const h = v(s, "zoomBar", "top", "type"), u =
|
|
2952
|
-
a && (i[1] += u +
|
|
2951
|
+
const h = v(s, "zoomBar", "top", "type"), u = Me.height[h];
|
|
2952
|
+
a && (i[1] += u + Me.spacerHeight);
|
|
2953
2953
|
}
|
|
2954
2954
|
const r = t.offsetWidth, l = t.offsetHeight;
|
|
2955
2955
|
let c;
|
|
@@ -3005,24 +3005,24 @@ const ct = class ct extends q {
|
|
|
3005
3005
|
if (p && d === ue.TIME) {
|
|
3006
3006
|
let g = this.model.get("zoomDomain");
|
|
3007
3007
|
g === void 0 && (g = this.services.zoom.getDefaultZoomBarDomain(), g && this.model.set({ zoomDomain: g }, { animate: !1 }));
|
|
3008
|
-
const m = (
|
|
3009
|
-
const L =
|
|
3008
|
+
const m = (M) => {
|
|
3009
|
+
const L = M[1] - M[0];
|
|
3010
3010
|
let I = "0," + L.toString();
|
|
3011
|
-
const
|
|
3012
|
-
for (let
|
|
3011
|
+
const N = Math.floor(l / ct.DASH_LENGTH), j = N * ct.DASH_LENGTH;
|
|
3012
|
+
for (let D = 0; D < N; D++)
|
|
3013
3013
|
I += "," + ct.DASH_LENGTH;
|
|
3014
|
-
I += "," + (l - j),
|
|
3015
|
-
}, E = (
|
|
3016
|
-
const L =
|
|
3014
|
+
I += "," + (l - j), N % 2 === 1 && (I += ",0"), I += "," + L.toString(), I += "," + l.toString(), u.attr("stroke-dasharray", I);
|
|
3015
|
+
}, E = (M) => {
|
|
3016
|
+
const L = M.selection;
|
|
3017
3017
|
L === null || L[0] === L[1] || (u.attr("x", parseFloat(i.attr("x")) + parseFloat(s.attr("x"))).attr("y", i.attr("y")).attr("width", i.attr("width")).attr("height", i.attr("height")).style("cursor", "pointer").style("display", null), m(L));
|
|
3018
|
-
}, O = (
|
|
3018
|
+
}, O = (M, L) => {
|
|
3019
3019
|
const I = Ja().range([0, r]).domain(g);
|
|
3020
|
-
let
|
|
3021
|
-
|
|
3020
|
+
let N = [I.invert(M), I.invert(L)];
|
|
3021
|
+
N[0].valueOf() === N[1].valueOf() && (N = this.services.zoom.getDefaultZoomBarDomain()), (g[0].valueOf() !== N[0].valueOf() || g[1].valueOf() !== N[1].valueOf()) && this.services.zoom.handleDomainChange(N);
|
|
3022
3022
|
};
|
|
3023
3023
|
let T;
|
|
3024
|
-
const y = (
|
|
3025
|
-
const L =
|
|
3024
|
+
const y = (M) => {
|
|
3025
|
+
const L = M.selection;
|
|
3026
3026
|
L !== null && (O(L[0], L[1]), a.call(T.move, null), u.style("display", "none"));
|
|
3027
3027
|
};
|
|
3028
3028
|
l != 0 && r != 0 && (T = Qs().extent([
|
|
@@ -3030,13 +3030,13 @@ const ct = class ct extends q {
|
|
|
3030
3030
|
[r - 1, l]
|
|
3031
3031
|
]).on("start brush end", E).on("end.brushed", y), a.call(T));
|
|
3032
3032
|
const A = this.services.zoom.getZoomRatio();
|
|
3033
|
-
s.on("click", function(
|
|
3034
|
-
if (
|
|
3033
|
+
s.on("click", function(M) {
|
|
3034
|
+
if (M.shiftKey) {
|
|
3035
3035
|
const L = this.services.domUtils.getHolder(), I = Ft(a.node(), L)[0];
|
|
3036
|
-
let
|
|
3037
|
-
|
|
3036
|
+
let N = I - r * A / 2;
|
|
3037
|
+
N < 0 && (N = 0);
|
|
3038
3038
|
let j = I + r * A / 2;
|
|
3039
|
-
j > r && (j = r), O(
|
|
3039
|
+
j > r && (j = r), O(N, j);
|
|
3040
3040
|
}
|
|
3041
3041
|
});
|
|
3042
3042
|
}
|
|
@@ -3057,7 +3057,7 @@ class ph extends q {
|
|
|
3057
3057
|
// @ts-ignore
|
|
3058
3058
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3059
3059
|
render(e = !0) {
|
|
3060
|
-
const t = this.getComponentContainer(), n = this.services.zoom.isZoomBarLoading(G.TOP), s = this.services.zoom.isZoomBarLocked(G.TOP), a = v(this.getOptions(), "zoomBar", G.TOP, "type"), i = v(this.getOptions(), "axes", G.BOTTOM, "highlights"), r =
|
|
3060
|
+
const t = this.getComponentContainer(), n = this.services.zoom.isZoomBarLoading(G.TOP), s = this.services.zoom.isZoomBarLocked(G.TOP), a = v(this.getOptions(), "zoomBar", G.TOP, "type"), i = v(this.getOptions(), "axes", G.BOTTOM, "highlights"), r = Me.height[a], { width: l } = S.getSVGElementSize(this.parent, {
|
|
3061
3061
|
useAttrs: !0
|
|
3062
3062
|
});
|
|
3063
3063
|
if (l === 0)
|
|
@@ -3066,7 +3066,7 @@ class ph extends q {
|
|
|
3066
3066
|
const d = this.model.get("axesMargins");
|
|
3067
3067
|
d && d.left && (c = d.left);
|
|
3068
3068
|
const p = S.appendOrSelect(t, "svg.zoom-container").attr("width", "100%").attr("height", r).attr("opacity", 1);
|
|
3069
|
-
if (S.appendOrSelect(t, "rect.zoom-spacer").attr("x", 0).attr("y", r).attr("width", "100%").attr("height",
|
|
3069
|
+
if (S.appendOrSelect(t, "rect.zoom-spacer").attr("x", 0).attr("y", r).attr("width", "100%").attr("height", Me.spacerHeight).attr("opacity", 1).attr("fill", "none"), a === nt.GRAPH_VIEW ? S.appendOrSelect(p, "rect.zoom-bg").attr("x", c).attr("y", 0).attr("width", l - c).attr("height", "100%").classed("zoom-bg-skeleton", n).style(
|
|
3070
3070
|
"stroke",
|
|
3071
3071
|
n ? `url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})` : null
|
|
3072
3072
|
) : a === nt.SLIDER_VIEW && S.appendOrSelect(p, "rect.zoom-slider-bg").attr("x", c).attr("y", r / 2 - 1).attr("width", l - c).attr("height", 2).classed("zoom-slider-bg-skeleton", n).style(
|
|
@@ -3106,37 +3106,37 @@ class ph extends q {
|
|
|
3106
3106
|
), this.xScale.range([c, l]).domain(O), this.maxSelectionRange = this.xScale.range(), this.yScale.range([0, r - 6]).domain(Wt(E, (L) => L.value));
|
|
3107
3107
|
const A = this.model.get("zoomDomain");
|
|
3108
3108
|
if (a === nt.GRAPH_VIEW && (this.renderZoomBarArea(p, "path.zoom-graph-area-unselected", E, null), this.updateClipPath(t, this.clipId, 0, 0, 0, 0), this.renderZoomBarArea(p, "path.zoom-graph-area", E, this.clipId), this.renderZoomBarBaseline(p, c, l), i)) {
|
|
3109
|
-
const L = i.highlightStartMapsTo, I = i.highlightEndMapsTo,
|
|
3110
|
-
i.data.forEach((
|
|
3111
|
-
S.appendOrSelect(p, `rect.highlight-${C}`).attr("height", r - 2 * this.highlightStrokeWidth).attr("y", this.highlightStrokeWidth).attr("x", this.xScale(
|
|
3109
|
+
const L = i.highlightStartMapsTo, I = i.highlightEndMapsTo, N = i.color, j = i.labelMapsTo;
|
|
3110
|
+
i.data.forEach((D, C) => {
|
|
3111
|
+
S.appendOrSelect(p, `rect.highlight-${C}`).attr("height", r - 2 * this.highlightStrokeWidth).attr("y", this.highlightStrokeWidth).attr("x", this.xScale(D[L])).attr(
|
|
3112
3112
|
"width",
|
|
3113
|
-
this.xScale(
|
|
3113
|
+
this.xScale(D[I]) - this.xScale(D[L])
|
|
3114
3114
|
).style(
|
|
3115
3115
|
"fill",
|
|
3116
|
-
|
|
3116
|
+
N && N.scale[D[j]] ? N.scale[D[j]] : null
|
|
3117
3117
|
).style("fill-opacity", 0.1).style(
|
|
3118
3118
|
"stroke",
|
|
3119
|
-
|
|
3119
|
+
N && N.scale[D[j]] ? N.scale[D[j]] : null
|
|
3120
3120
|
).style("stroke-dasharray", "2, 2").attr("stroke-width", "1px");
|
|
3121
3121
|
});
|
|
3122
3122
|
}
|
|
3123
3123
|
this.addBrushEventListener(A, c, l);
|
|
3124
|
-
const
|
|
3124
|
+
const M = S.appendOrSelect(t, this.brushSelector).call(this.brush);
|
|
3125
3125
|
if (A !== void 0)
|
|
3126
3126
|
if (A[0].valueOf() === A[1].valueOf())
|
|
3127
|
-
|
|
3127
|
+
M.call(this.brush.move, this.xScale.range()), this.updateBrushHandle(this.getComponentContainer(), this.xScale.range());
|
|
3128
3128
|
else {
|
|
3129
3129
|
const L = A.map((I) => this.xScale(I));
|
|
3130
|
-
L[1] - L[0] < this.MIN_SELECTION_DIFF || (
|
|
3130
|
+
L[1] - L[0] < this.MIN_SELECTION_DIFF || (M.call(this.brush.move, L), this.updateBrushHandle(this.getComponentContainer(), L));
|
|
3131
3131
|
}
|
|
3132
|
-
s && (this.brush.filter(() => !1),
|
|
3132
|
+
s && (this.brush.filter(() => !1), M.selectAll("rect").attr("cursor", "auto"));
|
|
3133
3133
|
}
|
|
3134
3134
|
}
|
|
3135
3135
|
addBrushEventListener(e, t, n) {
|
|
3136
3136
|
const s = (r) => {
|
|
3137
3137
|
const l = r.selection;
|
|
3138
3138
|
l === null ? this.handleBrushedEvent(r, e, this.xScale, this.xScale.range()) : l[0] === l[1] || this.handleBrushedEvent(r, e, this.xScale, l);
|
|
3139
|
-
}, a = v(this.getOptions(), "zoomBar", G.TOP, "type"), i =
|
|
3139
|
+
}, a = v(this.getOptions(), "zoomBar", G.TOP, "type"), i = Me.height[a];
|
|
3140
3140
|
this.brush.extent([
|
|
3141
3141
|
[t, 0],
|
|
3142
3142
|
[n, i]
|
|
@@ -3159,7 +3159,7 @@ class ph extends q {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
}
|
|
3161
3161
|
updateBrushHandle(e, t) {
|
|
3162
|
-
const n = this, s =
|
|
3162
|
+
const n = this, s = Me.handleWidth, a = v(this.getOptions(), "zoomBar", G.TOP, "type"), i = Me.height[a], r = -s / 2, l = Me.handleBarWidth, c = a === nt.GRAPH_VIEW ? Me.handleBarHeight : 6, d = -l / 2, p = (i - c) / 2;
|
|
3163
3163
|
e.select(this.brushSelector).selectAll("rect.handle").data([{ type: "w" }, { type: "e" }]).attr("x", function(u) {
|
|
3164
3164
|
if (u.type === "w")
|
|
3165
3165
|
return Math.max(t[0] + r, n.maxSelectionRange[0]);
|
|
@@ -3190,11 +3190,11 @@ class ph extends q {
|
|
|
3190
3190
|
);
|
|
3191
3191
|
}
|
|
3192
3192
|
updateSliderSelectedArea(e) {
|
|
3193
|
-
const t = v(this.getOptions(), "zoomBar", G.TOP, "type"), n =
|
|
3193
|
+
const t = v(this.getOptions(), "zoomBar", G.TOP, "type"), n = Me.height[t], a = this.getComponentContainer().select("svg.zoom-container");
|
|
3194
3194
|
S.appendOrSelect(a, "rect.zoom-slider-selected-area").attr("x", e[0]).attr("y", n / 2 - 1).attr("width", e[1] - e[0]).attr("height", 2);
|
|
3195
3195
|
}
|
|
3196
3196
|
renderZoomBarArea(e, t, n, s) {
|
|
3197
|
-
const { cartesianScales: a } = this.services, i = a.getMainXAxisPosition(), r = a.getMainYAxisPosition(), l = a.getMainXScaleType(), c = a.getMainYScaleType(), d = (O, T, y) => (A) => a.getValueFromScale(O, T, y, A), p = d(this.xScale, l, i), h = d(this.yScale, c, r), u = v(this.getOptions(), "zoomBar", G.TOP, "type"), g =
|
|
3197
|
+
const { cartesianScales: a } = this.services, i = a.getMainXAxisPosition(), r = a.getMainYAxisPosition(), l = a.getMainXScaleType(), c = a.getMainYScaleType(), d = (O, T, y) => (A) => a.getValueFromScale(O, T, y, A), p = d(this.xScale, l, i), h = d(this.yScale, c, r), u = v(this.getOptions(), "zoomBar", G.TOP, "type"), g = Me.height[u], m = Nn().x((O) => p(O)).y0(g).y1((O) => g - h(O)), E = S.appendOrSelect(e, t).datum(n).attr("d", m);
|
|
3198
3198
|
s && E.attr("clip-path", `url(#${s})`);
|
|
3199
3199
|
}
|
|
3200
3200
|
updateClipPath(e, t, n, s, a, i) {
|
|
@@ -3222,7 +3222,7 @@ class ph extends q {
|
|
|
3222
3222
|
"zoomBar",
|
|
3223
3223
|
G.TOP,
|
|
3224
3224
|
"type"
|
|
3225
|
-
), i =
|
|
3225
|
+
), i = Me.height[a], r = Pn()([
|
|
3226
3226
|
[t, i],
|
|
3227
3227
|
[n, i]
|
|
3228
3228
|
]);
|
|
@@ -3272,8 +3272,8 @@ class gh extends q {
|
|
|
3272
3272
|
), g = p.services.cartesianScales.getScaleTypeByPosition(h);
|
|
3273
3273
|
let m = null, E = null;
|
|
3274
3274
|
h === G.LEFT || h === G.RIGHT ? (E = u, m = p.services.cartesianScales.getMainXScale()) : (m = u, E = p.services.cartesianScales.getMainYScale());
|
|
3275
|
-
const O = g === ue.LABELS, [T, y] = m.range(), [A,
|
|
3276
|
-
|
|
3275
|
+
const O = g === ue.LABELS, [T, y] = m.range(), [A, M] = E.range(), { cartesianScales: L } = p.services, I = L.getOrientation(), N = (z) => L.getDomainValue(z), j = (z) => L.getRangeValue(z), [D, C] = He(
|
|
3276
|
+
N,
|
|
3277
3277
|
j,
|
|
3278
3278
|
I
|
|
3279
3279
|
), V = x(this);
|
|
@@ -3283,13 +3283,13 @@ class gh extends q {
|
|
|
3283
3283
|
name: "threshold-line-update",
|
|
3284
3284
|
animate: e
|
|
3285
3285
|
})
|
|
3286
|
-
).attr("y1",
|
|
3286
|
+
).attr("y1", M).attr("y2", A).attr(
|
|
3287
3287
|
"x1",
|
|
3288
|
-
({ datum: z }) =>
|
|
3288
|
+
({ datum: z }) => D(z) + (O ? u.step() / 2 : 0)
|
|
3289
3289
|
).attr(
|
|
3290
3290
|
"x2",
|
|
3291
|
-
({ datum: z }) =>
|
|
3292
|
-
).style("stroke", ({ fillColor: z }) => z), V.selectAll("rect.threshold-hoverable-area").attr("x", 0).attr("y", ({ datum: z }) => -
|
|
3291
|
+
({ datum: z }) => D(z) + (O ? u.step() / 2 : 0)
|
|
3292
|
+
).style("stroke", ({ fillColor: z }) => z), V.selectAll("rect.threshold-hoverable-area").attr("x", 0).attr("y", ({ datum: z }) => -D(z)).attr("width", Math.abs(A - M)).classed("rotate", !0)) : (V.selectAll("line.threshold-line").transition().call(
|
|
3293
3293
|
(z) => p.services.transitions.setupTransition({
|
|
3294
3294
|
transition: z,
|
|
3295
3295
|
name: "threshold-line-update",
|
|
@@ -3323,7 +3323,7 @@ class gh extends q {
|
|
|
3323
3323
|
const e = x(this.services.domUtils.getHolder()), t = v(this.getOptions(), "style", "prefix");
|
|
3324
3324
|
this.label = S.appendOrSelect(
|
|
3325
3325
|
e,
|
|
3326
|
-
`div.${
|
|
3326
|
+
`div.${we}--${t}--threshold--label`
|
|
3327
3327
|
).classed("hidden", !0);
|
|
3328
3328
|
}
|
|
3329
3329
|
setThresholdLabelPosition({ event: e, datum: t }) {
|
|
@@ -3407,30 +3407,30 @@ class mh extends q {
|
|
|
3407
3407
|
c.append("rect").attr("class", "highlight-bar"), c.append("line").attr("class", "highlight-line"), c.merge(l).attr("class", "highlight-group");
|
|
3408
3408
|
const p = this;
|
|
3409
3409
|
r.each(function({ axisPosition: h }) {
|
|
3410
|
-
const u = p.services.cartesianScales.getMainXScale(), g = p.services.cartesianScales.getMainYScale(), [m, E] = u.range(), [O, T] = g.range(), { cartesianScales: y } = p.services, A = y.getOrientation(),
|
|
3411
|
-
|
|
3410
|
+
const u = p.services.cartesianScales.getMainXScale(), g = p.services.cartesianScales.getMainYScale(), [m, E] = u.range(), [O, T] = g.range(), { cartesianScales: y } = p.services, A = y.getOrientation(), M = (D) => y.getDomainValue(D), L = (D) => y.getRangeValue(D), [I, N] = He(
|
|
3411
|
+
M,
|
|
3412
3412
|
L,
|
|
3413
3413
|
A
|
|
3414
3414
|
), j = x(this);
|
|
3415
3415
|
h === G.TOP || h === G.BOTTOM ? j.selectAll("rect.highlight-bar").transition().call(
|
|
3416
|
-
(
|
|
3417
|
-
transition:
|
|
3416
|
+
(D) => p.services.transitions.setupTransition({
|
|
3417
|
+
transition: D,
|
|
3418
3418
|
name: "highlight-bar-update",
|
|
3419
3419
|
animate: e
|
|
3420
3420
|
})
|
|
3421
|
-
).attr("y", Math.max(T + p.highlightStrokeWidth, 0)).attr("height", Math.max(O - 2 * p.highlightStrokeWidth, 0)).attr("x", ({ highlightStartMapsTo:
|
|
3421
|
+
).attr("y", Math.max(T + p.highlightStrokeWidth, 0)).attr("height", Math.max(O - 2 * p.highlightStrokeWidth, 0)).attr("x", ({ highlightStartMapsTo: D, ...C }) => I(C[D])).attr(
|
|
3422
3422
|
"width",
|
|
3423
|
-
({ highlightStartMapsTo:
|
|
3424
|
-
).style("stroke", ({ color:
|
|
3425
|
-
(
|
|
3426
|
-
transition:
|
|
3423
|
+
({ highlightStartMapsTo: D, highlightEndMapsTo: C, ...V }) => Math.max(I(V[C]) - I(V[D]), 0)
|
|
3424
|
+
).style("stroke", ({ color: D, labelMapsTo: C, ...V }) => D && D.scale[V[C]] ? D.scale[V[C]] : null).style("stroke-dasharray", "2, 2").attr("stroke-width", p.highlightStrokeWidth + "px").style("fill-opacity", 0.1).style("fill", ({ color: D, labelMapsTo: C, ...V }) => D && D.scale[V[C]] ? D.scale[V[C]] : null) : j.selectAll("rect.highlight-bar").transition().call(
|
|
3425
|
+
(D) => p.services.transitions.setupTransition({
|
|
3426
|
+
transition: D,
|
|
3427
3427
|
name: "highlight-bar-update",
|
|
3428
3428
|
animate: e
|
|
3429
3429
|
})
|
|
3430
|
-
).attr("x", m).attr("width", Math.max(E - m, 0)).attr("y", ({ highlightEndMapsTo:
|
|
3430
|
+
).attr("x", m).attr("width", Math.max(E - m, 0)).attr("y", ({ highlightEndMapsTo: D, ...C }) => N(C[D])).attr(
|
|
3431
3431
|
"height",
|
|
3432
|
-
({ highlightStartMapsTo:
|
|
3433
|
-
).style("stroke", ({ color:
|
|
3432
|
+
({ highlightStartMapsTo: D, highlightEndMapsTo: C, ...V }) => Math.max(N(V[D]) - N(V[C]), 0)
|
|
3433
|
+
).style("stroke", ({ color: D, labelMapsTo: C, ...V }) => D && D.scale[V[C]] ? D.scale[V[C]] : null).style("stroke-dasharray", "2, 2").attr("stroke-width", p.highlightStrokeWidth + "px").style("fill-opacity", 0.1).style("fill", ({ color: D, labelMapsTo: C, ...V }) => D && D.scale[V[C]] ? D.scale[V[C]] : null);
|
|
3434
3434
|
});
|
|
3435
3435
|
}
|
|
3436
3436
|
}
|
|
@@ -3542,12 +3542,12 @@ class vh extends q {
|
|
|
3542
3542
|
"gradient",
|
|
3543
3543
|
"enabled"
|
|
3544
3544
|
);
|
|
3545
|
-
let l =
|
|
3546
|
-
a.alluvial.nodePadding >
|
|
3545
|
+
let l = ke.minNodePadding;
|
|
3546
|
+
a.alluvial.nodePadding > ke.minNodePadding && (l = a.alluvial.nodePadding);
|
|
3547
3547
|
const c = v(a, "alluvial", "nodeAlignment");
|
|
3548
|
-
let d =
|
|
3548
|
+
let d = wi;
|
|
3549
3549
|
c === Ce.LEFT ? d = Ci : c === Ce.RIGHT && (d = _i);
|
|
3550
|
-
const p = Ai().nodeId((y) => y.name).nodeWidth(
|
|
3550
|
+
const p = Ai().nodeId((y) => y.name).nodeWidth(ke.nodeWidth).nodePadding(l).nodeAlign(d).extent([
|
|
3551
3551
|
[2, 30],
|
|
3552
3552
|
[n - 2, s]
|
|
3553
3553
|
]);
|
|
@@ -3563,9 +3563,9 @@ class vh extends q {
|
|
|
3563
3563
|
"id",
|
|
3564
3564
|
(y, A) => this.services.domUtils.generateElementIDString(`alluvial-category-${A}`)
|
|
3565
3565
|
).style("font-size", "14px").text((y) => h[y] ? h[y] : "").attr("y", 20).attr("x", (y, A) => {
|
|
3566
|
-
const
|
|
3566
|
+
const M = this.services.domUtils.generateElementIDString(
|
|
3567
3567
|
`alluvial-category-${A}`
|
|
3568
|
-
), { width: L } = S.getSVGElementSize(x(`text#${
|
|
3568
|
+
), { width: L } = S.getSVGElementSize(x(`text#${M}`), {
|
|
3569
3569
|
useBBox: !0
|
|
3570
3570
|
});
|
|
3571
3571
|
let I = 0;
|
|
@@ -3575,12 +3575,12 @@ class vh extends q {
|
|
|
3575
3575
|
if (g.exit().remove(), r) {
|
|
3576
3576
|
const y = v(this.getOptions(), "color", "scale");
|
|
3577
3577
|
y && g.enter().append("linearGradient").attr("id", (A) => `${this.gradient_id}-link-${A.index}`).attr("gradientUnits", "userSpaceOnUse").call(
|
|
3578
|
-
(A) => A.append("stop").attr("offset", "0%").attr("stop-color", (
|
|
3578
|
+
(A) => A.append("stop").attr("offset", "0%").attr("stop-color", (M) => y[M.source.name])
|
|
3579
3579
|
).call(
|
|
3580
|
-
(A) => A.append("stop").attr("offset", "100%").attr("stop-color", (
|
|
3580
|
+
(A) => A.append("stop").attr("offset", "100%").attr("stop-color", (M) => y[M.target.name])
|
|
3581
3581
|
), g.exit().remove();
|
|
3582
3582
|
}
|
|
3583
|
-
g.enter().append("path").classed("link", !0).attr("d",
|
|
3583
|
+
g.enter().append("path").classed("link", !0).attr("d", Mi()).attr(
|
|
3584
3584
|
"id",
|
|
3585
3585
|
(y) => this.services.domUtils.generateElementIDString(`alluvial-line-${y.index}`)
|
|
3586
3586
|
).attr("class", (y) => a.alluvial.monochrome ? this.model.getColorClassName({
|
|
@@ -3591,7 +3591,11 @@ class vh extends q {
|
|
|
3591
3591
|
classNameTypes: [F.STROKE],
|
|
3592
3592
|
dataGroupName: y.source.index,
|
|
3593
3593
|
originalClassName: "link"
|
|
3594
|
-
})).style("stroke", (y) => r ? `url(#${this.gradient_id}-link-${y.index})` : this.model.getFillColor(y.source.name
|
|
3594
|
+
})).style("stroke", (y) => r ? `url(#${this.gradient_id}-link-${y.index})` : this.model.getFillColor(y.source.name, null, {
|
|
3595
|
+
...y,
|
|
3596
|
+
source: y.source.name,
|
|
3597
|
+
target: y.target.name
|
|
3598
|
+
})).attr("stroke-width", (y) => Math.max(1, y.width)).style("stroke-opacity", ke.opacity.default).attr(
|
|
3595
3599
|
"aria-label",
|
|
3596
3600
|
(y) => `${y.source.name} → ${y.target.name} (${y.value}${a.alluvial.units ? " " + a.alluvial.units : ""})`
|
|
3597
3601
|
);
|
|
@@ -3608,20 +3612,20 @@ class vh extends q {
|
|
|
3608
3612
|
"id",
|
|
3609
3613
|
(y) => this.services.domUtils.generateElementIDString(`alluvial-node-text-${y.index}`)
|
|
3610
3614
|
).attr("class", "node-text").style("font-size", "12px").attr("text-anchor", "start").attr("fill", "white").attr("x", 4).attr("dy", 13).text((y) => `${y.name} (${T(y.value, O)})`).attr("aria-label", (y) => `${y.name} (${y.value})`), E.append("rect").classed("node-text-bg", !0).attr("width", (y, A) => {
|
|
3611
|
-
const
|
|
3615
|
+
const M = this.services.domUtils.generateElementIDString(
|
|
3612
3616
|
`alluvial-node-text-${A}`
|
|
3613
|
-
), { width: L } = S.getSVGElementSize(x(`text#${
|
|
3617
|
+
), { width: L } = S.getSVGElementSize(x(`text#${M}`), {
|
|
3614
3618
|
useBBox: !0
|
|
3615
3619
|
});
|
|
3616
3620
|
return L + 8;
|
|
3617
3621
|
}).attr("height", 18).attr("stroke-width", 2).lower(), E.attr("transform", (y, A) => {
|
|
3618
|
-
const
|
|
3622
|
+
const M = this.services.domUtils.generateElementIDString(
|
|
3619
3623
|
`alluvial-node-text-${A}`
|
|
3620
|
-
), { width: L } = S.getSVGElementSize(x(`text#${
|
|
3624
|
+
), { width: L } = S.getSVGElementSize(x(`text#${M}`), {
|
|
3621
3625
|
useBBox: !0
|
|
3622
3626
|
}), I = (y.y1 - y.y0) / 2 - 9;
|
|
3623
|
-
let
|
|
3624
|
-
return y.x1 >= L ?
|
|
3627
|
+
let N = y.x1 - y.x0;
|
|
3628
|
+
return y.x1 >= L ? N = N - (L + 16) : N += 4, `translate(${N}, ${I})`;
|
|
3625
3629
|
}), this.addLineEventListener(), this.addNodeEventListener();
|
|
3626
3630
|
}
|
|
3627
3631
|
addLineEventListener() {
|
|
@@ -3632,8 +3636,8 @@ class vh extends q {
|
|
|
3632
3636
|
name: "alluvial-links-mouse-highlight"
|
|
3633
3637
|
})
|
|
3634
3638
|
);
|
|
3635
|
-
r === "mouseout" ? (x(i).lower(), l.style("stroke-opacity",
|
|
3636
|
-
return i === this ? (x(this).raise(),
|
|
3639
|
+
r === "mouseout" ? (x(i).lower(), l.style("stroke-opacity", ke.opacity.default)) : l.style("stroke-opacity", function() {
|
|
3640
|
+
return i === this ? (x(this).raise(), ke.opacity.selected) : ke.opacity.unfocus;
|
|
3637
3641
|
});
|
|
3638
3642
|
}, 33);
|
|
3639
3643
|
this.parent.selectAll("path.link").on("mouseover", function(i, r) {
|
|
@@ -3685,7 +3689,7 @@ class vh extends q {
|
|
|
3685
3689
|
addNodeEventListener() {
|
|
3686
3690
|
const e = this, t = vn((n = [], s = "mouseover") => {
|
|
3687
3691
|
if (s === "mouseout" || n.length === 0) {
|
|
3688
|
-
e.parent.selectAll("path.link").classed("link-hovered", !1).data(this.graph.links, (i) => i.index).order().style("stroke-opacity",
|
|
3692
|
+
e.parent.selectAll("path.link").classed("link-hovered", !1).data(this.graph.links, (i) => i.index).order().style("stroke-opacity", ke.opacity.default);
|
|
3689
3693
|
return;
|
|
3690
3694
|
}
|
|
3691
3695
|
e.parent.selectAll("path.link").transition().call(
|
|
@@ -3694,7 +3698,7 @@ class vh extends q {
|
|
|
3694
3698
|
name: "alluvial-link-mouse-highlight"
|
|
3695
3699
|
})
|
|
3696
3700
|
).style("stroke-opacity", function(i) {
|
|
3697
|
-
return n.some((r) => r === i.index) ? (x(this).classed("link-hovered", !0).raise(),
|
|
3701
|
+
return n.some((r) => r === i.index) ? (x(this).classed("link-hovered", !0).raise(), ke.opacity.selected) : ke.opacity.unfocus;
|
|
3698
3702
|
});
|
|
3699
3703
|
}, 66);
|
|
3700
3704
|
e.parent.selectAll(".node-group").on("mouseover", function(n, s) {
|
|
@@ -3732,7 +3736,7 @@ class vh extends q {
|
|
|
3732
3736
|
});
|
|
3733
3737
|
}).on("mouseout", function(n, s) {
|
|
3734
3738
|
const a = x(this), i = bt(a.attr("transform"));
|
|
3735
|
-
if (a.classed("node-hovered", !1).attr("transform", `translate(${i.x + 2}, ${i.y})`).select("rect.node").attr("width",
|
|
3739
|
+
if (a.classed("node-hovered", !1).attr("transform", `translate(${i.x + 2}, ${i.y})`).select("rect.node").attr("width", ke.nodeWidth), s.x0 - 2 === 0) {
|
|
3736
3740
|
const l = e.services.domUtils.generateElementIDString(
|
|
3737
3741
|
`alluvial-node-title-${s.index}`
|
|
3738
3742
|
), c = e.parent.select(`g#${l}`), d = bt(c.attr("transform"));
|
|
@@ -3888,40 +3892,40 @@ class Eh extends q {
|
|
|
3888
3892
|
render(e = !0) {
|
|
3889
3893
|
const t = this.getComponentContainer({ withinChartClip: !0 }), n = this.getOptions();
|
|
3890
3894
|
let s = [0, 0];
|
|
3891
|
-
const { cartesianScales: a } = this.services, i = a.getOrientation(), r = Nn().curve(this.services.curves.getD3Curve()).defined((
|
|
3892
|
-
const L = a.getRangeIdentifier(), I =
|
|
3895
|
+
const { cartesianScales: a } = this.services, i = a.getOrientation(), r = Nn().curve(this.services.curves.getD3Curve()).defined((M) => {
|
|
3896
|
+
const L = a.getRangeIdentifier(), I = M[L];
|
|
3893
3897
|
return I != null;
|
|
3894
3898
|
}), l = this.model.getGroupedData(this.configs.groups), c = v(n, "bounds"), d = c && l && l.length === 1;
|
|
3895
3899
|
!d && c && console.warn(
|
|
3896
3900
|
`Bounds can only be shown when having 1 single datagroup, you've supplied ${l.length}`
|
|
3897
3901
|
);
|
|
3898
3902
|
let p = 0;
|
|
3899
|
-
const h = (
|
|
3900
|
-
v(n, "axes",
|
|
3901
|
-
}, u = (
|
|
3902
|
-
i === xe.VERTICAL ? (s = a.getMainYScale().domain(), h(a.getMainYAxisPosition(), s), r.x((
|
|
3903
|
+
const h = (M, L) => {
|
|
3904
|
+
v(n, "axes", M, "includeZero") === !1 && L[0] > 0 && L[1] > 0 && (p = L[0]);
|
|
3905
|
+
}, u = (M) => d ? a.getBoundedScaledValues(M)[0] : a.getRangeValue(p), g = (M) => d ? a.getBoundedScaledValues(M)[1] : a.getRangeValue(M);
|
|
3906
|
+
i === xe.VERTICAL ? (s = a.getMainYScale().domain(), h(a.getMainYAxisPosition(), s), r.x((M) => a.getDomainValue(M)).y0((M) => u(M)).y1((M) => g(M))) : (s = a.getMainXScale().domain(), h(a.getMainXAxisPosition(), s), r.x0((M) => u(M)).x1((M) => g(M)).y((M) => a.getDomainValue(M)));
|
|
3903
3907
|
const m = v(n, "color", "gradient", "enabled"), E = l && l.length === 1 && m;
|
|
3904
3908
|
l.length > 1 && m && console.error("Gradients can only be enabled when having 1 single dataset");
|
|
3905
|
-
const O = t.selectAll("path.area").data(l, (
|
|
3909
|
+
const O = t.selectAll("path.area").data(l, (M) => M.name), T = x(this.services.domUtils.getMainContainer());
|
|
3906
3910
|
if (O.exit().attr("opacity", 0).remove(), !l.length)
|
|
3907
3911
|
return;
|
|
3908
3912
|
if (E) {
|
|
3909
|
-
const
|
|
3913
|
+
const M = T.select(
|
|
3910
3914
|
`path.${this.model.getColorClassName({
|
|
3911
3915
|
classNameTypes: [F.STROKE],
|
|
3912
3916
|
dataGroupName: l[0].name
|
|
3913
3917
|
})}`
|
|
3914
3918
|
).node();
|
|
3915
3919
|
let L;
|
|
3916
|
-
if (
|
|
3917
|
-
L = getComputedStyle(
|
|
3920
|
+
if (M)
|
|
3921
|
+
L = getComputedStyle(M, null).getPropertyValue(
|
|
3918
3922
|
"stroke"
|
|
3919
3923
|
);
|
|
3920
3924
|
else {
|
|
3921
3925
|
const I = v(this.model.getOptions(), "color", "scale");
|
|
3922
3926
|
if (I !== null) {
|
|
3923
|
-
const
|
|
3924
|
-
L = I[
|
|
3927
|
+
const N = Object.keys(I);
|
|
3928
|
+
L = I[N[0]];
|
|
3925
3929
|
}
|
|
3926
3930
|
}
|
|
3927
3931
|
ms.appendOrUpdateLinearGradient({
|
|
@@ -3942,36 +3946,36 @@ class Eh extends q {
|
|
|
3942
3946
|
const y = this, A = O.enter().append("path");
|
|
3943
3947
|
E ? A.merge(O).style(
|
|
3944
3948
|
"fill",
|
|
3945
|
-
(
|
|
3946
|
-
`${
|
|
3949
|
+
(M) => `url(#${this.services.domUtils.generateElementIDString(
|
|
3950
|
+
`${M.name.replace(" ", "")}_${this.gradient_id}`
|
|
3947
3951
|
)})`
|
|
3948
3952
|
).attr("class", "area").attr(
|
|
3949
3953
|
"class",
|
|
3950
|
-
(
|
|
3954
|
+
(M) => this.model.getColorClassName({
|
|
3951
3955
|
classNameTypes: [F.FILL],
|
|
3952
|
-
dataGroupName:
|
|
3956
|
+
dataGroupName: M.name,
|
|
3953
3957
|
originalClassName: "area"
|
|
3954
3958
|
})
|
|
3955
|
-
).attr("d", (
|
|
3956
|
-
const { data: L } =
|
|
3959
|
+
).attr("d", (M) => {
|
|
3960
|
+
const { data: L } = M;
|
|
3957
3961
|
return r(L);
|
|
3958
3962
|
}) : (A.attr("opacity", 0).merge(O).attr("class", "area").attr(
|
|
3959
3963
|
"class",
|
|
3960
|
-
(
|
|
3964
|
+
(M) => this.model.getColorClassName({
|
|
3961
3965
|
classNameTypes: [F.FILL, F.STROKE],
|
|
3962
|
-
dataGroupName:
|
|
3966
|
+
dataGroupName: M.name,
|
|
3963
3967
|
originalClassName: "area"
|
|
3964
3968
|
})
|
|
3965
|
-
).style("fill", (
|
|
3966
|
-
(
|
|
3967
|
-
transition:
|
|
3969
|
+
).style("fill", (M) => y.model.getFillColor(M.name, null, M.data)).transition().call(
|
|
3970
|
+
(M) => this.services.transitions.setupTransition({
|
|
3971
|
+
transition: M,
|
|
3968
3972
|
name: "area-update-enter",
|
|
3969
3973
|
animate: e
|
|
3970
3974
|
})
|
|
3971
|
-
).attr("opacity", d ? 1 : Be.opacity.selected).attr("d", (
|
|
3972
|
-
const { data: L } =
|
|
3975
|
+
).attr("opacity", d ? 1 : Be.opacity.selected).attr("d", (M) => {
|
|
3976
|
+
const { data: L } = M;
|
|
3973
3977
|
return r(L);
|
|
3974
|
-
}), d && A.attr("fill-opacity", Be.opacity.selected).style("stroke", (
|
|
3978
|
+
}), d && A.attr("fill-opacity", Be.opacity.selected).style("stroke", (M) => y.model.getStrokeColor(M.name, null, M.data)).style("stroke-dasharray", "2, 2").attr("stroke-width", 0.7 + "px"));
|
|
3975
3979
|
}
|
|
3976
3980
|
destroy() {
|
|
3977
3981
|
const e = this.services.events;
|
|
@@ -4038,7 +4042,7 @@ class bh extends q {
|
|
|
4038
4042
|
dataGroupName: g.name,
|
|
4039
4043
|
originalClassName: "line"
|
|
4040
4044
|
})
|
|
4041
|
-
).style("stroke", (g) => this.model.getStrokeColor(g.name)).attr("role", X.GRAPHICS_SYMBOL).attr("aria-roledescription", "line").attr("aria-label", (g) => {
|
|
4045
|
+
).style("stroke", (g) => this.model.getStrokeColor(g.name, null, g.data)).attr("role", X.GRAPHICS_SYMBOL).attr("aria-roledescription", "line").attr("aria-label", (g) => {
|
|
4042
4046
|
const { data: m } = g;
|
|
4043
4047
|
return m.map((E) => {
|
|
4044
4048
|
const O = this.services.cartesianScales.getRangeIdentifier(E);
|
|
@@ -4064,7 +4068,7 @@ const zs = 5;
|
|
|
4064
4068
|
function gl(o, e) {
|
|
4065
4069
|
return o > e - zs && o < e + zs;
|
|
4066
4070
|
}
|
|
4067
|
-
class
|
|
4071
|
+
class wa extends q {
|
|
4068
4072
|
constructor() {
|
|
4069
4073
|
super(...arguments), this.type = "ruler", this.renderType = W.SVG, this.isXGridEnabled = v(this.getOptions(), "grid", "x", "enabled"), this.isYGridEnabled = v(this.getOptions(), "grid", "y", "enabled"), this.isEventListenerAdded = !1;
|
|
4070
4074
|
}
|
|
@@ -4102,13 +4106,13 @@ class Ma extends q {
|
|
|
4102
4106
|
}, []);
|
|
4103
4107
|
if (m.length > 0) {
|
|
4104
4108
|
const E = m.map((A) => A.originalData).filter((A) => {
|
|
4105
|
-
const
|
|
4109
|
+
const M = this.services.cartesianScales.getRangeIdentifier(A), L = A[M];
|
|
4106
4110
|
return L != null;
|
|
4107
4111
|
}), O = m.map(
|
|
4108
4112
|
(A) => A.domainValue
|
|
4109
4113
|
), T = u.filter((A) => {
|
|
4110
|
-
const
|
|
4111
|
-
return O.includes(
|
|
4114
|
+
const M = this.services.cartesianScales.getDomainValue(A);
|
|
4115
|
+
return O.includes(M);
|
|
4112
4116
|
});
|
|
4113
4117
|
this.elementsToHighlight && this.elementsToHighlight.size() > 0 && !Ea(this.elementsToHighlight, T) && this.hideRuler(), T.dispatch("mouseover"), this.elementsToHighlight = T, this.services.events.dispatchEvent(f.Tooltip.SHOW, {
|
|
4114
4118
|
mousePosition: [t, n],
|
|
@@ -4448,7 +4452,7 @@ class Ca extends q {
|
|
|
4448
4452
|
g.attr("aria-hidden", !0);
|
|
4449
4453
|
return;
|
|
4450
4454
|
}
|
|
4451
|
-
const A = v(E, "scaleType"),
|
|
4455
|
+
const A = v(E, "scaleType"), M = v(n, "data", "loading"), L = v(E, "ticks", "number"), I = v(E, "ticks", "values"), N = v(E, "truncation", "type"), j = v(E, "truncation", "threshold"), D = v(E, "truncation", "numCharacter"), C = L !== null, V = v(n, "timeScale"), z = S.appendOrSelect(m, "g.tick"), w = S.appendOrSelect(z, "text").text("0"), Q = S.getSVGElementSize(w.node(), {
|
|
4452
4456
|
useBBox: !0
|
|
4453
4457
|
}).height;
|
|
4454
4458
|
z.remove();
|
|
@@ -4526,7 +4530,7 @@ class Ca extends q {
|
|
|
4526
4530
|
const qe = this.model.isDataEmpty();
|
|
4527
4531
|
if (E.title) {
|
|
4528
4532
|
const U = S.appendOrSelect(l, "text.axis-title").html(
|
|
4529
|
-
qe ||
|
|
4533
|
+
qe || M ? "" : De(E.title)
|
|
4530
4534
|
), J = v(E, "titleOrientation");
|
|
4531
4535
|
let ae;
|
|
4532
4536
|
switch (t) {
|
|
@@ -4601,16 +4605,16 @@ class Ca extends q {
|
|
|
4601
4605
|
this.getNumberOfFittingTicks(i, Q, ot.ticks.horizontalSpaceRatio)
|
|
4602
4606
|
), m.call(K), g.call(K)), l.selectAll("g.ticks g.tick text").attr("transform", "rotate(-45)").attr("text-anchor", t === G.TOP ? "start" : "end")) : l.selectAll("g.ticks g.tick text").attr("transform", null).attr("text-anchor", null);
|
|
4603
4607
|
}
|
|
4604
|
-
if (
|
|
4608
|
+
if (M ? l.attr("opacity", 0) : l.attr("opacity", 1), g.selectAll("g.tick").attr("aria-label", (U) => U), m.selectAll("g.tick").attr("aria-label", (U) => U), N !== lt.NONE && A === ue.LABELS && !I) {
|
|
4605
4609
|
const U = this.services.cartesianScales.getScaleDomain(t);
|
|
4606
4610
|
if (U.length > 0) {
|
|
4607
4611
|
const J = a.select(`g.axis.${t} g.ticks g.tick`).html();
|
|
4608
4612
|
l.selectAll("g.ticks g.tick").html(J);
|
|
4609
4613
|
const ae = this;
|
|
4610
4614
|
l.selectAll("g.tick text").data(U).text(function(re) {
|
|
4611
|
-
return re.length > j ? (ae.truncation[t] = !0, Ot(re,
|
|
4615
|
+
return re.length > j ? (ae.truncation[t] = !0, Ot(re, N, D)) : re;
|
|
4612
4616
|
}), this.getInvisibleAxisRef().selectAll("g.tick text").data(U).text(function(re) {
|
|
4613
|
-
return re.length > j ? Ot(re,
|
|
4617
|
+
return re.length > j ? Ot(re, N, D) : re;
|
|
4614
4618
|
}), l.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()), l.selectAll("g.tick text").data(U);
|
|
4615
4619
|
}
|
|
4616
4620
|
}
|
|
@@ -4837,13 +4841,13 @@ class fl extends q {
|
|
|
4837
4841
|
t ? this.renderSkeleton(t) : this.removeSkeleton();
|
|
4838
4842
|
}
|
|
4839
4843
|
renderSkeleton(e) {
|
|
4840
|
-
if (this.configs.skeleton ===
|
|
4844
|
+
if (this.configs.skeleton === wt.GRID)
|
|
4841
4845
|
this.renderGridSkeleton(e);
|
|
4842
|
-
else if (this.configs.skeleton ===
|
|
4846
|
+
else if (this.configs.skeleton === wt.VERT_OR_HORIZ)
|
|
4843
4847
|
this.renderVertOrHorizSkeleton(e);
|
|
4844
|
-
else if (this.configs.skeleton ===
|
|
4848
|
+
else if (this.configs.skeleton === wt.PIE)
|
|
4845
4849
|
this.renderPieSkeleton(e);
|
|
4846
|
-
else if (this.configs.skeleton ===
|
|
4850
|
+
else if (this.configs.skeleton === wt.DONUT)
|
|
4847
4851
|
this.renderDonutSkeleton(e);
|
|
4848
4852
|
else
|
|
4849
4853
|
throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`);
|
|
@@ -4948,9 +4952,9 @@ class Oh extends q {
|
|
|
4948
4952
|
(C) => this.services.cartesianScales.getDomainValue(C),
|
|
4949
4953
|
(C) => this.services.cartesianScales.getRangeValue(C),
|
|
4950
4954
|
m
|
|
4951
|
-
), y = Math.floor((E ? h : u) / a.length), A = Math.min(y / 2, 16),
|
|
4955
|
+
), y = Math.floor((E ? h : u) / a.length), A = Math.min(y / 2, 16), M = this.model.getBoxplotData(), L = t.selectAll(".box-group").data(M);
|
|
4952
4956
|
L.exit().remove();
|
|
4953
|
-
const I = L.enter().append("g").attr("class", "box-group"),
|
|
4957
|
+
const I = L.enter().append("g").attr("class", "box-group"), N = L.merge(I);
|
|
4954
4958
|
I.append("path").merge(L.select("path.vertical-line.start")).attr(
|
|
4955
4959
|
"class",
|
|
4956
4960
|
() => this.model.getColorClassName({
|
|
@@ -4964,8 +4968,8 @@ class Oh extends q {
|
|
|
4964
4968
|
animate: e
|
|
4965
4969
|
})
|
|
4966
4970
|
).attr("d", (C) => {
|
|
4967
|
-
const V = g.getDomainValue(C[s]), z = V,
|
|
4968
|
-
return ye({ x0: V, x1: z, y0:
|
|
4971
|
+
const V = g.getDomainValue(C[s]), z = V, w = g.getRangeValue(C.whiskers.min), Q = g.getRangeValue(C.quartiles.q_25);
|
|
4972
|
+
return ye({ x0: V, x1: z, y0: w, y1: Q }, m);
|
|
4969
4973
|
}), I.append("path").merge(L.select("path.vertical-line.end")).attr(
|
|
4970
4974
|
"class",
|
|
4971
4975
|
() => this.model.getColorClassName({
|
|
@@ -4979,8 +4983,8 @@ class Oh extends q {
|
|
|
4979
4983
|
animate: e
|
|
4980
4984
|
})
|
|
4981
4985
|
).attr("d", (C) => {
|
|
4982
|
-
const V = g.getDomainValue(C[s]), z = V,
|
|
4983
|
-
return ye({ x0: V, x1: z, y0:
|
|
4986
|
+
const V = g.getDomainValue(C[s]), z = V, w = g.getRangeValue(C.whiskers.max), Q = g.getRangeValue(C.quartiles.q_75);
|
|
4987
|
+
return ye({ x0: V, x1: z, y0: w, y1: Q }, m);
|
|
4984
4988
|
}), I.append("path").merge(L.select("path.box")).attr(
|
|
4985
4989
|
"class",
|
|
4986
4990
|
() => this.model.getColorClassName({
|
|
@@ -4994,15 +4998,15 @@ class Oh extends q {
|
|
|
4994
4998
|
animate: e
|
|
4995
4999
|
})
|
|
4996
5000
|
).attr("d", (C) => {
|
|
4997
|
-
const V = g.getDomainValue(C[s]) - A / 2, z = V + A,
|
|
5001
|
+
const V = g.getDomainValue(C[s]) - A / 2, z = V + A, w = g.getRangeValue(
|
|
4998
5002
|
Math[E ? "max" : "min"](C.quartiles.q_75, C.quartiles.q_25)
|
|
4999
|
-
), Q =
|
|
5003
|
+
), Q = w + Math.abs(
|
|
5000
5004
|
g.getRangeValue(C.quartiles.q_75) - g.getRangeValue(C.quartiles.q_25)
|
|
5001
5005
|
);
|
|
5002
|
-
return ye({ x0: V, x1: z, y0:
|
|
5006
|
+
return ye({ x0: V, x1: z, y0: w, y1: Q }, m);
|
|
5003
5007
|
}), I.append("path").merge(L.select("path.highlight-area")).attr("class", "highlight-area").attr("opacity", 0).attr("d", (C) => {
|
|
5004
|
-
const V = g.getDomainValue(C[s]) - A / 2, z = V + A,
|
|
5005
|
-
return ye({ x0: V, x1: z, y0:
|
|
5008
|
+
const V = g.getDomainValue(C[s]) - A / 2, z = V + A, w = g.getRangeValue(C.whiskers.min), Q = g.getRangeValue(C.whiskers.max);
|
|
5009
|
+
return ye({ x0: V, x1: z, y0: w, y1: Q }, m);
|
|
5006
5010
|
}), I.append("path").merge(L.select("path.whisker.start")).attr(
|
|
5007
5011
|
"class",
|
|
5008
5012
|
() => this.model.getColorClassName({
|
|
@@ -5016,8 +5020,8 @@ class Oh extends q {
|
|
|
5016
5020
|
animate: e
|
|
5017
5021
|
})
|
|
5018
5022
|
).attr("d", (C) => {
|
|
5019
|
-
const V = g.getDomainValue(C[s]) - A / 4, z = V + A / 2,
|
|
5020
|
-
return ye({ x0: V, x1: z, y0:
|
|
5023
|
+
const V = g.getDomainValue(C[s]) - A / 4, z = V + A / 2, w = g.getRangeValue(C.whiskers.min), Q = g.getRangeValue(C.whiskers.min);
|
|
5024
|
+
return ye({ x0: V, x1: z, y0: w, y1: Q }, m);
|
|
5021
5025
|
}), I.append("path").merge(L.select("path.median")).attr("fill", "none").attr(
|
|
5022
5026
|
"class",
|
|
5023
5027
|
() => this.model.getColorClassName({
|
|
@@ -5031,8 +5035,8 @@ class Oh extends q {
|
|
|
5031
5035
|
animate: e
|
|
5032
5036
|
})
|
|
5033
5037
|
).attr("d", (C) => {
|
|
5034
|
-
const V = g.getDomainValue(C[s]) - A / 2, z = V + A,
|
|
5035
|
-
return ye({ x0: V, x1: z, y0:
|
|
5038
|
+
const V = g.getDomainValue(C[s]) - A / 2, z = V + A, w = g.getRangeValue(C.quartiles.q_50);
|
|
5039
|
+
return ye({ x0: V, x1: z, y0: w, y1: w }, m);
|
|
5036
5040
|
}), I.append("path").merge(L.select("path.whisker.end")).attr(
|
|
5037
5041
|
"class",
|
|
5038
5042
|
() => this.model.getColorClassName({
|
|
@@ -5046,10 +5050,10 @@ class Oh extends q {
|
|
|
5046
5050
|
animate: e
|
|
5047
5051
|
})
|
|
5048
5052
|
).attr("d", (C) => {
|
|
5049
|
-
const V = g.getDomainValue(C[s]) - A / 4, z = V + A / 2,
|
|
5050
|
-
return ye({ x0: V, x1: z, y0:
|
|
5053
|
+
const V = g.getDomainValue(C[s]) - A / 4, z = V + A / 2, w = g.getRangeValue(C.whiskers.max), Q = g.getRangeValue(C.whiskers.max);
|
|
5054
|
+
return ye({ x0: V, x1: z, y0: w, y1: Q }, m);
|
|
5051
5055
|
});
|
|
5052
|
-
const j =
|
|
5056
|
+
const j = N.selectAll("circle.outlier").data(
|
|
5053
5057
|
(C) => C.outliers.map((V) => ({
|
|
5054
5058
|
min: C.whiskers.min,
|
|
5055
5059
|
max: C.whiskers.max,
|
|
@@ -5058,8 +5062,8 @@ class Oh extends q {
|
|
|
5058
5062
|
}))
|
|
5059
5063
|
);
|
|
5060
5064
|
j.exit().remove();
|
|
5061
|
-
const
|
|
5062
|
-
j.merge(
|
|
5065
|
+
const D = j.enter().append("circle");
|
|
5066
|
+
j.merge(D).attr("r", Ae.circle.radius).attr(
|
|
5063
5067
|
"class",
|
|
5064
5068
|
() => this.model.getColorClassName({
|
|
5065
5069
|
classNameTypes: [F.FILL, F.STROKE],
|
|
@@ -5323,9 +5327,9 @@ class Lh extends q {
|
|
|
5323
5327
|
animate: e
|
|
5324
5328
|
})
|
|
5325
5329
|
).attr("d", (T) => {
|
|
5326
|
-
let A,
|
|
5327
|
-
return T.order === 1 ? (A = this.services.cartesianScales.getDomainValue(T.datum) - 16 / 2,
|
|
5328
|
-
{ x0: A, x1:
|
|
5330
|
+
let A, M, L, I;
|
|
5331
|
+
return T.order === 1 ? (A = this.services.cartesianScales.getDomainValue(T.datum) - 16 / 2, M = A + 16, L = c - 2, I = l + 1) : (A = this.services.cartesianScales.getDomainValue(T.datum) - 16 / 2, M = A + 16, L = this.services.cartesianScales.getRangeValue(T.value), I = c), ye(
|
|
5332
|
+
{ x0: A, x1: M, y0: L, y1: I },
|
|
5329
5333
|
this.services.cartesianScales.getOrientation()
|
|
5330
5334
|
);
|
|
5331
5335
|
}).attr("opacity", 1);
|
|
@@ -5344,10 +5348,13 @@ class Lh extends q {
|
|
|
5344
5348
|
dataGroupName: O[n],
|
|
5345
5349
|
originalClassName: "bar"
|
|
5346
5350
|
})
|
|
5347
|
-
).style("fill", (O) =>
|
|
5348
|
-
const
|
|
5351
|
+
).style("fill", (O) => {
|
|
5352
|
+
const T = this.services.cartesianScales.getDomainIdentifier(O);
|
|
5353
|
+
return this.model.getFillColor(O[n], O[T], O);
|
|
5354
|
+
}).attr("d", (O) => {
|
|
5355
|
+
const y = this.services.cartesianScales.getDomainValue(O) - 4, A = y + 8, M = this.services.cartesianScales.getRangeValue(0) + 1, L = this.services.cartesianScales.getRangeValue(O);
|
|
5349
5356
|
return ye(
|
|
5350
|
-
{ x0: y, x1: A, y0:
|
|
5357
|
+
{ x0: y, x1: A, y0: M, y1: L },
|
|
5351
5358
|
this.services.cartesianScales.getOrientation()
|
|
5352
5359
|
);
|
|
5353
5360
|
}).attr("opacity", 1).attr("role", X.GRAPHICS_SYMBOL).attr("aria-roledescription", "bar").attr("aria-label", (O) => O.value);
|
|
@@ -5363,9 +5370,9 @@ class Lh extends q {
|
|
|
5363
5370
|
animate: e
|
|
5364
5371
|
})
|
|
5365
5372
|
).attr("d", (O) => {
|
|
5366
|
-
const y = this.services.cartesianScales.getDomainValue(O) - 12, A = y + 24,
|
|
5373
|
+
const y = this.services.cartesianScales.getDomainValue(O) - 12, A = y + 24, M = this.services.cartesianScales.getRangeValue(O.marker);
|
|
5367
5374
|
return ye(
|
|
5368
|
-
{ x0: y, x1: A, y0:
|
|
5375
|
+
{ x0: y, x1: A, y0: M, y1: M },
|
|
5369
5376
|
this.services.cartesianScales.getOrientation()
|
|
5370
5377
|
);
|
|
5371
5378
|
}).attr("opacity", 1);
|
|
@@ -5389,9 +5396,9 @@ class Lh extends q {
|
|
|
5389
5396
|
).attr("d", ({ datum: T, value: y }) => {
|
|
5390
5397
|
let A = 4;
|
|
5391
5398
|
T.ranges && T.ranges.indexOf(y) !== -1 && (A = 8);
|
|
5392
|
-
const
|
|
5399
|
+
const M = this.services.cartesianScales.getDomainValue(T) - A / 2, L = M + A, I = this.services.cartesianScales.getRangeValue(y);
|
|
5393
5400
|
return ye(
|
|
5394
|
-
{ x0:
|
|
5401
|
+
{ x0: M, x1: L, y0: I, y1: I },
|
|
5395
5402
|
this.services.cartesianScales.getOrientation()
|
|
5396
5403
|
);
|
|
5397
5404
|
}).attr("opacity", 1);
|
|
@@ -5660,7 +5667,7 @@ function Tl(o, e) {
|
|
|
5660
5667
|
})
|
|
5661
5668
|
};
|
|
5662
5669
|
}
|
|
5663
|
-
class Ah extends
|
|
5670
|
+
class Ah extends wa {
|
|
5664
5671
|
constructor() {
|
|
5665
5672
|
super(...arguments), this.type = "ruler-binned", this.renderType = W.SVG;
|
|
5666
5673
|
}
|
|
@@ -5676,7 +5683,7 @@ class Ah extends Ma {
|
|
|
5676
5683
|
});
|
|
5677
5684
|
if (E.size() > 0) {
|
|
5678
5685
|
this.elementsToHighlight && this.elementsToHighlight.size() > 0 && !Ea(this.elementsToHighlight, E) && this.hideRuler(), E.dispatch("mouseover"), this.elementsToHighlight = E;
|
|
5679
|
-
const O = x(E.nodes()[0]).datum(), T = parseFloat(ne(O, "data.x0")), y = parseFloat(ne(O, "data.x1")), A = this.model.getActiveDataGroupNames(),
|
|
5686
|
+
const O = x(E.nodes()[0]).datum(), T = parseFloat(ne(O, "data.x0")), y = parseFloat(ne(O, "data.x1")), A = this.model.getActiveDataGroupNames(), M = A.reverse().map((I) => ({
|
|
5680
5687
|
label: I,
|
|
5681
5688
|
value: ne(O, `data.${I}`),
|
|
5682
5689
|
class: this.model.getColorClassName({
|
|
@@ -5684,7 +5691,7 @@ class Ah extends Ma {
|
|
|
5684
5691
|
dataGroupName: I
|
|
5685
5692
|
})
|
|
5686
5693
|
})).filter((I) => I.value !== 0);
|
|
5687
|
-
if (
|
|
5694
|
+
if (M.length > 0) {
|
|
5688
5695
|
this.services.events.dispatchEvent(f.Tooltip.SHOW, {
|
|
5689
5696
|
mousePosition: [t, n],
|
|
5690
5697
|
hoveredElement: g,
|
|
@@ -5693,12 +5700,12 @@ class Ah extends Ma {
|
|
|
5693
5700
|
label: ne(a, "bins.rangeLabel") || "Range",
|
|
5694
5701
|
value: `${T} – ${y}`
|
|
5695
5702
|
},
|
|
5696
|
-
...
|
|
5703
|
+
...M,
|
|
5697
5704
|
...v(a, "tooltip", "showTotal") === !0 ? [
|
|
5698
5705
|
{
|
|
5699
5706
|
label: ne(a, "locale.translations.total") || ne(a, "tooltip.totalLabel") || "Total",
|
|
5700
5707
|
value: A.reduce(
|
|
5701
|
-
(
|
|
5708
|
+
(N, j) => N + parseFloat(ne(O, `data.${j}`)),
|
|
5702
5709
|
0
|
|
5703
5710
|
)
|
|
5704
5711
|
}
|
|
@@ -5713,12 +5720,12 @@ class Ah extends Ma {
|
|
|
5713
5720
|
this.hideRuler();
|
|
5714
5721
|
}
|
|
5715
5722
|
}
|
|
5716
|
-
class
|
|
5723
|
+
class Mh extends wa {
|
|
5717
5724
|
formatTooltipData(e) {
|
|
5718
5725
|
return e.reverse();
|
|
5719
5726
|
}
|
|
5720
5727
|
}
|
|
5721
|
-
const
|
|
5728
|
+
const wh = (o, e) => {
|
|
5722
5729
|
const t = o.x, n = o.y, s = e.x, a = e.y, i = Gn();
|
|
5723
5730
|
return i.moveTo(t, n), i.lineTo(s, a), i.toString();
|
|
5724
5731
|
}, Ch = (o, e, t = 0.5) => {
|
|
@@ -5732,12 +5739,12 @@ const Mh = (o, e) => {
|
|
|
5732
5739
|
height: 8,
|
|
5733
5740
|
width: 7.5,
|
|
5734
5741
|
id: "arrowLeft"
|
|
5735
|
-
},
|
|
5742
|
+
}, kh = {
|
|
5736
5743
|
d: "M0 0v8l7-4z",
|
|
5737
5744
|
height: 8,
|
|
5738
5745
|
width: 7.5,
|
|
5739
5746
|
id: "arrowRight"
|
|
5740
|
-
},
|
|
5747
|
+
}, Rh = {
|
|
5741
5748
|
d: "M5.32 9.513a4.75 4.75 0 100-9.5 4.75 4.75 0 000 9.5z",
|
|
5742
5749
|
height: 10,
|
|
5743
5750
|
width: 10,
|
|
@@ -5795,8 +5802,8 @@ class Vh extends hl {
|
|
|
5795
5802
|
}
|
|
5796
5803
|
const d = !Js(a), p = qa(this.model.getDisplayData()), h = !(s <= de.color.barWidth), u = h ? de.color.barWidth : s, g = S.appendOrSelect(n, "g.legend"), m = S.appendOrSelect(g, "g.legend-axis");
|
|
5797
5804
|
if (l) {
|
|
5798
|
-
const
|
|
5799
|
-
S.appendOrSelect(
|
|
5805
|
+
const D = S.appendOrSelect(n, "g.legend-title");
|
|
5806
|
+
S.appendOrSelect(D, "text").text(l).attr("dy", "0.7em"), g.attr("transform", "translate(0, 16)");
|
|
5800
5807
|
}
|
|
5801
5808
|
const E = p[0] < 0 && p[1] > 0 ? "diverge" : "mono";
|
|
5802
5809
|
(r < 1 && r > 4 && E === "mono" || r < 1 && r > 2 && E === "diverge") && (r = 1);
|
|
@@ -5805,12 +5812,12 @@ class Vh extends hl {
|
|
|
5805
5812
|
if (d)
|
|
5806
5813
|
O = a;
|
|
5807
5814
|
else
|
|
5808
|
-
for (let
|
|
5815
|
+
for (let D = 1; D < T + 1; D++)
|
|
5809
5816
|
O.push(
|
|
5810
|
-
i === nn.LINEAR ? `stop-color-${E}-${r}-${
|
|
5817
|
+
i === nn.LINEAR ? `stop-color-${E}-${r}-${D}` : `fill-${E}-${r}-${D}`
|
|
5811
5818
|
);
|
|
5812
|
-
const y = ta(p[0], p[1]), A = ni(y, 3),
|
|
5813
|
-
L.tickFormat((
|
|
5819
|
+
const y = ta(p[0], p[1]), A = ni(y, 3), M = Ze().domain(p).range([0, u]), L = Vn(M).tickSize(0).tickValues(A), { code: I, number: N } = v(t, "locale");
|
|
5820
|
+
L.tickFormat((D) => N(D, I));
|
|
5814
5821
|
let j;
|
|
5815
5822
|
switch (i) {
|
|
5816
5823
|
case nn.LINEAR:
|
|
@@ -5823,7 +5830,7 @@ class Vh extends hl {
|
|
|
5823
5830
|
d,
|
|
5824
5831
|
g,
|
|
5825
5832
|
u
|
|
5826
|
-
),
|
|
5833
|
+
), M.range([j, u]);
|
|
5827
5834
|
break;
|
|
5828
5835
|
default:
|
|
5829
5836
|
throw Error("Entered color legend type is not supported.");
|
|
@@ -6022,17 +6029,17 @@ class Bh extends q {
|
|
|
6022
6029
|
dataGroupName: m.data.dataGroupName,
|
|
6023
6030
|
originalClassName: m.children ? `node ${E}` : `node node-leaf ${E}`
|
|
6024
6031
|
});
|
|
6025
|
-
}).style("fill", (m) => this.model.getFillColor(m.data.dataGroupName)).style("stroke", (m) => this.model.getFillColor(m.data.dataGroupName)).attr("cx", (m) => m.x).attr("cy", (m) => m.y).transition("circlepack-leaf-update-enter").call(
|
|
6032
|
+
}).style("fill", (m) => this.model.getFillColor(m.data.dataGroupName, null, m.data)).style("stroke", (m) => this.model.getFillColor(m.data.dataGroupName, null, m.data)).attr("cx", (m) => m.x).attr("cy", (m) => m.y).transition("circlepack-leaf-update-enter").call(
|
|
6026
6033
|
(m) => this.services.transitions.setupTransition({
|
|
6027
6034
|
transition: m,
|
|
6028
6035
|
name: "circlepack-leaf-update-enter"
|
|
6029
6036
|
})
|
|
6030
|
-
).attr("r", (m) => m.r).attr("opacity", 1).attr("fill-opacity", ft.circles.fillOpacity), c === !0 && this.focal && (this.services.canvasZoom.zoomIn(this.focal, g,
|
|
6037
|
+
).attr("r", (m) => m.r).attr("opacity", 1).attr("fill-opacity", ft.circles.fillOpacity), c === !0 && this.focal && (this.services.canvasZoom.zoomIn(this.focal, g, Mt), this.setBackgroundListeners()), i || this.addLegendListeners(), this.addEventListeners();
|
|
6031
6038
|
}
|
|
6032
6039
|
// turn off the highlight class on children circles
|
|
6033
6040
|
unhighlightChildren(e) {
|
|
6034
6041
|
const t = e.map((n) => n.data);
|
|
6035
|
-
this.parent.selectAll("circle.node").filter((n) => t.some((s) => s === n.data) && n.depth > 1).style("stroke", (n) => this.model.getFillColor(n.data.dataGroupName));
|
|
6042
|
+
this.parent.selectAll("circle.node").filter((n) => t.some((s) => s === n.data) && n.depth > 1).style("stroke", (n) => this.model.getFillColor(n.data.dataGroupName, null, n.data));
|
|
6036
6043
|
}
|
|
6037
6044
|
// highlight the children circles with a stroke
|
|
6038
6045
|
highlightChildren(e) {
|
|
@@ -6052,7 +6059,7 @@ class Bh extends q {
|
|
|
6052
6059
|
setBackgroundListeners() {
|
|
6053
6060
|
const e = x(this.services.domUtils.getMainContainer()), t = this, n = this.parent.selectAll("circle.node");
|
|
6054
6061
|
e.on("click", () => {
|
|
6055
|
-
t.focal = null, t.model.updateHierarchyLevel(2), e.classed("zoomed-in", !1), t.services.canvasZoom.zoomOut(n,
|
|
6062
|
+
t.focal = null, t.model.updateHierarchyLevel(2), e.classed("zoomed-in", !1), t.services.canvasZoom.zoomOut(n, Mt);
|
|
6056
6063
|
});
|
|
6057
6064
|
}
|
|
6058
6065
|
// Zoom icon to be appended to the label in the tooltip
|
|
@@ -6138,10 +6145,10 @@ class Bh extends q {
|
|
|
6138
6145
|
const s = x(this), a = s.classed("non-focal"), i = v(e.model.getOptions(), "canvasZoom", "enabled");
|
|
6139
6146
|
if (i && e.model.getHierarchyLevel() > 2) {
|
|
6140
6147
|
const r = e.parent.selectAll("circle.node");
|
|
6141
|
-
x(e.services.domUtils.getMainContainer()).classed("zoomed-in", !1), e.focal = null, e.model.updateHierarchyLevel(2), e.services.canvasZoom.zoomOut(r,
|
|
6148
|
+
x(e.services.domUtils.getMainContainer()).classed("zoomed-in", !1), e.focal = null, e.model.updateHierarchyLevel(2), e.services.canvasZoom.zoomOut(r, Mt);
|
|
6142
6149
|
} else if (n.depth === 2 && n.children && !a && i) {
|
|
6143
6150
|
const r = e.parent.selectAll("circle.node");
|
|
6144
|
-
x(e.services.domUtils.getMainContainer()).classed("zoomed-in", !0), e.focal = n, e.model.updateHierarchyLevel(3), e.services.canvasZoom.zoomIn(n, r,
|
|
6151
|
+
x(e.services.domUtils.getMainContainer()).classed("zoomed-in", !0), e.focal = n, e.model.updateHierarchyLevel(3), e.services.canvasZoom.zoomIn(n, r, Mt), t.stopPropagation();
|
|
6145
6152
|
}
|
|
6146
6153
|
e.services.events.dispatchEvent(f.CirclePack.CIRCLE_CLICK, {
|
|
6147
6154
|
event: t,
|
|
@@ -6190,58 +6197,58 @@ class Al extends q {
|
|
|
6190
6197
|
return te.innerRadius;
|
|
6191
6198
|
}
|
|
6192
6199
|
render(e = !0) {
|
|
6193
|
-
const t = this, n = this.getComponentContainer(), s = this.getOptions(), { groupMapsTo: a } = s.data, { valueMapsTo: i } = s.pie, r = this.model.getDisplayData().filter((
|
|
6200
|
+
const t = this, n = this.getComponentContainer(), s = this.getOptions(), { groupMapsTo: a } = s.data, { valueMapsTo: i } = s.pie, r = this.model.getDisplayData().filter((w) => w[i] > 0), l = this.computeRadius();
|
|
6194
6201
|
this.arc = xt().innerRadius(this.getInnerRadius()).outerRadius(l), this.hoverArc = xt().innerRadius(this.getInnerRadius()).outerRadius(l + te.hoverArc.outerRadiusOffset);
|
|
6195
|
-
const d = ai().value((
|
|
6202
|
+
const d = ai().value((w) => w[i]).sort(v(s, "pie", "sortFunction")).padAngle(te.padAngle)(r), h = S.appendOrSelect(n, "g.slices").attr("role", X.GROUP).attr("data-name", "slices").selectAll("path.slice").data(d, (w) => w.data[a]);
|
|
6196
6203
|
h.exit().attr("opacity", 0).remove(), h.enter().append("path").classed("slice", !0).attr("opacity", 0).merge(h).attr(
|
|
6197
6204
|
"class",
|
|
6198
|
-
(
|
|
6205
|
+
(w) => this.model.getColorClassName({
|
|
6199
6206
|
classNameTypes: [F.FILL],
|
|
6200
|
-
dataGroupName:
|
|
6207
|
+
dataGroupName: w.data[a],
|
|
6201
6208
|
originalClassName: "slice"
|
|
6202
6209
|
})
|
|
6203
|
-
).style("fill", (
|
|
6204
|
-
(
|
|
6205
|
-
transition:
|
|
6210
|
+
).style("fill", (w) => t.model.getFillColor(w.data[a], null, w.data)).attr("d", this.arc).transition().call(
|
|
6211
|
+
(w) => this.services.transitions.setupTransition({
|
|
6212
|
+
transition: w,
|
|
6206
6213
|
name: "pie_slice_enter_update",
|
|
6207
6214
|
animate: e
|
|
6208
6215
|
})
|
|
6209
6216
|
).attr("opacity", 1).attr("role", X.GRAPHICS_SYMBOL).attr("aria-roledescription", "slice").attr(
|
|
6210
6217
|
"aria-label",
|
|
6211
|
-
(
|
|
6212
|
-
).attrTween("d", function(
|
|
6213
|
-
return Ll.bind(this)(
|
|
6218
|
+
(w) => `${w[i]}, ${Qt(w.data[i], r, i) + "%"}`
|
|
6219
|
+
).attrTween("d", function(w) {
|
|
6220
|
+
return Ll.bind(this)(w, t.arc);
|
|
6214
6221
|
});
|
|
6215
|
-
const { code: m, number: E } = v(s, "locale"), O = s.pie.labels.enabled, T = O ? d.filter((
|
|
6222
|
+
const { code: m, number: E } = v(s, "locale"), O = s.pie.labels.enabled, T = O ? d.filter((w) => w.data[i] > 0) : [], A = S.appendOrSelect(n, "g.labels").attr("role", X.GROUP).attr("data-name", "labels").selectAll("text.pie-label").data(T, (w) => w.data[a]);
|
|
6216
6223
|
A.exit().attr("opacity", 0).remove();
|
|
6217
|
-
const
|
|
6218
|
-
|
|
6219
|
-
...
|
|
6224
|
+
const M = A.enter().append("text").classed("pie-label", !0), L = [];
|
|
6225
|
+
M.merge(A).style("text-anchor", "middle").text((w) => s.pie.labels.formatter ? s.pie.labels.formatter({
|
|
6226
|
+
...w,
|
|
6220
6227
|
percentageValue: Qt(
|
|
6221
|
-
|
|
6228
|
+
w.data[i],
|
|
6222
6229
|
r,
|
|
6223
6230
|
i,
|
|
6224
6231
|
!0
|
|
6225
6232
|
)
|
|
6226
6233
|
}) : E(
|
|
6227
|
-
Qt(
|
|
6234
|
+
Qt(w.data[i], r, i),
|
|
6228
6235
|
m
|
|
6229
|
-
) + "%").datum(function(
|
|
6230
|
-
const Q = l + 7, me = (
|
|
6231
|
-
return
|
|
6232
|
-
}).attr("transform", function(
|
|
6233
|
-
const me = T.length, K = (
|
|
6236
|
+
) + "%").datum(function(w) {
|
|
6237
|
+
const Q = l + 7, me = (w.endAngle - w.startAngle) / 2 + w.startAngle, K = me / Math.PI * 180, H = this.getComputedTextLength();
|
|
6238
|
+
return w.textOffsetX = H / 2, w.textOffsetY = K > 90 && K < 270 ? 10 : 0, w.xPosition = (w.textOffsetX + Q) * Math.sin(me), w.yPosition = (w.textOffsetY + Q) * -Math.cos(me), w;
|
|
6239
|
+
}).attr("transform", function(w, Q) {
|
|
6240
|
+
const me = T.length, K = (w.endAngle - w.startAngle) * (180 / Math.PI);
|
|
6234
6241
|
if (Q >= me - 2 && K < te.callout.minSliceDegree) {
|
|
6235
6242
|
let H, Z;
|
|
6236
|
-
return
|
|
6243
|
+
return w.index === me - 1 ? (H = w.xPosition + te.callout.offsetX + te.callout.textMargin + w.textOffsetX, Z = w.yPosition - te.callout.offsetY, w.direction = an.RIGHT, L.push(w)) : (H = w.xPosition - te.callout.offsetX - w.textOffsetX - te.callout.textMargin, Z = w.yPosition - te.callout.offsetY, w.direction = an.LEFT, L.push(w)), `translate(${H}, ${Z})`;
|
|
6237
6244
|
}
|
|
6238
|
-
return `translate(${
|
|
6245
|
+
return `translate(${w.xPosition}, ${w.yPosition})`;
|
|
6239
6246
|
}), this.renderCallouts(L);
|
|
6240
|
-
const I = v(s, "donut") ? "donut" : "pie",
|
|
6247
|
+
const I = v(s, "donut") ? "donut" : "pie", N = v(s, I, "alignment"), { width: j } = S.getSVGElementSize(this.getParent(), {
|
|
6241
6248
|
useAttrs: !0
|
|
6242
|
-
}),
|
|
6243
|
-
let V = l +
|
|
6244
|
-
|
|
6249
|
+
}), D = O ? te.xOffset : 0, C = O ? te.yOffset : 0;
|
|
6250
|
+
let V = l + D;
|
|
6251
|
+
N === Ce.CENTER ? V = j / 2 : N === Ce.RIGHT && (V = j - l - te.xOffset);
|
|
6245
6252
|
let z = l + C;
|
|
6246
6253
|
L.length > 0 && (z += te.yOffsetCallout), n.attr("x", V + 7).attr("y", z), this.addEventListeners();
|
|
6247
6254
|
}
|
|
@@ -6368,8 +6375,13 @@ class Hh extends Al {
|
|
|
6368
6375
|
s % 1 === 0 && n % 1 === 0 ? a = ri : a = ta;
|
|
6369
6376
|
const i = a(s, n);
|
|
6370
6377
|
return (r) => {
|
|
6371
|
-
const {
|
|
6372
|
-
|
|
6378
|
+
const { numberFormatter: l } = t.donut.center;
|
|
6379
|
+
if (l)
|
|
6380
|
+
e.text(l(i(r)));
|
|
6381
|
+
else {
|
|
6382
|
+
const { code: c, number: d } = v(t, "locale");
|
|
6383
|
+
e.text(d(Math.floor(i(r)), c));
|
|
6384
|
+
}
|
|
6373
6385
|
};
|
|
6374
6386
|
}
|
|
6375
6387
|
}
|
|
@@ -6448,10 +6460,10 @@ class $h extends q {
|
|
|
6448
6460
|
const { width: y } = S.getSVGElementSize(
|
|
6449
6461
|
S.appendOrSelect(e, "text.gauge-value-number"),
|
|
6450
6462
|
{ useBBox: !0 }
|
|
6451
|
-
), A = u / 2,
|
|
6463
|
+
), A = u / 2, M = d ? "%" : "", L = S.appendOrSelect(g, "text.gauge-value-symbol").style("font-size", `${A}px`).attr("x", y / 2).text(M), { width: I, height: N } = S.getSVGElementSize(L, {
|
|
6452
6464
|
useBBox: !0
|
|
6453
6465
|
});
|
|
6454
|
-
L.attr("y", `-${
|
|
6466
|
+
L.attr("y", `-${N / 2}px`), g.attr("transform", `translate(-${I / 2}, 0)`);
|
|
6455
6467
|
}
|
|
6456
6468
|
/**
|
|
6457
6469
|
* adds the delta number for the gauge
|
|
@@ -6473,8 +6485,8 @@ class $h extends q {
|
|
|
6473
6485
|
y.enter().append("svg").merge(y).attr("class", "gauge-delta-arrow").attr("x", -d(r) - O / 2).attr("y", -d(r) / 2 - l(r) * 0.35).attr("width", d(r)).attr("height", d(r)).attr("viewBox", "0 0 16 16").each(function() {
|
|
6474
6486
|
const A = x(this);
|
|
6475
6487
|
S.appendOrSelect(A, "rect.gauge-delta-arrow-backdrop").attr("width", "16").attr("height", "16").attr("fill", "none");
|
|
6476
|
-
const
|
|
6477
|
-
S.appendOrSelect(A, "polygon.gauge-delta-arrow").attr("class",
|
|
6488
|
+
const M = v(n, "gauge", "status");
|
|
6489
|
+
S.appendOrSelect(A, "polygon.gauge-delta-arrow").attr("class", M !== null ? `gauge-delta-arrow status--${M}` : "").attr("points", e.getArrow(s));
|
|
6478
6490
|
}), y.exit().remove(), m.exit().remove();
|
|
6479
6491
|
} else {
|
|
6480
6492
|
const r = t.select("g.gauge-delta");
|
|
@@ -6584,9 +6596,12 @@ class Uh extends Wn {
|
|
|
6584
6596
|
dataGroupName: h[s],
|
|
6585
6597
|
originalClassName: "bar"
|
|
6586
6598
|
})
|
|
6587
|
-
).style("fill", (h) =>
|
|
6588
|
-
const u = this.
|
|
6589
|
-
|
|
6599
|
+
).style("fill", (h) => {
|
|
6600
|
+
const u = this.services.cartesianScales.getDomainIdentifier(h);
|
|
6601
|
+
return this.model.getFillColor(h[s], h[u], h);
|
|
6602
|
+
}).attr("d", (h) => {
|
|
6603
|
+
const u = this.groupScale(h[s]), g = this.getBarWidth(), m = u, E = u + g, O = this.services.cartesianScales.getRangeAxisPosition({ datum: h }), T = this.services.cartesianScales.getValueThroughAxisPosition(O, 0), y = this.services.cartesianScales.getRangeValue(h), A = this.services.cartesianScales.getDomainValue(h) - g / 2, M = A + g;
|
|
6604
|
+
if (!this.isOutsideZoomedDomain(A, M))
|
|
6590
6605
|
return ye(
|
|
6591
6606
|
{ x0: m, x1: E, y0: T, y1: y },
|
|
6592
6607
|
this.services.cartesianScales.getOrientation()
|
|
@@ -6767,7 +6782,10 @@ class zh extends q {
|
|
|
6767
6782
|
value: m.value,
|
|
6768
6783
|
originalClassName: `heat-${m.index}`
|
|
6769
6784
|
})
|
|
6770
|
-
).classed("heat", !0).classed("null-state", (m) => m.index === -1 || m.value === null).attr("width", this.xBandwidth).attr("height", this.yBandwidth).style("fill", (m) =>
|
|
6785
|
+
).classed("heat", !0).classed("null-state", (m) => m.index === -1 || m.value === null).attr("width", this.xBandwidth).attr("height", this.yBandwidth).style("fill", (m) => {
|
|
6786
|
+
const E = this.services.cartesianScales.getDomainIdentifier(m);
|
|
6787
|
+
return m.index === -1 || m.value === null ? `url(#${u})` : this.model.getFillColor(Number(m.value), m[E], m);
|
|
6788
|
+
}).attr("aria-label", (m) => m.value);
|
|
6771
6789
|
this.createOuterBox("g.cell-highlight", this.xBandwidth, this.yBandwidth), this.createOuterBox(
|
|
6772
6790
|
"g.multi-cell.column-highlight",
|
|
6773
6791
|
this.xBandwidth,
|
|
@@ -6898,7 +6916,7 @@ class Fh extends q {
|
|
|
6898
6916
|
dataGroupName: d[a],
|
|
6899
6917
|
originalClassName: "bar"
|
|
6900
6918
|
})
|
|
6901
|
-
).style("fill", (d) => this.model.getFillColor(d[a])).attr("d", (d) => {
|
|
6919
|
+
).style("fill", (d) => this.model.getFillColor(d[a], null, d)).attr("d", (d) => {
|
|
6902
6920
|
const p = ne(d, "data");
|
|
6903
6921
|
if (!p)
|
|
6904
6922
|
return;
|
|
@@ -7073,7 +7091,7 @@ class jh extends q {
|
|
|
7073
7091
|
name: "meter-bar-update",
|
|
7074
7092
|
animate: e
|
|
7075
7093
|
})
|
|
7076
|
-
).attr("width", (y) => y.value > d ? p(d) : y.width).style("fill", (y) => t.model.getFillColor(y[c])).attr("role", X.GRAPHICS_SYMBOL).attr("aria-roledescription", "value").attr("aria-label", (y) => y.value), g.exit().remove();
|
|
7094
|
+
).attr("width", (y) => y.value > d ? p(d) : y.width).style("fill", (y) => t.model.getFillColor(y[c], null, y)).attr("role", X.GRAPHICS_SYMBOL).attr("aria-roledescription", "value").attr("aria-label", (y) => y.value), g.exit().remove();
|
|
7077
7095
|
const E = v(s, "meter", "peak");
|
|
7078
7096
|
let O = E;
|
|
7079
7097
|
E !== null && (E > d ? O = d : E < i[0].value && (O = i[0].value > d ? d : i[0].value));
|
|
@@ -7185,25 +7203,25 @@ class Xh extends q {
|
|
|
7185
7203
|
useAttrs: !0
|
|
7186
7204
|
}), a = this.model.getData(), i = this.model.getGroupedData(), r = this.getOptions(), l = v(r, "data", "groupMapsTo"), c = v(r, "radar", "axes", "value"), { angle: d, value: p } = v(r, "radar", "axes"), { xLabelPadding: h, yLabelPadding: u, yTicksNumber: g, minRange: m, xAxisRectHeight: E } = Fe;
|
|
7187
7205
|
this.uniqueKeys = Array.from(new Set(a.map((_) => _[d]))), this.uniqueGroups = Array.from(new Set(a.map((_) => _[l]))), this.fullDataNormalized = this.normalizeFlatData(a), this.groupedDataNormalized = this.normalizeGroupedData(i);
|
|
7188
|
-
const T = 2 * (this.getLabelDimensions(this.uniqueKeys[0]).height + u),
|
|
7189
|
-
if (
|
|
7206
|
+
const T = 2 * (this.getLabelDimensions(this.uniqueKeys[0]).height + u), M = (Math.min(n, s) - T) / 2;
|
|
7207
|
+
if (M <= 0)
|
|
7190
7208
|
return;
|
|
7191
|
-
const L = Bn().domain(this.fullDataNormalized.map((_) => _[d])).range([0, 2 * Math.PI].map((_) => _ - Math.PI / 2)), I = fn(this.fullDataNormalized.map((_) => _[p])),
|
|
7209
|
+
const L = Bn().domain(this.fullDataNormalized.map((_) => _[d])).range([0, 2 * Math.PI].map((_) => _ - Math.PI / 2)), I = fn(this.fullDataNormalized.map((_) => _[p])), N = Ze().domain([
|
|
7192
7210
|
I >= 0 ? 0 : I,
|
|
7193
7211
|
gs(this.fullDataNormalized.map((_) => _[p]))
|
|
7194
|
-
]).range([m,
|
|
7195
|
-
const
|
|
7212
|
+
]).range([m, M]).nice(g), j = N.ticks(g), D = (_, R, P) => this.model.getFillColor(_, R, P), C = oi().angle((_) => L(_[d]) + Math.PI / 2).radius((_) => N(_[p])).curve(li), V = this.uniqueKeys.map((_) => {
|
|
7213
|
+
const R = this.getLabelDimensions(_).width, P = Si(
|
|
7196
7214
|
L(_),
|
|
7197
|
-
|
|
7215
|
+
M
|
|
7198
7216
|
);
|
|
7199
|
-
return
|
|
7200
|
-
}),
|
|
7217
|
+
return R + P;
|
|
7218
|
+
}), w = {
|
|
7201
7219
|
x: gs(V) + h,
|
|
7202
7220
|
y: s / 2
|
|
7203
|
-
}, me = S.appendOrSelect(t, "g.y-axes").attr("role", X.GROUP).selectAll("path").data(j, (_) => _), K = (_) => this.uniqueKeys.map((
|
|
7221
|
+
}, me = S.appendOrSelect(t, "g.y-axes").attr("role", X.GROUP).selectAll("path").data(j, (_) => _), K = (_) => this.uniqueKeys.map((R) => ({ [d]: R, [p]: _ }));
|
|
7204
7222
|
me.join(
|
|
7205
|
-
(_) => _.append("path").attr("opacity", 0).attr("transform", `translate(${
|
|
7206
|
-
(
|
|
7223
|
+
(_) => _.append("path").attr("opacity", 0).attr("transform", `translate(${w.x}, ${w.y})`).attr("fill", "none").call(
|
|
7224
|
+
(R) => R.transition().call(
|
|
7207
7225
|
(P) => this.services.transitions.setupTransition({
|
|
7208
7226
|
transition: P,
|
|
7209
7227
|
name: "radar_y_axes_enter",
|
|
@@ -7212,16 +7230,16 @@ class Xh extends q {
|
|
|
7212
7230
|
).attr("opacity", 1).attr("d", (P) => C(K(P)))
|
|
7213
7231
|
),
|
|
7214
7232
|
(_) => _.call(
|
|
7215
|
-
(
|
|
7233
|
+
(R) => R.transition().call(
|
|
7216
7234
|
(P) => this.services.transitions.setupTransition({
|
|
7217
7235
|
transition: P,
|
|
7218
7236
|
name: "radar_y_axes_update",
|
|
7219
7237
|
animate: e
|
|
7220
7238
|
})
|
|
7221
|
-
).attr("opacity", 1).attr("transform", `translate(${
|
|
7239
|
+
).attr("opacity", 1).attr("transform", `translate(${w.x}, ${w.y})`).attr("d", (P) => C(K(P)))
|
|
7222
7240
|
),
|
|
7223
7241
|
(_) => _.call(
|
|
7224
|
-
(
|
|
7242
|
+
(R) => R.transition().call(
|
|
7225
7243
|
(P) => this.services.transitions.setupTransition({
|
|
7226
7244
|
transition: P,
|
|
7227
7245
|
name: "radar_y_axes_exit",
|
|
@@ -7230,26 +7248,26 @@ class Xh extends q {
|
|
|
7230
7248
|
).attr("d", (P) => C(K(P))).attr("opacity", 0).remove()
|
|
7231
7249
|
)
|
|
7232
7250
|
), S.appendOrSelect(t, "g.x-axes").attr("role", X.GROUP).selectAll("line").data(this.uniqueKeys, (_) => _).join(
|
|
7233
|
-
(_) => _.append("line").attr("opacity", 0).attr("class", (
|
|
7234
|
-
(
|
|
7251
|
+
(_) => _.append("line").attr("opacity", 0).attr("class", (R) => `x-axis-${st(R)}`).attr("stroke-dasharray", "0").attr("x1", (R) => oe(L(R), 0, w).x).attr("y1", (R) => oe(L(R), 0, w).y).attr("x2", (R) => oe(L(R), 0, w).x).attr("y2", (R) => oe(L(R), 0, w).y).call(
|
|
7252
|
+
(R) => R.transition().call(
|
|
7235
7253
|
(P) => this.services.transitions.setupTransition({
|
|
7236
7254
|
transition: P,
|
|
7237
7255
|
name: "radar_x_axes_enter",
|
|
7238
7256
|
animate: e
|
|
7239
7257
|
})
|
|
7240
|
-
).attr("opacity", 1).attr("x1", (P) => oe(L(P),
|
|
7258
|
+
).attr("opacity", 1).attr("x1", (P) => oe(L(P), N.range()[0], w).x).attr("y1", (P) => oe(L(P), N.range()[0], w).y).attr("x2", (P) => oe(L(P), N.range()[1], w).x).attr("y2", (P) => oe(L(P), N.range()[1], w).y)
|
|
7241
7259
|
),
|
|
7242
7260
|
(_) => _.call(
|
|
7243
|
-
(
|
|
7261
|
+
(R) => R.transition().call(
|
|
7244
7262
|
(P) => this.services.transitions.setupTransition({
|
|
7245
7263
|
transition: P,
|
|
7246
7264
|
name: "radar_x_axes_update",
|
|
7247
7265
|
animate: e
|
|
7248
7266
|
})
|
|
7249
|
-
).attr("opacity", 1).attr("x1", (P) => oe(L(P),
|
|
7267
|
+
).attr("opacity", 1).attr("x1", (P) => oe(L(P), N.range()[0], w).x).attr("y1", (P) => oe(L(P), N.range()[0], w).y).attr("x2", (P) => oe(L(P), N.range()[1], w).x).attr("y2", (P) => oe(L(P), N.range()[1], w).y)
|
|
7250
7268
|
),
|
|
7251
7269
|
(_) => _.call(
|
|
7252
|
-
(
|
|
7270
|
+
(R) => R.transition().call(
|
|
7253
7271
|
(P) => this.services.transitions.setupTransition({
|
|
7254
7272
|
transition: P,
|
|
7255
7273
|
name: "radar_x_axes_exit",
|
|
@@ -7258,17 +7276,17 @@ class Xh extends q {
|
|
|
7258
7276
|
).attr("opacity", 0).remove()
|
|
7259
7277
|
)
|
|
7260
7278
|
), S.appendOrSelect(t, "g.x-labels").attr("role", X.GROUP).selectAll("text").data(this.uniqueKeys).join(
|
|
7261
|
-
(_) => _.append("text").text((
|
|
7279
|
+
(_) => _.append("text").text((R) => R).attr("opacity", 0).attr(
|
|
7262
7280
|
"x",
|
|
7263
|
-
(
|
|
7281
|
+
(R) => oe(L(R), N.range()[1] + h, w).x
|
|
7264
7282
|
).attr(
|
|
7265
7283
|
"y",
|
|
7266
|
-
(
|
|
7267
|
-
).style("text-anchor", (
|
|
7284
|
+
(R) => oe(L(R), N.range()[1] + h, w).y
|
|
7285
|
+
).style("text-anchor", (R) => fs(L(R)).textAnchor).style(
|
|
7268
7286
|
"dominant-baseline",
|
|
7269
|
-
(
|
|
7287
|
+
(R) => fs(L(R)).dominantBaseline
|
|
7270
7288
|
).call(
|
|
7271
|
-
(
|
|
7289
|
+
(R) => R.transition().call(
|
|
7272
7290
|
(P) => this.services.transitions.setupTransition({
|
|
7273
7291
|
transition: P,
|
|
7274
7292
|
name: "radar_x_labels_enter",
|
|
@@ -7277,7 +7295,7 @@ class Xh extends q {
|
|
|
7277
7295
|
).attr("opacity", 1)
|
|
7278
7296
|
),
|
|
7279
7297
|
(_) => _.call(
|
|
7280
|
-
(
|
|
7298
|
+
(R) => R.transition().call(
|
|
7281
7299
|
(P) => this.services.transitions.setupTransition({
|
|
7282
7300
|
transition: P,
|
|
7283
7301
|
name: "radar_x_labels_update",
|
|
@@ -7285,17 +7303,17 @@ class Xh extends q {
|
|
|
7285
7303
|
})
|
|
7286
7304
|
).attr("opacity", 1).attr(
|
|
7287
7305
|
"x",
|
|
7288
|
-
(P) => oe(L(P),
|
|
7306
|
+
(P) => oe(L(P), N.range()[1] + h, w).x
|
|
7289
7307
|
).attr(
|
|
7290
7308
|
"y",
|
|
7291
|
-
(P) => oe(L(P),
|
|
7309
|
+
(P) => oe(L(P), N.range()[1] + h, w).y
|
|
7292
7310
|
).end().finally(() => {
|
|
7293
7311
|
const P = v(r, "radar", "alignment"), Le = this.getAlignmentXOffset(P, t, this.getParent());
|
|
7294
7312
|
t.attr("x", Le);
|
|
7295
7313
|
})
|
|
7296
7314
|
),
|
|
7297
7315
|
(_) => _.call(
|
|
7298
|
-
(
|
|
7316
|
+
(R) => R.transition().call(
|
|
7299
7317
|
(P) => this.services.transitions.setupTransition({
|
|
7300
7318
|
transition: P,
|
|
7301
7319
|
name: "radar_x_labels_exit",
|
|
@@ -7306,42 +7324,42 @@ class Xh extends q {
|
|
|
7306
7324
|
), S.appendOrSelect(t, "g.blobs").attr("role", X.GROUP).selectAll("path").data(this.groupedDataNormalized, (_) => _.name).join(
|
|
7307
7325
|
(_) => _.append("path").attr(
|
|
7308
7326
|
"class",
|
|
7309
|
-
(
|
|
7327
|
+
(R) => this.model.getColorClassName({
|
|
7310
7328
|
classNameTypes: [F.FILL, F.STROKE],
|
|
7311
|
-
dataGroupName:
|
|
7329
|
+
dataGroupName: R.name,
|
|
7312
7330
|
originalClassName: "blob"
|
|
7313
7331
|
})
|
|
7314
|
-
).attr("role", X.GRAPHICS_SYMBOL).attr("aria-label", (
|
|
7332
|
+
).attr("role", X.GRAPHICS_SYMBOL).attr("aria-label", (R) => R.name).attr("opacity", 0).attr(
|
|
7315
7333
|
"transform",
|
|
7316
|
-
e ? () => `translate(${
|
|
7317
|
-
).style("fill", (
|
|
7318
|
-
const P =
|
|
7334
|
+
e ? () => `translate(${w.x}, ${w.y}) scale(${1 + Math.random() * 0.35})` : `translate(${w.x}, ${w.y})`
|
|
7335
|
+
).style("fill", (R) => D(R.name, null, R.data)).style("fill-opacity", Fe.opacity.selected).style("stroke", (R) => D(R.name, null, R.data)).call((R) => {
|
|
7336
|
+
const P = R.transition().call(
|
|
7319
7337
|
(Le) => this.services.transitions.setupTransition({
|
|
7320
7338
|
transition: Le,
|
|
7321
7339
|
name: "radar_blobs_enter",
|
|
7322
7340
|
animate: e
|
|
7323
7341
|
})
|
|
7324
7342
|
);
|
|
7325
|
-
e && P.delay(() => Math.random() * 30).attr("transform", `translate(${
|
|
7343
|
+
e && P.delay(() => Math.random() * 30).attr("transform", `translate(${w.x}, ${w.y})`), P.attr("opacity", 1).attr("d", (Le) => C(Le.data));
|
|
7326
7344
|
}),
|
|
7327
7345
|
(_) => (_.attr(
|
|
7328
7346
|
"class",
|
|
7329
|
-
(
|
|
7347
|
+
(R) => this.model.getColorClassName({
|
|
7330
7348
|
classNameTypes: [F.FILL, F.STROKE],
|
|
7331
|
-
dataGroupName:
|
|
7349
|
+
dataGroupName: R.name,
|
|
7332
7350
|
originalClassName: "blob"
|
|
7333
7351
|
})
|
|
7334
|
-
).style("fill", (
|
|
7335
|
-
(
|
|
7352
|
+
).style("fill", (R) => D(R.name, null, R.data)).style("stroke", (R) => D(R.name, null, R.data)), _.call(
|
|
7353
|
+
(R) => R.transition().call(
|
|
7336
7354
|
(P) => this.services.transitions.setupTransition({
|
|
7337
7355
|
transition: P,
|
|
7338
7356
|
name: "radar_blobs_update",
|
|
7339
7357
|
animate: e
|
|
7340
7358
|
})
|
|
7341
|
-
).attr("opacity", 1).attr("transform", `translate(${
|
|
7359
|
+
).attr("opacity", 1).attr("transform", `translate(${w.x}, ${w.y})`).attr("d", (P) => C(P.data))
|
|
7342
7360
|
), _),
|
|
7343
|
-
(_) => _.call((
|
|
7344
|
-
const P =
|
|
7361
|
+
(_) => _.call((R) => {
|
|
7362
|
+
const P = R.transition().call(
|
|
7345
7363
|
(Le) => this.services.transitions.setupTransition({
|
|
7346
7364
|
transition: Le,
|
|
7347
7365
|
name: "radar_blobs_exit",
|
|
@@ -7350,11 +7368,11 @@ class Xh extends q {
|
|
|
7350
7368
|
);
|
|
7351
7369
|
e && P.delay(() => Math.random() * 30).attr(
|
|
7352
7370
|
"transform",
|
|
7353
|
-
() => `translate(${
|
|
7371
|
+
() => `translate(${w.x}, ${w.y}) scale(${1 + Math.random() * 0.35})`
|
|
7354
7372
|
), P.attr("opacity", 0).remove();
|
|
7355
7373
|
})
|
|
7356
7374
|
), S.appendOrSelect(t, "g.dots").attr("role", X.GROUP).selectAll("circle").data(this.fullDataNormalized.filter((_) => v(_, p) !== null)).join(
|
|
7357
|
-
(_) => _.append("circle").attr("role", X.GRAPHICS_SYMBOL).attr("aria-label", (
|
|
7375
|
+
(_) => _.append("circle").attr("role", X.GRAPHICS_SYMBOL).attr("aria-label", (R) => R[c]),
|
|
7358
7376
|
(_) => _,
|
|
7359
7377
|
(_) => _.remove()
|
|
7360
7378
|
).attr(
|
|
@@ -7364,18 +7382,18 @@ class Xh extends q {
|
|
|
7364
7382
|
dataGroupName: _[l],
|
|
7365
7383
|
originalClassName: st(_[d])
|
|
7366
7384
|
})
|
|
7367
|
-
).attr("cx", (_) => oe(L(_[d]),
|
|
7385
|
+
).attr("cx", (_) => oe(L(_[d]), N(_[p]), w).x).attr("cy", (_) => oe(L(_[d]), N(_[p]), w).y).attr("r", 0).attr("opacity", 0).style("fill", (_) => D(_[l])), S.appendOrSelect(t, "g.x-axes-rect").attr("role", X.GROUP).selectAll("rect").data(this.uniqueKeys).join(
|
|
7368
7386
|
(_) => _.append("rect"),
|
|
7369
7387
|
(_) => _,
|
|
7370
7388
|
(_) => _.remove()
|
|
7371
|
-
).attr("x",
|
|
7389
|
+
).attr("x", w.x).attr("y", w.y - E / 2).attr("width", N.range()[1]).attr("height", E).style("fill", "red").style("fill-opacity", 0).attr("transform", (_) => `rotate(${Oi(L(_))}, ${w.x}, ${w.y})`);
|
|
7372
7390
|
const { code: ae, number: re } = v(r, "locale");
|
|
7373
7391
|
S.appendOrSelect(t, "g.y-labels").attr("role", X.GROUP).selectAll("text").data(Wt(j)).join(
|
|
7374
|
-
(_) => _.append("text").attr("opacity", 0).text((
|
|
7392
|
+
(_) => _.append("text").attr("opacity", 0).text((R) => re(R, ae)).attr(
|
|
7375
7393
|
"x",
|
|
7376
|
-
(
|
|
7377
|
-
).attr("y", (
|
|
7378
|
-
(
|
|
7394
|
+
(R) => oe(-Math.PI / 2, N(R), w).x + u
|
|
7395
|
+
).attr("y", (R) => oe(-Math.PI / 2, N(R), w).y).style("text-anchor", "start").style("dominant-baseline", "middle").call(
|
|
7396
|
+
(R) => R.transition().call(
|
|
7379
7397
|
(P) => this.services.transitions.setupTransition({
|
|
7380
7398
|
transition: P,
|
|
7381
7399
|
name: "radar_y_labels_enter",
|
|
@@ -7384,7 +7402,7 @@ class Xh extends q {
|
|
|
7384
7402
|
).attr("opacity", 1)
|
|
7385
7403
|
),
|
|
7386
7404
|
(_) => _.call(
|
|
7387
|
-
(
|
|
7405
|
+
(R) => R.transition().call(
|
|
7388
7406
|
(P) => this.services.transitions.setupTransition({
|
|
7389
7407
|
transition: P,
|
|
7390
7408
|
name: "radar_y_labels_update",
|
|
@@ -7392,11 +7410,11 @@ class Xh extends q {
|
|
|
7392
7410
|
})
|
|
7393
7411
|
).text((P) => P).attr("opacity", 1).attr(
|
|
7394
7412
|
"x",
|
|
7395
|
-
(P) => oe(-Math.PI / 2,
|
|
7396
|
-
).attr("y", (P) => oe(-Math.PI / 2,
|
|
7413
|
+
(P) => oe(-Math.PI / 2, N(P), w).x + u
|
|
7414
|
+
).attr("y", (P) => oe(-Math.PI / 2, N(P), w).y)
|
|
7397
7415
|
),
|
|
7398
7416
|
(_) => _.call(
|
|
7399
|
-
(
|
|
7417
|
+
(R) => R.transition().call(
|
|
7400
7418
|
(P) => this.services.transitions.setupTransition({
|
|
7401
7419
|
transition: P,
|
|
7402
7420
|
name: "radar_y_labels_exit",
|
|
@@ -7445,7 +7463,7 @@ class Xh extends q {
|
|
|
7445
7463
|
items: h.filter((u) => typeof u[p] == "number").map((u) => ({
|
|
7446
7464
|
label: u[d],
|
|
7447
7465
|
value: u[p],
|
|
7448
|
-
color: e.model.getFillColor(u[d]),
|
|
7466
|
+
color: e.model.getFillColor(u[d], null, u),
|
|
7449
7467
|
class: e.model.getColorClassName({
|
|
7450
7468
|
classNameTypes: [F.TOOLTIP],
|
|
7451
7469
|
dataGroupName: u[d]
|
|
@@ -7515,7 +7533,10 @@ class Zh extends Wn {
|
|
|
7515
7533
|
dataGroupName: c[n],
|
|
7516
7534
|
originalClassName: "bar"
|
|
7517
7535
|
})
|
|
7518
|
-
).style("fill", (c) =>
|
|
7536
|
+
).style("fill", (c) => {
|
|
7537
|
+
const d = this.services.cartesianScales.getDomainIdentifier(c);
|
|
7538
|
+
return this.model.getFillColor(c[n], c[d], c);
|
|
7539
|
+
}).attr("d", (c) => {
|
|
7519
7540
|
const d = this.services.cartesianScales.getRangeIdentifier(), p = this.getBarWidth(), h = c[d], u = this.services.cartesianScales.getDomainValue(c) - p / 2, g = u + p;
|
|
7520
7541
|
let m, E;
|
|
7521
7542
|
if (Array.isArray(h) && h.length === 2)
|
|
@@ -7639,7 +7660,7 @@ class qh extends q {
|
|
|
7639
7660
|
dataGroupName: v(g, 0, a),
|
|
7640
7661
|
originalClassName: "area"
|
|
7641
7662
|
})
|
|
7642
|
-
).style("fill", (g) => n.model.getFillColor(v(g, 0, a))).attr("role", X.GRAPHICS_SYMBOL).attr("aria-roledescription", "area").attr("aria-label", (g) => v(g, 0, a)).transition().call(
|
|
7663
|
+
).style("fill", (g) => n.model.getFillColor(v(g, 0, a), null, g)).attr("role", X.GRAPHICS_SYMBOL).attr("aria-roledescription", "area").attr("aria-label", (g) => v(g, 0, a)).transition().call(
|
|
7643
7664
|
(g) => this.services.transitions.setupTransition({
|
|
7644
7665
|
transition: g,
|
|
7645
7666
|
name: "area-update-enter",
|
|
@@ -7694,7 +7715,10 @@ class Kh extends Wn {
|
|
|
7694
7715
|
dataGroupName: c[s],
|
|
7695
7716
|
originalClassName: "bar"
|
|
7696
7717
|
})
|
|
7697
|
-
).style(
|
|
7718
|
+
).style(
|
|
7719
|
+
"fill",
|
|
7720
|
+
(c) => this.model.getFillColor(c[s], c.data.sharedStackKey, c.data)
|
|
7721
|
+
).attr("d", (c) => {
|
|
7698
7722
|
const d = c.data.sharedStackKey, p = this.getBarWidth(), h = this.services.cartesianScales.getDomainValue(d) - p / 2, u = h + p, g = this.services.cartesianScales.getRangeValue(c[0]);
|
|
7699
7723
|
let m = this.services.cartesianScales.getRangeValue(c[1]);
|
|
7700
7724
|
if (!this.isOutsideZoomedDomain(h, u)) {
|
|
@@ -7862,41 +7886,41 @@ class Qh extends q {
|
|
|
7862
7886
|
name: r,
|
|
7863
7887
|
children: i
|
|
7864
7888
|
}), u = 10, g = n / 6, m = (L) => {
|
|
7865
|
-
const I = h.descendants().reverse(),
|
|
7866
|
-
let j = h,
|
|
7889
|
+
const I = h.descendants().reverse(), N = h.links();
|
|
7890
|
+
let j = h, D = h;
|
|
7867
7891
|
h.eachBefore((H) => {
|
|
7868
|
-
H.x < j.x && (j = H), H.x >
|
|
7892
|
+
H.x < j.x && (j = H), H.x > D.x && (D = H);
|
|
7869
7893
|
});
|
|
7870
|
-
const C =
|
|
7894
|
+
const C = D.x - j.x, V = t.transition().call(
|
|
7871
7895
|
(H) => this.services.transitions.setupTransition({
|
|
7872
7896
|
transition: H,
|
|
7873
7897
|
name: "tree-update-viewbox",
|
|
7874
7898
|
animate: !0
|
|
7875
7899
|
})
|
|
7876
|
-
).attr("viewBox", [-p.left, j.x, n, C].join(" ")), z =
|
|
7900
|
+
).attr("viewBox", [-p.left, j.x, n, C].join(" ")), z = M.selectAll("g").data(I, (H) => H.id), w = this, Q = z.enter().append("g").attr("transform", () => `translate(${L.y0},${L.x0})`).attr(
|
|
7877
7901
|
"class",
|
|
7878
7902
|
(H) => H.depth !== 0 && H.children && H.children.length > 0 ? "clickable" : null
|
|
7879
7903
|
).on("mouseover", function(H, Z) {
|
|
7880
|
-
|
|
7904
|
+
w.services.events.dispatchEvent(f.Tree.NODE_MOUSEOVER, {
|
|
7881
7905
|
event: H,
|
|
7882
7906
|
element: x(this),
|
|
7883
7907
|
datum: Z
|
|
7884
7908
|
});
|
|
7885
7909
|
}).on("click", function(H, Z) {
|
|
7886
|
-
Z.depth !== 0 && (Z.children = Z.children ? null : Z._children, m(Z)),
|
|
7910
|
+
Z.depth !== 0 && (Z.children = Z.children ? null : Z._children, m(Z)), w.services.events.dispatchEvent(f.Tree.NODE_CLICK, {
|
|
7887
7911
|
event: H,
|
|
7888
7912
|
element: x(this),
|
|
7889
7913
|
datum: Z
|
|
7890
7914
|
});
|
|
7891
7915
|
}).on("mouseout", function(H, Z) {
|
|
7892
|
-
|
|
7916
|
+
w.services.events.dispatchEvent(f.Tree.NODE_MOUSEOUT, {
|
|
7893
7917
|
event: H,
|
|
7894
7918
|
element: x(this),
|
|
7895
7919
|
datum: Z
|
|
7896
7920
|
});
|
|
7897
7921
|
});
|
|
7898
7922
|
Q.append("circle").attr("r", 2.5).attr("class", (H) => H._children ? "parent" : "child").attr("stroke-width", 10), Q.append("text").attr("dy", "0.31em").attr("x", (H) => H._children ? -it : it).attr("text-anchor", (H) => H._children ? "end" : "start").text((H) => H.data.name).clone(!0).attr("class", "text-stroke").lower(), z.merge(Q).transition(V).attr("transform", (H) => `translate(${H.y},${H.x})`).attr("fill-opacity", 1).attr("stroke-opacity", 1), z.exit().transition(V).remove().attr("transform", () => `translate(${L.y},${L.x})`).attr("fill-opacity", 0).attr("stroke-opacity", 0);
|
|
7899
|
-
const me = A.selectAll("path").data(
|
|
7923
|
+
const me = A.selectAll("path").data(N, (H) => H.target.id), K = me.enter().append("path").attr("d", () => {
|
|
7900
7924
|
const H = { x: L.x0, y: L.y0 };
|
|
7901
7925
|
return y({ source: H, target: H });
|
|
7902
7926
|
});
|
|
@@ -7916,16 +7940,16 @@ class Qh extends q {
|
|
|
7916
7940
|
h.x0 = g / 2, h.y0 = 0, h.descendants().forEach((L, I) => {
|
|
7917
7941
|
L.id = I, L._children = L.children;
|
|
7918
7942
|
}), T(h), t.attr("viewBox", [-p.left, -p.top, n, u]).style("user-select", "none");
|
|
7919
|
-
const A = t.append("g").attr("class", "links"),
|
|
7943
|
+
const A = t.append("g").attr("class", "links"), M = t.append("g").attr("class", "nodes");
|
|
7920
7944
|
m(h);
|
|
7921
7945
|
}
|
|
7922
7946
|
}
|
|
7923
|
-
var
|
|
7947
|
+
var Ml = "#000000", wl = "#ffffff", Cl = "#fcf4d6", _l = "#fddc69", Il = "#f1c21b", kl = "#d2a106", Rl = "#b28600", Dl = "#8e6a00", Nl = "#684e00", Pl = "#483700", Vl = "#302400", Gl = "#1c1500", Bl = {
|
|
7924
7948
|
10: Cl,
|
|
7925
7949
|
20: _l,
|
|
7926
7950
|
30: Il,
|
|
7927
|
-
40:
|
|
7928
|
-
50:
|
|
7951
|
+
40: kl,
|
|
7952
|
+
50: Rl,
|
|
7929
7953
|
60: Dl,
|
|
7930
7954
|
70: Nl,
|
|
7931
7955
|
80: Pl,
|
|
@@ -7964,7 +7988,7 @@ var wl = "#000000", Ml = "#ffffff", Cl = "#fcf4d6", _l = "#fddc69", Il = "#f1c21
|
|
|
7964
7988
|
80: mc,
|
|
7965
7989
|
90: fc,
|
|
7966
7990
|
100: vc
|
|
7967
|
-
}, Ec = "#f6f2ff", bc = "#e8daff", Sc = "#d4bbff", Oc = "#be95ff", xc = "#a56eff", Tc = "#8a3ffc", Lc = "#6929c4", Ac = "#491d8b",
|
|
7991
|
+
}, Ec = "#f6f2ff", bc = "#e8daff", Sc = "#d4bbff", Oc = "#be95ff", xc = "#a56eff", Tc = "#8a3ffc", Lc = "#6929c4", Ac = "#491d8b", Mc = "#31135e", wc = "#1c0f30", Cc = {
|
|
7968
7992
|
10: Ec,
|
|
7969
7993
|
20: bc,
|
|
7970
7994
|
30: Sc,
|
|
@@ -7973,13 +7997,13 @@ var wl = "#000000", Ml = "#ffffff", Cl = "#fcf4d6", _l = "#fddc69", Il = "#f1c21
|
|
|
7973
7997
|
60: Tc,
|
|
7974
7998
|
70: Lc,
|
|
7975
7999
|
80: Ac,
|
|
7976
|
-
90:
|
|
7977
|
-
100:
|
|
7978
|
-
}, _c = "#edf5ff", Ic = "#d0e2ff",
|
|
8000
|
+
90: Mc,
|
|
8001
|
+
100: wc
|
|
8002
|
+
}, _c = "#edf5ff", Ic = "#d0e2ff", kc = "#a6c8ff", Rc = "#78a9ff", Dc = "#4589ff", Nc = "#0f62fe", Pc = "#0043ce", Vc = "#002d9c", Gc = "#001d6c", Bc = "#001141", Hc = {
|
|
7979
8003
|
10: _c,
|
|
7980
8004
|
20: Ic,
|
|
7981
|
-
30:
|
|
7982
|
-
40:
|
|
8005
|
+
30: kc,
|
|
8006
|
+
40: Rc,
|
|
7983
8007
|
50: Dc,
|
|
7984
8008
|
60: Nc,
|
|
7985
8009
|
70: Pc,
|
|
@@ -8019,7 +8043,7 @@ var wl = "#000000", Ml = "#ffffff", Cl = "#fcf4d6", _l = "#fddc69", Il = "#f1c21
|
|
|
8019
8043
|
80: fd,
|
|
8020
8044
|
90: vd,
|
|
8021
8045
|
100: yd
|
|
8022
|
-
}, bd = "#f2f4f8", Sd = "#dde1e6", Od = "#c1c7cd", xd = "#a2a9b0", Td = "#878d96", Ld = "#697077", Ad = "#4d5358",
|
|
8046
|
+
}, bd = "#f2f4f8", Sd = "#dde1e6", Od = "#c1c7cd", xd = "#a2a9b0", Td = "#878d96", Ld = "#697077", Ad = "#4d5358", Md = "#343a3f", wd = "#21272a", Cd = "#121619", _d = {
|
|
8023
8047
|
10: bd,
|
|
8024
8048
|
20: Sd,
|
|
8025
8049
|
30: Od,
|
|
@@ -8027,13 +8051,13 @@ var wl = "#000000", Ml = "#ffffff", Cl = "#fcf4d6", _l = "#fddc69", Il = "#f1c21
|
|
|
8027
8051
|
50: Td,
|
|
8028
8052
|
60: Ld,
|
|
8029
8053
|
70: Ad,
|
|
8030
|
-
80:
|
|
8031
|
-
90:
|
|
8054
|
+
80: Md,
|
|
8055
|
+
90: wd,
|
|
8032
8056
|
100: Cd
|
|
8033
|
-
}, Id = "#f4f4f4",
|
|
8057
|
+
}, Id = "#f4f4f4", kd = "#e0e0e0", Rd = "#c6c6c6", Dd = "#a8a8a8", Nd = "#8d8d8d", Pd = "#6f6f6f", Vd = "#525252", Gd = "#393939", Bd = "#262626", Hd = "#161616", $d = {
|
|
8034
8058
|
10: Id,
|
|
8035
|
-
20:
|
|
8036
|
-
30:
|
|
8059
|
+
20: kd,
|
|
8060
|
+
30: Rd,
|
|
8037
8061
|
40: Dd,
|
|
8038
8062
|
50: Nd,
|
|
8039
8063
|
60: Pd,
|
|
@@ -8054,7 +8078,7 @@ var wl = "#000000", Ml = "#ffffff", Cl = "#fcf4d6", _l = "#fddc69", Il = "#f1c21
|
|
|
8054
8078
|
100: Kd
|
|
8055
8079
|
}, Xs = {
|
|
8056
8080
|
black: {
|
|
8057
|
-
100:
|
|
8081
|
+
100: Ml
|
|
8058
8082
|
},
|
|
8059
8083
|
blue: Hc,
|
|
8060
8084
|
coolGray: _d,
|
|
@@ -8068,7 +8092,7 @@ var wl = "#000000", Ml = "#ffffff", Cl = "#fcf4d6", _l = "#fddc69", Il = "#f1c21
|
|
|
8068
8092
|
teal: ld,
|
|
8069
8093
|
warmGray: Jd,
|
|
8070
8094
|
white: {
|
|
8071
|
-
0:
|
|
8095
|
+
0: wl
|
|
8072
8096
|
},
|
|
8073
8097
|
yellow: Bl
|
|
8074
8098
|
};
|
|
@@ -8161,7 +8185,7 @@ class eu extends q {
|
|
|
8161
8185
|
).attr("width", (m) => m.x1 - m.x0).attr("height", (m) => m.y1 - m.y0).style("fill", (m) => {
|
|
8162
8186
|
for (; m.depth > 1; )
|
|
8163
8187
|
m = m.parent;
|
|
8164
|
-
return this.model.getFillColor(m.data.name);
|
|
8188
|
+
return this.model.getFillColor(m.data.name, null, m.data);
|
|
8165
8189
|
}), h.selectAll("clipPath").data(
|
|
8166
8190
|
(m) => m.data.showLabel !== !0 ? [] : [1],
|
|
8167
8191
|
(m) => m
|
|
@@ -8219,7 +8243,7 @@ class eu extends q {
|
|
|
8219
8243
|
name: "graph_element_mouseover_fill_update"
|
|
8220
8244
|
})
|
|
8221
8245
|
).style("fill", (r) => {
|
|
8222
|
-
const l = e.model.getFillColor(r.parent.data.name);
|
|
8246
|
+
const l = e.model.getFillColor(r.parent.data.name, null, r.data);
|
|
8223
8247
|
return l && (a = l), sa(a).darker(0.7).toString();
|
|
8224
8248
|
}), e.services.events.dispatchEvent(f.Tooltip.SHOW, {
|
|
8225
8249
|
event: t,
|
|
@@ -8266,7 +8290,7 @@ class eu extends q {
|
|
|
8266
8290
|
transition: i,
|
|
8267
8291
|
name: "graph_element_mouseout_fill_update"
|
|
8268
8292
|
})
|
|
8269
|
-
).style("fill", (i) => e.model.getFillColor(i.parent.data.name)), e.services.events.dispatchEvent(f.Treemap.LEAF_MOUSEOUT, {
|
|
8293
|
+
).style("fill", (i) => e.model.getFillColor(i.parent.data.name, null, i.data)), e.services.events.dispatchEvent(f.Treemap.LEAF_MOUSEOUT, {
|
|
8270
8294
|
event: t,
|
|
8271
8295
|
element: s,
|
|
8272
8296
|
datum: n
|
|
@@ -8562,8 +8586,8 @@ export {
|
|
|
8562
8586
|
Fh as O,
|
|
8563
8587
|
bh as P,
|
|
8564
8588
|
Wh as Q,
|
|
8565
|
-
|
|
8566
|
-
|
|
8589
|
+
wa as R,
|
|
8590
|
+
Mh as S,
|
|
8567
8591
|
_s as T,
|
|
8568
8592
|
jh as U,
|
|
8569
8593
|
Al as V,
|
|
@@ -8586,11 +8610,11 @@ export {
|
|
|
8586
8610
|
Sh as b,
|
|
8587
8611
|
ph as c,
|
|
8588
8612
|
Ih as d,
|
|
8589
|
-
|
|
8613
|
+
kh as e,
|
|
8590
8614
|
_h as f,
|
|
8591
8615
|
Ch as g,
|
|
8592
|
-
|
|
8593
|
-
|
|
8616
|
+
wh as h,
|
|
8617
|
+
Rh as i,
|
|
8594
8618
|
Dh as j,
|
|
8595
8619
|
fh as k,
|
|
8596
8620
|
uh as l,
|
|
@@ -8609,4 +8633,4 @@ export {
|
|
|
8609
8633
|
Oh as y,
|
|
8610
8634
|
Th as z
|
|
8611
8635
|
};
|
|
8612
|
-
//# sourceMappingURL=choropleth-
|
|
8636
|
+
//# sourceMappingURL=choropleth-WzFMZXLV.mjs.map
|