aidol 0.2.0 → 0.3.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.
- package/dist/client.cjs +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +345 -334
- package/dist/client.js.map +1 -1
- package/dist/components/Header.d.ts +8 -0
- package/dist/components/Header.d.ts.map +1 -0
- package/dist/components/companion/Card.d.ts +3 -4
- package/dist/components/companion/Card.d.ts.map +1 -1
- package/dist/components/companion/ImagePreview.d.ts +4 -4
- package/dist/components/companion/ImagePreview.d.ts.map +1 -1
- package/dist/components/creation/ConceptSelector.d.ts.map +1 -1
- package/dist/components/creation/GroupCreation.d.ts.map +1 -1
- package/dist/components/creation/GroupNameInput.d.ts.map +1 -1
- package/dist/components/creation/MemberNameInput.d.ts.map +1 -1
- package/dist/components/creation/PersonalitySelector.d.ts.map +1 -1
- package/dist/i18n/translations.d.ts +18 -0
- package/dist/i18n/translations.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +38 -36
- package/dist/index.js.map +1 -1
- package/dist/repositories/CompanionRepository.d.ts +6 -0
- package/dist/repositories/CompanionRepository.d.ts.map +1 -1
- package/dist/schemas/companion.d.ts +8 -0
- package/dist/schemas/companion.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/client.js
CHANGED
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as o, Fragment as W } from "react/jsx-runtime";
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
6
|
-
import { forwardRef as
|
|
3
|
+
import { useTranslation as p } from "react-i18next";
|
|
4
|
+
import R from "next/image";
|
|
5
|
+
import * as c from "react";
|
|
6
|
+
import { forwardRef as y, useState as S, useMemo as M, useCallback as Y } from "react";
|
|
7
7
|
import { validateFieldsNatively as H, toNestErrors as q } from "@hookform/resolvers";
|
|
8
8
|
import { appendErrors as J, useForm as Q, useFieldArray as X, Controller as ee } from "react-hook-form";
|
|
9
9
|
import { g as te } from "./aidol-D1U55wfr.mjs";
|
|
10
10
|
import { motion as g } from "framer-motion";
|
|
11
|
+
function U(e) {
|
|
12
|
+
var r, l, a = "";
|
|
13
|
+
if (typeof e == "string" || typeof e == "number") a += e;
|
|
14
|
+
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
15
|
+
var s = e.length;
|
|
16
|
+
for (r = 0; r < s; r++) e[r] && (l = U(e[r])) && (a && (a += " "), a += l);
|
|
17
|
+
} else for (l in e) e[l] && (a && (a += " "), a += l);
|
|
18
|
+
return a;
|
|
19
|
+
}
|
|
20
|
+
function v() {
|
|
21
|
+
for (var e, r, l = 0, a = "", s = arguments.length; l < s; l++) (e = arguments[l]) && (r = U(e)) && (a && (a += " "), a += r);
|
|
22
|
+
return a;
|
|
23
|
+
}
|
|
11
24
|
function ae({
|
|
12
25
|
title: e,
|
|
13
|
-
titleId:
|
|
14
|
-
...
|
|
15
|
-
},
|
|
16
|
-
return /* @__PURE__ */
|
|
26
|
+
titleId: r,
|
|
27
|
+
...l
|
|
28
|
+
}, a) {
|
|
29
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
17
30
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18
31
|
fill: "none",
|
|
19
32
|
viewBox: "0 0 24 24",
|
|
@@ -21,23 +34,23 @@ function ae({
|
|
|
21
34
|
stroke: "currentColor",
|
|
22
35
|
"aria-hidden": "true",
|
|
23
36
|
"data-slot": "icon",
|
|
24
|
-
ref:
|
|
25
|
-
"aria-labelledby":
|
|
26
|
-
},
|
|
27
|
-
id:
|
|
28
|
-
}, e) : null, /* @__PURE__ */
|
|
37
|
+
ref: a,
|
|
38
|
+
"aria-labelledby": r
|
|
39
|
+
}, l), e ? /* @__PURE__ */ c.createElement("title", {
|
|
40
|
+
id: r
|
|
41
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
29
42
|
strokeLinecap: "round",
|
|
30
43
|
strokeLinejoin: "round",
|
|
31
44
|
d: "m4.5 12.75 6 6 9-13.5"
|
|
32
45
|
}));
|
|
33
46
|
}
|
|
34
|
-
const re =
|
|
35
|
-
function
|
|
47
|
+
const re = c.forwardRef(ae);
|
|
48
|
+
function le({
|
|
36
49
|
title: e,
|
|
37
|
-
titleId:
|
|
38
|
-
...
|
|
39
|
-
},
|
|
40
|
-
return /* @__PURE__ */
|
|
50
|
+
titleId: r,
|
|
51
|
+
...l
|
|
52
|
+
}, a) {
|
|
53
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
41
54
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
55
|
fill: "none",
|
|
43
56
|
viewBox: "0 0 24 24",
|
|
@@ -45,23 +58,23 @@ function ne({
|
|
|
45
58
|
stroke: "currentColor",
|
|
46
59
|
"aria-hidden": "true",
|
|
47
60
|
"data-slot": "icon",
|
|
48
|
-
ref:
|
|
49
|
-
"aria-labelledby":
|
|
50
|
-
},
|
|
51
|
-
id:
|
|
52
|
-
}, e) : null, /* @__PURE__ */
|
|
61
|
+
ref: a,
|
|
62
|
+
"aria-labelledby": r
|
|
63
|
+
}, l), e ? /* @__PURE__ */ c.createElement("title", {
|
|
64
|
+
id: r
|
|
65
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
53
66
|
strokeLinecap: "round",
|
|
54
67
|
strokeLinejoin: "round",
|
|
55
68
|
d: "M12 4.5v15m7.5-7.5h-15"
|
|
56
69
|
}));
|
|
57
70
|
}
|
|
58
|
-
const
|
|
71
|
+
const ne = c.forwardRef(le);
|
|
59
72
|
function se({
|
|
60
73
|
title: e,
|
|
61
|
-
titleId:
|
|
62
|
-
...
|
|
63
|
-
},
|
|
64
|
-
return /* @__PURE__ */
|
|
74
|
+
titleId: r,
|
|
75
|
+
...l
|
|
76
|
+
}, a) {
|
|
77
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
65
78
|
xmlns: "http://www.w3.org/2000/svg",
|
|
66
79
|
fill: "none",
|
|
67
80
|
viewBox: "0 0 24 24",
|
|
@@ -69,23 +82,23 @@ function se({
|
|
|
69
82
|
stroke: "currentColor",
|
|
70
83
|
"aria-hidden": "true",
|
|
71
84
|
"data-slot": "icon",
|
|
72
|
-
ref:
|
|
73
|
-
"aria-labelledby":
|
|
74
|
-
},
|
|
75
|
-
id:
|
|
76
|
-
}, e) : null, /* @__PURE__ */
|
|
85
|
+
ref: a,
|
|
86
|
+
"aria-labelledby": r
|
|
87
|
+
}, l), e ? /* @__PURE__ */ c.createElement("title", {
|
|
88
|
+
id: r
|
|
89
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
77
90
|
strokeLinecap: "round",
|
|
78
91
|
strokeLinejoin: "round",
|
|
79
92
|
d: "M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z"
|
|
80
93
|
}));
|
|
81
94
|
}
|
|
82
|
-
const oe =
|
|
95
|
+
const oe = c.forwardRef(se);
|
|
83
96
|
function ie({
|
|
84
97
|
title: e,
|
|
85
|
-
titleId:
|
|
86
|
-
...
|
|
87
|
-
},
|
|
88
|
-
return /* @__PURE__ */
|
|
98
|
+
titleId: r,
|
|
99
|
+
...l
|
|
100
|
+
}, a) {
|
|
101
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
89
102
|
xmlns: "http://www.w3.org/2000/svg",
|
|
90
103
|
fill: "none",
|
|
91
104
|
viewBox: "0 0 24 24",
|
|
@@ -93,23 +106,23 @@ function ie({
|
|
|
93
106
|
stroke: "currentColor",
|
|
94
107
|
"aria-hidden": "true",
|
|
95
108
|
"data-slot": "icon",
|
|
96
|
-
ref:
|
|
97
|
-
"aria-labelledby":
|
|
98
|
-
},
|
|
99
|
-
id:
|
|
100
|
-
}, e) : null, /* @__PURE__ */
|
|
109
|
+
ref: a,
|
|
110
|
+
"aria-labelledby": r
|
|
111
|
+
}, l), e ? /* @__PURE__ */ c.createElement("title", {
|
|
112
|
+
id: r
|
|
113
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
101
114
|
strokeLinecap: "round",
|
|
102
115
|
strokeLinejoin: "round",
|
|
103
116
|
d: "M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"
|
|
104
117
|
}));
|
|
105
118
|
}
|
|
106
|
-
const ce =
|
|
119
|
+
const ce = c.forwardRef(ie);
|
|
107
120
|
function de({
|
|
108
121
|
title: e,
|
|
109
|
-
titleId:
|
|
110
|
-
...
|
|
111
|
-
},
|
|
112
|
-
return /* @__PURE__ */
|
|
122
|
+
titleId: r,
|
|
123
|
+
...l
|
|
124
|
+
}, a) {
|
|
125
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
113
126
|
xmlns: "http://www.w3.org/2000/svg",
|
|
114
127
|
fill: "none",
|
|
115
128
|
viewBox: "0 0 24 24",
|
|
@@ -117,173 +130,192 @@ function de({
|
|
|
117
130
|
stroke: "currentColor",
|
|
118
131
|
"aria-hidden": "true",
|
|
119
132
|
"data-slot": "icon",
|
|
120
|
-
ref:
|
|
121
|
-
"aria-labelledby":
|
|
122
|
-
},
|
|
123
|
-
id:
|
|
124
|
-
}, e) : null, /* @__PURE__ */
|
|
133
|
+
ref: a,
|
|
134
|
+
"aria-labelledby": r
|
|
135
|
+
}, l), e ? /* @__PURE__ */ c.createElement("title", {
|
|
136
|
+
id: r
|
|
137
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
125
138
|
strokeLinecap: "round",
|
|
126
139
|
strokeLinejoin: "round",
|
|
127
140
|
d: "M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"
|
|
128
141
|
}));
|
|
129
142
|
}
|
|
130
|
-
const me =
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
lg: "size-32"
|
|
143
|
+
const me = c.forwardRef(de), ue = {
|
|
144
|
+
default: "size-profile",
|
|
145
|
+
profile: "size-full"
|
|
134
146
|
};
|
|
135
|
-
function I({ url: e, alt:
|
|
136
|
-
const r = pe[n];
|
|
147
|
+
function I({ url: e, alt: r, variant: l = "default" }) {
|
|
137
148
|
return /* @__PURE__ */ t(
|
|
138
149
|
"div",
|
|
139
150
|
{
|
|
140
|
-
className:
|
|
141
|
-
|
|
151
|
+
className: v(
|
|
152
|
+
"border-base-300 bg-base-200 relative overflow-hidden rounded-lg border",
|
|
153
|
+
ue[l]
|
|
154
|
+
),
|
|
155
|
+
children: e ? /* @__PURE__ */ t(R, { src: e, alt: r, fill: !0, className: "size-full object-cover" }) : /* @__PURE__ */ t("div", { className: "flex size-full items-center justify-center", children: /* @__PURE__ */ t(me, { className: "text-base-content/50 size-1/2" }) })
|
|
142
156
|
}
|
|
143
157
|
);
|
|
144
158
|
}
|
|
145
|
-
function
|
|
146
|
-
|
|
159
|
+
function pe({ companion: e, variant: r = "grade", onClick: l }) {
|
|
160
|
+
const { t: a } = p(), s = e.aidolId !== null, i = r === "position", n = l && !s;
|
|
161
|
+
return /* @__PURE__ */ o(
|
|
147
162
|
"div",
|
|
148
163
|
{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
164
|
+
className: v(
|
|
165
|
+
"h-card max-w-card border-base-300 relative w-full overflow-hidden rounded-lg border",
|
|
166
|
+
n && "cursor-pointer"
|
|
167
|
+
),
|
|
168
|
+
onClick: n ? l : void 0,
|
|
169
|
+
role: n ? "button" : void 0,
|
|
170
|
+
tabIndex: n ? 0 : void 0,
|
|
171
|
+
onKeyDown: n ? (d) => {
|
|
172
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), l());
|
|
155
173
|
} : void 0,
|
|
156
|
-
children:
|
|
157
|
-
/* @__PURE__ */ t(
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ t("div", { className: "absolute inset-0", children: /* @__PURE__ */ t(
|
|
158
176
|
I,
|
|
159
177
|
{
|
|
160
178
|
url: e.profilePictureUrl,
|
|
161
179
|
alt: e.name,
|
|
162
|
-
|
|
180
|
+
variant: "profile"
|
|
181
|
+
}
|
|
182
|
+
) }),
|
|
183
|
+
s && /* @__PURE__ */ t("div", { className: "absolute inset-0 z-20 bg-black/40 backdrop-blur-sm" }),
|
|
184
|
+
s && /* @__PURE__ */ t("div", { className: "absolute top-4 left-4 z-20", children: /* @__PURE__ */ t("span", { className: "bg-base-100 text-body-s text-base-content w-fit rounded-lg px-2 py-1", children: a("companion.signed") }) }),
|
|
185
|
+
/* @__PURE__ */ t(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
className: v(
|
|
189
|
+
"absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t from-black to-transparent",
|
|
190
|
+
s && "opacity-20",
|
|
191
|
+
i && "opacity-30",
|
|
192
|
+
!s && !i && "opacity-60"
|
|
193
|
+
)
|
|
163
194
|
}
|
|
164
195
|
),
|
|
165
|
-
/* @__PURE__ */ o("div", { className: "
|
|
166
|
-
/* @__PURE__ */ t("
|
|
167
|
-
|
|
196
|
+
/* @__PURE__ */ o("div", { className: "absolute inset-x-4 bottom-4 z-10 flex flex-col gap-2", children: [
|
|
197
|
+
/* @__PURE__ */ t("span", { className: "text-title-s text-white", children: e.name }),
|
|
198
|
+
!i && /* @__PURE__ */ t("span", { className: "text-body-s w-fit rounded-lg bg-black px-2 py-1 text-white", children: a("companion.grade", { grade: e.grade }) }),
|
|
199
|
+
i && /* @__PURE__ */ t("span", { className: "bg-base-100 text-body-s text-base-content w-fit rounded-lg px-2 py-1", children: e.position })
|
|
168
200
|
] })
|
|
169
|
-
]
|
|
201
|
+
]
|
|
170
202
|
}
|
|
171
203
|
);
|
|
172
204
|
}
|
|
173
|
-
function
|
|
205
|
+
function ze({
|
|
174
206
|
companions: e,
|
|
175
|
-
onCompanionClick:
|
|
207
|
+
onCompanionClick: r
|
|
176
208
|
}) {
|
|
177
|
-
const { t:
|
|
209
|
+
const { t: l } = p();
|
|
178
210
|
return /* @__PURE__ */ o("div", { className: "mt-8", children: [
|
|
179
|
-
/* @__PURE__ */ t("h2", { className: "
|
|
180
|
-
e && e.length > 0 ? /* @__PURE__ */ t("div", { className: "grid gap-4 sm:grid-cols-2", children: e.map((
|
|
181
|
-
|
|
211
|
+
/* @__PURE__ */ t("h2", { className: "text-title-l mb-4 font-semibold", children: l("aidol:aidol.members") }),
|
|
212
|
+
e && e.length > 0 ? /* @__PURE__ */ t("div", { className: "grid gap-4 sm:grid-cols-2", children: e.map((a) => /* @__PURE__ */ t(
|
|
213
|
+
pe,
|
|
182
214
|
{
|
|
183
|
-
companion:
|
|
184
|
-
onClick: () => a
|
|
215
|
+
companion: a,
|
|
216
|
+
onClick: () => r(a.id)
|
|
185
217
|
},
|
|
186
|
-
|
|
187
|
-
)) }) : /* @__PURE__ */ t("p", { className: "text-
|
|
218
|
+
a.id
|
|
219
|
+
)) }) : /* @__PURE__ */ t("p", { className: "text-base-content/50 text-center", children: l("aidol:aidol.noMembers") })
|
|
188
220
|
] });
|
|
189
221
|
}
|
|
190
222
|
function $e({ aidol: e }) {
|
|
191
223
|
return /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-4 py-8 text-center", children: [
|
|
192
|
-
/* @__PURE__ */ t("div", { className: "relative size-32 overflow-hidden rounded-full
|
|
193
|
-
|
|
224
|
+
/* @__PURE__ */ t("div", { className: "bg-base-200 relative size-32 overflow-hidden rounded-full", children: e.profileImageUrl ? /* @__PURE__ */ t(
|
|
225
|
+
R,
|
|
194
226
|
{
|
|
195
227
|
src: e.profileImageUrl,
|
|
196
228
|
alt: e.name,
|
|
197
229
|
fill: !0,
|
|
198
230
|
className: "object-cover"
|
|
199
231
|
}
|
|
200
|
-
) : /* @__PURE__ */ t("div", { className: "flex size-full items-center justify-center bg-gradient-to-br
|
|
232
|
+
) : /* @__PURE__ */ t("div", { className: "from-primary/20 to-secondary/20 flex size-full items-center justify-center bg-gradient-to-br", children: /* @__PURE__ */ t(ce, { className: "text-base-content/50 size-16" }) }) }),
|
|
201
233
|
/* @__PURE__ */ o("div", { children: [
|
|
202
|
-
/* @__PURE__ */ t("h1", { className: "text-display-s
|
|
203
|
-
e.concept && /* @__PURE__ */ t("p", { className: "
|
|
234
|
+
/* @__PURE__ */ t("h1", { className: "text-display-s text-base-content font-bold", children: e.name }),
|
|
235
|
+
e.concept && /* @__PURE__ */ t("p", { className: "text-body-l text-base-content/70 mt-2", children: e.concept })
|
|
204
236
|
] })
|
|
205
237
|
] });
|
|
206
238
|
}
|
|
207
|
-
function be({ onClick: e, isLoading:
|
|
208
|
-
const { t:
|
|
239
|
+
function be({ onClick: e, isLoading: r }) {
|
|
240
|
+
const { t: l } = p();
|
|
209
241
|
return /* @__PURE__ */ t(
|
|
210
242
|
"button",
|
|
211
243
|
{
|
|
212
244
|
onClick: e,
|
|
213
|
-
disabled:
|
|
214
|
-
className: "btn btn-neutral
|
|
215
|
-
children:
|
|
216
|
-
/* @__PURE__ */ t(
|
|
217
|
-
|
|
245
|
+
disabled: r,
|
|
246
|
+
className: "btn btn-neutral text-label-l text-neutral-content h-16 min-w-48",
|
|
247
|
+
children: r ? /* @__PURE__ */ t("span", { className: "loading loading-spinner loading-sm" }) : /* @__PURE__ */ o(W, { children: [
|
|
248
|
+
/* @__PURE__ */ t(ne, { className: "size-5" }),
|
|
249
|
+
l("aidol:companion.addMember")
|
|
218
250
|
] })
|
|
219
251
|
}
|
|
220
252
|
);
|
|
221
253
|
}
|
|
222
|
-
const
|
|
223
|
-
({ placeholder: e, maxLength:
|
|
224
|
-
const { t:
|
|
254
|
+
const z = y(
|
|
255
|
+
({ placeholder: e, maxLength: r = 500, charCount: l, ...a }, s) => {
|
|
256
|
+
const { t: i } = p();
|
|
225
257
|
return /* @__PURE__ */ o("div", { className: "w-full", children: [
|
|
226
258
|
/* @__PURE__ */ t(
|
|
227
259
|
"textarea",
|
|
228
260
|
{
|
|
229
261
|
ref: s,
|
|
230
|
-
placeholder: e ??
|
|
231
|
-
maxLength:
|
|
232
|
-
className: "textarea
|
|
233
|
-
...
|
|
262
|
+
placeholder: e ?? i("aidol:companion.promptPlaceholder"),
|
|
263
|
+
maxLength: r,
|
|
264
|
+
className: "textarea bg-base-100 text-base-content placeholder:text-base-content/50 focus:border-primary h-32 w-full resize-none focus:outline-hidden",
|
|
265
|
+
...a
|
|
234
266
|
}
|
|
235
267
|
),
|
|
236
|
-
/* @__PURE__ */ o("div", { className: "
|
|
237
|
-
|
|
268
|
+
/* @__PURE__ */ o("div", { className: "text-label-s text-base-content/50 mt-1 text-right", children: [
|
|
269
|
+
l ?? 0,
|
|
238
270
|
"/",
|
|
239
|
-
|
|
271
|
+
r
|
|
240
272
|
] })
|
|
241
273
|
] });
|
|
242
274
|
}
|
|
243
275
|
);
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
const { t:
|
|
247
|
-
return /* @__PURE__ */ o("
|
|
248
|
-
/* @__PURE__ */ t("label", { className: "label", children:
|
|
276
|
+
z.displayName = "PromptInput";
|
|
277
|
+
const $ = y(({ options: e, ...r }, l) => {
|
|
278
|
+
const { t: a } = p();
|
|
279
|
+
return /* @__PURE__ */ o("fieldset", { className: "fieldset w-full", children: [
|
|
280
|
+
/* @__PURE__ */ t("label", { className: "label", children: a("aidol:creation.concept") }),
|
|
249
281
|
/* @__PURE__ */ o(
|
|
250
282
|
"select",
|
|
251
283
|
{
|
|
252
|
-
ref:
|
|
253
|
-
className: "select
|
|
254
|
-
...
|
|
284
|
+
ref: l,
|
|
285
|
+
className: "select bg-base-100 text-base-content w-full",
|
|
286
|
+
...r,
|
|
255
287
|
children: [
|
|
256
|
-
/* @__PURE__ */ t("option", { value: "", children:
|
|
288
|
+
/* @__PURE__ */ t("option", { value: "", children: a("aidol:creation.selectConcept") }),
|
|
257
289
|
e.map((s) => /* @__PURE__ */ t("option", { value: s.value, children: s.label }, s.value))
|
|
258
290
|
]
|
|
259
291
|
}
|
|
260
292
|
)
|
|
261
293
|
] });
|
|
262
294
|
});
|
|
263
|
-
|
|
264
|
-
function
|
|
295
|
+
$.displayName = "ConceptSelector";
|
|
296
|
+
function fe({
|
|
265
297
|
onGenerate: e,
|
|
266
|
-
isGenerating:
|
|
267
|
-
disabled:
|
|
298
|
+
isGenerating: r,
|
|
299
|
+
disabled: l
|
|
268
300
|
}) {
|
|
269
|
-
const { t:
|
|
301
|
+
const { t: a } = p(), [s, i] = S(""), n = () => {
|
|
270
302
|
s.trim() && e(s);
|
|
271
303
|
};
|
|
272
|
-
return /* @__PURE__ */ o("
|
|
304
|
+
return /* @__PURE__ */ o("fieldset", { className: "fieldset w-full", children: [
|
|
273
305
|
/* @__PURE__ */ o("div", { className: "flex gap-2", children: [
|
|
274
306
|
/* @__PURE__ */ t(
|
|
275
307
|
"input",
|
|
276
308
|
{
|
|
277
309
|
type: "text",
|
|
278
310
|
value: s,
|
|
279
|
-
onChange: (
|
|
280
|
-
onKeyDown: (
|
|
281
|
-
|
|
311
|
+
onChange: (m) => i(m.target.value),
|
|
312
|
+
onKeyDown: (m) => {
|
|
313
|
+
m.key === "Enter" && s.trim() && !r && !l && (m.preventDefault(), n());
|
|
282
314
|
},
|
|
283
|
-
placeholder:
|
|
315
|
+
placeholder: a("aidol:creation.emblemPromptPlaceholder"),
|
|
284
316
|
maxLength: 200,
|
|
285
|
-
className: "input
|
|
286
|
-
disabled:
|
|
317
|
+
className: "input flex-1",
|
|
318
|
+
disabled: l || r,
|
|
287
319
|
"data-testid": "emblem-prompt-input"
|
|
288
320
|
}
|
|
289
321
|
),
|
|
@@ -291,127 +323,114 @@ function he({
|
|
|
291
323
|
"button",
|
|
292
324
|
{
|
|
293
325
|
type: "button",
|
|
294
|
-
onClick:
|
|
295
|
-
disabled:
|
|
326
|
+
onClick: n,
|
|
327
|
+
disabled: l || r || !s.trim(),
|
|
296
328
|
className: "btn btn-secondary",
|
|
297
329
|
"data-testid": "emblem-generate-button",
|
|
298
|
-
children:
|
|
330
|
+
children: r ? /* @__PURE__ */ t("span", { className: "loading loading-spinner loading-sm" }) : a("aidol:creation.generate")
|
|
299
331
|
}
|
|
300
332
|
)
|
|
301
333
|
] }),
|
|
302
|
-
|
|
334
|
+
r && /* @__PURE__ */ t("div", { className: "mt-2", children: /* @__PURE__ */ t("progress", { className: "progress w-full" }) })
|
|
303
335
|
] });
|
|
304
336
|
}
|
|
305
|
-
var
|
|
306
|
-
for (var
|
|
307
|
-
var
|
|
308
|
-
if (!n
|
|
309
|
-
var
|
|
310
|
-
n
|
|
311
|
-
} else n
|
|
312
|
-
if ("unionErrors" in
|
|
313
|
-
return w.errors.forEach(function(
|
|
314
|
-
return e.push(
|
|
337
|
+
var he = function(e, r) {
|
|
338
|
+
for (var l = {}; e.length; ) {
|
|
339
|
+
var a = e[0], s = a.code, i = a.message, n = a.path.join(".");
|
|
340
|
+
if (!l[n]) if ("unionErrors" in a) {
|
|
341
|
+
var d = a.unionErrors[0].errors[0];
|
|
342
|
+
l[n] = { message: d.message, type: d.code };
|
|
343
|
+
} else l[n] = { message: i, type: s };
|
|
344
|
+
if ("unionErrors" in a && a.unionErrors.forEach(function(w) {
|
|
345
|
+
return w.errors.forEach(function(N) {
|
|
346
|
+
return e.push(N);
|
|
315
347
|
});
|
|
316
|
-
}),
|
|
317
|
-
var
|
|
318
|
-
n
|
|
348
|
+
}), r) {
|
|
349
|
+
var m = l[n].types, f = m && m[a.code];
|
|
350
|
+
l[n] = J(n, r, l, s, f ? [].concat(f, a.message) : a.message);
|
|
319
351
|
}
|
|
320
352
|
e.shift();
|
|
321
353
|
}
|
|
322
|
-
return
|
|
323
|
-
}, ge = function(e,
|
|
324
|
-
return
|
|
354
|
+
return l;
|
|
355
|
+
}, ge = function(e, r, l) {
|
|
356
|
+
return l === void 0 && (l = {}), function(a, s, i) {
|
|
325
357
|
try {
|
|
326
|
-
return Promise.resolve((function(
|
|
358
|
+
return Promise.resolve((function(n, d) {
|
|
327
359
|
try {
|
|
328
|
-
var
|
|
329
|
-
return
|
|
360
|
+
var m = Promise.resolve(e[l.mode === "sync" ? "parse" : "parseAsync"](a, r)).then(function(f) {
|
|
361
|
+
return i.shouldUseNativeValidation && H({}, i), { errors: {}, values: l.raw ? a : f };
|
|
330
362
|
});
|
|
331
|
-
} catch (
|
|
332
|
-
return
|
|
363
|
+
} catch (f) {
|
|
364
|
+
return d(f);
|
|
333
365
|
}
|
|
334
|
-
return
|
|
335
|
-
})(0, function(
|
|
336
|
-
if ((function(
|
|
337
|
-
return Array.isArray(
|
|
338
|
-
})(
|
|
339
|
-
throw
|
|
366
|
+
return m && m.then ? m.then(void 0, d) : m;
|
|
367
|
+
})(0, function(n) {
|
|
368
|
+
if ((function(d) {
|
|
369
|
+
return Array.isArray(d?.errors);
|
|
370
|
+
})(n)) return { values: {}, errors: q(he(n.errors, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
|
|
371
|
+
throw n;
|
|
340
372
|
}));
|
|
341
|
-
} catch (
|
|
342
|
-
return Promise.reject(
|
|
373
|
+
} catch (n) {
|
|
374
|
+
return Promise.reject(n);
|
|
343
375
|
}
|
|
344
376
|
};
|
|
345
377
|
};
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
for (a = 0; a < s; a++) e[a] && (n = $(e[a])) && (r && (r += " "), r += n);
|
|
352
|
-
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
353
|
-
return r;
|
|
354
|
-
}
|
|
355
|
-
function y() {
|
|
356
|
-
for (var e, a, n = 0, r = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (a = $(e)) && (r && (r += " "), r += a);
|
|
357
|
-
return r;
|
|
358
|
-
}
|
|
359
|
-
const O = x(
|
|
360
|
-
({ error: e, ...a }, n) => {
|
|
361
|
-
const { t: r } = b();
|
|
362
|
-
return /* @__PURE__ */ o("div", { className: "form-control w-full", children: [
|
|
363
|
-
/* @__PURE__ */ t("label", { className: "label", children: /* @__PURE__ */ t("span", { className: "label-text text-base-content", children: r("aidol:creation.groupName") }) }),
|
|
378
|
+
const O = y(
|
|
379
|
+
({ error: e, ...r }, l) => {
|
|
380
|
+
const { t: a } = p();
|
|
381
|
+
return /* @__PURE__ */ o("fieldset", { className: "fieldset w-full", children: [
|
|
382
|
+
/* @__PURE__ */ t("label", { className: "label", children: a("aidol:creation.groupName") }),
|
|
364
383
|
/* @__PURE__ */ t(
|
|
365
384
|
"input",
|
|
366
385
|
{
|
|
367
|
-
ref:
|
|
386
|
+
ref: l,
|
|
368
387
|
type: "text",
|
|
369
|
-
placeholder:
|
|
370
|
-
className:
|
|
371
|
-
"input
|
|
388
|
+
placeholder: a("aidol:creation.groupNamePlaceholder"),
|
|
389
|
+
className: v(
|
|
390
|
+
"input bg-base-100 text-base-content placeholder:text-base-content/50 w-full",
|
|
372
391
|
e && "input-error"
|
|
373
392
|
),
|
|
374
|
-
...
|
|
393
|
+
...r
|
|
375
394
|
}
|
|
376
395
|
),
|
|
377
|
-
e && /* @__PURE__ */ t("
|
|
396
|
+
e && /* @__PURE__ */ t("span", { className: "text-label-m text-error", children: e })
|
|
378
397
|
] });
|
|
379
398
|
}
|
|
380
399
|
);
|
|
381
400
|
O.displayName = "GroupNameInput";
|
|
382
|
-
const Z =
|
|
383
|
-
const { t:
|
|
384
|
-
return /* @__PURE__ */ o("
|
|
385
|
-
/* @__PURE__ */ t("label", { className: "label", children:
|
|
401
|
+
const Z = y(({ error: e, ...r }, l) => {
|
|
402
|
+
const { t: a } = p();
|
|
403
|
+
return /* @__PURE__ */ o("fieldset", { className: "fieldset w-full", children: [
|
|
404
|
+
/* @__PURE__ */ t("label", { className: "label", children: a("aidol:creation.memberName") }),
|
|
386
405
|
/* @__PURE__ */ t(
|
|
387
406
|
"input",
|
|
388
407
|
{
|
|
389
|
-
ref:
|
|
408
|
+
ref: l,
|
|
390
409
|
type: "text",
|
|
391
|
-
placeholder:
|
|
392
|
-
className:
|
|
393
|
-
"input
|
|
410
|
+
placeholder: a("aidol:creation.memberNamePlaceholder"),
|
|
411
|
+
className: v(
|
|
412
|
+
"input bg-base-100 text-base-content placeholder:text-base-content/50 w-full",
|
|
394
413
|
e && "input-error"
|
|
395
414
|
),
|
|
396
|
-
...
|
|
415
|
+
...r
|
|
397
416
|
}
|
|
398
417
|
),
|
|
399
|
-
e && /* @__PURE__ */ t("
|
|
418
|
+
e && /* @__PURE__ */ t("span", { className: "text-label-m text-error", children: e })
|
|
400
419
|
] });
|
|
401
420
|
});
|
|
402
421
|
Z.displayName = "MemberNameInput";
|
|
403
422
|
function ve({
|
|
404
423
|
value: e,
|
|
405
|
-
onChange:
|
|
406
|
-
options:
|
|
424
|
+
onChange: r,
|
|
425
|
+
options: l
|
|
407
426
|
}) {
|
|
408
|
-
const { t:
|
|
409
|
-
return /* @__PURE__ */ o("
|
|
410
|
-
/* @__PURE__ */ t("label", { className: "label", children:
|
|
411
|
-
/* @__PURE__ */ t("div", { className: "space-y-2", children:
|
|
427
|
+
const { t: a } = p();
|
|
428
|
+
return /* @__PURE__ */ o("fieldset", { className: "fieldset w-full", children: [
|
|
429
|
+
/* @__PURE__ */ t("label", { className: "label", children: a("aidol:creation.personality") }),
|
|
430
|
+
/* @__PURE__ */ t("div", { className: "space-y-2", children: l.map((s) => /* @__PURE__ */ o(
|
|
412
431
|
"label",
|
|
413
432
|
{
|
|
414
|
-
className:
|
|
433
|
+
className: v(
|
|
415
434
|
"flex cursor-pointer items-start gap-3 rounded-lg border p-4 transition-colors",
|
|
416
435
|
e === s.value ? "border-primary bg-primary/10" : "border-base-300 hover:border-base-content/30"
|
|
417
436
|
),
|
|
@@ -423,13 +442,13 @@ function ve({
|
|
|
423
442
|
name: "personality",
|
|
424
443
|
value: s.value,
|
|
425
444
|
checked: e === s.value,
|
|
426
|
-
onChange: (
|
|
445
|
+
onChange: (i) => r(i.target.value),
|
|
427
446
|
className: "radio-primary radio mt-0.5"
|
|
428
447
|
}
|
|
429
448
|
),
|
|
430
449
|
/* @__PURE__ */ o("div", { children: [
|
|
431
|
-
/* @__PURE__ */ t("div", { className: "
|
|
432
|
-
s.description && /* @__PURE__ */ t("div", { className: "
|
|
450
|
+
/* @__PURE__ */ t("div", { className: "text-base-content font-medium", children: s.label }),
|
|
451
|
+
s.description && /* @__PURE__ */ t("div", { className: "text-body-s text-base-content/70 mt-1", children: s.description })
|
|
433
452
|
] })
|
|
434
453
|
]
|
|
435
454
|
},
|
|
@@ -439,54 +458,54 @@ function ve({
|
|
|
439
458
|
}
|
|
440
459
|
function Ne({
|
|
441
460
|
currentStep: e,
|
|
442
|
-
totalSteps:
|
|
443
|
-
labels:
|
|
461
|
+
totalSteps: r,
|
|
462
|
+
labels: l
|
|
444
463
|
}) {
|
|
445
|
-
return /* @__PURE__ */ t("ul", { className: "steps w-full", children: Array.from({ length:
|
|
446
|
-
const
|
|
464
|
+
return /* @__PURE__ */ t("ul", { className: "steps w-full", children: Array.from({ length: r }, (a, s) => {
|
|
465
|
+
const i = s + 1, n = i < e;
|
|
447
466
|
return /* @__PURE__ */ t(
|
|
448
467
|
"li",
|
|
449
468
|
{
|
|
450
|
-
className:
|
|
469
|
+
className: v(
|
|
451
470
|
"step",
|
|
452
|
-
(
|
|
471
|
+
(n || i === e) && "step-primary"
|
|
453
472
|
),
|
|
454
|
-
children:
|
|
473
|
+
children: l?.[s] ?? ""
|
|
455
474
|
},
|
|
456
|
-
|
|
475
|
+
i
|
|
457
476
|
);
|
|
458
477
|
}) });
|
|
459
478
|
}
|
|
460
479
|
const xe = ["cute", "cool", "elegant", "powerful"], ye = ["cheerful", "cool", "tsundere", "gentle"];
|
|
461
480
|
function Oe({
|
|
462
481
|
onSubmit: e,
|
|
463
|
-
onComplete:
|
|
464
|
-
onGenerateImage:
|
|
465
|
-
isLoading:
|
|
482
|
+
onComplete: r,
|
|
483
|
+
onGenerateImage: l,
|
|
484
|
+
isLoading: a,
|
|
466
485
|
isGeneratingImage: s,
|
|
467
|
-
isCompleted:
|
|
486
|
+
isCompleted: i
|
|
468
487
|
}) {
|
|
469
|
-
const { t:
|
|
470
|
-
() => xe.map((
|
|
471
|
-
value:
|
|
472
|
-
label:
|
|
488
|
+
const { t: n } = p(), [d, m] = S(i ? 3 : 1), f = M(
|
|
489
|
+
() => xe.map((u) => ({
|
|
490
|
+
value: u,
|
|
491
|
+
label: n(`aidol:creation.concepts.${u}`)
|
|
473
492
|
})),
|
|
474
|
-
[
|
|
493
|
+
[n]
|
|
475
494
|
), w = M(
|
|
476
|
-
() => ye.map((
|
|
477
|
-
value:
|
|
478
|
-
label:
|
|
479
|
-
description:
|
|
495
|
+
() => ye.map((u) => ({
|
|
496
|
+
value: u,
|
|
497
|
+
label: n(`aidol:creation.personalities.${u}.label`),
|
|
498
|
+
description: n(`aidol:creation.personalities.${u}.description`)
|
|
480
499
|
})),
|
|
481
|
-
[
|
|
500
|
+
[n]
|
|
482
501
|
), {
|
|
483
|
-
register:
|
|
502
|
+
register: N,
|
|
484
503
|
control: P,
|
|
485
504
|
handleSubmit: F,
|
|
486
505
|
trigger: L,
|
|
487
506
|
watch: j,
|
|
488
507
|
setValue: B,
|
|
489
|
-
formState: { errors:
|
|
508
|
+
formState: { errors: h }
|
|
490
509
|
} = Q({
|
|
491
510
|
resolver: ge(te),
|
|
492
511
|
defaultValues: {
|
|
@@ -498,66 +517,65 @@ function Oe({
|
|
|
498
517
|
}), C = j("profileImageUrl"), { fields: D, append: T } = X({
|
|
499
518
|
control: P,
|
|
500
519
|
name: "members"
|
|
501
|
-
}), A = j("members"), G = async (
|
|
502
|
-
const
|
|
503
|
-
|
|
520
|
+
}), A = j("members"), G = async (u) => {
|
|
521
|
+
const b = await l(u);
|
|
522
|
+
b && B("profileImageUrl", b);
|
|
504
523
|
}, V = async () => {
|
|
505
|
-
await L(["groupName", "profileImageUrl"]) &&
|
|
506
|
-
}, _ = F(async (
|
|
507
|
-
const
|
|
508
|
-
await e({ ...
|
|
524
|
+
await L(["groupName", "profileImageUrl"]) && m(2);
|
|
525
|
+
}, _ = F(async (u) => {
|
|
526
|
+
const b = u.members.filter((x) => x.name.trim());
|
|
527
|
+
await e({ ...u, members: b }), m(3);
|
|
509
528
|
}), K = () => {
|
|
510
529
|
T({ name: "", personality: "", systemPrompt: "" });
|
|
511
530
|
};
|
|
512
|
-
return /* @__PURE__ */ t("main", { className: "flex min-h-dvh w-full flex-col items-center
|
|
531
|
+
return /* @__PURE__ */ t("main", { className: "bg-base-100 flex min-h-dvh w-full flex-col items-center px-6 py-20", children: /* @__PURE__ */ o("div", { className: "w-full max-w-lg", children: [
|
|
513
532
|
/* @__PURE__ */ t(
|
|
514
533
|
Ne,
|
|
515
534
|
{
|
|
516
|
-
currentStep:
|
|
535
|
+
currentStep: d,
|
|
517
536
|
totalSteps: 3,
|
|
518
537
|
labels: [
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
538
|
+
n("aidol:creation.step1"),
|
|
539
|
+
n("aidol:creation.step2"),
|
|
540
|
+
n("aidol:creation.step3")
|
|
522
541
|
]
|
|
523
542
|
}
|
|
524
543
|
),
|
|
525
544
|
/* @__PURE__ */ o("div", { className: "mt-8", children: [
|
|
526
|
-
|
|
527
|
-
/* @__PURE__ */ t("h2", { className: "text-display-s font-bold", children:
|
|
545
|
+
d === 1 && /* @__PURE__ */ o("div", { className: "space-y-6", children: [
|
|
546
|
+
/* @__PURE__ */ t("h2", { className: "text-display-s font-bold", children: n("aidol:creation.step1Title") }),
|
|
528
547
|
/* @__PURE__ */ t(
|
|
529
548
|
O,
|
|
530
549
|
{
|
|
531
|
-
...
|
|
532
|
-
error:
|
|
550
|
+
...N("groupName"),
|
|
551
|
+
error: h.groupName?.message ? n(h.groupName.message, { ns: "aidol" }) : void 0
|
|
533
552
|
}
|
|
534
553
|
),
|
|
535
554
|
/* @__PURE__ */ t(
|
|
536
|
-
|
|
555
|
+
$,
|
|
537
556
|
{
|
|
538
|
-
...
|
|
539
|
-
options:
|
|
557
|
+
...N("concept"),
|
|
558
|
+
options: f
|
|
540
559
|
}
|
|
541
560
|
),
|
|
542
|
-
/* @__PURE__ */ o("
|
|
543
|
-
/* @__PURE__ */ t("label", { className: "label", children:
|
|
561
|
+
/* @__PURE__ */ o("fieldset", { className: "fieldset", children: [
|
|
562
|
+
/* @__PURE__ */ t("label", { className: "label", children: n("aidol:creation.emblem") }),
|
|
544
563
|
/* @__PURE__ */ t(
|
|
545
|
-
|
|
564
|
+
fe,
|
|
546
565
|
{
|
|
547
566
|
onGenerate: G,
|
|
548
567
|
isGenerating: s,
|
|
549
|
-
disabled:
|
|
568
|
+
disabled: a
|
|
550
569
|
}
|
|
551
570
|
),
|
|
552
571
|
C && /* @__PURE__ */ t("div", { className: "mt-2 flex justify-center", children: /* @__PURE__ */ t(
|
|
553
572
|
I,
|
|
554
573
|
{
|
|
555
574
|
url: C,
|
|
556
|
-
alt:
|
|
557
|
-
size: "lg"
|
|
575
|
+
alt: n("aidol:creation.emblem")
|
|
558
576
|
}
|
|
559
577
|
) }),
|
|
560
|
-
|
|
578
|
+
h.profileImageUrl?.message && /* @__PURE__ */ t("p", { className: "text-label-m text-error mt-1", children: n(h.profileImageUrl.message, { ns: "aidol" }) })
|
|
561
579
|
] }),
|
|
562
580
|
/* @__PURE__ */ t(
|
|
563
581
|
"button",
|
|
@@ -566,31 +584,24 @@ function Oe({
|
|
|
566
584
|
onClick: V,
|
|
567
585
|
disabled: !C,
|
|
568
586
|
className: "btn btn-primary w-full",
|
|
569
|
-
children:
|
|
587
|
+
children: n("aidol:creation.next")
|
|
570
588
|
}
|
|
571
589
|
)
|
|
572
590
|
] }),
|
|
573
|
-
|
|
574
|
-
/* @__PURE__ */ t("h2", { className: "text-display-s font-bold", children:
|
|
575
|
-
D.map((
|
|
591
|
+
d === 2 && /* @__PURE__ */ o("form", { onSubmit: _, className: "space-y-6", children: [
|
|
592
|
+
/* @__PURE__ */ t("h2", { className: "text-display-s font-bold", children: n("aidol:creation.step2Title") }),
|
|
593
|
+
D.map((u, b) => /* @__PURE__ */ o(
|
|
576
594
|
"div",
|
|
577
595
|
{
|
|
578
|
-
className: "space-y-4 rounded-lg border
|
|
596
|
+
className: "border-base-300 space-y-4 rounded-lg border p-4",
|
|
579
597
|
children: [
|
|
580
598
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-4", children: [
|
|
581
|
-
/* @__PURE__ */ t(
|
|
582
|
-
I,
|
|
583
|
-
{
|
|
584
|
-
url: null,
|
|
585
|
-
alt: A[u]?.name ?? "",
|
|
586
|
-
size: "sm"
|
|
587
|
-
}
|
|
588
|
-
),
|
|
599
|
+
/* @__PURE__ */ t(I, { url: null, alt: A[b]?.name ?? "" }),
|
|
589
600
|
/* @__PURE__ */ t("div", { className: "flex-1", children: /* @__PURE__ */ t(
|
|
590
601
|
Z,
|
|
591
602
|
{
|
|
592
|
-
...
|
|
593
|
-
error:
|
|
603
|
+
...N(`members.${b}.name`),
|
|
604
|
+
error: h.members?.[b]?.name?.message ? n(h.members?.[b]?.name?.message ?? "", {
|
|
594
605
|
ns: "aidol"
|
|
595
606
|
}) : void 0
|
|
596
607
|
}
|
|
@@ -599,40 +610,40 @@ function Oe({
|
|
|
599
610
|
/* @__PURE__ */ t(
|
|
600
611
|
ee,
|
|
601
612
|
{
|
|
602
|
-
name: `members.${
|
|
613
|
+
name: `members.${b}.personality`,
|
|
603
614
|
control: P,
|
|
604
|
-
render: ({ field:
|
|
615
|
+
render: ({ field: x }) => /* @__PURE__ */ t(
|
|
605
616
|
ve,
|
|
606
617
|
{
|
|
607
|
-
value:
|
|
608
|
-
onChange:
|
|
618
|
+
value: x.value ?? "",
|
|
619
|
+
onChange: x.onChange,
|
|
609
620
|
options: w
|
|
610
621
|
}
|
|
611
622
|
)
|
|
612
623
|
}
|
|
613
624
|
),
|
|
614
625
|
/* @__PURE__ */ t(
|
|
615
|
-
|
|
626
|
+
z,
|
|
616
627
|
{
|
|
617
|
-
...
|
|
618
|
-
charCount: A[
|
|
628
|
+
...N(`members.${b}.systemPrompt`),
|
|
629
|
+
charCount: A[b]?.systemPrompt?.length ?? 0
|
|
619
630
|
}
|
|
620
631
|
)
|
|
621
632
|
]
|
|
622
633
|
},
|
|
623
|
-
|
|
634
|
+
u.id
|
|
624
635
|
)),
|
|
625
636
|
/* @__PURE__ */ t(be, { onClick: K, isLoading: !1 }),
|
|
626
|
-
|
|
637
|
+
h.members?.root?.message && /* @__PURE__ */ t("p", { className: "text-error text-center", children: n(h.members.root.message, { ns: "aidol" }) }),
|
|
627
638
|
/* @__PURE__ */ o("div", { className: "flex gap-4", children: [
|
|
628
639
|
/* @__PURE__ */ t(
|
|
629
640
|
"button",
|
|
630
641
|
{
|
|
631
642
|
type: "button",
|
|
632
|
-
onClick: () =>
|
|
643
|
+
onClick: () => m(1),
|
|
633
644
|
className: "btn btn-ghost flex-1",
|
|
634
|
-
disabled:
|
|
635
|
-
children:
|
|
645
|
+
disabled: a,
|
|
646
|
+
children: n("aidol:creation.back")
|
|
636
647
|
}
|
|
637
648
|
),
|
|
638
649
|
/* @__PURE__ */ t(
|
|
@@ -640,43 +651,43 @@ function Oe({
|
|
|
640
651
|
{
|
|
641
652
|
type: "submit",
|
|
642
653
|
className: "btn btn-primary flex-1",
|
|
643
|
-
disabled:
|
|
644
|
-
children:
|
|
654
|
+
disabled: a,
|
|
655
|
+
children: a ? /* @__PURE__ */ t("span", { className: "loading loading-spinner loading-sm" }) : n("aidol:creation.create")
|
|
645
656
|
}
|
|
646
657
|
)
|
|
647
658
|
] })
|
|
648
659
|
] }),
|
|
649
|
-
|
|
660
|
+
d === 3 && /* @__PURE__ */ o("div", { className: "space-y-6 text-center", children: [
|
|
650
661
|
/* @__PURE__ */ t("div", { className: "text-display-l", children: "🎉" }),
|
|
651
|
-
/* @__PURE__ */ t("h2", { className: "text-display-s font-bold", children:
|
|
652
|
-
/* @__PURE__ */ t("p", { className: "text-body-l text-base-content/70", children:
|
|
653
|
-
/* @__PURE__ */ t("button", { onClick:
|
|
662
|
+
/* @__PURE__ */ t("h2", { className: "text-display-s font-bold", children: n("aidol:creation.completeTitle") }),
|
|
663
|
+
/* @__PURE__ */ t("p", { className: "text-body-l text-base-content/70", children: n("aidol:creation.completeDescription") }),
|
|
664
|
+
/* @__PURE__ */ t("button", { onClick: r, className: "btn btn-primary w-full", children: n("aidol:creation.viewProfile") })
|
|
654
665
|
] })
|
|
655
666
|
] })
|
|
656
667
|
] }) });
|
|
657
668
|
}
|
|
658
669
|
function we({
|
|
659
670
|
title: e,
|
|
660
|
-
titleId:
|
|
661
|
-
...
|
|
662
|
-
},
|
|
663
|
-
return /* @__PURE__ */
|
|
671
|
+
titleId: r,
|
|
672
|
+
...l
|
|
673
|
+
}, a) {
|
|
674
|
+
return /* @__PURE__ */ c.createElement("svg", Object.assign({
|
|
664
675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
665
676
|
viewBox: "0 0 24 24",
|
|
666
677
|
fill: "currentColor",
|
|
667
678
|
"aria-hidden": "true",
|
|
668
679
|
"data-slot": "icon",
|
|
669
|
-
ref:
|
|
670
|
-
"aria-labelledby":
|
|
671
|
-
},
|
|
672
|
-
id:
|
|
673
|
-
}, e) : null, /* @__PURE__ */
|
|
680
|
+
ref: a,
|
|
681
|
+
"aria-labelledby": r
|
|
682
|
+
}, l), e ? /* @__PURE__ */ c.createElement("title", {
|
|
683
|
+
id: r
|
|
684
|
+
}, e) : null, /* @__PURE__ */ c.createElement("path", {
|
|
674
685
|
fillRule: "evenodd",
|
|
675
686
|
d: "M9 4.5a.75.75 0 0 1 .721.544l.813 2.846a3.75 3.75 0 0 0 2.576 2.576l2.846.813a.75.75 0 0 1 0 1.442l-2.846.813a3.75 3.75 0 0 0-2.576 2.576l-.813 2.846a.75.75 0 0 1-1.442 0l-.813-2.846a3.75 3.75 0 0 0-2.576-2.576l-2.846-.813a.75.75 0 0 1 0-1.442l2.846-.813A3.75 3.75 0 0 0 7.466 7.89l.813-2.846A.75.75 0 0 1 9 4.5ZM18 1.5a.75.75 0 0 1 .728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 0 1 0 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 0 1-1.456 0l-.258-1.036a2.625 2.625 0 0 0-1.91-1.91l-1.036-.258a.75.75 0 0 1 0-1.456l1.036-.258a2.625 2.625 0 0 0 1.91-1.91l.258-1.036A.75.75 0 0 1 18 1.5ZM16.5 15a.75.75 0 0 1 .712.513l.394 1.183c.15.447.5.799.948.948l1.183.395a.75.75 0 0 1 0 1.422l-1.183.395c-.447.15-.799.5-.948.948l-.395 1.183a.75.75 0 0 1-1.422 0l-.395-1.183a1.5 1.5 0 0 0-.948-.948l-1.183-.395a.75.75 0 0 1 0-1.422l1.183-.395c.447-.15.799-.5.948-.948l.395-1.183A.75.75 0 0 1 16.5 15Z",
|
|
676
687
|
clipRule: "evenodd"
|
|
677
688
|
}));
|
|
678
689
|
}
|
|
679
|
-
const Ce =
|
|
690
|
+
const Ce = c.forwardRef(we), k = {
|
|
680
691
|
initial: { y: 40, opacity: 0 },
|
|
681
692
|
animate: {
|
|
682
693
|
y: 0,
|
|
@@ -686,7 +697,7 @@ const Ce = i.forwardRef(we), E = {
|
|
|
686
697
|
ease: "easeInOut"
|
|
687
698
|
}
|
|
688
699
|
}
|
|
689
|
-
},
|
|
700
|
+
}, ke = {
|
|
690
701
|
animate: {
|
|
691
702
|
transition: {
|
|
692
703
|
staggerChildren: 0.2
|
|
@@ -694,30 +705,30 @@ const Ce = i.forwardRef(we), E = {
|
|
|
694
705
|
}
|
|
695
706
|
};
|
|
696
707
|
function Ze() {
|
|
697
|
-
const { t: e } =
|
|
708
|
+
const { t: e } = p();
|
|
698
709
|
return /* @__PURE__ */ o(
|
|
699
710
|
g.section,
|
|
700
711
|
{
|
|
701
|
-
variants:
|
|
712
|
+
variants: ke,
|
|
702
713
|
initial: "initial",
|
|
703
714
|
whileInView: "animate",
|
|
704
715
|
viewport: { once: !0, amount: 0.1 },
|
|
705
716
|
className: "container mx-auto px-6 py-20 text-center md:py-28",
|
|
706
717
|
children: [
|
|
707
|
-
/* @__PURE__ */ t(g.div, { variants:
|
|
718
|
+
/* @__PURE__ */ t(g.div, { variants: k, children: /* @__PURE__ */ t(Ce, { className: "text-secondary drop-shadow-[0_0_16px_theme(colors.secondary)] mx-auto size-24" }) }),
|
|
708
719
|
/* @__PURE__ */ t(
|
|
709
720
|
g.h2,
|
|
710
721
|
{
|
|
711
|
-
variants:
|
|
712
|
-
className: "
|
|
722
|
+
variants: k,
|
|
723
|
+
className: "text-display-s md:text-display-m mt-4",
|
|
713
724
|
children: e("aidol:landing.demo.title")
|
|
714
725
|
}
|
|
715
726
|
),
|
|
716
727
|
/* @__PURE__ */ t(
|
|
717
728
|
g.p,
|
|
718
729
|
{
|
|
719
|
-
variants:
|
|
720
|
-
className: "mx-auto mt-4 max-w-lg
|
|
730
|
+
variants: k,
|
|
731
|
+
className: "text-body-l text-neutral-content mx-auto mt-4 max-w-lg",
|
|
721
732
|
children: e("aidol:landing.demo.description")
|
|
722
733
|
}
|
|
723
734
|
)
|
|
@@ -725,7 +736,7 @@ function Ze() {
|
|
|
725
736
|
}
|
|
726
737
|
);
|
|
727
738
|
}
|
|
728
|
-
const
|
|
739
|
+
const E = {
|
|
729
740
|
initial: { y: 40, opacity: 0 },
|
|
730
741
|
animate: {
|
|
731
742
|
y: 0,
|
|
@@ -735,7 +746,7 @@ const k = {
|
|
|
735
746
|
ease: "easeInOut"
|
|
736
747
|
}
|
|
737
748
|
}
|
|
738
|
-
},
|
|
749
|
+
}, Ee = {
|
|
739
750
|
animate: {
|
|
740
751
|
transition: {
|
|
741
752
|
staggerChildren: 0.2
|
|
@@ -743,66 +754,66 @@ const k = {
|
|
|
743
754
|
}
|
|
744
755
|
};
|
|
745
756
|
function Fe({ onGetStarted: e }) {
|
|
746
|
-
const { t:
|
|
747
|
-
return /* @__PURE__ */ t("div", { className: "hero min-h-screen bg-gradient-to-b
|
|
757
|
+
const { t: r } = p();
|
|
758
|
+
return /* @__PURE__ */ t("div", { className: "hero from-base-200 to-primary min-h-screen bg-gradient-to-b pt-20", children: /* @__PURE__ */ o(
|
|
748
759
|
g.div,
|
|
749
760
|
{
|
|
750
|
-
variants:
|
|
761
|
+
variants: Ee,
|
|
751
762
|
initial: "initial",
|
|
752
763
|
animate: "animate",
|
|
753
|
-
className: "hero-content flex-col gap-12 text-center
|
|
764
|
+
className: "hero-content text-base-content flex-col gap-12 text-center",
|
|
754
765
|
children: [
|
|
755
766
|
/* @__PURE__ */ o("div", { className: "max-w-3xl", children: [
|
|
756
767
|
/* @__PURE__ */ t(
|
|
757
768
|
g.h1,
|
|
758
769
|
{
|
|
759
|
-
variants:
|
|
760
|
-
className: "
|
|
761
|
-
children:
|
|
770
|
+
variants: E,
|
|
771
|
+
className: "text-display-m md:text-display-l mb-4",
|
|
772
|
+
children: r("aidol:landing.hero.title")
|
|
762
773
|
}
|
|
763
774
|
),
|
|
764
775
|
/* @__PURE__ */ t(
|
|
765
776
|
g.p,
|
|
766
777
|
{
|
|
767
|
-
variants:
|
|
768
|
-
className: "mx-auto mt-6 max-w-xl
|
|
769
|
-
children:
|
|
778
|
+
variants: E,
|
|
779
|
+
className: "text-body-l text-neutral-content mx-auto mt-6 max-w-xl",
|
|
780
|
+
children: r("aidol:landing.hero.description")
|
|
770
781
|
}
|
|
771
782
|
)
|
|
772
783
|
] }),
|
|
773
|
-
/* @__PURE__ */ t(g.div, { variants:
|
|
784
|
+
/* @__PURE__ */ t(g.div, { variants: E, children: /* @__PURE__ */ t(
|
|
774
785
|
"button",
|
|
775
786
|
{
|
|
776
787
|
onClick: e,
|
|
777
788
|
className: "btn btn-primary font-semibold",
|
|
778
|
-
children:
|
|
789
|
+
children: r("aidol:landing.hero.cta")
|
|
779
790
|
}
|
|
780
791
|
) })
|
|
781
792
|
]
|
|
782
793
|
}
|
|
783
794
|
) });
|
|
784
795
|
}
|
|
785
|
-
function Le({ url: e, onCopySuccess:
|
|
786
|
-
const { t:
|
|
787
|
-
await navigator.clipboard.writeText(e), s(!0),
|
|
788
|
-
}, [e,
|
|
796
|
+
function Le({ url: e, onCopySuccess: r }) {
|
|
797
|
+
const { t: l } = p(), [a, s] = S(!1), i = Y(async () => {
|
|
798
|
+
await navigator.clipboard.writeText(e), s(!0), r?.(), setTimeout(() => s(!1), 2e3);
|
|
799
|
+
}, [e, r]);
|
|
789
800
|
return /* @__PURE__ */ t(
|
|
790
801
|
"button",
|
|
791
802
|
{
|
|
792
|
-
onClick:
|
|
803
|
+
onClick: i,
|
|
793
804
|
className: "btn btn-circle btn-ghost",
|
|
794
|
-
"aria-label":
|
|
795
|
-
children:
|
|
805
|
+
"aria-label": l("aidol:share"),
|
|
806
|
+
children: a ? /* @__PURE__ */ t(re, { className: "text-success size-6" }) : /* @__PURE__ */ t(oe, { className: "size-6" })
|
|
796
807
|
}
|
|
797
808
|
);
|
|
798
809
|
}
|
|
799
810
|
export {
|
|
800
811
|
be as AddMemberButton,
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
812
|
+
pe as Card,
|
|
813
|
+
ze as CompanionGrid,
|
|
814
|
+
$ as ConceptSelector,
|
|
804
815
|
Ze as DemoSection,
|
|
805
|
-
|
|
816
|
+
fe as EmblemGenerator,
|
|
806
817
|
Oe as GroupCreation,
|
|
807
818
|
$e as GroupHeader,
|
|
808
819
|
O as GroupNameInput,
|
|
@@ -810,7 +821,7 @@ export {
|
|
|
810
821
|
I as ImagePreview,
|
|
811
822
|
Z as MemberNameInput,
|
|
812
823
|
ve as PersonalitySelector,
|
|
813
|
-
|
|
824
|
+
z as PromptInput,
|
|
814
825
|
Le as ShareButton,
|
|
815
826
|
Ne as StepIndicator
|
|
816
827
|
};
|