@hpcc-js/comms 3.6.2 → 3.6.3
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/dist/browser/index.js +867 -12
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.cjs +2 -2
- package/dist/browser/index.umd.cjs.map +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +11 -11
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -2,10 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
4
4
|
import { scopedLogger, join, promiseTimeout, exists, deepMixin, xml2json, StateObject, Cache, Graph, Subgraph as Subgraph$1, Vertex as Vertex$1, Edge as Edge$1, SAXStackParser, Stack, espTime2Seconds as espTime2Seconds$1, deepMixinT, XMLNode, debounce, Message, Dispatch } from "@hpcc-js/util";
|
|
5
|
-
|
|
6
|
-
import { format } from "d3-format";
|
|
7
|
-
import { utcFormat, utcParse } from "d3-time-format";
|
|
8
|
-
const PKG_NAME = "@hpcc-js/comms", PKG_VERSION = "3.6.1", BUILD_VERSION = "3.7.1", logger$6 = scopedLogger("comms/connection.ts");
|
|
5
|
+
const PKG_NAME = "@hpcc-js/comms", PKG_VERSION = "3.6.2", BUILD_VERSION = "3.7.2", logger$6 = scopedLogger("comms/connection.ts");
|
|
9
6
|
function instanceOfIOptions(object) {
|
|
10
7
|
return "baseUrl" in object;
|
|
11
8
|
}
|
|
@@ -944,7 +941,6 @@ function jsonToIField(id, item) {
|
|
|
944
941
|
fields: jsonToIFieldObj(item)
|
|
945
942
|
};
|
|
946
943
|
}
|
|
947
|
-
// Fall through ---
|
|
948
944
|
default:
|
|
949
945
|
throw new Error("Unknown field type");
|
|
950
946
|
}
|
|
@@ -1192,6 +1188,60 @@ class LogaccessService extends LogaccessServiceBase {
|
|
|
1192
1188
|
});
|
|
1193
1189
|
}
|
|
1194
1190
|
}
|
|
1191
|
+
function ascending(a, b) {
|
|
1192
|
+
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
1193
|
+
}
|
|
1194
|
+
function bisector(compare) {
|
|
1195
|
+
return compare.length === 1 && (compare = ascendingComparator(compare)), {
|
|
1196
|
+
left: function(a, x, lo, hi) {
|
|
1197
|
+
for (lo == null && (lo = 0), hi == null && (hi = a.length); lo < hi; ) {
|
|
1198
|
+
var mid = lo + hi >>> 1;
|
|
1199
|
+
compare(a[mid], x) < 0 ? lo = mid + 1 : hi = mid;
|
|
1200
|
+
}
|
|
1201
|
+
return lo;
|
|
1202
|
+
},
|
|
1203
|
+
right: function(a, x, lo, hi) {
|
|
1204
|
+
for (lo == null && (lo = 0), hi == null && (hi = a.length); lo < hi; ) {
|
|
1205
|
+
var mid = lo + hi >>> 1;
|
|
1206
|
+
compare(a[mid], x) > 0 ? hi = mid : lo = mid + 1;
|
|
1207
|
+
}
|
|
1208
|
+
return lo;
|
|
1209
|
+
}
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
function ascendingComparator(f) {
|
|
1213
|
+
return function(d, x) {
|
|
1214
|
+
return ascending(f(d), x);
|
|
1215
|
+
};
|
|
1216
|
+
}
|
|
1217
|
+
bisector(ascending);
|
|
1218
|
+
function number(x) {
|
|
1219
|
+
return x === null ? NaN : +x;
|
|
1220
|
+
}
|
|
1221
|
+
function d3Max(values, valueof) {
|
|
1222
|
+
var n = values.length, i = -1, value, max;
|
|
1223
|
+
if (valueof == null) {
|
|
1224
|
+
for (; ++i < n; )
|
|
1225
|
+
if ((value = values[i]) != null && value >= value)
|
|
1226
|
+
for (max = value; ++i < n; )
|
|
1227
|
+
(value = values[i]) != null && value > max && (max = value);
|
|
1228
|
+
} else
|
|
1229
|
+
for (; ++i < n; )
|
|
1230
|
+
if ((value = valueof(values[i], i, values)) != null && value >= value)
|
|
1231
|
+
for (max = value; ++i < n; )
|
|
1232
|
+
(value = valueof(values[i], i, values)) != null && value > max && (max = value);
|
|
1233
|
+
return max;
|
|
1234
|
+
}
|
|
1235
|
+
function d3Mean(values, valueof) {
|
|
1236
|
+
var n = values.length, m = n, i = -1, value, sum = 0;
|
|
1237
|
+
if (valueof == null)
|
|
1238
|
+
for (; ++i < n; )
|
|
1239
|
+
isNaN(value = number(values[i])) ? --m : sum += value;
|
|
1240
|
+
else
|
|
1241
|
+
for (; ++i < n; )
|
|
1242
|
+
isNaN(value = number(valueof(values[i], i, values))) ? --m : sum += value;
|
|
1243
|
+
if (m) return sum / m;
|
|
1244
|
+
}
|
|
1195
1245
|
class MachineServiceBase extends Service {
|
|
1196
1246
|
constructor(optsConnection) {
|
|
1197
1247
|
super(optsConnection, "ws_machine", "1.17");
|
|
@@ -1246,8 +1296,8 @@ class MachineService extends MachineServiceBase {
|
|
|
1246
1296
|
NetAddress: mu.NetAddress,
|
|
1247
1297
|
Description: mu.Description,
|
|
1248
1298
|
DiskUsages,
|
|
1249
|
-
mean:
|
|
1250
|
-
max:
|
|
1299
|
+
mean: d3Mean(DiskUsages.filter((du) => !isNaN(du.PercentUsed)), (du) => du.PercentUsed),
|
|
1300
|
+
max: d3Max(DiskUsages.filter((du) => !isNaN(du.PercentUsed)), (du) => du.PercentUsed)
|
|
1251
1301
|
};
|
|
1252
1302
|
});
|
|
1253
1303
|
return {
|
|
@@ -1256,8 +1306,8 @@ class MachineService extends MachineServiceBase {
|
|
|
1256
1306
|
Description: cu.Description,
|
|
1257
1307
|
MachineUsages,
|
|
1258
1308
|
MachineUsagesDescription: MachineUsages.reduce((prev, mu) => prev + (mu.Description || ""), ""),
|
|
1259
|
-
mean:
|
|
1260
|
-
max:
|
|
1309
|
+
mean: d3Mean(MachineUsages.filter((mu) => !isNaN(mu.mean)), (mu) => mu.mean),
|
|
1310
|
+
max: d3Max(MachineUsages.filter((mu) => !isNaN(mu.max)), (mu) => mu.max)
|
|
1261
1311
|
};
|
|
1262
1312
|
});
|
|
1263
1313
|
return {
|
|
@@ -1265,8 +1315,8 @@ class MachineService extends MachineServiceBase {
|
|
|
1265
1315
|
Description: tcu.Description,
|
|
1266
1316
|
ComponentUsages,
|
|
1267
1317
|
ComponentUsagesDescription: ComponentUsages.reduce((prev, cu) => prev + (cu.MachineUsagesDescription || ""), ""),
|
|
1268
|
-
mean:
|
|
1269
|
-
max:
|
|
1318
|
+
mean: d3Mean(ComponentUsages.filter((cu) => !isNaN(cu.mean)), (cu) => cu.mean),
|
|
1319
|
+
max: d3Max(ComponentUsages.filter((cu) => !isNaN(cu.max)), (cu) => cu.max)
|
|
1270
1320
|
};
|
|
1271
1321
|
}));
|
|
1272
1322
|
}
|
|
@@ -1973,6 +2023,811 @@ class WorkunitsServiceEx extends WorkunitsServiceBase {
|
|
|
1973
2023
|
return this._connection.send("WUPublishWorkunit", request);
|
|
1974
2024
|
}
|
|
1975
2025
|
}
|
|
2026
|
+
function formatDecimal(x) {
|
|
2027
|
+
return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
|
|
2028
|
+
}
|
|
2029
|
+
function formatDecimalParts(x, p) {
|
|
2030
|
+
if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null;
|
|
2031
|
+
var i, coefficient = x.slice(0, i);
|
|
2032
|
+
return [
|
|
2033
|
+
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
|
|
2034
|
+
+x.slice(i + 1)
|
|
2035
|
+
];
|
|
2036
|
+
}
|
|
2037
|
+
function exponent(x) {
|
|
2038
|
+
return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
|
|
2039
|
+
}
|
|
2040
|
+
function formatGroup(grouping, thousands) {
|
|
2041
|
+
return function(value, width) {
|
|
2042
|
+
for (var i = value.length, t = [], j = 0, g = grouping[0], length = 0; i > 0 && g > 0 && (length + g + 1 > width && (g = Math.max(1, width - length)), t.push(value.substring(i -= g, i + g)), !((length += g + 1) > width)); )
|
|
2043
|
+
g = grouping[j = (j + 1) % grouping.length];
|
|
2044
|
+
return t.reverse().join(thousands);
|
|
2045
|
+
};
|
|
2046
|
+
}
|
|
2047
|
+
function formatNumerals(numerals) {
|
|
2048
|
+
return function(value) {
|
|
2049
|
+
return value.replace(/[0-9]/g, function(i) {
|
|
2050
|
+
return numerals[+i];
|
|
2051
|
+
});
|
|
2052
|
+
};
|
|
2053
|
+
}
|
|
2054
|
+
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
2055
|
+
function formatSpecifier(specifier) {
|
|
2056
|
+
if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
|
|
2057
|
+
var match;
|
|
2058
|
+
return new FormatSpecifier({
|
|
2059
|
+
fill: match[1],
|
|
2060
|
+
align: match[2],
|
|
2061
|
+
sign: match[3],
|
|
2062
|
+
symbol: match[4],
|
|
2063
|
+
zero: match[5],
|
|
2064
|
+
width: match[6],
|
|
2065
|
+
comma: match[7],
|
|
2066
|
+
precision: match[8] && match[8].slice(1),
|
|
2067
|
+
trim: match[9],
|
|
2068
|
+
type: match[10]
|
|
2069
|
+
});
|
|
2070
|
+
}
|
|
2071
|
+
formatSpecifier.prototype = FormatSpecifier.prototype;
|
|
2072
|
+
function FormatSpecifier(specifier) {
|
|
2073
|
+
this.fill = specifier.fill === void 0 ? " " : specifier.fill + "", this.align = specifier.align === void 0 ? ">" : specifier.align + "", this.sign = specifier.sign === void 0 ? "-" : specifier.sign + "", this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + "", this.zero = !!specifier.zero, this.width = specifier.width === void 0 ? void 0 : +specifier.width, this.comma = !!specifier.comma, this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision, this.trim = !!specifier.trim, this.type = specifier.type === void 0 ? "" : specifier.type + "";
|
|
2074
|
+
}
|
|
2075
|
+
FormatSpecifier.prototype.toString = function() {
|
|
2076
|
+
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
2077
|
+
};
|
|
2078
|
+
function formatTrim(s) {
|
|
2079
|
+
out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i)
|
|
2080
|
+
switch (s[i]) {
|
|
2081
|
+
case ".":
|
|
2082
|
+
i0 = i1 = i;
|
|
2083
|
+
break;
|
|
2084
|
+
case "0":
|
|
2085
|
+
i0 === 0 && (i0 = i), i1 = i;
|
|
2086
|
+
break;
|
|
2087
|
+
default:
|
|
2088
|
+
if (!+s[i]) break out;
|
|
2089
|
+
i0 > 0 && (i0 = 0);
|
|
2090
|
+
break;
|
|
2091
|
+
}
|
|
2092
|
+
return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
|
|
2093
|
+
}
|
|
2094
|
+
var prefixExponent;
|
|
2095
|
+
function formatPrefixAuto(x, p) {
|
|
2096
|
+
var d = formatDecimalParts(x, p);
|
|
2097
|
+
if (!d) return x + "";
|
|
2098
|
+
var coefficient = d[0], exponent2 = d[1], i = exponent2 - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent2 / 3))) * 3) + 1, n = coefficient.length;
|
|
2099
|
+
return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0];
|
|
2100
|
+
}
|
|
2101
|
+
function formatRounded(x, p) {
|
|
2102
|
+
var d = formatDecimalParts(x, p);
|
|
2103
|
+
if (!d) return x + "";
|
|
2104
|
+
var coefficient = d[0], exponent2 = d[1];
|
|
2105
|
+
return exponent2 < 0 ? "0." + new Array(-exponent2).join("0") + coefficient : coefficient.length > exponent2 + 1 ? coefficient.slice(0, exponent2 + 1) + "." + coefficient.slice(exponent2 + 1) : coefficient + new Array(exponent2 - coefficient.length + 2).join("0");
|
|
2106
|
+
}
|
|
2107
|
+
const formatTypes = {
|
|
2108
|
+
"%": function(x, p) {
|
|
2109
|
+
return (x * 100).toFixed(p);
|
|
2110
|
+
},
|
|
2111
|
+
b: function(x) {
|
|
2112
|
+
return Math.round(x).toString(2);
|
|
2113
|
+
},
|
|
2114
|
+
c: function(x) {
|
|
2115
|
+
return x + "";
|
|
2116
|
+
},
|
|
2117
|
+
d: formatDecimal,
|
|
2118
|
+
e: function(x, p) {
|
|
2119
|
+
return x.toExponential(p);
|
|
2120
|
+
},
|
|
2121
|
+
f: function(x, p) {
|
|
2122
|
+
return x.toFixed(p);
|
|
2123
|
+
},
|
|
2124
|
+
g: function(x, p) {
|
|
2125
|
+
return x.toPrecision(p);
|
|
2126
|
+
},
|
|
2127
|
+
o: function(x) {
|
|
2128
|
+
return Math.round(x).toString(8);
|
|
2129
|
+
},
|
|
2130
|
+
p: function(x, p) {
|
|
2131
|
+
return formatRounded(x * 100, p);
|
|
2132
|
+
},
|
|
2133
|
+
r: formatRounded,
|
|
2134
|
+
s: formatPrefixAuto,
|
|
2135
|
+
X: function(x) {
|
|
2136
|
+
return Math.round(x).toString(16).toUpperCase();
|
|
2137
|
+
},
|
|
2138
|
+
x: function(x) {
|
|
2139
|
+
return Math.round(x).toString(16);
|
|
2140
|
+
}
|
|
2141
|
+
};
|
|
2142
|
+
function identity(x) {
|
|
2143
|
+
return x;
|
|
2144
|
+
}
|
|
2145
|
+
var map = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
2146
|
+
function formatLocale$1(locale2) {
|
|
2147
|
+
var group = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity : formatGroup(map.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity : formatNumerals(map.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + "";
|
|
2148
|
+
function newFormat(specifier) {
|
|
2149
|
+
specifier = formatSpecifier(specifier);
|
|
2150
|
+
var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol = specifier.symbol, zero = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type;
|
|
2151
|
+
type === "n" ? (comma = !0, type = "g") : formatTypes[type] || (precision === void 0 && (precision = 12), trim = !0, type = "g"), (zero || fill === "0" && align === "=") && (zero = !0, fill = "0", align = "=");
|
|
2152
|
+
var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "", formatType = formatTypes[type], maybeSuffix = /[defgprs%]/.test(type);
|
|
2153
|
+
precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
|
|
2154
|
+
function format2(value) {
|
|
2155
|
+
var valuePrefix = prefix, valueSuffix = suffix, i, n, c;
|
|
2156
|
+
if (type === "c")
|
|
2157
|
+
valueSuffix = formatType(value) + valueSuffix, value = "";
|
|
2158
|
+
else {
|
|
2159
|
+
value = +value;
|
|
2160
|
+
var valueNegative = value < 0 || 1 / value < 0;
|
|
2161
|
+
if (value = isNaN(value) ? nan : formatType(Math.abs(value), precision), trim && (value = formatTrim(value)), valueNegative && +value == 0 && sign !== "+" && (valueNegative = !1), valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix, valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""), maybeSuffix) {
|
|
2162
|
+
for (i = -1, n = value.length; ++i < n; )
|
|
2163
|
+
if (c = value.charCodeAt(i), 48 > c || c > 57) {
|
|
2164
|
+
valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix, value = value.slice(0, i);
|
|
2165
|
+
break;
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
comma && !zero && (value = group(value, 1 / 0));
|
|
2170
|
+
var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : "";
|
|
2171
|
+
switch (comma && zero && (value = group(padding + value, padding.length ? width - valueSuffix.length : 1 / 0), padding = ""), align) {
|
|
2172
|
+
case "<":
|
|
2173
|
+
value = valuePrefix + value + valueSuffix + padding;
|
|
2174
|
+
break;
|
|
2175
|
+
case "=":
|
|
2176
|
+
value = valuePrefix + padding + value + valueSuffix;
|
|
2177
|
+
break;
|
|
2178
|
+
case "^":
|
|
2179
|
+
value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);
|
|
2180
|
+
break;
|
|
2181
|
+
default:
|
|
2182
|
+
value = padding + valuePrefix + value + valueSuffix;
|
|
2183
|
+
break;
|
|
2184
|
+
}
|
|
2185
|
+
return numerals(value);
|
|
2186
|
+
}
|
|
2187
|
+
return format2.toString = function() {
|
|
2188
|
+
return specifier + "";
|
|
2189
|
+
}, format2;
|
|
2190
|
+
}
|
|
2191
|
+
function formatPrefix(specifier, value) {
|
|
2192
|
+
var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3, k = Math.pow(10, -e), prefix = prefixes[8 + e / 3];
|
|
2193
|
+
return function(value2) {
|
|
2194
|
+
return f(k * value2) + prefix;
|
|
2195
|
+
};
|
|
2196
|
+
}
|
|
2197
|
+
return {
|
|
2198
|
+
format: newFormat,
|
|
2199
|
+
formatPrefix
|
|
2200
|
+
};
|
|
2201
|
+
}
|
|
2202
|
+
var locale$1, format;
|
|
2203
|
+
defaultLocale$1({
|
|
2204
|
+
decimal: ".",
|
|
2205
|
+
thousands: ",",
|
|
2206
|
+
grouping: [3],
|
|
2207
|
+
currency: ["$", ""],
|
|
2208
|
+
minus: "-"
|
|
2209
|
+
});
|
|
2210
|
+
function defaultLocale$1(definition) {
|
|
2211
|
+
return locale$1 = formatLocale$1(definition), format = locale$1.format, locale$1.formatPrefix, locale$1;
|
|
2212
|
+
}
|
|
2213
|
+
var t0 = /* @__PURE__ */ new Date(), t1 = /* @__PURE__ */ new Date();
|
|
2214
|
+
function newInterval(floori, offseti, count, field) {
|
|
2215
|
+
function interval(date) {
|
|
2216
|
+
return floori(date = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date)), date;
|
|
2217
|
+
}
|
|
2218
|
+
return interval.floor = function(date) {
|
|
2219
|
+
return floori(date = /* @__PURE__ */ new Date(+date)), date;
|
|
2220
|
+
}, interval.ceil = function(date) {
|
|
2221
|
+
return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
|
|
2222
|
+
}, interval.round = function(date) {
|
|
2223
|
+
var d0 = interval(date), d1 = interval.ceil(date);
|
|
2224
|
+
return date - d0 < d1 - date ? d0 : d1;
|
|
2225
|
+
}, interval.offset = function(date, step) {
|
|
2226
|
+
return offseti(date = /* @__PURE__ */ new Date(+date), step == null ? 1 : Math.floor(step)), date;
|
|
2227
|
+
}, interval.range = function(start, stop, step) {
|
|
2228
|
+
var range = [], previous;
|
|
2229
|
+
if (start = interval.ceil(start), step = step == null ? 1 : Math.floor(step), !(start < stop) || !(step > 0)) return range;
|
|
2230
|
+
do
|
|
2231
|
+
range.push(previous = /* @__PURE__ */ new Date(+start)), offseti(start, step), floori(start);
|
|
2232
|
+
while (previous < start && start < stop);
|
|
2233
|
+
return range;
|
|
2234
|
+
}, interval.filter = function(test) {
|
|
2235
|
+
return newInterval(function(date) {
|
|
2236
|
+
if (date >= date) for (; floori(date), !test(date); ) date.setTime(date - 1);
|
|
2237
|
+
}, function(date, step) {
|
|
2238
|
+
if (date >= date)
|
|
2239
|
+
if (step < 0) for (; ++step <= 0; )
|
|
2240
|
+
for (; offseti(date, -1), !test(date); )
|
|
2241
|
+
;
|
|
2242
|
+
else for (; --step >= 0; )
|
|
2243
|
+
for (; offseti(date, 1), !test(date); )
|
|
2244
|
+
;
|
|
2245
|
+
});
|
|
2246
|
+
}, count && (interval.count = function(start, end) {
|
|
2247
|
+
return t0.setTime(+start), t1.setTime(+end), floori(t0), floori(t1), Math.floor(count(t0, t1));
|
|
2248
|
+
}, interval.every = function(step) {
|
|
2249
|
+
return step = Math.floor(step), !isFinite(step) || !(step > 0) ? null : step > 1 ? interval.filter(field ? function(d) {
|
|
2250
|
+
return field(d) % step === 0;
|
|
2251
|
+
} : function(d) {
|
|
2252
|
+
return interval.count(0, d) % step === 0;
|
|
2253
|
+
}) : interval;
|
|
2254
|
+
}), interval;
|
|
2255
|
+
}
|
|
2256
|
+
var durationMinute = 6e4, durationDay = 864e5, durationWeek = 6048e5, day = newInterval(function(date) {
|
|
2257
|
+
date.setHours(0, 0, 0, 0);
|
|
2258
|
+
}, function(date, step) {
|
|
2259
|
+
date.setDate(date.getDate() + step);
|
|
2260
|
+
}, function(start, end) {
|
|
2261
|
+
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;
|
|
2262
|
+
}, function(date) {
|
|
2263
|
+
return date.getDate() - 1;
|
|
2264
|
+
});
|
|
2265
|
+
day.range;
|
|
2266
|
+
function weekday(i) {
|
|
2267
|
+
return newInterval(function(date) {
|
|
2268
|
+
date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7), date.setHours(0, 0, 0, 0);
|
|
2269
|
+
}, function(date, step) {
|
|
2270
|
+
date.setDate(date.getDate() + step * 7);
|
|
2271
|
+
}, function(start, end) {
|
|
2272
|
+
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
|
|
2273
|
+
});
|
|
2274
|
+
}
|
|
2275
|
+
var sunday = weekday(0), monday = weekday(1), tuesday = weekday(2), wednesday = weekday(3), thursday = weekday(4), friday = weekday(5), saturday = weekday(6);
|
|
2276
|
+
sunday.range;
|
|
2277
|
+
monday.range;
|
|
2278
|
+
tuesday.range;
|
|
2279
|
+
wednesday.range;
|
|
2280
|
+
thursday.range;
|
|
2281
|
+
friday.range;
|
|
2282
|
+
saturday.range;
|
|
2283
|
+
var year = newInterval(function(date) {
|
|
2284
|
+
date.setMonth(0, 1), date.setHours(0, 0, 0, 0);
|
|
2285
|
+
}, function(date, step) {
|
|
2286
|
+
date.setFullYear(date.getFullYear() + step);
|
|
2287
|
+
}, function(start, end) {
|
|
2288
|
+
return end.getFullYear() - start.getFullYear();
|
|
2289
|
+
}, function(date) {
|
|
2290
|
+
return date.getFullYear();
|
|
2291
|
+
});
|
|
2292
|
+
year.every = function(k) {
|
|
2293
|
+
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
|
|
2294
|
+
date.setFullYear(Math.floor(date.getFullYear() / k) * k), date.setMonth(0, 1), date.setHours(0, 0, 0, 0);
|
|
2295
|
+
}, function(date, step) {
|
|
2296
|
+
date.setFullYear(date.getFullYear() + step * k);
|
|
2297
|
+
});
|
|
2298
|
+
};
|
|
2299
|
+
year.range;
|
|
2300
|
+
var utcDay = newInterval(function(date) {
|
|
2301
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
2302
|
+
}, function(date, step) {
|
|
2303
|
+
date.setUTCDate(date.getUTCDate() + step);
|
|
2304
|
+
}, function(start, end) {
|
|
2305
|
+
return (end - start) / durationDay;
|
|
2306
|
+
}, function(date) {
|
|
2307
|
+
return date.getUTCDate() - 1;
|
|
2308
|
+
});
|
|
2309
|
+
utcDay.range;
|
|
2310
|
+
function utcWeekday(i) {
|
|
2311
|
+
return newInterval(function(date) {
|
|
2312
|
+
date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7), date.setUTCHours(0, 0, 0, 0);
|
|
2313
|
+
}, function(date, step) {
|
|
2314
|
+
date.setUTCDate(date.getUTCDate() + step * 7);
|
|
2315
|
+
}, function(start, end) {
|
|
2316
|
+
return (end - start) / durationWeek;
|
|
2317
|
+
});
|
|
2318
|
+
}
|
|
2319
|
+
var utcSunday = utcWeekday(0), utcMonday = utcWeekday(1), utcTuesday = utcWeekday(2), utcWednesday = utcWeekday(3), utcThursday = utcWeekday(4), utcFriday = utcWeekday(5), utcSaturday = utcWeekday(6);
|
|
2320
|
+
utcSunday.range;
|
|
2321
|
+
utcMonday.range;
|
|
2322
|
+
utcTuesday.range;
|
|
2323
|
+
utcWednesday.range;
|
|
2324
|
+
utcThursday.range;
|
|
2325
|
+
utcFriday.range;
|
|
2326
|
+
utcSaturday.range;
|
|
2327
|
+
var utcYear = newInterval(function(date) {
|
|
2328
|
+
date.setUTCMonth(0, 1), date.setUTCHours(0, 0, 0, 0);
|
|
2329
|
+
}, function(date, step) {
|
|
2330
|
+
date.setUTCFullYear(date.getUTCFullYear() + step);
|
|
2331
|
+
}, function(start, end) {
|
|
2332
|
+
return end.getUTCFullYear() - start.getUTCFullYear();
|
|
2333
|
+
}, function(date) {
|
|
2334
|
+
return date.getUTCFullYear();
|
|
2335
|
+
});
|
|
2336
|
+
utcYear.every = function(k) {
|
|
2337
|
+
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
|
|
2338
|
+
date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k), date.setUTCMonth(0, 1), date.setUTCHours(0, 0, 0, 0);
|
|
2339
|
+
}, function(date, step) {
|
|
2340
|
+
date.setUTCFullYear(date.getUTCFullYear() + step * k);
|
|
2341
|
+
});
|
|
2342
|
+
};
|
|
2343
|
+
utcYear.range;
|
|
2344
|
+
function localDate(d) {
|
|
2345
|
+
if (0 <= d.y && d.y < 100) {
|
|
2346
|
+
var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
|
|
2347
|
+
return date.setFullYear(d.y), date;
|
|
2348
|
+
}
|
|
2349
|
+
return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
|
|
2350
|
+
}
|
|
2351
|
+
function utcDate(d) {
|
|
2352
|
+
if (0 <= d.y && d.y < 100) {
|
|
2353
|
+
var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
|
|
2354
|
+
return date.setUTCFullYear(d.y), date;
|
|
2355
|
+
}
|
|
2356
|
+
return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
|
|
2357
|
+
}
|
|
2358
|
+
function newDate(y, m, d) {
|
|
2359
|
+
return { y, m, d, H: 0, M: 0, S: 0, L: 0 };
|
|
2360
|
+
}
|
|
2361
|
+
function formatLocale(locale2) {
|
|
2362
|
+
var locale_dateTime = locale2.dateTime, locale_date = locale2.date, locale_time = locale2.time, locale_periods = locale2.periods, locale_weekdays = locale2.days, locale_shortWeekdays = locale2.shortDays, locale_months = locale2.months, locale_shortMonths = locale2.shortMonths, periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths), formats = {
|
|
2363
|
+
a: formatShortWeekday,
|
|
2364
|
+
A: formatWeekday,
|
|
2365
|
+
b: formatShortMonth,
|
|
2366
|
+
B: formatMonth,
|
|
2367
|
+
c: null,
|
|
2368
|
+
d: formatDayOfMonth,
|
|
2369
|
+
e: formatDayOfMonth,
|
|
2370
|
+
f: formatMicroseconds,
|
|
2371
|
+
g: formatYearISO,
|
|
2372
|
+
G: formatFullYearISO,
|
|
2373
|
+
H: formatHour24,
|
|
2374
|
+
I: formatHour12,
|
|
2375
|
+
j: formatDayOfYear,
|
|
2376
|
+
L: formatMilliseconds,
|
|
2377
|
+
m: formatMonthNumber,
|
|
2378
|
+
M: formatMinutes,
|
|
2379
|
+
p: formatPeriod,
|
|
2380
|
+
q: formatQuarter,
|
|
2381
|
+
Q: formatUnixTimestamp,
|
|
2382
|
+
s: formatUnixTimestampSeconds,
|
|
2383
|
+
S: formatSeconds,
|
|
2384
|
+
u: formatWeekdayNumberMonday,
|
|
2385
|
+
U: formatWeekNumberSunday,
|
|
2386
|
+
V: formatWeekNumberISO,
|
|
2387
|
+
w: formatWeekdayNumberSunday,
|
|
2388
|
+
W: formatWeekNumberMonday,
|
|
2389
|
+
x: null,
|
|
2390
|
+
X: null,
|
|
2391
|
+
y: formatYear,
|
|
2392
|
+
Y: formatFullYear,
|
|
2393
|
+
Z: formatZone,
|
|
2394
|
+
"%": formatLiteralPercent
|
|
2395
|
+
}, utcFormats = {
|
|
2396
|
+
a: formatUTCShortWeekday,
|
|
2397
|
+
A: formatUTCWeekday,
|
|
2398
|
+
b: formatUTCShortMonth,
|
|
2399
|
+
B: formatUTCMonth,
|
|
2400
|
+
c: null,
|
|
2401
|
+
d: formatUTCDayOfMonth,
|
|
2402
|
+
e: formatUTCDayOfMonth,
|
|
2403
|
+
f: formatUTCMicroseconds,
|
|
2404
|
+
g: formatUTCYearISO,
|
|
2405
|
+
G: formatUTCFullYearISO,
|
|
2406
|
+
H: formatUTCHour24,
|
|
2407
|
+
I: formatUTCHour12,
|
|
2408
|
+
j: formatUTCDayOfYear,
|
|
2409
|
+
L: formatUTCMilliseconds,
|
|
2410
|
+
m: formatUTCMonthNumber,
|
|
2411
|
+
M: formatUTCMinutes,
|
|
2412
|
+
p: formatUTCPeriod,
|
|
2413
|
+
q: formatUTCQuarter,
|
|
2414
|
+
Q: formatUnixTimestamp,
|
|
2415
|
+
s: formatUnixTimestampSeconds,
|
|
2416
|
+
S: formatUTCSeconds,
|
|
2417
|
+
u: formatUTCWeekdayNumberMonday,
|
|
2418
|
+
U: formatUTCWeekNumberSunday,
|
|
2419
|
+
V: formatUTCWeekNumberISO,
|
|
2420
|
+
w: formatUTCWeekdayNumberSunday,
|
|
2421
|
+
W: formatUTCWeekNumberMonday,
|
|
2422
|
+
x: null,
|
|
2423
|
+
X: null,
|
|
2424
|
+
y: formatUTCYear,
|
|
2425
|
+
Y: formatUTCFullYear,
|
|
2426
|
+
Z: formatUTCZone,
|
|
2427
|
+
"%": formatLiteralPercent
|
|
2428
|
+
}, parses = {
|
|
2429
|
+
a: parseShortWeekday,
|
|
2430
|
+
A: parseWeekday,
|
|
2431
|
+
b: parseShortMonth,
|
|
2432
|
+
B: parseMonth,
|
|
2433
|
+
c: parseLocaleDateTime,
|
|
2434
|
+
d: parseDayOfMonth,
|
|
2435
|
+
e: parseDayOfMonth,
|
|
2436
|
+
f: parseMicroseconds,
|
|
2437
|
+
g: parseYear,
|
|
2438
|
+
G: parseFullYear,
|
|
2439
|
+
H: parseHour24,
|
|
2440
|
+
I: parseHour24,
|
|
2441
|
+
j: parseDayOfYear,
|
|
2442
|
+
L: parseMilliseconds,
|
|
2443
|
+
m: parseMonthNumber,
|
|
2444
|
+
M: parseMinutes,
|
|
2445
|
+
p: parsePeriod,
|
|
2446
|
+
q: parseQuarter,
|
|
2447
|
+
Q: parseUnixTimestamp,
|
|
2448
|
+
s: parseUnixTimestampSeconds,
|
|
2449
|
+
S: parseSeconds,
|
|
2450
|
+
u: parseWeekdayNumberMonday,
|
|
2451
|
+
U: parseWeekNumberSunday,
|
|
2452
|
+
V: parseWeekNumberISO,
|
|
2453
|
+
w: parseWeekdayNumberSunday,
|
|
2454
|
+
W: parseWeekNumberMonday,
|
|
2455
|
+
x: parseLocaleDate,
|
|
2456
|
+
X: parseLocaleTime,
|
|
2457
|
+
y: parseYear,
|
|
2458
|
+
Y: parseFullYear,
|
|
2459
|
+
Z: parseZone,
|
|
2460
|
+
"%": parseLiteralPercent
|
|
2461
|
+
};
|
|
2462
|
+
formats.x = newFormat(locale_date, formats), formats.X = newFormat(locale_time, formats), formats.c = newFormat(locale_dateTime, formats), utcFormats.x = newFormat(locale_date, utcFormats), utcFormats.X = newFormat(locale_time, utcFormats), utcFormats.c = newFormat(locale_dateTime, utcFormats);
|
|
2463
|
+
function newFormat(specifier, formats2) {
|
|
2464
|
+
return function(date) {
|
|
2465
|
+
var string = [], i = -1, j = 0, n = specifier.length, c, pad2, format2;
|
|
2466
|
+
for (date instanceof Date || (date = /* @__PURE__ */ new Date(+date)); ++i < n; )
|
|
2467
|
+
specifier.charCodeAt(i) === 37 && (string.push(specifier.slice(j, i)), (pad2 = pads[c = specifier.charAt(++i)]) != null ? c = specifier.charAt(++i) : pad2 = c === "e" ? " " : "0", (format2 = formats2[c]) && (c = format2(date, pad2)), string.push(c), j = i + 1);
|
|
2468
|
+
return string.push(specifier.slice(j, i)), string.join("");
|
|
2469
|
+
};
|
|
2470
|
+
}
|
|
2471
|
+
function newParse(specifier, Z) {
|
|
2472
|
+
return function(string) {
|
|
2473
|
+
var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day$1;
|
|
2474
|
+
if (i != string.length) return null;
|
|
2475
|
+
if ("Q" in d) return new Date(d.Q);
|
|
2476
|
+
if ("s" in d) return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
|
|
2477
|
+
if (Z && !("Z" in d) && (d.Z = 0), "p" in d && (d.H = d.H % 12 + d.p * 12), d.m === void 0 && (d.m = "q" in d ? d.q : 0), "V" in d) {
|
|
2478
|
+
if (d.V < 1 || d.V > 53) return null;
|
|
2479
|
+
"w" in d || (d.w = 1), "Z" in d ? (week = utcDate(newDate(d.y, 0, 1)), day$1 = week.getUTCDay(), week = day$1 > 4 || day$1 === 0 ? utcMonday.ceil(week) : utcMonday(week), week = utcDay.offset(week, (d.V - 1) * 7), d.y = week.getUTCFullYear(), d.m = week.getUTCMonth(), d.d = week.getUTCDate() + (d.w + 6) % 7) : (week = localDate(newDate(d.y, 0, 1)), day$1 = week.getDay(), week = day$1 > 4 || day$1 === 0 ? monday.ceil(week) : monday(week), week = day.offset(week, (d.V - 1) * 7), d.y = week.getFullYear(), d.m = week.getMonth(), d.d = week.getDate() + (d.w + 6) % 7);
|
|
2480
|
+
} else ("W" in d || "U" in d) && ("w" in d || (d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0), day$1 = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(), d.m = 0, d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day$1 + 5) % 7 : d.w + d.U * 7 - (day$1 + 6) % 7);
|
|
2481
|
+
return "Z" in d ? (d.H += d.Z / 100 | 0, d.M += d.Z % 100, utcDate(d)) : localDate(d);
|
|
2482
|
+
};
|
|
2483
|
+
}
|
|
2484
|
+
function parseSpecifier(d, specifier, string, j) {
|
|
2485
|
+
for (var i = 0, n = specifier.length, m = string.length, c, parse; i < n; ) {
|
|
2486
|
+
if (j >= m) return -1;
|
|
2487
|
+
if (c = specifier.charCodeAt(i++), c === 37) {
|
|
2488
|
+
if (c = specifier.charAt(i++), parse = parses[c in pads ? specifier.charAt(i++) : c], !parse || (j = parse(d, string, j)) < 0) return -1;
|
|
2489
|
+
} else if (c != string.charCodeAt(j++))
|
|
2490
|
+
return -1;
|
|
2491
|
+
}
|
|
2492
|
+
return j;
|
|
2493
|
+
}
|
|
2494
|
+
function parsePeriod(d, string, i) {
|
|
2495
|
+
var n = periodRe.exec(string.slice(i));
|
|
2496
|
+
return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2497
|
+
}
|
|
2498
|
+
function parseShortWeekday(d, string, i) {
|
|
2499
|
+
var n = shortWeekdayRe.exec(string.slice(i));
|
|
2500
|
+
return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2501
|
+
}
|
|
2502
|
+
function parseWeekday(d, string, i) {
|
|
2503
|
+
var n = weekdayRe.exec(string.slice(i));
|
|
2504
|
+
return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2505
|
+
}
|
|
2506
|
+
function parseShortMonth(d, string, i) {
|
|
2507
|
+
var n = shortMonthRe.exec(string.slice(i));
|
|
2508
|
+
return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2509
|
+
}
|
|
2510
|
+
function parseMonth(d, string, i) {
|
|
2511
|
+
var n = monthRe.exec(string.slice(i));
|
|
2512
|
+
return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2513
|
+
}
|
|
2514
|
+
function parseLocaleDateTime(d, string, i) {
|
|
2515
|
+
return parseSpecifier(d, locale_dateTime, string, i);
|
|
2516
|
+
}
|
|
2517
|
+
function parseLocaleDate(d, string, i) {
|
|
2518
|
+
return parseSpecifier(d, locale_date, string, i);
|
|
2519
|
+
}
|
|
2520
|
+
function parseLocaleTime(d, string, i) {
|
|
2521
|
+
return parseSpecifier(d, locale_time, string, i);
|
|
2522
|
+
}
|
|
2523
|
+
function formatShortWeekday(d) {
|
|
2524
|
+
return locale_shortWeekdays[d.getDay()];
|
|
2525
|
+
}
|
|
2526
|
+
function formatWeekday(d) {
|
|
2527
|
+
return locale_weekdays[d.getDay()];
|
|
2528
|
+
}
|
|
2529
|
+
function formatShortMonth(d) {
|
|
2530
|
+
return locale_shortMonths[d.getMonth()];
|
|
2531
|
+
}
|
|
2532
|
+
function formatMonth(d) {
|
|
2533
|
+
return locale_months[d.getMonth()];
|
|
2534
|
+
}
|
|
2535
|
+
function formatPeriod(d) {
|
|
2536
|
+
return locale_periods[+(d.getHours() >= 12)];
|
|
2537
|
+
}
|
|
2538
|
+
function formatQuarter(d) {
|
|
2539
|
+
return 1 + ~~(d.getMonth() / 3);
|
|
2540
|
+
}
|
|
2541
|
+
function formatUTCShortWeekday(d) {
|
|
2542
|
+
return locale_shortWeekdays[d.getUTCDay()];
|
|
2543
|
+
}
|
|
2544
|
+
function formatUTCWeekday(d) {
|
|
2545
|
+
return locale_weekdays[d.getUTCDay()];
|
|
2546
|
+
}
|
|
2547
|
+
function formatUTCShortMonth(d) {
|
|
2548
|
+
return locale_shortMonths[d.getUTCMonth()];
|
|
2549
|
+
}
|
|
2550
|
+
function formatUTCMonth(d) {
|
|
2551
|
+
return locale_months[d.getUTCMonth()];
|
|
2552
|
+
}
|
|
2553
|
+
function formatUTCPeriod(d) {
|
|
2554
|
+
return locale_periods[+(d.getUTCHours() >= 12)];
|
|
2555
|
+
}
|
|
2556
|
+
function formatUTCQuarter(d) {
|
|
2557
|
+
return 1 + ~~(d.getUTCMonth() / 3);
|
|
2558
|
+
}
|
|
2559
|
+
return {
|
|
2560
|
+
format: function(specifier) {
|
|
2561
|
+
var f = newFormat(specifier += "", formats);
|
|
2562
|
+
return f.toString = function() {
|
|
2563
|
+
return specifier;
|
|
2564
|
+
}, f;
|
|
2565
|
+
},
|
|
2566
|
+
parse: function(specifier) {
|
|
2567
|
+
var p = newParse(specifier += "", !1);
|
|
2568
|
+
return p.toString = function() {
|
|
2569
|
+
return specifier;
|
|
2570
|
+
}, p;
|
|
2571
|
+
},
|
|
2572
|
+
utcFormat: function(specifier) {
|
|
2573
|
+
var f = newFormat(specifier += "", utcFormats);
|
|
2574
|
+
return f.toString = function() {
|
|
2575
|
+
return specifier;
|
|
2576
|
+
}, f;
|
|
2577
|
+
},
|
|
2578
|
+
utcParse: function(specifier) {
|
|
2579
|
+
var p = newParse(specifier += "", !0);
|
|
2580
|
+
return p.toString = function() {
|
|
2581
|
+
return specifier;
|
|
2582
|
+
}, p;
|
|
2583
|
+
}
|
|
2584
|
+
};
|
|
2585
|
+
}
|
|
2586
|
+
var pads = { "-": "", _: " ", 0: "0" }, numberRe = /^\s*\d+/, percentRe = /^%/, requoteRe = /[\\^$*+?|[\]().{}]/g;
|
|
2587
|
+
function pad(value, fill, width) {
|
|
2588
|
+
var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length;
|
|
2589
|
+
return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
|
|
2590
|
+
}
|
|
2591
|
+
function requote(s) {
|
|
2592
|
+
return s.replace(requoteRe, "\\$&");
|
|
2593
|
+
}
|
|
2594
|
+
function formatRe(names) {
|
|
2595
|
+
return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
|
|
2596
|
+
}
|
|
2597
|
+
function formatLookup(names) {
|
|
2598
|
+
for (var map2 = {}, i = -1, n = names.length; ++i < n; ) map2[names[i].toLowerCase()] = i;
|
|
2599
|
+
return map2;
|
|
2600
|
+
}
|
|
2601
|
+
function parseWeekdayNumberSunday(d, string, i) {
|
|
2602
|
+
var n = numberRe.exec(string.slice(i, i + 1));
|
|
2603
|
+
return n ? (d.w = +n[0], i + n[0].length) : -1;
|
|
2604
|
+
}
|
|
2605
|
+
function parseWeekdayNumberMonday(d, string, i) {
|
|
2606
|
+
var n = numberRe.exec(string.slice(i, i + 1));
|
|
2607
|
+
return n ? (d.u = +n[0], i + n[0].length) : -1;
|
|
2608
|
+
}
|
|
2609
|
+
function parseWeekNumberSunday(d, string, i) {
|
|
2610
|
+
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2611
|
+
return n ? (d.U = +n[0], i + n[0].length) : -1;
|
|
2612
|
+
}
|
|
2613
|
+
function parseWeekNumberISO(d, string, i) {
|
|
2614
|
+
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2615
|
+
return n ? (d.V = +n[0], i + n[0].length) : -1;
|
|
2616
|
+
}
|
|
2617
|
+
function parseWeekNumberMonday(d, string, i) {
|
|
2618
|
+
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2619
|
+
return n ? (d.W = +n[0], i + n[0].length) : -1;
|
|
2620
|
+
}
|
|
2621
|
+
function parseFullYear(d, string, i) {
|
|
2622
|
+
var n = numberRe.exec(string.slice(i, i + 4));
|
|
2623
|
+
return n ? (d.y = +n[0], i + n[0].length) : -1;
|
|
2624
|
+
}
|
|
2625
|
+
function parseYear(d, string, i) {
|
|
2626
|
+
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2627
|
+
return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1;
|
|
2628
|
+
}
|
|
2629
|
+
function parseZone(d, string, i) {
|
|
2630
|
+
var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
|
|
2631
|
+
return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
|
|
2632
|
+
}
|
|
2633
|
+
function parseQuarter(d, string, i) {
|
|
2634
|
+
var n = numberRe.exec(string.slice(i, i + 1));
|
|
2635
|
+
return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
|
|
2636
|
+
}
|
|
2637
|
+
function parseMonthNumber(d, string, i) {
|
|
2638
|
+
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2639
|
+
return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
|
|
2640
|
+
}
|
|
2641
|
+
function parseDayOfMonth(d, string, i) {
|
|
2642
|
+
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2643
|
+
return n ? (d.d = +n[0], i + n[0].length) : -1;
|
|
2644
|
+
}
|
|
2645
|
+
function parseDayOfYear(d, string, i) {
|
|
2646
|
+
var n = numberRe.exec(string.slice(i, i + 3));
|
|
2647
|
+
return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
|
|
2648
|
+
}
|
|
2649
|
+
function parseHour24(d, string, i) {
|
|
2650
|
+
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2651
|
+
return n ? (d.H = +n[0], i + n[0].length) : -1;
|
|
2652
|
+
}
|
|
2653
|
+
function parseMinutes(d, string, i) {
|
|
2654
|
+
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2655
|
+
return n ? (d.M = +n[0], i + n[0].length) : -1;
|
|
2656
|
+
}
|
|
2657
|
+
function parseSeconds(d, string, i) {
|
|
2658
|
+
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2659
|
+
return n ? (d.S = +n[0], i + n[0].length) : -1;
|
|
2660
|
+
}
|
|
2661
|
+
function parseMilliseconds(d, string, i) {
|
|
2662
|
+
var n = numberRe.exec(string.slice(i, i + 3));
|
|
2663
|
+
return n ? (d.L = +n[0], i + n[0].length) : -1;
|
|
2664
|
+
}
|
|
2665
|
+
function parseMicroseconds(d, string, i) {
|
|
2666
|
+
var n = numberRe.exec(string.slice(i, i + 6));
|
|
2667
|
+
return n ? (d.L = Math.floor(n[0] / 1e3), i + n[0].length) : -1;
|
|
2668
|
+
}
|
|
2669
|
+
function parseLiteralPercent(d, string, i) {
|
|
2670
|
+
var n = percentRe.exec(string.slice(i, i + 1));
|
|
2671
|
+
return n ? i + n[0].length : -1;
|
|
2672
|
+
}
|
|
2673
|
+
function parseUnixTimestamp(d, string, i) {
|
|
2674
|
+
var n = numberRe.exec(string.slice(i));
|
|
2675
|
+
return n ? (d.Q = +n[0], i + n[0].length) : -1;
|
|
2676
|
+
}
|
|
2677
|
+
function parseUnixTimestampSeconds(d, string, i) {
|
|
2678
|
+
var n = numberRe.exec(string.slice(i));
|
|
2679
|
+
return n ? (d.s = +n[0], i + n[0].length) : -1;
|
|
2680
|
+
}
|
|
2681
|
+
function formatDayOfMonth(d, p) {
|
|
2682
|
+
return pad(d.getDate(), p, 2);
|
|
2683
|
+
}
|
|
2684
|
+
function formatHour24(d, p) {
|
|
2685
|
+
return pad(d.getHours(), p, 2);
|
|
2686
|
+
}
|
|
2687
|
+
function formatHour12(d, p) {
|
|
2688
|
+
return pad(d.getHours() % 12 || 12, p, 2);
|
|
2689
|
+
}
|
|
2690
|
+
function formatDayOfYear(d, p) {
|
|
2691
|
+
return pad(1 + day.count(year(d), d), p, 3);
|
|
2692
|
+
}
|
|
2693
|
+
function formatMilliseconds(d, p) {
|
|
2694
|
+
return pad(d.getMilliseconds(), p, 3);
|
|
2695
|
+
}
|
|
2696
|
+
function formatMicroseconds(d, p) {
|
|
2697
|
+
return formatMilliseconds(d, p) + "000";
|
|
2698
|
+
}
|
|
2699
|
+
function formatMonthNumber(d, p) {
|
|
2700
|
+
return pad(d.getMonth() + 1, p, 2);
|
|
2701
|
+
}
|
|
2702
|
+
function formatMinutes(d, p) {
|
|
2703
|
+
return pad(d.getMinutes(), p, 2);
|
|
2704
|
+
}
|
|
2705
|
+
function formatSeconds(d, p) {
|
|
2706
|
+
return pad(d.getSeconds(), p, 2);
|
|
2707
|
+
}
|
|
2708
|
+
function formatWeekdayNumberMonday(d) {
|
|
2709
|
+
var day2 = d.getDay();
|
|
2710
|
+
return day2 === 0 ? 7 : day2;
|
|
2711
|
+
}
|
|
2712
|
+
function formatWeekNumberSunday(d, p) {
|
|
2713
|
+
return pad(sunday.count(year(d) - 1, d), p, 2);
|
|
2714
|
+
}
|
|
2715
|
+
function dISO(d) {
|
|
2716
|
+
var day2 = d.getDay();
|
|
2717
|
+
return day2 >= 4 || day2 === 0 ? thursday(d) : thursday.ceil(d);
|
|
2718
|
+
}
|
|
2719
|
+
function formatWeekNumberISO(d, p) {
|
|
2720
|
+
return d = dISO(d), pad(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2);
|
|
2721
|
+
}
|
|
2722
|
+
function formatWeekdayNumberSunday(d) {
|
|
2723
|
+
return d.getDay();
|
|
2724
|
+
}
|
|
2725
|
+
function formatWeekNumberMonday(d, p) {
|
|
2726
|
+
return pad(monday.count(year(d) - 1, d), p, 2);
|
|
2727
|
+
}
|
|
2728
|
+
function formatYear(d, p) {
|
|
2729
|
+
return pad(d.getFullYear() % 100, p, 2);
|
|
2730
|
+
}
|
|
2731
|
+
function formatYearISO(d, p) {
|
|
2732
|
+
return d = dISO(d), pad(d.getFullYear() % 100, p, 2);
|
|
2733
|
+
}
|
|
2734
|
+
function formatFullYear(d, p) {
|
|
2735
|
+
return pad(d.getFullYear() % 1e4, p, 4);
|
|
2736
|
+
}
|
|
2737
|
+
function formatFullYearISO(d, p) {
|
|
2738
|
+
var day2 = d.getDay();
|
|
2739
|
+
return d = day2 >= 4 || day2 === 0 ? thursday(d) : thursday.ceil(d), pad(d.getFullYear() % 1e4, p, 4);
|
|
2740
|
+
}
|
|
2741
|
+
function formatZone(d) {
|
|
2742
|
+
var z = d.getTimezoneOffset();
|
|
2743
|
+
return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2);
|
|
2744
|
+
}
|
|
2745
|
+
function formatUTCDayOfMonth(d, p) {
|
|
2746
|
+
return pad(d.getUTCDate(), p, 2);
|
|
2747
|
+
}
|
|
2748
|
+
function formatUTCHour24(d, p) {
|
|
2749
|
+
return pad(d.getUTCHours(), p, 2);
|
|
2750
|
+
}
|
|
2751
|
+
function formatUTCHour12(d, p) {
|
|
2752
|
+
return pad(d.getUTCHours() % 12 || 12, p, 2);
|
|
2753
|
+
}
|
|
2754
|
+
function formatUTCDayOfYear(d, p) {
|
|
2755
|
+
return pad(1 + utcDay.count(utcYear(d), d), p, 3);
|
|
2756
|
+
}
|
|
2757
|
+
function formatUTCMilliseconds(d, p) {
|
|
2758
|
+
return pad(d.getUTCMilliseconds(), p, 3);
|
|
2759
|
+
}
|
|
2760
|
+
function formatUTCMicroseconds(d, p) {
|
|
2761
|
+
return formatUTCMilliseconds(d, p) + "000";
|
|
2762
|
+
}
|
|
2763
|
+
function formatUTCMonthNumber(d, p) {
|
|
2764
|
+
return pad(d.getUTCMonth() + 1, p, 2);
|
|
2765
|
+
}
|
|
2766
|
+
function formatUTCMinutes(d, p) {
|
|
2767
|
+
return pad(d.getUTCMinutes(), p, 2);
|
|
2768
|
+
}
|
|
2769
|
+
function formatUTCSeconds(d, p) {
|
|
2770
|
+
return pad(d.getUTCSeconds(), p, 2);
|
|
2771
|
+
}
|
|
2772
|
+
function formatUTCWeekdayNumberMonday(d) {
|
|
2773
|
+
var dow = d.getUTCDay();
|
|
2774
|
+
return dow === 0 ? 7 : dow;
|
|
2775
|
+
}
|
|
2776
|
+
function formatUTCWeekNumberSunday(d, p) {
|
|
2777
|
+
return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);
|
|
2778
|
+
}
|
|
2779
|
+
function UTCdISO(d) {
|
|
2780
|
+
var day2 = d.getUTCDay();
|
|
2781
|
+
return day2 >= 4 || day2 === 0 ? utcThursday(d) : utcThursday.ceil(d);
|
|
2782
|
+
}
|
|
2783
|
+
function formatUTCWeekNumberISO(d, p) {
|
|
2784
|
+
return d = UTCdISO(d), pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);
|
|
2785
|
+
}
|
|
2786
|
+
function formatUTCWeekdayNumberSunday(d) {
|
|
2787
|
+
return d.getUTCDay();
|
|
2788
|
+
}
|
|
2789
|
+
function formatUTCWeekNumberMonday(d, p) {
|
|
2790
|
+
return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);
|
|
2791
|
+
}
|
|
2792
|
+
function formatUTCYear(d, p) {
|
|
2793
|
+
return pad(d.getUTCFullYear() % 100, p, 2);
|
|
2794
|
+
}
|
|
2795
|
+
function formatUTCYearISO(d, p) {
|
|
2796
|
+
return d = UTCdISO(d), pad(d.getUTCFullYear() % 100, p, 2);
|
|
2797
|
+
}
|
|
2798
|
+
function formatUTCFullYear(d, p) {
|
|
2799
|
+
return pad(d.getUTCFullYear() % 1e4, p, 4);
|
|
2800
|
+
}
|
|
2801
|
+
function formatUTCFullYearISO(d, p) {
|
|
2802
|
+
var day2 = d.getUTCDay();
|
|
2803
|
+
return d = day2 >= 4 || day2 === 0 ? utcThursday(d) : utcThursday.ceil(d), pad(d.getUTCFullYear() % 1e4, p, 4);
|
|
2804
|
+
}
|
|
2805
|
+
function formatUTCZone() {
|
|
2806
|
+
return "+0000";
|
|
2807
|
+
}
|
|
2808
|
+
function formatLiteralPercent() {
|
|
2809
|
+
return "%";
|
|
2810
|
+
}
|
|
2811
|
+
function formatUnixTimestamp(d) {
|
|
2812
|
+
return +d;
|
|
2813
|
+
}
|
|
2814
|
+
function formatUnixTimestampSeconds(d) {
|
|
2815
|
+
return Math.floor(+d / 1e3);
|
|
2816
|
+
}
|
|
2817
|
+
var locale, utcFormat, utcParse;
|
|
2818
|
+
defaultLocale({
|
|
2819
|
+
dateTime: "%x, %X",
|
|
2820
|
+
date: "%-m/%-d/%Y",
|
|
2821
|
+
time: "%-I:%M:%S %p",
|
|
2822
|
+
periods: ["AM", "PM"],
|
|
2823
|
+
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
2824
|
+
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
2825
|
+
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
|
2826
|
+
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
|
2827
|
+
});
|
|
2828
|
+
function defaultLocale(definition) {
|
|
2829
|
+
return locale = formatLocale(definition), locale.format, locale.parse, utcFormat = locale.utcFormat, utcParse = locale.utcParse, locale;
|
|
2830
|
+
}
|
|
1976
2831
|
class ECLGraph extends StateObject {
|
|
1977
2832
|
constructor(wu, eclGraph, eclTimers) {
|
|
1978
2833
|
super();
|
|
@@ -2735,7 +3590,7 @@ function formatValues(item, key, dedup) {
|
|
|
2735
3590
|
const keyParts = splitMetric(key);
|
|
2736
3591
|
if (!dedup[keyParts.measure]) {
|
|
2737
3592
|
dedup[keyParts.label] = !0;
|
|
2738
|
-
const avg = safeParseFloat(item[`${keyParts.measure}Avg${keyParts.label}`]), min = safeParseFloat(item[`${keyParts.measure}Min${keyParts.label}`]),
|
|
3593
|
+
const avg = safeParseFloat(item[`${keyParts.measure}Avg${keyParts.label}`]), min = safeParseFloat(item[`${keyParts.measure}Min${keyParts.label}`]), max = safeParseFloat(item[`${keyParts.measure}Max${keyParts.label}`]), stdDev = safeParseFloat(item[`${keyParts.measure}StdDev${keyParts.label}`]), StdDevs = Math.max((avg - min) / stdDev, (max - avg) / stdDev);
|
|
2739
3594
|
return {
|
|
2740
3595
|
Key: `${keyParts.measure}${keyParts.label}`,
|
|
2741
3596
|
Value: formatValue(item, `${keyParts.measure}${keyParts.label}`),
|