@betterinternship/components 1.5.0 → 1.5.2

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 (36) hide show
  1. package/dist/_virtual/jsx-runtime.js +6 -0
  2. package/dist/_virtual/jsx-runtime.js.map +1 -0
  3. package/dist/_virtual/jsx-runtime2.js +4 -0
  4. package/dist/_virtual/jsx-runtime2.js.map +1 -0
  5. package/dist/_virtual/react-jsx-runtime.development.js +4 -0
  6. package/dist/_virtual/react-jsx-runtime.development.js.map +1 -0
  7. package/dist/_virtual/react-jsx-runtime.production.js +4 -0
  8. package/dist/_virtual/react-jsx-runtime.production.js.map +1 -0
  9. package/dist/components/Button.js +77 -0
  10. package/dist/components/Button.js.map +1 -0
  11. package/dist/config.js +9 -0
  12. package/dist/config.js.map +1 -0
  13. package/dist/hooks/useClientProcess.js +154 -0
  14. package/dist/hooks/useClientProcess.js.map +1 -0
  15. package/dist/index.css.js +7 -0
  16. package/dist/index.css.js.map +1 -0
  17. package/dist/index.esm.js.map +1 -1
  18. package/dist/index.js +5 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/node_modules/class-variance-authority/dist/index.js +45 -0
  21. package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -0
  22. package/dist/node_modules/clsx/dist/clsx.js +4 -0
  23. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  24. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +364 -0
  25. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
  26. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +45 -0
  27. package/dist/node_modules/react/cjs/react-jsx-runtime.production.js.map +1 -0
  28. package/dist/node_modules/react/jsx-runtime.js +20 -0
  29. package/dist/node_modules/react/jsx-runtime.js.map +1 -0
  30. package/dist/node_modules/style-inject/dist/style-inject.es.js +29 -0
  31. package/dist/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
  32. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +3036 -0
  33. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  34. package/dist/utils.js +9 -0
  35. package/dist/utils.js.map +1 -0
  36. package/package.json +2 -1
@@ -0,0 +1,6 @@
1
+ import { __require as requireJsxRuntime } from '../node_modules/react/jsx-runtime.js';
2
+
3
+ var jsxRuntimeExports = requireJsxRuntime();
4
+
5
+ export { jsxRuntimeExports as j };
6
+ //# sourceMappingURL=jsx-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-runtime.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,4 @@
1
+ var jsxRuntime = {exports: {}};
2
+
3
+ export { jsxRuntime as __module };
4
+ //# sourceMappingURL=jsx-runtime2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-runtime2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,4 @@
1
+ var reactJsxRuntime_development = {};
2
+
3
+ export { reactJsxRuntime_development as __exports };
4
+ //# sourceMappingURL=react-jsx-runtime.development.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-jsx-runtime.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,4 @@
1
+ var reactJsxRuntime_production = {};
2
+
3
+ export { reactJsxRuntime_production as __exports };
4
+ //# sourceMappingURL=react-jsx-runtime.production.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-jsx-runtime.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,77 @@
1
+ import { j as jsxRuntimeExports } from '../_virtual/jsx-runtime.js';
2
+ import require$$0 from 'react';
3
+ import { Slot } from '@radix-ui/react-slot';
4
+ import { cva } from '../node_modules/class-variance-authority/dist/index.js';
5
+ import { cn } from '../utils.js';
6
+
7
+ const buttonVariants = cva([
8
+ "inline-flex",
9
+ "items-center",
10
+ "justify-center",
11
+ "gap-2",
12
+ "whitespace-nowrap",
13
+ "rounded-[0.33em]",
14
+ "text-sm",
15
+ "font-medium",
16
+ "transition-colors",
17
+ "focus:outline-none",
18
+ "focus:ring-transparent",
19
+ "disabled:pointer-events-none",
20
+ "disabled:opacity-50",
21
+ "[&_svg]:pointer-events-none",
22
+ "[&_svg]:size-4",
23
+ "[&_svg]:shrink-0",
24
+ ], {
25
+ variants: {
26
+ variant: {
27
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
28
+ outline: "border border-gray-300 text-gray-700 bg-background hover:bg-accent",
29
+ ghost: "hover:bg-accent text-gray-700 hover:text-accent-foreground",
30
+ link: "text-primary underline-offset-4 hover:underline",
31
+ },
32
+ scheme: {
33
+ default: "",
34
+ primary: "bg-primary text-primary-foreground hover:bg-primary/90",
35
+ supportive: "bg-supportive text-supportive-foreground hover:bg-supportive/90",
36
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
37
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
38
+ },
39
+ size: {
40
+ default: "h-8 px-[1em] py-[0.33em]",
41
+ sm: "h-8 px-3",
42
+ lg: "h-11 px-8",
43
+ md: "h-10 px-6",
44
+ icon: "h-10 w-10",
45
+ xs: "h-6 px-3 text-xs",
46
+ },
47
+ },
48
+ compoundVariants: [
49
+ {
50
+ variant: "outline",
51
+ scheme: "primary",
52
+ class: "bg-background border border-primary text-primary hover:bg-blue-50",
53
+ },
54
+ {
55
+ variant: "outline",
56
+ scheme: "supportive",
57
+ class: "bg-background border border-supportive text-supportive hover:bg-green-50",
58
+ },
59
+ {
60
+ variant: "outline",
61
+ scheme: "destructive",
62
+ class: "bg-background border border-destructive text-destructive hover:bg-red-50",
63
+ },
64
+ ],
65
+ defaultVariants: {
66
+ variant: "default",
67
+ size: "default",
68
+ },
69
+ });
70
+ const Button = require$$0.forwardRef(({ className, variant, scheme, size, asChild = false, ...props }, ref) => {
71
+ const Comp = asChild ? Slot : "button";
72
+ return (jsxRuntimeExports.jsx(Comp, { className: cn(buttonVariants({ variant, scheme, size, className })), ref: ref, ...props }));
73
+ });
74
+ Button.displayName = "Button";
75
+
76
+ export { Button, buttonVariants };
77
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sources":["../../src/components/Button.tsx"],"sourcesContent":["import React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../utils\";\n\nconst buttonVariants = cva(\n [\n \"inline-flex\",\n \"items-center\",\n \"justify-center\",\n \"gap-2\",\n \"whitespace-nowrap\",\n \"rounded-[0.33em]\",\n \"text-sm\",\n \"font-medium\",\n \"transition-colors\",\n \"focus:outline-none\",\n \"focus:ring-transparent\",\n \"disabled:pointer-events-none\",\n \"disabled:opacity-50\",\n \"[&_svg]:pointer-events-none\",\n \"[&_svg]:size-4\",\n \"[&_svg]:shrink-0\",\n ],\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n outline: \"border border-gray-300 text-gray-700 bg-background hover:bg-accent\",\n ghost: \"hover:bg-accent text-gray-700 hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n scheme: {\n default: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n supportive: \"bg-supportive text-supportive-foreground hover:bg-supportive/90\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n },\n size: {\n default: \"h-8 px-[1em] py-[0.33em]\",\n sm: \"h-8 px-3\",\n lg: \"h-11 px-8\",\n md: \"h-10 px-6\",\n icon: \"h-10 w-10\",\n xs: \"h-6 px-3 text-xs\",\n },\n },\n compoundVariants: [\n {\n variant: \"outline\",\n scheme: \"primary\",\n class: \"bg-background border border-primary text-primary hover:bg-blue-50\",\n },\n {\n variant: \"outline\",\n scheme: \"supportive\",\n class: \"bg-background border border-supportive text-supportive hover:bg-green-50\",\n },\n {\n variant: \"outline\",\n scheme: \"destructive\",\n class: \"bg-background border border-destructive text-destructive hover:bg-red-50\",\n },\n ],\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, scheme, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, scheme, size, className }))}\n ref={ref}\n {...props}\n />\n );\n }\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n"],"names":["React","_jsx"],"mappings":";;;;;;AAKA,MAAM,cAAc,GAAG,GAAG,CACxB;IACE,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,OAAO;IACP,mBAAmB;IACnB,kBAAkB;IAClB,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,oBAAoB;IACpB,wBAAwB;IACxB,8BAA8B;IAC9B,qBAAqB;IACrB,6BAA6B;IAC7B,gBAAgB;IAChB,kBAAkB;CACnB,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,wDAAwD;AACjE,YAAA,OAAO,EAAE,oEAAoE;AAC7E,YAAA,KAAK,EAAE,4DAA4D;AACnE,YAAA,IAAI,EAAE,iDAAiD;AACxD,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAAA,OAAO,EAAE,EAAE;AACX,YAAA,OAAO,EAAE,wDAAwD;AACjE,YAAA,UAAU,EAAE,iEAAiE;AAC7E,YAAA,WAAW,EAAE,oEAAoE;AACjF,YAAA,SAAS,EAAE,8DAA8D;AAC1E,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,OAAO,EAAE,0BAA0B;AACnC,YAAA,EAAE,EAAE,UAAU;AACd,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,IAAI,EAAE,WAAW;AACjB,YAAA,EAAE,EAAE,kBAAkB;AACvB,SAAA;AACF,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA;AACE,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,KAAK,EAAE,mEAAmE;AAC3E,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,MAAM,EAAE,YAAY;AACpB,YAAA,KAAK,EAAE,0EAA0E;AAClF,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,MAAM,EAAE,aAAa;AACrB,YAAA,KAAK,EAAE,0EAA0E;AAClF,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,SAAS;AAChB,KAAA;AACF,CAAA;AASH,MAAM,MAAM,GAAGA,UAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IACvE,MAAM,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ;AACtC,IAAA,QACEC,qBAAA,CAAC,IAAI,EAAA,EACH,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EACnE,GAAG,EAAE,GAAG,EAAA,GACJ,KAAK,EAAA,CACT;AAEN,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
package/dist/config.js ADDED
@@ -0,0 +1,9 @@
1
+ let config = {
2
+ orchestratorApi: '',
3
+ };
4
+ const configure = (newConfig) => {
5
+ config = { ...config, ...newConfig };
6
+ };
7
+
8
+ export { config, configure };
9
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sources":["../src/config.tsx"],"sourcesContent":["interface PackageConfig {\n\torchestratorApi: string;\n}\n\nexport let config: PackageConfig = {\n\torchestratorApi: '',\n}; \n\nexport const configure = (newConfig: PackageConfig) => {\n\tconfig = { ...config, ...newConfig }\n}"],"names":[],"mappings":"AAIO,IAAI,MAAM,GAAkB;AAClC,IAAA,eAAe,EAAE,EAAE;;AAGb,MAAM,SAAS,GAAG,CAAC,SAAwB,KAAI;IACrD,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,EAAE;AACrC;;;;"}
@@ -0,0 +1,154 @@
1
+ "use client";
2
+ import { j as jsxRuntimeExports } from '../_virtual/jsx-runtime.js';
3
+ import { createContext, useState, useRef, useContext } from 'react';
4
+ import { useQueries } from '@tanstack/react-query';
5
+ import { config } from '../config.js';
6
+ import { toast } from 'sonner';
7
+
8
+ /**
9
+ * The orchestrator service to get the process from.
10
+ *
11
+ * @param processId
12
+ * @returns
13
+ */
14
+ const processStatusChecker = (processId) => fetch(`${config.orchestratorApi}/${encodeURIComponent(processId)}`, {
15
+ method: "GET",
16
+ headers: {
17
+ "Content-Type": "application/json",
18
+ },
19
+ }).then((response) => response.json());
20
+ /**
21
+ * This fetches from the callback endpoint.
22
+ *
23
+ * @param processId
24
+ * @returns
25
+ */
26
+ const processCallbackResultFetcher = (processId, processName, processCallbackUrl) => fetch(`${processCallbackUrl}`, {
27
+ method: "POST",
28
+ headers: {
29
+ "Content-Type": "application/json",
30
+ },
31
+ body: JSON.stringify({
32
+ processId,
33
+ processName,
34
+ })
35
+ }).then((response) => response.json());
36
+ /**
37
+ * We need a context to keep track of all client processes.
38
+ * This helps us manage the state of the toasts as well.
39
+ */
40
+ const clientProcessesContext = createContext({});
41
+ /**
42
+ * This should be at the root layout.
43
+ *
44
+ * @context
45
+ */
46
+ const ClientProcessesProvider = ({ children }) => {
47
+ const [clientProcessDtos, setClientProcessDtos] = useState({});
48
+ const clientProcessAttempts = useRef({});
49
+ const clientProcesses = useQueries({ queries: Object.entries(clientProcessDtos).map(([processId, { dto, options }]) => ({
50
+ queryKey: ['__process', processId],
51
+ queryFn: async () => {
52
+ if (!processId)
53
+ throw new Error("No processId");
54
+ const { process } = await processStatusChecker(processId);
55
+ // Handled! Return the proper response too
56
+ if (process.status === "handled") {
57
+ const result = await processCallbackResultFetcher(process.id, process.name, dto.processCallbackUrl);
58
+ console.warn(process.name, options?.successMessage ?? "Success!");
59
+ toast.success(options?.successMessage ?? "Success!", {
60
+ id: process.id
61
+ });
62
+ setTimeout(() => toast.dismiss(process.id), 1500);
63
+ return { id: process.id, name: process.name, success: true, result };
64
+ }
65
+ // Pending or failed
66
+ if (process.status === "pending") {
67
+ console.log(process.name, options?.loadingMessage ?? "Loading...");
68
+ toast.loading(options?.loadingMessage ?? "Loading...", {
69
+ id: process.id,
70
+ duration: Infinity,
71
+ });
72
+ return null;
73
+ }
74
+ else if (process.status === "failed") {
75
+ console.error(process.name, options?.failureMessage ?? "Something went wrong.");
76
+ toast.error(options?.failureMessage ?? "Something went wrong.", {
77
+ id: process.id
78
+ });
79
+ setTimeout(() => toast.dismiss(process.id), 1500);
80
+ return { id: process.id, name: process.name, success: false };
81
+ }
82
+ // Return null since no response
83
+ return null;
84
+ },
85
+ // Returns the next interval length to use to wait for fetch
86
+ refetchInterval: (query) => {
87
+ const data = query.state.data;
88
+ if (data !== null)
89
+ return false;
90
+ // If not defined, init to 0
91
+ if (!clientProcessAttempts.current[processId])
92
+ clientProcessAttempts.current[processId] = 0;
93
+ const interval = Math.min(500 * 2 ** clientProcessAttempts.current[processId], 10000);
94
+ clientProcessAttempts.current[processId] += 1;
95
+ return interval;
96
+ },
97
+ }))
98
+ });
99
+ /**
100
+ * Registers a new process to handle
101
+ *
102
+ * @param processId
103
+ * @param processCallbackDto
104
+ * @param options
105
+ */
106
+ const registerProcess = (processId, processCallbackDto, options) => {
107
+ setClientProcessDtos({ ...clientProcessDtos, [processId]: { dto: processCallbackDto, options } });
108
+ };
109
+ /**
110
+ * Retrieves a process
111
+ *
112
+ * @param processId
113
+ * @returns
114
+ */
115
+ const getProcess = (processId) => {
116
+ return clientProcesses.find(clientProcess => clientProcess.data?.id === processId)?.data ?? null;
117
+ };
118
+ return (jsxRuntimeExports.jsx(clientProcessesContext.Provider, { value: {
119
+ registerProcess,
120
+ getProcess
121
+ }, children: children }));
122
+ };
123
+ /**
124
+ * A simpler version, where u just pass the async function that returns process data.
125
+ *
126
+ * @param caller
127
+ * @returns
128
+ */
129
+ function useClientProcess({ caller, loadingMessage, successMessage, failureMessage, }) {
130
+ const clientProcessesApi = useContext(clientProcessesContext);
131
+ // Note that the exposed function doesn't return process ids
132
+ // Client should be oblivious to those
133
+ // Abstraction BABY!
134
+ const wrappedCaller = async (inputs) => {
135
+ const response = await caller(inputs);
136
+ clientProcessesApi.registerProcess(response.processId, response, {
137
+ loadingMessage,
138
+ successMessage,
139
+ failureMessage
140
+ });
141
+ return {
142
+ id: response.processId,
143
+ success: response.success,
144
+ message: response.message,
145
+ };
146
+ };
147
+ return {
148
+ run: wrappedCaller,
149
+ get: (id) => clientProcessesApi.getProcess(id)
150
+ };
151
+ }
152
+
153
+ export { ClientProcessesProvider, useClientProcess };
154
+ //# sourceMappingURL=useClientProcess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClientProcess.js","sources":["../../src/hooks/useClientProcess.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport { useState, useRef, createContext, useContext } from \"react\";\r\nimport { Query, useQueries } from \"@tanstack/react-query\";\r\nimport { config } from \"../config\";\r\nimport { toast } from \"sonner\"\r\n\r\ntype ProcessStatus = \"pending\" | \"handled\" | \"failed\";\r\n\r\ninterface Process<T> {\r\n\tid: string;\r\n\tname: string;\r\n status: ProcessStatus;\r\n result?: T;\r\n error?: string;\r\n\ttimestamp: string;\r\n}\r\n\r\nexport interface ProcessCallbackDto {\r\n processId: string;\r\n processName: string;\r\n processCallbackUrl: string;\r\n}\r\n\r\nexport interface ClientProcessOptions {\r\n loadingMessage?: string;\r\n successMessage?: string;\r\n failureMessage?: string;\r\n}\r\n\r\nexport interface ProcessResponse {\r\n processId: string;\r\n processName: string;\r\n processCallbackUrl: string;\r\n success: boolean;\r\n message?: string;\r\n}\r\n\r\n/**\r\n * The processId identifies the process instance.\r\n * The processName identifies the type of process.\r\n * The processCallbackUrl tells the hook what route to ask the result for.\r\n * \r\n * * Note to self and devs: we use a callback system to keep the return values of the processes safe. \r\n * * The job of the callback route is to filter the output of the process.\r\n */\r\ninterface UseAsyncProcessOptions {\r\n processId?: string; \r\n processName?: string;\r\n processCallbackUrl?: string;\r\n baseInterval?: number;\r\n maxInterval?: number;\r\n}\r\n\r\n/**\r\n * The orchestrator service to get the process from.\r\n * \r\n * @param processId\r\n * @returns\r\n */\r\nconst processStatusChecker = <T,>(processId: string) => fetch(`${config.orchestratorApi}/${encodeURIComponent(processId)}`, {\r\n\tmethod: \"GET\",\r\n\theaders: {\r\n\t\t\"Content-Type\": \"application/json\",\r\n\t},\r\n}).then((response) => response.json()) as unknown as Promise<{ process: Omit<Process<T>, 'result'> }>;\r\n\r\n/**\r\n * This fetches from the callback endpoint.\r\n * \r\n * @param processId\r\n * @returns\r\n */\r\nconst processCallbackResultFetcher = <T,>(processId: string, processName: string, processCallbackUrl?: string) => fetch(`${processCallbackUrl}`, {\r\n\tmethod: \"POST\",\r\n\theaders: {\r\n\t\t\"Content-Type\": \"application/json\",\r\n\t},\r\n body: JSON.stringify({\r\n processId,\r\n processName,\r\n })\r\n}).then((response) => response.json()) as unknown as Promise<T>;\r\n\r\ninterface ClientProcesses {\r\n registerProcess: (processId: string, dto: ProcessCallbackDto, options?: ClientProcessOptions) => void;\r\n getProcess: (processId: string) => { id: string, name: string, result?: unknown, success: boolean } | null;\r\n}\r\n\r\n/**\r\n * We need a context to keep track of all client processes.\r\n * This helps us manage the state of the toasts as well.\r\n */\r\nconst clientProcessesContext = createContext<ClientProcesses>({} as ClientProcesses);\r\n\r\n/**\r\n * This should be at the root layout.\r\n * \r\n * @context \r\n */\r\nexport const ClientProcessesProvider = ({ children }: { children: React.ReactNode }) => {\r\n const [clientProcessDtos, setClientProcessDtos] = \r\n useState<Record<string, { dto: ProcessCallbackDto, options?: ClientProcessOptions }>>({});\r\n const clientProcessAttempts = useRef<Record<string, number>>({});\r\n const clientProcesses = useQueries({ queries: Object.entries(clientProcessDtos).map(\r\n ([processId, { dto, options }]) => (\r\n {\r\n queryKey: [ '__process', processId ],\r\n queryFn: async () => {\r\n if (!processId) throw new Error(\"No processId\");\r\n const { process } = await processStatusChecker(processId);\r\n\r\n // Handled! Return the proper response too\r\n if (process.status === \"handled\") {\r\n const result = await processCallbackResultFetcher(process.id, process.name, dto.processCallbackUrl)\r\n console.warn(process.name, options?.successMessage ?? \"Success!\");\r\n toast.success(options?.successMessage ?? \"Success!\", { \r\n id: process.id\r\n })\r\n setTimeout(() => toast.dismiss(process.id), 1500)\r\n return { id: process.id, name: process.name, success: true, result };\r\n }\r\n\r\n // Pending or failed\r\n if (process.status === \"pending\") {\r\n console.log(process.name, options?.loadingMessage ?? \"Loading...\");\r\n toast.loading(options?.loadingMessage ?? \"Loading...\", {\r\n id: process.id,\r\n duration: Infinity,\r\n })\r\n return null;\r\n } else if (process.status === \"failed\") {\r\n console.error(process.name, options?.failureMessage ?? \"Something went wrong.\");\r\n toast.error(options?.failureMessage ?? \"Something went wrong.\", { \r\n id: process.id \r\n })\r\n setTimeout(() => toast.dismiss(process.id), 1500)\r\n return { id: process.id, name: process.name, success: false }\r\n }\r\n\r\n // Return null since no response\r\n return null;\r\n },\r\n\r\n // Returns the next interval length to use to wait for fetch\r\n refetchInterval: (query: Query) => {\r\n const data = query.state.data;\r\n if (data !== null)\r\n return false\r\n\r\n // If not defined, init to 0\r\n if (!clientProcessAttempts.current[processId])\r\n clientProcessAttempts.current[processId] = 0;\r\n\r\n const interval = Math.min(\r\n 500 * 2 ** clientProcessAttempts.current[processId],\r\n 10000\r\n );\r\n\r\n clientProcessAttempts.current[processId] += 1;\r\n return interval;\r\n },\r\n }\r\n )) \r\n })\r\n\r\n /**\r\n * Registers a new process to handle\r\n * \r\n * @param processId \r\n * @param processCallbackDto \r\n * @param options \r\n */\r\n const registerProcess = (\r\n processId: string, \r\n processCallbackDto: ProcessCallbackDto, \r\n options?: ClientProcessOptions\r\n ) => {\r\n setClientProcessDtos({ ...clientProcessDtos, [processId]: { dto: processCallbackDto, options } })\r\n }\r\n\r\n /**\r\n * Retrieves a process\r\n * \r\n * @param processId \r\n * @returns \r\n */\r\n const getProcess = (processId: string) => {\r\n return clientProcesses.find(clientProcess => clientProcess.data?.id === processId)?.data ?? null\r\n }\r\n\r\n return (\r\n <clientProcessesContext.Provider value={{\r\n registerProcess,\r\n getProcess\r\n }}>\r\n {children}\r\n </clientProcessesContext.Provider>\r\n )\r\n}\r\n\r\n/**\r\n * A simpler version, where u just pass the async function that returns process data.\r\n * \r\n * @param caller \r\n * @returns \r\n */\r\nexport function useClientProcess<T, R>({ \r\n caller,\r\n loadingMessage,\r\n successMessage,\r\n failureMessage,\r\n}: {\r\n caller: (inputs: T) => Promise<ProcessResponse>;\r\n loadingMessage?: string \r\n successMessage?: string\r\n failureMessage?: string\r\n}) {\r\n const clientProcessesApi = useContext(clientProcessesContext);\r\n\r\n // Note that the exposed function doesn't return process ids\r\n // Client should be oblivious to those\r\n // Abstraction BABY!\r\n const wrappedCaller = async (inputs: T) => {\r\n const response = await caller(inputs);\r\n clientProcessesApi.registerProcess(response.processId, response, { \r\n loadingMessage, \r\n successMessage, \r\n failureMessage \r\n })\r\n\r\n return {\r\n id: response.processId,\r\n success: response.success,\r\n message: response.message,\r\n }\r\n }\r\n \r\n return {\r\n run: wrappedCaller,\r\n get: (id: string) => clientProcessesApi.getProcess(id)\r\n }\r\n}"],"names":[],"mappings":";;;;;;;AAsDA;;;;;AAKG;AACH;AACC;AACA;AACC;AACA;AACD;AAED;;;;;AAKG;AACH;AACC;AACA;AACC;AACA;AACA;;;;AAID;AAOD;;;AAGG;AACH;AAEA;;;;AAIG;;;AAID;AACA;AAGM;;AAEE;AAAgB;;;AAIhB;AACE;AACA;;;AAGC;AACD;AACA;;;AAIF;AACE;;;AAGE;AACD;AACD;;AACK;AACL;;;AAGC;AACD;AACA;;;AAIF;;;AAIF;AACE;;AAEE;;AAGF;AACE;AAEF;AAKA;AACA;;AAEH;AAEJ;AAED;;;;;;AAMG;;AAMD;AACF;AAEA;;;;;AAKG;AACH;;AAEA;AAEA;;;;AAQF;AAEA;;;;;AAKG;AACG;AAWJ;;;;AAKA;AACE;;;;;AAKC;;;;;;AAOH;;AAGE;;;AAGJ;;"}
@@ -0,0 +1,7 @@
1
+ import styleInject from './node_modules/style-inject/dist/style-inject.es.js';
2
+
3
+ var css_248z = "/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:var(--font-geist-sans);--font-mono:var(--font-geist-mono);--color-red-50:oklch(97.1% 0.013 17.38);--color-green-50:oklch(98.2% 0.018 155.826);--color-blue-50:oklch(97% 0.014 254.604);--color-slate-800:oklch(27.9% 0.041 260.031);--color-gray-50:oklch(98.5% 0.002 247.839);--color-gray-300:oklch(87.2% 0.01 258.338);--color-gray-700:oklch(37.3% 0.034 259.733);--color-white:#fff;--spacing:0.25rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:0.875rem;--text-sm--line-height:1.42857;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--font-weight-medium:500;--radius-sm:calc(var(--radius) - 4px);--radius-lg:var(--radius);--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-ring:var(--ring);--color-border:var(--border);--color-destructive:var(--destructive);--color-destructive-foreground:var(--destructive-foreground);--color-supportive:var(--supportive);--color-supportive-foreground:var(--supportive-foreground);--color-accent-foreground:var(--accent-foreground);--color-accent:var(--accent);--color-secondary-foreground:var(--secondary-foreground);--color-secondary:var(--secondary);--color-primary-foreground:var(--primary-foreground);--color-primary:var(--primary)}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:var(--default-font-feature-settings,normal);-webkit-tap-highlight-color:transparent;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;tab-size:4}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:var(--default-mono-font-feature-settings,normal);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{font-feature-settings:inherit;background-color:transparent;border-radius:0;color:inherit;font:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{border-width:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.not-sr-only{clip-path:none;height:auto;margin:0;overflow:visible;padding:0;position:static;white-space:normal;width:auto}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-1{inset:calc(var(--spacing)*-1)}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.mb-4{margin-bottom:calc(var(--spacing)*4)}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.w-10{width:calc(var(--spacing)*10)}.shrink{flex-shrink:1}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.translate-none{translate:none}.scale-3d{scale:var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing)*2)}.space-y-reverse{:where(&>:not(:last-child)){--tw-space-y-reverse:1}}.space-x-reverse{:where(&>:not(:last-child)){--tw-space-x-reverse:1}}.divide-x{:where(&>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-end-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-style:var(--tw-border-style)}}.divide-y{:where(&>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-bottom-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse))}}.divide-y-reverse{:where(&>:not(:last-child)){--tw-divide-y-reverse:1}}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-\\[0\\.33em\\]{border-radius:.33em}.rounded-s{border-end-start-radius:.25rem}.rounded-s,.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-end-end-radius:.25rem}.rounded-e,.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-right-radius:.25rem}.rounded-l,.rounded-t{border-top-left-radius:.25rem}.rounded-l{border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-bottom-right-radius:.25rem}.rounded-r,.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-left-radius:.25rem}.rounded-b,.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-destructive{border-color:var(--color-destructive)}.border-gray-300{border-color:var(--color-gray-300)}.border-primary{border-color:var(--color-primary)}.border-supportive{border-color:var(--color-supportive)}.bg-background{background-color:var(--color-background)}.bg-destructive{background-color:var(--color-destructive)}.bg-primary{background-color:var(--color-primary)}.bg-secondary{background-color:var(--color-secondary)}.bg-supportive{background-color:var(--color-supportive)}.bg-repeat{background-repeat:repeat}.mask-no-clip{mask-clip:no-clip}.mask-repeat{mask-repeat:repeat}.p-10{padding:calc(var(--spacing)*10)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.px-\\[1em\\]{padding-inline:1em}.py-\\[0\\.33em\\]{padding-block:.33em}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-wrap{text-wrap:wrap}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-destructive{color:var(--color-destructive)}.text-destructive-foreground{color:var(--color-destructive-foreground)}.text-gray-700{color:var(--color-gray-700)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.text-supportive{color:var(--color-supportive)}.text-supportive-foreground{color:var(--color-supportive-foreground)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions}.diagonal-fractions,.lining-nums{font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums}.oldstyle-nums,.ordinal{font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal}.proportional-nums{--tw-numeric-spacing:proportional-nums}.proportional-nums,.slashed-zero{font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero}.stacked-fractions{--tw-numeric-fraction:stacked-fractions}.stacked-fractions,.tabular-nums{font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,rgba(0,0,0,.1)),0 1px 2px -1px var(--tw-shadow-color,rgba(0,0,0,.1))}.ring,.shadow{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px)}.blur,.drop-shadow{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,rgba(0,0,0,.1))) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,rgba(0,0,0,.06)));--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}.grayscale{--tw-grayscale:grayscale(100%)}.grayscale,.invert{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%)}.sepia{--tw-sepia:sepia(100%)}.filter,.sepia{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px)}.backdrop-blur,.backdrop-grayscale{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%)}.backdrop-invert{--tw-backdrop-invert:invert(100%)}.backdrop-invert,.backdrop-sepia{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-colors{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.divide-x-reverse{:where(&>:not(:last-child)){--tw-divide-x-reverse:1}}.ring-inset{--tw-ring-inset:inset}.zoom-in{--tw-enter-scale:0}.zoom-out{--tw-exit-scale:0}.hover\\:bg-accent{&:hover{@media (hover:hover){background-color:var(--color-accent)}}}.hover\\:bg-blue-50{&:hover{@media (hover:hover){background-color:var(--color-blue-50)}}}.hover\\:bg-destructive\\/90{&:hover{@media (hover:hover){background-color:var(--color-destructive);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}}}.hover\\:bg-green-50{&:hover{@media (hover:hover){background-color:var(--color-green-50)}}}.hover\\:bg-primary\\/90{&:hover{@media (hover:hover){background-color:var(--color-primary);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}}}.hover\\:bg-red-50{&:hover{@media (hover:hover){background-color:var(--color-red-50)}}}.hover\\:bg-secondary\\/80{&:hover{@media (hover:hover){background-color:var(--color-secondary);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-secondary) 80%,transparent)}}}}.hover\\:bg-supportive\\/90{&:hover{@media (hover:hover){background-color:var(--color-supportive);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-supportive) 90%,transparent)}}}}.hover\\:text-accent-foreground{&:hover{@media (hover:hover){color:var(--color-accent-foreground)}}}.hover\\:underline{&:hover{@media (hover:hover){text-decoration-line:underline}}}.focus\\:ring-transparent{&:focus{--tw-ring-color:transparent}}.focus\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.disabled\\:pointer-events-none{&:disabled{pointer-events:none}}.disabled\\:opacity-50{&:disabled{opacity:50%}}.\\[\\&_svg\\]\\:pointer-events-none{& svg{pointer-events:none}}.\\[\\&_svg\\]\\:size-4{& svg{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}}.\\[\\&_svg\\]\\:shrink-0{& svg{flex-shrink:0}}}@property --tw-animation-delay{syntax:\"*\";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:\"*\";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:\"*\";inherits:false}@property --tw-animation-fill-mode{syntax:\"*\";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:\"*\";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:\"*\";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:\"*\";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:\"*\";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:\"*\";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:\"*\";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:\"*\";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:\"*\";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:\"*\";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:\"*\";inherits:false;initial-value:0}:root{--radius:0.625rem;--background:oklch(1 0 0);--foreground:oklch(0.145 0 0);--card:oklch(1 0 0);--card-foreground:oklch(0.145 0 0);--popover:oklch(1 0 0);--popover-foreground:oklch(0.145 0 0);--primary:oklch(0.441 0.122 251);--primary-foreground:oklch(0.984 0.003 210);--supportive:oklch(0.663 0.137 137);--supportive-foreground:oklch(0.984 0.003 210);--secondary:oklch(0.208 0.04 266);--secondary-foreground:oklch(0.968 0.007 210);--muted:oklch(0.968 0.007 210);--muted-foreground:oklch(0.554 0.041 257);--warning:oklch(0.731 0.144 64);--warning-foreground:oklch(0.968 0.007 210);--accent:oklch(0.97 0 0);--accent-foreground:oklch(0.205 0 0);--destructive:oklch(0.64 0.218 29);--destructive-foreground:oklch(0.984 0.003 210);--border:oklch(0.922 0 0);--input:oklch(0.922 0 0);--ring:oklch(0.708 0 0);--chart-1:oklch(0.646 0.222 41.116);--chart-2:oklch(0.6 0.118 184.704);--chart-3:oklch(0.398 0.07 227.392);--chart-4:oklch(0.828 0.189 84.429);--chart-5:oklch(0.769 0.188 70.08);--sidebar:oklch(0.985 0 0);--sidebar-foreground:oklch(0.145 0 0);--sidebar-primary:oklch(0.205 0 0);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.97 0 0);--sidebar-accent-foreground:oklch(0.205 0 0);--sidebar-border:oklch(0.922 0 0);--sidebar-ring:oklch(0.708 0 0)}/*! add in missing dark mode styles from above OR no dark mode at all (who tf over 30 needs it)*/.dark{--background:oklch(0.145 0 0);--foreground:oklch(0.985 0 0);--card:oklch(0.205 0 0);--card-foreground:oklch(0.985 0 0);--popover:oklch(0.205 0 0);--popover-foreground:oklch(0.985 0 0);--primary:oklch(0.922 0 0);--primary-foreground:oklch(0.205 0 0);--secondary:oklch(0.269 0 0);--secondary-foreground:oklch(0.985 0 0);--muted:oklch(0.269 0 0);--muted-foreground:oklch(0.708 0 0);--accent:oklch(0.269 0 0);--accent-foreground:oklch(0.985 0 0);--destructive:oklch(0.704 0.191 22.216);--border:oklch(1 0 0/10%);--input:oklch(1 0 0/15%);--ring:oklch(0.556 0 0);--chart-1:oklch(0.488 0.243 264.376);--chart-2:oklch(0.696 0.17 162.48);--chart-3:oklch(0.769 0.188 70.08);--chart-4:oklch(0.627 0.265 303.9);--chart-5:oklch(0.645 0.246 16.439);--sidebar:oklch(0.205 0 0);--sidebar-foreground:oklch(0.985 0 0);--sidebar-primary:oklch(0.488 0.243 264.376);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.269 0 0);--sidebar-accent-foreground:oklch(0.985 0 0);--sidebar-border:oklch(1 0 0/10%);--sidebar-ring:oklch(0.556 0 0)}@layer base{*{border-color:var(--color-border);outline-color:var(--color-ring);@supports (color:color-mix(in lab,red,red)){outline-color:color-mix(in oklab,var(--color-ring) 50%,transparent)}}body{background-color:var(--color-background);color:var(--color-foreground)}a{--tw-duration:200ms;border-radius:var(--radius-sm);color:var(--color-primary);transition-duration:var(--tw-duration,var(--default-transition-duration));transition-duration:.2s;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));&:hover{@media (hover:hover){color:var(--color-primary);@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-primary) 80%,transparent)}}}&:focus{--tw-outline-style:none;outline-style:none}}}@layer components{.bi-card{background-color:var(--color-white);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing)*6);&:is(.dark *){border-color:var(--color-slate-800)}&:is(.dark *){background-color:var(--color-red-50)}}.bi-card-interactive{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));&:hover{@media (hover:hover){background-color:var(--color-gray-50)}}&:is(.dark *){&:hover{@media (hover:hover){background-color:color-mix(in srgb,oklch(27.9% .041 260.031) 60%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-800) 60%,transparent)}}}}}}body{height:100vh;margin:0;padding:0;width:100vw}html{overflow:hidden}*{box-sizing:border-box}@layer utilities{.pb-safe{padding-bottom:env(safe-area-inset-bottom)}.pt-safe{padding-top:env(safe-area-inset-top)}.pl-safe{padding-left:env(safe-area-inset-left)}.pr-safe{padding-right:env(safe-area-inset-right)}.webkit-overflow-scrolling-touch{-webkit-overflow-scrolling:touch}}.input-wrap{align-items:center;display:flex;height:40px}.input-wrap input{font-size:14px}.input-wrap input:focus{font-size:16px}@layer base{@media (max-width:639.98px){input:focus,select:focus,textarea:focus{font-size:1rem}}}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-pan-x{syntax:\"*\";inherits:false}@property --tw-pan-y{syntax:\"*\";inherits:false}@property --tw-pinch-zoom{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-ordinal{syntax:\"*\";inherits:false}@property --tw-slashed-zero{syntax:\"*\";inherits:false}@property --tw-numeric-figure{syntax:\"*\";inherits:false}@property --tw-numeric-spacing{syntax:\"*\";inherits:false}@property --tw-numeric-fraction{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--tw-duration:initial}}}";
4
+ styleInject(css_248z,{"insertAt":"top"});
5
+
6
+ export { css_248z as default };
7
+ //# sourceMappingURL=index.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}