@tantainnovative/ndpr-toolkit 3.5.1 → 3.5.5

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 (177) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/README.md +12 -7
  3. package/dist/adapters.js +1 -2
  4. package/dist/adapters.mjs +1 -2
  5. package/dist/breach.d.mts +80 -1
  6. package/dist/breach.d.ts +80 -1
  7. package/dist/breach.js +1 -2
  8. package/dist/breach.mjs +1 -2
  9. package/dist/{chunk-PATONNTZ.mjs → chunk-3HOXQNCH.mjs} +1 -2
  10. package/dist/{chunk-MJGOLP5M.js → chunk-3IA3KDII.js} +1 -2
  11. package/dist/{chunk-M2TPT5GB.js → chunk-3JPDTXGC.js} +1 -2
  12. package/dist/{chunk-BKRETVJ6.js → chunk-3YTAOT5O.js} +1 -2
  13. package/dist/{chunk-GOU6FU6Y.js → chunk-4CVBQC66.js} +1 -2
  14. package/dist/{chunk-E4NCJ7RD.mjs → chunk-4G3SRVRI.mjs} +1 -2
  15. package/dist/{chunk-6QPRDQZF.js → chunk-4QXTB3L6.js} +1 -2
  16. package/dist/{chunk-XNSZ7KUH.js → chunk-5GVMKUMP.js} +1 -2
  17. package/dist/chunk-66NQ5CVY.mjs +1 -0
  18. package/dist/{chunk-JBSCER34.js → chunk-6NXXQYQL.js} +1 -2
  19. package/dist/chunk-732C2EVN.js +1 -0
  20. package/dist/chunk-7BJXI2HI.mjs +1 -0
  21. package/dist/{chunk-C5QO3SX4.js → chunk-7IFSWCQP.js} +1 -2
  22. package/dist/{chunk-A4PK7JB2.js → chunk-7ZZO7GVB.js} +1 -2
  23. package/dist/chunk-AME4HJR4.js +1 -0
  24. package/dist/chunk-AOHKVFAS.mjs +322 -0
  25. package/dist/{chunk-HO5M7M4M.js → chunk-B46SJB5V.js} +1 -2
  26. package/dist/chunk-BFAX7JQA.mjs +1 -0
  27. package/dist/{chunk-ID2NYIVE.mjs → chunk-BNHQFZHL.mjs} +2 -3
  28. package/dist/{chunk-RLYTX3MM.js → chunk-BRS52EDT.js} +1 -2
  29. package/dist/{chunk-OPYQIJKY.js → chunk-C7IDR2IV.js} +1 -2
  30. package/dist/{chunk-CISJAQ6W.mjs → chunk-COD3RMTL.mjs} +1 -2
  31. package/dist/chunk-CR2QZTGW.js +1 -0
  32. package/dist/{chunk-6WIP33TW.mjs → chunk-DBZSN4WP.mjs} +1 -2
  33. package/dist/{chunk-74Z23WUA.mjs → chunk-EEQALYOY.mjs} +1 -2
  34. package/dist/chunk-EFIBHKQE.mjs +1 -0
  35. package/dist/{chunk-GKKAK6ES.mjs → chunk-EWVK45Z3.mjs} +1 -2
  36. package/dist/{chunk-QSVVAZVT.mjs → chunk-EXEXUAF6.mjs} +1 -2
  37. package/dist/chunk-EZCGTHQV.js +6 -0
  38. package/dist/{chunk-SYMQJO2W.mjs → chunk-GTYXVAJX.mjs} +2 -3
  39. package/dist/{chunk-6FGCGLH5.mjs → chunk-H3XJV2IR.mjs} +1 -2
  40. package/dist/chunk-HBLGN4SD.js +1 -0
  41. package/dist/{chunk-MCWV7S2G.js → chunk-HHK5LHEG.js} +1 -2
  42. package/dist/{chunk-XHROISIF.mjs → chunk-HWHBINVN.mjs} +1 -2
  43. package/dist/{chunk-3EGQWLJ6.js → chunk-I2LMQWK3.js} +2 -3
  44. package/dist/{chunk-NQNFS3QI.js → chunk-I3Y4LOSL.js} +4 -5
  45. package/dist/chunk-ITCY2Z66.mjs +4 -0
  46. package/dist/{chunk-Z6IIMLZU.mjs → chunk-KDAZQO3N.mjs} +1 -2
  47. package/dist/{chunk-J5WCPZLW.js → chunk-L2BRFMVS.js} +1 -2
  48. package/dist/chunk-L2VO3MEJ.js +1 -0
  49. package/dist/{chunk-R5FW5XUQ.mjs → chunk-LQTARVPU.mjs} +1 -2
  50. package/dist/{chunk-6TA2MVTU.mjs → chunk-LRRENTT5.mjs} +1 -2
  51. package/dist/{chunk-LIM64IV2.js → chunk-LVGT3DLT.js} +2 -3
  52. package/dist/{chunk-TXBZPCGF.mjs → chunk-LWIKDDSU.mjs} +1 -2
  53. package/dist/chunk-MPBPAEZC.mjs +1 -0
  54. package/dist/{chunk-Z73T6MWY.js → chunk-N3MQQUQP.js} +39 -35
  55. package/dist/{chunk-RY3PGVLZ.mjs → chunk-NBZUZYTB.mjs} +1 -2
  56. package/dist/{chunk-HGGLW5TE.js → chunk-NUWVPRNI.js} +1 -2
  57. package/dist/chunk-O45PKBZA.mjs +6 -0
  58. package/dist/chunk-O6CUBNXK.mjs +3 -0
  59. package/dist/{chunk-7SMLHZ4B.js → chunk-P4LNLCSF.js} +1 -2
  60. package/dist/{chunk-VWPGIES4.mjs → chunk-PCU6GKBE.mjs} +1 -2
  61. package/dist/chunk-PGI2LM6P.js +103 -0
  62. package/dist/{chunk-U62QYKVG.mjs → chunk-PJNKQPQP.mjs} +1 -2
  63. package/dist/{chunk-LSNL4XR5.js → chunk-PZRQWPWD.js} +1 -2
  64. package/dist/chunk-Q64735OC.js +144 -0
  65. package/dist/chunk-QPRYXVH2.js +1 -0
  66. package/dist/{chunk-MQFZHA2D.js → chunk-RFPLZDIO.js} +1 -2
  67. package/dist/chunk-RMQ7OLNY.mjs +144 -0
  68. package/dist/{chunk-2AW7KAZO.mjs → chunk-RPXRPGHL.mjs} +1 -2
  69. package/dist/chunk-RYREGZVQ.js +1 -0
  70. package/dist/{chunk-B4Z5MBUC.mjs → chunk-RZ6GC6WN.mjs} +1 -2
  71. package/dist/chunk-S6COXIZA.js +2 -0
  72. package/dist/chunk-SFGW37LE.mjs +1 -0
  73. package/dist/{chunk-3NQQSU4P.js → chunk-SJDDNB6M.js} +1 -2
  74. package/dist/{chunk-H3EYBSVP.mjs → chunk-TMXK4QKK.mjs} +2 -3
  75. package/dist/{chunk-P42Z5CFE.js → chunk-TQZWJGJ2.js} +1 -2
  76. package/dist/{chunk-EPT2K355.mjs → chunk-U5RWJRGA.mjs} +1 -2
  77. package/dist/{chunk-R3OYAJI6.mjs → chunk-UASG46LP.mjs} +1 -2
  78. package/dist/{chunk-RXL6CZAI.js → chunk-UAV7V4EM.js} +1 -2
  79. package/dist/chunk-UI536RU2.js +3 -0
  80. package/dist/{chunk-7AVN424U.js → chunk-UTFBKL73.js} +1 -2
  81. package/dist/{chunk-I54CDQGN.js → chunk-UXUMYP4L.js} +1 -2
  82. package/dist/{chunk-P3PULLYP.mjs → chunk-V7UFP6QU.mjs} +1 -2
  83. package/dist/{chunk-I4M2AA3N.js → chunk-VJTQXVAF.js} +1 -2
  84. package/dist/{chunk-ELKB2AFZ.js → chunk-VWED6UTN.js} +1 -2
  85. package/dist/{chunk-LU7PKE7Y.mjs → chunk-VYAL2TGT.mjs} +1 -2
  86. package/dist/chunk-W47OSMT6.js +2 -0
  87. package/dist/chunk-W65ZWTLD.mjs +1 -0
  88. package/dist/{chunk-5HL4UBFV.js → chunk-WDDCKYWA.js} +1 -2
  89. package/dist/{chunk-DJGS7SSN.mjs → chunk-WTGKZX7J.mjs} +1 -2
  90. package/dist/{chunk-TDDAYVKK.js → chunk-WZYCBW2R.js} +1 -2
  91. package/dist/chunk-X3GCGC3H.mjs +103 -0
  92. package/dist/chunk-XJO4DH3L.mjs +2 -0
  93. package/dist/{chunk-LWXZMKC2.js → chunk-XO3VQYTL.js} +7 -8
  94. package/dist/{chunk-IZCWCE7W.mjs → chunk-XOH4WXOZ.mjs} +1 -2
  95. package/dist/{chunk-SHMJNRHO.mjs → chunk-XP5PL6K7.mjs} +1 -2
  96. package/dist/{chunk-CKGJK4D7.mjs → chunk-Y3MKMAFQ.mjs} +2 -3
  97. package/dist/chunk-YFBDJ4FH.js +1 -0
  98. package/dist/chunk-YTU4FNM2.mjs +1 -0
  99. package/dist/{chunk-TV4U6AIS.js → chunk-Z763UI5U.js} +1 -2
  100. package/dist/chunk-ZHFLBL63.mjs +2 -0
  101. package/dist/{chunk-RRVKUCFR.mjs → chunk-ZIZL37BG.mjs} +1 -2
  102. package/dist/{chunk-WWT2ZSNU.mjs → chunk-ZJYULEER.mjs} +1 -2
  103. package/dist/{chunk-LJNNPAFU.mjs → chunk-ZQZJNKVB.mjs} +1 -2
  104. package/dist/chunk-ZVOIR4QH.js +4 -0
  105. package/dist/consent.js +1 -2
  106. package/dist/consent.mjs +1 -2
  107. package/dist/core.d.mts +98 -19
  108. package/dist/core.d.ts +98 -19
  109. package/dist/core.js +1 -2
  110. package/dist/core.mjs +1 -2
  111. package/dist/cross-border.d.mts +36 -14
  112. package/dist/cross-border.d.ts +36 -14
  113. package/dist/cross-border.js +1 -2
  114. package/dist/cross-border.mjs +1 -2
  115. package/dist/dpia.d.mts +4 -4
  116. package/dist/dpia.d.ts +4 -4
  117. package/dist/dpia.js +1 -2
  118. package/dist/dpia.mjs +1 -2
  119. package/dist/dsr.d.mts +30 -17
  120. package/dist/dsr.d.ts +30 -17
  121. package/dist/dsr.js +1 -2
  122. package/dist/dsr.mjs +1 -2
  123. package/dist/hooks.d.mts +113 -20
  124. package/dist/hooks.d.ts +113 -20
  125. package/dist/hooks.js +1 -2
  126. package/dist/hooks.mjs +1 -2
  127. package/dist/index.d.mts +422 -26
  128. package/dist/index.d.ts +422 -26
  129. package/dist/index.js +1 -2
  130. package/dist/index.mjs +1 -2
  131. package/dist/lawful-basis.js +1 -2
  132. package/dist/lawful-basis.mjs +1 -2
  133. package/dist/policy.js +1 -2
  134. package/dist/policy.mjs +1 -2
  135. package/dist/presets.d.mts +54 -5
  136. package/dist/presets.d.ts +54 -5
  137. package/dist/presets.js +1 -2
  138. package/dist/presets.mjs +1 -2
  139. package/dist/ropa.js +1 -2
  140. package/dist/ropa.mjs +1 -2
  141. package/dist/server.d.mts +89 -19
  142. package/dist/server.d.ts +89 -19
  143. package/dist/server.js +1 -2
  144. package/dist/server.mjs +1 -2
  145. package/dist/styles.css +34 -0
  146. package/dist/unstyled.d.mts +3 -1
  147. package/dist/unstyled.d.ts +3 -1
  148. package/dist/unstyled.js +1 -2
  149. package/dist/unstyled.mjs +1 -2
  150. package/package.json +59 -20
  151. package/dist/chunk-3VQAYQR7.js +0 -7
  152. package/dist/chunk-6HZL2WDU.mjs +0 -2
  153. package/dist/chunk-75TJPK2N.mjs +0 -2
  154. package/dist/chunk-ABDB7LEV.mjs +0 -2
  155. package/dist/chunk-AYKLAEOU.mjs +0 -2
  156. package/dist/chunk-C4YM4UMI.js +0 -2
  157. package/dist/chunk-CKJAECGV.js +0 -2
  158. package/dist/chunk-CPK5D5FY.js +0 -132
  159. package/dist/chunk-CWHBCQGT.mjs +0 -2
  160. package/dist/chunk-E64TU6IU.js +0 -2
  161. package/dist/chunk-F5TXUA4O.mjs +0 -4
  162. package/dist/chunk-GN5C32JB.mjs +0 -2
  163. package/dist/chunk-GRLIPT5V.mjs +0 -132
  164. package/dist/chunk-I557S566.mjs +0 -15
  165. package/dist/chunk-JFFOPHU3.mjs +0 -318
  166. package/dist/chunk-KF3EFJEF.mjs +0 -3
  167. package/dist/chunk-ORFC66EA.js +0 -4
  168. package/dist/chunk-S4GRSNB4.js +0 -2
  169. package/dist/chunk-SCWNM4PC.mjs +0 -2
  170. package/dist/chunk-SKKOMFXH.js +0 -81
  171. package/dist/chunk-TCN22KYP.mjs +0 -7
  172. package/dist/chunk-TUNQUVHU.mjs +0 -81
  173. package/dist/chunk-VIQUXWJC.js +0 -2
  174. package/dist/chunk-WTJGLNTB.js +0 -3
  175. package/dist/chunk-XIM7KMD6.js +0 -2
  176. package/dist/chunk-YPKUHSK4.js +0 -15
  177. package/dist/chunk-ZPKVLTSX.js +0 -2
@@ -0,0 +1,322 @@
1
+ import {b}from'./chunk-ITCY2Z66.mjs';import {d}from'./chunk-ZJYULEER.mjs';function v(o){return o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function G(o,a){var r,i;if(!o)return "";let d={},e=(r=a.organizationInfo)!=null?r:{};typeof e.name=="string"&&e.name&&(d.orgName=e.name);for(let[t,l]of Object.entries(e))typeof l=="string"&&l&&!(t in d)&&(d[t]=l);for(let[t,l]of Object.entries((i=a.variableValues)!=null?i:{}))typeof l=="string"&&l&&(d[t]=l);return o.replace(/\{\{\s*([^}\s]+)\s*\}\}/g,(t,l)=>{let n=String(l).trim();return Object.prototype.hasOwnProperty.call(d,n)?d[n]:t})}function F(o){return o.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function H(o){let a=o.split(`
2
+ `),d=[],e=false;for(let r of a){let i=r.trimEnd();i.startsWith("- ")||i.startsWith("\u2022 ")?(e||(d.push("<ul>"),e=true),d.push(` <li>${v(i.replace(/^[-•]\s*/,""))}</li>`)):(e&&(d.push("</ul>"),e=false),i.trim()===""||d.push(`<p>${v(i)}</p>`));}return e&&d.push("</ul>"),d.join(`
3
+ `)}var _=`
4
+ --color-bg: #ffffff;
5
+ --color-surface: #f9fafb;
6
+ --color-border: #e5e7eb;
7
+ --color-text: #111827;
8
+ --color-text-muted: #6b7280;
9
+ --color-accent: #16a34a;
10
+ --color-accent-light: #dcfce7;
11
+ --color-heading: #064e3b;
12
+ --color-link: #15803d;
13
+ --color-link-hover: #166534;`,I=`
14
+ --color-bg: #0f172a;
15
+ --color-surface: #1e293b;
16
+ --color-border: #334155;
17
+ --color-text: #f1f5f9;
18
+ --color-text-muted: #94a3b8;
19
+ --color-accent: #22c55e;
20
+ --color-accent-light: #14532d;
21
+ --color-heading: #86efac;
22
+ --color-link: #4ade80;
23
+ --color-link-hover: #86efac;`;function R(o){let a=o==="auto"?" color-scheme: light dark;":o==="dark"?" color-scheme: dark;":" color-scheme: light;",d=o==="dark"?I:_,e=o==="auto"?`
24
+
25
+ @media (prefers-color-scheme: dark) {
26
+ :root {${I}
27
+ }
28
+ }`:"";return `
29
+ :root {
30
+ ${a}${d}
31
+ --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
32
+ --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
33
+ --radius: 8px;
34
+ --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
35
+ --max-width: 860px;
36
+ }${e}`}var W=`
37
+ /* \u2500\u2500 Reset & Base \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
38
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
39
+
40
+ /* \u2500\u2500 Design tokens \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */`,B=`
41
+ /* \u2500\u2500 Layout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
42
+ html { font-size: 16px; scroll-behavior: smooth; }
43
+
44
+ body {
45
+ font-family: var(--font-sans);
46
+ background: var(--color-bg);
47
+ color: var(--color-text);
48
+ line-height: 1.7;
49
+ padding: 2rem 1.25rem;
50
+ }
51
+
52
+ .policy-wrapper {
53
+ max-width: var(--max-width);
54
+ margin: 0 auto;
55
+ }
56
+
57
+ /* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
58
+ .policy-header {
59
+ background: var(--color-surface);
60
+ border: 1px solid var(--color-border);
61
+ border-radius: var(--radius);
62
+ padding: 2.5rem 2.5rem 2rem;
63
+ margin-bottom: 2rem;
64
+ box-shadow: var(--shadow);
65
+ }
66
+
67
+ .policy-header h1 {
68
+ font-size: 2rem;
69
+ font-weight: 700;
70
+ color: var(--color-heading);
71
+ line-height: 1.2;
72
+ margin-bottom: 0.75rem;
73
+ letter-spacing: -0.025em;
74
+ }
75
+
76
+ .policy-meta {
77
+ display: flex;
78
+ flex-wrap: wrap;
79
+ gap: 0.5rem 1.5rem;
80
+ font-size: 0.875rem;
81
+ color: var(--color-text-muted);
82
+ margin-top: 0.5rem;
83
+ }
84
+
85
+ .policy-meta span { white-space: nowrap; }
86
+
87
+ .compliance-badge {
88
+ display: inline-flex;
89
+ align-items: center;
90
+ gap: 0.35rem;
91
+ background: var(--color-accent-light);
92
+ color: var(--color-accent);
93
+ font-size: 0.75rem;
94
+ font-weight: 600;
95
+ padding: 0.25rem 0.75rem;
96
+ border-radius: 9999px;
97
+ margin-top: 1rem;
98
+ letter-spacing: 0.01em;
99
+ border: 1px solid var(--color-accent);
100
+ }
101
+
102
+ /* \u2500\u2500 Navigation / TOC \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
103
+ .policy-toc {
104
+ background: var(--color-surface);
105
+ border: 1px solid var(--color-border);
106
+ border-left: 4px solid var(--color-accent);
107
+ border-radius: var(--radius);
108
+ padding: 1.5rem 2rem;
109
+ margin-bottom: 2.5rem;
110
+ box-shadow: var(--shadow);
111
+ }
112
+
113
+ .policy-toc h2 {
114
+ font-size: 1rem;
115
+ font-weight: 700;
116
+ text-transform: uppercase;
117
+ letter-spacing: 0.08em;
118
+ color: var(--color-text-muted);
119
+ margin-bottom: 1rem;
120
+ }
121
+
122
+ .policy-toc ol {
123
+ list-style: decimal;
124
+ padding-left: 1.25rem;
125
+ column-count: 1;
126
+ }
127
+
128
+ @media (min-width: 600px) {
129
+ .policy-toc ol { column-count: 2; column-gap: 2rem; }
130
+ }
131
+
132
+ .policy-toc li { margin-bottom: 0.35rem; break-inside: avoid; }
133
+
134
+ .policy-toc a {
135
+ color: var(--color-link);
136
+ text-decoration: none;
137
+ font-size: 0.9375rem;
138
+ transition: color 0.15s ease;
139
+ }
140
+
141
+ .policy-toc a:hover { color: var(--color-link-hover); text-decoration: underline; }
142
+
143
+ /* \u2500\u2500 Article / Sections \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
144
+ article.policy-body { display: flex; flex-direction: column; gap: 2.5rem; }
145
+
146
+ .policy-section {
147
+ background: var(--color-surface);
148
+ border: 1px solid var(--color-border);
149
+ border-radius: var(--radius);
150
+ padding: 2rem 2.5rem;
151
+ box-shadow: var(--shadow);
152
+ scroll-margin-top: 1.5rem;
153
+ }
154
+
155
+ .policy-section h2 {
156
+ font-size: 1.25rem;
157
+ font-weight: 700;
158
+ color: var(--color-heading);
159
+ margin-bottom: 1.25rem;
160
+ padding-bottom: 0.75rem;
161
+ border-bottom: 2px solid var(--color-accent-light);
162
+ display: flex;
163
+ align-items: baseline;
164
+ gap: 0.5rem;
165
+ line-height: 1.3;
166
+ }
167
+
168
+ .section-number {
169
+ font-size: 0.75rem;
170
+ font-weight: 700;
171
+ background: var(--color-accent);
172
+ color: #fff;
173
+ width: 1.5rem;
174
+ height: 1.5rem;
175
+ display: inline-flex;
176
+ align-items: center;
177
+ justify-content: center;
178
+ border-radius: 50%;
179
+ flex-shrink: 0;
180
+ }
181
+
182
+ .policy-section p {
183
+ margin-bottom: 0.875rem;
184
+ font-size: 0.9375rem;
185
+ color: var(--color-text);
186
+ }
187
+
188
+ .policy-section p:last-child { margin-bottom: 0; }
189
+
190
+ .policy-section ul {
191
+ margin: 0.75rem 0 0.875rem 1.5rem;
192
+ display: flex;
193
+ flex-direction: column;
194
+ gap: 0.35rem;
195
+ }
196
+
197
+ .policy-section ul li {
198
+ font-size: 0.9375rem;
199
+ color: var(--color-text);
200
+ position: relative;
201
+ }
202
+
203
+ .policy-section ul li::marker { color: var(--color-accent); }
204
+
205
+ /* \u2500\u2500 Footer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
206
+ .policy-footer {
207
+ margin-top: 3rem;
208
+ padding: 1.5rem 2rem;
209
+ border-top: 1px solid var(--color-border);
210
+ text-align: center;
211
+ font-size: 0.8125rem;
212
+ color: var(--color-text-muted);
213
+ display: flex;
214
+ flex-direction: column;
215
+ gap: 0.35rem;
216
+ }
217
+
218
+ .policy-footer a { color: var(--color-link); text-decoration: none; }
219
+ .policy-footer a:hover { text-decoration: underline; }
220
+
221
+ /* \u2500\u2500 Print styles \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
222
+ @media print {
223
+ :root {
224
+ --color-bg: #fff;
225
+ --color-surface: #fff;
226
+ --color-border: #d1d5db;
227
+ --color-text: #000;
228
+ --color-text-muted: #374151;
229
+ --color-accent: #16a34a;
230
+ --color-accent-light: #f0fdf4;
231
+ --color-heading: #064e3b;
232
+ --color-link: #15803d;
233
+ }
234
+
235
+ body { padding: 0; font-size: 10pt; }
236
+ .policy-wrapper { max-width: 100%; }
237
+
238
+ .policy-toc { break-inside: avoid; }
239
+ .policy-section { break-inside: avoid; box-shadow: none; border: 1px solid #d1d5db; }
240
+
241
+ .policy-toc ol { column-count: 2; }
242
+ .policy-footer { border-top: 1px solid #d1d5db; }
243
+
244
+ a { color: inherit; text-decoration: none; }
245
+ }
246
+ `;function j(o){return `${W}${R(o)}${B}`.trim()}function M(o,a){var S,s;let d=(a==null?void 0:a.includeStyles)!==false,e=(S=a==null?void 0:a.customCSS)!=null?S:"",r=(s=a==null?void 0:a.theme)!=null?s:"light",i=o.sections.filter(c=>c.included),t=v(o.organizationInfo.name||"Organisation"),l=v(o.title||"Privacy Policy"),n=v(o.version||"1.0"),m=o.effectiveDate?new Date(o.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),b$1=o.lastUpdated?new Date(o.lastUpdated).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):m,h=o.organizationInfo.website?`<a href="${v(o.organizationInfo.website)}" target="_blank" rel="noopener">${v(o.organizationInfo.website)}</a>`:"",u=o.organizationInfo.privacyEmail?`<a href="mailto:${v(o.organizationInfo.privacyEmail)}">${v(o.organizationInfo.privacyEmail)}</a>`:"",$=`
247
+ <nav class="policy-toc" aria-label="Table of Contents">
248
+ <h2>Table of Contents</h2>
249
+ <ol>
250
+ ${i.map((c,f)=>` <li><a href="#${F(c.title)}">${v(c.title)}</a></li>`).join(`
251
+ `)}
252
+ </ol>
253
+ </nav>`,x=i.map((c,f)=>{let p=F(c.title),y=c.template||c.defaultContent||"",g=G(y,{variableValues:o.variableValues,organizationInfo:o.organizationInfo}),w=H(g);return ` <section class="policy-section" id="${p}" aria-labelledby="section-heading-${p}">
254
+ <h2 id="section-heading-${p}">
255
+ <span class="section-number" aria-hidden="true">${f+1}</span>
256
+ ${v(c.title)}
257
+ </h2>
258
+ ${w}
259
+ </section>`}).join(`
260
+
261
+ `),D=e?e.replace(/<\/style>/gi,""):"",z=d?`<style>
262
+ ${j(r)}
263
+ ${D?`
264
+ /* \u2500\u2500 Custom styles \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
265
+ ${D}`:""}
266
+ </style>`:D?`<style>${D}</style>`:"";return `<!DOCTYPE html>
267
+ <html lang="en">
268
+ <head>
269
+ <meta charset="UTF-8" />
270
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
271
+ <meta name="description" content="Privacy Policy for ${t}" />
272
+ <meta name="generator" content="NDPA Toolkit" />
273
+ <title>${l} \u2014 ${t}</title>
274
+ ${z}
275
+ </head>
276
+ <body>
277
+ <div class="policy-wrapper">
278
+
279
+ <header class="policy-header">
280
+ <h1>${l}</h1>
281
+ <div class="policy-meta">
282
+ <span><strong>Organisation:</strong> ${t}</span>
283
+ <span><strong>Effective:</strong> ${m}</span>
284
+ <span><strong>Version:</strong> ${n}</span>
285
+ ${b$1!==m?`<span><strong>Last updated:</strong> ${b$1}</span>`:""}
286
+ </div>
287
+ <div>
288
+ <span class="compliance-badge" role="img" aria-label="NDPA compliant">&#10003; NDPA 2023 Compliant</span>
289
+ </div>
290
+ </header>
291
+
292
+ ${$}
293
+
294
+ <article class="policy-body" aria-label="Policy content">
295
+
296
+ ${x}
297
+
298
+ </article>
299
+
300
+ <aside class="policy-legal-notice" role="note" aria-label="Legal notice">
301
+ <h2>Important Notice</h2>
302
+ <p>${v(b)}</p>
303
+ </aside>
304
+
305
+ <footer class="policy-footer" role="contentinfo">
306
+ <div>${t}${h?` &mdash; ${h}`:""}</div>
307
+ ${u?`<div>Privacy contact: ${u}</div>`:""}
308
+ <div>Effective ${m} &bull; Version ${n}</div>
309
+ <div>Generated by <strong>NDPA Toolkit</strong> &mdash; Nigeria Data Protection Act 2023</div>
310
+ </footer>
311
+
312
+ </div>
313
+ </body>
314
+ </html>`}function V(o){return o.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function X(o){let a=o.sections.filter(l=>l.included),d=o.title||"Privacy Policy",e=o.organizationInfo.name||"Organisation",r=o.version||"1.0",i=o.effectiveDate?new Date(o.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),t=[];return t.push(`# ${d}`),t.push(""),t.push(`_Effective: ${i} | Version: ${r} | ${e}_`),t.push(""),o.organizationInfo.website&&t.push(`**Website:** ${o.organizationInfo.website} `),o.organizationInfo.privacyEmail&&t.push(`**Privacy contact:** ${o.organizationInfo.privacyEmail} `),(o.organizationInfo.website||o.organizationInfo.privacyEmail)&&t.push(""),t.push("> This privacy policy is compliant with the **Nigeria Data Protection Act (NDPA) 2023**."),t.push(""),t.push("---"),t.push(""),a.length>0&&(t.push("## Table of Contents"),t.push(""),a.forEach((l,n)=>{let m=V(`${n+1} ${l.title}`);t.push(`${n+1}. [${l.title}](#${m})`);}),t.push(""),t.push("---"),t.push("")),a.forEach((l,n)=>{t.push(`## ${n+1}. ${l.title}`),t.push("");let m=(l.template||l.defaultContent||"").trim();if(m){let b=m.split(`
315
+ `);for(let h of b){let u=h.trimEnd();u.startsWith("-")||u.startsWith("\u2022")||u===""?t.push(u.replace(/^•/,"-")):t.push(u);}}t.push(""),t.push("---"),t.push("");}),t.push("## Important Notice"),t.push(""),t.push(b),t.push(""),t.push("---"),t.push(""),t.push(`_Generated by **NDPA Toolkit** \u2014 ${e} \u2022 Version ${r}_`),t.push(""),t.join(`
316
+ `)}function Y(o,a){return d(this,null,function*(){var S;let d;try{let s=yield import('jspdf');d=(S=s.jsPDF)!=null?S:s.default;}catch(s){throw new Error(`[ndpr-toolkit] PDF export requires the "jspdf" package. Install it with:
317
+ pnpm add jspdf
318
+ See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let e=new d({unit:"mm",format:"a4"}),r=e.internal.pageSize.getWidth(),i=e.internal.pageSize.getHeight(),t=20,l=r-t*2,n=t,m=o.organizationInfo.name||"",b$1=o.title||"Privacy Policy",h=o.version||"1.0",u=o.effectiveDate?new Date(o.effectiveDate).toLocaleDateString():new Date().toLocaleDateString(),T=()=>{e.setFontSize(8),e.setFont("helvetica","italic"),e.setTextColor(150,150,150),e.text(m?`${m} \u2014 ${b$1}`:b$1,t,12),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,14,r-t,14),e.setTextColor(0,0,0);},$=s=>{n+s>i-t-10&&(e.addPage(),n=t+8,T());};if((a==null?void 0:a.includeCoverPage)!==false){e.setFillColor(22,163,74),e.rect(0,0,r,12,"F"),e.setFontSize(28),e.setFont("helvetica","bold"),e.setTextColor(22,163,74);let s=e.splitTextToSize(b$1,l-10),c=72;s.forEach(p=>{e.text(p,r/2,c,{align:"center"}),c+=11;}),e.setDrawColor(22,163,74),e.setLineWidth(.6);let f=c+6;if(e.line(r/2-30,f,r/2+30,f),e.setFontSize(14),e.setFont("helvetica","normal"),e.setTextColor(40,40,40),e.text(m,r/2,f+14,{align:"center"}),e.setFontSize(10),e.setTextColor(100,100,100),e.text(`Effective Date: ${u}`,r/2,f+26,{align:"center"}),e.text(`Version ${h}`,r/2,f+34,{align:"center"}),(a==null?void 0:a.includeComplianceBadge)!==false){let p=f+52,y="Compliant with the Nigeria Data Protection Act (NDPA) 2023";e.setFontSize(8.5),e.setFont("helvetica","bold"),e.setTextColor(255,255,255);let g=e.getTextWidth(y),w=7,E=3.5,P=(r-g-w*2)/2;e.setFillColor(22,163,74),e.roundedRect(P,p-E-1,g+w*2,7+E,2,2,"F"),e.text(y,r/2,p+1.5,{align:"center"}),e.setTextColor(0,0,0);}e.setFillColor(22,163,74),e.rect(0,i-12,r,12,"F"),e.addPage(),n=t+8,T();}let x=o.sections.filter(s=>s.included);(a==null?void 0:a.includeTOC)!==false&&(e.setFontSize(18),e.setFont("helvetica","bold"),e.setTextColor(22,163,74),e.text("Table of Contents",t,n+4),e.setDrawColor(22,163,74),e.setLineWidth(.5),e.line(t,n+8,t+80,n+8),n+=18,e.setFontSize(10.5),e.setFont("helvetica","normal"),e.setTextColor(40,40,40),x.forEach((s,c)=>{$(7);let f=`${c+1}. ${s.title}`;e.text(f,t+4,n),n+=6.5;}),e.addPage(),n=t+8,T()),x.forEach((s,c)=>{$(18),e.setFillColor(22,163,74),e.circle(t+3.5,n-1.5,3.8,"F"),e.setFontSize(8),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text(String(c+1),t+3.5,n-.5,{align:"center"}),e.setFontSize(13),e.setFont("helvetica","bold"),e.setTextColor(22,163,74),e.text(s.title,t+11,n),n+=3,e.setDrawColor(200,200,200),e.setLineWidth(.25),e.line(t+11,n,r-t,n),n+=6;let f=(s.template||s.defaultContent||"").trim();if(f){let p=f.split(`
319
+ `);e.setFontSize(9.5),e.setFont("helvetica","normal"),e.setTextColor(50,50,50),p.forEach(y=>{let g=y.trimEnd();if(g===""){n+=3;return}let w=g.startsWith("-")||g.startsWith("\u2022"),E=w?t+8:t+4,P=w?g.replace(/^[-•]\s*/,""):g,k=l-(w?12:8);e.splitTextToSize(P,k).forEach((A,O)=>{$(5),w&&O===0&&(e.setFillColor(22,163,74),e.circle(t+4,n-1,.9,"F")),e.text(A,E,n),n+=5;});});}n+=10;}),n>i-60&&(e.addPage(),n=t),e.setFontSize(14),e.setFont("helvetica","bold"),e.setTextColor(0,0,0),e.text("Important Notice",t,n),n+=8,e.setFontSize(9),e.setFont("helvetica","normal"),e.setTextColor(80,80,80),e.splitTextToSize(b,l).forEach(s=>{n>i-20&&(e.addPage(),n=t),e.text(s,t,n),n+=5;}),e.setTextColor(0,0,0);let z=e.getNumberOfPages();for(let s=1;s<=z;s++)e.setPage(s),e.setFontSize(7.5),e.setFont("helvetica","normal"),e.setTextColor(160,160,160),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,i-12,r-t,i-12),e.text(m?`${m} \u2014 Privacy Policy`:"Privacy Policy",t,i-8),e.text(`Page ${s} of ${z}`,r-t,i-8,{align:"right"}),e.setTextColor(0,0,0);return e.setProperties({title:b$1,author:m,subject:"Privacy Policy \u2014 NDPA 2023 Compliant",keywords:"privacy policy, NDPA, Nigeria, data protection"}),e.output("blob")})}function U(o,a){return d(this,null,function*(){let d;try{d=yield import('docx');}catch(p){throw new Error(`[ndpr-toolkit] Word export requires the "docx" package. Install it with:
320
+ pnpm add docx
321
+ See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let{Document:e,Paragraph:r,TextRun:i,HeadingLevel:t,Packer:l,Header:n,Footer:m,PageNumber:b$1,AlignmentType:h,BorderStyle:u,ShadingType:T,TableOfContents:$}=d,x=o.organizationInfo.name||"",D=o.title||"Privacy Policy",z=o.version||"1.0",S=o.effectiveDate?new Date(o.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),s=o.sections.filter(p=>p.included),c=[];if(c.push(new r({children:[new i({text:D,bold:true,size:52,color:"064e3b"})],heading:t.TITLE,spacing:{after:160},alignment:h.CENTER})),c.push(new r({children:[new i({text:`${x}${x?" \u2022 ":""}Version ${z} \u2022 Effective ${S}`,size:20,color:"6b7280",italics:true})],spacing:{after:120},alignment:h.CENTER})),c.push(new r({children:[new i({text:"Compliant with the Nigeria Data Protection Act (NDPA) 2023",size:18,color:"16a34a",bold:true})],spacing:{after:400},alignment:h.CENTER})),c.push(new r({children:[],spacing:{after:200},border:{bottom:{color:"16a34a",style:u.SINGLE,size:6,space:1}}})),(a==null?void 0:a.includeTOC)!==false){if(c.push(new r({children:[new i({text:"Table of Contents",bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200}})),typeof $=="function")try{c.push(new $("Table of Contents",{hyperlink:!0,headingStyleRange:"1-1"}));}catch(p){s.forEach((y,g)=>{c.push(new r({children:[new i({text:`${g+1}. ${y.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});}else s.forEach((p,y)=>{c.push(new r({children:[new i({text:`${y+1}. ${p.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});c.push(new r({children:[],pageBreakBefore:true}));}s.forEach((p,y)=>{c.push(new r({children:[new i({text:`${y+1}. ${p.title}`,bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200},border:{bottom:{color:"dcfce7",style:u.SINGLE,size:4,space:1}}}));let g=(p.template||p.defaultContent||"").trim();g&&g.split(`
322
+ `).forEach(E=>{let P=E.trimEnd();if(P===""){c.push(new r({children:[],spacing:{after:60}}));return}let k=P.startsWith("- ")||P.startsWith("\u2022 "),N=k?P.replace(/^[-•]\s*/,""):P;k?c.push(new r({children:[new i({text:N,size:22})],spacing:{after:80},bullet:{level:0}})):c.push(new r({children:[new i({text:N,size:22})],spacing:{after:100}}));});}),c.push(new r({heading:t.HEADING_1,children:[new i({text:"Important Notice",bold:true})],spacing:{before:600,after:200}}),new r({children:[new i({text:b,size:18,color:"4b5563",italics:true})],spacing:{after:200}})),c.push(new r({children:[new i({text:`Generated by NDPA Toolkit \u2014 ${x}${x?" \u2014 ":""}Privacy Policy v${z}`,size:16,color:"9ca3af",italics:true})],spacing:{before:600},alignment:h.CENTER}));let f=new e({title:D,description:"Privacy Policy \u2014 NDPA 2023 Compliant",styles:{paragraphStyles:[{id:"Normal",name:"Normal",run:{font:"Calibri",size:22}}]},sections:[{headers:{default:new n({children:[new r({children:[new i({text:x||"Privacy Policy",size:16,color:"9ca3af"})],alignment:h.RIGHT})]})},footers:{default:new m({children:[new r({children:[new i({text:"Page ",size:16,color:"9ca3af"}),new i({children:[b$1.CURRENT],size:16,color:"9ca3af"}),new i({text:" of ",size:16,color:"9ca3af"}),new i({children:[b$1.TOTAL_PAGES],size:16,color:"9ca3af"})],alignment:h.CENTER})]})},children:c}]});return l.toBlob(f)})}export{M as a,X as b,Y as c,U as d};
@@ -1,2 +1 @@
1
- 'use strict';function o(e){let t=[];if((!e.consents||Object.keys(e.consents).length===0)&&t.push("Consent settings must include at least one consent option"),e.timestamp?(typeof e.timestamp!="number"||isNaN(e.timestamp))&&t.push("Consent timestamp must be a valid number"):t.push("Consent timestamp is required"),e.version||t.push("Consent version is required"),e.method||t.push("Consent collection method is required"),e.hasInteracted===void 0&&t.push("User interaction status is required"),e.timestamp){let n=new Date;n.setMonth(n.getMonth()-13);let s=n.getTime();e.timestamp<s&&t.push("Consent is older than 13 months and should be refreshed");}return {valid:t.length===0,errors:t}}function i(e){let t=[];return (!e||e.length===0)&&t.push("At least one consent option is required"),e==null||e.forEach(n=>{(!n.purpose||n.purpose.trim()==="")&&t.push(`Consent option "${n.id}" is missing a purpose. NDPA Section 26 requires consent to be specific to a stated purpose.`);}),{valid:t.length===0,errors:t}}exports.a=o;exports.b=i;//# sourceMappingURL=chunk-HO5M7M4M.js.map
2
- //# sourceMappingURL=chunk-HO5M7M4M.js.map
1
+ 'use strict';function o(e){let t=[];if((!e.consents||Object.keys(e.consents).length===0)&&t.push("Consent settings must include at least one consent option"),e.timestamp?(typeof e.timestamp!="number"||isNaN(e.timestamp))&&t.push("Consent timestamp must be a valid number"):t.push("Consent timestamp is required"),e.version||t.push("Consent version is required"),e.method||t.push("Consent collection method is required"),e.hasInteracted===void 0&&t.push("User interaction status is required"),e.timestamp){let n=new Date;n.setMonth(n.getMonth()-13);let s=n.getTime();e.timestamp<s&&t.push("Consent is older than 13 months and should be refreshed");}return {valid:t.length===0,errors:t}}function i(e){let t=[];return (!e||e.length===0)&&t.push("At least one consent option is required"),e==null||e.forEach(n=>{(!n.purpose||n.purpose.trim()==="")&&t.push(`Consent option "${n.id}" is missing a purpose. NDPA Section 26 requires consent to be specific to a stated purpose.`);}),{valid:t.length===0,errors:t}}exports.a=o;exports.b=i;
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-YTU4FNM2.mjs';import {a as a$2}from'./chunk-SFGW37LE.mjs';import {a as a$1,b}from'./chunk-ZJYULEER.mjs';import {useState,useRef,useEffect,useCallback}from'react';import {createPortal}from'react-dom';import {jsx,jsxs}from'react/jsx-runtime';var Sn=({options:d,onSave:Y,title:K="We Value Your Privacy",description:Q="We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26.",acceptAllButtonText:U="Accept All",rejectAllButtonText:X="Reject All",customizeButtonText:Z="Customize",saveButtonText:s="Save Preferences",position:m="bottom",variant:h="bar",zIndex:I=9999,version:_="1.0",show:C,manageStorage:x=true,storageKey:y="ndpr_consent",className:$="",buttonClassName:A="",primaryButtonClassName:N="",secondaryButtonClassName:nn="",classNames:n,unstyled:o,onAnalytics:B})=>{let[u,c]=useState(false),[l,R]=useState(false),[a$3,k]=useState({}),[T,tn]=useState(false),en=a({active:u}),z=useRef(null),E=useRef(false);useEffect(()=>{tn(true);},[]);let p=useCallback((t,e)=>{B==null||B(a$1({action:t,timestamp:Date.now(),version:_},e!==void 0?{categories:e}:{}));},[B,_]);useEffect(()=>{let t={};if(d.forEach(e=>{t[e.id]=e.defaultValue||false;}),k(t),C===void 0)if(!x)c(true);else {let e=localStorage.getItem(y);if(e)try{JSON.parse(e).version!==_?c(!0):c(!1);}catch(w){c(true);}else c(true);}else c(C);},[d,y,_,x]),useEffect(()=>{C!==void 0&&c(C);},[C]);let on=()=>{let t={};d.forEach(e=>{t[e.id]=true;}),p("accepted_all",t),P(t);},q=()=>{let t={};d.forEach(e=>{t[e.id]=e.required||false;}),p("rejected_all",t),P(t);},rn=(t,e)=>{k(w=>b(a$1({},w),{[t]:e}));},dn=()=>{let t={};d.forEach(e=>{t[e.id]=true;}),k(t);},cn=()=>{let t={};d.forEach(e=>{t[e.id]=e.required||false;}),k(t);},H=d.length>0&&d.every(t=>a$3[t.id]),un=()=>{p("customized",a$3),P(a$3);},P=t=>{let e={consents:t,timestamp:Date.now(),version:_,method:l?"customize":"banner",hasInteracted:true};x&&localStorage.setItem(y,JSON.stringify(e)),Y(e),c(false),R(false);};if(useEffect(()=>{if(!u)return;let t=e=>{e.key==="Escape"&&(p("dismissed"),q());};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[u,p,d,l]),useEffect(()=>{u&&!E.current&&(E.current=true,p("shown")),u||(E.current=false);},[u,p]),useEffect(()=>{if(l&&z.current){let t=z.current;t.style.maxHeight="0px",t.style.opacity="0",t.offsetHeight,t.style.maxHeight=`${t.scrollHeight}px`,t.style.opacity="1";}},[l]),!u)return null;let f=h==="modal"?"center":m,O=f==="inline",j=f==="center",g=["ndpr-consent-banner"];h!=="bar"&&g.push(`ndpr-consent-banner--${h}`),f==="top"?g.push("ndpr-consent-banner--top"):f==="bottom"?g.push("ndpr-consent-banner--bottom"):f==="inline"&&g.push("ndpr-consent-banner--inline"),$&&g.push($);let pn=g.join(" "),F=`ndpr-consent-banner__button ndpr-consent-banner__button--primary ${A} ${N}`.trim(),bn=`ndpr-consent-banner__button ndpr-consent-banner__button--secondary ${A} ${nn}`.trim(),ln=`ndpr-consent-banner__button ndpr-consent-banner__button--ghost ${A}`.trim(),fn=(n==null?void 0:n.primaryButton)||(n==null?void 0:n.acceptButton)||F,G=(n==null?void 0:n.secondaryButton)||(n==null?void 0:n.rejectButton)||bn,gn=(n==null?void 0:n.customizeButton)||ln,vn=(n==null?void 0:n.saveButton)||F,D=jsx("div",{ref:en,tabIndex:-1,"data-ndpr-component":"consent-banner","data-ndpr-variant":h,"data-ndpr-position":f,className:a$2(pn,n==null?void 0:n.root,o),style:!O&&!j?{zIndex:I}:void 0,role:"dialog","aria-modal":j||void 0,"aria-labelledby":"consent-banner-title","aria-describedby":"consent-banner-description",children:jsxs("div",{className:a$2("ndpr-consent-banner__container",n==null?void 0:n.container,o),children:[jsx("h2",{id:"consent-banner-title",className:a$2("ndpr-consent-banner__title",n==null?void 0:n.title,o),children:K}),jsx("p",{id:"consent-banner-description",className:a$2("ndpr-consent-banner__description",n==null?void 0:n.description,o),children:Q}),l&&jsxs("div",{ref:z,className:a$2("ndpr-consent-banner__customize-panel",n==null?void 0:n.customizePanel,o),children:[jsx("div",{className:o?"":"ndpr-consent-banner__select-all-row",children:jsx("button",{type:"button",onClick:H?cn:dn,className:a$2("ndpr-consent-banner__select-all-button",n==null?void 0:n.selectAllButton,o),children:H?"Deselect All":"Select All"})}),jsx("div",{className:a$2("ndpr-consent-banner__options-list",n==null?void 0:n.optionsList,o),children:d.map(t=>jsxs("div",{className:a$2("ndpr-consent-banner__option",n==null?void 0:n.optionItem,o),children:[jsx("input",{id:`consent-${t.id}`,type:"checkbox",checked:a$3[t.id]||false,onChange:e=>rn(t.id,e.target.checked),disabled:t.required,className:a$2("ndpr-consent-banner__option-checkbox",n==null?void 0:n.optionCheckbox,o)}),jsxs("div",{className:o?"":"ndpr-consent-banner__option-text",children:[jsxs("label",{htmlFor:`consent-${t.id}`,className:a$2("ndpr-consent-banner__option-label",n==null?void 0:n.optionLabel,o),children:[t.label,t.required&&jsx("span",{className:o?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsx("p",{className:a$2("ndpr-consent-banner__option-description",n==null?void 0:n.optionDescription,o),children:t.description})]})]},t.id))}),jsxs("div",{className:a$2("ndpr-consent-banner__buttons",n==null?void 0:n.buttonGroup,o),children:[jsx("button",{onClick:un,className:a$2(vn,n==null?void 0:n.saveButton,o),children:s}),jsx("button",{onClick:()=>R(false),className:a$2(G,n==null?void 0:n.rejectButton,o),children:"Back"})]})]}),!l&&jsxs("div",{className:a$2("ndpr-consent-banner__buttons",n==null?void 0:n.buttonGroup,o),children:[jsx("button",{onClick:on,className:a$2(fn,n==null?void 0:n.acceptButton,o),children:U}),jsx("button",{onClick:q,className:a$2(G,n==null?void 0:n.rejectButton,o),children:X}),jsx("button",{onClick:()=>R(true),className:a$2(gn,n==null?void 0:n.customizeButton,o),children:Z})]}),jsx("div",{className:a$2("ndpr-consent-banner__footer-text",void 0,o),children:'By clicking "Accept All", you agree to the use of ALL cookies. Visit our Cookie Policy to learn more.'})]})});if(O)return D;if(j){let t=jsx("div",{className:o?"":"ndpr-consent-banner__overlay",style:{zIndex:I},children:D});return T?createPortal(t,document.body):null}return T?createPortal(D,document.body):null};export{Sn as a};