@tbox.cn/app-module-member 1.0.0-alpha.1 → 1.0.0-alpha.6
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/AGENTS.md +3 -3
- package/dist/chunk-W5YKIKTD.js +857 -0
- package/dist/client/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/server/index.d.ts +76 -76
- package/dist/server/index.js +1 -1
- package/package.json +5 -8
- package/src/client/cards/member-card-summary/index.tsx +175 -58
- package/src/client/cards/member-enrollment-cta/index.tsx +10 -10
- package/src/client/cards/member-enrollment-form/index.tsx +34 -26
- package/src/client/cards/member-enrollment-status/index.tsx +24 -9
- package/src/client/cards/member-info/index.tsx +20 -20
- package/src/client/cards/member-login-cta/index.tsx +14 -14
- package/src/client/cards/member-point-usage-list/index.tsx +27 -21
- package/src/client/components/ImageWithFallback.tsx +1 -1
- package/src/client/index.ts +0 -2
- package/tbox.module.json +0 -1
- package/tsup.config.ts +0 -5
- package/dist/chunk-GMHJMLRV.js +0 -767
- package/dist/member-372B74DY.css +0 -1740
- package/src/client/styles/member.css +0 -1740
- package/src/client/types/css.d.ts +0 -2
- /package/dist/{chunk-DSFXLULX.js → chunk-6JWXQAHX.js} +0 -0
|
@@ -0,0 +1,857 @@
|
|
|
1
|
+
// src/client/cards/member-info/index.tsx
|
|
2
|
+
import { CalendarBlank, Phone, Tag, UserCircle } from "@phosphor-icons/react";
|
|
3
|
+
|
|
4
|
+
// src/client/components/ImageWithFallback.tsx
|
|
5
|
+
import { useEffect, useState } from "react";
|
|
6
|
+
import { ImageSquare } from "@phosphor-icons/react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
function ImageWithFallback(props) {
|
|
9
|
+
const { src, alt, className, size = 40, loading = "lazy", fallback } = props;
|
|
10
|
+
const [failed, setFailed] = useState(false);
|
|
11
|
+
useEffect(() => setFailed(false), [src]);
|
|
12
|
+
if (!src || failed) {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", { className: `img-fallback ${className ?? ""}`.trim(), "aria-label": alt, role: "img", children: fallback ?? /* @__PURE__ */ jsx(ImageSquare, { weight: "duotone", size: Math.round(size * 0.45) }) });
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
"img",
|
|
17
|
+
{
|
|
18
|
+
className: `max-w-full ${className ?? ""}`.trim(),
|
|
19
|
+
src,
|
|
20
|
+
alt,
|
|
21
|
+
loading,
|
|
22
|
+
referrerPolicy: "no-referrer",
|
|
23
|
+
onError: () => setFailed(true)
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// src/client/cards/view.ts
|
|
29
|
+
function pointAmountClass(amount) {
|
|
30
|
+
return amount.startsWith("-") ? "member-pu__amount--spend" : "member-pu__amount--income";
|
|
31
|
+
}
|
|
32
|
+
function formatMemberDate(value) {
|
|
33
|
+
if (!value) return "";
|
|
34
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})/u.exec(value);
|
|
35
|
+
return match ? `${match[1]}.${match[2]}.${match[3]}` : value;
|
|
36
|
+
}
|
|
37
|
+
function enrollmentStateText(state) {
|
|
38
|
+
switch (state) {
|
|
39
|
+
case "active":
|
|
40
|
+
return "\u5165\u4F1A\u6210\u529F";
|
|
41
|
+
case "pending_confirmation":
|
|
42
|
+
return "\u5382\u5546\u786E\u8BA4\u4E2D";
|
|
43
|
+
case "confirmation_timeout":
|
|
44
|
+
return "\u786E\u8BA4\u8D85\u65F6";
|
|
45
|
+
default:
|
|
46
|
+
return "\u672A\u5B8C\u6210";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function enrollmentTone(state) {
|
|
50
|
+
if (state === "active") return "success";
|
|
51
|
+
if (state === "pending_confirmation") return "warning";
|
|
52
|
+
return "neutral";
|
|
53
|
+
}
|
|
54
|
+
function memberStateText(state, authState) {
|
|
55
|
+
if (state === "active") return "\u5DF2\u5165\u4F1A";
|
|
56
|
+
if (state === "closed") return "\u5DF2\u6CE8\u9500";
|
|
57
|
+
if (state === "unknown") return authState === "unauthenticated" ? "\u672A\u767B\u5F55" : "\u72B6\u6001\u5F85\u786E\u8BA4";
|
|
58
|
+
return "\u672A\u5165\u4F1A";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/client/cards/member-info/index.tsx
|
|
62
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
63
|
+
function MemberInfoCard(props) {
|
|
64
|
+
const { data } = props;
|
|
65
|
+
return /* @__PURE__ */ jsxs("section", { className: "member-card member-info bg-[color:var(--tbox-domain-member-surface,#fffdf8)] p-4 text-foreground max-[480px]:p-[14px]", children: [
|
|
66
|
+
/* @__PURE__ */ jsxs("div", { className: "member-info__head mb-[14px] flex items-center gap-3", children: [
|
|
67
|
+
data.avatarUrl ? /* @__PURE__ */ jsx2(ImageWithFallback, { src: data.avatarUrl, alt: data.displayName ?? "\u4F1A\u5458\u5934\u50CF", className: "member-info__avatar size-12 shrink-0 rounded-full border border-[#ecdec2] object-cover", size: 48 }) : /* @__PURE__ */ jsx2("div", { className: "member-info__avatar member-info__avatar--fallback grid size-12 shrink-0 place-items-center rounded-full border border-[#ecdec2] bg-[#f9f1df] text-[#8c6a2f]", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(UserCircle, { size: 34, weight: "duotone" }) }),
|
|
68
|
+
/* @__PURE__ */ jsxs("div", { className: "member-info__body grid min-w-0 gap-[3px]", children: [
|
|
69
|
+
/* @__PURE__ */ jsx2("span", { className: "member-info__eyebrow text-xs leading-4 text-secondary-foreground", children: "\u4F1A\u5458\u8D44\u6599" }),
|
|
70
|
+
/* @__PURE__ */ jsxs("div", { className: "member-info__name-row grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-2", children: [
|
|
71
|
+
/* @__PURE__ */ jsx2("strong", { className: "min-w-0 truncate text-lg leading-[23px] text-foreground [font-weight:750]", children: data.displayName ?? "\u4F1A\u5458" }),
|
|
72
|
+
/* @__PURE__ */ jsx2("span", { className: `member-status ${data.state === "active" ? "member-status--active bg-success-soft text-success" : "member-status--inactive bg-[#fff8eb] text-secondary-foreground"} inline-block whitespace-nowrap rounded-full px-2 py-[2px] text-xs leading-4`, children: memberStateText(data.state, data.authState) })
|
|
73
|
+
] })
|
|
74
|
+
] })
|
|
75
|
+
] }),
|
|
76
|
+
(data.contactDisplay || data.registeredAt) && /* @__PURE__ */ jsxs("dl", { className: "member-info__details grid grid-cols-2 border-y border-[#ecdec2] py-[13px]", children: [
|
|
77
|
+
data.contactDisplay && /* @__PURE__ */ jsxs("div", { className: "min-w-0 border-l border-[#ecdec2] px-[10px] first:border-l-0 first:pl-0", children: [
|
|
78
|
+
/* @__PURE__ */ jsxs("dt", { className: "mb-1 flex items-center gap-1 text-xs leading-4 text-secondary-foreground", children: [
|
|
79
|
+
/* @__PURE__ */ jsx2(Phone, { size: 16, weight: "duotone" }),
|
|
80
|
+
"\u8054\u7CFB\u65B9\u5F0F"
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsx2("dd", { className: "truncate text-sm font-semibold leading-[19px] text-foreground", children: data.contactDisplay })
|
|
83
|
+
] }),
|
|
84
|
+
data.registeredAt && /* @__PURE__ */ jsxs("div", { className: "min-w-0 border-l border-[#ecdec2] px-[10px] first:border-l-0 first:pl-0", children: [
|
|
85
|
+
/* @__PURE__ */ jsxs("dt", { className: "mb-1 flex items-center gap-1 text-xs leading-4 text-secondary-foreground", children: [
|
|
86
|
+
/* @__PURE__ */ jsx2(CalendarBlank, { size: 16, weight: "duotone" }),
|
|
87
|
+
"\u5165\u4F1A\u65F6\u95F4"
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ jsx2("dd", { className: "truncate text-sm font-semibold leading-[19px] text-foreground", children: formatMemberDate(data.registeredAt) })
|
|
90
|
+
] })
|
|
91
|
+
] }),
|
|
92
|
+
data.labels.length > 0 && /* @__PURE__ */ jsxs("div", { className: "member-info__labels mt-[13px]", children: [
|
|
93
|
+
/* @__PURE__ */ jsxs("div", { className: "member-info__section-title flex items-center gap-1 text-xs font-semibold leading-[17px] text-[#6f6552]", children: [
|
|
94
|
+
/* @__PURE__ */ jsx2(Tag, { size: 16, weight: "duotone" }),
|
|
95
|
+
"\u4F1A\u5458\u6807\u7B7E"
|
|
96
|
+
] }),
|
|
97
|
+
/* @__PURE__ */ jsx2("div", { className: "member-tags mt-[7px] flex flex-wrap gap-[6px]", children: data.labels.map((l) => /* @__PURE__ */ jsx2("span", { className: "rounded-full bg-[#fff6e0] px-2 py-[3.5px] text-xs leading-4 text-[color:var(--tbox-domain-member-accent,#b45f06)]", children: l.name }, l.labelRef)) })
|
|
98
|
+
] })
|
|
99
|
+
] });
|
|
100
|
+
}
|
|
101
|
+
var member_info_default = MemberInfoCard;
|
|
102
|
+
|
|
103
|
+
// src/client/cards/member-card-summary/index.tsx
|
|
104
|
+
import { useEffect as useEffect2, useMemo, useRef, useState as useState2 } from "react";
|
|
105
|
+
import { createPortal } from "react-dom";
|
|
106
|
+
import { X } from "@phosphor-icons/react";
|
|
107
|
+
import { markSelfRendering, sendCardAction } from "@tbox.cn/app-agent-sdk-client";
|
|
108
|
+
import { Car, Confetti, Coins, Gift, Sparkle } from "@phosphor-icons/react";
|
|
109
|
+
import { MEMBER_PREFERENCE_PROMPTS } from "@tbox.cn/app-contracts-mall";
|
|
110
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
111
|
+
var VARIANT_CLASS = {
|
|
112
|
+
blue: {
|
|
113
|
+
root: "member-card-summary--dynamic member-card-summary--blue bg-[image:linear-gradient(180deg,#f4f8fd_0%,#e6f0fc_100%)] px-5 pb-9 pt-5 text-[#294d87]",
|
|
114
|
+
faceHook: "member-card-summary__face--blue",
|
|
115
|
+
faceColor: "text-[#254077]",
|
|
116
|
+
levelText: "text-[#294d87]",
|
|
117
|
+
svgColor: "[&_svg]:text-[#82a6e8]",
|
|
118
|
+
iconBg: "bg-[#82a6e8]",
|
|
119
|
+
trackBg: "bg-[#8bade8]",
|
|
120
|
+
fillBg: "bg-[#254077]",
|
|
121
|
+
divider: "border-t-[rgba(74,112,174,0.16)]",
|
|
122
|
+
prefButton: "border-[#c4d6f2] bg-[rgba(255,255,255,0.68)] text-[#45679f] hover:enabled:border-[#82a6e8] hover:enabled:bg-white",
|
|
123
|
+
dot: "bg-[rgba(11,15,23,0.16)] data-[active=true]:bg-[#82a6e8]",
|
|
124
|
+
tagBg: "bg-[#e1e1e1]",
|
|
125
|
+
faceFallbackBg: "bg-[#dde7f6]"
|
|
126
|
+
},
|
|
127
|
+
silver: {
|
|
128
|
+
root: "member-card-summary--dynamic member-card-summary--silver bg-[image:linear-gradient(180deg,#f7f8fa_0%,#e8edf3_100%)] px-5 pb-9 pt-5 text-[#303443]",
|
|
129
|
+
faceHook: "member-card-summary__face--silver",
|
|
130
|
+
faceColor: "text-[#303443]",
|
|
131
|
+
levelText: "text-[#303443]",
|
|
132
|
+
svgColor: "[&_svg]:text-[#a8b1c2]",
|
|
133
|
+
iconBg: "bg-[#a8b1c2]",
|
|
134
|
+
trackBg: "bg-[#9aa7ce]",
|
|
135
|
+
fillBg: "bg-[#254077]",
|
|
136
|
+
divider: "border-t-[rgba(74,112,174,0.16)]",
|
|
137
|
+
prefButton: "border-[#303443] bg-[rgba(255,255,255,0.68)] text-[#254077] hover:enabled:border-[#a8b1c2] hover:enabled:bg-white",
|
|
138
|
+
dot: "bg-[rgba(11,15,23,0.16)] data-[active=true]:bg-[#a8b1c2]",
|
|
139
|
+
tagBg: "bg-[#e1e1e1]",
|
|
140
|
+
faceFallbackBg: "bg-[#e5e8ef]"
|
|
141
|
+
},
|
|
142
|
+
gold: {
|
|
143
|
+
root: "member-card-summary--dynamic member-card-summary--gold bg-[image:linear-gradient(180deg,#584024_0%,#141414_58%,#2e2519_100%)] px-5 pb-9 pt-5 text-[#f7f1e6]",
|
|
144
|
+
faceHook: "member-card-summary__face--gold",
|
|
145
|
+
faceColor: "text-[#683d08]",
|
|
146
|
+
levelText: "text-[#f7f1e6]",
|
|
147
|
+
svgColor: "[&_svg]:text-[#efe6d4]",
|
|
148
|
+
iconBg: "bg-[#efe6d4]",
|
|
149
|
+
trackBg: "bg-[rgba(104,61,8,0.18)]",
|
|
150
|
+
fillBg: "bg-[#683d08]",
|
|
151
|
+
divider: "border-t-[rgba(240,228,201,0.18)]",
|
|
152
|
+
prefButton: "border-[rgba(240,228,201,0.36)] bg-[rgba(255,255,255,0.10)] text-[#f0e4c9] hover:enabled:border-[#efe6d4] hover:enabled:bg-[rgba(255,255,255,0.18)]",
|
|
153
|
+
dot: "bg-[rgba(255,255,255,0.24)] data-[active=true]:bg-[#efe6d4]",
|
|
154
|
+
tagBg: "bg-[#efe6d4]",
|
|
155
|
+
faceFallbackBg: "bg-[#f0e3c6]"
|
|
156
|
+
},
|
|
157
|
+
black: {
|
|
158
|
+
root: "member-card-summary--dynamic member-card-summary--black bg-[image:linear-gradient(180deg,#222222_0%,#000000_100%)] px-5 pb-9 pt-5 text-[#e9d7ac]",
|
|
159
|
+
faceHook: "member-card-summary__face--black",
|
|
160
|
+
faceColor: "text-[#e9d7ac]",
|
|
161
|
+
levelText: "text-[#e9d7ac]",
|
|
162
|
+
svgColor: "[&_svg]:text-[#e6dcc6]",
|
|
163
|
+
iconBg: "bg-[#e6dcc6]",
|
|
164
|
+
trackBg: "bg-[rgba(230,238,255,0.09)]",
|
|
165
|
+
fillBg: "bg-[#e9d7ac]",
|
|
166
|
+
divider: "border-t-[rgba(233,215,172,0.16)]",
|
|
167
|
+
prefButton: "border-[rgba(233,215,172,0.34)] bg-[rgba(255,255,255,0.08)] text-[#e9d7ac] hover:enabled:border-[#e6dcc6] hover:enabled:bg-[rgba(255,255,255,0.16)]",
|
|
168
|
+
dot: "bg-[rgba(255,255,255,0.22)] data-[active=true]:bg-[#e6dcc6]",
|
|
169
|
+
tagBg: "bg-[#e6dcc6]",
|
|
170
|
+
faceFallbackBg: "bg-[#2b2926]"
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
var CONTROL_FOCUS_CLASS = "focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-[rgba(180,95,6,0.28)]";
|
|
174
|
+
function isProviderMiniappUrl(value) {
|
|
175
|
+
return /^(alipays|alipayrisk):\/\/[^/?#]/u.test(value);
|
|
176
|
+
}
|
|
177
|
+
function renderBenefitText(text) {
|
|
178
|
+
const parts = text.split(/(\d{3,4}-\d{7,8}|\d{7,12})/u);
|
|
179
|
+
return parts.map((part, index) => /^\d{3,4}-\d{7,8}$|^\d{7,12}$/u.test(part) ? /* @__PURE__ */ jsx3("a", { href: `tel:${part.replace(/-/gu, "")}`, children: part }, `${part}-${String(index)}`) : /* @__PURE__ */ jsx3("span", { children: part }, `${String(index)}-${part}`));
|
|
180
|
+
}
|
|
181
|
+
function BenefitFallbackIcon({ name }) {
|
|
182
|
+
const props = {
|
|
183
|
+
"aria-hidden": true,
|
|
184
|
+
className: "member-card-summary__benefit-icon-fallback shrink-0",
|
|
185
|
+
size: 28,
|
|
186
|
+
weight: "duotone"
|
|
187
|
+
};
|
|
188
|
+
if (/停车|泊车/.test(name)) return /* @__PURE__ */ jsx3(Car, { ...props });
|
|
189
|
+
if (/积分|消费/.test(name)) return /* @__PURE__ */ jsx3(Coins, { ...props });
|
|
190
|
+
if (/活动|派对/.test(name)) return /* @__PURE__ */ jsx3(Confetti, { ...props });
|
|
191
|
+
return /* @__PURE__ */ jsx3(Gift, { ...props });
|
|
192
|
+
}
|
|
193
|
+
var BENEFITS_PER_PAGE = 8;
|
|
194
|
+
function MemberCardSummaryCard(props) {
|
|
195
|
+
const { data, cardId = "", isHistory = false } = props;
|
|
196
|
+
const dynamicFace = data.presentation !== void 0;
|
|
197
|
+
const labelsEmbedded = data.presentation?.labelsEmbedded === true;
|
|
198
|
+
const vc = VARIANT_CLASS[data.presentation?.variant ?? "blue"];
|
|
199
|
+
const benefitPages = useMemo(() => {
|
|
200
|
+
const items = data.benefits;
|
|
201
|
+
if (!items?.length) return [];
|
|
202
|
+
const pages = [];
|
|
203
|
+
for (let i = 0; i < items.length; i += BENEFITS_PER_PAGE) {
|
|
204
|
+
pages.push(items.slice(i, i + BENEFITS_PER_PAGE));
|
|
205
|
+
}
|
|
206
|
+
return pages;
|
|
207
|
+
}, [data.benefits]);
|
|
208
|
+
const [benefitPage, setBenefitPage] = useState2(0);
|
|
209
|
+
const onBenefitsScroll = (event) => {
|
|
210
|
+
const el = event.currentTarget;
|
|
211
|
+
if (el.clientWidth === 0) return;
|
|
212
|
+
const next = Math.round(el.scrollLeft / el.clientWidth);
|
|
213
|
+
setBenefitPage((prev) => prev === next ? prev : next);
|
|
214
|
+
};
|
|
215
|
+
const preferencePrompts = data.preferencePrompts ?? MEMBER_PREFERENCE_PROMPTS;
|
|
216
|
+
const [pointsRuleOpen, setPointsRuleOpen] = useState2(false);
|
|
217
|
+
const [pointsRuleClosing, setPointsRuleClosing] = useState2(false);
|
|
218
|
+
const [benefitAction, setBenefitAction] = useState2();
|
|
219
|
+
const benefitActionCloseTimerRef = useRef();
|
|
220
|
+
const pointsRuleTriggerRef = useRef(null);
|
|
221
|
+
const pointsRuleCloseRef = useRef(null);
|
|
222
|
+
const pointsRuleCloseTimerRef = useRef();
|
|
223
|
+
useEffect2(() => {
|
|
224
|
+
if (!pointsRuleOpen) return;
|
|
225
|
+
const previousOverflow = document.body.style.overflow;
|
|
226
|
+
document.body.style.overflow = "hidden";
|
|
227
|
+
pointsRuleCloseRef.current?.focus();
|
|
228
|
+
const onKeyDown = (event) => {
|
|
229
|
+
if (event.key !== "Escape") return;
|
|
230
|
+
closePointsRule();
|
|
231
|
+
};
|
|
232
|
+
window.addEventListener("keydown", onKeyDown);
|
|
233
|
+
return () => {
|
|
234
|
+
document.body.style.overflow = previousOverflow;
|
|
235
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
236
|
+
};
|
|
237
|
+
}, [pointsRuleOpen]);
|
|
238
|
+
useEffect2(() => () => {
|
|
239
|
+
window.clearTimeout(pointsRuleCloseTimerRef.current);
|
|
240
|
+
window.clearTimeout(benefitActionCloseTimerRef.current);
|
|
241
|
+
}, []);
|
|
242
|
+
const closeBenefitAction = () => {
|
|
243
|
+
if (!benefitAction || benefitAction.closing) return;
|
|
244
|
+
setBenefitAction({ ...benefitAction, closing: true });
|
|
245
|
+
benefitActionCloseTimerRef.current = window.setTimeout(() => setBenefitAction(void 0), 180);
|
|
246
|
+
};
|
|
247
|
+
const finishClosePointsRule = () => {
|
|
248
|
+
window.clearTimeout(pointsRuleCloseTimerRef.current);
|
|
249
|
+
setPointsRuleOpen(false);
|
|
250
|
+
setPointsRuleClosing(false);
|
|
251
|
+
pointsRuleTriggerRef.current?.focus();
|
|
252
|
+
};
|
|
253
|
+
const closePointsRule = () => {
|
|
254
|
+
if (pointsRuleClosing) return;
|
|
255
|
+
setPointsRuleClosing(true);
|
|
256
|
+
pointsRuleCloseTimerRef.current = window.setTimeout(finishClosePointsRule, 220);
|
|
257
|
+
};
|
|
258
|
+
const openPointsRule = (event) => {
|
|
259
|
+
event.preventDefault();
|
|
260
|
+
event.stopPropagation();
|
|
261
|
+
setPointsRuleClosing(false);
|
|
262
|
+
setPointsRuleOpen(true);
|
|
263
|
+
};
|
|
264
|
+
const pointsRuleTrigger = data.pointsRuleImageUrl || data.pointsRuleContent ? /* @__PURE__ */ jsx3(
|
|
265
|
+
"button",
|
|
266
|
+
{
|
|
267
|
+
ref: pointsRuleTriggerRef,
|
|
268
|
+
type: "button",
|
|
269
|
+
className: labelsEmbedded ? `member-card-summary__rule-hotspot absolute left-[68.5%] top-[53%] z-2 h-[27%] w-[25%] cursor-pointer rounded-full border-0 bg-transparent p-0 text-transparent pointer-events-auto ${CONTROL_FOCUS_CLASS}` : dynamicFace ? `member-card-summary__rule-trigger absolute right-[7%] top-[8%] z-2 inline-flex min-h-[19px] cursor-pointer items-center gap-[2px] rounded-[9.5px] border border-[rgba(255,255,255,0.5)] bg-[rgba(255,255,255,0.84)] px-1.5 py-[2px] text-xs font-semibold leading-[13px] text-[#303443] [font-family:inherit] tracking-normal transition-colors duration-[180ms] pointer-events-auto hover:border-[rgba(255,255,255,0.78)] hover:bg-[rgba(255,255,255,0.96)] motion-reduce:transition-none ${CONTROL_FOCUS_CLASS}` : `member-card-summary__rule-trigger static z-auto ml-auto inline-flex min-h-[19px] cursor-pointer items-center gap-[2px] rounded-[9.5px] border border-[#ecdec2] bg-[color:var(--tbox-domain-member-surface,#fffdf8)] px-1.5 py-[2px] text-xs font-semibold leading-[13px] text-[#8c6a2f] [font-family:inherit] tracking-normal transition-colors duration-[180ms] hover:border-[rgba(255,255,255,0.78)] hover:bg-[rgba(255,255,255,0.96)] motion-reduce:transition-none ${CONTROL_FOCUS_CLASS}`,
|
|
270
|
+
"aria-label": "\u79EF\u5206\u89C4\u5219",
|
|
271
|
+
"aria-haspopup": "dialog",
|
|
272
|
+
onClick: openPointsRule,
|
|
273
|
+
children: labelsEmbedded ? null : /* @__PURE__ */ jsx3("span", { children: "\u79EF\u5206\u89C4\u5219" })
|
|
274
|
+
}
|
|
275
|
+
) : null;
|
|
276
|
+
const benefitButtonClass = `member-card-summary__benefit-button inline-flex w-full cursor-pointer flex-col items-center gap-[9px] border-0 bg-transparent p-0 text-inherit [font-family:inherit] tracking-normal disabled:cursor-not-allowed disabled:opacity-[0.55] ${CONTROL_FOCUS_CLASS}`;
|
|
277
|
+
const benefitIconClass = dynamicFace ? `member-card-summary__benefit-icon inline-flex size-7 items-center justify-center rounded-full border-0 text-white shadow-[0_2px_5px_rgba(71,117,190,0.16)] ${vc.iconBg}` : "member-card-summary__benefit-icon inline-flex size-6 items-center justify-center rounded-full border-0 bg-[#f3f3f3] text-[#8c6a2f] max-[480px]:size-[22px]";
|
|
278
|
+
const benefitImageClass = dynamicFace ? "size-full bg-transparent object-contain text-white [&.img-fallback]:size-[15px] [&_.member-card-summary__benefit-icon-fallback]:size-[15px] [&_.member-card-summary__benefit-icon-fallback]:text-white" : "size-[14px] bg-transparent object-contain text-[rgba(11,15,23,0.65)] max-[480px]:size-[13px]";
|
|
279
|
+
const benefitCopyClass = dynamicFace ? "member-card-summary__benefit-copy inline-flex flex-col items-center gap-[1.5px] text-xs leading-[1.4]" : "member-card-summary__benefit-copy";
|
|
280
|
+
const dotClass = dynamicFace ? vc.dot : "bg-[rgba(11,15,23,0.16)] data-[active=true]:bg-[#b45f06]";
|
|
281
|
+
const benefitDescClass = dynamicFace ? `member-card-summary__benefit-description rounded-[4px] px-[3.5px] py-[0.5px] text-xs font-medium leading-[1.4] whitespace-nowrap text-[#000] ${vc.tagBg}` : "member-card-summary__benefit-description";
|
|
282
|
+
return /* @__PURE__ */ jsxs2("section", { className: `member-card member-card-summary p-4 max-[480px]:p-[14px] ${dynamicFace ? vc.root : "bg-white px-3 pb-[14px] pt-3 text-foreground"}`, children: [
|
|
283
|
+
dynamicFace ? /* @__PURE__ */ jsxs2(
|
|
284
|
+
"div",
|
|
285
|
+
{
|
|
286
|
+
className: `member-card-summary__face member-card-summary__face--dynamic ${vc.faceHook}${labelsEmbedded ? " member-card-summary__face--embedded" : ""} relative -mt-[3.72%] aspect-[672/347] w-full overflow-hidden rounded-[9px] ${vc.faceColor} ${labelsEmbedded ? "bg-transparent" : "bg-[#f6ead4]"}`,
|
|
287
|
+
"aria-label": `${data.cardDisplay}\uFF0C\u53EF\u7528\u79EF\u5206 ${String(data.availablePoints)}`,
|
|
288
|
+
children: [
|
|
289
|
+
data.cardImageUrl ? /* @__PURE__ */ jsx3(
|
|
290
|
+
ImageWithFallback,
|
|
291
|
+
{
|
|
292
|
+
src: data.cardImageUrl,
|
|
293
|
+
alt: "",
|
|
294
|
+
className: `member-card-summary__background pointer-events-none absolute inset-0 size-full [&.img-fallback]:grid [&.img-fallback]:place-items-center ${labelsEmbedded ? "object-contain" : "object-cover"}`,
|
|
295
|
+
size: 96,
|
|
296
|
+
loading: "eager"
|
|
297
|
+
}
|
|
298
|
+
) : /* @__PURE__ */ jsx3("span", { className: `member-card-summary__background member-card-summary__background--fallback pointer-events-none absolute inset-0 size-full ${vc.faceFallbackBg}` }),
|
|
299
|
+
/* @__PURE__ */ jsxs2("div", { className: "member-card-summary__overlay absolute inset-0 z-1 pb-[7.5%] pl-[9%] pr-[9%] pt-[8.5%]", children: [
|
|
300
|
+
!labelsEmbedded && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
301
|
+
/* @__PURE__ */ jsx3("strong", { className: "member-card-summary__level block max-w-[62%] text-lg font-bold leading-[21px] [overflow-wrap:anywhere] max-[480px]:text-sm max-[480px]:leading-[17px]", children: data.cardDisplay }),
|
|
302
|
+
data.pointsUrl ? /* @__PURE__ */ jsxs2("button", { type: "button", className: `member-card-summary__points-label mt-[5.5%] block cursor-pointer text-xs font-medium leading-[15px] max-[480px]:leading-[13px] [font-family:inherit] tracking-normal ${CONTROL_FOCUS_CLASS}`, onClick: () => sendCardAction(cardId, { type: "openLink", url: data.pointsUrl }), children: [
|
|
303
|
+
"\u6211\u7684\u79EF\u5206 ",
|
|
304
|
+
/* @__PURE__ */ jsx3("span", { "aria-hidden": "true", children: ">" })
|
|
305
|
+
] }) : /* @__PURE__ */ jsxs2("span", { className: "member-card-summary__points-label mt-[5.5%] block text-xs font-medium leading-[15px] max-[480px]:leading-[13px]", children: [
|
|
306
|
+
"\u6211\u7684\u79EF\u5206 ",
|
|
307
|
+
/* @__PURE__ */ jsx3("span", { "aria-hidden": "true", children: ">" })
|
|
308
|
+
] })
|
|
309
|
+
] }),
|
|
310
|
+
/* @__PURE__ */ jsx3("b", { className: labelsEmbedded ? "member-card-summary__balance member-card-summary__balance--embedded absolute left-[9%] top-[61%] m-0 tabular-nums text-base font-bold leading-[17px] max-[480px]:leading-[19px]" : "member-card-summary__balance mt-px block tabular-nums text-2xl font-bold leading-[27px] max-[480px]:text-xl max-[480px]:leading-[23px]", children: String(data.availablePoints) }),
|
|
311
|
+
data.progress && /* @__PURE__ */ jsxs2("div", { className: `member-card-summary__progress absolute bottom-[8%] ${labelsEmbedded ? "inset-x-[9.2%]" : "inset-x-[9%]"}`, children: [
|
|
312
|
+
/* @__PURE__ */ jsx3("div", { className: `member-card-summary__progress-text w-full overflow-hidden whitespace-nowrap text-xs ${labelsEmbedded ? "leading-[13px]" : "leading-[14px] max-[480px]:leading-3"}${data.progress.message.length > 24 ? " member-card-summary__progress-text--scroll" : ""}`, children: /* @__PURE__ */ jsx3("span", { className: data.progress.message.length > 24 ? "block overflow-hidden text-ellipsis" : "inline-block", children: data.progress.message }) }),
|
|
313
|
+
/* @__PURE__ */ jsx3(
|
|
314
|
+
"div",
|
|
315
|
+
{
|
|
316
|
+
className: `member-card-summary__progress-track overflow-hidden rounded-[1.5px] ${labelsEmbedded ? "mt-1 h-px" : "mt-[5px] h-[1.5px]"} ${vc.trackBg}`,
|
|
317
|
+
role: "progressbar",
|
|
318
|
+
"aria-label": "\u4F1A\u5458\u7B49\u7EA7\u6D88\u8D39\u8FDB\u5EA6",
|
|
319
|
+
"aria-valuemin": 0,
|
|
320
|
+
"aria-valuemax": 100,
|
|
321
|
+
"aria-valuenow": Math.round(data.progress.percent),
|
|
322
|
+
children: /* @__PURE__ */ jsx3("span", { className: `block h-full rounded-[inherit] transition-[width] duration-[300ms] ${vc.fillBg}`, style: { width: `${data.progress.percent}%` } })
|
|
323
|
+
}
|
|
324
|
+
)
|
|
325
|
+
] }),
|
|
326
|
+
labelsEmbedded && data.pointsUrl && /* @__PURE__ */ jsx3(
|
|
327
|
+
"button",
|
|
328
|
+
{
|
|
329
|
+
type: "button",
|
|
330
|
+
className: `member-card-summary__points-hotspot absolute left-[8%] top-1/2 h-[14%] w-[42%] cursor-pointer border-0 bg-transparent p-0 ${CONTROL_FOCUS_CLASS}`,
|
|
331
|
+
"aria-label": "\u6253\u5F00\u6211\u7684\u79EF\u5206",
|
|
332
|
+
onClick: () => sendCardAction(cardId, { type: "openLink", url: data.pointsUrl })
|
|
333
|
+
}
|
|
334
|
+
),
|
|
335
|
+
pointsRuleTrigger
|
|
336
|
+
] })
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
) : data.cardImageUrl ? /* @__PURE__ */ jsx3(
|
|
340
|
+
ImageWithFallback,
|
|
341
|
+
{
|
|
342
|
+
src: data.cardImageUrl,
|
|
343
|
+
alt: data.cardDisplay,
|
|
344
|
+
className: "member-card-summary__face block h-auto aspect-[71/42] w-full rounded-[8px] bg-[#f6ead4] object-cover [&.img-fallback]:grid [&.img-fallback]:min-h-[110px] [&.img-fallback]:place-items-center",
|
|
345
|
+
size: 96,
|
|
346
|
+
loading: "eager"
|
|
347
|
+
}
|
|
348
|
+
) : /* @__PURE__ */ jsx3("div", { className: "member-card-summary__face member-card-summary__face--gradient flex aspect-[71/42] w-full flex-col items-center justify-center gap-1 rounded-[8px] bg-[image:linear-gradient(135deg,#ffcf5c_0%,#ff9f2e_100%)] text-white", children: /* @__PURE__ */ jsx3("strong", { className: "text-lg font-bold", children: data.cardDisplay }) }),
|
|
349
|
+
!dynamicFace && /* @__PURE__ */ jsxs2("div", { className: "member-card-summary__metric mt-[7px] flex items-baseline gap-1 px-px", children: [
|
|
350
|
+
/* @__PURE__ */ jsx3("b", { className: "member-card-summary__points-value text-2xl font-extrabold leading-[27px] tabular-nums text-[#b45f06] max-[480px]:text-xl", children: String(data.availablePoints) }),
|
|
351
|
+
/* @__PURE__ */ jsx3("span", { className: "member-card-summary__metric-label text-sm font-semibold leading-[18px] text-[#a3925f]", children: "\u79EF\u5206" }),
|
|
352
|
+
data.status !== "active" && /* @__PURE__ */ jsx3("em", { className: "member-card-summary__status ml-auto text-xs not-italic text-muted-foreground", children: data.status }),
|
|
353
|
+
pointsRuleTrigger
|
|
354
|
+
] }),
|
|
355
|
+
benefitPages.length > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
356
|
+
/* @__PURE__ */ jsx3(
|
|
357
|
+
"div",
|
|
358
|
+
{
|
|
359
|
+
className: `member-card-summary__benefit-pager grid snap-x snap-mandatory grid-flow-col auto-cols-[100%] overflow-x-auto [scrollbar-width:none] [-webkit-overflow-scrolling:touch] [&::-webkit-scrollbar]:hidden ${dynamicFace ? "mt-[17px]" : "mt-2.5"}`,
|
|
360
|
+
role: "group",
|
|
361
|
+
"aria-label": "\u5F53\u524D\u4F1A\u5458\u6743\u76CA",
|
|
362
|
+
onScroll: benefitPages.length > 1 ? onBenefitsScroll : void 0,
|
|
363
|
+
children: benefitPages.map((page) => /* @__PURE__ */ jsx3("ul", { className: `member-card-summary__benefits grid list-none grid-cols-4 p-0 [grid-auto-rows:1fr] snap-start max-[480px]:gap-x-[5px] ${dynamicFace ? "gap-x-[6px] gap-y-[11px]" : "gap-1"}`, children: page.map((benefit) => /* @__PURE__ */ jsx3("li", { className: `grid min-w-0 content-start justify-items-center text-center [overflow-wrap:anywhere] ${dynamicFace ? `gap-[4.5px] text-xs font-medium leading-3 ${vc.levelText}` : "gap-1 text-xs leading-[10px] text-[#6f6552] max-[480px]:leading-[9px]"}`, children: benefit.action?.kind === "miniapp" && benefit.action.url && isProviderMiniappUrl(benefit.action.url) ? /* @__PURE__ */ jsxs2(
|
|
364
|
+
"button",
|
|
365
|
+
{
|
|
366
|
+
type: "button",
|
|
367
|
+
className: benefitButtonClass,
|
|
368
|
+
"aria-label": `\u6253\u5F00${benefit.name}`,
|
|
369
|
+
onClick: () => sendCardAction(cardId, { type: "openLink", url: benefit.action.url }),
|
|
370
|
+
children: [
|
|
371
|
+
/* @__PURE__ */ jsx3("span", { className: benefitIconClass, children: /* @__PURE__ */ jsx3(
|
|
372
|
+
ImageWithFallback,
|
|
373
|
+
{
|
|
374
|
+
src: benefit.iconUrl,
|
|
375
|
+
alt: `${benefit.name}\u6743\u76CA\u56FE\u6807`,
|
|
376
|
+
className: benefitImageClass,
|
|
377
|
+
size: 48,
|
|
378
|
+
loading: "eager",
|
|
379
|
+
fallback: /* @__PURE__ */ jsx3(BenefitFallbackIcon, { name: benefit.name })
|
|
380
|
+
}
|
|
381
|
+
) }),
|
|
382
|
+
/* @__PURE__ */ jsxs2("span", { className: benefitCopyClass, children: [
|
|
383
|
+
/* @__PURE__ */ jsx3("span", { children: benefit.name }),
|
|
384
|
+
benefit.description && /* @__PURE__ */ jsx3("small", { className: benefitDescClass, children: benefit.description })
|
|
385
|
+
] })
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
) : benefit.action?.kind === "toast" ? /* @__PURE__ */ jsxs2("button", { type: "button", className: benefitButtonClass, onClick: () => sendCardAction(cardId, { type: "toast", content: benefit.action?.text ?? "\u656C\u8BF7\u671F\u5F85~" }), children: [
|
|
389
|
+
/* @__PURE__ */ jsx3("span", { className: benefitIconClass, children: /* @__PURE__ */ jsx3(ImageWithFallback, { src: benefit.iconUrl, alt: `${benefit.name}\u6743\u76CA\u56FE\u6807`, className: benefitImageClass, size: 48, loading: "eager", fallback: /* @__PURE__ */ jsx3(BenefitFallbackIcon, { name: benefit.name }) }) }),
|
|
390
|
+
/* @__PURE__ */ jsx3("span", { className: benefitCopyClass, children: /* @__PURE__ */ jsx3("span", { children: benefit.name }) })
|
|
391
|
+
] }) : benefit.action?.kind === "dialog" ? /* @__PURE__ */ jsxs2("button", { type: "button", className: benefitButtonClass, onClick: () => setBenefitAction({ name: benefit.action?.title ?? benefit.name, url: "", title: benefit.action?.title, text: benefit.action?.text }), children: [
|
|
392
|
+
/* @__PURE__ */ jsx3("span", { className: benefitIconClass, children: /* @__PURE__ */ jsx3(ImageWithFallback, { src: benefit.iconUrl, alt: `${benefit.name}\u6743\u76CA\u56FE\u6807`, className: benefitImageClass, size: 48, loading: "eager", fallback: /* @__PURE__ */ jsx3(BenefitFallbackIcon, { name: benefit.name }) }) }),
|
|
393
|
+
/* @__PURE__ */ jsx3("span", { className: benefitCopyClass, children: /* @__PURE__ */ jsx3("span", { children: benefit.name }) })
|
|
394
|
+
] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
395
|
+
/* @__PURE__ */ jsx3("span", { className: benefitIconClass, children: /* @__PURE__ */ jsx3(ImageWithFallback, { src: benefit.iconUrl, alt: `${benefit.name}\u6743\u76CA\u56FE\u6807`, className: benefitImageClass, size: 48, loading: "eager", fallback: /* @__PURE__ */ jsx3(BenefitFallbackIcon, { name: benefit.name }) }) }),
|
|
396
|
+
/* @__PURE__ */ jsxs2("span", { className: benefitCopyClass, children: [
|
|
397
|
+
/* @__PURE__ */ jsx3("span", { children: benefit.name }),
|
|
398
|
+
benefit.description && /* @__PURE__ */ jsx3("small", { className: benefitDescClass, children: benefit.description })
|
|
399
|
+
] })
|
|
400
|
+
] }) }, benefit.benefitRef)) }, page[0].benefitRef))
|
|
401
|
+
}
|
|
402
|
+
),
|
|
403
|
+
benefitPages.length > 1 && /* @__PURE__ */ jsx3("div", { className: "member-card-summary__benefit-dots mt-2 flex justify-center gap-[3px]", "aria-hidden": "true", children: benefitPages.map((page, index) => /* @__PURE__ */ jsx3("span", { className: `size-[3px] rounded-full transition-[width,background-color] duration-[160ms] data-[active=true]:w-[9px] ${dotClass}`, "data-active": index === benefitPage }, page[0].benefitRef)) })
|
|
404
|
+
] }),
|
|
405
|
+
/* @__PURE__ */ jsxs2("div", { className: dynamicFace ? `member-card-summary__preferences mt-[15px] rounded-none border-0 border-t border-solid bg-transparent px-2 pb-0 pt-[15px] shadow-none ${vc.divider}` : "member-card-summary__preferences mt-3 rounded-[8px] border-[0.5px] border-[rgba(11,15,23,0.12)] bg-white p-2 shadow-[0_1px_8px_rgba(106,119,137,0.08)] max-[480px]:p-[7px]", children: [
|
|
406
|
+
/* @__PURE__ */ jsxs2("strong", { className: dynamicFace ? `flex items-center gap-2 font-semibold text-base leading-5 ${vc.levelText} ${vc.svgColor} [&_svg]:shrink-0` : "flex items-center gap-[3px] text-xs font-bold leading-[8.5px] text-[rgba(11,15,23,0.88)] [&_svg]:shrink-0 [&_svg]:text-[#d7b76b]", children: [
|
|
407
|
+
/* @__PURE__ */ jsx3(Sparkle, { size: 15, weight: "fill", "aria-hidden": "true" }),
|
|
408
|
+
/* @__PURE__ */ jsx3("span", { children: "\u8BF4\u8BF4\u4F60\u7684\u504F\u597D" })
|
|
409
|
+
] }),
|
|
410
|
+
/* @__PURE__ */ jsx3("p", { className: `member-card-summary__preference-hint opacity-[0.82] ${dynamicFace ? `mt-[5px] text-xs leading-[17px] ${vc.levelText}` : "mt-[3px] text-xs leading-[15px] text-secondary-foreground"}`, children: "\u8BF7\u9009\u62E9\u4F60\u7684\u504F\u597D\uFF0C\u6216\u76F4\u63A5\u544A\u8BC9\u6211" }),
|
|
411
|
+
/* @__PURE__ */ jsx3("div", { className: dynamicFace ? "member-card-summary__preference-list mt-2.5 grid grid-cols-3 gap-[7px] overflow-visible pb-px" : "member-card-summary__preference-list mt-1.5 flex flex-nowrap gap-1 overflow-x-auto [scrollbar-width:none] [-webkit-overflow-scrolling:touch] [&::-webkit-scrollbar]:hidden", children: preferencePrompts.map((prompt) => /* @__PURE__ */ jsx3(
|
|
412
|
+
"button",
|
|
413
|
+
{
|
|
414
|
+
type: "button",
|
|
415
|
+
className: `inline-flex shrink-0 cursor-pointer items-center justify-center gap-px whitespace-nowrap [font-family:inherit] tracking-normal disabled:cursor-not-allowed disabled:opacity-50 ${CONTROL_FOCUS_CLASS} ${dynamicFace ? `min-h-[34px] w-full min-w-0 rounded-[17px] border border-solid px-[5.5px] py-[4.5px] text-sm font-semibold leading-[17px] transition-[background-color,border-color,transform] duration-[160ms] active:enabled:scale-[0.98] ${vc.prefButton}` : "min-h-4 rounded-[8px] border-0 bg-[#f3f3f3] px-[3px] py-[2.5px] text-xs leading-[9px] text-[rgba(11,15,23,0.72)]"}`,
|
|
416
|
+
disabled: isHistory || !cardId,
|
|
417
|
+
onClick: () => sendCardAction(cardId, {
|
|
418
|
+
type: "sendMessage",
|
|
419
|
+
value: prompt.query,
|
|
420
|
+
displayText: prompt.value,
|
|
421
|
+
visible: true
|
|
422
|
+
}),
|
|
423
|
+
children: /* @__PURE__ */ jsx3("span", { children: prompt.value })
|
|
424
|
+
},
|
|
425
|
+
prompt.value
|
|
426
|
+
)) })
|
|
427
|
+
] }),
|
|
428
|
+
pointsRuleOpen && (data.pointsRuleImageUrl || data.pointsRuleContent) && createPortal(
|
|
429
|
+
/* @__PURE__ */ jsx3(
|
|
430
|
+
"div",
|
|
431
|
+
{
|
|
432
|
+
className: `member-points-rule fixed inset-0 z-[1200] grid place-items-center bg-[rgba(11,15,23,0.56)] p-2 ${pointsRuleClosing ? "member-points-rule--closing animate-[member-points-rule-backdrop-out_160ms_ease-in_both] motion-reduce:animate-[member-points-rule-backdrop-out_1ms_ease-in_both]" : "animate-[member-points-rule-backdrop-in_180ms_ease-out_both] motion-reduce:animate-[member-points-rule-backdrop-in_1ms_ease-out_both]"}`,
|
|
433
|
+
role: "dialog",
|
|
434
|
+
"aria-modal": "true",
|
|
435
|
+
"aria-labelledby": "member-points-rule-title",
|
|
436
|
+
onAnimationEnd: (event) => {
|
|
437
|
+
if (pointsRuleClosing && event.target === event.currentTarget) finishClosePointsRule();
|
|
438
|
+
},
|
|
439
|
+
onMouseDown: (event) => {
|
|
440
|
+
if (event.target === event.currentTarget) closePointsRule();
|
|
441
|
+
},
|
|
442
|
+
children: /* @__PURE__ */ jsxs2("div", { className: `member-points-rule__panel flex h-[90vh] w-[min(92vw,720px)] supports-[height:100dvh]:h-[90dvh] flex-col overflow-hidden rounded-[8px] bg-card shadow-[0_8px_24px_rgba(11,15,23,0.2)] ${pointsRuleClosing ? "animate-[member-points-rule-panel-out_160ms_ease-in_both] motion-reduce:animate-[member-points-rule-panel-out_1ms_ease-in_both]" : "animate-[member-points-rule-panel-in_220ms_cubic-bezier(0.2,0.8,0.2,1)_both] motion-reduce:animate-[member-points-rule-panel-in_1ms_ease-out_both]"}`, children: [
|
|
443
|
+
/* @__PURE__ */ jsxs2("header", { className: "member-points-rule__header flex min-h-12 items-center border-b border-[#ecdec2] bg-card px-3 py-[9px]", children: [
|
|
444
|
+
/* @__PURE__ */ jsx3("strong", { id: "member-points-rule-title", className: "flex-1 text-base font-bold leading-5 text-foreground", children: "\u79EF\u5206\u89C4\u5219" }),
|
|
445
|
+
/* @__PURE__ */ jsx3(
|
|
446
|
+
"button",
|
|
447
|
+
{
|
|
448
|
+
ref: pointsRuleCloseRef,
|
|
449
|
+
type: "button",
|
|
450
|
+
className: "member-points-rule__close grid size-8 shrink-0 place-items-center rounded-full border-0 bg-[#fff8eb] p-0 text-foreground",
|
|
451
|
+
"aria-label": "\u5173\u95ED\u79EF\u5206\u89C4\u5219",
|
|
452
|
+
onClick: closePointsRule,
|
|
453
|
+
children: /* @__PURE__ */ jsx3(X, { size: 20, weight: "bold", "aria-hidden": "true" })
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
] }),
|
|
457
|
+
/* @__PURE__ */ jsx3("div", { className: "member-points-rule__body min-h-0 flex-1 overflow-y-auto overscroll-contain bg-[#f5f6f8] [-webkit-overflow-scrolling:touch]", children: data.pointsRuleImageUrl ? /* @__PURE__ */ jsx3(ImageWithFallback, { src: data.pointsRuleImageUrl, alt: "\u79EF\u5206\u89C4\u5219\u8BE6\u60C5", className: "member-points-rule__image block h-auto min-h-full w-full bg-white object-contain object-top [&.img-fallback]:place-items-center", size: 96, loading: "eager" }) : /* @__PURE__ */ jsx3("div", { className: "member-points-rule__content whitespace-pre-line bg-white px-[10px] pb-4 pt-3 text-xs leading-[1.75] text-[#333] [&_a]:text-[#1677ff] [&_a]:no-underline", children: renderBenefitText(data.pointsRuleContent ?? "") }) })
|
|
458
|
+
] })
|
|
459
|
+
}
|
|
460
|
+
),
|
|
461
|
+
document.body
|
|
462
|
+
),
|
|
463
|
+
benefitAction && createPortal(
|
|
464
|
+
/* @__PURE__ */ jsx3("div", { className: `member-miniapp-dialog fixed inset-0 z-[1000] flex items-end justify-center bg-[rgba(11,17,29,0.52)] ${benefitAction.closing ? "animate-[member-miniapp-dialog-backdrop-out_180ms_ease-in_both]" : "animate-[member-miniapp-dialog-backdrop-in_180ms_ease-out_both]"}`, role: "dialog", "aria-modal": "true", "aria-label": benefitAction.title ?? benefitAction.name, onMouseDown: (event) => {
|
|
465
|
+
if (event.target === event.currentTarget) closeBenefitAction();
|
|
466
|
+
}, children: /* @__PURE__ */ jsxs2("div", { className: `member-miniapp-dialog__panel ${benefitAction.url ? "member-miniapp-dialog__panel--miniapp h-[min(90vh,760px)]" : "member-miniapp-dialog__panel--text h-auto"}${benefitAction.closing ? " member-miniapp-dialog__panel--closing" : ""} flex max-h-[90vh] w-[min(100%,720px)] flex-col overflow-hidden rounded-t-[18px] bg-white [font-family:-apple-system,BlinkMacSystemFont,'PingFang_SC','Helvetica_Neue',sans-serif] ${benefitAction.closing ? "animate-[member-miniapp-dialog-panel-out_180ms_ease-in_both]" : "animate-[member-miniapp-dialog-panel-in_220ms_cubic-bezier(0.2,0.8,0.2,1)_both]"}`, children: [
|
|
467
|
+
/* @__PURE__ */ jsxs2("header", { className: "member-miniapp-dialog__header flex min-h-[52px] items-center justify-between border-b border-[#edf0f4] px-4 text-[#1e2733]", children: [
|
|
468
|
+
/* @__PURE__ */ jsx3("strong", { className: "text-xl font-semibold leading-[28px]", children: benefitAction.title ?? benefitAction.name }),
|
|
469
|
+
/* @__PURE__ */ jsx3("button", { type: "button", className: "border-0 bg-transparent p-2 text-[#697586]", "aria-label": "\u5173\u95ED", onClick: closeBenefitAction, children: /* @__PURE__ */ jsx3(X, { size: 20, weight: "bold", "aria-hidden": "true" }) })
|
|
470
|
+
] }),
|
|
471
|
+
benefitAction.url ? /* @__PURE__ */ jsx3("iframe", { className: "member-miniapp-dialog__frame w-full flex-1 border-0 bg-[#f6f7f9]", src: benefitAction.url, title: benefitAction.title ?? benefitAction.name }) : /* @__PURE__ */ jsx3("div", { className: "member-miniapp-dialog__text flex-1 overflow-auto whitespace-pre-line px-5 py-6 text-base leading-[1.7] text-[#333] [&_a]:text-[#1677ff] [&_a]:no-underline", children: renderBenefitText(benefitAction.text ?? "") }),
|
|
472
|
+
!benefitAction.url && /* @__PURE__ */ jsx3("button", { type: "button", className: "member-miniapp-dialog__confirm mx-5 mb-5 flex-none rounded-[24px] border-0 bg-[#bd9f63] p-3 text-base text-white [font-family:inherit]", onClick: closeBenefitAction, children: "\u6211\u77E5\u9053\u4E86" })
|
|
473
|
+
] }) }),
|
|
474
|
+
document.body
|
|
475
|
+
)
|
|
476
|
+
] });
|
|
477
|
+
}
|
|
478
|
+
var member_card_summary_default = markSelfRendering(MemberCardSummaryCard);
|
|
479
|
+
|
|
480
|
+
// src/client/cards/member-point-usage-list/index.tsx
|
|
481
|
+
import { ArrowDownRight, ArrowUpRight, Coins as Coins2 } from "@phosphor-icons/react";
|
|
482
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
483
|
+
var AMOUNT_TONE_CLASS = {
|
|
484
|
+
"member-pu__amount--spend": "member-pu__amount--spend text-[color:var(--tbox-domain-member-accent,#b45f06)]",
|
|
485
|
+
"member-pu__amount--income": "member-pu__amount--income text-success"
|
|
486
|
+
};
|
|
487
|
+
function MemberPointUsageListCard(props) {
|
|
488
|
+
const { data } = props;
|
|
489
|
+
return /* @__PURE__ */ jsxs3("section", { className: "member-card member-point-usage bg-[color:var(--tbox-domain-member-surface,#fffdf8)] p-4 text-foreground max-[480px]:p-[14px]", children: [
|
|
490
|
+
/* @__PURE__ */ jsxs3("header", { className: "member-pu__head flex items-center gap-[9px]", children: [
|
|
491
|
+
/* @__PURE__ */ jsx4("div", { className: "member-pu__head-icon grid size-[38px] shrink-0 place-items-center rounded-full bg-[#f9f1df] text-[#8c6a2f]", children: /* @__PURE__ */ jsx4(Coins2, { size: 22, weight: "duotone" }) }),
|
|
492
|
+
/* @__PURE__ */ jsxs3("div", { className: "grid min-w-0 gap-px", children: [
|
|
493
|
+
/* @__PURE__ */ jsx4("span", { className: "text-xs leading-[15px] text-secondary-foreground", children: "\u79EF\u5206\u8D26\u6237" }),
|
|
494
|
+
/* @__PURE__ */ jsx4("strong", { className: "text-base font-bold leading-5", children: "\u6211\u7684\u79EF\u5206" })
|
|
495
|
+
] }),
|
|
496
|
+
data.membershipLabel && /* @__PURE__ */ jsx4("em", { className: "ml-auto max-w-[110px] truncate rounded-full bg-[#fff6e0] px-[7px] py-[2.5px] text-xs not-italic leading-[15px] text-[color:var(--tbox-domain-member-accent,#b45f06)]", children: data.membershipLabel })
|
|
497
|
+
] }),
|
|
498
|
+
/* @__PURE__ */ jsxs3("div", { className: "member-pu__metric mt-[14px] flex items-baseline gap-1 px-px pb-[13px]", children: [
|
|
499
|
+
/* @__PURE__ */ jsx4("b", { className: "text-3xl leading-8 tabular-nums text-[#b45f06] [font-weight:750]", children: String(data.balance) }),
|
|
500
|
+
/* @__PURE__ */ jsx4("span", { className: "text-sm font-semibold leading-[18px] text-[#a3925f]", children: "\u79EF\u5206" })
|
|
501
|
+
] }),
|
|
502
|
+
/* @__PURE__ */ jsxs3("div", { className: "member-pu__section-title flex items-baseline justify-between gap-[10px] border-t border-[#ecdec2] pt-[11px]", children: [
|
|
503
|
+
/* @__PURE__ */ jsx4("strong", { className: "text-sm leading-[18px] [font-weight:650]", children: "\u6700\u8FD1\u79EF\u5206\u8BB0\u5F55" }),
|
|
504
|
+
/* @__PURE__ */ jsxs3("span", { className: "flex-none text-xs leading-[15px] text-muted-foreground", children: [
|
|
505
|
+
"\u5171 ",
|
|
506
|
+
data.total ?? data.items.length,
|
|
507
|
+
" \u6761"
|
|
508
|
+
] })
|
|
509
|
+
] }),
|
|
510
|
+
data.items.length > 0 ? /* @__PURE__ */ jsx4("ul", { className: "member-pu__list mt-[5px] list-none p-0", children: data.items.map((u) => {
|
|
511
|
+
const isSpend = u.amount.startsWith("-");
|
|
512
|
+
const Icon = isSpend ? ArrowUpRight : ArrowDownRight;
|
|
513
|
+
return /* @__PURE__ */ jsxs3("li", { className: "member-pu__row grid min-h-[41px] grid-cols-[26px_minmax(0,1fr)_auto] items-center gap-2 border-b border-[#ecdec2] py-2 last:border-b-0", children: [
|
|
514
|
+
/* @__PURE__ */ jsx4("span", { className: `member-pu__flow-icon ${isSpend ? "member-pu__flow-icon--spend bg-[#fff6e0] text-[color:var(--tbox-domain-member-accent,#b45f06)]" : "member-pu__flow-icon--income bg-success-soft text-success"} grid size-[26px] place-items-center rounded-full`, children: /* @__PURE__ */ jsx4(Icon, { size: 16, weight: "bold" }) }),
|
|
515
|
+
/* @__PURE__ */ jsxs3("span", { className: "member-pu__copy grid min-w-0 gap-[1.5px]", children: [
|
|
516
|
+
/* @__PURE__ */ jsx4("strong", { className: "truncate text-sm font-semibold leading-[18px]", children: u.title }),
|
|
517
|
+
u.usedAt && /* @__PURE__ */ jsx4("small", { className: "truncate text-xs leading-[15px] text-secondary-foreground", children: formatMemberDate(u.usedAt) })
|
|
518
|
+
] }),
|
|
519
|
+
/* @__PURE__ */ jsx4("b", { className: `${AMOUNT_TONE_CLASS[pointAmountClass(u.amount)]} text-sm font-semibold leading-[19px] tabular-nums`, children: u.amount })
|
|
520
|
+
] }, u.usageRecordRef);
|
|
521
|
+
}) }) : /* @__PURE__ */ jsx4("p", { className: "member-pu__empty pb-4 pt-5 text-center text-xs text-muted-foreground", children: "\u6682\u65E0\u79EF\u5206\u8BB0\u5F55" })
|
|
522
|
+
] });
|
|
523
|
+
}
|
|
524
|
+
var member_point_usage_list_default = MemberPointUsageListCard;
|
|
525
|
+
|
|
526
|
+
// src/client/cards/member-enrollment-form/index.tsx
|
|
527
|
+
import { useRef as useRef2, useState as useState3 } from "react";
|
|
528
|
+
import { Lock, ShieldCheck, UserPlus } from "@phosphor-icons/react";
|
|
529
|
+
import { sendCardAction as sendCardAction2, markSelfRendering as markSelfRendering2 } from "@tbox.cn/app-agent-sdk-client";
|
|
530
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
531
|
+
var AUTO_AUTH_ACTION = "member.request-alipay-authorization";
|
|
532
|
+
var AUTH_TONE_CLASS = {
|
|
533
|
+
authorized: "member-enrollment-form__auth--authorized bg-success-soft text-success",
|
|
534
|
+
required: "member-enrollment-form__auth--required bg-[#fff6e0] text-[color:var(--tbox-domain-member-accent,#b45f06)]",
|
|
535
|
+
unavailable: "member-enrollment-form__auth--unavailable bg-[#fff8eb] text-secondary-foreground"
|
|
536
|
+
};
|
|
537
|
+
function MemberEnrollmentFormCard(props) {
|
|
538
|
+
const { data, cardId, isHistory, actionTokens } = props;
|
|
539
|
+
const [values, setValues] = useState3(
|
|
540
|
+
() => Object.fromEntries(data.fields.map((f) => [f.fieldId, f.prefill ?? ""]))
|
|
541
|
+
);
|
|
542
|
+
const [consented, setConsented] = useState3({});
|
|
543
|
+
const [authRequesting, setAuthRequesting] = useState3(false);
|
|
544
|
+
const [submitAttempted, setSubmitAttempted] = useState3(false);
|
|
545
|
+
const [submitting, setSubmitting] = useState3(false);
|
|
546
|
+
const authRequestingRef = useRef2(false);
|
|
547
|
+
const submittingRef = useRef2(false);
|
|
548
|
+
const authToken = actionTokens?.[AUTO_AUTH_ACTION];
|
|
549
|
+
const enrollToken = actionTokens?.["member.enroll"];
|
|
550
|
+
const fireAuth = () => {
|
|
551
|
+
if (!authToken || isHistory || authRequestingRef.current) return;
|
|
552
|
+
authRequestingRef.current = true;
|
|
553
|
+
setAuthRequesting(true);
|
|
554
|
+
sendCardAction2(cardId, { type: "moduleAction", actionId: AUTO_AUTH_ACTION, contextToken: authToken });
|
|
555
|
+
};
|
|
556
|
+
if (data.state === "active") {
|
|
557
|
+
return /* @__PURE__ */ jsx5("section", { className: "member-card member-enrollment-form bg-[color:var(--tbox-domain-member-surface,#fffdf8)] p-4 text-foreground max-[480px]:p-[14px]", children: /* @__PURE__ */ jsxs4("div", { className: "member-enrollment-form__done flex items-center gap-[11px] py-2.5 text-success", children: [
|
|
558
|
+
/* @__PURE__ */ jsx5("span", { className: "member-enrollment-form__done-icon grid size-11 place-items-center rounded-full bg-success-soft", children: /* @__PURE__ */ jsx5(ShieldCheck, { size: 30, weight: "duotone" }) }),
|
|
559
|
+
/* @__PURE__ */ jsxs4("span", { className: "grid gap-0.5", children: [
|
|
560
|
+
/* @__PURE__ */ jsx5("small", { className: "text-xs leading-[15px] text-secondary-foreground", children: "\u4F1A\u5458\u72B6\u6001" }),
|
|
561
|
+
/* @__PURE__ */ jsx5("strong", { className: "text-base leading-5", children: "\u60A8\u5DF2\u662F\u4F1A\u5458" })
|
|
562
|
+
] })
|
|
563
|
+
] }) });
|
|
564
|
+
}
|
|
565
|
+
const missingFields = data.fields.filter((field) => field.required && !(values[field.fieldId] ?? "").trim());
|
|
566
|
+
const missingConsents = data.consents.filter((consent) => consent.required && !consented[consent.consentId]);
|
|
567
|
+
const submit = () => {
|
|
568
|
+
if (!enrollToken || isHistory || submittingRef.current) return;
|
|
569
|
+
setSubmitAttempted(true);
|
|
570
|
+
if (missingFields.length > 0 || missingConsents.length > 0) return;
|
|
571
|
+
submittingRef.current = true;
|
|
572
|
+
setSubmitting(true);
|
|
573
|
+
sendCardAction2(
|
|
574
|
+
cardId,
|
|
575
|
+
{ type: "moduleAction", actionId: "member.enroll", contextToken: enrollToken },
|
|
576
|
+
{
|
|
577
|
+
fieldValues: values,
|
|
578
|
+
acceptedConsentIds: data.consents.filter((c) => consented[c.consentId]).map((c) => c.consentId),
|
|
579
|
+
formVersion: data.formVersion
|
|
580
|
+
}
|
|
581
|
+
);
|
|
582
|
+
};
|
|
583
|
+
const authStatus = data.authorization.status;
|
|
584
|
+
return /* @__PURE__ */ jsxs4("section", { className: "member-card member-enrollment-form bg-[color:var(--tbox-domain-member-surface,#fffdf8)] p-4 text-foreground max-[480px]:p-[14px]", children: [
|
|
585
|
+
/* @__PURE__ */ jsxs4("header", { className: "member-enrollment-form__head flex items-center gap-[9px]", children: [
|
|
586
|
+
/* @__PURE__ */ jsx5("span", { className: "member-enrollment-form__head-icon grid size-[38px] place-items-center rounded-full bg-[#f9f1df] text-[#8c6a2f]", children: /* @__PURE__ */ jsx5(UserPlus, { size: 22, weight: "duotone" }) }),
|
|
587
|
+
/* @__PURE__ */ jsxs4("div", { className: "grid gap-px", children: [
|
|
588
|
+
/* @__PURE__ */ jsx5("span", { className: "text-xs leading-[15px] text-secondary-foreground", children: "\u4F1A\u5458" }),
|
|
589
|
+
/* @__PURE__ */ jsx5("strong", { className: "text-base font-bold leading-5", children: "\u5F00\u5361\u5165\u4F1A" })
|
|
590
|
+
] })
|
|
591
|
+
] }),
|
|
592
|
+
/* @__PURE__ */ jsx5("p", { className: "member-enrollment-form__subtitle mb-[13px] mt-[9px] text-xs leading-[17px] text-secondary-foreground", children: "\u5B8C\u5584\u57FA\u7840\u8D44\u6599\uFF0C\u5F00\u542F\u4F1A\u5458\u670D\u52A1" }),
|
|
593
|
+
/* @__PURE__ */ jsx5("div", { className: `member-enrollment-form__auth ${AUTH_TONE_CLASS[authStatus]} mb-3 flex items-center gap-1.5 rounded-[8px] px-2.5 py-2 text-xs leading-[18px]`, children: authStatus === "authorized" ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
594
|
+
/* @__PURE__ */ jsx5(ShieldCheck, { size: 16 }),
|
|
595
|
+
/* @__PURE__ */ jsxs4("span", { children: [
|
|
596
|
+
"\u5DF2\u901A\u8FC7\u652F\u4ED8\u5B9D\u6388\u6743\u9884\u586B\u624B\u673A\u53F7",
|
|
597
|
+
data.authorization.mobileMasked ? `\uFF08${data.authorization.mobileMasked}\uFF09` : ""
|
|
598
|
+
] })
|
|
599
|
+
] }) : authStatus === "required" ? /* @__PURE__ */ jsxs4(
|
|
600
|
+
"button",
|
|
601
|
+
{
|
|
602
|
+
type: "button",
|
|
603
|
+
className: "member-enrollment-form__auth-btn inline-flex min-h-12 w-full cursor-pointer items-center justify-center gap-1.5 rounded-[6px] border border-[rgba(180,95,6,0.35)] bg-transparent px-2.5 py-1.5 text-xs text-[color:var(--tbox-domain-member-accent,#b45f06)] [font-family:inherit] tracking-normal focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-[rgba(180,95,6,0.28)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
604
|
+
disabled: isHistory || !authToken || authRequesting,
|
|
605
|
+
onClick: fireAuth,
|
|
606
|
+
children: [
|
|
607
|
+
/* @__PURE__ */ jsx5(ShieldCheck, { size: 16 }),
|
|
608
|
+
authRequesting ? "\u6B63\u5728\u8BF7\u6C42\u652F\u4ED8\u5B9D\u6388\u6743\u2026" : "\u652F\u4ED8\u5B9D\u6388\u6743\u5E76\u586B\u5145"
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
) : /* @__PURE__ */ jsx5("span", { children: "\u652F\u4ED8\u5B9D\u6388\u6743\u4E0D\u53EF\u7528\uFF0C\u8BF7\u624B\u52A8\u586B\u5199" }) }),
|
|
612
|
+
data.manualNotice && /* @__PURE__ */ jsx5("p", { className: "member-enrollment-form__notice mb-2.5 text-xs leading-[18px] text-secondary-foreground", children: data.manualNotice }),
|
|
613
|
+
data.fields.map((f) => /* @__PURE__ */ jsxs4("div", { className: "member-ef-field relative mb-2.5", children: [
|
|
614
|
+
/* @__PURE__ */ jsxs4("label", { className: "member-ef-field__label mb-1 block text-xs text-secondary-foreground", children: [
|
|
615
|
+
f.label,
|
|
616
|
+
f.required && /* @__PURE__ */ jsx5("em", { className: "ml-[2px] not-italic text-[color:var(--tbox-domain-member-accent,#b45f06)]", children: "*" })
|
|
617
|
+
] }),
|
|
618
|
+
f.type === "select" ? /* @__PURE__ */ jsxs4(
|
|
619
|
+
"select",
|
|
620
|
+
{
|
|
621
|
+
className: "member-ef-field__control w-full appearance-none rounded-[6px] border border-[#ecdec2] bg-[color:var(--tbox-domain-member-surface,#fffdf8)] px-2.5 py-[9px] text-sm text-foreground [font-family:inherit] tracking-normal focus:border-[color:var(--tbox-domain-member-accent,#b45f06)] focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-[rgba(180,95,6,0.28)] read-only:bg-[#fff8eb] read-only:text-secondary-foreground",
|
|
622
|
+
value: values[f.fieldId] ?? "",
|
|
623
|
+
disabled: f.readOnly || isHistory,
|
|
624
|
+
onChange: (e) => setValues((v) => ({ ...v, [f.fieldId]: e.target.value })),
|
|
625
|
+
children: [
|
|
626
|
+
/* @__PURE__ */ jsx5("option", { value: "", children: "\u8BF7\u9009\u62E9" }),
|
|
627
|
+
(f.options ?? []).map((opt) => /* @__PURE__ */ jsx5("option", { value: opt, children: opt }, opt))
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
) : /* @__PURE__ */ jsx5(
|
|
631
|
+
"input",
|
|
632
|
+
{
|
|
633
|
+
className: "member-ef-field__control w-full appearance-none rounded-[6px] border border-[#ecdec2] bg-[color:var(--tbox-domain-member-surface,#fffdf8)] px-2.5 py-[9px] text-sm text-foreground [font-family:inherit] tracking-normal focus:border-[color:var(--tbox-domain-member-accent,#b45f06)] focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-[rgba(180,95,6,0.28)] read-only:bg-[#fff8eb] read-only:text-secondary-foreground",
|
|
634
|
+
type: f.type === "tel" ? "tel" : f.type === "date" ? "date" : "text",
|
|
635
|
+
value: values[f.fieldId] ?? "",
|
|
636
|
+
readOnly: f.readOnly || isHistory,
|
|
637
|
+
placeholder: f.placeholder ?? "",
|
|
638
|
+
onChange: (e) => setValues((v) => ({ ...v, [f.fieldId]: e.target.value }))
|
|
639
|
+
}
|
|
640
|
+
),
|
|
641
|
+
f.readOnly && /* @__PURE__ */ jsx5(Lock, { className: "member-ef-field__lock absolute right-2.5 top-[30px] text-secondary-foreground", size: 13, weight: "fill" }),
|
|
642
|
+
submitAttempted && f.required && !(values[f.fieldId] ?? "").trim() && /* @__PURE__ */ jsxs4("p", { className: "member-ef-field__error mt-[7px] text-xs leading-[18px] text-[#b42318]", role: "alert", children: [
|
|
643
|
+
"\u8BF7\u586B\u5199",
|
|
644
|
+
f.label
|
|
645
|
+
] })
|
|
646
|
+
] }, f.fieldId)),
|
|
647
|
+
/* @__PURE__ */ jsx5("div", { className: "member-ef-consents mb-3 grid gap-1.5", children: data.consents.map((c) => /* @__PURE__ */ jsxs4("label", { className: "member-ef-consents__item flex items-start gap-1.5 text-xs leading-[18px] text-secondary-foreground", children: [
|
|
648
|
+
/* @__PURE__ */ jsx5(
|
|
649
|
+
"input",
|
|
650
|
+
{
|
|
651
|
+
type: "checkbox",
|
|
652
|
+
className: "mt-[2px] size-[14px] flex-none accent-[#b45f06] [font-family:inherit] tracking-normal focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-[rgba(180,95,6,0.28)]",
|
|
653
|
+
checked: !!consented[c.consentId],
|
|
654
|
+
disabled: isHistory,
|
|
655
|
+
onChange: (e) => setConsented((s) => ({ ...s, [c.consentId]: e.target.checked }))
|
|
656
|
+
}
|
|
657
|
+
),
|
|
658
|
+
/* @__PURE__ */ jsxs4("span", { children: [
|
|
659
|
+
c.title,
|
|
660
|
+
c.required && /* @__PURE__ */ jsx5("em", { className: "not-italic text-[color:var(--tbox-domain-member-accent,#b45f06)]", children: "\uFF08\u5FC5\u9009\uFF09" })
|
|
661
|
+
] })
|
|
662
|
+
] }, c.consentId)) }),
|
|
663
|
+
submitAttempted && missingConsents.length > 0 && /* @__PURE__ */ jsxs4("p", { className: "member-ef-validation -mt-[10px] mb-4 rounded-[8px] bg-[#fff1f0] px-3 py-[10px] text-xs leading-[18px] text-[#b42318]", role: "alert", children: [
|
|
664
|
+
"\u8BF7\u5148\u540C\u610F\uFF1A",
|
|
665
|
+
missingConsents.map((consent) => consent.title).join("\u3001")
|
|
666
|
+
] }),
|
|
667
|
+
/* @__PURE__ */ jsx5(
|
|
668
|
+
"button",
|
|
669
|
+
{
|
|
670
|
+
type: "button",
|
|
671
|
+
className: "member-ef-submit h-[42px] w-full cursor-pointer rounded-[21px] border-0 bg-[image:linear-gradient(108deg,#ffb029_0%,#ff8c1a_100%)] text-sm font-semibold text-white shadow-[0_4px_9px_rgba(255,140,26,0.4)] [font-family:inherit] tracking-normal focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-[rgba(180,95,6,0.28)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
672
|
+
disabled: isHistory || !enrollToken || submitting,
|
|
673
|
+
onClick: submit,
|
|
674
|
+
children: submitting ? "\u6B63\u5728\u63D0\u4EA4\u2026" : "\u63D0\u4EA4\u5165\u4F1A"
|
|
675
|
+
}
|
|
676
|
+
)
|
|
677
|
+
] });
|
|
678
|
+
}
|
|
679
|
+
var member_enrollment_form_default = markSelfRendering2(MemberEnrollmentFormCard);
|
|
680
|
+
|
|
681
|
+
// src/client/cards/member-enrollment-status/index.tsx
|
|
682
|
+
import { useRef as useRef3, useState as useState4 } from "react";
|
|
683
|
+
import { ArrowClockwise, CheckCircle, Clock, WarningCircle } from "@phosphor-icons/react";
|
|
684
|
+
import { sendCardAction as sendCardAction3, markSelfRendering as markSelfRendering3 } from "@tbox.cn/app-agent-sdk-client";
|
|
685
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
686
|
+
var ICONS = { success: CheckCircle, warning: Clock, neutral: WarningCircle };
|
|
687
|
+
var STATE_HOOK_CLASS = {
|
|
688
|
+
active: "member-es--active",
|
|
689
|
+
pending_confirmation: "member-es--pending_confirmation",
|
|
690
|
+
confirmation_timeout: "member-es--confirmation_timeout",
|
|
691
|
+
failed: "member-es--failed"
|
|
692
|
+
};
|
|
693
|
+
var ICON_TONE_CLASS = {
|
|
694
|
+
success: "member-es__icon--success bg-success-soft text-success",
|
|
695
|
+
warning: "member-es__icon--warning bg-warning-soft text-warning",
|
|
696
|
+
neutral: "member-es__icon--neutral bg-[#fff8eb] text-secondary-foreground"
|
|
697
|
+
};
|
|
698
|
+
function MemberEnrollmentStatusCard(props) {
|
|
699
|
+
const { data, cardId, isHistory, actionTokens } = props;
|
|
700
|
+
const tone = enrollmentTone(data.state);
|
|
701
|
+
const Icon = ICONS[tone];
|
|
702
|
+
const refreshToken = actionTokens?.["member.query-enrollment-status"];
|
|
703
|
+
const [refreshing, setRefreshing] = useState4(false);
|
|
704
|
+
const refreshingRef = useRef3(false);
|
|
705
|
+
return /* @__PURE__ */ jsxs5("section", { className: `member-card member-es ${STATE_HOOK_CLASS[data.state]} flex flex-col items-center gap-[7px] bg-[color:var(--tbox-domain-member-surface,#fffdf8)] p-4 text-center text-foreground max-[480px]:p-[14px]`, children: [
|
|
706
|
+
/* @__PURE__ */ jsx6("span", { className: "member-es__eyebrow text-xs leading-[15px] text-secondary-foreground", children: "\u5165\u4F1A\u7533\u8BF7" }),
|
|
707
|
+
/* @__PURE__ */ jsx6("div", { className: `member-es__icon ${ICON_TONE_CLASS[tone]} grid size-12 place-items-center rounded-full`, children: /* @__PURE__ */ jsx6(Icon, { size: 30, weight: "duotone" }) }),
|
|
708
|
+
/* @__PURE__ */ jsx6("h4", { className: "text-base font-bold leading-[21px] text-foreground", children: enrollmentStateText(data.state) }),
|
|
709
|
+
data.message && /* @__PURE__ */ jsx6("p", { className: "member-es__message max-w-[270px] text-xs leading-[18px] text-secondary-foreground", children: data.message }),
|
|
710
|
+
data.state === "active" && /* @__PURE__ */ jsx6("p", { className: "member-es__support max-w-[270px] text-xs leading-[18px] text-muted-foreground", children: "\u4F1A\u5458\u72B6\u6001\u5DF2\u66F4\u65B0\uFF0C\u53EF\u7EE7\u7EED\u67E5\u8BE2\u4F1A\u5458\u5361\u6216\u79EF\u5206" }),
|
|
711
|
+
(data.state === "failed" || data.state === "confirmation_timeout") && /* @__PURE__ */ jsx6("p", { className: "member-es__support max-w-[270px] text-xs leading-[18px] text-muted-foreground", children: "\u672C\u6B21\u672A\u786E\u8BA4\u6210\u529F\uFF0C\u8BF7\u6839\u636E\u63D0\u793A\u91CD\u65B0\u53D1\u8D77\u6216\u7A0D\u540E\u518D\u8BD5" }),
|
|
712
|
+
data.state === "pending_confirmation" && data.attemptRef && /* @__PURE__ */ jsxs5(
|
|
713
|
+
"button",
|
|
714
|
+
{
|
|
715
|
+
type: "button",
|
|
716
|
+
className: "member-es__refresh mt-1.5 inline-flex cursor-pointer items-center justify-center gap-[5px] rounded-[6px] border border-[rgba(180,95,6,0.35)] bg-transparent px-6 py-2 text-sm text-[color:var(--tbox-domain-member-accent,#b45f06)] [font-family:inherit] tracking-normal focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-[rgba(180,95,6,0.28)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
717
|
+
disabled: isHistory || !refreshToken || refreshing,
|
|
718
|
+
onClick: () => {
|
|
719
|
+
if (!refreshToken || isHistory || refreshingRef.current) return;
|
|
720
|
+
refreshingRef.current = true;
|
|
721
|
+
setRefreshing(true);
|
|
722
|
+
sendCardAction3(
|
|
723
|
+
cardId,
|
|
724
|
+
{ type: "moduleAction", actionId: "member.query-enrollment-status", contextToken: refreshToken },
|
|
725
|
+
{ attemptRef: data.attemptRef }
|
|
726
|
+
);
|
|
727
|
+
},
|
|
728
|
+
children: [
|
|
729
|
+
/* @__PURE__ */ jsx6(ArrowClockwise, { size: 16, weight: "bold" }),
|
|
730
|
+
refreshing ? "\u6B63\u5728\u5237\u65B0\u2026" : "\u5237\u65B0\u72B6\u6001"
|
|
731
|
+
]
|
|
732
|
+
}
|
|
733
|
+
),
|
|
734
|
+
isHistory && data.state === "pending_confirmation" && /* @__PURE__ */ jsx6("p", { className: "member-es__support max-w-[270px] text-xs leading-[18px] text-muted-foreground", children: "\u5386\u53F2\u7533\u8BF7\u4E0D\u53EF\u5237\u65B0\uFF0C\u8BF7\u91CD\u65B0\u67E5\u8BE2\u5F53\u524D\u4F1A\u5458\u72B6\u6001" })
|
|
735
|
+
] });
|
|
736
|
+
}
|
|
737
|
+
var member_enrollment_status_default = markSelfRendering3(MemberEnrollmentStatusCard);
|
|
738
|
+
|
|
739
|
+
// src/client/cards/member-enrollment-cta/index.tsx
|
|
740
|
+
import { useRef as useRef4, useState as useState5 } from "react";
|
|
741
|
+
import { ArrowSquareOut, IdentificationCard, ShieldCheck as ShieldCheck2, WarningCircle as WarningCircle2 } from "@phosphor-icons/react";
|
|
742
|
+
import { sendCardAction as sendCardAction4 } from "@tbox.cn/app-agent-sdk-client";
|
|
743
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
744
|
+
function MemberEnrollmentCtaCard(props) {
|
|
745
|
+
const { data, cardId, isHistory } = props;
|
|
746
|
+
const [opening, setOpening] = useState5(false);
|
|
747
|
+
const openingRef = useRef4(false);
|
|
748
|
+
function handleEnroll() {
|
|
749
|
+
if (isHistory || openingRef.current || !data.enrollUrl) return;
|
|
750
|
+
openingRef.current = true;
|
|
751
|
+
setOpening(true);
|
|
752
|
+
sendCardAction4(cardId, { type: "openLink", url: data.enrollUrl });
|
|
753
|
+
}
|
|
754
|
+
return /* @__PURE__ */ jsxs6("section", { className: "member-card member-enroll-cta overflow-hidden bg-white p-0 text-foreground", children: [
|
|
755
|
+
/* @__PURE__ */ jsxs6("div", { className: "member-enroll-cta__hero relative flex min-h-[180px] flex-col items-start overflow-hidden bg-[image:linear-gradient(145deg,#3c2a18_0%,#765225_54%,#b7802e_100%)] px-6 pb-[26px] pt-7 text-[#fff7e8] after:absolute after:-bottom-[74px] after:-right-[52px] after:size-[190px] after:rounded-full after:box-border after:border after:border-[rgba(255,236,190,0.26)] after:content-['']", children: [
|
|
756
|
+
/* @__PURE__ */ jsx7("span", { className: "member-enroll-cta__icon grid size-12 shrink-0 place-items-center rounded-[15px] border border-[rgba(255,247,232,0.34)] bg-[rgba(255,247,232,0.14)]", "aria-hidden": "true", children: /* @__PURE__ */ jsx7(IdentificationCard, { size: 28, weight: "duotone" }) }),
|
|
757
|
+
/* @__PURE__ */ jsx7("span", { className: "member-enroll-cta__eyebrow mt-[18px] text-xs leading-[18px] tracking-[1.5px]", children: "\u4F1A\u5458\u670D\u52A1" }),
|
|
758
|
+
/* @__PURE__ */ jsx7("h4", { className: "mt-[3px] text-2xl leading-[34px] [font-weight:760]", children: data.title ?? "\u5F00\u5361\u5165\u4F1A" }),
|
|
759
|
+
/* @__PURE__ */ jsx7("p", { className: "mt-[7px] max-w-[270px] text-sm leading-5 text-[rgba(255,247,232,0.82)]", children: "\u524D\u5F80\u652F\u4ED8\u5B9D\u4F1A\u5458\u9875\u9762\u5B8C\u6210\u5F00\u5361\uFF0C\u7ED3\u679C\u4EE5\u9875\u9762\u4E3A\u51C6" })
|
|
760
|
+
] }),
|
|
761
|
+
/* @__PURE__ */ jsxs6("div", { className: "member-enroll-cta__footer flex flex-col gap-3 px-5 pb-5 pt-[18px]", children: [
|
|
762
|
+
/* @__PURE__ */ jsxs6("p", { className: "member-enroll-cta__hint flex items-center justify-center gap-[7px] text-xs leading-[18px] text-secondary-foreground", children: [
|
|
763
|
+
/* @__PURE__ */ jsx7(ShieldCheck2, { size: 16, weight: "fill", "aria-hidden": "true" }),
|
|
764
|
+
"\u767B\u5F55\u72B6\u6001\u4E0D\u53D7\u5165\u4F1A\u7ED3\u679C\u5F71\u54CD\uFF0C\u5F00\u5361\u7ED3\u679C\u4EE5\u652F\u4ED8\u5B9D\u4F1A\u5458\u9875\u9762\u4E3A\u51C6"
|
|
765
|
+
] }),
|
|
766
|
+
/* @__PURE__ */ jsxs6(
|
|
767
|
+
"button",
|
|
768
|
+
{
|
|
769
|
+
type: "button",
|
|
770
|
+
className: "member-enroll-cta__btn flex min-h-12 w-full cursor-pointer items-center justify-center gap-2 rounded-[24px] border-0 bg-[image:linear-gradient(108deg,#ffb029_0%,#ff8c1a_100%)] px-[18px] py-3 text-base font-bold text-white shadow-[0_8px_18px_rgba(255,140,26,0.32)] [font-family:inherit] tracking-normal [transition:opacity_150ms_ease,transform_100ms_ease] active:enabled:scale-[0.98] active:enabled:opacity-[0.88] focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-[rgba(180,95,6,0.28)] disabled:cursor-not-allowed disabled:bg-[#d0cdc8] disabled:text-[rgba(255,255,255,0.76)] disabled:opacity-50 disabled:shadow-none",
|
|
771
|
+
disabled: isHistory || opening || !data.enrollUrl,
|
|
772
|
+
onClick: handleEnroll,
|
|
773
|
+
"aria-label": data.enrollUrl ? "\u7ACB\u5373\u5F00\u5361\u5165\u4F1A" : "\u5165\u4F1A\u6682\u4E0D\u53EF\u7528\uFF08\u8BF7\u8054\u7CFB\u5546\u573A\u5BA2\u670D\uFF09",
|
|
774
|
+
children: [
|
|
775
|
+
opening ? "\u6B63\u5728\u6253\u5F00\u652F\u4ED8\u5B9D\u2026" : data.enrollUrl ? "\u7ACB\u5373\u5F00\u5361\u5165\u4F1A" : "\u6682\u4E0D\u53EF\u7528\uFF08\u8BF7\u8054\u7CFB\u5546\u573A\u5BA2\u670D\uFF09",
|
|
776
|
+
data.enrollUrl ? /* @__PURE__ */ jsx7(ArrowSquareOut, { size: 18, weight: "bold", "aria-hidden": "true" }) : /* @__PURE__ */ jsx7(WarningCircle2, { size: 18, weight: "fill", "aria-hidden": "true" })
|
|
777
|
+
]
|
|
778
|
+
}
|
|
779
|
+
),
|
|
780
|
+
isHistory && /* @__PURE__ */ jsx7("p", { className: "member-enroll-cta__history text-center text-xs leading-[17px] text-muted-foreground", children: "\u5386\u53F2\u5361\u7247\u4E0D\u53EF\u91CD\u590D\u64CD\u4F5C" })
|
|
781
|
+
] })
|
|
782
|
+
] });
|
|
783
|
+
}
|
|
784
|
+
var member_enrollment_cta_default = MemberEnrollmentCtaCard;
|
|
785
|
+
|
|
786
|
+
// src/client/cards/member-login-cta/index.tsx
|
|
787
|
+
import { useRef as useRef5, useState as useState6 } from "react";
|
|
788
|
+
import { ArrowSquareOut as ArrowSquareOut2, WarningCircle as WarningCircle3 } from "@phosphor-icons/react";
|
|
789
|
+
import { sendCardAction as sendCardAction5 } from "@tbox.cn/app-agent-sdk-client";
|
|
790
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
791
|
+
function MemberLoginCtaCard(props) {
|
|
792
|
+
const { data, cardId, isHistory } = props;
|
|
793
|
+
const [opening, setOpening] = useState6(false);
|
|
794
|
+
const openingRef = useRef5(false);
|
|
795
|
+
function handleLogin() {
|
|
796
|
+
if (isHistory || openingRef.current || !data.loginUrl) return;
|
|
797
|
+
openingRef.current = true;
|
|
798
|
+
setOpening(true);
|
|
799
|
+
sendCardAction5(cardId, { type: "openLink", url: data.loginUrl });
|
|
800
|
+
}
|
|
801
|
+
return /* @__PURE__ */ jsxs7("section", { className: "member-card member-login-cta overflow-hidden bg-white p-0 text-foreground", children: [
|
|
802
|
+
/* @__PURE__ */ jsxs7("div", { className: "member-login-cta__stage relative h-[170px] overflow-hidden bg-[#f9f0df]", children: [
|
|
803
|
+
/* @__PURE__ */ jsx8("span", { className: "member-login-cta__sky absolute inset-x-0 top-0 h-[62px] bg-[image:linear-gradient(180deg,#d9edfa_0%,rgba(217,237,250,0.55)_58%,rgba(249,240,223,0)_100%)]", "aria-hidden": "true" }),
|
|
804
|
+
/* @__PURE__ */ jsxs7("svg", { className: "member-login-cta__doodle pointer-events-none absolute inset-0 z-1 size-full fill-none stroke-[#d3452f] stroke-[2.1] opacity-60 [stroke-linecap:round] [stroke-linejoin:round]", viewBox: "0 0 390 170", "aria-hidden": "true", children: [
|
|
805
|
+
/* @__PURE__ */ jsx8("path", { d: "M50 40 l5,11 12,2 -9,9 3,12 -11,-6 -11,6 3,-12 -9,-9 12,-2 Z" }),
|
|
806
|
+
/* @__PURE__ */ jsx8("path", { d: "M318 56 c10,-12 23,-11 29,-1 c6,10 -3,20 -12,17" }),
|
|
807
|
+
/* @__PURE__ */ jsx8("path", { d: "M40 122 c12,-8 20,2 11,9" })
|
|
808
|
+
] }),
|
|
809
|
+
/* @__PURE__ */ jsx8("span", { className: "member-login-cta__ground absolute bottom-[10px] left-1/2 h-7 w-[168px] -translate-x-1/2 bg-[image:radial-gradient(50%_50%_at_50%_50%,rgba(140,120,78,0.24)_0%,rgba(140,120,78,0)_72%)]", "aria-hidden": "true" }),
|
|
810
|
+
/* @__PURE__ */ jsx8("span", { className: "member-login-cta__mascot absolute bottom-1 left-1/2 z-2 aspect-[200/194] w-[132px] -translate-x-1/2 bg-[image:var(--tbox-asset-member-mascot,linear-gradient(135deg,#fff8eb,#fffdf8))] bg-contain bg-bottom bg-no-repeat [-webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,0)_0%,#000_22%,#000_100%)] [mask-image:linear-gradient(180deg,rgba(0,0,0,0)_0%,#000_22%,#000_100%)]", "aria-hidden": "true" }),
|
|
811
|
+
/* @__PURE__ */ jsx8("span", { className: "member-login-cta__grain pointer-events-none absolute inset-0 z-3 bg-[image:repeating-linear-gradient(107deg,rgba(180,158,118,0.06)_0_2px,transparent_2px_5px)]", "aria-hidden": "true" })
|
|
812
|
+
] }),
|
|
813
|
+
/* @__PURE__ */ jsx8("svg", { className: "member-login-cta__tear relative -mt-4 block h-4 w-full fill-white", viewBox: "0 0 390 16", preserveAspectRatio: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx8("path", { d: "M0,16 L390,16 L390,6 L358,10 L330,4 L298,11 L266,5 L236,12 L204,6 L174,12 L144,6 L112,13 L82,7 L52,14 L24,8 L0,12 Z" }) }),
|
|
814
|
+
/* @__PURE__ */ jsxs7("div", { className: "member-login-cta__body flex flex-col px-[22px] pb-5 pt-[2px] text-center", children: [
|
|
815
|
+
/* @__PURE__ */ jsx8("h4", { className: "text-2xl font-extrabold leading-[30px] tracking-[0.5px] text-[#2f3a22]", children: data.title ?? "\u767B\u5F55\u540E\u7EE7\u7EED" }),
|
|
816
|
+
/* @__PURE__ */ jsx8("p", { className: "member-login-cta__reason mt-2 text-sm leading-5 text-[#6d7560]", children: "\u767B\u5F55\u540E\u53EF\u89E3\u9501\u5168\u90E8\u529F\u80FD" }),
|
|
817
|
+
/* @__PURE__ */ jsxs7(
|
|
818
|
+
"button",
|
|
819
|
+
{
|
|
820
|
+
type: "button",
|
|
821
|
+
className: "member-login-cta__btn mt-[18px] flex min-h-12 w-full cursor-pointer items-center justify-center gap-2 rounded-[24px] border-0 bg-[image:linear-gradient(168deg,#a9cc6e_0%,#7ba63f_100%)] px-[18px] py-3 text-base font-extrabold tracking-[0.5px] text-white shadow-[0_5px_0_#5f8730,0_10px_18px_rgba(107,146,55,0.28)] [font-family:inherit] [transition:opacity_150ms_ease,transform_100ms_ease] active:enabled:translate-y-[3px] active:enabled:opacity-90 active:enabled:shadow-[0_2px_0_#5f8730,0_6px_12px_rgba(107,146,55,0.24)] focus-visible:outline-3 focus-visible:outline-offset-3 focus-visible:outline-[rgba(180,95,6,0.28)] disabled:cursor-not-allowed disabled:bg-[#c9ced6] disabled:text-[rgba(255,255,255,0.76)] disabled:opacity-50 disabled:shadow-none",
|
|
822
|
+
disabled: isHistory || opening || !data.loginUrl,
|
|
823
|
+
onClick: handleLogin,
|
|
824
|
+
"aria-label": data.loginUrl ? "\u524D\u5F80\u767B\u5F55" : "\u767B\u5F55\u6682\u4E0D\u53EF\u7528\uFF08\u8BF7\u8054\u7CFB\u5546\u573A\u5BA2\u670D\uFF09",
|
|
825
|
+
children: [
|
|
826
|
+
opening ? "\u6B63\u5728\u6253\u5F00\u5546\u573A\u5C0F\u7A0B\u5E8F\u2026" : data.loginUrl ? "\u7ACB\u5373\u767B\u5F55" : "\u6682\u4E0D\u53EF\u7528\uFF08\u8BF7\u8054\u7CFB\u5546\u573A\u5BA2\u670D\uFF09",
|
|
827
|
+
data.loginUrl ? /* @__PURE__ */ jsx8(ArrowSquareOut2, { size: 18, weight: "bold", "aria-hidden": "true" }) : /* @__PURE__ */ jsx8(WarningCircle3, { size: 18, weight: "fill", "aria-hidden": "true" })
|
|
828
|
+
]
|
|
829
|
+
}
|
|
830
|
+
),
|
|
831
|
+
/* @__PURE__ */ jsx8("p", { className: "member-login-cta__hint mt-3 text-xs leading-[18px] text-secondary-foreground", children: "\u767B\u5F55\u5728\u5546\u573A\u5C0F\u7A0B\u5E8F\u5185\u5B8C\u6210\uFF0C\u5B8C\u6210\u540E\u56DE\u5230\u8FD9\u91CC\u7EE7\u7EED" }),
|
|
832
|
+
isHistory && /* @__PURE__ */ jsx8("p", { className: "member-login-cta__history mt-1.5 text-xs leading-[17px] text-muted-foreground", children: "\u5386\u53F2\u5361\u7247\u4E0D\u53EF\u91CD\u590D\u64CD\u4F5C" })
|
|
833
|
+
] })
|
|
834
|
+
] });
|
|
835
|
+
}
|
|
836
|
+
var member_login_cta_default = MemberLoginCtaCard;
|
|
837
|
+
|
|
838
|
+
// src/client/index.ts
|
|
839
|
+
var cards = {
|
|
840
|
+
"member-info": member_info_default,
|
|
841
|
+
"member-card-summary": member_card_summary_default,
|
|
842
|
+
"member-point-usage-list": member_point_usage_list_default,
|
|
843
|
+
"member-enrollment-form": member_enrollment_form_default,
|
|
844
|
+
"member-enrollment-status": member_enrollment_status_default,
|
|
845
|
+
"member-enrollment-cta": member_enrollment_cta_default,
|
|
846
|
+
"member-login-cta": member_login_cta_default
|
|
847
|
+
};
|
|
848
|
+
var clientModule = {
|
|
849
|
+
cards,
|
|
850
|
+
register(ctx) {
|
|
851
|
+
ctx.cards.registerMap(cards);
|
|
852
|
+
}
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
export {
|
|
856
|
+
clientModule
|
|
857
|
+
};
|