pxengine 0.1.81 → 0.1.83
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/index.cjs +1186 -840
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -1
- package/dist/index.d.ts +62 -1
- package/dist/index.mjs +1170 -825
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +107 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/render/PXEngineRenderer.tsx
|
|
8
|
-
import
|
|
8
|
+
import React116 from "react";
|
|
9
9
|
|
|
10
10
|
// src/atoms/index.ts
|
|
11
11
|
var atoms_exports = {};
|
|
@@ -33628,6 +33628,7 @@ __export(molecules_exports, {
|
|
|
33628
33628
|
PriorityActionsCard: () => PriorityActionsCard,
|
|
33629
33629
|
RecommendationCard: () => RecommendationCard,
|
|
33630
33630
|
ResearchBriefCard: () => ResearchBriefCard,
|
|
33631
|
+
ResearchReportJobCard: () => ResearchReportJobCard,
|
|
33631
33632
|
RiskSignalCard: () => RiskSignalCard,
|
|
33632
33633
|
ScoreBreakdownCard: () => ScoreBreakdownCard,
|
|
33633
33634
|
SearchSpecCard: () => SearchSpecCard,
|
|
@@ -39130,11 +39131,354 @@ var PresentationJobCard = ({
|
|
|
39130
39131
|
] });
|
|
39131
39132
|
};
|
|
39132
39133
|
|
|
39134
|
+
// src/molecules/generic/ResearchReportJobCard/ResearchReportJobCard.tsx
|
|
39135
|
+
import { useCallback as useCallback5, useEffect as useEffect7, useRef as useRef6, useState as useState11 } from "react";
|
|
39136
|
+
import { Fragment as Fragment6, jsx as jsx148, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
39137
|
+
var DEFAULT_THEME = {
|
|
39138
|
+
primary: "#8b5cf6",
|
|
39139
|
+
secondary: "#a78bfa",
|
|
39140
|
+
accent: "#c4b5fd"
|
|
39141
|
+
};
|
|
39142
|
+
var DownloadIcon2 = () => /* @__PURE__ */ jsxs109("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39143
|
+
/* @__PURE__ */ jsx148("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
39144
|
+
/* @__PURE__ */ jsx148("polyline", { points: "7 10 12 15 17 10" }),
|
|
39145
|
+
/* @__PURE__ */ jsx148("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
39146
|
+
] });
|
|
39147
|
+
var DocumentIcon = () => /* @__PURE__ */ jsxs109("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39148
|
+
/* @__PURE__ */ jsx148("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
39149
|
+
/* @__PURE__ */ jsx148("polyline", { points: "14 2 14 8 20 8" }),
|
|
39150
|
+
/* @__PURE__ */ jsx148("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
|
|
39151
|
+
/* @__PURE__ */ jsx148("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
|
|
39152
|
+
/* @__PURE__ */ jsx148("line", { x1: "10", y1: "9", x2: "8", y2: "9" })
|
|
39153
|
+
] });
|
|
39154
|
+
var CloseIcon2 = () => /* @__PURE__ */ jsxs109("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39155
|
+
/* @__PURE__ */ jsx148("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
39156
|
+
/* @__PURE__ */ jsx148("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
39157
|
+
] });
|
|
39158
|
+
var ExpandIcon2 = () => /* @__PURE__ */ jsxs109("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39159
|
+
/* @__PURE__ */ jsx148("polyline", { points: "15 3 21 3 21 9" }),
|
|
39160
|
+
/* @__PURE__ */ jsx148("polyline", { points: "9 21 3 21 3 15" }),
|
|
39161
|
+
/* @__PURE__ */ jsx148("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
|
|
39162
|
+
/* @__PURE__ */ jsx148("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
|
|
39163
|
+
] });
|
|
39164
|
+
var FullscreenPreviewModal = ({ url, title, onClose }) => {
|
|
39165
|
+
useEffect7(() => {
|
|
39166
|
+
const onKey = (e) => {
|
|
39167
|
+
if (e.key === "Escape") onClose();
|
|
39168
|
+
};
|
|
39169
|
+
document.addEventListener("keydown", onKey);
|
|
39170
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
39171
|
+
}, [onClose]);
|
|
39172
|
+
useEffect7(() => {
|
|
39173
|
+
document.body.style.overflow = "hidden";
|
|
39174
|
+
return () => {
|
|
39175
|
+
document.body.style.overflow = "";
|
|
39176
|
+
};
|
|
39177
|
+
}, []);
|
|
39178
|
+
return /* @__PURE__ */ jsxs109("div", { className: "fixed inset-0 z-50 bg-black flex flex-col", children: [
|
|
39179
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex items-center justify-between gap-4 px-4 h-11 bg-zinc-950/90 border-b border-zinc-800/60 flex-shrink-0", children: [
|
|
39180
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
39181
|
+
/* @__PURE__ */ jsx148("span", { className: "text-violet-400 flex-shrink-0", children: /* @__PURE__ */ jsx148(DocumentIcon, {}) }),
|
|
39182
|
+
/* @__PURE__ */ jsx148("span", { className: "text-sm font-medium text-zinc-300 truncate", children: title })
|
|
39183
|
+
] }),
|
|
39184
|
+
/* @__PURE__ */ jsxs109(
|
|
39185
|
+
"button",
|
|
39186
|
+
{
|
|
39187
|
+
onClick: onClose,
|
|
39188
|
+
className: "flex items-center gap-1.5 px-3 h-7 rounded-lg border border-zinc-700 bg-zinc-800 hover:border-zinc-500 text-zinc-400 hover:text-zinc-200 text-xs transition-colors",
|
|
39189
|
+
children: [
|
|
39190
|
+
/* @__PURE__ */ jsx148(CloseIcon2, {}),
|
|
39191
|
+
/* @__PURE__ */ jsx148("span", { children: "ESC" })
|
|
39192
|
+
]
|
|
39193
|
+
}
|
|
39194
|
+
)
|
|
39195
|
+
] }),
|
|
39196
|
+
/* @__PURE__ */ jsx148("div", { className: "flex-1 relative bg-white overflow-auto", children: /* @__PURE__ */ jsx148(
|
|
39197
|
+
"iframe",
|
|
39198
|
+
{
|
|
39199
|
+
src: url,
|
|
39200
|
+
title,
|
|
39201
|
+
className: "absolute inset-0 w-full h-full border-0",
|
|
39202
|
+
sandbox: "allow-same-origin"
|
|
39203
|
+
}
|
|
39204
|
+
) })
|
|
39205
|
+
] });
|
|
39206
|
+
};
|
|
39207
|
+
var ResearchReportJobCard = ({
|
|
39208
|
+
job_id: _job_id,
|
|
39209
|
+
title: initialTitle,
|
|
39210
|
+
status: initialStatus,
|
|
39211
|
+
topic: _initialTopic,
|
|
39212
|
+
depth: initialDepth,
|
|
39213
|
+
section_count: initialSectionCount,
|
|
39214
|
+
source_count: initialSourceCount,
|
|
39215
|
+
word_count: initialWordCount,
|
|
39216
|
+
executive_summary: initialSummary,
|
|
39217
|
+
key_findings: _initialFindings,
|
|
39218
|
+
html_url: initialHtmlUrl,
|
|
39219
|
+
theme: initialTheme,
|
|
39220
|
+
error: initialError,
|
|
39221
|
+
pollUrl,
|
|
39222
|
+
authToken,
|
|
39223
|
+
className,
|
|
39224
|
+
onComplete,
|
|
39225
|
+
onFailed
|
|
39226
|
+
}) => {
|
|
39227
|
+
const [status, setStatus] = useState11(initialStatus);
|
|
39228
|
+
const [title, setTitle] = useState11(initialTitle);
|
|
39229
|
+
const [depth, setDepth] = useState11(initialDepth || "");
|
|
39230
|
+
const [sectionCount, setSectionCount] = useState11(initialSectionCount ?? 0);
|
|
39231
|
+
const [sourceCount, setSourceCount] = useState11(initialSourceCount ?? 0);
|
|
39232
|
+
const [wordCount, setWordCount] = useState11(initialWordCount ?? 0);
|
|
39233
|
+
const [summary, setSummary] = useState11(initialSummary || "");
|
|
39234
|
+
const [htmlUrl, setHtmlUrl] = useState11(initialHtmlUrl || "");
|
|
39235
|
+
const [theme, setTheme] = useState11(initialTheme || DEFAULT_THEME);
|
|
39236
|
+
const [error, setError] = useState11(initialError);
|
|
39237
|
+
const [showPreview, setShowPreview] = useState11(false);
|
|
39238
|
+
const [previewScale, setPreviewScale] = useState11(1);
|
|
39239
|
+
const previewRef = useRef6(null);
|
|
39240
|
+
const intervalRef = useRef6(null);
|
|
39241
|
+
const onCompleteRef = useRef6(onComplete);
|
|
39242
|
+
const onFailedRef = useRef6(onFailed);
|
|
39243
|
+
const hasNotifiedRef = useRef6(false);
|
|
39244
|
+
onCompleteRef.current = onComplete;
|
|
39245
|
+
onFailedRef.current = onFailed;
|
|
39246
|
+
const isTerminal = status === "complete" || status === "failed";
|
|
39247
|
+
const primaryColor = theme?.primary || DEFAULT_THEME.primary;
|
|
39248
|
+
const hasHTML = Boolean(htmlUrl);
|
|
39249
|
+
const updateScale = useCallback5(() => {
|
|
39250
|
+
if (previewRef.current) {
|
|
39251
|
+
setPreviewScale(previewRef.current.offsetWidth / 800);
|
|
39252
|
+
}
|
|
39253
|
+
}, []);
|
|
39254
|
+
useEffect7(() => {
|
|
39255
|
+
updateScale();
|
|
39256
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
39257
|
+
const ro = new ResizeObserver(updateScale);
|
|
39258
|
+
if (previewRef.current) ro.observe(previewRef.current);
|
|
39259
|
+
return () => ro.disconnect();
|
|
39260
|
+
}, [updateScale, htmlUrl]);
|
|
39261
|
+
useEffect7(() => {
|
|
39262
|
+
if (isTerminal || !pollUrl) return;
|
|
39263
|
+
const poll = async () => {
|
|
39264
|
+
try {
|
|
39265
|
+
const headers = {};
|
|
39266
|
+
if (authToken) {
|
|
39267
|
+
headers["Authorization"] = `Bearer ${authToken}`;
|
|
39268
|
+
}
|
|
39269
|
+
const res = await fetch(pollUrl, { headers });
|
|
39270
|
+
if (!res.ok) return;
|
|
39271
|
+
const data = await res.json();
|
|
39272
|
+
const newStatus = data.status;
|
|
39273
|
+
setStatus(newStatus);
|
|
39274
|
+
if (newStatus === "complete" && data.output) {
|
|
39275
|
+
const output = data.output;
|
|
39276
|
+
setTitle(output.title || initialTitle);
|
|
39277
|
+
setDepth(output.depth || "");
|
|
39278
|
+
setSectionCount(output.section_count || 0);
|
|
39279
|
+
setSourceCount(output.source_count || 0);
|
|
39280
|
+
setWordCount(output.word_count || 0);
|
|
39281
|
+
setSummary(output.executive_summary || "");
|
|
39282
|
+
setHtmlUrl(output.html_url || "");
|
|
39283
|
+
if (output.theme) {
|
|
39284
|
+
setTheme(output.theme);
|
|
39285
|
+
}
|
|
39286
|
+
if (!hasNotifiedRef.current && onCompleteRef.current) {
|
|
39287
|
+
hasNotifiedRef.current = true;
|
|
39288
|
+
onCompleteRef.current(output);
|
|
39289
|
+
}
|
|
39290
|
+
}
|
|
39291
|
+
if (newStatus === "failed") {
|
|
39292
|
+
const errorMsg = data.error || "Job failed";
|
|
39293
|
+
setError(errorMsg);
|
|
39294
|
+
if (!hasNotifiedRef.current && onFailedRef.current) {
|
|
39295
|
+
hasNotifiedRef.current = true;
|
|
39296
|
+
onFailedRef.current(errorMsg);
|
|
39297
|
+
}
|
|
39298
|
+
}
|
|
39299
|
+
} catch {
|
|
39300
|
+
}
|
|
39301
|
+
};
|
|
39302
|
+
poll();
|
|
39303
|
+
intervalRef.current = setInterval(poll, 3e3);
|
|
39304
|
+
return () => {
|
|
39305
|
+
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
39306
|
+
};
|
|
39307
|
+
}, [isTerminal, pollUrl, authToken, initialTitle]);
|
|
39308
|
+
useEffect7(() => {
|
|
39309
|
+
if (isTerminal && intervalRef.current) {
|
|
39310
|
+
clearInterval(intervalRef.current);
|
|
39311
|
+
intervalRef.current = null;
|
|
39312
|
+
}
|
|
39313
|
+
}, [isTerminal]);
|
|
39314
|
+
const formatWordCount = (count) => {
|
|
39315
|
+
if (count >= 1e3) return `${(count / 1e3).toFixed(1)}k`;
|
|
39316
|
+
return count.toString();
|
|
39317
|
+
};
|
|
39318
|
+
if (status === "pending" || status === "running") {
|
|
39319
|
+
return /* @__PURE__ */ jsx148("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs109("div", { className: "relative overflow-hidden rounded-xl border border-zinc-200/70 dark:border-zinc-800/70 bg-zinc-100 dark:bg-zinc-900 aspect-[4/3]", children: [
|
|
39320
|
+
/* @__PURE__ */ jsxs109("div", { className: "absolute inset-0 p-[8%] flex flex-col", children: [
|
|
39321
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[14px] w-[55%] rounded bg-zinc-300 dark:bg-zinc-700 animate-pulse mb-4" }),
|
|
39322
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[10px] w-[35%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse mb-6", style: { animationDelay: "80ms" } }),
|
|
39323
|
+
/* @__PURE__ */ jsxs109("div", { className: "space-y-2.5 flex-1", children: [
|
|
39324
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[8px] w-[90%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "160ms" } }),
|
|
39325
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[8px] w-[85%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "240ms" } }),
|
|
39326
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[8px] w-[75%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "320ms" } }),
|
|
39327
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[8px] w-[80%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "400ms" } }),
|
|
39328
|
+
/* @__PURE__ */ jsx148("div", { className: "h-[8px] w-[60%] rounded bg-zinc-200 dark:bg-zinc-800 animate-pulse", style: { animationDelay: "480ms" } })
|
|
39329
|
+
] })
|
|
39330
|
+
] }),
|
|
39331
|
+
/* @__PURE__ */ jsx148("div", { className: "absolute inset-0 -translate-x-full animate-[shimmer_2s_ease-in-out_infinite] bg-gradient-to-r from-transparent via-white/10 to-transparent" })
|
|
39332
|
+
] }) });
|
|
39333
|
+
}
|
|
39334
|
+
if (status === "failed") {
|
|
39335
|
+
return /* @__PURE__ */ jsx148("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx148("div", { className: "bg-red-950/20 border border-red-800/25 rounded-2xl p-5", children: /* @__PURE__ */ jsxs109("div", { className: "flex items-start gap-3", children: [
|
|
39336
|
+
/* @__PURE__ */ jsx148("span", { className: "text-red-400 text-base mt-0.5 flex-shrink-0", children: "\u26A0" }),
|
|
39337
|
+
/* @__PURE__ */ jsxs109("div", { children: [
|
|
39338
|
+
/* @__PURE__ */ jsx148("p", { className: "text-sm font-semibold text-red-300", children: "Research report generation failed" }),
|
|
39339
|
+
/* @__PURE__ */ jsx148("p", { className: "text-xs text-red-400/60 mt-1 leading-relaxed", children: error || "An unexpected error occurred. Please try again." })
|
|
39340
|
+
] })
|
|
39341
|
+
] }) }) });
|
|
39342
|
+
}
|
|
39343
|
+
const handleDownload = async () => {
|
|
39344
|
+
if (!htmlUrl) return;
|
|
39345
|
+
const filename = `${title.replace(/[^a-z0-9]/gi, "-").toLowerCase()}.html`;
|
|
39346
|
+
const href = `/api/download?url=${encodeURIComponent(htmlUrl)}&filename=${encodeURIComponent(filename)}`;
|
|
39347
|
+
try {
|
|
39348
|
+
const response = await fetch(href);
|
|
39349
|
+
if (!response.ok) throw new Error(`status ${response.status}`);
|
|
39350
|
+
const blob = await response.blob();
|
|
39351
|
+
const objectUrl = window.URL.createObjectURL(blob);
|
|
39352
|
+
const anchor = document.createElement("a");
|
|
39353
|
+
anchor.href = objectUrl;
|
|
39354
|
+
anchor.download = filename;
|
|
39355
|
+
document.body.appendChild(anchor);
|
|
39356
|
+
anchor.click();
|
|
39357
|
+
anchor.remove();
|
|
39358
|
+
window.URL.revokeObjectURL(objectUrl);
|
|
39359
|
+
} catch {
|
|
39360
|
+
window.open(htmlUrl, "_blank", "noopener,noreferrer");
|
|
39361
|
+
}
|
|
39362
|
+
};
|
|
39363
|
+
return /* @__PURE__ */ jsxs109(Fragment6, { children: [
|
|
39364
|
+
/* @__PURE__ */ jsx148("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs109("div", { className: "bg-zinc-900 border border-zinc-800 rounded-2xl overflow-hidden", children: [
|
|
39365
|
+
/* @__PURE__ */ jsx148(
|
|
39366
|
+
"div",
|
|
39367
|
+
{
|
|
39368
|
+
className: "h-[3px]",
|
|
39369
|
+
style: {
|
|
39370
|
+
background: `linear-gradient(90deg, ${primaryColor}, ${theme?.secondary || "#a78bfa"}, ${theme?.accent || "#c4b5fd"})`
|
|
39371
|
+
}
|
|
39372
|
+
}
|
|
39373
|
+
),
|
|
39374
|
+
/* @__PURE__ */ jsxs109("div", { className: "p-5", children: [
|
|
39375
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex items-start gap-3", children: [
|
|
39376
|
+
/* @__PURE__ */ jsx148(
|
|
39377
|
+
"div",
|
|
39378
|
+
{
|
|
39379
|
+
className: "w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",
|
|
39380
|
+
style: {
|
|
39381
|
+
backgroundColor: `${primaryColor}15`,
|
|
39382
|
+
borderColor: `${primaryColor}30`,
|
|
39383
|
+
borderWidth: 1,
|
|
39384
|
+
color: primaryColor
|
|
39385
|
+
},
|
|
39386
|
+
children: /* @__PURE__ */ jsx148(DocumentIcon, {})
|
|
39387
|
+
}
|
|
39388
|
+
),
|
|
39389
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex-1 min-w-0", children: [
|
|
39390
|
+
/* @__PURE__ */ jsx148("h3", { className: "text-sm font-semibold text-zinc-100 truncate leading-tight", children: title }),
|
|
39391
|
+
/* @__PURE__ */ jsxs109("p", { className: "text-xs text-zinc-500 mt-0.5", children: [
|
|
39392
|
+
depth && /* @__PURE__ */ jsx148("span", { className: "capitalize", children: depth }),
|
|
39393
|
+
depth && sectionCount > 0 && " \xB7 ",
|
|
39394
|
+
sectionCount > 0 && `${sectionCount} sections`,
|
|
39395
|
+
sourceCount > 0 && ` \xB7 ${sourceCount} sources`,
|
|
39396
|
+
wordCount > 0 && ` \xB7 ${formatWordCount(wordCount)} words`
|
|
39397
|
+
] })
|
|
39398
|
+
] }),
|
|
39399
|
+
/* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-1.5 flex-shrink-0", children: [
|
|
39400
|
+
/* @__PURE__ */ jsxs109(
|
|
39401
|
+
"button",
|
|
39402
|
+
{
|
|
39403
|
+
onClick: () => setShowPreview(true),
|
|
39404
|
+
disabled: !hasHTML,
|
|
39405
|
+
title: "Preview report",
|
|
39406
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 rounded-lg border border-zinc-700 bg-zinc-800 hover:border-zinc-500 text-zinc-400 hover:text-zinc-200 text-xs font-medium transition-colors disabled:opacity-30 disabled:cursor-not-allowed",
|
|
39407
|
+
children: [
|
|
39408
|
+
/* @__PURE__ */ jsx148(ExpandIcon2, {}),
|
|
39409
|
+
/* @__PURE__ */ jsx148("span", { children: "Preview" })
|
|
39410
|
+
]
|
|
39411
|
+
}
|
|
39412
|
+
),
|
|
39413
|
+
/* @__PURE__ */ jsxs109(
|
|
39414
|
+
"button",
|
|
39415
|
+
{
|
|
39416
|
+
onClick: handleDownload,
|
|
39417
|
+
disabled: !hasHTML,
|
|
39418
|
+
className: "flex items-center gap-1.5 px-2.5 h-7 text-white text-xs font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
39419
|
+
style: { backgroundColor: primaryColor },
|
|
39420
|
+
onMouseEnter: (e) => e.currentTarget.style.filter = "brightness(1.15)",
|
|
39421
|
+
onMouseLeave: (e) => e.currentTarget.style.filter = "brightness(1)",
|
|
39422
|
+
children: [
|
|
39423
|
+
/* @__PURE__ */ jsx148(DownloadIcon2, {}),
|
|
39424
|
+
/* @__PURE__ */ jsx148("span", { children: "Download" })
|
|
39425
|
+
]
|
|
39426
|
+
}
|
|
39427
|
+
)
|
|
39428
|
+
] })
|
|
39429
|
+
] }),
|
|
39430
|
+
hasHTML && /* @__PURE__ */ jsx148("div", { className: "mt-4", children: /* @__PURE__ */ jsxs109(
|
|
39431
|
+
"div",
|
|
39432
|
+
{
|
|
39433
|
+
ref: previewRef,
|
|
39434
|
+
onClick: () => setShowPreview(true),
|
|
39435
|
+
className: "group relative overflow-hidden rounded-xl bg-white border border-zinc-800/50 cursor-pointer",
|
|
39436
|
+
style: { height: Math.round(previewScale * 400) },
|
|
39437
|
+
title: "Click to open fullscreen",
|
|
39438
|
+
children: [
|
|
39439
|
+
/* @__PURE__ */ jsx148(
|
|
39440
|
+
"iframe",
|
|
39441
|
+
{
|
|
39442
|
+
src: htmlUrl,
|
|
39443
|
+
title,
|
|
39444
|
+
sandbox: "allow-same-origin",
|
|
39445
|
+
style: {
|
|
39446
|
+
width: 800,
|
|
39447
|
+
height: 400,
|
|
39448
|
+
transform: `scale(${previewScale})`,
|
|
39449
|
+
transformOrigin: "top left",
|
|
39450
|
+
border: "none",
|
|
39451
|
+
pointerEvents: "none",
|
|
39452
|
+
display: "block"
|
|
39453
|
+
}
|
|
39454
|
+
}
|
|
39455
|
+
),
|
|
39456
|
+
/* @__PURE__ */ jsx148("div", { className: "absolute inset-0 flex items-center justify-center bg-black/0 group-hover:bg-black/30 transition-colors", children: /* @__PURE__ */ jsxs109("span", { className: "opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-2 bg-zinc-900/80 backdrop-blur-sm border border-zinc-700 rounded-lg px-3 py-1.5 text-xs text-zinc-200 font-medium", children: [
|
|
39457
|
+
/* @__PURE__ */ jsx148(ExpandIcon2, {}),
|
|
39458
|
+
"Open fullscreen"
|
|
39459
|
+
] }) })
|
|
39460
|
+
]
|
|
39461
|
+
}
|
|
39462
|
+
) }),
|
|
39463
|
+
!hasHTML && summary && /* @__PURE__ */ jsx148("div", { className: "mt-4 pt-4 border-t border-zinc-800/60", children: /* @__PURE__ */ jsx148("p", { className: "text-sm text-zinc-400 leading-relaxed line-clamp-3", children: summary }) })
|
|
39464
|
+
] })
|
|
39465
|
+
] }) }),
|
|
39466
|
+
showPreview && hasHTML && /* @__PURE__ */ jsx148(
|
|
39467
|
+
FullscreenPreviewModal,
|
|
39468
|
+
{
|
|
39469
|
+
url: htmlUrl,
|
|
39470
|
+
title,
|
|
39471
|
+
onClose: () => setShowPreview(false)
|
|
39472
|
+
}
|
|
39473
|
+
)
|
|
39474
|
+
] });
|
|
39475
|
+
};
|
|
39476
|
+
|
|
39133
39477
|
// src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
|
|
39134
|
-
import
|
|
39478
|
+
import React108, { useMemo as useMemo6 } from "react";
|
|
39135
39479
|
|
|
39136
39480
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
39137
|
-
import { useState as
|
|
39481
|
+
import { useState as useState12, useRef as useRef7, useEffect as useEffect8, useMemo as useMemo5 } from "react";
|
|
39138
39482
|
|
|
39139
39483
|
// src/lib/countries.ts
|
|
39140
39484
|
var countries = [
|
|
@@ -39341,15 +39685,15 @@ var countriesWithFlags = Object.fromEntries(
|
|
|
39341
39685
|
);
|
|
39342
39686
|
|
|
39343
39687
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
39344
|
-
import { jsx as
|
|
39688
|
+
import { jsx as jsx149, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
39345
39689
|
var CountrySelectEdit = ({
|
|
39346
39690
|
value,
|
|
39347
39691
|
onChange
|
|
39348
39692
|
}) => {
|
|
39349
|
-
const [isDropdownOpen, setIsDropdownOpen] =
|
|
39350
|
-
const [searchTerm, setSearchTerm] =
|
|
39351
|
-
const dropdownRef =
|
|
39352
|
-
|
|
39693
|
+
const [isDropdownOpen, setIsDropdownOpen] = useState12(false);
|
|
39694
|
+
const [searchTerm, setSearchTerm] = useState12("");
|
|
39695
|
+
const dropdownRef = useRef7(null);
|
|
39696
|
+
useEffect8(() => {
|
|
39353
39697
|
const handleClickOutside = (event) => {
|
|
39354
39698
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
39355
39699
|
setIsDropdownOpen(false);
|
|
@@ -39368,16 +39712,16 @@ var CountrySelectEdit = ({
|
|
|
39368
39712
|
}
|
|
39369
39713
|
return [];
|
|
39370
39714
|
}, [value]);
|
|
39371
|
-
return /* @__PURE__ */
|
|
39372
|
-
/* @__PURE__ */
|
|
39373
|
-
/* @__PURE__ */
|
|
39715
|
+
return /* @__PURE__ */ jsxs110("div", { className: "space-y-3", children: [
|
|
39716
|
+
/* @__PURE__ */ jsxs110("div", { className: "relative", ref: dropdownRef, children: [
|
|
39717
|
+
/* @__PURE__ */ jsxs110(
|
|
39374
39718
|
"div",
|
|
39375
39719
|
{
|
|
39376
39720
|
className: "flex-1 bg-background border border-border rounded-md px-3 py-2 text-sm cursor-pointer flex items-center justify-between font-medium hover:border-purple500 transition-colors",
|
|
39377
39721
|
onClick: () => setIsDropdownOpen(!isDropdownOpen),
|
|
39378
39722
|
children: [
|
|
39379
|
-
/* @__PURE__ */
|
|
39380
|
-
/* @__PURE__ */
|
|
39723
|
+
/* @__PURE__ */ jsx149("span", { className: "text-foreground", children: inputValue.length > 0 ? `${inputValue.length} ${inputValue.length === 1 ? "country" : "countries"} selected` : "Select countries..." }),
|
|
39724
|
+
/* @__PURE__ */ jsx149(
|
|
39381
39725
|
ChevronDown,
|
|
39382
39726
|
{
|
|
39383
39727
|
className: cn(
|
|
@@ -39389,8 +39733,8 @@ var CountrySelectEdit = ({
|
|
|
39389
39733
|
]
|
|
39390
39734
|
}
|
|
39391
39735
|
),
|
|
39392
|
-
isDropdownOpen && /* @__PURE__ */
|
|
39393
|
-
/* @__PURE__ */
|
|
39736
|
+
isDropdownOpen && /* @__PURE__ */ jsxs110("div", { className: "relative z-10 top-full left-0 right-0 mt-1 bg-background border border-border rounded-lg shadow-xl z-50 max-h-60 overflow-hidden animate-in fade-in slide-in-from-top-1", children: [
|
|
39737
|
+
/* @__PURE__ */ jsx149("div", { className: "p-2 border-b border-border", children: /* @__PURE__ */ jsx149(
|
|
39394
39738
|
"input",
|
|
39395
39739
|
{
|
|
39396
39740
|
type: "text",
|
|
@@ -39401,9 +39745,9 @@ var CountrySelectEdit = ({
|
|
|
39401
39745
|
onClick: (e) => e.stopPropagation()
|
|
39402
39746
|
}
|
|
39403
39747
|
) }),
|
|
39404
|
-
/* @__PURE__ */
|
|
39748
|
+
/* @__PURE__ */ jsx149("div", { className: "max-h-40 overflow-y-auto p-1", children: countries.filter(
|
|
39405
39749
|
(country) => country.name.toLowerCase().includes(searchTerm.toLowerCase()) || country.code.toLowerCase().includes(searchTerm.toLowerCase())
|
|
39406
|
-
).map((country) => /* @__PURE__ */
|
|
39750
|
+
).map((country) => /* @__PURE__ */ jsxs110(
|
|
39407
39751
|
"div",
|
|
39408
39752
|
{
|
|
39409
39753
|
className: cn(
|
|
@@ -39424,30 +39768,30 @@ var CountrySelectEdit = ({
|
|
|
39424
39768
|
}
|
|
39425
39769
|
},
|
|
39426
39770
|
children: [
|
|
39427
|
-
/* @__PURE__ */
|
|
39428
|
-
/* @__PURE__ */
|
|
39429
|
-
/* @__PURE__ */
|
|
39771
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex items-center gap-2", children: [
|
|
39772
|
+
/* @__PURE__ */ jsx149("span", { className: "text-sm text-foreground", children: country.name }),
|
|
39773
|
+
/* @__PURE__ */ jsx149("span", { className: "text-xs text-muted-foreground font-mono", children: country.code })
|
|
39430
39774
|
] }),
|
|
39431
|
-
inputValue.includes(country.code) && /* @__PURE__ */
|
|
39775
|
+
inputValue.includes(country.code) && /* @__PURE__ */ jsx149(Check, { className: "h-4 w-4 text-purple500" })
|
|
39432
39776
|
]
|
|
39433
39777
|
},
|
|
39434
39778
|
country.code
|
|
39435
39779
|
)) })
|
|
39436
39780
|
] })
|
|
39437
39781
|
] }),
|
|
39438
|
-
inputValue.length > 0 && /* @__PURE__ */
|
|
39782
|
+
inputValue.length > 0 && /* @__PURE__ */ jsx149("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ jsxs110(
|
|
39439
39783
|
Badge2,
|
|
39440
39784
|
{
|
|
39441
39785
|
className: "flex items-center gap-1 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium",
|
|
39442
39786
|
children: [
|
|
39443
39787
|
countryCode,
|
|
39444
|
-
/* @__PURE__ */
|
|
39788
|
+
/* @__PURE__ */ jsxs110(
|
|
39445
39789
|
"button",
|
|
39446
39790
|
{
|
|
39447
39791
|
onClick: () => onChange(inputValue.filter((c) => c !== countryCode)),
|
|
39448
39792
|
className: "hover:bg-purple200 rounded-full p-0.5 transition-colors",
|
|
39449
39793
|
children: [
|
|
39450
|
-
/* @__PURE__ */
|
|
39794
|
+
/* @__PURE__ */ jsx149(X, { className: "h-3 w-3" }),
|
|
39451
39795
|
" "
|
|
39452
39796
|
]
|
|
39453
39797
|
}
|
|
@@ -39465,13 +39809,13 @@ var CountrySelectDisplay = ({ value }) => {
|
|
|
39465
39809
|
return [];
|
|
39466
39810
|
}, [value]);
|
|
39467
39811
|
if (displayValues.length === 0) {
|
|
39468
|
-
return /* @__PURE__ */
|
|
39812
|
+
return /* @__PURE__ */ jsx149("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
|
|
39469
39813
|
}
|
|
39470
|
-
return /* @__PURE__ */
|
|
39814
|
+
return /* @__PURE__ */ jsx149("div", { className: "flex flex-wrap gap-2 pt-1", children: displayValues.map((item) => {
|
|
39471
39815
|
const country = countries.find(
|
|
39472
39816
|
(c) => c.code.toLowerCase() === item.toLowerCase() || c.name.toLowerCase() === item.toLowerCase()
|
|
39473
39817
|
);
|
|
39474
|
-
return /* @__PURE__ */
|
|
39818
|
+
return /* @__PURE__ */ jsx149(
|
|
39475
39819
|
"div",
|
|
39476
39820
|
{
|
|
39477
39821
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
|
|
@@ -39505,22 +39849,22 @@ var KeywordBundlesEdit = ({
|
|
|
39505
39849
|
});
|
|
39506
39850
|
});
|
|
39507
39851
|
const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
|
|
39508
|
-
return /* @__PURE__ */
|
|
39509
|
-
/* @__PURE__ */
|
|
39510
|
-
/* @__PURE__ */
|
|
39852
|
+
return /* @__PURE__ */ jsx149("div", { className: "space-y-6 pt-2", children: sortedPriorities.map((priority) => /* @__PURE__ */ jsxs110("div", { className: "space-y-3", children: [
|
|
39853
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex items-center gap-2", children: [
|
|
39854
|
+
/* @__PURE__ */ jsxs110("div", { className: "inline-block px-3 py-1 bg-purple200 hover:bg-purple200 text-purpleText text-sm font-medium rounded-md uppercase", children: [
|
|
39511
39855
|
"Priority ",
|
|
39512
39856
|
priority
|
|
39513
39857
|
] }),
|
|
39514
|
-
/* @__PURE__ */
|
|
39858
|
+
/* @__PURE__ */ jsx149("div", { className: "h-px flex-1 bg-white/10" })
|
|
39515
39859
|
] }),
|
|
39516
|
-
groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */
|
|
39860
|
+
groups[priority].map(({ bundle, index: bundleIndex }) => /* @__PURE__ */ jsx149(
|
|
39517
39861
|
"div",
|
|
39518
39862
|
{
|
|
39519
39863
|
className: "bg-gray-50/50 border border-gray-100 rounded-xl p-4 transition-all hover:bg-gray-50 hover:border-gray-200 shadow-sm",
|
|
39520
|
-
children: /* @__PURE__ */
|
|
39521
|
-
/* @__PURE__ */
|
|
39522
|
-
/* @__PURE__ */
|
|
39523
|
-
/* @__PURE__ */
|
|
39864
|
+
children: /* @__PURE__ */ jsxs110("div", { className: "flex flex-col gap-3", children: [
|
|
39865
|
+
/* @__PURE__ */ jsx149("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Keywords" }),
|
|
39866
|
+
/* @__PURE__ */ jsxs110("div", { className: "space-y-3", children: [
|
|
39867
|
+
/* @__PURE__ */ jsx149("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ jsxs110(
|
|
39524
39868
|
"div",
|
|
39525
39869
|
{
|
|
39526
39870
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium hover:bg-red-900/40 hover:border-red-500 transition-all cursor-pointer group",
|
|
@@ -39537,12 +39881,12 @@ var KeywordBundlesEdit = ({
|
|
|
39537
39881
|
},
|
|
39538
39882
|
children: [
|
|
39539
39883
|
keyword,
|
|
39540
|
-
/* @__PURE__ */
|
|
39884
|
+
/* @__PURE__ */ jsx149("span", { className: "ml-1 opacity-60 group-hover:opacity-100 transition-opacity", children: "\xD7" })
|
|
39541
39885
|
]
|
|
39542
39886
|
},
|
|
39543
39887
|
kIndex
|
|
39544
39888
|
)) }),
|
|
39545
|
-
/* @__PURE__ */
|
|
39889
|
+
/* @__PURE__ */ jsx149("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx149(
|
|
39546
39890
|
"input",
|
|
39547
39891
|
{
|
|
39548
39892
|
type: "text",
|
|
@@ -39566,9 +39910,9 @@ var KeywordBundlesEdit = ({
|
|
|
39566
39910
|
}
|
|
39567
39911
|
) })
|
|
39568
39912
|
] }),
|
|
39569
|
-
/* @__PURE__ */
|
|
39570
|
-
/* @__PURE__ */
|
|
39571
|
-
/* @__PURE__ */
|
|
39913
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex flex-col gap-1.5 mt-1", children: [
|
|
39914
|
+
/* @__PURE__ */ jsx149("label", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest pl-1", children: "Priority Level (1-5)" }),
|
|
39915
|
+
/* @__PURE__ */ jsx149(
|
|
39572
39916
|
"input",
|
|
39573
39917
|
{
|
|
39574
39918
|
type: "number",
|
|
@@ -39596,7 +39940,7 @@ var KeywordBundlesEdit = ({
|
|
|
39596
39940
|
var KeywordBundlesDisplay = ({ value }) => {
|
|
39597
39941
|
const bundles = Array.isArray(value) ? value : [];
|
|
39598
39942
|
if (bundles.length === 0)
|
|
39599
|
-
return /* @__PURE__ */
|
|
39943
|
+
return /* @__PURE__ */ jsx149("span", { className: "text-gray-500 italic text-sm", children: "Not specified" });
|
|
39600
39944
|
const groups = {};
|
|
39601
39945
|
bundles.forEach((b, idx) => {
|
|
39602
39946
|
const p = Number(b?.priority) || idx + 1;
|
|
@@ -39609,17 +39953,17 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
39609
39953
|
groups[p].push(...keywords);
|
|
39610
39954
|
});
|
|
39611
39955
|
const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
|
|
39612
|
-
return /* @__PURE__ */
|
|
39956
|
+
return /* @__PURE__ */ jsx149("div", { className: "space-y-4 pt-2", children: sortedPriorities.map((priority) => {
|
|
39613
39957
|
const deduped = Array.from(new Set(groups[priority]));
|
|
39614
|
-
return /* @__PURE__ */
|
|
39615
|
-
/* @__PURE__ */
|
|
39616
|
-
/* @__PURE__ */
|
|
39958
|
+
return /* @__PURE__ */ jsxs110("div", { className: "space-y-3", children: [
|
|
39959
|
+
/* @__PURE__ */ jsxs110("div", { className: "flex items-center gap-2", children: [
|
|
39960
|
+
/* @__PURE__ */ jsxs110("div", { className: "inline-block px-3 py-1 bg-purple200 hover:bg-purple200 text-purpleText text-sm font-medium rounded-md uppercase", children: [
|
|
39617
39961
|
"Priority ",
|
|
39618
39962
|
priority
|
|
39619
39963
|
] }),
|
|
39620
|
-
/* @__PURE__ */
|
|
39964
|
+
/* @__PURE__ */ jsx149("div", { className: "h-px flex-1 bg-white/10" })
|
|
39621
39965
|
] }),
|
|
39622
|
-
/* @__PURE__ */
|
|
39966
|
+
/* @__PURE__ */ jsx149("div", { className: "flex flex-wrap gap-2 pt-1", children: deduped.map((keyword) => /* @__PURE__ */ jsx149(
|
|
39623
39967
|
"div",
|
|
39624
39968
|
{
|
|
39625
39969
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium",
|
|
@@ -39657,12 +40001,12 @@ var PlatformSelectEdit = ({
|
|
|
39657
40001
|
const options = useMemo5(() => {
|
|
39658
40002
|
return DEFAULT_PLATFORMS;
|
|
39659
40003
|
}, []);
|
|
39660
|
-
return /* @__PURE__ */
|
|
40004
|
+
return /* @__PURE__ */ jsx149("div", { className: "flex flex-wrap gap-4 py-2", children: options.map((platform) => /* @__PURE__ */ jsxs110(
|
|
39661
40005
|
"label",
|
|
39662
40006
|
{
|
|
39663
40007
|
className: "flex items-center gap-2 cursor-pointer group",
|
|
39664
40008
|
children: [
|
|
39665
|
-
/* @__PURE__ */
|
|
40009
|
+
/* @__PURE__ */ jsx149(
|
|
39666
40010
|
"div",
|
|
39667
40011
|
{
|
|
39668
40012
|
className: cn(
|
|
@@ -39670,10 +40014,10 @@ var PlatformSelectEdit = ({
|
|
|
39670
40014
|
isSelected(platform) ? "bg-purple-600 border-purple-600" : "border-gray-300 group-hover:border-purple-400"
|
|
39671
40015
|
),
|
|
39672
40016
|
onClick: () => togglePlatform(platform),
|
|
39673
|
-
children: isSelected(platform) && /* @__PURE__ */
|
|
40017
|
+
children: isSelected(platform) && /* @__PURE__ */ jsx149(Check, { className: "h-3.5 w-3.5 text-white stroke-[3]" })
|
|
39674
40018
|
}
|
|
39675
40019
|
),
|
|
39676
|
-
/* @__PURE__ */
|
|
40020
|
+
/* @__PURE__ */ jsx149("span", { className: "text-sm font-medium text-foreground select-none", children: platform })
|
|
39677
40021
|
]
|
|
39678
40022
|
},
|
|
39679
40023
|
platform
|
|
@@ -39688,9 +40032,9 @@ var PlatformSelectDisplay = ({ value }) => {
|
|
|
39688
40032
|
return [];
|
|
39689
40033
|
}, [value]);
|
|
39690
40034
|
if (displayValues.length === 0) {
|
|
39691
|
-
return /* @__PURE__ */
|
|
40035
|
+
return /* @__PURE__ */ jsx149("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
|
|
39692
40036
|
}
|
|
39693
|
-
return /* @__PURE__ */
|
|
40037
|
+
return /* @__PURE__ */ jsx149("div", { className: "flex flex-wrap gap-2 pt-1", children: displayValues.map((platform) => /* @__PURE__ */ jsx149(
|
|
39694
40038
|
"div",
|
|
39695
40039
|
{
|
|
39696
40040
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
|
|
@@ -39701,21 +40045,21 @@ var PlatformSelectDisplay = ({ value }) => {
|
|
|
39701
40045
|
};
|
|
39702
40046
|
|
|
39703
40047
|
// src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx
|
|
39704
|
-
import { jsx as
|
|
40048
|
+
import { jsx as jsx150, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
39705
40049
|
var ObjectDisplay = ({ value }) => {
|
|
39706
40050
|
if (!value || typeof value !== "object") return null;
|
|
39707
|
-
return /* @__PURE__ */
|
|
39708
|
-
/* @__PURE__ */
|
|
40051
|
+
return /* @__PURE__ */ jsx150("div", { className: "space-y-1 pt-1", children: Object.entries(value).map(([k, v]) => /* @__PURE__ */ jsxs111("div", { className: "flex gap-2 text-sm", children: [
|
|
40052
|
+
/* @__PURE__ */ jsxs111("span", { className: "text-muted-foreground capitalize min-w-[120px]", children: [
|
|
39709
40053
|
k.replace(/_/g, " "),
|
|
39710
40054
|
":"
|
|
39711
40055
|
] }),
|
|
39712
|
-
/* @__PURE__ */
|
|
40056
|
+
/* @__PURE__ */ jsx150("span", { className: "text-foreground font-medium", children: Array.isArray(v) ? v.join(", ") : String(v) })
|
|
39713
40057
|
] }, k)) });
|
|
39714
40058
|
};
|
|
39715
40059
|
var StringArrayDisplay = ({ value }) => {
|
|
39716
40060
|
if (!Array.isArray(value) || value.length === 0)
|
|
39717
|
-
return /* @__PURE__ */
|
|
39718
|
-
return /* @__PURE__ */
|
|
40061
|
+
return /* @__PURE__ */ jsx150("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
|
|
40062
|
+
return /* @__PURE__ */ jsx150("div", { className: "flex flex-wrap gap-2 pt-1", children: value.map((item) => /* @__PURE__ */ jsx150(
|
|
39719
40063
|
"div",
|
|
39720
40064
|
{
|
|
39721
40065
|
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
|
|
@@ -39733,8 +40077,8 @@ function buildCampaignSeedFields(data) {
|
|
|
39733
40077
|
key,
|
|
39734
40078
|
label: "Keyword Bundles",
|
|
39735
40079
|
type: "custom",
|
|
39736
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
39737
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40080
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx150(KeywordBundlesDisplay, { value: v }),
|
|
40081
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx150(
|
|
39738
40082
|
Textarea,
|
|
39739
40083
|
{
|
|
39740
40084
|
value: Array.isArray(v) ? v.map((b) => `${(b.keywords || []).join(", ")} (Priority: ${b.priority || 1})`).join("\n") : String(v || ""),
|
|
@@ -39766,8 +40110,8 @@ function buildCampaignSeedFields(data) {
|
|
|
39766
40110
|
key,
|
|
39767
40111
|
label: "Geography",
|
|
39768
40112
|
type: "custom",
|
|
39769
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
39770
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40113
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx150(CountrySelectDisplay, { value: v }),
|
|
40114
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx150(CountrySelectEdit, { value: v, onChange })
|
|
39771
40115
|
};
|
|
39772
40116
|
}
|
|
39773
40117
|
if (key === "platforms" || key === "target_platforms" || key === "targetPlatforms") {
|
|
@@ -39775,8 +40119,8 @@ function buildCampaignSeedFields(data) {
|
|
|
39775
40119
|
key,
|
|
39776
40120
|
label: "Platforms",
|
|
39777
40121
|
type: "custom",
|
|
39778
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
39779
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40122
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx150(PlatformSelectDisplay, { value: v }),
|
|
40123
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx150(
|
|
39780
40124
|
PlatformSelectEdit,
|
|
39781
40125
|
{
|
|
39782
40126
|
value: v,
|
|
@@ -39791,7 +40135,7 @@ function buildCampaignSeedFields(data) {
|
|
|
39791
40135
|
key,
|
|
39792
40136
|
label,
|
|
39793
40137
|
type: "custom",
|
|
39794
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
40138
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx150(StringArrayDisplay, { value: v })
|
|
39795
40139
|
};
|
|
39796
40140
|
}
|
|
39797
40141
|
if (typeof value === "object" && value !== null && !Array.isArray(value) && "min" in value && "max" in value) {
|
|
@@ -39802,9 +40146,9 @@ function buildCampaignSeedFields(data) {
|
|
|
39802
40146
|
type: "custom",
|
|
39803
40147
|
renderDisplay: (v) => {
|
|
39804
40148
|
if (typeof v === "object" && v !== null) {
|
|
39805
|
-
return /* @__PURE__ */
|
|
40149
|
+
return /* @__PURE__ */ jsx150("span", { className: "text-foreground font-medium", children: `${v.min?.toLocaleString()} - ${v.max?.toLocaleString()}` });
|
|
39806
40150
|
}
|
|
39807
|
-
return /* @__PURE__ */
|
|
40151
|
+
return /* @__PURE__ */ jsx150("span", { className: "text-foreground font-medium", children: v });
|
|
39808
40152
|
}
|
|
39809
40153
|
};
|
|
39810
40154
|
}
|
|
@@ -39814,8 +40158,8 @@ function buildCampaignSeedFields(data) {
|
|
|
39814
40158
|
key,
|
|
39815
40159
|
label,
|
|
39816
40160
|
type: "custom",
|
|
39817
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
39818
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40161
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx150(ObjectDisplay, { value: v }),
|
|
40162
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx150(
|
|
39819
40163
|
Textarea,
|
|
39820
40164
|
{
|
|
39821
40165
|
value: Object.entries(v || {}).map(([k, val]) => `${k.replace(/_/g, " ")}: ${val}`).join("\n"),
|
|
@@ -39840,7 +40184,7 @@ function buildCampaignSeedFields(data) {
|
|
|
39840
40184
|
return generated;
|
|
39841
40185
|
});
|
|
39842
40186
|
}
|
|
39843
|
-
var CampaignSeedCard =
|
|
40187
|
+
var CampaignSeedCard = React108.memo(
|
|
39844
40188
|
({
|
|
39845
40189
|
selectionStatus,
|
|
39846
40190
|
isLatestMessage = true,
|
|
@@ -39863,7 +40207,7 @@ var CampaignSeedCard = React107.memo(
|
|
|
39863
40207
|
});
|
|
39864
40208
|
};
|
|
39865
40209
|
const effectiveIsLatest = isLatestMessage && !hasUserResponded;
|
|
39866
|
-
return /* @__PURE__ */
|
|
40210
|
+
return /* @__PURE__ */ jsx150("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx150(
|
|
39867
40211
|
FormCard,
|
|
39868
40212
|
{
|
|
39869
40213
|
...formCardProps,
|
|
@@ -39875,9 +40219,9 @@ var CampaignSeedCard = React107.memo(
|
|
|
39875
40219
|
showTimeline: true,
|
|
39876
40220
|
isLatestMessage: effectiveIsLatest,
|
|
39877
40221
|
className,
|
|
39878
|
-
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */
|
|
39879
|
-
/* @__PURE__ */
|
|
39880
|
-
/* @__PURE__ */
|
|
40222
|
+
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs111("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-2 pr-4", children: [
|
|
40223
|
+
/* @__PURE__ */ jsx150(CircleCheck, { className: "h-3 w-3" }),
|
|
40224
|
+
/* @__PURE__ */ jsx150("span", { children: selectionStatus === "agent" ? "Suggested by Agent" : "Selected by you" })
|
|
39881
40225
|
] }) : formCardProps.footer
|
|
39882
40226
|
}
|
|
39883
40227
|
) });
|
|
@@ -39886,22 +40230,22 @@ var CampaignSeedCard = React107.memo(
|
|
|
39886
40230
|
CampaignSeedCard.displayName = "CampaignSeedCard";
|
|
39887
40231
|
|
|
39888
40232
|
// src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx
|
|
39889
|
-
import
|
|
39890
|
-
import { jsx as
|
|
40233
|
+
import React109, { useMemo as useMemo7 } from "react";
|
|
40234
|
+
import { jsx as jsx151, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
39891
40235
|
var ObjectDisplay2 = ({ value }) => {
|
|
39892
40236
|
if (!value || typeof value !== "object") return null;
|
|
39893
|
-
return /* @__PURE__ */
|
|
39894
|
-
/* @__PURE__ */
|
|
40237
|
+
return /* @__PURE__ */ jsx151("div", { className: "space-y-1 pt-1", children: Object.entries(value).map(([k, v]) => /* @__PURE__ */ jsxs112("div", { className: "flex gap-2 text-sm", children: [
|
|
40238
|
+
/* @__PURE__ */ jsxs112("span", { className: "text-muted-foreground capitalize min-w-[120px]", children: [
|
|
39895
40239
|
k.replace(/_/g, " "),
|
|
39896
40240
|
":"
|
|
39897
40241
|
] }),
|
|
39898
|
-
/* @__PURE__ */
|
|
40242
|
+
/* @__PURE__ */ jsx151("span", { className: "text-foreground font-medium", children: Array.isArray(v) ? v.join(", ") : String(v) })
|
|
39899
40243
|
] }, k)) });
|
|
39900
40244
|
};
|
|
39901
40245
|
var StringArrayDisplay2 = ({ value }) => {
|
|
39902
40246
|
if (!Array.isArray(value) || value.length === 0)
|
|
39903
|
-
return /* @__PURE__ */
|
|
39904
|
-
return /* @__PURE__ */
|
|
40247
|
+
return /* @__PURE__ */ jsx151("span", { className: "text-muted-foreground italic text-sm", children: "Not specified" });
|
|
40248
|
+
return /* @__PURE__ */ jsx151("div", { className: "flex flex-wrap gap-2 pt-1", children: value.map((item) => /* @__PURE__ */ jsx151(
|
|
39905
40249
|
"div",
|
|
39906
40250
|
{
|
|
39907
40251
|
className: "flex items-center gap-2 px-3 py-1 bg-grayPill border border-foreground rounded-md text-foreground text-sm font-grotesk font-medium",
|
|
@@ -39919,8 +40263,8 @@ function buildSearchSpecFields(data) {
|
|
|
39919
40263
|
key,
|
|
39920
40264
|
label: "Keyword Bundles",
|
|
39921
40265
|
type: "custom",
|
|
39922
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
39923
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40266
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(KeywordBundlesDisplay, { value: v }),
|
|
40267
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx151(KeywordBundlesEdit, { value: v, onChange })
|
|
39924
40268
|
};
|
|
39925
40269
|
}
|
|
39926
40270
|
if (key === "geography") {
|
|
@@ -39928,8 +40272,8 @@ function buildSearchSpecFields(data) {
|
|
|
39928
40272
|
key,
|
|
39929
40273
|
label: "Geography",
|
|
39930
40274
|
type: "custom",
|
|
39931
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
39932
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40275
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(CountrySelectDisplay, { value: v }),
|
|
40276
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx151(CountrySelectEdit, { value: v, onChange })
|
|
39933
40277
|
};
|
|
39934
40278
|
}
|
|
39935
40279
|
if (key === "platforms" && Array.isArray(value)) {
|
|
@@ -39940,8 +40284,8 @@ function buildSearchSpecFields(data) {
|
|
|
39940
40284
|
config: {
|
|
39941
40285
|
options: data.platform_options || data.available_platforms || data.platforms_list || []
|
|
39942
40286
|
},
|
|
39943
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
39944
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40287
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(PlatformSelectDisplay, { value: v }),
|
|
40288
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx151(
|
|
39945
40289
|
PlatformSelectEdit,
|
|
39946
40290
|
{
|
|
39947
40291
|
value: v,
|
|
@@ -39955,8 +40299,8 @@ function buildSearchSpecFields(data) {
|
|
|
39955
40299
|
key,
|
|
39956
40300
|
label: "Exclude Keywords",
|
|
39957
40301
|
type: "custom",
|
|
39958
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
39959
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40302
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(StringArrayDisplay2, { value: v }),
|
|
40303
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx151(
|
|
39960
40304
|
Textarea,
|
|
39961
40305
|
{
|
|
39962
40306
|
value: Array.isArray(v) ? v.join(", ") : String(v || ""),
|
|
@@ -39976,8 +40320,8 @@ function buildSearchSpecFields(data) {
|
|
|
39976
40320
|
key,
|
|
39977
40321
|
label,
|
|
39978
40322
|
type: "custom",
|
|
39979
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
39980
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
40323
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx151(ObjectDisplay2, { value: v }),
|
|
40324
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx151(
|
|
39981
40325
|
Textarea,
|
|
39982
40326
|
{
|
|
39983
40327
|
value: Object.entries(v || {}).map(([k, val]) => `${k.replace(/_/g, " ")}: ${val}`).join("\n"),
|
|
@@ -40002,7 +40346,7 @@ function buildSearchSpecFields(data) {
|
|
|
40002
40346
|
return generated;
|
|
40003
40347
|
});
|
|
40004
40348
|
}
|
|
40005
|
-
var SearchSpecCard =
|
|
40349
|
+
var SearchSpecCard = React109.memo(
|
|
40006
40350
|
({
|
|
40007
40351
|
selectionStatus,
|
|
40008
40352
|
isLatestMessage = true,
|
|
@@ -40030,7 +40374,7 @@ var SearchSpecCard = React108.memo(
|
|
|
40030
40374
|
});
|
|
40031
40375
|
};
|
|
40032
40376
|
const effectiveIsLatest = isLatestMessage && !hasUserResponded;
|
|
40033
|
-
return /* @__PURE__ */
|
|
40377
|
+
return /* @__PURE__ */ jsx151("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx151(
|
|
40034
40378
|
FormCard,
|
|
40035
40379
|
{
|
|
40036
40380
|
...formCardProps,
|
|
@@ -40041,9 +40385,9 @@ var SearchSpecCard = React108.memo(
|
|
|
40041
40385
|
onProceed: handleProceed,
|
|
40042
40386
|
isLatestMessage: effectiveIsLatest,
|
|
40043
40387
|
className,
|
|
40044
|
-
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */
|
|
40045
|
-
/* @__PURE__ */
|
|
40046
|
-
/* @__PURE__ */
|
|
40388
|
+
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs112("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-1", children: [
|
|
40389
|
+
/* @__PURE__ */ jsx151(CircleCheck, { className: "h-3 w-3" }),
|
|
40390
|
+
/* @__PURE__ */ jsx151("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
|
|
40047
40391
|
] }) : formCardProps.footer
|
|
40048
40392
|
}
|
|
40049
40393
|
) });
|
|
@@ -40052,7 +40396,7 @@ var SearchSpecCard = React108.memo(
|
|
|
40052
40396
|
SearchSpecCard.displayName = "SearchSpecCard";
|
|
40053
40397
|
|
|
40054
40398
|
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
40055
|
-
import
|
|
40399
|
+
import React110 from "react";
|
|
40056
40400
|
|
|
40057
40401
|
// src/molecules/creator-discovery/MCQCard/defaultFetchers.ts
|
|
40058
40402
|
function getBackendOrigin() {
|
|
@@ -40152,8 +40496,8 @@ async function defaultPersistSelection(sessionId, questionKey, value) {
|
|
|
40152
40496
|
}
|
|
40153
40497
|
|
|
40154
40498
|
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
40155
|
-
import { jsx as
|
|
40156
|
-
var MCQCard =
|
|
40499
|
+
import { jsx as jsx152, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
40500
|
+
var MCQCard = React110.memo(
|
|
40157
40501
|
({
|
|
40158
40502
|
question,
|
|
40159
40503
|
options,
|
|
@@ -40178,16 +40522,16 @@ var MCQCard = React109.memo(
|
|
|
40178
40522
|
const resolvedOptions = options || allProps.Options || allProps.opts || {};
|
|
40179
40523
|
const resolvedRecommended = recommended || allProps.Recommended || allProps.rec;
|
|
40180
40524
|
console.log("[MCQCard] FULL PROPS:", { allProps, resolvedQuestion, resolvedOptions: Object.keys(resolvedOptions || {}), resolvedRecommended });
|
|
40181
|
-
const [selectedOption, setSelectedOption] =
|
|
40182
|
-
const [isProceeded, setIsProceeded] =
|
|
40183
|
-
const fetchedSessionRef =
|
|
40184
|
-
|
|
40525
|
+
const [selectedOption, setSelectedOption] = React110.useState(propsSelectedOption);
|
|
40526
|
+
const [isProceeded, setIsProceeded] = React110.useState(false);
|
|
40527
|
+
const fetchedSessionRef = React110.useRef("");
|
|
40528
|
+
React110.useEffect(() => {
|
|
40185
40529
|
if (propsSelectedOption) {
|
|
40186
40530
|
setSelectedOption(propsSelectedOption);
|
|
40187
40531
|
setIsProceeded(true);
|
|
40188
40532
|
}
|
|
40189
40533
|
}, [propsSelectedOption]);
|
|
40190
|
-
const buildQuestionKey =
|
|
40534
|
+
const buildQuestionKey = React110.useCallback((sid, question2) => {
|
|
40191
40535
|
let hash = 2166136261;
|
|
40192
40536
|
for (let i = 0; i < question2.length; i++) {
|
|
40193
40537
|
hash ^= question2.charCodeAt(i);
|
|
@@ -40195,7 +40539,7 @@ var MCQCard = React109.memo(
|
|
|
40195
40539
|
}
|
|
40196
40540
|
return `mcq_${sid}_${hash.toString(36)}`;
|
|
40197
40541
|
}, []);
|
|
40198
|
-
|
|
40542
|
+
React110.useEffect(() => {
|
|
40199
40543
|
if (!sessionId || !resolvedQuestion) return;
|
|
40200
40544
|
const fetchKey = `${sessionId}::${resolvedQuestion}`;
|
|
40201
40545
|
if (fetchedSessionRef.current === fetchKey) return;
|
|
@@ -40258,7 +40602,7 @@ A: ${label}`);
|
|
|
40258
40602
|
key,
|
|
40259
40603
|
typeof val === "string" ? val : typeof val === "object" && val !== null ? val.label || val.description || val.id || JSON.stringify(val) : String(val ?? "")
|
|
40260
40604
|
]) : [];
|
|
40261
|
-
return /* @__PURE__ */
|
|
40605
|
+
return /* @__PURE__ */ jsxs113(
|
|
40262
40606
|
"div",
|
|
40263
40607
|
{
|
|
40264
40608
|
className: cn(
|
|
@@ -40266,11 +40610,11 @@ A: ${label}`);
|
|
|
40266
40610
|
className
|
|
40267
40611
|
),
|
|
40268
40612
|
children: [
|
|
40269
|
-
/* @__PURE__ */
|
|
40270
|
-
/* @__PURE__ */
|
|
40613
|
+
/* @__PURE__ */ jsx152("div", { className: "mb-4", children: /* @__PURE__ */ jsx152("p", { className: "text-sm text-cardText", children: resolvedQuestion || "Select an option:" }) }),
|
|
40614
|
+
/* @__PURE__ */ jsx152("div", { className: "space-y-2.5 mb-4", children: optionsEntries.map(([key, label]) => {
|
|
40271
40615
|
const isSelected = selectedOption === key;
|
|
40272
40616
|
const isRecommended = key === recommended;
|
|
40273
|
-
return /* @__PURE__ */
|
|
40617
|
+
return /* @__PURE__ */ jsx152(
|
|
40274
40618
|
"div",
|
|
40275
40619
|
{
|
|
40276
40620
|
onClick: (e) => handleOptionClick(key, e),
|
|
@@ -40281,8 +40625,8 @@ A: ${label}`);
|
|
|
40281
40625
|
!selectedOption && !isOptionsDisabled && "hover:border-gray500",
|
|
40282
40626
|
(isLoading || isOptionsDisabled) && "opacity-50 cursor-not-allowed"
|
|
40283
40627
|
),
|
|
40284
|
-
children: /* @__PURE__ */
|
|
40285
|
-
/* @__PURE__ */
|
|
40628
|
+
children: /* @__PURE__ */ jsxs113("div", { className: "flex items-start gap-3", children: [
|
|
40629
|
+
/* @__PURE__ */ jsx152("div", { className: "mt-0.5 flex-shrink-0", children: /* @__PURE__ */ jsx152(
|
|
40286
40630
|
"div",
|
|
40287
40631
|
{
|
|
40288
40632
|
className: cn(
|
|
@@ -40292,19 +40636,19 @@ A: ${label}`);
|
|
|
40292
40636
|
!selectedOption && !isOptionsDisabled && "hover:border-gold"
|
|
40293
40637
|
)
|
|
40294
40638
|
),
|
|
40295
|
-
children: isSelected && /* @__PURE__ */
|
|
40639
|
+
children: isSelected && /* @__PURE__ */ jsx152("div", { className: "w-2 h-2 rounded-full bg-gold" })
|
|
40296
40640
|
}
|
|
40297
40641
|
) }),
|
|
40298
|
-
/* @__PURE__ */
|
|
40299
|
-
isRecommended && /* @__PURE__ */
|
|
40300
|
-
/* @__PURE__ */
|
|
40642
|
+
/* @__PURE__ */ jsxs113("div", { className: "flex-1 min-w-0", children: [
|
|
40643
|
+
isRecommended && /* @__PURE__ */ jsx152("p", { className: "text-xs font-semibold text-gold mb-1", children: "Recommended" }),
|
|
40644
|
+
/* @__PURE__ */ jsx152("p", { className: "text-sm text-cardText", children: label })
|
|
40301
40645
|
] })
|
|
40302
40646
|
] })
|
|
40303
40647
|
},
|
|
40304
40648
|
key
|
|
40305
40649
|
);
|
|
40306
40650
|
}) }),
|
|
40307
|
-
/* @__PURE__ */
|
|
40651
|
+
/* @__PURE__ */ jsx152("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx152(
|
|
40308
40652
|
"button",
|
|
40309
40653
|
{
|
|
40310
40654
|
onClick: handleProceed,
|
|
@@ -40325,8 +40669,8 @@ A: ${label}`);
|
|
|
40325
40669
|
MCQCard.displayName = "MCQCard";
|
|
40326
40670
|
|
|
40327
40671
|
// src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx
|
|
40328
|
-
import { jsx as
|
|
40329
|
-
var TikTokIcon = ({ className }) => /* @__PURE__ */
|
|
40672
|
+
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
40673
|
+
var TikTokIcon = ({ className }) => /* @__PURE__ */ jsx153(Video, { className });
|
|
40330
40674
|
var PlatformIconGroup = ({
|
|
40331
40675
|
platforms,
|
|
40332
40676
|
className
|
|
@@ -40359,10 +40703,10 @@ var PlatformIconGroup = ({
|
|
|
40359
40703
|
return "text-gray-500 bg-gray-50 border-gray-100";
|
|
40360
40704
|
}
|
|
40361
40705
|
};
|
|
40362
|
-
return /* @__PURE__ */
|
|
40706
|
+
return /* @__PURE__ */ jsx153("div", { className: cn("flex gap-2", className), children: platforms.map((p, i) => {
|
|
40363
40707
|
const Icon3 = getIcon(p.platform);
|
|
40364
40708
|
if (!Icon3) return null;
|
|
40365
|
-
return /* @__PURE__ */
|
|
40709
|
+
return /* @__PURE__ */ jsx153(
|
|
40366
40710
|
"a",
|
|
40367
40711
|
{
|
|
40368
40712
|
href: p.url || "#",
|
|
@@ -40373,7 +40717,7 @@ var PlatformIconGroup = ({
|
|
|
40373
40717
|
"p-1.5 rounded-lg border transition-colors flex items-center justify-center",
|
|
40374
40718
|
getColors(p.platform)
|
|
40375
40719
|
),
|
|
40376
|
-
children: /* @__PURE__ */
|
|
40720
|
+
children: /* @__PURE__ */ jsx153(Icon3, { className: "w-4 h-4" })
|
|
40377
40721
|
},
|
|
40378
40722
|
i
|
|
40379
40723
|
);
|
|
@@ -40381,7 +40725,7 @@ var PlatformIconGroup = ({
|
|
|
40381
40725
|
};
|
|
40382
40726
|
|
|
40383
40727
|
// src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx
|
|
40384
|
-
import { jsx as
|
|
40728
|
+
import { jsx as jsx154, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
40385
40729
|
var CreatorProfileSummary = ({
|
|
40386
40730
|
avatarSrc,
|
|
40387
40731
|
name,
|
|
@@ -40389,7 +40733,7 @@ var CreatorProfileSummary = ({
|
|
|
40389
40733
|
engagementRate,
|
|
40390
40734
|
className
|
|
40391
40735
|
}) => {
|
|
40392
|
-
return /* @__PURE__ */
|
|
40736
|
+
return /* @__PURE__ */ jsxs114(
|
|
40393
40737
|
"div",
|
|
40394
40738
|
{
|
|
40395
40739
|
className: cn(
|
|
@@ -40397,7 +40741,7 @@ var CreatorProfileSummary = ({
|
|
|
40397
40741
|
className
|
|
40398
40742
|
),
|
|
40399
40743
|
children: [
|
|
40400
|
-
/* @__PURE__ */
|
|
40744
|
+
/* @__PURE__ */ jsx154(
|
|
40401
40745
|
AvatarAtom,
|
|
40402
40746
|
{
|
|
40403
40747
|
id: `avatar-${name}`,
|
|
@@ -40407,8 +40751,8 @@ var CreatorProfileSummary = ({
|
|
|
40407
40751
|
className: "w-12 h-12 ring-2 ring-purple-100"
|
|
40408
40752
|
}
|
|
40409
40753
|
),
|
|
40410
|
-
/* @__PURE__ */
|
|
40411
|
-
/* @__PURE__ */
|
|
40754
|
+
/* @__PURE__ */ jsxs114("div", { className: "flex flex-col flex-1", children: [
|
|
40755
|
+
/* @__PURE__ */ jsx154(
|
|
40412
40756
|
TextAtom,
|
|
40413
40757
|
{
|
|
40414
40758
|
id: `name-${name}`,
|
|
@@ -40418,14 +40762,14 @@ var CreatorProfileSummary = ({
|
|
|
40418
40762
|
className: "text-gray-900 leading-tight"
|
|
40419
40763
|
}
|
|
40420
40764
|
),
|
|
40421
|
-
/* @__PURE__ */
|
|
40422
|
-
followerCount && /* @__PURE__ */
|
|
40423
|
-
/* @__PURE__ */
|
|
40424
|
-
/* @__PURE__ */
|
|
40765
|
+
/* @__PURE__ */ jsxs114("div", { className: "flex gap-3 mt-1", children: [
|
|
40766
|
+
followerCount && /* @__PURE__ */ jsxs114("div", { className: "flex flex-col", children: [
|
|
40767
|
+
/* @__PURE__ */ jsx154("span", { className: "text-[10px] uppercase tracking-wider text-muted-foreground font-bold", children: "Followers" }),
|
|
40768
|
+
/* @__PURE__ */ jsx154("span", { className: "text-xs font-semibold text-purple-700", children: followerCount })
|
|
40425
40769
|
] }),
|
|
40426
|
-
engagementRate && /* @__PURE__ */
|
|
40427
|
-
/* @__PURE__ */
|
|
40428
|
-
/* @__PURE__ */
|
|
40770
|
+
engagementRate && /* @__PURE__ */ jsxs114("div", { className: "flex flex-col border-l border-purple-100 pl-3", children: [
|
|
40771
|
+
/* @__PURE__ */ jsx154("span", { className: "text-[10px] uppercase tracking-wider text-muted-foreground font-bold", children: "Engagement" }),
|
|
40772
|
+
/* @__PURE__ */ jsx154("span", { className: "text-xs font-semibold text-indigo-600", children: engagementRate })
|
|
40429
40773
|
] })
|
|
40430
40774
|
] })
|
|
40431
40775
|
] })
|
|
@@ -40435,13 +40779,13 @@ var CreatorProfileSummary = ({
|
|
|
40435
40779
|
};
|
|
40436
40780
|
|
|
40437
40781
|
// src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx
|
|
40438
|
-
import { jsx as
|
|
40782
|
+
import { jsx as jsx155, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
40439
40783
|
var AudienceMetricCard = ({
|
|
40440
40784
|
title,
|
|
40441
40785
|
metrics,
|
|
40442
40786
|
className
|
|
40443
40787
|
}) => {
|
|
40444
|
-
return /* @__PURE__ */
|
|
40788
|
+
return /* @__PURE__ */ jsxs115(
|
|
40445
40789
|
Card,
|
|
40446
40790
|
{
|
|
40447
40791
|
className: cn(
|
|
@@ -40449,13 +40793,13 @@ var AudienceMetricCard = ({
|
|
|
40449
40793
|
className
|
|
40450
40794
|
),
|
|
40451
40795
|
children: [
|
|
40452
|
-
/* @__PURE__ */
|
|
40453
|
-
/* @__PURE__ */
|
|
40454
|
-
/* @__PURE__ */
|
|
40455
|
-
/* @__PURE__ */
|
|
40456
|
-
/* @__PURE__ */
|
|
40796
|
+
/* @__PURE__ */ jsx155(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsx155(CardTitle, { className: "text-lg font-bold text-gray-900", children: title }) }),
|
|
40797
|
+
/* @__PURE__ */ jsx155(CardContent, { className: "space-y-4", children: metrics.map((metric, i) => /* @__PURE__ */ jsxs115("div", { className: "space-y-1.5", children: [
|
|
40798
|
+
/* @__PURE__ */ jsxs115("div", { className: "flex justify-between items-center text-sm", children: [
|
|
40799
|
+
/* @__PURE__ */ jsx155("span", { className: "font-medium text-gray-700", children: metric.label }),
|
|
40800
|
+
/* @__PURE__ */ jsx155("span", { className: "font-bold text-gray-900", children: metric.value })
|
|
40457
40801
|
] }),
|
|
40458
|
-
metric.percentage !== void 0 && /* @__PURE__ */
|
|
40802
|
+
metric.percentage !== void 0 && /* @__PURE__ */ jsx155(
|
|
40459
40803
|
ProgressAtom,
|
|
40460
40804
|
{
|
|
40461
40805
|
id: `progress-${i}`,
|
|
@@ -40472,8 +40816,8 @@ var AudienceMetricCard = ({
|
|
|
40472
40816
|
};
|
|
40473
40817
|
|
|
40474
40818
|
// src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx
|
|
40475
|
-
import { jsx as
|
|
40476
|
-
var TikTokIcon2 = ({ className }) => /* @__PURE__ */
|
|
40819
|
+
import { jsx as jsx156, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
40820
|
+
var TikTokIcon2 = ({ className }) => /* @__PURE__ */ jsx156(Video, { className });
|
|
40477
40821
|
var CreatorGridCard = ({
|
|
40478
40822
|
bannerSrc,
|
|
40479
40823
|
avatarSrc,
|
|
@@ -40501,7 +40845,7 @@ var CreatorGridCard = ({
|
|
|
40501
40845
|
const safePlatforms = Array.isArray(platforms) ? platforms : [];
|
|
40502
40846
|
const safeMetrics = Array.isArray(metrics) ? metrics : [];
|
|
40503
40847
|
const displayName = typeof name === "string" ? name : String(name || "");
|
|
40504
|
-
return /* @__PURE__ */
|
|
40848
|
+
return /* @__PURE__ */ jsxs116(
|
|
40505
40849
|
Card,
|
|
40506
40850
|
{
|
|
40507
40851
|
className: cn(
|
|
@@ -40509,43 +40853,43 @@ var CreatorGridCard = ({
|
|
|
40509
40853
|
className
|
|
40510
40854
|
),
|
|
40511
40855
|
children: [
|
|
40512
|
-
/* @__PURE__ */
|
|
40513
|
-
bannerSrc ? /* @__PURE__ */
|
|
40856
|
+
/* @__PURE__ */ jsxs116("div", { className: "relative h-32 w-full overflow-hidden", children: [
|
|
40857
|
+
bannerSrc ? /* @__PURE__ */ jsx156(
|
|
40514
40858
|
"img",
|
|
40515
40859
|
{
|
|
40516
40860
|
src: bannerSrc,
|
|
40517
40861
|
alt: displayName,
|
|
40518
40862
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-110"
|
|
40519
40863
|
}
|
|
40520
|
-
) : /* @__PURE__ */
|
|
40521
|
-
/* @__PURE__ */
|
|
40864
|
+
) : /* @__PURE__ */ jsx156("div", { className: "h-full w-full bg-gradient-to-br from-purple-500 to-indigo-600" }),
|
|
40865
|
+
/* @__PURE__ */ jsx156("div", { className: "absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-black/20 to-transparent" })
|
|
40522
40866
|
] }),
|
|
40523
|
-
/* @__PURE__ */
|
|
40524
|
-
/* @__PURE__ */
|
|
40525
|
-
/* @__PURE__ */
|
|
40526
|
-
/* @__PURE__ */
|
|
40867
|
+
/* @__PURE__ */ jsxs116(CardContent, { className: "relative pt-0 px-5 pb-6", children: [
|
|
40868
|
+
/* @__PURE__ */ jsx156("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ jsxs116(Avatar, { className: "h-20 w-20 border-4 border-[var(--card-background)] shadow-lg ring-2 ring-purple-100/20", children: [
|
|
40869
|
+
/* @__PURE__ */ jsx156(AvatarImage, { src: avatarSrc, alt: displayName }),
|
|
40870
|
+
/* @__PURE__ */ jsx156(AvatarFallback, { className: "bg-purple-500/10 text-purple-500 font-bold text-xl", children: displayName.charAt(0) || "?" })
|
|
40527
40871
|
] }) }),
|
|
40528
|
-
/* @__PURE__ */
|
|
40529
|
-
/* @__PURE__ */
|
|
40530
|
-
/* @__PURE__ */
|
|
40872
|
+
/* @__PURE__ */ jsxs116("div", { className: "mt-12 flex flex-col gap-1", children: [
|
|
40873
|
+
/* @__PURE__ */ jsx156("h3", { className: "text-xl font-bold text-[var(--foreground)] truncate", children: displayName }),
|
|
40874
|
+
/* @__PURE__ */ jsxs116("p", { className: "text-sm text-[var(--foreground)]/60 font-medium", children: [
|
|
40531
40875
|
"@",
|
|
40532
40876
|
handle
|
|
40533
40877
|
] })
|
|
40534
40878
|
] }),
|
|
40535
|
-
/* @__PURE__ */
|
|
40879
|
+
/* @__PURE__ */ jsx156("div", { className: "mt-4 flex gap-2", children: safePlatforms.map((p, i) => {
|
|
40536
40880
|
const Icon3 = getIcon(p);
|
|
40537
|
-
return Icon3 ? /* @__PURE__ */
|
|
40881
|
+
return Icon3 ? /* @__PURE__ */ jsx156(
|
|
40538
40882
|
"div",
|
|
40539
40883
|
{
|
|
40540
40884
|
className: "p-1.5 rounded-lg bg-[var(--foreground)]/5 text-[var(--foreground)]/60 hover:text-purple-500 hover:bg-purple-500/10 transition-colors",
|
|
40541
|
-
children: /* @__PURE__ */
|
|
40885
|
+
children: /* @__PURE__ */ jsx156(Icon3, { className: "h-4 w-4" })
|
|
40542
40886
|
},
|
|
40543
40887
|
typeof p === "string" ? p : i
|
|
40544
40888
|
) : null;
|
|
40545
40889
|
}) }),
|
|
40546
|
-
/* @__PURE__ */
|
|
40547
|
-
/* @__PURE__ */
|
|
40548
|
-
/* @__PURE__ */
|
|
40890
|
+
/* @__PURE__ */ jsx156("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-[var(--border-color)] pt-4", children: safeMetrics.map((m, i) => /* @__PURE__ */ jsxs116("div", { className: "flex flex-col", children: [
|
|
40891
|
+
/* @__PURE__ */ jsx156("span", { className: "text-[10px] font-bold uppercase tracking-wider text-[var(--foreground)]/40", children: m.label }),
|
|
40892
|
+
/* @__PURE__ */ jsx156("span", { className: "text-sm font-bold text-[var(--primary-color)]", children: m.value })
|
|
40549
40893
|
] }, i)) })
|
|
40550
40894
|
] })
|
|
40551
40895
|
]
|
|
@@ -40554,15 +40898,15 @@ var CreatorGridCard = ({
|
|
|
40554
40898
|
};
|
|
40555
40899
|
|
|
40556
40900
|
// src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx
|
|
40557
|
-
import { jsx as
|
|
40901
|
+
import { jsx as jsx157, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
40558
40902
|
var BrandAffinityGroup = ({
|
|
40559
40903
|
brands,
|
|
40560
40904
|
className
|
|
40561
40905
|
}) => {
|
|
40562
|
-
return /* @__PURE__ */
|
|
40563
|
-
/* @__PURE__ */
|
|
40564
|
-
/* @__PURE__ */
|
|
40565
|
-
/* @__PURE__ */
|
|
40906
|
+
return /* @__PURE__ */ jsxs117("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
40907
|
+
/* @__PURE__ */ jsx157("h5", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: "Recent Collaborations" }),
|
|
40908
|
+
/* @__PURE__ */ jsx157("div", { className: "flex flex-wrap gap-4 items-center", children: brands.map((brand, i) => /* @__PURE__ */ jsxs117("div", { className: "group relative", children: [
|
|
40909
|
+
/* @__PURE__ */ jsx157("div", { className: "h-10 w-10 overflow-hidden rounded-xl bg-white border border-gray-100 p-1.5 flex items-center justify-center grayscale hover:grayscale-0 transition-all duration-300 hover:scale-110 shadow-sm hover:shadow-md", children: /* @__PURE__ */ jsx157(
|
|
40566
40910
|
"img",
|
|
40567
40911
|
{
|
|
40568
40912
|
src: brand.logoSrc,
|
|
@@ -40570,18 +40914,18 @@ var BrandAffinityGroup = ({
|
|
|
40570
40914
|
className: "max-h-full max-w-full object-contain"
|
|
40571
40915
|
}
|
|
40572
40916
|
) }),
|
|
40573
|
-
/* @__PURE__ */
|
|
40917
|
+
/* @__PURE__ */ jsx157("div", { className: "absolute -bottom-6 left-1/2 -translate-x-1/2 px-2 py-0.5 bg-gray-900 text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap z-50 pointer-events-none", children: brand.name })
|
|
40574
40918
|
] }, i)) })
|
|
40575
40919
|
] });
|
|
40576
40920
|
};
|
|
40577
40921
|
|
|
40578
40922
|
// src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx
|
|
40579
|
-
import { jsx as
|
|
40923
|
+
import { jsx as jsx158, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
40580
40924
|
var ContentPreviewGallery = ({
|
|
40581
40925
|
items,
|
|
40582
40926
|
className
|
|
40583
40927
|
}) => {
|
|
40584
|
-
return /* @__PURE__ */
|
|
40928
|
+
return /* @__PURE__ */ jsx158("div", { className: cn("grid grid-cols-2 gap-2", className), children: items.map((item, i) => /* @__PURE__ */ jsxs118(
|
|
40585
40929
|
"a",
|
|
40586
40930
|
{
|
|
40587
40931
|
href: item.url || "#",
|
|
@@ -40589,7 +40933,7 @@ var ContentPreviewGallery = ({
|
|
|
40589
40933
|
rel: "noopener noreferrer",
|
|
40590
40934
|
className: "group relative aspect-square overflow-hidden rounded-2xl bg-gray-100",
|
|
40591
40935
|
children: [
|
|
40592
|
-
/* @__PURE__ */
|
|
40936
|
+
/* @__PURE__ */ jsx158(
|
|
40593
40937
|
"img",
|
|
40594
40938
|
{
|
|
40595
40939
|
src: item.thumbnail,
|
|
@@ -40597,8 +40941,8 @@ var ContentPreviewGallery = ({
|
|
|
40597
40941
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-110"
|
|
40598
40942
|
}
|
|
40599
40943
|
),
|
|
40600
|
-
item.type === "video" && /* @__PURE__ */
|
|
40601
|
-
/* @__PURE__ */
|
|
40944
|
+
item.type === "video" && /* @__PURE__ */ jsx158("div", { className: "absolute inset-0 flex items-center justify-center bg-black/10 group-hover:bg-black/20 transition-colors", children: /* @__PURE__ */ jsx158("div", { className: "rounded-full bg-white/30 backdrop-blur-md p-3 text-white ring-1 ring-white/50", children: /* @__PURE__ */ jsx158(Play, { className: "h-6 w-6 fill-white" }) }) }),
|
|
40945
|
+
/* @__PURE__ */ jsx158("div", { className: "absolute inset-0 ring-1 ring-inset ring-black/10 rounded-2xl" })
|
|
40602
40946
|
]
|
|
40603
40947
|
},
|
|
40604
40948
|
i
|
|
@@ -40606,10 +40950,10 @@ var ContentPreviewGallery = ({
|
|
|
40606
40950
|
};
|
|
40607
40951
|
|
|
40608
40952
|
// src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx
|
|
40609
|
-
import { jsx as
|
|
40953
|
+
import { jsx as jsx159, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
40610
40954
|
var AudienceDemographicsCard = ({ title, data, config, demographicType, className }) => {
|
|
40611
40955
|
const chartType = demographicType === "location" ? "bar" : "pie";
|
|
40612
|
-
return /* @__PURE__ */
|
|
40956
|
+
return /* @__PURE__ */ jsxs119(
|
|
40613
40957
|
Card,
|
|
40614
40958
|
{
|
|
40615
40959
|
className: cn(
|
|
@@ -40617,8 +40961,8 @@ var AudienceDemographicsCard = ({ title, data, config, demographicType, classNam
|
|
|
40617
40961
|
className
|
|
40618
40962
|
),
|
|
40619
40963
|
children: [
|
|
40620
|
-
/* @__PURE__ */
|
|
40621
|
-
/* @__PURE__ */
|
|
40964
|
+
/* @__PURE__ */ jsx159(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsx159(CardTitle, { className: "text-lg font-bold text-gray-900", children: title }) }),
|
|
40965
|
+
/* @__PURE__ */ jsx159(CardContent, { children: /* @__PURE__ */ jsx159("div", { className: "h-[250px] w-full", children: /* @__PURE__ */ jsx159(
|
|
40622
40966
|
ChartAtom,
|
|
40623
40967
|
{
|
|
40624
40968
|
type: "chart",
|
|
@@ -40637,7 +40981,7 @@ var AudienceDemographicsCard = ({ title, data, config, demographicType, classNam
|
|
|
40637
40981
|
};
|
|
40638
40982
|
|
|
40639
40983
|
// src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx
|
|
40640
|
-
import { jsx as
|
|
40984
|
+
import { jsx as jsx160, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
40641
40985
|
var GrowthChartCard = ({
|
|
40642
40986
|
title,
|
|
40643
40987
|
data,
|
|
@@ -40646,7 +40990,7 @@ var GrowthChartCard = ({
|
|
|
40646
40990
|
period,
|
|
40647
40991
|
className
|
|
40648
40992
|
}) => {
|
|
40649
|
-
return /* @__PURE__ */
|
|
40993
|
+
return /* @__PURE__ */ jsxs120(
|
|
40650
40994
|
Card,
|
|
40651
40995
|
{
|
|
40652
40996
|
className: cn(
|
|
@@ -40654,15 +40998,15 @@ var GrowthChartCard = ({
|
|
|
40654
40998
|
className
|
|
40655
40999
|
),
|
|
40656
41000
|
children: [
|
|
40657
|
-
/* @__PURE__ */
|
|
40658
|
-
/* @__PURE__ */
|
|
40659
|
-
/* @__PURE__ */
|
|
40660
|
-
/* @__PURE__ */
|
|
41001
|
+
/* @__PURE__ */ jsxs120(CardHeader, { className: "flex flex-row items-center justify-between pb-2 space-y-0", children: [
|
|
41002
|
+
/* @__PURE__ */ jsxs120("div", { children: [
|
|
41003
|
+
/* @__PURE__ */ jsx160(CardTitle, { className: "text-lg font-bold text-gray-900", children: title }),
|
|
41004
|
+
/* @__PURE__ */ jsx160("p", { className: "text-xs text-muted-foreground", children: period })
|
|
40661
41005
|
] }),
|
|
40662
|
-
/* @__PURE__ */
|
|
41006
|
+
/* @__PURE__ */ jsx160("div", { className: "bg-green-50 p-2 rounded-xl", children: /* @__PURE__ */ jsx160(TrendingUp, { className: "w-4 h-4 text-green-600" }) })
|
|
40663
41007
|
] }),
|
|
40664
|
-
/* @__PURE__ */
|
|
40665
|
-
/* @__PURE__ */
|
|
41008
|
+
/* @__PURE__ */ jsxs120(CardContent, { children: [
|
|
41009
|
+
/* @__PURE__ */ jsx160("div", { className: "h-[200px] w-full mt-4", children: /* @__PURE__ */ jsx160(
|
|
40666
41010
|
ChartAtom,
|
|
40667
41011
|
{
|
|
40668
41012
|
type: "chart",
|
|
@@ -40675,9 +41019,9 @@ var GrowthChartCard = ({
|
|
|
40675
41019
|
showLegend: false
|
|
40676
41020
|
}
|
|
40677
41021
|
) }),
|
|
40678
|
-
/* @__PURE__ */
|
|
40679
|
-
/* @__PURE__ */
|
|
40680
|
-
/* @__PURE__ */
|
|
41022
|
+
/* @__PURE__ */ jsxs120("div", { className: "mt-4 flex items-center justify-between", children: [
|
|
41023
|
+
/* @__PURE__ */ jsx160("span", { className: "text-sm font-medium text-gray-500", children: metric }),
|
|
41024
|
+
/* @__PURE__ */ jsx160("span", { className: "text-sm font-bold text-purple-600", children: "+12.5%" })
|
|
40681
41025
|
] })
|
|
40682
41026
|
] })
|
|
40683
41027
|
]
|
|
@@ -40686,24 +41030,24 @@ var GrowthChartCard = ({
|
|
|
40686
41030
|
};
|
|
40687
41031
|
|
|
40688
41032
|
// src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx
|
|
40689
|
-
import { jsx as
|
|
41033
|
+
import { jsx as jsx161, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
40690
41034
|
var TopPostsGrid = ({
|
|
40691
41035
|
posts,
|
|
40692
41036
|
className
|
|
40693
41037
|
}) => {
|
|
40694
|
-
return /* @__PURE__ */
|
|
41038
|
+
return /* @__PURE__ */ jsx161(
|
|
40695
41039
|
"div",
|
|
40696
41040
|
{
|
|
40697
41041
|
className: cn(
|
|
40698
41042
|
"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
40699
41043
|
className
|
|
40700
41044
|
),
|
|
40701
|
-
children: posts.map((post, i) => /* @__PURE__ */
|
|
41045
|
+
children: posts.map((post, i) => /* @__PURE__ */ jsxs121(
|
|
40702
41046
|
"div",
|
|
40703
41047
|
{
|
|
40704
41048
|
className: "group relative aspect-square overflow-hidden rounded-2xl bg-gray-100 border border-purple-50",
|
|
40705
41049
|
children: [
|
|
40706
|
-
/* @__PURE__ */
|
|
41050
|
+
/* @__PURE__ */ jsx161(
|
|
40707
41051
|
"img",
|
|
40708
41052
|
{
|
|
40709
41053
|
src: post.thumbnail,
|
|
@@ -40711,25 +41055,25 @@ var TopPostsGrid = ({
|
|
|
40711
41055
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-110"
|
|
40712
41056
|
}
|
|
40713
41057
|
),
|
|
40714
|
-
/* @__PURE__ */
|
|
40715
|
-
/* @__PURE__ */
|
|
40716
|
-
/* @__PURE__ */
|
|
40717
|
-
/* @__PURE__ */
|
|
41058
|
+
/* @__PURE__ */ jsxs121("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity p-4 flex flex-col justify-end", children: [
|
|
41059
|
+
/* @__PURE__ */ jsxs121("div", { className: "flex items-center gap-4 text-white text-xs font-bold", children: [
|
|
41060
|
+
/* @__PURE__ */ jsxs121("span", { className: "flex items-center gap-1", children: [
|
|
41061
|
+
/* @__PURE__ */ jsx161(Heart, { className: "w-3 h-3 fill-white" }),
|
|
40718
41062
|
" ",
|
|
40719
41063
|
post.likes
|
|
40720
41064
|
] }),
|
|
40721
|
-
/* @__PURE__ */
|
|
40722
|
-
/* @__PURE__ */
|
|
41065
|
+
/* @__PURE__ */ jsxs121("span", { className: "flex items-center gap-1", children: [
|
|
41066
|
+
/* @__PURE__ */ jsx161(MessageCircle, { className: "w-3 h-3 fill-white" }),
|
|
40723
41067
|
" ",
|
|
40724
41068
|
post.comments
|
|
40725
41069
|
] }),
|
|
40726
|
-
/* @__PURE__ */
|
|
40727
|
-
/* @__PURE__ */
|
|
41070
|
+
/* @__PURE__ */ jsxs121("span", { className: "flex items-center gap-1", children: [
|
|
41071
|
+
/* @__PURE__ */ jsx161(ChartColumn, { className: "w-3 h-3" }),
|
|
40728
41072
|
" ",
|
|
40729
41073
|
post.engagement
|
|
40730
41074
|
] })
|
|
40731
41075
|
] }),
|
|
40732
|
-
/* @__PURE__ */
|
|
41076
|
+
/* @__PURE__ */ jsx161("span", { className: "text-[10px] text-gray-300 mt-2", children: post.date })
|
|
40733
41077
|
] })
|
|
40734
41078
|
]
|
|
40735
41079
|
},
|
|
@@ -40740,7 +41084,7 @@ var TopPostsGrid = ({
|
|
|
40740
41084
|
};
|
|
40741
41085
|
|
|
40742
41086
|
// src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx
|
|
40743
|
-
import { jsx as
|
|
41087
|
+
import { jsx as jsx162, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
40744
41088
|
var CreatorActionHeader = ({
|
|
40745
41089
|
bannerSrc,
|
|
40746
41090
|
avatarSrc,
|
|
@@ -40749,7 +41093,7 @@ var CreatorActionHeader = ({
|
|
|
40749
41093
|
actions,
|
|
40750
41094
|
className
|
|
40751
41095
|
}) => {
|
|
40752
|
-
return /* @__PURE__ */
|
|
41096
|
+
return /* @__PURE__ */ jsxs122(
|
|
40753
41097
|
"div",
|
|
40754
41098
|
{
|
|
40755
41099
|
className: cn(
|
|
@@ -40757,8 +41101,8 @@ var CreatorActionHeader = ({
|
|
|
40757
41101
|
className
|
|
40758
41102
|
),
|
|
40759
41103
|
children: [
|
|
40760
|
-
/* @__PURE__ */
|
|
40761
|
-
bannerSrc && /* @__PURE__ */
|
|
41104
|
+
/* @__PURE__ */ jsxs122("div", { className: "h-48 w-full bg-gradient-to-r from-purple-100 to-indigo-100 relative", children: [
|
|
41105
|
+
bannerSrc && /* @__PURE__ */ jsx162(
|
|
40762
41106
|
"img",
|
|
40763
41107
|
{
|
|
40764
41108
|
src: bannerSrc,
|
|
@@ -40766,23 +41110,23 @@ var CreatorActionHeader = ({
|
|
|
40766
41110
|
alt: "Banner"
|
|
40767
41111
|
}
|
|
40768
41112
|
),
|
|
40769
|
-
/* @__PURE__ */
|
|
41113
|
+
/* @__PURE__ */ jsx162("div", { className: "absolute inset-0 bg-black/5" })
|
|
40770
41114
|
] }),
|
|
40771
|
-
/* @__PURE__ */
|
|
40772
|
-
/* @__PURE__ */
|
|
40773
|
-
/* @__PURE__ */
|
|
40774
|
-
/* @__PURE__ */
|
|
40775
|
-
/* @__PURE__ */
|
|
41115
|
+
/* @__PURE__ */ jsxs122("div", { className: "px-8 pb-8 flex flex-col md:flex-row md:items-end justify-between gap-6 -mt-12 relative z-10", children: [
|
|
41116
|
+
/* @__PURE__ */ jsxs122("div", { className: "flex flex-col md:flex-row items-start md:items-end gap-6", children: [
|
|
41117
|
+
/* @__PURE__ */ jsx162("div", { className: "p-2 bg-white rounded-[32px] shadow-lg", children: /* @__PURE__ */ jsxs122(Avatar, { className: "h-32 w-32 rounded-[24px] border-4 border-white", children: [
|
|
41118
|
+
/* @__PURE__ */ jsx162(AvatarImage, { src: avatarSrc, className: "rounded-[24px]" }),
|
|
41119
|
+
/* @__PURE__ */ jsx162(AvatarFallback, { className: "rounded-[24px] bg-purple-50 text-purple-600 text-3xl font-bold", children: name.charAt(0) })
|
|
40776
41120
|
] }) }),
|
|
40777
|
-
/* @__PURE__ */
|
|
40778
|
-
/* @__PURE__ */
|
|
40779
|
-
/* @__PURE__ */
|
|
41121
|
+
/* @__PURE__ */ jsxs122("div", { className: "mb-2", children: [
|
|
41122
|
+
/* @__PURE__ */ jsx162("h1", { className: "text-3xl font-bold text-gray-900 tracking-tight", children: name }),
|
|
41123
|
+
/* @__PURE__ */ jsxs122("p", { className: "text-purple-600 font-medium tracking-wide", children: [
|
|
40780
41124
|
"@",
|
|
40781
41125
|
handle
|
|
40782
41126
|
] })
|
|
40783
41127
|
] })
|
|
40784
41128
|
] }),
|
|
40785
|
-
/* @__PURE__ */
|
|
41129
|
+
/* @__PURE__ */ jsx162("div", { className: "flex items-center gap-3 mb-2", children: actions.map((action, i) => /* @__PURE__ */ jsx162(
|
|
40786
41130
|
Button,
|
|
40787
41131
|
{
|
|
40788
41132
|
variant: action.variant || "default",
|
|
@@ -40801,9 +41145,9 @@ var CreatorActionHeader = ({
|
|
|
40801
41145
|
};
|
|
40802
41146
|
|
|
40803
41147
|
// src/molecules/creator-discovery/CreatorSearchBox/CreatorSearch.tsx
|
|
40804
|
-
import
|
|
40805
|
-
import { jsx as
|
|
40806
|
-
var CreatorSearch =
|
|
41148
|
+
import React111, { useMemo as useMemo8 } from "react";
|
|
41149
|
+
import { jsx as jsx163, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
41150
|
+
var CreatorSearch = React111.memo(
|
|
40807
41151
|
({
|
|
40808
41152
|
selectionStatus,
|
|
40809
41153
|
isLatestMessage = true,
|
|
@@ -40820,7 +41164,7 @@ var CreatorSearch = React110.memo(
|
|
|
40820
41164
|
...field,
|
|
40821
41165
|
renderDisplay: (val) => {
|
|
40822
41166
|
const platforms = Array.isArray(val) ? val : [val];
|
|
40823
|
-
return /* @__PURE__ */
|
|
41167
|
+
return /* @__PURE__ */ jsx163("div", { className: "flex flex-wrap gap-2", children: platforms.map((p) => /* @__PURE__ */ jsx163(
|
|
40824
41168
|
BadgeAtom,
|
|
40825
41169
|
{
|
|
40826
41170
|
id: `platform-${p}`,
|
|
@@ -40837,13 +41181,13 @@ var CreatorSearch = React110.memo(
|
|
|
40837
41181
|
if (field.key === "geography") {
|
|
40838
41182
|
return {
|
|
40839
41183
|
...field,
|
|
40840
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41184
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx163(CountrySelectDisplay, { value: val })
|
|
40841
41185
|
};
|
|
40842
41186
|
}
|
|
40843
41187
|
if (field.key === "keywordBundles") {
|
|
40844
41188
|
return {
|
|
40845
41189
|
...field,
|
|
40846
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41190
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx163(KeywordBundlesDisplay, { value: val })
|
|
40847
41191
|
};
|
|
40848
41192
|
}
|
|
40849
41193
|
if (field.key === "followerRange") {
|
|
@@ -40851,9 +41195,9 @@ var CreatorSearch = React110.memo(
|
|
|
40851
41195
|
...field,
|
|
40852
41196
|
renderDisplay: (val) => {
|
|
40853
41197
|
if (typeof val === "object" && val !== null) {
|
|
40854
|
-
return /* @__PURE__ */
|
|
41198
|
+
return /* @__PURE__ */ jsx163("span", { className: "text-white font-medium", children: `${val.min?.toLocaleString()} - ${val.max?.toLocaleString()} followers` });
|
|
40855
41199
|
}
|
|
40856
|
-
return /* @__PURE__ */
|
|
41200
|
+
return /* @__PURE__ */ jsxs123("span", { className: "text-white font-medium", children: [
|
|
40857
41201
|
val,
|
|
40858
41202
|
" followers"
|
|
40859
41203
|
] });
|
|
@@ -40863,7 +41207,7 @@ var CreatorSearch = React110.memo(
|
|
|
40863
41207
|
if (field.key === "initialCreators") {
|
|
40864
41208
|
return {
|
|
40865
41209
|
...field,
|
|
40866
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41210
|
+
renderDisplay: (val) => /* @__PURE__ */ jsxs123("span", { className: "text-white font-medium", children: [
|
|
40867
41211
|
val,
|
|
40868
41212
|
" creators"
|
|
40869
41213
|
] })
|
|
@@ -40872,7 +41216,7 @@ var CreatorSearch = React110.memo(
|
|
|
40872
41216
|
return field;
|
|
40873
41217
|
});
|
|
40874
41218
|
}, [providedFields, data]);
|
|
40875
|
-
return /* @__PURE__ */
|
|
41219
|
+
return /* @__PURE__ */ jsx163("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx163(
|
|
40876
41220
|
FormCard,
|
|
40877
41221
|
{
|
|
40878
41222
|
...formCardProps,
|
|
@@ -40881,9 +41225,9 @@ var CreatorSearch = React110.memo(
|
|
|
40881
41225
|
fields,
|
|
40882
41226
|
showTimeline: true,
|
|
40883
41227
|
className: cn("font-noto", className),
|
|
40884
|
-
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */
|
|
40885
|
-
/* @__PURE__ */
|
|
40886
|
-
/* @__PURE__ */
|
|
41228
|
+
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs123("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
|
|
41229
|
+
/* @__PURE__ */ jsx163(CircleCheck, { className: "h-3.5 w-3.5" }),
|
|
41230
|
+
/* @__PURE__ */ jsx163("span", { children: selectionStatus === "agent" ? "Suggested by Agent" : "Selected by you" })
|
|
40887
41231
|
] }) : formCardProps.footer
|
|
40888
41232
|
}
|
|
40889
41233
|
) });
|
|
@@ -40892,10 +41236,10 @@ var CreatorSearch = React110.memo(
|
|
|
40892
41236
|
CreatorSearch.displayName = "CreatorSearch";
|
|
40893
41237
|
|
|
40894
41238
|
// src/molecules/creator-discovery/CampaignConceptCard/CampaignConceptCard.tsx
|
|
40895
|
-
import
|
|
41239
|
+
import React112, { useMemo as useMemo9, useState as useState13 } from "react";
|
|
40896
41240
|
import { motion, AnimatePresence } from "framer-motion";
|
|
40897
|
-
import { jsx as
|
|
40898
|
-
var CampaignConceptCard =
|
|
41241
|
+
import { jsx as jsx164, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
41242
|
+
var CampaignConceptCard = React112.memo(
|
|
40899
41243
|
({
|
|
40900
41244
|
index,
|
|
40901
41245
|
isRecommended,
|
|
@@ -40911,7 +41255,7 @@ var CampaignConceptCard = React111.memo(
|
|
|
40911
41255
|
onAction,
|
|
40912
41256
|
...formCardProps
|
|
40913
41257
|
}) => {
|
|
40914
|
-
const [internalIsOpen, setInternalIsOpen] =
|
|
41258
|
+
const [internalIsOpen, setInternalIsOpen] = useState13(false);
|
|
40915
41259
|
const isOpen = controlledIsOpen !== void 0 ? controlledIsOpen : internalIsOpen;
|
|
40916
41260
|
const handleToggle = () => {
|
|
40917
41261
|
if (onToggle) {
|
|
@@ -40967,39 +41311,39 @@ var CampaignConceptCard = React111.memo(
|
|
|
40967
41311
|
label: "Budget Allocation",
|
|
40968
41312
|
renderDisplay: (val) => {
|
|
40969
41313
|
if (!val)
|
|
40970
|
-
return /* @__PURE__ */
|
|
41314
|
+
return /* @__PURE__ */ jsx164("span", { className: "text-muted-foreground text-sm", children: "-" });
|
|
40971
41315
|
if (Array.isArray(val)) {
|
|
40972
|
-
return /* @__PURE__ */
|
|
41316
|
+
return /* @__PURE__ */ jsx164("div", { className: "space-y-2", children: val.map((item, idx) => {
|
|
40973
41317
|
const label = item?.label ?? item?.key ?? `Item ${idx + 1}`;
|
|
40974
41318
|
const value = item?.value ?? item;
|
|
40975
|
-
return /* @__PURE__ */
|
|
40976
|
-
/* @__PURE__ */
|
|
41319
|
+
return /* @__PURE__ */ jsxs124("div", { className: "flex items-center gap-2", children: [
|
|
41320
|
+
/* @__PURE__ */ jsxs124("span", { className: "text-muted-foreground font-medium", children: [
|
|
40977
41321
|
idx + 1,
|
|
40978
41322
|
"."
|
|
40979
41323
|
] }),
|
|
40980
|
-
/* @__PURE__ */
|
|
40981
|
-
/* @__PURE__ */
|
|
40982
|
-
/* @__PURE__ */
|
|
41324
|
+
/* @__PURE__ */ jsx164("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md", children: String(label) }),
|
|
41325
|
+
/* @__PURE__ */ jsx164("span", { className: "text-cardText", children: "=" }),
|
|
41326
|
+
/* @__PURE__ */ jsx164("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-1 text-cardText text-sm rounded-md font-grotesk font-medium", children: formatVal(value) })
|
|
40983
41327
|
] }, idx);
|
|
40984
41328
|
}) });
|
|
40985
41329
|
}
|
|
40986
41330
|
if (typeof val === "object") {
|
|
40987
41331
|
const entries = Object.entries(val);
|
|
40988
41332
|
if (entries.length === 0)
|
|
40989
|
-
return /* @__PURE__ */
|
|
40990
|
-
return /* @__PURE__ */
|
|
40991
|
-
/* @__PURE__ */
|
|
41333
|
+
return /* @__PURE__ */ jsx164("span", { className: "text-muted-foreground text-sm", children: "-" });
|
|
41334
|
+
return /* @__PURE__ */ jsx164("div", { className: "space-y-2", children: entries.map(([k, v], idx) => /* @__PURE__ */ jsxs124("div", { className: "flex items-center gap-2", children: [
|
|
41335
|
+
/* @__PURE__ */ jsxs124("span", { className: "text-muted-foreground font-medium", children: [
|
|
40992
41336
|
idx + 1,
|
|
40993
41337
|
"."
|
|
40994
41338
|
] }),
|
|
40995
|
-
/* @__PURE__ */
|
|
40996
|
-
/* @__PURE__ */
|
|
40997
|
-
/* @__PURE__ */
|
|
41339
|
+
/* @__PURE__ */ jsx164("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md", children: formatKey(k) }),
|
|
41340
|
+
/* @__PURE__ */ jsx164("span", { className: "text-cardText", children: "=" }),
|
|
41341
|
+
/* @__PURE__ */ jsx164("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-1 text-cardText text-sm rounded-md font-grotesk font-medium", children: formatVal(v) })
|
|
40998
41342
|
] }, k)) });
|
|
40999
41343
|
}
|
|
41000
|
-
return /* @__PURE__ */
|
|
41344
|
+
return /* @__PURE__ */ jsx164("span", { className: "text-muted-foreground text-sm", children: String(val) });
|
|
41001
41345
|
},
|
|
41002
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41346
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx164(
|
|
41003
41347
|
Textarea,
|
|
41004
41348
|
{
|
|
41005
41349
|
value: typeof v === "object" ? Object.entries(v || {}).map(([k, val]) => `${k.replace(/_/g, " ")}: ${val}`).join("\n") : String(v || ""),
|
|
@@ -41024,8 +41368,8 @@ var CampaignConceptCard = React111.memo(
|
|
|
41024
41368
|
return {
|
|
41025
41369
|
...field,
|
|
41026
41370
|
label: "Geography",
|
|
41027
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
41028
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41371
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx164(CountrySelectDisplay, { value: v }),
|
|
41372
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx164(CountrySelectEdit, { value: v, onChange })
|
|
41029
41373
|
};
|
|
41030
41374
|
}
|
|
41031
41375
|
if (field.key === "estimatedCreators" || field.key === "estimated_creators") {
|
|
@@ -41034,11 +41378,11 @@ var CampaignConceptCard = React111.memo(
|
|
|
41034
41378
|
label: "Estimated Creators",
|
|
41035
41379
|
renderDisplay: (val) => {
|
|
41036
41380
|
if (!val)
|
|
41037
|
-
return /* @__PURE__ */
|
|
41381
|
+
return /* @__PURE__ */ jsx164("span", { className: "text-muted-foreground text-sm", children: "-" });
|
|
41038
41382
|
const displayValue = typeof val === "object" && !Array.isArray(val) ? `${val.min ?? 0}-${val.max ?? 0}` : String(val);
|
|
41039
|
-
return /* @__PURE__ */
|
|
41383
|
+
return /* @__PURE__ */ jsx164("span", { className: "text-cardText text-sm", children: displayValue });
|
|
41040
41384
|
},
|
|
41041
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41385
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx164(
|
|
41042
41386
|
Input,
|
|
41043
41387
|
{
|
|
41044
41388
|
value: typeof v === "object" ? `${v.min ?? 0}-${v.max ?? 0}` : String(v || ""),
|
|
@@ -41061,8 +41405,8 @@ var CampaignConceptCard = React111.memo(
|
|
|
41061
41405
|
return {
|
|
41062
41406
|
...field,
|
|
41063
41407
|
label: field.label || "Primary KPI",
|
|
41064
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41065
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41408
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx164("span", { className: "text-cardText text-sm", children: val ? String(val) : "-" }),
|
|
41409
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx164(
|
|
41066
41410
|
Input,
|
|
41067
41411
|
{
|
|
41068
41412
|
value: String(v || ""),
|
|
@@ -41079,9 +41423,9 @@ var CampaignConceptCard = React111.memo(
|
|
|
41079
41423
|
label: field.label || "Secondary KPIs",
|
|
41080
41424
|
renderDisplay: (val) => {
|
|
41081
41425
|
const display = Array.isArray(val) ? val.map(String).join(", ") : val ? String(val) : "-";
|
|
41082
|
-
return /* @__PURE__ */
|
|
41426
|
+
return /* @__PURE__ */ jsx164("span", { className: "text-cardText text-sm", children: display });
|
|
41083
41427
|
},
|
|
41084
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41428
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx164(
|
|
41085
41429
|
Textarea,
|
|
41086
41430
|
{
|
|
41087
41431
|
value: Array.isArray(v) ? v.join(", ") : String(v || ""),
|
|
@@ -41098,15 +41442,15 @@ var CampaignConceptCard = React111.memo(
|
|
|
41098
41442
|
if (field.key === "platforms" || field.key === "target_platforms" || field.key === "targetPlatforms") {
|
|
41099
41443
|
return {
|
|
41100
41444
|
...field,
|
|
41101
|
-
renderDisplay: (v) => /* @__PURE__ */
|
|
41102
|
-
renderEdit: (v, onChange) => /* @__PURE__ */
|
|
41445
|
+
renderDisplay: (v) => /* @__PURE__ */ jsx164(PlatformSelectDisplay, { value: v }),
|
|
41446
|
+
renderEdit: (v, onChange) => /* @__PURE__ */ jsx164(PlatformSelectEdit, { value: v, onChange })
|
|
41103
41447
|
};
|
|
41104
41448
|
}
|
|
41105
41449
|
if (field.key === "description" || field.key === "creator_strategy" || field.key === "creatorStrategy") {
|
|
41106
41450
|
return {
|
|
41107
41451
|
...field,
|
|
41108
41452
|
type: "textarea",
|
|
41109
|
-
renderDisplay: (val) => /* @__PURE__ */
|
|
41453
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx164("span", { className: "text-cardText text-sm leading-relaxed", children: val ? String(val) : "-" })
|
|
41110
41454
|
};
|
|
41111
41455
|
}
|
|
41112
41456
|
return {
|
|
@@ -41114,10 +41458,10 @@ var CampaignConceptCard = React111.memo(
|
|
|
41114
41458
|
renderDisplay: (val) => {
|
|
41115
41459
|
if (Array.isArray(val)) {
|
|
41116
41460
|
if (val.length === 0)
|
|
41117
|
-
return /* @__PURE__ */
|
|
41118
|
-
return /* @__PURE__ */
|
|
41461
|
+
return /* @__PURE__ */ jsx164("span", { className: "text-muted-foreground text-sm", children: "-" });
|
|
41462
|
+
return /* @__PURE__ */ jsx164("div", { className: "flex flex-wrap gap-2 pt-1", children: val.map((item, idx) => {
|
|
41119
41463
|
const label = typeof item === "object" && item !== null ? item.label || item.value || item.name || JSON.stringify(item) : String(item);
|
|
41120
|
-
return /* @__PURE__ */
|
|
41464
|
+
return /* @__PURE__ */ jsx164(
|
|
41121
41465
|
"span",
|
|
41122
41466
|
{
|
|
41123
41467
|
className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md",
|
|
@@ -41128,14 +41472,14 @@ var CampaignConceptCard = React111.memo(
|
|
|
41128
41472
|
}) });
|
|
41129
41473
|
}
|
|
41130
41474
|
if (typeof val === "object" && val !== null) {
|
|
41131
|
-
return /* @__PURE__ */
|
|
41475
|
+
return /* @__PURE__ */ jsx164("div", { className: "text-muted-foreground text-xs font-mono bg-paperBackground p-2 rounded mt-1 overflow-auto max-h-24", children: Object.entries(val).map(([k, v]) => `${k.replace(/_/g, " ")}: ${v}`).join("\n") });
|
|
41132
41476
|
}
|
|
41133
|
-
return /* @__PURE__ */
|
|
41477
|
+
return /* @__PURE__ */ jsx164("span", { className: "text-cardText text-sm", children: val !== void 0 && val !== null ? String(val) : "-" });
|
|
41134
41478
|
}
|
|
41135
41479
|
};
|
|
41136
41480
|
});
|
|
41137
41481
|
}, [providedFields, data]);
|
|
41138
|
-
return /* @__PURE__ */
|
|
41482
|
+
return /* @__PURE__ */ jsxs124(
|
|
41139
41483
|
"div",
|
|
41140
41484
|
{
|
|
41141
41485
|
className: cn(
|
|
@@ -41144,31 +41488,31 @@ var CampaignConceptCard = React111.memo(
|
|
|
41144
41488
|
className
|
|
41145
41489
|
),
|
|
41146
41490
|
children: [
|
|
41147
|
-
/* @__PURE__ */
|
|
41491
|
+
/* @__PURE__ */ jsxs124(
|
|
41148
41492
|
"div",
|
|
41149
41493
|
{
|
|
41150
41494
|
className: "px-4 py-2.5 relative flex items-center justify-between cursor-pointer select-none",
|
|
41151
41495
|
onClick: handleToggle,
|
|
41152
41496
|
children: [
|
|
41153
|
-
/* @__PURE__ */
|
|
41154
|
-
/* @__PURE__ */
|
|
41497
|
+
/* @__PURE__ */ jsxs124("div", { className: "flex-1", children: [
|
|
41498
|
+
/* @__PURE__ */ jsxs124("h3", { className: "text-cardText font-semibold text-sm", children: [
|
|
41155
41499
|
"Concept ",
|
|
41156
41500
|
index !== void 0 ? index : "",
|
|
41157
41501
|
" :",
|
|
41158
41502
|
" ",
|
|
41159
41503
|
typeof cardTitle === "object" ? JSON.stringify(cardTitle) : String(cardTitle)
|
|
41160
41504
|
] }),
|
|
41161
|
-
/* @__PURE__ */
|
|
41162
|
-
isRecommended && /* @__PURE__ */
|
|
41163
|
-
!effectiveIsLatest && selectionStatus && /* @__PURE__ */
|
|
41505
|
+
/* @__PURE__ */ jsxs124("div", { className: "flex flex-wrap gap-2", children: [
|
|
41506
|
+
isRecommended && /* @__PURE__ */ jsx164("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-gold", children: "Recommended" }),
|
|
41507
|
+
!effectiveIsLatest && selectionStatus && /* @__PURE__ */ jsx164("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-gold", children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
|
|
41164
41508
|
] })
|
|
41165
41509
|
] }),
|
|
41166
|
-
/* @__PURE__ */
|
|
41510
|
+
/* @__PURE__ */ jsx164(
|
|
41167
41511
|
"div",
|
|
41168
41512
|
{
|
|
41169
41513
|
className: "flex items-center gap-2 ml-3",
|
|
41170
41514
|
onClick: (e) => e.stopPropagation(),
|
|
41171
|
-
children: /* @__PURE__ */
|
|
41515
|
+
children: /* @__PURE__ */ jsx164(
|
|
41172
41516
|
"button",
|
|
41173
41517
|
{
|
|
41174
41518
|
onClick: (e) => {
|
|
@@ -41179,7 +41523,7 @@ var CampaignConceptCard = React111.memo(
|
|
|
41179
41523
|
className: "p-2 bg-cardSurface hover:bg-gray200 text-cardText rounded-lg",
|
|
41180
41524
|
"aria-label": isOpen ? "Collapse" : "Expand",
|
|
41181
41525
|
title: isOpen ? "Collapse" : "Expand",
|
|
41182
|
-
children: /* @__PURE__ */
|
|
41526
|
+
children: /* @__PURE__ */ jsx164(
|
|
41183
41527
|
ChevronDown,
|
|
41184
41528
|
{
|
|
41185
41529
|
className: `h-4 w-4 transition-transform ${isOpen ? "rotate-0" : "-rotate-90"}`
|
|
@@ -41192,7 +41536,7 @@ var CampaignConceptCard = React111.memo(
|
|
|
41192
41536
|
]
|
|
41193
41537
|
}
|
|
41194
41538
|
),
|
|
41195
|
-
/* @__PURE__ */
|
|
41539
|
+
/* @__PURE__ */ jsx164(AnimatePresence, { initial: false, children: isOpen && /* @__PURE__ */ jsx164(
|
|
41196
41540
|
motion.div,
|
|
41197
41541
|
{
|
|
41198
41542
|
initial: { height: 0, opacity: 0 },
|
|
@@ -41200,8 +41544,8 @@ var CampaignConceptCard = React111.memo(
|
|
|
41200
41544
|
exit: { height: 0, opacity: 0 },
|
|
41201
41545
|
transition: { duration: 0.2, ease: "easeIn" },
|
|
41202
41546
|
className: "overflow-hidden",
|
|
41203
|
-
children: /* @__PURE__ */
|
|
41204
|
-
/* @__PURE__ */
|
|
41547
|
+
children: /* @__PURE__ */ jsxs124("div", { className: "px-3 py-2 w-full relative", children: [
|
|
41548
|
+
/* @__PURE__ */ jsx164(
|
|
41205
41549
|
"div",
|
|
41206
41550
|
{
|
|
41207
41551
|
className: "absolute left-[48px] top-[70px] bottom-[40px] w-[2px]",
|
|
@@ -41210,7 +41554,7 @@ var CampaignConceptCard = React111.memo(
|
|
|
41210
41554
|
}
|
|
41211
41555
|
}
|
|
41212
41556
|
),
|
|
41213
|
-
/* @__PURE__ */
|
|
41557
|
+
/* @__PURE__ */ jsx164(
|
|
41214
41558
|
FormCard,
|
|
41215
41559
|
{
|
|
41216
41560
|
...formCardProps,
|
|
@@ -41224,9 +41568,9 @@ var CampaignConceptCard = React111.memo(
|
|
|
41224
41568
|
hideTitle: true,
|
|
41225
41569
|
hideCopyButton: true,
|
|
41226
41570
|
className: "bg-transparent border-none shadow-none mb-0 p-0",
|
|
41227
|
-
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */
|
|
41228
|
-
/* @__PURE__ */
|
|
41229
|
-
/* @__PURE__ */
|
|
41571
|
+
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs124("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-2 pr-4", children: [
|
|
41572
|
+
/* @__PURE__ */ jsx164(CircleCheck, { className: "h-3.5 w-3.5" }),
|
|
41573
|
+
/* @__PURE__ */ jsx164("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
|
|
41230
41574
|
] }) : formCardProps.footer
|
|
41231
41575
|
}
|
|
41232
41576
|
)
|
|
@@ -41242,14 +41586,14 @@ var CampaignConceptCard = React111.memo(
|
|
|
41242
41586
|
CampaignConceptCard.displayName = "CampaignConceptCard";
|
|
41243
41587
|
|
|
41244
41588
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
|
|
41245
|
-
import { useCallback as
|
|
41589
|
+
import { useCallback as useCallback9, useState as useState21, memo } from "react";
|
|
41246
41590
|
|
|
41247
41591
|
// src/molecules/creator-discovery/CreatorWidget/CreatorImageList.tsx
|
|
41248
|
-
import { useEffect as
|
|
41249
|
-
import { Fragment as
|
|
41592
|
+
import { useEffect as useEffect9, useState as useState14 } from "react";
|
|
41593
|
+
import { Fragment as Fragment7, jsx as jsx165, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
41250
41594
|
function useMediaQuery(query) {
|
|
41251
|
-
const [matches, setMatches] =
|
|
41252
|
-
|
|
41595
|
+
const [matches, setMatches] = useState14(false);
|
|
41596
|
+
useEffect9(() => {
|
|
41253
41597
|
const media = window.matchMedia(query);
|
|
41254
41598
|
const listener = () => setMatches(media.matches);
|
|
41255
41599
|
listener();
|
|
@@ -41267,8 +41611,8 @@ function CreatorImage({
|
|
|
41267
41611
|
const processedCount = Math.floor(creatorsPercentage / 100 * totalCreators);
|
|
41268
41612
|
const isProcessed = idx < processedCount;
|
|
41269
41613
|
const isCurrentlyProcessing = idx === processedCount;
|
|
41270
|
-
return /* @__PURE__ */
|
|
41271
|
-
/* @__PURE__ */
|
|
41614
|
+
return /* @__PURE__ */ jsxs125("div", { className: "relative w-8 h-8", children: [
|
|
41615
|
+
/* @__PURE__ */ jsx165(
|
|
41272
41616
|
"img",
|
|
41273
41617
|
{
|
|
41274
41618
|
src: img,
|
|
@@ -41276,9 +41620,9 @@ function CreatorImage({
|
|
|
41276
41620
|
className: `w-8 h-8 rounded-full border-2 ${isProcessed ? "border-green-600" : "border-foreground"} object-cover transition-all duration-300`
|
|
41277
41621
|
}
|
|
41278
41622
|
),
|
|
41279
|
-
!isProcessed && /* @__PURE__ */
|
|
41280
|
-
isCurrentlyProcessing && /* @__PURE__ */
|
|
41281
|
-
/* @__PURE__ */
|
|
41623
|
+
!isProcessed && /* @__PURE__ */ jsx165("div", { className: "absolute inset-0 bg-black/50 rounded-full pointer-events-none" }),
|
|
41624
|
+
isCurrentlyProcessing && /* @__PURE__ */ jsxs125(Fragment7, { children: [
|
|
41625
|
+
/* @__PURE__ */ jsx165(
|
|
41282
41626
|
"div",
|
|
41283
41627
|
{
|
|
41284
41628
|
className: "absolute inset-0 bg-black/50 rounded-full pointer-events-none",
|
|
@@ -41294,7 +41638,7 @@ function CreatorImage({
|
|
|
41294
41638
|
}
|
|
41295
41639
|
}
|
|
41296
41640
|
),
|
|
41297
|
-
/* @__PURE__ */
|
|
41641
|
+
/* @__PURE__ */ jsx165("div", { className: "absolute inset-0 rounded-full border-2 border-[#9CA3AF]/30 pointer-events-none" })
|
|
41298
41642
|
] })
|
|
41299
41643
|
] });
|
|
41300
41644
|
}
|
|
@@ -41307,8 +41651,8 @@ function CreatorImageList({
|
|
|
41307
41651
|
const isMobile = useMediaQuery("(max-width: 640px)");
|
|
41308
41652
|
const isTablet = useMediaQuery("(min-width: 641px) and (max-width: 1024px)");
|
|
41309
41653
|
const visibleCount = isMobile ? 7 : isTablet ? 10 : isAgentOutput ? 6 : 15;
|
|
41310
|
-
return /* @__PURE__ */
|
|
41311
|
-
creatorImages.slice(0, visibleCount).map((img, idx) => /* @__PURE__ */
|
|
41654
|
+
return /* @__PURE__ */ jsxs125("div", { className: "flex flex-nowrap sm:flex-wrap -space-x-2 w-fit", children: [
|
|
41655
|
+
creatorImages.slice(0, visibleCount).map((img, idx) => /* @__PURE__ */ jsx165(
|
|
41312
41656
|
CreatorImage,
|
|
41313
41657
|
{
|
|
41314
41658
|
img,
|
|
@@ -41318,7 +41662,7 @@ function CreatorImageList({
|
|
|
41318
41662
|
},
|
|
41319
41663
|
idx
|
|
41320
41664
|
)),
|
|
41321
|
-
creatorLength > visibleCount && /* @__PURE__ */
|
|
41665
|
+
creatorLength > visibleCount && /* @__PURE__ */ jsxs125(
|
|
41322
41666
|
"div",
|
|
41323
41667
|
{
|
|
41324
41668
|
className: `relative w-8 h-8 rounded-full text-white flex items-center justify-center text-sm font-medium border-2 ${initialCreatorsPercentage === 100 ? "border-green-600 bg-sliderFill" : "border-foreground bg-black/50"}`,
|
|
@@ -41332,28 +41676,28 @@ function CreatorImageList({
|
|
|
41332
41676
|
}
|
|
41333
41677
|
|
|
41334
41678
|
// src/molecules/creator-discovery/CreatorWidget/CreatorProgressBar.tsx
|
|
41335
|
-
import { useEffect as
|
|
41679
|
+
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
41336
41680
|
import { motion as motion2, AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
41337
|
-
import { jsx as
|
|
41681
|
+
import { jsx as jsx166, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
41338
41682
|
function truncateName(name, maxLength) {
|
|
41339
41683
|
if (!name || name.length <= maxLength) return name || "";
|
|
41340
41684
|
return name.substring(0, maxLength) + "...";
|
|
41341
41685
|
}
|
|
41342
41686
|
function ProgressBar({ overallPercentage }) {
|
|
41343
|
-
const [showTooltip, setShowTooltip] =
|
|
41344
|
-
|
|
41687
|
+
const [showTooltip, setShowTooltip] = useState15(true);
|
|
41688
|
+
useEffect10(() => {
|
|
41345
41689
|
if (overallPercentage && overallPercentage >= 100) {
|
|
41346
41690
|
setShowTooltip(false);
|
|
41347
41691
|
}
|
|
41348
41692
|
}, [overallPercentage]);
|
|
41349
|
-
return /* @__PURE__ */
|
|
41693
|
+
return /* @__PURE__ */ jsx166("div", { className: "relative w-full", children: /* @__PURE__ */ jsx166("div", { className: "md:w-full dark:bg-purple500 bg-gray-200 rounded-full h-[6px]", children: /* @__PURE__ */ jsx166(
|
|
41350
41694
|
motion2.div,
|
|
41351
41695
|
{
|
|
41352
41696
|
className: "bg-purple100 h-[6px] rounded-full relative",
|
|
41353
41697
|
initial: { width: 0 },
|
|
41354
41698
|
animate: { width: `${overallPercentage}%` },
|
|
41355
41699
|
transition: { duration: 0.5, ease: "easeOut" },
|
|
41356
|
-
children: /* @__PURE__ */
|
|
41700
|
+
children: /* @__PURE__ */ jsx166(AnimatePresence2, { children: showTooltip && /* @__PURE__ */ jsxs126(
|
|
41357
41701
|
motion2.div,
|
|
41358
41702
|
{
|
|
41359
41703
|
initial: { opacity: 0, y: 5 },
|
|
@@ -41363,9 +41707,9 @@ function ProgressBar({ overallPercentage }) {
|
|
|
41363
41707
|
children: [
|
|
41364
41708
|
overallPercentage ? Math.round(overallPercentage) : 0,
|
|
41365
41709
|
"%",
|
|
41366
|
-
/* @__PURE__ */
|
|
41367
|
-
/* @__PURE__ */
|
|
41368
|
-
/* @__PURE__ */
|
|
41710
|
+
/* @__PURE__ */ jsxs126("div", { className: "absolute left-1/2 top-full -translate-x-1/2", children: [
|
|
41711
|
+
/* @__PURE__ */ jsx166("div", { className: "w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-transparent border-t-gray300" }),
|
|
41712
|
+
/* @__PURE__ */ jsx166("div", { className: "absolute left-1/2 top-[-1px] -translate-x-1/2 w-0 h-0 border-l-[5px] border-r-[5px] border-t-[5px] border-transparent border-t-gray50" })
|
|
41369
41713
|
] })
|
|
41370
41714
|
]
|
|
41371
41715
|
}
|
|
@@ -41377,38 +41721,38 @@ function CreatorProgressBar({
|
|
|
41377
41721
|
statusDetails,
|
|
41378
41722
|
timeRemaining: _timeRemaining
|
|
41379
41723
|
}) {
|
|
41380
|
-
return /* @__PURE__ */
|
|
41381
|
-
/* @__PURE__ */
|
|
41382
|
-
/* @__PURE__ */
|
|
41724
|
+
return /* @__PURE__ */ jsxs126("div", { children: [
|
|
41725
|
+
/* @__PURE__ */ jsx166(ProgressBar, { overallPercentage: statusDetails?.overall_percentage }),
|
|
41726
|
+
/* @__PURE__ */ jsx166("div", { className: "dark:text-gray400 text-gray-500 text-xs mt-2", children: (statusDetails?.overall_percentage ?? 0) < 100 && /* @__PURE__ */ jsx166("span", { children: statusDetails?.thinking_message ? truncateName(statusDetails.thinking_message, 200) : "Processing..." }) })
|
|
41383
41727
|
] });
|
|
41384
41728
|
}
|
|
41385
41729
|
|
|
41386
41730
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidgetSkeleton.tsx
|
|
41387
|
-
import { jsx as
|
|
41731
|
+
import { jsx as jsx167, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
41388
41732
|
function CreatorWidgetSkeleton() {
|
|
41389
|
-
return /* @__PURE__ */
|
|
41390
|
-
/* @__PURE__ */
|
|
41391
|
-
/* @__PURE__ */
|
|
41392
|
-
/* @__PURE__ */
|
|
41733
|
+
return /* @__PURE__ */ jsx167("div", { className: "bg-background dark:bg-gray50 rounded-[25px] border border-gray300 overflow-hidden shadow-sm w-full relative", children: /* @__PURE__ */ jsxs127("div", { className: "p-4 md:p-6 space-y-4", children: [
|
|
41734
|
+
/* @__PURE__ */ jsx167("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 relative", children: /* @__PURE__ */ jsxs127("div", { className: "flex flex-col gap-2 md:gap-4", children: [
|
|
41735
|
+
/* @__PURE__ */ jsx167("div", { className: "w-40 h-6 bg-purple200 rounded-md animate-pulse" }),
|
|
41736
|
+
/* @__PURE__ */ jsx167("div", { className: "w-64 h-7 bg-gray200 dark:bg-gray300 rounded animate-pulse" })
|
|
41393
41737
|
] }) }),
|
|
41394
|
-
/* @__PURE__ */
|
|
41395
|
-
/* @__PURE__ */
|
|
41396
|
-
/* @__PURE__ */
|
|
41738
|
+
/* @__PURE__ */ jsxs127("div", { className: "bg-paperBackground rounded-lg px-3 md:px-4 py-4 md:py-5 flex flex-col md:flex-row md:items-center md:justify-between gap-4 md:gap-0", children: [
|
|
41739
|
+
/* @__PURE__ */ jsxs127("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
|
|
41740
|
+
/* @__PURE__ */ jsx167("div", { className: "flex -space-x-2", children: Array.from({ length: 10 }).map((_, idx) => /* @__PURE__ */ jsx167(
|
|
41397
41741
|
"div",
|
|
41398
41742
|
{
|
|
41399
41743
|
className: "w-8 h-8 md:w-10 md:h-10 rounded-full border-2 border-gray300 bg-gray200 animate-pulse"
|
|
41400
41744
|
},
|
|
41401
41745
|
idx
|
|
41402
41746
|
)) }),
|
|
41403
|
-
/* @__PURE__ */
|
|
41747
|
+
/* @__PURE__ */ jsx167("div", { className: "space-y-2", children: /* @__PURE__ */ jsx167("div", { className: "w-full max-w-xs bg-gray200 rounded-full h-2 animate-pulse" }) })
|
|
41404
41748
|
] }),
|
|
41405
|
-
/* @__PURE__ */
|
|
41749
|
+
/* @__PURE__ */ jsx167("div", { className: "px-6 py-2 bg-gray200 rounded-[30px] animate-pulse h-10 w-48" })
|
|
41406
41750
|
] })
|
|
41407
41751
|
] }) });
|
|
41408
41752
|
}
|
|
41409
41753
|
|
|
41410
41754
|
// src/molecules/creator-discovery/CreatorWidget/CreatorCompactView.tsx
|
|
41411
|
-
import { Fragment as
|
|
41755
|
+
import { Fragment as Fragment8, jsx as jsx168, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
41412
41756
|
function CreatorCompactView({
|
|
41413
41757
|
versions,
|
|
41414
41758
|
selectedVersion,
|
|
@@ -41425,16 +41769,16 @@ function CreatorCompactView({
|
|
|
41425
41769
|
const isComplete = versionStatus === "completed" || versionStatus === "complete";
|
|
41426
41770
|
const statusTitle = isComplete ? "Creator Search Complete" : versionStatus === "failed" ? "Creator Search Failed" : "Creator Search Processing";
|
|
41427
41771
|
if (isLoading) {
|
|
41428
|
-
return /* @__PURE__ */
|
|
41772
|
+
return /* @__PURE__ */ jsx168(CreatorWidgetSkeleton, {});
|
|
41429
41773
|
}
|
|
41430
|
-
return /* @__PURE__ */
|
|
41431
|
-
/* @__PURE__ */
|
|
41432
|
-
/* @__PURE__ */
|
|
41433
|
-
/* @__PURE__ */
|
|
41434
|
-
/* @__PURE__ */
|
|
41774
|
+
return /* @__PURE__ */ jsx168("div", { className: "bg-background dark:bg-gray100 rounded-[25px] border border-gray300 overflow-hidden shadow-sm w-full relative", children: /* @__PURE__ */ jsxs128("div", { className: "p-4 md:p-6 space-y-4", children: [
|
|
41775
|
+
/* @__PURE__ */ jsxs128("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 relative", children: [
|
|
41776
|
+
/* @__PURE__ */ jsxs128("div", { className: "flex flex-col gap-2 md:gap-4", children: [
|
|
41777
|
+
/* @__PURE__ */ jsx168("h4", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] text-xs font-medium text-purpleText", children: "VERIFIED CREATORS LIST" }),
|
|
41778
|
+
/* @__PURE__ */ jsx168("h3", { className: "text-gray900 md:text-lg font-bold", children: statusTitle })
|
|
41435
41779
|
] }),
|
|
41436
|
-
versions.length > 1 && /* @__PURE__ */
|
|
41437
|
-
/* @__PURE__ */
|
|
41780
|
+
versions.length > 1 && /* @__PURE__ */ jsx168("div", { className: "relative md:self-start", children: /* @__PURE__ */ jsxs128(DropdownMenu, { children: [
|
|
41781
|
+
/* @__PURE__ */ jsxs128(
|
|
41438
41782
|
DropdownMenuTrigger,
|
|
41439
41783
|
{
|
|
41440
41784
|
disabled: !isComplete,
|
|
@@ -41442,11 +41786,11 @@ function CreatorCompactView({
|
|
|
41442
41786
|
children: [
|
|
41443
41787
|
"Version ",
|
|
41444
41788
|
selectedVersion ?? "-",
|
|
41445
|
-
/* @__PURE__ */
|
|
41789
|
+
/* @__PURE__ */ jsx168(ChevronDown, { className: "w-3 h-3 md:w-4 md:h-4 transition-transform" })
|
|
41446
41790
|
]
|
|
41447
41791
|
}
|
|
41448
41792
|
),
|
|
41449
|
-
/* @__PURE__ */
|
|
41793
|
+
/* @__PURE__ */ jsx168(DropdownMenuContent, { className: "bg-gray25 border-2 border-gray400 min-w-[120px] max-h-[150px] overflow-y-auto", children: versions.map((v) => /* @__PURE__ */ jsxs128(
|
|
41450
41794
|
DropdownMenuItem,
|
|
41451
41795
|
{
|
|
41452
41796
|
onClick: () => onVersionSelect(v),
|
|
@@ -41460,12 +41804,12 @@ function CreatorCompactView({
|
|
|
41460
41804
|
)) })
|
|
41461
41805
|
] }) })
|
|
41462
41806
|
] }),
|
|
41463
|
-
/* @__PURE__ */
|
|
41464
|
-
/* @__PURE__ */
|
|
41465
|
-
/* @__PURE__ */
|
|
41466
|
-
] }) : /* @__PURE__ */
|
|
41467
|
-
/* @__PURE__ */
|
|
41468
|
-
/* @__PURE__ */
|
|
41807
|
+
/* @__PURE__ */ jsx168("div", { className: "bg-paperBackground rounded-lg px-3 md:px-4 py-4 md:py-5 flex flex-col md:flex-row md:items-center md:justify-between gap-4 md:gap-0", children: versionStatus === "failed" ? /* @__PURE__ */ jsxs128("div", { className: "flex flex-col items-center justify-center w-full py-6 md:py-8 text-center text-red-500", children: [
|
|
41808
|
+
/* @__PURE__ */ jsx168("p", { className: "text-base md:text-lg font-semibold mb-2", children: "Creator Search Failed" }),
|
|
41809
|
+
/* @__PURE__ */ jsx168("p", { className: "text-xs md:text-sm text-gray600 px-2", children: "Something went wrong while fetching creators. Please try again later or regenerate a new version." })
|
|
41810
|
+
] }) : /* @__PURE__ */ jsxs128(Fragment8, { children: [
|
|
41811
|
+
/* @__PURE__ */ jsxs128("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
|
|
41812
|
+
/* @__PURE__ */ jsx168(
|
|
41469
41813
|
CreatorImageList,
|
|
41470
41814
|
{
|
|
41471
41815
|
creatorImages,
|
|
@@ -41474,7 +41818,7 @@ function CreatorCompactView({
|
|
|
41474
41818
|
initialCreatorsPercentage: statusDetails?.social_fetch_percentage
|
|
41475
41819
|
}
|
|
41476
41820
|
),
|
|
41477
|
-
/* @__PURE__ */
|
|
41821
|
+
/* @__PURE__ */ jsx168(
|
|
41478
41822
|
CreatorProgressBar,
|
|
41479
41823
|
{
|
|
41480
41824
|
statusDetails,
|
|
@@ -41482,7 +41826,7 @@ function CreatorCompactView({
|
|
|
41482
41826
|
}
|
|
41483
41827
|
)
|
|
41484
41828
|
] }),
|
|
41485
|
-
/* @__PURE__ */
|
|
41829
|
+
/* @__PURE__ */ jsxs128(
|
|
41486
41830
|
"button",
|
|
41487
41831
|
{
|
|
41488
41832
|
className: `px-4 py-2 text-xs md:text-sm rounded-[30px] shadow flex items-center justify-center gap-2 w-full md:w-auto md:flex-shrink-0 whitespace-nowrap ${!isComplete ? "bg-gray300 text-gray500 border-2 border-gray300 cursor-not-allowed" : "bg-purpleLight dark:bg-purple200 text-purpleText2 dark:text-purpleText border-2 border-purple100 cursor-pointer hover:bg-purpleText1 dark:hover:bg-purple100 dark:hover:text-background"}`,
|
|
@@ -41492,7 +41836,7 @@ function CreatorCompactView({
|
|
|
41492
41836
|
"View ",
|
|
41493
41837
|
creatorLength,
|
|
41494
41838
|
" Verified Creators",
|
|
41495
|
-
/* @__PURE__ */
|
|
41839
|
+
/* @__PURE__ */ jsx168(Triangle, { className: "w-3 h-3 md:w-4 md:h-4 rotate-90 font-bold" })
|
|
41496
41840
|
]
|
|
41497
41841
|
}
|
|
41498
41842
|
)
|
|
@@ -41501,7 +41845,7 @@ function CreatorCompactView({
|
|
|
41501
41845
|
}
|
|
41502
41846
|
|
|
41503
41847
|
// src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
|
|
41504
|
-
import { useState as
|
|
41848
|
+
import { useState as useState19, useEffect as useEffect12, useCallback as useCallback7 } from "react";
|
|
41505
41849
|
import ReactDOM2 from "react-dom";
|
|
41506
41850
|
import { AnimatePresence as AnimatePresence4, motion as motion5 } from "framer-motion";
|
|
41507
41851
|
|
|
@@ -41783,7 +42127,7 @@ var normalizeToIso2 = (input) => {
|
|
|
41783
42127
|
};
|
|
41784
42128
|
|
|
41785
42129
|
// src/molecules/creator-discovery/CreatorWidget/EngagedAudienceDemographics.tsx
|
|
41786
|
-
import { jsx as
|
|
42130
|
+
import { jsx as jsx169, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
41787
42131
|
function EngagedAudienceDemographics({
|
|
41788
42132
|
audienceDemographics
|
|
41789
42133
|
}) {
|
|
@@ -41801,31 +42145,31 @@ function EngagedAudienceDemographics({
|
|
|
41801
42145
|
if (hasAges) columns.push("1fr");
|
|
41802
42146
|
if (hasGenders) columns.push("0.4fr");
|
|
41803
42147
|
const gridTemplate = columns.join(" ");
|
|
41804
|
-
return /* @__PURE__ */
|
|
41805
|
-
/* @__PURE__ */
|
|
41806
|
-
/* @__PURE__ */
|
|
42148
|
+
return /* @__PURE__ */ jsxs129("div", { className: "flex flex-col gap-4", children: [
|
|
42149
|
+
/* @__PURE__ */ jsx169("div", { className: "text-purpleText text-xs", children: /* @__PURE__ */ jsx169("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "ENGAGED AUDIENCE" }) }),
|
|
42150
|
+
/* @__PURE__ */ jsxs129(
|
|
41807
42151
|
"div",
|
|
41808
42152
|
{
|
|
41809
42153
|
className: "flex flex-col sm:col-span-3 sm:grid gap-6",
|
|
41810
42154
|
style: { gridTemplateColumns: gridTemplate },
|
|
41811
42155
|
children: [
|
|
41812
|
-
hasCities && /* @__PURE__ */
|
|
41813
|
-
/* @__PURE__ */
|
|
41814
|
-
/* @__PURE__ */
|
|
41815
|
-
([code, value]) => /* @__PURE__ */
|
|
42156
|
+
hasCities && /* @__PURE__ */ jsxs129("div", { children: [
|
|
42157
|
+
/* @__PURE__ */ jsx169("h4", { className: "text-xs text-gray700 mb-3", children: "Cities" }),
|
|
42158
|
+
/* @__PURE__ */ jsx169("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.cities || {}).map(
|
|
42159
|
+
([code, value]) => /* @__PURE__ */ jsxs129(
|
|
41816
42160
|
"div",
|
|
41817
42161
|
{
|
|
41818
42162
|
className: "flex items-center gap-3 text-sm text-gray700",
|
|
41819
42163
|
children: [
|
|
41820
|
-
/* @__PURE__ */
|
|
41821
|
-
/* @__PURE__ */
|
|
42164
|
+
/* @__PURE__ */ jsx169("span", { className: "w-[90px]", children: /* @__PURE__ */ jsx169("div", { className: "flex gap-1 items-center", children: /* @__PURE__ */ jsx169("span", { children: code.split(",")[0] }) }) }),
|
|
42165
|
+
/* @__PURE__ */ jsx169("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx169(
|
|
41822
42166
|
"div",
|
|
41823
42167
|
{
|
|
41824
42168
|
className: "h-[6px] bg-purple100 rounded-full",
|
|
41825
42169
|
style: { width: `${value}%` }
|
|
41826
42170
|
}
|
|
41827
42171
|
) }),
|
|
41828
|
-
/* @__PURE__ */
|
|
42172
|
+
/* @__PURE__ */ jsxs129("span", { className: "w-10 text-right font-medium", children: [
|
|
41829
42173
|
value,
|
|
41830
42174
|
"%"
|
|
41831
42175
|
] })
|
|
@@ -41835,29 +42179,29 @@ function EngagedAudienceDemographics({
|
|
|
41835
42179
|
)
|
|
41836
42180
|
) })
|
|
41837
42181
|
] }),
|
|
41838
|
-
hasCountries && /* @__PURE__ */
|
|
41839
|
-
/* @__PURE__ */
|
|
41840
|
-
/* @__PURE__ */
|
|
42182
|
+
hasCountries && /* @__PURE__ */ jsxs129("div", { children: [
|
|
42183
|
+
/* @__PURE__ */ jsx169("h4", { className: "text-xs text-gray700 mb-3", children: "Countries" }),
|
|
42184
|
+
/* @__PURE__ */ jsx169("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.countries || {}).map(
|
|
41841
42185
|
([code, value]) => {
|
|
41842
42186
|
const iso2 = normalizeToIso2(code);
|
|
41843
42187
|
const meta = codeToMeta[iso2];
|
|
41844
|
-
return /* @__PURE__ */
|
|
42188
|
+
return /* @__PURE__ */ jsxs129(
|
|
41845
42189
|
"div",
|
|
41846
42190
|
{
|
|
41847
42191
|
className: "flex items-center gap-3 text-sm text-gray700",
|
|
41848
42192
|
children: [
|
|
41849
|
-
/* @__PURE__ */
|
|
41850
|
-
/* @__PURE__ */
|
|
41851
|
-
/* @__PURE__ */
|
|
42193
|
+
/* @__PURE__ */ jsx169("span", { className: "w-10", children: /* @__PURE__ */ jsxs129("div", { className: "flex gap-1 items-center", children: [
|
|
42194
|
+
/* @__PURE__ */ jsx169("span", { className: "text-base", children: meta?.flag }),
|
|
42195
|
+
/* @__PURE__ */ jsx169("span", { children: code })
|
|
41852
42196
|
] }) }),
|
|
41853
|
-
/* @__PURE__ */
|
|
42197
|
+
/* @__PURE__ */ jsx169("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx169(
|
|
41854
42198
|
"div",
|
|
41855
42199
|
{
|
|
41856
42200
|
className: "h-[6px] bg-purple100 rounded-full",
|
|
41857
42201
|
style: { width: `${value}%` }
|
|
41858
42202
|
}
|
|
41859
42203
|
) }),
|
|
41860
|
-
/* @__PURE__ */
|
|
42204
|
+
/* @__PURE__ */ jsxs129("span", { className: "w-10 text-right font-medium", children: [
|
|
41861
42205
|
value,
|
|
41862
42206
|
"%"
|
|
41863
42207
|
] })
|
|
@@ -41868,23 +42212,23 @@ function EngagedAudienceDemographics({
|
|
|
41868
42212
|
}
|
|
41869
42213
|
) })
|
|
41870
42214
|
] }),
|
|
41871
|
-
hasAges && /* @__PURE__ */
|
|
41872
|
-
/* @__PURE__ */
|
|
41873
|
-
/* @__PURE__ */
|
|
41874
|
-
([ageRange, value]) => /* @__PURE__ */
|
|
42215
|
+
hasAges && /* @__PURE__ */ jsxs129("div", { children: [
|
|
42216
|
+
/* @__PURE__ */ jsx169("h4", { className: "text-xs text-gray700 mb-3", children: "Ages" }),
|
|
42217
|
+
/* @__PURE__ */ jsx169("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.ages || {}).map(
|
|
42218
|
+
([ageRange, value]) => /* @__PURE__ */ jsxs129(
|
|
41875
42219
|
"div",
|
|
41876
42220
|
{
|
|
41877
42221
|
className: "flex items-center gap-3 text-sm text-gray700",
|
|
41878
42222
|
children: [
|
|
41879
|
-
/* @__PURE__ */
|
|
41880
|
-
/* @__PURE__ */
|
|
42223
|
+
/* @__PURE__ */ jsx169("span", { className: "w-12", children: ageRange }),
|
|
42224
|
+
/* @__PURE__ */ jsx169("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx169(
|
|
41881
42225
|
"div",
|
|
41882
42226
|
{
|
|
41883
42227
|
className: "h-[6px] bg-purple100 rounded-full",
|
|
41884
42228
|
style: { width: `${value}%` }
|
|
41885
42229
|
}
|
|
41886
42230
|
) }),
|
|
41887
|
-
/* @__PURE__ */
|
|
42231
|
+
/* @__PURE__ */ jsxs129("span", { className: "w-10 text-right font-medium", children: [
|
|
41888
42232
|
value,
|
|
41889
42233
|
"%"
|
|
41890
42234
|
] })
|
|
@@ -41894,20 +42238,20 @@ function EngagedAudienceDemographics({
|
|
|
41894
42238
|
)
|
|
41895
42239
|
) })
|
|
41896
42240
|
] }),
|
|
41897
|
-
hasGenders && /* @__PURE__ */
|
|
41898
|
-
([gender, value]) => /* @__PURE__ */
|
|
42241
|
+
hasGenders && /* @__PURE__ */ jsx169("div", { className: "flex flex-col justify-center", children: /* @__PURE__ */ jsx169("div", { className: "flex sm:flex-col gap-3", children: Object.entries(audienceDemographics?.genders || {}).map(
|
|
42242
|
+
([gender, value]) => /* @__PURE__ */ jsxs129(
|
|
41899
42243
|
"div",
|
|
41900
42244
|
{
|
|
41901
42245
|
className: "flex flex-col justify-center text-sm",
|
|
41902
42246
|
children: [
|
|
41903
|
-
/* @__PURE__ */
|
|
41904
|
-
gender === "female" ? /* @__PURE__ */
|
|
41905
|
-
/* @__PURE__ */
|
|
42247
|
+
/* @__PURE__ */ jsxs129("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
42248
|
+
gender === "female" ? /* @__PURE__ */ jsx169(Venus, { className: "text-red-500", strokeWidth: 3 }) : /* @__PURE__ */ jsx169(Mars, { className: "text-blue-500", strokeWidth: 3 }),
|
|
42249
|
+
/* @__PURE__ */ jsxs129("span", { className: "capitalize text-gray800 text-xl", children: [
|
|
41906
42250
|
value,
|
|
41907
42251
|
"%"
|
|
41908
42252
|
] })
|
|
41909
42253
|
] }),
|
|
41910
|
-
/* @__PURE__ */
|
|
42254
|
+
/* @__PURE__ */ jsx169("span", { className: "text-lg text-gray700", children: gender.charAt(0).toUpperCase() + gender.slice(1) })
|
|
41911
42255
|
]
|
|
41912
42256
|
},
|
|
41913
42257
|
gender
|
|
@@ -41920,40 +42264,40 @@ function EngagedAudienceDemographics({
|
|
|
41920
42264
|
}
|
|
41921
42265
|
|
|
41922
42266
|
// src/molecules/creator-discovery/CreatorWidget/PlatformIcons.tsx
|
|
41923
|
-
import { jsx as
|
|
42267
|
+
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
41924
42268
|
function InstagramIcon({ className }) {
|
|
41925
|
-
return /* @__PURE__ */
|
|
42269
|
+
return /* @__PURE__ */ jsx170(
|
|
41926
42270
|
"svg",
|
|
41927
42271
|
{
|
|
41928
42272
|
className,
|
|
41929
42273
|
viewBox: "0 0 24 24",
|
|
41930
42274
|
fill: "currentColor",
|
|
41931
42275
|
xmlns: "http://www.w3.org/2000/svg",
|
|
41932
|
-
children: /* @__PURE__ */
|
|
42276
|
+
children: /* @__PURE__ */ jsx170("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z" })
|
|
41933
42277
|
}
|
|
41934
42278
|
);
|
|
41935
42279
|
}
|
|
41936
42280
|
function YouTubeIcon({ className }) {
|
|
41937
|
-
return /* @__PURE__ */
|
|
42281
|
+
return /* @__PURE__ */ jsx170(
|
|
41938
42282
|
"svg",
|
|
41939
42283
|
{
|
|
41940
42284
|
className,
|
|
41941
42285
|
viewBox: "0 0 24 24",
|
|
41942
42286
|
fill: "currentColor",
|
|
41943
42287
|
xmlns: "http://www.w3.org/2000/svg",
|
|
41944
|
-
children: /* @__PURE__ */
|
|
42288
|
+
children: /* @__PURE__ */ jsx170("path", { d: "M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" })
|
|
41945
42289
|
}
|
|
41946
42290
|
);
|
|
41947
42291
|
}
|
|
41948
42292
|
function TikTokIcon3({ className }) {
|
|
41949
|
-
return /* @__PURE__ */
|
|
42293
|
+
return /* @__PURE__ */ jsx170(
|
|
41950
42294
|
"svg",
|
|
41951
42295
|
{
|
|
41952
42296
|
className,
|
|
41953
42297
|
viewBox: "0 0 24 24",
|
|
41954
42298
|
fill: "currentColor",
|
|
41955
42299
|
xmlns: "http://www.w3.org/2000/svg",
|
|
41956
|
-
children: /* @__PURE__ */
|
|
42300
|
+
children: /* @__PURE__ */ jsx170("path", { d: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z" })
|
|
41957
42301
|
}
|
|
41958
42302
|
);
|
|
41959
42303
|
}
|
|
@@ -41987,8 +42331,8 @@ function getPlatformIconColor(platform) {
|
|
|
41987
42331
|
}
|
|
41988
42332
|
|
|
41989
42333
|
// src/molecules/creator-discovery/CreatorWidget/PostCard.tsx
|
|
41990
|
-
import { useState as
|
|
41991
|
-
import { Fragment as
|
|
42334
|
+
import { useState as useState16 } from "react";
|
|
42335
|
+
import { Fragment as Fragment9, jsx as jsx171, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
41992
42336
|
var formatFollowerCount = (count) => {
|
|
41993
42337
|
if (count >= 1e6) {
|
|
41994
42338
|
const millions = count / 1e6;
|
|
@@ -42001,15 +42345,15 @@ var formatFollowerCount = (count) => {
|
|
|
42001
42345
|
return Math.floor(count).toString();
|
|
42002
42346
|
};
|
|
42003
42347
|
function PostCard({ post, platformUsername }) {
|
|
42004
|
-
const [expanded, setExpanded] =
|
|
42005
|
-
const [errored, setErrored] =
|
|
42348
|
+
const [expanded, setExpanded] = useState16(false);
|
|
42349
|
+
const [errored, setErrored] = useState16(false);
|
|
42006
42350
|
const thumbnail = post.thumbnail_url || post.thumbnail || post.image || "";
|
|
42007
42351
|
const likes = post.engagement?.likes ?? post.likes ?? null;
|
|
42008
42352
|
const comments = post.engagement?.comments ?? post.comments ?? null;
|
|
42009
42353
|
const views = post.engagement?.views ?? post.engagement?.plays ?? post.views ?? post.plays ?? null;
|
|
42010
42354
|
const impressions = post.impressions ?? null;
|
|
42011
42355
|
const reach = post.reach ?? null;
|
|
42012
|
-
return /* @__PURE__ */
|
|
42356
|
+
return /* @__PURE__ */ jsxs130(
|
|
42013
42357
|
"div",
|
|
42014
42358
|
{
|
|
42015
42359
|
className: "rounded-xl overflow-hidden border border-gray500 bg-transparent shadow-sm cursor-pointer",
|
|
@@ -42018,7 +42362,7 @@ function PostCard({ post, platformUsername }) {
|
|
|
42018
42362
|
window.open(post.url, "_blank", "noopener,noreferrer");
|
|
42019
42363
|
},
|
|
42020
42364
|
children: [
|
|
42021
|
-
/* @__PURE__ */
|
|
42365
|
+
/* @__PURE__ */ jsx171("div", { className: "w-full aspect-square relative bg-gray25", children: thumbnail && !errored ? /* @__PURE__ */ jsx171(
|
|
42022
42366
|
"img",
|
|
42023
42367
|
{
|
|
42024
42368
|
src: thumbnail,
|
|
@@ -42026,55 +42370,55 @@ function PostCard({ post, platformUsername }) {
|
|
|
42026
42370
|
className: "w-full h-full object-cover",
|
|
42027
42371
|
onError: () => setErrored(true)
|
|
42028
42372
|
}
|
|
42029
|
-
) : /* @__PURE__ */
|
|
42030
|
-
/* @__PURE__ */
|
|
42031
|
-
/* @__PURE__ */
|
|
42032
|
-
likes !== null && /* @__PURE__ */
|
|
42033
|
-
/* @__PURE__ */
|
|
42373
|
+
) : /* @__PURE__ */ jsx171("div", { className: "w-full h-full flex items-center justify-center text-gray500 text-sm", children: "No preview" }) }),
|
|
42374
|
+
/* @__PURE__ */ jsxs130("div", { className: "p-3", children: [
|
|
42375
|
+
/* @__PURE__ */ jsxs130("div", { className: "flex items-center gap-4 text-sm text-gray600 mb-2", children: [
|
|
42376
|
+
likes !== null && /* @__PURE__ */ jsxs130("div", { className: "flex items-center gap-1", children: [
|
|
42377
|
+
/* @__PURE__ */ jsx171("span", { children: formatFollowerCount(likes) }),
|
|
42034
42378
|
" ",
|
|
42035
|
-
/* @__PURE__ */
|
|
42379
|
+
/* @__PURE__ */ jsx171(Heart, { size: 14 })
|
|
42036
42380
|
] }),
|
|
42037
|
-
comments !== null && /* @__PURE__ */
|
|
42038
|
-
/* @__PURE__ */
|
|
42381
|
+
comments !== null && /* @__PURE__ */ jsxs130("div", { className: "flex items-center gap-1", children: [
|
|
42382
|
+
/* @__PURE__ */ jsx171("span", { children: formatFollowerCount(comments) }),
|
|
42039
42383
|
" ",
|
|
42040
|
-
/* @__PURE__ */
|
|
42384
|
+
/* @__PURE__ */ jsx171(MessageCircle, { size: 14 })
|
|
42041
42385
|
] }),
|
|
42042
|
-
views !== null && /* @__PURE__ */
|
|
42043
|
-
/* @__PURE__ */
|
|
42386
|
+
views !== null && /* @__PURE__ */ jsxs130("div", { className: "flex items-center gap-1", children: [
|
|
42387
|
+
/* @__PURE__ */ jsx171("span", { children: formatFollowerCount(views) }),
|
|
42044
42388
|
" ",
|
|
42045
|
-
/* @__PURE__ */
|
|
42389
|
+
/* @__PURE__ */ jsx171(Eye, { size: 14 })
|
|
42046
42390
|
] })
|
|
42047
42391
|
] }),
|
|
42048
|
-
/* @__PURE__ */
|
|
42049
|
-
impressions !== null && /* @__PURE__ */
|
|
42050
|
-
/* @__PURE__ */
|
|
42392
|
+
/* @__PURE__ */ jsxs130("div", { className: "flex gap-4 text-sm text-gray800 mb-2", children: [
|
|
42393
|
+
impressions !== null && /* @__PURE__ */ jsxs130("div", { children: [
|
|
42394
|
+
/* @__PURE__ */ jsx171("span", { className: "text-gray500 font-bold", children: formatFollowerCount(impressions) }),
|
|
42051
42395
|
" ",
|
|
42052
42396
|
"est.Impressions"
|
|
42053
42397
|
] }),
|
|
42054
|
-
reach !== null && /* @__PURE__ */
|
|
42055
|
-
/* @__PURE__ */
|
|
42398
|
+
reach !== null && /* @__PURE__ */ jsxs130("div", { children: [
|
|
42399
|
+
/* @__PURE__ */ jsx171("span", { className: "text-gray500 font-bold", children: formatFollowerCount(reach) }),
|
|
42056
42400
|
" ",
|
|
42057
42401
|
"est.Reach"
|
|
42058
42402
|
] })
|
|
42059
42403
|
] }),
|
|
42060
|
-
/* @__PURE__ */
|
|
42061
|
-
platformUsername && /* @__PURE__ */
|
|
42404
|
+
/* @__PURE__ */ jsxs130("div", { className: "text-sm mb-1", children: [
|
|
42405
|
+
platformUsername && /* @__PURE__ */ jsxs130("div", { className: "text-md font-semibold text-gray500", children: [
|
|
42062
42406
|
"@",
|
|
42063
42407
|
platformUsername
|
|
42064
42408
|
] }),
|
|
42065
42409
|
["instagram", "tiktok"].includes(
|
|
42066
42410
|
post.platform?.toLowerCase() || ""
|
|
42067
|
-
) ? /* @__PURE__ */
|
|
42411
|
+
) ? /* @__PURE__ */ jsx171(Fragment9, { children: (() => {
|
|
42068
42412
|
const text = post.title || post.description || "";
|
|
42069
|
-
return /* @__PURE__ */
|
|
42070
|
-
/* @__PURE__ */
|
|
42413
|
+
return /* @__PURE__ */ jsxs130(Fragment9, { children: [
|
|
42414
|
+
/* @__PURE__ */ jsx171(
|
|
42071
42415
|
"div",
|
|
42072
42416
|
{
|
|
42073
42417
|
className: `text-gray900 font-light mt-2 text-sm ${!expanded ? "line-clamp-3" : ""}`,
|
|
42074
42418
|
children: text
|
|
42075
42419
|
}
|
|
42076
42420
|
),
|
|
42077
|
-
text.length > 100 && /* @__PURE__ */
|
|
42421
|
+
text.length > 100 && /* @__PURE__ */ jsx171(
|
|
42078
42422
|
"button",
|
|
42079
42423
|
{
|
|
42080
42424
|
onClick: (e) => {
|
|
@@ -42086,9 +42430,9 @@ function PostCard({ post, platformUsername }) {
|
|
|
42086
42430
|
}
|
|
42087
42431
|
)
|
|
42088
42432
|
] });
|
|
42089
|
-
})() }) : /* @__PURE__ */
|
|
42090
|
-
post.title && /* @__PURE__ */
|
|
42091
|
-
post.description && /* @__PURE__ */
|
|
42433
|
+
})() }) : /* @__PURE__ */ jsxs130(Fragment9, { children: [
|
|
42434
|
+
post.title && /* @__PURE__ */ jsx171("div", { className: "text-gray900 font-light", children: post.title }),
|
|
42435
|
+
post.description && /* @__PURE__ */ jsx171(
|
|
42092
42436
|
"div",
|
|
42093
42437
|
{
|
|
42094
42438
|
className: "mt-2 text-sm text-gray900 overflow-hidden font-light",
|
|
@@ -42096,7 +42440,7 @@ function PostCard({ post, platformUsername }) {
|
|
|
42096
42440
|
children: post.description
|
|
42097
42441
|
}
|
|
42098
42442
|
),
|
|
42099
|
-
post.description && post.description.length > 200 && /* @__PURE__ */
|
|
42443
|
+
post.description && post.description.length > 200 && /* @__PURE__ */ jsx171(
|
|
42100
42444
|
"button",
|
|
42101
42445
|
{
|
|
42102
42446
|
onClick: (e) => {
|
|
@@ -42116,7 +42460,7 @@ function PostCard({ post, platformUsername }) {
|
|
|
42116
42460
|
}
|
|
42117
42461
|
|
|
42118
42462
|
// src/molecules/creator-discovery/CreatorWidget/PlatformPostsSection.tsx
|
|
42119
|
-
import { jsx as
|
|
42463
|
+
import { jsx as jsx172, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
42120
42464
|
var formatFollowerCount2 = (count) => {
|
|
42121
42465
|
if (count >= 1e6) {
|
|
42122
42466
|
const millions = count / 1e6;
|
|
@@ -42140,18 +42484,18 @@ function PlatformMetricsBanner({
|
|
|
42140
42484
|
const platformName = getPlatformName(platform);
|
|
42141
42485
|
const bgColor = getPlatformBgColor(platform);
|
|
42142
42486
|
const IconComponent = getPlatformIcon(platform);
|
|
42143
|
-
return /* @__PURE__ */
|
|
42487
|
+
return /* @__PURE__ */ jsxs131(
|
|
42144
42488
|
"div",
|
|
42145
42489
|
{
|
|
42146
42490
|
className: "\n flex overflow-x-auto gap-6 rounded-l-xl py-4 px-4 shadow-sm\n md:grid md:grid-cols-[0.5fr_1fr_1fr_1fr_1fr] md:items-center md:gap-0 md:px-0 md:ml-8\n ",
|
|
42147
42491
|
style: { backgroundColor: bgColor },
|
|
42148
42492
|
children: [
|
|
42149
|
-
/* @__PURE__ */
|
|
42150
|
-
/* @__PURE__ */
|
|
42151
|
-
/* @__PURE__ */
|
|
42493
|
+
/* @__PURE__ */ jsxs131("div", { className: "flex flex-col items-center min-w-[90px] md:min-w-0", children: [
|
|
42494
|
+
/* @__PURE__ */ jsx172(IconComponent, { className: "w-5 h-5 md:w-6 md:h-6 text-gray900" }),
|
|
42495
|
+
/* @__PURE__ */ jsx172("span", { className: "text-lg md:text-xl font-bold text-gray900", children: platform === "youtubeMetrics" ? formatFollowerCount2(metrics.subscribers || 0) : formatFollowerCount2(metrics.followers || 0) })
|
|
42152
42496
|
] }),
|
|
42153
|
-
/* @__PURE__ */
|
|
42154
|
-
/* @__PURE__ */
|
|
42497
|
+
/* @__PURE__ */ jsxs131("div", { className: "flex flex-col items-start min-w-[130px] md:min-w-0", children: [
|
|
42498
|
+
/* @__PURE__ */ jsxs131(
|
|
42155
42499
|
"span",
|
|
42156
42500
|
{
|
|
42157
42501
|
className: "text-base md:text-lg dark:text-white max-w-[90%] truncate cursor-default",
|
|
@@ -42162,22 +42506,22 @@ function PlatformMetricsBanner({
|
|
|
42162
42506
|
]
|
|
42163
42507
|
}
|
|
42164
42508
|
),
|
|
42165
|
-
/* @__PURE__ */
|
|
42509
|
+
/* @__PURE__ */ jsx172("span", { className: "text-xs md:text-sm text-gray900 opacity-90", children: platformName })
|
|
42166
42510
|
] }),
|
|
42167
|
-
/* @__PURE__ */
|
|
42168
|
-
/* @__PURE__ */
|
|
42511
|
+
/* @__PURE__ */ jsxs131("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
|
|
42512
|
+
/* @__PURE__ */ jsxs131("span", { className: "text-sm md:text-md font-semibold text-gray900", children: [
|
|
42169
42513
|
(metrics.engagementRate * 100).toFixed(2),
|
|
42170
42514
|
"%"
|
|
42171
42515
|
] }),
|
|
42172
|
-
/* @__PURE__ */
|
|
42516
|
+
/* @__PURE__ */ jsx172("span", { className: "text-xs text-gray900 opacity-80", children: "Engagement Rate" })
|
|
42173
42517
|
] }),
|
|
42174
|
-
/* @__PURE__ */
|
|
42175
|
-
/* @__PURE__ */
|
|
42176
|
-
/* @__PURE__ */
|
|
42518
|
+
/* @__PURE__ */ jsxs131("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
|
|
42519
|
+
/* @__PURE__ */ jsx172("span", { className: "text-sm md:text-md font-semibold text-gray900", children: Math.round(metrics.avgLikes)?.toLocaleString() }),
|
|
42520
|
+
/* @__PURE__ */ jsx172("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Likes" })
|
|
42177
42521
|
] }),
|
|
42178
|
-
/* @__PURE__ */
|
|
42179
|
-
/* @__PURE__ */
|
|
42180
|
-
/* @__PURE__ */
|
|
42522
|
+
/* @__PURE__ */ jsxs131("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
|
|
42523
|
+
/* @__PURE__ */ jsx172("span", { className: "text-sm md:text-md font-semibold text-gray900", children: Math.round(metrics.avgComments)?.toLocaleString() }),
|
|
42524
|
+
/* @__PURE__ */ jsx172("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Comments" })
|
|
42181
42525
|
] })
|
|
42182
42526
|
]
|
|
42183
42527
|
}
|
|
@@ -42188,16 +42532,16 @@ function PlatformPostsSection({
|
|
|
42188
42532
|
posts = []
|
|
42189
42533
|
}) {
|
|
42190
42534
|
if (!platformMetrics) return null;
|
|
42191
|
-
return /* @__PURE__ */
|
|
42535
|
+
return /* @__PURE__ */ jsx172("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsx172("div", { className: "flex flex-col gap-8", children: Object.entries(platformMetrics || {}).map(
|
|
42192
42536
|
([platform, metrics]) => {
|
|
42193
42537
|
if (!metrics) return null;
|
|
42194
42538
|
if (metrics.followers === 0 && metrics.subscribers === 0)
|
|
42195
42539
|
return null;
|
|
42196
42540
|
const platformPosts = filterPostsByPlatform(posts, platform);
|
|
42197
42541
|
const platformUsername = metrics.username ?? metrics.channelName ?? "";
|
|
42198
|
-
return /* @__PURE__ */
|
|
42199
|
-
/* @__PURE__ */
|
|
42200
|
-
platformPosts.length > 0 && /* @__PURE__ */
|
|
42542
|
+
return /* @__PURE__ */ jsxs131("div", { className: "w-full flex flex-col gap-8", children: [
|
|
42543
|
+
/* @__PURE__ */ jsx172(PlatformMetricsBanner, { platform, metrics }),
|
|
42544
|
+
platformPosts.length > 0 && /* @__PURE__ */ jsx172("div", { className: "pr-6 sm:ml-8 sm:pr-7", children: /* @__PURE__ */ jsx172("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: platformPosts.map((post, idx) => /* @__PURE__ */ jsx172(
|
|
42201
42545
|
PostCard,
|
|
42202
42546
|
{
|
|
42203
42547
|
post,
|
|
@@ -42211,10 +42555,10 @@ function PlatformPostsSection({
|
|
|
42211
42555
|
}
|
|
42212
42556
|
|
|
42213
42557
|
// src/molecules/creator-discovery/CreatorWidget/BrandCollaborationsList.tsx
|
|
42214
|
-
import { useState as
|
|
42558
|
+
import { useState as useState17 } from "react";
|
|
42215
42559
|
import ReactDOM from "react-dom";
|
|
42216
42560
|
import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
|
|
42217
|
-
import { Fragment as
|
|
42561
|
+
import { Fragment as Fragment10, jsx as jsx173, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
42218
42562
|
var getSentimentRank = (score) => {
|
|
42219
42563
|
if (score >= 80) {
|
|
42220
42564
|
return {
|
|
@@ -42259,8 +42603,8 @@ function BrandMentionDetails({
|
|
|
42259
42603
|
) || [];
|
|
42260
42604
|
if (typeof window === "undefined") return null;
|
|
42261
42605
|
return ReactDOM.createPortal(
|
|
42262
|
-
/* @__PURE__ */
|
|
42263
|
-
/* @__PURE__ */
|
|
42606
|
+
/* @__PURE__ */ jsx173(AnimatePresence3, { mode: "sync", children: open && /* @__PURE__ */ jsxs132(Fragment10, { children: [
|
|
42607
|
+
/* @__PURE__ */ jsx173(
|
|
42264
42608
|
motion3.div,
|
|
42265
42609
|
{
|
|
42266
42610
|
initial: { opacity: 0 },
|
|
@@ -42275,7 +42619,7 @@ function BrandMentionDetails({
|
|
|
42275
42619
|
},
|
|
42276
42620
|
"brand-overlay"
|
|
42277
42621
|
),
|
|
42278
|
-
/* @__PURE__ */
|
|
42622
|
+
/* @__PURE__ */ jsxs132(
|
|
42279
42623
|
motion3.div,
|
|
42280
42624
|
{
|
|
42281
42625
|
initial: { opacity: 0, scale: 0.95 },
|
|
@@ -42285,42 +42629,42 @@ function BrandMentionDetails({
|
|
|
42285
42629
|
className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[90] w-full max-w-lg bg-background rounded-xl border border-gray300 shadow-2xl",
|
|
42286
42630
|
onClick: (e) => e.stopPropagation(),
|
|
42287
42631
|
children: [
|
|
42288
|
-
/* @__PURE__ */
|
|
42289
|
-
/* @__PURE__ */
|
|
42632
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex justify-between items-center p-4 border-b border-gray300", children: [
|
|
42633
|
+
/* @__PURE__ */ jsxs132("h3", { className: "text-lg font-bold text-gray900", children: [
|
|
42290
42634
|
"Brand Mention Details: ",
|
|
42291
42635
|
selectedBrand
|
|
42292
42636
|
] }),
|
|
42293
|
-
/* @__PURE__ */
|
|
42637
|
+
/* @__PURE__ */ jsx173(
|
|
42294
42638
|
"button",
|
|
42295
42639
|
{
|
|
42296
42640
|
onClick: onClose,
|
|
42297
42641
|
className: "p-1 rounded-full hover:bg-gray200 transition-colors",
|
|
42298
|
-
children: /* @__PURE__ */
|
|
42642
|
+
children: /* @__PURE__ */ jsx173(X, { className: "w-4 h-4" })
|
|
42299
42643
|
}
|
|
42300
42644
|
)
|
|
42301
42645
|
] }),
|
|
42302
|
-
/* @__PURE__ */
|
|
42303
|
-
brandStats && /* @__PURE__ */
|
|
42304
|
-
/* @__PURE__ */
|
|
42305
|
-
/* @__PURE__ */
|
|
42306
|
-
/* @__PURE__ */
|
|
42307
|
-
/* @__PURE__ */
|
|
42308
|
-
/* @__PURE__ */
|
|
42646
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col gap-6 max-h-[70vh] overflow-y-auto p-4", children: [
|
|
42647
|
+
brandStats && /* @__PURE__ */ jsxs132("div", { className: "bg-gray25 border-2 border-gray200 rounded-xl p-4", children: [
|
|
42648
|
+
/* @__PURE__ */ jsx173("h3", { className: "text-lg font-bold text-gray900 mb-4", children: "Overview" }),
|
|
42649
|
+
/* @__PURE__ */ jsxs132("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
42650
|
+
/* @__PURE__ */ jsxs132("div", { className: "bg-background rounded-lg p-3", children: [
|
|
42651
|
+
/* @__PURE__ */ jsx173("div", { className: "text-xs text-gray600", children: "Total Mentions" }),
|
|
42652
|
+
/* @__PURE__ */ jsx173("div", { className: "text-2xl font-bold text-gray900", children: brandStats.mentions })
|
|
42309
42653
|
] }),
|
|
42310
|
-
/* @__PURE__ */
|
|
42311
|
-
/* @__PURE__ */
|
|
42312
|
-
/* @__PURE__ */
|
|
42654
|
+
/* @__PURE__ */ jsxs132("div", { className: "bg-background rounded-lg p-3", children: [
|
|
42655
|
+
/* @__PURE__ */ jsx173("div", { className: "text-xs text-gray600", children: "Posts Count" }),
|
|
42656
|
+
/* @__PURE__ */ jsx173("div", { className: "text-2xl font-bold text-gray900", children: brandStats.postCount })
|
|
42313
42657
|
] }),
|
|
42314
|
-
/* @__PURE__ */
|
|
42315
|
-
/* @__PURE__ */
|
|
42316
|
-
/* @__PURE__ */
|
|
42658
|
+
/* @__PURE__ */ jsxs132("div", { className: "bg-background rounded-lg p-3", children: [
|
|
42659
|
+
/* @__PURE__ */ jsx173("div", { className: "text-xs text-gray600", children: "Avg Engagement" }),
|
|
42660
|
+
/* @__PURE__ */ jsxs132("div", { className: "text-2xl font-bold text-gray900", children: [
|
|
42317
42661
|
brandStats.averageEngagementRate?.toFixed(2),
|
|
42318
42662
|
"%"
|
|
42319
42663
|
] })
|
|
42320
42664
|
] }),
|
|
42321
|
-
/* @__PURE__ */
|
|
42322
|
-
/* @__PURE__ */
|
|
42323
|
-
/* @__PURE__ */
|
|
42665
|
+
/* @__PURE__ */ jsxs132("div", { className: "bg-background rounded-lg p-3", children: [
|
|
42666
|
+
/* @__PURE__ */ jsx173("div", { className: "text-xs text-gray600", children: "Effectiveness" }),
|
|
42667
|
+
/* @__PURE__ */ jsxs132(
|
|
42324
42668
|
"div",
|
|
42325
42669
|
{
|
|
42326
42670
|
className: `text-2xl font-bold ${getSentimentRank(brandStats.effectivenessPercent).scoreColor}`,
|
|
@@ -42332,8 +42676,8 @@ function BrandMentionDetails({
|
|
|
42332
42676
|
)
|
|
42333
42677
|
] })
|
|
42334
42678
|
] }),
|
|
42335
|
-
/* @__PURE__ */
|
|
42336
|
-
(type, idx) => /* @__PURE__ */
|
|
42679
|
+
/* @__PURE__ */ jsx173("div", { className: "mt-3 flex gap-2 flex-wrap", children: brandStats.collaborationTypes?.map(
|
|
42680
|
+
(type, idx) => /* @__PURE__ */ jsx173(
|
|
42337
42681
|
"span",
|
|
42338
42682
|
{
|
|
42339
42683
|
className: "px-3 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]",
|
|
@@ -42343,55 +42687,55 @@ function BrandMentionDetails({
|
|
|
42343
42687
|
)
|
|
42344
42688
|
) })
|
|
42345
42689
|
] }),
|
|
42346
|
-
/* @__PURE__ */
|
|
42347
|
-
/* @__PURE__ */
|
|
42690
|
+
/* @__PURE__ */ jsxs132("div", { children: [
|
|
42691
|
+
/* @__PURE__ */ jsxs132("h3", { className: "text-lg font-bold text-gray900 mb-3", children: [
|
|
42348
42692
|
"Individual Mentions (",
|
|
42349
42693
|
brandMentions.length,
|
|
42350
42694
|
")"
|
|
42351
42695
|
] }),
|
|
42352
|
-
/* @__PURE__ */
|
|
42696
|
+
/* @__PURE__ */ jsx173("div", { className: "flex flex-col gap-3", children: brandMentions.map((mention, index) => {
|
|
42353
42697
|
const IconComponent = getPlatformIcon(mention?.platform);
|
|
42354
|
-
return /* @__PURE__ */
|
|
42698
|
+
return /* @__PURE__ */ jsxs132(
|
|
42355
42699
|
"div",
|
|
42356
42700
|
{
|
|
42357
42701
|
className: "bg-gray50 border-2 border-gray200 rounded-xl p-4 hover:border-purple100 transition-colors",
|
|
42358
42702
|
children: [
|
|
42359
|
-
/* @__PURE__ */
|
|
42360
|
-
/* @__PURE__ */
|
|
42361
|
-
/* @__PURE__ */
|
|
42362
|
-
/* @__PURE__ */
|
|
42703
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex items-center justify-between mb-3", children: [
|
|
42704
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex items-center gap-2", children: [
|
|
42705
|
+
/* @__PURE__ */ jsx173(IconComponent, { className: "w-5 h-5 text-gray900" }),
|
|
42706
|
+
/* @__PURE__ */ jsx173("span", { className: "text-sm font-medium text-gray700 capitalize", children: mention.platform })
|
|
42363
42707
|
] }),
|
|
42364
|
-
/* @__PURE__ */
|
|
42365
|
-
/* @__PURE__ */
|
|
42366
|
-
/* @__PURE__ */
|
|
42708
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex items-center gap-2", children: [
|
|
42709
|
+
/* @__PURE__ */ jsx173("span", { className: "px-2 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]", children: mention.collaborationType }),
|
|
42710
|
+
/* @__PURE__ */ jsxs132("span", { className: "text-xs text-gray600", children: [
|
|
42367
42711
|
Math.round(mention.confidence * 100),
|
|
42368
42712
|
"% confidence"
|
|
42369
42713
|
] })
|
|
42370
42714
|
] })
|
|
42371
42715
|
] }),
|
|
42372
|
-
/* @__PURE__ */
|
|
42373
|
-
/* @__PURE__ */
|
|
42716
|
+
/* @__PURE__ */ jsxs132("div", { className: "mb-2", children: [
|
|
42717
|
+
/* @__PURE__ */ jsxs132("span", { className: "text-xs text-gray500", children: [
|
|
42374
42718
|
"Post ID:",
|
|
42375
42719
|
" "
|
|
42376
42720
|
] }),
|
|
42377
|
-
/* @__PURE__ */
|
|
42721
|
+
/* @__PURE__ */ jsx173("span", { className: "text-xs font-mono text-gray700", children: mention.post_id })
|
|
42378
42722
|
] }),
|
|
42379
|
-
/* @__PURE__ */
|
|
42380
|
-
/* @__PURE__ */
|
|
42381
|
-
/* @__PURE__ */
|
|
42723
|
+
/* @__PURE__ */ jsxs132("div", { className: "bg-background rounded-lg p-3 border border-gray300", children: [
|
|
42724
|
+
/* @__PURE__ */ jsx173("div", { className: "text-xs text-gray600 mb-1", children: "Evidence:" }),
|
|
42725
|
+
/* @__PURE__ */ jsxs132("p", { className: "text-sm text-gray800 italic", children: [
|
|
42382
42726
|
"\u201C",
|
|
42383
42727
|
mention.evidence,
|
|
42384
42728
|
"\u201D"
|
|
42385
42729
|
] })
|
|
42386
42730
|
] }),
|
|
42387
|
-
/* @__PURE__ */
|
|
42731
|
+
/* @__PURE__ */ jsxs132("div", { className: "mt-2 text-xs text-gray500", children: [
|
|
42388
42732
|
"Source:",
|
|
42389
42733
|
" ",
|
|
42390
|
-
/* @__PURE__ */
|
|
42391
|
-
mention.handle && /* @__PURE__ */
|
|
42734
|
+
/* @__PURE__ */ jsx173("span", { className: "font-medium", children: mention.source }),
|
|
42735
|
+
mention.handle && /* @__PURE__ */ jsxs132("span", { className: "ml-2", children: [
|
|
42392
42736
|
"Handle:",
|
|
42393
42737
|
" ",
|
|
42394
|
-
/* @__PURE__ */
|
|
42738
|
+
/* @__PURE__ */ jsx173("span", { className: "font-medium", children: mention.handle })
|
|
42395
42739
|
] })
|
|
42396
42740
|
] })
|
|
42397
42741
|
]
|
|
@@ -42400,7 +42744,7 @@ function BrandMentionDetails({
|
|
|
42400
42744
|
);
|
|
42401
42745
|
}) })
|
|
42402
42746
|
] }),
|
|
42403
|
-
brandMentions.length === 0 && /* @__PURE__ */
|
|
42747
|
+
brandMentions.length === 0 && /* @__PURE__ */ jsx173("div", { className: "text-center py-8 text-gray500", children: "No mentions found for this brand" })
|
|
42404
42748
|
] })
|
|
42405
42749
|
]
|
|
42406
42750
|
},
|
|
@@ -42413,16 +42757,16 @@ function BrandMentionDetails({
|
|
|
42413
42757
|
function BrandCollaborationsList({
|
|
42414
42758
|
brandBreakdown
|
|
42415
42759
|
}) {
|
|
42416
|
-
const [openDetails, setOpenDetails] =
|
|
42417
|
-
const [selectedBrand, setSelectedBrand] =
|
|
42760
|
+
const [openDetails, setOpenDetails] = useState17(false);
|
|
42761
|
+
const [selectedBrand, setSelectedBrand] = useState17("");
|
|
42418
42762
|
if (!brandBreakdown?.insights?.brandBreakdown || brandBreakdown.insights.brandBreakdown.length === 0) {
|
|
42419
42763
|
return null;
|
|
42420
42764
|
}
|
|
42421
|
-
return /* @__PURE__ */
|
|
42422
|
-
/* @__PURE__ */
|
|
42423
|
-
/* @__PURE__ */
|
|
42424
|
-
/* @__PURE__ */
|
|
42425
|
-
(item, index) => /* @__PURE__ */
|
|
42765
|
+
return /* @__PURE__ */ jsxs132(Fragment10, { children: [
|
|
42766
|
+
/* @__PURE__ */ jsxs132("div", { children: [
|
|
42767
|
+
/* @__PURE__ */ jsx173("div", { className: "text-purpleText text-xs mb-2", children: /* @__PURE__ */ jsx173("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "BRAND MENTIONS" }) }),
|
|
42768
|
+
/* @__PURE__ */ jsx173("div", { className: "flex flex-col gap-2 max-h-[220px] overflow-y-auto", children: brandBreakdown.insights.brandBreakdown.map(
|
|
42769
|
+
(item, index) => /* @__PURE__ */ jsxs132(
|
|
42426
42770
|
"div",
|
|
42427
42771
|
{
|
|
42428
42772
|
className: "flex gap-4 bg-gray50 border-2 border-gray25 rounded-xl px-3 py-3 shadow-sm cursor-pointer hover:border-purple100 transition-colors",
|
|
@@ -42432,17 +42776,17 @@ function BrandCollaborationsList({
|
|
|
42432
42776
|
setOpenDetails(true);
|
|
42433
42777
|
},
|
|
42434
42778
|
children: [
|
|
42435
|
-
/* @__PURE__ */
|
|
42436
|
-
/* @__PURE__ */
|
|
42437
|
-
/* @__PURE__ */
|
|
42438
|
-
/* @__PURE__ */
|
|
42439
|
-
/* @__PURE__ */
|
|
42440
|
-
/* @__PURE__ */
|
|
42779
|
+
/* @__PURE__ */ jsx173("div", { className: "w-10 h-10 rounded-full bg-gray200 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx173("span", { className: "text-sm font-bold text-gray700", children: item.brand?.charAt(0)?.toUpperCase() || "?" }) }),
|
|
42780
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex flex-col gap-1", children: [
|
|
42781
|
+
/* @__PURE__ */ jsx173("div", { className: "text-gray900 text-sm", children: item.brand }),
|
|
42782
|
+
/* @__PURE__ */ jsxs132("div", { className: "flex gap-2 text-xs text-gray600", children: [
|
|
42783
|
+
/* @__PURE__ */ jsxs132("div", { children: [
|
|
42784
|
+
/* @__PURE__ */ jsx173("span", { className: "text-gray900", children: item?.mentions }),
|
|
42441
42785
|
" ",
|
|
42442
42786
|
"Mention"
|
|
42443
42787
|
] }),
|
|
42444
|
-
/* @__PURE__ */
|
|
42445
|
-
/* @__PURE__ */
|
|
42788
|
+
/* @__PURE__ */ jsxs132("div", { children: [
|
|
42789
|
+
/* @__PURE__ */ jsx173(
|
|
42446
42790
|
"span",
|
|
42447
42791
|
{
|
|
42448
42792
|
className: `${getSentimentRank(item.effectivenessPercent).scoreColor} font-bold`,
|
|
@@ -42460,7 +42804,7 @@ function BrandCollaborationsList({
|
|
|
42460
42804
|
)
|
|
42461
42805
|
) })
|
|
42462
42806
|
] }),
|
|
42463
|
-
/* @__PURE__ */
|
|
42807
|
+
/* @__PURE__ */ jsx173(
|
|
42464
42808
|
BrandMentionDetails,
|
|
42465
42809
|
{
|
|
42466
42810
|
open: openDetails,
|
|
@@ -42473,9 +42817,9 @@ function BrandCollaborationsList({
|
|
|
42473
42817
|
}
|
|
42474
42818
|
|
|
42475
42819
|
// src/molecules/creator-discovery/CreatorWidget/CreatorGridView.tsx
|
|
42476
|
-
import { useState as
|
|
42820
|
+
import { useState as useState18, useMemo as useMemo10, useRef as useRef8, useCallback as useCallback6, useEffect as useEffect11 } from "react";
|
|
42477
42821
|
import { motion as motion4 } from "framer-motion";
|
|
42478
|
-
import { jsx as
|
|
42822
|
+
import { jsx as jsx174, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
42479
42823
|
var formatFollowerCount3 = (count) => {
|
|
42480
42824
|
if (count >= 1e6) {
|
|
42481
42825
|
const millions = count / 1e6;
|
|
@@ -42522,20 +42866,20 @@ var itemsExplanation = [
|
|
|
42522
42866
|
{ key: "brandSafety", label: "Brand Safety" }
|
|
42523
42867
|
];
|
|
42524
42868
|
function CreatorGridViewCard({ creator }) {
|
|
42525
|
-
const [isExpanded, setIsExpanded] =
|
|
42526
|
-
const [showFullDescription, setShowFullDescription] =
|
|
42527
|
-
const [isDescriptionOverflowing, setIsDescriptionOverflowing] =
|
|
42528
|
-
const descriptionRef =
|
|
42529
|
-
const cardRef =
|
|
42530
|
-
const checkDescriptionOverflow =
|
|
42869
|
+
const [isExpanded, setIsExpanded] = useState18(false);
|
|
42870
|
+
const [showFullDescription, setShowFullDescription] = useState18(false);
|
|
42871
|
+
const [isDescriptionOverflowing, setIsDescriptionOverflowing] = useState18(false);
|
|
42872
|
+
const descriptionRef = useRef8(null);
|
|
42873
|
+
const cardRef = useRef8(null);
|
|
42874
|
+
const checkDescriptionOverflow = useCallback6(() => {
|
|
42531
42875
|
const el = descriptionRef.current;
|
|
42532
42876
|
if (!el) return;
|
|
42533
42877
|
setIsDescriptionOverflowing(el.scrollHeight > el.clientHeight + 1);
|
|
42534
42878
|
}, []);
|
|
42535
|
-
|
|
42879
|
+
useEffect11(() => {
|
|
42536
42880
|
checkDescriptionOverflow();
|
|
42537
42881
|
}, [checkDescriptionOverflow, isExpanded, showFullDescription]);
|
|
42538
|
-
|
|
42882
|
+
useEffect11(() => {
|
|
42539
42883
|
const onResize = () => checkDescriptionOverflow();
|
|
42540
42884
|
window.addEventListener("resize", onResize);
|
|
42541
42885
|
return () => window.removeEventListener("resize", onResize);
|
|
@@ -42576,7 +42920,7 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42576
42920
|
};
|
|
42577
42921
|
const iso2 = normalizeToIso2(creator.country);
|
|
42578
42922
|
const meta = codeToMeta[iso2];
|
|
42579
|
-
return /* @__PURE__ */
|
|
42923
|
+
return /* @__PURE__ */ jsx174(
|
|
42580
42924
|
motion4.div,
|
|
42581
42925
|
{
|
|
42582
42926
|
ref: cardRef,
|
|
@@ -42587,10 +42931,10 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42587
42931
|
className: `bg-paperBackground dark:bg-gray50 rounded-[10px] border border-gray300 hover:border-purple100 shadow-sm cursor-pointer transition-all duration-300 ease-in-out ${isExpanded ? "col-span-full border-purple100" : ""}`,
|
|
42588
42932
|
style: isExpanded ? { gridColumn: "1 / -1" } : {},
|
|
42589
42933
|
onClick: toggleExpanded,
|
|
42590
|
-
children: /* @__PURE__ */
|
|
42591
|
-
/* @__PURE__ */
|
|
42592
|
-
/* @__PURE__ */
|
|
42593
|
-
creator.profile_pic ? /* @__PURE__ */
|
|
42934
|
+
children: /* @__PURE__ */ jsxs133("div", { className: "flex", children: [
|
|
42935
|
+
/* @__PURE__ */ jsxs133("div", { className: `${isExpanded ? "w-1/3" : "w-full"}`, children: [
|
|
42936
|
+
/* @__PURE__ */ jsxs133("div", { className: "relative w-full aspect-square mb-2", children: [
|
|
42937
|
+
creator.profile_pic ? /* @__PURE__ */ jsx174(
|
|
42594
42938
|
"img",
|
|
42595
42939
|
{
|
|
42596
42940
|
src: creator.profile_pic,
|
|
@@ -42598,15 +42942,15 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42598
42942
|
className: "w-full h-full object-cover bg-primary/10",
|
|
42599
42943
|
style: { borderRadius: "10px 10px 0 0" }
|
|
42600
42944
|
}
|
|
42601
|
-
) : /* @__PURE__ */
|
|
42945
|
+
) : /* @__PURE__ */ jsx174(
|
|
42602
42946
|
"div",
|
|
42603
42947
|
{
|
|
42604
42948
|
className: "w-full h-full bg-primary/10 flex items-center justify-center",
|
|
42605
42949
|
style: { borderRadius: "10px 10px 0 0" },
|
|
42606
|
-
children: /* @__PURE__ */
|
|
42950
|
+
children: /* @__PURE__ */ jsx174("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" })
|
|
42607
42951
|
}
|
|
42608
42952
|
),
|
|
42609
|
-
/* @__PURE__ */
|
|
42953
|
+
/* @__PURE__ */ jsx174(
|
|
42610
42954
|
"div",
|
|
42611
42955
|
{
|
|
42612
42956
|
className: `absolute bottom-2 right-2 ${getSentimentRank2(creator.sentiment?.matchScore || 0).bgColor} ${getSentimentRank2(creator.sentiment?.matchScore || 0).textColor} px-2 py-1 rounded-md text-md font-medium`,
|
|
@@ -42614,34 +42958,34 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42614
42958
|
}
|
|
42615
42959
|
)
|
|
42616
42960
|
] }),
|
|
42617
|
-
/* @__PURE__ */
|
|
42618
|
-
/* @__PURE__ */
|
|
42619
|
-
/* @__PURE__ */
|
|
42961
|
+
/* @__PURE__ */ jsxs133("div", { className: "px-3 pb-1", children: [
|
|
42962
|
+
/* @__PURE__ */ jsxs133("div", { children: [
|
|
42963
|
+
/* @__PURE__ */ jsx174(
|
|
42620
42964
|
"h3",
|
|
42621
42965
|
{
|
|
42622
42966
|
className: `${isExpanded ? "text-md" : "text-sm"} font-normal text-gray900 mb-1 line-clamp-2 text-start`,
|
|
42623
42967
|
children: creator.name || "Unnamed"
|
|
42624
42968
|
}
|
|
42625
42969
|
),
|
|
42626
|
-
/* @__PURE__ */
|
|
42970
|
+
/* @__PURE__ */ jsxs133(
|
|
42627
42971
|
"div",
|
|
42628
42972
|
{
|
|
42629
42973
|
className: `${isExpanded ? "text-sm" : "text-xs"} text-gray700 mb-1 text-start flex items-center gap-1`,
|
|
42630
42974
|
children: [
|
|
42631
|
-
/* @__PURE__ */
|
|
42632
|
-
/* @__PURE__ */
|
|
42975
|
+
/* @__PURE__ */ jsx174("span", { className: "text-base", children: meta?.flag }),
|
|
42976
|
+
/* @__PURE__ */ jsx174("span", { children: meta?.name || creator.country || "Unknown" })
|
|
42633
42977
|
]
|
|
42634
42978
|
}
|
|
42635
42979
|
),
|
|
42636
|
-
isExpanded && creator?.sentiment?.detailedScores && /* @__PURE__ */
|
|
42980
|
+
isExpanded && creator?.sentiment?.detailedScores && /* @__PURE__ */ jsx174("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx174("div", { className: "mt-2 w-[150px] flex gap-2", children: Object.entries(creator.sentiment.detailedScores).map(
|
|
42637
42981
|
([key, value]) => {
|
|
42638
42982
|
const itemRank = getSentimentRank2(value);
|
|
42639
|
-
return /* @__PURE__ */
|
|
42983
|
+
return /* @__PURE__ */ jsxs133(
|
|
42640
42984
|
"div",
|
|
42641
42985
|
{
|
|
42642
42986
|
className: "flex flex-col items-center w-[100px]",
|
|
42643
42987
|
children: [
|
|
42644
|
-
/* @__PURE__ */
|
|
42988
|
+
/* @__PURE__ */ jsxs133(
|
|
42645
42989
|
"span",
|
|
42646
42990
|
{
|
|
42647
42991
|
className: `text-[14px] font-bold ${itemRank.scoreColor}`,
|
|
@@ -42651,7 +42995,7 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42651
42995
|
]
|
|
42652
42996
|
}
|
|
42653
42997
|
),
|
|
42654
|
-
/* @__PURE__ */
|
|
42998
|
+
/* @__PURE__ */ jsx174("div", { className: "flex items-center justify-center gap-1 w-full", children: /* @__PURE__ */ jsx174("span", { className: "text-xs dark:text-gray500 text-center px-1", children: itemsExplanation.find(
|
|
42655
42999
|
(item) => item.key === key
|
|
42656
43000
|
)?.label }) })
|
|
42657
43001
|
]
|
|
@@ -42661,20 +43005,20 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42661
43005
|
}
|
|
42662
43006
|
) }) })
|
|
42663
43007
|
] }),
|
|
42664
|
-
!isExpanded && /* @__PURE__ */
|
|
42665
|
-
({ platform, icon: Icon3, followers }) => /* @__PURE__ */
|
|
43008
|
+
!isExpanded && /* @__PURE__ */ jsx174("div", { className: "flex gap-2 justify-between", children: platformStats.map(
|
|
43009
|
+
({ platform, icon: Icon3, followers }) => /* @__PURE__ */ jsxs133(
|
|
42666
43010
|
"div",
|
|
42667
43011
|
{
|
|
42668
43012
|
className: "flex flex-col items-center gap-1",
|
|
42669
43013
|
title: `${formatFollowerCount3(followers)} followers`,
|
|
42670
43014
|
children: [
|
|
42671
|
-
/* @__PURE__ */
|
|
43015
|
+
/* @__PURE__ */ jsx174(
|
|
42672
43016
|
Icon3,
|
|
42673
43017
|
{
|
|
42674
43018
|
className: `w-5 h-5 ${getPlatformIconColor(platform)}`
|
|
42675
43019
|
}
|
|
42676
43020
|
),
|
|
42677
|
-
/* @__PURE__ */
|
|
43021
|
+
/* @__PURE__ */ jsx174("span", { className: "text-xs dark:text-gray500", children: followers > 0 && formatFollowerCount3(followers) })
|
|
42678
43022
|
]
|
|
42679
43023
|
},
|
|
42680
43024
|
platform
|
|
@@ -42682,20 +43026,20 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42682
43026
|
) })
|
|
42683
43027
|
] })
|
|
42684
43028
|
] }),
|
|
42685
|
-
isExpanded && /* @__PURE__ */
|
|
42686
|
-
/* @__PURE__ */
|
|
42687
|
-
/* @__PURE__ */
|
|
43029
|
+
isExpanded && /* @__PURE__ */ jsx174("div", { className: "flex-1 border-l border-gray300 p-6 overflow-hidden transition-all duration-300 ease-in-out", children: /* @__PURE__ */ jsxs133("div", { className: "space-y-4", children: [
|
|
43030
|
+
/* @__PURE__ */ jsxs133("div", { children: [
|
|
43031
|
+
/* @__PURE__ */ jsxs133(
|
|
42688
43032
|
"div",
|
|
42689
43033
|
{
|
|
42690
43034
|
ref: descriptionRef,
|
|
42691
43035
|
className: `${showFullDescription ? "" : "max-h-[80px] overflow-hidden"} relative`,
|
|
42692
43036
|
children: [
|
|
42693
|
-
/* @__PURE__ */
|
|
42694
|
-
!showFullDescription && isDescriptionOverflowing && /* @__PURE__ */
|
|
43037
|
+
/* @__PURE__ */ jsx174("p", { className: "text-sm text-gray700 leading-relaxed", children: creator.description || "No description provided." }),
|
|
43038
|
+
!showFullDescription && isDescriptionOverflowing && /* @__PURE__ */ jsx174("div", { className: "pointer-events-none absolute bottom-0 left-0 right-0 h-10 bg-gradient-to-t from-gray25 to-transparent" })
|
|
42695
43039
|
]
|
|
42696
43040
|
}
|
|
42697
43041
|
),
|
|
42698
|
-
(isDescriptionOverflowing || showFullDescription) && /* @__PURE__ */
|
|
43042
|
+
(isDescriptionOverflowing || showFullDescription) && /* @__PURE__ */ jsx174(
|
|
42699
43043
|
"button",
|
|
42700
43044
|
{
|
|
42701
43045
|
onClick: (e) => {
|
|
@@ -42707,38 +43051,38 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42707
43051
|
}
|
|
42708
43052
|
)
|
|
42709
43053
|
] }),
|
|
42710
|
-
/* @__PURE__ */
|
|
42711
|
-
({ platform, icon: Icon3, followers, engagement }) => /* @__PURE__ */
|
|
42712
|
-
/* @__PURE__ */
|
|
43054
|
+
/* @__PURE__ */ jsx174("div", { className: "flex gap-6 justify-start items-center", children: platformStats.map(
|
|
43055
|
+
({ platform, icon: Icon3, followers, engagement }) => /* @__PURE__ */ jsxs133("div", { className: "flex items-center gap-3", children: [
|
|
43056
|
+
/* @__PURE__ */ jsxs133(
|
|
42713
43057
|
"div",
|
|
42714
43058
|
{
|
|
42715
43059
|
className: "flex items-center gap-1",
|
|
42716
43060
|
title: `${formatFollowerCount3(followers)} followers`,
|
|
42717
43061
|
children: [
|
|
42718
|
-
/* @__PURE__ */
|
|
43062
|
+
/* @__PURE__ */ jsx174(
|
|
42719
43063
|
Icon3,
|
|
42720
43064
|
{
|
|
42721
43065
|
className: `w-5 h-5 ${getPlatformIconColor(platform)}`
|
|
42722
43066
|
}
|
|
42723
43067
|
),
|
|
42724
|
-
/* @__PURE__ */
|
|
43068
|
+
/* @__PURE__ */ jsx174("span", { className: "text-xs dark:text-gray500", children: followers > 0 ? formatFollowerCount3(followers) : "0" })
|
|
42725
43069
|
]
|
|
42726
43070
|
}
|
|
42727
43071
|
),
|
|
42728
|
-
/* @__PURE__ */
|
|
42729
|
-
/* @__PURE__ */
|
|
42730
|
-
/* @__PURE__ */
|
|
43072
|
+
/* @__PURE__ */ jsxs133("div", { className: "flex items-center gap-1", children: [
|
|
43073
|
+
/* @__PURE__ */ jsx174(ChartColumn, { className: "w-5 h-5 dark:text-gray500" }),
|
|
43074
|
+
/* @__PURE__ */ jsxs133("span", { className: "text-sm dark:text-gray500 w-[40px]", children: [
|
|
42731
43075
|
(engagement * 100).toFixed(1),
|
|
42732
43076
|
"%"
|
|
42733
43077
|
] })
|
|
42734
43078
|
] })
|
|
42735
43079
|
] }, platform)
|
|
42736
43080
|
) }),
|
|
42737
|
-
creator.posts?.length > 0 && /* @__PURE__ */
|
|
42738
|
-
/* @__PURE__ */
|
|
42739
|
-
/* @__PURE__ */
|
|
43081
|
+
creator.posts?.length > 0 && /* @__PURE__ */ jsxs133("div", { className: "w-full overflow-hidden", children: [
|
|
43082
|
+
/* @__PURE__ */ jsx174("h3", { className: "mb-2 text-sm font-medium text-gray900", children: "Recent Posts" }),
|
|
43083
|
+
/* @__PURE__ */ jsx174("div", { className: "flex gap-3 overflow-x-auto", children: creator.posts.filter(
|
|
42740
43084
|
(post) => post.thumbnail || post.thumbnail_url
|
|
42741
|
-
).slice(0, 8).map((post, idx) => /* @__PURE__ */
|
|
43085
|
+
).slice(0, 8).map((post, idx) => /* @__PURE__ */ jsx174(
|
|
42742
43086
|
"a",
|
|
42743
43087
|
{
|
|
42744
43088
|
href: post.url || "#",
|
|
@@ -42746,7 +43090,7 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42746
43090
|
rel: "noopener noreferrer",
|
|
42747
43091
|
className: "block flex-shrink-0",
|
|
42748
43092
|
onClick: (e) => e.stopPropagation(),
|
|
42749
|
-
children: /* @__PURE__ */
|
|
43093
|
+
children: /* @__PURE__ */ jsx174(
|
|
42750
43094
|
"img",
|
|
42751
43095
|
{
|
|
42752
43096
|
src: post.thumbnail_url || post.thumbnail,
|
|
@@ -42758,9 +43102,9 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42758
43102
|
idx
|
|
42759
43103
|
)) })
|
|
42760
43104
|
] }),
|
|
42761
|
-
creator?.sentiment?.aiReasoning && /* @__PURE__ */
|
|
42762
|
-
/* @__PURE__ */
|
|
42763
|
-
/* @__PURE__ */
|
|
43105
|
+
creator?.sentiment?.aiReasoning && /* @__PURE__ */ jsxs133("div", { className: "text-gray700 max-h-[200px] overflow-auto", children: [
|
|
43106
|
+
/* @__PURE__ */ jsx174("h4", { className: "font-semibold text-sm", children: "AI Analysis" }),
|
|
43107
|
+
/* @__PURE__ */ jsx174("p", { className: "text-sm", children: creator.sentiment.aiReasoning })
|
|
42764
43108
|
] })
|
|
42765
43109
|
] }) })
|
|
42766
43110
|
] })
|
|
@@ -42770,11 +43114,11 @@ function CreatorGridViewCard({ creator }) {
|
|
|
42770
43114
|
function CreatorGridView({
|
|
42771
43115
|
creatorData
|
|
42772
43116
|
}) {
|
|
42773
|
-
return /* @__PURE__ */
|
|
43117
|
+
return /* @__PURE__ */ jsx174("div", { className: "grid grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4 [&>*]:transition-all [&>*]:duration-300 auto-rows-min relative grid-flow-dense", children: creatorData.map((creator) => /* @__PURE__ */ jsx174(CreatorGridViewCard, { creator }, creator._id)) });
|
|
42774
43118
|
}
|
|
42775
43119
|
|
|
42776
43120
|
// src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
|
|
42777
|
-
import { Fragment as
|
|
43121
|
+
import { Fragment as Fragment11, jsx as jsx175, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
42778
43122
|
var formatFollowerCount4 = (count) => {
|
|
42779
43123
|
if (count >= 1e6) {
|
|
42780
43124
|
const millions = count / 1e6;
|
|
@@ -42868,12 +43212,12 @@ function SearchSpecDisplay({ spec }) {
|
|
|
42868
43212
|
{
|
|
42869
43213
|
key: "platforms",
|
|
42870
43214
|
title: "Platforms",
|
|
42871
|
-
content: /* @__PURE__ */
|
|
43215
|
+
content: /* @__PURE__ */ jsx175("div", { className: "flex flex-wrap gap-2", children: (spec.platforms || []).filter((p) => ["instagram", "youtube", "tiktok"].includes(p.toLowerCase())).map((p, idx) => /* @__PURE__ */ jsx175("span", { className: `${tagClass} flex items-center justify-center`, children: p.charAt(0).toUpperCase() + p.slice(1).toLowerCase() }, idx)) })
|
|
42872
43216
|
},
|
|
42873
43217
|
{
|
|
42874
43218
|
key: "follower_range",
|
|
42875
43219
|
title: "Follower Range",
|
|
42876
|
-
content: /* @__PURE__ */
|
|
43220
|
+
content: /* @__PURE__ */ jsxs134("div", { className: `inline-block ${tagClass} font-grotesk`, children: [
|
|
42877
43221
|
formatFollowerCount4(spec?.follower_range?.min ?? 0),
|
|
42878
43222
|
" -",
|
|
42879
43223
|
" ",
|
|
@@ -42883,7 +43227,7 @@ function SearchSpecDisplay({ spec }) {
|
|
|
42883
43227
|
{
|
|
42884
43228
|
key: "geography",
|
|
42885
43229
|
title: "Geography",
|
|
42886
|
-
content: /* @__PURE__ */
|
|
43230
|
+
content: /* @__PURE__ */ jsx175("div", { className: `inline-block ${tagClass} font-grotesk`, children: /* @__PURE__ */ jsx175(
|
|
42887
43231
|
"div",
|
|
42888
43232
|
{
|
|
42889
43233
|
className: "max-w-[200px] overflow-x-auto whitespace-nowrap",
|
|
@@ -42897,7 +43241,7 @@ function SearchSpecDisplay({ spec }) {
|
|
|
42897
43241
|
e.currentTarget.style.overflow = "hidden";
|
|
42898
43242
|
e.currentTarget.scrollLeft = 0;
|
|
42899
43243
|
},
|
|
42900
|
-
children: (spec.geography || []).map((g, idx) => /* @__PURE__ */
|
|
43244
|
+
children: (spec.geography || []).map((g, idx) => /* @__PURE__ */ jsxs134("span", { children: [
|
|
42901
43245
|
g,
|
|
42902
43246
|
idx < spec.geography.length - 1 ? ", " : ""
|
|
42903
43247
|
] }, idx))
|
|
@@ -42907,13 +43251,13 @@ function SearchSpecDisplay({ spec }) {
|
|
|
42907
43251
|
{
|
|
42908
43252
|
key: "keyword_bundles",
|
|
42909
43253
|
title: "Keyword",
|
|
42910
|
-
content: /* @__PURE__ */
|
|
43254
|
+
content: /* @__PURE__ */ jsx175("div", { className: "flex gap-2 font-grotesk font-medium max-w-[500px] overflow-x-auto whitespace-nowrap", style: { scrollbarWidth: "none" }, children: priorityOneBundles.length === 0 ? /* @__PURE__ */ jsx175("div", { className: `${textClass} text-white/70`, children: "No priority 1 keywords" }) : priorityOneBundles.map((kw, idx) => /* @__PURE__ */ jsx175("span", { className: tagClass, children: kw }, idx)) })
|
|
42911
43255
|
}
|
|
42912
43256
|
];
|
|
42913
43257
|
const itemsToShow = ["platforms", "follower_range", "geography", "keyword_bundles"];
|
|
42914
|
-
return /* @__PURE__ */
|
|
42915
|
-
/* @__PURE__ */
|
|
42916
|
-
/* @__PURE__ */
|
|
43258
|
+
return /* @__PURE__ */ jsx175("div", { className: "mt-3", children: /* @__PURE__ */ jsx175("div", { className: "flex gap-4 pr-[30px] overflow-x-auto", style: { scrollbarWidth: "none" }, children: items.filter(({ key }) => itemsToShow.includes(key) && spec?.[key] !== void 0 && spec?.[key] !== null).map(({ key, title, content }) => /* @__PURE__ */ jsxs134("div", { className: "flex-none p-5 bg-paperBackground rounded-lg", children: [
|
|
43259
|
+
/* @__PURE__ */ jsx175("div", { className: "text-purpleText text-sm mb-4", children: /* @__PURE__ */ jsx175("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: title.toUpperCase() }) }),
|
|
43260
|
+
/* @__PURE__ */ jsx175("div", { className: `flex text-gray900 ${textClass}`, children: content })
|
|
42917
43261
|
] }, key)) }) });
|
|
42918
43262
|
}
|
|
42919
43263
|
function SentimentScoreRank({
|
|
@@ -42922,16 +43266,16 @@ function SentimentScoreRank({
|
|
|
42922
43266
|
showMinialView = false
|
|
42923
43267
|
}) {
|
|
42924
43268
|
const sentimentScoreRank = getSentimentRank3(score);
|
|
42925
|
-
return /* @__PURE__ */
|
|
42926
|
-
score !== void 0 && /* @__PURE__ */
|
|
43269
|
+
return /* @__PURE__ */ jsx175("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ jsxs134("div", { className: `flex flex-col justify-end ${showMinialView ? "w-[120px]" : "w-[150px]"} text-sm`, children: [
|
|
43270
|
+
score !== void 0 && /* @__PURE__ */ jsx175("div", { className: "flex justify-center items-center mb-2", children: /* @__PURE__ */ jsx175(
|
|
42927
43271
|
"span",
|
|
42928
43272
|
{
|
|
42929
43273
|
className: `${isValidationComplete ? sentimentScoreRank.bgColor : "bg-gray500"} ${isValidationComplete ? sentimentScoreRank.textColor : "text-gray200"} text-center rounded-md ${showMinialView ? "text-xs px-[6px] py-[2px]" : "text-sm px-2 py-[2px]"}`,
|
|
42930
43274
|
children: isValidationComplete ? sentimentScoreRank.rank : "Unranked"
|
|
42931
43275
|
}
|
|
42932
43276
|
) }),
|
|
42933
|
-
/* @__PURE__ */
|
|
42934
|
-
!showMinialView && /* @__PURE__ */
|
|
43277
|
+
/* @__PURE__ */ jsx175("div", { className: `flex justify-center ${showMinialView ? "text-[24px]" : "text-[28px]"} font-bold mb-3 ${sentimentScoreRank.scoreColor}`, children: isValidationComplete ? score >= 0 ? `${score}%` : "0%" : /* @__PURE__ */ jsx175("div", { className: "flex items-center justify-center py-2", children: /* @__PURE__ */ jsx175("div", { className: "w-6 h-6 border-2 border-purple100 border-t-transparent rounded-full animate-spin" }) }) }),
|
|
43278
|
+
!showMinialView && /* @__PURE__ */ jsx175("p", { className: "text-gray600 dark:text-gray500 text-center", children: "Match Score" })
|
|
42935
43279
|
] }) });
|
|
42936
43280
|
}
|
|
42937
43281
|
function BrandMentionPerformance({ creator }) {
|
|
@@ -42946,14 +43290,14 @@ function BrandMentionPerformance({ creator }) {
|
|
|
42946
43290
|
{ title: "Effectiveness", subtitle: "compared to all posts", value: `${insights?.effectivenessPercent || 0} %` },
|
|
42947
43291
|
{ title: "Saturation Rate", subtitle: "on brand mention", value: `${insights?.saturationRate || 0} %` }
|
|
42948
43292
|
];
|
|
42949
|
-
return /* @__PURE__ */
|
|
42950
|
-
/* @__PURE__ */
|
|
42951
|
-
/* @__PURE__ */
|
|
42952
|
-
/* @__PURE__ */
|
|
42953
|
-
/* @__PURE__ */
|
|
42954
|
-
/* @__PURE__ */
|
|
43293
|
+
return /* @__PURE__ */ jsxs134("div", { children: [
|
|
43294
|
+
/* @__PURE__ */ jsx175("div", { className: "text-purpleText text-xs mb-4", children: /* @__PURE__ */ jsx175("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "BRAND MENTION PERFORMANCE" }) }),
|
|
43295
|
+
/* @__PURE__ */ jsx175("div", { className: "flex flex-col gap-3", children: metrics.map((item) => /* @__PURE__ */ jsxs134("div", { className: "flex justify-between items-center text-gray700 text-sm", children: [
|
|
43296
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex flex-col gap-1", children: [
|
|
43297
|
+
/* @__PURE__ */ jsx175("h5", { children: item.title }),
|
|
43298
|
+
/* @__PURE__ */ jsx175("p", { className: "text-xs", children: item.subtitle })
|
|
42955
43299
|
] }),
|
|
42956
|
-
/* @__PURE__ */
|
|
43300
|
+
/* @__PURE__ */ jsx175("p", { className: "text-purpleText text-lg", children: item.value })
|
|
42957
43301
|
] }, item.title)) })
|
|
42958
43302
|
] });
|
|
42959
43303
|
}
|
|
@@ -42961,19 +43305,19 @@ function CreatorFitSummary({ creator, showBrandPerformance }) {
|
|
|
42961
43305
|
const hasDeepAnalysis = creator?.sentiment?.deepAnalysis?.deepAnalysis;
|
|
42962
43306
|
const title = hasDeepAnalysis ? "CREATOR DEEP ANALYSIS" : "CREATOR FIT SUMMARY";
|
|
42963
43307
|
const content = hasDeepAnalysis ? creator.sentiment.deepAnalysis.deepAnalysis : creator?.sentiment?.aiReasoning || "No data available.";
|
|
42964
|
-
return /* @__PURE__ */
|
|
42965
|
-
/* @__PURE__ */
|
|
42966
|
-
/* @__PURE__ */
|
|
43308
|
+
return /* @__PURE__ */ jsxs134("div", { className: showBrandPerformance ? "col-span-1" : "col-span-2", children: [
|
|
43309
|
+
/* @__PURE__ */ jsx175("div", { className: "text-purpleText text-xs mb-4", children: /* @__PURE__ */ jsx175("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: title }) }),
|
|
43310
|
+
/* @__PURE__ */ jsx175("div", { className: "max-h-[140px] overflow-y-auto slim-scrollbar", children: /* @__PURE__ */ jsx175("p", { className: "text-gray700 text-sm", children: content }) })
|
|
42967
43311
|
] });
|
|
42968
43312
|
}
|
|
42969
43313
|
function ProfileSection({ creator, isValidationComplete }) {
|
|
42970
43314
|
const username = creator.platformMetrics?.instagramMetrics?.username ? `@${creator.platformMetrics.instagramMetrics.username}` : creator.platformMetrics?.youtubeMetrics?.channelName ? `@${creator.platformMetrics.youtubeMetrics.channelName}` : creator.platformMetrics?.tiktokMetrics?.username ? `@${creator.platformMetrics.tiktokMetrics.username}` : "";
|
|
42971
43315
|
const iso2 = normalizeToIso2(creator.country);
|
|
42972
43316
|
const meta = codeToMeta[iso2];
|
|
42973
|
-
return /* @__PURE__ */
|
|
42974
|
-
/* @__PURE__ */
|
|
42975
|
-
/* @__PURE__ */
|
|
42976
|
-
/* @__PURE__ */
|
|
43317
|
+
return /* @__PURE__ */ jsxs134("div", { className: "flex items-start gap-1 md:gap-6", children: [
|
|
43318
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex flex-col items-center gap-6", children: [
|
|
43319
|
+
/* @__PURE__ */ jsx175("div", { className: "w-[5rem] h-[5rem] rounded-[10px] bg-primary/10 flex items-center justify-center flex-shrink-0 relative overflow-hidden", children: creator.profile_pic ? /* @__PURE__ */ jsxs134(Fragment11, { children: [
|
|
43320
|
+
/* @__PURE__ */ jsx175(
|
|
42977
43321
|
"img",
|
|
42978
43322
|
{
|
|
42979
43323
|
src: creator.profile_pic,
|
|
@@ -42981,24 +43325,24 @@ function ProfileSection({ creator, isValidationComplete }) {
|
|
|
42981
43325
|
className: "object-cover w-[5rem] h-[5rem] rounded-[15px]"
|
|
42982
43326
|
}
|
|
42983
43327
|
),
|
|
42984
|
-
creator?.profile?.isVerified && /* @__PURE__ */
|
|
43328
|
+
creator?.profile?.isVerified && /* @__PURE__ */ jsx175(
|
|
42985
43329
|
BadgeCheck,
|
|
42986
43330
|
{
|
|
42987
43331
|
size: 35,
|
|
42988
43332
|
className: "absolute -top-2 -right-2 text-blue-500 drop-shadow-sm fill-blue-300"
|
|
42989
43333
|
}
|
|
42990
43334
|
)
|
|
42991
|
-
] }) : /* @__PURE__ */
|
|
42992
|
-
/* @__PURE__ */
|
|
43335
|
+
] }) : /* @__PURE__ */ jsx175("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" }) }),
|
|
43336
|
+
/* @__PURE__ */ jsx175("div", { className: "block sm:hidden", children: /* @__PURE__ */ jsx175(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete, showMinialView: true }) })
|
|
42993
43337
|
] }),
|
|
42994
|
-
/* @__PURE__ */
|
|
42995
|
-
/* @__PURE__ */
|
|
42996
|
-
username && /* @__PURE__ */
|
|
42997
|
-
/* @__PURE__ */
|
|
42998
|
-
/* @__PURE__ */
|
|
42999
|
-
/* @__PURE__ */
|
|
43338
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex flex-col gap-3 truncate", children: [
|
|
43339
|
+
/* @__PURE__ */ jsx175("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx175("h4", { className: "text-lg text-gray900 max-w-[150px]", title: creator.name, children: truncateName2(creator.name, 100) }) }),
|
|
43340
|
+
username && /* @__PURE__ */ jsx175("div", { className: "text-xs text-gray700", children: username }),
|
|
43341
|
+
/* @__PURE__ */ jsxs134("div", { className: "text-sm text-gray700 flex items-center gap-2", children: [
|
|
43342
|
+
/* @__PURE__ */ jsx175("span", { className: "text-base", children: meta?.flag }),
|
|
43343
|
+
/* @__PURE__ */ jsx175("span", { children: meta?.name || creator.country || "Unknown" })
|
|
43000
43344
|
] }),
|
|
43001
|
-
/* @__PURE__ */
|
|
43345
|
+
/* @__PURE__ */ jsx175("div", { className: "text-xs text-gray700 text-wrap", children: truncateName2(creator.description, 100) })
|
|
43002
43346
|
] })
|
|
43003
43347
|
] });
|
|
43004
43348
|
}
|
|
@@ -43006,7 +43350,7 @@ function CreatorCardExpandedSection({
|
|
|
43006
43350
|
creator
|
|
43007
43351
|
}) {
|
|
43008
43352
|
const hasBrandBreakdown = creator?.brandCollaborations?.insights?.brandBreakdown && creator?.sentiment?.deepAnalysis;
|
|
43009
|
-
return /* @__PURE__ */
|
|
43353
|
+
return /* @__PURE__ */ jsxs134(
|
|
43010
43354
|
motion5.div,
|
|
43011
43355
|
{
|
|
43012
43356
|
initial: { y: 20, opacity: 0 },
|
|
@@ -43014,21 +43358,21 @@ function CreatorCardExpandedSection({
|
|
|
43014
43358
|
transition: { duration: 0.3, delay: 0.1 },
|
|
43015
43359
|
className: "md:mt-6 space-y-5",
|
|
43016
43360
|
children: [
|
|
43017
|
-
/* @__PURE__ */
|
|
43018
|
-
/* @__PURE__ */
|
|
43361
|
+
/* @__PURE__ */ jsxs134("div", { className: "md:grid md:grid-cols-[1.3fr_1fr_2fr_120px] gap-8 py-4 pr-7", children: [
|
|
43362
|
+
/* @__PURE__ */ jsx175("div", { className: "col-span-4 sm:col-span-1", children: hasBrandBreakdown ? /* @__PURE__ */ jsx175(
|
|
43019
43363
|
BrandCollaborationsList,
|
|
43020
43364
|
{
|
|
43021
43365
|
brandBreakdown: creator?.brandCollaborations
|
|
43022
43366
|
}
|
|
43023
|
-
) : /* @__PURE__ */
|
|
43024
|
-
/* @__PURE__ */
|
|
43367
|
+
) : /* @__PURE__ */ jsx175("div", { className: "hidden sm:block" }) }),
|
|
43368
|
+
/* @__PURE__ */ jsx175("div", { className: "col-span-4 sm:col-span-3", children: creator?.audienceDemographics ? /* @__PURE__ */ jsx175(
|
|
43025
43369
|
EngagedAudienceDemographics,
|
|
43026
43370
|
{
|
|
43027
43371
|
audienceDemographics: creator.audienceDemographics
|
|
43028
43372
|
}
|
|
43029
43373
|
) : null })
|
|
43030
43374
|
] }),
|
|
43031
|
-
/* @__PURE__ */
|
|
43375
|
+
/* @__PURE__ */ jsx175(
|
|
43032
43376
|
PlatformPostsSection,
|
|
43033
43377
|
{
|
|
43034
43378
|
platformMetrics: creator.platformMetrics,
|
|
@@ -43043,14 +43387,14 @@ function CreatorCard({
|
|
|
43043
43387
|
creator,
|
|
43044
43388
|
isValidationComplete
|
|
43045
43389
|
}) {
|
|
43046
|
-
const [detailsExpanded, setDetailsExpanded] =
|
|
43390
|
+
const [detailsExpanded, setDetailsExpanded] = useState19(false);
|
|
43047
43391
|
const hasValidBrandMention = (() => {
|
|
43048
43392
|
const insights = creator?.brandCollaborations?.insights;
|
|
43049
43393
|
if (!insights) return false;
|
|
43050
43394
|
const isValid2 = (val) => val !== null && val !== void 0 && val !== 0 && val !== "0" && val !== "" && !Number.isNaN(val);
|
|
43051
43395
|
return isValid2(insights.averageBrandEngagementRate) || isValid2(insights.effectivenessPercent) || isValid2(insights.saturationRate);
|
|
43052
43396
|
})();
|
|
43053
|
-
return /* @__PURE__ */
|
|
43397
|
+
return /* @__PURE__ */ jsxs134(
|
|
43054
43398
|
motion5.div,
|
|
43055
43399
|
{
|
|
43056
43400
|
layout: true,
|
|
@@ -43061,20 +43405,20 @@ function CreatorCard({
|
|
|
43061
43405
|
className: `flex flex-col bg-paperBackground rounded-[25px] py-5 pl-7 border-2 shadow-sm cursor-pointer transition-all ${detailsExpanded ? "border-purple100" : "border-gray300"}`,
|
|
43062
43406
|
onClick: () => setDetailsExpanded((prev) => !prev),
|
|
43063
43407
|
children: [
|
|
43064
|
-
/* @__PURE__ */
|
|
43065
|
-
/* @__PURE__ */
|
|
43066
|
-
hasValidBrandMention && /* @__PURE__ */
|
|
43067
|
-
/* @__PURE__ */
|
|
43068
|
-
/* @__PURE__ */
|
|
43408
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex flex-col gap-4 sm:grid sm:grid-cols-[1.3fr_1fr_2fr_120px] gap-8 items-start w-full pr-7", children: [
|
|
43409
|
+
/* @__PURE__ */ jsx175(ProfileSection, { creator, isValidationComplete }),
|
|
43410
|
+
hasValidBrandMention && /* @__PURE__ */ jsx175(BrandMentionPerformance, { creator }),
|
|
43411
|
+
/* @__PURE__ */ jsx175(CreatorFitSummary, { creator, showBrandPerformance: hasValidBrandMention }),
|
|
43412
|
+
/* @__PURE__ */ jsx175("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx175(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete }) })
|
|
43069
43413
|
] }),
|
|
43070
|
-
/* @__PURE__ */
|
|
43414
|
+
/* @__PURE__ */ jsx175(AnimatePresence4, { children: detailsExpanded && /* @__PURE__ */ jsx175(
|
|
43071
43415
|
motion5.div,
|
|
43072
43416
|
{
|
|
43073
43417
|
initial: { height: 0, opacity: 0 },
|
|
43074
43418
|
animate: { height: "auto", opacity: 1, transition: { height: { duration: 0.4, ease: [0.04, 0.62, 0.23, 0.98] }, opacity: { duration: 0.3, delay: 0.1 } } },
|
|
43075
43419
|
exit: { height: 0, opacity: 0, transition: { height: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] }, opacity: { duration: 0.2 } } },
|
|
43076
43420
|
className: "overflow-hidden mt-4",
|
|
43077
|
-
children: /* @__PURE__ */
|
|
43421
|
+
children: /* @__PURE__ */ jsx175(CreatorCardExpandedSection, { creator })
|
|
43078
43422
|
}
|
|
43079
43423
|
) })
|
|
43080
43424
|
]
|
|
@@ -43085,19 +43429,19 @@ function CreatorDisplay({
|
|
|
43085
43429
|
creators,
|
|
43086
43430
|
isValidationComplete
|
|
43087
43431
|
}) {
|
|
43088
|
-
const [viewMode, setViewMode] =
|
|
43089
|
-
return /* @__PURE__ */
|
|
43090
|
-
/* @__PURE__ */
|
|
43091
|
-
/* @__PURE__ */
|
|
43432
|
+
const [viewMode, setViewMode] = useState19("list");
|
|
43433
|
+
return /* @__PURE__ */ jsxs134("div", { className: "px-4", children: [
|
|
43434
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex justify-end items-center my-3 gap-1", children: [
|
|
43435
|
+
/* @__PURE__ */ jsxs134("span", { className: "text-xs text-gray600 mr-2", children: [
|
|
43092
43436
|
creators.length,
|
|
43093
43437
|
" creators"
|
|
43094
43438
|
] }),
|
|
43095
|
-
/* @__PURE__ */
|
|
43439
|
+
/* @__PURE__ */ jsx175(
|
|
43096
43440
|
"button",
|
|
43097
43441
|
{
|
|
43098
43442
|
className: `h-7 w-7 flex items-center justify-center rounded ${viewMode === "list" ? "bg-gray200" : ""}`,
|
|
43099
43443
|
onClick: () => setViewMode("list"),
|
|
43100
|
-
children: /* @__PURE__ */
|
|
43444
|
+
children: /* @__PURE__ */ jsx175(
|
|
43101
43445
|
AlignJustify,
|
|
43102
43446
|
{
|
|
43103
43447
|
className: `h-5 w-5 ${viewMode === "list" ? "text-gray900 dark:text-white" : "text-gray500"}`
|
|
@@ -43105,12 +43449,12 @@ function CreatorDisplay({
|
|
|
43105
43449
|
)
|
|
43106
43450
|
}
|
|
43107
43451
|
),
|
|
43108
|
-
/* @__PURE__ */
|
|
43452
|
+
/* @__PURE__ */ jsx175(
|
|
43109
43453
|
"button",
|
|
43110
43454
|
{
|
|
43111
43455
|
className: `h-7 w-7 flex items-center justify-center rounded ${viewMode === "grid" ? "bg-gray200" : ""}`,
|
|
43112
43456
|
onClick: () => setViewMode("grid"),
|
|
43113
|
-
children: /* @__PURE__ */
|
|
43457
|
+
children: /* @__PURE__ */ jsx175(
|
|
43114
43458
|
LayoutGrid,
|
|
43115
43459
|
{
|
|
43116
43460
|
className: `h-5 w-5 ${viewMode === "grid" ? "text-gray900 dark:text-white" : "text-gray500"}`
|
|
@@ -43119,43 +43463,43 @@ function CreatorDisplay({
|
|
|
43119
43463
|
}
|
|
43120
43464
|
)
|
|
43121
43465
|
] }),
|
|
43122
|
-
creators.length > 0 ? viewMode === "list" ? /* @__PURE__ */
|
|
43123
|
-
/* @__PURE__ */
|
|
43124
|
-
/* @__PURE__ */
|
|
43125
|
-
/* @__PURE__ */
|
|
43466
|
+
creators.length > 0 ? viewMode === "list" ? /* @__PURE__ */ jsx175("div", { className: "space-y-4", children: creators.map((creator) => /* @__PURE__ */ jsx175(CreatorCard, { creator, isValidationComplete }, creator._id)) }) : /* @__PURE__ */ jsx175(CreatorGridView, { creatorData: creators }) : /* @__PURE__ */ jsxs134("div", { className: "text-center py-8 bg-gray100 rounded-lg border border-gray300", children: [
|
|
43467
|
+
/* @__PURE__ */ jsx175("div", { className: "w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-3", children: /* @__PURE__ */ jsx175(Users, { className: "w-6 h-6 text-primary" }) }),
|
|
43468
|
+
/* @__PURE__ */ jsx175("h3", { className: "text-base font-medium text-gray900", children: "No creators found" }),
|
|
43469
|
+
/* @__PURE__ */ jsx175("p", { className: "mt-1 text-sm text-gray600", children: "Try adjusting your search criteria" })
|
|
43126
43470
|
] })
|
|
43127
43471
|
] });
|
|
43128
43472
|
}
|
|
43129
43473
|
function CreatorCardSkeleton() {
|
|
43130
|
-
return /* @__PURE__ */
|
|
43131
|
-
/* @__PURE__ */
|
|
43132
|
-
/* @__PURE__ */
|
|
43133
|
-
/* @__PURE__ */
|
|
43134
|
-
/* @__PURE__ */
|
|
43135
|
-
/* @__PURE__ */
|
|
43136
|
-
/* @__PURE__ */
|
|
43137
|
-
/* @__PURE__ */
|
|
43474
|
+
return /* @__PURE__ */ jsx175("div", { className: "bg-paperBackground rounded-[25px] py-5 pl-7 pr-7 border-2 border-gray300 shadow-sm", children: /* @__PURE__ */ jsxs134("div", { className: "flex flex-col gap-4 sm:grid sm:grid-cols-[1.3fr_1fr_2fr_120px] gap-8 items-start w-full", children: [
|
|
43475
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex items-start gap-1 md:gap-6", children: [
|
|
43476
|
+
/* @__PURE__ */ jsx175("div", { className: "w-[5rem] h-[5rem] rounded-[10px] bg-gray200 animate-pulse" }),
|
|
43477
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex flex-col gap-3", children: [
|
|
43478
|
+
/* @__PURE__ */ jsx175("div", { className: "h-5 w-36 rounded bg-gray200 animate-pulse" }),
|
|
43479
|
+
/* @__PURE__ */ jsx175("div", { className: "h-3 w-24 rounded bg-gray200 animate-pulse" }),
|
|
43480
|
+
/* @__PURE__ */ jsx175("div", { className: "h-3 w-32 rounded bg-gray200 animate-pulse" }),
|
|
43481
|
+
/* @__PURE__ */ jsx175("div", { className: "h-3 w-44 rounded bg-gray200 animate-pulse" })
|
|
43138
43482
|
] })
|
|
43139
43483
|
] }),
|
|
43140
|
-
/* @__PURE__ */
|
|
43141
|
-
/* @__PURE__ */
|
|
43142
|
-
/* @__PURE__ */
|
|
43143
|
-
/* @__PURE__ */
|
|
43484
|
+
/* @__PURE__ */ jsxs134("div", { className: "space-y-3 w-full", children: [
|
|
43485
|
+
/* @__PURE__ */ jsx175("div", { className: "h-4 w-32 rounded bg-gray200 animate-pulse" }),
|
|
43486
|
+
/* @__PURE__ */ jsx175("div", { className: "h-4 w-28 rounded bg-gray200 animate-pulse" }),
|
|
43487
|
+
/* @__PURE__ */ jsx175("div", { className: "h-4 w-24 rounded bg-gray200 animate-pulse" })
|
|
43144
43488
|
] }),
|
|
43145
|
-
/* @__PURE__ */
|
|
43146
|
-
/* @__PURE__ */
|
|
43147
|
-
/* @__PURE__ */
|
|
43148
|
-
/* @__PURE__ */
|
|
43149
|
-
/* @__PURE__ */
|
|
43489
|
+
/* @__PURE__ */ jsxs134("div", { className: "space-y-3 w-full", children: [
|
|
43490
|
+
/* @__PURE__ */ jsx175("div", { className: "h-4 w-40 rounded bg-gray200 animate-pulse" }),
|
|
43491
|
+
/* @__PURE__ */ jsx175("div", { className: "h-3 w-full rounded bg-gray200 animate-pulse" }),
|
|
43492
|
+
/* @__PURE__ */ jsx175("div", { className: "h-3 w-[90%] rounded bg-gray200 animate-pulse" }),
|
|
43493
|
+
/* @__PURE__ */ jsx175("div", { className: "h-3 w-[75%] rounded bg-gray200 animate-pulse" })
|
|
43150
43494
|
] }),
|
|
43151
|
-
/* @__PURE__ */
|
|
43152
|
-
/* @__PURE__ */
|
|
43153
|
-
/* @__PURE__ */
|
|
43495
|
+
/* @__PURE__ */ jsxs134("div", { className: "hidden md:flex flex-col items-center justify-center gap-3", children: [
|
|
43496
|
+
/* @__PURE__ */ jsx175("div", { className: "h-6 w-16 rounded bg-gray200 animate-pulse" }),
|
|
43497
|
+
/* @__PURE__ */ jsx175("div", { className: "h-4 w-20 rounded bg-gray200 animate-pulse" })
|
|
43154
43498
|
] })
|
|
43155
43499
|
] }) });
|
|
43156
43500
|
}
|
|
43157
43501
|
function CreatorDisplaySkeleton() {
|
|
43158
|
-
return /* @__PURE__ */
|
|
43502
|
+
return /* @__PURE__ */ jsx175("div", { className: "px-4 py-4 space-y-4", children: Array.from({ length: 3 }).map((_, idx) => /* @__PURE__ */ jsx175(CreatorCardSkeleton, {}, idx)) });
|
|
43159
43503
|
}
|
|
43160
43504
|
function CreatorExpandedPanel({
|
|
43161
43505
|
isOpen,
|
|
@@ -43166,10 +43510,10 @@ function CreatorExpandedPanel({
|
|
|
43166
43510
|
searchSpec,
|
|
43167
43511
|
fetchCreatorDetails
|
|
43168
43512
|
}) {
|
|
43169
|
-
const [creators, setCreators] =
|
|
43170
|
-
const [loading, setLoading] =
|
|
43513
|
+
const [creators, setCreators] = useState19([]);
|
|
43514
|
+
const [loading, setLoading] = useState19(false);
|
|
43171
43515
|
const fetcher = fetchCreatorDetails ?? defaultFetchCreatorDetails;
|
|
43172
|
-
const loadCreators =
|
|
43516
|
+
const loadCreators = useCallback7(async () => {
|
|
43173
43517
|
if (!creatorIds.length) return;
|
|
43174
43518
|
setLoading(true);
|
|
43175
43519
|
try {
|
|
@@ -43181,15 +43525,15 @@ function CreatorExpandedPanel({
|
|
|
43181
43525
|
setLoading(false);
|
|
43182
43526
|
}
|
|
43183
43527
|
}, [creatorIds, sessionId, version, fetcher]);
|
|
43184
|
-
|
|
43528
|
+
useEffect12(() => {
|
|
43185
43529
|
if (isOpen && creatorIds.length > 0) {
|
|
43186
43530
|
loadCreators();
|
|
43187
43531
|
}
|
|
43188
43532
|
}, [isOpen, loadCreators]);
|
|
43189
43533
|
if (typeof window === "undefined") return null;
|
|
43190
43534
|
return ReactDOM2.createPortal(
|
|
43191
|
-
/* @__PURE__ */
|
|
43192
|
-
/* @__PURE__ */
|
|
43535
|
+
/* @__PURE__ */ jsx175(AnimatePresence4, { mode: "sync", children: isOpen && /* @__PURE__ */ jsxs134(Fragment11, { children: [
|
|
43536
|
+
/* @__PURE__ */ jsx175(
|
|
43193
43537
|
motion5.div,
|
|
43194
43538
|
{
|
|
43195
43539
|
initial: { opacity: 0 },
|
|
@@ -43204,7 +43548,7 @@ function CreatorExpandedPanel({
|
|
|
43204
43548
|
},
|
|
43205
43549
|
"overlay"
|
|
43206
43550
|
),
|
|
43207
|
-
/* @__PURE__ */
|
|
43551
|
+
/* @__PURE__ */ jsx175(
|
|
43208
43552
|
motion5.div,
|
|
43209
43553
|
{
|
|
43210
43554
|
initial: { x: "100%" },
|
|
@@ -43212,19 +43556,19 @@ function CreatorExpandedPanel({
|
|
|
43212
43556
|
exit: { x: "100%" },
|
|
43213
43557
|
transition: { type: "spring", damping: 30, stiffness: 400 },
|
|
43214
43558
|
className: "fixed top-0 right-0 h-full w-full max-w-7xl bg-background dark:bg-gray25 z-[70] shadow-2xl overflow-y-auto border border-gray300",
|
|
43215
|
-
children: /* @__PURE__ */
|
|
43216
|
-
/* @__PURE__ */
|
|
43217
|
-
/* @__PURE__ */
|
|
43218
|
-
/* @__PURE__ */
|
|
43219
|
-
/* @__PURE__ */
|
|
43220
|
-
/* @__PURE__ */
|
|
43221
|
-
/* @__PURE__ */
|
|
43559
|
+
children: /* @__PURE__ */ jsxs134("div", { className: "py-4 font-noto", children: [
|
|
43560
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex justify-between items-center w-full mb-4 pl-2", children: [
|
|
43561
|
+
/* @__PURE__ */ jsx175("button", { onClick: onClose, className: "p-2 rounded-full transition-colors", children: /* @__PURE__ */ jsx175(X, { className: "w-5 h-5" }) }),
|
|
43562
|
+
/* @__PURE__ */ jsxs134("div", { className: "flex-1 flex flex-col w-[80%]", children: [
|
|
43563
|
+
/* @__PURE__ */ jsx175("div", { className: "flex flex-col md:flex-row justify-between gap-2 md:gap-0 md:items-center pr-16", children: /* @__PURE__ */ jsxs134("div", { className: "flex flex-col", children: [
|
|
43564
|
+
/* @__PURE__ */ jsx175("div", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] mb-2", children: /* @__PURE__ */ jsx175("h4", { className: "text-xs font-medium text-purpleText", children: "VERIFIED SEARCH RESULTS" }) }),
|
|
43565
|
+
/* @__PURE__ */ jsx175("h2", { className: "text-xl font-bold mb-1", children: "Creators Search Results" })
|
|
43222
43566
|
] }) }),
|
|
43223
|
-
searchSpec && /* @__PURE__ */
|
|
43567
|
+
searchSpec && /* @__PURE__ */ jsx175(SearchSpecDisplay, { spec: searchSpec })
|
|
43224
43568
|
] })
|
|
43225
43569
|
] }),
|
|
43226
|
-
/* @__PURE__ */
|
|
43227
|
-
loading ? /* @__PURE__ */
|
|
43570
|
+
/* @__PURE__ */ jsx175("div", { className: "border-b border-gray300" }),
|
|
43571
|
+
loading ? /* @__PURE__ */ jsx175(CreatorDisplaySkeleton, {}) : /* @__PURE__ */ jsx175(CreatorDisplay, { creators, isValidationComplete: version !== void 0 })
|
|
43228
43572
|
] })
|
|
43229
43573
|
},
|
|
43230
43574
|
"creator-panel"
|
|
@@ -43235,7 +43579,7 @@ function CreatorExpandedPanel({
|
|
|
43235
43579
|
}
|
|
43236
43580
|
|
|
43237
43581
|
// src/molecules/creator-discovery/CreatorWidget/useCreatorWidgetPolling.ts
|
|
43238
|
-
import { useState as
|
|
43582
|
+
import { useState as useState20, useEffect as useEffect13, useCallback as useCallback8, useMemo as useMemo11, useRef as useRef9 } from "react";
|
|
43239
43583
|
var DEFAULT_POLLING_CONFIG = {
|
|
43240
43584
|
pollInterval: 5e3,
|
|
43241
43585
|
maxDuration: 15 * 60 * 1e3,
|
|
@@ -43256,18 +43600,18 @@ function useCreatorWidgetPolling({
|
|
|
43256
43600
|
() => ({ ...DEFAULT_POLLING_CONFIG, ...pollingConfig }),
|
|
43257
43601
|
[pollingConfig]
|
|
43258
43602
|
);
|
|
43259
|
-
const [versionData, setVersionData] =
|
|
43260
|
-
const [totalVersions, setTotalVersions] =
|
|
43261
|
-
const [selectedVersion, setSelectedVersion] =
|
|
43262
|
-
const [isLoadingVersion, setIsLoadingVersion] =
|
|
43263
|
-
const [isValidationComplete, setIsValidationComplete] =
|
|
43264
|
-
const [versionStatus, setVersionStatus] =
|
|
43265
|
-
const [statusDetails, setStatusDetails] =
|
|
43266
|
-
const [timeDisplay, setTimeDisplay] =
|
|
43267
|
-
const [loadingStatus, setLoadingStatus] =
|
|
43268
|
-
const remainingTimeRef =
|
|
43603
|
+
const [versionData, setVersionData] = useState20(null);
|
|
43604
|
+
const [totalVersions, setTotalVersions] = useState20(0);
|
|
43605
|
+
const [selectedVersion, setSelectedVersion] = useState20();
|
|
43606
|
+
const [isLoadingVersion, setIsLoadingVersion] = useState20(false);
|
|
43607
|
+
const [isValidationComplete, setIsValidationComplete] = useState20(false);
|
|
43608
|
+
const [versionStatus, setVersionStatus] = useState20("checking");
|
|
43609
|
+
const [statusDetails, setStatusDetails] = useState20();
|
|
43610
|
+
const [timeDisplay, setTimeDisplay] = useState20("");
|
|
43611
|
+
const [loadingStatus, setLoadingStatus] = useState20(true);
|
|
43612
|
+
const remainingTimeRef = useRef9(0);
|
|
43269
43613
|
const requestedVersion = selectedVersion ?? currentVersion ?? versionData?.currentVersion;
|
|
43270
|
-
const fetchVersionData =
|
|
43614
|
+
const fetchVersionData = useCallback8(async () => {
|
|
43271
43615
|
if (!sessionId) return;
|
|
43272
43616
|
if (!versionData) setIsLoadingVersion(true);
|
|
43273
43617
|
try {
|
|
@@ -43288,17 +43632,17 @@ function useCreatorWidgetPolling({
|
|
|
43288
43632
|
setIsLoadingVersion(false);
|
|
43289
43633
|
}
|
|
43290
43634
|
}, [sessionId, requestedVersion, isValidationComplete, fetchVersions, versionData]);
|
|
43291
|
-
|
|
43635
|
+
useEffect13(() => {
|
|
43292
43636
|
fetchVersionData();
|
|
43293
43637
|
}, [sessionId, requestedVersion, isValidationComplete]);
|
|
43294
|
-
|
|
43638
|
+
useEffect13(() => {
|
|
43295
43639
|
if (totalVersions > 0 || !sessionId) return;
|
|
43296
43640
|
const interval = setInterval(() => {
|
|
43297
43641
|
if (totalVersions === 0) fetchVersionData();
|
|
43298
43642
|
}, config.pollInterval);
|
|
43299
43643
|
return () => clearInterval(interval);
|
|
43300
43644
|
}, [totalVersions, sessionId, fetchVersionData, config.pollInterval]);
|
|
43301
|
-
|
|
43645
|
+
useEffect13(() => {
|
|
43302
43646
|
if (!selectedVersion && !requestedVersion) return;
|
|
43303
43647
|
const activeVersion = selectedVersion ?? requestedVersion;
|
|
43304
43648
|
let isMounted = true;
|
|
@@ -43408,7 +43752,7 @@ function useCreatorWidgetPolling({
|
|
|
43408
43752
|
}
|
|
43409
43753
|
|
|
43410
43754
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
|
|
43411
|
-
import { jsx as
|
|
43755
|
+
import { jsx as jsx176, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
43412
43756
|
function CreatorWidgetInner({
|
|
43413
43757
|
sessionId,
|
|
43414
43758
|
currentVersion,
|
|
@@ -43421,7 +43765,7 @@ function CreatorWidgetInner({
|
|
|
43421
43765
|
onAction,
|
|
43422
43766
|
className
|
|
43423
43767
|
}) {
|
|
43424
|
-
const [isExpanded, setIsExpanded] =
|
|
43768
|
+
const [isExpanded, setIsExpanded] = useState21(false);
|
|
43425
43769
|
const {
|
|
43426
43770
|
versionNumbers,
|
|
43427
43771
|
selectedVersion,
|
|
@@ -43442,11 +43786,11 @@ function CreatorWidgetInner({
|
|
|
43442
43786
|
pollingConfig,
|
|
43443
43787
|
onStatusChange
|
|
43444
43788
|
});
|
|
43445
|
-
const handleVersionSelect =
|
|
43789
|
+
const handleVersionSelect = useCallback9(
|
|
43446
43790
|
(version) => setSelectedVersion(version),
|
|
43447
43791
|
[setSelectedVersion]
|
|
43448
43792
|
);
|
|
43449
|
-
const handleViewCreators =
|
|
43793
|
+
const handleViewCreators = useCallback9(() => {
|
|
43450
43794
|
setIsExpanded(true);
|
|
43451
43795
|
onAction?.({
|
|
43452
43796
|
type: "view-creators",
|
|
@@ -43456,8 +43800,8 @@ function CreatorWidgetInner({
|
|
|
43456
43800
|
searchSpec
|
|
43457
43801
|
});
|
|
43458
43802
|
}, [onAction, sessionId, creatorIds, selectedVersion, searchSpec]);
|
|
43459
|
-
return /* @__PURE__ */
|
|
43460
|
-
/* @__PURE__ */
|
|
43803
|
+
return /* @__PURE__ */ jsxs135("div", { className, children: [
|
|
43804
|
+
/* @__PURE__ */ jsx176(
|
|
43461
43805
|
CreatorCompactView,
|
|
43462
43806
|
{
|
|
43463
43807
|
versions: versionNumbers,
|
|
@@ -43473,7 +43817,7 @@ function CreatorWidgetInner({
|
|
|
43473
43817
|
isLoading
|
|
43474
43818
|
}
|
|
43475
43819
|
),
|
|
43476
|
-
/* @__PURE__ */
|
|
43820
|
+
/* @__PURE__ */ jsx176(
|
|
43477
43821
|
CreatorExpandedPanel,
|
|
43478
43822
|
{
|
|
43479
43823
|
isOpen: isExpanded,
|
|
@@ -43781,7 +44125,7 @@ __export(ui_exports, {
|
|
|
43781
44125
|
// src/components/ui/button-group.tsx
|
|
43782
44126
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
43783
44127
|
import { cva as cva8 } from "class-variance-authority";
|
|
43784
|
-
import { jsx as
|
|
44128
|
+
import { jsx as jsx177 } from "react/jsx-runtime";
|
|
43785
44129
|
var buttonGroupVariants = cva8(
|
|
43786
44130
|
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
43787
44131
|
{
|
|
@@ -43801,7 +44145,7 @@ function ButtonGroup({
|
|
|
43801
44145
|
orientation,
|
|
43802
44146
|
...props
|
|
43803
44147
|
}) {
|
|
43804
|
-
return /* @__PURE__ */
|
|
44148
|
+
return /* @__PURE__ */ jsx177(
|
|
43805
44149
|
"div",
|
|
43806
44150
|
{
|
|
43807
44151
|
role: "group",
|
|
@@ -43818,7 +44162,7 @@ function ButtonGroupText({
|
|
|
43818
44162
|
...props
|
|
43819
44163
|
}) {
|
|
43820
44164
|
const Comp = asChild ? Slot4 : "div";
|
|
43821
|
-
return /* @__PURE__ */
|
|
44165
|
+
return /* @__PURE__ */ jsx177(
|
|
43822
44166
|
Comp,
|
|
43823
44167
|
{
|
|
43824
44168
|
className: cn(
|
|
@@ -43834,7 +44178,7 @@ function ButtonGroupSeparator({
|
|
|
43834
44178
|
orientation = "vertical",
|
|
43835
44179
|
...props
|
|
43836
44180
|
}) {
|
|
43837
|
-
return /* @__PURE__ */
|
|
44181
|
+
return /* @__PURE__ */ jsx177(
|
|
43838
44182
|
Separator2,
|
|
43839
44183
|
{
|
|
43840
44184
|
"data-slot": "button-group-separator",
|
|
@@ -43850,9 +44194,9 @@ function ButtonGroupSeparator({
|
|
|
43850
44194
|
|
|
43851
44195
|
// src/components/ui/empty.tsx
|
|
43852
44196
|
import { cva as cva9 } from "class-variance-authority";
|
|
43853
|
-
import { jsx as
|
|
44197
|
+
import { jsx as jsx178 } from "react/jsx-runtime";
|
|
43854
44198
|
function Empty({ className, ...props }) {
|
|
43855
|
-
return /* @__PURE__ */
|
|
44199
|
+
return /* @__PURE__ */ jsx178(
|
|
43856
44200
|
"div",
|
|
43857
44201
|
{
|
|
43858
44202
|
"data-slot": "empty",
|
|
@@ -43865,7 +44209,7 @@ function Empty({ className, ...props }) {
|
|
|
43865
44209
|
);
|
|
43866
44210
|
}
|
|
43867
44211
|
function EmptyHeader({ className, ...props }) {
|
|
43868
|
-
return /* @__PURE__ */
|
|
44212
|
+
return /* @__PURE__ */ jsx178(
|
|
43869
44213
|
"div",
|
|
43870
44214
|
{
|
|
43871
44215
|
"data-slot": "empty-header",
|
|
@@ -43896,7 +44240,7 @@ function EmptyMedia({
|
|
|
43896
44240
|
variant = "default",
|
|
43897
44241
|
...props
|
|
43898
44242
|
}) {
|
|
43899
|
-
return /* @__PURE__ */
|
|
44243
|
+
return /* @__PURE__ */ jsx178(
|
|
43900
44244
|
"div",
|
|
43901
44245
|
{
|
|
43902
44246
|
"data-slot": "empty-icon",
|
|
@@ -43907,7 +44251,7 @@ function EmptyMedia({
|
|
|
43907
44251
|
);
|
|
43908
44252
|
}
|
|
43909
44253
|
function EmptyTitle({ className, ...props }) {
|
|
43910
|
-
return /* @__PURE__ */
|
|
44254
|
+
return /* @__PURE__ */ jsx178(
|
|
43911
44255
|
"div",
|
|
43912
44256
|
{
|
|
43913
44257
|
"data-slot": "empty-title",
|
|
@@ -43917,7 +44261,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
43917
44261
|
);
|
|
43918
44262
|
}
|
|
43919
44263
|
function EmptyDescription({ className, ...props }) {
|
|
43920
|
-
return /* @__PURE__ */
|
|
44264
|
+
return /* @__PURE__ */ jsx178(
|
|
43921
44265
|
"div",
|
|
43922
44266
|
{
|
|
43923
44267
|
"data-slot": "empty-description",
|
|
@@ -43930,7 +44274,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
43930
44274
|
);
|
|
43931
44275
|
}
|
|
43932
44276
|
function EmptyContent({ className, ...props }) {
|
|
43933
|
-
return /* @__PURE__ */
|
|
44277
|
+
return /* @__PURE__ */ jsx178(
|
|
43934
44278
|
"div",
|
|
43935
44279
|
{
|
|
43936
44280
|
"data-slot": "empty-content",
|
|
@@ -43946,9 +44290,9 @@ function EmptyContent({ className, ...props }) {
|
|
|
43946
44290
|
// src/components/ui/field.tsx
|
|
43947
44291
|
import { useMemo as useMemo12 } from "react";
|
|
43948
44292
|
import { cva as cva10 } from "class-variance-authority";
|
|
43949
|
-
import { jsx as
|
|
44293
|
+
import { jsx as jsx179, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
43950
44294
|
function FieldSet({ className, ...props }) {
|
|
43951
|
-
return /* @__PURE__ */
|
|
44295
|
+
return /* @__PURE__ */ jsx179(
|
|
43952
44296
|
"fieldset",
|
|
43953
44297
|
{
|
|
43954
44298
|
"data-slot": "field-set",
|
|
@@ -43966,7 +44310,7 @@ function FieldLegend({
|
|
|
43966
44310
|
variant = "legend",
|
|
43967
44311
|
...props
|
|
43968
44312
|
}) {
|
|
43969
|
-
return /* @__PURE__ */
|
|
44313
|
+
return /* @__PURE__ */ jsx179(
|
|
43970
44314
|
"legend",
|
|
43971
44315
|
{
|
|
43972
44316
|
"data-slot": "field-legend",
|
|
@@ -43982,7 +44326,7 @@ function FieldLegend({
|
|
|
43982
44326
|
);
|
|
43983
44327
|
}
|
|
43984
44328
|
function FieldGroup({ className, ...props }) {
|
|
43985
|
-
return /* @__PURE__ */
|
|
44329
|
+
return /* @__PURE__ */ jsx179(
|
|
43986
44330
|
"div",
|
|
43987
44331
|
{
|
|
43988
44332
|
"data-slot": "field-group",
|
|
@@ -44022,7 +44366,7 @@ function Field({
|
|
|
44022
44366
|
orientation = "vertical",
|
|
44023
44367
|
...props
|
|
44024
44368
|
}) {
|
|
44025
|
-
return /* @__PURE__ */
|
|
44369
|
+
return /* @__PURE__ */ jsx179(
|
|
44026
44370
|
"div",
|
|
44027
44371
|
{
|
|
44028
44372
|
role: "group",
|
|
@@ -44034,7 +44378,7 @@ function Field({
|
|
|
44034
44378
|
);
|
|
44035
44379
|
}
|
|
44036
44380
|
function FieldContent({ className, ...props }) {
|
|
44037
|
-
return /* @__PURE__ */
|
|
44381
|
+
return /* @__PURE__ */ jsx179(
|
|
44038
44382
|
"div",
|
|
44039
44383
|
{
|
|
44040
44384
|
"data-slot": "field-content",
|
|
@@ -44050,7 +44394,7 @@ function FieldLabel({
|
|
|
44050
44394
|
className,
|
|
44051
44395
|
...props
|
|
44052
44396
|
}) {
|
|
44053
|
-
return /* @__PURE__ */
|
|
44397
|
+
return /* @__PURE__ */ jsx179(
|
|
44054
44398
|
Label,
|
|
44055
44399
|
{
|
|
44056
44400
|
"data-slot": "field-label",
|
|
@@ -44065,7 +44409,7 @@ function FieldLabel({
|
|
|
44065
44409
|
);
|
|
44066
44410
|
}
|
|
44067
44411
|
function FieldTitle({ className, ...props }) {
|
|
44068
|
-
return /* @__PURE__ */
|
|
44412
|
+
return /* @__PURE__ */ jsx179(
|
|
44069
44413
|
"div",
|
|
44070
44414
|
{
|
|
44071
44415
|
"data-slot": "field-label",
|
|
@@ -44078,7 +44422,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
44078
44422
|
);
|
|
44079
44423
|
}
|
|
44080
44424
|
function FieldDescription({ className, ...props }) {
|
|
44081
|
-
return /* @__PURE__ */
|
|
44425
|
+
return /* @__PURE__ */ jsx179(
|
|
44082
44426
|
"p",
|
|
44083
44427
|
{
|
|
44084
44428
|
"data-slot": "field-description",
|
|
@@ -44097,7 +44441,7 @@ function FieldSeparator({
|
|
|
44097
44441
|
className,
|
|
44098
44442
|
...props
|
|
44099
44443
|
}) {
|
|
44100
|
-
return /* @__PURE__ */
|
|
44444
|
+
return /* @__PURE__ */ jsxs136(
|
|
44101
44445
|
"div",
|
|
44102
44446
|
{
|
|
44103
44447
|
"data-slot": "field-separator",
|
|
@@ -44108,8 +44452,8 @@ function FieldSeparator({
|
|
|
44108
44452
|
),
|
|
44109
44453
|
...props,
|
|
44110
44454
|
children: [
|
|
44111
|
-
/* @__PURE__ */
|
|
44112
|
-
children && /* @__PURE__ */
|
|
44455
|
+
/* @__PURE__ */ jsx179(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
44456
|
+
children && /* @__PURE__ */ jsx179(
|
|
44113
44457
|
"span",
|
|
44114
44458
|
{
|
|
44115
44459
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -44137,14 +44481,14 @@ function FieldError({
|
|
|
44137
44481
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
44138
44482
|
return errors[0].message;
|
|
44139
44483
|
}
|
|
44140
|
-
return /* @__PURE__ */
|
|
44141
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
44484
|
+
return /* @__PURE__ */ jsx179("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
44485
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx179("li", { children: error.message }, index)
|
|
44142
44486
|
) });
|
|
44143
44487
|
}, [children, errors]);
|
|
44144
44488
|
if (!content) {
|
|
44145
44489
|
return null;
|
|
44146
44490
|
}
|
|
44147
|
-
return /* @__PURE__ */
|
|
44491
|
+
return /* @__PURE__ */ jsx179(
|
|
44148
44492
|
"div",
|
|
44149
44493
|
{
|
|
44150
44494
|
role: "alert",
|
|
@@ -44158,9 +44502,9 @@ function FieldError({
|
|
|
44158
44502
|
|
|
44159
44503
|
// src/components/ui/input-group.tsx
|
|
44160
44504
|
import { cva as cva11 } from "class-variance-authority";
|
|
44161
|
-
import { jsx as
|
|
44505
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
44162
44506
|
function InputGroup({ className, ...props }) {
|
|
44163
|
-
return /* @__PURE__ */
|
|
44507
|
+
return /* @__PURE__ */ jsx180(
|
|
44164
44508
|
"div",
|
|
44165
44509
|
{
|
|
44166
44510
|
"data-slot": "input-group",
|
|
@@ -44204,7 +44548,7 @@ function InputGroupAddon({
|
|
|
44204
44548
|
align = "inline-start",
|
|
44205
44549
|
...props
|
|
44206
44550
|
}) {
|
|
44207
|
-
return /* @__PURE__ */
|
|
44551
|
+
return /* @__PURE__ */ jsx180(
|
|
44208
44552
|
"div",
|
|
44209
44553
|
{
|
|
44210
44554
|
role: "group",
|
|
@@ -44244,7 +44588,7 @@ function InputGroupButton({
|
|
|
44244
44588
|
size = "xs",
|
|
44245
44589
|
...props
|
|
44246
44590
|
}) {
|
|
44247
|
-
return /* @__PURE__ */
|
|
44591
|
+
return /* @__PURE__ */ jsx180(
|
|
44248
44592
|
Button,
|
|
44249
44593
|
{
|
|
44250
44594
|
type,
|
|
@@ -44256,7 +44600,7 @@ function InputGroupButton({
|
|
|
44256
44600
|
);
|
|
44257
44601
|
}
|
|
44258
44602
|
function InputGroupText({ className, ...props }) {
|
|
44259
|
-
return /* @__PURE__ */
|
|
44603
|
+
return /* @__PURE__ */ jsx180(
|
|
44260
44604
|
"span",
|
|
44261
44605
|
{
|
|
44262
44606
|
className: cn(
|
|
@@ -44271,7 +44615,7 @@ function InputGroupInput({
|
|
|
44271
44615
|
className,
|
|
44272
44616
|
...props
|
|
44273
44617
|
}) {
|
|
44274
|
-
return /* @__PURE__ */
|
|
44618
|
+
return /* @__PURE__ */ jsx180(
|
|
44275
44619
|
Input,
|
|
44276
44620
|
{
|
|
44277
44621
|
"data-slot": "input-group-control",
|
|
@@ -44287,7 +44631,7 @@ function InputGroupTextarea({
|
|
|
44287
44631
|
className,
|
|
44288
44632
|
...props
|
|
44289
44633
|
}) {
|
|
44290
|
-
return /* @__PURE__ */
|
|
44634
|
+
return /* @__PURE__ */ jsx180(
|
|
44291
44635
|
Textarea,
|
|
44292
44636
|
{
|
|
44293
44637
|
"data-slot": "input-group-control",
|
|
@@ -44303,9 +44647,9 @@ function InputGroupTextarea({
|
|
|
44303
44647
|
// src/components/ui/item.tsx
|
|
44304
44648
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
44305
44649
|
import { cva as cva12 } from "class-variance-authority";
|
|
44306
|
-
import { jsx as
|
|
44650
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
44307
44651
|
function ItemGroup({ className, ...props }) {
|
|
44308
|
-
return /* @__PURE__ */
|
|
44652
|
+
return /* @__PURE__ */ jsx181(
|
|
44309
44653
|
"div",
|
|
44310
44654
|
{
|
|
44311
44655
|
role: "list",
|
|
@@ -44319,7 +44663,7 @@ function ItemSeparator({
|
|
|
44319
44663
|
className,
|
|
44320
44664
|
...props
|
|
44321
44665
|
}) {
|
|
44322
|
-
return /* @__PURE__ */
|
|
44666
|
+
return /* @__PURE__ */ jsx181(
|
|
44323
44667
|
Separator2,
|
|
44324
44668
|
{
|
|
44325
44669
|
"data-slot": "item-separator",
|
|
@@ -44357,7 +44701,7 @@ function Item8({
|
|
|
44357
44701
|
...props
|
|
44358
44702
|
}) {
|
|
44359
44703
|
const Comp = asChild ? Slot5 : "div";
|
|
44360
|
-
return /* @__PURE__ */
|
|
44704
|
+
return /* @__PURE__ */ jsx181(
|
|
44361
44705
|
Comp,
|
|
44362
44706
|
{
|
|
44363
44707
|
"data-slot": "item",
|
|
@@ -44388,7 +44732,7 @@ function ItemMedia({
|
|
|
44388
44732
|
variant = "default",
|
|
44389
44733
|
...props
|
|
44390
44734
|
}) {
|
|
44391
|
-
return /* @__PURE__ */
|
|
44735
|
+
return /* @__PURE__ */ jsx181(
|
|
44392
44736
|
"div",
|
|
44393
44737
|
{
|
|
44394
44738
|
"data-slot": "item-media",
|
|
@@ -44399,7 +44743,7 @@ function ItemMedia({
|
|
|
44399
44743
|
);
|
|
44400
44744
|
}
|
|
44401
44745
|
function ItemContent({ className, ...props }) {
|
|
44402
|
-
return /* @__PURE__ */
|
|
44746
|
+
return /* @__PURE__ */ jsx181(
|
|
44403
44747
|
"div",
|
|
44404
44748
|
{
|
|
44405
44749
|
"data-slot": "item-content",
|
|
@@ -44412,7 +44756,7 @@ function ItemContent({ className, ...props }) {
|
|
|
44412
44756
|
);
|
|
44413
44757
|
}
|
|
44414
44758
|
function ItemTitle({ className, ...props }) {
|
|
44415
|
-
return /* @__PURE__ */
|
|
44759
|
+
return /* @__PURE__ */ jsx181(
|
|
44416
44760
|
"div",
|
|
44417
44761
|
{
|
|
44418
44762
|
"data-slot": "item-title",
|
|
@@ -44425,7 +44769,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
44425
44769
|
);
|
|
44426
44770
|
}
|
|
44427
44771
|
function ItemDescription({ className, ...props }) {
|
|
44428
|
-
return /* @__PURE__ */
|
|
44772
|
+
return /* @__PURE__ */ jsx181(
|
|
44429
44773
|
"p",
|
|
44430
44774
|
{
|
|
44431
44775
|
"data-slot": "item-description",
|
|
@@ -44439,7 +44783,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
44439
44783
|
);
|
|
44440
44784
|
}
|
|
44441
44785
|
function ItemActions({ className, ...props }) {
|
|
44442
|
-
return /* @__PURE__ */
|
|
44786
|
+
return /* @__PURE__ */ jsx181(
|
|
44443
44787
|
"div",
|
|
44444
44788
|
{
|
|
44445
44789
|
"data-slot": "item-actions",
|
|
@@ -44449,7 +44793,7 @@ function ItemActions({ className, ...props }) {
|
|
|
44449
44793
|
);
|
|
44450
44794
|
}
|
|
44451
44795
|
function ItemHeader({ className, ...props }) {
|
|
44452
|
-
return /* @__PURE__ */
|
|
44796
|
+
return /* @__PURE__ */ jsx181(
|
|
44453
44797
|
"div",
|
|
44454
44798
|
{
|
|
44455
44799
|
"data-slot": "item-header",
|
|
@@ -44462,7 +44806,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
44462
44806
|
);
|
|
44463
44807
|
}
|
|
44464
44808
|
function ItemFooter({ className, ...props }) {
|
|
44465
|
-
return /* @__PURE__ */
|
|
44809
|
+
return /* @__PURE__ */ jsx181(
|
|
44466
44810
|
"div",
|
|
44467
44811
|
{
|
|
44468
44812
|
"data-slot": "item-footer",
|
|
@@ -44476,9 +44820,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
44476
44820
|
}
|
|
44477
44821
|
|
|
44478
44822
|
// src/components/ui/kbd.tsx
|
|
44479
|
-
import { jsx as
|
|
44823
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
44480
44824
|
function Kbd({ className, ...props }) {
|
|
44481
|
-
return /* @__PURE__ */
|
|
44825
|
+
return /* @__PURE__ */ jsx182(
|
|
44482
44826
|
"kbd",
|
|
44483
44827
|
{
|
|
44484
44828
|
"data-slot": "kbd",
|
|
@@ -44493,7 +44837,7 @@ function Kbd({ className, ...props }) {
|
|
|
44493
44837
|
);
|
|
44494
44838
|
}
|
|
44495
44839
|
function KbdGroup({ className, ...props }) {
|
|
44496
|
-
return /* @__PURE__ */
|
|
44840
|
+
return /* @__PURE__ */ jsx182(
|
|
44497
44841
|
"kbd",
|
|
44498
44842
|
{
|
|
44499
44843
|
"data-slot": "kbd-group",
|
|
@@ -44504,16 +44848,16 @@ function KbdGroup({ className, ...props }) {
|
|
|
44504
44848
|
}
|
|
44505
44849
|
|
|
44506
44850
|
// src/components/ui/sidebar.tsx
|
|
44507
|
-
import * as
|
|
44851
|
+
import * as React114 from "react";
|
|
44508
44852
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
44509
44853
|
import { cva as cva13 } from "class-variance-authority";
|
|
44510
44854
|
|
|
44511
44855
|
// src/hooks/use-mobile.tsx
|
|
44512
|
-
import * as
|
|
44856
|
+
import * as React113 from "react";
|
|
44513
44857
|
var MOBILE_BREAKPOINT = 768;
|
|
44514
44858
|
function useIsMobile() {
|
|
44515
|
-
const [isMobile, setIsMobile] =
|
|
44516
|
-
|
|
44859
|
+
const [isMobile, setIsMobile] = React113.useState(void 0);
|
|
44860
|
+
React113.useEffect(() => {
|
|
44517
44861
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
44518
44862
|
const onChange = () => {
|
|
44519
44863
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -44526,22 +44870,22 @@ function useIsMobile() {
|
|
|
44526
44870
|
}
|
|
44527
44871
|
|
|
44528
44872
|
// src/components/ui/sidebar.tsx
|
|
44529
|
-
import { jsx as
|
|
44873
|
+
import { jsx as jsx183, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
44530
44874
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
44531
44875
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
44532
44876
|
var SIDEBAR_WIDTH = "16rem";
|
|
44533
44877
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
44534
44878
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
44535
44879
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
44536
|
-
var SidebarContext =
|
|
44880
|
+
var SidebarContext = React114.createContext(null);
|
|
44537
44881
|
function useSidebar() {
|
|
44538
|
-
const context =
|
|
44882
|
+
const context = React114.useContext(SidebarContext);
|
|
44539
44883
|
if (!context) {
|
|
44540
44884
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
44541
44885
|
}
|
|
44542
44886
|
return context;
|
|
44543
44887
|
}
|
|
44544
|
-
var SidebarProvider =
|
|
44888
|
+
var SidebarProvider = React114.forwardRef(
|
|
44545
44889
|
({
|
|
44546
44890
|
defaultOpen = true,
|
|
44547
44891
|
open: openProp,
|
|
@@ -44552,10 +44896,10 @@ var SidebarProvider = React113.forwardRef(
|
|
|
44552
44896
|
...props
|
|
44553
44897
|
}, ref) => {
|
|
44554
44898
|
const isMobile = useIsMobile();
|
|
44555
|
-
const [openMobile, setOpenMobile] =
|
|
44556
|
-
const [_open, _setOpen] =
|
|
44899
|
+
const [openMobile, setOpenMobile] = React114.useState(false);
|
|
44900
|
+
const [_open, _setOpen] = React114.useState(defaultOpen);
|
|
44557
44901
|
const open = openProp ?? _open;
|
|
44558
|
-
const setOpen =
|
|
44902
|
+
const setOpen = React114.useCallback(
|
|
44559
44903
|
(value) => {
|
|
44560
44904
|
const openState = typeof value === "function" ? value(open) : value;
|
|
44561
44905
|
if (setOpenProp) {
|
|
@@ -44567,10 +44911,10 @@ var SidebarProvider = React113.forwardRef(
|
|
|
44567
44911
|
},
|
|
44568
44912
|
[setOpenProp, open]
|
|
44569
44913
|
);
|
|
44570
|
-
const toggleSidebar =
|
|
44914
|
+
const toggleSidebar = React114.useCallback(() => {
|
|
44571
44915
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
44572
44916
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
44573
|
-
|
|
44917
|
+
React114.useEffect(() => {
|
|
44574
44918
|
const handleKeyDown = (event) => {
|
|
44575
44919
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
44576
44920
|
event.preventDefault();
|
|
@@ -44581,7 +44925,7 @@ var SidebarProvider = React113.forwardRef(
|
|
|
44581
44925
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
44582
44926
|
}, [toggleSidebar]);
|
|
44583
44927
|
const state = open ? "expanded" : "collapsed";
|
|
44584
|
-
const contextValue =
|
|
44928
|
+
const contextValue = React114.useMemo(
|
|
44585
44929
|
() => ({
|
|
44586
44930
|
state,
|
|
44587
44931
|
open,
|
|
@@ -44593,7 +44937,7 @@ var SidebarProvider = React113.forwardRef(
|
|
|
44593
44937
|
}),
|
|
44594
44938
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
44595
44939
|
);
|
|
44596
|
-
return /* @__PURE__ */
|
|
44940
|
+
return /* @__PURE__ */ jsx183(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx183(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx183(
|
|
44597
44941
|
"div",
|
|
44598
44942
|
{
|
|
44599
44943
|
style: {
|
|
@@ -44613,7 +44957,7 @@ var SidebarProvider = React113.forwardRef(
|
|
|
44613
44957
|
}
|
|
44614
44958
|
);
|
|
44615
44959
|
SidebarProvider.displayName = "SidebarProvider";
|
|
44616
|
-
var Sidebar =
|
|
44960
|
+
var Sidebar = React114.forwardRef(
|
|
44617
44961
|
({
|
|
44618
44962
|
side = "left",
|
|
44619
44963
|
variant = "sidebar",
|
|
@@ -44624,7 +44968,7 @@ var Sidebar = React113.forwardRef(
|
|
|
44624
44968
|
}, ref) => {
|
|
44625
44969
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
44626
44970
|
if (collapsible === "none") {
|
|
44627
|
-
return /* @__PURE__ */
|
|
44971
|
+
return /* @__PURE__ */ jsx183(
|
|
44628
44972
|
"div",
|
|
44629
44973
|
{
|
|
44630
44974
|
className: cn(
|
|
@@ -44638,7 +44982,7 @@ var Sidebar = React113.forwardRef(
|
|
|
44638
44982
|
);
|
|
44639
44983
|
}
|
|
44640
44984
|
if (isMobile) {
|
|
44641
|
-
return /* @__PURE__ */
|
|
44985
|
+
return /* @__PURE__ */ jsx183(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs137(
|
|
44642
44986
|
SheetContent,
|
|
44643
44987
|
{
|
|
44644
44988
|
"data-sidebar": "sidebar",
|
|
@@ -44649,16 +44993,16 @@ var Sidebar = React113.forwardRef(
|
|
|
44649
44993
|
},
|
|
44650
44994
|
side,
|
|
44651
44995
|
children: [
|
|
44652
|
-
/* @__PURE__ */
|
|
44653
|
-
/* @__PURE__ */
|
|
44654
|
-
/* @__PURE__ */
|
|
44996
|
+
/* @__PURE__ */ jsxs137(SheetHeader, { className: "sr-only", children: [
|
|
44997
|
+
/* @__PURE__ */ jsx183(SheetTitle, { children: "Sidebar" }),
|
|
44998
|
+
/* @__PURE__ */ jsx183(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
44655
44999
|
] }),
|
|
44656
|
-
/* @__PURE__ */
|
|
45000
|
+
/* @__PURE__ */ jsx183("div", { className: "flex h-full w-full flex-col", children })
|
|
44657
45001
|
]
|
|
44658
45002
|
}
|
|
44659
45003
|
) });
|
|
44660
45004
|
}
|
|
44661
|
-
return /* @__PURE__ */
|
|
45005
|
+
return /* @__PURE__ */ jsxs137(
|
|
44662
45006
|
"div",
|
|
44663
45007
|
{
|
|
44664
45008
|
ref,
|
|
@@ -44668,7 +45012,7 @@ var Sidebar = React113.forwardRef(
|
|
|
44668
45012
|
"data-variant": variant,
|
|
44669
45013
|
"data-side": side,
|
|
44670
45014
|
children: [
|
|
44671
|
-
/* @__PURE__ */
|
|
45015
|
+
/* @__PURE__ */ jsx183(
|
|
44672
45016
|
"div",
|
|
44673
45017
|
{
|
|
44674
45018
|
className: cn(
|
|
@@ -44679,7 +45023,7 @@ var Sidebar = React113.forwardRef(
|
|
|
44679
45023
|
)
|
|
44680
45024
|
}
|
|
44681
45025
|
),
|
|
44682
|
-
/* @__PURE__ */
|
|
45026
|
+
/* @__PURE__ */ jsx183(
|
|
44683
45027
|
"div",
|
|
44684
45028
|
{
|
|
44685
45029
|
className: cn(
|
|
@@ -44690,7 +45034,7 @@ var Sidebar = React113.forwardRef(
|
|
|
44690
45034
|
className
|
|
44691
45035
|
),
|
|
44692
45036
|
...props,
|
|
44693
|
-
children: /* @__PURE__ */
|
|
45037
|
+
children: /* @__PURE__ */ jsx183(
|
|
44694
45038
|
"div",
|
|
44695
45039
|
{
|
|
44696
45040
|
"data-sidebar": "sidebar",
|
|
@@ -44706,9 +45050,9 @@ var Sidebar = React113.forwardRef(
|
|
|
44706
45050
|
}
|
|
44707
45051
|
);
|
|
44708
45052
|
Sidebar.displayName = "Sidebar";
|
|
44709
|
-
var SidebarTrigger =
|
|
45053
|
+
var SidebarTrigger = React114.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
44710
45054
|
const { toggleSidebar } = useSidebar();
|
|
44711
|
-
return /* @__PURE__ */
|
|
45055
|
+
return /* @__PURE__ */ jsxs137(
|
|
44712
45056
|
Button,
|
|
44713
45057
|
{
|
|
44714
45058
|
ref,
|
|
@@ -44722,16 +45066,16 @@ var SidebarTrigger = React113.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
44722
45066
|
},
|
|
44723
45067
|
...props,
|
|
44724
45068
|
children: [
|
|
44725
|
-
/* @__PURE__ */
|
|
44726
|
-
/* @__PURE__ */
|
|
45069
|
+
/* @__PURE__ */ jsx183(PanelLeft, {}),
|
|
45070
|
+
/* @__PURE__ */ jsx183("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
44727
45071
|
]
|
|
44728
45072
|
}
|
|
44729
45073
|
);
|
|
44730
45074
|
});
|
|
44731
45075
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
44732
|
-
var SidebarRail =
|
|
45076
|
+
var SidebarRail = React114.forwardRef(({ className, ...props }, ref) => {
|
|
44733
45077
|
const { toggleSidebar } = useSidebar();
|
|
44734
|
-
return /* @__PURE__ */
|
|
45078
|
+
return /* @__PURE__ */ jsx183(
|
|
44735
45079
|
"button",
|
|
44736
45080
|
{
|
|
44737
45081
|
ref,
|
|
@@ -44754,8 +45098,8 @@ var SidebarRail = React113.forwardRef(({ className, ...props }, ref) => {
|
|
|
44754
45098
|
);
|
|
44755
45099
|
});
|
|
44756
45100
|
SidebarRail.displayName = "SidebarRail";
|
|
44757
|
-
var SidebarInset =
|
|
44758
|
-
return /* @__PURE__ */
|
|
45101
|
+
var SidebarInset = React114.forwardRef(({ className, ...props }, ref) => {
|
|
45102
|
+
return /* @__PURE__ */ jsx183(
|
|
44759
45103
|
"main",
|
|
44760
45104
|
{
|
|
44761
45105
|
ref,
|
|
@@ -44769,8 +45113,8 @@ var SidebarInset = React113.forwardRef(({ className, ...props }, ref) => {
|
|
|
44769
45113
|
);
|
|
44770
45114
|
});
|
|
44771
45115
|
SidebarInset.displayName = "SidebarInset";
|
|
44772
|
-
var SidebarInput =
|
|
44773
|
-
return /* @__PURE__ */
|
|
45116
|
+
var SidebarInput = React114.forwardRef(({ className, ...props }, ref) => {
|
|
45117
|
+
return /* @__PURE__ */ jsx183(
|
|
44774
45118
|
Input,
|
|
44775
45119
|
{
|
|
44776
45120
|
ref,
|
|
@@ -44784,8 +45128,8 @@ var SidebarInput = React113.forwardRef(({ className, ...props }, ref) => {
|
|
|
44784
45128
|
);
|
|
44785
45129
|
});
|
|
44786
45130
|
SidebarInput.displayName = "SidebarInput";
|
|
44787
|
-
var SidebarHeader =
|
|
44788
|
-
return /* @__PURE__ */
|
|
45131
|
+
var SidebarHeader = React114.forwardRef(({ className, ...props }, ref) => {
|
|
45132
|
+
return /* @__PURE__ */ jsx183(
|
|
44789
45133
|
"div",
|
|
44790
45134
|
{
|
|
44791
45135
|
ref,
|
|
@@ -44796,8 +45140,8 @@ var SidebarHeader = React113.forwardRef(({ className, ...props }, ref) => {
|
|
|
44796
45140
|
);
|
|
44797
45141
|
});
|
|
44798
45142
|
SidebarHeader.displayName = "SidebarHeader";
|
|
44799
|
-
var SidebarFooter =
|
|
44800
|
-
return /* @__PURE__ */
|
|
45143
|
+
var SidebarFooter = React114.forwardRef(({ className, ...props }, ref) => {
|
|
45144
|
+
return /* @__PURE__ */ jsx183(
|
|
44801
45145
|
"div",
|
|
44802
45146
|
{
|
|
44803
45147
|
ref,
|
|
@@ -44808,8 +45152,8 @@ var SidebarFooter = React113.forwardRef(({ className, ...props }, ref) => {
|
|
|
44808
45152
|
);
|
|
44809
45153
|
});
|
|
44810
45154
|
SidebarFooter.displayName = "SidebarFooter";
|
|
44811
|
-
var SidebarSeparator =
|
|
44812
|
-
return /* @__PURE__ */
|
|
45155
|
+
var SidebarSeparator = React114.forwardRef(({ className, ...props }, ref) => {
|
|
45156
|
+
return /* @__PURE__ */ jsx183(
|
|
44813
45157
|
Separator2,
|
|
44814
45158
|
{
|
|
44815
45159
|
ref,
|
|
@@ -44820,8 +45164,8 @@ var SidebarSeparator = React113.forwardRef(({ className, ...props }, ref) => {
|
|
|
44820
45164
|
);
|
|
44821
45165
|
});
|
|
44822
45166
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
44823
|
-
var SidebarContent =
|
|
44824
|
-
return /* @__PURE__ */
|
|
45167
|
+
var SidebarContent = React114.forwardRef(({ className, ...props }, ref) => {
|
|
45168
|
+
return /* @__PURE__ */ jsx183(
|
|
44825
45169
|
"div",
|
|
44826
45170
|
{
|
|
44827
45171
|
ref,
|
|
@@ -44835,8 +45179,8 @@ var SidebarContent = React113.forwardRef(({ className, ...props }, ref) => {
|
|
|
44835
45179
|
);
|
|
44836
45180
|
});
|
|
44837
45181
|
SidebarContent.displayName = "SidebarContent";
|
|
44838
|
-
var SidebarGroup =
|
|
44839
|
-
return /* @__PURE__ */
|
|
45182
|
+
var SidebarGroup = React114.forwardRef(({ className, ...props }, ref) => {
|
|
45183
|
+
return /* @__PURE__ */ jsx183(
|
|
44840
45184
|
"div",
|
|
44841
45185
|
{
|
|
44842
45186
|
ref,
|
|
@@ -44847,9 +45191,9 @@ var SidebarGroup = React113.forwardRef(({ className, ...props }, ref) => {
|
|
|
44847
45191
|
);
|
|
44848
45192
|
});
|
|
44849
45193
|
SidebarGroup.displayName = "SidebarGroup";
|
|
44850
|
-
var SidebarGroupLabel =
|
|
45194
|
+
var SidebarGroupLabel = React114.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
44851
45195
|
const Comp = asChild ? Slot6 : "div";
|
|
44852
|
-
return /* @__PURE__ */
|
|
45196
|
+
return /* @__PURE__ */ jsx183(
|
|
44853
45197
|
Comp,
|
|
44854
45198
|
{
|
|
44855
45199
|
ref,
|
|
@@ -44864,9 +45208,9 @@ var SidebarGroupLabel = React113.forwardRef(({ className, asChild = false, ...pr
|
|
|
44864
45208
|
);
|
|
44865
45209
|
});
|
|
44866
45210
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
44867
|
-
var SidebarGroupAction =
|
|
45211
|
+
var SidebarGroupAction = React114.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
44868
45212
|
const Comp = asChild ? Slot6 : "button";
|
|
44869
|
-
return /* @__PURE__ */
|
|
45213
|
+
return /* @__PURE__ */ jsx183(
|
|
44870
45214
|
Comp,
|
|
44871
45215
|
{
|
|
44872
45216
|
ref,
|
|
@@ -44883,7 +45227,7 @@ var SidebarGroupAction = React113.forwardRef(({ className, asChild = false, ...p
|
|
|
44883
45227
|
);
|
|
44884
45228
|
});
|
|
44885
45229
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
44886
|
-
var SidebarGroupContent =
|
|
45230
|
+
var SidebarGroupContent = React114.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx183(
|
|
44887
45231
|
"div",
|
|
44888
45232
|
{
|
|
44889
45233
|
ref,
|
|
@@ -44893,7 +45237,7 @@ var SidebarGroupContent = React113.forwardRef(({ className, ...props }, ref) =>
|
|
|
44893
45237
|
}
|
|
44894
45238
|
));
|
|
44895
45239
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
44896
|
-
var SidebarMenu =
|
|
45240
|
+
var SidebarMenu = React114.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx183(
|
|
44897
45241
|
"ul",
|
|
44898
45242
|
{
|
|
44899
45243
|
ref,
|
|
@@ -44903,7 +45247,7 @@ var SidebarMenu = React113.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
44903
45247
|
}
|
|
44904
45248
|
));
|
|
44905
45249
|
SidebarMenu.displayName = "SidebarMenu";
|
|
44906
|
-
var SidebarMenuItem =
|
|
45250
|
+
var SidebarMenuItem = React114.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx183(
|
|
44907
45251
|
"li",
|
|
44908
45252
|
{
|
|
44909
45253
|
ref,
|
|
@@ -44933,7 +45277,7 @@ var sidebarMenuButtonVariants = cva13(
|
|
|
44933
45277
|
}
|
|
44934
45278
|
}
|
|
44935
45279
|
);
|
|
44936
|
-
var SidebarMenuButton =
|
|
45280
|
+
var SidebarMenuButton = React114.forwardRef(
|
|
44937
45281
|
({
|
|
44938
45282
|
asChild = false,
|
|
44939
45283
|
isActive = false,
|
|
@@ -44945,7 +45289,7 @@ var SidebarMenuButton = React113.forwardRef(
|
|
|
44945
45289
|
}, ref) => {
|
|
44946
45290
|
const Comp = asChild ? Slot6 : "button";
|
|
44947
45291
|
const { isMobile, state } = useSidebar();
|
|
44948
|
-
const button = /* @__PURE__ */
|
|
45292
|
+
const button = /* @__PURE__ */ jsx183(
|
|
44949
45293
|
Comp,
|
|
44950
45294
|
{
|
|
44951
45295
|
ref,
|
|
@@ -44964,9 +45308,9 @@ var SidebarMenuButton = React113.forwardRef(
|
|
|
44964
45308
|
children: tooltip
|
|
44965
45309
|
};
|
|
44966
45310
|
}
|
|
44967
|
-
return /* @__PURE__ */
|
|
44968
|
-
/* @__PURE__ */
|
|
44969
|
-
/* @__PURE__ */
|
|
45311
|
+
return /* @__PURE__ */ jsxs137(Tooltip, { children: [
|
|
45312
|
+
/* @__PURE__ */ jsx183(TooltipTrigger, { asChild: true, children: button }),
|
|
45313
|
+
/* @__PURE__ */ jsx183(
|
|
44970
45314
|
TooltipContent,
|
|
44971
45315
|
{
|
|
44972
45316
|
side: "right",
|
|
@@ -44979,9 +45323,9 @@ var SidebarMenuButton = React113.forwardRef(
|
|
|
44979
45323
|
}
|
|
44980
45324
|
);
|
|
44981
45325
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
44982
|
-
var SidebarMenuAction =
|
|
45326
|
+
var SidebarMenuAction = React114.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
44983
45327
|
const Comp = asChild ? Slot6 : "button";
|
|
44984
|
-
return /* @__PURE__ */
|
|
45328
|
+
return /* @__PURE__ */ jsx183(
|
|
44985
45329
|
Comp,
|
|
44986
45330
|
{
|
|
44987
45331
|
ref,
|
|
@@ -45002,7 +45346,7 @@ var SidebarMenuAction = React113.forwardRef(({ className, asChild = false, showO
|
|
|
45002
45346
|
);
|
|
45003
45347
|
});
|
|
45004
45348
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
45005
|
-
var SidebarMenuBadge =
|
|
45349
|
+
var SidebarMenuBadge = React114.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx183(
|
|
45006
45350
|
"div",
|
|
45007
45351
|
{
|
|
45008
45352
|
ref,
|
|
@@ -45020,11 +45364,11 @@ var SidebarMenuBadge = React113.forwardRef(({ className, ...props }, ref) => /*
|
|
|
45020
45364
|
}
|
|
45021
45365
|
));
|
|
45022
45366
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
45023
|
-
var SidebarMenuSkeleton =
|
|
45024
|
-
const width =
|
|
45367
|
+
var SidebarMenuSkeleton = React114.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
45368
|
+
const width = React114.useMemo(() => {
|
|
45025
45369
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
45026
45370
|
}, []);
|
|
45027
|
-
return /* @__PURE__ */
|
|
45371
|
+
return /* @__PURE__ */ jsxs137(
|
|
45028
45372
|
"div",
|
|
45029
45373
|
{
|
|
45030
45374
|
ref,
|
|
@@ -45032,14 +45376,14 @@ var SidebarMenuSkeleton = React113.forwardRef(({ className, showIcon = false, ..
|
|
|
45032
45376
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
45033
45377
|
...props,
|
|
45034
45378
|
children: [
|
|
45035
|
-
showIcon && /* @__PURE__ */
|
|
45379
|
+
showIcon && /* @__PURE__ */ jsx183(
|
|
45036
45380
|
Skeleton,
|
|
45037
45381
|
{
|
|
45038
45382
|
className: "size-4 rounded-md",
|
|
45039
45383
|
"data-sidebar": "menu-skeleton-icon"
|
|
45040
45384
|
}
|
|
45041
45385
|
),
|
|
45042
|
-
/* @__PURE__ */
|
|
45386
|
+
/* @__PURE__ */ jsx183(
|
|
45043
45387
|
Skeleton,
|
|
45044
45388
|
{
|
|
45045
45389
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -45054,7 +45398,7 @@ var SidebarMenuSkeleton = React113.forwardRef(({ className, showIcon = false, ..
|
|
|
45054
45398
|
);
|
|
45055
45399
|
});
|
|
45056
45400
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
45057
|
-
var SidebarMenuSub =
|
|
45401
|
+
var SidebarMenuSub = React114.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx183(
|
|
45058
45402
|
"ul",
|
|
45059
45403
|
{
|
|
45060
45404
|
ref,
|
|
@@ -45068,11 +45412,11 @@ var SidebarMenuSub = React113.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
45068
45412
|
}
|
|
45069
45413
|
));
|
|
45070
45414
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
45071
|
-
var SidebarMenuSubItem =
|
|
45415
|
+
var SidebarMenuSubItem = React114.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx183("li", { ref, ...props }));
|
|
45072
45416
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
45073
|
-
var SidebarMenuSubButton =
|
|
45417
|
+
var SidebarMenuSubButton = React114.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
45074
45418
|
const Comp = asChild ? Slot6 : "a";
|
|
45075
|
-
return /* @__PURE__ */
|
|
45419
|
+
return /* @__PURE__ */ jsx183(
|
|
45076
45420
|
Comp,
|
|
45077
45421
|
{
|
|
45078
45422
|
ref,
|
|
@@ -45096,20 +45440,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
45096
45440
|
// src/components/ui/sonner.tsx
|
|
45097
45441
|
import { useTheme } from "next-themes";
|
|
45098
45442
|
import { Toaster as Sonner } from "sonner";
|
|
45099
|
-
import { jsx as
|
|
45443
|
+
import { jsx as jsx184 } from "react/jsx-runtime";
|
|
45100
45444
|
var Toaster = ({ ...props }) => {
|
|
45101
45445
|
const { theme = "system" } = useTheme();
|
|
45102
|
-
return /* @__PURE__ */
|
|
45446
|
+
return /* @__PURE__ */ jsx184(
|
|
45103
45447
|
Sonner,
|
|
45104
45448
|
{
|
|
45105
45449
|
theme,
|
|
45106
45450
|
className: "toaster group",
|
|
45107
45451
|
icons: {
|
|
45108
|
-
success: /* @__PURE__ */
|
|
45109
|
-
info: /* @__PURE__ */
|
|
45110
|
-
warning: /* @__PURE__ */
|
|
45111
|
-
error: /* @__PURE__ */
|
|
45112
|
-
loading: /* @__PURE__ */
|
|
45452
|
+
success: /* @__PURE__ */ jsx184(CircleCheck, { className: "h-4 w-4" }),
|
|
45453
|
+
info: /* @__PURE__ */ jsx184(Info, { className: "h-4 w-4" }),
|
|
45454
|
+
warning: /* @__PURE__ */ jsx184(TriangleAlert, { className: "h-4 w-4" }),
|
|
45455
|
+
error: /* @__PURE__ */ jsx184(OctagonX, { className: "h-4 w-4" }),
|
|
45456
|
+
loading: /* @__PURE__ */ jsx184(LoaderCircle, { className: "h-4 w-4 animate-spin" })
|
|
45113
45457
|
},
|
|
45114
45458
|
toastOptions: {
|
|
45115
45459
|
classNames: {
|
|
@@ -45125,26 +45469,26 @@ var Toaster = ({ ...props }) => {
|
|
|
45125
45469
|
};
|
|
45126
45470
|
|
|
45127
45471
|
// src/components/ui/toggle-group.tsx
|
|
45128
|
-
import * as
|
|
45472
|
+
import * as React115 from "react";
|
|
45129
45473
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
45130
|
-
import { jsx as
|
|
45131
|
-
var ToggleGroupContext =
|
|
45474
|
+
import { jsx as jsx185 } from "react/jsx-runtime";
|
|
45475
|
+
var ToggleGroupContext = React115.createContext({
|
|
45132
45476
|
size: "default",
|
|
45133
45477
|
variant: "default"
|
|
45134
45478
|
});
|
|
45135
|
-
var ToggleGroup =
|
|
45479
|
+
var ToggleGroup = React115.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx185(
|
|
45136
45480
|
ToggleGroupPrimitive.Root,
|
|
45137
45481
|
{
|
|
45138
45482
|
ref,
|
|
45139
45483
|
className: cn("flex items-center justify-center gap-1", className),
|
|
45140
45484
|
...props,
|
|
45141
|
-
children: /* @__PURE__ */
|
|
45485
|
+
children: /* @__PURE__ */ jsx185(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
45142
45486
|
}
|
|
45143
45487
|
));
|
|
45144
45488
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
45145
|
-
var ToggleGroupItem =
|
|
45146
|
-
const context =
|
|
45147
|
-
return /* @__PURE__ */
|
|
45489
|
+
var ToggleGroupItem = React115.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
45490
|
+
const context = React115.useContext(ToggleGroupContext);
|
|
45491
|
+
return /* @__PURE__ */ jsx185(
|
|
45148
45492
|
ToggleGroupPrimitive.Item,
|
|
45149
45493
|
{
|
|
45150
45494
|
ref,
|
|
@@ -45163,7 +45507,7 @@ var ToggleGroupItem = React114.forwardRef(({ className, children, variant, size,
|
|
|
45163
45507
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
45164
45508
|
|
|
45165
45509
|
// src/render/PXEngineRenderer.tsx
|
|
45166
|
-
import { jsx as
|
|
45510
|
+
import { jsx as jsx186, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
45167
45511
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
45168
45512
|
// Form components - require FormField + FormItem context
|
|
45169
45513
|
"FormLabel",
|
|
@@ -45268,24 +45612,24 @@ var REGISTERED_COMPONENTS = /* @__PURE__ */ new Set([
|
|
|
45268
45612
|
]);
|
|
45269
45613
|
var renderContextDependentError = (componentName, normalizedName, key) => {
|
|
45270
45614
|
const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
|
|
45271
|
-
return /* @__PURE__ */
|
|
45615
|
+
return /* @__PURE__ */ jsxs138(
|
|
45272
45616
|
"div",
|
|
45273
45617
|
{
|
|
45274
45618
|
className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
|
|
45275
45619
|
children: [
|
|
45276
|
-
/* @__PURE__ */
|
|
45277
|
-
/* @__PURE__ */
|
|
45278
|
-
/* @__PURE__ */
|
|
45279
|
-
/* @__PURE__ */
|
|
45620
|
+
/* @__PURE__ */ jsxs138("div", { className: "flex items-start gap-2", children: [
|
|
45621
|
+
/* @__PURE__ */ jsx186("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
|
|
45622
|
+
/* @__PURE__ */ jsxs138("div", { className: "flex-1", children: [
|
|
45623
|
+
/* @__PURE__ */ jsxs138("p", { className: "text-sm font-semibold text-amber-900", children: [
|
|
45280
45624
|
"Invalid Component: ",
|
|
45281
45625
|
componentName
|
|
45282
45626
|
] }),
|
|
45283
|
-
/* @__PURE__ */
|
|
45627
|
+
/* @__PURE__ */ jsx186("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
|
|
45284
45628
|
] })
|
|
45285
45629
|
] }),
|
|
45286
|
-
/* @__PURE__ */
|
|
45287
|
-
/* @__PURE__ */
|
|
45288
|
-
/* @__PURE__ */
|
|
45630
|
+
/* @__PURE__ */ jsxs138("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
|
|
45631
|
+
/* @__PURE__ */ jsx186("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
|
|
45632
|
+
/* @__PURE__ */ jsx186("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
|
|
45289
45633
|
] })
|
|
45290
45634
|
]
|
|
45291
45635
|
},
|
|
@@ -45363,12 +45707,12 @@ var PXEngineRenderer = ({
|
|
|
45363
45707
|
const root = schema.root || schema;
|
|
45364
45708
|
const renderRecursive = (component, index) => {
|
|
45365
45709
|
if (Array.isArray(component)) {
|
|
45366
|
-
return /* @__PURE__ */
|
|
45710
|
+
return /* @__PURE__ */ jsx186(React116.Fragment, { children: component.map((child, idx) => renderRecursive(child, idx)) }, index !== void 0 ? `array-${index}` : "array-root");
|
|
45367
45711
|
}
|
|
45368
45712
|
if (typeof component === "string" || typeof component === "number") {
|
|
45369
45713
|
return component;
|
|
45370
45714
|
}
|
|
45371
|
-
if (
|
|
45715
|
+
if (React116.isValidElement(component)) {
|
|
45372
45716
|
return component;
|
|
45373
45717
|
}
|
|
45374
45718
|
if (!component || typeof component !== "object") return null;
|
|
@@ -45450,7 +45794,7 @@ var PXEngineRenderer = ({
|
|
|
45450
45794
|
const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
|
|
45451
45795
|
const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
|
|
45452
45796
|
if (isAtomWithRenderProp) {
|
|
45453
|
-
return /* @__PURE__ */
|
|
45797
|
+
return /* @__PURE__ */ jsx186(
|
|
45454
45798
|
TargetComponent,
|
|
45455
45799
|
{
|
|
45456
45800
|
...finalProps,
|
|
@@ -45462,7 +45806,7 @@ var PXEngineRenderer = ({
|
|
|
45462
45806
|
uniqueKey
|
|
45463
45807
|
);
|
|
45464
45808
|
} else {
|
|
45465
|
-
return /* @__PURE__ */
|
|
45809
|
+
return /* @__PURE__ */ jsx186(
|
|
45466
45810
|
TargetComponent,
|
|
45467
45811
|
{
|
|
45468
45812
|
...finalProps,
|
|
@@ -45474,7 +45818,7 @@ var PXEngineRenderer = ({
|
|
|
45474
45818
|
);
|
|
45475
45819
|
}
|
|
45476
45820
|
};
|
|
45477
|
-
return /* @__PURE__ */
|
|
45821
|
+
return /* @__PURE__ */ jsx186("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
|
|
45478
45822
|
};
|
|
45479
45823
|
export {
|
|
45480
45824
|
Accordion,
|
|
@@ -45713,6 +46057,7 @@ export {
|
|
|
45713
46057
|
RatingAtom,
|
|
45714
46058
|
RecommendationCard,
|
|
45715
46059
|
ResearchBriefCard,
|
|
46060
|
+
ResearchReportJobCard,
|
|
45716
46061
|
ResizableAtom,
|
|
45717
46062
|
ResizablePanel,
|
|
45718
46063
|
ResizablePanelGroup,
|