@kong-ui-public/analytics-utilities 10.1.5 → 10.1.6-pr.2342.1fd456895.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/package.json +1 -1
  2. package/dist/types/constants.d.ts +0 -2
  3. package/dist/types/constants.d.ts.map +0 -1
  4. package/dist/types/dashboardSchema.d.ts +0 -2978
  5. package/dist/types/dashboardSchema.d.ts.map +0 -1
  6. package/dist/types/dashboardSchema.v2.d.ts +0 -2976
  7. package/dist/types/dashboardSchema.v2.d.ts.map +0 -1
  8. package/dist/types/filters.d.ts +0 -3
  9. package/dist/types/filters.d.ts.map +0 -1
  10. package/dist/types/format.d.ts +0 -15
  11. package/dist/types/format.d.ts.map +0 -1
  12. package/dist/types/format.spec.tz.d.ts +0 -2
  13. package/dist/types/format.spec.tz.d.ts.map +0 -1
  14. package/dist/types/granularity.d.ts +0 -27
  15. package/dist/types/granularity.d.ts.map +0 -1
  16. package/dist/types/index.d.ts +0 -11
  17. package/dist/types/index.d.ts.map +0 -1
  18. package/dist/types/queryTime.d.ts +0 -36
  19. package/dist/types/queryTime.d.ts.map +0 -1
  20. package/dist/types/queryTime.spec.tz.d.ts +0 -2
  21. package/dist/types/queryTime.spec.tz.d.ts.map +0 -1
  22. package/dist/types/specUtils.d.ts +0 -3
  23. package/dist/types/specUtils.d.ts.map +0 -1
  24. package/dist/types/timeframes.d.ts +0 -33
  25. package/dist/types/timeframes.d.ts.map +0 -1
  26. package/dist/types/types/analytics-config.d.ts +0 -23
  27. package/dist/types/types/analytics-config.d.ts.map +0 -1
  28. package/dist/types/types/chart-types.d.ts +0 -3
  29. package/dist/types/types/chart-types.d.ts.map +0 -1
  30. package/dist/types/types/datepicker-selection.d.ts +0 -6
  31. package/dist/types/types/datepicker-selection.d.ts.map +0 -1
  32. package/dist/types/types/druid-granularity.d.ts +0 -6
  33. package/dist/types/types/druid-granularity.d.ts.map +0 -1
  34. package/dist/types/types/explore/advanced.d.ts +0 -20
  35. package/dist/types/types/explore/advanced.d.ts.map +0 -1
  36. package/dist/types/types/explore/ai.d.ts +0 -20
  37. package/dist/types/types/explore/ai.d.ts.map +0 -1
  38. package/dist/types/types/explore/all.d.ts +0 -18
  39. package/dist/types/types/explore/all.d.ts.map +0 -1
  40. package/dist/types/types/explore/basic.d.ts +0 -31
  41. package/dist/types/types/explore/basic.d.ts.map +0 -1
  42. package/dist/types/types/explore/common.d.ts +0 -34
  43. package/dist/types/types/explore/common.d.ts.map +0 -1
  44. package/dist/types/types/explore/index.d.ts +0 -8
  45. package/dist/types/types/explore/index.d.ts.map +0 -1
  46. package/dist/types/types/explore/requests.d.ts +0 -57
  47. package/dist/types/types/explore/requests.d.ts.map +0 -1
  48. package/dist/types/types/explore/result.d.ts +0 -48
  49. package/dist/types/types/explore/result.d.ts.map +0 -1
  50. package/dist/types/types/explore/util.d.ts +0 -8
  51. package/dist/types/types/explore/util.d.ts.map +0 -1
  52. package/dist/types/types/index.d.ts +0 -12
  53. package/dist/types/types/index.d.ts.map +0 -1
  54. package/dist/types/types/query-bridge.d.ts +0 -25
  55. package/dist/types/types/query-bridge.d.ts.map +0 -1
  56. package/dist/types/types/query-time.d.ts +0 -13
  57. package/dist/types/types/query-time.d.ts.map +0 -1
  58. package/dist/types/types/time-period.d.ts +0 -9
  59. package/dist/types/types/time-period.d.ts.map +0 -1
  60. package/dist/types/types/timeframe-keys.d.ts +0 -16
  61. package/dist/types/types/timeframe-keys.d.ts.map +0 -1
  62. package/dist/types/types/timeframe-options.d.ts +0 -16
  63. package/dist/types/types/timeframe-options.d.ts.map +0 -1
  64. package/dist/types/types/timeframe.d.ts +0 -17
  65. package/dist/types/types/timeframe.d.ts.map +0 -1
  66. package/dist/types/utils/SeedRandom.d.ts +0 -6
  67. package/dist/types/utils/SeedRandom.d.ts.map +0 -1
  68. package/dist/types/utils/chartDataGenerator.d.ts +0 -9
  69. package/dist/types/utils/chartDataGenerator.d.ts.map +0 -1
  70. package/dist/types/utils/helpers.d.ts +0 -2
  71. package/dist/types/utils/helpers.d.ts.map +0 -1
  72. package/dist/types/utils/index.d.ts +0 -4
  73. package/dist/types/utils/index.d.ts.map +0 -1
  74. package/dist/vitals-utilities.cjs +0 -2
  75. package/dist/vitals-utilities.cjs.map +0 -1
  76. package/dist/vitals-utilities.es.js +0 -3978
  77. package/dist/vitals-utilities.es.js.map +0 -1
  78. package/dist/vitals-utilities.umd.js +0 -2
  79. package/dist/vitals-utilities.umd.js.map +0 -1
@@ -1,3978 +0,0 @@
1
- var _a = Object.defineProperty;
2
- var wa = (e, t, r) => t in e ? _a(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var b = (e, t, r) => wa(e, typeof t != "symbol" ? t + "" : t, r);
4
- const Vs = 3e4;
5
- var m = /* @__PURE__ */ ((e) => (e.FIFTEEN_MIN = "15m", e.ONE_HOUR = "1h", e.SIX_HOUR = "6h", e.TWELVE_HOUR = "12h", e.ONE_DAY = "24h", e.SEVEN_DAY = "7d", e.THIRTY_DAY = "30d", e.CURRENT_WEEK = "current_week", e.CURRENT_MONTH = "current_month", e.CURRENT_QUARTER = "current_quarter", e.PREVIOUS_WEEK = "previous_week", e.PREVIOUS_MONTH = "previous_month", e.PREVIOUS_QUARTER = "previous_quarter", e))(m || {});
6
- const Xs = [
7
- "horizontal_bar",
8
- "vertical_bar",
9
- "timeseries_line",
10
- "choropleth_map",
11
- "timeseries_bar",
12
- "donut",
13
- "single_value"
14
- ], lr = ["in", "not_in", "selector"], Qs = ["=", "!="], Zs = ["=", "!=", "<", ">", "<=", ">="], dr = ["empty", "not_empty"], Bs = ["starts_with", "ends_with"], Ks = ["absolute", "relative"], fr = [
15
- "15m",
16
- "1h",
17
- "6h",
18
- "12h",
19
- "24h",
20
- "7d",
21
- "current_week",
22
- "previous_week",
23
- "30d",
24
- "current_month",
25
- "previous_month"
26
- ], Ze = [
27
- "secondly",
28
- "tenSecondly",
29
- "thirtySecondly",
30
- "minutely",
31
- "fiveMinutely",
32
- "tenMinutely",
33
- "thirtyMinutely",
34
- "hourly",
35
- "twoHourly",
36
- "twelveHourly",
37
- "daily",
38
- "weekly",
39
- "trend"
40
- ], ce = (e) => e.filter((t) => t !== "time"), Ee = [
41
- "api",
42
- "api_product",
43
- "api_product_version",
44
- "control_plane",
45
- "control_plane_group",
46
- "data_plane_node",
47
- "gateway_service",
48
- "portal",
49
- "route",
50
- "status_code",
51
- "status_code_grouped",
52
- "time"
53
- ], re = ce(Ee), Be = [
54
- "active_services",
55
- "request_count",
56
- "request_per_minute",
57
- "response_latency_average"
58
- ], Ke = [
59
- ...Ee,
60
- "application",
61
- "consumer",
62
- "country_code",
63
- "iso_code",
64
- "upstream_status_code",
65
- "upstream_status_code_grouped",
66
- "response_source",
67
- "data_plane_node_version",
68
- "realm"
69
- ], ne = ce(Ke), hr = [
70
- ...Be,
71
- "response_latency_p99",
72
- "response_latency_p95",
73
- "response_latency_p50",
74
- "upstream_latency_p99",
75
- "upstream_latency_p95",
76
- "upstream_latency_p50",
77
- "upstream_latency_average",
78
- "kong_latency_p99",
79
- "kong_latency_p95",
80
- "kong_latency_p50",
81
- "kong_latency_average",
82
- "response_size_p99",
83
- "response_size_p95",
84
- "response_size_p50",
85
- "response_size_average",
86
- "response_size_sum",
87
- "request_size_p99",
88
- "request_size_p95",
89
- "request_size_p50",
90
- "request_size_average",
91
- "request_size_sum"
92
- ], Je = [
93
- "control_plane",
94
- "control_plane_group",
95
- "gateway_service",
96
- "consumer",
97
- "application",
98
- "route",
99
- "ai_provider",
100
- "ai_response_model",
101
- "ai_request_model",
102
- "llm_cache_status",
103
- "llm_embeddings_provider",
104
- "llm_embeddings_model",
105
- "time",
106
- "realm",
107
- "status_code",
108
- "status_code_grouped",
109
- "ai_plugin"
110
- ], ae = ce(Je), mr = [
111
- "total_tokens",
112
- "prompt_tokens",
113
- "completion_tokens",
114
- "ai_request_count",
115
- "cost",
116
- "llm_cache_embeddings_latency_average",
117
- "llm_cache_fetch_latency_average",
118
- "llm_latency_average",
119
- "llm_embeddings_tokens",
120
- "llm_embeddings_cost"
121
- ], ba = [
122
- "api",
123
- "api_product",
124
- "api_product_version",
125
- "application",
126
- "auth_type",
127
- "client_ip",
128
- "consumer",
129
- "consumer_group",
130
- "control_plane",
131
- "control_plane_group",
132
- "country_code",
133
- "data_plane_node",
134
- "data_plane_node_version",
135
- "gateway_service",
136
- "header_host",
137
- "header_user_agent",
138
- "http_method",
139
- "iso_code",
140
- "portal",
141
- "realm",
142
- "request_id",
143
- "request_uri",
144
- "response_header_content_type",
145
- "response_source",
146
- "route",
147
- "service_port",
148
- "service_protocol",
149
- "sse",
150
- "status_code_grouped",
151
- "time",
152
- "trace_id",
153
- "upstream_uri",
154
- "upstream_status_code_grouped",
155
- "websocket"
156
- ], Ta = ce(ba), Da = [
157
- "auth_type",
158
- "client_ip",
159
- "country_code",
160
- "data_plane_node_version",
161
- "header_host",
162
- "header_user_agent",
163
- "http_method",
164
- "request_id",
165
- "request_uri",
166
- "response_header_content_type",
167
- "response_source",
168
- "service_port",
169
- "service_protocol",
170
- "trace_id",
171
- "upstream_uri"
172
- ], Js = Da, Oa = [
173
- "ai_count",
174
- "latencies_response_ms",
175
- "latencies_upstream_ms",
176
- "latencies_kong_gateway_ms",
177
- "request_body_size",
178
- "response_body_size",
179
- "response_header_content_length",
180
- "status_code",
181
- "upstream_status_code"
182
- ], Sa = ce(Oa), eo = [
183
- "15M",
184
- "1H",
185
- "6H",
186
- "12H",
187
- "24H",
188
- "7D"
189
- ], to = ["basic", "api_usage", "llm_usage"], Ma = {
190
- basic: new Set(re),
191
- api_usage: new Set(ne),
192
- llm_usage: new Set(ae)
193
- }, ro = (e, t) => t.filter((r) => Ma[e].has(r.field)), va = [
194
- "horizontal_bar",
195
- "vertical_bar",
196
- "gauge",
197
- "donut",
198
- "timeseries_line",
199
- "timeseries_bar",
200
- "golden_signals",
201
- "top_n",
202
- "slottable",
203
- "single_value"
204
- ], le = {
205
- type: "string"
206
- }, $ = {
207
- type: "string"
208
- }, yr = {
209
- type: "boolean"
210
- }, pr = {
211
- type: ["object", "array"],
212
- items: {
213
- type: "string"
214
- },
215
- additionalProperties: {
216
- type: "string"
217
- }
218
- }, gr = {
219
- type: "object",
220
- properties: {
221
- type: {
222
- type: "string",
223
- enum: ["slottable"]
224
- },
225
- id: {
226
- type: "string"
227
- }
228
- },
229
- required: ["type", "id"],
230
- additionalProperties: !1
231
- }, _r = {
232
- type: "object",
233
- properties: {
234
- type: {
235
- type: "string",
236
- enum: ["horizontal_bar", "vertical_bar"]
237
- },
238
- stacked: {
239
- type: "boolean"
240
- },
241
- chartDatasetColors: pr,
242
- syntheticsDataKey: le,
243
- chartTitle: $,
244
- allowCsvExport: yr
245
- },
246
- required: ["type"],
247
- additionalProperties: !1
248
- }, wr = {
249
- type: "object",
250
- properties: {
251
- type: {
252
- type: "string",
253
- enum: ["timeseries_line", "timeseries_bar"]
254
- },
255
- stacked: {
256
- type: "boolean"
257
- },
258
- threshold: {
259
- type: "object",
260
- additionalProperties: {
261
- type: "number"
262
- }
263
- },
264
- chartDatasetColors: pr,
265
- syntheticsDataKey: le,
266
- chartTitle: $,
267
- allowCsvExport: yr
268
- },
269
- required: ["type"],
270
- additionalProperties: !1
271
- }, br = {
272
- type: "object",
273
- properties: {
274
- type: {
275
- type: "string",
276
- enum: ["gauge"]
277
- },
278
- metricDisplay: {
279
- type: "string",
280
- enum: ["hidden", "single", "full"]
281
- // This matches the SimpleChartMetricDisplay type.
282
- },
283
- reverseDataset: {
284
- type: "boolean"
285
- },
286
- numerator: {
287
- type: "number"
288
- },
289
- syntheticsDataKey: le,
290
- chartTitle: $
291
- },
292
- required: ["type"],
293
- additionalProperties: !1
294
- }, Tr = {
295
- type: "object",
296
- properties: {
297
- type: {
298
- type: "string",
299
- enum: ["donut"]
300
- },
301
- syntheticsDataKey: le,
302
- chartTitle: $
303
- },
304
- required: ["type"],
305
- additionalProperties: !1
306
- }, Dr = {
307
- type: "object",
308
- properties: {
309
- chartTitle: $,
310
- syntheticsDataKey: le,
311
- type: {
312
- type: "string",
313
- enum: ["top_n"]
314
- },
315
- description: {
316
- type: "string"
317
- },
318
- entityLink: {
319
- type: "string"
320
- }
321
- },
322
- required: ["type"],
323
- additionalProperties: !1
324
- }, Or = {
325
- type: "object",
326
- properties: {
327
- chartTitle: $,
328
- type: {
329
- type: "string",
330
- enum: ["golden_signals"]
331
- },
332
- longCardTitles: {
333
- type: "boolean"
334
- },
335
- description: {
336
- type: "string"
337
- },
338
- percentileLatency: {
339
- type: "boolean"
340
- }
341
- },
342
- required: ["type"],
343
- additionalProperties: !1
344
- }, Sr = {
345
- type: "object",
346
- properties: {
347
- type: {
348
- type: "string",
349
- enum: ["single_value"]
350
- },
351
- decimalPoints: {
352
- type: "number"
353
- },
354
- chartTitle: $
355
- },
356
- required: ["type"],
357
- additionalProperties: !1
358
- }, xa = {
359
- type: "object",
360
- properties: {
361
- tz: {
362
- type: "string",
363
- default: "Etc/UTC"
364
- },
365
- type: {
366
- type: "string",
367
- enum: [
368
- "relative"
369
- ]
370
- },
371
- time_range: {
372
- type: "string",
373
- enum: fr,
374
- default: "1h"
375
- }
376
- },
377
- required: [
378
- "type",
379
- "time_range"
380
- ],
381
- additionalProperties: !1
382
- }, Ea = {
383
- type: "object",
384
- description: "A duration representing an exact start and end time.",
385
- properties: {
386
- tz: {
387
- type: "string"
388
- },
389
- type: {
390
- type: "string",
391
- enum: [
392
- "absolute"
393
- ]
394
- },
395
- start: {
396
- type: "string"
397
- },
398
- end: {
399
- type: "string"
400
- }
401
- },
402
- required: [
403
- "type",
404
- "start",
405
- "end"
406
- ],
407
- additionalProperties: !1
408
- }, et = {
409
- granularity: {
410
- type: "string",
411
- description: 'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',
412
- enum: Ze
413
- },
414
- time_range: {
415
- type: "object",
416
- description: "The time range to query.",
417
- anyOf: [
418
- xa,
419
- Ea
420
- ],
421
- default: {
422
- type: "relative",
423
- time_range: "1h"
424
- }
425
- },
426
- limit: {
427
- type: "number"
428
- },
429
- meta: {
430
- type: "object"
431
- }
432
- }, tt = (e) => ({
433
- type: "array",
434
- description: "List of aggregated metrics to collect across the requested time span.",
435
- items: {
436
- type: "string",
437
- enum: e
438
- }
439
- }), rt = (e) => ({
440
- type: "array",
441
- description: "List of attributes or entity types to group by.",
442
- minItems: 0,
443
- maxItems: 2,
444
- items: {
445
- type: "string",
446
- enum: e
447
- }
448
- }), Pe = (e) => ({
449
- type: "array",
450
- description: "A list of filters to apply to the query",
451
- items: {
452
- oneOf: [
453
- {
454
- type: "object",
455
- description: "In filter",
456
- properties: {
457
- field: {
458
- type: "string",
459
- enum: e
460
- },
461
- operator: {
462
- type: "string",
463
- enum: lr
464
- },
465
- value: {
466
- type: "array",
467
- items: {
468
- type: ["string", "number", "null"]
469
- }
470
- }
471
- },
472
- required: [
473
- "field",
474
- "operator",
475
- "value"
476
- ],
477
- additionalProperties: !1
478
- },
479
- {
480
- type: "object",
481
- description: "Empty filter",
482
- properties: {
483
- field: {
484
- type: "string",
485
- enum: e
486
- },
487
- operator: {
488
- type: "string",
489
- enum: dr
490
- }
491
- },
492
- required: [
493
- "field",
494
- "operator"
495
- ],
496
- additionalProperties: !1
497
- }
498
- ]
499
- }
500
- }), Mr = {
501
- type: "object",
502
- description: "A query to launch at the advanced explore API",
503
- properties: {
504
- datasource: {
505
- type: "string",
506
- enum: [
507
- "advanced"
508
- ]
509
- },
510
- metrics: tt(hr),
511
- dimensions: rt(Ke),
512
- filters: Pe(ne),
513
- ...et
514
- },
515
- required: ["datasource"],
516
- additionalProperties: !1
517
- }, vr = {
518
- type: "object",
519
- description: "A query to launch at the basic explore API",
520
- properties: {
521
- datasource: {
522
- type: "string",
523
- enum: [
524
- "basic"
525
- ]
526
- },
527
- metrics: tt(Be),
528
- dimensions: rt(Ee),
529
- filters: Pe(re),
530
- ...et
531
- },
532
- required: ["datasource"],
533
- additionalProperties: !1
534
- }, xr = {
535
- type: "object",
536
- description: "A query to launch at the AI explore API",
537
- properties: {
538
- datasource: {
539
- type: "string",
540
- enum: [
541
- "ai"
542
- ]
543
- },
544
- metrics: tt(mr),
545
- dimensions: rt(Je),
546
- filters: Pe(ae),
547
- ...et
548
- },
549
- required: ["datasource"],
550
- additionalProperties: !1
551
- }, Er = {
552
- anyOf: [Mr, vr, xr]
553
- }, Pr = {
554
- type: "object",
555
- properties: {
556
- query: Er,
557
- chart: {
558
- anyOf: [
559
- _r,
560
- br,
561
- Tr,
562
- wr,
563
- Or,
564
- Dr,
565
- gr,
566
- Sr
567
- ]
568
- }
569
- },
570
- required: ["query", "chart"],
571
- additionalProperties: !1
572
- }, Nr = {
573
- type: "object",
574
- properties: {
575
- position: {
576
- type: "object",
577
- properties: {
578
- col: {
579
- type: "number"
580
- },
581
- row: {
582
- type: "number"
583
- }
584
- },
585
- description: "Position of the tile in the grid.",
586
- required: ["col", "row"],
587
- additionalProperties: !1
588
- },
589
- size: {
590
- type: "object",
591
- properties: {
592
- cols: {
593
- type: "number"
594
- },
595
- rows: {
596
- type: "number"
597
- },
598
- fitToContent: {
599
- type: "boolean"
600
- }
601
- },
602
- description: "Number of columns and rows the tile occupies. If fitToContent is true for every tile in a row, and each tile only occupies 1 row, then the row will auto-fit to its content.",
603
- required: ["cols", "rows"],
604
- additionalProperties: !1
605
- }
606
- },
607
- required: ["position", "size"],
608
- additionalProperties: !1
609
- }, Cr = {
610
- type: "object",
611
- properties: {
612
- definition: Pr,
613
- layout: Nr,
614
- id: {
615
- type: "string",
616
- description: "Unique identifier for the tile. If not provided, one will be generated."
617
- }
618
- },
619
- required: ["definition", "layout"],
620
- additionalProperties: !1
621
- }, Pa = {
622
- type: "object",
623
- properties: {
624
- tiles: {
625
- type: "array",
626
- items: Cr
627
- },
628
- tileHeight: {
629
- type: "number",
630
- description: "Height of each tile in pixels."
631
- },
632
- gridSize: {
633
- type: "object",
634
- properties: {
635
- cols: {
636
- type: "number"
637
- },
638
- rows: {
639
- type: "number"
640
- }
641
- },
642
- description: "Number of columns and rows in the grid.",
643
- required: ["cols", "rows"],
644
- additionalProperties: !1
645
- },
646
- global_filters: Pe([.../* @__PURE__ */ new Set([...ne, ...re, ...ae])])
647
- },
648
- required: ["tiles"],
649
- additionalProperties: !1
650
- }, no = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
651
- __proto__: null,
652
- aiQuerySchema: xr,
653
- barChartSchema: _r,
654
- basicQuerySchema: vr,
655
- dashboardConfigSchema: Pa,
656
- dashboardTileTypes: va,
657
- donutChartSchema: Tr,
658
- exploreV4QuerySchema: Mr,
659
- gaugeChartSchema: br,
660
- metricCardSchema: Or,
661
- singleValueSchema: Sr,
662
- slottableSchema: gr,
663
- tileConfigSchema: Cr,
664
- tileDefinitionSchema: Pr,
665
- tileLayoutSchema: Nr,
666
- timeseriesChartSchema: wr,
667
- topNTableSchema: Dr,
668
- validDashboardQuery: Er
669
- }, Symbol.toStringTag, { value: "Module" })), ao = [
670
- "horizontal_bar",
671
- "vertical_bar",
672
- "gauge",
673
- "donut",
674
- "timeseries_line",
675
- "timeseries_bar",
676
- "golden_signals",
677
- "top_n",
678
- "slottable",
679
- "single_value"
680
- ], de = {
681
- type: "string"
682
- }, V = {
683
- type: "string"
684
- }, Ir = {
685
- type: "boolean"
686
- }, kr = {
687
- type: ["object", "array"],
688
- items: {
689
- type: "string"
690
- },
691
- additionalProperties: {
692
- type: "string"
693
- }
694
- }, Na = {
695
- type: "object",
696
- properties: {
697
- type: {
698
- type: "string",
699
- enum: ["slottable"]
700
- },
701
- id: {
702
- type: "string"
703
- }
704
- },
705
- required: ["type", "id"],
706
- additionalProperties: !1
707
- }, Ca = {
708
- type: "object",
709
- properties: {
710
- type: {
711
- type: "string",
712
- enum: ["horizontal_bar", "vertical_bar"]
713
- },
714
- stacked: {
715
- type: "boolean"
716
- },
717
- chart_dataset_colors: kr,
718
- synthetics_data_key: de,
719
- chart_title: V,
720
- allow_csv_export: Ir
721
- },
722
- required: ["type"],
723
- additionalProperties: !1
724
- }, Ia = {
725
- type: "object",
726
- properties: {
727
- type: {
728
- type: "string",
729
- enum: ["timeseries_line", "timeseries_bar"]
730
- },
731
- stacked: {
732
- type: "boolean"
733
- },
734
- threshold: {
735
- type: "object",
736
- additionalProperties: {
737
- type: "number"
738
- }
739
- },
740
- chart_dataset_colors: kr,
741
- synthetics_data_key: de,
742
- chart_title: V,
743
- allow_csv_export: Ir
744
- },
745
- required: ["type"],
746
- additionalProperties: !1
747
- }, ka = {
748
- type: "object",
749
- properties: {
750
- type: {
751
- type: "string",
752
- enum: ["gauge"]
753
- },
754
- metric_display: {
755
- type: "string",
756
- enum: ["hidden", "single", "full"]
757
- // This matches the SimpleChartMetricDisplay type.
758
- },
759
- reverse_dataset: {
760
- type: "boolean"
761
- },
762
- numerator: {
763
- type: "number"
764
- },
765
- synthetics_data_key: de,
766
- chart_title: V
767
- },
768
- required: ["type"],
769
- additionalProperties: !1
770
- }, Ya = {
771
- type: "object",
772
- properties: {
773
- type: {
774
- type: "string",
775
- enum: ["donut"]
776
- },
777
- synthetics_data_key: de,
778
- chart_title: V
779
- },
780
- required: ["type"],
781
- additionalProperties: !1
782
- }, qa = {
783
- type: "object",
784
- properties: {
785
- chart_title: V,
786
- synthetics_data_key: de,
787
- type: {
788
- type: "string",
789
- enum: ["top_n"]
790
- },
791
- description: {
792
- type: "string"
793
- },
794
- entity_link: {
795
- type: "string"
796
- }
797
- },
798
- required: ["type"],
799
- additionalProperties: !1
800
- }, Ra = {
801
- type: "object",
802
- properties: {
803
- chart_title: V,
804
- type: {
805
- type: "string",
806
- enum: ["golden_signals"]
807
- },
808
- long_card_titles: {
809
- type: "boolean"
810
- },
811
- description: {
812
- type: "string"
813
- },
814
- percentile_latency: {
815
- type: "boolean"
816
- }
817
- },
818
- required: ["type"],
819
- additionalProperties: !1
820
- }, Ha = {
821
- type: "object",
822
- properties: {
823
- type: {
824
- type: "string",
825
- enum: ["single_value"]
826
- },
827
- decimal_points: {
828
- type: "number"
829
- },
830
- chart_title: V
831
- },
832
- required: ["type"],
833
- additionalProperties: !1
834
- }, ja = {
835
- type: "object",
836
- properties: {
837
- tz: {
838
- type: "string",
839
- default: "Etc/UTC"
840
- },
841
- type: {
842
- type: "string",
843
- enum: [
844
- "relative"
845
- ]
846
- },
847
- time_range: {
848
- type: "string",
849
- enum: fr,
850
- default: "1h"
851
- }
852
- },
853
- required: [
854
- "type",
855
- "time_range"
856
- ],
857
- additionalProperties: !1
858
- }, Aa = {
859
- type: "object",
860
- description: "A duration representing an exact start and end time.",
861
- properties: {
862
- tz: {
863
- type: "string"
864
- },
865
- type: {
866
- type: "string",
867
- enum: [
868
- "absolute"
869
- ]
870
- },
871
- start: {
872
- type: "string"
873
- },
874
- end: {
875
- type: "string"
876
- }
877
- },
878
- required: [
879
- "type",
880
- "start",
881
- "end"
882
- ],
883
- additionalProperties: !1
884
- }, nt = {
885
- granularity: {
886
- type: "string",
887
- description: 'Force time grouping into buckets of this duration. Only has an effect if "time" is in the "dimensions" list.',
888
- enum: Ze
889
- },
890
- time_range: {
891
- type: "object",
892
- description: "The time range to query.",
893
- anyOf: [
894
- ja,
895
- Aa
896
- ],
897
- default: {
898
- type: "relative",
899
- time_range: "1h"
900
- }
901
- },
902
- limit: {
903
- type: "number"
904
- },
905
- meta: {
906
- type: "object"
907
- }
908
- }, at = (e) => ({
909
- type: "array",
910
- description: "List of aggregated metrics to collect across the requested time span.",
911
- items: {
912
- type: "string",
913
- enum: e
914
- }
915
- }), it = (e) => ({
916
- type: "array",
917
- description: "List of attributes or entity types to group by.",
918
- minItems: 0,
919
- maxItems: 2,
920
- items: {
921
- type: "string",
922
- enum: e
923
- }
924
- }), Ne = (e) => ({
925
- type: "array",
926
- description: "A list of filters to apply to the query",
927
- items: {
928
- oneOf: [
929
- {
930
- type: "object",
931
- description: "In filter",
932
- properties: {
933
- field: {
934
- type: "string",
935
- enum: e
936
- },
937
- operator: {
938
- type: "string",
939
- enum: lr
940
- },
941
- value: {
942
- type: "array",
943
- items: {
944
- type: ["string", "number", "null"]
945
- }
946
- }
947
- },
948
- required: [
949
- "field",
950
- "operator",
951
- "value"
952
- ],
953
- additionalProperties: !1
954
- },
955
- {
956
- type: "object",
957
- description: "Empty filter",
958
- properties: {
959
- field: {
960
- type: "string",
961
- enum: e
962
- },
963
- operator: {
964
- type: "string",
965
- enum: dr
966
- }
967
- },
968
- required: [
969
- "field",
970
- "operator"
971
- ],
972
- additionalProperties: !1
973
- }
974
- ]
975
- }
976
- }), Ga = {
977
- type: "object",
978
- description: "A query to launch at the advanced explore API",
979
- properties: {
980
- datasource: {
981
- type: "string",
982
- enum: [
983
- "api_usage"
984
- ]
985
- },
986
- metrics: at(hr),
987
- dimensions: it(Ke),
988
- filters: Ne(ne),
989
- ...nt
990
- },
991
- required: ["datasource"],
992
- additionalProperties: !1
993
- }, Fa = {
994
- type: "object",
995
- description: "A query to launch at the basic explore API",
996
- properties: {
997
- datasource: {
998
- type: "string",
999
- enum: [
1000
- "basic"
1001
- ]
1002
- },
1003
- metrics: at(Be),
1004
- dimensions: it(Ee),
1005
- filters: Ne(re),
1006
- ...nt
1007
- },
1008
- required: ["datasource"],
1009
- additionalProperties: !1
1010
- }, Wa = {
1011
- type: "object",
1012
- description: "A query to launch at the AI explore API",
1013
- properties: {
1014
- datasource: {
1015
- type: "string",
1016
- enum: [
1017
- "llm_usage"
1018
- ]
1019
- },
1020
- metrics: at(mr),
1021
- dimensions: it(Je),
1022
- filters: Ne(ae),
1023
- ...nt
1024
- },
1025
- required: ["datasource"],
1026
- additionalProperties: !1
1027
- }, La = {
1028
- anyOf: [Ga, Fa, Wa]
1029
- }, Ua = {
1030
- type: "object",
1031
- properties: {
1032
- query: La,
1033
- chart: {
1034
- anyOf: [
1035
- Ca,
1036
- ka,
1037
- Ya,
1038
- Ia,
1039
- Ra,
1040
- qa,
1041
- Na,
1042
- Ha
1043
- ]
1044
- }
1045
- },
1046
- required: ["query", "chart"],
1047
- additionalProperties: !1
1048
- }, za = {
1049
- type: "object",
1050
- properties: {
1051
- position: {
1052
- type: "object",
1053
- properties: {
1054
- col: {
1055
- type: "number"
1056
- },
1057
- row: {
1058
- type: "number"
1059
- }
1060
- },
1061
- description: "Position of the tile in the grid.",
1062
- required: ["col", "row"],
1063
- additionalProperties: !1
1064
- },
1065
- size: {
1066
- type: "object",
1067
- properties: {
1068
- cols: {
1069
- type: "number"
1070
- },
1071
- rows: {
1072
- type: "number"
1073
- },
1074
- fit_to_content: {
1075
- type: "boolean"
1076
- }
1077
- },
1078
- description: "Number of columns and rows the tile occupies. If fitToContent is true for every tile in a row, and each tile only occupies 1 row, then the row will auto-fit to its content.",
1079
- required: ["cols", "rows"],
1080
- additionalProperties: !1
1081
- }
1082
- },
1083
- required: ["position", "size"],
1084
- additionalProperties: !1
1085
- }, $a = {
1086
- type: "object",
1087
- properties: {
1088
- type: {
1089
- type: "string",
1090
- enum: ["chart"]
1091
- },
1092
- definition: Ua,
1093
- layout: za,
1094
- id: {
1095
- type: "string",
1096
- description: "Unique identifier for the tile. If not provided, one will be generated."
1097
- }
1098
- },
1099
- required: ["type", "definition", "layout"],
1100
- additionalProperties: !1
1101
- }, io = {
1102
- type: "object",
1103
- properties: {
1104
- tiles: {
1105
- type: "array",
1106
- items: $a
1107
- },
1108
- tile_height: {
1109
- type: "number",
1110
- description: "Height of each tile in pixels."
1111
- },
1112
- preset_filters: Ne([.../* @__PURE__ */ new Set([...ne, ...re, ...ae])]),
1113
- template_id: {
1114
- type: ["string", "null"],
1115
- description: "Template id which was used to instantiate this dashboard."
1116
- }
1117
- },
1118
- required: ["tiles"],
1119
- additionalProperties: !1
1120
- }, so = (e) => {
1121
- const t = [];
1122
- return re.includes(e) && t.push("basic"), ne.includes(e) && t.push("api_usage"), ae.includes(e) && t.push("llm_usage"), (Ta.includes(e) || Sa.includes(e)) && t.push("requests"), t;
1123
- }, Yr = 6048e5, Va = 864e5, Xa = 60, Qa = 3600, Lt = Symbol.for("constructDateFrom");
1124
- function I(e, t) {
1125
- return typeof e == "function" ? e(t) : e && typeof e == "object" && Lt in e ? e[Lt](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
1126
- }
1127
- function O(e, t) {
1128
- return I(t || e, e);
1129
- }
1130
- function Ut(e, t, r) {
1131
- const n = O(e, r == null ? void 0 : r.in);
1132
- return isNaN(t) ? I(e, NaN) : (n.setDate(n.getDate() + t), n);
1133
- }
1134
- function Za(e, t, r) {
1135
- const n = O(e, r == null ? void 0 : r.in);
1136
- if (isNaN(t)) return I(e, NaN);
1137
- const i = n.getDate(), o = I(e, n.getTime());
1138
- o.setMonth(n.getMonth() + t + 1, 0);
1139
- const c = o.getDate();
1140
- return i >= c ? o : (n.setFullYear(
1141
- o.getFullYear(),
1142
- o.getMonth(),
1143
- i
1144
- ), n);
1145
- }
1146
- let Ba = {};
1147
- function fe() {
1148
- return Ba;
1149
- }
1150
- function H(e, t) {
1151
- var d, h, f, _;
1152
- const r = fe(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((h = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : h.weekStartsOn) ?? r.weekStartsOn ?? ((_ = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : _.weekStartsOn) ?? 0, i = O(e, t == null ? void 0 : t.in), o = i.getDay(), c = (o < n ? 7 : 0) + o - n;
1153
- return i.setDate(i.getDate() - c), i.setHours(0, 0, 0, 0), i;
1154
- }
1155
- function De(e, t) {
1156
- return H(e, { ...t, weekStartsOn: 1 });
1157
- }
1158
- function qr(e, t) {
1159
- const r = O(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = I(r, 0);
1160
- i.setFullYear(n + 1, 0, 4), i.setHours(0, 0, 0, 0);
1161
- const o = De(i), c = I(r, 0);
1162
- c.setFullYear(n, 0, 4), c.setHours(0, 0, 0, 0);
1163
- const d = De(c);
1164
- return r.getTime() >= o.getTime() ? n + 1 : r.getTime() >= d.getTime() ? n : n - 1;
1165
- }
1166
- function zt(e) {
1167
- const t = O(e), r = new Date(
1168
- Date.UTC(
1169
- t.getFullYear(),
1170
- t.getMonth(),
1171
- t.getDate(),
1172
- t.getHours(),
1173
- t.getMinutes(),
1174
- t.getSeconds(),
1175
- t.getMilliseconds()
1176
- )
1177
- );
1178
- return r.setUTCFullYear(t.getFullYear()), +e - +r;
1179
- }
1180
- function Ka(e, ...t) {
1181
- const r = I.bind(
1182
- null,
1183
- t.find((n) => typeof n == "object")
1184
- );
1185
- return t.map(r);
1186
- }
1187
- function Oe(e, t) {
1188
- const r = O(e, t == null ? void 0 : t.in);
1189
- return r.setHours(0, 0, 0, 0), r;
1190
- }
1191
- function Ja(e, t, r) {
1192
- const [n, i] = Ka(
1193
- r == null ? void 0 : r.in,
1194
- e,
1195
- t
1196
- ), o = Oe(n), c = Oe(i), d = +o - zt(o), h = +c - zt(c);
1197
- return Math.round((d - h) / Va);
1198
- }
1199
- function ei(e, t) {
1200
- const r = qr(e, t), n = I(e, 0);
1201
- return n.setFullYear(r, 0, 4), n.setHours(0, 0, 0, 0), De(n);
1202
- }
1203
- function ti(e) {
1204
- return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
1205
- }
1206
- function ri(e) {
1207
- return !(!ti(e) && typeof e != "number" || isNaN(+O(e)));
1208
- }
1209
- function ee(e, t) {
1210
- const r = O(e, t == null ? void 0 : t.in);
1211
- return r.setDate(1), r.setHours(0, 0, 0, 0), r;
1212
- }
1213
- function ni(e, t) {
1214
- const r = O(e, t == null ? void 0 : t.in);
1215
- return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
1216
- }
1217
- const ai = {
1218
- lessThanXSeconds: {
1219
- one: "less than a second",
1220
- other: "less than {{count}} seconds"
1221
- },
1222
- xSeconds: {
1223
- one: "1 second",
1224
- other: "{{count}} seconds"
1225
- },
1226
- halfAMinute: "half a minute",
1227
- lessThanXMinutes: {
1228
- one: "less than a minute",
1229
- other: "less than {{count}} minutes"
1230
- },
1231
- xMinutes: {
1232
- one: "1 minute",
1233
- other: "{{count}} minutes"
1234
- },
1235
- aboutXHours: {
1236
- one: "about 1 hour",
1237
- other: "about {{count}} hours"
1238
- },
1239
- xHours: {
1240
- one: "1 hour",
1241
- other: "{{count}} hours"
1242
- },
1243
- xDays: {
1244
- one: "1 day",
1245
- other: "{{count}} days"
1246
- },
1247
- aboutXWeeks: {
1248
- one: "about 1 week",
1249
- other: "about {{count}} weeks"
1250
- },
1251
- xWeeks: {
1252
- one: "1 week",
1253
- other: "{{count}} weeks"
1254
- },
1255
- aboutXMonths: {
1256
- one: "about 1 month",
1257
- other: "about {{count}} months"
1258
- },
1259
- xMonths: {
1260
- one: "1 month",
1261
- other: "{{count}} months"
1262
- },
1263
- aboutXYears: {
1264
- one: "about 1 year",
1265
- other: "about {{count}} years"
1266
- },
1267
- xYears: {
1268
- one: "1 year",
1269
- other: "{{count}} years"
1270
- },
1271
- overXYears: {
1272
- one: "over 1 year",
1273
- other: "over {{count}} years"
1274
- },
1275
- almostXYears: {
1276
- one: "almost 1 year",
1277
- other: "almost {{count}} years"
1278
- }
1279
- }, ii = (e, t, r) => {
1280
- let n;
1281
- const i = ai[e];
1282
- return typeof i == "string" ? n = i : t === 1 ? n = i.one : n = i.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + n : n + " ago" : n;
1283
- };
1284
- function Le(e) {
1285
- return (t = {}) => {
1286
- const r = t.width ? String(t.width) : e.defaultWidth;
1287
- return e.formats[r] || e.formats[e.defaultWidth];
1288
- };
1289
- }
1290
- const si = {
1291
- full: "EEEE, MMMM do, y",
1292
- long: "MMMM do, y",
1293
- medium: "MMM d, y",
1294
- short: "MM/dd/yyyy"
1295
- }, oi = {
1296
- full: "h:mm:ss a zzzz",
1297
- long: "h:mm:ss a z",
1298
- medium: "h:mm:ss a",
1299
- short: "h:mm a"
1300
- }, ui = {
1301
- full: "{{date}} 'at' {{time}}",
1302
- long: "{{date}} 'at' {{time}}",
1303
- medium: "{{date}}, {{time}}",
1304
- short: "{{date}}, {{time}}"
1305
- }, ci = {
1306
- date: Le({
1307
- formats: si,
1308
- defaultWidth: "full"
1309
- }),
1310
- time: Le({
1311
- formats: oi,
1312
- defaultWidth: "full"
1313
- }),
1314
- dateTime: Le({
1315
- formats: ui,
1316
- defaultWidth: "full"
1317
- })
1318
- }, li = {
1319
- lastWeek: "'last' eeee 'at' p",
1320
- yesterday: "'yesterday at' p",
1321
- today: "'today at' p",
1322
- tomorrow: "'tomorrow at' p",
1323
- nextWeek: "eeee 'at' p",
1324
- other: "P"
1325
- }, di = (e, t, r, n) => li[e];
1326
- function oe(e) {
1327
- return (t, r) => {
1328
- const n = r != null && r.context ? String(r.context) : "standalone";
1329
- let i;
1330
- if (n === "formatting" && e.formattingValues) {
1331
- const c = e.defaultFormattingWidth || e.defaultWidth, d = r != null && r.width ? String(r.width) : c;
1332
- i = e.formattingValues[d] || e.formattingValues[c];
1333
- } else {
1334
- const c = e.defaultWidth, d = r != null && r.width ? String(r.width) : e.defaultWidth;
1335
- i = e.values[d] || e.values[c];
1336
- }
1337
- const o = e.argumentCallback ? e.argumentCallback(t) : t;
1338
- return i[o];
1339
- };
1340
- }
1341
- const fi = {
1342
- narrow: ["B", "A"],
1343
- abbreviated: ["BC", "AD"],
1344
- wide: ["Before Christ", "Anno Domini"]
1345
- }, hi = {
1346
- narrow: ["1", "2", "3", "4"],
1347
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1348
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
1349
- }, mi = {
1350
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1351
- abbreviated: [
1352
- "Jan",
1353
- "Feb",
1354
- "Mar",
1355
- "Apr",
1356
- "May",
1357
- "Jun",
1358
- "Jul",
1359
- "Aug",
1360
- "Sep",
1361
- "Oct",
1362
- "Nov",
1363
- "Dec"
1364
- ],
1365
- wide: [
1366
- "January",
1367
- "February",
1368
- "March",
1369
- "April",
1370
- "May",
1371
- "June",
1372
- "July",
1373
- "August",
1374
- "September",
1375
- "October",
1376
- "November",
1377
- "December"
1378
- ]
1379
- }, yi = {
1380
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
1381
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1382
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1383
- wide: [
1384
- "Sunday",
1385
- "Monday",
1386
- "Tuesday",
1387
- "Wednesday",
1388
- "Thursday",
1389
- "Friday",
1390
- "Saturday"
1391
- ]
1392
- }, pi = {
1393
- narrow: {
1394
- am: "a",
1395
- pm: "p",
1396
- midnight: "mi",
1397
- noon: "n",
1398
- morning: "morning",
1399
- afternoon: "afternoon",
1400
- evening: "evening",
1401
- night: "night"
1402
- },
1403
- abbreviated: {
1404
- am: "AM",
1405
- pm: "PM",
1406
- midnight: "midnight",
1407
- noon: "noon",
1408
- morning: "morning",
1409
- afternoon: "afternoon",
1410
- evening: "evening",
1411
- night: "night"
1412
- },
1413
- wide: {
1414
- am: "a.m.",
1415
- pm: "p.m.",
1416
- midnight: "midnight",
1417
- noon: "noon",
1418
- morning: "morning",
1419
- afternoon: "afternoon",
1420
- evening: "evening",
1421
- night: "night"
1422
- }
1423
- }, gi = {
1424
- narrow: {
1425
- am: "a",
1426
- pm: "p",
1427
- midnight: "mi",
1428
- noon: "n",
1429
- morning: "in the morning",
1430
- afternoon: "in the afternoon",
1431
- evening: "in the evening",
1432
- night: "at night"
1433
- },
1434
- abbreviated: {
1435
- am: "AM",
1436
- pm: "PM",
1437
- midnight: "midnight",
1438
- noon: "noon",
1439
- morning: "in the morning",
1440
- afternoon: "in the afternoon",
1441
- evening: "in the evening",
1442
- night: "at night"
1443
- },
1444
- wide: {
1445
- am: "a.m.",
1446
- pm: "p.m.",
1447
- midnight: "midnight",
1448
- noon: "noon",
1449
- morning: "in the morning",
1450
- afternoon: "in the afternoon",
1451
- evening: "in the evening",
1452
- night: "at night"
1453
- }
1454
- }, _i = (e, t) => {
1455
- const r = Number(e), n = r % 100;
1456
- if (n > 20 || n < 10)
1457
- switch (n % 10) {
1458
- case 1:
1459
- return r + "st";
1460
- case 2:
1461
- return r + "nd";
1462
- case 3:
1463
- return r + "rd";
1464
- }
1465
- return r + "th";
1466
- }, wi = {
1467
- ordinalNumber: _i,
1468
- era: oe({
1469
- values: fi,
1470
- defaultWidth: "wide"
1471
- }),
1472
- quarter: oe({
1473
- values: hi,
1474
- defaultWidth: "wide",
1475
- argumentCallback: (e) => e - 1
1476
- }),
1477
- month: oe({
1478
- values: mi,
1479
- defaultWidth: "wide"
1480
- }),
1481
- day: oe({
1482
- values: yi,
1483
- defaultWidth: "wide"
1484
- }),
1485
- dayPeriod: oe({
1486
- values: pi,
1487
- defaultWidth: "wide",
1488
- formattingValues: gi,
1489
- defaultFormattingWidth: "wide"
1490
- })
1491
- };
1492
- function ue(e) {
1493
- return (t, r = {}) => {
1494
- const n = r.width, i = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], o = t.match(i);
1495
- if (!o)
1496
- return null;
1497
- const c = o[0], d = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], h = Array.isArray(d) ? Ti(d, (y) => y.test(c)) : (
1498
- // [TODO] -- I challenge you to fix the type
1499
- bi(d, (y) => y.test(c))
1500
- );
1501
- let f;
1502
- f = e.valueCallback ? e.valueCallback(h) : h, f = r.valueCallback ? (
1503
- // [TODO] -- I challenge you to fix the type
1504
- r.valueCallback(f)
1505
- ) : f;
1506
- const _ = t.slice(c.length);
1507
- return { value: f, rest: _ };
1508
- };
1509
- }
1510
- function bi(e, t) {
1511
- for (const r in e)
1512
- if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
1513
- return r;
1514
- }
1515
- function Ti(e, t) {
1516
- for (let r = 0; r < e.length; r++)
1517
- if (t(e[r]))
1518
- return r;
1519
- }
1520
- function Di(e) {
1521
- return (t, r = {}) => {
1522
- const n = t.match(e.matchPattern);
1523
- if (!n) return null;
1524
- const i = n[0], o = t.match(e.parsePattern);
1525
- if (!o) return null;
1526
- let c = e.valueCallback ? e.valueCallback(o[0]) : o[0];
1527
- c = r.valueCallback ? r.valueCallback(c) : c;
1528
- const d = t.slice(i.length);
1529
- return { value: c, rest: d };
1530
- };
1531
- }
1532
- const Oi = /^(\d+)(th|st|nd|rd)?/i, Si = /\d+/i, Mi = {
1533
- narrow: /^(b|a)/i,
1534
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1535
- wide: /^(before christ|before common era|anno domini|common era)/i
1536
- }, vi = {
1537
- any: [/^b/i, /^(a|c)/i]
1538
- }, xi = {
1539
- narrow: /^[1234]/i,
1540
- abbreviated: /^q[1234]/i,
1541
- wide: /^[1234](th|st|nd|rd)? quarter/i
1542
- }, Ei = {
1543
- any: [/1/i, /2/i, /3/i, /4/i]
1544
- }, Pi = {
1545
- narrow: /^[jfmasond]/i,
1546
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1547
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1548
- }, Ni = {
1549
- narrow: [
1550
- /^j/i,
1551
- /^f/i,
1552
- /^m/i,
1553
- /^a/i,
1554
- /^m/i,
1555
- /^j/i,
1556
- /^j/i,
1557
- /^a/i,
1558
- /^s/i,
1559
- /^o/i,
1560
- /^n/i,
1561
- /^d/i
1562
- ],
1563
- any: [
1564
- /^ja/i,
1565
- /^f/i,
1566
- /^mar/i,
1567
- /^ap/i,
1568
- /^may/i,
1569
- /^jun/i,
1570
- /^jul/i,
1571
- /^au/i,
1572
- /^s/i,
1573
- /^o/i,
1574
- /^n/i,
1575
- /^d/i
1576
- ]
1577
- }, Ci = {
1578
- narrow: /^[smtwf]/i,
1579
- short: /^(su|mo|tu|we|th|fr|sa)/i,
1580
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1581
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1582
- }, Ii = {
1583
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1584
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1585
- }, ki = {
1586
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1587
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1588
- }, Yi = {
1589
- any: {
1590
- am: /^a/i,
1591
- pm: /^p/i,
1592
- midnight: /^mi/i,
1593
- noon: /^no/i,
1594
- morning: /morning/i,
1595
- afternoon: /afternoon/i,
1596
- evening: /evening/i,
1597
- night: /night/i
1598
- }
1599
- }, qi = {
1600
- ordinalNumber: Di({
1601
- matchPattern: Oi,
1602
- parsePattern: Si,
1603
- valueCallback: (e) => parseInt(e, 10)
1604
- }),
1605
- era: ue({
1606
- matchPatterns: Mi,
1607
- defaultMatchWidth: "wide",
1608
- parsePatterns: vi,
1609
- defaultParseWidth: "any"
1610
- }),
1611
- quarter: ue({
1612
- matchPatterns: xi,
1613
- defaultMatchWidth: "wide",
1614
- parsePatterns: Ei,
1615
- defaultParseWidth: "any",
1616
- valueCallback: (e) => e + 1
1617
- }),
1618
- month: ue({
1619
- matchPatterns: Pi,
1620
- defaultMatchWidth: "wide",
1621
- parsePatterns: Ni,
1622
- defaultParseWidth: "any"
1623
- }),
1624
- day: ue({
1625
- matchPatterns: Ci,
1626
- defaultMatchWidth: "wide",
1627
- parsePatterns: Ii,
1628
- defaultParseWidth: "any"
1629
- }),
1630
- dayPeriod: ue({
1631
- matchPatterns: ki,
1632
- defaultMatchWidth: "any",
1633
- parsePatterns: Yi,
1634
- defaultParseWidth: "any"
1635
- })
1636
- }, Ri = {
1637
- code: "en-US",
1638
- formatDistance: ii,
1639
- formatLong: ci,
1640
- formatRelative: di,
1641
- localize: wi,
1642
- match: qi,
1643
- options: {
1644
- weekStartsOn: 0,
1645
- firstWeekContainsDate: 1
1646
- }
1647
- };
1648
- function Hi(e, t) {
1649
- const r = O(e, t == null ? void 0 : t.in);
1650
- return Ja(r, ni(r)) + 1;
1651
- }
1652
- function ji(e, t) {
1653
- const r = O(e, t == null ? void 0 : t.in), n = +De(r) - +ei(r);
1654
- return Math.round(n / Yr) + 1;
1655
- }
1656
- function Rr(e, t) {
1657
- var _, y, p, E;
1658
- const r = O(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = fe(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((y = (_ = t == null ? void 0 : t.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((E = (p = i.locale) == null ? void 0 : p.options) == null ? void 0 : E.firstWeekContainsDate) ?? 1, c = I((t == null ? void 0 : t.in) || e, 0);
1659
- c.setFullYear(n + 1, 0, o), c.setHours(0, 0, 0, 0);
1660
- const d = H(c, t), h = I((t == null ? void 0 : t.in) || e, 0);
1661
- h.setFullYear(n, 0, o), h.setHours(0, 0, 0, 0);
1662
- const f = H(h, t);
1663
- return +r >= +d ? n + 1 : +r >= +f ? n : n - 1;
1664
- }
1665
- function Ai(e, t) {
1666
- var d, h, f, _;
1667
- const r = fe(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((h = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((_ = (f = r.locale) == null ? void 0 : f.options) == null ? void 0 : _.firstWeekContainsDate) ?? 1, i = Rr(e, t), o = I((t == null ? void 0 : t.in) || e, 0);
1668
- return o.setFullYear(i, 0, n), o.setHours(0, 0, 0, 0), H(o, t);
1669
- }
1670
- function Gi(e, t) {
1671
- const r = O(e, t == null ? void 0 : t.in), n = +H(r, t) - +Ai(r, t);
1672
- return Math.round(n / Yr) + 1;
1673
- }
1674
- function g(e, t) {
1675
- const r = e < 0 ? "-" : "", n = Math.abs(e).toString().padStart(t, "0");
1676
- return r + n;
1677
- }
1678
- const A = {
1679
- // Year
1680
- y(e, t) {
1681
- const r = e.getFullYear(), n = r > 0 ? r : 1 - r;
1682
- return g(t === "yy" ? n % 100 : n, t.length);
1683
- },
1684
- // Month
1685
- M(e, t) {
1686
- const r = e.getMonth();
1687
- return t === "M" ? String(r + 1) : g(r + 1, 2);
1688
- },
1689
- // Day of the month
1690
- d(e, t) {
1691
- return g(e.getDate(), t.length);
1692
- },
1693
- // AM or PM
1694
- a(e, t) {
1695
- const r = e.getHours() / 12 >= 1 ? "pm" : "am";
1696
- switch (t) {
1697
- case "a":
1698
- case "aa":
1699
- return r.toUpperCase();
1700
- case "aaa":
1701
- return r;
1702
- case "aaaaa":
1703
- return r[0];
1704
- case "aaaa":
1705
- default:
1706
- return r === "am" ? "a.m." : "p.m.";
1707
- }
1708
- },
1709
- // Hour [1-12]
1710
- h(e, t) {
1711
- return g(e.getHours() % 12 || 12, t.length);
1712
- },
1713
- // Hour [0-23]
1714
- H(e, t) {
1715
- return g(e.getHours(), t.length);
1716
- },
1717
- // Minute
1718
- m(e, t) {
1719
- return g(e.getMinutes(), t.length);
1720
- },
1721
- // Second
1722
- s(e, t) {
1723
- return g(e.getSeconds(), t.length);
1724
- },
1725
- // Fraction of second
1726
- S(e, t) {
1727
- const r = t.length, n = e.getMilliseconds(), i = Math.trunc(
1728
- n * Math.pow(10, r - 3)
1729
- );
1730
- return g(i, t.length);
1731
- }
1732
- }, K = {
1733
- midnight: "midnight",
1734
- noon: "noon",
1735
- morning: "morning",
1736
- afternoon: "afternoon",
1737
- evening: "evening",
1738
- night: "night"
1739
- }, $t = {
1740
- // Era
1741
- G: function(e, t, r) {
1742
- const n = e.getFullYear() > 0 ? 1 : 0;
1743
- switch (t) {
1744
- case "G":
1745
- case "GG":
1746
- case "GGG":
1747
- return r.era(n, { width: "abbreviated" });
1748
- case "GGGGG":
1749
- return r.era(n, { width: "narrow" });
1750
- case "GGGG":
1751
- default:
1752
- return r.era(n, { width: "wide" });
1753
- }
1754
- },
1755
- // Year
1756
- y: function(e, t, r) {
1757
- if (t === "yo") {
1758
- const n = e.getFullYear(), i = n > 0 ? n : 1 - n;
1759
- return r.ordinalNumber(i, { unit: "year" });
1760
- }
1761
- return A.y(e, t);
1762
- },
1763
- // Local week-numbering year
1764
- Y: function(e, t, r, n) {
1765
- const i = Rr(e, n), o = i > 0 ? i : 1 - i;
1766
- if (t === "YY") {
1767
- const c = o % 100;
1768
- return g(c, 2);
1769
- }
1770
- return t === "Yo" ? r.ordinalNumber(o, { unit: "year" }) : g(o, t.length);
1771
- },
1772
- // ISO week-numbering year
1773
- R: function(e, t) {
1774
- const r = qr(e);
1775
- return g(r, t.length);
1776
- },
1777
- // Extended year. This is a single number designating the year of this calendar system.
1778
- // The main difference between `y` and `u` localizers are B.C. years:
1779
- // | Year | `y` | `u` |
1780
- // |------|-----|-----|
1781
- // | AC 1 | 1 | 1 |
1782
- // | BC 1 | 1 | 0 |
1783
- // | BC 2 | 2 | -1 |
1784
- // Also `yy` always returns the last two digits of a year,
1785
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
1786
- u: function(e, t) {
1787
- const r = e.getFullYear();
1788
- return g(r, t.length);
1789
- },
1790
- // Quarter
1791
- Q: function(e, t, r) {
1792
- const n = Math.ceil((e.getMonth() + 1) / 3);
1793
- switch (t) {
1794
- case "Q":
1795
- return String(n);
1796
- case "QQ":
1797
- return g(n, 2);
1798
- case "Qo":
1799
- return r.ordinalNumber(n, { unit: "quarter" });
1800
- case "QQQ":
1801
- return r.quarter(n, {
1802
- width: "abbreviated",
1803
- context: "formatting"
1804
- });
1805
- case "QQQQQ":
1806
- return r.quarter(n, {
1807
- width: "narrow",
1808
- context: "formatting"
1809
- });
1810
- case "QQQQ":
1811
- default:
1812
- return r.quarter(n, {
1813
- width: "wide",
1814
- context: "formatting"
1815
- });
1816
- }
1817
- },
1818
- // Stand-alone quarter
1819
- q: function(e, t, r) {
1820
- const n = Math.ceil((e.getMonth() + 1) / 3);
1821
- switch (t) {
1822
- case "q":
1823
- return String(n);
1824
- case "qq":
1825
- return g(n, 2);
1826
- case "qo":
1827
- return r.ordinalNumber(n, { unit: "quarter" });
1828
- case "qqq":
1829
- return r.quarter(n, {
1830
- width: "abbreviated",
1831
- context: "standalone"
1832
- });
1833
- case "qqqqq":
1834
- return r.quarter(n, {
1835
- width: "narrow",
1836
- context: "standalone"
1837
- });
1838
- case "qqqq":
1839
- default:
1840
- return r.quarter(n, {
1841
- width: "wide",
1842
- context: "standalone"
1843
- });
1844
- }
1845
- },
1846
- // Month
1847
- M: function(e, t, r) {
1848
- const n = e.getMonth();
1849
- switch (t) {
1850
- case "M":
1851
- case "MM":
1852
- return A.M(e, t);
1853
- case "Mo":
1854
- return r.ordinalNumber(n + 1, { unit: "month" });
1855
- case "MMM":
1856
- return r.month(n, {
1857
- width: "abbreviated",
1858
- context: "formatting"
1859
- });
1860
- case "MMMMM":
1861
- return r.month(n, {
1862
- width: "narrow",
1863
- context: "formatting"
1864
- });
1865
- case "MMMM":
1866
- default:
1867
- return r.month(n, { width: "wide", context: "formatting" });
1868
- }
1869
- },
1870
- // Stand-alone month
1871
- L: function(e, t, r) {
1872
- const n = e.getMonth();
1873
- switch (t) {
1874
- case "L":
1875
- return String(n + 1);
1876
- case "LL":
1877
- return g(n + 1, 2);
1878
- case "Lo":
1879
- return r.ordinalNumber(n + 1, { unit: "month" });
1880
- case "LLL":
1881
- return r.month(n, {
1882
- width: "abbreviated",
1883
- context: "standalone"
1884
- });
1885
- case "LLLLL":
1886
- return r.month(n, {
1887
- width: "narrow",
1888
- context: "standalone"
1889
- });
1890
- case "LLLL":
1891
- default:
1892
- return r.month(n, { width: "wide", context: "standalone" });
1893
- }
1894
- },
1895
- // Local week of year
1896
- w: function(e, t, r, n) {
1897
- const i = Gi(e, n);
1898
- return t === "wo" ? r.ordinalNumber(i, { unit: "week" }) : g(i, t.length);
1899
- },
1900
- // ISO week of year
1901
- I: function(e, t, r) {
1902
- const n = ji(e);
1903
- return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : g(n, t.length);
1904
- },
1905
- // Day of the month
1906
- d: function(e, t, r) {
1907
- return t === "do" ? r.ordinalNumber(e.getDate(), { unit: "date" }) : A.d(e, t);
1908
- },
1909
- // Day of year
1910
- D: function(e, t, r) {
1911
- const n = Hi(e);
1912
- return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : g(n, t.length);
1913
- },
1914
- // Day of week
1915
- E: function(e, t, r) {
1916
- const n = e.getDay();
1917
- switch (t) {
1918
- case "E":
1919
- case "EE":
1920
- case "EEE":
1921
- return r.day(n, {
1922
- width: "abbreviated",
1923
- context: "formatting"
1924
- });
1925
- case "EEEEE":
1926
- return r.day(n, {
1927
- width: "narrow",
1928
- context: "formatting"
1929
- });
1930
- case "EEEEEE":
1931
- return r.day(n, {
1932
- width: "short",
1933
- context: "formatting"
1934
- });
1935
- case "EEEE":
1936
- default:
1937
- return r.day(n, {
1938
- width: "wide",
1939
- context: "formatting"
1940
- });
1941
- }
1942
- },
1943
- // Local day of week
1944
- e: function(e, t, r, n) {
1945
- const i = e.getDay(), o = (i - n.weekStartsOn + 8) % 7 || 7;
1946
- switch (t) {
1947
- case "e":
1948
- return String(o);
1949
- case "ee":
1950
- return g(o, 2);
1951
- case "eo":
1952
- return r.ordinalNumber(o, { unit: "day" });
1953
- case "eee":
1954
- return r.day(i, {
1955
- width: "abbreviated",
1956
- context: "formatting"
1957
- });
1958
- case "eeeee":
1959
- return r.day(i, {
1960
- width: "narrow",
1961
- context: "formatting"
1962
- });
1963
- case "eeeeee":
1964
- return r.day(i, {
1965
- width: "short",
1966
- context: "formatting"
1967
- });
1968
- case "eeee":
1969
- default:
1970
- return r.day(i, {
1971
- width: "wide",
1972
- context: "formatting"
1973
- });
1974
- }
1975
- },
1976
- // Stand-alone local day of week
1977
- c: function(e, t, r, n) {
1978
- const i = e.getDay(), o = (i - n.weekStartsOn + 8) % 7 || 7;
1979
- switch (t) {
1980
- case "c":
1981
- return String(o);
1982
- case "cc":
1983
- return g(o, t.length);
1984
- case "co":
1985
- return r.ordinalNumber(o, { unit: "day" });
1986
- case "ccc":
1987
- return r.day(i, {
1988
- width: "abbreviated",
1989
- context: "standalone"
1990
- });
1991
- case "ccccc":
1992
- return r.day(i, {
1993
- width: "narrow",
1994
- context: "standalone"
1995
- });
1996
- case "cccccc":
1997
- return r.day(i, {
1998
- width: "short",
1999
- context: "standalone"
2000
- });
2001
- case "cccc":
2002
- default:
2003
- return r.day(i, {
2004
- width: "wide",
2005
- context: "standalone"
2006
- });
2007
- }
2008
- },
2009
- // ISO day of week
2010
- i: function(e, t, r) {
2011
- const n = e.getDay(), i = n === 0 ? 7 : n;
2012
- switch (t) {
2013
- case "i":
2014
- return String(i);
2015
- case "ii":
2016
- return g(i, t.length);
2017
- case "io":
2018
- return r.ordinalNumber(i, { unit: "day" });
2019
- case "iii":
2020
- return r.day(n, {
2021
- width: "abbreviated",
2022
- context: "formatting"
2023
- });
2024
- case "iiiii":
2025
- return r.day(n, {
2026
- width: "narrow",
2027
- context: "formatting"
2028
- });
2029
- case "iiiiii":
2030
- return r.day(n, {
2031
- width: "short",
2032
- context: "formatting"
2033
- });
2034
- case "iiii":
2035
- default:
2036
- return r.day(n, {
2037
- width: "wide",
2038
- context: "formatting"
2039
- });
2040
- }
2041
- },
2042
- // AM or PM
2043
- a: function(e, t, r) {
2044
- const i = e.getHours() / 12 >= 1 ? "pm" : "am";
2045
- switch (t) {
2046
- case "a":
2047
- case "aa":
2048
- return r.dayPeriod(i, {
2049
- width: "abbreviated",
2050
- context: "formatting"
2051
- });
2052
- case "aaa":
2053
- return r.dayPeriod(i, {
2054
- width: "abbreviated",
2055
- context: "formatting"
2056
- }).toLowerCase();
2057
- case "aaaaa":
2058
- return r.dayPeriod(i, {
2059
- width: "narrow",
2060
- context: "formatting"
2061
- });
2062
- case "aaaa":
2063
- default:
2064
- return r.dayPeriod(i, {
2065
- width: "wide",
2066
- context: "formatting"
2067
- });
2068
- }
2069
- },
2070
- // AM, PM, midnight, noon
2071
- b: function(e, t, r) {
2072
- const n = e.getHours();
2073
- let i;
2074
- switch (n === 12 ? i = K.noon : n === 0 ? i = K.midnight : i = n / 12 >= 1 ? "pm" : "am", t) {
2075
- case "b":
2076
- case "bb":
2077
- return r.dayPeriod(i, {
2078
- width: "abbreviated",
2079
- context: "formatting"
2080
- });
2081
- case "bbb":
2082
- return r.dayPeriod(i, {
2083
- width: "abbreviated",
2084
- context: "formatting"
2085
- }).toLowerCase();
2086
- case "bbbbb":
2087
- return r.dayPeriod(i, {
2088
- width: "narrow",
2089
- context: "formatting"
2090
- });
2091
- case "bbbb":
2092
- default:
2093
- return r.dayPeriod(i, {
2094
- width: "wide",
2095
- context: "formatting"
2096
- });
2097
- }
2098
- },
2099
- // in the morning, in the afternoon, in the evening, at night
2100
- B: function(e, t, r) {
2101
- const n = e.getHours();
2102
- let i;
2103
- switch (n >= 17 ? i = K.evening : n >= 12 ? i = K.afternoon : n >= 4 ? i = K.morning : i = K.night, t) {
2104
- case "B":
2105
- case "BB":
2106
- case "BBB":
2107
- return r.dayPeriod(i, {
2108
- width: "abbreviated",
2109
- context: "formatting"
2110
- });
2111
- case "BBBBB":
2112
- return r.dayPeriod(i, {
2113
- width: "narrow",
2114
- context: "formatting"
2115
- });
2116
- case "BBBB":
2117
- default:
2118
- return r.dayPeriod(i, {
2119
- width: "wide",
2120
- context: "formatting"
2121
- });
2122
- }
2123
- },
2124
- // Hour [1-12]
2125
- h: function(e, t, r) {
2126
- if (t === "ho") {
2127
- let n = e.getHours() % 12;
2128
- return n === 0 && (n = 12), r.ordinalNumber(n, { unit: "hour" });
2129
- }
2130
- return A.h(e, t);
2131
- },
2132
- // Hour [0-23]
2133
- H: function(e, t, r) {
2134
- return t === "Ho" ? r.ordinalNumber(e.getHours(), { unit: "hour" }) : A.H(e, t);
2135
- },
2136
- // Hour [0-11]
2137
- K: function(e, t, r) {
2138
- const n = e.getHours() % 12;
2139
- return t === "Ko" ? r.ordinalNumber(n, { unit: "hour" }) : g(n, t.length);
2140
- },
2141
- // Hour [1-24]
2142
- k: function(e, t, r) {
2143
- let n = e.getHours();
2144
- return n === 0 && (n = 24), t === "ko" ? r.ordinalNumber(n, { unit: "hour" }) : g(n, t.length);
2145
- },
2146
- // Minute
2147
- m: function(e, t, r) {
2148
- return t === "mo" ? r.ordinalNumber(e.getMinutes(), { unit: "minute" }) : A.m(e, t);
2149
- },
2150
- // Second
2151
- s: function(e, t, r) {
2152
- return t === "so" ? r.ordinalNumber(e.getSeconds(), { unit: "second" }) : A.s(e, t);
2153
- },
2154
- // Fraction of second
2155
- S: function(e, t) {
2156
- return A.S(e, t);
2157
- },
2158
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
2159
- X: function(e, t, r) {
2160
- const n = e.getTimezoneOffset();
2161
- if (n === 0)
2162
- return "Z";
2163
- switch (t) {
2164
- case "X":
2165
- return Xt(n);
2166
- case "XXXX":
2167
- case "XX":
2168
- return z(n);
2169
- case "XXXXX":
2170
- case "XXX":
2171
- default:
2172
- return z(n, ":");
2173
- }
2174
- },
2175
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
2176
- x: function(e, t, r) {
2177
- const n = e.getTimezoneOffset();
2178
- switch (t) {
2179
- case "x":
2180
- return Xt(n);
2181
- case "xxxx":
2182
- case "xx":
2183
- return z(n);
2184
- case "xxxxx":
2185
- case "xxx":
2186
- default:
2187
- return z(n, ":");
2188
- }
2189
- },
2190
- // Timezone (GMT)
2191
- O: function(e, t, r) {
2192
- const n = e.getTimezoneOffset();
2193
- switch (t) {
2194
- case "O":
2195
- case "OO":
2196
- case "OOO":
2197
- return "GMT" + Vt(n, ":");
2198
- case "OOOO":
2199
- default:
2200
- return "GMT" + z(n, ":");
2201
- }
2202
- },
2203
- // Timezone (specific non-location)
2204
- z: function(e, t, r) {
2205
- const n = e.getTimezoneOffset();
2206
- switch (t) {
2207
- case "z":
2208
- case "zz":
2209
- case "zzz":
2210
- return "GMT" + Vt(n, ":");
2211
- case "zzzz":
2212
- default:
2213
- return "GMT" + z(n, ":");
2214
- }
2215
- },
2216
- // Seconds timestamp
2217
- t: function(e, t, r) {
2218
- const n = Math.trunc(+e / 1e3);
2219
- return g(n, t.length);
2220
- },
2221
- // Milliseconds timestamp
2222
- T: function(e, t, r) {
2223
- return g(+e, t.length);
2224
- }
2225
- };
2226
- function Vt(e, t = "") {
2227
- const r = e > 0 ? "-" : "+", n = Math.abs(e), i = Math.trunc(n / 60), o = n % 60;
2228
- return o === 0 ? r + String(i) : r + String(i) + t + g(o, 2);
2229
- }
2230
- function Xt(e, t) {
2231
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + g(Math.abs(e) / 60, 2) : z(e, t);
2232
- }
2233
- function z(e, t = "") {
2234
- const r = e > 0 ? "-" : "+", n = Math.abs(e), i = g(Math.trunc(n / 60), 2), o = g(n % 60, 2);
2235
- return r + i + t + o;
2236
- }
2237
- const Qt = (e, t) => {
2238
- switch (e) {
2239
- case "P":
2240
- return t.date({ width: "short" });
2241
- case "PP":
2242
- return t.date({ width: "medium" });
2243
- case "PPP":
2244
- return t.date({ width: "long" });
2245
- case "PPPP":
2246
- default:
2247
- return t.date({ width: "full" });
2248
- }
2249
- }, Hr = (e, t) => {
2250
- switch (e) {
2251
- case "p":
2252
- return t.time({ width: "short" });
2253
- case "pp":
2254
- return t.time({ width: "medium" });
2255
- case "ppp":
2256
- return t.time({ width: "long" });
2257
- case "pppp":
2258
- default:
2259
- return t.time({ width: "full" });
2260
- }
2261
- }, Fi = (e, t) => {
2262
- const r = e.match(/(P+)(p+)?/) || [], n = r[1], i = r[2];
2263
- if (!i)
2264
- return Qt(e, t);
2265
- let o;
2266
- switch (n) {
2267
- case "P":
2268
- o = t.dateTime({ width: "short" });
2269
- break;
2270
- case "PP":
2271
- o = t.dateTime({ width: "medium" });
2272
- break;
2273
- case "PPP":
2274
- o = t.dateTime({ width: "long" });
2275
- break;
2276
- case "PPPP":
2277
- default:
2278
- o = t.dateTime({ width: "full" });
2279
- break;
2280
- }
2281
- return o.replace("{{date}}", Qt(n, t)).replace("{{time}}", Hr(i, t));
2282
- }, Wi = {
2283
- p: Hr,
2284
- P: Fi
2285
- }, Li = /^D+$/, Ui = /^Y+$/, zi = ["D", "DD", "YY", "YYYY"];
2286
- function $i(e) {
2287
- return Li.test(e);
2288
- }
2289
- function Vi(e) {
2290
- return Ui.test(e);
2291
- }
2292
- function Xi(e, t, r) {
2293
- const n = Qi(e, t, r);
2294
- if (console.warn(n), zi.includes(e)) throw new RangeError(n);
2295
- }
2296
- function Qi(e, t, r) {
2297
- const n = e[0] === "Y" ? "years" : "days of the month";
2298
- return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
2299
- }
2300
- const Zi = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Bi = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ki = /^'([^]*?)'?$/, Ji = /''/g, es = /[a-zA-Z]/;
2301
- function jr(e, t, r) {
2302
- var _, y, p, E, P, N, k, G;
2303
- const n = fe(), i = (r == null ? void 0 : r.locale) ?? n.locale ?? Ri, o = (r == null ? void 0 : r.firstWeekContainsDate) ?? ((y = (_ = r == null ? void 0 : r.locale) == null ? void 0 : _.options) == null ? void 0 : y.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((E = (p = n.locale) == null ? void 0 : p.options) == null ? void 0 : E.firstWeekContainsDate) ?? 1, c = (r == null ? void 0 : r.weekStartsOn) ?? ((N = (P = r == null ? void 0 : r.locale) == null ? void 0 : P.options) == null ? void 0 : N.weekStartsOn) ?? n.weekStartsOn ?? ((G = (k = n.locale) == null ? void 0 : k.options) == null ? void 0 : G.weekStartsOn) ?? 0, d = O(e, r == null ? void 0 : r.in);
2304
- if (!ri(d))
2305
- throw new RangeError("Invalid time value");
2306
- let h = t.match(Bi).map((S) => {
2307
- const T = S[0];
2308
- if (T === "p" || T === "P") {
2309
- const F = Wi[T];
2310
- return F(S, i.formatLong);
2311
- }
2312
- return S;
2313
- }).join("").match(Zi).map((S) => {
2314
- if (S === "''")
2315
- return { isToken: !1, value: "'" };
2316
- const T = S[0];
2317
- if (T === "'")
2318
- return { isToken: !1, value: ts(S) };
2319
- if ($t[T])
2320
- return { isToken: !0, value: S };
2321
- if (T.match(es))
2322
- throw new RangeError(
2323
- "Format string contains an unescaped latin alphabet character `" + T + "`"
2324
- );
2325
- return { isToken: !1, value: S };
2326
- });
2327
- i.localize.preprocessor && (h = i.localize.preprocessor(d, h));
2328
- const f = {
2329
- firstWeekContainsDate: o,
2330
- weekStartsOn: c,
2331
- locale: i
2332
- };
2333
- return h.map((S) => {
2334
- if (!S.isToken) return S.value;
2335
- const T = S.value;
2336
- (!(r != null && r.useAdditionalWeekYearTokens) && Vi(T) || !(r != null && r.useAdditionalDayOfYearTokens) && $i(T)) && Xi(T, t, String(e));
2337
- const F = $t[T[0]];
2338
- return F(d, T, i.localize, f);
2339
- }).join("");
2340
- }
2341
- function ts(e) {
2342
- const t = e.match(Ki);
2343
- return t ? t[1].replace(Ji, "'") : e;
2344
- }
2345
- function rs(e, t) {
2346
- const r = O(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = r.getMonth(), o = I(r, 0);
2347
- return o.setFullYear(n, i + 1, 0), o.setHours(0, 0, 0, 0), o.getDate();
2348
- }
2349
- function ns() {
2350
- return Object.assign({}, fe());
2351
- }
2352
- function Zt(e) {
2353
- return +O(e);
2354
- }
2355
- function Bt(e) {
2356
- return Math.trunc(+O(e) / 1e3);
2357
- }
2358
- function as(e) {
2359
- return Math.trunc(e * Qa);
2360
- }
2361
- function is(e) {
2362
- const t = e / Xa;
2363
- return Math.trunc(t);
2364
- }
2365
- function Ar(e, t, r) {
2366
- return Za(e, -1, r);
2367
- }
2368
- function Kt(e, t, r) {
2369
- const n = ns(), i = us(e, r.timeZone, r.locale ?? n.locale);
2370
- return "formatToParts" in i ? ss(i, t) : os(i, t);
2371
- }
2372
- function ss(e, t) {
2373
- const r = e.formatToParts(t);
2374
- for (let n = r.length - 1; n >= 0; --n)
2375
- if (r[n].type === "timeZoneName")
2376
- return r[n].value;
2377
- }
2378
- function os(e, t) {
2379
- const r = e.format(t).replace(/\u200E/g, ""), n = / [\w-+ ]+$/.exec(r);
2380
- return n ? n[0].substr(1) : "";
2381
- }
2382
- function us(e, t, r) {
2383
- return new Intl.DateTimeFormat(r ? [r.code, "en-US"] : void 0, {
2384
- timeZone: t,
2385
- timeZoneName: e
2386
- });
2387
- }
2388
- function cs(e, t) {
2389
- const r = ms(t);
2390
- return "formatToParts" in r ? ds(r, e) : fs(r, e);
2391
- }
2392
- const ls = {
2393
- year: 0,
2394
- month: 1,
2395
- day: 2,
2396
- hour: 3,
2397
- minute: 4,
2398
- second: 5
2399
- };
2400
- function ds(e, t) {
2401
- try {
2402
- const r = e.formatToParts(t), n = [];
2403
- for (let i = 0; i < r.length; i++) {
2404
- const o = ls[r[i].type];
2405
- o !== void 0 && (n[o] = parseInt(r[i].value, 10));
2406
- }
2407
- return n;
2408
- } catch (r) {
2409
- if (r instanceof RangeError)
2410
- return [NaN];
2411
- throw r;
2412
- }
2413
- }
2414
- function fs(e, t) {
2415
- const r = e.format(t), n = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r);
2416
- return [
2417
- parseInt(n[3], 10),
2418
- parseInt(n[1], 10),
2419
- parseInt(n[2], 10),
2420
- parseInt(n[4], 10),
2421
- parseInt(n[5], 10),
2422
- parseInt(n[6], 10)
2423
- ];
2424
- }
2425
- const Ue = {}, Jt = new Intl.DateTimeFormat("en-US", {
2426
- hourCycle: "h23",
2427
- timeZone: "America/New_York",
2428
- year: "numeric",
2429
- month: "2-digit",
2430
- day: "2-digit",
2431
- hour: "2-digit",
2432
- minute: "2-digit",
2433
- second: "2-digit"
2434
- }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), hs = Jt === "06/25/2014, 00:00:00" || Jt === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
2435
- function ms(e) {
2436
- return Ue[e] || (Ue[e] = hs ? new Intl.DateTimeFormat("en-US", {
2437
- hourCycle: "h23",
2438
- timeZone: e,
2439
- year: "numeric",
2440
- month: "numeric",
2441
- day: "2-digit",
2442
- hour: "2-digit",
2443
- minute: "2-digit",
2444
- second: "2-digit"
2445
- }) : new Intl.DateTimeFormat("en-US", {
2446
- hour12: !1,
2447
- timeZone: e,
2448
- year: "numeric",
2449
- month: "numeric",
2450
- day: "2-digit",
2451
- hour: "2-digit",
2452
- minute: "2-digit",
2453
- second: "2-digit"
2454
- })), Ue[e];
2455
- }
2456
- function st(e, t, r, n, i, o, c) {
2457
- const d = /* @__PURE__ */ new Date(0);
2458
- return d.setUTCFullYear(e, t, r), d.setUTCHours(n, i, o, c), d;
2459
- }
2460
- const er = 36e5, ys = 6e4, ze = {
2461
- timezoneZ: /^(Z)$/,
2462
- timezoneHH: /^([+-]\d{2})$/,
2463
- timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
2464
- };
2465
- function he(e, t, r) {
2466
- if (!e)
2467
- return 0;
2468
- let n = ze.timezoneZ.exec(e);
2469
- if (n)
2470
- return 0;
2471
- let i, o;
2472
- if (n = ze.timezoneHH.exec(e), n)
2473
- return i = parseInt(n[1], 10), tr(i) ? -(i * er) : NaN;
2474
- if (n = ze.timezoneHHMM.exec(e), n) {
2475
- i = parseInt(n[2], 10);
2476
- const c = parseInt(n[3], 10);
2477
- return tr(i, c) ? (o = Math.abs(i) * er + c * ys, n[1] === "+" ? -o : o) : NaN;
2478
- }
2479
- if (_s(e)) {
2480
- t = new Date(t || Date.now());
2481
- const c = r ? t : ps(t), d = Qe(c, e);
2482
- return -(r ? d : gs(t, d, e));
2483
- }
2484
- return NaN;
2485
- }
2486
- function ps(e) {
2487
- return st(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
2488
- }
2489
- function Qe(e, t) {
2490
- const r = cs(e, t), n = st(r[0], r[1] - 1, r[2], r[3] % 24, r[4], r[5], 0).getTime();
2491
- let i = e.getTime();
2492
- const o = i % 1e3;
2493
- return i -= o >= 0 ? o : 1e3 + o, n - i;
2494
- }
2495
- function gs(e, t, r) {
2496
- let i = e.getTime() - t;
2497
- const o = Qe(new Date(i), r);
2498
- if (t === o)
2499
- return t;
2500
- i -= o - t;
2501
- const c = Qe(new Date(i), r);
2502
- return o === c ? o : Math.max(o, c);
2503
- }
2504
- function tr(e, t) {
2505
- return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
2506
- }
2507
- const rr = {};
2508
- function _s(e) {
2509
- if (rr[e])
2510
- return !0;
2511
- try {
2512
- return new Intl.DateTimeFormat(void 0, { timeZone: e }), rr[e] = !0, !0;
2513
- } catch {
2514
- return !1;
2515
- }
2516
- }
2517
- const ws = 60 * 1e3, bs = {
2518
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
2519
- X: function(e, t, r) {
2520
- const n = $e(r.timeZone, e);
2521
- if (n === 0)
2522
- return "Z";
2523
- switch (t) {
2524
- case "X":
2525
- return nr(n);
2526
- case "XXXX":
2527
- case "XX":
2528
- return J(n);
2529
- case "XXXXX":
2530
- case "XXX":
2531
- default:
2532
- return J(n, ":");
2533
- }
2534
- },
2535
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
2536
- x: function(e, t, r) {
2537
- const n = $e(r.timeZone, e);
2538
- switch (t) {
2539
- case "x":
2540
- return nr(n);
2541
- case "xxxx":
2542
- case "xx":
2543
- return J(n);
2544
- case "xxxxx":
2545
- case "xxx":
2546
- default:
2547
- return J(n, ":");
2548
- }
2549
- },
2550
- // Timezone (GMT)
2551
- O: function(e, t, r) {
2552
- const n = $e(r.timeZone, e);
2553
- switch (t) {
2554
- case "O":
2555
- case "OO":
2556
- case "OOO":
2557
- return "GMT" + Ts(n, ":");
2558
- case "OOOO":
2559
- default:
2560
- return "GMT" + J(n, ":");
2561
- }
2562
- },
2563
- // Timezone (specific non-location)
2564
- z: function(e, t, r) {
2565
- switch (t) {
2566
- case "z":
2567
- case "zz":
2568
- case "zzz":
2569
- return Kt("short", e, r);
2570
- case "zzzz":
2571
- default:
2572
- return Kt("long", e, r);
2573
- }
2574
- }
2575
- };
2576
- function $e(e, t) {
2577
- const r = e ? he(e, t, !0) / ws : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
2578
- if (Number.isNaN(r))
2579
- throw new RangeError("Invalid time zone specified: " + e);
2580
- return r;
2581
- }
2582
- function Se(e, t) {
2583
- const r = e < 0 ? "-" : "";
2584
- let n = Math.abs(e).toString();
2585
- for (; n.length < t; )
2586
- n = "0" + n;
2587
- return r + n;
2588
- }
2589
- function J(e, t = "") {
2590
- const r = e > 0 ? "-" : "+", n = Math.abs(e), i = Se(Math.floor(n / 60), 2), o = Se(Math.floor(n % 60), 2);
2591
- return r + i + t + o;
2592
- }
2593
- function nr(e, t) {
2594
- return e % 60 === 0 ? (e > 0 ? "-" : "+") + Se(Math.abs(e) / 60, 2) : J(e, t);
2595
- }
2596
- function Ts(e, t = "") {
2597
- const r = e > 0 ? "-" : "+", n = Math.abs(e), i = Math.floor(n / 60), o = n % 60;
2598
- return o === 0 ? r + String(i) : r + String(i) + t + Se(o, 2);
2599
- }
2600
- function ar(e) {
2601
- const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
2602
- return t.setUTCFullYear(e.getFullYear()), +e - +t;
2603
- }
2604
- const Gr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, Ve = 36e5, ir = 6e4, Ds = 2, M = {
2605
- dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
2606
- datePattern: /^([0-9W+-]+)(.*)/,
2607
- // year tokens
2608
- YY: /^(\d{2})$/,
2609
- YYY: [
2610
- /^([+-]\d{2})$/,
2611
- // 0 additional digits
2612
- /^([+-]\d{3})$/,
2613
- // 1 additional digit
2614
- /^([+-]\d{4})$/
2615
- // 2 additional digits
2616
- ],
2617
- YYYY: /^(\d{4})/,
2618
- YYYYY: [
2619
- /^([+-]\d{4})/,
2620
- // 0 additional digits
2621
- /^([+-]\d{5})/,
2622
- // 1 additional digit
2623
- /^([+-]\d{6})/
2624
- // 2 additional digits
2625
- ],
2626
- // date tokens
2627
- MM: /^-(\d{2})$/,
2628
- DDD: /^-?(\d{3})$/,
2629
- MMDD: /^-?(\d{2})-?(\d{2})$/,
2630
- Www: /^-?W(\d{2})$/,
2631
- WwwD: /^-?W(\d{2})-?(\d{1})$/,
2632
- HH: /^(\d{2}([.,]\d*)?)$/,
2633
- HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
2634
- HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
2635
- // time zone tokens (to identify the presence of a tz)
2636
- timeZone: Gr
2637
- };
2638
- function Me(e, t = {}) {
2639
- if (arguments.length < 1)
2640
- throw new TypeError("1 argument required, but only " + arguments.length + " present");
2641
- if (e === null)
2642
- return /* @__PURE__ */ new Date(NaN);
2643
- const r = t.additionalDigits == null ? Ds : Number(t.additionalDigits);
2644
- if (r !== 2 && r !== 1 && r !== 0)
2645
- throw new RangeError("additionalDigits must be 0, 1 or 2");
2646
- if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
2647
- return new Date(e.getTime());
2648
- if (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]")
2649
- return new Date(e);
2650
- if (Object.prototype.toString.call(e) !== "[object String]")
2651
- return /* @__PURE__ */ new Date(NaN);
2652
- const n = Os(e), { year: i, restDateString: o } = Ss(n.date, r), c = Ms(o, i);
2653
- if (c === null || isNaN(c.getTime()))
2654
- return /* @__PURE__ */ new Date(NaN);
2655
- if (c) {
2656
- const d = c.getTime();
2657
- let h = 0, f;
2658
- if (n.time && (h = vs(n.time), h === null || isNaN(h)))
2659
- return /* @__PURE__ */ new Date(NaN);
2660
- if (n.timeZone || t.timeZone) {
2661
- if (f = he(n.timeZone || t.timeZone, new Date(d + h)), isNaN(f))
2662
- return /* @__PURE__ */ new Date(NaN);
2663
- } else
2664
- f = ar(new Date(d + h)), f = ar(new Date(d + h + f));
2665
- return new Date(d + h + f);
2666
- } else
2667
- return /* @__PURE__ */ new Date(NaN);
2668
- }
2669
- function Os(e) {
2670
- const t = {};
2671
- let r = M.dateTimePattern.exec(e), n;
2672
- if (r ? (t.date = r[1], n = r[3]) : (r = M.datePattern.exec(e), r ? (t.date = r[1], n = r[2]) : (t.date = null, n = e)), n) {
2673
- const i = M.timeZone.exec(n);
2674
- i ? (t.time = n.replace(i[1], ""), t.timeZone = i[1].trim()) : t.time = n;
2675
- }
2676
- return t;
2677
- }
2678
- function Ss(e, t) {
2679
- if (e) {
2680
- const r = M.YYY[t], n = M.YYYYY[t];
2681
- let i = M.YYYY.exec(e) || n.exec(e);
2682
- if (i) {
2683
- const o = i[1];
2684
- return {
2685
- year: parseInt(o, 10),
2686
- restDateString: e.slice(o.length)
2687
- };
2688
- }
2689
- if (i = M.YY.exec(e) || r.exec(e), i) {
2690
- const o = i[1];
2691
- return {
2692
- year: parseInt(o, 10) * 100,
2693
- restDateString: e.slice(o.length)
2694
- };
2695
- }
2696
- }
2697
- return {
2698
- year: null
2699
- };
2700
- }
2701
- function Ms(e, t) {
2702
- if (t === null)
2703
- return null;
2704
- let r, n, i;
2705
- if (!e || !e.length)
2706
- return r = /* @__PURE__ */ new Date(0), r.setUTCFullYear(t), r;
2707
- let o = M.MM.exec(e);
2708
- if (o)
2709
- return r = /* @__PURE__ */ new Date(0), n = parseInt(o[1], 10) - 1, or(t, n) ? (r.setUTCFullYear(t, n), r) : /* @__PURE__ */ new Date(NaN);
2710
- if (o = M.DDD.exec(e), o) {
2711
- r = /* @__PURE__ */ new Date(0);
2712
- const c = parseInt(o[1], 10);
2713
- return Ps(t, c) ? (r.setUTCFullYear(t, 0, c), r) : /* @__PURE__ */ new Date(NaN);
2714
- }
2715
- if (o = M.MMDD.exec(e), o) {
2716
- r = /* @__PURE__ */ new Date(0), n = parseInt(o[1], 10) - 1;
2717
- const c = parseInt(o[2], 10);
2718
- return or(t, n, c) ? (r.setUTCFullYear(t, n, c), r) : /* @__PURE__ */ new Date(NaN);
2719
- }
2720
- if (o = M.Www.exec(e), o)
2721
- return i = parseInt(o[1], 10) - 1, ur(i) ? sr(t, i) : /* @__PURE__ */ new Date(NaN);
2722
- if (o = M.WwwD.exec(e), o) {
2723
- i = parseInt(o[1], 10) - 1;
2724
- const c = parseInt(o[2], 10) - 1;
2725
- return ur(i, c) ? sr(t, i, c) : /* @__PURE__ */ new Date(NaN);
2726
- }
2727
- return null;
2728
- }
2729
- function vs(e) {
2730
- let t, r, n = M.HH.exec(e);
2731
- if (n)
2732
- return t = parseFloat(n[1].replace(",", ".")), Xe(t) ? t % 24 * Ve : NaN;
2733
- if (n = M.HHMM.exec(e), n)
2734
- return t = parseInt(n[1], 10), r = parseFloat(n[2].replace(",", ".")), Xe(t, r) ? t % 24 * Ve + r * ir : NaN;
2735
- if (n = M.HHMMSS.exec(e), n) {
2736
- t = parseInt(n[1], 10), r = parseInt(n[2], 10);
2737
- const i = parseFloat(n[3].replace(",", "."));
2738
- return Xe(t, r, i) ? t % 24 * Ve + r * ir + i * 1e3 : NaN;
2739
- }
2740
- return null;
2741
- }
2742
- function sr(e, t, r) {
2743
- t = t || 0, r = r || 0;
2744
- const n = /* @__PURE__ */ new Date(0);
2745
- n.setUTCFullYear(e, 0, 4);
2746
- const i = n.getUTCDay() || 7, o = t * 7 + r + 1 - i;
2747
- return n.setUTCDate(n.getUTCDate() + o), n;
2748
- }
2749
- const xs = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Es = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2750
- function Fr(e) {
2751
- return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
2752
- }
2753
- function or(e, t, r) {
2754
- if (t < 0 || t > 11)
2755
- return !1;
2756
- if (r != null) {
2757
- if (r < 1)
2758
- return !1;
2759
- const n = Fr(e);
2760
- if (n && r > Es[t] || !n && r > xs[t])
2761
- return !1;
2762
- }
2763
- return !0;
2764
- }
2765
- function Ps(e, t) {
2766
- if (t < 1)
2767
- return !1;
2768
- const r = Fr(e);
2769
- return !(r && t > 366 || !r && t > 365);
2770
- }
2771
- function ur(e, t) {
2772
- return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
2773
- }
2774
- function Xe(e, t, r) {
2775
- return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || r != null && (r < 0 || r >= 60));
2776
- }
2777
- const Ns = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
2778
- function Cs(e, t, r = {}) {
2779
- t = String(t);
2780
- const n = t.match(Ns);
2781
- if (n) {
2782
- const i = Me(r.originalDate || e, r);
2783
- t = n.reduce(function(o, c) {
2784
- if (c[0] === "'")
2785
- return o;
2786
- const d = o.indexOf(c), h = o[d - 1] === "'", f = o.replace(c, "'" + bs[c[0]](i, c, r) + "'");
2787
- return h ? f.substring(0, d - 1) + f.substring(d + 1) : f;
2788
- }, t);
2789
- }
2790
- return jr(e, t, r);
2791
- }
2792
- function Wr(e, t, r) {
2793
- e = Me(e, r);
2794
- const n = he(t, e, !0), i = new Date(e.getTime() - n), o = /* @__PURE__ */ new Date(0);
2795
- return o.setFullYear(i.getUTCFullYear(), i.getUTCMonth(), i.getUTCDate()), o.setHours(i.getUTCHours(), i.getUTCMinutes(), i.getUTCSeconds(), i.getUTCMilliseconds()), o;
2796
- }
2797
- function Is(e, t, r, n) {
2798
- return n = {
2799
- ...n,
2800
- timeZone: t,
2801
- originalDate: e
2802
- }, Cs(Wr(e, t, { timeZone: n.timeZone }), r, n);
2803
- }
2804
- function ks(e, t, r) {
2805
- if (typeof e == "string" && !e.match(Gr))
2806
- return Me(e, { ...r, timeZone: t });
2807
- e = Me(e, r);
2808
- const n = st(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()).getTime(), i = he(t, new Date(n));
2809
- return new Date(n + i);
2810
- }
2811
- function Lr(e, t) {
2812
- return -he(e, t);
2813
- }
2814
- function oo(e) {
2815
- return jr(e, "yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
2816
- }
2817
- function cr(e, t = {}) {
2818
- if (!e)
2819
- return e;
2820
- const r = t.tz || Intl.DateTimeFormat().resolvedOptions().timeZone;
2821
- try {
2822
- let n = "MMM dd, yyy hh:mm a";
2823
- t.short && (n = "MMM dd, yyy"), t.includeTZ && (n += " (z)");
2824
- const i = new Date(e);
2825
- return Is(i, r, n);
2826
- } catch {
2827
- return console.error("Invalid value passed to formatTime", e), "(invalid date)";
2828
- }
2829
- }
2830
- function uo(e, t) {
2831
- return `${cr(e.getTime())} - ${cr(t.getTime(), { includeTZ: !0 })}`;
2832
- }
2833
- const ve = {
2834
- secondly: 1e3,
2835
- tenSecondly: 10 * 1e3,
2836
- thirtySecondly: 30 * 1e3,
2837
- minutely: 60 * 1e3,
2838
- fiveMinutely: 5 * 60 * 1e3,
2839
- tenMinutely: 10 * 60 * 1e3,
2840
- thirtyMinutely: 30 * 60 * 1e3,
2841
- hourly: 60 * 60 * 1e3,
2842
- twoHourly: 2 * 60 * 60 * 1e3,
2843
- twelveHourly: 12 * 60 * 60 * 1e3,
2844
- daily: 60 * 60 * 24 * 1e3,
2845
- weekly: 60 * 60 * 24 * 7 * 1e3,
2846
- trend: 0
2847
- };
2848
- function co(e, t) {
2849
- return e.map((r) => ({
2850
- value: r,
2851
- label: t.t(`configuration.vitals.reports.granularity.${r}`)
2852
- }));
2853
- }
2854
- function Ys(e, t) {
2855
- return {
2856
- duration: e,
2857
- type: "duration",
2858
- origin: t
2859
- };
2860
- }
2861
- function lo(e) {
2862
- return e && Ze.find((r) => e <= ve[r]) || null;
2863
- }
2864
- function Ur(e, t, r, n) {
2865
- const i = ve[r];
2866
- let o = 0;
2867
- return i >= ve.daily && (n ? o = -Lr(n, t) : o = t.getTimezoneOffset() * 60 * 1e3), new Date(e((t.getTime() - o) / i) * i + o);
2868
- }
2869
- function qs(e, t, r) {
2870
- return Ur(Math.floor, e, t, r);
2871
- }
2872
- function zr(e, t, r) {
2873
- return Ur(Math.ceil, e, t, r);
2874
- }
2875
- class Ce {
2876
- constructor(t, r, n) {
2877
- b(this, "timeframe");
2878
- b(this, "tz");
2879
- b(this, "dataGranularity");
2880
- if (this.constructor === Ce)
2881
- throw new Error("BaseQueryTime is not meant to be used directly.");
2882
- this.timeframe = t, this.tz = r, this.dataGranularity = n ?? t.dataGranularity;
2883
- }
2884
- calculateStartDate(t, r, n = 1) {
2885
- if (t)
2886
- return new Date(this.endDate().getTime() - this.timeframe.timeframeLengthMs() * n);
2887
- {
2888
- const i = this.endDate(), o = this.timeframe.rawStart(this.tz), c = qs(o, r, this.tz), h = (i.getTime() - c.getTime()) * (n - 1);
2889
- return new Date(c.getTime() - h);
2890
- }
2891
- }
2892
- granularitySeconds() {
2893
- return Math.floor(this.granularityMs() / 1e3);
2894
- }
2895
- granularityDruid() {
2896
- return Ys(this.granularityMs(), this.startDate().toISOString());
2897
- }
2898
- // Return a UNIX timestamp suitable for use in the `start` query param.
2899
- startSeconds() {
2900
- return Bt(this.startDate());
2901
- }
2902
- // Return a UNIX timestamp suitable for use in the `end` query param.
2903
- endSeconds() {
2904
- return Bt(this.endDate());
2905
- }
2906
- // Return epoch time in milliseconds, suitable for use in the `startMs` query param.
2907
- startMs() {
2908
- return Zt(this.startDate());
2909
- }
2910
- // Return epoch time in milliseconds, suitable for use in the `endMs` query param.
2911
- endMs() {
2912
- return Zt(this.endDate());
2913
- }
2914
- }
2915
- class fo extends Ce {
2916
- constructor(r, n, i, o, c) {
2917
- super(r, i, o);
2918
- b(this, "granularity");
2919
- n && r.allowedGranularities(c).has(n) ? this.granularity = n : c ? this.granularity = r.fineGrainedDefaultGranularity ?? r.defaultResponseGranularity : this.granularity = r.defaultResponseGranularity;
2920
- }
2921
- startDate() {
2922
- return this.calculateStartDate(this.timeframe.isRelative, this.granularity);
2923
- }
2924
- endDate() {
2925
- return zr(this.timeframe.rawEnd(), this.granularity, this.tz);
2926
- }
2927
- granularityMs() {
2928
- return ve[this.granularity];
2929
- }
2930
- }
2931
- class Rs extends Ce {
2932
- startDate() {
2933
- return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity);
2934
- }
2935
- endDate() {
2936
- return zr(this.timeframe.rawEnd(this.tz), this.dataGranularity, this.tz);
2937
- }
2938
- granularityMs() {
2939
- return this.endDate().getTime() - this.startDate().getTime();
2940
- }
2941
- }
2942
- class ho extends Rs {
2943
- startDate() {
2944
- return this.calculateStartDate(this.timeframe.isRelative, this.dataGranularity, 2);
2945
- }
2946
- granularityMs() {
2947
- return this.endDate().getTime() - super.startDate().getTime();
2948
- }
2949
- }
2950
- var Te = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2951
- function Hs(e) {
2952
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
2953
- }
2954
- var xe = { exports: {} };
2955
- xe.exports;
2956
- (function(e, t) {
2957
- var r = 200, n = "__lodash_hash_undefined__", i = 9007199254740991, o = "[object Arguments]", c = "[object Array]", d = "[object Boolean]", h = "[object Date]", f = "[object Error]", _ = "[object Function]", y = "[object GeneratorFunction]", p = "[object Map]", E = "[object Number]", P = "[object Object]", N = "[object Promise]", k = "[object RegExp]", G = "[object Set]", S = "[object String]", T = "[object Symbol]", F = "[object WeakMap]", ut = "[object ArrayBuffer]", me = "[object DataView]", ct = "[object Float32Array]", lt = "[object Float64Array]", dt = "[object Int8Array]", ft = "[object Int16Array]", ht = "[object Int32Array]", mt = "[object Uint8Array]", yt = "[object Uint8ClampedArray]", pt = "[object Uint16Array]", gt = "[object Uint32Array]", Vr = /[\\^$.*+?()[\]{}|]/g, Xr = /\w*$/, Qr = /^\[object .+?Constructor\]$/, Zr = /^(?:0|[1-9]\d*)$/, w = {};
2958
- w[o] = w[c] = w[ut] = w[me] = w[d] = w[h] = w[ct] = w[lt] = w[dt] = w[ft] = w[ht] = w[p] = w[E] = w[P] = w[k] = w[G] = w[S] = w[T] = w[mt] = w[yt] = w[pt] = w[gt] = !0, w[f] = w[_] = w[F] = !1;
2959
- var Br = typeof Te == "object" && Te && Te.Object === Object && Te, Kr = typeof self == "object" && self && self.Object === Object && self, Y = Br || Kr || Function("return this")(), _t = t && !t.nodeType && t, wt = _t && !0 && e && !e.nodeType && e, Jr = wt && wt.exports === _t;
2960
- function en(a, s) {
2961
- return a.set(s[0], s[1]), a;
2962
- }
2963
- function tn(a, s) {
2964
- return a.add(s), a;
2965
- }
2966
- function rn(a, s) {
2967
- for (var u = -1, l = a ? a.length : 0; ++u < l && s(a[u], u, a) !== !1; )
2968
- ;
2969
- return a;
2970
- }
2971
- function nn(a, s) {
2972
- for (var u = -1, l = s.length, D = a.length; ++u < l; )
2973
- a[D + u] = s[u];
2974
- return a;
2975
- }
2976
- function bt(a, s, u, l) {
2977
- for (var D = -1, v = a ? a.length : 0; ++D < v; )
2978
- u = s(u, a[D], D, a);
2979
- return u;
2980
- }
2981
- function an(a, s) {
2982
- for (var u = -1, l = Array(a); ++u < a; )
2983
- l[u] = s(u);
2984
- return l;
2985
- }
2986
- function sn(a, s) {
2987
- return a == null ? void 0 : a[s];
2988
- }
2989
- function Tt(a) {
2990
- var s = !1;
2991
- if (a != null && typeof a.toString != "function")
2992
- try {
2993
- s = !!(a + "");
2994
- } catch {
2995
- }
2996
- return s;
2997
- }
2998
- function Dt(a) {
2999
- var s = -1, u = Array(a.size);
3000
- return a.forEach(function(l, D) {
3001
- u[++s] = [D, l];
3002
- }), u;
3003
- }
3004
- function Ie(a, s) {
3005
- return function(u) {
3006
- return a(s(u));
3007
- };
3008
- }
3009
- function Ot(a) {
3010
- var s = -1, u = Array(a.size);
3011
- return a.forEach(function(l) {
3012
- u[++s] = l;
3013
- }), u;
3014
- }
3015
- var on = Array.prototype, un = Function.prototype, ye = Object.prototype, ke = Y["__core-js_shared__"], St = function() {
3016
- var a = /[^.]+$/.exec(ke && ke.keys && ke.keys.IE_PROTO || "");
3017
- return a ? "Symbol(src)_1." + a : "";
3018
- }(), Mt = un.toString, j = ye.hasOwnProperty, pe = ye.toString, cn = RegExp(
3019
- "^" + Mt.call(j).replace(Vr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
3020
- ), vt = Jr ? Y.Buffer : void 0, xt = Y.Symbol, Et = Y.Uint8Array, ln = Ie(Object.getPrototypeOf, Object), dn = Object.create, fn = ye.propertyIsEnumerable, hn = on.splice, Pt = Object.getOwnPropertySymbols, mn = vt ? vt.isBuffer : void 0, yn = Ie(Object.keys, Object), Ye = Z(Y, "DataView"), ie = Z(Y, "Map"), qe = Z(Y, "Promise"), Re = Z(Y, "Set"), He = Z(Y, "WeakMap"), se = Z(Object, "create"), pn = U(Ye), gn = U(ie), _n = U(qe), wn = U(Re), bn = U(He), Nt = xt ? xt.prototype : void 0, Ct = Nt ? Nt.valueOf : void 0;
3021
- function W(a) {
3022
- var s = -1, u = a ? a.length : 0;
3023
- for (this.clear(); ++s < u; ) {
3024
- var l = a[s];
3025
- this.set(l[0], l[1]);
3026
- }
3027
- }
3028
- function Tn() {
3029
- this.__data__ = se ? se(null) : {};
3030
- }
3031
- function Dn(a) {
3032
- return this.has(a) && delete this.__data__[a];
3033
- }
3034
- function On(a) {
3035
- var s = this.__data__;
3036
- if (se) {
3037
- var u = s[a];
3038
- return u === n ? void 0 : u;
3039
- }
3040
- return j.call(s, a) ? s[a] : void 0;
3041
- }
3042
- function Sn(a) {
3043
- var s = this.__data__;
3044
- return se ? s[a] !== void 0 : j.call(s, a);
3045
- }
3046
- function Mn(a, s) {
3047
- var u = this.__data__;
3048
- return u[a] = se && s === void 0 ? n : s, this;
3049
- }
3050
- W.prototype.clear = Tn, W.prototype.delete = Dn, W.prototype.get = On, W.prototype.has = Sn, W.prototype.set = Mn;
3051
- function q(a) {
3052
- var s = -1, u = a ? a.length : 0;
3053
- for (this.clear(); ++s < u; ) {
3054
- var l = a[s];
3055
- this.set(l[0], l[1]);
3056
- }
3057
- }
3058
- function vn() {
3059
- this.__data__ = [];
3060
- }
3061
- function xn(a) {
3062
- var s = this.__data__, u = ge(s, a);
3063
- if (u < 0)
3064
- return !1;
3065
- var l = s.length - 1;
3066
- return u == l ? s.pop() : hn.call(s, u, 1), !0;
3067
- }
3068
- function En(a) {
3069
- var s = this.__data__, u = ge(s, a);
3070
- return u < 0 ? void 0 : s[u][1];
3071
- }
3072
- function Pn(a) {
3073
- return ge(this.__data__, a) > -1;
3074
- }
3075
- function Nn(a, s) {
3076
- var u = this.__data__, l = ge(u, a);
3077
- return l < 0 ? u.push([a, s]) : u[l][1] = s, this;
3078
- }
3079
- q.prototype.clear = vn, q.prototype.delete = xn, q.prototype.get = En, q.prototype.has = Pn, q.prototype.set = Nn;
3080
- function X(a) {
3081
- var s = -1, u = a ? a.length : 0;
3082
- for (this.clear(); ++s < u; ) {
3083
- var l = a[s];
3084
- this.set(l[0], l[1]);
3085
- }
3086
- }
3087
- function Cn() {
3088
- this.__data__ = {
3089
- hash: new W(),
3090
- map: new (ie || q)(),
3091
- string: new W()
3092
- };
3093
- }
3094
- function In(a) {
3095
- return _e(this, a).delete(a);
3096
- }
3097
- function kn(a) {
3098
- return _e(this, a).get(a);
3099
- }
3100
- function Yn(a) {
3101
- return _e(this, a).has(a);
3102
- }
3103
- function qn(a, s) {
3104
- return _e(this, a).set(a, s), this;
3105
- }
3106
- X.prototype.clear = Cn, X.prototype.delete = In, X.prototype.get = kn, X.prototype.has = Yn, X.prototype.set = qn;
3107
- function Q(a) {
3108
- this.__data__ = new q(a);
3109
- }
3110
- function Rn() {
3111
- this.__data__ = new q();
3112
- }
3113
- function Hn(a) {
3114
- return this.__data__.delete(a);
3115
- }
3116
- function jn(a) {
3117
- return this.__data__.get(a);
3118
- }
3119
- function An(a) {
3120
- return this.__data__.has(a);
3121
- }
3122
- function Gn(a, s) {
3123
- var u = this.__data__;
3124
- if (u instanceof q) {
3125
- var l = u.__data__;
3126
- if (!ie || l.length < r - 1)
3127
- return l.push([a, s]), this;
3128
- u = this.__data__ = new X(l);
3129
- }
3130
- return u.set(a, s), this;
3131
- }
3132
- Q.prototype.clear = Rn, Q.prototype.delete = Hn, Q.prototype.get = jn, Q.prototype.has = An, Q.prototype.set = Gn;
3133
- function Fn(a, s) {
3134
- var u = Ge(a) || da(a) ? an(a.length, String) : [], l = u.length, D = !!l;
3135
- for (var v in a)
3136
- j.call(a, v) && !(D && (v == "length" || oa(v, l))) && u.push(v);
3137
- return u;
3138
- }
3139
- function It(a, s, u) {
3140
- var l = a[s];
3141
- (!(j.call(a, s) && Rt(l, u)) || u === void 0 && !(s in a)) && (a[s] = u);
3142
- }
3143
- function ge(a, s) {
3144
- for (var u = a.length; u--; )
3145
- if (Rt(a[u][0], s))
3146
- return u;
3147
- return -1;
3148
- }
3149
- function Wn(a, s) {
3150
- return a && kt(s, Fe(s), a);
3151
- }
3152
- function je(a, s, u, l, D, v, R) {
3153
- var x;
3154
- if (l && (x = v ? l(a, D, v, R) : l(a)), x !== void 0)
3155
- return x;
3156
- if (!we(a))
3157
- return a;
3158
- var At = Ge(a);
3159
- if (At) {
3160
- if (x = aa(a), !s)
3161
- return ta(a, x);
3162
- } else {
3163
- var B = L(a), Gt = B == _ || B == y;
3164
- if (ha(a))
3165
- return Xn(a, s);
3166
- if (B == P || B == o || Gt && !v) {
3167
- if (Tt(a))
3168
- return v ? a : {};
3169
- if (x = ia(Gt ? {} : a), !s)
3170
- return ra(a, Wn(x, a));
3171
- } else {
3172
- if (!w[B])
3173
- return v ? a : {};
3174
- x = sa(a, B, je, s);
3175
- }
3176
- }
3177
- R || (R = new Q());
3178
- var Ft = R.get(a);
3179
- if (Ft)
3180
- return Ft;
3181
- if (R.set(a, x), !At)
3182
- var Wt = u ? na(a) : Fe(a);
3183
- return rn(Wt || a, function(We, be) {
3184
- Wt && (be = We, We = a[be]), It(x, be, je(We, s, u, l, be, a, R));
3185
- }), x;
3186
- }
3187
- function Ln(a) {
3188
- return we(a) ? dn(a) : {};
3189
- }
3190
- function Un(a, s, u) {
3191
- var l = s(a);
3192
- return Ge(a) ? l : nn(l, u(a));
3193
- }
3194
- function zn(a) {
3195
- return pe.call(a);
3196
- }
3197
- function $n(a) {
3198
- if (!we(a) || ca(a))
3199
- return !1;
3200
- var s = jt(a) || Tt(a) ? cn : Qr;
3201
- return s.test(U(a));
3202
- }
3203
- function Vn(a) {
3204
- if (!qt(a))
3205
- return yn(a);
3206
- var s = [];
3207
- for (var u in Object(a))
3208
- j.call(a, u) && u != "constructor" && s.push(u);
3209
- return s;
3210
- }
3211
- function Xn(a, s) {
3212
- if (s)
3213
- return a.slice();
3214
- var u = new a.constructor(a.length);
3215
- return a.copy(u), u;
3216
- }
3217
- function Ae(a) {
3218
- var s = new a.constructor(a.byteLength);
3219
- return new Et(s).set(new Et(a)), s;
3220
- }
3221
- function Qn(a, s) {
3222
- var u = s ? Ae(a.buffer) : a.buffer;
3223
- return new a.constructor(u, a.byteOffset, a.byteLength);
3224
- }
3225
- function Zn(a, s, u) {
3226
- var l = s ? u(Dt(a), !0) : Dt(a);
3227
- return bt(l, en, new a.constructor());
3228
- }
3229
- function Bn(a) {
3230
- var s = new a.constructor(a.source, Xr.exec(a));
3231
- return s.lastIndex = a.lastIndex, s;
3232
- }
3233
- function Kn(a, s, u) {
3234
- var l = s ? u(Ot(a), !0) : Ot(a);
3235
- return bt(l, tn, new a.constructor());
3236
- }
3237
- function Jn(a) {
3238
- return Ct ? Object(Ct.call(a)) : {};
3239
- }
3240
- function ea(a, s) {
3241
- var u = s ? Ae(a.buffer) : a.buffer;
3242
- return new a.constructor(u, a.byteOffset, a.length);
3243
- }
3244
- function ta(a, s) {
3245
- var u = -1, l = a.length;
3246
- for (s || (s = Array(l)); ++u < l; )
3247
- s[u] = a[u];
3248
- return s;
3249
- }
3250
- function kt(a, s, u, l) {
3251
- u || (u = {});
3252
- for (var D = -1, v = s.length; ++D < v; ) {
3253
- var R = s[D], x = void 0;
3254
- It(u, R, x === void 0 ? a[R] : x);
3255
- }
3256
- return u;
3257
- }
3258
- function ra(a, s) {
3259
- return kt(a, Yt(a), s);
3260
- }
3261
- function na(a) {
3262
- return Un(a, Fe, Yt);
3263
- }
3264
- function _e(a, s) {
3265
- var u = a.__data__;
3266
- return ua(s) ? u[typeof s == "string" ? "string" : "hash"] : u.map;
3267
- }
3268
- function Z(a, s) {
3269
- var u = sn(a, s);
3270
- return $n(u) ? u : void 0;
3271
- }
3272
- var Yt = Pt ? Ie(Pt, Object) : pa, L = zn;
3273
- (Ye && L(new Ye(new ArrayBuffer(1))) != me || ie && L(new ie()) != p || qe && L(qe.resolve()) != N || Re && L(new Re()) != G || He && L(new He()) != F) && (L = function(a) {
3274
- var s = pe.call(a), u = s == P ? a.constructor : void 0, l = u ? U(u) : void 0;
3275
- if (l)
3276
- switch (l) {
3277
- case pn:
3278
- return me;
3279
- case gn:
3280
- return p;
3281
- case _n:
3282
- return N;
3283
- case wn:
3284
- return G;
3285
- case bn:
3286
- return F;
3287
- }
3288
- return s;
3289
- });
3290
- function aa(a) {
3291
- var s = a.length, u = a.constructor(s);
3292
- return s && typeof a[0] == "string" && j.call(a, "index") && (u.index = a.index, u.input = a.input), u;
3293
- }
3294
- function ia(a) {
3295
- return typeof a.constructor == "function" && !qt(a) ? Ln(ln(a)) : {};
3296
- }
3297
- function sa(a, s, u, l) {
3298
- var D = a.constructor;
3299
- switch (s) {
3300
- case ut:
3301
- return Ae(a);
3302
- case d:
3303
- case h:
3304
- return new D(+a);
3305
- case me:
3306
- return Qn(a, l);
3307
- case ct:
3308
- case lt:
3309
- case dt:
3310
- case ft:
3311
- case ht:
3312
- case mt:
3313
- case yt:
3314
- case pt:
3315
- case gt:
3316
- return ea(a, l);
3317
- case p:
3318
- return Zn(a, l, u);
3319
- case E:
3320
- case S:
3321
- return new D(a);
3322
- case k:
3323
- return Bn(a);
3324
- case G:
3325
- return Kn(a, l, u);
3326
- case T:
3327
- return Jn(a);
3328
- }
3329
- }
3330
- function oa(a, s) {
3331
- return s = s ?? i, !!s && (typeof a == "number" || Zr.test(a)) && a > -1 && a % 1 == 0 && a < s;
3332
- }
3333
- function ua(a) {
3334
- var s = typeof a;
3335
- return s == "string" || s == "number" || s == "symbol" || s == "boolean" ? a !== "__proto__" : a === null;
3336
- }
3337
- function ca(a) {
3338
- return !!St && St in a;
3339
- }
3340
- function qt(a) {
3341
- var s = a && a.constructor, u = typeof s == "function" && s.prototype || ye;
3342
- return a === u;
3343
- }
3344
- function U(a) {
3345
- if (a != null) {
3346
- try {
3347
- return Mt.call(a);
3348
- } catch {
3349
- }
3350
- try {
3351
- return a + "";
3352
- } catch {
3353
- }
3354
- }
3355
- return "";
3356
- }
3357
- function la(a) {
3358
- return je(a, !0, !0);
3359
- }
3360
- function Rt(a, s) {
3361
- return a === s || a !== a && s !== s;
3362
- }
3363
- function da(a) {
3364
- return fa(a) && j.call(a, "callee") && (!fn.call(a, "callee") || pe.call(a) == o);
3365
- }
3366
- var Ge = Array.isArray;
3367
- function Ht(a) {
3368
- return a != null && ma(a.length) && !jt(a);
3369
- }
3370
- function fa(a) {
3371
- return ya(a) && Ht(a);
3372
- }
3373
- var ha = mn || ga;
3374
- function jt(a) {
3375
- var s = we(a) ? pe.call(a) : "";
3376
- return s == _ || s == y;
3377
- }
3378
- function ma(a) {
3379
- return typeof a == "number" && a > -1 && a % 1 == 0 && a <= i;
3380
- }
3381
- function we(a) {
3382
- var s = typeof a;
3383
- return !!a && (s == "object" || s == "function");
3384
- }
3385
- function ya(a) {
3386
- return !!a && typeof a == "object";
3387
- }
3388
- function Fe(a) {
3389
- return Ht(a) ? Fn(a) : Vn(a);
3390
- }
3391
- function pa() {
3392
- return [];
3393
- }
3394
- function ga() {
3395
- return !1;
3396
- }
3397
- e.exports = la;
3398
- })(xe, xe.exports);
3399
- var js = xe.exports;
3400
- const As = /* @__PURE__ */ Hs(js), te = (e, t) => new Date(e.getTime() - Lr(t, e));
3401
- class C {
3402
- constructor(t) {
3403
- b(this, "timeframeText");
3404
- b(this, "key");
3405
- b(this, "display");
3406
- b(this, "timeframeLength");
3407
- b(this, "allowedTiers");
3408
- // defaultResponseGranularity tracks which of the allowed granularities is picked for a given
3409
- // timeframe if the user does not or cannot specify a granularity.
3410
- b(this, "defaultResponseGranularity");
3411
- // dataGranularity tracks the granularity of the available data on the server for a specific timeframe.
3412
- // As of writing, it's always the same as the default response granularity, but it may not always be.
3413
- // It controls how timeframes are rounded to ensure complete time buckets from the server.
3414
- b(this, "dataGranularity");
3415
- // isRelative impacts whether we take the `floor` or the `ceil` of the start time.
3416
- // If the time range is relative, we want the ceil -- because we take the ceil of the
3417
- // end time to make sure we're showing all the data we can for the last time bucket.
3418
- // If the time range is absolute, we want the floor -- because otherwise we wouldn't be including
3419
- // the first time bucket.
3420
- b(this, "isRelative");
3421
- b(this, "fineGrainedDefaultGranularity");
3422
- b(this, "_startCustom");
3423
- b(this, "_endCustom");
3424
- b(this, "_allowedGranularitiesOverride");
3425
- this.display = t.display, this.timeframeText = t.timeframeText, this.key = t.key, this.timeframeLength = t.timeframeLength, this.allowedTiers = t.allowedTiers, this.defaultResponseGranularity = t.defaultResponseGranularity, this.dataGranularity = t.dataGranularity, this.isRelative = t.isRelative, this._startCustom = t.startCustom, this._endCustom = t.endCustom, this._allowedGranularitiesOverride = t.allowedGranularitiesOverride, this.fineGrainedDefaultGranularity = t.fineGrainedDefaultGranularity;
3426
- }
3427
- // rawEnd does not consider granularity and should not be used directly in queries.
3428
- // Use `new QueryTime(timeframe, granularity?).queryEndSeconds()` instead.
3429
- // eslint-disable-next-line -- `tz` is required because it's used in subclasses.
3430
- rawEnd(t) {
3431
- return this._endCustom || /* @__PURE__ */ new Date();
3432
- }
3433
- // rawStart does not consider granularity and should not be used directly in queries.
3434
- // Use `new QueryTime(timeframe, granularity?).queryStartSeconds()` instead.
3435
- // eslint-disable-next-line -- `tz` is required because it's used in subclasses.
3436
- rawStart(t) {
3437
- return this._startCustom || new Date(this.rawEnd().getTime() - this.timeframeLengthMs());
3438
- }
3439
- timeframeLengthMs() {
3440
- return this.timeframeLength() * 1e3;
3441
- }
3442
- maximumTimeframeLength() {
3443
- return this.timeframeLength();
3444
- }
3445
- allowedGranularities(t) {
3446
- if (this._allowedGranularitiesOverride && t)
3447
- return new Set(this._allowedGranularitiesOverride);
3448
- const r = /* @__PURE__ */ new Set(), n = this.maximumTimeframeLength() / 3600;
3449
- return n <= 6 && r.add("minutely"), n >= 2 && n <= 7 * 24 && r.add("hourly"), n >= 2 * 24 && r.add("daily"), n >= 2 * 24 * 14 && r.add("weekly"), r;
3450
- }
3451
- cacheKey() {
3452
- return this.key !== "custom" ? this.key : `${this.rawStart().toISOString()}-${this.rawEnd().toISOString()}`;
3453
- }
3454
- v4Query(t) {
3455
- return this.key === "custom" ? {
3456
- type: "absolute",
3457
- start: this.rawStart(),
3458
- end: this.rawEnd(),
3459
- tz: t
3460
- } : {
3461
- type: "relative",
3462
- time_range: this.key,
3463
- tz: t
3464
- };
3465
- }
3466
- tzAdjustedDate(t) {
3467
- if (!t)
3468
- return /* @__PURE__ */ new Date();
3469
- const r = ks(/* @__PURE__ */ new Date(), new Intl.DateTimeFormat().resolvedOptions().timeZone);
3470
- return Wr(r, t);
3471
- }
3472
- }
3473
- class Gs extends C {
3474
- rawStart(t) {
3475
- let r = H(this.tzAdjustedDate(t), { weekStartsOn: 1 });
3476
- return t && (r = te(r, t)), r;
3477
- }
3478
- maximumTimeframeLength() {
3479
- return 60 * 60 * 24 * 7;
3480
- }
3481
- }
3482
- class Fs extends C {
3483
- rawStart(t) {
3484
- let r = ee(this.tzAdjustedDate(t));
3485
- return t && (r = te(r, t)), r;
3486
- }
3487
- maximumTimeframeLength() {
3488
- return 60 * 60 * 24 * 31;
3489
- }
3490
- }
3491
- class Ws extends C {
3492
- rawEnd(t) {
3493
- let r = H(this.tzAdjustedDate(t), { weekStartsOn: 1 });
3494
- return t && (r = te(r, t)), r;
3495
- }
3496
- rawStart(t) {
3497
- const r = this.tzAdjustedDate(t);
3498
- let n = H(r.setDate(r.getDate() - 7), {
3499
- weekStartsOn: 1
3500
- });
3501
- return t && (n = te(n, t)), n;
3502
- }
3503
- }
3504
- class Ls extends C {
3505
- rawEnd(t) {
3506
- let r = ee(this.tzAdjustedDate(t));
3507
- return t && (r = te(r, t)), r;
3508
- }
3509
- rawStart(t) {
3510
- let r = ee(Ar(this.tzAdjustedDate(t)));
3511
- return t && (r = te(r, t)), r;
3512
- }
3513
- }
3514
- const Us = /* @__PURE__ */ new Map([
3515
- [
3516
- m.FIFTEEN_MIN,
3517
- new C({
3518
- key: m.FIFTEEN_MIN,
3519
- display: "Last 15 minutes",
3520
- timeframeText: "15 minutes",
3521
- timeframeLength: () => 60 * 15,
3522
- defaultResponseGranularity: "minutely",
3523
- dataGranularity: "minutely",
3524
- isRelative: !0,
3525
- fineGrainedDefaultGranularity: "thirtySecondly",
3526
- allowedTiers: ["free", "trial", "plus", "enterprise"],
3527
- allowedGranularitiesOverride: ["tenSecondly", "thirtySecondly", "minutely"]
3528
- })
3529
- ],
3530
- [
3531
- m.ONE_HOUR,
3532
- new C({
3533
- key: m.ONE_HOUR,
3534
- display: "Last hour",
3535
- timeframeText: "One hour",
3536
- timeframeLength: () => 60 * 60 * 1,
3537
- defaultResponseGranularity: "minutely",
3538
- dataGranularity: "minutely",
3539
- isRelative: !0,
3540
- fineGrainedDefaultGranularity: "minutely",
3541
- allowedTiers: ["free", "trial", "plus", "enterprise"],
3542
- allowedGranularitiesOverride: ["tenSecondly", "thirtySecondly", "minutely", "fiveMinutely", "tenMinutely"]
3543
- })
3544
- ],
3545
- [
3546
- m.SIX_HOUR,
3547
- new C({
3548
- key: m.SIX_HOUR,
3549
- display: "Last 6 hours",
3550
- timeframeText: "6 hours",
3551
- timeframeLength: () => 60 * 60 * 6,
3552
- defaultResponseGranularity: "hourly",
3553
- dataGranularity: "hourly",
3554
- isRelative: !0,
3555
- fineGrainedDefaultGranularity: "fiveMinutely",
3556
- allowedTiers: ["free", "trial", "plus", "enterprise"],
3557
- allowedGranularitiesOverride: ["thirtySecondly", "minutely", "fiveMinutely", "tenMinutely", "thirtyMinutely", "hourly"]
3558
- })
3559
- ],
3560
- [
3561
- m.TWELVE_HOUR,
3562
- new C({
3563
- key: m.TWELVE_HOUR,
3564
- display: "Last 12 hours",
3565
- timeframeText: "12 hours",
3566
- timeframeLength: () => 60 * 60 * 12,
3567
- defaultResponseGranularity: "hourly",
3568
- dataGranularity: "hourly",
3569
- isRelative: !0,
3570
- fineGrainedDefaultGranularity: "tenMinutely",
3571
- allowedTiers: ["free", "trial", "plus", "enterprise"],
3572
- allowedGranularitiesOverride: ["minutely", "fiveMinutely", "tenMinutely", "thirtyMinutely", "hourly"]
3573
- })
3574
- ],
3575
- [
3576
- m.ONE_DAY,
3577
- new C({
3578
- key: m.ONE_DAY,
3579
- display: "Last 24 hours",
3580
- timeframeText: "24 hours",
3581
- timeframeLength: () => 60 * 60 * 24,
3582
- defaultResponseGranularity: "hourly",
3583
- dataGranularity: "hourly",
3584
- isRelative: !0,
3585
- fineGrainedDefaultGranularity: "thirtyMinutely",
3586
- allowedTiers: ["free", "trial", "plus", "enterprise"],
3587
- allowedGranularitiesOverride: ["fiveMinutely", "tenMinutely", "thirtyMinutely", "hourly"]
3588
- })
3589
- ],
3590
- [
3591
- m.SEVEN_DAY,
3592
- new C({
3593
- key: m.SEVEN_DAY,
3594
- display: "Last 7 days",
3595
- timeframeText: "7 days",
3596
- timeframeLength: () => 60 * 60 * 24 * 7,
3597
- defaultResponseGranularity: "daily",
3598
- dataGranularity: "daily",
3599
- isRelative: !0,
3600
- fineGrainedDefaultGranularity: "twoHourly",
3601
- allowedTiers: ["trial", "plus", "enterprise"],
3602
- allowedGranularitiesOverride: ["thirtyMinutely", "hourly", "twoHourly", "twelveHourly", "daily"]
3603
- })
3604
- ],
3605
- [
3606
- m.THIRTY_DAY,
3607
- new C({
3608
- key: m.THIRTY_DAY,
3609
- display: "Last 30 days",
3610
- timeframeText: "30 days",
3611
- timeframeLength: () => 60 * 60 * 24 * 30,
3612
- defaultResponseGranularity: "daily",
3613
- dataGranularity: "daily",
3614
- isRelative: !0,
3615
- fineGrainedDefaultGranularity: "twelveHourly",
3616
- allowedTiers: ["trial", "plus", "enterprise"],
3617
- allowedGranularitiesOverride: ["hourly", "twoHourly", "twelveHourly", "daily", "weekly"]
3618
- })
3619
- ],
3620
- [
3621
- m.CURRENT_WEEK,
3622
- new Gs({
3623
- key: m.CURRENT_WEEK,
3624
- display: "This week",
3625
- timeframeText: "Week",
3626
- timeframeLength: () => {
3627
- const e = H(/* @__PURE__ */ new Date(), { weekStartsOn: 1 });
3628
- return (Oe(Ut(/* @__PURE__ */ new Date(), 1)).getTime() - e.getTime()) / 1e3;
3629
- },
3630
- defaultResponseGranularity: "daily",
3631
- dataGranularity: "daily",
3632
- isRelative: !1,
3633
- fineGrainedDefaultGranularity: "twoHourly",
3634
- allowedTiers: ["plus", "enterprise"],
3635
- allowedGranularitiesOverride: ["thirtyMinutely", "hourly", "twoHourly", "twelveHourly", "daily"]
3636
- })
3637
- ],
3638
- [
3639
- m.CURRENT_MONTH,
3640
- new Fs({
3641
- key: m.CURRENT_MONTH,
3642
- display: "This month",
3643
- timeframeText: "Month",
3644
- timeframeLength: () => {
3645
- const e = ee(/* @__PURE__ */ new Date());
3646
- return (Oe(Ut(/* @__PURE__ */ new Date(), 1)).getTime() - e.getTime()) / 1e3;
3647
- },
3648
- defaultResponseGranularity: "daily",
3649
- dataGranularity: "daily",
3650
- isRelative: !1,
3651
- allowedTiers: ["plus", "enterprise"]
3652
- })
3653
- ],
3654
- [
3655
- m.PREVIOUS_WEEK,
3656
- new Ws({
3657
- key: m.PREVIOUS_WEEK,
3658
- display: "Previous week",
3659
- timeframeText: "Week",
3660
- timeframeLength: () => 60 * 60 * 24 * 7,
3661
- defaultResponseGranularity: "daily",
3662
- dataGranularity: "daily",
3663
- isRelative: !1,
3664
- fineGrainedDefaultGranularity: "twoHourly",
3665
- allowedTiers: ["plus", "enterprise"],
3666
- allowedGranularitiesOverride: ["thirtyMinutely", "hourly", "twoHourly", "twelveHourly", "daily"]
3667
- })
3668
- ],
3669
- [
3670
- m.PREVIOUS_MONTH,
3671
- new Ls({
3672
- key: m.PREVIOUS_MONTH,
3673
- display: "Previous month",
3674
- timeframeText: "Month",
3675
- timeframeLength: () => {
3676
- let e = 0;
3677
- const t = ee(/* @__PURE__ */ new Date()), r = ee(Ar(/* @__PURE__ */ new Date()));
3678
- return t.getTimezoneOffset() !== r.getTimezoneOffset() && (e = zs(t, r)), 60 * 60 * 24 * rs((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 1)) + as(e);
3679
- },
3680
- defaultResponseGranularity: "daily",
3681
- dataGranularity: "daily",
3682
- isRelative: !1,
3683
- allowedTiers: ["plus", "enterprise"]
3684
- })
3685
- ]
3686
- ]);
3687
- function mo(e) {
3688
- const t = new Date(e.start), r = new Date(e.end), n = (r.getTime() - t.getTime()) / 1e3;
3689
- return e.timePeriodsKey && As(Us.get(e.timePeriodsKey)) || new C({
3690
- key: "custom",
3691
- timeframeText: "custom",
3692
- display: "custom",
3693
- startCustom: t,
3694
- endCustom: r,
3695
- timeframeLength: () => n,
3696
- defaultResponseGranularity: "daily",
3697
- dataGranularity: "daily",
3698
- isRelative: !1,
3699
- allowedTiers: ["free", "plus", "enterprise"]
3700
- });
3701
- }
3702
- function yo(e) {
3703
- return {
3704
- ...e.key !== "custom" && { timePeriodsKey: e.key },
3705
- start: e.rawStart(),
3706
- end: e.rawEnd()
3707
- };
3708
- }
3709
- function po(e) {
3710
- return {
3711
- key: e.key,
3712
- display: e.display,
3713
- timeframeText: e.timeframeText,
3714
- timeframeLength: () => e.key,
3715
- // Used to generate test IDs for the Kongponent.
3716
- start: () => e.rawStart(),
3717
- end: () => e.rawEnd()
3718
- };
3719
- }
3720
- function zs(e, t) {
3721
- return is(e.getTimezoneOffset() - t.getTimezoneOffset());
3722
- }
3723
- const go = {
3724
- "15M": m.FIFTEEN_MIN,
3725
- "1H": m.ONE_HOUR,
3726
- "6H": m.SIX_HOUR,
3727
- "12H": m.TWELVE_HOUR,
3728
- "24H": m.ONE_DAY,
3729
- "7D": m.SEVEN_DAY,
3730
- "15m": m.FIFTEEN_MIN,
3731
- "1h": m.ONE_HOUR,
3732
- "6h": m.SIX_HOUR,
3733
- "12h": m.TWELVE_HOUR,
3734
- "24h": m.ONE_DAY,
3735
- "7d": m.SEVEN_DAY,
3736
- "30d": m.THIRTY_DAY,
3737
- current_week: m.CURRENT_WEEK,
3738
- current_month: m.CURRENT_MONTH,
3739
- previous_week: m.PREVIOUS_WEEK,
3740
- previous_month: m.PREVIOUS_MONTH
3741
- };
3742
- class ot {
3743
- constructor(t) {
3744
- b(this, "_seed");
3745
- this._seed = t;
3746
- }
3747
- next(t, r) {
3748
- const n = Math.sin(this._seed++) * 1e4, i = n - Math.floor(n);
3749
- return Math.floor(i * (r - t + 1)) + t;
3750
- }
3751
- }
3752
- const _o = (e, t, r) => {
3753
- const n = $r(10, 1e4), i = new ot(n), o = Date.now() - 6 * 60 * 60 * 1e3, c = Date.now(), d = [];
3754
- let h = 0;
3755
- for (let y = o; y <= c; y += 60 * 60 * 1e3)
3756
- if (t)
3757
- for (const p in t)
3758
- t[p].forEach((E) => {
3759
- h += i.next(50, 500);
3760
- const P = {
3761
- [p]: E,
3762
- [e.name]: h
3763
- }, N = {
3764
- version: "1.0",
3765
- timestamp: new Date(y).toISOString(),
3766
- event: P
3767
- };
3768
- d.push(N);
3769
- });
3770
- else {
3771
- h += i.next(50, 500);
3772
- const p = {
3773
- version: "1.0",
3774
- timestamp: new Date(y).toISOString(),
3775
- event: {
3776
- [e.name]: h
3777
- }
3778
- };
3779
- d.push(p);
3780
- }
3781
- const f = {};
3782
- if (t)
3783
- for (const y in t)
3784
- f[y] = {}, t[y].forEach((p) => {
3785
- f[y][p] = {
3786
- name: p,
3787
- deleted: !1
3788
- };
3789
- });
3790
- const _ = {
3791
- start_ms: o,
3792
- end_ms: c,
3793
- start: new Date(o).toISOString(),
3794
- end: new Date(c).toISOString(),
3795
- query_id: "12345",
3796
- metric_names: [e.name],
3797
- metric_units: {
3798
- [e.name]: e.unit
3799
- },
3800
- granularity_ms: 60 * 60 * 1e3,
3801
- // 1 hour in ms
3802
- display: f,
3803
- ...r ?? {}
3804
- };
3805
- return {
3806
- data: d,
3807
- meta: _
3808
- };
3809
- }, wo = (e, t) => {
3810
- const r = $r(10, 1e4), n = new ot(r), i = Date.now() - 6 * 60 * 60 * 1e3, o = Date.now(), c = [], d = {};
3811
- e.forEach((f) => {
3812
- d[f.name] = 0;
3813
- });
3814
- for (let f = i; f <= o; f += 60 * 60 * 1e3) {
3815
- const _ = {};
3816
- e.forEach((p) => {
3817
- d[p.name] += n.next(50, 500), _[p.name] = d[p.name];
3818
- });
3819
- const y = {
3820
- version: "1.0",
3821
- timestamp: new Date(f).toISOString(),
3822
- event: _
3823
- };
3824
- c.push(y);
3825
- }
3826
- const h = {
3827
- start_ms: i,
3828
- end_ms: o,
3829
- start: new Date(i).toISOString(),
3830
- end: new Date(o).toISOString(),
3831
- query_id: "12345",
3832
- metric_names: e.map((f) => f.name),
3833
- metric_units: e.reduce((f, _) => (f[_.name] = _.unit, f), {}),
3834
- granularity_ms: 60 * 60 * 1e3,
3835
- // 1 hour in ms
3836
- display: {},
3837
- ...t ?? {}
3838
- };
3839
- return {
3840
- data: c,
3841
- meta: h
3842
- };
3843
- }, bo = (e, t, r) => {
3844
- const n = Math.floor(Math.random() * 9991) + 10, i = new ot(n), o = Date.now() - 6 * 60 * 60 * 1e3, c = Date.now(), d = new Date((o + c) / 2).toISOString(), h = [];
3845
- if (t) {
3846
- const y = Object.keys(t), p = Object.values(t), E = (P, N) => {
3847
- if (N === y.length) {
3848
- e.forEach((k) => {
3849
- P[k.name] = i.next(1e3, 5e7);
3850
- }), h.push({
3851
- version: "1.0",
3852
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
3853
- event: { ...P }
3854
- });
3855
- return;
3856
- }
3857
- p[N].forEach((k) => {
3858
- E({ ...P, [y[N]]: k }, N + 1);
3859
- });
3860
- };
3861
- E({}, 0);
3862
- } else {
3863
- const y = {};
3864
- e.forEach((p) => {
3865
- y[p.name] = i.next(50, 500);
3866
- }), h.push({
3867
- version: "1.0",
3868
- timestamp: d,
3869
- event: y
3870
- });
3871
- }
3872
- const f = {};
3873
- if (t)
3874
- for (const y in t)
3875
- f[y] = {}, t[y].forEach((p) => {
3876
- f[y][p] = {
3877
- name: p,
3878
- deleted: !1
3879
- };
3880
- });
3881
- const _ = {
3882
- start_ms: o,
3883
- end_ms: c,
3884
- start: new Date(o).toISOString(),
3885
- end: new Date(c).toISOString(),
3886
- query_id: "12345",
3887
- metric_names: e.map((y) => y.name),
3888
- metric_units: e.reduce((y, p) => (y[p.name] = p.unit, y), {}),
3889
- truncated: !1,
3890
- limit: 50,
3891
- display: f,
3892
- granularity_ms: c - o,
3893
- ...r ?? {}
3894
- };
3895
- return {
3896
- data: h,
3897
- meta: _
3898
- };
3899
- };
3900
- function $r(e, t) {
3901
- return e = Math.ceil(e), t = Math.floor(t), Math.floor(Math.random() * (t - e + 1) + e);
3902
- }
3903
- export {
3904
- ho as DeltaQueryTime,
3905
- ve as Granularities,
3906
- Vs as REFRESH_INTERVAL_MS,
3907
- ot as SeededRandom,
3908
- go as TIMEFRAME_LOOKUP,
3909
- Us as TimePeriods,
3910
- C as Timeframe,
3911
- m as TimeframeKeys,
3912
- fo as TimeseriesQueryTime,
3913
- Rs as UnaryQueryTime,
3914
- mr as aiExploreAggregations,
3915
- Ga as apiUsageQuerySchema,
3916
- Ca as barChartSchema,
3917
- Be as basicExploreAggregations,
3918
- Fa as basicQuerySchema,
3919
- zr as ceilToNearestTimeGrain,
3920
- io as dashboardConfigSchema,
3921
- ao as dashboardTileTypes,
3922
- no as dashboardsSchemaV1,
3923
- Ma as datasourceToFilterableDimensions,
3924
- mo as datePickerSelectionToTimeframe,
3925
- Ya as donutChartSchema,
3926
- zs as dstOffsetHours,
3927
- hr as exploreAggregations,
3928
- lr as exploreFilterTypesV2,
3929
- ae as filterableAiExploreDimensions,
3930
- re as filterableBasicExploreDimensions,
3931
- ne as filterableExploreDimensions,
3932
- Ta as filterableRequestDimensions,
3933
- Sa as filterableRequestMetrics,
3934
- Js as filterableRequestWildcardDimensions,
3935
- qs as floorToNearestTimeGrain,
3936
- oo as formatISOTimeWithTZ,
3937
- cr as formatTime,
3938
- uo as formatTimeRange,
3939
- ka as gaugeChartSchema,
3940
- bo as generateCrossSectionalData,
3941
- wo as generateMultipleMetricTimeSeriesData,
3942
- _o as generateSingleMetricTimeSeriesData,
3943
- so as getFieldDataSources,
3944
- co as granularitiesToOptions,
3945
- Ys as granularityMsToQuery,
3946
- Ze as granularityValues,
3947
- Wa as llmUsageSchema,
3948
- Ra as metricCardSchema,
3949
- lo as msToGranularity,
3950
- to as queryDatasources,
3951
- Je as queryableAiExploreDimensions,
3952
- Ee as queryableBasicExploreDimensions,
3953
- Ke as queryableExploreDimensions,
3954
- ba as queryableRequestDimensions,
3955
- Oa as queryableRequestMetrics,
3956
- Da as queryableRequestWildcardDimensions,
3957
- $r as rand,
3958
- eo as relativeTimeRangeValuesRequestV2,
3959
- fr as relativeTimeRangeValuesV4,
3960
- Xs as reportChartTypes,
3961
- dr as requestFilterTypeEmptyV2,
3962
- Qs as requestFilterTypeEqualsV2,
3963
- Zs as requestFilterTypeMetricV2,
3964
- Bs as requestFilterTypeWildcardV2,
3965
- Ha as singleValueSchema,
3966
- Na as slottableSchema,
3967
- ro as stripUnknownFilters,
3968
- $a as tileConfigSchema,
3969
- Ua as tileDefinitionSchema,
3970
- za as tileLayoutSchema,
3971
- Ks as timeRangeTypeV2,
3972
- yo as timeframeToDatepickerSelection,
3973
- po as timeframeToDatepickerTimeperiod,
3974
- Ia as timeseriesChartSchema,
3975
- qa as topNTableSchema,
3976
- La as validDashboardQuery
3977
- };
3978
- //# sourceMappingURL=vitals-utilities.es.js.map