@tantainnovative/ndpr-toolkit 3.3.1 → 3.4.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.
Files changed (155) hide show
  1. package/CHANGELOG.md +529 -0
  2. package/dist/{ConsentBanner-CDRT0o2k.d.mts → ConsentBanner-F5ayys5K.d.mts} +10 -0
  3. package/dist/{ConsentBanner-Vxyt8SCX.d.ts → ConsentBanner-VqIPophc.d.ts} +10 -0
  4. package/dist/{styling-B7CBzYG7.d.ts → ConsentManager-C7I3PDe8.d.mts} +2 -62
  5. package/dist/{styling-uJLsBbER.d.mts → ConsentManager-CQ2IZtUU.d.ts} +2 -62
  6. package/dist/{sanitize-B0AzEm1D.d.mts → NDPRProvider-DYFb8xEl.d.ts} +2 -94
  7. package/dist/{sanitize-B0AzEm1D.d.ts → NDPRProvider-U3QNu6MA.d.mts} +2 -94
  8. package/dist/adapters.js +1 -1
  9. package/dist/adapters.mjs +1 -1
  10. package/dist/breach.js +1 -1
  11. package/dist/breach.mjs +1 -1
  12. package/dist/chunk-2WH4DLV5.js +3 -0
  13. package/dist/chunk-3NQQSU4P.js +2 -0
  14. package/dist/chunk-3VQAYQR7.js +7 -0
  15. package/dist/chunk-4R42ZNO7.mjs +318 -0
  16. package/dist/chunk-5HL4UBFV.js +2 -0
  17. package/dist/chunk-6HZL2WDU.mjs +2 -0
  18. package/dist/chunk-6QPRDQZF.js +2 -0
  19. package/dist/chunk-74Z23WUA.mjs +2 -0
  20. package/dist/chunk-AHSMDPG5.js +132 -0
  21. package/dist/chunk-BN77GP4W.mjs +2 -0
  22. package/dist/chunk-C5QO3SX4.js +2 -0
  23. package/dist/chunk-CISJAQ6W.mjs +2 -0
  24. package/dist/chunk-DUY6F3GT.mjs +94 -0
  25. package/dist/chunk-EHAZIKDX.js +81 -0
  26. package/dist/chunk-EPT2K355.mjs +2 -0
  27. package/dist/chunk-HGGLW5TE.js +2 -0
  28. package/dist/chunk-HQSU7LGM.js +94 -0
  29. package/dist/chunk-IZCWCE7W.mjs +2 -0
  30. package/dist/chunk-JBSCER34.js +2 -0
  31. package/dist/chunk-KF3EFJEF.mjs +3 -0
  32. package/dist/chunk-KSERBMXW.mjs +4 -0
  33. package/dist/chunk-LJNNPAFU.mjs +2 -0
  34. package/dist/{chunk-UXMGBIX6.js → chunk-LSCMXAPY.mjs} +4 -4
  35. package/dist/chunk-LSNL4XR5.js +2 -0
  36. package/dist/chunk-MG73MOZC.mjs +15 -0
  37. package/dist/chunk-NCOZB2WU.mjs +2 -0
  38. package/dist/chunk-NQNFS3QI.js +7 -0
  39. package/dist/{chunk-ZEOQYWOE.mjs → chunk-P2YV6DR3.js} +4 -4
  40. package/dist/chunk-P6QAFBCV.js +2 -0
  41. package/dist/chunk-QVULSG6J.mjs +3 -0
  42. package/dist/chunk-R5FW5XUQ.mjs +2 -0
  43. package/dist/chunk-RGNP45VR.js +2 -0
  44. package/dist/chunk-RLYTX3MM.js +2 -0
  45. package/dist/chunk-RNTNHVKZ.js +15 -0
  46. package/dist/chunk-RRVKUCFR.mjs +2 -0
  47. package/dist/chunk-RXL6CZAI.js +2 -0
  48. package/dist/chunk-RY3PGVLZ.mjs +2 -0
  49. package/dist/chunk-SUEGUY35.js +2 -0
  50. package/dist/chunk-SYMQJO2W.mjs +7 -0
  51. package/dist/chunk-TCN22KYP.mjs +7 -0
  52. package/dist/chunk-UFPSUO52.js +318 -0
  53. package/dist/chunk-VTITKWGX.mjs +2 -0
  54. package/dist/chunk-WH6ZMUOS.mjs +81 -0
  55. package/dist/chunk-WTJGLNTB.js +3 -0
  56. package/dist/chunk-XHROISIF.mjs +2 -0
  57. package/dist/chunk-XMBSJJ5U.js +4 -0
  58. package/dist/chunk-ZLSWOFAY.mjs +132 -0
  59. package/dist/chunk-ZPKVLTSX.js +2 -0
  60. package/dist/consent.d.mts +6 -4
  61. package/dist/consent.d.ts +6 -4
  62. package/dist/consent.js +1 -1
  63. package/dist/consent.mjs +1 -1
  64. package/dist/core.d.mts +6 -29
  65. package/dist/core.d.ts +6 -29
  66. package/dist/core.js +1 -1
  67. package/dist/core.mjs +1 -1
  68. package/dist/cross-border.js +1 -1
  69. package/dist/cross-border.mjs +1 -1
  70. package/dist/docx-BxKascXN.d.ts +64 -0
  71. package/dist/docx-CV7Vsry_.d.mts +64 -0
  72. package/dist/dpia.js +1 -1
  73. package/dist/dpia.mjs +1 -1
  74. package/dist/dsr.js +1 -1
  75. package/dist/dsr.mjs +1 -1
  76. package/dist/hooks.d.mts +3 -3
  77. package/dist/hooks.d.ts +3 -3
  78. package/dist/hooks.js +1 -1
  79. package/dist/hooks.mjs +1 -1
  80. package/dist/index.d.mts +7 -5
  81. package/dist/index.d.ts +7 -5
  82. package/dist/index.js +1 -1
  83. package/dist/index.mjs +1 -1
  84. package/dist/lawful-basis.js +1 -1
  85. package/dist/lawful-basis.mjs +1 -1
  86. package/dist/locale-CxJx2tzn.d.mts +25 -0
  87. package/dist/locale-DSkrtf-c.d.ts +25 -0
  88. package/dist/{policy-engine-C6nC2t3a.d.ts → policy-engine-CCUCud2T.d.ts} +1 -1
  89. package/dist/{policy-engine-DefZcX3R.d.mts → policy-engine-fYSqEqSW.d.mts} +1 -1
  90. package/dist/{policy-sections-DFDPVCCg.d.ts → policy-sections-BYx6fEFk.d.ts} +4 -2
  91. package/dist/{policy-sections-Bylm31kZ.d.mts → policy-sections-Dm97Nq8m.d.mts} +4 -2
  92. package/dist/{policy-templates-CIKcV0i1.d.ts → policy-templates-DhLwq4R-.d.ts} +8 -1
  93. package/dist/{policy-templates-DMsPwOSZ.d.mts → policy-templates-DwYl2329.d.mts} +8 -1
  94. package/dist/policy.d.mts +36 -71
  95. package/dist/policy.d.ts +36 -71
  96. package/dist/policy.js +1 -1
  97. package/dist/policy.mjs +1 -1
  98. package/dist/presets.d.mts +2 -2
  99. package/dist/presets.d.ts +2 -2
  100. package/dist/presets.js +1 -1
  101. package/dist/presets.mjs +1 -1
  102. package/dist/ropa.js +1 -1
  103. package/dist/ropa.mjs +1 -1
  104. package/dist/sanitize-CxxwKxAx.d.mts +94 -0
  105. package/dist/sanitize-CxxwKxAx.d.ts +94 -0
  106. package/dist/server.d.mts +24 -0
  107. package/dist/server.d.ts +24 -0
  108. package/dist/server.js +2 -0
  109. package/dist/server.mjs +2 -0
  110. package/dist/styles.css +1423 -31
  111. package/dist/styling-BMDGQDgS.d.mts +64 -0
  112. package/dist/styling-BaoQtV06.d.ts +64 -0
  113. package/dist/unstyled.d.mts +52 -19
  114. package/dist/unstyled.d.ts +52 -19
  115. package/dist/unstyled.js +1 -1
  116. package/dist/unstyled.mjs +1 -1
  117. package/dist/{useAdaptivePolicyWizard-A1PyOy6P.d.mts → useAdaptivePolicyWizard-BnjW4OR4.d.mts} +1 -1
  118. package/dist/{useAdaptivePolicyWizard-LVIKhAxw.d.ts → useAdaptivePolicyWizard-sb3m4-Zk.d.ts} +1 -1
  119. package/dist/{useDefaultPrivacyPolicy-ySWU7nc-.d.mts → useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts} +30 -9
  120. package/dist/{useDefaultPrivacyPolicy-DvCbeEl1.d.ts → useDefaultPrivacyPolicy-DkOqMg2e.d.ts} +30 -9
  121. package/package.json +14 -2
  122. package/dist/chunk-25OOUES4.js +0 -2
  123. package/dist/chunk-4JKTIR33.mjs +0 -2
  124. package/dist/chunk-5BUS6AI7.js +0 -2
  125. package/dist/chunk-5ECDPRSZ.js +0 -7
  126. package/dist/chunk-6YN73KR7.mjs +0 -2
  127. package/dist/chunk-CDZDT2OS.mjs +0 -320
  128. package/dist/chunk-CWUPGY3M.mjs +0 -3
  129. package/dist/chunk-CYU6YUJQ.mjs +0 -81
  130. package/dist/chunk-EKHBORAH.js +0 -81
  131. package/dist/chunk-ENIMJ6SQ.js +0 -2
  132. package/dist/chunk-FLKJSGR7.mjs +0 -94
  133. package/dist/chunk-FWLPJ5YI.js +0 -94
  134. package/dist/chunk-GCQRHMTQ.mjs +0 -144
  135. package/dist/chunk-GMLCWGNJ.js +0 -7
  136. package/dist/chunk-GXLSOZCH.mjs +0 -2
  137. package/dist/chunk-LETEUS5X.mjs +0 -2
  138. package/dist/chunk-LU4PFST7.js +0 -144
  139. package/dist/chunk-NBSVFQ5G.js +0 -2
  140. package/dist/chunk-OYR3L4XS.mjs +0 -7
  141. package/dist/chunk-QF6XNKU6.mjs +0 -2
  142. package/dist/chunk-QJ3JNHO7.js +0 -2
  143. package/dist/chunk-QNCGRCAX.mjs +0 -2
  144. package/dist/chunk-SAA7UVI2.js +0 -3
  145. package/dist/chunk-TI2M7H6R.mjs +0 -7
  146. package/dist/chunk-TXXWCB5O.js +0 -320
  147. package/dist/chunk-UGY5ZYUG.js +0 -2
  148. package/dist/chunk-UO6QPJLH.js +0 -2
  149. package/dist/chunk-UX6ZZNEM.mjs +0 -3
  150. package/dist/chunk-XFUEZ3MP.mjs +0 -2
  151. package/dist/chunk-XHSHPB74.js +0 -2
  152. package/dist/chunk-YCX6BFOQ.js +0 -2
  153. package/dist/chunk-YURSF2YO.mjs +0 -2
  154. package/dist/chunk-YZXUAIYN.js +0 -3
  155. package/dist/chunk-ZT7KNFAU.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.js';
2
+ import { C as ConsentOption, a as ConsentSettings } from './consent-CmVzqZUk.mjs';
3
3
 
4
4
  interface ConsentManagerClassNames {
5
5
  root?: string;
@@ -102,64 +102,4 @@ interface ConsentManagerProps {
102
102
  */
103
103
  declare const ConsentManager: React__default.FC<ConsentManagerProps>;
104
104
 
105
- interface ConsentStorageClassNames {
106
- root?: string;
107
- }
108
- interface ConsentStorageProps {
109
- /**
110
- * Current consent settings
111
- */
112
- settings: ConsentSettings;
113
- /**
114
- * Storage options for consent settings
115
- */
116
- storageOptions?: ConsentStorageOptions;
117
- /**
118
- * Callback function called when settings are loaded from storage
119
- */
120
- onLoad?: (settings: ConsentSettings | null) => void;
121
- /**
122
- * Callback function called when settings are saved to storage
123
- */
124
- onSave?: (settings: ConsentSettings) => void;
125
- /**
126
- * Whether to automatically save settings to storage
127
- * @default true
128
- */
129
- autoSave?: boolean;
130
- /**
131
- * Whether to automatically load settings from storage on mount
132
- * @default true
133
- */
134
- autoLoad?: boolean;
135
- /**
136
- * Object of CSS class overrides keyed by semantic section name.
137
- */
138
- classNames?: ConsentStorageClassNames;
139
- /**
140
- * When true, all default classes are removed so consumers
141
- * can style from scratch using classNames.
142
- */
143
- unstyled?: boolean;
144
- /**
145
- * Children to render
146
- * Can be either React nodes or a render prop function that receives storage methods
147
- */
148
- children?: React__default.ReactNode | ((props: {
149
- loadSettings: () => ConsentSettings | null;
150
- saveSettings: (settings: ConsentSettings) => void;
151
- clearSettings: () => void;
152
- loaded: boolean;
153
- }) => React__default.ReactNode);
154
- }
155
- declare const ConsentStorage: ({ settings, storageOptions, onLoad, onSave, autoSave, autoLoad, classNames, unstyled, children }: ConsentStorageProps) => React__default.ReactElement | null;
156
-
157
- /**
158
- * Resolves class names for a component section.
159
- * If unstyled is true, only the override class is used (or empty string).
160
- * If an override is provided, it fully REPLACES the default — no appending.
161
- * Otherwise the default class string is returned as-is.
162
- */
163
- declare function resolveClass(defaultClass: string, override?: string, unstyled?: boolean): string;
164
-
165
- export { ConsentManager as C, type ConsentManagerClassNames as a, ConsentStorage as b, type ConsentStorageClassNames as c, type ConsentManagerProps as d, type ConsentStorageProps as e, resolveClass as r };
105
+ export { ConsentManager as C, type ConsentManagerClassNames as a, type ConsentManagerProps as b };
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.mjs';
2
+ import { C as ConsentOption, a as ConsentSettings } from './consent-CmVzqZUk.js';
3
3
 
4
4
  interface ConsentManagerClassNames {
5
5
  root?: string;
@@ -102,64 +102,4 @@ interface ConsentManagerProps {
102
102
  */
103
103
  declare const ConsentManager: React__default.FC<ConsentManagerProps>;
104
104
 
105
- interface ConsentStorageClassNames {
106
- root?: string;
107
- }
108
- interface ConsentStorageProps {
109
- /**
110
- * Current consent settings
111
- */
112
- settings: ConsentSettings;
113
- /**
114
- * Storage options for consent settings
115
- */
116
- storageOptions?: ConsentStorageOptions;
117
- /**
118
- * Callback function called when settings are loaded from storage
119
- */
120
- onLoad?: (settings: ConsentSettings | null) => void;
121
- /**
122
- * Callback function called when settings are saved to storage
123
- */
124
- onSave?: (settings: ConsentSettings) => void;
125
- /**
126
- * Whether to automatically save settings to storage
127
- * @default true
128
- */
129
- autoSave?: boolean;
130
- /**
131
- * Whether to automatically load settings from storage on mount
132
- * @default true
133
- */
134
- autoLoad?: boolean;
135
- /**
136
- * Object of CSS class overrides keyed by semantic section name.
137
- */
138
- classNames?: ConsentStorageClassNames;
139
- /**
140
- * When true, all default classes are removed so consumers
141
- * can style from scratch using classNames.
142
- */
143
- unstyled?: boolean;
144
- /**
145
- * Children to render
146
- * Can be either React nodes or a render prop function that receives storage methods
147
- */
148
- children?: React__default.ReactNode | ((props: {
149
- loadSettings: () => ConsentSettings | null;
150
- saveSettings: (settings: ConsentSettings) => void;
151
- clearSettings: () => void;
152
- loaded: boolean;
153
- }) => React__default.ReactNode);
154
- }
155
- declare const ConsentStorage: ({ settings, storageOptions, onLoad, onSave, autoSave, autoLoad, classNames, unstyled, children }: ConsentStorageProps) => React__default.ReactElement | null;
156
-
157
- /**
158
- * Resolves class names for a component section.
159
- * If unstyled is true, only the override class is used (or empty string).
160
- * If an override is provided, it fully REPLACES the default — no appending.
161
- * Otherwise the default class string is returned as-is.
162
- */
163
- declare function resolveClass(defaultClass: string, override?: string, unstyled?: boolean): string;
164
-
165
- export { ConsentManager as C, type ConsentManagerClassNames as a, ConsentStorage as b, type ConsentStorageClassNames as c, type ConsentManagerProps as d, type ConsentStorageProps as e, resolveClass as r };
105
+ export { ConsentManager as C, type ConsentManagerClassNames as a, type ConsentManagerProps as b };
@@ -1,90 +1,5 @@
1
1
  import React__default, { ReactNode, ErrorInfo } from 'react';
2
-
3
- /**
4
- * Locale strings for all toolkit components.
5
- * Pass partial overrides — missing keys fall back to English defaults.
6
- */
7
- interface NDPRLocale {
8
- consent?: {
9
- title?: string;
10
- description?: string;
11
- acceptAll?: string;
12
- rejectAll?: string;
13
- customize?: string;
14
- savePreferences?: string;
15
- selectAll?: string;
16
- deselectAll?: string;
17
- required?: string;
18
- cookieNotice?: string;
19
- };
20
- dsr?: {
21
- title?: string;
22
- description?: string;
23
- submitRequest?: string;
24
- reset?: string;
25
- fullName?: string;
26
- email?: string;
27
- phone?: string;
28
- requestType?: string;
29
- additionalInfo?: string;
30
- identityVerification?: string;
31
- identifierType?: string;
32
- identifierValue?: string;
33
- privacyNotice?: string;
34
- successMessage?: string;
35
- };
36
- breach?: {
37
- title?: string;
38
- description?: string;
39
- submitReport?: string;
40
- breachTitle?: string;
41
- category?: string;
42
- discoveredAt?: string;
43
- detailedDescription?: string;
44
- };
45
- dpia?: {
46
- title?: string;
47
- next?: string;
48
- previous?: string;
49
- complete?: string;
50
- progress?: string;
51
- };
52
- policy?: {
53
- title?: string;
54
- generate?: string;
55
- preview?: string;
56
- export?: string;
57
- sections?: string;
58
- variables?: string;
59
- };
60
- compliance?: {
61
- score?: string;
62
- excellent?: string;
63
- good?: string;
64
- needsWork?: string;
65
- critical?: string;
66
- recommendations?: string;
67
- passed?: string;
68
- gaps?: string;
69
- };
70
- common?: {
71
- loading?: string;
72
- error?: string;
73
- save?: string;
74
- cancel?: string;
75
- delete?: string;
76
- edit?: string;
77
- add?: string;
78
- back?: string;
79
- next?: string;
80
- search?: string;
81
- noResults?: string;
82
- };
83
- }
84
-
85
- declare const defaultLocale: Required<{
86
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
87
- }>;
2
+ import { N as NDPRLocale, d as defaultLocale } from './sanitize-CxxwKxAx.js';
88
3
 
89
4
  /**
90
5
  * Configuration for the NDPR toolkit provider.
@@ -150,11 +65,4 @@ declare function useNDPRConfig(): NDPRConfig;
150
65
  */
151
66
  declare function useNDPRLocale(): typeof defaultLocale;
152
67
 
153
- /**
154
- * Sanitizes user input to prevent XSS attacks.
155
- * Escapes HTML special characters so that data rendered in dashboards
156
- * or other consumer UIs cannot execute embedded scripts.
157
- */
158
- declare function sanitizeInput(input: string): string;
159
-
160
- export { type NDPRConfig as N, NDPRProvider as a, type NDPRLocale as b, useNDPRLocale as c, defaultLocale as d, sanitizeInput as s, useNDPRConfig as u };
68
+ export { type NDPRConfig as N, NDPRProvider as a, useNDPRLocale as b, useNDPRConfig as u };
@@ -1,90 +1,5 @@
1
1
  import React__default, { ReactNode, ErrorInfo } from 'react';
2
-
3
- /**
4
- * Locale strings for all toolkit components.
5
- * Pass partial overrides — missing keys fall back to English defaults.
6
- */
7
- interface NDPRLocale {
8
- consent?: {
9
- title?: string;
10
- description?: string;
11
- acceptAll?: string;
12
- rejectAll?: string;
13
- customize?: string;
14
- savePreferences?: string;
15
- selectAll?: string;
16
- deselectAll?: string;
17
- required?: string;
18
- cookieNotice?: string;
19
- };
20
- dsr?: {
21
- title?: string;
22
- description?: string;
23
- submitRequest?: string;
24
- reset?: string;
25
- fullName?: string;
26
- email?: string;
27
- phone?: string;
28
- requestType?: string;
29
- additionalInfo?: string;
30
- identityVerification?: string;
31
- identifierType?: string;
32
- identifierValue?: string;
33
- privacyNotice?: string;
34
- successMessage?: string;
35
- };
36
- breach?: {
37
- title?: string;
38
- description?: string;
39
- submitReport?: string;
40
- breachTitle?: string;
41
- category?: string;
42
- discoveredAt?: string;
43
- detailedDescription?: string;
44
- };
45
- dpia?: {
46
- title?: string;
47
- next?: string;
48
- previous?: string;
49
- complete?: string;
50
- progress?: string;
51
- };
52
- policy?: {
53
- title?: string;
54
- generate?: string;
55
- preview?: string;
56
- export?: string;
57
- sections?: string;
58
- variables?: string;
59
- };
60
- compliance?: {
61
- score?: string;
62
- excellent?: string;
63
- good?: string;
64
- needsWork?: string;
65
- critical?: string;
66
- recommendations?: string;
67
- passed?: string;
68
- gaps?: string;
69
- };
70
- common?: {
71
- loading?: string;
72
- error?: string;
73
- save?: string;
74
- cancel?: string;
75
- delete?: string;
76
- edit?: string;
77
- add?: string;
78
- back?: string;
79
- next?: string;
80
- search?: string;
81
- noResults?: string;
82
- };
83
- }
84
-
85
- declare const defaultLocale: Required<{
86
- [K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
87
- }>;
2
+ import { N as NDPRLocale, d as defaultLocale } from './sanitize-CxxwKxAx.mjs';
88
3
 
89
4
  /**
90
5
  * Configuration for the NDPR toolkit provider.
@@ -150,11 +65,4 @@ declare function useNDPRConfig(): NDPRConfig;
150
65
  */
151
66
  declare function useNDPRLocale(): typeof defaultLocale;
152
67
 
153
- /**
154
- * Sanitizes user input to prevent XSS attacks.
155
- * Escapes HTML special characters so that data rendered in dashboards
156
- * or other consumer UIs cannot execute embedded scripts.
157
- */
158
- declare function sanitizeInput(input: string): string;
159
-
160
- export { type NDPRConfig as N, NDPRProvider as a, type NDPRLocale as b, useNDPRLocale as c, defaultLocale as d, sanitizeInput as s, useNDPRConfig as u };
68
+ export { type NDPRConfig as N, NDPRProvider as a, useNDPRLocale as b, useNDPRConfig as u };
package/dist/adapters.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkA4PK7JB2_js=require('./chunk-A4PK7JB2.js'),chunkELKB2AFZ_js=require('./chunk-ELKB2AFZ.js'),chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js');function m(e,t={}){var a;let r=(a=t.headers)!=null?a:{};return {load(){return chunkMQFZHA2D_js.d(this,null,function*(){try{let o=yield fetch(e,{method:"GET",headers:chunkMQFZHA2D_js.a({},r)});return o.ok?yield o.json():null}catch(o){return null}})},save(o){return chunkMQFZHA2D_js.d(this,null,function*(){try{let n=yield fetch(e,{method:"POST",headers:chunkMQFZHA2D_js.a({"Content-Type":"application/json"},r),body:JSON.stringify(o)});n.ok||console.warn(`[ndpr-toolkit] Failed to save to ${e}: ${n.status}`);}catch(n){console.warn(`[ndpr-toolkit] Failed to save to ${e}`);}})},remove(){return chunkMQFZHA2D_js.d(this,null,function*(){try{let o=yield fetch(e,{method:"DELETE",headers:chunkMQFZHA2D_js.a({},r)});o.ok||console.warn(`[ndpr-toolkit] Failed to delete from ${e}: ${o.status}`);}catch(o){console.warn(`[ndpr-toolkit] Failed to delete from ${e}`);}})}}}function f(e){let t=e!=null?e:null;return {load(){return t},save(r){t=r;},remove(){t=null;}}}function u(e,...t){return {load(){return e.load()},save(r){let a=e.save(r),s=()=>{for(let o of t)try{o.save(r);}catch(n){console.warn("[ndpr-toolkit] Secondary adapter save failed:",n);}};if(a instanceof Promise)return a.then(()=>s());s();},remove(){let r=e.remove(),a=()=>{for(let s of t)try{s.remove();}catch(o){console.warn("[ndpr-toolkit] Secondary adapter remove failed:",o);}};if(r instanceof Promise)return r.then(()=>a());a();}}}Object.defineProperty(exports,"cookieAdapter",{enumerable:true,get:function(){return chunkA4PK7JB2_js.b}});Object.defineProperty(exports,"sessionStorageAdapter",{enumerable:true,get:function(){return chunkA4PK7JB2_js.a}});Object.defineProperty(exports,"localStorageAdapter",{enumerable:true,get:function(){return chunkELKB2AFZ_js.a}});exports.apiAdapter=m;exports.composeAdapters=u;exports.memoryAdapter=f;//# sourceMappingURL=adapters.js.map
1
+ 'use strict';var chunkJBSCER34_js=require('./chunk-JBSCER34.js'),chunkA4PK7JB2_js=require('./chunk-A4PK7JB2.js'),chunkELKB2AFZ_js=require('./chunk-ELKB2AFZ.js');require('./chunk-MQFZHA2D.js');Object.defineProperty(exports,"apiAdapter",{enumerable:true,get:function(){return chunkJBSCER34_js.a}});Object.defineProperty(exports,"composeAdapters",{enumerable:true,get:function(){return chunkJBSCER34_js.c}});Object.defineProperty(exports,"memoryAdapter",{enumerable:true,get:function(){return chunkJBSCER34_js.b}});Object.defineProperty(exports,"cookieAdapter",{enumerable:true,get:function(){return chunkA4PK7JB2_js.b}});Object.defineProperty(exports,"sessionStorageAdapter",{enumerable:true,get:function(){return chunkA4PK7JB2_js.a}});Object.defineProperty(exports,"localStorageAdapter",{enumerable:true,get:function(){return chunkELKB2AFZ_js.a}});//# sourceMappingURL=adapters.js.map
2
2
  //# sourceMappingURL=adapters.js.map
package/dist/adapters.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export{b as cookieAdapter,a as sessionStorageAdapter}from'./chunk-R3OYAJI6.mjs';export{a as localStorageAdapter}from'./chunk-6WIP33TW.mjs';import {d,a}from'./chunk-WWT2ZSNU.mjs';function m(e,t={}){var a$1;let r=(a$1=t.headers)!=null?a$1:{};return {load(){return d(this,null,function*(){try{let o=yield fetch(e,{method:"GET",headers:a({},r)});return o.ok?yield o.json():null}catch(o){return null}})},save(o){return d(this,null,function*(){try{let n=yield fetch(e,{method:"POST",headers:a({"Content-Type":"application/json"},r),body:JSON.stringify(o)});n.ok||console.warn(`[ndpr-toolkit] Failed to save to ${e}: ${n.status}`);}catch(n){console.warn(`[ndpr-toolkit] Failed to save to ${e}`);}})},remove(){return d(this,null,function*(){try{let o=yield fetch(e,{method:"DELETE",headers:a({},r)});o.ok||console.warn(`[ndpr-toolkit] Failed to delete from ${e}: ${o.status}`);}catch(o){console.warn(`[ndpr-toolkit] Failed to delete from ${e}`);}})}}}function f(e){let t=e!=null?e:null;return {load(){return t},save(r){t=r;},remove(){t=null;}}}function u(e,...t){return {load(){return e.load()},save(r){let a=e.save(r),s=()=>{for(let o of t)try{o.save(r);}catch(n){console.warn("[ndpr-toolkit] Secondary adapter save failed:",n);}};if(a instanceof Promise)return a.then(()=>s());s();},remove(){let r=e.remove(),a=()=>{for(let s of t)try{s.remove();}catch(o){console.warn("[ndpr-toolkit] Secondary adapter remove failed:",o);}};if(r instanceof Promise)return r.then(()=>a());a();}}}export{m as apiAdapter,u as composeAdapters,f as memoryAdapter};//# sourceMappingURL=adapters.mjs.map
1
+ export{a as apiAdapter,c as composeAdapters,b as memoryAdapter}from'./chunk-RY3PGVLZ.mjs';export{b as cookieAdapter,a as sessionStorageAdapter}from'./chunk-R3OYAJI6.mjs';export{a as localStorageAdapter}from'./chunk-6WIP33TW.mjs';import'./chunk-WWT2ZSNU.mjs';//# sourceMappingURL=adapters.mjs.map
2
2
  //# sourceMappingURL=adapters.mjs.map
package/dist/breach.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkEKHBORAH_js=require('./chunk-EKHBORAH.js'),chunkSAA7UVI2_js=require('./chunk-SAA7UVI2.js'),chunkI4M2AA3N_js=require('./chunk-I4M2AA3N.js'),chunkBKRETVJ6_js=require('./chunk-BKRETVJ6.js');require('./chunk-I54CDQGN.js'),require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var p=react.createContext(null);function P(){let e=react.useContext(p);if(!e)throw new Error("Breach compound components must be wrapped in <Breach.Provider>. Example: <Breach.Provider categories={...}><Breach.ReportForm /></Breach.Provider>");return e}var s=({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u,children:d})=>{let y=chunkI4M2AA3N_js.a({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u}),l=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},y),{categories:e});return jsxRuntime.jsx(p.Provider,{value:l,children:d})};var A={Provider:s,ReportForm:chunkSAA7UVI2_js.a,RiskAssessment:chunkEKHBORAH_js.a,NotificationManager:chunkEKHBORAH_js.b,ReportGenerator:chunkEKHBORAH_js.c};Object.defineProperty(exports,"BreachNotificationManager",{enumerable:true,get:function(){return chunkEKHBORAH_js.b}});Object.defineProperty(exports,"BreachRiskAssessment",{enumerable:true,get:function(){return chunkEKHBORAH_js.a}});Object.defineProperty(exports,"RegulatoryReportGenerator",{enumerable:true,get:function(){return chunkEKHBORAH_js.c}});Object.defineProperty(exports,"BreachReportForm",{enumerable:true,get:function(){return chunkSAA7UVI2_js.a}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkI4M2AA3N_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunkBKRETVJ6_js.a}});exports.Breach=A;exports.BreachProvider=s;exports.useBreachCompound=P;//# sourceMappingURL=breach.js.map
1
+ 'use strict';var chunkEHAZIKDX_js=require('./chunk-EHAZIKDX.js'),chunkWTJGLNTB_js=require('./chunk-WTJGLNTB.js'),chunkI4M2AA3N_js=require('./chunk-I4M2AA3N.js'),chunkBKRETVJ6_js=require('./chunk-BKRETVJ6.js');require('./chunk-I54CDQGN.js'),require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var p=react.createContext(null);function P(){let e=react.useContext(p);if(!e)throw new Error("Breach compound components must be wrapped in <Breach.Provider>. Example: <Breach.Provider categories={...}><Breach.ReportForm /></Breach.Provider>");return e}var s=({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u,children:d})=>{let y=chunkI4M2AA3N_js.a({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u}),l=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},y),{categories:e});return jsxRuntime.jsx(p.Provider,{value:l,children:d})};var A={Provider:s,ReportForm:chunkWTJGLNTB_js.a,RiskAssessment:chunkEHAZIKDX_js.a,NotificationManager:chunkEHAZIKDX_js.b,ReportGenerator:chunkEHAZIKDX_js.c};Object.defineProperty(exports,"BreachNotificationManager",{enumerable:true,get:function(){return chunkEHAZIKDX_js.b}});Object.defineProperty(exports,"BreachRiskAssessment",{enumerable:true,get:function(){return chunkEHAZIKDX_js.a}});Object.defineProperty(exports,"RegulatoryReportGenerator",{enumerable:true,get:function(){return chunkEHAZIKDX_js.c}});Object.defineProperty(exports,"BreachReportForm",{enumerable:true,get:function(){return chunkWTJGLNTB_js.a}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkI4M2AA3N_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunkBKRETVJ6_js.a}});exports.Breach=A;exports.BreachProvider=s;exports.useBreachCompound=P;//# sourceMappingURL=breach.js.map
2
2
  //# sourceMappingURL=breach.js.map
package/dist/breach.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import {c,b,a}from'./chunk-CYU6YUJQ.mjs';export{b as BreachNotificationManager,a as BreachRiskAssessment,c as RegulatoryReportGenerator}from'./chunk-CYU6YUJQ.mjs';import {a as a$1}from'./chunk-CWUPGY3M.mjs';export{a as BreachReportForm}from'./chunk-CWUPGY3M.mjs';import {a as a$2}from'./chunk-PATONNTZ.mjs';export{a as useBreach}from'./chunk-PATONNTZ.mjs';export{a as calculateBreachSeverity}from'./chunk-DJGS7SSN.mjs';import'./chunk-GKKAK6ES.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {b as b$1,a as a$3}from'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null);function P(){let e=useContext(p);if(!e)throw new Error("Breach compound components must be wrapped in <Breach.Provider>. Example: <Breach.Provider categories={...}><Breach.ReportForm /></Breach.Provider>");return e}var s=({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u,children:d})=>{let y=a$2({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u}),l=b$1(a$3({},y),{categories:e});return jsx(p.Provider,{value:l,children:d})};var A={Provider:s,ReportForm:a$1,RiskAssessment:a,NotificationManager:b,ReportGenerator:c};export{A as Breach,s as BreachProvider,P as useBreachCompound};//# sourceMappingURL=breach.mjs.map
1
+ import {c,b,a}from'./chunk-WH6ZMUOS.mjs';export{b as BreachNotificationManager,a as BreachRiskAssessment,c as RegulatoryReportGenerator}from'./chunk-WH6ZMUOS.mjs';import {a as a$1}from'./chunk-KF3EFJEF.mjs';export{a as BreachReportForm}from'./chunk-KF3EFJEF.mjs';import {a as a$2}from'./chunk-PATONNTZ.mjs';export{a as useBreach}from'./chunk-PATONNTZ.mjs';export{a as calculateBreachSeverity}from'./chunk-DJGS7SSN.mjs';import'./chunk-GKKAK6ES.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {b as b$1,a as a$3}from'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null);function P(){let e=useContext(p);if(!e)throw new Error("Breach compound components must be wrapped in <Breach.Provider>. Example: <Breach.Provider categories={...}><Breach.ReportForm /></Breach.Provider>");return e}var s=({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u,children:d})=>{let y=a$2({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u}),l=b$1(a$3({},y),{categories:e});return jsx(p.Provider,{value:l,children:d})};var A={Provider:s,ReportForm:a$1,RiskAssessment:a,NotificationManager:b,ReportGenerator:c};export{A as Breach,s as BreachProvider,P as useBreachCompound};//# sourceMappingURL=breach.mjs.map
2
2
  //# sourceMappingURL=breach.mjs.map
@@ -0,0 +1,3 @@
1
+ 'use strict';var chunkXMBSJJ5U_js=require('./chunk-XMBSJJ5U.js'),chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),Gr=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Gr__default=/*#__PURE__*/_interopDefault(Gr);var vr=["Organization","Data Collection","Processing","Review & Export"],lr=({currentStep:d,classNames:p,unstyled:r})=>jsxRuntime.jsx("nav",{"data-ndpr-component":"policy-step-indicator","aria-label":"Policy wizard progress",className:chunkE64TU6IU_js.a("w-full flex items-center justify-between px-2 py-4",p==null?void 0:p.root,r),children:vr.map((e,n)=>{let t=n+1,i=t<d,u=t===d,l=n===vr.length-1;return jsxRuntime.jsxs(Gr__default.default.Fragment,{children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex flex-col items-center gap-1",p==null?void 0:p.stepWrapper,r),children:[jsxRuntime.jsx("div",{"aria-current":u?"step":void 0,"aria-label":`Step ${t}: ${e}${i?" (completed)":u?" (current)":""}`,className:chunkE64TU6IU_js.a(["flex items-center justify-center rounded-full border-2 font-semibold transition-all",i?"w-8 h-8 bg-[rgb(var(--ndpr-primary))] border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))]":u?"w-9 h-9 bg-[rgb(var(--ndpr-primary))] border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] shadow-md":"w-8 h-8 bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-600 text-gray-400 dark:text-gray-500"].join(" "),i?p==null?void 0:p.stepCompleted:u?p==null?void 0:p.stepCurrent:p==null?void 0:p.stepUpcoming,r),children:i?jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):jsxRuntime.jsx("span",{className:"text-xs leading-none",children:t})}),jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(["text-xs font-medium hidden sm:block",i||u?"text-[rgb(var(--ndpr-primary))]":"ndpr-card__subtitle"].join(" "),p==null?void 0:p.stepLabel,r),children:e})]}),!l&&jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a(["flex-1 h-0.5 mx-2",i?"bg-[rgb(var(--ndpr-primary))]":"bg-gray-200 dark:bg-gray-700"].join(" "),p==null?void 0:p.connector,r),"aria-hidden":"true"})]},t)})});var $="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 ndpr-text-foreground focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] text-sm",Vr="block text-sm font-medium ndpr-text-muted mb-1",A=({id:d,label:p,required:r,description:e,children:n,classNames:t,unstyled:i})=>{let u=e?`${d}-desc`:void 0;return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex flex-col",t==null?void 0:t.field,i),children:[jsxRuntime.jsxs("label",{htmlFor:d,className:chunkE64TU6IU_js.a(Vr,t==null?void 0:t.label,i),children:[p,r&&jsxRuntime.jsx("span",{className:"text-red-500 ml-0.5","aria-hidden":"true",children:"*"})]}),e&&jsxRuntime.jsx("p",{id:u,className:"text-xs ndpr-text-muted mb-1",children:e}),n]})},fr=({context:d,onUpdateOrg:p,classNames:r,unstyled:e})=>{var i,u,b;let n=Gr.useId(),t=d.org;return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-step-about",className:chunkE64TU6IU_js.a("ndpr-form-section",r==null?void 0:r.root,e),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",r==null?void 0:r.heading,e),children:"Organisation Details"}),jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",r==null?void 0:r.subheading,e),children:["Tell us about your organisation. Fields marked ",jsxRuntime.jsx("span",{className:"text-red-500","aria-hidden":"true",children:"*"})," are required."]})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("grid grid-cols-1 md:grid-cols-2 gap-4",r==null?void 0:r.grid,e),children:[jsxRuntime.jsx(A,{id:`${n}-org-name`,label:"Organisation Name",required:true,classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-org-name`,type:"text",value:t.name,onChange:l=>p({name:l.target.value}),placeholder:"Acme Corporation",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e),"aria-required":"true"})}),jsxRuntime.jsx(A,{id:`${n}-website`,label:"Website",required:true,classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-website`,type:"url",value:t.website,onChange:l=>p({website:l.target.value}),placeholder:"https://example.com",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e),"aria-required":"true"})}),jsxRuntime.jsx(A,{id:`${n}-privacy-email`,label:"Privacy Contact Email",required:true,classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-privacy-email`,type:"email",value:t.privacyEmail,onChange:l=>p({privacyEmail:l.target.value}),placeholder:"privacy@example.com",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e),"aria-required":"true"})}),jsxRuntime.jsx(A,{id:`${n}-industry`,label:"Industry",classNames:r,unstyled:e,children:jsxRuntime.jsxs("select",{id:`${n}-industry`,value:t.industry,onChange:l=>p({industry:l.target.value}),className:chunkE64TU6IU_js.a($,r==null?void 0:r.select,e),children:[jsxRuntime.jsx("option",{value:"fintech",children:"Fintech"}),jsxRuntime.jsx("option",{value:"healthcare",children:"Healthcare"}),jsxRuntime.jsx("option",{value:"ecommerce",children:"E-commerce"}),jsxRuntime.jsx("option",{value:"saas",children:"SaaS"}),jsxRuntime.jsx("option",{value:"education",children:"Education"}),jsxRuntime.jsx("option",{value:"government",children:"Government"}),jsxRuntime.jsx("option",{value:"other",children:"Other"})]})}),jsxRuntime.jsx(A,{id:`${n}-dpo-name`,label:"Data Protection Officer (DPO) Name",classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-dpo-name`,type:"text",value:(i=t.dpoName)!=null?i:"",onChange:l=>p({dpoName:l.target.value}),placeholder:"Jane Smith",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e)})}),jsxRuntime.jsx(A,{id:`${n}-dpo-email`,label:"DPO Email",classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-dpo-email`,type:"email",value:(u=t.dpoEmail)!=null?u:"",onChange:l=>p({dpoEmail:l.target.value}),placeholder:"dpo@example.com",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e)})}),jsxRuntime.jsx(A,{id:`${n}-address`,label:"Registered Address",classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-address`,type:"text",value:(b=t.address)!=null?b:"",onChange:l=>p({address:l.target.value}),placeholder:"1 Victoria Island, Lagos, Nigeria",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e)})}),jsxRuntime.jsx(A,{id:`${n}-org-size`,label:"Organisation Size",classNames:r,unstyled:e,children:jsxRuntime.jsxs("select",{id:`${n}-org-size`,value:t.orgSize,onChange:l=>p({orgSize:l.target.value}),className:chunkE64TU6IU_js.a($,r==null?void 0:r.select,e),children:[jsxRuntime.jsx("option",{value:"startup",children:"Startup (1\u201350 employees)"}),jsxRuntime.jsx("option",{value:"midsize",children:"Mid-size (51\u2013500 employees)"}),jsxRuntime.jsx("option",{value:"enterprise",children:"Enterprise (500+ employees)"})]})}),jsxRuntime.jsx(A,{id:`${n}-country`,label:"Country of Operation",classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-country`,type:"text",value:t.country,onChange:l=>p({country:l.target.value}),placeholder:"Nigeria",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e)})})]})]})};var Xr={identity:"Identity",financial:"Financial",behavioral:"Behavioural",sensitive:"Sensitive",children:"Children"},Yr=["identity","financial","behavioral","sensitive","children"],Jr=["sensitive","children"],xr=({categories:d,onToggle:p,classNames:r,unstyled:e})=>{let n=Yr.reduce((t,i)=>{let u=d.filter(b=>b.group===i);return u.length>0&&(t[i]=u),t},{});return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-step-data",className:chunkE64TU6IU_js.a("space-y-8",r==null?void 0:r.root,e),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",r==null?void 0:r.heading,e),children:"Data Categories"}),jsxRuntime.jsx("p",{id:"data-categories-desc",className:chunkE64TU6IU_js.a("ndpr-form-field__hint",r==null?void 0:r.subheading,e),children:"Select the categories of personal data your organisation collects. You must select at least one."})]}),Object.entries(n).map(([t,i])=>{let u=Jr.includes(t);return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("space-y-3",r==null?void 0:r.group,e),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center gap-2",r==null?void 0:r.groupHeader,e),children:[jsxRuntime.jsx("h3",{className:chunkE64TU6IU_js.a("text-sm font-semibold uppercase tracking-wide ndpr-text-muted",r==null?void 0:r.groupTitle,e),children:Xr[t]}),u&&jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("text-xs font-medium ndpr-text-warning bg-amber-50 dark:bg-amber-900/20 px-2 py-0.5 rounded-full",r==null?void 0:r.sensitiveTag,e),children:"Sensitive"})]}),u&&jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("text-xs ndpr-text-warning",r==null?void 0:r.sensitiveWarning,e),children:t==="children"?"Processing children's data requires parental consent under NDPA Section 31 and imposes heightened obligations.":"Sensitive/special-category data requires explicit consent and additional safeguards under NDPA Section 30."}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",r==null?void 0:r.cardsGrid,e),children:i.map(b=>jsxRuntime.jsx("button",{type:"button",onClick:()=>p(b.id),"aria-pressed":b.selected,className:chunkE64TU6IU_js.a(["text-left rounded-lg border p-4 transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",b.selected?"bg-[rgb(var(--ndpr-primary))]/5 border-[rgb(var(--ndpr-primary))] dark:bg-[rgb(var(--ndpr-primary))]/10":"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"].join(" "),r==null?void 0:r.card,e),children:jsxRuntime.jsxs("div",{className:"flex items-start gap-3",children:[jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a(["mt-0.5 w-4 h-4 rounded border-2 flex-shrink-0 flex items-center justify-center",b.selected?"bg-[rgb(var(--ndpr-primary))] border-[rgb(var(--ndpr-primary))]":"border-gray-300 dark:border-gray-600"].join(" "),r==null?void 0:r.checkbox,e),"aria-hidden":"true",children:b.selected&&jsxRuntime.jsx("svg",{className:"w-2.5 h-2.5 text-[rgb(var(--ndpr-primary-foreground))]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("text-sm font-medium ndpr-text-foreground",r==null?void 0:r.cardLabel,e),children:b.label}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted mt-1 leading-relaxed",r==null?void 0:r.cardDataPoints,e),children:b.dataPoints.join(", ")})]})]})},b.id))})]},t)})]})};var Qr=[{value:"service_delivery",label:"Service Delivery",description:"Processing required to deliver the core product or service."},{value:"marketing",label:"Marketing & Communications",description:"Sending promotional messages, newsletters or offers."},{value:"analytics",label:"Analytics & Insights",description:"Analysing usage patterns to improve the product."},{value:"research",label:"Research & Development",description:"Using data to develop new features or products."},{value:"legal_compliance",label:"Legal Compliance",description:"Meeting statutory, regulatory or contractual obligations."},{value:"fraud_prevention",label:"Fraud Prevention & Security",description:"Detecting and preventing fraudulent activity."}],dr="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 ndpr-text-foreground focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] text-sm",pr="ndpr-card ndpr-card--compact",gr=({id:d,checked:p,onChange:r})=>jsxRuntime.jsx("button",{id:d,type:"button",role:"switch","aria-checked":p,onClick:()=>r(!p),className:["relative inline-flex h-6 w-11 flex-shrink-0 rounded-full border-2 border-transparent cursor-pointer transition-colors focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",p?"bg-[rgb(var(--ndpr-primary))]":"bg-gray-200 dark:bg-gray-600"].join(" "),children:jsxRuntime.jsx("span",{"aria-hidden":"true",className:["pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition-transform",p?"translate-x-5":"translate-x-0"].join(" ")})}),hr=({context:d,onTogglePurpose:p,onUpdateContext:r,onAddProcessor:e,onRemoveProcessor:n,classNames:t,unstyled:i})=>{let u=Gr.useId(),[b,l]=Gr.useState({name:"",purpose:"",country:""}),[C,g]=Gr.useState(false),a=()=>{let{name:v,purpose:c,country:S}=b;!v.trim()||!c.trim()||!S.trim()||(e({name:v.trim(),purpose:c.trim(),country:S.trim()}),l({name:"",purpose:"",country:""}),g(false));};return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-step-processing",className:chunkE64TU6IU_js.a("ndpr-form-section",t==null?void 0:t.root,i),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",t==null?void 0:t.heading,i),children:"Processing Details"}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",t==null?void 0:t.subheading,i),children:"Define how and why you process personal data."})]}),jsxRuntime.jsxs("section",{className:chunkE64TU6IU_js.a(pr,t==null?void 0:t.section,i),"aria-labelledby":"purposes-heading",children:[jsxRuntime.jsx("h3",{id:"purposes-heading",className:chunkE64TU6IU_js.a("text-base font-semibold ndpr-text-foreground",t==null?void 0:t.sectionTitle,i),children:"Processing Purposes"}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",t==null?void 0:t.sectionDescription,i),children:"Select all purposes for which you process personal data. At least one is required."}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("space-y-3",t==null?void 0:t.purposeList,i),children:Qr.map(v=>{let c=d.purposes.includes(v.value),S=`${u}-purpose-${v.value}`,B=`${u}-purpose-desc-${v.value}`;return jsxRuntime.jsxs("label",{htmlFor:S,className:chunkE64TU6IU_js.a("flex items-start gap-3 cursor-pointer group",t==null?void 0:t.purposeItem,i),children:[jsxRuntime.jsx("input",{id:S,type:"checkbox",checked:c,onChange:()=>p(v.value),"aria-describedby":B,className:chunkE64TU6IU_js.a("mt-0.5 h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))] cursor-pointer",t==null?void 0:t.purposeCheckbox,i)}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("text-sm font-medium ndpr-text-foreground",t==null?void 0:t.purposeLabel,i),children:v.label}),jsxRuntime.jsx("p",{id:B,className:chunkE64TU6IU_js.a("ndpr-form-field__hint",t==null?void 0:t.purposeDescription,i),children:v.description})]})]},v.value)})})]}),jsxRuntime.jsxs("section",{className:chunkE64TU6IU_js.a(pr,t==null?void 0:t.section,i),"aria-labelledby":"thirdparty-heading",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h3",{id:"thirdparty-heading",className:chunkE64TU6IU_js.a("text-base font-semibold ndpr-text-foreground",t==null?void 0:t.sectionTitle,i),children:"Third-Party Data Sharing"}),jsxRuntime.jsx(gr,{id:`${u}-thirdparty-toggle`,checked:d.thirdPartyProcessors.length>0||C,onChange:v=>{v?g(true):(d.thirdPartyProcessors.forEach((c,S)=>n(0)),g(false));}})]}),(d.thirdPartyProcessors.length>0||C)&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("ndpr-form-section",t==null?void 0:t.processorSection,i),children:[d.thirdPartyProcessors.length>0&&jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("overflow-x-auto",t==null?void 0:t.processorTable,i),children:jsxRuntime.jsxs("table",{className:"w-full text-sm",children:[jsxRuntime.jsx("thead",{children:jsxRuntime.jsxs("tr",{className:chunkE64TU6IU_js.a("text-left text-xs font-medium ndpr-text-muted border-b border-gray-200 dark:border-gray-700",t==null?void 0:t.tableHeader,i),children:[jsxRuntime.jsx("th",{className:"pb-2 pr-4",children:"Name"}),jsxRuntime.jsx("th",{className:"pb-2 pr-4",children:"Purpose"}),jsxRuntime.jsx("th",{className:"pb-2 pr-4",children:"Country"}),jsxRuntime.jsx("th",{className:"pb-2"})]})}),jsxRuntime.jsx("tbody",{className:"divide-y divide-gray-100 dark:divide-gray-700",children:d.thirdPartyProcessors.map((v,c)=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("td",{className:chunkE64TU6IU_js.a("py-2 pr-4 ndpr-text-foreground",t==null?void 0:t.tableCell,i),children:v.name}),jsxRuntime.jsx("td",{className:chunkE64TU6IU_js.a("py-2 pr-4 ndpr-text-muted",t==null?void 0:t.tableCell,i),children:v.purpose}),jsxRuntime.jsx("td",{className:chunkE64TU6IU_js.a("py-2 pr-4 ndpr-text-muted",t==null?void 0:t.tableCell,i),children:v.country}),jsxRuntime.jsx("td",{className:"py-2",children:jsxRuntime.jsx("button",{type:"button",onClick:()=>n(c),className:chunkE64TU6IU_js.a("text-red-500 hover:ndpr-text-destructive dark:hover:text-red-300 text-xs font-medium",t==null?void 0:t.removeButton,i),"aria-label":`Remove ${v.name}`,children:"Remove"})})]},c))})]})}),C?jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("grid grid-cols-1 sm:grid-cols-3 gap-3 items-end",t==null?void 0:t.processorForm,i),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:`${u}-proc-name`,className:"block text-xs font-medium ndpr-text-muted mb-1",children:"Processor Name"}),jsxRuntime.jsx("input",{id:`${u}-proc-name`,type:"text",placeholder:"Processor name",value:b.name,onChange:v=>l(c=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},c),{name:v.target.value})),"aria-required":"true",className:chunkE64TU6IU_js.a(dr,t==null?void 0:t.input,i)})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:`${u}-proc-purpose`,className:"block text-xs font-medium ndpr-text-muted mb-1",children:"Purpose"}),jsxRuntime.jsx("input",{id:`${u}-proc-purpose`,type:"text",placeholder:"Purpose",value:b.purpose,onChange:v=>l(c=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},c),{purpose:v.target.value})),"aria-required":"true",className:chunkE64TU6IU_js.a(dr,t==null?void 0:t.input,i)})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:`${u}-proc-country`,className:"block text-xs font-medium ndpr-text-muted mb-1",children:"Country"}),jsxRuntime.jsx("input",{id:`${u}-proc-country`,type:"text",placeholder:"Country",value:b.country,onChange:v=>l(c=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},c),{country:v.target.value})),"aria-required":"true",className:chunkE64TU6IU_js.a(dr,t==null?void 0:t.input,i)})]}),jsxRuntime.jsxs("div",{className:"sm:col-span-3 flex gap-2",children:[jsxRuntime.jsx("button",{type:"button",onClick:a,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--primary ndpr-button--sm",t==null?void 0:t.addButton,i),children:"Add Processor"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>g(false),className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--secondary ndpr-button--sm",t==null?void 0:t.cancelButton,i),children:"Cancel"})]})]}):jsxRuntime.jsxs("button",{type:"button",onClick:()=>g(true),className:chunkE64TU6IU_js.a("flex items-center gap-1 text-sm text-[rgb(var(--ndpr-primary))] hover:underline font-medium",t==null?void 0:t.addLink,i),children:[jsxRuntime.jsx("span",{"aria-hidden":"true",children:"+"})," Add processor"]})]})]}),jsxRuntime.jsxs("section",{className:chunkE64TU6IU_js.a(pr,t==null?void 0:t.section,i),"aria-labelledby":"disclosures-heading",children:[jsxRuntime.jsx("h3",{id:"disclosures-heading",className:chunkE64TU6IU_js.a("text-base font-semibold ndpr-text-foreground",t==null?void 0:t.sectionTitle,i),children:"Additional Disclosures"}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("ndpr-form-section",t==null?void 0:t.disclosureList,i),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-start justify-between gap-4",t==null?void 0:t.disclosureItem,i),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{id:`${u}-cross-border-label`,className:chunkE64TU6IU_js.a("text-sm font-medium ndpr-text-foreground",t==null?void 0:t.disclosureLabel,i),children:"Cross-border Data Transfers"}),jsxRuntime.jsx("p",{id:`${u}-cross-border-desc`,className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted mt-0.5",t==null?void 0:t.disclosureDescription,i),children:"Do you transfer personal data outside Nigeria? This triggers NDPA Chapter 6 obligations."})]}),jsxRuntime.jsx(gr,{id:`${u}-cross-border-toggle`,checked:d.hasCrossBorderTransfer,onChange:v=>r({hasCrossBorderTransfer:v})})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-start justify-between gap-4",t==null?void 0:t.disclosureItem,i),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{id:`${u}-automated-label`,className:chunkE64TU6IU_js.a("text-sm font-medium ndpr-text-foreground",t==null?void 0:t.disclosureLabel,i),children:"Automated Decision-Making / Profiling"}),jsxRuntime.jsx("p",{id:`${u}-automated-desc`,className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted mt-0.5",t==null?void 0:t.disclosureDescription,i),children:"Do you use algorithms or automated systems to make decisions about individuals? Requires disclosure under NDPA Section 37."})]}),jsxRuntime.jsx(gr,{id:`${u}-automated-toggle`,checked:d.hasAutomatedDecisions,onChange:v=>r({hasAutomatedDecisions:v})})]})]})]})]})};var Cr=({section:d,index:p,isCustom:r,isEditing:e,editedContent:n,onEdit:t,onSaveEdit:i,onCancelEdit:u,onMoveUp:b,onMoveDown:l,onDelete:C,classNames:g,unstyled:a})=>{let[v,c]=Gr.useState(n!=null?n:d.template);return Gr.useEffect(()=>{n!==void 0&&c(n);},[n]),Gr.useEffect(()=>{e&&c(n!=null?n:d.template);},[e,n,d.template]),jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-section-card",className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 space-y-3",g==null?void 0:g.root,a),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-start justify-between gap-2",g==null?void 0:g.header,a),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center gap-3 min-w-0",g==null?void 0:g.titleRow,a),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("flex-shrink-0 w-7 h-7 rounded-full bg-gray-100 dark:bg-gray-700 ndpr-text-muted text-xs font-semibold flex items-center justify-center",g==null?void 0:g.sectionNumber,a),"aria-hidden":"true",children:p+1}),jsxRuntime.jsxs("h4",{className:chunkE64TU6IU_js.a("text-sm font-semibold ndpr-text-foreground truncate",g==null?void 0:g.sectionTitle,a),children:[d.title,r&&jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("ml-2 text-xs font-normal ndpr-text-muted bg-gray-100 dark:bg-gray-700 px-1.5 py-0.5 rounded",g==null?void 0:g.customBadge,a),children:"Custom"})]})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center gap-1 flex-shrink-0",g==null?void 0:g.actions,a),children:[b&&jsxRuntime.jsx("button",{type:"button",onClick:b,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--icon",g==null?void 0:g.moveButton,a),"aria-label":`Move "${d.title}" up`,children:jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})}),l&&jsxRuntime.jsx("button",{type:"button",onClick:l,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--icon",g==null?void 0:g.moveButton,a),"aria-label":`Move "${d.title}" down`,children:jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}),!e&&jsxRuntime.jsx("button",{type:"button",onClick:t,className:chunkE64TU6IU_js.a("p-1.5 text-gray-400 hover:text-[rgb(var(--ndpr-primary))] rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",g==null?void 0:g.editButton,a),"aria-label":`Edit "${d.title}"`,children:jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),r&&C&&jsxRuntime.jsx("button",{type:"button",onClick:C,className:chunkE64TU6IU_js.a("p-1.5 text-gray-400 hover:text-red-500 dark:hover:text-red-400 rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",g==null?void 0:g.deleteButton,a),"aria-label":`Delete "${d.title}"`,children:jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]}),e?jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("space-y-2",g==null?void 0:g.editArea,a),children:[jsxRuntime.jsx("textarea",{value:v,onChange:S=>c(S.target.value),rows:8,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 ndpr-text-foreground focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] text-sm font-mono resize-y",g==null?void 0:g.textarea,a),"aria-label":`Edit content for ${d.title}`}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex gap-2",g==null?void 0:g.editActions,a),children:[jsxRuntime.jsx("button",{type:"button",onClick:()=>i(v),className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--primary ndpr-button--sm",g==null?void 0:g.saveButton,a),children:"Save"}),jsxRuntime.jsx("button",{type:"button",onClick:u,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--secondary ndpr-button--sm",g==null?void 0:g.cancelButton,a),children:"Cancel"})]})]}):jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("text-sm ndpr-text-muted leading-relaxed line-clamp-4 whitespace-pre-wrap",g==null?void 0:g.content,a),children:d.template})]})};var kr="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 ndpr-text-foreground focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] text-sm",wr=({onAdd:d,nextOrder:p,classNames:r,unstyled:e})=>{let n=Gr.useId(),[t,i]=Gr.useState(""),[u,b]=Gr.useState(""),[l,C]=Gr.useState(""),g=()=>{if(!t.trim()){C("Section title is required.");return}if(!u.trim()){C("Section content is required.");return}C(""),d({title:t.trim(),content:u.trim(),order:p}),i(""),b("");};return jsxRuntime.jsxs("div",{"data-ndpr-component":"custom-section-form",className:chunkE64TU6IU_js.a("ndpr-card ndpr-card--compact",r==null?void 0:r.root,e),children:[jsxRuntime.jsx("h4",{className:chunkE64TU6IU_js.a("ndpr-section-heading",r==null?void 0:r.heading,e),children:"Add Custom Section"}),l&&jsxRuntime.jsx("p",{role:"alert",className:chunkE64TU6IU_js.a("text-xs ndpr-text-destructive",r==null?void 0:r.error,e),children:l}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("space-y-3",r==null?void 0:r.fields,e),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:`${n}-custom-section-title`,className:chunkE64TU6IU_js.a("block text-xs font-medium ndpr-text-muted mb-1",r==null?void 0:r.label,e),children:["Section Title ",jsxRuntime.jsx("span",{className:"text-red-500","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsx("input",{id:`${n}-custom-section-title`,type:"text",value:t,onChange:a=>{i(a.target.value),l&&C("");},placeholder:"e.g. Cookie Policy",className:chunkE64TU6IU_js.a(kr,r==null?void 0:r.input,e),"aria-required":"true"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:`${n}-custom-section-content`,className:chunkE64TU6IU_js.a("block text-xs font-medium ndpr-text-muted mb-1",r==null?void 0:r.label,e),children:["Content ",jsxRuntime.jsx("span",{className:"text-red-500","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsx("textarea",{id:`${n}-custom-section-content`,value:u,onChange:a=>{b(a.target.value),l&&C("");},placeholder:"Write the section content here...",rows:5,className:chunkE64TU6IU_js.a(`${kr} resize-y`,r==null?void 0:r.textarea,e),"aria-required":"true"})]})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("flex items-center gap-2",r==null?void 0:r.footer,e),children:jsxRuntime.jsx("button",{type:"button",onClick:g,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--primary ndpr-button--sm",r==null?void 0:r.addButton,e),children:"Add Section"})})]})};var Sr={compliant:{bg:"ndpr-alert ndpr-alert--success",text:"ndpr-text-success",border:"border-green-200 dark:border-green-700"},nearly_compliant:{bg:"bg-amber-50 dark:bg-amber-900/20",text:"ndpr-text-warning",border:"border-amber-200 dark:border-amber-700"},not_compliant:{bg:"ndpr-alert ndpr-alert--destructive",text:"ndpr-text-destructive",border:"border-red-200 dark:border-red-700"}},sr={compliant:"Compliant",nearly_compliant:"Nearly Compliant",not_compliant:"Not Compliant"},N=({icon:d,label:p,description:r,actionLabel:e,loading:n,onClick:t,classNames:i,unstyled:u})=>jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 flex flex-col gap-3",i==null?void 0:i.formatCard,u),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center gap-3",i==null?void 0:i.formatHeader,u),children:[jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("w-10 h-10 rounded-lg bg-gray-100 dark:bg-gray-700 flex items-center justify-center flex-shrink-0",i==null?void 0:i.formatIcon,u),"aria-hidden":"true",children:d}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-section-heading",i==null?void 0:i.formatLabel,u),children:p}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",i==null?void 0:i.formatDescription,u),children:r})]})]}),jsxRuntime.jsx("button",{type:"button",onClick:t,disabled:n,className:chunkE64TU6IU_js.a("w-full px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm font-medium disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-2",i==null?void 0:i.formatButton,u),children:n?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4l3-3-3-3v4a10 10 0 100 10l-1.73-3A8 8 0 014 12z"})]}),"Generating\u2026"]}):e})]}),mr=({complianceResult:d,onExportPDF:p,onExportDOCX:r,onExportHTML:e,onExportMarkdown:n,classNames:t,unstyled:i})=>{var c;let[u,b]=Gr.useState(false),[l,C]=Gr.useState(false),g=(c=Sr[d.rating])!=null?c:Sr.not_compliant,a=()=>chunkMQFZHA2D_js.d(null,null,function*(){b(true);try{yield p();}finally{b(false);}}),v=()=>chunkMQFZHA2D_js.d(null,null,function*(){C(true);try{yield r();}finally{C(false);}});return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-export-panel",className:chunkE64TU6IU_js.a("ndpr-form-section",t==null?void 0:t.root,i),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`rounded-lg border p-4 flex items-center gap-4 ${g.bg} ${g.border}`,t==null?void 0:t.complianceSummary,i),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`text-3xl font-bold ${g.text}`,t==null?void 0:t.complianceScore,i),"aria-label":`Compliance score: ${d.percentage}%`,children:[d.percentage,"%"]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-sm font-semibold ${g.text}`,t==null?void 0:t.complianceRating,i),children:sr[d.rating]}),jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted mt-0.5",t==null?void 0:t.complianceDetail,i),children:[d.score," / ",d.maxScore," points \u2022"," ",d.gaps.length," gap",d.gaps.length!==1?"s":""," remaining"]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:chunkE64TU6IU_js.a("ndpr-section-heading",t==null?void 0:t.formatsHeading,i),children:"Export Format"}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("grid grid-cols-1 sm:grid-cols-2 gap-3",t==null?void 0:t.formatsGrid,i),children:[jsxRuntime.jsx(N,{icon:jsxRuntime.jsx("svg",{className:"w-5 h-5 text-red-500",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm-1 7V3.5L18.5 9H13zm-3 7v-1h4v1h-4zm0-3v-1h4v1h-4zm-2-5h8v1H8v-1z"})}),label:"PDF",description:"Professional formatted document, ideal for publishing.",actionLabel:"Download PDF",loading:u,onClick:a,classNames:t,unstyled:i}),jsxRuntime.jsx(N,{icon:jsxRuntime.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm-1 7V3.5L18.5 9H13zm-5 8v-5h1.5l1 3 1-3H13v5h-1v-3.5l-.75 2.25h-.5L10 13.5V17H9zm5-1.5h.75c.55 0 .75-.25.75-.75 0-.4-.2-.65-.75-.65H14V15.5zm1 1.5h-2v-4h2c1.1 0 1.75.6 1.75 1.5 0 .55-.25.95-.65 1.15.5.2.8.65.8 1.2 0 1-.65 1.65-1.9 1.65V17zm-.25-1c.6 0 .9-.25.9-.75 0-.45-.3-.75-.9-.75H14V16h.75z"})}),label:"DOCX",description:"Editable Word document for further customisation.",actionLabel:"Download DOCX",loading:l,onClick:v,classNames:t,unstyled:i}),jsxRuntime.jsx(N,{icon:jsxRuntime.jsxs("svg",{className:"w-5 h-5 text-orange-500",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15H9V8h2v9zm4 0h-2V8h2v9z"}),jsxRuntime.jsx("path",{d:"M9.5 6.5h1v1h-1zm4 0h1v1h-1z"}),jsxRuntime.jsx("path",{d:"M5 5h14v2H5zm0 12h14v2H5z"})]}),label:"HTML",description:"Copy-ready HTML to embed on your website.",actionLabel:"Copy HTML",onClick:e,classNames:t,unstyled:i}),jsxRuntime.jsx(N,{icon:jsxRuntime.jsx("svg",{className:"w-5 h-5 ndpr-text-muted",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M3 5h18v2H3V5zm0 4h12v2H3V9zm0 4h18v2H3v-2zm0 4h12v2H3v-2z"})}),label:"Markdown",description:"Plain-text format for documentation or Git repos.",actionLabel:"Copy Markdown",onClick:n,classNames:t,unstyled:i})]})]})]})};var Lr=({sections:d,customSections:p,sectionOverrides:r,complianceResult:e,onEditSection:n,onAddCustomSection:t,onRemoveCustomSection:i,onReorderSection:u,onExportPDF:b,onExportDOCX:l,onExportHTML:C,onExportMarkdown:g,classNames:a,unstyled:v})=>{let[c,S]=Gr.useState(null),[B,J]=Gr.useState(false),Z=new Set(p.map(h=>h.id)),or=(h,D)=>{n(h,D),S(null);},er=d.length>0?Math.max(...d.map(h=>{var D;return (D=h.order)!=null?D:0}))+1:1;return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-step-review",className:chunkE64TU6IU_js.a("ndpr-form-section",a==null?void 0:a.root,v),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",a==null?void 0:a.heading,v),children:"Review & Export"}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",a==null?void 0:a.subheading,v),children:"Review your generated policy sections, reorder or edit content, then export."})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("space-y-3",a==null?void 0:a.sectionList,v),"aria-live":"polite",children:d.map((h,D)=>jsxRuntime.jsx(Cr,{section:r[h.id]?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},h),{template:r[h.id]}):h,index:D,isCustom:Z.has(h.id),isEditing:c===h.id,editedContent:r[h.id],onEdit:()=>S(h.id),onSaveEdit:ir=>or(h.id,ir),onCancelEdit:()=>S(null),onMoveUp:D>0?()=>u(h.id,"up"):void 0,onMoveDown:D<d.length-1?()=>u(h.id,"down"):void 0,onDelete:Z.has(h.id)?()=>i(h.id):void 0,classNames:a,unstyled:v},h.id))}),!B&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>J(true),className:chunkE64TU6IU_js.a("flex items-center gap-2 text-sm text-[rgb(var(--ndpr-primary))] hover:underline font-medium",a==null?void 0:a.addSectionButton,v),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("w-5 h-5 rounded-full border-2 border-[rgb(var(--ndpr-primary))] flex items-center justify-center text-xs font-bold leading-none",a==null?void 0:a.addSectionIcon,v),"aria-hidden":"true",children:"+"}),"Add Custom Section"]}),B&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("space-y-2",a==null?void 0:a.customFormWrapper,v),children:[jsxRuntime.jsx(wr,{onAdd:h=>{t(h),J(false);},nextOrder:er,classNames:a,unstyled:v}),jsxRuntime.jsx("button",{type:"button",onClick:()=>J(false),className:chunkE64TU6IU_js.a("text-sm ndpr-text-muted hover:underline",a==null?void 0:a.cancelCustomForm,v),children:"Cancel"})]}),jsxRuntime.jsx("hr",{className:chunkE64TU6IU_js.a("border-gray-200 dark:border-gray-700",a==null?void 0:a.divider,v)}),jsxRuntime.jsx(mr,{complianceResult:e,onExportPDF:b,onExportDOCX:l,onExportHTML:C,onExportMarkdown:g,classNames:a,unstyled:v})]})};var Dr={compliant:{stroke:"stroke-green-500 dark:stroke-green-400",text:"ndpr-text-success"},nearly_compliant:{stroke:"stroke-amber-500 dark:stroke-amber-400",text:"ndpr-text-warning"},not_compliant:{stroke:"stroke-red-500 dark:stroke-red-400",text:"ndpr-text-destructive"}},tt={compliant:"Compliant",nearly_compliant:"Nearly Compliant",not_compliant:"Not Compliant"},Fr=({score:d,maxScore:p,rating:r,classNames:e,unstyled:n})=>{var C,g;let t=p>0?Math.round(d/p*100):0,i=(C=Dr[r])!=null?C:Dr.not_compliant,u=36,b=2*Math.PI*u,l=b-t/100*b;return jsxRuntime.jsxs("div",{"data-ndpr-component":"compliance-score-ring",className:chunkE64TU6IU_js.a("flex flex-col items-center gap-2",e==null?void 0:e.root,n),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("relative w-24 h-24",e==null?void 0:e.svgWrapper,n),children:[jsxRuntime.jsxs("svg",{className:"w-24 h-24 -rotate-90",viewBox:"0 0 96 96","aria-hidden":"true",children:[jsxRuntime.jsx("circle",{cx:"48",cy:"48",r:u,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:"8"}),jsxRuntime.jsx("circle",{cx:"48",cy:"48",r:u,fill:"none",className:i.stroke,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:l,style:{transition:"stroke-dashoffset 0.5s ease-out"}})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("absolute inset-0 flex flex-col items-center justify-center",e==null?void 0:e.centerText,n),children:jsxRuntime.jsxs("span",{className:chunkE64TU6IU_js.a(`text-xl font-bold leading-none ${i.text}`,e==null?void 0:e.scoreValue,n),"aria-label":`${t}% compliance score`,children:[t,"%"]})})]}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-xs font-semibold text-center ${i.text}`,e==null?void 0:e.ratingLabel,n),children:(g=tt[r])!=null?g:r}),jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted text-center",e==null?void 0:e.scoreDetail,n),children:[d," / ",p," pts"]})]})};var et={critical:"ndpr-text-destructive",important:"ndpr-text-warning",recommended:"ndpr-text-info"},Er=({gap:d,isPassed:p,onFix:r,classNames:e,unstyled:n})=>{let[t,i]=Gr.useState(false);return jsxRuntime.jsxs("div",{"data-ndpr-component":"compliance-requirement-item",className:chunkE64TU6IU_js.a("border-b border-gray-100 dark:border-gray-700 last:border-0 py-2",e==null?void 0:e.root,n),children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>!p&&i(u=>!u),className:chunkE64TU6IU_js.a("w-full flex items-start gap-2 text-left group",e==null?void 0:e.row,n),"aria-expanded":p?void 0:t,"aria-disabled":p,children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(["mt-0.5 flex-shrink-0 w-4 h-4 rounded-full flex items-center justify-center",p?"bg-green-500":d.severity==="critical"?"bg-red-500":d.severity==="important"?"bg-amber-500":"bg-blue-400"].join(" "),e==null?void 0:e.statusIcon,n),"aria-hidden":"true",children:p?jsxRuntime.jsx("svg",{className:"w-2.5 h-2.5 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):jsxRuntime.jsx("svg",{className:"w-2.5 h-2.5 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-1",children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-xs font-medium ${p?"ndpr-text-muted":"ndpr-text-foreground"}`,e==null?void 0:e.requirementLabel,n),children:d.requirement}),!p&&jsxRuntime.jsx("svg",{className:`flex-shrink-0 w-3 h-3 text-gray-400 transition-transform ${t?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-xs text-gray-400 dark:text-gray-500 mt-0.5",e==null?void 0:e.ndpaSection,n),children:["NDPA ",d.ndpaSection]})]})]}),!p&&t&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("mt-2 ml-6 space-y-2",e==null?void 0:e.detail,n),children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-xs ${et[d.severity]}`,e==null?void 0:e.message,n),children:d.message}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{r(d.requirementId),i(false);},className:chunkE64TU6IU_js.a("text-xs font-medium px-3 py-1 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded hover:bg-[rgb(var(--ndpr-primary-hover))]",e==null?void 0:e.fixButton,n),children:d.fixLabel})]})]})};function nt(d,p){let r=p.map(t=>({gap:{requirementId:t,requirement:t.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" "),ndpaSection:"\u2014",severity:"recommended",message:"",fixType:"fill_field",fixLabel:""},isPassed:true})),e=d.map(t=>({gap:t,isPassed:false})),n={critical:0,important:1,recommended:2};return e.sort((t,i)=>n[t.gap.severity]-n[i.gap.severity]),[...e,...r]}var $r=({complianceResult:d,onFix:p,classNames:r,unstyled:e})=>{let[n,t]=Gr.useState(false),i=nt(d.gaps,d.passed);return jsxRuntime.jsxs("aside",{"data-ndpr-component":"compliance-checker-sidebar",className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",r==null?void 0:r.root,e),"aria-label":"NDPA compliance checker",children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",r==null?void 0:r.header,e),children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",r==null?void 0:r.title,e),children:"NDPA Compliance"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>t(u=>!u),className:chunkE64TU6IU_js.a("p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",r==null?void 0:r.collapseButton,e),"aria-expanded":!n,"aria-label":n?"Expand compliance checker":"Collapse compliance checker",children:jsxRuntime.jsx("svg",{className:`w-4 h-4 transition-transform ${n?"-rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})})]}),!n&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 space-y-4",r==null?void 0:r.body,e),children:[jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("flex justify-center",r==null?void 0:r.ringWrapper,e),children:jsxRuntime.jsx(Fr,{score:d.score,maxScore:d.maxScore,rating:d.rating,classNames:r,unstyled:e})}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("grid grid-cols-3 gap-2 text-center",r==null?void 0:r.statsRow,e),children:[{count:d.gaps.filter(u=>u.severity==="critical").length,label:"Critical",color:"ndpr-text-destructive"},{count:d.gaps.filter(u=>u.severity==="important").length,label:"Important",color:"ndpr-text-warning"},{count:d.passed.length,label:"Passed",color:"ndpr-text-success"}].map(({count:u,label:b,color:l})=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-base font-bold ${l}`,r==null?void 0:r.statValue,e),children:u}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",r==null?void 0:r.statLabel,e),children:b})]},b))}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("overflow-y-auto max-h-80",r==null?void 0:r.requirementsList,e),children:i.length===0?jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-empty-state",r==null?void 0:r.emptyState,e),children:"No requirements to display."}):i.map(({gap:u,isPassed:b})=>jsxRuntime.jsx(Er,{gap:u,isPassed:b,onFix:p,classNames:r,unstyled:e},u.requirementId))})]})]})};function dt(d){let p=Date.now()-d;return p<1e4?"just now":p<6e4?`${Math.floor(p/1e3)}s ago`:p<36e5?`${Math.floor(p/6e4)}m ago`:new Date(d).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}var Ir=({lastSavedAt:d,isSaving:p,hasError:r,classNames:e,unstyled:n})=>{let t="idle";if(p?t="saving":r?t="error":d!==null&&(t="saved"),t==="idle")return null;let i=t==="saving"?"Saving\u2026":t==="error"?"Unable to save":`Draft saved ${d?dt(d):""}`;return jsxRuntime.jsxs("div",{"data-ndpr-component":"draft-save-indicator",role:"status","aria-live":"polite","aria-atomic":"true",className:chunkE64TU6IU_js.a(`flex items-center gap-1.5 ${t==="error"?"text-red-500 dark:text-red-400":t==="saving"?"ndpr-card__subtitle":"ndpr-text-success"}`,e==null?void 0:e.root,n),children:[t==="saving"&&jsxRuntime.jsxs("svg",{className:"animate-spin w-3 h-3 flex-shrink-0",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4l3-3-3-3v4a10 10 0 100 10l-1.73-3A8 8 0 014 12z"})]}),t==="saved"&&jsxRuntime.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),t==="error"&&jsxRuntime.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"})}),jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("text-xs font-medium",e==null?void 0:e.text,n),children:i})]})};var mo=({adapter:d,onComplete:p,classNames:r,unstyled:e})=>{let{currentStep:n,nextStep:t,prevStep:i,canProceed:u,context:b,updateOrg:l,updateContext:C,toggleDataCategory:g,togglePurpose:a,addProcessor:v,removeProcessor:c,sections:S,customSections:B,sectionOverrides:J,editSectionContent:Z,addCustomSection:or,removeCustomSection:er,reorderSections:h,complianceResult:D,applyFix:ir,handleExportPDF:Tr,handleExportDOCX:_r,handleExportHTML:Mr,handleExportMarkdown:Br,lastSavedAt:zr,isLoading:jr}=chunkXMBSJJ5U_js.a({adapter:d,onComplete:p}),nr=(F,K)=>{let O=URL.createObjectURL(F),H=document.createElement("a");H.href=O,H.download=K,H.click(),URL.revokeObjectURL(O);},qr=()=>chunkMQFZHA2D_js.d(null,null,function*(){let F=yield Tr();nr(F,"privacy-policy.pdf");}),Or=()=>chunkMQFZHA2D_js.d(null,null,function*(){let F=yield _r();nr(F,"privacy-policy.docx");}),Hr=()=>{let F=Mr();navigator.clipboard.writeText(F).catch(()=>{let K=new Blob([F],{type:"text/html"}),O=URL.createObjectURL(K),H=window.open(O,"_blank");H?H.addEventListener("load",()=>URL.revokeObjectURL(O)):URL.revokeObjectURL(O);});},Wr=()=>{let F=Br();navigator.clipboard.writeText(F).catch(()=>{let K=new Blob([F],{type:"text/markdown"});nr(K,"privacy-policy.md");});};return jr?jsxRuntime.jsxs("div",{"data-ndpr-component":"adaptive-policy-wizard",className:chunkE64TU6IU_js.a("flex items-center justify-center min-h-64 text-gray-400 dark:text-gray-500",r==null?void 0:r.root,e),"aria-busy":"true","aria-label":"Loading policy wizard",children:[jsxRuntime.jsxs("svg",{className:"animate-spin w-6 h-6 mr-2",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4l3-3-3-3v4a10 10 0 100 10l-1.73-3A8 8 0 014 12z"})]}),jsxRuntime.jsx("span",{className:"ndpr-text-sm",children:"Loading\u2026"})]}):jsxRuntime.jsx("div",{"data-ndpr-component":"adaptive-policy-wizard",className:chunkE64TU6IU_js.a("min-h-screen bg-gray-50 dark:bg-gray-900",r==null?void 0:r.root,e),children:jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",r==null?void 0:r.container,e),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center justify-between mb-6",r==null?void 0:r.topBar,e),children:[jsxRuntime.jsx("h1",{className:chunkE64TU6IU_js.a("text-2xl font-bold ndpr-text-foreground",r==null?void 0:r.wizardTitle,e),children:"Privacy Policy Builder"}),jsxRuntime.jsx(Ir,{lastSavedAt:zr,isSaving:false,hasError:false,classNames:r,unstyled:e})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg px-4 mb-6",r==null?void 0:r.stepIndicatorWrapper,e),children:jsxRuntime.jsx(lr,{currentStep:n,classNames:r,unstyled:e})}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex flex-col lg:flex-row gap-6 items-start",r==null?void 0:r.panels,e),children:[jsxRuntime.jsxs("main",{"aria-live":"polite",className:chunkE64TU6IU_js.a("flex-1 min-w-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-6",r==null?void 0:r.mainPanel,e),children:[n===1&&jsxRuntime.jsx(fr,{context:b,onUpdateOrg:l,classNames:r,unstyled:e}),n===2&&jsxRuntime.jsx(xr,{categories:b.dataCategories,onToggle:g,classNames:r,unstyled:e}),n===3&&jsxRuntime.jsx(hr,{context:b,onTogglePurpose:a,onUpdateContext:C,onAddProcessor:v,onRemoveProcessor:c,classNames:r,unstyled:e}),n===4&&jsxRuntime.jsx(Lr,{sections:S,customSections:B,sectionOverrides:J,complianceResult:D,onEditSection:Z,onAddCustomSection:or,onRemoveCustomSection:er,onReorderSection:h,onExportPDF:qr,onExportDOCX:Or,onExportHTML:Hr,onExportMarkdown:Wr,classNames:r,unstyled:e}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center justify-between mt-8 pt-4 border-t border-gray-200 dark:border-gray-700",r==null?void 0:r.navigation,e),children:[jsxRuntime.jsx("button",{type:"button",onClick:i,disabled:n===1,className:chunkE64TU6IU_js.a("px-4 py-2 bg-gray-200 dark:bg-gray-700 ndpr-text-foreground rounded-md text-sm font-medium disabled:opacity-40 disabled:cursor-not-allowed hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors",r==null?void 0:r.backButton,e),children:"Back"}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:jsxRuntime.jsxs("span",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",r==null?void 0:r.stepCounter,e),children:["Step ",n," of 4"]})}),n<4?jsxRuntime.jsx("button",{type:"button",onClick:t,disabled:!u,className:chunkE64TU6IU_js.a("px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm font-medium disabled:opacity-40 disabled:cursor-not-allowed transition-colors",r==null?void 0:r.nextButton,e),children:"Next"}):jsxRuntime.jsx("span",{})]})]}),jsxRuntime.jsx("aside",{className:chunkE64TU6IU_js.a("w-full lg:w-80 flex-shrink-0",r==null?void 0:r.sidebarWrapper,e),children:jsxRuntime.jsx($r,{complianceResult:D,onFix:ir,classNames:r,unstyled:e})})]})]})})};
2
+ exports.a=mo;//# sourceMappingURL=chunk-2WH4DLV5.js.map
3
+ //# sourceMappingURL=chunk-2WH4DLV5.js.map
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var G=({settings:k,storageOptions:O={},onLoad:i,onSave:p,autoSave:v=true,autoLoad:w=true,classNames:u,unstyled:h,children:c})=>{let{storageKey:o="ndpr_consent",storageType:n="localStorage",cookieOptions:l={}}=O,[r,$]=react.useState(false),S=react.useCallback(()=>{let e=null;try{if(n==="localStorage"&&typeof window!="undefined"){let t=localStorage.getItem(o);t&&(e=JSON.parse(t));}else if(n==="sessionStorage"&&typeof window!="undefined"){let t=sessionStorage.getItem(o);t&&(e=JSON.parse(t));}else if(n==="cookie"&&typeof document!="undefined"){let s=document.cookie.split(";").find(a=>a.trim().startsWith(`${o}=`));if(s){let a=s.split("=")[1];e=JSON.parse(decodeURIComponent(a));}}$(!0),i&&i(e);}catch(t){console.error("[ndpr-toolkit] Error loading consent settings:",t),$(true),i&&i(null);}return e},[n,o,i]),m=react.useCallback(e=>{try{let t=JSON.stringify(e);if(n==="localStorage"&&typeof window!="undefined")localStorage.setItem(o,t);else if(n==="sessionStorage"&&typeof window!="undefined")sessionStorage.setItem(o,t);else if(n==="cookie"&&typeof document!="undefined"){let{domain:s,path:a="/",expires:N=365,secure:D=!0,sameSite:E="Lax"}=l,C=new Date;C.setDate(C.getDate()+N);let g=`${o}=${encodeURIComponent(t)}; path=${a}; expires=${C.toUTCString()}`;s&&(g+=`; domain=${s}`),D&&(g+="; secure"),g+=`; samesite=${E}`,document.cookie=g;}return p&&p(e),!0}catch(t){return console.error("[ndpr-toolkit] Error saving consent settings:",t),false}},[n,o,l,p]),x=react.useCallback(()=>{try{if(n==="localStorage"&&typeof window!="undefined")localStorage.removeItem(o);else if(n==="sessionStorage"&&typeof window!="undefined")sessionStorage.removeItem(o);else if(n==="cookie"&&typeof document!="undefined"){let{domain:e,path:t="/"}=l,s=`${o}=; path=${t}; expires=Thu, 01 Jan 1970 00:00:00 GMT`;e&&(s+=`; domain=${e}`),document.cookie=s;}return !0}catch(e){return console.error("[ndpr-toolkit] Error clearing consent settings:",e),false}},[n,o,l]);react.useEffect(()=>{w&&!r&&S();},[w,r,S]),react.useEffect(()=>{v&&r&&m(k);},[k,v,r,m]);let d=chunkE64TU6IU_js.a("",u==null?void 0:u.root,h);if(typeof c=="function"){let e=c({loadSettings:S,saveSettings:m,clearSettings:x,loaded:r});return d?jsxRuntime.jsx("div",{className:d,children:e}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})}return d?jsxRuntime.jsx("div",{className:d,children:c}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:c})};exports.a=G;//# sourceMappingURL=chunk-3NQQSU4P.js.map
2
+ //# sourceMappingURL=chunk-3NQQSU4P.js.map
@@ -0,0 +1,7 @@
1
+ 'use strict';var chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),I=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var I__default=/*#__PURE__*/_interopDefault(I);var B=({result:a,sections:m,showFullReport:g=true,allowPrint:u=true,allowExport:v=true,onExport:f,className:N="",buttonClassName:x="",classNames:b={},unstyled:y=false})=>{let o=I.useMemo(()=>new Date().toLocaleDateString(),[]),d=(r,s)=>{let i=s?b[s]:void 0;return !i&&s==="printButton"&&(i=b.primaryButton),chunkE64TU6IU_js.a(r,i,y)},l=r=>new Date(r).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),w=r=>{let s=a.answers[r];return s==null?"Not answered":typeof s=="boolean"?s?"Yes":"No":Array.isArray(s)?s.join(", "):String(s)},k=()=>{window.print();},C=r=>{f&&f(r);},R=r=>jsxRuntime.jsx("span",{className:d(`px-2 py-1 rounded text-xs font-medium ${{low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--warning",critical:"ndpr-badge ndpr-badge--destructive"}[r]}`,"riskBadge"),children:r.charAt(0).toUpperCase()+r.slice(1)});return jsxRuntime.jsxs("div",{"data-ndpr-component":"dpia-report",className:`${d("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 print:shadow-none print:p-0","root")} ${N}`,children:[jsxRuntime.jsxs("div",{className:d("mb-8 border-b border-gray-200 dark:border-gray-700 pb-6 print:pb-4","header"),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h1",{className:d("ndpr-card__title","title"),children:"Data Protection Impact Assessment Report"}),jsxRuntime.jsx("h2",{className:"text-xl ndpr-text-muted mb-4",children:a.title})]}),(u||v)&&jsxRuntime.jsxs("div",{className:"flex space-x-2 print:hidden",children:[u&&jsxRuntime.jsx("button",{onClick:k,className:`${d("px-3 py-1 bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-white rounded hover:bg-gray-300 dark:hover:bg-gray-600","printButton")} ${x}`,children:jsxRuntime.jsxs("span",{className:"flex items-center",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"})}),"Print"]})}),v&&jsxRuntime.jsx("div",{className:"relative inline-block",children:jsxRuntime.jsx("button",{onClick:()=>C("pdf"),className:`px-3 py-1 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${x}`,children:jsxRuntime.jsxs("span",{className:"flex items-center",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Export PDF"]})})})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Assessor:"})," ",a.assessor.name,", ",a.assessor.role]}),jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Contact:"})," ",a.assessor.email]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Started:"})," ",l(a.startedAt)]}),jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Completed:"})," ",a.completedAt?l(a.completedAt):"In progress"]}),jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Next review:"})," ",a.reviewDate?l(a.reviewDate):"Not scheduled"]})]})]})]}),jsxRuntime.jsxs("div",{className:d("mb-8","summary"),children:[jsxRuntime.jsx("h2",{className:"ndpr-section-heading",children:"Executive Summary"}),jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsxs("div",{className:"flex items-center mb-2",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"font-medium mr-2",children:"Overall Risk Level:"}),R(a.overallRiskLevel)]}),jsxRuntime.jsxs("div",{className:d("mb-2","conclusion"),children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Conclusion:"})," ",a.conclusion]}),jsxRuntime.jsxs("div",{role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Can Proceed:"})," ",a.canProceed?"Yes":"No"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-medium ndpr-text-foreground mb-2",children:"Processing Activity Description"}),jsxRuntime.jsx("p",{className:"ndpr-text-muted mb-4",children:a.processingDescription}),a.recommendations&&a.recommendations.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-medium ndpr-text-foreground mb-2",children:"Key Recommendations"}),jsxRuntime.jsx("ul",{className:"list-disc pl-5 ndpr-text-muted",children:a.recommendations.map((r,s)=>jsxRuntime.jsx("li",{className:d("","recommendation"),children:r},s))})]})]})]}),jsxRuntime.jsxs("div",{className:"mb-8",children:[jsxRuntime.jsx("h2",{className:"ndpr-section-heading",children:"Identified Risks"}),a.risks.length===0?jsxRuntime.jsx("p",{className:"ndpr-text-muted",children:"No risks identified."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:d("min-w-full divide-y divide-gray-200 dark:divide-gray-700","riskTable"),children:[jsxRuntime.jsx("thead",{className:"ndpr-panel",children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Risk"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Likelihood"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Impact"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Risk Level"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Mitigated"})]})}),jsxRuntime.jsx("tbody",{className:"ndpr-table",children:a.risks.map(r=>jsxRuntime.jsxs("tr",{className:d("","riskRow"),children:[jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:r.description}),jsxRuntime.jsxs("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:[r.likelihood," / 5"]}),jsxRuntime.jsxs("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:[r.impact," / 5"]}),jsxRuntime.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:R(r.level)}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:r.mitigated?jsxRuntime.jsx("span",{className:"ndpr-text-success",children:"Yes"}):jsxRuntime.jsx("span",{className:"ndpr-text-destructive",children:"No"})})]},r.id))})]})})]}),g&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:"ndpr-section-heading",children:"Full Assessment Details"}),m.map(r=>{let s=r.questions.filter(i=>a.answers[i.id]!==void 0);return s.length===0?null:jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium ndpr-text-foreground mb-2",children:r.title}),jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",children:[jsxRuntime.jsx("thead",{className:"ndpr-panel",children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Question"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Answer"})]})}),jsxRuntime.jsx("tbody",{className:"ndpr-table",children:s.map(i=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:i.text}),jsxRuntime.jsx("td",{className:"px-6 py-4 whitespace-normal text-sm ndpr-text-muted",children:w(i.id)})]},i.id))})]})})]},r.id)})]}),jsxRuntime.jsxs("div",{className:"mt-8 pt-4 border-t border-gray-200 dark:border-gray-700 text-sm ndpr-text-muted",children:[jsxRuntime.jsx("p",{children:"This DPIA was conducted in accordance with the Nigeria Data Protection Act (NDPA) 2023."}),jsxRuntime.jsxs("p",{children:["DPIA Report Version: ",a.version]}),jsxRuntime.jsxs("p",{children:["Generated on: ",o]})]})]})};var M=({steps:a,onStepClick:m,clickable:g=true,orientation:u="horizontal",className:v="",activeStepClassName:f="",completedStepClassName:N="",incompleteStepClassName:x="",classNames:b={},unstyled:y=false})=>{let o=(n,p)=>chunkE64TU6IU_js.a(n,p?b[p]:void 0,y),d=n=>{g&&m&&m(n);},l=u==="vertical";return jsxRuntime.jsx("div",{"data-ndpr-component":"dpia-step-indicator",role:"navigation","aria-label":"Step progress",className:`${o(l?"flex flex-col space-y-4":"flex items-center justify-between","root")} ${v}`,children:a.map((n,p)=>{let w=p===a.length-1,k=n.active?o(`font-medium ${f||"ndpr-text-primary"}`,"label"):n.completed?o(N||"ndpr-text-success","label"):o(x||"ndpr-card__subtitle","label"),C=n.active?o("flex items-center justify-center w-8 h-8 rounded-full bg-[rgb(var(--ndpr-primary)/0.1)] dark:bg-[rgb(var(--ndpr-primary)/0.2)] ndpr-text-primary border-2 border-[rgb(var(--ndpr-primary))] dark:border-[rgb(var(--ndpr-primary))]","stepActive"):n.completed?o("flex items-center justify-center w-8 h-8 rounded-full bg-green-100 dark:bg-green-900 ndpr-text-success border-2 border-green-600 dark:border-green-400","stepCompleted"):o("flex items-center justify-center w-8 h-8 rounded-full bg-gray-100 dark:bg-gray-700 ndpr-text-muted border-2 border-gray-300 dark:border-gray-600","stepPending");return jsxRuntime.jsxs(I__default.default.Fragment,{children:[jsxRuntime.jsxs("div",{className:o(`${l?"flex items-start":"flex flex-col items-center"} ${g?"cursor-pointer":""}`,"step"),onClick:()=>d(n.id),"aria-current":n.active?"step":void 0,children:[jsxRuntime.jsx("div",{className:`
2
+ flex items-center justify-center
3
+ ${l?"mr-4":""}
4
+ `,children:jsxRuntime.jsx("div",{className:C,children:n.icon?n.icon:n.completed?jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):jsxRuntime.jsx("span",{children:p+1})})}),jsxRuntime.jsxs("div",{className:`
5
+ ${l?"flex-1":"mt-2 text-center"}
6
+ `,children:[jsxRuntime.jsx("div",{className:`text-sm font-medium ${k}`,children:n.label}),n.description&&jsxRuntime.jsx("div",{className:"ndpr-form-field__hint",children:n.description})]})]}),!w&&jsxRuntime.jsx("div",{className:o(l?"ml-4 h-8 border-l-2 border-gray-300 dark:border-gray-600":"w-full border-t-2 border-gray-300 dark:border-gray-600 hidden sm:block","connector")})]},n.id)})})};exports.a=B;exports.b=M;//# sourceMappingURL=chunk-3VQAYQR7.js.map
7
+ //# sourceMappingURL=chunk-3VQAYQR7.js.map