pxengine 0.1.46 → 0.1.48
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 +2221 -436
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -8
- package/dist/index.d.ts +68 -8
- package/dist/index.mjs +2322 -540
- 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,41 @@ 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
|
+
async function defaultFetchSelections(sessionId) {
|
|
35633
|
+
try {
|
|
35634
|
+
const res = await fetch(
|
|
35635
|
+
`/api/agents-proxy/custom-agents/sessions/${sessionId}/mcq-selections/get`,
|
|
35636
|
+
{
|
|
35637
|
+
method: "POST",
|
|
35638
|
+
headers: { "Content-Type": "application/json" },
|
|
35639
|
+
body: "{}"
|
|
35640
|
+
}
|
|
35641
|
+
);
|
|
35642
|
+
if (!res.ok) return {};
|
|
35643
|
+
const data = await res.json();
|
|
35644
|
+
return data.selections || {};
|
|
35645
|
+
} catch {
|
|
35646
|
+
return {};
|
|
35647
|
+
}
|
|
35648
|
+
}
|
|
35649
|
+
async function defaultPersistSelection(sessionId, questionKey, value) {
|
|
35650
|
+
try {
|
|
35651
|
+
await fetch(
|
|
35652
|
+
`/api/agents-proxy/custom-agents/sessions/${sessionId}/mcq-selections`,
|
|
35653
|
+
{
|
|
35654
|
+
method: "PATCH",
|
|
35655
|
+
headers: { "Content-Type": "application/json" },
|
|
35656
|
+
body: JSON.stringify({ question_key: questionKey, value })
|
|
35657
|
+
}
|
|
35658
|
+
);
|
|
35659
|
+
} catch (err) {
|
|
35660
|
+
console.warn("[MCQ persist failed]", err);
|
|
35661
|
+
}
|
|
35662
|
+
}
|
|
35663
|
+
|
|
35664
|
+
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
35619
35665
|
import { jsx as jsx109, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
35620
35666
|
var MCQCard = React92.memo(
|
|
35621
35667
|
({
|
|
@@ -35628,22 +35674,39 @@ var MCQCard = React92.memo(
|
|
|
35628
35674
|
isLatestMessage = true,
|
|
35629
35675
|
isLoading = false,
|
|
35630
35676
|
className,
|
|
35631
|
-
// selectionStatus,
|
|
35632
35677
|
onAction,
|
|
35633
35678
|
disabled = false,
|
|
35634
|
-
disableContinueInDiscovery
|
|
35635
|
-
//
|
|
35679
|
+
disableContinueInDiscovery,
|
|
35680
|
+
// Self-contained props
|
|
35681
|
+
sessionId,
|
|
35682
|
+
sendMessage,
|
|
35683
|
+
fetchSelections = defaultFetchSelections,
|
|
35684
|
+
persistSelection = defaultPersistSelection
|
|
35636
35685
|
}) => {
|
|
35637
35686
|
const [selectedOption, setSelectedOption] = React92.useState(
|
|
35638
35687
|
propsSelectedOption
|
|
35639
35688
|
);
|
|
35640
35689
|
const [isProceeded, setIsProceeded] = React92.useState(false);
|
|
35690
|
+
const fetchedSessionRef = React92.useRef("");
|
|
35641
35691
|
React92.useEffect(() => {
|
|
35642
35692
|
if (propsSelectedOption) {
|
|
35643
35693
|
setSelectedOption(propsSelectedOption);
|
|
35644
35694
|
setIsProceeded(true);
|
|
35645
35695
|
}
|
|
35646
35696
|
}, [propsSelectedOption]);
|
|
35697
|
+
React92.useEffect(() => {
|
|
35698
|
+
if (!sessionId || fetchedSessionRef.current === sessionId) return;
|
|
35699
|
+
if (propsSelectedOption) return;
|
|
35700
|
+
fetchedSessionRef.current = sessionId;
|
|
35701
|
+
const questionKey = question || "unknown";
|
|
35702
|
+
fetchSelections(sessionId).then((selections) => {
|
|
35703
|
+
const stored = selections[questionKey];
|
|
35704
|
+
if (stored) {
|
|
35705
|
+
setSelectedOption(stored);
|
|
35706
|
+
setIsProceeded(true);
|
|
35707
|
+
}
|
|
35708
|
+
});
|
|
35709
|
+
}, [sessionId, question, propsSelectedOption, fetchSelections]);
|
|
35647
35710
|
const isDiscovery = disableContinueInDiscovery !== void 0 ? disableContinueInDiscovery : typeof window !== "undefined" && window.location.pathname.includes("creator-discovery");
|
|
35648
35711
|
const handleOptionClick = (key, e) => {
|
|
35649
35712
|
e.preventDefault();
|
|
@@ -35658,12 +35721,20 @@ var MCQCard = React92.memo(
|
|
|
35658
35721
|
e.stopPropagation();
|
|
35659
35722
|
if ((selectedOption || recommended) && !disabled && !isProceeded) {
|
|
35660
35723
|
const result = selectedOption || recommended || "";
|
|
35724
|
+
const label = options && options[result] || result;
|
|
35661
35725
|
setIsProceeded(true);
|
|
35726
|
+
if (sessionId) {
|
|
35727
|
+
const questionKey = question || "unknown";
|
|
35728
|
+
persistSelection(sessionId, questionKey, result);
|
|
35729
|
+
}
|
|
35730
|
+
if (sendMessage) {
|
|
35731
|
+
sendMessage(`Selected: ${label}`);
|
|
35732
|
+
}
|
|
35662
35733
|
onProceed?.(result);
|
|
35663
35734
|
onAction?.({
|
|
35664
35735
|
type: "mcq_selection",
|
|
35665
35736
|
value: result,
|
|
35666
|
-
label
|
|
35737
|
+
label
|
|
35667
35738
|
});
|
|
35668
35739
|
}
|
|
35669
35740
|
};
|
|
@@ -36668,7 +36739,7 @@ var CampaignConceptCard = React94.memo(
|
|
|
36668
36739
|
CampaignConceptCard.displayName = "CampaignConceptCard";
|
|
36669
36740
|
|
|
36670
36741
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
|
|
36671
|
-
import { useCallback as
|
|
36742
|
+
import { useCallback as useCallback7, useState as useState17, memo } from "react";
|
|
36672
36743
|
|
|
36673
36744
|
// src/molecules/creator-discovery/CreatorWidget/CreatorImageList.tsx
|
|
36674
36745
|
import { useEffect as useEffect7, useState as useState10 } from "react";
|
|
@@ -36797,137 +36868,1808 @@ function ProgressBar({ overallPercentage }) {
|
|
|
36797
36868
|
}
|
|
36798
36869
|
) })
|
|
36799
36870
|
}
|
|
36800
|
-
) }) });
|
|
36871
|
+
) }) });
|
|
36872
|
+
}
|
|
36873
|
+
function CreatorProgressBar({
|
|
36874
|
+
statusDetails,
|
|
36875
|
+
timeRemaining: _timeRemaining
|
|
36876
|
+
}) {
|
|
36877
|
+
return /* @__PURE__ */ jsxs82("div", { children: [
|
|
36878
|
+
/* @__PURE__ */ jsx123(ProgressBar, { overallPercentage: statusDetails?.overall_percentage }),
|
|
36879
|
+
/* @__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..." }) })
|
|
36880
|
+
] });
|
|
36881
|
+
}
|
|
36882
|
+
|
|
36883
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorWidgetSkeleton.tsx
|
|
36884
|
+
import { jsx as jsx124, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
36885
|
+
function CreatorWidgetSkeleton() {
|
|
36886
|
+
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: [
|
|
36887
|
+
/* @__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: [
|
|
36888
|
+
/* @__PURE__ */ jsx124("div", { className: "w-40 h-6 bg-purple200 rounded-md animate-pulse" }),
|
|
36889
|
+
/* @__PURE__ */ jsx124("div", { className: "w-64 h-7 bg-gray200 dark:bg-gray300 rounded animate-pulse" })
|
|
36890
|
+
] }) }),
|
|
36891
|
+
/* @__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: [
|
|
36892
|
+
/* @__PURE__ */ jsxs83("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
|
|
36893
|
+
/* @__PURE__ */ jsx124("div", { className: "flex -space-x-2", children: Array.from({ length: 10 }).map((_, idx) => /* @__PURE__ */ jsx124(
|
|
36894
|
+
"div",
|
|
36895
|
+
{
|
|
36896
|
+
className: "w-8 h-8 md:w-10 md:h-10 rounded-full border-2 border-gray300 bg-gray200 animate-pulse"
|
|
36897
|
+
},
|
|
36898
|
+
idx
|
|
36899
|
+
)) }),
|
|
36900
|
+
/* @__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" }) })
|
|
36901
|
+
] }),
|
|
36902
|
+
/* @__PURE__ */ jsx124("div", { className: "px-6 py-2 bg-gray200 rounded-[30px] animate-pulse h-10 w-48" })
|
|
36903
|
+
] })
|
|
36904
|
+
] }) });
|
|
36905
|
+
}
|
|
36906
|
+
|
|
36907
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorCompactView.tsx
|
|
36908
|
+
import { Fragment as Fragment5, jsx as jsx125, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
36909
|
+
function CreatorCompactView({
|
|
36910
|
+
versions,
|
|
36911
|
+
selectedVersion,
|
|
36912
|
+
creatorImages,
|
|
36913
|
+
creatorLength,
|
|
36914
|
+
isAgentOutput,
|
|
36915
|
+
onVersionSelect,
|
|
36916
|
+
onViewCreators,
|
|
36917
|
+
versionStatus,
|
|
36918
|
+
statusDetails,
|
|
36919
|
+
timeDisplay,
|
|
36920
|
+
isLoading
|
|
36921
|
+
}) {
|
|
36922
|
+
const isComplete = versionStatus === "completed" || versionStatus === "complete";
|
|
36923
|
+
const statusTitle = isComplete ? "Creator Search Complete" : versionStatus === "failed" ? "Creator Search Failed" : "Creator Search Processing";
|
|
36924
|
+
if (isLoading) {
|
|
36925
|
+
return /* @__PURE__ */ jsx125(CreatorWidgetSkeleton, {});
|
|
36926
|
+
}
|
|
36927
|
+
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: [
|
|
36928
|
+
/* @__PURE__ */ jsxs84("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 relative", children: [
|
|
36929
|
+
/* @__PURE__ */ jsxs84("div", { className: "flex flex-col gap-2 md:gap-4", children: [
|
|
36930
|
+
/* @__PURE__ */ jsx125("h4", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] text-xs font-medium text-purpleText", children: "VERIFIED CREATORS LIST" }),
|
|
36931
|
+
/* @__PURE__ */ jsx125("h3", { className: "text-gray900 md:text-lg font-bold", children: statusTitle })
|
|
36932
|
+
] }),
|
|
36933
|
+
versions.length > 1 && /* @__PURE__ */ jsx125("div", { className: "relative md:self-start", children: /* @__PURE__ */ jsxs84(DropdownMenu, { children: [
|
|
36934
|
+
/* @__PURE__ */ jsxs84(
|
|
36935
|
+
DropdownMenuTrigger,
|
|
36936
|
+
{
|
|
36937
|
+
disabled: !isComplete,
|
|
36938
|
+
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"}`,
|
|
36939
|
+
children: [
|
|
36940
|
+
"Version ",
|
|
36941
|
+
selectedVersion ?? "-",
|
|
36942
|
+
/* @__PURE__ */ jsx125(ChevronDown, { className: "w-3 h-3 md:w-4 md:h-4 transition-transform" })
|
|
36943
|
+
]
|
|
36944
|
+
}
|
|
36945
|
+
),
|
|
36946
|
+
/* @__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(
|
|
36947
|
+
DropdownMenuItem,
|
|
36948
|
+
{
|
|
36949
|
+
onClick: () => onVersionSelect(v),
|
|
36950
|
+
className: "cursor-pointer text-sm",
|
|
36951
|
+
children: [
|
|
36952
|
+
"Version ",
|
|
36953
|
+
v
|
|
36954
|
+
]
|
|
36955
|
+
},
|
|
36956
|
+
v
|
|
36957
|
+
)) })
|
|
36958
|
+
] }) })
|
|
36959
|
+
] }),
|
|
36960
|
+
/* @__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: [
|
|
36961
|
+
/* @__PURE__ */ jsx125("p", { className: "text-base md:text-lg font-semibold mb-2", children: "Creator Search Failed" }),
|
|
36962
|
+
/* @__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." })
|
|
36963
|
+
] }) : /* @__PURE__ */ jsxs84(Fragment5, { children: [
|
|
36964
|
+
/* @__PURE__ */ jsxs84("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
|
|
36965
|
+
/* @__PURE__ */ jsx125(
|
|
36966
|
+
CreatorImageList,
|
|
36967
|
+
{
|
|
36968
|
+
creatorImages,
|
|
36969
|
+
creatorLength,
|
|
36970
|
+
isAgentOutput,
|
|
36971
|
+
initialCreatorsPercentage: statusDetails?.social_fetch_percentage
|
|
36972
|
+
}
|
|
36973
|
+
),
|
|
36974
|
+
/* @__PURE__ */ jsx125(
|
|
36975
|
+
CreatorProgressBar,
|
|
36976
|
+
{
|
|
36977
|
+
statusDetails,
|
|
36978
|
+
timeRemaining: timeDisplay
|
|
36979
|
+
}
|
|
36980
|
+
)
|
|
36981
|
+
] }),
|
|
36982
|
+
/* @__PURE__ */ jsxs84(
|
|
36983
|
+
"button",
|
|
36984
|
+
{
|
|
36985
|
+
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"}`,
|
|
36986
|
+
onClick: onViewCreators,
|
|
36987
|
+
disabled: !isComplete,
|
|
36988
|
+
children: [
|
|
36989
|
+
"View ",
|
|
36990
|
+
creatorLength,
|
|
36991
|
+
" Verified Creators",
|
|
36992
|
+
/* @__PURE__ */ jsx125(Triangle, { className: "w-3 h-3 md:w-4 md:h-4 rotate-90 font-bold" })
|
|
36993
|
+
]
|
|
36994
|
+
}
|
|
36995
|
+
)
|
|
36996
|
+
] }) })
|
|
36997
|
+
] }) });
|
|
36998
|
+
}
|
|
36999
|
+
|
|
37000
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
|
|
37001
|
+
import { useState as useState15, useEffect as useEffect10, useCallback as useCallback5 } from "react";
|
|
37002
|
+
import ReactDOM2 from "react-dom";
|
|
37003
|
+
import { AnimatePresence as AnimatePresence4, motion as motion5 } from "framer-motion";
|
|
37004
|
+
|
|
37005
|
+
// src/molecules/creator-discovery/CreatorWidget/defaultFetchers.ts
|
|
37006
|
+
async function defaultFetchVersions(params) {
|
|
37007
|
+
const versionParam = params.version ? `&version=${params.version}` : "";
|
|
37008
|
+
const res = await fetch(
|
|
37009
|
+
`/api/get-creator-versions?sessionId=${params.sessionId}${versionParam}&validated=${params.validated}`
|
|
37010
|
+
);
|
|
37011
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
37012
|
+
return res.json();
|
|
37013
|
+
}
|
|
37014
|
+
async function defaultFetchStatus(params) {
|
|
37015
|
+
const res = await fetch(
|
|
37016
|
+
`/api/get-creator-detail-status?session_id=${params.sessionId}&version_no=${params.versionNo}`
|
|
37017
|
+
);
|
|
37018
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
37019
|
+
return res.json();
|
|
37020
|
+
}
|
|
37021
|
+
async function defaultFetchCreatorDetails(params) {
|
|
37022
|
+
const res = await fetch("/api/get-creator-details-by-id", {
|
|
37023
|
+
method: "POST",
|
|
37024
|
+
headers: { "Content-Type": "application/json" },
|
|
37025
|
+
body: JSON.stringify({
|
|
37026
|
+
creator_ids: params.creatorIds,
|
|
37027
|
+
session_id: params.sessionId,
|
|
37028
|
+
version_no: params.versionNo
|
|
37029
|
+
})
|
|
37030
|
+
});
|
|
37031
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
37032
|
+
return res.json();
|
|
37033
|
+
}
|
|
37034
|
+
|
|
37035
|
+
// src/molecules/creator-discovery/CreatorWidget/countries.ts
|
|
37036
|
+
var countries2 = [
|
|
37037
|
+
{ code: "AF", name: "Afghanistan", flag: "\u{1F1E6}\u{1F1EB}" },
|
|
37038
|
+
{ code: "AL", name: "Albania", flag: "\u{1F1E6}\u{1F1F1}" },
|
|
37039
|
+
{ code: "DZ", name: "Algeria", flag: "\u{1F1E9}\u{1F1FF}" },
|
|
37040
|
+
{ code: "AD", name: "Andorra", flag: "\u{1F1E6}\u{1F1E9}" },
|
|
37041
|
+
{ code: "AO", name: "Angola", flag: "\u{1F1E6}\u{1F1F4}" },
|
|
37042
|
+
{ code: "AG", name: "Antigua and Barbuda", flag: "\u{1F1E6}\u{1F1EC}" },
|
|
37043
|
+
{ code: "AR", name: "Argentina", flag: "\u{1F1E6}\u{1F1F7}" },
|
|
37044
|
+
{ code: "AM", name: "Armenia", flag: "\u{1F1E6}\u{1F1F2}" },
|
|
37045
|
+
{ code: "AU", name: "Australia", flag: "\u{1F1E6}\u{1F1FA}" },
|
|
37046
|
+
{ code: "AT", name: "Austria", flag: "\u{1F1E6}\u{1F1F9}" },
|
|
37047
|
+
{ code: "AZ", name: "Azerbaijan", flag: "\u{1F1E6}\u{1F1FF}" },
|
|
37048
|
+
{ code: "BS", name: "Bahamas", flag: "\u{1F1E7}\u{1F1F8}" },
|
|
37049
|
+
{ code: "BH", name: "Bahrain", flag: "\u{1F1E7}\u{1F1ED}" },
|
|
37050
|
+
{ code: "BD", name: "Bangladesh", flag: "\u{1F1E7}\u{1F1E9}" },
|
|
37051
|
+
{ code: "BB", name: "Barbados", flag: "\u{1F1E7}\u{1F1E7}" },
|
|
37052
|
+
{ code: "BY", name: "Belarus", flag: "\u{1F1E7}\u{1F1FE}" },
|
|
37053
|
+
{ code: "BE", name: "Belgium", flag: "\u{1F1E7}\u{1F1EA}" },
|
|
37054
|
+
{ code: "BZ", name: "Belize", flag: "\u{1F1E7}\u{1F1FF}" },
|
|
37055
|
+
{ code: "BJ", name: "Benin", flag: "\u{1F1E7}\u{1F1EF}" },
|
|
37056
|
+
{ code: "BT", name: "Bhutan", flag: "\u{1F1E7}\u{1F1F9}" },
|
|
37057
|
+
{ code: "BO", name: "Bolivia", flag: "\u{1F1E7}\u{1F1F4}" },
|
|
37058
|
+
{ code: "BA", name: "Bosnia and Herzegovina", flag: "\u{1F1E7}\u{1F1E6}" },
|
|
37059
|
+
{ code: "BW", name: "Botswana", flag: "\u{1F1E7}\u{1F1FC}" },
|
|
37060
|
+
{ code: "BR", name: "Brazil", flag: "\u{1F1E7}\u{1F1F7}" },
|
|
37061
|
+
{ code: "BN", name: "Brunei", flag: "\u{1F1E7}\u{1F1F3}" },
|
|
37062
|
+
{ code: "BG", name: "Bulgaria", flag: "\u{1F1E7}\u{1F1EC}" },
|
|
37063
|
+
{ code: "BF", name: "Burkina Faso", flag: "\u{1F1E7}\u{1F1EB}" },
|
|
37064
|
+
{ code: "BI", name: "Burundi", flag: "\u{1F1E7}\u{1F1EE}" },
|
|
37065
|
+
{ code: "CV", name: "Cabo Verde", flag: "\u{1F1E8}\u{1F1FB}" },
|
|
37066
|
+
{ code: "KH", name: "Cambodia", flag: "\u{1F1F0}\u{1F1ED}" },
|
|
37067
|
+
{ code: "CM", name: "Cameroon", flag: "\u{1F1E8}\u{1F1F2}" },
|
|
37068
|
+
{ code: "CA", name: "Canada", flag: "\u{1F1E8}\u{1F1E6}" },
|
|
37069
|
+
{ code: "CF", name: "Central African Republic", flag: "\u{1F1E8}\u{1F1EB}" },
|
|
37070
|
+
{ code: "TD", name: "Chad", flag: "\u{1F1F9}\u{1F1E9}" },
|
|
37071
|
+
{ code: "CL", name: "Chile", flag: "\u{1F1E8}\u{1F1F1}" },
|
|
37072
|
+
{ code: "CN", name: "China", flag: "\u{1F1E8}\u{1F1F3}" },
|
|
37073
|
+
{ code: "CO", name: "Colombia", flag: "\u{1F1E8}\u{1F1F4}" },
|
|
37074
|
+
{ code: "KM", name: "Comoros", flag: "\u{1F1F0}\u{1F1F2}" },
|
|
37075
|
+
{ code: "CG", name: "Congo", flag: "\u{1F1E8}\u{1F1EC}" },
|
|
37076
|
+
{ code: "CD", name: "Democratic Republic of the Congo", flag: "\u{1F1E8}\u{1F1E9}" },
|
|
37077
|
+
{ code: "CR", name: "Costa Rica", flag: "\u{1F1E8}\u{1F1F7}" },
|
|
37078
|
+
{ code: "HR", name: "Croatia", flag: "\u{1F1ED}\u{1F1F7}" },
|
|
37079
|
+
{ code: "CU", name: "Cuba", flag: "\u{1F1E8}\u{1F1FA}" },
|
|
37080
|
+
{ code: "CY", name: "Cyprus", flag: "\u{1F1E8}\u{1F1FE}" },
|
|
37081
|
+
{ code: "CZ", name: "Czech Republic", flag: "\u{1F1E8}\u{1F1FF}" },
|
|
37082
|
+
{ code: "CI", name: "Ivory Coast", flag: "\u{1F1E8}\u{1F1EE}" },
|
|
37083
|
+
{ code: "DK", name: "Denmark", flag: "\u{1F1E9}\u{1F1F0}" },
|
|
37084
|
+
{ code: "DJ", name: "Djibouti", flag: "\u{1F1E9}\u{1F1EF}" },
|
|
37085
|
+
{ code: "DM", name: "Dominica", flag: "\u{1F1E9}\u{1F1F2}" },
|
|
37086
|
+
{ code: "DO", name: "Dominican Republic", flag: "\u{1F1E9}\u{1F1F4}" },
|
|
37087
|
+
{ code: "EC", name: "Ecuador", flag: "\u{1F1EA}\u{1F1E8}" },
|
|
37088
|
+
{ code: "EG", name: "Egypt", flag: "\u{1F1EA}\u{1F1EC}" },
|
|
37089
|
+
{ code: "SV", name: "El Salvador", flag: "\u{1F1F8}\u{1F1FB}" },
|
|
37090
|
+
{ code: "GQ", name: "Equatorial Guinea", flag: "\u{1F1EC}\u{1F1F6}" },
|
|
37091
|
+
{ code: "ER", name: "Eritrea", flag: "\u{1F1EA}\u{1F1F7}" },
|
|
37092
|
+
{ code: "EE", name: "Estonia", flag: "\u{1F1EA}\u{1F1EA}" },
|
|
37093
|
+
{ code: "SZ", name: "Eswatini", flag: "\u{1F1F8}\u{1F1FF}" },
|
|
37094
|
+
{ code: "ET", name: "Ethiopia", flag: "\u{1F1EA}\u{1F1F9}" },
|
|
37095
|
+
{ code: "FJ", name: "Fiji", flag: "\u{1F1EB}\u{1F1EF}" },
|
|
37096
|
+
{ code: "FI", name: "Finland", flag: "\u{1F1EB}\u{1F1EE}" },
|
|
37097
|
+
{ code: "FR", name: "France", flag: "\u{1F1EB}\u{1F1F7}" },
|
|
37098
|
+
{ code: "GA", name: "Gabon", flag: "\u{1F1EC}\u{1F1E6}" },
|
|
37099
|
+
{ code: "GM", name: "Gambia", flag: "\u{1F1EC}\u{1F1F2}" },
|
|
37100
|
+
{ code: "GE", name: "Georgia", flag: "\u{1F1EC}\u{1F1EA}" },
|
|
37101
|
+
{ code: "DE", name: "Germany", flag: "\u{1F1E9}\u{1F1EA}" },
|
|
37102
|
+
{ code: "GH", name: "Ghana", flag: "\u{1F1EC}\u{1F1ED}" },
|
|
37103
|
+
{ code: "GR", name: "Greece", flag: "\u{1F1EC}\u{1F1F7}" },
|
|
37104
|
+
{ code: "GD", name: "Grenada", flag: "\u{1F1EC}\u{1F1E9}" },
|
|
37105
|
+
{ code: "GT", name: "Guatemala", flag: "\u{1F1EC}\u{1F1F9}" },
|
|
37106
|
+
{ code: "GN", name: "Guinea", flag: "\u{1F1EC}\u{1F1F3}" },
|
|
37107
|
+
{ code: "GW", name: "Guinea-Bissau", flag: "\u{1F1EC}\u{1F1FC}" },
|
|
37108
|
+
{ code: "GY", name: "Guyana", flag: "\u{1F1EC}\u{1F1FE}" },
|
|
37109
|
+
{ code: "HT", name: "Haiti", flag: "\u{1F1ED}\u{1F1F9}" },
|
|
37110
|
+
{ code: "HN", name: "Honduras", flag: "\u{1F1ED}\u{1F1F3}" },
|
|
37111
|
+
{ code: "HU", name: "Hungary", flag: "\u{1F1ED}\u{1F1FA}" },
|
|
37112
|
+
{ code: "HK", name: "Hong Kong", flag: "\u{1F1ED}\u{1F1F0}" },
|
|
37113
|
+
{ code: "IS", name: "Iceland", flag: "\u{1F1EE}\u{1F1F8}" },
|
|
37114
|
+
{ code: "IN", name: "India", flag: "\u{1F1EE}\u{1F1F3}" },
|
|
37115
|
+
{ code: "ID", name: "Indonesia", flag: "\u{1F1EE}\u{1F1E9}" },
|
|
37116
|
+
{ code: "IR", name: "Iran", flag: "\u{1F1EE}\u{1F1F7}" },
|
|
37117
|
+
{ code: "IQ", name: "Iraq", flag: "\u{1F1EE}\u{1F1F6}" },
|
|
37118
|
+
{ code: "IE", name: "Ireland", flag: "\u{1F1EE}\u{1F1EA}" },
|
|
37119
|
+
{ code: "IL", name: "Israel", flag: "\u{1F1EE}\u{1F1F1}" },
|
|
37120
|
+
{ code: "IT", name: "Italy", flag: "\u{1F1EE}\u{1F1F9}" },
|
|
37121
|
+
{ code: "JM", name: "Jamaica", flag: "\u{1F1EF}\u{1F1F2}" },
|
|
37122
|
+
{ code: "JP", name: "Japan", flag: "\u{1F1EF}\u{1F1F5}" },
|
|
37123
|
+
{ code: "JO", name: "Jordan", flag: "\u{1F1EF}\u{1F1F4}" },
|
|
37124
|
+
{ code: "KZ", name: "Kazakhstan", flag: "\u{1F1F0}\u{1F1FF}" },
|
|
37125
|
+
{ code: "KE", name: "Kenya", flag: "\u{1F1F0}\u{1F1EA}" },
|
|
37126
|
+
{ code: "KI", name: "Kiribati", flag: "\u{1F1F0}\u{1F1EE}" },
|
|
37127
|
+
{ code: "KP", name: "North Korea", flag: "\u{1F1F0}\u{1F1F5}" },
|
|
37128
|
+
{ code: "KR", name: "South Korea", flag: "\u{1F1F0}\u{1F1F7}" },
|
|
37129
|
+
{ code: "KW", name: "Kuwait", flag: "\u{1F1F0}\u{1F1FC}" },
|
|
37130
|
+
{ code: "KG", name: "Kyrgyzstan", flag: "\u{1F1F0}\u{1F1EC}" },
|
|
37131
|
+
{ code: "LA", name: "Laos", flag: "\u{1F1F1}\u{1F1E6}" },
|
|
37132
|
+
{ code: "LV", name: "Latvia", flag: "\u{1F1F1}\u{1F1FB}" },
|
|
37133
|
+
{ code: "LB", name: "Lebanon", flag: "\u{1F1F1}\u{1F1E7}" },
|
|
37134
|
+
{ code: "LS", name: "Lesotho", flag: "\u{1F1F1}\u{1F1F8}" },
|
|
37135
|
+
{ code: "LR", name: "Liberia", flag: "\u{1F1F1}\u{1F1F7}" },
|
|
37136
|
+
{ code: "LY", name: "Libya", flag: "\u{1F1F1}\u{1F1FE}" },
|
|
37137
|
+
{ code: "LI", name: "Liechtenstein", flag: "\u{1F1F1}\u{1F1EE}" },
|
|
37138
|
+
{ code: "LT", name: "Lithuania", flag: "\u{1F1F1}\u{1F1F9}" },
|
|
37139
|
+
{ code: "LU", name: "Luxembourg", flag: "\u{1F1F1}\u{1F1FA}" },
|
|
37140
|
+
{ code: "MG", name: "Madagascar", flag: "\u{1F1F2}\u{1F1EC}" },
|
|
37141
|
+
{ code: "MW", name: "Malawi", flag: "\u{1F1F2}\u{1F1FC}" },
|
|
37142
|
+
{ code: "MY", name: "Malaysia", flag: "\u{1F1F2}\u{1F1FE}" },
|
|
37143
|
+
{ code: "MV", name: "Maldives", flag: "\u{1F1F2}\u{1F1FB}" },
|
|
37144
|
+
{ code: "ML", name: "Mali", flag: "\u{1F1F2}\u{1F1F1}" },
|
|
37145
|
+
{ code: "MT", name: "Malta", flag: "\u{1F1F2}\u{1F1F9}" },
|
|
37146
|
+
{ code: "MH", name: "Marshall Islands", flag: "\u{1F1F2}\u{1F1ED}" },
|
|
37147
|
+
{ code: "MR", name: "Mauritania", flag: "\u{1F1F2}\u{1F1F7}" },
|
|
37148
|
+
{ code: "MU", name: "Mauritius", flag: "\u{1F1F2}\u{1F1FA}" },
|
|
37149
|
+
{ code: "MX", name: "Mexico", flag: "\u{1F1F2}\u{1F1FD}" },
|
|
37150
|
+
{ code: "FM", name: "Micronesia", flag: "\u{1F1EB}\u{1F1F2}" },
|
|
37151
|
+
{ code: "MD", name: "Moldova", flag: "\u{1F1F2}\u{1F1E9}" },
|
|
37152
|
+
{ code: "MC", name: "Monaco", flag: "\u{1F1F2}\u{1F1E8}" },
|
|
37153
|
+
{ code: "MN", name: "Mongolia", flag: "\u{1F1F2}\u{1F1F3}" },
|
|
37154
|
+
{ code: "ME", name: "Montenegro", flag: "\u{1F1F2}\u{1F1EA}" },
|
|
37155
|
+
{ code: "MA", name: "Morocco", flag: "\u{1F1F2}\u{1F1E6}" },
|
|
37156
|
+
{ code: "MZ", name: "Mozambique", flag: "\u{1F1F2}\u{1F1FF}" },
|
|
37157
|
+
{ code: "MM", name: "Myanmar", flag: "\u{1F1F2}\u{1F1F2}" },
|
|
37158
|
+
{ code: "NA", name: "Namibia", flag: "\u{1F1F3}\u{1F1E6}" },
|
|
37159
|
+
{ code: "NR", name: "Nauru", flag: "\u{1F1F3}\u{1F1F7}" },
|
|
37160
|
+
{ code: "NP", name: "Nepal", flag: "\u{1F1F3}\u{1F1F5}" },
|
|
37161
|
+
{ code: "NL", name: "Netherlands", flag: "\u{1F1F3}\u{1F1F1}" },
|
|
37162
|
+
{ code: "NZ", name: "New Zealand", flag: "\u{1F1F3}\u{1F1FF}" },
|
|
37163
|
+
{ code: "NI", name: "Nicaragua", flag: "\u{1F1F3}\u{1F1EE}" },
|
|
37164
|
+
{ code: "NE", name: "Niger", flag: "\u{1F1F3}\u{1F1EA}" },
|
|
37165
|
+
{ code: "NG", name: "Nigeria", flag: "\u{1F1F3}\u{1F1EC}" },
|
|
37166
|
+
{ code: "MK", name: "North Macedonia", flag: "\u{1F1F2}\u{1F1F0}" },
|
|
37167
|
+
{ code: "NO", name: "Norway", flag: "\u{1F1F3}\u{1F1F4}" },
|
|
37168
|
+
{ code: "OM", name: "Oman", flag: "\u{1F1F4}\u{1F1F2}" },
|
|
37169
|
+
{ code: "PK", name: "Pakistan", flag: "\u{1F1F5}\u{1F1F0}" },
|
|
37170
|
+
{ code: "PW", name: "Palau", flag: "\u{1F1F5}\u{1F1FC}" },
|
|
37171
|
+
{ code: "PS", name: "Palestine", flag: "\u{1F1F5}\u{1F1F8}" },
|
|
37172
|
+
{ code: "PA", name: "Panama", flag: "\u{1F1F5}\u{1F1E6}" },
|
|
37173
|
+
{ code: "PG", name: "Papua New Guinea", flag: "\u{1F1F5}\u{1F1EC}" },
|
|
37174
|
+
{ code: "PY", name: "Paraguay", flag: "\u{1F1F5}\u{1F1FE}" },
|
|
37175
|
+
{ code: "PE", name: "Peru", flag: "\u{1F1F5}\u{1F1EA}" },
|
|
37176
|
+
{ code: "PH", name: "Philippines", flag: "\u{1F1F5}\u{1F1ED}" },
|
|
37177
|
+
{ code: "PL", name: "Poland", flag: "\u{1F1F5}\u{1F1F1}" },
|
|
37178
|
+
{ code: "PT", name: "Portugal", flag: "\u{1F1F5}\u{1F1F9}" },
|
|
37179
|
+
{ code: "QA", name: "Qatar", flag: "\u{1F1F6}\u{1F1E6}" },
|
|
37180
|
+
{ code: "RO", name: "Romania", flag: "\u{1F1F7}\u{1F1F4}" },
|
|
37181
|
+
{ code: "RU", name: "Russia", flag: "\u{1F1F7}\u{1F1FA}" },
|
|
37182
|
+
{ code: "RW", name: "Rwanda", flag: "\u{1F1F7}\u{1F1FC}" },
|
|
37183
|
+
{ code: "KN", name: "Saint Kitts and Nevis", flag: "\u{1F1F0}\u{1F1F3}" },
|
|
37184
|
+
{ code: "LC", name: "Saint Lucia", flag: "\u{1F1F1}\u{1F1E8}" },
|
|
37185
|
+
{ code: "VC", name: "Saint Vincent and the Grenadines", flag: "\u{1F1FB}\u{1F1E8}" },
|
|
37186
|
+
{ code: "WS", name: "Samoa", flag: "\u{1F1FC}\u{1F1F8}" },
|
|
37187
|
+
{ code: "SM", name: "San Marino", flag: "\u{1F1F8}\u{1F1F2}" },
|
|
37188
|
+
{ code: "ST", name: "Sao Tome and Principe", flag: "\u{1F1F8}\u{1F1F9}" },
|
|
37189
|
+
{ code: "SA", name: "Saudi Arabia", flag: "\u{1F1F8}\u{1F1E6}" },
|
|
37190
|
+
{ code: "SN", name: "Senegal", flag: "\u{1F1F8}\u{1F1F3}" },
|
|
37191
|
+
{ code: "RS", name: "Serbia", flag: "\u{1F1F7}\u{1F1F8}" },
|
|
37192
|
+
{ code: "SC", name: "Seychelles", flag: "\u{1F1F8}\u{1F1E8}" },
|
|
37193
|
+
{ code: "SL", name: "Sierra Leone", flag: "\u{1F1F8}\u{1F1F1}" },
|
|
37194
|
+
{ code: "SG", name: "Singapore", flag: "\u{1F1F8}\u{1F1EC}" },
|
|
37195
|
+
{ code: "SK", name: "Slovakia", flag: "\u{1F1F8}\u{1F1F0}" },
|
|
37196
|
+
{ code: "SI", name: "Slovenia", flag: "\u{1F1F8}\u{1F1EE}" },
|
|
37197
|
+
{ code: "SB", name: "Solomon Islands", flag: "\u{1F1F8}\u{1F1E7}" },
|
|
37198
|
+
{ code: "SO", name: "Somalia", flag: "\u{1F1F8}\u{1F1F4}" },
|
|
37199
|
+
{ code: "ZA", name: "South Africa", flag: "\u{1F1FF}\u{1F1E6}" },
|
|
37200
|
+
{ code: "SS", name: "South Sudan", flag: "\u{1F1F8}\u{1F1F8}" },
|
|
37201
|
+
{ code: "ES", name: "Spain", flag: "\u{1F1EA}\u{1F1F8}" },
|
|
37202
|
+
{ code: "LK", name: "Sri Lanka", flag: "\u{1F1F1}\u{1F1F0}" },
|
|
37203
|
+
{ code: "SD", name: "Sudan", flag: "\u{1F1F8}\u{1F1E9}" },
|
|
37204
|
+
{ code: "SR", name: "Suriname", flag: "\u{1F1F8}\u{1F1F7}" },
|
|
37205
|
+
{ code: "SE", name: "Sweden", flag: "\u{1F1F8}\u{1F1EA}" },
|
|
37206
|
+
{ code: "CH", name: "Switzerland", flag: "\u{1F1E8}\u{1F1ED}" },
|
|
37207
|
+
{ code: "SY", name: "Syria", flag: "\u{1F1F8}\u{1F1FE}" },
|
|
37208
|
+
{ code: "TW", name: "Taiwan", flag: "\u{1F1F9}\u{1F1FC}" },
|
|
37209
|
+
{ code: "TJ", name: "Tajikistan", flag: "\u{1F1F9}\u{1F1EF}" },
|
|
37210
|
+
{ code: "TZ", name: "Tanzania", flag: "\u{1F1F9}\u{1F1FF}" },
|
|
37211
|
+
{ code: "TH", name: "Thailand", flag: "\u{1F1F9}\u{1F1ED}" },
|
|
37212
|
+
{ code: "TL", name: "Timor-Leste", flag: "\u{1F1F9}\u{1F1F1}" },
|
|
37213
|
+
{ code: "TG", name: "Togo", flag: "\u{1F1F9}\u{1F1EC}" },
|
|
37214
|
+
{ code: "TO", name: "Tonga", flag: "\u{1F1F9}\u{1F1F4}" },
|
|
37215
|
+
{ code: "TT", name: "Trinidad and Tobago", flag: "\u{1F1F9}\u{1F1F9}" },
|
|
37216
|
+
{ code: "TN", name: "Tunisia", flag: "\u{1F1F9}\u{1F1F3}" },
|
|
37217
|
+
{ code: "TR", name: "Turkey", flag: "\u{1F1F9}\u{1F1F7}" },
|
|
37218
|
+
{ code: "TM", name: "Turkmenistan", flag: "\u{1F1F9}\u{1F1F2}" },
|
|
37219
|
+
{ code: "TV", name: "Tuvalu", flag: "\u{1F1F9}\u{1F1FB}" },
|
|
37220
|
+
{ code: "UG", name: "Uganda", flag: "\u{1F1FA}\u{1F1EC}" },
|
|
37221
|
+
{ code: "UA", name: "Ukraine", flag: "\u{1F1FA}\u{1F1E6}" },
|
|
37222
|
+
{ code: "AE", name: "United Arab Emirates", flag: "\u{1F1E6}\u{1F1EA}" },
|
|
37223
|
+
{ code: "GB", name: "United Kingdom", flag: "\u{1F1EC}\u{1F1E7}" },
|
|
37224
|
+
{ code: "US", name: "United States", flag: "\u{1F1FA}\u{1F1F8}" },
|
|
37225
|
+
{ code: "UY", name: "Uruguay", flag: "\u{1F1FA}\u{1F1FE}" },
|
|
37226
|
+
{ code: "UZ", name: "Uzbekistan", flag: "\u{1F1FA}\u{1F1FF}" },
|
|
37227
|
+
{ code: "VU", name: "Vanuatu", flag: "\u{1F1FB}\u{1F1FA}" },
|
|
37228
|
+
{ code: "VA", name: "Vatican City", flag: "\u{1F1FB}\u{1F1E6}" },
|
|
37229
|
+
{ code: "VE", name: "Venezuela", flag: "\u{1F1FB}\u{1F1EA}" },
|
|
37230
|
+
{ code: "VN", name: "Vietnam", flag: "\u{1F1FB}\u{1F1F3}" },
|
|
37231
|
+
{ code: "YE", name: "Yemen", flag: "\u{1F1FE}\u{1F1EA}" },
|
|
37232
|
+
{ code: "ZM", name: "Zambia", flag: "\u{1F1FF}\u{1F1F2}" },
|
|
37233
|
+
{ code: "ZW", name: "Zimbabwe", flag: "\u{1F1FF}\u{1F1FC}" }
|
|
37234
|
+
];
|
|
37235
|
+
var codeToMeta = Object.fromEntries(countries2.map((c) => [c.code, { name: c.name, flag: c.flag }]));
|
|
37236
|
+
var nameToCode = Object.fromEntries(countries2.map((c) => [c.name, c.code]));
|
|
37237
|
+
var normalizeToIso2 = (input) => {
|
|
37238
|
+
if (!input) return "US";
|
|
37239
|
+
const trimmed = String(input).trim();
|
|
37240
|
+
const upper = trimmed.toUpperCase();
|
|
37241
|
+
if (upper.length === 2 && codeToMeta[upper]) return upper;
|
|
37242
|
+
const fromName = nameToCode[trimmed];
|
|
37243
|
+
if (fromName) return fromName;
|
|
37244
|
+
return "US";
|
|
37245
|
+
};
|
|
37246
|
+
|
|
37247
|
+
// src/molecules/creator-discovery/CreatorWidget/EngagedAudienceDemographics.tsx
|
|
37248
|
+
import { jsx as jsx126, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
37249
|
+
function EngagedAudienceDemographics({
|
|
37250
|
+
audienceDemographics
|
|
37251
|
+
}) {
|
|
37252
|
+
if (!audienceDemographics) return null;
|
|
37253
|
+
const hasCities = audienceDemographics?.cities && Object.keys(audienceDemographics.cities).length > 0;
|
|
37254
|
+
const hasCountries = audienceDemographics?.countries && Object.keys(audienceDemographics.countries).length > 0;
|
|
37255
|
+
const hasAges = audienceDemographics?.ages && Object.keys(audienceDemographics.ages).length > 0;
|
|
37256
|
+
const hasGenders = audienceDemographics?.genders && Object.keys(audienceDemographics.genders).length > 0;
|
|
37257
|
+
if (!hasCities && !hasCountries && !hasAges && !hasGenders) {
|
|
37258
|
+
return null;
|
|
37259
|
+
}
|
|
37260
|
+
const columns = [];
|
|
37261
|
+
if (hasCities) columns.push("1fr");
|
|
37262
|
+
if (hasCountries) columns.push("1fr");
|
|
37263
|
+
if (hasAges) columns.push("1fr");
|
|
37264
|
+
if (hasGenders) columns.push("0.4fr");
|
|
37265
|
+
const gridTemplate = columns.join(" ");
|
|
37266
|
+
return /* @__PURE__ */ jsxs85("div", { className: "flex flex-col gap-4", children: [
|
|
37267
|
+
/* @__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" }) }),
|
|
37268
|
+
/* @__PURE__ */ jsxs85(
|
|
37269
|
+
"div",
|
|
37270
|
+
{
|
|
37271
|
+
className: "flex flex-col sm:col-span-3 sm:grid gap-6",
|
|
37272
|
+
style: { gridTemplateColumns: gridTemplate },
|
|
37273
|
+
children: [
|
|
37274
|
+
hasCities && /* @__PURE__ */ jsxs85("div", { children: [
|
|
37275
|
+
/* @__PURE__ */ jsx126("h4", { className: "text-xs text-gray700 mb-3", children: "Cities" }),
|
|
37276
|
+
/* @__PURE__ */ jsx126("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.cities || {}).map(
|
|
37277
|
+
([code, value]) => /* @__PURE__ */ jsxs85(
|
|
37278
|
+
"div",
|
|
37279
|
+
{
|
|
37280
|
+
className: "flex items-center gap-3 text-sm text-gray700",
|
|
37281
|
+
children: [
|
|
37282
|
+
/* @__PURE__ */ jsx126("span", { className: "w-[90px]", children: /* @__PURE__ */ jsx126("div", { className: "flex gap-1 items-center", children: /* @__PURE__ */ jsx126("span", { children: code.split(",")[0] }) }) }),
|
|
37283
|
+
/* @__PURE__ */ jsx126("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx126(
|
|
37284
|
+
"div",
|
|
37285
|
+
{
|
|
37286
|
+
className: "h-[6px] bg-purple100 rounded-full",
|
|
37287
|
+
style: { width: `${value}%` }
|
|
37288
|
+
}
|
|
37289
|
+
) }),
|
|
37290
|
+
/* @__PURE__ */ jsxs85("span", { className: "w-10 text-right font-medium", children: [
|
|
37291
|
+
value,
|
|
37292
|
+
"%"
|
|
37293
|
+
] })
|
|
37294
|
+
]
|
|
37295
|
+
},
|
|
37296
|
+
code
|
|
37297
|
+
)
|
|
37298
|
+
) })
|
|
37299
|
+
] }),
|
|
37300
|
+
hasCountries && /* @__PURE__ */ jsxs85("div", { children: [
|
|
37301
|
+
/* @__PURE__ */ jsx126("h4", { className: "text-xs text-gray700 mb-3", children: "Countries" }),
|
|
37302
|
+
/* @__PURE__ */ jsx126("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.countries || {}).map(
|
|
37303
|
+
([code, value]) => {
|
|
37304
|
+
const iso2 = normalizeToIso2(code);
|
|
37305
|
+
const meta = codeToMeta[iso2];
|
|
37306
|
+
return /* @__PURE__ */ jsxs85(
|
|
37307
|
+
"div",
|
|
37308
|
+
{
|
|
37309
|
+
className: "flex items-center gap-3 text-sm text-gray700",
|
|
37310
|
+
children: [
|
|
37311
|
+
/* @__PURE__ */ jsx126("span", { className: "w-10", children: /* @__PURE__ */ jsxs85("div", { className: "flex gap-1 items-center", children: [
|
|
37312
|
+
/* @__PURE__ */ jsx126("span", { className: "text-base", children: meta?.flag }),
|
|
37313
|
+
/* @__PURE__ */ jsx126("span", { children: code })
|
|
37314
|
+
] }) }),
|
|
37315
|
+
/* @__PURE__ */ jsx126("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx126(
|
|
37316
|
+
"div",
|
|
37317
|
+
{
|
|
37318
|
+
className: "h-[6px] bg-purple100 rounded-full",
|
|
37319
|
+
style: { width: `${value}%` }
|
|
37320
|
+
}
|
|
37321
|
+
) }),
|
|
37322
|
+
/* @__PURE__ */ jsxs85("span", { className: "w-10 text-right font-medium", children: [
|
|
37323
|
+
value,
|
|
37324
|
+
"%"
|
|
37325
|
+
] })
|
|
37326
|
+
]
|
|
37327
|
+
},
|
|
37328
|
+
code
|
|
37329
|
+
);
|
|
37330
|
+
}
|
|
37331
|
+
) })
|
|
37332
|
+
] }),
|
|
37333
|
+
hasAges && /* @__PURE__ */ jsxs85("div", { children: [
|
|
37334
|
+
/* @__PURE__ */ jsx126("h4", { className: "text-xs text-gray700 mb-3", children: "Ages" }),
|
|
37335
|
+
/* @__PURE__ */ jsx126("div", { className: "flex flex-col gap-3", children: Object.entries(audienceDemographics?.ages || {}).map(
|
|
37336
|
+
([ageRange, value]) => /* @__PURE__ */ jsxs85(
|
|
37337
|
+
"div",
|
|
37338
|
+
{
|
|
37339
|
+
className: "flex items-center gap-3 text-sm text-gray700",
|
|
37340
|
+
children: [
|
|
37341
|
+
/* @__PURE__ */ jsx126("span", { className: "w-12", children: ageRange }),
|
|
37342
|
+
/* @__PURE__ */ jsx126("div", { className: "flex-1 bg-gray200 h-[6px] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx126(
|
|
37343
|
+
"div",
|
|
37344
|
+
{
|
|
37345
|
+
className: "h-[6px] bg-purple100 rounded-full",
|
|
37346
|
+
style: { width: `${value}%` }
|
|
37347
|
+
}
|
|
37348
|
+
) }),
|
|
37349
|
+
/* @__PURE__ */ jsxs85("span", { className: "w-10 text-right font-medium", children: [
|
|
37350
|
+
value,
|
|
37351
|
+
"%"
|
|
37352
|
+
] })
|
|
37353
|
+
]
|
|
37354
|
+
},
|
|
37355
|
+
ageRange
|
|
37356
|
+
)
|
|
37357
|
+
) })
|
|
37358
|
+
] }),
|
|
37359
|
+
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(
|
|
37360
|
+
([gender, value]) => /* @__PURE__ */ jsxs85(
|
|
37361
|
+
"div",
|
|
37362
|
+
{
|
|
37363
|
+
className: "flex flex-col justify-center text-sm",
|
|
37364
|
+
children: [
|
|
37365
|
+
/* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
37366
|
+
gender === "female" ? /* @__PURE__ */ jsx126(Venus, { className: "text-red-500", strokeWidth: 3 }) : /* @__PURE__ */ jsx126(Mars, { className: "text-blue-500", strokeWidth: 3 }),
|
|
37367
|
+
/* @__PURE__ */ jsxs85("span", { className: "capitalize text-gray800 text-xl", children: [
|
|
37368
|
+
value,
|
|
37369
|
+
"%"
|
|
37370
|
+
] })
|
|
37371
|
+
] }),
|
|
37372
|
+
/* @__PURE__ */ jsx126("span", { className: "text-lg text-gray700", children: gender.charAt(0).toUpperCase() + gender.slice(1) })
|
|
37373
|
+
]
|
|
37374
|
+
},
|
|
37375
|
+
gender
|
|
37376
|
+
)
|
|
37377
|
+
) }) })
|
|
37378
|
+
]
|
|
37379
|
+
}
|
|
37380
|
+
)
|
|
37381
|
+
] });
|
|
37382
|
+
}
|
|
37383
|
+
|
|
37384
|
+
// src/molecules/creator-discovery/CreatorWidget/PlatformIcons.tsx
|
|
37385
|
+
import { jsx as jsx127 } from "react/jsx-runtime";
|
|
37386
|
+
function InstagramIcon({ className }) {
|
|
37387
|
+
return /* @__PURE__ */ jsx127(
|
|
37388
|
+
"svg",
|
|
37389
|
+
{
|
|
37390
|
+
className,
|
|
37391
|
+
viewBox: "0 0 24 24",
|
|
37392
|
+
fill: "currentColor",
|
|
37393
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37394
|
+
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" })
|
|
37395
|
+
}
|
|
37396
|
+
);
|
|
37397
|
+
}
|
|
37398
|
+
function YouTubeIcon({ className }) {
|
|
37399
|
+
return /* @__PURE__ */ jsx127(
|
|
37400
|
+
"svg",
|
|
37401
|
+
{
|
|
37402
|
+
className,
|
|
37403
|
+
viewBox: "0 0 24 24",
|
|
37404
|
+
fill: "currentColor",
|
|
37405
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37406
|
+
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" })
|
|
37407
|
+
}
|
|
37408
|
+
);
|
|
37409
|
+
}
|
|
37410
|
+
function TikTokIcon3({ className }) {
|
|
37411
|
+
return /* @__PURE__ */ jsx127(
|
|
37412
|
+
"svg",
|
|
37413
|
+
{
|
|
37414
|
+
className,
|
|
37415
|
+
viewBox: "0 0 24 24",
|
|
37416
|
+
fill: "currentColor",
|
|
37417
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37418
|
+
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" })
|
|
37419
|
+
}
|
|
37420
|
+
);
|
|
37421
|
+
}
|
|
37422
|
+
function getPlatformIcon(platform) {
|
|
37423
|
+
const key = platform.toLowerCase().replace(/metrics$/i, "");
|
|
37424
|
+
if (key === "instagram") return InstagramIcon;
|
|
37425
|
+
if (key === "tiktok") return TikTokIcon3;
|
|
37426
|
+
if (key === "youtube") return YouTubeIcon;
|
|
37427
|
+
return InstagramIcon;
|
|
37428
|
+
}
|
|
37429
|
+
function getPlatformName(platform) {
|
|
37430
|
+
const key = platform.toLowerCase().replace(/metrics$/i, "");
|
|
37431
|
+
if (key === "instagram") return "Instagram";
|
|
37432
|
+
if (key === "tiktok") return "TikTok";
|
|
37433
|
+
if (key === "youtube") return "YouTube";
|
|
37434
|
+
return platform;
|
|
37435
|
+
}
|
|
37436
|
+
function getPlatformBgColor(platform) {
|
|
37437
|
+
const key = platform.toLowerCase().replace(/metrics$/i, "");
|
|
37438
|
+
if (key === "instagram") return "#C4338680";
|
|
37439
|
+
if (key === "tiktok") return "#EBEBEB40";
|
|
37440
|
+
if (key === "youtube") return "#ff000080";
|
|
37441
|
+
return "#ccc";
|
|
37442
|
+
}
|
|
37443
|
+
function getPlatformIconColor(platform) {
|
|
37444
|
+
const key = platform.toLowerCase().replace(/metrics$/i, "");
|
|
37445
|
+
if (key === "instagram") return "text-[#7b1551]";
|
|
37446
|
+
if (key === "tiktok") return "text-pink-500";
|
|
37447
|
+
if (key === "youtube") return "text-red-600";
|
|
37448
|
+
return "text-primary";
|
|
37449
|
+
}
|
|
37450
|
+
|
|
37451
|
+
// src/molecules/creator-discovery/CreatorWidget/PostCard.tsx
|
|
37452
|
+
import { useState as useState12 } from "react";
|
|
37453
|
+
import { Fragment as Fragment6, jsx as jsx128, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
37454
|
+
var formatFollowerCount = (count) => {
|
|
37455
|
+
if (count >= 1e6) {
|
|
37456
|
+
const millions = count / 1e6;
|
|
37457
|
+
return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
|
|
37458
|
+
} else if (count >= 1e4) {
|
|
37459
|
+
return `${Math.floor(count / 1e3)}k`;
|
|
37460
|
+
} else if (count >= 1e3) {
|
|
37461
|
+
return `${(count / 1e3).toFixed(1)}k`;
|
|
37462
|
+
}
|
|
37463
|
+
return Math.floor(count).toString();
|
|
37464
|
+
};
|
|
37465
|
+
function PostCard({ post, platformUsername }) {
|
|
37466
|
+
const [expanded, setExpanded] = useState12(false);
|
|
37467
|
+
const [errored, setErrored] = useState12(false);
|
|
37468
|
+
const thumbnail = post.thumbnail_url || post.thumbnail || post.image || "";
|
|
37469
|
+
const likes = post.engagement?.likes ?? post.likes ?? null;
|
|
37470
|
+
const comments = post.engagement?.comments ?? post.comments ?? null;
|
|
37471
|
+
const views = post.engagement?.views ?? post.engagement?.plays ?? post.views ?? post.plays ?? null;
|
|
37472
|
+
const impressions = post.impressions ?? null;
|
|
37473
|
+
const reach = post.reach ?? null;
|
|
37474
|
+
return /* @__PURE__ */ jsxs86(
|
|
37475
|
+
"div",
|
|
37476
|
+
{
|
|
37477
|
+
className: "rounded-xl overflow-hidden border border-gray500 bg-transparent shadow-sm cursor-pointer",
|
|
37478
|
+
onClick: (e) => {
|
|
37479
|
+
e.stopPropagation();
|
|
37480
|
+
window.open(post.url, "_blank", "noopener,noreferrer");
|
|
37481
|
+
},
|
|
37482
|
+
children: [
|
|
37483
|
+
/* @__PURE__ */ jsx128("div", { className: "w-full aspect-square relative bg-gray25", children: thumbnail && !errored ? /* @__PURE__ */ jsx128(
|
|
37484
|
+
"img",
|
|
37485
|
+
{
|
|
37486
|
+
src: thumbnail,
|
|
37487
|
+
alt: post.title || "post",
|
|
37488
|
+
className: "w-full h-full object-cover",
|
|
37489
|
+
onError: () => setErrored(true)
|
|
37490
|
+
}
|
|
37491
|
+
) : /* @__PURE__ */ jsx128("div", { className: "w-full h-full flex items-center justify-center text-gray500 text-sm", children: "No preview" }) }),
|
|
37492
|
+
/* @__PURE__ */ jsxs86("div", { className: "p-3", children: [
|
|
37493
|
+
/* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-4 text-sm text-gray600 mb-2", children: [
|
|
37494
|
+
likes !== null && /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-1", children: [
|
|
37495
|
+
/* @__PURE__ */ jsx128("span", { children: formatFollowerCount(likes) }),
|
|
37496
|
+
" ",
|
|
37497
|
+
/* @__PURE__ */ jsx128(Heart, { size: 14 })
|
|
37498
|
+
] }),
|
|
37499
|
+
comments !== null && /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-1", children: [
|
|
37500
|
+
/* @__PURE__ */ jsx128("span", { children: formatFollowerCount(comments) }),
|
|
37501
|
+
" ",
|
|
37502
|
+
/* @__PURE__ */ jsx128(MessageCircle, { size: 14 })
|
|
37503
|
+
] }),
|
|
37504
|
+
views !== null && /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-1", children: [
|
|
37505
|
+
/* @__PURE__ */ jsx128("span", { children: formatFollowerCount(views) }),
|
|
37506
|
+
" ",
|
|
37507
|
+
/* @__PURE__ */ jsx128(Eye, { size: 14 })
|
|
37508
|
+
] })
|
|
37509
|
+
] }),
|
|
37510
|
+
/* @__PURE__ */ jsxs86("div", { className: "flex gap-4 text-sm text-gray800 mb-2", children: [
|
|
37511
|
+
impressions !== null && /* @__PURE__ */ jsxs86("div", { children: [
|
|
37512
|
+
/* @__PURE__ */ jsx128("span", { className: "text-gray500 font-bold", children: formatFollowerCount(impressions) }),
|
|
37513
|
+
" ",
|
|
37514
|
+
"est.Impressions"
|
|
37515
|
+
] }),
|
|
37516
|
+
reach !== null && /* @__PURE__ */ jsxs86("div", { children: [
|
|
37517
|
+
/* @__PURE__ */ jsx128("span", { className: "text-gray500 font-bold", children: formatFollowerCount(reach) }),
|
|
37518
|
+
" ",
|
|
37519
|
+
"est.Reach"
|
|
37520
|
+
] })
|
|
37521
|
+
] }),
|
|
37522
|
+
/* @__PURE__ */ jsxs86("div", { className: "text-sm mb-1", children: [
|
|
37523
|
+
platformUsername && /* @__PURE__ */ jsxs86("div", { className: "text-md font-semibold text-gray500", children: [
|
|
37524
|
+
"@",
|
|
37525
|
+
platformUsername
|
|
37526
|
+
] }),
|
|
37527
|
+
["instagram", "tiktok"].includes(
|
|
37528
|
+
post.platform?.toLowerCase() || ""
|
|
37529
|
+
) ? /* @__PURE__ */ jsx128(Fragment6, { children: (() => {
|
|
37530
|
+
const text = post.title || post.description || "";
|
|
37531
|
+
return /* @__PURE__ */ jsxs86(Fragment6, { children: [
|
|
37532
|
+
/* @__PURE__ */ jsx128(
|
|
37533
|
+
"div",
|
|
37534
|
+
{
|
|
37535
|
+
className: `text-gray900 font-light mt-2 text-sm ${!expanded ? "line-clamp-3" : ""}`,
|
|
37536
|
+
children: text
|
|
37537
|
+
}
|
|
37538
|
+
),
|
|
37539
|
+
text.length > 100 && /* @__PURE__ */ jsx128(
|
|
37540
|
+
"button",
|
|
37541
|
+
{
|
|
37542
|
+
onClick: (e) => {
|
|
37543
|
+
e.stopPropagation();
|
|
37544
|
+
setExpanded((s) => !s);
|
|
37545
|
+
},
|
|
37546
|
+
className: "text-xs text-purpleText mt-2",
|
|
37547
|
+
children: expanded ? "Show less" : "Show more"
|
|
37548
|
+
}
|
|
37549
|
+
)
|
|
37550
|
+
] });
|
|
37551
|
+
})() }) : /* @__PURE__ */ jsxs86(Fragment6, { children: [
|
|
37552
|
+
post.title && /* @__PURE__ */ jsx128("div", { className: "text-gray900 font-light", children: post.title }),
|
|
37553
|
+
post.description && /* @__PURE__ */ jsx128(
|
|
37554
|
+
"div",
|
|
37555
|
+
{
|
|
37556
|
+
className: "mt-2 text-sm text-gray900 overflow-hidden font-light",
|
|
37557
|
+
style: { maxHeight: expanded ? void 0 : 200 },
|
|
37558
|
+
children: post.description
|
|
37559
|
+
}
|
|
37560
|
+
),
|
|
37561
|
+
post.description && post.description.length > 200 && /* @__PURE__ */ jsx128(
|
|
37562
|
+
"button",
|
|
37563
|
+
{
|
|
37564
|
+
onClick: (e) => {
|
|
37565
|
+
e.stopPropagation();
|
|
37566
|
+
setExpanded((s) => !s);
|
|
37567
|
+
},
|
|
37568
|
+
className: "text-xs text-purpleText mt-2",
|
|
37569
|
+
children: expanded ? "Show less" : "Show more"
|
|
37570
|
+
}
|
|
37571
|
+
)
|
|
37572
|
+
] })
|
|
37573
|
+
] })
|
|
37574
|
+
] })
|
|
37575
|
+
]
|
|
37576
|
+
}
|
|
37577
|
+
);
|
|
37578
|
+
}
|
|
37579
|
+
|
|
37580
|
+
// src/molecules/creator-discovery/CreatorWidget/PlatformPostsSection.tsx
|
|
37581
|
+
import { jsx as jsx129, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
37582
|
+
var formatFollowerCount2 = (count) => {
|
|
37583
|
+
if (count >= 1e6) {
|
|
37584
|
+
const millions = count / 1e6;
|
|
37585
|
+
return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
|
|
37586
|
+
} else if (count >= 1e4) {
|
|
37587
|
+
return `${Math.floor(count / 1e3)}k`;
|
|
37588
|
+
} else if (count >= 1e3) {
|
|
37589
|
+
return `${(count / 1e3).toFixed(1)}k`;
|
|
37590
|
+
}
|
|
37591
|
+
return Math.floor(count).toString();
|
|
37592
|
+
};
|
|
37593
|
+
function filterPostsByPlatform(posts, platform) {
|
|
37594
|
+
const postsArr = (posts ?? []).slice();
|
|
37595
|
+
const shortKey = platform.replace(/Metrics$/i, "").toLowerCase();
|
|
37596
|
+
return postsArr.filter((p) => (p.platform || "").toLowerCase() === shortKey).slice(0, 3);
|
|
37597
|
+
}
|
|
37598
|
+
function PlatformMetricsBanner({
|
|
37599
|
+
platform,
|
|
37600
|
+
metrics
|
|
37601
|
+
}) {
|
|
37602
|
+
const platformName = getPlatformName(platform);
|
|
37603
|
+
const bgColor = getPlatformBgColor(platform);
|
|
37604
|
+
const IconComponent = getPlatformIcon(platform);
|
|
37605
|
+
return /* @__PURE__ */ jsxs87(
|
|
37606
|
+
"div",
|
|
37607
|
+
{
|
|
37608
|
+
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 ",
|
|
37609
|
+
style: { backgroundColor: bgColor },
|
|
37610
|
+
children: [
|
|
37611
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-center min-w-[90px] md:min-w-0", children: [
|
|
37612
|
+
/* @__PURE__ */ jsx129(IconComponent, { className: "w-5 h-5 md:w-6 md:h-6 text-gray900" }),
|
|
37613
|
+
/* @__PURE__ */ jsx129("span", { className: "text-lg md:text-xl font-bold text-gray900", children: platform === "youtubeMetrics" ? formatFollowerCount2(metrics.subscribers || 0) : formatFollowerCount2(metrics.followers || 0) })
|
|
37614
|
+
] }),
|
|
37615
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-start min-w-[130px] md:min-w-0", children: [
|
|
37616
|
+
/* @__PURE__ */ jsxs87(
|
|
37617
|
+
"span",
|
|
37618
|
+
{
|
|
37619
|
+
className: "text-base md:text-lg dark:text-white max-w-[90%] truncate cursor-default",
|
|
37620
|
+
title: `@${platform === "youtubeMetrics" ? metrics.channelName : metrics.username}`,
|
|
37621
|
+
children: [
|
|
37622
|
+
"@",
|
|
37623
|
+
platform === "youtubeMetrics" ? metrics.channelName : metrics.username
|
|
37624
|
+
]
|
|
37625
|
+
}
|
|
37626
|
+
),
|
|
37627
|
+
/* @__PURE__ */ jsx129("span", { className: "text-xs md:text-sm text-gray900 opacity-90", children: platformName })
|
|
37628
|
+
] }),
|
|
37629
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
|
|
37630
|
+
/* @__PURE__ */ jsxs87("span", { className: "text-sm md:text-md font-semibold text-gray900", children: [
|
|
37631
|
+
(metrics.engagementRate * 100).toFixed(2),
|
|
37632
|
+
"%"
|
|
37633
|
+
] }),
|
|
37634
|
+
/* @__PURE__ */ jsx129("span", { className: "text-xs text-gray900 opacity-80", children: "Engagement Rate" })
|
|
37635
|
+
] }),
|
|
37636
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
|
|
37637
|
+
/* @__PURE__ */ jsx129("span", { className: "text-sm md:text-md font-semibold text-gray900", children: Math.round(metrics.avgLikes)?.toLocaleString() }),
|
|
37638
|
+
/* @__PURE__ */ jsx129("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Likes" })
|
|
37639
|
+
] }),
|
|
37640
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-start min-w-[100px] md:min-w-0", children: [
|
|
37641
|
+
/* @__PURE__ */ jsx129("span", { className: "text-sm md:text-md font-semibold text-gray900", children: Math.round(metrics.avgComments)?.toLocaleString() }),
|
|
37642
|
+
/* @__PURE__ */ jsx129("span", { className: "text-xs text-gray900 opacity-80", children: "Avg Comments" })
|
|
37643
|
+
] })
|
|
37644
|
+
]
|
|
37645
|
+
}
|
|
37646
|
+
);
|
|
37647
|
+
}
|
|
37648
|
+
function PlatformPostsSection({
|
|
37649
|
+
platformMetrics,
|
|
37650
|
+
posts = []
|
|
37651
|
+
}) {
|
|
37652
|
+
if (!platformMetrics) return null;
|
|
37653
|
+
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(
|
|
37654
|
+
([platform, metrics]) => {
|
|
37655
|
+
if (!metrics) return null;
|
|
37656
|
+
if (metrics.followers === 0 && metrics.subscribers === 0)
|
|
37657
|
+
return null;
|
|
37658
|
+
const platformPosts = filterPostsByPlatform(posts, platform);
|
|
37659
|
+
const platformUsername = metrics.username ?? metrics.channelName ?? "";
|
|
37660
|
+
return /* @__PURE__ */ jsxs87("div", { className: "w-full flex flex-col gap-8", children: [
|
|
37661
|
+
/* @__PURE__ */ jsx129(PlatformMetricsBanner, { platform, metrics }),
|
|
37662
|
+
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(
|
|
37663
|
+
PostCard,
|
|
37664
|
+
{
|
|
37665
|
+
post,
|
|
37666
|
+
platformUsername
|
|
37667
|
+
},
|
|
37668
|
+
post.post_id ?? post.url ?? idx
|
|
37669
|
+
)) }) })
|
|
37670
|
+
] }, platform);
|
|
37671
|
+
}
|
|
37672
|
+
) }) });
|
|
37673
|
+
}
|
|
37674
|
+
|
|
37675
|
+
// src/molecules/creator-discovery/CreatorWidget/BrandCollaborationsList.tsx
|
|
37676
|
+
import { useState as useState13 } from "react";
|
|
37677
|
+
import ReactDOM from "react-dom";
|
|
37678
|
+
import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
|
|
37679
|
+
import { Fragment as Fragment7, jsx as jsx130, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
37680
|
+
var getSentimentRank = (score) => {
|
|
37681
|
+
if (score >= 80) {
|
|
37682
|
+
return {
|
|
37683
|
+
rank: "STRONG FIT",
|
|
37684
|
+
bgColor: "bg-greenBackground",
|
|
37685
|
+
textColor: "text-greenText",
|
|
37686
|
+
scoreColor: "text-[#499C54]"
|
|
37687
|
+
};
|
|
37688
|
+
} else if (score >= 50) {
|
|
37689
|
+
return {
|
|
37690
|
+
rank: "MODERATE FIT",
|
|
37691
|
+
bgColor: "bg-orangeBackground",
|
|
37692
|
+
textColor: "text-orangeText",
|
|
37693
|
+
scoreColor: "text-[#B3512F]"
|
|
37694
|
+
};
|
|
37695
|
+
} else if (score >= 0) {
|
|
37696
|
+
return {
|
|
37697
|
+
rank: "POOR FIT",
|
|
37698
|
+
bgColor: "bg-redBackground",
|
|
37699
|
+
textColor: "text-redText",
|
|
37700
|
+
scoreColor: "text-[#BE2C35]"
|
|
37701
|
+
};
|
|
37702
|
+
}
|
|
37703
|
+
return {
|
|
37704
|
+
rank: "Unranked",
|
|
37705
|
+
bgColor: "bg-gray500",
|
|
37706
|
+
textColor: "text-gray200",
|
|
37707
|
+
scoreColor: "text-gray500"
|
|
37708
|
+
};
|
|
37709
|
+
};
|
|
37710
|
+
function BrandMentionDetails({
|
|
37711
|
+
open,
|
|
37712
|
+
onClose,
|
|
37713
|
+
brandBreakdown,
|
|
37714
|
+
selectedBrand
|
|
37715
|
+
}) {
|
|
37716
|
+
const brandStats = brandBreakdown?.insights?.brandBreakdown?.find(
|
|
37717
|
+
(b) => b.brand.toLowerCase() === selectedBrand?.toLowerCase()
|
|
37718
|
+
);
|
|
37719
|
+
const brandMentions = brandBreakdown?.mentions?.filter(
|
|
37720
|
+
(m) => m.normalizedBrand?.toLowerCase() === selectedBrand?.toLowerCase() || m.brand?.toLowerCase() === selectedBrand?.toLowerCase()
|
|
37721
|
+
) || [];
|
|
37722
|
+
if (typeof window === "undefined") return null;
|
|
37723
|
+
return ReactDOM.createPortal(
|
|
37724
|
+
/* @__PURE__ */ jsx130(AnimatePresence3, { mode: "sync", children: open && /* @__PURE__ */ jsxs88(Fragment7, { children: [
|
|
37725
|
+
/* @__PURE__ */ jsx130(
|
|
37726
|
+
motion3.div,
|
|
37727
|
+
{
|
|
37728
|
+
initial: { opacity: 0 },
|
|
37729
|
+
animate: { opacity: 1 },
|
|
37730
|
+
exit: { opacity: 0 },
|
|
37731
|
+
transition: { duration: 0.2 },
|
|
37732
|
+
className: "fixed inset-0 bg-black bg-opacity-50 z-[80]",
|
|
37733
|
+
onClick: (e) => {
|
|
37734
|
+
e.stopPropagation();
|
|
37735
|
+
onClose();
|
|
37736
|
+
}
|
|
37737
|
+
},
|
|
37738
|
+
"brand-overlay"
|
|
37739
|
+
),
|
|
37740
|
+
/* @__PURE__ */ jsxs88(
|
|
37741
|
+
motion3.div,
|
|
37742
|
+
{
|
|
37743
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
37744
|
+
animate: { opacity: 1, scale: 1 },
|
|
37745
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
37746
|
+
transition: { duration: 0.2 },
|
|
37747
|
+
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",
|
|
37748
|
+
onClick: (e) => e.stopPropagation(),
|
|
37749
|
+
children: [
|
|
37750
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex justify-between items-center p-4 border-b border-gray300", children: [
|
|
37751
|
+
/* @__PURE__ */ jsxs88("h3", { className: "text-lg font-bold text-gray900", children: [
|
|
37752
|
+
"Brand Mention Details: ",
|
|
37753
|
+
selectedBrand
|
|
37754
|
+
] }),
|
|
37755
|
+
/* @__PURE__ */ jsx130(
|
|
37756
|
+
"button",
|
|
37757
|
+
{
|
|
37758
|
+
onClick: onClose,
|
|
37759
|
+
className: "p-1 rounded-full hover:bg-gray200 transition-colors",
|
|
37760
|
+
children: /* @__PURE__ */ jsx130(X, { className: "w-4 h-4" })
|
|
37761
|
+
}
|
|
37762
|
+
)
|
|
37763
|
+
] }),
|
|
37764
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex flex-col gap-6 max-h-[70vh] overflow-y-auto p-4", children: [
|
|
37765
|
+
brandStats && /* @__PURE__ */ jsxs88("div", { className: "bg-gray25 border-2 border-gray200 rounded-xl p-4", children: [
|
|
37766
|
+
/* @__PURE__ */ jsx130("h3", { className: "text-lg font-bold text-gray900 mb-4", children: "Overview" }),
|
|
37767
|
+
/* @__PURE__ */ jsxs88("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
37768
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3", children: [
|
|
37769
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600", children: "Total Mentions" }),
|
|
37770
|
+
/* @__PURE__ */ jsx130("div", { className: "text-2xl font-bold text-gray900", children: brandStats.mentions })
|
|
37771
|
+
] }),
|
|
37772
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3", children: [
|
|
37773
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600", children: "Posts Count" }),
|
|
37774
|
+
/* @__PURE__ */ jsx130("div", { className: "text-2xl font-bold text-gray900", children: brandStats.postCount })
|
|
37775
|
+
] }),
|
|
37776
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3", children: [
|
|
37777
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600", children: "Avg Engagement" }),
|
|
37778
|
+
/* @__PURE__ */ jsxs88("div", { className: "text-2xl font-bold text-gray900", children: [
|
|
37779
|
+
brandStats.averageEngagementRate?.toFixed(2),
|
|
37780
|
+
"%"
|
|
37781
|
+
] })
|
|
37782
|
+
] }),
|
|
37783
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3", children: [
|
|
37784
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600", children: "Effectiveness" }),
|
|
37785
|
+
/* @__PURE__ */ jsxs88(
|
|
37786
|
+
"div",
|
|
37787
|
+
{
|
|
37788
|
+
className: `text-2xl font-bold ${getSentimentRank(brandStats.effectivenessPercent).scoreColor}`,
|
|
37789
|
+
children: [
|
|
37790
|
+
brandStats.effectivenessPercent,
|
|
37791
|
+
"%"
|
|
37792
|
+
]
|
|
37793
|
+
}
|
|
37794
|
+
)
|
|
37795
|
+
] })
|
|
37796
|
+
] }),
|
|
37797
|
+
/* @__PURE__ */ jsx130("div", { className: "mt-3 flex gap-2 flex-wrap", children: brandStats.collaborationTypes?.map(
|
|
37798
|
+
(type, idx) => /* @__PURE__ */ jsx130(
|
|
37799
|
+
"span",
|
|
37800
|
+
{
|
|
37801
|
+
className: "px-3 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]",
|
|
37802
|
+
children: type
|
|
37803
|
+
},
|
|
37804
|
+
idx
|
|
37805
|
+
)
|
|
37806
|
+
) })
|
|
37807
|
+
] }),
|
|
37808
|
+
/* @__PURE__ */ jsxs88("div", { children: [
|
|
37809
|
+
/* @__PURE__ */ jsxs88("h3", { className: "text-lg font-bold text-gray900 mb-3", children: [
|
|
37810
|
+
"Individual Mentions (",
|
|
37811
|
+
brandMentions.length,
|
|
37812
|
+
")"
|
|
37813
|
+
] }),
|
|
37814
|
+
/* @__PURE__ */ jsx130("div", { className: "flex flex-col gap-3", children: brandMentions.map((mention, index) => {
|
|
37815
|
+
const IconComponent = getPlatformIcon(mention?.platform);
|
|
37816
|
+
return /* @__PURE__ */ jsxs88(
|
|
37817
|
+
"div",
|
|
37818
|
+
{
|
|
37819
|
+
className: "bg-gray50 border-2 border-gray200 rounded-xl p-4 hover:border-purple100 transition-colors",
|
|
37820
|
+
children: [
|
|
37821
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex items-center justify-between mb-3", children: [
|
|
37822
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex items-center gap-2", children: [
|
|
37823
|
+
/* @__PURE__ */ jsx130(IconComponent, { className: "w-5 h-5 text-gray900" }),
|
|
37824
|
+
/* @__PURE__ */ jsx130("span", { className: "text-sm font-medium text-gray700 capitalize", children: mention.platform })
|
|
37825
|
+
] }),
|
|
37826
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex items-center gap-2", children: [
|
|
37827
|
+
/* @__PURE__ */ jsx130("span", { className: "px-2 py-1 rounded-md text-xs font-medium bg-[#1D4324] text-[#72E285]", children: mention.collaborationType }),
|
|
37828
|
+
/* @__PURE__ */ jsxs88("span", { className: "text-xs text-gray600", children: [
|
|
37829
|
+
Math.round(mention.confidence * 100),
|
|
37830
|
+
"% confidence"
|
|
37831
|
+
] })
|
|
37832
|
+
] })
|
|
37833
|
+
] }),
|
|
37834
|
+
/* @__PURE__ */ jsxs88("div", { className: "mb-2", children: [
|
|
37835
|
+
/* @__PURE__ */ jsxs88("span", { className: "text-xs text-gray500", children: [
|
|
37836
|
+
"Post ID:",
|
|
37837
|
+
" "
|
|
37838
|
+
] }),
|
|
37839
|
+
/* @__PURE__ */ jsx130("span", { className: "text-xs font-mono text-gray700", children: mention.post_id })
|
|
37840
|
+
] }),
|
|
37841
|
+
/* @__PURE__ */ jsxs88("div", { className: "bg-background rounded-lg p-3 border border-gray300", children: [
|
|
37842
|
+
/* @__PURE__ */ jsx130("div", { className: "text-xs text-gray600 mb-1", children: "Evidence:" }),
|
|
37843
|
+
/* @__PURE__ */ jsxs88("p", { className: "text-sm text-gray800 italic", children: [
|
|
37844
|
+
"\u201C",
|
|
37845
|
+
mention.evidence,
|
|
37846
|
+
"\u201D"
|
|
37847
|
+
] })
|
|
37848
|
+
] }),
|
|
37849
|
+
/* @__PURE__ */ jsxs88("div", { className: "mt-2 text-xs text-gray500", children: [
|
|
37850
|
+
"Source:",
|
|
37851
|
+
" ",
|
|
37852
|
+
/* @__PURE__ */ jsx130("span", { className: "font-medium", children: mention.source }),
|
|
37853
|
+
mention.handle && /* @__PURE__ */ jsxs88("span", { className: "ml-2", children: [
|
|
37854
|
+
"Handle:",
|
|
37855
|
+
" ",
|
|
37856
|
+
/* @__PURE__ */ jsx130("span", { className: "font-medium", children: mention.handle })
|
|
37857
|
+
] })
|
|
37858
|
+
] })
|
|
37859
|
+
]
|
|
37860
|
+
},
|
|
37861
|
+
index
|
|
37862
|
+
);
|
|
37863
|
+
}) })
|
|
37864
|
+
] }),
|
|
37865
|
+
brandMentions.length === 0 && /* @__PURE__ */ jsx130("div", { className: "text-center py-8 text-gray500", children: "No mentions found for this brand" })
|
|
37866
|
+
] })
|
|
37867
|
+
]
|
|
37868
|
+
},
|
|
37869
|
+
"brand-modal"
|
|
37870
|
+
)
|
|
37871
|
+
] }) }),
|
|
37872
|
+
document.body
|
|
37873
|
+
);
|
|
37874
|
+
}
|
|
37875
|
+
function BrandCollaborationsList({
|
|
37876
|
+
brandBreakdown
|
|
37877
|
+
}) {
|
|
37878
|
+
const [openDetails, setOpenDetails] = useState13(false);
|
|
37879
|
+
const [selectedBrand, setSelectedBrand] = useState13("");
|
|
37880
|
+
if (!brandBreakdown?.insights?.brandBreakdown || brandBreakdown.insights.brandBreakdown.length === 0) {
|
|
37881
|
+
return null;
|
|
37882
|
+
}
|
|
37883
|
+
return /* @__PURE__ */ jsxs88(Fragment7, { children: [
|
|
37884
|
+
/* @__PURE__ */ jsxs88("div", { children: [
|
|
37885
|
+
/* @__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" }) }),
|
|
37886
|
+
/* @__PURE__ */ jsx130("div", { className: "flex flex-col gap-2 max-h-[220px] overflow-y-auto", children: brandBreakdown.insights.brandBreakdown.map(
|
|
37887
|
+
(item, index) => /* @__PURE__ */ jsxs88(
|
|
37888
|
+
"div",
|
|
37889
|
+
{
|
|
37890
|
+
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",
|
|
37891
|
+
onClick: (e) => {
|
|
37892
|
+
e.stopPropagation();
|
|
37893
|
+
setSelectedBrand(item?.brand);
|
|
37894
|
+
setOpenDetails(true);
|
|
37895
|
+
},
|
|
37896
|
+
children: [
|
|
37897
|
+
/* @__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() || "?" }) }),
|
|
37898
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex flex-col gap-1", children: [
|
|
37899
|
+
/* @__PURE__ */ jsx130("div", { className: "text-gray900 text-sm", children: item.brand }),
|
|
37900
|
+
/* @__PURE__ */ jsxs88("div", { className: "flex gap-2 text-xs text-gray600", children: [
|
|
37901
|
+
/* @__PURE__ */ jsxs88("div", { children: [
|
|
37902
|
+
/* @__PURE__ */ jsx130("span", { className: "text-gray900", children: item?.mentions }),
|
|
37903
|
+
" ",
|
|
37904
|
+
"Mention"
|
|
37905
|
+
] }),
|
|
37906
|
+
/* @__PURE__ */ jsxs88("div", { children: [
|
|
37907
|
+
/* @__PURE__ */ jsx130(
|
|
37908
|
+
"span",
|
|
37909
|
+
{
|
|
37910
|
+
className: `${getSentimentRank(item.effectivenessPercent).scoreColor} font-bold`,
|
|
37911
|
+
children: item.effectivenessPercent ? `${item.effectivenessPercent}%` : "N/A"
|
|
37912
|
+
}
|
|
37913
|
+
),
|
|
37914
|
+
" ",
|
|
37915
|
+
"Effectiveness"
|
|
37916
|
+
] })
|
|
37917
|
+
] })
|
|
37918
|
+
] })
|
|
37919
|
+
]
|
|
37920
|
+
},
|
|
37921
|
+
index
|
|
37922
|
+
)
|
|
37923
|
+
) })
|
|
37924
|
+
] }),
|
|
37925
|
+
/* @__PURE__ */ jsx130(
|
|
37926
|
+
BrandMentionDetails,
|
|
37927
|
+
{
|
|
37928
|
+
open: openDetails,
|
|
37929
|
+
onClose: () => setOpenDetails(false),
|
|
37930
|
+
brandBreakdown,
|
|
37931
|
+
selectedBrand
|
|
37932
|
+
}
|
|
37933
|
+
)
|
|
37934
|
+
] });
|
|
37935
|
+
}
|
|
37936
|
+
|
|
37937
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorGridView.tsx
|
|
37938
|
+
import { useState as useState14, useMemo as useMemo9, useRef as useRef6, useCallback as useCallback4, useEffect as useEffect9 } from "react";
|
|
37939
|
+
import { motion as motion4 } from "framer-motion";
|
|
37940
|
+
import { jsx as jsx131, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
37941
|
+
var formatFollowerCount3 = (count) => {
|
|
37942
|
+
if (count >= 1e6) {
|
|
37943
|
+
const millions = count / 1e6;
|
|
37944
|
+
return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
|
|
37945
|
+
} else if (count >= 1e4) {
|
|
37946
|
+
return `${Math.floor(count / 1e3)}k`;
|
|
37947
|
+
} else if (count >= 1e3) {
|
|
37948
|
+
return `${(count / 1e3).toFixed(1)}k`;
|
|
37949
|
+
}
|
|
37950
|
+
return Math.floor(count).toString();
|
|
37951
|
+
};
|
|
37952
|
+
var getSentimentRank2 = (score) => {
|
|
37953
|
+
if (score >= 80) {
|
|
37954
|
+
return {
|
|
37955
|
+
bgColor: "bg-greenBackground",
|
|
37956
|
+
textColor: "text-greenText",
|
|
37957
|
+
scoreColor: "text-[#499C54]"
|
|
37958
|
+
};
|
|
37959
|
+
} else if (score >= 50) {
|
|
37960
|
+
return {
|
|
37961
|
+
bgColor: "bg-orangeBackground",
|
|
37962
|
+
textColor: "text-orangeText",
|
|
37963
|
+
scoreColor: "text-[#B3512F]"
|
|
37964
|
+
};
|
|
37965
|
+
} else if (score >= 0) {
|
|
37966
|
+
return {
|
|
37967
|
+
bgColor: "bg-redBackground",
|
|
37968
|
+
textColor: "text-redText",
|
|
37969
|
+
scoreColor: "text-[#BE2C35]"
|
|
37970
|
+
};
|
|
37971
|
+
}
|
|
37972
|
+
return {
|
|
37973
|
+
bgColor: "bg-gray500",
|
|
37974
|
+
textColor: "text-gray200",
|
|
37975
|
+
scoreColor: "text-gray200"
|
|
37976
|
+
};
|
|
37977
|
+
};
|
|
37978
|
+
var itemsExplanation = [
|
|
37979
|
+
{ key: "contentRelevance", label: "Content Relevance" },
|
|
37980
|
+
{ key: "audienceMatch", label: "Audience Match" },
|
|
37981
|
+
{ key: "authorityExpertise", label: "Expertise" },
|
|
37982
|
+
{ key: "contentQuality", label: "Content Quality" },
|
|
37983
|
+
{ key: "authenticity", label: "Authenticity" },
|
|
37984
|
+
{ key: "brandSafety", label: "Brand Safety" }
|
|
37985
|
+
];
|
|
37986
|
+
function CreatorGridViewCard({ creator }) {
|
|
37987
|
+
const [isExpanded, setIsExpanded] = useState14(false);
|
|
37988
|
+
const [showFullDescription, setShowFullDescription] = useState14(false);
|
|
37989
|
+
const [isDescriptionOverflowing, setIsDescriptionOverflowing] = useState14(false);
|
|
37990
|
+
const descriptionRef = useRef6(null);
|
|
37991
|
+
const cardRef = useRef6(null);
|
|
37992
|
+
const checkDescriptionOverflow = useCallback4(() => {
|
|
37993
|
+
const el = descriptionRef.current;
|
|
37994
|
+
if (!el) return;
|
|
37995
|
+
setIsDescriptionOverflowing(el.scrollHeight > el.clientHeight + 1);
|
|
37996
|
+
}, []);
|
|
37997
|
+
useEffect9(() => {
|
|
37998
|
+
checkDescriptionOverflow();
|
|
37999
|
+
}, [checkDescriptionOverflow, isExpanded, showFullDescription]);
|
|
38000
|
+
useEffect9(() => {
|
|
38001
|
+
const onResize = () => checkDescriptionOverflow();
|
|
38002
|
+
window.addEventListener("resize", onResize);
|
|
38003
|
+
return () => window.removeEventListener("resize", onResize);
|
|
38004
|
+
}, [checkDescriptionOverflow]);
|
|
38005
|
+
const platformStats = useMemo9(() => {
|
|
38006
|
+
return [
|
|
38007
|
+
{
|
|
38008
|
+
platform: "instagram",
|
|
38009
|
+
icon: InstagramIcon,
|
|
38010
|
+
followers: creator.metrics?.instagram?.followers || 0,
|
|
38011
|
+
engagement: creator.metrics?.instagram?.engagement || 0
|
|
38012
|
+
},
|
|
38013
|
+
{
|
|
38014
|
+
platform: "youtube",
|
|
38015
|
+
icon: YouTubeIcon,
|
|
38016
|
+
followers: creator.metrics?.youtube?.followers || 0,
|
|
38017
|
+
engagement: creator.metrics?.youtube?.engagement || 0
|
|
38018
|
+
},
|
|
38019
|
+
{
|
|
38020
|
+
platform: "tiktok",
|
|
38021
|
+
icon: TikTokIcon3,
|
|
38022
|
+
followers: creator.metrics?.tiktok?.followers || 0,
|
|
38023
|
+
engagement: creator.metrics?.tiktok?.engagement || 0
|
|
38024
|
+
}
|
|
38025
|
+
];
|
|
38026
|
+
}, [creator]);
|
|
38027
|
+
const toggleExpanded = () => {
|
|
38028
|
+
const willExpand = !isExpanded;
|
|
38029
|
+
setIsExpanded(willExpand);
|
|
38030
|
+
setTimeout(() => {
|
|
38031
|
+
if (cardRef.current) {
|
|
38032
|
+
cardRef.current.scrollIntoView({
|
|
38033
|
+
behavior: "smooth",
|
|
38034
|
+
block: willExpand ? "center" : "nearest"
|
|
38035
|
+
});
|
|
38036
|
+
}
|
|
38037
|
+
}, 100);
|
|
38038
|
+
};
|
|
38039
|
+
const iso2 = normalizeToIso2(creator.country);
|
|
38040
|
+
const meta = codeToMeta[iso2];
|
|
38041
|
+
return /* @__PURE__ */ jsx131(
|
|
38042
|
+
motion4.div,
|
|
38043
|
+
{
|
|
38044
|
+
ref: cardRef,
|
|
38045
|
+
layout: "position",
|
|
38046
|
+
initial: { opacity: 0, y: 10 },
|
|
38047
|
+
animate: { opacity: 1, y: 0 },
|
|
38048
|
+
transition: { duration: 0.3 },
|
|
38049
|
+
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" : ""}`,
|
|
38050
|
+
style: isExpanded ? { gridColumn: "1 / -1" } : {},
|
|
38051
|
+
onClick: toggleExpanded,
|
|
38052
|
+
children: /* @__PURE__ */ jsxs89("div", { className: "flex", children: [
|
|
38053
|
+
/* @__PURE__ */ jsxs89("div", { className: `${isExpanded ? "w-1/3" : "w-full"}`, children: [
|
|
38054
|
+
/* @__PURE__ */ jsxs89("div", { className: "relative w-full aspect-square mb-2", children: [
|
|
38055
|
+
creator.profile_pic ? /* @__PURE__ */ jsx131(
|
|
38056
|
+
"img",
|
|
38057
|
+
{
|
|
38058
|
+
src: creator.profile_pic,
|
|
38059
|
+
alt: creator.name,
|
|
38060
|
+
className: "w-full h-full object-cover bg-primary/10",
|
|
38061
|
+
style: { borderRadius: "10px 10px 0 0" }
|
|
38062
|
+
}
|
|
38063
|
+
) : /* @__PURE__ */ jsx131(
|
|
38064
|
+
"div",
|
|
38065
|
+
{
|
|
38066
|
+
className: "w-full h-full bg-primary/10 flex items-center justify-center",
|
|
38067
|
+
style: { borderRadius: "10px 10px 0 0" },
|
|
38068
|
+
children: /* @__PURE__ */ jsx131("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" })
|
|
38069
|
+
}
|
|
38070
|
+
),
|
|
38071
|
+
/* @__PURE__ */ jsx131(
|
|
38072
|
+
"div",
|
|
38073
|
+
{
|
|
38074
|
+
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`,
|
|
38075
|
+
children: creator.sentiment ? `${creator.sentiment?.matchScore?.toFixed(1)}%` : "N/A"
|
|
38076
|
+
}
|
|
38077
|
+
)
|
|
38078
|
+
] }),
|
|
38079
|
+
/* @__PURE__ */ jsxs89("div", { className: "px-3 pb-1", children: [
|
|
38080
|
+
/* @__PURE__ */ jsxs89("div", { children: [
|
|
38081
|
+
/* @__PURE__ */ jsx131(
|
|
38082
|
+
"h3",
|
|
38083
|
+
{
|
|
38084
|
+
className: `${isExpanded ? "text-md" : "text-sm"} font-normal text-gray900 mb-1 line-clamp-2 text-start`,
|
|
38085
|
+
children: creator.name || "Unnamed"
|
|
38086
|
+
}
|
|
38087
|
+
),
|
|
38088
|
+
/* @__PURE__ */ jsxs89(
|
|
38089
|
+
"div",
|
|
38090
|
+
{
|
|
38091
|
+
className: `${isExpanded ? "text-sm" : "text-xs"} text-gray700 mb-1 text-start flex items-center gap-1`,
|
|
38092
|
+
children: [
|
|
38093
|
+
/* @__PURE__ */ jsx131("span", { className: "text-base", children: meta?.flag }),
|
|
38094
|
+
/* @__PURE__ */ jsx131("span", { children: meta?.name || creator.country || "Unknown" })
|
|
38095
|
+
]
|
|
38096
|
+
}
|
|
38097
|
+
),
|
|
38098
|
+
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(
|
|
38099
|
+
([key, value]) => {
|
|
38100
|
+
const itemRank = getSentimentRank2(value);
|
|
38101
|
+
return /* @__PURE__ */ jsxs89(
|
|
38102
|
+
"div",
|
|
38103
|
+
{
|
|
38104
|
+
className: "flex flex-col items-center w-[100px]",
|
|
38105
|
+
children: [
|
|
38106
|
+
/* @__PURE__ */ jsxs89(
|
|
38107
|
+
"span",
|
|
38108
|
+
{
|
|
38109
|
+
className: `text-[14px] font-bold ${itemRank.scoreColor}`,
|
|
38110
|
+
children: [
|
|
38111
|
+
value,
|
|
38112
|
+
"%"
|
|
38113
|
+
]
|
|
38114
|
+
}
|
|
38115
|
+
),
|
|
38116
|
+
/* @__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(
|
|
38117
|
+
(item) => item.key === key
|
|
38118
|
+
)?.label }) })
|
|
38119
|
+
]
|
|
38120
|
+
},
|
|
38121
|
+
key
|
|
38122
|
+
);
|
|
38123
|
+
}
|
|
38124
|
+
) }) })
|
|
38125
|
+
] }),
|
|
38126
|
+
!isExpanded && /* @__PURE__ */ jsx131("div", { className: "flex gap-2 justify-between", children: platformStats.map(
|
|
38127
|
+
({ platform, icon: Icon3, followers }) => /* @__PURE__ */ jsxs89(
|
|
38128
|
+
"div",
|
|
38129
|
+
{
|
|
38130
|
+
className: "flex flex-col items-center gap-1",
|
|
38131
|
+
title: `${formatFollowerCount3(followers)} followers`,
|
|
38132
|
+
children: [
|
|
38133
|
+
/* @__PURE__ */ jsx131(
|
|
38134
|
+
Icon3,
|
|
38135
|
+
{
|
|
38136
|
+
className: `w-5 h-5 ${getPlatformIconColor(platform)}`
|
|
38137
|
+
}
|
|
38138
|
+
),
|
|
38139
|
+
/* @__PURE__ */ jsx131("span", { className: "text-xs dark:text-gray500", children: followers > 0 && formatFollowerCount3(followers) })
|
|
38140
|
+
]
|
|
38141
|
+
},
|
|
38142
|
+
platform
|
|
38143
|
+
)
|
|
38144
|
+
) })
|
|
38145
|
+
] })
|
|
38146
|
+
] }),
|
|
38147
|
+
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: [
|
|
38148
|
+
/* @__PURE__ */ jsxs89("div", { children: [
|
|
38149
|
+
/* @__PURE__ */ jsxs89(
|
|
38150
|
+
"div",
|
|
38151
|
+
{
|
|
38152
|
+
ref: descriptionRef,
|
|
38153
|
+
className: `${showFullDescription ? "" : "max-h-[80px] overflow-hidden"} relative`,
|
|
38154
|
+
children: [
|
|
38155
|
+
/* @__PURE__ */ jsx131("p", { className: "text-sm text-gray700 leading-relaxed", children: creator.description || "No description provided." }),
|
|
38156
|
+
!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" })
|
|
38157
|
+
]
|
|
38158
|
+
}
|
|
38159
|
+
),
|
|
38160
|
+
(isDescriptionOverflowing || showFullDescription) && /* @__PURE__ */ jsx131(
|
|
38161
|
+
"button",
|
|
38162
|
+
{
|
|
38163
|
+
onClick: (e) => {
|
|
38164
|
+
e.stopPropagation();
|
|
38165
|
+
setShowFullDescription((v) => !v);
|
|
38166
|
+
},
|
|
38167
|
+
className: "mt-1 px-3 py-1 rounded border border-gray300 text-sm text-gray700 hover:text-gray900",
|
|
38168
|
+
children: showFullDescription ? "Show less" : "Show more"
|
|
38169
|
+
}
|
|
38170
|
+
)
|
|
38171
|
+
] }),
|
|
38172
|
+
/* @__PURE__ */ jsx131("div", { className: "flex gap-6 justify-start items-center", children: platformStats.map(
|
|
38173
|
+
({ platform, icon: Icon3, followers, engagement }) => /* @__PURE__ */ jsxs89("div", { className: "flex items-center gap-3", children: [
|
|
38174
|
+
/* @__PURE__ */ jsxs89(
|
|
38175
|
+
"div",
|
|
38176
|
+
{
|
|
38177
|
+
className: "flex items-center gap-1",
|
|
38178
|
+
title: `${formatFollowerCount3(followers)} followers`,
|
|
38179
|
+
children: [
|
|
38180
|
+
/* @__PURE__ */ jsx131(
|
|
38181
|
+
Icon3,
|
|
38182
|
+
{
|
|
38183
|
+
className: `w-5 h-5 ${getPlatformIconColor(platform)}`
|
|
38184
|
+
}
|
|
38185
|
+
),
|
|
38186
|
+
/* @__PURE__ */ jsx131("span", { className: "text-xs dark:text-gray500", children: followers > 0 ? formatFollowerCount3(followers) : "0" })
|
|
38187
|
+
]
|
|
38188
|
+
}
|
|
38189
|
+
),
|
|
38190
|
+
/* @__PURE__ */ jsxs89("div", { className: "flex items-center gap-1", children: [
|
|
38191
|
+
/* @__PURE__ */ jsx131(ChartColumn, { className: "w-5 h-5 dark:text-gray500" }),
|
|
38192
|
+
/* @__PURE__ */ jsxs89("span", { className: "text-sm dark:text-gray500 w-[40px]", children: [
|
|
38193
|
+
(engagement * 100).toFixed(1),
|
|
38194
|
+
"%"
|
|
38195
|
+
] })
|
|
38196
|
+
] })
|
|
38197
|
+
] }, platform)
|
|
38198
|
+
) }),
|
|
38199
|
+
creator.posts?.length > 0 && /* @__PURE__ */ jsxs89("div", { className: "w-full overflow-hidden", children: [
|
|
38200
|
+
/* @__PURE__ */ jsx131("h3", { className: "mb-2 text-sm font-medium text-gray900", children: "Recent Posts" }),
|
|
38201
|
+
/* @__PURE__ */ jsx131("div", { className: "flex gap-3 overflow-x-auto", children: creator.posts.filter(
|
|
38202
|
+
(post) => post.thumbnail || post.thumbnail_url
|
|
38203
|
+
).slice(0, 8).map((post, idx) => /* @__PURE__ */ jsx131(
|
|
38204
|
+
"a",
|
|
38205
|
+
{
|
|
38206
|
+
href: post.url || "#",
|
|
38207
|
+
target: "_blank",
|
|
38208
|
+
rel: "noopener noreferrer",
|
|
38209
|
+
className: "block flex-shrink-0",
|
|
38210
|
+
onClick: (e) => e.stopPropagation(),
|
|
38211
|
+
children: /* @__PURE__ */ jsx131(
|
|
38212
|
+
"img",
|
|
38213
|
+
{
|
|
38214
|
+
src: post.thumbnail_url || post.thumbnail,
|
|
38215
|
+
alt: post.title || `Post ${idx + 1}`,
|
|
38216
|
+
className: "rounded-md object-cover w-[120px] h-[120px]"
|
|
38217
|
+
}
|
|
38218
|
+
)
|
|
38219
|
+
},
|
|
38220
|
+
idx
|
|
38221
|
+
)) })
|
|
38222
|
+
] }),
|
|
38223
|
+
creator?.sentiment?.aiReasoning && /* @__PURE__ */ jsxs89("div", { className: "text-gray700 max-h-[200px] overflow-auto", children: [
|
|
38224
|
+
/* @__PURE__ */ jsx131("h4", { className: "font-semibold text-sm", children: "AI Analysis" }),
|
|
38225
|
+
/* @__PURE__ */ jsx131("p", { className: "text-sm", children: creator.sentiment.aiReasoning })
|
|
38226
|
+
] })
|
|
38227
|
+
] }) })
|
|
38228
|
+
] })
|
|
38229
|
+
}
|
|
38230
|
+
);
|
|
38231
|
+
}
|
|
38232
|
+
function CreatorGridView({
|
|
38233
|
+
creatorData
|
|
38234
|
+
}) {
|
|
38235
|
+
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)) });
|
|
38236
|
+
}
|
|
38237
|
+
|
|
38238
|
+
// src/molecules/creator-discovery/CreatorWidget/CreatorExpandedPanel.tsx
|
|
38239
|
+
import { Fragment as Fragment8, jsx as jsx132, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
38240
|
+
var formatFollowerCount4 = (count) => {
|
|
38241
|
+
if (count >= 1e6) {
|
|
38242
|
+
const millions = count / 1e6;
|
|
38243
|
+
return `${millions % 1 === 0 ? Math.floor(millions) : millions.toFixed(1)}M`;
|
|
38244
|
+
} else if (count >= 1e4) {
|
|
38245
|
+
return `${Math.floor(count / 1e3)}k`;
|
|
38246
|
+
} else if (count >= 1e3) {
|
|
38247
|
+
return `${(count / 1e3).toFixed(1)}k`;
|
|
38248
|
+
}
|
|
38249
|
+
return Math.floor(count).toString();
|
|
38250
|
+
};
|
|
38251
|
+
var getSentimentRank3 = (score) => {
|
|
38252
|
+
if (score >= 80) {
|
|
38253
|
+
return {
|
|
38254
|
+
rank: "STRONG FIT",
|
|
38255
|
+
bgColor: "bg-greenBackground",
|
|
38256
|
+
textColor: "text-greenText",
|
|
38257
|
+
scoreColor: "text-[#499C54]"
|
|
38258
|
+
};
|
|
38259
|
+
} else if (score >= 50) {
|
|
38260
|
+
return {
|
|
38261
|
+
rank: "MODERATE FIT",
|
|
38262
|
+
bgColor: "bg-orangeBackground",
|
|
38263
|
+
textColor: "text-orangeText",
|
|
38264
|
+
scoreColor: "text-[#B3512F]"
|
|
38265
|
+
};
|
|
38266
|
+
} else if (score >= 0) {
|
|
38267
|
+
return {
|
|
38268
|
+
rank: "POOR FIT",
|
|
38269
|
+
bgColor: "bg-redBackground",
|
|
38270
|
+
textColor: "text-redText",
|
|
38271
|
+
scoreColor: "text-[#BE2C35]"
|
|
38272
|
+
};
|
|
38273
|
+
}
|
|
38274
|
+
return {
|
|
38275
|
+
rank: "Unranked",
|
|
38276
|
+
bgColor: "bg-gray500",
|
|
38277
|
+
textColor: "text-gray200",
|
|
38278
|
+
scoreColor: "text-gray500"
|
|
38279
|
+
};
|
|
38280
|
+
};
|
|
38281
|
+
function formatCreator(raw) {
|
|
38282
|
+
return {
|
|
38283
|
+
_id: raw.creator_id || raw.profile?.upfluenceId,
|
|
38284
|
+
name: raw.profile?.name || "",
|
|
38285
|
+
description: raw.profile?.description || "",
|
|
38286
|
+
isVerified: raw.profile?.isVerified || false,
|
|
38287
|
+
country: raw.profile?.country || "",
|
|
38288
|
+
profile_pic: raw.profile?.profilePicture || "",
|
|
38289
|
+
platforms: raw.profile?.platforms,
|
|
38290
|
+
platformMetrics: raw.platformMetrics || {},
|
|
38291
|
+
metrics: {
|
|
38292
|
+
instagram: {
|
|
38293
|
+
engagement: raw.platformMetrics?.instagramMetrics?.engagementRate || 0,
|
|
38294
|
+
followers: raw.platformMetrics?.instagramMetrics?.followers || 0,
|
|
38295
|
+
avgLikes: raw.platformMetrics?.instagramMetrics?.avgLikes || 0,
|
|
38296
|
+
avgComments: raw.platformMetrics?.instagramMetrics?.avgComments || 0
|
|
38297
|
+
},
|
|
38298
|
+
youtube: {
|
|
38299
|
+
engagement: raw.platformMetrics?.youtubeMetrics?.engagementRate || 0,
|
|
38300
|
+
followers: raw.platformMetrics?.youtubeMetrics?.subscribers || 0,
|
|
38301
|
+
avgLikes: raw.platformMetrics?.youtubeMetrics?.avgLikes || 0,
|
|
38302
|
+
avgComments: raw.platformMetrics?.youtubeMetrics?.avgComments || 0
|
|
38303
|
+
},
|
|
38304
|
+
tiktok: {
|
|
38305
|
+
engagement: raw.platformMetrics?.tiktokMetrics?.engagementRate || 0,
|
|
38306
|
+
followers: raw.platformMetrics?.tiktokMetrics?.followers || 0,
|
|
38307
|
+
avgLikes: raw.platformMetrics?.tiktokMetrics?.avgLikes || 0,
|
|
38308
|
+
avgComments: raw.platformMetrics?.tiktokMetrics?.avgComments || 0
|
|
38309
|
+
}
|
|
38310
|
+
},
|
|
38311
|
+
posts: raw.posts || [],
|
|
38312
|
+
sentiment: raw.sentiment || null,
|
|
38313
|
+
audienceDemographics: raw.audienceDemographics || null,
|
|
38314
|
+
brandCollaborations: raw.brandCollaborations || null,
|
|
38315
|
+
profile: raw.profile || {}
|
|
38316
|
+
};
|
|
38317
|
+
}
|
|
38318
|
+
var truncateName2 = (name, maxLen) => {
|
|
38319
|
+
if (!name) return "";
|
|
38320
|
+
return name.length > maxLen ? name.slice(0, maxLen) + "..." : name;
|
|
38321
|
+
};
|
|
38322
|
+
function SearchSpecDisplay({ spec }) {
|
|
38323
|
+
if (!spec) return null;
|
|
38324
|
+
const priorityOneBundles = Array.isArray(spec?.keyword_bundles) ? spec.keyword_bundles.filter((b) => b?.priority !== void 0 ? b.priority === 1 : true).flatMap((b) => b?.keywords || []) : [];
|
|
38325
|
+
const textClass = "text-sm text-white dark:text-gray900";
|
|
38326
|
+
const paddingClass = "px-4 py-1";
|
|
38327
|
+
const roundedClass = "rounded-lg";
|
|
38328
|
+
const tagClass = `${textClass} ${paddingClass} bg-[#85888f] dark:bg-[rgba(249,249,249,0.2)] ${roundedClass} border border-[#85888f] dark:border-gray800 font-medium`;
|
|
38329
|
+
const items = [
|
|
38330
|
+
{
|
|
38331
|
+
key: "platforms",
|
|
38332
|
+
title: "Platforms",
|
|
38333
|
+
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)) })
|
|
38334
|
+
},
|
|
38335
|
+
{
|
|
38336
|
+
key: "follower_range",
|
|
38337
|
+
title: "Follower Range",
|
|
38338
|
+
content: /* @__PURE__ */ jsxs90("div", { className: `inline-block ${tagClass} font-grotesk`, children: [
|
|
38339
|
+
formatFollowerCount4(spec?.follower_range?.min ?? 0),
|
|
38340
|
+
" -",
|
|
38341
|
+
" ",
|
|
38342
|
+
formatFollowerCount4(spec?.follower_range?.max ?? 0)
|
|
38343
|
+
] })
|
|
38344
|
+
},
|
|
38345
|
+
{
|
|
38346
|
+
key: "geography",
|
|
38347
|
+
title: "Geography",
|
|
38348
|
+
content: /* @__PURE__ */ jsx132("div", { className: `inline-block ${tagClass} font-grotesk`, children: /* @__PURE__ */ jsx132(
|
|
38349
|
+
"div",
|
|
38350
|
+
{
|
|
38351
|
+
className: "max-w-[200px] overflow-x-auto whitespace-nowrap",
|
|
38352
|
+
style: { scrollbarWidth: "none", textOverflow: "ellipsis", overflow: "hidden" },
|
|
38353
|
+
onMouseEnter: (e) => {
|
|
38354
|
+
e.currentTarget.style.textOverflow = "clip";
|
|
38355
|
+
e.currentTarget.style.overflow = "auto";
|
|
38356
|
+
},
|
|
38357
|
+
onMouseLeave: (e) => {
|
|
38358
|
+
e.currentTarget.style.textOverflow = "ellipsis";
|
|
38359
|
+
e.currentTarget.style.overflow = "hidden";
|
|
38360
|
+
e.currentTarget.scrollLeft = 0;
|
|
38361
|
+
},
|
|
38362
|
+
children: (spec.geography || []).map((g, idx) => /* @__PURE__ */ jsxs90("span", { children: [
|
|
38363
|
+
g,
|
|
38364
|
+
idx < spec.geography.length - 1 ? ", " : ""
|
|
38365
|
+
] }, idx))
|
|
38366
|
+
}
|
|
38367
|
+
) })
|
|
38368
|
+
},
|
|
38369
|
+
{
|
|
38370
|
+
key: "keyword_bundles",
|
|
38371
|
+
title: "Keyword",
|
|
38372
|
+
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)) })
|
|
38373
|
+
}
|
|
38374
|
+
];
|
|
38375
|
+
const itemsToShow = ["platforms", "follower_range", "geography", "keyword_bundles"];
|
|
38376
|
+
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: [
|
|
38377
|
+
/* @__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() }) }),
|
|
38378
|
+
/* @__PURE__ */ jsx132("div", { className: `flex text-gray900 ${textClass}`, children: content })
|
|
38379
|
+
] }, key)) }) });
|
|
36801
38380
|
}
|
|
36802
|
-
function
|
|
36803
|
-
|
|
36804
|
-
|
|
38381
|
+
function SentimentScoreRank({
|
|
38382
|
+
score,
|
|
38383
|
+
isValidationComplete,
|
|
38384
|
+
showMinialView = false
|
|
36805
38385
|
}) {
|
|
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
|
-
] })
|
|
38386
|
+
const sentimentScoreRank = getSentimentRank3(score);
|
|
38387
|
+
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: [
|
|
38388
|
+
score !== void 0 && /* @__PURE__ */ jsx132("div", { className: "flex justify-center items-center mb-2", children: /* @__PURE__ */ jsx132(
|
|
38389
|
+
"span",
|
|
38390
|
+
{
|
|
38391
|
+
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]"}`,
|
|
38392
|
+
children: isValidationComplete ? sentimentScoreRank.rank : "Unranked"
|
|
38393
|
+
}
|
|
38394
|
+
) }),
|
|
38395
|
+
/* @__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" }) }) }),
|
|
38396
|
+
!showMinialView && /* @__PURE__ */ jsx132("p", { className: "text-gray600 dark:text-gray500 text-center", children: "Match Score" })
|
|
36833
38397
|
] }) });
|
|
36834
38398
|
}
|
|
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, {});
|
|
38399
|
+
function BrandMentionPerformance({ creator }) {
|
|
38400
|
+
const insights = creator?.brandCollaborations?.insights;
|
|
38401
|
+
if (!insights) return null;
|
|
38402
|
+
const isValid2 = (val) => val !== null && val !== void 0 && val !== 0 && val !== "0" && val !== "" && !Number.isNaN(val);
|
|
38403
|
+
if (!isValid2(insights.averageBrandEngagementRate) && !isValid2(insights.effectivenessPercent) && !isValid2(insights.saturationRate)) {
|
|
38404
|
+
return null;
|
|
36855
38405
|
}
|
|
36856
|
-
|
|
36857
|
-
|
|
36858
|
-
|
|
36859
|
-
|
|
36860
|
-
|
|
38406
|
+
const metrics = [
|
|
38407
|
+
{ title: "Avg engagement rate", subtitle: "on brand mention", value: `${insights?.averageBrandEngagementRate || 0} %` },
|
|
38408
|
+
{ title: "Effectiveness", subtitle: "compared to all posts", value: `${insights?.effectivenessPercent || 0} %` },
|
|
38409
|
+
{ title: "Saturation Rate", subtitle: "on brand mention", value: `${insights?.saturationRate || 0} %` }
|
|
38410
|
+
];
|
|
38411
|
+
return /* @__PURE__ */ jsxs90("div", { children: [
|
|
38412
|
+
/* @__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" }) }),
|
|
38413
|
+
/* @__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: [
|
|
38414
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex flex-col gap-1", children: [
|
|
38415
|
+
/* @__PURE__ */ jsx132("h5", { children: item.title }),
|
|
38416
|
+
/* @__PURE__ */ jsx132("p", { className: "text-xs", children: item.subtitle })
|
|
36861
38417
|
] }),
|
|
36862
|
-
|
|
36863
|
-
|
|
36864
|
-
|
|
38418
|
+
/* @__PURE__ */ jsx132("p", { className: "text-purpleText text-lg", children: item.value })
|
|
38419
|
+
] }, item.title)) })
|
|
38420
|
+
] });
|
|
38421
|
+
}
|
|
38422
|
+
function CreatorFitSummary({ creator, showBrandPerformance }) {
|
|
38423
|
+
const hasDeepAnalysis = creator?.sentiment?.deepAnalysis?.deepAnalysis;
|
|
38424
|
+
const title = hasDeepAnalysis ? "CREATOR DEEP ANALYSIS" : "CREATOR FIT SUMMARY";
|
|
38425
|
+
const content = hasDeepAnalysis ? creator.sentiment.deepAnalysis.deepAnalysis : creator?.sentiment?.aiReasoning || "No data available.";
|
|
38426
|
+
return /* @__PURE__ */ jsxs90("div", { className: showBrandPerformance ? "col-span-1" : "col-span-2", children: [
|
|
38427
|
+
/* @__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 }) }),
|
|
38428
|
+
/* @__PURE__ */ jsx132("div", { className: "max-h-[140px] overflow-y-auto slim-scrollbar", children: /* @__PURE__ */ jsx132("p", { className: "text-gray700 text-sm", children: content }) })
|
|
38429
|
+
] });
|
|
38430
|
+
}
|
|
38431
|
+
function ProfileSection({ creator, isValidationComplete }) {
|
|
38432
|
+
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}` : "";
|
|
38433
|
+
const iso2 = normalizeToIso2(creator.country);
|
|
38434
|
+
const meta = codeToMeta[iso2];
|
|
38435
|
+
return /* @__PURE__ */ jsxs90("div", { className: "flex items-start gap-1 md:gap-6", children: [
|
|
38436
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex flex-col items-center gap-6", children: [
|
|
38437
|
+
/* @__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: [
|
|
38438
|
+
/* @__PURE__ */ jsx132(
|
|
38439
|
+
"img",
|
|
36865
38440
|
{
|
|
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
|
-
]
|
|
38441
|
+
src: creator.profile_pic,
|
|
38442
|
+
alt: creator.name,
|
|
38443
|
+
className: "object-cover w-[5rem] h-[5rem] rounded-[15px]"
|
|
36873
38444
|
}
|
|
36874
38445
|
),
|
|
36875
|
-
|
|
36876
|
-
|
|
38446
|
+
creator?.profile?.isVerified && /* @__PURE__ */ jsx132(
|
|
38447
|
+
BadgeCheck,
|
|
36877
38448
|
{
|
|
36878
|
-
|
|
36879
|
-
className: "
|
|
36880
|
-
|
|
36881
|
-
|
|
36882
|
-
|
|
36883
|
-
|
|
36884
|
-
},
|
|
36885
|
-
v
|
|
36886
|
-
)) })
|
|
36887
|
-
] }) })
|
|
38449
|
+
size: 35,
|
|
38450
|
+
className: "absolute -top-2 -right-2 text-blue-500 drop-shadow-sm fill-blue-300"
|
|
38451
|
+
}
|
|
38452
|
+
)
|
|
38453
|
+
] }) : /* @__PURE__ */ jsx132("span", { className: "text-2xl text-primary", children: creator.name?.charAt(0) || "?" }) }),
|
|
38454
|
+
/* @__PURE__ */ jsx132("div", { className: "block sm:hidden", children: /* @__PURE__ */ jsx132(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete, showMinialView: true }) })
|
|
36888
38455
|
] }),
|
|
36889
|
-
/* @__PURE__ */
|
|
36890
|
-
/* @__PURE__ */
|
|
36891
|
-
/* @__PURE__ */
|
|
36892
|
-
|
|
36893
|
-
|
|
36894
|
-
/* @__PURE__ */
|
|
36895
|
-
|
|
38456
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex flex-col gap-3 truncate", children: [
|
|
38457
|
+
/* @__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) }) }),
|
|
38458
|
+
username && /* @__PURE__ */ jsx132("div", { className: "text-xs text-gray700", children: username }),
|
|
38459
|
+
/* @__PURE__ */ jsxs90("div", { className: "text-sm text-gray700 flex items-center gap-2", children: [
|
|
38460
|
+
/* @__PURE__ */ jsx132("span", { className: "text-base", children: meta?.flag }),
|
|
38461
|
+
/* @__PURE__ */ jsx132("span", { children: meta?.name || creator.country || "Unknown" })
|
|
38462
|
+
] }),
|
|
38463
|
+
/* @__PURE__ */ jsx132("div", { className: "text-xs text-gray700 text-wrap", children: truncateName2(creator.description, 100) })
|
|
38464
|
+
] })
|
|
38465
|
+
] });
|
|
38466
|
+
}
|
|
38467
|
+
function CreatorCardExpandedSection({
|
|
38468
|
+
creator
|
|
38469
|
+
}) {
|
|
38470
|
+
const hasBrandBreakdown = creator?.brandCollaborations?.insights?.brandBreakdown && creator?.sentiment?.deepAnalysis;
|
|
38471
|
+
return /* @__PURE__ */ jsxs90(
|
|
38472
|
+
motion5.div,
|
|
38473
|
+
{
|
|
38474
|
+
initial: { y: 20, opacity: 0 },
|
|
38475
|
+
animate: { y: 0, opacity: 1 },
|
|
38476
|
+
transition: { duration: 0.3, delay: 0.1 },
|
|
38477
|
+
className: "md:mt-6 space-y-5",
|
|
38478
|
+
children: [
|
|
38479
|
+
/* @__PURE__ */ jsxs90("div", { className: "md:grid md:grid-cols-[1.3fr_1fr_2fr_120px] gap-8 py-4 pr-7", children: [
|
|
38480
|
+
/* @__PURE__ */ jsx132("div", { className: "col-span-4 sm:col-span-1", children: hasBrandBreakdown ? /* @__PURE__ */ jsx132(
|
|
38481
|
+
BrandCollaborationsList,
|
|
38482
|
+
{
|
|
38483
|
+
brandBreakdown: creator?.brandCollaborations
|
|
38484
|
+
}
|
|
38485
|
+
) : /* @__PURE__ */ jsx132("div", { className: "hidden sm:block" }) }),
|
|
38486
|
+
/* @__PURE__ */ jsx132("div", { className: "col-span-4 sm:col-span-3", children: creator?.audienceDemographics ? /* @__PURE__ */ jsx132(
|
|
38487
|
+
EngagedAudienceDemographics,
|
|
38488
|
+
{
|
|
38489
|
+
audienceDemographics: creator.audienceDemographics
|
|
38490
|
+
}
|
|
38491
|
+
) : null })
|
|
38492
|
+
] }),
|
|
38493
|
+
/* @__PURE__ */ jsx132(
|
|
38494
|
+
PlatformPostsSection,
|
|
36896
38495
|
{
|
|
36897
|
-
|
|
36898
|
-
|
|
36899
|
-
isAgentOutput,
|
|
36900
|
-
initialCreatorsPercentage: statusDetails?.social_fetch_percentage
|
|
38496
|
+
platformMetrics: creator.platformMetrics,
|
|
38497
|
+
posts: creator.posts ?? creator.post
|
|
36901
38498
|
}
|
|
36902
|
-
)
|
|
36903
|
-
|
|
36904
|
-
|
|
38499
|
+
)
|
|
38500
|
+
]
|
|
38501
|
+
}
|
|
38502
|
+
);
|
|
38503
|
+
}
|
|
38504
|
+
function CreatorCard({
|
|
38505
|
+
creator,
|
|
38506
|
+
isValidationComplete
|
|
38507
|
+
}) {
|
|
38508
|
+
const [detailsExpanded, setDetailsExpanded] = useState15(false);
|
|
38509
|
+
const hasValidBrandMention = (() => {
|
|
38510
|
+
const insights = creator?.brandCollaborations?.insights;
|
|
38511
|
+
if (!insights) return false;
|
|
38512
|
+
const isValid2 = (val) => val !== null && val !== void 0 && val !== 0 && val !== "0" && val !== "" && !Number.isNaN(val);
|
|
38513
|
+
return isValid2(insights.averageBrandEngagementRate) || isValid2(insights.effectivenessPercent) || isValid2(insights.saturationRate);
|
|
38514
|
+
})();
|
|
38515
|
+
return /* @__PURE__ */ jsxs90(
|
|
38516
|
+
motion5.div,
|
|
38517
|
+
{
|
|
38518
|
+
layout: true,
|
|
38519
|
+
initial: { opacity: 0, y: 20 },
|
|
38520
|
+
animate: { opacity: 1, y: 0 },
|
|
38521
|
+
exit: { opacity: 0, y: -20 },
|
|
38522
|
+
transition: { duration: 0.4, ease: [0.22, 1, 0.36, 1] },
|
|
38523
|
+
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"}`,
|
|
38524
|
+
onClick: () => setDetailsExpanded((prev) => !prev),
|
|
38525
|
+
children: [
|
|
38526
|
+
/* @__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: [
|
|
38527
|
+
/* @__PURE__ */ jsx132(ProfileSection, { creator, isValidationComplete }),
|
|
38528
|
+
hasValidBrandMention && /* @__PURE__ */ jsx132(BrandMentionPerformance, { creator }),
|
|
38529
|
+
/* @__PURE__ */ jsx132(CreatorFitSummary, { creator, showBrandPerformance: hasValidBrandMention }),
|
|
38530
|
+
/* @__PURE__ */ jsx132("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx132(SentimentScoreRank, { score: creator?.sentiment?.matchScore || -1, isValidationComplete }) })
|
|
38531
|
+
] }),
|
|
38532
|
+
/* @__PURE__ */ jsx132(AnimatePresence4, { children: detailsExpanded && /* @__PURE__ */ jsx132(
|
|
38533
|
+
motion5.div,
|
|
36905
38534
|
{
|
|
36906
|
-
|
|
36907
|
-
|
|
38535
|
+
initial: { height: 0, opacity: 0 },
|
|
38536
|
+
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 } } },
|
|
38537
|
+
exit: { height: 0, opacity: 0, transition: { height: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] }, opacity: { duration: 0.2 } } },
|
|
38538
|
+
className: "overflow-hidden mt-4",
|
|
38539
|
+
children: /* @__PURE__ */ jsx132(CreatorCardExpandedSection, { creator })
|
|
36908
38540
|
}
|
|
36909
|
-
)
|
|
38541
|
+
) })
|
|
38542
|
+
]
|
|
38543
|
+
}
|
|
38544
|
+
);
|
|
38545
|
+
}
|
|
38546
|
+
function CreatorDisplay({
|
|
38547
|
+
creators,
|
|
38548
|
+
isValidationComplete
|
|
38549
|
+
}) {
|
|
38550
|
+
const [viewMode, setViewMode] = useState15("list");
|
|
38551
|
+
return /* @__PURE__ */ jsxs90("div", { className: "px-4", children: [
|
|
38552
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex justify-end items-center my-3 gap-1", children: [
|
|
38553
|
+
/* @__PURE__ */ jsxs90("span", { className: "text-xs text-gray600 mr-2", children: [
|
|
38554
|
+
creators.length,
|
|
38555
|
+
" creators"
|
|
36910
38556
|
] }),
|
|
36911
|
-
/* @__PURE__ */
|
|
38557
|
+
/* @__PURE__ */ jsx132(
|
|
36912
38558
|
"button",
|
|
36913
38559
|
{
|
|
36914
|
-
className: `
|
|
36915
|
-
onClick:
|
|
36916
|
-
|
|
36917
|
-
|
|
36918
|
-
|
|
36919
|
-
|
|
36920
|
-
|
|
36921
|
-
|
|
36922
|
-
|
|
38560
|
+
className: `h-7 w-7 flex items-center justify-center rounded ${viewMode === "list" ? "bg-gray200" : ""}`,
|
|
38561
|
+
onClick: () => setViewMode("list"),
|
|
38562
|
+
children: /* @__PURE__ */ jsx132(
|
|
38563
|
+
AlignJustify,
|
|
38564
|
+
{
|
|
38565
|
+
className: `h-5 w-5 ${viewMode === "list" ? "text-gray900 dark:text-white" : "text-gray500"}`
|
|
38566
|
+
}
|
|
38567
|
+
)
|
|
38568
|
+
}
|
|
38569
|
+
),
|
|
38570
|
+
/* @__PURE__ */ jsx132(
|
|
38571
|
+
"button",
|
|
38572
|
+
{
|
|
38573
|
+
className: `h-7 w-7 flex items-center justify-center rounded ${viewMode === "grid" ? "bg-gray200" : ""}`,
|
|
38574
|
+
onClick: () => setViewMode("grid"),
|
|
38575
|
+
children: /* @__PURE__ */ jsx132(
|
|
38576
|
+
LayoutGrid,
|
|
38577
|
+
{
|
|
38578
|
+
className: `h-5 w-5 ${viewMode === "grid" ? "text-gray900 dark:text-white" : "text-gray500"}`
|
|
38579
|
+
}
|
|
38580
|
+
)
|
|
36923
38581
|
}
|
|
36924
38582
|
)
|
|
36925
|
-
] })
|
|
36926
|
-
|
|
38583
|
+
] }),
|
|
38584
|
+
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: [
|
|
38585
|
+
/* @__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" }) }),
|
|
38586
|
+
/* @__PURE__ */ jsx132("h3", { className: "text-base font-medium text-gray900", children: "No creators found" }),
|
|
38587
|
+
/* @__PURE__ */ jsx132("p", { className: "mt-1 text-sm text-gray600", children: "Try adjusting your search criteria" })
|
|
38588
|
+
] })
|
|
38589
|
+
] });
|
|
38590
|
+
}
|
|
38591
|
+
function CreatorExpandedPanel({
|
|
38592
|
+
isOpen,
|
|
38593
|
+
onClose,
|
|
38594
|
+
sessionId,
|
|
38595
|
+
creatorIds,
|
|
38596
|
+
version,
|
|
38597
|
+
searchSpec,
|
|
38598
|
+
fetchCreatorDetails
|
|
38599
|
+
}) {
|
|
38600
|
+
const [creators, setCreators] = useState15([]);
|
|
38601
|
+
const [loading, setLoading] = useState15(false);
|
|
38602
|
+
const fetcher = fetchCreatorDetails ?? defaultFetchCreatorDetails;
|
|
38603
|
+
const loadCreators = useCallback5(async () => {
|
|
38604
|
+
if (!creatorIds.length) return;
|
|
38605
|
+
setLoading(true);
|
|
38606
|
+
try {
|
|
38607
|
+
const data = await fetcher({ creatorIds, sessionId, versionNo: version });
|
|
38608
|
+
setCreators((data.creatorData || []).map(formatCreator));
|
|
38609
|
+
} catch (err) {
|
|
38610
|
+
console.error("Failed to fetch creator details:", err);
|
|
38611
|
+
} finally {
|
|
38612
|
+
setLoading(false);
|
|
38613
|
+
}
|
|
38614
|
+
}, [creatorIds, sessionId, version, fetcher]);
|
|
38615
|
+
useEffect10(() => {
|
|
38616
|
+
if (isOpen && creatorIds.length > 0) {
|
|
38617
|
+
loadCreators();
|
|
38618
|
+
}
|
|
38619
|
+
}, [isOpen, loadCreators]);
|
|
38620
|
+
if (typeof window === "undefined") return null;
|
|
38621
|
+
return ReactDOM2.createPortal(
|
|
38622
|
+
/* @__PURE__ */ jsx132(AnimatePresence4, { mode: "sync", children: isOpen && /* @__PURE__ */ jsxs90(Fragment8, { children: [
|
|
38623
|
+
/* @__PURE__ */ jsx132(
|
|
38624
|
+
motion5.div,
|
|
38625
|
+
{
|
|
38626
|
+
initial: { opacity: 0 },
|
|
38627
|
+
animate: { opacity: 1 },
|
|
38628
|
+
exit: { opacity: 0, display: "none" },
|
|
38629
|
+
transition: { duration: 0.3 },
|
|
38630
|
+
className: "fixed inset-0 bg-black bg-opacity-50 z-[60]",
|
|
38631
|
+
onClick: (e) => {
|
|
38632
|
+
e.stopPropagation();
|
|
38633
|
+
onClose();
|
|
38634
|
+
}
|
|
38635
|
+
},
|
|
38636
|
+
"overlay"
|
|
38637
|
+
),
|
|
38638
|
+
/* @__PURE__ */ jsx132(
|
|
38639
|
+
motion5.div,
|
|
38640
|
+
{
|
|
38641
|
+
initial: { x: "100%" },
|
|
38642
|
+
animate: { x: 0 },
|
|
38643
|
+
exit: { x: "100%" },
|
|
38644
|
+
transition: { type: "spring", damping: 30, stiffness: 400 },
|
|
38645
|
+
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",
|
|
38646
|
+
children: /* @__PURE__ */ jsxs90("div", { className: "py-4 font-noto", children: [
|
|
38647
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex justify-between items-center w-full mb-4 pl-2", children: [
|
|
38648
|
+
/* @__PURE__ */ jsx132("button", { onClick: onClose, className: "p-2 rounded-full transition-colors", children: /* @__PURE__ */ jsx132(X, { className: "w-5 h-5" }) }),
|
|
38649
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex-1 flex flex-col w-[80%]", children: [
|
|
38650
|
+
/* @__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: [
|
|
38651
|
+
/* @__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" }) }),
|
|
38652
|
+
/* @__PURE__ */ jsx132("h2", { className: "text-xl font-bold mb-1", children: "Creators Search Results" })
|
|
38653
|
+
] }) }),
|
|
38654
|
+
searchSpec && /* @__PURE__ */ jsx132(SearchSpecDisplay, { spec: searchSpec })
|
|
38655
|
+
] })
|
|
38656
|
+
] }),
|
|
38657
|
+
/* @__PURE__ */ jsx132("div", { className: "border-b border-gray300" }),
|
|
38658
|
+
loading ? /* @__PURE__ */ jsxs90("div", { className: "flex flex-col items-center justify-center py-16 gap-3", children: [
|
|
38659
|
+
/* @__PURE__ */ jsx132("div", { className: "w-8 h-8 border-3 border-purple100 border-t-transparent rounded-full animate-spin" }),
|
|
38660
|
+
/* @__PURE__ */ jsx132("p", { className: "text-sm text-gray600", children: "Fetching Creators" })
|
|
38661
|
+
] }) : /* @__PURE__ */ jsx132(CreatorDisplay, { creators, isValidationComplete: version !== void 0 })
|
|
38662
|
+
] })
|
|
38663
|
+
},
|
|
38664
|
+
"creator-panel"
|
|
38665
|
+
)
|
|
38666
|
+
] }) }),
|
|
38667
|
+
document.body
|
|
38668
|
+
);
|
|
36927
38669
|
}
|
|
36928
38670
|
|
|
36929
38671
|
// src/molecules/creator-discovery/CreatorWidget/useCreatorWidgetPolling.ts
|
|
36930
|
-
import { useState as
|
|
38672
|
+
import { useState as useState16, useEffect as useEffect11, useCallback as useCallback6, useMemo as useMemo10, useRef as useRef7 } from "react";
|
|
36931
38673
|
var DEFAULT_POLLING_CONFIG = {
|
|
36932
38674
|
pollInterval: 5e3,
|
|
36933
38675
|
maxDuration: 15 * 60 * 1e3,
|
|
@@ -36937,27 +38679,29 @@ var DEFAULT_POLLING_CONFIG = {
|
|
|
36937
38679
|
function useCreatorWidgetPolling({
|
|
36938
38680
|
sessionId,
|
|
36939
38681
|
currentVersion,
|
|
36940
|
-
fetchVersions,
|
|
36941
|
-
fetchStatus,
|
|
38682
|
+
fetchVersions: fetchVersionsProp,
|
|
38683
|
+
fetchStatus: fetchStatusProp,
|
|
36942
38684
|
pollingConfig,
|
|
36943
38685
|
onStatusChange
|
|
36944
38686
|
}) {
|
|
36945
|
-
const
|
|
38687
|
+
const fetchVersions = fetchVersionsProp ?? defaultFetchVersions;
|
|
38688
|
+
const fetchStatus = fetchStatusProp ?? defaultFetchStatus;
|
|
38689
|
+
const config = useMemo10(
|
|
36946
38690
|
() => ({ ...DEFAULT_POLLING_CONFIG, ...pollingConfig }),
|
|
36947
38691
|
[pollingConfig]
|
|
36948
38692
|
);
|
|
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 =
|
|
38693
|
+
const [versionData, setVersionData] = useState16(null);
|
|
38694
|
+
const [totalVersions, setTotalVersions] = useState16(0);
|
|
38695
|
+
const [selectedVersion, setSelectedVersion] = useState16();
|
|
38696
|
+
const [isLoadingVersion, setIsLoadingVersion] = useState16(false);
|
|
38697
|
+
const [isValidationComplete, setIsValidationComplete] = useState16(false);
|
|
38698
|
+
const [versionStatus, setVersionStatus] = useState16("checking");
|
|
38699
|
+
const [statusDetails, setStatusDetails] = useState16();
|
|
38700
|
+
const [timeDisplay, setTimeDisplay] = useState16("");
|
|
38701
|
+
const [loadingStatus, setLoadingStatus] = useState16(true);
|
|
38702
|
+
const remainingTimeRef = useRef7(0);
|
|
36959
38703
|
const requestedVersion = selectedVersion ?? currentVersion ?? versionData?.currentVersion;
|
|
36960
|
-
const fetchVersionData =
|
|
38704
|
+
const fetchVersionData = useCallback6(async () => {
|
|
36961
38705
|
if (!sessionId) return;
|
|
36962
38706
|
if (!versionData) setIsLoadingVersion(true);
|
|
36963
38707
|
try {
|
|
@@ -36978,17 +38722,17 @@ function useCreatorWidgetPolling({
|
|
|
36978
38722
|
setIsLoadingVersion(false);
|
|
36979
38723
|
}
|
|
36980
38724
|
}, [sessionId, requestedVersion, isValidationComplete, fetchVersions, versionData]);
|
|
36981
|
-
|
|
38725
|
+
useEffect11(() => {
|
|
36982
38726
|
fetchVersionData();
|
|
36983
38727
|
}, [sessionId, requestedVersion, isValidationComplete]);
|
|
36984
|
-
|
|
38728
|
+
useEffect11(() => {
|
|
36985
38729
|
if (totalVersions > 0 || !sessionId) return;
|
|
36986
38730
|
const interval = setInterval(() => {
|
|
36987
38731
|
if (totalVersions === 0) fetchVersionData();
|
|
36988
38732
|
}, config.pollInterval);
|
|
36989
38733
|
return () => clearInterval(interval);
|
|
36990
38734
|
}, [totalVersions, sessionId, fetchVersionData, config.pollInterval]);
|
|
36991
|
-
|
|
38735
|
+
useEffect11(() => {
|
|
36992
38736
|
if (!selectedVersion && !requestedVersion) return;
|
|
36993
38737
|
const activeVersion = selectedVersion ?? requestedVersion;
|
|
36994
38738
|
let isMounted = true;
|
|
@@ -37071,7 +38815,7 @@ function useCreatorWidgetPolling({
|
|
|
37071
38815
|
stopPolling();
|
|
37072
38816
|
};
|
|
37073
38817
|
}, [selectedVersion, requestedVersion, sessionId]);
|
|
37074
|
-
const versionNumbers =
|
|
38818
|
+
const versionNumbers = useMemo10(() => {
|
|
37075
38819
|
if (!totalVersions) return [];
|
|
37076
38820
|
return Array.from({ length: totalVersions }, (_, i) => i + 1);
|
|
37077
38821
|
}, [totalVersions]);
|
|
@@ -37098,18 +38842,20 @@ function useCreatorWidgetPolling({
|
|
|
37098
38842
|
}
|
|
37099
38843
|
|
|
37100
38844
|
// src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
|
|
37101
|
-
import { jsx as
|
|
38845
|
+
import { jsx as jsx133, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
37102
38846
|
function CreatorWidgetInner({
|
|
37103
38847
|
sessionId,
|
|
37104
38848
|
currentVersion,
|
|
37105
38849
|
isAgentOutput = false,
|
|
37106
38850
|
fetchVersions,
|
|
37107
38851
|
fetchStatus,
|
|
38852
|
+
fetchCreatorDetails,
|
|
37108
38853
|
pollingConfig,
|
|
37109
38854
|
onStatusChange,
|
|
37110
38855
|
onAction,
|
|
37111
38856
|
className
|
|
37112
38857
|
}) {
|
|
38858
|
+
const [isExpanded, setIsExpanded] = useState17(false);
|
|
37113
38859
|
const {
|
|
37114
38860
|
versionNumbers,
|
|
37115
38861
|
selectedVersion,
|
|
@@ -37130,11 +38876,12 @@ function CreatorWidgetInner({
|
|
|
37130
38876
|
pollingConfig,
|
|
37131
38877
|
onStatusChange
|
|
37132
38878
|
});
|
|
37133
|
-
const handleVersionSelect =
|
|
38879
|
+
const handleVersionSelect = useCallback7(
|
|
37134
38880
|
(version) => setSelectedVersion(version),
|
|
37135
38881
|
[setSelectedVersion]
|
|
37136
38882
|
);
|
|
37137
|
-
const handleViewCreators =
|
|
38883
|
+
const handleViewCreators = useCallback7(() => {
|
|
38884
|
+
setIsExpanded(true);
|
|
37138
38885
|
onAction?.({
|
|
37139
38886
|
type: "view-creators",
|
|
37140
38887
|
sessionId,
|
|
@@ -37143,30 +38890,41 @@ function CreatorWidgetInner({
|
|
|
37143
38890
|
searchSpec
|
|
37144
38891
|
});
|
|
37145
38892
|
}, [onAction, sessionId, creatorIds, selectedVersion, searchSpec]);
|
|
37146
|
-
|
|
37147
|
-
|
|
37148
|
-
|
|
37149
|
-
|
|
37150
|
-
|
|
37151
|
-
|
|
37152
|
-
|
|
37153
|
-
|
|
37154
|
-
|
|
37155
|
-
|
|
37156
|
-
|
|
37157
|
-
|
|
37158
|
-
|
|
37159
|
-
|
|
37160
|
-
|
|
37161
|
-
|
|
37162
|
-
|
|
37163
|
-
|
|
37164
|
-
|
|
38893
|
+
return /* @__PURE__ */ jsxs91("div", { className, children: [
|
|
38894
|
+
/* @__PURE__ */ jsx133(
|
|
38895
|
+
CreatorCompactView,
|
|
38896
|
+
{
|
|
38897
|
+
versions: versionNumbers,
|
|
38898
|
+
selectedVersion,
|
|
38899
|
+
creatorImages,
|
|
38900
|
+
creatorLength,
|
|
38901
|
+
isAgentOutput,
|
|
38902
|
+
onVersionSelect: handleVersionSelect,
|
|
38903
|
+
onViewCreators: handleViewCreators,
|
|
38904
|
+
versionStatus,
|
|
38905
|
+
statusDetails,
|
|
38906
|
+
timeDisplay,
|
|
38907
|
+
isLoading
|
|
38908
|
+
}
|
|
38909
|
+
),
|
|
38910
|
+
/* @__PURE__ */ jsx133(
|
|
38911
|
+
CreatorExpandedPanel,
|
|
38912
|
+
{
|
|
38913
|
+
isOpen: isExpanded,
|
|
38914
|
+
onClose: () => setIsExpanded(false),
|
|
38915
|
+
sessionId,
|
|
38916
|
+
creatorIds,
|
|
38917
|
+
version: selectedVersion,
|
|
38918
|
+
searchSpec,
|
|
38919
|
+
fetchCreatorDetails
|
|
38920
|
+
}
|
|
38921
|
+
)
|
|
38922
|
+
] });
|
|
37165
38923
|
}
|
|
37166
38924
|
var CreatorWidget = memo(CreatorWidgetInner);
|
|
37167
38925
|
|
|
37168
38926
|
// src/molecules/workstream-builder/ToolListCard/ToolListCard.tsx
|
|
37169
|
-
import { jsx as
|
|
38927
|
+
import { jsx as jsx134, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
37170
38928
|
var FONT_STYLE = {
|
|
37171
38929
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37172
38930
|
};
|
|
@@ -37237,7 +38995,7 @@ var ToolListCard = ({
|
|
|
37237
38995
|
grouped[cat].push(tool);
|
|
37238
38996
|
}
|
|
37239
38997
|
const categories = Object.keys(grouped);
|
|
37240
|
-
return /* @__PURE__ */
|
|
38998
|
+
return /* @__PURE__ */ jsxs92(
|
|
37241
38999
|
"div",
|
|
37242
39000
|
{
|
|
37243
39001
|
className: cn(
|
|
@@ -37246,34 +39004,34 @@ var ToolListCard = ({
|
|
|
37246
39004
|
),
|
|
37247
39005
|
style: FONT_STYLE,
|
|
37248
39006
|
children: [
|
|
37249
|
-
/* @__PURE__ */
|
|
37250
|
-
/* @__PURE__ */
|
|
37251
|
-
/* @__PURE__ */
|
|
37252
|
-
/* @__PURE__ */
|
|
39007
|
+
/* @__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: [
|
|
39008
|
+
/* @__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" }) }),
|
|
39009
|
+
/* @__PURE__ */ jsx134("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Available Tools" }),
|
|
39010
|
+
/* @__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
39011
|
] }),
|
|
37254
|
-
/* @__PURE__ */
|
|
39012
|
+
/* @__PURE__ */ jsx134("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
|
|
37255
39013
|
const CatIcon = resolveCategoryIcon(cat);
|
|
37256
39014
|
const headerBg = CATEGORY_HEADER_BG[cat.toLowerCase()] || CATEGORY_HEADER_BG.general;
|
|
37257
|
-
return /* @__PURE__ */
|
|
37258
|
-
/* @__PURE__ */
|
|
37259
|
-
/* @__PURE__ */
|
|
37260
|
-
/* @__PURE__ */
|
|
37261
|
-
/* @__PURE__ */
|
|
39015
|
+
return /* @__PURE__ */ jsxs92("div", { className: "px-4 py-3", children: [
|
|
39016
|
+
/* @__PURE__ */ jsxs92("div", { className: cn("flex items-center gap-2 mb-2.5 -mx-4 px-4 py-1.5", headerBg), children: [
|
|
39017
|
+
/* @__PURE__ */ jsx134(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
|
|
39018
|
+
/* @__PURE__ */ jsx134("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
|
|
39019
|
+
/* @__PURE__ */ jsx134("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
|
|
37262
39020
|
] }),
|
|
37263
|
-
/* @__PURE__ */
|
|
39021
|
+
/* @__PURE__ */ jsx134("div", { className: "space-y-1.5", children: grouped[cat].map((tool) => {
|
|
37264
39022
|
const ToolIcon = resolveIcon(tool);
|
|
37265
|
-
return /* @__PURE__ */
|
|
39023
|
+
return /* @__PURE__ */ jsxs92(
|
|
37266
39024
|
"div",
|
|
37267
39025
|
{
|
|
37268
39026
|
className: "group flex items-start gap-3 px-3 py-2 rounded-lg hover:bg-[var(--foreground)]/[0.03] transition-colors",
|
|
37269
39027
|
children: [
|
|
37270
|
-
/* @__PURE__ */
|
|
37271
|
-
/* @__PURE__ */
|
|
37272
|
-
/* @__PURE__ */
|
|
37273
|
-
tool.display_name && tool.display_name !== tool.name && /* @__PURE__ */
|
|
37274
|
-
/* @__PURE__ */
|
|
39028
|
+
/* @__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" }) }),
|
|
39029
|
+
/* @__PURE__ */ jsxs92("div", { className: "flex-1 min-w-0", children: [
|
|
39030
|
+
/* @__PURE__ */ jsxs92("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
39031
|
+
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 }),
|
|
39032
|
+
/* @__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
39033
|
] }),
|
|
37276
|
-
tool.description && /* @__PURE__ */
|
|
39034
|
+
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
39035
|
] })
|
|
37278
39036
|
]
|
|
37279
39037
|
},
|
|
@@ -37288,8 +39046,8 @@ var ToolListCard = ({
|
|
|
37288
39046
|
};
|
|
37289
39047
|
|
|
37290
39048
|
// src/molecules/workstream-builder/AgentCard/AgentCard.tsx
|
|
37291
|
-
import { useState as
|
|
37292
|
-
import { Fragment as
|
|
39049
|
+
import { useState as useState18, useCallback as useCallback8 } from "react";
|
|
39050
|
+
import { Fragment as Fragment9, jsx as jsx135, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
37293
39051
|
var FONT_STYLE2 = {
|
|
37294
39052
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37295
39053
|
};
|
|
@@ -37300,15 +39058,15 @@ var AgentCard = ({
|
|
|
37300
39058
|
onSave,
|
|
37301
39059
|
className
|
|
37302
39060
|
}) => {
|
|
37303
|
-
const [isEditing, setIsEditing] =
|
|
37304
|
-
const [isSaving, setIsSaving] =
|
|
37305
|
-
const [editState, setEditState] =
|
|
39061
|
+
const [isEditing, setIsEditing] = useState18(false);
|
|
39062
|
+
const [isSaving, setIsSaving] = useState18(false);
|
|
39063
|
+
const [editState, setEditState] = useState18({
|
|
37306
39064
|
display_name: agent.display_name,
|
|
37307
39065
|
description: agent.description,
|
|
37308
39066
|
image: agent.image || ""
|
|
37309
39067
|
});
|
|
37310
39068
|
const avatarUrl = agent.image || `https://api.dicebear.com/7.x/avataaars/svg?seed=${agent.name}`;
|
|
37311
|
-
const handleEdit =
|
|
39069
|
+
const handleEdit = useCallback8(() => {
|
|
37312
39070
|
setEditState({
|
|
37313
39071
|
display_name: agent.display_name,
|
|
37314
39072
|
description: agent.description,
|
|
@@ -37316,10 +39074,10 @@ var AgentCard = ({
|
|
|
37316
39074
|
});
|
|
37317
39075
|
setIsEditing(true);
|
|
37318
39076
|
}, [agent]);
|
|
37319
|
-
const handleCancel =
|
|
39077
|
+
const handleCancel = useCallback8(() => {
|
|
37320
39078
|
setIsEditing(false);
|
|
37321
39079
|
}, []);
|
|
37322
|
-
const handleSave =
|
|
39080
|
+
const handleSave = useCallback8(async () => {
|
|
37323
39081
|
if (!onSave) return;
|
|
37324
39082
|
const updates = {};
|
|
37325
39083
|
if (editState.display_name !== agent.display_name)
|
|
@@ -37343,7 +39101,7 @@ var AgentCard = ({
|
|
|
37343
39101
|
}
|
|
37344
39102
|
}, [onSave, agent, editState]);
|
|
37345
39103
|
if (compact) {
|
|
37346
|
-
return /* @__PURE__ */
|
|
39104
|
+
return /* @__PURE__ */ jsxs93(
|
|
37347
39105
|
"div",
|
|
37348
39106
|
{
|
|
37349
39107
|
className: cn(
|
|
@@ -37352,14 +39110,14 @@ var AgentCard = ({
|
|
|
37352
39110
|
),
|
|
37353
39111
|
style: FONT_STYLE2,
|
|
37354
39112
|
children: [
|
|
37355
|
-
/* @__PURE__ */
|
|
37356
|
-
/* @__PURE__ */
|
|
37357
|
-
/* @__PURE__ */
|
|
39113
|
+
/* @__PURE__ */ jsxs93(Avatar, { className: "h-8 w-8 shrink-0", children: [
|
|
39114
|
+
/* @__PURE__ */ jsx135(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
|
|
39115
|
+
/* @__PURE__ */ jsx135(AvatarFallback, { className: "bg-interactive/10 text-interactive text-xs font-bold", children: agent.display_name.charAt(0) })
|
|
37358
39116
|
] }),
|
|
37359
|
-
/* @__PURE__ */
|
|
37360
|
-
/* @__PURE__ */
|
|
37361
|
-
/* @__PURE__ */
|
|
37362
|
-
/* @__PURE__ */
|
|
39117
|
+
/* @__PURE__ */ jsxs93("div", { className: "flex-1 min-w-0", children: [
|
|
39118
|
+
/* @__PURE__ */ jsxs93("div", { className: "flex items-center gap-2", children: [
|
|
39119
|
+
/* @__PURE__ */ jsx135("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
|
|
39120
|
+
/* @__PURE__ */ jsxs93(
|
|
37363
39121
|
"span",
|
|
37364
39122
|
{
|
|
37365
39123
|
className: cn(
|
|
@@ -37367,7 +39125,7 @@ var AgentCard = ({
|
|
|
37367
39125
|
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37368
39126
|
),
|
|
37369
39127
|
children: [
|
|
37370
|
-
/* @__PURE__ */
|
|
39128
|
+
/* @__PURE__ */ jsx135("span", { className: cn(
|
|
37371
39129
|
"w-1.5 h-1.5 rounded-full",
|
|
37372
39130
|
agent.enabled ? "bg-emerald-500" : "bg-red-500"
|
|
37373
39131
|
) }),
|
|
@@ -37376,13 +39134,13 @@ var AgentCard = ({
|
|
|
37376
39134
|
}
|
|
37377
39135
|
)
|
|
37378
39136
|
] }),
|
|
37379
|
-
/* @__PURE__ */
|
|
39137
|
+
/* @__PURE__ */ jsx135("p", { className: "text-[var(--foreground)]/50 text-xs truncate", children: agent.description })
|
|
37380
39138
|
] })
|
|
37381
39139
|
]
|
|
37382
39140
|
}
|
|
37383
39141
|
);
|
|
37384
39142
|
}
|
|
37385
|
-
return /* @__PURE__ */
|
|
39143
|
+
return /* @__PURE__ */ jsxs93(
|
|
37386
39144
|
"div",
|
|
37387
39145
|
{
|
|
37388
39146
|
className: cn(
|
|
@@ -37391,14 +39149,14 @@ var AgentCard = ({
|
|
|
37391
39149
|
),
|
|
37392
39150
|
style: FONT_STYLE2,
|
|
37393
39151
|
children: [
|
|
37394
|
-
/* @__PURE__ */
|
|
37395
|
-
/* @__PURE__ */
|
|
37396
|
-
/* @__PURE__ */
|
|
37397
|
-
/* @__PURE__ */
|
|
39152
|
+
/* @__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: [
|
|
39153
|
+
/* @__PURE__ */ jsxs93(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
|
|
39154
|
+
/* @__PURE__ */ jsx135(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
|
|
39155
|
+
/* @__PURE__ */ jsx135(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
|
|
37398
39156
|
] }),
|
|
37399
|
-
/* @__PURE__ */
|
|
37400
|
-
/* @__PURE__ */
|
|
37401
|
-
isEditing ? /* @__PURE__ */
|
|
39157
|
+
/* @__PURE__ */ jsxs93("div", { className: "flex-1 min-w-0", children: [
|
|
39158
|
+
/* @__PURE__ */ jsxs93("div", { className: "flex items-center gap-2", children: [
|
|
39159
|
+
isEditing ? /* @__PURE__ */ jsx135(
|
|
37402
39160
|
"input",
|
|
37403
39161
|
{
|
|
37404
39162
|
type: "text",
|
|
@@ -37408,9 +39166,9 @@ var AgentCard = ({
|
|
|
37408
39166
|
className: "flex-1 bg-transparent border-b border-interactive/30 text-sm font-semibold text-foreground outline-none focus:border-interactive transition-all",
|
|
37409
39167
|
placeholder: "Agent name"
|
|
37410
39168
|
}
|
|
37411
|
-
) : /* @__PURE__ */
|
|
37412
|
-
/* @__PURE__ */
|
|
37413
|
-
/* @__PURE__ */
|
|
39169
|
+
) : /* @__PURE__ */ jsx135("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
|
|
39170
|
+
/* @__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 }),
|
|
39171
|
+
/* @__PURE__ */ jsxs93(
|
|
37414
39172
|
"span",
|
|
37415
39173
|
{
|
|
37416
39174
|
className: cn(
|
|
@@ -37418,7 +39176,7 @@ var AgentCard = ({
|
|
|
37418
39176
|
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37419
39177
|
),
|
|
37420
39178
|
children: [
|
|
37421
|
-
/* @__PURE__ */
|
|
39179
|
+
/* @__PURE__ */ jsx135("span", { className: cn(
|
|
37422
39180
|
"w-1.5 h-1.5 rounded-full",
|
|
37423
39181
|
agent.enabled ? "bg-emerald-500" : "bg-red-500"
|
|
37424
39182
|
) }),
|
|
@@ -37427,7 +39185,7 @@ var AgentCard = ({
|
|
|
37427
39185
|
}
|
|
37428
39186
|
)
|
|
37429
39187
|
] }),
|
|
37430
|
-
/* @__PURE__ */
|
|
39188
|
+
/* @__PURE__ */ jsx135("div", { className: "mt-1", children: isEditing ? /* @__PURE__ */ jsx135(
|
|
37431
39189
|
"textarea",
|
|
37432
39190
|
{
|
|
37433
39191
|
value: editState.description,
|
|
@@ -37437,10 +39195,10 @@ var AgentCard = ({
|
|
|
37437
39195
|
rows: 2,
|
|
37438
39196
|
placeholder: "Describe this agent..."
|
|
37439
39197
|
}
|
|
37440
|
-
) : /* @__PURE__ */
|
|
37441
|
-
isEditing && /* @__PURE__ */
|
|
37442
|
-
/* @__PURE__ */
|
|
37443
|
-
/* @__PURE__ */
|
|
39198
|
+
) : /* @__PURE__ */ jsx135("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-normal", children: agent.description }) }),
|
|
39199
|
+
isEditing && /* @__PURE__ */ jsxs93("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
39200
|
+
/* @__PURE__ */ jsx135("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
|
|
39201
|
+
/* @__PURE__ */ jsx135(
|
|
37444
39202
|
"input",
|
|
37445
39203
|
{
|
|
37446
39204
|
type: "text",
|
|
@@ -37453,8 +39211,8 @@ var AgentCard = ({
|
|
|
37453
39211
|
)
|
|
37454
39212
|
] })
|
|
37455
39213
|
] }),
|
|
37456
|
-
editable && onSave && /* @__PURE__ */
|
|
37457
|
-
/* @__PURE__ */
|
|
39214
|
+
editable && onSave && /* @__PURE__ */ jsx135("div", { className: "flex items-center gap-1.5 shrink-0", children: isEditing ? /* @__PURE__ */ jsxs93(Fragment9, { children: [
|
|
39215
|
+
/* @__PURE__ */ jsx135(
|
|
37458
39216
|
"button",
|
|
37459
39217
|
{
|
|
37460
39218
|
onClick: handleCancel,
|
|
@@ -37463,7 +39221,7 @@ var AgentCard = ({
|
|
|
37463
39221
|
children: "Cancel"
|
|
37464
39222
|
}
|
|
37465
39223
|
),
|
|
37466
|
-
/* @__PURE__ */
|
|
39224
|
+
/* @__PURE__ */ jsx135(
|
|
37467
39225
|
"button",
|
|
37468
39226
|
{
|
|
37469
39227
|
onClick: handleSave,
|
|
@@ -37472,7 +39230,7 @@ var AgentCard = ({
|
|
|
37472
39230
|
children: isSaving ? "Saving..." : "Save"
|
|
37473
39231
|
}
|
|
37474
39232
|
)
|
|
37475
|
-
] }) : /* @__PURE__ */
|
|
39233
|
+
] }) : /* @__PURE__ */ jsx135(
|
|
37476
39234
|
"button",
|
|
37477
39235
|
{
|
|
37478
39236
|
onClick: handleEdit,
|
|
@@ -37481,18 +39239,18 @@ var AgentCard = ({
|
|
|
37481
39239
|
}
|
|
37482
39240
|
) })
|
|
37483
39241
|
] }),
|
|
37484
|
-
/* @__PURE__ */
|
|
39242
|
+
/* @__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
39243
|
"Model:",
|
|
37486
39244
|
" ",
|
|
37487
|
-
/* @__PURE__ */
|
|
39245
|
+
/* @__PURE__ */ jsx135("span", { className: "font-mono text-[var(--foreground)]/70", children: agent.model })
|
|
37488
39246
|
] }) }),
|
|
37489
|
-
agent.tools && agent.tools.length > 0 && /* @__PURE__ */
|
|
37490
|
-
/* @__PURE__ */
|
|
39247
|
+
agent.tools && agent.tools.length > 0 && /* @__PURE__ */ jsxs93("div", { className: "border-t border-[var(--border-color)] px-5 py-3", children: [
|
|
39248
|
+
/* @__PURE__ */ jsxs93("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-2", children: [
|
|
37491
39249
|
"Tools (",
|
|
37492
39250
|
agent.tools.length,
|
|
37493
39251
|
")"
|
|
37494
39252
|
] }),
|
|
37495
|
-
/* @__PURE__ */
|
|
39253
|
+
/* @__PURE__ */ jsx135("div", { className: "flex flex-wrap gap-1.5", children: agent.tools.map((tool) => /* @__PURE__ */ jsx135(
|
|
37496
39254
|
"span",
|
|
37497
39255
|
{
|
|
37498
39256
|
className: "text-[11px] px-2 py-0.5 rounded-md bg-interactive/10 text-interactive font-mono border border-interactive/20",
|
|
@@ -37507,7 +39265,7 @@ var AgentCard = ({
|
|
|
37507
39265
|
};
|
|
37508
39266
|
|
|
37509
39267
|
// src/molecules/workstream-builder/AgentDataTable/AgentDataTable.tsx
|
|
37510
|
-
import { jsx as
|
|
39268
|
+
import { jsx as jsx136, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
37511
39269
|
var FONT_STYLE3 = {
|
|
37512
39270
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37513
39271
|
};
|
|
@@ -37518,7 +39276,7 @@ var AgentDataTable = ({
|
|
|
37518
39276
|
}) => {
|
|
37519
39277
|
const renderCell = (value) => {
|
|
37520
39278
|
if (typeof value === "boolean") {
|
|
37521
|
-
return /* @__PURE__ */
|
|
39279
|
+
return /* @__PURE__ */ jsxs94(
|
|
37522
39280
|
"span",
|
|
37523
39281
|
{
|
|
37524
39282
|
className: cn(
|
|
@@ -37526,18 +39284,18 @@ var AgentDataTable = ({
|
|
|
37526
39284
|
value ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37527
39285
|
),
|
|
37528
39286
|
children: [
|
|
37529
|
-
value ? /* @__PURE__ */
|
|
37530
|
-
/* @__PURE__ */
|
|
37531
|
-
/* @__PURE__ */
|
|
39287
|
+
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: [
|
|
39288
|
+
/* @__PURE__ */ jsx136("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
39289
|
+
/* @__PURE__ */ jsx136("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
37532
39290
|
] }),
|
|
37533
39291
|
value ? "Yes" : "No"
|
|
37534
39292
|
]
|
|
37535
39293
|
}
|
|
37536
39294
|
);
|
|
37537
39295
|
}
|
|
37538
|
-
return /* @__PURE__ */
|
|
39296
|
+
return /* @__PURE__ */ jsx136("span", { className: "text-[var(--foreground)]", children: String(value) });
|
|
37539
39297
|
};
|
|
37540
|
-
return /* @__PURE__ */
|
|
39298
|
+
return /* @__PURE__ */ jsx136(
|
|
37541
39299
|
"div",
|
|
37542
39300
|
{
|
|
37543
39301
|
className: cn(
|
|
@@ -37545,8 +39303,8 @@ var AgentDataTable = ({
|
|
|
37545
39303
|
className
|
|
37546
39304
|
),
|
|
37547
39305
|
style: FONT_STYLE3,
|
|
37548
|
-
children: /* @__PURE__ */
|
|
37549
|
-
/* @__PURE__ */
|
|
39306
|
+
children: /* @__PURE__ */ jsx136("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs94("table", { className: "w-full text-xs", children: [
|
|
39307
|
+
/* @__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
39308
|
"th",
|
|
37551
39309
|
{
|
|
37552
39310
|
className: "text-left px-4 py-2.5 text-[11px] font-semibold text-[var(--foreground)]/60 uppercase tracking-wide whitespace-nowrap",
|
|
@@ -37554,14 +39312,14 @@ var AgentDataTable = ({
|
|
|
37554
39312
|
},
|
|
37555
39313
|
header
|
|
37556
39314
|
)) }) }),
|
|
37557
|
-
/* @__PURE__ */
|
|
39315
|
+
/* @__PURE__ */ jsx136("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ jsx136(
|
|
37558
39316
|
"tr",
|
|
37559
39317
|
{
|
|
37560
39318
|
className: cn(
|
|
37561
39319
|
"border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.03] transition-colors",
|
|
37562
39320
|
rowIdx % 2 === 1 && "bg-[var(--foreground)]/[0.015]"
|
|
37563
39321
|
),
|
|
37564
|
-
children: row.map((cell, cellIdx) => /* @__PURE__ */
|
|
39322
|
+
children: row.map((cell, cellIdx) => /* @__PURE__ */ jsx136(
|
|
37565
39323
|
"td",
|
|
37566
39324
|
{
|
|
37567
39325
|
className: "px-4 py-2.5 text-xs whitespace-nowrap",
|
|
@@ -37578,8 +39336,8 @@ var AgentDataTable = ({
|
|
|
37578
39336
|
};
|
|
37579
39337
|
|
|
37580
39338
|
// src/molecules/workstream-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
|
|
37581
|
-
import { useState as
|
|
37582
|
-
import { jsx as
|
|
39339
|
+
import { useState as useState19 } from "react";
|
|
39340
|
+
import { jsx as jsx137, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
37583
39341
|
var FONT_STYLE4 = {
|
|
37584
39342
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37585
39343
|
};
|
|
@@ -37587,10 +39345,10 @@ var WorkflowVisualizer = ({
|
|
|
37587
39345
|
steps,
|
|
37588
39346
|
className
|
|
37589
39347
|
}) => {
|
|
37590
|
-
const [expandedStep, setExpandedStep] =
|
|
39348
|
+
const [expandedStep, setExpandedStep] = useState19(
|
|
37591
39349
|
steps[0]?.id || null
|
|
37592
39350
|
);
|
|
37593
|
-
return /* @__PURE__ */
|
|
39351
|
+
return /* @__PURE__ */ jsxs95(
|
|
37594
39352
|
"div",
|
|
37595
39353
|
{
|
|
37596
39354
|
className: cn(
|
|
@@ -37599,8 +39357,8 @@ var WorkflowVisualizer = ({
|
|
|
37599
39357
|
),
|
|
37600
39358
|
style: FONT_STYLE4,
|
|
37601
39359
|
children: [
|
|
37602
|
-
/* @__PURE__ */
|
|
37603
|
-
/* @__PURE__ */
|
|
39360
|
+
/* @__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: [
|
|
39361
|
+
/* @__PURE__ */ jsx137("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx137(
|
|
37604
39362
|
"svg",
|
|
37605
39363
|
{
|
|
37606
39364
|
width: "14",
|
|
@@ -37612,24 +39370,24 @@ var WorkflowVisualizer = ({
|
|
|
37612
39370
|
className: "text-interactive",
|
|
37613
39371
|
strokeLinecap: "round",
|
|
37614
39372
|
strokeLinejoin: "round",
|
|
37615
|
-
children: /* @__PURE__ */
|
|
39373
|
+
children: /* @__PURE__ */ jsx137("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
|
|
37616
39374
|
}
|
|
37617
39375
|
) }),
|
|
37618
|
-
/* @__PURE__ */
|
|
37619
|
-
/* @__PURE__ */
|
|
39376
|
+
/* @__PURE__ */ jsx137("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Workflow" }),
|
|
39377
|
+
/* @__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
39378
|
steps.length,
|
|
37621
39379
|
" steps"
|
|
37622
39380
|
] })
|
|
37623
39381
|
] }),
|
|
37624
|
-
/* @__PURE__ */
|
|
39382
|
+
/* @__PURE__ */ jsx137("div", { className: "px-4 py-3", children: steps.map((step, idx) => {
|
|
37625
39383
|
const isLast = idx === steps.length - 1;
|
|
37626
39384
|
const isExpanded = expandedStep === step.id;
|
|
37627
|
-
return /* @__PURE__ */
|
|
37628
|
-
/* @__PURE__ */
|
|
37629
|
-
/* @__PURE__ */
|
|
37630
|
-
!isLast && /* @__PURE__ */
|
|
39385
|
+
return /* @__PURE__ */ jsxs95("div", { className: "flex gap-3", children: [
|
|
39386
|
+
/* @__PURE__ */ jsxs95("div", { className: "flex flex-col items-center shrink-0", children: [
|
|
39387
|
+
/* @__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 }) }),
|
|
39388
|
+
!isLast && /* @__PURE__ */ jsx137("div", { className: "w-0.5 flex-1 min-h-[16px] bg-interactive/15" })
|
|
37631
39389
|
] }),
|
|
37632
|
-
/* @__PURE__ */
|
|
39390
|
+
/* @__PURE__ */ jsxs95(
|
|
37633
39391
|
"div",
|
|
37634
39392
|
{
|
|
37635
39393
|
className: cn(
|
|
@@ -37637,14 +39395,14 @@ var WorkflowVisualizer = ({
|
|
|
37637
39395
|
isExpanded ? "bg-[var(--foreground)]/[0.02] shadow-sm" : "hover:bg-[var(--foreground)]/[0.02] hover:shadow-sm hover:-translate-y-0.5"
|
|
37638
39396
|
),
|
|
37639
39397
|
children: [
|
|
37640
|
-
/* @__PURE__ */
|
|
39398
|
+
/* @__PURE__ */ jsxs95(
|
|
37641
39399
|
"button",
|
|
37642
39400
|
{
|
|
37643
39401
|
onClick: () => setExpandedStep(isExpanded ? null : step.id),
|
|
37644
39402
|
className: "w-full text-left px-3 py-2.5 flex items-center gap-2 whitespace-normal",
|
|
37645
39403
|
children: [
|
|
37646
|
-
/* @__PURE__ */
|
|
37647
|
-
/* @__PURE__ */
|
|
39404
|
+
/* @__PURE__ */ jsx137("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx137("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }) }),
|
|
39405
|
+
/* @__PURE__ */ jsx137(
|
|
37648
39406
|
"svg",
|
|
37649
39407
|
{
|
|
37650
39408
|
width: "12",
|
|
@@ -37657,28 +39415,28 @@ var WorkflowVisualizer = ({
|
|
|
37657
39415
|
"shrink-0 text-[var(--foreground)]/30 transition-transform",
|
|
37658
39416
|
isExpanded && "rotate-180"
|
|
37659
39417
|
),
|
|
37660
|
-
children: /* @__PURE__ */
|
|
39418
|
+
children: /* @__PURE__ */ jsx137("polyline", { points: "6 9 12 15 18 9" })
|
|
37661
39419
|
}
|
|
37662
39420
|
)
|
|
37663
39421
|
]
|
|
37664
39422
|
}
|
|
37665
39423
|
),
|
|
37666
|
-
isExpanded && /* @__PURE__ */
|
|
37667
|
-
step.description && /* @__PURE__ */
|
|
37668
|
-
step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */
|
|
39424
|
+
isExpanded && /* @__PURE__ */ jsxs95("div", { className: "px-3 pb-3 space-y-2.5", children: [
|
|
39425
|
+
step.description && /* @__PURE__ */ jsx137("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed whitespace-normal", children: step.description }),
|
|
39426
|
+
step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */ jsx137("div", { className: "space-y-1", children: step.sub_steps.map((sub) => /* @__PURE__ */ jsxs95(
|
|
37669
39427
|
"div",
|
|
37670
39428
|
{
|
|
37671
39429
|
className: "flex items-start gap-2 text-xs",
|
|
37672
39430
|
children: [
|
|
37673
|
-
/* @__PURE__ */
|
|
37674
|
-
/* @__PURE__ */
|
|
39431
|
+
/* @__PURE__ */ jsx137("span", { className: "shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-interactive/40" }),
|
|
39432
|
+
/* @__PURE__ */ jsx137("span", { className: "text-[var(--foreground)]/60", children: sub.action })
|
|
37675
39433
|
]
|
|
37676
39434
|
},
|
|
37677
39435
|
sub.id
|
|
37678
39436
|
)) }),
|
|
37679
|
-
step.tools && step.tools.length > 0 && /* @__PURE__ */
|
|
37680
|
-
/* @__PURE__ */
|
|
37681
|
-
step.tools.map((tool) => /* @__PURE__ */
|
|
39437
|
+
step.tools && step.tools.length > 0 && /* @__PURE__ */ jsxs95("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
|
|
39438
|
+
/* @__PURE__ */ jsx137("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold tracking-wider", children: "Tools:" }),
|
|
39439
|
+
step.tools.map((tool) => /* @__PURE__ */ jsx137(
|
|
37682
39440
|
"span",
|
|
37683
39441
|
{
|
|
37684
39442
|
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 +39445,9 @@ var WorkflowVisualizer = ({
|
|
|
37687
39445
|
tool
|
|
37688
39446
|
))
|
|
37689
39447
|
] }),
|
|
37690
|
-
step.on_failure && /* @__PURE__ */
|
|
37691
|
-
/* @__PURE__ */
|
|
37692
|
-
/* @__PURE__ */
|
|
39448
|
+
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: [
|
|
39449
|
+
/* @__PURE__ */ jsx137("span", { className: "shrink-0 text-[10px] font-semibold text-[var(--redText,_#ef4444)]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
|
|
39450
|
+
/* @__PURE__ */ jsx137("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
|
|
37693
39451
|
] })
|
|
37694
39452
|
] })
|
|
37695
39453
|
]
|
|
@@ -37703,8 +39461,8 @@ var WorkflowVisualizer = ({
|
|
|
37703
39461
|
};
|
|
37704
39462
|
|
|
37705
39463
|
// src/molecules/workstream-builder/InstructionPreview/InstructionPreview.tsx
|
|
37706
|
-
import { useState as
|
|
37707
|
-
import { jsx as
|
|
39464
|
+
import { useState as useState20, useCallback as useCallback9 } from "react";
|
|
39465
|
+
import { jsx as jsx138, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
37708
39466
|
var FONT_STYLE5 = {
|
|
37709
39467
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37710
39468
|
};
|
|
@@ -37716,12 +39474,12 @@ var InstructionPreview = ({
|
|
|
37716
39474
|
tools,
|
|
37717
39475
|
className
|
|
37718
39476
|
}) => {
|
|
37719
|
-
const [isExpanded, setIsExpanded] =
|
|
37720
|
-
const [copied, setCopied] =
|
|
39477
|
+
const [isExpanded, setIsExpanded] = useState20(false);
|
|
39478
|
+
const [copied, setCopied] = useState20(false);
|
|
37721
39479
|
const previewLength = 300;
|
|
37722
39480
|
const isLong = instruction.length > previewLength;
|
|
37723
39481
|
const displayText = isExpanded || !isLong ? instruction : instruction.slice(0, previewLength) + "...";
|
|
37724
|
-
const handleCopy =
|
|
39482
|
+
const handleCopy = useCallback9(async () => {
|
|
37725
39483
|
try {
|
|
37726
39484
|
await navigator.clipboard.writeText(instruction);
|
|
37727
39485
|
setCopied(true);
|
|
@@ -37739,7 +39497,7 @@ var InstructionPreview = ({
|
|
|
37739
39497
|
setTimeout(() => setCopied(false), 2e3);
|
|
37740
39498
|
}
|
|
37741
39499
|
}, [instruction]);
|
|
37742
|
-
return /* @__PURE__ */
|
|
39500
|
+
return /* @__PURE__ */ jsxs96(
|
|
37743
39501
|
"div",
|
|
37744
39502
|
{
|
|
37745
39503
|
className: cn(
|
|
@@ -37748,8 +39506,8 @@ var InstructionPreview = ({
|
|
|
37748
39506
|
),
|
|
37749
39507
|
style: FONT_STYLE5,
|
|
37750
39508
|
children: [
|
|
37751
|
-
/* @__PURE__ */
|
|
37752
|
-
/* @__PURE__ */
|
|
39509
|
+
/* @__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: [
|
|
39510
|
+
/* @__PURE__ */ jsx138("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsxs96(
|
|
37753
39511
|
"svg",
|
|
37754
39512
|
{
|
|
37755
39513
|
width: "14",
|
|
@@ -37762,24 +39520,24 @@ var InstructionPreview = ({
|
|
|
37762
39520
|
strokeLinecap: "round",
|
|
37763
39521
|
strokeLinejoin: "round",
|
|
37764
39522
|
children: [
|
|
37765
|
-
/* @__PURE__ */
|
|
37766
|
-
/* @__PURE__ */
|
|
37767
|
-
/* @__PURE__ */
|
|
37768
|
-
/* @__PURE__ */
|
|
37769
|
-
/* @__PURE__ */
|
|
39523
|
+
/* @__PURE__ */ jsx138("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
39524
|
+
/* @__PURE__ */ jsx138("polyline", { points: "14 2 14 8 20 8" }),
|
|
39525
|
+
/* @__PURE__ */ jsx138("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
|
|
39526
|
+
/* @__PURE__ */ jsx138("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
|
|
39527
|
+
/* @__PURE__ */ jsx138("polyline", { points: "10 9 9 9 8 9" })
|
|
37770
39528
|
]
|
|
37771
39529
|
}
|
|
37772
39530
|
) }),
|
|
37773
|
-
/* @__PURE__ */
|
|
37774
|
-
/* @__PURE__ */
|
|
37775
|
-
description && /* @__PURE__ */
|
|
39531
|
+
/* @__PURE__ */ jsxs96("div", { className: "flex-1 min-w-0", children: [
|
|
39532
|
+
/* @__PURE__ */ jsx138("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
|
|
39533
|
+
description && /* @__PURE__ */ jsx138("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5 whitespace-normal", children: description })
|
|
37776
39534
|
] })
|
|
37777
39535
|
] }) }),
|
|
37778
|
-
/* @__PURE__ */
|
|
37779
|
-
/* @__PURE__ */
|
|
37780
|
-
/* @__PURE__ */
|
|
37781
|
-
/* @__PURE__ */
|
|
37782
|
-
/* @__PURE__ */
|
|
39536
|
+
/* @__PURE__ */ jsxs96("div", { className: "px-4 py-3 space-y-3", children: [
|
|
39537
|
+
/* @__PURE__ */ jsxs96("div", { children: [
|
|
39538
|
+
/* @__PURE__ */ jsxs96("div", { className: "flex items-center justify-between mb-1.5", children: [
|
|
39539
|
+
/* @__PURE__ */ jsx138("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider", children: "Instruction" }),
|
|
39540
|
+
/* @__PURE__ */ jsx138(
|
|
37783
39541
|
"button",
|
|
37784
39542
|
{
|
|
37785
39543
|
onClick: handleCopy,
|
|
@@ -37788,14 +39546,14 @@ var InstructionPreview = ({
|
|
|
37788
39546
|
}
|
|
37789
39547
|
)
|
|
37790
39548
|
] }),
|
|
37791
|
-
/* @__PURE__ */
|
|
37792
|
-
isLong && /* @__PURE__ */
|
|
39549
|
+
/* @__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 }),
|
|
39550
|
+
isLong && /* @__PURE__ */ jsxs96(
|
|
37793
39551
|
"button",
|
|
37794
39552
|
{
|
|
37795
39553
|
onClick: () => setIsExpanded(!isExpanded),
|
|
37796
39554
|
className: "inline-flex items-center gap-1 text-[11px] text-interactive hover:underline mt-1",
|
|
37797
39555
|
children: [
|
|
37798
|
-
/* @__PURE__ */
|
|
39556
|
+
/* @__PURE__ */ jsx138(
|
|
37799
39557
|
"svg",
|
|
37800
39558
|
{
|
|
37801
39559
|
width: "12",
|
|
@@ -37805,7 +39563,7 @@ var InstructionPreview = ({
|
|
|
37805
39563
|
stroke: "currentColor",
|
|
37806
39564
|
strokeWidth: "2",
|
|
37807
39565
|
className: cn("transition-transform", isExpanded && "rotate-180"),
|
|
37808
|
-
children: /* @__PURE__ */
|
|
39566
|
+
children: /* @__PURE__ */ jsx138("polyline", { points: "6 9 12 15 18 9" })
|
|
37809
39567
|
}
|
|
37810
39568
|
),
|
|
37811
39569
|
isExpanded ? "Show less" : "Show full instruction"
|
|
@@ -37813,16 +39571,16 @@ var InstructionPreview = ({
|
|
|
37813
39571
|
}
|
|
37814
39572
|
)
|
|
37815
39573
|
] }),
|
|
37816
|
-
workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */
|
|
37817
|
-
/* @__PURE__ */
|
|
37818
|
-
/* @__PURE__ */
|
|
37819
|
-
/* @__PURE__ */
|
|
37820
|
-
/* @__PURE__ */
|
|
39574
|
+
workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */ jsxs96("div", { children: [
|
|
39575
|
+
/* @__PURE__ */ jsx138("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Workflow" }),
|
|
39576
|
+
/* @__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: [
|
|
39577
|
+
/* @__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 }),
|
|
39578
|
+
/* @__PURE__ */ jsx138("span", { className: "text-[var(--foreground)]/50 mt-0.5", children: step })
|
|
37821
39579
|
] }, idx)) })
|
|
37822
39580
|
] }),
|
|
37823
|
-
tools && tools.length > 0 && /* @__PURE__ */
|
|
37824
|
-
/* @__PURE__ */
|
|
37825
|
-
/* @__PURE__ */
|
|
39581
|
+
tools && tools.length > 0 && /* @__PURE__ */ jsxs96("div", { children: [
|
|
39582
|
+
/* @__PURE__ */ jsx138("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Tools" }),
|
|
39583
|
+
/* @__PURE__ */ jsx138("div", { className: "flex flex-wrap gap-1.5", children: tools.map((tool) => /* @__PURE__ */ jsx138(
|
|
37826
39584
|
"span",
|
|
37827
39585
|
{
|
|
37828
39586
|
className: "text-[10px] font-mono px-2 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
|
|
@@ -37838,8 +39596,8 @@ var InstructionPreview = ({
|
|
|
37838
39596
|
};
|
|
37839
39597
|
|
|
37840
39598
|
// src/molecules/workstream-builder/UIComponentSelector/UIComponentSelector.tsx
|
|
37841
|
-
import { useState as
|
|
37842
|
-
import { jsx as
|
|
39599
|
+
import { useState as useState21 } from "react";
|
|
39600
|
+
import { jsx as jsx139, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
37843
39601
|
var FONT_STYLE6 = {
|
|
37844
39602
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
37845
39603
|
};
|
|
@@ -37850,11 +39608,11 @@ function UIComponentSelector({
|
|
|
37850
39608
|
className,
|
|
37851
39609
|
isLatestMessage = true
|
|
37852
39610
|
}) {
|
|
37853
|
-
const [selected, setSelected] =
|
|
39611
|
+
const [selected, setSelected] = useState21(() => {
|
|
37854
39612
|
const recommended = components.filter((c) => c.recommended).map((c) => c.name);
|
|
37855
39613
|
return new Set(recommended);
|
|
37856
39614
|
});
|
|
37857
|
-
const [submitted, setSubmitted] =
|
|
39615
|
+
const [submitted, setSubmitted] = useState21(false);
|
|
37858
39616
|
const grouped = components.reduce(
|
|
37859
39617
|
(acc, comp) => {
|
|
37860
39618
|
const cat = comp.category || "Other";
|
|
@@ -37878,43 +39636,63 @@ function UIComponentSelector({
|
|
|
37878
39636
|
onSelect?.(Array.from(selected));
|
|
37879
39637
|
};
|
|
37880
39638
|
const categoryOrder = Object.keys(grouped).sort();
|
|
37881
|
-
return /* @__PURE__ */
|
|
39639
|
+
return /* @__PURE__ */ jsxs97(
|
|
37882
39640
|
"div",
|
|
37883
39641
|
{
|
|
37884
39642
|
className: cn(
|
|
37885
|
-
"rounded-xl border border-
|
|
39643
|
+
"my-3 rounded-xl border border-border bg-card overflow-hidden shadow-sm",
|
|
37886
39644
|
className
|
|
37887
39645
|
),
|
|
37888
39646
|
style: FONT_STYLE6,
|
|
37889
39647
|
children: [
|
|
37890
|
-
/* @__PURE__ */
|
|
37891
|
-
/* @__PURE__ */
|
|
37892
|
-
|
|
37893
|
-
|
|
37894
|
-
|
|
37895
|
-
|
|
37896
|
-
|
|
39648
|
+
/* @__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: [
|
|
39649
|
+
/* @__PURE__ */ jsx139("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ jsxs97(
|
|
39650
|
+
"svg",
|
|
39651
|
+
{
|
|
39652
|
+
width: "12",
|
|
39653
|
+
height: "12",
|
|
39654
|
+
viewBox: "0 0 24 24",
|
|
39655
|
+
fill: "none",
|
|
39656
|
+
stroke: "currentColor",
|
|
39657
|
+
strokeWidth: "2",
|
|
39658
|
+
className: "text-interactive",
|
|
39659
|
+
children: [
|
|
39660
|
+
/* @__PURE__ */ jsx139("rect", { x: "3", y: "3", width: "7", height: "7" }),
|
|
39661
|
+
/* @__PURE__ */ jsx139("rect", { x: "14", y: "3", width: "7", height: "7" }),
|
|
39662
|
+
/* @__PURE__ */ jsx139("rect", { x: "3", y: "14", width: "7", height: "7" }),
|
|
39663
|
+
/* @__PURE__ */ jsx139("rect", { x: "14", y: "14", width: "7", height: "7" })
|
|
39664
|
+
]
|
|
39665
|
+
}
|
|
39666
|
+
) }),
|
|
39667
|
+
/* @__PURE__ */ jsxs97("div", { children: [
|
|
39668
|
+
/* @__PURE__ */ jsx139("h3", { className: "text-xs font-semibold text-foreground", children: "Select UI Components" }),
|
|
39669
|
+
/* @__PURE__ */ jsx139("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: "Choose which visual components this agent can use in its responses." })
|
|
39670
|
+
] })
|
|
39671
|
+
] }) }),
|
|
39672
|
+
/* @__PURE__ */ jsx139("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ jsxs97("div", { children: [
|
|
39673
|
+
/* @__PURE__ */ jsx139("h4", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-2", children: category }),
|
|
39674
|
+
/* @__PURE__ */ jsx139("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ jsxs97(
|
|
37897
39675
|
"label",
|
|
37898
39676
|
{
|
|
37899
39677
|
className: cn(
|
|
37900
|
-
"flex items-start gap-3 px-3 py-2 rounded-lg cursor-pointer transition-
|
|
37901
|
-
submitted || !isLatestMessage ? "cursor-default opacity-
|
|
39678
|
+
"flex items-start gap-3 px-3 py-2 rounded-lg cursor-pointer transition-all",
|
|
39679
|
+
submitted || !isLatestMessage ? "cursor-default opacity-60" : "hover:bg-muted/80",
|
|
37902
39680
|
selected.has(comp.name) && !submitted && "bg-interactive/5 border border-interactive/20",
|
|
37903
39681
|
selected.has(comp.name) && submitted && "bg-interactive/5"
|
|
37904
39682
|
),
|
|
37905
39683
|
children: [
|
|
37906
|
-
/* @__PURE__ */
|
|
39684
|
+
/* @__PURE__ */ jsx139(
|
|
37907
39685
|
"div",
|
|
37908
39686
|
{
|
|
37909
39687
|
className: cn(
|
|
37910
39688
|
"mt-0.5 w-4 h-4 rounded border flex items-center justify-center shrink-0 transition-colors",
|
|
37911
|
-
selected.has(comp.name) ? "bg-interactive border-interactive" : "border-
|
|
39689
|
+
selected.has(comp.name) ? "bg-interactive border-interactive" : "border-muted-foreground/30"
|
|
37912
39690
|
),
|
|
37913
39691
|
onClick: (e) => {
|
|
37914
39692
|
e.preventDefault();
|
|
37915
39693
|
toggle(comp.name);
|
|
37916
39694
|
},
|
|
37917
|
-
children: selected.has(comp.name) && /* @__PURE__ */
|
|
39695
|
+
children: selected.has(comp.name) && /* @__PURE__ */ jsx139(
|
|
37918
39696
|
"svg",
|
|
37919
39697
|
{
|
|
37920
39698
|
width: "10",
|
|
@@ -37923,12 +39701,12 @@ function UIComponentSelector({
|
|
|
37923
39701
|
fill: "none",
|
|
37924
39702
|
stroke: "white",
|
|
37925
39703
|
strokeWidth: "3",
|
|
37926
|
-
children: /* @__PURE__ */
|
|
39704
|
+
children: /* @__PURE__ */ jsx139("polyline", { points: "20 6 9 17 4 12" })
|
|
37927
39705
|
}
|
|
37928
39706
|
)
|
|
37929
39707
|
}
|
|
37930
39708
|
),
|
|
37931
|
-
/* @__PURE__ */
|
|
39709
|
+
/* @__PURE__ */ jsx139(
|
|
37932
39710
|
"input",
|
|
37933
39711
|
{
|
|
37934
39712
|
type: "checkbox",
|
|
@@ -37938,11 +39716,11 @@ function UIComponentSelector({
|
|
|
37938
39716
|
className: "sr-only"
|
|
37939
39717
|
}
|
|
37940
39718
|
),
|
|
37941
|
-
/* @__PURE__ */
|
|
37942
|
-
/* @__PURE__ */
|
|
37943
|
-
/* @__PURE__ */
|
|
37944
|
-
comp.recommended && /* @__PURE__ */
|
|
37945
|
-
onPreview && /* @__PURE__ */
|
|
39719
|
+
/* @__PURE__ */ jsxs97("div", { className: "flex-1 min-w-0", children: [
|
|
39720
|
+
/* @__PURE__ */ jsxs97("div", { className: "flex items-center gap-1", children: [
|
|
39721
|
+
/* @__PURE__ */ jsx139("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
|
|
39722
|
+
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" }),
|
|
39723
|
+
onPreview && /* @__PURE__ */ jsx139(
|
|
37946
39724
|
"button",
|
|
37947
39725
|
{
|
|
37948
39726
|
type: "button",
|
|
@@ -37951,9 +39729,9 @@ function UIComponentSelector({
|
|
|
37951
39729
|
e.stopPropagation();
|
|
37952
39730
|
onPreview(comp.name);
|
|
37953
39731
|
},
|
|
37954
|
-
className: "shrink-0 p-0.5 rounded hover:bg-
|
|
39732
|
+
className: "shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
|
|
37955
39733
|
title: `Preview ${comp.display_name}`,
|
|
37956
|
-
children: /* @__PURE__ */
|
|
39734
|
+
children: /* @__PURE__ */ jsxs97(
|
|
37957
39735
|
"svg",
|
|
37958
39736
|
{
|
|
37959
39737
|
width: "14",
|
|
@@ -37964,30 +39742,30 @@ function UIComponentSelector({
|
|
|
37964
39742
|
strokeWidth: "2",
|
|
37965
39743
|
strokeLinecap: "round",
|
|
37966
39744
|
strokeLinejoin: "round",
|
|
37967
|
-
className: "text-
|
|
39745
|
+
className: "text-muted-foreground hover:text-interactive",
|
|
37968
39746
|
children: [
|
|
37969
|
-
/* @__PURE__ */
|
|
37970
|
-
/* @__PURE__ */
|
|
37971
|
-
/* @__PURE__ */
|
|
39747
|
+
/* @__PURE__ */ jsx139("circle", { cx: "12", cy: "12", r: "10" }),
|
|
39748
|
+
/* @__PURE__ */ jsx139("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
39749
|
+
/* @__PURE__ */ jsx139("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
37972
39750
|
]
|
|
37973
39751
|
}
|
|
37974
39752
|
)
|
|
37975
39753
|
}
|
|
37976
39754
|
)
|
|
37977
39755
|
] }),
|
|
37978
|
-
/* @__PURE__ */
|
|
39756
|
+
/* @__PURE__ */ jsx139("span", { className: "ml-0 text-xs text-muted-foreground", children: comp.description })
|
|
37979
39757
|
] })
|
|
37980
39758
|
]
|
|
37981
39759
|
},
|
|
37982
39760
|
comp.name
|
|
37983
39761
|
)) })
|
|
37984
39762
|
] }, category)) }),
|
|
37985
|
-
!submitted && isLatestMessage && /* @__PURE__ */
|
|
37986
|
-
/* @__PURE__ */
|
|
39763
|
+
!submitted && isLatestMessage && /* @__PURE__ */ jsxs97("div", { className: "px-4 py-3 border-t border-border/60 flex items-center justify-between bg-muted/30", children: [
|
|
39764
|
+
/* @__PURE__ */ jsxs97("span", { className: "text-xs text-muted-foreground", children: [
|
|
37987
39765
|
selected.size,
|
|
37988
39766
|
" selected"
|
|
37989
39767
|
] }),
|
|
37990
|
-
/* @__PURE__ */
|
|
39768
|
+
/* @__PURE__ */ jsx139(
|
|
37991
39769
|
"button",
|
|
37992
39770
|
{
|
|
37993
39771
|
onClick: handleContinue,
|
|
@@ -37995,14 +39773,15 @@ function UIComponentSelector({
|
|
|
37995
39773
|
children: "Continue"
|
|
37996
39774
|
}
|
|
37997
39775
|
)
|
|
37998
|
-
] })
|
|
39776
|
+
] }),
|
|
39777
|
+
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" }) })
|
|
37999
39778
|
]
|
|
38000
39779
|
}
|
|
38001
39780
|
);
|
|
38002
39781
|
}
|
|
38003
39782
|
|
|
38004
39783
|
// src/molecules/workstream-builder/MultiAgentCard/MultiAgentCard.tsx
|
|
38005
|
-
import { jsx as
|
|
39784
|
+
import { jsx as jsx140, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
38006
39785
|
var FONT_STYLE7 = {
|
|
38007
39786
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
38008
39787
|
};
|
|
@@ -38015,7 +39794,7 @@ var MultiAgentCard = ({
|
|
|
38015
39794
|
className
|
|
38016
39795
|
}) => {
|
|
38017
39796
|
const avatarUrl = `https://api.dicebear.com/7.x/avataaars/svg?seed=${name}`;
|
|
38018
|
-
return /* @__PURE__ */
|
|
39797
|
+
return /* @__PURE__ */ jsxs98(
|
|
38019
39798
|
"div",
|
|
38020
39799
|
{
|
|
38021
39800
|
className: cn(
|
|
@@ -38024,14 +39803,14 @@ var MultiAgentCard = ({
|
|
|
38024
39803
|
),
|
|
38025
39804
|
style: FONT_STYLE7,
|
|
38026
39805
|
children: [
|
|
38027
|
-
/* @__PURE__ */
|
|
38028
|
-
/* @__PURE__ */
|
|
38029
|
-
/* @__PURE__ */
|
|
38030
|
-
/* @__PURE__ */
|
|
38031
|
-
/* @__PURE__ */
|
|
38032
|
-
/* @__PURE__ */
|
|
38033
|
-
/* @__PURE__ */
|
|
38034
|
-
/* @__PURE__ */
|
|
39806
|
+
/* @__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: [
|
|
39807
|
+
/* @__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" }) }),
|
|
39808
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex-1 min-w-0", children: [
|
|
39809
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-2", children: [
|
|
39810
|
+
/* @__PURE__ */ jsx140("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
|
|
39811
|
+
/* @__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 }),
|
|
39812
|
+
/* @__PURE__ */ jsx140("span", { className: "text-[10px] px-2 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
|
|
39813
|
+
/* @__PURE__ */ jsxs98(
|
|
38035
39814
|
"span",
|
|
38036
39815
|
{
|
|
38037
39816
|
className: cn(
|
|
@@ -38039,7 +39818,7 @@ var MultiAgentCard = ({
|
|
|
38039
39818
|
enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
38040
39819
|
),
|
|
38041
39820
|
children: [
|
|
38042
|
-
/* @__PURE__ */
|
|
39821
|
+
/* @__PURE__ */ jsx140("span", { className: cn(
|
|
38043
39822
|
"w-1.5 h-1.5 rounded-full",
|
|
38044
39823
|
enabled ? "bg-emerald-500" : "bg-red-500"
|
|
38045
39824
|
) }),
|
|
@@ -38048,18 +39827,18 @@ var MultiAgentCard = ({
|
|
|
38048
39827
|
}
|
|
38049
39828
|
)
|
|
38050
39829
|
] }),
|
|
38051
|
-
/* @__PURE__ */
|
|
39830
|
+
/* @__PURE__ */ jsx140("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed mt-1 whitespace-normal", style: { textWrap: "auto" }, children: description })
|
|
38052
39831
|
] })
|
|
38053
39832
|
] }),
|
|
38054
|
-
stages.length > 0 && /* @__PURE__ */
|
|
38055
|
-
/* @__PURE__ */
|
|
39833
|
+
stages.length > 0 && /* @__PURE__ */ jsxs98("div", { className: "border-t border-[var(--border-color)] px-5 py-4", children: [
|
|
39834
|
+
/* @__PURE__ */ jsxs98("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-3", children: [
|
|
38056
39835
|
"Stages (",
|
|
38057
39836
|
stages.length,
|
|
38058
39837
|
")"
|
|
38059
39838
|
] }),
|
|
38060
|
-
/* @__PURE__ */
|
|
38061
|
-
/* @__PURE__ */
|
|
38062
|
-
/* @__PURE__ */
|
|
39839
|
+
/* @__PURE__ */ jsx140("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ jsxs98("div", { className: "flex items-stretch", children: [
|
|
39840
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex flex-col items-center mr-3 w-5", children: [
|
|
39841
|
+
/* @__PURE__ */ jsx140(
|
|
38063
39842
|
"div",
|
|
38064
39843
|
{
|
|
38065
39844
|
className: cn(
|
|
@@ -38069,20 +39848,20 @@ var MultiAgentCard = ({
|
|
|
38069
39848
|
children: idx + 1
|
|
38070
39849
|
}
|
|
38071
39850
|
),
|
|
38072
|
-
idx < stages.length - 1 && /* @__PURE__ */
|
|
39851
|
+
idx < stages.length - 1 && /* @__PURE__ */ jsx140("div", { className: "w-px flex-1 min-h-[16px] border-l border-dashed border-interactive/30" })
|
|
38073
39852
|
] }),
|
|
38074
|
-
/* @__PURE__ */
|
|
38075
|
-
/* @__PURE__ */
|
|
38076
|
-
/* @__PURE__ */
|
|
38077
|
-
/* @__PURE__ */
|
|
39853
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
|
|
39854
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-2", children: [
|
|
39855
|
+
/* @__PURE__ */ jsx140("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
|
|
39856
|
+
/* @__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 })
|
|
38078
39857
|
] }),
|
|
38079
|
-
/* @__PURE__ */
|
|
38080
|
-
stage.tools && stage.tools.length > 0 && /* @__PURE__ */
|
|
39858
|
+
/* @__PURE__ */ jsxs98("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
|
|
39859
|
+
stage.tools && stage.tools.length > 0 && /* @__PURE__ */ jsxs98("span", { children: [
|
|
38081
39860
|
stage.tools.length,
|
|
38082
39861
|
" tool",
|
|
38083
39862
|
stage.tools.length !== 1 ? "s" : ""
|
|
38084
39863
|
] }),
|
|
38085
|
-
stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */
|
|
39864
|
+
stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */ jsxs98("span", { children: [
|
|
38086
39865
|
stage.ui_components.length,
|
|
38087
39866
|
" component",
|
|
38088
39867
|
stage.ui_components.length !== 1 ? "s" : ""
|
|
@@ -38097,7 +39876,7 @@ var MultiAgentCard = ({
|
|
|
38097
39876
|
};
|
|
38098
39877
|
|
|
38099
39878
|
// src/molecules/workstream-builder/MultiAgentPlan/MultiAgentPlan.tsx
|
|
38100
|
-
import { jsx as
|
|
39879
|
+
import { jsx as jsx141, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
38101
39880
|
var FONT_STYLE8 = {
|
|
38102
39881
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
38103
39882
|
};
|
|
@@ -38105,7 +39884,7 @@ var MultiAgentPlan = ({
|
|
|
38105
39884
|
stages = [],
|
|
38106
39885
|
className
|
|
38107
39886
|
}) => {
|
|
38108
|
-
return /* @__PURE__ */
|
|
39887
|
+
return /* @__PURE__ */ jsxs99(
|
|
38109
39888
|
"div",
|
|
38110
39889
|
{
|
|
38111
39890
|
className: cn(
|
|
@@ -38114,8 +39893,8 @@ var MultiAgentPlan = ({
|
|
|
38114
39893
|
),
|
|
38115
39894
|
style: FONT_STYLE8,
|
|
38116
39895
|
children: [
|
|
38117
|
-
/* @__PURE__ */
|
|
38118
|
-
/* @__PURE__ */
|
|
39896
|
+
/* @__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: [
|
|
39897
|
+
/* @__PURE__ */ jsx141("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ jsx141(
|
|
38119
39898
|
"svg",
|
|
38120
39899
|
{
|
|
38121
39900
|
width: "10",
|
|
@@ -38125,20 +39904,20 @@ var MultiAgentPlan = ({
|
|
|
38125
39904
|
stroke: "currentColor",
|
|
38126
39905
|
strokeWidth: "2",
|
|
38127
39906
|
className: "text-violet-600",
|
|
38128
|
-
children: /* @__PURE__ */
|
|
39907
|
+
children: /* @__PURE__ */ jsx141("path", { d: "M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5" })
|
|
38129
39908
|
}
|
|
38130
39909
|
) }),
|
|
38131
|
-
/* @__PURE__ */
|
|
38132
|
-
/* @__PURE__ */
|
|
39910
|
+
/* @__PURE__ */ jsx141("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "Proposed Multi-Agent Workflow" }),
|
|
39911
|
+
/* @__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" })
|
|
38133
39912
|
] }) }),
|
|
38134
|
-
/* @__PURE__ */
|
|
38135
|
-
/* @__PURE__ */
|
|
38136
|
-
/* @__PURE__ */
|
|
38137
|
-
idx < stages.length - 1 && /* @__PURE__ */
|
|
39913
|
+
/* @__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: [
|
|
39914
|
+
/* @__PURE__ */ jsxs99("div", { className: "flex flex-col items-center mr-3 w-6", children: [
|
|
39915
|
+
/* @__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 }),
|
|
39916
|
+
idx < stages.length - 1 && /* @__PURE__ */ jsx141("div", { className: "w-px flex-1 min-h-[12px] border-l border-dashed border-interactive/30" })
|
|
38138
39917
|
] }),
|
|
38139
|
-
/* @__PURE__ */
|
|
38140
|
-
/* @__PURE__ */
|
|
38141
|
-
stage.description && /* @__PURE__ */
|
|
39918
|
+
/* @__PURE__ */ jsxs99("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
|
|
39919
|
+
/* @__PURE__ */ jsx141("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
|
|
39920
|
+
stage.description && /* @__PURE__ */ jsx141(
|
|
38142
39921
|
"p",
|
|
38143
39922
|
{
|
|
38144
39923
|
className: "text-[11px] text-foreground/50 mt-0.5 whitespace-normal",
|
|
@@ -38146,7 +39925,7 @@ var MultiAgentPlan = ({
|
|
|
38146
39925
|
children: stage.description
|
|
38147
39926
|
}
|
|
38148
39927
|
),
|
|
38149
|
-
stage.proposed_tools && stage.proposed_tools.length > 0 && /* @__PURE__ */
|
|
39928
|
+
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(
|
|
38150
39929
|
"span",
|
|
38151
39930
|
{
|
|
38152
39931
|
className: "text-[10px] px-1.5 py-0.5 rounded bg-interactive/10 text-interactive font-mono",
|
|
@@ -38162,8 +39941,8 @@ var MultiAgentPlan = ({
|
|
|
38162
39941
|
};
|
|
38163
39942
|
|
|
38164
39943
|
// src/molecules/workstream-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
|
|
38165
|
-
import { useState as
|
|
38166
|
-
import { jsx as
|
|
39944
|
+
import { useState as useState22, useCallback as useCallback10 } from "react";
|
|
39945
|
+
import { jsx as jsx142, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
38167
39946
|
var FONT_STYLE9 = {
|
|
38168
39947
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
38169
39948
|
};
|
|
@@ -38175,8 +39954,8 @@ var MultiAgentUISelector = ({
|
|
|
38175
39954
|
className,
|
|
38176
39955
|
isLatestMessage = true
|
|
38177
39956
|
}) => {
|
|
38178
|
-
const [activeStageId, setActiveStageId] =
|
|
38179
|
-
const [selections, setSelections] =
|
|
39957
|
+
const [activeStageId, setActiveStageId] = useState22(stages[0]?.id || "");
|
|
39958
|
+
const [selections, setSelections] = useState22(
|
|
38180
39959
|
() => {
|
|
38181
39960
|
const init = {};
|
|
38182
39961
|
const recommendedNames = components.filter((c) => c.recommended).map((c) => c.name);
|
|
@@ -38187,14 +39966,14 @@ var MultiAgentUISelector = ({
|
|
|
38187
39966
|
return init;
|
|
38188
39967
|
}
|
|
38189
39968
|
);
|
|
38190
|
-
const [submitted, setSubmitted] =
|
|
39969
|
+
const [submitted, setSubmitted] = useState22(false);
|
|
38191
39970
|
const grouped = components.reduce((acc, comp) => {
|
|
38192
39971
|
const cat = comp.category || "Other";
|
|
38193
39972
|
if (!acc[cat]) acc[cat] = [];
|
|
38194
39973
|
acc[cat].push(comp);
|
|
38195
39974
|
return acc;
|
|
38196
39975
|
}, {});
|
|
38197
|
-
const toggleComponent =
|
|
39976
|
+
const toggleComponent = useCallback10(
|
|
38198
39977
|
(stageId, compName) => {
|
|
38199
39978
|
if (submitted || !isLatestMessage) return;
|
|
38200
39979
|
setSelections((prev) => {
|
|
@@ -38211,7 +39990,7 @@ var MultiAgentUISelector = ({
|
|
|
38211
39990
|
},
|
|
38212
39991
|
[submitted]
|
|
38213
39992
|
);
|
|
38214
|
-
const selectAll =
|
|
39993
|
+
const selectAll = useCallback10(
|
|
38215
39994
|
(stageId) => {
|
|
38216
39995
|
if (submitted || !isLatestMessage) return;
|
|
38217
39996
|
setSelections((prev) => {
|
|
@@ -38222,7 +40001,7 @@ var MultiAgentUISelector = ({
|
|
|
38222
40001
|
},
|
|
38223
40002
|
[submitted, isLatestMessage, components]
|
|
38224
40003
|
);
|
|
38225
|
-
const clearAll =
|
|
40004
|
+
const clearAll = useCallback10(
|
|
38226
40005
|
(stageId) => {
|
|
38227
40006
|
if (submitted || !isLatestMessage) return;
|
|
38228
40007
|
setSelections((prev) => {
|
|
@@ -38233,7 +40012,7 @@ var MultiAgentUISelector = ({
|
|
|
38233
40012
|
},
|
|
38234
40013
|
[submitted, isLatestMessage]
|
|
38235
40014
|
);
|
|
38236
|
-
const handleContinue =
|
|
40015
|
+
const handleContinue = useCallback10(() => {
|
|
38237
40016
|
setSubmitted(true);
|
|
38238
40017
|
if (onSelect) {
|
|
38239
40018
|
const result = {};
|
|
@@ -38244,59 +40023,59 @@ var MultiAgentUISelector = ({
|
|
|
38244
40023
|
}
|
|
38245
40024
|
}, [onSelect, selections]);
|
|
38246
40025
|
const activeStage = stages.find((s) => s.id === activeStageId);
|
|
38247
|
-
return /* @__PURE__ */
|
|
40026
|
+
return /* @__PURE__ */ jsxs100(
|
|
38248
40027
|
"div",
|
|
38249
40028
|
{
|
|
38250
40029
|
className: cn(
|
|
38251
|
-
"
|
|
40030
|
+
"my-3 rounded-xl border border-border bg-card overflow-hidden shadow-sm",
|
|
38252
40031
|
className
|
|
38253
40032
|
),
|
|
38254
40033
|
style: FONT_STYLE9,
|
|
38255
40034
|
children: [
|
|
38256
|
-
/* @__PURE__ */
|
|
38257
|
-
/* @__PURE__ */
|
|
40035
|
+
/* @__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: [
|
|
40036
|
+
/* @__PURE__ */ jsx142("div", { className: "w-5 h-5 rounded-md bg-interactive/15 flex items-center justify-center", children: /* @__PURE__ */ jsxs100(
|
|
38258
40037
|
"svg",
|
|
38259
40038
|
{
|
|
38260
|
-
width: "
|
|
38261
|
-
height: "
|
|
40039
|
+
width: "12",
|
|
40040
|
+
height: "12",
|
|
38262
40041
|
viewBox: "0 0 24 24",
|
|
38263
40042
|
fill: "none",
|
|
38264
40043
|
stroke: "currentColor",
|
|
38265
40044
|
strokeWidth: "2",
|
|
38266
40045
|
className: "text-interactive",
|
|
38267
40046
|
children: [
|
|
38268
|
-
/* @__PURE__ */
|
|
38269
|
-
/* @__PURE__ */
|
|
38270
|
-
/* @__PURE__ */
|
|
38271
|
-
/* @__PURE__ */
|
|
40047
|
+
/* @__PURE__ */ jsx142("rect", { x: "3", y: "3", width: "7", height: "7" }),
|
|
40048
|
+
/* @__PURE__ */ jsx142("rect", { x: "14", y: "3", width: "7", height: "7" }),
|
|
40049
|
+
/* @__PURE__ */ jsx142("rect", { x: "3", y: "14", width: "7", height: "7" }),
|
|
40050
|
+
/* @__PURE__ */ jsx142("rect", { x: "14", y: "14", width: "7", height: "7" })
|
|
38272
40051
|
]
|
|
38273
40052
|
}
|
|
38274
40053
|
) }),
|
|
38275
|
-
/* @__PURE__ */
|
|
40054
|
+
/* @__PURE__ */ jsx142("span", { className: "text-xs font-semibold text-foreground", children: "UI Components per Stage" })
|
|
38276
40055
|
] }) }),
|
|
38277
|
-
/* @__PURE__ */
|
|
40056
|
+
/* @__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(
|
|
38278
40057
|
"button",
|
|
38279
40058
|
{
|
|
38280
40059
|
onClick: () => setActiveStageId(stage.id),
|
|
38281
40060
|
className: cn(
|
|
38282
40061
|
"px-3 py-1.5 text-[11px] font-medium rounded-full transition-colors",
|
|
38283
|
-
activeStageId === stage.id ? "bg-interactive text-white" : "text-
|
|
40062
|
+
activeStageId === stage.id ? "bg-interactive text-white" : "text-muted-foreground hover:text-foreground hover:bg-muted"
|
|
38284
40063
|
),
|
|
38285
40064
|
children: stage.name
|
|
38286
40065
|
},
|
|
38287
40066
|
stage.id
|
|
38288
40067
|
)) }),
|
|
38289
|
-
/* @__PURE__ */
|
|
38290
|
-
activeStage && /* @__PURE__ */
|
|
38291
|
-
/* @__PURE__ */
|
|
40068
|
+
/* @__PURE__ */ jsxs100("div", { className: "px-4 py-3", children: [
|
|
40069
|
+
activeStage && /* @__PURE__ */ jsxs100("div", { className: "flex items-center justify-between mb-3", children: [
|
|
40070
|
+
/* @__PURE__ */ jsxs100("p", { className: "text-[10px] text-muted-foreground", children: [
|
|
38292
40071
|
"Select components for ",
|
|
38293
|
-
/* @__PURE__ */
|
|
40072
|
+
/* @__PURE__ */ jsx142("strong", { className: "text-foreground", children: activeStage.name }),
|
|
38294
40073
|
" (",
|
|
38295
40074
|
activeStage.agent_name,
|
|
38296
40075
|
")"
|
|
38297
40076
|
] }),
|
|
38298
|
-
!submitted && isLatestMessage && /* @__PURE__ */
|
|
38299
|
-
/* @__PURE__ */
|
|
40077
|
+
!submitted && isLatestMessage && /* @__PURE__ */ jsxs100("div", { className: "flex items-center gap-2", children: [
|
|
40078
|
+
/* @__PURE__ */ jsx142(
|
|
38300
40079
|
"button",
|
|
38301
40080
|
{
|
|
38302
40081
|
onClick: () => selectAll(activeStageId),
|
|
@@ -38304,22 +40083,22 @@ var MultiAgentUISelector = ({
|
|
|
38304
40083
|
children: "Select All"
|
|
38305
40084
|
}
|
|
38306
40085
|
),
|
|
38307
|
-
/* @__PURE__ */
|
|
38308
|
-
/* @__PURE__ */
|
|
40086
|
+
/* @__PURE__ */ jsx142("span", { className: "text-muted-foreground/40", children: "|" }),
|
|
40087
|
+
/* @__PURE__ */ jsx142(
|
|
38309
40088
|
"button",
|
|
38310
40089
|
{
|
|
38311
40090
|
onClick: () => clearAll(activeStageId),
|
|
38312
|
-
className: "text-[10px] text-
|
|
40091
|
+
className: "text-[10px] text-muted-foreground hover:text-foreground font-medium",
|
|
38313
40092
|
children: "Clear"
|
|
38314
40093
|
}
|
|
38315
40094
|
)
|
|
38316
40095
|
] })
|
|
38317
40096
|
] }),
|
|
38318
|
-
Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */
|
|
38319
|
-
/* @__PURE__ */
|
|
38320
|
-
/* @__PURE__ */
|
|
40097
|
+
Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ jsxs100("div", { className: "mb-3", children: [
|
|
40098
|
+
/* @__PURE__ */ jsx142("p", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wide mb-1.5", children: category }),
|
|
40099
|
+
/* @__PURE__ */ jsx142("div", { className: "grid grid-cols-2 gap-1.5", children: comps.map((comp) => {
|
|
38321
40100
|
const isSelected = selections[activeStageId]?.has(comp.name) || false;
|
|
38322
|
-
return /* @__PURE__ */
|
|
40101
|
+
return /* @__PURE__ */ jsxs100(
|
|
38323
40102
|
"div",
|
|
38324
40103
|
{
|
|
38325
40104
|
role: "button",
|
|
@@ -38333,19 +40112,19 @@ var MultiAgentUISelector = ({
|
|
|
38333
40112
|
},
|
|
38334
40113
|
className: cn(
|
|
38335
40114
|
"text-left p-2.5 rounded-lg border text-[11px] transition-all overflow-hidden cursor-pointer",
|
|
38336
|
-
isSelected ? "border-interactive bg-interactive/5" : "border-
|
|
40115
|
+
isSelected ? "border-interactive bg-interactive/5" : "border-border hover:border-interactive/50",
|
|
38337
40116
|
(submitted || !isLatestMessage) && "opacity-60 cursor-default"
|
|
38338
40117
|
),
|
|
38339
40118
|
children: [
|
|
38340
|
-
/* @__PURE__ */
|
|
38341
|
-
/* @__PURE__ */
|
|
40119
|
+
/* @__PURE__ */ jsxs100("div", { className: "flex items-center gap-1.5", children: [
|
|
40120
|
+
/* @__PURE__ */ jsx142(
|
|
38342
40121
|
"div",
|
|
38343
40122
|
{
|
|
38344
40123
|
className: cn(
|
|
38345
40124
|
"w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0",
|
|
38346
|
-
isSelected ? "bg-interactive border-interactive" : "border-
|
|
40125
|
+
isSelected ? "bg-interactive border-interactive" : "border-muted-foreground/30"
|
|
38347
40126
|
),
|
|
38348
|
-
children: isSelected && /* @__PURE__ */
|
|
40127
|
+
children: isSelected && /* @__PURE__ */ jsx142(
|
|
38349
40128
|
"svg",
|
|
38350
40129
|
{
|
|
38351
40130
|
width: "8",
|
|
@@ -38354,14 +40133,14 @@ var MultiAgentUISelector = ({
|
|
|
38354
40133
|
fill: "none",
|
|
38355
40134
|
stroke: "white",
|
|
38356
40135
|
strokeWidth: "3",
|
|
38357
|
-
children: /* @__PURE__ */
|
|
40136
|
+
children: /* @__PURE__ */ jsx142("polyline", { points: "20 6 9 17 4 12" })
|
|
38358
40137
|
}
|
|
38359
40138
|
)
|
|
38360
40139
|
}
|
|
38361
40140
|
),
|
|
38362
|
-
/* @__PURE__ */
|
|
38363
|
-
comp.recommended && /* @__PURE__ */
|
|
38364
|
-
onPreview && /* @__PURE__ */
|
|
40141
|
+
/* @__PURE__ */ jsx142("span", { className: "font-medium text-foreground", children: comp.display_name }),
|
|
40142
|
+
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" }),
|
|
40143
|
+
onPreview && /* @__PURE__ */ jsx142(
|
|
38365
40144
|
"button",
|
|
38366
40145
|
{
|
|
38367
40146
|
type: "button",
|
|
@@ -38369,9 +40148,9 @@ var MultiAgentUISelector = ({
|
|
|
38369
40148
|
e.stopPropagation();
|
|
38370
40149
|
onPreview(comp.name);
|
|
38371
40150
|
},
|
|
38372
|
-
className: "ml-auto shrink-0 p-0.5 rounded hover:bg-
|
|
40151
|
+
className: "ml-auto shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
|
|
38373
40152
|
title: `Preview ${comp.display_name}`,
|
|
38374
|
-
children: /* @__PURE__ */
|
|
40153
|
+
children: /* @__PURE__ */ jsxs100(
|
|
38375
40154
|
"svg",
|
|
38376
40155
|
{
|
|
38377
40156
|
width: "14",
|
|
@@ -38382,18 +40161,18 @@ var MultiAgentUISelector = ({
|
|
|
38382
40161
|
strokeWidth: "2",
|
|
38383
40162
|
strokeLinecap: "round",
|
|
38384
40163
|
strokeLinejoin: "round",
|
|
38385
|
-
className: "text-
|
|
40164
|
+
className: "text-muted-foreground hover:text-primary",
|
|
38386
40165
|
children: [
|
|
38387
|
-
/* @__PURE__ */
|
|
38388
|
-
/* @__PURE__ */
|
|
38389
|
-
/* @__PURE__ */
|
|
40166
|
+
/* @__PURE__ */ jsx142("circle", { cx: "12", cy: "12", r: "10" }),
|
|
40167
|
+
/* @__PURE__ */ jsx142("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
40168
|
+
/* @__PURE__ */ jsx142("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
38390
40169
|
]
|
|
38391
40170
|
}
|
|
38392
40171
|
)
|
|
38393
40172
|
}
|
|
38394
40173
|
)
|
|
38395
40174
|
] }),
|
|
38396
|
-
/* @__PURE__ */
|
|
40175
|
+
/* @__PURE__ */ jsx142("p", { className: "text-[10px] text-muted-foreground mt-0.5 ml-5 whitespace-normal", children: comp.description })
|
|
38397
40176
|
]
|
|
38398
40177
|
},
|
|
38399
40178
|
comp.name
|
|
@@ -38401,7 +40180,7 @@ var MultiAgentUISelector = ({
|
|
|
38401
40180
|
}) })
|
|
38402
40181
|
] }, category))
|
|
38403
40182
|
] }),
|
|
38404
|
-
!submitted && isLatestMessage && /* @__PURE__ */
|
|
40183
|
+
!submitted && isLatestMessage && /* @__PURE__ */ jsx142("div", { className: "px-4 py-3 border-t border-border/60 bg-muted/30", children: /* @__PURE__ */ jsx142(
|
|
38405
40184
|
"button",
|
|
38406
40185
|
{
|
|
38407
40186
|
onClick: handleContinue,
|
|
@@ -38409,14 +40188,14 @@ var MultiAgentUISelector = ({
|
|
|
38409
40188
|
children: "Continue"
|
|
38410
40189
|
}
|
|
38411
40190
|
) }),
|
|
38412
|
-
submitted && /* @__PURE__ */
|
|
40191
|
+
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" }) })
|
|
38413
40192
|
]
|
|
38414
40193
|
}
|
|
38415
40194
|
);
|
|
38416
40195
|
};
|
|
38417
40196
|
|
|
38418
40197
|
// src/molecules/workstream-builder/StageIndicator/StageIndicator.tsx
|
|
38419
|
-
import { jsx as
|
|
40198
|
+
import { jsx as jsx143, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
38420
40199
|
var FONT_STYLE10 = {
|
|
38421
40200
|
fontFamily: "Inter, system-ui, sans-serif"
|
|
38422
40201
|
};
|
|
@@ -38425,7 +40204,7 @@ var StageIndicator = ({
|
|
|
38425
40204
|
agent_name,
|
|
38426
40205
|
className
|
|
38427
40206
|
}) => {
|
|
38428
|
-
return /* @__PURE__ */
|
|
40207
|
+
return /* @__PURE__ */ jsxs101(
|
|
38429
40208
|
"div",
|
|
38430
40209
|
{
|
|
38431
40210
|
className: cn(
|
|
@@ -38434,12 +40213,12 @@ var StageIndicator = ({
|
|
|
38434
40213
|
),
|
|
38435
40214
|
style: { ...FONT_STYLE10, animation: "fadeIn 0.3s ease-out" },
|
|
38436
40215
|
children: [
|
|
38437
|
-
/* @__PURE__ */
|
|
38438
|
-
/* @__PURE__ */
|
|
38439
|
-
/* @__PURE__ */
|
|
38440
|
-
/* @__PURE__ */
|
|
40216
|
+
/* @__PURE__ */ jsx143("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
|
|
40217
|
+
/* @__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: [
|
|
40218
|
+
/* @__PURE__ */ jsx143("div", { className: "w-1.5 h-1.5 rounded-full bg-violet-500 animate-pulse" }),
|
|
40219
|
+
/* @__PURE__ */ jsx143("span", { className: "text-[10px] font-medium text-violet-600", children: stage_name || agent_name })
|
|
38441
40220
|
] }),
|
|
38442
|
-
/* @__PURE__ */
|
|
40221
|
+
/* @__PURE__ */ jsx143("div", { className: "flex-1 h-px bg-[var(--border-color)]" })
|
|
38443
40222
|
]
|
|
38444
40223
|
}
|
|
38445
40224
|
);
|
|
@@ -38737,7 +40516,7 @@ __export(ui_exports, {
|
|
|
38737
40516
|
// src/components/ui/button-group.tsx
|
|
38738
40517
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
38739
40518
|
import { cva as cva8 } from "class-variance-authority";
|
|
38740
|
-
import { jsx as
|
|
40519
|
+
import { jsx as jsx144 } from "react/jsx-runtime";
|
|
38741
40520
|
var buttonGroupVariants = cva8(
|
|
38742
40521
|
"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",
|
|
38743
40522
|
{
|
|
@@ -38757,7 +40536,7 @@ function ButtonGroup({
|
|
|
38757
40536
|
orientation,
|
|
38758
40537
|
...props
|
|
38759
40538
|
}) {
|
|
38760
|
-
return /* @__PURE__ */
|
|
40539
|
+
return /* @__PURE__ */ jsx144(
|
|
38761
40540
|
"div",
|
|
38762
40541
|
{
|
|
38763
40542
|
role: "group",
|
|
@@ -38774,7 +40553,7 @@ function ButtonGroupText({
|
|
|
38774
40553
|
...props
|
|
38775
40554
|
}) {
|
|
38776
40555
|
const Comp = asChild ? Slot4 : "div";
|
|
38777
|
-
return /* @__PURE__ */
|
|
40556
|
+
return /* @__PURE__ */ jsx144(
|
|
38778
40557
|
Comp,
|
|
38779
40558
|
{
|
|
38780
40559
|
className: cn(
|
|
@@ -38790,7 +40569,7 @@ function ButtonGroupSeparator({
|
|
|
38790
40569
|
orientation = "vertical",
|
|
38791
40570
|
...props
|
|
38792
40571
|
}) {
|
|
38793
|
-
return /* @__PURE__ */
|
|
40572
|
+
return /* @__PURE__ */ jsx144(
|
|
38794
40573
|
Separator2,
|
|
38795
40574
|
{
|
|
38796
40575
|
"data-slot": "button-group-separator",
|
|
@@ -38806,9 +40585,9 @@ function ButtonGroupSeparator({
|
|
|
38806
40585
|
|
|
38807
40586
|
// src/components/ui/empty.tsx
|
|
38808
40587
|
import { cva as cva9 } from "class-variance-authority";
|
|
38809
|
-
import { jsx as
|
|
40588
|
+
import { jsx as jsx145 } from "react/jsx-runtime";
|
|
38810
40589
|
function Empty({ className, ...props }) {
|
|
38811
|
-
return /* @__PURE__ */
|
|
40590
|
+
return /* @__PURE__ */ jsx145(
|
|
38812
40591
|
"div",
|
|
38813
40592
|
{
|
|
38814
40593
|
"data-slot": "empty",
|
|
@@ -38821,7 +40600,7 @@ function Empty({ className, ...props }) {
|
|
|
38821
40600
|
);
|
|
38822
40601
|
}
|
|
38823
40602
|
function EmptyHeader({ className, ...props }) {
|
|
38824
|
-
return /* @__PURE__ */
|
|
40603
|
+
return /* @__PURE__ */ jsx145(
|
|
38825
40604
|
"div",
|
|
38826
40605
|
{
|
|
38827
40606
|
"data-slot": "empty-header",
|
|
@@ -38852,7 +40631,7 @@ function EmptyMedia({
|
|
|
38852
40631
|
variant = "default",
|
|
38853
40632
|
...props
|
|
38854
40633
|
}) {
|
|
38855
|
-
return /* @__PURE__ */
|
|
40634
|
+
return /* @__PURE__ */ jsx145(
|
|
38856
40635
|
"div",
|
|
38857
40636
|
{
|
|
38858
40637
|
"data-slot": "empty-icon",
|
|
@@ -38863,7 +40642,7 @@ function EmptyMedia({
|
|
|
38863
40642
|
);
|
|
38864
40643
|
}
|
|
38865
40644
|
function EmptyTitle({ className, ...props }) {
|
|
38866
|
-
return /* @__PURE__ */
|
|
40645
|
+
return /* @__PURE__ */ jsx145(
|
|
38867
40646
|
"div",
|
|
38868
40647
|
{
|
|
38869
40648
|
"data-slot": "empty-title",
|
|
@@ -38873,7 +40652,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
38873
40652
|
);
|
|
38874
40653
|
}
|
|
38875
40654
|
function EmptyDescription({ className, ...props }) {
|
|
38876
|
-
return /* @__PURE__ */
|
|
40655
|
+
return /* @__PURE__ */ jsx145(
|
|
38877
40656
|
"div",
|
|
38878
40657
|
{
|
|
38879
40658
|
"data-slot": "empty-description",
|
|
@@ -38886,7 +40665,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
38886
40665
|
);
|
|
38887
40666
|
}
|
|
38888
40667
|
function EmptyContent({ className, ...props }) {
|
|
38889
|
-
return /* @__PURE__ */
|
|
40668
|
+
return /* @__PURE__ */ jsx145(
|
|
38890
40669
|
"div",
|
|
38891
40670
|
{
|
|
38892
40671
|
"data-slot": "empty-content",
|
|
@@ -38900,11 +40679,11 @@ function EmptyContent({ className, ...props }) {
|
|
|
38900
40679
|
}
|
|
38901
40680
|
|
|
38902
40681
|
// src/components/ui/field.tsx
|
|
38903
|
-
import { useMemo as
|
|
40682
|
+
import { useMemo as useMemo11 } from "react";
|
|
38904
40683
|
import { cva as cva10 } from "class-variance-authority";
|
|
38905
|
-
import { jsx as
|
|
40684
|
+
import { jsx as jsx146, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
38906
40685
|
function FieldSet({ className, ...props }) {
|
|
38907
|
-
return /* @__PURE__ */
|
|
40686
|
+
return /* @__PURE__ */ jsx146(
|
|
38908
40687
|
"fieldset",
|
|
38909
40688
|
{
|
|
38910
40689
|
"data-slot": "field-set",
|
|
@@ -38922,7 +40701,7 @@ function FieldLegend({
|
|
|
38922
40701
|
variant = "legend",
|
|
38923
40702
|
...props
|
|
38924
40703
|
}) {
|
|
38925
|
-
return /* @__PURE__ */
|
|
40704
|
+
return /* @__PURE__ */ jsx146(
|
|
38926
40705
|
"legend",
|
|
38927
40706
|
{
|
|
38928
40707
|
"data-slot": "field-legend",
|
|
@@ -38938,7 +40717,7 @@ function FieldLegend({
|
|
|
38938
40717
|
);
|
|
38939
40718
|
}
|
|
38940
40719
|
function FieldGroup({ className, ...props }) {
|
|
38941
|
-
return /* @__PURE__ */
|
|
40720
|
+
return /* @__PURE__ */ jsx146(
|
|
38942
40721
|
"div",
|
|
38943
40722
|
{
|
|
38944
40723
|
"data-slot": "field-group",
|
|
@@ -38978,7 +40757,7 @@ function Field({
|
|
|
38978
40757
|
orientation = "vertical",
|
|
38979
40758
|
...props
|
|
38980
40759
|
}) {
|
|
38981
|
-
return /* @__PURE__ */
|
|
40760
|
+
return /* @__PURE__ */ jsx146(
|
|
38982
40761
|
"div",
|
|
38983
40762
|
{
|
|
38984
40763
|
role: "group",
|
|
@@ -38990,7 +40769,7 @@ function Field({
|
|
|
38990
40769
|
);
|
|
38991
40770
|
}
|
|
38992
40771
|
function FieldContent({ className, ...props }) {
|
|
38993
|
-
return /* @__PURE__ */
|
|
40772
|
+
return /* @__PURE__ */ jsx146(
|
|
38994
40773
|
"div",
|
|
38995
40774
|
{
|
|
38996
40775
|
"data-slot": "field-content",
|
|
@@ -39006,7 +40785,7 @@ function FieldLabel({
|
|
|
39006
40785
|
className,
|
|
39007
40786
|
...props
|
|
39008
40787
|
}) {
|
|
39009
|
-
return /* @__PURE__ */
|
|
40788
|
+
return /* @__PURE__ */ jsx146(
|
|
39010
40789
|
Label,
|
|
39011
40790
|
{
|
|
39012
40791
|
"data-slot": "field-label",
|
|
@@ -39021,7 +40800,7 @@ function FieldLabel({
|
|
|
39021
40800
|
);
|
|
39022
40801
|
}
|
|
39023
40802
|
function FieldTitle({ className, ...props }) {
|
|
39024
|
-
return /* @__PURE__ */
|
|
40803
|
+
return /* @__PURE__ */ jsx146(
|
|
39025
40804
|
"div",
|
|
39026
40805
|
{
|
|
39027
40806
|
"data-slot": "field-label",
|
|
@@ -39034,7 +40813,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
39034
40813
|
);
|
|
39035
40814
|
}
|
|
39036
40815
|
function FieldDescription({ className, ...props }) {
|
|
39037
|
-
return /* @__PURE__ */
|
|
40816
|
+
return /* @__PURE__ */ jsx146(
|
|
39038
40817
|
"p",
|
|
39039
40818
|
{
|
|
39040
40819
|
"data-slot": "field-description",
|
|
@@ -39053,7 +40832,7 @@ function FieldSeparator({
|
|
|
39053
40832
|
className,
|
|
39054
40833
|
...props
|
|
39055
40834
|
}) {
|
|
39056
|
-
return /* @__PURE__ */
|
|
40835
|
+
return /* @__PURE__ */ jsxs102(
|
|
39057
40836
|
"div",
|
|
39058
40837
|
{
|
|
39059
40838
|
"data-slot": "field-separator",
|
|
@@ -39064,8 +40843,8 @@ function FieldSeparator({
|
|
|
39064
40843
|
),
|
|
39065
40844
|
...props,
|
|
39066
40845
|
children: [
|
|
39067
|
-
/* @__PURE__ */
|
|
39068
|
-
children && /* @__PURE__ */
|
|
40846
|
+
/* @__PURE__ */ jsx146(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
40847
|
+
children && /* @__PURE__ */ jsx146(
|
|
39069
40848
|
"span",
|
|
39070
40849
|
{
|
|
39071
40850
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -39083,7 +40862,7 @@ function FieldError({
|
|
|
39083
40862
|
errors,
|
|
39084
40863
|
...props
|
|
39085
40864
|
}) {
|
|
39086
|
-
const content =
|
|
40865
|
+
const content = useMemo11(() => {
|
|
39087
40866
|
if (children) {
|
|
39088
40867
|
return children;
|
|
39089
40868
|
}
|
|
@@ -39093,14 +40872,14 @@ function FieldError({
|
|
|
39093
40872
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
39094
40873
|
return errors[0].message;
|
|
39095
40874
|
}
|
|
39096
|
-
return /* @__PURE__ */
|
|
39097
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
40875
|
+
return /* @__PURE__ */ jsx146("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
40876
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx146("li", { children: error.message }, index)
|
|
39098
40877
|
) });
|
|
39099
40878
|
}, [children, errors]);
|
|
39100
40879
|
if (!content) {
|
|
39101
40880
|
return null;
|
|
39102
40881
|
}
|
|
39103
|
-
return /* @__PURE__ */
|
|
40882
|
+
return /* @__PURE__ */ jsx146(
|
|
39104
40883
|
"div",
|
|
39105
40884
|
{
|
|
39106
40885
|
role: "alert",
|
|
@@ -39114,9 +40893,9 @@ function FieldError({
|
|
|
39114
40893
|
|
|
39115
40894
|
// src/components/ui/input-group.tsx
|
|
39116
40895
|
import { cva as cva11 } from "class-variance-authority";
|
|
39117
|
-
import { jsx as
|
|
40896
|
+
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
39118
40897
|
function InputGroup({ className, ...props }) {
|
|
39119
|
-
return /* @__PURE__ */
|
|
40898
|
+
return /* @__PURE__ */ jsx147(
|
|
39120
40899
|
"div",
|
|
39121
40900
|
{
|
|
39122
40901
|
"data-slot": "input-group",
|
|
@@ -39160,7 +40939,7 @@ function InputGroupAddon({
|
|
|
39160
40939
|
align = "inline-start",
|
|
39161
40940
|
...props
|
|
39162
40941
|
}) {
|
|
39163
|
-
return /* @__PURE__ */
|
|
40942
|
+
return /* @__PURE__ */ jsx147(
|
|
39164
40943
|
"div",
|
|
39165
40944
|
{
|
|
39166
40945
|
role: "group",
|
|
@@ -39200,7 +40979,7 @@ function InputGroupButton({
|
|
|
39200
40979
|
size = "xs",
|
|
39201
40980
|
...props
|
|
39202
40981
|
}) {
|
|
39203
|
-
return /* @__PURE__ */
|
|
40982
|
+
return /* @__PURE__ */ jsx147(
|
|
39204
40983
|
Button,
|
|
39205
40984
|
{
|
|
39206
40985
|
type,
|
|
@@ -39212,7 +40991,7 @@ function InputGroupButton({
|
|
|
39212
40991
|
);
|
|
39213
40992
|
}
|
|
39214
40993
|
function InputGroupText({ className, ...props }) {
|
|
39215
|
-
return /* @__PURE__ */
|
|
40994
|
+
return /* @__PURE__ */ jsx147(
|
|
39216
40995
|
"span",
|
|
39217
40996
|
{
|
|
39218
40997
|
className: cn(
|
|
@@ -39227,7 +41006,7 @@ function InputGroupInput({
|
|
|
39227
41006
|
className,
|
|
39228
41007
|
...props
|
|
39229
41008
|
}) {
|
|
39230
|
-
return /* @__PURE__ */
|
|
41009
|
+
return /* @__PURE__ */ jsx147(
|
|
39231
41010
|
Input,
|
|
39232
41011
|
{
|
|
39233
41012
|
"data-slot": "input-group-control",
|
|
@@ -39243,7 +41022,7 @@ function InputGroupTextarea({
|
|
|
39243
41022
|
className,
|
|
39244
41023
|
...props
|
|
39245
41024
|
}) {
|
|
39246
|
-
return /* @__PURE__ */
|
|
41025
|
+
return /* @__PURE__ */ jsx147(
|
|
39247
41026
|
Textarea,
|
|
39248
41027
|
{
|
|
39249
41028
|
"data-slot": "input-group-control",
|
|
@@ -39259,9 +41038,9 @@ function InputGroupTextarea({
|
|
|
39259
41038
|
// src/components/ui/item.tsx
|
|
39260
41039
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
39261
41040
|
import { cva as cva12 } from "class-variance-authority";
|
|
39262
|
-
import { jsx as
|
|
41041
|
+
import { jsx as jsx148 } from "react/jsx-runtime";
|
|
39263
41042
|
function ItemGroup({ className, ...props }) {
|
|
39264
|
-
return /* @__PURE__ */
|
|
41043
|
+
return /* @__PURE__ */ jsx148(
|
|
39265
41044
|
"div",
|
|
39266
41045
|
{
|
|
39267
41046
|
role: "list",
|
|
@@ -39275,7 +41054,7 @@ function ItemSeparator({
|
|
|
39275
41054
|
className,
|
|
39276
41055
|
...props
|
|
39277
41056
|
}) {
|
|
39278
|
-
return /* @__PURE__ */
|
|
41057
|
+
return /* @__PURE__ */ jsx148(
|
|
39279
41058
|
Separator2,
|
|
39280
41059
|
{
|
|
39281
41060
|
"data-slot": "item-separator",
|
|
@@ -39313,7 +41092,7 @@ function Item8({
|
|
|
39313
41092
|
...props
|
|
39314
41093
|
}) {
|
|
39315
41094
|
const Comp = asChild ? Slot5 : "div";
|
|
39316
|
-
return /* @__PURE__ */
|
|
41095
|
+
return /* @__PURE__ */ jsx148(
|
|
39317
41096
|
Comp,
|
|
39318
41097
|
{
|
|
39319
41098
|
"data-slot": "item",
|
|
@@ -39344,7 +41123,7 @@ function ItemMedia({
|
|
|
39344
41123
|
variant = "default",
|
|
39345
41124
|
...props
|
|
39346
41125
|
}) {
|
|
39347
|
-
return /* @__PURE__ */
|
|
41126
|
+
return /* @__PURE__ */ jsx148(
|
|
39348
41127
|
"div",
|
|
39349
41128
|
{
|
|
39350
41129
|
"data-slot": "item-media",
|
|
@@ -39355,7 +41134,7 @@ function ItemMedia({
|
|
|
39355
41134
|
);
|
|
39356
41135
|
}
|
|
39357
41136
|
function ItemContent({ className, ...props }) {
|
|
39358
|
-
return /* @__PURE__ */
|
|
41137
|
+
return /* @__PURE__ */ jsx148(
|
|
39359
41138
|
"div",
|
|
39360
41139
|
{
|
|
39361
41140
|
"data-slot": "item-content",
|
|
@@ -39368,7 +41147,7 @@ function ItemContent({ className, ...props }) {
|
|
|
39368
41147
|
);
|
|
39369
41148
|
}
|
|
39370
41149
|
function ItemTitle({ className, ...props }) {
|
|
39371
|
-
return /* @__PURE__ */
|
|
41150
|
+
return /* @__PURE__ */ jsx148(
|
|
39372
41151
|
"div",
|
|
39373
41152
|
{
|
|
39374
41153
|
"data-slot": "item-title",
|
|
@@ -39381,7 +41160,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
39381
41160
|
);
|
|
39382
41161
|
}
|
|
39383
41162
|
function ItemDescription({ className, ...props }) {
|
|
39384
|
-
return /* @__PURE__ */
|
|
41163
|
+
return /* @__PURE__ */ jsx148(
|
|
39385
41164
|
"p",
|
|
39386
41165
|
{
|
|
39387
41166
|
"data-slot": "item-description",
|
|
@@ -39395,7 +41174,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
39395
41174
|
);
|
|
39396
41175
|
}
|
|
39397
41176
|
function ItemActions({ className, ...props }) {
|
|
39398
|
-
return /* @__PURE__ */
|
|
41177
|
+
return /* @__PURE__ */ jsx148(
|
|
39399
41178
|
"div",
|
|
39400
41179
|
{
|
|
39401
41180
|
"data-slot": "item-actions",
|
|
@@ -39405,7 +41184,7 @@ function ItemActions({ className, ...props }) {
|
|
|
39405
41184
|
);
|
|
39406
41185
|
}
|
|
39407
41186
|
function ItemHeader({ className, ...props }) {
|
|
39408
|
-
return /* @__PURE__ */
|
|
41187
|
+
return /* @__PURE__ */ jsx148(
|
|
39409
41188
|
"div",
|
|
39410
41189
|
{
|
|
39411
41190
|
"data-slot": "item-header",
|
|
@@ -39418,7 +41197,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
39418
41197
|
);
|
|
39419
41198
|
}
|
|
39420
41199
|
function ItemFooter({ className, ...props }) {
|
|
39421
|
-
return /* @__PURE__ */
|
|
41200
|
+
return /* @__PURE__ */ jsx148(
|
|
39422
41201
|
"div",
|
|
39423
41202
|
{
|
|
39424
41203
|
"data-slot": "item-footer",
|
|
@@ -39432,9 +41211,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
39432
41211
|
}
|
|
39433
41212
|
|
|
39434
41213
|
// src/components/ui/kbd.tsx
|
|
39435
|
-
import { jsx as
|
|
41214
|
+
import { jsx as jsx149 } from "react/jsx-runtime";
|
|
39436
41215
|
function Kbd({ className, ...props }) {
|
|
39437
|
-
return /* @__PURE__ */
|
|
41216
|
+
return /* @__PURE__ */ jsx149(
|
|
39438
41217
|
"kbd",
|
|
39439
41218
|
{
|
|
39440
41219
|
"data-slot": "kbd",
|
|
@@ -39449,7 +41228,7 @@ function Kbd({ className, ...props }) {
|
|
|
39449
41228
|
);
|
|
39450
41229
|
}
|
|
39451
41230
|
function KbdGroup({ className, ...props }) {
|
|
39452
|
-
return /* @__PURE__ */
|
|
41231
|
+
return /* @__PURE__ */ jsx149(
|
|
39453
41232
|
"kbd",
|
|
39454
41233
|
{
|
|
39455
41234
|
"data-slot": "kbd-group",
|
|
@@ -39482,7 +41261,7 @@ function useIsMobile() {
|
|
|
39482
41261
|
}
|
|
39483
41262
|
|
|
39484
41263
|
// src/components/ui/sidebar.tsx
|
|
39485
|
-
import { jsx as
|
|
41264
|
+
import { jsx as jsx150, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
39486
41265
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
39487
41266
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
39488
41267
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -39549,7 +41328,7 @@ var SidebarProvider = React100.forwardRef(
|
|
|
39549
41328
|
}),
|
|
39550
41329
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
39551
41330
|
);
|
|
39552
|
-
return /* @__PURE__ */
|
|
41331
|
+
return /* @__PURE__ */ jsx150(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx150(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx150(
|
|
39553
41332
|
"div",
|
|
39554
41333
|
{
|
|
39555
41334
|
style: {
|
|
@@ -39580,7 +41359,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39580
41359
|
}, ref) => {
|
|
39581
41360
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
39582
41361
|
if (collapsible === "none") {
|
|
39583
|
-
return /* @__PURE__ */
|
|
41362
|
+
return /* @__PURE__ */ jsx150(
|
|
39584
41363
|
"div",
|
|
39585
41364
|
{
|
|
39586
41365
|
className: cn(
|
|
@@ -39594,7 +41373,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39594
41373
|
);
|
|
39595
41374
|
}
|
|
39596
41375
|
if (isMobile) {
|
|
39597
|
-
return /* @__PURE__ */
|
|
41376
|
+
return /* @__PURE__ */ jsx150(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs103(
|
|
39598
41377
|
SheetContent,
|
|
39599
41378
|
{
|
|
39600
41379
|
"data-sidebar": "sidebar",
|
|
@@ -39605,16 +41384,16 @@ var Sidebar = React100.forwardRef(
|
|
|
39605
41384
|
},
|
|
39606
41385
|
side,
|
|
39607
41386
|
children: [
|
|
39608
|
-
/* @__PURE__ */
|
|
39609
|
-
/* @__PURE__ */
|
|
39610
|
-
/* @__PURE__ */
|
|
41387
|
+
/* @__PURE__ */ jsxs103(SheetHeader, { className: "sr-only", children: [
|
|
41388
|
+
/* @__PURE__ */ jsx150(SheetTitle, { children: "Sidebar" }),
|
|
41389
|
+
/* @__PURE__ */ jsx150(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
39611
41390
|
] }),
|
|
39612
|
-
/* @__PURE__ */
|
|
41391
|
+
/* @__PURE__ */ jsx150("div", { className: "flex h-full w-full flex-col", children })
|
|
39613
41392
|
]
|
|
39614
41393
|
}
|
|
39615
41394
|
) });
|
|
39616
41395
|
}
|
|
39617
|
-
return /* @__PURE__ */
|
|
41396
|
+
return /* @__PURE__ */ jsxs103(
|
|
39618
41397
|
"div",
|
|
39619
41398
|
{
|
|
39620
41399
|
ref,
|
|
@@ -39624,7 +41403,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39624
41403
|
"data-variant": variant,
|
|
39625
41404
|
"data-side": side,
|
|
39626
41405
|
children: [
|
|
39627
|
-
/* @__PURE__ */
|
|
41406
|
+
/* @__PURE__ */ jsx150(
|
|
39628
41407
|
"div",
|
|
39629
41408
|
{
|
|
39630
41409
|
className: cn(
|
|
@@ -39635,7 +41414,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39635
41414
|
)
|
|
39636
41415
|
}
|
|
39637
41416
|
),
|
|
39638
|
-
/* @__PURE__ */
|
|
41417
|
+
/* @__PURE__ */ jsx150(
|
|
39639
41418
|
"div",
|
|
39640
41419
|
{
|
|
39641
41420
|
className: cn(
|
|
@@ -39646,7 +41425,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39646
41425
|
className
|
|
39647
41426
|
),
|
|
39648
41427
|
...props,
|
|
39649
|
-
children: /* @__PURE__ */
|
|
41428
|
+
children: /* @__PURE__ */ jsx150(
|
|
39650
41429
|
"div",
|
|
39651
41430
|
{
|
|
39652
41431
|
"data-sidebar": "sidebar",
|
|
@@ -39664,7 +41443,7 @@ var Sidebar = React100.forwardRef(
|
|
|
39664
41443
|
Sidebar.displayName = "Sidebar";
|
|
39665
41444
|
var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
39666
41445
|
const { toggleSidebar } = useSidebar();
|
|
39667
|
-
return /* @__PURE__ */
|
|
41446
|
+
return /* @__PURE__ */ jsxs103(
|
|
39668
41447
|
Button,
|
|
39669
41448
|
{
|
|
39670
41449
|
ref,
|
|
@@ -39678,8 +41457,8 @@ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
39678
41457
|
},
|
|
39679
41458
|
...props,
|
|
39680
41459
|
children: [
|
|
39681
|
-
/* @__PURE__ */
|
|
39682
|
-
/* @__PURE__ */
|
|
41460
|
+
/* @__PURE__ */ jsx150(PanelLeft, {}),
|
|
41461
|
+
/* @__PURE__ */ jsx150("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
39683
41462
|
]
|
|
39684
41463
|
}
|
|
39685
41464
|
);
|
|
@@ -39687,7 +41466,7 @@ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
39687
41466
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
39688
41467
|
var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39689
41468
|
const { toggleSidebar } = useSidebar();
|
|
39690
|
-
return /* @__PURE__ */
|
|
41469
|
+
return /* @__PURE__ */ jsx150(
|
|
39691
41470
|
"button",
|
|
39692
41471
|
{
|
|
39693
41472
|
ref,
|
|
@@ -39711,7 +41490,7 @@ var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39711
41490
|
});
|
|
39712
41491
|
SidebarRail.displayName = "SidebarRail";
|
|
39713
41492
|
var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39714
|
-
return /* @__PURE__ */
|
|
41493
|
+
return /* @__PURE__ */ jsx150(
|
|
39715
41494
|
"main",
|
|
39716
41495
|
{
|
|
39717
41496
|
ref,
|
|
@@ -39726,7 +41505,7 @@ var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39726
41505
|
});
|
|
39727
41506
|
SidebarInset.displayName = "SidebarInset";
|
|
39728
41507
|
var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39729
|
-
return /* @__PURE__ */
|
|
41508
|
+
return /* @__PURE__ */ jsx150(
|
|
39730
41509
|
Input,
|
|
39731
41510
|
{
|
|
39732
41511
|
ref,
|
|
@@ -39741,7 +41520,7 @@ var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39741
41520
|
});
|
|
39742
41521
|
SidebarInput.displayName = "SidebarInput";
|
|
39743
41522
|
var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39744
|
-
return /* @__PURE__ */
|
|
41523
|
+
return /* @__PURE__ */ jsx150(
|
|
39745
41524
|
"div",
|
|
39746
41525
|
{
|
|
39747
41526
|
ref,
|
|
@@ -39753,7 +41532,7 @@ var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39753
41532
|
});
|
|
39754
41533
|
SidebarHeader.displayName = "SidebarHeader";
|
|
39755
41534
|
var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39756
|
-
return /* @__PURE__ */
|
|
41535
|
+
return /* @__PURE__ */ jsx150(
|
|
39757
41536
|
"div",
|
|
39758
41537
|
{
|
|
39759
41538
|
ref,
|
|
@@ -39765,7 +41544,7 @@ var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39765
41544
|
});
|
|
39766
41545
|
SidebarFooter.displayName = "SidebarFooter";
|
|
39767
41546
|
var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39768
|
-
return /* @__PURE__ */
|
|
41547
|
+
return /* @__PURE__ */ jsx150(
|
|
39769
41548
|
Separator2,
|
|
39770
41549
|
{
|
|
39771
41550
|
ref,
|
|
@@ -39777,7 +41556,7 @@ var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39777
41556
|
});
|
|
39778
41557
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
39779
41558
|
var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39780
|
-
return /* @__PURE__ */
|
|
41559
|
+
return /* @__PURE__ */ jsx150(
|
|
39781
41560
|
"div",
|
|
39782
41561
|
{
|
|
39783
41562
|
ref,
|
|
@@ -39792,7 +41571,7 @@ var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39792
41571
|
});
|
|
39793
41572
|
SidebarContent.displayName = "SidebarContent";
|
|
39794
41573
|
var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
|
|
39795
|
-
return /* @__PURE__ */
|
|
41574
|
+
return /* @__PURE__ */ jsx150(
|
|
39796
41575
|
"div",
|
|
39797
41576
|
{
|
|
39798
41577
|
ref,
|
|
@@ -39805,7 +41584,7 @@ var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
|
|
|
39805
41584
|
SidebarGroup.displayName = "SidebarGroup";
|
|
39806
41585
|
var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
39807
41586
|
const Comp = asChild ? Slot6 : "div";
|
|
39808
|
-
return /* @__PURE__ */
|
|
41587
|
+
return /* @__PURE__ */ jsx150(
|
|
39809
41588
|
Comp,
|
|
39810
41589
|
{
|
|
39811
41590
|
ref,
|
|
@@ -39822,7 +41601,7 @@ var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...pr
|
|
|
39822
41601
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
39823
41602
|
var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
39824
41603
|
const Comp = asChild ? Slot6 : "button";
|
|
39825
|
-
return /* @__PURE__ */
|
|
41604
|
+
return /* @__PURE__ */ jsx150(
|
|
39826
41605
|
Comp,
|
|
39827
41606
|
{
|
|
39828
41607
|
ref,
|
|
@@ -39839,7 +41618,7 @@ var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...p
|
|
|
39839
41618
|
);
|
|
39840
41619
|
});
|
|
39841
41620
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
39842
|
-
var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41621
|
+
var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
39843
41622
|
"div",
|
|
39844
41623
|
{
|
|
39845
41624
|
ref,
|
|
@@ -39849,7 +41628,7 @@ var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) =>
|
|
|
39849
41628
|
}
|
|
39850
41629
|
));
|
|
39851
41630
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
39852
|
-
var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41631
|
+
var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
39853
41632
|
"ul",
|
|
39854
41633
|
{
|
|
39855
41634
|
ref,
|
|
@@ -39859,7 +41638,7 @@ var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
39859
41638
|
}
|
|
39860
41639
|
));
|
|
39861
41640
|
SidebarMenu.displayName = "SidebarMenu";
|
|
39862
|
-
var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41641
|
+
var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
39863
41642
|
"li",
|
|
39864
41643
|
{
|
|
39865
41644
|
ref,
|
|
@@ -39901,7 +41680,7 @@ var SidebarMenuButton = React100.forwardRef(
|
|
|
39901
41680
|
}, ref) => {
|
|
39902
41681
|
const Comp = asChild ? Slot6 : "button";
|
|
39903
41682
|
const { isMobile, state } = useSidebar();
|
|
39904
|
-
const button = /* @__PURE__ */
|
|
41683
|
+
const button = /* @__PURE__ */ jsx150(
|
|
39905
41684
|
Comp,
|
|
39906
41685
|
{
|
|
39907
41686
|
ref,
|
|
@@ -39920,9 +41699,9 @@ var SidebarMenuButton = React100.forwardRef(
|
|
|
39920
41699
|
children: tooltip
|
|
39921
41700
|
};
|
|
39922
41701
|
}
|
|
39923
|
-
return /* @__PURE__ */
|
|
39924
|
-
/* @__PURE__ */
|
|
39925
|
-
/* @__PURE__ */
|
|
41702
|
+
return /* @__PURE__ */ jsxs103(Tooltip, { children: [
|
|
41703
|
+
/* @__PURE__ */ jsx150(TooltipTrigger, { asChild: true, children: button }),
|
|
41704
|
+
/* @__PURE__ */ jsx150(
|
|
39926
41705
|
TooltipContent,
|
|
39927
41706
|
{
|
|
39928
41707
|
side: "right",
|
|
@@ -39937,7 +41716,7 @@ var SidebarMenuButton = React100.forwardRef(
|
|
|
39937
41716
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
39938
41717
|
var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
39939
41718
|
const Comp = asChild ? Slot6 : "button";
|
|
39940
|
-
return /* @__PURE__ */
|
|
41719
|
+
return /* @__PURE__ */ jsx150(
|
|
39941
41720
|
Comp,
|
|
39942
41721
|
{
|
|
39943
41722
|
ref,
|
|
@@ -39958,7 +41737,7 @@ var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showO
|
|
|
39958
41737
|
);
|
|
39959
41738
|
});
|
|
39960
41739
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
39961
|
-
var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41740
|
+
var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
39962
41741
|
"div",
|
|
39963
41742
|
{
|
|
39964
41743
|
ref,
|
|
@@ -39980,7 +41759,7 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
|
|
|
39980
41759
|
const width = React100.useMemo(() => {
|
|
39981
41760
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
39982
41761
|
}, []);
|
|
39983
|
-
return /* @__PURE__ */
|
|
41762
|
+
return /* @__PURE__ */ jsxs103(
|
|
39984
41763
|
"div",
|
|
39985
41764
|
{
|
|
39986
41765
|
ref,
|
|
@@ -39988,14 +41767,14 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
|
|
|
39988
41767
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
39989
41768
|
...props,
|
|
39990
41769
|
children: [
|
|
39991
|
-
showIcon && /* @__PURE__ */
|
|
41770
|
+
showIcon && /* @__PURE__ */ jsx150(
|
|
39992
41771
|
Skeleton,
|
|
39993
41772
|
{
|
|
39994
41773
|
className: "size-4 rounded-md",
|
|
39995
41774
|
"data-sidebar": "menu-skeleton-icon"
|
|
39996
41775
|
}
|
|
39997
41776
|
),
|
|
39998
|
-
/* @__PURE__ */
|
|
41777
|
+
/* @__PURE__ */ jsx150(
|
|
39999
41778
|
Skeleton,
|
|
40000
41779
|
{
|
|
40001
41780
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -40010,7 +41789,7 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
|
|
|
40010
41789
|
);
|
|
40011
41790
|
});
|
|
40012
41791
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
40013
|
-
var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
41792
|
+
var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx150(
|
|
40014
41793
|
"ul",
|
|
40015
41794
|
{
|
|
40016
41795
|
ref,
|
|
@@ -40024,11 +41803,11 @@ var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
40024
41803
|
}
|
|
40025
41804
|
));
|
|
40026
41805
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
40027
|
-
var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */
|
|
41806
|
+
var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx150("li", { ref, ...props }));
|
|
40028
41807
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
40029
41808
|
var SidebarMenuSubButton = React100.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
40030
41809
|
const Comp = asChild ? Slot6 : "a";
|
|
40031
|
-
return /* @__PURE__ */
|
|
41810
|
+
return /* @__PURE__ */ jsx150(
|
|
40032
41811
|
Comp,
|
|
40033
41812
|
{
|
|
40034
41813
|
ref,
|
|
@@ -40052,20 +41831,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
40052
41831
|
// src/components/ui/sonner.tsx
|
|
40053
41832
|
import { useTheme } from "next-themes";
|
|
40054
41833
|
import { Toaster as Sonner } from "sonner";
|
|
40055
|
-
import { jsx as
|
|
41834
|
+
import { jsx as jsx151 } from "react/jsx-runtime";
|
|
40056
41835
|
var Toaster = ({ ...props }) => {
|
|
40057
41836
|
const { theme = "system" } = useTheme();
|
|
40058
|
-
return /* @__PURE__ */
|
|
41837
|
+
return /* @__PURE__ */ jsx151(
|
|
40059
41838
|
Sonner,
|
|
40060
41839
|
{
|
|
40061
41840
|
theme,
|
|
40062
41841
|
className: "toaster group",
|
|
40063
41842
|
icons: {
|
|
40064
|
-
success: /* @__PURE__ */
|
|
40065
|
-
info: /* @__PURE__ */
|
|
40066
|
-
warning: /* @__PURE__ */
|
|
40067
|
-
error: /* @__PURE__ */
|
|
40068
|
-
loading: /* @__PURE__ */
|
|
41843
|
+
success: /* @__PURE__ */ jsx151(CircleCheck, { className: "h-4 w-4" }),
|
|
41844
|
+
info: /* @__PURE__ */ jsx151(Info, { className: "h-4 w-4" }),
|
|
41845
|
+
warning: /* @__PURE__ */ jsx151(TriangleAlert, { className: "h-4 w-4" }),
|
|
41846
|
+
error: /* @__PURE__ */ jsx151(OctagonX, { className: "h-4 w-4" }),
|
|
41847
|
+
loading: /* @__PURE__ */ jsx151(LoaderCircle, { className: "h-4 w-4 animate-spin" })
|
|
40069
41848
|
},
|
|
40070
41849
|
toastOptions: {
|
|
40071
41850
|
classNames: {
|
|
@@ -40083,24 +41862,24 @@ var Toaster = ({ ...props }) => {
|
|
|
40083
41862
|
// src/components/ui/toggle-group.tsx
|
|
40084
41863
|
import * as React101 from "react";
|
|
40085
41864
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
40086
|
-
import { jsx as
|
|
41865
|
+
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
40087
41866
|
var ToggleGroupContext = React101.createContext({
|
|
40088
41867
|
size: "default",
|
|
40089
41868
|
variant: "default"
|
|
40090
41869
|
});
|
|
40091
|
-
var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */
|
|
41870
|
+
var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx152(
|
|
40092
41871
|
ToggleGroupPrimitive.Root,
|
|
40093
41872
|
{
|
|
40094
41873
|
ref,
|
|
40095
41874
|
className: cn("flex items-center justify-center gap-1", className),
|
|
40096
41875
|
...props,
|
|
40097
|
-
children: /* @__PURE__ */
|
|
41876
|
+
children: /* @__PURE__ */ jsx152(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
40098
41877
|
}
|
|
40099
41878
|
));
|
|
40100
41879
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
40101
41880
|
var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
40102
41881
|
const context = React101.useContext(ToggleGroupContext);
|
|
40103
|
-
return /* @__PURE__ */
|
|
41882
|
+
return /* @__PURE__ */ jsx152(
|
|
40104
41883
|
ToggleGroupPrimitive.Item,
|
|
40105
41884
|
{
|
|
40106
41885
|
ref,
|
|
@@ -40119,7 +41898,7 @@ var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size,
|
|
|
40119
41898
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
40120
41899
|
|
|
40121
41900
|
// src/render/PXEngineRenderer.tsx
|
|
40122
|
-
import { jsx as
|
|
41901
|
+
import { jsx as jsx153, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
40123
41902
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
40124
41903
|
// Form components - require FormField + FormItem context
|
|
40125
41904
|
"FormLabel",
|
|
@@ -40211,24 +41990,24 @@ var COMPONENT_SUGGESTIONS = {
|
|
|
40211
41990
|
};
|
|
40212
41991
|
var renderContextDependentError = (componentName, normalizedName, key) => {
|
|
40213
41992
|
const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
|
|
40214
|
-
return /* @__PURE__ */
|
|
41993
|
+
return /* @__PURE__ */ jsxs104(
|
|
40215
41994
|
"div",
|
|
40216
41995
|
{
|
|
40217
41996
|
className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
|
|
40218
41997
|
children: [
|
|
40219
|
-
/* @__PURE__ */
|
|
40220
|
-
/* @__PURE__ */
|
|
40221
|
-
/* @__PURE__ */
|
|
40222
|
-
/* @__PURE__ */
|
|
41998
|
+
/* @__PURE__ */ jsxs104("div", { className: "flex items-start gap-2", children: [
|
|
41999
|
+
/* @__PURE__ */ jsx153("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
|
|
42000
|
+
/* @__PURE__ */ jsxs104("div", { className: "flex-1", children: [
|
|
42001
|
+
/* @__PURE__ */ jsxs104("p", { className: "text-sm font-semibold text-amber-900", children: [
|
|
40223
42002
|
"Invalid Component: ",
|
|
40224
42003
|
componentName
|
|
40225
42004
|
] }),
|
|
40226
|
-
/* @__PURE__ */
|
|
42005
|
+
/* @__PURE__ */ jsx153("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
|
|
40227
42006
|
] })
|
|
40228
42007
|
] }),
|
|
40229
|
-
/* @__PURE__ */
|
|
40230
|
-
/* @__PURE__ */
|
|
40231
|
-
/* @__PURE__ */
|
|
42008
|
+
/* @__PURE__ */ jsxs104("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
|
|
42009
|
+
/* @__PURE__ */ jsx153("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
|
|
42010
|
+
/* @__PURE__ */ jsx153("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
|
|
40232
42011
|
] })
|
|
40233
42012
|
]
|
|
40234
42013
|
},
|
|
@@ -40387,7 +42166,7 @@ var PXEngineRenderer = ({
|
|
|
40387
42166
|
const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
|
|
40388
42167
|
const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
|
|
40389
42168
|
if (isAtomWithRenderProp) {
|
|
40390
|
-
return /* @__PURE__ */
|
|
42169
|
+
return /* @__PURE__ */ jsx153(
|
|
40391
42170
|
TargetComponent,
|
|
40392
42171
|
{
|
|
40393
42172
|
...finalProps,
|
|
@@ -40399,7 +42178,7 @@ var PXEngineRenderer = ({
|
|
|
40399
42178
|
uniqueKey
|
|
40400
42179
|
);
|
|
40401
42180
|
} else {
|
|
40402
|
-
return /* @__PURE__ */
|
|
42181
|
+
return /* @__PURE__ */ jsx153(
|
|
40403
42182
|
TargetComponent,
|
|
40404
42183
|
{
|
|
40405
42184
|
...finalProps,
|
|
@@ -40411,7 +42190,7 @@ var PXEngineRenderer = ({
|
|
|
40411
42190
|
);
|
|
40412
42191
|
}
|
|
40413
42192
|
};
|
|
40414
|
-
return /* @__PURE__ */
|
|
42193
|
+
return /* @__PURE__ */ jsx153("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
|
|
40415
42194
|
};
|
|
40416
42195
|
export {
|
|
40417
42196
|
Accordion,
|
|
@@ -40506,6 +42285,7 @@ export {
|
|
|
40506
42285
|
CountrySelectEdit,
|
|
40507
42286
|
CreatorActionHeader,
|
|
40508
42287
|
CreatorCompactView,
|
|
42288
|
+
CreatorExpandedPanel,
|
|
40509
42289
|
CreatorGridCard,
|
|
40510
42290
|
CreatorImageList,
|
|
40511
42291
|
CreatorProfileSummary,
|
|
@@ -40691,6 +42471,8 @@ export {
|
|
|
40691
42471
|
VideoAtom,
|
|
40692
42472
|
WorkflowVisualizer,
|
|
40693
42473
|
cn,
|
|
42474
|
+
defaultFetchSelections,
|
|
42475
|
+
defaultPersistSelection,
|
|
40694
42476
|
generateFieldsFromData,
|
|
40695
42477
|
generateFieldsFromPropDefinitions,
|
|
40696
42478
|
useCreatorWidgetPolling
|