@hot-updater/console 0.36.7 → 1.0.0-rc.1
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/.output/nitro.json +1 -1
- package/.output/public/assets/BundleIdDisplay-D4ErdU5_.js +1 -0
- package/.output/public/assets/InsightsCapabilityContext-B42VqvP6.js +1 -0
- package/.output/public/assets/api-keys-api-DGVTTvTJ.js +1 -0
- package/.output/public/assets/api-keys-z16OZIP4.js +1 -0
- package/.output/public/assets/badge-Br_KDO0J.js +1 -0
- package/.output/public/assets/card-DzuEXvyJ.js +1 -0
- package/.output/public/assets/chart-no-axes-combined-FaYMGmQS.js +1 -0
- package/.output/public/assets/createServerFn-gM2-LFBy.js +3 -0
- package/.output/public/assets/dialog-BeAENgez.js +1 -0
- package/.output/public/assets/dist-Bssh_cv0.js +1 -0
- package/.output/public/assets/field-Buq148-A.js +1 -0
- package/.output/public/assets/index-uOpQAIC4.js +10 -0
- package/.output/public/assets/input-group-B3p5UpyW.js +1 -0
- package/.output/public/assets/insights-DJTr7Ozn.js +1 -0
- package/.output/public/assets/insights-api-DVMOoRMS.js +1 -0
- package/.output/public/assets/installations-BY64iIAK.js +2 -0
- package/.output/public/assets/installations-D5v9i3AL.js +1 -0
- package/.output/public/assets/lazyRouteComponent-DKYu5cZJ.js +1 -0
- package/.output/public/assets/preload-helper-CQ36nxok.js +1 -0
- package/.output/public/assets/refresh-cw-BkbfZ62O.js +1 -0
- package/.output/public/assets/routes-BuoI5-Cr.js +2 -0
- package/.output/public/assets/routes-C8fvgETO.js +1 -0
- package/.output/public/assets/search-qsIDvS2I.js +1 -0
- package/.output/public/assets/shield-check-DE_hVuHu.js +1 -0
- package/.output/public/assets/signing-mJD88Y4C.js +1 -0
- package/.output/public/assets/styles-BZIG7t42.css +2 -0
- package/.output/public/assets/table-RamFEclP.js +1 -0
- package/.output/public/assets/useCompositeListItem-ChzDqdpc.js +42 -0
- package/.output/public/assets/useMutation-JsGVjQMY.js +1 -0
- package/.output/public/assets/useOpenInteractionType-Dwfy-SpA.js +1 -0
- package/.output/server/__23tanstack-start-server-fn-resolver-Dftxlm2E.mjs +146 -0
- package/.output/server/_libs/@base-ui/react+[...].mjs +16124 -0
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +41 -10
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +132 -0
- package/.output/server/_libs/d3-array.mjs +231 -0
- package/.output/server/_libs/d3-color.mjs +330 -0
- package/.output/server/_libs/d3-format.mjs +252 -0
- package/.output/server/_libs/d3-interpolate.mjs +207 -0
- package/.output/server/_libs/d3-path.mjs +77 -0
- package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
- package/.output/server/_libs/d3-shape.mjs +818 -0
- package/.output/server/_libs/decimal.js-light.mjs +884 -0
- package/.output/server/_libs/es-toolkit.mjs +1134 -0
- package/.output/server/_libs/eventemitter3.mjs +236 -0
- package/.output/server/_libs/immer.mjs +532 -0
- package/.output/server/_libs/lucide-react.mjs +141 -13
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+[...].mjs +14117 -0
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__query-core.mjs +114 -1
- package/.output/server/_libs/tanstack__react-query.mjs +3 -4
- package/.output/server/_runtime.mjs +10 -1
- package/.output/server/_ssr/BundleActivityChart-CWcdPuUn.mjs +288 -0
- package/.output/server/_ssr/BundleIdDisplay-BEvB3MvA.mjs +13 -0
- package/.output/server/_ssr/InsightsCapabilityContext-Cx8fjm2s.mjs +15 -0
- package/.output/server/_ssr/api-keys-CpBqHpuC.mjs +300 -0
- package/.output/server/_ssr/api-keys-api-Czkp57UV.mjs +60 -0
- package/.output/server/_ssr/api-keys-rpc-BTtMDSoR.mjs +136 -0
- package/.output/server/_ssr/api-rpc-BEX8ISai.mjs +1468 -0
- package/.output/server/_ssr/auth-BF8mbAgF.mjs +21 -0
- package/.output/server/_ssr/auth-rpc-BFMEC-TT.mjs +24 -0
- package/.output/server/_ssr/auth.server-DW71WzsD.mjs +47 -0
- package/.output/server/_ssr/badge-CpWXQwyF.mjs +26 -0
- package/.output/server/_ssr/bundle-signing-rpc-BbCFUQSu.mjs +16 -0
- package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +12 -0
- package/.output/server/_ssr/card-Bsc8mRis.mjs +86 -0
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +13 -0
- package/.output/server/_ssr/config.server-DQYEr_5X.mjs +361 -0
- package/.output/server/_ssr/{createServerFn-DzU0k62V.mjs → createServerFn-B2hcXoPM.mjs} +1 -1
- package/.output/server/_ssr/createServerRpc-DB29C_5p.mjs +12 -0
- package/.output/server/_ssr/{sidebar-Cv_H0_Jv.mjs → createSsrRpc-DhfrxEjg.mjs} +68 -50
- package/.output/server/_ssr/databaseRows-QlCYLi0H.mjs +166 -0
- package/.output/server/_ssr/deleteBundle-Cu_XOMt0.mjs +66 -0
- package/.output/server/_ssr/dialog-C0vKUp8R.mjs +170 -0
- package/.output/server/_ssr/dist-BVSLTpoP.mjs +250 -0
- package/.output/server/_ssr/downloadBundle-CNnYxYO2.mjs +24 -0
- package/.output/server/_ssr/{empty-plugin-adapters-B4HCzgmM.mjs → empty-plugin-adapters-B5QvGpEl.mjs} +1 -1
- package/.output/server/_ssr/field-DASCh-5d.mjs +74 -0
- package/.output/server/_ssr/{getBundleChildren-CVtSiH5t.mjs → getBundleChildren-BcRMFoDF.mjs} +10 -18
- package/.output/server/_ssr/input-group-etIsBUqv.mjs +288 -0
- package/.output/server/_ssr/insights-api-C1F7UreR.mjs +71 -0
- package/.output/server/_ssr/insights-input-9fEJF-ZG.mjs +96 -0
- package/.output/server/_ssr/insights-rpc-C-8R6kED.mjs +155 -0
- package/.output/server/_ssr/insights-ygT_aIfo.mjs +858 -0
- package/.output/server/_ssr/installations-DqRT1QTd.mjs +535 -0
- package/.output/server/_ssr/installations-K8TCYTYh.mjs +19 -0
- package/.output/server/_ssr/router-BxBEvtF1.mjs +513 -0
- package/.output/server/_ssr/routes-BC7rn-tf.mjs +37 -0
- package/.output/server/_ssr/routes-CM5KAwpB.mjs +2285 -0
- package/.output/server/_ssr/runtime.server-la7TRAH_.mjs +527 -0
- package/.output/server/_ssr/server-CpzW--lT.mjs +7468 -0
- package/.output/server/_ssr/signing-jk4HANnl.mjs +134 -0
- package/.output/server/_ssr/ssr.mjs +4 -5740
- package/.output/server/_ssr/start-DpViQGnt.mjs +4 -0
- package/.output/server/_ssr/table-CU58HeI7.mjs +53 -0
- package/.output/server/_ssr/uuidv7-CaKuKXrV.mjs +31 -0
- package/.output/server/_tanstack-start-manifest_v-Mz9MmSlD.mjs +103 -0
- package/.output/server/index.mjs +229 -47
- package/README.md +29 -8
- package/lib/index.d.mts +35 -0
- package/lib/index.mjs +4 -0
- package/lib/vite-internal.mjs +127 -0
- package/lib/vite.d.mts +10 -0
- package/lib/vite.mjs +5 -0
- package/package.json +51 -29
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/logo.svg +1 -0
- package/public/manifest.json +30 -0
- package/public/robots.txt +3 -0
- package/src/components/AppSidebar.tsx +159 -0
- package/src/components/BundleIdDisplay.tsx +18 -0
- package/src/components/ChannelBadge.tsx +31 -0
- package/src/components/ConsoleAccessPage.tsx +122 -0
- package/src/components/EnabledStatusIcon.tsx +54 -0
- package/src/components/HashValueDisplay.tsx +85 -0
- package/src/components/HotUpdaterLogo.tsx +30 -0
- package/src/components/NotFoundPage.tsx +33 -0
- package/src/components/PlatformIcon.tsx +39 -0
- package/src/components/RolloutPercentageBadge.tsx +28 -0
- package/src/components/ThemeProvider.tsx +116 -0
- package/src/components/TimestampDisplay.tsx +41 -0
- package/src/components/features/api-keys/ApiKeysPage.tsx +377 -0
- package/src/components/features/bundles/BundleActivityChart.tsx +193 -0
- package/src/components/features/bundles/BundleChildrenPanel.tsx +201 -0
- package/src/components/features/bundles/BundleInsightsSummary.tsx +123 -0
- package/src/components/features/bundles/BundleMetadata.tsx +136 -0
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +201 -0
- package/src/components/features/channels/ChannelManagementDialog.tsx +228 -0
- package/src/components/features/insights/ActivityChart.tsx +150 -0
- package/src/components/features/insights/BundleDistribution.tsx +133 -0
- package/src/components/features/insights/BundleSelector.tsx +114 -0
- package/src/components/features/insights/InsightsCapabilityContext.tsx +24 -0
- package/src/components/features/insights/InsightsControls.tsx +115 -0
- package/src/components/features/insights/InsightsErrorAlert.tsx +21 -0
- package/src/components/features/insights/InsightsOverview.tsx +208 -0
- package/src/components/features/insights/InstallationHistoryCard.tsx +248 -0
- package/src/components/features/insights/InstallationMatchesCard.tsx +132 -0
- package/src/components/features/insights/InstallationPageHeader.tsx +138 -0
- package/src/components/features/insights/InstallationPagination.tsx +48 -0
- package/src/components/features/insights/InstallationSearch.tsx +230 -0
- package/src/components/features/insights/UpdateOutcomes.tsx +147 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +879 -0
- package/src/components/features/releases/ReleaseStateBadge.tsx +20 -0
- package/src/components/features/signing/BundleSigningPage.tsx +139 -0
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +76 -0
- package/src/components/ui/badge.tsx +49 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/card.tsx +89 -0
- package/src/components/ui/chart.tsx +371 -0
- package/src/components/ui/combobox.tsx +303 -0
- package/src/components/ui/dialog.tsx +156 -0
- package/src/components/ui/dropdown-menu.tsx +270 -0
- package/src/components/ui/field.tsx +235 -0
- package/src/components/ui/input-group.tsx +147 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/label.tsx +25 -0
- package/src/components/ui/progress.tsx +84 -0
- package/src/components/ui/select.tsx +205 -0
- package/src/components/ui/separator.tsx +23 -0
- package/src/components/ui/sheet.tsx +132 -0
- package/src/components/ui/sidebar.tsx +779 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +56 -0
- package/src/components/ui/sonner.tsx +45 -0
- package/src/components/ui/switch.tsx +25 -0
- package/src/components/ui/table.tsx +114 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toggle-group.tsx +89 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +66 -0
- package/src/hooks/use-mobile.ts +30 -0
- package/src/index.ts +47 -0
- package/src/lib/api-keys-api.ts +69 -0
- package/src/lib/api-keys-rpc.ts +87 -0
- package/src/lib/api-rpc.ts +478 -0
- package/src/lib/api.ts +444 -0
- package/src/lib/auth-rpc.ts +16 -0
- package/src/lib/bundle-signing-api.ts +14 -0
- package/src/lib/bundle-signing-rpc.ts +16 -0
- package/src/lib/constants.ts +1 -0
- package/src/lib/git.ts +51 -0
- package/src/lib/insights-api.ts +144 -0
- package/src/lib/insights-error.ts +19 -0
- package/src/lib/insights-input.ts +187 -0
- package/src/lib/insights-overview.ts +170 -0
- package/src/lib/insights-rpc.ts +218 -0
- package/src/lib/server/auth.server.ts +43 -0
- package/src/lib/server/bundle-signing.server.ts +23 -0
- package/src/lib/server/config.server.ts +109 -0
- package/src/lib/server/console-runtime.server.ts +61 -0
- package/src/lib/server/deleteBundle.ts +145 -0
- package/src/lib/server/downloadBundle.ts +46 -0
- package/src/lib/server/getBundleChildren.ts +130 -0
- package/src/lib/server/listReleases.ts +61 -0
- package/src/lib/server/releaseActivity.ts +27 -0
- package/src/lib/server/releaseReachability.ts +95 -0
- package/src/lib/server/runtime.server.ts +172 -0
- package/src/lib/utils.ts +9 -0
- package/src/logo.svg +1 -0
- package/src/routeTree.gen.ts +199 -0
- package/src/router.tsx +21 -0
- package/src/routes/-installations-search.ts +19 -0
- package/src/routes/-releases-search.ts +74 -0
- package/src/routes/__root.tsx +174 -0
- package/src/routes/api/auth/$.ts +19 -0
- package/src/routes/api/bundles/$bundleId/download.ts +17 -0
- package/src/routes/api-keys.tsx +37 -0
- package/src/routes/index.tsx +982 -0
- package/src/routes/insights.tsx +139 -0
- package/src/routes/installations.tsx +194 -0
- package/src/routes/signing.tsx +37 -0
- package/src/styles.css +152 -0
- package/src/virtual-modules.d.ts +21 -0
- package/src/vite-env.d.ts +1 -0
- package/src/vite-internal.ts +195 -0
- package/src/vite.ts +12 -0
- package/.output/public/assets/dist-DJX53faP.js +0 -3
- package/.output/public/assets/index-Iylis5kY.js +0 -10
- package/.output/public/assets/routes-HT21hs0C.js +0 -54
- package/.output/public/assets/styles-C0Re4quB.css +0 -2
- package/.output/server/__23tanstack-start-server-fn-resolver-CgwgZ0-i.mjs +0 -66
- package/.output/server/_libs/@floating-ui/core+[...].mjs +0 -698
- package/.output/server/_libs/@floating-ui/dom+[...].mjs +0 -644
- package/.output/server/_libs/@floating-ui/react-dom+[...].mjs +0 -839
- package/.output/server/_libs/@radix-ui/react-alert-dialog+[...].mjs +0 -2138
- package/.output/server/_libs/@radix-ui/react-popper+[...].mjs +0 -308
- package/.output/server/_libs/@radix-ui/react-select+[...].mjs +0 -1038
- package/.output/server/_libs/@tanstack/devtools-event-client+[...].mjs +0 -196
- package/.output/server/_libs/@tanstack/form-core+[...].mjs +0 -3228
- package/.output/server/_libs/@tanstack/react-form+[...].mjs +0 -430
- package/.output/server/_libs/@tanstack/react-table+[...].mjs +0 -2382
- package/.output/server/_libs/radix-ui__number.mjs +0 -6
- package/.output/server/_libs/radix-ui__primitive.mjs +0 -9
- package/.output/server/_libs/radix-ui__react-arrow.mjs +0 -23
- package/.output/server/_libs/radix-ui__react-collection.mjs +0 -78
- package/.output/server/_libs/radix-ui__react-direction.mjs +0 -13
- package/.output/server/_libs/radix-ui__react-label.mjs +0 -22
- package/.output/server/_libs/radix-ui__react-separator.mjs +0 -30
- package/.output/server/_libs/radix-ui__react-slider.mjs +0 -510
- package/.output/server/_libs/radix-ui__react-switch.mjs +0 -157
- package/.output/server/_libs/radix-ui__react-tooltip.mjs +0 -493
- package/.output/server/_ssr/api-rpc-BIbDUKSz.mjs +0 -292
- package/.output/server/_ssr/config.server-BSS366KT.mjs +0 -41
- package/.output/server/_ssr/deleteBundle-BgbZTtpW.mjs +0 -141
- package/.output/server/_ssr/dist-KboydRVk.mjs +0 -120
- package/.output/server/_ssr/router-C3hqEy3k.mjs +0 -307
- package/.output/server/_ssr/routes-B0lQvvlC.mjs +0 -3048
- package/.output/server/_ssr/start-02sLteYG.mjs +0 -4
- package/.output/server/_ssr/storageProfile-FVkjPoGb.mjs +0 -9
- package/.output/server/_tanstack-start-manifest_v-Bpx52WOU.mjs +0 -20
- package/.output/server/node_modules/tslib/modules/index.js +0 -70
- package/.output/server/node_modules/tslib/modules/package.json +0 -3
- package/.output/server/node_modules/tslib/package.json +0 -47
- package/.output/server/node_modules/tslib/tslib.js +0 -484
- package/.output/server/package.json +0 -9
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
import { t as Path } from "./d3-path.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js
|
|
3
|
+
function constant_default(x) {
|
|
4
|
+
return function constant() {
|
|
5
|
+
return x;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/math.js
|
|
10
|
+
var cos = Math.cos;
|
|
11
|
+
var sin = Math.sin;
|
|
12
|
+
var sqrt = Math.sqrt;
|
|
13
|
+
var pi = Math.PI;
|
|
14
|
+
pi / 2;
|
|
15
|
+
var tau = 2 * pi;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js
|
|
18
|
+
function withPath(shape) {
|
|
19
|
+
let digits = 3;
|
|
20
|
+
shape.digits = function(_) {
|
|
21
|
+
if (!arguments.length) return digits;
|
|
22
|
+
if (_ == null) digits = null;
|
|
23
|
+
else {
|
|
24
|
+
const d = Math.floor(_);
|
|
25
|
+
if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
|
|
26
|
+
digits = d;
|
|
27
|
+
}
|
|
28
|
+
return shape;
|
|
29
|
+
};
|
|
30
|
+
return () => new Path(digits);
|
|
31
|
+
}
|
|
32
|
+
Array.prototype.slice;
|
|
33
|
+
function array_default(x) {
|
|
34
|
+
return typeof x === "object" && "length" in x ? x : Array.from(x);
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js
|
|
38
|
+
function Linear(context) {
|
|
39
|
+
this._context = context;
|
|
40
|
+
}
|
|
41
|
+
Linear.prototype = {
|
|
42
|
+
areaStart: function() {
|
|
43
|
+
this._line = 0;
|
|
44
|
+
},
|
|
45
|
+
areaEnd: function() {
|
|
46
|
+
this._line = NaN;
|
|
47
|
+
},
|
|
48
|
+
lineStart: function() {
|
|
49
|
+
this._point = 0;
|
|
50
|
+
},
|
|
51
|
+
lineEnd: function() {
|
|
52
|
+
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
53
|
+
this._line = 1 - this._line;
|
|
54
|
+
},
|
|
55
|
+
point: function(x, y) {
|
|
56
|
+
x = +x, y = +y;
|
|
57
|
+
switch (this._point) {
|
|
58
|
+
case 0:
|
|
59
|
+
this._point = 1;
|
|
60
|
+
this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
|
|
61
|
+
break;
|
|
62
|
+
case 1: this._point = 2;
|
|
63
|
+
default:
|
|
64
|
+
this._context.lineTo(x, y);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
function linear_default(context) {
|
|
70
|
+
return new Linear(context);
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js
|
|
74
|
+
function x(p) {
|
|
75
|
+
return p[0];
|
|
76
|
+
}
|
|
77
|
+
function y(p) {
|
|
78
|
+
return p[1];
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/line.js
|
|
82
|
+
function line_default(x$1, y$1) {
|
|
83
|
+
var defined = constant_default(true), context = null, curve = linear_default, output = null, path = withPath(line);
|
|
84
|
+
x$1 = typeof x$1 === "function" ? x$1 : x$1 === void 0 ? x : constant_default(x$1);
|
|
85
|
+
y$1 = typeof y$1 === "function" ? y$1 : y$1 === void 0 ? y : constant_default(y$1);
|
|
86
|
+
function line(data) {
|
|
87
|
+
var i, n = (data = array_default(data)).length, d, defined0 = false, buffer;
|
|
88
|
+
if (context == null) output = curve(buffer = path());
|
|
89
|
+
for (i = 0; i <= n; ++i) {
|
|
90
|
+
if (!(i < n && defined(d = data[i], i, data)) === defined0) if (defined0 = !defined0) output.lineStart();
|
|
91
|
+
else output.lineEnd();
|
|
92
|
+
if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data));
|
|
93
|
+
}
|
|
94
|
+
if (buffer) return output = null, buffer + "" || null;
|
|
95
|
+
}
|
|
96
|
+
line.x = function(_) {
|
|
97
|
+
return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant_default(+_), line) : x$1;
|
|
98
|
+
};
|
|
99
|
+
line.y = function(_) {
|
|
100
|
+
return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant_default(+_), line) : y$1;
|
|
101
|
+
};
|
|
102
|
+
line.defined = function(_) {
|
|
103
|
+
return arguments.length ? (defined = typeof _ === "function" ? _ : constant_default(!!_), line) : defined;
|
|
104
|
+
};
|
|
105
|
+
line.curve = function(_) {
|
|
106
|
+
return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
|
|
107
|
+
};
|
|
108
|
+
line.context = function(_) {
|
|
109
|
+
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
|
|
110
|
+
};
|
|
111
|
+
return line;
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/area.js
|
|
115
|
+
function area_default(x0, y0, y1) {
|
|
116
|
+
var x1 = null, defined = constant_default(true), context = null, curve = linear_default, output = null, path = withPath(area);
|
|
117
|
+
x0 = typeof x0 === "function" ? x0 : x0 === void 0 ? x : constant_default(+x0);
|
|
118
|
+
y0 = typeof y0 === "function" ? y0 : y0 === void 0 ? constant_default(0) : constant_default(+y0);
|
|
119
|
+
y1 = typeof y1 === "function" ? y1 : y1 === void 0 ? y : constant_default(+y1);
|
|
120
|
+
function area(data) {
|
|
121
|
+
var i, j, k, n = (data = array_default(data)).length, d, defined0 = false, buffer, x0z = new Array(n), y0z = new Array(n);
|
|
122
|
+
if (context == null) output = curve(buffer = path());
|
|
123
|
+
for (i = 0; i <= n; ++i) {
|
|
124
|
+
if (!(i < n && defined(d = data[i], i, data)) === defined0) if (defined0 = !defined0) {
|
|
125
|
+
j = i;
|
|
126
|
+
output.areaStart();
|
|
127
|
+
output.lineStart();
|
|
128
|
+
} else {
|
|
129
|
+
output.lineEnd();
|
|
130
|
+
output.lineStart();
|
|
131
|
+
for (k = i - 1; k >= j; --k) output.point(x0z[k], y0z[k]);
|
|
132
|
+
output.lineEnd();
|
|
133
|
+
output.areaEnd();
|
|
134
|
+
}
|
|
135
|
+
if (defined0) {
|
|
136
|
+
x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);
|
|
137
|
+
output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (buffer) return output = null, buffer + "" || null;
|
|
141
|
+
}
|
|
142
|
+
function arealine() {
|
|
143
|
+
return line_default().defined(defined).curve(curve).context(context);
|
|
144
|
+
}
|
|
145
|
+
area.x = function(_) {
|
|
146
|
+
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant_default(+_), x1 = null, area) : x0;
|
|
147
|
+
};
|
|
148
|
+
area.x0 = function(_) {
|
|
149
|
+
return arguments.length ? (x0 = typeof _ === "function" ? _ : constant_default(+_), area) : x0;
|
|
150
|
+
};
|
|
151
|
+
area.x1 = function(_) {
|
|
152
|
+
return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant_default(+_), area) : x1;
|
|
153
|
+
};
|
|
154
|
+
area.y = function(_) {
|
|
155
|
+
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant_default(+_), y1 = null, area) : y0;
|
|
156
|
+
};
|
|
157
|
+
area.y0 = function(_) {
|
|
158
|
+
return arguments.length ? (y0 = typeof _ === "function" ? _ : constant_default(+_), area) : y0;
|
|
159
|
+
};
|
|
160
|
+
area.y1 = function(_) {
|
|
161
|
+
return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant_default(+_), area) : y1;
|
|
162
|
+
};
|
|
163
|
+
area.lineX0 = area.lineY0 = function() {
|
|
164
|
+
return arealine().x(x0).y(y0);
|
|
165
|
+
};
|
|
166
|
+
area.lineY1 = function() {
|
|
167
|
+
return arealine().x(x0).y(y1);
|
|
168
|
+
};
|
|
169
|
+
area.lineX1 = function() {
|
|
170
|
+
return arealine().x(x1).y(y0);
|
|
171
|
+
};
|
|
172
|
+
area.defined = function(_) {
|
|
173
|
+
return arguments.length ? (defined = typeof _ === "function" ? _ : constant_default(!!_), area) : defined;
|
|
174
|
+
};
|
|
175
|
+
area.curve = function(_) {
|
|
176
|
+
return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;
|
|
177
|
+
};
|
|
178
|
+
area.context = function(_) {
|
|
179
|
+
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;
|
|
180
|
+
};
|
|
181
|
+
return area;
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/bump.js
|
|
185
|
+
var Bump = class {
|
|
186
|
+
constructor(context, x) {
|
|
187
|
+
this._context = context;
|
|
188
|
+
this._x = x;
|
|
189
|
+
}
|
|
190
|
+
areaStart() {
|
|
191
|
+
this._line = 0;
|
|
192
|
+
}
|
|
193
|
+
areaEnd() {
|
|
194
|
+
this._line = NaN;
|
|
195
|
+
}
|
|
196
|
+
lineStart() {
|
|
197
|
+
this._point = 0;
|
|
198
|
+
}
|
|
199
|
+
lineEnd() {
|
|
200
|
+
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
201
|
+
this._line = 1 - this._line;
|
|
202
|
+
}
|
|
203
|
+
point(x, y) {
|
|
204
|
+
x = +x, y = +y;
|
|
205
|
+
switch (this._point) {
|
|
206
|
+
case 0:
|
|
207
|
+
this._point = 1;
|
|
208
|
+
if (this._line) this._context.lineTo(x, y);
|
|
209
|
+
else this._context.moveTo(x, y);
|
|
210
|
+
break;
|
|
211
|
+
case 1: this._point = 2;
|
|
212
|
+
default:
|
|
213
|
+
if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);
|
|
214
|
+
else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
this._x0 = x, this._y0 = y;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
function bumpX(context) {
|
|
221
|
+
return new Bump(context, true);
|
|
222
|
+
}
|
|
223
|
+
function bumpY(context) {
|
|
224
|
+
return new Bump(context, false);
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/symbol/circle.js
|
|
228
|
+
var circle_default = { draw(context, size) {
|
|
229
|
+
const r = sqrt(size / pi);
|
|
230
|
+
context.moveTo(r, 0);
|
|
231
|
+
context.arc(0, 0, r, 0, tau);
|
|
232
|
+
} };
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/symbol/cross.js
|
|
235
|
+
var cross_default = { draw(context, size) {
|
|
236
|
+
const r = sqrt(size / 5) / 2;
|
|
237
|
+
context.moveTo(-3 * r, -r);
|
|
238
|
+
context.lineTo(-r, -r);
|
|
239
|
+
context.lineTo(-r, -3 * r);
|
|
240
|
+
context.lineTo(r, -3 * r);
|
|
241
|
+
context.lineTo(r, -r);
|
|
242
|
+
context.lineTo(3 * r, -r);
|
|
243
|
+
context.lineTo(3 * r, r);
|
|
244
|
+
context.lineTo(r, r);
|
|
245
|
+
context.lineTo(r, 3 * r);
|
|
246
|
+
context.lineTo(-r, 3 * r);
|
|
247
|
+
context.lineTo(-r, r);
|
|
248
|
+
context.lineTo(-3 * r, r);
|
|
249
|
+
context.closePath();
|
|
250
|
+
} };
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/symbol/diamond.js
|
|
253
|
+
var tan30 = sqrt(1 / 3);
|
|
254
|
+
var tan30_2 = tan30 * 2;
|
|
255
|
+
var diamond_default = { draw(context, size) {
|
|
256
|
+
const y = sqrt(size / tan30_2);
|
|
257
|
+
const x = y * tan30;
|
|
258
|
+
context.moveTo(0, -y);
|
|
259
|
+
context.lineTo(x, 0);
|
|
260
|
+
context.lineTo(0, y);
|
|
261
|
+
context.lineTo(-x, 0);
|
|
262
|
+
context.closePath();
|
|
263
|
+
} };
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/symbol/square.js
|
|
266
|
+
var square_default = { draw(context, size) {
|
|
267
|
+
const w = sqrt(size);
|
|
268
|
+
const x = -w / 2;
|
|
269
|
+
context.rect(x, x, w, w);
|
|
270
|
+
} };
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/symbol/star.js
|
|
273
|
+
var ka = .8908130915292852;
|
|
274
|
+
var kr = sin(pi / 10) / sin(7 * pi / 10);
|
|
275
|
+
var kx = sin(tau / 10) * kr;
|
|
276
|
+
var ky = -cos(tau / 10) * kr;
|
|
277
|
+
var star_default = { draw(context, size) {
|
|
278
|
+
const r = sqrt(size * ka);
|
|
279
|
+
const x = kx * r;
|
|
280
|
+
const y = ky * r;
|
|
281
|
+
context.moveTo(0, -r);
|
|
282
|
+
context.lineTo(x, y);
|
|
283
|
+
for (let i = 1; i < 5; ++i) {
|
|
284
|
+
const a = tau * i / 5;
|
|
285
|
+
const c = cos(a);
|
|
286
|
+
const s = sin(a);
|
|
287
|
+
context.lineTo(s * r, -c * r);
|
|
288
|
+
context.lineTo(c * x - s * y, s * x + c * y);
|
|
289
|
+
}
|
|
290
|
+
context.closePath();
|
|
291
|
+
} };
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/symbol/triangle.js
|
|
294
|
+
var sqrt3 = sqrt(3);
|
|
295
|
+
var triangle_default = { draw(context, size) {
|
|
296
|
+
const y = -sqrt(size / (sqrt3 * 3));
|
|
297
|
+
context.moveTo(0, y * 2);
|
|
298
|
+
context.lineTo(-sqrt3 * y, -y);
|
|
299
|
+
context.lineTo(sqrt3 * y, -y);
|
|
300
|
+
context.closePath();
|
|
301
|
+
} };
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/symbol/wye.js
|
|
304
|
+
var c = -.5;
|
|
305
|
+
var s = sqrt(3) / 2;
|
|
306
|
+
var k = 1 / sqrt(12);
|
|
307
|
+
var a = (k / 2 + 1) * 3;
|
|
308
|
+
var wye_default = { draw(context, size) {
|
|
309
|
+
const r = sqrt(size / a);
|
|
310
|
+
const x0 = r / 2, y0 = r * k;
|
|
311
|
+
const x1 = x0, y1 = r * k + r;
|
|
312
|
+
const x2 = -x1, y2 = y1;
|
|
313
|
+
context.moveTo(x0, y0);
|
|
314
|
+
context.lineTo(x1, y1);
|
|
315
|
+
context.lineTo(x2, y2);
|
|
316
|
+
context.lineTo(c * x0 - s * y0, s * x0 + c * y0);
|
|
317
|
+
context.lineTo(c * x1 - s * y1, s * x1 + c * y1);
|
|
318
|
+
context.lineTo(c * x2 - s * y2, s * x2 + c * y2);
|
|
319
|
+
context.lineTo(c * x0 + s * y0, c * y0 - s * x0);
|
|
320
|
+
context.lineTo(c * x1 + s * y1, c * y1 - s * x1);
|
|
321
|
+
context.lineTo(c * x2 + s * y2, c * y2 - s * x2);
|
|
322
|
+
context.closePath();
|
|
323
|
+
} };
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/symbol.js
|
|
326
|
+
function Symbol(type, size) {
|
|
327
|
+
let context = null, path = withPath(symbol);
|
|
328
|
+
type = typeof type === "function" ? type : constant_default(type || circle_default);
|
|
329
|
+
size = typeof size === "function" ? size : constant_default(size === void 0 ? 64 : +size);
|
|
330
|
+
function symbol() {
|
|
331
|
+
let buffer;
|
|
332
|
+
if (!context) context = buffer = path();
|
|
333
|
+
type.apply(this, arguments).draw(context, +size.apply(this, arguments));
|
|
334
|
+
if (buffer) return context = null, buffer + "" || null;
|
|
335
|
+
}
|
|
336
|
+
symbol.type = function(_) {
|
|
337
|
+
return arguments.length ? (type = typeof _ === "function" ? _ : constant_default(_), symbol) : type;
|
|
338
|
+
};
|
|
339
|
+
symbol.size = function(_) {
|
|
340
|
+
return arguments.length ? (size = typeof _ === "function" ? _ : constant_default(+_), symbol) : size;
|
|
341
|
+
};
|
|
342
|
+
symbol.context = function(_) {
|
|
343
|
+
return arguments.length ? (context = _ == null ? null : _, symbol) : context;
|
|
344
|
+
};
|
|
345
|
+
return symbol;
|
|
346
|
+
}
|
|
347
|
+
//#endregion
|
|
348
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/noop.js
|
|
349
|
+
function noop_default() {}
|
|
350
|
+
//#endregion
|
|
351
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basis.js
|
|
352
|
+
function point$1(that, x, y) {
|
|
353
|
+
that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6);
|
|
354
|
+
}
|
|
355
|
+
function Basis(context) {
|
|
356
|
+
this._context = context;
|
|
357
|
+
}
|
|
358
|
+
Basis.prototype = {
|
|
359
|
+
areaStart: function() {
|
|
360
|
+
this._line = 0;
|
|
361
|
+
},
|
|
362
|
+
areaEnd: function() {
|
|
363
|
+
this._line = NaN;
|
|
364
|
+
},
|
|
365
|
+
lineStart: function() {
|
|
366
|
+
this._x0 = this._x1 = this._y0 = this._y1 = NaN;
|
|
367
|
+
this._point = 0;
|
|
368
|
+
},
|
|
369
|
+
lineEnd: function() {
|
|
370
|
+
switch (this._point) {
|
|
371
|
+
case 3: point$1(this, this._x1, this._y1);
|
|
372
|
+
case 2:
|
|
373
|
+
this._context.lineTo(this._x1, this._y1);
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
377
|
+
this._line = 1 - this._line;
|
|
378
|
+
},
|
|
379
|
+
point: function(x, y) {
|
|
380
|
+
x = +x, y = +y;
|
|
381
|
+
switch (this._point) {
|
|
382
|
+
case 0:
|
|
383
|
+
this._point = 1;
|
|
384
|
+
this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
|
|
385
|
+
break;
|
|
386
|
+
case 1:
|
|
387
|
+
this._point = 2;
|
|
388
|
+
break;
|
|
389
|
+
case 2:
|
|
390
|
+
this._point = 3;
|
|
391
|
+
this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
|
|
392
|
+
default:
|
|
393
|
+
point$1(this, x, y);
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
396
|
+
this._x0 = this._x1, this._x1 = x;
|
|
397
|
+
this._y0 = this._y1, this._y1 = y;
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
function basis_default(context) {
|
|
401
|
+
return new Basis(context);
|
|
402
|
+
}
|
|
403
|
+
//#endregion
|
|
404
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisClosed.js
|
|
405
|
+
function BasisClosed(context) {
|
|
406
|
+
this._context = context;
|
|
407
|
+
}
|
|
408
|
+
BasisClosed.prototype = {
|
|
409
|
+
areaStart: noop_default,
|
|
410
|
+
areaEnd: noop_default,
|
|
411
|
+
lineStart: function() {
|
|
412
|
+
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
|
|
413
|
+
this._point = 0;
|
|
414
|
+
},
|
|
415
|
+
lineEnd: function() {
|
|
416
|
+
switch (this._point) {
|
|
417
|
+
case 1:
|
|
418
|
+
this._context.moveTo(this._x2, this._y2);
|
|
419
|
+
this._context.closePath();
|
|
420
|
+
break;
|
|
421
|
+
case 2:
|
|
422
|
+
this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
|
|
423
|
+
this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
|
|
424
|
+
this._context.closePath();
|
|
425
|
+
break;
|
|
426
|
+
case 3:
|
|
427
|
+
this.point(this._x2, this._y2);
|
|
428
|
+
this.point(this._x3, this._y3);
|
|
429
|
+
this.point(this._x4, this._y4);
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
point: function(x, y) {
|
|
434
|
+
x = +x, y = +y;
|
|
435
|
+
switch (this._point) {
|
|
436
|
+
case 0:
|
|
437
|
+
this._point = 1;
|
|
438
|
+
this._x2 = x, this._y2 = y;
|
|
439
|
+
break;
|
|
440
|
+
case 1:
|
|
441
|
+
this._point = 2;
|
|
442
|
+
this._x3 = x, this._y3 = y;
|
|
443
|
+
break;
|
|
444
|
+
case 2:
|
|
445
|
+
this._point = 3;
|
|
446
|
+
this._x4 = x, this._y4 = y;
|
|
447
|
+
this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6);
|
|
448
|
+
break;
|
|
449
|
+
default:
|
|
450
|
+
point$1(this, x, y);
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
this._x0 = this._x1, this._x1 = x;
|
|
454
|
+
this._y0 = this._y1, this._y1 = y;
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
function basisClosed_default(context) {
|
|
458
|
+
return new BasisClosed(context);
|
|
459
|
+
}
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/basisOpen.js
|
|
462
|
+
function BasisOpen(context) {
|
|
463
|
+
this._context = context;
|
|
464
|
+
}
|
|
465
|
+
BasisOpen.prototype = {
|
|
466
|
+
areaStart: function() {
|
|
467
|
+
this._line = 0;
|
|
468
|
+
},
|
|
469
|
+
areaEnd: function() {
|
|
470
|
+
this._line = NaN;
|
|
471
|
+
},
|
|
472
|
+
lineStart: function() {
|
|
473
|
+
this._x0 = this._x1 = this._y0 = this._y1 = NaN;
|
|
474
|
+
this._point = 0;
|
|
475
|
+
},
|
|
476
|
+
lineEnd: function() {
|
|
477
|
+
if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
|
|
478
|
+
this._line = 1 - this._line;
|
|
479
|
+
},
|
|
480
|
+
point: function(x, y) {
|
|
481
|
+
x = +x, y = +y;
|
|
482
|
+
switch (this._point) {
|
|
483
|
+
case 0:
|
|
484
|
+
this._point = 1;
|
|
485
|
+
break;
|
|
486
|
+
case 1:
|
|
487
|
+
this._point = 2;
|
|
488
|
+
break;
|
|
489
|
+
case 2:
|
|
490
|
+
this._point = 3;
|
|
491
|
+
var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6;
|
|
492
|
+
this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0);
|
|
493
|
+
break;
|
|
494
|
+
case 3: this._point = 4;
|
|
495
|
+
default:
|
|
496
|
+
point$1(this, x, y);
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
this._x0 = this._x1, this._x1 = x;
|
|
500
|
+
this._y0 = this._y1, this._y1 = y;
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
function basisOpen_default(context) {
|
|
504
|
+
return new BasisOpen(context);
|
|
505
|
+
}
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linearClosed.js
|
|
508
|
+
function LinearClosed(context) {
|
|
509
|
+
this._context = context;
|
|
510
|
+
}
|
|
511
|
+
LinearClosed.prototype = {
|
|
512
|
+
areaStart: noop_default,
|
|
513
|
+
areaEnd: noop_default,
|
|
514
|
+
lineStart: function() {
|
|
515
|
+
this._point = 0;
|
|
516
|
+
},
|
|
517
|
+
lineEnd: function() {
|
|
518
|
+
if (this._point) this._context.closePath();
|
|
519
|
+
},
|
|
520
|
+
point: function(x, y) {
|
|
521
|
+
x = +x, y = +y;
|
|
522
|
+
if (this._point) this._context.lineTo(x, y);
|
|
523
|
+
else this._point = 1, this._context.moveTo(x, y);
|
|
524
|
+
}
|
|
525
|
+
};
|
|
526
|
+
function linearClosed_default(context) {
|
|
527
|
+
return new LinearClosed(context);
|
|
528
|
+
}
|
|
529
|
+
//#endregion
|
|
530
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/monotone.js
|
|
531
|
+
function sign(x) {
|
|
532
|
+
return x < 0 ? -1 : 1;
|
|
533
|
+
}
|
|
534
|
+
function slope3(that, x2, y2) {
|
|
535
|
+
var h0 = that._x1 - that._x0, h1 = x2 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1);
|
|
536
|
+
return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), .5 * Math.abs(p)) || 0;
|
|
537
|
+
}
|
|
538
|
+
function slope2(that, t) {
|
|
539
|
+
var h = that._x1 - that._x0;
|
|
540
|
+
return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
|
|
541
|
+
}
|
|
542
|
+
function point(that, t0, t1) {
|
|
543
|
+
var x0 = that._x0, y0 = that._y0, x1 = that._x1, y1 = that._y1, dx = (x1 - x0) / 3;
|
|
544
|
+
that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
|
|
545
|
+
}
|
|
546
|
+
function MonotoneX(context) {
|
|
547
|
+
this._context = context;
|
|
548
|
+
}
|
|
549
|
+
MonotoneX.prototype = {
|
|
550
|
+
areaStart: function() {
|
|
551
|
+
this._line = 0;
|
|
552
|
+
},
|
|
553
|
+
areaEnd: function() {
|
|
554
|
+
this._line = NaN;
|
|
555
|
+
},
|
|
556
|
+
lineStart: function() {
|
|
557
|
+
this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;
|
|
558
|
+
this._point = 0;
|
|
559
|
+
},
|
|
560
|
+
lineEnd: function() {
|
|
561
|
+
switch (this._point) {
|
|
562
|
+
case 2:
|
|
563
|
+
this._context.lineTo(this._x1, this._y1);
|
|
564
|
+
break;
|
|
565
|
+
case 3:
|
|
566
|
+
point(this, this._t0, slope2(this, this._t0));
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
570
|
+
this._line = 1 - this._line;
|
|
571
|
+
},
|
|
572
|
+
point: function(x, y) {
|
|
573
|
+
var t1 = NaN;
|
|
574
|
+
x = +x, y = +y;
|
|
575
|
+
if (x === this._x1 && y === this._y1) return;
|
|
576
|
+
switch (this._point) {
|
|
577
|
+
case 0:
|
|
578
|
+
this._point = 1;
|
|
579
|
+
this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
|
|
580
|
+
break;
|
|
581
|
+
case 1:
|
|
582
|
+
this._point = 2;
|
|
583
|
+
break;
|
|
584
|
+
case 2:
|
|
585
|
+
this._point = 3;
|
|
586
|
+
point(this, slope2(this, t1 = slope3(this, x, y)), t1);
|
|
587
|
+
break;
|
|
588
|
+
default:
|
|
589
|
+
point(this, this._t0, t1 = slope3(this, x, y));
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
this._x0 = this._x1, this._x1 = x;
|
|
593
|
+
this._y0 = this._y1, this._y1 = y;
|
|
594
|
+
this._t0 = t1;
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
function MonotoneY(context) {
|
|
598
|
+
this._context = new ReflectContext(context);
|
|
599
|
+
}
|
|
600
|
+
(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
|
|
601
|
+
MonotoneX.prototype.point.call(this, y, x);
|
|
602
|
+
};
|
|
603
|
+
function ReflectContext(context) {
|
|
604
|
+
this._context = context;
|
|
605
|
+
}
|
|
606
|
+
ReflectContext.prototype = {
|
|
607
|
+
moveTo: function(x, y) {
|
|
608
|
+
this._context.moveTo(y, x);
|
|
609
|
+
},
|
|
610
|
+
closePath: function() {
|
|
611
|
+
this._context.closePath();
|
|
612
|
+
},
|
|
613
|
+
lineTo: function(x, y) {
|
|
614
|
+
this._context.lineTo(y, x);
|
|
615
|
+
},
|
|
616
|
+
bezierCurveTo: function(x1, y1, x2, y2, x, y) {
|
|
617
|
+
this._context.bezierCurveTo(y1, x1, y2, x2, y, x);
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
function monotoneX(context) {
|
|
621
|
+
return new MonotoneX(context);
|
|
622
|
+
}
|
|
623
|
+
function monotoneY(context) {
|
|
624
|
+
return new MonotoneY(context);
|
|
625
|
+
}
|
|
626
|
+
//#endregion
|
|
627
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/natural.js
|
|
628
|
+
function Natural(context) {
|
|
629
|
+
this._context = context;
|
|
630
|
+
}
|
|
631
|
+
Natural.prototype = {
|
|
632
|
+
areaStart: function() {
|
|
633
|
+
this._line = 0;
|
|
634
|
+
},
|
|
635
|
+
areaEnd: function() {
|
|
636
|
+
this._line = NaN;
|
|
637
|
+
},
|
|
638
|
+
lineStart: function() {
|
|
639
|
+
this._x = [];
|
|
640
|
+
this._y = [];
|
|
641
|
+
},
|
|
642
|
+
lineEnd: function() {
|
|
643
|
+
var x = this._x, y = this._y, n = x.length;
|
|
644
|
+
if (n) {
|
|
645
|
+
this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);
|
|
646
|
+
if (n === 2) this._context.lineTo(x[1], y[1]);
|
|
647
|
+
else {
|
|
648
|
+
var px = controlPoints(x), py = controlPoints(y);
|
|
649
|
+
for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (this._line || this._line !== 0 && n === 1) this._context.closePath();
|
|
653
|
+
this._line = 1 - this._line;
|
|
654
|
+
this._x = this._y = null;
|
|
655
|
+
},
|
|
656
|
+
point: function(x, y) {
|
|
657
|
+
this._x.push(+x);
|
|
658
|
+
this._y.push(+y);
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
function controlPoints(x) {
|
|
662
|
+
var i, n = x.length - 1, m, a = new Array(n), b = new Array(n), r = new Array(n);
|
|
663
|
+
a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];
|
|
664
|
+
for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
|
|
665
|
+
a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];
|
|
666
|
+
for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
|
|
667
|
+
a[n - 1] = r[n - 1] / b[n - 1];
|
|
668
|
+
for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];
|
|
669
|
+
b[n - 1] = (x[n] + a[n - 1]) / 2;
|
|
670
|
+
for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];
|
|
671
|
+
return [a, b];
|
|
672
|
+
}
|
|
673
|
+
function natural_default(context) {
|
|
674
|
+
return new Natural(context);
|
|
675
|
+
}
|
|
676
|
+
//#endregion
|
|
677
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/step.js
|
|
678
|
+
function Step(context, t) {
|
|
679
|
+
this._context = context;
|
|
680
|
+
this._t = t;
|
|
681
|
+
}
|
|
682
|
+
Step.prototype = {
|
|
683
|
+
areaStart: function() {
|
|
684
|
+
this._line = 0;
|
|
685
|
+
},
|
|
686
|
+
areaEnd: function() {
|
|
687
|
+
this._line = NaN;
|
|
688
|
+
},
|
|
689
|
+
lineStart: function() {
|
|
690
|
+
this._x = this._y = NaN;
|
|
691
|
+
this._point = 0;
|
|
692
|
+
},
|
|
693
|
+
lineEnd: function() {
|
|
694
|
+
if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
|
|
695
|
+
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
|
|
696
|
+
if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
|
|
697
|
+
},
|
|
698
|
+
point: function(x, y) {
|
|
699
|
+
x = +x, y = +y;
|
|
700
|
+
switch (this._point) {
|
|
701
|
+
case 0:
|
|
702
|
+
this._point = 1;
|
|
703
|
+
this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);
|
|
704
|
+
break;
|
|
705
|
+
case 1: this._point = 2;
|
|
706
|
+
default:
|
|
707
|
+
if (this._t <= 0) {
|
|
708
|
+
this._context.lineTo(this._x, y);
|
|
709
|
+
this._context.lineTo(x, y);
|
|
710
|
+
} else {
|
|
711
|
+
var x1 = this._x * (1 - this._t) + x * this._t;
|
|
712
|
+
this._context.lineTo(x1, this._y);
|
|
713
|
+
this._context.lineTo(x1, y);
|
|
714
|
+
}
|
|
715
|
+
break;
|
|
716
|
+
}
|
|
717
|
+
this._x = x, this._y = y;
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
function step_default(context) {
|
|
721
|
+
return new Step(context, .5);
|
|
722
|
+
}
|
|
723
|
+
function stepBefore(context) {
|
|
724
|
+
return new Step(context, 0);
|
|
725
|
+
}
|
|
726
|
+
function stepAfter(context) {
|
|
727
|
+
return new Step(context, 1);
|
|
728
|
+
}
|
|
729
|
+
//#endregion
|
|
730
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/offset/none.js
|
|
731
|
+
function none_default$1(series, order) {
|
|
732
|
+
if (!((n = series.length) > 1)) return;
|
|
733
|
+
for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {
|
|
734
|
+
s0 = s1, s1 = series[order[i]];
|
|
735
|
+
for (j = 0; j < m; ++j) s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
//#endregion
|
|
739
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/order/none.js
|
|
740
|
+
function none_default(series) {
|
|
741
|
+
var n = series.length, o = new Array(n);
|
|
742
|
+
while (--n >= 0) o[n] = n;
|
|
743
|
+
return o;
|
|
744
|
+
}
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/stack.js
|
|
747
|
+
function stackValue(d, key) {
|
|
748
|
+
return d[key];
|
|
749
|
+
}
|
|
750
|
+
function stackSeries(key) {
|
|
751
|
+
const series = [];
|
|
752
|
+
series.key = key;
|
|
753
|
+
return series;
|
|
754
|
+
}
|
|
755
|
+
function stack_default() {
|
|
756
|
+
var keys = constant_default([]), order = none_default, offset = none_default$1, value = stackValue;
|
|
757
|
+
function stack(data) {
|
|
758
|
+
var sz = Array.from(keys.apply(this, arguments), stackSeries), i, n = sz.length, j = -1, oz;
|
|
759
|
+
for (const d of data) for (i = 0, ++j; i < n; ++i) (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d;
|
|
760
|
+
for (i = 0, oz = array_default(order(sz)); i < n; ++i) sz[oz[i]].index = i;
|
|
761
|
+
offset(sz, oz);
|
|
762
|
+
return sz;
|
|
763
|
+
}
|
|
764
|
+
stack.keys = function(_) {
|
|
765
|
+
return arguments.length ? (keys = typeof _ === "function" ? _ : constant_default(Array.from(_)), stack) : keys;
|
|
766
|
+
};
|
|
767
|
+
stack.value = function(_) {
|
|
768
|
+
return arguments.length ? (value = typeof _ === "function" ? _ : constant_default(+_), stack) : value;
|
|
769
|
+
};
|
|
770
|
+
stack.order = function(_) {
|
|
771
|
+
return arguments.length ? (order = _ == null ? none_default : typeof _ === "function" ? _ : constant_default(Array.from(_)), stack) : order;
|
|
772
|
+
};
|
|
773
|
+
stack.offset = function(_) {
|
|
774
|
+
return arguments.length ? (offset = _ == null ? none_default$1 : _, stack) : offset;
|
|
775
|
+
};
|
|
776
|
+
return stack;
|
|
777
|
+
}
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/offset/expand.js
|
|
780
|
+
function expand_default(series, order) {
|
|
781
|
+
if (!((n = series.length) > 0)) return;
|
|
782
|
+
for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {
|
|
783
|
+
for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;
|
|
784
|
+
if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;
|
|
785
|
+
}
|
|
786
|
+
none_default$1(series, order);
|
|
787
|
+
}
|
|
788
|
+
//#endregion
|
|
789
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/offset/silhouette.js
|
|
790
|
+
function silhouette_default(series, order) {
|
|
791
|
+
if (!((n = series.length) > 0)) return;
|
|
792
|
+
for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {
|
|
793
|
+
for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;
|
|
794
|
+
s0[j][1] += s0[j][0] = -y / 2;
|
|
795
|
+
}
|
|
796
|
+
none_default$1(series, order);
|
|
797
|
+
}
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/offset/wiggle.js
|
|
800
|
+
function wiggle_default(series, order) {
|
|
801
|
+
if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;
|
|
802
|
+
for (var y = 0, j = 1, s0, m, n; j < m; ++j) {
|
|
803
|
+
for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {
|
|
804
|
+
var si = series[order[i]], sij0 = si[j][1] || 0, s3 = (sij0 - (si[j - 1][1] || 0)) / 2;
|
|
805
|
+
for (var k = 0; k < i; ++k) {
|
|
806
|
+
var sk = series[order[k]], skj0 = sk[j][1] || 0, skj1 = sk[j - 1][1] || 0;
|
|
807
|
+
s3 += skj0 - skj1;
|
|
808
|
+
}
|
|
809
|
+
s1 += sij0, s2 += s3 * sij0;
|
|
810
|
+
}
|
|
811
|
+
s0[j - 1][1] += s0[j - 1][0] = y;
|
|
812
|
+
if (s1) y -= s2 / s1;
|
|
813
|
+
}
|
|
814
|
+
s0[j - 1][1] += s0[j - 1][0] = y;
|
|
815
|
+
none_default$1(series, order);
|
|
816
|
+
}
|
|
817
|
+
//#endregion
|
|
818
|
+
export { cross_default as C, area_default as D, bumpY as E, line_default as O, diamond_default as S, bumpX as T, Symbol as _, none_default as a, star_default as b, stepBefore as c, monotoneX as d, monotoneY as f, basis_default as g, basisClosed_default as h, stack_default as i, linear_default as k, step_default as l, basisOpen_default as m, silhouette_default as n, none_default$1 as o, linearClosed_default as p, expand_default as r, stepAfter as s, wiggle_default as t, natural_default as u, wye_default as v, circle_default as w, square_default as x, triangle_default as y };
|