@elementor/editor-audits 4.4.0-1074 → 4.4.0-1076

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -13,10 +13,10 @@ import { __ as __22 } from "@wordpress/i18n";
13
13
  import { createFloatingPanel } from "@elementor/editor-floating-panels";
14
14
 
15
15
  // src/components/audit-panel.tsx
16
- import * as React22 from "react";
16
+ import * as React23 from "react";
17
17
  import { getCurrentDocumentId as getCurrentDocumentId2 } from "@elementor/editor-elements";
18
18
  import { FloatingPanelBody, FloatingPanelFooter, FloatingPanelHeader } from "@elementor/editor-floating-panels";
19
- import { Box as Box19, Button as Button4, Typography as Typography15 } from "@elementor/ui";
19
+ import { Box as Box19, Button as Button5, Typography as Typography15 } from "@elementor/ui";
20
20
  import { __ as __21 } from "@wordpress/i18n";
21
21
 
22
22
  // src/hooks/use-audit-report.ts
@@ -39,18 +39,66 @@ function getWindowConfig() {
39
39
  return config;
40
40
  }
41
41
 
42
+ // src/utils/session-expiration.ts
43
+ var NONCE_INVALID_CODE = "rest_cookie_invalid_nonce";
44
+ var DEFAULT_AJAX_URL = "/wp-admin/admin-ajax.php";
45
+ var SessionExpiredError = class extends Error {
46
+ };
47
+ var nonceRefreshPromise = null;
48
+ function isNonceInvalidError(error) {
49
+ const response = error?.response;
50
+ return response?.status === 403 && response?.data?.code === NONCE_INVALID_CODE;
51
+ }
52
+ async function refreshAuditsNonce() {
53
+ if (nonceRefreshPromise) {
54
+ return nonceRefreshPromise;
55
+ }
56
+ nonceRefreshPromise = requestFreshNonce();
57
+ try {
58
+ return await nonceRefreshPromise;
59
+ } finally {
60
+ nonceRefreshPromise = null;
61
+ }
62
+ }
63
+ async function requestFreshNonce() {
64
+ const ajaxUrl = window.elementorCommon?.ajax?.config?.url ?? DEFAULT_AJAX_URL;
65
+ const url = new URL(ajaxUrl, window.location.origin);
66
+ url.searchParams.set("action", "rest-nonce");
67
+ const response = await fetch(url.toString(), { credentials: "same-origin" });
68
+ if (!response.ok) {
69
+ throw new Error(`Failed to refresh audits nonce: HTTP ${response.status}`);
70
+ }
71
+ const nonce = await response.text();
72
+ if (!nonce || "0" === nonce) {
73
+ throw new SessionExpiredError("Session expired \u2014 received invalid nonce");
74
+ }
75
+ window.elementorAudits = { ...getWindowConfig(), nonce };
76
+ return nonce;
77
+ }
78
+
42
79
  // src/api/page-context-client.ts
43
80
  async function fetchPageContext(documentId, attachmentIds) {
81
+ return requestPageContext(documentId, attachmentIds, true);
82
+ }
83
+ async function requestPageContext(documentId, attachmentIds, allowNonceRetry) {
44
84
  const { restNamespace, nonce } = getWindowConfig();
45
85
  const url = `${restNamespace}/audits/page-context`;
46
- const response = await httpService().get(url, {
47
- params: {
48
- document_id: documentId,
49
- attachment_ids: attachmentIds
50
- },
51
- headers: { "X-WP-Nonce": nonce }
52
- });
53
- return response.data;
86
+ try {
87
+ const response = await httpService().get(url, {
88
+ params: {
89
+ document_id: documentId,
90
+ attachment_ids: attachmentIds
91
+ },
92
+ headers: { "X-WP-Nonce": nonce }
93
+ });
94
+ return response.data;
95
+ } catch (error) {
96
+ if (!allowNonceRetry || !isNonceInvalidError(error)) {
97
+ throw error;
98
+ }
99
+ await refreshAuditsNonce();
100
+ return requestPageContext(documentId, attachmentIds, false);
101
+ }
54
102
  }
55
103
 
56
104
  // src/registry.ts
@@ -422,6 +470,9 @@ var slice = __createSlice({
422
470
  state.status = "error";
423
471
  state.error = action.payload;
424
472
  },
473
+ runAborted(state) {
474
+ state.status = state.report ? "ready" : "idle";
475
+ },
425
476
  reportRestored(state, action) {
426
477
  state.status = "ready";
427
478
  state.report = action.payload;
@@ -483,6 +534,10 @@ function useAuditReport() {
483
534
  dispatch(slice.actions.runSucceeded(nextReport));
484
535
  persistReport(documentIdToRun, nextReport);
485
536
  } catch (e) {
537
+ if (e instanceof SessionExpiredError) {
538
+ dispatch(slice.actions.runAborted());
539
+ return;
540
+ }
486
541
  dispatch(slice.actions.runFailed(e instanceof Error ? e.message : "Unknown error"));
487
542
  }
488
543
  };
@@ -668,13 +723,13 @@ function WelcomePage() {
668
723
  }
669
724
 
670
725
  // src/components/report-shell.tsx
671
- import * as React21 from "react";
726
+ import * as React22 from "react";
672
727
  import { useState as useState4 } from "react";
673
728
  import { Box as Box18, Divider as Divider2, Tab, Tabs } from "@elementor/ui";
674
729
  import { __ as __20 } from "@wordpress/i18n";
675
730
 
676
731
  // src/components/pages/all-audits-page.tsx
677
- import * as React11 from "react";
732
+ import * as React12 from "react";
678
733
  import { Box as Box8 } from "@elementor/ui";
679
734
  import { __ as __12 } from "@wordpress/i18n";
680
735
 
@@ -727,7 +782,7 @@ function SubpageHeader({ title, onBack, backLabel, icon }) {
727
782
  }
728
783
 
729
784
  // src/components/violation-row.tsx
730
- import * as React10 from "react";
785
+ import * as React11 from "react";
731
786
  import { useState as useState3 } from "react";
732
787
  import { getElementIcon, getElementTitle } from "@elementor/editor-elements";
733
788
  import { AlertCircleIcon as AlertCircleIcon2, BulbIcon, CheckIcon, ChevronDownIcon as ChevronDownIcon2, EyeIcon, HelpIcon } from "@elementor/icons";
@@ -844,13 +899,25 @@ function SeverityIcon({ severity }) {
844
899
  return /* @__PURE__ */ React8.createElement(Icon, { fontSize: "small", color });
845
900
  }
846
901
 
847
- // src/components/violation-icons.tsx
902
+ // src/components/violation-cta-button.tsx
848
903
  import * as React9 from "react";
904
+ import { Button as Button3 } from "@elementor/ui";
905
+ function ViolationCtaButton({ ctaLabel, externalUrl }) {
906
+ const handleClick = (event) => {
907
+ event.stopPropagation();
908
+ event.preventDefault();
909
+ window.open(externalUrl, "_blank", "noopener");
910
+ };
911
+ return /* @__PURE__ */ React9.createElement(Button3, { variant: "outlined", color: "secondary", size: "small", onClick: handleClick }, ctaLabel);
912
+ }
913
+
914
+ // src/components/violation-icons.tsx
915
+ import * as React10 from "react";
849
916
  import { FileSettingsIcon, SettingsIcon, ShieldCheckIcon } from "@elementor/icons";
850
917
  import { Box as Box6 } from "@elementor/ui";
851
918
  function ViolationIcon({ violation, widgetIcon }) {
852
919
  if (widgetIcon) {
853
- return /* @__PURE__ */ React9.createElement(
920
+ return /* @__PURE__ */ React10.createElement(
854
921
  Box6,
855
922
  {
856
923
  component: "i",
@@ -861,28 +928,28 @@ function ViolationIcon({ violation, widgetIcon }) {
861
928
  );
862
929
  }
863
930
  if (violation.targetHint === "page-settings") {
864
- return /* @__PURE__ */ React9.createElement(FileSettingsIcon, { fontSize: "inherit", "aria-hidden": true });
931
+ return /* @__PURE__ */ React10.createElement(FileSettingsIcon, { fontSize: "inherit", "aria-hidden": true });
865
932
  }
866
933
  if (violation.targetHint === "site-settings" || violation.targetHint === "site-identity-settings") {
867
- return /* @__PURE__ */ React9.createElement(SettingsIcon, { fontSize: "inherit", "aria-hidden": true });
934
+ return /* @__PURE__ */ React10.createElement(SettingsIcon, { fontSize: "inherit", "aria-hidden": true });
868
935
  }
869
- return /* @__PURE__ */ React9.createElement(ShieldCheckIcon, { fontSize: "inherit", "aria-hidden": true });
936
+ return /* @__PURE__ */ React10.createElement(ShieldCheckIcon, { fontSize: "inherit", "aria-hidden": true });
870
937
  }
871
938
 
872
939
  // src/components/violation-row.tsx
873
940
  function SkipReasonTooltip({ reason }) {
874
- return /* @__PURE__ */ React10.createElement(Tooltip3, { title: reason, placement: "top" }, /* @__PURE__ */ React10.createElement(Box7, { "aria-label": reason, component: "span", sx: { display: "inline-flex", alignItems: "center" } }, /* @__PURE__ */ React10.createElement(HelpIcon, { fontSize: "small", color: "action" })));
941
+ return /* @__PURE__ */ React11.createElement(Tooltip3, { title: reason, placement: "top" }, /* @__PURE__ */ React11.createElement(Box7, { "aria-label": reason, component: "span", sx: { display: "inline-flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement(HelpIcon, { fontSize: "small", color: "action" })));
875
942
  }
876
943
  function StatusIndicator({ audit: audit21, violations }) {
877
944
  if (violations) {
878
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", color: "text.secondary", fontWeight: "bold" }, violations.length), /* @__PURE__ */ React10.createElement(SeverityIcon, { severity: audit21.severity }));
945
+ return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", color: "text.secondary", fontWeight: "bold" }, violations.length), /* @__PURE__ */ React11.createElement(SeverityIcon, { severity: audit21.severity }));
879
946
  }
880
- return /* @__PURE__ */ React10.createElement(CheckIcon, { fontSize: "small", color: "success" });
947
+ return /* @__PURE__ */ React11.createElement(CheckIcon, { fontSize: "small", color: "success" });
881
948
  }
882
949
  function ViolationRow({ audit: audit21, skipReason, violations }) {
883
950
  const [expanded, setExpanded] = useState3(false);
884
951
  const toggleExpanded = () => setExpanded((value) => !value);
885
- return /* @__PURE__ */ React10.createElement(Box7, { sx: { borderBottom: 1, borderColor: "divider", paddingBlock: 0.5 } }, /* @__PURE__ */ React10.createElement(Box7, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React10.createElement(
952
+ return /* @__PURE__ */ React11.createElement(Box7, { sx: { borderBottom: 1, borderColor: "divider", paddingBlock: 0.5 } }, /* @__PURE__ */ React11.createElement(Box7, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React11.createElement(
886
953
  Box7,
887
954
  {
888
955
  sx: {
@@ -895,16 +962,16 @@ function ViolationRow({ audit: audit21, skipReason, violations }) {
895
962
  },
896
963
  onClick: toggleExpanded
897
964
  },
898
- /* @__PURE__ */ React10.createElement(Typography6, { variant: "body2", sx: { flex: 1 } }, audit21.title),
899
- !skipReason && /* @__PURE__ */ React10.createElement(StatusIndicator, { audit: audit21, violations })
900
- ), skipReason && /* @__PURE__ */ React10.createElement(SkipReasonTooltip, { reason: skipReason }), /* @__PURE__ */ React10.createElement(
965
+ /* @__PURE__ */ React11.createElement(Typography6, { variant: "body2", sx: { flex: 1 } }, audit21.title),
966
+ !skipReason && /* @__PURE__ */ React11.createElement(StatusIndicator, { audit: audit21, violations })
967
+ ), skipReason && /* @__PURE__ */ React11.createElement(SkipReasonTooltip, { reason: skipReason }), /* @__PURE__ */ React11.createElement(
901
968
  IconButton5,
902
969
  {
903
970
  size: "small",
904
971
  "aria-label": expanded ? __11("Collapse", "elementor") : __11("Expand", "elementor"),
905
972
  onClick: toggleExpanded
906
973
  },
907
- /* @__PURE__ */ React10.createElement(
974
+ /* @__PURE__ */ React11.createElement(
908
975
  ChevronDownIcon2,
909
976
  {
910
977
  fontSize: "small",
@@ -914,29 +981,29 @@ function ViolationRow({ audit: audit21, skipReason, violations }) {
914
981
  }
915
982
  }
916
983
  )
917
- )), /* @__PURE__ */ React10.createElement(Collapse2, { in: expanded }, /* @__PURE__ */ React10.createElement(Box7, { sx: { display: "flex", flexDirection: "column", gap: 1, paddingBlock: 1 } }, /* @__PURE__ */ React10.createElement(
984
+ )), /* @__PURE__ */ React11.createElement(Collapse2, { in: expanded }, /* @__PURE__ */ React11.createElement(Box7, { sx: { display: "flex", flexDirection: "column", gap: 1, paddingBlock: 1 } }, /* @__PURE__ */ React11.createElement(
918
985
  Alert,
919
986
  {
920
987
  severity: "secondary",
921
988
  sx: { p: 1 },
922
- icon: /* @__PURE__ */ React10.createElement(AlertCircleIcon2, { fontSize: "small", color: "secondary", "aria-hidden": true })
989
+ icon: /* @__PURE__ */ React11.createElement(AlertCircleIcon2, { fontSize: "small", color: "secondary", "aria-hidden": true })
923
990
  },
924
- /* @__PURE__ */ React10.createElement(AlertTitle, null, /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, __11("What's the issue", "elementor"))),
925
- /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", component: "p", color: "text.secondary" }, audit21.description)
926
- ), /* @__PURE__ */ React10.createElement(
991
+ /* @__PURE__ */ React11.createElement(AlertTitle, null, /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, __11("What's the issue", "elementor"))),
992
+ /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.secondary" }, audit21.description)
993
+ ), /* @__PURE__ */ React11.createElement(
927
994
  Alert,
928
995
  {
929
996
  severity: "info",
930
997
  sx: { p: 1 },
931
- icon: /* @__PURE__ */ React10.createElement(BulbIcon, { fontSize: "small", color: "info", "aria-hidden": true })
998
+ icon: /* @__PURE__ */ React11.createElement(BulbIcon, { fontSize: "small", color: "info", "aria-hidden": true })
932
999
  },
933
- /* @__PURE__ */ React10.createElement(AlertTitle, null, /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, __11("How to resolve", "elementor"))),
934
- /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", component: "p", color: "text.secondary" }, audit21.fixHint)
935
- )), violations && violations.length > 0 && /* @__PURE__ */ React10.createElement(Box7, { role: "list", sx: { paddingBlockEnd: 1, paddingInlineStart: 2 } }, violations.map((violation, idx) => {
1000
+ /* @__PURE__ */ React11.createElement(AlertTitle, null, /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, __11("How to resolve", "elementor"))),
1001
+ /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.secondary" }, audit21.fixHint)
1002
+ )), violations && violations.length > 0 && /* @__PURE__ */ React11.createElement(Box7, { role: "list", sx: { paddingBlockEnd: 1, paddingInlineStart: 2 } }, violations.map((violation, idx) => {
936
1003
  const widgetIcon = violation.elementId ? getElementIcon(violation.elementId) : null;
937
1004
  const elementTitle = violation.elementId ? getElementTitle(violation.elementId) : null;
938
1005
  const rowLabel = elementTitle ? `${elementTitle} - ${violation.label}` : violation.label;
939
- return /* @__PURE__ */ React10.createElement(
1006
+ return /* @__PURE__ */ React11.createElement(
940
1007
  Box7,
941
1008
  {
942
1009
  key: idx,
@@ -959,10 +1026,23 @@ function ViolationRow({ audit: audit21, skipReason, violations }) {
959
1026
  }
960
1027
  }
961
1028
  },
962
- /* @__PURE__ */ React10.createElement(ViolationIcon, { violation, widgetIcon }),
963
- /* @__PURE__ */ React10.createElement(Box7, { sx: { flex: 1 } }, /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption" }, rowLabel), violation.detail && /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", color: "text.secondary" }, violation.detail)),
964
- violation.angieFix && /* @__PURE__ */ React10.createElement(FixViolationWithAngie, { prompt: buildAngiePrompt(rowLabel) }),
965
- /* @__PURE__ */ React10.createElement(EyeIcon, { className: "violation-hover-icon", fontSize: "tiny", "aria-hidden": true })
1029
+ /* @__PURE__ */ React11.createElement(ViolationIcon, { violation, widgetIcon }),
1030
+ /* @__PURE__ */ React11.createElement(Box7, { sx: { flex: 1 } }, /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption" }, rowLabel), violation.detail && /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", color: "text.secondary" }, violation.detail)),
1031
+ violation.angieFix && /* @__PURE__ */ React11.createElement(FixViolationWithAngie, { prompt: buildAngiePrompt(rowLabel) }),
1032
+ violation.ctaLabel && violation.externalUrl ? /* @__PURE__ */ React11.createElement(
1033
+ ViolationCtaButton,
1034
+ {
1035
+ ctaLabel: violation.ctaLabel,
1036
+ externalUrl: violation.externalUrl
1037
+ }
1038
+ ) : /* @__PURE__ */ React11.createElement(
1039
+ EyeIcon,
1040
+ {
1041
+ className: "violation-hover-icon",
1042
+ fontSize: "tiny",
1043
+ "aria-hidden": true
1044
+ }
1045
+ )
966
1046
  );
967
1047
  }))));
968
1048
  }
@@ -973,7 +1053,7 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
973
1053
  const expandFail = !initialExpandedStatus || initialExpandedStatus === "fail";
974
1054
  const expandPass = initialExpandedStatus === "pass";
975
1055
  const expandSkipped = initialExpandedStatus === "skipped";
976
- return /* @__PURE__ */ React11.createElement(Box8, { key: initialExpandedStatus ?? "default" }, /* @__PURE__ */ React11.createElement(SubpageHeader, { title: __12("All audits", "elementor"), onBack }), /* @__PURE__ */ React11.createElement(Box8, { sx: { p: 1 } }, /* @__PURE__ */ React11.createElement(
1056
+ return /* @__PURE__ */ React12.createElement(Box8, { key: initialExpandedStatus ?? "default" }, /* @__PURE__ */ React12.createElement(SubpageHeader, { title: __12("All audits", "elementor"), onBack }), /* @__PURE__ */ React12.createElement(Box8, { sx: { p: 1 } }, /* @__PURE__ */ React12.createElement(
977
1057
  StatusSection,
978
1058
  {
979
1059
  label: auditStatusLabel("fail"),
@@ -981,8 +1061,8 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
981
1061
  color: auditStatusColor("fail"),
982
1062
  defaultExpanded: expandFail
983
1063
  },
984
- failed.map((r) => /* @__PURE__ */ React11.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
985
- ), /* @__PURE__ */ React11.createElement(
1064
+ failed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
1065
+ ), /* @__PURE__ */ React12.createElement(
986
1066
  StatusSection,
987
1067
  {
988
1068
  label: auditStatusLabel("pass"),
@@ -990,8 +1070,8 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
990
1070
  color: auditStatusColor("pass"),
991
1071
  defaultExpanded: expandPass
992
1072
  },
993
- passed.map((r) => /* @__PURE__ */ React11.createElement(ViolationRow, { key: r.audit.id, audit: r.audit }))
994
- ), /* @__PURE__ */ React11.createElement(
1073
+ passed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit }))
1074
+ ), /* @__PURE__ */ React12.createElement(
995
1075
  StatusSection,
996
1076
  {
997
1077
  label: auditStatusLabel("skipped"),
@@ -999,12 +1079,12 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
999
1079
  color: auditStatusColor("skipped"),
1000
1080
  defaultExpanded: expandSkipped
1001
1081
  },
1002
- skipped.map((r) => /* @__PURE__ */ React11.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, skipReason: r.result.reason }))
1082
+ skipped.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, skipReason: r.result.reason }))
1003
1083
  )));
1004
1084
  }
1005
1085
 
1006
1086
  // src/components/pages/category-page.tsx
1007
- import * as React12 from "react";
1087
+ import * as React13 from "react";
1008
1088
  import { Box as Box9 } from "@elementor/ui";
1009
1089
  import { __ as __13 } from "@wordpress/i18n";
1010
1090
 
@@ -1028,15 +1108,15 @@ var CATEGORY_ICONS = {
1028
1108
  function CategoryPage({ category, report, onBack }) {
1029
1109
  const Icon = CATEGORY_ICONS[category];
1030
1110
  const { failed, passed, totalViolations } = partitionAuditResults(report, { category });
1031
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
1111
+ return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
1032
1112
  SubpageHeader,
1033
1113
  {
1034
1114
  title: CATEGORY_LABELS[category],
1035
1115
  onBack,
1036
1116
  backLabel: __13("Back to all issues", "elementor"),
1037
- icon: /* @__PURE__ */ React12.createElement(Icon, { fontSize: "small", color: "action" })
1117
+ icon: /* @__PURE__ */ React13.createElement(Icon, { fontSize: "small", color: "action" })
1038
1118
  }
1039
- ), /* @__PURE__ */ React12.createElement(Box9, { sx: { p: 1 } }, /* @__PURE__ */ React12.createElement(
1119
+ ), /* @__PURE__ */ React13.createElement(Box9, { sx: { p: 1 } }, /* @__PURE__ */ React13.createElement(
1040
1120
  StatusSection,
1041
1121
  {
1042
1122
  label: __13("Failed audits", "elementor"),
@@ -1044,12 +1124,12 @@ function CategoryPage({ category, report, onBack }) {
1044
1124
  color: "error",
1045
1125
  defaultExpanded: true
1046
1126
  },
1047
- failed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
1048
- ), /* @__PURE__ */ React12.createElement(StatusSection, { label: __13("Passed audits", "elementor"), count: passed.length, color: "success" }, passed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit })))));
1127
+ failed.map((r) => /* @__PURE__ */ React13.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
1128
+ ), /* @__PURE__ */ React13.createElement(StatusSection, { label: __13("Passed audits", "elementor"), count: passed.length, color: "success" }, passed.map((r) => /* @__PURE__ */ React13.createElement(ViolationRow, { key: r.audit.id, audit: r.audit })))));
1049
1129
  }
1050
1130
 
1051
1131
  // src/components/pages/issues-page.tsx
1052
- import * as React16 from "react";
1132
+ import * as React17 from "react";
1053
1133
  import { Box as Box13, Link, Typography as Typography10 } from "@elementor/ui";
1054
1134
  import { __ as __17 } from "@wordpress/i18n";
1055
1135
 
@@ -1103,13 +1183,13 @@ function severityRemainingCountLabel(severity, count) {
1103
1183
  }
1104
1184
 
1105
1185
  // src/components/issues-category-row.tsx
1106
- import * as React13 from "react";
1186
+ import * as React14 from "react";
1107
1187
  import { ChevronRightIcon } from "@elementor/icons";
1108
1188
  import { Box as Box10, Rotate as Rotate2, Typography as Typography7, useTheme as useTheme2 } from "@elementor/ui";
1109
1189
  function IssuesCategoryRow({ category, label, counts, onClick }) {
1110
1190
  const isRtl = "rtl" === useTheme2().direction;
1111
1191
  const Icon = CATEGORY_ICONS[category];
1112
- return /* @__PURE__ */ React13.createElement(
1192
+ return /* @__PURE__ */ React14.createElement(
1113
1193
  Box10,
1114
1194
  {
1115
1195
  role: "button",
@@ -1131,15 +1211,15 @@ function IssuesCategoryRow({ category, label, counts, onClick }) {
1131
1211
  "&:focus-visible": { outline: "2px solid", outlineColor: "primary.main" }
1132
1212
  }
1133
1213
  },
1134
- /* @__PURE__ */ React13.createElement(Icon, { fontSize: "small", color: "action" }),
1135
- /* @__PURE__ */ React13.createElement(Typography7, { variant: "body2", fontWeight: "bold", sx: { flex: 1 } }, label),
1136
- /* @__PURE__ */ React13.createElement(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, ALL_SEVERITIES.filter((s) => counts[s] > 0).map((severity) => /* @__PURE__ */ React13.createElement(Box10, { key: severity, sx: { display: "flex", alignItems: "center", gap: 0.25 } }, /* @__PURE__ */ React13.createElement(SeverityIcon, { severity }), /* @__PURE__ */ React13.createElement(Typography7, { variant: "caption", color: "text.primary", fontWeight: "bold" }, counts[severity])))),
1137
- /* @__PURE__ */ React13.createElement(Rotate2, { in: isRtl }, /* @__PURE__ */ React13.createElement(ChevronRightIcon, { fontSize: "small", color: "action" }))
1214
+ /* @__PURE__ */ React14.createElement(Icon, { fontSize: "small", color: "action" }),
1215
+ /* @__PURE__ */ React14.createElement(Typography7, { variant: "body2", fontWeight: "bold", sx: { flex: 1 } }, label),
1216
+ /* @__PURE__ */ React14.createElement(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, ALL_SEVERITIES.filter((s) => counts[s] > 0).map((severity) => /* @__PURE__ */ React14.createElement(Box10, { key: severity, sx: { display: "flex", alignItems: "center", gap: 0.25 } }, /* @__PURE__ */ React14.createElement(SeverityIcon, { severity }), /* @__PURE__ */ React14.createElement(Typography7, { variant: "caption", color: "text.primary", fontWeight: "bold" }, counts[severity])))),
1217
+ /* @__PURE__ */ React14.createElement(Rotate2, { in: isRtl }, /* @__PURE__ */ React14.createElement(ChevronRightIcon, { fontSize: "small", color: "action" }))
1138
1218
  );
1139
1219
  }
1140
1220
 
1141
1221
  // src/components/promotions.tsx
1142
- import * as React15 from "react";
1222
+ import * as React16 from "react";
1143
1223
  import { Box as Box12, Typography as Typography9 } from "@elementor/ui";
1144
1224
  import { __ as __16 } from "@wordpress/i18n";
1145
1225
 
@@ -1205,10 +1285,10 @@ function findAuditRun(report, auditId) {
1205
1285
  }
1206
1286
 
1207
1287
  // src/components/promotion-card.tsx
1208
- import * as React14 from "react";
1209
- import { Box as Box11, Button as Button3, Typography as Typography8 } from "@elementor/ui";
1288
+ import * as React15 from "react";
1289
+ import { Box as Box11, Button as Button4, Typography as Typography8 } from "@elementor/ui";
1210
1290
  function PromotionCard({ ctaDisabled, ctaLabel, icon: Icon, onCtaClick, subtitle, title }) {
1211
- return /* @__PURE__ */ React14.createElement(
1291
+ return /* @__PURE__ */ React15.createElement(
1212
1292
  Box11,
1213
1293
  {
1214
1294
  sx: {
@@ -1222,9 +1302,9 @@ function PromotionCard({ ctaDisabled, ctaLabel, icon: Icon, onCtaClick, subtitle
1222
1302
  py: 1.5
1223
1303
  }
1224
1304
  },
1225
- /* @__PURE__ */ React14.createElement(Icon, { fontSize: "small", color: "action" }),
1226
- /* @__PURE__ */ React14.createElement(Box11, { sx: { display: "flex", flex: 1, flexDirection: "column", gap: 0.25, minWidth: 0 } }, /* @__PURE__ */ React14.createElement(Typography8, { variant: "body2", fontWeight: "bold" }, title), /* @__PURE__ */ React14.createElement(Typography8, { variant: "caption", color: "text.secondary" }, subtitle)),
1227
- /* @__PURE__ */ React14.createElement(Button3, { variant: "outlined", color: "secondary", size: "small", disabled: ctaDisabled, onClick: onCtaClick }, ctaLabel)
1305
+ /* @__PURE__ */ React15.createElement(Icon, { fontSize: "small", color: "action" }),
1306
+ /* @__PURE__ */ React15.createElement(Box11, { sx: { display: "flex", flex: 1, flexDirection: "column", gap: 0.25, minWidth: 0 } }, /* @__PURE__ */ React15.createElement(Typography8, { variant: "body2", fontWeight: "bold" }, title), /* @__PURE__ */ React15.createElement(Typography8, { variant: "caption", color: "text.secondary" }, subtitle)),
1307
+ /* @__PURE__ */ React15.createElement(Button4, { variant: "outlined", color: "secondary", size: "small", disabled: ctaDisabled, onClick: onCtaClick }, ctaLabel)
1228
1308
  );
1229
1309
  }
1230
1310
 
@@ -1253,7 +1333,7 @@ function Promotions({ report }) {
1253
1333
  if (cards.length === 0) {
1254
1334
  return null;
1255
1335
  }
1256
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Typography9, { variant: "subtitle1", fontWeight: "bold" }, __16("Quick wins", "elementor")), /* @__PURE__ */ React15.createElement(Box12, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, cards.map(({ config, ctaUrl, key, run, subtitle }) => /* @__PURE__ */ React15.createElement(
1336
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Typography9, { variant: "subtitle1", fontWeight: "bold" }, __16("Quick wins", "elementor")), /* @__PURE__ */ React16.createElement(Box12, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, cards.map(({ config, ctaUrl, key, run, subtitle }) => /* @__PURE__ */ React16.createElement(
1257
1337
  PromotionCard,
1258
1338
  {
1259
1339
  key,
@@ -1274,7 +1354,7 @@ function Promotions({ report }) {
1274
1354
  // src/components/pages/issues-page.tsx
1275
1355
  function IssuesPage({ report, onCategoryClick, onAllAuditsClick }) {
1276
1356
  const populatedCategories = getPopulatedCategories(report.categories, ALL_CATEGORIES);
1277
- return /* @__PURE__ */ React16.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React16.createElement(
1357
+ return /* @__PURE__ */ React17.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React17.createElement(
1278
1358
  Link,
1279
1359
  {
1280
1360
  component: "button",
@@ -1283,8 +1363,8 @@ function IssuesPage({ report, onCategoryClick, onAllAuditsClick }) {
1283
1363
  onClick: onAllAuditsClick,
1284
1364
  sx: { textAlign: "start" }
1285
1365
  },
1286
- /* @__PURE__ */ React16.createElement(Typography10, { variant: "subtitle1", component: "h2" }, __17("All issues", "elementor"))
1287
- ), /* @__PURE__ */ React16.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, populatedCategories.map((category) => /* @__PURE__ */ React16.createElement(
1366
+ /* @__PURE__ */ React17.createElement(Typography10, { variant: "subtitle1", component: "h2" }, __17("All issues", "elementor"))
1367
+ ), /* @__PURE__ */ React17.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, populatedCategories.map((category) => /* @__PURE__ */ React17.createElement(
1288
1368
  IssuesCategoryRow,
1289
1369
  {
1290
1370
  key: category,
@@ -1293,11 +1373,11 @@ function IssuesPage({ report, onCategoryClick, onAllAuditsClick }) {
1293
1373
  counts: countSeverities(report, category),
1294
1374
  onClick: () => onCategoryClick(category)
1295
1375
  }
1296
- ))), /* @__PURE__ */ React16.createElement(Promotions, { report }));
1376
+ ))), /* @__PURE__ */ React17.createElement(Promotions, { report }));
1297
1377
  }
1298
1378
 
1299
1379
  // src/components/pages/overview-page.tsx
1300
- import * as React20 from "react";
1380
+ import * as React21 from "react";
1301
1381
  import { Box as Box17, Chip as Chip3, Divider, Typography as Typography14 } from "@elementor/ui";
1302
1382
  import { __ as __19, sprintf as sprintf4 } from "@wordpress/i18n";
1303
1383
 
@@ -1316,7 +1396,7 @@ function getScoreTier(score) {
1316
1396
  }
1317
1397
 
1318
1398
  // src/components/count-summary-circle.tsx
1319
- import * as React17 from "react";
1399
+ import * as React18 from "react";
1320
1400
  import { Box as Box14, Chip as Chip2, Typography as Typography11 } from "@elementor/ui";
1321
1401
  var COUNT_SUMMARY_CIRCLE_SIZE = 64;
1322
1402
  var COUNT_SUMMARY_BORDER_WIDTH = 4;
@@ -1327,7 +1407,7 @@ function chipBorderColor(theme, color) {
1327
1407
  return theme.palette[color].main;
1328
1408
  }
1329
1409
  function CountSummaryCircle({ ariaLabel, color, count, label, onClick }) {
1330
- return /* @__PURE__ */ React17.createElement(
1410
+ return /* @__PURE__ */ React18.createElement(
1331
1411
  Box14,
1332
1412
  {
1333
1413
  "aria-label": ariaLabel,
@@ -1346,7 +1426,7 @@ function CountSummaryCircle({ ariaLabel, color, count, label, onClick }) {
1346
1426
  padding: 0
1347
1427
  }
1348
1428
  },
1349
- /* @__PURE__ */ React17.createElement(
1429
+ /* @__PURE__ */ React18.createElement(
1350
1430
  Chip2,
1351
1431
  {
1352
1432
  color,
@@ -1368,17 +1448,17 @@ function CountSummaryCircle({ ariaLabel, color, count, label, onClick }) {
1368
1448
  })
1369
1449
  }
1370
1450
  ),
1371
- /* @__PURE__ */ React17.createElement(Typography11, { color: "text.secondary", sx: { textAlign: "center" }, variant: "caption" }, label)
1451
+ /* @__PURE__ */ React18.createElement(Typography11, { color: "text.secondary", sx: { textAlign: "center" }, variant: "caption" }, label)
1372
1452
  );
1373
1453
  }
1374
1454
 
1375
1455
  // src/components/score-bar.tsx
1376
- import * as React18 from "react";
1456
+ import * as React19 from "react";
1377
1457
  import { ChevronRightIcon as ChevronRightIcon2 } from "@elementor/icons";
1378
1458
  import { Box as Box15, LinearProgress, Rotate as Rotate3, Typography as Typography12, useTheme as useTheme3 } from "@elementor/ui";
1379
1459
  function ScoreBar({ label, score, onClick }) {
1380
1460
  const isRtl = "rtl" === useTheme3().direction;
1381
- return /* @__PURE__ */ React18.createElement(
1461
+ return /* @__PURE__ */ React19.createElement(
1382
1462
  Box15,
1383
1463
  {
1384
1464
  role: onClick ? "button" : void 0,
@@ -1395,8 +1475,8 @@ function ScoreBar({ label, score, onClick }) {
1395
1475
  py: 0.5
1396
1476
  }
1397
1477
  },
1398
- /* @__PURE__ */ React18.createElement(Typography12, { variant: "body2", sx: { minWidth: 96 } }, label),
1399
- /* @__PURE__ */ React18.createElement(
1478
+ /* @__PURE__ */ React19.createElement(Typography12, { variant: "body2", sx: { minWidth: 96 } }, label),
1479
+ /* @__PURE__ */ React19.createElement(
1400
1480
  LinearProgress,
1401
1481
  {
1402
1482
  variant: "determinate",
@@ -1405,7 +1485,7 @@ function ScoreBar({ label, score, onClick }) {
1405
1485
  sx: { flex: 1, height: 6, borderRadius: 4, bgcolor: "action.disabledBackground" }
1406
1486
  }
1407
1487
  ),
1408
- /* @__PURE__ */ React18.createElement(
1488
+ /* @__PURE__ */ React19.createElement(
1409
1489
  Typography12,
1410
1490
  {
1411
1491
  variant: "body2",
@@ -1414,18 +1494,18 @@ function ScoreBar({ label, score, onClick }) {
1414
1494
  },
1415
1495
  score
1416
1496
  ),
1417
- onClick && /* @__PURE__ */ React18.createElement(Rotate3, { in: isRtl }, /* @__PURE__ */ React18.createElement(ChevronRightIcon2, { fontSize: "small", color: "action" }))
1497
+ onClick && /* @__PURE__ */ React19.createElement(Rotate3, { in: isRtl }, /* @__PURE__ */ React19.createElement(ChevronRightIcon2, { fontSize: "small", color: "action" }))
1418
1498
  );
1419
1499
  }
1420
1500
 
1421
1501
  // src/components/score-circle.tsx
1422
- import * as React19 from "react";
1502
+ import * as React20 from "react";
1423
1503
  import { Box as Box16, CircularProgress as CircularProgress2, Typography as Typography13 } from "@elementor/ui";
1424
1504
  var SCORE_CIRCLE_SIZE = 88;
1425
1505
  var SCORE_CIRCLE_THICKNESS = 3;
1426
1506
  function ScoreCircle({ color, score }) {
1427
1507
  const progressColor = color ?? getScoreTier(score).color;
1428
- return /* @__PURE__ */ React19.createElement(
1508
+ return /* @__PURE__ */ React20.createElement(
1429
1509
  Box16,
1430
1510
  {
1431
1511
  role: "progressbar",
@@ -1434,7 +1514,7 @@ function ScoreCircle({ color, score }) {
1434
1514
  "aria-valuemax": 100,
1435
1515
  sx: { position: "relative", display: "inline-flex" }
1436
1516
  },
1437
- /* @__PURE__ */ React19.createElement(
1517
+ /* @__PURE__ */ React20.createElement(
1438
1518
  CircularProgress2,
1439
1519
  {
1440
1520
  variant: "determinate",
@@ -1444,7 +1524,7 @@ function ScoreCircle({ color, score }) {
1444
1524
  sx: { color: "action.disabledBackground" }
1445
1525
  }
1446
1526
  ),
1447
- /* @__PURE__ */ React19.createElement(
1527
+ /* @__PURE__ */ React20.createElement(
1448
1528
  CircularProgress2,
1449
1529
  {
1450
1530
  variant: "determinate",
@@ -1455,7 +1535,7 @@ function ScoreCircle({ color, score }) {
1455
1535
  sx: { position: "absolute", left: 0 }
1456
1536
  }
1457
1537
  ),
1458
- /* @__PURE__ */ React19.createElement(
1538
+ /* @__PURE__ */ React20.createElement(
1459
1539
  Box16,
1460
1540
  {
1461
1541
  sx: {
@@ -1466,7 +1546,7 @@ function ScoreCircle({ color, score }) {
1466
1546
  justifyContent: "center"
1467
1547
  }
1468
1548
  },
1469
- /* @__PURE__ */ React19.createElement(
1549
+ /* @__PURE__ */ React20.createElement(
1470
1550
  Typography13,
1471
1551
  {
1472
1552
  variant: "h4",
@@ -1504,7 +1584,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1504
1584
  const severityCounts = countSeverities(report);
1505
1585
  const statusCounts = auditStatusDisplayCounts(report);
1506
1586
  const overallScore = getScoreTier(report.overall);
1507
- return /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", alignItems: "center", gap: 2 } }, /* @__PURE__ */ React20.createElement(ScoreCircle, { color: overallScore.color, score: report.overall }), /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React20.createElement(
1587
+ return /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", alignItems: "center", gap: 2 } }, /* @__PURE__ */ React21.createElement(ScoreCircle, { color: overallScore.color, score: report.overall }), /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React21.createElement(
1508
1588
  Chip3,
1509
1589
  {
1510
1590
  label: overallScore.label,
@@ -1513,7 +1593,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1513
1593
  size: "small",
1514
1594
  sx: { fontWeight: 600, alignSelf: "flex-start" }
1515
1595
  }
1516
- ), /* @__PURE__ */ React20.createElement(Typography14, { variant: "body2", color: "text.secondary" }, __19("Overall score", "elementor")))), /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 2 } }, populatedCategories.map((category) => /* @__PURE__ */ React20.createElement(
1596
+ ), /* @__PURE__ */ React21.createElement(Typography14, { variant: "body2", color: "text.secondary" }, __19("Overall score", "elementor")))), /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 2 } }, populatedCategories.map((category) => /* @__PURE__ */ React21.createElement(
1517
1597
  ScoreBar,
1518
1598
  {
1519
1599
  key: category,
@@ -1521,7 +1601,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1521
1601
  score: report.categories[category].score,
1522
1602
  onClick: () => onCategoryClick(category)
1523
1603
  }
1524
- ))), /* @__PURE__ */ React20.createElement(Divider, null), /* @__PURE__ */ React20.createElement(Typography14, { variant: "subtitle1", fontWeight: "bold" }, __19("Audit statuses", "elementor")), /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", justifyContent: "space-around", gap: 2 } }, STATUS_GROUPS.map((status) => /* @__PURE__ */ React20.createElement(
1604
+ ))), /* @__PURE__ */ React21.createElement(Divider, null), /* @__PURE__ */ React21.createElement(Typography14, { variant: "subtitle1", fontWeight: "bold" }, __19("Audit statuses", "elementor")), /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", justifyContent: "space-around", gap: 2 } }, STATUS_GROUPS.map((status) => /* @__PURE__ */ React21.createElement(
1525
1605
  CountSummaryCircle,
1526
1606
  {
1527
1607
  key: status,
@@ -1531,7 +1611,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1531
1611
  label: auditStatusLabel(status),
1532
1612
  onClick: () => onStatusClick(status)
1533
1613
  }
1534
- ))), /* @__PURE__ */ React20.createElement(Divider, null), /* @__PURE__ */ React20.createElement(Typography14, { variant: "subtitle1", fontWeight: "bold" }, __19("Remaining issues", "elementor")), /* @__PURE__ */ React20.createElement(
1614
+ ))), /* @__PURE__ */ React21.createElement(Divider, null), /* @__PURE__ */ React21.createElement(Typography14, { variant: "subtitle1", fontWeight: "bold" }, __19("Remaining issues", "elementor")), /* @__PURE__ */ React21.createElement(
1535
1615
  Box17,
1536
1616
  {
1537
1617
  component: "ul",
@@ -1546,7 +1626,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1546
1626
  },
1547
1627
  ALL_SEVERITIES.map((severity) => {
1548
1628
  const count = severityCounts[severity];
1549
- return /* @__PURE__ */ React20.createElement(
1629
+ return /* @__PURE__ */ React21.createElement(
1550
1630
  Box17,
1551
1631
  {
1552
1632
  "aria-label": severityRemainingCountLabel(severity, count),
@@ -1554,9 +1634,9 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1554
1634
  key: severity,
1555
1635
  sx: { alignItems: "center", display: "flex", gap: 0.5 }
1556
1636
  },
1557
- /* @__PURE__ */ React20.createElement(SeverityIcon, { severity }),
1558
- /* @__PURE__ */ React20.createElement(Typography14, { variant: "body2", fontWeight: "bold" }, count),
1559
- /* @__PURE__ */ React20.createElement(Typography14, { variant: "body2" }, severityPluralLabel(severity))
1637
+ /* @__PURE__ */ React21.createElement(SeverityIcon, { severity }),
1638
+ /* @__PURE__ */ React21.createElement(Typography14, { variant: "body2", fontWeight: "bold" }, count),
1639
+ /* @__PURE__ */ React21.createElement(Typography14, { variant: "body2" }, severityPluralLabel(severity))
1560
1640
  );
1561
1641
  })
1562
1642
  ));
@@ -1595,7 +1675,7 @@ function ReportShell({ report }) {
1595
1675
  setActivePage(activePage.backTo);
1596
1676
  }
1597
1677
  };
1598
- return /* @__PURE__ */ React21.createElement(Box18, null, /* @__PURE__ */ React21.createElement(
1678
+ return /* @__PURE__ */ React22.createElement(Box18, null, /* @__PURE__ */ React22.createElement(
1599
1679
  Tabs,
1600
1680
  {
1601
1681
  "aria-label": __20("Audit navigation", "elementor"),
@@ -1607,30 +1687,30 @@ function ReportShell({ report }) {
1607
1687
  centered: true,
1608
1688
  variant: "fullWidth"
1609
1689
  },
1610
- /* @__PURE__ */ React21.createElement(Tab, { value: "overview", label: __20("Overview", "elementor") }),
1611
- /* @__PURE__ */ React21.createElement(Tab, { value: "issues", label: __20("Issues", "elementor") })
1612
- ), /* @__PURE__ */ React21.createElement(Divider2, null), activePage === "overview" && /* @__PURE__ */ React21.createElement(
1690
+ /* @__PURE__ */ React22.createElement(Tab, { value: "overview", label: __20("Overview", "elementor") }),
1691
+ /* @__PURE__ */ React22.createElement(Tab, { value: "issues", label: __20("Issues", "elementor") })
1692
+ ), /* @__PURE__ */ React22.createElement(Divider2, null), activePage === "overview" && /* @__PURE__ */ React22.createElement(
1613
1693
  OverviewPage,
1614
1694
  {
1615
1695
  report,
1616
1696
  onCategoryClick: (category) => openCategory(category, "overview"),
1617
1697
  onStatusClick: (status) => openAllAudits(status, "overview")
1618
1698
  }
1619
- ), activePage === "issues" && /* @__PURE__ */ React21.createElement(
1699
+ ), activePage === "issues" && /* @__PURE__ */ React22.createElement(
1620
1700
  IssuesPage,
1621
1701
  {
1622
1702
  report,
1623
1703
  onCategoryClick: (category) => openCategory(category, "issues"),
1624
1704
  onAllAuditsClick: () => openAllAudits()
1625
1705
  }
1626
- ), isAllAuditsPage(activePage) && /* @__PURE__ */ React21.createElement(
1706
+ ), isAllAuditsPage(activePage) && /* @__PURE__ */ React22.createElement(
1627
1707
  AllAuditsPage,
1628
1708
  {
1629
1709
  report,
1630
1710
  initialExpandedStatus: activePage.expand,
1631
1711
  onBack: backFromSubPage
1632
1712
  }
1633
- ), isCategoryPage(activePage) && /* @__PURE__ */ React21.createElement(CategoryPage, { category: activePage.category, report, onBack: backFromSubPage }));
1713
+ ), isCategoryPage(activePage) && /* @__PURE__ */ React22.createElement(CategoryPage, { category: activePage.category, report, onBack: backFromSubPage }));
1634
1714
  }
1635
1715
 
1636
1716
  // src/components/audit-panel.tsx
@@ -1639,7 +1719,7 @@ function AuditPanel() {
1639
1719
  const currentDocumentId = getCurrentDocumentId2() ?? 0;
1640
1720
  const onRun = () => run(currentDocumentId);
1641
1721
  const lastScanLabel = report ? new Date(report.runAt).toLocaleTimeString() : null;
1642
- return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
1722
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
1643
1723
  FloatingPanelHeader,
1644
1724
  {
1645
1725
  panelId: "audit-panel",
@@ -1647,8 +1727,8 @@ function AuditPanel() {
1647
1727
  badge: __21("Beta", "elementor"),
1648
1728
  titleVariant: "subtitle2"
1649
1729
  }
1650
- ), /* @__PURE__ */ React22.createElement(FloatingPanelBody, null, status === "idle" && /* @__PURE__ */ React22.createElement(WelcomePage, null), status === "loading" && /* @__PURE__ */ React22.createElement(LoadingPage, null), status === "error" && /* @__PURE__ */ React22.createElement(ErrorPage, { message: error ?? "", onRetry: onRun }), status === "ready" && report && /* @__PURE__ */ React22.createElement(ReportShell, { report })), /* @__PURE__ */ React22.createElement(FloatingPanelFooter, null, lastScanLabel ? /* @__PURE__ */ React22.createElement(Typography15, { variant: "caption", sx: { flex: 1 } }, __21("Last scan:", "elementor"), " ", lastScanLabel) : /* @__PURE__ */ React22.createElement(Box19, { sx: { flex: 1 } }), lastScanLabel && /* @__PURE__ */ React22.createElement(AuditFeedback, null), /* @__PURE__ */ React22.createElement(
1651
- Button4,
1730
+ ), /* @__PURE__ */ React23.createElement(FloatingPanelBody, null, status === "idle" && /* @__PURE__ */ React23.createElement(WelcomePage, null), status === "loading" && /* @__PURE__ */ React23.createElement(LoadingPage, null), status === "error" && /* @__PURE__ */ React23.createElement(ErrorPage, { message: error ?? "", onRetry: onRun }), status === "ready" && report && /* @__PURE__ */ React23.createElement(ReportShell, { report })), /* @__PURE__ */ React23.createElement(FloatingPanelFooter, null, lastScanLabel ? /* @__PURE__ */ React23.createElement(Typography15, { variant: "caption", sx: { flex: 1 } }, __21("Last scan:", "elementor"), " ", lastScanLabel) : /* @__PURE__ */ React23.createElement(Box19, { sx: { flex: 1 } }), lastScanLabel && /* @__PURE__ */ React23.createElement(AuditFeedback, null), /* @__PURE__ */ React23.createElement(
1731
+ Button5,
1652
1732
  {
1653
1733
  variant: "contained",
1654
1734
  size: "small",
@@ -2595,7 +2675,8 @@ var audit16 = {
2595
2675
  {
2596
2676
  auditId: audit16.id,
2597
2677
  label: __38("No privacy policy page is set.", "elementor"),
2598
- externalUrl: ctx.pageContext.privacy_settings_url
2678
+ externalUrl: ctx.pageContext.privacy_settings_url,
2679
+ ctaLabel: __38("Create", "elementor")
2599
2680
  }
2600
2681
  ]
2601
2682
  };