@redacto.io/consent-sdk-react 10.0.0 → 10.1.0-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
@@ -634,6 +634,15 @@ var redacto_logo_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATkAAA
634
634
 
635
635
  // src/RedactoNoticeConsent/constants.ts
636
636
  var DEFAULT_LOGO_POSITION = "left";
637
+ var DEFAULT_PURPOSE_PRESELECTION = "NONE";
638
+ var PURPOSE_STATUS_INACTIVE = "INACTIVE";
639
+ var DEFAULT_ACCEPT_ALL_BUTTON_TEXT = "Accept All";
640
+ var DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT = "Accept Selected";
641
+ var DEFAULT_DECLINE_BUTTON_TEXT = "Decline";
642
+ var ACCEPT_ALL_BUTTON_ID = "accept-all-button-text";
643
+ var ACCEPT_SELECTED_BUTTON_ID = "confirm-button-text";
644
+ var DECLINE_BUTTON_ID = "decline-button-text";
645
+ var SUBMITTING_BUTTON_TEXT = "Processing...";
637
646
  var LOGO_POSITION_JUSTIFY = {
638
647
  left: "flex-start",
639
648
  center: "center",
@@ -641,583 +650,84 @@ var LOGO_POSITION_JUSTIFY = {
641
650
  };
642
651
  var DPO_AUDIO_ELEMENT_MAP = [
643
652
  { audioKey: "grievance_text_audio_url", elementId: "dpo-grievance-text" },
644
- { audioKey: "grievance_anchor_text_audio_url", elementId: "dpo-grievance-link" },
645
- { audioKey: "grievance_email_connector_text_audio_url", elementId: "dpo-grievance-email-connector" },
653
+ {
654
+ audioKey: "grievance_anchor_text_audio_url",
655
+ elementId: "dpo-grievance-link"
656
+ },
657
+ {
658
+ audioKey: "grievance_email_connector_text_audio_url",
659
+ elementId: "dpo-grievance-email-connector"
660
+ },
646
661
  { audioKey: "grievance_email_audio_url", elementId: "dpo-grievance-email" },
647
662
  { audioKey: "dp_board_text_audio_url", elementId: "dpo-dp-board-text" },
648
- { audioKey: "dp_board_anchor_text_audio_url", elementId: "dpo-dp-board-link" },
663
+ {
664
+ audioKey: "dp_board_anchor_text_audio_url",
665
+ elementId: "dpo-dp-board-link"
666
+ },
649
667
  { audioKey: "dpo_text_audio_url", elementId: "dpo-dpo-text" },
650
668
  { audioKey: "dpo_anchor_text_audio_url", elementId: "dpo-dpo-link" }
651
669
  ];
652
670
 
653
- // src/RedactoNoticeConsent/layout.ts
654
- var resolveLogoPosition = (raw) => raw === "center" || raw === "right" ? raw : DEFAULT_LOGO_POSITION;
655
- var logoRowJustify = (position) => LOGO_POSITION_JUSTIFY[position];
656
-
657
- // src/RedactoNoticeConsent/language-codes.ts
658
- var LANGUAGE_NATIVE_LABELS = {
659
- English: "English",
660
- Assamese: "\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE (Assamese)",
661
- Bengali: "\u09AC\u09BE\u0982\u09B2\u09BE (Bengali)",
662
- Bodo: "\u092C\u0921\u093C\u094B (Bodo)",
663
- Dogri: "\u0921\u094B\u0917\u0930\u0940 (Dogri)",
664
- Gujarati: "\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0 (Gujarati)",
665
- Hindi: "\u0939\u093F\u0928\u094D\u0926\u0940 (Hindi)",
666
- Kannada: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1 (Kannada)",
667
- Kashmiri: "\u0643\u0672\u0634\u064F\u0631 (Kashmiri)",
668
- "Goan Konkani": "\u0915\u094B\u0902\u0915\u0923\u0940 (Goan Konkani)",
669
- Maithili: "\u092E\u0948\u0925\u093F\u0932\u0940 (Maithili)",
670
- Malayalam: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02 (Malayalam)",
671
- Manipuri: "\uABC3\uABE9\uABC7\uABE9\uABC2\uABE3\uABDF (Manipuri)",
672
- Marathi: "\u092E\u0930\u093E\u0920\u0940 (Marathi)",
673
- Nepali: "\u0928\u0947\u092A\u093E\u0932\u0940 (Nepali)",
674
- Odia: "\u0B13\u0B21\u0B3C\u0B3F\u0B06 (Odia)",
675
- Punjabi: "\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40 (Punjabi)",
676
- Sanskrit: "\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D (Sanskrit)",
677
- Santali: "\u1C65\u1C5F\u1C71\u1C5B\u1C5F\u1C72\u1C64 (Santali)",
678
- Sindhi: "\u0633\u0646\u068C\u064A (Sindhi)",
679
- Tamil: "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD (Tamil)",
680
- Telugu: "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41 (Telugu)",
681
- Urdu: "\u0627\u0631\u062F\u0648 (Urdu)"
682
- };
683
- var toNativeLabel = (name) => {
684
- var _a;
685
- return (_a = LANGUAGE_NATIVE_LABELS[name]) != null ? _a : name;
686
- };
687
- var LANGUAGE_NAME_TO_BCP47 = {
688
- English: "en",
689
- Assamese: "as",
690
- Bengali: "bn",
691
- Bodo: "brx",
692
- Dogri: "doi",
693
- Gujarati: "gu",
694
- Hindi: "hi",
695
- Kannada: "kn",
696
- Kashmiri: "ks",
697
- "Goan Konkani": "gom",
698
- Maithili: "mai",
699
- Malayalam: "ml",
700
- Manipuri: "mni-Mtei",
701
- Marathi: "mr",
702
- Nepali: "ne",
703
- Odia: "or",
704
- Punjabi: "pa",
705
- Sanskrit: "sa",
706
- Santali: "sat",
707
- Sindhi: "sd",
708
- Tamil: "ta",
709
- Telugu: "te",
710
- Urdu: "ur"
711
- };
712
- var KNOWN_BCP47_CODES = new Set(Object.values(LANGUAGE_NAME_TO_BCP47));
713
- var toBcp47Code = (language) => {
714
- if (LANGUAGE_NAME_TO_BCP47[language]) {
715
- return LANGUAGE_NAME_TO_BCP47[language];
716
- }
717
- if (KNOWN_BCP47_CODES.has(language)) {
718
- return language;
719
- }
720
- const lower = language.toLowerCase();
721
- for (const [name, code] of Object.entries(LANGUAGE_NAME_TO_BCP47)) {
722
- if (name.toLowerCase() === lower) {
723
- return code;
724
- }
725
- }
726
- if (/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/.test(language)) {
727
- return language;
728
- }
729
- return "en";
730
- };
731
-
732
- // src/RedactoNoticeConsent/injectStyles.ts
733
- var stylesInjected = false;
734
- var injectCheckboxStyles = () => {
735
- if (stylesInjected || typeof document === "undefined") {
736
- return;
737
- }
738
- const STYLE_ID = "redacto-consent-checkbox-styles";
739
- if (document.getElementById(STYLE_ID)) {
740
- stylesInjected = true;
741
- return;
742
- }
743
- const style = document.createElement("style");
744
- style.id = STYLE_ID;
745
- style.textContent = `
746
- /* Redacto Consent SDK Checkbox Styles */
747
- .redacto-checkbox-large {
748
- appearance: none !important;
749
- -webkit-appearance: none !important;
750
- -moz-appearance: none !important;
751
- height: 20px !important;
752
- width: 20px !important;
753
- border: 2px solid #d0d5dd !important;
754
- border-radius: 5px !important;
755
- background-color: transparent !important;
756
- cursor: pointer !important;
757
- position: relative !important;
758
- box-sizing: border-box !important;
759
- margin: 0 !important;
760
- padding: 4px !important;
761
- }
762
-
763
- .redacto-checkbox-small {
764
- appearance: none !important;
765
- -webkit-appearance: none !important;
766
- -moz-appearance: none !important;
767
- height: 16px !important;
768
- width: 16px !important;
769
- border: 2px solid #d0d5dd !important;
770
- border-radius: 5px !important;
771
- background-color: transparent !important;
772
- cursor: pointer !important;
773
- position: relative !important;
774
- box-sizing: border-box !important;
775
- margin: 0 !important;
776
- padding: 4px !important;
777
- }
778
-
779
- .redacto-checkbox-large:checked {
780
- background-color: #4f87ff !important;
781
- border-color: #4f87ff !important;
782
- }
783
-
784
- .redacto-checkbox-small:checked {
785
- background-color: #4f87ff !important;
786
- border-color: #4f87ff !important;
787
- }
788
-
789
- .redacto-checkbox-large:checked::after {
790
- content: '' !important;
791
- position: absolute !important;
792
- left: 50% !important;
793
- top: 50% !important;
794
- transform: translate(-50%, -50%) rotate(45deg) !important;
795
- width: 4px !important;
796
- height: 8px !important;
797
- border: solid white !important;
798
- border-width: 0 2px 2px 0 !important;
799
- box-sizing: border-box !important;
800
- }
801
-
802
- .redacto-checkbox-small:checked::after {
803
- content: '' !important;
804
- position: absolute !important;
805
- left: 50% !important;
806
- top: 50% !important;
807
- transform: translate(-50%, -50%) rotate(45deg) !important;
808
- width: 3px !important;
809
- height: 6px !important;
810
- border: solid white !important;
811
- border-width: 0 1.5px 1.5px 0 !important;
812
- box-sizing: border-box !important;
813
- }
814
-
815
- .redacto-checkbox-large:focus {
816
- outline: 2px solid #4f87ff !important;
817
- outline-offset: 2px !important;
818
- }
819
-
820
- .redacto-checkbox-small:focus {
821
- outline: 2px solid #4f87ff !important;
822
- outline-offset: 2px !important;
823
- }
824
-
825
- /* TTS Highlight Styles - Visible highlighting without layout shift */
826
- .redacto-tts-highlight {
827
- position: relative !important;
828
- transition: background-color 0.3s ease, outline 0.3s ease !important;
829
- }
830
-
831
- /* Block-level elements - headings */
832
- h2.redacto-tts-highlight,
833
- h3.redacto-tts-highlight {
834
- background-color: #FFF9C4 !important;
835
- border-radius: 3px !important;
836
- padding: 2px 4px !important;
837
- margin: -2px -4px !important;
838
- }
839
-
840
- /* Inline elements - spans, links */
841
- span.redacto-tts-highlight,
842
- a.redacto-tts-highlight {
843
- background-color: #FFF9C4 !important;
844
- border-radius: 3px !important;
845
- padding: 2px 4px !important;
846
- margin: -2px -4px !important;
847
- }
848
-
849
- /* Paragraphs - handle carefully to avoid layout shift */
850
- p.redacto-tts-highlight {
851
- background-color: #FFF9C4 !important;
852
- border-radius: 3px !important;
853
- padding: 2px 4px !important;
854
- margin: -2px -4px !important;
855
- }
856
-
857
- /* Buttons - use outline to keep button styles intact */
858
- button.redacto-tts-highlight {
859
- outline: 3px solid #FFF9C4 !important;
860
- outline-offset: 2px !important;
861
- }
862
-
863
- /* Spinner animation for verification screens */
864
- @keyframes spin {
865
- from { transform: rotate(0deg); }
866
- to { transform: rotate(360deg); }
867
- }
868
-
869
- /* DigiLocker callback retry button hover */
870
- .redacto-dl-retry-btn:hover {
871
- background-color: #2563eb !important;
872
- }
873
- `;
874
- document.head.appendChild(style);
875
- stylesInjected = true;
876
- };
877
-
878
- // src/shared/font-catalogue.generated.ts
879
- var NOTICE_FONT_CATALOGUE = [
880
- {
881
- id: "montserrat",
882
- slug: "montserrat",
883
- value: "Montserrat",
884
- label: "Montserrat",
885
- cssFamily: "Montserrat",
886
- stack: 'Montserrat, "Trebuchet MS", "Segoe UI", Arial, sans-serif',
887
- genericFallback: "sans-serif",
888
- source: "webfont",
889
- weights: [400, 500, 600, 700],
890
- formats: ["woff2", "ttf"]
891
- },
892
- {
893
- id: "arial",
894
- slug: "arial",
895
- value: "Arial",
896
- label: "Arial",
897
- cssFamily: "Arial",
898
- stack: "Arial, Helvetica, sans-serif",
899
- genericFallback: "sans-serif",
900
- source: "system"
671
+ // src/RedactoNoticeConsent/styles.ts
672
+ var styles = {
673
+ overlay: {
674
+ position: "fixed",
675
+ top: 0,
676
+ left: 0,
677
+ width: "100%",
678
+ height: "100%",
679
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
680
+ display: "flex",
681
+ alignItems: "center",
682
+ justifyContent: "center",
683
+ zIndex: 999,
684
+ animation: "overlayFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1)",
685
+ pointerEvents: "all",
686
+ margin: 0,
687
+ padding: 0,
688
+ boxSizing: "border-box"
901
689
  },
902
- {
903
- id: "georgia",
904
- slug: "georgia",
905
- value: "Georgia",
906
- label: "Georgia",
907
- cssFamily: "Georgia",
908
- stack: 'Georgia, "Times New Roman", Times, serif',
909
- genericFallback: "serif",
910
- source: "system"
690
+ modal: {
691
+ position: "fixed",
692
+ top: "50%",
693
+ left: "50%",
694
+ transform: "translate(-50%, -50%)",
695
+ width: "700px",
696
+ borderRadius: "8px",
697
+ backgroundColor: "#ffffff",
698
+ boxShadow: "4px 0px 4px 0px #00000040",
699
+ border: "none",
700
+ display: "flex",
701
+ flexDirection: "column",
702
+ maxHeight: "90vh",
703
+ zIndex: 1e3,
704
+ margin: 0,
705
+ padding: 0,
706
+ boxSizing: "border-box",
707
+ textAlign: "left",
708
+ fontFamily: "inherit"
911
709
  },
912
- {
913
- id: "times new roman",
914
- slug: "times-new-roman",
915
- value: "Times New Roman",
916
- label: "Times New Roman",
917
- cssFamily: "Times New Roman",
918
- stack: '"Times New Roman", Times, serif',
919
- genericFallback: "serif",
920
- source: "system"
710
+ content: {
711
+ margin: "22px",
712
+ display: "flex",
713
+ flexDirection: "column",
714
+ flexGrow: 1,
715
+ overflow: "hidden",
716
+ minHeight: 0,
717
+ boxSizing: "border-box",
718
+ textAlign: "left"
921
719
  },
922
- {
923
- id: "trebuchet ms",
924
- slug: "trebuchet-ms",
925
- value: "Trebuchet MS",
926
- label: "Trebuchet MS",
927
- cssFamily: "Trebuchet MS",
928
- stack: '"Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif',
929
- genericFallback: "sans-serif",
930
- source: "system"
931
- },
932
- {
933
- id: "verdana",
934
- slug: "verdana",
935
- value: "Verdana",
936
- label: "Verdana",
937
- cssFamily: "Verdana",
938
- stack: "Verdana, Geneva, sans-serif",
939
- genericFallback: "sans-serif",
940
- source: "system"
941
- }
942
- ];
943
- var NOTICE_FONT_ENTRY_BY_ID = Object.fromEntries(NOTICE_FONT_CATALOGUE.map((entry) => [entry.id, entry]));
944
-
945
- // src/shared/constants.ts
946
- var INHERIT_FONT_FAMILY = "inherit";
947
- var NOTICE_FONT_STACKS = Object.fromEntries(
948
- NOTICE_FONT_CATALOGUE.map((entry) => [entry.id, entry.stack])
949
- );
950
- var NOTICE_FONT_GENERIC_FALLBACK = ", sans-serif";
951
- var DEFAULT_NOTICE_FONT_ID = "arial";
952
- var CSS_FONT_KEYWORDS = [
953
- "inherit",
954
- "initial",
955
- "revert",
956
- "revert-layer",
957
- "unset",
958
- "serif",
959
- "sans-serif",
960
- "monospace",
961
- "cursive",
962
- "fantasy",
963
- "system-ui",
964
- "ui-serif",
965
- "ui-sans-serif",
966
- "ui-monospace",
967
- "ui-rounded",
968
- "math",
969
- "emoji",
970
- "fangsong"
971
- ];
972
- var UNSAFE_FONT_CHARACTERS = /["';{}\\]/g;
973
- var FONT_NAME_QUOTE_CHARACTERS = /["']/g;
974
- var FONT_FAMILY_SEPARATOR = ",";
975
- var NOTICE_FONT_FACE_STYLE_ID_PREFIX = "redacto-notice-font-face-";
976
- var NOTICE_FONT_LOAD_ERROR_MESSAGE = "[redacto] notice webfont payload failed to load; falling back to the next family in the stack";
977
- var NOTICE_FONT_ROOT_ATTRIBUTE = "data-redacto-notice-font";
978
- var NOTICE_FONT_ROOT_PROPS = {
979
- [NOTICE_FONT_ROOT_ATTRIBUTE]: ""
980
- };
981
- var NOTICE_FONT_STYLE_ID = "redacto-notice-font-styles";
982
- var NOTICE_FONT_CSS = `
983
- [${NOTICE_FONT_ROOT_ATTRIBUTE}] button,
984
- [${NOTICE_FONT_ROOT_ATTRIBUTE}] input,
985
- [${NOTICE_FONT_ROOT_ATTRIBUTE}] optgroup,
986
- [${NOTICE_FONT_ROOT_ATTRIBUTE}] option,
987
- [${NOTICE_FONT_ROOT_ATTRIBUTE}] select,
988
- [${NOTICE_FONT_ROOT_ATTRIBUTE}] textarea {
989
- font-family: inherit;
990
- }
991
- `;
992
-
993
- // src/shared/useNoticeFont.ts
994
- var import_react = require("react");
995
-
996
- // src/shared/notice-font.ts
997
- var toFontFamilyValue = (value) => {
998
- var _a;
999
- if (value.includes(",")) {
1000
- return value;
1001
- }
1002
- const family = value.replace(UNSAFE_FONT_CHARACTERS, "").trim();
1003
- if (!family) {
1004
- return INHERIT_FONT_FAMILY;
1005
- }
1006
- const lowered = family.toLowerCase();
1007
- if (CSS_FONT_KEYWORDS.includes(lowered)) {
1008
- return lowered;
1009
- }
1010
- return (_a = NOTICE_FONT_STACKS[lowered]) != null ? _a : `"${family}"${NOTICE_FONT_GENERIC_FALLBACK}`;
1011
- };
1012
- var toNoticeFontEntry = (fontPreference) => {
1013
- var _a;
1014
- const stored = fontPreference == null ? void 0 : fontPreference.trim();
1015
- if (!stored) {
1016
- return void 0;
1017
- }
1018
- return (_a = NOTICE_FONT_ENTRY_BY_ID[stored.toLowerCase()]) != null ? _a : NOTICE_FONT_ENTRY_BY_ID[DEFAULT_NOTICE_FONT_ID];
1019
- };
1020
- var resolveNoticeFontFamily = ({
1021
- hostFont,
1022
- noticeFont
1023
- }) => {
1024
- var _a, _b;
1025
- const host = hostFont == null ? void 0 : hostFont.trim();
1026
- if (host) {
1027
- return toFontFamilyValue(host);
1028
- }
1029
- return (_b = (_a = toNoticeFontEntry(noticeFont)) == null ? void 0 : _a.stack) != null ? _b : INHERIT_FONT_FAMILY;
1030
- };
1031
- var fontStylesInjected = false;
1032
- var injectNoticeFontStyles = () => {
1033
- if (fontStylesInjected || typeof document === "undefined") {
1034
- return;
1035
- }
1036
- if (document.getElementById(NOTICE_FONT_STYLE_ID)) {
1037
- fontStylesInjected = true;
1038
- return;
1039
- }
1040
- const style = document.createElement("style");
1041
- style.id = NOTICE_FONT_STYLE_ID;
1042
- style.textContent = NOTICE_FONT_CSS;
1043
- document.head.appendChild(style);
1044
- fontStylesInjected = true;
1045
- };
1046
-
1047
- // src/shared/fonts/font-sources.generated.ts
1048
- var NOTICE_FONT_SOURCE_IMPORTS = {
1049
- "montserrat": () => Promise.resolve().then(() => (init_montserrat_generated(), montserrat_generated_exports))
1050
- };
1051
-
1052
- // src/shared/notice-webfont.ts
1053
- var noticeFontOptions = {};
1054
- var configureNoticeFonts = (options) => {
1055
- noticeFontOptions = { ...noticeFontOptions, ...options };
1056
- };
1057
- var toFamilyTokens = (value) => value.split(FONT_FAMILY_SEPARATOR).map(
1058
- (token) => token.trim().replace(FONT_NAME_QUOTE_CHARACTERS, "").toLowerCase()
1059
- );
1060
- var findNoticeFontEntry = (value) => {
1061
- const id = toFamilyTokens(value).find(
1062
- (token) => Boolean(NOTICE_FONT_ENTRY_BY_ID[token])
1063
- );
1064
- if (!id) {
1065
- return void 0;
1066
- }
1067
- return NOTICE_FONT_ENTRY_BY_ID[id];
1068
- };
1069
- var toFontFaceCss = (entry, sources) => sources.map(
1070
- ({ weight, url }) => [
1071
- "@font-face {",
1072
- ` font-family: "${entry.cssFamily}";`,
1073
- " font-style: normal;",
1074
- ` font-weight: ${weight};`,
1075
- // `swap`, never the `auto` default: auto gives most browsers a ~3s block
1076
- // period with INVISIBLE text, which is unacceptable for a consent notice.
1077
- " font-display: swap;",
1078
- // `local()` still leads: the bundled copy is Latin + Latin-Extended only,
1079
- // so a visitor's own installation covers more scripts than ours does.
1080
- ` src: local("${entry.cssFamily}"),`,
1081
- // Quoted url(): a data URI carries `,` and `;`, which are hostile to an
1082
- // unquoted url token. Base64 never contains a double quote.
1083
- ` url("${url}") format("woff2");`,
1084
- "}"
1085
- ].join("\n")
1086
- ).join("\n\n");
1087
- var fontSourceLoads = /* @__PURE__ */ new Map();
1088
- var loadFontSources = (entry, importSources) => {
1089
- const pending = fontSourceLoads.get(entry.id);
1090
- if (pending) {
1091
- return pending;
1092
- }
1093
- const load = importSources().then((module2) => module2.NOTICE_FONT_SOURCES).catch((error) => {
1094
- fontSourceLoads.delete(entry.id);
1095
- throw error;
1096
- });
1097
- fontSourceLoads.set(entry.id, load);
1098
- return load;
1099
- };
1100
- var injectedFontFaceIds = /* @__PURE__ */ new Set();
1101
- var injectFontFace = (entry, sources) => {
1102
- if (injectedFontFaceIds.has(entry.id)) {
1103
- return;
1104
- }
1105
- injectedFontFaceIds.add(entry.id);
1106
- const styleId = `${NOTICE_FONT_FACE_STYLE_ID_PREFIX}${entry.slug}`;
1107
- if (document.getElementById(styleId)) {
1108
- return;
1109
- }
1110
- const style = document.createElement("style");
1111
- style.id = styleId;
1112
- style.textContent = toFontFaceCss(entry, sources);
1113
- document.head.appendChild(style);
1114
- };
1115
- var loadNoticeWebfont = async (value, signal) => {
1116
- if (typeof document === "undefined" || noticeFontOptions.disabled) {
1117
- return;
1118
- }
1119
- if (signal == null ? void 0 : signal.aborted) {
1120
- return;
1121
- }
1122
- const entry = findNoticeFontEntry(value);
1123
- if (!entry || entry.source !== "webfont" || injectedFontFaceIds.has(entry.id)) {
1124
- return;
1125
- }
1126
- const importSources = NOTICE_FONT_SOURCE_IMPORTS[entry.slug];
1127
- if (!importSources) {
1128
- return;
1129
- }
1130
- try {
1131
- const sources = await loadFontSources(entry, importSources);
1132
- if (signal == null ? void 0 : signal.aborted) {
1133
- return;
1134
- }
1135
- injectFontFace(entry, sources);
1136
- } catch (error) {
1137
- console.error(NOTICE_FONT_LOAD_ERROR_MESSAGE, error);
1138
- }
1139
- };
1140
-
1141
- // src/shared/useNoticeFont.ts
1142
- var useNoticeFont = ({
1143
- hostFont,
1144
- noticeFont
1145
- }) => {
1146
- const fontFamily = (0, import_react.useMemo)(
1147
- () => resolveNoticeFontFamily({ hostFont, noticeFont }),
1148
- [hostFont, noticeFont]
1149
- );
1150
- (0, import_react.useEffect)(() => {
1151
- injectNoticeFontStyles();
1152
- }, []);
1153
- (0, import_react.useEffect)(() => {
1154
- const controller = new AbortController();
1155
- void loadNoticeWebfont(fontFamily, controller.signal);
1156
- return () => controller.abort();
1157
- }, [fontFamily]);
1158
- return fontFamily;
1159
- };
1160
-
1161
- // src/RedactoNoticeConsent/styles.ts
1162
- var styles = {
1163
- overlay: {
1164
- position: "fixed",
1165
- top: 0,
1166
- left: 0,
1167
- width: "100%",
1168
- height: "100%",
1169
- backgroundColor: "rgba(0, 0, 0, 0.5)",
1170
- display: "flex",
1171
- alignItems: "center",
1172
- justifyContent: "center",
1173
- zIndex: 999,
1174
- animation: "overlayFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1)",
1175
- pointerEvents: "all",
1176
- margin: 0,
1177
- padding: 0,
1178
- boxSizing: "border-box"
1179
- },
1180
- modal: {
1181
- position: "fixed",
1182
- top: "50%",
1183
- left: "50%",
1184
- transform: "translate(-50%, -50%)",
1185
- width: "700px",
1186
- borderRadius: "8px",
1187
- backgroundColor: "#ffffff",
1188
- boxShadow: "4px 0px 4px 0px #00000040",
1189
- border: "none",
1190
- display: "flex",
1191
- flexDirection: "column",
1192
- maxHeight: "90vh",
1193
- zIndex: 1e3,
1194
- margin: 0,
1195
- padding: 0,
1196
- boxSizing: "border-box",
1197
- textAlign: "left",
1198
- fontFamily: "inherit"
1199
- },
1200
- content: {
1201
- margin: "22px",
1202
- display: "flex",
1203
- flexDirection: "column",
1204
- flexGrow: 1,
1205
- overflow: "hidden",
1206
- minHeight: 0,
1207
- boxSizing: "border-box",
1208
- textAlign: "left"
1209
- },
1210
- topSection: {
1211
- display: "flex",
1212
- justifyContent: "space-between",
1213
- alignItems: "flex-start",
1214
- gap: "10px",
1215
- paddingBottom: "15px",
1216
- borderBottom: "none",
1217
- backgroundColor: "#ffffff",
1218
- margin: 0,
1219
- boxSizing: "border-box",
1220
- textAlign: "left"
720
+ topSection: {
721
+ display: "flex",
722
+ justifyContent: "space-between",
723
+ alignItems: "flex-start",
724
+ gap: "10px",
725
+ paddingBottom: "15px",
726
+ borderBottom: "none",
727
+ backgroundColor: "#ffffff",
728
+ margin: 0,
729
+ boxSizing: "border-box",
730
+ textAlign: "left"
1221
731
  },
1222
732
  topLeft: {
1223
733
  display: "flex",
@@ -1470,6 +980,33 @@ var styles = {
1470
980
  margin: 0,
1471
981
  boxSizing: "border-box"
1472
982
  },
983
+ /**
984
+ * The main notice footer. Wide: one row with decline pushed to the left and
985
+ * the two accepts grouped right (see `declineSpacer`). Narrow: a full-width
986
+ * stack. The guardian-verification and age-gate sub-flows keep using
987
+ * `bottomSection` — they have their own two-button layout.
988
+ */
989
+ actionButtonRow: {
990
+ display: "flex",
991
+ flexDirection: "row",
992
+ alignItems: "center",
993
+ gap: "12px",
994
+ paddingTop: "15px",
995
+ borderTop: "none",
996
+ backgroundColor: "#ffffff",
997
+ margin: 0,
998
+ boxSizing: "border-box"
999
+ },
1000
+ actionButtonStack: {
1001
+ display: "flex",
1002
+ flexDirection: "column",
1003
+ gap: "12px",
1004
+ paddingTop: "15px",
1005
+ borderTop: "none",
1006
+ backgroundColor: "#ffffff",
1007
+ margin: 0,
1008
+ boxSizing: "border-box"
1009
+ },
1473
1010
  button: {
1474
1011
  width: "100%",
1475
1012
  borderRadius: "8px",
@@ -1489,6 +1026,44 @@ var styles = {
1489
1026
  border: "none",
1490
1027
  color: "#ffffff"
1491
1028
  },
1029
+ /**
1030
+ * The accept-all shortcut. Tinted rather than filled so the primary
1031
+ * "accept selected" action stays visually dominant, and outlined-but-coloured
1032
+ * so it still reads as an accept next to the neutral decline button.
1033
+ */
1034
+ acceptSecondaryButton: {
1035
+ backgroundColor: "#ffffff",
1036
+ border: "1px solid #4f87ff",
1037
+ color: "#4f87ff"
1038
+ },
1039
+ /**
1040
+ * Three buttons share the footer width, so the single-button horizontal
1041
+ * padding would clip long translated labels. Let them wrap instead.
1042
+ *
1043
+ * `width: auto` undoes `button`'s `width: 100%` — in the wide row each button
1044
+ * must size to its own label, or all three stretch equally and the
1045
+ * left/right split disappears.
1046
+ */
1047
+ rowButton: {
1048
+ width: "auto",
1049
+ padding: "9px 20px",
1050
+ whiteSpace: "normal",
1051
+ wordBreak: "break-word"
1052
+ },
1053
+ /** In the narrow stack every button spans the full width. */
1054
+ stackButton: {
1055
+ width: "100%",
1056
+ padding: "9px 20px",
1057
+ whiteSpace: "normal",
1058
+ wordBreak: "break-word"
1059
+ },
1060
+ /**
1061
+ * Pushes everything after decline to the right edge, which is the whole of
1062
+ * the wide layout: `[Decline] <-- gap --> [Accept Selected] [Accept All]`.
1063
+ */
1064
+ declineSpacer: {
1065
+ marginRight: "auto"
1066
+ },
1492
1067
  cancelButton: {
1493
1068
  border: "1px solid #d0d5dd",
1494
1069
  backgroundColor: "#ffffff",
@@ -1557,6 +1132,669 @@ var styles = {
1557
1132
  }
1558
1133
  };
1559
1134
 
1135
+ // src/RedactoNoticeConsent/components/NoticeFooter.tsx
1136
+ var import_jsx_runtime = require("react/jsx-runtime");
1137
+ var DISABLED_OPACITY = 0.5;
1138
+ var NoticeFooter = ({
1139
+ labels,
1140
+ acceptSelectedDisabled,
1141
+ isSubmittingAccept,
1142
+ isSubmittingDecline,
1143
+ isMobile,
1144
+ responsiveButtonStyle,
1145
+ acceptAllButtonStyle,
1146
+ acceptSelectedButtonStyle,
1147
+ declineButtonStyle,
1148
+ lastFocusableRef,
1149
+ onAcceptAll,
1150
+ onAcceptSelected,
1151
+ onDecline
1152
+ }) => {
1153
+ const isSubmitting = isSubmittingAccept || isSubmittingDecline;
1154
+ const baseButtonStyle = {
1155
+ ...styles.button,
1156
+ ...responsiveButtonStyle,
1157
+ ...isMobile ? styles.stackButton : styles.rowButton
1158
+ };
1159
+ const acceptAllButton = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1160
+ "button",
1161
+ {
1162
+ type: "button",
1163
+ id: ACCEPT_ALL_BUTTON_ID,
1164
+ style: {
1165
+ ...baseButtonStyle,
1166
+ ...styles.acceptButton,
1167
+ ...acceptAllButtonStyle,
1168
+ opacity: isSubmitting ? DISABLED_OPACITY : 1
1169
+ },
1170
+ onClick: onAcceptAll,
1171
+ disabled: isSubmitting,
1172
+ "aria-label": labels.acceptAll,
1173
+ children: isSubmittingAccept ? SUBMITTING_BUTTON_TEXT : labels.acceptAll
1174
+ }
1175
+ );
1176
+ const acceptSelectedButton = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1177
+ "button",
1178
+ {
1179
+ type: "button",
1180
+ ref: lastFocusableRef,
1181
+ id: ACCEPT_SELECTED_BUTTON_ID,
1182
+ style: {
1183
+ ...baseButtonStyle,
1184
+ ...styles.acceptSecondaryButton,
1185
+ ...acceptSelectedButtonStyle,
1186
+ opacity: acceptSelectedDisabled ? DISABLED_OPACITY : 1
1187
+ },
1188
+ onClick: onAcceptSelected,
1189
+ disabled: acceptSelectedDisabled || isSubmittingDecline,
1190
+ "aria-label": labels.acceptSelected,
1191
+ children: isSubmittingAccept ? SUBMITTING_BUTTON_TEXT : labels.acceptSelected
1192
+ }
1193
+ );
1194
+ const declineButton = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1195
+ "button",
1196
+ {
1197
+ type: "button",
1198
+ id: DECLINE_BUTTON_ID,
1199
+ style: {
1200
+ ...baseButtonStyle,
1201
+ ...styles.cancelButton,
1202
+ ...declineButtonStyle,
1203
+ // Only the wide row needs the spacer that pushes the accepts right.
1204
+ ...isMobile ? {} : styles.declineSpacer,
1205
+ opacity: isSubmittingAccept ? DISABLED_OPACITY : 1
1206
+ },
1207
+ onClick: onDecline,
1208
+ disabled: isSubmitting,
1209
+ "aria-label": labels.decline,
1210
+ children: isSubmittingDecline ? SUBMITTING_BUTTON_TEXT : labels.decline
1211
+ }
1212
+ );
1213
+ if (isMobile) {
1214
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1215
+ acceptAllButton,
1216
+ acceptSelectedButton,
1217
+ declineButton
1218
+ ] });
1219
+ }
1220
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1221
+ declineButton,
1222
+ acceptSelectedButton,
1223
+ acceptAllButton
1224
+ ] });
1225
+ };
1226
+
1227
+ // src/RedactoNoticeConsent/utils/consentSelection.ts
1228
+ var dataElementKey = (purposeUuid, elementUuid) => `${purposeUuid}-${elementUuid}`;
1229
+ var buildSelectionForMode = (purposes, mode, current) => {
1230
+ if (mode === "selected") {
1231
+ return current;
1232
+ }
1233
+ const selectedPurposes = {};
1234
+ const selectedDataElements = {};
1235
+ purposes.forEach((purpose) => {
1236
+ selectedPurposes[purpose.uuid] = true;
1237
+ purpose.data_elements.forEach((element) => {
1238
+ selectedDataElements[dataElementKey(purpose.uuid, element.uuid)] = element.enabled;
1239
+ });
1240
+ });
1241
+ return { selectedPurposes, selectedDataElements };
1242
+ };
1243
+ var resolvePurposePreselection = (raw) => raw === "MANDATORY" || raw === "ALL" ? raw : DEFAULT_PURPOSE_PRESELECTION;
1244
+ var hasRecordedPurposeState = (selection) => {
1245
+ var _a;
1246
+ if (!selection) {
1247
+ return false;
1248
+ }
1249
+ if (selection.status && selection.status !== PURPOSE_STATUS_INACTIVE) {
1250
+ return true;
1251
+ }
1252
+ return Object.keys((_a = selection.data_elements) != null ? _a : {}).length > 0;
1253
+ };
1254
+ var buildPreselection = (purposes, mode) => {
1255
+ const selectedPurposes = {};
1256
+ const selectedDataElements = {};
1257
+ if (mode === "ALL") {
1258
+ return buildSelectionForMode(purposes, "all", {
1259
+ selectedPurposes,
1260
+ selectedDataElements
1261
+ });
1262
+ }
1263
+ purposes.forEach((purpose) => {
1264
+ let hasPreselectedElement = false;
1265
+ purpose.data_elements.forEach((element) => {
1266
+ const isPreselected = mode === "MANDATORY" && element.required && element.enabled;
1267
+ selectedDataElements[dataElementKey(purpose.uuid, element.uuid)] = isPreselected;
1268
+ hasPreselectedElement = hasPreselectedElement || isPreselected;
1269
+ });
1270
+ selectedPurposes[purpose.uuid] = hasPreselectedElement;
1271
+ });
1272
+ return { selectedPurposes, selectedDataElements };
1273
+ };
1274
+ var hasRequiredDataElement = (purpose) => purpose.data_elements.some((element) => element.required);
1275
+
1276
+ // src/RedactoNoticeConsent/layout.ts
1277
+ var resolveLogoPosition = (raw) => raw === "center" || raw === "right" ? raw : DEFAULT_LOGO_POSITION;
1278
+ var logoRowJustify = (position) => LOGO_POSITION_JUSTIFY[position];
1279
+
1280
+ // src/RedactoNoticeConsent/language-codes.ts
1281
+ var LANGUAGE_NATIVE_LABELS = {
1282
+ English: "English",
1283
+ Assamese: "\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE (Assamese)",
1284
+ Bengali: "\u09AC\u09BE\u0982\u09B2\u09BE (Bengali)",
1285
+ Bodo: "\u092C\u0921\u093C\u094B (Bodo)",
1286
+ Dogri: "\u0921\u094B\u0917\u0930\u0940 (Dogri)",
1287
+ Gujarati: "\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0 (Gujarati)",
1288
+ Hindi: "\u0939\u093F\u0928\u094D\u0926\u0940 (Hindi)",
1289
+ Kannada: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1 (Kannada)",
1290
+ Kashmiri: "\u0643\u0672\u0634\u064F\u0631 (Kashmiri)",
1291
+ "Goan Konkani": "\u0915\u094B\u0902\u0915\u0923\u0940 (Goan Konkani)",
1292
+ Maithili: "\u092E\u0948\u0925\u093F\u0932\u0940 (Maithili)",
1293
+ Malayalam: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02 (Malayalam)",
1294
+ Manipuri: "\uABC3\uABE9\uABC7\uABE9\uABC2\uABE3\uABDF (Manipuri)",
1295
+ Marathi: "\u092E\u0930\u093E\u0920\u0940 (Marathi)",
1296
+ Nepali: "\u0928\u0947\u092A\u093E\u0932\u0940 (Nepali)",
1297
+ Odia: "\u0B13\u0B21\u0B3C\u0B3F\u0B06 (Odia)",
1298
+ Punjabi: "\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40 (Punjabi)",
1299
+ Sanskrit: "\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D (Sanskrit)",
1300
+ Santali: "\u1C65\u1C5F\u1C71\u1C5B\u1C5F\u1C72\u1C64 (Santali)",
1301
+ Sindhi: "\u0633\u0646\u068C\u064A (Sindhi)",
1302
+ Tamil: "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD (Tamil)",
1303
+ Telugu: "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41 (Telugu)",
1304
+ Urdu: "\u0627\u0631\u062F\u0648 (Urdu)"
1305
+ };
1306
+ var toNativeLabel = (name) => {
1307
+ var _a;
1308
+ return (_a = LANGUAGE_NATIVE_LABELS[name]) != null ? _a : name;
1309
+ };
1310
+ var LANGUAGE_NAME_TO_BCP47 = {
1311
+ English: "en",
1312
+ Assamese: "as",
1313
+ Bengali: "bn",
1314
+ Bodo: "brx",
1315
+ Dogri: "doi",
1316
+ Gujarati: "gu",
1317
+ Hindi: "hi",
1318
+ Kannada: "kn",
1319
+ Kashmiri: "ks",
1320
+ "Goan Konkani": "gom",
1321
+ Maithili: "mai",
1322
+ Malayalam: "ml",
1323
+ Manipuri: "mni-Mtei",
1324
+ Marathi: "mr",
1325
+ Nepali: "ne",
1326
+ Odia: "or",
1327
+ Punjabi: "pa",
1328
+ Sanskrit: "sa",
1329
+ Santali: "sat",
1330
+ Sindhi: "sd",
1331
+ Tamil: "ta",
1332
+ Telugu: "te",
1333
+ Urdu: "ur"
1334
+ };
1335
+ var KNOWN_BCP47_CODES = new Set(Object.values(LANGUAGE_NAME_TO_BCP47));
1336
+ var toBcp47Code = (language) => {
1337
+ if (LANGUAGE_NAME_TO_BCP47[language]) {
1338
+ return LANGUAGE_NAME_TO_BCP47[language];
1339
+ }
1340
+ if (KNOWN_BCP47_CODES.has(language)) {
1341
+ return language;
1342
+ }
1343
+ const lower = language.toLowerCase();
1344
+ for (const [name, code] of Object.entries(LANGUAGE_NAME_TO_BCP47)) {
1345
+ if (name.toLowerCase() === lower) {
1346
+ return code;
1347
+ }
1348
+ }
1349
+ if (/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/.test(language)) {
1350
+ return language;
1351
+ }
1352
+ return "en";
1353
+ };
1354
+
1355
+ // src/RedactoNoticeConsent/injectStyles.ts
1356
+ var stylesInjected = false;
1357
+ var injectCheckboxStyles = () => {
1358
+ if (stylesInjected || typeof document === "undefined") {
1359
+ return;
1360
+ }
1361
+ const STYLE_ID = "redacto-consent-checkbox-styles";
1362
+ if (document.getElementById(STYLE_ID)) {
1363
+ stylesInjected = true;
1364
+ return;
1365
+ }
1366
+ const style = document.createElement("style");
1367
+ style.id = STYLE_ID;
1368
+ style.textContent = `
1369
+ /* Redacto Consent SDK Checkbox Styles */
1370
+ .redacto-checkbox-large {
1371
+ appearance: none !important;
1372
+ -webkit-appearance: none !important;
1373
+ -moz-appearance: none !important;
1374
+ height: 20px !important;
1375
+ width: 20px !important;
1376
+ border: 2px solid #d0d5dd !important;
1377
+ border-radius: 5px !important;
1378
+ background-color: transparent !important;
1379
+ cursor: pointer !important;
1380
+ position: relative !important;
1381
+ box-sizing: border-box !important;
1382
+ margin: 0 !important;
1383
+ padding: 4px !important;
1384
+ }
1385
+
1386
+ .redacto-checkbox-small {
1387
+ appearance: none !important;
1388
+ -webkit-appearance: none !important;
1389
+ -moz-appearance: none !important;
1390
+ height: 16px !important;
1391
+ width: 16px !important;
1392
+ border: 2px solid #d0d5dd !important;
1393
+ border-radius: 5px !important;
1394
+ background-color: transparent !important;
1395
+ cursor: pointer !important;
1396
+ position: relative !important;
1397
+ box-sizing: border-box !important;
1398
+ margin: 0 !important;
1399
+ padding: 4px !important;
1400
+ }
1401
+
1402
+ .redacto-checkbox-large:checked {
1403
+ background-color: #4f87ff !important;
1404
+ border-color: #4f87ff !important;
1405
+ }
1406
+
1407
+ .redacto-checkbox-small:checked {
1408
+ background-color: #4f87ff !important;
1409
+ border-color: #4f87ff !important;
1410
+ }
1411
+
1412
+ .redacto-checkbox-large:checked::after {
1413
+ content: '' !important;
1414
+ position: absolute !important;
1415
+ left: 50% !important;
1416
+ top: 50% !important;
1417
+ transform: translate(-50%, -50%) rotate(45deg) !important;
1418
+ width: 4px !important;
1419
+ height: 8px !important;
1420
+ border: solid white !important;
1421
+ border-width: 0 2px 2px 0 !important;
1422
+ box-sizing: border-box !important;
1423
+ }
1424
+
1425
+ .redacto-checkbox-small:checked::after {
1426
+ content: '' !important;
1427
+ position: absolute !important;
1428
+ left: 50% !important;
1429
+ top: 50% !important;
1430
+ transform: translate(-50%, -50%) rotate(45deg) !important;
1431
+ width: 3px !important;
1432
+ height: 6px !important;
1433
+ border: solid white !important;
1434
+ border-width: 0 1.5px 1.5px 0 !important;
1435
+ box-sizing: border-box !important;
1436
+ }
1437
+
1438
+ .redacto-checkbox-large:focus {
1439
+ outline: 2px solid #4f87ff !important;
1440
+ outline-offset: 2px !important;
1441
+ }
1442
+
1443
+ .redacto-checkbox-small:focus {
1444
+ outline: 2px solid #4f87ff !important;
1445
+ outline-offset: 2px !important;
1446
+ }
1447
+
1448
+ /* TTS Highlight Styles - Visible highlighting without layout shift */
1449
+ .redacto-tts-highlight {
1450
+ position: relative !important;
1451
+ transition: background-color 0.3s ease, outline 0.3s ease !important;
1452
+ }
1453
+
1454
+ /* Block-level elements - headings */
1455
+ h2.redacto-tts-highlight,
1456
+ h3.redacto-tts-highlight {
1457
+ background-color: #FFF9C4 !important;
1458
+ border-radius: 3px !important;
1459
+ padding: 2px 4px !important;
1460
+ margin: -2px -4px !important;
1461
+ }
1462
+
1463
+ /* Inline elements - spans, links */
1464
+ span.redacto-tts-highlight,
1465
+ a.redacto-tts-highlight {
1466
+ background-color: #FFF9C4 !important;
1467
+ border-radius: 3px !important;
1468
+ padding: 2px 4px !important;
1469
+ margin: -2px -4px !important;
1470
+ }
1471
+
1472
+ /* Paragraphs - handle carefully to avoid layout shift */
1473
+ p.redacto-tts-highlight {
1474
+ background-color: #FFF9C4 !important;
1475
+ border-radius: 3px !important;
1476
+ padding: 2px 4px !important;
1477
+ margin: -2px -4px !important;
1478
+ }
1479
+
1480
+ /* Buttons - use outline to keep button styles intact */
1481
+ button.redacto-tts-highlight {
1482
+ outline: 3px solid #FFF9C4 !important;
1483
+ outline-offset: 2px !important;
1484
+ }
1485
+
1486
+ /* Spinner animation for verification screens */
1487
+ @keyframes spin {
1488
+ from { transform: rotate(0deg); }
1489
+ to { transform: rotate(360deg); }
1490
+ }
1491
+
1492
+ /* DigiLocker callback retry button hover */
1493
+ .redacto-dl-retry-btn:hover {
1494
+ background-color: #2563eb !important;
1495
+ }
1496
+ `;
1497
+ document.head.appendChild(style);
1498
+ stylesInjected = true;
1499
+ };
1500
+
1501
+ // src/shared/font-catalogue.generated.ts
1502
+ var NOTICE_FONT_CATALOGUE = [
1503
+ {
1504
+ id: "montserrat",
1505
+ slug: "montserrat",
1506
+ value: "Montserrat",
1507
+ label: "Montserrat",
1508
+ cssFamily: "Montserrat",
1509
+ stack: 'Montserrat, "Trebuchet MS", "Segoe UI", Arial, sans-serif',
1510
+ genericFallback: "sans-serif",
1511
+ source: "webfont",
1512
+ weights: [400, 500, 600, 700],
1513
+ formats: ["woff2", "ttf"]
1514
+ },
1515
+ {
1516
+ id: "arial",
1517
+ slug: "arial",
1518
+ value: "Arial",
1519
+ label: "Arial",
1520
+ cssFamily: "Arial",
1521
+ stack: "Arial, Helvetica, sans-serif",
1522
+ genericFallback: "sans-serif",
1523
+ source: "system"
1524
+ },
1525
+ {
1526
+ id: "georgia",
1527
+ slug: "georgia",
1528
+ value: "Georgia",
1529
+ label: "Georgia",
1530
+ cssFamily: "Georgia",
1531
+ stack: 'Georgia, "Times New Roman", Times, serif',
1532
+ genericFallback: "serif",
1533
+ source: "system"
1534
+ },
1535
+ {
1536
+ id: "times new roman",
1537
+ slug: "times-new-roman",
1538
+ value: "Times New Roman",
1539
+ label: "Times New Roman",
1540
+ cssFamily: "Times New Roman",
1541
+ stack: '"Times New Roman", Times, serif',
1542
+ genericFallback: "serif",
1543
+ source: "system"
1544
+ },
1545
+ {
1546
+ id: "trebuchet ms",
1547
+ slug: "trebuchet-ms",
1548
+ value: "Trebuchet MS",
1549
+ label: "Trebuchet MS",
1550
+ cssFamily: "Trebuchet MS",
1551
+ stack: '"Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif',
1552
+ genericFallback: "sans-serif",
1553
+ source: "system"
1554
+ },
1555
+ {
1556
+ id: "verdana",
1557
+ slug: "verdana",
1558
+ value: "Verdana",
1559
+ label: "Verdana",
1560
+ cssFamily: "Verdana",
1561
+ stack: "Verdana, Geneva, sans-serif",
1562
+ genericFallback: "sans-serif",
1563
+ source: "system"
1564
+ }
1565
+ ];
1566
+ var NOTICE_FONT_ENTRY_BY_ID = Object.fromEntries(NOTICE_FONT_CATALOGUE.map((entry) => [entry.id, entry]));
1567
+
1568
+ // src/shared/constants.ts
1569
+ var REQUIRED_MARKER_GLYPH = "*";
1570
+ var REQUIRED_MARKER_ARIA_LABEL = "required";
1571
+ var REQUIRED_MARKER_COLOR = "red";
1572
+ var REQUIRED_MARKER_GAP = "4px";
1573
+ var REQUIRED_MARKER_STYLE = {
1574
+ color: REQUIRED_MARKER_COLOR,
1575
+ marginLeft: REQUIRED_MARKER_GAP
1576
+ };
1577
+ var INHERIT_FONT_FAMILY = "inherit";
1578
+ var NOTICE_FONT_STACKS = Object.fromEntries(
1579
+ NOTICE_FONT_CATALOGUE.map((entry) => [entry.id, entry.stack])
1580
+ );
1581
+ var NOTICE_FONT_GENERIC_FALLBACK = ", sans-serif";
1582
+ var DEFAULT_NOTICE_FONT_ID = "arial";
1583
+ var CSS_FONT_KEYWORDS = [
1584
+ "inherit",
1585
+ "initial",
1586
+ "revert",
1587
+ "revert-layer",
1588
+ "unset",
1589
+ "serif",
1590
+ "sans-serif",
1591
+ "monospace",
1592
+ "cursive",
1593
+ "fantasy",
1594
+ "system-ui",
1595
+ "ui-serif",
1596
+ "ui-sans-serif",
1597
+ "ui-monospace",
1598
+ "ui-rounded",
1599
+ "math",
1600
+ "emoji",
1601
+ "fangsong"
1602
+ ];
1603
+ var UNSAFE_FONT_CHARACTERS = /["';{}\\]/g;
1604
+ var FONT_NAME_QUOTE_CHARACTERS = /["']/g;
1605
+ var FONT_FAMILY_SEPARATOR = ",";
1606
+ var NOTICE_FONT_FACE_STYLE_ID_PREFIX = "redacto-notice-font-face-";
1607
+ var NOTICE_FONT_LOAD_ERROR_MESSAGE = "[redacto] notice webfont payload failed to load; falling back to the next family in the stack";
1608
+ var NOTICE_FONT_ROOT_ATTRIBUTE = "data-redacto-notice-font";
1609
+ var NOTICE_FONT_ROOT_PROPS = {
1610
+ [NOTICE_FONT_ROOT_ATTRIBUTE]: ""
1611
+ };
1612
+ var NOTICE_FONT_STYLE_ID = "redacto-notice-font-styles";
1613
+ var NOTICE_FONT_CSS = `
1614
+ [${NOTICE_FONT_ROOT_ATTRIBUTE}] button,
1615
+ [${NOTICE_FONT_ROOT_ATTRIBUTE}] input,
1616
+ [${NOTICE_FONT_ROOT_ATTRIBUTE}] optgroup,
1617
+ [${NOTICE_FONT_ROOT_ATTRIBUTE}] option,
1618
+ [${NOTICE_FONT_ROOT_ATTRIBUTE}] select,
1619
+ [${NOTICE_FONT_ROOT_ATTRIBUTE}] textarea {
1620
+ font-family: inherit;
1621
+ }
1622
+ `;
1623
+
1624
+ // src/shared/RequiredMarker.tsx
1625
+ var import_jsx_runtime2 = require("react/jsx-runtime");
1626
+ var RequiredMarker = ({
1627
+ label = REQUIRED_MARKER_ARIA_LABEL
1628
+ }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: REQUIRED_MARKER_STYLE, "aria-label": label, children: REQUIRED_MARKER_GLYPH });
1629
+
1630
+ // src/shared/useNoticeFont.ts
1631
+ var import_react = require("react");
1632
+
1633
+ // src/shared/notice-font.ts
1634
+ var toFontFamilyValue = (value) => {
1635
+ var _a;
1636
+ if (value.includes(",")) {
1637
+ return value;
1638
+ }
1639
+ const family = value.replace(UNSAFE_FONT_CHARACTERS, "").trim();
1640
+ if (!family) {
1641
+ return INHERIT_FONT_FAMILY;
1642
+ }
1643
+ const lowered = family.toLowerCase();
1644
+ if (CSS_FONT_KEYWORDS.includes(lowered)) {
1645
+ return lowered;
1646
+ }
1647
+ return (_a = NOTICE_FONT_STACKS[lowered]) != null ? _a : `"${family}"${NOTICE_FONT_GENERIC_FALLBACK}`;
1648
+ };
1649
+ var toNoticeFontEntry = (fontPreference) => {
1650
+ var _a;
1651
+ const stored = fontPreference == null ? void 0 : fontPreference.trim();
1652
+ if (!stored) {
1653
+ return void 0;
1654
+ }
1655
+ return (_a = NOTICE_FONT_ENTRY_BY_ID[stored.toLowerCase()]) != null ? _a : NOTICE_FONT_ENTRY_BY_ID[DEFAULT_NOTICE_FONT_ID];
1656
+ };
1657
+ var resolveNoticeFontFamily = ({
1658
+ hostFont,
1659
+ noticeFont
1660
+ }) => {
1661
+ var _a, _b;
1662
+ const host = hostFont == null ? void 0 : hostFont.trim();
1663
+ if (host) {
1664
+ return toFontFamilyValue(host);
1665
+ }
1666
+ return (_b = (_a = toNoticeFontEntry(noticeFont)) == null ? void 0 : _a.stack) != null ? _b : INHERIT_FONT_FAMILY;
1667
+ };
1668
+ var fontStylesInjected = false;
1669
+ var injectNoticeFontStyles = () => {
1670
+ if (fontStylesInjected || typeof document === "undefined") {
1671
+ return;
1672
+ }
1673
+ if (document.getElementById(NOTICE_FONT_STYLE_ID)) {
1674
+ fontStylesInjected = true;
1675
+ return;
1676
+ }
1677
+ const style = document.createElement("style");
1678
+ style.id = NOTICE_FONT_STYLE_ID;
1679
+ style.textContent = NOTICE_FONT_CSS;
1680
+ document.head.appendChild(style);
1681
+ fontStylesInjected = true;
1682
+ };
1683
+
1684
+ // src/shared/fonts/font-sources.generated.ts
1685
+ var NOTICE_FONT_SOURCE_IMPORTS = {
1686
+ "montserrat": () => Promise.resolve().then(() => (init_montserrat_generated(), montserrat_generated_exports))
1687
+ };
1688
+
1689
+ // src/shared/notice-webfont.ts
1690
+ var noticeFontOptions = {};
1691
+ var configureNoticeFonts = (options) => {
1692
+ noticeFontOptions = { ...noticeFontOptions, ...options };
1693
+ };
1694
+ var toFamilyTokens = (value) => value.split(FONT_FAMILY_SEPARATOR).map(
1695
+ (token) => token.trim().replace(FONT_NAME_QUOTE_CHARACTERS, "").toLowerCase()
1696
+ );
1697
+ var findNoticeFontEntry = (value) => {
1698
+ const id = toFamilyTokens(value).find(
1699
+ (token) => Boolean(NOTICE_FONT_ENTRY_BY_ID[token])
1700
+ );
1701
+ if (!id) {
1702
+ return void 0;
1703
+ }
1704
+ return NOTICE_FONT_ENTRY_BY_ID[id];
1705
+ };
1706
+ var toFontFaceCss = (entry, sources) => sources.map(
1707
+ ({ weight, url }) => [
1708
+ "@font-face {",
1709
+ ` font-family: "${entry.cssFamily}";`,
1710
+ " font-style: normal;",
1711
+ ` font-weight: ${weight};`,
1712
+ // `swap`, never the `auto` default: auto gives most browsers a ~3s block
1713
+ // period with INVISIBLE text, which is unacceptable for a consent notice.
1714
+ " font-display: swap;",
1715
+ // `local()` still leads: the bundled copy is Latin + Latin-Extended only,
1716
+ // so a visitor's own installation covers more scripts than ours does.
1717
+ ` src: local("${entry.cssFamily}"),`,
1718
+ // Quoted url(): a data URI carries `,` and `;`, which are hostile to an
1719
+ // unquoted url token. Base64 never contains a double quote.
1720
+ ` url("${url}") format("woff2");`,
1721
+ "}"
1722
+ ].join("\n")
1723
+ ).join("\n\n");
1724
+ var fontSourceLoads = /* @__PURE__ */ new Map();
1725
+ var loadFontSources = (entry, importSources) => {
1726
+ const pending = fontSourceLoads.get(entry.id);
1727
+ if (pending) {
1728
+ return pending;
1729
+ }
1730
+ const load = importSources().then((module2) => module2.NOTICE_FONT_SOURCES).catch((error) => {
1731
+ fontSourceLoads.delete(entry.id);
1732
+ throw error;
1733
+ });
1734
+ fontSourceLoads.set(entry.id, load);
1735
+ return load;
1736
+ };
1737
+ var injectedFontFaceIds = /* @__PURE__ */ new Set();
1738
+ var injectFontFace = (entry, sources) => {
1739
+ if (injectedFontFaceIds.has(entry.id)) {
1740
+ return;
1741
+ }
1742
+ injectedFontFaceIds.add(entry.id);
1743
+ const styleId = `${NOTICE_FONT_FACE_STYLE_ID_PREFIX}${entry.slug}`;
1744
+ if (document.getElementById(styleId)) {
1745
+ return;
1746
+ }
1747
+ const style = document.createElement("style");
1748
+ style.id = styleId;
1749
+ style.textContent = toFontFaceCss(entry, sources);
1750
+ document.head.appendChild(style);
1751
+ };
1752
+ var loadNoticeWebfont = async (value, signal) => {
1753
+ if (typeof document === "undefined" || noticeFontOptions.disabled) {
1754
+ return;
1755
+ }
1756
+ if (signal == null ? void 0 : signal.aborted) {
1757
+ return;
1758
+ }
1759
+ const entry = findNoticeFontEntry(value);
1760
+ if (!entry || entry.source !== "webfont" || injectedFontFaceIds.has(entry.id)) {
1761
+ return;
1762
+ }
1763
+ const importSources = NOTICE_FONT_SOURCE_IMPORTS[entry.slug];
1764
+ if (!importSources) {
1765
+ return;
1766
+ }
1767
+ try {
1768
+ const sources = await loadFontSources(entry, importSources);
1769
+ if (signal == null ? void 0 : signal.aborted) {
1770
+ return;
1771
+ }
1772
+ injectFontFace(entry, sources);
1773
+ } catch (error) {
1774
+ console.error(NOTICE_FONT_LOAD_ERROR_MESSAGE, error);
1775
+ }
1776
+ };
1777
+
1778
+ // src/shared/useNoticeFont.ts
1779
+ var useNoticeFont = ({
1780
+ hostFont,
1781
+ noticeFont
1782
+ }) => {
1783
+ const fontFamily = (0, import_react.useMemo)(
1784
+ () => resolveNoticeFontFamily({ hostFont, noticeFont }),
1785
+ [hostFont, noticeFont]
1786
+ );
1787
+ (0, import_react.useEffect)(() => {
1788
+ injectNoticeFontStyles();
1789
+ }, []);
1790
+ (0, import_react.useEffect)(() => {
1791
+ const controller = new AbortController();
1792
+ void loadNoticeWebfont(fontFamily, controller.signal);
1793
+ return () => controller.abort();
1794
+ }, [fontFamily]);
1795
+ return fontFamily;
1796
+ };
1797
+
1560
1798
  // src/RedactoNoticeConsent/useMediaQuery.ts
1561
1799
  var import_react2 = require("react");
1562
1800
  var useMediaQuery = (query) => {
@@ -1648,7 +1886,7 @@ var updateConsentState = (updates) => {
1648
1886
  };
1649
1887
 
1650
1888
  // src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
1651
- var import_jsx_runtime = require("react/jsx-runtime");
1889
+ var import_jsx_runtime3 = require("react/jsx-runtime");
1652
1890
  var PurposeItem = ({
1653
1891
  purpose,
1654
1892
  selectedPurposes,
@@ -1677,9 +1915,9 @@ var PurposeItem = ({
1677
1915
  }),
1678
1916
  [settings == null ? void 0 : settings.textColor]
1679
1917
  );
1680
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
1681
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: styles4.optionItem, children: [
1682
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1918
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
1919
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.optionItem, children: [
1920
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1683
1921
  "div",
1684
1922
  {
1685
1923
  style: styles4.optionLeft,
@@ -1700,7 +1938,7 @@ var PurposeItem = ({
1700
1938
  }
1701
1939
  },
1702
1940
  children: [
1703
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1941
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1704
1942
  "div",
1705
1943
  {
1706
1944
  style: {
@@ -1709,7 +1947,7 @@ var PurposeItem = ({
1709
1947
  justifyContent: "center",
1710
1948
  marginLeft: "5px"
1711
1949
  },
1712
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1950
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1713
1951
  "svg",
1714
1952
  {
1715
1953
  width: "7",
@@ -1726,13 +1964,13 @@ var PurposeItem = ({
1726
1964
  transition: "transform 0.3s ease"
1727
1965
  },
1728
1966
  "aria-hidden": "true",
1729
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M1 1L6 6L1 11" })
1967
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M1 1L6 6L1 11" })
1730
1968
  }
1731
1969
  )
1732
1970
  }
1733
1971
  ),
1734
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: styles4.optionTextContainer, children: [
1735
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1972
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.optionTextContainer, children: [
1973
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1736
1974
  "h2",
1737
1975
  {
1738
1976
  id: `purpose-name-${purpose.uuid}`,
@@ -1741,11 +1979,14 @@ var PurposeItem = ({
1741
1979
  ...responsiveStyles.optionTitle,
1742
1980
  ...headingStyle
1743
1981
  },
1744
- children: getTranslatedText(`purposes.name`, purpose.name, purpose.uuid)
1982
+ children: [
1983
+ getTranslatedText(`purposes.name`, purpose.name, purpose.uuid),
1984
+ hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RequiredMarker, {})
1985
+ ]
1745
1986
  },
1746
1987
  `purpose-name-${purpose.uuid}-${selectedLanguage}`
1747
1988
  ),
1748
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1989
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1749
1990
  "h3",
1750
1991
  {
1751
1992
  id: `purpose-description-${purpose.uuid}`,
@@ -1766,7 +2007,7 @@ var PurposeItem = ({
1766
2007
  ]
1767
2008
  }
1768
2009
  ),
1769
- !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2010
+ !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1770
2011
  "input",
1771
2012
  {
1772
2013
  className: "redacto-checkbox-large",
@@ -1780,7 +2021,7 @@ var PurposeItem = ({
1780
2021
  )}`
1781
2022
  }
1782
2023
  ),
1783
- isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2024
+ isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1784
2025
  "div",
1785
2026
  {
1786
2027
  style: {
@@ -1798,7 +2039,7 @@ var PurposeItem = ({
1798
2039
  purpose.name,
1799
2040
  purpose.uuid
1800
2041
  )}`,
1801
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2042
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1802
2043
  "svg",
1803
2044
  {
1804
2045
  width: "12",
@@ -1807,7 +2048,7 @@ var PurposeItem = ({
1807
2048
  fill: "none",
1808
2049
  xmlns: "http://www.w3.org/2000/svg",
1809
2050
  "aria-hidden": "true",
1810
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2051
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1811
2052
  "path",
1812
2053
  {
1813
2054
  d: "M4 6L5.5 7.5L8.5 4.5",
@@ -1822,17 +2063,17 @@ var PurposeItem = ({
1822
2063
  }
1823
2064
  )
1824
2065
  ] }),
1825
- !collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2066
+ !collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1826
2067
  "div",
1827
2068
  {
1828
2069
  id: `purpose-${purpose.uuid}`,
1829
2070
  style: styles4.dataElementsContainer,
1830
- children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2071
+ children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1831
2072
  "div",
1832
2073
  {
1833
2074
  style: styles4.dataElementItem,
1834
2075
  children: [
1835
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2076
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1836
2077
  "span",
1837
2078
  {
1838
2079
  id: `data-element-${purpose.uuid}-${dataElement.uuid}`,
@@ -1847,22 +2088,12 @@ var PurposeItem = ({
1847
2088
  dataElement.name,
1848
2089
  dataElement.uuid
1849
2090
  ),
1850
- dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1851
- "span",
1852
- {
1853
- style: {
1854
- color: "red",
1855
- marginLeft: "4px"
1856
- },
1857
- "aria-label": "required",
1858
- children: "*"
1859
- }
1860
- )
2091
+ dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RequiredMarker, {})
1861
2092
  ]
1862
2093
  },
1863
2094
  `data-element-${purpose.uuid}-${dataElement.uuid}-${selectedLanguage}`
1864
2095
  ),
1865
- !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2096
+ !isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1866
2097
  "input",
1867
2098
  {
1868
2099
  className: "redacto-checkbox-small",
@@ -1876,11 +2107,11 @@ var PurposeItem = ({
1876
2107
  )}${dataElement.required ? " (required)" : ""}`
1877
2108
  }
1878
2109
  ),
1879
- isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: (() => {
2110
+ isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: (() => {
1880
2111
  const combinedId = `${purpose.uuid}-${dataElement.uuid}`;
1881
2112
  const wasOriginallySelected = initialDataElementSelections[combinedId] || false;
1882
2113
  if (wasOriginallySelected) {
1883
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2114
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1884
2115
  "div",
1885
2116
  {
1886
2117
  style: {
@@ -1897,7 +2128,7 @@ var PurposeItem = ({
1897
2128
  dataElement.name,
1898
2129
  dataElement.uuid
1899
2130
  )}`,
1900
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2131
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1901
2132
  "svg",
1902
2133
  {
1903
2134
  width: "10",
@@ -1906,7 +2137,7 @@ var PurposeItem = ({
1906
2137
  fill: "none",
1907
2138
  xmlns: "http://www.w3.org/2000/svg",
1908
2139
  "aria-hidden": "true",
1909
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2140
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1910
2141
  "path",
1911
2142
  {
1912
2143
  d: "M3 5L4.5 6.5L7.5 3.5",
@@ -1921,7 +2152,7 @@ var PurposeItem = ({
1921
2152
  }
1922
2153
  );
1923
2154
  } else {
1924
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2155
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1925
2156
  "div",
1926
2157
  {
1927
2158
  style: {
@@ -2091,10 +2322,10 @@ var GuardianForm = ({
2091
2322
  };
2092
2323
  const selectedLabel = (_a = RELATIONSHIP_OPTIONS.find((o) => o.value === formData.guardianRelationship)) == null ? void 0 : _a.label;
2093
2324
  const hasError = Boolean(errors.guardianRelationship);
2094
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
2095
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: styles4.topLeft, children: [
2096
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
2097
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2325
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2326
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.topLeft, children: [
2327
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
2328
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2098
2329
  "h2",
2099
2330
  {
2100
2331
  id: "guardian-form-title",
@@ -2109,7 +2340,7 @@ var GuardianForm = ({
2109
2340
  }
2110
2341
  )
2111
2342
  ] }) }),
2112
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2343
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2113
2344
  "div",
2114
2345
  {
2115
2346
  style: {
@@ -2118,7 +2349,7 @@ var GuardianForm = ({
2118
2349
  ...componentTextStyle
2119
2350
  },
2120
2351
  children: [
2121
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2352
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2122
2353
  "p",
2123
2354
  {
2124
2355
  style: {
@@ -2132,8 +2363,8 @@ var GuardianForm = ({
2132
2363
  children: "Since you are under the age of consent, a legal guardian must verify their identity via DigiLocker before you can proceed."
2133
2364
  }
2134
2365
  ),
2135
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: infoBannerStyle, children: [
2136
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2366
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: infoBannerStyle, children: [
2367
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2137
2368
  "svg",
2138
2369
  {
2139
2370
  width: "16",
@@ -2146,15 +2377,15 @@ var GuardianForm = ({
2146
2377
  strokeLinejoin: "round",
2147
2378
  style: { flexShrink: 0, marginTop: "1px" },
2148
2379
  children: [
2149
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
2150
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
2151
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
2380
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
2381
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
2382
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
2152
2383
  ]
2153
2384
  }
2154
2385
  ),
2155
- /* @__PURE__ */ (0, import_jsx_runtime.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." })
2386
+ /* @__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." })
2156
2387
  ] }),
2157
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2388
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2158
2389
  "div",
2159
2390
  {
2160
2391
  style: {
@@ -2163,12 +2394,12 @@ var GuardianForm = ({
2163
2394
  gap: "14px"
2164
2395
  },
2165
2396
  children: [
2166
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
2167
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { htmlFor: "guardianName", style: labelStyle, children: [
2397
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
2398
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { htmlFor: "guardianName", style: labelStyle, children: [
2168
2399
  "Guardian's Full Name ",
2169
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
2400
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
2170
2401
  ] }),
2171
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2402
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2172
2403
  "input",
2173
2404
  {
2174
2405
  id: "guardianName",
@@ -2184,15 +2415,15 @@ var GuardianForm = ({
2184
2415
  "aria-describedby": "guardianName-hint"
2185
2416
  }
2186
2417
  ),
2187
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: "guardianName-hint", style: hintStyle, children: "Enter the full name as per government ID (Aadhaar, PAN, etc.)" }),
2188
- errors.guardianName && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianName })
2418
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { id: "guardianName-hint", style: hintStyle, children: "Enter the full name as per government ID (Aadhaar, PAN, etc.)" }),
2419
+ errors.guardianName && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianName })
2189
2420
  ] }),
2190
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
2191
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { htmlFor: "guardianContact", style: labelStyle, children: [
2421
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
2422
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { htmlFor: "guardianContact", style: labelStyle, children: [
2192
2423
  "Guardian's Phone Number ",
2193
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
2424
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
2194
2425
  ] }),
2195
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2426
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2196
2427
  "input",
2197
2428
  {
2198
2429
  id: "guardianContact",
@@ -2209,15 +2440,15 @@ var GuardianForm = ({
2209
2440
  "aria-describedby": "guardianContact-hint"
2210
2441
  }
2211
2442
  ),
2212
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: "guardianContact-hint", style: hintStyle, children: "Mobile number linked to guardian's Aadhaar" }),
2213
- errors.guardianContact && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianContact })
2443
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { id: "guardianContact-hint", style: hintStyle, children: "Mobile number linked to guardian's Aadhaar" }),
2444
+ errors.guardianContact && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianContact })
2214
2445
  ] }),
2215
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: dropdownRef, style: { position: "relative" }, children: [
2216
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { id: "guardianRelationship-label", style: labelStyle, children: [
2446
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref: dropdownRef, style: { position: "relative" }, children: [
2447
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { id: "guardianRelationship-label", style: labelStyle, children: [
2217
2448
  "Relationship ",
2218
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
2449
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: "#DC2626" }, children: "*" })
2219
2450
  ] }),
2220
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2451
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2221
2452
  "div",
2222
2453
  {
2223
2454
  role: "combobox",
@@ -2245,8 +2476,8 @@ var GuardianForm = ({
2245
2476
  transition: "border-color 0.15s, box-shadow 0.15s"
2246
2477
  },
2247
2478
  children: [
2248
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: selectedLabel || "Select relationship" }),
2249
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2479
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: selectedLabel || "Select relationship" }),
2480
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2250
2481
  "svg",
2251
2482
  {
2252
2483
  width: "14",
@@ -2263,13 +2494,13 @@ var GuardianForm = ({
2263
2494
  transform: isDropdownOpen ? "rotate(180deg)" : "rotate(0deg)",
2264
2495
  transition: "transform 0.2s"
2265
2496
  },
2266
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "6 9 12 15 18 9" })
2497
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polyline", { points: "6 9 12 15 18 9" })
2267
2498
  }
2268
2499
  )
2269
2500
  ]
2270
2501
  }
2271
2502
  ),
2272
- isDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2503
+ isDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2273
2504
  "div",
2274
2505
  {
2275
2506
  ref: optionsRef,
@@ -2296,7 +2527,7 @@ var GuardianForm = ({
2296
2527
  const isSelected = formData.guardianRelationship === option.value;
2297
2528
  const isFocused = focusedIndex === index;
2298
2529
  const accentColor = ((_b2 = (_a2 = settings == null ? void 0 : settings.button) == null ? void 0 : _a2.accept) == null ? void 0 : _b2.backgroundColor) || "#3b82f6";
2299
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2530
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2300
2531
  "div",
2301
2532
  {
2302
2533
  id: `guardianRelationship-option-${index}`,
@@ -2316,8 +2547,8 @@ var GuardianForm = ({
2316
2547
  transition: "background-color 0.1s"
2317
2548
  },
2318
2549
  children: [
2319
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: option.label }),
2320
- isSelected && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2550
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: option.label }),
2551
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2321
2552
  "svg",
2322
2553
  {
2323
2554
  width: "14",
@@ -2329,7 +2560,7 @@ var GuardianForm = ({
2329
2560
  strokeLinecap: "round",
2330
2561
  strokeLinejoin: "round",
2331
2562
  style: { flexShrink: 0 },
2332
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "20 6 9 17 4 12" })
2563
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polyline", { points: "20 6 9 17 4 12" })
2333
2564
  }
2334
2565
  )
2335
2566
  ]
@@ -2339,12 +2570,12 @@ var GuardianForm = ({
2339
2570
  })
2340
2571
  }
2341
2572
  ),
2342
- errors.guardianRelationship && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianRelationship })
2573
+ errors.guardianRelationship && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: errorStyle, role: "alert", children: errors.guardianRelationship })
2343
2574
  ] })
2344
2575
  ]
2345
2576
  }
2346
2577
  ),
2347
- errors.general && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2578
+ errors.general && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2348
2579
  "div",
2349
2580
  {
2350
2581
  role: "alert",
@@ -2364,7 +2595,7 @@ var GuardianForm = ({
2364
2595
  ]
2365
2596
  }
2366
2597
  ),
2367
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2598
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2368
2599
  "div",
2369
2600
  {
2370
2601
  style: {
@@ -2374,7 +2605,7 @@ var GuardianForm = ({
2374
2605
  paddingTop: "12px"
2375
2606
  },
2376
2607
  children: [
2377
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2608
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2378
2609
  "button",
2379
2610
  {
2380
2611
  style: {
@@ -2390,7 +2621,7 @@ var GuardianForm = ({
2390
2621
  children: isSubmitting ? "Verifying..." : "Verify via DigiLocker"
2391
2622
  }
2392
2623
  ),
2393
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2624
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2394
2625
  "button",
2395
2626
  {
2396
2627
  style: {
@@ -2459,10 +2690,10 @@ var VerificationScreen = ({
2459
2690
  animation: "spin 1s linear infinite",
2460
2691
  margin: "24px auto"
2461
2692
  };
2462
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
2463
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: styles4.topLeft, children: [
2464
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
2465
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2693
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2694
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.topLeft, children: [
2695
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
2696
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2466
2697
  "h2",
2467
2698
  {
2468
2699
  id: "verification-title",
@@ -2477,7 +2708,7 @@ var VerificationScreen = ({
2477
2708
  }
2478
2709
  )
2479
2710
  ] }) }),
2480
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2711
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2481
2712
  "div",
2482
2713
  {
2483
2714
  style: {
@@ -2487,7 +2718,7 @@ var VerificationScreen = ({
2487
2718
  textAlign: "center"
2488
2719
  },
2489
2720
  children: [
2490
- isVerificationComplete && !error ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2721
+ isVerificationComplete && !error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2491
2722
  "div",
2492
2723
  {
2493
2724
  style: {
@@ -2498,7 +2729,7 @@ var VerificationScreen = ({
2498
2729
  flex: 1
2499
2730
  },
2500
2731
  children: [
2501
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2732
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2502
2733
  "div",
2503
2734
  {
2504
2735
  style: {
@@ -2510,7 +2741,7 @@ var VerificationScreen = ({
2510
2741
  alignItems: "center",
2511
2742
  justifyContent: "center"
2512
2743
  },
2513
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2744
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2514
2745
  "svg",
2515
2746
  {
2516
2747
  width: "32",
@@ -2521,12 +2752,12 @@ var VerificationScreen = ({
2521
2752
  strokeWidth: "2",
2522
2753
  strokeLinecap: "round",
2523
2754
  strokeLinejoin: "round",
2524
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "20 6 9 17 4 12" })
2755
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polyline", { points: "20 6 9 17 4 12" })
2525
2756
  }
2526
2757
  )
2527
2758
  }
2528
2759
  ),
2529
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2760
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2530
2761
  "p",
2531
2762
  {
2532
2763
  style: {
@@ -2542,12 +2773,12 @@ var VerificationScreen = ({
2542
2773
  )
2543
2774
  ]
2544
2775
  }
2545
- ) : (isInitiating || isPolling) && !error ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
2546
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: spinnerStyle }),
2547
- /* @__PURE__ */ (0, import_jsx_runtime.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." })
2776
+ ) : (isInitiating || isPolling) && !error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2777
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: spinnerStyle }),
2778
+ /* @__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." })
2548
2779
  ] }) : null,
2549
- error && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
2550
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2780
+ error && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2781
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2551
2782
  "div",
2552
2783
  {
2553
2784
  style: {
@@ -2560,7 +2791,7 @@ var VerificationScreen = ({
2560
2791
  justifyContent: "center",
2561
2792
  margin: "24px auto"
2562
2793
  },
2563
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2794
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2564
2795
  "svg",
2565
2796
  {
2566
2797
  width: "32",
@@ -2572,14 +2803,14 @@ var VerificationScreen = ({
2572
2803
  strokeLinecap: "round",
2573
2804
  strokeLinejoin: "round",
2574
2805
  children: [
2575
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2576
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
2806
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2807
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
2577
2808
  ]
2578
2809
  }
2579
2810
  )
2580
2811
  }
2581
2812
  ),
2582
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2813
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2583
2814
  "p",
2584
2815
  {
2585
2816
  style: {
@@ -2593,12 +2824,12 @@ var VerificationScreen = ({
2593
2824
  children: "Verification failed"
2594
2825
  }
2595
2826
  ),
2596
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: errorStyle, children: error })
2827
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: errorStyle, children: error })
2597
2828
  ] })
2598
2829
  ]
2599
2830
  }
2600
2831
  ),
2601
- isAutoTransitioning ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2832
+ isAutoTransitioning ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2602
2833
  "div",
2603
2834
  {
2604
2835
  style: {
@@ -2610,7 +2841,7 @@ var VerificationScreen = ({
2610
2841
  gap: "12px",
2611
2842
  justifyContent: "center"
2612
2843
  },
2613
- children: isVerificationComplete && !error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2844
+ children: isVerificationComplete && !error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2614
2845
  "button",
2615
2846
  {
2616
2847
  style: {
@@ -2623,7 +2854,7 @@ var VerificationScreen = ({
2623
2854
  "aria-label": "Continue to consent form",
2624
2855
  children: "Continue"
2625
2856
  }
2626
- ) : error && canRetry ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2857
+ ) : error && canRetry ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2627
2858
  "button",
2628
2859
  {
2629
2860
  style: {
@@ -2637,7 +2868,7 @@ var VerificationScreen = ({
2637
2868
  "aria-label": errorCode === "GUARDIAN_UNDER_18" ? "Change guardian details" : "Try verification again",
2638
2869
  children: errorCode === "GUARDIAN_UNDER_18" ? "Change Guardian" : "Try Again"
2639
2870
  }
2640
- ) : error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2871
+ ) : error ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2641
2872
  "button",
2642
2873
  {
2643
2874
  style: {
@@ -2651,7 +2882,7 @@ var VerificationScreen = ({
2651
2882
  "aria-label": "Go back",
2652
2883
  children: "Go Back"
2653
2884
  }
2654
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2885
+ ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2655
2886
  "button",
2656
2887
  {
2657
2888
  style: {
@@ -2683,11 +2914,11 @@ var AgeVerification = ({
2683
2914
  logoUrl,
2684
2915
  isMobile
2685
2916
  }) => {
2686
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
2687
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: [
2688
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: styles4.topLeft, children: [
2689
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Redacto Logo" }),
2690
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2917
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2918
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: [
2919
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles4.topLeft, children: [
2920
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { style: styles4.logo, src: logoUrl, alt: "Redacto Logo" }),
2921
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2691
2922
  "h2",
2692
2923
  {
2693
2924
  id: "age-verification-title",
@@ -2700,7 +2931,7 @@ var AgeVerification = ({
2700
2931
  }
2701
2932
  )
2702
2933
  ] }),
2703
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2934
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2704
2935
  "button",
2705
2936
  {
2706
2937
  onClick: onClose,
@@ -2715,7 +2946,7 @@ var AgeVerification = ({
2715
2946
  justifyContent: "center"
2716
2947
  },
2717
2948
  "aria-label": "Close modal",
2718
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2949
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2719
2950
  "svg",
2720
2951
  {
2721
2952
  width: isMobile ? "18" : "20",
@@ -2724,7 +2955,7 @@ var AgeVerification = ({
2724
2955
  fill: "none",
2725
2956
  xmlns: "http://www.w3.org/2000/svg",
2726
2957
  "aria-hidden": "true",
2727
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2958
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2728
2959
  "path",
2729
2960
  {
2730
2961
  d: "M15 5L5 15M5 5L15 15",
@@ -2739,7 +2970,7 @@ var AgeVerification = ({
2739
2970
  }
2740
2971
  )
2741
2972
  ] }),
2742
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2973
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2743
2974
  "div",
2744
2975
  {
2745
2976
  style: {
@@ -2748,7 +2979,7 @@ var AgeVerification = ({
2748
2979
  ...componentTextStyle
2749
2980
  },
2750
2981
  children: [
2751
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2982
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2752
2983
  "p",
2753
2984
  {
2754
2985
  style: {
@@ -2760,7 +2991,7 @@ var AgeVerification = ({
2760
2991
  children: "To proceed with this consent form, we need to verify your age."
2761
2992
  }
2762
2993
  ),
2763
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2994
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2764
2995
  "p",
2765
2996
  {
2766
2997
  style: {
@@ -2775,7 +3006,7 @@ var AgeVerification = ({
2775
3006
  ]
2776
3007
  }
2777
3008
  ),
2778
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
3009
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2779
3010
  "div",
2780
3011
  {
2781
3012
  style: {
@@ -2784,7 +3015,7 @@ var AgeVerification = ({
2784
3015
  ...componentTextStyle
2785
3016
  },
2786
3017
  children: [
2787
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
3018
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2788
3019
  "button",
2789
3020
  {
2790
3021
  style: {
@@ -2799,7 +3030,7 @@ var AgeVerification = ({
2799
3030
  children: "Yes, I am 18 or older"
2800
3031
  }
2801
3032
  ),
2802
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
3033
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2803
3034
  "button",
2804
3035
  {
2805
3036
  style: {
@@ -2846,7 +3077,7 @@ var RedactoNoticeConsent = ({
2846
3077
  includeFullyConsentedData = false,
2847
3078
  reviewModeButtonText = "Continue"
2848
3079
  }) => {
2849
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
3080
+ 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;
2850
3081
  const sandboxParams = (0, import_react3.useMemo)(
2851
3082
  () => ({
2852
3083
  token,
@@ -2885,7 +3116,7 @@ var RedactoNoticeConsent = ({
2885
3116
  ucic
2886
3117
  ]);
2887
3118
  if (propValidationError) {
2888
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
3119
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2889
3120
  "div",
2890
3121
  {
2891
3122
  style: {
@@ -2896,9 +3127,9 @@ var RedactoNoticeConsent = ({
2896
3127
  color: "#c33"
2897
3128
  },
2898
3129
  children: [
2899
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "Configuration Error" }),
2900
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: propValidationError }),
2901
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Please check your component props and try again." })
3130
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { children: "Configuration Error" }),
3131
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { children: propValidationError }),
3132
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { children: "Please check your component props and try again." })
2902
3133
  ]
2903
3134
  }
2904
3135
  );
@@ -3075,7 +3306,7 @@ var RedactoNoticeConsent = ({
3075
3306
  if (!content) return false;
3076
3307
  return content.purposes.every((purpose) => {
3077
3308
  const requiredElements = purpose.data_elements.filter(
3078
- (element) => element.required
3309
+ (element) => element.required && element.enabled
3079
3310
  );
3080
3311
  return requiredElements.every(
3081
3312
  (element) => selectedDataElements[`${purpose.uuid}-${element.uuid}`]
@@ -3279,12 +3510,18 @@ var RedactoNoticeConsent = ({
3279
3510
  )
3280
3511
  } : null;
3281
3512
  setCategorizedPurposes(newCategorizedPurposes);
3513
+ const preselection = buildPreselection(
3514
+ activeConfig.purposes,
3515
+ resolvePurposePreselection(activeConfig.purpose_preselection)
3516
+ );
3282
3517
  const initialPurposeState = activeConfig.purposes.reduce(
3283
3518
  (acc, purpose) => {
3284
- if (purposeSelections == null ? void 0 : purposeSelections[purpose.uuid]) {
3285
- acc[purpose.uuid] = purposeSelections[purpose.uuid].selected;
3519
+ var _a3;
3520
+ const recorded = purposeSelections == null ? void 0 : purposeSelections[purpose.uuid];
3521
+ if (hasRecordedPurposeState(recorded)) {
3522
+ acc[purpose.uuid] = recorded.selected;
3286
3523
  } else {
3287
- acc[purpose.uuid] = false;
3524
+ acc[purpose.uuid] = (_a3 = preselection.selectedPurposes[purpose.uuid]) != null ? _a3 : false;
3288
3525
  }
3289
3526
  return acc;
3290
3527
  },
@@ -3293,13 +3530,18 @@ var RedactoNoticeConsent = ({
3293
3530
  setSelectedPurposes(initialPurposeState);
3294
3531
  const initialDataElementState = activeConfig.purposes.reduce(
3295
3532
  (acc, purpose) => {
3533
+ const hasRecordedSelection = hasRecordedPurposeState(
3534
+ purposeSelections == null ? void 0 : purposeSelections[purpose.uuid]
3535
+ );
3296
3536
  purpose.data_elements.forEach((element) => {
3297
- var _a3, _b2;
3537
+ var _a3, _b2, _c2;
3298
3538
  const combinedId = `${purpose.uuid}-${element.uuid}`;
3299
3539
  if ((_b2 = (_a3 = purposeSelections == null ? void 0 : purposeSelections[purpose.uuid]) == null ? void 0 : _a3.data_elements) == null ? void 0 : _b2[element.uuid]) {
3300
3540
  acc[combinedId] = purposeSelections[purpose.uuid].data_elements[element.uuid].selected;
3301
- } else {
3541
+ } else if (hasRecordedSelection) {
3302
3542
  acc[combinedId] = false;
3543
+ } else {
3544
+ acc[combinedId] = (_c2 = preselection.selectedDataElements[combinedId]) != null ? _c2 : false;
3303
3545
  }
3304
3546
  });
3305
3547
  return acc;
@@ -3457,7 +3699,7 @@ var RedactoNoticeConsent = ({
3457
3699
  return newState;
3458
3700
  });
3459
3701
  };
3460
- const handleAccept = async () => {
3702
+ const handleAccept = async (mode = "selected") => {
3461
3703
  const submitController = new AbortController();
3462
3704
  try {
3463
3705
  if (isMinorFlow && !verificationReference) {
@@ -3468,6 +3710,14 @@ var RedactoNoticeConsent = ({
3468
3710
  setIsSubmitting(true);
3469
3711
  setErrorMessage(null);
3470
3712
  if (content) {
3713
+ const selection = buildSelectionForMode(content.purposes, mode, {
3714
+ selectedPurposes,
3715
+ selectedDataElements
3716
+ });
3717
+ if (mode !== "selected") {
3718
+ setSelectedPurposes(selection.selectedPurposes);
3719
+ setSelectedDataElements(selection.selectedDataElements);
3720
+ }
3471
3721
  await submitConsentEvent({
3472
3722
  accessToken,
3473
3723
  baseUrl,
@@ -3477,11 +3727,11 @@ var RedactoNoticeConsent = ({
3477
3727
  const isAlreadyConsented = (categorizedPurposes == null ? void 0 : categorizedPurposes.alreadyConsented.some(
3478
3728
  (p) => p.uuid === purpose.uuid
3479
3729
  )) || false;
3480
- let purposeSelected = selectedPurposes[purpose.uuid] || false;
3481
- if (isAlreadyConsented) {
3730
+ let purposeSelected = selection.selectedPurposes[purpose.uuid] || false;
3731
+ if (mode === "selected" && isAlreadyConsented) {
3482
3732
  const wasModified = purpose.data_elements.some((element) => {
3483
3733
  const combinedId = `${purpose.uuid}-${element.uuid}`;
3484
- const currentSelection = selectedDataElements[combinedId] || false;
3734
+ const currentSelection = selection.selectedDataElements[combinedId] || false;
3485
3735
  const initialSelection = initialDataElementSelections[combinedId] || false;
3486
3736
  return currentSelection !== initialSelection;
3487
3737
  });
@@ -3494,7 +3744,7 @@ var RedactoNoticeConsent = ({
3494
3744
  selected: purposeSelected,
3495
3745
  data_elements: purpose.data_elements.map((element) => ({
3496
3746
  ...element,
3497
- selected: element.required ? true : selectedDataElements[`${purpose.uuid}-${element.uuid}`] || false
3747
+ selected: element.required ? true : selection.selectedDataElements[`${purpose.uuid}-${element.uuid}`] || false
3498
3748
  }))
3499
3749
  };
3500
3750
  }),
@@ -4012,6 +4262,9 @@ var RedactoNoticeConsent = ({
4012
4262
  }
4013
4263
  });
4014
4264
  }
4265
+ if (ttsAudioUrls.accept_all_button_text_audio_url) {
4266
+ sequence.push(ttsAudioUrls.accept_all_button_text_audio_url);
4267
+ }
4015
4268
  if (ttsAudioUrls.confirm_button_text_audio_url) {
4016
4269
  sequence.push(ttsAudioUrls.confirm_button_text_audio_url);
4017
4270
  }
@@ -4073,11 +4326,14 @@ var RedactoNoticeConsent = ({
4073
4326
  }
4074
4327
  });
4075
4328
  }
4329
+ if (ttsAudioUrls.accept_all_button_text_audio_url) {
4330
+ elementIds.push(ACCEPT_ALL_BUTTON_ID);
4331
+ }
4076
4332
  if (ttsAudioUrls.confirm_button_text_audio_url) {
4077
- elementIds.push("confirm-button-text");
4333
+ elementIds.push(ACCEPT_SELECTED_BUTTON_ID);
4078
4334
  }
4079
4335
  if (ttsAudioUrls.decline_button_text_audio_url) {
4080
- elementIds.push("decline-button-text");
4336
+ elementIds.push(DECLINE_BUTTON_ID);
4081
4337
  }
4082
4338
  return elementIds;
4083
4339
  }, [ttsAudioUrls, content, categorizedPurposes]);
@@ -4261,30 +4517,52 @@ var RedactoNoticeConsent = ({
4261
4517
  const buttonStyle = {
4262
4518
  borderRadius: (settings == null ? void 0 : settings.borderRadius) || "8px"
4263
4519
  };
4264
- const acceptButtonStyle = {
4520
+ const acceptAllButtonStyle = {
4521
+ ...buttonStyle,
4522
+ 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",
4523
+ 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"
4524
+ };
4525
+ const acceptSelectedButtonStyle = {
4265
4526
  ...buttonStyle,
4266
- backgroundColor: ((_b = (_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) == null ? void 0 : _b.backgroundColor) || (content == null ? void 0 : content.primary_color) || "#4f87ff",
4267
- color: ((_d = (_c = settings == null ? void 0 : settings.button) == null ? void 0 : _c.accept) == null ? void 0 : _d.textColor) || "#ffffff"
4527
+ backgroundColor: "#ffffff",
4528
+ 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",
4529
+ 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"
4268
4530
  };
4269
4531
  const declineButtonStyle = {
4270
4532
  ...buttonStyle,
4271
- backgroundColor: ((_f = (_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.decline) == null ? void 0 : _f.backgroundColor) || "#ffffff",
4272
- color: ((_h = (_g = settings == null ? void 0 : settings.button) == null ? void 0 : _g.decline) == null ? void 0 : _h.textColor) || "#000000",
4533
+ backgroundColor: ((_n = (_m = settings == null ? void 0 : settings.button) == null ? void 0 : _m.decline) == null ? void 0 : _n.backgroundColor) || "#ffffff",
4534
+ color: ((_p = (_o = settings == null ? void 0 : settings.button) == null ? void 0 : _o.decline) == null ? void 0 : _p.textColor) || "#000000",
4273
4535
  borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
4274
4536
  };
4537
+ const actionLabels = {
4538
+ acceptAll: getTranslatedText(
4539
+ "accept_all_button_text",
4540
+ (content == null ? void 0 : content.accept_all_button_text) || DEFAULT_ACCEPT_ALL_BUTTON_TEXT
4541
+ ),
4542
+ acceptSelected: getTranslatedText(
4543
+ "confirm_button_text",
4544
+ (content == null ? void 0 : content.confirm_button_text) || DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT
4545
+ ),
4546
+ decline: getTranslatedText(
4547
+ "decline_button_text",
4548
+ (content == null ? void 0 : content.decline_button_text) || DEFAULT_DECLINE_BUTTON_TEXT
4549
+ )
4550
+ };
4551
+ const handleAcceptAll = () => handleAccept("all");
4552
+ const handleAcceptSelected = () => handleAccept("selected");
4275
4553
  const linkStyle = {
4276
4554
  color: (settings == null ? void 0 : settings.link) || (content == null ? void 0 : content.secondary_color) || "#4f87ff"
4277
4555
  };
4278
4556
  const languageSelectorStyle = {
4279
4557
  borderRadius: (settings == null ? void 0 : settings.borderRadius) || "8px",
4280
4558
  borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd",
4281
- backgroundColor: ((_j = (_i = settings == null ? void 0 : settings.button) == null ? void 0 : _i.language) == null ? void 0 : _j.backgroundColor) || "#ffffff",
4282
- color: ((_l = (_k = settings == null ? void 0 : settings.button) == null ? void 0 : _k.language) == null ? void 0 : _l.textColor) || "#344054"
4559
+ backgroundColor: ((_r = (_q = settings == null ? void 0 : settings.button) == null ? void 0 : _q.language) == null ? void 0 : _r.backgroundColor) || "#ffffff",
4560
+ color: ((_t = (_s = settings == null ? void 0 : settings.button) == null ? void 0 : _s.language) == null ? void 0 : _t.textColor) || "#344054"
4283
4561
  };
4284
4562
  const selectedLanguageItemStyle = {
4285
4563
  ...languageSelectorStyle,
4286
- backgroundColor: ((_n = (_m = settings == null ? void 0 : settings.button) == null ? void 0 : _m.language) == null ? void 0 : _n.selectedBackgroundColor) || "#f3f4f6",
4287
- color: ((_p = (_o = settings == null ? void 0 : settings.button) == null ? void 0 : _o.language) == null ? void 0 : _p.selectedTextColor) || "#344054",
4564
+ backgroundColor: ((_v = (_u = settings == null ? void 0 : settings.button) == null ? void 0 : _u.language) == null ? void 0 : _v.selectedBackgroundColor) || "#f3f4f6",
4565
+ color: ((_x = (_w = settings == null ? void 0 : settings.button) == null ? void 0 : _w.language) == null ? void 0 : _x.selectedTextColor) || "#344054",
4288
4566
  fontWeight: 600
4289
4567
  };
4290
4568
  const handleCloseError = () => {
@@ -4398,8 +4676,8 @@ var RedactoNoticeConsent = ({
4398
4676
  clearConsentState();
4399
4677
  }
4400
4678
  }, [startStatusPolling, noticeId]);
4401
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: hasAlreadyConsented ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
4402
- blockUI && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4679
+ 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: [
4680
+ blockUI && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4403
4681
  "div",
4404
4682
  {
4405
4683
  style: styles.overlay,
@@ -4407,7 +4685,7 @@ var RedactoNoticeConsent = ({
4407
4685
  role: "presentation"
4408
4686
  }
4409
4687
  ),
4410
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4688
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4411
4689
  "div",
4412
4690
  {
4413
4691
  ref: modalRef,
@@ -4422,7 +4700,7 @@ var RedactoNoticeConsent = ({
4422
4700
  "aria-labelledby": "privacy-notice-title",
4423
4701
  "aria-describedby": "privacy-notice-description",
4424
4702
  tabIndex: -1,
4425
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
4703
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4426
4704
  "div",
4427
4705
  {
4428
4706
  role: "status",
@@ -4430,11 +4708,11 @@ var RedactoNoticeConsent = ({
4430
4708
  "aria-label": "Loading consent notice",
4431
4709
  style: styles.loadingContainer,
4432
4710
  children: [
4433
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: styles.loadingSpinner, "aria-hidden": "true" }),
4434
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: { ...styles.privacyText, ...componentTextStyle }, children: "Loading..." })
4711
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles.loadingSpinner, "aria-hidden": "true" }),
4712
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: { ...styles.privacyText, ...componentTextStyle }, children: "Loading..." })
4435
4713
  ]
4436
4714
  }
4437
- ) : fetchError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4715
+ ) : fetchError ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4438
4716
  "div",
4439
4717
  {
4440
4718
  role: "alert",
@@ -4450,7 +4728,7 @@ var RedactoNoticeConsent = ({
4450
4728
  textAlign: "center",
4451
4729
  padding: "40px 20px"
4452
4730
  },
4453
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
4731
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4454
4732
  "div",
4455
4733
  {
4456
4734
  style: {
@@ -4463,7 +4741,7 @@ var RedactoNoticeConsent = ({
4463
4741
  position: "relative"
4464
4742
  },
4465
4743
  children: [
4466
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4744
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4467
4745
  "button",
4468
4746
  {
4469
4747
  onClick: handleDecline,
@@ -4481,7 +4759,7 @@ var RedactoNoticeConsent = ({
4481
4759
  justifyContent: "center"
4482
4760
  },
4483
4761
  "aria-label": "Close error message",
4484
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4762
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4485
4763
  "svg",
4486
4764
  {
4487
4765
  width: isMobile ? "14" : "16",
@@ -4490,7 +4768,7 @@ var RedactoNoticeConsent = ({
4490
4768
  fill: "none",
4491
4769
  xmlns: "http://www.w3.org/2000/svg",
4492
4770
  "aria-hidden": "true",
4493
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4771
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4494
4772
  "path",
4495
4773
  {
4496
4774
  d: "M12 4L4 12M4 4L12 12",
@@ -4504,7 +4782,7 @@ var RedactoNoticeConsent = ({
4504
4782
  )
4505
4783
  }
4506
4784
  ),
4507
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4785
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4508
4786
  "h3",
4509
4787
  {
4510
4788
  style: {
@@ -4515,7 +4793,7 @@ var RedactoNoticeConsent = ({
4515
4793
  children: "Error Loading Consent Notice"
4516
4794
  }
4517
4795
  ),
4518
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4796
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4519
4797
  "p",
4520
4798
  {
4521
4799
  style: {
@@ -4526,7 +4804,7 @@ var RedactoNoticeConsent = ({
4526
4804
  children: fetchError.message || "Failed to load consent notice. Please try again."
4527
4805
  }
4528
4806
  ),
4529
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4807
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4530
4808
  "button",
4531
4809
  {
4532
4810
  onClick: fetchNotice,
@@ -4551,7 +4829,7 @@ var RedactoNoticeConsent = ({
4551
4829
  }
4552
4830
  )
4553
4831
  }
4554
- ) : showAgeVerification ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4832
+ ) : showAgeVerification ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4555
4833
  AgeVerification,
4556
4834
  {
4557
4835
  onYes: handleAgeVerificationYes,
@@ -4561,12 +4839,12 @@ var RedactoNoticeConsent = ({
4561
4839
  responsiveStyles,
4562
4840
  componentHeadingStyle,
4563
4841
  componentTextStyle,
4564
- acceptButtonStyle,
4842
+ acceptButtonStyle: acceptAllButtonStyle,
4565
4843
  declineButtonStyle,
4566
4844
  logoUrl: (content == null ? void 0 : content.logo_url) || redacto_logo_default,
4567
4845
  isMobile
4568
4846
  }
4569
- ) }) : showGuardianForm ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4847
+ ) }) : showGuardianForm ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4570
4848
  GuardianForm,
4571
4849
  {
4572
4850
  formData: guardianFormData,
@@ -4580,11 +4858,11 @@ var RedactoNoticeConsent = ({
4580
4858
  settings,
4581
4859
  componentHeadingStyle,
4582
4860
  componentTextStyle,
4583
- acceptButtonStyle,
4861
+ acceptButtonStyle: acceptAllButtonStyle,
4584
4862
  declineButtonStyle,
4585
4863
  logoUrl: (content == null ? void 0 : content.logo_url) || redacto_logo_default
4586
4864
  }
4587
- ) }) : showVerificationScreen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4865
+ ) }) : showVerificationScreen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4588
4866
  VerificationScreen,
4589
4867
  {
4590
4868
  onBack: handleBackToGuardianForm,
@@ -4601,12 +4879,12 @@ var RedactoNoticeConsent = ({
4601
4879
  settings,
4602
4880
  componentHeadingStyle,
4603
4881
  componentTextStyle,
4604
- acceptButtonStyle,
4882
+ acceptButtonStyle: acceptAllButtonStyle,
4605
4883
  declineButtonStyle,
4606
4884
  logoUrl: (content == null ? void 0 : content.logo_url) || redacto_logo_default
4607
4885
  }
4608
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: [
4609
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
4886
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { ...styles.content, ...responsiveStyles.content }, children: [
4887
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4610
4888
  "div",
4611
4889
  {
4612
4890
  role: "alert",
@@ -4624,8 +4902,8 @@ var RedactoNoticeConsent = ({
4624
4902
  justifyContent: "space-between"
4625
4903
  },
4626
4904
  children: [
4627
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: errorMessage }),
4628
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4905
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: errorMessage }),
4906
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4629
4907
  "button",
4630
4908
  {
4631
4909
  type: "button",
@@ -4642,7 +4920,7 @@ var RedactoNoticeConsent = ({
4642
4920
  justifyContent: "center"
4643
4921
  },
4644
4922
  "aria-label": "Close error message",
4645
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4923
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4646
4924
  "svg",
4647
4925
  {
4648
4926
  width: "16",
@@ -4651,7 +4929,7 @@ var RedactoNoticeConsent = ({
4651
4929
  fill: "none",
4652
4930
  xmlns: "http://www.w3.org/2000/svg",
4653
4931
  "aria-hidden": "true",
4654
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4932
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4655
4933
  "path",
4656
4934
  {
4657
4935
  d: "M12 4L4 12M4 4L12 12",
@@ -4668,7 +4946,7 @@ var RedactoNoticeConsent = ({
4668
4946
  ]
4669
4947
  }
4670
4948
  ),
4671
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4949
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4672
4950
  "div",
4673
4951
  {
4674
4952
  style: {
@@ -4678,7 +4956,7 @@ var RedactoNoticeConsent = ({
4678
4956
  },
4679
4957
  children: (() => {
4680
4958
  var _a2, _b2, _c2, _d2, _e2, _f2;
4681
- const logoNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4959
+ const logoNode = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4682
4960
  "img",
4683
4961
  {
4684
4962
  style: { ...styles.logo, ...responsiveStyles.logo },
@@ -4686,7 +4964,7 @@ var RedactoNoticeConsent = ({
4686
4964
  alt: "Redacto Logo"
4687
4965
  }
4688
4966
  );
4689
- const titleNode = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4967
+ const titleNode = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4690
4968
  "h2",
4691
4969
  {
4692
4970
  id: "privacy-notice-title",
@@ -4702,8 +4980,8 @@ var RedactoNoticeConsent = ({
4702
4980
  },
4703
4981
  `privacy-notice-title-${selectedLanguage}`
4704
4982
  );
4705
- const controlsBlock = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: styles.languageSelectorContainer, children: [
4706
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
4983
+ const controlsBlock = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles.languageSelectorContainer, children: [
4984
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4707
4985
  "div",
4708
4986
  {
4709
4987
  style: {
@@ -4712,7 +4990,7 @@ var RedactoNoticeConsent = ({
4712
4990
  gap: "8px"
4713
4991
  },
4714
4992
  children: [
4715
- isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
4993
+ isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4716
4994
  "button",
4717
4995
  {
4718
4996
  onClick: toggleAudio,
@@ -4729,7 +5007,7 @@ var RedactoNoticeConsent = ({
4729
5007
  title: isPlaying && !isPaused ? "Pause Talkback" : isPaused ? "Resume Talkback" : "Start Talkback",
4730
5008
  children: isPlaying && !isPaused ? (
4731
5009
  // Pause icon
4732
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
5010
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4733
5011
  "svg",
4734
5012
  {
4735
5013
  xmlns: "http://www.w3.org/2000/svg",
@@ -4743,14 +5021,14 @@ var RedactoNoticeConsent = ({
4743
5021
  strokeLinejoin: "round",
4744
5022
  "aria-hidden": "true",
4745
5023
  children: [
4746
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "6", y: "4", width: "4", height: "16" }),
4747
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "14", y: "4", width: "4", height: "16" })
5024
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "6", y: "4", width: "4", height: "16" }),
5025
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "14", y: "4", width: "4", height: "16" })
4748
5026
  ]
4749
5027
  }
4750
5028
  )
4751
5029
  ) : (
4752
5030
  // Play/Sound icon
4753
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
5031
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4754
5032
  "svg",
4755
5033
  {
4756
5034
  xmlns: "http://www.w3.org/2000/svg",
@@ -4764,15 +5042,15 @@ var RedactoNoticeConsent = ({
4764
5042
  strokeLinejoin: "round",
4765
5043
  "aria-hidden": "true",
4766
5044
  children: [
4767
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
4768
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07" })
5045
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
5046
+ /* @__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" })
4769
5047
  ]
4770
5048
  }
4771
5049
  )
4772
5050
  )
4773
5051
  }
4774
5052
  ),
4775
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
5053
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4776
5054
  "button",
4777
5055
  {
4778
5056
  ref: firstFocusableRef,
@@ -4788,7 +5066,7 @@ var RedactoNoticeConsent = ({
4788
5066
  "aria-label": `Select language. Current language: ${toNativeLabel(selectedLanguage)}`,
4789
5067
  children: [
4790
5068
  toNativeLabel(selectedLanguage),
4791
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5069
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4792
5070
  "svg",
4793
5071
  {
4794
5072
  xmlns: "http://www.w3.org/2000/svg",
@@ -4802,7 +5080,7 @@ var RedactoNoticeConsent = ({
4802
5080
  strokeLinejoin: "round",
4803
5081
  style: { flexShrink: 0, marginLeft: "4px" },
4804
5082
  "aria-hidden": "true",
4805
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M4 6l4 4 4-4" })
5083
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 6l4 4 4-4" })
4806
5084
  }
4807
5085
  )
4808
5086
  ]
@@ -4811,7 +5089,7 @@ var RedactoNoticeConsent = ({
4811
5089
  ]
4812
5090
  }
4813
5091
  ),
4814
- isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5092
+ isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4815
5093
  "ul",
4816
5094
  {
4817
5095
  id: "language-listbox",
@@ -4821,7 +5099,7 @@ var RedactoNoticeConsent = ({
4821
5099
  },
4822
5100
  role: "listbox",
4823
5101
  "aria-label": "Select language",
4824
- children: availableLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5102
+ children: availableLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4825
5103
  "li",
4826
5104
  {
4827
5105
  style: {
@@ -4842,9 +5120,9 @@ var RedactoNoticeConsent = ({
4842
5120
  }
4843
5121
  )
4844
5122
  ] });
4845
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
4846
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: logoRowStyle, children: logoNode }),
4847
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: styles.headerRow, children: [
5123
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
5124
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: logoRowStyle, children: logoNode }),
5125
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles.headerRow, children: [
4848
5126
  titleNode,
4849
5127
  controlsBlock
4850
5128
  ] })
@@ -4852,7 +5130,7 @@ var RedactoNoticeConsent = ({
4852
5130
  })()
4853
5131
  }
4854
5132
  ),
4855
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
5133
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4856
5134
  "div",
4857
5135
  {
4858
5136
  id: "privacy-notice-description",
@@ -4862,7 +5140,7 @@ var RedactoNoticeConsent = ({
4862
5140
  ...sectionStyle
4863
5141
  },
4864
5142
  children: [
4865
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
5143
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4866
5144
  "p",
4867
5145
  {
4868
5146
  style: {
@@ -4871,7 +5149,7 @@ var RedactoNoticeConsent = ({
4871
5149
  ...componentTextStyle
4872
5150
  },
4873
5151
  children: [
4874
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5152
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4875
5153
  "span",
4876
5154
  {
4877
5155
  id: "privacy-notice-text",
@@ -4879,8 +5157,8 @@ var RedactoNoticeConsent = ({
4879
5157
  },
4880
5158
  `privacy-notice-text-${selectedLanguage}`
4881
5159
  ),
4882
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
4883
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
5160
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
5161
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
4884
5162
  "span",
4885
5163
  {
4886
5164
  id: "privacy-policy-text",
@@ -4890,7 +5168,7 @@ var RedactoNoticeConsent = ({
4890
5168
  (content == null ? void 0 : content.privacy_policy_prefix_text) || ""
4891
5169
  ),
4892
5170
  " ",
4893
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5171
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4894
5172
  "a",
4895
5173
  {
4896
5174
  id: "privacy-policy-link",
@@ -4913,7 +5191,7 @@ var RedactoNoticeConsent = ({
4913
5191
  },
4914
5192
  `privacy-text-${selectedLanguage}`
4915
5193
  ),
4916
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5194
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4917
5195
  "h2",
4918
5196
  {
4919
5197
  id: "purpose-section-heading",
@@ -4929,8 +5207,8 @@ var RedactoNoticeConsent = ({
4929
5207
  },
4930
5208
  `purpose-section-heading-${selectedLanguage}`
4931
5209
  ),
4932
- categorizedPurposes ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: styles.optionsContainer, children: [
4933
- categorizedPurposes.alreadyConsented.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5210
+ categorizedPurposes ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles.optionsContainer, children: [
5211
+ categorizedPurposes.alreadyConsented.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4934
5212
  PurposeItem,
4935
5213
  {
4936
5214
  purpose,
@@ -4950,7 +5228,7 @@ var RedactoNoticeConsent = ({
4950
5228
  },
4951
5229
  `${purpose.uuid}-${selectedLanguage}`
4952
5230
  )),
4953
- categorizedPurposes.needsConsent.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5231
+ categorizedPurposes.needsConsent.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4954
5232
  PurposeItem,
4955
5233
  {
4956
5234
  purpose,
@@ -4971,7 +5249,7 @@ var RedactoNoticeConsent = ({
4971
5249
  ))
4972
5250
  ] }) : (
4973
5251
  /* Regular consent UI */
4974
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: styles.optionsContainer, children: (_q = content == null ? void 0 : content.purposes) == null ? void 0 : _q.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5252
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles.optionsContainer, children: (_y = content == null ? void 0 : content.purposes) == null ? void 0 : _y.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4975
5253
  PurposeItem,
4976
5254
  {
4977
5255
  purpose,
@@ -4992,7 +5270,7 @@ var RedactoNoticeConsent = ({
4992
5270
  `${purpose.uuid}-${selectedLanguage}`
4993
5271
  )) })
4994
5272
  ),
4995
- ((content == null ? void 0 : content.privacy_center_url) || (content == null ? void 0 : content.dpo_info)) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5273
+ ((content == null ? void 0 : content.privacy_center_url) || (content == null ? void 0 : content.dpo_info)) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
4996
5274
  "div",
4997
5275
  {
4998
5276
  style: {
@@ -5005,14 +5283,14 @@ var RedactoNoticeConsent = ({
5005
5283
  paddingTop: "12px",
5006
5284
  marginTop: "12px"
5007
5285
  },
5008
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { style: { margin: 0, opacity: 0.6 }, children: [
5009
- content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
5010
- content.additional_text && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { id: "additional-text", children: getTranslatedText(
5286
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { style: { margin: 0, opacity: 0.6 }, children: [
5287
+ content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
5288
+ content.additional_text && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "additional-text", children: getTranslatedText(
5011
5289
  "additional_text",
5012
5290
  content.additional_text
5013
5291
  ) }),
5014
5292
  " ",
5015
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5293
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5016
5294
  "a",
5017
5295
  {
5018
5296
  id: "privacy-center-link",
@@ -5028,14 +5306,14 @@ var RedactoNoticeConsent = ({
5028
5306
  ),
5029
5307
  "."
5030
5308
  ] }),
5031
- content.dpo_info && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
5032
- content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
5033
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { id: "dpo-grievance-text", children: getTranslatedDpoText(
5309
+ content.dpo_info && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
5310
+ content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
5311
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-grievance-text", children: getTranslatedDpoText(
5034
5312
  "grievance_text",
5035
5313
  content.dpo_info.grievance_text || ""
5036
5314
  ) }),
5037
5315
  " ",
5038
- content.dpo_info.grievance_url && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5316
+ content.dpo_info.grievance_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5039
5317
  "a",
5040
5318
  {
5041
5319
  id: "dpo-grievance-link",
@@ -5049,14 +5327,14 @@ var RedactoNoticeConsent = ({
5049
5327
  )
5050
5328
  }
5051
5329
  ),
5052
- content.dpo_info.grievance_email && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
5330
+ content.dpo_info.grievance_email && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
5053
5331
  " ",
5054
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
5332
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
5055
5333
  "grievance_email_connector_text",
5056
5334
  content.dpo_info.grievance_email_connector_text || "or email to"
5057
5335
  ) }),
5058
5336
  " ",
5059
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5337
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5060
5338
  "a",
5061
5339
  {
5062
5340
  id: "dpo-grievance-email",
@@ -5066,13 +5344,13 @@ var RedactoNoticeConsent = ({
5066
5344
  }
5067
5345
  )
5068
5346
  ] }),
5069
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
5070
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText(
5347
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
5348
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText(
5071
5349
  "dp_board_text",
5072
5350
  content.dpo_info.dp_board_text || ""
5073
5351
  ) }),
5074
5352
  " ",
5075
- content.dpo_info.dp_board_url && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5353
+ content.dpo_info.dp_board_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5076
5354
  "a",
5077
5355
  {
5078
5356
  id: "dpo-dp-board-link",
@@ -5086,13 +5364,13 @@ var RedactoNoticeConsent = ({
5086
5364
  )
5087
5365
  }
5088
5366
  ),
5089
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
5090
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { id: "dpo-dpo-text", children: getTranslatedDpoText(
5367
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
5368
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-dpo-text", children: getTranslatedDpoText(
5091
5369
  "dpo_text",
5092
5370
  content.dpo_info.dpo_text || ""
5093
5371
  ) }),
5094
5372
  " ",
5095
- content.dpo_info.dpo_email && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5373
+ content.dpo_info.dpo_email && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5096
5374
  "a",
5097
5375
  {
5098
5376
  id: "dpo-dpo-link",
@@ -5111,15 +5389,17 @@ var RedactoNoticeConsent = ({
5111
5389
  ]
5112
5390
  }
5113
5391
  ),
5114
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5392
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5115
5393
  "div",
5116
5394
  {
5117
5395
  style: {
5118
- ...styles.bottomSection,
5119
- ...responsiveStyles.bottomSection,
5396
+ ...isFullyConsentedReviewMode ? {
5397
+ ...styles.bottomSection,
5398
+ ...responsiveStyles.bottomSection
5399
+ } : isMobile ? styles.actionButtonStack : styles.actionButtonRow,
5120
5400
  ...sectionStyle
5121
5401
  },
5122
- children: isFullyConsentedReviewMode ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5402
+ children: isFullyConsentedReviewMode ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5123
5403
  "button",
5124
5404
  {
5125
5405
  ref: lastFocusableRef,
@@ -5128,61 +5408,30 @@ var RedactoNoticeConsent = ({
5128
5408
  ...styles.button,
5129
5409
  ...responsiveStyles.button,
5130
5410
  ...styles.acceptButton,
5131
- ...acceptButtonStyle
5411
+ ...acceptAllButtonStyle
5132
5412
  },
5133
5413
  onClick: () => onAccept == null ? void 0 : onAccept(),
5134
5414
  "aria-label": reviewModeButtonText,
5135
5415
  children: reviewModeButtonText
5136
5416
  }
5137
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
5138
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5139
- "button",
5140
- {
5141
- ref: lastFocusableRef,
5142
- id: "confirm-button-text",
5143
- style: {
5144
- ...styles.button,
5145
- ...responsiveStyles.button,
5146
- ...styles.acceptButton,
5147
- ...acceptButtonStyle,
5148
- opacity: acceptDisabled ? 0.5 : 1
5149
- },
5150
- onClick: handleAccept,
5151
- disabled: acceptDisabled || isSubmittingDecline,
5152
- "aria-label": getTranslatedText(
5153
- "confirm_button_text",
5154
- (content == null ? void 0 : content.confirm_button_text) || "Accept"
5155
- ),
5156
- children: isSubmittingAccept ? "Processing..." : getTranslatedText(
5157
- "confirm_button_text",
5158
- (content == null ? void 0 : content.confirm_button_text) || "Accept"
5159
- )
5160
- }
5161
- ),
5162
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
5163
- "button",
5164
- {
5165
- id: "decline-button-text",
5166
- style: {
5167
- ...styles.button,
5168
- ...responsiveStyles.button,
5169
- ...styles.cancelButton,
5170
- ...declineButtonStyle,
5171
- opacity: isSubmittingAccept ? 0.5 : 1
5172
- },
5173
- onClick: handleDecline,
5174
- disabled: isSubmittingDecline || isSubmittingAccept,
5175
- "aria-label": getTranslatedText(
5176
- "decline_button_text",
5177
- (content == null ? void 0 : content.decline_button_text) || "Decline"
5178
- ),
5179
- children: isSubmittingDecline ? "Processing..." : getTranslatedText(
5180
- "decline_button_text",
5181
- (content == null ? void 0 : content.decline_button_text) || "Decline"
5182
- )
5183
- }
5184
- )
5185
- ] })
5417
+ ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
5418
+ NoticeFooter,
5419
+ {
5420
+ labels: actionLabels,
5421
+ acceptSelectedDisabled: acceptDisabled,
5422
+ isSubmittingAccept,
5423
+ isSubmittingDecline,
5424
+ isMobile,
5425
+ responsiveButtonStyle: responsiveStyles.button,
5426
+ acceptAllButtonStyle,
5427
+ acceptSelectedButtonStyle,
5428
+ declineButtonStyle,
5429
+ lastFocusableRef,
5430
+ onAcceptAll: handleAcceptAll,
5431
+ onAcceptSelected: handleAcceptSelected,
5432
+ onDecline: handleDecline
5433
+ }
5434
+ )
5186
5435
  }
5187
5436
  )
5188
5437
  ] })
@@ -5696,7 +5945,7 @@ var injectSpinnerAnimation = () => {
5696
5945
  };
5697
5946
 
5698
5947
  // src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
5699
- var import_jsx_runtime2 = require("react/jsx-runtime");
5948
+ var import_jsx_runtime4 = require("react/jsx-runtime");
5700
5949
  var RedactoConsentInlineComponent = ({
5701
5950
  org_uuid,
5702
5951
  workspace_uuid,
@@ -5752,7 +6001,7 @@ var RedactoConsentInlineComponent = ({
5752
6001
  if (!content) return false;
5753
6002
  return content.purposes.every((purpose) => {
5754
6003
  const requiredElements = purpose.data_elements.filter(
5755
- (element) => element.required
6004
+ (element) => element.required && element.enabled
5756
6005
  );
5757
6006
  return requiredElements.every(
5758
6007
  (element) => selectedDataElements[`${purpose.uuid}-${element.uuid}`]
@@ -5835,27 +6084,12 @@ var RedactoConsentInlineComponent = ({
5835
6084
  {}
5836
6085
  );
5837
6086
  setCollapsedPurposes(initialCollapsedState);
5838
- const initialDataElementState = activeConfig.purposes.reduce(
5839
- (acc, purpose) => {
5840
- purpose.data_elements.forEach((element) => {
5841
- const combinedId = `${purpose.uuid}-${element.uuid}`;
5842
- acc[combinedId] = false;
5843
- });
5844
- return acc;
5845
- },
5846
- {}
5847
- );
5848
- setSelectedDataElements(initialDataElementState);
5849
- const initialPurposeState = activeConfig.purposes.reduce(
5850
- (acc, purpose) => {
5851
- return {
5852
- ...acc,
5853
- [purpose.uuid]: false
5854
- };
5855
- },
5856
- {}
6087
+ const preselection = buildPreselection(
6088
+ activeConfig.purposes,
6089
+ resolvePurposePreselection(activeConfig.purpose_preselection)
5857
6090
  );
5858
- setSelectedPurposes(initialPurposeState);
6091
+ setSelectedDataElements(preselection.selectedDataElements);
6092
+ setSelectedPurposes(preselection.selectedPurposes);
5859
6093
  } catch (err) {
5860
6094
  if ((signal == null ? void 0 : signal.aborted) || err instanceof Error && err.name === "AbortError") {
5861
6095
  return;
@@ -5879,7 +6113,14 @@ var RedactoConsentInlineComponent = ({
5879
6113
  return () => {
5880
6114
  controller.abort();
5881
6115
  };
5882
- }, [org_uuid, workspace_uuid, notice_uuid, language, applicationId, accessToken]);
6116
+ }, [
6117
+ org_uuid,
6118
+ workspace_uuid,
6119
+ notice_uuid,
6120
+ language,
6121
+ applicationId,
6122
+ accessToken
6123
+ ]);
5883
6124
  (0, import_react5.useEffect)(() => {
5884
6125
  if (!ledgerBaseUrl || applicationId) {
5885
6126
  return;
@@ -6080,16 +6321,16 @@ var RedactoConsentInlineComponent = ({
6080
6321
  return null;
6081
6322
  }
6082
6323
  if (isLoading) {
6083
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ...NOTICE_FONT_ROOT_PROPS, style: loadingRootStyle, children: [
6084
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: styles2.loadingSpinner }),
6085
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { style: { ...styles2.privacyText, ...textStyle }, children: "Loading..." })
6324
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { ...NOTICE_FONT_ROOT_PROPS, style: loadingRootStyle, children: [
6325
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: styles2.loadingSpinner }),
6326
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: { ...styles2.privacyText, ...textStyle }, children: "Loading..." })
6086
6327
  ] });
6087
6328
  }
6088
6329
  if (!content) {
6089
6330
  return null;
6090
6331
  }
6091
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ...NOTICE_FONT_ROOT_PROPS, style: rootStyle, children: [
6092
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
6332
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { ...NOTICE_FONT_ROOT_PROPS, style: rootStyle, children: [
6333
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6093
6334
  "div",
6094
6335
  {
6095
6336
  role: "alert",
@@ -6104,9 +6345,9 @@ var RedactoConsentInlineComponent = ({
6104
6345
  children: errorMessage
6105
6346
  }
6106
6347
  ),
6107
- (_a = content == null ? void 0 : content.purposes) == null ? void 0 : _a.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
6108
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: styles2.optionItem, children: [
6109
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
6348
+ (_a = content == null ? void 0 : content.purposes) == null ? void 0 : _a.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
6349
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: styles2.optionItem, children: [
6350
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6110
6351
  "div",
6111
6352
  {
6112
6353
  style: styles2.optionLeft,
@@ -6127,7 +6368,7 @@ var RedactoConsentInlineComponent = ({
6127
6368
  }
6128
6369
  },
6129
6370
  children: [
6130
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
6371
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6131
6372
  "div",
6132
6373
  {
6133
6374
  style: {
@@ -6136,7 +6377,7 @@ var RedactoConsentInlineComponent = ({
6136
6377
  justifyContent: "center",
6137
6378
  marginLeft: "5px"
6138
6379
  },
6139
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
6380
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6140
6381
  "svg",
6141
6382
  {
6142
6383
  width: "7",
@@ -6153,13 +6394,13 @@ var RedactoConsentInlineComponent = ({
6153
6394
  transition: "transform 0.3s ease"
6154
6395
  },
6155
6396
  "aria-hidden": "true",
6156
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M1 1L6 6L1 11" })
6397
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M1 1L6 6L1 11" })
6157
6398
  }
6158
6399
  )
6159
6400
  }
6160
6401
  ),
6161
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: styles2.optionTextContainer, children: [
6162
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
6402
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: styles2.optionTextContainer, children: [
6403
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6163
6404
  "h2",
6164
6405
  {
6165
6406
  style: {
@@ -6167,14 +6408,17 @@ var RedactoConsentInlineComponent = ({
6167
6408
  ...responsiveStyles.optionTitle,
6168
6409
  ...headingStyle
6169
6410
  },
6170
- children: getTranslatedText(
6171
- `purposes.name`,
6172
- purpose.name,
6173
- purpose.uuid
6174
- )
6411
+ children: [
6412
+ getTranslatedText(
6413
+ `purposes.name`,
6414
+ purpose.name,
6415
+ purpose.uuid
6416
+ ),
6417
+ hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RequiredMarker, {})
6418
+ ]
6175
6419
  }
6176
6420
  ),
6177
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
6421
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6178
6422
  "h3",
6179
6423
  {
6180
6424
  style: {
@@ -6193,7 +6437,7 @@ var RedactoConsentInlineComponent = ({
6193
6437
  ]
6194
6438
  }
6195
6439
  ),
6196
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
6440
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6197
6441
  "input",
6198
6442
  {
6199
6443
  type: "checkbox",
@@ -6207,13 +6451,13 @@ var RedactoConsentInlineComponent = ({
6207
6451
  }
6208
6452
  )
6209
6453
  ] }),
6210
- !collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
6454
+ !collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6211
6455
  "div",
6212
6456
  {
6213
6457
  id: `purpose-${purpose.uuid}`,
6214
6458
  style: styles2.dataElementsContainer,
6215
- children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: styles2.dataElementItem, children: [
6216
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
6459
+ children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: styles2.dataElementItem, children: [
6460
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
6217
6461
  "span",
6218
6462
  {
6219
6463
  style: {
@@ -6227,21 +6471,11 @@ var RedactoConsentInlineComponent = ({
6227
6471
  dataElement.name,
6228
6472
  dataElement.uuid
6229
6473
  ),
6230
- dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
6231
- "span",
6232
- {
6233
- style: {
6234
- color: "red",
6235
- marginLeft: "4px"
6236
- },
6237
- "aria-label": "required",
6238
- children: "*"
6239
- }
6240
- )
6474
+ dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RequiredMarker, {})
6241
6475
  ]
6242
6476
  }
6243
6477
  ),
6244
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
6478
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
6245
6479
  "input",
6246
6480
  {
6247
6481
  type: "checkbox",
@@ -6869,6 +7103,48 @@ var styles3 = {
6869
7103
  margin: 0,
6870
7104
  boxSizing: "border-box"
6871
7105
  },
7106
+ /**
7107
+ * The notice step's three actions. Wide: one row with decline pushed left
7108
+ * and the accepts grouped right. Narrow: a full-width stack. The verify step
7109
+ * keeps `bottomSection` — it collapses back to the progressing primary CTA
7110
+ * plus decline.
7111
+ */
7112
+ actionButtonRow: {
7113
+ display: "flex",
7114
+ flexDirection: "row",
7115
+ alignItems: "center",
7116
+ gap: "12px",
7117
+ paddingTop: "15px",
7118
+ borderTop: "none",
7119
+ backgroundColor: "#ffffff",
7120
+ margin: 0,
7121
+ boxSizing: "border-box"
7122
+ },
7123
+ actionButtonStack: {
7124
+ display: "flex",
7125
+ flexDirection: "column",
7126
+ gap: "12px",
7127
+ paddingTop: "15px",
7128
+ borderTop: "none",
7129
+ backgroundColor: "#ffffff",
7130
+ margin: 0,
7131
+ boxSizing: "border-box"
7132
+ },
7133
+ /** `width: auto` undoes `button`'s `width: 100%` for the wide row. */
7134
+ rowButton: {
7135
+ width: "auto",
7136
+ whiteSpace: "normal",
7137
+ wordBreak: "break-word"
7138
+ },
7139
+ stackButton: {
7140
+ width: "100%",
7141
+ whiteSpace: "normal",
7142
+ wordBreak: "break-word"
7143
+ },
7144
+ /** Pushes everything after decline to the right edge in the wide row. */
7145
+ declineSpacer: {
7146
+ marginRight: "auto"
7147
+ },
6872
7148
  button: {
6873
7149
  width: "100%",
6874
7150
  borderRadius: "8px",
@@ -8626,7 +8902,7 @@ var makeStaticT = (langCode) => (key, vars) => {
8626
8902
  var redacto_logo_default2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATkAAAE5CAYAAADr4VfxAAAgAElEQVR4nO3deXhU5dkG8Ps552S2sId931RWwQVwq6LihmttiVUhaNUEcGnpXluLtnaz7WeVqhCokAS0RVuK4lK1igpaFRQREJBFQCAsAQJk9nOe748hNEDWycy858x5ftfldZllzjwkM3fe97wbMTOEaMjTd6BlLBLtoenclcEdLYvbaaA8Js5jII9AbQD2E9CKgRYA/ABa1rhELgDPCZc9DCB+9P9NAIdAVAXmEIMPEaiKmQ8SqIJAFZZmVcCifZpGuzXGjlAb3857H0ck/f964WQkIScA4Ml8tNC9Vf1AWj8i9INF/ZisvgC6AdQDxweWnewBsAvAdhA2AdgE5k0W65vaR7xbxi1AVHF9QjEJOZcpLkIORasGW5Y+BOAhYBpK4MEM9FJdWxrEAWwEYzWBVrPGazRoq3b29W6cNg2W6uJEZkjIZbHn8qFX+I4MJDZGAHw2CGcDGAbAq7o2xQ4DWAHCcgDLibTlhXO9m1QXJdJDQi6LPHQxjI69gsM0ky4A4XwAlwJop7ouh9gN4CMwllo6v7GnT+ATae1lBwk5h5s5PjqINfMKAl0O8NeQuMEvmm8/GG8S+N/QtNcKS3zbVBckkiMh5zDFRQggGLwchGsZdDmA7qprcol1AF5l0Iu7t/vemfbWsVFhYXMScg7w1K2VbXXdMwbAtQzcAPuOdLrFfgD/AdPiHI9v4bf/isOqCxJ1k5CzqUfz4c/1ha5hoADAFQByVNckahUC8B8CStuG/Ytkyor9SMjZyEMXw+jYPThW0+hWMK5FYkKtcI59YCyAhnlFJf73VRcjEiTkbODJCZH+mmaOJ6bbAfRUXY9IiXVgzPXk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p3Ar1ug17V4/I3CZ1ruU12QSI6EXJb5y83Brp4cOp9BYwDrAoAGQtbQNsZmApYBvJQ0a9ldJS3WSmstO0jIZbniCcEuJjBCI4wAtBEAnw0gT3Vdiu0CsIKYlluatcKrWx/IPm3ZS0LOhWYXhPvE2BqqkTYYxEOJMZiBAci+zT+rAHwO8GoiWkvg1SZolZxH6i4ScgIA8NDFMDp2jfTUc9Cf2exPTP0Z6A9GDxC6AuiousZamEzYTYyvAGxlYJPGvAmatimu88Ypc/xfSZdTSMiJRpl+H7xGRaSbbnBXZu7IxB3AWnsNnMfgPCJqYzEHCNQGID/AfgBta1zCCyBQ42MGcLDGx2EAIQAHGQgDHCSmg6zRQTDvI0YFQBUWrArSqDwe5a86mYHdctaBaMj/A27i58g/nyt4AAAAAElFTkSuQmCC";
8627
8903
 
8628
8904
  // src/RedactoNoticeAssisted/RedactoNoticeAssisted.tsx
8629
- var import_jsx_runtime3 = require("react/jsx-runtime");
8905
+ var import_jsx_runtime5 = require("react/jsx-runtime");
8630
8906
  var PurposeItem2 = ({
8631
8907
  purpose,
8632
8908
  selectedPurposes,
@@ -8650,9 +8926,10 @@ var PurposeItem2 = ({
8650
8926
  const dataElements = purpose.data_elements.filter(
8651
8927
  (el) => el.enabled !== false
8652
8928
  );
8653
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
8654
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.optionItem, children: [
8655
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
8929
+ const hasRequired = hasRequiredDataElement(purpose);
8930
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
8931
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.optionItem, children: [
8932
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
8656
8933
  "div",
8657
8934
  {
8658
8935
  style: styles3.optionLeft,
@@ -8669,7 +8946,7 @@ var PurposeItem2 = ({
8669
8946
  }
8670
8947
  },
8671
8948
  children: [
8672
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
8949
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
8673
8950
  "div",
8674
8951
  {
8675
8952
  style: {
@@ -8678,7 +8955,7 @@ var PurposeItem2 = ({
8678
8955
  justifyContent: "center",
8679
8956
  marginLeft: "5px"
8680
8957
  },
8681
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
8958
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
8682
8959
  "svg",
8683
8960
  {
8684
8961
  width: "7",
@@ -8695,21 +8972,24 @@ var PurposeItem2 = ({
8695
8972
  transition: "transform 0.3s ease"
8696
8973
  },
8697
8974
  "aria-hidden": "true",
8698
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M1 1L6 6L1 11" })
8975
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M1 1L6 6L1 11" })
8699
8976
  }
8700
8977
  )
8701
8978
  }
8702
8979
  ),
8703
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.optionTextContainer, children: [
8704
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
8980
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.optionTextContainer, children: [
8981
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
8705
8982
  "h2",
8706
8983
  {
8707
8984
  id: `purpose-name-${purpose.uuid}`,
8708
8985
  style: { ...styles3.optionTitle, ...responsive.optionTitle },
8709
- children: name
8986
+ children: [
8987
+ name,
8988
+ hasRequired && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, { label: ts("required") })
8989
+ ]
8710
8990
  }
8711
8991
  ),
8712
- description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
8992
+ description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
8713
8993
  "h3",
8714
8994
  {
8715
8995
  id: `purpose-description-${purpose.uuid}`,
@@ -8724,7 +9004,7 @@ var PurposeItem2 = ({
8724
9004
  ]
8725
9005
  }
8726
9006
  ),
8727
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
9007
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
8728
9008
  "input",
8729
9009
  {
8730
9010
  className: "redacto-assisted-checkbox-large",
@@ -8736,7 +9016,7 @@ var PurposeItem2 = ({
8736
9016
  }
8737
9017
  )
8738
9018
  ] }),
8739
- isExpanded && dataElements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
9019
+ isExpanded && dataElements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
8740
9020
  "div",
8741
9021
  {
8742
9022
  id: `redacto-assisted-purpose-${purpose.uuid}`,
@@ -8748,8 +9028,8 @@ var PurposeItem2 = ({
8748
9028
  dataElement.name,
8749
9029
  dataElement.uuid
8750
9030
  );
8751
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.dataElementItem, children: [
8752
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
9031
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.dataElementItem, children: [
9032
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
8753
9033
  "span",
8754
9034
  {
8755
9035
  id: `data-element-${combinedId}`,
@@ -8759,18 +9039,11 @@ var PurposeItem2 = ({
8759
9039
  },
8760
9040
  children: [
8761
9041
  elementName,
8762
- dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
8763
- "span",
8764
- {
8765
- style: { color: "red", marginLeft: "4px" },
8766
- "aria-label": ts("required"),
8767
- children: "*"
8768
- }
8769
- )
9042
+ dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, { label: ts("required") })
8770
9043
  ]
8771
9044
  }
8772
9045
  ),
8773
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
9046
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
8774
9047
  "input",
8775
9048
  {
8776
9049
  className: "redacto-assisted-checkbox-small",
@@ -8801,6 +9074,7 @@ var RedactoNoticeAssisted = ({
8801
9074
  const [isLoading, setIsLoading] = (0, import_react7.useState)(true);
8802
9075
  const [fetchError, setFetchError] = (0, import_react7.useState)(null);
8803
9076
  const [step, setStep] = (0, import_react7.useState)("notice");
9077
+ const [acceptMode, setAcceptMode] = (0, import_react7.useState)("selected");
8804
9078
  const [selectedPurposes, setSelectedPurposes] = (0, import_react7.useState)({});
8805
9079
  const [selectedDataElements, setSelectedDataElements] = (0, import_react7.useState)({});
8806
9080
  const [collapsedPurposes, setCollapsedPurposes] = (0, import_react7.useState)({});
@@ -8814,7 +9088,9 @@ var RedactoNoticeAssisted = ({
8814
9088
  const [currentAudioIndex, setCurrentAudioIndex] = (0, import_react7.useState)(0);
8815
9089
  const [highlightedElementId, setHighlightedElementId] = (0, import_react7.useState)(null);
8816
9090
  const currentAudioRef = (0, import_react7.useRef)(null);
8817
- const [verifyMethod, setVerifyMethod] = (0, import_react7.useState)("mobile");
9091
+ const [verifyMethod, setVerifyMethod] = (0, import_react7.useState)(
9092
+ "mobile"
9093
+ );
8818
9094
  const [mobile, setMobile] = (0, import_react7.useState)("");
8819
9095
  const mobileInputRef = (0, import_react7.useRef)(null);
8820
9096
  const [email, setEmail] = (0, import_react7.useState)("");
@@ -8852,18 +9128,16 @@ var RedactoNoticeAssisted = ({
8852
9128
  setSelectedLanguage(
8853
9129
  dl === "en" || dl === "EN" ? "English" : dl || "English"
8854
9130
  );
8855
- const purposeState = {};
8856
- const elementState = {};
9131
+ const preselection = buildPreselection(
9132
+ activeConfig.purposes,
9133
+ resolvePurposePreselection(activeConfig.purpose_preselection)
9134
+ );
8857
9135
  const collapsedState = {};
8858
9136
  activeConfig.purposes.forEach((p) => {
8859
- purposeState[p.uuid] = false;
8860
9137
  collapsedState[p.uuid] = true;
8861
- p.data_elements.forEach((el) => {
8862
- elementState[`${p.uuid}-${el.uuid}`] = false;
8863
- });
8864
9138
  });
8865
- setSelectedPurposes(purposeState);
8866
- setSelectedDataElements(elementState);
9139
+ setSelectedPurposes(preselection.selectedPurposes);
9140
+ setSelectedDataElements(preselection.selectedDataElements);
8867
9141
  setCollapsedPurposes(collapsedState);
8868
9142
  setIsLoading(false);
8869
9143
  }).catch((err) => {
@@ -9359,16 +9633,37 @@ var RedactoNoticeAssisted = ({
9359
9633
  removeAllHighlights();
9360
9634
  };
9361
9635
  }, [highlightedElementId, isPlaying]);
9362
- const handleConfirmStep = (0, import_react7.useCallback)(() => {
9363
- stopAudio();
9364
- setStep("verify");
9365
- setOtpSent(false);
9366
- window.setTimeout(() => {
9367
- var _a;
9368
- (_a = (verifyMethod === "email" ? emailInputRef : mobileInputRef).current) == null ? void 0 : _a.focus();
9369
- }, 80);
9370
- }, [verifyMethod, stopAudio]);
9636
+ const handleConfirmStep = (0, import_react7.useCallback)(
9637
+ (mode = "selected") => {
9638
+ if (mode !== "selected" && content) {
9639
+ const selection = buildSelectionForMode(content.purposes, mode, {
9640
+ selectedPurposes,
9641
+ selectedDataElements
9642
+ });
9643
+ setSelectedPurposes(selection.selectedPurposes);
9644
+ setSelectedDataElements(selection.selectedDataElements);
9645
+ }
9646
+ setAcceptMode(mode);
9647
+ stopAudio();
9648
+ setStep("verify");
9649
+ setOtpSent(false);
9650
+ window.setTimeout(() => {
9651
+ var _a;
9652
+ (_a = (verifyMethod === "email" ? emailInputRef : mobileInputRef).current) == null ? void 0 : _a.focus();
9653
+ }, 80);
9654
+ },
9655
+ [content, selectedPurposes, selectedDataElements, verifyMethod, stopAudio]
9656
+ );
9657
+ const handleAcceptAll = (0, import_react7.useCallback)(
9658
+ () => handleConfirmStep("all"),
9659
+ [handleConfirmStep]
9660
+ );
9661
+ const handleAcceptSelected = (0, import_react7.useCallback)(
9662
+ () => handleConfirmStep("selected"),
9663
+ [handleConfirmStep]
9664
+ );
9371
9665
  const handleEditSelections = (0, import_react7.useCallback)(() => {
9666
+ setAcceptMode("selected");
9372
9667
  setStep("notice");
9373
9668
  setOtpSent(false);
9374
9669
  setOtpUuid("");
@@ -9478,10 +9773,14 @@ var RedactoNoticeAssisted = ({
9478
9773
  (_a = otpInputRefs.current[focusIndex]) == null ? void 0 : _a.focus();
9479
9774
  }, []);
9480
9775
  const resetFlow = (0, import_react7.useCallback)(() => {
9776
+ var _a;
9481
9777
  setStep("notice");
9482
- setSelectedPurposes(
9483
- (prev) => Object.fromEntries(Object.keys(prev).map((k) => [k, false]))
9778
+ const preselection = buildPreselection(
9779
+ (_a = content == null ? void 0 : content.purposes) != null ? _a : [],
9780
+ resolvePurposePreselection(content == null ? void 0 : content.purpose_preselection)
9484
9781
  );
9782
+ setSelectedPurposes(preselection.selectedPurposes);
9783
+ setSelectedDataElements(preselection.selectedDataElements);
9485
9784
  setVerifyMethod("mobile");
9486
9785
  setMobile("");
9487
9786
  setEmail("");
@@ -9491,7 +9790,7 @@ var RedactoNoticeAssisted = ({
9491
9790
  setResendCountdown(0);
9492
9791
  setCreateError(null);
9493
9792
  setOtpError(null);
9494
- }, []);
9793
+ }, [content]);
9495
9794
  const handleSuccess = (0, import_react7.useCallback)(() => {
9496
9795
  if (onComplete) {
9497
9796
  onComplete();
@@ -9541,12 +9840,16 @@ var RedactoNoticeAssisted = ({
9541
9840
  return;
9542
9841
  }
9543
9842
  }
9843
+ const selection = buildSelectionForMode(content.purposes, acceptMode, {
9844
+ selectedPurposes,
9845
+ selectedDataElements
9846
+ });
9544
9847
  const submitPurposes = content.purposes.map((purpose) => ({
9545
9848
  ...purpose,
9546
- selected: selectedPurposes[purpose.uuid] || false,
9849
+ selected: selection.selectedPurposes[purpose.uuid] || false,
9547
9850
  data_elements: purpose.data_elements.map((element) => ({
9548
9851
  ...element,
9549
- selected: element.required ? true : selectedDataElements[`${purpose.uuid}-${element.uuid}`] || false
9852
+ selected: element.required ? true : selection.selectedDataElements[`${purpose.uuid}-${element.uuid}`] || false
9550
9853
  }))
9551
9854
  }));
9552
9855
  await submitAssistedConsent({
@@ -9598,7 +9901,7 @@ var RedactoNoticeAssisted = ({
9598
9901
  (content == null ? void 0 : content.notice_banner_heading) || "Privacy Notice"
9599
9902
  );
9600
9903
  const renderHeader = () => {
9601
- const logoNode = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
9904
+ const logoNode = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9602
9905
  "img",
9603
9906
  {
9604
9907
  style: { ...styles3.logo, ...responsive.logo },
@@ -9606,7 +9909,7 @@ var RedactoNoticeAssisted = ({
9606
9909
  alt: ts("logoAlt")
9607
9910
  }
9608
9911
  );
9609
- const titleNode = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
9912
+ const titleNode = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9610
9913
  "h2",
9611
9914
  {
9612
9915
  id: "privacy-notice-title",
@@ -9614,9 +9917,9 @@ var RedactoNoticeAssisted = ({
9614
9917
  children: noticeTitle
9615
9918
  }
9616
9919
  );
9617
- const controlsBlock = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.languageSelectorContainer, ref: languageContainerRef, children: [
9618
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
9619
- isTTSAvailable && step === "notice" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
9920
+ const controlsBlock = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.languageSelectorContainer, ref: languageContainerRef, children: [
9921
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
9922
+ isTTSAvailable && step === "notice" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9620
9923
  "button",
9621
9924
  {
9622
9925
  type: "button",
@@ -9631,7 +9934,7 @@ var RedactoNoticeAssisted = ({
9631
9934
  },
9632
9935
  "aria-label": isPlaying && !isPaused ? ts("audioPause") : ts("audioStart"),
9633
9936
  title: isPlaying && !isPaused ? ts("talkbackPause") : ts("talkbackStart"),
9634
- children: isPlaying && !isPaused ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
9937
+ children: isPlaying && !isPaused ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
9635
9938
  "svg",
9636
9939
  {
9637
9940
  xmlns: "http://www.w3.org/2000/svg",
@@ -9645,11 +9948,11 @@ var RedactoNoticeAssisted = ({
9645
9948
  strokeLinejoin: "round",
9646
9949
  "aria-hidden": "true",
9647
9950
  children: [
9648
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "6", y: "4", width: "4", height: "16" }),
9649
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "14", y: "4", width: "4", height: "16" })
9951
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "6", y: "4", width: "4", height: "16" }),
9952
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "14", y: "4", width: "4", height: "16" })
9650
9953
  ]
9651
9954
  }
9652
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
9955
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
9653
9956
  "svg",
9654
9957
  {
9655
9958
  xmlns: "http://www.w3.org/2000/svg",
@@ -9663,14 +9966,14 @@ var RedactoNoticeAssisted = ({
9663
9966
  strokeLinejoin: "round",
9664
9967
  "aria-hidden": "true",
9665
9968
  children: [
9666
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
9667
- /* @__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" })
9969
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
9970
+ /* @__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" })
9668
9971
  ]
9669
9972
  }
9670
9973
  )
9671
9974
  }
9672
9975
  ),
9673
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
9976
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
9674
9977
  "button",
9675
9978
  {
9676
9979
  type: "button",
@@ -9684,7 +9987,7 @@ var RedactoNoticeAssisted = ({
9684
9987
  }),
9685
9988
  children: [
9686
9989
  toNativeLabel(selectedLanguage),
9687
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
9990
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9688
9991
  "svg",
9689
9992
  {
9690
9993
  xmlns: "http://www.w3.org/2000/svg",
@@ -9698,21 +10001,21 @@ var RedactoNoticeAssisted = ({
9698
10001
  strokeLinejoin: "round",
9699
10002
  style: { flexShrink: 0, marginLeft: "4px" },
9700
10003
  "aria-hidden": "true",
9701
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 6l4 4 4-4" })
10004
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M4 6l4 4 4-4" })
9702
10005
  }
9703
10006
  )
9704
10007
  ]
9705
10008
  }
9706
10009
  ) })
9707
10010
  ] }),
9708
- isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10011
+ isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9709
10012
  "ul",
9710
10013
  {
9711
10014
  id: "redacto-assisted-language-listbox",
9712
10015
  style: styles3.languageDropdown,
9713
10016
  role: "listbox",
9714
10017
  "aria-label": ts("selectLanguage"),
9715
- children: availableLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10018
+ children: availableLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9716
10019
  "li",
9717
10020
  {
9718
10021
  style: {
@@ -9732,8 +10035,8 @@ var RedactoNoticeAssisted = ({
9732
10035
  }
9733
10036
  )
9734
10037
  ] });
9735
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: { ...styles3.topSection, ...responsive.topSection }, children: isMobile ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
9736
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
10038
+ 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: [
10039
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
9737
10040
  "div",
9738
10041
  {
9739
10042
  style: {
@@ -9744,7 +10047,7 @@ var RedactoNoticeAssisted = ({
9744
10047
  },
9745
10048
  children: [
9746
10049
  logoNode,
9747
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10050
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9748
10051
  "div",
9749
10052
  {
9750
10053
  style: {
@@ -9760,8 +10063,8 @@ var RedactoNoticeAssisted = ({
9760
10063
  }
9761
10064
  ),
9762
10065
  titleNode
9763
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
9764
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.topLeft, children: [
10066
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10067
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.topLeft, children: [
9765
10068
  logoNode,
9766
10069
  titleNode
9767
10070
  ] }),
@@ -9772,7 +10075,7 @@ var RedactoNoticeAssisted = ({
9772
10075
  if (!content) return null;
9773
10076
  const dpoInfo = content.dpo_info;
9774
10077
  if (!content.privacy_center_url && !dpoInfo) return null;
9775
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10078
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9776
10079
  "div",
9777
10080
  {
9778
10081
  style: {
@@ -9784,14 +10087,14 @@ var RedactoNoticeAssisted = ({
9784
10087
  paddingTop: "12px",
9785
10088
  marginTop: "12px"
9786
10089
  },
9787
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { style: { margin: 0, opacity: 0.6 }, children: [
9788
- content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
9789
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "additional-text", children: getTranslatedText(
10090
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { margin: 0, opacity: 0.6 }, children: [
10091
+ content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10092
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "additional-text", children: getTranslatedText(
9790
10093
  "additional_text",
9791
10094
  content.additional_text || "Manage or withdraw consent anytime at"
9792
10095
  ) }),
9793
10096
  " ",
9794
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10097
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9795
10098
  "a",
9796
10099
  {
9797
10100
  id: "privacy-center-link",
@@ -9807,11 +10110,11 @@ var RedactoNoticeAssisted = ({
9807
10110
  ),
9808
10111
  "."
9809
10112
  ] }),
9810
- dpoInfo && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
9811
- content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
9812
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-grievance-text", children: getTranslatedDpoText("grievance_text", dpoInfo.grievance_text) }),
10113
+ dpoInfo && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10114
+ content.privacy_center_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
10115
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-grievance-text", children: getTranslatedDpoText("grievance_text", dpoInfo.grievance_text) }),
9813
10116
  " ",
9814
- dpoInfo.grievance_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10117
+ dpoInfo.grievance_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9815
10118
  "a",
9816
10119
  {
9817
10120
  id: "dpo-grievance-link",
@@ -9826,13 +10129,13 @@ var RedactoNoticeAssisted = ({
9826
10129
  }
9827
10130
  ),
9828
10131
  " ",
9829
- dpoInfo.grievance_email && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
9830
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
10132
+ dpoInfo.grievance_email && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10133
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
9831
10134
  "grievance_email_connector_text",
9832
10135
  dpoInfo.grievance_email_connector_text || "or email to"
9833
10136
  ) }),
9834
10137
  " ",
9835
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10138
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9836
10139
  "a",
9837
10140
  {
9838
10141
  id: "dpo-grievance-email",
@@ -9842,10 +10145,10 @@ var RedactoNoticeAssisted = ({
9842
10145
  }
9843
10146
  )
9844
10147
  ] }),
9845
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
9846
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText("dp_board_text", dpoInfo.dp_board_text) }),
10148
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
10149
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText("dp_board_text", dpoInfo.dp_board_text) }),
9847
10150
  " ",
9848
- dpoInfo.dp_board_url && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10151
+ dpoInfo.dp_board_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9849
10152
  "a",
9850
10153
  {
9851
10154
  id: "dpo-dp-board-link",
@@ -9859,10 +10162,10 @@ var RedactoNoticeAssisted = ({
9859
10162
  )
9860
10163
  }
9861
10164
  ),
9862
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
9863
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "dpo-dpo-text", children: getTranslatedDpoText("dpo_text", dpoInfo.dpo_text) }),
10165
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
10166
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "dpo-dpo-text", children: getTranslatedDpoText("dpo_text", dpoInfo.dpo_text) }),
9864
10167
  " ",
9865
- dpoInfo.dpo_email && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10168
+ dpoInfo.dpo_email && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9866
10169
  "a",
9867
10170
  {
9868
10171
  id: "dpo-dpo-link",
@@ -9881,17 +10184,17 @@ var RedactoNoticeAssisted = ({
9881
10184
  };
9882
10185
  const renderNoticeScreen = (locked) => {
9883
10186
  if (!content) return null;
9884
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
9885
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { style: { ...styles3.privacyText, ...responsive.privacyText }, children: [
9886
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "privacy-notice-text", children: getTranslatedText("notice_text", content.notice_text) }),
9887
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("br", {}),
9888
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { children: [
9889
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: "privacy-policy-text", children: getTranslatedText(
10187
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10188
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { ...styles3.privacyText, ...responsive.privacyText }, children: [
10189
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "privacy-notice-text", children: getTranslatedText("notice_text", content.notice_text) }),
10190
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("br", {}),
10191
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
10192
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { id: "privacy-policy-text", children: getTranslatedText(
9890
10193
  "privacy_policy_prefix_text",
9891
10194
  content.privacy_policy_prefix_text || ""
9892
10195
  ) }),
9893
10196
  " ",
9894
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10197
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9895
10198
  "a",
9896
10199
  {
9897
10200
  id: "privacy-policy-link",
@@ -9911,7 +10214,7 @@ var RedactoNoticeAssisted = ({
9911
10214
  )
9912
10215
  ] })
9913
10216
  ] }),
9914
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10217
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9915
10218
  "h2",
9916
10219
  {
9917
10220
  id: "purpose-section-heading",
@@ -9922,7 +10225,7 @@ var RedactoNoticeAssisted = ({
9922
10225
  )
9923
10226
  }
9924
10227
  ),
9925
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10228
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9926
10229
  "div",
9927
10230
  {
9928
10231
  style: {
@@ -9930,7 +10233,7 @@ var RedactoNoticeAssisted = ({
9930
10233
  ...locked ? styles3.lockedOptions : null
9931
10234
  },
9932
10235
  "aria-disabled": locked || void 0,
9933
- children: content.purposes.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10236
+ children: content.purposes.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9934
10237
  PurposeItem2,
9935
10238
  {
9936
10239
  purpose,
@@ -9952,19 +10255,19 @@ var RedactoNoticeAssisted = ({
9952
10255
  renderDpoFooter()
9953
10256
  ] });
9954
10257
  };
9955
- const renderVerifyBlock = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
10258
+ const renderVerifyBlock = () => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
9956
10259
  "div",
9957
10260
  {
9958
10261
  ref: verifyBlockRef,
9959
10262
  className: "redacto-assisted-reveal",
9960
10263
  style: styles3.verifyPanel,
9961
10264
  children: [
9962
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.verifyPanelHeader, children: [
9963
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: styles3.verifyPanelTitle, children: [
9964
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LockIcon, { size: 15, color: primaryColor }),
10265
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.verifyPanelHeader, children: [
10266
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: styles3.verifyPanelTitle, children: [
10267
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LockIcon, { size: 15, color: primaryColor }),
9965
10268
  ts("verifyWithOtp")
9966
10269
  ] }),
9967
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10270
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9968
10271
  "button",
9969
10272
  {
9970
10273
  type: "button",
@@ -9975,42 +10278,44 @@ var RedactoNoticeAssisted = ({
9975
10278
  }
9976
10279
  )
9977
10280
  ] }),
9978
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.phoneFieldWrap, children: [
9979
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.fieldLabelRow, children: [
9980
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
10281
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.phoneFieldWrap, children: [
10282
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.fieldLabelRow, children: [
10283
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
9981
10284
  "label",
9982
10285
  {
9983
10286
  htmlFor: verifyMethod === "email" ? "redacto-assisted-email" : "redacto-assisted-mobile",
9984
10287
  style: styles3.fieldLabelWithIcon,
9985
10288
  children: [
9986
- verifyMethod === "email" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MailIcon, { size: 14, color: "#475467" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PhoneIcon, { size: 14, color: "#475467" }),
10289
+ verifyMethod === "email" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MailIcon, { size: 14, color: "#475467" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PhoneIcon, { size: 14, color: "#475467" }),
9987
10290
  verifyMethod === "email" ? ts("emailAddress") : ts("mobileNumber")
9988
10291
  ]
9989
10292
  }
9990
10293
  ),
9991
- !otpSent && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
10294
+ !otpSent && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
9992
10295
  "button",
9993
10296
  {
9994
10297
  type: "button",
9995
10298
  className: "redacto-assisted-switch-link",
9996
10299
  style: { ...styles3.editLink, color: primaryColor },
9997
- onClick: () => handleSelectMethod(verifyMethod === "email" ? "mobile" : "email"),
10300
+ onClick: () => handleSelectMethod(
10301
+ verifyMethod === "email" ? "mobile" : "email"
10302
+ ),
9998
10303
  disabled: isSendingOtp,
9999
10304
  children: [
10000
- verifyMethod === "email" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PhoneIcon, { size: 14, color: primaryColor }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MailIcon, { size: 14, color: primaryColor }),
10305
+ verifyMethod === "email" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PhoneIcon, { size: 14, color: primaryColor }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MailIcon, { size: 14, color: primaryColor }),
10001
10306
  verifyMethod === "email" ? ts("useMobileInstead") : ts("useEmailInstead")
10002
10307
  ]
10003
10308
  }
10004
10309
  )
10005
10310
  ] }),
10006
- verifyMethod === "mobile" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
10311
+ verifyMethod === "mobile" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
10007
10312
  "div",
10008
10313
  {
10009
10314
  className: "redacto-assisted-phone-field",
10010
10315
  style: styles3.phoneField,
10011
10316
  children: [
10012
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: styles3.phonePrefix, children: ASSISTED_CONFIG.dialCode }),
10013
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10317
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: styles3.phonePrefix, children: ASSISTED_CONFIG.dialCode }),
10318
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10014
10319
  "input",
10015
10320
  {
10016
10321
  id: "redacto-assisted-mobile",
@@ -10028,12 +10333,12 @@ var RedactoNoticeAssisted = ({
10028
10333
  )
10029
10334
  ]
10030
10335
  }
10031
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10336
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10032
10337
  "div",
10033
10338
  {
10034
10339
  className: "redacto-assisted-phone-field",
10035
10340
  style: styles3.phoneField,
10036
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10341
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10037
10342
  "input",
10038
10343
  {
10039
10344
  id: "redacto-assisted-email",
@@ -10051,15 +10356,15 @@ var RedactoNoticeAssisted = ({
10051
10356
  )
10052
10357
  }
10053
10358
  ),
10054
- !otpSent ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: styles3.helperText, children: verifyMethod === "email" ? ts("otpHelperEmail") : ts("otpHelper") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.otpStatusRow, children: [
10055
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: styles3.otpSentText, children: [
10056
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckIcon, { size: 15, color: "#10B981" }),
10359
+ !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: [
10360
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { style: styles3.otpSentText, children: [
10361
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CheckIcon, { size: 15, color: "#10B981" }),
10057
10362
  " ",
10058
10363
  ts("otpSentTo"),
10059
10364
  " ",
10060
10365
  verifyMethod === "email" ? email : `${ASSISTED_CONFIG.dialCode} ${mobile}`
10061
10366
  ] }),
10062
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10367
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10063
10368
  "button",
10064
10369
  {
10065
10370
  type: "button",
@@ -10070,15 +10375,15 @@ var RedactoNoticeAssisted = ({
10070
10375
  }
10071
10376
  )
10072
10377
  ] }),
10073
- createError && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: styles3.fieldError, role: "alert", children: createError }),
10074
- otpSent && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
10378
+ createError && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.fieldError, role: "alert", children: createError }),
10379
+ otpSent && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
10075
10380
  "div",
10076
10381
  {
10077
10382
  ref: otpSectionRef,
10078
10383
  style: { display: "flex", flexDirection: "column", gap: "12px" },
10079
10384
  children: [
10080
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: styles3.centerLabel, children: ts("enterNDigitOtp", { count: ASSISTED_CONFIG.otpLength }) }),
10081
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles3.otpRow, children: otpDigits.map((digit, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10385
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.centerLabel, children: ts("enterNDigitOtp", { count: ASSISTED_CONFIG.otpLength }) }),
10386
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles3.otpRow, children: otpDigits.map((digit, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10082
10387
  "input",
10083
10388
  {
10084
10389
  ref: (el) => {
@@ -10108,11 +10413,11 @@ var RedactoNoticeAssisted = ({
10108
10413
  },
10109
10414
  index
10110
10415
  )) }),
10111
- otpError && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: styles3.fieldError, role: "alert", children: otpError }),
10112
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: styles3.resendText, children: resendCountdown > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
10113
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ClockIcon, {}),
10416
+ otpError && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.fieldError, role: "alert", children: otpError }),
10417
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.resendText, children: resendCountdown > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10418
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ClockIcon, {}),
10114
10419
  ts("resendIn", { seconds: resendCountdown })
10115
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10420
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10116
10421
  "button",
10117
10422
  {
10118
10423
  type: "button",
@@ -10132,15 +10437,15 @@ var RedactoNoticeAssisted = ({
10132
10437
  const renderFooter = () => {
10133
10438
  const declineLabel = getTranslatedText(
10134
10439
  "decline_button_text",
10135
- (content == null ? void 0 : content.decline_button_text) || "Decline"
10440
+ (content == null ? void 0 : content.decline_button_text) || DEFAULT_DECLINE_BUTTON_TEXT
10136
10441
  );
10137
10442
  const isVerify = step === "verify";
10138
10443
  let primaryLabel = getTranslatedText(
10139
10444
  "confirm_button_text",
10140
- (content == null ? void 0 : content.confirm_button_text) || "Confirm"
10445
+ (content == null ? void 0 : content.confirm_button_text) || DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT
10141
10446
  );
10142
10447
  let primaryDisabled = !areAllRequiredElementsChecked;
10143
- let primaryOnClick = handleConfirmStep;
10448
+ let primaryOnClick = handleAcceptSelected;
10144
10449
  if (isVerify && !otpSent) {
10145
10450
  primaryLabel = isSendingOtp ? ts("sending") : ts("sendOtp");
10146
10451
  primaryDisabled = !isContactValid || isSendingOtp;
@@ -10150,50 +10455,92 @@ var RedactoNoticeAssisted = ({
10150
10455
  primaryDisabled = !isOtpComplete || isVerifying;
10151
10456
  primaryOnClick = handleConfirm;
10152
10457
  }
10153
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { ...styles3.bottomSection, ...responsive.bottomSection }, children: [
10154
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10155
- "button",
10156
- {
10157
- type: "button",
10158
- id: "confirm-button-text",
10159
- className: "redacto-assisted-primary-btn",
10160
- style: {
10161
- ...styles3.button,
10162
- ...responsive.button,
10163
- ...styles3.acceptButton,
10164
- backgroundColor: primaryColor
10165
- },
10166
- disabled: primaryDisabled,
10167
- onClick: primaryOnClick,
10168
- children: primaryLabel
10169
- }
10170
- ),
10171
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10172
- "button",
10173
- {
10174
- type: "button",
10175
- id: "decline-button-text",
10176
- className: "redacto-assisted-secondary-btn",
10177
- style: {
10178
- ...styles3.button,
10179
- ...responsive.button,
10180
- ...styles3.cancelButton
10181
- },
10182
- onClick: handleDecline,
10183
- children: declineLabel
10184
- }
10185
- )
10186
- ] });
10458
+ const widthStyle = isMobile ? styles3.stackButton : styles3.rowButton;
10459
+ const shortcutStyle = {
10460
+ ...styles3.button,
10461
+ ...responsive.button,
10462
+ ...styles3.acceptButton,
10463
+ ...isVerify ? {} : widthStyle,
10464
+ backgroundColor: primaryColor
10465
+ };
10466
+ const acceptAllButton = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10467
+ "button",
10468
+ {
10469
+ type: "button",
10470
+ id: "accept-all-button-text",
10471
+ className: "redacto-assisted-secondary-btn",
10472
+ style: shortcutStyle,
10473
+ onClick: handleAcceptAll,
10474
+ children: getTranslatedText(
10475
+ "accept_all_button_text",
10476
+ (content == null ? void 0 : content.accept_all_button_text) || DEFAULT_ACCEPT_ALL_BUTTON_TEXT
10477
+ )
10478
+ }
10479
+ );
10480
+ const primaryButton = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10481
+ "button",
10482
+ {
10483
+ type: "button",
10484
+ id: "confirm-button-text",
10485
+ className: "redacto-assisted-primary-btn",
10486
+ style: {
10487
+ ...styles3.button,
10488
+ ...responsive.button,
10489
+ ...isVerify ? { ...styles3.acceptButton, backgroundColor: primaryColor } : {
10490
+ ...styles3.cancelButton,
10491
+ ...widthStyle,
10492
+ color: primaryColor,
10493
+ borderColor: primaryColor
10494
+ }
10495
+ },
10496
+ disabled: primaryDisabled,
10497
+ onClick: primaryOnClick,
10498
+ children: primaryLabel
10499
+ }
10500
+ );
10501
+ const declineButton = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10502
+ "button",
10503
+ {
10504
+ type: "button",
10505
+ id: "decline-button-text",
10506
+ className: "redacto-assisted-secondary-btn",
10507
+ style: {
10508
+ ...styles3.button,
10509
+ ...responsive.button,
10510
+ ...styles3.cancelButton,
10511
+ ...isVerify ? {} : widthStyle,
10512
+ // Only the wide notice-step row needs the push-right spacer.
10513
+ ...isVerify || isMobile ? {} : styles3.declineSpacer
10514
+ },
10515
+ onClick: handleDecline,
10516
+ children: declineLabel
10517
+ }
10518
+ );
10519
+ if (isVerify) {
10520
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...styles3.bottomSection, ...responsive.bottomSection }, children: [
10521
+ primaryButton,
10522
+ declineButton
10523
+ ] });
10524
+ }
10525
+ 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: [
10526
+ acceptAllButton,
10527
+ primaryButton,
10528
+ declineButton
10529
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10530
+ declineButton,
10531
+ primaryButton,
10532
+ acceptAllButton
10533
+ ] }) });
10187
10534
  };
10188
10535
  const renderBody = () => {
10189
10536
  if (isLoading) {
10190
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles3.loadingWrap, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles3.loadingSpinner, "aria-label": ts("loadingNotice") }) });
10537
+ 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") }) });
10191
10538
  }
10192
10539
  if (fetchError || !content) {
10193
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles3.loadingWrap, children: [
10194
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: styles3.errorTitle, children: ts("loadFailedTitle") }),
10195
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: styles3.errorText, children: (fetchError == null ? void 0 : fetchError.message) || ts("tryAgain") }),
10196
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10540
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: styles3.loadingWrap, children: [
10541
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.errorTitle, children: ts("loadFailedTitle") }),
10542
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { style: styles3.errorText, children: (fetchError == null ? void 0 : fetchError.message) || ts("tryAgain") }),
10543
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10197
10544
  "button",
10198
10545
  {
10199
10546
  type: "button",
@@ -10205,16 +10552,16 @@ var RedactoNoticeAssisted = ({
10205
10552
  )
10206
10553
  ] });
10207
10554
  }
10208
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
10555
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
10209
10556
  renderHeader(),
10210
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { ...styles3.middleSection, ...responsive.middleSection }, children: [
10557
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { style: { ...styles3.middleSection, ...responsive.middleSection }, children: [
10211
10558
  renderNoticeScreen(step === "verify"),
10212
10559
  step === "verify" && renderVerifyBlock()
10213
10560
  ] }),
10214
10561
  renderFooter()
10215
10562
  ] });
10216
10563
  };
10217
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles3.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10564
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles3.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10218
10565
  "div",
10219
10566
  {
10220
10567
  ...NOTICE_FONT_ROOT_PROPS,
@@ -10227,7 +10574,7 @@ var RedactoNoticeAssisted = ({
10227
10574
  role: "dialog",
10228
10575
  "aria-modal": "true",
10229
10576
  "aria-label": noticeTitle,
10230
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { style: styles3.content, children: renderBody() })
10577
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: styles3.content, children: renderBody() })
10231
10578
  }
10232
10579
  ) });
10233
10580
  };
@@ -10249,7 +10596,7 @@ var scrollIntoViewSoft = (el) => {
10249
10596
  var ClockIcon = ({
10250
10597
  size = 13,
10251
10598
  color = "#667085"
10252
- }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
10599
+ }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
10253
10600
  "svg",
10254
10601
  {
10255
10602
  width: size,
@@ -10263,15 +10610,15 @@ var ClockIcon = ({
10263
10610
  "aria-hidden": "true",
10264
10611
  style: { flexShrink: 0 },
10265
10612
  children: [
10266
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
10267
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 7v5l3 2" })
10613
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
10614
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 7v5l3 2" })
10268
10615
  ]
10269
10616
  }
10270
10617
  );
10271
10618
  var LockIcon = ({
10272
10619
  size = 15,
10273
10620
  color = "#475467"
10274
- }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
10621
+ }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
10275
10622
  "svg",
10276
10623
  {
10277
10624
  width: size,
@@ -10285,15 +10632,15 @@ var LockIcon = ({
10285
10632
  "aria-hidden": "true",
10286
10633
  style: { flexShrink: 0 },
10287
10634
  children: [
10288
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2" }),
10289
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
10635
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2" }),
10636
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
10290
10637
  ]
10291
10638
  }
10292
10639
  );
10293
10640
  var CheckIcon = ({
10294
10641
  size = 16,
10295
10642
  color = "#10B981"
10296
- }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10643
+ }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10297
10644
  "svg",
10298
10645
  {
10299
10646
  width: size,
@@ -10306,13 +10653,13 @@ var CheckIcon = ({
10306
10653
  strokeLinejoin: "round",
10307
10654
  "aria-hidden": "true",
10308
10655
  style: { flexShrink: 0 },
10309
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M20 6 9 17l-5-5" })
10656
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M20 6 9 17l-5-5" })
10310
10657
  }
10311
10658
  );
10312
10659
  var PhoneIcon = ({
10313
10660
  size = 14,
10314
10661
  color = "#475467"
10315
- }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
10662
+ }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10316
10663
  "svg",
10317
10664
  {
10318
10665
  width: size,
@@ -10325,13 +10672,13 @@ var PhoneIcon = ({
10325
10672
  strokeLinejoin: "round",
10326
10673
  "aria-hidden": "true",
10327
10674
  style: { flexShrink: 0 },
10328
- children: /* @__PURE__ */ (0, import_jsx_runtime3.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" })
10675
+ 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" })
10329
10676
  }
10330
10677
  );
10331
10678
  var MailIcon = ({
10332
10679
  size = 14,
10333
10680
  color = "#475467"
10334
- }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
10681
+ }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
10335
10682
  "svg",
10336
10683
  {
10337
10684
  width: size,
@@ -10345,15 +10692,15 @@ var MailIcon = ({
10345
10692
  "aria-hidden": "true",
10346
10693
  style: { flexShrink: 0 },
10347
10694
  children: [
10348
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
10349
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m22 7-10 5L2 7" })
10695
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
10696
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "m22 7-10 5L2 7" })
10350
10697
  ]
10351
10698
  }
10352
10699
  );
10353
10700
 
10354
10701
  // src/RedactoNoticeConsent/components/DigiLockerCallback.tsx
10355
10702
  var import_react8 = require("react");
10356
- var import_jsx_runtime4 = require("react/jsx-runtime");
10703
+ var import_jsx_runtime6 = require("react/jsx-runtime");
10357
10704
  var DigiLockerCallback = ({
10358
10705
  accessToken: propAccessToken,
10359
10706
  baseUrl,
@@ -10751,25 +11098,25 @@ var DigiLockerCallback = ({
10751
11098
  transform: translateY(0);
10752
11099
  }
10753
11100
  `;
10754
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
10755
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("style", { dangerouslySetInnerHTML: { __html: keyframesStyle } }),
10756
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: cardStyle, children: [
10757
- status === "processing" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
10758
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: spinnerContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: spinnerStyle }) }),
10759
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { style: titleStyle, children: "Processing Verification" }),
10760
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: messageStyle, children: message }),
10761
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: subtextStyle, children: "Please wait while we verify your guardian's identity..." })
11101
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11102
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("style", { dangerouslySetInnerHTML: { __html: keyframesStyle } }),
11103
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: cardStyle, children: [
11104
+ status === "processing" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11105
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: spinnerContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: spinnerStyle }) }),
11106
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { style: titleStyle, children: "Processing Verification" }),
11107
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: messageStyle, children: message }),
11108
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: subtextStyle, children: "Please wait while we verify your guardian's identity..." })
10762
11109
  ] }),
10763
- status === "success" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
10764
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { position: "relative", width: "72px", height: "72px", margin: "0 auto 28px" }, children: [
10765
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: {
11110
+ status === "success" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11111
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { position: "relative", width: "72px", height: "72px", margin: "0 auto 28px" }, children: [
11112
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: {
10766
11113
  position: "absolute",
10767
11114
  inset: "-8px",
10768
11115
  borderRadius: "50%",
10769
11116
  border: "2px solid #d1fae5",
10770
11117
  animation: "redacto-dl-pulse 1.5s ease-out infinite"
10771
11118
  } }),
10772
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: successIconStyle, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
11119
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: successIconStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
10773
11120
  "svg",
10774
11121
  {
10775
11122
  width: "30",
@@ -10781,16 +11128,16 @@ var DigiLockerCallback = ({
10781
11128
  strokeLinecap: "round",
10782
11129
  strokeLinejoin: "round",
10783
11130
  style: { strokeDasharray: 24, animation: "redacto-dl-check 0.4s ease-out 0.3s forwards", strokeDashoffset: 24 },
10784
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("polyline", { points: "20 6 9 17 4 12" })
11131
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("polyline", { points: "20 6 9 17 4 12" })
10785
11132
  }
10786
11133
  ) })
10787
11134
  ] }),
10788
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { style: titleStyle, children: "Verification Successful" }),
10789
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: messageStyle, children: message }),
10790
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: subtextStyle, children: "You will be redirected automatically." })
11135
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { style: titleStyle, children: "Verification Successful" }),
11136
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: messageStyle, children: message }),
11137
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: subtextStyle, children: "You will be redirected automatically." })
10791
11138
  ] }),
10792
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
10793
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: errorIconStyle, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
11139
+ status === "error" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11140
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: errorIconStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
10794
11141
  "svg",
10795
11142
  {
10796
11143
  width: "30",
@@ -10802,15 +11149,15 @@ var DigiLockerCallback = ({
10802
11149
  strokeLinecap: "round",
10803
11150
  strokeLinejoin: "round",
10804
11151
  children: [
10805
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
10806
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
11152
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
11153
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
10807
11154
  ]
10808
11155
  }
10809
11156
  ) }),
10810
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { style: titleStyle, children: "Verification Failed" }),
10811
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: messageStyle, children: message }),
10812
- errorDetail && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { style: errorDetailStyle, children: errorDetail }),
10813
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
11157
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { style: titleStyle, children: "Verification Failed" }),
11158
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: messageStyle, children: message }),
11159
+ errorDetail && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: errorDetailStyle, children: errorDetail }),
11160
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
10814
11161
  "button",
10815
11162
  {
10816
11163
  className: "redacto-dl-retry-btn",