@versini/sassysaint 8.25.0 → 8.26.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.
@@ -0,0 +1,87 @@
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.CJ4xsAr8.js";
3
+ import { i as M, useUserChatStats as _, useChatsUsage as D, rr as z } from "./App.DDDRpI9p.js";
4
+ import { useState as O, Suspense as P, lazy as j } from "react";
5
+ const s = [0, 3, 6, 9], G = j(() => import(
6
+ /* webpackChunkName: "LazyChart" */
7
+ "./Chart.DfOWAu7_.js"
8
+ )), w = ({
9
+ open: m,
10
+ onOpenChange: I
11
+ }) => {
12
+ const { getAccessToken: d, user: u } = f(), p = M(), { data: t, 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 = (s.indexOf(a) + 1) % s.length;
21
+ h(s[c]);
22
+ }, k = (o) => {
23
+ o.preventDefault();
24
+ const c = (s.indexOf(a) - 1 + s.length) % s.length;
25
+ h(s[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
+ children: A ? v(
34
+ p,
35
+ {
36
+ [i(n.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
37
+ [i(
38
+ n.MAIN_STATISTICS.TOTAL_PRIVATE,
39
+ t.privateChats
40
+ )]: t.privateChats,
41
+ [i(
42
+ n.MAIN_STATISTICS.TOTAL_DELETED,
43
+ t.deletedChats
44
+ )]: t.deletedChats
45
+ },
46
+ !0
47
+ ) : null
48
+ }
49
+ ),
50
+ /* @__PURE__ */ e(
51
+ T,
52
+ {
53
+ header: n.MAIN_STATISTICS.USAGE,
54
+ className: "prose-dark dark:prose-lighter mt-4 min-h-[535px]",
55
+ children: g && r && r.tokenUsage && r.tokenUsage.series && r.tokenUsage.series.length ? /* @__PURE__ */ l(P, { fallback: /* @__PURE__ */ e("div", {}), children: [
56
+ /* @__PURE__ */ e("div", { className: "pt-4" }),
57
+ /* @__PURE__ */ e(G, { tokenUsage: r.tokenUsage.series, page: a }),
58
+ /* @__PURE__ */ e(E, { className: "mt-2", alignHorizontal: "center", children: /* @__PURE__ */ l(L, { children: [
59
+ /* @__PURE__ */ e(
60
+ S,
61
+ {
62
+ onClick: k,
63
+ className: "mr-2",
64
+ size: "small",
65
+ noBorder: !0,
66
+ children: "Previous"
67
+ }
68
+ ),
69
+ /* @__PURE__ */ e(
70
+ S,
71
+ {
72
+ onClick: x,
73
+ className: "mr-2",
74
+ size: "small",
75
+ noBorder: !0,
76
+ children: "Next"
77
+ }
78
+ )
79
+ ] }) })
80
+ ] }) : null
81
+ }
82
+ )
83
+ ] });
84
+ };
85
+ export {
86
+ w as Usage
87
+ };
@@ -1,4 +1,4 @@
1
- import { factorySpace as M, markdownLineEnding as g } from "./useMarkdown.Ba2Fkemy.js";
1
+ import { factorySpace as M, markdownLineEnding as g } from "./useMarkdown.8NiQFgfl.js";
2
2
  import { longestStreak as q } from "./index.Cyw5OC0t.js";
3
3
  function b() {
4
4
  return {
@@ -1,6 +1,6 @@
1
- import { getDefaultExportFromCjs as kn } from "./App._AgszNs-.js";
2
- import { visit as In } from "./useMarkdown.Ba2Fkemy.js";
3
- import { toText as Cn } from "./index.DCay6ird.js";
1
+ import { getDefaultExportFromCjs as kn } from "./App.DDDRpI9p.js";
2
+ import { visit as In } from "./useMarkdown.8NiQFgfl.js";
3
+ import { toText as Cn } from "./index.Cmth0wkr.js";
4
4
  function xn(e) {
5
5
  const t = e.regex, i = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), a = "decltype\\(auto\\)", r = "[a-zA-Z_]\\w*::", d = "(?!struct)(" + a + "|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", c = {
6
6
  className: "type",