pxengine 0.1.47 → 0.1.49
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 +2219 -430
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -8
- package/dist/index.d.ts +73 -8
- package/dist/index.mjs +2332 -546
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +251 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -33310,6 +33310,7 @@ __export(molecules_exports, {
|
|
|
33310
33310
|
CountrySelectEdit: () => CountrySelectEdit,
|
|
33311
33311
|
CreatorActionHeader: () => CreatorActionHeader,
|
|
33312
33312
|
CreatorCompactView: () => CreatorCompactView,
|
|
33313
|
+
CreatorExpandedPanel: () => CreatorExpandedPanel,
|
|
33313
33314
|
CreatorGridCard: () => CreatorGridCard,
|
|
33314
33315
|
CreatorImageList: () => CreatorImageList,
|
|
33315
33316
|
CreatorProfileSummary: () => CreatorProfileSummary,
|
|
@@ -33345,6 +33346,8 @@ __export(molecules_exports, {
|
|
|
33345
33346
|
TopPostsGrid: () => TopPostsGrid,
|
|
33346
33347
|
UIComponentSelector: () => UIComponentSelector,
|
|
33347
33348
|
WorkflowVisualizer: () => WorkflowVisualizer,
|
|
33349
|
+
defaultFetchSelections: () => defaultFetchSelections,
|
|
33350
|
+
defaultPersistSelection: () => defaultPersistSelection,
|
|
33348
33351
|
useCreatorWidgetPolling: () => useCreatorWidgetPolling
|
|
33349
33352
|
});
|
|
33350
33353
|
|
|
@@ -35417,12 +35420,16 @@ var CampaignSeedCard = React90.memo(
|
|
|
35417
35420
|
fields: providedFields,
|
|
35418
35421
|
data,
|
|
35419
35422
|
onAction,
|
|
35423
|
+
sendMessage,
|
|
35420
35424
|
...formCardProps
|
|
35421
35425
|
}) => {
|
|
35422
35426
|
const fields = useMemo5(() => {
|
|
35423
35427
|
return providedFields || buildCampaignSeedFields(data);
|
|
35424
35428
|
}, [providedFields, data]);
|
|
35425
35429
|
const handleProceed = () => {
|
|
35430
|
+
if (sendMessage) {
|
|
35431
|
+
sendMessage("Continue to concepts");
|
|
35432
|
+
}
|
|
35426
35433
|
onAction?.({
|
|
35427
35434
|
type: "brief_confirmation",
|
|
35428
35435
|
value: "Continue to concepts",
|
|
@@ -35579,6 +35586,7 @@ var SearchSpecCard = React91.memo(
|
|
|
35579
35586
|
data,
|
|
35580
35587
|
specData,
|
|
35581
35588
|
onAction,
|
|
35589
|
+
sendMessage,
|
|
35582
35590
|
...formCardProps
|
|
35583
35591
|
}) => {
|
|
35584
35592
|
const resolvedData = data || specData;
|
|
@@ -35586,6 +35594,9 @@ var SearchSpecCard = React91.memo(
|
|
|
35586
35594
|
return providedFields || buildSearchSpecFields(resolvedData ?? {});
|
|
35587
35595
|
}, [providedFields, resolvedData]);
|
|
35588
35596
|
const handleProceed = () => {
|
|
35597
|
+
if (sendMessage) {
|
|
35598
|
+
sendMessage("Continue with search");
|
|
35599
|
+
}
|
|
35589
35600
|
onAction?.({
|
|
35590
35601
|
type: "search_spec_confirmation",
|
|
35591
35602
|
value: "Continue with search",
|
|
@@ -35616,6 +35627,68 @@ SearchSpecCard.displayName = "SearchSpecCard";
|
|
|
35616
35627
|
|
|
35617
35628
|
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
35618
35629
|
import React92 from "react";
|
|
35630
|
+
|
|
35631
|
+
// src/molecules/creator-discovery/MCQCard/defaultFetchers.ts
|
|
35632
|
+
var STORAGE_KEY = (sessionId) => `mcq_selections_${sessionId}`;
|
|
35633
|
+
function getLocalSelections(sessionId) {
|
|
35634
|
+
try {
|
|
35635
|
+
const raw = localStorage.getItem(STORAGE_KEY(sessionId));
|
|
35636
|
+
return raw ? JSON.parse(raw) : {};
|
|
35637
|
+
} catch {
|
|
35638
|
+
return {};
|
|
35639
|
+
}
|
|
35640
|
+
}
|
|
35641
|
+
function setLocalSelection(sessionId, questionKey, value) {
|
|
35642
|
+
try {
|
|
35643
|
+
const existing = getLocalSelections(sessionId);
|
|
35644
|
+
existing[questionKey] = value;
|
|
35645
|
+
localStorage.setItem(STORAGE_KEY(sessionId), JSON.stringify(existing));
|
|
35646
|
+
} catch {
|
|
35647
|
+
}
|
|
35648
|
+
}
|
|
35649
|
+
async function defaultFetchSelections(sessionId) {
|
|
35650
|
+
const local = getLocalSelections(sessionId);
|
|
35651
|
+
if (Object.keys(local).length > 0) return local;
|
|
35652
|
+
try {
|
|
35653
|
+
const res = await fetch(
|
|
35654
|
+
`/api/agents-proxy/custom-agents/sessions/${sessionId}/mcq-selections/get`,
|
|
35655
|
+
{
|
|
35656
|
+
method: "POST",
|
|
35657
|
+
headers: { "Content-Type": "application/json" },
|
|
35658
|
+
body: "{}"
|
|
35659
|
+
}
|
|
35660
|
+
);
|
|
35661
|
+
if (!res.ok) return {};
|
|
35662
|
+
const data = await res.json();
|
|
35663
|
+
const selections = data.selections || {};
|
|
35664
|
+
if (Object.keys(selections).length > 0) {
|
|
35665
|
+
try {
|
|
35666
|
+
localStorage.setItem(STORAGE_KEY(sessionId), JSON.stringify(selections));
|
|
35667
|
+
} catch {
|
|
35668
|
+
}
|
|
35669
|
+
}
|
|
35670
|
+
return selections;
|
|
35671
|
+
} catch {
|
|
35672
|
+
return {};
|
|
35673
|
+
}
|
|
35674
|
+
}
|
|
35675
|
+
async function defaultPersistSelection(sessionId, questionKey, value) {
|
|
35676
|
+
setLocalSelection(sessionId, questionKey, value);
|
|
35677
|
+
try {
|
|
35678
|
+
await fetch(
|
|
35679
|
+
`/api/agents-proxy/custom-agents/sessions/${sessionId}/mcq-selections`,
|
|
35680
|
+
{
|
|
35681
|
+
method: "PATCH",
|
|
35682
|
+
headers: { "Content-Type": "application/json" },
|
|
35683
|
+
body: JSON.stringify({ question_key: questionKey, value })
|
|
35684
|
+
}
|
|
35685
|
+
);
|
|
35686
|
+
} catch (err) {
|
|
35687
|
+
console.warn("[MCQ persist failed]", err);
|
|
35688
|
+
}
|
|
35689
|
+
}
|
|
35690
|
+
|
|
35691
|
+
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
35619
35692
|
import { jsx as jsx109, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
35620
35693
|
var MCQCard = React92.memo(
|
|
35621
35694
|
({
|
|
@@ -35628,22 +35701,37 @@ var MCQCard = React92.memo(
|
|
|
35628
35701
|
isLatestMessage = true,
|
|
35629
35702
|
isLoading = false,
|
|
35630
35703
|
className,
|
|
35631
|
-
// selectionStatus,
|
|
35632
35704
|
onAction,
|
|
35633
35705
|
disabled = false,
|
|
35634
|
-
disableContinueInDiscovery
|
|
35635
|
-
//
|
|
35706
|
+
disableContinueInDiscovery,
|
|
35707
|
+
// Self-contained props
|
|
35708
|
+
sessionId,
|
|
35709
|
+
sendMessage,
|
|
35710
|
+
fetchSelections = defaultFetchSelections,
|
|
35711
|
+
persistSelection = defaultPersistSelection
|
|
35636
35712
|
}) => {
|
|
35637
|
-
const [selectedOption, setSelectedOption] = React92.useState(
|
|
35638
|
-
propsSelectedOption
|
|
35639
|
-
);
|
|
35713
|
+
const [selectedOption, setSelectedOption] = React92.useState(propsSelectedOption);
|
|
35640
35714
|
const [isProceeded, setIsProceeded] = React92.useState(false);
|
|
35715
|
+
const fetchedSessionRef = React92.useRef("");
|
|
35641
35716
|
React92.useEffect(() => {
|
|
35642
35717
|
if (propsSelectedOption) {
|
|
35643
35718
|
setSelectedOption(propsSelectedOption);
|
|
35644
35719
|
setIsProceeded(true);
|
|
35645
35720
|
}
|
|
35646
35721
|
}, [propsSelectedOption]);
|
|
35722
|
+
React92.useEffect(() => {
|
|
35723
|
+
if (!sessionId || fetchedSessionRef.current === sessionId) return;
|
|
35724
|
+
if (propsSelectedOption) return;
|
|
35725
|
+
fetchedSessionRef.current = sessionId;
|
|
35726
|
+
const questionKey = question || "unknown";
|
|
35727
|
+
fetchSelections(sessionId).then((selections) => {
|
|
35728
|
+
const stored = selections[questionKey];
|
|
35729
|
+
if (stored) {
|
|
35730
|
+
setSelectedOption(stored);
|
|
35731
|
+
setIsProceeded(true);
|
|
35732
|
+
}
|
|
35733
|
+
});
|
|
35734
|
+
}, [sessionId, question, propsSelectedOption, fetchSelections]);
|
|
35647
35735
|
const isDiscovery = disableContinueInDiscovery !== void 0 ? disableContinueInDiscovery : typeof window !== "undefined" && window.location.pathname.includes("creator-discovery");
|
|
35648
35736
|
const handleOptionClick = (key, e) => {
|
|
35649
35737
|
e.preventDefault();
|
|
@@ -35653,17 +35741,25 @@ var MCQCard = React92.memo(
|
|
|
35653
35741
|
onSelect?.(key);
|
|
35654
35742
|
}
|
|
35655
35743
|
};
|
|
35656
|
-
const handleProceed = (e) => {
|
|
35744
|
+
const handleProceed = async (e) => {
|
|
35657
35745
|
e.preventDefault();
|
|
35658
35746
|
e.stopPropagation();
|
|
35659
35747
|
if ((selectedOption || recommended) && !disabled && !isProceeded) {
|
|
35660
35748
|
const result = selectedOption || recommended || "";
|
|
35749
|
+
const label = options && options[result] || result;
|
|
35661
35750
|
setIsProceeded(true);
|
|
35751
|
+
if (sessionId) {
|
|
35752
|
+
const questionKey = question || "unknown";
|
|
35753
|
+
await persistSelection(sessionId, questionKey, result);
|
|
35754
|
+
}
|
|
35755
|
+
if (sendMessage) {
|
|
35756
|
+
sendMessage(`Selected: ${label}`);
|
|
35757
|
+
}
|
|
35662
35758
|
onProceed?.(result);
|
|
35663
35759
|
onAction?.({
|
|
35664
35760
|
type: "mcq_selection",
|
|
35665
35761
|
value: result,
|
|
35666
|
-
label
|
|
35762
|
+
label
|
|
35667
35763
|
});
|
|
35668
35764
|
}
|
|
35669
35765
|
};
|
|
@@ -36668,7 +36764,7 @@ var CampaignConceptCard = React94.memo(
|
|
|
36668
36764
|
CampaignConceptCard.displayName = "CampaignConceptCard";
|
|
36669
36765
|
|
|
36670
36766
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
|
|
36671
|
-
import { useCallback as
|
|
36767
|
+
import { useCallback as useCallback7, useState as useState17, memo } from "react";
|
|
36672
36768
|
|
|
36673
36769
|
// src/molecules/creator-discovery/CreatorWidget/CreatorImageList.tsx
|
|
36674
36770
|
import { useEffect as useEffect7, useState as useState10 } from "react";
|
|
@@ -36782,152 +36878,1823 @@ function ProgressBar({ overallPercentage }) {
|
|
|
36782
36878
|
children: /* @__PURE__ */ jsx123(AnimatePresence2, { children: showTooltip && /* @__PURE__ */ jsxs82(
|
|
36783
36879
|
motion2.div,
|
|
36784
36880
|
{
|
|
36785
|
-
initial: { opacity: 0, y: 5 },
|
|
36786
|
-
animate: { opacity: 1, y: 0 },
|
|
36787
|
-
exit: { opacity: 0, y: 5 },
|
|
36788
|
-
className: "absolute -top-10 right-[-25px] bg-gray50 text-gray900 text-lg px-1 rounded-[6px] shadow-lg whitespace-nowrap border-2 border-gray300",
|
|
36789
|
-
children: [
|
|
36790
|
-
overallPercentage ? Math.round(overallPercentage) : 0,
|
|
36791
|
-
"%",
|
|
36792
|
-
/* @__PURE__ */ jsxs82("div", { className: "absolute left-1/2 top-full -translate-x-1/2", children: [
|
|
36793
|
-
/* @__PURE__ */ jsx123("div", { className: "w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-transparent border-t-gray300" }),
|
|
36794
|
-
/* @__PURE__ */ jsx123("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" })
|
|
36795
|
-
] })
|
|
36796
|
-
]
|
|
36881
|
+
initial: { opacity: 0, y: 5 },
|
|
36882
|
+
animate: { opacity: 1, y: 0 },
|
|
36883
|
+
exit: { opacity: 0, y: 5 },
|
|
36884
|
+
className: "absolute -top-10 right-[-25px] bg-gray50 text-gray900 text-lg px-1 rounded-[6px] shadow-lg whitespace-nowrap border-2 border-gray300",
|
|
36885
|
+
children: [
|
|
36886
|
+
overallPercentage ? Math.round(overallPercentage) : 0,
|
|
36887
|
+
"%",
|
|
36888
|
+
/* @__PURE__ */ jsxs82("div", { className: "absolute left-1/2 top-full -translate-x-1/2", children: [
|
|
36889
|
+
/* @__PURE__ */ jsx123("div", { className: "w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-transparent border-t-gray300" }),
|
|
36890
|
+
/* @__PURE__ */ jsx123("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" })
|
|
36891
|
+
] })
|
|
36892
|
+
]
|
|
36893
|
+
}
|
|
36894
|
+
) })
|
|
36895
|
+
}
|
|
36896
|
+
) }) });
|
|
36897
|
+
}
|
|
36898
|
+
function CreatorProgressBar({
|
|
36899
|
+
statusDetails,
|
|
36900
|
+
timeRemaining: _timeRemaining
|
|
36901
|
+
}) {
|
|
36902
|
+
return /* @__PURE__ */ jsxs82("div", { children: [
|
|
36903
|
+
/* @__PURE__ */ jsx123(ProgressBar, { overallPercentage: statusDetails?.overall_percentage }),
|
|
36904
|
+
/* @__PURE__ */ jsx123("div", { className: "dark:text-gray400 text-gray-500 text-xs mt-2", children: (statusDetails?.overall_percentage ?? 0) < 100 && /* @__PURE__ */ jsx123("span", { children: statusDetails?.thinking_message ? truncateName(statusDetails.thinking_message, 200) : "Processing..." }) })
|
|
36905
|
+
] });
|
|
36906
|
+
}
|
|
36907
|
+
|
|
36908
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorWidgetSkeleton.tsx
|
|
36909
|
+
import { jsx as jsx124, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
36910
|
+
function CreatorWidgetSkeleton() {
|
|
36911
|
+
return /* @__PURE__ */ jsx124("div", { className: "bg-background dark:bg-gray50 rounded-[25px] border border-gray300 overflow-hidden shadow-sm w-full relative", children: /* @__PURE__ */ jsxs83("div", { className: "p-4 md:p-6 space-y-4", children: [
|
|
36912
|
+
/* @__PURE__ */ jsx124("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 relative", children: /* @__PURE__ */ jsxs83("div", { className: "flex flex-col gap-2 md:gap-4", children: [
|
|
36913
|
+
/* @__PURE__ */ jsx124("div", { className: "w-40 h-6 bg-purple200 rounded-md animate-pulse" }),
|
|
36914
|
+
/* @__PURE__ */ jsx124("div", { className: "w-64 h-7 bg-gray200 dark:bg-gray300 rounded animate-pulse" })
|
|
36915
|
+
] }) }),
|
|
36916
|
+
/* @__PURE__ */ jsxs83("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: [
|
|
36917
|
+
/* @__PURE__ */ jsxs83("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
|
|
36918
|
+
/* @__PURE__ */ jsx124("div", { className: "flex -space-x-2", children: Array.from({ length: 10 }).map((_, idx) => /* @__PURE__ */ jsx124(
|
|
36919
|
+
"div",
|
|
36920
|
+
{
|
|
36921
|
+
className: "w-8 h-8 md:w-10 md:h-10 rounded-full border-2 border-gray300 bg-gray200 animate-pulse"
|
|
36922
|
+
},
|
|
36923
|
+
idx
|
|
36924
|
+
)) }),
|
|
36925
|
+
/* @__PURE__ */ jsx124("div", { className: "space-y-2", children: /* @__PURE__ */ jsx124("div", { className: "w-full max-w-xs bg-gray200 rounded-full h-2 animate-pulse" }) })
|
|
36926
|
+
] }),
|
|
36927
|
+
/* @__PURE__ */ jsx124("div", { className: "px-6 py-2 bg-gray200 rounded-[30px] animate-pulse h-10 w-48" })
|
|
36928
|
+
] })
|
|
36929
|
+
] }) });
|
|
36930
|
+
}
|
|
36931
|
+
|
|
36932
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorCompactView.tsx
|
|
36933
|
+
import { Fragment as Fragment5, jsx as jsx125, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
36934
|
+
function CreatorCompactView({
|
|
36935
|
+
versions,
|
|
36936
|
+
selectedVersion,
|
|
36937
|
+
creatorImages,
|
|
36938
|
+
creatorLength,
|
|
36939
|
+
isAgentOutput,
|
|
36940
|
+
onVersionSelect,
|
|
36941
|
+
onViewCreators,
|
|
36942
|
+
versionStatus,
|
|
36943
|
+
statusDetails,
|
|
36944
|
+
timeDisplay,
|
|
36945
|
+
isLoading
|
|
36946
|
+
}) {
|
|
36947
|
+
const isComplete = versionStatus === "completed" || versionStatus === "complete";
|
|
36948
|
+
const statusTitle = isComplete ? "Creator Search Complete" : versionStatus === "failed" ? "Creator Search Failed" : "Creator Search Processing";
|
|
36949
|
+
if (isLoading) {
|
|
36950
|
+
return /* @__PURE__ */ jsx125(CreatorWidgetSkeleton, {});
|
|
36951
|
+
}
|
|
36952
|
+
return /* @__PURE__ */ jsx125("div", { className: "bg-background dark:bg-gray100 rounded-[25px] border border-gray300 overflow-hidden shadow-sm w-full relative", children: /* @__PURE__ */ jsxs84("div", { className: "p-4 md:p-6 space-y-4", children: [
|
|
36953
|
+
/* @__PURE__ */ jsxs84("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 relative", children: [
|
|
36954
|
+
/* @__PURE__ */ jsxs84("div", { className: "flex flex-col gap-2 md:gap-4", children: [
|
|
36955
|
+
/* @__PURE__ */ jsx125("h4", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] text-xs font-medium text-purpleText", children: "VERIFIED CREATORS LIST" }),
|
|
36956
|
+
/* @__PURE__ */ jsx125("h3", { className: "text-gray900 md:text-lg font-bold", children: statusTitle })
|
|
36957
|
+
] }),
|
|
36958
|
+
versions.length > 1 && /* @__PURE__ */ jsx125("div", { className: "relative md:self-start", children: /* @__PURE__ */ jsxs84(DropdownMenu, { children: [
|
|
36959
|
+
/* @__PURE__ */ jsxs84(
|
|
36960
|
+
DropdownMenuTrigger,
|
|
36961
|
+
{
|
|
36962
|
+
disabled: !isComplete,
|
|
36963
|
+
className: `flex items-center gap-2 border-2 border-gray400 px-3 md:px-4 py-1 rounded-full text-xs md:text-sm outline-none ${!isComplete ? "bg-gray100 text-gray400 cursor-not-allowed opacity-60" : "text-gray600 hover:bg-purple100/20 cursor-pointer"}`,
|
|
36964
|
+
children: [
|
|
36965
|
+
"Version ",
|
|
36966
|
+
selectedVersion ?? "-",
|
|
36967
|
+
/* @__PURE__ */ jsx125(ChevronDown, { className: "w-3 h-3 md:w-4 md:h-4 transition-transform" })
|
|
36968
|
+
]
|
|
36969
|
+
}
|
|
36970
|
+
),
|
|
36971
|
+
/* @__PURE__ */ jsx125(DropdownMenuContent, { className: "bg-gray25 border-2 border-gray400 min-w-[120px] max-h-[150px] overflow-y-auto", children: versions.map((v) => /* @__PURE__ */ jsxs84(
|
|
36972
|
+
DropdownMenuItem,
|
|
36973
|
+
{
|
|
36974
|
+
onClick: () => onVersionSelect(v),
|
|
36975
|
+
className: "cursor-pointer text-sm",
|
|
36976
|
+
children: [
|
|
36977
|
+
"Version ",
|
|
36978
|
+
v
|
|
36979
|
+
]
|
|
36980
|
+
},
|
|
36981
|
+
v
|
|
36982
|
+
)) })
|
|
36983
|
+
] }) })
|
|
36984
|
+
] }),
|
|
36985
|
+
/* @__PURE__ */ jsx125("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__ */ jsxs84("div", { className: "flex flex-col items-center justify-center w-full py-6 md:py-8 text-center text-red-500", children: [
|
|
36986
|
+
/* @__PURE__ */ jsx125("p", { className: "text-base md:text-lg font-semibold mb-2", children: "Creator Search Failed" }),
|
|
36987
|
+
/* @__PURE__ */ jsx125("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." })
|
|
36988
|
+
] }) : /* @__PURE__ */ jsxs84(Fragment5, { children: [
|
|
36989
|
+
/* @__PURE__ */ jsxs84("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
|
|
36990
|
+
/* @__PURE__ */ jsx125(
|
|
36991
|
+
CreatorImageList,
|
|
36992
|
+
{
|
|
36993
|
+
creatorImages,
|
|
36994
|
+
creatorLength,
|
|
36995
|
+
isAgentOutput,
|
|
36996
|
+
initialCreatorsPercentage: statusDetails?.social_fetch_percentage
|
|
36997
|
+
}
|
|
36998
|
+
),
|
|
36999
|
+
/* @__PURE__ */ jsx125(
|
|
37000
|
+
CreatorProgressBar,
|
|
37001
|
+
{
|
|
37002
|
+
statusDetails,
|
|
37003
|
+
timeRemaining: timeDisplay
|
|
37004
|
+
}
|
|
37005
|
+
)
|
|
37006
|
+
] }),
|
|
37007
|
+
/* @__PURE__ */ jsxs84(
|
|
37008
|
+
"button",
|
|
37009
|
+
{
|
|
37010
|
+
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"}`,
|
|
37011
|
+
onClick: onViewCreators,
|
|
37012
|
+
disabled: !isComplete,
|
|
37013
|
+
children: [
|
|
37014
|
+
"View ",
|
|
37015
|
+
creatorLength,
|
|
37016
|
+
" Verified Creators",
|
|
37017
|
+
/* @__PURE__ */ jsx125(Triangle, { className: "w-3 h-3 md:w-4 md:h-4 rotate-90 font-bold" })
|
|
37018
|
+
]
|
|
37019
|
+
}
|
|
37020
|
+
)
|
|
37021
|
+
] }) })
|
|
37022
|
+
] }) });
|
|
37023
|
+
}
|
|
37024
|
+
|
|
37025
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
|
|
37026
|
+
import { useState as useState15, useEffect as useEffect10, useCallback as useCallback5 } from "react";
|
|
37027
|
+
import ReactDOM2 from "react-dom";
|
|
37028
|
+
import { AnimatePresence as AnimatePresence4, motion as motion5 } from "framer-motion";
|
|
37029
|
+
|
|
37030
|
+
// src/molecules/creator-discovery/CreatorWidget/defaultFetchers.ts
|
|
37031
|
+
async function defaultFetchVersions(params) {
|
|
37032
|
+
const versionParam = params.version ? `&version=${params.version}` : "";
|
|
37033
|
+
const res = await fetch(
|
|
37034
|
+
`/api/get-creator-versions?sessionId=${params.sessionId}${versionParam}&validated=${params.validated}`
|
|
37035
|
+
);
|
|
37036
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
37037
|
+
return res.json();
|
|
37038
|
+
}
|
|
37039
|
+
async function defaultFetchStatus(params) {
|
|
37040
|
+
const res = await fetch(
|
|
37041
|
+
`/api/get-creator-detail-status?session_id=${params.sessionId}&version_no=${params.versionNo}`
|
|
37042
|
+
);
|
|
37043
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
37044
|
+
return res.json();
|
|
37045
|
+
}
|
|
37046
|
+
async function defaultFetchCreatorDetails(params) {
|
|
37047
|
+
const res = await fetch("/api/get-creator-details-by-id", {
|
|
37048
|
+
method: "POST",
|
|
37049
|
+
headers: { "Content-Type": "application/json" },
|
|
37050
|
+
body: JSON.stringify({
|
|
37051
|
+
creator_ids: params.creatorIds,
|
|
37052
|
+
session_id: params.sessionId,
|
|
37053
|
+
version_no: params.versionNo
|
|
37054
|
+
})
|
|
37055
|
+
});
|
|
37056
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
37057
|
+
return res.json();
|
|
37058
|
+
}
|
|
37059
|
+
|
|
37060
|
+
// src/molecules/creator-discovery/CreatorWidget/countries.ts
|
|
37061
|
+
var countries2 = [
|
|
37062
|
+
{ code: "AF", name: "Afghanistan", flag: "\u{1F1E6}\u{1F1EB}" },
|
|
37063
|
+
{ code: "AL", name: "Albania", flag: "\u{1F1E6}\u{1F1F1}" },
|
|
37064
|
+
{ code: "DZ", name: "Algeria", flag: "\u{1F1E9}\u{1F1FF}" },
|
|
37065
|
+
{ code: "AD", name: "Andorra", flag: "\u{1F1E6}\u{1F1E9}" },
|
|
37066
|
+
{ code: "AO", name: "Angola", flag: "\u{1F1E6}\u{1F1F4}" },
|
|
37067
|
+
{ code: "AG", name: "Antigua and Barbuda", flag: "\u{1F1E6}\u{1F1EC}" },
|
|
37068
|
+
{ code: "AR", name: "Argentina", flag: "\u{1F1E6}\u{1F1F7}" },
|
|
37069
|
+
{ code: "AM", name: "Armenia", flag: "\u{1F1E6}\u{1F1F2}" },
|
|
37070
|
+
{ code: "AU", name: "Australia", flag: "\u{1F1E6}\u{1F1FA}" },
|
|
37071
|
+
{ code: "AT", name: "Austria", flag: "\u{1F1E6}\u{1F1F9}" },
|
|
37072
|
+
{ code: "AZ", name: "Azerbaijan", flag: "\u{1F1E6}\u{1F1FF}" },
|
|
37073
|
+
{ code: "BS", name: "Bahamas", flag: "\u{1F1E7}\u{1F1F8}" },
|
|
37074
|
+
{ code: "BH", name: "Bahrain", flag: "\u{1F1E7}\u{1F1ED}" },
|
|
37075
|
+
{ code: "BD", name: "Bangladesh", flag: "\u{1F1E7}\u{1F1E9}" },
|
|
37076
|
+
{ code: "BB", name: "Barbados", flag: "\u{1F1E7}\u{1F1E7}" },
|
|
37077
|
+
{ code: "BY", name: "Belarus", flag: "\u{1F1E7}\u{1F1FE}" },
|
|
37078
|
+
{ code: "BE", name: "Belgium", flag: "\u{1F1E7}\u{1F1EA}" },
|
|
37079
|
+
{ code: "BZ", name: "Belize", flag: "\u{1F1E7}\u{1F1FF}" },
|
|
37080
|
+
{ code: "BJ", name: "Benin", flag: "\u{1F1E7}\u{1F1EF}" },
|
|
37081
|
+
{ code: "BT", name: "Bhutan", flag: "\u{1F1E7}\u{1F1F9}" },
|
|
37082
|
+
{ code: "BO", name: "Bolivia", flag: "\u{1F1E7}\u{1F1F4}" },
|
|
37083
|
+
{ code: "BA", name: "Bosnia and Herzegovina", flag: "\u{1F1E7}\u{1F1E6}" },
|
|
37084
|
+
{ code: "BW", name: "Botswana", flag: "\u{1F1E7}\u{1F1FC}" },
|
|
37085
|
+
{ code: "BR", name: "Brazil", flag: "\u{1F1E7}\u{1F1F7}" },
|
|
37086
|
+
{ code: "BN", name: "Brunei", flag: "\u{1F1E7}\u{1F1F3}" },
|
|
37087
|
+
{ code: "BG", name: "Bulgaria", flag: "\u{1F1E7}\u{1F1EC}" },
|
|
37088
|
+
{ code: "BF", name: "Burkina Faso", flag: "\u{1F1E7}\u{1F1EB}" },
|
|
37089
|
+
{ code: "BI", name: "Burundi", flag: "\u{1F1E7}\u{1F1EE}" },
|
|
37090
|
+
{ code: "CV", name: "Cabo Verde", flag: "\u{1F1E8}\u{1F1FB}" },
|
|
37091
|
+
{ code: "KH", name: "Cambodia", flag: "\u{1F1F0}\u{1F1ED}" },
|
|
37092
|
+
{ code: "CM", name: "Cameroon", flag: "\u{1F1E8}\u{1F1F2}" },
|
|
37093
|
+
{ code: "CA", name: "Canada", flag: "\u{1F1E8}\u{1F1E6}" },
|
|
37094
|
+
{ code: "CF", name: "Central African Republic", flag: "\u{1F1E8}\u{1F1EB}" },
|
|
37095
|
+
{ code: "TD", name: "Chad", flag: "\u{1F1F9}\u{1F1E9}" },
|
|
37096
|
+
{ code: "CL", name: "Chile", flag: "\u{1F1E8}\u{1F1F1}" },
|
|
37097
|
+
{ code: "CN", name: "China", flag: "\u{1F1E8}\u{1F1F3}" },
|
|
37098
|
+
{ code: "CO", name: "Colombia", flag: "\u{1F1E8}\u{1F1F4}" },
|
|
37099
|
+
{ code: "KM", name: "Comoros", flag: "\u{1F1F0}\u{1F1F2}" },
|
|
37100
|
+
{ code: "CG", name: "Congo", flag: "\u{1F1E8}\u{1F1EC}" },
|
|
37101
|
+
{ code: "CD", name: "Democratic Republic of the Congo", flag: "\u{1F1E8}\u{1F1E9}" },
|
|
37102
|
+
{ code: "CR", name: "Costa Rica", flag: "\u{1F1E8}\u{1F1F7}" },
|
|
37103
|
+
{ code: "HR", name: "Croatia", flag: "\u{1F1ED}\u{1F1F7}" },
|
|
37104
|
+
{ code: "CU", name: "Cuba", flag: "\u{1F1E8}\u{1F1FA}" },
|
|
37105
|
+
{ code: "CY", name: "Cyprus", flag: "\u{1F1E8}\u{1F1FE}" },
|
|
37106
|
+
{ code: "CZ", name: "Czech Republic", flag: "\u{1F1E8}\u{1F1FF}" },
|
|
37107
|
+
{ code: "CI", name: "Ivory Coast", flag: "\u{1F1E8}\u{1F1EE}" },
|
|
37108
|
+
{ code: "DK", name: "Denmark", flag: "\u{1F1E9}\u{1F1F0}" },
|
|
37109
|
+
{ code: "DJ", name: "Djibouti", flag: "\u{1F1E9}\u{1F1EF}" },
|
|
37110
|
+
{ code: "DM", name: "Dominica", flag: "\u{1F1E9}\u{1F1F2}" },
|
|
37111
|
+
{ code: "DO", name: "Dominican Republic", flag: "\u{1F1E9}\u{1F1F4}" },
|
|
37112
|
+
{ code: "EC", name: "Ecuador", flag: "\u{1F1EA}\u{1F1E8}" },
|
|
37113
|
+
{ code: "EG", name: "Egypt", flag: "\u{1F1EA}\u{1F1EC}" },
|
|
37114
|
+
{ code: "SV", name: "El Salvador", flag: "\u{1F1F8}\u{1F1FB}" },
|
|
37115
|
+
{ code: "GQ", name: "Equatorial Guinea", flag: "\u{1F1EC}\u{1F1F6}" },
|
|
37116
|
+
{ code: "ER", name: "Eritrea", flag: "\u{1F1EA}\u{1F1F7}" },
|
|
37117
|
+
{ code: "EE", name: "Estonia", flag: "\u{1F1EA}\u{1F1EA}" },
|
|
37118
|
+
{ code: "SZ", name: "Eswatini", flag: "\u{1F1F8}\u{1F1FF}" },
|
|
37119
|
+
{ code: "ET", name: "Ethiopia", flag: "\u{1F1EA}\u{1F1F9}" },
|
|
37120
|
+
{ code: "FJ", name: "Fiji", flag: "\u{1F1EB}\u{1F1EF}" },
|
|
37121
|
+
{ code: "FI", name: "Finland", flag: "\u{1F1EB}\u{1F1EE}" },
|
|
37122
|
+
{ code: "FR", name: "France", flag: "\u{1F1EB}\u{1F1F7}" },
|
|
37123
|
+
{ code: "GA", name: "Gabon", flag: "\u{1F1EC}\u{1F1E6}" },
|
|
37124
|
+
{ code: "GM", name: "Gambia", flag: "\u{1F1EC}\u{1F1F2}" },
|
|
37125
|
+
{ code: "GE", name: "Georgia", flag: "\u{1F1EC}\u{1F1EA}" },
|
|
37126
|
+
{ code: "DE", name: "Germany", flag: "\u{1F1E9}\u{1F1EA}" },
|
|
37127
|
+
{ code: "GH", name: "Ghana", flag: "\u{1F1EC}\u{1F1ED}" },
|
|
37128
|
+
{ code: "GR", name: "Greece", flag: "\u{1F1EC}\u{1F1F7}" },
|
|
37129
|
+
{ code: "GD", name: "Grenada", flag: "\u{1F1EC}\u{1F1E9}" },
|
|
37130
|
+
{ code: "GT", name: "Guatemala", flag: "\u{1F1EC}\u{1F1F9}" },
|
|
37131
|
+
{ code: "GN", name: "Guinea", flag: "\u{1F1EC}\u{1F1F3}" },
|
|
37132
|
+
{ code: "GW", name: "Guinea-Bissau", flag: "\u{1F1EC}\u{1F1FC}" },
|
|
37133
|
+
{ code: "GY", name: "Guyana", flag: "\u{1F1EC}\u{1F1FE}" },
|
|
37134
|
+
{ code: "HT", name: "Haiti", flag: "\u{1F1ED}\u{1F1F9}" },
|
|
37135
|
+
{ code: "HN", name: "Honduras", flag: "\u{1F1ED}\u{1F1F3}" },
|
|
37136
|
+
{ code: "HU", name: "Hungary", flag: "\u{1F1ED}\u{1F1FA}" },
|
|
37137
|
+
{ code: "HK", name: "Hong Kong", flag: "\u{1F1ED}\u{1F1F0}" },
|
|
37138
|
+
{ code: "IS", name: "Iceland", flag: "\u{1F1EE}\u{1F1F8}" },
|
|
37139
|
+
{ code: "IN", name: "India", flag: "\u{1F1EE}\u{1F1F3}" },
|
|
37140
|
+
{ code: "ID", name: "Indonesia", flag: "\u{1F1EE}\u{1F1E9}" },
|
|
37141
|
+
{ code: "IR", name: "Iran", flag: "\u{1F1EE}\u{1F1F7}" },
|
|
37142
|
+
{ code: "IQ", name: "Iraq", flag: "\u{1F1EE}\u{1F1F6}" },
|
|
37143
|
+
{ code: "IE", name: "Ireland", flag: "\u{1F1EE}\u{1F1EA}" },
|
|
37144
|
+
{ code: "IL", name: "Israel", flag: "\u{1F1EE}\u{1F1F1}" },
|
|
37145
|
+
{ code: "IT", name: "Italy", flag: "\u{1F1EE}\u{1F1F9}" },
|
|
37146
|
+
{ code: "JM", name: "Jamaica", flag: "\u{1F1EF}\u{1F1F2}" },
|
|
37147
|
+
{ code: "JP", name: "Japan", flag: "\u{1F1EF}\u{1F1F5}" },
|
|
37148
|
+
{ code: "JO", name: "Jordan", flag: "\u{1F1EF}\u{1F1F4}" },
|
|
37149
|
+
{ code: "KZ", name: "Kazakhstan", flag: "\u{1F1F0}\u{1F1FF}" },
|
|
37150
|
+
{ code: "KE", name: "Kenya", flag: "\u{1F1F0}\u{1F1EA}" },
|
|
37151
|
+
{ code: "KI", name: "Kiribati", flag: "\u{1F1F0}\u{1F1EE}" },
|
|
37152
|
+
{ code: "KP", name: "North Korea", flag: "\u{1F1F0}\u{1F1F5}" },
|
|
37153
|
+
{ code: "KR", name: "South Korea", flag: "\u{1F1F0}\u{1F1F7}" },
|
|
37154
|
+
{ code: "KW", name: "Kuwait", flag: "\u{1F1F0}\u{1F1FC}" },
|
|
37155
|
+
{ code: "KG", name: "Kyrgyzstan", flag: "\u{1F1F0}\u{1F1EC}" },
|
|
37156
|
+
{ code: "LA", name: "Laos", flag: "\u{1F1F1}\u{1F1E6}" },
|
|
37157
|
+
{ code: "LV", name: "Latvia", flag: "\u{1F1F1}\u{1F1FB}" },
|
|
37158
|
+
{ code: "LB", name: "Lebanon", flag: "\u{1F1F1}\u{1F1E7}" },
|
|
37159
|
+
{ code: "LS", name: "Lesotho", flag: "\u{1F1F1}\u{1F1F8}" },
|
|
37160
|
+
{ code: "LR", name: "Liberia", flag: "\u{1F1F1}\u{1F1F7}" },
|
|
37161
|
+
{ code: "LY", name: "Libya", flag: "\u{1F1F1}\u{1F1FE}" },
|
|
37162
|
+
{ code: "LI", name: "Liechtenstein", flag: "\u{1F1F1}\u{1F1EE}" },
|
|
37163
|
+
{ code: "LT", name: "Lithuania", flag: "\u{1F1F1}\u{1F1F9}" },
|
|
37164
|
+
{ code: "LU", name: "Luxembourg", flag: "\u{1F1F1}\u{1F1FA}" },
|
|
37165
|
+
{ code: "MG", name: "Madagascar", flag: "\u{1F1F2}\u{1F1EC}" },
|
|
37166
|
+
{ code: "MW", name: "Malawi", flag: "\u{1F1F2}\u{1F1FC}" },
|
|
37167
|
+
{ code: "MY", name: "Malaysia", flag: "\u{1F1F2}\u{1F1FE}" },
|
|
37168
|
+
{ code: "MV", name: "Maldives", flag: "\u{1F1F2}\u{1F1FB}" },
|
|
37169
|
+
{ code: "ML", name: "Mali", flag: "\u{1F1F2}\u{1F1F1}" },
|
|
37170
|
+
{ code: "MT", name: "Malta", flag: "\u{1F1F2}\u{1F1F9}" },
|
|
37171
|
+
{ code: "MH", name: "Marshall Islands", flag: "\u{1F1F2}\u{1F1ED}" },
|
|
37172
|
+
{ code: "MR", name: "Mauritania", flag: "\u{1F1F2}\u{1F1F7}" },
|
|
37173
|
+
{ code: "MU", name: "Mauritius", flag: "\u{1F1F2}\u{1F1FA}" },
|
|
37174
|
+
{ code: "MX", name: "Mexico", flag: "\u{1F1F2}\u{1F1FD}" },
|
|
37175
|
+
{ code: "FM", name: "Micronesia", flag: "\u{1F1EB}\u{1F1F2}" },
|
|
37176
|
+
{ code: "MD", name: "Moldova", flag: "\u{1F1F2}\u{1F1E9}" },
|
|
37177
|
+
{ code: "MC", name: "Monaco", flag: "\u{1F1F2}\u{1F1E8}" },
|
|
37178
|
+
{ code: "MN", name: "Mongolia", flag: "\u{1F1F2}\u{1F1F3}" },
|
|
37179
|
+
{ code: "ME", name: "Montenegro", flag: "\u{1F1F2}\u{1F1EA}" },
|
|
37180
|
+
{ code: "MA", name: "Morocco", flag: "\u{1F1F2}\u{1F1E6}" },
|
|
37181
|
+
{ code: "MZ", name: "Mozambique", flag: "\u{1F1F2}\u{1F1FF}" },
|
|
37182
|
+
{ code: "MM", name: "Myanmar", flag: "\u{1F1F2}\u{1F1F2}" },
|
|
37183
|
+
{ code: "NA", name: "Namibia", flag: "\u{1F1F3}\u{1F1E6}" },
|
|
37184
|
+
{ code: "NR", name: "Nauru", flag: "\u{1F1F3}\u{1F1F7}" },
|
|
37185
|
+
{ code: "NP", name: "Nepal", flag: "\u{1F1F3}\u{1F1F5}" },
|
|
37186
|
+
{ code: "NL", name: "Netherlands", flag: "\u{1F1F3}\u{1F1F1}" },
|
|
37187
|
+
{ code: "NZ", name: "New Zealand", flag: "\u{1F1F3}\u{1F1FF}" },
|
|
37188
|
+
{ code: "NI", name: "Nicaragua", flag: "\u{1F1F3}\u{1F1EE}" },
|
|
37189
|
+
{ code: "NE", name: "Niger", flag: "\u{1F1F3}\u{1F1EA}" },
|
|
37190
|
+
{ code: "NG", name: "Nigeria", flag: "\u{1F1F3}\u{1F1EC}" },
|
|
37191
|
+
{ code: "MK", name: "North Macedonia", flag: "\u{1F1F2}\u{1F1F0}" },
|
|
37192
|
+
{ code: "NO", name: "Norway", flag: "\u{1F1F3}\u{1F1F4}" },
|
|
37193
|
+
{ code: "OM", name: "Oman", flag: "\u{1F1F4}\u{1F1F2}" },
|
|
37194
|
+
{ code: "PK", name: "Pakistan", flag: "\u{1F1F5}\u{1F1F0}" },
|
|
37195
|
+
{ code: "PW", name: "Palau", flag: "\u{1F1F5}\u{1F1FC}" },
|
|
37196
|
+
{ code: "PS", name: "Palestine", flag: "\u{1F1F5}\u{1F1F8}" },
|
|
37197
|
+
{ code: "PA", name: "Panama", flag: "\u{1F1F5}\u{1F1E6}" },
|
|
37198
|
+
{ code: "PG", name: "Papua New Guinea", flag: "\u{1F1F5}\u{1F1EC}" },
|
|
37199
|
+
{ code: "PY", name: "Paraguay", flag: "\u{1F1F5}\u{1F1FE}" },
|
|
37200
|
+
{ code: "PE", name: "Peru", flag: "\u{1F1F5}\u{1F1EA}" },
|
|
37201
|
+
{ code: "PH", name: "Philippines", flag: "\u{1F1F5}\u{1F1ED}" },
|
|
37202
|
+
{ code: "PL", name: "Poland", flag: "\u{1F1F5}\u{1F1F1}" },
|
|
37203
|
+
{ code: "PT", name: "Portugal", flag: "\u{1F1F5}\u{1F1F9}" },
|
|
37204
|
+
{ code: "QA", name: "Qatar", flag: "\u{1F1F6}\u{1F1E6}" },
|
|
37205
|
+
{ code: "RO", name: "Romania", flag: "\u{1F1F7}\u{1F1F4}" },
|
|
37206
|
+
{ code: "RU", name: "Russia", flag: "\u{1F1F7}\u{1F1FA}" },
|
|
37207
|
+
{ code: "RW", name: "Rwanda", flag: "\u{1F1F7}\u{1F1FC}" },
|
|
37208
|
+
{ code: "KN", name: "Saint Kitts and Nevis", flag: "\u{1F1F0}\u{1F1F3}" },
|
|
37209
|
+
{ code: "LC", name: "Saint Lucia", flag: "\u{1F1F1}\u{1F1E8}" },
|
|
37210
|
+
{ code: "VC", name: "Saint Vincent and the Grenadines", flag: "\u{1F1FB}\u{1F1E8}" },
|
|
37211
|
+
{ code: "WS", name: "Samoa", flag: "\u{1F1FC}\u{1F1F8}" },
|
|
37212
|
+
{ code: "SM", name: "San Marino", flag: "\u{1F1F8}\u{1F1F2}" },
|
|
37213
|
+
{ code: "ST", name: "Sao Tome and Principe", flag: "\u{1F1F8}\u{1F1F9}" },
|
|
37214
|
+
{ code: "SA", name: "Saudi Arabia", flag: "\u{1F1F8}\u{1F1E6}" },
|
|
37215
|
+
{ code: "SN", name: "Senegal", flag: "\u{1F1F8}\u{1F1F3}" },
|
|
37216
|
+
{ code: "RS", name: "Serbia", flag: "\u{1F1F7}\u{1F1F8}" },
|
|
37217
|
+
{ code: "SC", name: "Seychelles", flag: "\u{1F1F8}\u{1F1E8}" },
|
|
37218
|
+
{ code: "SL", name: "Sierra Leone", flag: "\u{1F1F8}\u{1F1F1}" },
|
|
37219
|
+
{ code: "SG", name: "Singapore", flag: "\u{1F1F8}\u{1F1EC}" },
|
|
37220
|
+
{ code: "SK", name: "Slovakia", flag: "\u{1F1F8}\u{1F1F0}" },
|
|
37221
|
+
{ code: "SI", name: "Slovenia", flag: "\u{1F1F8}\u{1F1EE}" },
|
|
37222
|
+
{ code: "SB", name: "Solomon Islands", flag: "\u{1F1F8}\u{1F1E7}" },
|
|
37223
|
+
{ code: "SO", name: "Somalia", flag: "\u{1F1F8}\u{1F1F4}" },
|
|
37224
|
+
{ code: "ZA", name: "South Africa", flag: "\u{1F1FF}\u{1F1E6}" },
|
|
37225
|
+
{ code: "SS", name: "South Sudan", flag: "\u{1F1F8}\u{1F1F8}" },
|
|
37226
|
+
{ code: "ES", name: "Spain", flag: "\u{1F1EA}\u{1F1F8}" },
|
|
37227
|
+
{ code: "LK", name: "Sri Lanka", flag: "\u{1F1F1}\u{1F1F0}" },
|
|
37228
|
+
{ code: "SD", name: "Sudan", flag: "\u{1F1F8}\u{1F1E9}" },
|
|
37229
|
+
{ code: "SR", name: "Suriname", flag: "\u{1F1F8}\u{1F1F7}" },
|
|
37230
|
+
{ code: "SE", name: "Sweden", flag: "\u{1F1F8}\u{1F1EA}" },
|
|
37231
|
+
{ code: "CH", name: "Switzerland", flag: "\u{1F1E8}\u{1F1ED}" },
|
|
37232
|
+
{ code: "SY", name: "Syria", flag: "\u{1F1F8}\u{1F1FE}" },
|
|
37233
|
+
{ code: "TW", name: "Taiwan", flag: "\u{1F1F9}\u{1F1FC}" },
|
|
37234
|
+
{ code: "TJ", name: "Tajikistan", flag: "\u{1F1F9}\u{1F1EF}" },
|
|
37235
|
+
{ code: "TZ", name: "Tanzania", flag: "\u{1F1F9}\u{1F1FF}" },
|
|
37236
|
+
{ code: "TH", name: "Thailand", flag: "\u{1F1F9}\u{1F1ED}" },
|
|
37237
|
+
{ code: "TL", name: "Timor-Leste", flag: "\u{1F1F9}\u{1F1F1}" },
|
|
37238
|
+
{ code: "TG", name: "Togo", flag: "\u{1F1F9}\u{1F1EC}" },
|
|
37239
|
+
{ code: "TO", name: "Tonga", flag: "\u{1F1F9}\u{1F1F4}" },
|
|
37240
|
+
{ code: "TT", name: "Trinidad and Tobago", flag: "\u{1F1F9}\u{1F1F9}" },
|
|
37241
|
+
{ code: "TN", name: "Tunisia", flag: "\u{1F1F9}\u{1F1F3}" },
|
|
37242
|
+
{ code: "TR", name: "Turkey", flag: "\u{1F1F9}\u{1F1F7}" },
|
|
37243
|
+
{ code: "TM", name: "Turkmenistan", flag: "\u{1F1F9}\u{1F1F2}" },
|
|
37244
|
+
{ code: "TV", name: "Tuvalu", flag: "\u{1F1F9}\u{1F1FB}" },
|
|
37245
|
+
{ code: "UG", name: "Uganda", flag: "\u{1F1FA}\u{1F1EC}" },
|
|
37246
|
+
{ code: "UA", name: "Ukraine", flag: "\u{1F1FA}\u{1F1E6}" },
|
|
37247
|
+
{ code: "AE", name: "United Arab Emirates", flag: "\u{1F1E6}\u{1F1EA}" },
|
|
37248
|
+
{ code: "GB", name: "United Kingdom", flag: "\u{1F1EC}\u{1F1E7}" },
|
|
37249
|
+
{ code: "US", name: "United States", flag: "\u{1F1FA}\u{1F1F8}" },
|
|
37250
|
+
{ code: "UY", name: "Uruguay", flag: "\u{1F1FA}\u{1F1FE}" },
|
|
37251
|
+
{ code: "UZ", name: "Uzbekistan", flag: "\u{1F1FA}\u{1F1FF}" },
|
|
37252
|
+
{ code: "VU", name: "Vanuatu", flag: "\u{1F1FB}\u{1F1FA}" },
|
|
37253
|
+
{ code: "VA", name: "Vatican City", flag: "\u{1F1FB}\u{1F1E6}" },
|
|
37254
|
+
{ code: "VE", name: "Venezuela", flag: "\u{1F1FB}\u{1F1EA}" },
|
|
37255
|
+
{ code: "VN", name: "Vietnam", flag: "\u{1F1FB}\u{1F1F3}" },
|
|
37256
|
+
{ code: "YE", name: "Yemen", flag: "\u{1F1FE}\u{1F1EA}" },
|
|
37257
|
+
{ code: "ZM", name: "Zambia", flag: "\u{1F1FF}\u{1F1F2}" },
|
|
37258
|
+
{ code: "ZW", name: "Zimbabwe", flag: "\u{1F1FF}\u{1F1FC}" }
|
|
37259
|
+
];
|
|
37260
|
+
var codeToMeta = Object.fromEntries(countries2.map((c) => [c.code, { name: c.name, flag: c.flag }]));
|
|
37261
|
+
var nameToCode = Object.fromEntries(countries2.map((c) => [c.name, c.code]));
|
|
37262
|
+
var normalizeToIso2 = (input) => {
|
|
37263
|
+
if (!input) return "US";
|
|
37264
|
+
const trimmed = String(input).trim();
|
|
37265
|
+
const upper = trimmed.toUpperCase();
|
|
37266
|
+
if (upper.length === 2 && codeToMeta[upper]) return upper;
|
|
37267
|
+
const fromName = nameToCode[trimmed];
|
|
37268
|
+
if (fromName) return fromName;
|
|
37269
|
+
return "US";
|
|
37270
|
+
};
|
|
37271
|
+
|
|
37272
|
+
// src/molecules/creator-discovery/CreatorWidget/EngagedAudienceDemographics.tsx
|
|
37273
|
+
import { jsx as jsx126, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
37274
|
+
function EngagedAudienceDemographics({
|
|
37275
|
+
audienceDemographics
|
|
37276
|
+
}) {
|
|
37277
|
+
if (!audienceDemographics) return null;
|
|
37278
|
+
const hasCities = audienceDemographics?.cities && Object.keys(audienceDemographics.cities).length > 0;
|
|
37279
|
+
const hasCountries = audienceDemographics?.countries && Object.keys(audienceDemographics.countries).length > 0;
|
|
37280
|
+
const hasAges = audienceDemographics?.ages && Object.keys(audienceDemographics.ages).length > 0;
|
|
37281
|
+
const hasGenders = audienceDemographics?.genders && Object.keys(audienceDemographics.genders).length > 0;
|
|
37282
|
+
if (!hasCities && !hasCountries && !hasAges && !hasGenders) {
|
|
37283
|
+
return null;
|
|
37284
|
+
}
|
|
37285
|
+
const columns = [];
|
|
37286
|
+
if (hasCities) columns.push("1fr");
|
|
37287
|
+
if (hasCountries) columns.push("1fr");
|
|
37288
|
+
if (hasAges) columns.push("1fr");
|
|
37289
|
+
if (hasGenders) columns.push("0.4fr");
|
|
37290
|
+
const gridTemplate = columns.join(" ");
|
|
37291
|
+
return /* @__PURE__ */ jsxs85("div", { className: "flex flex-col gap-4", children: [
|
|
37292
|
+
/* @__PURE__ */ jsx126("div", { className: "text-purpleText text-xs", children: /* @__PURE__ */ jsx126("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "ENGAGED AUDIENCE" }) }),
|
|
37293
|
+
/* @__PURE__ */ jsxs85(
|
|
37294
|
+
"div",
|
|
37295
|
+
{
|
|
37296
|
+
className: "flex flex-col sm:col-span-3 sm:grid gap-6",
|
|
37297
|
+
style: { gridTemplateColumns: gridTemplate },
|
|
37298
|
+
children: [
|
|
37299
|
+
hasCities && /* @__PURE__ */ jsxs85("div", { children: [
|
|
37300
|
+
/* @__PURE__ */ jsx126("h4", { className: "text-xs text-gray700 mb-3", children: "Cities" }),
|
|
37301
|
+
/* @__PURE__ */ jsx126("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.cities || {}).map(
|
|
37302
|
+
([code, value]) => /* @__PURE__ */ jsxs85(
|
|
37303
|
+
"div",
|
|
37304
|
+
{
|
|
37305
|
+
className: "flex items-center gap-3 text-sm text-gray700",
|
|
37306
|
+
children: [
|
|
37307
|
+
/* @__PURE__ */ jsx126("span", { className: "w-[90px]", children: /* @__PURE__ */ jsx126("div", { className: "flex gap-1 items-center", children: /* @__PURE__ */ jsx126("span", { children: code.split(",")[0] }) }) }),
|
|
37308
|
+
/* @__PURE__ */ jsx126("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx126(
|
|
37309
|
+
"div",
|
|
37310
|
+
{
|
|
37311
|
+
className: "h-[6px] bg-purple100 rounded-full",
|
|
37312
|
+
style: { width: `${value}%` }
|
|
37313
|
+
}
|
|
37314
|
+
) }),
|
|
37315
|
+
/* @__PURE__ */ jsxs85("span", { className: "w-10 text-right font-medium", children: [
|
|
37316
|
+
value,
|
|
37317
|
+
"%"
|
|
37318
|
+
] })
|
|
37319
|
+
]
|
|
37320
|
+
},
|
|
37321
|
+
code
|
|
37322
|
+
)
|
|
37323
|
+
) })
|
|
37324
|
+
] }),
|
|
37325
|
+
hasCountries && /* @__PURE__ */ jsxs85("div", { children: [
|
|
37326
|
+
/* @__PURE__ */ jsx126("h4", { className: "text-xs text-gray700 mb-3", children: "Countries" }),
|
|
37327
|
+
/* @__PURE__ */ jsx126("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.countries || {}).map(
|
|
37328
|
+
([code, value]) => {
|
|
37329
|
+
const iso2 = normalizeToIso2(code);
|
|
37330
|
+
const meta = codeToMeta[iso2];
|
|
37331
|
+
return /* @__PURE__ */ jsxs85(
|
|
37332
|
+
"div",
|
|
37333
|
+
{
|
|
37334
|
+
className: "flex items-center gap-3 text-sm text-gray700",
|
|
37335
|
+
children: [
|
|
37336
|
+
/* @__PURE__ */ jsx126("span", { className: "w-10", children: /* @__PURE__ */ jsxs85("div", { className: "flex gap-1 items-center", children: [
|
|
37337
|
+
/* @__PURE__ */ jsx126("span", { className: "text-base", children: meta?.flag }),
|
|
37338
|
+
/* @__PURE__ */ jsx126("span", { children: code })
|
|
37339
|
+
] }) }),
|
|
37340
|
+
/* @__PURE__ */ jsx126("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx126(
|
|
37341
|
+
"div",
|
|
37342
|
+
{
|
|
37343
|
+
className: "h-[6px] bg-purple100 rounded-full",
|
|
37344
|
+
style: { width: `${value}%` }
|
|
37345
|
+
}
|
|
37346
|
+
) }),
|
|
37347
|
+
/* @__PURE__ */ jsxs85("span", { className: "w-10 text-right font-medium", children: [
|
|
37348
|
+
value,
|
|
37349
|
+
"%"
|
|
37350
|
+
] })
|
|
37351
|
+
]
|
|
37352
|
+
},
|
|
37353
|
+
code
|
|
37354
|
+
);
|
|
37355
|
+
}
|
|
37356
|
+
) })
|
|
37357
|
+
] }),
|
|
37358
|
+
hasAges && /* @__PURE__ */ jsxs85("div", { children: [
|
|
37359
|
+
/* @__PURE__ */ jsx126("h4", { className: "text-xs text-gray700 mb-3", children: "Ages" }),
|
|
37360
|
+
/* @__PURE__ */ jsx126("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.ages || {}).map(
|
|
37361
|
+
([ageRange, value]) => /* @__PURE__ */ jsxs85(
|
|
37362
|
+
"div",
|
|
37363
|
+
{
|
|
37364
|
+
className: "flex items-center gap-3 text-sm text-gray700",
|
|
37365
|
+
children: [
|
|
37366
|
+
/* @__PURE__ */ jsx126("span", { className: "w-12", children: ageRange }),
|
|
37367
|
+
/* @__PURE__ */ jsx126("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx126(
|
|
37368
|
+
"div",
|
|
37369
|
+
{
|
|
37370
|
+
className: "h-[6px] bg-purple100 rounded-full",
|
|
37371
|
+
style: { width: `${value}%` }
|
|
37372
|
+
}
|
|
37373
|
+
) }),
|
|
37374
|
+
/* @__PURE__ */ jsxs85("span", { className: "w-10 text-right font-medium", children: [
|
|
37375
|
+
value,
|
|
37376
|
+
"%"
|
|
37377
|
+
] })
|
|
37378
|
+
]
|
|
37379
|
+
},
|
|
37380
|
+
ageRange
|
|
37381
|
+
)
|
|
37382
|
+
) })
|
|
37383
|
+
] }),
|
|
37384
|
+
hasGenders && /* @__PURE__ */ jsx126("div", { className: "flex flex-col justify-center", children: /* @__PURE__ */ jsx126("div", { className: "flex sm:flex-col gap-3", children: Object.entries(audienceDemographics?.genders || {}).map(
|
|
37385
|
+
([gender, value]) => /* @__PURE__ */ jsxs85(
|
|
37386
|
+
"div",
|
|
37387
|
+
{
|
|
37388
|
+
className: "flex flex-col justify-center text-sm",
|
|
37389
|
+
children: [
|
|
37390
|
+
/* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
37391
|
+
gender === "female" ? /* @__PURE__ */ jsx126(Venus, { className: "text-red-500", strokeWidth: 3 }) : /* @__PURE__ */ jsx126(Mars, { className: "text-blue-500", strokeWidth: 3 }),
|
|
37392
|
+
/* @__PURE__ */ jsxs85("span", { className: "capitalize text-gray800 text-xl", children: [
|
|
37393
|
+
value,
|
|
37394
|
+
"%"
|
|
37395
|
+
] })
|
|
37396
|
+
] }),
|
|
37397
|
+
/* @__PURE__ */ jsx126("span", { className: "text-lg text-gray700", children: gender.charAt(0).toUpperCase() + gender.slice(1) })
|
|
37398
|
+
]
|
|
37399
|
+
},
|
|
37400
|
+
gender
|
|
37401
|
+
)
|
|
37402
|
+
) }) })
|
|
37403
|
+
]
|
|
37404
|
+
}
|
|
37405
|
+
)
|
|
37406
|
+
] });
|
|
37407
|
+
}
|
|
37408
|
+
|
|
37409
|
+
// src/molecules/creator-discovery/CreatorWidget/PlatformIcons.tsx
|
|
37410
|
+
import { jsx as jsx127 } from "react/jsx-runtime";
|
|
37411
|
+
function InstagramIcon({ className }) {
|
|
37412
|
+
return /* @__PURE__ */ jsx127(
|
|
37413
|
+
"svg",
|
|
37414
|
+
{
|
|
37415
|
+
className,
|
|
37416
|
+
viewBox: "0 0 24 24",
|
|
37417
|
+
fill: "currentColor",
|
|
37418
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37419
|
+
children: /* @__PURE__ */ jsx127("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" })
|
|
37420
|
+
}
|
|
37421
|
+
);
|
|
37422
|
+
}
|
|
37423
|
+
function YouTubeIcon({ className }) {
|
|
37424
|
+
return /* @__PURE__ */ jsx127(
|
|
37425
|
+
"svg",
|
|
37426
|
+
{
|
|
37427
|
+
className,
|
|
37428
|
+
viewBox: "0 0 24 24",
|
|
37429
|
+
fill: "currentColor",
|
|
37430
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37431
|
+
children: /* @__PURE__ */ jsx127("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" })
|
|
37432
|
+
}
|
|
37433
|
+
);
|
|
37434
|
+
}
|
|
37435
|
+
function TikTokIcon3({ className }) {
|
|
37436
|
+
return /* @__PURE__ */ jsx127(
|
|
37437
|
+
"svg",
|
|
37438
|
+
{
|
|
37439
|
+
className,
|
|
37440
|
+
viewBox: "0 0 24 24",
|
|
37441
|
+
fill: "currentColor",
|
|
37442
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37443
|
+
children: /* @__PURE__ */ jsx127("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" })
|
|
37444
|
+
}
|
|
37445
|
+
);
|
|
37446
|
+
}
|
|
37447
|
+
function getPlatformIcon(platform) {
|
|
37448
|
+
const key = platform.toLowerCase().replace(/metrics$/i, "");
|
|
37449
|
+
if (key === "instagram") return InstagramIcon;
|
|
37450
|
+
if (key === "tiktok") return TikTokIcon3;
|
|
37451
|
+
if (key === "youtube") return YouTubeIcon;
|
|
37452
|
+
return InstagramIcon;
|
|
37453
|
+
}
|
|
37454
|
+
function getPlatformName(platform) {
|
|
37455
|
+
const key = platform.toLowerCase().replace(/metrics$/i, "");
|
|
37456
|
+
if (key === "instagram") return "Instagram";
|
|
37457
|
+
if (key === "tiktok") return "TikTok";
|
|
37458
|
+
if (key === "youtube") return "YouTube";
|
|
37459
|
+
return platform;
|
|
37460
|
+
}
|
|
37461
|
+
function getPlatformBgColor(platform) {
|
|
37462
|
+
const key = platform.toLowerCase().replace(/metrics$/i, "");
|
|
37463
|
+
if (key === "instagram") return "#C4338680";
|
|
37464
|
+
if (key === "tiktok") return "#EBEBEB40";
|
|
37465
|
+
if (key === "youtube") return "#ff000080";
|
|
37466
|
+
return "#ccc";
|
|
37467
|
+
}
|
|
37468
|
+
function getPlatformIconColor(platform) {
|
|
37469
|
+
const key = platform.toLowerCase().replace(/metrics$/i, "");
|
|
37470
|
+
if (key === "instagram") return "text-[#7b1551]";
|
|
37471
|
+
if (key === "tiktok") return "text-pink-500";
|
|
37472
|
+
if (key === "youtube") return "text-red-600";
|
|
37473
|
+
return "text-primary";
|
|
37474
|
+
}
|
|
37475
|
+
|
|
37476
|
+
// src/molecules/creator-discovery/CreatorWidget/PostCard.tsx
|
|
37477
|
+
import { useState as useState12 } from "react";
|
|
37478
|
+
import { Fragment as Fragment6, jsx as jsx128, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
37479
|
+
var formatFollowerCount = (count) => {
|
|
37480
|
+
if (count >= 1e6) {
|
|
37481
|
+
const millions = count / 1e6;
|
|
37482
|
+
return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
|
|
37483
|
+
} else if (count >= 1e4) {
|
|
37484
|
+
return `${Math.floor(count / 1e3)}k`;
|
|
37485
|
+
} else if (count >= 1e3) {
|
|
37486
|
+
return `${(count / 1e3).toFixed(1)}k`;
|
|
37487
|
+
}
|
|
37488
|
+
return Math.floor(count).toString();
|
|
37489
|
+
};
|
|
37490
|
+
function PostCard({ post, platformUsername }) {
|
|
37491
|
+
const [expanded, setExpanded] = useState12(false);
|
|
37492
|
+
const [errored, setErrored] = useState12(false);
|
|
37493
|
+
const thumbnail = post.thumbnail_url || post.thumbnail || post.image || "";
|
|
37494
|
+
const likes = post.engagement?.likes ?? post.likes ?? null;
|
|
37495
|
+
const comments = post.engagement?.comments ?? post.comments ?? null;
|
|
37496
|
+
const views = post.engagement?.views ?? post.engagement?.plays ?? post.views ?? post.plays ?? null;
|
|
37497
|
+
const impressions = post.impressions ?? null;
|
|
37498
|
+
const reach = post.reach ?? null;
|
|
37499
|
+
return /* @__PURE__ */ jsxs86(
|
|
37500
|
+
"div",
|
|
37501
|
+
{
|
|
37502
|
+
className: "rounded-xl overflow-hidden border border-gray500 bg-transparent shadow-sm cursor-pointer",
|
|
37503
|
+
onClick: (e) => {
|
|
37504
|
+
e.stopPropagation();
|
|
37505
|
+
window.open(post.url, "_blank", "noopener,noreferrer");
|
|
37506
|
+
},
|
|
37507
|
+
children: [
|
|
37508
|
+
/* @__PURE__ */ jsx128("div", { className: "w-full aspect-square relative bg-gray25", children: thumbnail && !errored ? /* @__PURE__ */ jsx128(
|
|
37509
|
+
"img",
|
|
37510
|
+
{
|
|
37511
|
+
src: thumbnail,
|
|
37512
|
+
alt: post.title || "post",
|
|
37513
|
+
className: "w-full h-full object-cover",
|
|
37514
|
+
onError: () => setErrored(true)
|
|
37515
|
+
}
|
|
37516
|
+
) : /* @__PURE__ */ jsx128("div", { className: "w-full h-full flex items-center justify-center text-gray500 text-sm", children: "No preview" }) }),
|
|
37517
|
+
/* @__PURE__ */ jsxs86("div", { className: "p-3", children: [
|
|
37518
|
+
/* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-4 text-sm text-gray600 mb-2", children: [
|
|
37519
|
+
likes !== null && /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-1", children: [
|
|
37520
|
+
/* @__PURE__ */ jsx128("span", { children: formatFollowerCount(likes) }),
|
|
37521
|
+
" ",
|
|
37522
|
+
/* @__PURE__ */ jsx128(Heart, { size: 14 })
|
|
37523
|
+
] }),
|
|
37524
|
+
comments !== null && /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-1", children: [
|
|
37525
|
+
/* @__PURE__ */ jsx128("span", { children: formatFollowerCount(comments) }),
|
|
37526
|
+
" ",
|
|
37527
|
+
/* @__PURE__ */ jsx128(MessageCircle, { size: 14 })
|
|
37528
|
+
] }),
|
|
37529
|
+
views !== null && /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-1", children: [
|
|
37530
|
+
/* @__PURE__ */ jsx128("span", { children: formatFollowerCount(views) }),
|
|
37531
|
+
" ",
|
|
37532
|
+
/* @__PURE__ */ jsx128(Eye, { size: 14 })
|
|
37533
|
+
] })
|
|
37534
|
+
] }),
|
|
37535
|
+
/* @__PURE__ */ jsxs86("div", { className: "flex gap-4 text-sm text-gray800 mb-2", children: [
|
|
37536
|
+
impressions !== null && /* @__PURE__ */ jsxs86("div", { children: [
|
|
37537
|
+
/* @__PURE__ */ jsx128("span", { className: "text-gray500 font-bold", children: formatFollowerCount(impressions) }),
|
|
37538
|
+
" ",
|
|
37539
|
+
"est.Impressions"
|
|
37540
|
+
] }),
|
|
37541
|
+
reach !== null && /* @__PURE__ */ jsxs86("div", { children: [
|
|
37542
|
+
/* @__PURE__ */ jsx128("span", { className: "text-gray500 font-bold", children: formatFollowerCount(reach) }),
|
|
37543
|
+
" ",
|
|
37544
|
+
"est.Reach"
|
|
37545
|
+
] })
|
|
37546
|
+
] }),
|
|
37547
|
+
/* @__PURE__ */ jsxs86("div", { className: "text-sm mb-1", children: [
|
|
37548
|
+
platformUsername && /* @__PURE__ */ jsxs86("div", { className: "text-md font-semibold text-gray500", children: [
|
|
37549
|
+
"@",
|
|
37550
|
+
platformUsername
|
|
37551
|
+
] }),
|
|
37552
|
+
["instagram", "tiktok"].includes(
|
|
37553
|
+
post.platform?.toLowerCase() || ""
|
|
37554
|
+
) ? /* @__PURE__ */ jsx128(Fragment6, { children: (() => {
|
|
37555
|
+
const text = post.title || post.description || "";
|
|
37556
|
+
return /* @__PURE__ */ jsxs86(Fragment6, { children: [
|
|
37557
|
+
/* @__PURE__ */ jsx128(
|
|
37558
|
+
"div",
|
|
37559
|
+
{
|
|
37560
|
+
className: `text-gray900 font-light mt-2 text-sm ${!expanded ? "line-clamp-3" : ""}`,
|
|
37561
|
+
children: text
|
|
37562
|
+
}
|
|
37563
|
+
),
|
|
37564
|
+
text.length > 100 && /* @__PURE__ */ jsx128(
|
|
37565
|
+
"button",
|
|
37566
|
+
{
|
|
37567
|
+
onClick: (e) => {
|
|
37568
|
+
e.stopPropagation();
|
|
37569
|
+
setExpanded((s) => !s);
|
|
37570
|
+
},
|
|
37571
|
+
className: "text-xs text-purpleText mt-2",
|
|
37572
|
+
children: expanded ? "Show less" : "Show more"
|
|
37573
|
+
}
|
|
37574
|
+
)
|
|
37575
|
+
] });
|
|
37576
|
+
})() }) : /* @__PURE__ */ jsxs86(Fragment6, { children: [
|
|
37577
|
+
post.title && /* @__PURE__ */ jsx128("div", { className: "text-gray900 font-light", children: post.title }),
|
|
37578
|
+
post.description && /* @__PURE__ */ jsx128(
|
|
37579
|
+
"div",
|
|
37580
|
+
{
|
|
37581
|
+
className: "mt-2 text-sm text-gray900 overflow-hidden font-light",
|
|
37582
|
+
style: { maxHeight: expanded ? void 0 : 200 },
|
|
37583
|
+
children: post.description
|
|
37584
|
+
}
|
|
37585
|
+
),
|
|
37586
|
+
post.description && post.description.length > 200 && /* @__PURE__ */ jsx128(
|
|
37587
|
+
"button",
|
|
37588
|
+
{
|
|
37589
|
+
onClick: (e) => {
|
|
37590
|
+
e.stopPropagation();
|
|
37591
|
+
setExpanded((s) => !s);
|
|
37592
|
+
},
|
|
37593
|
+
className: "text-xs text-purpleText mt-2",
|
|
37594
|
+
children: expanded ? "Show less" : "Show more"
|
|
37595
|
+
}
|
|
37596
|
+
)
|
|
37597
|
+
] })
|
|
37598
|
+
] })
|
|
37599
|
+
] })
|
|
37600
|
+
]
|
|
37601
|
+
}
|
|
37602
|
+
);
|
|
37603
|
+
}
|
|
37604
|
+
|
|
37605
|
+
// src/molecules/creator-discovery/CreatorWidget/PlatformPostsSection.tsx
|
|
37606
|
+
import { jsx as jsx129, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
37607
|
+
var formatFollowerCount2 = (count) => {
|
|
37608
|
+
if (count >= 1e6) {
|
|
37609
|
+
const millions = count / 1e6;
|
|
37610
|
+
return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
|
|
37611
|
+
} else if (count >= 1e4) {
|
|
37612
|
+
return `${Math.floor(count / 1e3)}k`;
|
|
37613
|
+
} else if (count >= 1e3) {
|
|
37614
|
+
return `${(count / 1e3).toFixed(1)}k`;
|
|
37615
|
+
}
|
|
37616
|
+
return Math.floor(count).toString();
|
|
37617
|
+
};
|
|
37618
|
+
function filterPostsByPlatform(posts, platform) {
|
|
37619
|
+
const postsArr = (posts ?? []).slice();
|
|
37620
|
+
const shortKey = platform.replace(/Metrics$/i, "").toLowerCase();
|
|
37621
|
+
return postsArr.filter((p) => (p.platform || "").toLowerCase() === shortKey).slice(0, 3);
|
|
37622
|
+
}
|
|
37623
|
+
function PlatformMetricsBanner({
|
|
37624
|
+
platform,
|
|
37625
|
+
metrics
|
|
37626
|
+
}) {
|
|
37627
|
+
const platformName = getPlatformName(platform);
|
|
37628
|
+
const bgColor = getPlatformBgColor(platform);
|
|
37629
|
+
const IconComponent = getPlatformIcon(platform);
|
|
37630
|
+
return /* @__PURE__ */ jsxs87(
|
|
37631
|
+
"div",
|
|
37632
|
+
{
|
|
37633
|
+
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 ",
|
|
37634
|
+
style: { backgroundColor: bgColor },
|
|
37635
|
+
children: [
|
|
37636
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-center min-w-[90px] md:min-w-0", children: [
|
|
37637
|
+
/* @__PURE__ */ jsx129(IconComponent, { className: "w-5 h-5 md:w-6 md:h-6 text-gray900" }),
|
|
37638
|
+
/* @__PURE__ */ jsx129("span", { className: "text-lg md:text-xl font-bold text-gray900", children: platform === "youtubeMetrics" ? formatFollowerCount2(metrics.subscribers || 0) : formatFollowerCount2(metrics.followers || 0) })
|
|
37639
|
+
] }),
|
|
37640
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-start min-w-[130px] md:min-w-0", children: [
|
|
37641
|
+
/* @__PURE__ */ jsxs87(
|
|
37642
|
+
"span",
|
|
37643
|
+
{
|
|
37644
|
+
className: "text-base md:text-lg dark:text-white max-w-[90%] truncate cursor-default",
|
|
37645
|
+
title: `@${platform === "youtubeMetrics" ? metrics.channelName : metrics.username}`,
|
|
37646
|
+
children: [
|
|
37647
|
+
"@",
|
|
37648
|
+
platform === "youtubeMetrics" ? metrics.channelName : metrics.username
|
|
37649
|
+
]
|
|
37650
|
+
}
|
|
37651
|
+
),
|
|
37652
|
+
/* @__PURE__ */ jsx129("span", { className: "text-xs md:text-sm text-gray900 opacity-90", children: platformName })
|
|
37653
|
+
] }),
|
|
37654
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
|
|
37655
|
+
/* @__PURE__ */ jsxs87("span", { className: "text-sm md:text-md font-semibold text-gray900", children: [
|
|
37656
|
+
(metrics.engagementRate * 100).toFixed(2),
|
|
37657
|
+
"%"
|
|
37658
|
+
] }),
|
|
37659
|
+
/* @__PURE__ */ jsx129("span", { className: "text-xs text-gray900 opacity-80", children: "Engagement Rate" })
|
|
37660
|
+
] }),
|
|
37661
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
|
|
37662
|
+
/* @__PURE__ */ jsx129("span", { className: "text-sm md:text-md font-semibold text-gray900", children: Math.round(metrics.avgLikes)?.toLocaleString() }),
|
|
37663
|
+
/* @__PURE__ */ jsx129("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Likes" })
|
|
37664
|
+
] }),
|
|
37665
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
|
|
37666
|
+
/* @__PURE__ */ jsx129("span", { className: "text-sm md:text-md font-semibold text-gray900", children: Math.round(metrics.avgComments)?.toLocaleString() }),
|
|
37667
|
+
/* @__PURE__ */ jsx129("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Comments" })
|
|
37668
|
+
] })
|
|
37669
|
+
]
|
|
37670
|
+
}
|
|
37671
|
+
);
|
|
37672
|
+
}
|
|
37673
|
+
function PlatformPostsSection({
|
|
37674
|
+
platformMetrics,
|
|
37675
|
+
posts = []
|
|
37676
|
+
}) {
|
|
37677
|
+
if (!platformMetrics) return null;
|
|
37678
|
+
return /* @__PURE__ */ jsx129("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsx129("div", { className: "flex flex-col gap-8", children: Object.entries(platformMetrics || {}).map(
|
|
37679
|
+
([platform, metrics]) => {
|
|
37680
|
+
if (!metrics) return null;
|
|
37681
|
+
if (metrics.followers === 0 && metrics.subscribers === 0)
|
|
37682
|
+
return null;
|
|
37683
|
+
const platformPosts = filterPostsByPlatform(posts, platform);
|
|
37684
|
+
const platformUsername = metrics.username ?? metrics.channelName ?? "";
|
|
37685
|
+
return /* @__PURE__ */ jsxs87("div", { className: "w-full flex flex-col gap-8", children: [
|
|
37686
|
+
/* @__PURE__ */ jsx129(PlatformMetricsBanner, { platform, metrics }),
|
|
37687
|
+
platformPosts.length > 0 && /* @__PURE__ */ jsx129("div", { className: "pr-6 sm:ml-8 sm:pr-7", children: /* @__PURE__ */ jsx129("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: platformPosts.map((post, idx) => /* @__PURE__ */ jsx129(
|
|
37688
|
+
PostCard,
|
|
37689
|
+
{
|
|
37690
|
+
post,
|
|
37691
|
+
platformUsername
|
|
37692
|
+
},
|
|
37693
|
+
post.post_id ?? post.url ?? idx
|
|
37694
|
+
)) }) })
|
|
37695
|
+
] }, platform);
|
|
37696
|
+
}
|
|
37697
|
+
) }) });
|
|
37698
|
+
}
|
|
37699
|
+
|
|
37700
|
+
// src/molecules/creator-discovery/CreatorWidget/BrandCollaborationsList.tsx
|
|
37701
|
+
import { useState as useState13 } from "react";
|
|
37702
|
+
import ReactDOM from "react-dom";
|
|
37703
|
+
import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
|
|
37704
|
+
import { Fragment as Fragment7, jsx as jsx130, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
37705
|
+
var getSentimentRank = (score) => {
|
|
37706
|
+
if (score >= 80) {
|
|
37707
|
+
return {
|
|
37708
|
+
rank: "STRONG FIT",
|
|
37709
|
+
bgColor: "bg-greenBackground",
|
|
37710
|
+
textColor: "text-greenText",
|
|
37711
|
+
scoreColor: "text-[#499C54]"
|
|
37712
|
+
};
|
|
37713
|
+
} else if (score >= 50) {
|
|
37714
|
+
return {
|
|
37715
|
+
rank: "MODERATE FIT",
|
|
37716
|
+
bgColor: "bg-orangeBackground",
|
|
37717
|
+
textColor: "text-orangeText",
|
|
37718
|
+
scoreColor: "text-[#B3512F]"
|
|
37719
|
+
};
|
|
37720
|
+
} else if (score >= 0) {
|
|
37721
|
+
return {
|
|
37722
|
+
rank: "POOR FIT",
|
|
37723
|
+
bgColor: "bg-redBackground",
|
|
37724
|
+
textColor: "text-redText",
|
|
37725
|
+
scoreColor: "text-[#BE2C35]"
|
|
37726
|
+
};
|
|
37727
|
+
}
|
|
37728
|
+
return {
|
|
37729
|
+
rank: "Unranked",
|
|
37730
|
+
bgColor: "bg-gray500",
|
|
37731
|
+
textColor: "text-gray200",
|
|
37732
|
+
scoreColor: "text-gray500"
|
|
37733
|
+
};
|
|
37734
|
+
};
|
|
37735
|
+
function BrandMentionDetails({
|
|
37736
|
+
open,
|
|
37737
|
+
onClose,
|
|
37738
|
+
brandBreakdown,
|
|
37739
|
+
selectedBrand
|
|
37740
|
+
}) {
|
|
37741
|
+
const brandStats = brandBreakdown?.insights?.brandBreakdown?.find(
|
|
37742
|
+
(b) => b.brand.toLowerCase() === selectedBrand?.toLowerCase()
|
|
37743
|
+
);
|
|
37744
|
+
const brandMentions = brandBreakdown?.mentions?.filter(
|
|
37745
|
+
(m) => m.normalizedBrand?.toLowerCase() === selectedBrand?.toLowerCase() || m.brand?.toLowerCase() === selectedBrand?.toLowerCase()
|
|
37746
|
+
) || [];
|
|
37747
|
+
if (typeof window === "undefined") return null;
|
|
37748
|
+
return ReactDOM.createPortal(
|
|
37749
|
+
/* @__PURE__ */ jsx130(AnimatePresence3, { mode: "sync", children: open && /* @__PURE__ */ jsxs88(Fragment7, { children: [
|
|
37750
|
+
/* @__PURE__ */ jsx130(
|
|
37751
|
+
motion3.div,
|
|
37752
|
+
{
|
|
37753
|
+
initial: { opacity: 0 },
|
|
37754
|
+
animate: { opacity: 1 },
|
|
37755
|
+
exit: { opacity: 0 },
|
|
37756
|
+
transition: { duration: 0.2 },
|
|
37757
|
+
className: "fixed inset-0 bg-black bg-opacity-50 z-[80]",
|
|
37758
|
+
onClick: (e) => {
|
|
37759
|
+
e.stopPropagation();
|
|
37760
|
+
onClose();
|
|
37761
|
+
}
|
|
37762
|
+
},
|
|
37763
|
+
"brand-overlay"
|
|
37764
|
+
),
|
|
37765
|
+
/* @__PURE__ */ jsxs88(
|
|
37766
|
+
motion3.div,
|
|
37767
|
+
{
|
|
37768
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
37769
|
+
animate: { opacity: 1, scale: 1 },
|
|
37770
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
37771
|
+
transition: { duration: 0.2 },
|
|
37772
|
+
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",
|
|
37773
|
+
onClick: (e) => e.stopPropagation(),
|
|
37774
|
+
children: [
|
|
37775
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex justify-between items-center p-4 border-b border-gray300", children: [
|
|
37776
|
+
/* @__PURE__ */ jsxs88("h3", { className: "text-lg font-bold text-gray900", children: [
|
|
37777
|
+
"Brand Mention Details: ",
|
|
37778
|
+
selectedBrand
|
|
37779
|
+
] }),
|
|
37780
|
+
/* @__PURE__ */ jsx130(
|
|
37781
|
+
"button",
|
|
37782
|
+
{
|
|
37783
|
+
onClick: onClose,
|
|
37784
|
+
className: "p-1 rounded-full hover:bg-gray200 transition-colors",
|
|
37785
|
+
children: /* @__PURE__ */ jsx130(X, { className: "w-4 h-4" })
|
|
37786
|
+
}
|
|
37787
|
+
)
|
|
37788
|
+
] }),
|
|
37789
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex flex-col gap-6 max-h-[70vh] overflow-y-auto p-4", children: [
|
|
37790
|
+
brandStats && /* @__PURE__ */ jsxs88("div", { className: "bg-gray25 border-2 border-gray200 rounded-xl p-4", children: [
|
|
37791
|
+
/* @__PURE__ */ jsx130("h3", { className: "text-lg font-bold text-gray900 mb-4", children: "Overview" }),
|
|
37792
|
+
/* @__PURE__ */ jsxs88("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
37793
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3", children: [
|
|
37794
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600", children: "Total Mentions" }),
|
|
37795
|
+
/* @__PURE__ */ jsx130("div", { className: "text-2xl font-bold text-gray900", children: brandStats.mentions })
|
|
37796
|
+
] }),
|
|
37797
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3", children: [
|
|
37798
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600", children: "Posts Count" }),
|
|
37799
|
+
/* @__PURE__ */ jsx130("div", { className: "text-2xl font-bold text-gray900", children: brandStats.postCount })
|
|
37800
|
+
] }),
|
|
37801
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3", children: [
|
|
37802
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600", children: "Avg Engagement" }),
|
|
37803
|
+
/* @__PURE__ */ jsxs88("div", { className: "text-2xl font-bold text-gray900", children: [
|
|
37804
|
+
brandStats.averageEngagementRate?.toFixed(2),
|
|
37805
|
+
"%"
|
|
37806
|
+
] })
|
|
37807
|
+
] }),
|
|
37808
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3", children: [
|
|
37809
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600", children: "Effectiveness" }),
|
|
37810
|
+
/* @__PURE__ */ jsxs88(
|
|
37811
|
+
"div",
|
|
37812
|
+
{
|
|
37813
|
+
className: `text-2xl font-bold ${getSentimentRank(brandStats.effectivenessPercent).scoreColor}`,
|
|
37814
|
+
children: [
|
|
37815
|
+
brandStats.effectivenessPercent,
|
|
37816
|
+
"%"
|
|
37817
|
+
]
|
|
37818
|
+
}
|
|
37819
|
+
)
|
|
37820
|
+
] })
|
|
37821
|
+
] }),
|
|
37822
|
+
/* @__PURE__ */ jsx130("div", { className: "mt-3 flex gap-2 flex-wrap", children: brandStats.collaborationTypes?.map(
|
|
37823
|
+
(type, idx) => /* @__PURE__ */ jsx130(
|
|
37824
|
+
"span",
|
|
37825
|
+
{
|
|
37826
|
+
className: "px-3 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]",
|
|
37827
|
+
children: type
|
|
37828
|
+
},
|
|
37829
|
+
idx
|
|
37830
|
+
)
|
|
37831
|
+
) })
|
|
37832
|
+
] }),
|
|
37833
|
+
/* @__PURE__ */ jsxs88("div", { children: [
|
|
37834
|
+
/* @__PURE__ */ jsxs88("h3", { className: "text-lg font-bold text-gray900 mb-3", children: [
|
|
37835
|
+
"Individual Mentions (",
|
|
37836
|
+
brandMentions.length,
|
|
37837
|
+
")"
|
|
37838
|
+
] }),
|
|
37839
|
+
/* @__PURE__ */ jsx130("div", { className: "flex flex-col gap-3", children: brandMentions.map((mention, index) => {
|
|
37840
|
+
const IconComponent = getPlatformIcon(mention?.platform);
|
|
37841
|
+
return /* @__PURE__ */ jsxs88(
|
|
37842
|
+
"div",
|
|
37843
|
+
{
|
|
37844
|
+
className: "bg-gray50 border-2 border-gray200 rounded-xl p-4 hover:border-purple100 transition-colors",
|
|
37845
|
+
children: [
|
|
37846
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex items-center justify-between mb-3", children: [
|
|
37847
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex items-center gap-2", children: [
|
|
37848
|
+
/* @__PURE__ */ jsx130(IconComponent, { className: "w-5 h-5 text-gray900" }),
|
|
37849
|
+
/* @__PURE__ */ jsx130("span", { className: "text-sm font-medium text-gray700 capitalize", children: mention.platform })
|
|
37850
|
+
] }),
|
|
37851
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex items-center gap-2", children: [
|
|
37852
|
+
/* @__PURE__ */ jsx130("span", { className: "px-2 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]", children: mention.collaborationType }),
|
|
37853
|
+
/* @__PURE__ */ jsxs88("span", { className: "text-xs text-gray600", children: [
|
|
37854
|
+
Math.round(mention.confidence * 100),
|
|
37855
|
+
"% confidence"
|
|
37856
|
+
] })
|
|
37857
|
+
] })
|
|
37858
|
+
] }),
|
|
37859
|
+
/* @__PURE__ */ jsxs88("div", { className: "mb-2", children: [
|
|
37860
|
+
/* @__PURE__ */ jsxs88("span", { className: "text-xs text-gray500", children: [
|
|
37861
|
+
"Post ID:",
|
|
37862
|
+
" "
|
|
37863
|
+
] }),
|
|
37864
|
+
/* @__PURE__ */ jsx130("span", { className: "text-xs font-mono text-gray700", children: mention.post_id })
|
|
37865
|
+
] }),
|
|
37866
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3 border border-gray300", children: [
|
|
37867
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600 mb-1", children: "Evidence:" }),
|
|
37868
|
+
/* @__PURE__ */ jsxs88("p", { className: "text-sm text-gray800 italic", children: [
|
|
37869
|
+
"\u201C",
|
|
37870
|
+
mention.evidence,
|
|
37871
|
+
"\u201D"
|
|
37872
|
+
] })
|
|
37873
|
+
] }),
|
|
37874
|
+
/* @__PURE__ */ jsxs88("div", { className: "mt-2 text-xs text-gray500", children: [
|
|
37875
|
+
"Source:",
|
|
37876
|
+
" ",
|
|
37877
|
+
/* @__PURE__ */ jsx130("span", { className: "font-medium", children: mention.source }),
|
|
37878
|
+
mention.handle && /* @__PURE__ */ jsxs88("span", { className: "ml-2", children: [
|
|
37879
|
+
"Handle:",
|
|
37880
|
+
" ",
|
|
37881
|
+
/* @__PURE__ */ jsx130("span", { className: "font-medium", children: mention.handle })
|
|
37882
|
+
] })
|
|
37883
|
+
] })
|
|
37884
|
+
]
|
|
37885
|
+
},
|
|
37886
|
+
index
|
|
37887
|
+
);
|
|
37888
|
+
}) })
|
|
37889
|
+
] }),
|
|
37890
|
+
brandMentions.length === 0 && /* @__PURE__ */ jsx130("div", { className: "text-center py-8 text-gray500", children: "No mentions found for this brand" })
|
|
37891
|
+
] })
|
|
37892
|
+
]
|
|
37893
|
+
},
|
|
37894
|
+
"brand-modal"
|
|
37895
|
+
)
|
|
37896
|
+
] }) }),
|
|
37897
|
+
document.body
|
|
37898
|
+
);
|
|
37899
|
+
}
|
|
37900
|
+
function BrandCollaborationsList({
|
|
37901
|
+
brandBreakdown
|
|
37902
|
+
}) {
|
|
37903
|
+
const [openDetails, setOpenDetails] = useState13(false);
|
|
37904
|
+
const [selectedBrand, setSelectedBrand] = useState13("");
|
|
37905
|
+
if (!brandBreakdown?.insights?.brandBreakdown || brandBreakdown.insights.brandBreakdown.length === 0) {
|
|
37906
|
+
return null;
|
|
37907
|
+
}
|
|
37908
|
+
return /* @__PURE__ */ jsxs88(Fragment7, { children: [
|
|
37909
|
+
/* @__PURE__ */ jsxs88("div", { children: [
|
|
37910
|
+
/* @__PURE__ */ jsx130("div", { className: "text-purpleText text-xs mb-2", children: /* @__PURE__ */ jsx130("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "BRAND MENTIONS" }) }),
|
|
37911
|
+
/* @__PURE__ */ jsx130("div", { className: "flex flex-col gap-2 max-h-[220px] overflow-y-auto", children: brandBreakdown.insights.brandBreakdown.map(
|
|
37912
|
+
(item, index) => /* @__PURE__ */ jsxs88(
|
|
37913
|
+
"div",
|
|
37914
|
+
{
|
|
37915
|
+
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",
|
|
37916
|
+
onClick: (e) => {
|
|
37917
|
+
e.stopPropagation();
|
|
37918
|
+
setSelectedBrand(item?.brand);
|
|
37919
|
+
setOpenDetails(true);
|
|
37920
|
+
},
|
|
37921
|
+
children: [
|
|
37922
|
+
/* @__PURE__ */ jsx130("div", { className: "w-10 h-10 rounded-full bg-gray200 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx130("span", { className: "text-sm font-bold text-gray700", children: item.brand?.charAt(0)?.toUpperCase() || "?" }) }),
|
|
37923
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex flex-col gap-1", children: [
|
|
37924
|
+
/* @__PURE__ */ jsx130("div", { className: "text-gray900 text-sm", children: item.brand }),
|
|
37925
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex gap-2 text-xs text-gray600", children: [
|
|
37926
|
+
/* @__PURE__ */ jsxs88("div", { children: [
|
|
37927
|
+
/* @__PURE__ */ jsx130("span", { className: "text-gray900", children: item?.mentions }),
|
|
37928
|
+
" ",
|
|
37929
|
+
"Mention"
|
|
37930
|
+
] }),
|
|
37931
|
+
/* @__PURE__ */ jsxs88("div", { children: [
|
|
37932
|
+
/* @__PURE__ */ jsx130(
|
|
37933
|
+
"span",
|
|
37934
|
+
{
|
|
37935
|
+
className: `${getSentimentRank(item.effectivenessPercent).scoreColor} font-bold`,
|
|
37936
|
+
children: item.effectivenessPercent ? `${item.effectivenessPercent}%` : "N/A"
|
|
37937
|
+
}
|
|
37938
|
+
),
|
|
37939
|
+
" ",
|
|
37940
|
+
"Effectiveness"
|
|
37941
|
+
] })
|
|
37942
|
+
] })
|
|
37943
|
+
] })
|
|
37944
|
+
]
|
|
37945
|
+
},
|
|
37946
|
+
index
|
|
37947
|
+
)
|
|
37948
|
+
) })
|
|
37949
|
+
] }),
|
|
37950
|
+
/* @__PURE__ */ jsx130(
|
|
37951
|
+
BrandMentionDetails,
|
|
37952
|
+
{
|
|
37953
|
+
open: openDetails,
|
|
37954
|
+
onClose: () => setOpenDetails(false),
|
|
37955
|
+
brandBreakdown,
|
|
37956
|
+
selectedBrand
|
|
37957
|
+
}
|
|
37958
|
+
)
|
|
37959
|
+
] });
|
|
37960
|
+
}
|
|
37961
|
+
|
|
37962
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorGridView.tsx
|
|
37963
|
+
import { useState as useState14, useMemo as useMemo9, useRef as useRef6, useCallback as useCallback4, useEffect as useEffect9 } from "react";
|
|
37964
|
+
import { motion as motion4 } from "framer-motion";
|
|
37965
|
+
import { jsx as jsx131, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
37966
|
+
var formatFollowerCount3 = (count) => {
|
|
37967
|
+
if (count >= 1e6) {
|
|
37968
|
+
const millions = count / 1e6;
|
|
37969
|
+
return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
|
|
37970
|
+
} else if (count >= 1e4) {
|
|
37971
|
+
return `${Math.floor(count / 1e3)}k`;
|
|
37972
|
+
} else if (count >= 1e3) {
|
|
37973
|
+
return `${(count / 1e3).toFixed(1)}k`;
|
|
37974
|
+
}
|
|
37975
|
+
return Math.floor(count).toString();
|
|
37976
|
+
};
|
|
37977
|
+
var getSentimentRank2 = (score) => {
|
|
37978
|
+
if (score >= 80) {
|
|
37979
|
+
return {
|
|
37980
|
+
bgColor: "bg-greenBackground",
|
|
37981
|
+
textColor: "text-greenText",
|
|
37982
|
+
scoreColor: "text-[#499C54]"
|
|
37983
|
+
};
|
|
37984
|
+
} else if (score >= 50) {
|
|
37985
|
+
return {
|
|
37986
|
+
bgColor: "bg-orangeBackground",
|
|
37987
|
+
textColor: "text-orangeText",
|
|
37988
|
+
scoreColor: "text-[#B3512F]"
|
|
37989
|
+
};
|
|
37990
|
+
} else if (score >= 0) {
|
|
37991
|
+
return {
|
|
37992
|
+
bgColor: "bg-redBackground",
|
|
37993
|
+
textColor: "text-redText",
|
|
37994
|
+
scoreColor: "text-[#BE2C35]"
|
|
37995
|
+
};
|
|
37996
|
+
}
|
|
37997
|
+
return {
|
|
37998
|
+
bgColor: "bg-gray500",
|
|
37999
|
+
textColor: "text-gray200",
|
|
38000
|
+
scoreColor: "text-gray200"
|
|
38001
|
+
};
|
|
38002
|
+
};
|
|
38003
|
+
var itemsExplanation = [
|
|
38004
|
+
{ key: "contentRelevance", label: "Content Relevance" },
|
|
38005
|
+
{ key: "audienceMatch", label: "Audience Match" },
|
|
38006
|
+
{ key: "authorityExpertise", label: "Expertise" },
|
|
38007
|
+
{ key: "contentQuality", label: "Content Quality" },
|
|
38008
|
+
{ key: "authenticity", label: "Authenticity" },
|
|
38009
|
+
{ key: "brandSafety", label: "Brand Safety" }
|
|
38010
|
+
];
|
|
38011
|
+
function CreatorGridViewCard({ creator }) {
|
|
38012
|
+
const [isExpanded, setIsExpanded] = useState14(false);
|
|
38013
|
+
const [showFullDescription, setShowFullDescription] = useState14(false);
|
|
38014
|
+
const [isDescriptionOverflowing, setIsDescriptionOverflowing] = useState14(false);
|
|
38015
|
+
const descriptionRef = useRef6(null);
|
|
38016
|
+
const cardRef = useRef6(null);
|
|
38017
|
+
const checkDescriptionOverflow = useCallback4(() => {
|
|
38018
|
+
const el = descriptionRef.current;
|
|
38019
|
+
if (!el) return;
|
|
38020
|
+
setIsDescriptionOverflowing(el.scrollHeight > el.clientHeight + 1);
|
|
38021
|
+
}, []);
|
|
38022
|
+
useEffect9(() => {
|
|
38023
|
+
checkDescriptionOverflow();
|
|
38024
|
+
}, [checkDescriptionOverflow, isExpanded, showFullDescription]);
|
|
38025
|
+
useEffect9(() => {
|
|
38026
|
+
const onResize = () => checkDescriptionOverflow();
|
|
38027
|
+
window.addEventListener("resize", onResize);
|
|
38028
|
+
return () => window.removeEventListener("resize", onResize);
|
|
38029
|
+
}, [checkDescriptionOverflow]);
|
|
38030
|
+
const platformStats = useMemo9(() => {
|
|
38031
|
+
return [
|
|
38032
|
+
{
|
|
38033
|
+
platform: "instagram",
|
|
38034
|
+
icon: InstagramIcon,
|
|
38035
|
+
followers: creator.metrics?.instagram?.followers || 0,
|
|
38036
|
+
engagement: creator.metrics?.instagram?.engagement || 0
|
|
38037
|
+
},
|
|
38038
|
+
{
|
|
38039
|
+
platform: "youtube",
|
|
38040
|
+
icon: YouTubeIcon,
|
|
38041
|
+
followers: creator.metrics?.youtube?.followers || 0,
|
|
38042
|
+
engagement: creator.metrics?.youtube?.engagement || 0
|
|
38043
|
+
},
|
|
38044
|
+
{
|
|
38045
|
+
platform: "tiktok",
|
|
38046
|
+
icon: TikTokIcon3,
|
|
38047
|
+
followers: creator.metrics?.tiktok?.followers || 0,
|
|
38048
|
+
engagement: creator.metrics?.tiktok?.engagement || 0
|
|
38049
|
+
}
|
|
38050
|
+
];
|
|
38051
|
+
}, [creator]);
|
|
38052
|
+
const toggleExpanded = () => {
|
|
38053
|
+
const willExpand = !isExpanded;
|
|
38054
|
+
setIsExpanded(willExpand);
|
|
38055
|
+
setTimeout(() => {
|
|
38056
|
+
if (cardRef.current) {
|
|
38057
|
+
cardRef.current.scrollIntoView({
|
|
38058
|
+
behavior: "smooth",
|
|
38059
|
+
block: willExpand ? "center" : "nearest"
|
|
38060
|
+
});
|
|
38061
|
+
}
|
|
38062
|
+
}, 100);
|
|
38063
|
+
};
|
|
38064
|
+
const iso2 = normalizeToIso2(creator.country);
|
|
38065
|
+
const meta = codeToMeta[iso2];
|
|
38066
|
+
return /* @__PURE__ */ jsx131(
|
|
38067
|
+
motion4.div,
|
|
38068
|
+
{
|
|
38069
|
+
ref: cardRef,
|
|
38070
|
+
layout: "position",
|
|
38071
|
+
initial: { opacity: 0, y: 10 },
|
|
38072
|
+
animate: { opacity: 1, y: 0 },
|
|
38073
|
+
transition: { duration: 0.3 },
|
|
38074
|
+
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" : ""}`,
|
|
38075
|
+
style: isExpanded ? { gridColumn: "1 / -1" } : {},
|
|
38076
|
+
onClick: toggleExpanded,
|
|
38077
|
+
children: /* @__PURE__ */ jsxs89("div", { className: "flex", children: [
|
|
38078
|
+
/* @__PURE__ */ jsxs89("div", { className: `${isExpanded ? "w-1/3" : "w-full"}`, children: [
|
|
38079
|
+
/* @__PURE__ */ jsxs89("div", { className: "relative w-full aspect-square mb-2", children: [
|
|
38080
|
+
creator.profile_pic ? /* @__PURE__ */ jsx131(
|
|
38081
|
+
"img",
|
|
38082
|
+
{
|
|
38083
|
+
src: creator.profile_pic,
|
|
38084
|
+
alt: creator.name,
|
|
38085
|
+
className: "w-full h-full object-cover bg-primary/10",
|
|
38086
|
+
style: { borderRadius: "10px 10px 0 0" }
|
|
38087
|
+
}
|
|
38088
|
+
) : /* @__PURE__ */ jsx131(
|
|
38089
|
+
"div",
|
|
38090
|
+
{
|
|
38091
|
+
className: "w-full h-full bg-primary/10 flex items-center justify-center",
|
|
38092
|
+
style: { borderRadius: "10px 10px 0 0" },
|
|
38093
|
+
children: /* @__PURE__ */ jsx131("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" })
|
|
38094
|
+
}
|
|
38095
|
+
),
|
|
38096
|
+
/* @__PURE__ */ jsx131(
|
|
38097
|
+
"div",
|
|
38098
|
+
{
|
|
38099
|
+
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`,
|
|
38100
|
+
children: creator.sentiment ? `${creator.sentiment?.matchScore?.toFixed(1)}%` : "N/A"
|
|
38101
|
+
}
|
|
38102
|
+
)
|
|
38103
|
+
] }),
|
|
38104
|
+
/* @__PURE__ */ jsxs89("div", { className: "px-3 pb-1", children: [
|
|
38105
|
+
/* @__PURE__ */ jsxs89("div", { children: [
|
|
38106
|
+
/* @__PURE__ */ jsx131(
|
|
38107
|
+
"h3",
|
|
38108
|
+
{
|
|
38109
|
+
className: `${isExpanded ? "text-md" : "text-sm"} font-normal text-gray900 mb-1 line-clamp-2 text-start`,
|
|
38110
|
+
children: creator.name || "Unnamed"
|
|
38111
|
+
}
|
|
38112
|
+
),
|
|
38113
|
+
/* @__PURE__ */ jsxs89(
|
|
38114
|
+
"div",
|
|
38115
|
+
{
|
|
38116
|
+
className: `${isExpanded ? "text-sm" : "text-xs"} text-gray700 mb-1 text-start flex items-center gap-1`,
|
|
38117
|
+
children: [
|
|
38118
|
+
/* @__PURE__ */ jsx131("span", { className: "text-base", children: meta?.flag }),
|
|
38119
|
+
/* @__PURE__ */ jsx131("span", { children: meta?.name || creator.country || "Unknown" })
|
|
38120
|
+
]
|
|
38121
|
+
}
|
|
38122
|
+
),
|
|
38123
|
+
isExpanded && creator?.sentiment?.detailedScores && /* @__PURE__ */ jsx131("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx131("div", { className: "mt-2 w-[150px] flex gap-2", children: Object.entries(creator.sentiment.detailedScores).map(
|
|
38124
|
+
([key, value]) => {
|
|
38125
|
+
const itemRank = getSentimentRank2(value);
|
|
38126
|
+
return /* @__PURE__ */ jsxs89(
|
|
38127
|
+
"div",
|
|
38128
|
+
{
|
|
38129
|
+
className: "flex flex-col items-center w-[100px]",
|
|
38130
|
+
children: [
|
|
38131
|
+
/* @__PURE__ */ jsxs89(
|
|
38132
|
+
"span",
|
|
38133
|
+
{
|
|
38134
|
+
className: `text-[14px] font-bold ${itemRank.scoreColor}`,
|
|
38135
|
+
children: [
|
|
38136
|
+
value,
|
|
38137
|
+
"%"
|
|
38138
|
+
]
|
|
38139
|
+
}
|
|
38140
|
+
),
|
|
38141
|
+
/* @__PURE__ */ jsx131("div", { className: "flex items-center justify-center gap-1 w-full", children: /* @__PURE__ */ jsx131("span", { className: "text-xs dark:text-gray500 text-center px-1", children: itemsExplanation.find(
|
|
38142
|
+
(item) => item.key === key
|
|
38143
|
+
)?.label }) })
|
|
38144
|
+
]
|
|
38145
|
+
},
|
|
38146
|
+
key
|
|
38147
|
+
);
|
|
38148
|
+
}
|
|
38149
|
+
) }) })
|
|
38150
|
+
] }),
|
|
38151
|
+
!isExpanded && /* @__PURE__ */ jsx131("div", { className: "flex gap-2 justify-between", children: platformStats.map(
|
|
38152
|
+
({ platform, icon: Icon3, followers }) => /* @__PURE__ */ jsxs89(
|
|
38153
|
+
"div",
|
|
38154
|
+
{
|
|
38155
|
+
className: "flex flex-col items-center gap-1",
|
|
38156
|
+
title: `${formatFollowerCount3(followers)} followers`,
|
|
38157
|
+
children: [
|
|
38158
|
+
/* @__PURE__ */ jsx131(
|
|
38159
|
+
Icon3,
|
|
38160
|
+
{
|
|
38161
|
+
className: `w-5 h-5 ${getPlatformIconColor(platform)}`
|
|
38162
|
+
}
|
|
38163
|
+
),
|
|
38164
|
+
/* @__PURE__ */ jsx131("span", { className: "text-xs dark:text-gray500", children: followers > 0 && formatFollowerCount3(followers) })
|
|
38165
|
+
]
|
|
38166
|
+
},
|
|
38167
|
+
platform
|
|
38168
|
+
)
|
|
38169
|
+
) })
|
|
38170
|
+
] })
|
|
38171
|
+
] }),
|
|
38172
|
+
isExpanded && /* @__PURE__ */ jsx131("div", { className: "flex-1 border-l border-gray300 p-6 overflow-hidden transition-all duration-300 ease-in-out", children: /* @__PURE__ */ jsxs89("div", { className: "space-y-4", children: [
|
|
38173
|
+
/* @__PURE__ */ jsxs89("div", { children: [
|
|
38174
|
+
/* @__PURE__ */ jsxs89(
|
|
38175
|
+
"div",
|
|
38176
|
+
{
|
|
38177
|
+
ref: descriptionRef,
|
|
38178
|
+
className: `${showFullDescription ? "" : "max-h-[80px] overflow-hidden"} relative`,
|
|
38179
|
+
children: [
|
|
38180
|
+
/* @__PURE__ */ jsx131("p", { className: "text-sm text-gray700 leading-relaxed", children: creator.description || "No description provided." }),
|
|
38181
|
+
!showFullDescription && isDescriptionOverflowing && /* @__PURE__ */ jsx131("div", { className: "pointer-events-none absolute bottom-0 left-0 right-0 h-10 bg-gradient-to-t from-gray25 to-transparent" })
|
|
38182
|
+
]
|
|
38183
|
+
}
|
|
38184
|
+
),
|
|
38185
|
+
(isDescriptionOverflowing || showFullDescription) && /* @__PURE__ */ jsx131(
|
|
38186
|
+
"button",
|
|
38187
|
+
{
|
|
38188
|
+
onClick: (e) => {
|
|
38189
|
+
e.stopPropagation();
|
|
38190
|
+
setShowFullDescription((v) => !v);
|
|
38191
|
+
},
|
|
38192
|
+
className: "mt-1 px-3 py-1 rounded border border-gray300 text-sm text-gray700 hover:text-gray900",
|
|
38193
|
+
children: showFullDescription ? "Show less" : "Show more"
|
|
38194
|
+
}
|
|
38195
|
+
)
|
|
38196
|
+
] }),
|
|
38197
|
+
/* @__PURE__ */ jsx131("div", { className: "flex gap-6 justify-start items-center", children: platformStats.map(
|
|
38198
|
+
({ platform, icon: Icon3, followers, engagement }) => /* @__PURE__ */ jsxs89("div", { className: "flex items-center gap-3", children: [
|
|
38199
|
+
/* @__PURE__ */ jsxs89(
|
|
38200
|
+
"div",
|
|
38201
|
+
{
|
|
38202
|
+
className: "flex items-center gap-1",
|
|
38203
|
+
title: `${formatFollowerCount3(followers)} followers`,
|
|
38204
|
+
children: [
|
|
38205
|
+
/* @__PURE__ */ jsx131(
|
|
38206
|
+
Icon3,
|
|
38207
|
+
{
|
|
38208
|
+
className: `w-5 h-5 ${getPlatformIconColor(platform)}`
|
|
38209
|
+
}
|
|
38210
|
+
),
|
|
38211
|
+
/* @__PURE__ */ jsx131("span", { className: "text-xs dark:text-gray500", children: followers > 0 ? formatFollowerCount3(followers) : "0" })
|
|
38212
|
+
]
|
|
38213
|
+
}
|
|
38214
|
+
),
|
|
38215
|
+
/* @__PURE__ */ jsxs89("div", { className: "flex items-center gap-1", children: [
|
|
38216
|
+
/* @__PURE__ */ jsx131(ChartColumn, { className: "w-5 h-5 dark:text-gray500" }),
|
|
38217
|
+
/* @__PURE__ */ jsxs89("span", { className: "text-sm dark:text-gray500 w-[40px]", children: [
|
|
38218
|
+
(engagement * 100).toFixed(1),
|
|
38219
|
+
"%"
|
|
38220
|
+
] })
|
|
38221
|
+
] })
|
|
38222
|
+
] }, platform)
|
|
38223
|
+
) }),
|
|
38224
|
+
creator.posts?.length > 0 && /* @__PURE__ */ jsxs89("div", { className: "w-full overflow-hidden", children: [
|
|
38225
|
+
/* @__PURE__ */ jsx131("h3", { className: "mb-2 text-sm font-medium text-gray900", children: "Recent Posts" }),
|
|
38226
|
+
/* @__PURE__ */ jsx131("div", { className: "flex gap-3 overflow-x-auto", children: creator.posts.filter(
|
|
38227
|
+
(post) => post.thumbnail || post.thumbnail_url
|
|
38228
|
+
).slice(0, 8).map((post, idx) => /* @__PURE__ */ jsx131(
|
|
38229
|
+
"a",
|
|
38230
|
+
{
|
|
38231
|
+
href: post.url || "#",
|
|
38232
|
+
target: "_blank",
|
|
38233
|
+
rel: "noopener noreferrer",
|
|
38234
|
+
className: "block flex-shrink-0",
|
|
38235
|
+
onClick: (e) => e.stopPropagation(),
|
|
38236
|
+
children: /* @__PURE__ */ jsx131(
|
|
38237
|
+
"img",
|
|
38238
|
+
{
|
|
38239
|
+
src: post.thumbnail_url || post.thumbnail,
|
|
38240
|
+
alt: post.title || `Post ${idx + 1}`,
|
|
38241
|
+
className: "rounded-md object-cover w-[120px] h-[120px]"
|
|
38242
|
+
}
|
|
38243
|
+
)
|
|
38244
|
+
},
|
|
38245
|
+
idx
|
|
38246
|
+
)) })
|
|
38247
|
+
] }),
|
|
38248
|
+
creator?.sentiment?.aiReasoning && /* @__PURE__ */ jsxs89("div", { className: "text-gray700 max-h-[200px] overflow-auto", children: [
|
|
38249
|
+
/* @__PURE__ */ jsx131("h4", { className: "font-semibold text-sm", children: "AI Analysis" }),
|
|
38250
|
+
/* @__PURE__ */ jsx131("p", { className: "text-sm", children: creator.sentiment.aiReasoning })
|
|
38251
|
+
] })
|
|
38252
|
+
] }) })
|
|
38253
|
+
] })
|
|
38254
|
+
}
|
|
38255
|
+
);
|
|
38256
|
+
}
|
|
38257
|
+
function CreatorGridView({
|
|
38258
|
+
creatorData
|
|
38259
|
+
}) {
|
|
38260
|
+
return /* @__PURE__ */ jsx131("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__ */ jsx131(CreatorGridViewCard, { creator }, creator._id)) });
|
|
38261
|
+
}
|
|
38262
|
+
|
|
38263
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
|
|
38264
|
+
import { Fragment as Fragment8, jsx as jsx132, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
38265
|
+
var formatFollowerCount4 = (count) => {
|
|
38266
|
+
if (count >= 1e6) {
|
|
38267
|
+
const millions = count / 1e6;
|
|
38268
|
+
return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
|
|
38269
|
+
} else if (count >= 1e4) {
|
|
38270
|
+
return `${Math.floor(count / 1e3)}k`;
|
|
38271
|
+
} else if (count >= 1e3) {
|
|
38272
|
+
return `${(count / 1e3).toFixed(1)}k`;
|
|
38273
|
+
}
|
|
38274
|
+
return Math.floor(count).toString();
|
|
38275
|
+
};
|
|
38276
|
+
var getSentimentRank3 = (score) => {
|
|
38277
|
+
if (score >= 80) {
|
|
38278
|
+
return {
|
|
38279
|
+
rank: "STRONG FIT",
|
|
38280
|
+
bgColor: "bg-greenBackground",
|
|
38281
|
+
textColor: "text-greenText",
|
|
38282
|
+
scoreColor: "text-[#499C54]"
|
|
38283
|
+
};
|
|
38284
|
+
} else if (score >= 50) {
|
|
38285
|
+
return {
|
|
38286
|
+
rank: "MODERATE FIT",
|
|
38287
|
+
bgColor: "bg-orangeBackground",
|
|
38288
|
+
textColor: "text-orangeText",
|
|
38289
|
+
scoreColor: "text-[#B3512F]"
|
|
38290
|
+
};
|
|
38291
|
+
} else if (score >= 0) {
|
|
38292
|
+
return {
|
|
38293
|
+
rank: "POOR FIT",
|
|
38294
|
+
bgColor: "bg-redBackground",
|
|
38295
|
+
textColor: "text-redText",
|
|
38296
|
+
scoreColor: "text-[#BE2C35]"
|
|
38297
|
+
};
|
|
38298
|
+
}
|
|
38299
|
+
return {
|
|
38300
|
+
rank: "Unranked",
|
|
38301
|
+
bgColor: "bg-gray500",
|
|
38302
|
+
textColor: "text-gray200",
|
|
38303
|
+
scoreColor: "text-gray500"
|
|
38304
|
+
};
|
|
38305
|
+
};
|
|
38306
|
+
function formatCreator(raw) {
|
|
38307
|
+
return {
|
|
38308
|
+
_id: raw.creator_id || raw.profile?.upfluenceId,
|
|
38309
|
+
name: raw.profile?.name || "",
|
|
38310
|
+
description: raw.profile?.description || "",
|
|
38311
|
+
isVerified: raw.profile?.isVerified || false,
|
|
38312
|
+
country: raw.profile?.country || "",
|
|
38313
|
+
profile_pic: raw.profile?.profilePicture || "",
|
|
38314
|
+
platforms: raw.profile?.platforms,
|
|
38315
|
+
platformMetrics: raw.platformMetrics || {},
|
|
38316
|
+
metrics: {
|
|
38317
|
+
instagram: {
|
|
38318
|
+
engagement: raw.platformMetrics?.instagramMetrics?.engagementRate || 0,
|
|
38319
|
+
followers: raw.platformMetrics?.instagramMetrics?.followers || 0,
|
|
38320
|
+
avgLikes: raw.platformMetrics?.instagramMetrics?.avgLikes || 0,
|
|
38321
|
+
avgComments: raw.platformMetrics?.instagramMetrics?.avgComments || 0
|
|
38322
|
+
},
|
|
38323
|
+
youtube: {
|
|
38324
|
+
engagement: raw.platformMetrics?.youtubeMetrics?.engagementRate || 0,
|
|
38325
|
+
followers: raw.platformMetrics?.youtubeMetrics?.subscribers || 0,
|
|
38326
|
+
avgLikes: raw.platformMetrics?.youtubeMetrics?.avgLikes || 0,
|
|
38327
|
+
avgComments: raw.platformMetrics?.youtubeMetrics?.avgComments || 0
|
|
38328
|
+
},
|
|
38329
|
+
tiktok: {
|
|
38330
|
+
engagement: raw.platformMetrics?.tiktokMetrics?.engagementRate || 0,
|
|
38331
|
+
followers: raw.platformMetrics?.tiktokMetrics?.followers || 0,
|
|
38332
|
+
avgLikes: raw.platformMetrics?.tiktokMetrics?.avgLikes || 0,
|
|
38333
|
+
avgComments: raw.platformMetrics?.tiktokMetrics?.avgComments || 0
|
|
38334
|
+
}
|
|
38335
|
+
},
|
|
38336
|
+
posts: raw.posts || [],
|
|
38337
|
+
sentiment: raw.sentiment || null,
|
|
38338
|
+
audienceDemographics: raw.audienceDemographics || null,
|
|
38339
|
+
brandCollaborations: raw.brandCollaborations || null,
|
|
38340
|
+
profile: raw.profile || {}
|
|
38341
|
+
};
|
|
38342
|
+
}
|
|
38343
|
+
var truncateName2 = (name, maxLen) => {
|
|
38344
|
+
if (!name) return "";
|
|
38345
|
+
return name.length > maxLen ? name.slice(0, maxLen) + "..." : name;
|
|
38346
|
+
};
|
|
38347
|
+
function SearchSpecDisplay({ spec }) {
|
|
38348
|
+
if (!spec) return null;
|
|
38349
|
+
const priorityOneBundles = Array.isArray(spec?.keyword_bundles) ? spec.keyword_bundles.filter((b) => b?.priority !== void 0 ? b.priority === 1 : true).flatMap((b) => b?.keywords || []) : [];
|
|
38350
|
+
const textClass = "text-sm text-white dark:text-gray900";
|
|
38351
|
+
const paddingClass = "px-4 py-1";
|
|
38352
|
+
const roundedClass = "rounded-lg";
|
|
38353
|
+
const tagClass = `${textClass} ${paddingClass} bg-[#85888f] dark:bg-[rgba(249,249,249,0.2)] ${roundedClass} border border-[#85888f] dark:border-gray800 font-medium`;
|
|
38354
|
+
const items = [
|
|
38355
|
+
{
|
|
38356
|
+
key: "platforms",
|
|
38357
|
+
title: "Platforms",
|
|
38358
|
+
content: /* @__PURE__ */ jsx132("div", { className: "flex flex-wrap gap-2", children: (spec.platforms || []).filter((p) => ["instagram", "youtube", "tiktok"].includes(p.toLowerCase())).map((p, idx) => /* @__PURE__ */ jsx132("span", { className: `${tagClass} flex items-center justify-center`, children: p.charAt(0).toUpperCase() + p.slice(1).toLowerCase() }, idx)) })
|
|
38359
|
+
},
|
|
38360
|
+
{
|
|
38361
|
+
key: "follower_range",
|
|
38362
|
+
title: "Follower Range",
|
|
38363
|
+
content: /* @__PURE__ */ jsxs90("div", { className: `inline-block ${tagClass} font-grotesk`, children: [
|
|
38364
|
+
formatFollowerCount4(spec?.follower_range?.min ?? 0),
|
|
38365
|
+
" -",
|
|
38366
|
+
" ",
|
|
38367
|
+
formatFollowerCount4(spec?.follower_range?.max ?? 0)
|
|
38368
|
+
] })
|
|
38369
|
+
},
|
|
38370
|
+
{
|
|
38371
|
+
key: "geography",
|
|
38372
|
+
title: "Geography",
|
|
38373
|
+
content: /* @__PURE__ */ jsx132("div", { className: `inline-block ${tagClass} font-grotesk`, children: /* @__PURE__ */ jsx132(
|
|
38374
|
+
"div",
|
|
38375
|
+
{
|
|
38376
|
+
className: "max-w-[200px] overflow-x-auto whitespace-nowrap",
|
|
38377
|
+
style: { scrollbarWidth: "none", textOverflow: "ellipsis", overflow: "hidden" },
|
|
38378
|
+
onMouseEnter: (e) => {
|
|
38379
|
+
e.currentTarget.style.textOverflow = "clip";
|
|
38380
|
+
e.currentTarget.style.overflow = "auto";
|
|
38381
|
+
},
|
|
38382
|
+
onMouseLeave: (e) => {
|
|
38383
|
+
e.currentTarget.style.textOverflow = "ellipsis";
|
|
38384
|
+
e.currentTarget.style.overflow = "hidden";
|
|
38385
|
+
e.currentTarget.scrollLeft = 0;
|
|
38386
|
+
},
|
|
38387
|
+
children: (spec.geography || []).map((g, idx) => /* @__PURE__ */ jsxs90("span", { children: [
|
|
38388
|
+
g,
|
|
38389
|
+
idx < spec.geography.length - 1 ? ", " : ""
|
|
38390
|
+
] }, idx))
|
|
36797
38391
|
}
|
|
36798
38392
|
) })
|
|
38393
|
+
},
|
|
38394
|
+
{
|
|
38395
|
+
key: "keyword_bundles",
|
|
38396
|
+
title: "Keyword",
|
|
38397
|
+
content: /* @__PURE__ */ jsx132("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__ */ jsx132("div", { className: `${textClass} text-white/70`, children: "No priority 1 keywords" }) : priorityOneBundles.map((kw, idx) => /* @__PURE__ */ jsx132("span", { className: tagClass, children: kw }, idx)) })
|
|
36799
38398
|
}
|
|
36800
|
-
|
|
38399
|
+
];
|
|
38400
|
+
const itemsToShow = ["platforms", "follower_range", "geography", "keyword_bundles"];
|
|
38401
|
+
return /* @__PURE__ */ jsx132("div", { className: "mt-3", children: /* @__PURE__ */ jsx132("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__ */ jsxs90("div", { className: "flex-none p-5 bg-paperBackground rounded-lg", children: [
|
|
38402
|
+
/* @__PURE__ */ jsx132("div", { className: "text-purpleText text-sm mb-4", children: /* @__PURE__ */ jsx132("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: title.toUpperCase() }) }),
|
|
38403
|
+
/* @__PURE__ */ jsx132("div", { className: `flex text-gray900 ${textClass}`, children: content })
|
|
38404
|
+
] }, key)) }) });
|
|
36801
38405
|
}
|
|
36802
|
-
function
|
|
36803
|
-
|
|
36804
|
-
|
|
38406
|
+
function SentimentScoreRank({
|
|
38407
|
+
score,
|
|
38408
|
+
isValidationComplete,
|
|
38409
|
+
showMinialView = false
|
|
36805
38410
|
}) {
|
|
36806
|
-
|
|
36807
|
-
|
|
36808
|
-
/* @__PURE__ */
|
|
36809
|
-
|
|
36810
|
-
|
|
36811
|
-
|
|
36812
|
-
|
|
36813
|
-
|
|
36814
|
-
|
|
36815
|
-
|
|
36816
|
-
/* @__PURE__ */
|
|
36817
|
-
/* @__PURE__ */ jsx124("div", { className: "w-40 h-6 bg-purple200 rounded-md animate-pulse" }),
|
|
36818
|
-
/* @__PURE__ */ jsx124("div", { className: "w-64 h-7 bg-gray200 dark:bg-gray300 rounded animate-pulse" })
|
|
36819
|
-
] }) }),
|
|
36820
|
-
/* @__PURE__ */ jsxs83("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: [
|
|
36821
|
-
/* @__PURE__ */ jsxs83("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
|
|
36822
|
-
/* @__PURE__ */ jsx124("div", { className: "flex -space-x-2", children: Array.from({ length: 10 }).map((_, idx) => /* @__PURE__ */ jsx124(
|
|
36823
|
-
"div",
|
|
36824
|
-
{
|
|
36825
|
-
className: "w-8 h-8 md:w-10 md:h-10 rounded-full border-2 border-gray300 bg-gray200 animate-pulse"
|
|
36826
|
-
},
|
|
36827
|
-
idx
|
|
36828
|
-
)) }),
|
|
36829
|
-
/* @__PURE__ */ jsx124("div", { className: "space-y-2", children: /* @__PURE__ */ jsx124("div", { className: "w-full max-w-xs bg-gray200 rounded-full h-2 animate-pulse" }) })
|
|
36830
|
-
] }),
|
|
36831
|
-
/* @__PURE__ */ jsx124("div", { className: "px-6 py-2 bg-gray200 rounded-[30px] animate-pulse h-10 w-48" })
|
|
36832
|
-
] })
|
|
38411
|
+
const sentimentScoreRank = getSentimentRank3(score);
|
|
38412
|
+
return /* @__PURE__ */ jsx132("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ jsxs90("div", { className: `flex flex-col justify-end ${showMinialView ? "w-[120px]" : "w-[150px]"} text-sm`, children: [
|
|
38413
|
+
score !== void 0 && /* @__PURE__ */ jsx132("div", { className: "flex justify-center items-center mb-2", children: /* @__PURE__ */ jsx132(
|
|
38414
|
+
"span",
|
|
38415
|
+
{
|
|
38416
|
+
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]"}`,
|
|
38417
|
+
children: isValidationComplete ? sentimentScoreRank.rank : "Unranked"
|
|
38418
|
+
}
|
|
38419
|
+
) }),
|
|
38420
|
+
/* @__PURE__ */ jsx132("div", { className: `flex justify-center ${showMinialView ? "text-[24px]" : "text-[28px]"} font-bold mb-3 ${sentimentScoreRank.scoreColor}`, children: isValidationComplete ? score >= 0 ? `${score}%` : "0%" : /* @__PURE__ */ jsx132("div", { className: "flex items-center justify-center py-2", children: /* @__PURE__ */ jsx132("div", { className: "w-6 h-6 border-2 border-purple100 border-t-transparent rounded-full animate-spin" }) }) }),
|
|
38421
|
+
!showMinialView && /* @__PURE__ */ jsx132("p", { className: "text-gray600 dark:text-gray500 text-center", children: "Match Score" })
|
|
36833
38422
|
] }) });
|
|
36834
38423
|
}
|
|
36835
|
-
|
|
36836
|
-
|
|
36837
|
-
|
|
36838
|
-
|
|
36839
|
-
|
|
36840
|
-
|
|
36841
|
-
creatorImages,
|
|
36842
|
-
creatorLength,
|
|
36843
|
-
isAgentOutput,
|
|
36844
|
-
onVersionSelect,
|
|
36845
|
-
onViewCreators,
|
|
36846
|
-
versionStatus,
|
|
36847
|
-
statusDetails,
|
|
36848
|
-
timeDisplay,
|
|
36849
|
-
isLoading
|
|
36850
|
-
}) {
|
|
36851
|
-
const isComplete = versionStatus === "completed" || versionStatus === "complete";
|
|
36852
|
-
const statusTitle = isComplete ? "Creator Search Complete" : versionStatus === "failed" ? "Creator Search Failed" : "Creator Search Processing";
|
|
36853
|
-
if (isLoading) {
|
|
36854
|
-
return /* @__PURE__ */ jsx125(CreatorWidgetSkeleton, {});
|
|
38424
|
+
function BrandMentionPerformance({ creator }) {
|
|
38425
|
+
const insights = creator?.brandCollaborations?.insights;
|
|
38426
|
+
if (!insights) return null;
|
|
38427
|
+
const isValid2 = (val) => val !== null && val !== void 0 && val !== 0 && val !== "0" && val !== "" && !Number.isNaN(val);
|
|
38428
|
+
if (!isValid2(insights.averageBrandEngagementRate) && !isValid2(insights.effectivenessPercent) && !isValid2(insights.saturationRate)) {
|
|
38429
|
+
return null;
|
|
36855
38430
|
}
|
|
36856
|
-
|
|
36857
|
-
|
|
36858
|
-
|
|
36859
|
-
|
|
36860
|
-
|
|
38431
|
+
const metrics = [
|
|
38432
|
+
{ title: "Avg engagement rate", subtitle: "on brand mention", value: `${insights?.averageBrandEngagementRate || 0} %` },
|
|
38433
|
+
{ title: "Effectiveness", subtitle: "compared to all posts", value: `${insights?.effectivenessPercent || 0} %` },
|
|
38434
|
+
{ title: "Saturation Rate", subtitle: "on brand mention", value: `${insights?.saturationRate || 0} %` }
|
|
38435
|
+
];
|
|
38436
|
+
return /* @__PURE__ */ jsxs90("div", { children: [
|
|
38437
|
+
/* @__PURE__ */ jsx132("div", { className: "text-purpleText text-xs mb-4", children: /* @__PURE__ */ jsx132("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: "BRAND MENTION PERFORMANCE" }) }),
|
|
38438
|
+
/* @__PURE__ */ jsx132("div", { className: "flex flex-col gap-3", children: metrics.map((item) => /* @__PURE__ */ jsxs90("div", { className: "flex justify-between items-center text-gray700 text-sm", children: [
|
|
38439
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex flex-col gap-1", children: [
|
|
38440
|
+
/* @__PURE__ */ jsx132("h5", { children: item.title }),
|
|
38441
|
+
/* @__PURE__ */ jsx132("p", { className: "text-xs", children: item.subtitle })
|
|
36861
38442
|
] }),
|
|
36862
|
-
|
|
36863
|
-
|
|
36864
|
-
|
|
38443
|
+
/* @__PURE__ */ jsx132("p", { className: "text-purpleText text-lg", children: item.value })
|
|
38444
|
+
] }, item.title)) })
|
|
38445
|
+
] });
|
|
38446
|
+
}
|
|
38447
|
+
function CreatorFitSummary({ creator, showBrandPerformance }) {
|
|
38448
|
+
const hasDeepAnalysis = creator?.sentiment?.deepAnalysis?.deepAnalysis;
|
|
38449
|
+
const title = hasDeepAnalysis ? "CREATOR DEEP ANALYSIS" : "CREATOR FIT SUMMARY";
|
|
38450
|
+
const content = hasDeepAnalysis ? creator.sentiment.deepAnalysis.deepAnalysis : creator?.sentiment?.aiReasoning || "No data available.";
|
|
38451
|
+
return /* @__PURE__ */ jsxs90("div", { className: showBrandPerformance ? "col-span-1" : "col-span-2", children: [
|
|
38452
|
+
/* @__PURE__ */ jsx132("div", { className: "text-purpleText text-xs mb-4", children: /* @__PURE__ */ jsx132("span", { className: "rounded-md bg-purple200 px-2 py-[4px] font-sans", children: title }) }),
|
|
38453
|
+
/* @__PURE__ */ jsx132("div", { className: "max-h-[140px] overflow-y-auto slim-scrollbar", children: /* @__PURE__ */ jsx132("p", { className: "text-gray700 text-sm", children: content }) })
|
|
38454
|
+
] });
|
|
38455
|
+
}
|
|
38456
|
+
function ProfileSection({ creator, isValidationComplete }) {
|
|
38457
|
+
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}` : "";
|
|
38458
|
+
const iso2 = normalizeToIso2(creator.country);
|
|
38459
|
+
const meta = codeToMeta[iso2];
|
|
38460
|
+
return /* @__PURE__ */ jsxs90("div", { className: "flex items-start gap-1 md:gap-6", children: [
|
|
38461
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex flex-col items-center gap-6", children: [
|
|
38462
|
+
/* @__PURE__ */ jsx132("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__ */ jsxs90(Fragment8, { children: [
|
|
38463
|
+
/* @__PURE__ */ jsx132(
|
|
38464
|
+
"img",
|
|
36865
38465
|
{
|
|
36866
|
-
|
|
36867
|
-
|
|
36868
|
-
|
|
36869
|
-
"Version ",
|
|
36870
|
-
selectedVersion ?? "-",
|
|
36871
|
-
/* @__PURE__ */ jsx125(ChevronDown, { className: "w-3 h-3 md:w-4 md:h-4 transition-transform" })
|
|
36872
|
-
]
|
|
38466
|
+
src: creator.profile_pic,
|
|
38467
|
+
alt: creator.name,
|
|
38468
|
+
className: "object-cover w-[5rem] h-[5rem] rounded-[15px]"
|
|
36873
38469
|
}
|
|
36874
38470
|
),
|
|
36875
|
-
|
|
36876
|
-
|
|
38471
|
+
creator?.profile?.isVerified && /* @__PURE__ */ jsx132(
|
|
38472
|
+
BadgeCheck,
|
|
36877
38473
|
{
|
|
36878
|
-
|
|
36879
|
-
className: "
|
|
36880
|
-
|
|
36881
|
-
|
|
36882
|
-
|
|
36883
|
-
|
|
36884
|
-
},
|
|
36885
|
-
v
|
|
36886
|
-
)) })
|
|
36887
|
-
] }) })
|
|
38474
|
+
size: 35,
|
|
38475
|
+
className: "absolute -top-2 -right-2 text-blue-500 drop-shadow-sm fill-blue-300"
|
|
38476
|
+
}
|
|
38477
|
+
)
|
|
38478
|
+
] }) : /* @__PURE__ */ jsx132("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" }) }),
|
|
38479
|
+
/* @__PURE__ */ jsx132("div", { className: "block sm:hidden", children: /* @__PURE__ */ jsx132(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete, showMinialView: true }) })
|
|
36888
38480
|
] }),
|
|
36889
|
-
/* @__PURE__ */
|
|
36890
|
-
/* @__PURE__ */
|
|
36891
|
-
/* @__PURE__ */
|
|
36892
|
-
|
|
36893
|
-
|
|
36894
|
-
/* @__PURE__ */
|
|
36895
|
-
|
|
38481
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex flex-col gap-3 truncate", children: [
|
|
38482
|
+
/* @__PURE__ */ jsx132("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx132("h4", { className: "text-lg text-gray900 max-w-[150px]", title: creator.name, children: truncateName2(creator.name, 100) }) }),
|
|
38483
|
+
username && /* @__PURE__ */ jsx132("div", { className: "text-xs text-gray700", children: username }),
|
|
38484
|
+
/* @__PURE__ */ jsxs90("div", { className: "text-sm text-gray700 flex items-center gap-2", children: [
|
|
38485
|
+
/* @__PURE__ */ jsx132("span", { className: "text-base", children: meta?.flag }),
|
|
38486
|
+
/* @__PURE__ */ jsx132("span", { children: meta?.name || creator.country || "Unknown" })
|
|
38487
|
+
] }),
|
|
38488
|
+
/* @__PURE__ */ jsx132("div", { className: "text-xs text-gray700 text-wrap", children: truncateName2(creator.description, 100) })
|
|
38489
|
+
] })
|
|
38490
|
+
] });
|
|
38491
|
+
}
|
|
38492
|
+
function CreatorCardExpandedSection({
|
|
38493
|
+
creator
|
|
38494
|
+
}) {
|
|
38495
|
+
const hasBrandBreakdown = creator?.brandCollaborations?.insights?.brandBreakdown && creator?.sentiment?.deepAnalysis;
|
|
38496
|
+
return /* @__PURE__ */ jsxs90(
|
|
38497
|
+
motion5.div,
|
|
38498
|
+
{
|
|
38499
|
+
initial: { y: 20, opacity: 0 },
|
|
38500
|
+
animate: { y: 0, opacity: 1 },
|
|
38501
|
+
transition: { duration: 0.3, delay: 0.1 },
|
|
38502
|
+
className: "md:mt-6 space-y-5",
|
|
38503
|
+
children: [
|
|
38504
|
+
/* @__PURE__ */ jsxs90("div", { className: "md:grid md:grid-cols-[1.3fr_1fr_2fr_120px] gap-8 py-4 pr-7", children: [
|
|
38505
|
+
/* @__PURE__ */ jsx132("div", { className: "col-span-4 sm:col-span-1", children: hasBrandBreakdown ? /* @__PURE__ */ jsx132(
|
|
38506
|
+
BrandCollaborationsList,
|
|
38507
|
+
{
|
|
38508
|
+
brandBreakdown: creator?.brandCollaborations
|
|
38509
|
+
}
|
|
38510
|
+
) : /* @__PURE__ */ jsx132("div", { className: "hidden sm:block" }) }),
|
|
38511
|
+
/* @__PURE__ */ jsx132("div", { className: "col-span-4 sm:col-span-3", children: creator?.audienceDemographics ? /* @__PURE__ */ jsx132(
|
|
38512
|
+
EngagedAudienceDemographics,
|
|
38513
|
+
{
|
|
38514
|
+
audienceDemographics: creator.audienceDemographics
|
|
38515
|
+
}
|
|
38516
|
+
) : null })
|
|
38517
|
+
] }),
|
|
38518
|
+
/* @__PURE__ */ jsx132(
|
|
38519
|
+
PlatformPostsSection,
|
|
36896
38520
|
{
|
|
36897
|
-
|
|
36898
|
-
|
|
36899
|
-
isAgentOutput,
|
|
36900
|
-
initialCreatorsPercentage: statusDetails?.social_fetch_percentage
|
|
38521
|
+
platformMetrics: creator.platformMetrics,
|
|
38522
|
+
posts: creator.posts ?? creator.post
|
|
36901
38523
|
}
|
|
36902
|
-
)
|
|
36903
|
-
|
|
36904
|
-
|
|
38524
|
+
)
|
|
38525
|
+
]
|
|
38526
|
+
}
|
|
38527
|
+
);
|
|
38528
|
+
}
|
|
38529
|
+
function CreatorCard({
|
|
38530
|
+
creator,
|
|
38531
|
+
isValidationComplete
|
|
38532
|
+
}) {
|
|
38533
|
+
const [detailsExpanded, setDetailsExpanded] = useState15(false);
|
|
38534
|
+
const hasValidBrandMention = (() => {
|
|
38535
|
+
const insights = creator?.brandCollaborations?.insights;
|
|
38536
|
+
if (!insights) return false;
|
|
38537
|
+
const isValid2 = (val) => val !== null && val !== void 0 && val !== 0 && val !== "0" && val !== "" && !Number.isNaN(val);
|
|
38538
|
+
return isValid2(insights.averageBrandEngagementRate) || isValid2(insights.effectivenessPercent) || isValid2(insights.saturationRate);
|
|
38539
|
+
})();
|
|
38540
|
+
return /* @__PURE__ */ jsxs90(
|
|
38541
|
+
motion5.div,
|
|
38542
|
+
{
|
|
38543
|
+
layout: true,
|
|
38544
|
+
initial: { opacity: 0, y: 20 },
|
|
38545
|
+
animate: { opacity: 1, y: 0 },
|
|
38546
|
+
exit: { opacity: 0, y: -20 },
|
|
38547
|
+
transition: { duration: 0.4, ease: [0.22, 1, 0.36, 1] },
|
|
38548
|
+
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"}`,
|
|
38549
|
+
onClick: () => setDetailsExpanded((prev) => !prev),
|
|
38550
|
+
children: [
|
|
38551
|
+
/* @__PURE__ */ jsxs90("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: [
|
|
38552
|
+
/* @__PURE__ */ jsx132(ProfileSection, { creator, isValidationComplete }),
|
|
38553
|
+
hasValidBrandMention && /* @__PURE__ */ jsx132(BrandMentionPerformance, { creator }),
|
|
38554
|
+
/* @__PURE__ */ jsx132(CreatorFitSummary, { creator, showBrandPerformance: hasValidBrandMention }),
|
|
38555
|
+
/* @__PURE__ */ jsx132("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx132(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete }) })
|
|
38556
|
+
] }),
|
|
38557
|
+
/* @__PURE__ */ jsx132(AnimatePresence4, { children: detailsExpanded && /* @__PURE__ */ jsx132(
|
|
38558
|
+
motion5.div,
|
|
36905
38559
|
{
|
|
36906
|
-
|
|
36907
|
-
|
|
38560
|
+
initial: { height: 0, opacity: 0 },
|
|
38561
|
+
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 } } },
|
|
38562
|
+
exit: { height: 0, opacity: 0, transition: { height: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] }, opacity: { duration: 0.2 } } },
|
|
38563
|
+
className: "overflow-hidden mt-4",
|
|
38564
|
+
children: /* @__PURE__ */ jsx132(CreatorCardExpandedSection, { creator })
|
|
36908
38565
|
}
|
|
36909
|
-
)
|
|
38566
|
+
) })
|
|
38567
|
+
]
|
|
38568
|
+
}
|
|
38569
|
+
);
|
|
38570
|
+
}
|
|
38571
|
+
function CreatorDisplay({
|
|
38572
|
+
creators,
|
|
38573
|
+
isValidationComplete
|
|
38574
|
+
}) {
|
|
38575
|
+
const [viewMode, setViewMode] = useState15("list");
|
|
38576
|
+
return /* @__PURE__ */ jsxs90("div", { className: "px-4", children: [
|
|
38577
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex justify-end items-center my-3 gap-1", children: [
|
|
38578
|
+
/* @__PURE__ */ jsxs90("span", { className: "text-xs text-gray600 mr-2", children: [
|
|
38579
|
+
creators.length,
|
|
38580
|
+
" creators"
|
|
36910
38581
|
] }),
|
|
36911
|
-
/* @__PURE__ */
|
|
38582
|
+
/* @__PURE__ */ jsx132(
|
|
36912
38583
|
"button",
|
|
36913
38584
|
{
|
|
36914
|
-
className: `
|
|
36915
|
-
onClick:
|
|
36916
|
-
|
|
36917
|
-
|
|
36918
|
-
|
|
36919
|
-
|
|
36920
|
-
|
|
36921
|
-
|
|
36922
|
-
|
|
38585
|
+
className: `h-7 w-7 flex items-center justify-center rounded ${viewMode === "list" ? "bg-gray200" : ""}`,
|
|
38586
|
+
onClick: () => setViewMode("list"),
|
|
38587
|
+
children: /* @__PURE__ */ jsx132(
|
|
38588
|
+
AlignJustify,
|
|
38589
|
+
{
|
|
38590
|
+
className: `h-5 w-5 ${viewMode === "list" ? "text-gray900 dark:text-white" : "text-gray500"}`
|
|
38591
|
+
}
|
|
38592
|
+
)
|
|
38593
|
+
}
|
|
38594
|
+
),
|
|
38595
|
+
/* @__PURE__ */ jsx132(
|
|
38596
|
+
"button",
|
|
38597
|
+
{
|
|
38598
|
+
className: `h-7 w-7 flex items-center justify-center rounded ${viewMode === "grid" ? "bg-gray200" : ""}`,
|
|
38599
|
+
onClick: () => setViewMode("grid"),
|
|
38600
|
+
children: /* @__PURE__ */ jsx132(
|
|
38601
|
+
LayoutGrid,
|
|
38602
|
+
{
|
|
38603
|
+
className: `h-5 w-5 ${viewMode === "grid" ? "text-gray900 dark:text-white" : "text-gray500"}`
|
|
38604
|
+
}
|
|
38605
|
+
)
|
|
36923
38606
|
}
|
|
36924
38607
|
)
|
|
36925
|
-
] })
|
|
36926
|
-
|
|
38608
|
+
] }),
|
|
38609
|
+
creators.length > 0 ? viewMode === "list" ? /* @__PURE__ */ jsx132("div", { className: "space-y-4", children: creators.map((creator) => /* @__PURE__ */ jsx132(CreatorCard, { creator, isValidationComplete }, creator._id)) }) : /* @__PURE__ */ jsx132(CreatorGridView, { creatorData: creators }) : /* @__PURE__ */ jsxs90("div", { className: "text-center py-8 bg-gray100 rounded-lg border border-gray300", children: [
|
|
38610
|
+
/* @__PURE__ */ jsx132("div", { className: "w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-3", children: /* @__PURE__ */ jsx132(Users, { className: "w-6 h-6 text-primary" }) }),
|
|
38611
|
+
/* @__PURE__ */ jsx132("h3", { className: "text-base font-medium text-gray900", children: "No creators found" }),
|
|
38612
|
+
/* @__PURE__ */ jsx132("p", { className: "mt-1 text-sm text-gray600", children: "Try adjusting your search criteria" })
|
|
38613
|
+
] })
|
|
38614
|
+
] });
|
|
38615
|
+
}
|
|
38616
|
+
function CreatorExpandedPanel({
|
|
38617
|
+
isOpen,
|
|
38618
|
+
onClose,
|
|
38619
|
+
sessionId,
|
|
38620
|
+
creatorIds,
|
|
38621
|
+
version,
|
|
38622
|
+
searchSpec,
|
|
38623
|
+
fetchCreatorDetails
|
|
38624
|
+
}) {
|
|
38625
|
+
const [creators, setCreators] = useState15([]);
|
|
38626
|
+
const [loading, setLoading] = useState15(false);
|
|
38627
|
+
const fetcher = fetchCreatorDetails ?? defaultFetchCreatorDetails;
|
|
38628
|
+
const loadCreators = useCallback5(async () => {
|
|
38629
|
+
if (!creatorIds.length) return;
|
|
38630
|
+
setLoading(true);
|
|
38631
|
+
try {
|
|
38632
|
+
const data = await fetcher({ creatorIds, sessionId, versionNo: version });
|
|
38633
|
+
setCreators((data.creatorData || []).map(formatCreator));
|
|
38634
|
+
} catch (err) {
|
|
38635
|
+
console.error("Failed to fetch creator details:", err);
|
|
38636
|
+
} finally {
|
|
38637
|
+
setLoading(false);
|
|
38638
|
+
}
|
|
38639
|
+
}, [creatorIds, sessionId, version, fetcher]);
|
|
38640
|
+
useEffect10(() => {
|
|
38641
|
+
if (isOpen && creatorIds.length > 0) {
|
|
38642
|
+
loadCreators();
|
|
38643
|
+
}
|
|
38644
|
+
}, [isOpen, loadCreators]);
|
|
38645
|
+
if (typeof window === "undefined") return null;
|
|
38646
|
+
return ReactDOM2.createPortal(
|
|
38647
|
+
/* @__PURE__ */ jsx132(AnimatePresence4, { mode: "sync", children: isOpen && /* @__PURE__ */ jsxs90(Fragment8, { children: [
|
|
38648
|
+
/* @__PURE__ */ jsx132(
|
|
38649
|
+
motion5.div,
|
|
38650
|
+
{
|
|
38651
|
+
initial: { opacity: 0 },
|
|
38652
|
+
animate: { opacity: 1 },
|
|
38653
|
+
exit: { opacity: 0, display: "none" },
|
|
38654
|
+
transition: { duration: 0.3 },
|
|
38655
|
+
className: "fixed inset-0 bg-black bg-opacity-50 z-[60]",
|
|
38656
|
+
onClick: (e) => {
|
|
38657
|
+
e.stopPropagation();
|
|
38658
|
+
onClose();
|
|
38659
|
+
}
|
|
38660
|
+
},
|
|
38661
|
+
"overlay"
|
|
38662
|
+
),
|
|
38663
|
+
/* @__PURE__ */ jsx132(
|
|
38664
|
+
motion5.div,
|
|
38665
|
+
{
|
|
38666
|
+
initial: { x: "100%" },
|
|
38667
|
+
animate: { x: 0 },
|
|
38668
|
+
exit: { x: "100%" },
|
|
38669
|
+
transition: { type: "spring", damping: 30, stiffness: 400 },
|
|
38670
|
+
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",
|
|
38671
|
+
children: /* @__PURE__ */ jsxs90("div", { className: "py-4 font-noto", children: [
|
|
38672
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex justify-between items-center w-full mb-4 pl-2", children: [
|
|
38673
|
+
/* @__PURE__ */ jsx132("button", { onClick: onClose, className: "p-2 rounded-full transition-colors", children: /* @__PURE__ */ jsx132(X, { className: "w-5 h-5" }) }),
|
|
38674
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex-1 flex flex-col w-[80%]", children: [
|
|
38675
|
+
/* @__PURE__ */ jsx132("div", { className: "flex flex-col md:flex-row justify-between gap-2 md:gap-0 md:items-center pr-16", children: /* @__PURE__ */ jsxs90("div", { className: "flex flex-col", children: [
|
|
38676
|
+
/* @__PURE__ */ jsx132("div", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] mb-2", children: /* @__PURE__ */ jsx132("h4", { className: "text-xs font-medium text-purpleText", children: "VERIFIED SEARCH RESULTS" }) }),
|
|
38677
|
+
/* @__PURE__ */ jsx132("h2", { className: "text-xl font-bold mb-1", children: "Creators Search Results" })
|
|
38678
|
+
] }) }),
|
|
38679
|
+
searchSpec && /* @__PURE__ */ jsx132(SearchSpecDisplay, { spec: searchSpec })
|
|
38680
|
+
] })
|
|
38681
|
+
] }),
|
|
38682
|
+
/* @__PURE__ */ jsx132("div", { className: "border-b border-gray300" }),
|
|
38683
|
+
loading ? /* @__PURE__ */ jsxs90("div", { className: "flex flex-col items-center justify-center py-16 gap-3", children: [
|
|
38684
|
+
/* @__PURE__ */ jsx132("div", { className: "w-8 h-8 border-3 border-purple100 border-t-transparent rounded-full animate-spin" }),
|
|
38685
|
+
/* @__PURE__ */ jsx132("p", { className: "text-sm text-gray600", children: "Fetching Creators" })
|
|
38686
|
+
] }) : /* @__PURE__ */ jsx132(CreatorDisplay, { creators, isValidationComplete: version !== void 0 })
|
|
38687
|
+
] })
|
|
38688
|
+
},
|
|
38689
|
+
"creator-panel"
|
|
38690
|
+
)
|
|
38691
|
+
] }) }),
|
|
38692
|
+
document.body
|
|
38693
|
+
);
|
|
36927
38694
|
}
|
|
36928
38695
|
|
|
36929
38696
|
// src/molecules/creator-discovery/CreatorWidget/useCreatorWidgetPolling.ts
|
|
36930
|
-
import { useState as
|
|
38697
|
+
import { useState as useState16, useEffect as useEffect11, useCallback as useCallback6, useMemo as useMemo10, useRef as useRef7 } from "react";
|
|
36931
38698
|
var DEFAULT_POLLING_CONFIG = {
|
|
36932
38699
|
pollInterval: 5e3,
|
|
36933
38700
|
maxDuration: 15 * 60 * 1e3,
|
|
@@ -36937,27 +38704,29 @@ var DEFAULT_POLLING_CONFIG = {
|
|
|
36937
38704
|
function useCreatorWidgetPolling({
|
|
36938
38705
|
sessionId,
|
|
36939
38706
|
currentVersion,
|
|
36940
|
-
fetchVersions,
|
|
36941
|
-
fetchStatus,
|
|
38707
|
+
fetchVersions: fetchVersionsProp,
|
|
38708
|
+
fetchStatus: fetchStatusProp,
|
|
36942
38709
|
pollingConfig,
|
|
36943
38710
|
onStatusChange
|
|
36944
38711
|
}) {
|
|
36945
|
-
const
|
|
38712
|
+
const fetchVersions = fetchVersionsProp ?? defaultFetchVersions;
|
|
38713
|
+
const fetchStatus = fetchStatusProp ?? defaultFetchStatus;
|
|
38714
|
+
const config = useMemo10(
|
|
36946
38715
|
() => ({ ...DEFAULT_POLLING_CONFIG, ...pollingConfig }),
|
|
36947
38716
|
[pollingConfig]
|
|
36948
38717
|
);
|
|
36949
|
-
const [versionData, setVersionData] =
|
|
36950
|
-
const [totalVersions, setTotalVersions] =
|
|
36951
|
-
const [selectedVersion, setSelectedVersion] =
|
|
36952
|
-
const [isLoadingVersion, setIsLoadingVersion] =
|
|
36953
|
-
const [isValidationComplete, setIsValidationComplete] =
|
|
36954
|
-
const [versionStatus, setVersionStatus] =
|
|
36955
|
-
const [statusDetails, setStatusDetails] =
|
|
36956
|
-
const [timeDisplay, setTimeDisplay] =
|
|
36957
|
-
const [loadingStatus, setLoadingStatus] =
|
|
36958
|
-
const remainingTimeRef =
|
|
38718
|
+
const [versionData, setVersionData] = useState16(null);
|
|
38719
|
+
const [totalVersions, setTotalVersions] = useState16(0);
|
|
38720
|
+
const [selectedVersion, setSelectedVersion] = useState16();
|
|
38721
|
+
const [isLoadingVersion, setIsLoadingVersion] = useState16(false);
|
|
38722
|
+
const [isValidationComplete, setIsValidationComplete] = useState16(false);
|
|
38723
|
+
const [versionStatus, setVersionStatus] = useState16("checking");
|
|
38724
|
+
const [statusDetails, setStatusDetails] = useState16();
|
|
38725
|
+
const [timeDisplay, setTimeDisplay] = useState16("");
|
|
38726
|
+
const [loadingStatus, setLoadingStatus] = useState16(true);
|
|
38727
|
+
const remainingTimeRef = useRef7(0);
|
|
36959
38728
|
const requestedVersion = selectedVersion ?? currentVersion ?? versionData?.currentVersion;
|
|
36960
|
-
const fetchVersionData =
|
|
38729
|
+
const fetchVersionData = useCallback6(async () => {
|
|
36961
38730
|
if (!sessionId) return;
|
|
36962
38731
|
if (!versionData) setIsLoadingVersion(true);
|
|
36963
38732
|
try {
|
|
@@ -36978,17 +38747,17 @@ function useCreatorWidgetPolling({
|
|
|
36978
38747
|
setIsLoadingVersion(false);
|
|
36979
38748
|
}
|
|
36980
38749
|
}, [sessionId, requestedVersion, isValidationComplete, fetchVersions, versionData]);
|
|
36981
|
-
|
|
38750
|
+
useEffect11(() => {
|
|
36982
38751
|
fetchVersionData();
|
|
36983
38752
|
}, [sessionId, requestedVersion, isValidationComplete]);
|
|
36984
|
-
|
|
38753
|
+
useEffect11(() => {
|
|
36985
38754
|
if (totalVersions > 0 || !sessionId) return;
|
|
36986
38755
|
const interval = setInterval(() => {
|
|
36987
38756
|
if (totalVersions === 0) fetchVersionData();
|
|
36988
38757
|
}, config.pollInterval);
|
|
36989
38758
|
return () => clearInterval(interval);
|
|
36990
38759
|
}, [totalVersions, sessionId, fetchVersionData, config.pollInterval]);
|
|
36991
|
-
|
|
38760
|
+
useEffect11(() => {
|
|
36992
38761
|
if (!selectedVersion && !requestedVersion) return;
|
|
36993
38762
|
const activeVersion = selectedVersion ?? requestedVersion;
|
|
36994
38763
|
let isMounted = true;
|
|
@@ -37071,7 +38840,7 @@ function useCreatorWidgetPolling({
|
|
|
37071
38840
|
stopPolling();
|
|
37072
38841
|
};
|
|
37073
38842
|
}, [selectedVersion, requestedVersion, sessionId]);
|
|
37074
|
-
const versionNumbers =
|
|
38843
|
+
const versionNumbers = useMemo10(() => {
|
|
37075
38844
|
if (!totalVersions) return [];
|
|
37076
38845
|
return Array.from({ length: totalVersions }, (_, i) => i + 1);
|
|
37077
38846
|
}, [totalVersions]);
|
|
@@ -37098,18 +38867,20 @@ function useCreatorWidgetPolling({
|
|
|
37098
38867
|
}
|
|
37099
38868
|
|
|
37100
38869
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
|
|
37101
|
-
import { jsx as
|
|
38870
|
+
import { jsx as jsx133, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
37102
38871
|
function CreatorWidgetInner({
|
|
37103
38872
|
sessionId,
|
|
37104
38873
|
currentVersion,
|
|
37105
38874
|
isAgentOutput = false,
|
|
37106
38875
|
fetchVersions,
|
|
37107
38876
|
fetchStatus,
|
|
38877
|
+
fetchCreatorDetails,
|
|
37108
38878
|
pollingConfig,
|
|
37109
38879
|
onStatusChange,
|
|
37110
38880
|
onAction,
|
|
37111
38881
|
className
|
|
37112
38882
|
}) {
|
|
38883
|
+
const [isExpanded, setIsExpanded] = useState17(false);
|
|
37113
38884
|
const {
|
|
37114
38885
|
versionNumbers,
|
|
37115
38886
|
selectedVersion,
|
|
@@ -37130,11 +38901,12 @@ function CreatorWidgetInner({
|
|
|
37130
38901
|
pollingConfig,
|
|
37131
38902
|
onStatusChange
|
|
37132
38903
|
});
|
|
37133
|
-
const handleVersionSelect =
|
|
38904
|
+
const handleVersionSelect = useCallback7(
|
|
37134
38905
|
(version) => setSelectedVersion(version),
|
|
37135
38906
|
[setSelectedVersion]
|
|
37136
38907
|
);
|
|
37137
|
-
const handleViewCreators =
|
|
38908
|
+
const handleViewCreators = useCallback7(() => {
|
|
38909
|
+
setIsExpanded(true);
|
|
37138
38910
|
onAction?.({
|
|
37139
38911
|
type: "view-creators",
|
|
37140
38912
|
sessionId,
|
|
@@ -37143,30 +38915,41 @@ function CreatorWidgetInner({
|
|
|
37143
38915
|
searchSpec
|
|
37144
38916
|
});
|
|
37145
38917
|
}, [onAction, sessionId, creatorIds, selectedVersion, searchSpec]);
|
|
37146
|
-
|
|
37147
|
-
|
|
37148
|
-
|
|
37149
|
-
|
|
37150
|
-
|
|
37151
|
-
|
|
37152
|
-
|
|
37153
|
-
|
|
37154
|
-
|
|
37155
|
-
|
|
37156
|
-
|
|
37157
|
-
|
|
37158
|
-
|
|
37159
|
-
|
|
37160
|
-
|
|
37161
|
-
|
|
37162
|
-
|
|
37163
|
-
|
|
37164
|
-
|
|
38918
|
+
return /* @__PURE__ */ jsxs91("div", { className, children: [
|
|
38919
|
+
/* @__PURE__ */ jsx133(
|
|
38920
|
+
CreatorCompactView,
|
|
38921
|
+
{
|
|
38922
|
+
versions: versionNumbers,
|
|
38923
|
+
selectedVersion,
|
|
38924
|
+
creatorImages,
|
|
38925
|
+
creatorLength,
|
|
38926
|
+
isAgentOutput,
|
|
38927
|
+
onVersionSelect: handleVersionSelect,
|
|
38928
|
+
onViewCreators: handleViewCreators,
|
|
38929
|
+
versionStatus,
|
|
38930
|
+
statusDetails,
|
|
38931
|
+
timeDisplay,
|
|
38932
|
+
isLoading
|
|
38933
|
+
}
|
|
38934
|
+
),
|
|
38935
|
+
/* @__PURE__ */ jsx133(
|
|
38936
|
+
CreatorExpandedPanel,
|
|
38937
|
+
{
|
|
38938
|
+
isOpen: isExpanded,
|
|
38939
|
+
onClose: () => setIsExpanded(false),
|
|
38940
|
+
sessionId,
|
|
38941
|
+
creatorIds,
|
|
38942
|
+
version: selectedVersion,
|
|
38943
|
+
searchSpec,
|
|
38944
|
+
fetchCreatorDetails
|
|
38945
|
+
}
|
|
38946
|
+
)
|
|
38947
|
+
] });
|
|
37165
38948
|
}
|
|
37166
38949
|
var CreatorWidget = memo(CreatorWidgetInner);
|
|
37167
38950
|
|
|
37168
38951
|
// src/molecules/workstream-builder/ToolListCard/ToolListCard.tsx
|
|
37169
|
-
import { jsx as
|
|
38952
|
+
import { jsx as jsx134, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
37170
38953
|
var FONT_STYLE = {
|
|
37171
38954
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37172
38955
|
};
|
|
@@ -37237,7 +39020,7 @@ var ToolListCard = ({
|
|
|
37237
39020
|
grouped[cat].push(tool);
|
|
37238
39021
|
}
|
|
37239
39022
|
const categories = Object.keys(grouped);
|
|
37240
|
-
return /* @__PURE__ */
|
|
39023
|
+
return /* @__PURE__ */ jsxs92(
|
|
37241
39024
|
"div",
|
|
37242
39025
|
{
|
|
37243
39026
|
className: cn(
|
|
@@ -37246,34 +39029,34 @@ var ToolListCard = ({
|
|
|
37246
39029
|
),
|
|
37247
39030
|
style: FONT_STYLE,
|
|
37248
39031
|
children: [
|
|
37249
|
-
/* @__PURE__ */
|
|
37250
|
-
/* @__PURE__ */
|
|
37251
|
-
/* @__PURE__ */
|
|
37252
|
-
/* @__PURE__ */
|
|
39032
|
+
/* @__PURE__ */ jsxs92("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
|
|
39033
|
+
/* @__PURE__ */ jsx134("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx134(Wrench, { className: "w-3.5 h-3.5 text-interactive" }) }),
|
|
39034
|
+
/* @__PURE__ */ jsx134("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Available Tools" }),
|
|
39035
|
+
/* @__PURE__ */ jsx134("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: tools.length })
|
|
37253
39036
|
] }),
|
|
37254
|
-
/* @__PURE__ */
|
|
39037
|
+
/* @__PURE__ */ jsx134("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
|
|
37255
39038
|
const CatIcon = resolveCategoryIcon(cat);
|
|
37256
39039
|
const headerBg = CATEGORY_HEADER_BG[cat.toLowerCase()] || CATEGORY_HEADER_BG.general;
|
|
37257
|
-
return /* @__PURE__ */
|
|
37258
|
-
/* @__PURE__ */
|
|
37259
|
-
/* @__PURE__ */
|
|
37260
|
-
/* @__PURE__ */
|
|
37261
|
-
/* @__PURE__ */
|
|
39040
|
+
return /* @__PURE__ */ jsxs92("div", { className: "px-4 py-3", children: [
|
|
39041
|
+
/* @__PURE__ */ jsxs92("div", { className: cn("flex items-center gap-2 mb-2.5 -mx-4 px-4 py-1.5", headerBg), children: [
|
|
39042
|
+
/* @__PURE__ */ jsx134(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
|
|
39043
|
+
/* @__PURE__ */ jsx134("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
|
|
39044
|
+
/* @__PURE__ */ jsx134("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
|
|
37262
39045
|
] }),
|
|
37263
|
-
/* @__PURE__ */
|
|
39046
|
+
/* @__PURE__ */ jsx134("div", { className: "space-y-1.5", children: grouped[cat].map((tool) => {
|
|
37264
39047
|
const ToolIcon = resolveIcon(tool);
|
|
37265
|
-
return /* @__PURE__ */
|
|
39048
|
+
return /* @__PURE__ */ jsxs92(
|
|
37266
39049
|
"div",
|
|
37267
39050
|
{
|
|
37268
39051
|
className: "group flex items-start gap-3 px-3 py-2 rounded-lg hover:bg-[var(--foreground)]/[0.03] transition-colors",
|
|
37269
39052
|
children: [
|
|
37270
|
-
/* @__PURE__ */
|
|
37271
|
-
/* @__PURE__ */
|
|
37272
|
-
/* @__PURE__ */
|
|
37273
|
-
tool.display_name && tool.display_name !== tool.name && /* @__PURE__ */
|
|
37274
|
-
/* @__PURE__ */
|
|
39053
|
+
/* @__PURE__ */ jsx134("div", { className: "shrink-0 mt-0.5 w-5 h-5 rounded flex items-center justify-center bg-interactive/[0.08]", children: /* @__PURE__ */ jsx134(ToolIcon, { className: "w-3 h-3 text-interactive/60" }) }),
|
|
39054
|
+
/* @__PURE__ */ jsxs92("div", { className: "flex-1 min-w-0", children: [
|
|
39055
|
+
/* @__PURE__ */ jsxs92("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
39056
|
+
tool.display_name && tool.display_name !== tool.name && /* @__PURE__ */ jsx134("span", { className: "text-[13px] font-medium text-[var(--foreground)] truncate max-w-full", children: tool.display_name }),
|
|
39057
|
+
/* @__PURE__ */ jsx134("span", { className: "text-[11px] font-mono px-1.5 py-0.5 rounded bg-[var(--foreground)]/[0.06] text-[var(--foreground)]/50 border border-[var(--foreground)]/[0.06] truncate", children: tool.name })
|
|
37275
39058
|
] }),
|
|
37276
|
-
tool.description && /* @__PURE__ */
|
|
39059
|
+
tool.description && /* @__PURE__ */ jsx134("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed mt-0.5 break-words whitespace-normal", children: tool.description })
|
|
37277
39060
|
] })
|
|
37278
39061
|
]
|
|
37279
39062
|
},
|
|
@@ -37288,8 +39071,8 @@ var ToolListCard = ({
|
|
|
37288
39071
|
};
|
|
37289
39072
|
|
|
37290
39073
|
// src/molecules/workstream-builder/AgentCard/AgentCard.tsx
|
|
37291
|
-
import { useState as
|
|
37292
|
-
import { Fragment as
|
|
39074
|
+
import { useState as useState18, useCallback as useCallback8 } from "react";
|
|
39075
|
+
import { Fragment as Fragment9, jsx as jsx135, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
37293
39076
|
var FONT_STYLE2 = {
|
|
37294
39077
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37295
39078
|
};
|
|
@@ -37300,15 +39083,15 @@ var AgentCard = ({
|
|
|
37300
39083
|
onSave,
|
|
37301
39084
|
className
|
|
37302
39085
|
}) => {
|
|
37303
|
-
const [isEditing, setIsEditing] =
|
|
37304
|
-
const [isSaving, setIsSaving] =
|
|
37305
|
-
const [editState, setEditState] =
|
|
39086
|
+
const [isEditing, setIsEditing] = useState18(false);
|
|
39087
|
+
const [isSaving, setIsSaving] = useState18(false);
|
|
39088
|
+
const [editState, setEditState] = useState18({
|
|
37306
39089
|
display_name: agent.display_name,
|
|
37307
39090
|
description: agent.description,
|
|
37308
39091
|
image: agent.image || ""
|
|
37309
39092
|
});
|
|
37310
39093
|
const avatarUrl = agent.image || `https://api.dicebear.com/7.x/avataaars/svg?seed=${agent.name}`;
|
|
37311
|
-
const handleEdit =
|
|
39094
|
+
const handleEdit = useCallback8(() => {
|
|
37312
39095
|
setEditState({
|
|
37313
39096
|
display_name: agent.display_name,
|
|
37314
39097
|
description: agent.description,
|
|
@@ -37316,10 +39099,10 @@ var AgentCard = ({
|
|
|
37316
39099
|
});
|
|
37317
39100
|
setIsEditing(true);
|
|
37318
39101
|
}, [agent]);
|
|
37319
|
-
const handleCancel =
|
|
39102
|
+
const handleCancel = useCallback8(() => {
|
|
37320
39103
|
setIsEditing(false);
|
|
37321
39104
|
}, []);
|
|
37322
|
-
const handleSave =
|
|
39105
|
+
const handleSave = useCallback8(async () => {
|
|
37323
39106
|
if (!onSave) return;
|
|
37324
39107
|
const updates = {};
|
|
37325
39108
|
if (editState.display_name !== agent.display_name)
|
|
@@ -37343,7 +39126,7 @@ var AgentCard = ({
|
|
|
37343
39126
|
}
|
|
37344
39127
|
}, [onSave, agent, editState]);
|
|
37345
39128
|
if (compact) {
|
|
37346
|
-
return /* @__PURE__ */
|
|
39129
|
+
return /* @__PURE__ */ jsxs93(
|
|
37347
39130
|
"div",
|
|
37348
39131
|
{
|
|
37349
39132
|
className: cn(
|
|
@@ -37352,14 +39135,14 @@ var AgentCard = ({
|
|
|
37352
39135
|
),
|
|
37353
39136
|
style: FONT_STYLE2,
|
|
37354
39137
|
children: [
|
|
37355
|
-
/* @__PURE__ */
|
|
37356
|
-
/* @__PURE__ */
|
|
37357
|
-
/* @__PURE__ */
|
|
39138
|
+
/* @__PURE__ */ jsxs93(Avatar, { className: "h-8 w-8 shrink-0", children: [
|
|
39139
|
+
/* @__PURE__ */ jsx135(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
|
|
39140
|
+
/* @__PURE__ */ jsx135(AvatarFallback, { className: "bg-interactive/10 text-interactive text-xs font-bold", children: agent.display_name.charAt(0) })
|
|
37358
39141
|
] }),
|
|
37359
|
-
/* @__PURE__ */
|
|
37360
|
-
/* @__PURE__ */
|
|
37361
|
-
/* @__PURE__ */
|
|
37362
|
-
/* @__PURE__ */
|
|
39142
|
+
/* @__PURE__ */ jsxs93("div", { className: "flex-1 min-w-0", children: [
|
|
39143
|
+
/* @__PURE__ */ jsxs93("div", { className: "flex items-center gap-2", children: [
|
|
39144
|
+
/* @__PURE__ */ jsx135("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
|
|
39145
|
+
/* @__PURE__ */ jsxs93(
|
|
37363
39146
|
"span",
|
|
37364
39147
|
{
|
|
37365
39148
|
className: cn(
|
|
@@ -37367,7 +39150,7 @@ var AgentCard = ({
|
|
|
37367
39150
|
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37368
39151
|
),
|
|
37369
39152
|
children: [
|
|
37370
|
-
/* @__PURE__ */
|
|
39153
|
+
/* @__PURE__ */ jsx135("span", { className: cn(
|
|
37371
39154
|
"w-1.5 h-1.5 rounded-full",
|
|
37372
39155
|
agent.enabled ? "bg-emerald-500" : "bg-red-500"
|
|
37373
39156
|
) }),
|
|
@@ -37376,13 +39159,13 @@ var AgentCard = ({
|
|
|
37376
39159
|
}
|
|
37377
39160
|
)
|
|
37378
39161
|
] }),
|
|
37379
|
-
/* @__PURE__ */
|
|
39162
|
+
/* @__PURE__ */ jsx135("p", { className: "text-[var(--foreground)]/50 text-xs truncate", children: agent.description })
|
|
37380
39163
|
] })
|
|
37381
39164
|
]
|
|
37382
39165
|
}
|
|
37383
39166
|
);
|
|
37384
39167
|
}
|
|
37385
|
-
return /* @__PURE__ */
|
|
39168
|
+
return /* @__PURE__ */ jsxs93(
|
|
37386
39169
|
"div",
|
|
37387
39170
|
{
|
|
37388
39171
|
className: cn(
|
|
@@ -37391,14 +39174,14 @@ var AgentCard = ({
|
|
|
37391
39174
|
),
|
|
37392
39175
|
style: FONT_STYLE2,
|
|
37393
39176
|
children: [
|
|
37394
|
-
/* @__PURE__ */
|
|
37395
|
-
/* @__PURE__ */
|
|
37396
|
-
/* @__PURE__ */
|
|
37397
|
-
/* @__PURE__ */
|
|
39177
|
+
/* @__PURE__ */ jsxs93("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
|
|
39178
|
+
/* @__PURE__ */ jsxs93(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
|
|
39179
|
+
/* @__PURE__ */ jsx135(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
|
|
39180
|
+
/* @__PURE__ */ jsx135(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
|
|
37398
39181
|
] }),
|
|
37399
|
-
/* @__PURE__ */
|
|
37400
|
-
/* @__PURE__ */
|
|
37401
|
-
isEditing ? /* @__PURE__ */
|
|
39182
|
+
/* @__PURE__ */ jsxs93("div", { className: "flex-1 min-w-0", children: [
|
|
39183
|
+
/* @__PURE__ */ jsxs93("div", { className: "flex items-center gap-2", children: [
|
|
39184
|
+
isEditing ? /* @__PURE__ */ jsx135(
|
|
37402
39185
|
"input",
|
|
37403
39186
|
{
|
|
37404
39187
|
type: "text",
|
|
@@ -37408,9 +39191,9 @@ var AgentCard = ({
|
|
|
37408
39191
|
className: "flex-1 bg-transparent border-b border-interactive/30 text-sm font-semibold text-foreground outline-none focus:border-interactive transition-all",
|
|
37409
39192
|
placeholder: "Agent name"
|
|
37410
39193
|
}
|
|
37411
|
-
) : /* @__PURE__ */
|
|
37412
|
-
/* @__PURE__ */
|
|
37413
|
-
/* @__PURE__ */
|
|
39194
|
+
) : /* @__PURE__ */ jsx135("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
|
|
39195
|
+
/* @__PURE__ */ jsx135("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: agent.name }),
|
|
39196
|
+
/* @__PURE__ */ jsxs93(
|
|
37414
39197
|
"span",
|
|
37415
39198
|
{
|
|
37416
39199
|
className: cn(
|
|
@@ -37418,7 +39201,7 @@ var AgentCard = ({
|
|
|
37418
39201
|
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37419
39202
|
),
|
|
37420
39203
|
children: [
|
|
37421
|
-
/* @__PURE__ */
|
|
39204
|
+
/* @__PURE__ */ jsx135("span", { className: cn(
|
|
37422
39205
|
"w-1.5 h-1.5 rounded-full",
|
|
37423
39206
|
agent.enabled ? "bg-emerald-500" : "bg-red-500"
|
|
37424
39207
|
) }),
|
|
@@ -37427,7 +39210,7 @@ var AgentCard = ({
|
|
|
37427
39210
|
}
|
|
37428
39211
|
)
|
|
37429
39212
|
] }),
|
|
37430
|
-
/* @__PURE__ */
|
|
39213
|
+
/* @__PURE__ */ jsx135("div", { className: "mt-1", children: isEditing ? /* @__PURE__ */ jsx135(
|
|
37431
39214
|
"textarea",
|
|
37432
39215
|
{
|
|
37433
39216
|
value: editState.description,
|
|
@@ -37437,10 +39220,10 @@ var AgentCard = ({
|
|
|
37437
39220
|
rows: 2,
|
|
37438
39221
|
placeholder: "Describe this agent..."
|
|
37439
39222
|
}
|
|
37440
|
-
) : /* @__PURE__ */
|
|
37441
|
-
isEditing && /* @__PURE__ */
|
|
37442
|
-
/* @__PURE__ */
|
|
37443
|
-
/* @__PURE__ */
|
|
39223
|
+
) : /* @__PURE__ */ jsx135("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-normal", children: agent.description }) }),
|
|
39224
|
+
isEditing && /* @__PURE__ */ jsxs93("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
39225
|
+
/* @__PURE__ */ jsx135("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
|
|
39226
|
+
/* @__PURE__ */ jsx135(
|
|
37444
39227
|
"input",
|
|
37445
39228
|
{
|
|
37446
39229
|
type: "text",
|
|
@@ -37453,8 +39236,8 @@ var AgentCard = ({
|
|
|
37453
39236
|
)
|
|
37454
39237
|
] })
|
|
37455
39238
|
] }),
|
|
37456
|
-
editable && onSave && /* @__PURE__ */
|
|
37457
|
-
/* @__PURE__ */
|
|
39239
|
+
editable && onSave && /* @__PURE__ */ jsx135("div", { className: "flex items-center gap-1.5 shrink-0", children: isEditing ? /* @__PURE__ */ jsxs93(Fragment9, { children: [
|
|
39240
|
+
/* @__PURE__ */ jsx135(
|
|
37458
39241
|
"button",
|
|
37459
39242
|
{
|
|
37460
39243
|
onClick: handleCancel,
|
|
@@ -37463,7 +39246,7 @@ var AgentCard = ({
|
|
|
37463
39246
|
children: "Cancel"
|
|
37464
39247
|
}
|
|
37465
39248
|
),
|
|
37466
|
-
/* @__PURE__ */
|
|
39249
|
+
/* @__PURE__ */ jsx135(
|
|
37467
39250
|
"button",
|
|
37468
39251
|
{
|
|
37469
39252
|
onClick: handleSave,
|
|
@@ -37472,7 +39255,7 @@ var AgentCard = ({
|
|
|
37472
39255
|
children: isSaving ? "Saving..." : "Save"
|
|
37473
39256
|
}
|
|
37474
39257
|
)
|
|
37475
|
-
] }) : /* @__PURE__ */
|
|
39258
|
+
] }) : /* @__PURE__ */ jsx135(
|
|
37476
39259
|
"button",
|
|
37477
39260
|
{
|
|
37478
39261
|
onClick: handleEdit,
|
|
@@ -37481,18 +39264,18 @@ var AgentCard = ({
|
|
|
37481
39264
|
}
|
|
37482
39265
|
) })
|
|
37483
39266
|
] }),
|
|
37484
|
-
/* @__PURE__ */
|
|
39267
|
+
/* @__PURE__ */ jsx135("div", { className: "flex flex-wrap items-center gap-3 px-5 pb-3 text-xs", children: /* @__PURE__ */ jsxs93("span", { className: "text-[var(--foreground)]/40", children: [
|
|
37485
39268
|
"Model:",
|
|
37486
39269
|
" ",
|
|
37487
|
-
/* @__PURE__ */
|
|
39270
|
+
/* @__PURE__ */ jsx135("span", { className: "font-mono text-[var(--foreground)]/70", children: agent.model })
|
|
37488
39271
|
] }) }),
|
|
37489
|
-
agent.tools && agent.tools.length > 0 && /* @__PURE__ */
|
|
37490
|
-
/* @__PURE__ */
|
|
39272
|
+
agent.tools && agent.tools.length > 0 && /* @__PURE__ */ jsxs93("div", { className: "border-t border-[var(--border-color)] px-5 py-3", children: [
|
|
39273
|
+
/* @__PURE__ */ jsxs93("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-2", children: [
|
|
37491
39274
|
"Tools (",
|
|
37492
39275
|
agent.tools.length,
|
|
37493
39276
|
")"
|
|
37494
39277
|
] }),
|
|
37495
|
-
/* @__PURE__ */
|
|
39278
|
+
/* @__PURE__ */ jsx135("div", { className: "flex flex-wrap gap-1.5", children: agent.tools.map((tool) => /* @__PURE__ */ jsx135(
|
|
37496
39279
|
"span",
|
|
37497
39280
|
{
|
|
37498
39281
|
className: "text-[11px] px-2 py-0.5 rounded-md bg-interactive/10 text-interactive font-mono border border-interactive/20",
|
|
@@ -37507,7 +39290,7 @@ var AgentCard = ({
|
|
|
37507
39290
|
};
|
|
37508
39291
|
|
|
37509
39292
|
// src/molecules/workstream-builder/AgentDataTable/AgentDataTable.tsx
|
|
37510
|
-
import { jsx as
|
|
39293
|
+
import { jsx as jsx136, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
37511
39294
|
var FONT_STYLE3 = {
|
|
37512
39295
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37513
39296
|
};
|
|
@@ -37518,7 +39301,7 @@ var AgentDataTable = ({
|
|
|
37518
39301
|
}) => {
|
|
37519
39302
|
const renderCell = (value) => {
|
|
37520
39303
|
if (typeof value === "boolean") {
|
|
37521
|
-
return /* @__PURE__ */
|
|
39304
|
+
return /* @__PURE__ */ jsxs94(
|
|
37522
39305
|
"span",
|
|
37523
39306
|
{
|
|
37524
39307
|
className: cn(
|
|
@@ -37526,18 +39309,18 @@ var AgentDataTable = ({
|
|
|
37526
39309
|
value ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37527
39310
|
),
|
|
37528
39311
|
children: [
|
|
37529
|
-
value ? /* @__PURE__ */
|
|
37530
|
-
/* @__PURE__ */
|
|
37531
|
-
/* @__PURE__ */
|
|
39312
|
+
value ? /* @__PURE__ */ jsx136("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx136("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxs94("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
39313
|
+
/* @__PURE__ */ jsx136("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
39314
|
+
/* @__PURE__ */ jsx136("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
37532
39315
|
] }),
|
|
37533
39316
|
value ? "Yes" : "No"
|
|
37534
39317
|
]
|
|
37535
39318
|
}
|
|
37536
39319
|
);
|
|
37537
39320
|
}
|
|
37538
|
-
return /* @__PURE__ */
|
|
39321
|
+
return /* @__PURE__ */ jsx136("span", { className: "text-[var(--foreground)]", children: String(value) });
|
|
37539
39322
|
};
|
|
37540
|
-
return /* @__PURE__ */
|
|
39323
|
+
return /* @__PURE__ */ jsx136(
|
|
37541
39324
|
"div",
|
|
37542
39325
|
{
|
|
37543
39326
|
className: cn(
|
|
@@ -37545,8 +39328,8 @@ var AgentDataTable = ({
|
|
|
37545
39328
|
className
|
|
37546
39329
|
),
|
|
37547
39330
|
style: FONT_STYLE3,
|
|
37548
|
-
children: /* @__PURE__ */
|
|
37549
|
-
/* @__PURE__ */
|
|
39331
|
+
children: /* @__PURE__ */ jsx136("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs94("table", { className: "w-full text-xs", children: [
|
|
39332
|
+
/* @__PURE__ */ jsx136("thead", { children: /* @__PURE__ */ jsx136("tr", { className: "border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: headers.map((header) => /* @__PURE__ */ jsx136(
|
|
37550
39333
|
"th",
|
|
37551
39334
|
{
|
|
37552
39335
|
className: "text-left px-4 py-2.5 text-[11px] font-semibold text-[var(--foreground)]/60 uppercase tracking-wide whitespace-nowrap",
|
|
@@ -37554,14 +39337,14 @@ var AgentDataTable = ({
|
|
|
37554
39337
|
},
|
|
37555
39338
|
header
|
|
37556
39339
|
)) }) }),
|
|
37557
|
-
/* @__PURE__ */
|
|
39340
|
+
/* @__PURE__ */ jsx136("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ jsx136(
|
|
37558
39341
|
"tr",
|
|
37559
39342
|
{
|
|
37560
39343
|
className: cn(
|
|
37561
39344
|
"border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.03] transition-colors",
|
|
37562
39345
|
rowIdx % 2 === 1 && "bg-[var(--foreground)]/[0.015]"
|
|
37563
39346
|
),
|
|
37564
|
-
children: row.map((cell, cellIdx) => /* @__PURE__ */
|
|
39347
|
+
children: row.map((cell, cellIdx) => /* @__PURE__ */ jsx136(
|
|
37565
39348
|
"td",
|
|
37566
39349
|
{
|
|
37567
39350
|
className: "px-4 py-2.5 text-xs whitespace-nowrap",
|
|
@@ -37578,8 +39361,8 @@ var AgentDataTable = ({
|
|
|
37578
39361
|
};
|
|
37579
39362
|
|
|
37580
39363
|
// src/molecules/workstream-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
|
|
37581
|
-
import { useState as
|
|
37582
|
-
import { jsx as
|
|
39364
|
+
import { useState as useState19 } from "react";
|
|
39365
|
+
import { jsx as jsx137, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
37583
39366
|
var FONT_STYLE4 = {
|
|
37584
39367
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37585
39368
|
};
|
|
@@ -37587,10 +39370,10 @@ var WorkflowVisualizer = ({
|
|
|
37587
39370
|
steps,
|
|
37588
39371
|
className
|
|
37589
39372
|
}) => {
|
|
37590
|
-
const [expandedStep, setExpandedStep] =
|
|
39373
|
+
const [expandedStep, setExpandedStep] = useState19(
|
|
37591
39374
|
steps[0]?.id || null
|
|
37592
39375
|
);
|
|
37593
|
-
return /* @__PURE__ */
|
|
39376
|
+
return /* @__PURE__ */ jsxs95(
|
|
37594
39377
|
"div",
|
|
37595
39378
|
{
|
|
37596
39379
|
className: cn(
|
|
@@ -37599,8 +39382,8 @@ var WorkflowVisualizer = ({
|
|
|
37599
39382
|
),
|
|
37600
39383
|
style: FONT_STYLE4,
|
|
37601
39384
|
children: [
|
|
37602
|
-
/* @__PURE__ */
|
|
37603
|
-
/* @__PURE__ */
|
|
39385
|
+
/* @__PURE__ */ jsxs95("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
|
|
39386
|
+
/* @__PURE__ */ jsx137("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx137(
|
|
37604
39387
|
"svg",
|
|
37605
39388
|
{
|
|
37606
39389
|
width: "14",
|
|
@@ -37612,24 +39395,24 @@ var WorkflowVisualizer = ({
|
|
|
37612
39395
|
className: "text-interactive",
|
|
37613
39396
|
strokeLinecap: "round",
|
|
37614
39397
|
strokeLinejoin: "round",
|
|
37615
|
-
children: /* @__PURE__ */
|
|
39398
|
+
children: /* @__PURE__ */ jsx137("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
|
|
37616
39399
|
}
|
|
37617
39400
|
) }),
|
|
37618
|
-
/* @__PURE__ */
|
|
37619
|
-
/* @__PURE__ */
|
|
39401
|
+
/* @__PURE__ */ jsx137("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Workflow" }),
|
|
39402
|
+
/* @__PURE__ */ jsxs95("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: [
|
|
37620
39403
|
steps.length,
|
|
37621
39404
|
" steps"
|
|
37622
39405
|
] })
|
|
37623
39406
|
] }),
|
|
37624
|
-
/* @__PURE__ */
|
|
39407
|
+
/* @__PURE__ */ jsx137("div", { className: "px-4 py-3", children: steps.map((step, idx) => {
|
|
37625
39408
|
const isLast = idx === steps.length - 1;
|
|
37626
39409
|
const isExpanded = expandedStep === step.id;
|
|
37627
|
-
return /* @__PURE__ */
|
|
37628
|
-
/* @__PURE__ */
|
|
37629
|
-
/* @__PURE__ */
|
|
37630
|
-
!isLast && /* @__PURE__ */
|
|
39410
|
+
return /* @__PURE__ */ jsxs95("div", { className: "flex gap-3", children: [
|
|
39411
|
+
/* @__PURE__ */ jsxs95("div", { className: "flex flex-col items-center shrink-0", children: [
|
|
39412
|
+
/* @__PURE__ */ jsx137("div", { className: "w-7 h-7 rounded-full bg-interactive/10 border-2 border-interactive/30 flex items-center justify-center", children: /* @__PURE__ */ jsx137("span", { className: "text-[10px] font-bold text-interactive", children: idx + 1 }) }),
|
|
39413
|
+
!isLast && /* @__PURE__ */ jsx137("div", { className: "w-0.5 flex-1 min-h-[16px] bg-interactive/15" })
|
|
37631
39414
|
] }),
|
|
37632
|
-
/* @__PURE__ */
|
|
39415
|
+
/* @__PURE__ */ jsxs95(
|
|
37633
39416
|
"div",
|
|
37634
39417
|
{
|
|
37635
39418
|
className: cn(
|
|
@@ -37637,14 +39420,14 @@ var WorkflowVisualizer = ({
|
|
|
37637
39420
|
isExpanded ? "bg-[var(--foreground)]/[0.02] shadow-sm" : "hover:bg-[var(--foreground)]/[0.02] hover:shadow-sm hover:-translate-y-0.5"
|
|
37638
39421
|
),
|
|
37639
39422
|
children: [
|
|
37640
|
-
/* @__PURE__ */
|
|
39423
|
+
/* @__PURE__ */ jsxs95(
|
|
37641
39424
|
"button",
|
|
37642
39425
|
{
|
|
37643
39426
|
onClick: () => setExpandedStep(isExpanded ? null : step.id),
|
|
37644
39427
|
className: "w-full text-left px-3 py-2.5 flex items-center gap-2 whitespace-normal",
|
|
37645
39428
|
children: [
|
|
37646
|
-
/* @__PURE__ */
|
|
37647
|
-
/* @__PURE__ */
|
|
39429
|
+
/* @__PURE__ */ jsx137("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx137("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }) }),
|
|
39430
|
+
/* @__PURE__ */ jsx137(
|
|
37648
39431
|
"svg",
|
|
37649
39432
|
{
|
|
37650
39433
|
width: "12",
|
|
@@ -37657,28 +39440,28 @@ var WorkflowVisualizer = ({
|
|
|
37657
39440
|
"shrink-0 text-[var(--foreground)]/30 transition-transform",
|
|
37658
39441
|
isExpanded && "rotate-180"
|
|
37659
39442
|
),
|
|
37660
|
-
children: /* @__PURE__ */
|
|
39443
|
+
children: /* @__PURE__ */ jsx137("polyline", { points: "6 9 12 15 18 9" })
|
|
37661
39444
|
}
|
|
37662
39445
|
)
|
|
37663
39446
|
]
|
|
37664
39447
|
}
|
|
37665
39448
|
),
|
|
37666
|
-
isExpanded && /* @__PURE__ */
|
|
37667
|
-
step.description && /* @__PURE__ */
|
|
37668
|
-
step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */
|
|
39449
|
+
isExpanded && /* @__PURE__ */ jsxs95("div", { className: "px-3 pb-3 space-y-2.5", children: [
|
|
39450
|
+
step.description && /* @__PURE__ */ jsx137("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed whitespace-normal", children: step.description }),
|
|
39451
|
+
step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */ jsx137("div", { className: "space-y-1", children: step.sub_steps.map((sub) => /* @__PURE__ */ jsxs95(
|
|
37669
39452
|
"div",
|
|
37670
39453
|
{
|
|
37671
39454
|
className: "flex items-start gap-2 text-xs",
|
|
37672
39455
|
children: [
|
|
37673
|
-
/* @__PURE__ */
|
|
37674
|
-
/* @__PURE__ */
|
|
39456
|
+
/* @__PURE__ */ jsx137("span", { className: "shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-interactive/40" }),
|
|
39457
|
+
/* @__PURE__ */ jsx137("span", { className: "text-[var(--foreground)]/60", children: sub.action })
|
|
37675
39458
|
]
|
|
37676
39459
|
},
|
|
37677
39460
|
sub.id
|
|
37678
39461
|
)) }),
|
|
37679
|
-
step.tools && step.tools.length > 0 && /* @__PURE__ */
|
|
37680
|
-
/* @__PURE__ */
|
|
37681
|
-
step.tools.map((tool) => /* @__PURE__ */
|
|
39462
|
+
step.tools && step.tools.length > 0 && /* @__PURE__ */ jsxs95("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
|
|
39463
|
+
/* @__PURE__ */ jsx137("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold tracking-wider", children: "Tools:" }),
|
|
39464
|
+
step.tools.map((tool) => /* @__PURE__ */ jsx137(
|
|
37682
39465
|
"span",
|
|
37683
39466
|
{
|
|
37684
39467
|
className: "text-[10px] font-mono px-1.5 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
|
|
@@ -37687,9 +39470,9 @@ var WorkflowVisualizer = ({
|
|
|
37687
39470
|
tool
|
|
37688
39471
|
))
|
|
37689
39472
|
] }),
|
|
37690
|
-
step.on_failure && /* @__PURE__ */
|
|
37691
|
-
/* @__PURE__ */
|
|
37692
|
-
/* @__PURE__ */
|
|
39473
|
+
step.on_failure && /* @__PURE__ */ jsxs95("div", { className: "flex items-start gap-2 text-xs bg-[var(--redBackground,_#ef4444)]/[0.06] border border-[var(--redText,_#ef4444)]/10 rounded-md px-2.5 py-2 whitespace-normal", children: [
|
|
39474
|
+
/* @__PURE__ */ jsx137("span", { className: "shrink-0 text-[10px] font-semibold text-[var(--redText,_#ef4444)]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
|
|
39475
|
+
/* @__PURE__ */ jsx137("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
|
|
37693
39476
|
] })
|
|
37694
39477
|
] })
|
|
37695
39478
|
]
|
|
@@ -37703,8 +39486,8 @@ var WorkflowVisualizer = ({
|
|
|
37703
39486
|
};
|
|
37704
39487
|
|
|
37705
39488
|
// src/molecules/workstream-builder/InstructionPreview/InstructionPreview.tsx
|
|
37706
|
-
import { useState as
|
|
37707
|
-
import { jsx as
|
|
39489
|
+
import { useState as useState20, useCallback as useCallback9 } from "react";
|
|
39490
|
+
import { jsx as jsx138, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
37708
39491
|
var FONT_STYLE5 = {
|
|
37709
39492
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37710
39493
|
};
|
|
@@ -37716,12 +39499,12 @@ var InstructionPreview = ({
|
|
|
37716
39499
|
tools,
|
|
37717
39500
|
className
|
|
37718
39501
|
}) => {
|
|
37719
|
-
const [isExpanded, setIsExpanded] =
|
|
37720
|
-
const [copied, setCopied] =
|
|
39502
|
+
const [isExpanded, setIsExpanded] = useState20(false);
|
|
39503
|
+
const [copied, setCopied] = useState20(false);
|
|
37721
39504
|
const previewLength = 300;
|
|
37722
39505
|
const isLong = instruction.length > previewLength;
|
|
37723
39506
|
const displayText = isExpanded || !isLong ? instruction : instruction.slice(0, previewLength) + "...";
|
|
37724
|
-
const handleCopy =
|
|
39507
|
+
const handleCopy = useCallback9(async () => {
|
|
37725
39508
|
try {
|
|
37726
39509
|
await navigator.clipboard.writeText(instruction);
|
|
37727
39510
|
setCopied(true);
|
|
@@ -37739,7 +39522,7 @@ var InstructionPreview = ({
|
|
|
37739
39522
|
setTimeout(() => setCopied(false), 2e3);
|
|
37740
39523
|
}
|
|
37741
39524
|
}, [instruction]);
|
|
37742
|
-
return /* @__PURE__ */
|
|
39525
|
+
return /* @__PURE__ */ jsxs96(
|
|
37743
39526
|
"div",
|
|
37744
39527
|
{
|
|
37745
39528
|
className: cn(
|
|
@@ -37748,8 +39531,8 @@ var InstructionPreview = ({
|
|
|
37748
39531
|
),
|
|
37749
39532
|
style: FONT_STYLE5,
|
|
37750
39533
|
children: [
|
|
37751
|
-
/* @__PURE__ */
|
|
37752
|
-
/* @__PURE__ */
|
|
39534
|
+
/* @__PURE__ */ jsx138("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: /* @__PURE__ */ jsxs96("div", { className: "flex items-center gap-2.5", children: [
|
|
39535
|
+
/* @__PURE__ */ jsx138("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsxs96(
|
|
37753
39536
|
"svg",
|
|
37754
39537
|
{
|
|
37755
39538
|
width: "14",
|
|
@@ -37762,24 +39545,24 @@ var InstructionPreview = ({
|
|
|
37762
39545
|
strokeLinecap: "round",
|
|
37763
39546
|
strokeLinejoin: "round",
|
|
37764
39547
|
children: [
|
|
37765
|
-
/* @__PURE__ */
|
|
37766
|
-
/* @__PURE__ */
|
|
37767
|
-
/* @__PURE__ */
|
|
37768
|
-
/* @__PURE__ */
|
|
37769
|
-
/* @__PURE__ */
|
|
39548
|
+
/* @__PURE__ */ jsx138("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
39549
|
+
/* @__PURE__ */ jsx138("polyline", { points: "14 2 14 8 20 8" }),
|
|
39550
|
+
/* @__PURE__ */ jsx138("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
|
|
39551
|
+
/* @__PURE__ */ jsx138("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
|
|
39552
|
+
/* @__PURE__ */ jsx138("polyline", { points: "10 9 9 9 8 9" })
|
|
37770
39553
|
]
|
|
37771
39554
|
}
|
|
37772
39555
|
) }),
|
|
37773
|
-
/* @__PURE__ */
|
|
37774
|
-
/* @__PURE__ */
|
|
37775
|
-
description && /* @__PURE__ */
|
|
39556
|
+
/* @__PURE__ */ jsxs96("div", { className: "flex-1 min-w-0", children: [
|
|
39557
|
+
/* @__PURE__ */ jsx138("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
|
|
39558
|
+
description && /* @__PURE__ */ jsx138("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5 whitespace-normal", children: description })
|
|
37776
39559
|
] })
|
|
37777
39560
|
] }) }),
|
|
37778
|
-
/* @__PURE__ */
|
|
37779
|
-
/* @__PURE__ */
|
|
37780
|
-
/* @__PURE__ */
|
|
37781
|
-
/* @__PURE__ */
|
|
37782
|
-
/* @__PURE__ */
|
|
39561
|
+
/* @__PURE__ */ jsxs96("div", { className: "px-4 py-3 space-y-3", children: [
|
|
39562
|
+
/* @__PURE__ */ jsxs96("div", { children: [
|
|
39563
|
+
/* @__PURE__ */ jsxs96("div", { className: "flex items-center justify-between mb-1.5", children: [
|
|
39564
|
+
/* @__PURE__ */ jsx138("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider", children: "Instruction" }),
|
|
39565
|
+
/* @__PURE__ */ jsx138(
|
|
37783
39566
|
"button",
|
|
37784
39567
|
{
|
|
37785
39568
|
onClick: handleCopy,
|
|
@@ -37788,14 +39571,14 @@ var InstructionPreview = ({
|
|
|
37788
39571
|
}
|
|
37789
39572
|
)
|
|
37790
39573
|
] }),
|
|
37791
|
-
/* @__PURE__ */
|
|
37792
|
-
isLong && /* @__PURE__ */
|
|
39574
|
+
/* @__PURE__ */ jsx138("div", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-pre-wrap font-mono bg-[var(--foreground)]/[0.02] border border-[var(--border-color)] rounded-lg p-3", children: displayText }),
|
|
39575
|
+
isLong && /* @__PURE__ */ jsxs96(
|
|
37793
39576
|
"button",
|
|
37794
39577
|
{
|
|
37795
39578
|
onClick: () => setIsExpanded(!isExpanded),
|
|
37796
39579
|
className: "inline-flex items-center gap-1 text-[11px] text-interactive hover:underline mt-1",
|
|
37797
39580
|
children: [
|
|
37798
|
-
/* @__PURE__ */
|
|
39581
|
+
/* @__PURE__ */ jsx138(
|
|
37799
39582
|
"svg",
|
|
37800
39583
|
{
|
|
37801
39584
|
width: "12",
|
|
@@ -37805,7 +39588,7 @@ var InstructionPreview = ({
|
|
|
37805
39588
|
stroke: "currentColor",
|
|
37806
39589
|
strokeWidth: "2",
|
|
37807
39590
|
className: cn("transition-transform", isExpanded && "rotate-180"),
|
|
37808
|
-
children: /* @__PURE__ */
|
|
39591
|
+
children: /* @__PURE__ */ jsx138("polyline", { points: "6 9 12 15 18 9" })
|
|
37809
39592
|
}
|
|
37810
39593
|
),
|
|
37811
39594
|
isExpanded ? "Show less" : "Show full instruction"
|
|
@@ -37813,16 +39596,16 @@ var InstructionPreview = ({
|
|
|
37813
39596
|
}
|
|
37814
39597
|
)
|
|
37815
39598
|
] }),
|
|
37816
|
-
workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */
|
|
37817
|
-
/* @__PURE__ */
|
|
37818
|
-
/* @__PURE__ */
|
|
37819
|
-
/* @__PURE__ */
|
|
37820
|
-
/* @__PURE__ */
|
|
39599
|
+
workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */ jsxs96("div", { children: [
|
|
39600
|
+
/* @__PURE__ */ jsx138("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Workflow" }),
|
|
39601
|
+
/* @__PURE__ */ jsx138("div", { className: "space-y-1", children: workflow_summary.map((step, idx) => /* @__PURE__ */ jsxs96("div", { className: "flex items-start gap-2 text-xs", children: [
|
|
39602
|
+
/* @__PURE__ */ jsx138("span", { className: "shrink-0 w-5 h-5 rounded-full bg-interactive/10 flex items-center justify-center text-[10px] font-bold text-interactive", children: idx + 1 }),
|
|
39603
|
+
/* @__PURE__ */ jsx138("span", { className: "text-[var(--foreground)]/50 mt-0.5", children: step })
|
|
37821
39604
|
] }, idx)) })
|
|
37822
39605
|
] }),
|
|
37823
|
-
tools && tools.length > 0 && /* @__PURE__ */
|
|
37824
|
-
/* @__PURE__ */
|
|
37825
|
-
/* @__PURE__ */
|
|
39606
|
+
tools && tools.length > 0 && /* @__PURE__ */ jsxs96("div", { children: [
|
|
39607
|
+
/* @__PURE__ */ jsx138("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Tools" }),
|
|
39608
|
+
/* @__PURE__ */ jsx138("div", { className: "flex flex-wrap gap-1.5", children: tools.map((tool) => /* @__PURE__ */ jsx138(
|
|
37826
39609
|
"span",
|
|
37827
39610
|
{
|
|
37828
39611
|
className: "text-[10px] font-mono px-2 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
|
|
@@ -37838,8 +39621,8 @@ var InstructionPreview = ({
|
|
|
37838
39621
|
};
|
|
37839
39622
|
|
|
37840
39623
|
// src/molecules/workstream-builder/UIComponentSelector/UIComponentSelector.tsx
|
|
37841
|
-
import { useState as
|
|
37842
|
-
import { jsx as
|
|
39624
|
+
import { useState as useState21 } from "react";
|
|
39625
|
+
import { jsx as jsx139, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
37843
39626
|
var FONT_STYLE6 = {
|
|
37844
39627
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37845
39628
|
};
|
|
@@ -37850,11 +39633,11 @@ function UIComponentSelector({
|
|
|
37850
39633
|
className,
|
|
37851
39634
|
isLatestMessage = true
|
|
37852
39635
|
}) {
|
|
37853
|
-
const [selected, setSelected] =
|
|
39636
|
+
const [selected, setSelected] = useState21(() => {
|
|
37854
39637
|
const recommended = components.filter((c) => c.recommended).map((c) => c.name);
|
|
37855
39638
|
return new Set(recommended);
|
|
37856
39639
|
});
|
|
37857
|
-
const [submitted, setSubmitted] =
|
|
39640
|
+
const [submitted, setSubmitted] = useState21(false);
|
|
37858
39641
|
const grouped = components.reduce(
|
|
37859
39642
|
(acc, comp) => {
|
|
37860
39643
|
const cat = comp.category || "Other";
|
|
@@ -37878,7 +39661,7 @@ function UIComponentSelector({
|
|
|
37878
39661
|
onSelect?.(Array.from(selected));
|
|
37879
39662
|
};
|
|
37880
39663
|
const categoryOrder = Object.keys(grouped).sort();
|
|
37881
|
-
return /* @__PURE__ */
|
|
39664
|
+
return /* @__PURE__ */ jsxs97(
|
|
37882
39665
|
"div",
|
|
37883
39666
|
{
|
|
37884
39667
|
className: cn(
|
|
@@ -37887,8 +39670,8 @@ function UIComponentSelector({
|
|
|
37887
39670
|
),
|
|
37888
39671
|
style: FONT_STYLE6,
|
|
37889
39672
|
children: [
|
|
37890
|
-
/* @__PURE__ */
|
|
37891
|
-
/* @__PURE__ */
|
|
39673
|
+
/* @__PURE__ */ jsx139("div", { className: "px-4 py-3 border-b border-border/60 bg-muted/40", children: /* @__PURE__ */ jsxs97("div", { className: "flex items-center gap-2", children: [
|
|
39674
|
+
/* @__PURE__ */ jsx139("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ jsxs97(
|
|
37892
39675
|
"svg",
|
|
37893
39676
|
{
|
|
37894
39677
|
width: "12",
|
|
@@ -37899,21 +39682,21 @@ function UIComponentSelector({
|
|
|
37899
39682
|
strokeWidth: "2",
|
|
37900
39683
|
className: "text-interactive",
|
|
37901
39684
|
children: [
|
|
37902
|
-
/* @__PURE__ */
|
|
37903
|
-
/* @__PURE__ */
|
|
37904
|
-
/* @__PURE__ */
|
|
37905
|
-
/* @__PURE__ */
|
|
39685
|
+
/* @__PURE__ */ jsx139("rect", { x: "3", y: "3", width: "7", height: "7" }),
|
|
39686
|
+
/* @__PURE__ */ jsx139("rect", { x: "14", y: "3", width: "7", height: "7" }),
|
|
39687
|
+
/* @__PURE__ */ jsx139("rect", { x: "3", y: "14", width: "7", height: "7" }),
|
|
39688
|
+
/* @__PURE__ */ jsx139("rect", { x: "14", y: "14", width: "7", height: "7" })
|
|
37906
39689
|
]
|
|
37907
39690
|
}
|
|
37908
39691
|
) }),
|
|
37909
|
-
/* @__PURE__ */
|
|
37910
|
-
/* @__PURE__ */
|
|
37911
|
-
/* @__PURE__ */
|
|
39692
|
+
/* @__PURE__ */ jsxs97("div", { children: [
|
|
39693
|
+
/* @__PURE__ */ jsx139("h3", { className: "text-xs font-semibold text-foreground", children: "Select UI Components" }),
|
|
39694
|
+
/* @__PURE__ */ jsx139("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: "Choose which visual components this agent can use in its responses." })
|
|
37912
39695
|
] })
|
|
37913
39696
|
] }) }),
|
|
37914
|
-
/* @__PURE__ */
|
|
37915
|
-
/* @__PURE__ */
|
|
37916
|
-
/* @__PURE__ */
|
|
39697
|
+
/* @__PURE__ */ jsx139("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ jsxs97("div", { children: [
|
|
39698
|
+
/* @__PURE__ */ jsx139("h4", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-2", children: category }),
|
|
39699
|
+
/* @__PURE__ */ jsx139("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ jsxs97(
|
|
37917
39700
|
"label",
|
|
37918
39701
|
{
|
|
37919
39702
|
className: cn(
|
|
@@ -37923,7 +39706,7 @@ function UIComponentSelector({
|
|
|
37923
39706
|
selected.has(comp.name) && submitted && "bg-interactive/5"
|
|
37924
39707
|
),
|
|
37925
39708
|
children: [
|
|
37926
|
-
/* @__PURE__ */
|
|
39709
|
+
/* @__PURE__ */ jsx139(
|
|
37927
39710
|
"div",
|
|
37928
39711
|
{
|
|
37929
39712
|
className: cn(
|
|
@@ -37934,7 +39717,7 @@ function UIComponentSelector({
|
|
|
37934
39717
|
e.preventDefault();
|
|
37935
39718
|
toggle(comp.name);
|
|
37936
39719
|
},
|
|
37937
|
-
children: selected.has(comp.name) && /* @__PURE__ */
|
|
39720
|
+
children: selected.has(comp.name) && /* @__PURE__ */ jsx139(
|
|
37938
39721
|
"svg",
|
|
37939
39722
|
{
|
|
37940
39723
|
width: "10",
|
|
@@ -37943,12 +39726,12 @@ function UIComponentSelector({
|
|
|
37943
39726
|
fill: "none",
|
|
37944
39727
|
stroke: "white",
|
|
37945
39728
|
strokeWidth: "3",
|
|
37946
|
-
children: /* @__PURE__ */
|
|
39729
|
+
children: /* @__PURE__ */ jsx139("polyline", { points: "20 6 9 17 4 12" })
|
|
37947
39730
|
}
|
|
37948
39731
|
)
|
|
37949
39732
|
}
|
|
37950
39733
|
),
|
|
37951
|
-
/* @__PURE__ */
|
|
39734
|
+
/* @__PURE__ */ jsx139(
|
|
37952
39735
|
"input",
|
|
37953
39736
|
{
|
|
37954
39737
|
type: "checkbox",
|
|
@@ -37958,11 +39741,11 @@ function UIComponentSelector({
|
|
|
37958
39741
|
className: "sr-only"
|
|
37959
39742
|
}
|
|
37960
39743
|
),
|
|
37961
|
-
/* @__PURE__ */
|
|
37962
|
-
/* @__PURE__ */
|
|
37963
|
-
/* @__PURE__ */
|
|
37964
|
-
comp.recommended && /* @__PURE__ */
|
|
37965
|
-
onPreview && /* @__PURE__ */
|
|
39744
|
+
/* @__PURE__ */ jsxs97("div", { className: "flex-1 min-w-0", children: [
|
|
39745
|
+
/* @__PURE__ */ jsxs97("div", { className: "flex items-center gap-1", children: [
|
|
39746
|
+
/* @__PURE__ */ jsx139("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
|
|
39747
|
+
comp.recommended && /* @__PURE__ */ jsx139("span", { className: "px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20", children: "Recommended" }),
|
|
39748
|
+
onPreview && /* @__PURE__ */ jsx139(
|
|
37966
39749
|
"button",
|
|
37967
39750
|
{
|
|
37968
39751
|
type: "button",
|
|
@@ -37973,7 +39756,7 @@ function UIComponentSelector({
|
|
|
37973
39756
|
},
|
|
37974
39757
|
className: "shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
|
|
37975
39758
|
title: `Preview ${comp.display_name}`,
|
|
37976
|
-
children: /* @__PURE__ */
|
|
39759
|
+
children: /* @__PURE__ */ jsxs97(
|
|
37977
39760
|
"svg",
|
|
37978
39761
|
{
|
|
37979
39762
|
width: "14",
|
|
@@ -37986,28 +39769,28 @@ function UIComponentSelector({
|
|
|
37986
39769
|
strokeLinejoin: "round",
|
|
37987
39770
|
className: "text-muted-foreground hover:text-interactive",
|
|
37988
39771
|
children: [
|
|
37989
|
-
/* @__PURE__ */
|
|
37990
|
-
/* @__PURE__ */
|
|
37991
|
-
/* @__PURE__ */
|
|
39772
|
+
/* @__PURE__ */ jsx139("circle", { cx: "12", cy: "12", r: "10" }),
|
|
39773
|
+
/* @__PURE__ */ jsx139("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
39774
|
+
/* @__PURE__ */ jsx139("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
37992
39775
|
]
|
|
37993
39776
|
}
|
|
37994
39777
|
)
|
|
37995
39778
|
}
|
|
37996
39779
|
)
|
|
37997
39780
|
] }),
|
|
37998
|
-
/* @__PURE__ */
|
|
39781
|
+
/* @__PURE__ */ jsx139("span", { className: "ml-0 text-xs text-muted-foreground", children: comp.description })
|
|
37999
39782
|
] })
|
|
38000
39783
|
]
|
|
38001
39784
|
},
|
|
38002
39785
|
comp.name
|
|
38003
39786
|
)) })
|
|
38004
39787
|
] }, category)) }),
|
|
38005
|
-
!submitted && isLatestMessage && /* @__PURE__ */
|
|
38006
|
-
/* @__PURE__ */
|
|
39788
|
+
!submitted && isLatestMessage && /* @__PURE__ */ jsxs97("div", { className: "px-4 py-3 border-t border-border/60 flex items-center justify-between bg-muted/30", children: [
|
|
39789
|
+
/* @__PURE__ */ jsxs97("span", { className: "text-xs text-muted-foreground", children: [
|
|
38007
39790
|
selected.size,
|
|
38008
39791
|
" selected"
|
|
38009
39792
|
] }),
|
|
38010
|
-
/* @__PURE__ */
|
|
39793
|
+
/* @__PURE__ */ jsx139(
|
|
38011
39794
|
"button",
|
|
38012
39795
|
{
|
|
38013
39796
|
onClick: handleContinue,
|
|
@@ -38016,14 +39799,14 @@ function UIComponentSelector({
|
|
|
38016
39799
|
}
|
|
38017
39800
|
)
|
|
38018
39801
|
] }),
|
|
38019
|
-
submitted && /* @__PURE__ */
|
|
39802
|
+
submitted && /* @__PURE__ */ jsx139("div", { className: "px-4 pb-3", children: /* @__PURE__ */ jsx139("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5", children: "Selections confirmed" }) })
|
|
38020
39803
|
]
|
|
38021
39804
|
}
|
|
38022
39805
|
);
|
|
38023
39806
|
}
|
|
38024
39807
|
|
|
38025
39808
|
// src/molecules/workstream-builder/MultiAgentCard/MultiAgentCard.tsx
|
|
38026
|
-
import { jsx as
|
|
39809
|
+
import { jsx as jsx140, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
38027
39810
|
var FONT_STYLE7 = {
|
|
38028
39811
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
38029
39812
|
};
|
|
@@ -38036,7 +39819,7 @@ var MultiAgentCard = ({
|
|
|
38036
39819
|
className
|
|
38037
39820
|
}) => {
|
|
38038
39821
|
const avatarUrl = `https://api.dicebear.com/7.x/avataaars/svg?seed=${name}`;
|
|
38039
|
-
return /* @__PURE__ */
|
|
39822
|
+
return /* @__PURE__ */ jsxs98(
|
|
38040
39823
|
"div",
|
|
38041
39824
|
{
|
|
38042
39825
|
className: cn(
|
|
@@ -38045,14 +39828,14 @@ var MultiAgentCard = ({
|
|
|
38045
39828
|
),
|
|
38046
39829
|
style: FONT_STYLE7,
|
|
38047
39830
|
children: [
|
|
38048
|
-
/* @__PURE__ */
|
|
38049
|
-
/* @__PURE__ */
|
|
38050
|
-
/* @__PURE__ */
|
|
38051
|
-
/* @__PURE__ */
|
|
38052
|
-
/* @__PURE__ */
|
|
38053
|
-
/* @__PURE__ */
|
|
38054
|
-
/* @__PURE__ */
|
|
38055
|
-
/* @__PURE__ */
|
|
39831
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
|
|
39832
|
+
/* @__PURE__ */ jsx140("div", { className: "h-12 w-12 shrink-0 rounded-full border-2 border-interactive/20 overflow-hidden bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx140("img", { src: avatarUrl, alt: display_name, className: "h-full w-full" }) }),
|
|
39833
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex-1 min-w-0", children: [
|
|
39834
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-2", children: [
|
|
39835
|
+
/* @__PURE__ */ jsx140("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
|
|
39836
|
+
/* @__PURE__ */ jsx140("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: name }),
|
|
39837
|
+
/* @__PURE__ */ jsx140("span", { className: "text-[10px] px-2 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
|
|
39838
|
+
/* @__PURE__ */ jsxs98(
|
|
38056
39839
|
"span",
|
|
38057
39840
|
{
|
|
38058
39841
|
className: cn(
|
|
@@ -38060,7 +39843,7 @@ var MultiAgentCard = ({
|
|
|
38060
39843
|
enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
38061
39844
|
),
|
|
38062
39845
|
children: [
|
|
38063
|
-
/* @__PURE__ */
|
|
39846
|
+
/* @__PURE__ */ jsx140("span", { className: cn(
|
|
38064
39847
|
"w-1.5 h-1.5 rounded-full",
|
|
38065
39848
|
enabled ? "bg-emerald-500" : "bg-red-500"
|
|
38066
39849
|
) }),
|
|
@@ -38069,18 +39852,18 @@ var MultiAgentCard = ({
|
|
|
38069
39852
|
}
|
|
38070
39853
|
)
|
|
38071
39854
|
] }),
|
|
38072
|
-
/* @__PURE__ */
|
|
39855
|
+
/* @__PURE__ */ jsx140("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed mt-1 whitespace-normal", style: { textWrap: "auto" }, children: description })
|
|
38073
39856
|
] })
|
|
38074
39857
|
] }),
|
|
38075
|
-
stages.length > 0 && /* @__PURE__ */
|
|
38076
|
-
/* @__PURE__ */
|
|
39858
|
+
stages.length > 0 && /* @__PURE__ */ jsxs98("div", { className: "border-t border-[var(--border-color)] px-5 py-4", children: [
|
|
39859
|
+
/* @__PURE__ */ jsxs98("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-3", children: [
|
|
38077
39860
|
"Stages (",
|
|
38078
39861
|
stages.length,
|
|
38079
39862
|
")"
|
|
38080
39863
|
] }),
|
|
38081
|
-
/* @__PURE__ */
|
|
38082
|
-
/* @__PURE__ */
|
|
38083
|
-
/* @__PURE__ */
|
|
39864
|
+
/* @__PURE__ */ jsx140("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ jsxs98("div", { className: "flex items-stretch", children: [
|
|
39865
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex flex-col items-center mr-3 w-5", children: [
|
|
39866
|
+
/* @__PURE__ */ jsx140(
|
|
38084
39867
|
"div",
|
|
38085
39868
|
{
|
|
38086
39869
|
className: cn(
|
|
@@ -38090,20 +39873,20 @@ var MultiAgentCard = ({
|
|
|
38090
39873
|
children: idx + 1
|
|
38091
39874
|
}
|
|
38092
39875
|
),
|
|
38093
|
-
idx < stages.length - 1 && /* @__PURE__ */
|
|
39876
|
+
idx < stages.length - 1 && /* @__PURE__ */ jsx140("div", { className: "w-px flex-1 min-h-[16px] border-l border-dashed border-interactive/30" })
|
|
38094
39877
|
] }),
|
|
38095
|
-
/* @__PURE__ */
|
|
38096
|
-
/* @__PURE__ */
|
|
38097
|
-
/* @__PURE__ */
|
|
38098
|
-
/* @__PURE__ */
|
|
39878
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
|
|
39879
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-2", children: [
|
|
39880
|
+
/* @__PURE__ */ jsx140("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
|
|
39881
|
+
/* @__PURE__ */ jsx140("span", { className: "text-[10px] font-mono text-[var(--foreground)]/30 bg-[var(--foreground)]/[0.04] px-1.5 py-0.5 rounded", children: stage.agent_name })
|
|
38099
39882
|
] }),
|
|
38100
|
-
/* @__PURE__ */
|
|
38101
|
-
stage.tools && stage.tools.length > 0 && /* @__PURE__ */
|
|
39883
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
|
|
39884
|
+
stage.tools && stage.tools.length > 0 && /* @__PURE__ */ jsxs98("span", { children: [
|
|
38102
39885
|
stage.tools.length,
|
|
38103
39886
|
" tool",
|
|
38104
39887
|
stage.tools.length !== 1 ? "s" : ""
|
|
38105
39888
|
] }),
|
|
38106
|
-
stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */
|
|
39889
|
+
stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */ jsxs98("span", { children: [
|
|
38107
39890
|
stage.ui_components.length,
|
|
38108
39891
|
" component",
|
|
38109
39892
|
stage.ui_components.length !== 1 ? "s" : ""
|
|
@@ -38118,7 +39901,7 @@ var MultiAgentCard = ({
|
|
|
38118
39901
|
};
|
|
38119
39902
|
|
|
38120
39903
|
// src/molecules/workstream-builder/MultiAgentPlan/MultiAgentPlan.tsx
|
|
38121
|
-
import { jsx as
|
|
39904
|
+
import { jsx as jsx141, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
38122
39905
|
var FONT_STYLE8 = {
|
|
38123
39906
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
38124
39907
|
};
|
|
@@ -38126,7 +39909,7 @@ var MultiAgentPlan = ({
|
|
|
38126
39909
|
stages = [],
|
|
38127
39910
|
className
|
|
38128
39911
|
}) => {
|
|
38129
|
-
return /* @__PURE__ */
|
|
39912
|
+
return /* @__PURE__ */ jsxs99(
|
|
38130
39913
|
"div",
|
|
38131
39914
|
{
|
|
38132
39915
|
className: cn(
|
|
@@ -38135,8 +39918,8 @@ var MultiAgentPlan = ({
|
|
|
38135
39918
|
),
|
|
38136
39919
|
style: FONT_STYLE8,
|
|
38137
39920
|
children: [
|
|
38138
|
-
/* @__PURE__ */
|
|
38139
|
-
/* @__PURE__ */
|
|
39921
|
+
/* @__PURE__ */ jsx141("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: /* @__PURE__ */ jsxs99("div", { className: "flex items-center gap-2", children: [
|
|
39922
|
+
/* @__PURE__ */ jsx141("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ jsx141(
|
|
38140
39923
|
"svg",
|
|
38141
39924
|
{
|
|
38142
39925
|
width: "10",
|
|
@@ -38146,20 +39929,20 @@ var MultiAgentPlan = ({
|
|
|
38146
39929
|
stroke: "currentColor",
|
|
38147
39930
|
strokeWidth: "2",
|
|
38148
39931
|
className: "text-violet-600",
|
|
38149
|
-
children: /* @__PURE__ */
|
|
39932
|
+
children: /* @__PURE__ */ jsx141("path", { d: "M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5" })
|
|
38150
39933
|
}
|
|
38151
39934
|
) }),
|
|
38152
|
-
/* @__PURE__ */
|
|
38153
|
-
/* @__PURE__ */
|
|
39935
|
+
/* @__PURE__ */ jsx141("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "Proposed Multi-Agent Workflow" }),
|
|
39936
|
+
/* @__PURE__ */ jsx141("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-amber-500/10 text-amber-600 font-medium", children: "Draft" })
|
|
38154
39937
|
] }) }),
|
|
38155
|
-
/* @__PURE__ */
|
|
38156
|
-
/* @__PURE__ */
|
|
38157
|
-
/* @__PURE__ */
|
|
38158
|
-
idx < stages.length - 1 && /* @__PURE__ */
|
|
39938
|
+
/* @__PURE__ */ jsx141("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsx141("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ jsxs99("div", { className: "flex items-stretch min-w-0", children: [
|
|
39939
|
+
/* @__PURE__ */ jsxs99("div", { className: "flex flex-col items-center mr-3 w-6", children: [
|
|
39940
|
+
/* @__PURE__ */ jsx141("div", { className: "w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold shrink-0 bg-interactive/10 text-interactive border border-interactive/30", children: idx + 1 }),
|
|
39941
|
+
idx < stages.length - 1 && /* @__PURE__ */ jsx141("div", { className: "w-px flex-1 min-h-[12px] border-l border-dashed border-interactive/30" })
|
|
38159
39942
|
] }),
|
|
38160
|
-
/* @__PURE__ */
|
|
38161
|
-
/* @__PURE__ */
|
|
38162
|
-
stage.description && /* @__PURE__ */
|
|
39943
|
+
/* @__PURE__ */ jsxs99("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
|
|
39944
|
+
/* @__PURE__ */ jsx141("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
|
|
39945
|
+
stage.description && /* @__PURE__ */ jsx141(
|
|
38163
39946
|
"p",
|
|
38164
39947
|
{
|
|
38165
39948
|
className: "text-[11px] text-foreground/50 mt-0.5 whitespace-normal",
|
|
@@ -38167,7 +39950,7 @@ var MultiAgentPlan = ({
|
|
|
38167
39950
|
children: stage.description
|
|
38168
39951
|
}
|
|
38169
39952
|
),
|
|
38170
|
-
stage.proposed_tools && stage.proposed_tools.length > 0 && /* @__PURE__ */
|
|
39953
|
+
stage.proposed_tools && stage.proposed_tools.length > 0 && /* @__PURE__ */ jsx141("div", { className: "flex flex-wrap gap-1 mt-1.5", children: stage.proposed_tools.map((tool) => /* @__PURE__ */ jsx141(
|
|
38171
39954
|
"span",
|
|
38172
39955
|
{
|
|
38173
39956
|
className: "text-[10px] px-1.5 py-0.5 rounded bg-interactive/10 text-interactive font-mono",
|
|
@@ -38183,8 +39966,8 @@ var MultiAgentPlan = ({
|
|
|
38183
39966
|
};
|
|
38184
39967
|
|
|
38185
39968
|
// src/molecules/workstream-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
|
|
38186
|
-
import { useState as
|
|
38187
|
-
import { jsx as
|
|
39969
|
+
import { useState as useState22, useCallback as useCallback10 } from "react";
|
|
39970
|
+
import { jsx as jsx142, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
38188
39971
|
var FONT_STYLE9 = {
|
|
38189
39972
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
38190
39973
|
};
|
|
@@ -38196,8 +39979,8 @@ var MultiAgentUISelector = ({
|
|
|
38196
39979
|
className,
|
|
38197
39980
|
isLatestMessage = true
|
|
38198
39981
|
}) => {
|
|
38199
|
-
const [activeStageId, setActiveStageId] =
|
|
38200
|
-
const [selections, setSelections] =
|
|
39982
|
+
const [activeStageId, setActiveStageId] = useState22(stages[0]?.id || "");
|
|
39983
|
+
const [selections, setSelections] = useState22(
|
|
38201
39984
|
() => {
|
|
38202
39985
|
const init = {};
|
|
38203
39986
|
const recommendedNames = components.filter((c) => c.recommended).map((c) => c.name);
|
|
@@ -38208,14 +39991,14 @@ var MultiAgentUISelector = ({
|
|
|
38208
39991
|
return init;
|
|
38209
39992
|
}
|
|
38210
39993
|
);
|
|
38211
|
-
const [submitted, setSubmitted] =
|
|
39994
|
+
const [submitted, setSubmitted] = useState22(false);
|
|
38212
39995
|
const grouped = components.reduce((acc, comp) => {
|
|
38213
39996
|
const cat = comp.category || "Other";
|
|
38214
39997
|
if (!acc[cat]) acc[cat] = [];
|
|
38215
39998
|
acc[cat].push(comp);
|
|
38216
39999
|
return acc;
|
|
38217
40000
|
}, {});
|
|
38218
|
-
const toggleComponent =
|
|
40001
|
+
const toggleComponent = useCallback10(
|
|
38219
40002
|
(stageId, compName) => {
|
|
38220
40003
|
if (submitted || !isLatestMessage) return;
|
|
38221
40004
|
setSelections((prev) => {
|
|
@@ -38232,7 +40015,7 @@ var MultiAgentUISelector = ({
|
|
|
38232
40015
|
},
|
|
38233
40016
|
[submitted]
|
|
38234
40017
|
);
|
|
38235
|
-
const selectAll =
|
|
40018
|
+
const selectAll = useCallback10(
|
|
38236
40019
|
(stageId) => {
|
|
38237
40020
|
if (submitted || !isLatestMessage) return;
|
|
38238
40021
|
setSelections((prev) => {
|
|
@@ -38243,7 +40026,7 @@ var MultiAgentUISelector = ({
|
|
|
38243
40026
|
},
|
|
38244
40027
|
[submitted, isLatestMessage, components]
|
|
38245
40028
|
);
|
|
38246
|
-
const clearAll =
|
|
40029
|
+
const clearAll = useCallback10(
|
|
38247
40030
|
(stageId) => {
|
|
38248
40031
|
if (submitted || !isLatestMessage) return;
|
|
38249
40032
|
setSelections((prev) => {
|
|
@@ -38254,7 +40037,7 @@ var MultiAgentUISelector = ({
|
|
|
38254
40037
|
},
|
|
38255
40038
|
[submitted, isLatestMessage]
|
|
38256
40039
|
);
|
|
38257
|
-
const handleContinue =
|
|
40040
|
+
const handleContinue = useCallback10(() => {
|
|
38258
40041
|
setSubmitted(true);
|
|
38259
40042
|
if (onSelect) {
|
|
38260
40043
|
const result = {};
|
|
@@ -38265,7 +40048,7 @@ var MultiAgentUISelector = ({
|
|
|
38265
40048
|
}
|
|
38266
40049
|
}, [onSelect, selections]);
|
|
38267
40050
|
const activeStage = stages.find((s) => s.id === activeStageId);
|
|
38268
|
-
return /* @__PURE__ */
|
|
40051
|
+
return /* @__PURE__ */ jsxs100(
|
|
38269
40052
|
"div",
|
|
38270
40053
|
{
|
|
38271
40054
|
className: cn(
|
|
@@ -38274,8 +40057,8 @@ var MultiAgentUISelector = ({
|
|
|
38274
40057
|
),
|
|
38275
40058
|
style: FONT_STYLE9,
|
|
38276
40059
|
children: [
|
|
38277
|
-
/* @__PURE__ */
|
|
38278
|
-
/* @__PURE__ */
|
|
40060
|
+
/* @__PURE__ */ jsx142("div", { className: "px-4 py-3 border-b border-border/60 bg-muted/40", children: /* @__PURE__ */ jsxs100("div", { className: "flex items-center gap-2", children: [
|
|
40061
|
+
/* @__PURE__ */ jsx142("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ jsxs100(
|
|
38279
40062
|
"svg",
|
|
38280
40063
|
{
|
|
38281
40064
|
width: "12",
|
|
@@ -38286,16 +40069,16 @@ var MultiAgentUISelector = ({
|
|
|
38286
40069
|
strokeWidth: "2",
|
|
38287
40070
|
className: "text-interactive",
|
|
38288
40071
|
children: [
|
|
38289
|
-
/* @__PURE__ */
|
|
38290
|
-
/* @__PURE__ */
|
|
38291
|
-
/* @__PURE__ */
|
|
38292
|
-
/* @__PURE__ */
|
|
40072
|
+
/* @__PURE__ */ jsx142("rect", { x: "3", y: "3", width: "7", height: "7" }),
|
|
40073
|
+
/* @__PURE__ */ jsx142("rect", { x: "14", y: "3", width: "7", height: "7" }),
|
|
40074
|
+
/* @__PURE__ */ jsx142("rect", { x: "3", y: "14", width: "7", height: "7" }),
|
|
40075
|
+
/* @__PURE__ */ jsx142("rect", { x: "14", y: "14", width: "7", height: "7" })
|
|
38293
40076
|
]
|
|
38294
40077
|
}
|
|
38295
40078
|
) }),
|
|
38296
|
-
/* @__PURE__ */
|
|
40079
|
+
/* @__PURE__ */ jsx142("span", { className: "text-xs font-semibold text-foreground", children: "UI Components per Stage" })
|
|
38297
40080
|
] }) }),
|
|
38298
|
-
/* @__PURE__ */
|
|
40081
|
+
/* @__PURE__ */ jsx142("div", { className: "flex gap-1 border-b border-border/60 px-4 py-2 bg-muted/20", children: stages.map((stage) => /* @__PURE__ */ jsx142(
|
|
38299
40082
|
"button",
|
|
38300
40083
|
{
|
|
38301
40084
|
onClick: () => setActiveStageId(stage.id),
|
|
@@ -38307,17 +40090,17 @@ var MultiAgentUISelector = ({
|
|
|
38307
40090
|
},
|
|
38308
40091
|
stage.id
|
|
38309
40092
|
)) }),
|
|
38310
|
-
/* @__PURE__ */
|
|
38311
|
-
activeStage && /* @__PURE__ */
|
|
38312
|
-
/* @__PURE__ */
|
|
40093
|
+
/* @__PURE__ */ jsxs100("div", { className: "px-4 py-3", children: [
|
|
40094
|
+
activeStage && /* @__PURE__ */ jsxs100("div", { className: "flex items-center justify-between mb-3", children: [
|
|
40095
|
+
/* @__PURE__ */ jsxs100("p", { className: "text-[10px] text-muted-foreground", children: [
|
|
38313
40096
|
"Select components for ",
|
|
38314
|
-
/* @__PURE__ */
|
|
40097
|
+
/* @__PURE__ */ jsx142("strong", { className: "text-foreground", children: activeStage.name }),
|
|
38315
40098
|
" (",
|
|
38316
40099
|
activeStage.agent_name,
|
|
38317
40100
|
")"
|
|
38318
40101
|
] }),
|
|
38319
|
-
!submitted && isLatestMessage && /* @__PURE__ */
|
|
38320
|
-
/* @__PURE__ */
|
|
40102
|
+
!submitted && isLatestMessage && /* @__PURE__ */ jsxs100("div", { className: "flex items-center gap-2", children: [
|
|
40103
|
+
/* @__PURE__ */ jsx142(
|
|
38321
40104
|
"button",
|
|
38322
40105
|
{
|
|
38323
40106
|
onClick: () => selectAll(activeStageId),
|
|
@@ -38325,8 +40108,8 @@ var MultiAgentUISelector = ({
|
|
|
38325
40108
|
children: "Select All"
|
|
38326
40109
|
}
|
|
38327
40110
|
),
|
|
38328
|
-
/* @__PURE__ */
|
|
38329
|
-
/* @__PURE__ */
|
|
40111
|
+
/* @__PURE__ */ jsx142("span", { className: "text-muted-foreground/40", children: "|" }),
|
|
40112
|
+
/* @__PURE__ */ jsx142(
|
|
38330
40113
|
"button",
|
|
38331
40114
|
{
|
|
38332
40115
|
onClick: () => clearAll(activeStageId),
|
|
@@ -38336,11 +40119,11 @@ var MultiAgentUISelector = ({
|
|
|
38336
40119
|
)
|
|
38337
40120
|
] })
|
|
38338
40121
|
] }),
|
|
38339
|
-
Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */
|
|
38340
|
-
/* @__PURE__ */
|
|
38341
|
-
/* @__PURE__ */
|
|
40122
|
+
Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ jsxs100("div", { className: "mb-3", children: [
|
|
40123
|
+
/* @__PURE__ */ jsx142("p", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wide mb-1.5", children: category }),
|
|
40124
|
+
/* @__PURE__ */ jsx142("div", { className: "grid grid-cols-2 gap-1.5", children: comps.map((comp) => {
|
|
38342
40125
|
const isSelected = selections[activeStageId]?.has(comp.name) || false;
|
|
38343
|
-
return /* @__PURE__ */
|
|
40126
|
+
return /* @__PURE__ */ jsxs100(
|
|
38344
40127
|
"div",
|
|
38345
40128
|
{
|
|
38346
40129
|
role: "button",
|
|
@@ -38358,15 +40141,15 @@ var MultiAgentUISelector = ({
|
|
|
38358
40141
|
(submitted || !isLatestMessage) && "opacity-60 cursor-default"
|
|
38359
40142
|
),
|
|
38360
40143
|
children: [
|
|
38361
|
-
/* @__PURE__ */
|
|
38362
|
-
/* @__PURE__ */
|
|
40144
|
+
/* @__PURE__ */ jsxs100("div", { className: "flex items-center gap-1.5", children: [
|
|
40145
|
+
/* @__PURE__ */ jsx142(
|
|
38363
40146
|
"div",
|
|
38364
40147
|
{
|
|
38365
40148
|
className: cn(
|
|
38366
40149
|
"w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0",
|
|
38367
40150
|
isSelected ? "bg-interactive border-interactive" : "border-muted-foreground/30"
|
|
38368
40151
|
),
|
|
38369
|
-
children: isSelected && /* @__PURE__ */
|
|
40152
|
+
children: isSelected && /* @__PURE__ */ jsx142(
|
|
38370
40153
|
"svg",
|
|
38371
40154
|
{
|
|
38372
40155
|
width: "8",
|
|
@@ -38375,14 +40158,14 @@ var MultiAgentUISelector = ({
|
|
|
38375
40158
|
fill: "none",
|
|
38376
40159
|
stroke: "white",
|
|
38377
40160
|
strokeWidth: "3",
|
|
38378
|
-
children: /* @__PURE__ */
|
|
40161
|
+
children: /* @__PURE__ */ jsx142("polyline", { points: "20 6 9 17 4 12" })
|
|
38379
40162
|
}
|
|
38380
40163
|
)
|
|
38381
40164
|
}
|
|
38382
40165
|
),
|
|
38383
|
-
/* @__PURE__ */
|
|
38384
|
-
comp.recommended && /* @__PURE__ */
|
|
38385
|
-
onPreview && /* @__PURE__ */
|
|
40166
|
+
/* @__PURE__ */ jsx142("span", { className: "font-medium text-foreground", children: comp.display_name }),
|
|
40167
|
+
comp.recommended && /* @__PURE__ */ jsx142("span", { className: "px-1 py-px text-[8px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 leading-tight", children: "Rec" }),
|
|
40168
|
+
onPreview && /* @__PURE__ */ jsx142(
|
|
38386
40169
|
"button",
|
|
38387
40170
|
{
|
|
38388
40171
|
type: "button",
|
|
@@ -38392,7 +40175,7 @@ var MultiAgentUISelector = ({
|
|
|
38392
40175
|
},
|
|
38393
40176
|
className: "ml-auto shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
|
|
38394
40177
|
title: `Preview ${comp.display_name}`,
|
|
38395
|
-
children: /* @__PURE__ */
|
|
40178
|
+
children: /* @__PURE__ */ jsxs100(
|
|
38396
40179
|
"svg",
|
|
38397
40180
|
{
|
|
38398
40181
|
width: "14",
|
|
@@ -38405,16 +40188,16 @@ var MultiAgentUISelector = ({
|
|
|
38405
40188
|
strokeLinejoin: "round",
|
|
38406
40189
|
className: "text-muted-foreground hover:text-primary",
|
|
38407
40190
|
children: [
|
|
38408
|
-
/* @__PURE__ */
|
|
38409
|
-
/* @__PURE__ */
|
|
38410
|
-
/* @__PURE__ */
|
|
40191
|
+
/* @__PURE__ */ jsx142("circle", { cx: "12", cy: "12", r: "10" }),
|
|
40192
|
+
/* @__PURE__ */ jsx142("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
40193
|
+
/* @__PURE__ */ jsx142("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
38411
40194
|
]
|
|
38412
40195
|
}
|
|
38413
40196
|
)
|
|
38414
40197
|
}
|
|
38415
40198
|
)
|
|
38416
40199
|
] }),
|
|
38417
|
-
/* @__PURE__ */
|
|
40200
|
+
/* @__PURE__ */ jsx142("p", { className: "text-[10px] text-muted-foreground mt-0.5 ml-5 whitespace-normal", children: comp.description })
|
|
38418
40201
|
]
|
|
38419
40202
|
},
|
|
38420
40203
|
comp.name
|
|
@@ -38422,7 +40205,7 @@ var MultiAgentUISelector = ({
|
|
|
38422
40205
|
}) })
|
|
38423
40206
|
] }, category))
|
|
38424
40207
|
] }),
|
|
38425
|
-
!submitted && isLatestMessage && /* @__PURE__ */
|
|
40208
|
+
!submitted && isLatestMessage && /* @__PURE__ */ jsx142("div", { className: "px-4 py-3 border-t border-border/60 bg-muted/30", children: /* @__PURE__ */ jsx142(
|
|
38426
40209
|
"button",
|
|
38427
40210
|
{
|
|
38428
40211
|
onClick: handleContinue,
|
|
@@ -38430,14 +40213,14 @@ var MultiAgentUISelector = ({
|
|
|
38430
40213
|
children: "Continue"
|
|
38431
40214
|
}
|
|
38432
40215
|
) }),
|
|
38433
|
-
submitted && /* @__PURE__ */
|
|
40216
|
+
submitted && /* @__PURE__ */ jsx142("div", { className: "px-4 pb-3", children: /* @__PURE__ */ jsx142("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5", children: "Selections confirmed" }) })
|
|
38434
40217
|
]
|
|
38435
40218
|
}
|
|
38436
40219
|
);
|
|
38437
40220
|
};
|
|
38438
40221
|
|
|
38439
40222
|
// src/molecules/workstream-builder/StageIndicator/StageIndicator.tsx
|
|
38440
|
-
import { jsx as
|
|
40223
|
+
import { jsx as jsx143, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
38441
40224
|
var FONT_STYLE10 = {
|
|
38442
40225
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
38443
40226
|
};
|
|
@@ -38446,7 +40229,7 @@ var StageIndicator = ({
|
|
|
38446
40229
|
agent_name,
|
|
38447
40230
|
className
|
|
38448
40231
|
}) => {
|
|
38449
|
-
return /* @__PURE__ */
|
|
40232
|
+
return /* @__PURE__ */ jsxs101(
|
|
38450
40233
|
"div",
|
|
38451
40234
|
{
|
|
38452
40235
|
className: cn(
|
|
@@ -38455,12 +40238,12 @@ var StageIndicator = ({
|
|
|
38455
40238
|
),
|
|
38456
40239
|
style: { ...FONT_STYLE10, animation: "fadeIn 0.3s ease-out" },
|
|
38457
40240
|
children: [
|
|
38458
|
-
/* @__PURE__ */
|
|
38459
|
-
/* @__PURE__ */
|
|
38460
|
-
/* @__PURE__ */
|
|
38461
|
-
/* @__PURE__ */
|
|
40241
|
+
/* @__PURE__ */ jsx143("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
|
|
40242
|
+
/* @__PURE__ */ jsxs101("div", { className: "flex items-center gap-1.5 px-3 py-1 rounded-full bg-violet-500/10 border border-violet-500/20", children: [
|
|
40243
|
+
/* @__PURE__ */ jsx143("div", { className: "w-1.5 h-1.5 rounded-full bg-violet-500 animate-pulse" }),
|
|
40244
|
+
/* @__PURE__ */ jsx143("span", { className: "text-[10px] font-medium text-violet-600", children: stage_name || agent_name })
|
|
38462
40245
|
] }),
|
|
38463
|
-
/* @__PURE__ */
|
|
40246
|
+
/* @__PURE__ */ jsx143("div", { className: "flex-1 h-px bg-[var(--border-color)]" })
|
|
38464
40247
|
]
|
|
38465
40248
|
}
|
|
38466
40249
|
);
|
|
@@ -38758,7 +40541,7 @@ __export(ui_exports, {
|
|
|
38758
40541
|
// src/components/ui/button-group.tsx
|
|
38759
40542
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
38760
40543
|
import { cva as cva8 } from "class-variance-authority";
|
|
38761
|
-
import { jsx as
|
|
40544
|
+
import { jsx as jsx144 } from "react/jsx-runtime";
|
|
38762
40545
|
var buttonGroupVariants = cva8(
|
|
38763
40546
|
"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",
|
|
38764
40547
|
{
|
|
@@ -38778,7 +40561,7 @@ function ButtonGroup({
|
|
|
38778
40561
|
orientation,
|
|
38779
40562
|
...props
|
|
38780
40563
|
}) {
|
|
38781
|
-
return /* @__PURE__ */
|
|
40564
|
+
return /* @__PURE__ */ jsx144(
|
|
38782
40565
|
"div",
|
|
38783
40566
|
{
|
|
38784
40567
|
role: "group",
|
|
@@ -38795,7 +40578,7 @@ function ButtonGroupText({
|
|
|
38795
40578
|
...props
|
|
38796
40579
|
}) {
|
|
38797
40580
|
const Comp = asChild ? Slot4 : "div";
|
|
38798
|
-
return /* @__PURE__ */
|
|
40581
|
+
return /* @__PURE__ */ jsx144(
|
|
38799
40582
|
Comp,
|
|
38800
40583
|
{
|
|
38801
40584
|
className: cn(
|
|
@@ -38811,7 +40594,7 @@ function ButtonGroupSeparator({
|
|
|
38811
40594
|
orientation = "vertical",
|
|
38812
40595
|
...props
|
|
38813
40596
|
}) {
|
|
38814
|
-
return /* @__PURE__ */
|
|
40597
|
+
return /* @__PURE__ */ jsx144(
|
|
38815
40598
|
Separator2,
|
|
38816
40599
|
{
|
|
38817
40600
|
"data-slot": "button-group-separator",
|
|
@@ -38827,9 +40610,9 @@ function ButtonGroupSeparator({
|
|
|
38827
40610
|
|
|
38828
40611
|
// src/components/ui/empty.tsx
|
|
38829
40612
|
import { cva as cva9 } from "class-variance-authority";
|
|
38830
|
-
import { jsx as
|
|
40613
|
+
import { jsx as jsx145 } from "react/jsx-runtime";
|
|
38831
40614
|
function Empty({ className, ...props }) {
|
|
38832
|
-
return /* @__PURE__ */
|
|
40615
|
+
return /* @__PURE__ */ jsx145(
|
|
38833
40616
|
"div",
|
|
38834
40617
|
{
|
|
38835
40618
|
"data-slot": "empty",
|
|
@@ -38842,7 +40625,7 @@ function Empty({ className, ...props }) {
|
|
|
38842
40625
|
);
|
|
38843
40626
|
}
|
|
38844
40627
|
function EmptyHeader({ className, ...props }) {
|
|
38845
|
-
return /* @__PURE__ */
|
|
40628
|
+
return /* @__PURE__ */ jsx145(
|
|
38846
40629
|
"div",
|
|
38847
40630
|
{
|
|
38848
40631
|
"data-slot": "empty-header",
|
|
@@ -38873,7 +40656,7 @@ function EmptyMedia({
|
|
|
38873
40656
|
variant = "default",
|
|
38874
40657
|
...props
|
|
38875
40658
|
}) {
|
|
38876
|
-
return /* @__PURE__ */
|
|
40659
|
+
return /* @__PURE__ */ jsx145(
|
|
38877
40660
|
"div",
|
|
38878
40661
|
{
|
|
38879
40662
|
"data-slot": "empty-icon",
|
|
@@ -38884,7 +40667,7 @@ function EmptyMedia({
|
|
|
38884
40667
|
);
|
|
38885
40668
|
}
|
|
38886
40669
|
function EmptyTitle({ className, ...props }) {
|
|
38887
|
-
return /* @__PURE__ */
|
|
40670
|
+
return /* @__PURE__ */ jsx145(
|
|
38888
40671
|
"div",
|
|
38889
40672
|
{
|
|
38890
40673
|
"data-slot": "empty-title",
|
|
@@ -38894,7 +40677,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
38894
40677
|
);
|
|
38895
40678
|
}
|
|
38896
40679
|
function EmptyDescription({ className, ...props }) {
|
|
38897
|
-
return /* @__PURE__ */
|
|
40680
|
+
return /* @__PURE__ */ jsx145(
|
|
38898
40681
|
"div",
|
|
38899
40682
|
{
|
|
38900
40683
|
"data-slot": "empty-description",
|
|
@@ -38907,7 +40690,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
38907
40690
|
);
|
|
38908
40691
|
}
|
|
38909
40692
|
function EmptyContent({ className, ...props }) {
|
|
38910
|
-
return /* @__PURE__ */
|
|
40693
|
+
return /* @__PURE__ */ jsx145(
|
|
38911
40694
|
"div",
|
|
38912
40695
|
{
|
|
38913
40696
|
"data-slot": "empty-content",
|
|
@@ -38921,11 +40704,11 @@ function EmptyContent({ className, ...props }) {
|
|
|
38921
40704
|
}
|
|
38922
40705
|
|
|
38923
40706
|
// src/components/ui/field.tsx
|
|
38924
|
-
import { useMemo as
|
|
40707
|
+
import { useMemo as useMemo11 } from "react";
|
|
38925
40708
|
import { cva as cva10 } from "class-variance-authority";
|
|
38926
|
-
import { jsx as
|
|
40709
|
+
import { jsx as jsx146, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
38927
40710
|
function FieldSet({ className, ...props }) {
|
|
38928
|
-
return /* @__PURE__ */
|
|
40711
|
+
return /* @__PURE__ */ jsx146(
|
|
38929
40712
|
"fieldset",
|
|
38930
40713
|
{
|
|
38931
40714
|
"data-slot": "field-set",
|
|
@@ -38943,7 +40726,7 @@ function FieldLegend({
|
|
|
38943
40726
|
variant = "legend",
|
|
38944
40727
|
...props
|
|
38945
40728
|
}) {
|
|
38946
|
-
return /* @__PURE__ */
|
|
40729
|
+
return /* @__PURE__ */ jsx146(
|
|
38947
40730
|
"legend",
|
|
38948
40731
|
{
|
|
38949
40732
|
"data-slot": "field-legend",
|
|
@@ -38959,7 +40742,7 @@ function FieldLegend({
|
|
|
38959
40742
|
);
|
|
38960
40743
|
}
|
|
38961
40744
|
function FieldGroup({ className, ...props }) {
|
|
38962
|
-
return /* @__PURE__ */
|
|
40745
|
+
return /* @__PURE__ */ jsx146(
|
|
38963
40746
|
"div",
|
|
38964
40747
|
{
|
|
38965
40748
|
"data-slot": "field-group",
|
|
@@ -38999,7 +40782,7 @@ function Field({
|
|
|
38999
40782
|
orientation = "vertical",
|
|
39000
40783
|
...props
|
|
39001
40784
|
}) {
|
|
39002
|
-
return /* @__PURE__ */
|
|
40785
|
+
return /* @__PURE__ */ jsx146(
|
|
39003
40786
|
"div",
|
|
39004
40787
|
{
|
|
39005
40788
|
role: "group",
|
|
@@ -39011,7 +40794,7 @@ function Field({
|
|
|
39011
40794
|
);
|
|
39012
40795
|
}
|
|
39013
40796
|
function FieldContent({ className, ...props }) {
|
|
39014
|
-
return /* @__PURE__ */
|
|
40797
|
+
return /* @__PURE__ */ jsx146(
|
|
39015
40798
|
"div",
|
|
39016
40799
|
{
|
|
39017
40800
|
"data-slot": "field-content",
|
|
@@ -39027,7 +40810,7 @@ function FieldLabel({
|
|
|
39027
40810
|
className,
|
|
39028
40811
|
...props
|
|
39029
40812
|
}) {
|
|
39030
|
-
return /* @__PURE__ */
|
|
40813
|
+
return /* @__PURE__ */ jsx146(
|
|
39031
40814
|
Label,
|
|
39032
40815
|
{
|
|
39033
40816
|
"data-slot": "field-label",
|
|
@@ -39042,7 +40825,7 @@ function FieldLabel({
|
|
|
39042
40825
|
);
|
|
39043
40826
|
}
|
|
39044
40827
|
function FieldTitle({ className, ...props }) {
|
|
39045
|
-
return /* @__PURE__ */
|
|
40828
|
+
return /* @__PURE__ */ jsx146(
|
|
39046
40829
|
"div",
|
|
39047
40830
|
{
|
|
39048
40831
|
"data-slot": "field-label",
|
|
@@ -39055,7 +40838,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
39055
40838
|
);
|
|
39056
40839
|
}
|
|
39057
40840
|
function FieldDescription({ className, ...props }) {
|
|
39058
|
-
return /* @__PURE__ */
|
|
40841
|
+
return /* @__PURE__ */ jsx146(
|
|
39059
40842
|
"p",
|
|
39060
40843
|
{
|
|
39061
40844
|
"data-slot": "field-description",
|
|
@@ -39074,7 +40857,7 @@ function FieldSeparator({
|
|
|
39074
40857
|
className,
|
|
39075
40858
|
...props
|
|
39076
40859
|
}) {
|
|
39077
|
-
return /* @__PURE__ */
|
|
40860
|
+
return /* @__PURE__ */ jsxs102(
|
|
39078
40861
|
"div",
|
|
39079
40862
|
{
|
|
39080
40863
|
"data-slot": "field-separator",
|
|
@@ -39085,8 +40868,8 @@ function FieldSeparator({
|
|
|
39085
40868
|
),
|
|
39086
40869
|
...props,
|
|
39087
40870
|
children: [
|
|
39088
|
-
/* @__PURE__ */
|
|
39089
|
-
children && /* @__PURE__ */
|
|
40871
|
+
/* @__PURE__ */ jsx146(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
40872
|
+
children && /* @__PURE__ */ jsx146(
|
|
39090
40873
|
"span",
|
|
39091
40874
|
{
|
|
39092
40875
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -39104,7 +40887,7 @@ function FieldError({
|
|
|
39104
40887
|
errors,
|
|
39105
40888
|
...props
|
|
39106
40889
|
}) {
|
|
39107
|
-
const content =
|
|
40890
|
+
const content = useMemo11(() => {
|
|
39108
40891
|
if (children) {
|
|
39109
40892
|
return children;
|
|
39110
40893
|
}
|
|
@@ -39114,14 +40897,14 @@ function FieldError({
|
|
|
39114
40897
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
39115
40898
|
return errors[0].message;
|
|
39116
40899
|
}
|
|
39117
|
-
return /* @__PURE__ */
|
|
39118
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
40900
|
+
return /* @__PURE__ */ jsx146("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
40901
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx146("li", { children: error.message }, index)
|
|
39119
40902
|
) });
|
|
39120
40903
|
}, [children, errors]);
|
|
39121
40904
|
if (!content) {
|
|
39122
40905
|
return null;
|
|
39123
40906
|
}
|
|
39124
|
-
return /* @__PURE__ */
|
|
40907
|
+
return /* @__PURE__ */ jsx146(
|
|
39125
40908
|
"div",
|
|
39126
40909
|
{
|
|
39127
40910
|
role: "alert",
|
|
@@ -39135,9 +40918,9 @@ function FieldError({
|
|
|
39135
40918
|
|
|
39136
40919
|
// src/components/ui/input-group.tsx
|
|
39137
40920
|
import { cva as cva11 } from "class-variance-authority";
|
|
39138
|
-
import { jsx as
|
|
40921
|
+
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
39139
40922
|
function InputGroup({ className, ...props }) {
|
|
39140
|
-
return /* @__PURE__ */
|
|
40923
|
+
return /* @__PURE__ */ jsx147(
|
|
39141
40924
|
"div",
|
|
39142
40925
|
{
|
|
39143
40926
|
"data-slot": "input-group",
|
|
@@ -39181,7 +40964,7 @@ function InputGroupAddon({
|
|
|
39181
40964
|
align = "inline-start",
|
|
39182
40965
|
...props
|
|
39183
40966
|
}) {
|
|
39184
|
-
return /* @__PURE__ */
|
|
40967
|
+
return /* @__PURE__ */ jsx147(
|
|
39185
40968
|
"div",
|
|
39186
40969
|
{
|
|
39187
40970
|
role: "group",
|
|
@@ -39221,7 +41004,7 @@ function InputGroupButton({
|
|
|
39221
41004
|
size = "xs",
|
|
39222
41005
|
...props
|
|
39223
41006
|
}) {
|
|
39224
|
-
return /* @__PURE__ */
|
|
41007
|
+
return /* @__PURE__ */ jsx147(
|
|
39225
41008
|
Button,
|
|
39226
41009
|
{
|
|
39227
41010
|
type,
|
|
@@ -39233,7 +41016,7 @@ function InputGroupButton({
|
|
|
39233
41016
|
);
|
|
39234
41017
|
}
|
|
39235
41018
|
function InputGroupText({ className, ...props }) {
|
|
39236
|
-
return /* @__PURE__ */
|
|
41019
|
+
return /* @__PURE__ */ jsx147(
|
|
39237
41020
|
"span",
|
|
39238
41021
|
{
|
|
39239
41022
|
className: cn(
|
|
@@ -39248,7 +41031,7 @@ function InputGroupInput({
|
|
|
39248
41031
|
className,
|
|
39249
41032
|
...props
|
|
39250
41033
|
}) {
|
|
39251
|
-
return /* @__PURE__ */
|
|
41034
|
+
return /* @__PURE__ */ jsx147(
|
|
39252
41035
|
Input,
|
|
39253
41036
|
{
|
|
39254
41037
|
"data-slot": "input-group-control",
|
|
@@ -39264,7 +41047,7 @@ function InputGroupTextarea({
|
|
|
39264
41047
|
className,
|
|
39265
41048
|
...props
|
|
39266
41049
|
}) {
|
|
39267
|
-
return /* @__PURE__ */
|
|
41050
|
+
return /* @__PURE__ */ jsx147(
|
|
39268
41051
|
Textarea,
|
|
39269
41052
|
{
|
|
39270
41053
|
"data-slot": "input-group-control",
|
|
@@ -39280,9 +41063,9 @@ function InputGroupTextarea({
|
|
|
39280
41063
|
// src/components/ui/item.tsx
|
|
39281
41064
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
39282
41065
|
import { cva as cva12 } from "class-variance-authority";
|
|
39283
|
-
import { jsx as
|
|
41066
|
+
import { jsx as jsx148 } from "react/jsx-runtime";
|
|
39284
41067
|
function ItemGroup({ className, ...props }) {
|
|
39285
|
-
return /* @__PURE__ */
|
|
41068
|
+
return /* @__PURE__ */ jsx148(
|
|
39286
41069
|
"div",
|
|
39287
41070
|
{
|
|
39288
41071
|
role: "list",
|
|
@@ -39296,7 +41079,7 @@ function ItemSeparator({
|
|
|
39296
41079
|
className,
|
|
39297
41080
|
...props
|
|
39298
41081
|
}) {
|
|
39299
|
-
return /* @__PURE__ */
|
|
41082
|
+
return /* @__PURE__ */ jsx148(
|
|
39300
41083
|
Separator2,
|
|
39301
41084
|
{
|
|
39302
41085
|
"data-slot": "item-separator",
|
|
@@ -39334,7 +41117,7 @@ function Item8({
|
|
|
39334
41117
|
...props
|
|
39335
41118
|
}) {
|
|
39336
41119
|
const Comp = asChild ? Slot5 : "div";
|
|
39337
|
-
return /* @__PURE__ */
|
|
41120
|
+
return /* @__PURE__ */ jsx148(
|
|
39338
41121
|
Comp,
|
|
39339
41122
|
{
|
|
39340
41123
|
"data-slot": "item",
|
|
@@ -39365,7 +41148,7 @@ function ItemMedia({
|
|
|
39365
41148
|
variant = "default",
|
|
39366
41149
|
...props
|
|
39367
41150
|
}) {
|
|
39368
|
-
return /* @__PURE__ */
|
|
41151
|
+
return /* @__PURE__ */ jsx148(
|
|
39369
41152
|
"div",
|
|
39370
41153
|
{
|
|
39371
41154
|
"data-slot": "item-media",
|
|
@@ -39376,7 +41159,7 @@ function ItemMedia({
|
|
|
39376
41159
|
);
|
|
39377
41160
|
}
|
|
39378
41161
|
function ItemContent({ className, ...props }) {
|
|
39379
|
-
return /* @__PURE__ */
|
|
41162
|
+
return /* @__PURE__ */ jsx148(
|
|
39380
41163
|
"div",
|
|
39381
41164
|
{
|
|
39382
41165
|
"data-slot": "item-content",
|
|
@@ -39389,7 +41172,7 @@ function ItemContent({ className, ...props }) {
|
|
|
39389
41172
|
);
|
|
39390
41173
|
}
|
|
39391
41174
|
function ItemTitle({ className, ...props }) {
|
|
39392
|
-
return /* @__PURE__ */
|
|
41175
|
+
return /* @__PURE__ */ jsx148(
|
|
39393
41176
|
"div",
|
|
39394
41177
|
{
|
|
39395
41178
|
"data-slot": "item-title",
|
|
@@ -39402,7 +41185,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
39402
41185
|
);
|
|
39403
41186
|
}
|
|
39404
41187
|
function ItemDescription({ className, ...props }) {
|
|
39405
|
-
return /* @__PURE__ */
|
|
41188
|
+
return /* @__PURE__ */ jsx148(
|
|
39406
41189
|
"p",
|
|
39407
41190
|
{
|
|
39408
41191
|
"data-slot": "item-description",
|
|
@@ -39416,7 +41199,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
39416
41199
|
);
|
|
39417
41200
|
}
|
|
39418
41201
|
function ItemActions({ className, ...props }) {
|
|
39419
|
-
return /* @__PURE__ */
|
|
41202
|
+
return /* @__PURE__ */ jsx148(
|
|
39420
41203
|
"div",
|
|
39421
41204
|
{
|
|
39422
41205
|
"data-slot": "item-actions",
|
|
@@ -39426,7 +41209,7 @@ function ItemActions({ className, ...props }) {
|
|
|
39426
41209
|
);
|
|
39427
41210
|
}
|
|
39428
41211
|
function ItemHeader({ className, ...props }) {
|
|
39429
|
-
return /* @__PURE__ */
|
|
41212
|
+
return /* @__PURE__ */ jsx148(
|
|
39430
41213
|
"div",
|
|
39431
41214
|
{
|
|
39432
41215
|
"data-slot": "item-header",
|
|
@@ -39439,7 +41222,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
39439
41222
|
);
|
|
39440
41223
|
}
|
|
39441
41224
|
function ItemFooter({ className, ...props }) {
|
|
39442
|
-
return /* @__PURE__ */
|
|
41225
|
+
return /* @__PURE__ */ jsx148(
|
|
39443
41226
|
"div",
|
|
39444
41227
|
{
|
|
39445
41228
|
"data-slot": "item-footer",
|
|
@@ -39453,9 +41236,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
39453
41236
|
}
|
|
39454
41237
|
|
|
39455
41238
|
// src/components/ui/kbd.tsx
|
|
39456
|
-
import { jsx as
|
|
41239
|
+
import { jsx as jsx149 } from "react/jsx-runtime";
|
|
39457
41240
|
function Kbd({ className, ...props }) {
|
|
39458
|
-
return /* @__PURE__ */
|
|
41241
|
+
return /* @__PURE__ */ jsx149(
|
|
39459
41242
|
"kbd",
|
|
39460
41243
|
{
|
|
39461
41244
|
"data-slot": "kbd",
|
|
@@ -39470,7 +41253,7 @@ function Kbd({ className, ...props }) {
|
|
|
39470
41253
|
);
|
|
39471
41254
|
}
|
|
39472
41255
|
function KbdGroup({ className, ...props }) {
|
|
39473
|
-
return /* @__PURE__ */
|
|
41256
|
+
return /* @__PURE__ */ jsx149(
|
|
39474
41257
|
"kbd",
|
|
39475
41258
|
{
|
|
39476
41259
|
"data-slot": "kbd-group",
|
|
@@ -39503,7 +41286,7 @@ function useIsMobile() {
|
|
|
39503
41286
|
}
|
|
39504
41287
|
|
|
39505
41288
|
// src/components/ui/sidebar.tsx
|
|
39506
|
-
import { jsx as
|
|
41289
|
+
import { jsx as jsx150, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
39507
41290
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
39508
41291
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
39509
41292
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -39570,7 +41353,7 @@ var SidebarProvider = React100.forwardRef(
|
|
|
39570
41353
|
}),
|
|
39571
41354
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
39572
41355
|
);
|
|
39573
|
-
return /* @__PURE__ */
|
|
41356
|
+
return /* @__PURE__ */ jsx150(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx150(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx150(
|
|
39574
41357
|
"div",
|
|
39575
41358
|
{
|
|
39576
41359
|
style: {
|
|
@@ -39601,7 +41384,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39601
41384
|
}, ref) => {
|
|
39602
41385
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
39603
41386
|
if (collapsible === "none") {
|
|
39604
|
-
return /* @__PURE__ */
|
|
41387
|
+
return /* @__PURE__ */ jsx150(
|
|
39605
41388
|
"div",
|
|
39606
41389
|
{
|
|
39607
41390
|
className: cn(
|
|
@@ -39615,7 +41398,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39615
41398
|
);
|
|
39616
41399
|
}
|
|
39617
41400
|
if (isMobile) {
|
|
39618
|
-
return /* @__PURE__ */
|
|
41401
|
+
return /* @__PURE__ */ jsx150(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs103(
|
|
39619
41402
|
SheetContent,
|
|
39620
41403
|
{
|
|
39621
41404
|
"data-sidebar": "sidebar",
|
|
@@ -39626,16 +41409,16 @@ var Sidebar = React100.forwardRef(
|
|
|
39626
41409
|
},
|
|
39627
41410
|
side,
|
|
39628
41411
|
children: [
|
|
39629
|
-
/* @__PURE__ */
|
|
39630
|
-
/* @__PURE__ */
|
|
39631
|
-
/* @__PURE__ */
|
|
41412
|
+
/* @__PURE__ */ jsxs103(SheetHeader, { className: "sr-only", children: [
|
|
41413
|
+
/* @__PURE__ */ jsx150(SheetTitle, { children: "Sidebar" }),
|
|
41414
|
+
/* @__PURE__ */ jsx150(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
39632
41415
|
] }),
|
|
39633
|
-
/* @__PURE__ */
|
|
41416
|
+
/* @__PURE__ */ jsx150("div", { className: "flex h-full w-full flex-col", children })
|
|
39634
41417
|
]
|
|
39635
41418
|
}
|
|
39636
41419
|
) });
|
|
39637
41420
|
}
|
|
39638
|
-
return /* @__PURE__ */
|
|
41421
|
+
return /* @__PURE__ */ jsxs103(
|
|
39639
41422
|
"div",
|
|
39640
41423
|
{
|
|
39641
41424
|
ref,
|
|
@@ -39645,7 +41428,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39645
41428
|
"data-variant": variant,
|
|
39646
41429
|
"data-side": side,
|
|
39647
41430
|
children: [
|
|
39648
|
-
/* @__PURE__ */
|
|
41431
|
+
/* @__PURE__ */ jsx150(
|
|
39649
41432
|
"div",
|
|
39650
41433
|
{
|
|
39651
41434
|
className: cn(
|
|
@@ -39656,7 +41439,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39656
41439
|
)
|
|
39657
41440
|
}
|
|
39658
41441
|
),
|
|
39659
|
-
/* @__PURE__ */
|
|
41442
|
+
/* @__PURE__ */ jsx150(
|
|
39660
41443
|
"div",
|
|
39661
41444
|
{
|
|
39662
41445
|
className: cn(
|
|
@@ -39667,7 +41450,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39667
41450
|
className
|
|
39668
41451
|
),
|
|
39669
41452
|
...props,
|
|
39670
|
-
children: /* @__PURE__ */
|
|
41453
|
+
children: /* @__PURE__ */ jsx150(
|
|
39671
41454
|
"div",
|
|
39672
41455
|
{
|
|
39673
41456
|
"data-sidebar": "sidebar",
|
|
@@ -39685,7 +41468,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39685
41468
|
Sidebar.displayName = "Sidebar";
|
|
39686
41469
|
var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
39687
41470
|
const { toggleSidebar } = useSidebar();
|
|
39688
|
-
return /* @__PURE__ */
|
|
41471
|
+
return /* @__PURE__ */ jsxs103(
|
|
39689
41472
|
Button,
|
|
39690
41473
|
{
|
|
39691
41474
|
ref,
|
|
@@ -39699,8 +41482,8 @@ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
39699
41482
|
},
|
|
39700
41483
|
...props,
|
|
39701
41484
|
children: [
|
|
39702
|
-
/* @__PURE__ */
|
|
39703
|
-
/* @__PURE__ */
|
|
41485
|
+
/* @__PURE__ */ jsx150(PanelLeft, {}),
|
|
41486
|
+
/* @__PURE__ */ jsx150("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
39704
41487
|
]
|
|
39705
41488
|
}
|
|
39706
41489
|
);
|
|
@@ -39708,7 +41491,7 @@ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
39708
41491
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
39709
41492
|
var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39710
41493
|
const { toggleSidebar } = useSidebar();
|
|
39711
|
-
return /* @__PURE__ */
|
|
41494
|
+
return /* @__PURE__ */ jsx150(
|
|
39712
41495
|
"button",
|
|
39713
41496
|
{
|
|
39714
41497
|
ref,
|
|
@@ -39732,7 +41515,7 @@ var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39732
41515
|
});
|
|
39733
41516
|
SidebarRail.displayName = "SidebarRail";
|
|
39734
41517
|
var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39735
|
-
return /* @__PURE__ */
|
|
41518
|
+
return /* @__PURE__ */ jsx150(
|
|
39736
41519
|
"main",
|
|
39737
41520
|
{
|
|
39738
41521
|
ref,
|
|
@@ -39747,7 +41530,7 @@ var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39747
41530
|
});
|
|
39748
41531
|
SidebarInset.displayName = "SidebarInset";
|
|
39749
41532
|
var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39750
|
-
return /* @__PURE__ */
|
|
41533
|
+
return /* @__PURE__ */ jsx150(
|
|
39751
41534
|
Input,
|
|
39752
41535
|
{
|
|
39753
41536
|
ref,
|
|
@@ -39762,7 +41545,7 @@ var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39762
41545
|
});
|
|
39763
41546
|
SidebarInput.displayName = "SidebarInput";
|
|
39764
41547
|
var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39765
|
-
return /* @__PURE__ */
|
|
41548
|
+
return /* @__PURE__ */ jsx150(
|
|
39766
41549
|
"div",
|
|
39767
41550
|
{
|
|
39768
41551
|
ref,
|
|
@@ -39774,7 +41557,7 @@ var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39774
41557
|
});
|
|
39775
41558
|
SidebarHeader.displayName = "SidebarHeader";
|
|
39776
41559
|
var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39777
|
-
return /* @__PURE__ */
|
|
41560
|
+
return /* @__PURE__ */ jsx150(
|
|
39778
41561
|
"div",
|
|
39779
41562
|
{
|
|
39780
41563
|
ref,
|
|
@@ -39786,7 +41569,7 @@ var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39786
41569
|
});
|
|
39787
41570
|
SidebarFooter.displayName = "SidebarFooter";
|
|
39788
41571
|
var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39789
|
-
return /* @__PURE__ */
|
|
41572
|
+
return /* @__PURE__ */ jsx150(
|
|
39790
41573
|
Separator2,
|
|
39791
41574
|
{
|
|
39792
41575
|
ref,
|
|
@@ -39798,7 +41581,7 @@ var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39798
41581
|
});
|
|
39799
41582
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
39800
41583
|
var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39801
|
-
return /* @__PURE__ */
|
|
41584
|
+
return /* @__PURE__ */ jsx150(
|
|
39802
41585
|
"div",
|
|
39803
41586
|
{
|
|
39804
41587
|
ref,
|
|
@@ -39813,7 +41596,7 @@ var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39813
41596
|
});
|
|
39814
41597
|
SidebarContent.displayName = "SidebarContent";
|
|
39815
41598
|
var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39816
|
-
return /* @__PURE__ */
|
|
41599
|
+
return /* @__PURE__ */ jsx150(
|
|
39817
41600
|
"div",
|
|
39818
41601
|
{
|
|
39819
41602
|
ref,
|
|
@@ -39826,7 +41609,7 @@ var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39826
41609
|
SidebarGroup.displayName = "SidebarGroup";
|
|
39827
41610
|
var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
39828
41611
|
const Comp = asChild ? Slot6 : "div";
|
|
39829
|
-
return /* @__PURE__ */
|
|
41612
|
+
return /* @__PURE__ */ jsx150(
|
|
39830
41613
|
Comp,
|
|
39831
41614
|
{
|
|
39832
41615
|
ref,
|
|
@@ -39843,7 +41626,7 @@ var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...pr
|
|
|
39843
41626
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
39844
41627
|
var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
39845
41628
|
const Comp = asChild ? Slot6 : "button";
|
|
39846
|
-
return /* @__PURE__ */
|
|
41629
|
+
return /* @__PURE__ */ jsx150(
|
|
39847
41630
|
Comp,
|
|
39848
41631
|
{
|
|
39849
41632
|
ref,
|
|
@@ -39860,7 +41643,7 @@ var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...p
|
|
|
39860
41643
|
);
|
|
39861
41644
|
});
|
|
39862
41645
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
39863
|
-
var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41646
|
+
var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
39864
41647
|
"div",
|
|
39865
41648
|
{
|
|
39866
41649
|
ref,
|
|
@@ -39870,7 +41653,7 @@ var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) =>
|
|
|
39870
41653
|
}
|
|
39871
41654
|
));
|
|
39872
41655
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
39873
|
-
var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41656
|
+
var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
39874
41657
|
"ul",
|
|
39875
41658
|
{
|
|
39876
41659
|
ref,
|
|
@@ -39880,7 +41663,7 @@ var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
39880
41663
|
}
|
|
39881
41664
|
));
|
|
39882
41665
|
SidebarMenu.displayName = "SidebarMenu";
|
|
39883
|
-
var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41666
|
+
var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
39884
41667
|
"li",
|
|
39885
41668
|
{
|
|
39886
41669
|
ref,
|
|
@@ -39922,7 +41705,7 @@ var SidebarMenuButton = React100.forwardRef(
|
|
|
39922
41705
|
}, ref) => {
|
|
39923
41706
|
const Comp = asChild ? Slot6 : "button";
|
|
39924
41707
|
const { isMobile, state } = useSidebar();
|
|
39925
|
-
const button = /* @__PURE__ */
|
|
41708
|
+
const button = /* @__PURE__ */ jsx150(
|
|
39926
41709
|
Comp,
|
|
39927
41710
|
{
|
|
39928
41711
|
ref,
|
|
@@ -39941,9 +41724,9 @@ var SidebarMenuButton = React100.forwardRef(
|
|
|
39941
41724
|
children: tooltip
|
|
39942
41725
|
};
|
|
39943
41726
|
}
|
|
39944
|
-
return /* @__PURE__ */
|
|
39945
|
-
/* @__PURE__ */
|
|
39946
|
-
/* @__PURE__ */
|
|
41727
|
+
return /* @__PURE__ */ jsxs103(Tooltip, { children: [
|
|
41728
|
+
/* @__PURE__ */ jsx150(TooltipTrigger, { asChild: true, children: button }),
|
|
41729
|
+
/* @__PURE__ */ jsx150(
|
|
39947
41730
|
TooltipContent,
|
|
39948
41731
|
{
|
|
39949
41732
|
side: "right",
|
|
@@ -39958,7 +41741,7 @@ var SidebarMenuButton = React100.forwardRef(
|
|
|
39958
41741
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
39959
41742
|
var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
39960
41743
|
const Comp = asChild ? Slot6 : "button";
|
|
39961
|
-
return /* @__PURE__ */
|
|
41744
|
+
return /* @__PURE__ */ jsx150(
|
|
39962
41745
|
Comp,
|
|
39963
41746
|
{
|
|
39964
41747
|
ref,
|
|
@@ -39979,7 +41762,7 @@ var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showO
|
|
|
39979
41762
|
);
|
|
39980
41763
|
});
|
|
39981
41764
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
39982
|
-
var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41765
|
+
var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
39983
41766
|
"div",
|
|
39984
41767
|
{
|
|
39985
41768
|
ref,
|
|
@@ -40001,7 +41784,7 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
|
|
|
40001
41784
|
const width = React100.useMemo(() => {
|
|
40002
41785
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
40003
41786
|
}, []);
|
|
40004
|
-
return /* @__PURE__ */
|
|
41787
|
+
return /* @__PURE__ */ jsxs103(
|
|
40005
41788
|
"div",
|
|
40006
41789
|
{
|
|
40007
41790
|
ref,
|
|
@@ -40009,14 +41792,14 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
|
|
|
40009
41792
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
40010
41793
|
...props,
|
|
40011
41794
|
children: [
|
|
40012
|
-
showIcon && /* @__PURE__ */
|
|
41795
|
+
showIcon && /* @__PURE__ */ jsx150(
|
|
40013
41796
|
Skeleton,
|
|
40014
41797
|
{
|
|
40015
41798
|
className: "size-4 rounded-md",
|
|
40016
41799
|
"data-sidebar": "menu-skeleton-icon"
|
|
40017
41800
|
}
|
|
40018
41801
|
),
|
|
40019
|
-
/* @__PURE__ */
|
|
41802
|
+
/* @__PURE__ */ jsx150(
|
|
40020
41803
|
Skeleton,
|
|
40021
41804
|
{
|
|
40022
41805
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -40031,7 +41814,7 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
|
|
|
40031
41814
|
);
|
|
40032
41815
|
});
|
|
40033
41816
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
40034
|
-
var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41817
|
+
var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
40035
41818
|
"ul",
|
|
40036
41819
|
{
|
|
40037
41820
|
ref,
|
|
@@ -40045,11 +41828,11 @@ var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
40045
41828
|
}
|
|
40046
41829
|
));
|
|
40047
41830
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
40048
|
-
var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */
|
|
41831
|
+
var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx150("li", { ref, ...props }));
|
|
40049
41832
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
40050
41833
|
var SidebarMenuSubButton = React100.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
40051
41834
|
const Comp = asChild ? Slot6 : "a";
|
|
40052
|
-
return /* @__PURE__ */
|
|
41835
|
+
return /* @__PURE__ */ jsx150(
|
|
40053
41836
|
Comp,
|
|
40054
41837
|
{
|
|
40055
41838
|
ref,
|
|
@@ -40073,20 +41856,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
40073
41856
|
// src/components/ui/sonner.tsx
|
|
40074
41857
|
import { useTheme } from "next-themes";
|
|
40075
41858
|
import { Toaster as Sonner } from "sonner";
|
|
40076
|
-
import { jsx as
|
|
41859
|
+
import { jsx as jsx151 } from "react/jsx-runtime";
|
|
40077
41860
|
var Toaster = ({ ...props }) => {
|
|
40078
41861
|
const { theme = "system" } = useTheme();
|
|
40079
|
-
return /* @__PURE__ */
|
|
41862
|
+
return /* @__PURE__ */ jsx151(
|
|
40080
41863
|
Sonner,
|
|
40081
41864
|
{
|
|
40082
41865
|
theme,
|
|
40083
41866
|
className: "toaster group",
|
|
40084
41867
|
icons: {
|
|
40085
|
-
success: /* @__PURE__ */
|
|
40086
|
-
info: /* @__PURE__ */
|
|
40087
|
-
warning: /* @__PURE__ */
|
|
40088
|
-
error: /* @__PURE__ */
|
|
40089
|
-
loading: /* @__PURE__ */
|
|
41868
|
+
success: /* @__PURE__ */ jsx151(CircleCheck, { className: "h-4 w-4" }),
|
|
41869
|
+
info: /* @__PURE__ */ jsx151(Info, { className: "h-4 w-4" }),
|
|
41870
|
+
warning: /* @__PURE__ */ jsx151(TriangleAlert, { className: "h-4 w-4" }),
|
|
41871
|
+
error: /* @__PURE__ */ jsx151(OctagonX, { className: "h-4 w-4" }),
|
|
41872
|
+
loading: /* @__PURE__ */ jsx151(LoaderCircle, { className: "h-4 w-4 animate-spin" })
|
|
40090
41873
|
},
|
|
40091
41874
|
toastOptions: {
|
|
40092
41875
|
classNames: {
|
|
@@ -40104,24 +41887,24 @@ var Toaster = ({ ...props }) => {
|
|
|
40104
41887
|
// src/components/ui/toggle-group.tsx
|
|
40105
41888
|
import * as React101 from "react";
|
|
40106
41889
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
40107
|
-
import { jsx as
|
|
41890
|
+
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
40108
41891
|
var ToggleGroupContext = React101.createContext({
|
|
40109
41892
|
size: "default",
|
|
40110
41893
|
variant: "default"
|
|
40111
41894
|
});
|
|
40112
|
-
var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */
|
|
41895
|
+
var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx152(
|
|
40113
41896
|
ToggleGroupPrimitive.Root,
|
|
40114
41897
|
{
|
|
40115
41898
|
ref,
|
|
40116
41899
|
className: cn("flex items-center justify-center gap-1", className),
|
|
40117
41900
|
...props,
|
|
40118
|
-
children: /* @__PURE__ */
|
|
41901
|
+
children: /* @__PURE__ */ jsx152(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
40119
41902
|
}
|
|
40120
41903
|
));
|
|
40121
41904
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
40122
41905
|
var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
40123
41906
|
const context = React101.useContext(ToggleGroupContext);
|
|
40124
|
-
return /* @__PURE__ */
|
|
41907
|
+
return /* @__PURE__ */ jsx152(
|
|
40125
41908
|
ToggleGroupPrimitive.Item,
|
|
40126
41909
|
{
|
|
40127
41910
|
ref,
|
|
@@ -40140,7 +41923,7 @@ var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size,
|
|
|
40140
41923
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
40141
41924
|
|
|
40142
41925
|
// src/render/PXEngineRenderer.tsx
|
|
40143
|
-
import { jsx as
|
|
41926
|
+
import { jsx as jsx153, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
40144
41927
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
40145
41928
|
// Form components - require FormField + FormItem context
|
|
40146
41929
|
"FormLabel",
|
|
@@ -40232,24 +42015,24 @@ var COMPONENT_SUGGESTIONS = {
|
|
|
40232
42015
|
};
|
|
40233
42016
|
var renderContextDependentError = (componentName, normalizedName, key) => {
|
|
40234
42017
|
const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
|
|
40235
|
-
return /* @__PURE__ */
|
|
42018
|
+
return /* @__PURE__ */ jsxs104(
|
|
40236
42019
|
"div",
|
|
40237
42020
|
{
|
|
40238
42021
|
className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
|
|
40239
42022
|
children: [
|
|
40240
|
-
/* @__PURE__ */
|
|
40241
|
-
/* @__PURE__ */
|
|
40242
|
-
/* @__PURE__ */
|
|
40243
|
-
/* @__PURE__ */
|
|
42023
|
+
/* @__PURE__ */ jsxs104("div", { className: "flex items-start gap-2", children: [
|
|
42024
|
+
/* @__PURE__ */ jsx153("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
|
|
42025
|
+
/* @__PURE__ */ jsxs104("div", { className: "flex-1", children: [
|
|
42026
|
+
/* @__PURE__ */ jsxs104("p", { className: "text-sm font-semibold text-amber-900", children: [
|
|
40244
42027
|
"Invalid Component: ",
|
|
40245
42028
|
componentName
|
|
40246
42029
|
] }),
|
|
40247
|
-
/* @__PURE__ */
|
|
42030
|
+
/* @__PURE__ */ jsx153("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
|
|
40248
42031
|
] })
|
|
40249
42032
|
] }),
|
|
40250
|
-
/* @__PURE__ */
|
|
40251
|
-
/* @__PURE__ */
|
|
40252
|
-
/* @__PURE__ */
|
|
42033
|
+
/* @__PURE__ */ jsxs104("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
|
|
42034
|
+
/* @__PURE__ */ jsx153("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
|
|
42035
|
+
/* @__PURE__ */ jsx153("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
|
|
40253
42036
|
] })
|
|
40254
42037
|
]
|
|
40255
42038
|
},
|
|
@@ -40408,7 +42191,7 @@ var PXEngineRenderer = ({
|
|
|
40408
42191
|
const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
|
|
40409
42192
|
const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
|
|
40410
42193
|
if (isAtomWithRenderProp) {
|
|
40411
|
-
return /* @__PURE__ */
|
|
42194
|
+
return /* @__PURE__ */ jsx153(
|
|
40412
42195
|
TargetComponent,
|
|
40413
42196
|
{
|
|
40414
42197
|
...finalProps,
|
|
@@ -40420,7 +42203,7 @@ var PXEngineRenderer = ({
|
|
|
40420
42203
|
uniqueKey
|
|
40421
42204
|
);
|
|
40422
42205
|
} else {
|
|
40423
|
-
return /* @__PURE__ */
|
|
42206
|
+
return /* @__PURE__ */ jsx153(
|
|
40424
42207
|
TargetComponent,
|
|
40425
42208
|
{
|
|
40426
42209
|
...finalProps,
|
|
@@ -40432,7 +42215,7 @@ var PXEngineRenderer = ({
|
|
|
40432
42215
|
);
|
|
40433
42216
|
}
|
|
40434
42217
|
};
|
|
40435
|
-
return /* @__PURE__ */
|
|
42218
|
+
return /* @__PURE__ */ jsx153("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
|
|
40436
42219
|
};
|
|
40437
42220
|
export {
|
|
40438
42221
|
Accordion,
|
|
@@ -40527,6 +42310,7 @@ export {
|
|
|
40527
42310
|
CountrySelectEdit,
|
|
40528
42311
|
CreatorActionHeader,
|
|
40529
42312
|
CreatorCompactView,
|
|
42313
|
+
CreatorExpandedPanel,
|
|
40530
42314
|
CreatorGridCard,
|
|
40531
42315
|
CreatorImageList,
|
|
40532
42316
|
CreatorProfileSummary,
|
|
@@ -40712,6 +42496,8 @@ export {
|
|
|
40712
42496
|
VideoAtom,
|
|
40713
42497
|
WorkflowVisualizer,
|
|
40714
42498
|
cn,
|
|
42499
|
+
defaultFetchSelections,
|
|
42500
|
+
defaultPersistSelection,
|
|
40715
42501
|
generateFieldsFromData,
|
|
40716
42502
|
generateFieldsFromPropDefinitions,
|
|
40717
42503
|
useCreatorWidgetPolling
|