chordia-ui 3.9.0 → 3.9.2

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 (48) hide show
  1. package/dist/DataTable2.cjs.js +1 -1
  2. package/dist/DataTable2.cjs.js.map +1 -1
  3. package/dist/DataTable2.es.js +611 -604
  4. package/dist/DataTable2.es.js.map +1 -1
  5. package/dist/PerformancePanel.cjs.js +1 -1
  6. package/dist/PerformancePanel.cjs.js.map +1 -1
  7. package/dist/PerformancePanel.es.js +1068 -816
  8. package/dist/PerformancePanel.es.js.map +1 -1
  9. package/dist/SupervisorSelect.cjs.js +2 -0
  10. package/dist/SupervisorSelect.cjs.js.map +1 -0
  11. package/dist/SupervisorSelect.es.js +352 -0
  12. package/dist/SupervisorSelect.es.js.map +1 -0
  13. package/dist/components/Signals.cjs.js +1 -1
  14. package/dist/components/Signals.cjs.js.map +1 -1
  15. package/dist/components/Signals.es.js +273 -318
  16. package/dist/components/Signals.es.js.map +1 -1
  17. package/dist/components/UpdatedInteractionDetails.cjs.js +3 -3
  18. package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
  19. package/dist/components/UpdatedInteractionDetails.es.js +98 -92
  20. package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
  21. package/dist/components/performance.cjs.js +1 -1
  22. package/dist/components/performance.cjs.js.map +1 -1
  23. package/dist/components/performance.es.js +116 -349
  24. package/dist/components/performance.es.js.map +1 -1
  25. package/dist/components/reports.cjs.js +2 -2
  26. package/dist/components/reports.cjs.js.map +1 -1
  27. package/dist/components/reports.es.js +122 -141
  28. package/dist/components/reports.es.js.map +1 -1
  29. package/dist/index.cjs.js +1 -1
  30. package/dist/index.es.js +1 -1
  31. package/dist/pages/interactionDetails.cjs.js +2 -2
  32. package/dist/pages/interactionDetails.cjs.js.map +1 -1
  33. package/dist/pages/interactionDetails.es.js +130 -124
  34. package/dist/pages/interactionDetails.es.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/components/Signals/SignalDetailsPage.jsx +2 -29
  37. package/src/components/Signals/SignalsListPage.jsx +2 -24
  38. package/src/components/UpdatedInteractionDetails/UpdatedCoachingSynthesisCard.jsx +8 -1
  39. package/src/components/data/DataTable2.jsx +19 -5
  40. package/src/components/pages/interactionDetails/CoachingSynthesisCard.jsx +8 -1
  41. package/src/components/performance/PerformanceDetailsPage.jsx +230 -75
  42. package/src/components/performance/PerformancePanel.jsx +42 -45
  43. package/src/components/performance/index.js +27 -0
  44. package/src/components/performance/performanceApiMap.js +133 -0
  45. package/src/components/performance/performanceMetrics.js +63 -0
  46. package/src/components/performance/performanceRangeFormat.js +92 -0
  47. package/src/components/performance/performanceSparkline.js +52 -0
  48. package/src/components/reports/ReportsList.jsx +2 -25
@@ -1 +1 @@
1
- {"version":3,"file":"performance.es.js","sources":["../../src/components/performance/SupervisorSelect.jsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { Search, Check } from \"lucide-react\";\n\nconst C = {\n white: \"#FFFFFF\",\n black: \"#0B0B0B\",\n borderSubtle: \"#E6E6E6\",\n border: \"#D9D9D9\",\n searchBg: \"#D8D8D8\",\n rowSelected: \"#F2F2F0\",\n textMuted: \"#989898\",\n textMid: \"#676767\",\n textDark: \"#323232\",\n applyBg: \"#2E3236\",\n scrollbar: \"#D5D9E2\",\n};\n\nconst FONT = \"var(--font-sans, 'Averta', ui-sans-serif, system-ui, sans-serif)\";\n\nfunction Checkbox({ checked, mutedFill = false }) {\n return (\n <span\n style={{\n width: 20,\n height: 20,\n borderRadius: 4,\n background: checked ? C.black : mutedFill ? C.rowSelected : C.white,\n border: `1px solid ${checked ? C.black : C.textDark}`,\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n boxSizing: \"border-box\",\n }}\n >\n {checked && <Check size={14} color={C.white} strokeWidth={3} />}\n </span>\n );\n}\n\nfunction Row({ supervisor, checked, muted = false, onToggle }) {\n return (\n <button\n type=\"button\"\n onClick={onToggle}\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n height: 32,\n padding: \"0 16px 0 8px\",\n borderRadius: 10,\n border: \"none\",\n background: checked ? C.rowSelected : \"transparent\",\n cursor: \"pointer\",\n width: \"100%\",\n textAlign: \"left\",\n fontFamily: FONT,\n flexShrink: 0,\n }}\n >\n <span style={{ display: \"flex\", alignItems: \"center\", gap: 12, flex: 1, minWidth: 0 }}>\n <Checkbox checked={checked} mutedFill={muted} />\n <span\n style={{\n fontSize: 14,\n lineHeight: \"20px\",\n fontWeight: 400,\n color: !checked && muted ? C.textMid : C.black,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {supervisor.name}\n </span>\n </span>\n <span\n style={{\n fontSize: 12,\n fontWeight: 500,\n lineHeight: 1,\n color: !checked && muted ? C.textMid : C.black,\n whiteSpace: \"nowrap\",\n padding: \"4px 8px\",\n }}\n >\n {supervisor.agentCount} agents\n </span>\n </button>\n );\n}\n\nfunction MetaRow({ left, right }) {\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n height: 14,\n fontSize: 12,\n lineHeight: 1.5,\n fontFamily: FONT,\n flexShrink: 0,\n }}\n >\n {left}\n {right}\n </div>\n );\n}\n\nfunction ActionLink({ children, onClick, faded = false }) {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n style={{\n background: \"transparent\",\n border: \"none\",\n padding: 0,\n cursor: onClick ? \"pointer\" : \"default\",\n fontFamily: FONT,\n fontSize: 12,\n fontWeight: 500,\n color: faded ? C.textMuted : C.textDark,\n whiteSpace: \"nowrap\",\n }}\n >\n {children}\n </button>\n );\n}\n\nexport default function SupervisorSelect({\n supervisors = [],\n value = [],\n onApply,\n onClose,\n totalLabel,\n className = \"\",\n style,\n}) {\n const initialValueRef = React.useRef(value);\n const [staged, setStaged] = React.useState(value);\n const [query, setQuery] = React.useState(\"\");\n\n React.useEffect(() => {\n initialValueRef.current = value;\n setStaged(value);\n }, [value]);\n\n const stagedSet = React.useMemo(() => new Set(staged), [staged]);\n\n const isSearching = query.trim().length > 0;\n\n const filtered = React.useMemo(() => {\n const q = query.trim().toLowerCase();\n if (!q) return supervisors;\n return supervisors.filter((s) => s.name.toLowerCase().includes(q));\n }, [supervisors, query]);\n\n const allSelected = supervisors.length > 0 && staged.length === supervisors.length;\n const noneSelected = staged.length === 0;\n const isPartial = !allSelected && !noneSelected;\n\n const toggle = (id) => {\n setStaged((prev) => (prev.includes(id) ? prev.filter((x) => x !== id) : [...prev, id]));\n };\n const selectAll = () => setStaged(supervisors.map((s) => s.id));\n const deselectAll = () => setStaged([]);\n const reset = () => setStaged(initialValueRef.current);\n const clearSearch = () => setQuery(\"\");\n const apply = () => {\n onApply?.(staged);\n onClose?.();\n };\n\n const headerCount = isSearching\n ? `${filtered.length} Result${filtered.length === 1 ? \"\" : \"s\"}`\n : totalLabel || `${supervisors.length} Supervisors`;\n\n let headerRight;\n if (isSearching) {\n headerRight = filtered.length > 0 ? <ActionLink onClick={selectAll}>Select all</ActionLink> : null;\n } else if (allSelected) {\n headerRight = <ActionLink onClick={deselectAll}>Deselect all</ActionLink>;\n } else if (noneSelected) {\n headerRight = <ActionLink onClick={selectAll}>Select all</ActionLink>;\n } else {\n headerRight = (\n <span style={{ display: \"inline-flex\", gap: 12 }}>\n <ActionLink onClick={selectAll}>Select all</ActionLink>\n <ActionLink onClick={deselectAll}>Deselect all</ActionLink>\n </span>\n );\n }\n\n // Decide which sections to render\n const renderPartial = !isSearching && isPartial;\n const flatList = isSearching ? filtered : renderPartial ? [] : supervisors;\n const partialSelected = renderPartial ? supervisors.filter((s) => stagedSet.has(s.id)) : [];\n const partialOthers = renderPartial ? supervisors.filter((s) => !stagedSet.has(s.id)) : [];\n\n return (\n <div\n className={className}\n style={{\n width: 262,\n background: C.white,\n border: `1px solid ${C.borderSubtle}`,\n borderRadius: 10,\n padding: 12,\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: 6,\n fontFamily: FONT,\n boxShadow: \"0 8px 24px rgba(11, 11, 11, 0.08)\",\n ...style,\n }}\n >\n <div\n style={{\n background: C.searchBg,\n height: 32,\n borderRadius: 10,\n padding: 1,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n <div\n style={{\n background: C.white,\n flex: 1,\n height: 30,\n borderRadius: 10,\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n padding: \"0 8px\",\n }}\n >\n <Search size={16} color={C.textMuted} strokeWidth={2} />\n <input\n type=\"text\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder=\"Search supervisors...\"\n style={{\n flex: 1,\n border: \"none\",\n outline: \"none\",\n background: \"transparent\",\n fontFamily: FONT,\n fontSize: 14,\n color: C.black,\n minWidth: 0,\n }}\n />\n </div>\n </div>\n\n <MetaRow\n left={\n <span style={{ color: C.textMuted, fontWeight: 400 }}>{headerCount}</span>\n }\n right={headerRight}\n />\n\n {flatList.length > 0 && (\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: 6 }}>\n {flatList.map((s) => (\n <Row\n key={s.id}\n supervisor={s}\n checked={stagedSet.has(s.id)}\n muted={false}\n onToggle={() => toggle(s.id)}\n />\n ))}\n </div>\n )}\n\n {renderPartial && (\n <>\n {partialSelected.length > 0 && (\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: 6 }}>\n {partialSelected.map((s) => (\n <Row key={s.id} supervisor={s} checked onToggle={() => toggle(s.id)} />\n ))}\n </div>\n )}\n {partialSelected.length > 0 && partialOthers.length > 0 && (\n <div style={{ height: 1, background: C.border, margin: \"4px 0\" }} />\n )}\n {partialOthers.length > 0 && (\n <>\n <MetaRow\n left={<span style={{ color: C.textMuted, fontWeight: 400 }}>Others</span>}\n right={null}\n />\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: 6 }}>\n {partialOthers.map((s) => (\n <Row\n key={s.id}\n supervisor={s}\n checked={false}\n muted\n onToggle={() => toggle(s.id)}\n />\n ))}\n </div>\n </>\n )}\n </>\n )}\n\n {isSearching && filtered.length === 0 && (\n <div\n style={{\n padding: \"16px 8px\",\n textAlign: \"center\",\n fontSize: 14,\n color: C.textMid,\n fontFamily: FONT,\n }}\n >\n No results for &ldquo;{query}&rdquo;\n </div>\n )}\n {isSearching && filtered.length > 0 && supervisors.length > filtered.length && (\n <div\n style={{\n padding: \"10px 8px\",\n textAlign: \"center\",\n fontSize: 14,\n color: C.textMid,\n fontFamily: FONT,\n }}\n >\n No other results for &ldquo;{query}&rdquo;\n </div>\n )}\n\n <div style={{ height: 1, background: C.border, margin: \"2px 0\" }} />\n\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n height: 30,\n }}\n >\n {isSearching ? (\n <ActionLink onClick={clearSearch}>Clear search</ActionLink>\n ) : (\n <ActionLink onClick={reset}>Reset</ActionLink>\n )}\n <button\n type=\"button\"\n onClick={apply}\n style={{\n background: C.applyBg,\n color: C.white,\n border: \"none\",\n borderRadius: 10,\n height: 28,\n padding: \"0 14px\",\n fontFamily: FONT,\n fontSize: 14,\n fontWeight: 600,\n cursor: \"pointer\",\n }}\n >\n Apply\n </button>\n </div>\n </div>\n );\n}\n"],"names":["C","FONT","Checkbox","checked","mutedFill","jsx","Check","Row","supervisor","muted","onToggle","jsxs","MetaRow","left","right","ActionLink","children","onClick","faded","SupervisorSelect","supervisors","value","onApply","onClose","totalLabel","className","style","initialValueRef","React","staged","setStaged","query","setQuery","stagedSet","isSearching","filtered","q","s","allSelected","noneSelected","isPartial","toggle","id","prev","x","selectAll","deselectAll","reset","clearSearch","apply","headerCount","headerRight","renderPartial","flatList","partialSelected","partialOthers","Search","e","Fragment"],"mappings":";;;;;;;;;;;;AAKA,MAAMA,IAAI;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AAAA,EACP,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AAAA,EACX,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QAAW,EAAA,CAAA;AAAA,QAElE,gBAAAW;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,cACL,SAAS;AAAA,cACT,YAAY;AAAA,cACZ,gBAAgB;AAAA,cAChB,QAAQ;AAAA,YACV;AAAA,YAEC,UAAA;AAAA,cACCuB,IAAA,gBAAA7B,EAACU,GAAW,EAAA,SAASiC,GAAa,UAAA,eAAA,CAAY,IAE7C,gBAAA3C,EAAAU,GAAA,EAAW,SAASgC,GAAO,UAAK,SAAA;AAAA,cAEnC,gBAAA1C;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,MAAK;AAAA,kBACL,SAAS4C;AAAA,kBACT,OAAO;AAAA,oBACL,YAAYjD,EAAE;AAAA,oBACd,OAAOA,EAAE;AAAA,oBACT,QAAQ;AAAA,oBACR,cAAc;AAAA,oBACd,QAAQ;AAAA,oBACR,SAAS;AAAA,oBACT,YAAYC;AAAA,oBACZ,UAAU;AAAA,oBACV,YAAY;AAAA,oBACZ,QAAQ;AAAA,kBACV;AAAA,kBACD,UAAA;AAAA,gBAAA;AAAA,cAED;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"performance.es.js","sources":["../../src/components/performance/performanceApiMap.js"],"sourcesContent":["import { trendFromPoints } from \"./performanceSparkline\";\n\nconst METRIC_PLACEHOLDER = \"—\";\n\nfunction isNullish(value) {\n return value == null || (typeof value === \"number\" && Number.isNaN(value));\n}\n\nfunction trendFromDelta(delta) {\n if (isNullish(delta) || delta === 0) return \"up\";\n return delta > 0 ? \"up\" : \"down\";\n}\n\nfunction formatSignedDelta(delta, { suffix = \"\", decimals = 1 } = {}) {\n if (isNullish(delta)) return null;\n const n = Number(delta);\n if (!Number.isFinite(n)) return null;\n const sign = n > 0 ? \"+\" : n < 0 ? \"\" : \"\";\n return `${sign}${n.toFixed(decimals)}${suffix}`;\n}\n\n/** Pull a numeric time series from API `trend[]` buckets (skips nulls). */\nexport function extractTrendSeries(trend, key, { includeZero = true } = {}) {\n if (!Array.isArray(trend)) return [];\n return trend\n .map((bucket) => bucket?.[key])\n .filter((v) => {\n if (v == null) return false;\n const n = Number(v);\n if (!Number.isFinite(n)) return false;\n return includeZero || n !== 0;\n })\n .map(Number);\n}\n\nfunction formatPercent(value, decimals = 1) {\n if (isNullish(value)) return METRIC_PLACEHOLDER;\n return `${(Number(value) * 100).toFixed(decimals)}%`;\n}\n\nfunction formatPp(value, decimals = 1) {\n if (isNullish(value)) return METRIC_PLACEHOLDER;\n const n = Number(value) * 100;\n const sign = n > 0 ? \"+\" : \"\";\n return `${sign}${n.toFixed(decimals)}pp`;\n}\n\nfunction formatCount(value) {\n if (isNullish(value)) return METRIC_PLACEHOLDER;\n return Number(value).toLocaleString(\"en-US\");\n}\n\nfunction formatCsat(value, decimals = 2) {\n if (isNullish(value)) return METRIC_PLACEHOLDER;\n return Number(value).toFixed(decimals);\n}\n\nfunction statLabel(base, delta, formatter) {\n const deltaStr = formatter(delta);\n return deltaStr ? `${base} (${deltaStr})` : base;\n}\n\n/**\n * Map `/performance/agents/{projectId}/v2/__all__` (or agent-specific) payload\n * to PerformancePanel KPI stat props. Pass each stat's `points` into the panel\n * for real sparklines instead of the decorative fallback curve.\n */\nexport function mapPerformanceKpiStats(api) {\n const current = api?.current ?? {};\n const deltas = api?.deltas ?? {};\n const trend = api?.trend ?? [];\n\n const volumePoints = extractTrendSeries(trend, \"count\", { includeZero: true });\n const csatPoints = extractTrendSeries(trend, \"csat\");\n const baselinePoints = extractTrendSeries(trend, \"baseline\").map((v) => v * 100);\n const liftPoints = extractTrendSeries(trend, \"agent_lift\").map((v) => v * 100);\n const scorePoints = extractTrendSeries(trend, \"score\").map((v) => v * 100);\n\n const volumeStat = {\n value: formatCount(current.call_count),\n label: \"Volume\",\n trend: trendFromDelta(deltas.call_count),\n points: volumePoints,\n };\n\n const compassStat = {\n value: formatCsat(current.avg_csat),\n label: statLabel(\"Compass Score\", deltas.csat, (d) => formatSignedDelta(d, { decimals: 2 })),\n trend: trendFromDelta(deltas.csat),\n points: csatPoints,\n };\n\n const baselineSubStat = {\n value: formatPercent(current.avg_baseline),\n label: statLabel(\"Baseline\", deltas.baseline, (d) =>\n formatSignedDelta(Number(d) * 100, { suffix: \"\", decimals: 1 }),\n ),\n trend: trendFromDelta(deltas.baseline),\n points: baselinePoints,\n };\n\n const agentLiftSubStat = {\n value: formatPp(current.avg_agent_lift),\n label: statLabel(\"Agent Lift\", deltas.agent_lift, (d) =>\n formatSignedDelta(Number(d) * 100, { suffix: \"pp\", decimals: 1 }),\n ),\n trend: trendFromDelta(deltas.agent_lift),\n points: liftPoints,\n };\n\n const scoreSubStat = {\n value: formatPercent(current.avg_score),\n label: statLabel(\"Score\", deltas.score, (d) =>\n formatSignedDelta(Number(d) * 100, { suffix: \"\", decimals: 1 }),\n ),\n trend: trendFromDelta(deltas.score),\n points: scorePoints,\n };\n\n // When points exist, prefer shape-derived direction for sparkline consistency.\n for (const stat of [volumeStat, compassStat, baselineSubStat, agentLiftSubStat, scoreSubStat]) {\n const derived = trendFromPoints(stat.points);\n if (derived) stat.trend = derived;\n }\n\n return {\n volumeStat,\n compassStat,\n baselineSubStat,\n agentLiftSubStat,\n scoreSubStat,\n };\n}\n"],"names":["METRIC_PLACEHOLDER","isNullish","value","trendFromDelta","delta","formatSignedDelta","suffix","decimals","n","extractTrendSeries","trend","key","includeZero","bucket","v","formatPercent","formatPp","formatCount","formatCsat","statLabel","base","formatter","deltaStr","mapPerformanceKpiStats","api","current","deltas","volumePoints","csatPoints","baselinePoints","liftPoints","scorePoints","volumeStat","compassStat","d","baselineSubStat","agentLiftSubStat","scoreSubStat","stat","derived","trendFromPoints"],"mappings":";;;;;;;;;;;;;;AAEA,MAAMA,IAAqB;AAE3B,SAASC,EAAUC,GAAO;AACxB,SAAOA,KAAS,QAAS,OAAOA,KAAU,YAAY,OAAO,MAAMA,CAAK;AAC1E;AAE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,IAAI,KAAK,EAAE,QAAQ,IAAI,UAAU,GAAG;AAAA,IAC/D;AAAA,IACD,OAAO/B,EAAeuB,EAAO,QAAQ;AAAA,IACrC,QAAQG;AAAA,EACZ,GAEQO,IAAmB;AAAA,IACvB,OAAOpB,EAASS,EAAQ,cAAc;AAAA,IACtC,OAAON;AAAA,MAAU;AAAA,MAAcO,EAAO;AAAA,MAAY,CAACQ,MACjD7B,EAAkB,OAAO6B,CAAC,IAAI,KAAK,EAAE,QAAQ,MAAM,UAAU,GAAG;AAAA,IACjE;AAAA,IACD,OAAO/B,EAAeuB,EAAO,UAAU;AAAA,IACvC,QAAQI;AAAA,EACZ,GAEQO,IAAe;AAAA,IACnB,OAAOtB,EAAcU,EAAQ,SAAS;AAAA,IACtC,OAAON;AAAA,MAAU;AAAA,MAASO,EAAO;AAAA,MAAO,CAACQ,MACvC7B,EAAkB,OAAO6B,CAAC,IAAI,KAAK,EAAE,QAAQ,IAAI,UAAU,GAAG;AAAA,IAC/D;AAAA,IACD,OAAO/B,EAAeuB,EAAO,KAAK;AAAA,IAClC,QAAQK;AAAA,EACZ;AAGE,aAAWO,KAAQ,CAACN,GAAYC,GAAaE,GAAiBC,GAAkBC,CAAY,GAAG;AAC7F,UAAME,IAAUC,EAAgBF,EAAK,MAAM;AAC3C,IAAIC,MAASD,EAAK,QAAQC;AAAA,EAC3B;AAED,SAAO;AAAA,IACL,YAAAP;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAE;AAAA,IACA,kBAAAC;AAAA,IACA,cAAAC;AAAA,EACJ;AACA;"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),S=require("react"),c=require("lucide-react"),ue=require("../DataTable2.cjs.js"),he=require("../PerformancePanel.cjs.js"),xe=require("../ConfirmationPopup.cjs.js");require("../sortable.esm.cjs.js");require("react-dom");require("../CustomFilterChips.cjs.js");require("motion/react");require("recharts");require("../AgentLiftAnalysisCard.cjs.js");require("../TourGuideTooltip.cjs.js");const a={ink:"var(--color-text)",muted:"var(--color-text-secondary)",border:"var(--grey-absent)",borderSubtle:"var(--neutral-100)",black:"var(--neutral-900)",white:"var(--grey-white)",neutralBorder:"var(--neutral-250)",neutralLight:"var(--neutral-100)",neutral850:"var(--neutral-850)",neutral800:"var(--neutral-800)",neutral50:"var(--neutral-50)"},F="var(--font-sans, 'Averta', ui-sans-serif, system-ui, sans-serif)",pe=[{id:"8h",label:"8h"},{id:"1d",label:"1d"},{id:"7d",label:"7d"},{id:"30d",label:"30d"}],fe={"8h":8*60*60*1e3,"1d":24*60*60*1e3,"7d":7*24*60*60*1e3,"30d":30*24*60*60*1e3};function V(t){return t instanceof Date?t.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"numeric"}):String(t??"")}function ye(t){const r=fe[t];if(!r)return"";const n=new Date,s=new Date(n.getTime()-r);return`${V(s)} – ${V(n)}`}function ge({label:t,active:r=!1,onClick:n}){return e.jsx("button",{type:"button",onClick:n,style:{height:32,minWidth:31,padding:"0 12px",borderRadius:10,border:r?"none":`1px solid ${a.borderSubtle}`,background:r?a.black:a.white,color:r?a.white:a.black,fontFamily:F,fontSize:14,cursor:"pointer"},children:t})}const be={active:c.CloudCheck,failed:c.GlobeX,suspended:c.Ban,paused:c.CirclePause};function me({value:t}){if(t==null||t==="")return null;const r=String(t).toLowerCase(),n=be[r]||c.CloudCheck;return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontFamily:F,fontSize:12,color:a.ink,lineHeight:"16px"},children:[e.jsx(n,{size:20,strokeWidth:1.5,style:{color:a.ink}}),t]})}function ee({icon:t,label:r,onClick:n}){return e.jsx("button",{type:"button","aria-label":r||void 0,title:r||void 0,onClick:s=>{s.stopPropagation(),n==null||n()},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,padding:4,borderRadius:4,border:"none",background:"transparent",cursor:n?"pointer":"default",color:a.ink},children:e.jsx(t,{size:16,strokeWidth:1.5})})}function je({enabled:t}){return e.jsx("span",{"aria-hidden":"true",style:{position:"relative",display:"inline-block",width:32,height:18,flexShrink:0,borderRadius:18/2,background:t?a.neutral850:a.white,border:t?"1px solid transparent":`1px solid ${a.neutralBorder}`,boxSizing:"border-box",transition:"background 0.15s ease, border-color 0.15s ease"},children:e.jsx("span",{style:{position:"absolute",top:"50%",left:t?"auto":3-1,right:t?3-1:"auto",width:12,height:12,borderRadius:"50%",background:t?a.white:"var(--neutral-500, #949494)",transform:"translateY(-50%)",transition:"background 0.15s ease"}})})}function Se({value:t,enabledLabel:r,disabledLabel:n,onToggle:s}){const l=t!==!1&&t!=="disabled"&&t!=="off",[d,u]=S.useState(l);S.useEffect(()=>{u(l)},[l]);const h=d?r:n;return e.jsxs("button",{type:"button",onClick:j=>{j.stopPropagation();const p=!d;u(p),s==null||s(p)},style:{display:"inline-flex",alignItems:"center",gap:8,height:20,padding:"4px 8px",borderRadius:24,border:"none",background:"transparent",cursor:"pointer",fontFamily:F,fontSize:14,lineHeight:"20px",color:a.black},children:[e.jsx(je,{enabled:d}),h]})}const ne=[{id:"task",label:"Task",width:336,sortable:!0,filterable:!0},{id:"schedule",label:"Schedule",width:164,sortable:!0,filterable:!0},{id:"status",label:"Status",width:140,sortable:!0,filterable:!0,render:t=>e.jsx(me,{value:t})},{id:"lastRunDate",label:"Last Run Date",width:140,sortable:!0},{id:"nextScheduled",label:"Next Scheduled",width:140,sortable:!0}];function ke({className:t="",title:r="",dateRangeLabel:n="",onExport:s,exportLabel:l="",onCreateReport:d,createReportLabel:u="",rangeOptions:h=pe,selectedWindow:j="30d",onWindowChange:p,dateRangePicker:M,dateRange:A,onDateRangeChange:k,reports:X=[],reportColumns:E=ne,initialPageSize:T=10,onReportClick:C,onVisibleColumnsChange:H,onToggleReport:g,toggleEnabledLabel:w="",toggleDisabledLabel:b="",onEditReport:D,onDeleteReport:v,editLabel:$="Edit",deleteLabel:m="Delete",deleteConfirmTitle:L="Delete Report",deleteConfirmMessage:O="Do you really want to delete this report? This action cannot be undone.",deleteConfirmCancelLabel:N="Cancel",reportsTotal:U=null,reportsPage:_=null,reportsPageSize:Z=null,onReportsPageChange:B,onReportsPageSizeChange:J}){const[P,R]=S.useState(null),[q,z]=S.useState(null),f=A!==void 0?A:P,W=!!(f!=null&&f.from&&(f!=null&&f.to)),Y=x=>{R(x),k==null||k(x)},y=x=>{R(null),k==null||k(null),p==null||p(x)},I=W?`${V(f.from)} – ${V(f.to)}`:n||ye(j),oe=S.useMemo(()=>{const x=!!(D||v),de={id:"action",label:"",width:x?200:117,sortable:!1,filterable:!1,render:(We,G)=>{const ae=G.enabled===void 0?!0:!!G.enabled,Q=w||b||g;return!Q&&!x?null:e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:16,width:"100%",justifyContent:"flex-end"},children:[Q&&e.jsx(Se,{value:ae,enabledLabel:w,disabledLabel:b,onToggle:ce=>g==null?void 0:g(G,ce)}),x&&e.jsxs("span",{className:"cdr-reports-row-actions",style:{display:"inline-flex",gap:12},children:[D&&e.jsx(ee,{icon:c.Pencil,label:$,onClick:()=>D(G)}),v&&e.jsx(ee,{icon:c.Trash2,label:m,onClick:()=>z(G)})]})]})}};return[...E,de]},[E,g,w,b,D,v,$,m]);return e.jsxs("div",{className:`cdr-reports-list${t?` ${t}`:""}`,style:{background:a.white,fontFamily:F,color:a.ink,width:"100%",minWidth:1192,boxSizing:"border-box",padding:"12px 32px 32px",display:"flex",flexDirection:"column",gap:24},children:[e.jsx("style",{children:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),k=require("react"),c=require("lucide-react"),ue=require("../DataTable2.cjs.js"),V=require("../PerformancePanel.cjs.js"),he=require("../ConfirmationPopup.cjs.js");require("../sortable.esm.cjs.js");require("react-dom");require("../CustomFilterChips.cjs.js");require("motion/react");require("recharts");require("../AgentLiftAnalysisCard.cjs.js");require("../TourGuideTooltip.cjs.js");const a={ink:"var(--color-text)",muted:"var(--color-text-secondary)",border:"var(--grey-absent)",borderSubtle:"var(--neutral-100)",black:"var(--neutral-900)",white:"var(--grey-white)",neutralBorder:"var(--neutral-250)",neutralLight:"var(--neutral-100)",neutral850:"var(--neutral-850)",neutral800:"var(--neutral-800)",neutral50:"var(--neutral-50)"},F="var(--font-sans, 'Averta', ui-sans-serif, system-ui, sans-serif)",xe=[{id:"8h",label:"8h"},{id:"1d",label:"1d"},{id:"7d",label:"7d"},{id:"30d",label:"30d"}];function pe({label:t,active:l=!1,onClick:n}){return e.jsx("button",{type:"button",onClick:n,style:{height:32,minWidth:31,padding:"0 12px",borderRadius:10,border:l?"none":`1px solid ${a.borderSubtle}`,background:l?a.black:a.white,color:l?a.white:a.black,fontFamily:F,fontSize:14,cursor:"pointer"},children:t})}const fe={active:c.CloudCheck,failed:c.GlobeX,suspended:c.Ban,paused:c.CirclePause};function ye({value:t}){if(t==null||t==="")return null;const l=String(t).toLowerCase(),n=fe[l]||c.CloudCheck;return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontFamily:F,fontSize:12,color:a.ink,lineHeight:"16px"},children:[e.jsx(n,{size:20,strokeWidth:1.5,style:{color:a.ink}}),t]})}function ee({icon:t,label:l,onClick:n}){return e.jsx("button",{type:"button","aria-label":l||void 0,title:l||void 0,onClick:s=>{s.stopPropagation(),n==null||n()},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,padding:4,borderRadius:4,border:"none",background:"transparent",cursor:n?"pointer":"default",color:a.ink},children:e.jsx(t,{size:16,strokeWidth:1.5})})}function be({enabled:t}){return e.jsx("span",{"aria-hidden":"true",style:{position:"relative",display:"inline-block",width:32,height:18,flexShrink:0,borderRadius:18/2,background:t?a.neutral850:a.white,border:t?"1px solid transparent":`1px solid ${a.neutralBorder}`,boxSizing:"border-box",transition:"background 0.15s ease, border-color 0.15s ease"},children:e.jsx("span",{style:{position:"absolute",top:"50%",left:t?"auto":3-1,right:t?3-1:"auto",width:12,height:12,borderRadius:"50%",background:t?a.white:"var(--neutral-500, #949494)",transform:"translateY(-50%)",transition:"background 0.15s ease"}})})}function ge({value:t,enabledLabel:l,disabledLabel:n,onToggle:s}){const r=t!==!1&&t!=="disabled"&&t!=="off",[d,u]=k.useState(r);k.useEffect(()=>{u(r)},[r]);const h=d?l:n;return e.jsxs("button",{type:"button",onClick:j=>{j.stopPropagation();const p=!d;u(p),s==null||s(p)},style:{display:"inline-flex",alignItems:"center",gap:8,height:20,padding:"4px 8px",borderRadius:24,border:"none",background:"transparent",cursor:"pointer",fontFamily:F,fontSize:14,lineHeight:"20px",color:a.black},children:[e.jsx(be,{enabled:d}),h]})}const ne=[{id:"task",label:"Task",width:336,sortable:!0,filterable:!0},{id:"schedule",label:"Schedule",width:164,sortable:!0,filterable:!0},{id:"status",label:"Status",width:140,sortable:!0,filterable:!0,render:t=>e.jsx(ye,{value:t})},{id:"lastRunDate",label:"Last Run Date",width:140,sortable:!0},{id:"nextScheduled",label:"Next Scheduled",width:140,sortable:!0}];function me({className:t="",title:l="",dateRangeLabel:n="",onExport:s,exportLabel:r="",onCreateReport:d,createReportLabel:u="",rangeOptions:h=xe,selectedWindow:j="30d",onWindowChange:p,dateRangePicker:M,dateRange:$,onDateRangeChange:S,reports:X=[],reportColumns:E=ne,initialPageSize:T=10,onReportClick:C,onVisibleColumnsChange:H,onToggleReport:b,toggleEnabledLabel:w="",toggleDisabledLabel:g="",onEditReport:D,onDeleteReport:v,editLabel:A="Edit",deleteLabel:m="Delete",deleteConfirmTitle:L="Delete Report",deleteConfirmMessage:O="Do you really want to delete this report? This action cannot be undone.",deleteConfirmCancelLabel:B="Cancel",reportsTotal:N=null,reportsPage:U=null,reportsPageSize:Z=null,onReportsPageChange:_,onReportsPageSizeChange:J}){const[P,R]=k.useState(null),[q,z]=k.useState(null),f=$!==void 0?$:P,W=!!(f!=null&&f.from&&(f!=null&&f.to)),Y=x=>{R(x),S==null||S(x)},y=x=>{R(null),S==null||S(null),p==null||p(x)},I=W?`${V.formatLocalDate(f.from)} – ${V.formatLocalDate(f.to)}`:V.computeWindowLabel(j)||n,oe=k.useMemo(()=>{const x=!!(D||v),de={id:"action",label:"",width:x?200:117,sortable:!1,filterable:!1,render:(Fe,G)=>{const ae=G.enabled===void 0?!0:!!G.enabled,Q=w||g||b;return!Q&&!x?null:e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:16,width:"100%",justifyContent:"flex-end"},children:[Q&&e.jsx(ge,{value:ae,enabledLabel:w,disabledLabel:g,onToggle:ce=>b==null?void 0:b(G,ce)}),x&&e.jsxs("span",{className:"cdr-reports-row-actions",style:{display:"inline-flex",gap:12},children:[D&&e.jsx(ee,{icon:c.Pencil,label:A,onClick:()=>D(G)}),v&&e.jsx(ee,{icon:c.Trash2,label:m,onClick:()=>z(G)})]})]})}};return[...E,de]},[E,b,w,g,D,v,A,m]);return e.jsxs("div",{className:`cdr-reports-list${t?` ${t}`:""}`,style:{background:a.white,fontFamily:F,color:a.ink,width:"100%",minWidth:1192,boxSizing:"border-box",padding:"12px 32px 32px",display:"flex",flexDirection:"column",gap:24},children:[e.jsx("style",{children:`
2
2
  .cdr-reports-list .cdr-reports-row-actions {
3
3
  opacity: 0;
4
4
  transition: opacity 0.12s ease;
@@ -7,5 +7,5 @@
7
7
  .cdr-reports-list tr:focus-within .cdr-reports-row-actions {
8
8
  opacity: 1;
9
9
  }
10
- `}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingTop:12,flexWrap:"wrap"},children:[e.jsx("h1",{style:{fontFamily:F,fontSize:24,fontWeight:400,color:a.ink,margin:0,lineHeight:1.2,letterSpacing:"-0.01em",flex:1,minWidth:0},children:r}),e.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[I&&e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontFamily:F,fontSize:13,color:a.ink,marginRight:6,whiteSpace:"nowrap"},children:[e.jsx(c.CalendarDays,{size:16,strokeWidth:1.75,style:{color:a.muted}}),I]}),h.map(x=>e.jsx(ge,{label:x.label,active:!W&&x.id===j,onClick:()=>y(x.id)},x.id)),M||e.jsx(he.DateRangeButton,{value:f,onChange:Y}),l&&e.jsxs("button",{type:"button",onClick:()=>s==null?void 0:s(),style:{display:"inline-flex",alignItems:"center",gap:8,height:32,padding:"0 16px",borderRadius:10,border:`1px solid ${a.neutralBorder}`,background:a.white,cursor:"pointer",fontFamily:F,fontSize:14,color:a.neutral800},children:[e.jsx(c.Download,{size:18,strokeWidth:1.75}),l]}),u&&e.jsxs("button",{type:"button",onClick:()=>d==null?void 0:d(),style:{display:"inline-flex",alignItems:"center",gap:8,height:32,padding:"0 16px",borderRadius:10,border:"none",background:a.neutral850,cursor:"pointer",fontFamily:F,fontSize:16,fontWeight:400,color:a.neutral50,whiteSpace:"nowrap"},children:[e.jsx(c.Plus,{size:20,strokeWidth:1.75}),u]})]})]}),e.jsx(ue.DataTable2,{data:X,columns:oe,initialPageSize:T,onRowClick:C,onVisibleColumnsChange:H,hideColumnPicker:!0,totalCount:U,page:_,pageSize:Z,onPageChange:B,onPageSizeChange:J}),e.jsx(xe.ConfirmationPopup,{open:!!q,title:L,content:O,primaryLabel:N,secondaryLabel:m,onPrimary:()=>z(null),onSecondary:()=>{const x=q;z(null),x&&(v==null||v(x))},onClose:()=>z(null)})]})}const i={ink:"var(--color-text)",muted:"var(--color-text-secondary)",border:"var(--grey-absent)",borderSubtle:"var(--neutral-100)",black:"var(--neutral-900)",white:"var(--grey-white)",neutralBorder:"var(--neutral-250)",neutralLight:"var(--neutral-100)",neutral850:"var(--neutral-850)",neutral800:"var(--neutral-800)",neutral50:"var(--neutral-50)",neutral200:"var(--neutral-200)",textSecondary:"var(--text-item)",textMidtone:"var(--text-subtle-warm)",selectedRow:"var(--focus-2)",summaryBg:"var(--surface-warm-40)",hoverGrey:"var(--surface-hover)"},o="var(--font-sans, 'Averta', ui-sans-serif, system-ui, sans-serif)",te="Varta, var(--font-sans, sans-serif)";function re({as:t="span",text:r,style:n,...s}){const l=S.useRef(null),[d,u]=S.useState(!1);return S.useEffect(()=>{const h=l.current;if(!h)return;const j=()=>u(h.scrollWidth>h.clientWidth);if(j(),typeof ResizeObserver>"u")return;const p=new ResizeObserver(j);return p.observe(h),()=>p.disconnect()},[r]),e.jsx(t,{ref:l,title:d&&r!=null?String(r):void 0,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,...n},...s,children:r})}function we(t){if(t==null||t==="")return"";const r=t instanceof Date?t:new Date(String(t));if(Number.isNaN(r.getTime()))return String(t);const n=r.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"numeric"}),s=r.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${n} at ${s}`}const ve={active:c.CloudCheck,paused:c.CirclePause,suspended:c.Ban};function le({value:t,size:r=20}){if(t==null||t==="")return null;const n=ve[String(t).toLowerCase()]||c.CloudCheck;return e.jsx(n,{size:r,strokeWidth:1.5,style:{color:i.ink}})}function ze({value:t}){return t==null||t===""?null:e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontFamily:o,fontSize:12,color:i.ink,lineHeight:"16px"},children:[e.jsx(le,{value:t}),t]})}function Ie({item:t,selected:r,onClick:n}){return e.jsxs("button",{type:"button",onClick:n,style:{display:"flex",gap:4,padding:"8px 4px",borderRadius:8,border:"none",background:r?i.selectedRow:i.white,cursor:n?"pointer":"default",textAlign:"left",width:"100%",fontFamily:o},children:[e.jsx("div",{style:{width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(le,{value:t.status})}),e.jsxs("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:2},children:[e.jsx(re,{text:t.title,style:{fontFamily:o,fontWeight:600,fontSize:14,color:i.ink,lineHeight:1.2}}),(()=>{const s=we(t.timestamp);return s?e.jsx("span",{style:{fontFamily:o,fontSize:12,color:i.ink,lineHeight:1.5},children:s}):null})()]})]})}function K({label:t,active:r=!1,disabled:n=!1,onClick:s,leading:l,trailing:d}){return e.jsxs("button",{type:"button",onClick:s,disabled:n,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:4,height:24,minWidth:22,padding:"4px 8px",borderRadius:10,border:r?"none":`1px solid ${i.borderSubtle}`,background:r?i.black:i.white,color:r?i.white:i.black,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,fontFamily:o,fontSize:12,lineHeight:"16px"},children:[l,t,d]})}function Fe({page:t=1,totalPages:r=1,onPageChange:n,backLabel:s="",nextLabel:l=""}){const d=Array.from({length:r},(u,h)=>h+1);return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"16px 0",borderTop:`1px solid ${i.border}`},children:[e.jsx(K,{label:s,leading:e.jsx(c.ChevronLeft,{size:12,strokeWidth:1.75}),disabled:t<=1,onClick:()=>n==null?void 0:n(Math.max(1,t-1))}),d.map(u=>e.jsx(K,{label:String(u),active:u===t,onClick:()=>n==null?void 0:n(u)},u)),e.jsx(K,{label:l,trailing:e.jsx(c.ChevronRight,{size:12,strokeWidth:1.75}),disabled:t>=r,onClick:()=>n==null?void 0:n(Math.min(r,t+1))})]})}function ie({children:t}){return e.jsx("div",{style:{height:40,display:"flex",alignItems:"center",borderBottom:`1px solid ${i.border}`,fontFamily:o,fontSize:16,color:i.ink},children:t})}function Ce({columns:t,rows:r,totalRow:n}){if(!(t!=null&&t.length))return null;const s={padding:12,fontFamily:o,fontSize:14,lineHeight:"20px",color:i.black,boxSizing:"border-box"};return e.jsx("div",{style:{border:`1px solid ${i.neutral200}`,borderRadius:4,background:i.white,overflow:"hidden"},children:e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed"},children:[e.jsx("colgroup",{children:t.map(l=>e.jsx("col",{style:l.width?{width:l.width}:void 0},l.id))}),e.jsx("thead",{children:e.jsx("tr",{style:{background:i.neutral50,height:36},children:t.map((l,d)=>e.jsx("th",{style:{...s,fontWeight:500,textAlign:l.align||(d===0?"left":"right"),borderBottom:`1px solid ${i.borderSubtle}`},children:l.label},l.id))})}),e.jsxs("tbody",{children:[(r||[]).map((l,d)=>e.jsx("tr",{style:{height:36},children:t.map((u,h)=>e.jsx("td",{style:{...s,textAlign:u.align||(h===0?"left":"right"),borderBottom:`1px solid ${i.borderSubtle}`},children:l[u.id]},u.id))},l.id??d)),n&&e.jsx("tr",{style:{height:36,background:i.neutral50},children:t.map((l,d)=>e.jsx("td",{style:{...s,fontWeight:500,textAlign:l.align||(d===0?"left":"right")},children:n[l.id]},l.id))})]})]})})}const se=[{id:"location",label:"Location",width:242,align:"left"},{id:"calls",label:"Calls",width:90,align:"right"},{id:"percentOfTotal",label:"% of Total",width:90,align:"right"},{id:"avgCsat",label:"Avg CSAT",width:90,align:"right"},{id:"inbound",label:"Inbound",width:90,align:"right"},{id:"client",label:"Client",width:90,align:"right"}];function He({className:t="",reportTitle:r="",onBack:n,onManage:s,manageLabel:l="",onCreateReport:d,createReportLabel:u="",previousReports:h=[],selectedReportId:j=null,onSelectReport:p,previousReportsPage:M=1,previousReportsTotalPages:A=1,onPreviousReportsPageChange:k,paginationBackLabel:X="",paginationNextLabel:E="",reportSubtitle:T="",dateLabel:C="",dateValue:H="",status:g="",shareLabel:w="",onShare:b,shareCopied:D=!1,shareCopiedLabel:v="Link copied",pdfLabel:$="",onPdf:m,summaryTitle:L="",summaryBody:O="",introBold:N="",introMeta:U="",distributionTitle:_="",distributionColumns:Z=se,distributionRows:B=[],distributionTotalRow:J,observationsTitle:P="",observations:R=[],closingBoldLines:q=[],closingMeta:z="",rightColumnExtra:f=null}){const[W,Y]=S.useState(!1);return e.jsxs("div",{className:t,style:{background:i.white,fontFamily:o,color:i.ink,width:"100%",minWidth:1192,boxSizing:"border-box",display:"flex",flexDirection:"column"},children:[e.jsxs("div",{"data-print-hide":"true",style:{display:"flex",alignItems:"center",gap:12,padding:"12px 32px",minHeight:78,boxSizing:"border-box"},children:[e.jsx("button",{type:"button","aria-label":"Back",onClick:n,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,background:"transparent",border:"none",cursor:n?"pointer":"default",color:i.ink,padding:0,flexShrink:0},children:e.jsx(c.ArrowLeft,{size:20,strokeWidth:1.75})}),e.jsx("div",{style:{flex:1,minWidth:0,paddingLeft:16,borderLeft:`1px solid ${i.border}`,alignSelf:"stretch",display:"flex",alignItems:"center"},children:e.jsx("h1",{style:{fontFamily:o,fontSize:24,fontWeight:400,color:i.ink,margin:0,lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r})}),l&&e.jsxs("button",{type:"button",onClick:()=>s==null?void 0:s(),style:{display:"inline-flex",alignItems:"center",gap:8,height:32,padding:"0 16px",borderRadius:10,border:`1px solid ${i.neutralBorder}`,background:i.white,cursor:"pointer",fontFamily:o,fontSize:14,color:i.neutral800,flexShrink:0},children:[e.jsx(c.Settings2,{size:20,strokeWidth:1.75}),l]}),u&&e.jsxs("button",{type:"button",onClick:()=>d==null?void 0:d(),style:{display:"inline-flex",alignItems:"center",gap:8,height:32,padding:"0 16px",borderRadius:10,border:"none",background:i.neutral850,cursor:"pointer",fontFamily:o,fontSize:16,fontWeight:400,color:i.neutral50,whiteSpace:"nowrap",flexShrink:0},children:[e.jsx(c.Plus,{size:20,strokeWidth:1.75}),u]})]}),e.jsxs("div",{style:{display:"flex",gap:24,padding:"24px 32px",borderTop:`1px solid ${i.border}`,alignItems:"flex-start"},children:[!W&&e.jsxs("aside",{"data-print-hide":"true",style:{width:360,flexShrink:0,borderRight:`1px solid ${i.borderSubtle}`,paddingRight:20,display:"flex",flexDirection:"column",gap:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,paddingLeft:4,paddingTop:12},children:[e.jsx("span",{style:{fontFamily:o,fontSize:14,color:i.ink,lineHeight:1.2},children:`History (${h.length} ${h.length===1?"Report":"Reports"})`}),e.jsx("button",{type:"button","aria-label":"Collapse history",title:"Collapse history",onClick:()=>Y(!0),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,padding:0,borderRadius:4,border:"none",background:"transparent",cursor:"pointer",color:i.ink},children:e.jsx(c.PanelLeftClose,{size:16,strokeWidth:1.75})})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:h.map((y,I)=>e.jsx(Ie,{item:y,selected:y.id!=null&&y.id===j,onClick:p?()=>p(y):void 0},y.id??I))}),A>1&&e.jsx(Fe,{page:M,totalPages:A,onPageChange:k,backLabel:X,nextLabel:E})]}),e.jsxs("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:16},children:[(W||T||C||H||g||w)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:24,width:"100%"},children:[(W||T)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flex:1,minWidth:0},children:[W&&e.jsxs("button",{type:"button","aria-label":"Show history",title:"Show history",onClick:()=>Y(!1),"data-print-hide":"true",style:{display:"inline-flex",alignItems:"center",gap:8,height:28,padding:"8px 16px",borderRadius:10,border:`1px solid ${i.neutralBorder}`,background:i.white,cursor:"pointer",fontFamily:o,fontSize:14,lineHeight:"24px",color:i.neutral800,flexShrink:0},children:["History",e.jsx(c.PanelLeftOpen,{size:16,strokeWidth:1.75})]}),T&&e.jsx(re,{text:T,style:{flex:1,minWidth:0,fontFamily:te,fontSize:20,color:i.ink,fontWeight:400,lineHeight:"normal"}})]}),(C||H||g||w||$)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexShrink:0,justifyContent:"flex-end"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"flex-end",flex:1,minWidth:0},children:[(C||H)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"8px 0",fontSize:13,color:i.ink,lineHeight:1.2},children:[C&&e.jsx("span",{style:{fontFamily:o,whiteSpace:"nowrap"},children:C}),H&&e.jsx("span",{style:{fontFamily:te,whiteSpace:"nowrap"},children:H})]}),g&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:4,paddingLeft:16,borderLeft:`1px solid ${i.border}`},children:e.jsx(ze,{value:g})})]}),$&&e.jsx("div",{"data-print-hide":"true",style:{flexShrink:0},children:e.jsxs("button",{type:"button",onClick:()=>m==null?void 0:m(),disabled:!m,"aria-label":"Download as PDF",title:"Download as PDF",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:8,height:28,padding:"8px 16px",boxSizing:"border-box",borderRadius:10,border:"none",background:i.hoverGrey,cursor:m?"pointer":"not-allowed",opacity:m?1:.6,fontFamily:o,fontSize:14,lineHeight:"24px",color:i.ink,whiteSpace:"nowrap"},children:[e.jsx(c.FileDown,{size:16,strokeWidth:1.5}),$]})}),w&&e.jsxs("div",{"data-print-hide":"true",style:{position:"relative",flexShrink:0},children:[e.jsxs("button",{type:"button",onClick:()=>b==null?void 0:b(),disabled:!b,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:8,height:28,padding:"8px 16px",boxSizing:"border-box",borderRadius:10,border:"none",background:i.hoverGrey,cursor:b?"pointer":"not-allowed",opacity:b?1:.6,fontFamily:o,fontSize:14,lineHeight:"24px",color:i.ink,whiteSpace:"nowrap"},children:[e.jsx(c.Share2,{size:16,strokeWidth:1.75}),w]}),D&&e.jsxs("div",{role:"status","aria-live":"polite",style:{position:"absolute",top:"calc(100% + 8px)",right:0,zIndex:50,background:"#2e3236",color:"#ffffff",borderRadius:10,boxShadow:"0 8px 24px rgba(11,11,11,0.18)",padding:"8px 12px",display:"inline-flex",alignItems:"center",gap:8,fontFamily:o,fontSize:13,lineHeight:1,whiteSpace:"nowrap"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M2.66683 10.6667C1.9335 10.6667 1.3335 10.0667 1.3335 9.33337V2.66671C1.3335 1.93337 1.9335 1.33337 2.66683 1.33337H9.3335C10.0668 1.33337 10.6668 1.93337 10.6668 2.66671M6.66683 5.33337H13.3335C14.0699 5.33337 14.6668 5.93033 14.6668 6.66671V13.3334C14.6668 14.0698 14.0699 14.6667 13.3335 14.6667H6.66683C5.93045 14.6667 5.3335 14.0698 5.3335 13.3334V6.66671C5.3335 5.93033 5.93045 5.33337 6.66683 5.33337Z",stroke:"#F2F2F0",strokeLinecap:"round",strokeLinejoin:"round"})}),v]})]})]})]}),(L||O)&&e.jsxs("div",{style:{background:i.summaryBg,border:`1px solid ${i.border}`,borderRadius:8,padding:24,display:"flex",flexDirection:"column",gap:12},children:[L&&e.jsx("span",{style:{fontFamily:o,fontWeight:600,fontSize:15,color:i.ink,lineHeight:1.2},children:L}),O&&e.jsx("p",{style:{fontFamily:o,fontSize:14,color:i.ink,margin:0,lineHeight:1.5},children:O})]}),(N||U)&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[N&&e.jsx("p",{style:{fontFamily:o,fontWeight:500,fontSize:14,color:i.textSecondary,margin:0,lineHeight:1.5},children:N}),U&&e.jsx("p",{style:{fontFamily:o,fontSize:14,color:i.textMidtone,margin:0,lineHeight:1.5},children:U})]}),(_||B.length>0)&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[_&&e.jsx(ie,{children:_}),B.length>0&&e.jsx(Ce,{columns:Z,rows:B,totalRow:J})]}),(P||R.length>0)&&e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[P&&e.jsx(ie,{children:P}),R.map((y,I)=>e.jsx("p",{style:{fontFamily:o,fontSize:14,color:i.ink,margin:0,padding:"12px 0 16px",borderBottom:`1px solid ${i.border}`,lineHeight:1.5},children:y},I))]}),(q.length>0||z)&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14,padding:"12px 0"},children:[q.map((y,I)=>e.jsx("p",{style:{fontFamily:o,fontWeight:500,fontSize:14,color:i.textSecondary,margin:0,lineHeight:1.5},children:y},I)),z&&e.jsx("p",{style:{fontFamily:o,fontSize:14,color:i.textMidtone,margin:0,lineHeight:1.5},children:z})]}),f]})]})]})}exports.DEFAULT_DISTRIBUTION_COLUMNS=se;exports.DEFAULT_REPORTS_COLUMNS=ne;exports.ReportsDetails=He;exports.ReportsList=ke;
10
+ `}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,paddingTop:12,flexWrap:"wrap"},children:[e.jsx("h1",{style:{fontFamily:F,fontSize:24,fontWeight:400,color:a.ink,margin:0,lineHeight:1.2,letterSpacing:"-0.01em",flex:1,minWidth:0},children:l}),e.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[I&&e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontFamily:F,fontSize:13,color:a.ink,marginRight:6,whiteSpace:"nowrap"},children:[e.jsx(c.CalendarDays,{size:16,strokeWidth:1.75,style:{color:a.muted}}),I]}),h.map(x=>e.jsx(pe,{label:x.label,active:!W&&x.id===j,onClick:()=>y(x.id)},x.id)),M||e.jsx(V.DateRangeButton,{value:f,onChange:Y}),r&&e.jsxs("button",{type:"button",onClick:()=>s==null?void 0:s(),style:{display:"inline-flex",alignItems:"center",gap:8,height:32,padding:"0 16px",borderRadius:10,border:`1px solid ${a.neutralBorder}`,background:a.white,cursor:"pointer",fontFamily:F,fontSize:14,color:a.neutral800},children:[e.jsx(c.Download,{size:18,strokeWidth:1.75}),r]}),u&&e.jsxs("button",{type:"button",onClick:()=>d==null?void 0:d(),style:{display:"inline-flex",alignItems:"center",gap:8,height:32,padding:"0 16px",borderRadius:10,border:"none",background:a.neutral850,cursor:"pointer",fontFamily:F,fontSize:16,fontWeight:400,color:a.neutral50,whiteSpace:"nowrap"},children:[e.jsx(c.Plus,{size:20,strokeWidth:1.75}),u]})]})]}),e.jsx(ue.DataTable2,{data:X,columns:oe,initialPageSize:T,onRowClick:C,onVisibleColumnsChange:H,hideColumnPicker:!0,totalCount:N,page:U,pageSize:Z,onPageChange:_,onPageSizeChange:J}),e.jsx(he.ConfirmationPopup,{open:!!q,title:L,content:O,primaryLabel:B,secondaryLabel:m,onPrimary:()=>z(null),onSecondary:()=>{const x=q;z(null),x&&(v==null||v(x))},onClose:()=>z(null)})]})}const i={ink:"var(--color-text)",muted:"var(--color-text-secondary)",border:"var(--grey-absent)",borderSubtle:"var(--neutral-100)",black:"var(--neutral-900)",white:"var(--grey-white)",neutralBorder:"var(--neutral-250)",neutralLight:"var(--neutral-100)",neutral850:"var(--neutral-850)",neutral800:"var(--neutral-800)",neutral50:"var(--neutral-50)",neutral200:"var(--neutral-200)",textSecondary:"var(--text-item)",textMidtone:"var(--text-subtle-warm)",selectedRow:"var(--focus-2)",summaryBg:"var(--surface-warm-40)",hoverGrey:"var(--surface-hover)"},o="var(--font-sans, 'Averta', ui-sans-serif, system-ui, sans-serif)",te="Varta, var(--font-sans, sans-serif)";function le({as:t="span",text:l,style:n,...s}){const r=k.useRef(null),[d,u]=k.useState(!1);return k.useEffect(()=>{const h=r.current;if(!h)return;const j=()=>u(h.scrollWidth>h.clientWidth);if(j(),typeof ResizeObserver>"u")return;const p=new ResizeObserver(j);return p.observe(h),()=>p.disconnect()},[l]),e.jsx(t,{ref:r,title:d&&l!=null?String(l):void 0,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,...n},...s,children:l})}function je(t){if(t==null||t==="")return"";const l=t instanceof Date?t:new Date(String(t));if(Number.isNaN(l.getTime()))return String(t);const n=l.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"numeric"}),s=l.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${n} at ${s}`}const ke={active:c.CloudCheck,paused:c.CirclePause,suspended:c.Ban};function re({value:t,size:l=20}){if(t==null||t==="")return null;const n=ke[String(t).toLowerCase()]||c.CloudCheck;return e.jsx(n,{size:l,strokeWidth:1.5,style:{color:i.ink}})}function Se({value:t}){return t==null||t===""?null:e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,fontFamily:o,fontSize:12,color:i.ink,lineHeight:"16px"},children:[e.jsx(re,{value:t}),t]})}function we({item:t,selected:l,onClick:n}){return e.jsxs("button",{type:"button",onClick:n,style:{display:"flex",gap:4,padding:"8px 4px",borderRadius:8,border:"none",background:l?i.selectedRow:i.white,cursor:n?"pointer":"default",textAlign:"left",width:"100%",fontFamily:o},children:[e.jsx("div",{style:{width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(re,{value:t.status})}),e.jsxs("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:2},children:[e.jsx(le,{text:t.title,style:{fontFamily:o,fontWeight:600,fontSize:14,color:i.ink,lineHeight:1.2}}),(()=>{const s=je(t.timestamp);return s?e.jsx("span",{style:{fontFamily:o,fontSize:12,color:i.ink,lineHeight:1.5},children:s}):null})()]})]})}function K({label:t,active:l=!1,disabled:n=!1,onClick:s,leading:r,trailing:d}){return e.jsxs("button",{type:"button",onClick:s,disabled:n,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:4,height:24,minWidth:22,padding:"4px 8px",borderRadius:10,border:l?"none":`1px solid ${i.borderSubtle}`,background:l?i.black:i.white,color:l?i.white:i.black,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,fontFamily:o,fontSize:12,lineHeight:"16px"},children:[r,t,d]})}function ve({page:t=1,totalPages:l=1,onPageChange:n,backLabel:s="",nextLabel:r=""}){const d=Array.from({length:l},(u,h)=>h+1);return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"16px 0",borderTop:`1px solid ${i.border}`},children:[e.jsx(K,{label:s,leading:e.jsx(c.ChevronLeft,{size:12,strokeWidth:1.75}),disabled:t<=1,onClick:()=>n==null?void 0:n(Math.max(1,t-1))}),d.map(u=>e.jsx(K,{label:String(u),active:u===t,onClick:()=>n==null?void 0:n(u)},u)),e.jsx(K,{label:r,trailing:e.jsx(c.ChevronRight,{size:12,strokeWidth:1.75}),disabled:t>=l,onClick:()=>n==null?void 0:n(Math.min(l,t+1))})]})}function ie({children:t}){return e.jsx("div",{style:{height:40,display:"flex",alignItems:"center",borderBottom:`1px solid ${i.border}`,fontFamily:o,fontSize:16,color:i.ink},children:t})}function ze({columns:t,rows:l,totalRow:n}){if(!(t!=null&&t.length))return null;const s={padding:12,fontFamily:o,fontSize:14,lineHeight:"20px",color:i.black,boxSizing:"border-box"};return e.jsx("div",{style:{border:`1px solid ${i.neutral200}`,borderRadius:4,background:i.white,overflow:"hidden"},children:e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed"},children:[e.jsx("colgroup",{children:t.map(r=>e.jsx("col",{style:r.width?{width:r.width}:void 0},r.id))}),e.jsx("thead",{children:e.jsx("tr",{style:{background:i.neutral50,height:36},children:t.map((r,d)=>e.jsx("th",{style:{...s,fontWeight:500,textAlign:r.align||(d===0?"left":"right"),borderBottom:`1px solid ${i.borderSubtle}`},children:r.label},r.id))})}),e.jsxs("tbody",{children:[(l||[]).map((r,d)=>e.jsx("tr",{style:{height:36},children:t.map((u,h)=>e.jsx("td",{style:{...s,textAlign:u.align||(h===0?"left":"right"),borderBottom:`1px solid ${i.borderSubtle}`},children:r[u.id]},u.id))},r.id??d)),n&&e.jsx("tr",{style:{height:36,background:i.neutral50},children:t.map((r,d)=>e.jsx("td",{style:{...s,fontWeight:500,textAlign:r.align||(d===0?"left":"right")},children:n[r.id]},r.id))})]})]})})}const se=[{id:"location",label:"Location",width:242,align:"left"},{id:"calls",label:"Calls",width:90,align:"right"},{id:"percentOfTotal",label:"% of Total",width:90,align:"right"},{id:"avgCsat",label:"Avg CSAT",width:90,align:"right"},{id:"inbound",label:"Inbound",width:90,align:"right"},{id:"client",label:"Client",width:90,align:"right"}];function Ie({className:t="",reportTitle:l="",onBack:n,onManage:s,manageLabel:r="",onCreateReport:d,createReportLabel:u="",previousReports:h=[],selectedReportId:j=null,onSelectReport:p,previousReportsPage:M=1,previousReportsTotalPages:$=1,onPreviousReportsPageChange:S,paginationBackLabel:X="",paginationNextLabel:E="",reportSubtitle:T="",dateLabel:C="",dateValue:H="",status:b="",shareLabel:w="",onShare:g,shareCopied:D=!1,shareCopiedLabel:v="Link copied",pdfLabel:A="",onPdf:m,summaryTitle:L="",summaryBody:O="",introBold:B="",introMeta:N="",distributionTitle:U="",distributionColumns:Z=se,distributionRows:_=[],distributionTotalRow:J,observationsTitle:P="",observations:R=[],closingBoldLines:q=[],closingMeta:z="",rightColumnExtra:f=null}){const[W,Y]=k.useState(!1);return e.jsxs("div",{className:t,style:{background:i.white,fontFamily:o,color:i.ink,width:"100%",minWidth:1192,boxSizing:"border-box",display:"flex",flexDirection:"column"},children:[e.jsxs("div",{"data-print-hide":"true",style:{display:"flex",alignItems:"center",gap:12,padding:"12px 32px",minHeight:78,boxSizing:"border-box"},children:[e.jsx("button",{type:"button","aria-label":"Back",onClick:n,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,background:"transparent",border:"none",cursor:n?"pointer":"default",color:i.ink,padding:0,flexShrink:0},children:e.jsx(c.ArrowLeft,{size:20,strokeWidth:1.75})}),e.jsx("div",{style:{flex:1,minWidth:0,paddingLeft:16,borderLeft:`1px solid ${i.border}`,alignSelf:"stretch",display:"flex",alignItems:"center"},children:e.jsx("h1",{style:{fontFamily:o,fontSize:24,fontWeight:400,color:i.ink,margin:0,lineHeight:1.2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l})}),r&&e.jsxs("button",{type:"button",onClick:()=>s==null?void 0:s(),style:{display:"inline-flex",alignItems:"center",gap:8,height:32,padding:"0 16px",borderRadius:10,border:`1px solid ${i.neutralBorder}`,background:i.white,cursor:"pointer",fontFamily:o,fontSize:14,color:i.neutral800,flexShrink:0},children:[e.jsx(c.Settings2,{size:20,strokeWidth:1.75}),r]}),u&&e.jsxs("button",{type:"button",onClick:()=>d==null?void 0:d(),style:{display:"inline-flex",alignItems:"center",gap:8,height:32,padding:"0 16px",borderRadius:10,border:"none",background:i.neutral850,cursor:"pointer",fontFamily:o,fontSize:16,fontWeight:400,color:i.neutral50,whiteSpace:"nowrap",flexShrink:0},children:[e.jsx(c.Plus,{size:20,strokeWidth:1.75}),u]})]}),e.jsxs("div",{style:{display:"flex",gap:24,padding:"24px 32px",borderTop:`1px solid ${i.border}`,alignItems:"flex-start"},children:[!W&&e.jsxs("aside",{"data-print-hide":"true",style:{width:360,flexShrink:0,borderRight:`1px solid ${i.borderSubtle}`,paddingRight:20,display:"flex",flexDirection:"column",gap:12},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,paddingLeft:4,paddingTop:12},children:[e.jsx("span",{style:{fontFamily:o,fontSize:14,color:i.ink,lineHeight:1.2},children:`History (${h.length} ${h.length===1?"Report":"Reports"})`}),e.jsx("button",{type:"button","aria-label":"Collapse history",title:"Collapse history",onClick:()=>Y(!0),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,padding:0,borderRadius:4,border:"none",background:"transparent",cursor:"pointer",color:i.ink},children:e.jsx(c.PanelLeftClose,{size:16,strokeWidth:1.75})})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:h.map((y,I)=>e.jsx(we,{item:y,selected:y.id!=null&&y.id===j,onClick:p?()=>p(y):void 0},y.id??I))}),$>1&&e.jsx(ve,{page:M,totalPages:$,onPageChange:S,backLabel:X,nextLabel:E})]}),e.jsxs("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:16},children:[(W||T||C||H||b||w)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:24,width:"100%"},children:[(W||T)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flex:1,minWidth:0},children:[W&&e.jsxs("button",{type:"button","aria-label":"Show history",title:"Show history",onClick:()=>Y(!1),"data-print-hide":"true",style:{display:"inline-flex",alignItems:"center",gap:8,height:28,padding:"8px 16px",borderRadius:10,border:`1px solid ${i.neutralBorder}`,background:i.white,cursor:"pointer",fontFamily:o,fontSize:14,lineHeight:"24px",color:i.neutral800,flexShrink:0},children:["History",e.jsx(c.PanelLeftOpen,{size:16,strokeWidth:1.75})]}),T&&e.jsx(le,{text:T,style:{flex:1,minWidth:0,fontFamily:te,fontSize:20,color:i.ink,fontWeight:400,lineHeight:"normal"}})]}),(C||H||b||w||A)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexShrink:0,justifyContent:"flex-end"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"flex-end",flex:1,minWidth:0},children:[(C||H)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"8px 0",fontSize:13,color:i.ink,lineHeight:1.2},children:[C&&e.jsx("span",{style:{fontFamily:o,whiteSpace:"nowrap"},children:C}),H&&e.jsx("span",{style:{fontFamily:te,whiteSpace:"nowrap"},children:H})]}),b&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:4,paddingLeft:16,borderLeft:`1px solid ${i.border}`},children:e.jsx(Se,{value:b})})]}),A&&e.jsx("div",{"data-print-hide":"true",style:{flexShrink:0},children:e.jsxs("button",{type:"button",onClick:()=>m==null?void 0:m(),disabled:!m,"aria-label":"Download as PDF",title:"Download as PDF",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:8,height:28,padding:"8px 16px",boxSizing:"border-box",borderRadius:10,border:"none",background:i.hoverGrey,cursor:m?"pointer":"not-allowed",opacity:m?1:.6,fontFamily:o,fontSize:14,lineHeight:"24px",color:i.ink,whiteSpace:"nowrap"},children:[e.jsx(c.FileDown,{size:16,strokeWidth:1.5}),A]})}),w&&e.jsxs("div",{"data-print-hide":"true",style:{position:"relative",flexShrink:0},children:[e.jsxs("button",{type:"button",onClick:()=>g==null?void 0:g(),disabled:!g,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:8,height:28,padding:"8px 16px",boxSizing:"border-box",borderRadius:10,border:"none",background:i.hoverGrey,cursor:g?"pointer":"not-allowed",opacity:g?1:.6,fontFamily:o,fontSize:14,lineHeight:"24px",color:i.ink,whiteSpace:"nowrap"},children:[e.jsx(c.Share2,{size:16,strokeWidth:1.75}),w]}),D&&e.jsxs("div",{role:"status","aria-live":"polite",style:{position:"absolute",top:"calc(100% + 8px)",right:0,zIndex:50,background:"#2e3236",color:"#ffffff",borderRadius:10,boxShadow:"0 8px 24px rgba(11,11,11,0.18)",padding:"8px 12px",display:"inline-flex",alignItems:"center",gap:8,fontFamily:o,fontSize:13,lineHeight:1,whiteSpace:"nowrap"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M2.66683 10.6667C1.9335 10.6667 1.3335 10.0667 1.3335 9.33337V2.66671C1.3335 1.93337 1.9335 1.33337 2.66683 1.33337H9.3335C10.0668 1.33337 10.6668 1.93337 10.6668 2.66671M6.66683 5.33337H13.3335C14.0699 5.33337 14.6668 5.93033 14.6668 6.66671V13.3334C14.6668 14.0698 14.0699 14.6667 13.3335 14.6667H6.66683C5.93045 14.6667 5.3335 14.0698 5.3335 13.3334V6.66671C5.3335 5.93033 5.93045 5.33337 6.66683 5.33337Z",stroke:"#F2F2F0",strokeLinecap:"round",strokeLinejoin:"round"})}),v]})]})]})]}),(L||O)&&e.jsxs("div",{style:{background:i.summaryBg,border:`1px solid ${i.border}`,borderRadius:8,padding:24,display:"flex",flexDirection:"column",gap:12},children:[L&&e.jsx("span",{style:{fontFamily:o,fontWeight:600,fontSize:15,color:i.ink,lineHeight:1.2},children:L}),O&&e.jsx("p",{style:{fontFamily:o,fontSize:14,color:i.ink,margin:0,lineHeight:1.5},children:O})]}),(B||N)&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[B&&e.jsx("p",{style:{fontFamily:o,fontWeight:500,fontSize:14,color:i.textSecondary,margin:0,lineHeight:1.5},children:B}),N&&e.jsx("p",{style:{fontFamily:o,fontSize:14,color:i.textMidtone,margin:0,lineHeight:1.5},children:N})]}),(U||_.length>0)&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[U&&e.jsx(ie,{children:U}),_.length>0&&e.jsx(ze,{columns:Z,rows:_,totalRow:J})]}),(P||R.length>0)&&e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[P&&e.jsx(ie,{children:P}),R.map((y,I)=>e.jsx("p",{style:{fontFamily:o,fontSize:14,color:i.ink,margin:0,padding:"12px 0 16px",borderBottom:`1px solid ${i.border}`,lineHeight:1.5},children:y},I))]}),(q.length>0||z)&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14,padding:"12px 0"},children:[q.map((y,I)=>e.jsx("p",{style:{fontFamily:o,fontWeight:500,fontSize:14,color:i.textSecondary,margin:0,lineHeight:1.5},children:y},I)),z&&e.jsx("p",{style:{fontFamily:o,fontSize:14,color:i.textMidtone,margin:0,lineHeight:1.5},children:z})]}),f]})]})]})}exports.DEFAULT_DISTRIBUTION_COLUMNS=se;exports.DEFAULT_REPORTS_COLUMNS=ne;exports.ReportsDetails=Ie;exports.ReportsList=me;
11
11
  //# sourceMappingURL=reports.cjs.js.map