@versini/sassysaint 8.36.0 → 8.37.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.
@@ -1,89 +0,0 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { n as f, USAGE_TITLE as U, S as T, renderDataAsList as v, CARDS as n, L as E, j as L, C as S, pluralize as i } from "./index.z_UzkUf2.js";
3
- import { i as M, useUserChatStats as _, useChatsUsage as D, tt as z } from "./App.BokGeOus.js";
4
- import { useState as O, Suspense as P, lazy as B } from "react";
5
- const t = [0, 3, 6, 9], j = B(() => import(
6
- /* webpackChunkName: "LazyChart" */
7
- "./Chart.DSUaeSXR.js"
8
- )), w = ({
9
- open: m,
10
- onOpenChange: I
11
- }) => {
12
- const { getAccessToken: d, user: u } = f(), p = M(), { data: s, isSuccess: A } = _({
13
- user: u?.username,
14
- getAccessToken: d
15
- }), { data: r, isSuccess: g } = D({
16
- user: u?.username,
17
- getAccessToken: d
18
- }), C = Math.floor((/* @__PURE__ */ new Date()).getMonth() / 3) * 3, [a, h] = O(C), x = (o) => {
19
- o.preventDefault();
20
- const c = (t.indexOf(a) + 1) % t.length;
21
- h(t[c]);
22
- }, k = (o) => {
23
- o.preventDefault();
24
- const c = (t.indexOf(a) - 1 + t.length) % t.length;
25
- h(t[c]);
26
- };
27
- return /* @__PURE__ */ l(z, { open: m, onOpenChange: I, title: U, children: [
28
- /* @__PURE__ */ e(
29
- T,
30
- {
31
- header: n.MAIN_STATISTICS.TITLE,
32
- className: "prose-dark dark:prose-lighter min-h-[170px]",
33
- noBorder: !0,
34
- children: A ? v(
35
- p,
36
- {
37
- [i(n.MAIN_STATISTICS.TOTAL, s.totalChats)]: s.totalChats,
38
- [i(
39
- n.MAIN_STATISTICS.TOTAL_PRIVATE,
40
- s.privateChats
41
- )]: s.privateChats,
42
- [i(
43
- n.MAIN_STATISTICS.TOTAL_DELETED,
44
- s.deletedChats
45
- )]: s.deletedChats
46
- },
47
- !0
48
- ) : null
49
- }
50
- ),
51
- /* @__PURE__ */ e(
52
- T,
53
- {
54
- header: n.MAIN_STATISTICS.USAGE,
55
- className: "prose-dark dark:prose-lighter mt-4 min-h-[535px]",
56
- noBorder: !0,
57
- children: g && r && r.tokenUsage && r.tokenUsage.series && r.tokenUsage.series.length ? /* @__PURE__ */ l(P, { fallback: /* @__PURE__ */ e("div", {}), children: [
58
- /* @__PURE__ */ e("div", { className: "pt-4" }),
59
- /* @__PURE__ */ e(j, { tokenUsage: r.tokenUsage.series, page: a }),
60
- /* @__PURE__ */ e(E, { className: "mt-2", alignHorizontal: "center", children: /* @__PURE__ */ l(L, { children: [
61
- /* @__PURE__ */ e(
62
- S,
63
- {
64
- onClick: k,
65
- className: "mr-2",
66
- size: "small",
67
- noBorder: !0,
68
- children: "Previous"
69
- }
70
- ),
71
- /* @__PURE__ */ e(
72
- S,
73
- {
74
- onClick: x,
75
- className: "mr-2",
76
- size: "small",
77
- noBorder: !0,
78
- children: "Next"
79
- }
80
- )
81
- ] }) })
82
- ] }) : null
83
- }
84
- )
85
- ] });
86
- };
87
- export {
88
- w as Usage
89
- };