UNPKG

@tantainnovative/ndpr-toolkit

Version:

Nigeria Data Protection Toolkit — enterprise-grade compliance components for the Nigeria Data Protection Act (NDPA) 2023

322 lines (281 loc) 21.6 kB
'use strict';var chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js');function b(o){return o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function A(o){let i=o.trim();if(!i||/[-\s]/.test(i))return "";if(i.startsWith("//"))return `https:${i}`;let s=i.match(/^([a-z][a-z0-9+.-]*):/i);if(!s)return `https://${i}`;let e=s[1].toLowerCase();return e==="http"||e==="https"||e==="mailto"?i:""}function H(o,i){var r,a;if(!o)return "";let s={},e=(r=i.organizationInfo)!=null?r:{};typeof e.name=="string"&&e.name&&(s.orgName=e.name);for(let[t,d]of Object.entries(e))typeof d=="string"&&d&&!(t in s)&&(s[t]=d);for(let[t,d]of Object.entries((a=i.variableValues)!=null?a:{}))typeof d=="string"&&d&&(s[t]=d);return o.replace(/\{\{\s*([^}\s]+)\s*\}\}/g,(t,d)=>{let n=String(d).trim();return Object.prototype.hasOwnProperty.call(s,n)?s[n]:t})}function O(o){return o.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function R(o){let i=o.split(` `),s=[],e=false;for(let r of i){let a=r.trimEnd();a.startsWith("- ")||a.startsWith("\u2022 ")?(e||(s.push("<ul>"),e=true),s.push(` <li>${b(a.replace(/^[-•]\s*/,""))}</li>`)):(e&&(s.push("</ul>"),e=false),a.trim()===""||s.push(`<p>${b(a)}</p>`));}return e&&s.push("</ul>"),s.join(` `)}var W=` --color-bg: #ffffff; --color-surface: #f9fafb; --color-border: #e5e7eb; --color-text: #111827; --color-text-muted: #6b7280; --color-accent: #16a34a; --color-accent-light: #dcfce7; --color-heading: #064e3b; --color-link: #15803d; --color-link-hover: #166534;`,G=` --color-bg: #0f172a; --color-surface: #1e293b; --color-border: #334155; --color-text: #f1f5f9; --color-text-muted: #94a3b8; --color-accent: #22c55e; --color-accent-light: #14532d; --color-heading: #86efac; --color-link: #4ade80; --color-link-hover: #86efac;`;function _(o){let i=o==="auto"?" color-scheme: light dark;":o==="dark"?" color-scheme: dark;":" color-scheme: light;",s=o==="dark"?G:W,e=o==="auto"?` @media (prefers-color-scheme: dark) { :root {${G} } }`:"";return ` :root { ${i}${s} --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace; --radius: 8px; --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04); --max-width: 860px; }${e}`}var B=` /* \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 */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } /* \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 */`,M=` /* \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 */ html { font-size: 16px; scroll-behavior: smooth; } body { font-family: var(--font-sans); background: var(--color-bg); color: var(--color-text); line-height: 1.7; padding: 2rem 1.25rem; } .policy-wrapper { max-width: var(--max-width); margin: 0 auto; } /* \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 */ .policy-header { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 2.5rem 2.5rem 2rem; margin-bottom: 2rem; box-shadow: var(--shadow); } .policy-header h1 { font-size: 2rem; font-weight: 700; color: var(--color-heading); line-height: 1.2; margin-bottom: 0.75rem; letter-spacing: -0.025em; } .policy-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.875rem; color: var(--color-text-muted); margin-top: 0.5rem; } .policy-meta span { white-space: nowrap; } .compliance-badge { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--color-accent-light); color: var(--color-accent); font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 9999px; margin-top: 1rem; letter-spacing: 0.01em; border: 1px solid var(--color-accent); } /* \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 */ .policy-toc { background: var(--color-surface); border: 1px solid var(--color-border); border-left: 4px solid var(--color-accent); border-radius: var(--radius); padding: 1.5rem 2rem; margin-bottom: 2.5rem; box-shadow: var(--shadow); } .policy-toc h2 { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 1rem; } .policy-toc ol { list-style: decimal; padding-left: 1.25rem; column-count: 1; } @media (min-width: 600px) { .policy-toc ol { column-count: 2; column-gap: 2rem; } } .policy-toc li { margin-bottom: 0.35rem; break-inside: avoid; } .policy-toc a { color: var(--color-link); text-decoration: none; font-size: 0.9375rem; transition: color 0.15s ease; } .policy-toc a:hover { color: var(--color-link-hover); text-decoration: underline; } /* \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 */ article.policy-body { display: flex; flex-direction: column; gap: 2.5rem; } .policy-section { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 2rem 2.5rem; box-shadow: var(--shadow); scroll-margin-top: 1.5rem; } .policy-section h2 { font-size: 1.25rem; font-weight: 700; color: var(--color-heading); margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--color-accent-light); display: flex; align-items: baseline; gap: 0.5rem; line-height: 1.3; } .section-number { font-size: 0.75rem; font-weight: 700; background: var(--color-accent); color: #fff; width: 1.5rem; height: 1.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; } .policy-section p { margin-bottom: 0.875rem; font-size: 0.9375rem; color: var(--color-text); } .policy-section p:last-child { margin-bottom: 0; } .policy-section ul { margin: 0.75rem 0 0.875rem 1.5rem; display: flex; flex-direction: column; gap: 0.35rem; } .policy-section ul li { font-size: 0.9375rem; color: var(--color-text); position: relative; } .policy-section ul li::marker { color: var(--color-accent); } /* \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 */ .policy-footer { margin-top: 3rem; padding: 1.5rem 2rem; border-top: 1px solid var(--color-border); text-align: center; font-size: 0.8125rem; color: var(--color-text-muted); display: flex; flex-direction: column; gap: 0.35rem; } .policy-footer a { color: var(--color-link); text-decoration: none; } .policy-footer a:hover { text-decoration: underline; } /* \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 */ @media print { :root { --color-bg: #fff; --color-surface: #fff; --color-border: #d1d5db; --color-text: #000; --color-text-muted: #374151; --color-accent: #16a34a; --color-accent-light: #f0fdf4; --color-heading: #064e3b; --color-link: #15803d; } body { padding: 0; font-size: 10pt; } .policy-wrapper { max-width: 100%; } .policy-toc { break-inside: avoid; } .policy-section { break-inside: avoid; box-shadow: none; border: 1px solid #d1d5db; } .policy-toc ol { column-count: 2; } .policy-footer { border-top: 1px solid #d1d5db; } a { color: inherit; text-decoration: none; } } `;function j(o){return `${B}${_(o)}${M}`.trim()}function V(o,i){var p,v,f,D;let s=(i==null?void 0:i.includeStyles)!==false,e=(p=i==null?void 0:i.customCSS)!=null?p:"",r=(v=i==null?void 0:i.theme)!=null?v:"light",a=o.sections.filter(g=>g.included),t=b(o.organizationInfo.name||"Organisation"),d=b(o.title||"Privacy Policy"),n=b(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"}),x=o.lastUpdated?new Date(o.lastUpdated).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):m,h=(f=o.organizationInfo.website)!=null?f:"",y=A(h),z=h?y?`<a href="${b(y)}" target="_blank" rel="noopener">${b(h)}</a>`:b(h):"",w=(D=o.organizationInfo.privacyEmail)!=null?D:"",$=w?A(`mailto:${w}`):"",T=w?$?`<a href="${b($)}">${b(w)}</a>`:b(w):"",k=` <nav class="policy-toc" aria-label="Table of Contents"> <h2>Table of Contents</h2> <ol> ${a.map((g,P)=>` <li><a href="#${O(g.title)}">${b(g.title)}</a></li>`).join(` `)} </ol> </nav>`,l=a.map((g,P)=>{let C=O(g.title),L=g.template||g.defaultContent||"",F=H(L,{variableValues:o.variableValues,organizationInfo:o.organizationInfo}),I=R(F);return ` <section class="policy-section" id="${C}" aria-labelledby="section-heading-${C}"> <h2 id="section-heading-${C}"> <span class="section-number" aria-hidden="true">${P+1}</span> ${b(g.title)} </h2> ${I} </section>`}).join(` `),c=e?e.replace(/<\/style>/gi,""):"",u=s?`<style> ${j(r)} ${c?` /* \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 */ ${c}`:""} </style>`:c?`<style>${c}</style>`:"";return `<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="description" content="Privacy Policy for ${t}" /> <meta name="generator" content="NDPA Toolkit" /> <title>${d} \u2014 ${t}</title> ${u} </head> <body> <div class="policy-wrapper"> <header class="policy-header"> <h1>${d}</h1> <div class="policy-meta"> <span><strong>Organisation:</strong> ${t}</span> <span><strong>Effective:</strong> ${m}</span> <span><strong>Version:</strong> ${n}</span> ${x!==m?`<span><strong>Last updated:</strong> ${x}</span>`:""} </div> <div> <span class="compliance-badge" role="img" aria-label="NDPA compliant">&#10003; NDPA 2023 Compliant</span> </div> </header> ${k} <article class="policy-body" aria-label="Policy content"> ${l} </article> <aside class="policy-legal-notice" role="note" aria-label="Legal notice"> <h2>Important Notice</h2> <p>${b(chunkZVOIR4QH_js.b)}</p> </aside> <footer class="policy-footer" role="contentinfo"> <div>${t}${z?` &mdash; ${z}`:""}</div> ${T?`<div>Privacy contact: ${T}</div>`:""} <div>Effective ${m} &bull; Version ${n}</div> <div>Generated by <strong>NDPA Toolkit</strong> &mdash; Nigeria Data Protection Act 2023</div> </footer> </div> </body> </html>`}function X(o){return o.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function U(o){let i=o.sections.filter(d=>d.included),s=o.title||"Privacy Policy",e=o.organizationInfo.name||"Organisation",r=o.version||"1.0",a=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(`# ${s}`),t.push(""),t.push(`_Effective: ${a} | 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(""),i.length>0&&(t.push("## Table of Contents"),t.push(""),i.forEach((d,n)=>{let m=X(`${n+1} ${d.title}`);t.push(`${n+1}. [${d.title}](#${m})`);}),t.push(""),t.push("---"),t.push("")),i.forEach((d,n)=>{t.push(`## ${n+1}. ${d.title}`),t.push("");let m=(d.template||d.defaultContent||"").trim();if(m){let x=m.split(` `);for(let h of x){let y=h.trimEnd();y.startsWith("-")||y.startsWith("\u2022")||y===""?t.push(y.replace(/^•/,"-")):t.push(y);}}t.push(""),t.push("---"),t.push("");}),t.push("## Important Notice"),t.push(""),t.push(chunkZVOIR4QH_js.b),t.push(""),t.push("---"),t.push(""),t.push(`_Generated by **NDPA Toolkit** \u2014 ${e} \u2022 Version ${r}_`),t.push(""),t.join(` `)}function Y(o,i){return chunkRFPLZDIO_js.d(this,null,function*(){var k;let s;try{let l=yield import('jspdf');s=(k=l.jsPDF)!=null?k:l.default;}catch(l){throw new Error(`[ndpr-toolkit] PDF export requires the "jspdf" package. Install it with: pnpm add jspdf See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let e=new s({unit:"mm",format:"a4"}),r=e.internal.pageSize.getWidth(),a=e.internal.pageSize.getHeight(),t=20,d=r-t*2,n=t,m=o.organizationInfo.name||"",x=o.title||"Privacy Policy",h=o.version||"1.0",y=o.effectiveDate?new Date(o.effectiveDate).toLocaleDateString():new Date().toLocaleDateString(),z=()=>{e.setFontSize(8),e.setFont("helvetica","italic"),e.setTextColor(150,150,150),e.text(m?`${m} \u2014 ${x}`:x,t,12),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,14,r-t,14),e.setTextColor(0,0,0);},w=l=>{n+l>a-t-10&&(e.addPage(),n=t+8,z());};if((i==null?void 0:i.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 l=e.splitTextToSize(x,d-10),c=72;l.forEach(p=>{e.text(p,r/2,c,{align:"center"}),c+=11;}),e.setDrawColor(22,163,74),e.setLineWidth(.6);let u=c+6;if(e.line(r/2-30,u,r/2+30,u),e.setFontSize(14),e.setFont("helvetica","normal"),e.setTextColor(40,40,40),e.text(m,r/2,u+14,{align:"center"}),e.setFontSize(10),e.setTextColor(100,100,100),e.text(`Effective Date: ${y}`,r/2,u+26,{align:"center"}),e.text(`Version ${h}`,r/2,u+34,{align:"center"}),(i==null?void 0:i.includeComplianceBadge)!==false){let p=u+52,v="Compliant with the Nigeria Data Protection Act (NDPA) 2023";e.setFontSize(8.5),e.setFont("helvetica","bold"),e.setTextColor(255,255,255);let f=e.getTextWidth(v),D=7,g=3.5,P=(r-f-D*2)/2;e.setFillColor(22,163,74),e.roundedRect(P,p-g-1,f+D*2,7+g,2,2,"F"),e.text(v,r/2,p+1.5,{align:"center"}),e.setTextColor(0,0,0);}e.setFillColor(22,163,74),e.rect(0,a-12,r,12,"F"),e.addPage(),n=t+8,z();}let $=o.sections.filter(l=>l.included);(i==null?void 0:i.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),$.forEach((l,c)=>{w(7);let u=`${c+1}. ${l.title}`;e.text(u,t+4,n),n+=6.5;}),e.addPage(),n=t+8,z()),$.forEach((l,c)=>{w(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(l.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 u=(l.template||l.defaultContent||"").trim();if(u){let p=u.split(` `);e.setFontSize(9.5),e.setFont("helvetica","normal"),e.setTextColor(50,50,50),p.forEach(v=>{let f=v.trimEnd();if(f===""){n+=3;return}let D=f.startsWith("-")||f.startsWith("\u2022"),g=D?t+8:t+4,P=D?f.replace(/^[-•]\s*/,""):f,C=d-(D?12:8);e.splitTextToSize(P,C).forEach((F,I)=>{w(5),D&&I===0&&(e.setFillColor(22,163,74),e.circle(t+4,n-1,.9,"F")),e.text(F,g,n),n+=5;});});}n+=10;}),n>a-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(chunkZVOIR4QH_js.b,d).forEach(l=>{n>a-20&&(e.addPage(),n=t),e.text(l,t,n),n+=5;}),e.setTextColor(0,0,0);let E=e.getNumberOfPages();for(let l=1;l<=E;l++)e.setPage(l),e.setFontSize(7.5),e.setFont("helvetica","normal"),e.setTextColor(160,160,160),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,a-12,r-t,a-12),e.text(m?`${m} \u2014 Privacy Policy`:"Privacy Policy",t,a-8),e.text(`Page ${l} of ${E}`,r-t,a-8,{align:"right"}),e.setTextColor(0,0,0);return e.setProperties({title:x,author:m,subject:"Privacy Policy \u2014 NDPA 2023 Compliant",keywords:"privacy policy, NDPA, Nigeria, data protection"}),e.output("blob")})}function q(o,i){return chunkRFPLZDIO_js.d(this,null,function*(){let s;try{s=yield import('docx');}catch(p){throw new Error(`[ndpr-toolkit] Word export requires the "docx" package. Install it with: pnpm add docx See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let{Document:e,Paragraph:r,TextRun:a,HeadingLevel:t,Packer:d,Header:n,Footer:m,PageNumber:x,AlignmentType:h,BorderStyle:y,ShadingType:z,TableOfContents:w}=s,$=o.organizationInfo.name||"",T=o.title||"Privacy Policy",E=o.version||"1.0",k=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"}),l=o.sections.filter(p=>p.included),c=[];if(c.push(new r({children:[new a({text:T,bold:true,size:52,color:"064e3b"})],heading:t.TITLE,spacing:{after:160},alignment:h.CENTER})),c.push(new r({children:[new a({text:`${$}${$?" \u2022 ":""}Version ${E} \u2022 Effective ${k}`,size:20,color:"6b7280",italics:true})],spacing:{after:120},alignment:h.CENTER})),c.push(new r({children:[new a({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:y.SINGLE,size:6,space:1}}})),(i==null?void 0:i.includeTOC)!==false){if(c.push(new r({children:[new a({text:"Table of Contents",bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200}})),typeof w=="function")try{c.push(new w("Table of Contents",{hyperlink:!0,headingStyleRange:"1-1"}));}catch(p){l.forEach((v,f)=>{c.push(new r({children:[new a({text:`${f+1}. ${v.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});}else l.forEach((p,v)=>{c.push(new r({children:[new a({text:`${v+1}. ${p.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});c.push(new r({children:[],pageBreakBefore:true}));}l.forEach((p,v)=>{c.push(new r({children:[new a({text:`${v+1}. ${p.title}`,bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200},border:{bottom:{color:"dcfce7",style:y.SINGLE,size:4,space:1}}}));let f=(p.template||p.defaultContent||"").trim();f&&f.split(` `).forEach(g=>{let P=g.trimEnd();if(P===""){c.push(new r({children:[],spacing:{after:60}}));return}let C=P.startsWith("- ")||P.startsWith("\u2022 "),L=C?P.replace(/^[-•]\s*/,""):P;C?c.push(new r({children:[new a({text:L,size:22})],spacing:{after:80},bullet:{level:0}})):c.push(new r({children:[new a({text:L,size:22})],spacing:{after:100}}));});}),c.push(new r({heading:t.HEADING_1,children:[new a({text:"Important Notice",bold:true})],spacing:{before:600,after:200}}),new r({children:[new a({text:chunkZVOIR4QH_js.b,size:18,color:"4b5563",italics:true})],spacing:{after:200}})),c.push(new r({children:[new a({text:`Generated by NDPA Toolkit \u2014 ${$}${$?" \u2014 ":""}Privacy Policy v${E}`,size:16,color:"9ca3af",italics:true})],spacing:{before:600},alignment:h.CENTER}));let u=new e({title:T,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 a({text:$||"Privacy Policy",size:16,color:"9ca3af"})],alignment:h.RIGHT})]})},footers:{default:new m({children:[new r({children:[new a({text:"Page ",size:16,color:"9ca3af"}),new a({children:[x.CURRENT],size:16,color:"9ca3af"}),new a({text:" of ",size:16,color:"9ca3af"}),new a({children:[x.TOTAL_PAGES],size:16,color:"9ca3af"})],alignment:h.CENTER})]})},children:c}]});return d.toBlob(u)})}exports.a=V;exports.b=U;exports.c=Y;exports.d=q;