@carlonicora/nextjs-jsonapi 3.0.0 → 3.1.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 (90) hide show
  1. package/dist/AbstractApiData-DtitRWPz.d.ts +47 -0
  2. package/dist/AbstractApiData-XLhBP5Tl.d.mts +47 -0
  3. package/dist/{BlockNoteEditor-CDTU6DRN.js → BlockNoteEditor-4KBDD2TM.js} +20 -20
  4. package/dist/{BlockNoteEditor-CDTU6DRN.js.map → BlockNoteEditor-4KBDD2TM.js.map} +1 -1
  5. package/dist/{BlockNoteEditor-VVAY73V2.mjs → BlockNoteEditor-LJ2KA44Z.mjs} +5 -5
  6. package/dist/{JsonApiRequest-3UWVIIFL.mjs → JsonApiRequest-2OQCZAK6.mjs} +2 -2
  7. package/dist/JsonApiRequest-6TYNBVUL.js +26 -0
  8. package/dist/{JsonApiRequest-QRU3IPIU.js.map → JsonApiRequest-6TYNBVUL.js.map} +1 -1
  9. package/dist/ai-connection.module-28f-hux0.d.mts +255 -0
  10. package/dist/ai-connection.module-Bqwh_DnR.d.ts +255 -0
  11. package/dist/billing/index.js +399 -399
  12. package/dist/billing/index.mjs +4 -4
  13. package/dist/{chunk-TWXKAY34.mjs → chunk-CGJW7ZZM.mjs} +310 -5
  14. package/dist/chunk-CGJW7ZZM.mjs.map +1 -0
  15. package/dist/{chunk-E5YA5Z5X.mjs → chunk-CMGXH5SA.mjs} +2 -1
  16. package/dist/chunk-CMGXH5SA.mjs.map +1 -0
  17. package/dist/{chunk-JKGEJGSD.js → chunk-H7DOSB7W.js} +9 -9
  18. package/dist/{chunk-JKGEJGSD.js.map → chunk-H7DOSB7W.js.map} +1 -1
  19. package/dist/{chunk-FPO4DLZN.js → chunk-PFAZPP54.js} +2 -1
  20. package/dist/chunk-PFAZPP54.js.map +1 -0
  21. package/dist/{chunk-UGNLKDI6.js → chunk-UYOQG5IW.js} +1628 -959
  22. package/dist/chunk-UYOQG5IW.js.map +1 -0
  23. package/dist/{chunk-J54546YC.mjs → chunk-WCRZEBX4.mjs} +1750 -1081
  24. package/dist/chunk-WCRZEBX4.mjs.map +1 -0
  25. package/dist/{chunk-53B6NPGA.js → chunk-YUXCJ35V.js} +377 -72
  26. package/dist/chunk-YUXCJ35V.js.map +1 -0
  27. package/dist/{chunk-PHEFWL6L.mjs → chunk-ZMYZFQN3.mjs} +3 -3
  28. package/dist/client/index.js +5 -5
  29. package/dist/client/index.mjs +4 -4
  30. package/dist/components/index.d.mts +122 -4
  31. package/dist/components/index.d.ts +122 -4
  32. package/dist/components/index.js +31 -5
  33. package/dist/components/index.js.map +1 -1
  34. package/dist/components/index.mjs +30 -4
  35. package/dist/{config-BIjrg5wd.d.ts → config-B6UB7j69.d.ts} +1 -46
  36. package/dist/{config-BRUjtCd1.d.mts → config-n-ZpPmOL.d.mts} +1 -46
  37. package/dist/contexts/index.js +5 -5
  38. package/dist/contexts/index.mjs +4 -4
  39. package/dist/core/index.d.mts +5 -4
  40. package/dist/core/index.d.ts +5 -4
  41. package/dist/core/index.js +11 -3
  42. package/dist/core/index.js.map +1 -1
  43. package/dist/core/index.mjs +10 -2
  44. package/dist/features/help/index.js +38 -38
  45. package/dist/features/help/index.mjs +4 -4
  46. package/dist/features/tokenusage/index.d.mts +2 -2
  47. package/dist/features/tokenusage/index.d.ts +2 -2
  48. package/dist/features/tokenusage/index.js +102 -102
  49. package/dist/features/tokenusage/index.mjs +4 -4
  50. package/dist/index.d.mts +3 -3
  51. package/dist/index.d.ts +3 -3
  52. package/dist/index.js +12 -4
  53. package/dist/index.js.map +1 -1
  54. package/dist/index.mjs +11 -3
  55. package/dist/server/index.js +12 -12
  56. package/dist/server/index.mjs +2 -2
  57. package/package.json +1 -1
  58. package/src/components/index.ts +1 -0
  59. package/src/core/index.ts +5 -0
  60. package/src/core/registry/ModuleRegistry.ts +2 -0
  61. package/src/core/utils/translateResponse.ts +6 -0
  62. package/src/features/administration/components/AdminIndexContainer.tsx +9 -2
  63. package/src/features/ai-connection/ai-connection.module.ts +14 -0
  64. package/src/features/ai-connection/components/containers/AiConnectionsContainer.tsx +109 -0
  65. package/src/features/ai-connection/components/forms/AiConnectionDeleter.tsx +58 -0
  66. package/src/features/ai-connection/components/forms/AiConnectionEditor.tsx +329 -0
  67. package/src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx +223 -0
  68. package/src/features/ai-connection/contexts/AiConnectionsContext.tsx +111 -0
  69. package/src/features/ai-connection/data/__tests__/ai-connection.test.ts +202 -0
  70. package/src/features/ai-connection/data/ai-connection.fields.ts +6 -0
  71. package/src/features/ai-connection/data/ai-connection.interface.ts +87 -0
  72. package/src/features/ai-connection/data/ai-connection.service.ts +90 -0
  73. package/src/features/ai-connection/data/ai-connection.ts +244 -0
  74. package/src/features/ai-connection/data/index.ts +4 -0
  75. package/src/features/ai-connection/i18n-keys.ts +66 -0
  76. package/src/features/ai-connection/index.ts +11 -0
  77. package/src/features/index.ts +1 -0
  78. package/src/features/user/components/forms/UserEditor.tsx +11 -2
  79. package/dist/AuthComponent-Cik96ElA.d.mts +0 -56
  80. package/dist/AuthComponent-DTTKu3VK.d.ts +0 -56
  81. package/dist/JsonApiRequest-QRU3IPIU.js +0 -26
  82. package/dist/chunk-53B6NPGA.js.map +0 -1
  83. package/dist/chunk-E5YA5Z5X.mjs.map +0 -1
  84. package/dist/chunk-FPO4DLZN.js.map +0 -1
  85. package/dist/chunk-J54546YC.mjs.map +0 -1
  86. package/dist/chunk-TWXKAY34.mjs.map +0 -1
  87. package/dist/chunk-UGNLKDI6.js.map +0 -1
  88. /package/dist/{BlockNoteEditor-VVAY73V2.mjs.map → BlockNoteEditor-LJ2KA44Z.mjs.map} +0 -0
  89. /package/dist/{JsonApiRequest-3UWVIIFL.mjs.map → JsonApiRequest-2OQCZAK6.mjs.map} +0 -0
  90. /package/dist/{chunk-PHEFWL6L.mjs.map → chunk-ZMYZFQN3.mjs.map} +0 -0
@@ -26,8 +26,8 @@
26
26
 
27
27
 
28
28
 
29
- var _chunkUGNLKDI6js = require('../../chunk-UGNLKDI6.js');
30
- require('../../chunk-JKGEJGSD.js');
29
+ var _chunkUYOQG5IWjs = require('../../chunk-UYOQG5IW.js');
30
+ require('../../chunk-H7DOSB7W.js');
31
31
 
32
32
 
33
33
 
@@ -45,10 +45,10 @@ require('../../chunk-JKGEJGSD.js');
45
45
 
46
46
 
47
47
 
48
- var _chunk53B6NPGAjs = require('../../chunk-53B6NPGA.js');
48
+ var _chunkYUXCJ35Vjs = require('../../chunk-YUXCJ35V.js');
49
49
  require('../../chunk-LXKSUWAV.js');
50
50
  require('../../chunk-IBS6NI7D.js');
51
- require('../../chunk-FPO4DLZN.js');
51
+ require('../../chunk-PFAZPP54.js');
52
52
  require('../../chunk-3EPNHTMH.js');
53
53
 
54
54
 
@@ -70,7 +70,7 @@ function TokenUsageAdminFilterBar({ granularity, companyId, metric, companies, o
70
70
  };
71
71
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
72
72
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
73
- _chunkUGNLKDI6js.DateRangeSelector,
73
+ _chunkUYOQG5IWjs.DateRangeSelector,
74
74
  {
75
75
  onDateChange: (range) => {
76
76
  if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
@@ -105,16 +105,16 @@ function TokenUsageAdminFilterBar({ granularity, companyId, metric, companies, o
105
105
  }
106
106
  ),
107
107
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
108
- _chunkUGNLKDI6js.Select,
108
+ _chunkUYOQG5IWjs.Select,
109
109
  {
110
110
  items: companyItems,
111
111
  value: _nullishCoalesce(companyId, () => ( ALL_COMPANIES)),
112
112
  onValueChange: (value) => onChange({ companyId: !value || value === ALL_COMPANIES ? void 0 : value }),
113
113
  children: [
114
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SelectTrigger, { className: "w-56", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SelectValue, { placeholder: t("token_usage.admin.all_companies") }) }),
115
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.SelectContent, { children: [
116
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SelectItem, { value: ALL_COMPANIES, children: t("token_usage.admin.all_companies") }),
117
- companies.map((company) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SelectItem, { value: company.id, children: company.label }, company.id))
114
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SelectTrigger, { className: "w-56", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SelectValue, { placeholder: t("token_usage.admin.all_companies") }) }),
115
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.SelectContent, { children: [
116
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SelectItem, { value: ALL_COMPANIES, children: t("token_usage.admin.all_companies") }),
117
+ companies.map((company) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SelectItem, { value: company.id, children: company.label }, company.id))
118
118
  ] })
119
119
  ]
120
120
  }
@@ -137,13 +137,13 @@ function Segmented({
137
137
  children: options.map((option) => {
138
138
  const selected = option.value === value;
139
139
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
140
- _chunkUGNLKDI6js.Button,
140
+ _chunkUYOQG5IWjs.Button,
141
141
  {
142
142
  type: "button",
143
143
  size: "sm",
144
144
  variant: selected ? "default" : "ghost",
145
145
  "aria-pressed": selected,
146
- className: _chunk53B6NPGAjs.cn.call(void 0, !selected && "text-muted-foreground"),
146
+ className: _chunkYUXCJ35Vjs.cn.call(void 0, !selected && "text-muted-foreground"),
147
147
  onClick: () => onSelect(option.value),
148
148
  children: option.label
149
149
  },
@@ -163,36 +163,36 @@ function withFilters(endpoint, filters) {
163
163
  return endpoint;
164
164
  }
165
165
  _chunk7QVYU63Ejs.__name.call(void 0, withFilters, "withFilters");
166
- var TokenUsageAdminService = class extends _chunk53B6NPGAjs.AbstractService {
166
+ var TokenUsageAdminService = class extends _chunkYUXCJ35Vjs.AbstractService {
167
167
  static {
168
168
  _chunk7QVYU63Ejs.__name.call(void 0, this, "TokenUsageAdminService");
169
169
  }
170
170
  /** Six rows: {customer, platform, total} × {current, previous}. */
171
171
  static async getSummary(filters) {
172
- const endpoint = withFilters(new (0, _chunk53B6NPGAjs.EndpointCreator)({ endpoint: _chunk53B6NPGAjs.Modules.TokenUsageAdminSummary }), filters);
172
+ const endpoint = withFilters(new (0, _chunkYUXCJ35Vjs.EndpointCreator)({ endpoint: _chunkYUXCJ35Vjs.Modules.TokenUsageAdminSummary }), filters);
173
173
  return this.callApi({
174
- type: _chunk53B6NPGAjs.Modules.TokenUsageAdminSummary,
174
+ type: _chunkYUXCJ35Vjs.Modules.TokenUsageAdminSummary,
175
175
  method: "GET" /* GET */,
176
176
  endpoint: endpoint.generate()
177
177
  });
178
178
  }
179
179
  static async getTimeline(params) {
180
- const endpoint = withFilters(new (0, _chunk53B6NPGAjs.EndpointCreator)({ endpoint: _chunk53B6NPGAjs.Modules.TokenUsageAdminTimeline }), params);
180
+ const endpoint = withFilters(new (0, _chunkYUXCJ35Vjs.EndpointCreator)({ endpoint: _chunkYUXCJ35Vjs.Modules.TokenUsageAdminTimeline }), params);
181
181
  endpoint.addAdditionalParam("granularity", params.granularity);
182
182
  endpoint.addAdditionalParam("stackBy", params.stackBy);
183
183
  return this.callApi({
184
- type: _chunk53B6NPGAjs.Modules.TokenUsageAdminTimeline,
184
+ type: _chunkYUXCJ35Vjs.Modules.TokenUsageAdminTimeline,
185
185
  method: "GET" /* GET */,
186
186
  endpoint: endpoint.generate()
187
187
  });
188
188
  }
189
189
  static async getBreakdown(params) {
190
- const endpoint = withFilters(new (0, _chunk53B6NPGAjs.EndpointCreator)({ endpoint: _chunk53B6NPGAjs.Modules.TokenUsageAdminBreakdown }), params);
190
+ const endpoint = withFilters(new (0, _chunkYUXCJ35Vjs.EndpointCreator)({ endpoint: _chunkYUXCJ35Vjs.Modules.TokenUsageAdminBreakdown }), params);
191
191
  endpoint.addAdditionalParam("dimension", params.dimension);
192
192
  endpoint.addAdditionalParam("scope", params.scope);
193
193
  if (params.limit !== void 0) endpoint.addAdditionalParam("limit", String(params.limit));
194
194
  return this.callApi({
195
- type: _chunk53B6NPGAjs.Modules.TokenUsageAdminBreakdown,
195
+ type: _chunkYUXCJ35Vjs.Modules.TokenUsageAdminBreakdown,
196
196
  method: "GET" /* GET */,
197
197
  endpoint: endpoint.generate()
198
198
  });
@@ -219,7 +219,7 @@ var TokenUsageAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
219
219
  pageUrl = TOKEN_USAGE_ADMIN_PAGE_URL
220
220
  }) => {
221
221
  const t = _nextintl.useTranslations.call(void 0, );
222
- const generateUrl = _chunkUGNLKDI6js.usePageUrlGenerator.call(void 0, );
222
+ const generateUrl = _chunkUYOQG5IWjs.usePageUrlGenerator.call(void 0, );
223
223
  const [filters, setFilterState] = _react.useState.call(void 0, () => {
224
224
  const range = defaultRange();
225
225
  return {
@@ -337,7 +337,7 @@ var TokenUsageAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
337
337
  error
338
338
  ]
339
339
  );
340
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageAdminContext.Provider, { value: contextValue, children }) });
340
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageAdminContext.Provider, { value: contextValue, children }) });
341
341
  }, "TokenUsageAdminProvider");
342
342
  var useTokenUsageAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
343
343
  const ctx = _react.useContext.call(void 0, TokenUsageAdminContext);
@@ -393,7 +393,7 @@ function createUsageFormatters(locale, currency) {
393
393
  _chunk7QVYU63Ejs.__name.call(void 0, createUsageFormatters, "createUsageFormatters");
394
394
  function useUsageFormatters() {
395
395
  const locale = _nextintl.useLocale.call(void 0, );
396
- const currency = _chunk53B6NPGAjs.getTokenUsageCurrency.call(void 0, );
396
+ const currency = _chunkYUXCJ35Vjs.getTokenUsageCurrency.call(void 0, );
397
397
  return _react.useMemo.call(void 0, () => createUsageFormatters(locale, currency), [locale, currency]);
398
398
  }
399
399
  _chunk7QVYU63Ejs.__name.call(void 0, useUsageFormatters, "useUsageFormatters");
@@ -432,7 +432,7 @@ function TokenUsageAdminTiles({ summary, metric, singleCustomerMode }) {
432
432
  const averagePerCall = totalCurrent.calls ? totalCurrent.cost / totalCurrent.calls : 0;
433
433
  const cacheHit = cacheHitPercentage(totalCurrent.cached, totalCurrent.tokensIn);
434
434
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3", children: [
435
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk53B6NPGAjs.cn.call(void 0, "grid gap-3", singleCustomerMode ? "sm:grid-cols-1" : "sm:grid-cols-2"), children: [
435
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkYUXCJ35Vjs.cn.call(void 0, "grid gap-3", singleCustomerMode ? "sm:grid-cols-1" : "sm:grid-cols-2"), children: [
436
436
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
437
437
  LeadTile,
438
438
  {
@@ -497,7 +497,7 @@ function LeadTile({
497
497
  previousLabel,
498
498
  decimal
499
499
  }) {
500
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "grid gap-1", children: [
500
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "grid gap-1", children: [
501
501
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: label }),
502
502
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
503
503
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
@@ -514,7 +514,7 @@ function SupportingTile({
514
514
  delta,
515
515
  decimal
516
516
  }) {
517
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "grid gap-1", children: [
517
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "grid gap-1", children: [
518
518
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: label }),
519
519
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
520
520
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
@@ -537,7 +537,7 @@ function Delta({
537
537
  "span",
538
538
  {
539
539
  "data-testid": testId,
540
- className: _chunk53B6NPGAjs.cn.call(void 0,
540
+ className: _chunkYUXCJ35Vjs.cn.call(void 0,
541
541
  "inline-flex items-center gap-0.5 text-xs tabular-nums",
542
542
  increased ? "text-success" : "text-destructive"
543
543
  ),
@@ -611,13 +611,13 @@ function TokenUsageBreakdownTable({ rows, metric }) {
611
611
  // The package's <Table> wraps itself in an `overflow-x-clip` container, which
612
612
  // would swallow the overflow before this scroller ever saw it — hence the
613
613
  // child override. Wide metric tables must scroll, never widen the page.
614
- /* @__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, _chunkUGNLKDI6js.Table, { children: [
615
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableRow, { children: columns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableHead, { className: _chunk53B6NPGAjs.cn.call(void 0, column.numeric && "text-right"), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
614
+ /* @__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, _chunkUYOQG5IWjs.Table, { children: [
615
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableRow, { children: columns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableHead, { className: _chunkYUXCJ35Vjs.cn.call(void 0, column.numeric && "text-right"), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
616
616
  "button",
617
617
  {
618
618
  type: "button",
619
619
  onClick: () => toggleSort(column.key),
620
- className: _chunk53B6NPGAjs.cn.call(void 0,
620
+ className: _chunkYUXCJ35Vjs.cn.call(void 0,
621
621
  "hover:text-primary inline-flex items-center gap-1 text-xs font-medium",
622
622
  column.numeric && "flex-row-reverse"
623
623
  ),
@@ -627,20 +627,20 @@ function TokenUsageBreakdownTable({ rows, metric }) {
627
627
  ]
628
628
  }
629
629
  ) }, column.key)) }) }),
630
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableBody, { children: sortedRows.map((row) => {
630
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableBody, { children: sortedRows.map((row) => {
631
631
  const value = metricValue(row, metric);
632
632
  const share = total > 0 ? value / total * 100 : 0;
633
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.TableRow, { "data-testid": `breakdown-row-${row.id}`, children: [
634
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-xs", children: row.id === "other" ? t("token_usage.admin.other") : row.label }),
635
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-muted-foreground text-xs", children: _nullishCoalesce(row.sublabel, () => ( "")) }),
636
- showActiveUsers && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right text-xs tabular-nums", children: row.activeUsers === void 0 ? "" : decimal(row.activeUsers, 0) }),
637
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right text-xs tabular-nums", children: decimal(row.calls, 0) }),
638
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right text-xs tabular-nums", children: decimal(row.tokensIn, 0) }),
639
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right text-xs tabular-nums", children: decimal(row.tokensOut, 0) }),
640
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right text-xs tabular-nums", children: percent(cacheHitPercentage(row.cached, row.tokensIn)) }),
641
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right text-xs tabular-nums", children: formatValue(row.cost, "cost") }),
642
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right text-xs tabular-nums", children: formatValue(row.credits, "credits") }),
643
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.TableCell, { className: "text-right text-xs tabular-nums", children: percent(share) })
633
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.TableRow, { "data-testid": `breakdown-row-${row.id}`, children: [
634
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-xs", children: row.id === "other" ? t("token_usage.admin.other") : row.label }),
635
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-muted-foreground text-xs", children: _nullishCoalesce(row.sublabel, () => ( "")) }),
636
+ showActiveUsers && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right text-xs tabular-nums", children: row.activeUsers === void 0 ? "" : decimal(row.activeUsers, 0) }),
637
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right text-xs tabular-nums", children: decimal(row.calls, 0) }),
638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right text-xs tabular-nums", children: decimal(row.tokensIn, 0) }),
639
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right text-xs tabular-nums", children: decimal(row.tokensOut, 0) }),
640
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right text-xs tabular-nums", children: percent(cacheHitPercentage(row.cached, row.tokensIn)) }),
641
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right text-xs tabular-nums", children: formatValue(row.cost, "cost") }),
642
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right text-xs tabular-nums", children: formatValue(row.credits, "credits") }),
643
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.TableCell, { className: "text-right text-xs tabular-nums", children: percent(share) })
644
644
  ] }, row.id);
645
645
  }) })
646
646
  ] }) })
@@ -833,7 +833,7 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
833
833
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, children: [
834
834
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "timeline-data", children: JSON.stringify(chartData) }),
835
835
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "timeline-series", children: JSON.stringify(seriesKeys) }),
836
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.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: [
836
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.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: [
837
837
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
838
838
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
839
839
  _recharts.XAxis,
@@ -857,10 +857,10 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
857
857
  }
858
858
  ),
859
859
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
860
- _chunkUGNLKDI6js.ChartTooltip,
860
+ _chunkUYOQG5IWjs.ChartTooltip,
861
861
  {
862
862
  content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
863
- _chunkUGNLKDI6js.ChartTooltipContent,
863
+ _chunkUYOQG5IWjs.ChartTooltipContent,
864
864
  {
865
865
  labelFormatter: (value) => bucketDate(String(value), granularity),
866
866
  valueFormatter: (value) => formatValue(Number(value), metric),
@@ -869,7 +869,7 @@ function TokenUsageTimelineChart({ rows, metric, stackBy, className }) {
869
869
  )
870
870
  }
871
871
  ),
872
- seriesKeys.length >= 2 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.ChartLegendContent, {}) }) : null,
872
+ seriesKeys.length >= 2 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.ChartLegendContent, {}) }) : null,
873
873
  seriesKeys.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
874
874
  _recharts.Bar,
875
875
  {
@@ -920,19 +920,19 @@ function TokenUsageAdminContainer() {
920
920
  [t]
921
921
  );
922
922
  if (error) {
923
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
923
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
924
924
  }
925
- if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.RoundPageContainer, { fullWidth: true, forceHeader: true });
925
+ if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
926
926
  const emptyLabel = t("token_usage.admin.no_data");
927
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
927
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
928
928
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageAdminTiles, { summary, metric: filters.metric, singleCustomerMode: hidePlatform }),
929
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
930
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardHeader, { children: [
931
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: t("token_usage.admin.usage_over_time") }),
932
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardAction, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
929
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
930
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardHeader, { children: [
931
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: t("token_usage.admin.usage_over_time") }),
932
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardAction, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
933
933
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.admin.stack_by") }),
934
934
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
935
- _chunkUGNLKDI6js.Select,
935
+ _chunkUYOQG5IWjs.Select,
936
936
  {
937
937
  items: stackByItems,
938
938
  value: filters.stackBy,
@@ -940,29 +940,29 @@ function TokenUsageAdminContainer() {
940
940
  if (value) setFilters({ stackBy: value });
941
941
  },
942
942
  children: [
943
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SelectTrigger, { size: "sm", className: "w-36", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SelectValue, {}) }),
944
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SelectContent, { children: STACK_BY_VALUES.map((value) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SelectItem, { value, children: stackByItems[value] }, value)) })
943
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SelectTrigger, { size: "sm", className: "w-36", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SelectValue, {}) }),
944
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SelectContent, { children: STACK_BY_VALUES.map((value) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SelectItem, { value, children: stackByItems[value] }, value)) })
945
945
  ]
946
946
  }
947
947
  )
948
948
  ] }) })
949
949
  ] }),
950
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: filters.metric, stackBy: filters.stackBy }) })
950
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: filters.metric, stackBy: filters.stackBy }) })
951
951
  ] }),
952
952
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-4 md:grid-cols-2", children: [
953
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
954
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: t("token_usage.admin.by_company") }) }),
955
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byCompany, metric: filters.metric, emptyLabel }) })
953
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
954
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: t("token_usage.admin.by_company") }) }),
955
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byCompany, metric: filters.metric, emptyLabel }) })
956
956
  ] }),
957
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
958
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: t("token_usage.admin.by_user") }) }),
959
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byUser, metric: filters.metric, emptyLabel }) })
957
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
958
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: t("token_usage.admin.by_user") }) }),
959
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byUser, metric: filters.metric, emptyLabel }) })
960
960
  ] })
961
961
  ] }),
962
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk53B6NPGAjs.cn.call(void 0, "grid gap-4", !hidePlatform && "md:grid-cols-2"), children: [
963
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
964
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: t("token_usage.admin.customer_by_operation") }) }),
965
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
962
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkYUXCJ35Vjs.cn.call(void 0, "grid gap-4", !hidePlatform && "md:grid-cols-2"), children: [
963
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
964
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: t("token_usage.admin.customer_by_operation") }) }),
965
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
966
966
  TokenUsageRankedBar,
967
967
  {
968
968
  rows: byCustomerOperation,
@@ -972,9 +972,9 @@ function TokenUsageAdminContainer() {
972
972
  }
973
973
  ) })
974
974
  ] }),
975
- !hidePlatform && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
976
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: t("token_usage.admin.platform_by_operation") }) }),
977
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
975
+ !hidePlatform && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
976
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: t("token_usage.admin.platform_by_operation") }) }),
977
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
978
978
  TokenUsageRankedBar,
979
979
  {
980
980
  rows: byOperation,
@@ -985,9 +985,9 @@ function TokenUsageAdminContainer() {
985
985
  ) })
986
986
  ] })
987
987
  ] }),
988
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
989
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: t("token_usage.admin.detail") }) }),
990
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageBreakdownTable, { rows: byCompany, metric: filters.metric }) })
988
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
989
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: t("token_usage.admin.detail") }) }),
990
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageBreakdownTable, { rows: byCompany, metric: filters.metric }) })
991
991
  ] })
992
992
  ] }) });
993
993
  }
@@ -1000,36 +1000,36 @@ function withFilters2(endpoint, filters) {
1000
1000
  return endpoint;
1001
1001
  }
1002
1002
  _chunk7QVYU63Ejs.__name.call(void 0, withFilters2, "withFilters");
1003
- var TokenUsageReportService = class extends _chunk53B6NPGAjs.AbstractService {
1003
+ var TokenUsageReportService = class extends _chunkYUXCJ35Vjs.AbstractService {
1004
1004
  static {
1005
1005
  _chunk7QVYU63Ejs.__name.call(void 0, this, "TokenUsageReportService");
1006
1006
  }
1007
1007
  /** Two rows: window "current" and "previous". */
1008
1008
  static async getSummary(filters) {
1009
- const endpoint = withFilters2(new (0, _chunk53B6NPGAjs.EndpointCreator)({ endpoint: _chunk53B6NPGAjs.Modules.TokenUsageReportSummary }), filters);
1009
+ const endpoint = withFilters2(new (0, _chunkYUXCJ35Vjs.EndpointCreator)({ endpoint: _chunkYUXCJ35Vjs.Modules.TokenUsageReportSummary }), filters);
1010
1010
  return this.callApi({
1011
- type: _chunk53B6NPGAjs.Modules.TokenUsageReportSummary,
1011
+ type: _chunkYUXCJ35Vjs.Modules.TokenUsageReportSummary,
1012
1012
  method: "GET" /* GET */,
1013
1013
  endpoint: endpoint.generate()
1014
1014
  });
1015
1015
  }
1016
1016
  static async getTimeline(params) {
1017
- const endpoint = withFilters2(new (0, _chunk53B6NPGAjs.EndpointCreator)({ endpoint: _chunk53B6NPGAjs.Modules.TokenUsageReportTimeline }), params);
1017
+ const endpoint = withFilters2(new (0, _chunkYUXCJ35Vjs.EndpointCreator)({ endpoint: _chunkYUXCJ35Vjs.Modules.TokenUsageReportTimeline }), params);
1018
1018
  endpoint.addAdditionalParam("granularity", params.granularity);
1019
1019
  return this.callApi({
1020
- type: _chunk53B6NPGAjs.Modules.TokenUsageReportTimeline,
1020
+ type: _chunkYUXCJ35Vjs.Modules.TokenUsageReportTimeline,
1021
1021
  method: "GET" /* GET */,
1022
1022
  endpoint: endpoint.generate()
1023
1023
  });
1024
1024
  }
1025
1025
  static async getBreakdown(params) {
1026
- const endpoint = withFilters2(new (0, _chunk53B6NPGAjs.EndpointCreator)({ endpoint: _chunk53B6NPGAjs.Modules.TokenUsageReportBreakdown }), params);
1026
+ const endpoint = withFilters2(new (0, _chunkYUXCJ35Vjs.EndpointCreator)({ endpoint: _chunkYUXCJ35Vjs.Modules.TokenUsageReportBreakdown }), params);
1027
1027
  endpoint.addAdditionalParam("dimension", params.dimension);
1028
1028
  if (params.targetLabel) endpoint.addAdditionalParam("targetLabel", params.targetLabel);
1029
1029
  endpoint.addAdditionalParam("metric", params.metric);
1030
1030
  if (params.limit !== void 0) endpoint.addAdditionalParam("limit", String(params.limit));
1031
1031
  return this.callApi({
1032
- type: _chunk53B6NPGAjs.Modules.TokenUsageReportBreakdown,
1032
+ type: _chunkYUXCJ35Vjs.Modules.TokenUsageReportBreakdown,
1033
1033
  method: "GET" /* GET */,
1034
1034
  endpoint: endpoint.generate()
1035
1035
  });
@@ -1108,7 +1108,7 @@ var TOKEN_USAGE_REPORT_I18N_KEYS = [
1108
1108
 
1109
1109
  function TokenUsageReportFilterBar({ onChange }) {
1110
1110
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1111
- _chunkUGNLKDI6js.DateRangeSelector,
1111
+ _chunkUYOQG5IWjs.DateRangeSelector,
1112
1112
  {
1113
1113
  onDateChange: (range) => {
1114
1114
  if (!_optionalChain([range, 'optionalAccess', _10 => _10.from]) || !_optionalChain([range, 'optionalAccess', _11 => _11.to])) return;
@@ -1141,7 +1141,7 @@ var TokenUsageReportProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
1141
1141
  pageUrl = TOKEN_USAGE_REPORT_PAGE_URL
1142
1142
  }) => {
1143
1143
  const t = _nextintl.useTranslations.call(void 0, );
1144
- const generateUrl = _chunkUGNLKDI6js.usePageUrlGenerator.call(void 0, );
1144
+ const generateUrl = _chunkUYOQG5IWjs.usePageUrlGenerator.call(void 0, );
1145
1145
  const [filters, setFilterState] = _react.useState.call(void 0, () => {
1146
1146
  const range = defaultRange2();
1147
1147
  return { from: _nullishCoalesce(initialFrom, () => ( range.from)), to: _nullishCoalesce(initialTo, () => ( range.to)) };
@@ -1205,7 +1205,7 @@ var TokenUsageReportProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
1205
1205
  () => ({ summary, timeline, byOperation, byTarget, targetPanelTitleKey, filters, setFilters, isLoading, error }),
1206
1206
  [summary, timeline, byOperation, byTarget, targetPanelTitleKey, filters, setFilters, isLoading, error]
1207
1207
  );
1208
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageReportContext.Provider, { value: contextValue, children }) });
1208
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageReportContext.Provider, { value: contextValue, children }) });
1209
1209
  }, "TokenUsageReportProvider");
1210
1210
  var useTokenUsageReport = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
1211
1211
  const ctx = _react.useContext.call(void 0, TokenUsageReportContext);
@@ -1233,7 +1233,7 @@ function TokenUsageReportTiles({ summary, metric, balances }) {
1233
1233
  const monthlyColor = monthlyPercentage > 75 ? "text-success" : monthlyPercentage >= 5 ? "text-warning" : "text-destructive";
1234
1234
  const whole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (value) => decimal(Math.max(0, Math.floor(value)), 0), "whole");
1235
1235
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3", children: [
1236
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Card, { "data-testid": "tile-used", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "grid gap-1", children: [
1236
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Card, { "data-testid": "tile-used", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "grid gap-1", children: [
1237
1237
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.used_in_period") }),
1238
1238
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: formatValue(metricValue(current, metric), metric) }),
1239
1239
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
@@ -1249,21 +1249,21 @@ function TokenUsageReportTiles({ summary, metric, balances }) {
1249
1249
  ] })
1250
1250
  ] }) }),
1251
1251
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
1252
- balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Card, { "data-testid": "tile-monthly", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "grid gap-1", children: [
1252
+ balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Card, { "data-testid": "tile-monthly", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "grid gap-1", children: [
1253
1253
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.monthly_left") }),
1254
1254
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-baseline gap-1", children: [
1255
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-testid": "tile-monthly-value", className: _chunk53B6NPGAjs.cn.call(void 0, "text-sm font-medium tabular-nums", monthlyColor), children: whole(balances.availableMonthlyCredits) }),
1255
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "data-testid": "tile-monthly-value", className: _chunkYUXCJ35Vjs.cn.call(void 0, "text-sm font-medium tabular-nums", monthlyColor), children: whole(balances.availableMonthlyCredits) }),
1256
1256
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: [
1257
1257
  "/ ",
1258
1258
  whole(balances.monthlyCredits)
1259
1259
  ] })
1260
1260
  ] })
1261
1261
  ] }) }),
1262
- balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Card, { "data-testid": "tile-extra", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "grid gap-1", children: [
1262
+ balances && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Card, { "data-testid": "tile-extra", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "grid gap-1", children: [
1263
1263
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.extra_credits") }),
1264
1264
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: whole(balances.availableExtraCredits) })
1265
1265
  ] }) }),
1266
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Card, { "data-testid": "tile-calls", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.CardContent, { className: "grid gap-1", children: [
1266
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Card, { "data-testid": "tile-calls", size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.CardContent, { className: "grid gap-1", children: [
1267
1267
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("token_usage.report.calls") }),
1268
1268
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: decimal(current.calls, 0) })
1269
1269
  ] }) })
@@ -1285,7 +1285,7 @@ function Delta2({
1285
1285
  "span",
1286
1286
  {
1287
1287
  "data-testid": testId,
1288
- className: _chunk53B6NPGAjs.cn.call(void 0,
1288
+ className: _chunkYUXCJ35Vjs.cn.call(void 0,
1289
1289
  "inline-flex items-center gap-0.5 text-xs tabular-nums",
1290
1290
  increased ? "text-warning" : "text-success"
1291
1291
  ),
@@ -1305,21 +1305,21 @@ function TokenUsageReportContainer({ balances = null }) {
1305
1305
  const t = _nextintl.useTranslations.call(void 0, );
1306
1306
  const { summary, timeline, byOperation, byTarget, isLoading, error, targetPanelTitleKey } = useTokenUsageReport();
1307
1307
  if (error) {
1308
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
1308
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
1309
1309
  }
1310
- if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.RoundPageContainer, { fullWidth: true, forceHeader: true });
1310
+ if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
1311
1311
  const emptyLabel = t("token_usage.report.no_data");
1312
1312
  const targetTitle = targetPanelTitleKey && byTarget.length > 0 ? t(targetPanelTitleKey) : void 0;
1313
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
1313
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
1314
1314
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageReportTiles, { summary, metric: "credits", balances }),
1315
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
1316
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: t("token_usage.report.usage_over_time") }) }),
1317
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: "credits", stackBy: "type" }) })
1315
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
1316
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: t("token_usage.report.usage_over_time") }) }),
1317
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageTimelineChart, { rows: timeline, metric: "credits", stackBy: "type" }) })
1318
1318
  ] }),
1319
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunk53B6NPGAjs.cn.call(void 0, "grid gap-4", targetTitle && "md:grid-cols-2"), children: [
1320
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
1321
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: t("token_usage.report.by_operation") }) }),
1322
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1319
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkYUXCJ35Vjs.cn.call(void 0, "grid gap-4", targetTitle && "md:grid-cols-2"), children: [
1320
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
1321
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: t("token_usage.report.by_operation") }) }),
1322
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1323
1323
  TokenUsageRankedBar,
1324
1324
  {
1325
1325
  rows: byOperation,
@@ -1329,9 +1329,9 @@ function TokenUsageReportContainer({ balances = null }) {
1329
1329
  }
1330
1330
  ) })
1331
1331
  ] }),
1332
- targetTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGNLKDI6js.Card, { children: [
1333
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardTitle, { children: targetTitle }) }),
1334
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUGNLKDI6js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byTarget, metric: "credits", emptyLabel }) })
1332
+ targetTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUYOQG5IWjs.Card, { children: [
1333
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardTitle, { children: targetTitle }) }),
1334
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUYOQG5IWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenUsageRankedBar, { rows: byTarget, metric: "credits", emptyLabel }) })
1335
1335
  ] })
1336
1336
  ] })
1337
1337
  ] }) });
@@ -1369,5 +1369,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, TokenUsageReportContainer, "TokenUsageRepor
1369
1369
 
1370
1370
 
1371
1371
 
1372
- exports.TOKEN_USAGE_ADMIN_I18N_KEYS = TOKEN_USAGE_ADMIN_I18N_KEYS; exports.TOKEN_USAGE_REPORT_I18N_KEYS = TOKEN_USAGE_REPORT_I18N_KEYS; exports.TokenUsageAdminBreakdown = _chunk53B6NPGAjs.TokenUsageAdminBreakdown; exports.TokenUsageAdminBreakdownModule = _chunk53B6NPGAjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminContainer = TokenUsageAdminContainer; exports.TokenUsageAdminFilterBar = TokenUsageAdminFilterBar; exports.TokenUsageAdminProvider = TokenUsageAdminProvider; exports.TokenUsageAdminService = TokenUsageAdminService; exports.TokenUsageAdminSummary = _chunk53B6NPGAjs.TokenUsageAdminSummary; exports.TokenUsageAdminSummaryModule = _chunk53B6NPGAjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTiles = TokenUsageAdminTiles; exports.TokenUsageAdminTimeline = _chunk53B6NPGAjs.TokenUsageAdminTimeline; exports.TokenUsageAdminTimelineModule = _chunk53B6NPGAjs.TokenUsageAdminTimelineModule; exports.TokenUsageBreakdownTable = TokenUsageBreakdownTable; exports.TokenUsageRankedBar = TokenUsageRankedBar; exports.TokenUsageReportBreakdown = _chunk53B6NPGAjs.TokenUsageReportBreakdown; exports.TokenUsageReportContainer = TokenUsageReportContainer; exports.TokenUsageReportFilterBar = TokenUsageReportFilterBar; exports.TokenUsageReportProvider = TokenUsageReportProvider; exports.TokenUsageReportService = TokenUsageReportService; exports.TokenUsageReportSummary = _chunk53B6NPGAjs.TokenUsageReportSummary; exports.TokenUsageReportTiles = TokenUsageReportTiles; exports.TokenUsageReportTimeline = _chunk53B6NPGAjs.TokenUsageReportTimeline; exports.TokenUsageTimelineChart = TokenUsageTimelineChart; exports.configureTokenUsage = _chunk53B6NPGAjs.configureTokenUsage; exports.createUsageFormatters = createUsageFormatters; exports.getTokenUsageCurrency = _chunk53B6NPGAjs.getTokenUsageCurrency; exports.tokenUsageModules = _chunk53B6NPGAjs.tokenUsageModules; exports.useTokenUsageAdmin = useTokenUsageAdmin; exports.useTokenUsageReport = useTokenUsageReport; exports.useUsageFormatters = useUsageFormatters;
1372
+ exports.TOKEN_USAGE_ADMIN_I18N_KEYS = TOKEN_USAGE_ADMIN_I18N_KEYS; exports.TOKEN_USAGE_REPORT_I18N_KEYS = TOKEN_USAGE_REPORT_I18N_KEYS; exports.TokenUsageAdminBreakdown = _chunkYUXCJ35Vjs.TokenUsageAdminBreakdown; exports.TokenUsageAdminBreakdownModule = _chunkYUXCJ35Vjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminContainer = TokenUsageAdminContainer; exports.TokenUsageAdminFilterBar = TokenUsageAdminFilterBar; exports.TokenUsageAdminProvider = TokenUsageAdminProvider; exports.TokenUsageAdminService = TokenUsageAdminService; exports.TokenUsageAdminSummary = _chunkYUXCJ35Vjs.TokenUsageAdminSummary; exports.TokenUsageAdminSummaryModule = _chunkYUXCJ35Vjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTiles = TokenUsageAdminTiles; exports.TokenUsageAdminTimeline = _chunkYUXCJ35Vjs.TokenUsageAdminTimeline; exports.TokenUsageAdminTimelineModule = _chunkYUXCJ35Vjs.TokenUsageAdminTimelineModule; exports.TokenUsageBreakdownTable = TokenUsageBreakdownTable; exports.TokenUsageRankedBar = TokenUsageRankedBar; exports.TokenUsageReportBreakdown = _chunkYUXCJ35Vjs.TokenUsageReportBreakdown; exports.TokenUsageReportContainer = TokenUsageReportContainer; exports.TokenUsageReportFilterBar = TokenUsageReportFilterBar; exports.TokenUsageReportProvider = TokenUsageReportProvider; exports.TokenUsageReportService = TokenUsageReportService; exports.TokenUsageReportSummary = _chunkYUXCJ35Vjs.TokenUsageReportSummary; exports.TokenUsageReportTiles = TokenUsageReportTiles; exports.TokenUsageReportTimeline = _chunkYUXCJ35Vjs.TokenUsageReportTimeline; exports.TokenUsageTimelineChart = TokenUsageTimelineChart; exports.configureTokenUsage = _chunkYUXCJ35Vjs.configureTokenUsage; exports.createUsageFormatters = createUsageFormatters; exports.getTokenUsageCurrency = _chunkYUXCJ35Vjs.getTokenUsageCurrency; exports.tokenUsageModules = _chunkYUXCJ35Vjs.tokenUsageModules; exports.useTokenUsageAdmin = useTokenUsageAdmin; exports.useTokenUsageReport = useTokenUsageReport; exports.useUsageFormatters = useUsageFormatters;
1373
1373
  //# sourceMappingURL=index.js.map
@@ -26,8 +26,8 @@ import {
26
26
  TableHeader,
27
27
  TableRow,
28
28
  usePageUrlGenerator
29
- } from "../../chunk-J54546YC.mjs";
30
- import "../../chunk-PHEFWL6L.mjs";
29
+ } from "../../chunk-WCRZEBX4.mjs";
30
+ import "../../chunk-ZMYZFQN3.mjs";
31
31
  import {
32
32
  AbstractService,
33
33
  EndpointCreator,
@@ -45,10 +45,10 @@ import {
45
45
  configureTokenUsage,
46
46
  getTokenUsageCurrency,
47
47
  tokenUsageModules
48
- } from "../../chunk-TWXKAY34.mjs";
48
+ } from "../../chunk-CGJW7ZZM.mjs";
49
49
  import "../../chunk-AUXK7QSA.mjs";
50
50
  import "../../chunk-C7C7VY4F.mjs";
51
- import "../../chunk-E5YA5Z5X.mjs";
51
+ import "../../chunk-CMGXH5SA.mjs";
52
52
  import "../../chunk-VOXD3ZLY.mjs";
53
53
  import {
54
54
  __name
package/dist/index.d.mts CHANGED
@@ -2,15 +2,14 @@ export { A as ApiData } from './ApiData-DPKNfY-9.mjs';
2
2
  import { A as ApiDataInterface, J as JsonApiHydratedDataInterface } from './ApiDataInterface-BcZeXy5X.mjs';
3
3
  export { A as ApiRequestDataTypeInterface, F as FieldSelector, G as GetterKeys, c as createJsonApiInclusion } from './ApiRequestDataTypeInterface-CYEcRUrh.mjs';
4
4
  export { A as ApiResponseInterface } from './ApiResponseInterface-rsXRL_Hn.mjs';
5
- import { A as AbstractApiData } from './config-BRUjtCd1.mjs';
6
- export { b as TokenUsageAdminBreakdownModule, T as TokenUsageAdminSummaryModule, a as TokenUsageAdminTimelineModule, c as configureTokenUsage, g as getTokenUsageCurrency, t as tokenUsageModules } from './config-BRUjtCd1.mjs';
5
+ import { A as AbstractApiData } from './AbstractApiData-XLhBP5Tl.mjs';
7
6
  import { A as AbstractService } from './AbstractService-B0T7h8fX.mjs';
8
7
  export { H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, T as TotalRef, b as clearLastApiMeta, c as clearLastApiTotal, d as getGlobalErrorHandler, a as getLastApiMeta, g as getLastApiTotal, s as setGlobalErrorHandler } from './AbstractService-B0T7h8fX.mjs';
9
8
  export { AppModuleDefinitions, Assistant, AssistantAction, AssistantActionInput, AssistantActionInterface, AssistantActionModule, AssistantActionService, AssistantActionStatus, AssistantMessage, AssistantMessageModule, AssistantMessageService, AssistantModule, AssistantService, AuditLog, AuditLogInterface, AuditLogModule, AuditLogService, Auth, AuthModule, AuthorModule, BackupCodeVerify, BackupCodeVerifyInput, BackupCodeVerifyModule, Billing, BillingModule, BillingService, BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, Chunk, ChunkInput, ChunkModule, ClientAbstractService, ClientHttpMethod, ClientNextRef, ClientPreviousRef, ClientSelfRef, ClientTotalRef, CodiceFiscaleValidationOptions, Company, CompanyFields, CompanyModule, Content, ContentModule, DataClass, DataClass as DataClassRegistry, DiffBlock, DiffResult, EndpointCreator, EndpointQuery, EntityAiStatus, EntityObject, Feature, FeatureModule, FormatOption, FoundationModuleDefinitions, HowTo, HowToFields, HowToModule, HowToService, InviteValidation, JsonApiDataFactory, MOBILE_BREAKPOINT, Module, ModuleDefinitions, ModuleModule, ModulePathsModule, ModuleRegistrar, ModuleRegistry, Modules, Notification, NotificationFields, NotificationModule, OAuthClient, OAuthModule, OAuthService, Passkey, PasskeyAuthenticationOptions, PasskeyAuthenticationOptionsInput, PasskeyAuthenticationOptionsInterface, PasskeyAuthenticationOptionsModule, PasskeyModule, PasskeyRegistrationOptions, PasskeyRegistrationOptionsInput, PasskeyRegistrationOptionsInterface, PasskeyRegistrationOptionsModule, PasskeyRegistrationVerify, PasskeyRegistrationVerifyInput, PasskeyRegistrationVerifyModule, PasskeyRename, PasskeyRenameInput, PasskeyRenameModule, PasskeyVerifyLogin, PasskeyVerifyLoginInput, PasskeyVerifyLoginModule, PaymentMethod, PermissionMappingModule, Push, PushInput, PushInterface, PushModule, RbacMatrixModule, ReferralModule, ReferralService, ReferralStats, ReferralStatsModule, RehydrationFactory, Role, RoleModule, S3, S3Module, SearchResultInterface, StripeCustomer, StripeCustomerModule, StripeCustomerService, StripeInvoice, StripeInvoiceModule, StripeInvoiceService, StripePaymentMethodModule, StripePrice, StripePriceFields, StripePriceModule, StripePriceService, StripeProduct, StripeProductFields, StripeProductModule, StripeProductService, StripePromotionCode, StripePromotionCodeModule, StripePromotionCodeService, StripeSubscription, StripeSubscriptionModule, StripeSubscriptionService, StripeUsage, StripeUsageModule, StripeUsageService, TableOptions, ToastOptions, TotpAuthenticator, TotpAuthenticatorModule, TotpSetup, TotpSetupInput, TotpSetupInterface, TotpSetupModule, TotpVerify, TotpVerifyInput, TotpVerifyLogin, TotpVerifyLoginInput, TotpVerifyLoginModule, TotpVerifyModule, TwoFactorChallenge, TwoFactorChallengeInput, TwoFactorChallengeModule, TwoFactorEnable, TwoFactorEnableInput, TwoFactorEnableModule, TwoFactorService, TwoFactorStatus, TwoFactorStatusInterface, TwoFactorStatusModule, User, UserModule, UserObject, VIEWPORT_COOKIE_NAME, Waitlist, WaitlistInput, WaitlistInterface, WaitlistModule, WaitlistService, WaitlistStats, WaitlistStatsInterface, WaitlistStatsModule, WaitlistStatus, WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, dismissToast, entityObjectSchema, exists, formatCodiceFiscale, formatDate, formatLocalDate, formatPartitaIva, getBootstrapper, getClientGlobalErrorHandler, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, isRemoteImageSrc, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, showCustomToast, showError, showToast, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema, validateCodiceFiscale, validateItalianTaxCode, validatePartitaIva } from './core/index.mjs';
10
9
  export { c as AssistantMessageInput, d as AssistantMessageInterface, A as AssistantMessageRole, b as AssistantMessageType, B as BreadcrumbItemData, e as ChunkInterface, C as ChunkRelationshipMeta, H as HowToInput, a as HowToInterface } from './AssistantMessageInterface-Ce8FcllX.mjs';
11
10
  export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from './content.fields-1AlHDtDb.mjs';
12
11
  export { ClassValue } from 'clsx';
13
- export { A as AuthComponent, P as PasskeyInterface, T as TotpAuthenticatorInterface, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from './AuthComponent-Cik96ElA.mjs';
12
+ export { h as AiConnection, l as AiConnectionEnvDefaults, i as AiConnectionFields, n as AiConnectionInput, m as AiConnectionInterface, p as AiConnectionModule, o as AiConnectionService, j as AiProviderFieldDescriptor, k as AiProviderRegistry, A as AuthComponent, P as PasskeyInterface, T as TotpAuthenticatorInterface, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from './ai-connection.module-28f-hux0.mjs';
14
13
  export { A as Action, d as ModuleDefinition, a as ModuleFactory, c as ModulePermissionDefinition, M as ModuleWithPermissions, P as PageUrl, b as PermissionCheck, e as PermissionConfig, f as PermissionModule, g as PermissionUser } from './types-Bq_UA8Lg.mjs';
15
14
  export { A as AuthInput, b as AuthInterface, a as AuthQuery } from './auth.interface-CkmZqat3.mjs';
16
15
  export { A as AuthService, C as CompanyService, a as ContentService, F as FeatureService, N as NotificationService, P as PushService, R as RoleService, b as S3Input, c as S3Interface, S as S3Service, T as TwoFactorChallengeInterface, U as UserService } from './s3.service-Dt6MfuHr.mjs';
@@ -19,6 +18,7 @@ export { b as CompanyInput, c as CompanyInterface, a as ContentInput, C as Conte
19
18
  export { A as AssistantInput, a as AssistantInterface } from './AssistantInterface-DMh-zApr.mjs';
20
19
  export { F as FeatureInterface, M as ModuleInterface } from './feature.interface-CXb1-vNq.mjs';
21
20
  export { A as AVAILABLE_OAUTH_SCOPES, D as DEFAULT_GRANT_TYPES, g as OAUTH_SCOPE_DISPLAY, b as OAuthClientCreateRequest, c as OAuthClientCreateResponse, a as OAuthClientInput, O as OAuthClientInterface, f as OAuthConsentInfo, d as OAuthConsentRequest, e as OAuthScopeInfo } from './oauth.interface-DRE3NAKc.mjs';
21
+ export { b as TokenUsageAdminBreakdownModule, T as TokenUsageAdminSummaryModule, a as TokenUsageAdminTimelineModule, c as configureTokenUsage, g as getTokenUsageCurrency, t as tokenUsageModules } from './config-n-ZpPmOL.mjs';
22
22
  export { I as I18nConfig, f as configureI18n, c as configureJsonApi, g as getApiUrl, b as getAppUrl, a as getPublicApiUrl, e as getStripePublishableKey, d as getTrackablePages } from './config-YyhFHxkU.mjs';
23
23
  export { Q as QuestionnaireField, a as QuestionnaireFieldType, b as QuestionnaireOption, W as WaitlistConfig, c as configureWaitlist, g as getWaitlistConfig } from './waitlist.config-kPfjImle.mjs';
24
24
  import { R as RbacMatrix } from './RbacTypes-BTbr27Ew.mjs';