@redacto.io/consent-sdk-react 10.2.1 → 10.2.2-beta.0

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.js CHANGED
@@ -87,7 +87,7 @@ __export(src_exports, {
87
87
  module.exports = __toCommonJS(src_exports);
88
88
 
89
89
  // src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
90
- var import_react3 = require("react");
90
+ var import_react5 = require("react");
91
91
 
92
92
  // src/RedactoNoticeConsent/api/index.ts
93
93
  var import_jwt_decode2 = require("jwt-decode");
@@ -713,6 +713,8 @@ var redacto_logo_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATkAAA
713
713
  var DEFAULT_LOGO_POSITION = "left";
714
714
  var DEFAULT_PURPOSE_PRESELECTION = "NONE";
715
715
  var PURPOSE_STATUS_INACTIVE = "INACTIVE";
716
+ var PURPOSE_STATUS_ACTIVE = "ACTIVE";
717
+ var PURPOSE_STATUS_EXPIRED = "EXPIRED";
716
718
  var DEFAULT_ACCEPT_ALL_BUTTON_TEXT = "Accept All";
717
719
  var DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT = "Accept Selected";
718
720
  var DEFAULT_DECLINE_BUTTON_TEXT = "Decline";
@@ -749,6 +751,47 @@ var PRODUCT_SECTION_COPY = {
749
751
  toggleRequired: (productName, purposeCount) => `Toggle the ${purposeCount} required purposes for ${productName}`,
750
752
  settled: (productName) => `Already consented to ${productName}`
751
753
  };
754
+ var CONFIRM_HINT_ID = "redacto-confirm-hint";
755
+ var CONFIRM_HINT_COPY = {
756
+ "nothing-chosen": "Select at least one purpose to confirm.",
757
+ "nothing-engaged": "Select or change a purpose for the product you are consenting to.",
758
+ "required-outstanding": "Accept the required purposes to confirm.",
759
+ productsIncomplete: (productNames) => `Accept the required purposes for ${productNames.join(", ")} to confirm.`
760
+ };
761
+ var DEFAULT_SELECTION_CONTROL = "checkbox";
762
+ var SELECTION_CONTROL_ACCENT = "#4f87ff";
763
+ var SELECTION_CONTROL_COPY = {
764
+ /**
765
+ * What the server already holds for a row. Read out beside the control, not
766
+ * folded into an option label -- in a dropdown that text is on screen, and a
767
+ * list reading "Yes (your current answer)" is worse than no cue at all.
768
+ */
769
+ onRecord: (answer) => `Saved answer: ${answer}`,
770
+ /** The dropdown's resting state on a partly answered product section. */
771
+ mixed: "Mixed",
772
+ options: [
773
+ { label: "Yes", value: true },
774
+ { label: "No", value: false }
775
+ ]
776
+ };
777
+ var CONFIRM_DIALOG_ID = "redacto-confirm-dialog";
778
+ var CONFIRM_DIALOG_DETAIL_ID = "redacto-confirm-dialog-detail";
779
+ var CONFIRM_DIALOG_COPY = {
780
+ "accept-all": {
781
+ title: "Accept every purpose?",
782
+ detail: "This agrees to all purposes on this notice, including any you left unselected."
783
+ },
784
+ "accept-selected": {
785
+ title: "Confirm your selections?",
786
+ detail: "Only the purposes you selected are recorded as agreed. The rest are recorded as not agreed."
787
+ },
788
+ decline: {
789
+ title: "Decline this notice?",
790
+ detail: "Nothing is recorded as agreed, including any purposes you selected."
791
+ },
792
+ confirm: "Yes",
793
+ cancel: "No"
794
+ };
752
795
 
753
796
  // src/RedactoNoticeConsent/styles.ts
754
797
  var styles = {
@@ -1110,6 +1153,15 @@ var styles = {
1110
1153
  margin: 0,
1111
1154
  boxSizing: "border-box"
1112
1155
  },
1156
+ /** Sits above the footer, which is a bare fragment of three flex children. */
1157
+ confirmHint: {
1158
+ fontSize: "13px",
1159
+ lineHeight: "18px",
1160
+ color: "#6b6b6b",
1161
+ margin: 0,
1162
+ paddingTop: "12px",
1163
+ boxSizing: "border-box"
1164
+ },
1113
1165
  actionButtonStack: {
1114
1166
  display: "flex",
1115
1167
  flexDirection: "column",
@@ -1251,6 +1303,7 @@ var DISABLED_OPACITY = 0.5;
1251
1303
  var NoticeFooter = ({
1252
1304
  labels,
1253
1305
  acceptSelectedDisabled,
1306
+ acceptSelectedHintId,
1254
1307
  isSubmittingAccept,
1255
1308
  isSubmittingDecline,
1256
1309
  isMobile,
@@ -1301,6 +1354,7 @@ var NoticeFooter = ({
1301
1354
  onClick: onAcceptSelected,
1302
1355
  disabled: acceptSelectedDisabled || isSubmittingDecline,
1303
1356
  "aria-label": labels.acceptSelected,
1357
+ "aria-describedby": acceptSelectedHintId,
1304
1358
  children: isSubmittingAccept ? SUBMITTING_BUTTON_TEXT : labels.acceptSelected
1305
1359
  }
1306
1360
  );
@@ -1337,6 +1391,335 @@ var NoticeFooter = ({
1337
1391
  ] });
1338
1392
  };
1339
1393
 
1394
+ // src/RedactoNoticeConsent/components/ConfirmDialog.tsx
1395
+ var import_react = require("react");
1396
+ var import_jsx_runtime2 = require("react/jsx-runtime");
1397
+ var overlayStyle = {
1398
+ // fixed, not absolute: the notice root is not a positioned ancestor on
1399
+ // every surface, and a mispositioned overlay would leave the buttons live.
1400
+ position: "fixed",
1401
+ inset: 0,
1402
+ backgroundColor: "rgba(16, 24, 40, 0.45)",
1403
+ display: "flex",
1404
+ alignItems: "center",
1405
+ justifyContent: "center",
1406
+ padding: "24px",
1407
+ zIndex: 2147483647
1408
+ };
1409
+ var panelStyle = {
1410
+ backgroundColor: "#ffffff",
1411
+ borderRadius: "12px",
1412
+ padding: "24px",
1413
+ maxWidth: "380px",
1414
+ width: "100%",
1415
+ boxShadow: "0 12px 32px rgba(16, 24, 40, 0.18)"
1416
+ };
1417
+ var titleStyle = {
1418
+ margin: "0 0 8px",
1419
+ fontSize: "16px",
1420
+ lineHeight: "24px",
1421
+ fontWeight: 600,
1422
+ color: "#101828"
1423
+ };
1424
+ var detailStyle = {
1425
+ margin: "0 0 20px",
1426
+ fontSize: "14px",
1427
+ lineHeight: "20px",
1428
+ color: "#475467"
1429
+ };
1430
+ var actionsStyle = {
1431
+ display: "flex",
1432
+ gap: "12px",
1433
+ justifyContent: "flex-end"
1434
+ };
1435
+ var buttonStyle = {
1436
+ borderRadius: "8px",
1437
+ padding: "8px 20px",
1438
+ fontSize: "14px",
1439
+ lineHeight: "20px",
1440
+ cursor: "pointer",
1441
+ border: "1px solid #d0d5dd",
1442
+ backgroundColor: "#ffffff",
1443
+ color: "#344054"
1444
+ };
1445
+ var ConfirmDialog = ({
1446
+ action,
1447
+ onConfirm,
1448
+ onCancel,
1449
+ confirmStyle
1450
+ }) => {
1451
+ const cancelRef = (0, import_react.useRef)(null);
1452
+ const panelRef = (0, import_react.useRef)(null);
1453
+ const openerRef = (0, import_react.useRef)(null);
1454
+ (0, import_react.useEffect)(() => {
1455
+ var _a;
1456
+ openerRef.current = document.activeElement;
1457
+ (_a = cancelRef.current) == null ? void 0 : _a.focus();
1458
+ }, []);
1459
+ const cancel = (0, import_react.useCallback)(() => {
1460
+ const opener = openerRef.current;
1461
+ onCancel();
1462
+ if (opener instanceof HTMLElement) opener.focus();
1463
+ }, [onCancel]);
1464
+ (0, import_react.useEffect)(() => {
1465
+ const onKeyDown = (event) => {
1466
+ if (event.key === "Escape") {
1467
+ cancel();
1468
+ return;
1469
+ }
1470
+ if (event.key !== "Tab" || !panelRef.current) return;
1471
+ const focusable = panelRef.current.querySelectorAll("button");
1472
+ if (focusable.length === 0) return;
1473
+ const first = focusable[0];
1474
+ const last = focusable[focusable.length - 1];
1475
+ if (event.shiftKey && document.activeElement === first) {
1476
+ event.preventDefault();
1477
+ last.focus();
1478
+ return;
1479
+ }
1480
+ if (!event.shiftKey && document.activeElement === last) {
1481
+ event.preventDefault();
1482
+ first.focus();
1483
+ }
1484
+ };
1485
+ document.addEventListener("keydown", onKeyDown);
1486
+ return () => document.removeEventListener("keydown", onKeyDown);
1487
+ }, [cancel]);
1488
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: overlayStyle, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1489
+ "div",
1490
+ {
1491
+ ref: panelRef,
1492
+ role: "dialog",
1493
+ "aria-modal": "true",
1494
+ "aria-labelledby": CONFIRM_DIALOG_ID,
1495
+ "aria-describedby": CONFIRM_DIALOG_DETAIL_ID,
1496
+ style: panelStyle,
1497
+ children: [
1498
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { id: CONFIRM_DIALOG_ID, style: titleStyle, children: CONFIRM_DIALOG_COPY[action].title }),
1499
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { id: CONFIRM_DIALOG_DETAIL_ID, style: detailStyle, children: CONFIRM_DIALOG_COPY[action].detail }),
1500
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: actionsStyle, children: [
1501
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1502
+ "button",
1503
+ {
1504
+ ref: cancelRef,
1505
+ type: "button",
1506
+ onClick: cancel,
1507
+ style: buttonStyle,
1508
+ children: CONFIRM_DIALOG_COPY.cancel
1509
+ }
1510
+ ),
1511
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1512
+ "button",
1513
+ {
1514
+ type: "button",
1515
+ onClick: onConfirm,
1516
+ style: { ...buttonStyle, ...confirmStyle },
1517
+ children: CONFIRM_DIALOG_COPY.confirm
1518
+ }
1519
+ )
1520
+ ] })
1521
+ ]
1522
+ }
1523
+ ) });
1524
+ };
1525
+
1526
+ // src/RedactoNoticeConsent/components/SelectionControl.tsx
1527
+ var import_react2 = require("react");
1528
+ var import_jsx_runtime3 = require("react/jsx-runtime");
1529
+ var groupStyle = {
1530
+ display: "flex",
1531
+ alignItems: "center",
1532
+ gap: "12px",
1533
+ flexShrink: 0
1534
+ };
1535
+ var optionStyle = {
1536
+ display: "flex",
1537
+ alignItems: "center",
1538
+ gap: "4px",
1539
+ cursor: "pointer",
1540
+ whiteSpace: "nowrap"
1541
+ };
1542
+ var SIZES = {
1543
+ large: {
1544
+ option: { fontSize: "14px", fontWeight: 500 },
1545
+ radio: { width: "17px", height: "17px" },
1546
+ select: { fontSize: "13px", padding: "6px 8px", fontWeight: 500 },
1547
+ slot: "68px",
1548
+ gap: "10px",
1549
+ tick: { box: 20, glyph: 12 }
1550
+ },
1551
+ small: {
1552
+ option: { fontSize: "12px", fontWeight: 400 },
1553
+ radio: { width: "13px", height: "13px" },
1554
+ select: { fontSize: "12px", padding: "5px 8px", fontWeight: 400 },
1555
+ slot: "62px",
1556
+ gap: "8px",
1557
+ tick: { box: 17, glyph: 10 }
1558
+ }
1559
+ };
1560
+ var dropdownWrapStyle = {
1561
+ display: "inline-flex",
1562
+ alignItems: "center",
1563
+ justifyContent: "flex-end",
1564
+ flexShrink: 0
1565
+ };
1566
+ var settledAnswerStyle = {
1567
+ display: "inline-flex",
1568
+ alignItems: "center",
1569
+ justifyContent: "flex-end",
1570
+ color: "#667085",
1571
+ whiteSpace: "nowrap"
1572
+ };
1573
+ var selectStyle = {
1574
+ border: "1px solid #d0d5dd",
1575
+ borderRadius: "6px",
1576
+ // Explicit, so the box does not follow the font metrics of whatever face the
1577
+ // notice is themed with -- that is what made it read as a strip.
1578
+ lineHeight: "18px",
1579
+ boxSizing: "border-box",
1580
+ cursor: "pointer",
1581
+ backgroundColor: "#ffffff",
1582
+ color: "#344054",
1583
+ flexShrink: 0
1584
+ };
1585
+ var lockedBadgeStyle = (box) => ({
1586
+ display: "flex",
1587
+ alignItems: "center",
1588
+ justifyContent: "center",
1589
+ width: `${box}px`,
1590
+ height: `${box}px`,
1591
+ borderRadius: "50%",
1592
+ flexShrink: 0,
1593
+ boxSizing: "border-box",
1594
+ backgroundColor: "#10B981",
1595
+ marginLeft: "12px"
1596
+ });
1597
+ var LockedTick = ({ label, box, glyph }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { role: "img", style: lockedBadgeStyle(box), "aria-label": label, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1598
+ "svg",
1599
+ {
1600
+ width: glyph,
1601
+ height: glyph,
1602
+ viewBox: "0 0 12 12",
1603
+ fill: "none",
1604
+ xmlns: "http://www.w3.org/2000/svg",
1605
+ "aria-hidden": "true",
1606
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1607
+ "path",
1608
+ {
1609
+ d: "M4 6L5.5 7.5L8.5 4.5",
1610
+ stroke: "white",
1611
+ strokeWidth: "2",
1612
+ strokeLinecap: "round",
1613
+ strokeLinejoin: "round"
1614
+ }
1615
+ )
1616
+ }
1617
+ ) });
1618
+ var SelectionControl = ({
1619
+ control,
1620
+ checked,
1621
+ indeterminate = false,
1622
+ onSelect,
1623
+ label,
1624
+ groupName,
1625
+ className,
1626
+ locked = false,
1627
+ lockedLabel,
1628
+ recordedAnswer,
1629
+ size = "large"
1630
+ }) => {
1631
+ const scale = SIZES[size];
1632
+ const boxClass = className != null ? className : size === "small" ? "redacto-checkbox-medium" : "redacto-checkbox-large";
1633
+ const checkboxRef = (0, import_react2.useRef)(null);
1634
+ (0, import_react2.useEffect)(() => {
1635
+ if (checkboxRef.current) {
1636
+ checkboxRef.current.indeterminate = indeterminate;
1637
+ }
1638
+ }, [indeterminate]);
1639
+ const select = (0, import_react2.useCallback)(
1640
+ (next) => {
1641
+ if (indeterminate || next !== checked) onSelect(next);
1642
+ },
1643
+ [checked, indeterminate, onSelect]
1644
+ );
1645
+ const held = (value) => locked ? value : !indeterminate && checked === value;
1646
+ const onRecord = (value) => recordedAnswer === value;
1647
+ const optionLabel = (label2, value) => onRecord(value) ? `${label2} ${SELECTION_CONTROL_COPY.onRecord(label2)}` : label2;
1648
+ if (locked && control === "checkbox") {
1649
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1650
+ LockedTick,
1651
+ {
1652
+ label: lockedLabel,
1653
+ box: scale.tick.box,
1654
+ glyph: scale.tick.glyph
1655
+ }
1656
+ );
1657
+ }
1658
+ if (control === "radio") {
1659
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1660
+ "div",
1661
+ {
1662
+ role: "radiogroup",
1663
+ "aria-label": locked ? lockedLabel : label,
1664
+ style: { ...groupStyle, gap: scale.gap },
1665
+ children: SELECTION_CONTROL_COPY.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { style: { ...optionStyle, ...scale.option }, children: [
1666
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1667
+ "input",
1668
+ {
1669
+ type: "radio",
1670
+ name: groupName,
1671
+ checked: held(option.value),
1672
+ disabled: locked,
1673
+ onChange: () => select(option.value),
1674
+ style: { accentColor: SELECTION_CONTROL_ACCENT, ...scale.radio },
1675
+ "aria-label": optionLabel(option.label, option.value)
1676
+ }
1677
+ ),
1678
+ option.label
1679
+ ] }, option.label))
1680
+ }
1681
+ );
1682
+ }
1683
+ if (control === "dropdown") {
1684
+ if (locked) {
1685
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1686
+ "span",
1687
+ {
1688
+ role: "img",
1689
+ "aria-label": lockedLabel,
1690
+ style: { ...settledAnswerStyle, ...scale.select, width: scale.slot },
1691
+ children: SELECTION_CONTROL_COPY.options[0].label
1692
+ }
1693
+ );
1694
+ }
1695
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { ...dropdownWrapStyle, width: scale.slot }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1696
+ "select",
1697
+ {
1698
+ "aria-label": locked ? lockedLabel : label,
1699
+ disabled: locked,
1700
+ value: indeterminate ? "" : String(held(true)),
1701
+ onChange: (event) => select(event.target.value === "true"),
1702
+ style: { ...selectStyle, ...scale.select, width: "100%" },
1703
+ children: [
1704
+ indeterminate && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: "", disabled: true, children: SELECTION_CONTROL_COPY.mixed }),
1705
+ SELECTION_CONTROL_COPY.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { value: String(option.value), children: option.label }, option.label))
1706
+ ]
1707
+ }
1708
+ ) });
1709
+ }
1710
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1711
+ "input",
1712
+ {
1713
+ ref: checkboxRef,
1714
+ className: boxClass,
1715
+ type: "checkbox",
1716
+ checked,
1717
+ onChange: () => select(!checked),
1718
+ "aria-label": label
1719
+ }
1720
+ );
1721
+ };
1722
+
1340
1723
  // src/shared/productMatrix.ts
1341
1724
  var productPurposeKey = (productUuid, purposeUuid) => productUuid ? `${productUuid}:${purposeUuid}` : purposeUuid;
1342
1725
  var purposeCoversProduct = (purpose, productUuid) => {
@@ -1345,6 +1728,14 @@ var purposeCoversProduct = (purpose, productUuid) => {
1345
1728
  return scope.includes(productUuid);
1346
1729
  };
1347
1730
  var isMultiProduct = (products) => Boolean(products && products.length > 1);
1731
+ var purposeNamesProduct = (purpose, productUuid) => {
1732
+ var _a;
1733
+ return Boolean((_a = purpose.product_uuids) == null ? void 0 : _a.includes(productUuid));
1734
+ };
1735
+ var noticeScopesPurposes = (purposes) => purposes.some((purpose) => {
1736
+ var _a, _b;
1737
+ return ((_b = (_a = purpose.product_uuids) == null ? void 0 : _a.length) != null ? _b : 0) > 0;
1738
+ });
1348
1739
  var serverMarksMandatoryProducts = (products) => Boolean(
1349
1740
  products && products.length > 0 && products.every((product) => product.mandatory !== void 0)
1350
1741
  );
@@ -1355,17 +1746,19 @@ var rowProductUuid = (row, products) => {
1355
1746
  var _a;
1356
1747
  return (_a = row.productUuid) != null ? _a : (products == null ? void 0 : products.length) === 1 ? products[0].uuid : void 0;
1357
1748
  };
1358
- var rowsUnderGate = (rows, products) => {
1359
- const gated = gatedProductUuids(products);
1360
- if (gated.size === 0) return [];
1361
- return rows.filter((row) => {
1362
- const productUuid = rowProductUuid(row, products);
1363
- return productUuid !== void 0 && gated.has(productUuid);
1364
- });
1749
+ var mandatoryProductsFirst = (products) => {
1750
+ const mandatory = products.filter((product) => product.mandatory === true);
1751
+ if (mandatory.length === 0 || mandatory.length === products.length) {
1752
+ return products;
1753
+ }
1754
+ return [
1755
+ ...mandatory,
1756
+ ...products.filter((product) => product.mandatory !== true)
1757
+ ];
1365
1758
  };
1366
1759
  var groupPurposesByProduct = (products, purposes, order) => {
1367
1760
  if (!products || products.length === 0) return [];
1368
- return products.map((product) => {
1761
+ return mandatoryProductsFirst(products).map((product) => {
1369
1762
  const covered = purposes.filter(
1370
1763
  (purpose) => purposeCoversProduct(purpose, product.uuid)
1371
1764
  );
@@ -1461,8 +1854,8 @@ var buildPreselection = (purposes, mode) => {
1461
1854
  });
1462
1855
  return { selectedPurposes, selectedDataElements };
1463
1856
  };
1464
- var hasRequiredDataElement = (purpose) => purpose.data_elements.some((element) => element.required);
1465
1857
  var isBlockingRequiredElement = (element) => element.required && element.enabled;
1858
+ var hasRequiredDataElement = (purpose) => purpose.data_elements.some(isBlockingRequiredElement);
1466
1859
 
1467
1860
  // src/RedactoNoticeConsent/layout.ts
1468
1861
  var resolveLogoPosition = (raw) => raw === "center" || raw === "right" ? raw : DEFAULT_LOGO_POSITION;
@@ -1575,6 +1968,25 @@ var injectCheckboxStyles = () => {
1575
1968
  padding: 4px !important;
1576
1969
  }
1577
1970
 
1971
+ /* Purpose rows sit between the product heading and a data element, so the
1972
+ three levels read as three levels rather than two sizes and an indent. */
1973
+ .redacto-checkbox-medium {
1974
+ appearance: none !important;
1975
+ -webkit-appearance: none !important;
1976
+ -moz-appearance: none !important;
1977
+ height: 17px !important;
1978
+ width: 17px !important;
1979
+ border: 2px solid #d0d5dd !important;
1980
+ border-radius: 5px !important;
1981
+ background-color: transparent !important;
1982
+ cursor: pointer !important;
1983
+ position: relative !important;
1984
+ box-sizing: border-box !important;
1985
+ flex-shrink: 0 !important;
1986
+ margin: 0 !important;
1987
+ padding: 4px !important;
1988
+ }
1989
+
1578
1990
  .redacto-checkbox-small {
1579
1991
  appearance: none !important;
1580
1992
  -webkit-appearance: none !important;
@@ -1597,12 +2009,18 @@ var injectCheckboxStyles = () => {
1597
2009
  border-color: #4f87ff !important;
1598
2010
  }
1599
2011
 
2012
+ .redacto-checkbox-medium:checked {
2013
+ background-color: #4f87ff !important;
2014
+ border-color: #4f87ff !important;
2015
+ }
2016
+
1600
2017
  .redacto-checkbox-small:checked {
1601
2018
  background-color: #4f87ff !important;
1602
2019
  border-color: #4f87ff !important;
1603
2020
  }
1604
2021
 
1605
- .redacto-checkbox-large:checked::after {
2022
+ .redacto-checkbox-large:checked::after,
2023
+ .redacto-checkbox-medium:checked::after {
1606
2024
  content: '' !important;
1607
2025
  position: absolute !important;
1608
2026
  left: 50% !important;
@@ -1628,7 +2046,8 @@ var injectCheckboxStyles = () => {
1628
2046
  box-sizing: border-box !important;
1629
2047
  }
1630
2048
 
1631
- .redacto-checkbox-large:focus {
2049
+ .redacto-checkbox-large:focus,
2050
+ .redacto-checkbox-medium:focus {
1632
2051
  outline: 2px solid #4f87ff !important;
1633
2052
  outline-offset: 2px !important;
1634
2053
  }
@@ -1815,13 +2234,13 @@ var NOTICE_FONT_CSS = `
1815
2234
  `;
1816
2235
 
1817
2236
  // src/shared/RequiredMarker.tsx
1818
- var import_jsx_runtime2 = require("react/jsx-runtime");
2237
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1819
2238
  var RequiredMarker = ({
1820
2239
  label = REQUIRED_MARKER_ARIA_LABEL
1821
- }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: REQUIRED_MARKER_STYLE, "aria-label": label, children: REQUIRED_MARKER_GLYPH });
2240
+ }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: REQUIRED_MARKER_STYLE, "aria-label": label, children: REQUIRED_MARKER_GLYPH });
1822
2241
 
1823
2242
  // src/shared/useNoticeFont.ts
1824
- var import_react = require("react");
2243
+ var import_react3 = require("react");
1825
2244
 
1826
2245
  // src/shared/notice-font.ts
1827
2246
  var toFontFamilyValue = (value) => {
@@ -1973,14 +2392,14 @@ var useNoticeFont = ({
1973
2392
  hostFont,
1974
2393
  noticeFont
1975
2394
  }) => {
1976
- const fontFamily = (0, import_react.useMemo)(
2395
+ const fontFamily = (0, import_react3.useMemo)(
1977
2396
  () => resolveNoticeFontFamily({ hostFont, noticeFont }),
1978
2397
  [hostFont, noticeFont]
1979
2398
  );
1980
- (0, import_react.useEffect)(() => {
2399
+ (0, import_react3.useEffect)(() => {
1981
2400
  injectNoticeFontStyles();
1982
2401
  }, []);
1983
- (0, import_react.useEffect)(() => {
2402
+ (0, import_react3.useEffect)(() => {
1984
2403
  const controller = new AbortController();
1985
2404
  void loadNoticeWebfont(fontFamily, controller.signal);
1986
2405
  return () => controller.abort();
@@ -1989,11 +2408,11 @@ var useNoticeFont = ({
1989
2408
  };
1990
2409
 
1991
2410
  // src/RedactoNoticeConsent/useMediaQuery.ts
1992
- var import_react2 = require("react");
2411
+ var import_react4 = require("react");
1993
2412
  var useMediaQuery = (query) => {
1994
2413
  const getMatches = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
1995
- const [matches, setMatches] = (0, import_react2.useState)(getMatches);
1996
- (0, import_react2.useEffect)(() => {
2414
+ const [matches, setMatches] = (0, import_react4.useState)(getMatches);
2415
+ (0, import_react4.useEffect)(() => {
1997
2416
  if (typeof window === "undefined") return;
1998
2417
  const media = window.matchMedia(query);
1999
2418
  const listener = (e) => {
@@ -2079,7 +2498,7 @@ var updateConsentState = (updates) => {
2079
2498
  };
2080
2499
 
2081
2500
  // src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
2082
- var import_jsx_runtime3 = require("react/jsx-runtime");
2501
+ var import_jsx_runtime5 = require("react/jsx-runtime");
2083
2502
  var DEFAULT_HEADING_COLOR = "#323B4B";
2084
2503
  var CHEVRON_BUTTON_STYLE = {
2085
2504
  background: "none",
@@ -2106,7 +2525,7 @@ var reviewIndicatorStyle = (size) => ({
2106
2525
  flexShrink: 0,
2107
2526
  boxSizing: "border-box"
2108
2527
  });
2109
- var CollapseChevron = ({ open, color }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: CHEVRON_WRAPPER_STYLE, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2528
+ var CollapseChevron = ({ open, color }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: CHEVRON_WRAPPER_STYLE, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2110
2529
  "svg",
2111
2530
  {
2112
2531
  width: "7",
@@ -2123,7 +2542,7 @@ var CollapseChevron = ({ open, color }) => /* @__PURE__ */ (0, import_jsx_runtim
2123
2542
  transition: "transform 0.3s ease"
2124
2543
  },
2125
2544
  "aria-hidden": "true",
2126
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M1 1L6 6L1 11" })
2545
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M1 1L6 6L1 11" })
2127
2546
  }
2128
2547
  ) });
2129
2548
  var ProductSectionHeader = ({
@@ -2142,23 +2561,18 @@ var ProductSectionHeader = ({
2142
2561
  onToggleSelect,
2143
2562
  getTranslatedText
2144
2563
  }) => {
2145
- const checkboxRef = (0, import_react3.useRef)(null);
2564
+ var _a;
2146
2565
  const name = getTranslatedText("products.name", product.name, product.uuid);
2147
2566
  const headingColor = (settings == null ? void 0 : settings.headingColor) || DEFAULT_HEADING_COLOR;
2148
- (0, import_react3.useEffect)(() => {
2149
- if (checkboxRef.current) {
2150
- checkboxRef.current.indeterminate = someSelected && !allSelected;
2151
- }
2152
- }, [someSelected, allSelected]);
2153
2567
  const handleToggleCollapse = () => {
2154
2568
  onToggleCollapse(product.uuid);
2155
2569
  };
2156
- const handleToggleSelect = () => {
2157
- onToggleSelect(product.uuid);
2570
+ const handleSelect = (next) => {
2571
+ onToggleSelect(product.uuid, next);
2158
2572
  };
2159
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.sectionHeader, children: [
2160
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.optionLeft, children: [
2161
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2573
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles4.sectionHeader, children: [
2574
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles4.optionLeft, children: [
2575
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2162
2576
  "button",
2163
2577
  {
2164
2578
  type: "button",
@@ -2167,10 +2581,10 @@ var ProductSectionHeader = ({
2167
2581
  "aria-controls": `product-${product.uuid}`,
2168
2582
  "aria-labelledby": `product-name-${product.uuid}`,
2169
2583
  style: CHEVRON_BUTTON_STYLE,
2170
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CollapseChevron, { open: !collapsed, color: headingColor })
2584
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CollapseChevron, { open: !collapsed, color: headingColor })
2171
2585
  }
2172
2586
  ),
2173
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles4.optionTextContainer, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2587
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles4.optionTextContainer, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2174
2588
  "h2",
2175
2589
  {
2176
2590
  id: `product-name-${product.uuid}`,
@@ -2181,52 +2595,22 @@ var ProductSectionHeader = ({
2181
2595
  },
2182
2596
  children: [
2183
2597
  name,
2184
- isRequired && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RequiredMarker, {})
2598
+ isRequired && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, {})
2185
2599
  ]
2186
2600
  }
2187
2601
  ) })
2188
2602
  ] }),
2189
- locked ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2190
- "div",
2191
- {
2192
- role: "img",
2193
- style: {
2194
- ...reviewIndicatorStyle(20),
2195
- backgroundColor: "#10B981",
2196
- marginLeft: "12px"
2197
- },
2198
- "aria-label": PRODUCT_SECTION_COPY.settled(name),
2199
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2200
- "svg",
2201
- {
2202
- width: "12",
2203
- height: "12",
2204
- viewBox: "0 0 12 12",
2205
- fill: "none",
2206
- xmlns: "http://www.w3.org/2000/svg",
2207
- "aria-hidden": "true",
2208
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2209
- "path",
2210
- {
2211
- d: "M4 6L5.5 7.5L8.5 4.5",
2212
- stroke: "white",
2213
- strokeWidth: "2",
2214
- strokeLinecap: "round",
2215
- strokeLinejoin: "round"
2216
- }
2217
- )
2218
- }
2219
- )
2220
- }
2221
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2222
- "input",
2603
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2604
+ SelectionControl,
2223
2605
  {
2224
- ref: checkboxRef,
2225
- className: "redacto-checkbox-large",
2226
- type: "checkbox",
2606
+ control: (_a = settings == null ? void 0 : settings.selectionControl) != null ? _a : DEFAULT_SELECTION_CONTROL,
2227
2607
  checked: allSelected,
2228
- onChange: handleToggleSelect,
2229
- "aria-label": requiredOnly ? PRODUCT_SECTION_COPY.toggleRequired(name, purposeCount) : PRODUCT_SECTION_COPY.toggleSelection(name, purposeCount)
2608
+ indeterminate: someSelected && !allSelected,
2609
+ onSelect: handleSelect,
2610
+ label: requiredOnly ? PRODUCT_SECTION_COPY.toggleRequired(name, purposeCount) : PRODUCT_SECTION_COPY.toggleSelection(name, purposeCount),
2611
+ groupName: `redacto-product-${product.uuid}`,
2612
+ locked,
2613
+ lockedLabel: PRODUCT_SECTION_COPY.settled(name)
2230
2614
  }
2231
2615
  )
2232
2616
  ] });
@@ -2234,10 +2618,10 @@ var ProductSectionHeader = ({
2234
2618
  var PurposeItem = ({
2235
2619
  purpose,
2236
2620
  productUuid,
2237
- productIsRequired,
2238
2621
  selectedPurposes,
2239
2622
  collapsedPurposes,
2240
2623
  selectedDataElements,
2624
+ recordedAnswers,
2241
2625
  settings,
2242
2626
  styles: styles4,
2243
2627
  responsiveStyles,
@@ -2249,22 +2633,32 @@ var PurposeItem = ({
2249
2633
  selectedLanguage,
2250
2634
  initialDataElementSelections = {}
2251
2635
  }) => {
2636
+ var _a;
2252
2637
  const stateKey = productPurposeKey(productUuid, purpose.uuid);
2253
- const headingStyle = (0, import_react3.useMemo)(
2638
+ const handlePurposeToggle = (0, import_react5.useCallback)(
2639
+ () => onPurposeToggle(purpose.uuid, productUuid),
2640
+ [onPurposeToggle, purpose.uuid, productUuid]
2641
+ );
2642
+ const purposeControlLabel = `Select all data elements for ${getTranslatedText(
2643
+ `purposes.name`,
2644
+ purpose.name,
2645
+ purpose.uuid
2646
+ )}`;
2647
+ const headingStyle = (0, import_react5.useMemo)(
2254
2648
  () => ({
2255
2649
  color: (settings == null ? void 0 : settings.headingColor) || DEFAULT_HEADING_COLOR
2256
2650
  }),
2257
2651
  [settings == null ? void 0 : settings.headingColor]
2258
2652
  );
2259
- const textStyle = (0, import_react3.useMemo)(
2653
+ const textStyle = (0, import_react5.useMemo)(
2260
2654
  () => ({
2261
2655
  color: (settings == null ? void 0 : settings.textColor) || "#344054"
2262
2656
  }),
2263
2657
  [settings == null ? void 0 : settings.textColor]
2264
2658
  );
2265
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
2266
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.optionItem, children: [
2267
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2659
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
2660
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles4.optionItem, children: [
2661
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2268
2662
  "div",
2269
2663
  {
2270
2664
  style: styles4.optionLeft,
@@ -2285,15 +2679,15 @@ var PurposeItem = ({
2285
2679
  }
2286
2680
  },
2287
2681
  children: [
2288
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2682
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2289
2683
  CollapseChevron,
2290
2684
  {
2291
2685
  open: !collapsedPurposes[stateKey],
2292
2686
  color: (settings == null ? void 0 : settings.headingColor) || DEFAULT_HEADING_COLOR
2293
2687
  }
2294
2688
  ),
2295
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.optionTextContainer, children: [
2296
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2689
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles4.optionTextContainer, children: [
2690
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2297
2691
  "h2",
2298
2692
  {
2299
2693
  id: `purpose-name-${stateKey}`,
@@ -2304,12 +2698,12 @@ var PurposeItem = ({
2304
2698
  },
2305
2699
  children: [
2306
2700
  getTranslatedText(`purposes.name`, purpose.name, purpose.uuid),
2307
- productIsRequired !== false && hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RequiredMarker, {})
2701
+ hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, {})
2308
2702
  ]
2309
2703
  },
2310
2704
  `purpose-name-${purpose.uuid}-${selectedLanguage}`
2311
2705
  ),
2312
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2706
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2313
2707
  "h3",
2314
2708
  {
2315
2709
  id: `purpose-description-${stateKey}`,
@@ -2330,69 +2724,36 @@ var PurposeItem = ({
2330
2724
  ]
2331
2725
  }
2332
2726
  ),
2333
- !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2334
- "input",
2727
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2728
+ SelectionControl,
2335
2729
  {
2336
- className: "redacto-checkbox-large",
2337
- type: "checkbox",
2730
+ control: (_a = settings == null ? void 0 : settings.selectionControl) != null ? _a : DEFAULT_SELECTION_CONTROL,
2338
2731
  checked: selectedPurposes[stateKey] || false,
2339
- onChange: () => onPurposeToggle(purpose.uuid, productUuid),
2340
- "aria-label": `Select all data elements for ${getTranslatedText(
2732
+ onSelect: handlePurposeToggle,
2733
+ label: purposeControlLabel,
2734
+ groupName: `redacto-purpose-${stateKey}`,
2735
+ recordedAnswer: recordedAnswers == null ? void 0 : recordedAnswers[stateKey],
2736
+ size: "small",
2737
+ locked: isAlreadyConsented,
2738
+ lockedLabel: `Already consented to ${getTranslatedText(
2341
2739
  `purposes.name`,
2342
2740
  purpose.name,
2343
2741
  purpose.uuid
2344
2742
  )}`
2345
2743
  }
2346
- ),
2347
- isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2348
- "div",
2349
- {
2350
- role: "img",
2351
- style: {
2352
- ...reviewIndicatorStyle(20),
2353
- backgroundColor: "#10B981",
2354
- marginLeft: "12px"
2355
- },
2356
- "aria-label": `Already consented to ${getTranslatedText(
2357
- `purposes.name`,
2358
- purpose.name,
2359
- purpose.uuid
2360
- )}`,
2361
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2362
- "svg",
2363
- {
2364
- width: "12",
2365
- height: "12",
2366
- viewBox: "0 0 12 12",
2367
- fill: "none",
2368
- xmlns: "http://www.w3.org/2000/svg",
2369
- "aria-hidden": "true",
2370
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2371
- "path",
2372
- {
2373
- d: "M4 6L5.5 7.5L8.5 4.5",
2374
- stroke: "white",
2375
- strokeWidth: "2",
2376
- strokeLinecap: "round",
2377
- strokeLinejoin: "round"
2378
- }
2379
- )
2380
- }
2381
- )
2382
- }
2383
2744
  )
2384
2745
  ] }),
2385
- !collapsedPurposes[stateKey] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2746
+ !collapsedPurposes[stateKey] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2386
2747
  "div",
2387
2748
  {
2388
2749
  id: `purpose-${purpose.uuid}`,
2389
2750
  style: styles4.dataElementsContainer,
2390
- children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2751
+ children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2391
2752
  "div",
2392
2753
  {
2393
2754
  style: styles4.dataElementItem,
2394
2755
  children: [
2395
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2756
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2396
2757
  "span",
2397
2758
  {
2398
2759
  id: `data-element-${stateKey}-${dataElement.uuid}`,
@@ -2407,12 +2768,12 @@ var PurposeItem = ({
2407
2768
  dataElement.name,
2408
2769
  dataElement.uuid
2409
2770
  ),
2410
- dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RequiredMarker, {})
2771
+ isBlockingRequiredElement(dataElement) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, {})
2411
2772
  ]
2412
2773
  },
2413
2774
  `data-element-${purpose.uuid}-${dataElement.uuid}-${selectedLanguage}`
2414
2775
  ),
2415
- !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2776
+ !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2416
2777
  "input",
2417
2778
  {
2418
2779
  className: "redacto-checkbox-small",
@@ -2430,11 +2791,11 @@ var PurposeItem = ({
2430
2791
  )}${dataElement.required ? " (required)" : ""}`
2431
2792
  }
2432
2793
  ),
2433
- isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: (() => {
2794
+ isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: (() => {
2434
2795
  const combinedId = `${stateKey}-${dataElement.uuid}`;
2435
2796
  const wasOriginallySelected = initialDataElementSelections[combinedId] || false;
2436
2797
  if (wasOriginallySelected) {
2437
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2798
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2438
2799
  "div",
2439
2800
  {
2440
2801
  role: "img",
@@ -2447,7 +2808,7 @@ var PurposeItem = ({
2447
2808
  dataElement.name,
2448
2809
  dataElement.uuid
2449
2810
  )}`,
2450
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2811
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2451
2812
  "svg",
2452
2813
  {
2453
2814
  width: "10",
@@ -2456,7 +2817,7 @@ var PurposeItem = ({
2456
2817
  fill: "none",
2457
2818
  xmlns: "http://www.w3.org/2000/svg",
2458
2819
  "aria-hidden": "true",
2459
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2820
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2460
2821
  "path",
2461
2822
  {
2462
2823
  d: "M3 5L4.5 6.5L7.5 3.5",
@@ -2471,7 +2832,7 @@ var PurposeItem = ({
2471
2832
  }
2472
2833
  );
2473
2834
  } else {
2474
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2835
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2475
2836
  "div",
2476
2837
  {
2477
2838
  role: "img",
@@ -2521,12 +2882,12 @@ var GuardianForm = ({
2521
2882
  logoUrl
2522
2883
  }) => {
2523
2884
  var _a, _b, _c, _d, _e;
2524
- const [isDropdownOpen, setIsDropdownOpen] = (0, import_react3.useState)(false);
2525
- const [focusedIndex, setFocusedIndex] = (0, import_react3.useState)(-1);
2526
- const [openUpward, setOpenUpward] = (0, import_react3.useState)(false);
2527
- const dropdownRef = (0, import_react3.useRef)(null);
2528
- const optionsRef = (0, import_react3.useRef)(null);
2529
- (0, import_react3.useEffect)(() => {
2885
+ const [isDropdownOpen, setIsDropdownOpen] = (0, import_react5.useState)(false);
2886
+ const [focusedIndex, setFocusedIndex] = (0, import_react5.useState)(-1);
2887
+ const [openUpward, setOpenUpward] = (0, import_react5.useState)(false);
2888
+ const dropdownRef = (0, import_react5.useRef)(null);
2889
+ const optionsRef = (0, import_react5.useRef)(null);
2890
+ (0, import_react5.useEffect)(() => {
2530
2891
  if (!isDropdownOpen) return;
2531
2892
  const handleClickOutside = (e) => {
2532
2893
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
@@ -2537,7 +2898,7 @@ var GuardianForm = ({
2537
2898
  document.addEventListener("mousedown", handleClickOutside);
2538
2899
  return () => document.removeEventListener("mousedown", handleClickOutside);
2539
2900
  }, [isDropdownOpen]);
2540
- (0, import_react3.useEffect)(() => {
2901
+ (0, import_react5.useEffect)(() => {
2541
2902
  if (!isDropdownOpen || !dropdownRef.current) return;
2542
2903
  const rect = dropdownRef.current.getBoundingClientRect();
2543
2904
  const spaceBelow = window.innerHeight - rect.bottom;
@@ -2582,7 +2943,7 @@ var GuardianForm = ({
2582
2943
  break;
2583
2944
  }
2584
2945
  };
2585
- (0, import_react3.useEffect)(() => {
2946
+ (0, import_react5.useEffect)(() => {
2586
2947
  var _a2;
2587
2948
  if (focusedIndex >= 0 && optionsRef.current) {
2588
2949
  const option = optionsRef.current.children[focusedIndex];
@@ -2642,10 +3003,10 @@ var GuardianForm = ({
2642
3003
  (o) => o.value === formData.guardianRelationship
2643
3004
  )) == null ? void 0 : _a.label;
2644
3005
  const hasError = Boolean(errors.guardianRelationship);
2645
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2646
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.topLeft, children: [
2647
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
2648
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3006
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3007
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles4.topLeft, children: [
3008
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
3009
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2649
3010
  "h2",
2650
3011
  {
2651
3012
  id: "guardian-form-title",
@@ -2660,7 +3021,7 @@ var GuardianForm = ({
2660
3021
  }
2661
3022
  )
2662
3023
  ] }) }),
2663
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3024
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2664
3025
  "div",
2665
3026
  {
2666
3027
  style: {
@@ -2669,7 +3030,7 @@ var GuardianForm = ({
2669
3030
  ...componentTextStyle
2670
3031
  },
2671
3032
  children: [
2672
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3033
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2673
3034
  "p",
2674
3035
  {
2675
3036
  style: {
@@ -2683,8 +3044,8 @@ var GuardianForm = ({
2683
3044
  children: "Since you are under the age of consent, a legal guardian must verify their identity via DigiLocker before you can proceed."
2684
3045
  }
2685
3046
  ),
2686
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: infoBannerStyle, children: [
2687
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3047
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: infoBannerStyle, children: [
3048
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2688
3049
  "svg",
2689
3050
  {
2690
3051
  width: "16",
@@ -2697,15 +3058,15 @@ var GuardianForm = ({
2697
3058
  strokeLinejoin: "round",
2698
3059
  style: { flexShrink: 0, marginTop: "1px" },
2699
3060
  children: [
2700
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
2701
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
2702
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
3061
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
3062
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
3063
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
2703
3064
  ]
2704
3065
  }
2705
3066
  ),
2706
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "The guardian's name will be matched against their DigiLocker identity document (e.g. Aadhaar). Please enter the name exactly as it appears on the document." })
3067
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "The guardian's name will be matched against their DigiLocker identity document (e.g. Aadhaar). Please enter the name exactly as it appears on the document." })
2707
3068
  ] }),
2708
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3069
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2709
3070
  "div",
2710
3071
  {
2711
3072
  style: {
@@ -2714,12 +3075,12 @@ var GuardianForm = ({
2714
3075
  gap: "14px"
2715
3076
  },
2716
3077
  children: [
2717
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
2718
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { htmlFor: "guardianName", style: labelStyle, children: [
3078
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
3079
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { htmlFor: "guardianName", style: labelStyle, children: [
2719
3080
  "Guardian's Full Name ",
2720
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
3081
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
2721
3082
  ] }),
2722
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3083
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2723
3084
  "input",
2724
3085
  {
2725
3086
  id: "guardianName",
@@ -2735,16 +3096,16 @@ var GuardianForm = ({
2735
3096
  "aria-describedby": "guardianName-hint"
2736
3097
  }
2737
3098
  ),
2738
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { id: "guardianName-hint", style: hintStyle, children: "Enter the full name as per government ID (Aadhaar, PAN, etc.)" }),
2739
- errors.guardianName && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianName })
3099
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { id: "guardianName-hint", style: hintStyle, children: "Enter the full name as per government ID (Aadhaar, PAN, etc.)" }),
3100
+ errors.guardianName && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianName })
2740
3101
  ] }),
2741
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
2742
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { htmlFor: "guardianContact", style: labelStyle, children: [
3102
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
3103
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { htmlFor: "guardianContact", style: labelStyle, children: [
2743
3104
  "Guardian's Phone Number",
2744
3105
  " ",
2745
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
3106
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
2746
3107
  ] }),
2747
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3108
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2748
3109
  "input",
2749
3110
  {
2750
3111
  id: "guardianContact",
@@ -2761,15 +3122,15 @@ var GuardianForm = ({
2761
3122
  "aria-describedby": "guardianContact-hint"
2762
3123
  }
2763
3124
  ),
2764
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { id: "guardianContact-hint", style: hintStyle, children: "Mobile number linked to guardian's Aadhaar" }),
2765
- errors.guardianContact && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianContact })
3125
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { id: "guardianContact-hint", style: hintStyle, children: "Mobile number linked to guardian's Aadhaar" }),
3126
+ errors.guardianContact && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianContact })
2766
3127
  ] }),
2767
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref: dropdownRef, style: { position: "relative" }, children: [
2768
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { id: "guardianRelationship-label", style: labelStyle, children: [
3128
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { ref: dropdownRef, style: { position: "relative" }, children: [
3129
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { id: "guardianRelationship-label", style: labelStyle, children: [
2769
3130
  "Relationship ",
2770
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
3131
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
2771
3132
  ] }),
2772
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3133
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2773
3134
  "div",
2774
3135
  {
2775
3136
  role: "combobox",
@@ -2797,7 +3158,7 @@ var GuardianForm = ({
2797
3158
  transition: "border-color 0.15s, box-shadow 0.15s"
2798
3159
  },
2799
3160
  children: [
2800
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3161
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2801
3162
  "span",
2802
3163
  {
2803
3164
  style: {
@@ -2808,7 +3169,7 @@ var GuardianForm = ({
2808
3169
  children: selectedLabel || "Select relationship"
2809
3170
  }
2810
3171
  ),
2811
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3172
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2812
3173
  "svg",
2813
3174
  {
2814
3175
  width: "14",
@@ -2825,13 +3186,13 @@ var GuardianForm = ({
2825
3186
  transform: isDropdownOpen ? "rotate(180deg)" : "rotate(0deg)",
2826
3187
  transition: "transform 0.2s"
2827
3188
  },
2828
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polyline", { points: "6 9 12 15 18 9" })
3189
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polyline", { points: "6 9 12 15 18 9" })
2829
3190
  }
2830
3191
  )
2831
3192
  ]
2832
3193
  }
2833
3194
  ),
2834
- isDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3195
+ isDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2835
3196
  "div",
2836
3197
  {
2837
3198
  ref: optionsRef,
@@ -2858,7 +3219,7 @@ var GuardianForm = ({
2858
3219
  const isSelected = formData.guardianRelationship === option.value;
2859
3220
  const isFocused = focusedIndex === index;
2860
3221
  const accentColor = ((_b2 = (_a2 = settings == null ? void 0 : settings.button) == null ? void 0 : _a2.accept) == null ? void 0 : _b2.backgroundColor) || "#3b82f6";
2861
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3222
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2862
3223
  "div",
2863
3224
  {
2864
3225
  id: `guardianRelationship-option-${index}`,
@@ -2878,8 +3239,8 @@ var GuardianForm = ({
2878
3239
  transition: "background-color 0.1s"
2879
3240
  },
2880
3241
  children: [
2881
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: option.label }),
2882
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3242
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: option.label }),
3243
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2883
3244
  "svg",
2884
3245
  {
2885
3246
  width: "14",
@@ -2891,7 +3252,7 @@ var GuardianForm = ({
2891
3252
  strokeLinecap: "round",
2892
3253
  strokeLinejoin: "round",
2893
3254
  style: { flexShrink: 0 },
2894
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polyline", { points: "20 6 9 17 4 12" })
3255
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polyline", { points: "20 6 9 17 4 12" })
2895
3256
  }
2896
3257
  )
2897
3258
  ]
@@ -2901,12 +3262,12 @@ var GuardianForm = ({
2901
3262
  })
2902
3263
  }
2903
3264
  ),
2904
- errors.guardianRelationship && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianRelationship })
3265
+ errors.guardianRelationship && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianRelationship })
2905
3266
  ] })
2906
3267
  ]
2907
3268
  }
2908
3269
  ),
2909
- errors.general && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3270
+ errors.general && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2910
3271
  "div",
2911
3272
  {
2912
3273
  role: "alert",
@@ -2926,7 +3287,7 @@ var GuardianForm = ({
2926
3287
  ]
2927
3288
  }
2928
3289
  ),
2929
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3290
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2930
3291
  "div",
2931
3292
  {
2932
3293
  style: {
@@ -2936,7 +3297,7 @@ var GuardianForm = ({
2936
3297
  paddingTop: "12px"
2937
3298
  },
2938
3299
  children: [
2939
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3300
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2940
3301
  "button",
2941
3302
  {
2942
3303
  style: {
@@ -2952,7 +3313,7 @@ var GuardianForm = ({
2952
3313
  children: isSubmitting ? "Verifying..." : "Verify via DigiLocker"
2953
3314
  }
2954
3315
  ),
2955
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3316
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2956
3317
  "button",
2957
3318
  {
2958
3319
  style: {
@@ -3021,10 +3382,10 @@ var VerificationScreen = ({
3021
3382
  animation: "spin 1s linear infinite",
3022
3383
  margin: "24px auto"
3023
3384
  };
3024
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3025
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.topLeft, children: [
3026
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
3027
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3385
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3386
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles4.topLeft, children: [
3387
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
3388
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3028
3389
  "h2",
3029
3390
  {
3030
3391
  id: "verification-title",
@@ -3039,7 +3400,7 @@ var VerificationScreen = ({
3039
3400
  }
3040
3401
  )
3041
3402
  ] }) }),
3042
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3403
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3043
3404
  "div",
3044
3405
  {
3045
3406
  style: {
@@ -3049,7 +3410,7 @@ var VerificationScreen = ({
3049
3410
  textAlign: "center"
3050
3411
  },
3051
3412
  children: [
3052
- isVerificationComplete && !error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3413
+ isVerificationComplete && !error ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3053
3414
  "div",
3054
3415
  {
3055
3416
  style: {
@@ -3060,7 +3421,7 @@ var VerificationScreen = ({
3060
3421
  flex: 1
3061
3422
  },
3062
3423
  children: [
3063
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3424
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3064
3425
  "div",
3065
3426
  {
3066
3427
  style: {
@@ -3072,7 +3433,7 @@ var VerificationScreen = ({
3072
3433
  alignItems: "center",
3073
3434
  justifyContent: "center"
3074
3435
  },
3075
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3436
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3076
3437
  "svg",
3077
3438
  {
3078
3439
  width: "32",
@@ -3083,12 +3444,12 @@ var VerificationScreen = ({
3083
3444
  strokeWidth: "2",
3084
3445
  strokeLinecap: "round",
3085
3446
  strokeLinejoin: "round",
3086
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polyline", { points: "20 6 9 17 4 12" })
3447
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polyline", { points: "20 6 9 17 4 12" })
3087
3448
  }
3088
3449
  )
3089
3450
  }
3090
3451
  ),
3091
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3452
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3092
3453
  "p",
3093
3454
  {
3094
3455
  style: {
@@ -3104,12 +3465,12 @@ var VerificationScreen = ({
3104
3465
  )
3105
3466
  ]
3106
3467
  }
3107
- ) : (isInitiating || isPolling) && !error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3108
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: spinnerStyle }),
3109
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: statusStyle, children: isInitiating ? "Opening DigiLocker in a new tab..." : "Please complete the verification in the DigiLocker tab. This page will update automatically when verification is complete." })
3468
+ ) : (isInitiating || isPolling) && !error ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3469
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: spinnerStyle }),
3470
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: statusStyle, children: isInitiating ? "Opening DigiLocker in a new tab..." : "Please complete the verification in the DigiLocker tab. This page will update automatically when verification is complete." })
3110
3471
  ] }) : null,
3111
- error && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3112
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3472
+ error && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3473
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3113
3474
  "div",
3114
3475
  {
3115
3476
  style: {
@@ -3122,7 +3483,7 @@ var VerificationScreen = ({
3122
3483
  justifyContent: "center",
3123
3484
  margin: "24px auto"
3124
3485
  },
3125
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3486
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3126
3487
  "svg",
3127
3488
  {
3128
3489
  width: "32",
@@ -3134,14 +3495,14 @@ var VerificationScreen = ({
3134
3495
  strokeLinecap: "round",
3135
3496
  strokeLinejoin: "round",
3136
3497
  children: [
3137
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
3138
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
3498
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
3499
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
3139
3500
  ]
3140
3501
  }
3141
3502
  )
3142
3503
  }
3143
3504
  ),
3144
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3505
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3145
3506
  "p",
3146
3507
  {
3147
3508
  style: {
@@ -3155,12 +3516,12 @@ var VerificationScreen = ({
3155
3516
  children: "Verification failed"
3156
3517
  }
3157
3518
  ),
3158
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: errorStyle, children: error })
3519
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: errorStyle, children: error })
3159
3520
  ] })
3160
3521
  ]
3161
3522
  }
3162
3523
  ),
3163
- isAutoTransitioning ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3524
+ isAutoTransitioning ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3164
3525
  "div",
3165
3526
  {
3166
3527
  style: {
@@ -3172,7 +3533,7 @@ var VerificationScreen = ({
3172
3533
  gap: "12px",
3173
3534
  justifyContent: "center"
3174
3535
  },
3175
- children: isVerificationComplete && !error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3536
+ children: isVerificationComplete && !error ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3176
3537
  "button",
3177
3538
  {
3178
3539
  style: {
@@ -3185,7 +3546,7 @@ var VerificationScreen = ({
3185
3546
  "aria-label": "Continue to consent form",
3186
3547
  children: "Continue"
3187
3548
  }
3188
- ) : error && canRetry ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3549
+ ) : error && canRetry ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3189
3550
  "button",
3190
3551
  {
3191
3552
  style: {
@@ -3199,7 +3560,7 @@ var VerificationScreen = ({
3199
3560
  "aria-label": errorCode === "GUARDIAN_UNDER_18" ? "Change guardian details" : "Try verification again",
3200
3561
  children: errorCode === "GUARDIAN_UNDER_18" ? "Change Guardian" : "Try Again"
3201
3562
  }
3202
- ) : error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3563
+ ) : error ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3203
3564
  "button",
3204
3565
  {
3205
3566
  style: {
@@ -3213,7 +3574,7 @@ var VerificationScreen = ({
3213
3574
  "aria-label": "Go back",
3214
3575
  children: "Go Back"
3215
3576
  }
3216
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3577
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3217
3578
  "button",
3218
3579
  {
3219
3580
  style: {
@@ -3245,11 +3606,11 @@ var AgeVerification = ({
3245
3606
  logoUrl,
3246
3607
  isMobile
3247
3608
  }) => {
3248
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3249
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: [
3250
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.topLeft, children: [
3251
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Redacto Logo" }),
3252
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3609
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
3610
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: [
3611
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles4.topLeft, children: [
3612
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Redacto Logo" }),
3613
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3253
3614
  "h2",
3254
3615
  {
3255
3616
  id: "age-verification-title",
@@ -3262,7 +3623,7 @@ var AgeVerification = ({
3262
3623
  }
3263
3624
  )
3264
3625
  ] }),
3265
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3626
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3266
3627
  "button",
3267
3628
  {
3268
3629
  onClick: onClose,
@@ -3277,7 +3638,7 @@ var AgeVerification = ({
3277
3638
  justifyContent: "center"
3278
3639
  },
3279
3640
  "aria-label": "Close modal",
3280
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3641
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3281
3642
  "svg",
3282
3643
  {
3283
3644
  width: isMobile ? "18" : "20",
@@ -3286,7 +3647,7 @@ var AgeVerification = ({
3286
3647
  fill: "none",
3287
3648
  xmlns: "http://www.w3.org/2000/svg",
3288
3649
  "aria-hidden": "true",
3289
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3650
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3290
3651
  "path",
3291
3652
  {
3292
3653
  d: "M15 5L5 15M5 5L15 15",
@@ -3301,7 +3662,7 @@ var AgeVerification = ({
3301
3662
  }
3302
3663
  )
3303
3664
  ] }),
3304
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3665
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3305
3666
  "div",
3306
3667
  {
3307
3668
  style: {
@@ -3310,7 +3671,7 @@ var AgeVerification = ({
3310
3671
  ...componentTextStyle
3311
3672
  },
3312
3673
  children: [
3313
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3674
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3314
3675
  "p",
3315
3676
  {
3316
3677
  style: {
@@ -3322,7 +3683,7 @@ var AgeVerification = ({
3322
3683
  children: "To proceed with this consent form, we need to verify your age."
3323
3684
  }
3324
3685
  ),
3325
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3686
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3326
3687
  "p",
3327
3688
  {
3328
3689
  style: {
@@ -3337,7 +3698,7 @@ var AgeVerification = ({
3337
3698
  ]
3338
3699
  }
3339
3700
  ),
3340
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3701
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3341
3702
  "div",
3342
3703
  {
3343
3704
  style: {
@@ -3346,7 +3707,7 @@ var AgeVerification = ({
3346
3707
  ...componentTextStyle
3347
3708
  },
3348
3709
  children: [
3349
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3710
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3350
3711
  "button",
3351
3712
  {
3352
3713
  style: {
@@ -3361,7 +3722,7 @@ var AgeVerification = ({
3361
3722
  children: "Yes, I am 18 or older"
3362
3723
  }
3363
3724
  ),
3364
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3725
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3365
3726
  "button",
3366
3727
  {
3367
3728
  style: {
@@ -3410,7 +3771,7 @@ var RedactoNoticeConsent = ({
3410
3771
  defaultOpenProducts
3411
3772
  }) => {
3412
3773
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
3413
- const sandboxParams = (0, import_react3.useMemo)(
3774
+ const sandboxParams = (0, import_react5.useMemo)(
3414
3775
  () => ({
3415
3776
  token,
3416
3777
  sandboxUcic: ucic,
@@ -3421,7 +3782,7 @@ var RedactoNoticeConsent = ({
3421
3782
  }),
3422
3783
  [token, ucic, email, mobile, organisationUuid, workspaceUuid]
3423
3784
  );
3424
- const propValidationError = (0, import_react3.useMemo)(() => {
3785
+ const propValidationError = (0, import_react5.useMemo)(() => {
3425
3786
  if (!(noticeId == null ? void 0 : noticeId.trim())) {
3426
3787
  return "RedactoNoticeConsent: 'noticeId' prop is required and cannot be empty";
3427
3788
  }
@@ -3449,7 +3810,7 @@ var RedactoNoticeConsent = ({
3449
3810
  ucic
3450
3811
  ]);
3451
3812
  if (propValidationError) {
3452
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3813
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
3453
3814
  "div",
3454
3815
  {
3455
3816
  style: {
@@ -3460,79 +3821,85 @@ var RedactoNoticeConsent = ({
3460
3821
  color: "#c33"
3461
3822
  },
3462
3823
  children: [
3463
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { children: "Configuration Error" }),
3464
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { children: propValidationError }),
3465
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { children: "Please check your component props and try again." })
3824
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { children: "Configuration Error" }),
3825
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: propValidationError }),
3826
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: "Please check your component props and try again." })
3466
3827
  ]
3467
3828
  }
3468
3829
  );
3469
3830
  }
3470
- const [isLoading, setIsLoading] = (0, import_react3.useState)(true);
3471
- const [isSubmitting, setIsSubmitting] = (0, import_react3.useState)(false);
3472
- const [isSubmittingAccept, setIsSubmittingAccept] = (0, import_react3.useState)(false);
3473
- const [isSubmittingDecline, setIsSubmittingDecline] = (0, import_react3.useState)(false);
3474
- const [content, setContent] = (0, import_react3.useState)(null);
3475
- const [categorizedPurposes, setCategorizedPurposes] = (0, import_react3.useState)(null);
3476
- const [selectedPurposes, setSelectedPurposes] = (0, import_react3.useState)({});
3477
- const [selectedDataElements, setSelectedDataElements] = (0, import_react3.useState)({});
3478
- const [initialDataElementSelections, setInitialDataElementSelections] = (0, import_react3.useState)({});
3479
- const [collapsedProducts, setCollapsedProducts] = (0, import_react3.useState)({});
3480
- const [collapsedPurposes, setCollapsedPurposes] = (0, import_react3.useState)({});
3481
- const [hasAlreadyConsented, setHasAlreadyConsented] = (0, import_react3.useState)(false);
3482
- const [consentedProducts, setConsentedProducts] = (0, import_react3.useState)({});
3483
- const [consentedPurposes, setConsentedPurposes] = (0, import_react3.useState)({});
3484
- const [isFullyConsentedReviewMode, setIsFullyConsentedReviewMode] = (0, import_react3.useState)(false);
3485
- const [isLanguageDropdownOpen, setIsLanguageDropdownOpen] = (0, import_react3.useState)(false);
3486
- const [selectedLanguage, setSelectedLanguage] = (0, import_react3.useState)(language);
3487
- const [errorMessage, setErrorMessage] = (0, import_react3.useState)(null);
3488
- const [fetchError, setFetchError] = (0, import_react3.useState)(null);
3489
- const [ttsAudioUrls, setTtsAudioUrls] = (0, import_react3.useState)(null);
3490
- const [isTTSAvailable, setIsTTSAvailable] = (0, import_react3.useState)(false);
3491
- const [isPlaying, setIsPlaying] = (0, import_react3.useState)(false);
3492
- const [isPaused, setIsPaused] = (0, import_react3.useState)(false);
3493
- const [currentAudioIndex, setCurrentAudioIndex] = (0, import_react3.useState)(0);
3494
- const [highlightedElementId, setHighlightedElementId] = (0, import_react3.useState)(null);
3495
- const [showAgeVerification, setShowAgeVerification] = (0, import_react3.useState)(false);
3496
- const [isMinorFlow, setIsMinorFlow] = (0, import_react3.useState)(false);
3497
- const [selfDeclaredAdult, setSelfDeclaredAdult] = (0, import_react3.useState)(false);
3498
- const [showGuardianForm, setShowGuardianForm] = (0, import_react3.useState)(false);
3499
- const [isSubmittingGuardian, setIsSubmittingGuardian] = (0, import_react3.useState)(false);
3500
- const [guardianFormData, setGuardianFormData] = (0, import_react3.useState)({
3831
+ const [isLoading, setIsLoading] = (0, import_react5.useState)(true);
3832
+ const [isSubmitting, setIsSubmitting] = (0, import_react5.useState)(false);
3833
+ const [isSubmittingAccept, setIsSubmittingAccept] = (0, import_react5.useState)(false);
3834
+ const [isSubmittingDecline, setIsSubmittingDecline] = (0, import_react5.useState)(false);
3835
+ const [content, setContent] = (0, import_react5.useState)(null);
3836
+ const [categorizedPurposes, setCategorizedPurposes] = (0, import_react5.useState)(null);
3837
+ const [selectedPurposes, setSelectedPurposes] = (0, import_react5.useState)({});
3838
+ const [selectedDataElements, setSelectedDataElements] = (0, import_react5.useState)({});
3839
+ const [initialDataElementSelections, setInitialDataElementSelections] = (0, import_react5.useState)({});
3840
+ const [recordedPurposeSelections, setRecordedPurposeSelections] = (0, import_react5.useState)({});
3841
+ const [recordedAnswers, setRecordedAnswers] = (0, import_react5.useState)({});
3842
+ const [collapsedProducts, setCollapsedProducts] = (0, import_react5.useState)({});
3843
+ const [pendingAction, setPendingAction] = (0, import_react5.useState)(null);
3844
+ const pendingActionRef = (0, import_react5.useRef)(null);
3845
+ pendingActionRef.current = pendingAction;
3846
+ const [confirmAction, setConfirmAction] = (0, import_react5.useState)("accept-selected");
3847
+ const [collapsedPurposes, setCollapsedPurposes] = (0, import_react5.useState)({});
3848
+ const [hasAlreadyConsented, setHasAlreadyConsented] = (0, import_react5.useState)(false);
3849
+ const [consentedProducts, setConsentedProducts] = (0, import_react5.useState)({});
3850
+ const [consentedPurposes, setConsentedPurposes] = (0, import_react5.useState)({});
3851
+ const [isFullyConsentedReviewMode, setIsFullyConsentedReviewMode] = (0, import_react5.useState)(false);
3852
+ const [isLanguageDropdownOpen, setIsLanguageDropdownOpen] = (0, import_react5.useState)(false);
3853
+ const [selectedLanguage, setSelectedLanguage] = (0, import_react5.useState)(language);
3854
+ const [errorMessage, setErrorMessage] = (0, import_react5.useState)(null);
3855
+ const [fetchError, setFetchError] = (0, import_react5.useState)(null);
3856
+ const [ttsAudioUrls, setTtsAudioUrls] = (0, import_react5.useState)(null);
3857
+ const [isTTSAvailable, setIsTTSAvailable] = (0, import_react5.useState)(false);
3858
+ const [isPlaying, setIsPlaying] = (0, import_react5.useState)(false);
3859
+ const [isPaused, setIsPaused] = (0, import_react5.useState)(false);
3860
+ const [currentAudioIndex, setCurrentAudioIndex] = (0, import_react5.useState)(0);
3861
+ const [highlightedElementId, setHighlightedElementId] = (0, import_react5.useState)(null);
3862
+ const [showAgeVerification, setShowAgeVerification] = (0, import_react5.useState)(false);
3863
+ const [isMinorFlow, setIsMinorFlow] = (0, import_react5.useState)(false);
3864
+ const [selfDeclaredAdult, setSelfDeclaredAdult] = (0, import_react5.useState)(false);
3865
+ const [showGuardianForm, setShowGuardianForm] = (0, import_react5.useState)(false);
3866
+ const [isSubmittingGuardian, setIsSubmittingGuardian] = (0, import_react5.useState)(false);
3867
+ const [guardianFormData, setGuardianFormData] = (0, import_react5.useState)({
3501
3868
  guardianName: "",
3502
3869
  guardianContact: "",
3503
3870
  guardianRelationship: ""
3504
3871
  });
3505
- const [guardianFormErrors, setGuardianFormErrors] = (0, import_react3.useState)({});
3506
- const [showVerificationScreen, setShowVerificationScreen] = (0, import_react3.useState)(false);
3507
- const [verificationReference, setVerificationReference] = (0, import_react3.useState)(null);
3508
- const [isInitiatingVerification, setIsInitiatingVerification] = (0, import_react3.useState)(false);
3509
- const [verificationError, setVerificationError] = (0, import_react3.useState)(
3872
+ const [guardianFormErrors, setGuardianFormErrors] = (0, import_react5.useState)({});
3873
+ const [showVerificationScreen, setShowVerificationScreen] = (0, import_react5.useState)(false);
3874
+ const [verificationReference, setVerificationReference] = (0, import_react5.useState)(null);
3875
+ const [isInitiatingVerification, setIsInitiatingVerification] = (0, import_react5.useState)(false);
3876
+ const [verificationError, setVerificationError] = (0, import_react5.useState)(
3510
3877
  null
3511
3878
  );
3512
- const [verificationErrorCode, setVerificationErrorCode] = (0, import_react3.useState)(null);
3513
- const [canRetryVerification, setCanRetryVerification] = (0, import_react3.useState)(false);
3514
- const [isPollingStatus, setIsPollingStatus] = (0, import_react3.useState)(false);
3515
- const [isVerificationComplete, setIsVerificationComplete] = (0, import_react3.useState)(false);
3516
- const [isAutoTransitioning, setIsAutoTransitioning] = (0, import_react3.useState)(false);
3517
- const modalRef = (0, import_react3.useRef)(null);
3518
- const firstFocusableRef = (0, import_react3.useRef)(null);
3519
- const lastFocusableRef = (0, import_react3.useRef)(null);
3520
- const abortControllerRef = (0, import_react3.useRef)(null);
3521
- const isRequestInProgressRef = (0, import_react3.useRef)(false);
3522
- const currentAudioRef = (0, import_react3.useRef)(null);
3523
- const popupCheckIntervalRef = (0, import_react3.useRef)(null);
3524
- const statusPollIntervalRef = (0, import_react3.useRef)(null);
3525
- const verificationPopupRef = (0, import_react3.useRef)(null);
3526
- const pollingCleanupRef = (0, import_react3.useRef)(null);
3527
- const autoTransitionTimerRef = (0, import_react3.useRef)(
3879
+ const [verificationErrorCode, setVerificationErrorCode] = (0, import_react5.useState)(null);
3880
+ const [canRetryVerification, setCanRetryVerification] = (0, import_react5.useState)(false);
3881
+ const [isPollingStatus, setIsPollingStatus] = (0, import_react5.useState)(false);
3882
+ const [isVerificationComplete, setIsVerificationComplete] = (0, import_react5.useState)(false);
3883
+ const [isAutoTransitioning, setIsAutoTransitioning] = (0, import_react5.useState)(false);
3884
+ const modalRef = (0, import_react5.useRef)(null);
3885
+ const firstFocusableRef = (0, import_react5.useRef)(null);
3886
+ const lastFocusableRef = (0, import_react5.useRef)(null);
3887
+ const abortControllerRef = (0, import_react5.useRef)(null);
3888
+ const isRequestInProgressRef = (0, import_react5.useRef)(false);
3889
+ const currentAudioRef = (0, import_react5.useRef)(null);
3890
+ const popupCheckIntervalRef = (0, import_react5.useRef)(null);
3891
+ const statusPollIntervalRef = (0, import_react5.useRef)(null);
3892
+ const verificationPopupRef = (0, import_react5.useRef)(null);
3893
+ const pollingCleanupRef = (0, import_react5.useRef)(null);
3894
+ const autoTransitionTimerRef = (0, import_react5.useRef)(
3528
3895
  null
3529
3896
  );
3530
- const digilockerRedirectTimeoutRef = (0, import_react3.useRef)(null);
3531
- const isInitialMountRef = (0, import_react3.useRef)(true);
3532
- const isPollingStatusRef = (0, import_react3.useRef)(false);
3533
- const verificationSessionTokenRef = (0, import_react3.useRef)(null);
3897
+ const digilockerRedirectTimeoutRef = (0, import_react5.useRef)(null);
3898
+ const isInitialMountRef = (0, import_react5.useRef)(true);
3899
+ const isPollingStatusRef = (0, import_react5.useRef)(false);
3900
+ const verificationSessionTokenRef = (0, import_react5.useRef)(null);
3534
3901
  const isMobile = useMediaQuery("(max-width: 768px)");
3535
- const responsiveStyles = (0, import_react3.useMemo)(
3902
+ const responsiveStyles = (0, import_react5.useMemo)(
3536
3903
  () => ({
3537
3904
  modal: {
3538
3905
  width: isMobile ? "90%" : "700px"
@@ -3615,25 +3982,25 @@ var RedactoNoticeConsent = ({
3615
3982
  hostFont: settings == null ? void 0 : settings.font,
3616
3983
  noticeFont: content == null ? void 0 : content.font_preference
3617
3984
  });
3618
- const componentHeadingStyle = (0, import_react3.useMemo)(
3985
+ const componentHeadingStyle = (0, import_react5.useMemo)(
3619
3986
  () => ({
3620
3987
  color: (settings == null ? void 0 : settings.headingColor) || "#323B4B"
3621
3988
  }),
3622
3989
  [settings == null ? void 0 : settings.headingColor]
3623
3990
  );
3624
- const componentTextStyle = (0, import_react3.useMemo)(
3991
+ const componentTextStyle = (0, import_react5.useMemo)(
3625
3992
  () => ({
3626
3993
  color: (settings == null ? void 0 : settings.textColor) || "#344054"
3627
3994
  }),
3628
3995
  [settings == null ? void 0 : settings.textColor]
3629
3996
  );
3630
- const sectionStyle = (0, import_react3.useMemo)(
3997
+ const sectionStyle = (0, import_react5.useMemo)(
3631
3998
  () => ({
3632
3999
  color: (settings == null ? void 0 : settings.textColor) || "#344054"
3633
4000
  }),
3634
4001
  [settings == null ? void 0 : settings.textColor]
3635
4002
  );
3636
- const logoRowStyle = (0, import_react3.useMemo)(
4003
+ const logoRowStyle = (0, import_react5.useMemo)(
3637
4004
  () => ({
3638
4005
  ...styles.logoRow,
3639
4006
  justifyContent: logoRowJustify(
@@ -3642,7 +4009,7 @@ var RedactoNoticeConsent = ({
3642
4009
  }),
3643
4010
  [content == null ? void 0 : content.logo_position]
3644
4011
  );
3645
- const purposeRows = (0, import_react3.useMemo)(
4012
+ const purposeRows = (0, import_react5.useMemo)(
3646
4013
  () => {
3647
4014
  var _a2;
3648
4015
  return noticePurposeRows(
@@ -3653,7 +4020,7 @@ var RedactoNoticeConsent = ({
3653
4020
  },
3654
4021
  [content]
3655
4022
  );
3656
- const productGroups = (0, import_react3.useMemo)(
4023
+ const productGroups = (0, import_react5.useMemo)(
3657
4024
  () => {
3658
4025
  var _a2;
3659
4026
  return groupPurposesByProduct(
@@ -3664,15 +4031,15 @@ var RedactoNoticeConsent = ({
3664
4031
  },
3665
4032
  [content]
3666
4033
  );
3667
- const productMandatoryIsAuthoritative = (0, import_react3.useMemo)(
4034
+ const productMandatoryIsAuthoritative = (0, import_react5.useMemo)(
3668
4035
  () => serverMarksMandatoryProducts(content == null ? void 0 : content.products),
3669
4036
  [content]
3670
4037
  );
3671
- const gatedProducts = (0, import_react3.useMemo)(
4038
+ const gatedProducts = (0, import_react5.useMemo)(
3672
4039
  () => gatedProductUuids(content == null ? void 0 : content.products),
3673
4040
  [content]
3674
4041
  );
3675
- const productIsRequiredFor = (0, import_react3.useCallback)(
4042
+ const productIsRequiredFor = (0, import_react5.useCallback)(
3676
4043
  (productUuid) => {
3677
4044
  var _a2;
3678
4045
  if (!productMandatoryIsAuthoritative) return void 0;
@@ -3681,59 +4048,98 @@ var RedactoNoticeConsent = ({
3681
4048
  },
3682
4049
  [productMandatoryIsAuthoritative, gatedProducts, content]
3683
4050
  );
3684
- const confirmSatisfiedWith = (0, import_react3.useCallback)(
3685
- (selection) => {
3686
- var _a2;
3687
- if (!content) return false;
3688
- if (purposeRows.length === 0) return true;
3689
- const isSatisfied = ({
3690
- purpose,
3691
- productUuid
3692
- }) => {
3693
- const key = productPurposeKey(productUuid, purpose.uuid);
3694
- const requiredElements = purpose.data_elements.filter(
3695
- isBlockingRequiredElement
3696
- );
3697
- return requiredElements.every(
3698
- (element) => selection[`${key}-${element.uuid}`]
3699
- );
3700
- };
3701
- if (serverMarksMandatoryProducts(content.products)) {
3702
- return rowsUnderGate(purposeRows, content.products).every(isSatisfied);
3703
- }
3704
- const rowsByProduct = /* @__PURE__ */ new Map();
3705
- for (const row of purposeRows) {
3706
- const groupKey = (_a2 = row.productUuid) != null ? _a2 : "";
3707
- const group = rowsByProduct.get(groupKey);
3708
- if (group) {
3709
- group.push(row);
3710
- } else {
3711
- rowsByProduct.set(groupKey, [row]);
3712
- }
4051
+ const confirmVerdict = (0, import_react5.useMemo)(() => {
4052
+ var _a2;
4053
+ if (!content) return { ok: false, reason: "nothing-chosen", blocking: [] };
4054
+ if (purposeRows.length === 0)
4055
+ return { ok: true, reason: "ok", blocking: [] };
4056
+ const rowKey = (row) => productPurposeKey(row.productUuid, row.purpose.uuid);
4057
+ const isSelected = (row) => Boolean(selectedPurposes[rowKey(row)]);
4058
+ const wasRecorded = (row) => Boolean(recordedPurposeSelections[rowKey(row)]);
4059
+ const isMandatory = (row) => hasRequiredDataElement(row.purpose);
4060
+ const satisfies = (rows) => rows.filter(isMandatory).every(isSelected);
4061
+ const rowsByProduct = /* @__PURE__ */ new Map();
4062
+ const unresolved = [];
4063
+ for (const row of purposeRows) {
4064
+ const productUuid = rowProductUuid(row, content.products);
4065
+ if (productUuid === void 0) {
4066
+ unresolved.push(row);
4067
+ continue;
4068
+ }
4069
+ const group = rowsByProduct.get(productUuid);
4070
+ if (group) {
4071
+ group.push(row);
4072
+ } else {
4073
+ rowsByProduct.set(productUuid, [row]);
3713
4074
  }
4075
+ }
4076
+ const touched = (rows) => rows.some(isSelected) && rows.some((row) => isSelected(row) !== wasRecorded(row));
4077
+ if (!productMandatoryIsAuthoritative) {
3714
4078
  const groups = [...rowsByProduct.values()];
4079
+ if (unresolved.length > 0) groups.push(unresolved);
3715
4080
  const everyProductHasMandatory = groups.every(
3716
- (rows) => rows.some(
3717
- ({ purpose }) => purpose.data_elements.some(isBlockingRequiredElement)
3718
- )
4081
+ (rows) => rows.some(isMandatory)
3719
4082
  );
3720
- return everyProductHasMandatory ? groups.some((rows) => rows.every(isSatisfied)) : purposeRows.every(isSatisfied);
3721
- },
3722
- [content, purposeRows]
3723
- );
3724
- const areAllRequiredElementsChecked = (0, import_react3.useMemo)(
3725
- () => confirmSatisfiedWith(selectedDataElements),
3726
- [confirmSatisfiedWith, selectedDataElements]
3727
- );
3728
- const acceptDisabled = isSubmitting || !areAllRequiredElementsChecked;
3729
- (0, import_react3.useEffect)(() => {
4083
+ const baseline = everyProductHasMandatory ? groups.some(satisfies) : satisfies(purposeRows);
4084
+ const blocking2 = [...rowsByProduct.entries()].filter(([, rows]) => touched(rows) && !satisfies(rows)).map(([productUuid]) => productUuid);
4085
+ const ok = baseline && blocking2.length === 0;
4086
+ return {
4087
+ ok,
4088
+ reason: ok ? "ok" : blocking2.length > 0 ? "product-incomplete" : "required-outstanding",
4089
+ blocking: blocking2
4090
+ };
4091
+ }
4092
+ if (unresolved.length > 0 && rowsByProduct.size === 0) {
4093
+ const ok = satisfies(unresolved);
4094
+ return { ok, reason: ok ? "ok" : "required-outstanding", blocking: [] };
4095
+ }
4096
+ const scoped = noticeScopesPurposes((_a2 = content.purposes) != null ? _a2 : []);
4097
+ const engagingRows = (rows, productUuid) => scoped ? rows.filter((row) => purposeNamesProduct(row.purpose, productUuid)) : rows;
4098
+ const engaged = [];
4099
+ rowsByProduct.forEach((rows, productUuid) => {
4100
+ if (gatedProducts.has(productUuid)) {
4101
+ engaged.push(productUuid);
4102
+ return;
4103
+ }
4104
+ if (touched(engagingRows(rows, productUuid))) engaged.push(productUuid);
4105
+ });
4106
+ if (engaged.length === 0) {
4107
+ return {
4108
+ ok: false,
4109
+ reason: purposeRows.some(isSelected) ? "nothing-engaged" : "nothing-chosen",
4110
+ blocking: []
4111
+ };
4112
+ }
4113
+ const blocking = engaged.filter(
4114
+ (productUuid) => {
4115
+ var _a3;
4116
+ return !satisfies((_a3 = rowsByProduct.get(productUuid)) != null ? _a3 : []);
4117
+ }
4118
+ );
4119
+ return {
4120
+ ok: blocking.length === 0,
4121
+ reason: blocking.length === 0 ? "ok" : "product-incomplete",
4122
+ blocking
4123
+ };
4124
+ }, [
4125
+ content,
4126
+ purposeRows,
4127
+ selectedPurposes,
4128
+ recordedPurposeSelections,
4129
+ productMandatoryIsAuthoritative,
4130
+ gatedProducts
4131
+ ]);
4132
+ const acceptDisabled = isSubmitting || !confirmVerdict.ok;
4133
+ (0, import_react5.useEffect)(() => {
3730
4134
  var _a2, _b2;
3731
4135
  clearApiCache();
3732
4136
  isRequestInProgressRef.current = false;
3733
4137
  setContent(null);
3734
4138
  setCategorizedPurposes(null);
4139
+ setPendingAction(null);
3735
4140
  setSelectedPurposes({});
3736
4141
  setSelectedDataElements({});
4142
+ setRecordedAnswers({});
3737
4143
  setInitialDataElementSelections({});
3738
4144
  setCollapsedPurposes({});
3739
4145
  setCollapsedProducts({});
@@ -3791,7 +4197,7 @@ var RedactoNoticeConsent = ({
3791
4197
  }
3792
4198
  isInitialMountRef.current = false;
3793
4199
  }, [accessToken]);
3794
- (0, import_react3.useEffect)(() => {
4200
+ (0, import_react5.useEffect)(() => {
3795
4201
  if (hasAlreadyConsented) {
3796
4202
  onAccept == null ? void 0 : onAccept();
3797
4203
  }
@@ -3942,11 +4348,11 @@ var RedactoNoticeConsent = ({
3942
4348
  const newCategorizedPurposes = isReconsentRequired ? {
3943
4349
  alreadyConsented: activeConfig.purposes.filter((purpose) => {
3944
4350
  const selection = purposeSelections == null ? void 0 : purposeSelections[purpose.uuid];
3945
- return selection && (selection.status === "ACTIVE" || selection.status === "EXPIRED") && !selection.needs_reconsent;
4351
+ return selection && (selection.status === PURPOSE_STATUS_ACTIVE || selection.status === PURPOSE_STATUS_EXPIRED) && !selection.needs_reconsent;
3946
4352
  }),
3947
4353
  needsConsent: activeConfig.purposes.filter((purpose) => {
3948
4354
  const selection = purposeSelections == null ? void 0 : purposeSelections[purpose.uuid];
3949
- return !selection || selection.status !== "ACTIVE" || selection.needs_reconsent;
4355
+ return !selection || selection.status !== PURPOSE_STATUS_ACTIVE || selection.needs_reconsent;
3950
4356
  })
3951
4357
  } : null;
3952
4358
  setCategorizedPurposes(newCategorizedPurposes);
@@ -4009,6 +4415,22 @@ var RedactoNoticeConsent = ({
4009
4415
  var _a3;
4010
4416
  return ((_a3 = recordedFor(purpose.uuid, productUuid)) == null ? void 0 : _a3.selected) === true;
4011
4417
  };
4418
+ setRecordedPurposeSelections(
4419
+ seedRows.reduce((acc, row) => {
4420
+ const recorded = recordedFor(row.purpose.uuid, row.productUuid);
4421
+ acc[productPurposeKey(row.productUuid, row.purpose.uuid)] = (recorded == null ? void 0 : recorded.selected) === true && (!recorded.status || recorded.status === PURPOSE_STATUS_ACTIVE) && recorded.needs_reconsent !== true;
4422
+ return acc;
4423
+ }, {})
4424
+ );
4425
+ setRecordedAnswers(
4426
+ seedRows.reduce((acc, row) => {
4427
+ const recorded = recordedFor(row.purpose.uuid, row.productUuid);
4428
+ if (hasRecordedPurposeState(recorded)) {
4429
+ acc[productPurposeKey(row.productUuid, row.purpose.uuid)] = recorded.selected === true;
4430
+ }
4431
+ return acc;
4432
+ }, {})
4433
+ );
4012
4434
  const recordedElementSelections = () => {
4013
4435
  const selections = {};
4014
4436
  seedRows.filter(rowIsRecorded).forEach(({ purpose, productUuid }) => {
@@ -4030,14 +4452,7 @@ var RedactoNoticeConsent = ({
4030
4452
  var _a3;
4031
4453
  return ((_a3 = recordedFor(purpose.uuid, productUuid)) == null ? void 0 : _a3.needs_reconsent) === true;
4032
4454
  };
4033
- const gated = gatedProductUuids(activeConfig.products);
4034
- const marksMandatory = serverMarksMandatoryProducts(
4035
- activeConfig.products
4036
- );
4037
- const rowIsMandatory = (row) => {
4038
- const resolved = rowProductUuid(row, activeConfig.products);
4039
- return (!marksMandatory || !!resolved && gated.has(resolved)) && hasRequiredDataElement(row.purpose);
4040
- };
4455
+ const rowIsMandatory = (row) => hasRequiredDataElement(row.purpose);
4041
4456
  const rowsByProduct = /* @__PURE__ */ new Map();
4042
4457
  seedRows.forEach((row) => {
4043
4458
  var _a3;
@@ -4109,7 +4524,7 @@ var RedactoNoticeConsent = ({
4109
4524
  isRequestInProgressRef.current = false;
4110
4525
  }
4111
4526
  };
4112
- (0, import_react3.useEffect)(() => {
4527
+ (0, import_react5.useEffect)(() => {
4113
4528
  injectCheckboxStyles();
4114
4529
  fetchNotice();
4115
4530
  }, [
@@ -4152,7 +4567,7 @@ var RedactoNoticeConsent = ({
4152
4567
  setSelectedDataElements((prev) => {
4153
4568
  const updated = { ...prev };
4154
4569
  purpose.data_elements.forEach((el) => {
4155
- updated[`${key}-${el.uuid}`] = newPurposeState;
4570
+ updated[`${key}-${el.uuid}`] = el.enabled ? newPurposeState : false;
4156
4571
  });
4157
4572
  return updated;
4158
4573
  });
@@ -4165,8 +4580,8 @@ var RedactoNoticeConsent = ({
4165
4580
  [productUuid]: !prev[productUuid]
4166
4581
  }));
4167
4582
  };
4168
- const toggleSection = (sectionPurposes, keyProductUuid) => {
4169
- const nextState = !sectionPurposes.every(
4583
+ const toggleSection = (sectionPurposes, keyProductUuid, target) => {
4584
+ const nextState = target != null ? target : !sectionPurposes.every(
4170
4585
  (purpose) => selectedPurposes[productPurposeKey(keyProductUuid, purpose.uuid)]
4171
4586
  );
4172
4587
  setSelectedPurposes((prev) => {
@@ -4180,22 +4595,16 @@ var RedactoNoticeConsent = ({
4180
4595
  sectionPurposes.forEach((purpose) => {
4181
4596
  const key = productPurposeKey(keyProductUuid, purpose.uuid);
4182
4597
  purpose.data_elements.forEach((element) => {
4183
- elementOverrides[`${key}-${element.uuid}`] = nextState;
4598
+ elementOverrides[`${key}-${element.uuid}`] = element.enabled ? nextState : false;
4184
4599
  });
4185
4600
  });
4186
4601
  setSelectedDataElements((prev) => ({ ...prev, ...elementOverrides }));
4187
4602
  };
4188
- const productBoxPurposes = (0, import_react3.useCallback)(
4189
- (product, purposes) => {
4190
- if (productIsRequiredFor(product) === false) {
4191
- return purposes;
4192
- }
4193
- const required = purposes.filter(hasRequiredDataElement);
4194
- return required.length > 0 ? required : purposes;
4195
- },
4196
- [productIsRequiredFor]
4197
- );
4198
- const handleProductCheckboxChange = (productUuid) => {
4603
+ const productBoxPurposes = (0, import_react5.useCallback)((purposes) => {
4604
+ const required = purposes.filter(hasRequiredDataElement);
4605
+ return required.length > 0 ? required : purposes;
4606
+ }, []);
4607
+ const handleProductCheckboxChange = (productUuid, next) => {
4199
4608
  if (!content) {
4200
4609
  return;
4201
4610
  }
@@ -4205,13 +4614,13 @@ var RedactoNoticeConsent = ({
4205
4614
  if (!group) {
4206
4615
  return;
4207
4616
  }
4208
- const editable = productBoxPurposes(productUuid, group.purposes).filter(
4617
+ const editable = productBoxPurposes(group.purposes).filter(
4209
4618
  (purpose) => !consentedPurposes[productPurposeKey(productUuid, purpose.uuid)]
4210
4619
  );
4211
4620
  if (editable.length === 0) {
4212
4621
  return;
4213
4622
  }
4214
- toggleSection(editable, productUuid);
4623
+ toggleSection(editable, productUuid, next);
4215
4624
  };
4216
4625
  const soleProductSection = (rows) => {
4217
4626
  var _a2, _b2;
@@ -4221,12 +4630,12 @@ var RedactoNoticeConsent = ({
4221
4630
  }
4222
4631
  const product = products[0];
4223
4632
  const purposes = (_a2 = content == null ? void 0 : content.purposes) != null ? _a2 : [];
4224
- const boxPurposes = productBoxPurposes(product.uuid, purposes);
4633
+ const boxPurposes = productBoxPurposes(purposes);
4225
4634
  const selectedCount = boxPurposes.filter(
4226
4635
  (purpose) => selectedPurposes[productPurposeKey(void 0, purpose.uuid)]
4227
4636
  ).length;
4228
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
4229
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4637
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
4638
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4230
4639
  ProductSectionHeader,
4231
4640
  {
4232
4641
  product,
@@ -4241,11 +4650,11 @@ var RedactoNoticeConsent = ({
4241
4650
  styles,
4242
4651
  responsiveStyles,
4243
4652
  onToggleCollapse: () => toggleProductCollapse(product.uuid),
4244
- onToggleSelect: () => toggleSection(boxPurposes, void 0),
4653
+ onToggleSelect: (_productUuid, next) => toggleSection(boxPurposes, void 0, next),
4245
4654
  getTranslatedText
4246
4655
  }
4247
4656
  ),
4248
- !collapsedProducts[product.uuid] && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles.sectionBody, children: rows })
4657
+ !collapsedProducts[product.uuid] && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles.sectionBody, children: rows })
4249
4658
  ] });
4250
4659
  };
4251
4660
  const handleDataElementCheckboxChange = (elementUuid, purposeUuid, productUuid) => {
@@ -4260,7 +4669,7 @@ var RedactoNoticeConsent = ({
4260
4669
  const purpose = content.purposes.find((p) => p.uuid === purposeUuid);
4261
4670
  if (purpose) {
4262
4671
  const requiredElements = purpose.data_elements.filter(
4263
- (el) => el.required
4672
+ isBlockingRequiredElement
4264
4673
  );
4265
4674
  let shouldCheckPurpose;
4266
4675
  if (requiredElements.length > 0) {
@@ -4312,10 +4721,11 @@ var RedactoNoticeConsent = ({
4312
4721
  // for the other. Collapses to content.purposes on a single-product
4313
4722
  // notice, so that payload is byte-identical to before.
4314
4723
  purposes: purposeRows.map(({ purpose, productUuid }) => {
4724
+ var _a2, _b2;
4315
4725
  const stateKey = productPurposeKey(productUuid, purpose.uuid);
4316
- const isAlreadyConsented = (categorizedPurposes == null ? void 0 : categorizedPurposes.alreadyConsented.some(
4726
+ const isAlreadyConsented = ((_a2 = categorizedPurposes == null ? void 0 : categorizedPurposes.alreadyConsented.some(
4317
4727
  (p) => p.uuid === purpose.uuid
4318
- )) || false;
4728
+ )) != null ? _a2 : false) && ((_b2 = recordedPurposeSelections[stateKey]) != null ? _b2 : false);
4319
4729
  let purposeSelected = selection.selectedPurposes[stateKey] || false;
4320
4730
  if (mode === "selected" && isAlreadyConsented) {
4321
4731
  const wasModified = purpose.data_elements.some((element) => {
@@ -4334,7 +4744,7 @@ var RedactoNoticeConsent = ({
4334
4744
  selected: purposeSelected,
4335
4745
  data_elements: purpose.data_elements.map((element) => ({
4336
4746
  ...element,
4337
- selected: element.required ? true : selection.selectedDataElements[`${stateKey}-${element.uuid}`] || false
4747
+ selected: isBlockingRequiredElement(element) ? true : selection.selectedDataElements[`${stateKey}-${element.uuid}`] || false
4338
4748
  }))
4339
4749
  };
4340
4750
  }),
@@ -4361,7 +4771,7 @@ var RedactoNoticeConsent = ({
4361
4771
  setIsSubmitting(false);
4362
4772
  }
4363
4773
  };
4364
- const handleDecline = (0, import_react3.useCallback)(async () => {
4774
+ const handleDecline = (0, import_react5.useCallback)(async () => {
4365
4775
  try {
4366
4776
  setIsSubmittingDecline(true);
4367
4777
  setIsSubmitting(true);
@@ -4371,7 +4781,22 @@ var RedactoNoticeConsent = ({
4371
4781
  setIsSubmitting(false);
4372
4782
  }
4373
4783
  }, [onDecline]);
4374
- const handleGuardianFormChange = (0, import_react3.useCallback)(
4784
+ const confirmFirst = (kind, action) => () => {
4785
+ if (!(settings == null ? void 0 : settings.confirmBeforeSubmit)) {
4786
+ action();
4787
+ return;
4788
+ }
4789
+ setConfirmAction(kind);
4790
+ setPendingAction(() => action);
4791
+ };
4792
+ const dismissConfirm = (0, import_react5.useCallback)(() => setPendingAction(null), []);
4793
+ const runPendingAction = (0, import_react5.useCallback)(() => {
4794
+ const action = pendingActionRef.current;
4795
+ if (!action) return;
4796
+ setPendingAction(null);
4797
+ action();
4798
+ }, []);
4799
+ const handleGuardianFormChange = (0, import_react5.useCallback)(
4375
4800
  (field, value) => {
4376
4801
  setGuardianFormData((prev) => ({
4377
4802
  ...prev,
@@ -4400,7 +4825,7 @@ var RedactoNoticeConsent = ({
4400
4825
  setGuardianFormErrors(errors);
4401
4826
  return Object.keys(errors).length === 0;
4402
4827
  };
4403
- const handleGuardianFormNext = (0, import_react3.useCallback)(async () => {
4828
+ const handleGuardianFormNext = (0, import_react5.useCallback)(async () => {
4404
4829
  if (!validateGuardianForm()) {
4405
4830
  return;
4406
4831
  }
@@ -4541,20 +4966,20 @@ var RedactoNoticeConsent = ({
4541
4966
  noticeId,
4542
4967
  onError
4543
4968
  ]);
4544
- const handleAgeVerificationYes = (0, import_react3.useCallback)(() => {
4969
+ const handleAgeVerificationYes = (0, import_react5.useCallback)(() => {
4545
4970
  setShowAgeVerification(false);
4546
4971
  setIsMinorFlow(false);
4547
4972
  setSelfDeclaredAdult(true);
4548
4973
  }, []);
4549
- const handleAgeVerificationNo = (0, import_react3.useCallback)(() => {
4974
+ const handleAgeVerificationNo = (0, import_react5.useCallback)(() => {
4550
4975
  setShowAgeVerification(false);
4551
4976
  setShowGuardianForm(true);
4552
4977
  }, []);
4553
- const handleVerificationContinue = (0, import_react3.useCallback)(() => {
4978
+ const handleVerificationContinue = (0, import_react5.useCallback)(() => {
4554
4979
  setShowVerificationScreen(false);
4555
4980
  setIsVerificationComplete(false);
4556
4981
  }, []);
4557
- const handlePopupClosed = (0, import_react3.useCallback)(async () => {
4982
+ const handlePopupClosed = (0, import_react5.useCallback)(async () => {
4558
4983
  var _a2, _b2;
4559
4984
  if (popupCheckIntervalRef.current) {
4560
4985
  clearInterval(popupCheckIntervalRef.current);
@@ -4596,7 +5021,7 @@ var RedactoNoticeConsent = ({
4596
5021
  isPollingStatusRef.current = false;
4597
5022
  setIsInitiatingVerification(false);
4598
5023
  }, [accessToken, sandboxParams, baseUrl]);
4599
- const startPopupMonitoring = (0, import_react3.useCallback)(
5024
+ const startPopupMonitoring = (0, import_react5.useCallback)(
4600
5025
  (popup) => {
4601
5026
  popupCheckIntervalRef.current = window.setInterval(() => {
4602
5027
  if (popup.closed) {
@@ -4606,7 +5031,7 @@ var RedactoNoticeConsent = ({
4606
5031
  },
4607
5032
  [handlePopupClosed]
4608
5033
  );
4609
- const getVerificationErrorMessage = (0, import_react3.useCallback)(
5034
+ const getVerificationErrorMessage = (0, import_react5.useCallback)(
4610
5035
  (errorCode, fallbackError) => {
4611
5036
  switch (errorCode) {
4612
5037
  case "GUARDIAN_UNDER_18":
@@ -4625,7 +5050,7 @@ var RedactoNoticeConsent = ({
4625
5050
  },
4626
5051
  []
4627
5052
  );
4628
- const startStatusPolling = (0, import_react3.useCallback)(
5053
+ const startStatusPolling = (0, import_react5.useCallback)(
4629
5054
  (token2) => {
4630
5055
  verificationSessionTokenRef.current = token2;
4631
5056
  setIsPollingStatus(true);
@@ -4757,7 +5182,7 @@ var RedactoNoticeConsent = ({
4757
5182
  },
4758
5183
  [accessToken, sandboxParams, baseUrl, getVerificationErrorMessage]
4759
5184
  );
4760
- const handleBackToGuardianForm = (0, import_react3.useCallback)((clearName = false) => {
5185
+ const handleBackToGuardianForm = (0, import_react5.useCallback)((clearName = false) => {
4761
5186
  var _a2, _b2;
4762
5187
  (_a2 = verificationPopupRef.current) == null ? void 0 : _a2.close();
4763
5188
  verificationPopupRef.current = null;
@@ -4793,7 +5218,7 @@ var RedactoNoticeConsent = ({
4793
5218
  }
4794
5219
  clearConsentState();
4795
5220
  }, []);
4796
- const availableLanguages = (0, import_react3.useMemo)(() => {
5221
+ const availableLanguages = (0, import_react5.useMemo)(() => {
4797
5222
  if (!content) return [language];
4798
5223
  const pinned = ["English"];
4799
5224
  if (content.default_language && content.default_language !== "English" && content.default_language !== "en") {
@@ -4802,7 +5227,7 @@ var RedactoNoticeConsent = ({
4802
5227
  const rest = content.supported_languages_and_translations ? Object.keys(content.supported_languages_and_translations).filter((lang) => !pinned.includes(lang)).sort((a, b) => a.localeCompare(b, "en")) : [];
4803
5228
  return [...pinned, ...rest];
4804
5229
  }, [content, language]);
4805
- const getLanguageCode = (0, import_react3.useCallback)(
5230
+ const getLanguageCode = (0, import_react5.useCallback)(
4806
5231
  (displayLanguage) => {
4807
5232
  if (!content) return "English";
4808
5233
  if (displayLanguage === "English" || displayLanguage === "en") {
@@ -4815,7 +5240,7 @@ var RedactoNoticeConsent = ({
4815
5240
  },
4816
5241
  [content]
4817
5242
  );
4818
- const audioSequence = (0, import_react3.useMemo)(() => {
5243
+ const audioSequence = (0, import_react5.useMemo)(() => {
4819
5244
  if (!ttsAudioUrls || !content) return [];
4820
5245
  const sequence = [];
4821
5246
  if (ttsAudioUrls.notice_banner_heading_audio_url) {
@@ -4883,7 +5308,7 @@ var RedactoNoticeConsent = ({
4883
5308
  }
4884
5309
  return sequence;
4885
5310
  }, [ttsAudioUrls, content, categorizedPurposes]);
4886
- const elementIdSequence = (0, import_react3.useMemo)(() => {
5311
+ const elementIdSequence = (0, import_react5.useMemo)(() => {
4887
5312
  if (!ttsAudioUrls || !content) return [];
4888
5313
  const elementIds = [];
4889
5314
  if (ttsAudioUrls.notice_banner_heading_audio_url) {
@@ -4947,7 +5372,7 @@ var RedactoNoticeConsent = ({
4947
5372
  }
4948
5373
  return elementIds;
4949
5374
  }, [ttsAudioUrls, content, categorizedPurposes]);
4950
- const stopAudio = (0, import_react3.useCallback)(() => {
5375
+ const stopAudio = (0, import_react5.useCallback)(() => {
4951
5376
  if (currentAudioRef.current) {
4952
5377
  currentAudioRef.current.pause();
4953
5378
  currentAudioRef.current.currentTime = 0;
@@ -4958,7 +5383,7 @@ var RedactoNoticeConsent = ({
4958
5383
  setCurrentAudioIndex(0);
4959
5384
  setHighlightedElementId(null);
4960
5385
  }, []);
4961
- const playNextAudio = (0, import_react3.useCallback)(
5386
+ const playNextAudio = (0, import_react5.useCallback)(
4962
5387
  (index) => {
4963
5388
  if (index >= audioSequence.length) {
4964
5389
  stopAudio();
@@ -4991,7 +5416,7 @@ var RedactoNoticeConsent = ({
4991
5416
  },
4992
5417
  [audioSequence, elementIdSequence, stopAudio]
4993
5418
  );
4994
- const playAudio = (0, import_react3.useCallback)(() => {
5419
+ const playAudio = (0, import_react5.useCallback)(() => {
4995
5420
  if (audioSequence.length === 0) return;
4996
5421
  if (isPaused && currentAudioRef.current) {
4997
5422
  currentAudioRef.current.play().then(() => {
@@ -5005,21 +5430,21 @@ var RedactoNoticeConsent = ({
5005
5430
  playNextAudio(startIndex);
5006
5431
  }
5007
5432
  }, [audioSequence, isPaused, isPlaying, currentAudioIndex, playNextAudio]);
5008
- const pauseAudio = (0, import_react3.useCallback)(() => {
5433
+ const pauseAudio = (0, import_react5.useCallback)(() => {
5009
5434
  if (currentAudioRef.current && isPlaying) {
5010
5435
  currentAudioRef.current.pause();
5011
5436
  setIsPlaying(false);
5012
5437
  setIsPaused(true);
5013
5438
  }
5014
5439
  }, [isPlaying]);
5015
- const toggleAudio = (0, import_react3.useCallback)(() => {
5440
+ const toggleAudio = (0, import_react5.useCallback)(() => {
5016
5441
  if (isPlaying) {
5017
5442
  pauseAudio();
5018
5443
  } else {
5019
5444
  playAudio();
5020
5445
  }
5021
5446
  }, [isPlaying, playAudio, pauseAudio]);
5022
- (0, import_react3.useEffect)(() => {
5447
+ (0, import_react5.useEffect)(() => {
5023
5448
  var _a2;
5024
5449
  if (!isPlaying || !content || audioSequence.length === 0) return;
5025
5450
  const currentIndex = currentAudioIndex;
@@ -5060,7 +5485,7 @@ var RedactoNoticeConsent = ({
5060
5485
  categorizedPurposes,
5061
5486
  collapsedPurposes
5062
5487
  ]);
5063
- (0, import_react3.useEffect)(() => {
5488
+ (0, import_react5.useEffect)(() => {
5064
5489
  const removeAllHighlights = () => {
5065
5490
  document.querySelectorAll(".redacto-tts-highlight").forEach((el) => {
5066
5491
  el.classList.remove("redacto-tts-highlight");
@@ -5096,7 +5521,7 @@ var RedactoNoticeConsent = ({
5096
5521
  removeAllHighlights();
5097
5522
  };
5098
5523
  }, [highlightedElementId, isPlaying]);
5099
- (0, import_react3.useEffect)(() => {
5524
+ (0, import_react5.useEffect)(() => {
5100
5525
  setIsTTSAvailable(false);
5101
5526
  setTtsAudioUrls(null);
5102
5527
  stopAudio();
@@ -5139,26 +5564,42 @@ var RedactoNoticeConsent = ({
5139
5564
  backgroundColor: (settings == null ? void 0 : settings.backgroundColor) || "#ffffff",
5140
5565
  fontFamily
5141
5566
  };
5142
- const buttonStyle = {
5567
+ const buttonStyle2 = {
5143
5568
  borderRadius: (settings == null ? void 0 : settings.borderRadius) || "8px"
5144
5569
  };
5145
5570
  const acceptAllButtonStyle = {
5146
- ...buttonStyle,
5571
+ ...buttonStyle2,
5147
5572
  backgroundColor: ((_b = (_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.acceptAll) == null ? void 0 : _b.backgroundColor) || ((_d = (_c = settings == null ? void 0 : settings.button) == null ? void 0 : _c.accept) == null ? void 0 : _d.backgroundColor) || (content == null ? void 0 : content.primary_color) || "#4f87ff",
5148
5573
  color: ((_f = (_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.acceptAll) == null ? void 0 : _f.textColor) || ((_h = (_g = settings == null ? void 0 : settings.button) == null ? void 0 : _g.accept) == null ? void 0 : _h.textColor) || "#ffffff"
5149
5574
  };
5150
5575
  const acceptSelectedButtonStyle = {
5151
- ...buttonStyle,
5576
+ ...buttonStyle2,
5152
5577
  backgroundColor: "#ffffff",
5153
5578
  color: ((_j = (_i = settings == null ? void 0 : settings.button) == null ? void 0 : _i.accept) == null ? void 0 : _j.backgroundColor) || (content == null ? void 0 : content.primary_color) || "#4f87ff",
5154
5579
  borderColor: ((_l = (_k = settings == null ? void 0 : settings.button) == null ? void 0 : _k.accept) == null ? void 0 : _l.backgroundColor) || (content == null ? void 0 : content.primary_color) || "#4f87ff"
5155
5580
  };
5156
5581
  const declineButtonStyle = {
5157
- ...buttonStyle,
5582
+ ...buttonStyle2,
5158
5583
  backgroundColor: ((_n = (_m = settings == null ? void 0 : settings.button) == null ? void 0 : _m.decline) == null ? void 0 : _n.backgroundColor) || "#ffffff",
5159
5584
  color: ((_p = (_o = settings == null ? void 0 : settings.button) == null ? void 0 : _o.decline) == null ? void 0 : _p.textColor) || "#000000",
5160
5585
  borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
5161
5586
  };
5587
+ const confirmHint = (0, import_react5.useMemo)(() => {
5588
+ var _a2;
5589
+ const { ok, reason, blocking } = confirmVerdict;
5590
+ if (ok || reason === "ok" || isSubmitting) return null;
5591
+ if (reason !== "product-incomplete") {
5592
+ return CONFIRM_HINT_COPY[reason];
5593
+ }
5594
+ const byUuid = new Map(
5595
+ ((_a2 = content == null ? void 0 : content.products) != null ? _a2 : []).map((product) => [product.uuid, product])
5596
+ );
5597
+ const names = blocking.map((uuid) => {
5598
+ const product = byUuid.get(uuid);
5599
+ return product ? getTranslatedText("products.name", product.name, product.uuid) : uuid;
5600
+ });
5601
+ return CONFIRM_HINT_COPY.productsIncomplete(names);
5602
+ }, [confirmVerdict, isSubmitting, content, getTranslatedText]);
5162
5603
  const actionLabels = {
5163
5604
  acceptAll: getTranslatedText(
5164
5605
  "accept_all_button_text",
@@ -5193,9 +5634,10 @@ var RedactoNoticeConsent = ({
5193
5634
  const handleCloseError = () => {
5194
5635
  setErrorMessage(null);
5195
5636
  };
5196
- (0, import_react3.useEffect)(() => {
5637
+ (0, import_react5.useEffect)(() => {
5197
5638
  const handleKeyDown = (event) => {
5198
5639
  if (!modalRef.current) return;
5640
+ if (pendingActionRef.current) return;
5199
5641
  const focusableElements = modalRef.current.querySelectorAll(
5200
5642
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
5201
5643
  );
@@ -5232,13 +5674,13 @@ var RedactoNoticeConsent = ({
5232
5674
  modal == null ? void 0 : modal.removeEventListener("keydown", handleKeyDown);
5233
5675
  };
5234
5676
  }, [isLoading, handleDecline]);
5235
- (0, import_react3.useEffect)(() => {
5677
+ (0, import_react5.useEffect)(() => {
5236
5678
  stopAudio();
5237
5679
  }, [selectedLanguage, stopAudio]);
5238
- (0, import_react3.useEffect)(() => {
5680
+ (0, import_react5.useEffect)(() => {
5239
5681
  stopAudio();
5240
5682
  }, [content, stopAudio]);
5241
- (0, import_react3.useEffect)(() => {
5683
+ (0, import_react5.useEffect)(() => {
5242
5684
  return () => {
5243
5685
  var _a2, _b2;
5244
5686
  if (abortControllerRef.current) {
@@ -5264,7 +5706,7 @@ var RedactoNoticeConsent = ({
5264
5706
  }
5265
5707
  };
5266
5708
  }, [stopAudio]);
5267
- (0, import_react3.useEffect)(() => {
5709
+ (0, import_react5.useEffect)(() => {
5268
5710
  const persistedState = getConsentState();
5269
5711
  if (!persistedState) return;
5270
5712
  if (persistedState.noticeId && persistedState.noticeId !== noticeId) {
@@ -5301,8 +5743,8 @@ var RedactoNoticeConsent = ({
5301
5743
  clearConsentState();
5302
5744
  }
5303
5745
  }, [startStatusPolling, noticeId]);
5304
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: hasAlreadyConsented ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
5305
- blockUI && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5746
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: hasAlreadyConsented ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5747
+ blockUI && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5306
5748
  "div",
5307
5749
  {
5308
5750
  style: styles.overlay,
@@ -5310,7 +5752,7 @@ var RedactoNoticeConsent = ({
5310
5752
  role: "presentation"
5311
5753
  }
5312
5754
  ),
5313
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5755
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5314
5756
  "div",
5315
5757
  {
5316
5758
  ref: modalRef,
@@ -5325,7 +5767,7 @@ var RedactoNoticeConsent = ({
5325
5767
  "aria-labelledby": "privacy-notice-title",
5326
5768
  "aria-describedby": "privacy-notice-description",
5327
5769
  tabIndex: -1,
5328
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
5770
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5329
5771
  "div",
5330
5772
  {
5331
5773
  role: "status",
@@ -5333,11 +5775,11 @@ var RedactoNoticeConsent = ({
5333
5775
  "aria-label": "Loading consent notice",
5334
5776
  style: styles.loadingContainer,
5335
5777
  children: [
5336
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles.loadingSpinner, "aria-hidden": "true" }),
5337
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: { ...styles.privacyText, ...componentTextStyle }, children: "Loading..." })
5778
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles.loadingSpinner, "aria-hidden": "true" }),
5779
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: { ...styles.privacyText, ...componentTextStyle }, children: "Loading..." })
5338
5780
  ]
5339
5781
  }
5340
- ) : fetchError ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5782
+ ) : fetchError ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5341
5783
  "div",
5342
5784
  {
5343
5785
  role: "alert",
@@ -5353,7 +5795,7 @@ var RedactoNoticeConsent = ({
5353
5795
  textAlign: "center",
5354
5796
  padding: "40px 20px"
5355
5797
  },
5356
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
5798
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5357
5799
  "div",
5358
5800
  {
5359
5801
  style: {
@@ -5366,7 +5808,7 @@ var RedactoNoticeConsent = ({
5366
5808
  position: "relative"
5367
5809
  },
5368
5810
  children: [
5369
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5811
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5370
5812
  "button",
5371
5813
  {
5372
5814
  onClick: handleDecline,
@@ -5384,7 +5826,7 @@ var RedactoNoticeConsent = ({
5384
5826
  justifyContent: "center"
5385
5827
  },
5386
5828
  "aria-label": "Close error message",
5387
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5829
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5388
5830
  "svg",
5389
5831
  {
5390
5832
  width: isMobile ? "14" : "16",
@@ -5393,7 +5835,7 @@ var RedactoNoticeConsent = ({
5393
5835
  fill: "none",
5394
5836
  xmlns: "http://www.w3.org/2000/svg",
5395
5837
  "aria-hidden": "true",
5396
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5838
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5397
5839
  "path",
5398
5840
  {
5399
5841
  d: "M12 4L4 12M4 4L12 12",
@@ -5407,7 +5849,7 @@ var RedactoNoticeConsent = ({
5407
5849
  )
5408
5850
  }
5409
5851
  ),
5410
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5852
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5411
5853
  "h3",
5412
5854
  {
5413
5855
  style: {
@@ -5418,7 +5860,7 @@ var RedactoNoticeConsent = ({
5418
5860
  children: "Error Loading Consent Notice"
5419
5861
  }
5420
5862
  ),
5421
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5863
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5422
5864
  "p",
5423
5865
  {
5424
5866
  style: {
@@ -5429,7 +5871,7 @@ var RedactoNoticeConsent = ({
5429
5871
  children: fetchError.message || "Failed to load consent notice. Please try again."
5430
5872
  }
5431
5873
  ),
5432
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5874
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5433
5875
  "button",
5434
5876
  {
5435
5877
  onClick: fetchNotice,
@@ -5454,7 +5896,7 @@ var RedactoNoticeConsent = ({
5454
5896
  }
5455
5897
  )
5456
5898
  }
5457
- ) : showAgeVerification ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5899
+ ) : showAgeVerification ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5458
5900
  AgeVerification,
5459
5901
  {
5460
5902
  onYes: handleAgeVerificationYes,
@@ -5469,7 +5911,7 @@ var RedactoNoticeConsent = ({
5469
5911
  logoUrl: (content == null ? void 0 : content.logo_url) || redacto_logo_default,
5470
5912
  isMobile
5471
5913
  }
5472
- ) }) : showGuardianForm ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5914
+ ) }) : showGuardianForm ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5473
5915
  GuardianForm,
5474
5916
  {
5475
5917
  formData: guardianFormData,
@@ -5487,7 +5929,7 @@ var RedactoNoticeConsent = ({
5487
5929
  declineButtonStyle,
5488
5930
  logoUrl: (content == null ? void 0 : content.logo_url) || redacto_logo_default
5489
5931
  }
5490
- ) }) : showVerificationScreen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5932
+ ) }) : showVerificationScreen ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5491
5933
  VerificationScreen,
5492
5934
  {
5493
5935
  onBack: handleBackToGuardianForm,
@@ -5508,8 +5950,8 @@ var RedactoNoticeConsent = ({
5508
5950
  declineButtonStyle,
5509
5951
  logoUrl: (content == null ? void 0 : content.logo_url) || redacto_logo_default
5510
5952
  }
5511
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: [
5512
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
5953
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: [
5954
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5513
5955
  "div",
5514
5956
  {
5515
5957
  role: "alert",
@@ -5527,8 +5969,8 @@ var RedactoNoticeConsent = ({
5527
5969
  justifyContent: "space-between"
5528
5970
  },
5529
5971
  children: [
5530
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: errorMessage }),
5531
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5972
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: errorMessage }),
5973
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5532
5974
  "button",
5533
5975
  {
5534
5976
  type: "button",
@@ -5545,7 +5987,7 @@ var RedactoNoticeConsent = ({
5545
5987
  justifyContent: "center"
5546
5988
  },
5547
5989
  "aria-label": "Close error message",
5548
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5990
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5549
5991
  "svg",
5550
5992
  {
5551
5993
  width: "16",
@@ -5554,7 +5996,7 @@ var RedactoNoticeConsent = ({
5554
5996
  fill: "none",
5555
5997
  xmlns: "http://www.w3.org/2000/svg",
5556
5998
  "aria-hidden": "true",
5557
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5999
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5558
6000
  "path",
5559
6001
  {
5560
6002
  d: "M12 4L4 12M4 4L12 12",
@@ -5571,7 +6013,7 @@ var RedactoNoticeConsent = ({
5571
6013
  ]
5572
6014
  }
5573
6015
  ),
5574
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6016
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5575
6017
  "div",
5576
6018
  {
5577
6019
  style: {
@@ -5581,7 +6023,7 @@ var RedactoNoticeConsent = ({
5581
6023
  },
5582
6024
  children: (() => {
5583
6025
  var _a2, _b2, _c2, _d2, _e2, _f2;
5584
- const logoNode = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6026
+ const logoNode = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5585
6027
  "img",
5586
6028
  {
5587
6029
  style: { ...styles.logo, ...responsiveStyles.logo },
@@ -5589,7 +6031,7 @@ var RedactoNoticeConsent = ({
5589
6031
  alt: "Redacto Logo"
5590
6032
  }
5591
6033
  );
5592
- const titleNode = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6034
+ const titleNode = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5593
6035
  "h2",
5594
6036
  {
5595
6037
  id: "privacy-notice-title",
@@ -5605,8 +6047,8 @@ var RedactoNoticeConsent = ({
5605
6047
  },
5606
6048
  `privacy-notice-title-${selectedLanguage}`
5607
6049
  );
5608
- const controlsBlock = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles.languageSelectorContainer, children: [
5609
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
6050
+ const controlsBlock = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles.languageSelectorContainer, children: [
6051
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5610
6052
  "div",
5611
6053
  {
5612
6054
  style: {
@@ -5615,7 +6057,7 @@ var RedactoNoticeConsent = ({
5615
6057
  gap: "8px"
5616
6058
  },
5617
6059
  children: [
5618
- isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6060
+ isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5619
6061
  "button",
5620
6062
  {
5621
6063
  onClick: toggleAudio,
@@ -5632,7 +6074,7 @@ var RedactoNoticeConsent = ({
5632
6074
  title: isPlaying && !isPaused ? "Pause Talkback" : isPaused ? "Resume Talkback" : "Start Talkback",
5633
6075
  children: isPlaying && !isPaused ? (
5634
6076
  // Pause icon
5635
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
6077
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5636
6078
  "svg",
5637
6079
  {
5638
6080
  xmlns: "http://www.w3.org/2000/svg",
@@ -5646,14 +6088,14 @@ var RedactoNoticeConsent = ({
5646
6088
  strokeLinejoin: "round",
5647
6089
  "aria-hidden": "true",
5648
6090
  children: [
5649
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "6", y: "4", width: "4", height: "16" }),
5650
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "14", y: "4", width: "4", height: "16" })
6091
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "6", y: "4", width: "4", height: "16" }),
6092
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "14", y: "4", width: "4", height: "16" })
5651
6093
  ]
5652
6094
  }
5653
6095
  )
5654
6096
  ) : (
5655
6097
  // Play/Sound icon
5656
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
6098
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5657
6099
  "svg",
5658
6100
  {
5659
6101
  xmlns: "http://www.w3.org/2000/svg",
@@ -5667,15 +6109,15 @@ var RedactoNoticeConsent = ({
5667
6109
  strokeLinejoin: "round",
5668
6110
  "aria-hidden": "true",
5669
6111
  children: [
5670
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
5671
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07" })
6112
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
6113
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07" })
5672
6114
  ]
5673
6115
  }
5674
6116
  )
5675
6117
  )
5676
6118
  }
5677
6119
  ),
5678
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
6120
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5679
6121
  "button",
5680
6122
  {
5681
6123
  ref: firstFocusableRef,
@@ -5691,7 +6133,7 @@ var RedactoNoticeConsent = ({
5691
6133
  "aria-label": `Select language. Current language: ${toNativeLabel(selectedLanguage)}`,
5692
6134
  children: [
5693
6135
  toNativeLabel(selectedLanguage),
5694
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6136
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5695
6137
  "svg",
5696
6138
  {
5697
6139
  xmlns: "http://www.w3.org/2000/svg",
@@ -5705,7 +6147,7 @@ var RedactoNoticeConsent = ({
5705
6147
  strokeLinejoin: "round",
5706
6148
  style: { flexShrink: 0, marginLeft: "4px" },
5707
6149
  "aria-hidden": "true",
5708
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 6l4 4 4-4" })
6150
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M4 6l4 4 4-4" })
5709
6151
  }
5710
6152
  )
5711
6153
  ]
@@ -5714,7 +6156,7 @@ var RedactoNoticeConsent = ({
5714
6156
  ]
5715
6157
  }
5716
6158
  ),
5717
- isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6159
+ isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5718
6160
  "ul",
5719
6161
  {
5720
6162
  id: "language-listbox",
@@ -5724,7 +6166,7 @@ var RedactoNoticeConsent = ({
5724
6166
  },
5725
6167
  role: "listbox",
5726
6168
  "aria-label": "Select language",
5727
- children: availableLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6169
+ children: availableLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5728
6170
  "li",
5729
6171
  {
5730
6172
  style: {
@@ -5745,9 +6187,9 @@ var RedactoNoticeConsent = ({
5745
6187
  }
5746
6188
  )
5747
6189
  ] });
5748
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
5749
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: logoRowStyle, children: logoNode }),
5750
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles.headerRow, children: [
6190
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
6191
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: logoRowStyle, children: logoNode }),
6192
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles.headerRow, children: [
5751
6193
  titleNode,
5752
6194
  controlsBlock
5753
6195
  ] })
@@ -5755,7 +6197,7 @@ var RedactoNoticeConsent = ({
5755
6197
  })()
5756
6198
  }
5757
6199
  ),
5758
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
6200
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5759
6201
  "div",
5760
6202
  {
5761
6203
  id: "privacy-notice-description",
@@ -5765,7 +6207,7 @@ var RedactoNoticeConsent = ({
5765
6207
  ...sectionStyle
5766
6208
  },
5767
6209
  children: [
5768
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
6210
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5769
6211
  "p",
5770
6212
  {
5771
6213
  style: {
@@ -5774,7 +6216,7 @@ var RedactoNoticeConsent = ({
5774
6216
  ...componentTextStyle
5775
6217
  },
5776
6218
  children: [
5777
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6219
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5778
6220
  "span",
5779
6221
  {
5780
6222
  id: "privacy-notice-text",
@@ -5782,8 +6224,8 @@ var RedactoNoticeConsent = ({
5782
6224
  },
5783
6225
  `privacy-notice-text-${selectedLanguage}`
5784
6226
  ),
5785
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
5786
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
6227
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
6228
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5787
6229
  "span",
5788
6230
  {
5789
6231
  id: "privacy-policy-text",
@@ -5793,7 +6235,7 @@ var RedactoNoticeConsent = ({
5793
6235
  (content == null ? void 0 : content.privacy_policy_prefix_text) || ""
5794
6236
  ),
5795
6237
  " ",
5796
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6238
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5797
6239
  "a",
5798
6240
  {
5799
6241
  id: "privacy-policy-link",
@@ -5816,7 +6258,7 @@ var RedactoNoticeConsent = ({
5816
6258
  },
5817
6259
  `privacy-text-${selectedLanguage}`
5818
6260
  ),
5819
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6261
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5820
6262
  "h2",
5821
6263
  {
5822
6264
  id: "purpose-section-heading",
@@ -5832,19 +6274,17 @@ var RedactoNoticeConsent = ({
5832
6274
  },
5833
6275
  `purpose-section-heading-${selectedLanguage}`
5834
6276
  ),
5835
- categorizedPurposes && !isMultiProduct(content == null ? void 0 : content.products) ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles.optionsContainer, children: soleProductSection(
5836
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
6277
+ categorizedPurposes && !isMultiProduct(content == null ? void 0 : content.products) ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles.optionsContainer, children: soleProductSection(
6278
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5837
6279
  categorizedPurposes.alreadyConsented.map(
5838
- (purpose) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6280
+ (purpose) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5839
6281
  PurposeItem,
5840
6282
  {
5841
6283
  purpose,
5842
- productIsRequired: productIsRequiredFor(
5843
- void 0
5844
- ),
5845
6284
  selectedPurposes,
5846
6285
  collapsedPurposes,
5847
6286
  selectedDataElements,
6287
+ recordedAnswers,
5848
6288
  settings,
5849
6289
  styles,
5850
6290
  responsiveStyles,
@@ -5859,16 +6299,14 @@ var RedactoNoticeConsent = ({
5859
6299
  `${purpose.uuid}-${selectedLanguage}`
5860
6300
  )
5861
6301
  ),
5862
- categorizedPurposes.needsConsent.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6302
+ categorizedPurposes.needsConsent.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5863
6303
  PurposeItem,
5864
6304
  {
5865
6305
  purpose,
5866
- productIsRequired: productIsRequiredFor(
5867
- void 0
5868
- ),
5869
6306
  selectedPurposes,
5870
6307
  collapsedPurposes,
5871
6308
  selectedDataElements,
6309
+ recordedAnswers,
5872
6310
  settings,
5873
6311
  styles,
5874
6312
  responsiveStyles,
@@ -5884,10 +6322,9 @@ var RedactoNoticeConsent = ({
5884
6322
  ] })
5885
6323
  ) }) : (
5886
6324
  /* Regular consent UI */
5887
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles.optionsContainer, children: isMultiProduct(content == null ? void 0 : content.products) ? productGroups.map((group) => {
6325
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles.optionsContainer, children: isMultiProduct(content == null ? void 0 : content.products) ? productGroups.map((group) => {
5888
6326
  var _a2;
5889
6327
  const boxPurposes = productBoxPurposes(
5890
- group.product.uuid,
5891
6328
  group.purposes
5892
6329
  );
5893
6330
  const selectedInGroup = boxPurposes.filter(
@@ -5896,8 +6333,8 @@ var RedactoNoticeConsent = ({
5896
6333
  purpose.uuid
5897
6334
  )]
5898
6335
  ).length;
5899
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
5900
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6336
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
6337
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5901
6338
  ProductSectionHeader,
5902
6339
  {
5903
6340
  product: group.product,
@@ -5918,7 +6355,7 @@ var RedactoNoticeConsent = ({
5918
6355
  getTranslatedText
5919
6356
  }
5920
6357
  ),
5921
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6358
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5922
6359
  "div",
5923
6360
  {
5924
6361
  id: `product-${group.product.uuid}`,
@@ -5926,17 +6363,15 @@ var RedactoNoticeConsent = ({
5926
6363
  hidden: collapsedProducts[group.product.uuid] || false,
5927
6364
  children: group.purposes.map((purpose) => {
5928
6365
  var _a3;
5929
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6366
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5930
6367
  PurposeItem,
5931
6368
  {
5932
6369
  purpose,
5933
6370
  productUuid: group.product.uuid,
5934
- productIsRequired: productIsRequiredFor(
5935
- group.product.uuid
5936
- ),
5937
6371
  selectedPurposes,
5938
6372
  collapsedPurposes,
5939
6373
  selectedDataElements,
6374
+ recordedAnswers,
5940
6375
  settings,
5941
6376
  styles,
5942
6377
  responsiveStyles,
@@ -5958,16 +6393,14 @@ var RedactoNoticeConsent = ({
5958
6393
  )
5959
6394
  ] }, group.product.uuid);
5960
6395
  }) : soleProductSection(
5961
- (_y = content == null ? void 0 : content.purposes) == null ? void 0 : _y.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6396
+ (_y = content == null ? void 0 : content.purposes) == null ? void 0 : _y.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5962
6397
  PurposeItem,
5963
6398
  {
5964
6399
  purpose,
5965
- productIsRequired: productIsRequiredFor(
5966
- void 0
5967
- ),
5968
6400
  selectedPurposes,
5969
6401
  collapsedPurposes,
5970
6402
  selectedDataElements,
6403
+ recordedAnswers,
5971
6404
  settings,
5972
6405
  styles,
5973
6406
  responsiveStyles,
@@ -5983,7 +6416,7 @@ var RedactoNoticeConsent = ({
5983
6416
  ))
5984
6417
  ) })
5985
6418
  ),
5986
- ((content == null ? void 0 : content.privacy_center_url) || (content == null ? void 0 : content.dpo_info)) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6419
+ ((content == null ? void 0 : content.privacy_center_url) || (content == null ? void 0 : content.dpo_info)) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5987
6420
  "div",
5988
6421
  {
5989
6422
  style: {
@@ -5996,14 +6429,14 @@ var RedactoNoticeConsent = ({
5996
6429
  paddingTop: "12px",
5997
6430
  marginTop: "12px"
5998
6431
  },
5999
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { style: { margin: 0, opacity: 0.6 }, children: [
6000
- content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
6001
- content.additional_text && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "additional-text", children: getTranslatedText(
6432
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { margin: 0, opacity: 0.6 }, children: [
6433
+ content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
6434
+ content.additional_text && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "additional-text", children: getTranslatedText(
6002
6435
  "additional_text",
6003
6436
  content.additional_text
6004
6437
  ) }),
6005
6438
  " ",
6006
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6439
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6007
6440
  "a",
6008
6441
  {
6009
6442
  id: "privacy-center-link",
@@ -6019,14 +6452,14 @@ var RedactoNoticeConsent = ({
6019
6452
  ),
6020
6453
  "."
6021
6454
  ] }),
6022
- content.dpo_info && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
6023
- content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
6024
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-grievance-text", children: getTranslatedDpoText(
6455
+ content.dpo_info && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
6456
+ content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
6457
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-grievance-text", children: getTranslatedDpoText(
6025
6458
  "grievance_text",
6026
6459
  content.dpo_info.grievance_text || ""
6027
6460
  ) }),
6028
6461
  " ",
6029
- content.dpo_info.grievance_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6462
+ content.dpo_info.grievance_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6030
6463
  "a",
6031
6464
  {
6032
6465
  id: "dpo-grievance-link",
@@ -6040,14 +6473,14 @@ var RedactoNoticeConsent = ({
6040
6473
  )
6041
6474
  }
6042
6475
  ),
6043
- content.dpo_info.grievance_email && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
6476
+ content.dpo_info.grievance_email && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
6044
6477
  " ",
6045
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
6478
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
6046
6479
  "grievance_email_connector_text",
6047
6480
  content.dpo_info.grievance_email_connector_text || "or email to"
6048
6481
  ) }),
6049
6482
  " ",
6050
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6483
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6051
6484
  "a",
6052
6485
  {
6053
6486
  id: "dpo-grievance-email",
@@ -6057,13 +6490,13 @@ var RedactoNoticeConsent = ({
6057
6490
  }
6058
6491
  )
6059
6492
  ] }),
6060
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
6061
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText(
6493
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
6494
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText(
6062
6495
  "dp_board_text",
6063
6496
  content.dpo_info.dp_board_text || ""
6064
6497
  ) }),
6065
6498
  " ",
6066
- content.dpo_info.dp_board_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6499
+ content.dpo_info.dp_board_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6067
6500
  "a",
6068
6501
  {
6069
6502
  id: "dpo-dp-board-link",
@@ -6077,13 +6510,13 @@ var RedactoNoticeConsent = ({
6077
6510
  )
6078
6511
  }
6079
6512
  ),
6080
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
6081
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-dpo-text", children: getTranslatedDpoText(
6513
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
6514
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-dpo-text", children: getTranslatedDpoText(
6082
6515
  "dpo_text",
6083
6516
  content.dpo_info.dpo_text || ""
6084
6517
  ) }),
6085
6518
  " ",
6086
- content.dpo_info.dpo_email && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6519
+ content.dpo_info.dpo_email && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6087
6520
  "a",
6088
6521
  {
6089
6522
  id: "dpo-dpo-link",
@@ -6102,7 +6535,16 @@ var RedactoNoticeConsent = ({
6102
6535
  ]
6103
6536
  }
6104
6537
  ),
6105
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6538
+ !isFullyConsentedReviewMode && confirmHint && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6539
+ "p",
6540
+ {
6541
+ id: CONFIRM_HINT_ID,
6542
+ role: "status",
6543
+ style: styles.confirmHint,
6544
+ children: confirmHint
6545
+ }
6546
+ ),
6547
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6106
6548
  "div",
6107
6549
  {
6108
6550
  style: {
@@ -6112,7 +6554,7 @@ var RedactoNoticeConsent = ({
6112
6554
  } : isMobile ? styles.actionButtonStack : styles.actionButtonRow,
6113
6555
  ...sectionStyle
6114
6556
  },
6115
- children: isFullyConsentedReviewMode ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6557
+ children: isFullyConsentedReviewMode ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6116
6558
  "button",
6117
6559
  {
6118
6560
  ref: lastFocusableRef,
@@ -6127,11 +6569,12 @@ var RedactoNoticeConsent = ({
6127
6569
  "aria-label": reviewModeButtonText,
6128
6570
  children: reviewModeButtonText
6129
6571
  }
6130
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
6572
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6131
6573
  NoticeFooter,
6132
6574
  {
6133
6575
  labels: actionLabels,
6134
6576
  acceptSelectedDisabled: acceptDisabled,
6577
+ acceptSelectedHintId: confirmHint ? CONFIRM_HINT_ID : void 0,
6135
6578
  isSubmittingAccept,
6136
6579
  isSubmittingDecline,
6137
6580
  isMobile,
@@ -6140,21 +6583,33 @@ var RedactoNoticeConsent = ({
6140
6583
  acceptSelectedButtonStyle,
6141
6584
  declineButtonStyle,
6142
6585
  lastFocusableRef,
6143
- onAcceptAll: handleAcceptAll,
6144
- onAcceptSelected: handleAcceptSelected,
6145
- onDecline: handleDecline
6586
+ onAcceptAll: confirmFirst("accept-all", handleAcceptAll),
6587
+ onAcceptSelected: confirmFirst(
6588
+ "accept-selected",
6589
+ handleAcceptSelected
6590
+ ),
6591
+ onDecline: confirmFirst("decline", handleDecline)
6146
6592
  }
6147
6593
  )
6148
6594
  }
6149
6595
  )
6150
6596
  ] })
6151
6597
  }
6598
+ ),
6599
+ pendingAction && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6600
+ ConfirmDialog,
6601
+ {
6602
+ action: confirmAction,
6603
+ onConfirm: runPendingAction,
6604
+ onCancel: dismissConfirm,
6605
+ confirmStyle: acceptAllButtonStyle
6606
+ }
6152
6607
  )
6153
6608
  ] }) });
6154
6609
  };
6155
6610
 
6156
6611
  // src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
6157
- var import_react5 = require("react");
6612
+ var import_react7 = require("react");
6158
6613
 
6159
6614
  // src/RedactoNoticeConsentInline/api/index.ts
6160
6615
  var BASE_URL2 = "https://api.redacto.tech/consent";
@@ -6607,11 +7062,11 @@ var styles2 = {
6607
7062
  };
6608
7063
 
6609
7064
  // src/RedactoNoticeConsentInline/useMediaQuery.ts
6610
- var import_react4 = require("react");
7065
+ var import_react6 = require("react");
6611
7066
  var useMediaQuery2 = (query) => {
6612
7067
  const getMatches = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
6613
- const [matches, setMatches] = (0, import_react4.useState)(getMatches);
6614
- (0, import_react4.useEffect)(() => {
7068
+ const [matches, setMatches] = (0, import_react6.useState)(getMatches);
7069
+ (0, import_react6.useEffect)(() => {
6615
7070
  if (typeof window === "undefined") return;
6616
7071
  const media = window.matchMedia(query);
6617
7072
  const listener = (e) => {
@@ -6662,7 +7117,7 @@ var injectSpinnerAnimation = () => {
6662
7117
  };
6663
7118
 
6664
7119
  // src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
6665
- var import_jsx_runtime4 = require("react/jsx-runtime");
7120
+ var import_jsx_runtime6 = require("react/jsx-runtime");
6666
7121
  var RedactoConsentInlineComponent = ({
6667
7122
  org_uuid,
6668
7123
  workspace_uuid,
@@ -6677,25 +7132,25 @@ var RedactoConsentInlineComponent = ({
6677
7132
  settings,
6678
7133
  applicationId
6679
7134
  }) => {
6680
- const [content, setContent] = (0, import_react5.useState)(null);
6681
- const [isLoading, setIsLoading] = (0, import_react5.useState)(true);
6682
- const [isSubmitting, setIsSubmitting] = (0, import_react5.useState)(false);
6683
- const [selectedLanguage, setSelectedLanguage] = (0, import_react5.useState)(language);
6684
- const [collapsedPurposes, setCollapsedPurposes] = (0, import_react5.useState)({});
6685
- const [selectedPurposes, setSelectedPurposes] = (0, import_react5.useState)({});
6686
- const [selectedDataElements, setSelectedDataElements] = (0, import_react5.useState)({});
6687
- const [hasAlreadyConsented, setHasAlreadyConsented] = (0, import_react5.useState)(false);
6688
- const [isCheckingConsent, setIsCheckingConsent] = (0, import_react5.useState)(
7135
+ const [content, setContent] = (0, import_react7.useState)(null);
7136
+ const [isLoading, setIsLoading] = (0, import_react7.useState)(true);
7137
+ const [isSubmitting, setIsSubmitting] = (0, import_react7.useState)(false);
7138
+ const [selectedLanguage, setSelectedLanguage] = (0, import_react7.useState)(language);
7139
+ const [collapsedPurposes, setCollapsedPurposes] = (0, import_react7.useState)({});
7140
+ const [selectedPurposes, setSelectedPurposes] = (0, import_react7.useState)({});
7141
+ const [selectedDataElements, setSelectedDataElements] = (0, import_react7.useState)({});
7142
+ const [hasAlreadyConsented, setHasAlreadyConsented] = (0, import_react7.useState)(false);
7143
+ const [isCheckingConsent, setIsCheckingConsent] = (0, import_react7.useState)(
6689
7144
  Boolean(ledgerBaseUrl) && !applicationId
6690
7145
  );
6691
- const [fetchError, setFetchError] = (0, import_react5.useState)(null);
6692
- const [errorMessage, setErrorMessage] = (0, import_react5.useState)(null);
6693
- const hasSubmittedRef = (0, import_react5.useRef)(false);
6694
- (0, import_react5.useEffect)(() => {
7146
+ const [fetchError, setFetchError] = (0, import_react7.useState)(null);
7147
+ const [errorMessage, setErrorMessage] = (0, import_react7.useState)(null);
7148
+ const hasSubmittedRef = (0, import_react7.useRef)(false);
7149
+ (0, import_react7.useEffect)(() => {
6695
7150
  injectSpinnerAnimation();
6696
7151
  }, []);
6697
7152
  const isMobile = useMediaQuery2("(max-width: 768px)");
6698
- const responsiveStyles = (0, import_react5.useMemo)(
7153
+ const responsiveStyles = (0, import_react7.useMemo)(
6699
7154
  () => ({
6700
7155
  optionTitle: {
6701
7156
  fontSize: isMobile ? "14px" : "16px"
@@ -6713,21 +7168,21 @@ var RedactoConsentInlineComponent = ({
6713
7168
  }),
6714
7169
  [isMobile]
6715
7170
  );
6716
- const areAllRequiredElementsChecked = (0, import_react5.useMemo)(() => {
7171
+ const areAllRequiredElementsChecked = (0, import_react7.useMemo)(() => {
6717
7172
  if (!content) return false;
6718
7173
  return content.purposes.every((purpose) => {
6719
7174
  const requiredElements = purpose.data_elements.filter(
6720
- (element) => element.required && element.enabled
7175
+ isBlockingRequiredElement
6721
7176
  );
6722
7177
  return requiredElements.every(
6723
7178
  (element) => selectedDataElements[`${purpose.uuid}-${element.uuid}`]
6724
7179
  );
6725
7180
  });
6726
7181
  }, [content, selectedDataElements]);
6727
- (0, import_react5.useEffect)(() => {
7182
+ (0, import_react7.useEffect)(() => {
6728
7183
  onValidationChange == null ? void 0 : onValidationChange(areAllRequiredElementsChecked);
6729
7184
  }, [areAllRequiredElementsChecked, onValidationChange]);
6730
- (0, import_react5.useEffect)(() => {
7185
+ (0, import_react7.useEffect)(() => {
6731
7186
  if (hasAlreadyConsented) {
6732
7187
  onAccept == null ? void 0 : onAccept();
6733
7188
  }
@@ -6833,7 +7288,7 @@ var RedactoConsentInlineComponent = ({
6833
7288
  }
6834
7289
  }
6835
7290
  };
6836
- (0, import_react5.useEffect)(() => {
7291
+ (0, import_react7.useEffect)(() => {
6837
7292
  const controller = new AbortController();
6838
7293
  void fetchNotice(controller.signal);
6839
7294
  return () => {
@@ -6847,7 +7302,7 @@ var RedactoConsentInlineComponent = ({
6847
7302
  applicationId,
6848
7303
  accessToken
6849
7304
  ]);
6850
- (0, import_react5.useEffect)(() => {
7305
+ (0, import_react7.useEffect)(() => {
6851
7306
  if (!ledgerBaseUrl || applicationId) {
6852
7307
  return;
6853
7308
  }
@@ -6944,7 +7399,7 @@ var RedactoConsentInlineComponent = ({
6944
7399
  return newState;
6945
7400
  });
6946
7401
  };
6947
- const handleAcceptWithToken = (0, import_react5.useCallback)(
7402
+ const handleAcceptWithToken = (0, import_react7.useCallback)(
6948
7403
  async (tokenToUse) => {
6949
7404
  if (!tokenToUse || !content) {
6950
7405
  setErrorMessage("Unable to submit consent. Please try again.");
@@ -7020,7 +7475,7 @@ var RedactoConsentInlineComponent = ({
7020
7475
  onAccept
7021
7476
  ]
7022
7477
  );
7023
- (0, import_react5.useEffect)(() => {
7478
+ (0, import_react7.useEffect)(() => {
7024
7479
  if (accessToken && content && areAllRequiredElementsChecked && !isSubmitting && !isCheckingConsent && !hasAlreadyConsented && !hasSubmittedRef.current) {
7025
7480
  hasSubmittedRef.current = true;
7026
7481
  const autoSubmit = async () => {
@@ -7042,7 +7497,7 @@ var RedactoConsentInlineComponent = ({
7042
7497
  hasAlreadyConsented,
7043
7498
  handleAcceptWithToken
7044
7499
  ]);
7045
- (0, import_react5.useEffect)(() => {
7500
+ (0, import_react7.useEffect)(() => {
7046
7501
  if (!accessToken) {
7047
7502
  hasSubmittedRef.current = false;
7048
7503
  }
@@ -7066,16 +7521,16 @@ var RedactoConsentInlineComponent = ({
7066
7521
  return null;
7067
7522
  }
7068
7523
  if (isLoading) {
7069
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { ...NOTICE_FONT_ROOT_PROPS, style: loadingRootStyle, children: [
7070
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: styles2.loadingSpinner }),
7071
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: { ...styles2.privacyText, ...textStyle }, children: "Loading..." })
7524
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { ...NOTICE_FONT_ROOT_PROPS, style: loadingRootStyle, children: [
7525
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: styles2.loadingSpinner }),
7526
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: { ...styles2.privacyText, ...textStyle }, children: "Loading..." })
7072
7527
  ] });
7073
7528
  }
7074
7529
  if (!content) {
7075
7530
  return null;
7076
7531
  }
7077
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { ...NOTICE_FONT_ROOT_PROPS, style: rootStyle, children: [
7078
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7532
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { ...NOTICE_FONT_ROOT_PROPS, style: rootStyle, children: [
7533
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7079
7534
  "div",
7080
7535
  {
7081
7536
  role: "alert",
@@ -7094,9 +7549,9 @@ var RedactoConsentInlineComponent = ({
7094
7549
  var _a, _b;
7095
7550
  const renderPurpose = (purpose, productUuid) => {
7096
7551
  const stateKey = productPurposeKey(productUuid, purpose.uuid);
7097
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
7098
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: styles2.optionItem, children: [
7099
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
7552
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
7553
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: styles2.optionItem, children: [
7554
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7100
7555
  "div",
7101
7556
  {
7102
7557
  style: styles2.optionLeft,
@@ -7117,7 +7572,7 @@ var RedactoConsentInlineComponent = ({
7117
7572
  }
7118
7573
  },
7119
7574
  children: [
7120
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7575
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7121
7576
  "div",
7122
7577
  {
7123
7578
  style: {
@@ -7126,7 +7581,7 @@ var RedactoConsentInlineComponent = ({
7126
7581
  justifyContent: "center",
7127
7582
  marginLeft: "5px"
7128
7583
  },
7129
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7584
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7130
7585
  "svg",
7131
7586
  {
7132
7587
  width: "7",
@@ -7143,13 +7598,13 @@ var RedactoConsentInlineComponent = ({
7143
7598
  transition: "transform 0.3s ease"
7144
7599
  },
7145
7600
  "aria-hidden": "true",
7146
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M1 1L6 6L1 11" })
7601
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M1 1L6 6L1 11" })
7147
7602
  }
7148
7603
  )
7149
7604
  }
7150
7605
  ),
7151
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: styles2.optionTextContainer, children: [
7152
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
7606
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: styles2.optionTextContainer, children: [
7607
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7153
7608
  "h2",
7154
7609
  {
7155
7610
  style: {
@@ -7163,11 +7618,11 @@ var RedactoConsentInlineComponent = ({
7163
7618
  purpose.name,
7164
7619
  purpose.uuid
7165
7620
  ),
7166
- hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RequiredMarker, {})
7621
+ hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RequiredMarker, {})
7167
7622
  ]
7168
7623
  }
7169
7624
  ),
7170
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7625
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7171
7626
  "h3",
7172
7627
  {
7173
7628
  style: {
@@ -7186,7 +7641,7 @@ var RedactoConsentInlineComponent = ({
7186
7641
  ]
7187
7642
  }
7188
7643
  ),
7189
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7644
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7190
7645
  "input",
7191
7646
  {
7192
7647
  type: "checkbox",
@@ -7200,17 +7655,17 @@ var RedactoConsentInlineComponent = ({
7200
7655
  }
7201
7656
  )
7202
7657
  ] }),
7203
- !collapsedPurposes[stateKey] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7658
+ !collapsedPurposes[stateKey] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7204
7659
  "div",
7205
7660
  {
7206
7661
  id: `purpose-${stateKey}`,
7207
7662
  style: styles2.dataElementsContainer,
7208
- children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
7663
+ children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7209
7664
  "div",
7210
7665
  {
7211
7666
  style: styles2.dataElementItem,
7212
7667
  children: [
7213
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
7668
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
7214
7669
  "span",
7215
7670
  {
7216
7671
  style: {
@@ -7224,11 +7679,11 @@ var RedactoConsentInlineComponent = ({
7224
7679
  dataElement.name,
7225
7680
  dataElement.uuid
7226
7681
  ),
7227
- dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RequiredMarker, {})
7682
+ isBlockingRequiredElement(dataElement) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RequiredMarker, {})
7228
7683
  ]
7229
7684
  }
7230
7685
  ),
7231
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
7686
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
7232
7687
  "input",
7233
7688
  {
7234
7689
  type: "checkbox",
@@ -7260,8 +7715,8 @@ var RedactoConsentInlineComponent = ({
7260
7715
  content == null ? void 0 : content.products,
7261
7716
  (_b = content == null ? void 0 : content.purposes) != null ? _b : [],
7262
7717
  content == null ? void 0 : content.product_purpose_order
7263
- ).map((group) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
7264
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { ...styles2.optionTitle, margin: "0 0 8px" }, children: getTranslatedText(
7718
+ ).map((group) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
7719
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { ...styles2.optionTitle, margin: "0 0 8px" }, children: getTranslatedText(
7265
7720
  "products.name",
7266
7721
  group.product.name,
7267
7722
  group.product.uuid
@@ -7274,10 +7729,10 @@ var RedactoConsentInlineComponent = ({
7274
7729
  ] });
7275
7730
  };
7276
7731
  RedactoConsentInlineComponent.displayName = "RedactoConsentInline";
7277
- var RedactoConsentInline = (0, import_react5.memo)(RedactoConsentInlineComponent);
7732
+ var RedactoConsentInline = (0, import_react7.memo)(RedactoConsentInlineComponent);
7278
7733
 
7279
7734
  // src/RedactoNoticeAssisted/RedactoNoticeAssisted.tsx
7280
- var import_react7 = require("react");
7735
+ var import_react9 = require("react");
7281
7736
 
7282
7737
  // src/RedactoNoticeAssisted/styles.ts
7283
7738
  var styles3 = {
@@ -8225,11 +8680,11 @@ var injectAssistedStyles = () => {
8225
8680
  };
8226
8681
 
8227
8682
  // src/RedactoNoticeAssisted/useMediaQuery.ts
8228
- var import_react6 = require("react");
8683
+ var import_react8 = require("react");
8229
8684
  var useMediaQuery3 = (query) => {
8230
8685
  const getMatches = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
8231
- const [matches, setMatches] = (0, import_react6.useState)(getMatches);
8232
- (0, import_react6.useEffect)(() => {
8686
+ const [matches, setMatches] = (0, import_react8.useState)(getMatches);
8687
+ (0, import_react8.useEffect)(() => {
8233
8688
  if (typeof window === "undefined") return;
8234
8689
  const media = window.matchMedia(query);
8235
8690
  const listener = (e) => {
@@ -9684,7 +10139,7 @@ var makeStaticT = (langCode) => (key, vars) => {
9684
10139
  var redacto_logo_default2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATkAAAE5CAYAAADr4VfxAAAgAElEQVR4nO3deXhU5dkG8Ps552S2sId931RWwQVwq6LihmttiVUhaNUEcGnpXluLtnaz7WeVqhCokAS0RVuK4lK1igpaFRQREJBFQCAsAQJk9nOe748hNEDWycy858x5ftfldZllzjwkM3fe97wbMTOEaMjTd6BlLBLtoenclcEdLYvbaaA8Js5jII9AbQD2E9CKgRYA/ABa1rhELgDPCZc9DCB+9P9NAIdAVAXmEIMPEaiKmQ8SqIJAFZZmVcCifZpGuzXGjlAb3857H0ck/f964WQkIScA4Ml8tNC9Vf1AWj8i9INF/ZisvgC6AdQDxweWnewBsAvAdhA2AdgE5k0W65vaR7xbxi1AVHF9QjEJOZcpLkIORasGW5Y+BOAhYBpK4MEM9FJdWxrEAWwEYzWBVrPGazRoq3b29W6cNg2W6uJEZkjIZbHn8qFX+I4MJDZGAHw2CGcDGAbAq7o2xQ4DWAHCcgDLibTlhXO9m1QXJdJDQi6LPHQxjI69gsM0ky4A4XwAlwJop7ouh9gN4CMwllo6v7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LltFASyERk8WzfW9o7oYN5KQs4G5tx9sEzU9+QyaBOAM1fWIVOC1YCplMudMKm2xR3U1biYhZzMzC4Jng2g8GPkAuqiuRzRJOQMLQDxX5rfZh4ScTT30ELQum8PnWczjANxMQAfVNYlaHSBgMYOfK98eeGXaW4irLkgcT0LOAZ7Lh+dAIDLaYr4B4OuJ0VV1TS73FRO9CDYXaf7cNwtnIqa6IFE3CTmnIdCMgtAIgK/XmK7gxD08mWycXhYBn1jML7OORZNLAh/L9uLOISHncDMKjnTUyBjDbF0B0GWQ+3ipsp3Ar1ug17V4/I3CZ1ruU12QSI6EXJb5y83Brp4cOp9BYwDrAoAGQtbQNsZmApYBvJQ0a9ldJS3WSmstO0jIZbniCcEuJjBCI4wAtBEAnw0gT3Vdiu0CsIKYlluatcKrWx/IPm3ZS0LOhWYXhPvE2BqqkTYYxEOJMZiBAci+zT+rAHwO8GoiWkvg1SZolZxH6i4ScgIA8NDFMDp2jfTUc9Cf2exPTP0Z6A9GDxC6AuiousZamEzYTYyvAGxlYJPGvAmatimu88Ypc/xfSZdTSMiJRpl+H7xGRaSbbnBXZu7IxB3AWnsNnMfgPCJqYzEHCNQGID/AfgBta1zCCyBQ42MGcLDGx2EAIQAHGQgDHCSmg6zRQTDvI0YFQBUWrArSqDwe5a86mYHdctaBaMj/A27i58g/nyt4AAAAAElFTkSuQmCC";
9685
10140
 
9686
10141
  // src/RedactoNoticeAssisted/RedactoNoticeAssisted.tsx
9687
- var import_jsx_runtime5 = require("react/jsx-runtime");
10142
+ var import_jsx_runtime7 = require("react/jsx-runtime");
9688
10143
  var PurposeItem2 = ({
9689
10144
  purpose,
9690
10145
  selectedPurposes,
@@ -9709,9 +10164,9 @@ var PurposeItem2 = ({
9709
10164
  (el) => el.enabled !== false
9710
10165
  );
9711
10166
  const hasRequired = hasRequiredDataElement(purpose);
9712
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
9713
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.optionItem, children: [
9714
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
10167
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
10168
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.optionItem, children: [
10169
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
9715
10170
  "div",
9716
10171
  {
9717
10172
  style: styles3.optionLeft,
@@ -9728,7 +10183,7 @@ var PurposeItem2 = ({
9728
10183
  }
9729
10184
  },
9730
10185
  children: [
9731
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10186
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9732
10187
  "div",
9733
10188
  {
9734
10189
  style: {
@@ -9737,7 +10192,7 @@ var PurposeItem2 = ({
9737
10192
  justifyContent: "center",
9738
10193
  marginLeft: "5px"
9739
10194
  },
9740
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10195
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9741
10196
  "svg",
9742
10197
  {
9743
10198
  width: "7",
@@ -9754,24 +10209,24 @@ var PurposeItem2 = ({
9754
10209
  transition: "transform 0.3s ease"
9755
10210
  },
9756
10211
  "aria-hidden": "true",
9757
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M1 1L6 6L1 11" })
10212
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M1 1L6 6L1 11" })
9758
10213
  }
9759
10214
  )
9760
10215
  }
9761
10216
  ),
9762
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.optionTextContainer, children: [
9763
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
10217
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.optionTextContainer, children: [
10218
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
9764
10219
  "h2",
9765
10220
  {
9766
10221
  id: `purpose-name-${purpose.uuid}`,
9767
10222
  style: { ...styles3.optionTitle, ...responsive.optionTitle },
9768
10223
  children: [
9769
10224
  name,
9770
- hasRequired && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, { label: ts("required") })
10225
+ hasRequired && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RequiredMarker, { label: ts("required") })
9771
10226
  ]
9772
10227
  }
9773
10228
  ),
9774
- description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10229
+ description && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9775
10230
  "h3",
9776
10231
  {
9777
10232
  id: `purpose-description-${purpose.uuid}`,
@@ -9786,7 +10241,7 @@ var PurposeItem2 = ({
9786
10241
  ]
9787
10242
  }
9788
10243
  ),
9789
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10244
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9790
10245
  "input",
9791
10246
  {
9792
10247
  className: "redacto-assisted-checkbox-large",
@@ -9798,7 +10253,7 @@ var PurposeItem2 = ({
9798
10253
  }
9799
10254
  )
9800
10255
  ] }),
9801
- isExpanded && dataElements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10256
+ isExpanded && dataElements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9802
10257
  "div",
9803
10258
  {
9804
10259
  id: `redacto-assisted-purpose-${purpose.uuid}`,
@@ -9810,8 +10265,8 @@ var PurposeItem2 = ({
9810
10265
  dataElement.name,
9811
10266
  dataElement.uuid
9812
10267
  );
9813
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.dataElementItem, children: [
9814
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
10268
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.dataElementItem, children: [
10269
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
9815
10270
  "span",
9816
10271
  {
9817
10272
  id: `data-element-${combinedId}`,
@@ -9821,11 +10276,11 @@ var PurposeItem2 = ({
9821
10276
  },
9822
10277
  children: [
9823
10278
  elementName,
9824
- dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, { label: ts("required") })
10279
+ isBlockingRequiredElement(dataElement) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RequiredMarker, { label: ts("required") })
9825
10280
  ]
9826
10281
  }
9827
10282
  ),
9828
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10283
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
9829
10284
  "input",
9830
10285
  {
9831
10286
  className: "redacto-assisted-checkbox-small",
@@ -9852,48 +10307,48 @@ var RedactoNoticeAssisted = ({
9852
10307
  onComplete
9853
10308
  }) => {
9854
10309
  const isMobile = useMediaQuery3("(max-width: 768px)");
9855
- const [content, setContent] = (0, import_react7.useState)(null);
9856
- const [isLoading, setIsLoading] = (0, import_react7.useState)(true);
9857
- const [fetchError, setFetchError] = (0, import_react7.useState)(null);
9858
- const [step, setStep] = (0, import_react7.useState)("notice");
9859
- const [acceptMode, setAcceptMode] = (0, import_react7.useState)("selected");
9860
- const [selectedPurposes, setSelectedPurposes] = (0, import_react7.useState)({});
9861
- const [selectedDataElements, setSelectedDataElements] = (0, import_react7.useState)({});
9862
- const [collapsedPurposes, setCollapsedPurposes] = (0, import_react7.useState)({});
9863
- const [isLanguageDropdownOpen, setIsLanguageDropdownOpen] = (0, import_react7.useState)(false);
9864
- const [selectedLanguage, setSelectedLanguage] = (0, import_react7.useState)("English");
9865
- const languageContainerRef = (0, import_react7.useRef)(null);
9866
- const [ttsAudioUrls, setTtsAudioUrls] = (0, import_react7.useState)(null);
9867
- const [isTTSAvailable, setIsTTSAvailable] = (0, import_react7.useState)(false);
9868
- const [isPlaying, setIsPlaying] = (0, import_react7.useState)(false);
9869
- const [isPaused, setIsPaused] = (0, import_react7.useState)(false);
9870
- const [currentAudioIndex, setCurrentAudioIndex] = (0, import_react7.useState)(0);
9871
- const [highlightedElementId, setHighlightedElementId] = (0, import_react7.useState)(null);
9872
- const currentAudioRef = (0, import_react7.useRef)(null);
9873
- const [verifyMethod, setVerifyMethod] = (0, import_react7.useState)(
10310
+ const [content, setContent] = (0, import_react9.useState)(null);
10311
+ const [isLoading, setIsLoading] = (0, import_react9.useState)(true);
10312
+ const [fetchError, setFetchError] = (0, import_react9.useState)(null);
10313
+ const [step, setStep] = (0, import_react9.useState)("notice");
10314
+ const [acceptMode, setAcceptMode] = (0, import_react9.useState)("selected");
10315
+ const [selectedPurposes, setSelectedPurposes] = (0, import_react9.useState)({});
10316
+ const [selectedDataElements, setSelectedDataElements] = (0, import_react9.useState)({});
10317
+ const [collapsedPurposes, setCollapsedPurposes] = (0, import_react9.useState)({});
10318
+ const [isLanguageDropdownOpen, setIsLanguageDropdownOpen] = (0, import_react9.useState)(false);
10319
+ const [selectedLanguage, setSelectedLanguage] = (0, import_react9.useState)("English");
10320
+ const languageContainerRef = (0, import_react9.useRef)(null);
10321
+ const [ttsAudioUrls, setTtsAudioUrls] = (0, import_react9.useState)(null);
10322
+ const [isTTSAvailable, setIsTTSAvailable] = (0, import_react9.useState)(false);
10323
+ const [isPlaying, setIsPlaying] = (0, import_react9.useState)(false);
10324
+ const [isPaused, setIsPaused] = (0, import_react9.useState)(false);
10325
+ const [currentAudioIndex, setCurrentAudioIndex] = (0, import_react9.useState)(0);
10326
+ const [highlightedElementId, setHighlightedElementId] = (0, import_react9.useState)(null);
10327
+ const currentAudioRef = (0, import_react9.useRef)(null);
10328
+ const [verifyMethod, setVerifyMethod] = (0, import_react9.useState)(
9874
10329
  "mobile"
9875
10330
  );
9876
- const [mobile, setMobile] = (0, import_react7.useState)("");
9877
- const mobileInputRef = (0, import_react7.useRef)(null);
9878
- const [email, setEmail] = (0, import_react7.useState)("");
9879
- const emailInputRef = (0, import_react7.useRef)(null);
9880
- const [otpSent, setOtpSent] = (0, import_react7.useState)(false);
9881
- const verifyBlockRef = (0, import_react7.useRef)(null);
9882
- const otpSectionRef = (0, import_react7.useRef)(null);
9883
- const [otpDigits, setOtpDigits] = (0, import_react7.useState)(
10331
+ const [mobile, setMobile] = (0, import_react9.useState)("");
10332
+ const mobileInputRef = (0, import_react9.useRef)(null);
10333
+ const [email, setEmail] = (0, import_react9.useState)("");
10334
+ const emailInputRef = (0, import_react9.useRef)(null);
10335
+ const [otpSent, setOtpSent] = (0, import_react9.useState)(false);
10336
+ const verifyBlockRef = (0, import_react9.useRef)(null);
10337
+ const otpSectionRef = (0, import_react9.useRef)(null);
10338
+ const [otpDigits, setOtpDigits] = (0, import_react9.useState)(
9884
10339
  () => Array.from({ length: ASSISTED_CONFIG.otpLength }, () => "")
9885
10340
  );
9886
- const otpInputRefs = (0, import_react7.useRef)([]);
9887
- const [resendCountdown, setResendCountdown] = (0, import_react7.useState)(0);
9888
- const [otpUuid, setOtpUuid] = (0, import_react7.useState)("");
9889
- const [isSendingOtp, setIsSendingOtp] = (0, import_react7.useState)(false);
9890
- const [isVerifying, setIsVerifying] = (0, import_react7.useState)(false);
9891
- const [createError, setCreateError] = (0, import_react7.useState)(null);
9892
- const [otpError, setOtpError] = (0, import_react7.useState)(null);
9893
- (0, import_react7.useEffect)(() => {
10341
+ const otpInputRefs = (0, import_react9.useRef)([]);
10342
+ const [resendCountdown, setResendCountdown] = (0, import_react9.useState)(0);
10343
+ const [otpUuid, setOtpUuid] = (0, import_react9.useState)("");
10344
+ const [isSendingOtp, setIsSendingOtp] = (0, import_react9.useState)(false);
10345
+ const [isVerifying, setIsVerifying] = (0, import_react9.useState)(false);
10346
+ const [createError, setCreateError] = (0, import_react9.useState)(null);
10347
+ const [otpError, setOtpError] = (0, import_react9.useState)(null);
10348
+ (0, import_react9.useEffect)(() => {
9894
10349
  injectAssistedStyles();
9895
10350
  }, []);
9896
- (0, import_react7.useEffect)(() => {
10351
+ (0, import_react9.useEffect)(() => {
9897
10352
  const controller = new AbortController();
9898
10353
  setIsLoading(true);
9899
10354
  setFetchError(null);
@@ -9929,14 +10384,14 @@ var RedactoNoticeAssisted = ({
9929
10384
  });
9930
10385
  return () => controller.abort();
9931
10386
  }, [organisationUuid, workspaceUuid, noticeUuid, baseUrl]);
9932
- (0, import_react7.useEffect)(() => {
10387
+ (0, import_react9.useEffect)(() => {
9933
10388
  if (resendCountdown <= 0) return;
9934
10389
  const intervalId = window.setInterval(() => {
9935
10390
  setResendCountdown((prev) => prev <= 1 ? 0 : prev - 1);
9936
10391
  }, 1e3);
9937
10392
  return () => window.clearInterval(intervalId);
9938
10393
  }, [resendCountdown]);
9939
- (0, import_react7.useEffect)(() => {
10394
+ (0, import_react9.useEffect)(() => {
9940
10395
  if (step !== "verify") return;
9941
10396
  const id = window.setTimeout(
9942
10397
  () => scrollIntoViewSoft(verifyBlockRef.current),
@@ -9944,7 +10399,7 @@ var RedactoNoticeAssisted = ({
9944
10399
  );
9945
10400
  return () => window.clearTimeout(id);
9946
10401
  }, [step]);
9947
- (0, import_react7.useEffect)(() => {
10402
+ (0, import_react9.useEffect)(() => {
9948
10403
  if (!otpSent) return;
9949
10404
  const id = window.setTimeout(
9950
10405
  () => scrollIntoViewSoft(otpSectionRef.current),
@@ -9952,7 +10407,7 @@ var RedactoNoticeAssisted = ({
9952
10407
  );
9953
10408
  return () => window.clearTimeout(id);
9954
10409
  }, [otpSent]);
9955
- (0, import_react7.useEffect)(() => {
10410
+ (0, import_react9.useEffect)(() => {
9956
10411
  if (!isLanguageDropdownOpen) return;
9957
10412
  const handleClickOutside = (e) => {
9958
10413
  if (languageContainerRef.current && !languageContainerRef.current.contains(e.target)) {
@@ -9967,7 +10422,7 @@ var RedactoNoticeAssisted = ({
9967
10422
  const isMobileValid = mobile.replace(/\D/g, "").length >= 10;
9968
10423
  const isEmailValid = EMAIL_REGEX.test(email.trim());
9969
10424
  const isContactValid = verifyMethod === "email" ? isEmailValid : isMobileValid;
9970
- const areAllRequiredElementsChecked = (0, import_react7.useMemo)(() => {
10425
+ const areAllRequiredElementsChecked = (0, import_react9.useMemo)(() => {
9971
10426
  if (!content) return false;
9972
10427
  return content.purposes.every((purpose) => {
9973
10428
  const requiredElements = purpose.data_elements.filter(
@@ -9978,20 +10433,20 @@ var RedactoNoticeAssisted = ({
9978
10433
  );
9979
10434
  });
9980
10435
  }, [content, selectedDataElements]);
9981
- const normalizedDefaultLang = (0, import_react7.useMemo)(() => {
10436
+ const normalizedDefaultLang = (0, import_react9.useMemo)(() => {
9982
10437
  const dl = content == null ? void 0 : content.default_language;
9983
10438
  if (!dl) return "English";
9984
10439
  return dl === "en" || dl === "EN" ? "English" : dl;
9985
10440
  }, [content]);
9986
- const isDefaultLanguage = (0, import_react7.useCallback)(
10441
+ const isDefaultLanguage = (0, import_react9.useCallback)(
9987
10442
  (lang) => lang === "English" || lang === "en" || lang === "EN",
9988
10443
  []
9989
10444
  );
9990
- const ts = (0, import_react7.useMemo)(
10445
+ const ts = (0, import_react9.useMemo)(
9991
10446
  () => makeStaticT(toBcp47Code(selectedLanguage)),
9992
10447
  [selectedLanguage]
9993
10448
  );
9994
- const getTranslatedText = (0, import_react7.useCallback)(
10449
+ const getTranslatedText = (0, import_react9.useCallback)(
9995
10450
  (key, fallback, itemId) => {
9996
10451
  var _a, _b, _c;
9997
10452
  if (!content) return fallback;
@@ -10021,7 +10476,7 @@ var RedactoNoticeAssisted = ({
10021
10476
  },
10022
10477
  [content, selectedLanguage, isDefaultLanguage]
10023
10478
  );
10024
- const getTranslatedDpoText = (0, import_react7.useCallback)(
10479
+ const getTranslatedDpoText = (0, import_react9.useCallback)(
10025
10480
  (key, fallback) => {
10026
10481
  var _a, _b;
10027
10482
  if (!(content == null ? void 0 : content.dpo_info)) return fallback;
@@ -10033,7 +10488,7 @@ var RedactoNoticeAssisted = ({
10033
10488
  },
10034
10489
  [content, selectedLanguage, isDefaultLanguage]
10035
10490
  );
10036
- const availableLanguages = (0, import_react7.useMemo)(() => {
10491
+ const availableLanguages = (0, import_react9.useMemo)(() => {
10037
10492
  if (!content) return [selectedLanguage];
10038
10493
  const pinned = ["English"];
10039
10494
  if (normalizedDefaultLang && normalizedDefaultLang !== "English") {
@@ -10053,7 +10508,7 @@ var RedactoNoticeAssisted = ({
10053
10508
  const fontFamily = useNoticeFont({ noticeFont: content == null ? void 0 : content.font_preference });
10054
10509
  const logoUrl = (content == null ? void 0 : content.logo_url) || redacto_logo_default2;
10055
10510
  const linkStyle = { ...styles3.link, color: secondaryColor };
10056
- const responsive = (0, import_react7.useMemo)(
10511
+ const responsive = (0, import_react9.useMemo)(
10057
10512
  () => ({
10058
10513
  modal: { width: isMobile ? "90%" : "700px" },
10059
10514
  title: { fontSize: isMobile ? "16px" : "18px" },
@@ -10091,7 +10546,7 @@ var RedactoNoticeAssisted = ({
10091
10546
  }),
10092
10547
  [isMobile]
10093
10548
  );
10094
- const togglePurpose = (0, import_react7.useCallback)(
10549
+ const togglePurpose = (0, import_react9.useCallback)(
10095
10550
  (uuid) => {
10096
10551
  setSelectedPurposes((prev) => {
10097
10552
  const next = !prev[uuid];
@@ -10108,10 +10563,10 @@ var RedactoNoticeAssisted = ({
10108
10563
  },
10109
10564
  [content]
10110
10565
  );
10111
- const togglePurposeCollapse = (0, import_react7.useCallback)((uuid) => {
10566
+ const togglePurposeCollapse = (0, import_react9.useCallback)((uuid) => {
10112
10567
  setCollapsedPurposes((prev) => ({ ...prev, [uuid]: !prev[uuid] }));
10113
10568
  }, []);
10114
- const handleDataElementToggle = (0, import_react7.useCallback)(
10569
+ const handleDataElementToggle = (0, import_react9.useCallback)(
10115
10570
  (purposeUuid, elementUuid) => {
10116
10571
  if (!content) return;
10117
10572
  const combinedId = `${purposeUuid}-${elementUuid}`;
@@ -10137,14 +10592,14 @@ var RedactoNoticeAssisted = ({
10137
10592
  },
10138
10593
  [content]
10139
10594
  );
10140
- const toggleLanguageDropdown = (0, import_react7.useCallback)(() => {
10595
+ const toggleLanguageDropdown = (0, import_react9.useCallback)(() => {
10141
10596
  setIsLanguageDropdownOpen((prev) => !prev);
10142
10597
  }, []);
10143
- const handleLanguageSelect = (0, import_react7.useCallback)((lang) => {
10598
+ const handleLanguageSelect = (0, import_react9.useCallback)((lang) => {
10144
10599
  setSelectedLanguage(lang);
10145
10600
  setIsLanguageDropdownOpen(false);
10146
10601
  }, []);
10147
- const audioSequence = (0, import_react7.useMemo)(() => {
10602
+ const audioSequence = (0, import_react9.useMemo)(() => {
10148
10603
  if (!ttsAudioUrls || !content) return [];
10149
10604
  const sequence = [];
10150
10605
  if (ttsAudioUrls.notice_banner_heading_audio_url) {
@@ -10205,7 +10660,7 @@ var RedactoNoticeAssisted = ({
10205
10660
  }
10206
10661
  return sequence;
10207
10662
  }, [ttsAudioUrls, content]);
10208
- const elementIdSequence = (0, import_react7.useMemo)(() => {
10663
+ const elementIdSequence = (0, import_react9.useMemo)(() => {
10209
10664
  if (!ttsAudioUrls || !content) return [];
10210
10665
  const elementIds = [];
10211
10666
  if (ttsAudioUrls.notice_banner_heading_audio_url) {
@@ -10262,7 +10717,7 @@ var RedactoNoticeAssisted = ({
10262
10717
  }
10263
10718
  return elementIds;
10264
10719
  }, [ttsAudioUrls, content]);
10265
- const stopAudio = (0, import_react7.useCallback)(() => {
10720
+ const stopAudio = (0, import_react9.useCallback)(() => {
10266
10721
  if (currentAudioRef.current) {
10267
10722
  currentAudioRef.current.pause();
10268
10723
  currentAudioRef.current.currentTime = 0;
@@ -10273,7 +10728,7 @@ var RedactoNoticeAssisted = ({
10273
10728
  setCurrentAudioIndex(0);
10274
10729
  setHighlightedElementId(null);
10275
10730
  }, []);
10276
- const playNextAudio = (0, import_react7.useCallback)(
10731
+ const playNextAudio = (0, import_react9.useCallback)(
10277
10732
  (index) => {
10278
10733
  if (index >= audioSequence.length) {
10279
10734
  stopAudio();
@@ -10306,7 +10761,7 @@ var RedactoNoticeAssisted = ({
10306
10761
  },
10307
10762
  [audioSequence, elementIdSequence, stopAudio]
10308
10763
  );
10309
- const playAudio = (0, import_react7.useCallback)(() => {
10764
+ const playAudio = (0, import_react9.useCallback)(() => {
10310
10765
  if (audioSequence.length === 0) return;
10311
10766
  if (isPaused && currentAudioRef.current) {
10312
10767
  currentAudioRef.current.play().then(() => {
@@ -10320,21 +10775,21 @@ var RedactoNoticeAssisted = ({
10320
10775
  playNextAudio(startIndex);
10321
10776
  }
10322
10777
  }, [audioSequence, isPaused, isPlaying, currentAudioIndex, playNextAudio]);
10323
- const pauseAudio = (0, import_react7.useCallback)(() => {
10778
+ const pauseAudio = (0, import_react9.useCallback)(() => {
10324
10779
  if (currentAudioRef.current && isPlaying) {
10325
10780
  currentAudioRef.current.pause();
10326
10781
  setIsPlaying(false);
10327
10782
  setIsPaused(true);
10328
10783
  }
10329
10784
  }, [isPlaying]);
10330
- const toggleAudio = (0, import_react7.useCallback)(() => {
10785
+ const toggleAudio = (0, import_react9.useCallback)(() => {
10331
10786
  if (isPlaying) {
10332
10787
  pauseAudio();
10333
10788
  } else {
10334
10789
  playAudio();
10335
10790
  }
10336
10791
  }, [isPlaying, playAudio, pauseAudio]);
10337
- (0, import_react7.useEffect)(() => {
10792
+ (0, import_react9.useEffect)(() => {
10338
10793
  setIsTTSAvailable(false);
10339
10794
  setTtsAudioUrls(null);
10340
10795
  stopAudio();
@@ -10365,7 +10820,7 @@ var RedactoNoticeAssisted = ({
10365
10820
  baseUrl,
10366
10821
  stopAudio
10367
10822
  ]);
10368
- (0, import_react7.useEffect)(() => {
10823
+ (0, import_react9.useEffect)(() => {
10369
10824
  var _a;
10370
10825
  if (!isPlaying || !content || audioSequence.length === 0) return;
10371
10826
  const currentIndex = currentAudioIndex;
@@ -10384,7 +10839,7 @@ var RedactoNoticeAssisted = ({
10384
10839
  audioOffset += totalPurposeAudioCount;
10385
10840
  }
10386
10841
  }, [isPlaying, currentAudioIndex, audioSequence, content, collapsedPurposes]);
10387
- (0, import_react7.useEffect)(() => {
10842
+ (0, import_react9.useEffect)(() => {
10388
10843
  const removeAllHighlights = () => {
10389
10844
  document.querySelectorAll(".redacto-tts-highlight").forEach((el) => {
10390
10845
  el.classList.remove("redacto-tts-highlight");
@@ -10415,7 +10870,7 @@ var RedactoNoticeAssisted = ({
10415
10870
  removeAllHighlights();
10416
10871
  };
10417
10872
  }, [highlightedElementId, isPlaying]);
10418
- const handleConfirmStep = (0, import_react7.useCallback)(
10873
+ const handleConfirmStep = (0, import_react9.useCallback)(
10419
10874
  (mode = "selected") => {
10420
10875
  if (mode !== "selected" && content) {
10421
10876
  const selection = buildSelectionForMode(
@@ -10440,15 +10895,15 @@ var RedactoNoticeAssisted = ({
10440
10895
  },
10441
10896
  [content, selectedPurposes, selectedDataElements, verifyMethod, stopAudio]
10442
10897
  );
10443
- const handleAcceptAll = (0, import_react7.useCallback)(
10898
+ const handleAcceptAll = (0, import_react9.useCallback)(
10444
10899
  () => handleConfirmStep("all"),
10445
10900
  [handleConfirmStep]
10446
10901
  );
10447
- const handleAcceptSelected = (0, import_react7.useCallback)(
10902
+ const handleAcceptSelected = (0, import_react9.useCallback)(
10448
10903
  () => handleConfirmStep("selected"),
10449
10904
  [handleConfirmStep]
10450
10905
  );
10451
- const handleEditSelections = (0, import_react7.useCallback)(() => {
10906
+ const handleEditSelections = (0, import_react9.useCallback)(() => {
10452
10907
  setAcceptMode("selected");
10453
10908
  setStep("notice");
10454
10909
  setOtpSent(false);
@@ -10462,7 +10917,7 @@ var RedactoNoticeAssisted = ({
10462
10917
  }, []);
10463
10918
  const otpRecipient = verifyMethod === "email" ? email.trim() : `${ASSISTED_CONFIG.dialCode}${mobile}`;
10464
10919
  const otpChannel = verifyMethod === "email" ? ASSISTED_CONFIG.emailChannel : ASSISTED_CONFIG.channel;
10465
- const sendOtp = (0, import_react7.useCallback)(async () => {
10920
+ const sendOtp = (0, import_react9.useCallback)(async () => {
10466
10921
  setCreateError(null);
10467
10922
  setIsSendingOtp(true);
10468
10923
  try {
@@ -10488,11 +10943,11 @@ var RedactoNoticeAssisted = ({
10488
10943
  setIsSendingOtp(false);
10489
10944
  }
10490
10945
  }, [organisationUuid, workspaceUuid, otpRecipient, otpChannel, baseUrl, ts]);
10491
- const handleGetOtp = (0, import_react7.useCallback)(() => {
10946
+ const handleGetOtp = (0, import_react9.useCallback)(() => {
10492
10947
  if (!isContactValid || isSendingOtp) return;
10493
10948
  void sendOtp();
10494
10949
  }, [isContactValid, isSendingOtp, sendOtp]);
10495
- const handleSelectMethod = (0, import_react7.useCallback)(
10950
+ const handleSelectMethod = (0, import_react9.useCallback)(
10496
10951
  (method) => {
10497
10952
  if (otpSent || isSendingOtp) return;
10498
10953
  setVerifyMethod(method);
@@ -10504,11 +10959,11 @@ var RedactoNoticeAssisted = ({
10504
10959
  },
10505
10960
  [otpSent, isSendingOtp]
10506
10961
  );
10507
- const handleResend = (0, import_react7.useCallback)(() => {
10962
+ const handleResend = (0, import_react9.useCallback)(() => {
10508
10963
  if (isSendingOtp) return;
10509
10964
  void sendOtp();
10510
10965
  }, [isSendingOtp, sendOtp]);
10511
- const handleChangeContact = (0, import_react7.useCallback)(() => {
10966
+ const handleChangeContact = (0, import_react9.useCallback)(() => {
10512
10967
  setOtpSent(false);
10513
10968
  setOtpUuid("");
10514
10969
  setOtpDigits(Array.from({ length: ASSISTED_CONFIG.otpLength }, () => ""));
@@ -10520,7 +10975,7 @@ var RedactoNoticeAssisted = ({
10520
10975
  (_a = (verifyMethod === "email" ? emailInputRef : mobileInputRef).current) == null ? void 0 : _a.focus();
10521
10976
  }, 0);
10522
10977
  }, [verifyMethod]);
10523
- const handleOtpChange = (0, import_react7.useCallback)((index, raw) => {
10978
+ const handleOtpChange = (0, import_react9.useCallback)((index, raw) => {
10524
10979
  var _a;
10525
10980
  const digit = raw.replace(/\D/g, "").slice(-1);
10526
10981
  setOtpDigits((prev) => {
@@ -10532,7 +10987,7 @@ var RedactoNoticeAssisted = ({
10532
10987
  (_a = otpInputRefs.current[index + 1]) == null ? void 0 : _a.focus();
10533
10988
  }
10534
10989
  }, []);
10535
- const handleOtpKeyDown = (0, import_react7.useCallback)(
10990
+ const handleOtpKeyDown = (0, import_react9.useCallback)(
10536
10991
  (index, e) => {
10537
10992
  var _a;
10538
10993
  if (e.key === "Backspace" && !otpDigits[index] && index > 0) {
@@ -10541,7 +10996,7 @@ var RedactoNoticeAssisted = ({
10541
10996
  },
10542
10997
  [otpDigits]
10543
10998
  );
10544
- const handleOtpPaste = (0, import_react7.useCallback)((e) => {
10999
+ const handleOtpPaste = (0, import_react9.useCallback)((e) => {
10545
11000
  var _a;
10546
11001
  const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, ASSISTED_CONFIG.otpLength);
10547
11002
  if (!pasted) return;
@@ -10558,7 +11013,7 @@ var RedactoNoticeAssisted = ({
10558
11013
  const focusIndex = Math.min(pasted.length, ASSISTED_CONFIG.otpLength - 1);
10559
11014
  (_a = otpInputRefs.current[focusIndex]) == null ? void 0 : _a.focus();
10560
11015
  }, []);
10561
- const resetFlow = (0, import_react7.useCallback)(() => {
11016
+ const resetFlow = (0, import_react9.useCallback)(() => {
10562
11017
  var _a;
10563
11018
  setStep("notice");
10564
11019
  const preselection = buildPreselection(
@@ -10577,7 +11032,7 @@ var RedactoNoticeAssisted = ({
10577
11032
  setCreateError(null);
10578
11033
  setOtpError(null);
10579
11034
  }, [content]);
10580
- const handleSuccess = (0, import_react7.useCallback)(() => {
11035
+ const handleSuccess = (0, import_react9.useCallback)(() => {
10581
11036
  if (onComplete) {
10582
11037
  onComplete();
10583
11038
  return;
@@ -10585,7 +11040,7 @@ var RedactoNoticeAssisted = ({
10585
11040
  console.log("[RedactoNoticeAssisted] consent recorded");
10586
11041
  resetFlow();
10587
11042
  }, [onComplete, resetFlow]);
10588
- const handleConfirm = (0, import_react7.useCallback)(async () => {
11043
+ const handleConfirm = (0, import_react9.useCallback)(async () => {
10589
11044
  if (!isOtpComplete || isVerifying || !content) return;
10590
11045
  setOtpError(null);
10591
11046
  setIsVerifying(true);
@@ -10678,7 +11133,7 @@ var RedactoNoticeAssisted = ({
10678
11133
  handleSuccess,
10679
11134
  ts
10680
11135
  ]);
10681
- const handleDecline = (0, import_react7.useCallback)(() => {
11136
+ const handleDecline = (0, import_react9.useCallback)(() => {
10682
11137
  if (onDecline) {
10683
11138
  onDecline();
10684
11139
  return;
@@ -10691,7 +11146,7 @@ var RedactoNoticeAssisted = ({
10691
11146
  (content == null ? void 0 : content.notice_banner_heading) || "Privacy Notice"
10692
11147
  );
10693
11148
  const renderHeader = () => {
10694
- const logoNode = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11149
+ const logoNode = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10695
11150
  "img",
10696
11151
  {
10697
11152
  style: { ...styles3.logo, ...responsive.logo },
@@ -10699,7 +11154,7 @@ var RedactoNoticeAssisted = ({
10699
11154
  alt: ts("logoAlt")
10700
11155
  }
10701
11156
  );
10702
- const titleNode = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11157
+ const titleNode = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10703
11158
  "h2",
10704
11159
  {
10705
11160
  id: "privacy-notice-title",
@@ -10707,9 +11162,9 @@ var RedactoNoticeAssisted = ({
10707
11162
  children: noticeTitle
10708
11163
  }
10709
11164
  );
10710
- const controlsBlock = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.languageSelectorContainer, ref: languageContainerRef, children: [
10711
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
10712
- isTTSAvailable && step === "notice" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11165
+ const controlsBlock = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.languageSelectorContainer, ref: languageContainerRef, children: [
11166
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
11167
+ isTTSAvailable && step === "notice" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10713
11168
  "button",
10714
11169
  {
10715
11170
  type: "button",
@@ -10724,7 +11179,7 @@ var RedactoNoticeAssisted = ({
10724
11179
  },
10725
11180
  "aria-label": isPlaying && !isPaused ? ts("audioPause") : ts("audioStart"),
10726
11181
  title: isPlaying && !isPaused ? ts("talkbackPause") : ts("talkbackStart"),
10727
- children: isPlaying && !isPaused ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11182
+ children: isPlaying && !isPaused ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
10728
11183
  "svg",
10729
11184
  {
10730
11185
  xmlns: "http://www.w3.org/2000/svg",
@@ -10738,11 +11193,11 @@ var RedactoNoticeAssisted = ({
10738
11193
  strokeLinejoin: "round",
10739
11194
  "aria-hidden": "true",
10740
11195
  children: [
10741
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "6", y: "4", width: "4", height: "16" }),
10742
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "14", y: "4", width: "4", height: "16" })
11196
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "6", y: "4", width: "4", height: "16" }),
11197
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "14", y: "4", width: "4", height: "16" })
10743
11198
  ]
10744
11199
  }
10745
- ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11200
+ ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
10746
11201
  "svg",
10747
11202
  {
10748
11203
  xmlns: "http://www.w3.org/2000/svg",
@@ -10756,14 +11211,14 @@ var RedactoNoticeAssisted = ({
10756
11211
  strokeLinejoin: "round",
10757
11212
  "aria-hidden": "true",
10758
11213
  children: [
10759
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
10760
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07" })
11214
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
11215
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07" })
10761
11216
  ]
10762
11217
  }
10763
11218
  )
10764
11219
  }
10765
11220
  ),
10766
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11221
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
10767
11222
  "button",
10768
11223
  {
10769
11224
  type: "button",
@@ -10777,7 +11232,7 @@ var RedactoNoticeAssisted = ({
10777
11232
  }),
10778
11233
  children: [
10779
11234
  toNativeLabel(selectedLanguage),
10780
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11235
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10781
11236
  "svg",
10782
11237
  {
10783
11238
  xmlns: "http://www.w3.org/2000/svg",
@@ -10791,21 +11246,21 @@ var RedactoNoticeAssisted = ({
10791
11246
  strokeLinejoin: "round",
10792
11247
  style: { flexShrink: 0, marginLeft: "4px" },
10793
11248
  "aria-hidden": "true",
10794
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M4 6l4 4 4-4" })
11249
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M4 6l4 4 4-4" })
10795
11250
  }
10796
11251
  )
10797
11252
  ]
10798
11253
  }
10799
11254
  ) })
10800
11255
  ] }),
10801
- isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11256
+ isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10802
11257
  "ul",
10803
11258
  {
10804
11259
  id: "redacto-assisted-language-listbox",
10805
11260
  style: styles3.languageDropdown,
10806
11261
  role: "listbox",
10807
11262
  "aria-label": ts("selectLanguage"),
10808
- children: availableLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11263
+ children: availableLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10809
11264
  "li",
10810
11265
  {
10811
11266
  style: {
@@ -10825,8 +11280,8 @@ var RedactoNoticeAssisted = ({
10825
11280
  }
10826
11281
  )
10827
11282
  ] });
10828
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { ...styles3.topSection, ...responsive.topSection }, children: isMobile ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10829
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11283
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { ...styles3.topSection, ...responsive.topSection }, children: isMobile ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11284
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
10830
11285
  "div",
10831
11286
  {
10832
11287
  style: {
@@ -10837,7 +11292,7 @@ var RedactoNoticeAssisted = ({
10837
11292
  },
10838
11293
  children: [
10839
11294
  logoNode,
10840
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11295
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10841
11296
  "div",
10842
11297
  {
10843
11298
  style: {
@@ -10853,8 +11308,8 @@ var RedactoNoticeAssisted = ({
10853
11308
  }
10854
11309
  ),
10855
11310
  titleNode
10856
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10857
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.topLeft, children: [
11311
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11312
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.topLeft, children: [
10858
11313
  logoNode,
10859
11314
  titleNode
10860
11315
  ] }),
@@ -10865,7 +11320,7 @@ var RedactoNoticeAssisted = ({
10865
11320
  if (!content) return null;
10866
11321
  const dpoInfo = content.dpo_info;
10867
11322
  if (!content.privacy_center_url && !dpoInfo) return null;
10868
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11323
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10869
11324
  "div",
10870
11325
  {
10871
11326
  style: {
@@ -10877,14 +11332,14 @@ var RedactoNoticeAssisted = ({
10877
11332
  paddingTop: "12px",
10878
11333
  marginTop: "12px"
10879
11334
  },
10880
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { margin: 0, opacity: 0.6 }, children: [
10881
- content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10882
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "additional-text", children: getTranslatedText(
11335
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { style: { margin: 0, opacity: 0.6 }, children: [
11336
+ content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11337
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: "additional-text", children: getTranslatedText(
10883
11338
  "additional_text",
10884
11339
  content.additional_text || "Manage or withdraw consent anytime at"
10885
11340
  ) }),
10886
11341
  " ",
10887
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11342
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10888
11343
  "a",
10889
11344
  {
10890
11345
  id: "privacy-center-link",
@@ -10900,11 +11355,11 @@ var RedactoNoticeAssisted = ({
10900
11355
  ),
10901
11356
  "."
10902
11357
  ] }),
10903
- dpoInfo && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10904
- content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
10905
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-grievance-text", children: getTranslatedDpoText("grievance_text", dpoInfo.grievance_text) }),
11358
+ dpoInfo && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11359
+ content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("br", {}),
11360
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: "dpo-grievance-text", children: getTranslatedDpoText("grievance_text", dpoInfo.grievance_text) }),
10906
11361
  " ",
10907
- dpoInfo.grievance_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11362
+ dpoInfo.grievance_url && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10908
11363
  "a",
10909
11364
  {
10910
11365
  id: "dpo-grievance-link",
@@ -10919,13 +11374,13 @@ var RedactoNoticeAssisted = ({
10919
11374
  }
10920
11375
  ),
10921
11376
  " ",
10922
- dpoInfo.grievance_email && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10923
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
11377
+ dpoInfo.grievance_email && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11378
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
10924
11379
  "grievance_email_connector_text",
10925
11380
  dpoInfo.grievance_email_connector_text || "or email to"
10926
11381
  ) }),
10927
11382
  " ",
10928
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11383
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10929
11384
  "a",
10930
11385
  {
10931
11386
  id: "dpo-grievance-email",
@@ -10935,10 +11390,10 @@ var RedactoNoticeAssisted = ({
10935
11390
  }
10936
11391
  )
10937
11392
  ] }),
10938
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
10939
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText("dp_board_text", dpoInfo.dp_board_text) }),
11393
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("br", {}),
11394
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText("dp_board_text", dpoInfo.dp_board_text) }),
10940
11395
  " ",
10941
- dpoInfo.dp_board_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11396
+ dpoInfo.dp_board_url && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10942
11397
  "a",
10943
11398
  {
10944
11399
  id: "dpo-dp-board-link",
@@ -10952,10 +11407,10 @@ var RedactoNoticeAssisted = ({
10952
11407
  )
10953
11408
  }
10954
11409
  ),
10955
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
10956
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-dpo-text", children: getTranslatedDpoText("dpo_text", dpoInfo.dpo_text) }),
11410
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("br", {}),
11411
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: "dpo-dpo-text", children: getTranslatedDpoText("dpo_text", dpoInfo.dpo_text) }),
10957
11412
  " ",
10958
- dpoInfo.dpo_email && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11413
+ dpoInfo.dpo_email && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10959
11414
  "a",
10960
11415
  {
10961
11416
  id: "dpo-dpo-link",
@@ -10974,17 +11429,17 @@ var RedactoNoticeAssisted = ({
10974
11429
  };
10975
11430
  const renderNoticeScreen = (locked) => {
10976
11431
  if (!content) return null;
10977
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10978
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { ...styles3.privacyText, ...responsive.privacyText }, children: [
10979
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "privacy-notice-text", children: getTranslatedText("notice_text", content.notice_text) }),
10980
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
10981
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
10982
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "privacy-policy-text", children: getTranslatedText(
11432
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11433
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { style: { ...styles3.privacyText, ...responsive.privacyText }, children: [
11434
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: "privacy-notice-text", children: getTranslatedText("notice_text", content.notice_text) }),
11435
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("br", {}),
11436
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
11437
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { id: "privacy-policy-text", children: getTranslatedText(
10983
11438
  "privacy_policy_prefix_text",
10984
11439
  content.privacy_policy_prefix_text || ""
10985
11440
  ) }),
10986
11441
  " ",
10987
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11442
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
10988
11443
  "a",
10989
11444
  {
10990
11445
  id: "privacy-policy-link",
@@ -11004,7 +11459,7 @@ var RedactoNoticeAssisted = ({
11004
11459
  )
11005
11460
  ] })
11006
11461
  ] }),
11007
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11462
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11008
11463
  "h2",
11009
11464
  {
11010
11465
  id: "purpose-section-heading",
@@ -11015,7 +11470,7 @@ var RedactoNoticeAssisted = ({
11015
11470
  )
11016
11471
  }
11017
11472
  ),
11018
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11473
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11019
11474
  "div",
11020
11475
  {
11021
11476
  style: {
@@ -11023,7 +11478,7 @@ var RedactoNoticeAssisted = ({
11023
11478
  ...locked ? styles3.lockedOptions : null
11024
11479
  },
11025
11480
  "aria-disabled": locked || void 0,
11026
- children: content.purposes.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11481
+ children: content.purposes.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11027
11482
  PurposeItem2,
11028
11483
  {
11029
11484
  purpose,
@@ -11045,19 +11500,19 @@ var RedactoNoticeAssisted = ({
11045
11500
  renderDpoFooter()
11046
11501
  ] });
11047
11502
  };
11048
- const renderVerifyBlock = () => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11503
+ const renderVerifyBlock = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
11049
11504
  "div",
11050
11505
  {
11051
11506
  ref: verifyBlockRef,
11052
11507
  className: "redacto-assisted-reveal",
11053
11508
  style: styles3.verifyPanel,
11054
11509
  children: [
11055
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.verifyPanelHeader, children: [
11056
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: styles3.verifyPanelTitle, children: [
11057
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LockIcon, { size: 15, color: primaryColor }),
11510
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.verifyPanelHeader, children: [
11511
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { style: styles3.verifyPanelTitle, children: [
11512
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LockIcon, { size: 15, color: primaryColor }),
11058
11513
  ts("verifyWithOtp")
11059
11514
  ] }),
11060
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11515
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11061
11516
  "button",
11062
11517
  {
11063
11518
  type: "button",
@@ -11068,20 +11523,20 @@ var RedactoNoticeAssisted = ({
11068
11523
  }
11069
11524
  )
11070
11525
  ] }),
11071
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.phoneFieldWrap, children: [
11072
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.fieldLabelRow, children: [
11073
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11526
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.phoneFieldWrap, children: [
11527
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.fieldLabelRow, children: [
11528
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
11074
11529
  "label",
11075
11530
  {
11076
11531
  htmlFor: verifyMethod === "email" ? "redacto-assisted-email" : "redacto-assisted-mobile",
11077
11532
  style: styles3.fieldLabelWithIcon,
11078
11533
  children: [
11079
- verifyMethod === "email" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MailIcon, { size: 14, color: "#475467" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PhoneIcon, { size: 14, color: "#475467" }),
11534
+ verifyMethod === "email" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MailIcon, { size: 14, color: "#475467" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PhoneIcon, { size: 14, color: "#475467" }),
11080
11535
  verifyMethod === "email" ? ts("emailAddress") : ts("mobileNumber")
11081
11536
  ]
11082
11537
  }
11083
11538
  ),
11084
- !otpSent && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11539
+ !otpSent && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
11085
11540
  "button",
11086
11541
  {
11087
11542
  type: "button",
@@ -11092,20 +11547,20 @@ var RedactoNoticeAssisted = ({
11092
11547
  ),
11093
11548
  disabled: isSendingOtp,
11094
11549
  children: [
11095
- verifyMethod === "email" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PhoneIcon, { size: 14, color: primaryColor }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MailIcon, { size: 14, color: primaryColor }),
11550
+ verifyMethod === "email" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PhoneIcon, { size: 14, color: primaryColor }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MailIcon, { size: 14, color: primaryColor }),
11096
11551
  verifyMethod === "email" ? ts("useMobileInstead") : ts("useEmailInstead")
11097
11552
  ]
11098
11553
  }
11099
11554
  )
11100
11555
  ] }),
11101
- verifyMethod === "mobile" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11556
+ verifyMethod === "mobile" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
11102
11557
  "div",
11103
11558
  {
11104
11559
  className: "redacto-assisted-phone-field",
11105
11560
  style: styles3.phoneField,
11106
11561
  children: [
11107
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: styles3.phonePrefix, children: ASSISTED_CONFIG.dialCode }),
11108
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11562
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { style: styles3.phonePrefix, children: ASSISTED_CONFIG.dialCode }),
11563
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11109
11564
  "input",
11110
11565
  {
11111
11566
  id: "redacto-assisted-mobile",
@@ -11123,12 +11578,12 @@ var RedactoNoticeAssisted = ({
11123
11578
  )
11124
11579
  ]
11125
11580
  }
11126
- ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11581
+ ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11127
11582
  "div",
11128
11583
  {
11129
11584
  className: "redacto-assisted-phone-field",
11130
11585
  style: styles3.phoneField,
11131
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11586
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11132
11587
  "input",
11133
11588
  {
11134
11589
  id: "redacto-assisted-email",
@@ -11146,15 +11601,15 @@ var RedactoNoticeAssisted = ({
11146
11601
  )
11147
11602
  }
11148
11603
  ),
11149
- !otpSent ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.helperText, children: verifyMethod === "email" ? ts("otpHelperEmail") : ts("otpHelper") }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.otpStatusRow, children: [
11150
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: styles3.otpSentText, children: [
11151
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CheckIcon, { size: 15, color: "#10B981" }),
11604
+ !otpSent ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles3.helperText, children: verifyMethod === "email" ? ts("otpHelperEmail") : ts("otpHelper") }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.otpStatusRow, children: [
11605
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { style: styles3.otpSentText, children: [
11606
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CheckIcon, { size: 15, color: "#10B981" }),
11152
11607
  " ",
11153
11608
  ts("otpSentTo"),
11154
11609
  " ",
11155
11610
  verifyMethod === "email" ? email : `${ASSISTED_CONFIG.dialCode} ${mobile}`
11156
11611
  ] }),
11157
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11612
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11158
11613
  "button",
11159
11614
  {
11160
11615
  type: "button",
@@ -11165,15 +11620,15 @@ var RedactoNoticeAssisted = ({
11165
11620
  }
11166
11621
  )
11167
11622
  ] }),
11168
- createError && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.fieldError, role: "alert", children: createError }),
11169
- otpSent && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11623
+ createError && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles3.fieldError, role: "alert", children: createError }),
11624
+ otpSent && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
11170
11625
  "div",
11171
11626
  {
11172
11627
  ref: otpSectionRef,
11173
11628
  style: { display: "flex", flexDirection: "column", gap: "12px" },
11174
11629
  children: [
11175
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.centerLabel, children: ts("enterNDigitOtp", { count: ASSISTED_CONFIG.otpLength }) }),
11176
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles3.otpRow, children: otpDigits.map((digit, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11630
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles3.centerLabel, children: ts("enterNDigitOtp", { count: ASSISTED_CONFIG.otpLength }) }),
11631
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: styles3.otpRow, children: otpDigits.map((digit, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11177
11632
  "input",
11178
11633
  {
11179
11634
  ref: (el) => {
@@ -11203,11 +11658,11 @@ var RedactoNoticeAssisted = ({
11203
11658
  },
11204
11659
  index
11205
11660
  )) }),
11206
- otpError && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.fieldError, role: "alert", children: otpError }),
11207
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.resendText, children: resendCountdown > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
11208
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ClockIcon, {}),
11661
+ otpError && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles3.fieldError, role: "alert", children: otpError }),
11662
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles3.resendText, children: resendCountdown > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11663
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ClockIcon, {}),
11209
11664
  ts("resendIn", { seconds: resendCountdown })
11210
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11665
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11211
11666
  "button",
11212
11667
  {
11213
11668
  type: "button",
@@ -11253,7 +11708,7 @@ var RedactoNoticeAssisted = ({
11253
11708
  ...isVerify ? {} : widthStyle,
11254
11709
  backgroundColor: primaryColor
11255
11710
  };
11256
- const acceptAllButton = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11711
+ const acceptAllButton = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11257
11712
  "button",
11258
11713
  {
11259
11714
  type: "button",
@@ -11267,7 +11722,7 @@ var RedactoNoticeAssisted = ({
11267
11722
  )
11268
11723
  }
11269
11724
  );
11270
- const primaryButton = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11725
+ const primaryButton = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11271
11726
  "button",
11272
11727
  {
11273
11728
  type: "button",
@@ -11288,7 +11743,7 @@ var RedactoNoticeAssisted = ({
11288
11743
  children: primaryLabel
11289
11744
  }
11290
11745
  );
11291
- const declineButton = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11746
+ const declineButton = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11292
11747
  "button",
11293
11748
  {
11294
11749
  type: "button",
@@ -11307,16 +11762,16 @@ var RedactoNoticeAssisted = ({
11307
11762
  }
11308
11763
  );
11309
11764
  if (isVerify) {
11310
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...styles3.bottomSection, ...responsive.bottomSection }, children: [
11765
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { ...styles3.bottomSection, ...responsive.bottomSection }, children: [
11311
11766
  primaryButton,
11312
11767
  declineButton
11313
11768
  ] });
11314
11769
  }
11315
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: isMobile ? styles3.actionButtonStack : styles3.actionButtonRow, children: isMobile ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
11770
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: isMobile ? styles3.actionButtonStack : styles3.actionButtonRow, children: isMobile ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11316
11771
  acceptAllButton,
11317
11772
  primaryButton,
11318
11773
  declineButton
11319
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
11774
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11320
11775
  declineButton,
11321
11776
  primaryButton,
11322
11777
  acceptAllButton
@@ -11324,13 +11779,13 @@ var RedactoNoticeAssisted = ({
11324
11779
  };
11325
11780
  const renderBody = () => {
11326
11781
  if (isLoading) {
11327
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles3.loadingWrap, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles3.loadingSpinner, "aria-label": ts("loadingNotice") }) });
11782
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: styles3.loadingWrap, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: styles3.loadingSpinner, "aria-label": ts("loadingNotice") }) });
11328
11783
  }
11329
11784
  if (fetchError || !content) {
11330
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.loadingWrap, children: [
11331
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.errorTitle, children: ts("loadFailedTitle") }),
11332
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.errorText, children: (fetchError == null ? void 0 : fetchError.message) || ts("tryAgain") }),
11333
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11785
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: styles3.loadingWrap, children: [
11786
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles3.errorTitle, children: ts("loadFailedTitle") }),
11787
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles3.errorText, children: (fetchError == null ? void 0 : fetchError.message) || ts("tryAgain") }),
11788
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11334
11789
  "button",
11335
11790
  {
11336
11791
  type: "button",
@@ -11342,16 +11797,16 @@ var RedactoNoticeAssisted = ({
11342
11797
  )
11343
11798
  ] });
11344
11799
  }
11345
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
11800
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
11346
11801
  renderHeader(),
11347
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...styles3.middleSection, ...responsive.middleSection }, children: [
11802
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { style: { ...styles3.middleSection, ...responsive.middleSection }, children: [
11348
11803
  renderNoticeScreen(step === "verify"),
11349
11804
  step === "verify" && renderVerifyBlock()
11350
11805
  ] }),
11351
11806
  renderFooter()
11352
11807
  ] });
11353
11808
  };
11354
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles3.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11809
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: styles3.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11355
11810
  "div",
11356
11811
  {
11357
11812
  ...NOTICE_FONT_ROOT_PROPS,
@@ -11364,7 +11819,7 @@ var RedactoNoticeAssisted = ({
11364
11819
  role: "dialog",
11365
11820
  "aria-modal": "true",
11366
11821
  "aria-label": noticeTitle,
11367
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles3.content, children: renderBody() })
11822
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: styles3.content, children: renderBody() })
11368
11823
  }
11369
11824
  ) });
11370
11825
  };
@@ -11386,7 +11841,7 @@ var scrollIntoViewSoft = (el) => {
11386
11841
  var ClockIcon = ({
11387
11842
  size = 13,
11388
11843
  color = "#667085"
11389
- }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11844
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
11390
11845
  "svg",
11391
11846
  {
11392
11847
  width: size,
@@ -11400,15 +11855,15 @@ var ClockIcon = ({
11400
11855
  "aria-hidden": "true",
11401
11856
  style: { flexShrink: 0 },
11402
11857
  children: [
11403
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
11404
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 7v5l3 2" })
11858
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
11859
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M12 7v5l3 2" })
11405
11860
  ]
11406
11861
  }
11407
11862
  );
11408
11863
  var LockIcon = ({
11409
11864
  size = 15,
11410
11865
  color = "#475467"
11411
- }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11866
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
11412
11867
  "svg",
11413
11868
  {
11414
11869
  width: size,
@@ -11422,15 +11877,15 @@ var LockIcon = ({
11422
11877
  "aria-hidden": "true",
11423
11878
  style: { flexShrink: 0 },
11424
11879
  children: [
11425
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2" }),
11426
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
11880
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2" }),
11881
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
11427
11882
  ]
11428
11883
  }
11429
11884
  );
11430
11885
  var CheckIcon = ({
11431
11886
  size = 16,
11432
11887
  color = "#10B981"
11433
- }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11888
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11434
11889
  "svg",
11435
11890
  {
11436
11891
  width: size,
@@ -11443,13 +11898,13 @@ var CheckIcon = ({
11443
11898
  strokeLinejoin: "round",
11444
11899
  "aria-hidden": "true",
11445
11900
  style: { flexShrink: 0 },
11446
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M20 6 9 17l-5-5" })
11901
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M20 6 9 17l-5-5" })
11447
11902
  }
11448
11903
  );
11449
11904
  var PhoneIcon = ({
11450
11905
  size = 14,
11451
11906
  color = "#475467"
11452
- }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11907
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11453
11908
  "svg",
11454
11909
  {
11455
11910
  width: size,
@@ -11462,13 +11917,13 @@ var PhoneIcon = ({
11462
11917
  strokeLinejoin: "round",
11463
11918
  "aria-hidden": "true",
11464
11919
  style: { flexShrink: 0 },
11465
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z" })
11920
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z" })
11466
11921
  }
11467
11922
  );
11468
11923
  var MailIcon = ({
11469
11924
  size = 14,
11470
11925
  color = "#475467"
11471
- }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11926
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
11472
11927
  "svg",
11473
11928
  {
11474
11929
  width: size,
@@ -11482,27 +11937,27 @@ var MailIcon = ({
11482
11937
  "aria-hidden": "true",
11483
11938
  style: { flexShrink: 0 },
11484
11939
  children: [
11485
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
11486
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "m22 7-10 5L2 7" })
11940
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
11941
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m22 7-10 5L2 7" })
11487
11942
  ]
11488
11943
  }
11489
11944
  );
11490
11945
 
11491
11946
  // src/RedactoNoticeConsent/components/DigiLockerCallback.tsx
11492
- var import_react8 = require("react");
11493
- var import_jsx_runtime6 = require("react/jsx-runtime");
11947
+ var import_react10 = require("react");
11948
+ var import_jsx_runtime8 = require("react/jsx-runtime");
11494
11949
  var DigiLockerCallback = ({
11495
11950
  accessToken: propAccessToken,
11496
11951
  baseUrl,
11497
11952
  onSuccess,
11498
11953
  onError
11499
11954
  }) => {
11500
- const [status, setStatus] = (0, import_react8.useState)("processing");
11501
- const [message, setMessage] = (0, import_react8.useState)("Verifying your guardian...");
11502
- const [errorDetail, setErrorDetail] = (0, import_react8.useState)(null);
11503
- const retryTimeoutRef = (0, import_react8.useRef)(null);
11504
- const redirectTimeoutRef = (0, import_react8.useRef)(null);
11505
- const isMountedRef = (0, import_react8.useRef)(true);
11955
+ const [status, setStatus] = (0, import_react10.useState)("processing");
11956
+ const [message, setMessage] = (0, import_react10.useState)("Verifying your guardian...");
11957
+ const [errorDetail, setErrorDetail] = (0, import_react10.useState)(null);
11958
+ const retryTimeoutRef = (0, import_react10.useRef)(null);
11959
+ const redirectTimeoutRef = (0, import_react10.useRef)(null);
11960
+ const isMountedRef = (0, import_react10.useRef)(true);
11506
11961
  const getErrorMessage = (errorCode) => {
11507
11962
  switch (errorCode) {
11508
11963
  case "GUARDIAN_UNDER_18":
@@ -11519,7 +11974,7 @@ var DigiLockerCallback = ({
11519
11974
  return "Verification failed. Please try again.";
11520
11975
  }
11521
11976
  };
11522
- const redirectToOriginalPage = (0, import_react8.useCallback)(
11977
+ const redirectToOriginalPage = (0, import_react10.useCallback)(
11523
11978
  (originalUrl, verificationResult, verificationReference) => {
11524
11979
  updateConsentState({
11525
11980
  verificationResult,
@@ -11532,7 +11987,7 @@ var DigiLockerCallback = ({
11532
11987
  },
11533
11988
  []
11534
11989
  );
11535
- const handleCallback = (0, import_react8.useCallback)(async () => {
11990
+ const handleCallback = (0, import_react10.useCallback)(async () => {
11536
11991
  var _a, _b;
11537
11992
  try {
11538
11993
  const params = new URLSearchParams(window.location.search);
@@ -11747,7 +12202,7 @@ var DigiLockerCallback = ({
11747
12202
  }
11748
12203
  }
11749
12204
  }, [propAccessToken, baseUrl, onSuccess, onError, redirectToOriginalPage]);
11750
- (0, import_react8.useEffect)(() => {
12205
+ (0, import_react10.useEffect)(() => {
11751
12206
  injectCheckboxStyles();
11752
12207
  handleCallback();
11753
12208
  return () => {
@@ -11756,7 +12211,7 @@ var DigiLockerCallback = ({
11756
12211
  if (redirectTimeoutRef.current) clearTimeout(redirectTimeoutRef.current);
11757
12212
  };
11758
12213
  }, [handleCallback]);
11759
- const handleRetry = (0, import_react8.useCallback)(() => {
12214
+ const handleRetry = (0, import_react10.useCallback)(() => {
11760
12215
  const persistedState = getConsentState();
11761
12216
  if (persistedState == null ? void 0 : persistedState.originalUrl) {
11762
12217
  clearConsentState();
@@ -11820,7 +12275,7 @@ var DigiLockerCallback = ({
11820
12275
  backgroundColor: "#fee2e2",
11821
12276
  color: "#dc2626"
11822
12277
  };
11823
- const titleStyle = {
12278
+ const titleStyle2 = {
11824
12279
  fontSize: "22px",
11825
12280
  fontWeight: 700,
11826
12281
  color: "#111827",
@@ -11850,7 +12305,7 @@ var DigiLockerCallback = ({
11850
12305
  lineHeight: 1.5,
11851
12306
  textAlign: "left"
11852
12307
  };
11853
- const buttonStyle = {
12308
+ const buttonStyle2 = {
11854
12309
  marginTop: "24px",
11855
12310
  padding: "12px 28px",
11856
12311
  backgroundColor: "#4f87ff",
@@ -11888,25 +12343,25 @@ var DigiLockerCallback = ({
11888
12343
  transform: translateY(0);
11889
12344
  }
11890
12345
  `;
11891
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11892
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("style", { dangerouslySetInnerHTML: { __html: keyframesStyle } }),
11893
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: cardStyle, children: [
11894
- status === "processing" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11895
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: spinnerContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: spinnerStyle }) }),
11896
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { style: titleStyle, children: "Processing Verification" }),
11897
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: messageStyle, children: message }),
11898
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: subtextStyle, children: "Please wait while we verify your guardian's identity..." })
12346
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
12347
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("style", { dangerouslySetInnerHTML: { __html: keyframesStyle } }),
12348
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: cardStyle, children: [
12349
+ status === "processing" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
12350
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: spinnerContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: spinnerStyle }) }),
12351
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { style: titleStyle2, children: "Processing Verification" }),
12352
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: messageStyle, children: message }),
12353
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: subtextStyle, children: "Please wait while we verify your guardian's identity..." })
11899
12354
  ] }),
11900
- status === "success" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11901
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { position: "relative", width: "72px", height: "72px", margin: "0 auto 28px" }, children: [
11902
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: {
12355
+ status === "success" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
12356
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { position: "relative", width: "72px", height: "72px", margin: "0 auto 28px" }, children: [
12357
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: {
11903
12358
  position: "absolute",
11904
12359
  inset: "-8px",
11905
12360
  borderRadius: "50%",
11906
12361
  border: "2px solid #d1fae5",
11907
12362
  animation: "redacto-dl-pulse 1.5s ease-out infinite"
11908
12363
  } }),
11909
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: successIconStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12364
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: successIconStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
11910
12365
  "svg",
11911
12366
  {
11912
12367
  width: "30",
@@ -11918,16 +12373,16 @@ var DigiLockerCallback = ({
11918
12373
  strokeLinecap: "round",
11919
12374
  strokeLinejoin: "round",
11920
12375
  style: { strokeDasharray: 24, animation: "redacto-dl-check 0.4s ease-out 0.3s forwards", strokeDashoffset: 24 },
11921
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("polyline", { points: "20 6 9 17 4 12" })
12376
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("polyline", { points: "20 6 9 17 4 12" })
11922
12377
  }
11923
12378
  ) })
11924
12379
  ] }),
11925
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { style: titleStyle, children: "Verification Successful" }),
11926
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: messageStyle, children: message }),
11927
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: subtextStyle, children: "You will be redirected automatically." })
12380
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { style: titleStyle2, children: "Verification Successful" }),
12381
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: messageStyle, children: message }),
12382
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: subtextStyle, children: "You will be redirected automatically." })
11928
12383
  ] }),
11929
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11930
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: errorIconStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
12384
+ status === "error" && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
12385
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: errorIconStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
11931
12386
  "svg",
11932
12387
  {
11933
12388
  width: "30",
@@ -11939,19 +12394,19 @@ var DigiLockerCallback = ({
11939
12394
  strokeLinecap: "round",
11940
12395
  strokeLinejoin: "round",
11941
12396
  children: [
11942
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
11943
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
12397
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
12398
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
11944
12399
  ]
11945
12400
  }
11946
12401
  ) }),
11947
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { style: titleStyle, children: "Verification Failed" }),
11948
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: messageStyle, children: message }),
11949
- errorDetail && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: errorDetailStyle, children: errorDetail }),
11950
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12402
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { style: titleStyle2, children: "Verification Failed" }),
12403
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: messageStyle, children: message }),
12404
+ errorDetail && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: errorDetailStyle, children: errorDetail }),
12405
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
11951
12406
  "button",
11952
12407
  {
11953
12408
  className: "redacto-dl-retry-btn",
11954
- style: buttonStyle,
12409
+ style: buttonStyle2,
11955
12410
  onClick: handleRetry,
11956
12411
  children: "Try Again"
11957
12412
  }