1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[135],{41671:function(e,a,t){t.d(a,{Z:function(){return s}});let s=(0,t(79205).Z)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},50091:function(e,a,t){t.d(a,{Z:function(){return s}});let s=(0,t(79205).Z)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},56161:function(e,a,t){t.d(a,{e:function(){return l}});var s=t(57437),i=t(49586),o=t(75060),r=t(23675),n=t(59596),c=t(29501);let l=e=>{let{delay:a=.4}=e,{watch:t,setValue:l}=(0,c.Gc)(),{t:d}=(0,i.Q)();return(0,s.jsxs)(n.E.div,{className:"space-y-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:a},children:[(0,s.jsxs)(o._,{children:[d("main.dashboard.documents.additionalContext","Additional Context"),(0,s.jsx)("span",{className:"ml-1.5 text-[10px] font-normal text-muted-foreground/70 uppercase tracking-wide",children:"optional"})]}),(0,s.jsx)(r.g,{value:t("additionalContext")??"",onChange:e=>l("additionalContext",e.target.value),placeholder:d("main.dashboard.documents.additionalContextPlaceholder","Any extra details, preferences, or instructions you want the AI to consider when generating your document..."),rows:3})]})}},30135:function(e,a,t){t.r(a),t.d(a,{DataProtectionPolicyForm:function(){return X}});var s=t(57437),i=t(85562),o=t(56014),r=t(22121),n=t(49586),c=t(75060),l=t(94589),d=t(23675),p=t(59596),m=t(50091),u=t(29501),h=t(15291),x=t(98420),y=t(56161),g=t(41671);function j(e){let{label:a,value:t}=e;return(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)("span",{className:"text-muted-foreground text-xs sm:text-sm",children:a}),(0,s.jsx)("span",{className:"font-medium text-right max-w-[50%] sm:max-w-[60%] truncate text-xs sm:text-sm",children:t})]})}var f=t(29202),b=t(93393),v=t(24586),N=t(68522),P=t(68997),D=t(62426),C=t(12381),w=t(9303),S=t(29510),T=t(91134),O=t(78922),R=t(4039),k=t(70381),A=t(78542),_=t(35932),E=t(13466),Z=t(62489);let I=Z.Ry({jurisdiction:Z.Z_().min(1,"Jurisdiction is required"),regulatoryAuthority:Z.Z_().optional(),hasDataProtectionOfficer:Z.O7(),dpoNameOrRole:Z.Z_().optional(),organisationRole:Z.Km(["controller","processor","both"])}),B=Z.Ry({dataSubjectCategories:Z.Z_().min(1,"Data subject categories are required"),personalDataTypes:Z.Z_().min(1,"Personal data types are required"),processingPurposes:Z.Z_().min(1,"Processing purposes are required"),processesSpecialCategoryData:Z.O7(),specialCategoryDetails:Z.Z_().optional(),processesChildrensData:Z.O7()}),G=Z.Ry({internationalTransfers:Z.O7(),transferDestinations:Z.Z_().optional(),retentionApproach:Z.Z_().optional(),breachNotificationTimeframe:Z.Z_().optional(),additionalContext:Z.Z_().optional()}),V=[I,B,G],Q=I.merge(B).merge(G);var F=t(13590),q=t(57586),z=t(82023),J=t(99376),M=t(2265),U=t(56976);let K=[{title:"Organisation",component:()=>{let{watch:e,setValue:a,formState:{errors:t}}=(0,u.Gc)(),{t:i}=(0,n.Q)(),o=e("hasDataProtectionOfficer");return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10",children:(0,s.jsx)(x.Z,{className:"h-5 w-5 text-primary"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:i("main.dashboard.documents.dataProtectionPolicy.organisation","Organisation & Jurisdiction")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:i("main.dashboard.documents.dataProtectionPolicy.organisationDescription","Set the legal context and governance structure for your policy.")})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)(p.E.div,{className:"space-y-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.05},children:[(0,s.jsxs)(c._,{children:[i("main.dashboard.documents.dataProtectionPolicy.jurisdiction","Jurisdiction / Applicable Law"),(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(d.g,{rows:2,value:e("jurisdiction")??"",onChange:e=>a("jurisdiction",e.target.value,{shouldValidate:!0}),placeholder:"e.g. United Kingdom (UK GDPR), European Union (GDPR), California (CCPA)"}),t.jurisdiction&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:t.jurisdiction.message})]}),(0,s.jsxs)(p.E.div,{className:"space-y-2",initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{duration:.3,delay:.1},children:[(0,s.jsxs)(c._,{children:[i("main.dashboard.documents.dataProtectionPolicy.regulatoryAuthority","Regulatory Authority"),(0,s.jsx)("span",{className:"ml-1.5 text-[10px] font-normal text-muted-foreground/70 uppercase tracking-wide",children:"optional"})]}),(0,s.jsx)(d.g,{rows:2,value:e("regulatoryAuthority")??"",onChange:e=>a("regulatoryAuthority",e.target.value),placeholder:"e.g. ICO (UK), CNIL (France), FTC (US)"})]}),(0,s.jsxs)(p.E.div,{className:"space-y-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.15},children:[(0,s.jsxs)(c._,{children:[i("main.dashboard.documents.dataProtectionPolicy.organisationRole","Organisation's Data Role"),(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsxs)(h.Ph,{value:e("organisationRole"),onValueChange:e=>a("organisationRole",e,{shouldValidate:!0}),children:[(0,s.jsx)(h.i4,{children:(0,s.jsx)(h.ki,{placeholder:"Select role"})}),(0,s.jsxs)(h.Bw,{children:[(0,s.jsx)(h.Ql,{value:"controller",children:i("main.dashboard.documents.dataProtectionPolicy.controller","Data Controller")}),(0,s.jsx)(h.Ql,{value:"processor",children:i("main.dashboard.documents.dataProtectionPolicy.processor","Data Processor")}),(0,s.jsx)(h.Ql,{value:"both",children:i("main.dashboard.documents.dataProtectionPolicy.both","Both Controller & Processor")})]})]}),t.organisationRole&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:t.organisationRole.message})]}),(0,s.jsxs)(p.E.div,{className:"flex items-center justify-between md:col-span-2 rounded-lg border p-4",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.2},children:[(0,s.jsxs)("div",{className:"space-y-0.5",children:[(0,s.jsx)(c._,{className:"text-sm font-medium",children:i("main.dashboard.documents.dataProtectionPolicy.hasDpo","Data Protection Officer (DPO)")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:i("main.dashboard.documents.dataProtectionPolicy.hasDpoDescription","Does your organisation have a designated DPO or equivalent role?")})]}),(0,s.jsx)(l.r,{checked:e("hasDataProtectionOfficer")??!1,onCheckedChange:e=>a("hasDataProtectionOfficer",e)})]}),o&&(0,s.jsxs)(p.E.div,{className:"space-y-2 md:col-span-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3},children:[(0,s.jsxs)(c._,{children:[i("main.dashboard.documents.dataProtectionPolicy.dpoNameOrRole","DPO Name or Role Title"),(0,s.jsx)("span",{className:"ml-1.5 text-[10px] font-normal text-muted-foreground/70 uppercase tracking-wide",children:"optional"})]}),(0,s.jsx)(d.g,{rows:2,value:e("dpoNameOrRole")??"",onChange:e=>a("dpoNameOrRole",e.target.value),placeholder:"e.g. Jane Smith, Head of Data Protection"})]})]})]})}},{title:"Data Processing",component:()=>{let{watch:e,setValue:a,formState:{errors:t}}=(0,u.Gc)(),{t:i}=(0,n.Q)(),o=e("processesSpecialCategoryData");return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10",children:(0,s.jsx)(m.Z,{className:"h-5 w-5 text-primary"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:i("main.dashboard.documents.dataProtectionPolicy.dataProcessing","Data Processing")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:i("main.dashboard.documents.dataProtectionPolicy.dataProcessingDescription","Describe the personal data your organisation processes and why.")})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,s.jsxs)(p.E.div,{className:"space-y-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.05},children:[(0,s.jsxs)(c._,{children:[i("main.dashboard.documents.dataProtectionPolicy.dataSubjectCategories","Data Subject Categories"),(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(d.g,{value:e("dataSubjectCategories")??"",onChange:e=>a("dataSubjectCategories",e.target.value,{shouldValidate:!0}),placeholder:"e.g. Customers, employees, contractors, suppliers, website visitors",rows:3}),t.dataSubjectCategories&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:t.dataSubjectCategories.message})]}),(0,s.jsxs)(p.E.div,{className:"space-y-2",initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{duration:.3,delay:.1},children:[(0,s.jsxs)(c._,{children:[i("main.dashboard.documents.dataProtectionPolicy.personalDataTypes","Types of Personal Data Collected"),(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(d.g,{value:e("personalDataTypes")??"",onChange:e=>a("personalDataTypes",e.target.value,{shouldValidate:!0}),placeholder:"e.g. Names, email addresses, phone numbers, payment details, employment records, IP addresses",rows:3}),t.personalDataTypes&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:t.personalDataTypes.message})]}),(0,s.jsxs)(p.E.div,{className:"space-y-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.15},children:[(0,s.jsxs)(c._,{children:[i("main.dashboard.documents.dataProtectionPolicy.processingPurposes","Processing Purposes"),(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsx)(d.g,{value:e("processingPurposes")??"",onChange:e=>a("processingPurposes",e.target.value,{shouldValidate:!0}),placeholder:"e.g. Service delivery, billing, customer support, marketing, legal compliance, analytics",rows:3}),t.processingPurposes&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:t.processingPurposes.message})]}),(0,s.jsxs)(p.E.div,{className:"flex items-center justify-between rounded-lg border p-4",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.2},children:[(0,s.jsxs)("div",{className:"space-y-0.5",children:[(0,s.jsx)(c._,{className:"text-sm font-medium",children:i("main.dashboard.documents.dataProtectionPolicy.specialCategory","Special Category Data")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:i("main.dashboard.documents.dataProtectionPolicy.specialCategoryDescription","Do you process sensitive data such as health, biometric, racial, religious, or political data?")})]}),(0,s.jsx)(l.r,{checked:e("processesSpecialCategoryData")??!1,onCheckedChange:e=>a("processesSpecialCategoryData",e)})]}),o&&(0,s.jsxs)(p.E.div,{className:"space-y-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3},children:[(0,s.jsxs)(c._,{children:[i("main.dashboard.documents.dataProtectionPolicy.specialCategoryDetails","Special Category Details"),(0,s.jsx)("span",{className:"ml-1.5 text-[10px] font-normal text-muted-foreground/70 uppercase tracking-wide",children:"optional"})]}),(0,s.jsx)(d.g,{value:e("specialCategoryDetails")??"",onChange:e=>a("specialCategoryDetails",e.target.value),placeholder:"e.g. Employee health records for occupational health, biometric data for access control",rows:2})]}),(0,s.jsxs)(p.E.div,{className:"flex items-center justify-between rounded-lg border p-4",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.25},children:[(0,s.jsxs)("div",{className:"space-y-0.5",children:[(0,s.jsx)(c._,{className:"text-sm font-medium",children:i("main.dashboard.documents.dataProtectionPolicy.childrensData","Children's Data")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:i("main.dashboard.documents.dataProtectionPolicy.childrensDataDescription","Does your organisation process personal data of children (under 13/16 depending on jurisdiction)?")})]}),(0,s.jsx)(l.r,{checked:e("processesChildrensData")??!1,onCheckedChange:e=>a("processesChildrensData",e)})]})]})]})}},{title:"Security & Transfers",component:()=>{let{watch:e,setValue:a}=(0,u.Gc)(),{t}=(0,n.Q)(),i=e("internationalTransfers");return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10",children:(0,s.jsx)(f.Z,{className:"h-5 w-5 text-primary"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:t("main.dashboard.documents.dataProtectionPolicy.securityTransfers","Security & Transfers")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:t("main.dashboard.documents.dataProtectionPolicy.securityTransfersDescription","Configure international transfers, retention, and breach response.")})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)(p.E.div,{className:"flex items-center justify-between md:col-span-2 rounded-lg border p-4",initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{duration:.3,delay:.05},children:[(0,s.jsxs)("div",{className:"space-y-0.5",children:[(0,s.jsx)(c._,{className:"text-sm font-medium",children:t("main.dashboard.documents.dataProtectionPolicy.internationalTransfers","International Data Transfers")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:t("main.dashboard.documents.dataProtectionPolicy.internationalTransfersDescription","Does your organisation transfer personal data outside your jurisdiction?")})]}),(0,s.jsx)(l.r,{checked:e("internationalTransfers")??!1,onCheckedChange:e=>a("internationalTransfers",e)})]}),i&&(0,s.jsxs)(p.E.div,{className:"space-y-2 md:col-span-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3},children:[(0,s.jsxs)(c._,{children:[t("main.dashboard.documents.dataProtectionPolicy.transferDestinations","Transfer Destinations"),(0,s.jsx)("span",{className:"ml-1.5 text-[10px] font-normal text-muted-foreground/70 uppercase tracking-wide",children:"optional"})]}),(0,s.jsx)(d.g,{value:e("transferDestinations")??"",onChange:e=>a("transferDestinations",e.target.value),placeholder:"e.g. United States (cloud hosting), India (customer support outsourcing)",rows:2})]}),(0,s.jsxs)(p.E.div,{className:"space-y-2 md:col-span-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.1},children:[(0,s.jsxs)(c._,{children:[t("main.dashboard.documents.dataProtectionPolicy.retentionApproach","Data Retention Approach"),(0,s.jsx)("span",{className:"ml-1.5 text-[10px] font-normal text-muted-foreground/70 uppercase tracking-wide",children:"optional"})]}),(0,s.jsx)(d.g,{value:e("retentionApproach")??"",onChange:e=>a("retentionApproach",e.target.value),placeholder:"e.g. Customer data: duration of relationship + 6 years. Employee data: per statutory requirements. Marketing data: until consent withdrawn.",rows:3})]}),(0,s.jsxs)(p.E.div,{className:"space-y-2",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.15},children:[(0,s.jsxs)(c._,{children:[t("main.dashboard.documents.dataProtectionPolicy.breachNotificationTimeframe","Breach Notification Timeframe"),(0,s.jsx)("span",{className:"ml-1.5 text-[10px] font-normal text-muted-foreground/70 uppercase tracking-wide",children:"optional"})]}),(0,s.jsx)(d.g,{rows:2,value:e("breachNotificationTimeframe")??"",onChange:e=>a("breachNotificationTimeframe",e.target.value),placeholder:"e.g. 72 hours (GDPR default)"})]})]})]})}},{title:"Review",component:()=>{let{watch:e}=(0,u.Gc)(),{t:a}=(0,n.Q)(),t=e("jurisdiction"),i=e("regulatoryAuthority"),o=e("organisationRole"),r=e("hasDataProtectionOfficer"),c=e("dpoNameOrRole"),l=e("dataSubjectCategories"),d=e("personalDataTypes"),m=e("processingPurposes"),h=e("processesSpecialCategoryData"),x=e("specialCategoryDetails"),f=e("processesChildrensData"),b=e("internationalTransfers"),v=e("transferDestinations"),N=e("retentionApproach"),P=e("breachNotificationTimeframe"),D=e("additionalContext");return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10",children:(0,s.jsx)(g.Z,{className:"h-5 w-5 text-primary"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-semibold",children:a("main.dashboard.documents.dataProtectionPolicy.review","Review & Generate")}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:a("main.dashboard.documents.dataProtectionPolicy.reviewDescription","Review your policy details before generating.")})]})]}),(0,s.jsxs)(p.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,delay:.05},className:"rounded-lg border bg-muted/30 p-3 sm:p-4 space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h4",{className:"text-sm font-semibold border-b pb-2",children:a("main.dashboard.documents.dataProtectionPolicy.organisationSection","Organisation & Jurisdiction")}),(0,s.jsxs)("div",{className:"space-y-1 text-sm",children:[(0,s.jsx)(j,{label:"Jurisdiction",value:t||"Not set"}),i&&(0,s.jsx)(j,{label:"Regulatory Authority",value:i}),(0,s.jsx)(j,{label:"Organisation Role",value:{controller:"Data Controller",processor:"Data Processor",both:"Both Controller & Processor"}[o]||o}),(0,s.jsx)(j,{label:"Has DPO",value:r?"Yes":"No"}),r&&c&&(0,s.jsx)(j,{label:"DPO",value:c})]})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h4",{className:"text-sm font-semibold border-b pb-2",children:a("main.dashboard.documents.dataProtectionPolicy.dataProcessingSection","Data Processing")}),(0,s.jsxs)("div",{className:"space-y-1 text-sm",children:[(0,s.jsx)(j,{label:"Data Subjects",value:l||"Not set"}),(0,s.jsx)(j,{label:"Data Types",value:d||"Not set"}),(0,s.jsx)(j,{label:"Purposes",value:m||"Not set"}),(0,s.jsx)(j,{label:"Special Category Data",value:h?"Yes":"No"}),h&&x&&(0,s.jsx)(j,{label:"Details",value:x}),(0,s.jsx)(j,{label:"Children's Data",value:f?"Yes":"No"})]})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h4",{className:"text-sm font-semibold border-b pb-2",children:a("main.dashboard.documents.dataProtectionPolicy.securitySection","Security & Transfers")}),(0,s.jsxs)("div",{className:"space-y-1 text-sm",children:[(0,s.jsx)(j,{label:"International Transfers",value:b?"Yes":"No"}),b&&v&&(0,s.jsx)(j,{label:"Destinations",value:v}),(0,s.jsx)(j,{label:"Retention Approach",value:N||"Default (per legal requirements)"}),(0,s.jsx)(j,{label:"Breach Notification",value:P||"Per jurisdiction default"})]})]}),D&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h4",{className:"text-sm font-semibold border-b pb-2",children:"Additional"}),(0,s.jsx)("div",{className:"space-y-1 text-sm",children:(0,s.jsx)(j,{label:"Additional Context",value:D})})]})]}),(0,s.jsx)(y.e,{})]})}}],L={jurisdiction:"",regulatoryAuthority:void 0,hasDataProtectionOfficer:!1,dpoNameOrRole:void 0,organisationRole:"controller",dataSubjectCategories:"",personalDataTypes:"",processingPurposes:"",processesSpecialCategoryData:!1,specialCategoryDetails:void 0,processesChildrensData:!1,internationalTransfers:!1,transferDestinations:void 0,retentionApproach:void 0,breachNotificationTimeframe:void 0,additionalContext:void 0},Y=U.ek?{...L,...U.BA}:L,$=e=>({jurisdiction:e.jurisdiction,...e.regulatoryAuthority&&{regulatoryAuthority:e.regulatoryAuthority},hasDataProtectionOfficer:String(e.hasDataProtectionOfficer),...e.dpoNameOrRole&&{dpoNameOrRole:e.dpoNameOrRole},organisationRole:e.organisationRole,dataSubjectCategories:e.dataSubjectCategories,personalDataTypes:e.personalDataTypes,processingPurposes:e.processingPurposes,processesSpecialCategoryData:String(e.processesSpecialCategoryData),...e.specialCategoryDetails&&{specialCategoryDetails:e.specialCategoryDetails},processesChildrensData:String(e.processesChildrensData),internationalTransfers:String(e.internationalTransfers),...e.transferDestinations&&{transferDestinations:e.transferDestinations},...e.retentionApproach&&{retentionApproach:e.retentionApproach},...e.breachNotificationTimeframe&&{breachNotificationTimeframe:e.breachNotificationTimeframe},...e.additionalContext&&{additionalContext:e.additionalContext}}),H={jurisdiction:e=>e.location??e.answers?.country??void 0},W={0:["jurisdiction","regulatoryAuthority","hasDataProtectionOfficer","dpoNameOrRole","organisationRole"],1:["dataSubjectCategories","personalDataTypes","processingPurposes","processesSpecialCategoryData","specialCategoryDetails","processesChildrensData"],2:["internationalTransfers","transferDestinations","retentionApproach","breachNotificationTimeframe"],3:[]},X=e=>{let{templateKey:a,banner:t}=e,{data:c,isPending:l}=(0,_.w)(a),{mutation:d}=(0,R.W)(),m=(0,J.useRouter)(),h=(0,E.$)(),{t:x}=(0,n.Q)(),{selectedBusinessId:y}=(0,S.t)(),{data:g}=(0,O.M)(a,y),j=(0,k.$)(K),[f,Z]=(0,M.useState)(!1),[I,B]=(0,M.useState)(!1),G=(0,u.cI)({resolver:(0,F.F)(Q),defaultValues:Y,mode:"onChange"}),{status:U}=(0,A.B)(G,H,a),{mutation:L}=(0,T.e)(),[X,ee]=(0,M.useState)(!1),ea=y&&!X?(0,s.jsxs)(C.z,{type:"button",size:"sm",onClick:()=>{y&&L.mutate({templateKey:a,businessId:y},{onSuccess:e=>{for(let[a,t]of Object.entries(e.values))G.setValue(a,t,{shouldValidate:!1});ee(!0)}})},disabled:L.isPending,className:"relative gap-1.5 overflow-hidden bg-[#3730a3] text-white hover:bg-[#312e81] dark:bg-indigo-500 dark:hover:bg-indigo-400",children:[(0,s.jsx)("div",{className:"absolute inset-0 animate-bar-shimmer bg-gradient-to-r from-transparent via-white/20 to-transparent"}),(0,s.jsx)(z.Z,{className:"h-3.5 w-3.5"}),(0,s.jsx)(P.Z,{isPending:L.isPending,defaultText:"AI Autofill",loadingText:"Filling...",spinnerColor:"#ffffff",spinnerSize:12})]}):null,et=async()=>
1{if(j.isOnBusinessStep)return;let e=W[j.formStepIndex]??[];if(!await G.trigger(e))return;let a=V[j.formStepIndex];if(a){let e=a.safeParse(G.getValues());if(!e.success){for(let a of e.error.issues){let e=a.path.join(".");e&&G.setError(e,{message:a.message})}return}}j.handleNext()},es=async(e,t,s)=>{if(!c||!y)return;let i=$(G.getValues());try{let o=await d.mutateAsync({templateId:c.id,title:e,answers:i,model:t,language:s,businessId:y??void 0,templateKey:a,isPaidGeneration:!!g&&!g.isFreeGeneration});o.success&&o.data?.documentId&&(B(!0),m.push(h(`/customer/dashboard/documents/view/${o.data.documentId}`)))}catch{}};if(l||!c||"loading"===U)return(0,s.jsx)(b.o,{});let ei=j.isOnBusinessStep,eo=ei?null:K[j.formStepIndex]?.component;return(0,s.jsxs)(D._,{title:(0,s.jsx)(w.g,{children:x("main.dashboard.documents.dataProtectionPolicy.title","Data Protection Policy")}),description:c.description,banner:t,headerActions:ea,children:[(0,s.jsxs)("div",{className:"space-y-6 rounded-lg bg-white p-4 pb-20 dark:bg-zinc-950 sm:p-0 sm:pb-20 sm:bg-transparent sm:dark:bg-transparent",children:[(0,s.jsx)(N.c,{steps:j.steps,currentStep:j.currentStep}),(0,s.jsx)(u.RV,{...G,children:(0,s.jsx)("div",{className:"relative min-h-[400px]",children:(0,s.jsx)(q.M,{mode:"wait",custom:j.direction,children:(0,s.jsx)(p.E.div,{custom:j.direction,initial:{x:60*j.direction,opacity:0},animate:{x:0,opacity:1},exit:{x:-60*j.direction,opacity:0},transition:{duration:.25,ease:"easeInOut"},children:(0,s.jsx)(i.Z,{delay:.05,children:ei?(0,s.jsx)(o.p,{templateLabel:c.title,onComplete:j.handleBusinessStepComplete}):eo&&(0,s.jsx)(eo,{})})},j.currentStep)})})}),(0,s.jsx)(v.m,{currentStep:j.currentStep,totalSteps:j.steps.length,onBack:j.handleBack,onNext:et,onGenerate:()=>Z(!0),hideNext:ei,onBackToSelection:()=>m.back()})]}),(0,s.jsx)(r.$,{open:f,onOpenChange:Z,onConfirm:es,isPending:d.isPending,isRedirecting:I,templateTitle:c.title,defaultTitle:c.title,sectionCount:c.sections?.length??0,isFreeGeneration:g?.isFreeGeneration??!1,creditCost:g?.creditCost??c.creditCost??0,canCreate:g?.canCreate??!1})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.