vite-plugin-kiru 0.29.0-preview.1 → 0.29.0-preview.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1545 -1531
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1715,6 +1715,9 @@ var require_magic_string_cjs = __commonJS({
|
|
|
1715
1715
|
}
|
|
1716
1716
|
});
|
|
1717
1717
|
|
|
1718
|
+
// src/index.ts
|
|
1719
|
+
import path7 from "node:path";
|
|
1720
|
+
|
|
1718
1721
|
// src/codegen/shared.ts
|
|
1719
1722
|
var import_magic_string = __toESM(require_magic_string_cjs(), 1);
|
|
1720
1723
|
|
|
@@ -2165,6 +2168,9 @@ function tEntries(obj) {
|
|
|
2165
2168
|
return Object.entries(obj);
|
|
2166
2169
|
}
|
|
2167
2170
|
|
|
2171
|
+
// src/config.ts
|
|
2172
|
+
import path2 from "node:path";
|
|
2173
|
+
|
|
2168
2174
|
// src/virtual-modules.ts
|
|
2169
2175
|
import path from "node:path";
|
|
2170
2176
|
import fs2 from "node:fs";
|
|
@@ -2234,1351 +2240,203 @@ if (import.meta.env.DEV) {
|
|
|
2234
2240
|
};
|
|
2235
2241
|
}
|
|
2236
2242
|
|
|
2237
|
-
// src/
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
+
// src/config.ts
|
|
2244
|
+
var defaultEsBuildOptions = {
|
|
2245
|
+
jsxInject: `import { createElement as _jsx, Fragment as _jsxFragment } from "kiru"`,
|
|
2246
|
+
jsx: "transform",
|
|
2247
|
+
jsxFactory: "_jsx",
|
|
2248
|
+
jsxFragment: "_jsxFragment",
|
|
2249
|
+
loader: "tsx",
|
|
2250
|
+
include: ["**/*.tsx", "**/*.ts", "**/*.jsx", "**/*.js"]
|
|
2251
|
+
};
|
|
2252
|
+
var defaultSSGOptions = {
|
|
2253
|
+
baseUrl: "/",
|
|
2254
|
+
dir: "src/pages",
|
|
2255
|
+
document: "document.tsx",
|
|
2256
|
+
page: "index.{tsx,jsx}",
|
|
2257
|
+
layout: "layout.{tsx,jsx}",
|
|
2258
|
+
transition: false,
|
|
2259
|
+
build: {
|
|
2260
|
+
maxConcurrentRenders: 100
|
|
2243
2261
|
}
|
|
2244
|
-
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2262
|
+
};
|
|
2263
|
+
function createPluginState(opts = {}) {
|
|
2264
|
+
let fileLinkFormatter = (path8, line) => `vscode://file/${path8}:${line}`;
|
|
2265
|
+
let dtClientPathname = "/__devtools__";
|
|
2266
|
+
if (typeof opts.devtools === "object") {
|
|
2267
|
+
dtClientPathname = opts.devtools.dtClientPathname ?? dtClientPathname;
|
|
2268
|
+
fileLinkFormatter = opts.devtools.formatFileLink ?? fileLinkFormatter;
|
|
2269
|
+
}
|
|
2270
|
+
if (!dtClientPathname.startsWith("/")) {
|
|
2271
|
+
throw new Error(
|
|
2272
|
+
"[vite-plugin-kiru]: devtools.dtClientPathname must start with '/'"
|
|
2273
|
+
);
|
|
2274
|
+
}
|
|
2275
|
+
const state = {
|
|
2276
|
+
projectRoot: process.cwd().replace(/\\/g, "/"),
|
|
2277
|
+
includedPaths: [],
|
|
2278
|
+
fileLinkFormatter,
|
|
2279
|
+
dtClientPathname,
|
|
2280
|
+
dtHostScriptPath: "/__devtools_host__.js",
|
|
2281
|
+
manifestPath: "vite-manifest.json",
|
|
2282
|
+
loggingEnabled: opts.loggingEnabled === true,
|
|
2283
|
+
ssgOptions: null
|
|
2257
2284
|
};
|
|
2258
|
-
const {
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2285
|
+
const { ssg } = opts;
|
|
2286
|
+
if (!ssg) return state;
|
|
2287
|
+
if (ssg === true) {
|
|
2288
|
+
return {
|
|
2289
|
+
...state,
|
|
2290
|
+
ssgOptions: defaultSSGOptions
|
|
2291
|
+
};
|
|
2292
|
+
}
|
|
2293
|
+
if (ssg.baseUrl && !ssg.baseUrl.startsWith("/")) {
|
|
2294
|
+
throw new Error("[vite-plugin-kiru]: ssg.baseUrl must start with '/'");
|
|
2295
|
+
}
|
|
2296
|
+
const {
|
|
2297
|
+
baseUrl,
|
|
2298
|
+
dir,
|
|
2299
|
+
document,
|
|
2300
|
+
page,
|
|
2301
|
+
layout,
|
|
2302
|
+
transition,
|
|
2303
|
+
build: { maxConcurrentRenders }
|
|
2304
|
+
} = defaultSSGOptions;
|
|
2305
|
+
return {
|
|
2306
|
+
...state,
|
|
2307
|
+
ssgOptions: {
|
|
2308
|
+
...ssg,
|
|
2309
|
+
baseUrl: ssg.baseUrl ?? baseUrl,
|
|
2310
|
+
dir: ssg.dir ?? dir,
|
|
2311
|
+
document: ssg.document ?? document,
|
|
2312
|
+
page: ssg.page ?? page,
|
|
2313
|
+
layout: ssg.layout ?? layout,
|
|
2314
|
+
transition: ssg.transition ?? transition,
|
|
2315
|
+
build: {
|
|
2316
|
+
maxConcurrentRenders: ssg.build?.maxConcurrentRenders ?? maxConcurrentRenders
|
|
2317
|
+
}
|
|
2271
2318
|
}
|
|
2272
2319
|
};
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2320
|
+
}
|
|
2321
|
+
function createViteConfig(config, opts) {
|
|
2322
|
+
if (!opts.ssg) {
|
|
2323
|
+
return {
|
|
2324
|
+
...config,
|
|
2325
|
+
esbuild: {
|
|
2326
|
+
...defaultEsBuildOptions,
|
|
2327
|
+
...config.esbuild
|
|
2328
|
+
}
|
|
2329
|
+
};
|
|
2281
2330
|
}
|
|
2282
|
-
const
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
url,
|
|
2288
|
-
html,
|
|
2289
|
-
"\0" + VIRTUAL_ENTRY_CLIENT_ID
|
|
2290
|
-
);
|
|
2291
|
-
if (cssModules.length) {
|
|
2292
|
-
const stylesheets = cssModules.map((mod2) => {
|
|
2293
|
-
const p = mod2.id?.replace(projectRoot, "");
|
|
2294
|
-
return `<link rel="stylesheet" type="text/css" href="${p}?temp">`;
|
|
2295
|
-
});
|
|
2296
|
-
html = html.replace("<head>", "<head>" + stylesheets.join("\n"));
|
|
2331
|
+
const isSsrBuild = config.build?.ssr;
|
|
2332
|
+
const rollup = config.build?.rollupOptions ?? {};
|
|
2333
|
+
let input = rollup.input;
|
|
2334
|
+
if (!input) {
|
|
2335
|
+
input = isSsrBuild ? VIRTUAL_ENTRY_SERVER_ID : VIRTUAL_ENTRY_CLIENT_ID;
|
|
2297
2336
|
}
|
|
2298
|
-
|
|
2337
|
+
const ssr = isSsrBuild === true ? true : config.build?.ssr;
|
|
2338
|
+
const baseOut = config.build?.outDir ?? "dist";
|
|
2339
|
+
const desiredOutDir = isSsrBuild ? `${baseOut}/server` : `${baseOut}/client`;
|
|
2340
|
+
return {
|
|
2341
|
+
...config,
|
|
2342
|
+
appType: "custom",
|
|
2343
|
+
esbuild: {
|
|
2344
|
+
...defaultEsBuildOptions,
|
|
2345
|
+
...config.esbuild
|
|
2346
|
+
},
|
|
2347
|
+
server: {},
|
|
2348
|
+
build: {
|
|
2349
|
+
...config.build,
|
|
2350
|
+
ssr,
|
|
2351
|
+
manifest: "vite-manifest.json",
|
|
2352
|
+
ssrEmitAssets: true,
|
|
2353
|
+
ssrManifest: true,
|
|
2354
|
+
outDir: desiredOutDir,
|
|
2355
|
+
rollupOptions: {
|
|
2356
|
+
...rollup,
|
|
2357
|
+
input
|
|
2358
|
+
}
|
|
2359
|
+
}
|
|
2360
|
+
};
|
|
2361
|
+
}
|
|
2362
|
+
function updatePluginState(state, config, opts) {
|
|
2363
|
+
const isProduction = config.isProduction ?? false;
|
|
2364
|
+
const isBuild = config.command === "build";
|
|
2365
|
+
const isSSRBuild = !!config.build?.ssr;
|
|
2366
|
+
const devtoolsEnabled = opts.devtools !== false && !isBuild && !isProduction;
|
|
2367
|
+
const projectRoot = config.root.replace(/\\/g, "/") ?? process.cwd().replace(/\\/g, "/");
|
|
2368
|
+
const includedPaths = (opts.include ?? []).map(
|
|
2369
|
+
(p) => path2.resolve(projectRoot, p).replace(/\\/g, "/")
|
|
2370
|
+
);
|
|
2371
|
+
const outDir = config.build.outDir ?? "dist";
|
|
2372
|
+
const normalizedOut = outDir.replace(/\\/g, "/");
|
|
2373
|
+
const baseOutDir = normalizedOut.replace(/\/(server|client)$/i, "") || "dist";
|
|
2374
|
+
return {
|
|
2375
|
+
...state,
|
|
2376
|
+
isProduction,
|
|
2377
|
+
isBuild,
|
|
2378
|
+
isSSRBuild,
|
|
2379
|
+
devtoolsEnabled,
|
|
2380
|
+
projectRoot,
|
|
2381
|
+
includedPaths,
|
|
2382
|
+
outDir,
|
|
2383
|
+
baseOutDir,
|
|
2384
|
+
// Ensure all required fields are present
|
|
2385
|
+
loggingEnabled: state.loggingEnabled ?? false,
|
|
2386
|
+
fileLinkFormatter: state.fileLinkFormatter,
|
|
2387
|
+
dtClientPathname: state.dtClientPathname,
|
|
2388
|
+
dtHostScriptPath: state.dtHostScriptPath,
|
|
2389
|
+
manifestPath: state.manifestPath,
|
|
2390
|
+
ssgOptions: state.ssgOptions,
|
|
2391
|
+
staticProps: {}
|
|
2392
|
+
};
|
|
2299
2393
|
}
|
|
2300
2394
|
|
|
2301
|
-
//
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
"application/prs.xsf+xml": ["xsf"],
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
"application/vnd.acucorp": ["atc", "acutc"],
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
"application/vnd.adobe.xfdf": ["*xfdf"],
|
|
2325
|
-
|
|
2326
|
-
"application/vnd.ahead.space": ["ahead"],
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
"application/vnd.android.package-archive": ["apk"],
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
"application/vnd.apple.keynote": ["key"],
|
|
2338
|
-
"application/vnd.apple.mpegurl": ["m3u8"],
|
|
2339
|
-
|
|
2340
|
-
"
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
"application/vnd.balsamiq.bmml+xml": ["bmml"],
|
|
2347
|
-
"application/vnd.blueice.multipass": ["mpm"],
|
|
2348
|
-
"application/vnd.bmi": ["bmi"],
|
|
2349
|
-
"application/vnd.businessobjects": ["rep"],
|
|
2350
|
-
"application/vnd.chemdraw+xml": ["cdxml"],
|
|
2351
|
-
"application/vnd.chipnuts.karaoke-mmd": ["mmd"],
|
|
2352
|
-
"application/vnd.cinderella": ["cdy"],
|
|
2353
|
-
"application/vnd.citationstyles.style+xml": ["csl"],
|
|
2354
|
-
"application/vnd.claymore": ["cla"],
|
|
2355
|
-
"application/vnd.cloanto.rp9": ["rp9"],
|
|
2356
|
-
"application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"],
|
|
2357
|
-
"application/vnd.cluetrust.cartomobile-config": ["c11amc"],
|
|
2358
|
-
"application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"],
|
|
2359
|
-
"application/vnd.commonspace": ["csp"],
|
|
2360
|
-
"application/vnd.contact.cmsg": ["cdbcmsg"],
|
|
2361
|
-
"application/vnd.cosmocaller": ["cmc"],
|
|
2362
|
-
"application/vnd.crick.clicker": ["clkx"],
|
|
2363
|
-
"application/vnd.crick.clicker.keyboard": ["clkk"],
|
|
2364
|
-
"application/vnd.crick.clicker.palette": ["clkp"],
|
|
2365
|
-
"application/vnd.crick.clicker.template": ["clkt"],
|
|
2366
|
-
"application/vnd.crick.clicker.wordbank": ["clkw"],
|
|
2367
|
-
"application/vnd.criticaltools.wbs+xml": ["wbs"],
|
|
2368
|
-
"application/vnd.ctc-posml": ["pml"],
|
|
2369
|
-
"application/vnd.cups-ppd": ["ppd"],
|
|
2370
|
-
"application/vnd.curl.car": ["car"],
|
|
2371
|
-
"application/vnd.curl.pcurl": ["pcurl"],
|
|
2372
|
-
"application/vnd.dart": ["dart"],
|
|
2373
|
-
"application/vnd.data-vision.rdz": ["rdz"],
|
|
2374
|
-
"application/vnd.dbf": ["dbf"],
|
|
2375
|
-
"application/vnd.dcmp+xml": ["dcmp"],
|
|
2376
|
-
"application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"],
|
|
2377
|
-
"application/vnd.dece.ttml+xml": ["uvt", "uvvt"],
|
|
2378
|
-
"application/vnd.dece.unspecified": ["uvx", "uvvx"],
|
|
2379
|
-
"application/vnd.dece.zip": ["uvz", "uvvz"],
|
|
2380
|
-
"application/vnd.denovo.fcselayout-link": ["fe_launch"],
|
|
2381
|
-
"application/vnd.dna": ["dna"],
|
|
2382
|
-
"application/vnd.dolby.mlp": ["mlp"],
|
|
2383
|
-
"application/vnd.dpgraph": ["dpg"],
|
|
2384
|
-
"application/vnd.dreamfactory": ["dfac"],
|
|
2385
|
-
"application/vnd.ds-keypoint": ["kpxx"],
|
|
2386
|
-
"application/vnd.dvb.ait": ["ait"],
|
|
2387
|
-
"application/vnd.dvb.service": ["svc"],
|
|
2388
|
-
"application/vnd.dynageo": ["geo"],
|
|
2389
|
-
"application/vnd.ecowin.chart": ["mag"],
|
|
2390
|
-
"application/vnd.enliven": ["nml"],
|
|
2391
|
-
"application/vnd.epson.esf": ["esf"],
|
|
2392
|
-
"application/vnd.epson.msf": ["msf"],
|
|
2393
|
-
"application/vnd.epson.quickanime": ["qam"],
|
|
2394
|
-
"application/vnd.epson.salt": ["slt"],
|
|
2395
|
-
"application/vnd.epson.ssf": ["ssf"],
|
|
2396
|
-
"application/vnd.eszigno3+xml": ["es3", "et3"],
|
|
2397
|
-
"application/vnd.ezpix-album": ["ez2"],
|
|
2398
|
-
"application/vnd.ezpix-package": ["ez3"],
|
|
2399
|
-
"application/vnd.fdf": ["*fdf"],
|
|
2400
|
-
"application/vnd.fdsn.mseed": ["mseed"],
|
|
2401
|
-
"application/vnd.fdsn.seed": ["seed", "dataless"],
|
|
2402
|
-
"application/vnd.flographit": ["gph"],
|
|
2403
|
-
"application/vnd.fluxtime.clip": ["ftc"],
|
|
2404
|
-
"application/vnd.framemaker": ["fm", "frame", "maker", "book"],
|
|
2405
|
-
"application/vnd.frogans.fnc": ["fnc"],
|
|
2406
|
-
"application/vnd.frogans.ltf": ["ltf"],
|
|
2407
|
-
"application/vnd.fsc.weblaunch": ["fsc"],
|
|
2408
|
-
"application/vnd.fujitsu.oasys": ["oas"],
|
|
2409
|
-
"application/vnd.fujitsu.oasys2": ["oa2"],
|
|
2410
|
-
"application/vnd.fujitsu.oasys3": ["oa3"],
|
|
2411
|
-
"application/vnd.fujitsu.oasysgp": ["fg5"],
|
|
2412
|
-
"application/vnd.fujitsu.oasysprs": ["bh2"],
|
|
2413
|
-
"application/vnd.fujixerox.ddd": ["ddd"],
|
|
2414
|
-
"application/vnd.fujixerox.docuworks": ["xdw"],
|
|
2415
|
-
"application/vnd.fujixerox.docuworks.binder": ["xbd"],
|
|
2416
|
-
"application/vnd.fuzzysheet": ["fzs"],
|
|
2417
|
-
"application/vnd.genomatix.tuxedo": ["txd"],
|
|
2418
|
-
"application/vnd.geogebra.file": ["ggb"],
|
|
2419
|
-
"application/vnd.geogebra.slides": ["ggs"],
|
|
2420
|
-
"application/vnd.geogebra.tool": ["ggt"],
|
|
2421
|
-
"application/vnd.geometry-explorer": ["gex", "gre"],
|
|
2422
|
-
"application/vnd.geonext": ["gxt"],
|
|
2423
|
-
"application/vnd.geoplan": ["g2w"],
|
|
2424
|
-
"application/vnd.geospace": ["g3w"],
|
|
2425
|
-
"application/vnd.gmx": ["gmx"],
|
|
2426
|
-
"application/vnd.google-apps.document": ["gdoc"],
|
|
2427
|
-
"application/vnd.google-apps.drawing": ["gdraw"],
|
|
2428
|
-
"application/vnd.google-apps.form": ["gform"],
|
|
2429
|
-
"application/vnd.google-apps.jam": ["gjam"],
|
|
2430
|
-
"application/vnd.google-apps.map": ["gmap"],
|
|
2431
|
-
"application/vnd.google-apps.presentation": ["gslides"],
|
|
2432
|
-
"application/vnd.google-apps.script": ["gscript"],
|
|
2433
|
-
"application/vnd.google-apps.site": ["gsite"],
|
|
2434
|
-
"application/vnd.google-apps.spreadsheet": ["gsheet"],
|
|
2435
|
-
"application/vnd.google-earth.kml+xml": ["kml"],
|
|
2436
|
-
"application/vnd.google-earth.kmz": ["kmz"],
|
|
2437
|
-
"application/vnd.gov.sk.xmldatacontainer+xml": ["xdcf"],
|
|
2438
|
-
"application/vnd.grafeq": ["gqf", "gqs"],
|
|
2439
|
-
"application/vnd.groove-account": ["gac"],
|
|
2440
|
-
"application/vnd.groove-help": ["ghf"],
|
|
2441
|
-
"application/vnd.groove-identity-message": ["gim"],
|
|
2442
|
-
"application/vnd.groove-injector": ["grv"],
|
|
2443
|
-
"application/vnd.groove-tool-message": ["gtm"],
|
|
2444
|
-
"application/vnd.groove-tool-template": ["tpl"],
|
|
2445
|
-
"application/vnd.groove-vcard": ["vcg"],
|
|
2446
|
-
"application/vnd.hal+xml": ["hal"],
|
|
2447
|
-
"application/vnd.handheld-entertainment+xml": ["zmm"],
|
|
2448
|
-
"application/vnd.hbci": ["hbci"],
|
|
2449
|
-
"application/vnd.hhe.lesson-player": ["les"],
|
|
2450
|
-
"application/vnd.hp-hpgl": ["hpgl"],
|
|
2451
|
-
"application/vnd.hp-hpid": ["hpid"],
|
|
2452
|
-
"application/vnd.hp-hps": ["hps"],
|
|
2453
|
-
"application/vnd.hp-jlyt": ["jlt"],
|
|
2454
|
-
"application/vnd.hp-pcl": ["pcl"],
|
|
2455
|
-
"application/vnd.hp-pclxl": ["pclxl"],
|
|
2456
|
-
"application/vnd.hydrostatix.sof-data": ["sfd-hdstx"],
|
|
2457
|
-
"application/vnd.ibm.minipay": ["mpy"],
|
|
2458
|
-
"application/vnd.ibm.modcap": ["afp", "listafp", "list3820"],
|
|
2459
|
-
"application/vnd.ibm.rights-management": ["irm"],
|
|
2460
|
-
"application/vnd.ibm.secure-container": ["sc"],
|
|
2461
|
-
"application/vnd.iccprofile": ["icc", "icm"],
|
|
2462
|
-
"application/vnd.igloader": ["igl"],
|
|
2463
|
-
"application/vnd.immervision-ivp": ["ivp"],
|
|
2464
|
-
"application/vnd.immervision-ivu": ["ivu"],
|
|
2465
|
-
"application/vnd.insors.igm": ["igm"],
|
|
2466
|
-
"application/vnd.intercon.formnet": ["xpw", "xpx"],
|
|
2467
|
-
"application/vnd.intergeo": ["i2g"],
|
|
2468
|
-
"application/vnd.intu.qbo": ["qbo"],
|
|
2469
|
-
"application/vnd.intu.qfx": ["qfx"],
|
|
2470
|
-
"application/vnd.ipunplugged.rcprofile": ["rcprofile"],
|
|
2471
|
-
"application/vnd.irepository.package+xml": ["irp"],
|
|
2472
|
-
"application/vnd.is-xpr": ["xpr"],
|
|
2473
|
-
"application/vnd.isac.fcs": ["fcs"],
|
|
2474
|
-
"application/vnd.jam": ["jam"],
|
|
2475
|
-
"application/vnd.jcp.javame.midlet-rms": ["rms"],
|
|
2476
|
-
"application/vnd.jisp": ["jisp"],
|
|
2477
|
-
"application/vnd.joost.joda-archive": ["joda"],
|
|
2478
|
-
"application/vnd.kahootz": ["ktz", "ktr"],
|
|
2479
|
-
"application/vnd.kde.karbon": ["karbon"],
|
|
2480
|
-
"application/vnd.kde.kchart": ["chrt"],
|
|
2481
|
-
"application/vnd.kde.kformula": ["kfo"],
|
|
2482
|
-
"application/vnd.kde.kivio": ["flw"],
|
|
2483
|
-
"application/vnd.kde.kontour": ["kon"],
|
|
2484
|
-
"application/vnd.kde.kpresenter": ["kpr", "kpt"],
|
|
2485
|
-
"application/vnd.kde.kspread": ["ksp"],
|
|
2486
|
-
"application/vnd.kde.kword": ["kwd", "kwt"],
|
|
2487
|
-
"application/vnd.kenameaapp": ["htke"],
|
|
2488
|
-
"application/vnd.kidspiration": ["kia"],
|
|
2489
|
-
"application/vnd.kinar": ["kne", "knp"],
|
|
2490
|
-
"application/vnd.koan": ["skp", "skd", "skt", "skm"],
|
|
2491
|
-
"application/vnd.kodak-descriptor": ["sse"],
|
|
2492
|
-
"application/vnd.las.las+xml": ["lasxml"],
|
|
2493
|
-
"application/vnd.llamagraphics.life-balance.desktop": ["lbd"],
|
|
2494
|
-
"application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"],
|
|
2495
|
-
"application/vnd.lotus-1-2-3": ["123"],
|
|
2496
|
-
"application/vnd.lotus-approach": ["apr"],
|
|
2497
|
-
"application/vnd.lotus-freelance": ["pre"],
|
|
2498
|
-
"application/vnd.lotus-notes": ["nsf"],
|
|
2499
|
-
"application/vnd.lotus-organizer": ["org"],
|
|
2500
|
-
"application/vnd.lotus-screencam": ["scm"],
|
|
2501
|
-
"application/vnd.lotus-wordpro": ["lwp"],
|
|
2502
|
-
"application/vnd.macports.portpkg": ["portpkg"],
|
|
2503
|
-
"application/vnd.mapbox-vector-tile": ["mvt"],
|
|
2504
|
-
"application/vnd.mcd": ["mcd"],
|
|
2505
|
-
"application/vnd.medcalcdata": ["mc1"],
|
|
2506
|
-
"application/vnd.mediastation.cdkey": ["cdkey"],
|
|
2507
|
-
"application/vnd.mfer": ["mwf"],
|
|
2508
|
-
"application/vnd.mfmp": ["mfm"],
|
|
2509
|
-
"application/vnd.micrografx.flo": ["flo"],
|
|
2510
|
-
"application/vnd.micrografx.igx": ["igx"],
|
|
2511
|
-
"application/vnd.mif": ["mif"],
|
|
2512
|
-
"application/vnd.mobius.daf": ["daf"],
|
|
2513
|
-
"application/vnd.mobius.dis": ["dis"],
|
|
2514
|
-
"application/vnd.mobius.mbk": ["mbk"],
|
|
2515
|
-
"application/vnd.mobius.mqy": ["mqy"],
|
|
2516
|
-
"application/vnd.mobius.msl": ["msl"],
|
|
2517
|
-
"application/vnd.mobius.plc": ["plc"],
|
|
2518
|
-
"application/vnd.mobius.txf": ["txf"],
|
|
2519
|
-
"application/vnd.mophun.application": ["mpn"],
|
|
2520
|
-
"application/vnd.mophun.certificate": ["mpc"],
|
|
2521
|
-
"application/vnd.mozilla.xul+xml": ["xul"],
|
|
2522
|
-
"application/vnd.ms-artgalry": ["cil"],
|
|
2523
|
-
"application/vnd.ms-cab-compressed": ["cab"],
|
|
2524
|
-
"application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"],
|
|
2525
|
-
"application/vnd.ms-excel.addin.macroenabled.12": ["xlam"],
|
|
2526
|
-
"application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"],
|
|
2527
|
-
"application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"],
|
|
2528
|
-
"application/vnd.ms-excel.template.macroenabled.12": ["xltm"],
|
|
2529
|
-
"application/vnd.ms-fontobject": ["eot"],
|
|
2530
|
-
"application/vnd.ms-htmlhelp": ["chm"],
|
|
2531
|
-
"application/vnd.ms-ims": ["ims"],
|
|
2532
|
-
"application/vnd.ms-lrm": ["lrm"],
|
|
2533
|
-
"application/vnd.ms-officetheme": ["thmx"],
|
|
2534
|
-
"application/vnd.ms-outlook": ["msg"],
|
|
2535
|
-
"application/vnd.ms-pki.seccat": ["cat"],
|
|
2536
|
-
"application/vnd.ms-pki.stl": ["*stl"],
|
|
2537
|
-
"application/vnd.ms-powerpoint": ["ppt", "pps", "pot"],
|
|
2538
|
-
"application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"],
|
|
2539
|
-
"application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"],
|
|
2540
|
-
"application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"],
|
|
2541
|
-
"application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"],
|
|
2542
|
-
"application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"],
|
|
2543
|
-
"application/vnd.ms-project": ["*mpp", "mpt"],
|
|
2544
|
-
"application/vnd.ms-visio.viewer": ["vdx"],
|
|
2545
|
-
"application/vnd.ms-word.document.macroenabled.12": ["docm"],
|
|
2546
|
-
"application/vnd.ms-word.template.macroenabled.12": ["dotm"],
|
|
2547
|
-
"application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"],
|
|
2548
|
-
"application/vnd.ms-wpl": ["wpl"],
|
|
2549
|
-
"application/vnd.ms-xpsdocument": ["xps"],
|
|
2550
|
-
"application/vnd.mseq": ["mseq"],
|
|
2551
|
-
"application/vnd.musician": ["mus"],
|
|
2552
|
-
"application/vnd.muvee.style": ["msty"],
|
|
2553
|
-
"application/vnd.mynfc": ["taglet"],
|
|
2554
|
-
"application/vnd.nato.bindingdataobject+xml": ["bdo"],
|
|
2555
|
-
"application/vnd.neurolanguage.nlu": ["nlu"],
|
|
2556
|
-
"application/vnd.nitf": ["ntf", "nitf"],
|
|
2557
|
-
"application/vnd.noblenet-directory": ["nnd"],
|
|
2558
|
-
"application/vnd.noblenet-sealer": ["nns"],
|
|
2559
|
-
"application/vnd.noblenet-web": ["nnw"],
|
|
2560
|
-
"application/vnd.nokia.n-gage.ac+xml": ["*ac"],
|
|
2561
|
-
"application/vnd.nokia.n-gage.data": ["ngdat"],
|
|
2562
|
-
"application/vnd.nokia.n-gage.symbian.install": ["n-gage"],
|
|
2563
|
-
"application/vnd.nokia.radio-preset": ["rpst"],
|
|
2564
|
-
"application/vnd.nokia.radio-presets": ["rpss"],
|
|
2565
|
-
"application/vnd.novadigm.edm": ["edm"],
|
|
2566
|
-
"application/vnd.novadigm.edx": ["edx"],
|
|
2567
|
-
"application/vnd.novadigm.ext": ["ext"],
|
|
2568
|
-
"application/vnd.oasis.opendocument.chart": ["odc"],
|
|
2569
|
-
"application/vnd.oasis.opendocument.chart-template": ["otc"],
|
|
2570
|
-
"application/vnd.oasis.opendocument.database": ["odb"],
|
|
2571
|
-
"application/vnd.oasis.opendocument.formula": ["odf"],
|
|
2572
|
-
"application/vnd.oasis.opendocument.formula-template": ["odft"],
|
|
2573
|
-
"application/vnd.oasis.opendocument.graphics": ["odg"],
|
|
2574
|
-
"application/vnd.oasis.opendocument.graphics-template": ["otg"],
|
|
2575
|
-
"application/vnd.oasis.opendocument.image": ["odi"],
|
|
2576
|
-
"application/vnd.oasis.opendocument.image-template": ["oti"],
|
|
2577
|
-
"application/vnd.oasis.opendocument.presentation": ["odp"],
|
|
2578
|
-
"application/vnd.oasis.opendocument.presentation-template": ["otp"],
|
|
2579
|
-
"application/vnd.oasis.opendocument.spreadsheet": ["ods"],
|
|
2580
|
-
"application/vnd.oasis.opendocument.spreadsheet-template": ["ots"],
|
|
2581
|
-
"application/vnd.oasis.opendocument.text": ["odt"],
|
|
2582
|
-
"application/vnd.oasis.opendocument.text-master": ["odm"],
|
|
2583
|
-
"application/vnd.oasis.opendocument.text-template": ["ott"],
|
|
2584
|
-
"application/vnd.oasis.opendocument.text-web": ["oth"],
|
|
2585
|
-
"application/vnd.olpc-sugar": ["xo"],
|
|
2586
|
-
"application/vnd.oma.dd2+xml": ["dd2"],
|
|
2587
|
-
"application/vnd.openblox.game+xml": ["obgx"],
|
|
2588
|
-
"application/vnd.openofficeorg.extension": ["oxt"],
|
|
2589
|
-
"application/vnd.openstreetmap.data+xml": ["osm"],
|
|
2590
|
-
"application/vnd.openxmlformats-officedocument.presentationml.presentation": [
|
|
2591
|
-
"pptx"
|
|
2592
|
-
],
|
|
2593
|
-
"application/vnd.openxmlformats-officedocument.presentationml.slide": [
|
|
2594
|
-
"sldx"
|
|
2595
|
-
],
|
|
2596
|
-
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": [
|
|
2597
|
-
"ppsx"
|
|
2598
|
-
],
|
|
2599
|
-
"application/vnd.openxmlformats-officedocument.presentationml.template": [
|
|
2600
|
-
"potx"
|
|
2601
|
-
],
|
|
2602
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"],
|
|
2603
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": [
|
|
2604
|
-
"xltx"
|
|
2605
|
-
],
|
|
2606
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": [
|
|
2607
|
-
"docx"
|
|
2608
|
-
],
|
|
2609
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.template": [
|
|
2610
|
-
"dotx"
|
|
2611
|
-
],
|
|
2612
|
-
"application/vnd.osgeo.mapguide.package": ["mgp"],
|
|
2613
|
-
"application/vnd.osgi.dp": ["dp"],
|
|
2614
|
-
"application/vnd.osgi.subsystem": ["esa"],
|
|
2615
|
-
"application/vnd.palm": ["pdb", "pqa", "oprc"],
|
|
2616
|
-
"application/vnd.pawaafile": ["paw"],
|
|
2617
|
-
"application/vnd.pg.format": ["str"],
|
|
2618
|
-
"application/vnd.pg.osasli": ["ei6"],
|
|
2619
|
-
"application/vnd.picsel": ["efif"],
|
|
2620
|
-
"application/vnd.pmi.widget": ["wg"],
|
|
2621
|
-
"application/vnd.pocketlearn": ["plf"],
|
|
2622
|
-
"application/vnd.powerbuilder6": ["pbd"],
|
|
2623
|
-
"application/vnd.previewsystems.box": ["box"],
|
|
2624
|
-
"application/vnd.procrate.brushset": ["brushset"],
|
|
2625
|
-
"application/vnd.procreate.brush": ["brush"],
|
|
2626
|
-
"application/vnd.procreate.dream": ["drm"],
|
|
2627
|
-
"application/vnd.proteus.magazine": ["mgz"],
|
|
2628
|
-
"application/vnd.publishare-delta-tree": ["qps"],
|
|
2629
|
-
"application/vnd.pvi.ptid1": ["ptid"],
|
|
2630
|
-
"application/vnd.pwg-xhtml-print+xml": ["xhtm"],
|
|
2631
|
-
"application/vnd.quark.quarkxpress": [
|
|
2632
|
-
"qxd",
|
|
2633
|
-
"qxt",
|
|
2634
|
-
"qwd",
|
|
2635
|
-
"qwt",
|
|
2636
|
-
"qxl",
|
|
2637
|
-
"qxb"
|
|
2638
|
-
],
|
|
2639
|
-
"application/vnd.rar": ["rar"],
|
|
2640
|
-
"application/vnd.realvnc.bed": ["bed"],
|
|
2641
|
-
"application/vnd.recordare.musicxml": ["mxl"],
|
|
2642
|
-
"application/vnd.recordare.musicxml+xml": ["musicxml"],
|
|
2643
|
-
"application/vnd.rig.cryptonote": ["cryptonote"],
|
|
2644
|
-
"application/vnd.rim.cod": ["cod"],
|
|
2645
|
-
"application/vnd.rn-realmedia": ["rm"],
|
|
2646
|
-
"application/vnd.rn-realmedia-vbr": ["rmvb"],
|
|
2647
|
-
"application/vnd.route66.link66+xml": ["link66"],
|
|
2648
|
-
"application/vnd.sailingtracker.track": ["st"],
|
|
2649
|
-
"application/vnd.seemail": ["see"],
|
|
2650
|
-
"application/vnd.sema": ["sema"],
|
|
2651
|
-
"application/vnd.semd": ["semd"],
|
|
2652
|
-
"application/vnd.semf": ["semf"],
|
|
2653
|
-
"application/vnd.shana.informed.formdata": ["ifm"],
|
|
2654
|
-
"application/vnd.shana.informed.formtemplate": ["itp"],
|
|
2655
|
-
"application/vnd.shana.informed.interchange": ["iif"],
|
|
2656
|
-
"application/vnd.shana.informed.package": ["ipk"],
|
|
2657
|
-
"application/vnd.simtech-mindmapper": ["twd", "twds"],
|
|
2658
|
-
"application/vnd.smaf": ["mmf"],
|
|
2659
|
-
"application/vnd.smart.teacher": ["teacher"],
|
|
2660
|
-
"application/vnd.software602.filler.form+xml": ["fo"],
|
|
2661
|
-
"application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"],
|
|
2662
|
-
"application/vnd.spotfire.dxp": ["dxp"],
|
|
2663
|
-
"application/vnd.spotfire.sfs": ["sfs"],
|
|
2664
|
-
"application/vnd.stardivision.calc": ["sdc"],
|
|
2665
|
-
"application/vnd.stardivision.draw": ["sda"],
|
|
2666
|
-
"application/vnd.stardivision.impress": ["sdd"],
|
|
2667
|
-
"application/vnd.stardivision.math": ["smf"],
|
|
2668
|
-
"application/vnd.stardivision.writer": ["sdw", "vor"],
|
|
2669
|
-
"application/vnd.stardivision.writer-global": ["sgl"],
|
|
2670
|
-
"application/vnd.stepmania.package": ["smzip"],
|
|
2671
|
-
"application/vnd.stepmania.stepchart": ["sm"],
|
|
2672
|
-
"application/vnd.sun.wadl+xml": ["wadl"],
|
|
2673
|
-
"application/vnd.sun.xml.calc": ["sxc"],
|
|
2674
|
-
"application/vnd.sun.xml.calc.template": ["stc"],
|
|
2675
|
-
"application/vnd.sun.xml.draw": ["sxd"],
|
|
2676
|
-
"application/vnd.sun.xml.draw.template": ["std"],
|
|
2677
|
-
"application/vnd.sun.xml.impress": ["sxi"],
|
|
2678
|
-
"application/vnd.sun.xml.impress.template": ["sti"],
|
|
2679
|
-
"application/vnd.sun.xml.math": ["sxm"],
|
|
2680
|
-
"application/vnd.sun.xml.writer": ["sxw"],
|
|
2681
|
-
"application/vnd.sun.xml.writer.global": ["sxg"],
|
|
2682
|
-
"application/vnd.sun.xml.writer.template": ["stw"],
|
|
2683
|
-
"application/vnd.sus-calendar": ["sus", "susp"],
|
|
2684
|
-
"application/vnd.svd": ["svd"],
|
|
2685
|
-
"application/vnd.symbian.install": ["sis", "sisx"],
|
|
2686
|
-
"application/vnd.syncml+xml": ["xsm"],
|
|
2687
|
-
"application/vnd.syncml.dm+wbxml": ["bdm"],
|
|
2688
|
-
"application/vnd.syncml.dm+xml": ["xdm"],
|
|
2689
|
-
"application/vnd.syncml.dmddf+xml": ["ddf"],
|
|
2690
|
-
"application/vnd.tao.intent-module-archive": ["tao"],
|
|
2691
|
-
"application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"],
|
|
2692
|
-
"application/vnd.tmobile-livetv": ["tmo"],
|
|
2693
|
-
"application/vnd.trid.tpt": ["tpt"],
|
|
2694
|
-
"application/vnd.triscape.mxs": ["mxs"],
|
|
2695
|
-
"application/vnd.trueapp": ["tra"],
|
|
2696
|
-
"application/vnd.ufdl": ["ufd", "ufdl"],
|
|
2697
|
-
"application/vnd.uiq.theme": ["utz"],
|
|
2698
|
-
"application/vnd.umajin": ["umj"],
|
|
2699
|
-
"application/vnd.unity": ["unityweb"],
|
|
2700
|
-
"application/vnd.uoml+xml": ["uoml", "uo"],
|
|
2701
|
-
"application/vnd.vcx": ["vcx"],
|
|
2702
|
-
"application/vnd.visio": ["vsd", "vst", "vss", "vsw", "vsdx", "vtx"],
|
|
2703
|
-
"application/vnd.visionary": ["vis"],
|
|
2704
|
-
"application/vnd.vsf": ["vsf"],
|
|
2705
|
-
"application/vnd.wap.wbxml": ["wbxml"],
|
|
2706
|
-
"application/vnd.wap.wmlc": ["wmlc"],
|
|
2707
|
-
"application/vnd.wap.wmlscriptc": ["wmlsc"],
|
|
2708
|
-
"application/vnd.webturbo": ["wtb"],
|
|
2709
|
-
"application/vnd.wolfram.player": ["nbp"],
|
|
2710
|
-
"application/vnd.wordperfect": ["wpd"],
|
|
2711
|
-
"application/vnd.wqd": ["wqd"],
|
|
2712
|
-
"application/vnd.wt.stf": ["stf"],
|
|
2713
|
-
"application/vnd.xara": ["xar"],
|
|
2714
|
-
"application/vnd.xfdl": ["xfdl"],
|
|
2715
|
-
"application/vnd.yamaha.hv-dic": ["hvd"],
|
|
2716
|
-
"application/vnd.yamaha.hv-script": ["hvs"],
|
|
2717
|
-
"application/vnd.yamaha.hv-voice": ["hvp"],
|
|
2718
|
-
"application/vnd.yamaha.openscoreformat": ["osf"],
|
|
2719
|
-
"application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"],
|
|
2720
|
-
"application/vnd.yamaha.smaf-audio": ["saf"],
|
|
2721
|
-
"application/vnd.yamaha.smaf-phrase": ["spf"],
|
|
2722
|
-
"application/vnd.yellowriver-custom-menu": ["cmp"],
|
|
2723
|
-
"application/vnd.zul": ["zir", "zirz"],
|
|
2724
|
-
"application/vnd.zzazz.deck+xml": ["zaz"],
|
|
2725
|
-
"application/x-7z-compressed": ["7z"],
|
|
2726
|
-
"application/x-abiword": ["abw"],
|
|
2727
|
-
"application/x-ace-compressed": ["ace"],
|
|
2728
|
-
"application/x-apple-diskimage": ["*dmg"],
|
|
2729
|
-
"application/x-arj": ["arj"],
|
|
2730
|
-
"application/x-authorware-bin": ["aab", "x32", "u32", "vox"],
|
|
2731
|
-
"application/x-authorware-map": ["aam"],
|
|
2732
|
-
"application/x-authorware-seg": ["aas"],
|
|
2733
|
-
"application/x-bcpio": ["bcpio"],
|
|
2734
|
-
"application/x-bdoc": ["*bdoc"],
|
|
2735
|
-
"application/x-bittorrent": ["torrent"],
|
|
2736
|
-
"application/x-blender": ["blend"],
|
|
2737
|
-
"application/x-blorb": ["blb", "blorb"],
|
|
2738
|
-
"application/x-bzip": ["bz"],
|
|
2739
|
-
"application/x-bzip2": ["bz2", "boz"],
|
|
2740
|
-
"application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"],
|
|
2741
|
-
"application/x-cdlink": ["vcd"],
|
|
2742
|
-
"application/x-cfs-compressed": ["cfs"],
|
|
2743
|
-
"application/x-chat": ["chat"],
|
|
2744
|
-
"application/x-chess-pgn": ["pgn"],
|
|
2745
|
-
"application/x-chrome-extension": ["crx"],
|
|
2746
|
-
"application/x-cocoa": ["cco"],
|
|
2747
|
-
"application/x-compressed": ["*rar"],
|
|
2748
|
-
"application/x-conference": ["nsc"],
|
|
2749
|
-
"application/x-cpio": ["cpio"],
|
|
2750
|
-
"application/x-csh": ["csh"],
|
|
2751
|
-
"application/x-debian-package": ["*deb", "udeb"],
|
|
2752
|
-
"application/x-dgc-compressed": ["dgc"],
|
|
2753
|
-
"application/x-director": [
|
|
2754
|
-
"dir",
|
|
2755
|
-
"dcr",
|
|
2756
|
-
"dxr",
|
|
2757
|
-
"cst",
|
|
2758
|
-
"cct",
|
|
2759
|
-
"cxt",
|
|
2760
|
-
"w3d",
|
|
2761
|
-
"fgd",
|
|
2762
|
-
"swa"
|
|
2763
|
-
],
|
|
2764
|
-
"application/x-doom": ["wad"],
|
|
2765
|
-
"application/x-dtbncx+xml": ["ncx"],
|
|
2766
|
-
"application/x-dtbook+xml": ["dtb"],
|
|
2767
|
-
"application/x-dtbresource+xml": ["res"],
|
|
2768
|
-
"application/x-dvi": ["dvi"],
|
|
2769
|
-
"application/x-envoy": ["evy"],
|
|
2770
|
-
"application/x-eva": ["eva"],
|
|
2771
|
-
"application/x-font-bdf": ["bdf"],
|
|
2772
|
-
"application/x-font-ghostscript": ["gsf"],
|
|
2773
|
-
"application/x-font-linux-psf": ["psf"],
|
|
2774
|
-
"application/x-font-pcf": ["pcf"],
|
|
2775
|
-
"application/x-font-snf": ["snf"],
|
|
2776
|
-
"application/x-font-type1": ["pfa", "pfb", "pfm", "afm"],
|
|
2777
|
-
"application/x-freearc": ["arc"],
|
|
2778
|
-
"application/x-futuresplash": ["spl"],
|
|
2779
|
-
"application/x-gca-compressed": ["gca"],
|
|
2780
|
-
"application/x-glulx": ["ulx"],
|
|
2781
|
-
"application/x-gnumeric": ["gnumeric"],
|
|
2782
|
-
"application/x-gramps-xml": ["gramps"],
|
|
2783
|
-
"application/x-gtar": ["gtar"],
|
|
2784
|
-
"application/x-hdf": ["hdf"],
|
|
2785
|
-
"application/x-httpd-php": ["php"],
|
|
2786
|
-
"application/x-install-instructions": ["install"],
|
|
2787
|
-
"application/x-ipynb+json": ["ipynb"],
|
|
2788
|
-
"application/x-iso9660-image": ["*iso"],
|
|
2789
|
-
"application/x-iwork-keynote-sffkey": ["*key"],
|
|
2790
|
-
"application/x-iwork-numbers-sffnumbers": ["*numbers"],
|
|
2791
|
-
"application/x-iwork-pages-sffpages": ["*pages"],
|
|
2792
|
-
"application/x-java-archive-diff": ["jardiff"],
|
|
2793
|
-
"application/x-java-jnlp-file": ["jnlp"],
|
|
2794
|
-
"application/x-keepass2": ["kdbx"],
|
|
2795
|
-
"application/x-latex": ["latex"],
|
|
2796
|
-
"application/x-lua-bytecode": ["luac"],
|
|
2797
|
-
"application/x-lzh-compressed": ["lzh", "lha"],
|
|
2798
|
-
"application/x-makeself": ["run"],
|
|
2799
|
-
"application/x-mie": ["mie"],
|
|
2800
|
-
"application/x-mobipocket-ebook": ["*prc", "mobi"],
|
|
2801
|
-
"application/x-ms-application": ["application"],
|
|
2802
|
-
"application/x-ms-shortcut": ["lnk"],
|
|
2803
|
-
"application/x-ms-wmd": ["wmd"],
|
|
2804
|
-
"application/x-ms-wmz": ["wmz"],
|
|
2805
|
-
"application/x-ms-xbap": ["xbap"],
|
|
2806
|
-
"application/x-msaccess": ["mdb"],
|
|
2807
|
-
"application/x-msbinder": ["obd"],
|
|
2808
|
-
"application/x-mscardfile": ["crd"],
|
|
2809
|
-
"application/x-msclip": ["clp"],
|
|
2810
|
-
"application/x-msdos-program": ["*exe"],
|
|
2811
|
-
"application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"],
|
|
2812
|
-
"application/x-msmediaview": ["mvb", "m13", "m14"],
|
|
2813
|
-
"application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"],
|
|
2814
|
-
"application/x-msmoney": ["mny"],
|
|
2815
|
-
"application/x-mspublisher": ["pub"],
|
|
2816
|
-
"application/x-msschedule": ["scd"],
|
|
2817
|
-
"application/x-msterminal": ["trm"],
|
|
2818
|
-
"application/x-mswrite": ["wri"],
|
|
2819
|
-
"application/x-netcdf": ["nc", "cdf"],
|
|
2820
|
-
"application/x-ns-proxy-autoconfig": ["pac"],
|
|
2821
|
-
"application/x-nzb": ["nzb"],
|
|
2822
|
-
"application/x-perl": ["pl", "pm"],
|
|
2823
|
-
"application/x-pilot": ["*prc", "*pdb"],
|
|
2824
|
-
"application/x-pkcs12": ["p12", "pfx"],
|
|
2825
|
-
"application/x-pkcs7-certificates": ["p7b", "spc"],
|
|
2826
|
-
"application/x-pkcs7-certreqresp": ["p7r"],
|
|
2827
|
-
"application/x-rar-compressed": ["*rar"],
|
|
2828
|
-
"application/x-redhat-package-manager": ["rpm"],
|
|
2829
|
-
"application/x-research-info-systems": ["ris"],
|
|
2830
|
-
"application/x-sea": ["sea"],
|
|
2831
|
-
"application/x-sh": ["sh"],
|
|
2832
|
-
"application/x-shar": ["shar"],
|
|
2833
|
-
"application/x-shockwave-flash": ["swf"],
|
|
2834
|
-
"application/x-silverlight-app": ["xap"],
|
|
2835
|
-
"application/x-sql": ["*sql"],
|
|
2836
|
-
"application/x-stuffit": ["sit"],
|
|
2837
|
-
"application/x-stuffitx": ["sitx"],
|
|
2838
|
-
"application/x-subrip": ["srt"],
|
|
2839
|
-
"application/x-sv4cpio": ["sv4cpio"],
|
|
2840
|
-
"application/x-sv4crc": ["sv4crc"],
|
|
2841
|
-
"application/x-t3vm-image": ["t3"],
|
|
2842
|
-
"application/x-tads": ["gam"],
|
|
2843
|
-
"application/x-tar": ["tar"],
|
|
2844
|
-
"application/x-tcl": ["tcl", "tk"],
|
|
2845
|
-
"application/x-tex": ["tex"],
|
|
2846
|
-
"application/x-tex-tfm": ["tfm"],
|
|
2847
|
-
"application/x-texinfo": ["texinfo", "texi"],
|
|
2848
|
-
"application/x-tgif": ["*obj"],
|
|
2849
|
-
"application/x-ustar": ["ustar"],
|
|
2850
|
-
"application/x-virtualbox-hdd": ["hdd"],
|
|
2851
|
-
"application/x-virtualbox-ova": ["ova"],
|
|
2852
|
-
"application/x-virtualbox-ovf": ["ovf"],
|
|
2853
|
-
"application/x-virtualbox-vbox": ["vbox"],
|
|
2854
|
-
"application/x-virtualbox-vbox-extpack": ["vbox-extpack"],
|
|
2855
|
-
"application/x-virtualbox-vdi": ["vdi"],
|
|
2856
|
-
"application/x-virtualbox-vhd": ["vhd"],
|
|
2857
|
-
"application/x-virtualbox-vmdk": ["vmdk"],
|
|
2858
|
-
"application/x-wais-source": ["src"],
|
|
2859
|
-
"application/x-web-app-manifest+json": ["webapp"],
|
|
2860
|
-
"application/x-x509-ca-cert": ["der", "crt", "pem"],
|
|
2861
|
-
"application/x-xfig": ["fig"],
|
|
2862
|
-
"application/x-xliff+xml": ["*xlf"],
|
|
2863
|
-
"application/x-xpinstall": ["xpi"],
|
|
2864
|
-
"application/x-xz": ["xz"],
|
|
2865
|
-
"application/x-zip-compressed": ["*zip"],
|
|
2866
|
-
"application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"],
|
|
2867
|
-
"audio/vnd.dece.audio": ["uva", "uvva"],
|
|
2868
|
-
"audio/vnd.digital-winds": ["eol"],
|
|
2869
|
-
"audio/vnd.dra": ["dra"],
|
|
2870
|
-
"audio/vnd.dts": ["dts"],
|
|
2871
|
-
"audio/vnd.dts.hd": ["dtshd"],
|
|
2872
|
-
"audio/vnd.lucent.voice": ["lvp"],
|
|
2873
|
-
"audio/vnd.ms-playready.media.pya": ["pya"],
|
|
2874
|
-
"audio/vnd.nuera.ecelp4800": ["ecelp4800"],
|
|
2875
|
-
"audio/vnd.nuera.ecelp7470": ["ecelp7470"],
|
|
2876
|
-
"audio/vnd.nuera.ecelp9600": ["ecelp9600"],
|
|
2877
|
-
"audio/vnd.rip": ["rip"],
|
|
2878
|
-
"audio/x-aac": ["*aac"],
|
|
2879
|
-
"audio/x-aiff": ["aif", "aiff", "aifc"],
|
|
2880
|
-
"audio/x-caf": ["caf"],
|
|
2881
|
-
"audio/x-flac": ["flac"],
|
|
2882
|
-
"audio/x-m4a": ["*m4a"],
|
|
2883
|
-
"audio/x-matroska": ["mka"],
|
|
2884
|
-
"audio/x-mpegurl": ["m3u"],
|
|
2885
|
-
"audio/x-ms-wax": ["wax"],
|
|
2886
|
-
"audio/x-ms-wma": ["wma"],
|
|
2887
|
-
"audio/x-pn-realaudio": ["ram", "ra"],
|
|
2888
|
-
"audio/x-pn-realaudio-plugin": ["rmp"],
|
|
2889
|
-
"audio/x-realaudio": ["*ra"],
|
|
2890
|
-
"audio/x-wav": ["*wav"],
|
|
2891
|
-
"chemical/x-cdx": ["cdx"],
|
|
2892
|
-
"chemical/x-cif": ["cif"],
|
|
2893
|
-
"chemical/x-cmdf": ["cmdf"],
|
|
2894
|
-
"chemical/x-cml": ["cml"],
|
|
2895
|
-
"chemical/x-csml": ["csml"],
|
|
2896
|
-
"chemical/x-xyz": ["xyz"],
|
|
2897
|
-
"image/prs.btif": ["btif", "btf"],
|
|
2898
|
-
"image/prs.pti": ["pti"],
|
|
2899
|
-
"image/vnd.adobe.photoshop": ["psd"],
|
|
2900
|
-
"image/vnd.airzip.accelerator.azv": ["azv"],
|
|
2901
|
-
"image/vnd.blockfact.facti": ["facti"],
|
|
2902
|
-
"image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"],
|
|
2903
|
-
"image/vnd.djvu": ["djvu", "djv"],
|
|
2904
|
-
"image/vnd.dvb.subtitle": ["*sub"],
|
|
2905
|
-
"image/vnd.dwg": ["dwg"],
|
|
2906
|
-
"image/vnd.dxf": ["dxf"],
|
|
2907
|
-
"image/vnd.fastbidsheet": ["fbs"],
|
|
2908
|
-
"image/vnd.fpx": ["fpx"],
|
|
2909
|
-
"image/vnd.fst": ["fst"],
|
|
2910
|
-
"image/vnd.fujixerox.edmics-mmr": ["mmr"],
|
|
2911
|
-
"image/vnd.fujixerox.edmics-rlc": ["rlc"],
|
|
2912
|
-
"image/vnd.microsoft.icon": ["ico"],
|
|
2913
|
-
"image/vnd.ms-dds": ["dds"],
|
|
2914
|
-
"image/vnd.ms-modi": ["mdi"],
|
|
2915
|
-
"image/vnd.ms-photo": ["wdp"],
|
|
2916
|
-
"image/vnd.net-fpx": ["npx"],
|
|
2917
|
-
"image/vnd.pco.b16": ["b16"],
|
|
2918
|
-
"image/vnd.tencent.tap": ["tap"],
|
|
2919
|
-
"image/vnd.valve.source.texture": ["vtf"],
|
|
2920
|
-
"image/vnd.wap.wbmp": ["wbmp"],
|
|
2921
|
-
"image/vnd.xiff": ["xif"],
|
|
2922
|
-
"image/vnd.zbrush.pcx": ["pcx"],
|
|
2923
|
-
"image/x-3ds": ["3ds"],
|
|
2924
|
-
"image/x-adobe-dng": ["dng"],
|
|
2925
|
-
"image/x-cmu-raster": ["ras"],
|
|
2926
|
-
"image/x-cmx": ["cmx"],
|
|
2927
|
-
"image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"],
|
|
2928
|
-
"image/x-icon": ["*ico"],
|
|
2929
|
-
"image/x-jng": ["jng"],
|
|
2930
|
-
"image/x-mrsid-image": ["sid"],
|
|
2931
|
-
"image/x-ms-bmp": ["*bmp"],
|
|
2932
|
-
"image/x-pcx": ["*pcx"],
|
|
2933
|
-
"image/x-pict": ["pic", "pct"],
|
|
2934
|
-
"image/x-portable-anymap": ["pnm"],
|
|
2935
|
-
"image/x-portable-bitmap": ["pbm"],
|
|
2936
|
-
"image/x-portable-graymap": ["pgm"],
|
|
2937
|
-
"image/x-portable-pixmap": ["ppm"],
|
|
2938
|
-
"image/x-rgb": ["rgb"],
|
|
2939
|
-
"image/x-tga": ["tga"],
|
|
2940
|
-
"image/x-xbitmap": ["xbm"],
|
|
2941
|
-
"image/x-xpixmap": ["xpm"],
|
|
2942
|
-
"image/x-xwindowdump": ["xwd"],
|
|
2943
|
-
"message/vnd.wfa.wsc": ["wsc"],
|
|
2944
|
-
"model/vnd.bary": ["bary"],
|
|
2945
|
-
"model/vnd.cld": ["cld"],
|
|
2946
|
-
"model/vnd.collada+xml": ["dae"],
|
|
2947
|
-
"model/vnd.dwf": ["dwf"],
|
|
2948
|
-
"model/vnd.gdl": ["gdl"],
|
|
2949
|
-
"model/vnd.gtw": ["gtw"],
|
|
2950
|
-
"model/vnd.mts": ["*mts"],
|
|
2951
|
-
"model/vnd.opengex": ["ogex"],
|
|
2952
|
-
"model/vnd.parasolid.transmit.binary": ["x_b"],
|
|
2953
|
-
"model/vnd.parasolid.transmit.text": ["x_t"],
|
|
2954
|
-
"model/vnd.pytha.pyox": ["pyo", "pyox"],
|
|
2955
|
-
"model/vnd.sap.vds": ["vds"],
|
|
2956
|
-
"model/vnd.usda": ["usda"],
|
|
2957
|
-
"model/vnd.usdz+zip": ["usdz"],
|
|
2958
|
-
"model/vnd.valve.source.compiled-map": ["bsp"],
|
|
2959
|
-
"model/vnd.vtu": ["vtu"],
|
|
2960
|
-
"text/prs.lines.tag": ["dsc"],
|
|
2961
|
-
"text/vnd.curl": ["curl"],
|
|
2962
|
-
"text/vnd.curl.dcurl": ["dcurl"],
|
|
2963
|
-
"text/vnd.curl.mcurl": ["mcurl"],
|
|
2964
|
-
"text/vnd.curl.scurl": ["scurl"],
|
|
2965
|
-
"text/vnd.dvb.subtitle": ["sub"],
|
|
2966
|
-
"text/vnd.familysearch.gedcom": ["ged"],
|
|
2967
|
-
"text/vnd.fly": ["fly"],
|
|
2968
|
-
"text/vnd.fmi.flexstor": ["flx"],
|
|
2969
|
-
"text/vnd.graphviz": ["gv"],
|
|
2970
|
-
"text/vnd.in3d.3dml": ["3dml"],
|
|
2971
|
-
"text/vnd.in3d.spot": ["spot"],
|
|
2972
|
-
"text/vnd.sun.j2me.app-descriptor": ["jad"],
|
|
2973
|
-
"text/vnd.wap.wml": ["wml"],
|
|
2974
|
-
"text/vnd.wap.wmlscript": ["wmls"],
|
|
2975
|
-
"text/x-asm": ["s", "asm"],
|
|
2976
|
-
"text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"],
|
|
2977
|
-
"text/x-component": ["htc"],
|
|
2978
|
-
"text/x-fortran": ["f", "for", "f77", "f90"],
|
|
2979
|
-
"text/x-handlebars-template": ["hbs"],
|
|
2980
|
-
"text/x-java-source": ["java"],
|
|
2981
|
-
"text/x-lua": ["lua"],
|
|
2982
|
-
"text/x-markdown": ["mkd"],
|
|
2983
|
-
"text/x-nfo": ["nfo"],
|
|
2984
|
-
"text/x-opml": ["opml"],
|
|
2985
|
-
"text/x-org": ["*org"],
|
|
2986
|
-
"text/x-pascal": ["p", "pas"],
|
|
2987
|
-
"text/x-processing": ["pde"],
|
|
2988
|
-
"text/x-sass": ["sass"],
|
|
2989
|
-
"text/x-scss": ["scss"],
|
|
2990
|
-
"text/x-setext": ["etx"],
|
|
2991
|
-
"text/x-sfv": ["sfv"],
|
|
2992
|
-
"text/x-suse-ymp": ["ymp"],
|
|
2993
|
-
"text/x-uuencode": ["uu"],
|
|
2994
|
-
"text/x-vcalendar": ["vcs"],
|
|
2995
|
-
"text/x-vcard": ["vcf"],
|
|
2996
|
-
"video/vnd.dece.hd": ["uvh", "uvvh"],
|
|
2997
|
-
"video/vnd.dece.mobile": ["uvm", "uvvm"],
|
|
2998
|
-
"video/vnd.dece.pd": ["uvp", "uvvp"],
|
|
2999
|
-
"video/vnd.dece.sd": ["uvs", "uvvs"],
|
|
3000
|
-
"video/vnd.dece.video": ["uvv", "uvvv"],
|
|
3001
|
-
"video/vnd.dvb.file": ["dvb"],
|
|
3002
|
-
"video/vnd.fvt": ["fvt"],
|
|
3003
|
-
"video/vnd.mpegurl": ["mxu", "m4u"],
|
|
3004
|
-
"video/vnd.ms-playready.media.pyv": ["pyv"],
|
|
3005
|
-
"video/vnd.uvvu.mp4": ["uvu", "uvvu"],
|
|
3006
|
-
"video/vnd.vivo": ["viv"],
|
|
3007
|
-
"video/x-f4v": ["f4v"],
|
|
3008
|
-
"video/x-fli": ["fli"],
|
|
3009
|
-
"video/x-flv": ["flv"],
|
|
3010
|
-
"video/x-m4v": ["m4v"],
|
|
3011
|
-
"video/x-matroska": ["mkv", "mk3d", "mks"],
|
|
3012
|
-
"video/x-mng": ["mng"],
|
|
3013
|
-
"video/x-ms-asf": ["asf", "asx"],
|
|
3014
|
-
"video/x-ms-vob": ["vob"],
|
|
3015
|
-
"video/x-ms-wm": ["wm"],
|
|
3016
|
-
"video/x-ms-wmv": ["wmv"],
|
|
3017
|
-
"video/x-ms-wmx": ["wmx"],
|
|
3018
|
-
"video/x-ms-wvx": ["wvx"],
|
|
3019
|
-
"video/x-msvideo": ["avi"],
|
|
3020
|
-
"video/x-sgi-movie": ["movie"],
|
|
3021
|
-
"video/x-smv": ["smv"],
|
|
3022
|
-
"x-conference/x-cooltalk": ["ice"]
|
|
3023
|
-
};
|
|
3024
|
-
Object.freeze(types);
|
|
3025
|
-
var other_default = types;
|
|
3026
|
-
|
|
3027
|
-
// ../../node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/types/standard.js
|
|
3028
|
-
var types2 = {
|
|
3029
|
-
"application/andrew-inset": ["ez"],
|
|
3030
|
-
"application/appinstaller": ["appinstaller"],
|
|
3031
|
-
"application/applixware": ["aw"],
|
|
3032
|
-
"application/appx": ["appx"],
|
|
3033
|
-
"application/appxbundle": ["appxbundle"],
|
|
3034
|
-
"application/atom+xml": ["atom"],
|
|
3035
|
-
"application/atomcat+xml": ["atomcat"],
|
|
3036
|
-
"application/atomdeleted+xml": ["atomdeleted"],
|
|
3037
|
-
"application/atomsvc+xml": ["atomsvc"],
|
|
3038
|
-
"application/atsc-dwd+xml": ["dwd"],
|
|
3039
|
-
"application/atsc-held+xml": ["held"],
|
|
3040
|
-
"application/atsc-rsat+xml": ["rsat"],
|
|
3041
|
-
"application/automationml-aml+xml": ["aml"],
|
|
3042
|
-
"application/automationml-amlx+zip": ["amlx"],
|
|
3043
|
-
"application/bdoc": ["bdoc"],
|
|
3044
|
-
"application/calendar+xml": ["xcs"],
|
|
3045
|
-
"application/ccxml+xml": ["ccxml"],
|
|
3046
|
-
"application/cdfx+xml": ["cdfx"],
|
|
3047
|
-
"application/cdmi-capability": ["cdmia"],
|
|
3048
|
-
"application/cdmi-container": ["cdmic"],
|
|
3049
|
-
"application/cdmi-domain": ["cdmid"],
|
|
3050
|
-
"application/cdmi-object": ["cdmio"],
|
|
3051
|
-
"application/cdmi-queue": ["cdmiq"],
|
|
3052
|
-
"application/cpl+xml": ["cpl"],
|
|
3053
|
-
"application/cu-seeme": ["cu"],
|
|
3054
|
-
"application/cwl": ["cwl"],
|
|
3055
|
-
"application/dash+xml": ["mpd"],
|
|
3056
|
-
"application/dash-patch+xml": ["mpp"],
|
|
3057
|
-
"application/davmount+xml": ["davmount"],
|
|
3058
|
-
"application/dicom": ["dcm"],
|
|
3059
|
-
"application/docbook+xml": ["dbk"],
|
|
3060
|
-
"application/dssc+der": ["dssc"],
|
|
3061
|
-
"application/dssc+xml": ["xdssc"],
|
|
3062
|
-
"application/ecmascript": ["ecma"],
|
|
3063
|
-
"application/emma+xml": ["emma"],
|
|
3064
|
-
"application/emotionml+xml": ["emotionml"],
|
|
3065
|
-
"application/epub+zip": ["epub"],
|
|
3066
|
-
"application/exi": ["exi"],
|
|
3067
|
-
"application/express": ["exp"],
|
|
3068
|
-
"application/fdf": ["fdf"],
|
|
3069
|
-
"application/fdt+xml": ["fdt"],
|
|
3070
|
-
"application/font-tdpfr": ["pfr"],
|
|
3071
|
-
"application/geo+json": ["geojson"],
|
|
3072
|
-
"application/gml+xml": ["gml"],
|
|
3073
|
-
"application/gpx+xml": ["gpx"],
|
|
3074
|
-
"application/gxf": ["gxf"],
|
|
3075
|
-
"application/gzip": ["gz"],
|
|
3076
|
-
"application/hjson": ["hjson"],
|
|
3077
|
-
"application/hyperstudio": ["stk"],
|
|
3078
|
-
"application/inkml+xml": ["ink", "inkml"],
|
|
3079
|
-
"application/ipfix": ["ipfix"],
|
|
3080
|
-
"application/its+xml": ["its"],
|
|
3081
|
-
"application/java-archive": ["jar", "war", "ear"],
|
|
3082
|
-
"application/java-serialized-object": ["ser"],
|
|
3083
|
-
"application/java-vm": ["class"],
|
|
3084
|
-
"application/javascript": ["*js"],
|
|
3085
|
-
"application/json": ["json", "map"],
|
|
3086
|
-
"application/json5": ["json5"],
|
|
3087
|
-
"application/jsonml+json": ["jsonml"],
|
|
3088
|
-
"application/ld+json": ["jsonld"],
|
|
3089
|
-
"application/lgr+xml": ["lgr"],
|
|
3090
|
-
"application/lost+xml": ["lostxml"],
|
|
3091
|
-
"application/mac-binhex40": ["hqx"],
|
|
3092
|
-
"application/mac-compactpro": ["cpt"],
|
|
3093
|
-
"application/mads+xml": ["mads"],
|
|
3094
|
-
"application/manifest+json": ["webmanifest"],
|
|
3095
|
-
"application/marc": ["mrc"],
|
|
3096
|
-
"application/marcxml+xml": ["mrcx"],
|
|
3097
|
-
"application/mathematica": ["ma", "nb", "mb"],
|
|
3098
|
-
"application/mathml+xml": ["mathml"],
|
|
3099
|
-
"application/mbox": ["mbox"],
|
|
3100
|
-
"application/media-policy-dataset+xml": ["mpf"],
|
|
3101
|
-
"application/mediaservercontrol+xml": ["mscml"],
|
|
3102
|
-
"application/metalink+xml": ["metalink"],
|
|
3103
|
-
"application/metalink4+xml": ["meta4"],
|
|
3104
|
-
"application/mets+xml": ["mets"],
|
|
3105
|
-
"application/mmt-aei+xml": ["maei"],
|
|
3106
|
-
"application/mmt-usd+xml": ["musd"],
|
|
3107
|
-
"application/mods+xml": ["mods"],
|
|
3108
|
-
"application/mp21": ["m21", "mp21"],
|
|
3109
|
-
"application/mp4": ["*mp4", "*mpg4", "mp4s", "m4p"],
|
|
3110
|
-
"application/msix": ["msix"],
|
|
3111
|
-
"application/msixbundle": ["msixbundle"],
|
|
3112
|
-
"application/msword": ["doc", "dot"],
|
|
3113
|
-
"application/mxf": ["mxf"],
|
|
3114
|
-
"application/n-quads": ["nq"],
|
|
3115
|
-
"application/n-triples": ["nt"],
|
|
3116
|
-
"application/node": ["cjs"],
|
|
3117
|
-
"application/octet-stream": [
|
|
3118
|
-
"bin",
|
|
3119
|
-
"dms",
|
|
3120
|
-
"lrf",
|
|
3121
|
-
"mar",
|
|
3122
|
-
"so",
|
|
3123
|
-
"dist",
|
|
3124
|
-
"distz",
|
|
3125
|
-
"pkg",
|
|
3126
|
-
"bpk",
|
|
3127
|
-
"dump",
|
|
3128
|
-
"elc",
|
|
3129
|
-
"deploy",
|
|
3130
|
-
"exe",
|
|
3131
|
-
"dll",
|
|
3132
|
-
"deb",
|
|
3133
|
-
"dmg",
|
|
3134
|
-
"iso",
|
|
3135
|
-
"img",
|
|
3136
|
-
"msi",
|
|
3137
|
-
"msp",
|
|
3138
|
-
"msm",
|
|
3139
|
-
"buffer"
|
|
3140
|
-
],
|
|
3141
|
-
"application/oda": ["oda"],
|
|
3142
|
-
"application/oebps-package+xml": ["opf"],
|
|
3143
|
-
"application/ogg": ["ogx"],
|
|
3144
|
-
"application/omdoc+xml": ["omdoc"],
|
|
3145
|
-
"application/onenote": [
|
|
3146
|
-
"onetoc",
|
|
3147
|
-
"onetoc2",
|
|
3148
|
-
"onetmp",
|
|
3149
|
-
"onepkg",
|
|
3150
|
-
"one",
|
|
3151
|
-
"onea"
|
|
3152
|
-
],
|
|
3153
|
-
"application/oxps": ["oxps"],
|
|
3154
|
-
"application/p2p-overlay+xml": ["relo"],
|
|
3155
|
-
"application/patch-ops-error+xml": ["xer"],
|
|
3156
|
-
"application/pdf": ["pdf"],
|
|
3157
|
-
"application/pgp-encrypted": ["pgp"],
|
|
3158
|
-
"application/pgp-keys": ["asc"],
|
|
3159
|
-
"application/pgp-signature": ["sig", "*asc"],
|
|
3160
|
-
"application/pics-rules": ["prf"],
|
|
3161
|
-
"application/pkcs10": ["p10"],
|
|
3162
|
-
"application/pkcs7-mime": ["p7m", "p7c"],
|
|
3163
|
-
"application/pkcs7-signature": ["p7s"],
|
|
3164
|
-
"application/pkcs8": ["p8"],
|
|
3165
|
-
"application/pkix-attr-cert": ["ac"],
|
|
3166
|
-
"application/pkix-cert": ["cer"],
|
|
3167
|
-
"application/pkix-crl": ["crl"],
|
|
3168
|
-
"application/pkix-pkipath": ["pkipath"],
|
|
3169
|
-
"application/pkixcmp": ["pki"],
|
|
3170
|
-
"application/pls+xml": ["pls"],
|
|
3171
|
-
"application/postscript": ["ai", "eps", "ps"],
|
|
3172
|
-
"application/provenance+xml": ["provx"],
|
|
3173
|
-
"application/pskc+xml": ["pskcxml"],
|
|
3174
|
-
"application/raml+yaml": ["raml"],
|
|
3175
|
-
"application/rdf+xml": ["rdf", "owl"],
|
|
3176
|
-
"application/reginfo+xml": ["rif"],
|
|
3177
|
-
"application/relax-ng-compact-syntax": ["rnc"],
|
|
3178
|
-
"application/resource-lists+xml": ["rl"],
|
|
3179
|
-
"application/resource-lists-diff+xml": ["rld"],
|
|
3180
|
-
"application/rls-services+xml": ["rs"],
|
|
3181
|
-
"application/route-apd+xml": ["rapd"],
|
|
3182
|
-
"application/route-s-tsid+xml": ["sls"],
|
|
3183
|
-
"application/route-usd+xml": ["rusd"],
|
|
3184
|
-
"application/rpki-ghostbusters": ["gbr"],
|
|
3185
|
-
"application/rpki-manifest": ["mft"],
|
|
3186
|
-
"application/rpki-roa": ["roa"],
|
|
3187
|
-
"application/rsd+xml": ["rsd"],
|
|
3188
|
-
"application/rss+xml": ["rss"],
|
|
3189
|
-
"application/rtf": ["rtf"],
|
|
3190
|
-
"application/sbml+xml": ["sbml"],
|
|
3191
|
-
"application/scvp-cv-request": ["scq"],
|
|
3192
|
-
"application/scvp-cv-response": ["scs"],
|
|
3193
|
-
"application/scvp-vp-request": ["spq"],
|
|
3194
|
-
"application/scvp-vp-response": ["spp"],
|
|
3195
|
-
"application/sdp": ["sdp"],
|
|
3196
|
-
"application/senml+xml": ["senmlx"],
|
|
3197
|
-
"application/sensml+xml": ["sensmlx"],
|
|
3198
|
-
"application/set-payment-initiation": ["setpay"],
|
|
3199
|
-
"application/set-registration-initiation": ["setreg"],
|
|
3200
|
-
"application/shf+xml": ["shf"],
|
|
3201
|
-
"application/sieve": ["siv", "sieve"],
|
|
3202
|
-
"application/smil+xml": ["smi", "smil"],
|
|
3203
|
-
"application/sparql-query": ["rq"],
|
|
3204
|
-
"application/sparql-results+xml": ["srx"],
|
|
3205
|
-
"application/sql": ["sql"],
|
|
3206
|
-
"application/srgs": ["gram"],
|
|
3207
|
-
"application/srgs+xml": ["grxml"],
|
|
3208
|
-
"application/sru+xml": ["sru"],
|
|
3209
|
-
"application/ssdl+xml": ["ssdl"],
|
|
3210
|
-
"application/ssml+xml": ["ssml"],
|
|
3211
|
-
"application/swid+xml": ["swidtag"],
|
|
3212
|
-
"application/tei+xml": ["tei", "teicorpus"],
|
|
3213
|
-
"application/thraud+xml": ["tfi"],
|
|
3214
|
-
"application/timestamped-data": ["tsd"],
|
|
3215
|
-
"application/toml": ["toml"],
|
|
3216
|
-
"application/trig": ["trig"],
|
|
3217
|
-
"application/ttml+xml": ["ttml"],
|
|
3218
|
-
"application/ubjson": ["ubj"],
|
|
3219
|
-
"application/urc-ressheet+xml": ["rsheet"],
|
|
3220
|
-
"application/urc-targetdesc+xml": ["td"],
|
|
3221
|
-
"application/voicexml+xml": ["vxml"],
|
|
3222
|
-
"application/wasm": ["wasm"],
|
|
3223
|
-
"application/watcherinfo+xml": ["wif"],
|
|
3224
|
-
"application/widget": ["wgt"],
|
|
3225
|
-
"application/winhlp": ["hlp"],
|
|
3226
|
-
"application/wsdl+xml": ["wsdl"],
|
|
3227
|
-
"application/wspolicy+xml": ["wspolicy"],
|
|
3228
|
-
"application/xaml+xml": ["xaml"],
|
|
3229
|
-
"application/xcap-att+xml": ["xav"],
|
|
3230
|
-
"application/xcap-caps+xml": ["xca"],
|
|
3231
|
-
"application/xcap-diff+xml": ["xdf"],
|
|
3232
|
-
"application/xcap-el+xml": ["xel"],
|
|
3233
|
-
"application/xcap-ns+xml": ["xns"],
|
|
3234
|
-
"application/xenc+xml": ["xenc"],
|
|
3235
|
-
"application/xfdf": ["xfdf"],
|
|
3236
|
-
"application/xhtml+xml": ["xhtml", "xht"],
|
|
3237
|
-
"application/xliff+xml": ["xlf"],
|
|
3238
|
-
"application/xml": ["xml", "xsl", "xsd", "rng"],
|
|
3239
|
-
"application/xml-dtd": ["dtd"],
|
|
3240
|
-
"application/xop+xml": ["xop"],
|
|
3241
|
-
"application/xproc+xml": ["xpl"],
|
|
3242
|
-
"application/xslt+xml": ["*xsl", "xslt"],
|
|
3243
|
-
"application/xspf+xml": ["xspf"],
|
|
3244
|
-
"application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"],
|
|
3245
|
-
"application/yang": ["yang"],
|
|
3246
|
-
"application/yin+xml": ["yin"],
|
|
3247
|
-
"application/zip": ["zip"],
|
|
3248
|
-
"application/zip+dotlottie": ["lottie"],
|
|
3249
|
-
"audio/3gpp": ["*3gpp"],
|
|
3250
|
-
"audio/aac": ["adts", "aac"],
|
|
3251
|
-
"audio/adpcm": ["adp"],
|
|
3252
|
-
"audio/amr": ["amr"],
|
|
3253
|
-
"audio/basic": ["au", "snd"],
|
|
3254
|
-
"audio/midi": ["mid", "midi", "kar", "rmi"],
|
|
3255
|
-
"audio/mobile-xmf": ["mxmf"],
|
|
3256
|
-
"audio/mp3": ["*mp3"],
|
|
3257
|
-
"audio/mp4": ["m4a", "mp4a", "m4b"],
|
|
3258
|
-
"audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"],
|
|
3259
|
-
"audio/ogg": ["oga", "ogg", "spx", "opus"],
|
|
3260
|
-
"audio/s3m": ["s3m"],
|
|
3261
|
-
"audio/silk": ["sil"],
|
|
3262
|
-
"audio/wav": ["wav"],
|
|
3263
|
-
"audio/wave": ["*wav"],
|
|
3264
|
-
"audio/webm": ["weba"],
|
|
3265
|
-
"audio/xm": ["xm"],
|
|
3266
|
-
"font/collection": ["ttc"],
|
|
3267
|
-
"font/otf": ["otf"],
|
|
3268
|
-
"font/ttf": ["ttf"],
|
|
3269
|
-
"font/woff": ["woff"],
|
|
3270
|
-
"font/woff2": ["woff2"],
|
|
3271
|
-
"image/aces": ["exr"],
|
|
3272
|
-
"image/apng": ["apng"],
|
|
3273
|
-
"image/avci": ["avci"],
|
|
3274
|
-
"image/avcs": ["avcs"],
|
|
3275
|
-
"image/avif": ["avif"],
|
|
3276
|
-
"image/bmp": ["bmp", "dib"],
|
|
3277
|
-
"image/cgm": ["cgm"],
|
|
3278
|
-
"image/dicom-rle": ["drle"],
|
|
3279
|
-
"image/dpx": ["dpx"],
|
|
3280
|
-
"image/emf": ["emf"],
|
|
3281
|
-
"image/fits": ["fits"],
|
|
3282
|
-
"image/g3fax": ["g3"],
|
|
3283
|
-
"image/gif": ["gif"],
|
|
3284
|
-
"image/heic": ["heic"],
|
|
3285
|
-
"image/heic-sequence": ["heics"],
|
|
3286
|
-
"image/heif": ["heif"],
|
|
3287
|
-
"image/heif-sequence": ["heifs"],
|
|
3288
|
-
"image/hej2k": ["hej2"],
|
|
3289
|
-
"image/ief": ["ief"],
|
|
3290
|
-
"image/jaii": ["jaii"],
|
|
3291
|
-
"image/jais": ["jais"],
|
|
3292
|
-
"image/jls": ["jls"],
|
|
3293
|
-
"image/jp2": ["jp2", "jpg2"],
|
|
3294
|
-
"image/jpeg": ["jpg", "jpeg", "jpe"],
|
|
3295
|
-
"image/jph": ["jph"],
|
|
3296
|
-
"image/jphc": ["jhc"],
|
|
3297
|
-
"image/jpm": ["jpm", "jpgm"],
|
|
3298
|
-
"image/jpx": ["jpx", "jpf"],
|
|
3299
|
-
"image/jxl": ["jxl"],
|
|
3300
|
-
"image/jxr": ["jxr"],
|
|
3301
|
-
"image/jxra": ["jxra"],
|
|
3302
|
-
"image/jxrs": ["jxrs"],
|
|
3303
|
-
"image/jxs": ["jxs"],
|
|
3304
|
-
"image/jxsc": ["jxsc"],
|
|
3305
|
-
"image/jxsi": ["jxsi"],
|
|
3306
|
-
"image/jxss": ["jxss"],
|
|
3307
|
-
"image/ktx": ["ktx"],
|
|
3308
|
-
"image/ktx2": ["ktx2"],
|
|
3309
|
-
"image/pjpeg": ["jfif"],
|
|
3310
|
-
"image/png": ["png"],
|
|
3311
|
-
"image/sgi": ["sgi"],
|
|
3312
|
-
"image/svg+xml": ["svg", "svgz"],
|
|
3313
|
-
"image/t38": ["t38"],
|
|
3314
|
-
"image/tiff": ["tif", "tiff"],
|
|
3315
|
-
"image/tiff-fx": ["tfx"],
|
|
3316
|
-
"image/webp": ["webp"],
|
|
3317
|
-
"image/wmf": ["wmf"],
|
|
3318
|
-
"message/disposition-notification": ["disposition-notification"],
|
|
3319
|
-
"message/global": ["u8msg"],
|
|
3320
|
-
"message/global-delivery-status": ["u8dsn"],
|
|
3321
|
-
"message/global-disposition-notification": ["u8mdn"],
|
|
3322
|
-
"message/global-headers": ["u8hdr"],
|
|
3323
|
-
"message/rfc822": ["eml", "mime", "mht", "mhtml"],
|
|
3324
|
-
"model/3mf": ["3mf"],
|
|
3325
|
-
"model/gltf+json": ["gltf"],
|
|
3326
|
-
"model/gltf-binary": ["glb"],
|
|
3327
|
-
"model/iges": ["igs", "iges"],
|
|
3328
|
-
"model/jt": ["jt"],
|
|
3329
|
-
"model/mesh": ["msh", "mesh", "silo"],
|
|
3330
|
-
"model/mtl": ["mtl"],
|
|
3331
|
-
"model/obj": ["obj"],
|
|
3332
|
-
"model/prc": ["prc"],
|
|
3333
|
-
"model/step": ["step", "stp", "stpnc", "p21", "210"],
|
|
3334
|
-
"model/step+xml": ["stpx"],
|
|
3335
|
-
"model/step+zip": ["stpz"],
|
|
3336
|
-
"model/step-xml+zip": ["stpxz"],
|
|
3337
|
-
"model/stl": ["stl"],
|
|
3338
|
-
"model/u3d": ["u3d"],
|
|
3339
|
-
"model/vrml": ["wrl", "vrml"],
|
|
3340
|
-
"model/x3d+binary": ["*x3db", "x3dbz"],
|
|
3341
|
-
"model/x3d+fastinfoset": ["x3db"],
|
|
3342
|
-
"model/x3d+vrml": ["*x3dv", "x3dvz"],
|
|
3343
|
-
"model/x3d+xml": ["x3d", "x3dz"],
|
|
3344
|
-
"model/x3d-vrml": ["x3dv"],
|
|
3345
|
-
"text/cache-manifest": ["appcache", "manifest"],
|
|
3346
|
-
"text/calendar": ["ics", "ifb"],
|
|
3347
|
-
"text/coffeescript": ["coffee", "litcoffee"],
|
|
3348
|
-
"text/css": ["css"],
|
|
3349
|
-
"text/csv": ["csv"],
|
|
3350
|
-
"text/html": ["html", "htm", "shtml"],
|
|
3351
|
-
"text/jade": ["jade"],
|
|
3352
|
-
"text/javascript": ["js", "mjs"],
|
|
3353
|
-
"text/jsx": ["jsx"],
|
|
3354
|
-
"text/less": ["less"],
|
|
3355
|
-
"text/markdown": ["md", "markdown"],
|
|
3356
|
-
"text/mathml": ["mml"],
|
|
3357
|
-
"text/mdx": ["mdx"],
|
|
3358
|
-
"text/n3": ["n3"],
|
|
3359
|
-
"text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"],
|
|
3360
|
-
"text/richtext": ["rtx"],
|
|
3361
|
-
"text/rtf": ["*rtf"],
|
|
3362
|
-
"text/sgml": ["sgml", "sgm"],
|
|
3363
|
-
"text/shex": ["shex"],
|
|
3364
|
-
"text/slim": ["slim", "slm"],
|
|
3365
|
-
"text/spdx": ["spdx"],
|
|
3366
|
-
"text/stylus": ["stylus", "styl"],
|
|
3367
|
-
"text/tab-separated-values": ["tsv"],
|
|
3368
|
-
"text/troff": ["t", "tr", "roff", "man", "me", "ms"],
|
|
3369
|
-
"text/turtle": ["ttl"],
|
|
3370
|
-
"text/uri-list": ["uri", "uris", "urls"],
|
|
3371
|
-
"text/vcard": ["vcard"],
|
|
3372
|
-
"text/vtt": ["vtt"],
|
|
3373
|
-
"text/wgsl": ["wgsl"],
|
|
3374
|
-
"text/xml": ["*xml"],
|
|
3375
|
-
"text/yaml": ["yaml", "yml"],
|
|
3376
|
-
"video/3gpp": ["3gp", "3gpp"],
|
|
3377
|
-
"video/3gpp2": ["3g2"],
|
|
3378
|
-
"video/h261": ["h261"],
|
|
3379
|
-
"video/h263": ["h263"],
|
|
3380
|
-
"video/h264": ["h264"],
|
|
3381
|
-
"video/iso.segment": ["m4s"],
|
|
3382
|
-
"video/jpeg": ["jpgv"],
|
|
3383
|
-
"video/jpm": ["*jpm", "*jpgm"],
|
|
3384
|
-
"video/mj2": ["mj2", "mjp2"],
|
|
3385
|
-
"video/mp2t": ["ts", "m2t", "m2ts", "mts"],
|
|
3386
|
-
"video/mp4": ["mp4", "mp4v", "mpg4"],
|
|
3387
|
-
"video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"],
|
|
3388
|
-
"video/ogg": ["ogv"],
|
|
3389
|
-
"video/quicktime": ["qt", "mov"],
|
|
3390
|
-
"video/webm": ["webm"]
|
|
3391
|
-
};
|
|
3392
|
-
Object.freeze(types2);
|
|
3393
|
-
var standard_default = types2;
|
|
3394
|
-
|
|
3395
|
-
// ../../node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/Mime.js
|
|
3396
|
-
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
3397
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3398
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3399
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3400
|
-
};
|
|
3401
|
-
var _Mime_extensionToType;
|
|
3402
|
-
var _Mime_typeToExtension;
|
|
3403
|
-
var _Mime_typeToExtensions;
|
|
3404
|
-
var Mime = class {
|
|
3405
|
-
constructor(...args) {
|
|
3406
|
-
_Mime_extensionToType.set(this, /* @__PURE__ */ new Map());
|
|
3407
|
-
_Mime_typeToExtension.set(this, /* @__PURE__ */ new Map());
|
|
3408
|
-
_Mime_typeToExtensions.set(this, /* @__PURE__ */ new Map());
|
|
3409
|
-
for (const arg of args) {
|
|
3410
|
-
this.define(arg);
|
|
3411
|
-
}
|
|
3412
|
-
}
|
|
3413
|
-
define(typeMap, force = false) {
|
|
3414
|
-
for (let [type, extensions] of Object.entries(typeMap)) {
|
|
3415
|
-
type = type.toLowerCase();
|
|
3416
|
-
extensions = extensions.map((ext) => ext.toLowerCase());
|
|
3417
|
-
if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type)) {
|
|
3418
|
-
__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type, /* @__PURE__ */ new Set());
|
|
3419
|
-
}
|
|
3420
|
-
const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type);
|
|
3421
|
-
let first = true;
|
|
3422
|
-
for (let extension of extensions) {
|
|
3423
|
-
const starred = extension.startsWith("*");
|
|
3424
|
-
extension = starred ? extension.slice(1) : extension;
|
|
3425
|
-
allExtensions?.add(extension);
|
|
3426
|
-
if (first) {
|
|
3427
|
-
__classPrivateFieldGet(this, _Mime_typeToExtension, "f").set(type, extension);
|
|
3428
|
-
}
|
|
3429
|
-
first = false;
|
|
3430
|
-
if (starred)
|
|
3431
|
-
continue;
|
|
3432
|
-
const currentType = __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(extension);
|
|
3433
|
-
if (currentType && currentType != type && !force) {
|
|
3434
|
-
throw new Error(`"${type} -> ${extension}" conflicts with "${currentType} -> ${extension}". Pass \`force=true\` to override this definition.`);
|
|
3435
|
-
}
|
|
3436
|
-
__classPrivateFieldGet(this, _Mime_extensionToType, "f").set(extension, type);
|
|
3437
|
-
}
|
|
3438
|
-
}
|
|
3439
|
-
return this;
|
|
3440
|
-
}
|
|
3441
|
-
getType(path7) {
|
|
3442
|
-
if (typeof path7 !== "string")
|
|
3443
|
-
return null;
|
|
3444
|
-
const last = path7.replace(/^.*[/\\]/s, "").toLowerCase();
|
|
3445
|
-
const ext = last.replace(/^.*\./s, "").toLowerCase();
|
|
3446
|
-
const hasPath = last.length < path7.length;
|
|
3447
|
-
const hasDot = ext.length < last.length - 1;
|
|
3448
|
-
if (!hasDot && hasPath)
|
|
3449
|
-
return null;
|
|
3450
|
-
return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
|
|
3451
|
-
}
|
|
3452
|
-
getExtension(type) {
|
|
3453
|
-
if (typeof type !== "string")
|
|
3454
|
-
return null;
|
|
3455
|
-
type = type?.split?.(";")[0];
|
|
3456
|
-
return (type && __classPrivateFieldGet(this, _Mime_typeToExtension, "f").get(type.trim().toLowerCase())) ?? null;
|
|
3457
|
-
}
|
|
3458
|
-
getAllExtensions(type) {
|
|
3459
|
-
if (typeof type !== "string")
|
|
3460
|
-
return null;
|
|
3461
|
-
return __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type.toLowerCase()) ?? null;
|
|
3462
|
-
}
|
|
3463
|
-
_freeze() {
|
|
3464
|
-
this.define = () => {
|
|
3465
|
-
throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
|
|
3466
|
-
};
|
|
3467
|
-
Object.freeze(this);
|
|
3468
|
-
for (const extensions of __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").values()) {
|
|
3469
|
-
Object.freeze(extensions);
|
|
3470
|
-
}
|
|
3471
|
-
return this;
|
|
3472
|
-
}
|
|
3473
|
-
_getTestState() {
|
|
3474
|
-
return {
|
|
3475
|
-
types: __classPrivateFieldGet(this, _Mime_extensionToType, "f"),
|
|
3476
|
-
extensions: __classPrivateFieldGet(this, _Mime_typeToExtension, "f")
|
|
3477
|
-
};
|
|
3478
|
-
}
|
|
3479
|
-
};
|
|
3480
|
-
_Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
|
|
3481
|
-
var Mime_default = Mime;
|
|
3482
|
-
|
|
3483
|
-
// ../../node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/index.js
|
|
3484
|
-
var src_default = new Mime_default(standard_default, other_default)._freeze();
|
|
3485
|
-
|
|
3486
|
-
// src/preview-server.ts
|
|
3487
|
-
function createPreviewMiddleware(projectRoot, baseOutDir) {
|
|
3488
|
-
const clientOutDir = resolve(projectRoot, `${baseOutDir}/client`);
|
|
3489
|
-
return async (req, res, next) => {
|
|
3490
|
-
try {
|
|
3491
|
-
let url = req.url || "/";
|
|
3492
|
-
let filePath = path3.join(clientOutDir, url);
|
|
3493
|
-
if (url.endsWith("/")) {
|
|
3494
|
-
filePath = path3.join(filePath, "index.html");
|
|
3495
|
-
}
|
|
3496
|
-
if (!path3.extname(filePath) && !url.endsWith("/")) {
|
|
3497
|
-
const htmlCandidate = filePath + ".html";
|
|
3498
|
-
if (fs3.existsSync(htmlCandidate)) {
|
|
3499
|
-
filePath = htmlCandidate;
|
|
3500
|
-
}
|
|
3501
|
-
}
|
|
3502
|
-
if (!fs3.existsSync(filePath)) {
|
|
3503
|
-
const normalizedUrl = url.replace(/\/$/, "") || "/";
|
|
3504
|
-
const urlSegments = normalizedUrl.split("/").filter(Boolean);
|
|
3505
|
-
let found404 = false;
|
|
3506
|
-
for (let i = urlSegments.length; i >= 0; i--) {
|
|
3507
|
-
const parentSegments = urlSegments.slice(0, i);
|
|
3508
|
-
const fourOhFourPath = "/" + [...parentSegments, "404"].join("/");
|
|
3509
|
-
const fourOhFourFilePath = path3.join(
|
|
3510
|
-
clientOutDir,
|
|
3511
|
-
fourOhFourPath + ".html"
|
|
3512
|
-
);
|
|
3513
|
-
if (fs3.existsSync(fourOhFourFilePath)) {
|
|
3514
|
-
filePath = fourOhFourFilePath;
|
|
3515
|
-
found404 = true;
|
|
3516
|
-
break;
|
|
3517
|
-
}
|
|
3518
|
-
}
|
|
3519
|
-
if (!found404) {
|
|
3520
|
-
res.statusCode = 404;
|
|
3521
|
-
res.end("Not Found");
|
|
3522
|
-
return;
|
|
3523
|
-
}
|
|
3524
|
-
}
|
|
3525
|
-
const type = src_default.getType(filePath) ?? "application/octet-stream";
|
|
3526
|
-
const content = fs3.readFileSync(filePath);
|
|
3527
|
-
const is404Page = filePath.includes("/404.html");
|
|
3528
|
-
res.statusCode = is404Page ? 404 : 200;
|
|
3529
|
-
res.setHeader("Content-Type", type);
|
|
3530
|
-
res.end(content);
|
|
3531
|
-
} catch (err) {
|
|
3532
|
-
next(err);
|
|
3533
|
-
}
|
|
3534
|
-
};
|
|
3535
|
-
}
|
|
3536
|
-
|
|
3537
|
-
// ../devtools-client/dist/index.js
|
|
3538
|
-
var dist_default = `<!DOCTYPE html>
|
|
3539
|
-
<html lang="en">
|
|
3540
|
-
<head>
|
|
3541
|
-
<meta charset="UTF-8" />
|
|
3542
|
-
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
|
|
3543
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
3544
|
-
<title>Kiru Devtools</title>
|
|
3545
|
-
<script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();const Lc="production",he=Lc==="development",wa=Symbol.for("kiru.signal"),Rc=Symbol.for("kiru.context"),Oi=Symbol.for("kiru.contextProvider"),$e=Symbol.for("kiru.fragment"),Sa=Symbol.for("kiru.error"),ka=Symbol.for("kiru.memo"),Ys=Symbol.for("kiru.errorBoundary"),Nc=50,ne=2,St=4,Pi=8,re=16,Ta=32,as=64,Ye=128,zc=/^on:?/,Ma=new Set(["animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","path","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","title","tspan","use"]),Fc=new Set(["allowfullscreen","autofocus","autoplay","async","checked","compact","controls","contenteditable","declare","default","defer","disabled","download","hidden","inert","ismap","multiple","nohref","noresize","noshade","novalidate","nowrap","open","popover","readonly","required","sandbox","scoped","selected","sortable","spellcheck","translate","wrap"]),Hc=new Map([["acceptCharset","accept-charset"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["httpEquiv","http-equiv"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]);function Bc(e){return typeof e=="string"||typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"||e===void 0||e===null}const De={current:null},Ea={current:0},Xt={current:"window"in globalThis?"dom":"string"};var Ca;class Xe extends Error{constructor(t){const n=typeof t=="string"?t:t.message;super(n),this[Ca]=!0,typeof t!="string"&&(this.fatal=t?.fatal)}static isKiruError(t){return t instanceof Error&&t[Sa]===!0}}Ca=Sa;const qe={parentStack:[],childIdxStack:[],eventDeferrals:new Map,parent:function(){return this.parentStack[this.parentStack.length-1]},clear:function(){this.parentStack.length=0,this.childIdxStack.length=0},pop:function(){this.parentStack.pop(),this.childIdxStack.pop()},push:function(e){this.parentStack.push(e),this.childIdxStack.push(0)},currentChild:function(){return this.parentStack[this.parentStack.length-1].childNodes[this.childIdxStack[this.childIdxStack.length-1]]},nextChild:function(){return this.parentStack[this.parentStack.length-1].childNodes[this.childIdxStack[this.childIdxStack.length-1]++]},bumpChildIndex:function(){this.childIdxStack[this.childIdxStack.length-1]++},captureEvents:function(e){Ho(e,!0),this.eventDeferrals.set(e,[])},resetEvents:function(e){this.eventDeferrals.delete(e)},releaseEvents:function(e){Ho(e,!1);const t=this.eventDeferrals.get(e);for(;t?.length;)t.shift()()}},Vc=e=>{const t=e.target;!e.isTrusted||!t||qe.eventDeferrals.get(t)?.push(()=>t.dispatchEvent(e))},Ho=(e,t)=>{for(const n in e)if(n.startsWith("on")){const i=n.substring(2);e[t?"addEventListener":"removeEventListener"](i,Vc,{passive:!0})}};let Xs=!1,ls=!1;const Oa=e=>{e.preventDefault(),e.stopPropagation(),ls=!0};let Te=null;function Wc(){Xs=!0,Te=document.activeElement,Te&&Te!==document.body&&Te.addEventListener("blur",Oa)}function jc(){ls&&(Te.removeEventListener("blur",Oa),Te.isConnected&&Te.focus(),ls=!1),Xs=!1}function cs(e,t){if(typeof e=="function"){e(t);return}if(W.isSignal(e)){e.sneak(t),e.notify({filter:n=>typeof n=="function"});return}e.current=t}function Uc(e){const t=e.type;return t=="#text"?Pa(e):Ma.has(t)?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t)}function Pa(e){const{nodeValue:t}=e.props;if(!W.isSignal(t))return document.createTextNode(t);const n=t.peek()??"",i=document.createTextNode(n);return hs(e,i,t),i}function $c(e,t,n){const i=us.get(e)??{},s=i[t]=o=>{if(Xs){o.preventDefault(),o.stopPropagation();return}n(o)};return us.set(e,i),s}const us=new WeakMap;function Da(e){const t=e.dom,n=e.prev?.props??{},i=e.props??{},s=new Set([...Object.keys(n),...Object.keys(i)]),o=Xt.current==="hydrate";s.forEach(r=>{const a=n[r],l=i[r];if(gi.internalProps.includes(r)&&r!=="innerHTML"){r==="ref"&&a!==l&&(a&&cs(a,null),l&&cs(l,t));return}if(gi.isEvent(r)){if(a!==l||Xt.current==="hydrate"){const c=r.replace(zc,""),u=c==="focus"||c==="blur";r in n&&t.removeEventListener(c,u?us.get(e)?.[c]:a),r in i&&t.addEventListener(c,u?$c(e,c,l):l)}return}if(!(t instanceof Text)){if(a===l||o&&t.getAttribute(r)===l)return;if(W.isSignal(a)&&e.cleanups){const c=e.cleanups[r];c&&(c(),delete e.cleanups[r])}if(W.isSignal(l))return Gc(e,t,r,l,a);ui(t,r,l,a);return}W.isSignal(l)||t.nodeValue!==l&&(t.nodeValue=l)})}function Yc(e){return e.multiple?Array.from(e.selectedOptions).map(t=>t.value):e.value}function Aa(e,t){if(!e.multiple||t===void 0||t===null||t===""){e.value=t;return}Array.from(e.options).forEach(n=>{n.selected=t.indexOf(n.value)>-1})}const Xc={value:"input",checked:"change",open:"toggle",volume:"volumechange",playbackRate:"ratechange",currentTime:"timeupdate"},qc=["progress","meter","number","range"];function Gc(e,t,n,i,s){const o=e.cleanups??(e.cleanups={}),[r,a]=n.split(":");if(r!=="bind")return o[n]=i.subscribe((y,v)=>{ui(t,n,y,v)}),ui(t,n,i.peek(),Ke(s));const l=Xc[a];if(!l)return;const c=t instanceof HTMLSelectElement,u=c?y=>Aa(t,y):y=>t[a]=y,f=y=>{u(y)},p=y=>{i.sneak(y),i.notify({filter:v=>v!==f})};let g;if(a==="value"){const y=qc.indexOf(t.type)!==-1;g=()=>{let v=t.value;c?v=Yc(t):typeof i.peek()=="number"&&y&&(v=t.valueAsNumber),p(v)}}else g=y=>{const v=y.target[a];a==="currentTime"&&i.peek()===v||p(v)};t.addEventListener(l,g);const x=i.subscribe(f);return o[n]=()=>{t.removeEventListener(l,g),x()},ui(t,a,i.peek(),Ke(s))}function hs(e,t,n){(e.cleanups??(e.cleanups={})).nodeValue=n.subscribe((i,s)=>{i!==s&&(t.nodeValue=i)})}function Kc(e){if(e.type!=="#text"||!W.isSignal(e.props.nodeValue))return;const t=Ke(e.props.nodeValue);if(!Bc(t))return;const n=Pa(e),i=qe.parent();return i&&i.appendChild(n),n}function Zc(e){const t=qe.nextChild()??Kc(e);if(!t)throw new Xe({message:"Hydration mismatch - no node found",vNode:e});let n=t.nodeName;if(Ma.has(n)||(n=n.toLowerCase()),e.type!==n)throw new Xe({message:\`Hydration mismatch - expected node of type \${e.type.toString()} but received \${n}\`,vNode:e});if(e.dom=t,e.type!=="#text"&&!(e.flags&re)){Da(e);return}W.isSignal(e.props.nodeValue)&&hs(e,t,e.props.nodeValue);let i=e,s=e.sibling;for(;s&&s.type==="#text";){const o=s;qe.bumpChildIndex();const r=String(Ke(i.props.nodeValue)??""),a=i.dom.splitText(r.length);o.dom=a,W.isSignal(o.props.nodeValue)&&hs(o,a,o.props.nodeValue),i=s,s=s.sibling}}function Ia(e,t,n,i=!1){if(n===null)return e.removeAttribute(t),!0;switch(typeof n){case"undefined":case"function":case"symbol":return e.removeAttribute(t),!0;case"boolean":if(i&&!n)return e.removeAttribute(t),!0}return!1}function Qc(e,t,n){const i=Fc.has(t);Ia(e,t,n,i)||e.setAttribute(t,i&&typeof n=="boolean"?"":String(n))}const Jc=["INPUT","TEXTAREA"],tu=e=>Jc.indexOf(e.nodeName)>-1;function ui(e,t,n,i){if(n!==i)switch(t){case"style":return iu(e,n,i);case"className":return nu(e,n);case"innerHTML":return eu(e,n);case"muted":e.muted=!!n;return;case"value":if(e.nodeName==="SELECT")return Aa(e,n);const s=n==null?"":String(n);if(tu(e)){e.value=s;return}e.setAttribute("value",s);return;case"checked":if(e.nodeName==="INPUT"){e.checked=!!n;return}e.setAttribute("checked",String(n));return;default:return Qc(e,Tu(t),n)}}function eu(e,t){if(t==null||typeof t=="boolean"){e.innerHTML="";return}e.innerHTML=String(t)}function nu(e,t){const n=Ke(t);if(!n)return e.removeAttribute("class");e.setAttribute("class",n)}function iu(e,t,n){if(Ia(e,"style",t))return;if(typeof t=="string"){e.setAttribute("style",t);return}let i={};typeof n=="string"?e.setAttribute("style",""):typeof n=="object"&&n&&(i=n);const s=t;new Set([...Object.keys(i),...Object.keys(s)]).forEach(r=>{const a=i[r],l=s[r];if(a!==l){if(l===void 0){e.style[r]="";return}e.style[r]=l}})}function su(e){let t=e.parent,n=t?.dom;for(;t&&!n;)t=t.parent,n=t?.dom;if(!n||!t){if(!e.parent&&e.dom)return e;throw new Xe({message:"No DOM parent found while attempting to place node.",vNode:e})}return t}function ou(e,t){const{node:n,lastChild:i}=t,s=e.dom;if(i){i.after(s);return}const o=La(e,n);if(o){n.dom.insertBefore(s,o);return}n.dom.appendChild(s)}function La(e,t){let n=e;for(;n;){let i=n.sibling;for(;i;){if(!(i.flags&(St|re))){const s=ru(i);if(s?.isConnected)return s}i=i.sibling}if(n=n.parent,!n||n.flags&re||n===t)return}}function ru(e){let t=e;for(;t;){if(t.dom)return t.dom;if(t.flags&re)return;t=t.child}}function au(e){if(Xt.current==="hydrate")return Ii(e,mi);const t={node:e.dom?e:su(e)};fs(e,t,(e.flags&St)>0),e.dom&&!(e.flags&re)&&Ra(e,t,!1),mi(e)}function fs(e,t,n){let i=e.child;for(;i;){if(i.flags&as){i.flags&St&&cu(i,t),mi(i),i=i.sibling;continue}i.dom?(fs(i,{node:i},!1),i.flags&re||Ra(i,t,n)):fs(i,t,(i.flags&St)>0||n),mi(i),i=i.sibling}}function Ra(e,t,n){(n||!e.dom.isConnected||e.flags&St)&&ou(e,t),(!e.prev||e.flags&ne)&&Da(e),t.lastChild=e.dom}function lu(e){e===e.parent?.child&&(e.parent.child=e.sibling),Ii(e,t=>{const{hooks:n,subs:i,cleanups:s,dom:o,props:{ref:r}}=t;for(i?.forEach(a=>a()),s&&Object.values(s).forEach(a=>a());n?.length;)n.pop().cleanup?.();o&&(r&&cs(r,null),o.isConnected&&!(t.flags&re)&&o.remove(),delete t.dom)}),e.parent=null}function cu(e,t){if(!e.child)return;const n=[];if(Na(e.child,n),n.length===0)return;const{node:i,lastChild:s}=t;if(s)s.after(...n);else{const o=La(e,i),r=i.dom;o?o.before(...n):r.append(...n)}t.lastChild=n[n.length-1]}function Na(e,t){let n=e;for(;n;)n.dom?t.push(n.dom):n.child&&Na(n.child,t),n=n.sibling}function uu(e){return typeof e=="function"&&typeof e[ka]?.arePropsEqual=="function"}function m(e,t=null,...n){if(e===kt)return kt({children:n,...t});const i={type:e,flags:0,index:0,depth:0,props:{},parent:null,sibling:null,child:null,prev:null,deletions:null};if(uu(e)&&(i.flags|=Ta,i.arePropsEqual=e[ka].arePropsEqual),t!==null){const{key:o,ref:r,...a}=t;Iu(o)&&(i.props.key=o.toString()),Lu(r)&&(i.props.ref=r),Object.assign(i.props,a)}const s=n.length===1?n[0]:n.length>1?n:null;return s!==null&&(i.props.children=s),i}function kt({children:e,key:t}){return m($e,t?{key:t}:null,e)}function qs(e,t){return Array.isArray(t)?fu(e,t):hu(e,t)}function hu(e,t){const n=e.child;if(n===null)return Ha(e,t);const i=n.sibling,s=za(e,n,t);if(s!==null)return n&&n!==s&&!s.prev?ds(e,n):i&&ds(e,i),s;{const o=Wa(n),r=Ba(o,e,0,t);if(r!==null){const a=r.prev;if(a!==null){const l=a.props.key;o.delete(l===void 0?a.index:l)}hi(r,0,0)}return o.forEach(a=>pi(e,a)),r}}function fu(e,t){let n=null,i=null,s=e.child,o=null,r=0,a=0;for(;s!==null&&a<t.length;a++){s.index>a?(o=s,s=null):o=s.sibling;const c=za(e,s,t[a]);if(c===null){s===null&&(s=o);break}s&&!c.prev&&pi(e,s),r=hi(c,r,a),i===null?n=c:i.sibling=c,i=c,s=o}if(a===t.length)return ds(e,s),n;if(s===null){for(;a<t.length;a++){const c=Ha(e,t[a]);c!==null&&(r=hi(c,r,a),i===null?n=c:i.sibling=c,i=c)}return n}const l=Wa(s);for(;a<t.length;a++){const c=Ba(l,e,a,t[a]);if(c!==null){const u=c.prev;if(u!==null){const f=u.props.key;l.delete(f===void 0?u.index:f)}r=hi(c,r,a),i===null?n=c:i.sibling=c,i=c}}return l.forEach(c=>pi(e,c)),n}function za(e,t,n){const i=t?.props.key;return Ks(n)?i!==void 0||t?.type==="#text"&&W.isSignal(t.props.nodeValue)?null:Bo(e,t,""+n):W.isSignal(n)?t&&t.props.nodeValue!==n?null:Bo(e,t,n):Gs(n)?n.props.key!==i?null:du(e,t,n):Array.isArray(n)?i!==void 0?null:Fa(e,t,n):null}function Bo(e,t,n){if(t===null||t.type!=="#text"){const s=m("#text",{nodeValue:n});return Nt(s,e),s}return t.props.nodeValue!==n&&(t.props.nodeValue=n,t.flags|=ne),t.sibling=null,t}function du(e,t,n){let{type:i,props:s}=n;if(i===$e)return Fa(e,t,s.children||[],s);if(t?.type===i)return t.index=0,t.sibling=null,typeof i=="string"?Va(t.props,s)&&(t.flags|=ne):t.flags|=ne,t.props=s,t.memoizedProps=n.memoizedProps,t;const o=m(i,s);return Nt(o,e),o}function Fa(e,t,n,i={}){if(t===null||t.type!==$e){const s=m($e,{children:n,...i});return Nt(s,e),s}return t.props={...t.props,...i,children:n},t.flags|=ne,t.sibling=null,t}function Ha(e,t){if(Ks(t)){const n=m("#text",{nodeValue:""+t});return Nt(n,e),n}if(W.isSignal(t)){const n=m("#text",{nodeValue:t});return Nt(n,e),n}if(Gs(t)){const n=m(t.type,t.props);return Nt(n,e),n.flags|=St,n}if(Array.isArray(t)){const n=kt({children:t});return Nt(n,e),n}return null}function hi(e,t,n){e.index=n;const i=e.prev;if(i!==null){const s=i.index;return s<t?(e.flags|=St,t):s}else return e.flags|=St,t}function Ba(e,t,n,i){if(W.isSignal(i)||Ks(i)){const o=e.get(n);if(o){if(o.props.nodeValue===i)return o;o.type==="#text"&&W.isSignal(o.props.nodeValue)&&o.cleanups?.nodeValue?.()}const r=m("#text",{nodeValue:i});return Nt(r,t),r.flags|=St,r.index=n,r}if(Gs(i)){const{type:o,props:r}=i,a=r.key,l=e.get(a===void 0?n:a);if(l?.type===o)return typeof o=="string"?Va(l.props,r)&&(l.flags|=ne):l.flags|=ne,l.props=r,l.sibling=null,l.index=n,l;const c=m(i.type,i.props);return Nt(c,t),c.flags|=St,c.index=n,c}if(Array.isArray(i)){const o=e.get(n);if(o)return o.flags|=ne,o.props.children=i,o;const r=kt({children:i});return Nt(r,t),r.flags|=St,r.index=n,r}return null}function Va(e,t){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!0;for(let s of n)if(!(s==="children"||s==="key")&&e[s]!==t[s])return!0;return!1}function Nt(e,t){e.parent=t,e.depth=t.depth+1}function Wa(e){const t=new Map;for(;e;){const n=e.props.key;t.set(n===void 0?e.index:n,e),e=e.sibling}return t}function pi(e,t){e.deletions===null?e.deletions=[t]:e.deletions.push(t)}function ds(e,t){for(;t;)pi(e,t),t=t.sibling}let Yt=[],Ge=!1,ps=[],gs=[],ms=!1,bs=!1,ys=!1,xs=0,ja=[],vs=[],Ua=-1;function pu(e){if(Ge){ps.push(e);return}e()}function $a(){Ge&&(window.cancelAnimationFrame(Ua),Ya())}function Vo(e){e.flags|=Ye,Yt.push(e),Ge=!0,$a()}function Di(e){if(Xt.current==="hydrate")return pu(()=>_s(e));_s(e)}function gu(){Ge||(Ge=!0,Ua=window.requestAnimationFrame(Ya))}function mu(){for(Ge=!1;ps.length;)ps.shift()()}function _s(e){if(ms&&(bs=!0),De.current===e){ys=!0;return}if(!(e.flags&(Ye|Pi))){if(e.flags|=Ye,!Yt.length)return Yt.push(e),gu();Yt.push(e)}}function bu(e){Ii(e,t=>t.flags|=Pi),gs.push(e)}const yu=(e,t)=>t.depth-e.depth;let Jt=null;function Ya(){let e=1;for(Wc();Yt.length;){Yt.length>e&&Yt.sort(yu),Jt=Yt.shift(),e=Yt.length;const t=Jt.flags;if(!(t&Pi)&&t&Ye){let n=Jt;for(;n=xu(n););for(;gs.length;)lu(gs.pop());au(Jt),Jt.flags&=~Ye}}if(jc(),ms=!0,qi(ja),ms=!1,bs)return Su(),qi(vs),bs=!1,xs++,$a();xs=0,mu(),qi(vs)}function xu(e){let t=!0;try{typeof e.type=="string"?wu(e):Eu(e.type)?vu(e):t=_u(e)}catch(i){const s=Au(e);if(s){const o=s.error=i instanceof Error?i:new Error(String(i));return s.props.onError?.(o),s.depth<Jt.depth&&(Jt=s),s}if(Xe.isKiruError(i)){if(i.customNodeStack&&setTimeout(()=>{throw new Error(i.customNodeStack)}),i.fatal)throw i;console.error(i);return}setTimeout(()=>{throw i})}if(e.deletions!==null&&(e.deletions.forEach(bu),e.deletions=null),t&&e.child)return e.child;let n=e;for(;n;){if(n.immediateEffects&&(ja.push(...n.immediateEffects),n.immediateEffects=void 0),n.effects&&(vs.push(...n.effects),n.effects=void 0),n===Jt)return;if(n.sibling)return n.sibling;n=n.parent,Xt.current==="hydrate"&&n?.dom&&qe.pop()}}function vu(e){const{props:t,type:n}=e;let i=t.children;if(n===Oi){const{props:{dependents:s,value:o},prev:r}=e;s.size&&r&&r.props.value!==o&&s.forEach(_s)}else if(n===Ys){const s=e,{error:o}=s;o&&(i=typeof t.fallback=="function"?t.fallback(o):t.fallback,delete s.error)}e.child=qs(e,i)}function _u(e){const{type:t,props:n,subs:i,prev:s,flags:o}=e;if(o&Ta){if(e.memoizedProps=n,s?.memoizedProps&&e.arePropsEqual(s.memoizedProps,n)&&!e.hmrUpdated)return e.flags|=as,!1;e.flags&=~as}try{De.current=e;let r,a=0;do e.flags&=~Ye,ys=!1,Ea.current=0,i&&(i.forEach(l=>l()),i.clear()),r=t(n);while(ys);return e.child=qs(e,r),!0}finally{De.current=null}}function wu(e){const{props:t,type:n}=e;e.dom||(Xt.current==="hydrate"?Zc(e):e.dom=Uc(e)),n!=="#text"&&(e.child=qs(e,t.children),e.child&&Xt.current==="hydrate"&&qe.push(e.dom))}function Su(){if(xs>Nc)throw new Xe("Maximum update depth exceeded. This can happen when a component repeatedly calls setState during render or in useLayoutEffect. Kiru limits the number of nested updates to prevent infinite loops.")}function qi(e){for(let t=0;t<e.length;t++)e[t]();e.length=0}var Wo;(function(e){e.Start="start",e.End="end"})(Wo||(Wo={}));const fe=()=>{const e=De.current;return e||Xa("useRequestUpdate"),()=>Di(e)};function Ft(e,t,n){const i=De.current;i||Xa(e);const s=(a,l)=>{if(l?.immediate){(i.immediateEffects??(i.immediateEffects=[])).push(a);return}(i.effects??(i.effects=[])).push(a)},o=Ea.current++;let r=i.hooks?.at(o);try{const a=r??(typeof t=="function"?t():{...t});return i.hooks??(i.hooks=[]),i.hooks[o]=a,n({hook:a,isInit:!r,update:()=>Di(i),queueEffect:s,vNode:i,index:o})}catch(a){throw a}}function Xa(e){throw new Xe(\`Hook "\${e}" must be used at the top level of a component or inside another composite hook.\`)}function Ai(e){e.cleanup&&(e.cleanup(),e.cleanup=void 0)}function nn(e,t){return e===void 0||t===void 0||e.length!==t.length||e.length>0&&t.some((n,i)=>!Object.is(n,e[i]))}const ws={stack:new Array,current:function(){return this.stack[this.stack.length-1]}},Ve=new Map;var qa;class W{constructor(t,n){this[qa]=!0,this.$id=Nu(),this.$value=t,n&&(this.displayName=n),this.$subs=new Set}get value(){return this.onBeforeRead?.(),W.entangle(this),this.$value}set value(t){Object.is(this.$value,t)||(this.$prevValue=this.$value,this.$value=t,this.notify())}peek(){return this.onBeforeRead?.(),this.$value}sneak(t){this.$prevValue=this.$value,this.$value=t}toString(){return this.onBeforeRead?.(),W.entangle(this),\`\${this.$value}\`}subscribe(t){return this.$subs.add(t),()=>this.$subs.delete(t)}notify(t){this.$subs.forEach(n=>{if(!(t?.filter&&!t.filter(n)))return n(this.$value,this.$prevValue)})}static isSignal(t){return typeof t=="object"&&!!t&&wa in t}static subscribers(t){return t.$subs}static makeReadonly(t){const n=Object.getOwnPropertyDescriptor(t,"value");return n&&!n.writable?t:Object.defineProperty(t,"value",{get:function(){return W.entangle(this),this.$value},configurable:!0})}static makeWritable(t){const n=Object.getOwnPropertyDescriptor(t,"value");return n&&n.writable?t:Object.defineProperty(t,"value",{get:function(){return W.entangle(this),this.$value},set:function(i){this.$value=i,this.notify()},configurable:!0})}static entangle(t){const n=De.current,i=ws.current();if(i){(!n||n&&Tt())&&i.set(t.$id,t);return}if(!n||!Tt())return;const s=t.subscribe(()=>Di(n));(n.subs??(n.subs=new Set)).add(s)}static configure(t,n){t.onBeforeRead=n}static dispose(t){t.$isDisposed=!0,t.$subs.clear()}}qa=wa;const ht=(e,t)=>new W(e,t),J=(e,t)=>Ft("useSignal",{signal:null},({hook:n,isInit:i,isHMR:s})=>(i&&(n.cleanup=()=>W.dispose(n.signal),n.signal=new W(e,t)),n.signal));function Ke(e,t=!1){return W.isSignal(e)?t?e.value:e.peek():e}const ku=()=>{Ve.forEach(e=>e()),Ve.clear()},gi={internalProps:["children","ref","key","innerHTML"],isEvent:e=>e.startsWith("on"),isProperty:e=>!gi.internalProps.includes(e)&&!gi.isEvent(e)};function Tu(e){switch(e){case"className":return"class";case"htmlFor":return"for";case"tabIndex":case"formAction":case"formMethod":case"formEncType":case"contentEditable":case"spellCheck":case"allowFullScreen":case"autoPlay":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"noModule":case"noValidate":case"popoverTarget":case"popoverTargetAction":case"playsInline":case"readOnly":case"itemscope":case"rowSpan":case"crossOrigin":return e.toLowerCase();default:return e.indexOf("-")>-1?e:e.startsWith("aria")?"aria-"+e.substring(4).toLowerCase():Hc.get(e)||e}}function Tt(){return Xt.current==="dom"||Xt.current==="hydrate"}function Mu(e){return(e.flags&Pi)!==0}function Gs(e){return typeof e=="object"&&e!==null&&"type"in e}function Ks(e){return typeof e=="string"&&e!==""||typeof e=="number"||typeof e=="bigint"}function Eu(e){return e===$e||e===Oi||e===Ys}function Cu(e){return e.type===$e}function Ou(e){return typeof e.type=="function"&&"displayName"in e.type&&e.type.displayName==="Kiru.lazy"}function Pu(e){return typeof e.type=="function"&&"displayName"in e.type&&e.type.displayName==="Kiru.memo"}function mi(e){const{props:{children:t,...n},memoizedProps:i,index:s}=e;e.prev={props:n,memoizedProps:i,index:s},e.flags&=-15}function Ii(e,t){t(e);let n=e.child;for(;n;)t(n),n.child&&Ii(n,t),n=n.sibling}function Du(e,t){let n=e.parent;for(;n;){if(t(n))return n;n=n.parent}return null}function Au(e){return Du(e,t=>t.type===Ys)}function Iu(e){return typeof e=="string"||typeof e=="number"}function Lu(e){return typeof e=="function"||typeof e=="object"&&!!e&&"current"in e||W.isSignal(e)}const Ru="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz-";function Nu(e=10,t=Ru){let n="";for(let i=0;i<e;i++)n+=t[Math.random()*t.length|0];return n}const jo=Object.freeze(()=>{});function zu(){const e=new Set,t=new Map;function n(r,a,l){t.get(r)?.forEach(c=>c(a,l))}function i(r,a){t.has(r)||t.set(r,new Set),t.get(r).add(a)}function s(r,a){t.get(r)?.delete(a)}const o={get apps(){return Array.from(e)},emit:n,on:i,off:s};return i("mount",r=>e.add(r)),i("unmount",r=>e.delete(r)),o}function Fu(e){const{id:t,subs:n,fn:i,deps:s=[],onDepChanged:o}=e;let r;Ve.delete(t);const a=!!De.current&&!Tt();a||(r=new Map,ws.stack.push(r));const l=i(...s.map(c=>c.value));if(!a){for(const[u,f]of n)r.has(u)||(f(),n.delete(u));const c=()=>{Ve.size||queueMicrotask(ku),Ve.set(t,o)};for(const[u,f]of r){if(n.has(u))continue;const p=f.subscribe(c);n.set(u,p)}ws.stack.pop()}return l}class Be extends W{constructor(t,n){super(void 0,n),this.$getter=t,this.$unsubs=new Map,this.$isDirty=!0,W.configure(this,()=>{this.$isDirty&&Be.run(this)})}get value(){return super.value}set value(t){}subscribe(t){return this.$isDirty&&Be.run(this),super.subscribe(t)}static dispose(t){Be.stop(t),W.dispose(t)}static stop(t){const{$id:n,$unsubs:i}=t;Ve.delete(n),i.forEach(s=>s()),i.clear(),t.$isDirty=!0}static run(t){const n=t,{$id:i,$getter:s,$unsubs:o}=n,r=Fu({id:i,subs:o,fn:()=>s(n.$value),onDepChanged:()=>{n.$isDirty=!0,t.$subs.size&&(Be.run(n),!Object.is(n.$value,n.$prevValue)&&n.notify())}});n.sneak(r),n.$isDirty=!1}}const Ga=(e,t)=>new Be(e,t);let Hu=0;function Bu(e,t,n){const i=m(t.nodeName.toLowerCase(),{});i.dom=t,i.flags|=re;const s=Hu++,o=\`App-\${s}\`,r={id:s,name:o,rootNode:i,render:a,unmount:l};function a(c){i.props.children=c,Vo(i)}function l(){i.props.children=null,Vo(i),window.__kiru.emit("unmount",r)}return a(e),window.__kiru.emit("mount",r),r}function de(e){return Tt()?Ft("useState",{state:void 0,dispatch:jo},({hook:t,isInit:n,update:i,isHMR:s})=>(n&&(t.state=typeof e=="function"?e():e,t.dispatch=o=>{const r=typeof o=="function"?o(t.state):o;Object.is(t.state,r)||(t.state=r,i())}),[t.state,t.dispatch])):[typeof e=="function"?e():e,jo]}function Vu(e){const t={[Rc]:!0,Provider:({value:n,children:i})=>{const[s]=de(()=>new Set);return m(Oi,{value:n,ctx:t,dependents:s},typeof i=="function"?i(n):i)},default:()=>e,set displayName(n){this.Provider.displayName=n},get displayName(){return this.Provider.displayName||"Anonymous Context"}};return t}function We(e,t){return Tt()?Ft("useCallback",{callback:e,deps:t},({hook:n,isHMR:i})=>(nn(t,n.deps)&&(n.deps=t,n.callback=e),n.callback)):e}function Wu(e,t=!0){return Ft("useContext",{context:e,warnIfNotFound:t},ju)}const ju=({hook:e,isInit:t,vNode:n})=>{if(t){let i=n.parent;for(;i;){if(i.type===Oi){const s=i,{ctx:o,value:r,dependents:a}=s.props;if(o===e.context)return a.add(n),e.cleanup=()=>a.delete(n),e.provider=s,r}i=i.parent}}return e.provider?e.provider.props.value:e.context.default()};function ut(e,t){if(Tt())return Ft("useEffect",{deps:t},({hook:n,isInit:i,isHMR:s,queueEffect:o})=>{(i||nn(t,n.deps))&&(n.deps=t,Ai(n),o(()=>{const r=e();typeof r=="function"&&(n.cleanup=r)}))})}function Zs(e,t){if(Tt())return Ft("useLayoutEffect",{deps:t},({hook:n,isInit:i,isHMR:s,queueEffect:o})=>{(i||nn(t,n.deps))&&(n.deps=t,Ai(n),o(()=>{const r=e();typeof r=="function"&&(n.cleanup=r)},{immediate:!0}))})}function bi(e,t){return Tt()?Ft("useMemo",{deps:t,value:void 0},({hook:n,isInit:i,isHMR:s})=>((i||nn(t,n.deps))&&(n.deps=t,n.value=e()),n.value)):e()}function Ze(e){return Tt()?Ft("useRef",{ref:{current:e}},({hook:t,isInit:n,isHMR:i})=>t.ref):{current:e}}"window"in globalThis&&(window.__KIRU_LAZY_CACHE??(window.__KIRU_LAZY_CACHE=new Map));var Uo;"window"in globalThis&&!globalThis.__KIRU_DEVTOOLS__&&((Uo=globalThis.window).__kiru??(Uo.__kiru=zu()));function Ss(...e){return e.filter(Boolean).join(" ")}function Qs(e,t,n){let i=e;for(let s=0;s<t.length;s++){const o=t[s];s===t.length-1?i[o]=n:i=i[o]}}function Ka(e){return e.type.displayName??(e.type.name||"Anonymous Function")}const Uu=e=>e.__devtoolsFileLink??null;function Pn(e){return e.name==="kiru.devtools"}function Za(e){return Array.from(e.entries())}function $u(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e},m("rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}),m("path",{d:"M12 9v11"}),m("path",{d:"M2 9h13a2 2 0 0 1 2 2v9"}))}function ae(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"m9 18 6-6-6-6"}))}function Yu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),m("circle",{cx:"12",cy:"12",r:"3"}))}function Xu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6"}),m("path",{d:"m21 3-9 9"}),m("path",{d:"M15 3h6v6"}))}function qu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"m12 14 4-4"}),m("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}))}function Gu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("circle",{cx:"12",cy:"12",r:"10"}),m("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}),m("path",{d:"M2 12h20"}))}function Ku(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),m("path",{d:"M21 3v5h-5"}),m("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),m("path",{d:"M8 16H3v5"}))}function Zu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e},m("path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z"}),m("path",{d:"M6 18h12"}),m("path",{d:"M6 14h12"}),m("rect",{width:"12",height:"12",x:"6",y:"10"}))}function Qa(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),m("path",{d:"M12 9v4"}),m("path",{d:"M12 17h.01"}))}function Ja({title:e,children:t,className:n,disabled:i,...s}){const[o,r]=de(!0);ut(()=>{!o&&i&&r(!0)},[i]);const a=We(l=>{l.preventDefault(),l.stopImmediatePropagation(),r(c=>!c)},[]);return m("div",{className:"flex flex-col"},m("button",{onclick:a,disabled:i,className:\`\${i?"opacity-50 cursor-default":"cursor-pointer"}\`},m("span",{className:"flex items-center gap-2 font-medium"},m(ae,{className:\`transition \${o?"":"rotate-90"}\`}),e)),o?null:m("div",{className:\`p-2 \${n||""}\`,...s},t))}const Js={arrayChunkSize:10,objectKeysChunkSize:100};function tl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i in n)if(typeof t[i]!=typeof e[i]||typeof e[i]=="object"&&!tl(e[i],t[i]))return!1;return!0}function el(e,t,n){for(const i in t)typeof e[i]>"u"&&(e[i]=structuredClone(t[i]));for(const i in e)typeof e[i]=="object"?el(e[i],t[i],n):n(e,i,e[i])}let nl={...Js};const $o=localStorage.getItem("kiru.devtools.userSettings");if($o)try{const e=JSON.parse($o);tl(Js,e)&&(nl=e)}catch(e){console.error("kiru.devtools.userSettings error",e)}const il=Vu({userSettings:null,saveUserSettings:()=>{}}),Li=()=>Wu(il);function Qu({children:e}){const[t,n]=de(nl),i=s=>{localStorage.setItem("kiru.devtools.userSettings",JSON.stringify(s)),n(s)};return m(il.Provider,{value:{userSettings:t,saveUserSettings:i}},e)}function Ju(){const{userSettings:e,saveUserSettings:t}=Li();return m("div",{className:"rounded bg-neutral-400 bg-opacity-5 border border-white border-opacity-10 overflow-hidden"},m(Ie,{border:!1,data:e,onChange:(n,i)=>{const s={...e};Qs(s,n,i),el(s,Js,(o,r,a)=>{o[r]=a<1?1:a}),t(s)},mutable:!0,objectRefAcc:[]}))}const th=Object.freeze(()=>{});function Ie({data:e,onChange:t,mutable:n,objectRefAcc:i,keys:s=[],className:o,border:r=!0}){const{userSettings:{objectKeysChunkSize:a}}=Li(),[l,c]=de(0),u=bi(()=>Object.keys(e).slice(0,(l+1)*a),[l,a,e]),f=()=>{u.forEach(g=>{typeof e[g]=="object"&&i.splice(i.indexOf(e[g]),1)}),c(l+1)},p=u.length<Object.keys(e).length;return m(kt,null,m("div",{className:Ss("flex flex-col items-start w-full",r&&"border border-neutral-700",Ke(o))},u.map(g=>{const x=s.concat(g),y=x.join(".");return m("div",{key:y,"data-key":y,className:"flex flex-col items-start w-full gap-2 pl-2 py-1 pr-1 border-b border-neutral-700 last:border-b-0"},m(to,{value:e[g],onChange:t,keys:x,path:y,label:g,mutable:n,objectRefAcc:i}))})),p&&m("button",{onclick:f,title:"Show more",className:"p-1 border font-bold border-neutral-700 hover:bg-neutral-700"},m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},m("circle",{cx:"12",cy:"12",r:"1"}),m("circle",{cx:"19",cy:"12",r:"1"}),m("circle",{cx:"5",cy:"12",r:"1"}))))}function yi(e,t){Array.isArray(e)?(t(e),e.forEach(n=>yi(n,t))):typeof e=="object"&&e!==null&&(t(e),Object.values(e).forEach(n=>yi(n,t)))}function to({value:e,onChange:t,keys:n,path:i,mutable:s,objectRefAcc:o,label:r}){const{userSettings:{arrayChunkSize:a}}=Li(),[l,c]=de(!0),u=r!==void 0&&m("label",{htmlFor:i,className:"text-xs truncate",title:i,children:r});if(e===null)return m(mt,null,u,m(Zt,null,"null"));if(e===void 0)return m(mt,null,u,m(Zt,null,"undefined"));const f=window.opener?window.opener.Node:Node;if(e instanceof f)return m(mt,null,u,m(Zt,null,"<",m("span",{style:{color:"#f0a05e"}},e.nodeName),"/>"));const p=window.opener?window.opener.Error:Error;if(e instanceof p)return m(mt,null,u,"cause"in e&&e.cause?m(Zt,null,e.message," (",String(e.cause),")"):m(Zt,null,e.message));const g=x=>t(n,x);switch(typeof e){case"string":return m(mt,null,u,m(Gi,{disabled:!s,id:i,type:"text",value:e,onchange:x=>g(x.target.value)}));case"number":return m(mt,null,u,m(Gi,{disabled:!s,id:i,type:"number",value:e,placeholder:"NaN",onchange:x=>g(Number(x.target.value))}));case"bigint":return m(mt,null,u,m(Gi,{disabled:!s,id:i,type:"number",value:e.toString(),onchange:x=>g(BigInt(x.target.value))}));case"boolean":return m(mt,null,u,m("input",{disabled:!s,id:i,type:"checkbox",checked:e,onchange:x=>g(x.target.checked),className:"accent-red-500"}));case"function":return m(mt,null,u,m(Zt,null,\`\u0192 \${e.name||"anonymous"}()\`));default:return Array.isArray(e)?m(mt,null,m("button",{className:"text-xs flex items-center gap-1 cursor-pointer w-full",title:i,onclick:()=>{yi(e,x=>o.splice(o.indexOf(x),1)),c(x=>!x)}},r,m(ae,{width:10,height:10,className:\`transition \${l?"":"rotate-90"}\`})),l?m(Zt,null,"Array(",e.length,")"):e.length>a?m(eh,{array:e,objectRefAcc:o}):m("div",{className:"flex flex-col items-start gap-1 w-full"},e.map((x,y)=>m(to,{value:x,onChange:t,keys:[...n,y.toString()],path:i.concat(".",y.toString()),label:y.toString(),mutable:s,objectRefAcc:o})))):o.includes(e)?m(mt,null,u,m(Zt,null,"Object(circular reference)")):(o.push(e),m(mt,null,m("button",{className:"text-xs flex items-center gap-1 cursor-pointer w-full",title:i,onclick:()=>{yi(e,x=>o.splice(o.indexOf(x),1)),c(x=>!x)}},r,m(ae,{width:10,height:10,className:\`transition \${l?"":"rotate-90"}\`})),l?null:m(Ie,{data:e,onChange:t,keys:n,mutable:s,objectRefAcc:o})))}}function mt({children:e}){return m("div",{className:"flex flex-col items-start gap-1 w-full"},e)}function Gi(e){return m("input",{className:"flex-grow text-xs px-2 py-1 text-neutral-300 w-full",...e})}function Zt({children:e}){return m("small",{className:"text-neutral-300"},m("i",null,e))}function eh({array:e,objectRefAcc:t}){const{userSettings:{arrayChunkSize:n}}=Li(),i=e.length,s=Math.ceil(i/n);return m("div",{className:"flex flex-col items-start gap-1 w-full"},Array.from({length:s}).map((o,r)=>m(nh,{array:e,range:{start:r*n,end:(r+1)*n},objectRefAcc:t})))}function nh({array:e,range:t,objectRefAcc:n}){const[i,s]=de(!0);let o;return i?o=void 0:o=e.slice(t.start,t.end),m("div",{className:"flex flex-col items-start gap-1 w-full"},m("button",{className:"text-xs flex items-center gap-1 cursor-pointer w-full",onclick:()=>{n.splice(n.indexOf(e),1),s(r=>!r)}},"[",t.start,"..",(t.end<e.length?t.end:e.length)-1,"]",m(ae,{width:10,height:10,className:\`transition \${i?"":"rotate-90"}\`})),o&&m("div",{className:"flex flex-col items-start gap-1 w-full"},o.map((r,a)=>m(to,{value:r,onChange:th,label:(t.start+a).toString(),keys:[a.toString()],path:a.toString(),mutable:!1,objectRefAcc:n}))))}const ih="kiru-devtools";"window"in globalThis&&(window.__devtoolsSelection??=null);class sh extends BroadcastChannel{send(t){super.postMessage(t)}removeEventListener(t){return super.removeEventListener("message",t)}addEventListener(t){return super.addEventListener("message",t)}}const Qe=new sh(ih);function eo({fn:e,onclick:t}){const n=bi(()=>Uu(e),[e]);return n?m("a",{className:"flex items-center gap-1 text-[10px] opacity-50 hover:opacity-100 transition-opacity",href:n,onclick:i=>{i.preventDefault(),Qe.send({type:"open-editor",fileLink:n}),t?.(i)},title:"Open in editor"},"Open in editor",m(Xu,{width:"0.65rem",height:"0.65rem"})):null}function oh({selectedApp:e,selectedNode:t,setSelectedNode:n,kiruGlobal:i}){const s=fe();ut(()=>{const l=c=>{c===e&&(Mu(t)?n(null):s())};return i?.on("update",l),()=>i?.off("update",l)},[]);const o=()=>{t&&Di(t)},r={...t.props};delete r.children;const a=lh(t);return m("div",{className:"flex-grow p-2 sticky top-0"},m("h2",{className:"flex justify-between items-center font-bold mb-2 pb-2 border-b-2 border-neutral-800"},m("div",{className:"flex gap-2 items-center"},"<"+Ka(t)+">",m(eo,{fn:t.type})),m("button",{onclick:o},m(Ku,{className:"w-5 h-5"}))),m(Ja,{title:"props",disabled:Object.keys(r).length===0},m(Ie,{data:r,onChange:()=>{},mutable:!1,objectRefAcc:[]})),m(sl,{node:a,selectedApp:e}))}function rh(e){return e.name==="devtools:useHookDebugGroup"}function ah(e){return ks in e}const ks=Symbol.for("devtools.hookGroup");function lh(e){const t={parent:null,name:"hooks",children:[],[ks]:!0};if(e.hooks?.length){let n=t;for(let i=0;i<e.hooks.length;i++){const s=e.hooks[i];if(rh(s)){switch(s.action){case"start":const o={parent:n,name:s.displayName,children:[],[ks]:!0};n.children.push(o),n=o;break;case"end":if(n.name!==s.displayName||n.parent===null)throw new Error("useHookDebugGroup:end called with no start");n=n.parent;break}continue}n.children.push(s)}}return t}function sl({node:e,selectedApp:t,depth:n=0}){if(ah(e))return m(Ja,{title:e.name,className:"bg-[#ffffff04] border border-[#fff1] flex flex-col gap-2 pl-6",disabled:e.children.length===0},e.children.map(u=>m(sl,{node:u,selectedApp:t,depth:n+1})));const{name:i,dev:s,cleanup:o,...r}=e,a=s?.devtools,l=typeof a?.get=="function"?a.get():r;return m("div",null,m("i",{className:"text-neutral-300 text-sm"},i||"anonymous hook"),m("div",{className:"p-2"},m(Ie,{data:l,onChange:(u,f)=>{if(!t||!a?.set||!a?.get)return;const p=a.get();Qs(p,u,f),a.set(p)},mutable:!!a?.set,objectRefAcc:[]})))}const Ce=(e,t,n={})=>{ut(()=>{let i=window;const s=n?.ref?.();return s?i=s:n.ref&&console.warn("useEventListener ref failed, using window"),i.addEventListener(e,t,n),()=>{i.removeEventListener(e,t,n)}},[t])},ch=()=>{const e=J({x:0,y:0}),t=J({x:0,y:0}),n=J({x:0,y:0});return Ce("mousemove",i=>{e.value={x:i.x,y:i.y},t.value={x:i.movementX,y:i.movementY},n.value={x:i.clientX,y:i.clientY}}),{mouse:e,delta:t,client:n}},Xn="window"in globalThis&&"ResizeObserver"in globalThis.window,uh=(e,t,n=void 0)=>Tt()?Xn?Ft("useResizeObserver",{resizeObserver:null,deps:[e.current]},({isInit:i,hook:s,queueEffect:o})=>(i&&(s.resizeObserver=new ResizeObserver(t),s.cleanup=()=>{s.resizeObserver?.disconnect?.(),s.resizeObserver=null}),o(()=>{nn([e.current],s.deps)&&(s.deps=[e.current],s.resizeObserver?.disconnect?.(),e.current&&s.resizeObserver?.observe(e.current,n))}),{isSupported:Xn,start:()=>{s.resizeObserver==null&&(s.resizeObserver=new ResizeObserver(t),e.current&&s.resizeObserver.observe(e.current,n),s.cleanup=()=>{s.resizeObserver?.disconnect?.(),s.resizeObserver=null})},stop:()=>{Ai(s)}})):{isSupported:Xn,start:()=>{},stop:()=>{}}:{isSupported:Xn,start:()=>{},stop:()=>{}},qn="window"in globalThis&&"MutationObserver"in globalThis.window,hh=(e,t,n=void 0)=>Tt()?qn?Ft("useMutationObserver",{mutationObserver:null,deps:[e.current]},({isInit:i,hook:s,queueEffect:o})=>(i?(o(()=>{s.deps=[e.current],s.mutationObserver=new MutationObserver(t),e.current&&s.mutationObserver.observe(e.current,n)}),s.cleanup=()=>{s.mutationObserver?.disconnect?.(),s.mutationObserver=null}):nn([e.current],s.deps)&&(s.deps=[e.current],s.mutationObserver?.disconnect?.(),e.current&&s.mutationObserver?.observe(e.current,n)),{isSupported:qn,start:()=>{s.mutationObserver==null&&(s.mutationObserver=new MutationObserver(t),e.current&&s.mutationObserver.observe(e.current,n),s.cleanup=()=>{s.mutationObserver?.disconnect?.(),s.mutationObserver=null})},stop:()=>{Ai(s)}})):{isSupported:qn,start:()=>{},stop:()=>{}}:{isSupported:qn,start:()=>{},stop:()=>{}},fh=(e,t={windowScroll:!0,windowResize:!0})=>{const n=t?.windowScroll??!0,i=t?.windowResize??!0,s=t.immediate??!0,o=J(0),r=J(0),a=J(0),l=J(0),c=J(0),u=J(0),f=J(0),p=J(0),g=()=>{const x=e.current;if(!x){o.value=0,r.value=0,a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,p.value=0;return}const y=x.getBoundingClientRect();o.value=y.width,r.value=y.height,a.value=y.top,l.value=y.right,c.value=y.bottom,u.value=y.left,f.value=y.x,p.value=y.y};return uh(e,g),hh(e,g,{attributeFilter:["style","class"]}),Ce("scroll",()=>{n&&g()},{capture:!0,passive:!0}),Ce("resize",()=>{i&&g()},{passive:!0}),Zs(()=>{s&&g()},[]),{width:o,height:r,top:a,right:l,bottom:c,left:u,x:f,y:p,update:g}};function dh(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}const Yo=(e,t,n={})=>{const{ref:i,eventName:s="keydown",passive:o=!1}=n,r=dh(e);return Ce(s,l=>{l.repeat&&!n.repeat||r(l)&&t(l)},{ref:i,passive:o})};function ol({value:e,className:t,...n}){return m("div",{className:Ss("w-full p-2 z-10","bg-[#1d1d1d] border border-white border-opacity-10 rounded",t?.toString()),...n},m("input",{className:Ss("px-2 py-1 w-full rounded focus:outline focus:outline-primary","bg-[#212121] border border-white border-opacity-10 rounded"),placeholder:"Filter...",type:"text","bind:value":e}))}let $;"window"in globalThis&&window.opener&&($=window.opener.__kiru);const je=ht(!1);Qe.addEventListener(e=>{e.data.type==="set-inspect-enabled"&&(je.value=e.data.value)});const rl=($?.apps??[]).filter(e=>!Pn(e)),ie=ht(rl);ht(null);const Lt=ht(rl[0]??null),se=ht(null);$?.on("mount",e=>{Pn(e)||(ie.value=[...ie.peek(),e],Lt.peek()===null&&(Lt.value=e))});$?.on("unmount",e=>{ie.value=ie.peek().filter(t=>t!==e),Lt.peek()===e&&(Lt.value=ie.peek()[0]??null)});const Ts=ht(new Map),Rt=ht(null),no=ht("");function ph(e){return e.type.displayName??(e.type.name||"Anonymous Function")}function gh(e,t){const n=t.toLowerCase();return e.every(i=>n.includes(i))}function Ms(e){return typeof e.type=="function"&&!Cu(e)&&!Ou(e)&&!Pu(e)}function mh(e){let t=[e];for(;t.length;){const n=t.pop();if(Ms(n))return!0;n.child&&t.push(n.child),n.sibling&&t.push(n.sibling)}return!1}const bh=(e,t)=>{const n=[t.parent];for(;n.length;){const i=n.pop();if(e===i)return!0;i?.parent&&n.push(i.parent)}return!1};function Es(e,t){if(!e)return null;const n=t(e),i=Es(e.sibling,t),s=Es(e.child,t);return n?{ref:e,sibling:i??null,child:s??null}:i||s||null}function xi({node:e,traverseSiblings:t=!0}){const[n,i]=de(!0),o=se.value===e,r=bi(()=>crypto.randomUUID(),[]),a=bi(()=>Rt.value==null?null:bh(e,Rt.value),[Rt.value,e]);ut(()=>{a&&i(!1)},[a]),ut(()=>{if(!(!e||!Ms(e)))return Ts.peek().set(r,{vNode:e,setCollapsed:i}),()=>{Ts.peek().delete(r)}});const l=no.value;if(!e)return null;if(!Ms(e)||l.length>0&&!gh(l.toLowerCase().split(" "),e.type.name))return m(kt,null,e.child&&m(xi,{node:e.child}),t&&m(Xo,{node:e}));const c=e.child&&mh(e.child);return m(kt,null,m("div",{className:"pl-4 mb-1"},m("h2",{onclick:()=>{Rt.value=null,se.value=o?null:e},className:\`flex gap-2 items-center cursor-pointer mb-1 scroll-m-12 \${o?"font-medium bg-primary selected-vnode":""}\`,"data-id":r},c&&m(ae,{className:\`cursor-pointer transition \${n?"":"rotate-90"}\`,onclick:u=>{u.preventDefault(),u.stopImmediatePropagation(),Rt.value=null,i(f=>!f)}}),m("div",{className:c?"":"ml-6"},m("span",{className:o?"":"text-neutral-400"},"<"),m("span",{className:o?"":"text-primary"},ph(e)),m("span",{className:o?"":"text-neutral-400"},">"))),!n&&e.child||a!=null&&a&&e.child?m(xi,{node:e.child}):null),t&&m(Xo,{node:e}))}function Xo({node:e}){if(!e)return null;let t=[],n=e.sibling;for(;n;)t.push(n),n=n.sibling;return m(kt,null,t.map(i=>m(xi,{node:i,traverseSiblings:!1})))}const yh=()=>{const e=Ze(null),t=r=>{if(!r)return null;const a=r.getAttribute("data-id");if(a!=null)return Ts.peek().get(a)},n=r=>{if(!r)return;const a=t(r);a!=null&&(r.scrollIntoView({behavior:"smooth"}),se.value=a.vNode)},i=r=>{if(!r||r===document.body)return null;const a=r.parentElement,l=a?.nextElementSibling?.querySelector("h2[data-id]");return l||i(a)},s=()=>{const r=document.querySelector("h2[data-id]");n(r)},o=()=>{const r=document.querySelectorAll("h2[data-id]"),a=r.item(r.length-1);a&&n(a)};return Yo(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],r=>{if(Rt.value&&(Rt.value=null),document.activeElement&&document.activeElement instanceof HTMLInputElement&&document.activeElement!=e.current)return;r.preventDefault();const a=document.querySelector(".selected-vnode");if(a===null){r.key==="ArrowDown"?s():r.key==="ArrowUp"&&o();return}if(r.key==="ArrowRight"){const l=t(a);l&&l.setCollapsed(!1);return}else if(r.key==="ArrowLeft"){const l=t(a);l&&l.setCollapsed(!0);return}if(r.key==="ArrowDown"){const l=a?.nextElementSibling?.querySelector("h2[data-id]");if(l)return n(l);const c=a.parentElement?.nextElementSibling?.querySelector("h2[data-id]");if(c)return n(c);const u=i(a);return u?n(u):s()}else if(r.key==="ArrowUp"){const l=a.parentElement?.previousElementSibling;if(l?.matches("h2[data-id]"))return n(l);const c=l?.querySelectorAll("h2[data-id]");return c?.length!=null&&c?.length>=1?n(c?.item?.(c.length-1)):o()}}),Yo("l",r=>{r.ctrlKey&&(r.preventDefault(),e.current?.focus({preventScroll:!1}))}),{searchRef:e}},xh=e=>{no.value=e.target.value,Rt.value&&(Rt.value=null)};function vh(){const{searchRef:e}=yh(),t=Lt.value;return m("div",{className:"flex-grow p-2 sticky top-0"},m("div",{className:"flex gap-4 pb-2 border-b-2 border-neutral-800 mb-2 items-center"},m("input",{ref:e,className:"bg-[#171616] px-1 py-2 w-full focus:outline focus:outline-primary",placeholder:"Search for component",type:"text",value:no,oninput:xh})),t?.rootNode&&m(xi,{node:t.rootNode}))}const _h=e=>{const{mouse:t}=ch(),n=J(null),i=J(0),s=J(0),o=Ze(null),r=fh(o),a=Ze(null),[l,c]=Array.isArray(e.children)?e.children:[];return Zs(()=>{a.current&&(s.value=a.current.clientWidth/2)},[a.current]),Ce("mouseup",We(()=>n.value=null,[])),Ce("mousemove",We(u=>{if(n.value==null||a.current==null)return;const f=Math.max(i.value+u.x-n.value.x,250);s.value=Math.min(f,a.current.clientWidth-250)},[])),Ce("resize",We(()=>{a.current!=null&&a.current.clientWidth-250<s.value&&(s.value=Math.max(a.current.clientWidth-250,250))},[])),m("div",{onmousemove:u=>{u.x},ref:a,className:"flex-grow grid gap-2 items-start w-full relative",style:{gridTemplateColumns:\`\${s}px 1fr\`}},m("div",{ref:o,className:"firstContainer w-full h-full"},l),r.width.value!=0&&m("div",{className:"w-8 flex justify-center h-full absolute top-0 -translate-x-1/2 cursor-col-resize z-[9999]",style:{left:\`\${r.width}px\`},onmousedown:u=>{u.preventDefault(),n.value={...t.value},i.value=s.value}},m("div",{className:"dividerLine w-[5px] bg-neutral-800 h-full"})),m("div",{className:"secondContainer h-full"},c))},wh=()=>m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-square-mouse-pointer"},m("path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z"}),m("path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6"})),Sh=()=>{je.value=!je.value,Qe.send({type:"set-inspect-enabled",value:je.value})};function kh(){const e=Lt.value,t=se.value,n=fe();return ut(()=>{const i=s=>{s===e&&n()};return $?.on("update",i),()=>$?.off("update",i)},[Lt]),ut(()=>{const i=s=>{if(s.data.type!=="select-node")return;if(!window.__devtoolsSelection){console.error("no selection ptr");return}const{app:o,node:r}=window.__devtoolsSelection;window.__devtoolsSelection=null,Lt.value=o,se.value=r,Rt.value=r,je.value=!1};return Qe.addEventListener(i),()=>Qe.removeEventListener(i)},[Lt]),m(kt,null,m("div",{className:"flex items-center justify-between gap-4 p-2 bg-neutral-400 bg-opacity-5 border border-white border-opacity-10 rounded"},m("div",{className:"flex items-center gap-4"},m("select",{className:"px-2 py-1 bg-neutral-800 text-neutral-100 rounded border border-white border-opacity-10",value:e?.name??"",onchange:i=>Lt.value=ie.peek().find(s=>s.name===i.currentTarget.value)??null},m("option",{value:"",disabled:!0},"Select App"),ie.value.map(i=>m("option",{key:i.id,value:i.name},i.name))),m("button",{title:"Toggle Component Inspection",onclick:Sh,className:\`p-1 rounded \${je.value?"bg-neutral-900":""}\`},m(wh,null)))),m(_h,null,e&&m(vh,null),t&&e&&m(oh,{selectedApp:e,selectedNode:t,setSelectedNode:i=>se.value=i,kiruGlobal:$})))}const Cs=ht({}),ke=ht([]);$?.stores?.subscribe(e=>{Cs.value=e,ke.value=ke.value.filter(t=>Object.values(Cs.value).includes(t))});const al=ht(""),Th=Ga(()=>al.value.toLowerCase().split(" ").filter(e=>e.length>0));function Mh(e){return Th.value.every(t=>e.toLowerCase().includes(t))}function Eh(){const e=Object.entries(Cs.value);return e.length===0?m("div",{className:"flex flex-col items-center justify-center h-full text-neutral-400"},m(Qa,null),m("h2",{className:"text-lg italic"},"No stores detected")):m("div",{className:"flex flex-col gap-2 items-start"},m(ol,{value:al,className:"sticky top-0"}),m("div",{className:"flex flex-col gap-2 w-full"},e.filter(([t])=>Mh(t)).map(([t,n])=>m(Ch,{key:t,name:t,store:n}))))}function Ch({name:e,store:t}){const n=ke.value.includes(t),i=fe(),{value:s}=ll(t);Zs(()=>{const r=t.subscribe(()=>i());return()=>r()},[]);const o=We(()=>{n?ke.value=ke.value.filter(r=>r!==t):ke.value=[...ke.value,t]},[n]);return m("div",{className:"flex flex-col"},m("button",{onclick:o,className:"flex items-center gap-2 justify-between p-2 border border-white border-opacity-10 cursor-pointer"+(n?" bg-white bg-opacity-5 text-neutral-100 rounded-t":" hover:bg-white hover:bg-opacity-10 text-neutral-400 rounded")},e,m("div",{className:"flex gap-2"},m(eo,{fn:t,onclick:r=>r.stopPropagation()}),m(ae,{className:"transition-all"+(n?" rotate-90":"")}))),n&&m("div",{className:"flex flex-col gap-2 p-2 border border-white border-opacity-10"},m(Ie,{data:{value:s},mutable:!0,objectRefAcc:[],onChange:(r,a)=>{const l=structuredClone({value:s});Qs(l,r,a),t.setState(l.value)}}),m(Oh,{store:t})))}function Oh({store:e}){const t=ie.value;return t.length===0?null:m(kt,null,t.map(n=>m(Ph,{store:e,app:n})))}const qo=Symbol.for("kiru.hmrAccept"),ll=e=>{if(qo in e)return e[qo].provide().current;throw new Error("Unable to get store subscribers")};function Ph({store:e,app:t}){const n=fe(),{subscribers:i,nodeStateMap:s}=ll(e),o=t.rootNode.child;if(ut(()=>{const a=l=>{l===t&&n()};return $?.on("update",a),()=>$?.off("update",a)},[]),!o)return null;const r=Es(o,a=>i.has(a));return m("div",{className:"flex flex-col gap-2 p-2 rounded-b border border-white border-opacity-10"},m("b",null,t.name),r&&m("ul",{className:"pl-8"},m(Os,{node:r,nodeStateMap:s})))}function Os({node:e,nodeStateMap:t}){const[n,i]=de(!1),o=t.get(e.ref)?.slices??[];return m(kt,null,m("li",{className:"flex flex-col gap-2"},m("div",{className:"flex flex-col border border-white border-opacity-10 rounded"+(n?" bg-white bg-opacity-5 text-neutral-100":" hover:bg-white hover:bg-opacity-10 text-neutral-400")},m("button",{onclick:()=>i(!n),className:"flex gap-2 p-2 justify-between cursor-pointer"},m("span",null,"<"+Ka(e.ref)+" />"),m("div",{className:"flex gap-2 items-center"},m(eo,{fn:e.ref.type,onclick:r=>r.stopPropagation()}),m(ae,{className:"transition-all"+(n?" rotate-90":"")}))),n&&m("div",{className:"flex flex-col gap-2 p-2 bg-[#1a1a1a]"},o.length===0&&m("div",{className:"p-2 bg-black bg-opacity-30 text-sm"},m("h5",{className:"border-b border-white border-opacity-10"},"No slices")),o.map(r=>m("div",{className:"flex flex-col gap-2"},m("div",{className:"p-2 bg-black bg-opacity-30 text-sm"},m("h5",{className:"border-b border-white border-opacity-10"},"Slice:"),m("pre",{className:"text-neutral-400"},m(Ie,{data:{value:r.value},mutable:!1,objectRefAcc:[],onChange:()=>{}}))),m("div",{className:"p-2 bg-black bg-opacity-30 text-sm"},m("h5",{className:"border-b border-white border-opacity-10"},"SliceFn:"),m("pre",{className:"text-neutral-400"},r.sliceFn?r.sliceFn.toString():"null")),r.eq&&m("div",{className:"p-2 bg-black bg-opacity-30 text-sm"},m("h5",{className:"border-b border-white border-opacity-10"},"eq:"),m("pre",{className:"text-neutral-400"},r.eq.toString())))))),e.child&&m("ul",{className:"pl-8 flex flex-col gap-2"},m(Os,{node:e.child,nodeStateMap:t}))),e.sibling&&m(Os,{node:e.sibling,nodeStateMap:t}))}/*!
|
|
3546
|
-
* @kurkle/color v0.3.4
|
|
3547
|
-
* https://github.com/kurkle/color#readme
|
|
3548
|
-
* (c) 2024 Jukka Kurkela
|
|
3549
|
-
* Released under the MIT License
|
|
3550
|
-
*/function Nn(e){return e+.5|0}const te=(e,t,n)=>Math.max(Math.min(e,n),t);function vn(e){return te(Nn(e*2.55),0,255)}function oe(e){return te(Nn(e*255),0,255)}function $t(e){return te(Nn(e/2.55)/100,0,1)}function Go(e){return te(Nn(e*100),0,100)}const bt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ps=[..."0123456789ABCDEF"],Dh=e=>Ps[e&15],Ah=e=>Ps[(e&240)>>4]+Ps[e&15],Gn=e=>(e&240)>>4===(e&15),Ih=e=>Gn(e.r)&&Gn(e.g)&&Gn(e.b)&&Gn(e.a);function Lh(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&bt[e[1]]*17,g:255&bt[e[2]]*17,b:255&bt[e[3]]*17,a:t===5?bt[e[4]]*17:255}:(t===7||t===9)&&(n={r:bt[e[1]]<<4|bt[e[2]],g:bt[e[3]]<<4|bt[e[4]],b:bt[e[5]]<<4|bt[e[6]],a:t===9?bt[e[7]]<<4|bt[e[8]]:255})),n}const Rh=(e,t)=>e<255?t(e):"";function Nh(e){var t=Ih(e)?Dh:Ah;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Rh(e.a,t):void 0}const zh=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function cl(e,t,n){const i=t*Math.min(n,1-n),s=(o,r=(o+e/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function Fh(e,t,n){const i=(s,o=(s+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function Hh(e,t,n){const i=cl(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)i[s]*=1-t-n,i[s]+=t;return i}function Bh(e,t,n,i,s){return e===s?(t-n)/i+(t<n?6:0):t===s?(n-e)/i+2:(e-t)/i+4}function io(e){const n=e.r/255,i=e.g/255,s=e.b/255,o=Math.max(n,i,s),r=Math.min(n,i,s),a=(o+r)/2;let l,c,u;return o!==r&&(u=o-r,c=a>.5?u/(2-o-r):u/(o+r),l=Bh(n,i,s,u,o),l=l*60+.5),[l|0,c||0,a]}function so(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(oe)}function oo(e,t,n){return so(cl,e,t,n)}function Vh(e,t,n){return so(Hh,e,t,n)}function Wh(e,t,n){return so(Fh,e,t,n)}function ul(e){return(e%360+360)%360}function jh(e){const t=zh.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?vn(+t[5]):oe(+t[5]));const s=ul(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?i=Vh(s,o,r):t[1]==="hsv"?i=Wh(s,o,r):i=oo(s,o,r),{r:i[0],g:i[1],b:i[2],a:n}}function Uh(e,t){var n=io(e);n[0]=ul(n[0]+t),n=oo(n),e.r=n[0],e.g=n[1],e.b=n[2]}function $h(e){if(!e)return;const t=io(e),n=t[0],i=Go(t[1]),s=Go(t[2]);return e.a<255?\`hsla(\${n}, \${i}%, \${s}%, \${$t(e.a)})\`:\`hsl(\${n}, \${i}%, \${s}%)\`}const Ko={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Zo={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Yh(){const e={},t=Object.keys(Zo),n=Object.keys(Ko);let i,s,o,r,a;for(i=0;i<t.length;i++){for(r=a=t[i],s=0;s<n.length;s++)o=n[s],a=a.replace(o,Ko[o]);o=parseInt(Zo[r],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let Kn;function Xh(e){Kn||(Kn=Yh(),Kn.transparent=[0,0,0,0]);const t=Kn[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const qh=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Gh(e){const t=qh.exec(e);let n=255,i,s,o;if(t){if(t[7]!==i){const r=+t[7];n=t[8]?vn(r):te(r*255,0,255)}return i=+t[1],s=+t[3],o=+t[5],i=255&(t[2]?vn(i):te(i,0,255)),s=255&(t[4]?vn(s):te(s,0,255)),o=255&(t[6]?vn(o):te(o,0,255)),{r:i,g:s,b:o,a:n}}}function Kh(e){return e&&(e.a<255?\`rgba(\${e.r}, \${e.g}, \${e.b}, \${$t(e.a)})\`:\`rgb(\${e.r}, \${e.g}, \${e.b})\`)}const Ki=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,He=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Zh(e,t,n){const i=He($t(e.r)),s=He($t(e.g)),o=He($t(e.b));return{r:oe(Ki(i+n*(He($t(t.r))-i))),g:oe(Ki(s+n*(He($t(t.g))-s))),b:oe(Ki(o+n*(He($t(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Zn(e,t,n){if(e){let i=io(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=oo(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function hl(e,t){return e&&Object.assign(t||{},e)}function Qo(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=oe(e[3]))):(t=hl(e,{r:0,g:0,b:0,a:1}),t.a=oe(t.a)),t}function Qh(e){return e.charAt(0)==="r"?Gh(e):jh(e)}class Dn{constructor(t){if(t instanceof Dn)return t;const n=typeof t;let i;n==="object"?i=Qo(t):n==="string"&&(i=Lh(t)||Xh(t)||Qh(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=hl(this._rgb);return t&&(t.a=$t(t.a)),t}set rgb(t){this._rgb=Qo(t)}rgbString(){return this._valid?Kh(this._rgb):void 0}hexString(){return this._valid?Nh(this._rgb):void 0}hslString(){return this._valid?$h(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,s=t.rgb;let o;const r=n===o?.5:n,a=2*r-1,l=i.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,i.r=255&c*i.r+o*s.r+.5,i.g=255&c*i.g+o*s.g+.5,i.b=255&c*i.b+o*s.b+.5,i.a=r*i.a+(1-r)*s.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=Zh(this._rgb,t._rgb,n)),this}clone(){return new Dn(this.rgb)}alpha(t){return this._rgb.a=oe(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Nn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Zn(this._rgb,2,t),this}darken(t){return Zn(this._rgb,2,-t),this}saturate(t){return Zn(this._rgb,1,t),this}desaturate(t){return Zn(this._rgb,1,-t),this}rotate(t){return Uh(this._rgb,t),this}}/*!
|
|
3551
|
-
* Chart.js v4.5.0
|
|
3552
|
-
* https://www.chartjs.org
|
|
3553
|
-
* (c) 2025 Chart.js Contributors
|
|
3554
|
-
* Released under the MIT License
|
|
3555
|
-
*/function Wt(){}const Jh=(()=>{let e=0;return()=>e++})();function V(e){return e==null}function Q(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function B(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function xt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Pt(e,t){return xt(e)?e:t}function R(e,t){return typeof e>"u"?t:e}const tf=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function I(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function z(e,t,n,i){let s,o,r;if(Q(e))for(o=e.length,s=0;s<o;s++)t.call(n,e[s],s);else if(B(e))for(r=Object.keys(e),o=r.length,s=0;s<o;s++)t.call(n,e[r[s]],r[s])}function vi(e,t){let n,i,s,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(s=e[n],o=t[n],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function _i(e){if(Q(e))return e.map(_i);if(B(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let s=0;for(;s<i;++s)t[n[s]]=_i(e[n[s]]);return t}return e}function fl(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function ef(e,t,n,i){if(!fl(e))return;const s=t[e],o=n[e];B(s)&&B(o)?An(s,o,i):t[e]=_i(o)}function An(e,t,n){const i=Q(t)?t:[t],s=i.length;if(!B(e))return e;n=n||{};const o=n.merger||ef;let r;for(let a=0;a<s;++a){if(r=i[a],!B(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)o(l[c],e,r,n)}return e}function kn(e,t){return An(e,t,{merger:nf})}function nf(e,t,n){if(!fl(e))return;const i=t[e],s=n[e];B(i)&&B(s)?kn(i,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=_i(s))}const Jo={"":e=>e,x:e=>e.x,y:e=>e.y};function sf(e){const t=e.split("."),n=[];let i="";for(const s of t)i+=s,i.endsWith("\\\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function of(e){const t=sf(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function wi(e,t){return(Jo[t]||(Jo[t]=of(t)))(e)}function ro(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Si=e=>typeof e<"u",le=e=>typeof e=="function",tr=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function rf(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const tt=Math.PI,zt=2*tt,af=zt+tt,ki=Number.POSITIVE_INFINITY,lf=tt/180,wt=tt/2,ve=tt/4,er=tt*2/3,dl=Math.log10,ce=Math.sign;function Oe(e,t,n){return Math.abs(e-t)<n}function nr(e){const t=Math.round(e);e=Oe(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(dl(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function cf(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((s,o)=>s-o).pop(),t}function uf(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function In(e){return!uf(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function hf(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function ff(e,t,n){let i,s,o;for(i=0,s=e.length;i<s;i++)o=e[i][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Me(e){return e*(tt/180)}function df(e){return e*(180/tt)}function ir(e){if(!xt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function pf(e,t){const n=t.x-e.x,i=t.y-e.y,s=Math.sqrt(n*n+i*i);let o=Math.atan2(i,n);return o<-.5*tt&&(o+=zt),{angle:o,distance:s}}function Ds(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function gf(e,t){return(e-t+af)%zt-tt}function Qt(e){return(e%zt+zt)%zt}function pl(e,t,n,i){const s=Qt(e),o=Qt(t),r=Qt(n),a=Qt(o-s),l=Qt(r-s),c=Qt(s-o),u=Qt(s-r);return s===o||s===r||i&&o===r||a>l&&c<u}function yt(e,t,n){return Math.max(t,Math.min(n,e))}function mf(e){return yt(e,-32768,32767)}function _n(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function ao(e,t,n){n=n||(r=>e[r]<t);let i=e.length-1,s=0,o;for(;i-s>1;)o=s+i>>1,n(o)?s=o:i=o;return{lo:s,hi:i}}const Ee=(e,t,n,i)=>ao(e,n,i?s=>{const o=e[s][t];return o<n||o===n&&e[s+1][t]===n}:s=>e[s][t]<n),bf=(e,t,n)=>ao(e,n,i=>e[i][t]>=n);function yf(e,t,n){let i=0,s=e.length;for(;i<s&&e[i]<t;)i++;for(;s>i&&e[s-1]>n;)s--;return i>0||s<e.length?e.slice(i,s):e}const gl=["push","pop","shift","splice","unshift"];function xf(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),gl.forEach(n=>{const i="_onData"+ro(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...o)}),r}})})}function sr(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(gl.forEach(o=>{delete e[o]}),delete e._chartjs)}function vf(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const ml=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function bl(e,t){let n=[],i=!1;return function(...s){n=s,i||(i=!0,ml.call(window,()=>{i=!1,e.apply(t,n)}))}}function _f(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const yl=e=>e==="start"?"left":e==="end"?"right":"center",ft=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,wf=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function Sf(e,t,n){const i=t.length;let s=0,o=i;if(e._sorted){const{iScale:r,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=r.axis,{min:f,max:p,minDefined:g,maxDefined:x}=r.getUserBounds();if(g){if(s=Math.min(Ee(l,u,f).lo,n?i:Ee(t,u,r.getPixelForValue(f)).lo),c){const y=l.slice(0,s+1).reverse().findIndex(v=>!V(v[a.axis]));s-=Math.max(0,y)}s=yt(s,0,i-1)}if(x){let y=Math.max(Ee(l,r.axis,p,!0).hi+1,n?0:Ee(t,u,r.getPixelForValue(p),!0).hi+1);if(c){const v=l.slice(y-1).findIndex(w=>!V(w[a.axis]));y+=Math.max(0,v)}o=yt(y,s,i)-s}else o=i-s}return{start:s,count:o}}function kf(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,s={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=s,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),o}const Qn=e=>e===0||e===1,or=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*zt/n)),rr=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*zt/n)+1,Tn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*wt)+1,easeOutSine:e=>Math.sin(e*wt),easeInOutSine:e=>-.5*(Math.cos(tt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Qn(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Qn(e)?e:or(e,.075,.3),easeOutElastic:e=>Qn(e)?e:rr(e,.075,.3),easeInOutElastic(e){return Qn(e)?e:e<.5?.5*or(e*2,.1125,.45):.5+.5*rr(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Tn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Tn.easeInBounce(e*2)*.5:Tn.easeOutBounce(e*2-1)*.5+.5};function lo(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ar(e){return lo(e)?e:new Dn(e)}function Zi(e){return lo(e)?e:new Dn(e).saturate(.5).darken(.1).hexString()}const Tf=["x","y","borderWidth","radius","tension"],Mf=["color","borderColor","backgroundColor"];function Ef(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Mf},numbers:{type:"number",properties:Tf}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Cf(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const lr=new Map;function Of(e,t){t=t||{};const n=e+JSON.stringify(t);let i=lr.get(n);return i||(i=new Intl.NumberFormat(e,t),lr.set(n,i)),i}function xl(e,t,n){return Of(t,n).format(e)}const Pf={values(e){return Q(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let s,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=Df(e,n)}const r=dl(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),xl(e,i,l)}};function Df(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var vl={formatters:Pf};function Af(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:vl.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ae=Object.create(null),As=Object.create(null);function Mn(e,t){if(!t)return e;const n=t.split(".");for(let i=0,s=n.length;i<s;++i){const o=n[i];e=e[o]||(e[o]=Object.create(null))}return e}function Qi(e,t,n){return typeof t=="string"?An(Mn(e,t),n):An(Mn(e,""),t)}class If{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>Zi(s.backgroundColor),this.hoverBorderColor=(i,s)=>Zi(s.borderColor),this.hoverColor=(i,s)=>Zi(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Qi(this,t,n)}get(t){return Mn(this,t)}describe(t,n){return Qi(As,t,n)}override(t,n){return Qi(Ae,t,n)}route(t,n,i,s){const o=Mn(this,t),r=Mn(this,i),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=r[s];return B(l)?Object.assign({},c,l):R(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var Y=new If({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Ef,Cf,Af]);function Lf(e){return!e||V(e.size)||V(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function cr(e,t,n,i,s){let o=t[s];return o||(o=t[s]=e.measureText(s).width,n.push(s)),o>i&&(i=o),i}function _e(e,t,n){const i=e.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((t-s)*i)/i+s}function ur(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Is(e,t,n,i){_l(e,t,n,i,null)}function _l(e,t,n,i,s){let o,r,a,l,c,u,f,p;const g=t.pointStyle,x=t.rotation,y=t.radius;let v=(x||0)*lf;if(g&&typeof g=="object"&&(o=g.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(v),e.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),e.restore();return}if(!(isNaN(y)||y<=0)){switch(e.beginPath(),g){default:s?e.ellipse(n,i,s/2,y,0,0,zt):e.arc(n,i,y,0,zt),e.closePath();break;case"triangle":u=s?s/2:y,e.moveTo(n+Math.sin(v)*u,i-Math.cos(v)*y),v+=er,e.lineTo(n+Math.sin(v)*u,i-Math.cos(v)*y),v+=er,e.lineTo(n+Math.sin(v)*u,i-Math.cos(v)*y),e.closePath();break;case"rectRounded":c=y*.516,l=y-c,r=Math.cos(v+ve)*l,f=Math.cos(v+ve)*(s?s/2-c:l),a=Math.sin(v+ve)*l,p=Math.sin(v+ve)*(s?s/2-c:l),e.arc(n-f,i-a,c,v-tt,v-wt),e.arc(n+p,i-r,c,v-wt,v),e.arc(n+f,i+a,c,v,v+wt),e.arc(n-p,i+r,c,v+wt,v+tt),e.closePath();break;case"rect":if(!x){l=Math.SQRT1_2*y,u=s?s/2:l,e.rect(n-u,i-l,2*u,2*l);break}v+=ve;case"rectRot":f=Math.cos(v)*(s?s/2:y),r=Math.cos(v)*y,a=Math.sin(v)*y,p=Math.sin(v)*(s?s/2:y),e.moveTo(n-f,i-a),e.lineTo(n+p,i-r),e.lineTo(n+f,i+a),e.lineTo(n-p,i+r),e.closePath();break;case"crossRot":v+=ve;case"cross":f=Math.cos(v)*(s?s/2:y),r=Math.cos(v)*y,a=Math.sin(v)*y,p=Math.sin(v)*(s?s/2:y),e.moveTo(n-f,i-a),e.lineTo(n+f,i+a),e.moveTo(n+p,i-r),e.lineTo(n-p,i+r);break;case"star":f=Math.cos(v)*(s?s/2:y),r=Math.cos(v)*y,a=Math.sin(v)*y,p=Math.sin(v)*(s?s/2:y),e.moveTo(n-f,i-a),e.lineTo(n+f,i+a),e.moveTo(n+p,i-r),e.lineTo(n-p,i+r),v+=ve,f=Math.cos(v)*(s?s/2:y),r=Math.cos(v)*y,a=Math.sin(v)*y,p=Math.sin(v)*(s?s/2:y),e.moveTo(n-f,i-a),e.lineTo(n+f,i+a),e.moveTo(n+p,i-r),e.lineTo(n-p,i+r);break;case"line":r=s?s/2:Math.cos(v)*y,a=Math.sin(v)*y,e.moveTo(n-r,i-a),e.lineTo(n+r,i+a);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(v)*(s?s/2:y),i+Math.sin(v)*y);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Je(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function co(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function uo(e){e.restore()}function Rf(e,t,n,i,s){if(!t)return e.lineTo(n.x,n.y);if(s==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else s==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Nf(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function zf(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),V(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Ff(e,t,n,i,s){if(s.strikethrough||s.underline){const o=e.measureText(i),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=s.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(r,u),e.lineTo(a,u),e.stroke()}}function Hf(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ti(e,t,n,i,s,o={}){const r=Q(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=s.string,zf(e,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&Hf(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),V(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,i,o.maxWidth)),e.fillText(c,n,i,o.maxWidth),Ff(e,n,i,c,o),i+=Number(s.lineHeight);e.restore()}function Ls(e,t){const{x:n,y:i,w:s,h:o,radius:r}=t;e.arc(n+r.topLeft,i+r.topLeft,r.topLeft,1.5*tt,tt,!0),e.lineTo(n,i+o-r.bottomLeft),e.arc(n+r.bottomLeft,i+o-r.bottomLeft,r.bottomLeft,tt,wt,!0),e.lineTo(n+s-r.bottomRight,i+o),e.arc(n+s-r.bottomRight,i+o-r.bottomRight,r.bottomRight,wt,0,!0),e.lineTo(n+s,i+r.topRight),e.arc(n+s-r.topRight,i+r.topRight,r.topRight,0,-wt,!0),e.lineTo(n+r.topLeft,i)}const Bf=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,Vf=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Wf(e,t){const n=(""+e).match(Bf);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const jf=e=>+e||0;function wl(e,t){const n={},i=B(t),s=i?Object.keys(t):t,o=B(e)?i?r=>R(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of s)n[r]=jf(o(r));return n}function Uf(e){return wl(e,{top:"y",right:"x",bottom:"y",left:"x"})}function En(e){return wl(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Mt(e){const t=Uf(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ct(e,t){e=e||{},t=t||Y.font;let n=R(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=R(e.style,t.style);i&&!(""+i).match(Vf)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:R(e.family,t.family),lineHeight:Wf(R(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:R(e.weight,t.weight),string:""};return s.string=Lf(s),s}function Jn(e,t,n,i){let s,o,r;for(s=0,o=e.length;s<o;++s)if(r=e[s],r!==void 0&&r!==void 0)return r}function $f(e,t,n){const{min:i,max:s}=e,o=tf(t,(s-i)/2),r=(a,l)=>n&&a===0?0:a+l;return{min:r(i,-Math.abs(o)),max:r(s,o)}}function Le(e,t){return Object.assign(Object.create(e),t)}function ho(e,t=[""],n,i,s=()=>e[0]){const o=n||e;typeof i>"u"&&(i=Ml("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:i,_getTarget:s,override:a=>ho([a,...e],t,o,i)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return kl(a,l,()=>Jf(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return fr(a).includes(l)},ownKeys(a){return fr(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function tn(e,t,n,i){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Sl(e,i),setContext:o=>tn(e,o,n,i),override:o=>tn(e.override(o),t,n,i)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete e[r],!0},get(o,r,a){return kl(o,r,()=>Xf(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(o,r,a){return e[r]=a,delete o[r],!0}})}function Sl(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:i,isScriptable:le(n)?n:()=>n,isIndexable:le(i)?i:()=>i}}const Yf=(e,t)=>e?e+ro(t):t,fo=(e,t)=>B(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function kl(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const i=n();return e[t]=i,i}function Xf(e,t,n){const{_proxy:i,_context:s,_subProxy:o,_descriptors:r}=e;let a=i[t];return le(a)&&r.isScriptable(t)&&(a=qf(t,a,e,n)),Q(a)&&a.length&&(a=Gf(t,a,e,r.isIndexable)),fo(t,a)&&(a=tn(a,s,o&&o[t],r)),a}function qf(e,t,n,i){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,r||i);return a.delete(e),fo(e,l)&&(l=po(s._scopes,s,e,l)),l}function Gf(e,t,n,i){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=n;if(typeof o.index<"u"&&i(e))return t[o.index%t.length];if(B(t[0])){const l=t,c=s._scopes.filter(u=>u!==l);t=[];for(const u of l){const f=po(c,s,e,u);t.push(tn(f,o,r&&r[e],a))}}return t}function Tl(e,t,n){return le(e)?e(t,n):e}const Kf=(e,t)=>e===!0?t:typeof e=="string"?wi(t,e):void 0;function Zf(e,t,n,i,s){for(const o of t){const r=Kf(n,o);if(r){e.add(r);const a=Tl(r._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(r===!1&&typeof i<"u"&&n!==i)return null}return!1}function po(e,t,n,i){const s=t._rootScopes,o=Tl(t._fallback,n,i),r=[...e,...s],a=new Set;a.add(i);let l=hr(a,r,n,o||n,i);return l===null||typeof o<"u"&&o!==n&&(l=hr(a,r,o,l,i),l===null)?!1:ho(Array.from(a),[""],s,o,()=>Qf(t,n,i))}function hr(e,t,n,i,s){for(;n;)n=Zf(e,t,n,i,s);return n}function Qf(e,t,n){const i=e._getTarget();t in i||(i[t]={});const s=i[t];return Q(s)&&B(n)?n:s||{}}function Jf(e,t,n,i){let s;for(const o of t)if(s=Ml(Yf(o,e),n),typeof s<"u")return fo(e,s)?po(n,i,e,s):s}function Ml(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function fr(e){let t=e._keys;return t||(t=e._keys=td(e._scopes)),t}function td(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}const ed=Number.EPSILON||1e-14,en=(e,t)=>t<e.length&&!e[t].skip&&e[t],El=e=>e==="x"?"y":"x";function nd(e,t,n,i){const s=e.skip?t:e,o=t,r=n.skip?t:n,a=Ds(o,s),l=Ds(r,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=i*c,p=i*u;return{previous:{x:o.x-f*(r.x-s.x),y:o.y-f*(r.y-s.y)},next:{x:o.x+p*(r.x-s.x),y:o.y+p*(r.y-s.y)}}}function id(e,t,n){const i=e.length;let s,o,r,a,l,c=en(e,0);for(let u=0;u<i-1;++u)if(l=c,c=en(e,u+1),!(!l||!c)){if(Oe(t[u],0,ed)){n[u]=n[u+1]=0;continue}s=n[u]/t[u],o=n[u+1]/t[u],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),n[u]=s*r*t[u],n[u+1]=o*r*t[u])}}function sd(e,t,n="x"){const i=El(n),s=e.length;let o,r,a,l=en(e,0);for(let c=0;c<s;++c){if(r=a,a=l,l=en(e,c+1),!a)continue;const u=a[n],f=a[i];r&&(o=(u-r[n])/3,a[\`cp1\${n}\`]=u-o,a[\`cp1\${i}\`]=f-o*t[c]),l&&(o=(l[n]-u)/3,a[\`cp2\${n}\`]=u+o,a[\`cp2\${i}\`]=f+o*t[c])}}function od(e,t="x"){const n=El(t),i=e.length,s=Array(i).fill(0),o=Array(i);let r,a,l,c=en(e,0);for(r=0;r<i;++r)if(a=l,l=c,c=en(e,r+1),!!l){if(c){const u=c[t]-l[t];s[r]=u!==0?(c[n]-l[n])/u:0}o[r]=a?c?ce(s[r-1])!==ce(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}id(e,s,o),sd(e,o,t)}function ti(e,t,n){return Math.max(Math.min(e,n),t)}function rd(e,t){let n,i,s,o,r,a=Je(e[0],t);for(n=0,i=e.length;n<i;++n)r=o,o=a,a=n<i-1&&Je(e[n+1],t),o&&(s=e[n],r&&(s.cp1x=ti(s.cp1x,t.left,t.right),s.cp1y=ti(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=ti(s.cp2x,t.left,t.right),s.cp2y=ti(s.cp2y,t.top,t.bottom)))}function ad(e,t,n,i,s){let o,r,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")od(e,s);else{let c=i?e[e.length-1]:e[0];for(o=0,r=e.length;o<r;++o)a=e[o],l=nd(c,a,e[Math.min(o+1,r-(i?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&rd(e,n)}function go(){return typeof window<"u"&&typeof document<"u"}function mo(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Mi(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const Ri=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function ld(e,t){return Ri(e).getPropertyValue(t)}const cd=["top","right","bottom","left"];function Pe(e,t,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const o=cd[s];i[o]=parseFloat(e[t+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const ud=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function hd(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:s,offsetY:o}=i;let r=!1,a,l;if(ud(s,o,e.target))a=s,l=o;else{const c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function It(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,s=Ri(n),o=s.boxSizing==="border-box",r=Pe(s,"padding"),a=Pe(s,"border","width"),{x:l,y:c,box:u}=hd(e,n),f=r.left+(u&&a.left),p=r.top+(u&&a.top);let{width:g,height:x}=t;return o&&(g-=r.width+a.width,x-=r.height+a.height),{x:Math.round((l-f)/g*n.width/i),y:Math.round((c-p)/x*n.height/i)}}function fd(e,t,n){let i,s;if(t===void 0||n===void 0){const o=e&&mo(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const r=o.getBoundingClientRect(),a=Ri(o),l=Pe(a,"border","width"),c=Pe(a,"padding");t=r.width-c.width-l.width,n=r.height-c.height-l.height,i=Mi(a.maxWidth,o,"clientWidth"),s=Mi(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:i||ki,maxHeight:s||ki}}const ei=e=>Math.round(e*10)/10;function dd(e,t,n,i){const s=Ri(e),o=Pe(s,"margin"),r=Mi(s.maxWidth,e,"clientWidth")||ki,a=Mi(s.maxHeight,e,"clientHeight")||ki,l=fd(e,t,n);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const p=Pe(s,"border","width"),g=Pe(s,"padding");c-=g.width+p.width,u-=g.height+p.height}return c=Math.max(0,c-o.width),u=Math.max(0,i?c/i:u-o.height),c=ei(Math.min(c,r,l.maxWidth)),u=ei(Math.min(u,a,l.maxHeight)),c&&!u&&(u=ei(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=ei(Math.floor(u*i))),{width:c,height:u}}function dr(e,t,n){const i=t||1,s=Math.floor(e.height*i),o=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const r=e.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=\`\${e.height}px\`,r.style.width=\`\${e.width}px\`),e.currentDevicePixelRatio!==i||r.height!==s||r.width!==o?(e.currentDevicePixelRatio=i,r.height=s,r.width=o,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const pd=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};go()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function pr(e,t){const n=ld(e,t),i=n&&n.match(/^(\\d+)(\\.\\d+)?px$/);return i?+i[1]:void 0}function Se(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function gd(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function md(e,t,n,i){const s={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},r=Se(e,s,n),a=Se(s,o,n),l=Se(o,t,n),c=Se(r,a,n),u=Se(a,l,n);return Se(c,u,n)}const bd=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},yd=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Ue(e,t,n){return e?bd(t,n):yd()}function Cl(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Ol(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Pl(e){return e==="angle"?{between:pl,compare:gf,normalize:Qt}:{between:_n,compare:(t,n)=>t-n,normalize:t=>t}}function gr({start:e,end:t,count:n,loop:i,style:s}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:s}}function xd(e,t,n){const{property:i,start:s,end:o}=n,{between:r,normalize:a}=Pl(i),l=t.length;let{start:c,end:u,loop:f}=e,p,g;if(f){for(c+=l,u+=l,p=0,g=l;p<g&&r(a(t[c%l][i]),s,o);++p)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:f,style:e.style}}function vd(e,t,n){if(!n)return[e];const{property:i,start:s,end:o}=n,r=t.length,{compare:a,between:l,normalize:c}=Pl(i),{start:u,end:f,loop:p,style:g}=xd(e,t,n),x=[];let y=!1,v=null,w,k,C;const O=()=>l(s,C,w)&&a(s,C)!==0,T=()=>a(o,w)===0||l(o,C,w),D=()=>y||O(),P=()=>!y||T();for(let E=u,A=u;E<=f;++E)k=t[E%r],!k.skip&&(w=c(k[i]),w!==C&&(y=l(w,s,o),v===null&&D()&&(v=a(w,s)===0?E:A),v!==null&&P()&&(x.push(gr({start:v,end:E,loop:p,count:r,style:g})),v=null),A=E,C=w));return v!==null&&x.push(gr({start:v,end:f,loop:p,count:r,style:g})),x}function _d(e,t){const n=[],i=e.segments;for(let s=0;s<i.length;s++){const o=vd(i[s],e.points,t);o.length&&n.push(...o)}return n}function wd(e,t,n,i){let s=0,o=t-1;if(n&&!i)for(;s<t&&!e[s].skip;)s++;for(;s<t&&e[s].skip;)s++;for(s%=t,n&&(o+=s);o>s&&e[o%t].skip;)o--;return o%=t,{start:s,end:o}}function Sd(e,t,n,i){const s=e.length,o=[];let r=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%s];c.skip||c.stop?a.skip||(i=!1,o.push({start:t%s,end:(l-1)%s,loop:i}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%s,end:r%s,loop:i}),o}function kd(e,t){const n=e.points,i=e.options.spanGaps,s=n.length;if(!s)return[];const o=!!e._loop,{start:r,end:a}=wd(n,s,o,i);if(i===!0)return mr(e,[{start:r,end:a,loop:o}],n,t);const l=a<r?a+s:a,c=!!e._fullLoop&&r===0&&a===s-1;return mr(e,Sd(n,r,l,c),n,t)}function mr(e,t,n,i){return!i||!i.setContext||!n?t:Td(e,t,n,i)}function Td(e,t,n,i){const s=e._chart.getContext(),o=br(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=n.length,c=[];let u=o,f=t[0].start,p=f;function g(x,y,v,w){const k=a?-1:1;if(x!==y){for(x+=l;n[x%l].skip;)x-=k;for(;n[y%l].skip;)y+=k;x%l!==y%l&&(c.push({start:x%l,end:y%l,loop:v,style:w}),u=w,f=y%l)}}for(const x of t){f=a?f:x.start;let y=n[f%l],v;for(p=f+1;p<=x.end;p++){const w=n[p%l];v=br(i.setContext(Le(s,{type:"segment",p0:y,p1:w,p0DataIndex:(p-1)%l,p1DataIndex:p%l,datasetIndex:r}))),Md(v,u)&&g(f,p-1,x.loop,u),y=w,u=v}f<p-1&&g(f,p-1,x.loop,u)}return c}function br(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Md(e,t){if(!t)return!1;const n=[],i=function(s,o){return lo(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,i)!==JSON.stringify(t,i)}function ni(e,t,n){return e.options.clip?e[n]:t[n]}function Ed(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:ni(n,t,"left"),right:ni(n,t,"right"),top:ni(i,t,"top"),bottom:ni(i,t,"bottom")}:t}function Cd(e,t){const n=t._clip;if(n.disabled)return!1;const i=Ed(t,e.chartArea);return{left:n.left===!1?0:i.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:i.right+(n.right===!0?0:n.right),top:n.top===!1?0:i.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:i.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
3556
|
-
* Chart.js v4.5.0
|
|
3557
|
-
* https://www.chartjs.org
|
|
3558
|
-
* (c) 2025 Chart.js Contributors
|
|
3559
|
-
* Released under the MIT License
|
|
3560
|
-
*/class Od{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,s){const o=n.listeners[s],r=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(i-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=ml.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const o=i.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,i,t,"progress")),o.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var jt=new Od;const yr="transparent",Pd={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=ar(e||yr),s=i.valid&&ar(t||yr);return s&&s.valid?s.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Dd{constructor(t,n,i,s){const o=n[i];s=Jn([t.to,s,o,t.from]);const r=Jn([t.from,o,s]);this._active=!0,this._fn=t.fn||Pd[t.type||typeof r],this._easing=Tn[t.easing]||Tn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],o=i-this._start,r=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Jn([t.to,n,s,t.from]),this._from=Jn([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||n<i),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=o;return}l=n/i%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][n]()}}class Dl{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!B(t))return;const n=Object.keys(Y.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!B(o))return;const r={};for(const a of n)r[a]=o[a];(Q(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,r)})})}_animateOptions(t,n){const i=n.options,s=Id(t,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&Ad(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,n){const i=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(n),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,n));continue}const u=n[c];let f=o[c];const p=i.get(c);if(f)if(p&&f.active()){f.update(p,u,a);continue}else f.cancel();if(!p||!p.duration){t[c]=u;continue}o[c]=f=new Dd(p,t,c,u),s.push(f)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return jt.add(this._chart,i),!0}}function Ad(e,t){const n=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const o=e[i[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function Id(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function xr(e,t){const n=e&&e.options||{},i=n.reverse,s=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:i?o:s,end:i?s:o}}function Ld(e,t,n){if(n===!1)return!1;const i=xr(e,n),s=xr(t,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function Rd(e){let t,n,i,s;return B(e)?(t=e.top,n=e.right,i=e.bottom,s=e.left):t=n=i=s=e,{top:t,right:n,bottom:i,left:s,disabled:e===!1}}function Al(e,t){const n=[],i=e._getSortedDatasetMetas(t);let s,o;for(s=0,o=i.length;s<o;++s)n.push(i[s].index);return n}function vr(e,t,n,i={}){const s=e.keys,o=i.mode==="single";let r,a,l,c;if(t===null)return;let u=!1;for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===n){if(u=!0,i.all)continue;break}c=e.values[l],xt(c)&&(o||t===0||ce(t)===ce(c))&&(t+=c)}return!u&&!i.all?0:t}function Nd(e,t){const{iScale:n,vScale:i}=t,s=n.axis==="x"?"x":"y",o=i.axis==="x"?"x":"y",r=Object.keys(e),a=new Array(r.length);let l,c,u;for(l=0,c=r.length;l<c;++l)u=r[l],a[l]={[s]:u,[o]:e[u]};return a}function Ji(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function zd(e,t,n){return\`\${e.id}.\${t.id}.\${n.stack||n.type}\`}function Fd(e){const{min:t,max:n,minDefined:i,maxDefined:s}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function Hd(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function _r(e,t,n,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const o=e[s.index];if(n&&o>0||!n&&o<0)return s.index}return null}function wr(e,t){const{chart:n,_cachedMeta:i}=e,s=n._stacks||(n._stacks={}),{iScale:o,vScale:r,index:a}=i,l=o.axis,c=r.axis,u=zd(o,r,i),f=t.length;let p;for(let g=0;g<f;++g){const x=t[g],{[l]:y,[c]:v}=x,w=x._stacks||(x._stacks={});p=w[c]=Hd(s,u,y),p[a]=v,p._top=_r(p,r,!0,i.type),p._bottom=_r(p,r,!1,i.type);const k=p._visualValues||(p._visualValues={});k[a]=v}}function ts(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function Bd(e,t){return Le(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Vd(e,t,n){return Le(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function pn(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const s of t){const o=s._stacks;if(!o||o[i]===void 0||o[i][n]===void 0)return;delete o[i][n],o[i]._visualValues!==void 0&&o[i]._visualValues[n]!==void 0&&delete o[i]._visualValues[n]}}}const es=e=>e==="reset"||e==="none",Sr=(e,t)=>t?e:Object.assign({},e),Wd=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Al(n,!0),values:null};class Il{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ji(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&pn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(f,p,g,x)=>f==="x"?p:f==="r"?x:g,o=n.xAxisID=R(i.xAxisID,ts(t,"x")),r=n.yAxisID=R(i.yAxisID,ts(t,"y")),a=n.rAxisID=R(i.rAxisID,ts(t,"r")),l=n.indexAxis,c=n.iAxisID=s(l,o,r,a),u=n.vAxisID=s(l,r,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&sr(this._data,this),t._stacked&&pn(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(B(n)){const s=this._cachedMeta;this._data=Nd(n,s)}else if(i!==n){if(i){sr(i,this);const s=this._cachedMeta;pn(s),s._parsed=[]}n&&Object.isExtensible(n)&&xf(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const o=n._stacked;n._stacked=Ji(n.vScale,n),n.stack!==i.stack&&(s=!0,pn(n),n.stack=i.stack),this._resyncElements(t),(s||o!==n._stacked)&&(wr(this,n._parsed),n._stacked=Ji(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:s}=this,{iScale:o,_stacked:r}=i,a=o.axis;let l=t===0&&n===s.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,f,p;if(this._parsing===!1)i._parsed=s,i._sorted=!0,p=s;else{Q(s[t])?p=this.parseArrayData(i,s,t,n):B(s[t])?p=this.parseObjectData(i,s,t,n):p=this.parsePrimitiveData(i,s,t,n);const g=()=>f[a]===null||c&&f[a]<c[a];for(u=0;u<n;++u)i._parsed[u+t]=f=p[u],l&&(g()&&(l=!1),c=f);i._sorted=l}r&&wr(this,p)}parsePrimitiveData(t,n,i,s){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),u=o===r,f=new Array(s);let p,g,x;for(p=0,g=s;p<g;++p)x=p+i,f[p]={[a]:u||o.parse(c[x],x),[l]:r.parse(n[x],x)};return f}parseArrayData(t,n,i,s){const{xScale:o,yScale:r}=t,a=new Array(s);let l,c,u,f;for(l=0,c=s;l<c;++l)u=l+i,f=n[u],a[l]={x:o.parse(f[0],u),y:r.parse(f[1],u)};return a}parseObjectData(t,n,i,s){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let u,f,p,g;for(u=0,f=s;u<f;++u)p=u+i,g=n[p],c[u]={x:o.parse(wi(g,a),p),y:r.parse(wi(g,l),p)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const s=this.chart,o=this._cachedMeta,r=n[t.axis],a={keys:Al(s,!0),values:n._stacks[t.axis]._visualValues};return vr(a,r,o.index,{mode:i})}updateRangeFromParsed(t,n,i,s){const o=i[n.axis];let r=o===null?NaN:o;const a=s&&i._stacks[n.axis];s&&a&&(s.values=a,r=vr(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){const i=this._cachedMeta,s=i._parsed,o=i._sorted&&t===i.iScale,r=s.length,a=this._getOtherScale(t),l=Wd(n,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Fd(a);let p,g;function x(){g=s[p];const y=g[a.axis];return!xt(g[t.axis])||u>y||f<y}for(p=0;p<r&&!(!x()&&(this.updateRangeFromParsed(c,t,g,l),o));++p);if(o){for(p=r-1;p>=0;--p)if(!x()){this.updateRangeFromParsed(c,t,g,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let s,o,r;for(s=0,o=n.length;s<o;++s)r=n[s][t.axis],xt(r)&&i.push(r);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,s=n.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Rd(R(this.options.clip,Ld(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,s=i.data||[],o=n.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,o,a,l),u=a;u<a+l;++u){const f=s[u];f.hidden||(f.active&&c?r.push(f):f.draw(t,o))}for(u=0;u<r.length;++u)r[u].draw(t,o)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=Vd(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Bd(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const s=n==="active",o=this._cachedDataOpts,r=t+"-"+n,a=o[r],l=this.enableOptionSharing&&Si(i);if(a)return Sr(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),f=s?[\`\${t}Hover\`,"hover",t,""]:[t,""],p=c.getOptionScopes(this.getDataset(),u),g=Object.keys(Y.elements[t]),x=()=>this.getContext(i,s,n),y=c.resolveNamedOptions(p,g,x,f);return y.$shared&&(y.$shared=l,o[r]=Object.freeze(Sr(y,l))),y}_resolveAnimations(t,n,i){const s=this.chart,o=this._cachedDataOpts,r=\`animation-\${n}\`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),p=u.getOptionScopes(this.getDataset(),f);l=u.createResolver(p,this.getContext(t,i,n))}const c=new Dl(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||es(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),s=this._sharedOptions,o=this.getSharedOptions(i),r=this.includeOptions(n,o)||o!==s;return this.updateSharedOptions(o,n,i),{sharedOptions:o,includeOptions:r}}updateElement(t,n,i,s){es(s)?Object.assign(t,i):this._resolveAnimations(n,s).update(t,i)}updateSharedOptions(t,n,i){t&&!es(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,s){t.active=s;const o=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=i.length,o=n.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,n,i=!0){const s=this._cachedMeta,o=s.data,r=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=r;a--)c[a]=c[a-n]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,n),i&&this.updateElements(o,t,n,"reset")}updateElements(t,n,i,s){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,n);i._stacked&&pn(i,s)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,s]=t;this[n](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class jd extends Il{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:s=[],_dataset:o}=n,r=this.chart._animationsDisabled;let{start:a,count:l}=Sf(n,s,r);this._drawStart=a,this._drawCount=l,kf(n)&&(a=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,n,i,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,s),p=r.axis,g=a.axis,{spanGaps:x,segment:y}=this.options,v=In(x)?x:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||o||s==="none",k=n+i,C=t.length;let O=n>0&&this.getParsed(n-1);for(let T=0;T<C;++T){const D=t[T],P=w?D:{};if(T<n||T>=k){P.skip=!0;continue}const E=this.getParsed(T),A=V(E[g]),F=P[p]=r.getPixelForValue(E[p],T),L=P[g]=o||A?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,E,l):E[g],T);P.skip=isNaN(F)||isNaN(L)||A,P.stop=T>0&&Math.abs(E[p]-O[p])>v,y&&(P.parsed=E,P.raw=c.data[T]),f&&(P.options=u||this.resolveDataElementOptions(T,D.active?"active":s)),w||this.updateElement(D,T,P,s),O=E}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function we(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class bo{static override(t){Object.assign(bo.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return we()}parse(){return we()}format(){return we()}add(){return we()}diff(){return we()}startOf(){return we()}endOf(){return we()}}var Ud={_date:bo};function $d(e,t,n,i){const{controller:s,data:o,_sorted:r}=e,a=s._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?bf:Ee;if(i){if(s._sharedOptions){const u=o[0],f=typeof u.getRange=="function"&&u.getRange(t);if(f){const p=c(o,t,n-f),g=c(o,t,n+f);return{lo:p.lo,hi:g.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:f}=s._cachedMeta,{_parsed:p}=e,g=p.slice(0,u.lo+1).reverse().findIndex(y=>!V(y[f.axis]));u.lo-=Math.max(0,g);const x=p.slice(u.hi).findIndex(y=>!V(y[f.axis]));u.hi+=Math.max(0,x)}return u}}return{lo:0,hi:o.length-1}}function Ni(e,t,n,i,s){const o=e.getSortedVisibleDatasetMetas(),r=n[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:f,hi:p}=$d(o[a],t,r,s);for(let g=f;g<=p;++g){const x=u[g];x.skip||i(x,c,g)}}}function Yd(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,s){const o=t?Math.abs(i.x-s.x):0,r=n?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function ns(e,t,n,i,s){const o=[];return!s&&!e.isPointInArea(t)||Ni(e,n,t,function(a,l,c){!s&&!Je(a,e.chartArea,0)||a.inRange(t.x,t.y,i)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Xd(e,t,n,i){let s=[];function o(r,a,l){const{startAngle:c,endAngle:u}=r.getProps(["startAngle","endAngle"],i),{angle:f}=pf(r,{x:t.x,y:t.y});pl(f,c,u)&&s.push({element:r,datasetIndex:a,index:l})}return Ni(e,n,t,o),s}function qd(e,t,n,i,s,o){let r=[];const a=Yd(n);let l=Number.POSITIVE_INFINITY;function c(u,f,p){const g=u.inRange(t.x,t.y,s);if(i&&!g)return;const x=u.getCenterPoint(s);if(!(!!o||e.isPointInArea(x))&&!g)return;const v=a(t,x);v<l?(r=[{element:u,datasetIndex:f,index:p}],l=v):v===l&&r.push({element:u,datasetIndex:f,index:p})}return Ni(e,n,t,c),r}function is(e,t,n,i,s,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!i?Xd(e,t,n,s):qd(e,t,n,i,s,o)}function kr(e,t,n,i,s){const o=[],r=n==="x"?"inXRange":"inYRange";let a=!1;return Ni(e,n,t,(l,c,u)=>{l[r]&&l[r](t[n],s)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,s))}),i&&!a?[]:o}var Gd={modes:{index(e,t,n,i){const s=It(t,e),o=n.axis||"x",r=n.includeInvisible||!1,a=n.intersect?ns(e,s,o,i,r):is(e,s,o,!1,i,r),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,f=c.data[u];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,i){const s=It(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;let a=n.intersect?ns(e,s,o,i,r):is(e,s,o,!1,i,r);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,i){const s=It(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;return ns(e,s,o,i,r)},nearest(e,t,n,i){const s=It(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;return is(e,s,o,n.intersect,i,r)},x(e,t,n,i){const s=It(t,e);return kr(e,s,"x",n.intersect,i)},y(e,t,n,i){const s=It(t,e);return kr(e,s,"y",n.intersect,i)}}};const Ll=["left","top","right","bottom"];function gn(e,t){return e.filter(n=>n.pos===t)}function Tr(e,t){return e.filter(n=>Ll.indexOf(n.pos)===-1&&n.box.axis===t)}function mn(e,t){return e.sort((n,i)=>{const s=t?i:n,o=t?n:i;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Kd(e){const t=[];let n,i,s,o,r,a;for(n=0,i=(e||[]).length;n<i;++n)s=e[n],{position:o,options:{stack:r,stackWeight:a=1}}=s,t.push({index:n,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return t}function Zd(e){const t={};for(const n of e){const{stack:i,pos:s,stackWeight:o}=n;if(!i||!Ll.includes(s))continue;const r=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function Qd(e,t){const n=Zd(e),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let o,r,a;for(o=0,r=e.length;o<r;++o){a=e[o];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*i:l&&t.availableWidth,a.height=s):(a.width=i,a.height=u?u*s:l&&t.availableHeight)}return n}function Jd(e){const t=Kd(e),n=mn(t.filter(c=>c.box.fullSize),!0),i=mn(gn(t,"left"),!0),s=mn(gn(t,"right")),o=mn(gn(t,"top"),!0),r=mn(gn(t,"bottom")),a=Tr(t,"x"),l=Tr(t,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:gn(t,"chartArea"),vertical:i.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function Mr(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function Rl(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function tp(e,t,n,i){const{pos:s,box:o}=n,r=e.maxPadding;if(!B(s)){n.size&&(e[s]-=n.size);const f=i[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?o.height:o.width),n.size=f.size/f.count,e[s]+=n.size}o.getPadding&&Rl(r,o.getPadding());const a=Math.max(0,t.outerWidth-Mr(r,e,"left","right")),l=Math.max(0,t.outerHeight-Mr(r,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function ep(e){const t=e.maxPadding;function n(i){const s=Math.max(t[i]-e[i],0);return e[i]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function np(e,t){const n=t.maxPadding;function i(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],n[r])}),o}return i(e?["left","right"]:["top","bottom"])}function wn(e,t,n,i){const s=[];let o,r,a,l,c,u;for(o=0,r=e.length,c=0;o<r;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,np(a.horizontal,t));const{same:f,other:p}=tp(t,n,a,i);c|=f&&s.length,u=u||p,l.fullSize||s.push(a)}return c&&wn(s,t,n,i)||u}function ii(e,t,n,i,s){e.top=n,e.left=t,e.right=t+i,e.bottom=n+s,e.width=i,e.height=s}function Er(e,t,n,i){const s=n.padding;let{x:o,y:r}=t;for(const a of e){const l=a.box,c=i[a.stack]||{placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const f=t.w*u,p=c.size||l.height;Si(c.start)&&(r=c.start),l.fullSize?ii(l,s.left,r,n.outerWidth-s.right-s.left,p):ii(l,t.left+c.placed,r,f,p),c.start=r,c.placed+=f,r=l.bottom}else{const f=t.h*u,p=c.size||l.width;Si(c.start)&&(o=c.start),l.fullSize?ii(l,o,s.top,p,n.outerHeight-s.bottom-s.top):ii(l,o,t.top+c.placed,p,f),c.start=o,c.placed+=f,o=l.right}}t.x=o,t.y=r}var ee={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const s=Mt(e.options.layout.padding),o=Math.max(t-s.width,0),r=Math.max(n-s.height,0),a=Jd(e.boxes),l=a.vertical,c=a.horizontal;z(e.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const u=l.reduce((y,v)=>v.box.options&&v.box.options.display===!1?y:y+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),p=Object.assign({},s);Rl(p,Mt(i));const g=Object.assign({maxPadding:p,w:o,h:r,x:s.left,y:s.top},s),x=Qd(l.concat(c),f);wn(a.fullSize,g,f,x),wn(l,g,f,x),wn(c,g,f,x)&&wn(l,g,f,x),ep(g),Er(a.leftAndTop,g,f,x),g.x+=g.w,g.y+=g.h,Er(a.rightAndBottom,g,f,x),e.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},z(a.chartArea,y=>{const v=y.box;Object.assign(v,e.chartArea),v.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class Nl{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,s){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(t){return!0}updateConfig(t){}}class ip extends Nl{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fi="$chartjs",sp={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cr=e=>e===null||e==="";function op(e,t){const n=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[fi]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Cr(s)){const o=pr(e,"width");o!==void 0&&(e.width=o)}if(Cr(i))if(e.style.height==="")e.height=e.width/(t||2);else{const o=pr(e,"height");o!==void 0&&(e.height=o)}return e}const zl=pd?{passive:!0}:!1;function rp(e,t,n){e&&e.addEventListener(t,n,zl)}function ap(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,zl)}function lp(e,t){const n=sp[e.type]||e.type,{x:i,y:s}=It(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Ei(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function cp(e,t,n){const i=e.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ei(a.addedNodes,i),r=r&&!Ei(a.removedNodes,i);r&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function up(e,t,n){const i=e.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ei(a.removedNodes,i),r=r&&!Ei(a.addedNodes,i);r&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Ln=new Map;let Or=0;function Fl(){const e=window.devicePixelRatio;e!==Or&&(Or=e,Ln.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function hp(e,t){Ln.size||window.addEventListener("resize",Fl),Ln.set(e,t)}function fp(e){Ln.delete(e),Ln.size||window.removeEventListener("resize",Fl)}function dp(e,t,n){const i=e.canvas,s=i&&mo(i);if(!s)return;const o=bl((a,l)=>{const c=s.clientWidth;n(a,l),c<s.clientWidth&&n()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return r.observe(s),hp(e,o),r}function ss(e,t,n){n&&n.disconnect(),t==="resize"&&fp(e)}function pp(e,t,n){const i=e.canvas,s=bl(o=>{e.ctx!==null&&n(lp(o,e))},e);return rp(i,t,s),s}class gp extends Nl{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(op(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[fi])return!1;const i=n[fi].initial;["height","width"].forEach(o=>{const r=i[o];V(r)?n.removeAttribute(o):n.setAttribute(o,r)});const s=i.style||{};return Object.keys(s).forEach(o=>{n.style[o]=s[o]}),n.width=n.width,delete n[fi],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),r={attach:cp,detach:up,resize:dp}[n]||pp;s[n]=r(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),s=i[n];if(!s)return;({attach:ss,detach:ss,resize:ss}[n]||ap)(t,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,s){return dd(t,n,i,s)}isAttached(t){const n=t&&mo(t);return!!(n&&n.isConnected)}}function mp(e){return!go()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?ip:gp}class sn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return In(this.x)&&In(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const s={};return t.forEach(o=>{s[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),s}}function bp(e,t){const n=e.options.ticks,i=yp(e),s=Math.min(n.maxTicksLimit||i,i),o=n.major.enabled?vp(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return _p(t,c,o,r/s),c;const u=xp(o,t,s);if(r>0){let f,p;const g=r>1?Math.round((l-a)/(r-1)):null;for(si(t,c,u,V(g)?0:a-g,a),f=0,p=r-1;f<p;f++)si(t,c,u,o[f],o[f+1]);return si(t,c,u,l,V(g)?t.length:l+g),c}return si(t,c,u),c}function yp(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(i,s))}function xp(e,t,n){const i=wp(e),s=t.length/n;if(!i)return Math.max(s,1);const o=cf(i);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>s)return l}return Math.max(s,1)}function vp(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function _p(e,t,n,i){let s=0,o=n[0],r;for(i=Math.ceil(i),r=0;r<e.length;r++)r===o&&(t.push(e[r]),s++,o=n[s*i])}function si(e,t,n,i,s){const o=R(i,0),r=Math.min(R(s,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),s&&(l=s-i,n=l/Math.floor(l/n)),u=o;u<0;)a++,u=Math.round(o+a*n);for(c=Math.max(o,0);c<r;c++)c===u&&(t.push(e[c]),a++,u=Math.round(o+a*n))}function wp(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const Sp=e=>e==="left"?"right":e==="right"?"left":e,Pr=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Dr=(e,t)=>Math.min(t||e,e);function Ar(e,t){const n=[],i=e.length/t,s=e.length;let o=0;for(;o<s;o+=i)n.push(e[Math.floor(o)]);return n}function kp(e,t,n){const i=e.ticks.length,s=Math.min(t,i-1),o=e._startPixel,r=e._endPixel,a=1e-6;let l=e.getPixelForTick(s),c;if(!(n&&(i===1?c=Math.max(l-o,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-a||l>r+a)))return l}function Tp(e,t){z(e,n=>{const i=n.gc,s=i.length/2;let o;if(s>t){for(o=0;o<s;++o)delete n.data[i[o]];i.splice(0,s)}})}function bn(e){return e.drawTicks?e.tickLength:0}function Ir(e,t){if(!e.display)return 0;const n=ct(e.font,t),i=Mt(e.padding);return(Q(e.text)?e.text.length:1)*n.lineHeight+i.height}function Mp(e,t){return Le(e,{scale:t,type:"scale"})}function Ep(e,t,n){return Le(e,{tick:n,index:t,type:"tick"})}function Cp(e,t,n){let i=yl(e);return(n&&t!=="right"||!n&&t==="right")&&(i=Sp(i)),i}function Op(e,t,n,i){const{top:s,left:o,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let f=0,p,g,x;const y=r-s,v=a-o;if(e.isHorizontal()){if(g=ft(i,o,a),B(n)){const w=Object.keys(n)[0],k=n[w];x=u[w].getPixelForValue(k)+y-t}else n==="center"?x=(c.bottom+c.top)/2+y-t:x=Pr(e,n,t);p=a-o}else{if(B(n)){const w=Object.keys(n)[0],k=n[w];g=u[w].getPixelForValue(k)-v+t}else n==="center"?g=(c.left+c.right)/2-v+t:g=Pr(e,n,t);x=ft(i,r,s),f=n==="left"?-wt:wt}return{titleX:g,titleY:x,maxWidth:p,rotation:f}}class on extends sn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:s}=this;return t=Pt(t,Number.POSITIVE_INFINITY),n=Pt(n,Number.NEGATIVE_INFINITY),i=Pt(i,Number.POSITIVE_INFINITY),s=Pt(s,Number.NEGATIVE_INFINITY),{min:Pt(t,i),max:Pt(n,s),minDefined:xt(t),maxDefined:xt(n)}}getMinMax(t){let{min:n,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:n,max:i};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),s||(n=Math.min(n,r.min)),o||(i=Math.max(i,r.max));return n=o&&n>i?i:n,i=s&&n>i?n:i,{min:Pt(n,Pt(i,n)),max:Pt(i,Pt(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=$f(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Ar(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=bp(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){I(this.options.afterUpdate,[this])}beforeSetDimensions(){I(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){I(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),I(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){I(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,s,o;for(i=0,s=t.length;i<s;i++)o=t[i],o.label=I(n.callback,[o.value,i,t],this)}afterTickToLabelConversion(){I(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){I(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=Dr(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,o=n.maxRotation;let r=s,a,l,c;if(!this._isVisible()||!n.display||s>=o||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),f=u.widest.width,p=u.highest.height,g=yt(this.chart.width-f,0,this.maxWidth);a=t.offset?this.maxWidth/i:g/(i-1),f+6>a&&(a=g/(i-(t.offset?.5:1)),l=this.maxHeight-bn(t.grid)-n.padding-Ir(t.title,this.chart.options.font),c=Math.sqrt(f*f+p*p),r=df(Math.min(Math.asin(yt((u.highest.height+6)/a,-1,1)),Math.asin(yt(l/c,-1,1))-Math.asin(yt(p/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=Ir(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=bn(o)+l):(t.height=this.maxHeight,t.width=bn(o)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:p}=this._getLabelSizes(),g=i.padding*2,x=Me(this.labelRotation),y=Math.cos(x),v=Math.sin(x);if(a){const w=i.mirror?0:v*f.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+w+g)}else{const w=i.mirror?0:y*f.width+v*p.height;t.width=Math.min(this.maxWidth,t.width+w+g)}this._calculatePadding(c,u,v,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,s){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,g=0;l?c?(p=s*t.width,g=i*n.height):(p=i*t.height,g=s*n.width):o==="start"?g=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,g=n.width/2),this.paddingLeft=Math.max((p-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((g-f+r)*this.width/(this.width-f),0)}else{let u=n.height/2,f=t.height/2;o==="start"?(u=0,f=t.height):o==="end"&&(u=n.height,f=0),this.paddingTop=u+r,this.paddingBottom=f+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){I(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)V(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=Ar(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(n/Dr(n,i));let c=0,u=0,f,p,g,x,y,v,w,k,C,O,T;for(f=0;f<n;f+=l){if(x=t[f].label,y=this._resolveTickFontOptions(f),s.font=v=y.string,w=o[v]=o[v]||{data:{},gc:[]},k=y.lineHeight,C=O=0,!V(x)&&!Q(x))C=cr(s,w.data,w.gc,C,x),O=k;else if(Q(x))for(p=0,g=x.length;p<g;++p)T=x[p],!V(T)&&!Q(T)&&(C=cr(s,w.data,w.gc,C,T),O+=k);r.push(C),a.push(O),c=Math.max(C,c),u=Math.max(O,u)}Tp(o,n);const D=r.indexOf(c),P=a.indexOf(u),E=A=>({width:r[A]||0,height:a[A]||0});return{first:E(0),last:E(n-1),widest:E(D),highest:E(P),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return mf(this._alignToPixels?_e(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=Ep(this.getContext(),t,i))}return this.$context||(this.$context=Mp(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Me(this.labelRotation),i=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*i>a*s?a/i:l/s:l*s<a*i?l/i:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),f=this.ticks.length+(l?1:0),p=bn(o),g=[],x=a.setContext(this.getContext()),y=x.display?x.width:0,v=y/2,w=function(q){return _e(i,q,y)};let k,C,O,T,D,P,E,A,F,L,H,K;if(r==="top")k=w(this.bottom),P=this.bottom-p,A=k-v,L=w(t.top)+v,K=t.bottom;else if(r==="bottom")k=w(this.top),L=t.top,K=w(t.bottom)-v,P=k+v,A=this.top+p;else if(r==="left")k=w(this.right),D=this.right-p,E=k-v,F=w(t.left)+v,H=t.right;else if(r==="right")k=w(this.left),F=t.left,H=w(t.right)-v,D=k+v,E=this.left+p;else if(n==="x"){if(r==="center")k=w((t.top+t.bottom)/2+.5);else if(B(r)){const q=Object.keys(r)[0],nt=r[q];k=w(this.chart.scales[q].getPixelForValue(nt))}L=t.top,K=t.bottom,P=k+v,A=P+p}else if(n==="y"){if(r==="center")k=w((t.left+t.right)/2);else if(B(r)){const q=Object.keys(r)[0],nt=r[q];k=w(this.chart.scales[q].getPixelForValue(nt))}D=k-v,E=D-p,F=t.left,H=t.right}const et=R(s.ticks.maxTicksLimit,f),j=Math.max(1,Math.ceil(f/et));for(C=0;C<f;C+=j){const q=this.getContext(C),nt=o.setContext(q),Ne=a.setContext(q),pe=nt.lineWidth,qt=nt.color,ze=Ne.dash||[],dt=Ne.dashOffset,ge=nt.tickWidth,vt=nt.tickColor,me=nt.tickBorderDash||[],Ht=nt.tickBorderDashOffset;O=kp(this,C,l),O!==void 0&&(T=_e(i,O,pe),c?D=E=F=H=T:P=A=L=K=T,g.push({tx1:D,ty1:P,tx2:E,ty2:A,x1:F,y1:L,x2:H,y2:K,width:pe,color:qt,borderDash:ze,borderDashOffset:dt,tickWidth:ge,tickColor:vt,tickBorderDash:me,tickBorderDashOffset:Ht}))}return this._ticksLength=f,this._borderValue=k,g}_computeLabelItems(t){const n=this.axis,i=this.options,{position:s,ticks:o}=i,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:f}=o,p=bn(i.grid),g=p+u,x=f?-u:g,y=-Me(this.labelRotation),v=[];let w,k,C,O,T,D,P,E,A,F,L,H,K="middle";if(s==="top")D=this.bottom-x,P=this._getXAxisLabelAlignment();else if(s==="bottom")D=this.top+x,P=this._getXAxisLabelAlignment();else if(s==="left"){const j=this._getYAxisLabelAlignment(p);P=j.textAlign,T=j.x}else if(s==="right"){const j=this._getYAxisLabelAlignment(p);P=j.textAlign,T=j.x}else if(n==="x"){if(s==="center")D=(t.top+t.bottom)/2+g;else if(B(s)){const j=Object.keys(s)[0],q=s[j];D=this.chart.scales[j].getPixelForValue(q)+g}P=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")T=(t.left+t.right)/2-g;else if(B(s)){const j=Object.keys(s)[0],q=s[j];T=this.chart.scales[j].getPixelForValue(q)}P=this._getYAxisLabelAlignment(p).textAlign}n==="y"&&(l==="start"?K="top":l==="end"&&(K="bottom"));const et=this._getLabelSizes();for(w=0,k=a.length;w<k;++w){C=a[w],O=C.label;const j=o.setContext(this.getContext(w));E=this.getPixelForTick(w)+o.labelOffset,A=this._resolveTickFontOptions(w),F=A.lineHeight,L=Q(O)?O.length:1;const q=L/2,nt=j.color,Ne=j.textStrokeColor,pe=j.textStrokeWidth;let qt=P;r?(T=E,P==="inner"&&(w===k-1?qt=this.options.reverse?"left":"right":w===0?qt=this.options.reverse?"right":"left":qt="center"),s==="top"?c==="near"||y!==0?H=-L*F+F/2:c==="center"?H=-et.highest.height/2-q*F+F:H=-et.highest.height+F/2:c==="near"||y!==0?H=F/2:c==="center"?H=et.highest.height/2-q*F:H=et.highest.height-L*F,f&&(H*=-1),y!==0&&!j.showLabelBackdrop&&(T+=F/2*Math.sin(y))):(D=E,H=(1-L)*F/2);let ze;if(j.showLabelBackdrop){const dt=Mt(j.backdropPadding),ge=et.heights[w],vt=et.widths[w];let me=H-dt.top,Ht=0-dt.left;switch(K){case"middle":me-=ge/2;break;case"bottom":me-=ge;break}switch(P){case"center":Ht-=vt/2;break;case"right":Ht-=vt;break;case"inner":w===k-1?Ht-=vt:w>0&&(Ht-=vt/2);break}ze={left:Ht,top:me,width:vt+dt.width,height:ge+dt.height,color:j.backdropColor}}v.push({label:O,font:A,textOffset:H,options:{rotation:y,color:nt,strokeColor:Ne,strokeWidth:pe,textAlign:qt,textBaseline:K,translation:[T,D],backdrop:ze}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Me(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,u;return n==="left"?s?(u=this.right+o,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+o,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:s,width:o,height:r}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,s,o,r),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(o=0,r=s.length;o<r;++o){const l=s[o];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),r=i.display?o.width:0;if(!r)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,f,p;this.isHorizontal()?(c=_e(t,this.left,r)-r/2,u=_e(t,this.right,a)+a/2,f=p=l):(f=_e(t,this.top,r)-r/2,p=_e(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,p),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&co(i,s);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,u=r.textOffset;Ti(i,c,0,u,l,a)}s&&uo(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:s}}=this;if(!i.display)return;const o=ct(i.font),r=Mt(i.padding),a=i.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||B(n)?(l+=r.bottom,Q(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=r.top;const{titleX:c,titleY:u,maxWidth:f,rotation:p}=Op(this,l,n,a);Ti(t,i.text,0,0,o,{color:i.color,maxWidth:f,rotation:p,textAlign:Cp(a,n,s),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,i=R(t.grid&&t.grid.z,-1),s=R(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==on.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let o,r;for(o=0,r=n.length;o<r;++o){const a=n[o];a[i]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ct(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class oi{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;Ap(n)&&(i=this.register(n));const s=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,Pp(t,r,i),this.override&&Y.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,s=this.scope;i in n&&delete n[i],s&&i in Y[s]&&(delete Y[s][i],this.override&&delete Ae[i])}}function Pp(e,t,n){const i=An(Object.create(null),[n?Y.get(n):{},Y.get(t),e.defaults]);Y.set(t,i),e.defaultRoutes&&Dp(t,e.defaultRoutes),e.descriptors&&Y.describe(t,e.descriptors)}function Dp(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),s=i.pop(),o=[e].concat(i).join("."),r=t[n].split("."),a=r.pop(),l=r.join(".");Y.route(o,s,l,a)})}function Ap(e){return"id"in e&&"defaults"in e}class Ip{constructor(){this.controllers=new oi(Il,"datasets",!0),this.elements=new oi(sn,"elements"),this.plugins=new oi(Object,"plugins"),this.scales=new oi(on,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,i){[...n].forEach(s=>{const o=i||this._getRegistryForType(s);i||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):z(s,r=>{const a=i||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,n,i){const s=ro(t);I(i["before"+s],[],i),n[t](i),I(i["after"+s],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var At=new Ip;class Lp{constructor(){this._init=[]}notify(t,n,i,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(o,t,n,i);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,n,i,s){s=s||{};for(const o of t){const r=o.plugin,a=r[i],l=[n,s,o.options];if(I(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){V(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,s=R(i.options&&i.options.plugins,{}),o=Rp(i);return s===!1&&!n?[]:zp(t,o,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,i),t,"stop"),this._notify(s(i,n),t,"start")}}function Rp(e){const t={},n=[],i=Object.keys(At.plugins.items);for(let o=0;o<i.length;o++)n.push(At.getPlugin(i[o]));const s=e.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function Np(e,t){return!t&&e===!1?null:e===!0?{}:e}function zp(e,{plugins:t,localIds:n},i,s){const o=[],r=e.getContext();for(const a of t){const l=a.id,c=Np(i[l],s);c!==null&&o.push({plugin:a,options:Fp(e.config,{plugin:a,local:n[l]},c,r)})}return o}function Fp(e,{plugin:t,local:n},i,s){const o=e.pluginScopeKeys(t),r=e.getOptionScopes(i,o);return n&&t.defaults&&r.push(t.defaults),e.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Rs(e,t){const n=Y.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Hp(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Bp(e,t){return e===t?"_index_":"_value_"}function Lr(e){if(e==="x"||e==="y"||e==="r")return e}function Vp(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Ns(e,...t){if(Lr(e))return e;for(const n of t){const i=n.axis||Vp(n.position)||e.length>1&&Lr(e[0].toLowerCase());if(i)return i}throw new Error(\`Cannot determine type of '\${e}' axis. Please provide 'axis' or 'position' option.\`)}function Rr(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Wp(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Rr(e,"x",n[0])||Rr(e,"y",n[0])}return{}}function jp(e,t){const n=Ae[e.type]||{scales:{}},i=t.scales||{},s=Rs(e.type,t),o=Object.create(null);return Object.keys(i).forEach(r=>{const a=i[r];if(!B(a))return console.error(\`Invalid scale configuration for scale: \${r}\`);if(a._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${r}\`);const l=Ns(r,a,Wp(r,e),Y.scales[a.type]),c=Bp(l,s),u=n.scales||{};o[r]=kn(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(r=>{const a=r.type||e.type,l=r.indexAxis||Rs(a,t),u=(Ae[a]||{}).scales||{};Object.keys(u).forEach(f=>{const p=Hp(f,l),g=r[p+"AxisID"]||p;o[g]=o[g]||Object.create(null),kn(o[g],[{axis:p},i[g],u[f]])})}),Object.keys(o).forEach(r=>{const a=o[r];kn(a,[Y.scales[a.type],Y.scale])}),o}function Hl(e){const t=e.options||(e.options={});t.plugins=R(t.plugins,{}),t.scales=jp(e,t)}function Bl(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Up(e){return e=e||{},e.data=Bl(e.data),Hl(e),e}const Nr=new Map,Vl=new Set;function ri(e,t){let n=Nr.get(e);return n||(n=t(),Nr.set(e,n),Vl.add(n)),n}const yn=(e,t,n)=>{const i=wi(t,n);i!==void 0&&e.add(i)};class $p{constructor(t){this._config=Up(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Bl(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Hl(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ri(t,()=>[[\`datasets.\${t}\`,""]])}datasetAnimationScopeKeys(t,n){return ri(\`\${t}.transition.\${n}\`,()=>[[\`datasets.\${t}.transitions.\${n}\`,\`transitions.\${n}\`],[\`datasets.\${t}\`,""]])}datasetElementScopeKeys(t,n){return ri(\`\${t}-\${n}\`,()=>[[\`datasets.\${t}.elements.\${n}\`,\`datasets.\${t}\`,\`elements.\${n}\`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return ri(\`\${i}-plugin-\${n}\`,()=>[[\`plugins.\${n}\`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let s=i.get(t);return(!s||n)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,n,i){const{options:s,type:o}=this,r=this._cachedScopes(t,i),a=r.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(f=>yn(l,t,f))),u.forEach(f=>yn(l,s,f)),u.forEach(f=>yn(l,Ae[o]||{},f)),u.forEach(f=>yn(l,Y,f)),u.forEach(f=>yn(l,As,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Vl.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ae[n]||{},Y.datasets[n]||{},{type:n},Y,As]}resolveNamedOptions(t,n,i,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=zr(this._resolverCache,t,s);let l=r;if(Xp(r,n)){o.$shared=!1,i=le(i)?i():i;const c=this.createResolver(t,i,a);l=tn(r,i,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,i=[""],s){const{resolver:o}=zr(this._resolverCache,t,i);return B(n)?tn(o,n,void 0,s):o}}function zr(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const s=n.join();let o=i.get(s);return o||(o={resolver:ho(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,o)),o}const Yp=e=>B(e)&&Object.getOwnPropertyNames(e).some(t=>le(e[t]));function Xp(e,t){const{isScriptable:n,isIndexable:i}=Sl(e);for(const s of t){const o=n(s),r=i(s),a=(r||o)&&e[s];if(o&&(le(a)||Yp(a))||r&&Q(a))return!0}return!1}var qp="4.5.0";const Gp=["top","bottom","left","right","chartArea"];function Fr(e,t){return e==="top"||e==="bottom"||Gp.indexOf(e)===-1&&t==="x"}function Hr(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function Br(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),I(n&&n.onComplete,[e],t)}function Kp(e){const t=e.chart,n=t.options.animation;I(n&&n.onProgress,[e],t)}function Wl(e){return go()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const di={},Vr=e=>{const t=Wl(e);return Object.values(di).filter(n=>n.canvas===t).pop()};function Zp(e,t,n){const i=Object.keys(e);for(const s of i){const o=+s;if(o>=t){const r=e[s];delete e[s],(n>0||o>t)&&(e[o+n]=r)}}}function Qp(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}class zs{static defaults=Y;static instances=di;static overrides=Ae;static registry=At;static version=qp;static getChart=Vr;static register(...t){At.add(...t),Wr()}static unregister(...t){At.remove(...t),Wr()}constructor(t,n){const i=this.config=new $p(n),s=Wl(t),o=Vr(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||mp(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Jh(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Lp,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=_f(f=>this.update(f),r.resizeDelay||0),this._dataChanges=[],di[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}jt.listen(this,"complete",Br),jt.listen(this,"progress",Kp),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:s,_aspectRatio:o}=this;return V(t)?n&&o?o:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return At}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():dr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ur(this.canvas,this.ctx),this}stop(){return jt.stop(this),this}resize(t,n){jt.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,s=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,n,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,dr(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),I(i.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};z(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,s=Object.keys(i).reduce((r,a)=>(r[a]=!1,r),{});let o=[];n&&(o=o.concat(Object.keys(n).map(r=>{const a=n[r],l=Ns(r,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),z(o,r=>{const a=r.options,l=a.id,c=Ns(l,a),u=R(a.type,r.dtype);(a.position===void 0||Fr(a.position,c)!==Fr(r.dposition))&&(a.position=r.dposition),s[l]=!0;let f=null;if(l in i&&i[l].type===u)f=i[l];else{const p=At.getScale(u);f=new p({id:l,type:u,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(a,t)}),z(s,(r,a)=>{r||delete i[a]}),z(i,r=>{ee.configure(this,r,r.options),ee.addBox(this,r)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((s,o)=>s.index-o.index),i>n){for(let s=n;s<i;++s)this._destroyDatasetMeta(s);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(Hr("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,s)=>{n.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i<s;i++){const o=n[i];let r=this.getDatasetMeta(i);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=a,r.indexAxis=o.indexAxis||Rs(a,this.options),r.order=o.order||0,r.index=i,r.label=""+o.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const l=At.getController(a),{datasetElementType:c,dataElementType:u}=Y.datasets[a];Object.assign(l,{dataElementType:At.getElement(u),datasetElementType:c&&At.getElement(c)}),r.controller=new l(this,i),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){z(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),p=!s&&o.indexOf(f)===-1;f.buildOrUpdateElements(p),r=Math.max(+f.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),s||z(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Hr("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){z(this.scales,t=>{ee.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!tr(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:o}of n){const r=i==="_removeElements"?-o:o;Zp(t,s,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=i(0);for(let o=1;o<n;o++)if(!tr(s,i(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ee.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],z(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,le(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(jt.has(this)?this.attached&&!jt.running(this)&&jt.start(this):(this.draw(),Br({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let s,o;for(s=0,o=n.length;s<o;++s){const r=n[s];(!t||r.visible)&&i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i={meta:t,index:t.index,cancelable:!0},s=Cd(this,t);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(s&&co(n,s),t.controller.draw(),s&&uo(n),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return Je(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,s){const o=Gd.modes[n];return typeof o=="function"?o(this,t,i,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let s=i.filter(o=>o&&o._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Le(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const s=i?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);Si(n)?(o.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(o,{visible:i}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),jt.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ur(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete di[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,i=(o,r)=>{n.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};z(this.options.events,o=>i(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():r()}unbindEvents(){z(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},z(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const s=i?"set":"remove";let o,r,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!vi(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const s=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),r=o(n,t),a=i?t:o(t,n);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const o=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(o||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:s=[],options:o}=this,r=n,a=this._getActiveElements(t,s,i,r),l=rf(t),c=Qp(t,this._lastEvent,i,l);i&&(this._lastEvent=null,I(o.onHover,[t,a,this],this),l&&I(o.onClick,[t,a,this],this));const u=!vi(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,s){if(t.type==="mouseout")return[];if(!i)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}function Wr(){return z(zs.instances,e=>e._plugins.invalidate())}function jl(e,t,n=t){e.lineCap=R(n.borderCapStyle,t.borderCapStyle),e.setLineDash(R(n.borderDash,t.borderDash)),e.lineDashOffset=R(n.borderDashOffset,t.borderDashOffset),e.lineJoin=R(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=R(n.borderWidth,t.borderWidth),e.strokeStyle=R(n.borderColor,t.borderColor)}function Jp(e,t,n){e.lineTo(n.x,n.y)}function tg(e){return e.stepped?Rf:e.tension||e.cubicInterpolationMode==="monotone"?Nf:Jp}function Ul(e,t,n={}){const i=e.length,{start:s=0,end:o=i-1}=n,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(o,a),u=s<r&&o<r||s>a&&o>a;return{count:i,start:l,loop:t.loop,ilen:c<l&&!u?i+c-l:c-l}}function eg(e,t,n,i){const{points:s,options:o}=t,{count:r,start:a,loop:l,ilen:c}=Ul(s,n,i),u=tg(o);let{move:f=!0,reverse:p}=i||{},g,x,y;for(g=0;g<=c;++g)x=s[(a+(p?c-g:g))%r],!x.skip&&(f?(e.moveTo(x.x,x.y),f=!1):u(e,y,x,p,o.stepped),y=x);return l&&(x=s[(a+(p?c:0))%r],u(e,y,x,p,o.stepped)),!!l}function ng(e,t,n,i){const s=t.points,{count:o,start:r,ilen:a}=Ul(s,n,i),{move:l=!0,reverse:c}=i||{};let u=0,f=0,p,g,x,y,v,w;const k=O=>(r+(c?a-O:O))%o,C=()=>{y!==v&&(e.lineTo(u,v),e.lineTo(u,y),e.lineTo(u,w))};for(l&&(g=s[k(0)],e.moveTo(g.x,g.y)),p=0;p<=a;++p){if(g=s[k(p)],g.skip)continue;const O=g.x,T=g.y,D=O|0;D===x?(T<y?y=T:T>v&&(v=T),u=(f*u+O)/++f):(C(),e.lineTo(O,T),x=D,f=0,y=v=T),w=T}C()}function Fs(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?ng:eg}function ig(e){return e.stepped?gd:e.tension||e.cubicInterpolationMode==="monotone"?md:Se}function sg(e,t,n,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,n,i)&&s.closePath()),jl(e,t.options),e.stroke(s)}function og(e,t,n,i){const{segments:s,options:o}=t,r=Fs(t);for(const a of s)jl(e,o,a.style),e.beginPath(),r(e,t,a,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const rg=typeof Path2D=="function";function ag(e,t,n,i){rg&&!t.options.segment?sg(e,t,n,i):og(e,t,n,i)}class lg extends sn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;ad(this._points,i,t,s,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=kd(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,s=t[n],o=this.points,r=_d(this,{property:n,start:s,end:s});if(!r.length)return;const a=[],l=ig(i);let c,u;for(c=0,u=r.length;c<u;++c){const{start:f,end:p}=r[c],g=o[f],x=o[p];if(g===x){a.push(g);continue}const y=Math.abs((s-g[n])/(x[n]-g[n])),v=l(g,x,y,i.stepped);v[n]=t[n],a.push(v)}return a.length===1?a[0]:a}pathSegment(t,n,i){return Fs(this)(t,this,n,i)}path(t,n,i){const s=this.segments,o=Fs(this);let r=this._loop;n=n||0,i=i||this.points.length-n;for(const a of s)r&=o(t,this,a,{start:n,end:n+i-1});return!!r}draw(t,n,i,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),ag(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function jr(e,t,n,i){const s=e.options,{[n]:o}=e.getProps([n],i);return Math.abs(t-o)<s.radius+s.hitRadius}class cg extends sn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,i){const s=this.options,{x:o,y:r}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(n-r,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,n){return jr(this,t,"x",n)}inYRange(t,n){return jr(this,t,"y",n)}getCenterPoint(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const i=n&&t.borderWidth||0;return(n+i)*2}draw(t,n){const i=this.options;this.skip||i.radius<.1||!Je(this,n,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Is(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}const Ur=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},ug=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class $r extends sn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=I(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=ct(i.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Ur(i,o);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let f=t;o.textAlign="left",o.textBaseline="middle";let p=-1,g=-u;return this.legendItems.forEach((x,y)=>{const v=i+n/2+o.measureText(x.text).width;(y===0||c[c.length-1]+v+2*a>r)&&(f+=u,c[c.length-(y>0?0:1)]=0,g+=u,p++),l[y]={left:0,top:g,row:p,width:v,height:s},c[c.length-1]+=v+a}),f}_fitCols(t,n,i,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-t;let f=a,p=0,g=0,x=0,y=0;return this.legendItems.forEach((v,w)=>{const{itemWidth:k,itemHeight:C}=hg(i,n,o,v,s);w>0&&g+C+2*a>u&&(f+=p+a,c.push({width:p,height:g}),x+=p+a,y++,p=g=0),l[w]={left:x,top:g,col:y,width:k,height:C},p=Math.max(p,k),g+=C+a}),f+=p,c.push({width:p,height:g}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:o}}=this,r=Ue(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=ft(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=ft(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=ft(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=ft(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;co(t,this),this._draw(),uo(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:s}=this,{align:o,labels:r}=t,a=Y.color,l=Ue(t.rtl,this.left,this.width),c=ct(r.font),{padding:u}=r,f=c.size,p=f/2;let g;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:x,boxHeight:y,itemHeight:v}=Ur(r,f),w=function(D,P,E){if(isNaN(x)||x<=0||isNaN(y)||y<0)return;s.save();const A=R(E.lineWidth,1);if(s.fillStyle=R(E.fillStyle,a),s.lineCap=R(E.lineCap,"butt"),s.lineDashOffset=R(E.lineDashOffset,0),s.lineJoin=R(E.lineJoin,"miter"),s.lineWidth=A,s.strokeStyle=R(E.strokeStyle,a),s.setLineDash(R(E.lineDash,[])),r.usePointStyle){const F={radius:y*Math.SQRT2/2,pointStyle:E.pointStyle,rotation:E.rotation,borderWidth:A},L=l.xPlus(D,x/2),H=P+p;_l(s,F,L,H,r.pointStyleWidth&&x)}else{const F=P+Math.max((f-y)/2,0),L=l.leftForLtr(D,x),H=En(E.borderRadius);s.beginPath(),Object.values(H).some(K=>K!==0)?Ls(s,{x:L,y:F,w:x,h:y,radius:H}):s.rect(L,F,x,y),s.fill(),A!==0&&s.stroke()}s.restore()},k=function(D,P,E){Ti(s,E.text,D,P+v/2,c,{strikethrough:E.hidden,textAlign:l.textAlign(E.textAlign)})},C=this.isHorizontal(),O=this._computeTitleHeight();C?g={x:ft(o,this.left+u,this.right-i[0]),y:this.top+u+O,line:0}:g={x:this.left+u,y:ft(o,this.top+O+u,this.bottom-n[0].height),line:0},Cl(this.ctx,t.textDirection);const T=v+u;this.legendItems.forEach((D,P)=>{s.strokeStyle=D.fontColor,s.fillStyle=D.fontColor;const E=s.measureText(D.text).width,A=l.textAlign(D.textAlign||(D.textAlign=r.textAlign)),F=x+p+E;let L=g.x,H=g.y;l.setWidth(this.width),C?P>0&&L+F+u>this.right&&(H=g.y+=T,g.line++,L=g.x=ft(o,this.left+u,this.right-i[g.line])):P>0&&H+T>this.bottom&&(L=g.x=L+n[g.line].width+u,g.line++,H=g.y=ft(o,this.top+O+u,this.bottom-n[g.line].height));const K=l.x(L);if(w(K,H,D),L=wf(A,L+x+p,C?L+F:this.right,t.rtl),k(l.x(L),H,D),C)g.x+=F+u;else if(typeof D.text!="string"){const et=c.lineHeight;g.y+=$l(D,et)+u}else g.y+=T}),Ol(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=ct(n.font),s=Mt(n.padding);if(!n.display)return;const o=Ue(t.rtl,this.left,this.width),r=this.ctx,a=n.position,l=i.size/2,c=s.top+l;let u,f=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),u=this.top+c,f=ft(t.align,f,this.right-p);else{const x=this.columnSizes.reduce((y,v)=>Math.max(y,v.height),0);u=c+ft(t.align,this.top,this.bottom-x-t.labels.padding-this._computeTitleHeight())}const g=ft(a,f,f+p);r.textAlign=o.textAlign(yl(a)),r.textBaseline="middle",r.strokeStyle=n.color,r.fillStyle=n.color,r.font=i.string,Ti(r,n.text,g,u,i)}_computeTitleHeight(){const t=this.options.title,n=ct(t.font),i=Mt(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,s,o;if(_n(t,this.left,this.right)&&_n(n,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],_n(t,s.left,s.left+s.width)&&_n(n,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!pg(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=ug(s,i);s&&!o&&I(n.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!o&&I(n.onHover,[t,i,this],this)}else i&&I(n.onClick,[t,i,this],this)}}function hg(e,t,n,i,s){const o=fg(i,e,t,n),r=dg(s,i,t.lineHeight);return{itemWidth:o,itemHeight:r}}function fg(e,t,n,i){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),t+n.size/2+i.measureText(s).width}function dg(e,t,n){let i=e;return typeof t.text!="string"&&(i=$l(t,n)),i}function $l(e,t){const n=e.text?e.text.length:0;return t*n}function pg(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var gg={id:"legend",_element:$r,start(e,t,n){const i=e.legend=new $r({ctx:e.ctx,options:n,chart:e});ee.configure(e,i,n),ee.addBox(e,i)},stop(e){ee.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;ee.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Mt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const Sn={average(e){if(!e.length)return!1;let t,n,i=new Set,s=0,o=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();i.add(l.x),s+=l.y,++o}}return o===0||i.size===0?!1:{x:[...i].reduce((a,l)=>a+l)/i.size,y:s/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=e.length;o<r;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Ds(t,c);u<s&&(s=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function Dt(e,t){return t&&(Q(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ut(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(\`
|
|
3561
|
-
\`)>-1?e.split(\`
|
|
3562
|
-
\`):e}function mg(e,t){const{element:n,datasetIndex:i,index:s}=t,o=e.getDatasetMeta(i).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:e,label:r,parsed:o.getParsed(s),raw:e.data.datasets[i].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function Yr(e,t){const n=e.chart.ctx,{body:i,footer:s,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=ct(t.bodyFont),c=ct(t.titleFont),u=ct(t.footerFont),f=o.length,p=s.length,g=i.length,x=Mt(t.padding);let y=x.height,v=0,w=i.reduce((O,T)=>O+T.before.length+T.lines.length+T.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,f&&(y+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),w){const O=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;y+=g*O+(w-g)*l.lineHeight+(w-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*u.lineHeight+(p-1)*t.footerSpacing);let k=0;const C=function(O){v=Math.max(v,n.measureText(O).width+k)};return n.save(),n.font=c.string,z(e.title,C),n.font=l.string,z(e.beforeBody.concat(e.afterBody),C),k=t.displayColors?r+2+t.boxPadding:0,z(i,O=>{z(O.before,C),z(O.lines,C),z(O.after,C)}),k=0,n.font=u.string,z(e.footer,C),n.restore(),v+=x.width,{width:v,height:y}}function bg(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function yg(e,t,n,i){const{x:s,width:o}=i,r=n.caretSize+n.caretPadding;if(e==="left"&&s+o+r>t.width||e==="right"&&s-o-r<0)return!0}function xg(e,t,n,i){const{x:s,width:o}=n,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),yg(c,e,t,n)&&(c="center"),c}function Xr(e,t,n){const i=n.yAlign||t.yAlign||bg(e,n);return{xAlign:n.xAlign||t.xAlign||xg(e,t,n,i),yAlign:i}}function vg(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function _g(e,t,n){let{y:i,height:s}=e;return t==="top"?i+=n:t==="bottom"?i-=s+n:i-=s/2,i}function qr(e,t,n,i){const{caretSize:s,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:g}=En(r);let x=vg(t,a);const y=_g(t,l,c);return l==="center"?a==="left"?x+=c:a==="right"&&(x-=c):a==="left"?x-=Math.max(u,p)+s:a==="right"&&(x+=Math.max(f,g)+s),{x:yt(x,0,i.width-t.width),y:yt(y,0,i.height-t.height)}}function ai(e,t,n){const i=Mt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function Gr(e){return Dt([],Ut(e))}function wg(e,t,n){return Le(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Kr(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Yl={beforeTitle:Wt,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:Wt,beforeBody:Wt,beforeLabel:Wt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return V(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Wt,afterBody:Wt,beforeFooter:Wt,footer:Wt,afterFooter:Wt};function rt(e,t,n,i){const s=e[t].call(n,i);return typeof s>"u"?Yl[t].call(n,i):s}class Zr extends sn{static positioners=Sn;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,o=new Dl(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wg(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,s=rt(i,"beforeTitle",this,t),o=rt(i,"title",this,t),r=rt(i,"afterTitle",this,t);let a=[];return a=Dt(a,Ut(s)),a=Dt(a,Ut(o)),a=Dt(a,Ut(r)),a}getBeforeBody(t,n){return Gr(rt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,s=[];return z(t,o=>{const r={before:[],lines:[],after:[]},a=Kr(i,o);Dt(r.before,Ut(rt(a,"beforeLabel",this,o))),Dt(r.lines,rt(a,"label",this,o)),Dt(r.after,Ut(rt(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,n){return Gr(rt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,s=rt(i,"beforeFooter",this,t),o=rt(i,"footer",this,t),r=rt(i,"afterFooter",this,t);let a=[];return a=Dt(a,Ut(s)),a=Dt(a,Ut(o)),a=Dt(a,Ut(r)),a}_createItems(t){const n=this._active,i=this.chart.data,s=[],o=[],r=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(mg(this.chart,n[l]));return t.filter&&(a=a.filter((u,f,p)=>t.filter(u,f,p,i))),t.itemSort&&(a=a.sort((u,f)=>t.itemSort(u,f,i))),z(a,u=>{const f=Kr(t.callbacks,u);s.push(rt(f,"labelColor",this,u)),o.push(rt(f,"labelPointStyle",this,u)),r.push(rt(f,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,n){const i=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const a=Sn[i.position].call(this,s,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const l=this._size=Yr(this,i),c=Object.assign({},a,l),u=Xr(this.chart,i,c),f=qr(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){const o=this.getCaretPosition(t,i,s);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,i){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:f}=En(a),{x:p,y:g}=t,{width:x,height:y}=n;let v,w,k,C,O,T;return o==="center"?(O=g+y/2,s==="left"?(v=p,w=v-r,C=O+r,T=O-r):(v=p+x,w=v+r,C=O-r,T=O+r),k=v):(s==="left"?w=p+Math.max(l,u)+r:s==="right"?w=p+x-Math.max(c,f)-r:w=this.caretX,o==="top"?(C=g,O=C-r,v=w-r,k=w+r):(C=g+y,O=C+r,v=w+r,k=w-r),T=C),{x1:v,x2:w,x3:k,y1:C,y2:O,y3:T}}drawTitle(t,n,i){const s=this.title,o=s.length;let r,a,l;if(o){const c=Ue(i.rtl,this.x,this.width);for(t.x=ai(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",r=ct(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=r.string,l=0;l<o;++l)n.fillText(s[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,n,i,s,o){const r=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=o,u=ct(o.bodyFont),f=ai(this,"left",o),p=s.x(f),g=l<u.lineHeight?(u.lineHeight-l)/2:0,x=n.y+g;if(o.usePointStyle){const y={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},v=s.leftForLtr(p,c)+c/2,w=x+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Is(t,y,v,w),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Is(t,y,v,w)}else{t.lineWidth=B(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const y=s.leftForLtr(p,c),v=s.leftForLtr(s.xPlus(p,1),c-2),w=En(r.borderRadius);Object.values(w).some(k=>k!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Ls(t,{x:y,y:x,w:c,h:l,radius:w}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Ls(t,{x:v,y:x+1,w:c-2,h:l-2,radius:w}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,x,c,l),t.strokeRect(y,x,c,l),t.fillStyle=r.backgroundColor,t.fillRect(v,x+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,f=ct(i.bodyFont);let p=f.lineHeight,g=0;const x=Ue(i.rtl,this.x,this.width),y=function(E){n.fillText(E,x.x(t.x+g),t.y+p/2),t.y+=p+o},v=x.textAlign(r);let w,k,C,O,T,D,P;for(n.textAlign=r,n.textBaseline="middle",n.font=f.string,t.x=ai(this,v,i),n.fillStyle=i.bodyColor,z(this.beforeBody,y),g=a&&v!=="right"?r==="center"?c/2+u:c+2+u:0,O=0,D=s.length;O<D;++O){for(w=s[O],k=this.labelTextColors[O],n.fillStyle=k,z(w.before,y),C=w.lines,a&&C.length&&(this._drawColorBox(n,t,O,x,i),p=Math.max(f.lineHeight,l)),T=0,P=C.length;T<P;++T)y(C[T]),p=f.lineHeight;z(w.after,y)}g=0,p=f.lineHeight,z(this.afterBody,y),t.y-=o}drawFooter(t,n,i){const s=this.footer,o=s.length;let r,a;if(o){const l=Ue(i.rtl,this.x,this.width);for(t.x=ai(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",r=ct(i.footerFont),n.fillStyle=i.footerColor,n.font=r.string,a=0;a<o;++a)n.fillText(s[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+i.footerSpacing}}drawBackground(t,n,i,s){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:u}=i,{topLeft:f,topRight:p,bottomLeft:g,bottomRight:x}=En(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+f,l),r==="top"&&this.drawCaret(t,n,i,s),n.lineTo(a+c-p,l),n.quadraticCurveTo(a+c,l,a+c,l+p),r==="center"&&o==="right"&&this.drawCaret(t,n,i,s),n.lineTo(a+c,l+u-x),n.quadraticCurveTo(a+c,l+u,a+c-x,l+u),r==="bottom"&&this.drawCaret(t,n,i,s),n.lineTo(a+g,l+u),n.quadraticCurveTo(a,l+u,a,l+u-g),r==="center"&&o==="left"&&this.drawCaret(t,n,i,s),n.lineTo(a,l+f),n.quadraticCurveTo(a,l,a+f,l),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,s=i&&i.x,o=i&&i.y;if(s||o){const r=Sn[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=Yr(this,t),l=Object.assign({},r,this._size),c=Xr(n,t,l),u=qr(t,l,c,n);(s._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=Mt(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,s,n),Cl(t,n.textDirection),o.y+=r.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),Ol(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,s=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!vi(i,s),r=this._positionChanged(s,n);(o||r)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(t,o,n,i),a=this._positionChanged(r,t),l=n||!vi(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&r.reverse(),r}_positionChanged(t,n){const{caretX:i,caretY:s,options:o}=this,r=Sn[o.position].call(this,t,n);return r!==!1&&(i!==r.x||s!==r.y)}}var Sg={id:"tooltip",_element:Zr,positioners:Sn,afterInit(e,t,n){n&&(e.tooltip=new Zr({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Yl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const kg=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Tg(e,t,n,i){const s=e.indexOf(t);if(s===-1)return kg(e,t,n,i);const o=e.lastIndexOf(t);return s!==o?n:s}const Mg=(e,t)=>e===null?null:yt(Math.round(e),0,t);function Qr(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Eg extends on{static id="category";static defaults={ticks:{callback:Qr}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:s,label:o}of n)i[s]===o&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(V(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:Tg(i,t,R(n,t),this._addedLabels),Mg(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,s=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let r=t;r<=n;r++)s.push({value:r});return s}getLabelForValue(t){return Qr.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Cg(e,t){const n=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:f,includeBounds:p}=e,g=o||1,x=u-1,{min:y,max:v}=t,w=!V(r),k=!V(a),C=!V(c),O=(v-y)/(f+1);let T=nr((v-y)/x/g)*g,D,P,E,A;if(T<1e-14&&!w&&!k)return[{value:y},{value:v}];A=Math.ceil(v/T)-Math.floor(y/T),A>x&&(T=nr(A*T/x/g)*g),V(l)||(D=Math.pow(10,l),T=Math.ceil(T*D)/D),s==="ticks"?(P=Math.floor(y/T)*T,E=Math.ceil(v/T)*T):(P=y,E=v),w&&k&&o&&hf((a-r)/o,T/1e3)?(A=Math.round(Math.min((a-r)/T,u)),T=(a-r)/A,P=r,E=a):C?(P=w?r:P,E=k?a:E,A=c-1,T=(E-P)/A):(A=(E-P)/T,Oe(A,Math.round(A),T/1e3)?A=Math.round(A):A=Math.ceil(A));const F=Math.max(ir(T),ir(P));D=Math.pow(10,V(l)?F:l),P=Math.round(P*D)/D,E=Math.round(E*D)/D;let L=0;for(w&&(p&&P!==r?(n.push({value:r}),P<r&&L++,Oe(Math.round((P+L*T)*D)/D,r,Jr(r,O,e))&&L++):P<r&&L++);L<A;++L){const H=Math.round((P+L*T)*D)/D;if(k&&H>a)break;n.push({value:H})}return k&&p&&E!==a?n.length&&Oe(n[n.length-1].value,a,Jr(a,O,e))?n[n.length-1].value=a:n.push({value:a}):(!k||E===a)&&n.push({value:E}),n}function Jr(e,t,{horizontal:n,minRotation:i}){const s=Me(i),o=(n?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+e).length;return Math.min(t/o,r)}class Og extends on{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return V(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:o}=this;const r=l=>s=n?s:l,a=l=>o=i?o:l;if(t){const l=ce(s),c=ce(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${i} would result generating up to \${s} ticks. Limiting to 1000.\`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,r=Cg(s,o);return t.bounds==="ticks"&&ff(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-n)/Math.max(t.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return xl(t,this.chart.options.locale,this.options.ticks.format)}}class Pg extends Og{static id="linear";static defaults={ticks:{callback:vl.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=xt(t)?t:0,this.max=xt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Me(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const zi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},lt=Object.keys(zi);function ta(e,t){return e-t}function ea(e,t){if(V(t))return null;const n=e._adapter,{parser:i,round:s,isoWeekday:o}=e._parseOpts;let r=t;return typeof i=="function"&&(r=i(r)),xt(r)||(r=typeof i=="string"?n.parse(r,i):n.parse(r)),r===null?null:(s&&(r=s==="week"&&(In(o)||o===!0)?n.startOf(r,"isoWeek",o):n.startOf(r,s)),+r)}function na(e,t,n,i){const s=lt.length;for(let o=lt.indexOf(e);o<s-1;++o){const r=zi[lt[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-t)/(a*r.size))<=i)return lt[o]}return lt[s-1]}function Dg(e,t,n,i,s){for(let o=lt.length-1;o>=lt.indexOf(n);o--){const r=lt[o];if(zi[r].common&&e._adapter.diff(s,i,r)>=t-1)return r}return lt[n?lt.indexOf(n):0]}function Ag(e){for(let t=lt.indexOf(e)+1,n=lt.length;t<n;++t)if(zi[lt[t]].common)return lt[t]}function ia(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:s}=ao(n,t),o=n[i]>=t?n[i]:n[s];e[o]=!0}}function Ig(e,t,n,i){const s=e._adapter,o=+s.startOf(t[0].value,i),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,i))l=n[a],l>=0&&(t[l].major=!0);return t}function sa(e,t,n){const i=[],s={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],s[a]=r,i.push({value:a,major:!1});return o===0||!n?i:Ig(e,i,s,n)}class oa extends on{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const i=t.time||(t.time={}),s=this._adapter=new Ud._date(t.adapters.date);s.init(n),kn(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ea(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=xt(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),o=xt(o)&&!isNaN(o)?o:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,r=this.max,a=yf(s,o,r);return this._unit=n.unit||(i.autoSkip?na(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):Dg(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Ag(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),sa(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=yt(n,0,r),i=yt(i,0,r),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,s=this.options,o=s.time,r=o.unit||na(o.minUnit,n,i,this._getLabelCapacity(n)),a=R(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=In(l)||l===!0,u={};let f=n,p,g;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":r),t.diff(i,n,r)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+r);const x=s.ticks.source==="data"&&this.getDataTimestamps();for(p=f,g=0;p<i;p=+t.add(p,a,r),g++)ia(u,p,x);return(p===i||s.bounds==="ticks"||g===1)&&ia(u,p,x),Object.keys(u).sort(ta).map(y=>+y)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,o=this._unit,r=n||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,n,i,s){const o=this.options,r=o.ticks.callback;if(r)return I(r,[t,n,i],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],f=c&&a[c],p=i[n],g=c&&f&&p&&p.major;return this._adapter.format(t,s||(g?f:u))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n<i;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,s=Me(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:i*o+a*r,h:i*r+a*o}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,o=this._tickFormatFunction(t,0,sa(this,[t],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n<i;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const s=this.getLabels();for(n=0,i=s.length;n<i;++n)t.push(ea(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return vf(t.sort(ta))}}function li(e,t,n){let i=0,s=e.length-1,o,r,a,l;n?(t>=e[i].pos&&t<=e[s].pos&&({lo:i,hi:s}=Ee(e,"pos",t)),{pos:o,time:a}=e[i],{pos:r,time:l}=e[s]):(t>=e[i].time&&t<=e[s].time&&({lo:i,hi:s}=Ee(e,"time",t)),{time:o,pos:a}=e[i],{time:r,pos:l}=e[s]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Nm extends oa{static id="timeseries";static defaults=oa.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=li(n,this.min),this._tableRange=li(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,s=[],o=[];let r,a,l,c,u;for(r=0,a=t.length;r<a;++r)c=t[r],c>=n&&c<=i&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(r=0,a=s.length;r<a;++r)u=s[r+1],l=s[r-1],c=s[r],Math.round((u+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(li(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return li(this._table,i*this._tableRange+this._minPos,!0)}}function Lg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var os={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
3563
|
-
* http://hammerjs.github.io/
|
|
3564
|
-
*
|
|
3565
|
-
* Copyright (c) 2016 Jorik Tangelder;
|
|
3566
|
-
* Licensed under the MIT license */var ra;function Rg(){return ra||(ra=1,(function(e){(function(t,n,i,s){var o=["","webkit","Moz","MS","ms","o"],r=n.createElement("div"),a="function",l=Math.round,c=Math.abs,u=Date.now;function f(h,d,b){return setTimeout(C(h,b),d)}function p(h,d,b){return Array.isArray(h)?(g(h,b[d],b),!0):!1}function g(h,d,b){var _;if(h)if(h.forEach)h.forEach(d,b);else if(h.length!==s)for(_=0;_<h.length;)d.call(b,h[_],_,h),_++;else for(_ in h)h.hasOwnProperty(_)&&d.call(b,h[_],_,h)}function x(h,d,b){var _="DEPRECATED METHOD: "+d+\`
|
|
3567
|
-
\`+b+\` AT
|
|
3568
|
-
\`;return function(){var S=new Error("get-stack-trace"),M=S&&S.stack?S.stack.replace(/^[^\\(]+?[\\n$]/gm,"").replace(/^\\s+at\\s+/gm,"").replace(/^Object.<anonymous>\\s*\\(/gm,"{anonymous}()@"):"Unknown Stack Trace",N=t.console&&(t.console.warn||t.console.log);return N&&N.call(t.console,_,M),h.apply(this,arguments)}}var y;typeof Object.assign!="function"?y=function(d){if(d===s||d===null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(d),_=1;_<arguments.length;_++){var S=arguments[_];if(S!==s&&S!==null)for(var M in S)S.hasOwnProperty(M)&&(b[M]=S[M])}return b}:y=Object.assign;var v=x(function(d,b,_){for(var S=Object.keys(b),M=0;M<S.length;)(!_||_&&d[S[M]]===s)&&(d[S[M]]=b[S[M]]),M++;return d},"extend","Use \`assign\`."),w=x(function(d,b){return v(d,b,!0)},"merge","Use \`assign\`.");function k(h,d,b){var _=d.prototype,S;S=h.prototype=Object.create(_),S.constructor=h,S._super=_,b&&y(S,b)}function C(h,d){return function(){return h.apply(d,arguments)}}function O(h,d){return typeof h==a?h.apply(d&&d[0]||s,d):h}function T(h,d){return h===s?d:h}function D(h,d,b){g(F(d),function(_){h.addEventListener(_,b,!1)})}function P(h,d,b){g(F(d),function(_){h.removeEventListener(_,b,!1)})}function E(h,d){for(;h;){if(h==d)return!0;h=h.parentNode}return!1}function A(h,d){return h.indexOf(d)>-1}function F(h){return h.trim().split(/\\s+/g)}function L(h,d,b){if(h.indexOf&&!b)return h.indexOf(d);for(var _=0;_<h.length;){if(b&&h[_][b]==d||!b&&h[_]===d)return _;_++}return-1}function H(h){return Array.prototype.slice.call(h,0)}function K(h,d,b){for(var _=[],S=[],M=0;M<h.length;){var N=h[M][d];L(S,N)<0&&_.push(h[M]),S[M]=N,M++}return _=_.sort(function(Z,st){return Z[d]>st[d]}),_}function et(h,d){for(var b,_,S=d[0].toUpperCase()+d.slice(1),M=0;M<o.length;){if(b=o[M],_=b?b+S:d,_ in h)return _;M++}return s}var j=1;function q(){return j++}function nt(h){var d=h.ownerDocument||h;return d.defaultView||d.parentWindow||t}var Ne=/mobile|tablet|ip(ad|hone|od)|android/i,pe="ontouchstart"in t,qt=et(t,"PointerEvent")!==s,ze=pe&&Ne.test(navigator.userAgent),dt="touch",ge="pen",vt="mouse",me="kinect",Ht=25,it=1,be=2,X=4,ot=8,zn=1,an=2,ln=4,cn=8,un=16,Et=an|ln,ye=cn|un,vo=Et|ye,_o=["x","y"],Fn=["clientX","clientY"];function pt(h,d){var b=this;this.manager=h,this.callback=d,this.element=h.element,this.target=h.options.inputTarget,this.domHandler=function(_){O(h.options.enable,[h])&&b.handler(_)},this.init()}pt.prototype={handler:function(){},init:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(nt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(nt(this.element),this.evWin,this.domHandler)}};function ac(h){var d,b=h.options.inputClass;return b?d=b:qt?d=Hi:ze?d=Vn:pe?d=Bi:d=Bn,new d(h,lc)}function lc(h,d,b){var _=b.pointers.length,S=b.changedPointers.length,M=d&it&&_-S===0,N=d&(X|ot)&&_-S===0;b.isFirst=!!M,b.isFinal=!!N,M&&(h.session={}),b.eventType=d,cc(h,b),h.emit("hammer.input",b),h.recognize(b),h.session.prevInput=b}function cc(h,d){var b=h.session,_=d.pointers,S=_.length;b.firstInput||(b.firstInput=wo(d)),S>1&&!b.firstMultiple?b.firstMultiple=wo(d):S===1&&(b.firstMultiple=!1);var M=b.firstInput,N=b.firstMultiple,G=N?N.center:M.center,Z=d.center=So(_);d.timeStamp=u(),d.deltaTime=d.timeStamp-M.timeStamp,d.angle=Fi(G,Z),d.distance=Hn(G,Z),uc(b,d),d.offsetDirection=To(d.deltaX,d.deltaY);var st=ko(d.deltaTime,d.deltaX,d.deltaY);d.overallVelocityX=st.x,d.overallVelocityY=st.y,d.overallVelocity=c(st.x)>c(st.y)?st.x:st.y,d.scale=N?dc(N.pointers,_):1,d.rotation=N?fc(N.pointers,_):0,d.maxPointers=b.prevInput?d.pointers.length>b.prevInput.maxPointers?d.pointers.length:b.prevInput.maxPointers:d.pointers.length,hc(b,d);var Ot=h.element;E(d.srcEvent.target,Ot)&&(Ot=d.srcEvent.target),d.target=Ot}function uc(h,d){var b=d.center,_=h.offsetDelta||{},S=h.prevDelta||{},M=h.prevInput||{};(d.eventType===it||M.eventType===X)&&(S=h.prevDelta={x:M.deltaX||0,y:M.deltaY||0},_=h.offsetDelta={x:b.x,y:b.y}),d.deltaX=S.x+(b.x-_.x),d.deltaY=S.y+(b.y-_.y)}function hc(h,d){var b=h.lastInterval||d,_=d.timeStamp-b.timeStamp,S,M,N,G;if(d.eventType!=ot&&(_>Ht||b.velocity===s)){var Z=d.deltaX-b.deltaX,st=d.deltaY-b.deltaY,Ot=ko(_,Z,st);M=Ot.x,N=Ot.y,S=c(Ot.x)>c(Ot.y)?Ot.x:Ot.y,G=To(Z,st),h.lastInterval=d}else S=b.velocity,M=b.velocityX,N=b.velocityY,G=b.direction;d.velocity=S,d.velocityX=M,d.velocityY=N,d.direction=G}function wo(h){for(var d=[],b=0;b<h.pointers.length;)d[b]={clientX:l(h.pointers[b].clientX),clientY:l(h.pointers[b].clientY)},b++;return{timeStamp:u(),pointers:d,center:So(d),deltaX:h.deltaX,deltaY:h.deltaY}}function So(h){var d=h.length;if(d===1)return{x:l(h[0].clientX),y:l(h[0].clientY)};for(var b=0,_=0,S=0;S<d;)b+=h[S].clientX,_+=h[S].clientY,S++;return{x:l(b/d),y:l(_/d)}}function ko(h,d,b){return{x:d/h||0,y:b/h||0}}function To(h,d){return h===d?zn:c(h)>=c(d)?h<0?an:ln:d<0?cn:un}function Hn(h,d,b){b||(b=_o);var _=d[b[0]]-h[b[0]],S=d[b[1]]-h[b[1]];return Math.sqrt(_*_+S*S)}function Fi(h,d,b){b||(b=_o);var _=d[b[0]]-h[b[0]],S=d[b[1]]-h[b[1]];return Math.atan2(S,_)*180/Math.PI}function fc(h,d){return Fi(d[1],d[0],Fn)+Fi(h[1],h[0],Fn)}function dc(h,d){return Hn(d[0],d[1],Fn)/Hn(h[0],h[1],Fn)}var pc={mousedown:it,mousemove:be,mouseup:X},gc="mousedown",mc="mousemove mouseup";function Bn(){this.evEl=gc,this.evWin=mc,this.pressed=!1,pt.apply(this,arguments)}k(Bn,pt,{handler:function(d){var b=pc[d.type];b&it&&d.button===0&&(this.pressed=!0),b&be&&d.which!==1&&(b=X),this.pressed&&(b&X&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[d],changedPointers:[d],pointerType:vt,srcEvent:d}))}});var bc={pointerdown:it,pointermove:be,pointerup:X,pointercancel:ot,pointerout:ot},yc={2:dt,3:ge,4:vt,5:me},Mo="pointerdown",Eo="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Mo="MSPointerDown",Eo="MSPointerMove MSPointerUp MSPointerCancel");function Hi(){this.evEl=Mo,this.evWin=Eo,pt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}k(Hi,pt,{handler:function(d){var b=this.store,_=!1,S=d.type.toLowerCase().replace("ms",""),M=bc[S],N=yc[d.pointerType]||d.pointerType,G=N==dt,Z=L(b,d.pointerId,"pointerId");M&it&&(d.button===0||G)?Z<0&&(b.push(d),Z=b.length-1):M&(X|ot)&&(_=!0),!(Z<0)&&(b[Z]=d,this.callback(this.manager,M,{pointers:b,changedPointers:[d],pointerType:N,srcEvent:d}),_&&b.splice(Z,1))}});var xc={touchstart:it,touchmove:be,touchend:X,touchcancel:ot},vc="touchstart",_c="touchstart touchmove touchend touchcancel";function Co(){this.evTarget=vc,this.evWin=_c,this.started=!1,pt.apply(this,arguments)}k(Co,pt,{handler:function(d){var b=xc[d.type];if(b===it&&(this.started=!0),!!this.started){var _=wc.call(this,d,b);b&(X|ot)&&_[0].length-_[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:_[0],changedPointers:_[1],pointerType:dt,srcEvent:d})}}});function wc(h,d){var b=H(h.touches),_=H(h.changedTouches);return d&(X|ot)&&(b=K(b.concat(_),"identifier")),[b,_]}var Sc={touchstart:it,touchmove:be,touchend:X,touchcancel:ot},kc="touchstart touchmove touchend touchcancel";function Vn(){this.evTarget=kc,this.targetIds={},pt.apply(this,arguments)}k(Vn,pt,{handler:function(d){var b=Sc[d.type],_=Tc.call(this,d,b);_&&this.callback(this.manager,b,{pointers:_[0],changedPointers:_[1],pointerType:dt,srcEvent:d})}});function Tc(h,d){var b=H(h.touches),_=this.targetIds;if(d&(it|be)&&b.length===1)return _[b[0].identifier]=!0,[b,b];var S,M,N=H(h.changedTouches),G=[],Z=this.target;if(M=b.filter(function(st){return E(st.target,Z)}),d===it)for(S=0;S<M.length;)_[M[S].identifier]=!0,S++;for(S=0;S<N.length;)_[N[S].identifier]&&G.push(N[S]),d&(X|ot)&&delete _[N[S].identifier],S++;if(G.length)return[K(M.concat(G),"identifier"),G]}var Mc=2500,Oo=25;function Bi(){pt.apply(this,arguments);var h=C(this.handler,this);this.touch=new Vn(this.manager,h),this.mouse=new Bn(this.manager,h),this.primaryTouch=null,this.lastTouches=[]}k(Bi,pt,{handler:function(d,b,_){var S=_.pointerType==dt,M=_.pointerType==vt;if(!(M&&_.sourceCapabilities&&_.sourceCapabilities.firesTouchEvents)){if(S)Ec.call(this,b,_);else if(M&&Cc.call(this,_))return;this.callback(d,b,_)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ec(h,d){h&it?(this.primaryTouch=d.changedPointers[0].identifier,Po.call(this,d)):h&(X|ot)&&Po.call(this,d)}function Po(h){var d=h.changedPointers[0];if(d.identifier===this.primaryTouch){var b={x:d.clientX,y:d.clientY};this.lastTouches.push(b);var _=this.lastTouches,S=function(){var M=_.indexOf(b);M>-1&&_.splice(M,1)};setTimeout(S,Mc)}}function Cc(h){for(var d=h.srcEvent.clientX,b=h.srcEvent.clientY,_=0;_<this.lastTouches.length;_++){var S=this.lastTouches[_],M=Math.abs(d-S.x),N=Math.abs(b-S.y);if(M<=Oo&&N<=Oo)return!0}return!1}var Do=et(r.style,"touchAction"),Ao=Do!==s,Io="compute",Lo="auto",Vi="manipulation",xe="none",hn="pan-x",fn="pan-y",Wn=Pc();function Wi(h,d){this.manager=h,this.set(d)}Wi.prototype={set:function(h){h==Io&&(h=this.compute()),Ao&&this.manager.element.style&&Wn[h]&&(this.manager.element.style[Do]=h),this.actions=h.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var h=[];return g(this.manager.recognizers,function(d){O(d.options.enable,[d])&&(h=h.concat(d.getTouchAction()))}),Oc(h.join(" "))},preventDefaults:function(h){var d=h.srcEvent,b=h.offsetDirection;if(this.manager.session.prevented){d.preventDefault();return}var _=this.actions,S=A(_,xe)&&!Wn[xe],M=A(_,fn)&&!Wn[fn],N=A(_,hn)&&!Wn[hn];if(S){var G=h.pointers.length===1,Z=h.distance<2,st=h.deltaTime<250;if(G&&Z&&st)return}if(!(N&&M)&&(S||M&&b&Et||N&&b&ye))return this.preventSrc(d)},preventSrc:function(h){this.manager.session.prevented=!0,h.preventDefault()}};function Oc(h){if(A(h,xe))return xe;var d=A(h,hn),b=A(h,fn);return d&&b?xe:d||b?d?hn:fn:A(h,Vi)?Vi:Lo}function Pc(){if(!Ao)return!1;var h={},d=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(b){h[b]=d?t.CSS.supports("touch-action",b):!0}),h}var jn=1,gt=2,Fe=4,Gt=8,Bt=Gt,dn=16,Ct=32;function Vt(h){this.options=y({},this.defaults,h||{}),this.id=q(),this.manager=null,this.options.enable=T(this.options.enable,!0),this.state=jn,this.simultaneous={},this.requireFail=[]}Vt.prototype={defaults:{},set:function(h){return y(this.options,h),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(h){if(p(h,"recognizeWith",this))return this;var d=this.simultaneous;return h=Un(h,this),d[h.id]||(d[h.id]=h,h.recognizeWith(this)),this},dropRecognizeWith:function(h){return p(h,"dropRecognizeWith",this)?this:(h=Un(h,this),delete this.simultaneous[h.id],this)},requireFailure:function(h){if(p(h,"requireFailure",this))return this;var d=this.requireFail;return h=Un(h,this),L(d,h)===-1&&(d.push(h),h.requireFailure(this)),this},dropRequireFailure:function(h){if(p(h,"dropRequireFailure",this))return this;h=Un(h,this);var d=L(this.requireFail,h);return d>-1&&this.requireFail.splice(d,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(h){return!!this.simultaneous[h.id]},emit:function(h){var d=this,b=this.state;function _(S){d.manager.emit(S,h)}b<Gt&&_(d.options.event+Ro(b)),_(d.options.event),h.additionalEvent&&_(h.additionalEvent),b>=Gt&&_(d.options.event+Ro(b))},tryEmit:function(h){if(this.canEmit())return this.emit(h);this.state=Ct},canEmit:function(){for(var h=0;h<this.requireFail.length;){if(!(this.requireFail[h].state&(Ct|jn)))return!1;h++}return!0},recognize:function(h){var d=y({},h);if(!O(this.options.enable,[this,d])){this.reset(),this.state=Ct;return}this.state&(Bt|dn|Ct)&&(this.state=jn),this.state=this.process(d),this.state&(gt|Fe|Gt|dn)&&this.tryEmit(d)},process:function(h){},getTouchAction:function(){},reset:function(){}};function Ro(h){return h&dn?"cancel":h&Gt?"end":h&Fe?"move":h>?"start":""}function No(h){return h==un?"down":h==cn?"up":h==an?"left":h==ln?"right":""}function Un(h,d){var b=d.manager;return b?b.get(h):h}function _t(){Vt.apply(this,arguments)}k(_t,Vt,{defaults:{pointers:1},attrTest:function(h){var d=this.options.pointers;return d===0||h.pointers.length===d},process:function(h){var d=this.state,b=h.eventType,_=d&(gt|Fe),S=this.attrTest(h);return _&&(b&ot||!S)?d|dn:_||S?b&X?d|Gt:d>?d|Fe:gt:Ct}});function $n(){_t.apply(this,arguments),this.pX=null,this.pY=null}k($n,_t,{defaults:{event:"pan",threshold:10,pointers:1,direction:vo},getTouchAction:function(){var h=this.options.direction,d=[];return h&Et&&d.push(fn),h&ye&&d.push(hn),d},directionTest:function(h){var d=this.options,b=!0,_=h.distance,S=h.direction,M=h.deltaX,N=h.deltaY;return S&d.direction||(d.direction&Et?(S=M===0?zn:M<0?an:ln,b=M!=this.pX,_=Math.abs(h.deltaX)):(S=N===0?zn:N<0?cn:un,b=N!=this.pY,_=Math.abs(h.deltaY))),h.direction=S,b&&_>d.threshold&&S&d.direction},attrTest:function(h){return _t.prototype.attrTest.call(this,h)&&(this.state>||!(this.state>)&&this.directionTest(h))},emit:function(h){this.pX=h.deltaX,this.pY=h.deltaY;var d=No(h.direction);d&&(h.additionalEvent=this.options.event+d),this._super.emit.call(this,h)}});function ji(){_t.apply(this,arguments)}k(ji,_t,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[xe]},attrTest:function(h){return this._super.attrTest.call(this,h)&&(Math.abs(h.scale-1)>this.options.threshold||this.state>)},emit:function(h){if(h.scale!==1){var d=h.scale<1?"in":"out";h.additionalEvent=this.options.event+d}this._super.emit.call(this,h)}});function Ui(){Vt.apply(this,arguments),this._timer=null,this._input=null}k(Ui,Vt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Lo]},process:function(h){var d=this.options,b=h.pointers.length===d.pointers,_=h.distance<d.threshold,S=h.deltaTime>d.time;if(this._input=h,!_||!b||h.eventType&(X|ot)&&!S)this.reset();else if(h.eventType&it)this.reset(),this._timer=f(function(){this.state=Bt,this.tryEmit()},d.time,this);else if(h.eventType&X)return Bt;return Ct},reset:function(){clearTimeout(this._timer)},emit:function(h){this.state===Bt&&(h&&h.eventType&X?this.manager.emit(this.options.event+"up",h):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function $i(){_t.apply(this,arguments)}k($i,_t,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[xe]},attrTest:function(h){return this._super.attrTest.call(this,h)&&(Math.abs(h.rotation)>this.options.threshold||this.state>)}});function Yi(){_t.apply(this,arguments)}k(Yi,_t,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Et|ye,pointers:1},getTouchAction:function(){return $n.prototype.getTouchAction.call(this)},attrTest:function(h){var d=this.options.direction,b;return d&(Et|ye)?b=h.overallVelocity:d&Et?b=h.overallVelocityX:d&ye&&(b=h.overallVelocityY),this._super.attrTest.call(this,h)&&d&h.offsetDirection&&h.distance>this.options.threshold&&h.maxPointers==this.options.pointers&&c(b)>this.options.velocity&&h.eventType&X},emit:function(h){var d=No(h.offsetDirection);d&&this.manager.emit(this.options.event+d,h),this.manager.emit(this.options.event,h)}});function Yn(){Vt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}k(Yn,Vt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Vi]},process:function(h){var d=this.options,b=h.pointers.length===d.pointers,_=h.distance<d.threshold,S=h.deltaTime<d.time;if(this.reset(),h.eventType&it&&this.count===0)return this.failTimeout();if(_&&S&&b){if(h.eventType!=X)return this.failTimeout();var M=this.pTime?h.timeStamp-this.pTime<d.interval:!0,N=!this.pCenter||Hn(this.pCenter,h.center)<d.posThreshold;this.pTime=h.timeStamp,this.pCenter=h.center,!N||!M?this.count=1:this.count+=1,this._input=h;var G=this.count%d.taps;if(G===0)return this.hasRequireFailures()?(this._timer=f(function(){this.state=Bt,this.tryEmit()},d.interval,this),gt):Bt}return Ct},failTimeout:function(){return this._timer=f(function(){this.state=Ct},this.options.interval,this),Ct},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Bt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Kt(h,d){return d=d||{},d.recognizers=T(d.recognizers,Kt.defaults.preset),new Xi(h,d)}Kt.VERSION="2.0.7",Kt.defaults={domEvents:!1,touchAction:Io,enable:!0,inputTarget:null,inputClass:null,preset:[[$i,{enable:!1}],[ji,{enable:!1},["rotate"]],[Yi,{direction:Et}],[$n,{direction:Et},["swipe"]],[Yn],[Yn,{event:"doubletap",taps:2},["tap"]],[Ui]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Dc=1,zo=2;function Xi(h,d){this.options=y({},Kt.defaults,d||{}),this.options.inputTarget=this.options.inputTarget||h,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=h,this.input=ac(this),this.touchAction=new Wi(this,this.options.touchAction),Fo(this,!0),g(this.options.recognizers,function(b){var _=this.add(new b[0](b[1]));b[2]&&_.recognizeWith(b[2]),b[3]&&_.requireFailure(b[3])},this)}Xi.prototype={set:function(h){return y(this.options,h),h.touchAction&&this.touchAction.update(),h.inputTarget&&(this.input.destroy(),this.input.target=h.inputTarget,this.input.init()),this},stop:function(h){this.session.stopped=h?zo:Dc},recognize:function(h){var d=this.session;if(!d.stopped){this.touchAction.preventDefaults(h);var b,_=this.recognizers,S=d.curRecognizer;(!S||S&&S.state&Bt)&&(S=d.curRecognizer=null);for(var M=0;M<_.length;)b=_[M],d.stopped!==zo&&(!S||b==S||b.canRecognizeWith(S))?b.recognize(h):b.reset(),!S&&b.state&(gt|Fe|Gt)&&(S=d.curRecognizer=b),M++}},get:function(h){if(h instanceof Vt)return h;for(var d=this.recognizers,b=0;b<d.length;b++)if(d[b].options.event==h)return d[b];return null},add:function(h){if(p(h,"add",this))return this;var d=this.get(h.options.event);return d&&this.remove(d),this.recognizers.push(h),h.manager=this,this.touchAction.update(),h},remove:function(h){if(p(h,"remove",this))return this;if(h=this.get(h),h){var d=this.recognizers,b=L(d,h);b!==-1&&(d.splice(b,1),this.touchAction.update())}return this},on:function(h,d){if(h!==s&&d!==s){var b=this.handlers;return g(F(h),function(_){b[_]=b[_]||[],b[_].push(d)}),this}},off:function(h,d){if(h!==s){var b=this.handlers;return g(F(h),function(_){d?b[_]&&b[_].splice(L(b[_],d),1):delete b[_]}),this}},emit:function(h,d){this.options.domEvents&&Ac(h,d);var b=this.handlers[h]&&this.handlers[h].slice();if(!(!b||!b.length)){d.type=h,d.preventDefault=function(){d.srcEvent.preventDefault()};for(var _=0;_<b.length;)b[_](d),_++}},destroy:function(){this.element&&Fo(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Fo(h,d){var b=h.element;if(b.style){var _;g(h.options.cssProps,function(S,M){_=et(b.style,M),d?(h.oldCssProps[_]=b.style[_],b.style[_]=S):b.style[_]=h.oldCssProps[_]||""}),d||(h.oldCssProps={})}}function Ac(h,d){var b=n.createEvent("Event");b.initEvent(h,!0,!0),b.gesture=d,d.target.dispatchEvent(b)}y(Kt,{INPUT_START:it,INPUT_MOVE:be,INPUT_END:X,INPUT_CANCEL:ot,STATE_POSSIBLE:jn,STATE_BEGAN:gt,STATE_CHANGED:Fe,STATE_ENDED:Gt,STATE_RECOGNIZED:Bt,STATE_CANCELLED:dn,STATE_FAILED:Ct,DIRECTION_NONE:zn,DIRECTION_LEFT:an,DIRECTION_RIGHT:ln,DIRECTION_UP:cn,DIRECTION_DOWN:un,DIRECTION_HORIZONTAL:Et,DIRECTION_VERTICAL:ye,DIRECTION_ALL:vo,Manager:Xi,Input:pt,TouchAction:Wi,TouchInput:Vn,MouseInput:Bn,PointerEventInput:Hi,TouchMouseInput:Bi,SingleTouchInput:Co,Recognizer:Vt,AttrRecognizer:_t,Tap:Yn,Pan:$n,Swipe:Yi,Pinch:ji,Rotate:$i,Press:Ui,on:D,off:P,each:g,merge:w,extend:v,assign:y,inherit:k,bindFn:C,prefixed:et});var Ic=typeof t<"u"?t:typeof self<"u"?self:{};Ic.Hammer=Kt,e.exports?e.exports=Kt:t[i]=Kt})(window,document,"Hammer")})(os)),os.exports}var Ng=Rg();const Cn=Lg(Ng);/*!
|
|
3569
|
-
* chartjs-plugin-zoom v2.2.0
|
|
3570
|
-
* https://www.chartjs.org/chartjs-plugin-zoom/2.2.0/
|
|
3571
|
-
* (c) 2016-2024 chartjs-plugin-zoom Contributors
|
|
3572
|
-
* Released under the MIT License
|
|
3573
|
-
*/const Rn=e=>e&&e.enabled&&e.modifierKey,Xl=(e,t)=>e&&t[e+"Key"],yo=(e,t)=>e&&!t[e+"Key"];function ue(e,t,n){return e===void 0?!0:typeof e=="string"?e.indexOf(t)!==-1:typeof e=="function"?e({chart:n}).indexOf(t)!==-1:!1}function rs(e,t){return typeof e=="function"&&(e=e({chart:t})),typeof e=="string"?{x:e.indexOf("x")!==-1,y:e.indexOf("y")!==-1}:{x:!1,y:!1}}function zg(e,t){let n;return function(){return clearTimeout(n),n=setTimeout(e,t),t}}function Fg({x:e,y:t},n){const i=n.scales,s=Object.keys(i);for(let o=0;o<s.length;o++){const r=i[s[o]];if(t>=r.top&&t<=r.bottom&&e>=r.left&&e<=r.right)return r}return null}function ql(e,t,n){const{mode:i="xy",scaleMode:s,overScaleMode:o}=e||{},r=Fg(t,n),a=rs(i,n),l=rs(s,n);if(o){const u=rs(o,n);for(const f of["x","y"])u[f]&&(l[f]=a[f],a[f]=!1)}if(r&&l[r.axis])return[r];const c=[];return z(n.scales,function(u){a[u.axis]&&c.push(u)}),c}const Hs=new WeakMap;function U(e){let t=Hs.get(e);return t||(t={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},Hs.set(e,t)),t}function Hg(e){Hs.delete(e)}function Gl(e,t,n,i){const s=Math.max(0,Math.min(1,(e-t)/n||0)),o=1-s;return{min:i*s,max:i*o}}function Kl(e,t){const n=e.isHorizontal()?t.x:t.y;return e.getValueForPixel(n)}function Zl(e,t,n){const i=e.max-e.min,s=i*(t-1),o=Kl(e,n);return Gl(o,e.min,i,s)}function Bg(e,t,n){const i=Kl(e,n);if(i===void 0)return{min:e.min,max:e.max};const s=Math.log10(e.min),o=Math.log10(e.max),r=Math.log10(i),a=o-s,l=a*(t-1),c=Gl(r,s,a,l);return{min:Math.pow(10,s+c.min),max:Math.pow(10,o-c.max)}}function Vg(e,t){return t&&(t[e.id]||t[e.axis])||{}}function aa(e,t,n,i,s){let o=n[i];if(o==="original"){const r=e.originalScaleLimits[t.id][i];o=R(r.options,r.scale)}return R(o,s)}function Wg(e,t,n){const i=e.getValueForPixel(t),s=e.getValueForPixel(n);return{min:Math.min(i,s),max:Math.max(i,s)}}function jg(e,{min:t,max:n,minLimit:i,maxLimit:s},o){const r=(e-n+t)/2;t-=r,n+=r;const a=o.min.options??o.min.scale,l=o.max.options??o.max.scale,c=e/1e6;return Oe(t,a,c)&&(t=a),Oe(n,l,c)&&(n=l),t<i?(t=i,n=Math.min(i+e,s)):n>s&&(n=s,t=Math.max(s-e,i)),{min:t,max:n}}function Re(e,{min:t,max:n},i,s=!1){const o=U(e.chart),{options:r}=e,a=Vg(e,i),{minRange:l=0}=a,c=aa(o,e,a,"min",-1/0),u=aa(o,e,a,"max",1/0);if(s==="pan"&&(t<c||n>u))return!0;const f=e.max-e.min,p=s?Math.max(n-t,l):f;if(s&&p===l&&f<=l)return!0;const g=jg(p,{min:t,max:n,minLimit:c,maxLimit:u},o.originalScaleLimits[e.id]);return r.min=g.min,r.max=g.max,o.updatedScaleLimits[e.id]=g,e.parse(g.min)!==e.min||e.parse(g.max)!==e.max}function Ug(e,t,n,i){const s=Zl(e,t,n),o={min:e.min+s.min,max:e.max-s.max};return Re(e,o,i,!0)}function $g(e,t,n,i){const s=Bg(e,t,n);return Re(e,s,i,!0)}function Yg(e,t,n,i){Re(e,Wg(e,t,n),i,!0)}const la=e=>e===0||isNaN(e)?0:e<0?Math.min(Math.round(e),-1):Math.max(Math.round(e),1);function Xg(e){const n=e.getLabels().length-1;e.min>0&&(e.min-=1),e.max<n&&(e.max+=1)}function qg(e,t,n,i){const s=Zl(e,t,n);e.min===e.max&&t<1&&Xg(e);const o={min:e.min+la(s.min),max:e.max-la(s.max)};return Re(e,o,i,!0)}function Gg(e){return e.isHorizontal()?e.width:e.height}function Kg(e,t,n){const s=e.getLabels().length-1;let{min:o,max:r}=e;const a=Math.max(r-o,1),l=Math.round(Gg(e)/Math.max(a,10)),c=Math.round(Math.abs(t/l));let u;return t<-l?(r=Math.min(r+c,s),o=a===1?r:r-a,u=r===s):t>l&&(o=Math.max(0,o-c),r=a===1?o:o+a,u=o===0),Re(e,{min:o,max:r},n)||u}const Zg={second:500,minute:30*1e3,hour:1800*1e3,day:720*60*1e3,week:3.5*24*60*60*1e3,month:360*60*60*1e3,quarter:1440*60*60*1e3,year:4368*60*60*1e3};function Ql(e,t,n,i=!1){const{min:s,max:o,options:r}=e,a=r.time&&r.time.round,l=Zg[a]||0,c=e.getValueForPixel(e.getPixelForValue(s+l)-t),u=e.getValueForPixel(e.getPixelForValue(o+l)-t);return isNaN(c)||isNaN(u)?!0:Re(e,{min:c,max:u},n,i?"pan":!1)}function ca(e,t,n){return Ql(e,t,n,!0)}const Bs={category:qg,default:Ug,logarithmic:$g},Vs={default:Yg},Ws={category:Kg,default:Ql,logarithmic:ca,timeseries:ca};function Qg(e,t,n){const{id:i,options:{min:s,max:o}}=e;if(!t[i]||!n[i])return!0;const r=n[i];return r.min!==s||r.max!==o}function ua(e,t){z(e,(n,i)=>{t[i]||delete e[i]})}function rn(e,t){const{scales:n}=e,{originalScaleLimits:i,updatedScaleLimits:s}=t;return z(n,function(o){Qg(o,i,s)&&(i[o.id]={min:{scale:o.min,options:o.options.min},max:{scale:o.max,options:o.options.max}})}),ua(i,n),ua(s,n),i}function ha(e,t,n,i){const s=Bs[e.type]||Bs.default;I(s,[e,t,n,i])}function fa(e,t,n,i){const s=Vs[e.type]||Vs.default;I(s,[e,t,n,i])}function Jg(e){const t=e.chartArea;return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function xo(e,t,n="none",i="api"){const{x:s=1,y:o=1,focalPoint:r=Jg(e)}=typeof t=="number"?{x:t,y:t}:t,a=U(e),{options:{limits:l,zoom:c}}=a;rn(e,a);const u=s!==1,f=o!==1,p=ql(c,r,e);z(p||e.scales,function(g){g.isHorizontal()&&u?ha(g,s,r,l):!g.isHorizontal()&&f&&ha(g,o,r,l)}),e.update(n),I(c.onZoom,[{chart:e,trigger:i}])}function Jl(e,t,n,i="none",s="api"){const o=U(e),{options:{limits:r,zoom:a}}=o,{mode:l="xy"}=a;rn(e,o);const c=ue(l,"x",e),u=ue(l,"y",e);z(e.scales,function(f){f.isHorizontal()&&c?fa(f,t.x,n.x,r):!f.isHorizontal()&&u&&fa(f,t.y,n.y,r)}),e.update(i),I(a.onZoom,[{chart:e,trigger:s}])}function tm(e,t,n,i="none",s="api"){const o=U(e);rn(e,o);const r=e.scales[t];Re(r,n,void 0,!0),e.update(i),I(o.options.zoom?.onZoom,[{chart:e,trigger:s}])}function em(e,t="default"){const n=U(e),i=rn(e,n);z(e.scales,function(s){const o=s.options;i[s.id]?(o.min=i[s.id].min.options,o.max=i[s.id].max.options):(delete o.min,delete o.max),delete n.updatedScaleLimits[s.id]}),e.update(t),I(n.options.zoom.onZoomComplete,[{chart:e}])}function nm(e,t){const n=e.originalScaleLimits[t];if(!n)return;const{min:i,max:s}=n;return R(s.options,s.scale)-R(i.options,i.scale)}function im(e){const t=U(e);let n=1,i=1;return z(e.scales,function(s){const o=nm(t,s.id);if(o){const r=Math.round(o/(s.max-s.min)*100)/100;n=Math.min(n,r),i=Math.max(i,r)}}),n<1?n:i}function da(e,t,n,i){const{panDelta:s}=i,o=s[e.id]||0;ce(o)===ce(t)&&(t+=o);const r=Ws[e.type]||Ws.default;I(r,[e,t,n])?s[e.id]=0:s[e.id]=t}function tc(e,t,n,i="none"){const{x:s=0,y:o=0}=typeof t=="number"?{x:t,y:t}:t,r=U(e),{options:{pan:a,limits:l}}=r,{onPan:c}=a||{};rn(e,r);const u=s!==0,f=o!==0;z(n||e.scales,function(p){p.isHorizontal()&&u?da(p,s,l,r):!p.isHorizontal()&&f&&da(p,o,l,r)}),e.update(i),I(c,[{chart:e}])}function ec(e){const t=U(e);rn(e,t);const n={};for(const i of Object.keys(e.scales)){const{min:s,max:o}=t.originalScaleLimits[i]||{min:{},max:{}};n[i]={min:s.scale,max:o.scale}}return n}function sm(e){const t=U(e),n={};for(const i of Object.keys(e.scales))n[i]=t.updatedScaleLimits[i];return n}function om(e){const t=ec(e);for(const n of Object.keys(e.scales)){const{min:i,max:s}=t[n];if(i!==void 0&&e.scales[n].min!==i||s!==void 0&&e.scales[n].max!==s)return!0}return!1}function pa(e){const t=U(e);return t.panning||t.dragging}const ga=(e,t,n)=>Math.min(n,Math.max(t,e));function at(e,t){const{handlers:n}=U(e),i=n[t];i&&i.target&&(i.target.removeEventListener(t,i),delete n[t])}function On(e,t,n,i){const{handlers:s,options:o}=U(e),r=s[n];if(r&&r.target===t)return;at(e,n),s[n]=l=>i(e,l,o),s[n].target=t;const a=n==="wheel"?!1:void 0;t.addEventListener(n,s[n],{passive:a})}function rm(e,t){const n=U(e);n.dragStart&&(n.dragging=!0,n.dragEnd=t,e.update("none"))}function am(e,t){const n=U(e);!n.dragStart||t.key!=="Escape"||(at(e,"keydown"),n.dragging=!1,n.dragStart=n.dragEnd=null,e.update("none"))}function js(e,t){if(e.target!==t.canvas){const n=t.canvas.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}return It(e,t)}function nc(e,t,n){const{onZoomStart:i,onZoomRejected:s}=n;if(i){const o=js(t,e);if(I(i,[{chart:e,event:t,point:o}])===!1)return I(s,[{chart:e,event:t}]),!1}}function lm(e,t){if(e.legend){const o=It(t,e);if(Je(o,e.legend))return}const n=U(e),{pan:i,zoom:s={}}=n.options;if(t.button!==0||Xl(Rn(i),t)||yo(Rn(s.drag),t))return I(s.onZoomRejected,[{chart:e,event:t}]);nc(e,t,s)!==!1&&(n.dragStart=t,On(e,e.canvas.ownerDocument,"mousemove",rm),On(e,window.document,"keydown",am))}function cm({begin:e,end:t},n){let i=t.x-e.x,s=t.y-e.y;const o=Math.abs(i/s);o>n?i=Math.sign(i)*Math.abs(s*n):o<n&&(s=Math.sign(s)*Math.abs(i/n)),t.x=e.x+i,t.y=e.y+s}function ma(e,t,n,{min:i,max:s,prop:o}){e[i]=ga(Math.min(n.begin[o],n.end[o]),t[i],t[s]),e[s]=ga(Math.max(n.begin[o],n.end[o]),t[i],t[s])}function um(e,t,n){const i={begin:js(t.dragStart,e),end:js(t.dragEnd,e)};if(n){const s=e.chartArea.width/e.chartArea.height;cm(i,s)}return i}function ic(e,t,n,i){const s=ue(t,"x",e),o=ue(t,"y",e),{top:r,left:a,right:l,bottom:c,width:u,height:f}=e.chartArea,p={top:r,left:a,right:l,bottom:c},g=um(e,n,i&&s&&o);s&&ma(p,e.chartArea,g,{min:"left",max:"right",prop:"x"}),o&&ma(p,e.chartArea,g,{min:"top",max:"bottom",prop:"y"});const x=p.right-p.left,y=p.bottom-p.top;return{...p,width:x,height:y,zoomX:s&&x?1+(u-x)/u:1,zoomY:o&&y?1+(f-y)/f:1}}function hm(e,t){const n=U(e);if(!n.dragStart)return;at(e,"mousemove");const{mode:i,onZoomComplete:s,drag:{threshold:o=0,maintainAspectRatio:r}}=n.options.zoom,a=ic(e,i,{dragStart:n.dragStart,dragEnd:t},r),l=ue(i,"x",e)?a.width:0,c=ue(i,"y",e)?a.height:0,u=Math.sqrt(l*l+c*c);if(n.dragStart=n.dragEnd=null,u<=o){n.dragging=!1,e.update("none");return}Jl(e,{x:a.left,y:a.top},{x:a.right,y:a.bottom},"zoom","drag"),n.dragging=!1,n.filterNextClick=!0,I(s,[{chart:e}])}function fm(e,t,n){if(yo(Rn(n.wheel),t)){I(n.onZoomRejected,[{chart:e,event:t}]);return}if(nc(e,t,n)!==!1&&(t.cancelable&&t.preventDefault(),t.deltaY!==void 0))return!0}function dm(e,t){const{handlers:{onZoomComplete:n},options:{zoom:i}}=U(e);if(!fm(e,t,i))return;const s=t.target.getBoundingClientRect(),o=i.wheel.speed,r=t.deltaY>=0?2-1/(1-o):1+o,a={x:r,y:r,focalPoint:{x:t.clientX-s.left,y:t.clientY-s.top}};xo(e,a,"zoom","wheel"),I(n,[{chart:e}])}function pm(e,t,n,i){n&&(U(e).handlers[t]=zg(()=>I(n,[{chart:e}]),i))}function gm(e,t){const n=e.canvas,{wheel:i,drag:s,onZoomComplete:o}=t.zoom;i.enabled?(On(e,n,"wheel",dm),pm(e,"onZoomComplete",o,250)):at(e,"wheel"),s.enabled?(On(e,n,"mousedown",lm),On(e,n.ownerDocument,"mouseup",hm)):(at(e,"mousedown"),at(e,"mousemove"),at(e,"mouseup"),at(e,"keydown"))}function mm(e){at(e,"mousedown"),at(e,"mousemove"),at(e,"mouseup"),at(e,"wheel"),at(e,"click"),at(e,"keydown")}function bm(e,t){return function(n,i){const{pan:s,zoom:o={}}=t.options;if(!s||!s.enabled)return!1;const r=i&&i.srcEvent;return r&&!t.panning&&i.pointerType==="mouse"&&(yo(Rn(s),r)||Xl(Rn(o.drag),r))?(I(s.onPanRejected,[{chart:e,event:i}]),!1):!0}}function ym(e,t){const n=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY),s=n/i;let o,r;return s>.3&&s<1.7?o=r=!0:n>i?o=!0:r=!0,{x:o,y:r}}function sc(e,t,n){if(t.scale){const{center:i,pointers:s}=n,o=1/t.scale*n.scale,r=n.target.getBoundingClientRect(),a=ym(s[0],s[1]),l=t.options.zoom.mode,c={x:a.x&&ue(l,"x",e)?o:1,y:a.y&&ue(l,"y",e)?o:1,focalPoint:{x:i.x-r.left,y:i.y-r.top}};xo(e,c,"zoom","pinch"),t.scale=n.scale}}function xm(e,t,n){if(t.options.zoom.pinch.enabled){const i=It(n,e);I(t.options.zoom.onZoomStart,[{chart:e,event:n,point:i}])===!1?(t.scale=null,I(t.options.zoom.onZoomRejected,[{chart:e,event:n}])):t.scale=1}}function vm(e,t,n){t.scale&&(sc(e,t,n),t.scale=null,I(t.options.zoom.onZoomComplete,[{chart:e}]))}function oc(e,t,n){const i=t.delta;i&&(t.panning=!0,tc(e,{x:n.deltaX-i.x,y:n.deltaY-i.y},t.panScales),t.delta={x:n.deltaX,y:n.deltaY})}function _m(e,t,n){const{enabled:i,onPanStart:s,onPanRejected:o}=t.options.pan;if(!i)return;const r=n.target.getBoundingClientRect(),a={x:n.center.x-r.left,y:n.center.y-r.top};if(I(s,[{chart:e,event:n,point:a}])===!1)return I(o,[{chart:e,event:n}]);t.panScales=ql(t.options.pan,a,e),t.delta={x:0,y:0},oc(e,t,n)}function wm(e,t){t.delta=null,t.panning&&(t.panning=!1,t.filterNextClick=!0,I(t.options.pan.onPanComplete,[{chart:e}]))}const Us=new WeakMap;function ba(e,t){const n=U(e),i=e.canvas,{pan:s,zoom:o}=t,r=new Cn.Manager(i);o&&o.pinch.enabled&&(r.add(new Cn.Pinch),r.on("pinchstart",a=>xm(e,n,a)),r.on("pinch",a=>sc(e,n,a)),r.on("pinchend",a=>vm(e,n,a))),s&&s.enabled&&(r.add(new Cn.Pan({threshold:s.threshold,enable:bm(e,n)})),r.on("panstart",a=>_m(e,n,a)),r.on("panmove",a=>oc(e,n,a)),r.on("panend",()=>wm(e,n))),Us.set(e,r)}function ya(e){const t=Us.get(e);t&&(t.remove("pinchstart"),t.remove("pinch"),t.remove("pinchend"),t.remove("panstart"),t.remove("pan"),t.remove("panend"),t.destroy(),Us.delete(e))}function Sm(e,t){const{pan:n,zoom:i}=e,{pan:s,zoom:o}=t;return i?.zoom?.pinch?.enabled!==o?.zoom?.pinch?.enabled||n?.enabled!==s?.enabled||n?.threshold!==s?.threshold}var km="2.2.0";function ci(e,t,n){const i=n.zoom.drag,{dragStart:s,dragEnd:o}=U(e);if(i.drawTime!==t||!o)return;const{left:r,top:a,width:l,height:c}=ic(e,n.zoom.mode,{dragStart:s,dragEnd:o},i.maintainAspectRatio),u=e.ctx;u.save(),u.beginPath(),u.fillStyle=i.backgroundColor||"rgba(225,225,225,0.3)",u.fillRect(r,a,l,c),i.borderWidth>0&&(u.lineWidth=i.borderWidth,u.strokeStyle=i.borderColor||"rgba(225,225,225)",u.strokeRect(r,a,l,c)),u.restore()}var Tm={id:"zoom",version:km,defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(e,t,n){const i=U(e);i.options=n,Object.prototype.hasOwnProperty.call(n.zoom,"enabled")&&console.warn("The option \`zoom.enabled\` is no longer supported. Please use \`zoom.wheel.enabled\`, \`zoom.drag.enabled\`, or \`zoom.pinch.enabled\`."),(Object.prototype.hasOwnProperty.call(n.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(n.pan,"overScaleMode"))&&console.warn("The option \`overScaleMode\` is deprecated. Please use \`scaleMode\` instead (and update \`mode\` as desired)."),Cn&&ba(e,n),e.pan=(s,o,r)=>tc(e,s,o,r),e.zoom=(s,o)=>xo(e,s,o),e.zoomRect=(s,o,r)=>Jl(e,s,o,r),e.zoomScale=(s,o,r)=>tm(e,s,o,r),e.resetZoom=s=>em(e,s),e.getZoomLevel=()=>im(e),e.getInitialScaleBounds=()=>ec(e),e.getZoomedScaleBounds=()=>sm(e),e.isZoomedOrPanned=()=>om(e),e.isZoomingOrPanning=()=>pa(e)},beforeEvent(e,{event:t}){if(pa(e))return!1;if(t.type==="click"||t.type==="mouseup"){const n=U(e);if(n.filterNextClick)return n.filterNextClick=!1,!1}},beforeUpdate:function(e,t,n){const i=U(e),s=i.options;i.options=n,Sm(s,n)&&(ya(e),ba(e,n)),gm(e,n)},beforeDatasetsDraw(e,t,n){ci(e,"beforeDatasetsDraw",n)},afterDatasetsDraw(e,t,n){ci(e,"afterDatasetsDraw",n)},beforeDraw(e,t,n){ci(e,"beforeDraw",n)},afterDraw(e,t,n){ci(e,"afterDraw",n)},stop:function(e){mm(e),Cn&&ya(e),Hg(e)},panFunctions:Ws,zoomFunctions:Bs,zoomRectFunctions:Vs};function Mm({data:e,...t}){const n=Ze(null),i=Ze(null);return ut(()=>{zs.register(Tm,Pg,jd,Eg,cg,lg,gg,Sg);const s=i.current,o=n.current=new zs(s,{type:"line",data:e.peek(),options:{scales:{y:{min:0}},animation:!1,responsive:!0,plugins:{zoom:{pan:{enabled:!0,mode:"x"},zoom:{wheel:{enabled:!0},mode:"x"}},legend:{position:"top"},title:{display:!1}}}}),r=e.subscribe(a=>{o.data=a,o.update()});return()=>{o.destroy(),r()}},[]),m("canvas",{ref:i,...t})}function Em(){const e=fe();ut(()=>{const n=i=>{Pn(i)||e()};return $?.on("mount",n),$?.on("unmount",n),()=>{$?.off("mount",n),$?.off("unmount",n)}},[]);const t=$?.profilingContext;return m("div",{className:"flex flex-col gap-2"},Za(t.appStats).filter(([n])=>!Pn(n)).map(([n])=>m(Cm,{key:n.id,app:n})))}const xa=100,va=e=>Object.entries(e).map(([t,{values:n,color:i}])=>({label:t,data:n,fill:!1,borderColor:i,tension:.1}));function Cm({app:e}){const t=fe(),n=Ze({update:{values:[0],color:"#ad981f"},updateDirtied:{values:[0],color:"#b21f3a"},createNode:{values:[0],color:"#198019"},removeNode:{values:[0],color:"#5F3691"},updateNode:{values:[0],color:"#2f2f9d"},signalAttrUpdate:{values:[0],color:"#28888f"},signalTextUpdate:{values:[0],color:"#9b3b98"}}),i=J({labels:[(performance.now()/1e3).toFixed(2)],datasets:va(n.current)}),s=J(!1),o=$?.profilingContext;return ut(()=>{const r=a=>{a.id===e.id&&t()};return $?.on("update",r),()=>$?.off("update",r)},[]),ut(()=>{const r=[];Object.entries(n.current).forEach(([l,{values:c}])=>{const u=p=>{p.id===e.id&&s.peek()!==!0&&c[c.length-1]++},f=l;o.addEventListener(f,u),r.push(()=>o.removeEventListener(f,u))});const a=setInterval(()=>{if(s.peek()===!0)return;const l=[...i.value.labels];Object.values(n.current).forEach(c=>{c.values.push(0),c.values.length>xa&&c.values.shift()}),l.push((performance.now()/1e3).toFixed(2)),l.length>xa&&l.shift(),i.value={labels:l,datasets:va(n.current)}},100);return()=>{r.forEach(l=>l()),clearInterval(a)}},[]),m("div",{className:"flex flex-col gap-2 border border-white border-opacity-10 rounded bg-neutral-400 bg-opacity-5 text-neutral-400 p-2"},m("div",{className:"grid items-start gap-2",style:"grid-template-columns: 1fr max-content;"},m("div",{className:"flex flex-col gap-2"},m("span",null,e.name),m(Mm,{data:i,className:"w-full max-w-full min-h-20 bg-black bg-opacity-30",onmouseenter:()=>s.value=!0,onmouseleave:()=>s.value=!1})),m("div",{className:"text-xs grid grid-cols-2 gap-x-4",style:"grid-template-columns: auto auto;"},m("span",{className:"text-right"},"Mount duration:"),o.mountDuration(e).toFixed(2)," ms",m("span",{className:"text-right"},"Total updates:"),m("span",null,o.totalTicks(e).toLocaleString()),m("span",{className:"text-right"},"Avg. update duration:"),o.averageTickDuration(e).toFixed(2)," ms",m("span",{className:"text-right"},"Latest update:"),m("span",null,o.lastTickDuration(e).toFixed(2)," ms"))))}const xn=ht([]),rc=ht(""),Om=Ga(()=>rc.value.toLowerCase().split(" ").filter(e=>e.length>0));function Pm(e){return Om.value.every(t=>e.toLowerCase().includes(t))}function Dm(){const e=fe();ut(()=>{const n=i=>{Pn(i)||e()};return $?.on("update",n),()=>$?.off("update",n)},[]);const t=$?.SWRGlobalCache??new Map;return t.size===0?m("div",{className:"flex flex-col items-center justify-center h-full text-neutral-400"},m(Qa,null),m("h2",{className:"text-lg italic"},"No SWR detected")):m("div",{className:"flex flex-col gap-2 items-start"},m(ol,{value:rc,className:"sticky top-0"}),m("div",{className:"flex flex-col gap-2 w-full"},Za(t).filter(([n])=>Pm(n)).map(([n,i])=>m(Am,{key:n,entry:i}))))}function Am({key:e,entry:t}){const n=xn.value.includes(e),i=fe();ut(()=>{const{resource:o,isValidating:r,isMutating:a}=t,l=[o.subscribe(i),r.subscribe(i),a.subscribe(i)];return()=>l.forEach(c=>c())},[]);const s=We(()=>{n?xn.value=xn.value.filter(o=>o!==e):xn.value=[...xn.value,e]},[n]);return m("div",{className:"flex flex-col"},m("button",{onclick:s,className:"flex items-center gap-2 justify-between p-2 border border-white border-opacity-10 cursor-pointer"+(n?" bg-white bg-opacity-5 text-neutral-100 rounded-t":" hover:bg-white hover:bg-opacity-10 text-neutral-400 rounded")},e,m(ae,{className:"transition-all"+(n?" rotate-90":"")})),n&&m("div",{className:"flex flex-col gap-2 p-2 border border-white border-opacity-10"},m(Ie,{data:{resource:t.resource.peek(),isMutating:t.isMutating.peek(),isValidating:t.isValidating.peek()},mutable:!1,objectRefAcc:[],keys:[],onChange:()=>{}})))}const Im=e=>m("main",{className:"flex flex-col flex-1 max-h-[calc(100vh-1rem)] overflow-y-auto",style:e.active?{}:{display:"none"}},e.children),$s={Apps:{Icon:$u,View:kh},Stores:{Icon:Zu,View:Eh},SWR:{Icon:Gu,View:Dm},Profiling:{Icon:qu,View:Em},Settings:{Icon:Yu,View:Ju}},Ci=ht("Apps");let _a=se.peek();se.subscribe(e=>{e!==_a&&e!==null&&(Ci.value="Apps"),_a=e});function Lm(){return m(Qu,null,m("nav",{className:"flex flex-col gap-2 justify-between p-2 bg-neutral-400 bg-opacity-5 border border-white border-opacity-10 rounded"},m("div",{className:"flex flex-col gap-2"},Object.keys($s).map(e=>m(Rm,{key:e,title:e})))),Object.entries($s).map(([e,{View:t}])=>m(Im,{key:e,active:Ci.value===e},m(t,null))))}function Rm({title:e}){const{Icon:t}=$s[e];return m("button",{key:e,onclick:()=>{Ci.value=e},className:"flex items-center px-2 py-1 gap-2 rounded border text-xs border-white border-opacity-10"+(Ci.value===e?" bg-white bg-opacity-5 text-neutral-100":" hover:bg-white hover:bg-opacity-10 text-neutral-400"),title:e},m(t,{className:"text-primary"}),m("span",{className:"hidden sm:inline"},e))}Bu(m(Lm,null),document.getElementById("app"));Qe.send({type:"ready"});setInterval(()=>{window.opener||window.close()},250);</script>
|
|
3574
|
-
<style rel="stylesheet" crossorigin>*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.z-10{z-index:10}.z-\\[9999\\]{z-index:9999}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ml-6{margin-left:1.5rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-5{height:1.25rem}.h-full{height:100%}.max-h-\\[calc\\(100vh-1rem\\)\\]{max-height:calc(100vh - 1rem)}.min-h-20{min-height:5rem}.min-h-screen{min-height:100vh}.w-5{width:1.25rem}.w-8{width:2rem}.w-\\[5px\\]{width:5px}.w-full{width:100%}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.scroll-m-12{scroll-margin:3rem}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-\\[\\#fff1\\]{border-color:#fff1}.border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity, 1))}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-opacity-10{--tw-border-opacity: .1}.bg-\\[\\#171616\\]{--tw-bg-opacity: 1;background-color:rgb(23 22 22 / var(--tw-bg-opacity, 1))}.bg-\\[\\#1a1a1a\\]{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.bg-\\[\\#1d1d1d\\]{--tw-bg-opacity: 1;background-color:rgb(29 29 29 / var(--tw-bg-opacity, 1))}.bg-\\[\\#212121\\]{--tw-bg-opacity: 1;background-color:rgb(33 33 33 / var(--tw-bg-opacity, 1))}.bg-\\[\\#ffffff04\\]{background-color:#ffffff04}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-neutral-400{--tw-bg-opacity: 1;background-color:rgb(163 163 163 / var(--tw-bg-opacity, 1))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(220 20 60 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-30{--tw-bg-opacity: .3}.bg-opacity-5{--tw-bg-opacity: .05}.p-1{padding:.25rem}.p-2{padding:.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.text-right{text-align:right}.text-\\[10px\\]{font-size:10px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.italic{font-style:italic}.text-neutral-100{--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:rgb(220 20 60 / var(--tw-text-opacity, 1))}.accent-red-500{accent-color:#ef4444}.opacity-50{opacity:.5}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{color-scheme:dark}#app{min-width:-moz-fit-content;min-width:fit-content;background-image:linear-gradient(#171616,#0e0e0e);color:#fff;min-height:100vh;width:100%;display:flex;flex-direction:row;padding:.5rem;gap:.5rem}select{background:url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat;background-position:calc(100% - .75rem) center!important;-moz-appearance:none!important;-webkit-appearance:none!important;appearance:none!important;padding-right:2rem!important}select:not([disabled]){cursor:pointer}.last\\:border-b-0:last-child{border-bottom-width:0px}.hover\\:bg-neutral-700:hover{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.hover\\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\\:bg-opacity-10:hover{--tw-bg-opacity: .1}.hover\\:opacity-100:hover{opacity:1}.focus\\:outline:focus{outline-style:solid}.focus\\:outline-primary:focus{outline-color:#dc143c}@media (min-width: 640px){.sm\\:inline{display:inline}}</style>
|
|
3575
|
-
</head>
|
|
3576
|
-
<body class="w-full min-h-screen">
|
|
3577
|
-
<div id="app"></div>
|
|
3578
|
-
<div id="portal-root"></div>
|
|
3579
|
-
</body>
|
|
3580
|
-
</html>
|
|
3581
|
-
`;
|
|
2395
|
+
// ../devtools-client/dist/index.js
|
|
2396
|
+
var dist_default = `<!DOCTYPE html>
|
|
2397
|
+
<html lang="en">
|
|
2398
|
+
<head>
|
|
2399
|
+
<meta charset="UTF-8" />
|
|
2400
|
+
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
|
|
2401
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
2402
|
+
<title>Kiru Devtools</title>
|
|
2403
|
+
<script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();const Lc="production",he=Lc==="development",wa=Symbol.for("kiru.signal"),Rc=Symbol.for("kiru.context"),Oi=Symbol.for("kiru.contextProvider"),$e=Symbol.for("kiru.fragment"),Sa=Symbol.for("kiru.error"),ka=Symbol.for("kiru.memo"),Ys=Symbol.for("kiru.errorBoundary"),Nc=50,ne=2,St=4,Pi=8,re=16,Ta=32,as=64,Ye=128,zc=/^on:?/,Ma=new Set(["animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","path","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","title","tspan","use"]),Fc=new Set(["allowfullscreen","autofocus","autoplay","async","checked","compact","controls","contenteditable","declare","default","defer","disabled","download","hidden","inert","ismap","multiple","nohref","noresize","noshade","novalidate","nowrap","open","popover","readonly","required","sandbox","scoped","selected","sortable","spellcheck","translate","wrap"]),Hc=new Map([["acceptCharset","accept-charset"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["httpEquiv","http-equiv"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]);function Bc(e){return typeof e=="string"||typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"||e===void 0||e===null}const De={current:null},Ea={current:0},Xt={current:"window"in globalThis?"dom":"string"};var Ca;class Xe extends Error{constructor(t){const n=typeof t=="string"?t:t.message;super(n),this[Ca]=!0,typeof t!="string"&&(this.fatal=t?.fatal)}static isKiruError(t){return t instanceof Error&&t[Sa]===!0}}Ca=Sa;const qe={parentStack:[],childIdxStack:[],eventDeferrals:new Map,parent:function(){return this.parentStack[this.parentStack.length-1]},clear:function(){this.parentStack.length=0,this.childIdxStack.length=0},pop:function(){this.parentStack.pop(),this.childIdxStack.pop()},push:function(e){this.parentStack.push(e),this.childIdxStack.push(0)},currentChild:function(){return this.parentStack[this.parentStack.length-1].childNodes[this.childIdxStack[this.childIdxStack.length-1]]},nextChild:function(){return this.parentStack[this.parentStack.length-1].childNodes[this.childIdxStack[this.childIdxStack.length-1]++]},bumpChildIndex:function(){this.childIdxStack[this.childIdxStack.length-1]++},captureEvents:function(e){Ho(e,!0),this.eventDeferrals.set(e,[])},resetEvents:function(e){this.eventDeferrals.delete(e)},releaseEvents:function(e){Ho(e,!1);const t=this.eventDeferrals.get(e);for(;t?.length;)t.shift()()}},Vc=e=>{const t=e.target;!e.isTrusted||!t||qe.eventDeferrals.get(t)?.push(()=>t.dispatchEvent(e))},Ho=(e,t)=>{for(const n in e)if(n.startsWith("on")){const i=n.substring(2);e[t?"addEventListener":"removeEventListener"](i,Vc,{passive:!0})}};let Xs=!1,ls=!1;const Oa=e=>{e.preventDefault(),e.stopPropagation(),ls=!0};let Te=null;function Wc(){Xs=!0,Te=document.activeElement,Te&&Te!==document.body&&Te.addEventListener("blur",Oa)}function jc(){ls&&(Te.removeEventListener("blur",Oa),Te.isConnected&&Te.focus(),ls=!1),Xs=!1}function cs(e,t){if(typeof e=="function"){e(t);return}if(W.isSignal(e)){e.sneak(t),e.notify({filter:n=>typeof n=="function"});return}e.current=t}function Uc(e){const t=e.type;return t=="#text"?Pa(e):Ma.has(t)?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t)}function Pa(e){const{nodeValue:t}=e.props;if(!W.isSignal(t))return document.createTextNode(t);const n=t.peek()??"",i=document.createTextNode(n);return hs(e,i,t),i}function $c(e,t,n){const i=us.get(e)??{},s=i[t]=o=>{if(Xs){o.preventDefault(),o.stopPropagation();return}n(o)};return us.set(e,i),s}const us=new WeakMap;function Da(e){const t=e.dom,n=e.prev?.props??{},i=e.props??{},s=new Set([...Object.keys(n),...Object.keys(i)]),o=Xt.current==="hydrate";s.forEach(r=>{const a=n[r],l=i[r];if(gi.internalProps.includes(r)&&r!=="innerHTML"){r==="ref"&&a!==l&&(a&&cs(a,null),l&&cs(l,t));return}if(gi.isEvent(r)){if(a!==l||Xt.current==="hydrate"){const c=r.replace(zc,""),u=c==="focus"||c==="blur";r in n&&t.removeEventListener(c,u?us.get(e)?.[c]:a),r in i&&t.addEventListener(c,u?$c(e,c,l):l)}return}if(!(t instanceof Text)){if(a===l||o&&t.getAttribute(r)===l)return;if(W.isSignal(a)&&e.cleanups){const c=e.cleanups[r];c&&(c(),delete e.cleanups[r])}if(W.isSignal(l))return Gc(e,t,r,l,a);ui(t,r,l,a);return}W.isSignal(l)||t.nodeValue!==l&&(t.nodeValue=l)})}function Yc(e){return e.multiple?Array.from(e.selectedOptions).map(t=>t.value):e.value}function Aa(e,t){if(!e.multiple||t===void 0||t===null||t===""){e.value=t;return}Array.from(e.options).forEach(n=>{n.selected=t.indexOf(n.value)>-1})}const Xc={value:"input",checked:"change",open:"toggle",volume:"volumechange",playbackRate:"ratechange",currentTime:"timeupdate"},qc=["progress","meter","number","range"];function Gc(e,t,n,i,s){const o=e.cleanups??(e.cleanups={}),[r,a]=n.split(":");if(r!=="bind")return o[n]=i.subscribe((y,v)=>{ui(t,n,y,v)}),ui(t,n,i.peek(),Ke(s));const l=Xc[a];if(!l)return;const c=t instanceof HTMLSelectElement,u=c?y=>Aa(t,y):y=>t[a]=y,f=y=>{u(y)},p=y=>{i.sneak(y),i.notify({filter:v=>v!==f})};let g;if(a==="value"){const y=qc.indexOf(t.type)!==-1;g=()=>{let v=t.value;c?v=Yc(t):typeof i.peek()=="number"&&y&&(v=t.valueAsNumber),p(v)}}else g=y=>{const v=y.target[a];a==="currentTime"&&i.peek()===v||p(v)};t.addEventListener(l,g);const x=i.subscribe(f);return o[n]=()=>{t.removeEventListener(l,g),x()},ui(t,a,i.peek(),Ke(s))}function hs(e,t,n){(e.cleanups??(e.cleanups={})).nodeValue=n.subscribe((i,s)=>{i!==s&&(t.nodeValue=i)})}function Kc(e){if(e.type!=="#text"||!W.isSignal(e.props.nodeValue))return;const t=Ke(e.props.nodeValue);if(!Bc(t))return;const n=Pa(e),i=qe.parent();return i&&i.appendChild(n),n}function Zc(e){const t=qe.nextChild()??Kc(e);if(!t)throw new Xe({message:"Hydration mismatch - no node found",vNode:e});let n=t.nodeName;if(Ma.has(n)||(n=n.toLowerCase()),e.type!==n)throw new Xe({message:\`Hydration mismatch - expected node of type \${e.type.toString()} but received \${n}\`,vNode:e});if(e.dom=t,e.type!=="#text"&&!(e.flags&re)){Da(e);return}W.isSignal(e.props.nodeValue)&&hs(e,t,e.props.nodeValue);let i=e,s=e.sibling;for(;s&&s.type==="#text";){const o=s;qe.bumpChildIndex();const r=String(Ke(i.props.nodeValue)??""),a=i.dom.splitText(r.length);o.dom=a,W.isSignal(o.props.nodeValue)&&hs(o,a,o.props.nodeValue),i=s,s=s.sibling}}function Ia(e,t,n,i=!1){if(n===null)return e.removeAttribute(t),!0;switch(typeof n){case"undefined":case"function":case"symbol":return e.removeAttribute(t),!0;case"boolean":if(i&&!n)return e.removeAttribute(t),!0}return!1}function Qc(e,t,n){const i=Fc.has(t);Ia(e,t,n,i)||e.setAttribute(t,i&&typeof n=="boolean"?"":String(n))}const Jc=["INPUT","TEXTAREA"],tu=e=>Jc.indexOf(e.nodeName)>-1;function ui(e,t,n,i){if(n!==i)switch(t){case"style":return iu(e,n,i);case"className":return nu(e,n);case"innerHTML":return eu(e,n);case"muted":e.muted=!!n;return;case"value":if(e.nodeName==="SELECT")return Aa(e,n);const s=n==null?"":String(n);if(tu(e)){e.value=s;return}e.setAttribute("value",s);return;case"checked":if(e.nodeName==="INPUT"){e.checked=!!n;return}e.setAttribute("checked",String(n));return;default:return Qc(e,Tu(t),n)}}function eu(e,t){if(t==null||typeof t=="boolean"){e.innerHTML="";return}e.innerHTML=String(t)}function nu(e,t){const n=Ke(t);if(!n)return e.removeAttribute("class");e.setAttribute("class",n)}function iu(e,t,n){if(Ia(e,"style",t))return;if(typeof t=="string"){e.setAttribute("style",t);return}let i={};typeof n=="string"?e.setAttribute("style",""):typeof n=="object"&&n&&(i=n);const s=t;new Set([...Object.keys(i),...Object.keys(s)]).forEach(r=>{const a=i[r],l=s[r];if(a!==l){if(l===void 0){e.style[r]="";return}e.style[r]=l}})}function su(e){let t=e.parent,n=t?.dom;for(;t&&!n;)t=t.parent,n=t?.dom;if(!n||!t){if(!e.parent&&e.dom)return e;throw new Xe({message:"No DOM parent found while attempting to place node.",vNode:e})}return t}function ou(e,t){const{node:n,lastChild:i}=t,s=e.dom;if(i){i.after(s);return}const o=La(e,n);if(o){n.dom.insertBefore(s,o);return}n.dom.appendChild(s)}function La(e,t){let n=e;for(;n;){let i=n.sibling;for(;i;){if(!(i.flags&(St|re))){const s=ru(i);if(s?.isConnected)return s}i=i.sibling}if(n=n.parent,!n||n.flags&re||n===t)return}}function ru(e){let t=e;for(;t;){if(t.dom)return t.dom;if(t.flags&re)return;t=t.child}}function au(e){if(Xt.current==="hydrate")return Ii(e,mi);const t={node:e.dom?e:su(e)};fs(e,t,(e.flags&St)>0),e.dom&&!(e.flags&re)&&Ra(e,t,!1),mi(e)}function fs(e,t,n){let i=e.child;for(;i;){if(i.flags&as){i.flags&St&&cu(i,t),mi(i),i=i.sibling;continue}i.dom?(fs(i,{node:i},!1),i.flags&re||Ra(i,t,n)):fs(i,t,(i.flags&St)>0||n),mi(i),i=i.sibling}}function Ra(e,t,n){(n||!e.dom.isConnected||e.flags&St)&&ou(e,t),(!e.prev||e.flags&ne)&&Da(e),t.lastChild=e.dom}function lu(e){e===e.parent?.child&&(e.parent.child=e.sibling),Ii(e,t=>{const{hooks:n,subs:i,cleanups:s,dom:o,props:{ref:r}}=t;for(i?.forEach(a=>a()),s&&Object.values(s).forEach(a=>a());n?.length;)n.pop().cleanup?.();o&&(r&&cs(r,null),o.isConnected&&!(t.flags&re)&&o.remove(),delete t.dom)}),e.parent=null}function cu(e,t){if(!e.child)return;const n=[];if(Na(e.child,n),n.length===0)return;const{node:i,lastChild:s}=t;if(s)s.after(...n);else{const o=La(e,i),r=i.dom;o?o.before(...n):r.append(...n)}t.lastChild=n[n.length-1]}function Na(e,t){let n=e;for(;n;)n.dom?t.push(n.dom):n.child&&Na(n.child,t),n=n.sibling}function uu(e){return typeof e=="function"&&typeof e[ka]?.arePropsEqual=="function"}function m(e,t=null,...n){if(e===kt)return kt({children:n,...t});const i={type:e,flags:0,index:0,depth:0,props:{},parent:null,sibling:null,child:null,prev:null,deletions:null};if(uu(e)&&(i.flags|=Ta,i.arePropsEqual=e[ka].arePropsEqual),t!==null){const{key:o,ref:r,...a}=t;Iu(o)&&(i.props.key=o.toString()),Lu(r)&&(i.props.ref=r),Object.assign(i.props,a)}const s=n.length===1?n[0]:n.length>1?n:null;return s!==null&&(i.props.children=s),i}function kt({children:e,key:t}){return m($e,t?{key:t}:null,e)}function qs(e,t){return Array.isArray(t)?fu(e,t):hu(e,t)}function hu(e,t){const n=e.child;if(n===null)return Ha(e,t);const i=n.sibling,s=za(e,n,t);if(s!==null)return n&&n!==s&&!s.prev?ds(e,n):i&&ds(e,i),s;{const o=Wa(n),r=Ba(o,e,0,t);if(r!==null){const a=r.prev;if(a!==null){const l=a.props.key;o.delete(l===void 0?a.index:l)}hi(r,0,0)}return o.forEach(a=>pi(e,a)),r}}function fu(e,t){let n=null,i=null,s=e.child,o=null,r=0,a=0;for(;s!==null&&a<t.length;a++){s.index>a?(o=s,s=null):o=s.sibling;const c=za(e,s,t[a]);if(c===null){s===null&&(s=o);break}s&&!c.prev&&pi(e,s),r=hi(c,r,a),i===null?n=c:i.sibling=c,i=c,s=o}if(a===t.length)return ds(e,s),n;if(s===null){for(;a<t.length;a++){const c=Ha(e,t[a]);c!==null&&(r=hi(c,r,a),i===null?n=c:i.sibling=c,i=c)}return n}const l=Wa(s);for(;a<t.length;a++){const c=Ba(l,e,a,t[a]);if(c!==null){const u=c.prev;if(u!==null){const f=u.props.key;l.delete(f===void 0?u.index:f)}r=hi(c,r,a),i===null?n=c:i.sibling=c,i=c}}return l.forEach(c=>pi(e,c)),n}function za(e,t,n){const i=t?.props.key;return Ks(n)?i!==void 0||t?.type==="#text"&&W.isSignal(t.props.nodeValue)?null:Bo(e,t,""+n):W.isSignal(n)?t&&t.props.nodeValue!==n?null:Bo(e,t,n):Gs(n)?n.props.key!==i?null:du(e,t,n):Array.isArray(n)?i!==void 0?null:Fa(e,t,n):null}function Bo(e,t,n){if(t===null||t.type!=="#text"){const s=m("#text",{nodeValue:n});return Nt(s,e),s}return t.props.nodeValue!==n&&(t.props.nodeValue=n,t.flags|=ne),t.sibling=null,t}function du(e,t,n){let{type:i,props:s}=n;if(i===$e)return Fa(e,t,s.children||[],s);if(t?.type===i)return t.index=0,t.sibling=null,typeof i=="string"?Va(t.props,s)&&(t.flags|=ne):t.flags|=ne,t.props=s,t.memoizedProps=n.memoizedProps,t;const o=m(i,s);return Nt(o,e),o}function Fa(e,t,n,i={}){if(t===null||t.type!==$e){const s=m($e,{children:n,...i});return Nt(s,e),s}return t.props={...t.props,...i,children:n},t.flags|=ne,t.sibling=null,t}function Ha(e,t){if(Ks(t)){const n=m("#text",{nodeValue:""+t});return Nt(n,e),n}if(W.isSignal(t)){const n=m("#text",{nodeValue:t});return Nt(n,e),n}if(Gs(t)){const n=m(t.type,t.props);return Nt(n,e),n.flags|=St,n}if(Array.isArray(t)){const n=kt({children:t});return Nt(n,e),n}return null}function hi(e,t,n){e.index=n;const i=e.prev;if(i!==null){const s=i.index;return s<t?(e.flags|=St,t):s}else return e.flags|=St,t}function Ba(e,t,n,i){if(W.isSignal(i)||Ks(i)){const o=e.get(n);if(o){if(o.props.nodeValue===i)return o;o.type==="#text"&&W.isSignal(o.props.nodeValue)&&o.cleanups?.nodeValue?.()}const r=m("#text",{nodeValue:i});return Nt(r,t),r.flags|=St,r.index=n,r}if(Gs(i)){const{type:o,props:r}=i,a=r.key,l=e.get(a===void 0?n:a);if(l?.type===o)return typeof o=="string"?Va(l.props,r)&&(l.flags|=ne):l.flags|=ne,l.props=r,l.sibling=null,l.index=n,l;const c=m(i.type,i.props);return Nt(c,t),c.flags|=St,c.index=n,c}if(Array.isArray(i)){const o=e.get(n);if(o)return o.flags|=ne,o.props.children=i,o;const r=kt({children:i});return Nt(r,t),r.flags|=St,r.index=n,r}return null}function Va(e,t){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!0;for(let s of n)if(!(s==="children"||s==="key")&&e[s]!==t[s])return!0;return!1}function Nt(e,t){e.parent=t,e.depth=t.depth+1}function Wa(e){const t=new Map;for(;e;){const n=e.props.key;t.set(n===void 0?e.index:n,e),e=e.sibling}return t}function pi(e,t){e.deletions===null?e.deletions=[t]:e.deletions.push(t)}function ds(e,t){for(;t;)pi(e,t),t=t.sibling}let Yt=[],Ge=!1,ps=[],gs=[],ms=!1,bs=!1,ys=!1,xs=0,ja=[],vs=[],Ua=-1;function pu(e){if(Ge){ps.push(e);return}e()}function $a(){Ge&&(window.cancelAnimationFrame(Ua),Ya())}function Vo(e){e.flags|=Ye,Yt.push(e),Ge=!0,$a()}function Di(e){if(Xt.current==="hydrate")return pu(()=>_s(e));_s(e)}function gu(){Ge||(Ge=!0,Ua=window.requestAnimationFrame(Ya))}function mu(){for(Ge=!1;ps.length;)ps.shift()()}function _s(e){if(ms&&(bs=!0),De.current===e){ys=!0;return}if(!(e.flags&(Ye|Pi))){if(e.flags|=Ye,!Yt.length)return Yt.push(e),gu();Yt.push(e)}}function bu(e){Ii(e,t=>t.flags|=Pi),gs.push(e)}const yu=(e,t)=>t.depth-e.depth;let Jt=null;function Ya(){let e=1;for(Wc();Yt.length;){Yt.length>e&&Yt.sort(yu),Jt=Yt.shift(),e=Yt.length;const t=Jt.flags;if(!(t&Pi)&&t&Ye){let n=Jt;for(;n=xu(n););for(;gs.length;)lu(gs.pop());au(Jt),Jt.flags&=~Ye}}if(jc(),ms=!0,qi(ja),ms=!1,bs)return Su(),qi(vs),bs=!1,xs++,$a();xs=0,mu(),qi(vs)}function xu(e){let t=!0;try{typeof e.type=="string"?wu(e):Eu(e.type)?vu(e):t=_u(e)}catch(i){const s=Au(e);if(s){const o=s.error=i instanceof Error?i:new Error(String(i));return s.props.onError?.(o),s.depth<Jt.depth&&(Jt=s),s}if(Xe.isKiruError(i)){if(i.customNodeStack&&setTimeout(()=>{throw new Error(i.customNodeStack)}),i.fatal)throw i;console.error(i);return}setTimeout(()=>{throw i})}if(e.deletions!==null&&(e.deletions.forEach(bu),e.deletions=null),t&&e.child)return e.child;let n=e;for(;n;){if(n.immediateEffects&&(ja.push(...n.immediateEffects),n.immediateEffects=void 0),n.effects&&(vs.push(...n.effects),n.effects=void 0),n===Jt)return;if(n.sibling)return n.sibling;n=n.parent,Xt.current==="hydrate"&&n?.dom&&qe.pop()}}function vu(e){const{props:t,type:n}=e;let i=t.children;if(n===Oi){const{props:{dependents:s,value:o},prev:r}=e;s.size&&r&&r.props.value!==o&&s.forEach(_s)}else if(n===Ys){const s=e,{error:o}=s;o&&(i=typeof t.fallback=="function"?t.fallback(o):t.fallback,delete s.error)}e.child=qs(e,i)}function _u(e){const{type:t,props:n,subs:i,prev:s,flags:o}=e;if(o&Ta){if(e.memoizedProps=n,s?.memoizedProps&&e.arePropsEqual(s.memoizedProps,n)&&!e.hmrUpdated)return e.flags|=as,!1;e.flags&=~as}try{De.current=e;let r,a=0;do e.flags&=~Ye,ys=!1,Ea.current=0,i&&(i.forEach(l=>l()),i.clear()),r=t(n);while(ys);return e.child=qs(e,r),!0}finally{De.current=null}}function wu(e){const{props:t,type:n}=e;e.dom||(Xt.current==="hydrate"?Zc(e):e.dom=Uc(e)),n!=="#text"&&(e.child=qs(e,t.children),e.child&&Xt.current==="hydrate"&&qe.push(e.dom))}function Su(){if(xs>Nc)throw new Xe("Maximum update depth exceeded. This can happen when a component repeatedly calls setState during render or in useLayoutEffect. Kiru limits the number of nested updates to prevent infinite loops.")}function qi(e){for(let t=0;t<e.length;t++)e[t]();e.length=0}var Wo;(function(e){e.Start="start",e.End="end"})(Wo||(Wo={}));const fe=()=>{const e=De.current;return e||Xa("useRequestUpdate"),()=>Di(e)};function Ft(e,t,n){const i=De.current;i||Xa(e);const s=(a,l)=>{if(l?.immediate){(i.immediateEffects??(i.immediateEffects=[])).push(a);return}(i.effects??(i.effects=[])).push(a)},o=Ea.current++;let r=i.hooks?.at(o);try{const a=r??(typeof t=="function"?t():{...t});return i.hooks??(i.hooks=[]),i.hooks[o]=a,n({hook:a,isInit:!r,update:()=>Di(i),queueEffect:s,vNode:i,index:o})}catch(a){throw a}}function Xa(e){throw new Xe(\`Hook "\${e}" must be used at the top level of a component or inside another composite hook.\`)}function Ai(e){e.cleanup&&(e.cleanup(),e.cleanup=void 0)}function nn(e,t){return e===void 0||t===void 0||e.length!==t.length||e.length>0&&t.some((n,i)=>!Object.is(n,e[i]))}const ws={stack:new Array,current:function(){return this.stack[this.stack.length-1]}},Ve=new Map;var qa;class W{constructor(t,n){this[qa]=!0,this.$id=Nu(),this.$value=t,n&&(this.displayName=n),this.$subs=new Set}get value(){return this.onBeforeRead?.(),W.entangle(this),this.$value}set value(t){Object.is(this.$value,t)||(this.$prevValue=this.$value,this.$value=t,this.notify())}peek(){return this.onBeforeRead?.(),this.$value}sneak(t){this.$prevValue=this.$value,this.$value=t}toString(){return this.onBeforeRead?.(),W.entangle(this),\`\${this.$value}\`}subscribe(t){return this.$subs.add(t),()=>this.$subs.delete(t)}notify(t){this.$subs.forEach(n=>{if(!(t?.filter&&!t.filter(n)))return n(this.$value,this.$prevValue)})}static isSignal(t){return typeof t=="object"&&!!t&&wa in t}static subscribers(t){return t.$subs}static makeReadonly(t){const n=Object.getOwnPropertyDescriptor(t,"value");return n&&!n.writable?t:Object.defineProperty(t,"value",{get:function(){return W.entangle(this),this.$value},configurable:!0})}static makeWritable(t){const n=Object.getOwnPropertyDescriptor(t,"value");return n&&n.writable?t:Object.defineProperty(t,"value",{get:function(){return W.entangle(this),this.$value},set:function(i){this.$value=i,this.notify()},configurable:!0})}static entangle(t){const n=De.current,i=ws.current();if(i){(!n||n&&Tt())&&i.set(t.$id,t);return}if(!n||!Tt())return;const s=t.subscribe(()=>Di(n));(n.subs??(n.subs=new Set)).add(s)}static configure(t,n){t.onBeforeRead=n}static dispose(t){t.$isDisposed=!0,t.$subs.clear()}}qa=wa;const ht=(e,t)=>new W(e,t),J=(e,t)=>Ft("useSignal",{signal:null},({hook:n,isInit:i,isHMR:s})=>(i&&(n.cleanup=()=>W.dispose(n.signal),n.signal=new W(e,t)),n.signal));function Ke(e,t=!1){return W.isSignal(e)?t?e.value:e.peek():e}const ku=()=>{Ve.forEach(e=>e()),Ve.clear()},gi={internalProps:["children","ref","key","innerHTML"],isEvent:e=>e.startsWith("on"),isProperty:e=>!gi.internalProps.includes(e)&&!gi.isEvent(e)};function Tu(e){switch(e){case"className":return"class";case"htmlFor":return"for";case"tabIndex":case"formAction":case"formMethod":case"formEncType":case"contentEditable":case"spellCheck":case"allowFullScreen":case"autoPlay":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"noModule":case"noValidate":case"popoverTarget":case"popoverTargetAction":case"playsInline":case"readOnly":case"itemscope":case"rowSpan":case"crossOrigin":return e.toLowerCase();default:return e.indexOf("-")>-1?e:e.startsWith("aria")?"aria-"+e.substring(4).toLowerCase():Hc.get(e)||e}}function Tt(){return Xt.current==="dom"||Xt.current==="hydrate"}function Mu(e){return(e.flags&Pi)!==0}function Gs(e){return typeof e=="object"&&e!==null&&"type"in e}function Ks(e){return typeof e=="string"&&e!==""||typeof e=="number"||typeof e=="bigint"}function Eu(e){return e===$e||e===Oi||e===Ys}function Cu(e){return e.type===$e}function Ou(e){return typeof e.type=="function"&&"displayName"in e.type&&e.type.displayName==="Kiru.lazy"}function Pu(e){return typeof e.type=="function"&&"displayName"in e.type&&e.type.displayName==="Kiru.memo"}function mi(e){const{props:{children:t,...n},memoizedProps:i,index:s}=e;e.prev={props:n,memoizedProps:i,index:s},e.flags&=-15}function Ii(e,t){t(e);let n=e.child;for(;n;)t(n),n.child&&Ii(n,t),n=n.sibling}function Du(e,t){let n=e.parent;for(;n;){if(t(n))return n;n=n.parent}return null}function Au(e){return Du(e,t=>t.type===Ys)}function Iu(e){return typeof e=="string"||typeof e=="number"}function Lu(e){return typeof e=="function"||typeof e=="object"&&!!e&&"current"in e||W.isSignal(e)}const Ru="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz-";function Nu(e=10,t=Ru){let n="";for(let i=0;i<e;i++)n+=t[Math.random()*t.length|0];return n}const jo=Object.freeze(()=>{});function zu(){const e=new Set,t=new Map;function n(r,a,l){t.get(r)?.forEach(c=>c(a,l))}function i(r,a){t.has(r)||t.set(r,new Set),t.get(r).add(a)}function s(r,a){t.get(r)?.delete(a)}const o={get apps(){return Array.from(e)},emit:n,on:i,off:s};return i("mount",r=>e.add(r)),i("unmount",r=>e.delete(r)),o}function Fu(e){const{id:t,subs:n,fn:i,deps:s=[],onDepChanged:o}=e;let r;Ve.delete(t);const a=!!De.current&&!Tt();a||(r=new Map,ws.stack.push(r));const l=i(...s.map(c=>c.value));if(!a){for(const[u,f]of n)r.has(u)||(f(),n.delete(u));const c=()=>{Ve.size||queueMicrotask(ku),Ve.set(t,o)};for(const[u,f]of r){if(n.has(u))continue;const p=f.subscribe(c);n.set(u,p)}ws.stack.pop()}return l}class Be extends W{constructor(t,n){super(void 0,n),this.$getter=t,this.$unsubs=new Map,this.$isDirty=!0,W.configure(this,()=>{this.$isDirty&&Be.run(this)})}get value(){return super.value}set value(t){}subscribe(t){return this.$isDirty&&Be.run(this),super.subscribe(t)}static dispose(t){Be.stop(t),W.dispose(t)}static stop(t){const{$id:n,$unsubs:i}=t;Ve.delete(n),i.forEach(s=>s()),i.clear(),t.$isDirty=!0}static run(t){const n=t,{$id:i,$getter:s,$unsubs:o}=n,r=Fu({id:i,subs:o,fn:()=>s(n.$value),onDepChanged:()=>{n.$isDirty=!0,t.$subs.size&&(Be.run(n),!Object.is(n.$value,n.$prevValue)&&n.notify())}});n.sneak(r),n.$isDirty=!1}}const Ga=(e,t)=>new Be(e,t);let Hu=0;function Bu(e,t,n){const i=m(t.nodeName.toLowerCase(),{});i.dom=t,i.flags|=re;const s=Hu++,o=\`App-\${s}\`,r={id:s,name:o,rootNode:i,render:a,unmount:l};function a(c){i.props.children=c,Vo(i)}function l(){i.props.children=null,Vo(i),window.__kiru.emit("unmount",r)}return a(e),window.__kiru.emit("mount",r),r}function de(e){return Tt()?Ft("useState",{state:void 0,dispatch:jo},({hook:t,isInit:n,update:i,isHMR:s})=>(n&&(t.state=typeof e=="function"?e():e,t.dispatch=o=>{const r=typeof o=="function"?o(t.state):o;Object.is(t.state,r)||(t.state=r,i())}),[t.state,t.dispatch])):[typeof e=="function"?e():e,jo]}function Vu(e){const t={[Rc]:!0,Provider:({value:n,children:i})=>{const[s]=de(()=>new Set);return m(Oi,{value:n,ctx:t,dependents:s},typeof i=="function"?i(n):i)},default:()=>e,set displayName(n){this.Provider.displayName=n},get displayName(){return this.Provider.displayName||"Anonymous Context"}};return t}function We(e,t){return Tt()?Ft("useCallback",{callback:e,deps:t},({hook:n,isHMR:i})=>(nn(t,n.deps)&&(n.deps=t,n.callback=e),n.callback)):e}function Wu(e,t=!0){return Ft("useContext",{context:e,warnIfNotFound:t},ju)}const ju=({hook:e,isInit:t,vNode:n})=>{if(t){let i=n.parent;for(;i;){if(i.type===Oi){const s=i,{ctx:o,value:r,dependents:a}=s.props;if(o===e.context)return a.add(n),e.cleanup=()=>a.delete(n),e.provider=s,r}i=i.parent}}return e.provider?e.provider.props.value:e.context.default()};function ut(e,t){if(Tt())return Ft("useEffect",{deps:t},({hook:n,isInit:i,isHMR:s,queueEffect:o})=>{(i||nn(t,n.deps))&&(n.deps=t,Ai(n),o(()=>{const r=e();typeof r=="function"&&(n.cleanup=r)}))})}function Zs(e,t){if(Tt())return Ft("useLayoutEffect",{deps:t},({hook:n,isInit:i,isHMR:s,queueEffect:o})=>{(i||nn(t,n.deps))&&(n.deps=t,Ai(n),o(()=>{const r=e();typeof r=="function"&&(n.cleanup=r)},{immediate:!0}))})}function bi(e,t){return Tt()?Ft("useMemo",{deps:t,value:void 0},({hook:n,isInit:i,isHMR:s})=>((i||nn(t,n.deps))&&(n.deps=t,n.value=e()),n.value)):e()}function Ze(e){return Tt()?Ft("useRef",{ref:{current:e}},({hook:t,isInit:n,isHMR:i})=>t.ref):{current:e}}"window"in globalThis&&(window.__KIRU_LAZY_CACHE??(window.__KIRU_LAZY_CACHE=new Map));var Uo;"window"in globalThis&&!globalThis.__KIRU_DEVTOOLS__&&((Uo=globalThis.window).__kiru??(Uo.__kiru=zu()));function Ss(...e){return e.filter(Boolean).join(" ")}function Qs(e,t,n){let i=e;for(let s=0;s<t.length;s++){const o=t[s];s===t.length-1?i[o]=n:i=i[o]}}function Ka(e){return e.type.displayName??(e.type.name||"Anonymous Function")}const Uu=e=>e.__devtoolsFileLink??null;function Pn(e){return e.name==="kiru.devtools"}function Za(e){return Array.from(e.entries())}function $u(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e},m("rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}),m("path",{d:"M12 9v11"}),m("path",{d:"M2 9h13a2 2 0 0 1 2 2v9"}))}function ae(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"m9 18 6-6-6-6"}))}function Yu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),m("circle",{cx:"12",cy:"12",r:"3"}))}function Xu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6"}),m("path",{d:"m21 3-9 9"}),m("path",{d:"M15 3h6v6"}))}function qu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"m12 14 4-4"}),m("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}))}function Gu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("circle",{cx:"12",cy:"12",r:"10"}),m("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}),m("path",{d:"M2 12h20"}))}function Ku(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),m("path",{d:"M21 3v5h-5"}),m("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),m("path",{d:"M8 16H3v5"}))}function Zu(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e},m("path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z"}),m("path",{d:"M6 18h12"}),m("path",{d:"M6 14h12"}),m("rect",{width:"12",height:"12",x:"6",y:"10"}))}function Qa(e){return m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...e},m("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),m("path",{d:"M12 9v4"}),m("path",{d:"M12 17h.01"}))}function Ja({title:e,children:t,className:n,disabled:i,...s}){const[o,r]=de(!0);ut(()=>{!o&&i&&r(!0)},[i]);const a=We(l=>{l.preventDefault(),l.stopImmediatePropagation(),r(c=>!c)},[]);return m("div",{className:"flex flex-col"},m("button",{onclick:a,disabled:i,className:\`\${i?"opacity-50 cursor-default":"cursor-pointer"}\`},m("span",{className:"flex items-center gap-2 font-medium"},m(ae,{className:\`transition \${o?"":"rotate-90"}\`}),e)),o?null:m("div",{className:\`p-2 \${n||""}\`,...s},t))}const Js={arrayChunkSize:10,objectKeysChunkSize:100};function tl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i in n)if(typeof t[i]!=typeof e[i]||typeof e[i]=="object"&&!tl(e[i],t[i]))return!1;return!0}function el(e,t,n){for(const i in t)typeof e[i]>"u"&&(e[i]=structuredClone(t[i]));for(const i in e)typeof e[i]=="object"?el(e[i],t[i],n):n(e,i,e[i])}let nl={...Js};const $o=localStorage.getItem("kiru.devtools.userSettings");if($o)try{const e=JSON.parse($o);tl(Js,e)&&(nl=e)}catch(e){console.error("kiru.devtools.userSettings error",e)}const il=Vu({userSettings:null,saveUserSettings:()=>{}}),Li=()=>Wu(il);function Qu({children:e}){const[t,n]=de(nl),i=s=>{localStorage.setItem("kiru.devtools.userSettings",JSON.stringify(s)),n(s)};return m(il.Provider,{value:{userSettings:t,saveUserSettings:i}},e)}function Ju(){const{userSettings:e,saveUserSettings:t}=Li();return m("div",{className:"rounded bg-neutral-400 bg-opacity-5 border border-white border-opacity-10 overflow-hidden"},m(Ie,{border:!1,data:e,onChange:(n,i)=>{const s={...e};Qs(s,n,i),el(s,Js,(o,r,a)=>{o[r]=a<1?1:a}),t(s)},mutable:!0,objectRefAcc:[]}))}const th=Object.freeze(()=>{});function Ie({data:e,onChange:t,mutable:n,objectRefAcc:i,keys:s=[],className:o,border:r=!0}){const{userSettings:{objectKeysChunkSize:a}}=Li(),[l,c]=de(0),u=bi(()=>Object.keys(e).slice(0,(l+1)*a),[l,a,e]),f=()=>{u.forEach(g=>{typeof e[g]=="object"&&i.splice(i.indexOf(e[g]),1)}),c(l+1)},p=u.length<Object.keys(e).length;return m(kt,null,m("div",{className:Ss("flex flex-col items-start w-full",r&&"border border-neutral-700",Ke(o))},u.map(g=>{const x=s.concat(g),y=x.join(".");return m("div",{key:y,"data-key":y,className:"flex flex-col items-start w-full gap-2 pl-2 py-1 pr-1 border-b border-neutral-700 last:border-b-0"},m(to,{value:e[g],onChange:t,keys:x,path:y,label:g,mutable:n,objectRefAcc:i}))})),p&&m("button",{onclick:f,title:"Show more",className:"p-1 border font-bold border-neutral-700 hover:bg-neutral-700"},m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},m("circle",{cx:"12",cy:"12",r:"1"}),m("circle",{cx:"19",cy:"12",r:"1"}),m("circle",{cx:"5",cy:"12",r:"1"}))))}function yi(e,t){Array.isArray(e)?(t(e),e.forEach(n=>yi(n,t))):typeof e=="object"&&e!==null&&(t(e),Object.values(e).forEach(n=>yi(n,t)))}function to({value:e,onChange:t,keys:n,path:i,mutable:s,objectRefAcc:o,label:r}){const{userSettings:{arrayChunkSize:a}}=Li(),[l,c]=de(!0),u=r!==void 0&&m("label",{htmlFor:i,className:"text-xs truncate",title:i,children:r});if(e===null)return m(mt,null,u,m(Zt,null,"null"));if(e===void 0)return m(mt,null,u,m(Zt,null,"undefined"));const f=window.opener?window.opener.Node:Node;if(e instanceof f)return m(mt,null,u,m(Zt,null,"<",m("span",{style:{color:"#f0a05e"}},e.nodeName),"/>"));const p=window.opener?window.opener.Error:Error;if(e instanceof p)return m(mt,null,u,"cause"in e&&e.cause?m(Zt,null,e.message," (",String(e.cause),")"):m(Zt,null,e.message));const g=x=>t(n,x);switch(typeof e){case"string":return m(mt,null,u,m(Gi,{disabled:!s,id:i,type:"text",value:e,onchange:x=>g(x.target.value)}));case"number":return m(mt,null,u,m(Gi,{disabled:!s,id:i,type:"number",value:e,placeholder:"NaN",onchange:x=>g(Number(x.target.value))}));case"bigint":return m(mt,null,u,m(Gi,{disabled:!s,id:i,type:"number",value:e.toString(),onchange:x=>g(BigInt(x.target.value))}));case"boolean":return m(mt,null,u,m("input",{disabled:!s,id:i,type:"checkbox",checked:e,onchange:x=>g(x.target.checked),className:"accent-red-500"}));case"function":return m(mt,null,u,m(Zt,null,\`\u0192 \${e.name||"anonymous"}()\`));default:return Array.isArray(e)?m(mt,null,m("button",{className:"text-xs flex items-center gap-1 cursor-pointer w-full",title:i,onclick:()=>{yi(e,x=>o.splice(o.indexOf(x),1)),c(x=>!x)}},r,m(ae,{width:10,height:10,className:\`transition \${l?"":"rotate-90"}\`})),l?m(Zt,null,"Array(",e.length,")"):e.length>a?m(eh,{array:e,objectRefAcc:o}):m("div",{className:"flex flex-col items-start gap-1 w-full"},e.map((x,y)=>m(to,{value:x,onChange:t,keys:[...n,y.toString()],path:i.concat(".",y.toString()),label:y.toString(),mutable:s,objectRefAcc:o})))):o.includes(e)?m(mt,null,u,m(Zt,null,"Object(circular reference)")):(o.push(e),m(mt,null,m("button",{className:"text-xs flex items-center gap-1 cursor-pointer w-full",title:i,onclick:()=>{yi(e,x=>o.splice(o.indexOf(x),1)),c(x=>!x)}},r,m(ae,{width:10,height:10,className:\`transition \${l?"":"rotate-90"}\`})),l?null:m(Ie,{data:e,onChange:t,keys:n,mutable:s,objectRefAcc:o})))}}function mt({children:e}){return m("div",{className:"flex flex-col items-start gap-1 w-full"},e)}function Gi(e){return m("input",{className:"flex-grow text-xs px-2 py-1 text-neutral-300 w-full",...e})}function Zt({children:e}){return m("small",{className:"text-neutral-300"},m("i",null,e))}function eh({array:e,objectRefAcc:t}){const{userSettings:{arrayChunkSize:n}}=Li(),i=e.length,s=Math.ceil(i/n);return m("div",{className:"flex flex-col items-start gap-1 w-full"},Array.from({length:s}).map((o,r)=>m(nh,{array:e,range:{start:r*n,end:(r+1)*n},objectRefAcc:t})))}function nh({array:e,range:t,objectRefAcc:n}){const[i,s]=de(!0);let o;return i?o=void 0:o=e.slice(t.start,t.end),m("div",{className:"flex flex-col items-start gap-1 w-full"},m("button",{className:"text-xs flex items-center gap-1 cursor-pointer w-full",onclick:()=>{n.splice(n.indexOf(e),1),s(r=>!r)}},"[",t.start,"..",(t.end<e.length?t.end:e.length)-1,"]",m(ae,{width:10,height:10,className:\`transition \${i?"":"rotate-90"}\`})),o&&m("div",{className:"flex flex-col items-start gap-1 w-full"},o.map((r,a)=>m(to,{value:r,onChange:th,label:(t.start+a).toString(),keys:[a.toString()],path:a.toString(),mutable:!1,objectRefAcc:n}))))}const ih="kiru-devtools";"window"in globalThis&&(window.__devtoolsSelection??=null);class sh extends BroadcastChannel{send(t){super.postMessage(t)}removeEventListener(t){return super.removeEventListener("message",t)}addEventListener(t){return super.addEventListener("message",t)}}const Qe=new sh(ih);function eo({fn:e,onclick:t}){const n=bi(()=>Uu(e),[e]);return n?m("a",{className:"flex items-center gap-1 text-[10px] opacity-50 hover:opacity-100 transition-opacity",href:n,onclick:i=>{i.preventDefault(),Qe.send({type:"open-editor",fileLink:n}),t?.(i)},title:"Open in editor"},"Open in editor",m(Xu,{width:"0.65rem",height:"0.65rem"})):null}function oh({selectedApp:e,selectedNode:t,setSelectedNode:n,kiruGlobal:i}){const s=fe();ut(()=>{const l=c=>{c===e&&(Mu(t)?n(null):s())};return i?.on("update",l),()=>i?.off("update",l)},[]);const o=()=>{t&&Di(t)},r={...t.props};delete r.children;const a=lh(t);return m("div",{className:"flex-grow p-2 sticky top-0"},m("h2",{className:"flex justify-between items-center font-bold mb-2 pb-2 border-b-2 border-neutral-800"},m("div",{className:"flex gap-2 items-center"},"<"+Ka(t)+">",m(eo,{fn:t.type})),m("button",{onclick:o},m(Ku,{className:"w-5 h-5"}))),m(Ja,{title:"props",disabled:Object.keys(r).length===0},m(Ie,{data:r,onChange:()=>{},mutable:!1,objectRefAcc:[]})),m(sl,{node:a,selectedApp:e}))}function rh(e){return e.name==="devtools:useHookDebugGroup"}function ah(e){return ks in e}const ks=Symbol.for("devtools.hookGroup");function lh(e){const t={parent:null,name:"hooks",children:[],[ks]:!0};if(e.hooks?.length){let n=t;for(let i=0;i<e.hooks.length;i++){const s=e.hooks[i];if(rh(s)){switch(s.action){case"start":const o={parent:n,name:s.displayName,children:[],[ks]:!0};n.children.push(o),n=o;break;case"end":if(n.name!==s.displayName||n.parent===null)throw new Error("useHookDebugGroup:end called with no start");n=n.parent;break}continue}n.children.push(s)}}return t}function sl({node:e,selectedApp:t,depth:n=0}){if(ah(e))return m(Ja,{title:e.name,className:"bg-[#ffffff04] border border-[#fff1] flex flex-col gap-2 pl-6",disabled:e.children.length===0},e.children.map(u=>m(sl,{node:u,selectedApp:t,depth:n+1})));const{name:i,dev:s,cleanup:o,...r}=e,a=s?.devtools,l=typeof a?.get=="function"?a.get():r;return m("div",null,m("i",{className:"text-neutral-300 text-sm"},i||"anonymous hook"),m("div",{className:"p-2"},m(Ie,{data:l,onChange:(u,f)=>{if(!t||!a?.set||!a?.get)return;const p=a.get();Qs(p,u,f),a.set(p)},mutable:!!a?.set,objectRefAcc:[]})))}const Ce=(e,t,n={})=>{ut(()=>{let i=window;const s=n?.ref?.();return s?i=s:n.ref&&console.warn("useEventListener ref failed, using window"),i.addEventListener(e,t,n),()=>{i.removeEventListener(e,t,n)}},[t])},ch=()=>{const e=J({x:0,y:0}),t=J({x:0,y:0}),n=J({x:0,y:0});return Ce("mousemove",i=>{e.value={x:i.x,y:i.y},t.value={x:i.movementX,y:i.movementY},n.value={x:i.clientX,y:i.clientY}}),{mouse:e,delta:t,client:n}},Xn="window"in globalThis&&"ResizeObserver"in globalThis.window,uh=(e,t,n=void 0)=>Tt()?Xn?Ft("useResizeObserver",{resizeObserver:null,deps:[e.current]},({isInit:i,hook:s,queueEffect:o})=>(i&&(s.resizeObserver=new ResizeObserver(t),s.cleanup=()=>{s.resizeObserver?.disconnect?.(),s.resizeObserver=null}),o(()=>{nn([e.current],s.deps)&&(s.deps=[e.current],s.resizeObserver?.disconnect?.(),e.current&&s.resizeObserver?.observe(e.current,n))}),{isSupported:Xn,start:()=>{s.resizeObserver==null&&(s.resizeObserver=new ResizeObserver(t),e.current&&s.resizeObserver.observe(e.current,n),s.cleanup=()=>{s.resizeObserver?.disconnect?.(),s.resizeObserver=null})},stop:()=>{Ai(s)}})):{isSupported:Xn,start:()=>{},stop:()=>{}}:{isSupported:Xn,start:()=>{},stop:()=>{}},qn="window"in globalThis&&"MutationObserver"in globalThis.window,hh=(e,t,n=void 0)=>Tt()?qn?Ft("useMutationObserver",{mutationObserver:null,deps:[e.current]},({isInit:i,hook:s,queueEffect:o})=>(i?(o(()=>{s.deps=[e.current],s.mutationObserver=new MutationObserver(t),e.current&&s.mutationObserver.observe(e.current,n)}),s.cleanup=()=>{s.mutationObserver?.disconnect?.(),s.mutationObserver=null}):nn([e.current],s.deps)&&(s.deps=[e.current],s.mutationObserver?.disconnect?.(),e.current&&s.mutationObserver?.observe(e.current,n)),{isSupported:qn,start:()=>{s.mutationObserver==null&&(s.mutationObserver=new MutationObserver(t),e.current&&s.mutationObserver.observe(e.current,n),s.cleanup=()=>{s.mutationObserver?.disconnect?.(),s.mutationObserver=null})},stop:()=>{Ai(s)}})):{isSupported:qn,start:()=>{},stop:()=>{}}:{isSupported:qn,start:()=>{},stop:()=>{}},fh=(e,t={windowScroll:!0,windowResize:!0})=>{const n=t?.windowScroll??!0,i=t?.windowResize??!0,s=t.immediate??!0,o=J(0),r=J(0),a=J(0),l=J(0),c=J(0),u=J(0),f=J(0),p=J(0),g=()=>{const x=e.current;if(!x){o.value=0,r.value=0,a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,p.value=0;return}const y=x.getBoundingClientRect();o.value=y.width,r.value=y.height,a.value=y.top,l.value=y.right,c.value=y.bottom,u.value=y.left,f.value=y.x,p.value=y.y};return uh(e,g),hh(e,g,{attributeFilter:["style","class"]}),Ce("scroll",()=>{n&&g()},{capture:!0,passive:!0}),Ce("resize",()=>{i&&g()},{passive:!0}),Zs(()=>{s&&g()},[]),{width:o,height:r,top:a,right:l,bottom:c,left:u,x:f,y:p,update:g}};function dh(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}const Yo=(e,t,n={})=>{const{ref:i,eventName:s="keydown",passive:o=!1}=n,r=dh(e);return Ce(s,l=>{l.repeat&&!n.repeat||r(l)&&t(l)},{ref:i,passive:o})};function ol({value:e,className:t,...n}){return m("div",{className:Ss("w-full p-2 z-10","bg-[#1d1d1d] border border-white border-opacity-10 rounded",t?.toString()),...n},m("input",{className:Ss("px-2 py-1 w-full rounded focus:outline focus:outline-primary","bg-[#212121] border border-white border-opacity-10 rounded"),placeholder:"Filter...",type:"text","bind:value":e}))}let $;"window"in globalThis&&window.opener&&($=window.opener.__kiru);const je=ht(!1);Qe.addEventListener(e=>{e.data.type==="set-inspect-enabled"&&(je.value=e.data.value)});const rl=($?.apps??[]).filter(e=>!Pn(e)),ie=ht(rl);ht(null);const Lt=ht(rl[0]??null),se=ht(null);$?.on("mount",e=>{Pn(e)||(ie.value=[...ie.peek(),e],Lt.peek()===null&&(Lt.value=e))});$?.on("unmount",e=>{ie.value=ie.peek().filter(t=>t!==e),Lt.peek()===e&&(Lt.value=ie.peek()[0]??null)});const Ts=ht(new Map),Rt=ht(null),no=ht("");function ph(e){return e.type.displayName??(e.type.name||"Anonymous Function")}function gh(e,t){const n=t.toLowerCase();return e.every(i=>n.includes(i))}function Ms(e){return typeof e.type=="function"&&!Cu(e)&&!Ou(e)&&!Pu(e)}function mh(e){let t=[e];for(;t.length;){const n=t.pop();if(Ms(n))return!0;n.child&&t.push(n.child),n.sibling&&t.push(n.sibling)}return!1}const bh=(e,t)=>{const n=[t.parent];for(;n.length;){const i=n.pop();if(e===i)return!0;i?.parent&&n.push(i.parent)}return!1};function Es(e,t){if(!e)return null;const n=t(e),i=Es(e.sibling,t),s=Es(e.child,t);return n?{ref:e,sibling:i??null,child:s??null}:i||s||null}function xi({node:e,traverseSiblings:t=!0}){const[n,i]=de(!0),o=se.value===e,r=bi(()=>crypto.randomUUID(),[]),a=bi(()=>Rt.value==null?null:bh(e,Rt.value),[Rt.value,e]);ut(()=>{a&&i(!1)},[a]),ut(()=>{if(!(!e||!Ms(e)))return Ts.peek().set(r,{vNode:e,setCollapsed:i}),()=>{Ts.peek().delete(r)}});const l=no.value;if(!e)return null;if(!Ms(e)||l.length>0&&!gh(l.toLowerCase().split(" "),e.type.name))return m(kt,null,e.child&&m(xi,{node:e.child}),t&&m(Xo,{node:e}));const c=e.child&&mh(e.child);return m(kt,null,m("div",{className:"pl-4 mb-1"},m("h2",{onclick:()=>{Rt.value=null,se.value=o?null:e},className:\`flex gap-2 items-center cursor-pointer mb-1 scroll-m-12 \${o?"font-medium bg-primary selected-vnode":""}\`,"data-id":r},c&&m(ae,{className:\`cursor-pointer transition \${n?"":"rotate-90"}\`,onclick:u=>{u.preventDefault(),u.stopImmediatePropagation(),Rt.value=null,i(f=>!f)}}),m("div",{className:c?"":"ml-6"},m("span",{className:o?"":"text-neutral-400"},"<"),m("span",{className:o?"":"text-primary"},ph(e)),m("span",{className:o?"":"text-neutral-400"},">"))),!n&&e.child||a!=null&&a&&e.child?m(xi,{node:e.child}):null),t&&m(Xo,{node:e}))}function Xo({node:e}){if(!e)return null;let t=[],n=e.sibling;for(;n;)t.push(n),n=n.sibling;return m(kt,null,t.map(i=>m(xi,{node:i,traverseSiblings:!1})))}const yh=()=>{const e=Ze(null),t=r=>{if(!r)return null;const a=r.getAttribute("data-id");if(a!=null)return Ts.peek().get(a)},n=r=>{if(!r)return;const a=t(r);a!=null&&(r.scrollIntoView({behavior:"smooth"}),se.value=a.vNode)},i=r=>{if(!r||r===document.body)return null;const a=r.parentElement,l=a?.nextElementSibling?.querySelector("h2[data-id]");return l||i(a)},s=()=>{const r=document.querySelector("h2[data-id]");n(r)},o=()=>{const r=document.querySelectorAll("h2[data-id]"),a=r.item(r.length-1);a&&n(a)};return Yo(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],r=>{if(Rt.value&&(Rt.value=null),document.activeElement&&document.activeElement instanceof HTMLInputElement&&document.activeElement!=e.current)return;r.preventDefault();const a=document.querySelector(".selected-vnode");if(a===null){r.key==="ArrowDown"?s():r.key==="ArrowUp"&&o();return}if(r.key==="ArrowRight"){const l=t(a);l&&l.setCollapsed(!1);return}else if(r.key==="ArrowLeft"){const l=t(a);l&&l.setCollapsed(!0);return}if(r.key==="ArrowDown"){const l=a?.nextElementSibling?.querySelector("h2[data-id]");if(l)return n(l);const c=a.parentElement?.nextElementSibling?.querySelector("h2[data-id]");if(c)return n(c);const u=i(a);return u?n(u):s()}else if(r.key==="ArrowUp"){const l=a.parentElement?.previousElementSibling;if(l?.matches("h2[data-id]"))return n(l);const c=l?.querySelectorAll("h2[data-id]");return c?.length!=null&&c?.length>=1?n(c?.item?.(c.length-1)):o()}}),Yo("l",r=>{r.ctrlKey&&(r.preventDefault(),e.current?.focus({preventScroll:!1}))}),{searchRef:e}},xh=e=>{no.value=e.target.value,Rt.value&&(Rt.value=null)};function vh(){const{searchRef:e}=yh(),t=Lt.value;return m("div",{className:"flex-grow p-2 sticky top-0"},m("div",{className:"flex gap-4 pb-2 border-b-2 border-neutral-800 mb-2 items-center"},m("input",{ref:e,className:"bg-[#171616] px-1 py-2 w-full focus:outline focus:outline-primary",placeholder:"Search for component",type:"text",value:no,oninput:xh})),t?.rootNode&&m(xi,{node:t.rootNode}))}const _h=e=>{const{mouse:t}=ch(),n=J(null),i=J(0),s=J(0),o=Ze(null),r=fh(o),a=Ze(null),[l,c]=Array.isArray(e.children)?e.children:[];return Zs(()=>{a.current&&(s.value=a.current.clientWidth/2)},[a.current]),Ce("mouseup",We(()=>n.value=null,[])),Ce("mousemove",We(u=>{if(n.value==null||a.current==null)return;const f=Math.max(i.value+u.x-n.value.x,250);s.value=Math.min(f,a.current.clientWidth-250)},[])),Ce("resize",We(()=>{a.current!=null&&a.current.clientWidth-250<s.value&&(s.value=Math.max(a.current.clientWidth-250,250))},[])),m("div",{onmousemove:u=>{u.x},ref:a,className:"flex-grow grid gap-2 items-start w-full relative",style:{gridTemplateColumns:\`\${s}px 1fr\`}},m("div",{ref:o,className:"firstContainer w-full h-full"},l),r.width.value!=0&&m("div",{className:"w-8 flex justify-center h-full absolute top-0 -translate-x-1/2 cursor-col-resize z-[9999]",style:{left:\`\${r.width}px\`},onmousedown:u=>{u.preventDefault(),n.value={...t.value},i.value=s.value}},m("div",{className:"dividerLine w-[5px] bg-neutral-800 h-full"})),m("div",{className:"secondContainer h-full"},c))},wh=()=>m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-square-mouse-pointer"},m("path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z"}),m("path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6"})),Sh=()=>{je.value=!je.value,Qe.send({type:"set-inspect-enabled",value:je.value})};function kh(){const e=Lt.value,t=se.value,n=fe();return ut(()=>{const i=s=>{s===e&&n()};return $?.on("update",i),()=>$?.off("update",i)},[Lt]),ut(()=>{const i=s=>{if(s.data.type!=="select-node")return;if(!window.__devtoolsSelection){console.error("no selection ptr");return}const{app:o,node:r}=window.__devtoolsSelection;window.__devtoolsSelection=null,Lt.value=o,se.value=r,Rt.value=r,je.value=!1};return Qe.addEventListener(i),()=>Qe.removeEventListener(i)},[Lt]),m(kt,null,m("div",{className:"flex items-center justify-between gap-4 p-2 bg-neutral-400 bg-opacity-5 border border-white border-opacity-10 rounded"},m("div",{className:"flex items-center gap-4"},m("select",{className:"px-2 py-1 bg-neutral-800 text-neutral-100 rounded border border-white border-opacity-10",value:e?.name??"",onchange:i=>Lt.value=ie.peek().find(s=>s.name===i.currentTarget.value)??null},m("option",{value:"",disabled:!0},"Select App"),ie.value.map(i=>m("option",{key:i.id,value:i.name},i.name))),m("button",{title:"Toggle Component Inspection",onclick:Sh,className:\`p-1 rounded \${je.value?"bg-neutral-900":""}\`},m(wh,null)))),m(_h,null,e&&m(vh,null),t&&e&&m(oh,{selectedApp:e,selectedNode:t,setSelectedNode:i=>se.value=i,kiruGlobal:$})))}const Cs=ht({}),ke=ht([]);$?.stores?.subscribe(e=>{Cs.value=e,ke.value=ke.value.filter(t=>Object.values(Cs.value).includes(t))});const al=ht(""),Th=Ga(()=>al.value.toLowerCase().split(" ").filter(e=>e.length>0));function Mh(e){return Th.value.every(t=>e.toLowerCase().includes(t))}function Eh(){const e=Object.entries(Cs.value);return e.length===0?m("div",{className:"flex flex-col items-center justify-center h-full text-neutral-400"},m(Qa,null),m("h2",{className:"text-lg italic"},"No stores detected")):m("div",{className:"flex flex-col gap-2 items-start"},m(ol,{value:al,className:"sticky top-0"}),m("div",{className:"flex flex-col gap-2 w-full"},e.filter(([t])=>Mh(t)).map(([t,n])=>m(Ch,{key:t,name:t,store:n}))))}function Ch({name:e,store:t}){const n=ke.value.includes(t),i=fe(),{value:s}=ll(t);Zs(()=>{const r=t.subscribe(()=>i());return()=>r()},[]);const o=We(()=>{n?ke.value=ke.value.filter(r=>r!==t):ke.value=[...ke.value,t]},[n]);return m("div",{className:"flex flex-col"},m("button",{onclick:o,className:"flex items-center gap-2 justify-between p-2 border border-white border-opacity-10 cursor-pointer"+(n?" bg-white bg-opacity-5 text-neutral-100 rounded-t":" hover:bg-white hover:bg-opacity-10 text-neutral-400 rounded")},e,m("div",{className:"flex gap-2"},m(eo,{fn:t,onclick:r=>r.stopPropagation()}),m(ae,{className:"transition-all"+(n?" rotate-90":"")}))),n&&m("div",{className:"flex flex-col gap-2 p-2 border border-white border-opacity-10"},m(Ie,{data:{value:s},mutable:!0,objectRefAcc:[],onChange:(r,a)=>{const l=structuredClone({value:s});Qs(l,r,a),t.setState(l.value)}}),m(Oh,{store:t})))}function Oh({store:e}){const t=ie.value;return t.length===0?null:m(kt,null,t.map(n=>m(Ph,{store:e,app:n})))}const qo=Symbol.for("kiru.hmrAccept"),ll=e=>{if(qo in e)return e[qo].provide().current;throw new Error("Unable to get store subscribers")};function Ph({store:e,app:t}){const n=fe(),{subscribers:i,nodeStateMap:s}=ll(e),o=t.rootNode.child;if(ut(()=>{const a=l=>{l===t&&n()};return $?.on("update",a),()=>$?.off("update",a)},[]),!o)return null;const r=Es(o,a=>i.has(a));return m("div",{className:"flex flex-col gap-2 p-2 rounded-b border border-white border-opacity-10"},m("b",null,t.name),r&&m("ul",{className:"pl-8"},m(Os,{node:r,nodeStateMap:s})))}function Os({node:e,nodeStateMap:t}){const[n,i]=de(!1),o=t.get(e.ref)?.slices??[];return m(kt,null,m("li",{className:"flex flex-col gap-2"},m("div",{className:"flex flex-col border border-white border-opacity-10 rounded"+(n?" bg-white bg-opacity-5 text-neutral-100":" hover:bg-white hover:bg-opacity-10 text-neutral-400")},m("button",{onclick:()=>i(!n),className:"flex gap-2 p-2 justify-between cursor-pointer"},m("span",null,"<"+Ka(e.ref)+" />"),m("div",{className:"flex gap-2 items-center"},m(eo,{fn:e.ref.type,onclick:r=>r.stopPropagation()}),m(ae,{className:"transition-all"+(n?" rotate-90":"")}))),n&&m("div",{className:"flex flex-col gap-2 p-2 bg-[#1a1a1a]"},o.length===0&&m("div",{className:"p-2 bg-black bg-opacity-30 text-sm"},m("h5",{className:"border-b border-white border-opacity-10"},"No slices")),o.map(r=>m("div",{className:"flex flex-col gap-2"},m("div",{className:"p-2 bg-black bg-opacity-30 text-sm"},m("h5",{className:"border-b border-white border-opacity-10"},"Slice:"),m("pre",{className:"text-neutral-400"},m(Ie,{data:{value:r.value},mutable:!1,objectRefAcc:[],onChange:()=>{}}))),m("div",{className:"p-2 bg-black bg-opacity-30 text-sm"},m("h5",{className:"border-b border-white border-opacity-10"},"SliceFn:"),m("pre",{className:"text-neutral-400"},r.sliceFn?r.sliceFn.toString():"null")),r.eq&&m("div",{className:"p-2 bg-black bg-opacity-30 text-sm"},m("h5",{className:"border-b border-white border-opacity-10"},"eq:"),m("pre",{className:"text-neutral-400"},r.eq.toString())))))),e.child&&m("ul",{className:"pl-8 flex flex-col gap-2"},m(Os,{node:e.child,nodeStateMap:t}))),e.sibling&&m(Os,{node:e.sibling,nodeStateMap:t}))}/*!
|
|
2404
|
+
* @kurkle/color v0.3.4
|
|
2405
|
+
* https://github.com/kurkle/color#readme
|
|
2406
|
+
* (c) 2024 Jukka Kurkela
|
|
2407
|
+
* Released under the MIT License
|
|
2408
|
+
*/function Nn(e){return e+.5|0}const te=(e,t,n)=>Math.max(Math.min(e,n),t);function vn(e){return te(Nn(e*2.55),0,255)}function oe(e){return te(Nn(e*255),0,255)}function $t(e){return te(Nn(e/2.55)/100,0,1)}function Go(e){return te(Nn(e*100),0,100)}const bt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ps=[..."0123456789ABCDEF"],Dh=e=>Ps[e&15],Ah=e=>Ps[(e&240)>>4]+Ps[e&15],Gn=e=>(e&240)>>4===(e&15),Ih=e=>Gn(e.r)&&Gn(e.g)&&Gn(e.b)&&Gn(e.a);function Lh(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&bt[e[1]]*17,g:255&bt[e[2]]*17,b:255&bt[e[3]]*17,a:t===5?bt[e[4]]*17:255}:(t===7||t===9)&&(n={r:bt[e[1]]<<4|bt[e[2]],g:bt[e[3]]<<4|bt[e[4]],b:bt[e[5]]<<4|bt[e[6]],a:t===9?bt[e[7]]<<4|bt[e[8]]:255})),n}const Rh=(e,t)=>e<255?t(e):"";function Nh(e){var t=Ih(e)?Dh:Ah;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Rh(e.a,t):void 0}const zh=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function cl(e,t,n){const i=t*Math.min(n,1-n),s=(o,r=(o+e/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function Fh(e,t,n){const i=(s,o=(s+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function Hh(e,t,n){const i=cl(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)i[s]*=1-t-n,i[s]+=t;return i}function Bh(e,t,n,i,s){return e===s?(t-n)/i+(t<n?6:0):t===s?(n-e)/i+2:(e-t)/i+4}function io(e){const n=e.r/255,i=e.g/255,s=e.b/255,o=Math.max(n,i,s),r=Math.min(n,i,s),a=(o+r)/2;let l,c,u;return o!==r&&(u=o-r,c=a>.5?u/(2-o-r):u/(o+r),l=Bh(n,i,s,u,o),l=l*60+.5),[l|0,c||0,a]}function so(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(oe)}function oo(e,t,n){return so(cl,e,t,n)}function Vh(e,t,n){return so(Hh,e,t,n)}function Wh(e,t,n){return so(Fh,e,t,n)}function ul(e){return(e%360+360)%360}function jh(e){const t=zh.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?vn(+t[5]):oe(+t[5]));const s=ul(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?i=Vh(s,o,r):t[1]==="hsv"?i=Wh(s,o,r):i=oo(s,o,r),{r:i[0],g:i[1],b:i[2],a:n}}function Uh(e,t){var n=io(e);n[0]=ul(n[0]+t),n=oo(n),e.r=n[0],e.g=n[1],e.b=n[2]}function $h(e){if(!e)return;const t=io(e),n=t[0],i=Go(t[1]),s=Go(t[2]);return e.a<255?\`hsla(\${n}, \${i}%, \${s}%, \${$t(e.a)})\`:\`hsl(\${n}, \${i}%, \${s}%)\`}const Ko={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Zo={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Yh(){const e={},t=Object.keys(Zo),n=Object.keys(Ko);let i,s,o,r,a;for(i=0;i<t.length;i++){for(r=a=t[i],s=0;s<n.length;s++)o=n[s],a=a.replace(o,Ko[o]);o=parseInt(Zo[r],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let Kn;function Xh(e){Kn||(Kn=Yh(),Kn.transparent=[0,0,0,0]);const t=Kn[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const qh=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Gh(e){const t=qh.exec(e);let n=255,i,s,o;if(t){if(t[7]!==i){const r=+t[7];n=t[8]?vn(r):te(r*255,0,255)}return i=+t[1],s=+t[3],o=+t[5],i=255&(t[2]?vn(i):te(i,0,255)),s=255&(t[4]?vn(s):te(s,0,255)),o=255&(t[6]?vn(o):te(o,0,255)),{r:i,g:s,b:o,a:n}}}function Kh(e){return e&&(e.a<255?\`rgba(\${e.r}, \${e.g}, \${e.b}, \${$t(e.a)})\`:\`rgb(\${e.r}, \${e.g}, \${e.b})\`)}const Ki=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,He=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Zh(e,t,n){const i=He($t(e.r)),s=He($t(e.g)),o=He($t(e.b));return{r:oe(Ki(i+n*(He($t(t.r))-i))),g:oe(Ki(s+n*(He($t(t.g))-s))),b:oe(Ki(o+n*(He($t(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Zn(e,t,n){if(e){let i=io(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=oo(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function hl(e,t){return e&&Object.assign(t||{},e)}function Qo(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=oe(e[3]))):(t=hl(e,{r:0,g:0,b:0,a:1}),t.a=oe(t.a)),t}function Qh(e){return e.charAt(0)==="r"?Gh(e):jh(e)}class Dn{constructor(t){if(t instanceof Dn)return t;const n=typeof t;let i;n==="object"?i=Qo(t):n==="string"&&(i=Lh(t)||Xh(t)||Qh(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=hl(this._rgb);return t&&(t.a=$t(t.a)),t}set rgb(t){this._rgb=Qo(t)}rgbString(){return this._valid?Kh(this._rgb):void 0}hexString(){return this._valid?Nh(this._rgb):void 0}hslString(){return this._valid?$h(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,s=t.rgb;let o;const r=n===o?.5:n,a=2*r-1,l=i.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,i.r=255&c*i.r+o*s.r+.5,i.g=255&c*i.g+o*s.g+.5,i.b=255&c*i.b+o*s.b+.5,i.a=r*i.a+(1-r)*s.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=Zh(this._rgb,t._rgb,n)),this}clone(){return new Dn(this.rgb)}alpha(t){return this._rgb.a=oe(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Nn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Zn(this._rgb,2,t),this}darken(t){return Zn(this._rgb,2,-t),this}saturate(t){return Zn(this._rgb,1,t),this}desaturate(t){return Zn(this._rgb,1,-t),this}rotate(t){return Uh(this._rgb,t),this}}/*!
|
|
2409
|
+
* Chart.js v4.5.0
|
|
2410
|
+
* https://www.chartjs.org
|
|
2411
|
+
* (c) 2025 Chart.js Contributors
|
|
2412
|
+
* Released under the MIT License
|
|
2413
|
+
*/function Wt(){}const Jh=(()=>{let e=0;return()=>e++})();function V(e){return e==null}function Q(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function B(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function xt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Pt(e,t){return xt(e)?e:t}function R(e,t){return typeof e>"u"?t:e}const tf=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function I(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function z(e,t,n,i){let s,o,r;if(Q(e))for(o=e.length,s=0;s<o;s++)t.call(n,e[s],s);else if(B(e))for(r=Object.keys(e),o=r.length,s=0;s<o;s++)t.call(n,e[r[s]],r[s])}function vi(e,t){let n,i,s,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(s=e[n],o=t[n],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function _i(e){if(Q(e))return e.map(_i);if(B(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let s=0;for(;s<i;++s)t[n[s]]=_i(e[n[s]]);return t}return e}function fl(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function ef(e,t,n,i){if(!fl(e))return;const s=t[e],o=n[e];B(s)&&B(o)?An(s,o,i):t[e]=_i(o)}function An(e,t,n){const i=Q(t)?t:[t],s=i.length;if(!B(e))return e;n=n||{};const o=n.merger||ef;let r;for(let a=0;a<s;++a){if(r=i[a],!B(r))continue;const l=Object.keys(r);for(let c=0,u=l.length;c<u;++c)o(l[c],e,r,n)}return e}function kn(e,t){return An(e,t,{merger:nf})}function nf(e,t,n){if(!fl(e))return;const i=t[e],s=n[e];B(i)&&B(s)?kn(i,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=_i(s))}const Jo={"":e=>e,x:e=>e.x,y:e=>e.y};function sf(e){const t=e.split("."),n=[];let i="";for(const s of t)i+=s,i.endsWith("\\\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function of(e){const t=sf(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function wi(e,t){return(Jo[t]||(Jo[t]=of(t)))(e)}function ro(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Si=e=>typeof e<"u",le=e=>typeof e=="function",tr=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function rf(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const tt=Math.PI,zt=2*tt,af=zt+tt,ki=Number.POSITIVE_INFINITY,lf=tt/180,wt=tt/2,ve=tt/4,er=tt*2/3,dl=Math.log10,ce=Math.sign;function Oe(e,t,n){return Math.abs(e-t)<n}function nr(e){const t=Math.round(e);e=Oe(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(dl(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function cf(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((s,o)=>s-o).pop(),t}function uf(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function In(e){return!uf(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function hf(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function ff(e,t,n){let i,s,o;for(i=0,s=e.length;i<s;i++)o=e[i][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Me(e){return e*(tt/180)}function df(e){return e*(180/tt)}function ir(e){if(!xt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function pf(e,t){const n=t.x-e.x,i=t.y-e.y,s=Math.sqrt(n*n+i*i);let o=Math.atan2(i,n);return o<-.5*tt&&(o+=zt),{angle:o,distance:s}}function Ds(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function gf(e,t){return(e-t+af)%zt-tt}function Qt(e){return(e%zt+zt)%zt}function pl(e,t,n,i){const s=Qt(e),o=Qt(t),r=Qt(n),a=Qt(o-s),l=Qt(r-s),c=Qt(s-o),u=Qt(s-r);return s===o||s===r||i&&o===r||a>l&&c<u}function yt(e,t,n){return Math.max(t,Math.min(n,e))}function mf(e){return yt(e,-32768,32767)}function _n(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function ao(e,t,n){n=n||(r=>e[r]<t);let i=e.length-1,s=0,o;for(;i-s>1;)o=s+i>>1,n(o)?s=o:i=o;return{lo:s,hi:i}}const Ee=(e,t,n,i)=>ao(e,n,i?s=>{const o=e[s][t];return o<n||o===n&&e[s+1][t]===n}:s=>e[s][t]<n),bf=(e,t,n)=>ao(e,n,i=>e[i][t]>=n);function yf(e,t,n){let i=0,s=e.length;for(;i<s&&e[i]<t;)i++;for(;s>i&&e[s-1]>n;)s--;return i>0||s<e.length?e.slice(i,s):e}const gl=["push","pop","shift","splice","unshift"];function xf(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),gl.forEach(n=>{const i="_onData"+ro(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...o)}),r}})})}function sr(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(gl.forEach(o=>{delete e[o]}),delete e._chartjs)}function vf(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const ml=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function bl(e,t){let n=[],i=!1;return function(...s){n=s,i||(i=!0,ml.call(window,()=>{i=!1,e.apply(t,n)}))}}function _f(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const yl=e=>e==="start"?"left":e==="end"?"right":"center",ft=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,wf=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function Sf(e,t,n){const i=t.length;let s=0,o=i;if(e._sorted){const{iScale:r,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=r.axis,{min:f,max:p,minDefined:g,maxDefined:x}=r.getUserBounds();if(g){if(s=Math.min(Ee(l,u,f).lo,n?i:Ee(t,u,r.getPixelForValue(f)).lo),c){const y=l.slice(0,s+1).reverse().findIndex(v=>!V(v[a.axis]));s-=Math.max(0,y)}s=yt(s,0,i-1)}if(x){let y=Math.max(Ee(l,r.axis,p,!0).hi+1,n?0:Ee(t,u,r.getPixelForValue(p),!0).hi+1);if(c){const v=l.slice(y-1).findIndex(w=>!V(w[a.axis]));y+=Math.max(0,v)}o=yt(y,s,i)-s}else o=i-s}return{start:s,count:o}}function kf(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,s={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=s,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),o}const Qn=e=>e===0||e===1,or=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*zt/n)),rr=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*zt/n)+1,Tn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*wt)+1,easeOutSine:e=>Math.sin(e*wt),easeInOutSine:e=>-.5*(Math.cos(tt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Qn(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Qn(e)?e:or(e,.075,.3),easeOutElastic:e=>Qn(e)?e:rr(e,.075,.3),easeInOutElastic(e){return Qn(e)?e:e<.5?.5*or(e*2,.1125,.45):.5+.5*rr(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Tn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Tn.easeInBounce(e*2)*.5:Tn.easeOutBounce(e*2-1)*.5+.5};function lo(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ar(e){return lo(e)?e:new Dn(e)}function Zi(e){return lo(e)?e:new Dn(e).saturate(.5).darken(.1).hexString()}const Tf=["x","y","borderWidth","radius","tension"],Mf=["color","borderColor","backgroundColor"];function Ef(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Mf},numbers:{type:"number",properties:Tf}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Cf(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const lr=new Map;function Of(e,t){t=t||{};const n=e+JSON.stringify(t);let i=lr.get(n);return i||(i=new Intl.NumberFormat(e,t),lr.set(n,i)),i}function xl(e,t,n){return Of(t,n).format(e)}const Pf={values(e){return Q(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let s,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=Df(e,n)}const r=dl(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),xl(e,i,l)}};function Df(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var vl={formatters:Pf};function Af(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:vl.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ae=Object.create(null),As=Object.create(null);function Mn(e,t){if(!t)return e;const n=t.split(".");for(let i=0,s=n.length;i<s;++i){const o=n[i];e=e[o]||(e[o]=Object.create(null))}return e}function Qi(e,t,n){return typeof t=="string"?An(Mn(e,t),n):An(Mn(e,""),t)}class If{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>Zi(s.backgroundColor),this.hoverBorderColor=(i,s)=>Zi(s.borderColor),this.hoverColor=(i,s)=>Zi(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Qi(this,t,n)}get(t){return Mn(this,t)}describe(t,n){return Qi(As,t,n)}override(t,n){return Qi(Ae,t,n)}route(t,n,i,s){const o=Mn(this,t),r=Mn(this,i),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=r[s];return B(l)?Object.assign({},c,l):R(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var Y=new If({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Ef,Cf,Af]);function Lf(e){return!e||V(e.size)||V(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function cr(e,t,n,i,s){let o=t[s];return o||(o=t[s]=e.measureText(s).width,n.push(s)),o>i&&(i=o),i}function _e(e,t,n){const i=e.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((t-s)*i)/i+s}function ur(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Is(e,t,n,i){_l(e,t,n,i,null)}function _l(e,t,n,i,s){let o,r,a,l,c,u,f,p;const g=t.pointStyle,x=t.rotation,y=t.radius;let v=(x||0)*lf;if(g&&typeof g=="object"&&(o=g.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(v),e.drawImage(g,-g.width/2,-g.height/2,g.width,g.height),e.restore();return}if(!(isNaN(y)||y<=0)){switch(e.beginPath(),g){default:s?e.ellipse(n,i,s/2,y,0,0,zt):e.arc(n,i,y,0,zt),e.closePath();break;case"triangle":u=s?s/2:y,e.moveTo(n+Math.sin(v)*u,i-Math.cos(v)*y),v+=er,e.lineTo(n+Math.sin(v)*u,i-Math.cos(v)*y),v+=er,e.lineTo(n+Math.sin(v)*u,i-Math.cos(v)*y),e.closePath();break;case"rectRounded":c=y*.516,l=y-c,r=Math.cos(v+ve)*l,f=Math.cos(v+ve)*(s?s/2-c:l),a=Math.sin(v+ve)*l,p=Math.sin(v+ve)*(s?s/2-c:l),e.arc(n-f,i-a,c,v-tt,v-wt),e.arc(n+p,i-r,c,v-wt,v),e.arc(n+f,i+a,c,v,v+wt),e.arc(n-p,i+r,c,v+wt,v+tt),e.closePath();break;case"rect":if(!x){l=Math.SQRT1_2*y,u=s?s/2:l,e.rect(n-u,i-l,2*u,2*l);break}v+=ve;case"rectRot":f=Math.cos(v)*(s?s/2:y),r=Math.cos(v)*y,a=Math.sin(v)*y,p=Math.sin(v)*(s?s/2:y),e.moveTo(n-f,i-a),e.lineTo(n+p,i-r),e.lineTo(n+f,i+a),e.lineTo(n-p,i+r),e.closePath();break;case"crossRot":v+=ve;case"cross":f=Math.cos(v)*(s?s/2:y),r=Math.cos(v)*y,a=Math.sin(v)*y,p=Math.sin(v)*(s?s/2:y),e.moveTo(n-f,i-a),e.lineTo(n+f,i+a),e.moveTo(n+p,i-r),e.lineTo(n-p,i+r);break;case"star":f=Math.cos(v)*(s?s/2:y),r=Math.cos(v)*y,a=Math.sin(v)*y,p=Math.sin(v)*(s?s/2:y),e.moveTo(n-f,i-a),e.lineTo(n+f,i+a),e.moveTo(n+p,i-r),e.lineTo(n-p,i+r),v+=ve,f=Math.cos(v)*(s?s/2:y),r=Math.cos(v)*y,a=Math.sin(v)*y,p=Math.sin(v)*(s?s/2:y),e.moveTo(n-f,i-a),e.lineTo(n+f,i+a),e.moveTo(n+p,i-r),e.lineTo(n-p,i+r);break;case"line":r=s?s/2:Math.cos(v)*y,a=Math.sin(v)*y,e.moveTo(n-r,i-a),e.lineTo(n+r,i+a);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(v)*(s?s/2:y),i+Math.sin(v)*y);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Je(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function co(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function uo(e){e.restore()}function Rf(e,t,n,i,s){if(!t)return e.lineTo(n.x,n.y);if(s==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else s==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Nf(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function zf(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),V(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Ff(e,t,n,i,s){if(s.strikethrough||s.underline){const o=e.measureText(i),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=s.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(r,u),e.lineTo(a,u),e.stroke()}}function Hf(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ti(e,t,n,i,s,o={}){const r=Q(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=s.string,zf(e,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&Hf(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),V(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,i,o.maxWidth)),e.fillText(c,n,i,o.maxWidth),Ff(e,n,i,c,o),i+=Number(s.lineHeight);e.restore()}function Ls(e,t){const{x:n,y:i,w:s,h:o,radius:r}=t;e.arc(n+r.topLeft,i+r.topLeft,r.topLeft,1.5*tt,tt,!0),e.lineTo(n,i+o-r.bottomLeft),e.arc(n+r.bottomLeft,i+o-r.bottomLeft,r.bottomLeft,tt,wt,!0),e.lineTo(n+s-r.bottomRight,i+o),e.arc(n+s-r.bottomRight,i+o-r.bottomRight,r.bottomRight,wt,0,!0),e.lineTo(n+s,i+r.topRight),e.arc(n+s-r.topRight,i+r.topRight,r.topRight,0,-wt,!0),e.lineTo(n+r.topLeft,i)}const Bf=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,Vf=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Wf(e,t){const n=(""+e).match(Bf);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const jf=e=>+e||0;function wl(e,t){const n={},i=B(t),s=i?Object.keys(t):t,o=B(e)?i?r=>R(e[r],e[t[r]]):r=>e[r]:()=>e;for(const r of s)n[r]=jf(o(r));return n}function Uf(e){return wl(e,{top:"y",right:"x",bottom:"y",left:"x"})}function En(e){return wl(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Mt(e){const t=Uf(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ct(e,t){e=e||{},t=t||Y.font;let n=R(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=R(e.style,t.style);i&&!(""+i).match(Vf)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:R(e.family,t.family),lineHeight:Wf(R(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:R(e.weight,t.weight),string:""};return s.string=Lf(s),s}function Jn(e,t,n,i){let s,o,r;for(s=0,o=e.length;s<o;++s)if(r=e[s],r!==void 0&&r!==void 0)return r}function $f(e,t,n){const{min:i,max:s}=e,o=tf(t,(s-i)/2),r=(a,l)=>n&&a===0?0:a+l;return{min:r(i,-Math.abs(o)),max:r(s,o)}}function Le(e,t){return Object.assign(Object.create(e),t)}function ho(e,t=[""],n,i,s=()=>e[0]){const o=n||e;typeof i>"u"&&(i=Ml("_fallback",e));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:i,_getTarget:s,override:a=>ho([a,...e],t,o,i)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return kl(a,l,()=>Jf(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return fr(a).includes(l)},ownKeys(a){return fr(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function tn(e,t,n,i){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Sl(e,i),setContext:o=>tn(e,o,n,i),override:o=>tn(e.override(o),t,n,i)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete e[r],!0},get(o,r,a){return kl(o,r,()=>Xf(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,r){return Reflect.has(e,r)},ownKeys(){return Reflect.ownKeys(e)},set(o,r,a){return e[r]=a,delete o[r],!0}})}function Sl(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:i,isScriptable:le(n)?n:()=>n,isIndexable:le(i)?i:()=>i}}const Yf=(e,t)=>e?e+ro(t):t,fo=(e,t)=>B(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function kl(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const i=n();return e[t]=i,i}function Xf(e,t,n){const{_proxy:i,_context:s,_subProxy:o,_descriptors:r}=e;let a=i[t];return le(a)&&r.isScriptable(t)&&(a=qf(t,a,e,n)),Q(a)&&a.length&&(a=Gf(t,a,e,r.isIndexable)),fo(t,a)&&(a=tn(a,s,o&&o[t],r)),a}function qf(e,t,n,i){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(o,r||i);return a.delete(e),fo(e,l)&&(l=po(s._scopes,s,e,l)),l}function Gf(e,t,n,i){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=n;if(typeof o.index<"u"&&i(e))return t[o.index%t.length];if(B(t[0])){const l=t,c=s._scopes.filter(u=>u!==l);t=[];for(const u of l){const f=po(c,s,e,u);t.push(tn(f,o,r&&r[e],a))}}return t}function Tl(e,t,n){return le(e)?e(t,n):e}const Kf=(e,t)=>e===!0?t:typeof e=="string"?wi(t,e):void 0;function Zf(e,t,n,i,s){for(const o of t){const r=Kf(n,o);if(r){e.add(r);const a=Tl(r._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(r===!1&&typeof i<"u"&&n!==i)return null}return!1}function po(e,t,n,i){const s=t._rootScopes,o=Tl(t._fallback,n,i),r=[...e,...s],a=new Set;a.add(i);let l=hr(a,r,n,o||n,i);return l===null||typeof o<"u"&&o!==n&&(l=hr(a,r,o,l,i),l===null)?!1:ho(Array.from(a),[""],s,o,()=>Qf(t,n,i))}function hr(e,t,n,i,s){for(;n;)n=Zf(e,t,n,i,s);return n}function Qf(e,t,n){const i=e._getTarget();t in i||(i[t]={});const s=i[t];return Q(s)&&B(n)?n:s||{}}function Jf(e,t,n,i){let s;for(const o of t)if(s=Ml(Yf(o,e),n),typeof s<"u")return fo(e,s)?po(n,i,e,s):s}function Ml(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function fr(e){let t=e._keys;return t||(t=e._keys=td(e._scopes)),t}function td(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}const ed=Number.EPSILON||1e-14,en=(e,t)=>t<e.length&&!e[t].skip&&e[t],El=e=>e==="x"?"y":"x";function nd(e,t,n,i){const s=e.skip?t:e,o=t,r=n.skip?t:n,a=Ds(o,s),l=Ds(r,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=i*c,p=i*u;return{previous:{x:o.x-f*(r.x-s.x),y:o.y-f*(r.y-s.y)},next:{x:o.x+p*(r.x-s.x),y:o.y+p*(r.y-s.y)}}}function id(e,t,n){const i=e.length;let s,o,r,a,l,c=en(e,0);for(let u=0;u<i-1;++u)if(l=c,c=en(e,u+1),!(!l||!c)){if(Oe(t[u],0,ed)){n[u]=n[u+1]=0;continue}s=n[u]/t[u],o=n[u+1]/t[u],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),n[u]=s*r*t[u],n[u+1]=o*r*t[u])}}function sd(e,t,n="x"){const i=El(n),s=e.length;let o,r,a,l=en(e,0);for(let c=0;c<s;++c){if(r=a,a=l,l=en(e,c+1),!a)continue;const u=a[n],f=a[i];r&&(o=(u-r[n])/3,a[\`cp1\${n}\`]=u-o,a[\`cp1\${i}\`]=f-o*t[c]),l&&(o=(l[n]-u)/3,a[\`cp2\${n}\`]=u+o,a[\`cp2\${i}\`]=f+o*t[c])}}function od(e,t="x"){const n=El(t),i=e.length,s=Array(i).fill(0),o=Array(i);let r,a,l,c=en(e,0);for(r=0;r<i;++r)if(a=l,l=c,c=en(e,r+1),!!l){if(c){const u=c[t]-l[t];s[r]=u!==0?(c[n]-l[n])/u:0}o[r]=a?c?ce(s[r-1])!==ce(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}id(e,s,o),sd(e,o,t)}function ti(e,t,n){return Math.max(Math.min(e,n),t)}function rd(e,t){let n,i,s,o,r,a=Je(e[0],t);for(n=0,i=e.length;n<i;++n)r=o,o=a,a=n<i-1&&Je(e[n+1],t),o&&(s=e[n],r&&(s.cp1x=ti(s.cp1x,t.left,t.right),s.cp1y=ti(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=ti(s.cp2x,t.left,t.right),s.cp2y=ti(s.cp2y,t.top,t.bottom)))}function ad(e,t,n,i,s){let o,r,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")od(e,s);else{let c=i?e[e.length-1]:e[0];for(o=0,r=e.length;o<r;++o)a=e[o],l=nd(c,a,e[Math.min(o+1,r-(i?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&rd(e,n)}function go(){return typeof window<"u"&&typeof document<"u"}function mo(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Mi(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const Ri=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function ld(e,t){return Ri(e).getPropertyValue(t)}const cd=["top","right","bottom","left"];function Pe(e,t,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const o=cd[s];i[o]=parseFloat(e[t+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const ud=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function hd(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:s,offsetY:o}=i;let r=!1,a,l;if(ud(s,o,e.target))a=s,l=o;else{const c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function It(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,s=Ri(n),o=s.boxSizing==="border-box",r=Pe(s,"padding"),a=Pe(s,"border","width"),{x:l,y:c,box:u}=hd(e,n),f=r.left+(u&&a.left),p=r.top+(u&&a.top);let{width:g,height:x}=t;return o&&(g-=r.width+a.width,x-=r.height+a.height),{x:Math.round((l-f)/g*n.width/i),y:Math.round((c-p)/x*n.height/i)}}function fd(e,t,n){let i,s;if(t===void 0||n===void 0){const o=e&&mo(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const r=o.getBoundingClientRect(),a=Ri(o),l=Pe(a,"border","width"),c=Pe(a,"padding");t=r.width-c.width-l.width,n=r.height-c.height-l.height,i=Mi(a.maxWidth,o,"clientWidth"),s=Mi(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:i||ki,maxHeight:s||ki}}const ei=e=>Math.round(e*10)/10;function dd(e,t,n,i){const s=Ri(e),o=Pe(s,"margin"),r=Mi(s.maxWidth,e,"clientWidth")||ki,a=Mi(s.maxHeight,e,"clientHeight")||ki,l=fd(e,t,n);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const p=Pe(s,"border","width"),g=Pe(s,"padding");c-=g.width+p.width,u-=g.height+p.height}return c=Math.max(0,c-o.width),u=Math.max(0,i?c/i:u-o.height),c=ei(Math.min(c,r,l.maxWidth)),u=ei(Math.min(u,a,l.maxHeight)),c&&!u&&(u=ei(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=ei(Math.floor(u*i))),{width:c,height:u}}function dr(e,t,n){const i=t||1,s=Math.floor(e.height*i),o=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const r=e.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=\`\${e.height}px\`,r.style.width=\`\${e.width}px\`),e.currentDevicePixelRatio!==i||r.height!==s||r.width!==o?(e.currentDevicePixelRatio=i,r.height=s,r.width=o,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const pd=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};go()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function pr(e,t){const n=ld(e,t),i=n&&n.match(/^(\\d+)(\\.\\d+)?px$/);return i?+i[1]:void 0}function Se(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function gd(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function md(e,t,n,i){const s={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},r=Se(e,s,n),a=Se(s,o,n),l=Se(o,t,n),c=Se(r,a,n),u=Se(a,l,n);return Se(c,u,n)}const bd=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},yd=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Ue(e,t,n){return e?bd(t,n):yd()}function Cl(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Ol(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Pl(e){return e==="angle"?{between:pl,compare:gf,normalize:Qt}:{between:_n,compare:(t,n)=>t-n,normalize:t=>t}}function gr({start:e,end:t,count:n,loop:i,style:s}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:s}}function xd(e,t,n){const{property:i,start:s,end:o}=n,{between:r,normalize:a}=Pl(i),l=t.length;let{start:c,end:u,loop:f}=e,p,g;if(f){for(c+=l,u+=l,p=0,g=l;p<g&&r(a(t[c%l][i]),s,o);++p)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:f,style:e.style}}function vd(e,t,n){if(!n)return[e];const{property:i,start:s,end:o}=n,r=t.length,{compare:a,between:l,normalize:c}=Pl(i),{start:u,end:f,loop:p,style:g}=xd(e,t,n),x=[];let y=!1,v=null,w,k,C;const O=()=>l(s,C,w)&&a(s,C)!==0,T=()=>a(o,w)===0||l(o,C,w),D=()=>y||O(),P=()=>!y||T();for(let E=u,A=u;E<=f;++E)k=t[E%r],!k.skip&&(w=c(k[i]),w!==C&&(y=l(w,s,o),v===null&&D()&&(v=a(w,s)===0?E:A),v!==null&&P()&&(x.push(gr({start:v,end:E,loop:p,count:r,style:g})),v=null),A=E,C=w));return v!==null&&x.push(gr({start:v,end:f,loop:p,count:r,style:g})),x}function _d(e,t){const n=[],i=e.segments;for(let s=0;s<i.length;s++){const o=vd(i[s],e.points,t);o.length&&n.push(...o)}return n}function wd(e,t,n,i){let s=0,o=t-1;if(n&&!i)for(;s<t&&!e[s].skip;)s++;for(;s<t&&e[s].skip;)s++;for(s%=t,n&&(o+=s);o>s&&e[o%t].skip;)o--;return o%=t,{start:s,end:o}}function Sd(e,t,n,i){const s=e.length,o=[];let r=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%s];c.skip||c.stop?a.skip||(i=!1,o.push({start:t%s,end:(l-1)%s,loop:i}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%s,end:r%s,loop:i}),o}function kd(e,t){const n=e.points,i=e.options.spanGaps,s=n.length;if(!s)return[];const o=!!e._loop,{start:r,end:a}=wd(n,s,o,i);if(i===!0)return mr(e,[{start:r,end:a,loop:o}],n,t);const l=a<r?a+s:a,c=!!e._fullLoop&&r===0&&a===s-1;return mr(e,Sd(n,r,l,c),n,t)}function mr(e,t,n,i){return!i||!i.setContext||!n?t:Td(e,t,n,i)}function Td(e,t,n,i){const s=e._chart.getContext(),o=br(e.options),{_datasetIndex:r,options:{spanGaps:a}}=e,l=n.length,c=[];let u=o,f=t[0].start,p=f;function g(x,y,v,w){const k=a?-1:1;if(x!==y){for(x+=l;n[x%l].skip;)x-=k;for(;n[y%l].skip;)y+=k;x%l!==y%l&&(c.push({start:x%l,end:y%l,loop:v,style:w}),u=w,f=y%l)}}for(const x of t){f=a?f:x.start;let y=n[f%l],v;for(p=f+1;p<=x.end;p++){const w=n[p%l];v=br(i.setContext(Le(s,{type:"segment",p0:y,p1:w,p0DataIndex:(p-1)%l,p1DataIndex:p%l,datasetIndex:r}))),Md(v,u)&&g(f,p-1,x.loop,u),y=w,u=v}f<p-1&&g(f,p-1,x.loop,u)}return c}function br(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Md(e,t){if(!t)return!1;const n=[],i=function(s,o){return lo(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,i)!==JSON.stringify(t,i)}function ni(e,t,n){return e.options.clip?e[n]:t[n]}function Ed(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:ni(n,t,"left"),right:ni(n,t,"right"),top:ni(i,t,"top"),bottom:ni(i,t,"bottom")}:t}function Cd(e,t){const n=t._clip;if(n.disabled)return!1;const i=Ed(t,e.chartArea);return{left:n.left===!1?0:i.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:i.right+(n.right===!0?0:n.right),top:n.top===!1?0:i.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:i.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
2414
|
+
* Chart.js v4.5.0
|
|
2415
|
+
* https://www.chartjs.org
|
|
2416
|
+
* (c) 2025 Chart.js Contributors
|
|
2417
|
+
* Released under the MIT License
|
|
2418
|
+
*/class Od{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,s){const o=n.listeners[s],r=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:r,currentStep:Math.min(i-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=ml.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const o=i.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,i,t,"progress")),o.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var jt=new Od;const yr="transparent",Pd={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=ar(e||yr),s=i.valid&&ar(t||yr);return s&&s.valid?s.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Dd{constructor(t,n,i,s){const o=n[i];s=Jn([t.to,s,o,t.from]);const r=Jn([t.from,o,s]);this._active=!0,this._fn=t.fn||Pd[t.type||typeof r],this._easing=Tn[t.easing]||Tn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],o=i-this._start,r=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Jn([t.to,n,s,t.from]),this._from=Jn([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||n<i),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=o;return}l=n/i%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][n]()}}class Dl{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!B(t))return;const n=Object.keys(Y.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!B(o))return;const r={};for(const a of n)r[a]=o[a];(Q(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,r)})})}_animateOptions(t,n){const i=n.options,s=Id(t,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&Ad(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,n){const i=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(n),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,n));continue}const u=n[c];let f=o[c];const p=i.get(c);if(f)if(p&&f.active()){f.update(p,u,a);continue}else f.cancel();if(!p||!p.duration){t[c]=u;continue}o[c]=f=new Dd(p,t,c,u),s.push(f)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return jt.add(this._chart,i),!0}}function Ad(e,t){const n=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const o=e[i[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function Id(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function xr(e,t){const n=e&&e.options||{},i=n.reverse,s=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:i?o:s,end:i?s:o}}function Ld(e,t,n){if(n===!1)return!1;const i=xr(e,n),s=xr(t,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function Rd(e){let t,n,i,s;return B(e)?(t=e.top,n=e.right,i=e.bottom,s=e.left):t=n=i=s=e,{top:t,right:n,bottom:i,left:s,disabled:e===!1}}function Al(e,t){const n=[],i=e._getSortedDatasetMetas(t);let s,o;for(s=0,o=i.length;s<o;++s)n.push(i[s].index);return n}function vr(e,t,n,i={}){const s=e.keys,o=i.mode==="single";let r,a,l,c;if(t===null)return;let u=!1;for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===n){if(u=!0,i.all)continue;break}c=e.values[l],xt(c)&&(o||t===0||ce(t)===ce(c))&&(t+=c)}return!u&&!i.all?0:t}function Nd(e,t){const{iScale:n,vScale:i}=t,s=n.axis==="x"?"x":"y",o=i.axis==="x"?"x":"y",r=Object.keys(e),a=new Array(r.length);let l,c,u;for(l=0,c=r.length;l<c;++l)u=r[l],a[l]={[s]:u,[o]:e[u]};return a}function Ji(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function zd(e,t,n){return\`\${e.id}.\${t.id}.\${n.stack||n.type}\`}function Fd(e){const{min:t,max:n,minDefined:i,maxDefined:s}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function Hd(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function _r(e,t,n,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const o=e[s.index];if(n&&o>0||!n&&o<0)return s.index}return null}function wr(e,t){const{chart:n,_cachedMeta:i}=e,s=n._stacks||(n._stacks={}),{iScale:o,vScale:r,index:a}=i,l=o.axis,c=r.axis,u=zd(o,r,i),f=t.length;let p;for(let g=0;g<f;++g){const x=t[g],{[l]:y,[c]:v}=x,w=x._stacks||(x._stacks={});p=w[c]=Hd(s,u,y),p[a]=v,p._top=_r(p,r,!0,i.type),p._bottom=_r(p,r,!1,i.type);const k=p._visualValues||(p._visualValues={});k[a]=v}}function ts(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function Bd(e,t){return Le(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Vd(e,t,n){return Le(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function pn(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const s of t){const o=s._stacks;if(!o||o[i]===void 0||o[i][n]===void 0)return;delete o[i][n],o[i]._visualValues!==void 0&&o[i]._visualValues[n]!==void 0&&delete o[i]._visualValues[n]}}}const es=e=>e==="reset"||e==="none",Sr=(e,t)=>t?e:Object.assign({},e),Wd=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Al(n,!0),values:null};class Il{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ji(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&pn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(f,p,g,x)=>f==="x"?p:f==="r"?x:g,o=n.xAxisID=R(i.xAxisID,ts(t,"x")),r=n.yAxisID=R(i.yAxisID,ts(t,"y")),a=n.rAxisID=R(i.rAxisID,ts(t,"r")),l=n.indexAxis,c=n.iAxisID=s(l,o,r,a),u=n.vAxisID=s(l,r,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&sr(this._data,this),t._stacked&&pn(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(B(n)){const s=this._cachedMeta;this._data=Nd(n,s)}else if(i!==n){if(i){sr(i,this);const s=this._cachedMeta;pn(s),s._parsed=[]}n&&Object.isExtensible(n)&&xf(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const o=n._stacked;n._stacked=Ji(n.vScale,n),n.stack!==i.stack&&(s=!0,pn(n),n.stack=i.stack),this._resyncElements(t),(s||o!==n._stacked)&&(wr(this,n._parsed),n._stacked=Ji(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:s}=this,{iScale:o,_stacked:r}=i,a=o.axis;let l=t===0&&n===s.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,f,p;if(this._parsing===!1)i._parsed=s,i._sorted=!0,p=s;else{Q(s[t])?p=this.parseArrayData(i,s,t,n):B(s[t])?p=this.parseObjectData(i,s,t,n):p=this.parsePrimitiveData(i,s,t,n);const g=()=>f[a]===null||c&&f[a]<c[a];for(u=0;u<n;++u)i._parsed[u+t]=f=p[u],l&&(g()&&(l=!1),c=f);i._sorted=l}r&&wr(this,p)}parsePrimitiveData(t,n,i,s){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),u=o===r,f=new Array(s);let p,g,x;for(p=0,g=s;p<g;++p)x=p+i,f[p]={[a]:u||o.parse(c[x],x),[l]:r.parse(n[x],x)};return f}parseArrayData(t,n,i,s){const{xScale:o,yScale:r}=t,a=new Array(s);let l,c,u,f;for(l=0,c=s;l<c;++l)u=l+i,f=n[u],a[l]={x:o.parse(f[0],u),y:r.parse(f[1],u)};return a}parseObjectData(t,n,i,s){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s);let u,f,p,g;for(u=0,f=s;u<f;++u)p=u+i,g=n[p],c[u]={x:o.parse(wi(g,a),p),y:r.parse(wi(g,l),p)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const s=this.chart,o=this._cachedMeta,r=n[t.axis],a={keys:Al(s,!0),values:n._stacks[t.axis]._visualValues};return vr(a,r,o.index,{mode:i})}updateRangeFromParsed(t,n,i,s){const o=i[n.axis];let r=o===null?NaN:o;const a=s&&i._stacks[n.axis];s&&a&&(s.values=a,r=vr(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,n){const i=this._cachedMeta,s=i._parsed,o=i._sorted&&t===i.iScale,r=s.length,a=this._getOtherScale(t),l=Wd(n,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Fd(a);let p,g;function x(){g=s[p];const y=g[a.axis];return!xt(g[t.axis])||u>y||f<y}for(p=0;p<r&&!(!x()&&(this.updateRangeFromParsed(c,t,g,l),o));++p);if(o){for(p=r-1;p>=0;--p)if(!x()){this.updateRangeFromParsed(c,t,g,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let s,o,r;for(s=0,o=n.length;s<o;++s)r=n[s][t.axis],xt(r)&&i.push(r);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,s=n.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Rd(R(this.options.clip,Ld(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,s=i.data||[],o=n.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,o,a,l),u=a;u<a+l;++u){const f=s[u];f.hidden||(f.active&&c?r.push(f):f.draw(t,o))}for(u=0;u<r.length;++u)r[u].draw(t,o)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=Vd(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Bd(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const s=n==="active",o=this._cachedDataOpts,r=t+"-"+n,a=o[r],l=this.enableOptionSharing&&Si(i);if(a)return Sr(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),f=s?[\`\${t}Hover\`,"hover",t,""]:[t,""],p=c.getOptionScopes(this.getDataset(),u),g=Object.keys(Y.elements[t]),x=()=>this.getContext(i,s,n),y=c.resolveNamedOptions(p,g,x,f);return y.$shared&&(y.$shared=l,o[r]=Object.freeze(Sr(y,l))),y}_resolveAnimations(t,n,i){const s=this.chart,o=this._cachedDataOpts,r=\`animation-\${n}\`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),p=u.getOptionScopes(this.getDataset(),f);l=u.createResolver(p,this.getContext(t,i,n))}const c=new Dl(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||es(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),s=this._sharedOptions,o=this.getSharedOptions(i),r=this.includeOptions(n,o)||o!==s;return this.updateSharedOptions(o,n,i),{sharedOptions:o,includeOptions:r}}updateElement(t,n,i,s){es(s)?Object.assign(t,i):this._resolveAnimations(n,s).update(t,i)}updateSharedOptions(t,n,i){t&&!es(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,s){t.active=s;const o=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=i.length,o=n.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,n,i=!0){const s=this._cachedMeta,o=s.data,r=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=r;a--)c[a]=c[a-n]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,n),i&&this.updateElements(o,t,n,"reset")}updateElements(t,n,i,s){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,n);i._stacked&&pn(i,s)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,s]=t;this[n](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}class jd extends Il{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:s=[],_dataset:o}=n,r=this.chart._animationsDisabled;let{start:a,count:l}=Sf(n,s,r);this._drawStart=a,this._drawCount=l,kf(n)&&(a=0,l=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,n,i,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,s),p=r.axis,g=a.axis,{spanGaps:x,segment:y}=this.options,v=In(x)?x:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||o||s==="none",k=n+i,C=t.length;let O=n>0&&this.getParsed(n-1);for(let T=0;T<C;++T){const D=t[T],P=w?D:{};if(T<n||T>=k){P.skip=!0;continue}const E=this.getParsed(T),A=V(E[g]),F=P[p]=r.getPixelForValue(E[p],T),L=P[g]=o||A?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,E,l):E[g],T);P.skip=isNaN(F)||isNaN(L)||A,P.stop=T>0&&Math.abs(E[p]-O[p])>v,y&&(P.parsed=E,P.raw=c.data[T]),f&&(P.options=u||this.resolveDataElementOptions(T,D.active?"active":s)),w||this.updateElement(D,T,P,s),O=E}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function we(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class bo{static override(t){Object.assign(bo.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return we()}parse(){return we()}format(){return we()}add(){return we()}diff(){return we()}startOf(){return we()}endOf(){return we()}}var Ud={_date:bo};function $d(e,t,n,i){const{controller:s,data:o,_sorted:r}=e,a=s._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?bf:Ee;if(i){if(s._sharedOptions){const u=o[0],f=typeof u.getRange=="function"&&u.getRange(t);if(f){const p=c(o,t,n-f),g=c(o,t,n+f);return{lo:p.lo,hi:g.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:f}=s._cachedMeta,{_parsed:p}=e,g=p.slice(0,u.lo+1).reverse().findIndex(y=>!V(y[f.axis]));u.lo-=Math.max(0,g);const x=p.slice(u.hi).findIndex(y=>!V(y[f.axis]));u.hi+=Math.max(0,x)}return u}}return{lo:0,hi:o.length-1}}function Ni(e,t,n,i,s){const o=e.getSortedVisibleDatasetMetas(),r=n[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:u}=o[a],{lo:f,hi:p}=$d(o[a],t,r,s);for(let g=f;g<=p;++g){const x=u[g];x.skip||i(x,c,g)}}}function Yd(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,s){const o=t?Math.abs(i.x-s.x):0,r=n?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function ns(e,t,n,i,s){const o=[];return!s&&!e.isPointInArea(t)||Ni(e,n,t,function(a,l,c){!s&&!Je(a,e.chartArea,0)||a.inRange(t.x,t.y,i)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Xd(e,t,n,i){let s=[];function o(r,a,l){const{startAngle:c,endAngle:u}=r.getProps(["startAngle","endAngle"],i),{angle:f}=pf(r,{x:t.x,y:t.y});pl(f,c,u)&&s.push({element:r,datasetIndex:a,index:l})}return Ni(e,n,t,o),s}function qd(e,t,n,i,s,o){let r=[];const a=Yd(n);let l=Number.POSITIVE_INFINITY;function c(u,f,p){const g=u.inRange(t.x,t.y,s);if(i&&!g)return;const x=u.getCenterPoint(s);if(!(!!o||e.isPointInArea(x))&&!g)return;const v=a(t,x);v<l?(r=[{element:u,datasetIndex:f,index:p}],l=v):v===l&&r.push({element:u,datasetIndex:f,index:p})}return Ni(e,n,t,c),r}function is(e,t,n,i,s,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!i?Xd(e,t,n,s):qd(e,t,n,i,s,o)}function kr(e,t,n,i,s){const o=[],r=n==="x"?"inXRange":"inYRange";let a=!1;return Ni(e,n,t,(l,c,u)=>{l[r]&&l[r](t[n],s)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,s))}),i&&!a?[]:o}var Gd={modes:{index(e,t,n,i){const s=It(t,e),o=n.axis||"x",r=n.includeInvisible||!1,a=n.intersect?ns(e,s,o,i,r):is(e,s,o,!1,i,r),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,f=c.data[u];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,i){const s=It(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;let a=n.intersect?ns(e,s,o,i,r):is(e,s,o,!1,i,r);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,i){const s=It(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;return ns(e,s,o,i,r)},nearest(e,t,n,i){const s=It(t,e),o=n.axis||"xy",r=n.includeInvisible||!1;return is(e,s,o,n.intersect,i,r)},x(e,t,n,i){const s=It(t,e);return kr(e,s,"x",n.intersect,i)},y(e,t,n,i){const s=It(t,e);return kr(e,s,"y",n.intersect,i)}}};const Ll=["left","top","right","bottom"];function gn(e,t){return e.filter(n=>n.pos===t)}function Tr(e,t){return e.filter(n=>Ll.indexOf(n.pos)===-1&&n.box.axis===t)}function mn(e,t){return e.sort((n,i)=>{const s=t?i:n,o=t?n:i;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function Kd(e){const t=[];let n,i,s,o,r,a;for(n=0,i=(e||[]).length;n<i;++n)s=e[n],{position:o,options:{stack:r,stackWeight:a=1}}=s,t.push({index:n,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return t}function Zd(e){const t={};for(const n of e){const{stack:i,pos:s,stackWeight:o}=n;if(!i||!Ll.includes(s))continue;const r=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function Qd(e,t){const n=Zd(e),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let o,r,a;for(o=0,r=e.length;o<r;++o){a=e[o];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*i:l&&t.availableWidth,a.height=s):(a.width=i,a.height=u?u*s:l&&t.availableHeight)}return n}function Jd(e){const t=Kd(e),n=mn(t.filter(c=>c.box.fullSize),!0),i=mn(gn(t,"left"),!0),s=mn(gn(t,"right")),o=mn(gn(t,"top"),!0),r=mn(gn(t,"bottom")),a=Tr(t,"x"),l=Tr(t,"y");return{fullSize:n,leftAndTop:i.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:gn(t,"chartArea"),vertical:i.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function Mr(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function Rl(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function tp(e,t,n,i){const{pos:s,box:o}=n,r=e.maxPadding;if(!B(s)){n.size&&(e[s]-=n.size);const f=i[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?o.height:o.width),n.size=f.size/f.count,e[s]+=n.size}o.getPadding&&Rl(r,o.getPadding());const a=Math.max(0,t.outerWidth-Mr(r,e,"left","right")),l=Math.max(0,t.outerHeight-Mr(r,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function ep(e){const t=e.maxPadding;function n(i){const s=Math.max(t[i]-e[i],0);return e[i]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function np(e,t){const n=t.maxPadding;function i(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],n[r])}),o}return i(e?["left","right"]:["top","bottom"])}function wn(e,t,n,i){const s=[];let o,r,a,l,c,u;for(o=0,r=e.length,c=0;o<r;++o){a=e[o],l=a.box,l.update(a.width||t.w,a.height||t.h,np(a.horizontal,t));const{same:f,other:p}=tp(t,n,a,i);c|=f&&s.length,u=u||p,l.fullSize||s.push(a)}return c&&wn(s,t,n,i)||u}function ii(e,t,n,i,s){e.top=n,e.left=t,e.right=t+i,e.bottom=n+s,e.width=i,e.height=s}function Er(e,t,n,i){const s=n.padding;let{x:o,y:r}=t;for(const a of e){const l=a.box,c=i[a.stack]||{placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const f=t.w*u,p=c.size||l.height;Si(c.start)&&(r=c.start),l.fullSize?ii(l,s.left,r,n.outerWidth-s.right-s.left,p):ii(l,t.left+c.placed,r,f,p),c.start=r,c.placed+=f,r=l.bottom}else{const f=t.h*u,p=c.size||l.width;Si(c.start)&&(o=c.start),l.fullSize?ii(l,o,s.top,p,n.outerHeight-s.bottom-s.top):ii(l,o,t.top+c.placed,p,f),c.start=o,c.placed+=f,o=l.right}}t.x=o,t.y=r}var ee={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const s=Mt(e.options.layout.padding),o=Math.max(t-s.width,0),r=Math.max(n-s.height,0),a=Jd(e.boxes),l=a.vertical,c=a.horizontal;z(e.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const u=l.reduce((y,v)=>v.box.options&&v.box.options.display===!1?y:y+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),p=Object.assign({},s);Rl(p,Mt(i));const g=Object.assign({maxPadding:p,w:o,h:r,x:s.left,y:s.top},s),x=Qd(l.concat(c),f);wn(a.fullSize,g,f,x),wn(l,g,f,x),wn(c,g,f,x)&&wn(l,g,f,x),ep(g),Er(a.leftAndTop,g,f,x),g.x+=g.w,g.y+=g.h,Er(a.rightAndBottom,g,f,x),e.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},z(a.chartArea,y=>{const v=y.box;Object.assign(v,e.chartArea),v.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class Nl{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,s){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(t){return!0}updateConfig(t){}}class ip extends Nl{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fi="$chartjs",sp={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cr=e=>e===null||e==="";function op(e,t){const n=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[fi]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Cr(s)){const o=pr(e,"width");o!==void 0&&(e.width=o)}if(Cr(i))if(e.style.height==="")e.height=e.width/(t||2);else{const o=pr(e,"height");o!==void 0&&(e.height=o)}return e}const zl=pd?{passive:!0}:!1;function rp(e,t,n){e&&e.addEventListener(t,n,zl)}function ap(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,zl)}function lp(e,t){const n=sp[e.type]||e.type,{x:i,y:s}=It(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Ei(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function cp(e,t,n){const i=e.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ei(a.addedNodes,i),r=r&&!Ei(a.removedNodes,i);r&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function up(e,t,n){const i=e.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Ei(a.removedNodes,i),r=r&&!Ei(a.addedNodes,i);r&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Ln=new Map;let Or=0;function Fl(){const e=window.devicePixelRatio;e!==Or&&(Or=e,Ln.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function hp(e,t){Ln.size||window.addEventListener("resize",Fl),Ln.set(e,t)}function fp(e){Ln.delete(e),Ln.size||window.removeEventListener("resize",Fl)}function dp(e,t,n){const i=e.canvas,s=i&&mo(i);if(!s)return;const o=bl((a,l)=>{const c=s.clientWidth;n(a,l),c<s.clientWidth&&n()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return r.observe(s),hp(e,o),r}function ss(e,t,n){n&&n.disconnect(),t==="resize"&&fp(e)}function pp(e,t,n){const i=e.canvas,s=bl(o=>{e.ctx!==null&&n(lp(o,e))},e);return rp(i,t,s),s}class gp extends Nl{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(op(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[fi])return!1;const i=n[fi].initial;["height","width"].forEach(o=>{const r=i[o];V(r)?n.removeAttribute(o):n.setAttribute(o,r)});const s=i.style||{};return Object.keys(s).forEach(o=>{n.style[o]=s[o]}),n.width=n.width,delete n[fi],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),r={attach:cp,detach:up,resize:dp}[n]||pp;s[n]=r(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),s=i[n];if(!s)return;({attach:ss,detach:ss,resize:ss}[n]||ap)(t,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,s){return dd(t,n,i,s)}isAttached(t){const n=t&&mo(t);return!!(n&&n.isConnected)}}function mp(e){return!go()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?ip:gp}class sn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return In(this.x)&&In(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const s={};return t.forEach(o=>{s[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),s}}function bp(e,t){const n=e.options.ticks,i=yp(e),s=Math.min(n.maxTicksLimit||i,i),o=n.major.enabled?vp(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return _p(t,c,o,r/s),c;const u=xp(o,t,s);if(r>0){let f,p;const g=r>1?Math.round((l-a)/(r-1)):null;for(si(t,c,u,V(g)?0:a-g,a),f=0,p=r-1;f<p;f++)si(t,c,u,o[f],o[f+1]);return si(t,c,u,l,V(g)?t.length:l+g),c}return si(t,c,u),c}function yp(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(i,s))}function xp(e,t,n){const i=wp(e),s=t.length/n;if(!i)return Math.max(s,1);const o=cf(i);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>s)return l}return Math.max(s,1)}function vp(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function _p(e,t,n,i){let s=0,o=n[0],r;for(i=Math.ceil(i),r=0;r<e.length;r++)r===o&&(t.push(e[r]),s++,o=n[s*i])}function si(e,t,n,i,s){const o=R(i,0),r=Math.min(R(s,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),s&&(l=s-i,n=l/Math.floor(l/n)),u=o;u<0;)a++,u=Math.round(o+a*n);for(c=Math.max(o,0);c<r;c++)c===u&&(t.push(e[c]),a++,u=Math.round(o+a*n))}function wp(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const Sp=e=>e==="left"?"right":e==="right"?"left":e,Pr=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Dr=(e,t)=>Math.min(t||e,e);function Ar(e,t){const n=[],i=e.length/t,s=e.length;let o=0;for(;o<s;o+=i)n.push(e[Math.floor(o)]);return n}function kp(e,t,n){const i=e.ticks.length,s=Math.min(t,i-1),o=e._startPixel,r=e._endPixel,a=1e-6;let l=e.getPixelForTick(s),c;if(!(n&&(i===1?c=Math.max(l-o,r-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-a||l>r+a)))return l}function Tp(e,t){z(e,n=>{const i=n.gc,s=i.length/2;let o;if(s>t){for(o=0;o<s;++o)delete n.data[i[o]];i.splice(0,s)}})}function bn(e){return e.drawTicks?e.tickLength:0}function Ir(e,t){if(!e.display)return 0;const n=ct(e.font,t),i=Mt(e.padding);return(Q(e.text)?e.text.length:1)*n.lineHeight+i.height}function Mp(e,t){return Le(e,{scale:t,type:"scale"})}function Ep(e,t,n){return Le(e,{tick:n,index:t,type:"tick"})}function Cp(e,t,n){let i=yl(e);return(n&&t!=="right"||!n&&t==="right")&&(i=Sp(i)),i}function Op(e,t,n,i){const{top:s,left:o,bottom:r,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let f=0,p,g,x;const y=r-s,v=a-o;if(e.isHorizontal()){if(g=ft(i,o,a),B(n)){const w=Object.keys(n)[0],k=n[w];x=u[w].getPixelForValue(k)+y-t}else n==="center"?x=(c.bottom+c.top)/2+y-t:x=Pr(e,n,t);p=a-o}else{if(B(n)){const w=Object.keys(n)[0],k=n[w];g=u[w].getPixelForValue(k)-v+t}else n==="center"?g=(c.left+c.right)/2-v+t:g=Pr(e,n,t);x=ft(i,r,s),f=n==="left"?-wt:wt}return{titleX:g,titleY:x,maxWidth:p,rotation:f}}class on extends sn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:s}=this;return t=Pt(t,Number.POSITIVE_INFINITY),n=Pt(n,Number.NEGATIVE_INFINITY),i=Pt(i,Number.POSITIVE_INFINITY),s=Pt(s,Number.NEGATIVE_INFINITY),{min:Pt(t,i),max:Pt(n,s),minDefined:xt(t),maxDefined:xt(n)}}getMinMax(t){let{min:n,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:n,max:i};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),s||(n=Math.min(n,r.min)),o||(i=Math.max(i,r.max));return n=o&&n>i?i:n,i=s&&n>i?n:i,{min:Pt(n,Pt(i,n)),max:Pt(i,Pt(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=$f(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Ar(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=bp(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){I(this.options.afterUpdate,[this])}beforeSetDimensions(){I(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){I(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),I(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){I(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,s,o;for(i=0,s=t.length;i<s;i++)o=t[i],o.label=I(n.callback,[o.value,i,t],this)}afterTickToLabelConversion(){I(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){I(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=Dr(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,o=n.maxRotation;let r=s,a,l,c;if(!this._isVisible()||!n.display||s>=o||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),f=u.widest.width,p=u.highest.height,g=yt(this.chart.width-f,0,this.maxWidth);a=t.offset?this.maxWidth/i:g/(i-1),f+6>a&&(a=g/(i-(t.offset?.5:1)),l=this.maxHeight-bn(t.grid)-n.padding-Ir(t.title,this.chart.options.font),c=Math.sqrt(f*f+p*p),r=df(Math.min(Math.asin(yt((u.highest.height+6)/a,-1,1)),Math.asin(yt(l/c,-1,1))-Math.asin(yt(p/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=Ir(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=bn(o)+l):(t.height=this.maxHeight,t.width=bn(o)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:p}=this._getLabelSizes(),g=i.padding*2,x=Me(this.labelRotation),y=Math.cos(x),v=Math.sin(x);if(a){const w=i.mirror?0:v*f.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+w+g)}else{const w=i.mirror?0:y*f.width+v*p.height;t.width=Math.min(this.maxWidth,t.width+w+g)}this._calculatePadding(c,u,v,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,s){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,g=0;l?c?(p=s*t.width,g=i*n.height):(p=i*t.height,g=s*n.width):o==="start"?g=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,g=n.width/2),this.paddingLeft=Math.max((p-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((g-f+r)*this.width/(this.width-f),0)}else{let u=n.height/2,f=t.height/2;o==="start"?(u=0,f=t.height):o==="end"&&(u=n.height,f=0),this.paddingTop=u+r,this.paddingBottom=f+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){I(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)V(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=Ar(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(n/Dr(n,i));let c=0,u=0,f,p,g,x,y,v,w,k,C,O,T;for(f=0;f<n;f+=l){if(x=t[f].label,y=this._resolveTickFontOptions(f),s.font=v=y.string,w=o[v]=o[v]||{data:{},gc:[]},k=y.lineHeight,C=O=0,!V(x)&&!Q(x))C=cr(s,w.data,w.gc,C,x),O=k;else if(Q(x))for(p=0,g=x.length;p<g;++p)T=x[p],!V(T)&&!Q(T)&&(C=cr(s,w.data,w.gc,C,T),O+=k);r.push(C),a.push(O),c=Math.max(C,c),u=Math.max(O,u)}Tp(o,n);const D=r.indexOf(c),P=a.indexOf(u),E=A=>({width:r[A]||0,height:a[A]||0});return{first:E(0),last:E(n-1),widest:E(D),highest:E(P),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return mf(this._alignToPixels?_e(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=Ep(this.getContext(),t,i))}return this.$context||(this.$context=Mp(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Me(this.labelRotation),i=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*i>a*s?a/i:l/s:l*s<a*i?l/i:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),f=this.ticks.length+(l?1:0),p=bn(o),g=[],x=a.setContext(this.getContext()),y=x.display?x.width:0,v=y/2,w=function(q){return _e(i,q,y)};let k,C,O,T,D,P,E,A,F,L,H,K;if(r==="top")k=w(this.bottom),P=this.bottom-p,A=k-v,L=w(t.top)+v,K=t.bottom;else if(r==="bottom")k=w(this.top),L=t.top,K=w(t.bottom)-v,P=k+v,A=this.top+p;else if(r==="left")k=w(this.right),D=this.right-p,E=k-v,F=w(t.left)+v,H=t.right;else if(r==="right")k=w(this.left),F=t.left,H=w(t.right)-v,D=k+v,E=this.left+p;else if(n==="x"){if(r==="center")k=w((t.top+t.bottom)/2+.5);else if(B(r)){const q=Object.keys(r)[0],nt=r[q];k=w(this.chart.scales[q].getPixelForValue(nt))}L=t.top,K=t.bottom,P=k+v,A=P+p}else if(n==="y"){if(r==="center")k=w((t.left+t.right)/2);else if(B(r)){const q=Object.keys(r)[0],nt=r[q];k=w(this.chart.scales[q].getPixelForValue(nt))}D=k-v,E=D-p,F=t.left,H=t.right}const et=R(s.ticks.maxTicksLimit,f),j=Math.max(1,Math.ceil(f/et));for(C=0;C<f;C+=j){const q=this.getContext(C),nt=o.setContext(q),Ne=a.setContext(q),pe=nt.lineWidth,qt=nt.color,ze=Ne.dash||[],dt=Ne.dashOffset,ge=nt.tickWidth,vt=nt.tickColor,me=nt.tickBorderDash||[],Ht=nt.tickBorderDashOffset;O=kp(this,C,l),O!==void 0&&(T=_e(i,O,pe),c?D=E=F=H=T:P=A=L=K=T,g.push({tx1:D,ty1:P,tx2:E,ty2:A,x1:F,y1:L,x2:H,y2:K,width:pe,color:qt,borderDash:ze,borderDashOffset:dt,tickWidth:ge,tickColor:vt,tickBorderDash:me,tickBorderDashOffset:Ht}))}return this._ticksLength=f,this._borderValue=k,g}_computeLabelItems(t){const n=this.axis,i=this.options,{position:s,ticks:o}=i,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:f}=o,p=bn(i.grid),g=p+u,x=f?-u:g,y=-Me(this.labelRotation),v=[];let w,k,C,O,T,D,P,E,A,F,L,H,K="middle";if(s==="top")D=this.bottom-x,P=this._getXAxisLabelAlignment();else if(s==="bottom")D=this.top+x,P=this._getXAxisLabelAlignment();else if(s==="left"){const j=this._getYAxisLabelAlignment(p);P=j.textAlign,T=j.x}else if(s==="right"){const j=this._getYAxisLabelAlignment(p);P=j.textAlign,T=j.x}else if(n==="x"){if(s==="center")D=(t.top+t.bottom)/2+g;else if(B(s)){const j=Object.keys(s)[0],q=s[j];D=this.chart.scales[j].getPixelForValue(q)+g}P=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")T=(t.left+t.right)/2-g;else if(B(s)){const j=Object.keys(s)[0],q=s[j];T=this.chart.scales[j].getPixelForValue(q)}P=this._getYAxisLabelAlignment(p).textAlign}n==="y"&&(l==="start"?K="top":l==="end"&&(K="bottom"));const et=this._getLabelSizes();for(w=0,k=a.length;w<k;++w){C=a[w],O=C.label;const j=o.setContext(this.getContext(w));E=this.getPixelForTick(w)+o.labelOffset,A=this._resolveTickFontOptions(w),F=A.lineHeight,L=Q(O)?O.length:1;const q=L/2,nt=j.color,Ne=j.textStrokeColor,pe=j.textStrokeWidth;let qt=P;r?(T=E,P==="inner"&&(w===k-1?qt=this.options.reverse?"left":"right":w===0?qt=this.options.reverse?"right":"left":qt="center"),s==="top"?c==="near"||y!==0?H=-L*F+F/2:c==="center"?H=-et.highest.height/2-q*F+F:H=-et.highest.height+F/2:c==="near"||y!==0?H=F/2:c==="center"?H=et.highest.height/2-q*F:H=et.highest.height-L*F,f&&(H*=-1),y!==0&&!j.showLabelBackdrop&&(T+=F/2*Math.sin(y))):(D=E,H=(1-L)*F/2);let ze;if(j.showLabelBackdrop){const dt=Mt(j.backdropPadding),ge=et.heights[w],vt=et.widths[w];let me=H-dt.top,Ht=0-dt.left;switch(K){case"middle":me-=ge/2;break;case"bottom":me-=ge;break}switch(P){case"center":Ht-=vt/2;break;case"right":Ht-=vt;break;case"inner":w===k-1?Ht-=vt:w>0&&(Ht-=vt/2);break}ze={left:Ht,top:me,width:vt+dt.width,height:ge+dt.height,color:j.backdropColor}}v.push({label:O,font:A,textOffset:H,options:{rotation:y,color:nt,strokeColor:Ne,strokeWidth:pe,textAlign:qt,textBaseline:K,translation:[T,D],backdrop:ze}})}return v}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Me(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,u;return n==="left"?s?(u=this.right+o,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+o,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:s,width:o,height:r}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,s,o,r),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(o=0,r=s.length;o<r;++o){const l=s[o];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),r=i.display?o.width:0;if(!r)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,f,p;this.isHorizontal()?(c=_e(t,this.left,r)-r/2,u=_e(t,this.right,a)+a/2,f=p=l):(f=_e(t,this.top,r)-r/2,p=_e(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,p),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&co(i,s);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,u=r.textOffset;Ti(i,c,0,u,l,a)}s&&uo(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:s}}=this;if(!i.display)return;const o=ct(i.font),r=Mt(i.padding),a=i.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||B(n)?(l+=r.bottom,Q(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=r.top;const{titleX:c,titleY:u,maxWidth:f,rotation:p}=Op(this,l,n,a);Ti(t,i.text,0,0,o,{color:i.color,maxWidth:f,rotation:p,textAlign:Cp(a,n,s),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,i=R(t.grid&&t.grid.z,-1),s=R(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==on.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let o,r;for(o=0,r=n.length;o<r;++o){const a=n[o];a[i]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ct(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class oi{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;Ap(n)&&(i=this.register(n));const s=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,Pp(t,r,i),this.override&&Y.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,s=this.scope;i in n&&delete n[i],s&&i in Y[s]&&(delete Y[s][i],this.override&&delete Ae[i])}}function Pp(e,t,n){const i=An(Object.create(null),[n?Y.get(n):{},Y.get(t),e.defaults]);Y.set(t,i),e.defaultRoutes&&Dp(t,e.defaultRoutes),e.descriptors&&Y.describe(t,e.descriptors)}function Dp(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),s=i.pop(),o=[e].concat(i).join("."),r=t[n].split("."),a=r.pop(),l=r.join(".");Y.route(o,s,l,a)})}function Ap(e){return"id"in e&&"defaults"in e}class Ip{constructor(){this.controllers=new oi(Il,"datasets",!0),this.elements=new oi(sn,"elements"),this.plugins=new oi(Object,"plugins"),this.scales=new oi(on,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,i){[...n].forEach(s=>{const o=i||this._getRegistryForType(s);i||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):z(s,r=>{const a=i||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,n,i){const s=ro(t);I(i["before"+s],[],i),n[t](i),I(i["after"+s],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var At=new Ip;class Lp{constructor(){this._init=[]}notify(t,n,i,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(o,t,n,i);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,n,i,s){s=s||{};for(const o of t){const r=o.plugin,a=r[i],l=[n,s,o.options];if(I(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){V(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,s=R(i.options&&i.options.plugins,{}),o=Rp(i);return s===!1&&!n?[]:zp(t,o,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,i),t,"stop"),this._notify(s(i,n),t,"start")}}function Rp(e){const t={},n=[],i=Object.keys(At.plugins.items);for(let o=0;o<i.length;o++)n.push(At.getPlugin(i[o]));const s=e.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];n.indexOf(r)===-1&&(n.push(r),t[r.id]=!0)}return{plugins:n,localIds:t}}function Np(e,t){return!t&&e===!1?null:e===!0?{}:e}function zp(e,{plugins:t,localIds:n},i,s){const o=[],r=e.getContext();for(const a of t){const l=a.id,c=Np(i[l],s);c!==null&&o.push({plugin:a,options:Fp(e.config,{plugin:a,local:n[l]},c,r)})}return o}function Fp(e,{plugin:t,local:n},i,s){const o=e.pluginScopeKeys(t),r=e.getOptionScopes(i,o);return n&&t.defaults&&r.push(t.defaults),e.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Rs(e,t){const n=Y.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Hp(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Bp(e,t){return e===t?"_index_":"_value_"}function Lr(e){if(e==="x"||e==="y"||e==="r")return e}function Vp(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Ns(e,...t){if(Lr(e))return e;for(const n of t){const i=n.axis||Vp(n.position)||e.length>1&&Lr(e[0].toLowerCase());if(i)return i}throw new Error(\`Cannot determine type of '\${e}' axis. Please provide 'axis' or 'position' option.\`)}function Rr(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Wp(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Rr(e,"x",n[0])||Rr(e,"y",n[0])}return{}}function jp(e,t){const n=Ae[e.type]||{scales:{}},i=t.scales||{},s=Rs(e.type,t),o=Object.create(null);return Object.keys(i).forEach(r=>{const a=i[r];if(!B(a))return console.error(\`Invalid scale configuration for scale: \${r}\`);if(a._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${r}\`);const l=Ns(r,a,Wp(r,e),Y.scales[a.type]),c=Bp(l,s),u=n.scales||{};o[r]=kn(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(r=>{const a=r.type||e.type,l=r.indexAxis||Rs(a,t),u=(Ae[a]||{}).scales||{};Object.keys(u).forEach(f=>{const p=Hp(f,l),g=r[p+"AxisID"]||p;o[g]=o[g]||Object.create(null),kn(o[g],[{axis:p},i[g],u[f]])})}),Object.keys(o).forEach(r=>{const a=o[r];kn(a,[Y.scales[a.type],Y.scale])}),o}function Hl(e){const t=e.options||(e.options={});t.plugins=R(t.plugins,{}),t.scales=jp(e,t)}function Bl(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Up(e){return e=e||{},e.data=Bl(e.data),Hl(e),e}const Nr=new Map,Vl=new Set;function ri(e,t){let n=Nr.get(e);return n||(n=t(),Nr.set(e,n),Vl.add(n)),n}const yn=(e,t,n)=>{const i=wi(t,n);i!==void 0&&e.add(i)};class $p{constructor(t){this._config=Up(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Bl(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Hl(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ri(t,()=>[[\`datasets.\${t}\`,""]])}datasetAnimationScopeKeys(t,n){return ri(\`\${t}.transition.\${n}\`,()=>[[\`datasets.\${t}.transitions.\${n}\`,\`transitions.\${n}\`],[\`datasets.\${t}\`,""]])}datasetElementScopeKeys(t,n){return ri(\`\${t}-\${n}\`,()=>[[\`datasets.\${t}.elements.\${n}\`,\`datasets.\${t}\`,\`elements.\${n}\`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return ri(\`\${i}-plugin-\${n}\`,()=>[[\`plugins.\${n}\`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let s=i.get(t);return(!s||n)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,n,i){const{options:s,type:o}=this,r=this._cachedScopes(t,i),a=r.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(f=>yn(l,t,f))),u.forEach(f=>yn(l,s,f)),u.forEach(f=>yn(l,Ae[o]||{},f)),u.forEach(f=>yn(l,Y,f)),u.forEach(f=>yn(l,As,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Vl.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ae[n]||{},Y.datasets[n]||{},{type:n},Y,As]}resolveNamedOptions(t,n,i,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=zr(this._resolverCache,t,s);let l=r;if(Xp(r,n)){o.$shared=!1,i=le(i)?i():i;const c=this.createResolver(t,i,a);l=tn(r,i,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,i=[""],s){const{resolver:o}=zr(this._resolverCache,t,i);return B(n)?tn(o,n,void 0,s):o}}function zr(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const s=n.join();let o=i.get(s);return o||(o={resolver:ho(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,o)),o}const Yp=e=>B(e)&&Object.getOwnPropertyNames(e).some(t=>le(e[t]));function Xp(e,t){const{isScriptable:n,isIndexable:i}=Sl(e);for(const s of t){const o=n(s),r=i(s),a=(r||o)&&e[s];if(o&&(le(a)||Yp(a))||r&&Q(a))return!0}return!1}var qp="4.5.0";const Gp=["top","bottom","left","right","chartArea"];function Fr(e,t){return e==="top"||e==="bottom"||Gp.indexOf(e)===-1&&t==="x"}function Hr(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function Br(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),I(n&&n.onComplete,[e],t)}function Kp(e){const t=e.chart,n=t.options.animation;I(n&&n.onProgress,[e],t)}function Wl(e){return go()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const di={},Vr=e=>{const t=Wl(e);return Object.values(di).filter(n=>n.canvas===t).pop()};function Zp(e,t,n){const i=Object.keys(e);for(const s of i){const o=+s;if(o>=t){const r=e[s];delete e[s],(n>0||o>t)&&(e[o+n]=r)}}}function Qp(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}class zs{static defaults=Y;static instances=di;static overrides=Ae;static registry=At;static version=qp;static getChart=Vr;static register(...t){At.add(...t),Wr()}static unregister(...t){At.remove(...t),Wr()}constructor(t,n){const i=this.config=new $p(n),s=Wl(t),o=Vr(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||mp(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Jh(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Lp,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=_f(f=>this.update(f),r.resizeDelay||0),this._dataChanges=[],di[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}jt.listen(this,"complete",Br),jt.listen(this,"progress",Kp),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:s,_aspectRatio:o}=this;return V(t)?n&&o?o:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return At}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():dr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ur(this.canvas,this.ctx),this}stop(){return jt.stop(this),this}resize(t,n){jt.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,s=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,n,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,dr(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),I(i.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};z(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,s=Object.keys(i).reduce((r,a)=>(r[a]=!1,r),{});let o=[];n&&(o=o.concat(Object.keys(n).map(r=>{const a=n[r],l=Ns(r,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),z(o,r=>{const a=r.options,l=a.id,c=Ns(l,a),u=R(a.type,r.dtype);(a.position===void 0||Fr(a.position,c)!==Fr(r.dposition))&&(a.position=r.dposition),s[l]=!0;let f=null;if(l in i&&i[l].type===u)f=i[l];else{const p=At.getScale(u);f=new p({id:l,type:u,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(a,t)}),z(s,(r,a)=>{r||delete i[a]}),z(i,r=>{ee.configure(this,r,r.options),ee.addBox(this,r)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((s,o)=>s.index-o.index),i>n){for(let s=n;s<i;++s)this._destroyDatasetMeta(s);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(Hr("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,s)=>{n.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i<s;i++){const o=n[i];let r=this.getDatasetMeta(i);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=a,r.indexAxis=o.indexAxis||Rs(a,this.options),r.order=o.order||0,r.index=i,r.label=""+o.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const l=At.getController(a),{datasetElementType:c,dataElementType:u}=Y.datasets[a];Object.assign(l,{dataElementType:At.getElement(u),datasetElementType:c&&At.getElement(c)}),r.controller=new l(this,i),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){z(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),p=!s&&o.indexOf(f)===-1;f.buildOrUpdateElements(p),r=Math.max(+f.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),s||z(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Hr("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){z(this.scales,t=>{ee.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!tr(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:o}of n){const r=i==="_removeElements"?-o:o;Zp(t,s,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=i(0);for(let o=1;o<n;o++)if(!tr(s,i(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ee.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],z(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,le(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(jt.has(this)?this.attached&&!jt.running(this)&&jt.start(this):(this.draw(),Br({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let s,o;for(s=0,o=n.length;s<o;++s){const r=n[s];(!t||r.visible)&&i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i={meta:t,index:t.index,cancelable:!0},s=Cd(this,t);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(s&&co(n,s),t.controller.draw(),s&&uo(n),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return Je(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,s){const o=Gd.modes[n];return typeof o=="function"?o(this,t,i,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let s=i.filter(o=>o&&o._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Le(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const s=i?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);Si(n)?(o.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(o,{visible:i}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),jt.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ur(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete di[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,i=(o,r)=>{n.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};z(this.options.events,o=>i(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():r()}unbindEvents(){z(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},z(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const s=i?"set":"remove";let o,r,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!vi(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const s=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),r=o(n,t),a=i?t:o(t,n);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const o=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(o||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:s=[],options:o}=this,r=n,a=this._getActiveElements(t,s,i,r),l=rf(t),c=Qp(t,this._lastEvent,i,l);i&&(this._lastEvent=null,I(o.onHover,[t,a,this],this),l&&I(o.onClick,[t,a,this],this));const u=!vi(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,s){if(t.type==="mouseout")return[];if(!i)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}function Wr(){return z(zs.instances,e=>e._plugins.invalidate())}function jl(e,t,n=t){e.lineCap=R(n.borderCapStyle,t.borderCapStyle),e.setLineDash(R(n.borderDash,t.borderDash)),e.lineDashOffset=R(n.borderDashOffset,t.borderDashOffset),e.lineJoin=R(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=R(n.borderWidth,t.borderWidth),e.strokeStyle=R(n.borderColor,t.borderColor)}function Jp(e,t,n){e.lineTo(n.x,n.y)}function tg(e){return e.stepped?Rf:e.tension||e.cubicInterpolationMode==="monotone"?Nf:Jp}function Ul(e,t,n={}){const i=e.length,{start:s=0,end:o=i-1}=n,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(o,a),u=s<r&&o<r||s>a&&o>a;return{count:i,start:l,loop:t.loop,ilen:c<l&&!u?i+c-l:c-l}}function eg(e,t,n,i){const{points:s,options:o}=t,{count:r,start:a,loop:l,ilen:c}=Ul(s,n,i),u=tg(o);let{move:f=!0,reverse:p}=i||{},g,x,y;for(g=0;g<=c;++g)x=s[(a+(p?c-g:g))%r],!x.skip&&(f?(e.moveTo(x.x,x.y),f=!1):u(e,y,x,p,o.stepped),y=x);return l&&(x=s[(a+(p?c:0))%r],u(e,y,x,p,o.stepped)),!!l}function ng(e,t,n,i){const s=t.points,{count:o,start:r,ilen:a}=Ul(s,n,i),{move:l=!0,reverse:c}=i||{};let u=0,f=0,p,g,x,y,v,w;const k=O=>(r+(c?a-O:O))%o,C=()=>{y!==v&&(e.lineTo(u,v),e.lineTo(u,y),e.lineTo(u,w))};for(l&&(g=s[k(0)],e.moveTo(g.x,g.y)),p=0;p<=a;++p){if(g=s[k(p)],g.skip)continue;const O=g.x,T=g.y,D=O|0;D===x?(T<y?y=T:T>v&&(v=T),u=(f*u+O)/++f):(C(),e.lineTo(O,T),x=D,f=0,y=v=T),w=T}C()}function Fs(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?ng:eg}function ig(e){return e.stepped?gd:e.tension||e.cubicInterpolationMode==="monotone"?md:Se}function sg(e,t,n,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,n,i)&&s.closePath()),jl(e,t.options),e.stroke(s)}function og(e,t,n,i){const{segments:s,options:o}=t,r=Fs(t);for(const a of s)jl(e,o,a.style),e.beginPath(),r(e,t,a,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const rg=typeof Path2D=="function";function ag(e,t,n,i){rg&&!t.options.segment?sg(e,t,n,i):og(e,t,n,i)}class lg extends sn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;ad(this._points,i,t,s,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=kd(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,s=t[n],o=this.points,r=_d(this,{property:n,start:s,end:s});if(!r.length)return;const a=[],l=ig(i);let c,u;for(c=0,u=r.length;c<u;++c){const{start:f,end:p}=r[c],g=o[f],x=o[p];if(g===x){a.push(g);continue}const y=Math.abs((s-g[n])/(x[n]-g[n])),v=l(g,x,y,i.stepped);v[n]=t[n],a.push(v)}return a.length===1?a[0]:a}pathSegment(t,n,i){return Fs(this)(t,this,n,i)}path(t,n,i){const s=this.segments,o=Fs(this);let r=this._loop;n=n||0,i=i||this.points.length-n;for(const a of s)r&=o(t,this,a,{start:n,end:n+i-1});return!!r}draw(t,n,i,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),ag(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function jr(e,t,n,i){const s=e.options,{[n]:o}=e.getProps([n],i);return Math.abs(t-o)<s.radius+s.hitRadius}class cg extends sn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,i){const s=this.options,{x:o,y:r}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(n-r,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,n){return jr(this,t,"x",n)}inYRange(t,n){return jr(this,t,"y",n)}getCenterPoint(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const i=n&&t.borderWidth||0;return(n+i)*2}draw(t,n){const i=this.options;this.skip||i.radius<.1||!Je(this,n,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Is(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}const Ur=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},ug=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class $r extends sn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=I(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=ct(i.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Ur(i,o);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let f=t;o.textAlign="left",o.textBaseline="middle";let p=-1,g=-u;return this.legendItems.forEach((x,y)=>{const v=i+n/2+o.measureText(x.text).width;(y===0||c[c.length-1]+v+2*a>r)&&(f+=u,c[c.length-(y>0?0:1)]=0,g+=u,p++),l[y]={left:0,top:g,row:p,width:v,height:s},c[c.length-1]+=v+a}),f}_fitCols(t,n,i,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-t;let f=a,p=0,g=0,x=0,y=0;return this.legendItems.forEach((v,w)=>{const{itemWidth:k,itemHeight:C}=hg(i,n,o,v,s);w>0&&g+C+2*a>u&&(f+=p+a,c.push({width:p,height:g}),x+=p+a,y++,p=g=0),l[w]={left:x,top:g,col:y,width:k,height:C},p=Math.max(p,k),g+=C+a}),f+=p,c.push({width:p,height:g}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:o}}=this,r=Ue(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=ft(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=ft(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=ft(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=ft(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;co(t,this),this._draw(),uo(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:s}=this,{align:o,labels:r}=t,a=Y.color,l=Ue(t.rtl,this.left,this.width),c=ct(r.font),{padding:u}=r,f=c.size,p=f/2;let g;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:x,boxHeight:y,itemHeight:v}=Ur(r,f),w=function(D,P,E){if(isNaN(x)||x<=0||isNaN(y)||y<0)return;s.save();const A=R(E.lineWidth,1);if(s.fillStyle=R(E.fillStyle,a),s.lineCap=R(E.lineCap,"butt"),s.lineDashOffset=R(E.lineDashOffset,0),s.lineJoin=R(E.lineJoin,"miter"),s.lineWidth=A,s.strokeStyle=R(E.strokeStyle,a),s.setLineDash(R(E.lineDash,[])),r.usePointStyle){const F={radius:y*Math.SQRT2/2,pointStyle:E.pointStyle,rotation:E.rotation,borderWidth:A},L=l.xPlus(D,x/2),H=P+p;_l(s,F,L,H,r.pointStyleWidth&&x)}else{const F=P+Math.max((f-y)/2,0),L=l.leftForLtr(D,x),H=En(E.borderRadius);s.beginPath(),Object.values(H).some(K=>K!==0)?Ls(s,{x:L,y:F,w:x,h:y,radius:H}):s.rect(L,F,x,y),s.fill(),A!==0&&s.stroke()}s.restore()},k=function(D,P,E){Ti(s,E.text,D,P+v/2,c,{strikethrough:E.hidden,textAlign:l.textAlign(E.textAlign)})},C=this.isHorizontal(),O=this._computeTitleHeight();C?g={x:ft(o,this.left+u,this.right-i[0]),y:this.top+u+O,line:0}:g={x:this.left+u,y:ft(o,this.top+O+u,this.bottom-n[0].height),line:0},Cl(this.ctx,t.textDirection);const T=v+u;this.legendItems.forEach((D,P)=>{s.strokeStyle=D.fontColor,s.fillStyle=D.fontColor;const E=s.measureText(D.text).width,A=l.textAlign(D.textAlign||(D.textAlign=r.textAlign)),F=x+p+E;let L=g.x,H=g.y;l.setWidth(this.width),C?P>0&&L+F+u>this.right&&(H=g.y+=T,g.line++,L=g.x=ft(o,this.left+u,this.right-i[g.line])):P>0&&H+T>this.bottom&&(L=g.x=L+n[g.line].width+u,g.line++,H=g.y=ft(o,this.top+O+u,this.bottom-n[g.line].height));const K=l.x(L);if(w(K,H,D),L=wf(A,L+x+p,C?L+F:this.right,t.rtl),k(l.x(L),H,D),C)g.x+=F+u;else if(typeof D.text!="string"){const et=c.lineHeight;g.y+=$l(D,et)+u}else g.y+=T}),Ol(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=ct(n.font),s=Mt(n.padding);if(!n.display)return;const o=Ue(t.rtl,this.left,this.width),r=this.ctx,a=n.position,l=i.size/2,c=s.top+l;let u,f=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),u=this.top+c,f=ft(t.align,f,this.right-p);else{const x=this.columnSizes.reduce((y,v)=>Math.max(y,v.height),0);u=c+ft(t.align,this.top,this.bottom-x-t.labels.padding-this._computeTitleHeight())}const g=ft(a,f,f+p);r.textAlign=o.textAlign(yl(a)),r.textBaseline="middle",r.strokeStyle=n.color,r.fillStyle=n.color,r.font=i.string,Ti(r,n.text,g,u,i)}_computeTitleHeight(){const t=this.options.title,n=ct(t.font),i=Mt(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,s,o;if(_n(t,this.left,this.right)&&_n(n,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],_n(t,s.left,s.left+s.width)&&_n(n,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!pg(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=ug(s,i);s&&!o&&I(n.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!o&&I(n.onHover,[t,i,this],this)}else i&&I(n.onClick,[t,i,this],this)}}function hg(e,t,n,i,s){const o=fg(i,e,t,n),r=dg(s,i,t.lineHeight);return{itemWidth:o,itemHeight:r}}function fg(e,t,n,i){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),t+n.size/2+i.measureText(s).width}function dg(e,t,n){let i=e;return typeof t.text!="string"&&(i=$l(t,n)),i}function $l(e,t){const n=e.text?e.text.length:0;return t*n}function pg(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var gg={id:"legend",_element:$r,start(e,t,n){const i=e.legend=new $r({ctx:e.ctx,options:n,chart:e});ee.configure(e,i,n),ee.addBox(e,i)},stop(e){ee.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;ee.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Mt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const Sn={average(e){if(!e.length)return!1;let t,n,i=new Set,s=0,o=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();i.add(l.x),s+=l.y,++o}}return o===0||i.size===0?!1:{x:[...i].reduce((a,l)=>a+l)/i.size,y:s/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=e.length;o<r;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Ds(t,c);u<s&&(s=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function Dt(e,t){return t&&(Q(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ut(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(\`
|
|
2419
|
+
\`)>-1?e.split(\`
|
|
2420
|
+
\`):e}function mg(e,t){const{element:n,datasetIndex:i,index:s}=t,o=e.getDatasetMeta(i).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:e,label:r,parsed:o.getParsed(s),raw:e.data.datasets[i].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function Yr(e,t){const n=e.chart.ctx,{body:i,footer:s,title:o}=e,{boxWidth:r,boxHeight:a}=t,l=ct(t.bodyFont),c=ct(t.titleFont),u=ct(t.footerFont),f=o.length,p=s.length,g=i.length,x=Mt(t.padding);let y=x.height,v=0,w=i.reduce((O,T)=>O+T.before.length+T.lines.length+T.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,f&&(y+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),w){const O=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;y+=g*O+(w-g)*l.lineHeight+(w-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*u.lineHeight+(p-1)*t.footerSpacing);let k=0;const C=function(O){v=Math.max(v,n.measureText(O).width+k)};return n.save(),n.font=c.string,z(e.title,C),n.font=l.string,z(e.beforeBody.concat(e.afterBody),C),k=t.displayColors?r+2+t.boxPadding:0,z(i,O=>{z(O.before,C),z(O.lines,C),z(O.after,C)}),k=0,n.font=u.string,z(e.footer,C),n.restore(),v+=x.width,{width:v,height:y}}function bg(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function yg(e,t,n,i){const{x:s,width:o}=i,r=n.caretSize+n.caretPadding;if(e==="left"&&s+o+r>t.width||e==="right"&&s-o-r<0)return!0}function xg(e,t,n,i){const{x:s,width:o}=n,{width:r,chartArea:{left:a,right:l}}=e;let c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),yg(c,e,t,n)&&(c="center"),c}function Xr(e,t,n){const i=n.yAlign||t.yAlign||bg(e,n);return{xAlign:n.xAlign||t.xAlign||xg(e,t,n,i),yAlign:i}}function vg(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function _g(e,t,n){let{y:i,height:s}=e;return t==="top"?i+=n:t==="bottom"?i-=s+n:i-=s/2,i}function qr(e,t,n,i){const{caretSize:s,caretPadding:o,cornerRadius:r}=e,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:g}=En(r);let x=vg(t,a);const y=_g(t,l,c);return l==="center"?a==="left"?x+=c:a==="right"&&(x-=c):a==="left"?x-=Math.max(u,p)+s:a==="right"&&(x+=Math.max(f,g)+s),{x:yt(x,0,i.width-t.width),y:yt(y,0,i.height-t.height)}}function ai(e,t,n){const i=Mt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function Gr(e){return Dt([],Ut(e))}function wg(e,t,n){return Le(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Kr(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Yl={beforeTitle:Wt,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:Wt,beforeBody:Wt,beforeLabel:Wt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return V(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Wt,afterBody:Wt,beforeFooter:Wt,footer:Wt,afterFooter:Wt};function rt(e,t,n,i){const s=e[t].call(n,i);return typeof s>"u"?Yl[t].call(n,i):s}class Zr extends sn{static positioners=Sn;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,o=new Dl(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=wg(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,s=rt(i,"beforeTitle",this,t),o=rt(i,"title",this,t),r=rt(i,"afterTitle",this,t);let a=[];return a=Dt(a,Ut(s)),a=Dt(a,Ut(o)),a=Dt(a,Ut(r)),a}getBeforeBody(t,n){return Gr(rt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,s=[];return z(t,o=>{const r={before:[],lines:[],after:[]},a=Kr(i,o);Dt(r.before,Ut(rt(a,"beforeLabel",this,o))),Dt(r.lines,rt(a,"label",this,o)),Dt(r.after,Ut(rt(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,n){return Gr(rt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,s=rt(i,"beforeFooter",this,t),o=rt(i,"footer",this,t),r=rt(i,"afterFooter",this,t);let a=[];return a=Dt(a,Ut(s)),a=Dt(a,Ut(o)),a=Dt(a,Ut(r)),a}_createItems(t){const n=this._active,i=this.chart.data,s=[],o=[],r=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(mg(this.chart,n[l]));return t.filter&&(a=a.filter((u,f,p)=>t.filter(u,f,p,i))),t.itemSort&&(a=a.sort((u,f)=>t.itemSort(u,f,i))),z(a,u=>{const f=Kr(t.callbacks,u);s.push(rt(f,"labelColor",this,u)),o.push(rt(f,"labelPointStyle",this,u)),r.push(rt(f,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,n){const i=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const a=Sn[i.position].call(this,s,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const l=this._size=Yr(this,i),c=Object.assign({},a,l),u=Xr(this.chart,i,c),f=qr(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){const o=this.getCaretPosition(t,i,s);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,i){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:f}=En(a),{x:p,y:g}=t,{width:x,height:y}=n;let v,w,k,C,O,T;return o==="center"?(O=g+y/2,s==="left"?(v=p,w=v-r,C=O+r,T=O-r):(v=p+x,w=v+r,C=O-r,T=O+r),k=v):(s==="left"?w=p+Math.max(l,u)+r:s==="right"?w=p+x-Math.max(c,f)-r:w=this.caretX,o==="top"?(C=g,O=C-r,v=w-r,k=w+r):(C=g+y,O=C+r,v=w+r,k=w-r),T=C),{x1:v,x2:w,x3:k,y1:C,y2:O,y3:T}}drawTitle(t,n,i){const s=this.title,o=s.length;let r,a,l;if(o){const c=Ue(i.rtl,this.x,this.width);for(t.x=ai(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",r=ct(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=r.string,l=0;l<o;++l)n.fillText(s[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,n,i,s,o){const r=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=o,u=ct(o.bodyFont),f=ai(this,"left",o),p=s.x(f),g=l<u.lineHeight?(u.lineHeight-l)/2:0,x=n.y+g;if(o.usePointStyle){const y={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},v=s.leftForLtr(p,c)+c/2,w=x+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Is(t,y,v,w),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Is(t,y,v,w)}else{t.lineWidth=B(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const y=s.leftForLtr(p,c),v=s.leftForLtr(s.xPlus(p,1),c-2),w=En(r.borderRadius);Object.values(w).some(k=>k!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Ls(t,{x:y,y:x,w:c,h:l,radius:w}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Ls(t,{x:v,y:x+1,w:c-2,h:l-2,radius:w}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,x,c,l),t.strokeRect(y,x,c,l),t.fillStyle=r.backgroundColor,t.fillRect(v,x+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,f=ct(i.bodyFont);let p=f.lineHeight,g=0;const x=Ue(i.rtl,this.x,this.width),y=function(E){n.fillText(E,x.x(t.x+g),t.y+p/2),t.y+=p+o},v=x.textAlign(r);let w,k,C,O,T,D,P;for(n.textAlign=r,n.textBaseline="middle",n.font=f.string,t.x=ai(this,v,i),n.fillStyle=i.bodyColor,z(this.beforeBody,y),g=a&&v!=="right"?r==="center"?c/2+u:c+2+u:0,O=0,D=s.length;O<D;++O){for(w=s[O],k=this.labelTextColors[O],n.fillStyle=k,z(w.before,y),C=w.lines,a&&C.length&&(this._drawColorBox(n,t,O,x,i),p=Math.max(f.lineHeight,l)),T=0,P=C.length;T<P;++T)y(C[T]),p=f.lineHeight;z(w.after,y)}g=0,p=f.lineHeight,z(this.afterBody,y),t.y-=o}drawFooter(t,n,i){const s=this.footer,o=s.length;let r,a;if(o){const l=Ue(i.rtl,this.x,this.width);for(t.x=ai(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",r=ct(i.footerFont),n.fillStyle=i.footerColor,n.font=r.string,a=0;a<o;++a)n.fillText(s[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+i.footerSpacing}}drawBackground(t,n,i,s){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:u}=i,{topLeft:f,topRight:p,bottomLeft:g,bottomRight:x}=En(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+f,l),r==="top"&&this.drawCaret(t,n,i,s),n.lineTo(a+c-p,l),n.quadraticCurveTo(a+c,l,a+c,l+p),r==="center"&&o==="right"&&this.drawCaret(t,n,i,s),n.lineTo(a+c,l+u-x),n.quadraticCurveTo(a+c,l+u,a+c-x,l+u),r==="bottom"&&this.drawCaret(t,n,i,s),n.lineTo(a+g,l+u),n.quadraticCurveTo(a,l+u,a,l+u-g),r==="center"&&o==="left"&&this.drawCaret(t,n,i,s),n.lineTo(a,l+f),n.quadraticCurveTo(a,l,a+f,l),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,s=i&&i.x,o=i&&i.y;if(s||o){const r=Sn[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=Yr(this,t),l=Object.assign({},r,this._size),c=Xr(n,t,l),u=qr(t,l,c,n);(s._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=Mt(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,s,n),Cl(t,n.textDirection),o.y+=r.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),Ol(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,s=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!vi(i,s),r=this._positionChanged(s,n);(o||r)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(t,o,n,i),a=this._positionChanged(r,t),l=n||!vi(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&r.reverse(),r}_positionChanged(t,n){const{caretX:i,caretY:s,options:o}=this,r=Sn[o.position].call(this,t,n);return r!==!1&&(i!==r.x||s!==r.y)}}var Sg={id:"tooltip",_element:Zr,positioners:Sn,afterInit(e,t,n){n&&(e.tooltip=new Zr({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Yl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const kg=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Tg(e,t,n,i){const s=e.indexOf(t);if(s===-1)return kg(e,t,n,i);const o=e.lastIndexOf(t);return s!==o?n:s}const Mg=(e,t)=>e===null?null:yt(Math.round(e),0,t);function Qr(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Eg extends on{static id="category";static defaults={ticks:{callback:Qr}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:s,label:o}of n)i[s]===o&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(V(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:Tg(i,t,R(n,t),this._addedLabels),Mg(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,s=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let r=t;r<=n;r++)s.push({value:r});return s}getLabelForValue(t){return Qr.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Cg(e,t){const n=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:f,includeBounds:p}=e,g=o||1,x=u-1,{min:y,max:v}=t,w=!V(r),k=!V(a),C=!V(c),O=(v-y)/(f+1);let T=nr((v-y)/x/g)*g,D,P,E,A;if(T<1e-14&&!w&&!k)return[{value:y},{value:v}];A=Math.ceil(v/T)-Math.floor(y/T),A>x&&(T=nr(A*T/x/g)*g),V(l)||(D=Math.pow(10,l),T=Math.ceil(T*D)/D),s==="ticks"?(P=Math.floor(y/T)*T,E=Math.ceil(v/T)*T):(P=y,E=v),w&&k&&o&&hf((a-r)/o,T/1e3)?(A=Math.round(Math.min((a-r)/T,u)),T=(a-r)/A,P=r,E=a):C?(P=w?r:P,E=k?a:E,A=c-1,T=(E-P)/A):(A=(E-P)/T,Oe(A,Math.round(A),T/1e3)?A=Math.round(A):A=Math.ceil(A));const F=Math.max(ir(T),ir(P));D=Math.pow(10,V(l)?F:l),P=Math.round(P*D)/D,E=Math.round(E*D)/D;let L=0;for(w&&(p&&P!==r?(n.push({value:r}),P<r&&L++,Oe(Math.round((P+L*T)*D)/D,r,Jr(r,O,e))&&L++):P<r&&L++);L<A;++L){const H=Math.round((P+L*T)*D)/D;if(k&&H>a)break;n.push({value:H})}return k&&p&&E!==a?n.length&&Oe(n[n.length-1].value,a,Jr(a,O,e))?n[n.length-1].value=a:n.push({value:a}):(!k||E===a)&&n.push({value:E}),n}function Jr(e,t,{horizontal:n,minRotation:i}){const s=Me(i),o=(n?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+e).length;return Math.min(t/o,r)}class Og extends on{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return V(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:o}=this;const r=l=>s=n?s:l,a=l=>o=i?o:l;if(t){const l=ce(s),c=ce(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(s-l)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${i} would result generating up to \${s} ticks. Limiting to 1000.\`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,r=Cg(s,o);return t.bounds==="ticks"&&ff(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-n)/Math.max(t.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return xl(t,this.chart.options.locale,this.options.ticks.format)}}class Pg extends Og{static id="linear";static defaults={ticks:{callback:vl.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=xt(t)?t:0,this.max=xt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Me(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const zi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},lt=Object.keys(zi);function ta(e,t){return e-t}function ea(e,t){if(V(t))return null;const n=e._adapter,{parser:i,round:s,isoWeekday:o}=e._parseOpts;let r=t;return typeof i=="function"&&(r=i(r)),xt(r)||(r=typeof i=="string"?n.parse(r,i):n.parse(r)),r===null?null:(s&&(r=s==="week"&&(In(o)||o===!0)?n.startOf(r,"isoWeek",o):n.startOf(r,s)),+r)}function na(e,t,n,i){const s=lt.length;for(let o=lt.indexOf(e);o<s-1;++o){const r=zi[lt[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((n-t)/(a*r.size))<=i)return lt[o]}return lt[s-1]}function Dg(e,t,n,i,s){for(let o=lt.length-1;o>=lt.indexOf(n);o--){const r=lt[o];if(zi[r].common&&e._adapter.diff(s,i,r)>=t-1)return r}return lt[n?lt.indexOf(n):0]}function Ag(e){for(let t=lt.indexOf(e)+1,n=lt.length;t<n;++t)if(zi[lt[t]].common)return lt[t]}function ia(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:s}=ao(n,t),o=n[i]>=t?n[i]:n[s];e[o]=!0}}function Ig(e,t,n,i){const s=e._adapter,o=+s.startOf(t[0].value,i),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,i))l=n[a],l>=0&&(t[l].major=!0);return t}function sa(e,t,n){const i=[],s={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],s[a]=r,i.push({value:a,major:!1});return o===0||!n?i:Ig(e,i,s,n)}class oa extends on{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const i=t.time||(t.time={}),s=this._adapter=new Ud._date(t.adapters.date);s.init(n),kn(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ea(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=xt(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),o=xt(o)&&!isNaN(o)?o:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,r=this.max,a=yf(s,o,r);return this._unit=n.unit||(i.autoSkip?na(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):Dg(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Ag(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),sa(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;n=yt(n,0,r),i=yt(i,0,r),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,s=this.options,o=s.time,r=o.unit||na(o.minUnit,n,i,this._getLabelCapacity(n)),a=R(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=In(l)||l===!0,u={};let f=n,p,g;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":r),t.diff(i,n,r)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+r);const x=s.ticks.source==="data"&&this.getDataTimestamps();for(p=f,g=0;p<i;p=+t.add(p,a,r),g++)ia(u,p,x);return(p===i||s.bounds==="ticks"||g===1)&&ia(u,p,x),Object.keys(u).sort(ta).map(y=>+y)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,o=this._unit,r=n||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,n,i,s){const o=this.options,r=o.ticks.callback;if(r)return I(r,[t,n,i],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],f=c&&a[c],p=i[n],g=c&&f&&p&&p.major;return this._adapter.format(t,s||(g?f:u))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n<i;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,s=Me(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:i*o+a*r,h:i*r+a*o}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,o=this._tickFormatFunction(t,0,sa(this,[t],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n<i;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const s=this.getLabels();for(n=0,i=s.length;n<i;++n)t.push(ea(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return vf(t.sort(ta))}}function li(e,t,n){let i=0,s=e.length-1,o,r,a,l;n?(t>=e[i].pos&&t<=e[s].pos&&({lo:i,hi:s}=Ee(e,"pos",t)),{pos:o,time:a}=e[i],{pos:r,time:l}=e[s]):(t>=e[i].time&&t<=e[s].time&&({lo:i,hi:s}=Ee(e,"time",t)),{time:o,pos:a}=e[i],{time:r,pos:l}=e[s]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Nm extends oa{static id="timeseries";static defaults=oa.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=li(n,this.min),this._tableRange=li(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,s=[],o=[];let r,a,l,c,u;for(r=0,a=t.length;r<a;++r)c=t[r],c>=n&&c<=i&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(r=0,a=s.length;r<a;++r)u=s[r+1],l=s[r-1],c=s[r],Math.round((u+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(li(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return li(this._table,i*this._tableRange+this._minPos,!0)}}function Lg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var os={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
2421
|
+
* http://hammerjs.github.io/
|
|
2422
|
+
*
|
|
2423
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
|
2424
|
+
* Licensed under the MIT license */var ra;function Rg(){return ra||(ra=1,(function(e){(function(t,n,i,s){var o=["","webkit","Moz","MS","ms","o"],r=n.createElement("div"),a="function",l=Math.round,c=Math.abs,u=Date.now;function f(h,d,b){return setTimeout(C(h,b),d)}function p(h,d,b){return Array.isArray(h)?(g(h,b[d],b),!0):!1}function g(h,d,b){var _;if(h)if(h.forEach)h.forEach(d,b);else if(h.length!==s)for(_=0;_<h.length;)d.call(b,h[_],_,h),_++;else for(_ in h)h.hasOwnProperty(_)&&d.call(b,h[_],_,h)}function x(h,d,b){var _="DEPRECATED METHOD: "+d+\`
|
|
2425
|
+
\`+b+\` AT
|
|
2426
|
+
\`;return function(){var S=new Error("get-stack-trace"),M=S&&S.stack?S.stack.replace(/^[^\\(]+?[\\n$]/gm,"").replace(/^\\s+at\\s+/gm,"").replace(/^Object.<anonymous>\\s*\\(/gm,"{anonymous}()@"):"Unknown Stack Trace",N=t.console&&(t.console.warn||t.console.log);return N&&N.call(t.console,_,M),h.apply(this,arguments)}}var y;typeof Object.assign!="function"?y=function(d){if(d===s||d===null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(d),_=1;_<arguments.length;_++){var S=arguments[_];if(S!==s&&S!==null)for(var M in S)S.hasOwnProperty(M)&&(b[M]=S[M])}return b}:y=Object.assign;var v=x(function(d,b,_){for(var S=Object.keys(b),M=0;M<S.length;)(!_||_&&d[S[M]]===s)&&(d[S[M]]=b[S[M]]),M++;return d},"extend","Use \`assign\`."),w=x(function(d,b){return v(d,b,!0)},"merge","Use \`assign\`.");function k(h,d,b){var _=d.prototype,S;S=h.prototype=Object.create(_),S.constructor=h,S._super=_,b&&y(S,b)}function C(h,d){return function(){return h.apply(d,arguments)}}function O(h,d){return typeof h==a?h.apply(d&&d[0]||s,d):h}function T(h,d){return h===s?d:h}function D(h,d,b){g(F(d),function(_){h.addEventListener(_,b,!1)})}function P(h,d,b){g(F(d),function(_){h.removeEventListener(_,b,!1)})}function E(h,d){for(;h;){if(h==d)return!0;h=h.parentNode}return!1}function A(h,d){return h.indexOf(d)>-1}function F(h){return h.trim().split(/\\s+/g)}function L(h,d,b){if(h.indexOf&&!b)return h.indexOf(d);for(var _=0;_<h.length;){if(b&&h[_][b]==d||!b&&h[_]===d)return _;_++}return-1}function H(h){return Array.prototype.slice.call(h,0)}function K(h,d,b){for(var _=[],S=[],M=0;M<h.length;){var N=h[M][d];L(S,N)<0&&_.push(h[M]),S[M]=N,M++}return _=_.sort(function(Z,st){return Z[d]>st[d]}),_}function et(h,d){for(var b,_,S=d[0].toUpperCase()+d.slice(1),M=0;M<o.length;){if(b=o[M],_=b?b+S:d,_ in h)return _;M++}return s}var j=1;function q(){return j++}function nt(h){var d=h.ownerDocument||h;return d.defaultView||d.parentWindow||t}var Ne=/mobile|tablet|ip(ad|hone|od)|android/i,pe="ontouchstart"in t,qt=et(t,"PointerEvent")!==s,ze=pe&&Ne.test(navigator.userAgent),dt="touch",ge="pen",vt="mouse",me="kinect",Ht=25,it=1,be=2,X=4,ot=8,zn=1,an=2,ln=4,cn=8,un=16,Et=an|ln,ye=cn|un,vo=Et|ye,_o=["x","y"],Fn=["clientX","clientY"];function pt(h,d){var b=this;this.manager=h,this.callback=d,this.element=h.element,this.target=h.options.inputTarget,this.domHandler=function(_){O(h.options.enable,[h])&&b.handler(_)},this.init()}pt.prototype={handler:function(){},init:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(nt(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(nt(this.element),this.evWin,this.domHandler)}};function ac(h){var d,b=h.options.inputClass;return b?d=b:qt?d=Hi:ze?d=Vn:pe?d=Bi:d=Bn,new d(h,lc)}function lc(h,d,b){var _=b.pointers.length,S=b.changedPointers.length,M=d&it&&_-S===0,N=d&(X|ot)&&_-S===0;b.isFirst=!!M,b.isFinal=!!N,M&&(h.session={}),b.eventType=d,cc(h,b),h.emit("hammer.input",b),h.recognize(b),h.session.prevInput=b}function cc(h,d){var b=h.session,_=d.pointers,S=_.length;b.firstInput||(b.firstInput=wo(d)),S>1&&!b.firstMultiple?b.firstMultiple=wo(d):S===1&&(b.firstMultiple=!1);var M=b.firstInput,N=b.firstMultiple,G=N?N.center:M.center,Z=d.center=So(_);d.timeStamp=u(),d.deltaTime=d.timeStamp-M.timeStamp,d.angle=Fi(G,Z),d.distance=Hn(G,Z),uc(b,d),d.offsetDirection=To(d.deltaX,d.deltaY);var st=ko(d.deltaTime,d.deltaX,d.deltaY);d.overallVelocityX=st.x,d.overallVelocityY=st.y,d.overallVelocity=c(st.x)>c(st.y)?st.x:st.y,d.scale=N?dc(N.pointers,_):1,d.rotation=N?fc(N.pointers,_):0,d.maxPointers=b.prevInput?d.pointers.length>b.prevInput.maxPointers?d.pointers.length:b.prevInput.maxPointers:d.pointers.length,hc(b,d);var Ot=h.element;E(d.srcEvent.target,Ot)&&(Ot=d.srcEvent.target),d.target=Ot}function uc(h,d){var b=d.center,_=h.offsetDelta||{},S=h.prevDelta||{},M=h.prevInput||{};(d.eventType===it||M.eventType===X)&&(S=h.prevDelta={x:M.deltaX||0,y:M.deltaY||0},_=h.offsetDelta={x:b.x,y:b.y}),d.deltaX=S.x+(b.x-_.x),d.deltaY=S.y+(b.y-_.y)}function hc(h,d){var b=h.lastInterval||d,_=d.timeStamp-b.timeStamp,S,M,N,G;if(d.eventType!=ot&&(_>Ht||b.velocity===s)){var Z=d.deltaX-b.deltaX,st=d.deltaY-b.deltaY,Ot=ko(_,Z,st);M=Ot.x,N=Ot.y,S=c(Ot.x)>c(Ot.y)?Ot.x:Ot.y,G=To(Z,st),h.lastInterval=d}else S=b.velocity,M=b.velocityX,N=b.velocityY,G=b.direction;d.velocity=S,d.velocityX=M,d.velocityY=N,d.direction=G}function wo(h){for(var d=[],b=0;b<h.pointers.length;)d[b]={clientX:l(h.pointers[b].clientX),clientY:l(h.pointers[b].clientY)},b++;return{timeStamp:u(),pointers:d,center:So(d),deltaX:h.deltaX,deltaY:h.deltaY}}function So(h){var d=h.length;if(d===1)return{x:l(h[0].clientX),y:l(h[0].clientY)};for(var b=0,_=0,S=0;S<d;)b+=h[S].clientX,_+=h[S].clientY,S++;return{x:l(b/d),y:l(_/d)}}function ko(h,d,b){return{x:d/h||0,y:b/h||0}}function To(h,d){return h===d?zn:c(h)>=c(d)?h<0?an:ln:d<0?cn:un}function Hn(h,d,b){b||(b=_o);var _=d[b[0]]-h[b[0]],S=d[b[1]]-h[b[1]];return Math.sqrt(_*_+S*S)}function Fi(h,d,b){b||(b=_o);var _=d[b[0]]-h[b[0]],S=d[b[1]]-h[b[1]];return Math.atan2(S,_)*180/Math.PI}function fc(h,d){return Fi(d[1],d[0],Fn)+Fi(h[1],h[0],Fn)}function dc(h,d){return Hn(d[0],d[1],Fn)/Hn(h[0],h[1],Fn)}var pc={mousedown:it,mousemove:be,mouseup:X},gc="mousedown",mc="mousemove mouseup";function Bn(){this.evEl=gc,this.evWin=mc,this.pressed=!1,pt.apply(this,arguments)}k(Bn,pt,{handler:function(d){var b=pc[d.type];b&it&&d.button===0&&(this.pressed=!0),b&be&&d.which!==1&&(b=X),this.pressed&&(b&X&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[d],changedPointers:[d],pointerType:vt,srcEvent:d}))}});var bc={pointerdown:it,pointermove:be,pointerup:X,pointercancel:ot,pointerout:ot},yc={2:dt,3:ge,4:vt,5:me},Mo="pointerdown",Eo="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Mo="MSPointerDown",Eo="MSPointerMove MSPointerUp MSPointerCancel");function Hi(){this.evEl=Mo,this.evWin=Eo,pt.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}k(Hi,pt,{handler:function(d){var b=this.store,_=!1,S=d.type.toLowerCase().replace("ms",""),M=bc[S],N=yc[d.pointerType]||d.pointerType,G=N==dt,Z=L(b,d.pointerId,"pointerId");M&it&&(d.button===0||G)?Z<0&&(b.push(d),Z=b.length-1):M&(X|ot)&&(_=!0),!(Z<0)&&(b[Z]=d,this.callback(this.manager,M,{pointers:b,changedPointers:[d],pointerType:N,srcEvent:d}),_&&b.splice(Z,1))}});var xc={touchstart:it,touchmove:be,touchend:X,touchcancel:ot},vc="touchstart",_c="touchstart touchmove touchend touchcancel";function Co(){this.evTarget=vc,this.evWin=_c,this.started=!1,pt.apply(this,arguments)}k(Co,pt,{handler:function(d){var b=xc[d.type];if(b===it&&(this.started=!0),!!this.started){var _=wc.call(this,d,b);b&(X|ot)&&_[0].length-_[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:_[0],changedPointers:_[1],pointerType:dt,srcEvent:d})}}});function wc(h,d){var b=H(h.touches),_=H(h.changedTouches);return d&(X|ot)&&(b=K(b.concat(_),"identifier")),[b,_]}var Sc={touchstart:it,touchmove:be,touchend:X,touchcancel:ot},kc="touchstart touchmove touchend touchcancel";function Vn(){this.evTarget=kc,this.targetIds={},pt.apply(this,arguments)}k(Vn,pt,{handler:function(d){var b=Sc[d.type],_=Tc.call(this,d,b);_&&this.callback(this.manager,b,{pointers:_[0],changedPointers:_[1],pointerType:dt,srcEvent:d})}});function Tc(h,d){var b=H(h.touches),_=this.targetIds;if(d&(it|be)&&b.length===1)return _[b[0].identifier]=!0,[b,b];var S,M,N=H(h.changedTouches),G=[],Z=this.target;if(M=b.filter(function(st){return E(st.target,Z)}),d===it)for(S=0;S<M.length;)_[M[S].identifier]=!0,S++;for(S=0;S<N.length;)_[N[S].identifier]&&G.push(N[S]),d&(X|ot)&&delete _[N[S].identifier],S++;if(G.length)return[K(M.concat(G),"identifier"),G]}var Mc=2500,Oo=25;function Bi(){pt.apply(this,arguments);var h=C(this.handler,this);this.touch=new Vn(this.manager,h),this.mouse=new Bn(this.manager,h),this.primaryTouch=null,this.lastTouches=[]}k(Bi,pt,{handler:function(d,b,_){var S=_.pointerType==dt,M=_.pointerType==vt;if(!(M&&_.sourceCapabilities&&_.sourceCapabilities.firesTouchEvents)){if(S)Ec.call(this,b,_);else if(M&&Cc.call(this,_))return;this.callback(d,b,_)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});function Ec(h,d){h&it?(this.primaryTouch=d.changedPointers[0].identifier,Po.call(this,d)):h&(X|ot)&&Po.call(this,d)}function Po(h){var d=h.changedPointers[0];if(d.identifier===this.primaryTouch){var b={x:d.clientX,y:d.clientY};this.lastTouches.push(b);var _=this.lastTouches,S=function(){var M=_.indexOf(b);M>-1&&_.splice(M,1)};setTimeout(S,Mc)}}function Cc(h){for(var d=h.srcEvent.clientX,b=h.srcEvent.clientY,_=0;_<this.lastTouches.length;_++){var S=this.lastTouches[_],M=Math.abs(d-S.x),N=Math.abs(b-S.y);if(M<=Oo&&N<=Oo)return!0}return!1}var Do=et(r.style,"touchAction"),Ao=Do!==s,Io="compute",Lo="auto",Vi="manipulation",xe="none",hn="pan-x",fn="pan-y",Wn=Pc();function Wi(h,d){this.manager=h,this.set(d)}Wi.prototype={set:function(h){h==Io&&(h=this.compute()),Ao&&this.manager.element.style&&Wn[h]&&(this.manager.element.style[Do]=h),this.actions=h.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var h=[];return g(this.manager.recognizers,function(d){O(d.options.enable,[d])&&(h=h.concat(d.getTouchAction()))}),Oc(h.join(" "))},preventDefaults:function(h){var d=h.srcEvent,b=h.offsetDirection;if(this.manager.session.prevented){d.preventDefault();return}var _=this.actions,S=A(_,xe)&&!Wn[xe],M=A(_,fn)&&!Wn[fn],N=A(_,hn)&&!Wn[hn];if(S){var G=h.pointers.length===1,Z=h.distance<2,st=h.deltaTime<250;if(G&&Z&&st)return}if(!(N&&M)&&(S||M&&b&Et||N&&b&ye))return this.preventSrc(d)},preventSrc:function(h){this.manager.session.prevented=!0,h.preventDefault()}};function Oc(h){if(A(h,xe))return xe;var d=A(h,hn),b=A(h,fn);return d&&b?xe:d||b?d?hn:fn:A(h,Vi)?Vi:Lo}function Pc(){if(!Ao)return!1;var h={},d=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(b){h[b]=d?t.CSS.supports("touch-action",b):!0}),h}var jn=1,gt=2,Fe=4,Gt=8,Bt=Gt,dn=16,Ct=32;function Vt(h){this.options=y({},this.defaults,h||{}),this.id=q(),this.manager=null,this.options.enable=T(this.options.enable,!0),this.state=jn,this.simultaneous={},this.requireFail=[]}Vt.prototype={defaults:{},set:function(h){return y(this.options,h),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(h){if(p(h,"recognizeWith",this))return this;var d=this.simultaneous;return h=Un(h,this),d[h.id]||(d[h.id]=h,h.recognizeWith(this)),this},dropRecognizeWith:function(h){return p(h,"dropRecognizeWith",this)?this:(h=Un(h,this),delete this.simultaneous[h.id],this)},requireFailure:function(h){if(p(h,"requireFailure",this))return this;var d=this.requireFail;return h=Un(h,this),L(d,h)===-1&&(d.push(h),h.requireFailure(this)),this},dropRequireFailure:function(h){if(p(h,"dropRequireFailure",this))return this;h=Un(h,this);var d=L(this.requireFail,h);return d>-1&&this.requireFail.splice(d,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(h){return!!this.simultaneous[h.id]},emit:function(h){var d=this,b=this.state;function _(S){d.manager.emit(S,h)}b<Gt&&_(d.options.event+Ro(b)),_(d.options.event),h.additionalEvent&&_(h.additionalEvent),b>=Gt&&_(d.options.event+Ro(b))},tryEmit:function(h){if(this.canEmit())return this.emit(h);this.state=Ct},canEmit:function(){for(var h=0;h<this.requireFail.length;){if(!(this.requireFail[h].state&(Ct|jn)))return!1;h++}return!0},recognize:function(h){var d=y({},h);if(!O(this.options.enable,[this,d])){this.reset(),this.state=Ct;return}this.state&(Bt|dn|Ct)&&(this.state=jn),this.state=this.process(d),this.state&(gt|Fe|Gt|dn)&&this.tryEmit(d)},process:function(h){},getTouchAction:function(){},reset:function(){}};function Ro(h){return h&dn?"cancel":h&Gt?"end":h&Fe?"move":h>?"start":""}function No(h){return h==un?"down":h==cn?"up":h==an?"left":h==ln?"right":""}function Un(h,d){var b=d.manager;return b?b.get(h):h}function _t(){Vt.apply(this,arguments)}k(_t,Vt,{defaults:{pointers:1},attrTest:function(h){var d=this.options.pointers;return d===0||h.pointers.length===d},process:function(h){var d=this.state,b=h.eventType,_=d&(gt|Fe),S=this.attrTest(h);return _&&(b&ot||!S)?d|dn:_||S?b&X?d|Gt:d>?d|Fe:gt:Ct}});function $n(){_t.apply(this,arguments),this.pX=null,this.pY=null}k($n,_t,{defaults:{event:"pan",threshold:10,pointers:1,direction:vo},getTouchAction:function(){var h=this.options.direction,d=[];return h&Et&&d.push(fn),h&ye&&d.push(hn),d},directionTest:function(h){var d=this.options,b=!0,_=h.distance,S=h.direction,M=h.deltaX,N=h.deltaY;return S&d.direction||(d.direction&Et?(S=M===0?zn:M<0?an:ln,b=M!=this.pX,_=Math.abs(h.deltaX)):(S=N===0?zn:N<0?cn:un,b=N!=this.pY,_=Math.abs(h.deltaY))),h.direction=S,b&&_>d.threshold&&S&d.direction},attrTest:function(h){return _t.prototype.attrTest.call(this,h)&&(this.state>||!(this.state>)&&this.directionTest(h))},emit:function(h){this.pX=h.deltaX,this.pY=h.deltaY;var d=No(h.direction);d&&(h.additionalEvent=this.options.event+d),this._super.emit.call(this,h)}});function ji(){_t.apply(this,arguments)}k(ji,_t,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[xe]},attrTest:function(h){return this._super.attrTest.call(this,h)&&(Math.abs(h.scale-1)>this.options.threshold||this.state>)},emit:function(h){if(h.scale!==1){var d=h.scale<1?"in":"out";h.additionalEvent=this.options.event+d}this._super.emit.call(this,h)}});function Ui(){Vt.apply(this,arguments),this._timer=null,this._input=null}k(Ui,Vt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Lo]},process:function(h){var d=this.options,b=h.pointers.length===d.pointers,_=h.distance<d.threshold,S=h.deltaTime>d.time;if(this._input=h,!_||!b||h.eventType&(X|ot)&&!S)this.reset();else if(h.eventType&it)this.reset(),this._timer=f(function(){this.state=Bt,this.tryEmit()},d.time,this);else if(h.eventType&X)return Bt;return Ct},reset:function(){clearTimeout(this._timer)},emit:function(h){this.state===Bt&&(h&&h.eventType&X?this.manager.emit(this.options.event+"up",h):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function $i(){_t.apply(this,arguments)}k($i,_t,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[xe]},attrTest:function(h){return this._super.attrTest.call(this,h)&&(Math.abs(h.rotation)>this.options.threshold||this.state>)}});function Yi(){_t.apply(this,arguments)}k(Yi,_t,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Et|ye,pointers:1},getTouchAction:function(){return $n.prototype.getTouchAction.call(this)},attrTest:function(h){var d=this.options.direction,b;return d&(Et|ye)?b=h.overallVelocity:d&Et?b=h.overallVelocityX:d&ye&&(b=h.overallVelocityY),this._super.attrTest.call(this,h)&&d&h.offsetDirection&&h.distance>this.options.threshold&&h.maxPointers==this.options.pointers&&c(b)>this.options.velocity&&h.eventType&X},emit:function(h){var d=No(h.offsetDirection);d&&this.manager.emit(this.options.event+d,h),this.manager.emit(this.options.event,h)}});function Yn(){Vt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}k(Yn,Vt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Vi]},process:function(h){var d=this.options,b=h.pointers.length===d.pointers,_=h.distance<d.threshold,S=h.deltaTime<d.time;if(this.reset(),h.eventType&it&&this.count===0)return this.failTimeout();if(_&&S&&b){if(h.eventType!=X)return this.failTimeout();var M=this.pTime?h.timeStamp-this.pTime<d.interval:!0,N=!this.pCenter||Hn(this.pCenter,h.center)<d.posThreshold;this.pTime=h.timeStamp,this.pCenter=h.center,!N||!M?this.count=1:this.count+=1,this._input=h;var G=this.count%d.taps;if(G===0)return this.hasRequireFailures()?(this._timer=f(function(){this.state=Bt,this.tryEmit()},d.interval,this),gt):Bt}return Ct},failTimeout:function(){return this._timer=f(function(){this.state=Ct},this.options.interval,this),Ct},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Bt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});function Kt(h,d){return d=d||{},d.recognizers=T(d.recognizers,Kt.defaults.preset),new Xi(h,d)}Kt.VERSION="2.0.7",Kt.defaults={domEvents:!1,touchAction:Io,enable:!0,inputTarget:null,inputClass:null,preset:[[$i,{enable:!1}],[ji,{enable:!1},["rotate"]],[Yi,{direction:Et}],[$n,{direction:Et},["swipe"]],[Yn],[Yn,{event:"doubletap",taps:2},["tap"]],[Ui]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Dc=1,zo=2;function Xi(h,d){this.options=y({},Kt.defaults,d||{}),this.options.inputTarget=this.options.inputTarget||h,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=h,this.input=ac(this),this.touchAction=new Wi(this,this.options.touchAction),Fo(this,!0),g(this.options.recognizers,function(b){var _=this.add(new b[0](b[1]));b[2]&&_.recognizeWith(b[2]),b[3]&&_.requireFailure(b[3])},this)}Xi.prototype={set:function(h){return y(this.options,h),h.touchAction&&this.touchAction.update(),h.inputTarget&&(this.input.destroy(),this.input.target=h.inputTarget,this.input.init()),this},stop:function(h){this.session.stopped=h?zo:Dc},recognize:function(h){var d=this.session;if(!d.stopped){this.touchAction.preventDefaults(h);var b,_=this.recognizers,S=d.curRecognizer;(!S||S&&S.state&Bt)&&(S=d.curRecognizer=null);for(var M=0;M<_.length;)b=_[M],d.stopped!==zo&&(!S||b==S||b.canRecognizeWith(S))?b.recognize(h):b.reset(),!S&&b.state&(gt|Fe|Gt)&&(S=d.curRecognizer=b),M++}},get:function(h){if(h instanceof Vt)return h;for(var d=this.recognizers,b=0;b<d.length;b++)if(d[b].options.event==h)return d[b];return null},add:function(h){if(p(h,"add",this))return this;var d=this.get(h.options.event);return d&&this.remove(d),this.recognizers.push(h),h.manager=this,this.touchAction.update(),h},remove:function(h){if(p(h,"remove",this))return this;if(h=this.get(h),h){var d=this.recognizers,b=L(d,h);b!==-1&&(d.splice(b,1),this.touchAction.update())}return this},on:function(h,d){if(h!==s&&d!==s){var b=this.handlers;return g(F(h),function(_){b[_]=b[_]||[],b[_].push(d)}),this}},off:function(h,d){if(h!==s){var b=this.handlers;return g(F(h),function(_){d?b[_]&&b[_].splice(L(b[_],d),1):delete b[_]}),this}},emit:function(h,d){this.options.domEvents&&Ac(h,d);var b=this.handlers[h]&&this.handlers[h].slice();if(!(!b||!b.length)){d.type=h,d.preventDefault=function(){d.srcEvent.preventDefault()};for(var _=0;_<b.length;)b[_](d),_++}},destroy:function(){this.element&&Fo(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}};function Fo(h,d){var b=h.element;if(b.style){var _;g(h.options.cssProps,function(S,M){_=et(b.style,M),d?(h.oldCssProps[_]=b.style[_],b.style[_]=S):b.style[_]=h.oldCssProps[_]||""}),d||(h.oldCssProps={})}}function Ac(h,d){var b=n.createEvent("Event");b.initEvent(h,!0,!0),b.gesture=d,d.target.dispatchEvent(b)}y(Kt,{INPUT_START:it,INPUT_MOVE:be,INPUT_END:X,INPUT_CANCEL:ot,STATE_POSSIBLE:jn,STATE_BEGAN:gt,STATE_CHANGED:Fe,STATE_ENDED:Gt,STATE_RECOGNIZED:Bt,STATE_CANCELLED:dn,STATE_FAILED:Ct,DIRECTION_NONE:zn,DIRECTION_LEFT:an,DIRECTION_RIGHT:ln,DIRECTION_UP:cn,DIRECTION_DOWN:un,DIRECTION_HORIZONTAL:Et,DIRECTION_VERTICAL:ye,DIRECTION_ALL:vo,Manager:Xi,Input:pt,TouchAction:Wi,TouchInput:Vn,MouseInput:Bn,PointerEventInput:Hi,TouchMouseInput:Bi,SingleTouchInput:Co,Recognizer:Vt,AttrRecognizer:_t,Tap:Yn,Pan:$n,Swipe:Yi,Pinch:ji,Rotate:$i,Press:Ui,on:D,off:P,each:g,merge:w,extend:v,assign:y,inherit:k,bindFn:C,prefixed:et});var Ic=typeof t<"u"?t:typeof self<"u"?self:{};Ic.Hammer=Kt,e.exports?e.exports=Kt:t[i]=Kt})(window,document,"Hammer")})(os)),os.exports}var Ng=Rg();const Cn=Lg(Ng);/*!
|
|
2427
|
+
* chartjs-plugin-zoom v2.2.0
|
|
2428
|
+
* https://www.chartjs.org/chartjs-plugin-zoom/2.2.0/
|
|
2429
|
+
* (c) 2016-2024 chartjs-plugin-zoom Contributors
|
|
2430
|
+
* Released under the MIT License
|
|
2431
|
+
*/const Rn=e=>e&&e.enabled&&e.modifierKey,Xl=(e,t)=>e&&t[e+"Key"],yo=(e,t)=>e&&!t[e+"Key"];function ue(e,t,n){return e===void 0?!0:typeof e=="string"?e.indexOf(t)!==-1:typeof e=="function"?e({chart:n}).indexOf(t)!==-1:!1}function rs(e,t){return typeof e=="function"&&(e=e({chart:t})),typeof e=="string"?{x:e.indexOf("x")!==-1,y:e.indexOf("y")!==-1}:{x:!1,y:!1}}function zg(e,t){let n;return function(){return clearTimeout(n),n=setTimeout(e,t),t}}function Fg({x:e,y:t},n){const i=n.scales,s=Object.keys(i);for(let o=0;o<s.length;o++){const r=i[s[o]];if(t>=r.top&&t<=r.bottom&&e>=r.left&&e<=r.right)return r}return null}function ql(e,t,n){const{mode:i="xy",scaleMode:s,overScaleMode:o}=e||{},r=Fg(t,n),a=rs(i,n),l=rs(s,n);if(o){const u=rs(o,n);for(const f of["x","y"])u[f]&&(l[f]=a[f],a[f]=!1)}if(r&&l[r.axis])return[r];const c=[];return z(n.scales,function(u){a[u.axis]&&c.push(u)}),c}const Hs=new WeakMap;function U(e){let t=Hs.get(e);return t||(t={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},Hs.set(e,t)),t}function Hg(e){Hs.delete(e)}function Gl(e,t,n,i){const s=Math.max(0,Math.min(1,(e-t)/n||0)),o=1-s;return{min:i*s,max:i*o}}function Kl(e,t){const n=e.isHorizontal()?t.x:t.y;return e.getValueForPixel(n)}function Zl(e,t,n){const i=e.max-e.min,s=i*(t-1),o=Kl(e,n);return Gl(o,e.min,i,s)}function Bg(e,t,n){const i=Kl(e,n);if(i===void 0)return{min:e.min,max:e.max};const s=Math.log10(e.min),o=Math.log10(e.max),r=Math.log10(i),a=o-s,l=a*(t-1),c=Gl(r,s,a,l);return{min:Math.pow(10,s+c.min),max:Math.pow(10,o-c.max)}}function Vg(e,t){return t&&(t[e.id]||t[e.axis])||{}}function aa(e,t,n,i,s){let o=n[i];if(o==="original"){const r=e.originalScaleLimits[t.id][i];o=R(r.options,r.scale)}return R(o,s)}function Wg(e,t,n){const i=e.getValueForPixel(t),s=e.getValueForPixel(n);return{min:Math.min(i,s),max:Math.max(i,s)}}function jg(e,{min:t,max:n,minLimit:i,maxLimit:s},o){const r=(e-n+t)/2;t-=r,n+=r;const a=o.min.options??o.min.scale,l=o.max.options??o.max.scale,c=e/1e6;return Oe(t,a,c)&&(t=a),Oe(n,l,c)&&(n=l),t<i?(t=i,n=Math.min(i+e,s)):n>s&&(n=s,t=Math.max(s-e,i)),{min:t,max:n}}function Re(e,{min:t,max:n},i,s=!1){const o=U(e.chart),{options:r}=e,a=Vg(e,i),{minRange:l=0}=a,c=aa(o,e,a,"min",-1/0),u=aa(o,e,a,"max",1/0);if(s==="pan"&&(t<c||n>u))return!0;const f=e.max-e.min,p=s?Math.max(n-t,l):f;if(s&&p===l&&f<=l)return!0;const g=jg(p,{min:t,max:n,minLimit:c,maxLimit:u},o.originalScaleLimits[e.id]);return r.min=g.min,r.max=g.max,o.updatedScaleLimits[e.id]=g,e.parse(g.min)!==e.min||e.parse(g.max)!==e.max}function Ug(e,t,n,i){const s=Zl(e,t,n),o={min:e.min+s.min,max:e.max-s.max};return Re(e,o,i,!0)}function $g(e,t,n,i){const s=Bg(e,t,n);return Re(e,s,i,!0)}function Yg(e,t,n,i){Re(e,Wg(e,t,n),i,!0)}const la=e=>e===0||isNaN(e)?0:e<0?Math.min(Math.round(e),-1):Math.max(Math.round(e),1);function Xg(e){const n=e.getLabels().length-1;e.min>0&&(e.min-=1),e.max<n&&(e.max+=1)}function qg(e,t,n,i){const s=Zl(e,t,n);e.min===e.max&&t<1&&Xg(e);const o={min:e.min+la(s.min),max:e.max-la(s.max)};return Re(e,o,i,!0)}function Gg(e){return e.isHorizontal()?e.width:e.height}function Kg(e,t,n){const s=e.getLabels().length-1;let{min:o,max:r}=e;const a=Math.max(r-o,1),l=Math.round(Gg(e)/Math.max(a,10)),c=Math.round(Math.abs(t/l));let u;return t<-l?(r=Math.min(r+c,s),o=a===1?r:r-a,u=r===s):t>l&&(o=Math.max(0,o-c),r=a===1?o:o+a,u=o===0),Re(e,{min:o,max:r},n)||u}const Zg={second:500,minute:30*1e3,hour:1800*1e3,day:720*60*1e3,week:3.5*24*60*60*1e3,month:360*60*60*1e3,quarter:1440*60*60*1e3,year:4368*60*60*1e3};function Ql(e,t,n,i=!1){const{min:s,max:o,options:r}=e,a=r.time&&r.time.round,l=Zg[a]||0,c=e.getValueForPixel(e.getPixelForValue(s+l)-t),u=e.getValueForPixel(e.getPixelForValue(o+l)-t);return isNaN(c)||isNaN(u)?!0:Re(e,{min:c,max:u},n,i?"pan":!1)}function ca(e,t,n){return Ql(e,t,n,!0)}const Bs={category:qg,default:Ug,logarithmic:$g},Vs={default:Yg},Ws={category:Kg,default:Ql,logarithmic:ca,timeseries:ca};function Qg(e,t,n){const{id:i,options:{min:s,max:o}}=e;if(!t[i]||!n[i])return!0;const r=n[i];return r.min!==s||r.max!==o}function ua(e,t){z(e,(n,i)=>{t[i]||delete e[i]})}function rn(e,t){const{scales:n}=e,{originalScaleLimits:i,updatedScaleLimits:s}=t;return z(n,function(o){Qg(o,i,s)&&(i[o.id]={min:{scale:o.min,options:o.options.min},max:{scale:o.max,options:o.options.max}})}),ua(i,n),ua(s,n),i}function ha(e,t,n,i){const s=Bs[e.type]||Bs.default;I(s,[e,t,n,i])}function fa(e,t,n,i){const s=Vs[e.type]||Vs.default;I(s,[e,t,n,i])}function Jg(e){const t=e.chartArea;return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function xo(e,t,n="none",i="api"){const{x:s=1,y:o=1,focalPoint:r=Jg(e)}=typeof t=="number"?{x:t,y:t}:t,a=U(e),{options:{limits:l,zoom:c}}=a;rn(e,a);const u=s!==1,f=o!==1,p=ql(c,r,e);z(p||e.scales,function(g){g.isHorizontal()&&u?ha(g,s,r,l):!g.isHorizontal()&&f&&ha(g,o,r,l)}),e.update(n),I(c.onZoom,[{chart:e,trigger:i}])}function Jl(e,t,n,i="none",s="api"){const o=U(e),{options:{limits:r,zoom:a}}=o,{mode:l="xy"}=a;rn(e,o);const c=ue(l,"x",e),u=ue(l,"y",e);z(e.scales,function(f){f.isHorizontal()&&c?fa(f,t.x,n.x,r):!f.isHorizontal()&&u&&fa(f,t.y,n.y,r)}),e.update(i),I(a.onZoom,[{chart:e,trigger:s}])}function tm(e,t,n,i="none",s="api"){const o=U(e);rn(e,o);const r=e.scales[t];Re(r,n,void 0,!0),e.update(i),I(o.options.zoom?.onZoom,[{chart:e,trigger:s}])}function em(e,t="default"){const n=U(e),i=rn(e,n);z(e.scales,function(s){const o=s.options;i[s.id]?(o.min=i[s.id].min.options,o.max=i[s.id].max.options):(delete o.min,delete o.max),delete n.updatedScaleLimits[s.id]}),e.update(t),I(n.options.zoom.onZoomComplete,[{chart:e}])}function nm(e,t){const n=e.originalScaleLimits[t];if(!n)return;const{min:i,max:s}=n;return R(s.options,s.scale)-R(i.options,i.scale)}function im(e){const t=U(e);let n=1,i=1;return z(e.scales,function(s){const o=nm(t,s.id);if(o){const r=Math.round(o/(s.max-s.min)*100)/100;n=Math.min(n,r),i=Math.max(i,r)}}),n<1?n:i}function da(e,t,n,i){const{panDelta:s}=i,o=s[e.id]||0;ce(o)===ce(t)&&(t+=o);const r=Ws[e.type]||Ws.default;I(r,[e,t,n])?s[e.id]=0:s[e.id]=t}function tc(e,t,n,i="none"){const{x:s=0,y:o=0}=typeof t=="number"?{x:t,y:t}:t,r=U(e),{options:{pan:a,limits:l}}=r,{onPan:c}=a||{};rn(e,r);const u=s!==0,f=o!==0;z(n||e.scales,function(p){p.isHorizontal()&&u?da(p,s,l,r):!p.isHorizontal()&&f&&da(p,o,l,r)}),e.update(i),I(c,[{chart:e}])}function ec(e){const t=U(e);rn(e,t);const n={};for(const i of Object.keys(e.scales)){const{min:s,max:o}=t.originalScaleLimits[i]||{min:{},max:{}};n[i]={min:s.scale,max:o.scale}}return n}function sm(e){const t=U(e),n={};for(const i of Object.keys(e.scales))n[i]=t.updatedScaleLimits[i];return n}function om(e){const t=ec(e);for(const n of Object.keys(e.scales)){const{min:i,max:s}=t[n];if(i!==void 0&&e.scales[n].min!==i||s!==void 0&&e.scales[n].max!==s)return!0}return!1}function pa(e){const t=U(e);return t.panning||t.dragging}const ga=(e,t,n)=>Math.min(n,Math.max(t,e));function at(e,t){const{handlers:n}=U(e),i=n[t];i&&i.target&&(i.target.removeEventListener(t,i),delete n[t])}function On(e,t,n,i){const{handlers:s,options:o}=U(e),r=s[n];if(r&&r.target===t)return;at(e,n),s[n]=l=>i(e,l,o),s[n].target=t;const a=n==="wheel"?!1:void 0;t.addEventListener(n,s[n],{passive:a})}function rm(e,t){const n=U(e);n.dragStart&&(n.dragging=!0,n.dragEnd=t,e.update("none"))}function am(e,t){const n=U(e);!n.dragStart||t.key!=="Escape"||(at(e,"keydown"),n.dragging=!1,n.dragStart=n.dragEnd=null,e.update("none"))}function js(e,t){if(e.target!==t.canvas){const n=t.canvas.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}return It(e,t)}function nc(e,t,n){const{onZoomStart:i,onZoomRejected:s}=n;if(i){const o=js(t,e);if(I(i,[{chart:e,event:t,point:o}])===!1)return I(s,[{chart:e,event:t}]),!1}}function lm(e,t){if(e.legend){const o=It(t,e);if(Je(o,e.legend))return}const n=U(e),{pan:i,zoom:s={}}=n.options;if(t.button!==0||Xl(Rn(i),t)||yo(Rn(s.drag),t))return I(s.onZoomRejected,[{chart:e,event:t}]);nc(e,t,s)!==!1&&(n.dragStart=t,On(e,e.canvas.ownerDocument,"mousemove",rm),On(e,window.document,"keydown",am))}function cm({begin:e,end:t},n){let i=t.x-e.x,s=t.y-e.y;const o=Math.abs(i/s);o>n?i=Math.sign(i)*Math.abs(s*n):o<n&&(s=Math.sign(s)*Math.abs(i/n)),t.x=e.x+i,t.y=e.y+s}function ma(e,t,n,{min:i,max:s,prop:o}){e[i]=ga(Math.min(n.begin[o],n.end[o]),t[i],t[s]),e[s]=ga(Math.max(n.begin[o],n.end[o]),t[i],t[s])}function um(e,t,n){const i={begin:js(t.dragStart,e),end:js(t.dragEnd,e)};if(n){const s=e.chartArea.width/e.chartArea.height;cm(i,s)}return i}function ic(e,t,n,i){const s=ue(t,"x",e),o=ue(t,"y",e),{top:r,left:a,right:l,bottom:c,width:u,height:f}=e.chartArea,p={top:r,left:a,right:l,bottom:c},g=um(e,n,i&&s&&o);s&&ma(p,e.chartArea,g,{min:"left",max:"right",prop:"x"}),o&&ma(p,e.chartArea,g,{min:"top",max:"bottom",prop:"y"});const x=p.right-p.left,y=p.bottom-p.top;return{...p,width:x,height:y,zoomX:s&&x?1+(u-x)/u:1,zoomY:o&&y?1+(f-y)/f:1}}function hm(e,t){const n=U(e);if(!n.dragStart)return;at(e,"mousemove");const{mode:i,onZoomComplete:s,drag:{threshold:o=0,maintainAspectRatio:r}}=n.options.zoom,a=ic(e,i,{dragStart:n.dragStart,dragEnd:t},r),l=ue(i,"x",e)?a.width:0,c=ue(i,"y",e)?a.height:0,u=Math.sqrt(l*l+c*c);if(n.dragStart=n.dragEnd=null,u<=o){n.dragging=!1,e.update("none");return}Jl(e,{x:a.left,y:a.top},{x:a.right,y:a.bottom},"zoom","drag"),n.dragging=!1,n.filterNextClick=!0,I(s,[{chart:e}])}function fm(e,t,n){if(yo(Rn(n.wheel),t)){I(n.onZoomRejected,[{chart:e,event:t}]);return}if(nc(e,t,n)!==!1&&(t.cancelable&&t.preventDefault(),t.deltaY!==void 0))return!0}function dm(e,t){const{handlers:{onZoomComplete:n},options:{zoom:i}}=U(e);if(!fm(e,t,i))return;const s=t.target.getBoundingClientRect(),o=i.wheel.speed,r=t.deltaY>=0?2-1/(1-o):1+o,a={x:r,y:r,focalPoint:{x:t.clientX-s.left,y:t.clientY-s.top}};xo(e,a,"zoom","wheel"),I(n,[{chart:e}])}function pm(e,t,n,i){n&&(U(e).handlers[t]=zg(()=>I(n,[{chart:e}]),i))}function gm(e,t){const n=e.canvas,{wheel:i,drag:s,onZoomComplete:o}=t.zoom;i.enabled?(On(e,n,"wheel",dm),pm(e,"onZoomComplete",o,250)):at(e,"wheel"),s.enabled?(On(e,n,"mousedown",lm),On(e,n.ownerDocument,"mouseup",hm)):(at(e,"mousedown"),at(e,"mousemove"),at(e,"mouseup"),at(e,"keydown"))}function mm(e){at(e,"mousedown"),at(e,"mousemove"),at(e,"mouseup"),at(e,"wheel"),at(e,"click"),at(e,"keydown")}function bm(e,t){return function(n,i){const{pan:s,zoom:o={}}=t.options;if(!s||!s.enabled)return!1;const r=i&&i.srcEvent;return r&&!t.panning&&i.pointerType==="mouse"&&(yo(Rn(s),r)||Xl(Rn(o.drag),r))?(I(s.onPanRejected,[{chart:e,event:i}]),!1):!0}}function ym(e,t){const n=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY),s=n/i;let o,r;return s>.3&&s<1.7?o=r=!0:n>i?o=!0:r=!0,{x:o,y:r}}function sc(e,t,n){if(t.scale){const{center:i,pointers:s}=n,o=1/t.scale*n.scale,r=n.target.getBoundingClientRect(),a=ym(s[0],s[1]),l=t.options.zoom.mode,c={x:a.x&&ue(l,"x",e)?o:1,y:a.y&&ue(l,"y",e)?o:1,focalPoint:{x:i.x-r.left,y:i.y-r.top}};xo(e,c,"zoom","pinch"),t.scale=n.scale}}function xm(e,t,n){if(t.options.zoom.pinch.enabled){const i=It(n,e);I(t.options.zoom.onZoomStart,[{chart:e,event:n,point:i}])===!1?(t.scale=null,I(t.options.zoom.onZoomRejected,[{chart:e,event:n}])):t.scale=1}}function vm(e,t,n){t.scale&&(sc(e,t,n),t.scale=null,I(t.options.zoom.onZoomComplete,[{chart:e}]))}function oc(e,t,n){const i=t.delta;i&&(t.panning=!0,tc(e,{x:n.deltaX-i.x,y:n.deltaY-i.y},t.panScales),t.delta={x:n.deltaX,y:n.deltaY})}function _m(e,t,n){const{enabled:i,onPanStart:s,onPanRejected:o}=t.options.pan;if(!i)return;const r=n.target.getBoundingClientRect(),a={x:n.center.x-r.left,y:n.center.y-r.top};if(I(s,[{chart:e,event:n,point:a}])===!1)return I(o,[{chart:e,event:n}]);t.panScales=ql(t.options.pan,a,e),t.delta={x:0,y:0},oc(e,t,n)}function wm(e,t){t.delta=null,t.panning&&(t.panning=!1,t.filterNextClick=!0,I(t.options.pan.onPanComplete,[{chart:e}]))}const Us=new WeakMap;function ba(e,t){const n=U(e),i=e.canvas,{pan:s,zoom:o}=t,r=new Cn.Manager(i);o&&o.pinch.enabled&&(r.add(new Cn.Pinch),r.on("pinchstart",a=>xm(e,n,a)),r.on("pinch",a=>sc(e,n,a)),r.on("pinchend",a=>vm(e,n,a))),s&&s.enabled&&(r.add(new Cn.Pan({threshold:s.threshold,enable:bm(e,n)})),r.on("panstart",a=>_m(e,n,a)),r.on("panmove",a=>oc(e,n,a)),r.on("panend",()=>wm(e,n))),Us.set(e,r)}function ya(e){const t=Us.get(e);t&&(t.remove("pinchstart"),t.remove("pinch"),t.remove("pinchend"),t.remove("panstart"),t.remove("pan"),t.remove("panend"),t.destroy(),Us.delete(e))}function Sm(e,t){const{pan:n,zoom:i}=e,{pan:s,zoom:o}=t;return i?.zoom?.pinch?.enabled!==o?.zoom?.pinch?.enabled||n?.enabled!==s?.enabled||n?.threshold!==s?.threshold}var km="2.2.0";function ci(e,t,n){const i=n.zoom.drag,{dragStart:s,dragEnd:o}=U(e);if(i.drawTime!==t||!o)return;const{left:r,top:a,width:l,height:c}=ic(e,n.zoom.mode,{dragStart:s,dragEnd:o},i.maintainAspectRatio),u=e.ctx;u.save(),u.beginPath(),u.fillStyle=i.backgroundColor||"rgba(225,225,225,0.3)",u.fillRect(r,a,l,c),i.borderWidth>0&&(u.lineWidth=i.borderWidth,u.strokeStyle=i.borderColor||"rgba(225,225,225)",u.strokeRect(r,a,l,c)),u.restore()}var Tm={id:"zoom",version:km,defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(e,t,n){const i=U(e);i.options=n,Object.prototype.hasOwnProperty.call(n.zoom,"enabled")&&console.warn("The option \`zoom.enabled\` is no longer supported. Please use \`zoom.wheel.enabled\`, \`zoom.drag.enabled\`, or \`zoom.pinch.enabled\`."),(Object.prototype.hasOwnProperty.call(n.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(n.pan,"overScaleMode"))&&console.warn("The option \`overScaleMode\` is deprecated. Please use \`scaleMode\` instead (and update \`mode\` as desired)."),Cn&&ba(e,n),e.pan=(s,o,r)=>tc(e,s,o,r),e.zoom=(s,o)=>xo(e,s,o),e.zoomRect=(s,o,r)=>Jl(e,s,o,r),e.zoomScale=(s,o,r)=>tm(e,s,o,r),e.resetZoom=s=>em(e,s),e.getZoomLevel=()=>im(e),e.getInitialScaleBounds=()=>ec(e),e.getZoomedScaleBounds=()=>sm(e),e.isZoomedOrPanned=()=>om(e),e.isZoomingOrPanning=()=>pa(e)},beforeEvent(e,{event:t}){if(pa(e))return!1;if(t.type==="click"||t.type==="mouseup"){const n=U(e);if(n.filterNextClick)return n.filterNextClick=!1,!1}},beforeUpdate:function(e,t,n){const i=U(e),s=i.options;i.options=n,Sm(s,n)&&(ya(e),ba(e,n)),gm(e,n)},beforeDatasetsDraw(e,t,n){ci(e,"beforeDatasetsDraw",n)},afterDatasetsDraw(e,t,n){ci(e,"afterDatasetsDraw",n)},beforeDraw(e,t,n){ci(e,"beforeDraw",n)},afterDraw(e,t,n){ci(e,"afterDraw",n)},stop:function(e){mm(e),Cn&&ya(e),Hg(e)},panFunctions:Ws,zoomFunctions:Bs,zoomRectFunctions:Vs};function Mm({data:e,...t}){const n=Ze(null),i=Ze(null);return ut(()=>{zs.register(Tm,Pg,jd,Eg,cg,lg,gg,Sg);const s=i.current,o=n.current=new zs(s,{type:"line",data:e.peek(),options:{scales:{y:{min:0}},animation:!1,responsive:!0,plugins:{zoom:{pan:{enabled:!0,mode:"x"},zoom:{wheel:{enabled:!0},mode:"x"}},legend:{position:"top"},title:{display:!1}}}}),r=e.subscribe(a=>{o.data=a,o.update()});return()=>{o.destroy(),r()}},[]),m("canvas",{ref:i,...t})}function Em(){const e=fe();ut(()=>{const n=i=>{Pn(i)||e()};return $?.on("mount",n),$?.on("unmount",n),()=>{$?.off("mount",n),$?.off("unmount",n)}},[]);const t=$?.profilingContext;return m("div",{className:"flex flex-col gap-2"},Za(t.appStats).filter(([n])=>!Pn(n)).map(([n])=>m(Cm,{key:n.id,app:n})))}const xa=100,va=e=>Object.entries(e).map(([t,{values:n,color:i}])=>({label:t,data:n,fill:!1,borderColor:i,tension:.1}));function Cm({app:e}){const t=fe(),n=Ze({update:{values:[0],color:"#ad981f"},updateDirtied:{values:[0],color:"#b21f3a"},createNode:{values:[0],color:"#198019"},removeNode:{values:[0],color:"#5F3691"},updateNode:{values:[0],color:"#2f2f9d"},signalAttrUpdate:{values:[0],color:"#28888f"},signalTextUpdate:{values:[0],color:"#9b3b98"}}),i=J({labels:[(performance.now()/1e3).toFixed(2)],datasets:va(n.current)}),s=J(!1),o=$?.profilingContext;return ut(()=>{const r=a=>{a.id===e.id&&t()};return $?.on("update",r),()=>$?.off("update",r)},[]),ut(()=>{const r=[];Object.entries(n.current).forEach(([l,{values:c}])=>{const u=p=>{p.id===e.id&&s.peek()!==!0&&c[c.length-1]++},f=l;o.addEventListener(f,u),r.push(()=>o.removeEventListener(f,u))});const a=setInterval(()=>{if(s.peek()===!0)return;const l=[...i.value.labels];Object.values(n.current).forEach(c=>{c.values.push(0),c.values.length>xa&&c.values.shift()}),l.push((performance.now()/1e3).toFixed(2)),l.length>xa&&l.shift(),i.value={labels:l,datasets:va(n.current)}},100);return()=>{r.forEach(l=>l()),clearInterval(a)}},[]),m("div",{className:"flex flex-col gap-2 border border-white border-opacity-10 rounded bg-neutral-400 bg-opacity-5 text-neutral-400 p-2"},m("div",{className:"grid items-start gap-2",style:"grid-template-columns: 1fr max-content;"},m("div",{className:"flex flex-col gap-2"},m("span",null,e.name),m(Mm,{data:i,className:"w-full max-w-full min-h-20 bg-black bg-opacity-30",onmouseenter:()=>s.value=!0,onmouseleave:()=>s.value=!1})),m("div",{className:"text-xs grid grid-cols-2 gap-x-4",style:"grid-template-columns: auto auto;"},m("span",{className:"text-right"},"Mount duration:"),o.mountDuration(e).toFixed(2)," ms",m("span",{className:"text-right"},"Total updates:"),m("span",null,o.totalTicks(e).toLocaleString()),m("span",{className:"text-right"},"Avg. update duration:"),o.averageTickDuration(e).toFixed(2)," ms",m("span",{className:"text-right"},"Latest update:"),m("span",null,o.lastTickDuration(e).toFixed(2)," ms"))))}const xn=ht([]),rc=ht(""),Om=Ga(()=>rc.value.toLowerCase().split(" ").filter(e=>e.length>0));function Pm(e){return Om.value.every(t=>e.toLowerCase().includes(t))}function Dm(){const e=fe();ut(()=>{const n=i=>{Pn(i)||e()};return $?.on("update",n),()=>$?.off("update",n)},[]);const t=$?.SWRGlobalCache??new Map;return t.size===0?m("div",{className:"flex flex-col items-center justify-center h-full text-neutral-400"},m(Qa,null),m("h2",{className:"text-lg italic"},"No SWR detected")):m("div",{className:"flex flex-col gap-2 items-start"},m(ol,{value:rc,className:"sticky top-0"}),m("div",{className:"flex flex-col gap-2 w-full"},Za(t).filter(([n])=>Pm(n)).map(([n,i])=>m(Am,{key:n,entry:i}))))}function Am({key:e,entry:t}){const n=xn.value.includes(e),i=fe();ut(()=>{const{resource:o,isValidating:r,isMutating:a}=t,l=[o.subscribe(i),r.subscribe(i),a.subscribe(i)];return()=>l.forEach(c=>c())},[]);const s=We(()=>{n?xn.value=xn.value.filter(o=>o!==e):xn.value=[...xn.value,e]},[n]);return m("div",{className:"flex flex-col"},m("button",{onclick:s,className:"flex items-center gap-2 justify-between p-2 border border-white border-opacity-10 cursor-pointer"+(n?" bg-white bg-opacity-5 text-neutral-100 rounded-t":" hover:bg-white hover:bg-opacity-10 text-neutral-400 rounded")},e,m(ae,{className:"transition-all"+(n?" rotate-90":"")})),n&&m("div",{className:"flex flex-col gap-2 p-2 border border-white border-opacity-10"},m(Ie,{data:{resource:t.resource.peek(),isMutating:t.isMutating.peek(),isValidating:t.isValidating.peek()},mutable:!1,objectRefAcc:[],keys:[],onChange:()=>{}})))}const Im=e=>m("main",{className:"flex flex-col flex-1 max-h-[calc(100vh-1rem)] overflow-y-auto",style:e.active?{}:{display:"none"}},e.children),$s={Apps:{Icon:$u,View:kh},Stores:{Icon:Zu,View:Eh},SWR:{Icon:Gu,View:Dm},Profiling:{Icon:qu,View:Em},Settings:{Icon:Yu,View:Ju}},Ci=ht("Apps");let _a=se.peek();se.subscribe(e=>{e!==_a&&e!==null&&(Ci.value="Apps"),_a=e});function Lm(){return m(Qu,null,m("nav",{className:"flex flex-col gap-2 justify-between p-2 bg-neutral-400 bg-opacity-5 border border-white border-opacity-10 rounded"},m("div",{className:"flex flex-col gap-2"},Object.keys($s).map(e=>m(Rm,{key:e,title:e})))),Object.entries($s).map(([e,{View:t}])=>m(Im,{key:e,active:Ci.value===e},m(t,null))))}function Rm({title:e}){const{Icon:t}=$s[e];return m("button",{key:e,onclick:()=>{Ci.value=e},className:"flex items-center px-2 py-1 gap-2 rounded border text-xs border-white border-opacity-10"+(Ci.value===e?" bg-white bg-opacity-5 text-neutral-100":" hover:bg-white hover:bg-opacity-10 text-neutral-400"),title:e},m(t,{className:"text-primary"}),m("span",{className:"hidden sm:inline"},e))}Bu(m(Lm,null),document.getElementById("app"));Qe.send({type:"ready"});setInterval(()=>{window.opener||window.close()},250);</script>
|
|
2432
|
+
<style rel="stylesheet" crossorigin>*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.z-10{z-index:10}.z-\\[9999\\]{z-index:9999}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.ml-6{margin-left:1.5rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-5{height:1.25rem}.h-full{height:100%}.max-h-\\[calc\\(100vh-1rem\\)\\]{max-height:calc(100vh - 1rem)}.min-h-20{min-height:5rem}.min-h-screen{min-height:100vh}.w-5{width:1.25rem}.w-8{width:2rem}.w-\\[5px\\]{width:5px}.w-full{width:100%}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.scroll-m-12{scroll-margin:3rem}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-\\[\\#fff1\\]{border-color:#fff1}.border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity, 1))}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.border-opacity-10{--tw-border-opacity: .1}.bg-\\[\\#171616\\]{--tw-bg-opacity: 1;background-color:rgb(23 22 22 / var(--tw-bg-opacity, 1))}.bg-\\[\\#1a1a1a\\]{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity, 1))}.bg-\\[\\#1d1d1d\\]{--tw-bg-opacity: 1;background-color:rgb(29 29 29 / var(--tw-bg-opacity, 1))}.bg-\\[\\#212121\\]{--tw-bg-opacity: 1;background-color:rgb(33 33 33 / var(--tw-bg-opacity, 1))}.bg-\\[\\#ffffff04\\]{background-color:#ffffff04}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-neutral-400{--tw-bg-opacity: 1;background-color:rgb(163 163 163 / var(--tw-bg-opacity, 1))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity, 1))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(220 20 60 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-opacity-30{--tw-bg-opacity: .3}.bg-opacity-5{--tw-bg-opacity: .05}.p-1{padding:.25rem}.p-2{padding:.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.text-right{text-align:right}.text-\\[10px\\]{font-size:10px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.italic{font-style:italic}.text-neutral-100{--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity, 1))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:rgb(220 20 60 / var(--tw-text-opacity, 1))}.accent-red-500{accent-color:#ef4444}.opacity-50{opacity:.5}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{color-scheme:dark}#app{min-width:-moz-fit-content;min-width:fit-content;background-image:linear-gradient(#171616,#0e0e0e);color:#fff;min-height:100vh;width:100%;display:flex;flex-direction:row;padding:.5rem;gap:.5rem}select{background:url("data:image/svg+xml,<svg height='10px' width='10px' viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>") no-repeat;background-position:calc(100% - .75rem) center!important;-moz-appearance:none!important;-webkit-appearance:none!important;appearance:none!important;padding-right:2rem!important}select:not([disabled]){cursor:pointer}.last\\:border-b-0:last-child{border-bottom-width:0px}.hover\\:bg-neutral-700:hover{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}.hover\\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\\:bg-opacity-10:hover{--tw-bg-opacity: .1}.hover\\:opacity-100:hover{opacity:1}.focus\\:outline:focus{outline-style:solid}.focus\\:outline-primary:focus{outline-color:#dc143c}@media (min-width: 640px){.sm\\:inline{display:inline}}</style>
|
|
2433
|
+
</head>
|
|
2434
|
+
<body class="w-full min-h-screen">
|
|
2435
|
+
<div id="app"></div>
|
|
2436
|
+
<div id="portal-root"></div>
|
|
2437
|
+
</body>
|
|
2438
|
+
</html>
|
|
2439
|
+
`;
|
|
3582
2440
|
|
|
3583
2441
|
// ../devtools-host/dist/index.js
|
|
3584
2442
|
var dist_default2 = `var Ke="production";if(Ke!=="development"&&Ke!=="production")throw new Error("NODE_ENV must either be set to development or production.");var l=Ke==="development";var Ue=Symbol.for("kiru.signal"),Ct=Symbol.for("kiru.context"),ie=Symbol.for("kiru.contextProvider"),G=Symbol.for("kiru.fragment"),We=Symbol.for("kiru.error"),L=Symbol.for("kiru.hmrAccept"),ke=Symbol.for("kiru.memo"),se=Symbol.for("kiru.errorBoundary"),Tt=Symbol.for("kiru.suspenseThrow"),Be=50;var P=2,T=4,fe=8,V=16,_e=32,me=64,ae=128,At=/^on:?/;var qe=new Set(["animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","path","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","title","tspan","use"]),Ge=new Set(["allowfullscreen","autofocus","autoplay","async","checked","compact","controls","contenteditable","declare","default","defer","disabled","download","hidden","inert","ismap","multiple","nohref","noresize","noshade","novalidate","nowrap","open","popover","readonly","required","sandbox","scoped","selected","sortable","spellcheck","translate","wrap"]),Mt=new Map([["acceptCharset","accept-charset"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["httpEquiv","http-equiv"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]);function Xe(e){return typeof e=="string"||typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"||e===void 0||e===null}var k={current:null},X={current:0},S={current:"window"in globalThis?"dom":"string"};var Rt,E=class extends Error{constructor(t){let r=typeof t=="string"?t:t.message;super(r),this[Rt]=!0,typeof t!="string"&&(l&&t?.vNode&&(this.customNodeStack=jr(t.vNode)),this.fatal=t?.fatal)}static isKiruError(t){return t instanceof Error&&t[We]===!0}};Rt=We;function jr(e){let t=e,r=[];for(;t&&t.parent;)typeof t.type=="function"?r.push(Kr(t.type)):typeof t.type=="string"&&r.push(t.type),t=t.parent;let n=typeof e.type=="function"?e:Ye(e,o=>typeof o.type=="function");return\`The above error occurred in the <\${Ot(n?.type||j)}> component:
|
|
@@ -4354,55 +3212,1359 @@ video {
|
|
|
4354
3212
|
}
|
|
4355
3213
|
\`;if("window"in globalThis){let e=function(){let t=document.createElement("kiru-devtools");t.setAttribute("style","display: contents"),document.body.appendChild(t);let r=t.attachShadow({mode:"open"}),n=new CSSStyleSheet;n.replaceSync(Nr),r.adoptedStyleSheets=[n];let o=Object.assign(document.createElement("div"),{id:"devtools-root",className:"fixed flex bottom-0 right-0 z-[9999999]"});r.appendChild(o),br(f(kt,{}),o,{name:"kiru.devtools"});let s=()=>q.value?.close();window.addEventListener("close",s),window.addEventListener("beforeunload",s),O.addEventListener(i=>{i.data.type==="open-editor"&&window.open(i.data.fileLink)})};Fn=e,window.addEventListener("kiru:ready",e,{once:!0})}var Fn;
|
|
4356
3214
|
|
|
4357
|
-
`;
|
|
3215
|
+
`;
|
|
3216
|
+
|
|
3217
|
+
// src/devtools.ts
|
|
3218
|
+
function setupDevtools(server, options, dtHostScriptPath, log) {
|
|
3219
|
+
const { dtClientPathname } = options;
|
|
3220
|
+
log(`Serving devtools host at ${ANSI.magenta(dtHostScriptPath)}`);
|
|
3221
|
+
server.middlewares.use(dtHostScriptPath, (_, res) => {
|
|
3222
|
+
res.setHeader("Content-Type", "application/javascript");
|
|
3223
|
+
res.end(dist_default2, "utf-8");
|
|
3224
|
+
});
|
|
3225
|
+
log(`Serving devtools client at ${ANSI.magenta(dtClientPathname)}`);
|
|
3226
|
+
server.middlewares.use(dtClientPathname, (_, res) => {
|
|
3227
|
+
res.end(dist_default, "utf-8");
|
|
3228
|
+
});
|
|
3229
|
+
}
|
|
3230
|
+
function createDevtoolsHtmlTransform(dtClientPathname, dtHostScriptPath) {
|
|
3231
|
+
return {
|
|
3232
|
+
html: "",
|
|
3233
|
+
tags: [
|
|
3234
|
+
{
|
|
3235
|
+
tag: "script",
|
|
3236
|
+
children: `window.__KIRU_DEVTOOLS_PATHNAME__ = "${dtClientPathname}";`
|
|
3237
|
+
},
|
|
3238
|
+
{
|
|
3239
|
+
tag: "script",
|
|
3240
|
+
attrs: {
|
|
3241
|
+
type: "module",
|
|
3242
|
+
src: dtHostScriptPath
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3245
|
+
]
|
|
3246
|
+
};
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
// src/dev-server.ts
|
|
3250
|
+
import path3 from "node:path";
|
|
3251
|
+
function injectClientScript(html) {
|
|
3252
|
+
const scriptTag = `<script type="module" src="/@id/${VIRTUAL_ENTRY_CLIENT_ID}"></script>`;
|
|
3253
|
+
if (html.includes("</body>")) {
|
|
3254
|
+
return html.replace("</body>", scriptTag + "</body>");
|
|
3255
|
+
}
|
|
3256
|
+
return html + scriptTag;
|
|
3257
|
+
}
|
|
3258
|
+
async function handleSSR(server, url, projectRoot, resolveUserDocument2) {
|
|
3259
|
+
const mod = await server.ssrLoadModule(
|
|
3260
|
+
VIRTUAL_ENTRY_SERVER_ID
|
|
3261
|
+
);
|
|
3262
|
+
const moduleIds = [];
|
|
3263
|
+
const ctx = {
|
|
3264
|
+
registerModule: (moduleId) => {
|
|
3265
|
+
moduleIds.push(moduleId);
|
|
3266
|
+
},
|
|
3267
|
+
registerPreloadedPageProps: () => {
|
|
3268
|
+
}
|
|
3269
|
+
};
|
|
3270
|
+
const { status, immediate, stream } = await mod.render(url, ctx);
|
|
3271
|
+
let html = injectClientScript(immediate);
|
|
3272
|
+
const importedModules = /* @__PURE__ */ new Set();
|
|
3273
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3274
|
+
const documentModule = resolveUserDocument2().substring(projectRoot.length);
|
|
3275
|
+
moduleIds.push(documentModule);
|
|
3276
|
+
const scan = (mod2) => {
|
|
3277
|
+
if (importedModules.has(mod2)) return;
|
|
3278
|
+
importedModules.add(mod2);
|
|
3279
|
+
for (const dep of mod2.importedModules) {
|
|
3280
|
+
if (seen.has(dep)) continue;
|
|
3281
|
+
seen.add(dep);
|
|
3282
|
+
scan(dep);
|
|
3283
|
+
}
|
|
3284
|
+
};
|
|
3285
|
+
for (const id of moduleIds) {
|
|
3286
|
+
const p = path3.join(projectRoot, id).replace(/\\/g, "/");
|
|
3287
|
+
const mod2 = server.moduleGraph.getModuleById(p);
|
|
3288
|
+
if (!mod2) {
|
|
3289
|
+
console.error(`Module not found: ${p}`);
|
|
3290
|
+
continue;
|
|
3291
|
+
}
|
|
3292
|
+
scan(mod2);
|
|
3293
|
+
}
|
|
3294
|
+
const localModules = Array.from(importedModules).filter(
|
|
3295
|
+
(m) => m.id?.startsWith(projectRoot)
|
|
3296
|
+
);
|
|
3297
|
+
const cssModules = localModules.filter((m) => m.id?.endsWith(".css"));
|
|
3298
|
+
html = await server.transformIndexHtml(
|
|
3299
|
+
url,
|
|
3300
|
+
html,
|
|
3301
|
+
"\0" + VIRTUAL_ENTRY_CLIENT_ID
|
|
3302
|
+
);
|
|
3303
|
+
if (cssModules.length) {
|
|
3304
|
+
const stylesheets = cssModules.map((mod2) => {
|
|
3305
|
+
const p = mod2.id?.replace(projectRoot, "");
|
|
3306
|
+
return `<link rel="stylesheet" type="text/css" href="${p}?temp">`;
|
|
3307
|
+
});
|
|
3308
|
+
html = html.replace("<head>", "<head>" + stylesheets.join("\n"));
|
|
3309
|
+
}
|
|
3310
|
+
return { status, html, stream };
|
|
3311
|
+
}
|
|
3312
|
+
|
|
3313
|
+
// src/preview-server.ts
|
|
3314
|
+
import { resolve } from "node:path";
|
|
3315
|
+
import fs3 from "node:fs";
|
|
3316
|
+
import path4 from "node:path";
|
|
3317
|
+
|
|
3318
|
+
// ../../node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/types/other.js
|
|
3319
|
+
var types = {
|
|
3320
|
+
"application/prs.cww": ["cww"],
|
|
3321
|
+
"application/prs.xsf+xml": ["xsf"],
|
|
3322
|
+
"application/vnd.1000minds.decision-model+xml": ["1km"],
|
|
3323
|
+
"application/vnd.3gpp.pic-bw-large": ["plb"],
|
|
3324
|
+
"application/vnd.3gpp.pic-bw-small": ["psb"],
|
|
3325
|
+
"application/vnd.3gpp.pic-bw-var": ["pvb"],
|
|
3326
|
+
"application/vnd.3gpp2.tcap": ["tcap"],
|
|
3327
|
+
"application/vnd.3m.post-it-notes": ["pwn"],
|
|
3328
|
+
"application/vnd.accpac.simply.aso": ["aso"],
|
|
3329
|
+
"application/vnd.accpac.simply.imp": ["imp"],
|
|
3330
|
+
"application/vnd.acucobol": ["acu"],
|
|
3331
|
+
"application/vnd.acucorp": ["atc", "acutc"],
|
|
3332
|
+
"application/vnd.adobe.air-application-installer-package+zip": ["air"],
|
|
3333
|
+
"application/vnd.adobe.formscentral.fcdt": ["fcdt"],
|
|
3334
|
+
"application/vnd.adobe.fxp": ["fxp", "fxpl"],
|
|
3335
|
+
"application/vnd.adobe.xdp+xml": ["xdp"],
|
|
3336
|
+
"application/vnd.adobe.xfdf": ["*xfdf"],
|
|
3337
|
+
"application/vnd.age": ["age"],
|
|
3338
|
+
"application/vnd.ahead.space": ["ahead"],
|
|
3339
|
+
"application/vnd.airzip.filesecure.azf": ["azf"],
|
|
3340
|
+
"application/vnd.airzip.filesecure.azs": ["azs"],
|
|
3341
|
+
"application/vnd.amazon.ebook": ["azw"],
|
|
3342
|
+
"application/vnd.americandynamics.acc": ["acc"],
|
|
3343
|
+
"application/vnd.amiga.ami": ["ami"],
|
|
3344
|
+
"application/vnd.android.package-archive": ["apk"],
|
|
3345
|
+
"application/vnd.anser-web-certificate-issue-initiation": ["cii"],
|
|
3346
|
+
"application/vnd.anser-web-funds-transfer-initiation": ["fti"],
|
|
3347
|
+
"application/vnd.antix.game-component": ["atx"],
|
|
3348
|
+
"application/vnd.apple.installer+xml": ["mpkg"],
|
|
3349
|
+
"application/vnd.apple.keynote": ["key"],
|
|
3350
|
+
"application/vnd.apple.mpegurl": ["m3u8"],
|
|
3351
|
+
"application/vnd.apple.numbers": ["numbers"],
|
|
3352
|
+
"application/vnd.apple.pages": ["pages"],
|
|
3353
|
+
"application/vnd.apple.pkpass": ["pkpass"],
|
|
3354
|
+
"application/vnd.aristanetworks.swi": ["swi"],
|
|
3355
|
+
"application/vnd.astraea-software.iota": ["iota"],
|
|
3356
|
+
"application/vnd.audiograph": ["aep"],
|
|
3357
|
+
"application/vnd.autodesk.fbx": ["fbx"],
|
|
3358
|
+
"application/vnd.balsamiq.bmml+xml": ["bmml"],
|
|
3359
|
+
"application/vnd.blueice.multipass": ["mpm"],
|
|
3360
|
+
"application/vnd.bmi": ["bmi"],
|
|
3361
|
+
"application/vnd.businessobjects": ["rep"],
|
|
3362
|
+
"application/vnd.chemdraw+xml": ["cdxml"],
|
|
3363
|
+
"application/vnd.chipnuts.karaoke-mmd": ["mmd"],
|
|
3364
|
+
"application/vnd.cinderella": ["cdy"],
|
|
3365
|
+
"application/vnd.citationstyles.style+xml": ["csl"],
|
|
3366
|
+
"application/vnd.claymore": ["cla"],
|
|
3367
|
+
"application/vnd.cloanto.rp9": ["rp9"],
|
|
3368
|
+
"application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"],
|
|
3369
|
+
"application/vnd.cluetrust.cartomobile-config": ["c11amc"],
|
|
3370
|
+
"application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"],
|
|
3371
|
+
"application/vnd.commonspace": ["csp"],
|
|
3372
|
+
"application/vnd.contact.cmsg": ["cdbcmsg"],
|
|
3373
|
+
"application/vnd.cosmocaller": ["cmc"],
|
|
3374
|
+
"application/vnd.crick.clicker": ["clkx"],
|
|
3375
|
+
"application/vnd.crick.clicker.keyboard": ["clkk"],
|
|
3376
|
+
"application/vnd.crick.clicker.palette": ["clkp"],
|
|
3377
|
+
"application/vnd.crick.clicker.template": ["clkt"],
|
|
3378
|
+
"application/vnd.crick.clicker.wordbank": ["clkw"],
|
|
3379
|
+
"application/vnd.criticaltools.wbs+xml": ["wbs"],
|
|
3380
|
+
"application/vnd.ctc-posml": ["pml"],
|
|
3381
|
+
"application/vnd.cups-ppd": ["ppd"],
|
|
3382
|
+
"application/vnd.curl.car": ["car"],
|
|
3383
|
+
"application/vnd.curl.pcurl": ["pcurl"],
|
|
3384
|
+
"application/vnd.dart": ["dart"],
|
|
3385
|
+
"application/vnd.data-vision.rdz": ["rdz"],
|
|
3386
|
+
"application/vnd.dbf": ["dbf"],
|
|
3387
|
+
"application/vnd.dcmp+xml": ["dcmp"],
|
|
3388
|
+
"application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"],
|
|
3389
|
+
"application/vnd.dece.ttml+xml": ["uvt", "uvvt"],
|
|
3390
|
+
"application/vnd.dece.unspecified": ["uvx", "uvvx"],
|
|
3391
|
+
"application/vnd.dece.zip": ["uvz", "uvvz"],
|
|
3392
|
+
"application/vnd.denovo.fcselayout-link": ["fe_launch"],
|
|
3393
|
+
"application/vnd.dna": ["dna"],
|
|
3394
|
+
"application/vnd.dolby.mlp": ["mlp"],
|
|
3395
|
+
"application/vnd.dpgraph": ["dpg"],
|
|
3396
|
+
"application/vnd.dreamfactory": ["dfac"],
|
|
3397
|
+
"application/vnd.ds-keypoint": ["kpxx"],
|
|
3398
|
+
"application/vnd.dvb.ait": ["ait"],
|
|
3399
|
+
"application/vnd.dvb.service": ["svc"],
|
|
3400
|
+
"application/vnd.dynageo": ["geo"],
|
|
3401
|
+
"application/vnd.ecowin.chart": ["mag"],
|
|
3402
|
+
"application/vnd.enliven": ["nml"],
|
|
3403
|
+
"application/vnd.epson.esf": ["esf"],
|
|
3404
|
+
"application/vnd.epson.msf": ["msf"],
|
|
3405
|
+
"application/vnd.epson.quickanime": ["qam"],
|
|
3406
|
+
"application/vnd.epson.salt": ["slt"],
|
|
3407
|
+
"application/vnd.epson.ssf": ["ssf"],
|
|
3408
|
+
"application/vnd.eszigno3+xml": ["es3", "et3"],
|
|
3409
|
+
"application/vnd.ezpix-album": ["ez2"],
|
|
3410
|
+
"application/vnd.ezpix-package": ["ez3"],
|
|
3411
|
+
"application/vnd.fdf": ["*fdf"],
|
|
3412
|
+
"application/vnd.fdsn.mseed": ["mseed"],
|
|
3413
|
+
"application/vnd.fdsn.seed": ["seed", "dataless"],
|
|
3414
|
+
"application/vnd.flographit": ["gph"],
|
|
3415
|
+
"application/vnd.fluxtime.clip": ["ftc"],
|
|
3416
|
+
"application/vnd.framemaker": ["fm", "frame", "maker", "book"],
|
|
3417
|
+
"application/vnd.frogans.fnc": ["fnc"],
|
|
3418
|
+
"application/vnd.frogans.ltf": ["ltf"],
|
|
3419
|
+
"application/vnd.fsc.weblaunch": ["fsc"],
|
|
3420
|
+
"application/vnd.fujitsu.oasys": ["oas"],
|
|
3421
|
+
"application/vnd.fujitsu.oasys2": ["oa2"],
|
|
3422
|
+
"application/vnd.fujitsu.oasys3": ["oa3"],
|
|
3423
|
+
"application/vnd.fujitsu.oasysgp": ["fg5"],
|
|
3424
|
+
"application/vnd.fujitsu.oasysprs": ["bh2"],
|
|
3425
|
+
"application/vnd.fujixerox.ddd": ["ddd"],
|
|
3426
|
+
"application/vnd.fujixerox.docuworks": ["xdw"],
|
|
3427
|
+
"application/vnd.fujixerox.docuworks.binder": ["xbd"],
|
|
3428
|
+
"application/vnd.fuzzysheet": ["fzs"],
|
|
3429
|
+
"application/vnd.genomatix.tuxedo": ["txd"],
|
|
3430
|
+
"application/vnd.geogebra.file": ["ggb"],
|
|
3431
|
+
"application/vnd.geogebra.slides": ["ggs"],
|
|
3432
|
+
"application/vnd.geogebra.tool": ["ggt"],
|
|
3433
|
+
"application/vnd.geometry-explorer": ["gex", "gre"],
|
|
3434
|
+
"application/vnd.geonext": ["gxt"],
|
|
3435
|
+
"application/vnd.geoplan": ["g2w"],
|
|
3436
|
+
"application/vnd.geospace": ["g3w"],
|
|
3437
|
+
"application/vnd.gmx": ["gmx"],
|
|
3438
|
+
"application/vnd.google-apps.document": ["gdoc"],
|
|
3439
|
+
"application/vnd.google-apps.drawing": ["gdraw"],
|
|
3440
|
+
"application/vnd.google-apps.form": ["gform"],
|
|
3441
|
+
"application/vnd.google-apps.jam": ["gjam"],
|
|
3442
|
+
"application/vnd.google-apps.map": ["gmap"],
|
|
3443
|
+
"application/vnd.google-apps.presentation": ["gslides"],
|
|
3444
|
+
"application/vnd.google-apps.script": ["gscript"],
|
|
3445
|
+
"application/vnd.google-apps.site": ["gsite"],
|
|
3446
|
+
"application/vnd.google-apps.spreadsheet": ["gsheet"],
|
|
3447
|
+
"application/vnd.google-earth.kml+xml": ["kml"],
|
|
3448
|
+
"application/vnd.google-earth.kmz": ["kmz"],
|
|
3449
|
+
"application/vnd.gov.sk.xmldatacontainer+xml": ["xdcf"],
|
|
3450
|
+
"application/vnd.grafeq": ["gqf", "gqs"],
|
|
3451
|
+
"application/vnd.groove-account": ["gac"],
|
|
3452
|
+
"application/vnd.groove-help": ["ghf"],
|
|
3453
|
+
"application/vnd.groove-identity-message": ["gim"],
|
|
3454
|
+
"application/vnd.groove-injector": ["grv"],
|
|
3455
|
+
"application/vnd.groove-tool-message": ["gtm"],
|
|
3456
|
+
"application/vnd.groove-tool-template": ["tpl"],
|
|
3457
|
+
"application/vnd.groove-vcard": ["vcg"],
|
|
3458
|
+
"application/vnd.hal+xml": ["hal"],
|
|
3459
|
+
"application/vnd.handheld-entertainment+xml": ["zmm"],
|
|
3460
|
+
"application/vnd.hbci": ["hbci"],
|
|
3461
|
+
"application/vnd.hhe.lesson-player": ["les"],
|
|
3462
|
+
"application/vnd.hp-hpgl": ["hpgl"],
|
|
3463
|
+
"application/vnd.hp-hpid": ["hpid"],
|
|
3464
|
+
"application/vnd.hp-hps": ["hps"],
|
|
3465
|
+
"application/vnd.hp-jlyt": ["jlt"],
|
|
3466
|
+
"application/vnd.hp-pcl": ["pcl"],
|
|
3467
|
+
"application/vnd.hp-pclxl": ["pclxl"],
|
|
3468
|
+
"application/vnd.hydrostatix.sof-data": ["sfd-hdstx"],
|
|
3469
|
+
"application/vnd.ibm.minipay": ["mpy"],
|
|
3470
|
+
"application/vnd.ibm.modcap": ["afp", "listafp", "list3820"],
|
|
3471
|
+
"application/vnd.ibm.rights-management": ["irm"],
|
|
3472
|
+
"application/vnd.ibm.secure-container": ["sc"],
|
|
3473
|
+
"application/vnd.iccprofile": ["icc", "icm"],
|
|
3474
|
+
"application/vnd.igloader": ["igl"],
|
|
3475
|
+
"application/vnd.immervision-ivp": ["ivp"],
|
|
3476
|
+
"application/vnd.immervision-ivu": ["ivu"],
|
|
3477
|
+
"application/vnd.insors.igm": ["igm"],
|
|
3478
|
+
"application/vnd.intercon.formnet": ["xpw", "xpx"],
|
|
3479
|
+
"application/vnd.intergeo": ["i2g"],
|
|
3480
|
+
"application/vnd.intu.qbo": ["qbo"],
|
|
3481
|
+
"application/vnd.intu.qfx": ["qfx"],
|
|
3482
|
+
"application/vnd.ipunplugged.rcprofile": ["rcprofile"],
|
|
3483
|
+
"application/vnd.irepository.package+xml": ["irp"],
|
|
3484
|
+
"application/vnd.is-xpr": ["xpr"],
|
|
3485
|
+
"application/vnd.isac.fcs": ["fcs"],
|
|
3486
|
+
"application/vnd.jam": ["jam"],
|
|
3487
|
+
"application/vnd.jcp.javame.midlet-rms": ["rms"],
|
|
3488
|
+
"application/vnd.jisp": ["jisp"],
|
|
3489
|
+
"application/vnd.joost.joda-archive": ["joda"],
|
|
3490
|
+
"application/vnd.kahootz": ["ktz", "ktr"],
|
|
3491
|
+
"application/vnd.kde.karbon": ["karbon"],
|
|
3492
|
+
"application/vnd.kde.kchart": ["chrt"],
|
|
3493
|
+
"application/vnd.kde.kformula": ["kfo"],
|
|
3494
|
+
"application/vnd.kde.kivio": ["flw"],
|
|
3495
|
+
"application/vnd.kde.kontour": ["kon"],
|
|
3496
|
+
"application/vnd.kde.kpresenter": ["kpr", "kpt"],
|
|
3497
|
+
"application/vnd.kde.kspread": ["ksp"],
|
|
3498
|
+
"application/vnd.kde.kword": ["kwd", "kwt"],
|
|
3499
|
+
"application/vnd.kenameaapp": ["htke"],
|
|
3500
|
+
"application/vnd.kidspiration": ["kia"],
|
|
3501
|
+
"application/vnd.kinar": ["kne", "knp"],
|
|
3502
|
+
"application/vnd.koan": ["skp", "skd", "skt", "skm"],
|
|
3503
|
+
"application/vnd.kodak-descriptor": ["sse"],
|
|
3504
|
+
"application/vnd.las.las+xml": ["lasxml"],
|
|
3505
|
+
"application/vnd.llamagraphics.life-balance.desktop": ["lbd"],
|
|
3506
|
+
"application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"],
|
|
3507
|
+
"application/vnd.lotus-1-2-3": ["123"],
|
|
3508
|
+
"application/vnd.lotus-approach": ["apr"],
|
|
3509
|
+
"application/vnd.lotus-freelance": ["pre"],
|
|
3510
|
+
"application/vnd.lotus-notes": ["nsf"],
|
|
3511
|
+
"application/vnd.lotus-organizer": ["org"],
|
|
3512
|
+
"application/vnd.lotus-screencam": ["scm"],
|
|
3513
|
+
"application/vnd.lotus-wordpro": ["lwp"],
|
|
3514
|
+
"application/vnd.macports.portpkg": ["portpkg"],
|
|
3515
|
+
"application/vnd.mapbox-vector-tile": ["mvt"],
|
|
3516
|
+
"application/vnd.mcd": ["mcd"],
|
|
3517
|
+
"application/vnd.medcalcdata": ["mc1"],
|
|
3518
|
+
"application/vnd.mediastation.cdkey": ["cdkey"],
|
|
3519
|
+
"application/vnd.mfer": ["mwf"],
|
|
3520
|
+
"application/vnd.mfmp": ["mfm"],
|
|
3521
|
+
"application/vnd.micrografx.flo": ["flo"],
|
|
3522
|
+
"application/vnd.micrografx.igx": ["igx"],
|
|
3523
|
+
"application/vnd.mif": ["mif"],
|
|
3524
|
+
"application/vnd.mobius.daf": ["daf"],
|
|
3525
|
+
"application/vnd.mobius.dis": ["dis"],
|
|
3526
|
+
"application/vnd.mobius.mbk": ["mbk"],
|
|
3527
|
+
"application/vnd.mobius.mqy": ["mqy"],
|
|
3528
|
+
"application/vnd.mobius.msl": ["msl"],
|
|
3529
|
+
"application/vnd.mobius.plc": ["plc"],
|
|
3530
|
+
"application/vnd.mobius.txf": ["txf"],
|
|
3531
|
+
"application/vnd.mophun.application": ["mpn"],
|
|
3532
|
+
"application/vnd.mophun.certificate": ["mpc"],
|
|
3533
|
+
"application/vnd.mozilla.xul+xml": ["xul"],
|
|
3534
|
+
"application/vnd.ms-artgalry": ["cil"],
|
|
3535
|
+
"application/vnd.ms-cab-compressed": ["cab"],
|
|
3536
|
+
"application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"],
|
|
3537
|
+
"application/vnd.ms-excel.addin.macroenabled.12": ["xlam"],
|
|
3538
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"],
|
|
3539
|
+
"application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"],
|
|
3540
|
+
"application/vnd.ms-excel.template.macroenabled.12": ["xltm"],
|
|
3541
|
+
"application/vnd.ms-fontobject": ["eot"],
|
|
3542
|
+
"application/vnd.ms-htmlhelp": ["chm"],
|
|
3543
|
+
"application/vnd.ms-ims": ["ims"],
|
|
3544
|
+
"application/vnd.ms-lrm": ["lrm"],
|
|
3545
|
+
"application/vnd.ms-officetheme": ["thmx"],
|
|
3546
|
+
"application/vnd.ms-outlook": ["msg"],
|
|
3547
|
+
"application/vnd.ms-pki.seccat": ["cat"],
|
|
3548
|
+
"application/vnd.ms-pki.stl": ["*stl"],
|
|
3549
|
+
"application/vnd.ms-powerpoint": ["ppt", "pps", "pot"],
|
|
3550
|
+
"application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"],
|
|
3551
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"],
|
|
3552
|
+
"application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"],
|
|
3553
|
+
"application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"],
|
|
3554
|
+
"application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"],
|
|
3555
|
+
"application/vnd.ms-project": ["*mpp", "mpt"],
|
|
3556
|
+
"application/vnd.ms-visio.viewer": ["vdx"],
|
|
3557
|
+
"application/vnd.ms-word.document.macroenabled.12": ["docm"],
|
|
3558
|
+
"application/vnd.ms-word.template.macroenabled.12": ["dotm"],
|
|
3559
|
+
"application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"],
|
|
3560
|
+
"application/vnd.ms-wpl": ["wpl"],
|
|
3561
|
+
"application/vnd.ms-xpsdocument": ["xps"],
|
|
3562
|
+
"application/vnd.mseq": ["mseq"],
|
|
3563
|
+
"application/vnd.musician": ["mus"],
|
|
3564
|
+
"application/vnd.muvee.style": ["msty"],
|
|
3565
|
+
"application/vnd.mynfc": ["taglet"],
|
|
3566
|
+
"application/vnd.nato.bindingdataobject+xml": ["bdo"],
|
|
3567
|
+
"application/vnd.neurolanguage.nlu": ["nlu"],
|
|
3568
|
+
"application/vnd.nitf": ["ntf", "nitf"],
|
|
3569
|
+
"application/vnd.noblenet-directory": ["nnd"],
|
|
3570
|
+
"application/vnd.noblenet-sealer": ["nns"],
|
|
3571
|
+
"application/vnd.noblenet-web": ["nnw"],
|
|
3572
|
+
"application/vnd.nokia.n-gage.ac+xml": ["*ac"],
|
|
3573
|
+
"application/vnd.nokia.n-gage.data": ["ngdat"],
|
|
3574
|
+
"application/vnd.nokia.n-gage.symbian.install": ["n-gage"],
|
|
3575
|
+
"application/vnd.nokia.radio-preset": ["rpst"],
|
|
3576
|
+
"application/vnd.nokia.radio-presets": ["rpss"],
|
|
3577
|
+
"application/vnd.novadigm.edm": ["edm"],
|
|
3578
|
+
"application/vnd.novadigm.edx": ["edx"],
|
|
3579
|
+
"application/vnd.novadigm.ext": ["ext"],
|
|
3580
|
+
"application/vnd.oasis.opendocument.chart": ["odc"],
|
|
3581
|
+
"application/vnd.oasis.opendocument.chart-template": ["otc"],
|
|
3582
|
+
"application/vnd.oasis.opendocument.database": ["odb"],
|
|
3583
|
+
"application/vnd.oasis.opendocument.formula": ["odf"],
|
|
3584
|
+
"application/vnd.oasis.opendocument.formula-template": ["odft"],
|
|
3585
|
+
"application/vnd.oasis.opendocument.graphics": ["odg"],
|
|
3586
|
+
"application/vnd.oasis.opendocument.graphics-template": ["otg"],
|
|
3587
|
+
"application/vnd.oasis.opendocument.image": ["odi"],
|
|
3588
|
+
"application/vnd.oasis.opendocument.image-template": ["oti"],
|
|
3589
|
+
"application/vnd.oasis.opendocument.presentation": ["odp"],
|
|
3590
|
+
"application/vnd.oasis.opendocument.presentation-template": ["otp"],
|
|
3591
|
+
"application/vnd.oasis.opendocument.spreadsheet": ["ods"],
|
|
3592
|
+
"application/vnd.oasis.opendocument.spreadsheet-template": ["ots"],
|
|
3593
|
+
"application/vnd.oasis.opendocument.text": ["odt"],
|
|
3594
|
+
"application/vnd.oasis.opendocument.text-master": ["odm"],
|
|
3595
|
+
"application/vnd.oasis.opendocument.text-template": ["ott"],
|
|
3596
|
+
"application/vnd.oasis.opendocument.text-web": ["oth"],
|
|
3597
|
+
"application/vnd.olpc-sugar": ["xo"],
|
|
3598
|
+
"application/vnd.oma.dd2+xml": ["dd2"],
|
|
3599
|
+
"application/vnd.openblox.game+xml": ["obgx"],
|
|
3600
|
+
"application/vnd.openofficeorg.extension": ["oxt"],
|
|
3601
|
+
"application/vnd.openstreetmap.data+xml": ["osm"],
|
|
3602
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": [
|
|
3603
|
+
"pptx"
|
|
3604
|
+
],
|
|
3605
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slide": [
|
|
3606
|
+
"sldx"
|
|
3607
|
+
],
|
|
3608
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": [
|
|
3609
|
+
"ppsx"
|
|
3610
|
+
],
|
|
3611
|
+
"application/vnd.openxmlformats-officedocument.presentationml.template": [
|
|
3612
|
+
"potx"
|
|
3613
|
+
],
|
|
3614
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"],
|
|
3615
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.template": [
|
|
3616
|
+
"xltx"
|
|
3617
|
+
],
|
|
3618
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": [
|
|
3619
|
+
"docx"
|
|
3620
|
+
],
|
|
3621
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.template": [
|
|
3622
|
+
"dotx"
|
|
3623
|
+
],
|
|
3624
|
+
"application/vnd.osgeo.mapguide.package": ["mgp"],
|
|
3625
|
+
"application/vnd.osgi.dp": ["dp"],
|
|
3626
|
+
"application/vnd.osgi.subsystem": ["esa"],
|
|
3627
|
+
"application/vnd.palm": ["pdb", "pqa", "oprc"],
|
|
3628
|
+
"application/vnd.pawaafile": ["paw"],
|
|
3629
|
+
"application/vnd.pg.format": ["str"],
|
|
3630
|
+
"application/vnd.pg.osasli": ["ei6"],
|
|
3631
|
+
"application/vnd.picsel": ["efif"],
|
|
3632
|
+
"application/vnd.pmi.widget": ["wg"],
|
|
3633
|
+
"application/vnd.pocketlearn": ["plf"],
|
|
3634
|
+
"application/vnd.powerbuilder6": ["pbd"],
|
|
3635
|
+
"application/vnd.previewsystems.box": ["box"],
|
|
3636
|
+
"application/vnd.procrate.brushset": ["brushset"],
|
|
3637
|
+
"application/vnd.procreate.brush": ["brush"],
|
|
3638
|
+
"application/vnd.procreate.dream": ["drm"],
|
|
3639
|
+
"application/vnd.proteus.magazine": ["mgz"],
|
|
3640
|
+
"application/vnd.publishare-delta-tree": ["qps"],
|
|
3641
|
+
"application/vnd.pvi.ptid1": ["ptid"],
|
|
3642
|
+
"application/vnd.pwg-xhtml-print+xml": ["xhtm"],
|
|
3643
|
+
"application/vnd.quark.quarkxpress": [
|
|
3644
|
+
"qxd",
|
|
3645
|
+
"qxt",
|
|
3646
|
+
"qwd",
|
|
3647
|
+
"qwt",
|
|
3648
|
+
"qxl",
|
|
3649
|
+
"qxb"
|
|
3650
|
+
],
|
|
3651
|
+
"application/vnd.rar": ["rar"],
|
|
3652
|
+
"application/vnd.realvnc.bed": ["bed"],
|
|
3653
|
+
"application/vnd.recordare.musicxml": ["mxl"],
|
|
3654
|
+
"application/vnd.recordare.musicxml+xml": ["musicxml"],
|
|
3655
|
+
"application/vnd.rig.cryptonote": ["cryptonote"],
|
|
3656
|
+
"application/vnd.rim.cod": ["cod"],
|
|
3657
|
+
"application/vnd.rn-realmedia": ["rm"],
|
|
3658
|
+
"application/vnd.rn-realmedia-vbr": ["rmvb"],
|
|
3659
|
+
"application/vnd.route66.link66+xml": ["link66"],
|
|
3660
|
+
"application/vnd.sailingtracker.track": ["st"],
|
|
3661
|
+
"application/vnd.seemail": ["see"],
|
|
3662
|
+
"application/vnd.sema": ["sema"],
|
|
3663
|
+
"application/vnd.semd": ["semd"],
|
|
3664
|
+
"application/vnd.semf": ["semf"],
|
|
3665
|
+
"application/vnd.shana.informed.formdata": ["ifm"],
|
|
3666
|
+
"application/vnd.shana.informed.formtemplate": ["itp"],
|
|
3667
|
+
"application/vnd.shana.informed.interchange": ["iif"],
|
|
3668
|
+
"application/vnd.shana.informed.package": ["ipk"],
|
|
3669
|
+
"application/vnd.simtech-mindmapper": ["twd", "twds"],
|
|
3670
|
+
"application/vnd.smaf": ["mmf"],
|
|
3671
|
+
"application/vnd.smart.teacher": ["teacher"],
|
|
3672
|
+
"application/vnd.software602.filler.form+xml": ["fo"],
|
|
3673
|
+
"application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"],
|
|
3674
|
+
"application/vnd.spotfire.dxp": ["dxp"],
|
|
3675
|
+
"application/vnd.spotfire.sfs": ["sfs"],
|
|
3676
|
+
"application/vnd.stardivision.calc": ["sdc"],
|
|
3677
|
+
"application/vnd.stardivision.draw": ["sda"],
|
|
3678
|
+
"application/vnd.stardivision.impress": ["sdd"],
|
|
3679
|
+
"application/vnd.stardivision.math": ["smf"],
|
|
3680
|
+
"application/vnd.stardivision.writer": ["sdw", "vor"],
|
|
3681
|
+
"application/vnd.stardivision.writer-global": ["sgl"],
|
|
3682
|
+
"application/vnd.stepmania.package": ["smzip"],
|
|
3683
|
+
"application/vnd.stepmania.stepchart": ["sm"],
|
|
3684
|
+
"application/vnd.sun.wadl+xml": ["wadl"],
|
|
3685
|
+
"application/vnd.sun.xml.calc": ["sxc"],
|
|
3686
|
+
"application/vnd.sun.xml.calc.template": ["stc"],
|
|
3687
|
+
"application/vnd.sun.xml.draw": ["sxd"],
|
|
3688
|
+
"application/vnd.sun.xml.draw.template": ["std"],
|
|
3689
|
+
"application/vnd.sun.xml.impress": ["sxi"],
|
|
3690
|
+
"application/vnd.sun.xml.impress.template": ["sti"],
|
|
3691
|
+
"application/vnd.sun.xml.math": ["sxm"],
|
|
3692
|
+
"application/vnd.sun.xml.writer": ["sxw"],
|
|
3693
|
+
"application/vnd.sun.xml.writer.global": ["sxg"],
|
|
3694
|
+
"application/vnd.sun.xml.writer.template": ["stw"],
|
|
3695
|
+
"application/vnd.sus-calendar": ["sus", "susp"],
|
|
3696
|
+
"application/vnd.svd": ["svd"],
|
|
3697
|
+
"application/vnd.symbian.install": ["sis", "sisx"],
|
|
3698
|
+
"application/vnd.syncml+xml": ["xsm"],
|
|
3699
|
+
"application/vnd.syncml.dm+wbxml": ["bdm"],
|
|
3700
|
+
"application/vnd.syncml.dm+xml": ["xdm"],
|
|
3701
|
+
"application/vnd.syncml.dmddf+xml": ["ddf"],
|
|
3702
|
+
"application/vnd.tao.intent-module-archive": ["tao"],
|
|
3703
|
+
"application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"],
|
|
3704
|
+
"application/vnd.tmobile-livetv": ["tmo"],
|
|
3705
|
+
"application/vnd.trid.tpt": ["tpt"],
|
|
3706
|
+
"application/vnd.triscape.mxs": ["mxs"],
|
|
3707
|
+
"application/vnd.trueapp": ["tra"],
|
|
3708
|
+
"application/vnd.ufdl": ["ufd", "ufdl"],
|
|
3709
|
+
"application/vnd.uiq.theme": ["utz"],
|
|
3710
|
+
"application/vnd.umajin": ["umj"],
|
|
3711
|
+
"application/vnd.unity": ["unityweb"],
|
|
3712
|
+
"application/vnd.uoml+xml": ["uoml", "uo"],
|
|
3713
|
+
"application/vnd.vcx": ["vcx"],
|
|
3714
|
+
"application/vnd.visio": ["vsd", "vst", "vss", "vsw", "vsdx", "vtx"],
|
|
3715
|
+
"application/vnd.visionary": ["vis"],
|
|
3716
|
+
"application/vnd.vsf": ["vsf"],
|
|
3717
|
+
"application/vnd.wap.wbxml": ["wbxml"],
|
|
3718
|
+
"application/vnd.wap.wmlc": ["wmlc"],
|
|
3719
|
+
"application/vnd.wap.wmlscriptc": ["wmlsc"],
|
|
3720
|
+
"application/vnd.webturbo": ["wtb"],
|
|
3721
|
+
"application/vnd.wolfram.player": ["nbp"],
|
|
3722
|
+
"application/vnd.wordperfect": ["wpd"],
|
|
3723
|
+
"application/vnd.wqd": ["wqd"],
|
|
3724
|
+
"application/vnd.wt.stf": ["stf"],
|
|
3725
|
+
"application/vnd.xara": ["xar"],
|
|
3726
|
+
"application/vnd.xfdl": ["xfdl"],
|
|
3727
|
+
"application/vnd.yamaha.hv-dic": ["hvd"],
|
|
3728
|
+
"application/vnd.yamaha.hv-script": ["hvs"],
|
|
3729
|
+
"application/vnd.yamaha.hv-voice": ["hvp"],
|
|
3730
|
+
"application/vnd.yamaha.openscoreformat": ["osf"],
|
|
3731
|
+
"application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"],
|
|
3732
|
+
"application/vnd.yamaha.smaf-audio": ["saf"],
|
|
3733
|
+
"application/vnd.yamaha.smaf-phrase": ["spf"],
|
|
3734
|
+
"application/vnd.yellowriver-custom-menu": ["cmp"],
|
|
3735
|
+
"application/vnd.zul": ["zir", "zirz"],
|
|
3736
|
+
"application/vnd.zzazz.deck+xml": ["zaz"],
|
|
3737
|
+
"application/x-7z-compressed": ["7z"],
|
|
3738
|
+
"application/x-abiword": ["abw"],
|
|
3739
|
+
"application/x-ace-compressed": ["ace"],
|
|
3740
|
+
"application/x-apple-diskimage": ["*dmg"],
|
|
3741
|
+
"application/x-arj": ["arj"],
|
|
3742
|
+
"application/x-authorware-bin": ["aab", "x32", "u32", "vox"],
|
|
3743
|
+
"application/x-authorware-map": ["aam"],
|
|
3744
|
+
"application/x-authorware-seg": ["aas"],
|
|
3745
|
+
"application/x-bcpio": ["bcpio"],
|
|
3746
|
+
"application/x-bdoc": ["*bdoc"],
|
|
3747
|
+
"application/x-bittorrent": ["torrent"],
|
|
3748
|
+
"application/x-blender": ["blend"],
|
|
3749
|
+
"application/x-blorb": ["blb", "blorb"],
|
|
3750
|
+
"application/x-bzip": ["bz"],
|
|
3751
|
+
"application/x-bzip2": ["bz2", "boz"],
|
|
3752
|
+
"application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"],
|
|
3753
|
+
"application/x-cdlink": ["vcd"],
|
|
3754
|
+
"application/x-cfs-compressed": ["cfs"],
|
|
3755
|
+
"application/x-chat": ["chat"],
|
|
3756
|
+
"application/x-chess-pgn": ["pgn"],
|
|
3757
|
+
"application/x-chrome-extension": ["crx"],
|
|
3758
|
+
"application/x-cocoa": ["cco"],
|
|
3759
|
+
"application/x-compressed": ["*rar"],
|
|
3760
|
+
"application/x-conference": ["nsc"],
|
|
3761
|
+
"application/x-cpio": ["cpio"],
|
|
3762
|
+
"application/x-csh": ["csh"],
|
|
3763
|
+
"application/x-debian-package": ["*deb", "udeb"],
|
|
3764
|
+
"application/x-dgc-compressed": ["dgc"],
|
|
3765
|
+
"application/x-director": [
|
|
3766
|
+
"dir",
|
|
3767
|
+
"dcr",
|
|
3768
|
+
"dxr",
|
|
3769
|
+
"cst",
|
|
3770
|
+
"cct",
|
|
3771
|
+
"cxt",
|
|
3772
|
+
"w3d",
|
|
3773
|
+
"fgd",
|
|
3774
|
+
"swa"
|
|
3775
|
+
],
|
|
3776
|
+
"application/x-doom": ["wad"],
|
|
3777
|
+
"application/x-dtbncx+xml": ["ncx"],
|
|
3778
|
+
"application/x-dtbook+xml": ["dtb"],
|
|
3779
|
+
"application/x-dtbresource+xml": ["res"],
|
|
3780
|
+
"application/x-dvi": ["dvi"],
|
|
3781
|
+
"application/x-envoy": ["evy"],
|
|
3782
|
+
"application/x-eva": ["eva"],
|
|
3783
|
+
"application/x-font-bdf": ["bdf"],
|
|
3784
|
+
"application/x-font-ghostscript": ["gsf"],
|
|
3785
|
+
"application/x-font-linux-psf": ["psf"],
|
|
3786
|
+
"application/x-font-pcf": ["pcf"],
|
|
3787
|
+
"application/x-font-snf": ["snf"],
|
|
3788
|
+
"application/x-font-type1": ["pfa", "pfb", "pfm", "afm"],
|
|
3789
|
+
"application/x-freearc": ["arc"],
|
|
3790
|
+
"application/x-futuresplash": ["spl"],
|
|
3791
|
+
"application/x-gca-compressed": ["gca"],
|
|
3792
|
+
"application/x-glulx": ["ulx"],
|
|
3793
|
+
"application/x-gnumeric": ["gnumeric"],
|
|
3794
|
+
"application/x-gramps-xml": ["gramps"],
|
|
3795
|
+
"application/x-gtar": ["gtar"],
|
|
3796
|
+
"application/x-hdf": ["hdf"],
|
|
3797
|
+
"application/x-httpd-php": ["php"],
|
|
3798
|
+
"application/x-install-instructions": ["install"],
|
|
3799
|
+
"application/x-ipynb+json": ["ipynb"],
|
|
3800
|
+
"application/x-iso9660-image": ["*iso"],
|
|
3801
|
+
"application/x-iwork-keynote-sffkey": ["*key"],
|
|
3802
|
+
"application/x-iwork-numbers-sffnumbers": ["*numbers"],
|
|
3803
|
+
"application/x-iwork-pages-sffpages": ["*pages"],
|
|
3804
|
+
"application/x-java-archive-diff": ["jardiff"],
|
|
3805
|
+
"application/x-java-jnlp-file": ["jnlp"],
|
|
3806
|
+
"application/x-keepass2": ["kdbx"],
|
|
3807
|
+
"application/x-latex": ["latex"],
|
|
3808
|
+
"application/x-lua-bytecode": ["luac"],
|
|
3809
|
+
"application/x-lzh-compressed": ["lzh", "lha"],
|
|
3810
|
+
"application/x-makeself": ["run"],
|
|
3811
|
+
"application/x-mie": ["mie"],
|
|
3812
|
+
"application/x-mobipocket-ebook": ["*prc", "mobi"],
|
|
3813
|
+
"application/x-ms-application": ["application"],
|
|
3814
|
+
"application/x-ms-shortcut": ["lnk"],
|
|
3815
|
+
"application/x-ms-wmd": ["wmd"],
|
|
3816
|
+
"application/x-ms-wmz": ["wmz"],
|
|
3817
|
+
"application/x-ms-xbap": ["xbap"],
|
|
3818
|
+
"application/x-msaccess": ["mdb"],
|
|
3819
|
+
"application/x-msbinder": ["obd"],
|
|
3820
|
+
"application/x-mscardfile": ["crd"],
|
|
3821
|
+
"application/x-msclip": ["clp"],
|
|
3822
|
+
"application/x-msdos-program": ["*exe"],
|
|
3823
|
+
"application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"],
|
|
3824
|
+
"application/x-msmediaview": ["mvb", "m13", "m14"],
|
|
3825
|
+
"application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"],
|
|
3826
|
+
"application/x-msmoney": ["mny"],
|
|
3827
|
+
"application/x-mspublisher": ["pub"],
|
|
3828
|
+
"application/x-msschedule": ["scd"],
|
|
3829
|
+
"application/x-msterminal": ["trm"],
|
|
3830
|
+
"application/x-mswrite": ["wri"],
|
|
3831
|
+
"application/x-netcdf": ["nc", "cdf"],
|
|
3832
|
+
"application/x-ns-proxy-autoconfig": ["pac"],
|
|
3833
|
+
"application/x-nzb": ["nzb"],
|
|
3834
|
+
"application/x-perl": ["pl", "pm"],
|
|
3835
|
+
"application/x-pilot": ["*prc", "*pdb"],
|
|
3836
|
+
"application/x-pkcs12": ["p12", "pfx"],
|
|
3837
|
+
"application/x-pkcs7-certificates": ["p7b", "spc"],
|
|
3838
|
+
"application/x-pkcs7-certreqresp": ["p7r"],
|
|
3839
|
+
"application/x-rar-compressed": ["*rar"],
|
|
3840
|
+
"application/x-redhat-package-manager": ["rpm"],
|
|
3841
|
+
"application/x-research-info-systems": ["ris"],
|
|
3842
|
+
"application/x-sea": ["sea"],
|
|
3843
|
+
"application/x-sh": ["sh"],
|
|
3844
|
+
"application/x-shar": ["shar"],
|
|
3845
|
+
"application/x-shockwave-flash": ["swf"],
|
|
3846
|
+
"application/x-silverlight-app": ["xap"],
|
|
3847
|
+
"application/x-sql": ["*sql"],
|
|
3848
|
+
"application/x-stuffit": ["sit"],
|
|
3849
|
+
"application/x-stuffitx": ["sitx"],
|
|
3850
|
+
"application/x-subrip": ["srt"],
|
|
3851
|
+
"application/x-sv4cpio": ["sv4cpio"],
|
|
3852
|
+
"application/x-sv4crc": ["sv4crc"],
|
|
3853
|
+
"application/x-t3vm-image": ["t3"],
|
|
3854
|
+
"application/x-tads": ["gam"],
|
|
3855
|
+
"application/x-tar": ["tar"],
|
|
3856
|
+
"application/x-tcl": ["tcl", "tk"],
|
|
3857
|
+
"application/x-tex": ["tex"],
|
|
3858
|
+
"application/x-tex-tfm": ["tfm"],
|
|
3859
|
+
"application/x-texinfo": ["texinfo", "texi"],
|
|
3860
|
+
"application/x-tgif": ["*obj"],
|
|
3861
|
+
"application/x-ustar": ["ustar"],
|
|
3862
|
+
"application/x-virtualbox-hdd": ["hdd"],
|
|
3863
|
+
"application/x-virtualbox-ova": ["ova"],
|
|
3864
|
+
"application/x-virtualbox-ovf": ["ovf"],
|
|
3865
|
+
"application/x-virtualbox-vbox": ["vbox"],
|
|
3866
|
+
"application/x-virtualbox-vbox-extpack": ["vbox-extpack"],
|
|
3867
|
+
"application/x-virtualbox-vdi": ["vdi"],
|
|
3868
|
+
"application/x-virtualbox-vhd": ["vhd"],
|
|
3869
|
+
"application/x-virtualbox-vmdk": ["vmdk"],
|
|
3870
|
+
"application/x-wais-source": ["src"],
|
|
3871
|
+
"application/x-web-app-manifest+json": ["webapp"],
|
|
3872
|
+
"application/x-x509-ca-cert": ["der", "crt", "pem"],
|
|
3873
|
+
"application/x-xfig": ["fig"],
|
|
3874
|
+
"application/x-xliff+xml": ["*xlf"],
|
|
3875
|
+
"application/x-xpinstall": ["xpi"],
|
|
3876
|
+
"application/x-xz": ["xz"],
|
|
3877
|
+
"application/x-zip-compressed": ["*zip"],
|
|
3878
|
+
"application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"],
|
|
3879
|
+
"audio/vnd.dece.audio": ["uva", "uvva"],
|
|
3880
|
+
"audio/vnd.digital-winds": ["eol"],
|
|
3881
|
+
"audio/vnd.dra": ["dra"],
|
|
3882
|
+
"audio/vnd.dts": ["dts"],
|
|
3883
|
+
"audio/vnd.dts.hd": ["dtshd"],
|
|
3884
|
+
"audio/vnd.lucent.voice": ["lvp"],
|
|
3885
|
+
"audio/vnd.ms-playready.media.pya": ["pya"],
|
|
3886
|
+
"audio/vnd.nuera.ecelp4800": ["ecelp4800"],
|
|
3887
|
+
"audio/vnd.nuera.ecelp7470": ["ecelp7470"],
|
|
3888
|
+
"audio/vnd.nuera.ecelp9600": ["ecelp9600"],
|
|
3889
|
+
"audio/vnd.rip": ["rip"],
|
|
3890
|
+
"audio/x-aac": ["*aac"],
|
|
3891
|
+
"audio/x-aiff": ["aif", "aiff", "aifc"],
|
|
3892
|
+
"audio/x-caf": ["caf"],
|
|
3893
|
+
"audio/x-flac": ["flac"],
|
|
3894
|
+
"audio/x-m4a": ["*m4a"],
|
|
3895
|
+
"audio/x-matroska": ["mka"],
|
|
3896
|
+
"audio/x-mpegurl": ["m3u"],
|
|
3897
|
+
"audio/x-ms-wax": ["wax"],
|
|
3898
|
+
"audio/x-ms-wma": ["wma"],
|
|
3899
|
+
"audio/x-pn-realaudio": ["ram", "ra"],
|
|
3900
|
+
"audio/x-pn-realaudio-plugin": ["rmp"],
|
|
3901
|
+
"audio/x-realaudio": ["*ra"],
|
|
3902
|
+
"audio/x-wav": ["*wav"],
|
|
3903
|
+
"chemical/x-cdx": ["cdx"],
|
|
3904
|
+
"chemical/x-cif": ["cif"],
|
|
3905
|
+
"chemical/x-cmdf": ["cmdf"],
|
|
3906
|
+
"chemical/x-cml": ["cml"],
|
|
3907
|
+
"chemical/x-csml": ["csml"],
|
|
3908
|
+
"chemical/x-xyz": ["xyz"],
|
|
3909
|
+
"image/prs.btif": ["btif", "btf"],
|
|
3910
|
+
"image/prs.pti": ["pti"],
|
|
3911
|
+
"image/vnd.adobe.photoshop": ["psd"],
|
|
3912
|
+
"image/vnd.airzip.accelerator.azv": ["azv"],
|
|
3913
|
+
"image/vnd.blockfact.facti": ["facti"],
|
|
3914
|
+
"image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"],
|
|
3915
|
+
"image/vnd.djvu": ["djvu", "djv"],
|
|
3916
|
+
"image/vnd.dvb.subtitle": ["*sub"],
|
|
3917
|
+
"image/vnd.dwg": ["dwg"],
|
|
3918
|
+
"image/vnd.dxf": ["dxf"],
|
|
3919
|
+
"image/vnd.fastbidsheet": ["fbs"],
|
|
3920
|
+
"image/vnd.fpx": ["fpx"],
|
|
3921
|
+
"image/vnd.fst": ["fst"],
|
|
3922
|
+
"image/vnd.fujixerox.edmics-mmr": ["mmr"],
|
|
3923
|
+
"image/vnd.fujixerox.edmics-rlc": ["rlc"],
|
|
3924
|
+
"image/vnd.microsoft.icon": ["ico"],
|
|
3925
|
+
"image/vnd.ms-dds": ["dds"],
|
|
3926
|
+
"image/vnd.ms-modi": ["mdi"],
|
|
3927
|
+
"image/vnd.ms-photo": ["wdp"],
|
|
3928
|
+
"image/vnd.net-fpx": ["npx"],
|
|
3929
|
+
"image/vnd.pco.b16": ["b16"],
|
|
3930
|
+
"image/vnd.tencent.tap": ["tap"],
|
|
3931
|
+
"image/vnd.valve.source.texture": ["vtf"],
|
|
3932
|
+
"image/vnd.wap.wbmp": ["wbmp"],
|
|
3933
|
+
"image/vnd.xiff": ["xif"],
|
|
3934
|
+
"image/vnd.zbrush.pcx": ["pcx"],
|
|
3935
|
+
"image/x-3ds": ["3ds"],
|
|
3936
|
+
"image/x-adobe-dng": ["dng"],
|
|
3937
|
+
"image/x-cmu-raster": ["ras"],
|
|
3938
|
+
"image/x-cmx": ["cmx"],
|
|
3939
|
+
"image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"],
|
|
3940
|
+
"image/x-icon": ["*ico"],
|
|
3941
|
+
"image/x-jng": ["jng"],
|
|
3942
|
+
"image/x-mrsid-image": ["sid"],
|
|
3943
|
+
"image/x-ms-bmp": ["*bmp"],
|
|
3944
|
+
"image/x-pcx": ["*pcx"],
|
|
3945
|
+
"image/x-pict": ["pic", "pct"],
|
|
3946
|
+
"image/x-portable-anymap": ["pnm"],
|
|
3947
|
+
"image/x-portable-bitmap": ["pbm"],
|
|
3948
|
+
"image/x-portable-graymap": ["pgm"],
|
|
3949
|
+
"image/x-portable-pixmap": ["ppm"],
|
|
3950
|
+
"image/x-rgb": ["rgb"],
|
|
3951
|
+
"image/x-tga": ["tga"],
|
|
3952
|
+
"image/x-xbitmap": ["xbm"],
|
|
3953
|
+
"image/x-xpixmap": ["xpm"],
|
|
3954
|
+
"image/x-xwindowdump": ["xwd"],
|
|
3955
|
+
"message/vnd.wfa.wsc": ["wsc"],
|
|
3956
|
+
"model/vnd.bary": ["bary"],
|
|
3957
|
+
"model/vnd.cld": ["cld"],
|
|
3958
|
+
"model/vnd.collada+xml": ["dae"],
|
|
3959
|
+
"model/vnd.dwf": ["dwf"],
|
|
3960
|
+
"model/vnd.gdl": ["gdl"],
|
|
3961
|
+
"model/vnd.gtw": ["gtw"],
|
|
3962
|
+
"model/vnd.mts": ["*mts"],
|
|
3963
|
+
"model/vnd.opengex": ["ogex"],
|
|
3964
|
+
"model/vnd.parasolid.transmit.binary": ["x_b"],
|
|
3965
|
+
"model/vnd.parasolid.transmit.text": ["x_t"],
|
|
3966
|
+
"model/vnd.pytha.pyox": ["pyo", "pyox"],
|
|
3967
|
+
"model/vnd.sap.vds": ["vds"],
|
|
3968
|
+
"model/vnd.usda": ["usda"],
|
|
3969
|
+
"model/vnd.usdz+zip": ["usdz"],
|
|
3970
|
+
"model/vnd.valve.source.compiled-map": ["bsp"],
|
|
3971
|
+
"model/vnd.vtu": ["vtu"],
|
|
3972
|
+
"text/prs.lines.tag": ["dsc"],
|
|
3973
|
+
"text/vnd.curl": ["curl"],
|
|
3974
|
+
"text/vnd.curl.dcurl": ["dcurl"],
|
|
3975
|
+
"text/vnd.curl.mcurl": ["mcurl"],
|
|
3976
|
+
"text/vnd.curl.scurl": ["scurl"],
|
|
3977
|
+
"text/vnd.dvb.subtitle": ["sub"],
|
|
3978
|
+
"text/vnd.familysearch.gedcom": ["ged"],
|
|
3979
|
+
"text/vnd.fly": ["fly"],
|
|
3980
|
+
"text/vnd.fmi.flexstor": ["flx"],
|
|
3981
|
+
"text/vnd.graphviz": ["gv"],
|
|
3982
|
+
"text/vnd.in3d.3dml": ["3dml"],
|
|
3983
|
+
"text/vnd.in3d.spot": ["spot"],
|
|
3984
|
+
"text/vnd.sun.j2me.app-descriptor": ["jad"],
|
|
3985
|
+
"text/vnd.wap.wml": ["wml"],
|
|
3986
|
+
"text/vnd.wap.wmlscript": ["wmls"],
|
|
3987
|
+
"text/x-asm": ["s", "asm"],
|
|
3988
|
+
"text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"],
|
|
3989
|
+
"text/x-component": ["htc"],
|
|
3990
|
+
"text/x-fortran": ["f", "for", "f77", "f90"],
|
|
3991
|
+
"text/x-handlebars-template": ["hbs"],
|
|
3992
|
+
"text/x-java-source": ["java"],
|
|
3993
|
+
"text/x-lua": ["lua"],
|
|
3994
|
+
"text/x-markdown": ["mkd"],
|
|
3995
|
+
"text/x-nfo": ["nfo"],
|
|
3996
|
+
"text/x-opml": ["opml"],
|
|
3997
|
+
"text/x-org": ["*org"],
|
|
3998
|
+
"text/x-pascal": ["p", "pas"],
|
|
3999
|
+
"text/x-processing": ["pde"],
|
|
4000
|
+
"text/x-sass": ["sass"],
|
|
4001
|
+
"text/x-scss": ["scss"],
|
|
4002
|
+
"text/x-setext": ["etx"],
|
|
4003
|
+
"text/x-sfv": ["sfv"],
|
|
4004
|
+
"text/x-suse-ymp": ["ymp"],
|
|
4005
|
+
"text/x-uuencode": ["uu"],
|
|
4006
|
+
"text/x-vcalendar": ["vcs"],
|
|
4007
|
+
"text/x-vcard": ["vcf"],
|
|
4008
|
+
"video/vnd.dece.hd": ["uvh", "uvvh"],
|
|
4009
|
+
"video/vnd.dece.mobile": ["uvm", "uvvm"],
|
|
4010
|
+
"video/vnd.dece.pd": ["uvp", "uvvp"],
|
|
4011
|
+
"video/vnd.dece.sd": ["uvs", "uvvs"],
|
|
4012
|
+
"video/vnd.dece.video": ["uvv", "uvvv"],
|
|
4013
|
+
"video/vnd.dvb.file": ["dvb"],
|
|
4014
|
+
"video/vnd.fvt": ["fvt"],
|
|
4015
|
+
"video/vnd.mpegurl": ["mxu", "m4u"],
|
|
4016
|
+
"video/vnd.ms-playready.media.pyv": ["pyv"],
|
|
4017
|
+
"video/vnd.uvvu.mp4": ["uvu", "uvvu"],
|
|
4018
|
+
"video/vnd.vivo": ["viv"],
|
|
4019
|
+
"video/x-f4v": ["f4v"],
|
|
4020
|
+
"video/x-fli": ["fli"],
|
|
4021
|
+
"video/x-flv": ["flv"],
|
|
4022
|
+
"video/x-m4v": ["m4v"],
|
|
4023
|
+
"video/x-matroska": ["mkv", "mk3d", "mks"],
|
|
4024
|
+
"video/x-mng": ["mng"],
|
|
4025
|
+
"video/x-ms-asf": ["asf", "asx"],
|
|
4026
|
+
"video/x-ms-vob": ["vob"],
|
|
4027
|
+
"video/x-ms-wm": ["wm"],
|
|
4028
|
+
"video/x-ms-wmv": ["wmv"],
|
|
4029
|
+
"video/x-ms-wmx": ["wmx"],
|
|
4030
|
+
"video/x-ms-wvx": ["wvx"],
|
|
4031
|
+
"video/x-msvideo": ["avi"],
|
|
4032
|
+
"video/x-sgi-movie": ["movie"],
|
|
4033
|
+
"video/x-smv": ["smv"],
|
|
4034
|
+
"x-conference/x-cooltalk": ["ice"]
|
|
4035
|
+
};
|
|
4036
|
+
Object.freeze(types);
|
|
4037
|
+
var other_default = types;
|
|
4038
|
+
|
|
4039
|
+
// ../../node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/types/standard.js
|
|
4040
|
+
var types2 = {
|
|
4041
|
+
"application/andrew-inset": ["ez"],
|
|
4042
|
+
"application/appinstaller": ["appinstaller"],
|
|
4043
|
+
"application/applixware": ["aw"],
|
|
4044
|
+
"application/appx": ["appx"],
|
|
4045
|
+
"application/appxbundle": ["appxbundle"],
|
|
4046
|
+
"application/atom+xml": ["atom"],
|
|
4047
|
+
"application/atomcat+xml": ["atomcat"],
|
|
4048
|
+
"application/atomdeleted+xml": ["atomdeleted"],
|
|
4049
|
+
"application/atomsvc+xml": ["atomsvc"],
|
|
4050
|
+
"application/atsc-dwd+xml": ["dwd"],
|
|
4051
|
+
"application/atsc-held+xml": ["held"],
|
|
4052
|
+
"application/atsc-rsat+xml": ["rsat"],
|
|
4053
|
+
"application/automationml-aml+xml": ["aml"],
|
|
4054
|
+
"application/automationml-amlx+zip": ["amlx"],
|
|
4055
|
+
"application/bdoc": ["bdoc"],
|
|
4056
|
+
"application/calendar+xml": ["xcs"],
|
|
4057
|
+
"application/ccxml+xml": ["ccxml"],
|
|
4058
|
+
"application/cdfx+xml": ["cdfx"],
|
|
4059
|
+
"application/cdmi-capability": ["cdmia"],
|
|
4060
|
+
"application/cdmi-container": ["cdmic"],
|
|
4061
|
+
"application/cdmi-domain": ["cdmid"],
|
|
4062
|
+
"application/cdmi-object": ["cdmio"],
|
|
4063
|
+
"application/cdmi-queue": ["cdmiq"],
|
|
4064
|
+
"application/cpl+xml": ["cpl"],
|
|
4065
|
+
"application/cu-seeme": ["cu"],
|
|
4066
|
+
"application/cwl": ["cwl"],
|
|
4067
|
+
"application/dash+xml": ["mpd"],
|
|
4068
|
+
"application/dash-patch+xml": ["mpp"],
|
|
4069
|
+
"application/davmount+xml": ["davmount"],
|
|
4070
|
+
"application/dicom": ["dcm"],
|
|
4071
|
+
"application/docbook+xml": ["dbk"],
|
|
4072
|
+
"application/dssc+der": ["dssc"],
|
|
4073
|
+
"application/dssc+xml": ["xdssc"],
|
|
4074
|
+
"application/ecmascript": ["ecma"],
|
|
4075
|
+
"application/emma+xml": ["emma"],
|
|
4076
|
+
"application/emotionml+xml": ["emotionml"],
|
|
4077
|
+
"application/epub+zip": ["epub"],
|
|
4078
|
+
"application/exi": ["exi"],
|
|
4079
|
+
"application/express": ["exp"],
|
|
4080
|
+
"application/fdf": ["fdf"],
|
|
4081
|
+
"application/fdt+xml": ["fdt"],
|
|
4082
|
+
"application/font-tdpfr": ["pfr"],
|
|
4083
|
+
"application/geo+json": ["geojson"],
|
|
4084
|
+
"application/gml+xml": ["gml"],
|
|
4085
|
+
"application/gpx+xml": ["gpx"],
|
|
4086
|
+
"application/gxf": ["gxf"],
|
|
4087
|
+
"application/gzip": ["gz"],
|
|
4088
|
+
"application/hjson": ["hjson"],
|
|
4089
|
+
"application/hyperstudio": ["stk"],
|
|
4090
|
+
"application/inkml+xml": ["ink", "inkml"],
|
|
4091
|
+
"application/ipfix": ["ipfix"],
|
|
4092
|
+
"application/its+xml": ["its"],
|
|
4093
|
+
"application/java-archive": ["jar", "war", "ear"],
|
|
4094
|
+
"application/java-serialized-object": ["ser"],
|
|
4095
|
+
"application/java-vm": ["class"],
|
|
4096
|
+
"application/javascript": ["*js"],
|
|
4097
|
+
"application/json": ["json", "map"],
|
|
4098
|
+
"application/json5": ["json5"],
|
|
4099
|
+
"application/jsonml+json": ["jsonml"],
|
|
4100
|
+
"application/ld+json": ["jsonld"],
|
|
4101
|
+
"application/lgr+xml": ["lgr"],
|
|
4102
|
+
"application/lost+xml": ["lostxml"],
|
|
4103
|
+
"application/mac-binhex40": ["hqx"],
|
|
4104
|
+
"application/mac-compactpro": ["cpt"],
|
|
4105
|
+
"application/mads+xml": ["mads"],
|
|
4106
|
+
"application/manifest+json": ["webmanifest"],
|
|
4107
|
+
"application/marc": ["mrc"],
|
|
4108
|
+
"application/marcxml+xml": ["mrcx"],
|
|
4109
|
+
"application/mathematica": ["ma", "nb", "mb"],
|
|
4110
|
+
"application/mathml+xml": ["mathml"],
|
|
4111
|
+
"application/mbox": ["mbox"],
|
|
4112
|
+
"application/media-policy-dataset+xml": ["mpf"],
|
|
4113
|
+
"application/mediaservercontrol+xml": ["mscml"],
|
|
4114
|
+
"application/metalink+xml": ["metalink"],
|
|
4115
|
+
"application/metalink4+xml": ["meta4"],
|
|
4116
|
+
"application/mets+xml": ["mets"],
|
|
4117
|
+
"application/mmt-aei+xml": ["maei"],
|
|
4118
|
+
"application/mmt-usd+xml": ["musd"],
|
|
4119
|
+
"application/mods+xml": ["mods"],
|
|
4120
|
+
"application/mp21": ["m21", "mp21"],
|
|
4121
|
+
"application/mp4": ["*mp4", "*mpg4", "mp4s", "m4p"],
|
|
4122
|
+
"application/msix": ["msix"],
|
|
4123
|
+
"application/msixbundle": ["msixbundle"],
|
|
4124
|
+
"application/msword": ["doc", "dot"],
|
|
4125
|
+
"application/mxf": ["mxf"],
|
|
4126
|
+
"application/n-quads": ["nq"],
|
|
4127
|
+
"application/n-triples": ["nt"],
|
|
4128
|
+
"application/node": ["cjs"],
|
|
4129
|
+
"application/octet-stream": [
|
|
4130
|
+
"bin",
|
|
4131
|
+
"dms",
|
|
4132
|
+
"lrf",
|
|
4133
|
+
"mar",
|
|
4134
|
+
"so",
|
|
4135
|
+
"dist",
|
|
4136
|
+
"distz",
|
|
4137
|
+
"pkg",
|
|
4138
|
+
"bpk",
|
|
4139
|
+
"dump",
|
|
4140
|
+
"elc",
|
|
4141
|
+
"deploy",
|
|
4142
|
+
"exe",
|
|
4143
|
+
"dll",
|
|
4144
|
+
"deb",
|
|
4145
|
+
"dmg",
|
|
4146
|
+
"iso",
|
|
4147
|
+
"img",
|
|
4148
|
+
"msi",
|
|
4149
|
+
"msp",
|
|
4150
|
+
"msm",
|
|
4151
|
+
"buffer"
|
|
4152
|
+
],
|
|
4153
|
+
"application/oda": ["oda"],
|
|
4154
|
+
"application/oebps-package+xml": ["opf"],
|
|
4155
|
+
"application/ogg": ["ogx"],
|
|
4156
|
+
"application/omdoc+xml": ["omdoc"],
|
|
4157
|
+
"application/onenote": [
|
|
4158
|
+
"onetoc",
|
|
4159
|
+
"onetoc2",
|
|
4160
|
+
"onetmp",
|
|
4161
|
+
"onepkg",
|
|
4162
|
+
"one",
|
|
4163
|
+
"onea"
|
|
4164
|
+
],
|
|
4165
|
+
"application/oxps": ["oxps"],
|
|
4166
|
+
"application/p2p-overlay+xml": ["relo"],
|
|
4167
|
+
"application/patch-ops-error+xml": ["xer"],
|
|
4168
|
+
"application/pdf": ["pdf"],
|
|
4169
|
+
"application/pgp-encrypted": ["pgp"],
|
|
4170
|
+
"application/pgp-keys": ["asc"],
|
|
4171
|
+
"application/pgp-signature": ["sig", "*asc"],
|
|
4172
|
+
"application/pics-rules": ["prf"],
|
|
4173
|
+
"application/pkcs10": ["p10"],
|
|
4174
|
+
"application/pkcs7-mime": ["p7m", "p7c"],
|
|
4175
|
+
"application/pkcs7-signature": ["p7s"],
|
|
4176
|
+
"application/pkcs8": ["p8"],
|
|
4177
|
+
"application/pkix-attr-cert": ["ac"],
|
|
4178
|
+
"application/pkix-cert": ["cer"],
|
|
4179
|
+
"application/pkix-crl": ["crl"],
|
|
4180
|
+
"application/pkix-pkipath": ["pkipath"],
|
|
4181
|
+
"application/pkixcmp": ["pki"],
|
|
4182
|
+
"application/pls+xml": ["pls"],
|
|
4183
|
+
"application/postscript": ["ai", "eps", "ps"],
|
|
4184
|
+
"application/provenance+xml": ["provx"],
|
|
4185
|
+
"application/pskc+xml": ["pskcxml"],
|
|
4186
|
+
"application/raml+yaml": ["raml"],
|
|
4187
|
+
"application/rdf+xml": ["rdf", "owl"],
|
|
4188
|
+
"application/reginfo+xml": ["rif"],
|
|
4189
|
+
"application/relax-ng-compact-syntax": ["rnc"],
|
|
4190
|
+
"application/resource-lists+xml": ["rl"],
|
|
4191
|
+
"application/resource-lists-diff+xml": ["rld"],
|
|
4192
|
+
"application/rls-services+xml": ["rs"],
|
|
4193
|
+
"application/route-apd+xml": ["rapd"],
|
|
4194
|
+
"application/route-s-tsid+xml": ["sls"],
|
|
4195
|
+
"application/route-usd+xml": ["rusd"],
|
|
4196
|
+
"application/rpki-ghostbusters": ["gbr"],
|
|
4197
|
+
"application/rpki-manifest": ["mft"],
|
|
4198
|
+
"application/rpki-roa": ["roa"],
|
|
4199
|
+
"application/rsd+xml": ["rsd"],
|
|
4200
|
+
"application/rss+xml": ["rss"],
|
|
4201
|
+
"application/rtf": ["rtf"],
|
|
4202
|
+
"application/sbml+xml": ["sbml"],
|
|
4203
|
+
"application/scvp-cv-request": ["scq"],
|
|
4204
|
+
"application/scvp-cv-response": ["scs"],
|
|
4205
|
+
"application/scvp-vp-request": ["spq"],
|
|
4206
|
+
"application/scvp-vp-response": ["spp"],
|
|
4207
|
+
"application/sdp": ["sdp"],
|
|
4208
|
+
"application/senml+xml": ["senmlx"],
|
|
4209
|
+
"application/sensml+xml": ["sensmlx"],
|
|
4210
|
+
"application/set-payment-initiation": ["setpay"],
|
|
4211
|
+
"application/set-registration-initiation": ["setreg"],
|
|
4212
|
+
"application/shf+xml": ["shf"],
|
|
4213
|
+
"application/sieve": ["siv", "sieve"],
|
|
4214
|
+
"application/smil+xml": ["smi", "smil"],
|
|
4215
|
+
"application/sparql-query": ["rq"],
|
|
4216
|
+
"application/sparql-results+xml": ["srx"],
|
|
4217
|
+
"application/sql": ["sql"],
|
|
4218
|
+
"application/srgs": ["gram"],
|
|
4219
|
+
"application/srgs+xml": ["grxml"],
|
|
4220
|
+
"application/sru+xml": ["sru"],
|
|
4221
|
+
"application/ssdl+xml": ["ssdl"],
|
|
4222
|
+
"application/ssml+xml": ["ssml"],
|
|
4223
|
+
"application/swid+xml": ["swidtag"],
|
|
4224
|
+
"application/tei+xml": ["tei", "teicorpus"],
|
|
4225
|
+
"application/thraud+xml": ["tfi"],
|
|
4226
|
+
"application/timestamped-data": ["tsd"],
|
|
4227
|
+
"application/toml": ["toml"],
|
|
4228
|
+
"application/trig": ["trig"],
|
|
4229
|
+
"application/ttml+xml": ["ttml"],
|
|
4230
|
+
"application/ubjson": ["ubj"],
|
|
4231
|
+
"application/urc-ressheet+xml": ["rsheet"],
|
|
4232
|
+
"application/urc-targetdesc+xml": ["td"],
|
|
4233
|
+
"application/voicexml+xml": ["vxml"],
|
|
4234
|
+
"application/wasm": ["wasm"],
|
|
4235
|
+
"application/watcherinfo+xml": ["wif"],
|
|
4236
|
+
"application/widget": ["wgt"],
|
|
4237
|
+
"application/winhlp": ["hlp"],
|
|
4238
|
+
"application/wsdl+xml": ["wsdl"],
|
|
4239
|
+
"application/wspolicy+xml": ["wspolicy"],
|
|
4240
|
+
"application/xaml+xml": ["xaml"],
|
|
4241
|
+
"application/xcap-att+xml": ["xav"],
|
|
4242
|
+
"application/xcap-caps+xml": ["xca"],
|
|
4243
|
+
"application/xcap-diff+xml": ["xdf"],
|
|
4244
|
+
"application/xcap-el+xml": ["xel"],
|
|
4245
|
+
"application/xcap-ns+xml": ["xns"],
|
|
4246
|
+
"application/xenc+xml": ["xenc"],
|
|
4247
|
+
"application/xfdf": ["xfdf"],
|
|
4248
|
+
"application/xhtml+xml": ["xhtml", "xht"],
|
|
4249
|
+
"application/xliff+xml": ["xlf"],
|
|
4250
|
+
"application/xml": ["xml", "xsl", "xsd", "rng"],
|
|
4251
|
+
"application/xml-dtd": ["dtd"],
|
|
4252
|
+
"application/xop+xml": ["xop"],
|
|
4253
|
+
"application/xproc+xml": ["xpl"],
|
|
4254
|
+
"application/xslt+xml": ["*xsl", "xslt"],
|
|
4255
|
+
"application/xspf+xml": ["xspf"],
|
|
4256
|
+
"application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"],
|
|
4257
|
+
"application/yang": ["yang"],
|
|
4258
|
+
"application/yin+xml": ["yin"],
|
|
4259
|
+
"application/zip": ["zip"],
|
|
4260
|
+
"application/zip+dotlottie": ["lottie"],
|
|
4261
|
+
"audio/3gpp": ["*3gpp"],
|
|
4262
|
+
"audio/aac": ["adts", "aac"],
|
|
4263
|
+
"audio/adpcm": ["adp"],
|
|
4264
|
+
"audio/amr": ["amr"],
|
|
4265
|
+
"audio/basic": ["au", "snd"],
|
|
4266
|
+
"audio/midi": ["mid", "midi", "kar", "rmi"],
|
|
4267
|
+
"audio/mobile-xmf": ["mxmf"],
|
|
4268
|
+
"audio/mp3": ["*mp3"],
|
|
4269
|
+
"audio/mp4": ["m4a", "mp4a", "m4b"],
|
|
4270
|
+
"audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"],
|
|
4271
|
+
"audio/ogg": ["oga", "ogg", "spx", "opus"],
|
|
4272
|
+
"audio/s3m": ["s3m"],
|
|
4273
|
+
"audio/silk": ["sil"],
|
|
4274
|
+
"audio/wav": ["wav"],
|
|
4275
|
+
"audio/wave": ["*wav"],
|
|
4276
|
+
"audio/webm": ["weba"],
|
|
4277
|
+
"audio/xm": ["xm"],
|
|
4278
|
+
"font/collection": ["ttc"],
|
|
4279
|
+
"font/otf": ["otf"],
|
|
4280
|
+
"font/ttf": ["ttf"],
|
|
4281
|
+
"font/woff": ["woff"],
|
|
4282
|
+
"font/woff2": ["woff2"],
|
|
4283
|
+
"image/aces": ["exr"],
|
|
4284
|
+
"image/apng": ["apng"],
|
|
4285
|
+
"image/avci": ["avci"],
|
|
4286
|
+
"image/avcs": ["avcs"],
|
|
4287
|
+
"image/avif": ["avif"],
|
|
4288
|
+
"image/bmp": ["bmp", "dib"],
|
|
4289
|
+
"image/cgm": ["cgm"],
|
|
4290
|
+
"image/dicom-rle": ["drle"],
|
|
4291
|
+
"image/dpx": ["dpx"],
|
|
4292
|
+
"image/emf": ["emf"],
|
|
4293
|
+
"image/fits": ["fits"],
|
|
4294
|
+
"image/g3fax": ["g3"],
|
|
4295
|
+
"image/gif": ["gif"],
|
|
4296
|
+
"image/heic": ["heic"],
|
|
4297
|
+
"image/heic-sequence": ["heics"],
|
|
4298
|
+
"image/heif": ["heif"],
|
|
4299
|
+
"image/heif-sequence": ["heifs"],
|
|
4300
|
+
"image/hej2k": ["hej2"],
|
|
4301
|
+
"image/ief": ["ief"],
|
|
4302
|
+
"image/jaii": ["jaii"],
|
|
4303
|
+
"image/jais": ["jais"],
|
|
4304
|
+
"image/jls": ["jls"],
|
|
4305
|
+
"image/jp2": ["jp2", "jpg2"],
|
|
4306
|
+
"image/jpeg": ["jpg", "jpeg", "jpe"],
|
|
4307
|
+
"image/jph": ["jph"],
|
|
4308
|
+
"image/jphc": ["jhc"],
|
|
4309
|
+
"image/jpm": ["jpm", "jpgm"],
|
|
4310
|
+
"image/jpx": ["jpx", "jpf"],
|
|
4311
|
+
"image/jxl": ["jxl"],
|
|
4312
|
+
"image/jxr": ["jxr"],
|
|
4313
|
+
"image/jxra": ["jxra"],
|
|
4314
|
+
"image/jxrs": ["jxrs"],
|
|
4315
|
+
"image/jxs": ["jxs"],
|
|
4316
|
+
"image/jxsc": ["jxsc"],
|
|
4317
|
+
"image/jxsi": ["jxsi"],
|
|
4318
|
+
"image/jxss": ["jxss"],
|
|
4319
|
+
"image/ktx": ["ktx"],
|
|
4320
|
+
"image/ktx2": ["ktx2"],
|
|
4321
|
+
"image/pjpeg": ["jfif"],
|
|
4322
|
+
"image/png": ["png"],
|
|
4323
|
+
"image/sgi": ["sgi"],
|
|
4324
|
+
"image/svg+xml": ["svg", "svgz"],
|
|
4325
|
+
"image/t38": ["t38"],
|
|
4326
|
+
"image/tiff": ["tif", "tiff"],
|
|
4327
|
+
"image/tiff-fx": ["tfx"],
|
|
4328
|
+
"image/webp": ["webp"],
|
|
4329
|
+
"image/wmf": ["wmf"],
|
|
4330
|
+
"message/disposition-notification": ["disposition-notification"],
|
|
4331
|
+
"message/global": ["u8msg"],
|
|
4332
|
+
"message/global-delivery-status": ["u8dsn"],
|
|
4333
|
+
"message/global-disposition-notification": ["u8mdn"],
|
|
4334
|
+
"message/global-headers": ["u8hdr"],
|
|
4335
|
+
"message/rfc822": ["eml", "mime", "mht", "mhtml"],
|
|
4336
|
+
"model/3mf": ["3mf"],
|
|
4337
|
+
"model/gltf+json": ["gltf"],
|
|
4338
|
+
"model/gltf-binary": ["glb"],
|
|
4339
|
+
"model/iges": ["igs", "iges"],
|
|
4340
|
+
"model/jt": ["jt"],
|
|
4341
|
+
"model/mesh": ["msh", "mesh", "silo"],
|
|
4342
|
+
"model/mtl": ["mtl"],
|
|
4343
|
+
"model/obj": ["obj"],
|
|
4344
|
+
"model/prc": ["prc"],
|
|
4345
|
+
"model/step": ["step", "stp", "stpnc", "p21", "210"],
|
|
4346
|
+
"model/step+xml": ["stpx"],
|
|
4347
|
+
"model/step+zip": ["stpz"],
|
|
4348
|
+
"model/step-xml+zip": ["stpxz"],
|
|
4349
|
+
"model/stl": ["stl"],
|
|
4350
|
+
"model/u3d": ["u3d"],
|
|
4351
|
+
"model/vrml": ["wrl", "vrml"],
|
|
4352
|
+
"model/x3d+binary": ["*x3db", "x3dbz"],
|
|
4353
|
+
"model/x3d+fastinfoset": ["x3db"],
|
|
4354
|
+
"model/x3d+vrml": ["*x3dv", "x3dvz"],
|
|
4355
|
+
"model/x3d+xml": ["x3d", "x3dz"],
|
|
4356
|
+
"model/x3d-vrml": ["x3dv"],
|
|
4357
|
+
"text/cache-manifest": ["appcache", "manifest"],
|
|
4358
|
+
"text/calendar": ["ics", "ifb"],
|
|
4359
|
+
"text/coffeescript": ["coffee", "litcoffee"],
|
|
4360
|
+
"text/css": ["css"],
|
|
4361
|
+
"text/csv": ["csv"],
|
|
4362
|
+
"text/html": ["html", "htm", "shtml"],
|
|
4363
|
+
"text/jade": ["jade"],
|
|
4364
|
+
"text/javascript": ["js", "mjs"],
|
|
4365
|
+
"text/jsx": ["jsx"],
|
|
4366
|
+
"text/less": ["less"],
|
|
4367
|
+
"text/markdown": ["md", "markdown"],
|
|
4368
|
+
"text/mathml": ["mml"],
|
|
4369
|
+
"text/mdx": ["mdx"],
|
|
4370
|
+
"text/n3": ["n3"],
|
|
4371
|
+
"text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"],
|
|
4372
|
+
"text/richtext": ["rtx"],
|
|
4373
|
+
"text/rtf": ["*rtf"],
|
|
4374
|
+
"text/sgml": ["sgml", "sgm"],
|
|
4375
|
+
"text/shex": ["shex"],
|
|
4376
|
+
"text/slim": ["slim", "slm"],
|
|
4377
|
+
"text/spdx": ["spdx"],
|
|
4378
|
+
"text/stylus": ["stylus", "styl"],
|
|
4379
|
+
"text/tab-separated-values": ["tsv"],
|
|
4380
|
+
"text/troff": ["t", "tr", "roff", "man", "me", "ms"],
|
|
4381
|
+
"text/turtle": ["ttl"],
|
|
4382
|
+
"text/uri-list": ["uri", "uris", "urls"],
|
|
4383
|
+
"text/vcard": ["vcard"],
|
|
4384
|
+
"text/vtt": ["vtt"],
|
|
4385
|
+
"text/wgsl": ["wgsl"],
|
|
4386
|
+
"text/xml": ["*xml"],
|
|
4387
|
+
"text/yaml": ["yaml", "yml"],
|
|
4388
|
+
"video/3gpp": ["3gp", "3gpp"],
|
|
4389
|
+
"video/3gpp2": ["3g2"],
|
|
4390
|
+
"video/h261": ["h261"],
|
|
4391
|
+
"video/h263": ["h263"],
|
|
4392
|
+
"video/h264": ["h264"],
|
|
4393
|
+
"video/iso.segment": ["m4s"],
|
|
4394
|
+
"video/jpeg": ["jpgv"],
|
|
4395
|
+
"video/jpm": ["*jpm", "*jpgm"],
|
|
4396
|
+
"video/mj2": ["mj2", "mjp2"],
|
|
4397
|
+
"video/mp2t": ["ts", "m2t", "m2ts", "mts"],
|
|
4398
|
+
"video/mp4": ["mp4", "mp4v", "mpg4"],
|
|
4399
|
+
"video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"],
|
|
4400
|
+
"video/ogg": ["ogv"],
|
|
4401
|
+
"video/quicktime": ["qt", "mov"],
|
|
4402
|
+
"video/webm": ["webm"]
|
|
4403
|
+
};
|
|
4404
|
+
Object.freeze(types2);
|
|
4405
|
+
var standard_default = types2;
|
|
4406
|
+
|
|
4407
|
+
// ../../node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/Mime.js
|
|
4408
|
+
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
4409
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4410
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4411
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4412
|
+
};
|
|
4413
|
+
var _Mime_extensionToType;
|
|
4414
|
+
var _Mime_typeToExtension;
|
|
4415
|
+
var _Mime_typeToExtensions;
|
|
4416
|
+
var Mime = class {
|
|
4417
|
+
constructor(...args) {
|
|
4418
|
+
_Mime_extensionToType.set(this, /* @__PURE__ */ new Map());
|
|
4419
|
+
_Mime_typeToExtension.set(this, /* @__PURE__ */ new Map());
|
|
4420
|
+
_Mime_typeToExtensions.set(this, /* @__PURE__ */ new Map());
|
|
4421
|
+
for (const arg of args) {
|
|
4422
|
+
this.define(arg);
|
|
4423
|
+
}
|
|
4424
|
+
}
|
|
4425
|
+
define(typeMap, force = false) {
|
|
4426
|
+
for (let [type, extensions] of Object.entries(typeMap)) {
|
|
4427
|
+
type = type.toLowerCase();
|
|
4428
|
+
extensions = extensions.map((ext) => ext.toLowerCase());
|
|
4429
|
+
if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type)) {
|
|
4430
|
+
__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type, /* @__PURE__ */ new Set());
|
|
4431
|
+
}
|
|
4432
|
+
const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type);
|
|
4433
|
+
let first = true;
|
|
4434
|
+
for (let extension of extensions) {
|
|
4435
|
+
const starred = extension.startsWith("*");
|
|
4436
|
+
extension = starred ? extension.slice(1) : extension;
|
|
4437
|
+
allExtensions?.add(extension);
|
|
4438
|
+
if (first) {
|
|
4439
|
+
__classPrivateFieldGet(this, _Mime_typeToExtension, "f").set(type, extension);
|
|
4440
|
+
}
|
|
4441
|
+
first = false;
|
|
4442
|
+
if (starred)
|
|
4443
|
+
continue;
|
|
4444
|
+
const currentType = __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(extension);
|
|
4445
|
+
if (currentType && currentType != type && !force) {
|
|
4446
|
+
throw new Error(`"${type} -> ${extension}" conflicts with "${currentType} -> ${extension}". Pass \`force=true\` to override this definition.`);
|
|
4447
|
+
}
|
|
4448
|
+
__classPrivateFieldGet(this, _Mime_extensionToType, "f").set(extension, type);
|
|
4449
|
+
}
|
|
4450
|
+
}
|
|
4451
|
+
return this;
|
|
4452
|
+
}
|
|
4453
|
+
getType(path8) {
|
|
4454
|
+
if (typeof path8 !== "string")
|
|
4455
|
+
return null;
|
|
4456
|
+
const last = path8.replace(/^.*[/\\]/s, "").toLowerCase();
|
|
4457
|
+
const ext = last.replace(/^.*\./s, "").toLowerCase();
|
|
4458
|
+
const hasPath = last.length < path8.length;
|
|
4459
|
+
const hasDot = ext.length < last.length - 1;
|
|
4460
|
+
if (!hasDot && hasPath)
|
|
4461
|
+
return null;
|
|
4462
|
+
return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
|
|
4463
|
+
}
|
|
4464
|
+
getExtension(type) {
|
|
4465
|
+
if (typeof type !== "string")
|
|
4466
|
+
return null;
|
|
4467
|
+
type = type?.split?.(";")[0];
|
|
4468
|
+
return (type && __classPrivateFieldGet(this, _Mime_typeToExtension, "f").get(type.trim().toLowerCase())) ?? null;
|
|
4469
|
+
}
|
|
4470
|
+
getAllExtensions(type) {
|
|
4471
|
+
if (typeof type !== "string")
|
|
4472
|
+
return null;
|
|
4473
|
+
return __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type.toLowerCase()) ?? null;
|
|
4474
|
+
}
|
|
4475
|
+
_freeze() {
|
|
4476
|
+
this.define = () => {
|
|
4477
|
+
throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
|
|
4478
|
+
};
|
|
4479
|
+
Object.freeze(this);
|
|
4480
|
+
for (const extensions of __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").values()) {
|
|
4481
|
+
Object.freeze(extensions);
|
|
4482
|
+
}
|
|
4483
|
+
return this;
|
|
4484
|
+
}
|
|
4485
|
+
_getTestState() {
|
|
4486
|
+
return {
|
|
4487
|
+
types: __classPrivateFieldGet(this, _Mime_extensionToType, "f"),
|
|
4488
|
+
extensions: __classPrivateFieldGet(this, _Mime_typeToExtension, "f")
|
|
4489
|
+
};
|
|
4490
|
+
}
|
|
4491
|
+
};
|
|
4492
|
+
_Mime_extensionToType = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtension = /* @__PURE__ */ new WeakMap(), _Mime_typeToExtensions = /* @__PURE__ */ new WeakMap();
|
|
4493
|
+
var Mime_default = Mime;
|
|
4494
|
+
|
|
4495
|
+
// ../../node_modules/.pnpm/mime@4.1.0/node_modules/mime/dist/src/index.js
|
|
4496
|
+
var src_default = new Mime_default(standard_default, other_default)._freeze();
|
|
4358
4497
|
|
|
4359
|
-
// src/
|
|
4360
|
-
function
|
|
4361
|
-
const
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
tag: "script",
|
|
4378
|
-
children: `window.__KIRU_DEVTOOLS_PATHNAME__ = "${dtClientPathname}";`
|
|
4379
|
-
},
|
|
4380
|
-
{
|
|
4381
|
-
tag: "script",
|
|
4382
|
-
attrs: {
|
|
4383
|
-
type: "module",
|
|
4384
|
-
src: dtHostScriptPath
|
|
4498
|
+
// src/preview-server.ts
|
|
4499
|
+
function createPreviewMiddleware(projectRoot, baseOutDir) {
|
|
4500
|
+
const clientOutDir = resolve(projectRoot, `${baseOutDir}/client`);
|
|
4501
|
+
return async (req, res, next) => {
|
|
4502
|
+
try {
|
|
4503
|
+
let url = req.url || "/";
|
|
4504
|
+
let filePath = path4.join(clientOutDir, url);
|
|
4505
|
+
const extName = path4.extname(filePath);
|
|
4506
|
+
if (extName && extName !== ".html") {
|
|
4507
|
+
return next();
|
|
4508
|
+
}
|
|
4509
|
+
if (url.endsWith("/")) {
|
|
4510
|
+
filePath = path4.join(filePath, "index.html");
|
|
4511
|
+
}
|
|
4512
|
+
if (!path4.extname(filePath) && !url.endsWith("/")) {
|
|
4513
|
+
const htmlCandidate = filePath + ".html";
|
|
4514
|
+
if (fs3.existsSync(htmlCandidate)) {
|
|
4515
|
+
filePath = htmlCandidate;
|
|
4385
4516
|
}
|
|
4386
4517
|
}
|
|
4387
|
-
|
|
4518
|
+
if (!fs3.existsSync(filePath)) {
|
|
4519
|
+
const normalizedUrl = url.replace(/\/$/, "") || "/";
|
|
4520
|
+
const urlSegments = normalizedUrl.split("/").filter(Boolean);
|
|
4521
|
+
let found404 = false;
|
|
4522
|
+
for (let i = urlSegments.length; i >= 0; i--) {
|
|
4523
|
+
const parentSegments = urlSegments.slice(0, i);
|
|
4524
|
+
const fourOhFourPath = "/" + [...parentSegments, "404"].join("/");
|
|
4525
|
+
const fourOhFourFilePath = path4.join(
|
|
4526
|
+
clientOutDir,
|
|
4527
|
+
fourOhFourPath + ".html"
|
|
4528
|
+
);
|
|
4529
|
+
if (fs3.existsSync(fourOhFourFilePath)) {
|
|
4530
|
+
filePath = fourOhFourFilePath;
|
|
4531
|
+
found404 = true;
|
|
4532
|
+
break;
|
|
4533
|
+
}
|
|
4534
|
+
}
|
|
4535
|
+
if (!found404) {
|
|
4536
|
+
res.statusCode = 404;
|
|
4537
|
+
res.end("Not Found");
|
|
4538
|
+
return;
|
|
4539
|
+
}
|
|
4540
|
+
}
|
|
4541
|
+
const type = src_default.getType(filePath) ?? "application/octet-stream";
|
|
4542
|
+
const content = fs3.readFileSync(filePath);
|
|
4543
|
+
const is404Page = filePath.includes("/404.html");
|
|
4544
|
+
res.statusCode = is404Page ? 404 : 200;
|
|
4545
|
+
res.setHeader("Content-Type", type);
|
|
4546
|
+
res.end(content);
|
|
4547
|
+
} catch (err) {
|
|
4548
|
+
next(err);
|
|
4549
|
+
}
|
|
4388
4550
|
};
|
|
4389
4551
|
}
|
|
4390
4552
|
|
|
4391
4553
|
// src/ssg.ts
|
|
4392
|
-
import
|
|
4554
|
+
import path5 from "node:path";
|
|
4393
4555
|
import fs4, { globSync } from "node:fs";
|
|
4394
4556
|
import { pathToFileURL } from "node:url";
|
|
4395
4557
|
async function generateStaticSite(state, outputOptions, bundle, log) {
|
|
4396
4558
|
const { projectRoot, baseOutDir, manifestPath } = state;
|
|
4397
|
-
const outDirAbs =
|
|
4559
|
+
const outDirAbs = path5.resolve(projectRoot, outputOptions?.dir ?? "dist");
|
|
4398
4560
|
const ssrEntry = Object.values(bundle).find(
|
|
4399
4561
|
(c) => c.type === "chunk" && c.isEntry
|
|
4400
4562
|
);
|
|
4401
4563
|
if (!ssrEntry) return;
|
|
4402
|
-
const ssrEntryAbs =
|
|
4564
|
+
const ssrEntryAbs = path5.resolve(outDirAbs, ssrEntry.fileName);
|
|
4403
4565
|
const mod = await import(pathToFileURL(ssrEntryAbs).href);
|
|
4404
4566
|
const paths = await mod.generateStaticPaths();
|
|
4405
|
-
const clientOutDirAbs =
|
|
4567
|
+
const clientOutDirAbs = path5.resolve(projectRoot, `${baseOutDir}/client`);
|
|
4406
4568
|
const { clientEntry, cssLinks } = await getClientAssets(
|
|
4407
4569
|
clientOutDirAbs,
|
|
4408
4570
|
manifestPath
|
|
@@ -4433,7 +4595,7 @@ async function generateStaticSite(state, outputOptions, bundle, log) {
|
|
|
4433
4595
|
);
|
|
4434
4596
|
const filePath = getOutputPath(clientOutDirAbs, route);
|
|
4435
4597
|
log(ANSI.cyan("[SSG]"), "write:", ANSI.black(filePath));
|
|
4436
|
-
fs4.mkdirSync(
|
|
4598
|
+
fs4.mkdirSync(path5.dirname(filePath), { recursive: true });
|
|
4437
4599
|
fs4.writeFileSync(filePath, html, "utf-8");
|
|
4438
4600
|
})
|
|
4439
4601
|
);
|
|
@@ -4444,7 +4606,7 @@ async function getClientAssets(clientOutDirAbs, manifestPath) {
|
|
|
4444
4606
|
let clientEntry = null;
|
|
4445
4607
|
let cssLinks = "";
|
|
4446
4608
|
try {
|
|
4447
|
-
const clientManifestPath =
|
|
4609
|
+
const clientManifestPath = path5.resolve(clientOutDirAbs, manifestPath);
|
|
4448
4610
|
if (fs4.existsSync(clientManifestPath)) {
|
|
4449
4611
|
const manifest = JSON.parse(fs4.readFileSync(clientManifestPath, "utf-8"));
|
|
4450
4612
|
const clientEntryKey = "virtual:kiru:entry-client";
|
|
@@ -4481,7 +4643,7 @@ function findClientEntry(dir) {
|
|
|
4481
4643
|
const top = fs4.readdirSync(dir);
|
|
4482
4644
|
const topJs = top.find((f) => f.endsWith(".js"));
|
|
4483
4645
|
if (topJs) return topJs;
|
|
4484
|
-
const assetsDir =
|
|
4646
|
+
const assetsDir = path5.join(dir, "assets");
|
|
4485
4647
|
if (fs4.existsSync(assetsDir)) {
|
|
4486
4648
|
const assetJs = fs4.readdirSync(assetsDir).find((f) => f.endsWith(".js"));
|
|
4487
4649
|
return assetJs ? `assets/${assetJs}` : null;
|
|
@@ -4508,24 +4670,24 @@ async function renderRoute(state, mod, route, srcFilePath, clientEntry, cssLinks
|
|
|
4508
4670
|
}
|
|
4509
4671
|
function getOutputPath(clientOutDirAbs, route) {
|
|
4510
4672
|
if (route === "/") {
|
|
4511
|
-
return
|
|
4673
|
+
return path5.resolve(clientOutDirAbs, "index.html");
|
|
4512
4674
|
}
|
|
4513
4675
|
const parts = route.replace(/^\//, "").split("/").filter(Boolean);
|
|
4514
4676
|
if (parts.length === 1) {
|
|
4515
|
-
return
|
|
4677
|
+
return path5.resolve(clientOutDirAbs, `${parts[0]}.html`);
|
|
4516
4678
|
}
|
|
4517
|
-
const dirPath =
|
|
4679
|
+
const dirPath = path5.resolve(clientOutDirAbs, parts.slice(0, -1).join("/"));
|
|
4518
4680
|
let last = parts[parts.length - 1];
|
|
4519
4681
|
if (last.endsWith("*")) {
|
|
4520
4682
|
last = last.slice(0, -1);
|
|
4521
4683
|
}
|
|
4522
|
-
return
|
|
4684
|
+
return path5.resolve(dirPath, `${last}.html`);
|
|
4523
4685
|
}
|
|
4524
4686
|
async function appendStaticPropsToClientModules(state, clientOutDirAbs, log) {
|
|
4525
4687
|
const { projectRoot, manifestPath, ssgOptions } = state;
|
|
4526
4688
|
try {
|
|
4527
4689
|
log(ANSI.cyan("[SSG]"), "Starting static props collection...");
|
|
4528
|
-
const clientManifestPath =
|
|
4690
|
+
const clientManifestPath = path5.resolve(clientOutDirAbs, manifestPath);
|
|
4529
4691
|
if (!fs4.existsSync(clientManifestPath)) {
|
|
4530
4692
|
log(
|
|
4531
4693
|
ANSI.yellow("[SSG]"),
|
|
@@ -4559,7 +4721,7 @@ async function appendStaticPropsToClientModules(state, clientOutDirAbs, log) {
|
|
|
4559
4721
|
log(ANSI.red(`failed to get manifest chunk for module "${moduleId}"`));
|
|
4560
4722
|
return;
|
|
4561
4723
|
}
|
|
4562
|
-
const filePath =
|
|
4724
|
+
const filePath = path5.resolve(clientOutDirAbs, chunk.file);
|
|
4563
4725
|
const code = `export const __KIRU_STATIC_PROPS__ = ${JSON.stringify(
|
|
4564
4726
|
staticProps
|
|
4565
4727
|
)};`;
|
|
@@ -4573,159 +4735,6 @@ ${code}`, "utf-8");
|
|
|
4573
4735
|
}
|
|
4574
4736
|
}
|
|
4575
4737
|
|
|
4576
|
-
// src/config.ts
|
|
4577
|
-
import path5 from "node:path";
|
|
4578
|
-
var defaultEsBuildOptions = {
|
|
4579
|
-
jsxInject: `import { createElement as _jsx, Fragment as _jsxFragment } from "kiru"`,
|
|
4580
|
-
jsx: "transform",
|
|
4581
|
-
jsxFactory: "_jsx",
|
|
4582
|
-
jsxFragment: "_jsxFragment",
|
|
4583
|
-
loader: "tsx",
|
|
4584
|
-
include: ["**/*.tsx", "**/*.ts", "**/*.jsx", "**/*.js"]
|
|
4585
|
-
};
|
|
4586
|
-
var defaultSSGOptions = {
|
|
4587
|
-
baseUrl: "/",
|
|
4588
|
-
dir: "src/pages",
|
|
4589
|
-
document: "document.tsx",
|
|
4590
|
-
page: "index.{tsx,jsx}",
|
|
4591
|
-
layout: "layout.{tsx,jsx}",
|
|
4592
|
-
transition: false,
|
|
4593
|
-
build: {
|
|
4594
|
-
maxConcurrentRenders: 100
|
|
4595
|
-
}
|
|
4596
|
-
};
|
|
4597
|
-
function createPluginState(opts = {}) {
|
|
4598
|
-
let fileLinkFormatter = (path7, line) => `vscode://file/${path7}:${line}`;
|
|
4599
|
-
let dtClientPathname = "/__devtools__";
|
|
4600
|
-
if (typeof opts.devtools === "object") {
|
|
4601
|
-
dtClientPathname = opts.devtools.dtClientPathname ?? dtClientPathname;
|
|
4602
|
-
fileLinkFormatter = opts.devtools.formatFileLink ?? fileLinkFormatter;
|
|
4603
|
-
}
|
|
4604
|
-
if (!dtClientPathname.startsWith("/")) {
|
|
4605
|
-
throw new Error(
|
|
4606
|
-
"[vite-plugin-kiru]: devtools.dtClientPathname must start with '/'"
|
|
4607
|
-
);
|
|
4608
|
-
}
|
|
4609
|
-
const state = {
|
|
4610
|
-
projectRoot: process.cwd().replace(/\\/g, "/"),
|
|
4611
|
-
includedPaths: [],
|
|
4612
|
-
fileLinkFormatter,
|
|
4613
|
-
dtClientPathname,
|
|
4614
|
-
dtHostScriptPath: "/__devtools_host__.js",
|
|
4615
|
-
manifestPath: "vite-manifest.json",
|
|
4616
|
-
loggingEnabled: opts.loggingEnabled === true,
|
|
4617
|
-
ssgOptions: null
|
|
4618
|
-
};
|
|
4619
|
-
const { ssg } = opts;
|
|
4620
|
-
if (!ssg) return state;
|
|
4621
|
-
if (ssg === true) {
|
|
4622
|
-
return {
|
|
4623
|
-
...state,
|
|
4624
|
-
ssgOptions: defaultSSGOptions
|
|
4625
|
-
};
|
|
4626
|
-
}
|
|
4627
|
-
if (ssg.baseUrl && !ssg.baseUrl.startsWith("/")) {
|
|
4628
|
-
throw new Error("[vite-plugin-kiru]: ssg.baseUrl must start with '/'");
|
|
4629
|
-
}
|
|
4630
|
-
const {
|
|
4631
|
-
baseUrl,
|
|
4632
|
-
dir,
|
|
4633
|
-
document,
|
|
4634
|
-
page,
|
|
4635
|
-
layout,
|
|
4636
|
-
transition,
|
|
4637
|
-
build: { maxConcurrentRenders }
|
|
4638
|
-
} = defaultSSGOptions;
|
|
4639
|
-
return {
|
|
4640
|
-
...state,
|
|
4641
|
-
ssgOptions: {
|
|
4642
|
-
...ssg,
|
|
4643
|
-
baseUrl: ssg.baseUrl ?? baseUrl,
|
|
4644
|
-
dir: ssg.dir ?? dir,
|
|
4645
|
-
document: ssg.document ?? document,
|
|
4646
|
-
page: ssg.page ?? page,
|
|
4647
|
-
layout: ssg.layout ?? layout,
|
|
4648
|
-
transition: ssg.transition ?? transition,
|
|
4649
|
-
build: {
|
|
4650
|
-
maxConcurrentRenders: ssg.build?.maxConcurrentRenders ?? maxConcurrentRenders
|
|
4651
|
-
}
|
|
4652
|
-
}
|
|
4653
|
-
};
|
|
4654
|
-
}
|
|
4655
|
-
function createViteConfig(config, opts) {
|
|
4656
|
-
if (!opts.ssg) {
|
|
4657
|
-
return {
|
|
4658
|
-
...config,
|
|
4659
|
-
esbuild: {
|
|
4660
|
-
...defaultEsBuildOptions,
|
|
4661
|
-
...config.esbuild
|
|
4662
|
-
}
|
|
4663
|
-
};
|
|
4664
|
-
}
|
|
4665
|
-
const isSsrBuild = config.build?.ssr;
|
|
4666
|
-
const rollup = config.build?.rollupOptions ?? {};
|
|
4667
|
-
let input = rollup.input;
|
|
4668
|
-
if (!input) {
|
|
4669
|
-
input = isSsrBuild ? VIRTUAL_ENTRY_SERVER_ID : VIRTUAL_ENTRY_CLIENT_ID;
|
|
4670
|
-
}
|
|
4671
|
-
const ssr = isSsrBuild === true ? true : config.build?.ssr;
|
|
4672
|
-
const baseOut = config.build?.outDir ?? "dist";
|
|
4673
|
-
const desiredOutDir = isSsrBuild ? `${baseOut}/server` : `${baseOut}/client`;
|
|
4674
|
-
return {
|
|
4675
|
-
...config,
|
|
4676
|
-
appType: "custom",
|
|
4677
|
-
esbuild: {
|
|
4678
|
-
...defaultEsBuildOptions,
|
|
4679
|
-
...config.esbuild
|
|
4680
|
-
},
|
|
4681
|
-
server: {},
|
|
4682
|
-
build: {
|
|
4683
|
-
...config.build,
|
|
4684
|
-
ssr,
|
|
4685
|
-
manifest: "vite-manifest.json",
|
|
4686
|
-
ssrEmitAssets: true,
|
|
4687
|
-
ssrManifest: true,
|
|
4688
|
-
outDir: desiredOutDir,
|
|
4689
|
-
rollupOptions: {
|
|
4690
|
-
...rollup,
|
|
4691
|
-
input
|
|
4692
|
-
}
|
|
4693
|
-
}
|
|
4694
|
-
};
|
|
4695
|
-
}
|
|
4696
|
-
function updatePluginState(state, config, opts) {
|
|
4697
|
-
const isProduction = config.isProduction ?? false;
|
|
4698
|
-
const isBuild = config.command === "build";
|
|
4699
|
-
const isSSRBuild = !!config.build?.ssr;
|
|
4700
|
-
const devtoolsEnabled = opts.devtools !== false && !isBuild && !isProduction;
|
|
4701
|
-
const projectRoot = config.root.replace(/\\/g, "/") ?? process.cwd().replace(/\\/g, "/");
|
|
4702
|
-
const includedPaths = (opts.include ?? []).map(
|
|
4703
|
-
(p) => path5.resolve(projectRoot, p).replace(/\\/g, "/")
|
|
4704
|
-
);
|
|
4705
|
-
const outDir = config.build.outDir ?? "dist";
|
|
4706
|
-
const normalizedOut = outDir.replace(/\\/g, "/");
|
|
4707
|
-
const baseOutDir = normalizedOut.replace(/\/(server|client)$/i, "") || "dist";
|
|
4708
|
-
return {
|
|
4709
|
-
...state,
|
|
4710
|
-
isProduction,
|
|
4711
|
-
isBuild,
|
|
4712
|
-
isSSRBuild,
|
|
4713
|
-
devtoolsEnabled,
|
|
4714
|
-
projectRoot,
|
|
4715
|
-
includedPaths,
|
|
4716
|
-
outDir,
|
|
4717
|
-
baseOutDir,
|
|
4718
|
-
// Ensure all required fields are present
|
|
4719
|
-
loggingEnabled: state.loggingEnabled ?? false,
|
|
4720
|
-
fileLinkFormatter: state.fileLinkFormatter,
|
|
4721
|
-
dtClientPathname: state.dtClientPathname,
|
|
4722
|
-
dtHostScriptPath: state.dtHostScriptPath,
|
|
4723
|
-
manifestPath: state.manifestPath,
|
|
4724
|
-
ssgOptions: state.ssgOptions,
|
|
4725
|
-
staticProps: {}
|
|
4726
|
-
};
|
|
4727
|
-
}
|
|
4728
|
-
|
|
4729
4738
|
// src/utils.ts
|
|
4730
4739
|
import path6 from "node:path";
|
|
4731
4740
|
import fs5 from "node:fs";
|
|
@@ -4811,6 +4820,11 @@ function kiru(opts = {}) {
|
|
|
4811
4820
|
server.middlewares.use(async (req, res, next) => {
|
|
4812
4821
|
try {
|
|
4813
4822
|
const url = req.originalUrl || req.url || "/";
|
|
4823
|
+
const filePath = path7.join(state.baseOutDir, "client", url);
|
|
4824
|
+
const extName = path7.extname(filePath);
|
|
4825
|
+
if (extName && extName !== ".html") {
|
|
4826
|
+
return next();
|
|
4827
|
+
}
|
|
4814
4828
|
const accept = req.headers["accept"] || "";
|
|
4815
4829
|
if (typeof accept === "string" && accept.includes("text/html") && !url.startsWith("/node_modules/") && !url.startsWith("/@") && !url.startsWith(dtHostScriptPath) && !url.startsWith(dtClientPathname)) {
|
|
4816
4830
|
const { status, html, stream } = await handleSSR(
|