@consenti/api 0.3.0 → 0.5.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 (127) hide show
  1. package/README.md +212 -74
  2. package/dist/chunk-COR72NFQ.js +2 -0
  3. package/dist/chunk-COR72NFQ.js.map +1 -0
  4. package/dist/chunk-S2IEYESR.js +2 -0
  5. package/dist/chunk-S2IEYESR.js.map +1 -0
  6. package/dist/dashboard/assets/ApiConfig-dmDLJNfI.js +1 -0
  7. package/dist/dashboard/assets/ArchivedProfileList-ChWp1RHE.js +1 -0
  8. package/dist/dashboard/assets/AuditLog-3lekUOk8.js +1 -0
  9. package/dist/dashboard/assets/ChangePassword-BYlF08cE.js +1 -0
  10. package/dist/dashboard/assets/ConfirmDialog-sMBVcbiI.js +1 -0
  11. package/dist/dashboard/assets/ConsentList-DLDBSjxO.js +1 -0
  12. package/dist/dashboard/assets/ConsentTemplateEditor-0iB6G95-.js +1 -0
  13. package/dist/dashboard/assets/ConsentTemplateList-BnU_nL8h.js +1 -0
  14. package/dist/dashboard/assets/HeadingTagInput-7owwn9Vj.js +1 -0
  15. package/dist/dashboard/assets/HowItWorks-B05y-6xX.js +1 -0
  16. package/dist/dashboard/assets/PermissionGate-D45f3WrO.js +1 -0
  17. package/dist/dashboard/assets/PreviewPane-Czax39la.js +38 -0
  18. package/dist/dashboard/assets/ProfileEditor-CuMRNzdM.js +2 -0
  19. package/dist/dashboard/assets/ProfileList-CFZ_i1zk.js +1 -0
  20. package/dist/dashboard/assets/ProfileVersionHistory-40HtQSrd.js +3 -0
  21. package/dist/dashboard/assets/RecordDetailModal-hpJgK02E.js +1 -0
  22. package/dist/dashboard/assets/Reports-BlvcycZ8.js +1 -0
  23. package/dist/dashboard/assets/RoleList-CTeQdx6f.js +1 -0
  24. package/dist/dashboard/assets/Select-CeC6GRyb.js +1 -0
  25. package/dist/dashboard/assets/Settings-DLsvGtMh.js +1 -0
  26. package/dist/dashboard/assets/SetupWizard-BVzGrBm2.js +1 -0
  27. package/dist/dashboard/assets/Table-CcBP7eXS.js +1 -0
  28. package/dist/dashboard/assets/TenantList-DLgPnlVv.js +1 -0
  29. package/dist/dashboard/assets/UITemplateEditor-B9EBcvOB.js +2 -0
  30. package/dist/dashboard/assets/UITemplateList-CGYRRlCh.js +1 -0
  31. package/dist/dashboard/assets/UserList-BbpiUrVr.js +1 -0
  32. package/dist/dashboard/assets/VendorList-mlOlW7ht.js +1 -0
  33. package/dist/dashboard/assets/VisitorList-Dne7xkNx.js +1 -0
  34. package/dist/dashboard/assets/check-IM5PInrX.js +1 -0
  35. package/dist/dashboard/assets/copy-FTaGH7-z.js +1 -0
  36. package/dist/dashboard/assets/de-jwngydrC.js +25 -0
  37. package/dist/dashboard/assets/dist-GoiMJCTt.js +1 -0
  38. package/dist/dashboard/assets/es-B6Jp0OPe.js +25 -0
  39. package/dist/dashboard/assets/external-link-5y29qnhn.js +1 -0
  40. package/dist/dashboard/assets/fr-CshYcQPW.js +25 -0
  41. package/dist/dashboard/assets/index-BaYVhd1M.js +26 -0
  42. package/dist/dashboard/assets/index-Cr5M1Qy_.css +2 -0
  43. package/dist/dashboard/assets/ja-CgjZNBrc.js +25 -0
  44. package/dist/dashboard/assets/profiles-D-hvl_fK.js +1 -0
  45. package/dist/dashboard/assets/roles-DZyZwZDr.js +1 -0
  46. package/dist/dashboard/assets/rotate-ccw-clock-C5cVu2_f.js +1 -0
  47. package/dist/dashboard/assets/search-mdMD-WTj.js +1 -0
  48. package/dist/dashboard/assets/square-pen-BoEcHaSW.js +1 -0
  49. package/dist/dashboard/assets/templates-CIyMjskA.js +1 -0
  50. package/dist/dashboard/assets/templates-DLMsZs7d.js +1 -0
  51. package/dist/dashboard/assets/trash-BVDX09Xe.js +1 -0
  52. package/dist/dashboard/assets/useHashQuery-wXzkY-tk.js +1 -0
  53. package/dist/dashboard/assets/users-BLTbK4tk.js +1 -0
  54. package/dist/dashboard/assets/x-CtCy0YcJ.js +1 -0
  55. package/dist/dashboard/assets/zh-CN-BnLZkfBC.js +25 -0
  56. package/dist/dashboard/index.html +2 -4
  57. package/dist/dist-QJYW5KUK.js +2 -0
  58. package/dist/index.cjs +69 -68
  59. package/dist/index.cjs.map +1 -1
  60. package/dist/index.d.cts +271 -100
  61. package/dist/index.d.ts +271 -100
  62. package/dist/index.js +67 -66
  63. package/dist/index.js.map +1 -1
  64. package/dist/profiles-FCX454HS.js +2 -0
  65. package/dist/widget/widget.css +1 -1
  66. package/dist/widget/widget.js +1 -1
  67. package/package.json +27 -12
  68. package/dist/chunk-IY4L6MNB.js +0 -2
  69. package/dist/chunk-IY4L6MNB.js.map +0 -1
  70. package/dist/chunk-O5UG4OYI.js +0 -2
  71. package/dist/chunk-O5UG4OYI.js.map +0 -1
  72. package/dist/dashboard/assets/ApiConfig-CE-Noelz.js +0 -1
  73. package/dist/dashboard/assets/ArchivedProfileList-Bw-fx-BD.js +0 -1
  74. package/dist/dashboard/assets/AuditLog-D6HiTQ1o.js +0 -1
  75. package/dist/dashboard/assets/ChangePassword-D2rPkzD1.js +0 -1
  76. package/dist/dashboard/assets/ConfirmDialog-DTtw7VJ-.js +0 -1
  77. package/dist/dashboard/assets/ConsentList-BWOvPOMG.js +0 -1
  78. package/dist/dashboard/assets/ConsentTemplateEditor-BKIEnLmA.js +0 -1
  79. package/dist/dashboard/assets/ConsentTemplateList-DCys2nM3.js +0 -1
  80. package/dist/dashboard/assets/HeadingTagInput-BTjrdzlS.js +0 -1
  81. package/dist/dashboard/assets/HowItWorks-AeyjfQGO.js +0 -1
  82. package/dist/dashboard/assets/PermissionGate-Bhhf7SMh.js +0 -1
  83. package/dist/dashboard/assets/PreviewPane-Dq5K1h2L.js +0 -35
  84. package/dist/dashboard/assets/ProfileEditor-BXtaE0tL.js +0 -2
  85. package/dist/dashboard/assets/ProfileList-CWKSAgu0.js +0 -1
  86. package/dist/dashboard/assets/ProfileVersionHistory-1h8sUgog.js +0 -3
  87. package/dist/dashboard/assets/RecordDetailModal-FaFhzQXi.js +0 -1
  88. package/dist/dashboard/assets/Reports-DWEjQOKh.js +0 -1
  89. package/dist/dashboard/assets/RoleList-BSGoqlzp.js +0 -1
  90. package/dist/dashboard/assets/Select-DjJNwlbY.js +0 -1
  91. package/dist/dashboard/assets/Settings-CVYrlyLm.js +0 -1
  92. package/dist/dashboard/assets/SetupWizard-4NTb5bZj.js +0 -1
  93. package/dist/dashboard/assets/Table-DH_jh8_N.js +0 -1
  94. package/dist/dashboard/assets/TenantList-5AwFtoHf.js +0 -1
  95. package/dist/dashboard/assets/UITemplateEditor-9A55scBe.js +0 -1
  96. package/dist/dashboard/assets/UITemplateList-BS7X4u4F.js +0 -1
  97. package/dist/dashboard/assets/UserList-SPkMyFRy.js +0 -1
  98. package/dist/dashboard/assets/VendorList-C5fPhr6U.js +0 -1
  99. package/dist/dashboard/assets/VisitorList-COP1SyNd.js +0 -1
  100. package/dist/dashboard/assets/check-o5cp1s2J.js +0 -1
  101. package/dist/dashboard/assets/client-ymc9nwWr.js +0 -1
  102. package/dist/dashboard/assets/copy-C01KoUUH.js +0 -1
  103. package/dist/dashboard/assets/createLucideIcon-MdjI3m3u.js +0 -1
  104. package/dist/dashboard/assets/de-DET92Jb5.js +0 -5
  105. package/dist/dashboard/assets/dist-DlhLroYC.js +0 -1
  106. package/dist/dashboard/assets/es-CJNunrnU.js +0 -5
  107. package/dist/dashboard/assets/external-link-DVe00ZBK.js +0 -1
  108. package/dist/dashboard/assets/fr-akfTuf5x.js +0 -5
  109. package/dist/dashboard/assets/history-CHTts_m2.js +0 -1
  110. package/dist/dashboard/assets/index-DW3qOrry.css +0 -2
  111. package/dist/dashboard/assets/index-H_Zm0X-u.js +0 -6
  112. package/dist/dashboard/assets/ja-B0nLWkOd.js +0 -5
  113. package/dist/dashboard/assets/profiles-DmrdGv7t.js +0 -1
  114. package/dist/dashboard/assets/roles-C0dJPFl4.js +0 -1
  115. package/dist/dashboard/assets/search-Bd2RdDRh.js +0 -1
  116. package/dist/dashboard/assets/templates-B2xiivh4.js +0 -1
  117. package/dist/dashboard/assets/templates-CnMoLavN.js +0 -1
  118. package/dist/dashboard/assets/trash-2-BBnkdgm_.js +0 -1
  119. package/dist/dashboard/assets/trash-Dj1jhzHJ.js +0 -1
  120. package/dist/dashboard/assets/useHashQuery-B5ytMIMp.js +0 -1
  121. package/dist/dashboard/assets/users-czK8LRVh.js +0 -1
  122. package/dist/dashboard/assets/x-BRuyBEQP.js +0 -1
  123. package/dist/dashboard/assets/zh-CN-Dxg3G-BL.js +0 -5
  124. package/dist/dist-Z5RVTVBT.js +0 -2
  125. package/dist/profiles-XTYPWLVC.js +0 -2
  126. /package/dist/{dist-Z5RVTVBT.js.map → dist-QJYW5KUK.js.map} +0 -0
  127. /package/dist/{profiles-XTYPWLVC.js.map → profiles-FCX454HS.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/utils/src/methods/debounce.ts","../../../packages/utils/src/methods/throttle.ts","../../../packages/utils/src/compliance.ts","../../../packages/utils/src/tracker-knowledge-base.ts","../../../packages/utils/src/content-doc.ts","../../../packages/utils/src/tcf.ts","../../../packages/utils/src/direction.ts"],"sourcesContent":["type AnyFunction = (this: any, ...args: any[]) => any;\n\n/**\n * Creates a debounced version of a function.\n *\n * A debounced function delays execution until after the specified delay has\n * elapsed since the last invocation. Each new call resets the timer.\n *\n * This is useful for events that fire frequently, such as:\n * - Search input\n * - Window resize\n * - Auto-save\n * - API requests\n *\n * @template T - Type of the function being debounced.\n *\n * @param fn - The function to debounce.\n * @param delay - Delay in milliseconds to wait after the last invocation.\n *\n * @returns A debounced function with the same parameter types as the original.\n *\n * @example\n * ```ts\n * const search = debounce((query: string) => {\n * console.log(query);\n * }, 300);\n *\n * search(\"r\");\n * search(\"re\");\n * search(\"react\");\n * // Only \"react\" is logged after 300ms.\n * ```\n */\nexport function debounce<T extends AnyFunction>(\n fn: T,\n delay: number\n) {\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n return function (\n this: ThisParameterType<T>,\n ...args: Parameters<T>\n ): void {\n if (timer !== undefined) {\n clearTimeout(timer);\n }\n\n timer = setTimeout(() => {\n fn.apply(this, args);\n }, delay);\n };\n}","type AnyFunction = (this: any, ...args: any[]) => any;\n\n/**\n * Creates a throttled version of a function.\n *\n * A throttled function executes immediately and then ignores subsequent calls\n * until the specified delay has passed.\n *\n * This is useful for events that fire continuously, such as:\n * - Scroll\n * - Mouse move\n * - Window resize\n * - Drag events\n *\n * @template T - Type of the function being throttled.\n *\n * @param fn - The function to throttle.\n * @param delay - Minimum time in milliseconds between executions.\n *\n * @returns A throttled function with the same parameter types as the original.\n *\n * @example\n * ```ts\n * const onScroll = throttle(() => {\n * console.log(\"Scrolled\");\n * }, 200);\n *\n * window.addEventListener(\"scroll\", onScroll);\n * ```\n */\nexport function throttle<T extends AnyFunction>(\n fn: T,\n delay: number\n) {\n let lastCall = 0;\n\n return function (\n this: ThisParameterType<T>,\n ...args: Parameters<T>\n ): void {\n const now = Date.now();\n\n if (now - lastCall >= delay) {\n lastCall = now;\n fn.apply(this, args);\n }\n };\n}","/**\n * Single source of truth for all compliance groups, regulations, and country mappings.\n *\n * This is DATA, not types. The `Compliance` and `ComplianceGroupId` literal types\n * derived from the ID arrays below live in @consenti/types (packages/types/src/compliance.ts),\n * via a type-only import — that keeps @consenti/types free of runtime code.\n *\n * ─── HOW TO UPDATE ────────────────────────────────────────────────────────────\n *\n * ADD A NEW REGULATION:\n * 1. Add regulation ID string to `COMPLIANCE_REGULATION_IDS` below\n * (the `Compliance` type in @consenti/types auto-updates from it).\n * 2. Add it to the appropriate group's `compliances` array below.\n * 3. Add / update the country entry in `EMBEDDED_COMPLIANCE_MAP` below.\n * That is all — no other files need touching.\n *\n * ADD A NEW COMPLIANCE GROUP:\n * 1. Add the kebab-case ID to `COMPLIANCE_GROUP_IDS` below.\n * 2. Add a full group entry to `COMPLIANCE_GROUPS` below (label, compliances, flags).\n * 3. Add a validation rule set to `COMPLIANCE_VALIDATION_RULES` below.\n * 4. Map affected countries in `EMBEDDED_COMPLIANCE_MAP` to the new group.\n *\n * ADD OR UPDATE A COUNTRY:\n * Edit the entry in `EMBEDDED_COMPLIANCE_MAP.countries` below. That is the ONLY\n * place that needs changing for country-level jurisdiction updates.\n */\n\n// ─── Regulation IDs ───────────────────────────────────────────────────────────\n\nexport const COMPLIANCE_REGULATION_IDS = [\n // European Union\n 'gdpr', 'eprivacy',\n // United Kingdom\n 'uk-gdpr', 'pecr',\n // Switzerland\n 'revfadp',\n // Turkey\n 'kvkk',\n // North America — Canada\n 'pipeda', 'law25',\n // North America — US (California)\n 'ccpa', 'cpra',\n // North America — US state laws\n 'vcdpa', 'cpa-co', 'ctdpa', 'ucpa', 'icdpa-ia', 'icdpa-in', 'tipa',\n 'mcdpa-mt', 'mcdpa-mn', 'ocpa', 'tdpsa', 'dpdpa-de', 'njdpa', 'nhpa',\n 'ndpa-ne', 'modpa', 'kcdpa', 'ridtpa',\n // Latin America\n 'lgpd', 'lfpdppp', 'lpdp-ar', 'lpdp-pe', 'law1581-co', 'law18331-uy',\n 'law19628-cl', 'lopdp-ec', 'lpdp-cr', 'data-protection-pa', 'data-protection-do',\n // Asia — India\n 'dpdpa',\n // Asia — China\n 'pipl', 'dsl-cn', 'csl-cn',\n // Asia — Pacific\n 'appi', 'pipa-kr', 'pdpa-sg', 'pdpa-th', 'pdpa-my', 'dpa-ph', 'pdp-id',\n 'pdpd-vn', 'privacy-au', 'privacy-nz', 'pdpl-hk', 'pdpa-mo', 'pdpl-tw',\n 'privacy-bn', 'privacy-lk', 'privacy-np',\n // Middle East\n 'pdpl-sa', 'uae-pdpl', 'difc-dpl', 'adgm-dpr', 'qpdl-qa', 'pdpl-bh',\n 'pdpl-om', 'privacy-kw', 'privacy-il',\n // Africa\n 'popia', 'ndpa-ng', 'dpa-ke', 'dpa-gh', 'dpa-ug', 'dpa-rw', 'dpa-mu',\n 'dpa-bw', 'dpa-zm', 'dpa-zw', 'dpa-eg', 'dpa-ma', 'dpa-tn', 'dpa-dz',\n // Oceania\n 'privacy-fj', 'privacy-pg',\n] as const\n\n// ─── Compliance Group IDs ─────────────────────────────────────────────────────\n\nexport const COMPLIANCE_GROUP_IDS = [\n 'opt-in',\n 'opt-out',\n 'opt-out-strict',\n 'opt-in-dpdpa',\n 'opt-in-china',\n 'opt-in-brazil',\n 'general-privacy-consent',\n 'notice-only',\n] as const\n\n// Local alias for the shape checks below. The public `ComplianceGroupId` type\n// (derived from the same array) is re-exported from @consenti/types.\ntype ComplianceGroupId = typeof COMPLIANCE_GROUP_IDS[number]\n\n// Local alias for the shape checks below. The public `Compliance` type\n// (derived from the same array) is re-exported from @consenti/types.\ntype Compliance = typeof COMPLIANCE_REGULATION_IDS[number]\n\n// ─── Compliance Groups ────────────────────────────────────────────────────────\n\nexport const COMPLIANCE_GROUPS = {\n 'opt-out-strict': {\n label: 'Opt-out Strict (CPRA / California)',\n description: 'California CPRA: opt-out with sale/sharing/sensitive categories required. GPC must be honored. Stricter than general US state laws.',\n compliances: ['cpra'],\n defaultGpc: 'honor',\n gpcAutoHonor: true,\n allowsLegitimateInterest: false,\n allowsTcf: false,\n requiresCpraCategory: true,\n requiresDpdpaDisclosure: false,\n },\n 'opt-out': {\n label: 'Opt-out (US State Laws)',\n description: 'US state privacy laws. Collect first, allow opt-out of sale/share. Covers CCPA and all state-level equivalents.',\n compliances: [\n 'ccpa',\n 'vcdpa', 'cpa-co', 'ctdpa', 'ucpa', 'icdpa-ia', 'icdpa-in', 'tipa',\n 'mcdpa-mt', 'mcdpa-mn', 'ocpa', 'tdpsa', 'dpdpa-de', 'njdpa', 'nhpa',\n 'ndpa-ne', 'modpa', 'kcdpa', 'ridtpa',\n ],\n defaultGpc: 'honor',\n gpcAutoHonor: true,\n allowsLegitimateInterest: false,\n allowsTcf: false,\n requiresCpraCategory: false,\n requiresDpdpaDisclosure: false,\n },\n 'notice-only': {\n label: 'Notice Only',\n description: 'A privacy notice is generally sufficient. No dedicated cookie banner law is encoded for this jurisdiction.',\n compliances: ['privacy-fj', 'privacy-pg'],\n defaultGpc: 'ignore',\n gpcAutoHonor: false,\n allowsLegitimateInterest: true,\n allowsTcf: false,\n requiresCpraCategory: false,\n requiresDpdpaDisclosure: false,\n },\n 'opt-in': {\n label: 'Standard Opt-in (GDPR)',\n description: 'GDPR / ePrivacy style: prior consent required before non-essential cookies. Granular consent, easy reject, easy withdrawal.',\n compliances: [\n 'gdpr', 'eprivacy', 'uk-gdpr', 'pecr', 'revfadp', 'kvkk', 'pdpa-th',\n 'pdpl-sa', 'uae-pdpl', 'difc-dpl', 'adgm-dpr', 'qpdl-qa', 'pdpl-bh', 'pdpl-om',\n 'law25',\n ],\n defaultGpc: 'ignore',\n gpcAutoHonor: false,\n allowsLegitimateInterest: true,\n allowsTcf: true,\n requiresCpraCategory: false,\n requiresDpdpaDisclosure: false,\n },\n 'opt-in-dpdpa': {\n label: 'Opt-in (India DPDPA)',\n description: \"India's Digital Personal Data Protection Act. Opt-in consent with data fiduciary disclosure. No legitimate interest basis.\",\n compliances: ['dpdpa'],\n defaultGpc: 'ignore',\n gpcAutoHonor: false,\n allowsLegitimateInterest: false,\n allowsTcf: false,\n requiresCpraCategory: false,\n requiresDpdpaDisclosure: true,\n },\n 'opt-in-china': {\n label: 'Opt-in (China PIPL / DSL)',\n description: 'China PIPL + DSL + CSL: strict opt-in with purpose specification, data minimisation, and cross-border transfer controls.',\n compliances: ['pipl', 'dsl-cn', 'csl-cn'],\n defaultGpc: 'ignore',\n gpcAutoHonor: false,\n allowsLegitimateInterest: false,\n allowsTcf: false,\n requiresCpraCategory: false,\n requiresDpdpaDisclosure: false,\n },\n 'opt-in-brazil': {\n label: 'Opt-in (Brazil LGPD)',\n description: 'Brazil LGPD: opt-in consent required. Legitimate interest is a valid basis. Analytics and advertising may differ in treatment.',\n compliances: ['lgpd'],\n defaultGpc: 'ignore',\n gpcAutoHonor: false,\n allowsLegitimateInterest: true,\n allowsTcf: false,\n requiresCpraCategory: false,\n requiresDpdpaDisclosure: false,\n },\n 'general-privacy-consent': {\n label: 'General Privacy Consent',\n description: 'Privacy notice or consent rules exist but the jurisdiction does not have a GDPR/PECR-style strict cookie banner law. Documenting legal basis is best practice.',\n compliances: [\n 'pipeda',\n 'popia', 'appi', 'pipa-kr',\n 'pdpa-sg', 'pdpa-my', 'dpa-ph', 'pdp-id', 'pdpd-vn',\n 'privacy-au', 'privacy-nz', 'pdpl-hk', 'pdpa-mo', 'pdpl-tw',\n 'privacy-bn', 'privacy-lk', 'privacy-np', 'privacy-kw', 'privacy-il',\n 'ndpa-ng', 'dpa-ke', 'dpa-gh', 'dpa-ug', 'dpa-rw', 'dpa-mu',\n 'dpa-bw', 'dpa-zm', 'dpa-zw', 'dpa-eg', 'dpa-ma', 'dpa-tn', 'dpa-dz',\n 'lfpdppp', 'lpdp-ar', 'lpdp-pe', 'law1581-co', 'law18331-uy',\n 'law19628-cl', 'lopdp-ec', 'lpdp-cr', 'data-protection-pa', 'data-protection-do',\n ],\n defaultGpc: 'ignore',\n gpcAutoHonor: false,\n allowsLegitimateInterest: true,\n allowsTcf: false,\n requiresCpraCategory: false,\n requiresDpdpaDisclosure: false,\n },\n} satisfies Record<ComplianceGroupId, {\n label: string\n description: string\n compliances: readonly string[]\n defaultGpc: 'ignore' | 'honor' | 'strict'\n gpcAutoHonor: boolean\n allowsLegitimateInterest: boolean\n allowsTcf: boolean\n requiresCpraCategory: boolean\n requiresDpdpaDisclosure: boolean\n}>\n\n// ─── GPC Options ──────────────────────────────────────────────────────────────\n\nexport const GPC_OPTIONS = [\n { value: 'ignore', label: 'Ignore', description: 'Do not check or respond to the GPC browser signal.' },\n { value: 'honor', label: 'Honor', description: 'Respect GPC as a valid opt-out signal. Show GPC variant banner once.' },\n { value: 'strict', label: 'Strict', description: 'Silently deny all non-mandatory cookies when GPC is detected. No banner shown.' },\n]\n\n// ─── Legal Basis Options ──────────────────────────────────────────────────────\n\nexport const LEGAL_BASIS_OPTIONS = [\n { value: 'mandatory', label: 'Strictly Necessary', description: 'Required for the service to function. No consent needed.' },\n { value: 'consent', label: 'Consent', description: 'Requires explicit user agreement. User can withdraw at any time.' },\n { value: 'legitimate_interest', label: 'Legitimate Interest', description: 'Based on legitimate business interest. User has the right to object.' },\n]\n\n// ─── CPRA Categories ──────────────────────────────────────────────────────────\n\nexport const CPRA_CATEGORIES = [\n { value: 'sale', label: 'Sale', description: 'Sale of personal data to third parties for their own use.' },\n { value: 'sharing', label: 'Sharing', description: 'Sharing for cross-context behavioral advertising (even without payment).' },\n { value: 'sensitive', label: 'Sensitive', description: 'Sensitive personal information (geolocation, health, race, biometrics, etc.). Requires opt-in even in California.' },\n]\n\n// ─── Cookie Purposes ──────────────────────────────────────────────────────────\n// The `CookiePurpose` literal type derived from this array lives in\n// @consenti/types (packages/types/src/ui.ts) via a type-only import.\n\nexport const COOKIE_PURPOSE_IDS = ['necessary', 'functional', 'preferences', 'analytics', 'marketing'] as const\n\ntype CookiePurposeId = typeof COOKIE_PURPOSE_IDS[number]\n\nexport const COOKIE_PURPOSES = [\n { value: 'necessary', label: 'Necessary', description: 'Strictly required to deliver the service or ensure security/compliance. Always granted.' },\n { value: 'functional', label: 'Functional', description: 'Optional features that enhance functionality but are not essential.' },\n { value: 'preferences', label: 'Preferences', description: 'Remember user choices and personalize the experience (\"Remember me\").' },\n { value: 'analytics', label: 'Analytics', description: 'Measure usage and performance to improve the product.' },\n { value: 'marketing', label: 'Marketing', description: 'Advertising, profiling, cross-site tracking, retargeting, ad personalization.' },\n]\n\nexport const COOKIE_PURPOSE_DEFAULTS: Record<CookiePurposeId, {\n legalBasis: 'mandatory' | 'consent' | 'legitimate_interest'\n listenGpc: boolean\n cpraCategory?: 'sale' | 'sharing' | 'sensitive'\n}> = {\n necessary: { legalBasis: 'mandatory', listenGpc: false },\n functional: { legalBasis: 'legitimate_interest', listenGpc: false },\n preferences: { legalBasis: 'legitimate_interest', listenGpc: false },\n analytics: { legalBasis: 'consent', listenGpc: true },\n marketing: { legalBasis: 'consent', listenGpc: true, cpraCategory: 'sharing' },\n}\n\nexport const KNOWN_COOKIE_PURPOSES: Record<string, CookiePurposeId> = {\n security_storage: 'necessary',\n functionality_storage: 'functional',\n personalization_storage: 'preferences',\n analytics_storage: 'analytics',\n ad_storage: 'marketing',\n ad_user_data: 'marketing',\n ad_personalization: 'marketing',\n}\n\n/** Legal basis no longer lives on Cookie (it's derived from category membership), so unknown IDs default to 'functional' rather than guessing from a legal-basis hint. */\nexport function inferCookiePurpose(cookie: { id: string }): CookiePurposeId {\n return KNOWN_COOKIE_PURPOSES[cookie.id] ?? 'functional'\n}\n\n// ─── TCF Purposes (IAB TCF 2.2) ──────────────────────────────────────────────\n\nexport const TCF_PURPOSES = [\n { id: 1, name: 'Store and/or access information on a device', description: \"Cookies, device identifiers, or other information can be stored or accessed on your device.\" },\n { id: 2, name: 'Select basic ads', description: \"Ads can be shown based on the content you're viewing, the app you're using, or your approximate location.\" },\n { id: 3, name: 'Create a personalised ads profile', description: \"A profile can be built about you and your interests to show you personalised ads.\" },\n { id: 4, name: 'Select personalised ads', description: \"Personalised ads can be shown to you based on a profile about you.\" },\n { id: 5, name: 'Create a personalised content profile', description: \"A profile can be built about you and your interests to show you personalised content.\" },\n { id: 6, name: 'Select personalised content', description: \"Personalised content can be shown to you based on a profile about you.\" },\n { id: 7, name: 'Measure ad performance', description: \"The performance and effectiveness of ads that you see or interact with can be measured.\" },\n { id: 8, name: 'Measure content performance', description: \"The performance and effectiveness of content that you see or interact with can be measured.\" },\n { id: 9, name: 'Apply market research to generate audience insights', description: \"Market research can be used to learn more about the audiences who visit sites or use apps.\" },\n { id: 10, name: 'Develop and improve products', description: \"Your data can be used to improve existing systems and software, and to develop new products.\" },\n { id: 11, name: 'Use limited data to select content', description: \"Content can be selected based on limited data such as the website you are visiting.\" },\n]\n\nexport const TCF_SPECIAL_FEATURES = [\n { id: 1, name: 'Use precise geolocation data', description: \"Your precise location (within a radius of less than 500 metres) can be used.\" },\n { id: 2, name: 'Actively scan device characteristics for identification', description: \"Your device can be identified based on a scan of your device's unique combination of characteristics.\" },\n]\n\n// ─── Category ↔ Cookie legal-basis derivation ─────────────────────────────────\n// Legal basis lives on Category (single source of truth); a Cookie/parameter's\n// effective legal basis is derived from whichever category lists its id in\n// `cookies`. Local, minimal shapes here — packages/utils has no dependency on\n// @consenti/types (types depends on utils for data, not the other way), so\n// these are structurally compatible with `Category` from packages/types/src/ui.ts\n// rather than importing it.\n\ntype LegalBasisValue = 'mandatory' | 'consent' | 'legitimate_interest'\n\ninterface CategoryLike {\n legalBasis: LegalBasisValue\n cookies: string[]\n}\n\n/** Linear scan for a single lookup. For repeated lookups against the same category set, build an index with {@link buildCookieCategoryIndex} once instead. */\nexport function findCategoryForCookie<T extends CategoryLike>(\n cookieId: string,\n categories: Record<string, T>,\n): T | undefined {\n for (const category of Object.values(categories)) {\n if (category.cookies.includes(cookieId)) return category\n }\n return undefined\n}\n\n/** Builds a cookie-id → category lookup once per profile load; reuse it across every consent-engine call rather than rebuilding per call. */\nexport function buildCookieCategoryIndex<T extends CategoryLike>(\n categories: Record<string, T>,\n): Map<string, T> {\n const index = new Map<string, T>()\n for (const category of Object.values(categories)) {\n for (const cookieId of category.cookies) index.set(cookieId, category)\n }\n return index\n}\n\n/** Falls back to 'consent' only if the exactly-one-category-per-parameter authoring rule was somehow bypassed. */\nexport function getCookieLegalBasis(cookieId: string, index: Map<string, CategoryLike>): LegalBasisValue {\n return index.get(cookieId)?.legalBasis ?? 'consent'\n}\n\nexport function isMandatoryCookie(cookieId: string, index: Map<string, CategoryLike>): boolean {\n return getCookieLegalBasis(cookieId, index) === 'mandatory'\n}\n\n// ─── Compliance Validation Rules ──────────────────────────────────────────────\n// check() returns true when a violation exists (i.e., the rule is broken).\n// Legal-basis/LI rules run against Category records (legalBasis now lives there).\n// GPC/CPRA/preGrant rules stay Cookie-level but receive the cookie's *derived*\n// legalBasis (via getCookieLegalBasis/buildCookieCategoryIndex) as a second\n// argument instead of reading a (now nonexistent) cookie.legalBasis field.\n\ninterface RuleEntry<TSubject> {\n rule: string\n field: string\n check: (subject: Record<string, unknown>, legalBasis: TSubject) => boolean\n message: (id: string) => string\n}\ninterface WarningEntry<TSubject> extends RuleEntry<TSubject> {\n suggestion: string\n}\n\nexport const COMPLIANCE_VALIDATION_RULES: Record<string, {\n /** Checked once per category, keyed by category id. */\n categoryErrors: Array<RuleEntry<void>>\n categoryWarnings: Array<WarningEntry<void>>\n /** Checked once per cookie/parameter, keyed by cookie id. Receives the parameter's derived legal basis. */\n cookieErrors: Array<RuleEntry<LegalBasisValue>>\n cookieWarnings: Array<WarningEntry<LegalBasisValue>>\n}> = {\n 'opt-in': {\n categoryErrors: [\n {\n rule: 'legal-basis-required',\n field: 'legalBasis',\n check: (c) => !c['legalBasis'],\n message: (id) => `Category \"${id}\" must have a legal basis set (Consent, Legitimate Interest, or Strictly Necessary) for GDPR compliance.`,\n },\n ],\n categoryWarnings: [],\n cookieErrors: [],\n cookieWarnings: [\n {\n rule: 'pre-grant-opt-in-risk',\n field: 'preGrant',\n check: (c, legalBasis) => legalBasis === 'consent' && c['preGrant'] === true,\n message: (id) => `Parameter \"${id}\" is pre-granted, which may violate GDPR's opt-in requirement. Only use \"Pre Grant\" on custom profiles targeting jurisdictions where pre-granted consent is valid.`,\n suggestion: 'Disable \"Pre Grant\" unless this profile specifically targets a jurisdiction that permits pre-granted consent.',\n },\n ],\n },\n\n 'opt-out': {\n categoryErrors: [],\n categoryWarnings: [],\n cookieErrors: [],\n cookieWarnings: [\n {\n rule: 'gpc-recommended',\n field: 'listenGpc',\n check: (c, legalBasis) => legalBasis !== 'mandatory' && !c['listenGpc'],\n message: (id) => `Parameter \"${id}\" does not listen for the GPC signal. US state privacy laws require honoring GPC for opt-out of sale/sharing.`,\n suggestion: 'Enable \"Listen for GPC signal\" on this parameter.',\n },\n ],\n },\n\n 'opt-out-strict': {\n categoryErrors: [],\n categoryWarnings: [],\n cookieErrors: [\n {\n rule: 'cpra-category-required',\n field: 'cpraCategory',\n check: (c, legalBasis) => legalBasis !== 'mandatory' && !c['cpraCategory'],\n message: (id) => `Parameter \"${id}\" must have a CPRA category (Sale, Sharing, or Sensitive) assigned. Required under CPRA for all non-necessary parameters.`,\n },\n ],\n cookieWarnings: [\n {\n rule: 'gpc-strict-required',\n field: 'listenGpc',\n check: (c, legalBasis) => legalBasis !== 'mandatory' && !c['listenGpc'],\n message: (id) => `Parameter \"${id}\" does not listen for the GPC signal. Under CPRA, non-mandatory parameters must honor GPC as a Do Not Sell/Share signal.`,\n suggestion: 'Enable \"Listen for GPC signal\" on this parameter.',\n },\n ],\n },\n\n 'opt-in-dpdpa': {\n categoryErrors: [\n {\n rule: 'no-li-allowed',\n field: 'legalBasis',\n check: (c) => c['legalBasis'] === 'legitimate_interest',\n message: (id) => `Category \"${id}\" uses Legitimate Interest, which is not a valid legal basis under India's DPDPA. Use Consent or Strictly Necessary.`,\n },\n {\n rule: 'legal-basis-required',\n field: 'legalBasis',\n check: (c) => !c['legalBasis'],\n message: (id) => `Category \"${id}\" must have a legal basis set (Consent or Strictly Necessary) for DPDPA compliance.`,\n },\n ],\n categoryWarnings: [],\n cookieErrors: [],\n cookieWarnings: [\n {\n rule: 'pre-grant-opt-in-risk',\n field: 'preGrant',\n check: (c, legalBasis) => legalBasis === 'consent' && c['preGrant'] === true,\n message: (id) => `Parameter \"${id}\" is pre-granted, which may violate DPDPA's opt-in requirement. Only use \"Pre Grant\" on custom profiles targeting jurisdictions where pre-granted consent is valid.`,\n suggestion: 'Disable \"Pre Grant\" unless this profile specifically targets a jurisdiction that permits pre-granted consent.',\n },\n ],\n },\n\n 'opt-in-china': {\n categoryErrors: [\n {\n rule: 'legal-basis-required',\n field: 'legalBasis',\n check: (c) => !c['legalBasis'],\n message: (id) => `Category \"${id}\" must have a legal basis set for China PIPL compliance. Consent is the primary valid basis.`,\n },\n ],\n categoryWarnings: [\n {\n rule: 'li-limited-under-pipl',\n field: 'legalBasis',\n check: (c) => c['legalBasis'] === 'legitimate_interest',\n message: (id) => `Category \"${id}\" uses Legitimate Interest. Under China's PIPL, LI is narrowly scoped and data processing purposes must be strictly documented.`,\n suggestion: 'Consider using Consent for this category to ensure PIPL compliance. Document the specific legitimate interest basis if retaining LI.',\n },\n ],\n cookieErrors: [],\n cookieWarnings: [\n {\n rule: 'pre-grant-opt-in-risk',\n field: 'preGrant',\n check: (c, legalBasis) => legalBasis === 'consent' && c['preGrant'] === true,\n message: (id) => `Parameter \"${id}\" is pre-granted, which may violate PIPL's opt-in requirement. Only use \"Pre Grant\" on custom profiles targeting jurisdictions where pre-granted consent is valid.`,\n suggestion: 'Disable \"Pre Grant\" unless this profile specifically targets a jurisdiction that permits pre-granted consent.',\n },\n ],\n },\n\n 'opt-in-brazil': {\n categoryErrors: [\n {\n rule: 'legal-basis-required',\n field: 'legalBasis',\n check: (c) => !c['legalBasis'],\n message: (id) => `Category \"${id}\" must have a legal basis set. Brazil's LGPD requires one of ten legal bases; Consent or Legitimate Interest are most common for parameters.`,\n },\n ],\n categoryWarnings: [],\n cookieErrors: [],\n cookieWarnings: [\n {\n rule: 'pre-grant-opt-in-risk',\n field: 'preGrant',\n check: (c, legalBasis) => legalBasis === 'consent' && c['preGrant'] === true,\n message: (id) => `Parameter \"${id}\" is pre-granted, which may violate LGPD's opt-in requirement. Only use \"Pre Grant\" on custom profiles targeting jurisdictions where pre-granted consent is valid.`,\n suggestion: 'Disable \"Pre Grant\" unless this profile specifically targets a jurisdiction that permits pre-granted consent.',\n },\n ],\n },\n\n 'general-privacy-consent': {\n categoryErrors: [],\n categoryWarnings: [\n {\n rule: 'legal-basis-recommended',\n field: 'legalBasis',\n check: (c) => !c['legalBasis'],\n message: (id) => `Category \"${id}\" has no legal basis documented. While a strict cookie banner may not be legally required in this jurisdiction, documenting legal basis is a privacy best practice.`,\n suggestion: 'Set a legal basis to improve compliance documentation and future-proof against stricter enforcement.',\n },\n ],\n cookieErrors: [],\n cookieWarnings: [],\n },\n\n 'notice-only': {\n categoryErrors: [],\n categoryWarnings: [],\n cookieErrors: [],\n cookieWarnings: [],\n },\n}\n\n// ─── Embedded Jurisdiction → Compliance Group Map ─────────────────────────────\n// Version tag: update when regulations or mappings change materially.\n// HOW TO UPDATE: edit or add a country entry below. That is the ONLY file change needed.\n//\n// locales: BCP 47 tags for the most commonly used web/IT locales in that country.\n// Only well-supported, widely-used locales are listed. English-speaking countries\n// use 'en' (no country suffix). No country-specific English variants (en-XX) anywhere.\n\nexport const EMBEDDED_COMPLIANCE_MAP = {\n version: '2026-07',\n countries: {\n // ─── Europe — EU 27 ───────────────────────────────────────────────────────\n AT: { name: 'Austria', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Austria (GDPR)', locales: ['de-AT'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Vienna'] },\n BE: { name: 'Belgium', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Belgium (GDPR)', locales: ['nl-BE', 'fr-BE'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Brussels'] },\n BG: { name: 'Bulgaria', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Bulgaria (GDPR)', locales: ['bg-BG'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Sofia'] },\n HR: { name: 'Croatia', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Croatia (GDPR)', locales: ['hr-HR'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Zagreb'] },\n CY: { name: 'Cyprus', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Cyprus (GDPR)', locales: ['el-CY'], compliance: ['gdpr', 'eprivacy'], timezones: ['Asia/Nicosia'] },\n CZ: { name: 'Czechia', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Czechia (GDPR)', locales: ['cs-CZ'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Prague'] },\n DK: { name: 'Denmark', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Denmark (GDPR)', locales: ['da-DK'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Copenhagen'] },\n EE: { name: 'Estonia', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Estonia (GDPR)', locales: ['et-EE'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Tallinn'] },\n FI: { name: 'Finland', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Finland (GDPR)', locales: ['fi-FI'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Helsinki'] },\n FR: { name: 'France', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'France (GDPR)', locales: ['fr-FR'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Paris'] },\n DE: { name: 'Germany', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Germany (GDPR)', locales: ['de-DE'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Berlin'] },\n GR: { name: 'Greece', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Greece (GDPR)', locales: ['el-GR'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Athens'] },\n HU: { name: 'Hungary', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Hungary (GDPR)', locales: ['hu-HU'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Budapest'] },\n IE: { name: 'Ireland', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Ireland (GDPR)', locales: ['en'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Dublin'] },\n IT: { name: 'Italy', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Italy (GDPR)', locales: ['it-IT'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Rome'] },\n LV: { name: 'Latvia', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Latvia (GDPR)', locales: ['lv-LV'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Riga'] },\n LT: { name: 'Lithuania', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Lithuania (GDPR)', locales: ['lt-LT'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Vilnius'] },\n LU: { name: 'Luxembourg', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Luxembourg (GDPR)', locales: ['fr-LU', 'de-LU'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Luxembourg'] },\n MT: { name: 'Malta', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Malta (GDPR)', locales: ['mt-MT', 'en'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Malta'] },\n NL: { name: 'Netherlands', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Netherlands (GDPR)', locales: ['nl-NL'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Amsterdam'] },\n PL: { name: 'Poland', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Poland (GDPR)', locales: ['pl-PL'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Warsaw'] },\n PT: { name: 'Portugal', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Portugal (GDPR)', locales: ['pt-PT'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Lisbon', 'Atlantic/Madeira', 'Atlantic/Azores'] },\n RO: { name: 'Romania', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Romania (GDPR)', locales: ['ro-RO'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Bucharest'] },\n SK: { name: 'Slovakia', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Slovakia (GDPR)', locales: ['sk-SK'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Bratislava'] },\n SI: { name: 'Slovenia', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Slovenia (GDPR)', locales: ['sl-SI'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Ljubljana'] },\n ES: { name: 'Spain', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Spain (GDPR)', locales: ['es-ES'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Madrid', 'Africa/Ceuta', 'Atlantic/Canary'] },\n SE: { name: 'Sweden', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Sweden (GDPR)', locales: ['sv-SE'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Stockholm'] },\n // ─── Europe — EEA non-EU ──────────────────────────────────────────────────\n IS: { name: 'Iceland', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Iceland (GDPR via EEA)', locales: ['is-IS'], compliance: ['gdpr', 'eprivacy'], timezones: ['Atlantic/Reykjavik'] },\n LI: { name: 'Liechtenstein', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Liechtenstein (GDPR via EEA)', locales: ['de-LI'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Vaduz'] },\n NO: { name: 'Norway', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Norway (GDPR via EEA)', locales: ['nb-NO'], compliance: ['gdpr', 'eprivacy'], timezones: ['Europe/Oslo', 'Arctic/Longyearbyen'] },\n // ─── Europe — GDPR-aligned candidate/observer countries ──────────────────\n AD: { name: 'Andorra', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Andorra (GDPR-aligned)', locales: ['ca-AD'], compliance: ['gdpr'], timezones: ['Europe/Andorra'] },\n AL: { name: 'Albania', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Albania (GDPR-aligned)', locales: ['sq-AL'], compliance: ['gdpr'], timezones: ['Europe/Tirane'] },\n BA: { name: 'Bosnia and Herzegovina', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Bosnia and Herzegovina (GDPR-aligned)', locales: ['bs-BA', 'sr-Latn-BA'], compliance: ['gdpr'], timezones: ['Europe/Sarajevo'] },\n GG: { name: 'Guernsey', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Guernsey (DPA based on GDPR)', locales: ['en'], compliance: ['gdpr'], timezones: ['Europe/Guernsey'] },\n GI: { name: 'Gibraltar', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Gibraltar (DPA based on UK GDPR)', locales: ['en'], compliance: ['uk-gdpr'], timezones: ['Europe/Gibraltar'] },\n GL: { name: 'Greenland', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Greenland (Danish GDPR implementation)', locales: ['da-GL'], compliance: ['gdpr'], timezones: ['America/Nuuk', 'America/Danmarkshavn', 'America/Scoresbysund', 'America/Thule'] },\n MC: { name: 'Monaco', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Monaco (GDPR-aligned)', locales: ['fr-MC'], compliance: ['gdpr'], timezones: ['Europe/Monaco'] },\n ME: { name: 'Montenegro', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Montenegro (GDPR-aligned)', locales: ['sr-Latn-ME'], compliance: ['gdpr'], timezones: ['Europe/Podgorica'] },\n MK: { name: 'North Macedonia', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'North Macedonia (GDPR-aligned)', locales: ['mk-MK'], compliance: ['gdpr'], timezones: ['Europe/Skopje'] },\n RS: { name: 'Serbia', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Serbia (GDPR-aligned)', locales: ['sr-RS'], compliance: ['gdpr'], timezones: ['Europe/Belgrade'] },\n SM: { name: 'San Marino', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'San Marino (GDPR-aligned)', locales: ['it-SM'], compliance: ['gdpr'], timezones: ['Europe/San_Marino'] },\n TR: { name: 'Türkiye', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Türkiye (KVKK)', locales: ['tr-TR'], compliance: ['kvkk'], timezones: ['Europe/Istanbul'] },\n // ─── North America ────────────────────────────────────────────────────────\n CA: {\n name: 'Canada',\n type: 'country',\n complianceGroup: 'general-privacy-consent',\n default: 'general-privacy-consent',\n description: 'Canada (PIPEDA / Law 25)',\n locales: ['en', 'fr-CA'],\n compliance: ['pipeda', 'law25'],\n timezones: ['America/St_Johns', 'America/Halifax', 'America/Toronto', 'America/Winnipeg', 'America/Edmonton', 'America/Vancouver'],\n overriddenRegions: {\n QC: { name: 'Quebec', type: 'region', complianceGroup: 'opt-in', description: 'Quebec — Law 25 (GDPR-style opt-in)' },\n },\n },\n US: {\n name: 'United States',\n type: 'country',\n // complianceGroup: base when state known but has no specific law\n // default: used when state CANNOT be detected (use most strict = opt-out-strict)\n complianceGroup: 'opt-out',\n default: 'opt-out-strict',\n description: 'United States — opt-out-strict (CPRA) used when state cannot be detected',\n locales: ['en', 'es-US'],\n compliance: ['ccpa', 'cpra', 'vcdpa', 'cpa-co', 'ctdpa', 'ucpa', 'icdpa-ia', 'icdpa-in', 'tipa', 'mcdpa-mt', 'mcdpa-mn', 'ocpa', 'tdpsa', 'dpdpa-de', 'njdpa', 'nhpa', 'ndpa-ne', 'modpa', 'kcdpa', 'ridtpa'],\n timezones: ['America/New_York', 'America/Chicago', 'America/Denver', 'America/Phoenix', 'America/Los_Angeles', 'America/Anchorage', 'Pacific/Honolulu'],\n overriddenRegions: {\n CA: { name: 'California', type: 'region', complianceGroup: 'opt-out-strict', description: 'California — CPRA/CCPA' },\n VA: { name: 'Virginia', type: 'region', complianceGroup: 'opt-out', description: 'Virginia — VCDPA' },\n CO: { name: 'Colorado', type: 'region', complianceGroup: 'opt-out', description: 'Colorado — CPA' },\n CT: { name: 'Connecticut', type: 'region', complianceGroup: 'opt-out', description: 'Connecticut — CTDPA' },\n UT: { name: 'Utah', type: 'region', complianceGroup: 'opt-out', description: 'Utah — UCPA' },\n TX: { name: 'Texas', type: 'region', complianceGroup: 'opt-out', description: 'Texas — TDPSA' },\n DE: { name: 'Delaware', type: 'region', complianceGroup: 'opt-out', description: 'Delaware — DPDPA' },\n NJ: { name: 'New Jersey', type: 'region', complianceGroup: 'opt-out', description: 'New Jersey — NJDPA' },\n OR: { name: 'Oregon', type: 'region', complianceGroup: 'opt-out', description: 'Oregon — OCPA' },\n MN: { name: 'Minnesota', type: 'region', complianceGroup: 'opt-out', description: 'Minnesota — MCDPA' },\n MD: { name: 'Maryland', type: 'region', complianceGroup: 'opt-out', description: 'Maryland — MODPA' },\n KY: { name: 'Kentucky', type: 'region', complianceGroup: 'opt-out', description: 'Kentucky — KCDPA' },\n TN: { name: 'Tennessee', type: 'region', complianceGroup: 'opt-out', description: 'Tennessee — TIPA' },\n NE: { name: 'Nebraska', type: 'region', complianceGroup: 'opt-out', description: 'Nebraska — NDPA' },\n IA: { name: 'Iowa', type: 'region', complianceGroup: 'opt-out', description: 'Iowa — ICDPA' },\n IN: { name: 'Indiana', type: 'region', complianceGroup: 'opt-out', description: 'Indiana — ICDPA' },\n MT: { name: 'Montana', type: 'region', complianceGroup: 'opt-out', description: 'Montana — MCDPA' },\n NH: { name: 'New Hampshire', type: 'region', complianceGroup: 'opt-out', description: 'New Hampshire — NHPA' },\n RI: { name: 'Rhode Island', type: 'region', complianceGroup: 'opt-out', description: 'Rhode Island — RIDTPA' },\n },\n },\n // ─── Latin America ────────────────────────────────────────────────────────\n AR: { name: 'Argentina', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Argentina (LPDP)', locales: ['es-AR'], compliance: ['lpdp-ar'], timezones: ['America/Argentina/Buenos_Aires'] },\n BO: { name: 'Bolivia', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Bolivia', locales: ['es-BO'], compliance: [], timezones: ['America/La_Paz'] },\n BR: { name: 'Brazil', type: 'country', complianceGroup: 'opt-in-brazil', default: 'opt-in-brazil', description: 'Brazil (LGPD)', locales: ['pt-BR'], compliance: ['lgpd'], timezones: ['America/Noronha', 'America/Sao_Paulo', 'America/Manaus', 'America/Rio_Branco'] },\n CL: { name: 'Chile', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Chile (Law 19.628)', locales: ['es-CL'], compliance: ['law19628-cl'], timezones: ['America/Santiago', 'Pacific/Easter'] },\n CO: { name: 'Colombia', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Colombia (Law 1581)', locales: ['es-CO'], compliance: ['law1581-co'], timezones: ['America/Bogota'] },\n CR: { name: 'Costa Rica', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Costa Rica (LPDP)', locales: ['es-CR'], compliance: ['lpdp-cr'], timezones: ['America/Costa_Rica'] },\n DO: { name: 'Dominican Republic', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Dominican Republic', locales: ['es-DO'], compliance: ['data-protection-do'], timezones: ['America/Santo_Domingo'] },\n EC: { name: 'Ecuador', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Ecuador (LOPDP)', locales: ['es-EC'], compliance: ['lopdp-ec'], timezones: ['America/Guayaquil', 'Pacific/Galapagos'] },\n GF: { name: 'French Guiana', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'French Guiana', locales: ['fr-GF'], compliance: [], timezones: ['America/Cayenne'] },\n GT: { name: 'Guatemala', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Guatemala', locales: ['es-GT'], compliance: [], timezones: ['America/Guatemala'] },\n GY: { name: 'Guyana', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Guyana', locales: ['en'], compliance: [], timezones: ['America/Guyana'] },\n HN: { name: 'Honduras', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Honduras', locales: ['es-HN'], compliance: [], timezones: ['America/Tegucigalpa'] },\n HT: { name: 'Haiti', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Haiti', locales: ['fr-HT'], compliance: [], timezones: ['America/Port-au-Prince'] },\n JM: { name: 'Jamaica', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Jamaica', locales: ['en'], compliance: [], timezones: ['America/Jamaica'] },\n MX: { name: 'Mexico', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Mexico (LFPDPPP)', locales: ['es-MX'], compliance: ['lfpdppp'], timezones: ['America/Mexico_City', 'America/Cancun', 'America/Chihuahua', 'America/Hermosillo', 'America/Tijuana'] },\n NI: { name: 'Nicaragua', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Nicaragua', locales: ['es-NI'], compliance: [], timezones: ['America/Managua'] },\n PA: { name: 'Panama', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Panama', locales: ['es-PA'], compliance: ['data-protection-pa'], timezones: ['America/Panama'] },\n PE: { name: 'Peru', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Peru (LPDP)', locales: ['es-PE'], compliance: ['lpdp-pe'], timezones: ['America/Lima'] },\n PY: { name: 'Paraguay', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Paraguay', locales: ['es-PY'], compliance: [], timezones: ['America/Asuncion'] },\n SR: { name: 'Suriname', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Suriname', locales: ['nl-SR'], compliance: [], timezones: ['America/Paramaribo'] },\n SV: { name: 'El Salvador', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'El Salvador', locales: ['es-SV'], compliance: [], timezones: ['America/El_Salvador'] },\n TT: { name: 'Trinidad and Tobago', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Trinidad and Tobago', locales: ['en'], compliance: [], timezones: ['America/Port_of_Spain'] },\n UY: { name: 'Uruguay', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Uruguay (Law 18.331)', locales: ['es-UY'], compliance: ['law18331-uy'], timezones: ['America/Montevideo'] },\n VE: { name: 'Venezuela', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Venezuela', locales: ['es-VE'], compliance: [], timezones: ['America/Caracas'] },\n // ─── Caribbean ────────────────────────────────────────────────────────────\n AG: { name: 'Antigua and Barbuda', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Antigua and Barbuda', locales: ['en'], compliance: [], timezones: ['America/Antigua'] },\n BB: { name: 'Barbados', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Barbados', locales: ['en'], compliance: [], timezones: ['America/Barbados'] },\n BL: { name: 'Saint Barthélemy', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Saint Barthélemy', locales: ['fr-BL'], compliance: [], timezones: ['America/St_Barthelemy'] },\n BM: { name: 'Bermuda', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Bermuda', locales: ['en'], compliance: [], timezones: ['Atlantic/Bermuda'] },\n BS: { name: 'Bahamas', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Bahamas', locales: ['en'], compliance: [], timezones: ['America/Nassau'] },\n CU: { name: 'Cuba', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Cuba', locales: ['es-CU'], compliance: [], timezones: ['America/Havana'] },\n DM: { name: 'Dominica', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Dominica', locales: ['en'], compliance: [], timezones: ['America/Dominica'] },\n GD: { name: 'Grenada', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Grenada', locales: ['en'], compliance: [], timezones: ['America/Grenada'] },\n KN: { name: 'Saint Kitts and Nevis', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Saint Kitts and Nevis', locales: ['en'], compliance: [], timezones: ['America/St_Kitts'] },\n LC: { name: 'Saint Lucia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Saint Lucia', locales: ['en'], compliance: [], timezones: ['America/St_Lucia'] },\n PM: { name: 'Saint Pierre and Miquelon', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Saint Pierre and Miquelon', locales: ['fr-PM'], compliance: [], timezones: ['America/Miquelon'] },\n PR: { name: 'Puerto Rico', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Puerto Rico', locales: ['es-PR', 'en'], compliance: [], timezones: ['America/Puerto_Rico'] },\n VC: { name: 'Saint Vincent and the Grenadines', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Saint Vincent and the Grenadines', locales: ['en'], compliance: [], timezones: ['America/St_Vincent'] },\n // ─── Asia — India ─────────────────────────────────────────────────────────\n IN: { name: 'India', type: 'country', complianceGroup: 'opt-in-dpdpa', default: 'opt-in-dpdpa', description: 'India (DPDPA)', locales: ['hi-IN', 'en', 'bn-IN', 'ta-IN'], compliance: ['dpdpa'], timezones: ['Asia/Kolkata', 'Asia/Calcutta'] },\n // ─── Asia — China ─────────────────────────────────────────────────────────\n CN: { name: 'China', type: 'country', complianceGroup: 'opt-in-china', default: 'opt-in-china', description: 'China (PIPL + DSL + CSL)', locales: ['zh-CN'], compliance: ['pipl', 'dsl-cn', 'csl-cn'], timezones: ['Asia/Shanghai'] },\n // ─── Asia — Southeast Asia ────────────────────────────────────────────────\n BN: { name: 'Brunei', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Brunei (Personal Data Protection Order)', locales: ['ms-BN', 'en'], compliance: ['privacy-bn'], timezones: ['Asia/Brunei'] },\n ID: { name: 'Indonesia', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Indonesia (PDP Law)', locales: ['id-ID'], compliance: ['pdp-id'], timezones: ['Asia/Jakarta', 'Asia/Makassar', 'Asia/Jayapura'] },\n KH: { name: 'Cambodia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Cambodia', locales: ['km-KH'], compliance: [], timezones: ['Asia/Phnom_Penh'] },\n LA: { name: 'Laos', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Laos', locales: ['lo-LA'], compliance: [], timezones: ['Asia/Vientiane'] },\n MM: { name: 'Myanmar', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Myanmar', locales: ['my-MM'], compliance: [], timezones: ['Asia/Yangon'] },\n MY: { name: 'Malaysia', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Malaysia (PDPA)', locales: ['ms-MY', 'zh-MY', 'en'], compliance: ['pdpa-my'], timezones: ['Asia/Kuala_Lumpur', 'Asia/Kuching'] },\n PH: { name: 'Philippines', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Philippines (DPA)', locales: ['fil-PH', 'en'], compliance: ['dpa-ph'], timezones: ['Asia/Manila'] },\n SG: { name: 'Singapore', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Singapore (PDPA)', locales: ['zh-SG', 'ms-SG', 'ta-SG', 'en'], compliance: ['pdpa-sg'], timezones: ['Asia/Singapore'] },\n TH: { name: 'Thailand', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Thailand (PDPA — GDPR-style opt-in)', locales: ['th-TH'], compliance: ['pdpa-th'], timezones: ['Asia/Bangkok'] },\n TL: { name: 'Timor-Leste', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Timor-Leste', locales: ['pt-TL'], compliance: [], timezones: ['Asia/Dili'] },\n VN: { name: 'Vietnam', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Vietnam (PDPD)', locales: ['vi-VN'], compliance: ['pdpd-vn'], timezones: ['Asia/Ho_Chi_Minh'] },\n // ─── Asia — East Asia ─────────────────────────────────────────────────────\n HK: { name: 'Hong Kong', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Hong Kong SAR (PDPO)', locales: ['zh-HK'], compliance: ['pdpl-hk'], timezones: ['Asia/Hong_Kong'] },\n JP: { name: 'Japan', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Japan (APPI)', locales: ['ja-JP'], compliance: ['appi'], timezones: ['Asia/Tokyo'] },\n KP: { name: 'North Korea', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'North Korea', locales: ['ko-KP'], compliance: [], timezones: ['Asia/Pyongyang'] },\n KR: { name: 'South Korea', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'South Korea (PIPA)', locales: ['ko-KR'], compliance: ['pipa-kr'], timezones: ['Asia/Seoul'] },\n MN: { name: 'Mongolia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Mongolia', locales: ['mn-MN'], compliance: [], timezones: ['Asia/Ulaanbaatar', 'Asia/Hovd'] },\n MO: { name: 'Macau', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Macau SAR (PDPA)', locales: ['zh-MO', 'pt-MO'], compliance: ['pdpa-mo'], timezones: ['Asia/Macau'] },\n TW: { name: 'Taiwan', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Taiwan (PDPL)', locales: ['zh-TW'], compliance: ['pdpl-tw'], timezones: ['Asia/Taipei'] },\n // ─── Asia — South Asia ────────────────────────────────────────────────────\n AF: { name: 'Afghanistan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Afghanistan', locales: ['fa-AF'], compliance: [], timezones: ['Asia/Kabul'] },\n BD: { name: 'Bangladesh', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Bangladesh', locales: ['bn-BD'], compliance: [], timezones: ['Asia/Dhaka'] },\n BT: { name: 'Bhutan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Bhutan', locales: ['dz-BT'], compliance: [], timezones: ['Asia/Thimphu'] },\n IO: { name: 'British Indian Ocean Territory', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'British Indian Ocean Territory', locales: ['en'], compliance: [], timezones: ['Indian/Chagos'] },\n LK: { name: 'Sri Lanka', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Sri Lanka', locales: ['si-LK', 'ta-LK'], compliance: ['privacy-lk'], timezones: ['Asia/Colombo'] },\n MV: { name: 'Maldives', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Maldives', locales: ['dv-MV'], compliance: [], timezones: ['Indian/Maldives'] },\n NP: { name: 'Nepal', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Nepal', locales: ['ne-NP'], compliance: ['privacy-np'], timezones: ['Asia/Kathmandu'] },\n PK: { name: 'Pakistan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Pakistan', locales: ['ur-PK', 'en'], compliance: [], timezones: ['Asia/Karachi'] },\n // ─── Asia — Central Asia ──────────────────────────────────────────────────\n AM: { name: 'Armenia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Armenia', locales: ['hy-AM'], compliance: [], timezones: ['Asia/Yerevan'] },\n AZ: { name: 'Azerbaijan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Azerbaijan', locales: ['az-AZ'], compliance: [], timezones: ['Asia/Baku'] },\n GE: { name: 'Georgia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Georgia', locales: ['ka-GE'], compliance: [], timezones: ['Asia/Tbilisi'] },\n KG: { name: 'Kyrgyzstan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Kyrgyzstan', locales: ['ky-KG', 'ru-KG'], compliance: [], timezones: ['Asia/Bishkek'] },\n KZ: { name: 'Kazakhstan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Kazakhstan', locales: ['kk-KZ', 'ru-KZ'], compliance: [], timezones: ['Asia/Almaty', 'Asia/Aqtobe'] },\n TJ: { name: 'Tajikistan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Tajikistan', locales: ['tg-TJ'], compliance: [], timezones: ['Asia/Dushanbe'] },\n TM: { name: 'Turkmenistan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Turkmenistan', locales: ['tk-TM'], compliance: [], timezones: ['Asia/Ashgabat'] },\n UZ: { name: 'Uzbekistan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Uzbekistan', locales: ['uz-UZ'], compliance: [], timezones: ['Asia/Tashkent', 'Asia/Samarkand'] },\n // ─── Middle East ──────────────────────────────────────────────────────────\n AE: { name: 'United Arab Emirates', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'United Arab Emirates (UAE PDPL / DIFC DPL / ADGM DPR)', locales: ['ar-AE'], compliance: ['uae-pdpl', 'difc-dpl', 'adgm-dpr'], timezones: ['Asia/Dubai'] },\n BH: { name: 'Bahrain', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Bahrain (PDPL)', locales: ['ar-BH'], compliance: ['pdpl-bh'], timezones: ['Asia/Bahrain'] },\n IL: { name: 'Israel', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Israel (Privacy Protection Law)', locales: ['he-IL', 'ar-IL'], compliance: ['privacy-il'], timezones: ['Asia/Jerusalem'] },\n IQ: { name: 'Iraq', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Iraq', locales: ['ar-IQ'], compliance: [], timezones: ['Asia/Baghdad'] },\n IR: { name: 'Iran', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Iran', locales: ['fa-IR'], compliance: [], timezones: ['Asia/Tehran'] },\n JO: { name: 'Jordan', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Jordan', locales: ['ar-JO'], compliance: [], timezones: ['Asia/Amman'] },\n KW: { name: 'Kuwait', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Kuwait', locales: ['ar-KW'], compliance: ['privacy-kw'], timezones: ['Asia/Kuwait'] },\n LB: { name: 'Lebanon', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Lebanon', locales: ['ar-LB'], compliance: [], timezones: ['Asia/Beirut'] },\n OM: { name: 'Oman', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Oman (PDPL)', locales: ['ar-OM'], compliance: ['pdpl-om'], timezones: ['Asia/Muscat'] },\n PS: { name: 'Palestine', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Palestine', locales: ['ar-PS'], compliance: [], timezones: ['Asia/Gaza', 'Asia/Hebron'] },\n QA: { name: 'Qatar', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Qatar (PDPL)', locales: ['ar-QA'], compliance: ['qpdl-qa'], timezones: ['Asia/Qatar'] },\n SA: { name: 'Saudi Arabia', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Saudi Arabia (PDPL)', locales: ['ar-SA'], compliance: ['pdpl-sa'], timezones: ['Asia/Riyadh'] },\n SY: { name: 'Syria', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Syria', locales: ['ar-SY'], compliance: [], timezones: ['Asia/Damascus'] },\n YE: { name: 'Yemen', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Yemen', locales: ['ar-YE'], compliance: [], timezones: ['Asia/Aden'] },\n // ─── Africa — West ────────────────────────────────────────────────────────\n BF: { name: 'Burkina Faso', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Burkina Faso', locales: ['fr-BF'], compliance: [], timezones: ['Africa/Ouagadougou'] },\n BJ: { name: 'Benin', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Benin', locales: ['fr-BJ'], compliance: [], timezones: ['Africa/Porto-Novo'] },\n CI: { name: \"Côte d'Ivoire\", type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: \"Côte d'Ivoire\", locales: ['fr-CI'], compliance: [], timezones: ['Africa/Abidjan'] },\n CM: { name: 'Cameroon', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Cameroon', locales: ['fr-CM', 'en'], compliance: [], timezones: ['Africa/Douala'] },\n CV: { name: 'Cabo Verde', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Cabo Verde', locales: ['pt-CV'], compliance: [], timezones: ['Atlantic/Cape_Verde'] },\n GA: { name: 'Gabon', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Gabon', locales: ['fr-GA'], compliance: [], timezones: ['Africa/Libreville'] },\n GH: { name: 'Ghana', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Ghana (DPA)', locales: ['en'], compliance: ['dpa-gh'], timezones: ['Africa/Accra'] },\n GM: { name: 'Gambia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Gambia', locales: ['en'], compliance: [], timezones: ['Africa/Banjul'] },\n GN: { name: 'Guinea', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Guinea', locales: ['fr-GN'], compliance: [], timezones: ['Africa/Conakry'] },\n GQ: { name: 'Equatorial Guinea', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Equatorial Guinea', locales: ['es-GQ', 'fr-GQ'], compliance: [], timezones: ['Africa/Malabo'] },\n GW: { name: 'Guinea-Bissau', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Guinea-Bissau', locales: ['pt-GW'], compliance: [], timezones: ['Africa/Bissau'] },\n LR: { name: 'Liberia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Liberia', locales: ['en'], compliance: [], timezones: ['Africa/Monrovia'] },\n ML: { name: 'Mali', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Mali', locales: ['fr-ML'], compliance: [], timezones: ['Africa/Bamako'] },\n MR: { name: 'Mauritania', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Mauritania', locales: ['ar-MR'], compliance: [], timezones: ['Africa/Nouakchott'] },\n NE: { name: 'Niger', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Niger', locales: ['fr-NE'], compliance: [], timezones: ['Africa/Niamey'] },\n NG: { name: 'Nigeria', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Nigeria (NDPA)', locales: ['en'], compliance: ['ndpa-ng'], timezones: ['Africa/Lagos'] },\n SL: { name: 'Sierra Leone', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Sierra Leone', locales: ['en'], compliance: [], timezones: ['Africa/Freetown'] },\n SN: { name: 'Senegal', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Senegal', locales: ['fr-SN'], compliance: [], timezones: ['Africa/Dakar'] },\n TG: { name: 'Togo', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Togo', locales: ['fr-TG'], compliance: [], timezones: ['Africa/Lome'] },\n // ─── Africa — East ────────────────────────────────────────────────────────\n BI: { name: 'Burundi', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Burundi', locales: ['fr-BI'], compliance: [], timezones: ['Africa/Bujumbura'] },\n DJ: { name: 'Djibouti', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Djibouti', locales: ['fr-DJ', 'ar-DJ'], compliance: [], timezones: ['Africa/Djibouti'] },\n ER: { name: 'Eritrea', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Eritrea', locales: ['ti-ER'], compliance: [], timezones: ['Africa/Asmara'] },\n ET: { name: 'Ethiopia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Ethiopia', locales: ['am-ET'], compliance: [], timezones: ['Africa/Addis_Ababa'] },\n KE: { name: 'Kenya', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Kenya (DPA)', locales: ['sw-KE', 'en'], compliance: ['dpa-ke'], timezones: ['Africa/Nairobi'] },\n KM: { name: 'Comoros', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Comoros', locales: ['ar-KM', 'fr-KM'], compliance: [], timezones: ['Indian/Comoro'] },\n MG: { name: 'Madagascar', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Madagascar', locales: ['fr-MG'], compliance: [], timezones: ['Indian/Antananarivo'] },\n MU: { name: 'Mauritius', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Mauritius (DPA)', locales: ['en', 'fr-MU'], compliance: ['dpa-mu'], timezones: ['Indian/Mauritius'] },\n MW: { name: 'Malawi', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Malawi', locales: ['en'], compliance: [], timezones: ['Africa/Blantyre'] },\n MZ: { name: 'Mozambique', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Mozambique', locales: ['pt-MZ'], compliance: [], timezones: ['Africa/Maputo'] },\n RW: { name: 'Rwanda', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Rwanda (DPA)', locales: ['rw-RW', 'en'], compliance: ['dpa-rw'], timezones: ['Africa/Kigali'] },\n SC: { name: 'Seychelles', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Seychelles', locales: ['fr-SC', 'en'], compliance: [], timezones: ['Indian/Mahe'] },\n SO: { name: 'Somalia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Somalia', locales: ['so-SO'], compliance: [], timezones: ['Africa/Mogadishu'] },\n SS: { name: 'South Sudan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'South Sudan', locales: ['en'], compliance: [], timezones: ['Africa/Juba'] },\n ST: { name: 'São Tomé and Príncipe', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'São Tomé and Príncipe', locales: ['pt-ST'], compliance: [], timezones: ['Africa/Sao_Tome'] },\n TZ: { name: 'Tanzania', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Tanzania', locales: ['sw-TZ', 'en'], compliance: [], timezones: ['Africa/Dar_es_Salaam'] },\n UG: { name: 'Uganda', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Uganda (DPA)', locales: ['en'], compliance: ['dpa-ug'], timezones: ['Africa/Kampala'] },\n // ─── Africa — Southern ────────────────────────────────────────────────────\n AO: { name: 'Angola', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Angola', locales: ['pt-AO'], compliance: [], timezones: ['Africa/Luanda'] },\n BW: { name: 'Botswana', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Botswana (DPA)', locales: ['en'], compliance: ['dpa-bw'], timezones: ['Africa/Gaborone'] },\n LS: { name: 'Lesotho', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Lesotho', locales: ['en'], compliance: [], timezones: ['Africa/Maseru'] },\n NA: { name: 'Namibia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Namibia', locales: ['en'], compliance: [], timezones: ['Africa/Windhoek'] },\n SZ: { name: 'Eswatini', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Eswatini', locales: ['en'], compliance: [], timezones: ['Africa/Mbabane'] },\n ZA: { name: 'South Africa', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'South Africa (POPIA)', locales: ['en', 'af-ZA'], compliance: ['popia'], timezones: ['Africa/Johannesburg'] },\n ZM: { name: 'Zambia', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Zambia (DPA)', locales: ['en'], compliance: ['dpa-zm'], timezones: ['Africa/Lusaka'] },\n ZW: { name: 'Zimbabwe', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Zimbabwe (DPA)', locales: ['en'], compliance: ['dpa-zw'], timezones: ['Africa/Harare'] },\n // ─── Africa — North ───────────────────────────────────────────────────────\n DZ: { name: 'Algeria', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Algeria', locales: ['ar-DZ', 'fr-DZ'], compliance: ['dpa-dz'], timezones: ['Africa/Algiers'] },\n EG: { name: 'Egypt', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Egypt (DPA)', locales: ['ar-EG'], compliance: ['dpa-eg'], timezones: ['Africa/Cairo'] },\n LY: { name: 'Libya', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Libya', locales: ['ar-LY'], compliance: [], timezones: ['Africa/Tripoli'] },\n MA: { name: 'Morocco', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Morocco', locales: ['ar-MA', 'fr-MA'], compliance: ['dpa-ma'], timezones: ['Africa/Casablanca'] },\n SD: { name: 'Sudan', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Sudan', locales: ['ar-SD'], compliance: [], timezones: ['Africa/Khartoum'] },\n TN: { name: 'Tunisia', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Tunisia (DPA)', locales: ['ar-TN', 'fr-TN'], compliance: ['dpa-tn'], timezones: ['Africa/Tunis'] },\n // ─── Africa — Central ─────────────────────────────────────────────────────\n CD: { name: 'DR Congo', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'DR Congo', locales: ['fr-CD'], compliance: [], timezones: ['Africa/Kinshasa', 'Africa/Lubumbashi'] },\n CF: { name: 'Central African Republic', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Central African Republic', locales: ['fr-CF'], compliance: [], timezones: ['Africa/Bangui'] },\n CG: { name: 'Republic of Congo', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Republic of Congo', locales: ['fr-CG'], compliance: [], timezones: ['Africa/Brazzaville'] },\n TD: { name: 'Chad', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Chad', locales: ['fr-TD', 'ar-TD'], compliance: [], timezones: ['Africa/Ndjamena'] },\n // ─── Europe — Eastern ─────────────────────────────────────────────────────\n BY: { name: 'Belarus', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Belarus', locales: ['be-BY', 'ru-BY'], compliance: [], timezones: ['Europe/Minsk'] },\n MD: { name: 'Moldova', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Moldova', locales: ['ro-MD'], compliance: [], timezones: ['Europe/Chisinau'] },\n RU: { name: 'Russia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Russia', locales: ['ru-RU'], compliance: [], timezones: ['Europe/Kaliningrad', 'Europe/Moscow', 'Europe/Samara', 'Asia/Yekaterinburg', 'Asia/Omsk', 'Asia/Krasnoyarsk', 'Asia/Irkutsk', 'Asia/Yakutsk', 'Asia/Vladivostok', 'Asia/Magadan', 'Asia/Kamchatka'] },\n UA: { name: 'Ukraine', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Ukraine', locales: ['uk-UA'], compliance: [], timezones: ['Europe/Kyiv'] },\n VA: { name: 'Holy See', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Holy See', locales: ['it-VA'], compliance: [], timezones: ['Europe/Vatican'] },\n // ─── Oceania ──────────────────────────────────────────────────────────────\n AU: { name: 'Australia', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'Australia (Privacy Act)', locales: ['en'], compliance: ['privacy-au'], timezones: ['Australia/Sydney', 'Australia/Brisbane', 'Australia/Adelaide', 'Australia/Darwin', 'Australia/Perth', 'Australia/Hobart'] },\n FJ: { name: 'Fiji', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Fiji', locales: ['en'], compliance: ['privacy-fj'], timezones: ['Pacific/Fiji'] },\n FM: { name: 'Micronesia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Micronesia', locales: ['en'], compliance: [], timezones: ['Pacific/Chuuk', 'Pacific/Pohnpei', 'Pacific/Kosrae'] },\n KI: { name: 'Kiribati', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Kiribati', locales: ['en'], compliance: [], timezones: ['Pacific/Tarawa', 'Pacific/Enderbury', 'Pacific/Kiritimati'] },\n MH: { name: 'Marshall Islands', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Marshall Islands', locales: ['en'], compliance: [], timezones: ['Pacific/Majuro', 'Pacific/Kwajalein'] },\n MP: { name: 'Northern Mariana Islands', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Northern Mariana Islands', locales: ['en'], compliance: [], timezones: ['Pacific/Saipan'] },\n NC: { name: 'New Caledonia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'New Caledonia', locales: ['fr-NC'], compliance: [], timezones: ['Pacific/Noumea'] },\n NF: { name: 'Norfolk Island', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Norfolk Island', locales: ['en'], compliance: [], timezones: ['Pacific/Norfolk'] },\n NR: { name: 'Nauru', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Nauru', locales: ['en'], compliance: [], timezones: ['Pacific/Nauru'] },\n NU: { name: 'Niue', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Niue', locales: ['en'], compliance: [], timezones: ['Pacific/Niue'] },\n NZ: { name: 'New Zealand', type: 'country', complianceGroup: 'general-privacy-consent', default: 'general-privacy-consent', description: 'New Zealand (Privacy Act)', locales: ['en'], compliance: ['privacy-nz'], timezones: ['Pacific/Auckland', 'Pacific/Chatham'] },\n PF: { name: 'French Polynesia', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'French Polynesia', locales: ['fr-PF'], compliance: [], timezones: ['Pacific/Tahiti', 'Pacific/Marquesas', 'Pacific/Gambier'] },\n PG: { name: 'Papua New Guinea', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Papua New Guinea', locales: ['en'], compliance: ['privacy-pg'], timezones: ['Pacific/Port_Moresby', 'Pacific/Bougainville'] },\n PW: { name: 'Palau', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Palau', locales: ['en'], compliance: [], timezones: ['Pacific/Palau'] },\n SB: { name: 'Solomon Islands', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Solomon Islands', locales: ['en'], compliance: [], timezones: ['Pacific/Guadalcanal'] },\n TO: { name: 'Tonga', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Tonga', locales: ['en'], compliance: [], timezones: ['Pacific/Tongatapu'] },\n TV: { name: 'Tuvalu', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Tuvalu', locales: ['en'], compliance: [], timezones: ['Pacific/Funafuti'] },\n VU: { name: 'Vanuatu', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Vanuatu', locales: ['fr-VU', 'en'], compliance: [], timezones: ['Pacific/Efate'] },\n WS: { name: 'Samoa', type: 'country', complianceGroup: 'notice-only', default: 'notice-only', description: 'Samoa', locales: ['en'], compliance: [], timezones: ['Pacific/Apia'] },\n // ─── Europe — GDPR-equivalent / adequacy ─────────────────────────────────\n UK: { name: 'United Kingdom', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'United Kingdom (UK GDPR + PECR)', locales: ['en'], compliance: ['uk-gdpr', 'pecr'], timezones: ['Europe/London'] },\n CH: { name: 'Switzerland', type: 'country', complianceGroup: 'opt-in', default: 'opt-in', description: 'Switzerland (revFADP)', locales: ['de-CH', 'fr-CH', 'it-CH'], compliance: ['revfadp'], timezones: ['Europe/Zurich'] },\n },\n} satisfies {\n version: string\n countries: Record<string, {\n name: string\n type: 'country'\n complianceGroup: ComplianceGroupId\n default: ComplianceGroupId\n description: string\n locales: readonly string[]\n compliance: readonly Compliance[]\n timezones: readonly string[]\n overriddenRegions?: Record<string, {\n name: string\n type: 'region'\n complianceGroup: ComplianceGroupId\n description: string\n }>\n }>\n}\n\nexport const COUNTRY_CODES = Object.entries(EMBEDDED_COMPLIANCE_MAP.countries).reduce(function (acc, [c, d]) {\n acc[c] = d.name;\n return acc;\n}, {} as Record<string, string>);\n\nexport const LOCALES = Object.values(EMBEDDED_COMPLIANCE_MAP.countries).reduce(function (acc, c) {\n c.locales.forEach(l => {\n acc[l] = c.name;\n })\n return acc;\n}, {} as Record<string, string>);\n","import { COOKIE_PURPOSE_IDS } from \"./compliance\";\n\ntype CookiePurpose = typeof COOKIE_PURPOSE_IDS[number];\n\n/**\n * Curated, community-extendable dataset of common non-IAB tracker cookie/storage key names.\n * Not attempting to rival a crawler-fed proprietary vendor database (that's the job of\n * `@consenti/enterprise-tools`'s scanner) — this is a small, hand-maintained list covering the\n * trackers most self-hosted sites actually use, to save admins from guessing a category when\n * defining a cookie parameter by hand.\n */\nexport interface TrackerKnowledgeEntry {\n /** Exact cookie/storage key name, or a prefix ending in \"*\" for variable-suffix names\n * (e.g. GA4's per-property `_ga_<container-id>`). */\n pattern: string;\n vendor: string;\n category: CookiePurpose;\n}\n\nexport const TRACKER_KNOWLEDGE_BASE: TrackerKnowledgeEntry[] = [\n // Google Consent Mode v2 — canonical parameter names, must match KNOWN_COOKIE_PURPOSES in compliance.ts\n { pattern: \"security_storage\", vendor: \"Google Consent Mode v2\", category: \"necessary\" },\n { pattern: \"functionality_storage\", vendor: \"Google Consent Mode v2\", category: \"functional\" },\n { pattern: \"personalization_storage\", vendor: \"Google Consent Mode v2\", category: \"preferences\" },\n { pattern: \"analytics_storage\", vendor: \"Google Consent Mode v2\", category: \"analytics\" },\n { pattern: \"ad_storage\", vendor: \"Google Consent Mode v2\", category: \"marketing\" },\n { pattern: \"ad_user_data\", vendor: \"Google Consent Mode v2\", category: \"marketing\" },\n { pattern: \"ad_personalization\", vendor: \"Google Consent Mode v2\", category: \"marketing\" },\n // Google Analytics 4 / Universal Analytics\n { pattern: \"_ga\", vendor: \"Google Analytics\", category: \"analytics\" },\n { pattern: \"_ga_*\", vendor: \"Google Analytics 4\", category: \"analytics\" },\n { pattern: \"_gid\", vendor: \"Google Analytics\", category: \"analytics\" },\n { pattern: \"_gat\", vendor: \"Google Analytics\", category: \"analytics\" },\n { pattern: \"_gat_*\", vendor: \"Google Analytics\", category: \"analytics\" },\n // Google Ads\n { pattern: \"_gcl_au\", vendor: \"Google Ads\", category: \"marketing\" },\n { pattern: \"_gac_*\", vendor: \"Google Ads\", category: \"marketing\" },\n { pattern: \"_gcl_aw\", vendor: \"Google Ads\", category: \"marketing\" },\n // Meta / Facebook Pixel\n { pattern: \"_fbp\", vendor: \"Meta Pixel\", category: \"marketing\" },\n { pattern: \"_fbc\", vendor: \"Meta Pixel\", category: \"marketing\" },\n { pattern: \"fr\", vendor: \"Meta Pixel\", category: \"marketing\" },\n // Hotjar\n { pattern: \"_hjSessionUser_*\", vendor: \"Hotjar\", category: \"analytics\" },\n { pattern: \"_hjSession_*\", vendor: \"Hotjar\", category: \"analytics\" },\n { pattern: \"_hjid\", vendor: \"Hotjar\", category: \"analytics\" },\n { pattern: \"hjViewportId\", vendor: \"Hotjar\", category: \"analytics\" },\n // Segment\n { pattern: \"ajs_user_id\", vendor: \"Segment\", category: \"analytics\" },\n { pattern: \"ajs_anonymous_id\", vendor: \"Segment\", category: \"analytics\" },\n { pattern: \"ajs_group_id\", vendor: \"Segment\", category: \"analytics\" },\n // Intercom\n { pattern: \"intercom-id-*\", vendor: \"Intercom\", category: \"functional\" },\n { pattern: \"intercom-session-*\", vendor: \"Intercom\", category: \"functional\" },\n { pattern: \"intercom-device-id-*\", vendor: \"Intercom\", category: \"functional\" },\n // HubSpot\n { pattern: \"__hstc\", vendor: \"HubSpot\", category: \"marketing\" },\n { pattern: \"hubspotutk\", vendor: \"HubSpot\", category: \"marketing\" },\n { pattern: \"__hssc\", vendor: \"HubSpot\", category: \"marketing\" },\n { pattern: \"__hssrc\", vendor: \"HubSpot\", category: \"marketing\" },\n // Mixpanel\n { pattern: \"mp_*\", vendor: \"Mixpanel\", category: \"analytics\" },\n // LinkedIn Insight Tag\n { pattern: \"li_sugr\", vendor: \"LinkedIn Insight\", category: \"marketing\" },\n { pattern: \"bcookie\", vendor: \"LinkedIn Insight\", category: \"marketing\" },\n { pattern: \"lidc\", vendor: \"LinkedIn Insight\", category: \"marketing\" },\n { pattern: \"UserMatchHistory\", vendor: \"LinkedIn Insight\", category: \"marketing\" },\n // TikTok Pixel\n { pattern: \"_ttp\", vendor: \"TikTok Pixel\", category: \"marketing\" },\n // Microsoft Clarity\n { pattern: \"_clck\", vendor: \"Microsoft Clarity\", category: \"analytics\" },\n { pattern: \"_clsk\", vendor: \"Microsoft Clarity\", category: \"analytics\" },\n // Pinterest Tag\n { pattern: \"_pinterest_ct*\", vendor: \"Pinterest Tag\", category: \"marketing\" },\n { pattern: \"_pin_unauth\", vendor: \"Pinterest Tag\", category: \"marketing\" },\n // X (Twitter) Pixel\n { pattern: \"personalization_id\", vendor: \"X (Twitter) Pixel\", category: \"marketing\" },\n // Amplitude\n { pattern: \"amplitude_id_*\", vendor: \"Amplitude\", category: \"analytics\" },\n // Stripe (payment fraud prevention — necessary, not marketing)\n { pattern: \"__stripe_mid\", vendor: \"Stripe\", category: \"necessary\" },\n { pattern: \"__stripe_sid\", vendor: \"Stripe\", category: \"necessary\" },\n // Cloudflare bot management (necessary — security)\n { pattern: \"__cf_bm\", vendor: \"Cloudflare\", category: \"necessary\" },\n { pattern: \"cf_clearance\", vendor: \"Cloudflare\", category: \"necessary\" },\n // Zendesk\n { pattern: \"_zendesk_*\", vendor: \"Zendesk\", category: \"functional\" },\n // Drift\n { pattern: \"drift_aid\", vendor: \"Drift\", category: \"functional\" },\n { pattern: \"driftt_aid\", vendor: \"Drift\", category: \"functional\" },\n // Crisp\n { pattern: \"crisp-client*\", vendor: \"Crisp\", category: \"functional\" },\n];\n\n/** Matches a typed cookie/storage key against the knowledge base — exact match first, then the\n * longest matching \"*\"-suffixed prefix pattern. Returns `undefined` for unrecognized names. */\nexport function matchTrackerKnowledge(id: string): TrackerKnowledgeEntry | undefined {\n const trimmed = id.trim();\n if (!trimmed) return undefined;\n\n const exact = TRACKER_KNOWLEDGE_BASE.find((e) => !e.pattern.endsWith(\"*\") && e.pattern === trimmed);\n if (exact) return exact;\n\n const prefixMatches = TRACKER_KNOWLEDGE_BASE.filter(\n (e) => e.pattern.endsWith(\"*\") && trimmed.startsWith(e.pattern.slice(0, -1)),\n );\n if (prefixMatches.length === 0) return undefined;\n return prefixMatches.reduce((longest, e) => (e.pattern.length > longest.pattern.length ? e : longest));\n}\n","// Structured rich-text format shared between the admin dashboard's editor and the server:\n// stored in the DB as a compact JSON string, safer than raw HTML since the renderer only ever\n// emits a known whitelist of tags. `htmlToJson` (HTML → ContentDoc, needs a DOM parser) stays\n// dashboard-only — everything here is DOM-independent so it also runs server-side, where\n// `renderContentText` converts a stored field to the real HTML the widget's `innerHTML` expects.\n\nexport type ContentNode = TextNode | InlineNode | BlockNode | LinkNode | BrNode\n\nexport interface TextNode { t: 'text'; v: string }\nexport interface InlineNode { t: 'b' | 'i' | 'u'; c: ContentNode[] }\nexport interface BlockNode { t: 'p' | 'ul' | 'ol' | 'li'; c: ContentNode[] }\nexport interface LinkNode { t: 'a'; href: string; c: ContentNode[] }\nexport interface BrNode { t: 'br' }\n\nexport type ContentDoc = ContentNode[]\n\n/** Render a `ContentDoc` to an HTML string (only ever emits the whitelisted tags above). */\nexport function jsonToHtml(doc: ContentDoc): string {\n return doc.map(renderNode).join('')\n}\n\nfunction renderNode(node: ContentNode): string {\n if (node.t === 'text') return escHtml(node.v)\n if (node.t === 'br') return '<br>'\n if (node.t === 'a') return `<a href=\"${escAttr(node.href)}\">${node.c.map(renderNode).join('')}</a>`\n return `<${node.t}>${node.c.map(renderNode).join('')}</${node.t}>`\n}\n\nfunction escHtml(s: string): string {\n return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')\n}\n\nfunction escAttr(s: string): string {\n return s.replace(/\"/g, '&quot;').replace(/</g, '&lt;')\n}\n\n/**\n * Converts a stored `htmlText`-style field to the real HTML the widget's `innerHTML` expects.\n * Handles both formats a field can be in: the compact `ContentDoc` JSON (current editor output)\n * and a legacy/embedded-profile plain HTML string (used as-is — already real HTML, and possibly\n * containing tags outside the whitelist that a JSON round-trip would otherwise drop).\n */\nexport function renderContentText(value: string | undefined | null): string {\n if (!value) return ''\n const trimmed = value.trim()\n if (trimmed.startsWith('[')) {\n try {\n return jsonToHtml(JSON.parse(trimmed) as ContentDoc)\n } catch { /* not actually JSON — fall through and treat as HTML */ }\n }\n return value\n}\n\nfunction nodeHasVisibleText(node: ContentNode): boolean {\n if (node.t === 'text') return node.v.trim().length > 0\n if (node.t === 'br') return false\n return node.c.some(nodeHasVisibleText)\n}\n\n/** Strips HTML tags to check for leftover visible text — used only as a fallback for the\n * legacy/embedded-profile plain-HTML-string case `renderContentText` also handles. */\nfunction stripTagsHasVisibleText(html: string): boolean {\n return html.replace(/<[^>]*>/g, '').trim().length > 0\n}\n\n/**\n * Whether a stored `htmlText`-style field has any actual visible text — used to enforce\n * mandatory-content rules (body text, category descriptions that must not be blank). A naive\n * `value.length > 0` check is not enough: an empty rich-text editor can still serialize to a\n * non-empty-looking `ContentDoc` JSON string (e.g. `\"[]\"` or a paragraph node with an empty text\n * node), which would pass a length check while rendering nothing. Mirrors `renderContentText`'s\n * two input shapes (`ContentDoc` JSON, or a legacy plain-HTML string) so client-side wizard\n * validation and the backend validator agree on exactly what counts as \"blank.\"\n */\nexport function hasVisibleText(value: string | undefined | null): boolean {\n if (!value) return false\n const trimmed = value.trim()\n if (!trimmed) return false\n if (trimmed.startsWith('[')) {\n try {\n const doc = JSON.parse(trimmed) as ContentDoc\n return doc.some(nodeHasVisibleText)\n } catch { /* not actually JSON — fall through and treat as HTML/plain text */ }\n }\n return stripTagsHasVisibleText(trimmed)\n}\n","// Simplified TC string encoder/decoder.\n// This implementation stores a base64url-encoded JSON payload for basic compatibility.\n// For full IAB TCF v2.2 compliance (binary bitfield encoding), use the iabtcf-core npm package.\n//\n// Implemented with a manual base64url codec over Uint8Array (no `Buffer`) so this file works\n// identically in Node (`@consenti/api`) and the browser (`@consenti/ui`) without a runtime dependency.\n\nconst B64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'\n\nfunction utf8Encode(str: string): Uint8Array {\n return new TextEncoder().encode(str)\n}\n\nfunction utf8Decode(bytes: Uint8Array): string {\n return new TextDecoder().decode(bytes)\n}\n\nfunction base64UrlEncode(bytes: Uint8Array): string {\n let out = ''\n for (let i = 0; i < bytes.length; i += 3) {\n const b0 = bytes[i] ?? 0\n const b1 = i + 1 < bytes.length ? bytes[i + 1] ?? 0 : 0\n const b2 = i + 2 < bytes.length ? bytes[i + 2] ?? 0 : 0\n out += B64_CHARS[b0 >> 2]\n out += B64_CHARS[((b0 & 0x03) << 4) | (b1 >> 4)]\n if (i + 1 < bytes.length) out += B64_CHARS[((b1 & 0x0f) << 2) | (b2 >> 6)]\n if (i + 2 < bytes.length) out += B64_CHARS[b2 & 0x3f]\n }\n return out\n}\n\nfunction base64UrlDecode(str: string): Uint8Array {\n const lookup = new Map(B64_CHARS.split('').map((c, idx) => [c, idx]))\n const cleaned = str.replace(/[^A-Za-z0-9\\-_]/g, '')\n const bytes: number[] = []\n for (let i = 0; i < cleaned.length; i += 4) {\n const c0 = lookup.get(cleaned[i] ?? '') ?? 0\n const c1 = lookup.get(cleaned[i + 1] ?? '') ?? 0\n const c2 = cleaned[i + 2] !== undefined ? lookup.get(cleaned[i + 2] as string) : undefined\n const c3 = cleaned[i + 3] !== undefined ? lookup.get(cleaned[i + 3] as string) : undefined\n bytes.push((c0 << 2) | (c1 >> 4))\n if (c2 !== undefined) bytes.push(((c1 & 0x0f) << 4) | (c2 >> 2))\n if (c3 !== undefined) bytes.push(((c2 ?? 0) & 0x03) << 6 | c3)\n }\n return new Uint8Array(bytes)\n}\n\nexport interface TcStringInput {\n cmpId: number\n cmpVersion: number\n consentScreen: number\n consentLanguage: string\n vendorListVersion: number\n purposeConsents: number[]\n vendorConsents: number[]\n}\n\nexport function encodeTcString(input: TcStringInput): string {\n const payload = {\n v: 2,\n ts: Math.floor(Date.now() / 100),\n cmpId: input.cmpId,\n cmpV: input.cmpVersion,\n cs: input.consentScreen,\n lang: input.consentLanguage.toUpperCase().slice(0, 2),\n vlV: input.vendorListVersion,\n pc: input.purposeConsents,\n vc: input.vendorConsents,\n }\n return base64UrlEncode(utf8Encode(JSON.stringify(payload)))\n}\n\nexport interface DecodedTcString {\n version: number\n cmpId: number\n consentLanguage: string\n purposeConsents: number[]\n vendorConsents: number[]\n created: number\n}\n\nexport function decodeTcString(tcString: string): DecodedTcString | null {\n try {\n const raw = JSON.parse(utf8Decode(base64UrlDecode(tcString))) as {\n v: number; cmpId: number; lang: string; pc: number[]; vc: number[]; ts: number\n }\n return {\n version: raw.v,\n cmpId: raw.cmpId,\n consentLanguage: raw.lang,\n purposeConsents: Array.isArray(raw.pc) ? raw.pc : [],\n vendorConsents: Array.isArray(raw.vc) ? raw.vc : [],\n created: raw.ts * 100,\n }\n } catch {\n return null\n }\n}\n","/** ISO 639-1 prefixes of languages conventionally written right-to-left. */\nconst RTL_LANGUAGE_PREFIXES = ['ar', 'he', 'fa', 'ur', 'ps', 'sd', 'ug', 'yi']\n\n/**\n * Resolves the text direction for a locale. `override` (an explicit `core.dir` config value)\n * always wins; `'auto'` (or omitted) derives the direction from the locale's language prefix.\n */\nexport function resolveTextDirection(locale: string, override?: 'ltr' | 'rtl' | 'auto'): 'ltr' | 'rtl' {\n if (override === 'ltr' || override === 'rtl') return override\n const prefix = locale.slice(0, 2).toLowerCase()\n return RTL_LANGUAGE_PREFIXES.includes(prefix) ? 'rtl' : 'ltr'\n}\n"],"mappings":"AAiCM,SAAUA,EACZC,EACAC,EAAa,CAEb,IAAIC,EAEJ,OAAO,YAEAC,EAAmB,CAElBD,IAAU,QACV,aAAaA,CAAK,EAGtBA,EAAQ,WAAW,IAAK,CACpBF,EAAG,MAAM,KAAMG,CAAI,CACvB,EAAGF,CAAK,CACZ,CACJ,CCrBM,SAAUG,EACZC,EACAC,EAAa,CAEb,IAAIC,EAAW,EAEf,OAAO,YAEAC,EAAmB,CAEtB,IAAMC,EAAM,KAAK,IAAG,EAEhBA,EAAMF,GAAYD,IAClBC,EAAWE,EACXJ,EAAG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,CACN,OAAO,IACT,CACF,CChGA,IAAMC,EAAwB,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,IAAI,EAMvE,SAAUC,GAAqBC,EAAgBC,EAAiC,CACpF,GAAIA,IAAa,OAASA,IAAa,MAAO,OAAOA,EACrD,IAAMC,EAASF,EAAO,MAAM,EAAG,CAAC,EAAE,YAAW,EAC7C,OAAOF,EAAsB,SAASI,CAAM,EAAI,MAAQ,KAC1D","names":["debounce","fn","delay","timer","args","throttle","fn","delay","lastCall","args","now","COMPLIANCE_REGULATION_IDS","COMPLIANCE_GROUP_IDS","COMPLIANCE_GROUPS","GPC_OPTIONS","LEGAL_BASIS_OPTIONS","CPRA_CATEGORIES","COOKIE_PURPOSE_IDS","COOKIE_PURPOSES","COOKIE_PURPOSE_DEFAULTS","KNOWN_COOKIE_PURPOSES","inferCookiePurpose","cookie","TCF_PURPOSES","TCF_SPECIAL_FEATURES","findCategoryForCookie","cookieId","categories","category","buildCookieCategoryIndex","index","getCookieLegalBasis","isMandatoryCookie","COMPLIANCE_VALIDATION_RULES","c","id","legalBasis","EMBEDDED_COMPLIANCE_MAP","COUNTRY_CODES","acc","d","LOCALES","l","TRACKER_KNOWLEDGE_BASE","matchTrackerKnowledge","id","trimmed","exact","e","prefixMatches","longest","jsonToHtml","doc","renderNode","node","escHtml","escAttr","s","renderContentText","value","trimmed","nodeHasVisibleText","stripTagsHasVisibleText","html","hasVisibleText","B64_CHARS","utf8Encode","str","utf8Decode","bytes","base64UrlEncode","out","i","b0","b1","b2","base64UrlDecode","lookup","c","idx","cleaned","c0","c1","c2","c3","encodeTcString","input","payload","decodeTcString","tcString","raw","RTL_LANGUAGE_PREFIXES","resolveTextDirection","locale","override","prefix"]}