@carlonicora/nextjs-jsonapi 6.29.1 → 6.31.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 (92) hide show
  1. package/dist/{BlockNoteEditor-K4HWQLPJ.js → BlockNoteEditor-ICGGCW6N.js} +24 -24
  2. package/dist/{BlockNoteEditor-K4HWQLPJ.js.map → BlockNoteEditor-ICGGCW6N.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-TDX2RC7I.mjs → BlockNoteEditor-O4E67ECL.mjs} +4 -4
  4. package/dist/{BlockNoteViewer-76CKL6W5.mjs → BlockNoteViewer-BNZEXGVT.mjs} +2 -2
  5. package/dist/{BlockNoteViewer-B25WKYQP.js → BlockNoteViewer-YONLBNXW.js} +3 -3
  6. package/dist/{BlockNoteViewer-B25WKYQP.js.map → BlockNoteViewer-YONLBNXW.js.map} +1 -1
  7. package/dist/billing/index.js +465 -465
  8. package/dist/billing/index.mjs +3 -3
  9. package/dist/{chunk-77JC2UCF.js → chunk-5XP5G45B.js} +23 -10
  10. package/dist/chunk-5XP5G45B.js.map +1 -0
  11. package/dist/{chunk-OVSR72CZ.mjs → chunk-BT3VFB3I.mjs} +333 -299
  12. package/dist/chunk-BT3VFB3I.mjs.map +1 -0
  13. package/dist/{chunk-7MGXQIEP.mjs → chunk-FDKAVSZ6.mjs} +2 -2
  14. package/dist/{chunk-FJUKLVVX.mjs → chunk-HNK2O6YE.mjs} +23 -10
  15. package/dist/chunk-HNK2O6YE.mjs.map +1 -0
  16. package/dist/{chunk-M7YK5CCE.mjs → chunk-JL6XL5NK.mjs} +9 -2
  17. package/dist/chunk-JL6XL5NK.mjs.map +1 -0
  18. package/dist/{chunk-QI4SCGPB.js → chunk-M7FA63QE.js} +803 -769
  19. package/dist/chunk-M7FA63QE.js.map +1 -0
  20. package/dist/{chunk-F3EVYBMA.js → chunk-NQL2NDKH.js} +4 -4
  21. package/dist/{chunk-F3EVYBMA.js.map → chunk-NQL2NDKH.js.map} +1 -1
  22. package/dist/{chunk-ONU4WCDG.js → chunk-Q5SMFSE4.js} +11 -4
  23. package/dist/chunk-Q5SMFSE4.js.map +1 -0
  24. package/dist/client/index.js +4 -4
  25. package/dist/client/index.mjs +3 -3
  26. package/dist/components/forms/CommonEditorButtons.d.ts.map +1 -1
  27. package/dist/components/index.js +4 -4
  28. package/dist/components/index.mjs +3 -3
  29. package/dist/contexts/index.js +4 -4
  30. package/dist/contexts/index.mjs +3 -3
  31. package/dist/core/index.js +2 -2
  32. package/dist/core/index.mjs +1 -1
  33. package/dist/email-automations/index.js +105 -105
  34. package/dist/email-automations/index.mjs +3 -3
  35. package/dist/features/analytics/index.js +114 -114
  36. package/dist/features/analytics/index.mjs +3 -3
  37. package/dist/features/analytics/server.js +4 -4
  38. package/dist/features/analytics/server.mjs +2 -2
  39. package/dist/features/auth/components/GdprConsentSection.d.ts +2 -1
  40. package/dist/features/auth/components/GdprConsentSection.d.ts.map +1 -1
  41. package/dist/features/auth/components/forms/Login.d.ts.map +1 -1
  42. package/dist/features/auth/components/forms/Register.d.ts.map +1 -1
  43. package/dist/features/auth/data/auth.service.d.ts +8 -3
  44. package/dist/features/auth/data/auth.service.d.ts.map +1 -1
  45. package/dist/features/auth/data/pending-registration.d.ts +2 -0
  46. package/dist/features/auth/data/pending-registration.d.ts.map +1 -1
  47. package/dist/features/auth/data/pending-registration.interface.d.ts +1 -0
  48. package/dist/features/auth/data/pending-registration.interface.d.ts.map +1 -1
  49. package/dist/features/auth/hooks/useCompleteLogin.d.ts +9 -0
  50. package/dist/features/auth/hooks/useCompleteLogin.d.ts.map +1 -0
  51. package/dist/features/blog/index.js +129 -129
  52. package/dist/features/blog/index.mjs +3 -3
  53. package/dist/features/blog/server.js +7 -7
  54. package/dist/features/blog/server.mjs +1 -1
  55. package/dist/features/help/index.js +37 -37
  56. package/dist/features/help/index.mjs +3 -3
  57. package/dist/features/tokenusage/index.js +114 -114
  58. package/dist/features/tokenusage/index.mjs +3 -3
  59. package/dist/index.js +3 -3
  60. package/dist/index.mjs +2 -2
  61. package/dist/login/config.d.ts +3 -0
  62. package/dist/login/config.d.ts.map +1 -1
  63. package/dist/login/index.d.ts +1 -1
  64. package/dist/login/index.d.ts.map +1 -1
  65. package/dist/server/index.js +3 -3
  66. package/dist/server/index.mjs +2 -2
  67. package/messages/en.json +1 -0
  68. package/messages/it.json +1 -0
  69. package/package.json +1 -1
  70. package/src/components/forms/CommonEditorButtons.tsx +16 -2
  71. package/src/features/auth/components/GdprConsentSection.tsx +3 -1
  72. package/src/features/auth/components/forms/Login.tsx +4 -32
  73. package/src/features/auth/components/forms/Register.tsx +66 -36
  74. package/src/features/auth/data/__tests__/auth.oauth-completion.spec.ts +44 -0
  75. package/src/features/auth/data/__tests__/pending-registration.spec.ts +8 -0
  76. package/src/features/auth/data/auth.service.ts +21 -15
  77. package/src/features/auth/data/pending-registration.interface.ts +1 -0
  78. package/src/features/auth/data/pending-registration.ts +6 -0
  79. package/src/features/auth/hooks/__tests__/useCompleteLogin.spec.tsx +85 -0
  80. package/src/features/auth/hooks/useCompleteLogin.ts +47 -0
  81. package/src/login/__tests__/config.spec.ts +21 -0
  82. package/src/login/config.ts +8 -0
  83. package/src/login/index.ts +1 -0
  84. package/dist/chunk-77JC2UCF.js.map +0 -1
  85. package/dist/chunk-FJUKLVVX.mjs.map +0 -1
  86. package/dist/chunk-M7YK5CCE.mjs.map +0 -1
  87. package/dist/chunk-ONU4WCDG.js.map +0 -1
  88. package/dist/chunk-OVSR72CZ.mjs.map +0 -1
  89. package/dist/chunk-QI4SCGPB.js.map +0 -1
  90. /package/dist/{BlockNoteEditor-TDX2RC7I.mjs.map → BlockNoteEditor-O4E67ECL.mjs.map} +0 -0
  91. /package/dist/{BlockNoteViewer-76CKL6W5.mjs.map → BlockNoteViewer-BNZEXGVT.mjs.map} +0 -0
  92. /package/dist/{chunk-7MGXQIEP.mjs.map → chunk-FDKAVSZ6.mjs.map} +0 -0
@@ -39,10 +39,10 @@
39
39
 
40
40
 
41
41
 
42
- var _chunkQI4SCGPBjs = require('../../chunk-QI4SCGPB.js');
42
+ var _chunkM7FA63QEjs = require('../../chunk-M7FA63QE.js');
43
43
  require('../../chunk-SYMI4IDW.js');
44
44
  require('../../chunk-3EPNHTMH.js');
45
- require('../../chunk-ONU4WCDG.js');
45
+ require('../../chunk-Q5SMFSE4.js');
46
46
  require('../../chunk-G4JR3SFV.js');
47
47
 
48
48
 
@@ -59,7 +59,7 @@ require('../../chunk-G4JR3SFV.js');
59
59
 
60
60
 
61
61
 
62
- var _chunk77JC2UCFjs = require('../../chunk-77JC2UCF.js');
62
+ var _chunk5XP5G45Bjs = require('../../chunk-5XP5G45B.js');
63
63
  require('../../chunk-HROKKUBQ.js');
64
64
  require('../../chunk-DGN3PR2F.js');
65
65
 
@@ -92,7 +92,7 @@ function TokenUsageAdminFilterBar({ granularity, companyId, metric, companies, o
92
92
  };
93
93
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
94
94
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-md:w-full max-md:[&_#date]:w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
95
- _chunkQI4SCGPBjs.DateRangeSelector,
95
+ _chunkM7FA63QEjs.DateRangeSelector,
96
96
  {
97
97
  onDateChange: (range) => {
98
98
  if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
@@ -127,16 +127,16 @@ function TokenUsageAdminFilterBar({ granularity, companyId, metric, companies, o
127
127
  }
128
128
  ),
129
129
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
130
- _chunkQI4SCGPBjs.Select,
130
+ _chunkM7FA63QEjs.Select,
131
131
  {
132
132
  items: companyItems,
133
133
  value: _nullishCoalesce(companyId, () => ( ALL_COMPANIES)),
134
134
  onValueChange: (value) => onChange({ companyId: !value || value === ALL_COMPANIES ? void 0 : value }),
135
135
  children: [
136
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SelectTrigger, { className: "w-56", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SelectValue, { placeholder: t("token_usage.admin.all_companies") }) }),
137
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.SelectContent, { children: [
138
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SelectItem, { value: ALL_COMPANIES, children: t("token_usage.admin.all_companies") }),
139
- companies.map((company) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SelectItem, { value: company.id, children: company.label }, company.id))
136
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SelectTrigger, { className: "w-56", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SelectValue, { placeholder: t("token_usage.admin.all_companies") }) }),
137
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.SelectContent, { children: [
138
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SelectItem, { value: ALL_COMPANIES, children: t("token_usage.admin.all_companies") }),
139
+ companies.map((company) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SelectItem, { value: company.id, children: company.label }, company.id))
140
140
  ] })
141
141
  ]
142
142
  }
@@ -159,13 +159,13 @@ function Segmented({
159
159
  children: options.map((option) => {
160
160
  const selected = option.value === value;
161
161
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
162
- _chunkQI4SCGPBjs.Button,
162
+ _chunkM7FA63QEjs.Button,
163
163
  {
164
164
  type: "button",
165
165
  size: "sm",
166
166
  variant: selected ? "default" : "ghost",
167
167
  "aria-pressed": selected,
168
- className: _chunk77JC2UCFjs.cn.call(void 0, !selected && "text-muted-foreground"),
168
+ className: _chunk5XP5G45Bjs.cn.call(void 0, !selected && "text-muted-foreground"),
169
169
  onClick: () => onSelect(option.value),
170
170
  children: option.label
171
171
  },
@@ -185,7 +185,7 @@ function withFilters(endpoint, filters) {
185
185
  return endpoint;
186
186
  }
187
187
  _chunk7QVYU63Ejs.__name.call(void 0, withFilters, "withFilters");
188
- var TokenUsageAdminService = class extends _chunk77JC2UCFjs.AbstractService {
188
+ var TokenUsageAdminService = class extends _chunk5XP5G45Bjs.AbstractService {
189
189
  static {
190
190
  _chunk7QVYU63Ejs.__name.call(void 0, this, "TokenUsageAdminService");
191
191
  }
@@ -351,7 +351,7 @@ var TokenUsageAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
351
351
  error
352
352
  ]
353
353
  );
354
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageAdminContext.Provider, { value: contextValue, children }) });
354
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageAdminContext.Provider, { value: contextValue, children }) });
355
355
  }, "TokenUsageAdminProvider");
356
356
  var useTokenUsageAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
357
357
  const ctx = _react.useContext.call(void 0, TokenUsageAdminContext);
@@ -372,7 +372,7 @@ var _lucidereact = require('lucide-react');
372
372
  var ZERO = { cost: 0, credits: 0, tokensIn: 0, tokensOut: 0, cached: 0, calls: 0 };
373
373
  function TokenUsageAdminTiles({ summary, metric, singleCustomerMode }) {
374
374
  const t = _nextintl.useTranslations.call(void 0, );
375
- const { decimal, metricValue: formatValue, currency, percent } = _chunkQI4SCGPBjs.useUsageFormatters.call(void 0, );
375
+ const { decimal, metricValue: formatValue, currency, percent } = _chunkM7FA63QEjs.useUsageFormatters.call(void 0, );
376
376
  const rowFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (scope, window) => _nullishCoalesce(summary.find((r) => r.scope === scope && r.window === window), () => ( ZERO)), "rowFor");
377
377
  const customerCurrent = rowFor("customer", "current");
378
378
  const customerPrevious = rowFor("customer", "previous");
@@ -381,16 +381,16 @@ function TokenUsageAdminTiles({ summary, metric, singleCustomerMode }) {
381
381
  const totalCurrent = rowFor("total", "current");
382
382
  const totalPrevious = rowFor("total", "previous");
383
383
  const averagePerCall = totalCurrent.calls ? totalCurrent.cost / totalCurrent.calls : 0;
384
- const cacheHit = _chunkQI4SCGPBjs.cacheHitPercentage.call(void 0, totalCurrent.cached, totalCurrent.tokensIn);
384
+ const cacheHit = _chunkM7FA63QEjs.cacheHitPercentage.call(void 0, totalCurrent.cached, totalCurrent.tokensIn);
385
385
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3", children: [
386
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk77JC2UCFjs.cn.call(void 0, "grid gap-3", singleCustomerMode ? "sm:grid-cols-1" : "sm:grid-cols-2"), children: [
386
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk5XP5G45Bjs.cn.call(void 0, "grid gap-3", singleCustomerMode ? "sm:grid-cols-1" : "sm:grid-cols-2"), children: [
387
387
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
388
388
  LeadTile,
389
389
  {
390
390
  testId: "tile-customer",
391
391
  label: t("token_usage.admin.customer_spend"),
392
- value: formatValue(_chunkQI4SCGPBjs.metricValue.call(void 0, customerCurrent, metric), metric),
393
- delta: _chunkQI4SCGPBjs.percentageDelta.call(void 0, _chunkQI4SCGPBjs.metricValue.call(void 0, customerCurrent, metric), _chunkQI4SCGPBjs.metricValue.call(void 0, customerPrevious, metric)),
392
+ value: formatValue(_chunkM7FA63QEjs.metricValue.call(void 0, customerCurrent, metric), metric),
393
+ delta: _chunkM7FA63QEjs.percentageDelta.call(void 0, _chunkM7FA63QEjs.metricValue.call(void 0, customerCurrent, metric), _chunkM7FA63QEjs.metricValue.call(void 0, customerPrevious, metric)),
394
394
  previousLabel: t("token_usage.admin.vs_previous"),
395
395
  decimal
396
396
  }
@@ -400,8 +400,8 @@ function TokenUsageAdminTiles({ summary, metric, singleCustomerMode }) {
400
400
  {
401
401
  testId: "tile-platform",
402
402
  label: t("token_usage.admin.platform_spend"),
403
- value: formatValue(_chunkQI4SCGPBjs.metricValue.call(void 0, platformCurrent, metric), metric),
404
- delta: _chunkQI4SCGPBjs.percentageDelta.call(void 0, _chunkQI4SCGPBjs.metricValue.call(void 0, platformCurrent, metric), _chunkQI4SCGPBjs.metricValue.call(void 0, platformPrevious, metric)),
403
+ value: formatValue(_chunkM7FA63QEjs.metricValue.call(void 0, platformCurrent, metric), metric),
404
+ delta: _chunkM7FA63QEjs.percentageDelta.call(void 0, _chunkM7FA63QEjs.metricValue.call(void 0, platformCurrent, metric), _chunkM7FA63QEjs.metricValue.call(void 0, platformPrevious, metric)),
405
405
  previousLabel: t("token_usage.admin.vs_previous"),
406
406
  decimal
407
407
  }
@@ -413,8 +413,8 @@ function TokenUsageAdminTiles({ summary, metric, singleCustomerMode }) {
413
413
  {
414
414
  testId: "tile-total",
415
415
  label: t("token_usage.admin.total_cost"),
416
- value: formatValue(_chunkQI4SCGPBjs.metricValue.call(void 0, totalCurrent, metric), metric),
417
- delta: _chunkQI4SCGPBjs.percentageDelta.call(void 0, _chunkQI4SCGPBjs.metricValue.call(void 0, totalCurrent, metric), _chunkQI4SCGPBjs.metricValue.call(void 0, totalPrevious, metric)),
416
+ value: formatValue(_chunkM7FA63QEjs.metricValue.call(void 0, totalCurrent, metric), metric),
417
+ delta: _chunkM7FA63QEjs.percentageDelta.call(void 0, _chunkM7FA63QEjs.metricValue.call(void 0, totalCurrent, metric), _chunkM7FA63QEjs.metricValue.call(void 0, totalPrevious, metric)),
418
418
  decimal
419
419
  }
420
420
  ),
@@ -448,7 +448,7 @@ function LeadTile({
448
448
  previousLabel,
449
449
  decimal
450
450
  }) {
451
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "grid gap-1", children: [
451
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "grid gap-1", children: [
452
452
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: label }),
453
453
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
454
454
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
@@ -465,7 +465,7 @@ function SupportingTile({
465
465
  delta,
466
466
  decimal
467
467
  }) {
468
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "grid gap-1", children: [
468
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "grid gap-1", children: [
469
469
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: label }),
470
470
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
471
471
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
@@ -488,7 +488,7 @@ function Delta({
488
488
  "span",
489
489
  {
490
490
  "data-testid": testId,
491
- className: _chunk77JC2UCFjs.cn.call(void 0,
491
+ className: _chunk5XP5G45Bjs.cn.call(void 0,
492
492
  "inline-flex items-center gap-0.5 text-xs tabular-nums",
493
493
  increased ? "text-success" : "text-destructive"
494
494
  ),
@@ -509,10 +509,10 @@ _chunk7QVYU63Ejs.__name.call(void 0, Delta, "Delta");
509
509
 
510
510
  function TokenUsageBreakdownTable({ rows, metric }) {
511
511
  const t = _nextintl.useTranslations.call(void 0, );
512
- const { decimal, metricValue: formatValue, percent, compare } = _chunkQI4SCGPBjs.useUsageFormatters.call(void 0, );
512
+ const { decimal, metricValue: formatValue, percent, compare } = _chunkM7FA63QEjs.useUsageFormatters.call(void 0, );
513
513
  const [sort, setSort] = _react.useState.call(void 0, void 0);
514
514
  const showActiveUsers = rows.some((row) => row.activeUsers !== void 0);
515
- const total = _react.useMemo.call(void 0, () => rows.reduce((sum, row) => sum + _chunkQI4SCGPBjs.metricValue.call(void 0, row, metric), 0), [rows, metric]);
515
+ const total = _react.useMemo.call(void 0, () => rows.reduce((sum, row) => sum + _chunkM7FA63QEjs.metricValue.call(void 0, row, metric), 0), [rows, metric]);
516
516
  const sortValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, key) => {
517
517
  switch (key) {
518
518
  case "label":
@@ -522,9 +522,9 @@ function TokenUsageBreakdownTable({ rows, metric }) {
522
522
  case "activeUsers":
523
523
  return _nullishCoalesce(row.activeUsers, () => ( 0));
524
524
  case "cacheHit":
525
- return _chunkQI4SCGPBjs.cacheHitPercentage.call(void 0, row.cached, row.tokensIn);
525
+ return _chunkM7FA63QEjs.cacheHitPercentage.call(void 0, row.cached, row.tokensIn);
526
526
  case "share":
527
- return _chunkQI4SCGPBjs.metricValue.call(void 0, row, metric);
527
+ return _chunkM7FA63QEjs.metricValue.call(void 0, row, metric);
528
528
  default:
529
529
  return row[key];
530
530
  }
@@ -562,13 +562,13 @@ function TokenUsageBreakdownTable({ rows, metric }) {
562
562
  // The package's <Table> wraps itself in an `overflow-x-clip` container, which
563
563
  // would swallow the overflow before this scroller ever saw it — hence the
564
564
  // child override. Wide metric tables must scroll, never widen the page.
565
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Table, { children: [
566
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableRow, { children: columns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableHead, { className: _chunk77JC2UCFjs.cn.call(void 0, column.numeric && "text-end"), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
565
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Table, { children: [
566
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableRow, { children: columns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableHead, { className: _chunk5XP5G45Bjs.cn.call(void 0, column.numeric && "text-end"), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
567
567
  "button",
568
568
  {
569
569
  type: "button",
570
570
  onClick: () => toggleSort(column.key),
571
- className: _chunk77JC2UCFjs.cn.call(void 0,
571
+ className: _chunk5XP5G45Bjs.cn.call(void 0,
572
572
  "hover:text-primary inline-flex items-center gap-1 text-xs font-medium",
573
573
  column.numeric && "flex-row-reverse"
574
574
  ),
@@ -578,20 +578,20 @@ function TokenUsageBreakdownTable({ rows, metric }) {
578
578
  ]
579
579
  }
580
580
  ) }, column.key)) }) }),
581
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableBody, { children: sortedRows.map((row) => {
582
- const value = _chunkQI4SCGPBjs.metricValue.call(void 0, row, metric);
581
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableBody, { children: sortedRows.map((row) => {
582
+ const value = _chunkM7FA63QEjs.metricValue.call(void 0, row, metric);
583
583
  const share = total > 0 ? value / total * 100 : 0;
584
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.TableRow, { "data-testid": `breakdown-row-${row.id}`, children: [
585
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-xs", children: row.id === "other" ? t("token_usage.admin.other") : row.label }),
586
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-muted-foreground text-xs", children: _nullishCoalesce(row.sublabel, () => ( "")) }),
587
- showActiveUsers && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end text-xs tabular-nums", children: row.activeUsers === void 0 ? "" : decimal(row.activeUsers, 0) }),
588
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.calls, 0) }),
589
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.tokensIn, 0) }),
590
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.tokensOut, 0) }),
591
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end text-xs tabular-nums", children: percent(_chunkQI4SCGPBjs.cacheHitPercentage.call(void 0, row.cached, row.tokensIn)) }),
592
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end text-xs tabular-nums", children: formatValue(row.cost, "cost") }),
593
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end text-xs tabular-nums", children: formatValue(row.credits, "credits") }),
594
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TableCell, { className: "text-end text-xs tabular-nums", children: percent(share) })
584
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.TableRow, { "data-testid": `breakdown-row-${row.id}`, children: [
585
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-xs", children: row.id === "other" ? t("token_usage.admin.other") : row.label }),
586
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-muted-foreground text-xs", children: _nullishCoalesce(row.sublabel, () => ( "")) }),
587
+ showActiveUsers && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end text-xs tabular-nums", children: row.activeUsers === void 0 ? "" : decimal(row.activeUsers, 0) }),
588
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.calls, 0) }),
589
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.tokensIn, 0) }),
590
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.tokensOut, 0) }),
591
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end text-xs tabular-nums", children: percent(_chunkM7FA63QEjs.cacheHitPercentage.call(void 0, row.cached, row.tokensIn)) }),
592
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end text-xs tabular-nums", children: formatValue(row.cost, "cost") }),
593
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end text-xs tabular-nums", children: formatValue(row.credits, "credits") }),
594
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TableCell, { className: "text-end text-xs tabular-nums", children: percent(share) })
595
595
  ] }, row.id);
596
596
  }) })
597
597
  ] }) })
@@ -625,7 +625,7 @@ var operationDescription = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
625
625
 
626
626
  function TokenUsageRankedBar({ rows, metric, emptyLabel, labelsAreOperationTypes = false }) {
627
627
  const t = _nextintl.useTranslations.call(void 0, );
628
- const { metricValue: formatValue, percent } = _chunkQI4SCGPBjs.useUsageFormatters.call(void 0, );
628
+ const { metricValue: formatValue, percent } = _chunkM7FA63QEjs.useUsageFormatters.call(void 0, );
629
629
  const renderLabel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row) => {
630
630
  if (row.id === "other") return t("token_usage.admin.other");
631
631
  if (!labelsAreOperationTypes) return row.label;
@@ -647,9 +647,9 @@ function TokenUsageRankedBar({ rows, metric, emptyLabel, labelsAreOperationTypes
647
647
  const label = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: renderLabel(row) });
648
648
  const description = renderDescription(row);
649
649
  if (!description) return label;
650
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Tooltip, { children: [
650
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Tooltip, { children: [
651
651
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
652
- _chunkQI4SCGPBjs.TooltipTrigger,
652
+ _chunkM7FA63QEjs.TooltipTrigger,
653
653
  {
654
654
  "data-testid": `ranked-description-${row.id}`,
655
655
  className: "min-w-0 cursor-help justify-self-start truncate",
@@ -657,19 +657,19 @@ function TokenUsageRankedBar({ rows, metric, emptyLabel, labelsAreOperationTypes
657
657
  children: label
658
658
  }
659
659
  ),
660
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.TooltipContent, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs", children: description }) })
660
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.TooltipContent, { side: "top", className: "max-w-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs", children: description }) })
661
661
  ] });
662
662
  }, "renderLabelCell");
663
663
  if (rows.length === 0) {
664
664
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground py-6 text-center text-sm", children: emptyLabel });
665
665
  }
666
- const values = rows.map((row) => _chunkQI4SCGPBjs.metricValue.call(void 0, row, metric));
666
+ const values = rows.map((row) => _chunkM7FA63QEjs.metricValue.call(void 0, row, metric));
667
667
  const total = values.reduce((sum, value) => sum + value, 0);
668
668
  const max = Math.max(...values, 0);
669
669
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid gap-0.5", children: rows.map((row, index) => {
670
670
  const value = values[index];
671
671
  const isOther = row.id === "other";
672
- const step = isOther ? _chunkQI4SCGPBjs.SEQUENTIAL_RAMP.length - 1 : Math.min(index, _chunkQI4SCGPBjs.SEQUENTIAL_RAMP.length - 1);
672
+ const step = isOther ? _chunkM7FA63QEjs.SEQUENTIAL_RAMP.length - 1 : Math.min(index, _chunkM7FA63QEjs.SEQUENTIAL_RAMP.length - 1);
673
673
  const width = max > 0 ? value / max * 100 : 0;
674
674
  const share = total > 0 ? value / total * 100 : 0;
675
675
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-x-3 gap-y-0.5 py-0.5", children: [
@@ -681,7 +681,7 @@ function TokenUsageRankedBar({ rows, metric, emptyLabel, labelsAreOperationTypes
681
681
  "data-testid": `ranked-fill-${row.id}`,
682
682
  "data-ramp-step": String(step),
683
683
  className: "h-full rounded-r-[4px]",
684
- style: { width: `${width}%`, backgroundColor: _chunkQI4SCGPBjs.SEQUENTIAL_RAMP[step] }
684
+ style: { width: `${width}%`, backgroundColor: _chunkM7FA63QEjs.SEQUENTIAL_RAMP[step] }
685
685
  }
686
686
  ) })
687
687
  ] }),
@@ -731,7 +731,7 @@ var inferGranularity = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (buc
731
731
  }, "inferGranularity");
732
732
  function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
733
733
  const t = _nextintl.useTranslations.call(void 0, );
734
- const { compact, bucketDate, metricValue: formatValue } = _chunkQI4SCGPBjs.useUsageFormatters.call(void 0, );
734
+ const { compact, bucketDate, metricValue: formatValue } = _chunkM7FA63QEjs.useUsageFormatters.call(void 0, );
735
735
  const { resolvedTheme } = _nextthemes.useTheme.call(void 0, );
736
736
  const mode = resolvedTheme === "dark" ? "dark" : "light";
737
737
  const { chartData, seriesKeys } = _react.useMemo.call(void 0, () => {
@@ -739,8 +739,8 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
739
739
  const totals = /* @__PURE__ */ new Map();
740
740
  for (const row of rows) totals.set(row.series, (_nullishCoalesce(totals.get(row.series), () => ( 0))) + metricValue2(row, metric));
741
741
  const ranked = [...totals.entries()].sort((a, b) => b[1] - a[1]).map(([series]) => series);
742
- const named = ranked.slice(0, _chunkQI4SCGPBjs.CATEGORICAL_CEILING);
743
- const folded = new Set(ranked.slice(_chunkQI4SCGPBjs.CATEGORICAL_CEILING));
742
+ const named = ranked.slice(0, _chunkM7FA63QEjs.CATEGORICAL_CEILING);
743
+ const folded = new Set(ranked.slice(_chunkM7FA63QEjs.CATEGORICAL_CEILING));
744
744
  const keys = folded.size > 0 ? [...named, OTHER_SERIES] : named;
745
745
  const byBucket = /* @__PURE__ */ new Map();
746
746
  for (const row of rows) {
@@ -780,7 +780,7 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
780
780
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: className ? `text-muted-foreground text-sm ${className}` : "text-muted-foreground text-sm", children: t.has(key) ? t(key) : "No data in the selected period" });
781
781
  }
782
782
  const granularity = inferGranularity(chartData.map((entry) => entry.bucket));
783
- const seriesColorFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (series, index) => series === OTHER_SERIES ? _chunkQI4SCGPBjs.OTHER_COLOR : _chunkQI4SCGPBjs.seriesColor.call(void 0, index, mode), "seriesColorFor");
783
+ const seriesColorFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (series, index) => series === OTHER_SERIES ? _chunkM7FA63QEjs.OTHER_COLOR : _chunkM7FA63QEjs.seriesColor.call(void 0, index, mode), "seriesColorFor");
784
784
  return (
785
785
  // The chart is a coordinate system, not prose: recharts lays the axes and the
786
786
  // stacked bars out left-to-right, so the whole chart stays an LTR island even
@@ -789,7 +789,7 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
789
789
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
790
790
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "timeline-data", children: JSON.stringify(chartData) }),
791
791
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "timeline-series", children: JSON.stringify(seriesKeys) }),
792
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.ChartContainer, { config: chartConfig, className: "aspect-auto h-72 w-full", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _recharts.BarChart, { accessibilityLayer: true, data: chartData, margin: { top: 8, right: 8, bottom: 0, left: 0 }, children: [
792
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.ChartContainer, { config: chartConfig, className: "aspect-auto h-72 w-full", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _recharts.BarChart, { accessibilityLayer: true, data: chartData, margin: { top: 8, right: 8, bottom: 0, left: 0 }, children: [
793
793
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
794
794
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
795
795
  _recharts.XAxis,
@@ -813,10 +813,10 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
813
813
  }
814
814
  ),
815
815
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
816
- _chunkQI4SCGPBjs.ChartTooltip,
816
+ _chunkM7FA63QEjs.ChartTooltip,
817
817
  {
818
818
  content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
819
- _chunkQI4SCGPBjs.ChartTooltipContent,
819
+ _chunkM7FA63QEjs.ChartTooltipContent,
820
820
  {
821
821
  labelFormatter: (value) => bucketDate(String(value), granularity),
822
822
  valueFormatter: (value) => formatValue(Number(value), metric),
@@ -825,7 +825,7 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
825
825
  )
826
826
  }
827
827
  ),
828
- seriesKeys.length >= 2 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.ChartLegendContent, {}) }) : null,
828
+ seriesKeys.length >= 2 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.ChartLegendContent, {}) }) : null,
829
829
  seriesKeys.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
830
830
  _recharts.Bar,
831
831
  {
@@ -877,19 +877,19 @@ function TokenUsageAdminContainer() {
877
877
  [t]
878
878
  );
879
879
  if (error) {
880
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.TokenUsageAdminSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
880
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.TokenUsageAdminSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
881
881
  }
882
- if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.TokenUsageAdminSummary, fullWidth: true, forceHeader: true });
882
+ if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.TokenUsageAdminSummary, fullWidth: true, forceHeader: true });
883
883
  const emptyLabel = t("token_usage.admin.no_data");
884
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.TokenUsageAdminSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
884
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.TokenUsageAdminSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
885
885
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageAdminTiles, { summary, metric: filters.metric, singleCustomerMode: hidePlatform }),
886
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
887
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardHeader, { children: [
888
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("token_usage.admin.usage_over_time") }),
889
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardAction, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
886
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
887
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardHeader, { children: [
888
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("token_usage.admin.usage_over_time") }),
889
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardAction, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
890
890
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.admin.stack_by") }),
891
891
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
892
- _chunkQI4SCGPBjs.Select,
892
+ _chunkM7FA63QEjs.Select,
893
893
  {
894
894
  items: stackByItems,
895
895
  value: filters.stackBy,
@@ -897,29 +897,29 @@ function TokenUsageAdminContainer() {
897
897
  if (value) setFilters({ stackBy: value });
898
898
  },
899
899
  children: [
900
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SelectTrigger, { size: "sm", className: "w-36", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SelectValue, {}) }),
901
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SelectContent, { children: STACK_BY_VALUES.map((value) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SelectItem, { value, children: stackByItems[value] }, value)) })
900
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SelectTrigger, { size: "sm", className: "w-36", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SelectValue, {}) }),
901
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SelectContent, { children: STACK_BY_VALUES.map((value) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SelectItem, { value, children: stackByItems[value] }, value)) })
902
902
  ]
903
903
  }
904
904
  )
905
905
  ] }) })
906
906
  ] }),
907
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: filters.metric, stackBy: filters.stackBy }) })
907
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: filters.metric, stackBy: filters.stackBy }) })
908
908
  ] }),
909
909
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-4 md:grid-cols-2", children: [
910
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
911
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("token_usage.admin.by_company") }) }),
912
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byCompany, metric: filters.metric, emptyLabel }) })
910
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
911
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("token_usage.admin.by_company") }) }),
912
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byCompany, metric: filters.metric, emptyLabel }) })
913
913
  ] }),
914
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
915
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("token_usage.admin.by_user") }) }),
916
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byUser, metric: filters.metric, emptyLabel }) })
914
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
915
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("token_usage.admin.by_user") }) }),
916
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byUser, metric: filters.metric, emptyLabel }) })
917
917
  ] })
918
918
  ] }),
919
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk77JC2UCFjs.cn.call(void 0, "grid gap-4", !hidePlatform && "md:grid-cols-2"), children: [
920
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
921
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("token_usage.admin.customer_by_operation") }) }),
922
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
919
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk5XP5G45Bjs.cn.call(void 0, "grid gap-4", !hidePlatform && "md:grid-cols-2"), children: [
920
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
921
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("token_usage.admin.customer_by_operation") }) }),
922
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
923
923
  TokenUsageRankedBar,
924
924
  {
925
925
  rows: byCustomerOperation,
@@ -929,9 +929,9 @@ function TokenUsageAdminContainer() {
929
929
  }
930
930
  ) })
931
931
  ] }),
932
- !hidePlatform && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
933
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("token_usage.admin.platform_by_operation") }) }),
934
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
932
+ !hidePlatform && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
933
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("token_usage.admin.platform_by_operation") }) }),
934
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
935
935
  TokenUsageRankedBar,
936
936
  {
937
937
  rows: byOperation,
@@ -942,9 +942,9 @@ function TokenUsageAdminContainer() {
942
942
  ) })
943
943
  ] })
944
944
  ] }),
945
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
946
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("token_usage.admin.detail") }) }),
947
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageBreakdownTable, { rows: byCompany, metric: filters.metric }) })
945
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
946
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("token_usage.admin.detail") }) }),
947
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageBreakdownTable, { rows: byCompany, metric: filters.metric }) })
948
948
  ] })
949
949
  ] }) });
950
950
  }
@@ -957,7 +957,7 @@ function withFilters2(endpoint, filters) {
957
957
  return endpoint;
958
958
  }
959
959
  _chunk7QVYU63Ejs.__name.call(void 0, withFilters2, "withFilters");
960
- var TokenUsageReportService = class extends _chunk77JC2UCFjs.AbstractService {
960
+ var TokenUsageReportService = class extends _chunk5XP5G45Bjs.AbstractService {
961
961
  static {
962
962
  _chunk7QVYU63Ejs.__name.call(void 0, this, "TokenUsageReportService");
963
963
  }
@@ -1065,7 +1065,7 @@ var TOKEN_USAGE_REPORT_I18N_KEYS = [
1065
1065
 
1066
1066
  function TokenUsageReportFilterBar({ onChange }) {
1067
1067
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-help": "tokenusage.filters", className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1068
- _chunkQI4SCGPBjs.DateRangeSelector,
1068
+ _chunkM7FA63QEjs.DateRangeSelector,
1069
1069
  {
1070
1070
  onDateChange: (range) => {
1071
1071
  if (!_optionalChain([range, 'optionalAccess', _5 => _5.from]) || !_optionalChain([range, 'optionalAccess', _6 => _6.to])) return;
@@ -1098,7 +1098,7 @@ var TokenUsageReportProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
1098
1098
  pageUrl = TOKEN_USAGE_REPORT_PAGE_URL
1099
1099
  }) => {
1100
1100
  const t = _nextintl.useTranslations.call(void 0, );
1101
- const generateUrl = _chunkQI4SCGPBjs.usePageUrlGenerator.call(void 0, );
1101
+ const generateUrl = _chunkM7FA63QEjs.usePageUrlGenerator.call(void 0, );
1102
1102
  const [filters, setFilterState] = _react.useState.call(void 0, () => {
1103
1103
  const range = defaultRange2();
1104
1104
  return { from: _nullishCoalesce(initialFrom, () => ( range.from)), to: _nullishCoalesce(initialTo, () => ( range.to)) };
@@ -1162,7 +1162,7 @@ var TokenUsageReportProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
1162
1162
  () => ({ summary, timeline, byOperation, byTarget, targetPanelTitleKey, filters, setFilters, isLoading, error }),
1163
1163
  [summary, timeline, byOperation, byTarget, targetPanelTitleKey, filters, setFilters, isLoading, error]
1164
1164
  );
1165
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageReportContext.Provider, { value: contextValue, children }) });
1165
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageReportContext.Provider, { value: contextValue, children }) });
1166
1166
  }, "TokenUsageReportProvider");
1167
1167
  var useTokenUsageReport = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
1168
1168
  const ctx = _react.useContext.call(void 0, TokenUsageReportContext);
@@ -1182,7 +1182,7 @@ var useTokenUsageReport = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
1182
1182
  var ZERO2 = { cost: 0, credits: 0, tokensIn: 0, tokensOut: 0, cached: 0, calls: 0 };
1183
1183
  function TokenUsageReportTiles({ summary, metric, balances }) {
1184
1184
  const t = _nextintl.useTranslations.call(void 0, );
1185
- const { decimal, metricValue: formatValue } = _chunkQI4SCGPBjs.useUsageFormatters.call(void 0, );
1185
+ const { decimal, metricValue: formatValue } = _chunkM7FA63QEjs.useUsageFormatters.call(void 0, );
1186
1186
  const rowFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (window) => _nullishCoalesce(summary.find((row) => row.window === window), () => ( ZERO2)), "rowFor");
1187
1187
  const current = rowFor("current");
1188
1188
  const previous = rowFor("previous");
@@ -1190,15 +1190,15 @@ function TokenUsageReportTiles({ summary, metric, balances }) {
1190
1190
  const monthlyColor = monthlyPercentage > 75 ? "text-success" : monthlyPercentage >= 5 ? "text-warning" : "text-destructive";
1191
1191
  const whole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (value) => decimal(Math.max(0, Math.floor(value)), 0), "whole");
1192
1192
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3", children: [
1193
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Card, { "data-testid": "tile-used", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "grid gap-1", children: [
1193
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Card, { "data-testid": "tile-used", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "grid gap-1", children: [
1194
1194
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.used_in_period") }),
1195
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: formatValue(_chunkQI4SCGPBjs.metricValue.call(void 0, current, metric), metric) }),
1195
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: formatValue(_chunkM7FA63QEjs.metricValue.call(void 0, current, metric), metric) }),
1196
1196
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
1197
1197
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1198
1198
  Delta2,
1199
1199
  {
1200
1200
  testId: "tile-used-delta",
1201
- delta: _chunkQI4SCGPBjs.percentageDelta.call(void 0, _chunkQI4SCGPBjs.metricValue.call(void 0, current, metric), _chunkQI4SCGPBjs.metricValue.call(void 0, previous, metric)),
1201
+ delta: _chunkM7FA63QEjs.percentageDelta.call(void 0, _chunkM7FA63QEjs.metricValue.call(void 0, current, metric), _chunkM7FA63QEjs.metricValue.call(void 0, previous, metric)),
1202
1202
  decimal
1203
1203
  }
1204
1204
  ),
@@ -1206,21 +1206,21 @@ function TokenUsageReportTiles({ summary, metric, balances }) {
1206
1206
  ] })
1207
1207
  ] }) }),
1208
1208
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
1209
- balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Card, { "data-testid": "tile-monthly", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "grid gap-1", children: [
1209
+ balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Card, { "data-testid": "tile-monthly", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "grid gap-1", children: [
1210
1210
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.monthly_left") }),
1211
1211
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-baseline gap-1", children: [
1212
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-testid": "tile-monthly-value", className: _chunk77JC2UCFjs.cn.call(void 0, "text-sm font-medium tabular-nums", monthlyColor), children: whole(balances.availableMonthlyCredits) }),
1212
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-testid": "tile-monthly-value", className: _chunk5XP5G45Bjs.cn.call(void 0, "text-sm font-medium tabular-nums", monthlyColor), children: whole(balances.availableMonthlyCredits) }),
1213
1213
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: [
1214
1214
  "/ ",
1215
1215
  whole(balances.monthlyCredits)
1216
1216
  ] })
1217
1217
  ] })
1218
1218
  ] }) }),
1219
- balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Card, { "data-testid": "tile-extra", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "grid gap-1", children: [
1219
+ balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Card, { "data-testid": "tile-extra", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "grid gap-1", children: [
1220
1220
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.extra_credits") }),
1221
1221
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: whole(balances.availableExtraCredits) })
1222
1222
  ] }) }),
1223
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Card, { "data-testid": "tile-calls", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.CardContent, { className: "grid gap-1", children: [
1223
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Card, { "data-testid": "tile-calls", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.CardContent, { className: "grid gap-1", children: [
1224
1224
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.calls") }),
1225
1225
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: decimal(current.calls, 0) })
1226
1226
  ] }) })
@@ -1242,7 +1242,7 @@ function Delta2({
1242
1242
  "span",
1243
1243
  {
1244
1244
  "data-testid": testId,
1245
- className: _chunk77JC2UCFjs.cn.call(void 0,
1245
+ className: _chunk5XP5G45Bjs.cn.call(void 0,
1246
1246
  "inline-flex items-center gap-0.5 text-xs tabular-nums",
1247
1247
  increased ? "text-warning" : "text-success"
1248
1248
  ),
@@ -1262,21 +1262,21 @@ function TokenUsageReportContainer({ balances = null }) {
1262
1262
  const t = _nextintl.useTranslations.call(void 0, );
1263
1263
  const { summary, timeline, byOperation, byTarget, isLoading, error, targetPanelTitleKey } = useTokenUsageReport();
1264
1264
  if (error) {
1265
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
1265
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
1266
1266
  }
1267
- if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
1267
+ if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
1268
1268
  const emptyLabel = t("token_usage.report.no_data");
1269
1269
  const targetTitle = targetPanelTitleKey && byTarget.length > 0 ? t(targetPanelTitleKey) : void 0;
1270
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
1270
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
1271
1271
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageReportTiles, { summary, metric: "credits", balances }),
1272
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
1273
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("token_usage.report.usage_over_time") }) }),
1274
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: "credits", stackBy: "type" }) })
1272
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
1273
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("token_usage.report.usage_over_time") }) }),
1274
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: "credits", stackBy: "type" }) })
1275
1275
  ] }),
1276
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk77JC2UCFjs.cn.call(void 0, "grid gap-4", targetTitle && "md:grid-cols-2"), children: [
1277
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
1278
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: t("token_usage.report.by_operation") }) }),
1279
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1276
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk5XP5G45Bjs.cn.call(void 0, "grid gap-4", targetTitle && "md:grid-cols-2"), children: [
1277
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
1278
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: t("token_usage.report.by_operation") }) }),
1279
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1280
1280
  TokenUsageRankedBar,
1281
1281
  {
1282
1282
  rows: byOperation,
@@ -1286,9 +1286,9 @@ function TokenUsageReportContainer({ balances = null }) {
1286
1286
  }
1287
1287
  ) })
1288
1288
  ] }),
1289
- targetTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQI4SCGPBjs.Card, { children: [
1290
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardTitle, { children: targetTitle }) }),
1291
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQI4SCGPBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byTarget, metric: "credits", emptyLabel }) })
1289
+ targetTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkM7FA63QEjs.Card, { children: [
1290
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardTitle, { children: targetTitle }) }),
1291
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7FA63QEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byTarget, metric: "credits", emptyLabel }) })
1292
1292
  ] })
1293
1293
  ] })
1294
1294
  ] }) });
@@ -1328,5 +1328,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, TokenUsageReportContainer, "TokenUsageRepor
1328
1328
 
1329
1329
 
1330
1330
 
1331
- exports.TOKEN_USAGE_ADMIN_I18N_KEYS = TOKEN_USAGE_ADMIN_I18N_KEYS; exports.TOKEN_USAGE_REPORT_I18N_KEYS = TOKEN_USAGE_REPORT_I18N_KEYS; exports.TokenUsageAdminBreakdown = _chunk77JC2UCFjs.TokenUsageAdminBreakdown; exports.TokenUsageAdminBreakdownModule = _chunk77JC2UCFjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminContainer = TokenUsageAdminContainer; exports.TokenUsageAdminFilterBar = TokenUsageAdminFilterBar; exports.TokenUsageAdminProvider = TokenUsageAdminProvider; exports.TokenUsageAdminService = TokenUsageAdminService; exports.TokenUsageAdminSummary = _chunk77JC2UCFjs.TokenUsageAdminSummary; exports.TokenUsageAdminSummaryModule = _chunk77JC2UCFjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTiles = TokenUsageAdminTiles; exports.TokenUsageAdminTimeline = _chunk77JC2UCFjs.TokenUsageAdminTimeline; exports.TokenUsageAdminTimelineModule = _chunk77JC2UCFjs.TokenUsageAdminTimelineModule; exports.TokenUsageBreakdownTable = TokenUsageBreakdownTable; exports.TokenUsageRankedBar = TokenUsageRankedBar; exports.TokenUsageReportBreakdown = _chunk77JC2UCFjs.TokenUsageReportBreakdown; exports.TokenUsageReportContainer = TokenUsageReportContainer; exports.TokenUsageReportFilterBar = TokenUsageReportFilterBar; exports.TokenUsageReportProvider = TokenUsageReportProvider; exports.TokenUsageReportService = TokenUsageReportService; exports.TokenUsageReportSummary = _chunk77JC2UCFjs.TokenUsageReportSummary; exports.TokenUsageReportTiles = TokenUsageReportTiles; exports.TokenUsageReportTimeline = _chunk77JC2UCFjs.TokenUsageReportTimeline; exports.TokenUsageTimelineChart = TokenUsageTimelineChart; exports.configureTokenUsage = _chunk77JC2UCFjs.configureTokenUsage; exports.createUsageFormatters = _chunkQI4SCGPBjs.createUsageFormatters; exports.getTokenUsageCurrency = _chunk77JC2UCFjs.getTokenUsageCurrency; exports.seriesColor = _chunkQI4SCGPBjs.seriesColor; exports.seriesTheme = _chunkQI4SCGPBjs.seriesTheme; exports.tokenUsageModules = _chunk77JC2UCFjs.tokenUsageModules; exports.useTokenUsageAdmin = useTokenUsageAdmin; exports.useTokenUsageReport = useTokenUsageReport; exports.useUsageFormatters = _chunkQI4SCGPBjs.useUsageFormatters;
1331
+ exports.TOKEN_USAGE_ADMIN_I18N_KEYS = TOKEN_USAGE_ADMIN_I18N_KEYS; exports.TOKEN_USAGE_REPORT_I18N_KEYS = TOKEN_USAGE_REPORT_I18N_KEYS; exports.TokenUsageAdminBreakdown = _chunk5XP5G45Bjs.TokenUsageAdminBreakdown; exports.TokenUsageAdminBreakdownModule = _chunk5XP5G45Bjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminContainer = TokenUsageAdminContainer; exports.TokenUsageAdminFilterBar = TokenUsageAdminFilterBar; exports.TokenUsageAdminProvider = TokenUsageAdminProvider; exports.TokenUsageAdminService = TokenUsageAdminService; exports.TokenUsageAdminSummary = _chunk5XP5G45Bjs.TokenUsageAdminSummary; exports.TokenUsageAdminSummaryModule = _chunk5XP5G45Bjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTiles = TokenUsageAdminTiles; exports.TokenUsageAdminTimeline = _chunk5XP5G45Bjs.TokenUsageAdminTimeline; exports.TokenUsageAdminTimelineModule = _chunk5XP5G45Bjs.TokenUsageAdminTimelineModule; exports.TokenUsageBreakdownTable = TokenUsageBreakdownTable; exports.TokenUsageRankedBar = TokenUsageRankedBar; exports.TokenUsageReportBreakdown = _chunk5XP5G45Bjs.TokenUsageReportBreakdown; exports.TokenUsageReportContainer = TokenUsageReportContainer; exports.TokenUsageReportFilterBar = TokenUsageReportFilterBar; exports.TokenUsageReportProvider = TokenUsageReportProvider; exports.TokenUsageReportService = TokenUsageReportService; exports.TokenUsageReportSummary = _chunk5XP5G45Bjs.TokenUsageReportSummary; exports.TokenUsageReportTiles = TokenUsageReportTiles; exports.TokenUsageReportTimeline = _chunk5XP5G45Bjs.TokenUsageReportTimeline; exports.TokenUsageTimelineChart = TokenUsageTimelineChart; exports.configureTokenUsage = _chunk5XP5G45Bjs.configureTokenUsage; exports.createUsageFormatters = _chunkM7FA63QEjs.createUsageFormatters; exports.getTokenUsageCurrency = _chunk5XP5G45Bjs.getTokenUsageCurrency; exports.seriesColor = _chunkM7FA63QEjs.seriesColor; exports.seriesTheme = _chunkM7FA63QEjs.seriesTheme; exports.tokenUsageModules = _chunk5XP5G45Bjs.tokenUsageModules; exports.useTokenUsageAdmin = useTokenUsageAdmin; exports.useTokenUsageReport = useTokenUsageReport; exports.useUsageFormatters = _chunkM7FA63QEjs.useUsageFormatters;
1332
1332
  //# sourceMappingURL=index.js.map