@burdenoff/microfe-headshotmarketing 2026.1205.1 → 2026.1206.1

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.
Files changed (144) hide show
  1. package/dist/generated/global-types.d.ts +3589 -380
  2. package/dist/generated/wspace-operations.d.ts +101 -3
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/generated/wspace-types.d.ts +61782 -2332
  5. package/dist/generated/wspace-types.js.map +1 -1
  6. package/dist/headshotmarketing/components/EntityTagPicker.js +29 -28
  7. package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -1
  8. package/dist/headshotmarketing/components/InfluencerModals.js +264 -263
  9. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
  10. package/dist/headshotmarketing/components/QueryStateBoundary.js +31 -22
  11. package/dist/headshotmarketing/components/QueryStateBoundary.js.map +1 -1
  12. package/dist/headshotmarketing/components/StatusBadge.js +1 -1
  13. package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
  14. package/dist/headshotmarketing/components/Toast.js +3 -3
  15. package/dist/headshotmarketing/components/Toast.js.map +1 -1
  16. package/dist/headshotmarketing/components/TrackedLinksPanel.js +97 -96
  17. package/dist/headshotmarketing/components/TrackedLinksPanel.js.map +1 -1
  18. package/dist/headshotmarketing/hooks/useAssetUpload.js +41 -40
  19. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
  20. package/dist/headshotmarketing/pages/HomePage.js +6 -6
  21. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  22. package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js +47 -46
  23. package/dist/headshotmarketing/pages/ads/AdBudgetAiPanel.js.map +1 -1
  24. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +66 -65
  25. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  26. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +273 -272
  27. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  28. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js +3 -3
  29. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js.map +1 -1
  30. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +125 -124
  31. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  32. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js +33 -32
  33. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js.map +1 -1
  34. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js +108 -107
  35. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js.map +1 -1
  36. package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js +65 -60
  37. package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js.map +1 -1
  38. package/dist/headshotmarketing/pages/ads/AdsPage.js +4 -4
  39. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  40. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +287 -286
  41. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  42. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +59 -54
  43. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  44. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +96 -95
  45. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -1
  46. package/dist/headshotmarketing/pages/ai/AiDecisionCard.js +5 -5
  47. package/dist/headshotmarketing/pages/ai/AiDecisionCard.js.map +1 -1
  48. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js +179 -178
  49. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js.map +1 -1
  50. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js +156 -151
  51. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js.map +1 -1
  52. package/dist/headshotmarketing/pages/analytics/ReportsPage.js +222 -217
  53. package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
  54. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +59 -58
  55. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -1
  56. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +152 -151
  57. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -1
  58. package/dist/headshotmarketing/pages/automation/AutomationPage.js +34 -33
  59. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  60. package/dist/headshotmarketing/pages/automation/TriggersPage.js +6 -6
  61. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  62. package/dist/headshotmarketing/pages/automation/WorkflowActions.js +1 -1
  63. package/dist/headshotmarketing/pages/automation/WorkflowActions.js.map +1 -1
  64. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +235 -234
  65. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  66. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +24 -23
  67. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -1
  68. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +1 -1
  69. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  70. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js +4 -4
  71. package/dist/headshotmarketing/pages/automation/workflowBuilderModel.js.map +1 -1
  72. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +339 -338
  73. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  74. package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js +95 -94
  75. package/dist/headshotmarketing/pages/campaigns/CampaignAiPanel.js.map +1 -1
  76. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +82 -81
  77. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  78. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +107 -106
  79. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  80. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +104 -103
  81. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  82. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +262 -261
  83. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  84. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js +68 -67
  85. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js.map +1 -1
  86. package/dist/headshotmarketing/pages/content/AIToolsPage.js +204 -203
  87. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  88. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +177 -176
  89. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  90. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +373 -372
  91. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  92. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +1 -1
  93. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  94. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +4 -4
  95. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
  96. package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js +51 -50
  97. package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js.map +1 -1
  98. package/dist/headshotmarketing/pages/crm/CreateContactPage.js +100 -99
  99. package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
  100. package/dist/headshotmarketing/pages/crm/CreateDealPage.js +134 -133
  101. package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
  102. package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js +66 -65
  103. package/dist/headshotmarketing/pages/crm/CreatePipelineModal.js.map +1 -1
  104. package/dist/headshotmarketing/pages/crm/CrmActions.js +229 -228
  105. package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -1
  106. package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js +62 -61
  107. package/dist/headshotmarketing/pages/crm/DealNextActionPanel.js.map +1 -1
  108. package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js +126 -125
  109. package/dist/headshotmarketing/pages/crm/LeadAiDecisionPanel.js.map +1 -1
  110. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +93 -92
  111. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
  112. package/dist/headshotmarketing/pages/crm/PipelinePage.js +5 -5
  113. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  114. package/dist/headshotmarketing/pages/events/CreateEventPage.js +127 -126
  115. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  116. package/dist/headshotmarketing/pages/events/EventDetailsPage.js +76 -75
  117. package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
  118. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +8 -8
  119. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  120. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +4 -4
  121. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  122. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +4 -4
  123. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
  124. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +1 -1
  125. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -1
  126. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +104 -103
  127. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  128. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +102 -101
  129. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  130. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +59 -58
  131. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -1
  132. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +1 -1
  133. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
  134. package/dist/headshotmarketing/pages/social-media/PostsPage.js +103 -102
  135. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  136. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +123 -122
  137. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  138. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +4 -4
  139. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  140. package/dist/headshotmarketing/utils/index.d.ts +1 -0
  141. package/dist/headshotmarketing/utils/readableError.d.ts +16 -0
  142. package/dist/headshotmarketing/utils/readableError.js +12 -0
  143. package/dist/headshotmarketing/utils/readableError.js.map +1 -0
  144. package/package.json +5 -3
@@ -4,21 +4,22 @@ import { useHeadshotMarketing as t } from "../../context/HeadshotMarketingContex
4
4
  import { cn as n, formatDate as r, formatNumber as i } from "../../utils/helpers.js";
5
5
  import { PageLayout as a } from "../../components/PageLayout.js";
6
6
  import { EmptyState as o } from "../../components/EmptyState.js";
7
- import { QueryStateBoundary as s } from "../../components/QueryStateBoundary.js";
8
- import { HeadshotmarketingAiToolCategory as c, HeadshotmarketingContentItemType as l } from "../../../generated/wspace-types.js";
9
- import { useHeadshotmarketingCreateContentItemMutation as ee } from "../../../generated/wspace-operations.js";
10
- import { AIExecutionLedger as te } from "./AIExecutionLedger.js";
11
- import { ContentSubNav as ne } from "./ContentSubNav.js";
12
- import { toResultStrings as u } from "../../utils/aiToolOutput.js";
13
- import { useEffect as re, useMemo as d, useState as f } from "react";
14
- import { Check as p, Clock as ie, Copy as ae, Cpu as oe, FilePlus2 as m, GitBranch as h, Image as g, Languages as _, Loader2 as v, Mail as y, Megaphone as b, MessageSquare as x, Mic as se, PenTool as S, ScanText as C, Search as w, Send as ce, Sparkles as T, Video as E, Wand2 as le, Zap as ue } from "lucide-react";
15
- import { useCopyToClipboard as de } from "@burdenoff/fe-libs/shared/hooks";
16
- import { gql as D } from "@apollo/client";
17
- import { useMutation as fe } from "@apollo/client/react";
18
- import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
19
- import { GlassCard as pe, PagePurpose as me, Select as he, SelectContent as ge, SelectItem as _e, SelectTrigger as ve, SelectValue as ye, Textarea as be } from "@burdenoff/fe-libs/ui";
7
+ import { HeadshotmarketingAiToolCategory as s, HeadshotmarketingContentItemType as c } from "../../../generated/wspace-types.js";
8
+ import { QueryStateBoundary as ee } from "../../components/QueryStateBoundary.js";
9
+ import { useHeadshotmarketingCreateContentItemMutation as te } from "../../../generated/wspace-operations.js";
10
+ import { AIExecutionLedger as ne } from "./AIExecutionLedger.js";
11
+ import { ContentSubNav as re } from "./ContentSubNav.js";
12
+ import { toResultStrings as l } from "../../utils/aiToolOutput.js";
13
+ import { readableError as ie } from "../../utils/readableError.js";
14
+ import { useEffect as ae, useMemo as u, useState as d } from "react";
15
+ import { Check as f, Clock as oe, Copy as se, Cpu as ce, FilePlus2 as p, GitBranch as m, Image as h, Languages as g, Loader2 as _, Mail as v, Megaphone as y, MessageSquare as b, Mic as le, PenTool as x, ScanText as S, Search as C, Send as ue, Sparkles as w, Video as T, Wand2 as de, Zap as fe } from "lucide-react";
16
+ import { useCopyToClipboard as pe } from "@burdenoff/fe-libs/shared/hooks";
17
+ import { gql as E } from "@apollo/client";
18
+ import { useMutation as me } from "@apollo/client/react";
19
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
20
+ import { GlassCard as A, PagePurpose as he, Select as ge, SelectContent as _e, SelectItem as ve, SelectTrigger as ye, SelectValue as be, Textarea as xe } from "@burdenoff/fe-libs/ui";
20
21
  // src/headshotmarketing/pages/content/AIToolsPage.tsx
21
- var xe = D`
22
+ var Se = E`
22
23
  mutation HeadshotmarketingExecuteAITool(
23
24
  $input: HeadshotmarketingExecuteAIToolInput!
24
25
  ) {
@@ -34,59 +35,59 @@ var xe = D`
34
35
  }
35
36
  }
36
37
  `, j = {
37
- [c.ContentGeneration]: S,
38
- [c.Copywriting]: b,
39
- [c.ImageGeneration]: g,
40
- [c.SeoOptimization]: w,
41
- [c.Summarization]: C,
42
- [c.Translation]: _,
43
- [c.VideoGeneration]: E,
44
- [c.Other]: T
45
- }, Se = {
46
- [c.ContentGeneration]: "Content",
47
- [c.Copywriting]: "Copywriting",
48
- [c.ImageGeneration]: "Image",
49
- [c.SeoOptimization]: "SEO",
50
- [c.Summarization]: "Summarize",
51
- [c.Translation]: "Translation",
52
- [c.VideoGeneration]: "Video",
53
- [c.Other]: "AI"
38
+ [s.ContentGeneration]: x,
39
+ [s.Copywriting]: y,
40
+ [s.ImageGeneration]: h,
41
+ [s.SeoOptimization]: C,
42
+ [s.Summarization]: S,
43
+ [s.Translation]: g,
44
+ [s.VideoGeneration]: T,
45
+ [s.Other]: w
46
+ }, Ce = {
47
+ [s.ContentGeneration]: "Content",
48
+ [s.Copywriting]: "Copywriting",
49
+ [s.ImageGeneration]: "Image",
50
+ [s.SeoOptimization]: "SEO",
51
+ [s.Summarization]: "Summarize",
52
+ [s.Translation]: "Translation",
53
+ [s.VideoGeneration]: "Video",
54
+ [s.Other]: "AI"
54
55
  };
55
- function Ce(e, t) {
56
+ function we(e, t) {
56
57
  let n = e.toLowerCase();
57
- return n.includes("blog") ? S : n.includes("subject line") || n.includes("email") ? y : n.includes("caption") || n.includes("social") ? x : n.includes("ad copy") || n.includes("ad ") || n.includes("advert") ? b : n.includes("seo") || n.includes("meta") || n.includes("keyword") ? w : n.includes("alt") || n.includes("image") || n.includes("photo") ? g : n.includes("repurpose") || n.includes("remix") ? h : n.includes("voice") || n.includes("tone") ? se : n.includes("translat") ? _ : n.includes("summar") ? C : n.includes("video") || n.includes("script") ? E : j[t] ?? T;
58
+ return n.includes("blog") ? x : n.includes("subject line") || n.includes("email") ? v : n.includes("caption") || n.includes("social") ? b : n.includes("ad copy") || n.includes("ad ") || n.includes("advert") ? y : n.includes("seo") || n.includes("meta") || n.includes("keyword") ? C : n.includes("alt") || n.includes("image") || n.includes("photo") ? h : n.includes("repurpose") || n.includes("remix") ? m : n.includes("voice") || n.includes("tone") ? le : n.includes("translat") ? g : n.includes("summar") ? S : n.includes("video") || n.includes("script") ? T : j[t] ?? w;
58
59
  }
59
- function we(e, t) {
60
+ function Te(e, t) {
60
61
  let n = e.toLowerCase();
61
- if (n.includes("blog")) return l.BlogPost;
62
- if (n.includes("caption") || n.includes("social")) return l.SocialPost;
63
- if (n.includes("email") || n.includes("subject line")) return l.Email;
64
- if (n.includes("ad")) return l.AdCopy;
65
- if (n.includes("video") || n.includes("script")) return l.VideoScript;
62
+ if (n.includes("blog")) return c.BlogPost;
63
+ if (n.includes("caption") || n.includes("social")) return c.SocialPost;
64
+ if (n.includes("email") || n.includes("subject line")) return c.Email;
65
+ if (n.includes("ad")) return c.AdCopy;
66
+ if (n.includes("video") || n.includes("script")) return c.VideoScript;
66
67
  switch (t) {
67
- case c.ContentGeneration: return l.BlogPost;
68
- case c.Copywriting: return l.AdCopy;
69
- case c.VideoGeneration: return l.VideoScript;
70
- default: return l.Other;
68
+ case s.ContentGeneration: return c.BlogPost;
69
+ case s.Copywriting: return c.AdCopy;
70
+ case s.VideoGeneration: return c.VideoScript;
71
+ default: return c.Other;
71
72
  }
72
73
  }
73
- function Te(e, t) {
74
+ function Ee(e, t) {
74
75
  let n = e.split("\n").find((e) => e.trim())?.trim() ?? "";
75
76
  return (n.length > 64 ? `${n.slice(0, 61)}…` : n) || `${t} draft`;
76
77
  }
77
78
  var M = () => {
78
- let { data: h, loading: g, error: _, refetch: y } = e(), { navigate: b, basePath: x } = t(), { copy: se } = de(), [S, { loading: C }] = fe(xe), [w] = ee(), [E, D] = f(null), [j, M] = f(""), [Ee, De] = f(""), [N, P] = f([]), [F, I] = f(null), [Oe, L] = f(null), [ke, R] = f(null), [z, Ae] = f(null), [B, je] = f(null), [V, H] = f(/* @__PURE__ */ new Set()), [U, W] = f(null), G = d(() => h?.headshotmarketingAITools.items ?? [], [h]), K = d(() => h?.headshotmarketingAIToolExecutions.items ?? [], [h]), q = d(() => {
79
+ let { data: m, loading: h, error: g, refetch: v } = e(), { navigate: y, basePath: b } = t(), { copy: le } = pe(), [x, { loading: S }] = me(Se), [C] = te(), [T, E] = d(null), [j, M] = d(""), [De, Oe] = d(""), [N, P] = d([]), [F, I] = d(null), [ke, L] = d(null), [Ae, R] = d(null), [z, je] = d(null), [B, Me] = d(null), [V, H] = d(/* @__PURE__ */ new Set()), [U, W] = d(null), G = u(() => m?.headshotmarketingAITools.items ?? [], [m]), K = u(() => m?.headshotmarketingAIToolExecutions.items ?? [], [m]), q = u(() => {
79
80
  let e = /* @__PURE__ */ new Date();
80
81
  return new Date(e.getFullYear(), e.getMonth(), 1).getTime();
81
- }, []), Me = d(() => {
82
+ }, []), Ne = u(() => {
82
83
  let e = /* @__PURE__ */ new Map();
83
84
  for (let t of K) new Date(t.createdAt).getTime() >= q && e.set(t.toolId, (e.get(t.toolId) ?? 0) + 1);
84
85
  return e;
85
- }, [K, q]), Ne = d(() => {
86
+ }, [K, q]), Pe = u(() => {
86
87
  let e = 0;
87
88
  for (let t of K) new Date(t.createdAt).getTime() >= q && (e += t.tokensUsed ?? 0);
88
89
  return e;
89
- }, [K, q]), Pe = d(() => K.filter((e) => new Date(e.createdAt).getTime() >= q).length, [K, q]), Fe = d(() => {
90
+ }, [K, q]), Fe = u(() => K.filter((e) => new Date(e.createdAt).getTime() >= q).length, [K, q]), Ie = u(() => {
90
91
  let e = /* @__PURE__ */ new Map();
91
92
  for (let t of G) {
92
93
  if (!t.model) continue;
@@ -94,7 +95,7 @@ var M = () => {
94
95
  n.add(t.model), e.set(t.provider, n);
95
96
  }
96
97
  return e;
97
- }, [G]), J = d(() => G.map((e) => ({
98
+ }, [G]), J = u(() => G.map((e) => ({
98
99
  id: e.id,
99
100
  name: e.name,
100
101
  description: e.description ?? "",
@@ -102,28 +103,28 @@ var M = () => {
102
103
  provider: e.provider,
103
104
  model: e.model ?? null,
104
105
  isAvailable: e.isEnabled,
105
- icon: Ce(e.name, e.category),
106
- inputType: e.category === c.SeoOptimization ? "url" : "text",
107
- contentType: we(e.name, e.category),
108
- monthlyUses: Me.get(e.id) ?? 0
109
- })), [G, Me]), Ie = d(() => new Map(J.map((e) => [e.id, e])), [J]), Y = J.find((e) => e.id === E), Le = J.filter((e) => e.isAvailable).length;
110
- re(() => {
111
- if (!E && J.length > 0) {
106
+ icon: we(e.name, e.category),
107
+ inputType: e.category === s.SeoOptimization ? "url" : "text",
108
+ contentType: Te(e.name, e.category),
109
+ monthlyUses: Ne.get(e.id) ?? 0
110
+ })), [G, Ne]), Le = u(() => new Map(J.map((e) => [e.id, e])), [J]), Y = J.find((e) => e.id === T), Re = J.filter((e) => e.isAvailable).length;
111
+ ae(() => {
112
+ if (!T && J.length > 0) {
112
113
  let e = J.find((e) => e.isAvailable) ?? J[0];
113
- D(e.id);
114
+ E(e.id);
114
115
  }
115
- }, [E, J]);
116
- let X = d(() => {
116
+ }, [T, J]);
117
+ let X = u(() => {
117
118
  if (!Y) return [];
118
- let e = new Set(Fe.get(Y.provider) ?? []);
119
+ let e = new Set(Ie.get(Y.provider) ?? []);
119
120
  return Y.model && e.add(Y.model), Array.from(e);
120
- }, [Y, Fe]), Z = Ee || Y?.model || X[0] || "", Re = (e) => {
121
- D(e), P([]), L(null), I(null), R(null), W(null), M(""), De(""), H(/* @__PURE__ */ new Set());
122
- }, ze = async () => {
121
+ }, [Y, Ie]), Z = De || Y?.model || X[0] || "", ze = (e) => {
122
+ E(e), P([]), L(null), I(null), R(null), W(null), M(""), Oe(""), H(/* @__PURE__ */ new Set());
123
+ }, Be = async () => {
123
124
  if (j.trim() && Y && Y.isAvailable) {
124
125
  R(null), W(null), H(/* @__PURE__ */ new Set());
125
126
  try {
126
- let e = (await S({ variables: { input: {
127
+ let e = (await x({ variables: { input: {
127
128
  toolId: Y.id,
128
129
  input: { prompt: j.trim() },
129
130
  metadata: Z ? {
@@ -132,25 +133,25 @@ var M = () => {
132
133
  } : { provider: Y.provider }
133
134
  } } })).data?.headshotmarketingExecuteAITool;
134
135
  if (!e) throw Error("No response from the tool.");
135
- e.status === "FAILED" ? (P([]), L(null), I(null), R(e.errorMessage ?? "The tool failed to generate a result. Please try again.")) : (P(u(e.output)), L(e.id), I({
136
+ e.status === "FAILED" ? (P([]), L(null), I(null), R(e.errorMessage ?? "The tool failed to generate a result. Please try again.")) : (P(l(e.output)), L(e.id), I({
136
137
  tokensUsed: e.tokensUsed,
137
138
  durationMs: e.durationMs
138
- })), await y();
139
+ })), await v();
139
140
  } catch (e) {
140
- R(e instanceof Error ? e.message : "Generation failed.");
141
+ R(ie(e, "Generation failed."));
141
142
  }
142
143
  }
143
144
  }, Q = async (e, t) => {
144
- await se(t), Ae(e), window.setTimeout(() => Ae((t) => t === e ? null : t), 1500);
145
+ await le(t), je(e), window.setTimeout(() => je((t) => t === e ? null : t), 1500);
145
146
  }, $ = async (e, t, n, r) => {
146
147
  if (t.trim()) {
147
- W(null), je(e);
148
+ W(null), Me(e);
148
149
  try {
149
- await w({ variables: { input: {
150
- title: Te(t, n?.name ?? "AI"),
150
+ await C({ variables: { input: {
151
+ title: Ee(t, n?.name ?? "AI"),
151
152
  body: t,
152
153
  summary: t.replace(/\s+/g, " ").trim().slice(0, 180),
153
- type: n ? we(n.name, n.category) : l.Other,
154
+ type: n ? Te(n.name, n.category) : c.Other,
154
155
  tags: ["ai-generated"],
155
156
  aiToolExecutionId: r,
156
157
  metadata: {
@@ -159,66 +160,66 @@ var M = () => {
159
160
  provider: n?.provider ?? null,
160
161
  model: Z || n?.model || null
161
162
  }
162
- } } }), H((t) => new Set(t).add(e)), y();
163
+ } } }), H((t) => new Set(t).add(e)), v();
163
164
  } catch (e) {
164
- W(e instanceof Error ? e.message : "Could not save draft.");
165
+ W(ie(e, "Could not save draft."));
165
166
  } finally {
166
- je(null);
167
+ Me(null);
167
168
  }
168
169
  }
169
- }, Be = N.join("\n\n"), Ve = [
170
+ }, Ve = N.join("\n\n"), He = [
170
171
  {
171
172
  label: "Available tools",
172
- value: String(Le),
173
- icon: le
173
+ value: String(Re),
174
+ icon: de
174
175
  },
175
176
  {
176
177
  label: "Generations this month",
177
- value: i(Pe),
178
- icon: T
178
+ value: i(Fe),
179
+ icon: w
179
180
  },
180
181
  {
181
182
  label: "Tokens this month",
182
- value: i(Ne),
183
- icon: ue
183
+ value: i(Pe),
184
+ icon: fe
184
185
  }
185
186
  ];
186
- return /* @__PURE__ */ A(a, {
187
+ return /* @__PURE__ */ k(a, {
187
188
  title: "AI Tools",
188
189
  description: "AI-powered marketing content and optimization tools",
189
190
  children: [
190
- /* @__PURE__ */ k(me, { children: "Let AI do the heavy lifting on content. Generate copy, headlines and ideas, rewrite or optimize what you have, and turn a rough brief into a polished draft in seconds — then save it straight to your content library to refine it in your brand voice." }),
191
- /* @__PURE__ */ k(ne, {
191
+ /* @__PURE__ */ O(he, { children: "Let AI do the heavy lifting on content. Generate copy, headlines and ideas, rewrite or optimize what you have, and turn a rough brief into a polished draft in seconds — then save it straight to your content library to refine it in your brand voice." }),
192
+ /* @__PURE__ */ O(re, {
192
193
  active: "ai-tools",
193
- basePath: x,
194
- navigate: b
194
+ basePath: b,
195
+ navigate: y
195
196
  }),
196
- /* @__PURE__ */ k(s, {
197
- loading: g,
198
- error: _,
199
- onRetry: () => void y(),
200
- hasData: !!h,
201
- children: J.length === 0 ? /* @__PURE__ */ k(o, {
197
+ /* @__PURE__ */ O(ee, {
198
+ loading: h,
199
+ error: g,
200
+ onRetry: () => void v(),
201
+ hasData: !!m,
202
+ children: J.length === 0 ? /* @__PURE__ */ O(o, {
202
203
  illustration: "empty-generic",
203
204
  title: "No AI tools available",
204
205
  description: "AI tools will appear here once they're enabled for your workspace."
205
- }) : /* @__PURE__ */ A(O, { children: [
206
- /* @__PURE__ */ k("div", {
206
+ }) : /* @__PURE__ */ k(D, { children: [
207
+ /* @__PURE__ */ O("div", {
207
208
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
208
- children: Ve.map((e) => {
209
+ children: He.map((e) => {
209
210
  let t = e.icon;
210
- return /* @__PURE__ */ A(pe, {
211
+ return /* @__PURE__ */ k(A, {
211
212
  treatment: "metric",
212
213
  className: "flex items-center gap-3 p-4",
213
- children: [/* @__PURE__ */ k("span", {
214
+ children: [/* @__PURE__ */ O("span", {
214
215
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
215
- children: /* @__PURE__ */ k(t, { className: "h-5 w-5" })
216
- }), /* @__PURE__ */ A("span", {
216
+ children: /* @__PURE__ */ O(t, { className: "h-5 w-5" })
217
+ }), /* @__PURE__ */ k("span", {
217
218
  className: "min-w-0",
218
- children: [/* @__PURE__ */ k("span", {
219
+ children: [/* @__PURE__ */ O("span", {
219
220
  className: "block text-xl font-bold leading-none text-text-primary",
220
221
  children: e.value
221
- }), /* @__PURE__ */ k("span", {
222
+ }), /* @__PURE__ */ O("span", {
222
223
  className: "mt-1 block truncate text-xs text-text-secondary",
223
224
  children: e.label
224
225
  })]
@@ -226,43 +227,43 @@ var M = () => {
226
227
  }, e.label);
227
228
  })
228
229
  }),
229
- /* @__PURE__ */ A("div", {
230
+ /* @__PURE__ */ k("div", {
230
231
  className: "grid grid-cols-1 gap-6 lg:grid-cols-[1fr_minmax(340px,380px)] xl:grid-cols-[1fr_400px]",
231
- children: [/* @__PURE__ */ A("div", {
232
+ children: [/* @__PURE__ */ k("div", {
232
233
  className: "min-w-0 space-y-6",
233
- children: [/* @__PURE__ */ A("section", { children: [/* @__PURE__ */ k("h3", {
234
+ children: [/* @__PURE__ */ k("section", { children: [/* @__PURE__ */ O("h3", {
234
235
  className: "mb-3 text-sm font-semibold text-text-primary",
235
236
  children: "Choose a tool"
236
- }), /* @__PURE__ */ k("div", {
237
+ }), /* @__PURE__ */ O("div", {
237
238
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",
238
239
  children: J.map((e) => {
239
- let t = e.icon, r = E === e.id;
240
- return /* @__PURE__ */ A("button", {
240
+ let t = e.icon, r = T === e.id;
241
+ return /* @__PURE__ */ k("button", {
241
242
  type: "button",
242
- onClick: () => Re(e.id),
243
+ onClick: () => ze(e.id),
243
244
  disabled: !e.isAvailable,
244
245
  "aria-pressed": r,
245
246
  className: n("group relative flex min-h-[44px] flex-col items-start rounded-card border p-4 text-start transition-[box-shadow,border-color,background-color] duration-200", r ? "border-primary bg-accent-wash shadow-elevation-2" : e.isAvailable ? "border-border-subtle bg-bg-surface hover:border-border-strong hover:shadow-elevation-2" : "cursor-not-allowed border-border-subtle bg-bg-sunken opacity-60"),
246
247
  children: [
247
- /* @__PURE__ */ k(T, { className: n("absolute end-3 top-3 h-4 w-4 transition-opacity", r ? "text-primary opacity-90" : "text-primary opacity-30 group-hover:opacity-60") }),
248
- /* @__PURE__ */ k("span", {
248
+ /* @__PURE__ */ O(w, { className: n("absolute end-3 top-3 h-4 w-4 transition-opacity", r ? "text-primary opacity-90" : "text-primary opacity-30 group-hover:opacity-60") }),
249
+ /* @__PURE__ */ O("span", {
249
250
  className: n("flex h-10 w-10 items-center justify-center rounded-lg transition-colors", r ? "bg-action-primary-bg text-action-primary-text" : "bg-action-primary-bg/10 text-primary"),
250
- children: /* @__PURE__ */ k(t, { className: "h-5 w-5" })
251
+ children: /* @__PURE__ */ O(t, { className: "h-5 w-5" })
251
252
  }),
252
- /* @__PURE__ */ k("h4", {
253
+ /* @__PURE__ */ O("h4", {
253
254
  className: "mt-3 pe-5 text-sm font-semibold text-text-primary",
254
255
  children: e.name
255
256
  }),
256
- e.description && /* @__PURE__ */ k("p", {
257
+ e.description && /* @__PURE__ */ O("p", {
257
258
  className: "mt-1 line-clamp-2 text-xs text-text-secondary",
258
259
  children: e.description
259
260
  }),
260
- /* @__PURE__ */ A("div", {
261
+ /* @__PURE__ */ k("div", {
261
262
  className: "mt-3 flex w-full items-center justify-between gap-2 text-xs",
262
- children: [/* @__PURE__ */ k("span", {
263
+ children: [/* @__PURE__ */ O("span", {
263
264
  className: "rounded-full bg-bg-sunken px-2 py-0.5 font-medium text-text-secondary",
264
- children: Se[e.category]
265
- }), e.isAvailable ? /* @__PURE__ */ A("span", {
265
+ children: Ce[e.category]
266
+ }), e.isAvailable ? /* @__PURE__ */ k("span", {
266
267
  className: "text-text-secondary",
267
268
  children: [
268
269
  e.monthlyUses,
@@ -270,7 +271,7 @@ var M = () => {
270
271
  e.monthlyUses === 1 ? "use" : "uses",
271
272
  " this month"
272
273
  ]
273
- }) : /* @__PURE__ */ k("span", {
274
+ }) : /* @__PURE__ */ O("span", {
274
275
  className: "font-medium text-status-warning-text",
275
276
  children: "Coming soon"
276
277
  })]
@@ -278,92 +279,92 @@ var M = () => {
278
279
  ]
279
280
  }, e.id);
280
281
  })
281
- })] }), /* @__PURE__ */ A("section", { children: [/* @__PURE__ */ k("h3", {
282
+ })] }), /* @__PURE__ */ k("section", { children: [/* @__PURE__ */ O("h3", {
282
283
  className: "mb-3 text-sm font-semibold text-text-primary",
283
284
  children: "Recent generations"
284
- }), K.length === 0 ? /* @__PURE__ */ k(o, {
285
+ }), K.length === 0 ? /* @__PURE__ */ O(o, {
285
286
  illustration: "empty-generic",
286
287
  title: "No generations yet",
287
288
  description: "Run a tool and your recent AI generations will show up here."
288
- }) : /* @__PURE__ */ k("div", {
289
+ }) : /* @__PURE__ */ O("div", {
289
290
  className: "space-y-3",
290
291
  children: K.map((e) => {
291
- let t = Ie.get(e.toolId), n = u(e.input)[0] ?? "—", i = u(e.output)[0] ?? "—", a = t?.icon ?? T, o = `gen-${e.id}`, s = V.has(o);
292
- return /* @__PURE__ */ A("div", {
292
+ let t = Le.get(e.toolId), n = l(e.input)[0] ?? "—", i = l(e.output)[0] ?? "—", a = t?.icon ?? w, o = `gen-${e.id}`, s = V.has(o);
293
+ return /* @__PURE__ */ k("div", {
293
294
  className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
294
295
  children: [
295
- /* @__PURE__ */ A("div", {
296
+ /* @__PURE__ */ k("div", {
296
297
  className: "mb-2 flex items-center justify-between gap-2",
297
- children: [/* @__PURE__ */ A("div", {
298
+ children: [/* @__PURE__ */ k("div", {
298
299
  className: "flex min-w-0 items-center gap-2",
299
- children: [/* @__PURE__ */ k(a, { className: "h-3.5 w-3.5 shrink-0 text-primary" }), /* @__PURE__ */ k("span", {
300
+ children: [/* @__PURE__ */ O(a, { className: "h-3.5 w-3.5 shrink-0 text-primary" }), /* @__PURE__ */ O("span", {
300
301
  className: "truncate text-xs font-medium text-text-primary",
301
302
  children: t?.name ?? "AI Tool"
302
303
  })]
303
- }), /* @__PURE__ */ A("div", {
304
+ }), /* @__PURE__ */ k("div", {
304
305
  className: "flex shrink-0 items-center gap-1 text-xs text-text-secondary",
305
- children: [/* @__PURE__ */ k(ie, { className: "h-3 w-3" }), /* @__PURE__ */ k("span", { children: r(e.createdAt, "relative") })]
306
+ children: [/* @__PURE__ */ O(oe, { className: "h-3 w-3" }), /* @__PURE__ */ O("span", { children: r(e.createdAt, "relative") })]
306
307
  })]
307
308
  }),
308
- /* @__PURE__ */ A("p", {
309
+ /* @__PURE__ */ k("p", {
309
310
  className: "line-clamp-1 text-xs text-text-secondary",
310
311
  children: ["Prompt: ", n]
311
312
  }),
312
- /* @__PURE__ */ k("p", {
313
+ /* @__PURE__ */ O("p", {
313
314
  className: "mt-1 line-clamp-3 whitespace-pre-wrap text-sm text-text-primary",
314
315
  children: i
315
316
  }),
316
- i !== "—" && /* @__PURE__ */ A("div", {
317
+ i !== "—" && /* @__PURE__ */ k("div", {
317
318
  className: "mt-2 flex items-center gap-3",
318
- children: [/* @__PURE__ */ k("button", {
319
+ children: [/* @__PURE__ */ O("button", {
319
320
  type: "button",
320
321
  onClick: () => void Q(o, i),
321
322
  className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
322
- children: z === o ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(p, { className: "h-3 w-3" }), " Copied"] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(ae, { className: "h-3 w-3" }), " Copy"] })
323
- }), /* @__PURE__ */ k("button", {
323
+ children: z === o ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(f, { className: "h-3 w-3" }), " Copied"] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(se, { className: "h-3 w-3" }), " Copy"] })
324
+ }), /* @__PURE__ */ O("button", {
324
325
  type: "button",
325
326
  onClick: () => void $(o, i, t, e.id),
326
327
  disabled: B === o || s,
327
328
  className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline disabled:opacity-60",
328
- children: B === o ? /* @__PURE__ */ A(O, { children: [
329
- /* @__PURE__ */ k(v, { className: "h-3 w-3 animate-spin" }),
329
+ children: B === o ? /* @__PURE__ */ k(D, { children: [
330
+ /* @__PURE__ */ O(_, { className: "h-3 w-3 animate-spin" }),
330
331
  " ",
331
332
  "Saving"
332
- ] }) : s ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(p, { className: "h-3 w-3" }), " Saved"] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(m, { className: "h-3 w-3" }), " Save as draft"] })
333
+ ] }) : s ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(f, { className: "h-3 w-3" }), " Saved"] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(p, { className: "h-3 w-3" }), " Save as draft"] })
333
334
  })]
334
335
  })
335
336
  ]
336
337
  }, e.id);
337
338
  })
338
339
  })] })]
339
- }), /* @__PURE__ */ k("div", {
340
+ }), /* @__PURE__ */ O("div", {
340
341
  className: "lg:sticky lg:top-4 lg:self-start",
341
- children: /* @__PURE__ */ A(pe, {
342
+ children: /* @__PURE__ */ k(A, {
342
343
  treatment: "glass",
343
344
  glow: !0,
344
345
  className: "p-5",
345
346
  children: [
346
- /* @__PURE__ */ A("div", {
347
+ /* @__PURE__ */ k("div", {
347
348
  className: "mb-4 flex items-center gap-2",
348
- children: [/* @__PURE__ */ k("span", {
349
+ children: [/* @__PURE__ */ O("span", {
349
350
  className: "flex h-8 w-8 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
350
- children: /* @__PURE__ */ k(le, { className: "h-4 w-4" })
351
- }), /* @__PURE__ */ A("div", {
351
+ children: /* @__PURE__ */ O(de, { className: "h-4 w-4" })
352
+ }), /* @__PURE__ */ k("div", {
352
353
  className: "min-w-0",
353
- children: [/* @__PURE__ */ k("h3", {
354
+ children: [/* @__PURE__ */ O("h3", {
354
355
  className: "truncate text-sm font-semibold text-text-primary",
355
356
  children: Y ? Y.name : "AI Console"
356
- }), Y && /* @__PURE__ */ k("p", {
357
+ }), Y && /* @__PURE__ */ O("p", {
357
358
  className: "truncate text-xs text-text-secondary",
358
359
  children: Y.provider
359
360
  })]
360
361
  })]
361
362
  }),
362
- /* @__PURE__ */ k("label", {
363
+ /* @__PURE__ */ O("label", {
363
364
  className: "mb-1.5 block text-xs font-medium text-text-secondary",
364
365
  children: Y?.inputType === "url" ? "Page URL" : "Your prompt"
365
366
  }),
366
- /* @__PURE__ */ k(be, {
367
+ /* @__PURE__ */ O(xe, {
367
368
  value: j,
368
369
  onChange: (e) => M(e.target.value),
369
370
  disabled: !Y?.isAvailable,
@@ -371,122 +372,122 @@ var M = () => {
371
372
  rows: 4,
372
373
  className: "min-h-[112px] resize-y",
373
374
  onKeyDown: (e) => {
374
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), ze());
375
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Be());
375
376
  }
376
377
  }),
377
- /* @__PURE__ */ A("div", {
378
+ /* @__PURE__ */ k("div", {
378
379
  className: "mt-3 flex flex-col gap-2 sm:flex-row",
379
- children: [X.length > 0 ? /* @__PURE__ */ A(he, {
380
+ children: [X.length > 0 ? /* @__PURE__ */ k(ge, {
380
381
  value: Z,
381
- onValueChange: De,
382
+ onValueChange: Oe,
382
383
  disabled: !Y?.isAvailable,
383
- children: [/* @__PURE__ */ k(ve, {
384
+ children: [/* @__PURE__ */ O(ye, {
384
385
  "aria-label": "Model",
385
386
  className: "h-11 flex-1",
386
- children: /* @__PURE__ */ A("span", {
387
+ children: /* @__PURE__ */ k("span", {
387
388
  className: "flex items-center gap-2 truncate",
388
- children: [/* @__PURE__ */ k(oe, { className: "h-4 w-4 shrink-0 text-text-muted" }), /* @__PURE__ */ k(ye, { placeholder: "Model" })]
389
+ children: [/* @__PURE__ */ O(ce, { className: "h-4 w-4 shrink-0 text-text-muted" }), /* @__PURE__ */ O(be, { placeholder: "Model" })]
389
390
  })
390
- }), /* @__PURE__ */ k(ge, { children: X.map((e) => /* @__PURE__ */ k(_e, {
391
+ }), /* @__PURE__ */ O(_e, { children: X.map((e) => /* @__PURE__ */ O(ve, {
391
392
  value: e,
392
393
  children: e
393
394
  }, e)) })]
394
- }) : /* @__PURE__ */ A("div", {
395
+ }) : /* @__PURE__ */ k("div", {
395
396
  className: "flex h-11 flex-1 items-center gap-2 rounded-input border border-border-default bg-bg-surface px-3 text-sm text-text-secondary",
396
- children: [/* @__PURE__ */ k(oe, { className: "h-4 w-4 text-text-muted" }), /* @__PURE__ */ k("span", {
397
+ children: [/* @__PURE__ */ O(ce, { className: "h-4 w-4 text-text-muted" }), /* @__PURE__ */ O("span", {
397
398
  className: "truncate",
398
399
  children: Y?.provider ?? "Default model"
399
400
  })]
400
- }), /* @__PURE__ */ k("button", {
401
+ }), /* @__PURE__ */ O("button", {
401
402
  type: "button",
402
- onClick: () => void ze(),
403
- disabled: C || !j.trim() || !Y?.isAvailable,
404
- className: n("inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md px-5 text-sm font-semibold transition-colors sm:min-w-[132px]", C || !j.trim() || !Y?.isAvailable ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
405
- children: C ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(v, { className: "h-4 w-4 animate-spin" }), "Generating…"] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(ce, { className: "h-4 w-4" }), "Generate"] })
403
+ onClick: () => void Be(),
404
+ disabled: S || !j.trim() || !Y?.isAvailable,
405
+ className: n("inline-flex min-h-[44px] items-center justify-center gap-2 rounded-md px-5 text-sm font-semibold transition-colors sm:min-w-[132px]", S || !j.trim() || !Y?.isAvailable ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
406
+ children: S ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(_, { className: "h-4 w-4 animate-spin" }), "Generating…"] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(ue, { className: "h-4 w-4" }), "Generate"] })
406
407
  })]
407
408
  }),
408
- ke && /* @__PURE__ */ k("div", {
409
+ Ae && /* @__PURE__ */ O("div", {
409
410
  role: "alert",
410
411
  className: "mt-3 rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
411
- children: ke
412
+ children: Ae
412
413
  }),
413
- /* @__PURE__ */ A("div", {
414
+ /* @__PURE__ */ k("div", {
414
415
  className: "mt-4 overflow-hidden rounded-card border border-border-seam bg-bg-surface",
415
416
  children: [
416
- /* @__PURE__ */ A("div", {
417
+ /* @__PURE__ */ k("div", {
417
418
  className: "flex items-center justify-between border-b border-border-subtle px-3 py-2",
418
419
  children: [
419
- /* @__PURE__ */ k("span", {
420
+ /* @__PURE__ */ O("span", {
420
421
  className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
421
422
  children: "Generated"
422
423
  }),
423
- /* @__PURE__ */ k("span", {
424
+ /* @__PURE__ */ O("span", {
424
425
  className: "text-xs text-text-muted",
425
426
  children: "AI-generated — review and verify before publishing."
426
427
  }),
427
- /* @__PURE__ */ A("div", {
428
+ /* @__PURE__ */ k("div", {
428
429
  className: "flex items-center gap-1",
429
- children: [/* @__PURE__ */ k("button", {
430
+ children: [/* @__PURE__ */ O("button", {
430
431
  type: "button",
431
- onClick: () => void Q("out-all", Be),
432
+ onClick: () => void Q("out-all", Ve),
432
433
  disabled: N.length === 0,
433
434
  className: "inline-flex min-h-[32px] items-center gap-1 rounded px-2 text-xs font-medium text-primary transition-colors hover:bg-bg-sunken disabled:opacity-40",
434
- children: z === "out-all" ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(p, { className: "h-3.5 w-3.5" }), " Copied"] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(ae, { className: "h-3.5 w-3.5" }), " Copy"] })
435
- }), /* @__PURE__ */ k("button", {
435
+ children: z === "out-all" ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(f, { className: "h-3.5 w-3.5" }), " Copied"] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(se, { className: "h-3.5 w-3.5" }), " Copy"] })
436
+ }), /* @__PURE__ */ O("button", {
436
437
  type: "button",
437
- onClick: () => void $("out-all", Be, Y, Oe),
438
+ onClick: () => void $("out-all", Ve, Y, ke),
438
439
  disabled: N.length === 0 || B === "out-all" || V.has("out-all"),
439
440
  className: "inline-flex min-h-[32px] items-center gap-1 rounded px-2 text-xs font-medium text-primary transition-colors hover:bg-bg-sunken disabled:opacity-40",
440
- children: B === "out-all" ? /* @__PURE__ */ A(O, { children: [
441
- /* @__PURE__ */ k(v, { className: "h-3.5 w-3.5 animate-spin" }),
441
+ children: B === "out-all" ? /* @__PURE__ */ k(D, { children: [
442
+ /* @__PURE__ */ O(_, { className: "h-3.5 w-3.5 animate-spin" }),
442
443
  " ",
443
444
  "Saving"
444
- ] }) : V.has("out-all") ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(p, { className: "h-3.5 w-3.5" }), " Saved"] }) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(m, { className: "h-3.5 w-3.5" }), " Insert"] })
445
+ ] }) : V.has("out-all") ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(f, { className: "h-3.5 w-3.5" }), " Saved"] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(p, { className: "h-3.5 w-3.5" }), " Insert"] })
445
446
  })]
446
447
  })
447
448
  ]
448
449
  }),
449
- /* @__PURE__ */ k("div", {
450
+ /* @__PURE__ */ O("div", {
450
451
  className: "max-h-[340px] min-h-[148px] overflow-y-auto p-3",
451
- children: C ? /* @__PURE__ */ A("div", {
452
+ children: S ? /* @__PURE__ */ k("div", {
452
453
  className: "flex h-[124px] flex-col items-center justify-center gap-2 text-text-secondary",
453
- children: [/* @__PURE__ */ k(v, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ k("span", {
454
+ children: [/* @__PURE__ */ O(_, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ O("span", {
454
455
  className: "text-xs",
455
456
  children: "Generating your content…"
456
457
  })]
457
- }) : N.length === 0 ? /* @__PURE__ */ A("div", {
458
+ }) : N.length === 0 ? /* @__PURE__ */ k("div", {
458
459
  className: "flex h-[124px] flex-col items-center justify-center gap-2 text-center text-text-secondary",
459
- children: [/* @__PURE__ */ k(T, { className: "h-5 w-5 opacity-60" }), /* @__PURE__ */ k("span", {
460
+ children: [/* @__PURE__ */ O(w, { className: "h-5 w-5 opacity-60" }), /* @__PURE__ */ O("span", {
460
461
  className: "text-xs",
461
462
  children: "Your generated content will appear here."
462
463
  })]
463
- }) : /* @__PURE__ */ k("div", {
464
+ }) : /* @__PURE__ */ O("div", {
464
465
  className: "space-y-3",
465
466
  children: N.map((e, t) => {
466
467
  let r = `out-${t}`;
467
- return /* @__PURE__ */ A("div", {
468
+ return /* @__PURE__ */ k("div", {
468
469
  className: n(N.length > 1 && "rounded-md border border-border-subtle bg-bg-sunken p-3"),
469
- children: [N.length > 1 && /* @__PURE__ */ A("div", {
470
+ children: [N.length > 1 && /* @__PURE__ */ k("div", {
470
471
  className: "mb-1.5 flex items-center justify-between",
471
- children: [/* @__PURE__ */ A("span", {
472
+ children: [/* @__PURE__ */ k("span", {
472
473
  className: "text-xs font-medium text-text-secondary",
473
474
  children: ["Variation ", t + 1]
474
- }), /* @__PURE__ */ A("div", {
475
+ }), /* @__PURE__ */ k("div", {
475
476
  className: "flex items-center gap-2",
476
- children: [/* @__PURE__ */ k("button", {
477
+ children: [/* @__PURE__ */ O("button", {
477
478
  type: "button",
478
479
  onClick: () => void Q(r, e),
479
480
  className: "text-xs font-medium text-primary hover:underline",
480
481
  children: z === r ? "Copied" : "Copy"
481
- }), /* @__PURE__ */ k("button", {
482
+ }), /* @__PURE__ */ O("button", {
482
483
  type: "button",
483
- onClick: () => void $(r, e, Y, Oe),
484
+ onClick: () => void $(r, e, Y, ke),
484
485
  disabled: B === r || V.has(r),
485
486
  className: "text-xs font-medium text-primary hover:underline disabled:opacity-60",
486
487
  children: B === r ? "Saving" : V.has(r) ? "Saved" : "Insert"
487
488
  })]
488
489
  })]
489
- }), /* @__PURE__ */ k("p", {
490
+ }), /* @__PURE__ */ O("p", {
490
491
  className: "whitespace-pre-wrap text-sm text-text-primary",
491
492
  children: e
492
493
  })]
@@ -494,43 +495,43 @@ var M = () => {
494
495
  })
495
496
  })
496
497
  }),
497
- (F || U) && /* @__PURE__ */ A("div", {
498
+ (F || U) && /* @__PURE__ */ k("div", {
498
499
  className: "flex items-center justify-between gap-2 border-t border-border-subtle px-3 py-2 text-xs",
499
- children: [F ? /* @__PURE__ */ A("span", {
500
+ children: [F ? /* @__PURE__ */ k("span", {
500
501
  className: "flex items-center gap-3 text-text-secondary",
501
- children: [F.durationMs != null && /* @__PURE__ */ A("span", {
502
+ children: [F.durationMs != null && /* @__PURE__ */ k("span", {
502
503
  className: "flex items-center gap-1",
503
504
  children: [
504
- /* @__PURE__ */ k(ie, { className: "h-3 w-3" }),
505
+ /* @__PURE__ */ O(oe, { className: "h-3 w-3" }),
505
506
  (F.durationMs / 1e3).toFixed(1),
506
507
  "s"
507
508
  ]
508
- }), F.tokensUsed != null && /* @__PURE__ */ A("span", {
509
+ }), F.tokensUsed != null && /* @__PURE__ */ k("span", {
509
510
  className: "flex items-center gap-1",
510
511
  children: [
511
- /* @__PURE__ */ k(ue, { className: "h-3 w-3" }),
512
+ /* @__PURE__ */ O(fe, { className: "h-3 w-3" }),
512
513
  i(F.tokensUsed),
513
514
  " tokens"
514
515
  ]
515
516
  })]
516
- }) : /* @__PURE__ */ k("span", {}), U && /* @__PURE__ */ k("span", {
517
+ }) : /* @__PURE__ */ O("span", {}), U && /* @__PURE__ */ O("span", {
517
518
  className: "text-status-error-text",
518
519
  children: U
519
520
  })]
520
521
  })
521
522
  ]
522
523
  }),
523
- V.size > 0 && /* @__PURE__ */ A("button", {
524
+ V.size > 0 && /* @__PURE__ */ k("button", {
524
525
  type: "button",
525
- onClick: () => b(x + "/content"),
526
+ onClick: () => y(b + "/content"),
526
527
  className: "mt-3 inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",
527
- children: [/* @__PURE__ */ k(m, { className: "h-3.5 w-3.5" }), "View saved drafts in Content"]
528
+ children: [/* @__PURE__ */ O(p, { className: "h-3.5 w-3.5" }), "View saved drafts in Content"]
528
529
  })
529
530
  ]
530
531
  })
531
532
  })]
532
533
  }),
533
- /* @__PURE__ */ k(te, {
534
+ /* @__PURE__ */ O(ne, {
534
535
  executions: K,
535
536
  tools: G
536
537
  })